diff --git a/168.6c44f8e72cf1ab8d.js b/168.6c44f8e72cf1ab8d.js deleted file mode 100644 index 752a22f72..000000000 --- a/168.6c44f8e72cf1ab8d.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdemo_maps=self.webpackChunkdemo_maps||[]).push([[168],{268:(Si,di)=>{var Zn,Kt,mt,c,ue,E,ae,pn,Pe,xt,un;Kt={defaultNoDataValue:-34027999387901484e22,decode:function(ye,Le){var ve=E(ye,(Le=Le||{}).inputOffset||0,Le.encodedMaskData||null===Le.encodedMaskData),ke=null!==Le.noDataValue?Le.noDataValue:Kt.defaultNoDataValue,Ne=mt(ve,Le.pixelType||Float32Array,Le.encodedMaskData,ke,Le.returnMask),g={width:ve.width,height:ve.height,pixelData:Ne.resultPixels,minValue:Ne.minValue,maxValue:ve.pixels.maxValue,noDataValue:ke};return Ne.resultMask&&(g.maskData=Ne.resultMask),Le.returnEncodedMask&&ve.mask&&(g.encodedMaskData=ve.mask.bitset?ve.mask.bitset:null),Le.returnFileInfo&&(g.fileInfo=c(ve),Le.computeUsedBitDepths&&(g.fileInfo.bitDepths=ue(ve))),g}},mt=function(ye,Le,T,ve,ke){var Xe,Ft,It,Ne=0,g=ye.pixels.numBlocksX,nt=ye.pixels.numBlocksY,Ve=Math.floor(ye.width/g),He=Math.floor(ye.height/nt),Fe=2*ye.maxZError,Ke=Number.MAX_VALUE;T=T||(ye.mask?ye.mask.bitset:null),Ft=new Le(ye.width*ye.height),ke&&T&&(It=new Uint8Array(ye.width*ye.height));for(var it,Rt,b=new Float32Array(Ve*He),Yt=0;Yt<=nt;Yt++){var Ct=Yt!==nt?He:ye.height%nt;if(0!==Ct)for(var H=0;H<=g;H++){var J=H!==g?Ve:ye.width%g;if(0!==J){var Me,Ge,Nt,hn,de=Yt*ye.width*He+H*Ve,Ee=ye.width-J,_e=ye.pixels.blocks[Ne];if(_e.encoding<2?(0===_e.encoding?Me=_e.rawData:(ae(_e.stuffedData,_e.bitsPerPixel,_e.numValidPixels,_e.offset,Fe,b,ye.pixels.maxValue),Me=b),Ge=0):Nt=2===_e.encoding?0:_e.offset,T)for(Rt=0;Rt>3],hn<<=7&de),it=0;it>3]),128&hn?(It&&(It[de]=1),Ke=Ke>(Xe=_e.encoding<2?Me[Ge++]:Nt)?Xe:Ke,Ft[de++]=Xe):(It&&(It[de]=0),Ft[de++]=ve),hn<<=1;de+=Ee}else if(_e.encoding<2)for(Rt=0;Rt(Xe=Me[Ge++])?Xe:Ke,Ft[de++]=Xe;de+=Ee}else for(Ke=Ke>Nt?Nt:Ke,Rt=0;Rt0){var g=new Uint8Array(Math.ceil(ve.width*ve.height/8)),nt=(Ne=new DataView(ye,Le,ve.mask.numBytes)).getInt16(0,!0),Ve=2,He=0;do{if(nt>0)for(;nt--;)g[He++]=Ne.getUint8(Ve++);else{var Fe=Ne.getUint8(Ve++);for(nt=-nt;nt--;)g[He++]=Fe}nt=Ne.getInt16(Ve,!0),Ve+=2}while(Ve0?1:0),It=Xe+(ve.height%Xe>0?1:0);ve.pixels.blocks=new Array(Ft*It);for(var b=0,it=0;it3)throw"Invalid block encoding ("+H.encoding+")";if(2!==H.encoding){if(0!==J&&2!==J){if(H.offsetType=J>>=6,2===J)H.offset=Ne.getInt8(1),Yt++;else if(1===J)H.offset=Ne.getInt16(1,!0),Yt+=2;else{if(0!==J)throw"Invalid block offset type";H.offset=Ne.getFloat32(1,!0),Yt+=4}if(1===H.encoding)if(J=Ne.getUint8(Yt),Yt++,H.bitsPerPixel=63&J,H.numValidPixelsType=J>>=6,2===J)H.numValidPixels=Ne.getUint8(Yt),Yt++;else if(1===J)H.numValidPixels=Ne.getUint16(Yt,!0),Yt+=2;else{if(0!==J)throw"Invalid valid pixel count type";H.numValidPixels=Ne.getUint32(Yt,!0),Yt+=4}}var de;if(Le+=Yt,3!==H.encoding)if(0===H.encoding){var _e=(ve.pixels.numBytes-1)/4;if(_e!==Math.floor(_e))throw"uncompressed block has invalid length";de=new ArrayBuffer(4*_e),new Uint8Array(de).set(new Uint8Array(ye,Le,4*_e));var Me=new Float32Array(de);H.rawData=Me,Le+=4*_e}else if(1===H.encoding){var Ge=Math.ceil(H.numValidPixels*H.bitsPerPixel/8),Nt=Math.ceil(Ge/4);de=new ArrayBuffer(4*Nt),new Uint8Array(de).set(new Uint8Array(ye,Le,Ge)),H.stuffedData=new Uint32Array(de),Le+=Ge}}else Le++}return ve.eofOffset=Le,ve},ae=function(ye,Le,T,ve,ke,Ne,g){var He,Ke,Xe,nt=(1<=Le)Ke=Xe>>>Fe-Le&nt,Fe-=Le;else{var b=Le-Fe;Ke=(Xe&nt)<>>(Fe=32-b)}Ne[He]=Ke=ye?(Fe=Ke>>>He-ye&g,He-=ye):(Fe=(Ke&g)<<(Xe=ye-He)&g,Fe+=(Ke=E[nt++])>>>(He=32-Xe)),ae[Ve]=T[Fe];else for(Ft=Math.ceil((Ne-ve)/ke),Ve=0;Ve=ye?(Fe=Ke>>>He-ye&g,He-=ye):(Fe=(Ke&g)<<(Xe=ye-He)&g,Fe+=(Ke=E[nt++])>>>(He=32-Xe)),ae[Ve]=Fe=ye?(Ke=Xe>>>Fe&g,He-=ye,Fe+=ye):(Ke=Xe>>>Fe&g,He=32-(Ft=ye-He),Ke|=((Xe=E[nt++])&(1<=ye?(Ke=Xe>>>Fe&g,He-=ye,Fe+=ye):(Ke=Xe>>>Fe&g,He=32-(Ft=ye-He),Ke|=((Xe=E[nt++])&(1<=359?359:T;T-=ke;do{ae+=E[ve++]<<8,ye+=ae+=E[ve++]}while(--ke);ae=(65535&ae)+(ae>>>16),ye=(65535&ye)+(ye>>>16)}return 1&Le&&(ye+=ae+=E[ve]<<8),((ye=(65535&ye)+(ye>>>16))<<16|(ae=(65535&ae)+(ae>>>16)))>>>0},readHeaderInfo:function(E,ae){var ye=ae.ptr,Le=new Uint8Array(E,ye,6),T={};if(T.fileIdentifierString=String.fromCharCode.apply(null,Le),0!==T.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+T.fileIdentifierString;ye+=6;var ve=new DataView(E,ye,8),ke=ve.getInt32(0,!0);if(T.fileVersion=ke,ye+=4,ke>=3&&(T.checksum=ve.getUint32(4,!0),ye+=4),ve=new DataView(E,ye,12),T.height=ve.getUint32(0,!0),T.width=ve.getUint32(4,!0),ye+=8,ke>=4?(T.numDims=ve.getUint32(8,!0),ye+=4):T.numDims=1,ve=new DataView(E,ye,40),T.numValidPixel=ve.getUint32(0,!0),T.microBlockSize=ve.getInt32(4,!0),T.blobSize=ve.getInt32(8,!0),T.imageType=ve.getInt32(12,!0),T.maxZError=ve.getFloat64(16,!0),T.zMin=ve.getFloat64(24,!0),T.zMax=ve.getFloat64(32,!0),ye+=40,ae.headerInfo=T,ae.ptr=ye,ke>=3&&this.computeChecksumFletcher32(new Uint8Array(E,ye-(ke>=4?52:48),T.blobSize-14))!==T.checksum)throw"Checksum failed.";return!0},checkMinMaxRanges:function(E,ae){var ye=ae.headerInfo,Le=this.getDataTypeArray(ye.imageType),T=ye.numDims*this.getDataTypeSize(ye.imageType),ve=this.readSubArray(E,ae.ptr,Le,T),ke=this.readSubArray(E,ae.ptr+T,Le,T);ae.ptr+=2*T;var Ne,g=!0;for(Ne=0;Ne0){g=new Uint8Array(Math.ceil(T/8));var Ve=(ke=new DataView(E,ye,Ne.numBytes)).getInt16(0,!0),He=2,Fe=0,Ke=0;do{if(Ve>0)for(;Ve--;)g[Fe++]=ke.getUint8(He++);else for(Ke=ke.getUint8(He++),Ve=-Ve;Ve--;)g[Fe++]=Ke;Ve=ke.getInt16(He,!0),He+=2}while(He>3],Xe<<=7&Ft):Xe=g[Ft>>3],128&Xe&&(nt[Ft]=1);ae.pixels.resultMask=nt,Ne.bitset=g,ye+=Ne.numBytes}return ae.ptr=ye,ae.mask=Ne,!0},readDataOneSweep:function(E,ae,ye){var nt,Le=ae.ptr,T=ae.headerInfo,ve=T.numDims,ke=T.width*T.height,g=T.numValidPixel*mt.getDataTypeSize(T.imageType)*ve,Ve=ae.pixels.resultMask;if(ye===Uint8Array)nt=new Uint8Array(E,Le,g);else{var He=new ArrayBuffer(g);new Uint8Array(He).set(new Uint8Array(E,Le,g)),nt=new ye(He)}if(nt.length===ke*ve)ae.pixels.resultPixels=nt;else{ae.pixels.resultPixels=new ye(ke*ve);var Ke=0,Xe=0,Ft=0,It=0;if(ve>1)for(Ft=0;Ft=Ne)return!1;var g=new Uint32Array(Ne-ke);mt.decodeBits(E,ae,g);var Ve,He,Fe,Ke,nt=[];for(Ve=ke;Ve0&&(nt[He].second=Yt<>>32-Ke,32-Rt>=Ke?32===(Rt+=Ke)&&(Rt=0,Yt=it[++Ct]):(Ct++,nt[He].second|=(Yt=it[Ct])>>>32-(Rt+=Ke-32)));var J,H=0,de=new c;for(Ve=0;Ve=ye?ye:H,H>=30&&console.log("WARning, large NUM LUT BITS IS "+H);var _e,Me,Ge,Nt,Vn,Ee=[];for(Ve=ke;Ve0)if(_e=[Ke,He],Ke<=J)for(Me=nt[He].second<=0;Nt--)Me>>>Nt&1?(Vn.right||(Vn.right=new c),Vn=Vn.right):(Vn.left||(Vn.left=new c),Vn=Vn.left),0===Nt&&!Vn.val&&(Vn.val=_e[1]);return{decodeLut:Ee,numBitsLUTQick:J,numBitsLUT:H,tree:de,stuffedData:it,srcPtr:Ct,bitPos:Rt}},readHuffman:function(E,ae,ye){var b,it,Rt,Ct,H,de,Ee,_e,Me,Le=ae.headerInfo,T=Le.numDims,ve=ae.headerInfo.height,ke=ae.headerInfo.width,Ne=ke*ve,g=this.readHuffmanTree(E,ae),nt=g.decodeLut,Ve=g.tree,He=g.stuffedData,Fe=g.srcPtr,Ke=g.bitPos,Xe=g.numBitsLUTQick,Ft=g.numBitsLUT,It=0===ae.headerInfo.imageType?128:0,Yt=ae.pixels.resultMask,Ge=0;Ke>0&&(Fe++,Ke=0);var zi,Nt=He[Fe],hn=1===ae.encodeMode,Vn=new ye(Ne*T),gi=Vn;for(zi=0;zi1&&(gi=new ye(Vn.buffer,Ne*zi,Ne),Ge=0),ae.headerInfo.numValidPixel===ke*ve)for(_e=0,de=0;de>>32-Xe,32-Ke>>64-Ke-Xe),nt[H])it=nt[H][1],Ke+=nt[H][0];else for(H=Ct=Nt<>>32-Ft,32-Ke>>64-Ke-Ft),b=Ve,Me=0;Me>>Ft-Me-1&1?b.right:b.left).left&&!b.right){it=b.val,Ke=Ke+Me+1;break}Ke>=32&&(Ke-=32,Nt=He[++Fe]),Rt=it-It,hn?(Rt+=Ee>0?Ge:de>0?gi[_e-ke]:Ge,gi[_e]=Rt&=255,Ge=Rt):gi[_e]=Rt}else for(_e=0,de=0;de>>32-Xe,32-Ke>>64-Ke-Xe),nt[H])it=nt[H][1],Ke+=nt[H][0];else for(H=Ct=Nt<>>32-Ft,32-Ke>>64-Ke-Ft),b=Ve,Me=0;Me>>Ft-Me-1&1?b.right:b.left).left&&!b.right){it=b.val,Ke=Ke+Me+1;break}Ke>=32&&(Ke-=32,Nt=He[++Fe]),Rt=it-It,hn?(Rt+=Ee>0&&Yt[_e-1]?Ge:de>0&&Yt[_e-ke]?gi[_e-ke]:Ge,gi[_e]=Rt&=255,Ge=Rt):gi[_e]=Rt}ae.ptr=ae.ptr+4*(Fe+1)+(Ke>0?4:0)}ae.pixels.resultPixels=Vn},decodeBits:function(E,ae,ye,Le,T){var ve=ae.headerInfo,ke=ve.fileVersion,Ne=0,g=new DataView(E,ae.ptr,5),nt=g.getUint8(0);Ne++;var Ve=nt>>6,He=0===Ve?4:3-Ve,Fe=(32&nt)>0,Ke=31&nt,Xe=0;if(1===He)Xe=g.getUint8(Ne),Ne++;else if(2===He)Xe=g.getUint16(Ne,!0),Ne+=2;else{if(4!==He)throw"Invalid valid pixel count type";Xe=g.getUint32(Ne,!0),Ne+=4}var It,b,it,Rt,Yt,Ct,H,J,Ee,Ft=2*ve.maxZError,_e=ve.numDims>1?ve.maxValues[T]:ve.zMax;if(Fe){for(ae.counter.lut++,J=g.getUint8(Ne),Ne++,Rt=Math.ceil((J-1)*Ke/8),Yt=Math.ceil(Rt/4),b=new ArrayBuffer(4*Yt),it=new Uint8Array(b),ae.ptr+=Ne,it.set(new Uint8Array(E,ae.ptr,Rt)),H=new Uint32Array(b),ae.ptr+=Rt,Ee=0;J-1>>>Ee;)Ee++;Rt=Math.ceil(Xe*Ee/8),Yt=Math.ceil(Rt/4),b=new ArrayBuffer(4*Yt),(it=new Uint8Array(b)).set(new Uint8Array(E,ae.ptr,Rt)),It=new Uint32Array(b),ae.ptr+=Rt,Ct=ke>=3?function(E,ae,ye,Le,T,ve){var Ke,ke=(1<=ae?(He=Ke>>>Fe&ke,Ve-=ae,Fe+=ae):(He=Ke>>>Fe&ke,Ve=32-(nt=ae-Ve),He|=((Ke=E[Ne++])&(1<=ae?(He=Fe>>>Ve-ae&ke,Ve-=ae):(He=(Fe&ke)<<(nt=ae-Ve)&ke,He+=(Fe=E[Ne++])>>>(Ve=32-nt)),Ke[g]=He=3?Kt_unstuff2(It,ye,Ee,Xe,Ct):Kt_unstuff(It,ye,Ee,Xe,Ct)}else ae.counter.bitstuffer++,Ee=Ke,ae.ptr+=Ne,Ee>0&&(Rt=Math.ceil(Xe*Ee/8),Yt=Math.ceil(Rt/4),b=new ArrayBuffer(4*Yt),(it=new Uint8Array(b)).set(new Uint8Array(E,ae.ptr,Rt)),It=new Uint32Array(b),ae.ptr+=Rt,ke>=3?null==Le?function(E,ae,ye,Le){var ke,nt,Ve,He,T=(1<=ye?(nt=Ve>>>g&T,Ne-=ye,g+=ye):(nt=Ve>>>g&T,Ne=32-(He=ye-Ne),nt|=((Ve=E[ve++])&(1<=ye?(g=nt>>>Ne-ye&T,Ne-=ye):(g=(nt&T)<<(Ve=ye-Ne)&T,g+=(nt=E[ve++])>>>(Ne=32-Ve)),ae[ke]=g}(It,ye,Ee,Xe):Kt_unstuff(It,ye,Ee,Xe,!1,Le,Ft,_e))},readTiles:function(E,ae,ye){var Le=ae.headerInfo,T=Le.width,ve=Le.height,ke=Le.microBlockSize,Ne=Le.imageType,g=mt.getDataTypeSize(Ne),nt=Math.ceil(T/ke),Ve=Math.ceil(ve/ke);ae.pixels.numBlocksY=Ve,ae.pixels.numBlocksX=nt,ae.pixels.ptr=0;var Me,Ge,Nt,Vn,gi,Br,vi,nr,He=0,Fe=0,Ke=0,Xe=0,Ft=0,It=0,it=0,Rt=0,Ct=0,H=0,J=0,de=0,Ee=0,_e=0,zi=new ye(ke*ke),fo=ve%ke||ke,_r=T%ke||ke,ht=Le.numDims,se=ae.pixels.resultMask,cn=ae.pixels.resultPixels;for(Ke=0;Ke1&&(cn=new ye(ae.pixels.resultPixels.buffer,T*ve*nr*g,T*ve)),Ge={},_e=0,_e++,Rt=(it=(Me=new DataView(E,ae.ptr,Math.min(10,E.byteLength-ae.ptr))).getUint8(0))>>6&255,(it>>2&15)!=(Xe*ke>>3&15))throw"integrity issue";if((gi=3&it)>3)throw ae.ptr+=_e,"Invalid block encoding ("+gi+")";if(2!==gi)if(0===gi){if(ae.counter.uncompressed++,ae.ptr+=_e,J=(J=Ft*It*g)<(de=E.byteLength-ae.ptr)?J:de,Nt=new ArrayBuffer(J%g==0?J:J+g-J%g),new Uint8Array(Nt).set(new Uint8Array(E,ae.ptr,J)),Vn=new ye(Nt),Ee=0,se)for(He=0;He1)for(ve=0;ve=-128&&ae<=127;break;case 1:ye=ae>=0&&ae<=255;break;case 2:ye=ae>=-32768&&ae<=32767;break;case 3:ye=ae>=0&&ae<=65536;break;case 4:ye=ae>=-2147483648&&ae<=2147483647;break;case 5:ye=ae>=0&&ae<=4294967296;break;case 6:ye=ae>=-34027999387901484e22&&ae<=34027999387901484e22;break;case 7:ye=ae>=5e-324&&ae<=17976931348623157e292;break;default:ye=!1}return ye},getDataTypeSize:function(E){var ae=0;switch(E){case 0:case 1:ae=1;break;case 2:case 3:ae=2;break;case 4:case 5:case 6:ae=4;break;case 7:ae=8;break;default:ae=E}return ae},getDataTypeUsed:function(E,ae){var ye=E;switch(E){case 2:case 4:ye=E-ae;break;case 3:case 5:ye=E-2*ae;break;case 6:ye=0===ae?E:1===ae?2:1;break;case 7:ye=0===ae?E:E-2*ae+1;break;default:ye=E}return ye},getOnePixel:function(E,ae,ye,Le){var T=0;switch(ye){case 0:T=Le.getInt8(ae);break;case 1:T=Le.getUint8(ae);break;case 2:T=Le.getInt16(ae,!0);break;case 3:T=Le.getUint16(ae,!0);break;case 4:T=Le.getInt32(ae,!0);break;case 5:T=Le.getUInt32(ae,!0);break;case 6:T=Le.getFloat32(ae,!0);break;case 7:T=Le.getFloat64(ae,!0);break;default:throw"the decoder does not understand this pixel type"}return T}},c=function(E,ae,ye){this.val=E,this.left=ae,this.right=ye},ue={decode:function(E,ae){var ye=(ae=ae||{}).noDataValue,Le=0,T={};if(T.ptr=ae.inputOffset||0,T.pixels={},mt.readHeaderInfo(E,T)){var ve=T.headerInfo,ke=ve.fileVersion,Ne=mt.getDataTypeArray(ve.imageType);mt.readMask(E,T),ve.numValidPixel!==ve.width*ve.height&&!T.pixels.resultMask&&(T.pixels.resultMask=ae.maskData);var Fe,g=ve.width*ve.height;if(T.pixels.resultPixels=new Ne(g*ve.numDims),T.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==ve.numValidPixel)if(ve.zMax===ve.zMin)mt.constructConstantSurface(T);else if(ke>=4&&mt.checkMinMaxRanges(E,T))mt.constructConstantSurface(T);else{var nt=new DataView(E,T.ptr,2),Ve=nt.getUint8(0);if(T.ptr++,Ve)mt.readDataOneSweep(E,T,Ne);else if(ke>1&&ve.imageType<=1&&Math.abs(ve.maxZError-.5)<1e-5){var He=nt.getUint8(1);if(T.ptr++,T.encodeMode=He,He>2||ke<4&&He>1)throw"Invalid Huffman flag "+He;He?mt.readHuffman(E,T,Ne):mt.readTiles(E,T,Ne)}else mt.readTiles(E,T,Ne)}T.eofOffset=T.ptr,ae.inputOffset?(Fe=T.headerInfo.blobSize+ae.inputOffset-T.ptr,Math.abs(Fe)>=1&&(T.eofOffset=ae.inputOffset+T.headerInfo.blobSize)):(Fe=T.headerInfo.blobSize-T.ptr,Math.abs(Fe)>=1&&(T.eofOffset=T.headerInfo.blobSize));var Ke={width:ve.width,height:ve.height,pixelData:T.pixels.resultPixels,minValue:ve.zMin,maxValue:ve.zMax,validPixelCount:ve.numValidPixel,dimCount:ve.numDims,dimStats:{minValues:ve.minValues,maxValues:ve.maxValues},maskData:T.pixels.resultMask};if(T.pixels.resultMask&&mt.isValidPixelValue(ve.imageType,ye)){var Xe=T.pixels.resultMask;for(Le=0;Le1&&Ve.fileInfo.mask&&Ve.fileInfo.mask.numBytes>0&&ke.push(Ve.maskData),Le++,nt.pixels.push(Ve.pixelData),nt.statistics.push({minValue:Ve.minValue,maxValue:Ve.maxValue,noDataValue:Ve.noDataValue,dimStats:Ve.dimStats})}if(ye>1&&ke.length>1){for(Ke=nt.width*nt.height,nt.bandMasks=ke,(g=new Uint8Array(Ke)).set(ke[0]),He=1;He{"use strict";Si.exports=function st(Pe,xt){xt||(xt={});var c,ue,E,ae,ye,Le,ve,Ne,g,un=null==xt.cutoff?.25:xt.cutoff,Kt=null==xt.radius?8:xt.radius,mt=xt.channel||0;if(ArrayBuffer.isView(Pe)||Array.isArray(Pe)){if(!xt.width||!xt.height)throw Error("For raw data width and height should be provided by options");c=xt.width,ue=xt.height,ae=Pe,Le=xt.stride?xt.stride:Math.floor(Pe.length/c/ue)}else window.HTMLCanvasElement&&Pe instanceof window.HTMLCanvasElement?(ae=(ve=Pe).getContext("2d").getImageData(0,0,c=ve.width,ue=ve.height).data,Le=4):window.CanvasRenderingContext2D&&Pe instanceof window.CanvasRenderingContext2D?(ae=Pe.getImageData(0,0,c=(ve=Pe.canvas).width,ue=ve.height).data,Le=4):window.ImageData&&Pe instanceof window.ImageData&&(c=Pe.width,ue=Pe.height,ae=Pe.data,Le=4);if(E=Math.max(c,ue),window.Uint8ClampedArray&&ae instanceof window.Uint8ClampedArray||window.Uint8Array&&ae instanceof window.Uint8Array)for(ye=ae,ae=Array(c*ue),Ne=0,g=Math.floor(ye.length/Le);Ne1?Mi-1:0),ai=1;ai2&&void 0!==arguments[2]?arguments[2]:ye;st&&st(se,null);let Ue=cn.length;for(;Ue--;){let ai=cn[Ue];if("string"==typeof ai){const ca=Mi(ai);ca!==ai&&(Zn(cn)||(cn[Ue]=ca),ai=ca)}se[ai]=!0}return se}function Ke(se){const cn=Kt(null);for(const[Mi,Ue]of di(se))void 0!==Pe(se,Mi)&&(cn[Mi]=Ue);return cn}function Xe(se,cn){for(;null!==se;){const Ue=Pe(se,cn);if(Ue){if(Ue.get)return Ve(Ue.get);if("function"==typeof Ue.value)return Ve(Ue.value)}se=pn(se)}return function Mi(Ue){return console.warn("fallback value for",Ue),null}}const Ft=xt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),It=xt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),b=xt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),it=xt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Rt=xt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Yt=xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ct=xt(["#text"]),H=xt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),J=xt(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),de=xt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ee=xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_e=un(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Me=un(/<%[\w\W]*|[\w\W]*%>/gm),Ge=un(/\${[\w\W]*}/gm),Nt=un(/^data-[\-\w.\u00B7-\uFFFF]/),hn=un(/^aria-[\-\w]+$/),Vn=un(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gi=un(/^(?:\w+script|data):/i),zi=un(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fo=un(/^html$/i);var _r=Object.freeze({__proto__:null,MUSTACHE_EXPR:_e,ERB_EXPR:Me,TMPLIT_EXPR:Ge,DATA_ATTR:Nt,ARIA_ATTR:hn,IS_ALLOWED_URI:Vn,IS_SCRIPT_OR_DATA:gi,ATTR_WHITESPACE:zi,DOCTYPE_NAME:fo});return function ht(){let se=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window;const cn=vn=>ht(vn);if(cn.version="3.0.6",cn.removed=[],!se||!se.document||9!==se.document.nodeType)return cn.isSupported=!1,cn;let{document:Mi}=se;const Ue=Mi,ai=Ue.currentScript,{DocumentFragment:ca,HTMLTemplateElement:ci,Node:fy,Element:pA,NodeFilter:mA,NamedNodeMap:tU=se.NamedNodeMap||se.MozNamedAttrMap,HTMLFormElement:St,DOMParser:_A,trustedTypes:bo}=se,Kh=pA.prototype,As=Xe(Kh,"cloneNode"),Ym=Xe(Kh,"nextSibling"),gA=Xe(Kh,"childNodes"),yA=Xe(Kh,"parentNode");if("function"==typeof ci){const vn=Mi.createElement("template");vn.content&&vn.content.ownerDocument&&(Mi=vn.content.ownerDocument)}let Vs,Qh="";const{implementation:xf,createNodeIterator:kc,createDocumentFragment:hy,getElementsByTagName:_t}=Mi,{importNode:py}=Ue;let Uc={};cn.isSupported="function"==typeof di&&"function"==typeof yA&&xf&&void 0!==xf.createHTMLDocument;const{MUSTACHE_EXPR:O,ERB_EXPR:at,TMPLIT_EXPR:Jh,DATA_ATTR:gE,ARIA_ATTR:my,IS_SCRIPT_OR_DATA:bA,ATTR_WHITESPACE:yE}=_r;let{IS_ALLOWED_URI:Va}=_r,Wo=null;const bE=Fe({},[...Ft,...It,...b,...Rt,...Ct]);let f=null;const AE=Fe({},[...H,...J,...de,...Ee]);let gr=Object.seal(Kt(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}})),Xm=null,_y=null,ir=!0,AA=!0,TE=!1,xE=!0,ep=!1,Cf=!1,TA=!1,Se=!1,Ef=!1,Ti=!1,gy=!1,CE=!0,EE=!1,xA=!0,Zm=!1,tp={},wf=null;const ge=Fe({},["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"]);let Bn=null;const wE=Fe({},["audio","video","img","source","image","track"]);let Ce=null;const Wt=Fe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Sf="http://www.w3.org/1998/Math/MathML",$m="http://www.w3.org/2000/svg",Al="http://www.w3.org/1999/xhtml";let vf=Al,CA=!1,G=null;const nU=Fe({},[Sf,$m,Al],Le);let oe=null;const Sn=["application/xhtml+xml","text/html"];let pt=null,_u=null;const SE=Mi.createElement("form"),vE=function(Re){return Re instanceof RegExp||Re instanceof Function},Km=function(){let Re=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!_u||_u!==Re){if((!Re||"object"!=typeof Re)&&(Re={}),Re=Ke(Re),oe=oe=-1===Sn.indexOf(Re.PARSER_MEDIA_TYPE)?"text/html":Re.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===oe?Le:ye,Wo="ALLOWED_TAGS"in Re?Fe({},Re.ALLOWED_TAGS,pt):bE,f="ALLOWED_ATTR"in Re?Fe({},Re.ALLOWED_ATTR,pt):AE,G="ALLOWED_NAMESPACES"in Re?Fe({},Re.ALLOWED_NAMESPACES,Le):nU,Ce="ADD_URI_SAFE_ATTR"in Re?Fe(Ke(Wt),Re.ADD_URI_SAFE_ATTR,pt):Wt,Bn="ADD_DATA_URI_TAGS"in Re?Fe(Ke(wE),Re.ADD_DATA_URI_TAGS,pt):wE,wf="FORBID_CONTENTS"in Re?Fe({},Re.FORBID_CONTENTS,pt):ge,Xm="FORBID_TAGS"in Re?Fe({},Re.FORBID_TAGS,pt):{},_y="FORBID_ATTR"in Re?Fe({},Re.FORBID_ATTR,pt):{},tp="USE_PROFILES"in Re&&Re.USE_PROFILES,ir=!1!==Re.ALLOW_ARIA_ATTR,AA=!1!==Re.ALLOW_DATA_ATTR,TE=Re.ALLOW_UNKNOWN_PROTOCOLS||!1,xE=!1!==Re.ALLOW_SELF_CLOSE_IN_ATTR,ep=Re.SAFE_FOR_TEMPLATES||!1,Cf=Re.WHOLE_DOCUMENT||!1,Ef=Re.RETURN_DOM||!1,Ti=Re.RETURN_DOM_FRAGMENT||!1,gy=Re.RETURN_TRUSTED_TYPE||!1,Se=Re.FORCE_BODY||!1,CE=!1!==Re.SANITIZE_DOM,EE=Re.SANITIZE_NAMED_PROPS||!1,xA=!1!==Re.KEEP_CONTENT,Zm=Re.IN_PLACE||!1,Va=Re.ALLOWED_URI_REGEXP||Vn,vf=Re.NAMESPACE||Al,gr=Re.CUSTOM_ELEMENT_HANDLING||{},Re.CUSTOM_ELEMENT_HANDLING&&vE(Re.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(gr.tagNameCheck=Re.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Re.CUSTOM_ELEMENT_HANDLING&&vE(Re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(gr.attributeNameCheck=Re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Re.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof Re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(gr.allowCustomizedBuiltInElements=Re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ep&&(AA=!1),Ti&&(Ef=!0),tp&&(Wo=Fe({},[...Ct]),f=[],!0===tp.html&&(Fe(Wo,Ft),Fe(f,H)),!0===tp.svg&&(Fe(Wo,It),Fe(f,J),Fe(f,Ee)),!0===tp.svgFilters&&(Fe(Wo,b),Fe(f,J),Fe(f,Ee)),!0===tp.mathMl&&(Fe(Wo,Rt),Fe(f,de),Fe(f,Ee))),Re.ADD_TAGS&&(Wo===bE&&(Wo=Ke(Wo)),Fe(Wo,Re.ADD_TAGS,pt)),Re.ADD_ATTR&&(f===AE&&(f=Ke(f)),Fe(f,Re.ADD_ATTR,pt)),Re.ADD_URI_SAFE_ATTR&&Fe(Ce,Re.ADD_URI_SAFE_ATTR,pt),Re.FORBID_CONTENTS&&(wf===ge&&(wf=Ke(wf)),Fe(wf,Re.FORBID_CONTENTS,pt)),xA&&(Wo["#text"]=!0),Cf&&Fe(Wo,["html","head","body"]),Wo.table&&(Fe(Wo,["tbody"]),delete Xm.tbody),Re.TRUSTED_TYPES_POLICY){if("function"!=typeof Re.TRUSTED_TYPES_POLICY.createHTML)throw nt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof Re.TRUSTED_TYPES_POLICY.createScriptURL)throw nt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Vs=Re.TRUSTED_TYPES_POLICY,Qh=Vs.createHTML("")}else void 0===Vs&&(Vs=function(cn,Mi){if("object"!=typeof cn||"function"!=typeof cn.createPolicy)return null;let Ue=null;const ai="data-tt-policy-suffix";Mi&&Mi.hasAttribute(ai)&&(Ue=Mi.getAttribute(ai));const ca="dompurify"+(Ue?"#"+Ue:"");try{return cn.createPolicy(ca,{createHTML:ci=>ci,createScriptURL:ci=>ci})}catch{return console.warn("TrustedTypes policy "+ca+" could not be created."),null}}(bo,ai)),null!==Vs&&"string"==typeof Qh&&(Qh=Vs.createHTML(""));xt&&xt(Re),_u=Re}},rs=Fe({},["mi","mo","mn","ms","mtext"]),DE=Fe({},["foreignobject","desc","title","annotation-xml"]),iU=Fe({},["title","style","font","a","script"]),Qm=Fe({},It);Fe(Qm,b),Fe(Qm,it);const fe=Fe({},Rt);Fe(fe,Yt);const Df=function(Re){ae(cn.removed,{element:Re});try{Re.parentNode.removeChild(Re)}catch{Re.remove()}},EA=function(Re,Ht){try{ae(cn.removed,{attribute:Ht.getAttributeNode(Re),from:Ht})}catch{ae(cn.removed,{attribute:null,from:Ht})}if(Ht.removeAttribute(Re),"is"===Re&&!f[Re])if(Ef||Ti)try{Df(Ht)}catch{}else try{Ht.setAttribute(Re,"")}catch{}},wA=function(Re){let Ht=null,An=null;if(Se)Re=""+Re;else{const xs=T(Re,/^[\r\n\t ]+/);An=xs&&xs[0]}"application/xhtml+xml"===oe&&vf===Al&&(Re=''+Re+"");const ro=Vs?Vs.createHTML(Re):Re;if(vf===Al)try{Ht=(new _A).parseFromString(ro,oe)}catch{}if(!Ht||!Ht.documentElement){Ht=xf.createDocument(vf,"template",null);try{Ht.documentElement.innerHTML=CA?Qh:ro}catch{}}const Ts=Ht.body||Ht.documentElement;return Re&&An&&Ts.insertBefore(Mi.createTextNode(An),Ts.childNodes[0]||null),vf===Al?_t.call(Ht,Cf?"html":"body")[0]:Cf?Ht.documentElement:Ts},SA=function(Re){return kc.call(Re.ownerDocument||Re,Re,mA.SHOW_ELEMENT|mA.SHOW_COMMENT|mA.SHOW_TEXT,null)},IE=function(Re){return"function"==typeof fy&&Re instanceof fy},oo=function(Re,Ht,An){Uc[Re]&&ue(Uc[Re],ro=>{ro.call(cn,Ht,An,_u)})},ct=function(Re){let Ht=null;if(oo("beforeSanitizeElements",Re,null),function(Re){return Re instanceof St&&("string"!=typeof Re.nodeName||"string"!=typeof Re.textContent||"function"!=typeof Re.removeChild||!(Re.attributes instanceof tU)||"function"!=typeof Re.removeAttribute||"function"!=typeof Re.setAttribute||"string"!=typeof Re.namespaceURI||"function"!=typeof Re.insertBefore||"function"!=typeof Re.hasChildNodes)}(Re))return Df(Re),!0;const An=pt(Re.nodeName);if(oo("uponSanitizeElement",Re,{tagName:An,allowedTags:Wo}),Re.hasChildNodes()&&!IE(Re.firstElementChild)&&g(/<[/\w]/g,Re.innerHTML)&&g(/<[/\w]/g,Re.textContent))return Df(Re),!0;if(!Wo[An]||Xm[An]){if(!Xm[An]&&OE(An)&&(gr.tagNameCheck instanceof RegExp&&g(gr.tagNameCheck,An)||gr.tagNameCheck instanceof Function&&gr.tagNameCheck(An)))return!1;if(xA&&!wf[An]){const ro=yA(Re)||Re.parentNode,Ts=gA(Re)||Re.childNodes;if(Ts&&ro)for(let ss=Ts.length-1;ss>=0;--ss)ro.insertBefore(As(Ts[ss],!0),Ym(Re))}return Df(Re),!0}return Re instanceof pA&&!function(Re){let Ht=yA(Re);(!Ht||!Ht.tagName)&&(Ht={namespaceURI:vf,tagName:"template"});const An=ye(Re.tagName),ro=ye(Ht.tagName);return!!G[Re.namespaceURI]&&(Re.namespaceURI===$m?Ht.namespaceURI===Al?"svg"===An:Ht.namespaceURI===Sf?"svg"===An&&("annotation-xml"===ro||rs[ro]):!!Qm[An]:Re.namespaceURI===Sf?Ht.namespaceURI===Al?"math"===An:Ht.namespaceURI===$m?"math"===An&&DE[ro]:!!fe[An]:Re.namespaceURI===Al?!(Ht.namespaceURI===$m&&!DE[ro]||Ht.namespaceURI===Sf&&!rs[ro])&&!fe[An]&&(iU[An]||!Qm[An]):!("application/xhtml+xml"!==oe||!G[Re.namespaceURI]))}(Re)||("noscript"===An||"noembed"===An||"noframes"===An)&&g(/<\/no(script|embed|frames)/i,Re.innerHTML)?(Df(Re),!0):(ep&&3===Re.nodeType&&(Ht=Re.textContent,ue([O,at,Jh],ro=>{Ht=ve(Ht,ro," ")}),Re.textContent!==Ht&&(ae(cn.removed,{element:Re.cloneNode()}),Re.textContent=Ht)),oo("afterSanitizeElements",Re,null),!1)},PE=function(Re,Ht,An){if(CE&&("id"===Ht||"name"===Ht)&&(An in Mi||An in SE))return!1;if((!AA||_y[Ht]||!g(gE,Ht))&&(!ir||!g(my,Ht)))if(!f[Ht]||_y[Ht]){if(!(OE(Re)&&(gr.tagNameCheck instanceof RegExp&&g(gr.tagNameCheck,Re)||gr.tagNameCheck instanceof Function&&gr.tagNameCheck(Re))&&(gr.attributeNameCheck instanceof RegExp&&g(gr.attributeNameCheck,Ht)||gr.attributeNameCheck instanceof Function&&gr.attributeNameCheck(Ht))||"is"===Ht&&gr.allowCustomizedBuiltInElements&&(gr.tagNameCheck instanceof RegExp&&g(gr.tagNameCheck,An)||gr.tagNameCheck instanceof Function&&gr.tagNameCheck(An))))return!1}else if(!Ce[Ht]&&!g(Va,ve(An,yE,""))&&("src"!==Ht&&"xlink:href"!==Ht&&"href"!==Ht||"script"===Re||0!==ke(An,"data:")||!Bn[Re])&&(!TE||g(bA,ve(An,yE,"")))&&An)return!1;return!0},OE=function(Re){return Re.indexOf("-")>0},yy=function(Re){oo("beforeSanitizeAttributes",Re,null);const{attributes:Ht}=Re;if(!Ht)return;const An={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f};let ro=Ht.length;for(;ro--;){const Ts=Ht[ro],{name:xs,namespaceURI:ss,value:yd}=Ts,Jm=pt(xs);let ne="value"===xs?yd:Ne(yd);if(An.attrName=Jm,An.attrValue=ne,An.keepAttr=!0,An.forceKeepAttr=void 0,oo("uponSanitizeAttribute",Re,An),ne=An.attrValue,An.forceKeepAttr||(EA(xs,Re),!An.keepAttr))continue;if(!xE&&g(/\/>/i,ne)){EA(xs,Re);continue}ep&&ue([O,at,Jh],Ie=>{ne=ve(ne,Ie," ")});const np=pt(Re.nodeName);if(PE(np,Jm,ne)){if(EE&&("id"===Jm||"name"===Jm)&&(EA(xs,Re),ne="user-content-"+ne),Vs&&"object"==typeof bo&&"function"==typeof bo.getAttributeType&&!ss)switch(bo.getAttributeType(np,Jm)){case"TrustedHTML":ne=Vs.createHTML(ne);break;case"TrustedScriptURL":ne=Vs.createScriptURL(ne)}try{ss?Re.setAttributeNS(ss,xs,ne):Re.setAttribute(xs,ne),E(cn.removed)}catch{}}}oo("afterSanitizeAttributes",Re,null)},LE=function vn(Re){let Ht=null;const An=SA(Re);for(oo("beforeSanitizeShadowDOM",Re,null);Ht=An.nextNode();)oo("uponSanitizeShadowNode",Ht,null),!ct(Ht)&&(Ht.content instanceof ca&&vn(Ht.content),yy(Ht));oo("afterSanitizeShadowDOM",Re,null)};return cn.sanitize=function(vn){let Re=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Ht=null,An=null,ro=null,Ts=null;if(CA=!vn,CA&&(vn="\x3c!--\x3e"),"string"!=typeof vn&&!IE(vn)){if("function"!=typeof vn.toString)throw nt("toString is not a function");if("string"!=typeof(vn=vn.toString()))throw nt("dirty is not a string, aborting")}if(!cn.isSupported)return vn;if(TA||Km(Re),cn.removed=[],"string"==typeof vn&&(Zm=!1),Zm){if(vn.nodeName){const yd=pt(vn.nodeName);if(!Wo[yd]||Xm[yd])throw nt("root node is forbidden and cannot be sanitized in-place")}}else if(vn instanceof fy)Ht=wA("\x3c!----\x3e"),An=Ht.ownerDocument.importNode(vn,!0),1===An.nodeType&&"BODY"===An.nodeName||"HTML"===An.nodeName?Ht=An:Ht.appendChild(An);else{if(!Ef&&!ep&&!Cf&&-1===vn.indexOf("<"))return Vs&&gy?Vs.createHTML(vn):vn;if(Ht=wA(vn),!Ht)return Ef?null:gy?Qh:""}Ht&&Se&&Df(Ht.firstChild);const xs=SA(Zm?vn:Ht);for(;ro=xs.nextNode();)ct(ro)||(ro.content instanceof ca&&LE(ro.content),yy(ro));if(Zm)return vn;if(Ef){if(Ti)for(Ts=hy.call(Ht.ownerDocument);Ht.firstChild;)Ts.appendChild(Ht.firstChild);else Ts=Ht;return(f.shadowroot||f.shadowrootmode)&&(Ts=py.call(Ue,Ts,!0)),Ts}let ss=Cf?Ht.outerHTML:Ht.innerHTML;return Cf&&Wo["!doctype"]&&Ht.ownerDocument&&Ht.ownerDocument.doctype&&Ht.ownerDocument.doctype.name&&g(fo,Ht.ownerDocument.doctype.name)&&(ss="\n"+ss),ep&&ue([O,at,Jh],yd=>{ss=ve(ss,yd," ")}),Vs&&gy?Vs.createHTML(ss):ss},cn.setConfig=function(){Km(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),TA=!0},cn.clearConfig=function(){_u=null,TA=!1},cn.isValidAttribute=function(vn,Re,Ht){_u||Km({});const An=pt(vn),ro=pt(Re);return PE(An,ro,Ht)},cn.addHook=function(vn,Re){"function"==typeof Re&&(Uc[vn]=Uc[vn]||[],ae(Uc[vn],Re))},cn.removeHook=function(vn){if(Uc[vn])return E(Uc[vn])},cn.removeHooks=function(vn){Uc[vn]&&(Uc[vn]=[])},cn.removeAllHooks=function(){Uc={}},cn}()}()},6276:Si=>{Si.exports&&(Si.exports=function di(){var Pe=3,xt=4,ye=12,Le=13,ke=16,Ne=17;function Ke(b,it){return 55296<=b.charCodeAt(it)&&b.charCodeAt(it)<=56319&&56320<=b.charCodeAt(it+1)&&b.charCodeAt(it+1)<=57343}function Xe(b,it){void 0===it&&(it=0);var Rt=b.charCodeAt(it);if(55296<=Rt&&Rt<=56319&&it=1){var Ct=Rt;return 55296<=(Yt=b.charCodeAt(it-1))&&Yt<=56319?1024*(Yt-55296)+(Ct-56320)+65536:Ct}return Rt}function Ft(b,it,Rt){var Yt=[b].concat(it).concat([Rt]),Ct=Yt[Yt.length-2],H=Rt,J=Yt.lastIndexOf(14);if(J>1&&Yt.slice(1,J).every(function(_e){return _e==Pe})&&-1==[Pe,Le,Ne].indexOf(b))return 2;var de=Yt.lastIndexOf(xt);if(de>0&&Yt.slice(1,de).every(function(_e){return _e==xt})&&-1==[ye,xt].indexOf(Ct))return Yt.filter(function(_e){return _e==xt}).length%2==1?3:4;if(0==Ct&&1==H)return 0;if(2==Ct||0==Ct||1==Ct)return 14==H&&it.every(function(_e){return _e==Pe})?2:1;if(2==H||0==H||1==H)return 1;if(6==Ct&&(6==H||7==H||9==H||10==H))return 0;if(!(9!=Ct&&7!=Ct||7!=H&&8!=H))return 0;if((10==Ct||8==Ct)&&8==H)return 0;if(H==Pe||15==H)return 0;if(5==H)return 0;if(Ct==ye)return 0;var Ee=-1!=Yt.indexOf(Pe)?Yt.lastIndexOf(Pe)-1:Yt.length-2;return-1!=[Le,Ne].indexOf(Yt[Ee])&&Yt.slice(Ee+1,-1).every(function(_e){return _e==Pe})&&14==H||15==Ct&&-1!=[ke,Ne].indexOf(H)?0:-1!=it.indexOf(xt)?2:Ct==xt&&H==xt?0:1}function It(b){return 1536<=b&&b<=1541||1757==b||1807==b||2274==b||3406==b||69821==b||70082<=b&&b<=70083||72250==b||72326<=b&&b<=72329||73030==b?ye:13==b?0:10==b?1:0<=b&&b<=9||11<=b&&b<=12||14<=b&&b<=31||127<=b&&b<=159||173==b||1564==b||6158==b||8203==b||8206<=b&&b<=8207||8232==b||8233==b||8234<=b&&b<=8238||8288<=b&&b<=8292||8293==b||8294<=b&&b<=8303||55296<=b&&b<=57343||65279==b||65520<=b&&b<=65528||65529<=b&&b<=65531||113824<=b&&b<=113827||119155<=b&&b<=119162||917504==b||917505==b||917506<=b&&b<=917535||917632<=b&&b<=917759||918e3<=b&&b<=921599?2:768<=b&&b<=879||1155<=b&&b<=1159||1160<=b&&b<=1161||1425<=b&&b<=1469||1471==b||1473<=b&&b<=1474||1476<=b&&b<=1477||1479==b||1552<=b&&b<=1562||1611<=b&&b<=1631||1648==b||1750<=b&&b<=1756||1759<=b&&b<=1764||1767<=b&&b<=1768||1770<=b&&b<=1773||1809==b||1840<=b&&b<=1866||1958<=b&&b<=1968||2027<=b&&b<=2035||2070<=b&&b<=2073||2075<=b&&b<=2083||2085<=b&&b<=2087||2089<=b&&b<=2093||2137<=b&&b<=2139||2260<=b&&b<=2273||2275<=b&&b<=2306||2362==b||2364==b||2369<=b&&b<=2376||2381==b||2385<=b&&b<=2391||2402<=b&&b<=2403||2433==b||2492==b||2494==b||2497<=b&&b<=2500||2509==b||2519==b||2530<=b&&b<=2531||2561<=b&&b<=2562||2620==b||2625<=b&&b<=2626||2631<=b&&b<=2632||2635<=b&&b<=2637||2641==b||2672<=b&&b<=2673||2677==b||2689<=b&&b<=2690||2748==b||2753<=b&&b<=2757||2759<=b&&b<=2760||2765==b||2786<=b&&b<=2787||2810<=b&&b<=2815||2817==b||2876==b||2878==b||2879==b||2881<=b&&b<=2884||2893==b||2902==b||2903==b||2914<=b&&b<=2915||2946==b||3006==b||3008==b||3021==b||3031==b||3072==b||3134<=b&&b<=3136||3142<=b&&b<=3144||3146<=b&&b<=3149||3157<=b&&b<=3158||3170<=b&&b<=3171||3201==b||3260==b||3263==b||3266==b||3270==b||3276<=b&&b<=3277||3285<=b&&b<=3286||3298<=b&&b<=3299||3328<=b&&b<=3329||3387<=b&&b<=3388||3390==b||3393<=b&&b<=3396||3405==b||3415==b||3426<=b&&b<=3427||3530==b||3535==b||3538<=b&&b<=3540||3542==b||3551==b||3633==b||3636<=b&&b<=3642||3655<=b&&b<=3662||3761==b||3764<=b&&b<=3769||3771<=b&&b<=3772||3784<=b&&b<=3789||3864<=b&&b<=3865||3893==b||3895==b||3897==b||3953<=b&&b<=3966||3968<=b&&b<=3972||3974<=b&&b<=3975||3981<=b&&b<=3991||3993<=b&&b<=4028||4038==b||4141<=b&&b<=4144||4146<=b&&b<=4151||4153<=b&&b<=4154||4157<=b&&b<=4158||4184<=b&&b<=4185||4190<=b&&b<=4192||4209<=b&&b<=4212||4226==b||4229<=b&&b<=4230||4237==b||4253==b||4957<=b&&b<=4959||5906<=b&&b<=5908||5938<=b&&b<=5940||5970<=b&&b<=5971||6002<=b&&b<=6003||6068<=b&&b<=6069||6071<=b&&b<=6077||6086==b||6089<=b&&b<=6099||6109==b||6155<=b&&b<=6157||6277<=b&&b<=6278||6313==b||6432<=b&&b<=6434||6439<=b&&b<=6440||6450==b||6457<=b&&b<=6459||6679<=b&&b<=6680||6683==b||6742==b||6744<=b&&b<=6750||6752==b||6754==b||6757<=b&&b<=6764||6771<=b&&b<=6780||6783==b||6832<=b&&b<=6845||6846==b||6912<=b&&b<=6915||6964==b||6966<=b&&b<=6970||6972==b||6978==b||7019<=b&&b<=7027||7040<=b&&b<=7041||7074<=b&&b<=7077||7080<=b&&b<=7081||7083<=b&&b<=7085||7142==b||7144<=b&&b<=7145||7149==b||7151<=b&&b<=7153||7212<=b&&b<=7219||7222<=b&&b<=7223||7376<=b&&b<=7378||7380<=b&&b<=7392||7394<=b&&b<=7400||7405==b||7412==b||7416<=b&&b<=7417||7616<=b&&b<=7673||7675<=b&&b<=7679||8204==b||8400<=b&&b<=8412||8413<=b&&b<=8416||8417==b||8418<=b&&b<=8420||8421<=b&&b<=8432||11503<=b&&b<=11505||11647==b||11744<=b&&b<=11775||12330<=b&&b<=12333||12334<=b&&b<=12335||12441<=b&&b<=12442||42607==b||42608<=b&&b<=42610||42612<=b&&b<=42621||42654<=b&&b<=42655||42736<=b&&b<=42737||43010==b||43014==b||43019==b||43045<=b&&b<=43046||43204<=b&&b<=43205||43232<=b&&b<=43249||43302<=b&&b<=43309||43335<=b&&b<=43345||43392<=b&&b<=43394||43443==b||43446<=b&&b<=43449||43452==b||43493==b||43561<=b&&b<=43566||43569<=b&&b<=43570||43573<=b&&b<=43574||43587==b||43596==b||43644==b||43696==b||43698<=b&&b<=43700||43703<=b&&b<=43704||43710<=b&&b<=43711||43713==b||43756<=b&&b<=43757||43766==b||44005==b||44008==b||44013==b||64286==b||65024<=b&&b<=65039||65056<=b&&b<=65071||65438<=b&&b<=65439||66045==b||66272==b||66422<=b&&b<=66426||68097<=b&&b<=68099||68101<=b&&b<=68102||68108<=b&&b<=68111||68152<=b&&b<=68154||68159==b||68325<=b&&b<=68326||69633==b||69688<=b&&b<=69702||69759<=b&&b<=69761||69811<=b&&b<=69814||69817<=b&&b<=69818||69888<=b&&b<=69890||69927<=b&&b<=69931||69933<=b&&b<=69940||70003==b||70016<=b&&b<=70017||70070<=b&&b<=70078||70090<=b&&b<=70092||70191<=b&&b<=70193||70196==b||70198<=b&&b<=70199||70206==b||70367==b||70371<=b&&b<=70378||70400<=b&&b<=70401||70460==b||70462==b||70464==b||70487==b||70502<=b&&b<=70508||70512<=b&&b<=70516||70712<=b&&b<=70719||70722<=b&&b<=70724||70726==b||70832==b||70835<=b&&b<=70840||70842==b||70845==b||70847<=b&&b<=70848||70850<=b&&b<=70851||71087==b||71090<=b&&b<=71093||71100<=b&&b<=71101||71103<=b&&b<=71104||71132<=b&&b<=71133||71219<=b&&b<=71226||71229==b||71231<=b&&b<=71232||71339==b||71341==b||71344<=b&&b<=71349||71351==b||71453<=b&&b<=71455||71458<=b&&b<=71461||71463<=b&&b<=71467||72193<=b&&b<=72198||72201<=b&&b<=72202||72243<=b&&b<=72248||72251<=b&&b<=72254||72263==b||72273<=b&&b<=72278||72281<=b&&b<=72283||72330<=b&&b<=72342||72344<=b&&b<=72345||72752<=b&&b<=72758||72760<=b&&b<=72765||72767==b||72850<=b&&b<=72871||72874<=b&&b<=72880||72882<=b&&b<=72883||72885<=b&&b<=72886||73009<=b&&b<=73014||73018==b||73020<=b&&b<=73021||73023<=b&&b<=73029||73031==b||92912<=b&&b<=92916||92976<=b&&b<=92982||94095<=b&&b<=94098||113821<=b&&b<=113822||119141==b||119143<=b&&b<=119145||119150<=b&&b<=119154||119163<=b&&b<=119170||119173<=b&&b<=119179||119210<=b&&b<=119213||119362<=b&&b<=119364||121344<=b&&b<=121398||121403<=b&&b<=121452||121461==b||121476==b||121499<=b&&b<=121503||121505<=b&&b<=121519||122880<=b&&b<=122886||122888<=b&&b<=122904||122907<=b&&b<=122913||122915<=b&&b<=122916||122918<=b&&b<=122922||125136<=b&&b<=125142||125252<=b&&b<=125258||917536<=b&&b<=917631||917760<=b&&b<=917999?Pe:127462<=b&&b<=127487?xt:2307==b||2363==b||2366<=b&&b<=2368||2377<=b&&b<=2380||2382<=b&&b<=2383||2434<=b&&b<=2435||2495<=b&&b<=2496||2503<=b&&b<=2504||2507<=b&&b<=2508||2563==b||2622<=b&&b<=2624||2691==b||2750<=b&&b<=2752||2761==b||2763<=b&&b<=2764||2818<=b&&b<=2819||2880==b||2887<=b&&b<=2888||2891<=b&&b<=2892||3007==b||3009<=b&&b<=3010||3014<=b&&b<=3016||3018<=b&&b<=3020||3073<=b&&b<=3075||3137<=b&&b<=3140||3202<=b&&b<=3203||3262==b||3264<=b&&b<=3265||3267<=b&&b<=3268||3271<=b&&b<=3272||3274<=b&&b<=3275||3330<=b&&b<=3331||3391<=b&&b<=3392||3398<=b&&b<=3400||3402<=b&&b<=3404||3458<=b&&b<=3459||3536<=b&&b<=3537||3544<=b&&b<=3550||3570<=b&&b<=3571||3635==b||3763==b||3902<=b&&b<=3903||3967==b||4145==b||4155<=b&&b<=4156||4182<=b&&b<=4183||4228==b||6070==b||6078<=b&&b<=6085||6087<=b&&b<=6088||6435<=b&&b<=6438||6441<=b&&b<=6443||6448<=b&&b<=6449||6451<=b&&b<=6456||6681<=b&&b<=6682||6741==b||6743==b||6765<=b&&b<=6770||6916==b||6965==b||6971==b||6973<=b&&b<=6977||6979<=b&&b<=6980||7042==b||7073==b||7078<=b&&b<=7079||7082==b||7143==b||7146<=b&&b<=7148||7150==b||7154<=b&&b<=7155||7204<=b&&b<=7211||7220<=b&&b<=7221||7393==b||7410<=b&&b<=7411||7415==b||43043<=b&&b<=43044||43047==b||43136<=b&&b<=43137||43188<=b&&b<=43203||43346<=b&&b<=43347||43395==b||43444<=b&&b<=43445||43450<=b&&b<=43451||43453<=b&&b<=43456||43567<=b&&b<=43568||43571<=b&&b<=43572||43597==b||43755==b||43758<=b&&b<=43759||43765==b||44003<=b&&b<=44004||44006<=b&&b<=44007||44009<=b&&b<=44010||44012==b||69632==b||69634==b||69762==b||69808<=b&&b<=69810||69815<=b&&b<=69816||69932==b||70018==b||70067<=b&&b<=70069||70079<=b&&b<=70080||70188<=b&&b<=70190||70194<=b&&b<=70195||70197==b||70368<=b&&b<=70370||70402<=b&&b<=70403||70463==b||70465<=b&&b<=70468||70471<=b&&b<=70472||70475<=b&&b<=70477||70498<=b&&b<=70499||70709<=b&&b<=70711||70720<=b&&b<=70721||70725==b||70833<=b&&b<=70834||70841==b||70843<=b&&b<=70844||70846==b||70849==b||71088<=b&&b<=71089||71096<=b&&b<=71099||71102==b||71216<=b&&b<=71218||71227<=b&&b<=71228||71230==b||71340==b||71342<=b&&b<=71343||71350==b||71456<=b&&b<=71457||71462==b||72199<=b&&b<=72200||72249==b||72279<=b&&b<=72280||72343==b||72751==b||72766==b||72873==b||72881==b||72884==b||94033<=b&&b<=94078||119142==b||119149==b?5:4352<=b&&b<=4447||43360<=b&&b<=43388?6:4448<=b&&b<=4519||55216<=b&&b<=55238?7:4520<=b&&b<=4607||55243<=b&&b<=55291?8:44032==b||44060==b||44088==b||44116==b||44144==b||44172==b||44200==b||44228==b||44256==b||44284==b||44312==b||44340==b||44368==b||44396==b||44424==b||44452==b||44480==b||44508==b||44536==b||44564==b||44592==b||44620==b||44648==b||44676==b||44704==b||44732==b||44760==b||44788==b||44816==b||44844==b||44872==b||44900==b||44928==b||44956==b||44984==b||45012==b||45040==b||45068==b||45096==b||45124==b||45152==b||45180==b||45208==b||45236==b||45264==b||45292==b||45320==b||45348==b||45376==b||45404==b||45432==b||45460==b||45488==b||45516==b||45544==b||45572==b||45600==b||45628==b||45656==b||45684==b||45712==b||45740==b||45768==b||45796==b||45824==b||45852==b||45880==b||45908==b||45936==b||45964==b||45992==b||46020==b||46048==b||46076==b||46104==b||46132==b||46160==b||46188==b||46216==b||46244==b||46272==b||46300==b||46328==b||46356==b||46384==b||46412==b||46440==b||46468==b||46496==b||46524==b||46552==b||46580==b||46608==b||46636==b||46664==b||46692==b||46720==b||46748==b||46776==b||46804==b||46832==b||46860==b||46888==b||46916==b||46944==b||46972==b||47e3==b||47028==b||47056==b||47084==b||47112==b||47140==b||47168==b||47196==b||47224==b||47252==b||47280==b||47308==b||47336==b||47364==b||47392==b||47420==b||47448==b||47476==b||47504==b||47532==b||47560==b||47588==b||47616==b||47644==b||47672==b||47700==b||47728==b||47756==b||47784==b||47812==b||47840==b||47868==b||47896==b||47924==b||47952==b||47980==b||48008==b||48036==b||48064==b||48092==b||48120==b||48148==b||48176==b||48204==b||48232==b||48260==b||48288==b||48316==b||48344==b||48372==b||48400==b||48428==b||48456==b||48484==b||48512==b||48540==b||48568==b||48596==b||48624==b||48652==b||48680==b||48708==b||48736==b||48764==b||48792==b||48820==b||48848==b||48876==b||48904==b||48932==b||48960==b||48988==b||49016==b||49044==b||49072==b||49100==b||49128==b||49156==b||49184==b||49212==b||49240==b||49268==b||49296==b||49324==b||49352==b||49380==b||49408==b||49436==b||49464==b||49492==b||49520==b||49548==b||49576==b||49604==b||49632==b||49660==b||49688==b||49716==b||49744==b||49772==b||49800==b||49828==b||49856==b||49884==b||49912==b||49940==b||49968==b||49996==b||50024==b||50052==b||50080==b||50108==b||50136==b||50164==b||50192==b||50220==b||50248==b||50276==b||50304==b||50332==b||50360==b||50388==b||50416==b||50444==b||50472==b||50500==b||50528==b||50556==b||50584==b||50612==b||50640==b||50668==b||50696==b||50724==b||50752==b||50780==b||50808==b||50836==b||50864==b||50892==b||50920==b||50948==b||50976==b||51004==b||51032==b||51060==b||51088==b||51116==b||51144==b||51172==b||51200==b||51228==b||51256==b||51284==b||51312==b||51340==b||51368==b||51396==b||51424==b||51452==b||51480==b||51508==b||51536==b||51564==b||51592==b||51620==b||51648==b||51676==b||51704==b||51732==b||51760==b||51788==b||51816==b||51844==b||51872==b||51900==b||51928==b||51956==b||51984==b||52012==b||52040==b||52068==b||52096==b||52124==b||52152==b||52180==b||52208==b||52236==b||52264==b||52292==b||52320==b||52348==b||52376==b||52404==b||52432==b||52460==b||52488==b||52516==b||52544==b||52572==b||52600==b||52628==b||52656==b||52684==b||52712==b||52740==b||52768==b||52796==b||52824==b||52852==b||52880==b||52908==b||52936==b||52964==b||52992==b||53020==b||53048==b||53076==b||53104==b||53132==b||53160==b||53188==b||53216==b||53244==b||53272==b||53300==b||53328==b||53356==b||53384==b||53412==b||53440==b||53468==b||53496==b||53524==b||53552==b||53580==b||53608==b||53636==b||53664==b||53692==b||53720==b||53748==b||53776==b||53804==b||53832==b||53860==b||53888==b||53916==b||53944==b||53972==b||54e3==b||54028==b||54056==b||54084==b||54112==b||54140==b||54168==b||54196==b||54224==b||54252==b||54280==b||54308==b||54336==b||54364==b||54392==b||54420==b||54448==b||54476==b||54504==b||54532==b||54560==b||54588==b||54616==b||54644==b||54672==b||54700==b||54728==b||54756==b||54784==b||54812==b||54840==b||54868==b||54896==b||54924==b||54952==b||54980==b||55008==b||55036==b||55064==b||55092==b||55120==b||55148==b||55176==b?9:44033<=b&&b<=44059||44061<=b&&b<=44087||44089<=b&&b<=44115||44117<=b&&b<=44143||44145<=b&&b<=44171||44173<=b&&b<=44199||44201<=b&&b<=44227||44229<=b&&b<=44255||44257<=b&&b<=44283||44285<=b&&b<=44311||44313<=b&&b<=44339||44341<=b&&b<=44367||44369<=b&&b<=44395||44397<=b&&b<=44423||44425<=b&&b<=44451||44453<=b&&b<=44479||44481<=b&&b<=44507||44509<=b&&b<=44535||44537<=b&&b<=44563||44565<=b&&b<=44591||44593<=b&&b<=44619||44621<=b&&b<=44647||44649<=b&&b<=44675||44677<=b&&b<=44703||44705<=b&&b<=44731||44733<=b&&b<=44759||44761<=b&&b<=44787||44789<=b&&b<=44815||44817<=b&&b<=44843||44845<=b&&b<=44871||44873<=b&&b<=44899||44901<=b&&b<=44927||44929<=b&&b<=44955||44957<=b&&b<=44983||44985<=b&&b<=45011||45013<=b&&b<=45039||45041<=b&&b<=45067||45069<=b&&b<=45095||45097<=b&&b<=45123||45125<=b&&b<=45151||45153<=b&&b<=45179||45181<=b&&b<=45207||45209<=b&&b<=45235||45237<=b&&b<=45263||45265<=b&&b<=45291||45293<=b&&b<=45319||45321<=b&&b<=45347||45349<=b&&b<=45375||45377<=b&&b<=45403||45405<=b&&b<=45431||45433<=b&&b<=45459||45461<=b&&b<=45487||45489<=b&&b<=45515||45517<=b&&b<=45543||45545<=b&&b<=45571||45573<=b&&b<=45599||45601<=b&&b<=45627||45629<=b&&b<=45655||45657<=b&&b<=45683||45685<=b&&b<=45711||45713<=b&&b<=45739||45741<=b&&b<=45767||45769<=b&&b<=45795||45797<=b&&b<=45823||45825<=b&&b<=45851||45853<=b&&b<=45879||45881<=b&&b<=45907||45909<=b&&b<=45935||45937<=b&&b<=45963||45965<=b&&b<=45991||45993<=b&&b<=46019||46021<=b&&b<=46047||46049<=b&&b<=46075||46077<=b&&b<=46103||46105<=b&&b<=46131||46133<=b&&b<=46159||46161<=b&&b<=46187||46189<=b&&b<=46215||46217<=b&&b<=46243||46245<=b&&b<=46271||46273<=b&&b<=46299||46301<=b&&b<=46327||46329<=b&&b<=46355||46357<=b&&b<=46383||46385<=b&&b<=46411||46413<=b&&b<=46439||46441<=b&&b<=46467||46469<=b&&b<=46495||46497<=b&&b<=46523||46525<=b&&b<=46551||46553<=b&&b<=46579||46581<=b&&b<=46607||46609<=b&&b<=46635||46637<=b&&b<=46663||46665<=b&&b<=46691||46693<=b&&b<=46719||46721<=b&&b<=46747||46749<=b&&b<=46775||46777<=b&&b<=46803||46805<=b&&b<=46831||46833<=b&&b<=46859||46861<=b&&b<=46887||46889<=b&&b<=46915||46917<=b&&b<=46943||46945<=b&&b<=46971||46973<=b&&b<=46999||47001<=b&&b<=47027||47029<=b&&b<=47055||47057<=b&&b<=47083||47085<=b&&b<=47111||47113<=b&&b<=47139||47141<=b&&b<=47167||47169<=b&&b<=47195||47197<=b&&b<=47223||47225<=b&&b<=47251||47253<=b&&b<=47279||47281<=b&&b<=47307||47309<=b&&b<=47335||47337<=b&&b<=47363||47365<=b&&b<=47391||47393<=b&&b<=47419||47421<=b&&b<=47447||47449<=b&&b<=47475||47477<=b&&b<=47503||47505<=b&&b<=47531||47533<=b&&b<=47559||47561<=b&&b<=47587||47589<=b&&b<=47615||47617<=b&&b<=47643||47645<=b&&b<=47671||47673<=b&&b<=47699||47701<=b&&b<=47727||47729<=b&&b<=47755||47757<=b&&b<=47783||47785<=b&&b<=47811||47813<=b&&b<=47839||47841<=b&&b<=47867||47869<=b&&b<=47895||47897<=b&&b<=47923||47925<=b&&b<=47951||47953<=b&&b<=47979||47981<=b&&b<=48007||48009<=b&&b<=48035||48037<=b&&b<=48063||48065<=b&&b<=48091||48093<=b&&b<=48119||48121<=b&&b<=48147||48149<=b&&b<=48175||48177<=b&&b<=48203||48205<=b&&b<=48231||48233<=b&&b<=48259||48261<=b&&b<=48287||48289<=b&&b<=48315||48317<=b&&b<=48343||48345<=b&&b<=48371||48373<=b&&b<=48399||48401<=b&&b<=48427||48429<=b&&b<=48455||48457<=b&&b<=48483||48485<=b&&b<=48511||48513<=b&&b<=48539||48541<=b&&b<=48567||48569<=b&&b<=48595||48597<=b&&b<=48623||48625<=b&&b<=48651||48653<=b&&b<=48679||48681<=b&&b<=48707||48709<=b&&b<=48735||48737<=b&&b<=48763||48765<=b&&b<=48791||48793<=b&&b<=48819||48821<=b&&b<=48847||48849<=b&&b<=48875||48877<=b&&b<=48903||48905<=b&&b<=48931||48933<=b&&b<=48959||48961<=b&&b<=48987||48989<=b&&b<=49015||49017<=b&&b<=49043||49045<=b&&b<=49071||49073<=b&&b<=49099||49101<=b&&b<=49127||49129<=b&&b<=49155||49157<=b&&b<=49183||49185<=b&&b<=49211||49213<=b&&b<=49239||49241<=b&&b<=49267||49269<=b&&b<=49295||49297<=b&&b<=49323||49325<=b&&b<=49351||49353<=b&&b<=49379||49381<=b&&b<=49407||49409<=b&&b<=49435||49437<=b&&b<=49463||49465<=b&&b<=49491||49493<=b&&b<=49519||49521<=b&&b<=49547||49549<=b&&b<=49575||49577<=b&&b<=49603||49605<=b&&b<=49631||49633<=b&&b<=49659||49661<=b&&b<=49687||49689<=b&&b<=49715||49717<=b&&b<=49743||49745<=b&&b<=49771||49773<=b&&b<=49799||49801<=b&&b<=49827||49829<=b&&b<=49855||49857<=b&&b<=49883||49885<=b&&b<=49911||49913<=b&&b<=49939||49941<=b&&b<=49967||49969<=b&&b<=49995||49997<=b&&b<=50023||50025<=b&&b<=50051||50053<=b&&b<=50079||50081<=b&&b<=50107||50109<=b&&b<=50135||50137<=b&&b<=50163||50165<=b&&b<=50191||50193<=b&&b<=50219||50221<=b&&b<=50247||50249<=b&&b<=50275||50277<=b&&b<=50303||50305<=b&&b<=50331||50333<=b&&b<=50359||50361<=b&&b<=50387||50389<=b&&b<=50415||50417<=b&&b<=50443||50445<=b&&b<=50471||50473<=b&&b<=50499||50501<=b&&b<=50527||50529<=b&&b<=50555||50557<=b&&b<=50583||50585<=b&&b<=50611||50613<=b&&b<=50639||50641<=b&&b<=50667||50669<=b&&b<=50695||50697<=b&&b<=50723||50725<=b&&b<=50751||50753<=b&&b<=50779||50781<=b&&b<=50807||50809<=b&&b<=50835||50837<=b&&b<=50863||50865<=b&&b<=50891||50893<=b&&b<=50919||50921<=b&&b<=50947||50949<=b&&b<=50975||50977<=b&&b<=51003||51005<=b&&b<=51031||51033<=b&&b<=51059||51061<=b&&b<=51087||51089<=b&&b<=51115||51117<=b&&b<=51143||51145<=b&&b<=51171||51173<=b&&b<=51199||51201<=b&&b<=51227||51229<=b&&b<=51255||51257<=b&&b<=51283||51285<=b&&b<=51311||51313<=b&&b<=51339||51341<=b&&b<=51367||51369<=b&&b<=51395||51397<=b&&b<=51423||51425<=b&&b<=51451||51453<=b&&b<=51479||51481<=b&&b<=51507||51509<=b&&b<=51535||51537<=b&&b<=51563||51565<=b&&b<=51591||51593<=b&&b<=51619||51621<=b&&b<=51647||51649<=b&&b<=51675||51677<=b&&b<=51703||51705<=b&&b<=51731||51733<=b&&b<=51759||51761<=b&&b<=51787||51789<=b&&b<=51815||51817<=b&&b<=51843||51845<=b&&b<=51871||51873<=b&&b<=51899||51901<=b&&b<=51927||51929<=b&&b<=51955||51957<=b&&b<=51983||51985<=b&&b<=52011||52013<=b&&b<=52039||52041<=b&&b<=52067||52069<=b&&b<=52095||52097<=b&&b<=52123||52125<=b&&b<=52151||52153<=b&&b<=52179||52181<=b&&b<=52207||52209<=b&&b<=52235||52237<=b&&b<=52263||52265<=b&&b<=52291||52293<=b&&b<=52319||52321<=b&&b<=52347||52349<=b&&b<=52375||52377<=b&&b<=52403||52405<=b&&b<=52431||52433<=b&&b<=52459||52461<=b&&b<=52487||52489<=b&&b<=52515||52517<=b&&b<=52543||52545<=b&&b<=52571||52573<=b&&b<=52599||52601<=b&&b<=52627||52629<=b&&b<=52655||52657<=b&&b<=52683||52685<=b&&b<=52711||52713<=b&&b<=52739||52741<=b&&b<=52767||52769<=b&&b<=52795||52797<=b&&b<=52823||52825<=b&&b<=52851||52853<=b&&b<=52879||52881<=b&&b<=52907||52909<=b&&b<=52935||52937<=b&&b<=52963||52965<=b&&b<=52991||52993<=b&&b<=53019||53021<=b&&b<=53047||53049<=b&&b<=53075||53077<=b&&b<=53103||53105<=b&&b<=53131||53133<=b&&b<=53159||53161<=b&&b<=53187||53189<=b&&b<=53215||53217<=b&&b<=53243||53245<=b&&b<=53271||53273<=b&&b<=53299||53301<=b&&b<=53327||53329<=b&&b<=53355||53357<=b&&b<=53383||53385<=b&&b<=53411||53413<=b&&b<=53439||53441<=b&&b<=53467||53469<=b&&b<=53495||53497<=b&&b<=53523||53525<=b&&b<=53551||53553<=b&&b<=53579||53581<=b&&b<=53607||53609<=b&&b<=53635||53637<=b&&b<=53663||53665<=b&&b<=53691||53693<=b&&b<=53719||53721<=b&&b<=53747||53749<=b&&b<=53775||53777<=b&&b<=53803||53805<=b&&b<=53831||53833<=b&&b<=53859||53861<=b&&b<=53887||53889<=b&&b<=53915||53917<=b&&b<=53943||53945<=b&&b<=53971||53973<=b&&b<=53999||54001<=b&&b<=54027||54029<=b&&b<=54055||54057<=b&&b<=54083||54085<=b&&b<=54111||54113<=b&&b<=54139||54141<=b&&b<=54167||54169<=b&&b<=54195||54197<=b&&b<=54223||54225<=b&&b<=54251||54253<=b&&b<=54279||54281<=b&&b<=54307||54309<=b&&b<=54335||54337<=b&&b<=54363||54365<=b&&b<=54391||54393<=b&&b<=54419||54421<=b&&b<=54447||54449<=b&&b<=54475||54477<=b&&b<=54503||54505<=b&&b<=54531||54533<=b&&b<=54559||54561<=b&&b<=54587||54589<=b&&b<=54615||54617<=b&&b<=54643||54645<=b&&b<=54671||54673<=b&&b<=54699||54701<=b&&b<=54727||54729<=b&&b<=54755||54757<=b&&b<=54783||54785<=b&&b<=54811||54813<=b&&b<=54839||54841<=b&&b<=54867||54869<=b&&b<=54895||54897<=b&&b<=54923||54925<=b&&b<=54951||54953<=b&&b<=54979||54981<=b&&b<=55007||55009<=b&&b<=55035||55037<=b&&b<=55063||55065<=b&&b<=55091||55093<=b&&b<=55119||55121<=b&&b<=55147||55149<=b&&b<=55175||55177<=b&&b<=55203?10:9757==b||9977==b||9994<=b&&b<=9997||127877==b||127938<=b&&b<=127940||127943==b||127946<=b&&b<=127948||128066<=b&&b<=128067||128070<=b&&b<=128080||128110==b||128112<=b&&b<=128120||128124==b||128129<=b&&b<=128131||128133<=b&&b<=128135||128170==b||128372<=b&&b<=128373||128378==b||128400==b||128405<=b&&b<=128406||128581<=b&&b<=128583||128587<=b&&b<=128591||128675==b||128692<=b&&b<=128694||128704==b||128716==b||129304<=b&&b<=129308||129310<=b&&b<=129311||129318==b||129328<=b&&b<=129337||129341<=b&&b<=129342||129489<=b&&b<=129501?Le:127995<=b&&b<=127999?14:8205==b?15:9792==b||9794==b||9877<=b&&b<=9878||9992==b||10084==b||127752==b||127806==b||127859==b||127891==b||127908==b||127912==b||127979==b||127981==b||128139==b||128187<=b&&b<=128188||128295==b||128300==b||128488==b||128640==b||128658==b?ke:128102<=b&&b<=128105?Ne:11}return this.nextBreak=function(b,it){if(void 0===it&&(it=0),it<0)return 0;if(it>=b.length-1)return b.length;for(var Rt=It(Xe(b,it)),Yt=[],Ct=it+1;Ct{var di=function(st){null==st&&(st=(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,st.constructor==Array?this.init_by_array(st,st.length):this.init_seed(st)};di.prototype.init_seed=function(st){for(this.mt[0]=st>>>0,this.mti=1;this.mti>>30))>>>16)<<16)+1812433253*(65535&st)+this.mti,this.mt[this.mti]>>>=0},di.prototype.init_by_array=function(st,Zn){var pn,Pe,xt;for(this.init_seed(19650218),pn=1,Pe=0,xt=this.N>Zn?this.N:Zn;xt;xt--)this.mt[pn]=(this.mt[pn]^(1664525*((4294901760&(un=this.mt[pn-1]^this.mt[pn-1]>>>30))>>>16)<<16)+1664525*(65535&un))+st[Pe]+Pe,this.mt[pn]>>>=0,Pe++,++pn>=this.N&&(this.mt[0]=this.mt[this.N-1],pn=1),Pe>=Zn&&(Pe=0);for(xt=this.N-1;xt;xt--){var un;this.mt[pn]=(this.mt[pn]^(1566083941*((4294901760&(un=this.mt[pn-1]^this.mt[pn-1]>>>30))>>>16)<<16)+1566083941*(65535&un))-pn,this.mt[pn]>>>=0,++pn>=this.N&&(this.mt[0]=this.mt[this.N-1],pn=1)}this.mt[0]=2147483648},di.prototype.random_int=function(){var st,Zn=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var pn;for(this.mti==this.N+1&&this.init_seed(5489),pn=0;pn>>1^Zn[1&st];for(;pn>>1^Zn[1&st];this.mt[this.N-1]=this.mt[this.M-1]^(st=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK)>>>1^Zn[1&st],this.mti=0}return st=this.mt[this.mti++],st^=st>>>11,st^=st<<7&2636928640,st^=st<<15&4022730752,(st^=st>>>18)>>>0},di.prototype.random_int31=function(){return this.random_int()>>>1},di.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},di.prototype.random=function(){return this.random_int()*(1/4294967296)},di.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},di.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)},Si.exports=di},8097:(Si,di,st)=>{const{webm:Zn,mp4:pn}=st(9288),Pe=()=>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,xt=()=>"wakeLock"in navigator;Si.exports=class un{constructor(){if(this.enabled=!1,xt()){this._wakeLock=null;const mt=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",mt),document.addEventListener("fullscreenchange",mt)}else Pe()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",Zn),this._addSourceToVideo(this.noSleepVideo,"mp4",pn),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(mt,c,ue){var E=document.createElement("source");E.src=ue,E.type=`video/${c}`,mt.appendChild(E)}get isEnabled(){return this.enabled}enable(){return xt()?navigator.wakeLock.request("screen").then(mt=>{this._wakeLock=mt,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",()=>{console.log("Wake Lock released.")})}).catch(mt=>{throw this.enabled=!1,console.error(`${mt.name}, ${mt.message}`),mt}):Pe()?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),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(c=>(this.enabled=!0,c)).catch(c=>{throw this.enabled=!1,c})}disable(){xt()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):Pe()?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}},9288:Si=>{Si.exports={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK",mp4:"data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"}},1753:function(Si,di,st){var Zn,pn;!function(Pe,xt){"use strict";Si.exports?Si.exports=xt():void 0!==(pn="function"==typeof(Zn=xt)?Zn.call(di,st,di,Si):Zn)&&(Si.exports=pn)}(0,function(Pe){"use strict";var xt=Pe&&Pe.IPv6;return{best:function un(mt){var ye,ue=mt.toLowerCase().split(":"),E=ue.length,ae=8;for(""===ue[0]&&""===ue[1]&&""===ue[2]?(ue.shift(),ue.shift()):""===ue[0]&&""===ue[1]?ue.shift():""===ue[E-1]&&""===ue[E-2]&&ue.pop(),-1!==ue[(E=ue.length)-1].indexOf(".")&&(ae=7),ye=0;ye1;ve++)Le.splice(0,1);ue[T]=Le.join("")}var ke=-1,Ne=0,g=0,nt=-1,Ve=!1;for(T=0;TNe&&(ke=nt,Ne=g)):"0"===ue[T]&&(Ve=!0,nt=T,g=1);g>Ne&&(ke=nt,Ne=g),Ne>1&&ue.splice(ke,Ne,""),E=ue.length;var He="";for(""===ue[0]&&(He=":"),T=0;T=Kt.length-1)return!1;var c=Kt.lastIndexOf(".",mt-1);if(c<=0||c>=mt-1)return!1;var ue=un.list[Kt.slice(mt+1)];return!!ue&&ue.indexOf(" "+Kt.slice(c+1,mt)+" ")>=0},is:function(Kt){var mt=Kt.lastIndexOf(".");if(mt<=0||mt>=Kt.length-1)return!1;if(Kt.lastIndexOf(".",mt-1)>=0)return!1;var ue=un.list[Kt.slice(mt+1)];return!!ue&&ue.indexOf(" "+Kt.slice(0,mt)+" ")>=0},get:function(Kt){var mt=Kt.lastIndexOf(".");if(mt<=0||mt>=Kt.length-1)return null;var c=Kt.lastIndexOf(".",mt-1);if(c<=0||c>=mt-1)return null;var ue=un.list[Kt.slice(mt+1)];return!ue||ue.indexOf(" "+Kt.slice(c+1,mt)+" ")<0?null:Kt.slice(c+1)},noConflict:function(){return Pe.SecondLevelDomains===this&&(Pe.SecondLevelDomains=xt),this}};return un})},5098:function(Si,di,st){var Zn,pn,Pe;!function(xt,un){"use strict";Si.exports?Si.exports=un(st(8786),st(1753),st(518)):(pn=[st(8786),st(1753),st(518)],void 0!==(Pe="function"==typeof(Zn=un)?Zn.apply(di,pn):Zn)&&(Si.exports=Pe))}(0,function(xt,un,Kt,mt){"use strict";var c=mt&&mt.URI;function ue(H,J){var de=arguments.length>=1;if(!(this instanceof ue))return de?arguments.length>=2?new ue(H,J):new ue(H):new ue;if(void 0===H){if(de)throw new TypeError("undefined is not a valid argument for URI");H=typeof location<"u"?location.href+"":""}if(null===H&&de)throw new TypeError("null is not a valid argument for URI");return this.href(H),void 0!==J?this.absoluteTo(J):this}ue.version="1.19.11";var ae=ue.prototype,ye=Object.prototype.hasOwnProperty;function Le(H){return H.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function T(H){return void 0===H?"Undefined":String(Object.prototype.toString.call(H)).slice(8,-1)}function ve(H){return"Array"===T(H)}function ke(H,J){var Ee,_e,de={};if("RegExp"===T(J))de=null;else if(ve(J))for(Ee=0,_e=J.length;Ee<_e;Ee++)de[J[Ee]]=!0;else de[J]=!0;for(Ee=0,_e=H.length;Ee<_e;Ee++)(de&&void 0!==de[H[Ee]]||!de&&J.test(H[Ee]))&&(H.splice(Ee,1),_e--,Ee--);return H}function Ne(H,J){var de,Ee;if(ve(J)){for(de=0,Ee=J.length;de]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,ue.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},ue.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,ue.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,ue.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},ue.hostProtocols=["http","https"],ue.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,ue.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"},ue.getDomAttribute=function(H){if(H&&H.nodeName){var J=H.nodeName.toLowerCase();if("input"!==J||"image"===H.type)return ue.domAttributes[J]}},ue.encode=He,ue.decode=decodeURIComponent,ue.iso8859=function(){ue.encode=escape,ue.decode=unescape},ue.unicode=function(){ue.encode=He,ue.decode=decodeURIComponent},ue.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,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)/gi,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)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},ue.encodeQuery=function(H,J){var de=ue.encode(H+"");return void 0===J&&(J=ue.escapeQuerySpace),J?de.replace(/%20/g,"+"):de},ue.decodeQuery=function(H,J){H+="",void 0===J&&(J=ue.escapeQuerySpace);try{return ue.decode(J?H.replace(/\+/g,"%20"):H)}catch{return H}};var Ke,Fe={encode:"encode",decode:"decode"},Xe=function(H,J){return function(de){try{return ue[J](de+"").replace(ue.characters[H][J].expression,function(Ee){return ue.characters[H][J].map[Ee]})}catch{return de}}};for(Ke in Fe)ue[Ke+"PathSegment"]=Xe("pathname",Fe[Ke]),ue[Ke+"UrnPathSegment"]=Xe("urnpath",Fe[Ke]);var Ft=function(H,J,de){return function(Ee){var _e;_e=de?function(hn){return ue[J](ue[de](hn))}:ue[J];for(var Me=(Ee+"").split(H),Ge=0,Nt=Me.length;Ge-1&&(J.fragment=H.substring(de+1)||null,H=H.substring(0,de)),(de=H.indexOf("?"))>-1&&(J.query=H.substring(de+1)||null,H=H.substring(0,de)),"//"===(H=(H=H.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(J.protocol=null,H=H.substring(2),H=ue.parseAuthority(H,J)):(de=H.indexOf(":"))>-1&&(J.protocol=H.substring(0,de)||null,J.protocol&&!J.protocol.match(ue.protocol_expression)?J.protocol=void 0:"//"===H.substring(de+1,de+3).replace(/\\/g,"/")?(H=H.substring(de+3),H=ue.parseAuthority(H,J)):(H=H.substring(de+1),J.urn=!0)),J.path=H,J},ue.parseHost=function(H,J){H||(H="");var Ee,_e,de=(H=H.replace(/\\/g,"/")).indexOf("/");if(-1===de&&(de=H.length),"["===H.charAt(0))Ee=H.indexOf("]"),J.hostname=H.substring(1,Ee)||null,J.port=H.substring(Ee+2,de)||null,"/"===J.port&&(J.port=null);else{var Me=H.indexOf(":"),Ge=H.indexOf("/"),Nt=H.indexOf(":",Me+1);-1!==Nt&&(-1===Ge||Nt-1?_e:H.length-1);return Me>-1&&(-1===_e||Me<_e)?(Ge=H.substring(0,Me).split(":"),J.username=Ge[0]?ue.decode(Ge[0]):null,Ge.shift(),J.password=Ge[0]?ue.decode(Ge.join(":")):null,H=de.substring(Me+1)):(J.username=null,J.password=null),H},ue.parseQuery=function(H,J){if(!H)return{};if(!(H=H.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var Me,Ge,Nt,de={},Ee=H.split("&"),_e=Ee.length,hn=0;hn<_e;hn++)Me=Ee[hn].split("="),Ge=ue.decodeQuery(Me.shift(),J),Nt=Me.length?ue.decodeQuery(Me.join("="),J):null,"__proto__"!==Ge&&(ye.call(de,Ge)?(("string"==typeof de[Ge]||null===de[Ge])&&(de[Ge]=[de[Ge]]),de[Ge].push(Nt)):de[Ge]=Nt);return de},ue.build=function(H){var J="",de=!1;return H.protocol&&(J+=H.protocol+":"),!H.urn&&(J||H.hostname)&&(J+="//",de=!0),J+=ue.buildAuthority(H)||"","string"==typeof H.path&&("/"!==H.path.charAt(0)&&de&&(J+="/"),J+=H.path),"string"==typeof H.query&&H.query&&(J+="?"+H.query),"string"==typeof H.fragment&&H.fragment&&(J+="#"+H.fragment),J},ue.buildHost=function(H){var J="";return H.hostname?(ue.ip6_expression.test(H.hostname)?J+="["+H.hostname+"]":J+=H.hostname,H.port&&(J+=":"+H.port),J):""},ue.buildAuthority=function(H){return ue.buildUserinfo(H)+ue.buildHost(H)},ue.buildUserinfo=function(H){var J="";return H.username&&(J+=ue.encode(H.username)),H.password&&(J+=":"+ue.encode(H.password)),J&&(J+="@"),J},ue.buildQuery=function(H,J,de){var _e,Me,Ge,Nt,Ee="";for(Me in H)if("__proto__"!==Me&&ye.call(H,Me))if(ve(H[Me]))for(_e={},Ge=0,Nt=H[Me].length;Ge-1?fo.slice(0,_r)+fo.slice(_r).replace(Me,""):fo.replace(Me,"")).length<=hn[0].length||de.ignore&&de.ignore.test(fo))){var ht=J(fo,Vn,zi=Vn+fo.length,H);if(void 0===ht){Ee.lastIndex=zi;continue}ht=String(ht),H=H.slice(0,Vn)+ht+H.slice(zi),Ee.lastIndex=Vn+ht.length}}return Ee.lastIndex=0,H},ue.ensureValidHostname=function(H,J){var de=!!H,_e=!1;if(!!J&&(_e=Ne(ue.hostProtocols,J)),_e&&!de)throw new TypeError("Hostname cannot be empty, if protocol is "+J);if(H&&H.match(ue.invalid_hostname_characters)){if(!xt)throw new TypeError('Hostname "'+H+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(xt.toASCII(H).match(ue.invalid_hostname_characters))throw new TypeError('Hostname "'+H+'" contains characters other than [A-Z0-9.-:_]')}},ue.ensureValidPort=function(H){if(H){var J=Number(H);if(!(function E(H){return/^[0-9]+$/.test(H)}(J)&&J>0&&J<65536))throw new TypeError('Port "'+H+'" is not a valid port')}},ue.noConflict=function(H){if(H){var J={URI:this.noConflict()};return mt.URITemplate&&"function"==typeof mt.URITemplate.noConflict&&(J.URITemplate=mt.URITemplate.noConflict()),mt.IPv6&&"function"==typeof mt.IPv6.noConflict&&(J.IPv6=mt.IPv6.noConflict()),mt.SecondLevelDomains&&"function"==typeof mt.SecondLevelDomains.noConflict&&(J.SecondLevelDomains=mt.SecondLevelDomains.noConflict()),J}return mt.URI===this&&(mt.URI=c),this},ae.build=function(H){return!0===H?this._deferred_build=!0:(void 0===H||this._deferred_build)&&(this._string=ue.build(this._parts),this._deferred_build=!1),this},ae.clone=function(){return new ue(this)},ae.valueOf=ae.toString=function(){return this.build(!1)._string},ae.protocol=It("protocol"),ae.username=It("username"),ae.password=It("password"),ae.hostname=It("hostname"),ae.port=It("port"),ae.query=b("query","?"),ae.fragment=b("fragment","#"),ae.search=function(H,J){var de=this.query(H,J);return"string"==typeof de&&de.length?"?"+de:de},ae.hash=function(H,J){var de=this.fragment(H,J);return"string"==typeof de&&de.length?"#"+de:de},ae.pathname=function(H,J){if(void 0===H||!0===H){var de=this._parts.path||(this._parts.hostname?"/":"");return H?(this._parts.urn?ue.decodeUrnPath:ue.decodePath)(de):de}return this._parts.path=this._parts.urn?H?ue.recodeUrnPath(H):"":H?ue.recodePath(H):"/",this.build(!J),this},ae.path=ae.pathname,ae.href=function(H,J){var de;if(void 0===H)return this.toString();this._string="",this._parts=ue._parts();var Ee=H instanceof ue,_e="object"==typeof H&&(H.hostname||H.path||H.pathname);if(H.nodeName&&(H=H[ue.getDomAttribute(H)]||"",_e=!1),!Ee&&_e&&void 0!==H.pathname&&(H=H.toString()),"string"==typeof H||H instanceof String)this._parts=ue.parse(String(H),this._parts);else{if(!Ee&&!_e)throw new TypeError("invalid input");var Ge=Ee?H._parts:H;for(de in Ge)"query"!==de&&ye.call(this._parts,de)&&(this._parts[de]=Ge[de]);Ge.query&&this.query(Ge.query,!1)}return this.build(!J),this},ae.is=function(H){var J=!1,de=!1,Ee=!1,_e=!1,Me=!1,Ge=!1,Nt=!1,hn=!this._parts.urn;switch(this._parts.hostname&&(hn=!1,de=ue.ip4_expression.test(this._parts.hostname),Ee=ue.ip6_expression.test(this._parts.hostname),Me=(_e=!(J=de||Ee))&&Kt&&Kt.has(this._parts.hostname),Ge=_e&&ue.idn_expression.test(this._parts.hostname),Nt=_e&&ue.punycode_expression.test(this._parts.hostname)),H.toLowerCase()){case"relative":return hn;case"absolute":return!hn;case"domain":case"name":return _e;case"sld":return Me;case"ip":return J;case"ip4":case"ipv4":case"inet4":return de;case"ip6":case"ipv6":case"inet6":return Ee;case"idn":return Ge;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return Nt}return null};var it=ae.protocol,Rt=ae.port,Yt=ae.hostname;ae.protocol=function(H,J){if(H&&!(H=H.replace(/:(\/\/)?$/,"")).match(ue.protocol_expression))throw new TypeError('Protocol "'+H+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return it.call(this,H,J)},ae.scheme=ae.protocol,ae.port=function(H,J){return this._parts.urn?void 0===H?"":this:(void 0!==H&&(0===H&&(H=null),H&&(":"===(H+="").charAt(0)&&(H=H.substring(1)),ue.ensureValidPort(H))),Rt.call(this,H,J))},ae.hostname=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0!==H){var de={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==ue.parseHost(H,de))throw new TypeError('Hostname "'+H+'" contains characters other than [A-Z0-9.-]');H=de.hostname,this._parts.preventInvalidHostname&&ue.ensureValidHostname(H,this._parts.protocol)}return Yt.call(this,H,J)},ae.origin=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H){var de=this.protocol();return this.authority()?(de?de+"://":"")+this.authority():""}var _e=ue(H);return this.protocol(_e.protocol()).authority(_e.authority()).build(!J),this},ae.host=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H)return this._parts.hostname?ue.buildHost(this._parts):"";if("/"!==ue.parseHost(H,this._parts))throw new TypeError('Hostname "'+H+'" contains characters other than [A-Z0-9.-]');return this.build(!J),this},ae.authority=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H)return this._parts.hostname?ue.buildAuthority(this._parts):"";if("/"!==ue.parseAuthority(H,this._parts))throw new TypeError('Hostname "'+H+'" contains characters other than [A-Z0-9.-]');return this.build(!J),this},ae.userinfo=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H){var de=ue.buildUserinfo(this._parts);return de&&de.substring(0,de.length-1)}return"@"!==H[H.length-1]&&(H+="@"),ue.parseUserinfo(H,this._parts),this.build(!J),this},ae.resource=function(H,J){var de;return void 0===H?this.path()+this.search()+this.hash():(de=ue.parse(H),this._parts.path=de.path,this._parts.query=de.query,this._parts.fragment=de.fragment,this.build(!J),this)},ae.subdomain=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H){if(!this._parts.hostname||this.is("IP"))return"";var de=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,de)||""}var Ee=this._parts.hostname.length-this.domain().length,_e=this._parts.hostname.substring(0,Ee),Me=new RegExp("^"+Le(_e));if(H&&"."!==H.charAt(H.length-1)&&(H+="."),-1!==H.indexOf(":"))throw new TypeError("Domains cannot contain colons");return H&&ue.ensureValidHostname(H,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(Me,H),this.build(!J),this},ae.domain=function(H,J){if(this._parts.urn)return void 0===H?"":this;if("boolean"==typeof H&&(J=H,H=void 0),void 0===H){if(!this._parts.hostname||this.is("IP"))return"";var de=this._parts.hostname.match(/\./g);if(de&&de.length<2)return this._parts.hostname;var Ee=this._parts.hostname.length-this.tld(J).length-1;return Ee=this._parts.hostname.lastIndexOf(".",Ee-1)+1,this._parts.hostname.substring(Ee)||""}if(!H)throw new TypeError("cannot set domain empty");if(-1!==H.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(ue.ensureValidHostname(H,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=H;else{var _e=new RegExp(Le(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(_e,H)}return this.build(!J),this},ae.tld=function(H,J){if(this._parts.urn)return void 0===H?"":this;if("boolean"==typeof H&&(J=H,H=void 0),void 0===H){if(!this._parts.hostname||this.is("IP"))return"";var de=this._parts.hostname.lastIndexOf("."),Ee=this._parts.hostname.substring(de+1);return!0!==J&&Kt&&Kt.list[Ee.toLowerCase()]&&Kt.get(this._parts.hostname)||Ee}var _e;if(!H)throw new TypeError("cannot set TLD empty");if(H.match(/[^a-zA-Z0-9-]/)){if(!Kt||!Kt.is(H))throw new TypeError('TLD "'+H+'" contains characters other than [A-Z0-9]');_e=new RegExp(Le(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(_e,H)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");_e=new RegExp(Le(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(_e,H)}return this.build(!J),this},ae.directory=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H||!0===H){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var de=this._parts.path.length-this.filename().length-1,Ee=this._parts.path.substring(0,de)||(this._parts.hostname?"/":"");return H?ue.decodePath(Ee):Ee}var _e=this._parts.path.length-this.filename().length,Me=this._parts.path.substring(0,_e),Ge=new RegExp("^"+Le(Me));return this.is("relative")||(H||(H="/"),"/"!==H.charAt(0)&&(H="/"+H)),H&&"/"!==H.charAt(H.length-1)&&(H+="/"),H=ue.recodePath(H),this._parts.path=this._parts.path.replace(Ge,H),this.build(!J),this},ae.filename=function(H,J){if(this._parts.urn)return void 0===H?"":this;if("string"!=typeof H){if(!this._parts.path||"/"===this._parts.path)return"";var de=this._parts.path.lastIndexOf("/"),Ee=this._parts.path.substring(de+1);return H?ue.decodePathSegment(Ee):Ee}var _e=!1;"/"===H.charAt(0)&&(H=H.substring(1)),H.match(/\.?\//)&&(_e=!0);var Me=new RegExp(Le(this.filename())+"$");return H=ue.recodePath(H),this._parts.path=this._parts.path.replace(Me,H),_e?this.normalizePath(J):this.build(!J),this},ae.suffix=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H||!0===H){if(!this._parts.path||"/"===this._parts.path)return"";var _e,Me,de=this.filename(),Ee=de.lastIndexOf(".");return-1===Ee?"":(_e=de.substring(Ee+1),Me=/^[a-z0-9%]+$/i.test(_e)?_e:"",H?ue.decodePathSegment(Me):Me)}"."===H.charAt(0)&&(H=H.substring(1));var Nt,Ge=this.suffix();if(Ge)Nt=H?new RegExp(Le(Ge)+"$"):new RegExp(Le("."+Ge)+"$");else{if(!H)return this;this._parts.path+="."+ue.recodePath(H)}return Nt&&(H=ue.recodePath(H),this._parts.path=this._parts.path.replace(Nt,H)),this.build(!J),this},ae.segment=function(H,J,de){var Ee=this._parts.urn?":":"/",_e=this.path(),Me="/"===_e.substring(0,1),Ge=_e.split(Ee);if(void 0!==H&&"number"!=typeof H&&(de=J,J=H,H=void 0),void 0!==H&&"number"!=typeof H)throw new Error('Bad segment "'+H+'", must be 0-based integer');if(Me&&Ge.shift(),H<0&&(H=Math.max(Ge.length+H,0)),void 0===J)return void 0===H?Ge:Ge[H];if(null===H||void 0===Ge[H])if(ve(J)){Ge=[];for(var Nt=0,hn=J.length;Nt= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ve=c-1,He=Math.floor,Fe=String.fromCharCode;function Xe(_e){throw new RangeError(nt[_e])}function Ft(_e,Me){for(var Ge=_e.length,Nt=[];Ge--;)Nt[Ge]=Me(_e[Ge]);return Nt}function It(_e,Me){var Ge=_e.split("@"),Nt="";return Ge.length>1&&(Nt=Ge[0]+"@",_e=Ge[1]),Nt+Ft((_e=_e.replace(g,".")).split("."),Me).join(".")}function b(_e){for(var hn,Vn,Me=[],Ge=0,Nt=_e.length;Ge=55296&&hn<=56319&&Ge65535&&(Ge+=Fe((Me-=65536)>>>10&1023|55296),Me=56320|1023&Me),Ge+Fe(Me)}).join("")}function Rt(_e){return _e-48<10?_e-22:_e-65<26?_e-65:_e-97<26?_e-97:c}function Yt(_e,Me){return _e+22+75*(_e<26)-((0!=Me)<<5)}function Ct(_e,Me,Ge){var Nt=0;for(_e=Ge?He(_e/ye):_e>>1,_e+=He(_e/Me);_e>Ve*E>>1;Nt+=c)_e=He(_e/Ve);return He(Nt+(Ve+1)*_e/(_e+ae))}function H(_e){var Nt,zi,fo,_r,Br,vi,ht,nr,se,cn,Me=[],Ge=_e.length,hn=0,Vn=128,gi=72;for((zi=_e.lastIndexOf("-"))<0&&(zi=0),fo=0;fo=128&&Xe("not-basic"),Me.push(_e.charCodeAt(fo));for(_r=zi>0?zi+1:0;_r=Ge&&Xe("invalid-input"),((nr=Rt(_e.charCodeAt(_r++)))>=c||nr>He((mt-hn)/vi))&&Xe("overflow"),hn+=nr*vi,!(nr<(se=ht<=gi?1:ht>=gi+E?E:ht-gi));ht+=c)vi>He(mt/(cn=c-se))&&Xe("overflow"),vi*=cn;gi=Ct(hn-Br,Nt=Me.length+1,0==Br),He(hn/Nt)>mt-Vn&&Xe("overflow"),Vn+=He(hn/Nt),hn%=Nt,Me.splice(hn++,0,Vn)}return it(Me)}function J(_e){var Me,Ge,Nt,hn,Vn,gi,zi,fo,_r,Br,vi,nr,se,cn,Mi,ht=[];for(nr=(_e=b(_e)).length,Me=128,Ge=0,Vn=72,gi=0;gi=Me&&viHe((mt-Ge)/(se=Nt+1))&&Xe("overflow"),Ge+=(zi-Me)*se,Me=zi,gi=0;gimt&&Xe("overflow"),vi==Me){for(fo=Ge,_r=c;!(fo<(Br=_r<=Vn?1:_r>=Vn+E?E:_r-Vn));_r+=c)ht.push(Fe(Yt(Br+(Mi=fo-Br)%(cn=c-Br),0))),fo=He(Mi/cn);ht.push(Fe(Yt(fo,0))),Vn=Ct(Ge,se,Nt==hn),Ge=0,++Nt}++Ge,++Me}return ht.join("")}Kt={version:"1.3.2",ucs2:{decode:b,encode:it},decode:H,encode:J,toASCII:function Ee(_e){return It(_e,function(Me){return Ne.test(Me)?"xn--"+J(Me):Me})},toUnicode:function de(_e){return It(_e,function(Me){return ke.test(Me)?H(Me.slice(4).toLowerCase()):Me})}},void 0!==(Zn=function(){return Kt}.call(di,st,di,Si))&&(Si.exports=Zn)}()},1168:(Si,di,st)=>{"use strict";st.r(di),st.d(di,{RouteCesiumModule:()=>Vot,RouteCesiumModuleRoutingModule:()=>Hie});var Zn=st(3223),pn=st(7243),Pe=st(1921),xt=st(2474),un=st(285),Kt=st(9766);const c=function mt(e){return null!=e};function ue(e){let t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(n){t=n.stack}this.stack=t}c(Object.create)&&((ue.prototype=Object.create(Error.prototype)).constructor=ue),ue.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return c(this.stack)&&(e+=`\n${this.stack.toString()}`),e},ue.throwInstantiationError=function(){throw new ue("This function defines an interface and should not be called directly.")};const E=ue,ae={};function Le(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}ae.typeOf={},ae.defined=function(e,t){if(!c(t))throw new E(function ye(e){return`${e} is required, actual value was undefined`}(e))},ae.typeOf.func=function(e,t){if("function"!=typeof t)throw new E(Le(typeof t,"function",e))},ae.typeOf.string=function(e,t){if("string"!=typeof t)throw new E(Le(typeof t,"string",e))},ae.typeOf.number=function(e,t){if("number"!=typeof t)throw new E(Le(typeof t,"number",e))},ae.typeOf.number.lessThan=function(e,t,n){if(ae.typeOf.number(e,t),t>=n)throw new E(`Expected ${e} to be less than ${n}, actual value was ${t}`)},ae.typeOf.number.lessThanOrEquals=function(e,t,n){if(ae.typeOf.number(e,t),t>n)throw new E(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)},ae.typeOf.number.greaterThan=function(e,t,n){if(ae.typeOf.number(e,t),t<=n)throw new E(`Expected ${e} to be greater than ${n}, actual value was ${t}`)},ae.typeOf.number.greaterThanOrEquals=function(e,t,n){if(ae.typeOf.number(e,t),t0))return r;o=r-1}return~(o+1)};function Ne(e,t){return e??t}Ne.EMPTY_OBJECT=Object.freeze({});const g=Ne,Ve=function nt(e,t,n,i,o,r,s,a){this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=s,this.isLeapSecond=a},Fe=function He(e){if(null===e||isNaN(e))throw new E("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0},Xe=function Ke(e,t){this.julianDate=e,this.offset=t},It=Object.freeze({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:2400000.5}),it=Object.freeze({UTC:0,TAI:1}),Rt=new Ve,Yt=[31,28,31,30,31,30,31,31,30,31,30,31];function H(e,t){return ht.compare(e.julianDate,t.julianDate)}const J=new Xe;function de(e){J.julianDate=e;const t=ht.leapSeconds;let n=ke(t,J,H);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&ht.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),ht.addSeconds(e,i,e)}function Ee(e,t){J.julianDate=e;const n=ht.leapSeconds;let i=ke(n,J,H);if(i<0&&(i=~i),0===i)return ht.addSeconds(e,-n[0].offset,t);if(i>=n.length)return ht.addSeconds(e,-n[i-1].offset,t);const o=ht.secondsDifference(n[i].julianDate,e);return 0===o?ht.addSeconds(e,-n[i].offset,t):o<=1?void 0:ht.addSeconds(e,-n[--i].offset,t)}function _e(e,t,n){const i=t/It.SECONDS_PER_DAY|0;return e+=i,(t-=It.SECONDS_PER_DAY*i)<0&&(e--,t+=It.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function Me(e,t,n,i,o,r,s){const a=(t-14)/12|0,l=e+4800+a;let u=(1461*l/4|0)+(367*(t-2-12*a)/12|0)-(3*((l+100)/100|0)/4|0)+n-32075;(i-=12)<0&&(i+=24);const d=r+(i*It.SECONDS_PER_HOUR+o*It.SECONDS_PER_MINUTE+s*It.SECONDS_PER_MILLISECOND);return d>=43200&&(u-=1),[u,d]}const Ge=/^(\d{4})$/,Nt=/^(\d{4})-(\d{2})$/,hn=/^(\d{4})-?(\d{3})$/,Vn=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,gi=/^(\d{4})-?(\d{2})-?(\d{2})$/,zi=/([Z+\-])?(\d{2})?:?(\d{2})?$/,fo=/^(\d{2})(\.\d+)?/.source+zi.source,_r=/^(\d{2}):?(\d{2})(\.\d+)?/.source+zi.source,Br=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+zi.source,vi="Invalid ISO 8601 date.";function ht(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=g(e,0),t=g(t,0),n=g(n,it.UTC);const i=0|e;_e(i,t+=(e-i)*It.SECONDS_PER_DAY,this),n===it.UTC&&de(this)}ht.fromGregorianDate=function(e,t){if(!(e instanceof Ve))throw new E("date must be a valid GregorianDate.");const n=Me(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return c(t)?(_e(n[0],n[1],t),de(t),t):new ht(n[0],n[1],it.UTC)},ht.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new E("date must be a valid JavaScript Date.");const n=Me(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return c(t)?(_e(n[0],n[1],t),de(t),t):new ht(n[0],n[1],it.UTC)},ht.fromIso8601=function(e,t){if("string"!=typeof e)throw new E(vi);let i,n=(e=e.replace(",",".")).split("T"),o=1,r=1,s=0,a=0,l=0,u=0;const d=n[0],h=n[1];let m,_,p,y;if(!c(d))throw new E(vi);if(n=d.match(gi),null!==n){if(p=d.split("-").length-1,p>0&&2!==p)throw new E(vi);i=+n[1],o=+n[2],r=+n[3]}else if(n=d.match(Nt),null!==n)i=+n[1],o=+n[2];else if(n=d.match(Ge),null!==n)i=+n[1];else{let C;if(n=d.match(hn),null!==n){if(i=+n[1],C=+n[2],_=Fe(i),C<1||_&&C>366||!_&&C>365)throw new E(vi)}else{if(n=d.match(Vn),null===n)throw new E(vi);{i=+n[1];const w=+n[2],v=+n[3]||0;if(p=d.split("-").length-1,p>0&&(!c(n[3])&&1!==p||c(n[3])&&2!==p))throw new E(vi);C=7*w+v-new Date(Date.UTC(i,0,4)).getUTCDay()-3}}m=new Date(Date.UTC(i,0,1)),m.setUTCDate(C),o=m.getUTCMonth()+1,r=m.getUTCDate()}if(_=Fe(i),o<1||o>12||r<1||(2!==o||!_)&&r>Yt[o-1]||_&&2===o&&r>29)throw new E(vi);if(c(h)){if(n=h.match(Br),null!==n){if(p=h.split(":").length-1,p>0&&2!==p&&3!==p)throw new E(vi);s=+n[1],a=+n[2],l=+n[3],u=1e3*+(n[4]||0),y=5}else if(n=h.match(_r),null!==n){if(p=h.split(":").length-1,p>2)throw new E(vi);s=+n[1],a=+n[2],l=60*+(n[3]||0),y=4}else{if(n=h.match(fo),null===n)throw new E(vi);s=+n[1],a=60*+(n[2]||0),y=3}if(a>=60||l>=61||s>24||24===s&&(a>0||l>0||u>0))throw new E(vi);const w=+n[y+1],v=+(n[y+2]||0);switch(n[y]){case"+":s-=w,a-=v;break;case"-":s+=w,a+=v;break;case"Z":break;default:a+=new Date(Date.UTC(i,o-1,r,s,a)).getTimezoneOffset()}}const A=60===l;for(A&&l--;a>=60;)a-=60,s++;for(;s>=24;)s-=24,r++;for(m=_&&2===o?29:Yt[o-1];r>m;)r-=m,o++,o>12&&(o-=12,i++),m=_&&2===o?29:Yt[o-1];for(;a<0;)a+=60,s--;for(;s<0;)s+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),m=_&&2===o?29:Yt[o-1],r+=m;const x=Me(i,o,r,s,a,l,u);return c(t)?(_e(x[0],x[1],t),de(t)):t=new ht(x[0],x[1],it.UTC),A&&ht.addSeconds(t,1,t),t},ht.now=function(e){return ht.fromDate(new Date,e)};const nr=new ht(0,0,it.TAI);ht.toGregorianDate=function(e,t){if(!c(e))throw new E("julianDate is required.");let n=!1,i=Ee(e,nr);c(i)||(ht.addSeconds(e,-1,nr),i=Ee(nr,nr),n=!0);let o=i.dayNumber;const r=i.secondsOfDay;r>=43200&&(o+=1);let s=o+68569|0;const a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;const l=4e3*(s+1)/1461001|0;s=s-(1461*l/4|0)+31|0;const u=80*s/2447|0,d=s-(2447*u/80|0)|0;s=u/11|0;const h=u+2-12*s|0,m=100*(a-49)+l+s|0;let _=r/It.SECONDS_PER_HOUR|0,p=r-_*It.SECONDS_PER_HOUR;const y=p/It.SECONDS_PER_MINUTE|0;p-=y*It.SECONDS_PER_MINUTE;let A=0|p;const x=(p-A)/It.SECONDS_PER_MILLISECOND;return _+=12,_>23&&(_-=24),n&&(A+=1),c(t)?(t.year=m,t.month=h,t.day=d,t.hour=_,t.minute=y,t.second=A,t.millisecond=x,t.isLeapSecond=n,t):new Ve(m,h,d,_,y,A,x,n)},ht.toDate=function(e){if(!c(e))throw new E("julianDate is required.");const t=ht.toGregorianDate(e,Rt);let 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))},ht.toIso8601=function(e,t){if(!c(e))throw new E("julianDate is required.");const n=ht.toGregorianDate(e,Rt);let i=n.year,o=n.month,r=n.day,s=n.hour;const a=n.minute,l=n.second,u=n.millisecond;let d;return 1e4===i&&1===o&&1===r&&0===s&&0===a&&0===l&&0===u&&(i=9999,o=12,r=31,s=24),c(t)||0===u?c(t)&&0!==t?(d=(.01*u).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")}:${l.toString().padStart(2,"0")}.${d}Z`):`${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")}:${l.toString().padStart(2,"0")}Z`:(d=(.01*u).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")}:${l.toString().padStart(2,"0")}.${d}Z`)},ht.clone=function(e,t){if(c(e))return c(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new ht(e.dayNumber,e.secondsOfDay,it.TAI)},ht.compare=function(e,t){if(!c(e))throw new E("left is required.");if(!c(t))throw new E("right is required.");const n=e.dayNumber-t.dayNumber;return 0!==n?n:e.secondsOfDay-t.secondsOfDay},ht.equals=function(e,t){return e===t||c(e)&&c(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},ht.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(ht.secondsDifference(e,t))<=n},ht.totalDays=function(e){if(!c(e))throw new E("julianDate is required.");return e.dayNumber+e.secondsOfDay/It.SECONDS_PER_DAY},ht.secondsDifference=function(e,t){if(!c(e))throw new E("left is required.");if(!c(t))throw new E("right is required.");return(e.dayNumber-t.dayNumber)*It.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},ht.daysDifference=function(e,t){if(!c(e))throw new E("left is required.");if(!c(t))throw new E("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/It.SECONDS_PER_DAY},ht.computeTaiMinusUtc=function(e){J.julianDate=e;const t=ht.leapSeconds;let n=ke(t,J,H);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset},ht.addSeconds=function(e,t,n){if(!c(e))throw new E("julianDate is required.");if(!c(t))throw new E("seconds is required.");if(!c(n))throw new E("result is required.");return _e(e.dayNumber,e.secondsOfDay+t,n)},ht.addMinutes=function(e,t,n){if(!c(e))throw new E("julianDate is required.");if(!c(t))throw new E("minutes is required.");if(!c(n))throw new E("result is required.");return _e(e.dayNumber,e.secondsOfDay+t*It.SECONDS_PER_MINUTE,n)},ht.addHours=function(e,t,n){if(!c(e))throw new E("julianDate is required.");if(!c(t))throw new E("hours is required.");if(!c(n))throw new E("result is required.");return _e(e.dayNumber,e.secondsOfDay+t*It.SECONDS_PER_HOUR,n)},ht.addDays=function(e,t,n){if(!c(e))throw new E("julianDate is required.");if(!c(t))throw new E("days is required.");if(!c(n))throw new E("result is required.");return _e(e.dayNumber+t,e.secondsOfDay,n)},ht.lessThan=function(e,t){return ht.compare(e,t)<0},ht.lessThanOrEquals=function(e,t){return ht.compare(e,t)<=0},ht.greaterThan=function(e,t){return ht.compare(e,t)>0},ht.greaterThanOrEquals=function(e,t){return ht.compare(e,t)>=0},ht.prototype.clone=function(e){return ht.clone(this,e)},ht.prototype.equals=function(e){return ht.equals(this,e)},ht.prototype.equalsEpsilon=function(e,t){return ht.equalsEpsilon(this,e,t)},ht.prototype.toString=function(){return ht.toIso8601(this)},ht.leapSeconds=[new Xe(new ht(2441317,43210,it.TAI),10),new Xe(new ht(2441499,43211,it.TAI),11),new Xe(new ht(2441683,43212,it.TAI),12),new Xe(new ht(2442048,43213,it.TAI),13),new Xe(new ht(2442413,43214,it.TAI),14),new Xe(new ht(2442778,43215,it.TAI),15),new Xe(new ht(2443144,43216,it.TAI),16),new Xe(new ht(2443509,43217,it.TAI),17),new Xe(new ht(2443874,43218,it.TAI),18),new Xe(new ht(2444239,43219,it.TAI),19),new Xe(new ht(2444786,43220,it.TAI),20),new Xe(new ht(2445151,43221,it.TAI),21),new Xe(new ht(2445516,43222,it.TAI),22),new Xe(new ht(2446247,43223,it.TAI),23),new Xe(new ht(2447161,43224,it.TAI),24),new Xe(new ht(2447892,43225,it.TAI),25),new Xe(new ht(2448257,43226,it.TAI),26),new Xe(new ht(2448804,43227,it.TAI),27),new Xe(new ht(2449169,43228,it.TAI),28),new Xe(new ht(2449534,43229,it.TAI),29),new Xe(new ht(2450083,43230,it.TAI),30),new Xe(new ht(2450630,43231,it.TAI),31),new Xe(new ht(2451179,43232,it.TAI),32),new Xe(new ht(2453736,43233,it.TAI),33),new Xe(new ht(2454832,43234,it.TAI),34),new Xe(new ht(2456109,43235,it.TAI),35),new Xe(new ht(2457204,43236,it.TAI),36),new Xe(new ht(2457754,43237,it.TAI),37)];const se=ht;function cn(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function Mi(e,t){return t-e}Object.defineProperties(cn.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),cn.prototype.addEventListener=function(e,t){T.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);const n=this;return function(){n.removeEventListener(e,t)}},cn.prototype.removeEventListener=function(e,t){T.typeOf.func("listener",e);const n=this._listeners,i=this._scopes;let o=-1;for(let r=0;r0){for(o.sort(Mi),e=0;e0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},bo.prototype.findIntervalContainingDate=function(e){const t=this.indexOf(e);return t>=0?this._intervals[t]:void 0},bo.prototype.findDataForIntervalContainingDate=function(e){const t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0},bo.prototype.contains=function(e){return this.indexOf(e)>=0};const Kh=new ci;bo.prototype.indexOf=function(e){if(!c(e))throw new E("date is required");const t=this._intervals;Kh.start=e,Kh.stop=e;let n=ke(t,Kh,_A);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=se.compare(n[i-1].stop,e.start),(o>0||0===o&&(n[i-1].isStopIncluded||e.isStartIncluded))&&((c(t)?t(n[i-1].data,e.data):n[i-1].data===e.data)?(e=se.greaterThan(e.stop,n[i-1].stop)?new ci({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):new ci({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=se.compare(n[i-1].stop,e.stop),(o>0||0===o&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new ci({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 ci({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i0||0===o&&(e.isStopIncluded||n[i].isStartIncluded));)if(c(t)?t(n[i].data,e.data):n[i].data===e.data)e=new ci({start:e.start,stop:se.greaterThan(n[i].stop,e.stop)?n[i].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:se.greaterThan(n[i].stop,e.stop)?n[i].isStopIncluded:e.isStopIncluded,data:e.data}),n.splice(i,1);else{if(n[i]=new ci({start:e.stop,stop:n[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i].isStopIncluded,data:n[i].data}),!n[i].isEmpty)break;n.splice(i,1)}n.splice(i,0,e),this._changedEvent.raiseEvent(this)},bo.prototype.removeInterval=function(e){if(!c(e))throw new E("interval is required");if(e.isEmpty)return!1;const t=this._intervals;let n=ke(t,e,_A);n<0&&(n=~n);let i=!1;for(n>0&&(se.greaterThan(t[n-1].stop,e.start)||t[n-1].stop.equals(e.start)&&t[n-1].isStopIncluded&&e.isStartIncluded)&&(i=!0,(se.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 ci({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 ci({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%=1e3),o>=60&&(r+=Math.floor(o/60),o%=60),r>=60&&(s+=Math.floor(r/60),r%=60),s>=24&&(a+=Math.floor(s/24),s%=24),Ym[2]=Fe(u)?29:28;a>Ym[l]||l>=13;)a>Ym[l]&&(a-=Ym[l],++l),l>=13&&(--l,u+=Math.floor(l/12),l%=12,++l),Ym[2]=Fe(u)?29:28;return As.millisecond=i,As.second=o,As.minute=r,As.hour=s,As.day=a,As.month=l,As.year=u,se.fromGregorianDate(As,n)}const yA=new se,Vs=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function Qh(e,t){if(!c(e)||0===e.length)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,"P"===e[0]){const n=e.match(Vs);if(!c(n))return!1;if(c(n[1])&&(t.year=Number(n[1].replace(",","."))),c(n[2])&&(t.month=Number(n[2].replace(",","."))),c(n[3])&&(t.day=7*Number(n[3].replace(",","."))),c(n[4])&&(t.day+=Number(n[4].replace(",","."))),c(n[5])&&(t.hour=Number(n[5].replace(",","."))),c(n[6])&&(t.minute=Number(n[6].replace(",","."))),c(n[7])){const i=Number(n[7].replace(",","."));t.second=Math.floor(i),t.millisecond=i%1*1e3}}else"Z"!==e[e.length-1]&&(e+="Z"),se.toGregorianDate(se.fromIso8601(e,yA),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}const xf=new Ve;bo.fromIso8601=function(e,t){if(!c(e))throw new E("options is required.");if(!c(e.iso8601))throw new E("options.iso8601 is required.");const n=e.iso8601.split("/"),i=se.fromIso8601(n[0]),o=se.fromIso8601(n[1]),r=[];if(Qh(n[2],xf)){let s=se.clone(i);for(r.push(s);se.compare(s,o)<0;)s=gA(s,xf),se.compare(o,s)<=0&&se.clone(o,s),r.push(s)}else r.push(i,o);return bo.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},bo.fromIso8601DateArray=function(e,t){if(!c(e))throw new E("options is required.");if(!c(e.iso8601Dates))throw new E("options.iso8601Dates is required.");return bo.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(n){return se.fromIso8601(n)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},bo.fromIso8601DurationArray=function(e,t){if(!c(e))throw new E("options is required.");if(!c(e.epoch))throw new E("options.epoch is required.");if(!c(e.iso8601Durations))throw new E("options.iso8601Durations is required.");const n=e.epoch,i=e.iso8601Durations,o=g(e.relativeToPrevious,!1),r=[];let s,a;const l=i.length;for(let u=0;u0?1:-1}),_t.signNotZero=function(e){return e<0?-1:1},_t.toSNorm=function(e,t){return t=g(t,255),Math.round((.5*_t.clamp(e,-1,1)+.5)*t)},_t.fromSNorm=function(e,t){return t=g(t,255),_t.clamp(e,0,t)/t*2-1},_t.normalize=function(e,t,n){return 0===(n=Math.max(n-t,0))?0:_t.clamp((e-t)/n,0,1)},_t.sinh=g(Math.sinh,function(t){return(Math.exp(t)-Math.exp(-t))/2}),_t.cosh=g(Math.cosh,function(t){return(Math.exp(t)+Math.exp(-t))/2}),_t.lerp=function(e,t,n){return(1-n)*e+n*t},_t.PI=Math.PI,_t.ONE_OVER_PI=1/Math.PI,_t.PI_OVER_TWO=Math.PI/2,_t.PI_OVER_THREE=Math.PI/3,_t.PI_OVER_FOUR=Math.PI/4,_t.PI_OVER_SIX=Math.PI/6,_t.THREE_PI_OVER_TWO=3*Math.PI/2,_t.TWO_PI=2*Math.PI,_t.ONE_OVER_TWO_PI=1/(2*Math.PI),_t.RADIANS_PER_DEGREE=Math.PI/180,_t.DEGREES_PER_RADIAN=180/Math.PI,_t.RADIANS_PER_ARCSECOND=_t.RADIANS_PER_DEGREE/3600,_t.toRadians=function(e){if(!c(e))throw new E("degrees is required.");return e*_t.RADIANS_PER_DEGREE},_t.toDegrees=function(e){if(!c(e))throw new E("radians is required.");return e*_t.DEGREES_PER_RADIAN},_t.convertLongitudeRange=function(e){if(!c(e))throw new E("angle is required.");const t=_t.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n},_t.clampToLatitudeRange=function(e){if(!c(e))throw new E("angle is required.");return _t.clamp(e,-1*_t.PI_OVER_TWO,_t.PI_OVER_TWO)},_t.negativePiToPi=function(e){if(!c(e))throw new E("angle is required.");return e>=-_t.PI&&e<=_t.PI?e:_t.zeroToTwoPi(e+_t.PI)-_t.PI},_t.zeroToTwoPi=function(e){if(!c(e))throw new E("angle is required.");if(e>=0&&e<=_t.TWO_PI)return e;const t=_t.mod(e,_t.TWO_PI);return Math.abs(t)<_t.EPSILON14&&Math.abs(e)>_t.EPSILON14?_t.TWO_PI:t},_t.mod=function(e,t){if(!c(e))throw new E("m is required.");if(!c(t))throw new E("n is required.");if(0===t)throw new E("divisor cannot be 0.");return _t.sign(e)===_t.sign(t)&&Math.abs(e)n},_t.greaterThanOrEquals=function(e,t,n){if(!c(e))throw new E("first is required.");if(!c(t))throw new E("second is required.");if(!c(n))throw new E("absoluteEpsilon is required.");return e-t>-n};const py=[1];_t.factorial=function(e){if("number"!=typeof e||e<0)throw new E("A number greater than or equal to 0 is required.");const t=py.length;if(e>=t){let n=py[t-1];for(let i=t;i<=e;i++){const o=n*i;py.push(o),n=o}}return py[e]},_t.incrementWrap=function(e,t,n){if(n=g(n,0),!c(e))throw new E("n is required.");if(t<=n)throw new E("maximumValue must be greater than minimumValue.");return++e>t&&(e=n),e},_t.isPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>4294967295)throw new E("A number between 0 and (2^32)-1 is required.");return 0!==e&&0==(e&e-1)},_t.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>2147483648)throw new E("A number between 0 and 2^31 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},_t.previousPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>4294967295)throw new E("A number between 0 and (2^32)-1 is required.");return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,((e|=e>>32)>>>0)-(e>>>1)},_t.clamp=function(e,t,n){return T.typeOf.number("value",e),T.typeOf.number("min",t),T.typeOf.number("max",n),en?n:e};let Uc=new hy;_t.setRandomNumberSeed=function(e){if(!c(e))throw new E("seed is required.");Uc=new hy(e)},_t.nextRandomNumber=function(){return Uc.random()},_t.randomBetween=function(e,t){return _t.nextRandomNumber()*(t-e)+e},_t.acosClamped=function(e){if(!c(e))throw new E("value is required.");return Math.acos(_t.clamp(e,-1,1))},_t.asinClamped=function(e){if(!c(e))throw new E("value is required.");return Math.asin(_t.clamp(e,-1,1))},_t.chordLength=function(e,t){if(!c(e))throw new E("angle is required.");if(!c(t))throw new E("radius is required.");return 2*t*Math.sin(.5*e)},_t.logBase=function(e,t){if(!c(e))throw new E("number is required.");if(!c(t))throw new E("base is required.");return Math.log(e)/Math.log(t)},_t.cbrt=g(Math.cbrt,function(t){const n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n}),_t.log2=g(Math.log2,function(t){return Math.log(t)*Math.LOG2E}),_t.fog=function(e,t){const n=e*t;return 1-Math.exp(-n*n)},_t.fastApproximateAtan=function(e){return T.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},_t.fastApproximateAtan2=function(e,t){T.typeOf.number("x",e),T.typeOf.number("y",t);let n,i=Math.abs(e);n=Math.abs(t);const o=Math.max(i,n);n=Math.min(i,n);const r=n/o;if(isNaN(r))throw new E("either x or y must be nonzero");return i=_t.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?_t.PI_OVER_TWO-i:i,i=e<0?_t.PI-i:i,i=t<0?-i:i,i};const O=_t;function at(e,t,n){this.x=g(e,0),this.y=g(t,0),this.z=g(n,0)}at.fromSpherical=function(e,t){T.typeOf.object("spherical",e),c(t)||(t=new at);const n=e.clock,i=e.cone,o=g(e.magnitude,1),r=o*Math.sin(i);return t.x=r*Math.cos(n),t.y=r*Math.sin(n),t.z=o*Math.cos(i),t},at.fromElements=function(e,t,n,i){return c(i)?(i.x=e,i.y=t,i.z=n,i):new at(e,t,n)},at.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new at(e.x,e.y,e.z)},at.fromCartesian4=at.clone,at.packedLength=3,at.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n]=e.z,t},at.unpack=function(e,t,n){return T.defined("array",e),t=g(t,0),c(n)||(n=new at),n.x=e[t++],n.y=e[t++],n.z=e[t],n},at.packArray=function(e,t){T.defined("array",e);const n=e.length,i=3*n;if(c(t)){if(!Array.isArray(t)&&t.length!==i)throw new E("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==i&&(t.length=i)}else t=new Array(i);for(let o=0;oO.EPSILON12);return c(o)?(o.x=r*B,o.y=s*F,o.z=a*S,o):new f(r*B,s*F,a*S)};function ir(e,t,n){this.longitude=g(e,0),this.latitude=g(t,0),this.height=g(n,0)}ir.fromRadians=function(e,t,n,i){return T.typeOf.number("longitude",e),T.typeOf.number("latitude",t),n=g(n,0),c(i)?(i.longitude=e,i.latitude=t,i.height=n,i):new ir(e,t,n)},ir.fromDegrees=function(e,t,n,i){return T.typeOf.number("longitude",e),T.typeOf.number("latitude",t),e=O.toRadians(e),t=O.toRadians(t),ir.fromRadians(e,t,n,i)};const AA=new f,TE=new f,xE=new f,ep=new f(1/6378137,1/6378137,1/6356752.314245179),Cf=new f(1/40680631590769,1/40680631590769,1/40408299984661.445),TA=O.EPSILON1;ir.fromCartesian=function(e,t,n){const i=c(t)?t.oneOverRadii:ep,o=c(t)?t.oneOverRadiiSquared:Cf,r=c(t)?t._centerToleranceSquared:TA,s=_y(e,i,o,r,TE);if(!c(s))return;let a=f.multiplyComponents(s,o,AA);a=f.normalize(a,a);const l=f.subtract(e,s,xE),u=Math.atan2(a.y,a.x),d=Math.asin(a.z),h=O.sign(f.dot(l,e))*f.magnitude(l);return c(n)?(n.longitude=u,n.latitude=d,n.height=h,n):new ir(u,d,h)},ir.toCartesian=function(e,t,n){return T.defined("cartographic",e),f.fromRadians(e.longitude,e.latitude,e.height,t,n)},ir.clone=function(e,t){if(c(e))return c(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new ir(e.longitude,e.latitude,e.height)},ir.equals=function(e,t){return e===t||c(e)&&c(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},ir.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n},ir.ZERO=Object.freeze(new ir(0,0,0)),ir.prototype.clone=function(e){return ir.clone(this,e)},ir.prototype.equals=function(e){return ir.equals(this,e)},ir.prototype.equalsEpsilon=function(e,t){return ir.equalsEpsilon(this,e,t)},ir.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};const Se=ir;function Ef(e,t,n,i){t=g(t,0),n=g(n,0),i=g(i,0),T.typeOf.number.greaterThanOrEquals("x",t,0),T.typeOf.number.greaterThanOrEquals("y",n,0),T.typeOf.number.greaterThanOrEquals("z",i,0),e._radii=new f(t,n,i),e._radiiSquared=new f(t*t,n*n,i*i),e._radiiToTheFourth=new f(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new f(0===t?0:1/t,0===n?0:1/n,0===i?0:1/i),e._oneOverRadiiSquared=new f(0===t?0:1/(t*t),0===n?0:1/(n*n),0===i?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=O.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function Ti(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,Ef(this,e,t,n)}Object.defineProperties(Ti.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}}}),Ti.clone=function(e,t){if(!c(e))return;const n=e._radii;return c(t)?(f.clone(n,t._radii),f.clone(e._radiiSquared,t._radiiSquared),f.clone(e._radiiToTheFourth,t._radiiToTheFourth),f.clone(e._oneOverRadii,t._oneOverRadii),f.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new Ti(n.x,n.y,n.z)},Ti.fromCartesian3=function(e,t){return c(t)||(t=new Ti),c(e)&&Ef(t,e.x,e.y,e.z),t},Ti.WGS84=Object.freeze(new Ti(6378137,6378137,6356752.314245179)),Ti.UNIT_SPHERE=Object.freeze(new Ti(1,1,1)),Ti.MOON=Object.freeze(new Ti(O.LUNAR_RADIUS,O.LUNAR_RADIUS,O.LUNAR_RADIUS)),Ti.prototype.clone=function(e){return Ti.clone(this,e)},Ti.packedLength=f.packedLength,Ti.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),f.pack(e._radii,t,n),t},Ti.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=f.unpack(e,t);return Ti.fromCartesian3(i,n)},Ti.prototype.geocentricSurfaceNormal=f.normalize,Ti.prototype.geodeticSurfaceNormalCartographic=function(e,t){T.typeOf.object("cartographic",e);const 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 c(t)||(t=new f),t.x=r,t.y=s,t.z=a,f.normalize(t,t)},Ti.prototype.geodeticSurfaceNormal=function(e,t){if(!f.equalsEpsilon(e,f.ZERO,O.EPSILON14))return c(t)||(t=new f),t=f.multiplyComponents(e,this._oneOverRadiiSquared,t),f.normalize(t,t)};const gy=new f,CE=new f;Ti.prototype.cartographicToCartesian=function(e,t){const n=gy,i=CE;this.geodeticSurfaceNormalCartographic(e,n),f.multiplyComponents(this._radiiSquared,n,i);const o=Math.sqrt(f.dot(n,i));return f.divideByScalar(i,o,i),f.multiplyByScalar(n,e.height,n),c(t)||(t=new f),f.add(i,n,t)},Ti.prototype.cartographicArrayToCartesianArray=function(e,t){T.defined("cartographics",e);const n=e.length;c(t)?t.length=n:t=new Array(n);for(let i=0;i=this._radii.z-t))return n};const Zm=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],tp=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function wf(e,t,n){T.typeOf.number("a",e),T.typeOf.number("b",t),T.typeOf.func("func",n);const i=.5*(t+e),o=.5*(t-e);let r=0;for(let s=0;s<5;s++){const a=o*Zm[s];r+=tp[s]*(n(i+a)+n(i-a))}return r*=o,r}Ti.prototype.surfaceArea=function(e){T.typeOf.object("rectangle",e);const t=e.west;let n=e.east;const i=e.south,o=e.north;for(;n=0?d.longitude:d.longitude+O.TWO_PI;o=Math.min(o,h),r=Math.max(r,h)}return i-n>r-o&&(n=o,i=r,i>O.PI&&(i-=O.TWO_PI),n>O.PI&&(n-=O.TWO_PI)),c(t)?(t.west=n,t.south=s,t.east=i,t.north=a,t):new Bn(n,s,i,a)},Bn.fromCartesianArray=function(e,t,n){T.defined("cartesians",e),t=g(t,ge.WGS84);let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,l=-Number.MAX_VALUE;for(let u=0,d=e.length;u=0?h.longitude:h.longitude+O.TWO_PI;r=Math.min(r,m),s=Math.max(s,m)}return o-i>s-r&&(i=r,o=s,o>O.PI&&(o-=O.TWO_PI),i>O.PI&&(i-=O.TWO_PI)),c(n)?(n.west=i,n.south=a,n.east=o,n.north=l,n):new Bn(i,a,o,l)},Bn.clone=function(e,t){if(c(e))return c(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new Bn(e.west,e.south,e.east,e.north)},Bn.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e.west-t.west)<=n&&Math.abs(e.south-t.south)<=n&&Math.abs(e.east-t.east)<=n&&Math.abs(e.north-t.north)<=n},Bn.prototype.clone=function(e){return Bn.clone(this,e)},Bn.prototype.equals=function(e){return Bn.equals(this,e)},Bn.equals=function(e,t){return e===t||c(e)&&c(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},Bn.prototype.equalsEpsilon=function(e,t){return Bn.equalsEpsilon(this,e,t)},Bn.validate=function(e){T.typeOf.object("rectangle",e);const t=e.north;T.typeOf.number.greaterThanOrEquals("north",t,-O.PI_OVER_TWO),T.typeOf.number.lessThanOrEquals("north",t,O.PI_OVER_TWO);const n=e.south;T.typeOf.number.greaterThanOrEquals("south",n,-O.PI_OVER_TWO),T.typeOf.number.lessThanOrEquals("south",n,O.PI_OVER_TWO);const i=e.west;T.typeOf.number.greaterThanOrEquals("west",i,-Math.PI),T.typeOf.number.lessThanOrEquals("west",i,Math.PI);const o=e.east;T.typeOf.number.greaterThanOrEquals("east",o,-Math.PI),T.typeOf.number.lessThanOrEquals("east",o,Math.PI)},Bn.southwest=function(e,t){return T.typeOf.object("rectangle",e),c(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new Se(e.west,e.south)},Bn.northwest=function(e,t){return T.typeOf.object("rectangle",e),c(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new Se(e.west,e.north)},Bn.northeast=function(e,t){return T.typeOf.object("rectangle",e),c(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new Se(e.east,e.north)},Bn.southeast=function(e,t){return T.typeOf.object("rectangle",e),c(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new Se(e.east,e.south)},Bn.center=function(e,t){T.typeOf.object("rectangle",e);let n=e.east;const i=e.west;n0?i+=O.TWO_PI:r0&&(r+=O.TWO_PI),i=d?void 0:c(n)?(n.west=a,n.south=u,n.east=l,n.north=d,n):new Bn(a,u,l,d)},Bn.simpleIntersection=function(e,t,n){T.typeOf.object("rectangle",e),T.typeOf.object("otherRectangle",t);const 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 c(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new Bn(i,o,r,s)},Bn.union=function(e,t,n){T.typeOf.object("rectangle",e),T.typeOf.object("otherRectangle",t),c(n)||(n=new Bn);let i=e.east,o=e.west,r=t.east,s=t.west;i0?i+=O.TWO_PI:r0&&(r+=O.TWO_PI),io||O.equalsEpsilon(n,o,O.EPSILON14))&&(n=e.south&&i<=e.north};const wE=new Se;Bn.subsample=function(e,t,n,i){T.typeOf.object("rectangle",e),t=g(t,ge.WGS84),n=g(n,0),c(i)||(i=[]);let o=0;const r=e.north,s=e.south,a=e.east,l=e.west,u=wE;u.height=n,u.longitude=l,u.latitude=r,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.latitude=s,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=l,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.latitude=r<0?r:s>0?s:0;for(let d=1;d<8;++d)u.longitude=-Math.PI+d*O.PI_OVER_TWO,Bn.contains(e,u)&&(i[o]=t.cartographicToCartesian(u,i[o]),o++);return 0===u.latitude&&(u.longitude=l,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++),i.length=o,i},Bn.subsection=function(e,t,n,i,o,r){if(T.typeOf.object("rectangle",e),T.typeOf.number.greaterThanOrEquals("westLerp",t,0),T.typeOf.number.lessThanOrEquals("westLerp",t,1),T.typeOf.number.greaterThanOrEquals("southLerp",n,0),T.typeOf.number.lessThanOrEquals("southLerp",n,1),T.typeOf.number.greaterThanOrEquals("eastLerp",i,0),T.typeOf.number.lessThanOrEquals("eastLerp",i,1),T.typeOf.number.greaterThanOrEquals("northLerp",o,0),T.typeOf.number.lessThanOrEquals("northLerp",o,1),T.typeOf.number.lessThanOrEquals("westLerp",t,i),T.typeOf.number.lessThanOrEquals("southLerp",n,o),c(r)||(r=new Bn),e.west<=e.east){const a=e.east-e.west;r.west=e.west+t*a,r.east=e.west+i*a}else{const a=O.TWO_PI+e.east-e.west;r.west=O.negativePiToPi(e.west+t*a),r.east=O.negativePiToPi(e.west+i*a)}const s=e.north-e.south;return r.south=e.south+n*s,r.north=e.south+o*s,1===t&&(r.west=e.east),1===i&&(r.east=e.east),1===n&&(r.south=e.north),1===o&&(r.north=e.north),r},Bn.MAX_VALUE=Object.freeze(new Bn(-Math.PI,-O.PI_OVER_TWO,Math.PI,O.PI_OVER_TWO));const Ce=Bn;function Wt(e,t){this.x=g(e,0),this.y=g(t,0)}Wt.fromElements=function(e,t,n){return c(n)?(n.x=e,n.y=t,n):new Wt(e,t)},Wt.clone=function(e,t){if(c(e))return c(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 T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),t[n++]=e.x,t[n]=e.y,t},Wt.unpack=function(e,t,n){return T.defined("array",e),t=g(t,0),c(n)||(n=new Wt),n.x=e[t++],n.y=e[t],n},Wt.packArray=function(e,t){T.defined("array",e);const n=e.length,i=2*n;if(c(t)){if(!Array.isArray(t)&&t.length!==i)throw new E("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==i&&(t.length=i)}else t=new Array(i);for(let o=0;oi&&(o=u,i=d)}let r=1,s=0;const a=An[o],l=ro[o];if(Math.abs(e[ct.getElementIndex(l,a)])>n){const m=(e[ct.getElementIndex(l,l)]-e[ct.getElementIndex(a,a)])/2/e[ct.getElementIndex(l,a)];let _;_=m<0?-1/(-m+Math.sqrt(1+m*m)):1/(m+Math.sqrt(1+m*m)),r=1/Math.sqrt(1+_*_),s=_*r}return(t=ct.clone(ct.IDENTITY,t))[ct.getElementIndex(a,a)]=t[ct.getElementIndex(l,l)]=r,t[ct.getElementIndex(l,a)]=s,t[ct.getElementIndex(a,l)]=-s,t}const ss=new ct,yd=new ct;ct.computeEigenDecomposition=function(e,t){T.typeOf.object("matrix",e);const n=O.EPSILON20;let o=0,r=0;c(t)||(t={});const s=t.unitary=ct.clone(ct.IDENTITY,t.unitary),a=t.diagonal=ct.clone(e,t.diagonal),l=n*function Ht(e){let t=0;for(let n=0;n<9;++n){const i=e[n];t+=i*i}return Math.sqrt(t)}(a);for(;r<10&&Ts(a)>l;)xs(a,ss),ct.transpose(ss,yd),ct.multiply(a,ss,a),ct.multiply(yd,a,a),ct.multiply(s,ss,s),++o>2&&(++r,o=0);return t},ct.abs=function(e,t){return T.typeOf.object("matrix",e),T.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},ct.determinant=function(e){T.typeOf.object("matrix",e);const n=e[3],i=e[6],r=e[4],s=e[7],l=e[5],u=e[8];return e[0]*(r*u-l*s)+e[1]*(l*i-n*u)+e[2]*(n*s-r*i)},ct.inverse=function(e,t){T.typeOf.object("matrix",e),T.typeOf.object("result",t);const n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],u=e[7],d=e[8],h=ct.determinant(e);if(Math.abs(h)<=O.EPSILON15)throw new E("matrix is not invertible");return t[0]=s*d-u*a,t[1]=u*o-i*d,t[2]=i*a-s*o,t[3]=l*a-r*d,t[4]=n*d-l*o,t[5]=r*o-n*a,t[6]=r*u-l*s,t[7]=l*i-n*u,t[8]=n*s-r*i,ct.multiplyByScalar(t,1/h,t)};const Jm=new ct;ct.inverseTranspose=function(e,t){return T.typeOf.object("matrix",e),T.typeOf.object("result",t),ct.inverse(ct.transpose(e,Jm),t)},ct.equals=function(e,t){return e===t||c(e)&&c(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]},ct.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(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},ct.IDENTITY=Object.freeze(new ct(1,0,0,0,1,0,0,0,1)),ct.ZERO=Object.freeze(new ct(0,0,0,0,0,0,0,0,0)),ct.COLUMN0ROW0=0,ct.COLUMN0ROW1=1,ct.COLUMN0ROW2=2,ct.COLUMN1ROW0=3,ct.COLUMN1ROW1=4,ct.COLUMN1ROW2=5,ct.COLUMN2ROW0=6,ct.COLUMN2ROW1=7,ct.COLUMN2ROW2=8,Object.defineProperties(ct.prototype,{length:{get:function(){return ct.packedLength}}}),ct.prototype.clone=function(e){return ct.clone(this,e)},ct.prototype.equals=function(e){return ct.equals(this,e)},ct.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]},ct.prototype.equalsEpsilon=function(e,t){return ct.equalsEpsilon(this,e,t)},ct.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`};const ne=ct;function np(e){let t;this.name="RuntimeError",this.message=e;try{throw new Error}catch(n){t=n.stack}this.stack=t}c(Object.create)&&((np.prototype=Object.create(Error.prototype)).constructor=np),np.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return c(this.stack)&&(e+=`\n${this.stack.toString()}`),e};const Ie=np;function lt(e,t,n,i,o,r,s,a,l,u,d,h,m,_,p,y){this[0]=g(e,0),this[1]=g(o,0),this[2]=g(l,0),this[3]=g(m,0),this[4]=g(t,0),this[5]=g(r,0),this[6]=g(u,0),this[7]=g(_,0),this[8]=g(n,0),this[9]=g(s,0),this[10]=g(d,0),this[11]=g(p,0),this[12]=g(i,0),this[13]=g(a,0),this[14]=g(h,0),this[15]=g(y,0)}lt.packedLength=16,lt.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[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},lt.unpack=function(e,t,n){return T.defined("array",e),t=g(t,0),c(n)||(n=new lt),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},lt.packArray=function(e,t){T.defined("array",e);const n=e.length,i=16*n;if(c(t)){if(!Array.isArray(t)&&t.length!==i)throw new E("If result is a typed array, it must have exactly array.length * 16 elements");t.length!==i&&(t.length=i)}else t=new Array(i);for(let o=0;oO.EPSILON6)throw new E("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){const o=n.x,r=n.y;n.x=(1-Math.abs(r))*O.signNotZero(o),n.y=(1-Math.abs(o))*O.signNotZero(r)}return n.x=O.toSNorm(n.x,t),n.y=O.toSNorm(n.y,t),n},octEncode:function(e,t){return so.octEncodeInRange(e,255,t)}},DA=new G,aU=new Uint8Array(1);function RE(e){return aU[0]=e,aU[0]}so.octEncodeToCartesian4=function(e,t){return so.octEncodeInRange(e,65535,DA),t.x=RE(DA.x*rU),t.y=RE(DA.x),t.z=RE(DA.y*rU),t.w=RE(DA.y),t},so.octDecodeInRange=function(e,t,n,i){if(T.defined("result",i),e<0||e>n||t<0||t>n)throw new E(`x and y must be unsigned normalized integers between 0 and ${n}`);if(i.x=O.fromSNorm(e,n),i.y=O.fromSNorm(t,n),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){const o=i.x;i.x=(1-Math.abs(i.y))*O.signNotZero(o),i.y=(1-Math.abs(o))*O.signNotZero(i.y)}return f.normalize(i,i)},so.octDecode=function(e,t,n){return so.octDecodeInRange(e,t,255,n)},so.octDecodeFromCartesian4=function(e,t){T.typeOf.object("encoded",e),T.typeOf.object("result",t);const n=e.x,i=e.y,o=e.z,r=e.w;if(n<0||n>255||i<0||i>255||o<0||o>255||r<0||r>255)throw new E("x, y, z, and w must be unsigned normalized integers between 0 and 255");return so.octDecodeInRange(256*n+i,256*o+r,65535,t)},so.octPackFloat=function(e){return T.defined("encoded",e),256*e.x+e.y};const F1=new G;function B1(e){return e>>1^-(1&e)}so.octEncodeFloat=function(e){return so.octEncode(e,F1),so.octPackFloat(F1)},so.octDecodeFloat=function(e,t){T.defined("value",e);const n=e/256,i=Math.floor(n);return so.octDecode(i,256*(n-i),t)},so.octPack=function(e,t,n,i){T.defined("v1",e),T.defined("v2",t),T.defined("v3",n),T.defined("result",i);const o=so.octEncodeFloat(e),r=so.octEncodeFloat(t),s=so.octEncode(n,F1);return i.x=65536*s.x+o,i.y=65536*s.y+r,i},so.octUnpack=function(e,t,n,i){T.defined("packed",e),T.defined("v1",t),T.defined("v2",n),T.defined("v3",i);let o=e.x/65536;const r=Math.floor(o),s=65536*(o-r);o=e.y/65536;const a=Math.floor(o),l=65536*(o-a);so.octDecodeFloat(s,t),so.octDecodeFloat(l,n),so.octDecode(r,a,i)},so.compressTextureCoordinates=function(e){return T.defined("textureCoordinates",e),4096*(4095*e.x|0)+(4095*e.y|0)},so.decompressTextureCoordinates=function(e,t){T.defined("compressed",e),T.defined("result",t);const i=Math.floor(e/4096);return t.x=i/4095,t.y=(e-4096*i)/4095,t},so.zigZagDeltaDecode=function(e,t,n){T.defined("uBuffer",e),T.defined("vBuffer",t),T.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),c(n)&&T.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,n.length);const i=e.length;let o=0,r=0,s=0;for(let a=0;a>5&63,m=31&u,_=3*l;t[_]=(u>>11)*s,t[_+1]=.015873015873015872*h,t[_+2]=m*s}return t};const Fi=so;function NE(e){this._ellipsoid=g(e,ge.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(NE.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),NE.prototype.project=function(e,t){const n=this._semimajorAxis,i=e.longitude*n,o=e.latitude*n,r=e.height;return c(t)?(t.x=i,t.y=o,t.z=r,t):new f(i,o,r)},NE.prototype.unproject=function(e,t){if(!c(e))throw new E("cartesian is required");const n=this._oneOverSemimajorAxis,i=e.x*n,o=e.y*n,r=e.z;return c(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new Se(i,o,r)};const Yr=NE,Qn=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1}),ip=function Qie(e,t){this.start=g(e,0),this.stop=g(t,0)};function En(e,t){this.center=f.clone(g(e,f.ZERO)),this.radius=g(t,0)}const k1=new f,U1=new f,z1=new f,V1=new f,H1=new f,G1=new f,j1=new f,Cs=new f,W1=new f,q1=new f,Y1=new f,X1=new f,Jie=4/3*O.PI;En.fromPoints=function(e,t){if(c(t)||(t=new En),!c(e)||0===e.length)return t.center=f.clone(f.ZERO,t.center),t.radius=0,t;const n=f.clone(e[0],j1),i=f.clone(n,k1),o=f.clone(n,U1),r=f.clone(n,z1),s=f.clone(n,V1),a=f.clone(n,H1),l=f.clone(n,G1),u=e.length;let d;for(d=1;ds.x&&f.clone(n,s),Ba.y&&f.clone(n,a),Fl.z&&f.clone(n,l)}const h=f.magnitudeSquared(f.subtract(s,i,Cs)),m=f.magnitudeSquared(f.subtract(a,o,Cs)),_=f.magnitudeSquared(f.subtract(l,r,Cs));let p=i,y=s,A=h;m>A&&(A=m,p=o,y=a),_>A&&(A=_,p=r,y=l);const x=W1;x.x=.5*(p.x+y.x),x.y=.5*(p.y+y.y),x.z=.5*(p.z+y.z);let C=f.magnitudeSquared(f.subtract(y,x,Cs)),w=Math.sqrt(C);const v=q1;v.x=i.x,v.y=o.y,v.z=r.z;const D=Y1;D.x=s.x,D.y=a.y,D.z=l.z;const P=f.midpoint(v,D,X1);let N=0;for(d=0;dN&&(N=R);const B=f.magnitudeSquared(f.subtract(n,x,Cs));if(B>C){const F=Math.sqrt(B);w=.5*(w+F),C=w*w;const S=F-w;x.x=(w*x.x+S*n.x)/F,x.y=(w*x.y+S*n.y)/F,x.z=(w*x.z+S*n.z)/F}}return wl.x&&f.clone(o,l),Su.y&&f.clone(o,u),Id.z&&f.clone(o,d)}const _=f.magnitudeSquared(f.subtract(l,r,Cs)),p=f.magnitudeSquared(f.subtract(u,s,Cs)),y=f.magnitudeSquared(f.subtract(d,a,Cs));let A=r,x=l,C=_;p>C&&(C=p,A=s,x=u),y>C&&(C=y,A=a,x=d);const w=W1;w.x=.5*(A.x+x.x),w.y=.5*(A.y+x.y),w.z=.5*(A.z+x.z);let v=f.magnitudeSquared(f.subtract(x,w,Cs)),D=Math.sqrt(v);const P=q1;P.x=r.x,P.y=s.y,P.z=a.z;const N=Y1;N.x=l.x,N.y=u.y,N.z=d.z;const R=f.midpoint(P,N,X1);let B=0;for(m=0;mB&&(B=F);const S=f.magnitudeSquared(f.subtract(o,w,Cs));if(S>v){const I=Math.sqrt(S);D=.5*(D+I),v=D*D;const L=I-D;w.x=(D*w.x+L*o.x)/I,w.y=(D*w.y+L*o.y)/I,w.z=(D*w.z+L*o.z)/I}}return Da.x&&f.clone(i,a),Fl.y&&f.clone(i,l),Su.z&&f.clone(i,u)}const m=f.magnitudeSquared(f.subtract(a,o,Cs)),_=f.magnitudeSquared(f.subtract(l,r,Cs)),p=f.magnitudeSquared(f.subtract(u,s,Cs));let y=o,A=a,x=m;_>x&&(x=_,y=r,A=l),p>x&&(x=p,y=s,A=u);const C=W1;C.x=.5*(y.x+A.x),C.y=.5*(y.y+A.y),C.z=.5*(y.z+A.z);let w=f.magnitudeSquared(f.subtract(A,C,Cs)),v=Math.sqrt(w);const D=q1;D.x=o.x,D.y=r.y,D.z=s.z;const P=Y1;P.x=a.x,P.y=l.y,P.z=u.z;const N=f.midpoint(D,P,X1);let R=0;for(h=0;hR&&(R=B);const F=f.magnitudeSquared(f.subtract(i,C,Cs));if(F>w){const S=Math.sqrt(F);v=.5*(v+S),w=v*v;const I=S-v;C.x=(v*C.x+I*i.x)/S,C.y=(v*C.y+I*i.y)/S,C.z=(v*C.z+I*i.z)/S}}return v=l+s)return e.clone(n),n;if(s>=l+o)return t.clone(n),n;const u=.5*(o+l+s),d=f.multiplyByScalar(a,(-o+u)/l,doe);return f.add(d,i,d),f.clone(d,n.center),n.radius=u,n};const foe=new f;En.expand=function(e,t,n){T.typeOf.object("sphere",e),T.typeOf.object("point",t),n=En.clone(e,n);const i=f.magnitude(f.subtract(t,n.center,foe));return i>n.radius&&(n.radius=i),n},En.intersectPlane=function(e,t){T.typeOf.object("sphere",e),T.typeOf.object("plane",t);const i=e.radius,r=f.dot(t.normal,e.center)+t.distance;return r<-i?Qn.OUTSIDE:r=o&&(u=o-1);let d=(i.north-e.latitude)/(i.height/r)|0;return d>=r&&(d=r-1),c(n)?(n.x=u,n.y=d,n):new G(u,d)};const Ad=op;function dc(e){this._ellipsoid=g(e,ge.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(dc.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),dc.mercatorAngleToGeodeticLatitude=function(e){return O.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},dc.geodeticLatitudeToMercatorAngle=function(e){e>dc.MaximumLatitude?e=dc.MaximumLatitude:e<-dc.MaximumLatitude&&(e=-dc.MaximumLatitude);const t=Math.sin(e);return.5*Math.log((1+t)/(1-t))},dc.MaximumLatitude=dc.mercatorAngleToGeodeticLatitude(Math.PI),dc.prototype.project=function(e,t){const n=this._semimajorAxis,i=e.longitude*n,o=dc.geodeticLatitudeToMercatorAngle(e.latitude)*n,r=e.height;return c(t)?(t.x=i,t.y=o,t.z=r,t):new f(i,o,r)},dc.prototype.unproject=function(e,t){if(!c(e))throw new E("cartesian is required");const n=this._oneOverSemimajorAxis,i=e.x*n,o=dc.mercatorAngleToGeodeticLatitude(e.y*n),r=e.z;return c(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new Se(i,o,r)};const or=dc;function rp(e){if(e=g(e,g.EMPTY_OBJECT),this._ellipsoid=g(e.ellipsoid,ge.WGS84),this._numberOfLevelZeroTilesX=g(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=g(e.numberOfLevelZeroTilesY,1),this._projection=new or(this._ellipsoid),c(e.rectangleSouthwestInMeters)&&c(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{const i=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new G(-i,-i),this._rectangleNortheastInMeters=new G(i,i)}const 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(rp.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),rp.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<=o&&(p=o-1);let y=(this._rectangleNortheastInMeters.y-h.y)/u|0;return y>=r&&(y=r-1),c(n)?(n.x=p,n.y=y,n):new G(p,y)};const Td=rp;function sp(e,t,n){if(!c(e))throw new E("uint8Array is required.");if(t<0)throw new E("byteOffset cannot be negative.");if(n<0)throw new E("byteLength cannot be negative.");if(t+n>e.byteLength)throw new E("sub-region exceeds array bounds.");return t=g(t,0),n=g(n,e.byteLength-t),e=e.subarray(t,t+n),sp.decode(e)}function IA(e,t,n){return t<=e&&e<=n}sp.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)},sp.decodeWithFromCharCode=function(e){let t="";const n=function Coe(e){let t=0,n=0,i=0,o=128,r=191;const s=[],a=e.length;for(let l=0;l>10),56320+(1023&r)))}return t},sp.decode=typeof TextDecoder<"u"?sp.decodeWithTextDecoder:sp.decodeWithFromCharCode;const Ty=sp,fc=function Eoe(e,t,n){return JSON.parse(Ty(e,t,n))},ME=Object.freeze({NONE:0,LERC:1});function Ha(e,t,n){this.minimum=f.clone(g(e,f.ZERO)),this.maximum=f.clone(g(t,f.ZERO)),n=c(n)?f.clone(n):f.midpoint(this.minimum,this.maximum,new f),this.center=n}Ha.fromCorners=function(e,t,n){return T.defined("minimum",e),T.defined("maximum",t),c(n)||(n=new Ha),n.minimum=f.clone(e,n.minimum),n.maximum=f.clone(t,n.maximum),n.center=f.midpoint(e,t,n.center),n},Ha.fromPoints=function(e,t){if(c(t)||(t=new Ha),!c(e)||0===e.length)return t.minimum=f.clone(f.ZERO,t.minimum),t.maximum=f.clone(f.ZERO,t.maximum),t.center=f.clone(f.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;const l=e.length;for(let h=1;h0?Qn.INSIDE:r+o<0?Qn.OUTSIDE:Qn.INTERSECTING},Ha.prototype.clone=function(e){return Ha.clone(this,e)},Ha.prototype.intersectPlane=function(e){return Ha.intersectPlane(this,e)},Ha.prototype.equals=function(e){return Ha.equals(this,e)};const Q1=Ha;function xd(e,t){T.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=new f,this._cameraPositionInScaledSpace=new f,this._distanceToLimbInScaledSpaceSquared=0,c(t)&&(this.cameraPosition=t)}Object.defineProperties(xd.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){const n=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=f.magnitudeSquared(n)-1;f.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});const uU=new f;xd.prototype.isPointVisible=function(e){return J1(this._ellipsoid.transformPositionToScaledSpace(e,uU),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},xd.prototype.isScaledSpacePointVisible=function(e){return J1(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};const woe=new f;xd.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){const n=this._ellipsoid;let i,o;return c(t)&&t<0&&n.minimumRadius>-t?(o=woe,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),J1(e,o,i)},xd.prototype.computeHorizonCullingPoint=function(e,t,n){return hU(this._ellipsoid,e,t,n)};const dU=ge.clone(ge.UNIT_SPHERE);xd.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){return hU(fU(this._ellipsoid,n,dU),e,t,i)},xd.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return pU(this._ellipsoid,e,t,n,i,o)},xd.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){return pU(fU(this._ellipsoid,o,dU),e,t,n,i,r)};const Soe=[];xd.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){T.typeOf.object("rectangle",e);const i=Ce.subsample(e,t,0,Soe),o=be.fromPoints(i);if(!(f.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};const voe=new f;function fU(e,t,n){if(c(t)&&t<0&&e.minimumRadius>-t){const i=f.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,voe);e=ge.fromCartesian3(i,n)}return e}function hU(e,t,n,i){T.typeOf.object("directionToPoint",t),T.defined("positions",n),c(i)||(i=new f);const o=gU(e,t);let r=0;for(let s=0,a=n.length;s0:s>o&&s*s/f.magnitudeSquared(r)>o)}const Doe=new f,Ioe=new f;function mU(e,t,n){const i=e.transformPositionToScaledSpace(t,Doe);let o=f.magnitudeSquared(i),r=Math.sqrt(o);const s=f.divideByScalar(i,r,Ioe);o=Math.max(1,o),r=Math.max(1,r);const u=1/r;return 1/(f.dot(s,n)*u-f.magnitude(f.cross(s,n,s))*(Math.sqrt(o-1)*u))}function _U(e,t,n){if(!(t<=0||t===1/0||t!=t))return f.multiplyByScalar(e,t,n)}const eP=new f;function gU(e,t){return f.equals(t,f.ZERO)?t:(e.transformPositionToScaledSpace(t,eP),f.normalize(eP,eP))}const tP=xd,nP={};function yU(e,t,n){const i=e+t;return O.sign(e)!==O.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))u&&u/l0?[a/e,n/a]:[n/a,a/e]};const If=nP,iP={};function oP(e,t,n,i){const o=e,r=t/3,s=n/3,a=i,l=o*s,u=r*a,d=r*r,h=s*s,m=o*s-d,_=o*a-r*s,p=r*a-h,y=4*m*p-_*_;let A,x;if(y<0){let $,Z,ie;d*u>=l*h?($=o,Z=m,ie=-2*r*m+o*_):($=a,Z=p,ie=-a*_+2*s*p);const Q=-(ie<0?-1:1)*Math.abs($)*Math.sqrt(-y);x=-ie+Q;const K=x/2,me=K<0?-Math.pow(-K,1/3):Math.pow(K,1/3),we=x===Q?-me:-Z/me;return A=Z<=0?me+we:-ie/(me*me+we*we+Z),d*u>=l*h?[(A-r)/o]:[-a/(A+s)]}const C=m,w=-2*r*m+o*_,v=p,D=-a*_+2*s*p,P=Math.sqrt(y),N=Math.sqrt(3)/2;let R=Math.abs(Math.atan2(o*P,-w)/3);A=2*Math.sqrt(-C);let B=Math.cos(R);x=A*B;let F=A*(-B/2-N*Math.sin(R));const S=x+F>2*r?x-r:F-r,I=o,L=S/I;R=Math.abs(Math.atan2(a*P,-D)/3),A=2*Math.sqrt(-v),B=Math.cos(R),x=A*B,F=A*(-B/2-N*Math.sin(R));const M=-a,U=x+F<2*s?x+s:F+s,z=M/U,W=-S*U-I*M,V=(s*W-r*(S*M))/(-r*W+s*(I*U));return L<=V?L<=z?V<=z?[L,V,z]:[L,z,V]:[z,L,V]:L<=z?[V,L,z]:V<=z?[V,z,L]:[z,V,L]}iP.computeDiscriminant=function(e,t,n,i){if("number"!=typeof e)throw new E("a is a required number.");if("number"!=typeof t)throw new E("b is a required number.");if("number"!=typeof n)throw new E("c is a required number.");if("number"!=typeof i)throw new E("d is a required number.");const r=t*t,s=n*n;return 18*e*t*n*i+r*s-e*e*27*(i*i)-4*(e*s*n+r*t*i)},iP.computeRealRoots=function(e,t,n,i){if("number"!=typeof e)throw new E("a is a required number.");if("number"!=typeof t)throw new E("b is a required number.");if("number"!=typeof n)throw new E("c is a required number.");if("number"!=typeof i)throw new E("d is a required number.");let o,r;if(0===e)return If.computeRealRoots(t,n,i);if(0===t){if(0===n){if(0===i)return[0,0,0];r=-i/e;const s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}return 0===i?(o=If.computeRealRoots(e,0,n),0===o.Length?[0]:[o[0],0,o[1]]):oP(e,0,n,i)}return 0===n?0===i?(r=-t/e,r<0?[r,0,0]:[0,0,r]):oP(e,t,0,i):0===i?(o=If.computeRealRoots(e,t,n),0===o.length?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]):oP(e,t,n,i)};const rP=iP,sP={};sP.computeDiscriminant=function(e,t,n,i,o){if("number"!=typeof e)throw new E("a is a required number.");if("number"!=typeof t)throw new E("b is a required number.");if("number"!=typeof n)throw new E("c is a required number.");if("number"!=typeof i)throw new E("d is a required number.");if("number"!=typeof o)throw new E("e is a required number.");const r=e*e,a=t*t,l=a*t,u=n*n,d=u*n,h=i*i,m=h*i,_=o*o;return a*u*h-4*l*m-4*e*d*h+18*e*t*n*m-27*r*h*h+r*e*256*(_*o)+o*(18*l*n*i-4*a*d+16*e*u*u-80*e*t*u*i-6*e*a*h+144*r*n*h)+_*(144*e*a*n-27*a*a-128*r*u-192*r*t*i)},sP.computeRealRoots=function(e,t,n,i,o){if("number"!=typeof e)throw new E("a is a required number.");if("number"!=typeof t)throw new E("b is a required number.");if("number"!=typeof n)throw new E("c is a required number.");if("number"!=typeof i)throw new E("d is a required number.");if("number"!=typeof o)throw new E("e is a required number.");if(Math.abs(e)0){const u=-e/4,d=l[l.length-1];if(Math.abs(d)=0&&_>=0){const y=Math.sqrt(m),A=Math.sqrt(_);return[u-A,u-y,u+y,u+A]}if(m>=0&&_<0)return p=Math.sqrt(m),[u-p,u+p];if(m<0&&_>=0)return p=Math.sqrt(_),[u-p,u+p]}return[]}if(d>0){const h=Math.sqrt(d),_=(r+d+s/h)/2,p=If.computeRealRoots(1,h,(r+d-s/h)/2),y=If.computeRealRoots(1,-h,_);return 0!==p.length?(p[0]+=u,p[1]+=u,0!==y.length?(y[0]+=u,y[1]+=u,p[1]<=y[0]?[p[0],p[1],y[0],y[1]]:y[1]<=p[0]?[y[0],y[1],p[0],p[1]]:p[0]>=y[0]&&p[1]<=y[1]?[y[0],p[0],p[1],y[1]]:y[0]>=p[0]&&y[1]<=p[1]?[p[0],y[0],y[1],p[1]]:p[0]>y[0]&&p[0]0){const h=d[0],m=t-h,_=m*m,p=e/2,y=m/2,A=_-4*i,x=_+4*Math.abs(i),C=s-4*h,w=s+4*Math.abs(h);let v,D,P,N,R,B;if(h<0||A*w=S[0]&&F[1]<=S[1]?[S[0],F[0],F[1],S[1]]:S[0]>=F[0]&&S[1]<=F[1]?[F[0],S[0],S[1],F[1]]:F[0]>S[0]&&F[0]d)||(m=f.cross(h,a,TU),p=f.dot(s,m),p<0||_+p>d))return;y=f.dot(l,m)/d}else{if(Math.abs(d)1||(m=f.cross(h,a,TU),p=f.dot(s,m)*A,p<0||_+p>1))return;y=f.dot(l,m)*A}return y},qo.rayTriangle=function(e,t,n,i,o,r){const s=qo.rayTriangleParametric(e,t,n,i,o);if(c(s)&&!(s<0))return c(r)||(r=new f),f.multiplyByScalar(e.direction,s,r),f.add(e.origin,r,r)};const Roe=new fi;qo.lineSegmentTriangle=function(e,t,n,i,o,r,s){if(!c(e))throw new E("v0 is required.");if(!c(t))throw new E("v1 is required.");if(!c(n))throw new E("p0 is required.");if(!c(i))throw new E("p1 is required.");if(!c(o))throw new E("p2 is required.");const a=Roe;f.clone(e,a.origin),f.subtract(t,e,a.direction),f.normalize(a.direction,a.direction);const l=qo.rayTriangleParametric(a,n,i,o,r);if(!(!c(l)||l<0||l>f.distance(e,t)))return c(s)||(s=new f),f.multiplyByScalar(a.direction,l,s),f.add(a.origin,s,s)};const Moe={root0:0,root1:0};function xU(e,t,n){c(n)||(n=new ip);const o=e.direction,s=t.radius*t.radius,a=f.subtract(e.origin,t.center,bU),h=function Noe(e,t,n,i){const o=t*t-4*e*n;if(o<0)return;if(o>0){const s=1/(2*e),a=Math.sqrt(o),l=(-t+a)*s,u=(-t-a)*s;return ls))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};const Boe=new f,koe=new f;function e_(e,t,n){const i=e+t;return O.sign(e)!==O.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))1){if(s>=0)return;const m=s*s;if(a=r-1,l=f.magnitudeSquared(o),u=l*a,mu){d=s*s-u,h=-s+Math.sqrt(d);const p=h/l,y=a/h;return p=0)return n}const o=c(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,aP),s=f.normalize(r,r),a=f.mostOrthogonalAxis(r,UE),l=f.normalize(f.cross(a,s,CU),CU),u=f.normalize(f.cross(s,l,EU),EU),d=Voe;d[0]=s.x,d[1]=s.y,d[2]=s.z,d[3]=l.x,d[4]=l.y,d[5]=l.z,d[6]=u.x,d[7]=u.y,d[8]=u.z;const h=ne.transpose(d,Hoe),m=ne.fromScale(t.radii,Goe),_=ne.fromScale(t.oneOverRadii,joe),p=Woe;p[0]=0,p[1]=-i.z,p[2]=i.y,p[3]=i.z,p[4]=0,p[5]=-i.x,p[6]=-i.y,p[7]=i.x,p[8]=0;const y=ne.multiply(ne.multiply(h,_,wU),p,wU),A=ne.multiply(ne.multiply(y,m,SU),d,SU),x=ne.multiplyByVector(y,n,zoe),C=function Uoe(e,t,n,i,o){const r=i*i,s=o*o,a=(e[ne.COLUMN1ROW1]-e[ne.COLUMN2ROW2])*s,l=o*(i*e_(e[ne.COLUMN1ROW0],e[ne.COLUMN0ROW1],O.EPSILON15)+t.y),u=e[ne.COLUMN0ROW0]*r+e[ne.COLUMN2ROW2]*s+i*t.x+n,d=s*e_(e[ne.COLUMN2ROW1],e[ne.COLUMN1ROW2],O.EPSILON15),h=o*(i*e_(e[ne.COLUMN2ROW0],e[ne.COLUMN0ROW2])+t.z);let m;const _=[];if(0===h&&0===d){if(m=If.computeRealRoots(a,l,u),0===m.length)return _;const R=m[0],B=Math.sqrt(Math.max(1-R*R,0));if(_.push(new f(i,o*R,o*-B)),_.push(new f(i,o*R,o*B)),2===m.length){const F=m[1],S=Math.sqrt(Math.max(1-F*F,0));_.push(new f(i,o*F,o*-S)),_.push(new f(i,o*F,o*S))}return _}const p=h*h,y=d*d,x=h*d,C=a*a+y,w=2*(l*a+x),v=2*u*a+l*l-y+p,D=2*(u*l-x);if(0===C&&0===w&&0===v&&0===D)return _;m=Poe.computeRealRoots(C,w,v,D,u*u-p);const N=m.length;if(0===N)return _;for(let R=0;R0?_.push(new f(i,o*B,o*-I)):0!==I?(_.push(new f(i,o*B,o*-I)),_.push(new f(i,o*B,o*I)),++R):_.push(new f(i,o*B,o*I))}return _}(A,f.negate(x,aP),0,0,1);let w,v;const D=C.length;if(D>0){let P=f.clone(f.ZERO,qoe),N=Number.NEGATIVE_INFINITY;for(let B=0;BN&&(N=S,P=f.clone(w,P))}const R=t.cartesianToCartographic(P,Yoe);return N=O.clamp(N,0,1),v=f.magnitude(f.subtract(P,n,UE))*Math.sqrt(1-N*N),v=o?-v:v,R.height=v,t.cartographicToCartesian(R,new f)}};const Xoe=new f;qo.lineSegmentPlane=function(e,t,n,i){if(!c(e))throw new E("endPoint0 is required.");if(!c(t))throw new E("endPoint1 is required.");if(!c(n))throw new E("plane is required.");c(i)||(i=new f);const o=f.subtract(t,e,Xoe),r=n.normal,s=f.dot(r,o);if(Math.abs(s)1?void 0:(f.multiplyByScalar(o,l,i),f.add(e,i,i),i)},qo.trianglePlaneIntersection=function(e,t,n,i){if(!(c(e)&&c(t)&&c(n)&&c(i)))throw new E("p0, p1, p2, and plane are required.");const o=i.normal,r=i.distance,s=f.dot(o,e)+r<0,a=f.dot(o,t)+r<0,l=f.dot(o,n)+r<0;let d,h,u=0;if(u+=s?1:0,u+=a?1:0,u+=l?1:0,(1===u||2===u)&&(d=new f,h=new f),1===u){if(s)return qo.lineSegmentPlane(e,t,i,d),qo.lineSegmentPlane(e,n,i,h),{positions:[e,t,n,d,h],indices:[0,3,4,1,2,4,1,4,3]};if(a)return qo.lineSegmentPlane(t,n,i,d),qo.lineSegmentPlane(t,e,i,h),{positions:[e,t,n,d,h],indices:[1,3,4,2,0,4,2,4,3]};if(l)return qo.lineSegmentPlane(n,e,i,d),qo.lineSegmentPlane(n,t,i,h),{positions:[e,t,n,d,h],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===u){if(!s)return qo.lineSegmentPlane(t,e,i,d),qo.lineSegmentPlane(n,e,i,h),{positions:[e,t,n,d,h],indices:[1,2,4,1,4,3,0,3,4]};if(!a)return qo.lineSegmentPlane(n,t,i,d),qo.lineSegmentPlane(e,t,i,h),{positions:[e,t,n,d,h],indices:[2,0,4,2,4,3,1,3,4]};if(!l)return qo.lineSegmentPlane(e,n,i,d),qo.lineSegmentPlane(t,n,i,h),{positions:[e,t,n,d,h],indices:[0,1,4,0,4,3,2,3,4]}}};const rr=qo;function as(e,t){if(T.typeOf.object("normal",e),!O.equalsEpsilon(f.magnitude(e),1,O.EPSILON6))throw new E("normal must be normalized.");T.typeOf.number("distance",t),this.normal=f.clone(e),this.distance=t}as.fromPointNormal=function(e,t,n){if(T.typeOf.object("point",e),T.typeOf.object("normal",t),!O.equalsEpsilon(f.magnitude(t),1,O.EPSILON6))throw new E("normal must be normalized.");const i=-f.dot(t,e);return c(n)?(f.clone(t,n.normal),n.distance=i,n):new as(t,i)};const Zoe=new f;as.fromCartesian4=function(e,t){T.typeOf.object("coefficients",e);const n=f.fromCartesian4(e,Zoe),i=e.w;if(!O.equalsEpsilon(f.magnitude(n),1,O.EPSILON6))throw new E("normal must be normalized.");return c(t)?(f.clone(n,t.normal),t.distance=i,t):new as(n,i)},as.getPointDistance=function(e,t){return T.typeOf.object("plane",e),T.typeOf.object("point",t),f.dot(e.normal,t)+e.distance};const $oe=new f;as.projectPointOntoPlane=function(e,t,n){T.typeOf.object("plane",e),T.typeOf.object("point",t),c(n)||(n=new f);const i=as.getPointDistance(e,t),o=f.multiplyByScalar(e.normal,i,$oe);return f.subtract(t,o,n)};const Koe=new k,Qoe=new fe,Joe=new f;as.transform=function(e,t,n){T.typeOf.object("plane",e),T.typeOf.object("transform",t);const i=e.normal,o=e.distance,r=k.inverseTranspose(t,Koe);let s=fe.fromElements(i.x,i.y,i.z,o,Qoe);s=k.multiplyByVector(r,s,s);const a=f.fromCartesian4(s,Joe);return s=fe.divideByScalar(s,f.magnitude(a),s),as.fromCartesian4(s,n)},as.clone=function(e,t){return T.typeOf.object("plane",e),c(t)?(f.clone(e.normal,t.normal),t.distance=e.distance,t):new as(e.normal,e.distance)},as.equals=function(e,t){return T.typeOf.object("left",e),T.typeOf.object("right",t),e.distance===t.distance&&f.equals(e.normal,t.normal)},as.ORIGIN_XY_PLANE=Object.freeze(new as(f.UNIT_Z,0)),as.ORIGIN_YZ_PLANE=Object.freeze(new as(f.UNIT_X,0)),as.ORIGIN_ZX_PLANE=Object.freeze(new as(f.UNIT_Y,0));const Hn=as,cP=function ere(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o};var Hs=st(5098);const zt=function DU(e,t){if(null===e||"object"!=typeof e)return e;t=g(t,!1);const n=new e.constructor;for(const i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=DU(o,t)),n[i]=o}return n},Gn=function IU(e,t,n){n=g(n,!1);const i={},o=c(e),r=c(t);let s,a,l;if(o)for(s in e)e.hasOwnProperty(s)&&(a=e[s],r&&n&&"object"==typeof a&&t.hasOwnProperty(s)?(l=t[s],i[s]="object"==typeof l?IU(a,l,n):a):i[s]=a);if(r)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(l=t[s],i[s]=l);return i},ap=function ire(){let e,t;const n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}};function lP(e,t){let n;return typeof document<"u"&&(n=document),lP._implementation(e,t,n)}lP._implementation=function(e,t,n){if(!c(e))throw new E("relative uri is required.");if(!c(t)){if(typeof n>"u")return e;t=g(n.baseURI,n.location.href)}const i=new Hs(e);return""!==i.scheme()?i.toString():i.absoluteTo(t).toString()};const zE=lP,PU=function sre(e){if(!c(e))throw new E("uri is required.");const t=new Hs(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return-1!==i&&(n=n.substr(i+1)),i=n.lastIndexOf("."),n=-1===i?"":n.substr(i+1),n},OU={},VE=function are(e,t,n){c(t)||(t=e.width),c(n)||(n=e.height);let i=OU[t];c(i)||(i={},OU[t]=i);let o=i[n];if(!c(o)){const 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},cre=/^blob:/i,LU=function lre(e){return T.typeOf.string("uri",e),cre.test(e)};let Cd;const RU=function ure(e){c(Cd)||(Cd=document.createElement("a")),Cd.href=window.location.href;const t=Cd.host,n=Cd.protocol;return Cd.href=e,Cd.href=Cd.href,n!==Cd.protocol||t!==Cd.host},dre=/^data:/i,uP=function fre(e){return T.typeOf.string("uri",e),dre.test(e)},NU=function mre(e){if(!c(e))throw new E("obj is required.");let t="";for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,s=i.length;r0){const s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}(this.responseHeaders))}MU.prototype.toString=function(){let e="Request has failed.";return c(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};const OA=MU;function i_(e){T.typeOf.object("options",e),T.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function dP(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}Object.defineProperties(i_.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){T.typeOf.number.greaterThanOrEquals("maximumLength",e,0);const t=this._length;if(e=0;--t)this.heapify(t)},i_.prototype.insert=function(e){T.defined("element",e);const t=this._array,n=this._comparator,i=this._maximumLength;let r,o=this._length++;for(oi&&(r=t[i],this._length=i),r},i_.prototype.pop=function(e){if(e=g(e,0),0===this._length)return;T.typeOf.number.lessThan("index",e,this._length);const t=this._array,n=t[e];return dP(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};const Yi={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0};let xy=20;const la=new i_({comparator:function Are(e,t){return e.priority-t.priority}});la.maximumLength=xy,la.reserve(xy);const Ed=[];let Pf={};const Tre=typeof document<"u"?new Hs(document.location.href):new Hs,GE=new Ue;function Lo(){}function FU(e){c(e.priorityFunction)&&(e.priority=e.priorityFunction())}function BU(e){return e.state===Ao.UNISSUED&&(e.state=Ao.ISSUED,e.deferred=ap()),e.deferred.promise}function kU(e){const t=BU(e);return e.state=Ao.ACTIVE,Ed.push(e),++Yi.numberOfActiveRequests,++Yi.numberOfActiveRequestsEver,++Pf[e.serverKey],e.requestFunction().then(function xre(e){return function(t){if(e.state===Ao.CANCELLED)return;const n=e.deferred;--Yi.numberOfActiveRequests,--Pf[e.serverKey],GE.raiseEvent(),e.state=Ao.RECEIVED,e.deferred=void 0,n.resolve(t)}}(e)).catch(function Cre(e){return function(t){e.state!==Ao.CANCELLED&&(++Yi.numberOfFailedRequests,--Yi.numberOfActiveRequests,--Pf[e.serverKey],GE.raiseEvent(t),e.state=Ao.FAILED,e.deferred.reject(t))}}(e)),t}function o_(e){const t=e.state===Ao.ACTIVE;if(e.state=Ao.CANCELLED,++Yi.numberOfCancelledRequests,c(e.deferred)){const n=e.deferred;e.deferred=void 0,n.reject()}t&&(--Yi.numberOfActiveRequests,--Pf[e.serverKey],++Yi.numberOfCancelledActiveRequests),c(e.cancelFunction)&&e.cancelFunction()}Lo.maximumRequests=50,Lo.maximumRequestsPerServer=6,Lo.requestsByServer={"api.cesium.com:443":18,"assets.ion.cesium.com:443":18,"ibasemaps-api.arcgis.com:443":18,"tile.googleapis.com:443":18,"tile.openstreetmap.org:443":18},Lo.throttleRequests=!0,Lo.debugShowStatistics=!1,Lo.requestCompletedEvent=GE,Object.defineProperties(Lo,{statistics:{get:function(){return Yi}},priorityHeapLength:{get:function(){return xy},set:function(e){if(ee;)o_(la.pop());xy=e,la.maximumLength=e,la.reserve(e)}}}),Lo.serverHasOpenSlots=function(e,t){t=g(t,1);const n=g(Lo.requestsByServer[e],Lo.maximumRequestsPerServer);return Pf[e]+t<=n},Lo.heapHasOpenSlots=function(e){return la.length+e<=xy},Lo.update=function(){let e,t,n=0;const i=Ed.length;for(e=0;e0&&(Ed[e-n]=t):++n;Ed.length-=n;const o=la.internalArray,r=la.length;for(e=0;e0;)t=la.pop(),t.cancelled?o_(t):!t.throttleByServer||Lo.serverHasOpenSlots(t.serverKey)?(kU(t),++a):o_(t);!function Ere(){Lo.debugShowStatistics&&(0===Yi.numberOfActiveRequests&&Yi.lastNumberOfActiveRequests>0&&(Yi.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${Yi.numberOfAttemptedRequests}`),Yi.numberOfAttemptedRequests=0),Yi.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${Yi.numberOfCancelledRequests}`),Yi.numberOfCancelledRequests=0),Yi.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${Yi.numberOfCancelledActiveRequests}`),Yi.numberOfCancelledActiveRequests=0),Yi.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${Yi.numberOfFailedRequests}`),Yi.numberOfFailedRequests=0)),Yi.lastNumberOfActiveRequests=Yi.numberOfActiveRequests)}()},Lo.getServerKey=function(e){T.typeOf.string("url",e);let t=new Hs(e);""===t.scheme()&&(t=t.absoluteTo(Tre),t.normalize());let n=t.authority();return/:/.test(n)||(n=`${n}:${"https"===t.scheme()?"443":"80"}`),c(Pf[n])||(Pf[n]=0),n},Lo.request=function(e){if(T.typeOf.object("request",e),T.typeOf.string("request.url",e.url),T.typeOf.func("request.requestFunction",e.requestFunction),uP(e.url)||LU(e.url))return GE.raiseEvent(),e.state=Ao.RECEIVED,e.requestFunction();if(++Yi.numberOfAttemptedRequests,c(e.serverKey)||(e.serverKey=Lo.getServerKey(e.url)),Lo.throttleRequests&&e.throttleByServer&&!Lo.serverHasOpenSlots(e.serverKey))return;if(!Lo.throttleRequests||!e.throttle)return kU(e);if(Ed.length>=Lo.maximumRequests)return;FU(e);const t=la.insert(e);if(c(t)){if(t===e)return;o_(t)}return BU(e)},Lo.clearForSpecs=function(){for(;la.length>0;)o_(la.pop());const e=Ed.length;for(let t=0;t0}},credits:{get:function(){return this._credits}}}),Gt.prototype.toString=function(){return this.getUrlComponent(!0,!0)},Gt.prototype.parseUrl=function(e,t,n,i){let o=new Hs(e);const r=function Sre(e){return 0===e.length?{}:-1===e.indexOf("=")?{[e]:void 0}:cp(e)}(o.query());this._queryParameters=t?jE(r,this.queryParameters,n):r,o.search(""),o.fragment(""),c(i)&&""===o.scheme()&&(o=o.absoluteTo(zE(i))),this._url=o.toString()},Gt.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${function vre(e){const t=Object.keys(e);return 0===t.length?"":1!==t.length||c(e[t[0]])?`?${NU(e)}`:`?${t[0]}`}(this.queryParameters)}`),n=n.replace(/%7B/g,"{").replace(/%7D/g,"}");const i=this._templateValues;return Object.keys(i).length>0&&(n=n.replace(/{(.*?)}/g,function(o,r){const s=i[r];return c(s)?encodeURIComponent(s):o})),t&&c(this.proxy)&&(n=this.proxy.getURL(n)),n},Gt.prototype.setQueryParameters=function(e,t){this._queryParameters=t?jE(this._queryParameters,e,!1):jE(e,this._queryParameters,!1)},Gt.prototype.appendQueryParameters=function(e){this._queryParameters=jE(e,this._queryParameters,!0)},Gt.prototype.setTemplateValues=function(e,t){this._templateValues=t?Gn(this._templateValues,e):Gn(e,this._templateValues)},Gt.prototype.getDerivedResource=function(e){const t=this.clone();if(t._retryCount=0,c(e.url)){const n=g(e.preserveQueryParameters,!1);t.parseUrl(e.url,!0,n,this._url)}return c(e.queryParameters)&&(t._queryParameters=Gn(e.queryParameters,t.queryParameters)),c(e.templateValues)&&(t._templateValues=Gn(e.templateValues,t.templateValues)),c(e.headers)&&(t.headers=Gn(e.headers,t.headers)),c(e.proxy)&&(t.proxy=e.proxy),c(e.request)&&(t.request=e.request),c(e.retryCallback)&&(t.retryCallback=e.retryCallback),c(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},Gt.prototype.retryOnError=function(e){const t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);const n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})},Gt.prototype.clone=function(e){return c(e)?(e._url=this._url,e._queryParameters=zt(this._queryParameters),e._templateValues=zt(this._templateValues),e.headers=zt(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new Gt({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:c(this.credits)?this.credits.slice():void 0})},Gt.prototype.getBaseUri=function(e){return function ore(e,t){if(!c(e))throw new E("uri is required.");let n="";const i=e.lastIndexOf("/");return-1!==i&&(n=e.substring(0,i+1)),t&&(0!==(e=new Hs(e)).query().length&&(n+=`?${e.query()}`),0!==e.fragment().length&&(n+=`#${e.fragment()}`)),n}(this.getUrlComponent(e),e)},Gt.prototype.appendForwardSlash=function(){this._url=function tre(e){return(0===e.length||"/"!==e[e.length-1])&&(e=`${e}/`),e}(this._url)},Gt.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},Gt.fetchArrayBuffer=function(e){return new Gt(e).fetchArrayBuffer()},Gt.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},Gt.fetchBlob=function(e){return new Gt(e).fetchBlob()},Gt.prototype.fetchImage=function(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.preferImageBitmap,!1),n=g(e.preferBlob,!1),i=g(e.flipY,!1),o=g(e.skipColorSpaceConversion,!1);if(hP(this.request),!zU||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return fP({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});const r=this.fetchBlob();if(!c(r))return;let s,a,l,u;return Gt.supportsImageBitmapOptions().then(function(d){return s=d,a=s&&t,r}).then(function(d){if(!c(d))return;if(u=d,a)return Gt.createImageBitmapFromBlob(d,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});const h=window.URL.createObjectURL(d);return l=new Gt({url:h}),fP({resource:l,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(d){if(c(d))return d.blob=u,a||window.URL.revokeObjectURL(l.url),d}).catch(function(d){return c(l)&&window.URL.revokeObjectURL(l.url),d.blob=u,Promise.reject(d)})},Gt.fetchImage=function(e){return new Gt(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},Gt.prototype.fetchText=function(){return this.fetch({responseType:"text"})},Gt.fetchText=function(e){return new Gt(e).fetchText()},Gt.prototype.fetchJson=function(){const e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(c(e))return e.then(function(t){if(c(t))return JSON.parse(t)})},Gt.fetchJson=function(e){return new Gt(e).fetchJson()},Gt.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},Gt.fetchXML=function(e){return new Gt(e).fetchXML()},Gt.prototype.fetchJsonp=function(e){let t;e=g(e,"callback"),hP(this.request);do{t=`loadJsonp${O.nextRandomNumber().toString().substring(2,8)}`}while(c(window[t]));return VU(this,e,t)},Gt.fetchJsonp=function(e){return new Gt(e).fetchJsonp(e.callbackParameterName)},Gt.prototype._makeRequest=function(e){const t=this;hP(t.request);const n=t.request,i=t.url;n.url=i,n.requestFunction=function(){const r=e.responseType,s=Gn(e.headers,t.headers),a=e.overrideMimeType,l=e.method,u=e.data,d=ap(),h=Gt._Implementations.loadWithXhr(i,r,l,u,s,d,a);return c(h)&&c(h.abort)&&(n.cancelFunction=function(){h.abort()}),d.promise};const o=Of.request(n);if(c(o))return o.then(function(r){return n.cancelFunction=void 0,r}).catch(function(r){return n.cancelFunction=void 0,n.state!==Ao.FAILED?Promise.reject(r):t.retryOnError(r).then(function(s){return s?(n.state=Ao.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};const Dre=/^data:(.*?)(;base64)?,(.*)$/;function WE(e,t){const n=decodeURIComponent(t);return e?atob(n):n}function HU(e,t){const n=WE(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r"u";Gt._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){const a=Dre.exec(e);if(null!==a)return void r.resolve(function Ire(e,t){t=g(t,"");const n=e[1],i=!!e[2],o=e[3];let r,s;switch(t){case"":case"text":return WE(i,o);case"arraybuffer":return HU(i,o);case"blob":return r=HU(i,o),new Blob([r],{type:n});case"document":return s=new DOMParser,s.parseFromString(WE(i,o),n);case"json":return JSON.parse(WE(i,o));default:throw new E(`Unhandled responseType: ${t}`)}}(a,t));if(Ore)return void function Pre(e,t,n,i,o,r,s){let a,l;Promise.all([Promise.all([st.e(82),st.e(498)]).then(st.t.bind(st,7498,19)),Promise.all([st.e(82),st.e(93),st.e(283)]).then(st.t.bind(st,9283,19))]).then(([u,d])=>(a=u.parse(e),l=d,"https:"===a.protocol?Promise.all([st.e(82),st.e(93),st.e(498),st.e(979),st.e(733)]).then(st.t.bind(st,4733,19)):Promise.all([st.e(82),st.e(93),st.e(498),st.e(979)]).then(st.t.bind(st,9979,19)))).then(u=>{u.request({protocol:a.protocol,hostname:a.hostname,port:a.port,path:a.path,query:a.query,method:n,headers:o}).on("response",function(h){if(h.statusCode<200||h.statusCode>=300)return void r.reject(new OA(h.statusCode,h,h.headers));const m=[];h.on("data",function(_){m.push(_)}),h.on("end",function(){const _=Buffer.concat(m);"gzip"===h.headers["content-encoding"]?l.gunzip(_,function(p,y){p?r.reject(new Ie("Error decompressing response.")):r.resolve(GU(y,t))}):r.resolve(GU(_,t))})}).on("error",function(h){r.reject(new OA)}).end()})}(e,t,n,0,o,r);const l=new XMLHttpRequest;if(UU.contains(e)&&(l.withCredentials=!0),l.open(n,e,!0),c(s)&&c(l.overrideMimeType)&&l.overrideMimeType(s),c(o))for(const d in o)o.hasOwnProperty(d)&&l.setRequestHeader(d,o[d]);c(t)&&(l.responseType=t);let u=!1;return"string"==typeof e&&(u=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),l.onload=function(){if((l.status<200||l.status>=300)&&(!u||0!==l.status))return void r.reject(new OA(l.status,l.response,l.getAllResponseHeaders()));const d=l.response,h=l.responseType;if("HEAD"===n||"OPTIONS"===n){const _=l.getAllResponseHeaders().trim().split(/[\r\n]+/),p={};return _.forEach(function(y){const A=y.split(": "),x=A.shift();p[x]=A.join(": ")}),void r.resolve(p)}if(204===l.status)r.resolve();else if(!c(d)||c(t)&&h!==t)if("json"===t&&"string"==typeof d)try{r.resolve(JSON.parse(d))}catch(m){r.reject(m)}else(""===h||"document"===h)&&c(l.responseXML)&&l.responseXML.hasChildNodes()?r.resolve(l.responseXML):""!==h&&"text"!==h||!c(l.responseText)?r.reject(new Ie("Invalid XMLHttpRequest response type.")):r.resolve(l.responseText);else r.resolve(d)},l.onerror=function(d){r.reject(new OA)},l.send(i),l},Gt._Implementations.loadAndExecuteScript=function(e,t,n){return function hre(e){const t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");const 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)})}(e).catch(function(i){n.reject(i)})},(Gt._DefaultImplementations={}).createImage=Gt._Implementations.createImage,Gt._DefaultImplementations.loadWithXhr=Gt._Implementations.loadWithXhr,Gt._DefaultImplementations.loadAndExecuteScript=Gt._Implementations.loadAndExecuteScript,Gt.DEFAULT=Object.freeze(new Gt({url:typeof document>"u"?"":document.location.href.split("?")[0]}));const jt=Gt;function RA(e){e=g(e,g.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=g(e.addNewLeapSeconds,!0),c(e.data)?jU(this,e.data):jU(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function Lre(e,t){return se.compare(e.julianDate,t)}function jU(e,t){if(!c(t.columnNames))throw new Ie("Error in loaded EOP data: The columnNames property is required.");if(!c(t.samples))throw new Ie("Error in loaded EOP data: The samples property is required.");const n=t.columnNames.indexOf("modifiedJulianDateUtc"),i=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),r=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),a=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||i<0||o<0||r<0||s<0||a<0||l<0)throw new Ie("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");const u=e._samples=t.samples,d=e._dates=[];let h;e._dateColumn=n,e._xPoleWanderRadiansColumn=i,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;const m=e._addNewLeapSeconds;for(let _=0,p=u.length;_t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;const l=t[o],u=t[r];if(l.equals(u)||i.equals(l))return WU(e,n,o,a,s),s;if(i.equals(u))return WU(e,n,r,a,s),s;const d=se.secondsDifference(i,l)/se.secondsDifference(u,l),h=o*a,m=r*a;let _=n[h+e._ut1MinusUtcSecondsColumn],p=n[m+e._ut1MinusUtcSecondsColumn];const y=p-_;if(y>.5||y<-.5){const A=n[h+e._taiMinusUtcSecondsColumn],x=n[m+e._taiMinusUtcSecondsColumn];A!==x&&(u.equals(i)?_=p:p-=x-A)}return s.xPoleWander=NA(d,n[h+e._xPoleWanderRadiansColumn],n[m+e._xPoleWanderRadiansColumn]),s.yPoleWander=NA(d,n[h+e._yPoleWanderRadiansColumn],n[m+e._yPoleWanderRadiansColumn]),s.xPoleOffset=NA(d,n[h+e._xCelestialPoleOffsetRadiansColumn],n[m+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=NA(d,n[h+e._yCelestialPoleOffsetRadiansColumn],n[m+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=NA(d,_,p),s}RA.fromUrl=function(){var e=(0,Pe.Z)(function*(t,n){T.defined("url",t),n=g(n,g.EMPTY_OBJECT);const i=jt.createIfNeeded(t);let o;try{o=yield i.fetchJson()}catch{throw new Ie(`An error occurred while retrieving the EOP data from the URL ${i.url}.`)}return new RA({addNewLeapSeconds:n.addNewLeapSeconds,data:o})});return function(t,n){return e.apply(this,arguments)}}(),RA.NONE=Object.freeze({compute:function(e,t){return c(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new cP(0,0,0,0,0),t}}),RA.prototype.compute=function(e,t){if(!c(this._samples))return;if(c(t)||(t=new cP(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;const n=this._dates,i=this._lastIndex;let o=0,r=0;if(c(i)){const l=n[i+1],u=se.lessThanOrEquals(n[i],e),d=!c(l),h=d||se.greaterThanOrEquals(l,e);if(u&&h)return o=i,!d&&l.equals(e)&&++o,r=o+1,qU(this,n,this._samples,e,o,r,t),t}let s=ke(n,e,se.compare,this._dateColumn);return s>=0?(s"u"?e:(c(qE)||(qE=document.createElement("a")),qE.href=e,qE.href)}function ZU(){if(c(r_))return r_;let e;if(e=typeof CESIUM_BASE_URL<"u"?CESIUM_BASE_URL:c("file:///home/runner/work/ukis-frontend-libraries/ukis-frontend-libraries/node_modules/@cesium/engine/Source/Core/buildModuleUrl.js")?zE(".","file:///home/runner/work/ukis-frontend-libraries/ukis-frontend-libraries/node_modules/@cesium/engine/Source/Core/buildModuleUrl.js"):"object"==typeof define&&c(define.amd)&&!define.amd.toUrlUndefined&&c(require.toUrl)?zE("..",s_("Core/buildModuleUrl.js")):function Nre(){const e=document.getElementsByTagName("script");for(let t=0,n=e.length;t=this._totalSamples&&(a=this._totalSamples-1);const u=a/this._samplesPerXysFile|0,d=[];for(let h=s/this._samplesPerXysFile|0;h<=u;++h)d.push(_P(this,h));return Promise.all(d)},pP.prototype.computeXysRadians=function(e,t,n){const i=mP(this,e,t);if(i<0)return;const o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;const r=this._interpolationOrder;let 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 l=!1;const u=this._samples;if(c(u[3*s])||(_P(this,s/this._samplesPerXysFile|0),l=!0),c(u[3*a])||(_P(this,a/this._samplesPerXysFile|0),l=!0),l)return;c(n)?(n.x=0,n.y=0,n.s=0):n=new KU(0,0,0);const d=i-s*this._stepSizeDays,h=this._work,m=this._denominators,_=this._coef,p=this._xTable;let y,A;for(y=0;y<=r;++y)h[y]=d-p[y];for(y=0;y<=r;++y){for(_[y]=1,A=0;A<=r;++A)A!==y&&(_[y]*=h[A]);_[y]*=m[y];let x=3*(s+y);n.x+=_[y]*u[x++],n.y+=_[y]*u[x++],n.s+=_[y]*u[x]}return n};const kre=pP;let lp;const yr={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},hc={};Object.defineProperties(hc,{element:{get:function(){if(hc.supportsFullscreen())return document[yr.fullscreenElement]}},changeEventName:{get:function(){if(hc.supportsFullscreen())return yr.fullscreenchange}},errorEventName:{get:function(){if(hc.supportsFullscreen())return yr.fullscreenerror}},enabled:{get:function(){if(hc.supportsFullscreen())return document[yr.fullscreenEnabled]}},fullscreen:{get:function(){if(hc.supportsFullscreen())return null!==hc.element}}}),hc.supportsFullscreen=function(){if(c(lp))return lp;lp=!1;const e=document.body;if("function"==typeof e.requestFullscreen)return yr.requestFullscreen="requestFullscreen",yr.exitFullscreen="exitFullscreen",yr.fullscreenEnabled="fullscreenEnabled",yr.fullscreenElement="fullscreenElement",yr.fullscreenchange="fullscreenchange",yr.fullscreenerror="fullscreenerror",lp=!0,lp;const t=["webkit","moz","o","ms","khtml"];let n;for(let i=0,o=t.length;i{const t=new Image;t.onload=function(){e(fa._result=t.width>0&&t.height>0)},t.onerror=function(){e(fa._result=!1)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),fa._promise},Object.defineProperties(fa,{initialized:{get:function(){return c(fa._result)}}});const Sy=[];typeof ArrayBuffer<"u"&&(Sy.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&Sy.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&Sy.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&Sy.push(BigInt64Array),typeof BigUint64Array<"u"&&Sy.push(BigUint64Array));const Tl={isChrome:gP,chromeVersion:function Ure(){return gP()&&QU},isSafari:ez,safariVersion:function zre(){return ez()&&JU},isWebkit:tz,webkitVersion:function Vre(){return tz()&&yP},isInternetExplorer:nz,internetExplorerVersion:function Hre(){return nz()&&bP},isEdge:QE,edgeVersion:function Gre(){return QE()&&iz},isFirefox:ew,firefoxVersion:function qre(){return ew()&&AP},isWindows:function jre(){return c(TP)||(TP=/Windows/i.test(da.appVersion)),TP},isIPadOrIOS:function Wre(){return c(xP)||(xP="iPhone"===navigator.platform||"iPod"===navigator.platform||"iPad"===navigator.platform),xP},hardwareConcurrency:g(da.hardwareConcurrency,3),supportsPointerEvents:function Yre(){return c(CP)||(CP=!ew()&&typeof PointerEvent<"u"&&(!c(da.pointerEnabled)||da.pointerEnabled)),CP},supportsImageRenderingPixelated:rz,supportsWebP:fa,imageRenderingValue:function Xre(){return rz()?oz:void 0},typedArrayTypes:Sy,supportsBasis:function(e){return Tl.supportsWebAssembly()&&e.context.supportsBasis},supportsFullscreen:function(){return Es.supportsFullscreen()},supportsTypedArrays:function(){return typeof ArrayBuffer<"u"},supportsBigInt64Array:function(){return typeof BigInt64Array<"u"},supportsBigUint64Array:function(){return typeof BigUint64Array<"u"},supportsBigInt:function(){return typeof BigInt<"u"},supportsWebWorkers:function(){return typeof Worker<"u"},supportsWebAssembly:function(){return typeof WebAssembly<"u"},supportsWebgl2:function(e){return T.defined("scene",e),e.context.webgl2},supportsEsmWebWorkers:function(){return!ew()||parseInt(AP)>=114}},zn=Tl;function ft(e,t,n,i){this.x=g(e,0),this.y=g(t,0),this.z=g(n,0),this.w=g(i,0)}let FA=new f;ft.fromAxisAngle=function(e,t,n){T.typeOf.object("axis",e),T.typeOf.number("angle",t);const i=t/2,o=Math.sin(i);FA=f.normalize(e,FA);const r=FA.x*o,s=FA.y*o,a=FA.z*o,l=Math.cos(i);return c(n)?(n.x=r,n.y=s,n.z=a,n.w=l,n):new ft(r,s,a,l)};const Zre=[1,2,0],$re=new Array(3);ft.fromRotationMatrix=function(e,t){let n,i,o,r,s;T.typeOf.object("matrix",e);const a=e[ne.COLUMN0ROW0],l=e[ne.COLUMN1ROW1],u=e[ne.COLUMN2ROW2],d=a+l+u;if(d>0)n=Math.sqrt(d+1),s=.5*n,n=.5/n,i=(e[ne.COLUMN1ROW2]-e[ne.COLUMN2ROW1])*n,o=(e[ne.COLUMN2ROW0]-e[ne.COLUMN0ROW2])*n,r=(e[ne.COLUMN0ROW1]-e[ne.COLUMN1ROW0])*n;else{let m=0;l>a&&(m=1),u>a&&u>l&&(m=2);const _=Zre[m],p=Zre[_];n=Math.sqrt(e[ne.getElementIndex(m,m)]-e[ne.getElementIndex(_,_)]-e[ne.getElementIndex(p,p)]+1);const y=$re;y[m]=.5*n,n=.5/n,s=(e[ne.getElementIndex(p,_)]-e[ne.getElementIndex(_,p)])*n,y[_]=(e[ne.getElementIndex(_,m)]+e[ne.getElementIndex(m,_)])*n,y[p]=(e[ne.getElementIndex(p,m)]+e[ne.getElementIndex(m,p)])*n,i=-y[0],o=-y[1],r=-y[2]}return c(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new ft(i,o,r,s)};const sz=new ft;let az=new ft,EP=new ft,cz=new ft;ft.fromHeadingPitchRoll=function(e,t){return T.typeOf.object("headingPitchRoll",e),cz=ft.fromAxisAngle(f.UNIT_X,e.roll,sz),EP=ft.fromAxisAngle(f.UNIT_Y,-e.pitch,t),t=ft.multiply(EP,cz,EP),az=ft.fromAxisAngle(f.UNIT_Z,-e.heading,sz),ft.multiply(az,t,t)};const nw=new f,wP=new f,yu=new ft,lz=new ft,iw=new ft;ft.packedLength=4,ft.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},ft.unpack=function(e,t,n){return T.defined("array",e),t=g(t,0),c(n)||(n=new ft),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},ft.packedInterpolationLength=3,ft.convertPackedArrayForInterpolation=function(e,t,n,i){ft.unpack(e,4*n,iw),ft.conjugate(iw,iw);for(let o=0,r=n-t+1;o=0?r=1:(r=-1,o=-o);const s=o-1,a=1-n,l=n*n,u=a*a;for(let _=7;_>=0;--_)Lf[_]=(ow[_]*l-rw[_])*s,Rf[_]=(ow[_]*u-rw[_])*s;const d=r*n*(1+Lf[0]*(1+Lf[1]*(1+Lf[2]*(1+Lf[3]*(1+Lf[4]*(1+Lf[5]*(1+Lf[6]*(1+Lf[7])))))))),m=ft.multiplyByScalar(e,a*(1+Rf[0]*(1+Rf[1]*(1+Rf[2]*(1+Rf[3]*(1+Rf[4]*(1+Rf[5]*(1+Rf[6]*(1+Rf[7])))))))),Jre);return ft.multiplyByScalar(t,d,i),ft.add(m,i,i)},ft.fastSquad=function(e,t,n,i,o,r){T.typeOf.object("q0",e),T.typeOf.object("q1",t),T.typeOf.object("s0",n),T.typeOf.object("s1",i),T.typeOf.number("t",o),T.typeOf.object("result",r);const s=ft.fastSlerp(e,t,o,BA),a=ft.fastSlerp(n,i,o,vy);return ft.fastSlerp(s,a,2*o*(1-o),r)},ft.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},ft.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(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},ft.ZERO=Object.freeze(new ft(0,0,0,0)),ft.IDENTITY=Object.freeze(new ft(0,0,0,1)),ft.prototype.clone=function(e){return ft.clone(this,e)},ft.prototype.equals=function(e){return ft.equals(this,e)},ft.prototype.equalsEpsilon=function(e,t){return ft.equalsEpsilon(this,e,t)},ft.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const yt=ft,Vi={},IP={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"}},Dy={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},PP={},pc={east:new f,north:new f,up:new f,west:new f,south:new f,down:new f};let up=new f,dp=new f,fp=new f;Vi.localFrameToFixedFrameGenerator=function(e,t){if(!IP.hasOwnProperty(e)||!IP[e].hasOwnProperty(t))throw new E("firstAxis and secondAxis must be east, north, up, west, south or down.");const n=IP[e][t];let i;const o=e+t;return c(PP[o])?i=PP[o]:(i=function(r,s,a){if(!c(r))throw new E("origin is required.");if(c(a)||(a=new k),f.equalsEpsilon(r,f.ZERO,O.EPSILON14))f.unpack(Dy[e],0,up),f.unpack(Dy[t],0,dp),f.unpack(Dy[n],0,fp);else if(O.equalsEpsilon(r.x,0,O.EPSILON14)&&O.equalsEpsilon(r.y,0,O.EPSILON14)){const l=O.sign(r.z);f.unpack(Dy[e],0,up),"east"!==e&&"west"!==e&&f.multiplyByScalar(up,l,up),f.unpack(Dy[t],0,dp),"east"!==t&&"west"!==t&&f.multiplyByScalar(dp,l,dp),f.unpack(Dy[n],0,fp),"east"!==n&&"west"!==n&&f.multiplyByScalar(fp,l,fp)}else{(s=g(s,ge.WGS84)).geodeticSurfaceNormal(r,pc.up);const l=pc.up,u=pc.east;u.x=-r.y,u.y=r.x,u.z=0,f.normalize(u,pc.east),f.cross(l,u,pc.north),f.multiplyByScalar(pc.up,-1,pc.down),f.multiplyByScalar(pc.east,-1,pc.west),f.multiplyByScalar(pc.north,-1,pc.south),up=pc[e],dp=pc[t],fp=pc[n]}return a[0]=up.x,a[1]=up.y,a[2]=up.z,a[3]=0,a[4]=dp.x,a[5]=dp.y,a[6]=dp.z,a[7]=0,a[8]=fp.x,a[9]=fp.y,a[10]=fp.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},PP[o]=i),i},Vi.eastNorthUpToFixedFrame=Vi.localFrameToFixedFrameGenerator("east","north"),Vi.northEastDownToFixedFrame=Vi.localFrameToFixedFrameGenerator("north","east"),Vi.northUpEastToFixedFrame=Vi.localFrameToFixedFrameGenerator("north","up"),Vi.northWestUpToFixedFrame=Vi.localFrameToFixedFrameGenerator("north","west");const ese=new yt,tse=new f(1,1,1),nse=new k;Vi.headingPitchRollToFixedFrame=function(e,t,n,i,o){T.typeOf.object("HeadingPitchRoll",t),i=g(i,Vi.eastNorthUpToFixedFrame);const r=yt.fromHeadingPitchRoll(t,ese),s=k.fromTranslationQuaternionRotationScale(f.ZERO,r,tse,nse);return o=i(e,n,o),k.multiply(o,s,o)};const ise=new k,ose=new ne;Vi.headingPitchRollQuaternion=function(e,t,n,i,o){T.typeOf.object("HeadingPitchRoll",t);const r=Vi.headingPitchRollToFixedFrame(e,t,n,i,ise),s=k.getMatrix3(r,ose);return yt.fromRotationMatrix(s,o)};const rse=new f(1,1,1),sse=new f,fz=new k,ase=new k,cse=new ne,lse=new yt;Vi.fixedFrameToHeadingPitchRoll=function(e,t,n,i){T.defined("transform",e),t=g(t,ge.WGS84),n=g(n,Vi.eastNorthUpToFixedFrame),c(i)||(i=new wy);const o=k.getTranslation(e,sse);if(f.equals(o,f.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=k.inverseTransformation(n(o,t,fz),fz),s=k.setScale(e,rse,ase);s=k.setTranslation(s,f.ZERO,s),r=k.multiply(r,s,r);let a=yt.fromRotationMatrix(k.getMatrix3(r,cse),lse);return a=yt.normalize(a,a),wy.fromQuaternion(a,i)};const _se=O.TWO_PI/86400;let sw=new se;Vi.computeTemeToPseudoFixedMatrix=function(e,t){if(!c(e))throw new E("date is required.");sw=se.addSeconds(e,-se.computeTaiMinusUtc(e),sw);const n=sw.dayNumber,i=sw.secondsOfDay;let o;const r=n-2451545;o=i>=43200?(r+.5)/It.DAYS_PER_JULIAN_CENTURY:(r-.5)/It.DAYS_PER_JULIAN_CENTURY;const d=(24110.54841+o*(8640184.812866+o*(.093104+-62e-7*o)))*_se%O.TWO_PI+(i+.5*It.SECONDS_PER_DAY)%It.SECONDS_PER_DAY*(72921158553e-15+11772758384668e-32*(n-2451545.5)),h=Math.cos(d),m=Math.sin(d);return c(t)?(t[0]=h,t[1]=-m,t[2]=0,t[3]=m,t[4]=h,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new ne(h,m,0,-m,h,0,0,0,1)},Vi.iau2006XysData=new kre,Vi.earthOrientationParameters=Rre.NONE;const OP=32.184;Vi.preloadIcrfFixed=function(e){return Vi.iau2006XysData.preload(e.start.dayNumber,e.start.secondsOfDay+OP,e.stop.dayNumber,e.stop.secondsOfDay+OP)},Vi.computeIcrfToFixedMatrix=function(e,t){if(!c(e))throw new E("date is required.");c(t)||(t=new ne);const n=Vi.computeFixedToIcrfMatrix(e,t);if(c(n))return ne.transpose(n,t)};const yse=new KU(0,0,0),bse=new cP(0,0,0,0,0,0),LP=new ne,RP=new ne;Vi.computeFixedToIcrfMatrix=function(e,t){if(!c(e))throw new E("date is required.");c(t)||(t=new ne);const n=Vi.earthOrientationParameters.compute(e,bse);if(!c(n))return;const i=e.dayNumber,o=e.secondsOfDay+OP,r=Vi.iau2006XysData.computeXysRadians(i,o,yse);if(!c(r))return;const s=r.x+n.xPoleOffset,a=r.y+n.yPoleOffset,l=1/(1+Math.sqrt(1-s*s-a*a)),u=LP;u[0]=1-l*s*s,u[3]=-l*s*a,u[6]=s,u[1]=-l*s*a,u[4]=1-l*a*a,u[7]=a,u[2]=-s,u[5]=-a,u[8]=1-l*(s*s+a*a);const d=ne.fromRotationZ(-r.s,RP),h=ne.multiply(u,d,LP),m=e.dayNumber,y=(e.secondsOfDay-se.computeTaiMinusUtc(e)+n.ut1MinusUtc)/It.SECONDS_PER_DAY;let A=.779057273264+y+.00273781191135448*(m-2451545+y);A=A%1*O.TWO_PI;const x=ne.fromRotationZ(A,RP),C=ne.multiply(h,x,LP),w=Math.cos(n.xPoleWander),v=Math.cos(n.yPoleWander),D=Math.sin(n.xPoleWander),P=Math.sin(n.yPoleWander);let N=i-2451545+o/It.SECONDS_PER_DAY;N/=36525;const R=-47e-6*N*O.RADIANS_PER_DEGREE/3600,B=Math.cos(R),F=Math.sin(R),S=RP;return S[0]=w*B,S[1]=w*F,S[2]=D,S[3]=-v*F+P*D*B,S[4]=v*B+P*D*F,S[5]=-P*w,S[6]=-P*F-v*D*B,S[7]=P*B-v*D*F,S[8]=v*w,ne.multiply(C,S,t)};const Ase=new fe;Vi.pointToWindowCoordinates=function(e,t,n,i){return(i=Vi.pointToGLWindowCoordinates(e,t,n,i)).y=2*t[5]-i.y,i},Vi.pointToGLWindowCoordinates=function(e,t,n,i){if(!c(e))throw new E("modelViewProjectionMatrix is required.");if(!c(t))throw new E("viewportTransformation is required.");if(!c(n))throw new E("point is required.");c(i)||(i=new G);const o=Ase;return k.multiplyByVector(e,fe.fromElements(n.x,n.y,n.z,1,o),o),fe.multiplyByScalar(o,1/o.w,o),k.multiplyByVector(t,o,o),G.fromCartesian4(o,i)};const Tse=new f,xse=new f,Cse=new f;Vi.rotationMatrixFromPositionVelocity=function(e,t,n,i){if(!c(e))throw new E("position is required.");if(!c(t))throw new E("velocity is required.");const o=g(n,ge.WGS84).geodeticSurfaceNormal(e,Tse);let r=f.cross(t,o,xse);f.equalsEpsilon(r,f.ZERO,O.EPSILON6)&&(r=f.clone(f.UNIT_X,r));const s=f.cross(r,t,Cse);return f.normalize(s,s),f.cross(t,s,r),f.negate(r,r),f.normalize(r,r),c(i)||(i=new ne),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};const hz=new k(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),pz=new Se,mz=new f,Ese=new f,wse=new ne,NP=new k,_z=new k;Vi.basisTo2D=function(e,t,n){if(!c(e))throw new E("projection is required.");if(!c(t))throw new E("matrix is required.");if(!c(n))throw new E("result is required.");const i=k.getTranslation(t,Ese),o=e.ellipsoid,r=o.cartesianToCartographic(i,pz),s=e.project(r,mz);f.fromElements(s.z,s.x,s.y,s);const a=Vi.eastNorthUpToFixedFrame(i,o,NP),l=k.inverseTransformation(a,_z),u=k.getMatrix3(t,wse),d=k.multiplyByMatrix3(l,u,n);return k.multiply(hz,d,n),k.setTranslation(n,s,n),n},Vi.wgs84To2DModelMatrix=function(e,t,n){if(!c(e))throw new E("projection is required.");if(!c(t))throw new E("center is required.");if(!c(n))throw new E("result is required.");const i=e.ellipsoid,o=Vi.eastNorthUpToFixedFrame(t,i,NP),r=k.inverseTransformation(o,_z),s=i.cartesianToCartographic(t,pz),a=e.project(s,mz);f.fromElements(a.z,a.x,a.y,a);const l=k.fromTranslation(a,NP);return k.multiply(hz,r,n),k.multiply(l,n,n),n};const Rn=Vi,MP=new fe;function Sd(e,t){if(T.defined("origin",e),e=(t=g(t,ge.WGS84)).scaleToGeodeticSurface(e),!c(e))throw new E("origin must not be at the center of the ellipsoid.");const n=Rn.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=f.fromCartesian4(k.getColumn(n,0,MP)),this._yAxis=f.fromCartesian4(k.getColumn(n,1,MP));const i=f.fromCartesian4(k.getColumn(n,2,MP));this._plane=Hn.fromPointNormal(e,i)}Object.defineProperties(Sd.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}}});const Sse=new Q1;Sd.fromPoints=function(e,t){return T.defined("cartesians",e),new Sd(Q1.fromPoints(e,Sse).center,t)};const gz=new fi,aw=new f;Sd.prototype.projectPointOntoPlane=function(e,t){T.defined("cartesian",e);const n=gz;n.origin=e,f.normalize(e,n.direction);let i=rr.rayPlane(n,this._plane,aw);if(c(i)||(f.negate(n.direction,n.direction),i=rr.rayPlane(n,this._plane,aw)),c(i)){const o=f.subtract(i,this._origin,i),r=f.dot(this._xAxis,o),s=f.dot(this._yAxis,o);return c(t)?(t.x=r,t.y=s,t):new G(r,s)}},Sd.prototype.projectPointsOntoPlane=function(e,t){T.defined("cartesians",e),c(t)||(t=[]);let n=0;const i=e.length;for(let o=0;oO.TWO_PI)throw new E("Rectangle width must be between 0 and 2 * pi");if(e.height<0||e.height>O.PI)throw new E("Rectangle height must be between 0 and pi");if(c(i)&&!O.equalsEpsilon(i.radii.x,i.radii.y,O.EPSILON15))throw new E("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");let r,s,a,l,u,d,h;if(t=g(t,0),n=g(n,0),i=g(i,ge.WGS84),e.width<=O.PI){const N=Ce.center(e,Az),R=i.cartographicToCartesian(N,Bse),B=new zc(R,i);h=B.plane;const F=N.longitude,S=e.south<0&&e.north>0?0:N.latitude,I=Se.fromRadians(F,e.north,n,kse),L=Se.fromRadians(e.west,e.north,n,Use),M=Se.fromRadians(e.west,S,n,zse),U=Se.fromRadians(e.west,e.south,n,Vse),z=Se.fromRadians(F,e.south,n,Hse),j=i.cartographicToCartesian(I,Gse);let W=i.cartographicToCartesian(L,Tz);const q=i.cartographicToCartesian(M,jse);let V=i.cartographicToCartesian(U,xz);const $=i.cartographicToCartesian(z,Wse),Z=B.projectPointToNearestOnPlane(j,qse),ie=B.projectPointToNearestOnPlane(W,Yse),Y=B.projectPointToNearestOnPlane(q,Xse),Q=B.projectPointToNearestOnPlane(V,Zse),K=B.projectPointToNearestOnPlane($,$se);return r=Math.min(ie.x,Y.x,Q.x),s=-r,l=Math.max(ie.y,Z.y),a=Math.min(Q.y,K.y),L.height=U.height=t,W=i.cartographicToCartesian(L,Tz),V=i.cartographicToCartesian(U,xz),u=Math.min(Hn.getPointDistance(h,W),Hn.getPointDistance(h,V)),d=n,bz(B.origin,B.xAxis,B.yAxis,B.zAxis,r,s,a,l,u,d,o)}const m=e.south>0,_=e.north<0,p=m?e.south:_?e.north:0,y=Ce.center(e,Az).longitude,A=f.fromRadians(y,p,n,i,Kse);A.z=0;const C=Math.abs(A.x)=l?Qn.INSIDE:Qn.INTERSECTING};const Cz=new f,Ez=new f,wz=new f,sae=new f,Sz=new f,aae=new f;Ri.distanceSquaredTo=function(e,t){if(!c(e))throw new E("box is required.");if(!c(t))throw new E("cartesian is required.");const n=f.subtract(t,e.center,yz),i=e.halfAxes;let o=ne.getColumn(i,0,Cz),r=ne.getColumn(i,1,Ez),s=ne.getColumn(i,2,wz);const a=f.magnitude(o),l=f.magnitude(r),u=f.magnitude(s);let d=!0,h=!0,m=!0;a>0?f.divideByScalar(o,a,o):d=!1,l>0?f.divideByScalar(r,l,r):h=!1,u>0?f.divideByScalar(s,u,s):m=!1;const _=!d+!h+!m;let p,y,A;if(1===_){let v=o;p=r,y=s,h?m||(v=s,y=o):(v=r,p=o),A=f.cross(p,y,Sz),v===o?o=A:v===r?r=A:v===s&&(s=A)}else if(2===_){p=o,h?p=r:m&&(p=s);let v=f.UNIT_Y;v.equalsEpsilon(p,O.EPSILON3)&&(v=f.UNIT_X),y=f.cross(p,v,sae),f.normalize(y,y),A=f.cross(p,y,Sz),f.normalize(A,A),p===o?(r=y,s=A):p===r?(s=y,o=A):p===s&&(o=y,r=A)}else 3===_&&(o=f.UNIT_X,r=f.UNIT_Y,s=f.UNIT_Z);const x=aae;x.x=f.dot(n,o),x.y=f.dot(n,r),x.z=f.dot(n,s);let w,C=0;return x.x<-a?(w=x.x+a,C+=w*w):x.x>a&&(w=x.x-a,C+=w*w),x.y<-l?(w=x.y+l,C+=w*w):x.y>l&&(w=x.y-l,C+=w*w),x.z<-u?(w=x.z+u,C+=w*w):x.z>u&&(w=x.z-u,C+=w*w),C};const cae=new f,lae=new f;Ri.computePlaneDistances=function(e,t,n,i){if(!c(e))throw new E("box is required.");if(!c(t))throw new E("position is required.");if(!c(n))throw new E("direction is required.");c(i)||(i=new ip);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;const s=e.center,a=e.halfAxes,l=ne.getColumn(a,0,Cz),u=ne.getColumn(a,1,Ez),d=ne.getColumn(a,2,wz),h=f.add(l,u,cae);f.add(h,d,h),f.add(h,s,h);const m=f.subtract(h,t,lae);let _=f.dot(n,m);return o=Math.min(_,o),r=Math.max(_,r),f.add(s,l,h),f.add(h,u,h),f.subtract(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.add(s,l,h),f.subtract(h,u,h),f.add(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.add(s,l,h),f.subtract(h,u,h),f.subtract(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.subtract(s,l,h),f.add(h,u,h),f.add(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.subtract(s,l,h),f.add(h,u,h),f.subtract(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.subtract(s,l,h),f.subtract(h,u,h),f.add(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.subtract(s,l,h),f.subtract(h,u,h),f.subtract(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),i.start=o,i.stop=r,i};const uae=new f,dae=new f,fae=new f;Ri.computeCorners=function(e,t){T.typeOf.object("box",e),c(t)||(t=[new f,new f,new f,new f,new f,new f,new f,new f]);const n=e.center,i=e.halfAxes,o=ne.getColumn(i,0,uae),r=ne.getColumn(i,1,dae),s=ne.getColumn(i,2,fae);return f.clone(n,t[0]),f.subtract(t[0],o,t[0]),f.subtract(t[0],r,t[0]),f.subtract(t[0],s,t[0]),f.clone(n,t[1]),f.subtract(t[1],o,t[1]),f.subtract(t[1],r,t[1]),f.add(t[1],s,t[1]),f.clone(n,t[2]),f.subtract(t[2],o,t[2]),f.add(t[2],r,t[2]),f.subtract(t[2],s,t[2]),f.clone(n,t[3]),f.subtract(t[3],o,t[3]),f.add(t[3],r,t[3]),f.add(t[3],s,t[3]),f.clone(n,t[4]),f.add(t[4],o,t[4]),f.subtract(t[4],r,t[4]),f.subtract(t[4],s,t[4]),f.clone(n,t[5]),f.add(t[5],o,t[5]),f.subtract(t[5],r,t[5]),f.add(t[5],s,t[5]),f.clone(n,t[6]),f.add(t[6],o,t[6]),f.add(t[6],r,t[6]),f.subtract(t[6],s,t[6]),f.clone(n,t[7]),f.add(t[7],o,t[7]),f.add(t[7],r,t[7]),f.add(t[7],s,t[7]),t};const hae=new ne;Ri.computeTransformation=function(e,t){T.typeOf.object("box",e),c(t)||(t=new k);const n=e.center,i=ne.multiplyByUniformScale(e.halfAxes,2,hae);return k.fromRotationTranslation(i,n,t)};const pae=new be;Ri.isOccluded=function(e,t){if(!c(e))throw new E("box is required.");if(!c(t))throw new E("occluder is required.");const n=be.fromOrientedBoundingBox(e,pae);return!t.isBoundingSphereVisible(n)},Ri.prototype.intersectPlane=function(e){return Ri.intersectPlane(this,e)},Ri.prototype.distanceSquaredTo=function(e){return Ri.distanceSquaredTo(this,e)},Ri.prototype.computePlaneDistances=function(e,t,n){return Ri.computePlaneDistances(this,e,t,n)},Ri.prototype.computeCorners=function(e){return Ri.computeCorners(this,e)},Ri.prototype.computeTransformation=function(e){return Ri.computeTransformation(this,e)},Ri.prototype.isOccluded=function(e){return Ri.isOccluded(this,e)},Ri.equals=function(e,t){return e===t||c(e)&&c(t)&&f.equals(e.center,t.center)&&ne.equals(e.halfAxes,t.halfAxes)},Ri.prototype.clone=function(e){return Ri.clone(this,e)},Ri.prototype.equals=function(e){return Ri.equals(this,e)};const Eo=Ri,cw={getHeight:function(e,t,n){return(e-n)*t+n}},mae=new f;cw.getPosition=function(e,t,n,i,o){const r=t.cartesianToCartographic(e,mae),s=cw.getHeight(r.height,n,i);return f.fromRadians(r.longitude,r.latitude,s,t,o)};const hp=cw,Vc=Object.freeze({NONE:0,BITS12:1}),c_=new f,_ae=new f,xl=new G,lw=new k,gae=new k,yae=Math.pow(2,12);function ha(e,t,n,i,o,r,s,a,l,u){let h,m,d=Vc.NONE;if(c(t)&&c(n)&&c(i)&&c(o)){const _=t.minimum,y=f.subtract(t.maximum,_,_ae),A=i-n;d=Math.max(f.maximumComponent(y),A)0,_=g(e.isGeographic,!0),p=g(e.ellipsoid,ge.WGS84),y=1/p.maximumRadius,A=Ce.clone(e.nativeRectangle),x=Ce.clone(e.rectangle);let C,w,v,D;c(x)?(C=x.west,w=x.south,v=x.east,D=x.north):_?(C=a(A.west),w=a(A.south),v=a(A.east),D=a(A.north)):(C=A.west*y,w=s-2*o(r(-A.south*y)),v=A.east*y,D=s-2*o(r(-A.north*y)));let P=e.relativeToCenter;const N=c(P);P=N?P:f.ZERO;const R=g(e.includeWebMercatorT,!1),B=g(e.exaggeration,1),F=g(e.exaggerationRelativeHeight,0),I=1!==B,L=g(e.structure,vd.DEFAULT_STRUCTURE),M=g(L.heightScale,vd.DEFAULT_STRUCTURE.heightScale),U=g(L.heightOffset,vd.DEFAULT_STRUCTURE.heightOffset),z=g(L.elementsPerHeight,vd.DEFAULT_STRUCTURE.elementsPerHeight),j=g(L.stride,vd.DEFAULT_STRUCTURE.stride),W=g(L.elementMultiplier,vd.DEFAULT_STRUCTURE.elementMultiplier),q=g(L.isBigEndian,vd.DEFAULT_STRUCTURE.isBigEndian);let V=Ce.computeWidth(A),$=Ce.computeHeight(A);const Z=V/(u-1),ie=$/(d-1);_||(V*=y,$*=y);const Y=p.radiiSquared,Q=Y.x,K=Y.y,me=Y.z;let we=65536,le=-65536;const Ae=Rn.eastNorthUpToFixedFrame(P,p),xe=k.inverseTransformation(Ae,Aae);let De,qe;R&&(De=or.geodeticLatitudeToMercatorAngle(w),qe=1/(or.geodeticLatitudeToMercatorAngle(D)-De));const $e=Tae;$e.x=Number.POSITIVE_INFINITY,$e.y=Number.POSITIVE_INFINITY,$e.z=Number.POSITIVE_INFINITY;const ot=xae;ot.x=Number.NEGATIVE_INFINITY,ot.y=Number.NEGATIVE_INFINITY,ot.z=Number.NEGATIVE_INFINITY;let kt=Number.POSITIVE_INFINITY;const sn=u*d,Lt=sn+(h>0?2*u+2*d:0),On=new Array(Lt),ii=new Array(Lt),an=new Array(Lt),en=R?new Array(Lt):[],he=I?new Array(Lt):[];let Te=0,dn=d,Dt=0,Wi=u;m&&(--Te,++dn,--Dt,++Wi);const Co=1e-5;for(let rt=Te;rt=d&&(Ut=d-1);let nn=A.north-ie*Ut;nn=_?a(nn):s-2*o(r(-nn*y));let Ln=(nn-w)/(D-w);Ln=O.clamp(Ln,0,1);const yo=rt===Te,jo=rt===dn-1;h>0&&(yo?nn+=Co*$:jo&&(nn-=Co*$));const ka=t(nn),Ua=n(nn),mr=me*Ua;let Qi;R&&(Qi=(or.geodeticLatitudeToMercatorAngle(nn)-De)*qe);for(let zs=Dt;zs=u&&(oi=u-1);const Kn=Ut*(u*j)+oi*j;let si;if(1===z)si=l[Kn];else{let mu;if(si=0,q)for(mu=0;mu=0;--mu)si=si*W+l[Kn+mu]}si=si*M+U,le=Math.max(le,si),we=Math.min(we,si);let Ui=A.west+Z*oi;_?Ui=a(Ui):Ui*=y;let Wr=(Ui-C)/(v-C);Wr=O.clamp(Wr,0,1);let uc=Ut*u+oi;if(h>0){const mu=zs===Dt,eU=zs===Wi-1,Hot=yo||jo||mu||eU;if((yo||jo)&&(mu||eU))continue;Hot&&(si-=h,mu?(uc=sn+(d-Ut-1),Ui-=Co*V):jo?uc=sn+d+(u-oi-1):eU?(uc=sn+d+u+Ut,Ui+=Co*V):yo&&(uc=sn+d+u+d+oi))}const aa=ka*t(Ui),za=ka*n(Ui),uy=Q*aa,qr=K*za,gd=1/i(uy*aa+qr*za+mr*Ua),L1=uy*gd,Bc=qr*gd,dy=mr*gd,qm=new f;qm.x=L1+aa*si,qm.y=Bc+za*si,qm.z=dy+Ua*si,k.multiplyByPoint(xe,qm,FP),f.minimumByComponent(FP,$e,$e),f.maximumByComponent(FP,ot,ot),kt=Math.min(kt,si),On[uc]=qm,an[uc]=new G(Wr,Ln),ii[uc]=si,R&&(en[uc]=Qi),I&&(he[uc]=p.geodeticSurfaceNormal(qm))}}const bl=be.fromPoints(On);let ra,sa;c(x)&&(ra=Eo.fromRectangle(x,we,le,p)),N&&(sa=new tP(p).computeHorizonCullingPointPossiblyUnderEllipsoid(P,On,we));const Ba=new Q1($e,ot,P),Qe=new Iy(P,Ba,kt,le,Ae,!1,R,I,B,F),dt=new Float32Array(Lt*Qe.stride);let ut=0;for(let rt=0;rt{e.onmessage=function(o){const r=o.data.array,s=c(r)&&r[0]===t;i(s),e.terminate(),Gs._canTransferArrayBuffer=s}})}return Gs._canTransferArrayBuffer}const BP=new Ue;function kP(e){let t;try{t=new Blob([e],{type:"application/javascript"})}catch{const r=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);r.append(e),t=r.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(t)}function UP(e){const t=new Hs(e),n=0!==t.scheme().length&&0===t.fragment().length,i={};let o;if(RU(e))return o=kP(`importScripts("${e}");`),new Worker(o,i);const r=e.replace(/\.js$/,"");if(!n&&typeof CESIUM_WORKERS<"u"){const s=`\n importScripts("${kP(CESIUM_WORKERS)}");\n CesiumWorkers["${r}"]();\n `;return o=kP(s),new Worker(o,i)}if(o=e,n||(o=ni(`${Gs._workerModulePrefix+r}.js`)),!zn.supportsEsmWebWorkers())throw new Ie("This browser is not supported. Please update your browser to continue.");return i.type="module",new Worker(o,i)}function zP(){return(zP=(0,Pe.Z)(function*(e,t){const n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!zn.supportsWebAssembly()){if(!c(t.fallbackModulePath))throw new Ie(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=ni(t.fallbackModulePath),n}n.wasmBinaryFile=ni(t.wasmBinaryFile);const i=yield jt.fetchArrayBuffer({url:n.wasmBinaryFile});return n.wasmBinary=i,n})).apply(this,arguments)}function Gs(e,t){this._workerPath=e,this._maximumActiveTasks=g(t,Number.POSITIVE_INFINITY),this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}const Sae=(e,t,n,i)=>{const o=({data:r})=>{if(r.id===t){if(c(r.error)){let s=r.error;"RuntimeError"===s.name?(s=new Ie(r.error.message),s.stack=r.error.stack):"DeveloperError"===s.name?(s=new E(r.error.message),s.stack=r.error.stack):"Error"===s.name&&(s=new Error(r.error.message),s.stack=r.error.stack),BP.raiseEvent(s),i(s)}else BP.raiseEvent(),n(r.result);e.removeEventListener("message",o)}};return o},vae=[];function VP(){return(VP=(0,Pe.Z)(function*(e,t,n){const i=yield Promise.resolve(Iz());c(n)?i||(n.length=0):n=vae;const o=e._nextID++,r=new Promise((s,a)=>{e._worker.addEventListener("message",Sae(e._worker,o,s,a))});return e._worker.postMessage({id:o,baseUrl:ni.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),r})).apply(this,arguments)}function HP(){return HP=(0,Pe.Z)(function*(e,t,n){++e._activeTasks;try{const i=yield function Dae(e,t,n){return VP.apply(this,arguments)}(e,t,n);return--e._activeTasks,i}catch(i){throw--e._activeTasks,i}}),HP.apply(this,arguments)}Gs.prototype.scheduleTask=function(e,t){if(c(this._worker)||(this._worker=UP(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return function Iae(e,t,n){return HP.apply(this,arguments)}(this,e,t)},Gs.prototype.initWebAssemblyModule=function(){var e=(0,Pe.Z)(function*(t){var n=this;if(c(this._webAssemblyPromise))return this._webAssemblyPromise;const i=function(){var o=(0,Pe.Z)(function*(){const r=n._worker=UP(n._workerPath),s=yield function wae(e,t){return zP.apply(this,arguments)}(n,t),a=yield Promise.resolve(Iz());let l;const u=s.wasmBinary;c(u)&&a&&(l=[u]);const d=new Promise((h,m)=>{r.onmessage=function({data:_}){c(_)?h(_.result):m(new Ie("Could not configure wasm module"))}});return r.postMessage({canTransferArrayBuffer:a,parameters:{webAssemblyConfig:s}},l),d});return function(){return o.apply(this,arguments)}}();return this._webAssemblyPromise=i(),this._webAssemblyPromise});return function(t){return e.apply(this,arguments)}}(),Gs.prototype.isDestroyed=function(){return!1},Gs.prototype.destroy=function(){return c(this._worker)&&this._worker.terminate(),Ye(this)},Gs.taskCompletedEvent=BP,Gs._workerModulePrefix=Gs._defaultWorkerModulePrefix="Workers/",Gs._canTransferArrayBuffer=void 0;const pa=Gs;function pp(){E.throwInstantiationError()}Object.defineProperties(pp.prototype,{credits:{get:E.throwInstantiationError},waterMask:{get:E.throwInstantiationError}}),pp.prototype.interpolateHeight=E.throwInstantiationError,pp.prototype.isChildAvailable=E.throwInstantiationError,pp.prototype.createMesh=E.throwInstantiationError,pp.prototype.upsample=E.throwInstantiationError,pp.prototype.wasCreatedByUpsampling=E.throwInstantiationError,pp.maximumAsynchronousTasks=5;const GP=pp,fw=function Pae(e,t,n,i,o,r,s,a,l,u,d,h,m,_,p,y){this.center=e,this.vertices=t,this.stride=g(u,6),this.indices=n,this.indexCountWithoutSkirts=i,this.vertexCountWithoutSkirts=o,this.minimumHeight=r,this.maximumHeight=s,this.boundingSphere3D=a,this.occludeePointInScaledSpace=l,this.orientedBoundingBox=d,this.encoding=h,this.westIndicesSouthToNorth=m,this.southIndicesEastToWest=_,this.eastIndicesNorthToSouth=p,this.northIndicesWestToEast=y},cs={UNSIGNED_BYTE:oe.UNSIGNED_BYTE,UNSIGNED_SHORT:oe.UNSIGNED_SHORT,UNSIGNED_INT:oe.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case cs.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case cs.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case cs.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new E("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return cs.UNSIGNED_SHORT;case 4:return cs.UNSIGNED_INT;case 1:return cs.UNSIGNED_BYTE;default:throw new E("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return c(e)&&(e===cs.UNSIGNED_BYTE||e===cs.UNSIGNED_SHORT||e===cs.UNSIGNED_INT)},createTypedArray:function(e,t){if(!c(e))throw new E("numberOfVertices is required.");return e>=O.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,n,i){if(!c(e))throw new E("numberOfVertices is required.");if(!c(t))throw new E("sourceArray is required.");if(!c(n))throw new E("byteOffset is required.");return e>=O.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)},fromTypedArray:function(e){if(e instanceof Uint8Array)return cs.UNSIGNED_BYTE;if(e instanceof Uint16Array)return cs.UNSIGNED_SHORT;if(e instanceof Uint32Array)return cs.UNSIGNED_INT;throw new E("array must be a Uint8Array, Uint16Array, or Uint32Array.")}},Ot=Object.freeze(cs);function Ga(){E.throwInstantiationError()}Object.defineProperties(Ga.prototype,{errorEvent:{get:E.throwInstantiationError},credit:{get:E.throwInstantiationError},tilingScheme:{get:E.throwInstantiationError},hasWaterMask:{get:E.throwInstantiationError},hasVertexNormals:{get:E.throwInstantiationError},availability:{get:E.throwInstantiationError}});const Pz=[];Ga.getRegularGridIndices=function(e,t){if(e*t>=O.FOUR_GIGABYTES)throw new E("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=Pz[e];c(n)||(Pz[e]=n=[]);let i=n[t];return c(i)||(i=n[t]=e*t=O.FOUR_GIGABYTES)throw new E("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=Oz[e];c(n)||(Oz[e]=n=[]);let i=n[t];if(!c(i)){const o=Ga.getRegularGridIndices(e,t),r=Rz(e,t);i=n[t]={indices:o,westIndicesSouthToNorth:r.westIndicesSouthToNorth,southIndicesEastToWest:r.southIndicesEastToWest,eastIndicesNorthToSouth:r.eastIndicesNorthToSouth,northIndicesWestToEast:r.northIndicesWestToEast}}return i};const Lz=[];function Rz(e,t){const n=new Array(t),i=new Array(e),o=new Array(t),r=new Array(e);let s;for(s=0;s=O.FOUR_GIGABYTES)throw new E("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=Lz[e];c(n)||(Lz[e]=n=[]);let i=n[t];if(!c(i)){const o=e*t,r=(e-1)*(t-1)*6,s=2*e+2*t,l=o+s,u=r+6*Math.max(0,s-4),d=Rz(e,t),h=d.westIndicesSouthToNorth,m=d.southIndicesEastToWest,_=d.eastIndicesNorthToSouth,p=d.northIndicesWestToEast,y=Ot.createTypedArray(l,u);Nz(e,t,y,0),Ga.addSkirtIndices(h,m,_,p,o,y,r),i=n[t]={indices:y,westIndicesSouthToNorth:h,southIndicesEastToWest:m,eastIndicesNorthToSouth:_,northIndicesWestToEast:p,indexCountWithoutSkirts:r}}return i},Ga.addSkirtIndices=function(e,t,n,i,o,r,s){let a=o;s=hw(e,a,r,s),a+=e.length,s=hw(t,a,r,s),a+=t.length,s=hw(n,a,r,s),a+=n.length,hw(i,a,r,s)},Ga.heightmapTerrainQuality=.25,Ga.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return 2*e.maximumRadius*Math.PI*Ga.heightmapTerrainQuality/(t*n)},Ga.prototype.requestTileGeometry=E.throwInstantiationError,Ga.prototype.getLevelMaximumGeometricError=E.throwInstantiationError,Ga.prototype.getTileDataAvailable=E.throwInstantiationError,Ga.prototype.loadTileDataAvailability=E.throwInstantiationError;const Nf=Ga;function Mf(e){if(!c(e)||!c(e.buffer))throw new E("options.buffer is required.");if(!c(e.width))throw new E("options.width is required.");if(!c(e.height))throw new E("options.height is required.");this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=g(e.childTileMask,15),this._encoding=g(e.encoding,ME.NONE);const t=Dz.DEFAULT_STRUCTURE;let n=e.structure;c(n)?n!==t&&(n.heightScale=g(n.heightScale,t.heightScale),n.heightOffset=g(n.heightOffset,t.heightOffset),n.elementsPerHeight=g(n.elementsPerHeight,t.elementsPerHeight),n.stride=g(n.stride,t.stride),n.elementMultiplier=g(n.elementMultiplier,t.elementMultiplier),n.isBigEndian=g(n.isBigEndian,t.isBigEndian)):n=t,this._structure=n,this._createdByUpsampling=g(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===ME.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(Mf.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});const Mz="createVerticesFromHeightmap",Oae=new pa(Mz),Lae=new pa(Mz,GP.maximumAsynchronousTasks);function Fz(e,t,n,i,o,r,s,a,l){const u=(a-o.west)*(r-1)/(o.east-o.west),d=(l-o.south)*(s-1)/(o.north-o.south);let h=0|u,m=h+1;m>=r&&(m=r-1,h=r-2);let _=0|d,p=_+1;p>=s&&(p=s-1,_=s-2);const A=d-_;return _=s-1-_,p=s-1-p,Bz(u-h,A,(t.decodeHeight(e,_*r+h)-n)/i,(t.decodeHeight(e,_*r+m)-n)/i,(t.decodeHeight(e,p*r+h)-n)/i,(t.decodeHeight(e,p*r+m)-n)/i)}function Bz(e,t,n,i,o,r){return t=0;--a)s=s*n+e[r+a];return s}function Nae(e,t,n,i,o,r,s,a){let l;if(s*=o,r)for(l=0;l0;--l)e[s+l]=a/i|0,a-=e[s+l]*i,i/=n;e[s+l]=a}Mf.prototype.createMesh=function(e){e=g(e,g.EMPTY_OBJECT),T.typeOf.object("options.tilingScheme",e.tilingScheme),T.typeOf.number("options.x",e.x),T.typeOf.number("options.y",e.y),T.typeOf.number("options.level",e.level);const t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=g(e.exaggeration,1),s=g(e.exaggerationRelativeHeight,0),a=g(e.throttle,!0),l=t.ellipsoid,u=t.tileXYToNativeRectangle(n,i,o),d=t.tileXYToRectangle(n,i,o),h=l.cartographicToCartesian(Ce.center(d)),m=this._structure,p=Nf.getEstimatedLevelZeroGeometricErrorForAHeightmap(l,this._width,t.getNumberOfXTilesAtLevel(0))/(1<0?Nf.getRegularGridAndSkirtIndicesAndEdgeIndices(C.gridWidth,C.gridHeight):Nf.getRegularGridIndicesAndEdgeIndices(C.gridWidth,C.gridHeight);const v=C.gridWidth*C.gridHeight;return x._mesh=new fw(h,new Float32Array(C.vertices),w.indices,w.indexCountWithoutSkirts,v,C.minimumHeight,C.maximumHeight,be.clone(C.boundingSphere3D),f.clone(C.occludeePointInScaledSpace),C.numberOfAttributes,Eo.clone(C.orientedBoundingBox),Iy.clone(C.encoding),w.westIndicesSouthToNorth,w.southIndicesEastToWest,w.eastIndicesNorthToSouth,w.northIndicesWestToEast),x._buffer=void 0,x._mesh})},Mf.prototype._createMeshSync=function(e){T.typeOf.object("options.tilingScheme",e.tilingScheme),T.typeOf.number("options.x",e.x),T.typeOf.number("options.y",e.y),T.typeOf.number("options.level",e.level);const t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=g(e.exaggeration,1),s=g(e.exaggerationRelativeHeight,0),a=t.ellipsoid,l=t.tileXYToNativeRectangle(n,i,o),u=t.tileXYToRectangle(n,i,o),d=a.cartographicToCartesian(Ce.center(u)),h=this._structure,_=Nf.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<0?Nf.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):Nf.getRegularGridIndicesAndEdgeIndices(this._width,this._height),this._mesh=new fw(d,p.vertices,y.indices,y.indexCountWithoutSkirts,p.gridWidth*p.gridHeight,p.minimumHeight,p.maximumHeight,p.boundingSphere3D,p.occludeePointInScaledSpace,p.encoding.stride,p.orientedBoundingBox,p.encoding,y.westIndicesSouthToNorth,y.southIndicesEastToWest,y.eastIndicesNorthToSouth,y.northIndicesWestToEast),this._mesh},Mf.prototype.interpolateHeight=function(e,t,n){const i=this._width,o=this._height,r=this._structure,s=r.stride,a=r.elementsPerHeight,l=r.elementMultiplier,u=r.isBigEndian,d=r.heightOffset,h=r.heightScale,m=c(this._mesh);if(!m&&this._encoding===ME.LERC)return;let y;return m?y=Fz(this._mesh.vertices,this._mesh.encoding,d,h,e,i,o,t,n):(y=function Rae(e,t,n,i,o,r,s,a,l,u){const d=(l-r.west)*(s-1)/(r.east-r.west),h=(u-r.south)*(a-1)/(r.north-r.south);let m=0|d,_=m+1;_>=s&&(_=s-1,m=s-2);let p=0|h,y=p+1;y>=a&&(y=a-1,p=a-2);const x=h-p;p=a-1-p,y=a-1-y;return Bz(d-m,x,pw(e,t,n,i,o,p*s+m),pw(e,t,n,i,o,p*s+_),pw(e,t,n,i,o,y*s+m),pw(e,t,n,i,o,y*s+_))}(this._buffer,a,l,s,u,e,i,o,t,n),y=y*h+d),y},Mf.prototype.upsample=function(e,t,n,i,o,r,s){if(!c(e))throw new E("tilingScheme is required.");if(!c(t))throw new E("thisX is required.");if(!c(n))throw new E("thisY is required.");if(!c(i))throw new E("thisLevel is required.");if(!c(o))throw new E("descendantX is required.");if(!c(r))throw new E("descendantY is required.");if(!c(s))throw new E("descendantLevel is required.");if(s-i>1)throw new E("Upsampling through more than one level at a time is not currently supported.");const l=this._mesh;if(!c(l))return;const u=this._width,d=this._height,h=this._structure,m=h.stride,_=new this._bufferType(u*d*m),p=l.vertices,y=l.encoding,A=e.tileXYToRectangle(t,n,i),x=e.tileXYToRectangle(o,r,s),C=h.heightOffset,w=h.heightScale,v=h.elementsPerHeight,D=h.elementMultiplier,P=h.isBigEndian,N=Math.pow(D,v-1);for(let R=0;Rh.highestEncodedHeight?h.highestEncodedHeight:I,Nae(_,v,D,N,m,P,R*u+F,I)}}return Promise.resolve(new Mf({buffer:_,width:u,height:d,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))},Mf.prototype.isChildAvailable=function(e,t,n,i){if(!c(e))throw new E("thisX is required.");if(!c(t))throw new E("thisY is required.");if(!c(n))throw new E("childX is required.");if(!c(i))throw new E("childY is required.");let o=2;return n!==2*e&&++o,i!==2*t&&(o-=2),0!=(this._childTileMask&1< 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.',!0)),WP};const l_=mw;function ja(e,t){let n;T.defined("endpoint",e),T.defined("endpointResource",t);const i=e.externalType,o=c(i);if(o){if("3DTILES"!==i&&"STK_TERRAIN_SERVER"!==i)throw new Ie("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");n={url:e.options.url}}else n={url:e.url,retryAttempts:1,retryCallback:Mae};jt.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new Hs(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}function Mae(e,t){const n=g(e._ionRoot,e),i=n._ionEndpointResource,o=typeof Image<"u";return c(t)&&(401===t.statusCode||o&&t.target instanceof Image)?(c(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})):Promise.resolve(!1)}c(Object.create)&&((ja.prototype=Object.create(jt.prototype)).constructor=ja),ja.fromAssetId=function(e,t){const n=ja._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new ja(i,n)})},Object.defineProperties(ja.prototype,{credits:{get:function(){return c(this._ionRoot)?this._ionRoot.credits:(c(this._credits)||(this._credits=ja.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource)),this._credits)}}}),ja.getCreditsFromEndpoint=function(e,t){const n=e.attributions.map(qn.getIonCredit),i=l_.getDefaultTokenCredit(t.queryParameters.access_token);return c(i)&&n.push(qn.clone(i)),n},ja.prototype.clone=function(e){const t=g(this._ionRoot,this);return c(e)||(e=new ja(t._ionEndpoint,t._ionEndpointResource)),(e=jt.prototype.clone.call(this,e))._ionRoot=t,e._isExternal=this._isExternal,e},ja.prototype.fetchImage=function(e){if(!this._isExternal){const t=e;e={preferBlob:!0},c(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return jt.prototype.fetchImage.call(this,e)},ja.prototype._makeRequest=function(e){return this._isExternal||new Hs(this.url).authority()!==this._ionEndpointDomain||(c(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)),jt.prototype._makeRequest.call(this,e)},ja._createEndpointResource=function(e,t){T.defined("assetId",e),t=g(t,g.EMPTY_OBJECT);let n=g(t.server,l_.defaultServer);const i=g(t.accessToken,l_.defaultAccessToken);n=jt.createIfNeeded(n);const o={url:`v1/assets/${e}/endpoint`};return c(i)&&(o.queryParameters={access_token:i}),n.getDerivedResource(o)};const kA=ja,_w={clipTriangleAtAxisAlignedThreshold:function(e,t,n,i,o,r){if(!c(e))throw new E("threshold is required.");if(!c(t))throw new E("keepAbove is required.");if(!c(n))throw new E("u0 is required.");if(!c(i))throw new E("u1 is required.");if(!c(o))throw new E("u2 is required.");let s,a,l;c(r)?r.length=0:r=[],t?(s=ne,a=i>e,l=o>e);const u=s+a+l;let d,h,m,_,p,y;return 1===u?s?(d=(e-n)/(i-n),h=(e-n)/(o-n),r.push(1),r.push(2),1!==h&&(r.push(-1),r.push(0),r.push(2),r.push(h)),1!==d&&(r.push(-1),r.push(0),r.push(1),r.push(d))):a?(m=(e-i)/(o-i),_=(e-i)/(n-i),r.push(2),r.push(0),1!==_&&(r.push(-1),r.push(1),r.push(0),r.push(_)),1!==m&&(r.push(-1),r.push(1),r.push(2),r.push(m))):l&&(p=(e-o)/(n-o),y=(e-o)/(i-o),r.push(0),r.push(1),1!==y&&(r.push(-1),r.push(2),r.push(1),r.push(y)),1!==p&&(r.push(-1),r.push(2),r.push(0),r.push(p))):2===u?s||n===e?a||i===e?!l&&o!==e&&(h=(e-n)/(o-n),m=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(h),r.push(-1),r.push(1),r.push(2),r.push(m)):(y=(e-o)/(i-o),d=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(y),r.push(-1),r.push(0),r.push(1),r.push(d)):(_=(e-i)/(n-i),p=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(_),r.push(-1),r.push(2),r.push(0),r.push(p)):3!==u&&(r.push(0),r.push(1),r.push(2)),r},computeBarycentricCoordinates:function(e,t,n,i,o,r,s,a,l){if(!c(e))throw new E("x is required.");if(!c(t))throw new E("y is required.");if(!c(n))throw new E("x1 is required.");if(!c(i))throw new E("y1 is required.");if(!c(o))throw new E("x2 is required.");if(!c(r))throw new E("y2 is required.");if(!c(s))throw new E("x3 is required.");if(!c(a))throw new E("y3 is required.");const u=n-s,d=s-o,h=r-a,m=i-a,_=1/(h*u+d*m),p=t-a,y=e-s,A=(h*y+d*p)*_,x=(-m*y+u*p)*_,C=1-A-x;return c(l)?(l.x=A,l.y=x,l.z=C,l):new f(A,x,C)},computeLineSegmentLineSegmentIntersection:function(e,t,n,i,o,r,s,a,l){T.typeOf.number("x00",e),T.typeOf.number("y00",t),T.typeOf.number("x01",n),T.typeOf.number("y01",i),T.typeOf.number("x10",o),T.typeOf.number("y10",r),T.typeOf.number("x11",s),T.typeOf.number("y11",a);const h=(a-r)*(n-e)-(s-o)*(i-t);if(0===h)return;const m=((s-o)*(t-r)-(a-r)*(e-o))/h,_=((n-e)*(t-r)-(i-t)*(e-o))/h;return m>=0&&m<=1&&_>=0&&_<=1?(c(l)||(l=new G),l.x=e+m*(n-e),l.y=t+m*(i-t),l):void 0}},Uz=_w;function mp(e){if(!c(e)||!c(e.quantizedVertices))throw new E("options.quantizedVertices is required.");if(!c(e.indices))throw new E("options.indices is required.");if(!c(e.minimumHeight))throw new E("options.minimumHeight is required.");if(!c(e.maximumHeight))throw new E("options.maximumHeight is required.");if(!c(e.maximumHeight))throw new E("options.maximumHeight is required.");if(!c(e.boundingSphere))throw new E("options.boundingSphere is required.");if(!c(e.horizonOcclusionPoint))throw new E("options.horizonOcclusionPoint is required.");if(!c(e.westIndices))throw new E("options.westIndices is required.");if(!c(e.southIndices))throw new E("options.southIndices is required.");if(!c(e.eastIndices))throw new E("options.eastIndices is required.");if(!c(e.northIndices))throw new E("options.northIndices is required.");if(!c(e.westSkirtHeight))throw new E("options.westSkirtHeight is required.");if(!c(e.southSkirtHeight))throw new E("options.southSkirtHeight is required.");if(!c(e.eastSkirtHeight))throw new E("options.eastSkirtHeight is required.");if(!c(e.northSkirtHeight))throw new E("options.northSkirtHeight is required.");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;const t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);function o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._heightValues=this._quantizedVertices.subarray(2*t,3*t),this._westIndices=yw(e.westIndices,o,t),this._southIndices=yw(e.southIndices,r,t),this._eastIndices=yw(e.eastIndices,o,t),this._northIndices=yw(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=g(e.childTileMask,15),this._createdByUpsampling=g(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(mp.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return c(this._mesh)}}});const gw=[];function yw(e,t,n){gw.length=e.length;let i=!1;for(let o=0,r=e.length;o0&&t(e[o-1],e[o])>0;return i?(gw.sort(t),Ot.createTypedArray(n,gw)):e}const zz="createVerticesFromQuantizedTerrainMesh",Fae=new pa(zz),Bae=new pa(zz,GP.maximumAsynchronousTasks);mp.prototype.createMesh=function(e){e=g(e,g.EMPTY_OBJECT),T.typeOf.object("options.tilingScheme",e.tilingScheme),T.typeOf.number("options.x",e.x),T.typeOf.number("options.y",e.y),T.typeOf.number("options.level",e.level);const t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=g(e.exaggeration,1),s=g(e.exaggerationRelativeHeight,0),a=g(e.throttle,!0),l=t.ellipsoid,u=t.tileXYToRectangle(n,i,o),h=(a?Bae:Fae).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:u,relativeToCenter:this._boundingSphere.center,ellipsoid:l,exaggeration:r,exaggerationRelativeHeight:s});if(!c(h))return;const m=this;return Promise.resolve(h).then(function(_){const p=m._quantizedVertices.length/3,A=Ot.createTypedArray(p+m._westIndices.length+m._southIndices.length+m._eastIndices.length+m._northIndices.length,_.indices),x=new Float32Array(_.vertices),C=_.center,w=_.minimumHeight,v=_.maximumHeight,D=m._boundingSphere,P=m._orientedBoundingBox,N=g(f.clone(_.occludeePointInScaledSpace),m._horizonOcclusionPoint),R=_.vertexStride,B=Iy.clone(_.encoding);return m._mesh=new fw(C,x,A,_.indexCountWithoutSkirts,p,w,v,D,N,R,P,B,_.westIndicesSouthToNorth,_.southIndicesEastToWest,_.eastIndicesNorthToSouth,_.northIndicesWestToEast),m._quantizedVertices=void 0,m._encodedNormals=void 0,m._indices=void 0,m._uValues=void 0,m._vValues=void 0,m._heightValues=void 0,m._westIndices=void 0,m._southIndices=void 0,m._eastIndices=void 0,m._northIndices=void 0,m._mesh})};const kae=new pa("upsampleQuantizedTerrainMesh",GP.maximumAsynchronousTasks);mp.prototype.upsample=function(e,t,n,i,o,r,s){if(!c(e))throw new E("tilingScheme is required.");if(!c(t))throw new E("thisX is required.");if(!c(n))throw new E("thisY is required.");if(!c(i))throw new E("thisLevel is required.");if(!c(o))throw new E("descendantX is required.");if(!c(r))throw new E("descendantY is required.");if(!c(s))throw new E("descendantLevel is required.");if(s-i>1)throw new E("Upsampling through more than one level at a time is not currently supported.");const l=this._mesh;if(!c(this._mesh))return;const u=2*t!==o,d=2*n===r,h=e.ellipsoid,m=e.tileXYToRectangle(o,r,s),_=kae.scheduleTask({vertices:l.vertices,vertexCountWithoutSkirts:l.vertexCountWithoutSkirts,indices:l.indices,indexCountWithoutSkirts:l.indexCountWithoutSkirts,encoding:l.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:u,isNorthChild:d,childRectangle:m,ellipsoid:h});if(!c(_))return;let p=Math.min(this._westSkirtHeight,this._eastSkirtHeight);p=Math.min(p,this._southSkirtHeight),p=Math.min(p,this._northSkirtHeight);const y=u?.5*p:this._westSkirtHeight,A=d?.5*p:this._southSkirtHeight,x=u?this._eastSkirtHeight:.5*p,C=d?this._northSkirtHeight:.5*p,w=this._credits;return Promise.resolve(_).then(function(v){const D=new Uint16Array(v.vertices),P=Ot.createTypedArray(D.length/3,v.indices);let N;return c(v.encodedNormals)&&(N=new Uint8Array(v.encodedNormals)),new mp({quantizedVertices:D,indices:P,encodedNormals:N,minimumHeight:v.minimumHeight,maximumHeight:v.maximumHeight,boundingSphere:be.clone(v.boundingSphere),orientedBoundingBox:Eo.clone(v.orientedBoundingBox),horizonOcclusionPoint:f.clone(v.horizonOcclusionPoint),westIndices:v.westIndices,southIndices:v.southIndices,eastIndices:v.eastIndices,northIndices:v.northIndices,westSkirtHeight:y,southSkirtHeight:A,eastSkirtHeight:x,northSkirtHeight:C,childTileMask:0,credits:w,createdByUpsampling:!0})})};const Vz=new f;function Hz(e,t,n,i,o,r,s,a){const l=Math.min(n,o,s),u=Math.max(n,o,s),d=Math.min(i,r,a),h=Math.max(i,r,a);return e>=l&&e<=u&&t>=d&&t<=h}mp.prototype.interpolateHeight=function(e,t,n){let i=O.clamp((t-e.west)/e.width,0,1);i*=32767;let o=O.clamp((n-e.south)/e.height,0,1);return o*=32767,c(this._mesh)?function Hae(e,t,n){const i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,l=s.length;a=-1e-15&&y.y>=-1e-15&&y.z>=-1e-15){const A=r.decodeHeight(o,u),x=r.decodeHeight(o,d),C=r.decodeHeight(o,h);return y.x*A+y.y*x+y.z*C}}}}(this,i,o):function Gae(e,t,n){const i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,l=s.length;a=-1e-15&&C.y>=-1e-15&&C.z>=-1e-15)return O.lerp(e._minimumHeight,e._maximumHeight,(C.x*r[u]+C.y*r[d]+C.z*r[h])/32767)}}}(this,i,o)};const Uae=new G,zae=new G,Vae=new G;mp.prototype.isChildAvailable=function(e,t,n,i){if(!c(e))throw new E("thisX is required.");if(!c(t))throw new E("thisY is required.");if(!c(n))throw new E("childX is required.");if(!c(i))throw new E("childY is required.");let o=2;return n!==2*e&&++o,i!==2*t&&(o-=2),0!=(this._childTileMask&1<=0;--i)if(c(n[i])&&0===n[i].length)return i;return 0};const Gz=new Se;function Oy(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}function $ae(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function YP(e,t){const n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east);return i=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function Ly(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function UA(e,t,n){let i=0,o=!1;for(;!o;){const r=t._nw&&Ly(t._nw.extent,n),s=t._ne&&Ly(t._ne.extent,n),a=t._sw&&Ly(t._sw.extent,n),l=t._se&&Ly(t._se.extent,n);if(r+s+a+l>1){r&&(i=Math.max(i,UA(t,t._nw,n))),s&&(i=Math.max(i,UA(t,t._ne,n))),a&&(i=Math.max(i,UA(t,t._sw,n))),l&&(i=Math.max(i,UA(t,t._se,n)));break}r?t=t._nw:s?t=t._ne:a?t=t._sw:l?t=t._se:o=!0}for(;t!==e;){const r=t.rectangles;for(let s=r.length-1;s>=0&&r[s].level>i;--s){const a=r[s];Ly(a,n)&&(i=a.level)}t=t.parent}return i}function zA(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}Py.prototype.isTileAvailable=function(e,t,n){const i=this._tilingScheme.tileXYToRectangle(t,n,e,u_);return Ce.center(i,Gz),this.computeMaximumLevelAtPosition(Gz)>=e},Py.prototype.computeChildMaskForTile=function(e,t,n){const 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},Object.defineProperties(Oy.prototype,{nw:{get:function(){return this._nw||(this._nw=new Oy(this.tilingScheme,this,this.level+1,2*this.x,2*this.y)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new Oy(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new Oy(this.tilingScheme,this,this.level+1,2*this.x,2*this.y+1)),this._sw}},se:{get:function(){return this._se||(this._se=new Oy(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y+1)),this._se}}});const Aw=Py,XP=function ece(e){let t;const n=e.name,i=e.message;t=c(n)&&c(i)?`${n}: ${i}`:e.toString();const o=e.stack;return c(o)&&(t+=`\n${o}`),t};function Tw(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=g(r,0),this.retry=!1,this.error=s}Tw.reportError=function(e,t,n,i,o,r,s,a){let l=e;return c(e)?(l.provider=t,l.message=i,l.x=o,l.y=r,l.level=s,l.retry=!1,l.error=a,++l.timesRetried):l=new Tw(t,i,o,r,s,0,a),c(n)&&n.numberOfListeners>0?n.raiseEvent(l):c(t)&&console.log(`An error occurred in "${t.constructor.name}": ${XP(i)}`),l},Tw.reportSuccess=function(e){c(e)&&(e.timesRetried=-1)};const Wa=Tw;function tce(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 jz(e){this.requestVertexNormals=g(e.requestVertexNormals,!1),this.requestWaterMask=g(e.requestWaterMask,!1),this.requestMetadata=g(e.requestMetadata,!0),this.ellipsoid=e.ellipsoid,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=[]}function Wz(e,t,n){return ZP.apply(this,arguments)}function ZP(){return(ZP=(0,Pe.Z)(function*(e,t,n){if(!t.format){const y="The tile format is not specified in the layer.json file.";throw e.previousError=Wa.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,y),new Ie(y)}if(!t.tiles||0===t.tiles.length){const y="The layer.json file does not specify any tile URL templates.";throw e.previousError=Wa.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,y),new Ie(y)}let i=!1,o=!1,r=!1,s=!0,a=!1;if("heightmap-1.0"===t.format)a=!0,c(e.heightmapStructure)||(e.heightmapStructure={heightScale:.2,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:65535}),o=!0,e.requestWaterMask=!0;else if(0!==t.format.indexOf("quantized-mesh-1.")){const y=`The tile format "${t.format}" is invalid or not supported.`;throw e.previousError=Wa.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,y),new Ie(y)}const l=t.tiles,u=t.maxzoom;if(e.overallMaxZoom=Math.max(e.overallMaxZoom,u),t.projection&&"EPSG:4326"!==t.projection){if("EPSG:3857"!==t.projection){const y=`The projection "${t.projection}" is invalid or not supported.`;throw e.previousError=Wa.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,y),new Ie(y)}e.tilingScheme=new Td({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid})}else e.tilingScheme=new Ad({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});if(e.levelZeroMaximumGeometricError=Nf.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.heightmapWidth,e.tilingScheme.getNumberOfXTilesAtLevel(0)),t.scheme&&"tms"!==t.scheme&&"slippyMap"!==t.scheme){const y=`The scheme "${t.scheme}" is invalid or not supported.`;throw e.previousError=Wa.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,y),new Ie(y)}let d;e.scheme=t.scheme,c(t.extensions)&&-1!==t.extensions.indexOf("octvertexnormals")?i=!0:c(t.extensions)&&-1!==t.extensions.indexOf("vertexnormals")&&(i=!0,s=!1),c(t.extensions)&&-1!==t.extensions.indexOf("watermask")&&(o=!0),c(t.extensions)&&-1!==t.extensions.indexOf("metadata")&&(r=!0);const h=t.metadataAvailability,m=t.available;let _;if(c(m)&&!c(h)){_=new Aw(e.tilingScheme,m.length);for(let y=0;y0&&(e.attribution+=" "),e.attribution+=t.attribution),e.layers.push(new tce({resource:e.lastResource,version:t.version,isHeightmap:a,tileUrlTemplates:l,availability:_,hasVertexNormals:i,hasWaterMask:o,hasMetadata:r,availabilityLevels:h,availabilityTilesLoaded:d,littleEndianExtensionSize:s}));const p=t.parentUrl;return!c(p)||(c(_)?(e.lastResource=e.lastResource.getDerivedResource({url:p}),e.lastResource.appendForwardSlash(),e.layerJsonResource=e.lastResource.getDerivedResource({url:"layer.json"}),yield KP(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0))})).apply(this,arguments)}function $P(){return($P=(0,Pe.Z)(function*(e,t,n){yield Wz(e,t,n);const i=e.overallAvailability.length;if(i>0){const o=e.availability=new Aw(e.tilingScheme,e.overallMaxZoom);for(let r=0;r0){const o=new qn(e.attribution);e.tileCredits.push(o)}return!0})).apply(this,arguments)}function KP(e,t){return QP.apply(this,arguments)}function QP(){return QP=(0,Pe.Z)(function*(e,t){try{const n=yield e.layerJsonResource.fetchJson();return function ice(e,t,n){return $P.apply(this,arguments)}(e,n,t)}catch(n){return c(n)&&404===n.statusCode?(yield Wz(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):function nce(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(c(t)&&(i+=`\n${t.message}`),e.previousError=Wa.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,i),e.previousError.retry)return KP(e,n);throw new Ie(i)}(e,n,t)}}),QP.apply(this,arguments)}function bu(e){e=g(e,g.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=g(e.requestVertexNormals,!1),this._requestWaterMask=g(e.requestWaterMask,!1),this._requestMetadata=g(e.requestMetadata,!0),this._errorEvent=new Ue;let t=e.credit;"string"==typeof t&&(t=new qn(t)),this._credit=t,this._availability=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._layers=void 0,this._tileCredits=void 0}jz.prototype.build=function(e){e._heightmapWidth=this.heightmapWidth,e._scheme=this.scheme;const t=c(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};const JP={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function qz(e){return c(e)&&0!==e.length?{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}:{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}}function Yz(e,t,n,i,o,r){if(!c(o))return Promise.reject(new Ie("Terrain tile doesn't exist"));const s=o.tileUrlTemplates;if(0===s.length)return;let a;a=e._scheme&&"tms"!==e._scheme?n:e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;const l=[];let u,d;e._requestVertexNormals&&o.hasVertexNormals&&l.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&l.push("watermask"),e._requestMetadata&&o.hasMetadata&&l.push("metadata");const h=s[(t+a+i)%s.length],m=o.resource;c(m._ionEndpoint)&&!c(m._ionEndpoint.externalType)?(0!==l.length&&(d={extensions:l.join("-")}),u=qz(void 0)):u=qz(l);const _=m.getDerivedResource({url:h,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:d,headers:u,request:r}).fetchArrayBuffer();return c(_)?_.then(function(p){return c(p)?c(e._heightmapStructure)?function oce(e,t,n,i,o){const r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new jP({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})}(e,p):function rce(e,t,n,i,o,r){const s=r.littleEndianExtensionSize;let a=0;const d=3*Float64Array.BYTES_PER_ELEMENT,h=4*Float64Array.BYTES_PER_ELEMENT,_=3*Uint16Array.BYTES_PER_ELEMENT;let y=Uint16Array.BYTES_PER_ELEMENT,A=3*y;const x=new DataView(t),C=new f(x.getFloat64(a,!0),x.getFloat64(a+8,!0),x.getFloat64(a+16,!0));a+=d;const w=x.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;const v=x.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;const D=new be(new f(x.getFloat64(a,!0),x.getFloat64(a+8,!0),x.getFloat64(a+16,!0)),x.getFloat64(a+d,!0));a+=h;const P=new f(x.getFloat64(a,!0),x.getFloat64(a+8,!0),x.getFloat64(a+16,!0));a+=d;const N=x.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;const R=new Uint16Array(t,a,3*N);a+=N*_,N>65536&&(y=Uint32Array.BYTES_PER_ELEMENT,A=3*y);const B=R.subarray(0,N),F=R.subarray(N,2*N),S=R.subarray(2*N,3*N);Fi.zigZagDeltaDecode(B,F,S),a%y!=0&&(a+=y-a%y);const I=x.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;const L=Ot.createTypedArrayFromArrayBuffer(N,t,a,3*I);a+=I*A;let M=0;const U=L.length;for(let le=0;le0){const qe=fc(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,xe).available;if(c(qe))for(let $e=0;$eh.promise))}return!c(r)&&a?l.then(()=>this.requestTileGeometry(e,t,n,i)):Yz(this,e,t,n,r,i)},Object.defineProperties(bu.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}}}),bu.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;const i=this._layers,o=i.length;for(let r=0;rthis._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;const i=this._layers,o=i.length;for(let r=0;rr?r:s-1}}sr.initialize=function(){let e=sr._initPromise;return c(e)||(e=jt.fetchJson(ni("Assets/approximateTerrainHeights.json")).then(function(t){sr._terrainHeights=t}),sr._initPromise=e),e},sr.getMinimumMaximumHeights=function(e,t){if(T.defined("rectangle",e),!c(sr._terrainHeights))throw new E("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=g(t,ge.WGS84);const n=Qz(e);let i=sr._defaultMinTerrainHeight,o=sr._defaultMaxTerrainHeight;if(c(n)){const s=sr._terrainHeights[`${n.level}-${n.x}-${n.y}`];c(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(Ce.northeast(e,$z),Xz),t.cartographicToCartesian(Ce.southwest(e,$z),Zz),f.midpoint(Zz,Xz,nO);const a=t.scaleToGeodeticSurface(nO,sce);if(c(a)){const l=f.distance(nO,a);i=Math.min(i,-l)}else i=sr._defaultMinTerrainHeight}return i=Math.max(sr._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}},sr.getBoundingSphere=function(e,t){if(T.defined("rectangle",e),!c(sr._terrainHeights))throw new E("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=g(t,ge.WGS84);const n=Qz(e);let i=sr._defaultMaxTerrainHeight;if(c(n)){const s=sr._terrainHeights[`${n.level}-${n.x}-${n.y}`];c(s)&&(i=s[1])}const o=be.fromRectangle3D(e,t,0);return be.fromRectangle3D(e,t,i,Kz),be.union(o,Kz,o)},sr._terrainHeightsMaxLevel=6,sr._defaultMaxTerrainHeight=9e3,sr._defaultMinTerrainHeight=-1e5,sr._terrainHeights=void 0,sr._initPromise=void 0,Object.defineProperties(sr,{initialized:{get:function(){return c(sr._terrainHeights)}}});const wo=sr;function iO(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),6*n<1?e+6*(t-e)*n:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function re(e,t,n,i){this.red=g(e,1),this.green=g(t,1),this.blue=g(n,1),this.alpha=g(i,1)}let oO,rO,Bf;re.fromCartesian4=function(e,t){return T.typeOf.object("cartesian",e),c(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(g(e,255)),t=re.byteToFloat(g(t,255)),n=re.byteToFloat(g(n,255)),i=re.byteToFloat(g(i,255)),c(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 T.typeOf.object("color",e),T.typeOf.number("alpha",t),c(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)},zn.supportsTypedArrays()&&(oO=new ArrayBuffer(4),rO=new Uint32Array(oO),Bf=new Uint8Array(oO)),re.fromRgba=function(e,t){return rO[0]=e,re.fromBytes(Bf[0],Bf[1],Bf[2],Bf[3],t)},re.fromHsl=function(e,t,n,i,o){e=g(e,0)%1,t=g(t,0),n=g(n,0),i=g(i,1);let r=n,s=n,a=n;if(0!==t){let l;l=n<.5?n*(1+t):n+t-n*t;const u=2*n-l;r=iO(u,l,e+1/3),s=iO(u,l,e),a=iO(u,l,e-1/3)}return c(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){let n=(e=g(e,g.EMPTY_OBJECT)).red;if(!c(n)){const s=g(e.minimumRed,0),a=g(e.maximumRed,1);T.typeOf.number.lessThanOrEquals("minimumRed",s,a),n=s+O.nextRandomNumber()*(a-s)}let i=e.green;if(!c(i)){const s=g(e.minimumGreen,0),a=g(e.maximumGreen,1);T.typeOf.number.lessThanOrEquals("minimumGreen",s,a),i=s+O.nextRandomNumber()*(a-s)}let o=e.blue;if(!c(o)){const s=g(e.minimumBlue,0),a=g(e.maximumBlue,1);T.typeOf.number.lessThanOrEquals("minimumBlue",s,a),o=s+O.nextRandomNumber()*(a-s)}let r=e.alpha;if(!c(r)){const s=g(e.minimumAlpha,0),a=g(e.maximumAlpha,1);T.typeOf.number.lessThanOrEquals("minumumAlpha",s,a),r=s+O.nextRandomNumber()*(a-s)}return c(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new re(n,i,o,r)};const cce=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,lce=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,uce=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,dce=/^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){T.typeOf.string("color",e),c(t)||(t=new re);const n=re[(e=e.trim()).toUpperCase()];if(c(n))return re.clone(n,t),t;let i=cce.exec(e);return null!==i?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(g(i[4],"f"),16)/15,t):(i=lce.exec(e),null!==i?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(g(i[4],"ff"),16)/255,t):(i=uce.exec(e),null!==i?(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(g(i[4],"1.0")),t):(i=dce.exec(e),null!==i?re.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(g(i[4],"1.0")),t):t=void 0)))},re.packedLength=4,re.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(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.defined("array",e),t=g(t,0),c(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 1===e?255:256*e|0},re.clone=function(e,t){if(c(e))return c(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||c(e)&&c(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||c(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(){const e=re.floatToByte(this.red),t=re.floatToByte(this.green),n=re.floatToByte(this.blue);return 1===this.alpha?`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){const t=re.floatToByte(this.red),n=re.floatToByte(this.green),i=re.floatToByte(this.blue),o=re.floatToByte(this.alpha);return c(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]},re.prototype.toRgba=function(){return Bf[0]=re.floatToByte(this.red),Bf[1]=re.floatToByte(this.green),Bf[2]=re.floatToByte(this.blue),Bf[3]=re.floatToByte(this.alpha),rO[0]},re.prototype.brighten=function(e,t){return T.typeOf.number("magnitude",e),T.typeOf.number.greaterThanOrEquals("magnitude",e,0),T.typeOf.object("result",t),t.red=1-(1-this.red)*(e=1-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 T.typeOf.number("magnitude",e),T.typeOf.number.greaterThanOrEquals("magnitude",e,0),T.typeOf.object("result",t),t.red=this.red*(e=1-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 T.typeOf.object("left",e),T.typeOf.object("right",t),T.typeOf.object("result",n),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 T.typeOf.object("left",e),T.typeOf.object("right",t),T.typeOf.object("result",n),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 T.typeOf.object("left",e),T.typeOf.object("right",t),T.typeOf.object("result",n),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 T.typeOf.object("left",e),T.typeOf.object("right",t),T.typeOf.object("result",n),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 T.typeOf.object("left",e),T.typeOf.object("right",t),T.typeOf.object("result",n),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 T.typeOf.object("start",e),T.typeOf.object("end",t),T.typeOf.number("t",n),T.typeOf.object("result",i),i.red=O.lerp(e.red,t.red,n),i.green=O.lerp(e.green,t.green,n),i.blue=O.lerp(e.blue,t.blue,n),i.alpha=O.lerp(e.alpha,t.alpha,n),i},re.multiplyByScalar=function(e,t,n){return T.typeOf.object("color",e),T.typeOf.number("scalar",t),T.typeOf.object("result",n),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 T.typeOf.object("color",e),T.typeOf.number("scalar",t),T.typeOf.object("result",n),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));const X=re,Jz={};function GA(e,t){if(!c(e))throw new E("identifier is required.");c(Jz[e])||(Jz[e]=!0,console.warn(g(t,e)))}GA.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.",GA.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",GA.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",GA.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";const gn=GA,kf=function fce(e,t){if(!c(e)||!c(t))throw new E("identifier and message are required.");gn(e,t)};function Ny(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(Ny.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}}}),Ny.clone=function(e){if(c(e))return new Ny(e._format,e._datatype,e._width,e._height,e._buffer)},Ny.prototype.clone=function(){return Ny.clone(this)};const hce=Ny;function Uf(){}Uf._transcodeTaskProcessor=new pa("transcodeKTX2",Number.POSITIVE_INFINITY),Uf._readyPromise=void 0,Uf.transcode=function(e,t){return T.defined("supportedTargetFormats",t),c(Uf._readyPromise)||function pce(){const e=Uf._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return Uf._transcodeTaskProcessor;throw new Ie("KTX2 transcoder could not be initialized.")});Uf._readyPromise=e}(),Uf._readyPromise.then(function(n){let i;if(e instanceof ArrayBuffer){const 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){const i=n.length,o=Object.keys(n[0]),r=o.length;let s;for(s=0;se._sizeInBytes)throw new E("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!c(n)||n<0||n+i>this._sizeInBytes)throw new E("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(n>=t&&nn&&ts)throw new E("destinationOffset must be greater than zero and less than the arrayView length.");if(n+o>s)throw new E("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new E("sourceOffset must be greater than zero and less than the buffers size.");if(t+o*r>this._sizeInBytes)throw new E("sourceOffset + length must be less than the buffers size.");const a=this._gl,l=oe.COPY_READ_BUFFER;a.bindBuffer(l,this._buffer),a.getBufferSubData(l,t,e,n,i),a.bindBuffer(l,null)},Cl.prototype.isDestroyed=function(){return!1},Cl.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),Ye(this)};const yn=Cl,ze=Object.freeze({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});function nV(e){e=g(e,g.EMPTY_OBJECT),this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.canceled=e.canceled,this.persists=g(e.persists,!1),this.pass=ze.COMPUTE,this.owner=e.owner}nV.prototype.execute=function(e){e.execute(this)};const Ew=nV,ar={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_maximumSamples:0,_highpFloatSupported:!1,_highpIntSupported:!1};Object.defineProperties(ar,{maximumCombinedTextureImageUnits:{get:function(){return ar._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return ar._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return ar._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return ar._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return ar._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return ar._maximumTextureSize}},maximumVaryingVectors:{get:function(){return ar._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return ar._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return ar._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return ar._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return ar._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return ar._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return ar._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return ar._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return ar._maximumViewportWidth}},maximumViewportHeight:{get:function(){return ar._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return ar._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return ar._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return ar._maximumColorAttachments}},maximumSamples:{get:function(){return ar._maximumSamples}},highpFloatSupported:{get:function(){return ar._highpFloatSupported}},highpIntSupported:{get:function(){return ar._highpIntSupported}}});const mn=ar;function ww(e,t,n,i,o,r,s,a,l,u,d){this._context=e,this._texture=t,this._textureTarget=n,this._targetFace=i,this._pixelDatatype=s,this._internalFormat=o,this._pixelFormat=r,this._size=a,this._preMultiplyAlpha=l,this._flipY=u,this._initialized=d}Object.defineProperties(ww.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}}),ww.prototype.copyFrom=function(e){T.defined("options",e);const t=g(e.xOffset,0),n=g(e.yOffset,0);if(T.defined("options.source",e.source),T.typeOf.number.greaterThanOrEquals("xOffset",t,0),T.typeOf.number.greaterThanOrEquals("yOffset",n,0),t+e.source.width>this._size)throw new E("xOffset + options.source.width must be less than or equal to width.");if(n+e.source.height>this._size)throw new E("yOffset + options.source.height must be less than or equal to height.");const i=e.source,o=this._context._gl,r=this._textureTarget,s=this._targetFace;o.activeTexture(o.TEXTURE0),o.bindTexture(r,this._texture);const a=i.width,l=i.height;let u=i.arrayBufferView;const d=this._size,h=this._pixelFormat,m=this._internalFormat,_=this._pixelDatatype,p=this._preMultiplyAlpha,y=this._flipY,A=g(e.skipColorSpaceConversion,!1);let x=4;c(u)&&(x=vt.alignmentInBytes(h,_,a)),o.pixelStorei(o.UNPACK_ALIGNMENT,x),o.pixelStorei(o.UNPACK_COLORSPACE_CONVERSION_WEBGL,A?o.NONE:o.BROWSER_DEFAULT_WEBGL);let C=!1;if(!this._initialized){if(0===t&&0===n&&a===d&&l===d)c(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),y&&(u=vt.flipY(u,h,_,d,d)),o.texImage2D(s,0,m,d,d,0,h,bt.toWebGLConstant(_,this._context),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,y),o.texImage2D(s,0,m,h,bt.toWebGLConstant(_,this._context),i)),C=!0;else{o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1);const w=vt.createTypedArray(h,_,d,d);o.texImage2D(s,0,m,d,d,0,h,bt.toWebGLConstant(_,this._context),w)}this._initialized=!0}C||(c(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),y&&(u=vt.flipY(u,h,_,a,l)),o.texSubImage2D(s,0,t,n,a,l,h,bt.toWebGLConstant(_,this._context),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,y),o.texSubImage2D(s,0,t,n,h,bt.toWebGLConstant(_,this._context),i))),o.bindTexture(r,null)},ww.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){if(e=g(e,0),t=g(t,0),n=g(n,0),i=g(i,0),o=g(o,this._size),r=g(r,this._size),T.typeOf.number.greaterThanOrEquals("xOffset",e,0),T.typeOf.number.greaterThanOrEquals("yOffset",t,0),T.typeOf.number.greaterThanOrEquals("framebufferXOffset",n,0),T.typeOf.number.greaterThanOrEquals("framebufferYOffset",i,0),e+o>this._size)throw new E("xOffset + source.width must be less than or equal to width.");if(t+r>this._size)throw new E("yOffset + source.height must be less than or equal to height.");if(this._pixelDatatype===bt.FLOAT)throw new E("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===bt.HALF_FLOAT)throw new E("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");const s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(this._targetFace,0,e,t,n,i,o,r),s.bindTexture(a,null),this._initialized=!0};const Fy=ww,Sw={DONT_CARE:oe.DONT_CARE,FASTEST:oe.FASTEST,NICEST:oe.NICEST,validate:function(e){return e===Sw.DONT_CARE||e===Sw.FASTEST||e===Sw.NICEST}},By=Object.freeze(Sw),vw={NEAREST:oe.NEAREST,LINEAR:oe.LINEAR,validate:function(e){return e===vw.NEAREST||e===vw.LINEAR}},ls=Object.freeze(vw),_p={NEAREST:oe.NEAREST,LINEAR:oe.LINEAR,NEAREST_MIPMAP_NEAREST:oe.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:oe.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:oe.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:oe.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===_p.NEAREST||e===_p.LINEAR||e===_p.NEAREST_MIPMAP_NEAREST||e===_p.LINEAR_MIPMAP_NEAREST||e===_p.NEAREST_MIPMAP_LINEAR||e===_p.LINEAR_MIPMAP_LINEAR}},ei=Object.freeze(_p),Dw={CLAMP_TO_EDGE:oe.CLAMP_TO_EDGE,REPEAT:oe.REPEAT,MIRRORED_REPEAT:oe.MIRRORED_REPEAT,validate:function(e){return e===Dw.CLAMP_TO_EDGE||e===Dw.REPEAT||e===Dw.MIRRORED_REPEAT}},$i=Object.freeze(Dw);function jA(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.wrapS,$i.CLAMP_TO_EDGE),n=g(e.wrapT,$i.CLAMP_TO_EDGE),i=g(e.minificationFilter,ei.LINEAR),o=g(e.magnificationFilter,ls.LINEAR),r=c(e.maximumAnisotropy)?e.maximumAnisotropy:1;if(!$i.validate(t))throw new E("Invalid sampler.wrapS.");if(!$i.validate(n))throw new E("Invalid sampler.wrapT.");if(!ei.validate(i))throw new E("Invalid sampler.minificationFilter.");if(!ls.validate(o))throw new E("Invalid sampler.magnificationFilter.");T.typeOf.number.greaterThanOrEquals("maximumAnisotropy",r,1),this._wrapS=t,this._wrapT=n,this._minificationFilter=i,this._magnificationFilter=o,this._maximumAnisotropy=r}Object.defineProperties(jA.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}}),jA.equals=function(e,t){return e===t||c(e)&&c(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},jA.NEAREST=Object.freeze(new jA({wrapS:$i.CLAMP_TO_EDGE,wrapT:$i.CLAMP_TO_EDGE,minificationFilter:ei.NEAREST,magnificationFilter:ls.NEAREST}));const Hi=jA;function WA(e){e=g(e,g.EMPTY_OBJECT),T.defined("options.context",e.context);const t=e.context,n=e.source;let i,o;if(c(n)){const C=[n.positiveX,n.negativeX,n.positiveY,n.negativeY,n.positiveZ,n.negativeZ];if(!(C[0]&&C[1]&&C[2]&&C[3]&&C[4]&&C[5]))throw new E("options.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.");i=C[0].width,o=C[0].height;for(let w=1;w<6;++w)if(Number(C[w].width)!==i||Number(C[w].height)!==o)throw new E("Each face in options.source must have the same width and height.")}else i=e.width,o=e.height;const r=i,s=g(e.pixelDatatype,bt.UNSIGNED_BYTE),a=g(e.pixelFormat,vt.RGBA),l=vt.toInternalFormat(a,s,t);if(!c(i)||!c(o))throw new E("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(i!==o)throw new E("Width must equal height.");if(r<=0)throw new E("Width and height must be greater than zero.");if(r>mn.maximumCubeMapSize)throw new E(`Width and height must be less than or equal to the maximum cube map size (${mn.maximumCubeMapSize}). Check maximumCubeMapSize.`);if(!vt.validate(a))throw new E("Invalid options.pixelFormat.");if(vt.isDepthFormat(a))throw new E("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!bt.validate(s))throw new E("Invalid options.pixelDatatype.");if(s===bt.FLOAT&&!t.floatingPointTexture)throw new E("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(s===bt.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new E("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");const u=6*vt.textureSizeInBytes(a,s,r,r),d=e.preMultiplyAlpha||a===vt.RGB||a===vt.LUMINANCE,h=g(e.flipY,!0),m=g(e.skipColorSpaceConversion,!1),_=t._gl,p=_.TEXTURE_CUBE_MAP,y=_.createTexture();function A(C,w,v,D,P){let N=w.arrayBufferView;c(N)||(N=w.bufferView);let R=4;c(N)&&(R=vt.alignmentInBytes(a,s,i)),_.pixelStorei(_.UNPACK_ALIGNMENT,R),_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,P?_.NONE:_.BROWSER_DEFAULT_WEBGL),c(N)?(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,!1),D&&(N=vt.flipY(N,a,s,r,r)),_.texImage2D(C,0,l,r,r,0,a,bt.toWebGLConstant(s,t),N)):(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,v),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,D),_.texImage2D(C,0,l,a,bt.toWebGLConstant(s,t),w))}_.activeTexture(_.TEXTURE0),_.bindTexture(p,y),c(n)?(A(_.TEXTURE_CUBE_MAP_POSITIVE_X,n.positiveX,d,h,m),A(_.TEXTURE_CUBE_MAP_NEGATIVE_X,n.negativeX,d,h,m),A(_.TEXTURE_CUBE_MAP_POSITIVE_Y,n.positiveY,d,h,m),A(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,n.negativeY,d,h,m),A(_.TEXTURE_CUBE_MAP_POSITIVE_Z,n.positiveZ,d,h,m),A(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,n.negativeZ,d,h,m)):(_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_X,0,l,r,r,0,a,bt.toWebGLConstant(s,t),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_X,0,l,r,r,0,a,bt.toWebGLConstant(s,t),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Y,0,l,r,r,0,a,bt.toWebGLConstant(s,t),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,l,r,r,0,a,bt.toWebGLConstant(s,t),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Z,0,l,r,r,0,a,bt.toWebGLConstant(s,t),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,l,r,r,0,a,bt.toWebGLConstant(s,t),null)),_.bindTexture(p,null),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p,this._texture=y,this._pixelFormat=a,this._pixelDatatype=s,this._size=r,this._hasMipmap=!1,this._sizeInBytes=u,this._preMultiplyAlpha=d,this._flipY=h,this._sampler=void 0;const x=c(n);this._positiveX=new Fy(t,y,p,_.TEXTURE_CUBE_MAP_POSITIVE_X,l,a,s,r,d,h,x),this._negativeX=new Fy(t,y,p,_.TEXTURE_CUBE_MAP_NEGATIVE_X,l,a,s,r,d,h,x),this._positiveY=new Fy(t,y,p,_.TEXTURE_CUBE_MAP_POSITIVE_Y,l,a,s,r,d,h,x),this._negativeY=new Fy(t,y,p,_.TEXTURE_CUBE_MAP_NEGATIVE_Y,l,a,s,r,d,h,x),this._positiveZ=new Fy(t,y,p,_.TEXTURE_CUBE_MAP_POSITIVE_Z,l,a,s,r,d,h,x),this._negativeZ=new Fy(t,y,p,_.TEXTURE_CUBE_MAP_NEGATIVE_Z,l,a,s,r,d,h,x),this.sampler=c(e.sampler)?e.sampler:new Hi}Object.defineProperties(WA.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){let t=e.minificationFilter,n=e.magnificationFilter;const o=this._context,r=this._pixelDatatype;(r===bt.FLOAT&&!o.textureFloatLinear||r===bt.HALF_FLOAT&&!o.textureHalfFloatLinear)&&(t=t===ei.NEAREST_MIPMAP_NEAREST||t===ei.NEAREST_MIPMAP_LINEAR||t===ei.LINEAR_MIPMAP_NEAREST||t===ei.LINEAR_MIPMAP_LINEAR?ei.NEAREST_MIPMAP_NEAREST:ei.NEAREST,n=ls.NEAREST);const s=o._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.texParameteri(a,s.TEXTURE_MIN_FILTER,t),s.texParameteri(a,s.TEXTURE_MAG_FILTER,n),s.texParameteri(a,s.TEXTURE_WRAP_S,e.wrapS),s.texParameteri(a,s.TEXTURE_WRAP_T,e.wrapT),c(this._textureFilterAnisotropic)&&s.texParameteri(a,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),s.bindTexture(a,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),WA.prototype.generateMipmap=function(e){if(e=g(e,By.DONT_CARE),this._size>1&&!O.isPowerOfTwo(this._size))throw new E("width and height must be a power of two to call generateMipmap().");if(!By.validate(e))throw new E("hint is invalid.");this._hasMipmap=!0;const t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)},WA.prototype.isDestroyed=function(){return!1},WA.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=Ye(this._positiveX),this._negativeX=Ye(this._negativeX),this._positiveY=Ye(this._positiveY),this._negativeY=Ye(this._negativeY),this._positiveZ=Ye(this._positiveZ),this._negativeZ=Ye(this._negativeZ),Ye(this)};const d_=WA,gce=new f;function Jt(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}const ws={};ws[oe.FLOAT]="float",ws[oe.FLOAT_VEC2]="vec2",ws[oe.FLOAT_VEC3]="vec3",ws[oe.FLOAT_VEC4]="vec4",ws[oe.INT]="int",ws[oe.INT_VEC2]="ivec2",ws[oe.INT_VEC3]="ivec3",ws[oe.INT_VEC4]="ivec4",ws[oe.BOOL]="bool",ws[oe.BOOL_VEC2]="bvec2",ws[oe.BOOL_VEC3]="bvec3",ws[oe.BOOL_VEC4]="bvec4",ws[oe.FLOAT_MAT2]="mat2",ws[oe.FLOAT_MAT3]="mat3",ws[oe.FLOAT_MAT4]="mat4",ws[oe.SAMPLER_2D]="sampler2D",ws[oe.SAMPLER_CUBE]="samplerCube",Jt.prototype.getDeclaration=function(e){let t=`uniform ${ws[this._datatype]} ${e}`;const n=this._size;return t+=1===n?";":`[${n.toString()}];`,t};const Iw={czm_viewport:new Jt({size:1,datatype:oe.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new Jt({size:1,datatype:oe.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new Jt({size:1,datatype:oe.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new Jt({size:1,datatype:oe.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new Jt({size:1,datatype:oe.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new Jt({size:1,datatype:oe.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new Jt({size:1,datatype:oe.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new Jt({size:1,datatype:oe.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new Jt({size:1,datatype:oe.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new Jt({size:1,datatype:oe.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new Jt({size:1,datatype:oe.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.eyeHeight}}),czm_eyeHeight2D:new Jt({size:1,datatype:oe.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_entireFrustum:new Jt({size:1,datatype:oe.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new Jt({size:1,datatype:oe.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new Jt({size:1,datatype:oe.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return k.getTranslation(e.inverseView,gce)}}),czm_frameNumber:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new Jt({size:1,datatype:oe.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new Jt({size:1,datatype:oe.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new Jt({size:1,datatype:oe.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new Jt({size:1,datatype:oe.SAMPLER_2D,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapSize:new Jt({size:1,datatype:oe.FLOAT_VEC2,getValue:function(e){return e.specularEnvironmentMapsDimensions}}),czm_specularEnvironmentMapsMaximumLOD:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new Jt({size:9,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new Jt({size:1,datatype:oe.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_fogDensity:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.fogDensity}}),czm_splitPosition:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.splitPosition}}),czm_geometricToleranceOverMeter:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new Jt({size:1,datatype:oe.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new Jt({size:1,datatype:oe.FLOAT,getValue:function(e){return e.gamma}}),czm_ellipsoidRadii:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.radii}}),czm_ellipsoidInverseRadii:new Jt({size:1,datatype:oe.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.oneOverRadii}})};function iV(e,t,n,i){this.name=n,this.value=void 0,this._value=0,this._gl=e,this._location=i}function oV(e,t,n,i){this.name=n,this.value=void 0,this._value=new G,this._gl=e,this._location=i}function rV(e,t,n,i){this.name=n,this.value=void 0,this._value=void 0,this._gl=e,this._location=i}function sV(e,t,n,i){this.name=n,this.value=void 0,this._value=void 0,this._gl=e,this._location=i}function sO(e,t,n,i){this.name=n,this.value=void 0,this._gl=e,this._location=i,this.textureUnitIndex=void 0}function aV(e,t,n,i){this.name=n,this.value=void 0,this._value=0,this._gl=e,this._location=i}function cV(e,t,n,i){this.name=n,this.value=void 0,this._value=new G,this._gl=e,this._location=i}function lV(e,t,n,i){this.name=n,this.value=void 0,this._value=new f,this._gl=e,this._location=i}function uV(e,t,n,i){this.name=n,this.value=void 0,this._value=new fe,this._gl=e,this._location=i}iV.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},oV.prototype.set=function(){const e=this.value;G.equals(e,this._value)||(G.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))},rV.prototype.set=function(){const e=this.value;if(c(e.red))X.equals(e,this._value)||(this._value=X.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue));else{if(!c(e.x))throw new E(`Invalid vec3 value for uniform "${this.name}".`);f.equals(e,this._value)||(this._value=f.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z))}},sV.prototype.set=function(){const e=this.value;if(c(e.red))X.equals(e,this._value)||(this._value=X.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha));else{if(!c(e.x))throw new E(`Invalid vec4 value for uniform "${this.name}".`);fe.equals(e,this._value)||(this._value=fe.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w))}},sO.prototype.set=function(){const e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);const t=this.value;e.bindTexture(t._target,t._texture)},sO.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},aV.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},cV.prototype.set=function(){const e=this.value;G.equals(e,this._value)||(G.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))},lV.prototype.set=function(){const e=this.value;f.equals(e,this._value)||(f.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},uV.prototype.set=function(){const e=this.value;fe.equals(e,this._value)||(fe.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};const bce=new Float32Array(4);function dV(e,t,n,i){this.name=n,this.value=void 0,this._value=new oo,this._gl=e,this._location=i}dV.prototype.set=function(){if(!oo.equalsArray(this.value,this._value,0)){oo.clone(this.value,this._value);const e=oo.toArray(this.value,bce);this._gl.uniformMatrix2fv(this._location,!1,e)}};const Ace=new Float32Array(9);function fV(e,t,n,i){this.name=n,this.value=void 0,this._value=new ne,this._gl=e,this._location=i}fV.prototype.set=function(){if(!ne.equalsArray(this.value,this._value,0)){ne.clone(this.value,this._value);const e=ne.toArray(this.value,Ace);this._gl.uniformMatrix3fv(this._location,!1,e)}};const Tce=new Float32Array(16);function hV(e,t,n,i){this.name=n,this.value=void 0,this._value=new k,this._gl=e,this._location=i}hV.prototype.set=function(){if(!k.equalsArray(this.value,this._value,0)){k.clone(this.value,this._value);const e=k.toArray(this.value,Tce);this._gl.uniformMatrix4fv(this._location,!1,e)}};const xce=function yce(e,t,n,i){switch(t.type){case e.FLOAT:return new iV(e,t,n,i);case e.FLOAT_VEC2:return new oV(e,t,n,i);case e.FLOAT_VEC3:return new rV(e,t,n,i);case e.FLOAT_VEC4:return new sV(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new sO(e,t,n,i);case e.INT:case e.BOOL:return new aV(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new cV(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new lV(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new uV(e,t,n,i);case e.FLOAT_MAT2:return new dV(e,t,n,i);case e.FLOAT_MAT3:return new fV(e,t,n,i);case e.FLOAT_MAT4:return new hV(e,t,n,i);default:throw new Ie(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}};function pV(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o),this._gl=e,this._location=i[0]}function mV(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(2*o),this._gl=e,this._location=i[0]}function _V(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(3*o),this._gl=e,this._location=i[0]}function gV(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(4*o),this._gl=e,this._location=i[0]}function aO(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o),this._gl=e,this._locations=i,this.textureUnitIndex=void 0}function yV(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o),this._gl=e,this._location=i[0]}function bV(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(2*o),this._gl=e,this._location=i[0]}function AV(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(3*o),this._gl=e,this._location=i[0]}function TV(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(4*o),this._gl=e,this._location=i[0]}function xV(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(4*o),this._gl=e,this._location=i[0]}function CV(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(9*o),this._gl=e,this._location=i[0]}function EV(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(16*o),this._gl=e,this._location=i[0]}pV.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1;for(let o=0;o0&&console.log(`${Dd}Vertex shader compile log: ${l}`),l=e.getShaderInfoLog(r),c(l)&&l.length>0&&console.log(`${Dd}Fragment shader compile log: ${l}`),l=e.getProgramInfoLog(s),c(l)&&l.length>0&&console.log(`${Dd}Shader program link log: ${l}`)),e.deleteShader(o),e.deleteShader(r),s;const d=t._debugShaders;throw e.getShaderParameter(r,e.COMPILE_STATUS)?e.getShaderParameter(o,e.COMPILE_STATUS)?(l=e.getProgramInfoLog(s),console.error(`${Dd}Shader program link log: ${l}`),h(o,"vertex"),h(r,"fragment"),u=`Program failed to link. Link log: ${l}`):(l=e.getShaderInfoLog(o),console.error(`${Dd}Vertex shader compile log: ${l}`),console.error(`${Dd} Vertex shader source:\n${n}`),u=`Vertex shader failed to compile. Compile log: ${l}`):(l=e.getShaderInfoLog(r),console.error(`${Dd}Fragment shader compile log: ${l}`),console.error(`${Dd} Fragment shader source:\n${i}`),u=`Fragment shader failed to compile. Compile log: ${l}`),e.deleteShader(o),e.deleteShader(r),e.deleteProgram(s),new Ie(u);function h(m,_){if(!c(d))return;const p=d.getTranslatedShaderSource(m);""!==p?console.error(`${Dd}Translated ${_} shaderSource:\n${p}`):console.error(`${Dd}${_} shader translation failed.`)}}(n,e),o=n.getProgramParameter(i,n.ACTIVE_ATTRIBUTES),r=function Ice(e,t){const n={},i=[],o=[],r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let s=0;s=0){if(d=n[u.slice(0,p)],!c(d))continue;h=d._locations,h.length<=1&&(m=d.value,_=e.getUniformLocation(t,u),null!==_&&(h.push(_),m.push(e.getUniform(t,_))))}else{h=[];for(let y=0;y1/pi.\n *\n * @alias czm_oneOverPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverPi = ...;\n *\n * // Example\n * float pi = 1.0 / czm_oneOverPi;\n */\nconst float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi:"/**\n * A built-in GLSL floating-point constant for 1/2pi.\n *\n * @alias czm_oneOverTwoPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverTwoPi = ...;\n *\n * // Example\n * float pi = 2.0 * czm_oneOverTwoPi;\n */\nconst float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile:"/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}\n *\n * @name czm_passCesium3DTile\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification:"/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}\n *\n * @name czm_passCesium3DTileClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow:"/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}\n *\n * @name czm_passCesium3DTileClassificationIgnoreShow\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification:"/**\n * The automatic GLSL constant for {@link Pass#CLASSIFICATION}\n *\n * @name czm_passClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passClassification = 7.0;\n",czm_passCompute:"/**\n * The automatic GLSL constant for {@link Pass#COMPUTE}\n *\n * @name czm_passCompute\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCompute = 1.0;\n",czm_passEnvironment:"/**\n * The automatic GLSL constant for {@link Pass#ENVIRONMENT}\n *\n * @name czm_passEnvironment\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passEnvironment = 0.0;\n",czm_passGlobe:"/**\n * The automatic GLSL constant for {@link Pass#GLOBE}\n *\n * @name czm_passGlobe\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGlobe = 2.0;\n",czm_passOpaque:"/**\n * The automatic GLSL constant for {@link Pass#OPAQUE}\n *\n * @name czm_passOpaque\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOpaque = 7.0;\n",czm_passOverlay:"/**\n * The automatic GLSL constant for {@link Pass#OVERLAY}\n *\n * @name czm_passOverlay\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOverlay = 10.0;\n",czm_passTerrainClassification:"/**\n * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}\n *\n * @name czm_passTerrainClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent:"/**\n * The automatic GLSL constant for {@link Pass#TRANSLUCENT}\n *\n * @name czm_passTranslucent\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTranslucent = 8.0;\n",czm_passVoxels:"/**\n * The automatic GLSL constant for {@link Pass#VOXELS}\n *\n * @name czm_passVoxels\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passVoxels = 9.0;\n",czm_pi:"/**\n * A built-in GLSL floating-point constant for Math.PI.\n *\n * @alias czm_pi\n * @glslConstant\n *\n * @see CesiumMath.PI\n *\n * @example\n * // GLSL declaration\n * const float czm_pi = ...;\n *\n * // Example\n * float twoPi = 2.0 * czm_pi;\n */\nconst float czm_pi = 3.141592653589793;\n",czm_piOverFour:"/**\n * A built-in GLSL floating-point constant for pi/4.\n *\n * @alias czm_piOverFour\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_FOUR\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverFour = ...;\n *\n * // Example\n * float pi = 4.0 * czm_piOverFour;\n */\nconst float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix:"/**\n * A built-in GLSL floating-point constant for pi/6.\n *\n * @alias czm_piOverSix\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_SIX\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverSix = ...;\n *\n * // Example\n * float pi = 6.0 * czm_piOverSix;\n */\nconst float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree:"/**\n * A built-in GLSL floating-point constant for pi/3.\n *\n * @alias czm_piOverThree\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_THREE\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverThree = ...;\n *\n * // Example\n * float pi = 3.0 * czm_piOverThree;\n */\nconst float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo:"/**\n * A built-in GLSL floating-point constant for pi/2.\n *\n * @alias czm_piOverTwo\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverTwo = ...;\n *\n * // Example\n * float pi = 2.0 * czm_piOverTwo;\n */\nconst float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree:"/**\n * A built-in GLSL floating-point constant for converting degrees to radians.\n *\n * @alias czm_radiansPerDegree\n * @glslConstant\n *\n * @see CesiumMath.RADIANS_PER_DEGREE\n *\n * @example\n * // GLSL declaration\n * const float czm_radiansPerDegree = ...;\n *\n * // Example\n * float rad = czm_radiansPerDegree * deg;\n */\nconst float czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D:"/**\n * The constant identifier for the 2D {@link SceneMode}\n *\n * @name czm_sceneMode2D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D:"/**\n * The constant identifier for the 3D {@link SceneMode}\n *\n * @name czm_sceneMode3D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView:"/**\n * The constant identifier for the Columbus View {@link SceneMode}\n *\n * @name czm_sceneModeColumbusView\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing:"/**\n * The constant identifier for the Morphing {@link SceneMode}\n *\n * @name czm_sceneModeMorphing\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n */\nconst float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius:"/**\n * A built-in GLSL floating-point constant for one solar radius.\n *\n * @alias czm_solarRadius\n * @glslConstant\n *\n * @see CesiumMath.SOLAR_RADIUS\n *\n * @example\n * // GLSL declaration\n * const float czm_solarRadius = ...;\n */\nconst float czm_solarRadius = 695500000.0;\n",czm_threePiOver2:"/**\n * A built-in GLSL floating-point constant for 3pi/2.\n *\n * @alias czm_threePiOver2\n * @glslConstant\n *\n * @see CesiumMath.THREE_PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_threePiOver2 = ...;\n *\n * // Example\n * float pi = (2.0 / 3.0) * czm_threePiOver2;\n */\nconst float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi:"/**\n * A built-in GLSL floating-point constant for 2pi.\n *\n * @alias czm_twoPi\n * @glslConstant\n *\n * @see CesiumMath.TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_twoPi = ...;\n *\n * // Example\n * float pi = czm_twoPi / 2.0;\n */\nconst float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude:"/**\n * The maximum latitude, in radians, both North and South, supported by a Web Mercator\n * (EPSG:3857) projection. Technically, the Mercator projection is defined\n * for any latitude up to (but not including) 90 degrees, but it makes sense\n * to cut it off sooner because it grows exponentially with increasing latitude.\n * The logic behind this particular cutoff value, which is the one used by\n * Google Maps, Bing Maps, and Esri, is that it makes the projection\n * square. That is, the rectangle is equal in the X and Y directions.\n *\n * The constant value is computed as follows:\n * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))\n *\n * @name czm_webMercatorMaxLatitude\n * @glslConstant\n */\nconst float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct:"/**\n * @name czm_depthRangeStruct\n * @glslStruct\n */\nstruct czm_depthRangeStruct\n{\n float near;\n float far;\n};\n",czm_material:"/**\n * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} specular Intensity of incoming light reflecting in a single direction.\n * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n */\nstruct czm_material\n{\n vec3 diffuse;\n float specular;\n float shininess;\n vec3 normal;\n vec3 emission;\n float alpha;\n};\n",czm_materialInput:"/**\n * Used as input to every material's czm_getMaterial function.\n *\n * @name czm_materialInput\n * @glslStruct\n *\n * @property {float} s 1D texture coordinates.\n * @property {vec2} st 2D texture coordinates.\n * @property {vec3} str 3D texture coordinates.\n * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.\n * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.\n * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.\n * @property {float} height The height of the terrain in meters above or below the WGS84 ellipsoid. Only available for globe materials.\n * @property {float} slope The slope of the terrain in radians. 0 is flat; pi/2 is vertical. Only available for globe materials.\n * @property {float} aspect The aspect of the terrain in radians. 0 is East, pi/2 is North, pi is West, 3pi/2 is South. Only available for globe materials.\n */\nstruct czm_materialInput\n{\n float s;\n vec2 st;\n vec3 str;\n vec3 normalEC;\n mat3 tangentToEyeMatrix;\n vec3 positionToEyeEC;\n float height;\n float slope;\n float aspect;\n};\n",czm_modelMaterial:"/**\n * Struct for representing a material for a {@link Model}. The model\n * rendering pipeline will pass this struct between material, custom shaders,\n * and lighting stages. This is not to be confused with {@link czm_material}\n * which is used by the older Fabric materials system, although they are similar.\n *

\n * All color values (diffuse, specular, emissive) are in linear color space.\n *

\n *\n * @name czm_modelMaterial\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.\n * @property {float} roughness A number from 0.0 to 1.0 representing how rough the surface is. Values near 0.0 produce glossy surfaces, while values near 1.0 produce rough surfaces.\n * @property {vec3} normalEC Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.\n * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n */\nstruct czm_modelMaterial {\n vec3 diffuse;\n float alpha;\n vec3 specular;\n float roughness;\n vec3 normalEC;\n float occlusion;\n vec3 emissive;\n};\n",czm_modelVertexOutput:"/**\n * Struct for representing the output of a custom vertex shader.\n * \n * @name czm_modelVertexOutput\n * @glslStruct\n *\n * @see {@link CustomShader}\n * @see {@link Model}\n *\n * @property {vec3} positionMC The position of the vertex in model coordinates\n * @property {float} pointSize A custom value for gl_PointSize. This is only used for point primitives. \n */\nstruct czm_modelVertexOutput {\n vec3 positionMC;\n float pointSize;\n};\n",czm_pbrParameters:"/**\n * Parameters for {@link czm_pbrLighting}\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuseColor the diffuse color of the material for the lambert term of the rendering equation\n * @property {float} roughness a value from 0.0 to 1.0 that indicates how rough the surface of the material is.\n * @property {vec3} f0 The reflectance of the material at normal incidence\n */\nstruct czm_pbrParameters\n{\n vec3 diffuseColor;\n float roughness;\n vec3 f0;\n};\n",czm_ray:"/**\n * DOC_TBA\n *\n * @name czm_ray\n * @glslStruct\n */\nstruct czm_ray\n{\n vec3 origin;\n vec3 direction;\n};\n",czm_raySegment:"/**\n * DOC_TBA\n *\n * @name czm_raySegment\n * @glslStruct\n */\nstruct czm_raySegment\n{\n float start;\n float stop;\n};\n\n/**\n * DOC_TBA\n *\n * @name czm_emptyRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\n\n/**\n * DOC_TBA\n *\n * @name czm_fullRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_shadowParameters:"struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\n vec3 texCoords;\n#else\n vec2 texCoords;\n#endif\n\n float depthBias;\n float depth;\n float nDotL;\n vec2 texelStepSize;\n float normalShadingSmooth;\n float darkness;\n};\n",czm_HSBToRGB:"/**\n * Converts an HSB color (hue, saturation, brightness) to RGB\n * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}\n *\n * @name czm_HSBToRGB\n * @glslFunction\n * \n * @param {vec3} hsb The color in HSB.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsb = czm_RGBToHSB(rgb);\n * hsb.z *= 0.1;\n * rgb = czm_HSBToRGB(hsb);\n */\n\nconst vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n\nvec3 czm_HSBToRGB(vec3 hsb)\n{\n vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n}\n",czm_HSLToRGB:"/**\n * Converts an HSL color (hue, saturation, lightness) to RGB\n * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n *\n * @name czm_HSLToRGB\n * @glslFunction\n * \n * @param {vec3} rgb The color in HSL.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n\nvec3 hueToRGB(float hue)\n{\n float r = abs(hue * 6.0 - 3.0) - 1.0;\n float g = 2.0 - abs(hue * 6.0 - 2.0);\n float b = 2.0 - abs(hue * 6.0 - 4.0);\n return clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 czm_HSLToRGB(vec3 hsl)\n{\n vec3 rgb = hueToRGB(hsl.x);\n float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\n return (rgb - 0.5) * c + hsl.z;\n}\n",czm_RGBToHSB:"/**\n * Converts an RGB color to HSB (hue, saturation, brightness)\n * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}\n *\n * @name czm_RGBToHSB\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in HSB.\n *\n * @example\n * vec3 hsb = czm_RGBToHSB(rgb);\n * hsb.z *= 0.1;\n * rgb = czm_HSBToRGB(hsb);\n */\n\nconst vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\nvec3 czm_RGBToHSB(vec3 rgb)\n{\n vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\n vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n float d = q.x - min(q.w, q.y);\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL:"/**\n * Converts an RGB color to HSL (hue, saturation, lightness)\n * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n *\n * @name czm_RGBToHSL\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in HSL.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n \nvec3 RGBtoHCV(vec3 rgb)\n{\n // Based on work by Sam Hocevar and Emil Persson\n vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\n vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\n float c = q.x - min(q.w, q.y);\n float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\n return vec3(h, c, q.x);\n}\n\nvec3 czm_RGBToHSL(vec3 rgb)\n{\n vec3 hcv = RGBtoHCV(rgb);\n float l = hcv.z - hcv.y * 0.5;\n float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\n return vec3(hcv.x, s, l);\n}\n",czm_RGBToXYZ:"/**\n * Converts an RGB color to CIE Yxy.\n *

The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n *

\n * \n * @name czm_RGBToXYZ\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in CIE Yxy.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_RGBToXYZ(vec3 rgb)\n{\n const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n 0.3576, 0.7152, 0.1192,\n 0.1805, 0.0722, 0.9505);\n vec3 xyz = RGB2XYZ * rgb;\n vec3 Yxy;\n Yxy.r = xyz.g;\n float temp = dot(vec3(1.0), xyz);\n Yxy.gb = xyz.rg / temp;\n return Yxy;\n}\n",czm_XYZToRGB:"/**\n * Converts a CIE Yxy color to RGB.\n *

The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n *

\n * \n * @name czm_XYZToRGB\n * @glslFunction\n * \n * @param {vec3} Yxy The color in CIE Yxy.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_XYZToRGB(vec3 Yxy)\n{\n const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n -1.5371, 1.8760, -0.2040,\n -0.4985, 0.0416, 1.0572);\n vec3 xyz;\n xyz.r = Yxy.r * Yxy.g / Yxy.b;\n xyz.g = Yxy.r;\n xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n \n return XYZ2RGB * xyz;\n}\n",czm_acesTonemapping:"// See:\n// https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/\n\nvec3 czm_acesTonemapping(vec3 color) {\n float g = 0.985;\n float a = 0.065;\n float b = 0.0001;\n float c = 0.433;\n float d = 0.238;\n\n color = (color * (color + a) - b) / (color * (g * color + c) + d);\n\n color = clamp(color, 0.0, 1.0);\n\n return color;\n}\n",czm_alphaWeight:"/**\n * @private\n */\nfloat czm_alphaWeight(float a)\n{\n float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n\n // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n // http://jcgt.org/published/0002/02/09/\n return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias:"/**\n * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.\n *\n * @name czm_antialias\n * @glslFunction\n *\n * @param {vec4} color1 The color on one side of the edge.\n * @param {vec4} color2 The color on the other side of the edge.\n * @param {vec4} currentcolor The current color, either color1 or color2.\n * @param {float} dist The distance to the edge in texture coordinates.\n * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.\n * @returns {vec4} The anti-aliased color.\n *\n * @example\n * // GLSL declarations\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);\n *\n * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space\n * float dist = abs(textureCoordinates.t - 0.5);\n * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));\n * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);\n */\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\n float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\n float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\n val1 = val1 * (1.0 - val2);\n val1 = val1 * val1 * (3.0 - (2.0 * val1));\n val1 = pow(val1, 0.5); //makes the transition nicer\n \n vec4 midColor = (color1 + color2) * 0.5;\n return mix(midColor, currentColor, val1);\n}\n\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\n return czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_approximateSphericalCoordinates:"/**\n * Approximately computes spherical coordinates given a normal.\n * Uses approximate inverse trigonometry for speed and consistency,\n * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.\n *\n * @name czm_approximateSphericalCoordinates\n * @glslFunction\n *\n * @param {vec3} normal arbitrary-length normal.\n *\n * @returns {vec2} Approximate latitude and longitude spherical coordinates.\n */\nvec2 czm_approximateSphericalCoordinates(vec3 normal) {\n // Project into plane with vertical for latitude\n float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\n float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\n return vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_backFacing:"/**\n * Determines if the fragment is back facing\n *\n * @name czm_backFacing\n * @glslFunction \n * \n * @returns {bool} true if the fragment is back facing; otherwise, false.\n */\nbool czm_backFacing()\n{\n // !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/CesiumGS/cesium/pull/8494.\n return gl_FrontFacing == false;\n}\n",czm_branchFreeTernary:"/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a float expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {float} a Value to return if the comparison is true.\n * @param {float} b Value to return if the comparison is false.\n *\n * @returns {float} equivalent of comparison ? a : b\n */\nfloat czm_branchFreeTernary(bool comparison, float a, float b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec2 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec2} a Value to return if the comparison is true.\n * @param {vec2} b Value to return if the comparison is false.\n *\n * @returns {vec2} equivalent of comparison ? a : b\n */\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec3 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec4 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor:"\nvec4 czm_cascadeColor(vec4 weights)\n{\n return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\n vec4(0.0, 1.0, 0.0, 1.0) * weights.y +\n vec4(0.0, 0.0, 1.0, 1.0) * weights.z +\n vec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance:"\nuniform vec4 shadowMap_cascadeDistances;\n\nfloat czm_cascadeDistance(vec4 weights)\n{\n return dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix:"\nuniform mat4 shadowMap_cascadeMatrices[4];\n\nmat4 czm_cascadeMatrix(vec4 weights)\n{\n return shadowMap_cascadeMatrices[0] * weights.x +\n shadowMap_cascadeMatrices[1] * weights.y +\n shadowMap_cascadeMatrices[2] * weights.z +\n shadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights:"\nuniform vec4 shadowMap_cascadeSplits[2];\n\nvec4 czm_cascadeWeights(float depthEye)\n{\n // One component is set to 1.0 and all others set to 0.0.\n vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\n vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n",czm_columbusViewMorph:"/**\n * DOC_TBA\n *\n * @name czm_columbusViewMorph\n * @glslFunction\n */\nvec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)\n{\n // Just linear for now.\n vec3 p = mix(position2D.xyz, position3D.xyz, time);\n return vec4(p, 1.0);\n}\n",czm_computePosition:"/**\n * Returns a position in model coordinates relative to eye taking into\n * account the current scene mode: 3D, 2D, or Columbus view.\n *

\n * This uses standard position attributes, position3DHigh, \n * position3DLow, position2DHigh, and position2DLow, \n * and should be used when writing a vertex shader for an {@link Appearance}.\n *

\n *\n * @name czm_computePosition\n * @glslFunction\n *\n * @returns {vec4} The position relative to eye.\n *\n * @example\n * vec4 p = czm_computePosition();\n * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n *\n * @see czm_translateRelativeToEye\n */\nvec4 czm_computePosition();\n",czm_cosineAndSine:"/**\n * @private\n */\nvec2 cordic(float angle)\n{\n// Scale the vector by the appropriate factor for the 24 iterations to follow.\n vec2 vector = vec2(6.0725293500888267e-1, 0.0);\n// Iteration 1\n float sense = (angle < 0.0) ? -1.0 : 1.0;\n // float factor = sense * 1.0; // 2^-0\n mat2 rotation = mat2(1.0, sense, -sense, 1.0);\n vector = rotation * vector;\n angle -= sense * 7.8539816339744828e-1; // atan(2^-0)\n// Iteration 2\n sense = (angle < 0.0) ? -1.0 : 1.0;\n float factor = sense * 5.0e-1; // 2^-1\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.6364760900080609e-1; // atan(2^-1)\n// Iteration 3\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.5e-1; // 2^-2\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4497866312686414e-1; // atan(2^-2)\n// Iteration 4\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.25e-1; // 2^-3\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2435499454676144e-1; // atan(2^-3)\n// Iteration 5\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.25e-2; // 2^-4\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.2418809995957350e-2; // atan(2^-4)\n// Iteration 6\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.125e-2; // 2^-5\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.1239833430268277e-2; // atan(2^-5)\n// Iteration 7\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.5625e-2; // 2^-6\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5623728620476831e-2; // atan(2^-6)\n// Iteration 8\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.8125e-3; // 2^-7\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.8123410601011111e-3; // atan(2^-7)\n// Iteration 9\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.90625e-3; // 2^-8\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.9062301319669718e-3; // atan(2^-8)\n// Iteration 10\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.953125e-3; // 2^-9\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9531225164788188e-3; // atan(2^-9)\n// Iteration 11\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.765625e-4; // 2^-10\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.7656218955931946e-4; // atan(2^-10)\n// Iteration 12\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.8828125e-4; // 2^-11\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.8828121119489829e-4; // atan(2^-11)\n// Iteration 13\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.44140625e-4; // 2^-12\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4414062014936177e-4; // atan(2^-12)\n// Iteration 14\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.220703125e-4; // 2^-13\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2207031189367021e-4; // atan(2^-13)\n// Iteration 15\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.103515625e-5; // 2^-14\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.1035156174208773e-5; // atan(2^-14)\n// Iteration 16\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.0517578125e-5; // 2^-15\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.0517578115526096e-5; // atan(2^-15)\n// Iteration 17\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.52587890625e-5; // 2^-16\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5258789061315762e-5; // atan(2^-16)\n// Iteration 18\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.62939453125e-6; // 2^-17\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.6293945311019700e-6; // atan(2^-17)\n// Iteration 19\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.814697265625e-6; // 2^-18\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.8146972656064961e-6; // atan(2^-18)\n// Iteration 20\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.9073486328125e-6; // 2^-19\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9073486328101870e-6; // atan(2^-19)\n// Iteration 21\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.5367431640625e-7; // 2^-20\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.5367431640596084e-7; // atan(2^-20)\n// Iteration 22\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.76837158203125e-7; // 2^-21\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.7683715820308884e-7; // atan(2^-21)\n// Iteration 23\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.384185791015625e-7; // 2^-22\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.3841857910155797e-7; // atan(2^-22)\n// Iteration 24\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.1920928955078125e-7; // 2^-23\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n// angle -= sense * 1.1920928955078068e-7; // atan(2^-23)\n\n return vector;\n}\n\n/**\n * Computes the cosine and sine of the provided angle using the CORDIC algorithm.\n *\n * @name czm_cosineAndSine\n * @glslFunction\n *\n * @param {float} angle The angle in radians.\n *\n * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).\n *\n * @example\n * vec2 v = czm_cosineAndSine(czm_piOverSix);\n * float cosine = v.x;\n * float sine = v.y;\n */\nvec2 czm_cosineAndSine(float angle)\n{\n if (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n {\n if (angle < 0.0)\n {\n return -cordic(angle + czm_pi);\n }\n else\n {\n return -cordic(angle - czm_pi);\n }\n }\n else\n {\n return cordic(angle);\n }\n}\n",czm_decompressTextureCoordinates:"/**\n * Decompresses texture coordinates that were packed into a single float.\n *\n * @name czm_decompressTextureCoordinates\n * @glslFunction\n *\n * @param {float} encoded The compressed texture coordinates.\n * @returns {vec2} The decompressed texture coordinates.\n */\n vec2 czm_decompressTextureCoordinates(float encoded)\n {\n float temp = encoded / 4096.0;\n float xZeroTo4095 = floor(temp);\n float stx = xZeroTo4095 / 4095.0;\n float sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\n return vec2(stx, sty);\n }\n",czm_defaultPbrMaterial:"/**\n * Get default parameters for physically based rendering. These defaults\n * describe a rough dielectric (non-metal) surface (e.g. rough plastic).\n *\n * @return {czm_pbrParameters} Default parameters for {@link czm_pbrLighting}\n */\nczm_pbrParameters czm_defaultPbrMaterial()\n{\n czm_pbrParameters results;\n results.diffuseColor = vec3(1.0);\n results.roughness = 1.0;\n\n const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);\n results.f0 = REFLECTANCE_DIELECTRIC;\n return results;\n}\n",czm_depthClamp:"// emulated noperspective\n#if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH)\nout float v_WindowZ;\n#endif\n\n/**\n * Emulates GL_DEPTH_CLAMP, which is not available in WebGL 1 or 2.\n * GL_DEPTH_CLAMP clamps geometry that is outside the near and far planes, \n * capping the shadow volume. More information here: \n * https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_depth_clamp.txt.\n *\n * When GL_EXT_frag_depth is available we emulate GL_DEPTH_CLAMP by ensuring \n * no geometry gets clipped by setting the clip space z value to 0.0 and then\n * sending the unaltered screen space z value (using emulated noperspective\n * interpolation) to the frag shader where it is clamped to [0,1] and then\n * written with gl_FragDepth (see czm_writeDepthClamp). This technique is based on:\n * https://stackoverflow.com/questions/5960757/how-to-emulate-gl-depth-clamp-nv.\n *\n * When GL_EXT_frag_depth is not available, which is the case on some mobile \n * devices, we must attempt to fix this only in the vertex shader. \n * The approach is to clamp the z value to the far plane, which closes the \n * shadow volume but also distorts the geometry, so there can still be artifacts\n * on frustum seams.\n *\n * @name czm_depthClamp\n * @glslFunction\n *\n * @param {vec4} coords The vertex in clip coordinates.\n * @returns {vec4} The modified vertex.\n *\n * @example\n * gl_Position = czm_depthClamp(czm_modelViewProjection * vec4(position, 1.0));\n *\n * @see czm_writeDepthClamp\n */\nvec4 czm_depthClamp(vec4 coords)\n{\n#ifndef LOG_DEPTH\n#if __VERSION__ == 300 || defined(GL_EXT_frag_depth)\n v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\n coords.z = 0.0;\n#else\n coords.z = min(coords.z, coords.w);\n#endif\n#endif\n return coords;\n}\n",czm_eastNorthUpToEyeCoordinates:"/**\n * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system \n * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the \n * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.\n *

\n * The ellipsoid is assumed to be centered at the model coordinate's origin.\n *\n * @name czm_eastNorthUpToEyeCoordinates\n * @glslFunction\n *\n * @param {vec3} positionMC The position on the ellipsoid in model coordinates.\n * @param {vec3} normalEC The normalized ellipsoid surface normal, at positionMC, in eye coordinates.\n *\n * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.\n *\n * @example\n * // Transform a vector defined in the east-north-up coordinate \n * // system, (0, 0, 1) which is the surface normal, to eye \n * // coordinates.\n * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);\n */\nmat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\n vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates\n vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordinates\n vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates\n\n return mat3(\n tangentEC.x, tangentEC.y, tangentEC.z,\n bitangentEC.x, bitangentEC.y, bitangentEC.z,\n normalEC.x, normalEC.y, normalEC.z);\n}\n",czm_ellipsoidContainsPoint:"/**\n * DOC_TBA\n *\n * @name czm_ellipsoidContainsPoint\n * @glslFunction\n *\n */\nbool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\n vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\n return (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidWgs84TextureCoordinates:"/**\n * DOC_TBA\n *\n * @name czm_ellipsoidWgs84TextureCoordinates\n * @glslFunction\n */\nvec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\n return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon:"/**\n * Compares left and right componentwise. Returns true\n * if they are within epsilon and false otherwise. The inputs\n * left and right can be floats, vec2s,\n * vec3s, or vec4s.\n *\n * @name czm_equalsEpsilon\n * @glslFunction\n *\n * @param {} left The first vector.\n * @param {} right The second vector.\n * @param {float} epsilon The epsilon to use for equality testing.\n * @returns {bool} true if the components are within epsilon and false otherwise.\n *\n * @example\n * // GLSL declarations\n * bool czm_equalsEpsilon(float left, float right, float epsilon);\n * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);\n * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);\n * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);\n */\nbool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\n\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\n return (abs(left - right) <= epsilon);\n}\n",czm_eyeOffset:"/**\n * DOC_TBA\n *\n * @name czm_eyeOffset\n * @glslFunction\n *\n * @param {vec4} positionEC DOC_TBA.\n * @param {vec3} eyeOffset DOC_TBA.\n *\n * @returns {vec4} DOC_TBA.\n */\nvec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\n // This equation is approximate in x and y.\n vec4 p = positionEC;\n vec4 zEyeOffset = normalize(p) * eyeOffset.z;\n p.xy += eyeOffset.xy + zEyeOffset.xy;\n p.z += zEyeOffset.z;\n return p;\n}\n",czm_eyeToWindowCoordinates:"/**\n * Transforms a position from eye to window coordinates. The transformation\n * from eye to clip coordinates is done using {@link czm_projection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of near = 0 and far = 1.\n *

\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *\n * @name czm_eyeToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in eye coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_projection\n * @see czm_viewportTransformation\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n */\nvec4 czm_eyeToWindowCoordinates(vec4 positionEC)\n{\n vec4 q = czm_projection * positionEC; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_fastApproximateAtan:"/**\n * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.\n *\n * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on\n * \"Efficient approximations for the arctangent function,\" Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.\n * Adapted from ShaderFastLibs under MIT License.\n *\n * Chosen for the following characteristics over range [0, 1]:\n * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)\n * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)\n *\n * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);\n * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between 0 and 1 inclusive.\n *\n * @returns {float} Approximation of atan(x)\n */\nfloat czm_fastApproximateAtan(float x) {\n return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\n\n/**\n * Approximation of atan2.\n *\n * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html\n * However, we replaced their atan curve with Michael Drobot's (see above).\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between -1 and 1 inclusive.\n * @param {float} y Value between -1 and 1 inclusive.\n *\n * @returns {float} Approximation of atan2(x, y)\n */\nfloat czm_fastApproximateAtan(float x, float y) {\n // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.\n // So range-reduce using abs and by flipping whether x or y is on top.\n float t = abs(x); // t used as swap and atan result.\n float opposite = abs(y);\n float adjacent = max(t, opposite);\n opposite = min(t, opposite);\n\n t = czm_fastApproximateAtan(opposite / adjacent);\n\n // Undo range reduction\n t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\n t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\n t = czm_branchFreeTernary(y < 0.0, -t, t);\n return t;\n}\n",czm_fog:"/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-(scalar * scalar));\n return mix(color, fogColor, fog);\n}\n\n/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n * @param {float} fogModifierConstant A constant to modify the appearance of fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\n return mix(color, fogColor, fog);\n}\n",czm_gammaCorrect:"/**\n * Converts a color from RGB space to linear space.\n *\n * @name czm_gammaCorrect\n * @glslFunction\n *\n * @param {vec3} color The color in RGB space.\n * @returns {vec3} The color in linear space.\n */\nvec3 czm_gammaCorrect(vec3 color) {\n#ifdef HDR\n color = pow(color, vec3(czm_gamma));\n#endif\n return color;\n}\n\nvec4 czm_gammaCorrect(vec4 color) {\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\n return color;\n}\n",czm_geodeticSurfaceNormal:"/**\n * DOC_TBA\n *\n * @name czm_geodeticSurfaceNormal\n * @glslFunction\n *\n * @param {vec3} positionOnEllipsoid DOC_TBA\n * @param {vec3} ellipsoidCenter DOC_TBA\n * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA\n * \n * @returns {vec3} DOC_TBA.\n */\nvec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\n return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial:"/**\n * An czm_material with default values. Every material's czm_getMaterial\n * should use this default material as a base for the material it returns.\n * The default normal value is given by materialInput.normalEC.\n *\n * @name czm_getDefaultMaterial\n * @glslFunction\n *\n * @param {czm_materialInput} input The input used to construct the default material.\n *\n * @returns {czm_material} The default material.\n *\n * @see czm_materialInput\n * @see czm_material\n * @see czm_getMaterial\n */\nczm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\n czm_material material;\n material.diffuse = vec3(0.0);\n material.specular = 0.0;\n material.shininess = 1.0;\n material.normal = materialInput.normalEC;\n material.emission = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n",czm_getLambertDiffuse:"/**\n * Calculates the intensity of diffusely reflected light.\n *\n * @name czm_getLambertDiffuse\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n *\n * @returns {float} The intensity of the diffuse reflection.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\n return max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getSpecular:"/**\n * Calculates the specular intensity of reflected light.\n *\n * @name czm_getSpecular\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n *\n * @returns {float} The intensity of the specular highlight.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\n vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\n float specular = max(dot(toReflectedLight, toEyeEC), 0.0);\n\n // pow has undefined behavior if both parameters <= 0.\n // Prevent this by making sure shininess is at least czm_epsilon2.\n return pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getWaterNoise:"/**\n * @private\n */\nvec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n\n // time dependent sampling directions\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n\n // rotate sampling direction by specified angle\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (texture(normalMap, uv0)) +\n (texture(normalMap, uv1)) +\n (texture(normalMap, uv2)) +\n (texture(normalMap, uv3));\n\n // average and scale to between -1 and 1\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_hue:"/**\n * Adjusts the hue of a color.\n * \n * @name czm_hue\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the hue of the color in radians.\n *\n * @returns {float} The color with the hue adjusted.\n *\n * @example\n * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n */\nvec3 czm_hue(vec3 rgb, float adjustment)\n{\n const mat3 toYIQ = mat3(0.299, 0.587, 0.114,\n 0.595716, -0.274453, -0.321263,\n 0.211456, -0.522591, 0.311135);\n const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,\n 1.0, -0.2721, -0.6474,\n 1.0, -1.107, 1.7046);\n \n vec3 yiq = toYIQ * rgb;\n float hue = atan(yiq.z, yiq.y) + adjustment;\n float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n \n vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\n return toRGB * color;\n}\n",czm_inverseGamma:"/**\n * Converts a color in linear space to RGB space.\n *\n * @name czm_inverseGamma\n * @glslFunction\n *\n * @param {vec3} color The color in linear space.\n * @returns {vec3} The color in RGB space.\n */\nvec3 czm_inverseGamma(vec3 color) {\n return pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_isEmpty:"/**\n * Determines if a time interval is empty.\n *\n * @name czm_isEmpty\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} true if the time interval is empty; otherwise, false.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isEmpty(czm_raySegment interval)\n{\n return (interval.stop < 0.0);\n}\n",czm_isFull:"/**\n * Determines if a time interval is empty.\n *\n * @name czm_isFull\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} true if the time interval is empty; otherwise, false.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isFull(czm_raySegment interval)\n{\n return (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction:"/**\n * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.\n *\n * @name czm_latitudeToWebMercatorFraction\n * @glslFunction\n *\n * @param {float} latitude The geodetic latitude, in radians.\n * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.\n * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.\n *\n * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern\n * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return\n * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.\n */ \nfloat czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\n float sinLatitude = sin(latitude);\n float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\n \n return (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_lineDistance:"/**\n * Computes distance from an point in 2D to a line in 2D.\n *\n * @name czm_lineDistance\n * @glslFunction\n *\n * param {vec2} point1 A point along the line.\n * param {vec2} point2 A point along the line.\n * param {vec2} point A point that may or may not be on the line.\n * returns {float} The distance from the point to the line.\n */\nfloat czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\n return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_linearToSrgb:"/**\n * Converts a linear RGB color to an sRGB color.\n *\n * @param {vec3|vec4} linearIn The color in linear color space.\n * @returns {vec3|vec4} The color in sRGB color space. The vector type matches the input.\n */\nvec3 czm_linearToSrgb(vec3 linearIn) \n{\n return pow(linearIn, vec3(1.0/2.2));\n}\n\nvec4 czm_linearToSrgb(vec4 linearIn) \n{\n vec3 srgbOut = pow(linearIn.rgb, vec3(1.0/2.2));\n return vec4(srgbOut, linearIn.a);\n}\n",czm_luminance:"/**\n * Computes the luminance of a color. \n *\n * @name czm_luminance\n * @glslFunction\n *\n * @param {vec3} rgb The color.\n * \n * @returns {float} The luminance.\n *\n * @example\n * float light = czm_luminance(vec3(0.0)); // 0.0\n * float dark = czm_luminance(vec3(1.0)); // ~1.0 \n */\nfloat czm_luminance(vec3 rgb)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n return dot(rgb, W);\n}\n",czm_metersPerPixel:"/**\n * Computes the size of a pixel in meters at a distance from the eye.\n *

\n * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.\n *

\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n * @param {float} pixelRatio The scaling factor from pixel space to coordinate space\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC, float pixelRatio)\n{\n float width = czm_viewport.z;\n float height = czm_viewport.w;\n float pixelWidth;\n float pixelHeight;\n\n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n\n if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n {\n float frustumWidth = right - left;\n float frustumHeight = top - bottom;\n pixelWidth = frustumWidth / width;\n pixelHeight = frustumHeight / height;\n }\n else\n {\n float distanceToPixel = -positionEC.z;\n float inverseNear = 1.0 / czm_currentFrustum.x;\n float tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n }\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}\n\n/**\n * Computes the size of a pixel in meters at a distance from the eye.\n *

\n * Use this version when scaling by pixel ratio.\n *

\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC)\n{\n return czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates:"/**\n * Transforms a position from model to window coordinates. The transformation\n * from model to clip coordinates is done using {@link czm_modelViewProjection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of near = 0 and far = 1.\n *

\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *

\n * This function should not be confused with {@link czm_viewportOrthographic},\n * which is an orthographic projection matrix that transforms from window \n * coordinates to clip coordinates.\n *\n * @name czm_modelToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in model coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_eyeToWindowCoordinates\n * @see czm_modelViewProjection\n * @see czm_viewportTransformation\n * @see czm_viewportOrthographic\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);\n */\nvec4 czm_modelToWindowCoordinates(vec4 position)\n{\n vec4 q = czm_modelViewProjection * position; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_multiplyWithColorBalance:"/**\n * DOC_TBA\n *\n * @name czm_multiplyWithColorBalance\n * @glslFunction\n */\nvec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n \n vec3 target = left * right;\n float leftLuminance = dot(left, W);\n float rightLuminance = dot(right, W);\n float targetLuminance = dot(target, W);\n \n return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar:"/**\n * Computes a value that scales with distance. The scaling is clamped at the near and\n * far distances, and does not extrapolate. This function works with the\n * {@link NearFarScalar} JavaScript class.\n *\n * @name czm_nearFarScalar\n * @glslFunction\n *\n * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).\n * @param {float} cameraDistSq The square of the current distance from the camera.\n *\n * @returns {float} The value at this distance.\n */\nfloat czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\n float valueAtMin = nearFarScalar.y;\n float valueAtMax = nearFarScalar.w;\n float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\n float farDistanceSq = nearFarScalar.z * nearFarScalar.z;\n\n float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\n\n t = pow(clamp(t, 0.0, 1.0), 0.2);\n\n return mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode:" /**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded, float range)\n {\n if (encoded.x == 0.0 && encoded.y == 0.0) {\n return vec3(0.0, 0.0, 0.0);\n }\n\n encoded = encoded / range * 2.0 - 1.0;\n vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\n if (v.z < 0.0)\n {\n v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n }\n\n return normalize(v);\n }\n\n/**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded)\n {\n return czm_octDecode(encoded, 255.0);\n }\n\n /**\n * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {float} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(float encoded)\n {\n float temp = encoded / 256.0;\n float x = floor(temp);\n float y = (temp - x) * 256.0;\n return czm_octDecode(vec2(x, y));\n }\n\n/**\n * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {vec2} encoded The packed oct-encoded, unit-length vectors.\n * @param {vec3} vector1 One decoded and normalized vector.\n * @param {vec3} vector2 One decoded and normalized vector.\n * @param {vec3} vector3 One decoded and normalized vector.\n */\n void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n {\n float temp = encoded.x / 65536.0;\n float x = floor(temp);\n float encodedFloat1 = (temp - x) * 65536.0;\n\n temp = encoded.y / 65536.0;\n float y = floor(temp);\n float encodedFloat2 = (temp - y) * 65536.0;\n\n vector1 = czm_octDecode(encodedFloat1);\n vector2 = czm_octDecode(encodedFloat2);\n vector3 = czm_octDecode(vec2(x, y));\n }\n\n",czm_packDepth:"/**\n * Packs a depth value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packDepth\n * @glslFunction\n *\n * @param {float} depth The floating-point depth.\n * @returns {vec3} The packed depth.\n */\nvec4 czm_packDepth(float depth)\n{\n // See Aras Pranckevi\u010dius' post Encoding Floats to RGBA\n // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return enc;\n}\n",czm_pbrLighting:"vec3 lambertianDiffuse(vec3 diffuseColor)\n{\n return diffuseColor / czm_pi;\n}\n\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\n\nfloat smithVisibilityG1(float NdotV, float roughness)\n{\n // this is the k value for direct lighting.\n // for image based lighting it will be roughness^2 / 2\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n{\n return (\n smithVisibilityG1(NdotL, roughness) *\n smithVisibilityG1(NdotV, roughness)\n );\n}\n\nfloat GGX(float roughness, float NdotH)\n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (czm_pi * f * f);\n}\n\n/**\n * Compute the diffuse and specular contributions using physically based\n * rendering. This function only handles direct lighting.\n *

\n * This function only handles the lighting calculations. Metallic/roughness\n * and specular/glossy must be handled separately. See {@czm_pbrMetallicRoughnessMaterial}, {@czm_pbrSpecularGlossinessMaterial} and {@czm_defaultPbrMaterial}\n *

\n *\n * @name czm_pbrlighting\n * @glslFunction\n *\n * @param {vec3} positionEC The position of the fragment in eye coordinates\n * @param {vec3} normalEC The surface normal in eye coordinates\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} lightColorHdr radiance of the light source. This is a HDR value.\n * @param {czm_pbrParameters} The computed PBR parameters.\n * @return {vec3} The computed HDR color\n *\n * @example\n * czm_pbrParameters pbrParameters = czm_pbrMetallicRoughnessMaterial(\n * baseColor,\n * metallic,\n * roughness\n * );\n * vec3 color = czm_pbrlighting(\n * positionEC,\n * normalEC,\n * lightDirectionEC,\n * lightColorHdr,\n * pbrParameters);\n */\nvec3 czm_pbrLighting(\n vec3 positionEC,\n vec3 normalEC,\n vec3 lightDirectionEC,\n vec3 lightColorHdr,\n czm_pbrParameters pbrParameters\n)\n{\n vec3 v = -normalize(positionEC);\n vec3 l = normalize(lightDirectionEC);\n vec3 h = normalize(v + l);\n vec3 n = normalEC;\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n\n vec3 f0 = pbrParameters.f0;\n float reflectance = max(max(f0.r, f0.g), f0.b);\n vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 F = fresnelSchlick2(f0, f90, VdotH);\n\n float alpha = pbrParameters.roughness;\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n\n vec3 diffuseColor = pbrParameters.diffuseColor;\n // F here represents the specular contribution\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n\n // Lo = (diffuse + specular) * Li * NdotL\n return (diffuseContribution + specularContribution) * NdotL * lightColorHdr;\n}\n",czm_pbrMetallicRoughnessMaterial:"/**\n * Compute parameters for physically based rendering using the\n * metallic/roughness workflow. All inputs are linear; sRGB texture values must\n * be decoded beforehand\n *\n * @name czm_pbrMetallicRoughnessMaterial\n * @glslFunction\n *\n * @param {vec3} baseColor For dielectrics, this is the base color. For metals, this is the f0 value (reflectance at normal incidence)\n * @param {float} metallic 0.0 indicates dielectric. 1.0 indicates metal. Values in between are allowed (e.g. to model rust or dirt);\n * @param {float} roughness A value between 0.0 and 1.0\n * @return {czm_pbrParameters} parameters to pass into {@link czm_pbrLighting}\n */\nczm_pbrParameters czm_pbrMetallicRoughnessMaterial(\n vec3 baseColor,\n float metallic,\n float roughness\n) \n{\n czm_pbrParameters results;\n\n // roughness is authored as perceptual roughness\n // square it to get material roughness\n roughness = clamp(roughness, 0.0, 1.0);\n results.roughness = roughness * roughness;\n\n // dielectrics use f0 = 0.04, metals use albedo as f0\n metallic = clamp(metallic, 0.0, 1.0);\n const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);\n vec3 f0 = mix(REFLECTANCE_DIELECTRIC, baseColor, metallic);\n results.f0 = f0;\n\n // diffuse only applies to dielectrics.\n results.diffuseColor = baseColor * (1.0 - f0) * (1.0 - metallic);\n\n return results;\n}\n",czm_pbrSpecularGlossinessMaterial:"/**\n * Compute parameters for physically based rendering using the\n * specular/glossy workflow. All inputs are linear; sRGB texture values must\n * be decoded beforehand\n *\n * @name czm_pbrSpecularGlossinessMaterial\n * @glslFunction\n *\n * @param {vec3} diffuse The diffuse color for dielectrics (non-metals)\n * @param {vec3} specular The reflectance at normal incidence (f0)\n * @param {float} glossiness A number from 0.0 to 1.0 indicating how smooth the surface is.\n * @return {czm_pbrParameters} parameters to pass into {@link czm_pbrLighting}\n */\nczm_pbrParameters czm_pbrSpecularGlossinessMaterial(\n vec3 diffuse,\n vec3 specular,\n float glossiness\n) \n{\n czm_pbrParameters results;\n\n // glossiness is the opposite of roughness, but easier for artists to use.\n float roughness = 1.0 - glossiness;\n results.roughness = roughness * roughness;\n\n results.diffuseColor = diffuse * (1.0 - max(max(specular.r, specular.g), specular.b));\n results.f0 = specular;\n\n return results;\n}\n",czm_phong:"float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\n return czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\n\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\n return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\n\n/**\n * Computes a color using the Phong lighting model.\n *\n * @name czm_phong\n * @glslFunction\n *\n * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.\n * @param {czm_material} material The fragment's material.\n *\n * @returns {vec4} The computed color.\n *\n * @example\n * vec3 positionToEyeEC = // ...\n * czm_material material = // ...\n * vec3 lightDirectionEC = // ...\n * out_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);\n *\n * @see czm_getMaterial\n */\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down)\n float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n }\n\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n vec3 ambient = vec3(0.0);\n vec3 color = ambient + material.emission;\n color += material.diffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_planeDistance:"/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec4 plane, vec3 point) {\n return (dot(plane.xyz, point) + plane.w);\n}\n\n/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js\n * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\n return (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay:"/**\n * Computes the point along a ray at the given time. time can be positive, negative, or zero.\n *\n * @name czm_pointAlongRay\n * @glslFunction\n *\n * @param {czm_ray} ray The ray to compute the point along.\n * @param {float} time The time along the ray.\n * \n * @returns {vec3} The point along the ray at the given time.\n * \n * @example\n * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction\n * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)\n */\nvec3 czm_pointAlongRay(czm_ray ray, float time)\n{\n return ray.origin + (time * ray.direction);\n}\n",czm_rayEllipsoidIntersectionInterval:"/**\n * DOC_TBA\n *\n * @name czm_rayEllipsoidIntersectionInterval\n * @glslFunction\n */\nczm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)\n{\n // ray and ellipsoid center in eye coordinates. radii in model coordinates.\n vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\n vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\n\n q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\n\n float q2 = dot(q, q);\n float qw = dot(q, w);\n\n if (q2 > 1.0) // Outside ellipsoid.\n {\n if (qw >= 0.0) // Looking outward or tangent (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else // qw < 0.0.\n {\n float qw2 = qw * qw;\n float difference = q2 - 1.0; // Positively valued.\n float w2 = dot(w, w);\n float product = w2 * difference;\n\n if (qw2 < product) // Imaginary roots (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else if (qw2 > product) // Distinct roots (2 intersections).\n {\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Avoid cancellation.\n float root0 = temp / w2;\n float root1 = difference / temp;\n if (root0 < root1)\n {\n czm_raySegment i = czm_raySegment(root0, root1);\n return i;\n }\n else\n {\n czm_raySegment i = czm_raySegment(root1, root0);\n return i;\n }\n }\n else // qw2 == product. Repeated roots (2 intersections).\n {\n float root = sqrt(difference / w2);\n czm_raySegment i = czm_raySegment(root, root);\n return i;\n }\n }\n }\n else if (q2 < 1.0) // Inside ellipsoid (2 intersections).\n {\n float difference = q2 - 1.0; // Negatively valued.\n float w2 = dot(w, w);\n float product = w2 * difference; // Negatively valued.\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Positively valued.\n czm_raySegment i = czm_raySegment(0.0, temp / w2);\n return i;\n }\n else // q2 == 1.0. On ellipsoid.\n {\n if (qw < 0.0) // Looking inward.\n {\n float w2 = dot(w, w);\n czm_raySegment i = czm_raySegment(0.0, -qw / w2);\n return i;\n }\n else // qw >= 0.0. Looking outward or tangent.\n {\n return czm_emptyRaySegment;\n }\n }\n}\n",czm_raySphereIntersectionInterval:"/**\n * Compute the intersection interval of a ray with a sphere.\n *\n * @name czm_raySphereIntersectionInterval\n * @glslFunction\n *\n * @param {czm_ray} ray The ray.\n * @param {vec3} center The center of the sphere.\n * @param {float} radius The radius of the sphere.\n * @return {czm_raySegment} The intersection interval of the ray with the sphere.\n */\nczm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)\n{\n vec3 o = ray.origin;\n vec3 d = ray.direction;\n\n vec3 oc = o - center;\n\n float a = dot(d, d);\n float b = 2.0 * dot(d, oc);\n float c = dot(oc, oc) - (radius * radius);\n\n float det = (b * b) - (4.0 * a * c);\n\n if (det < 0.0) {\n return czm_emptyRaySegment;\n }\n\n float sqrtDet = sqrt(det);\n\n float t0 = (-b - sqrtDet) / (2.0 * a);\n float t1 = (-b + sqrtDet) / (2.0 * a);\n\n czm_raySegment result = czm_raySegment(t0, t1);\n return result;\n}\n",czm_readDepth:"float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\n return czm_reverseLogDepth(texture(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective:"/**\n * Reads a value previously transformed with {@link czm_writeNonPerspective}\n * by dividing it by `w`, the value used in the perspective divide.\n * This function is intended to be called in a fragment shader to access a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The value should have been\n * previously written in the vertex shader with a call to\n * {@link czm_writeNonPerspective}.\n *\n * @name czm_readNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.\n * @param {float} oneOverW One over the perspective divide value, `w`. Usually this is simply `gl_FragCoord.w`.\n * @returns {float|vec2|vec3|vec4} The usable value.\n */\nfloat czm_readNonPerspective(float value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\n return value * oneOverW;\n}\n",czm_reverseLogDepth:"float czm_reverseLogDepth(float logZ)\n{\n#ifdef LOG_DEPTH\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;\n float depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#endif\n return logZ;\n}\n",czm_round:"/**\n * Round a floating point value. This function exists because round() doesn't\n * exist in GLSL 1.00. \n *\n * @param {float|vec2|vec3|vec4} value The value to round\n * @param {float|vec2|vec3|vec3} The rounded value. The type matches the input.\n */\nfloat czm_round(float value) {\n return floor(value + 0.5);\n}\n\nvec2 czm_round(vec2 value) {\n return floor(value + 0.5);\n}\n\nvec3 czm_round(vec3 value) {\n return floor(value + 0.5);\n}\n\nvec4 czm_round(vec4 value) {\n return floor(value + 0.5);\n}\n",czm_sampleOctahedralProjection:"/**\n * Samples the 4 neighboring pixels and return the weighted average.\n *\n * @private\n */\nvec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod)\n{\n direction /= dot(vec3(1.0), abs(direction));\n vec2 rev = abs(direction.zx) - vec2(1.0);\n vec2 neg = vec2(direction.x < 0.0 ? rev.x : -rev.x,\n direction.z < 0.0 ? rev.y : -rev.y);\n vec2 uv = direction.y < 0.0 ? neg : direction.xz;\n vec2 coord = 0.5 * uv + vec2(0.5);\n vec2 pixel = 1.0 / textureSize;\n\n if (lod > 0.0)\n {\n // Each subseqeuent mip level is half the size\n float scale = 1.0 / pow(2.0, lod);\n float offset = ((textureSize.y + 1.0) / textureSize.x);\n\n coord.x *= offset;\n coord *= scale;\n\n coord.x += offset + pixel.x;\n coord.y += (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n }\n else\n {\n coord.x *= (textureSize.y / textureSize.x);\n }\n\n // Do bilinear filtering\n #ifndef OES_texture_float_linear\n vec3 color1 = texture(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\n vec3 color2 = texture(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\n vec3 color3 = texture(projectedMap, coord + pixel).rgb;\n vec3 color4 = texture(projectedMap, coord).rgb;\n\n vec2 texturePosition = coord * textureSize;\n\n float fu = fract(texturePosition.x);\n float fv = fract(texturePosition.y);\n\n vec3 average1 = mix(color4, color2, fu);\n vec3 average2 = mix(color1, color3, fu);\n\n vec3 color = mix(average1, average2, fv);\n #else\n vec3 color = texture(projectedMap, coord).rgb;\n #endif\n\n return color;\n}\n\n\n/**\n * Samples from a cube map that has been projected using an octahedral projection from the given direction.\n *\n * @name czm_sampleOctahedralProjection\n * @glslFunction\n *\n * @param {sampler2D} projectedMap The texture with the octahedral projected cube map.\n * @param {vec2} textureSize The width and height dimensions in pixels of the projected map.\n * @param {vec3} direction The normalized direction used to sample the cube map.\n * @param {float} lod The level of detail to sample.\n * @param {float} maxLod The maximum level of detail.\n * @returns {vec3} The color of the cube map at the direction.\n */\nvec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod, float maxLod) {\n float currentLod = floor(lod + 0.5);\n float nextLod = min(currentLod + 1.0, maxLod);\n\n vec3 colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, currentLod);\n vec3 colorNextLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, nextLod);\n\n return mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation:"/**\n * Adjusts the saturation of a color.\n * \n * @name czm_saturation\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the saturation of the color.\n *\n * @returns {float} The color with the saturation adjusted.\n *\n * @example\n * vec3 greyScale = czm_saturation(color, 0.0);\n * vec3 doubleSaturation = czm_saturation(color, 2.0);\n */\nvec3 czm_saturation(vec3 rgb, float adjustment)\n{\n // Algorithm from Chapter 16 of OpenGL Shading Language\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n vec3 intensity = vec3(dot(rgb, W));\n return mix(intensity, rgb, adjustment);\n}\n",czm_shadowDepthCompare:"\nfloat czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)\n{\n return czm_unpackDepth(czm_textureCube(shadowMap, d));\n}\n\nfloat czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture(shadowMap, uv));\n#endif\n}\n\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n",czm_shadowVisibility:"\nfloat czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n float strength = step(0.0, nDotL);\n#endif\n visibility *= strength;\n#endif\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec2 uv = shadowParameters.texCoords;\n\n depth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\n vec2 texelStepSize = shadowParameters.texelStepSize;\n float radius = 1.0;\n float dx0 = -texelStepSize.x * radius;\n float dy0 = -texelStepSize.y * radius;\n float dx1 = texelStepSize.x * radius;\n float dy1 = texelStepSize.y * radius;\n float visibility = (\n czm_shadowDepthCompare(shadowMap, uv, depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n ) * (1.0 / 9.0);\n#else\n float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",czm_signNotZero:"/**\n * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL\n * built-in function sign except that returns 1.0 instead of 0.0 when the input value is 0.0.\n * \n * @name czm_signNotZero\n * @glslFunction\n *\n * @param {} value The value for which to determine the sign.\n * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.\n */\nfloat czm_signNotZero(float value)\n{\n return value >= 0.0 ? 1.0 : -1.0;\n}\n\nvec2 czm_signNotZero(vec2 value)\n{\n return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\n\nvec3 czm_signNotZero(vec3 value)\n{\n return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\n\nvec4 czm_signNotZero(vec4 value)\n{\n return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}\n",czm_sphericalHarmonics:"/**\n * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.\n *

\n * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].\n *

\n *\n * @name czm_sphericalHarmonics\n * @glslFunction\n *\n * @param {vec3} normal The normalized direction.\n * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.\n * @returns {vec3} The color at the direction.\n *\n * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf\n */\nvec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])\n{\n vec3 L00 = coefficients[0];\n vec3 L1_1 = coefficients[1];\n vec3 L10 = coefficients[2];\n vec3 L11 = coefficients[3];\n vec3 L2_2 = coefficients[4];\n vec3 L2_1 = coefficients[5];\n vec3 L20 = coefficients[6];\n vec3 L21 = coefficients[7];\n vec3 L22 = coefficients[8];\n\n float x = normal.x;\n float y = normal.y;\n float z = normal.z;\n\n return\n L00\n + L1_1 * y\n + L10 * z\n + L11 * x\n + L2_2 * (y * x)\n + L2_1 * (y * z)\n + L20 * (3.0 * z * z - 1.0)\n + L21 * (z * x)\n + L22 * (x * x - y * y);\n}\n",czm_srgbToLinear:"/**\n * Converts an sRGB color to a linear RGB color.\n *\n * @param {vec3|vec4} srgbIn The color in sRGB space\n * @returns {vec3|vec4} The color in linear color space. The vector type matches the input.\n */\nvec3 czm_srgbToLinear(vec3 srgbIn)\n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 czm_srgbToLinear(vec4 srgbIn) \n{\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n",czm_tangentToEyeSpaceMatrix:"/**\n * Creates a matrix that transforms vectors from tangent space to eye space.\n *\n * @name czm_tangentToEyeSpaceMatrix\n * @glslFunction\n *\n * @param {vec3} normalEC The normal vector in eye coordinates.\n * @param {vec3} tangentEC The tangent vector in eye coordinates.\n * @param {vec3} bitangentEC The bitangent vector in eye coordinates.\n *\n * @returns {mat3} The matrix that transforms from tangent space to eye space.\n *\n * @example\n * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);\n * vec3 normal = tangentToEye * texture(normalMap, st).xyz;\n */\nmat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\n vec3 normal = normalize(normalEC);\n vec3 tangent = normalize(tangentEC);\n vec3 bitangent = normalize(bitangentEC);\n return mat3(tangent.x , tangent.y , tangent.z,\n bitangent.x, bitangent.y, bitangent.z,\n normal.x , normal.y , normal.z);\n}\n",czm_textureCube:"/**\n * A wrapper around the texture (WebGL2) / textureCube (WebGL1)\n * function to allow for WebGL 1 support.\n * \n * @name czm_textureCube\n * @glslFunction\n *\n * @param {samplerCube} sampler The sampler.\n * @param {vec3} p The coordinates to sample the texture at.\n */\nvec4 czm_textureCube(samplerCube sampler, vec3 p) {\n#if __VERSION__ == 300\n return texture(sampler, p);\n#else \n return textureCube(sampler, p);\n#endif\n}",czm_transformPlane:"/**\n * Transforms a plane.\n * \n * @name czm_transformPlane\n * @glslFunction\n *\n * @param {vec4} plane The plane in Hessian Normal Form.\n * @param {mat4} transform The inverse-transpose of a transformation matrix.\n */\nvec4 czm_transformPlane(vec4 plane, mat4 transform) {\n vec4 transformedPlane = transform * plane;\n // Convert the transformed plane to Hessian Normal Form\n float normalMagnitude = length(transformedPlane.xyz);\n return transformedPlane / normalMagnitude;\n}\n",czm_translateRelativeToEye:"/**\n * Translates a position (or any vec3) that was encoded with {@link EncodedCartesian3},\n * and then provided to the shader as separate high and low bits to\n * be relative to the eye. As shown in the example, the position can then be transformed in eye\n * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},\n * respectively.\n *

\n * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as\n * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.\n *

\n *\n * @name czm_translateRelativeToEye\n * @glslFunction\n *\n * @param {vec3} high The position's high bits.\n * @param {vec3} low The position's low bits.\n * @returns {vec3} The position translated to be relative to the camera's position.\n *\n * @example\n * in vec3 positionHigh;\n * in vec3 positionLow;\n *\n * void main()\n * {\n * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n * }\n *\n * @see czm_modelViewRelativeToEye\n * @see czm_modelViewProjectionRelativeToEye\n * @see czm_computePosition\n * @see EncodedCartesian3\n */\nvec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\n vec3 highDifference = high - czm_encodedCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedCameraPositionMCLow;\n\n return vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong:"/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\n\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n }\n\n diffuse = clamp(diffuse, 0.0, 1.0);\n\n float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_transpose:"/**\n * Returns the transpose of the matrix. The input matrix can be\n * a mat2, mat3, or mat4.\n *\n * @name czm_transpose\n * @glslFunction\n *\n * @param {} matrix The matrix to transpose.\n *\n * @returns {} The transposed matrix.\n *\n * @example\n * // GLSL declarations\n * mat2 czm_transpose(mat2 matrix);\n * mat3 czm_transpose(mat3 matrix);\n * mat4 czm_transpose(mat4 matrix);\n *\n * // Transpose a 3x3 rotation matrix to find its inverse.\n * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(\n * positionMC, normalEC);\n * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);\n */\nmat2 czm_transpose(mat2 matrix)\n{\n return mat2(\n matrix[0][0], matrix[1][0],\n matrix[0][1], matrix[1][1]);\n}\n\nmat3 czm_transpose(mat3 matrix)\n{\n return mat3(\n matrix[0][0], matrix[1][0], matrix[2][0],\n matrix[0][1], matrix[1][1], matrix[2][1],\n matrix[0][2], matrix[1][2], matrix[2][2]);\n}\n\nmat4 czm_transpose(mat4 matrix)\n{\n return mat4(\n matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\n matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\n matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\n matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth:"/**\n * Unpacks a vec4 depth value to a float in [0, 1) range.\n *\n * @name czm_unpackDepth\n * @glslFunction\n *\n * @param {vec4} packedDepth The packed depth.\n *\n * @returns {float} The floating-point depth in [0, 1) range.\n */\n float czm_unpackDepth(vec4 packedDepth)\n {\n // See Aras Pranckevi\u010dius' post Encoding Floats to RGBA\n // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/\n return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n }\n",czm_unpackFloat:"/**\n * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4.\n *\n * @name czm_unpackFloat\n * @glslFunction\n *\n * @param {vec4} packedFloat The packed float.\n *\n * @returns {float} The floating-point depth in arbitrary range.\n */\nfloat czm_unpackFloat(vec4 packedFloat)\n{\n // Convert to [0.0, 255.0] and round to integer\n packedFloat = floor(packedFloat * 255.0 + 0.5);\n float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0;\n float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0; \n if (exponent == -127.0)\n {\n return 0.0;\n }\n float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000);\n float result = sign * exp2(exponent - 23.0) * mantissa;\n return result;\n}\n",czm_unpackUint:"/**\n * Unpack unsigned integers of 1-4 bytes. in WebGL 1, there is no uint type,\n * so the return value is an int.\n *

\n * There are also precision limitations in WebGL 1. highp int is still limited\n * to 24 bits. Above the value of 2^24 = 16777216, precision loss may occur.\n *

\n *\n * @param {float|vec2|vec3|vec4} packed The packed value. For vectors, the components are listed in little-endian order.\n *\n * @return {int} The unpacked value.\n */\n int czm_unpackUint(float packedValue) {\n float rounded = czm_round(packedValue * 255.0);\n return int(rounded);\n }\n\n int czm_unpackUint(vec2 packedValue) {\n vec2 rounded = czm_round(packedValue * 255.0);\n return int(dot(rounded, vec2(1.0, 256.0)));\n }\n\n int czm_unpackUint(vec3 packedValue) {\n vec3 rounded = czm_round(packedValue * 255.0);\n return int(dot(rounded, vec3(1.0, 256.0, 65536.0)));\n }\n\n int czm_unpackUint(vec4 packedValue) {\n vec4 rounded = czm_round(packedValue * 255.0);\n return int(dot(rounded, vec4(1.0, 256.0, 65536.0, 16777216.0)));\n }\n",czm_valueTransform:"/**\n * Transform metadata values following the EXT_structural_metadata spec\n * by multiplying by scale and adding the offset. Operations are always\n * performed component-wise, even for matrices.\n * \n * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} offset The offset to add\n * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} scale The scale factor to multiply\n * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} value The original value.\n *\n * @return {float|vec2|vec3|vec4|mat2|mat3|mat4} The transformed value of the same scalar/vector/matrix type as the input.\n */\nfloat czm_valueTransform(float offset, float scale, float value) {\n return scale * value + offset;\n}\n\nvec2 czm_valueTransform(vec2 offset, vec2 scale, vec2 value) {\n return scale * value + offset;\n}\n\nvec3 czm_valueTransform(vec3 offset, vec3 scale, vec3 value) {\n return scale * value + offset;\n}\n\nvec4 czm_valueTransform(vec4 offset, vec4 scale, vec4 value) {\n return scale * value + offset;\n}\n\nmat2 czm_valueTransform(mat2 offset, mat2 scale, mat2 value) {\n return matrixCompMult(scale, value) + offset;\n}\n\nmat3 czm_valueTransform(mat3 offset, mat3 scale, mat3 value) {\n return matrixCompMult(scale, value) + offset;\n}\n\nmat4 czm_valueTransform(mat4 offset, mat4 scale, mat4 value) {\n return matrixCompMult(scale, value) + offset;\n}\n",czm_vertexLogDepth:"#ifdef LOG_DEPTH\n// 1.0 at the near plane, increasing linearly from there.\nout float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nout vec3 v_logPositionEC;\n#endif\n#endif\n\nvec4 czm_updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n\n#ifdef SHADOW_MAP\n vec3 logPositionEC = (czm_inverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n#endif\n\n // With the very high far/near ratios used with the logarithmic depth\n // buffer, floating point rounding errors can cause linear depth values\n // to end up on the wrong side of the far plane, even for vertices that\n // are really nowhere near it. Since we always write a correct logarithmic\n // depth value in the fragment shader anyway, we just need to make sure\n // such errors don't cause the primitive to be clipped entirely before\n // we even get to the fragment shader.\n coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\n\n return coords;\n}\n\n/**\n * Writes the logarithmic depth to gl_Position using the already computed gl_Position.\n *\n * @name czm_vertexLogDepth\n * @glslFunction\n */\nvoid czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;\n gl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\n\n/**\n * Writes the logarithmic depth to gl_Position using the provided clip coordinates.\n *

\n * An example use case for this function would be moving the vertex in window coordinates\n * before converting back to clip coordinates. Use the original vertex clip coordinates.\n *

\n * @name czm_vertexLogDepth\n * @glslFunction\n *\n * @param {vec4} clipCoords The vertex in clip coordinates.\n *\n * @example\n * czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0));\n */\nvoid czm_vertexLogDepth(vec4 clipCoords)\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;\n czm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates:"vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate)\n{\n // Reconstruct NDC coordinates\n float x = 2.0 * screenCoordinate.x - 1.0;\n float y = 2.0 * screenCoordinate.y - 1.0;\n float z = (screenCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n vec4 q = vec4(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= screenCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s\n {\n q = czm_inverseProjection * q;\n }\n else\n {\n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n\n q.x = (q.x * (right - left) + left + right) * 0.5;\n q.y = (q.y * (top - bottom) + bottom + top) * 0.5;\n q.z = (q.z * (near - far) - near - far) * 0.5;\n q.w = 1.0;\n }\n\n return q;\n}\n\n/**\n * Transforms a position from window to eye coordinates.\n * The transform from window to normalized device coordinates is done using components\n * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating\n * the inverse of czm_viewportTransformation. The transformation from\n * normalized device coordinates to clip coordinates is done using fragmentCoordinate.w,\n * which is expected to be the scalar used in the perspective divide. The transformation\n * from clip to eye coordinates is done using {@link czm_inverseProjection}.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec4} fragmentCoordinate The position in window coordinates to transform.\n *\n * @returns {vec4} The transformed position in eye coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @example\n * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);\n */\nvec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\n vec2 screenCoordXY = (fragmentCoordinate.xy - czm_viewport.xy) / czm_viewport.zw;\n return czm_screenToEyeCoordinates(vec4(screenCoordXY, fragmentCoordinate.zw));\n}\n\nvec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)\n{\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#if defined(LOG_DEPTH) || defined(LOG_DEPTH_READ_ONLY)\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\n float depthFromNear = pow(2.0, log2Depth) - 1.0;\n float depthFromCamera = depthFromNear + near;\n vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n return eyeCoordinate;\n#else\n vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);\n vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);\n#endif\n return eyeCoordinate;\n}\n\n/**\n * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.\n * This function produces more accurate results for window positions with log depth than\n * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version\n * of czm_windowToEyeCoordinates.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.\n * @param {float} depthOrLogDepth A depth or log depth for the fragment.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @returns {vec4} The transformed position in eye coordinates.\n */\nvec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)\n{\n vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw;\n return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth);\n}\n",czm_writeDepthClamp:"// emulated noperspective\n#if !defined(LOG_DEPTH)\nin float v_WindowZ;\n#endif\n\n/**\n * Emulates GL_DEPTH_CLAMP. Clamps a fragment to the near and far plane\n * by writing the fragment's depth. See czm_depthClamp for more details.\n *\n * @name czm_writeDepthClamp\n * @glslFunction\n *\n * @example\n * out_FragColor = color;\n * czm_writeDepthClamp();\n *\n * @see czm_depthClamp\n */\nvoid czm_writeDepthClamp()\n{\n#if (!defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))\n gl_FragDepth = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);\n#endif\n}\n",czm_writeLogDepth:"#ifdef LOG_DEPTH\nin float v_depthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\nuniform vec2 u_polygonOffset;\n#endif\n\n#endif\n\n/**\n * Writes the fragment depth to the logarithmic depth buffer.\n *

\n * Use this when the vertex shader does not call {@link czm_vertexlogDepth}, for example, when\n * ray-casting geometry using a full screen quad.\n *

\n * @name czm_writeLogDepth\n * @glslFunction\n *\n * @param {float} depth The depth coordinate, where 1.0 is on the near plane and\n * depth increases in eye-space units from there\n *\n * @example\n * czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0);\n */\nvoid czm_writeLogDepth(float depth)\n{\n#if (defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))\n // Discard the vertex if it's not between the near and far planes.\n // We allow a bit of epsilon on the near plane comparison because a 1.0\n // from the vertex shader (indicating the vertex should be _on_ the near\n // plane) will not necessarily come here as exactly 1.0.\n if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {\n discard;\n }\n\n#ifdef POLYGON_OFFSET\n // Polygon offset: m * factor + r * units\n float factor = u_polygonOffset[0];\n float units = u_polygonOffset[1];\n\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n // This factor doesn't work in IE 10\n if (factor != 0.0) {\n // m = sqrt(dZdX^2 + dZdY^2);\n float x = dFdx(depth);\n float y = dFdy(depth);\n float m = sqrt(x * x + y * y);\n\n // Apply the factor before computing the log depth.\n depth += m * factor;\n }\n#endif\n\n#endif\n\n gl_FragDepth = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\n // Apply the units after the log depth.\n gl_FragDepth += czm_epsilon7 * units;\n#endif\n\n#endif\n}\n\n/**\n * Writes the fragment depth to the logarithmic depth buffer.\n *

\n * Use this when the vertex shader calls {@link czm_vertexlogDepth}.\n *

\n *\n * @name czm_writeLogDepth\n * @glslFunction\n */\nvoid czm_writeLogDepth() {\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",czm_writeNonPerspective:"/**\n * Transforms a value for non-perspective interpolation by multiplying\n * it by w, the value used in the perspective divide. This function is\n * intended to be called in a vertex shader to compute the value of a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The fragment shader\n * must call {@link czm_readNonPerspective} to retrieve the final\n * non-perspective value.\n *\n * @name czm_writeNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.\n * @param {float} w The perspective divide value. Usually this is the computed `gl_Position.w`.\n * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a `varying` and read in the\n * fragment shader with {@link czm_readNonPerspective}.\n */\nfloat czm_writeNonPerspective(float value, float w) {\n return value * w;\n}\n\nvec2 czm_writeNonPerspective(vec2 value, float w) {\n return value * w;\n}\n\nvec3 czm_writeNonPerspective(vec3 value, float w) {\n return value * w;\n}\n\nvec4 czm_writeNonPerspective(vec4 value, float w) {\n return value * w;\n}\n"};function vV(e){return(e=e.replace(/\/\/.*/g,"")).replace(/\/\*\*[\s\S]*?\*\//gm,function(t){const n=t.match(/\n/gm).length;let i="";for(let o=0;o0;){const o=e.pop();n.push(o),0===o.requiredBy.length&&t.push(o)}for(;t.length>0;){const o=t.shift();e.push(o);for(let r=0;r=0;--o)i=`${i+t[o].glslSource}\n`;return i.replace(n.glslSource,"")}function PV(e,t,n){let i,o,r="";const s=e.sources;if(c(s))for(i=0,o=s.length;imn.maximumTextureSize)throw new E(`Width must be less than or equal to the maximum texture size (${mn.maximumTextureSize}). Check maximumTextureSize.`);if(T.typeOf.number.greaterThan("height",i,0),i>mn.maximumTextureSize)throw new E(`Height must be less than or equal to the maximum texture size (${mn.maximumTextureSize}). Check maximumTextureSize.`);if(!vt.validate(r))throw new E("Invalid options.pixelFormat.");if(!l&&!bt.validate(s))throw new E("Invalid options.pixelDatatype.");if(r===vt.DEPTH_COMPONENT&&s!==bt.UNSIGNED_SHORT&&s!==bt.UNSIGNED_INT)throw new E("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(r===vt.DEPTH_STENCIL&&s!==bt.UNSIGNED_INT_24_8)throw new E("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(s===bt.FLOAT&&!t.floatingPointTexture)throw new E("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(s===bt.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new E("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(vt.isDepthFormat(r)){if(c(o))throw new E("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.");if(!t.depthTexture)throw new E("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.")}if(l){if(!c(o)||!c(o.arrayBufferView))throw new E("When options.pixelFormat is compressed, options.source.arrayBufferView must be defined.");if(vt.isDXTFormat(a)&&!t.s3tc)throw new E("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_compressed_texture_s3tc extension. Check context.s3tc.");if(vt.isPVRTCFormat(a)&&!t.pvrtc)throw new E("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_pvrtc extension. Check context.pvrtc.");if(vt.isASTCFormat(a)&&!t.astc)throw new E("When options.pixelFormat is ASTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_astc extension. Check context.astc.");if(vt.isETC2Format(a)&&!t.etc)throw new E("When options.pixelFormat is ETC2 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc extension. Check context.etc.");if(vt.isETC1Format(a)&&!t.etc1)throw new E("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc1 extension. Check context.etc1.");if(vt.isBC7Format(a)&&!t.bc7)throw new E("When options.pixelFormat is BC7 compressed, this WebGL implementation must support the EXT_texture_compression_bptc extension. Check context.bc7.");if(vt.compressedTextureSizeInBytes(a,n,i)!==o.arrayBufferView.byteLength)throw new E("The byte length of the array buffer is invalid for the compressed texture with the given width and height.")}const u=e.preMultiplyAlpha||r===vt.RGB||r===vt.LUMINANCE,d=g(e.flipY,!0),h=g(e.skipColorSpaceConversion,!1);let m=!0;const _=t._gl,p=_.TEXTURE_2D,y=_.createTexture();_.activeTexture(_.TEXTURE0),_.bindTexture(p,y);let x,A=4;if(c(o)&&c(o.arrayBufferView)&&!l&&(A=vt.alignmentInBytes(r,s,n)),_.pixelStorei(_.UNPACK_ALIGNMENT,A),_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,h?_.NONE:_.BROWSER_DEFAULT_WEBGL),c(o))if(c(o.arrayBufferView)){_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,!1);let w,v,D,C=o.arrayBufferView;if(l){if(_.compressedTexImage2D(p,0,a,n,i,0,C),c(o.mipLevels))for(v=n,D=i,w=0;wn.drawingBufferWidth)throw new E("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(r+a>n.drawingBufferHeight)throw new E("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new Au({context:t,width:s,height:a,pixelFormat:i,source:{framebuffer:c(l)?l:t.defaultFramebuffer,xOffset:o,yOffset:r,width:s,height:a}})},Object.defineProperties(Au.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){let t=e.minificationFilter,n=e.magnificationFilter;const i=this._context,r=this._pixelDatatype;(r===bt.FLOAT&&!i.textureFloatLinear||r===bt.HALF_FLOAT&&!i.textureHalfFloatLinear)&&(t=t===ei.NEAREST_MIPMAP_NEAREST||t===ei.NEAREST_MIPMAP_LINEAR||t===ei.LINEAR_MIPMAP_NEAREST||t===ei.LINEAR_MIPMAP_LINEAR?ei.NEAREST_MIPMAP_NEAREST:ei.NEAREST,n=ls.NEAREST),i.webgl2&&vt.isDepthFormat(this._pixelFormat)&&(t=ei.NEAREST,n=ls.NEAREST);const a=i._gl,l=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(l,this._texture),a.texParameteri(l,a.TEXTURE_MIN_FILTER,t),a.texParameteri(l,a.TEXTURE_MAG_FILTER,n),a.texParameteri(l,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(l,a.TEXTURE_WRAP_T,e.wrapT),c(this._textureFilterAnisotropic)&&a.texParameteri(l,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(l,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),Au.prototype.copyFrom=function(e){T.defined("options",e);const t=g(e.xOffset,0),n=g(e.yOffset,0);if(T.defined("options.source",e.source),vt.isDepthFormat(this._pixelFormat))throw new E("Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(vt.isCompressedFormat(this._pixelFormat))throw new E("Cannot call copyFrom with a compressed texture pixel format.");T.typeOf.number.greaterThanOrEquals("xOffset",t,0),T.typeOf.number.greaterThanOrEquals("yOffset",n,0),T.typeOf.number.lessThanOrEquals("xOffset + options.source.width",t+e.source.width,this._width),T.typeOf.number.lessThanOrEquals("yOffset + options.source.height",n+e.source.height,this._height);const i=e.source,o=this._context,r=o._gl,s=this._textureTarget;r.activeTexture(r.TEXTURE0),r.bindTexture(s,this._texture);const a=i.width,l=i.height;let u=i.arrayBufferView;const d=this._width,h=this._height,m=this._internalFormat,_=this._pixelFormat,p=this._pixelDatatype,y=this._preMultiplyAlpha,A=this._flipY,x=g(e.skipColorSpaceConversion,!1);let C=4;c(u)&&(C=vt.alignmentInBytes(_,p,a)),r.pixelStorei(r.UNPACK_ALIGNMENT,C),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,x?r.NONE:r.BROWSER_DEFAULT_WEBGL);let w=!1;if(!this._initialized){if(0===t&&0===n&&a===d&&l===h)c(u)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),A&&(u=vt.flipY(u,_,p,d,h)),r.texImage2D(s,0,m,d,h,0,_,bt.toWebGLConstant(p,o),u)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,A),r.texImage2D(s,0,m,_,bt.toWebGLConstant(p,o),i)),w=!0;else{r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);const v=vt.createTypedArray(_,p,d,h);r.texImage2D(s,0,m,d,h,0,_,bt.toWebGLConstant(p,o),v)}this._initialized=!0}w||(c(u)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),A&&(u=vt.flipY(u,_,p,a,l)),r.texSubImage2D(s,0,t,n,a,l,_,bt.toWebGLConstant(p,o),u)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,A),r.texSubImage2D(s,0,t,n,_,bt.toWebGLConstant(p,o),i))),r.bindTexture(s,null)},Au.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){if(e=g(e,0),t=g(t,0),n=g(n,0),i=g(i,0),o=g(o,this._width),r=g(r,this._height),vt.isDepthFormat(this._pixelFormat))throw new E("Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(this._pixelDatatype===bt.FLOAT)throw new E("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===bt.HALF_FLOAT)throw new E("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");if(vt.isCompressedFormat(this._pixelFormat))throw new E("Cannot call copyFrom with a compressed texture pixel format.");T.typeOf.number.greaterThanOrEquals("xOffset",e,0),T.typeOf.number.greaterThanOrEquals("yOffset",t,0),T.typeOf.number.greaterThanOrEquals("framebufferXOffset",n,0),T.typeOf.number.greaterThanOrEquals("framebufferYOffset",i,0),T.typeOf.number.lessThanOrEquals("xOffset + width",e+o,this._width),T.typeOf.number.lessThanOrEquals("yOffset + height",t+r,this._height);const s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(a,0,e,t,n,i,o,r),s.bindTexture(a,null),this._initialized=!0},Au.prototype.generateMipmap=function(e){if(e=g(e,By.DONT_CARE),vt.isDepthFormat(this._pixelFormat))throw new E("Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(vt.isCompressedFormat(this._pixelFormat))throw new E("Cannot call generateMipmap with a compressed pixel format.");if(!this._context.webgl2){if(this._width>1&&!O.isPowerOfTwo(this._width))throw new E("width must be a power of two to call generateMipmap() in a WebGL1 context.");if(this._height>1&&!O.isPowerOfTwo(this._height))throw new E("height must be a power of two to call generateMipmap() in a WebGL1 context.")}if(!By.validate(e))throw new E("hint is invalid.");this._hasMipmap=!0;const t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)},Au.prototype.isDestroyed=function(){return!1},Au.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),Ye(this)};const jn=Au,ky=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3}),js={POINTS:oe.POINTS,LINES:oe.LINES,LINE_LOOP:oe.LINE_LOOP,LINE_STRIP:oe.LINE_STRIP,TRIANGLES:oe.TRIANGLES,TRIANGLE_STRIP:oe.TRIANGLE_STRIP,TRIANGLE_FAN:oe.TRIANGLE_FAN,isLines:function(e){return e===js.LINES||e===js.LINE_LOOP||e===js.LINE_STRIP},isTriangles:function(e){return e===js.TRIANGLES||e===js.TRIANGLE_STRIP||e===js.TRIANGLE_FAN},validate:function(e){return e===js.POINTS||e===js.LINES||e===js.LINE_LOOP||e===js.LINE_STRIP||e===js.TRIANGLES||e===js.TRIANGLE_STRIP||e===js.TRIANGLE_FAN}},At=Object.freeze(js);function lO(e){e=g(e,g.EMPTY_OBJECT),T.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=g(e.primitiveType,At.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=g(e.geometryType,ky.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}lO.computeNumberOfVertices=function(e){T.typeOf.object("geometry",e);let t=-1;for(const n in e.attributes)if(e.attributes.hasOwnProperty(n)&&c(e.attributes[n])&&c(e.attributes[n].values)){const i=e.attributes[n],o=i.values.length/i.componentsPerAttribute;if(t!==o&&-1!==t)throw new E("All attribute lists must have the same number of attributes.");t=o}return t};const Uce=new Se,zce=new f,RV=new k,Vce=[new Se,new Se,new Se],Hce=[new G,new G,new G],Gce=[new G,new G,new G],jce=new f,Wce=new yt,qce=new k,Yce=new oo;lO._textureCoordinateRotationPoints=function(e,t,n,i){let o;const r=Ce.center(i,Uce),s=Se.toCartesian(r,n,zce),a=Rn.eastNorthUpToFixedFrame(s,n,RV),l=k.inverse(a,RV),u=Hce,d=Vce;d[0].longitude=i.west,d[0].latitude=i.south,d[1].longitude=i.west,d[1].latitude=i.north,d[2].longitude=i.east,d[2].latitude=i.south;let h=jce;for(o=0;o<3;o++)Se.toCartesian(d[o],n,h),h=k.multiplyByPointAsVector(l,h,h),u[o].x=h.x,u[o].y=h.y;const m=yt.fromAxisAngle(f.UNIT_Z,-t,Wce),_=ne.fromQuaternion(m,qce),p=e.length;let y=Number.POSITIVE_INFINITY,A=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,C=Number.NEGATIVE_INFINITY;for(o=0;o255)throw new E("attribute must have a strideInBytes less than or equal to 255 or not specify it.");if(c(t.instanceDivisor)&&t.instanceDivisor>0&&!i.instancedArrays)throw new E("instanced arrays is not supported");if(c(t.instanceDivisor)&&t.instanceDivisor<0)throw new E("attribute must have an instanceDivisor greater than or equal to zero");if(c(t.instanceDivisor)&&r)throw new E("attribute cannot have have an instanceDivisor if it is not backed by a buffer");if(c(t.instanceDivisor)&&t.instanceDivisor>0&&0===t.index)throw new E("attribute zero cannot have an instanceDivisor greater than 0");const a={index:g(t.index,n),enabled:g(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:r?t.value.slice(0):void 0,componentsPerAttribute:s,componentDatatype:g(t.componentDatatype,ee.FLOAT),normalize:g(t.normalize,!1),offsetInBytes:g(t.offsetInBytes,0),strideInBytes:g(t.strideInBytes,0),instanceDivisor:g(t.instanceDivisor,0)};if(o)a.vertexAttrib=function(l){const u=this.index;l.bindBuffer(l.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),l.vertexAttribPointer(u,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),l.enableVertexAttribArray(u),this.instanceDivisor>0&&(i.glVertexAttribDivisor(u,this.instanceDivisor),i._vertexAttribDivisors[u]=this.instanceDivisor,i._previousDrawInstanced=!0)},a.disableVertexAttribArray=function(l){l.disableVertexAttribArray(this.index),this.instanceDivisor>0&&i.glVertexAttribDivisor(n,0)};else{switch(a.componentsPerAttribute){case 1:a.vertexAttrib=function(l){l.vertexAttrib1fv(this.index,this.value)};break;case 2:a.vertexAttrib=function(l){l.vertexAttrib2fv(this.index,this.value)};break;case 3:a.vertexAttrib=function(l){l.vertexAttrib3fv(this.index,this.value)};break;case 4:a.vertexAttrib=function(l){l.vertexAttrib4fv(this.index,this.value)}}a.disableVertexAttribArray=function(l){}}e.push(a)}function NV(e,t,n){for(let i=0;i0&&(l=!0),c(s[r].value)&&(u=!0);const h={};for(r=0;r0)for(r=MV(e[o[0]]),t=1;t0){const u=ee.getSizeInBytes(e[o[0]].componentDatatype),d=a%u;0!==d&&(a+=u-d);const m=new ArrayBuffer(r*a),_={};for(t=0;t=O.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?yn.createIndexBuffer({context:t,typedArray:new Uint32Array(_),usage:i,indexDatatype:Ot.UNSIGNED_INT}):yn.createIndexBuffer({context:t,typedArray:new Uint16Array(_),usage:i,indexDatatype:Ot.UNSIGNED_SHORT})),new Vf({context:t,attributes:d,indexBuffer:m})},Object.defineProperties(Vf.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),Vf.prototype.getAttribute=function(e){return T.defined("index",e),this._attributes[e]},Vf.prototype._bind=function(){c(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&function Kce(e){const t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;const i=t._vertexAttribDivisors,o=e._attributes,r=mn.maximumVertexAttributes;let s;if(n){const a=o.length;for(s=0;s0&&(t.glVertexAttribDivisor(s,0),i[s]=0)}(this),this._hasConstantAttributes&&function Qce(e,t){const n=e._attributes,i=n.length;for(let o=0;o (textureSize.y / textureSize.x))\n {\n mipLevel = 1.0;\n if (uv.y - pixel.y > yMipLevel1)\n {\n mipLevel = 2.0;\n if (uv.y - pixel.y * 3.0 > yMipLevel2)\n {\n mipLevel = 3.0;\n if (uv.y - pixel.y * 5.0 > yMipLevel3)\n {\n mipLevel = 4.0;\n if (uv.y - pixel.y * 7.0 > yMipLevel4)\n {\n mipLevel = 5.0;\n }\n }\n }\n }\n }\n\n if (mipLevel > 0.0)\n {\n float scale = pow(2.0, mipLevel);\n\n uv.y -= (pixel.y * (mipLevel - 1.0) * 2.0);\n uv.x *= ((textureSize.x - 2.0) / textureSize.y);\n\n uv.x -= 1.0 + pixel.x;\n uv.y -= (1.0 - (1.0 / pow(2.0, mipLevel - 1.0)));\n uv *= scale;\n }\n else\n {\n uv.x *= (textureSize.x / textureSize.y);\n }\n\n if(mipLevel == 0.0)\n {\n out_FragColor = texture(texture0, uv);\n }\n else if(mipLevel == 1.0)\n {\n out_FragColor = texture(texture1, uv);\n }\n else if(mipLevel == 2.0)\n {\n out_FragColor = texture(texture2, uv);\n }\n else if(mipLevel == 3.0)\n {\n out_FragColor = texture(texture3, uv);\n }\n else if(mipLevel == 4.0)\n {\n out_FragColor = texture(texture4, uv);\n }\n else if(mipLevel == 5.0)\n {\n out_FragColor = texture(texture5, uv);\n }\n else\n {\n out_FragColor = vec4(0.0);\n }\n}\n",uniformMap:h,outputTexture:this._texture,persists:!1,owner:this});e.commandList.push(m),this._ready=!0},f_.prototype.isDestroyed=function(){return!1},f_.prototype.destroy=function(){return uO(this),this._texture=this._texture&&this._texture.destroy(),Ye(this)};const qA=f_;function YA(e){e=g(e,g.EMPTY_OBJECT);const t=c(e.imageBasedLightingFactor)?G.clone(e.imageBasedLightingFactor):new G(1,1);T.typeOf.object("options.imageBasedLightingFactor",t),T.typeOf.number.greaterThanOrEquals("options.imageBasedLightingFactor.x",t.x,0),T.typeOf.number.lessThanOrEquals("options.imageBasedLightingFactor.x",t.x,1),T.typeOf.number.greaterThanOrEquals("options.imageBasedLightingFactor.y",t.y,0),T.typeOf.number.lessThanOrEquals("options.imageBasedLightingFactor.y",t.y,1),this._imageBasedLightingFactor=t;const n=g(e.luminanceAtZenith,.2);T.typeOf.number("options.luminanceAtZenith",n),this._luminanceAtZenith=n;const i=e.sphericalHarmonicCoefficients;if(c(i)&&(!Array.isArray(i)||9!==i.length))throw new E("options.sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");this._sphericalHarmonicCoefficients=i,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapAtlas=void 0,this._specularEnvironmentMapAtlasDirty=!0,this._specularEnvironmentMapLoaded=!1,this._previousSpecularEnvironmentMapLoaded=!1,this._useDefaultSpecularMaps=!1,this._useDefaultSphericalHarmonics=!1,this._shouldRegenerateShaders=!1,this._previousFrameNumber=void 0,this._previousImageBasedLightingFactor=G.clone(t),this._previousLuminanceAtZenith=n,this._previousSphericalHarmonicCoefficients=i,this._removeErrorListener=void 0}Object.defineProperties(YA.prototype,{imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){T.typeOf.object("imageBasedLightingFactor",e),T.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),T.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),T.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),T.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),this._previousImageBasedLightingFactor=G.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor),this._imageBasedLightingFactor=G.clone(e,this._imageBasedLightingFactor)}},luminanceAtZenith:{get:function(){return this._luminanceAtZenith},set:function(e){this._previousLuminanceAtZenith=this._luminanceAtZenith,this._luminanceAtZenith=e}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){if(c(e)&&(!Array.isArray(e)||9!==e.length))throw new E("sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients,this._sphericalHarmonicCoefficients=e}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){e!==this._specularEnvironmentMaps&&(this._specularEnvironmentMapAtlasDirty=this._specularEnvironmentMapAtlasDirty||e!==this._specularEnvironmentMaps,this._specularEnvironmentMapLoaded=!1),this._specularEnvironmentMaps=e}},enabled:{get:function(){return this._imageBasedLightingFactor.x>0||this._imageBasedLightingFactor.y>0}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},useDefaultSphericalHarmonics:{get:function(){return this._useDefaultSphericalHarmonics}},useSphericalHarmonicCoefficients:{get:function(){return c(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics}},specularEnvironmentMapAtlas:{get:function(){return this._specularEnvironmentMapAtlas}},useDefaultSpecularMaps:{get:function(){return this._useDefaultSpecularMaps}},useSpecularEnvironmentMaps:{get:function(){return c(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps}}}),YA.prototype.update=function(e){if(e.frameNumber===this._previousFrameNumber)return;this._previousFrameNumber=e.frameNumber;const t=e.context;e.brdfLutGenerator.update(e),this._shouldRegenerateShaders=!1;const n=this._imageBasedLightingFactor,i=this._previousImageBasedLightingFactor;G.equals(n,i)||(this._shouldRegenerateShaders=n.x>0&&0===i.x||0===n.x&&i.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||n.y>0&&0===i.y||0===n.y&&i.y>0,this._previousImageBasedLightingFactor=G.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor)),this._luminanceAtZenith!==this._previousLuminanceAtZenith&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||c(this._luminanceAtZenith)!==c(this._previousLuminanceAtZenith),this._previousLuminanceAtZenith=this._luminanceAtZenith),this._previousSphericalHarmonicCoefficients!==this._sphericalHarmonicCoefficients&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||c(this._previousSphericalHarmonicCoefficients)!==c(this._sphericalHarmonicCoefficients),this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients),this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._previousSpecularEnvironmentMapLoaded!==this._specularEnvironmentMapLoaded,this._previousSpecularEnvironmentMapLoaded=this._specularEnvironmentMapLoaded,this._specularEnvironmentMapAtlasDirty&&(function ule(e,t){if(qA.isSupported(t)){if(e._specularEnvironmentMapAtlas=e._specularEnvironmentMapAtlas&&e._specularEnvironmentMapAtlas.destroy(),c(e._specularEnvironmentMaps)){const n=new qA(e._specularEnvironmentMaps);e._specularEnvironmentMapAtlas=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}(this,t),this._specularEnvironmentMapAtlasDirty=!1),c(this._specularEnvironmentMapAtlas)&&(this._specularEnvironmentMapAtlas.update(e),this._specularEnvironmentMapAtlas.ready&&(this._specularEnvironmentMapLoaded=!0));const o=!c(this._specularEnvironmentMapAtlas)&&c(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,r=!c(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,s=!c(this._sphericalHarmonicCoefficients)&&c(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,a=!c(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||o||r||s||a,this._useDefaultSpecularMaps=!c(this._specularEnvironmentMapAtlas)&&c(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!c(this._sphericalHarmonicCoefficients)&&c(e.sphericalHarmonicCoefficients)},YA.prototype.isDestroyed=function(){return!1},YA.prototype.destroy=function(){return this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),Ye(this)};const VV=YA;function Id(e){e=g(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(Id.prototype,{length:{get:function(){return this._length},set:function(e){T.typeOf.number.greaterThanOrEquals("length",e,0);const t=this._array,n=this._length;if(et.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}}),Id.prototype.get=function(e){return T.typeOf.number.lessThan("index",e,this._array.length),this._array[e]},Id.prototype.set=function(e,t){T.typeOf.number("index",e),e>=this._length&&(this.length=e+1),this._array[e]=t},Id.prototype.peek=function(){return this._array[this._length-1]},Id.prototype.push=function(e){const t=this.length++;this._array[t]=e},Id.prototype.pop=function(){if(0===this._length)return;const e=this._array[this._length-1];return--this.length,e},Id.prototype.reserve=function(e){T.typeOf.number.greaterThanOrEquals("length",e,0),e>this._array.length&&(this._array.length=e)},Id.prototype.resize=function(e){T.typeOf.number.greaterThanOrEquals("length",e,0),this.length=e},Id.prototype.trim=function(e){e=g(e,this._length),this._array.length=e};const gp=Id;function Lw(e){e=g(e,g.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}Lw.ALL=Object.freeze(new Lw({color:new X(0,0,0,0),depth:1,stencil:0})),Lw.prototype.execute=function(e,t){e.clear(this,t)};const cr=Lw;function br(e,t,n,i){this.x=g(e,0),this.y=g(t,0),this.width=g(n,0),this.height=g(i,0)}br.packedLength=4,br.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t},br.unpack=function(e,t,n){return T.defined("array",e),t=g(t,0),c(n)||(n=new br),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n},br.fromPoints=function(e,t){if(c(t)||(t=new br),!c(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;const n=e.length;let 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},br.intersect=function(e,t){T.typeOf.object("left",e),T.typeOf.object("right",t);const n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.widthr+t.height?Qn.OUTSIDE:Qn.INTERSECTING},br.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},br.prototype.clone=function(e){return br.clone(this,e)},br.prototype.intersect=function(e){return br.intersect(this,e)},br.prototype.equals=function(e){return br.equals(this,e)};const Vt=br,Rw={CLOCKWISE:oe.CW,COUNTER_CLOCKWISE:oe.CCW,validate:function(e){return e===Rw.CLOCKWISE||e===Rw.COUNTER_CLOCKWISE}},El=Object.freeze(Rw),ple=function HV(e){if("object"!=typeof e||null===e)return e;let t;const n=Object.keys(e);for(let i=0;imn.maximumAliasedLineWidth)throw new E("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!El.validate(this.frontFace))throw new E("Invalid renderState.frontFace.");if(!function mle(e){return e===oe.FRONT||e===oe.BACK||e===oe.FRONT_AND_BACK}(this.cull.face))throw new E("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new E("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new E("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new E("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new E("renderState.depthRange.far must be less than or equal to one.");if(!function _le(e){return e===oe.NEVER||e===oe.LESS||e===oe.EQUAL||e===oe.LEQUAL||e===oe.GREATER||e===oe.NOTEQUAL||e===oe.GEQUAL||e===oe.ALWAYS}(this.depthTest.func))throw new E("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new E("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!GV(this.blending.equationRgb))throw new E("Invalid renderState.blending.equationRgb.");if(!GV(this.blending.equationAlpha))throw new E("Invalid renderState.blending.equationAlpha.");if(!Nw(this.blending.functionSourceRgb))throw new E("Invalid renderState.blending.functionSourceRgb.");if(!Nw(this.blending.functionSourceAlpha))throw new E("Invalid renderState.blending.functionSourceAlpha.");if(!Nw(this.blending.functionDestinationRgb))throw new E("Invalid renderState.blending.functionDestinationRgb.");if(!Nw(this.blending.functionDestinationAlpha))throw new E("Invalid renderState.blending.functionDestinationAlpha.");if(!jV(this.stencilTest.frontFunction))throw new E("Invalid renderState.stencilTest.frontFunction.");if(!jV(this.stencilTest.backFunction))throw new E("Invalid renderState.stencilTest.backFunction.");if(!Uy(this.stencilTest.frontOperation.fail))throw new E("Invalid renderState.stencilTest.frontOperation.fail.");if(!Uy(this.stencilTest.frontOperation.zFail))throw new E("Invalid renderState.stencilTest.frontOperation.zFail.");if(!Uy(this.stencilTest.frontOperation.zPass))throw new E("Invalid renderState.stencilTest.frontOperation.zPass.");if(!Uy(this.stencilTest.backOperation.fail))throw new E("Invalid renderState.stencilTest.backOperation.fail.");if(!Uy(this.stencilTest.backOperation.zFail))throw new E("Invalid renderState.stencilTest.backOperation.zFail.");if(!Uy(this.stencilTest.backOperation.zPass))throw new E("Invalid renderState.stencilTest.backOperation.zPass.");if(c(this.viewport)){if(this.viewport.width<0)throw new E("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new E("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>mn.maximumViewportWidth)throw new E(`renderState.viewport.width must be less than or equal to the maximum viewport width (${mn.maximumViewportWidth.toString()}). Check maximumViewportWidth.`);if(this.viewport.height>mn.maximumViewportHeight)throw new E(`renderState.viewport.height must be less than or equal to the maximum viewport height (${mn.maximumViewportHeight.toString()}). Check maximumViewportHeight.`)}this.id=0,this._applyFunctions=[]}let gle=0,Od={};function h_(e,t,n){n?e.enable(t):e.disable(t)}function WV(e,t){e.frontFace(t.frontFace)}function qV(e,t){const n=t.cull,i=n.enabled;h_(e,e.CULL_FACE,i),i&&e.cullFace(n.face)}function YV(e,t){e.lineWidth(t.lineWidth)}function XV(e,t){const n=t.polygonOffset,i=n.enabled;h_(e,e.POLYGON_OFFSET_FILL,i),i&&e.polygonOffset(n.factor,n.units)}function ZV(e,t,n){const i=t.scissorTest,o=c(n.scissorTest)?n.scissorTest.enabled:i.enabled;if(h_(e,e.SCISSOR_TEST,o),o){const r=c(n.scissorTest)?n.scissorTest.rectangle:i.rectangle;e.scissor(r.x,r.y,r.width,r.height)}}function $V(e,t){const n=t.depthRange;e.depthRange(n.near,n.far)}function KV(e,t){const n=t.depthTest,i=n.enabled;h_(e,e.DEPTH_TEST,i),i&&e.depthFunc(n.func)}function QV(e,t){const n=t.colorMask;e.colorMask(n.red,n.green,n.blue,n.alpha)}function JV(e,t){e.depthMask(t.depthMask)}function e4(e,t){e.stencilMask(t.stencilMask)}function t4(e,t,n){const i=t.blending,o=c(n.blendingEnabled)?n.blendingEnabled:i.enabled;h_(e,e.BLEND,o),o&&(function yle(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}(e,i.color),e.blendEquationSeparate(i.equationRgb,i.equationAlpha),e.blendFuncSeparate(i.functionSourceRgb,i.functionDestinationRgb,i.functionSourceAlpha,i.functionDestinationAlpha))}function n4(e,t){const n=t.stencilTest,i=n.enabled;if(h_(e,e.STENCIL_TEST,i),i){const o=n.frontFunction,r=n.backFunction,s=n.reference,a=n.mask;e.stencilFunc(o,s,a),e.stencilFuncSeparate(e.BACK,r,s,a),e.stencilFuncSeparate(e.FRONT,o,s,a);const l=n.frontOperation;e.stencilOpSeparate(e.FRONT,l.fail,l.zFail,l.zPass);const m=n.backOperation;e.stencilOpSeparate(e.BACK,m.fail,m.zFail,m.zPass)}}function i4(e,t){const n=t.sampleCoverage,i=n.enabled;h_(e,e.SAMPLE_COVERAGE,i),i&&e.sampleCoverage(n.value,n.invert)}Pd.fromCache=function(e){const t=JSON.stringify(e);let n=Od[t];if(c(n))return++n.referenceCount,n.state;let i=new Pd(e);const o=JSON.stringify(i);return n=Od[o],c(n)||(i.id=gle++,i=ple(i),n={referenceCount:0,state:i},Od[o]=n),++n.referenceCount,Od[t]={referenceCount:1,state:n.state},n.state},Pd.removeFromCache=function(e){const t=new Pd(e),n=JSON.stringify(t),i=Od[n],o=JSON.stringify(e),r=Od[o];c(r)&&(--r.referenceCount,0===r.referenceCount&&(delete Od[o],c(i)&&--i.referenceCount)),c(i)&&0===i.referenceCount&&delete Od[n]},Pd.getCache=function(){return Od},Pd.clearCache=function(){Od={}};const ble=new Vt;function o4(e,t,n){let i=g(t.viewport,n.viewport);c(i)||(i=ble,i.width=n.context.drawingBufferWidth,i.height=n.context.drawingBufferHeight),n.context.uniformState.viewport=i,e.viewport(i.x,i.y,i.width,i.height)}Pd.apply=function(e,t,n){WV(e,t),qV(e,t),YV(e,t),XV(e,t),$V(e,t),KV(e,t),QV(e,t),JV(e,t),e4(e,t),n4(e,t),i4(e,t),ZV(e,t,n),t4(e,t,n),o4(e,t,n)},Pd.partialApply=function(e,t,n,i,o,r){if(t!==n){let d=n._applyFunctions[t.id];c(d)||(d=function Ale(e,t){const n=[];return e.frontFace!==t.frontFace&&n.push(WV),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&n.push(qV),e.lineWidth!==t.lineWidth&&n.push(YV),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&n.push(XV),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&n.push($V),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&n.push(KV),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&n.push(QV),e.depthMask!==t.depthMask&&n.push(JV),e.stencilMask!==t.stencilMask&&n.push(e4),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&n.push(n4),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&n.push(i4),n}(t,n),n._applyFunctions[t.id]=d);const h=d.length;for(let m=0;me.right)throw new E("right must be greater than left.");if(e.bottom>e.top)throw new E("top must be greater than bottom.");if(e.near<=0||e.near>e.far)throw new E("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=k.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}Object.defineProperties(Ld.prototype,{projectionMatrix:{get:function(){return s4(this),this._orthographicMatrix}}});const xle=new f,Cle=new f,Ele=new f,dO=new f;Ld.prototype.computeCullingVolume=function(e,t,n){if(!c(e))throw new E("position is required.");if(!c(t))throw new E("direction is required.");if(!c(n))throw new E("up is required.");const i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,l=this.near,u=this.far,d=f.cross(t,n,xle);f.normalize(d,d);const h=Cle;f.multiplyByScalar(t,l,h),f.add(e,h,h);const m=Ele;f.multiplyByScalar(d,a,m),f.add(h,m,m);let _=i[0];return c(_)||(_=i[0]=new fe),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-f.dot(d,m),f.multiplyByScalar(d,s,m),f.add(h,m,m),_=i[1],c(_)||(_=i[1]=new fe),_.x=-d.x,_.y=-d.y,_.z=-d.z,_.w=-f.dot(f.negate(d,dO),m),f.multiplyByScalar(n,r,m),f.add(h,m,m),_=i[2],c(_)||(_=i[2]=new fe),_.x=n.x,_.y=n.y,_.z=n.z,_.w=-f.dot(n,m),f.multiplyByScalar(n,o,m),f.add(h,m,m),_=i[3],c(_)||(_=i[3]=new fe),_.x=-n.x,_.y=-n.y,_.z=-n.z,_.w=-f.dot(f.negate(n,dO),m),_=i[4],c(_)||(_=i[4]=new fe),_.x=t.x,_.y=t.y,_.z=t.z,_.w=-f.dot(t,h),f.multiplyByScalar(t,u,m),f.add(e,m,m),_=i[5],c(_)||(_=i[5]=new fe),_.x=-t.x,_.y=-t.y,_.z=-t.z,_.w=-f.dot(f.negate(t,dO),m),this._cullingVolume},Ld.prototype.getPixelDimensions=function(e,t,n,i,o){if(s4(this),!c(e)||!c(t))throw new E("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new E("drawingBufferWidth must be greater than zero.");if(t<=0)throw new E("drawingBufferHeight must be greater than zero.");if(!c(n))throw new E("distance is required.");if(!c(i))throw new E("pixelRatio is required.");if(i<=0)throw new E("pixelRatio must be greater than zero.");if(!c(o))throw new E("A result object is required.");const l=i*(this.top-this.bottom)/t;return o.x=i*(this.right-this.left)/e,o.y=l,o},Ld.prototype.clone=function(e){return c(e)||(e=new Ld),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},Ld.prototype.equals=function(e){return c(e)&&e instanceof Ld&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},Ld.prototype.equalsEpsilon=function(e,t,n){return e===this||c(e)&&e instanceof Ld&&O.equalsEpsilon(this.right,e.right,t,n)&&O.equalsEpsilon(this.left,e.left,t,n)&&O.equalsEpsilon(this.top,e.top,t,n)&&O.equalsEpsilon(this.bottom,e.bottom,t,n)&&O.equalsEpsilon(this.near,e.near,t,n)&&O.equalsEpsilon(this.far,e.far,t,n)};const qa=Ld;function mc(e){e=g(e,g.EMPTY_OBJECT),this._offCenterFrustum=new qa,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far}function bp(e){if(!(c(e.width)&&c(e.aspectRatio)&&c(e.near)&&c(e.far)))throw new E("width, aspectRatio, near, or far parameters are not set.");const 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 E("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new E("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;const n=1/e.aspectRatio;t.right=.5*e.width,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}mc.packedLength=4,mc.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t},mc.unpack=function(e,t,n){return T.defined("array",e),t=g(t,0),c(n)||(n=new mc),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n},Object.defineProperties(mc.prototype,{projectionMatrix:{get:function(){return bp(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return bp(this),this._offCenterFrustum}}}),mc.prototype.computeCullingVolume=function(e,t,n){return bp(this),this._offCenterFrustum.computeCullingVolume(e,t,n)},mc.prototype.getPixelDimensions=function(e,t,n,i,o){return bp(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)},mc.prototype.clone=function(e){return c(e)||(e=new mc),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},mc.prototype.equals=function(e){return!!(c(e)&&e instanceof mc)&&(bp(this),bp(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},mc.prototype.equalsEpsilon=function(e,t,n){return!!(c(e)&&e instanceof mc)&&(bp(this),bp(e),O.equalsEpsilon(this.width,e.width,t,n)&&O.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};const $n=mc;function a4(e){e=g(e,g.EMPTY_OBJECT),T.typeOf.object("options.metadata",e.metadata),this._metadata=e.metadata}Object.defineProperties(a4.prototype,{metadata:{get:function(){return this._metadata}}});const c4=a4,Mw=function wle(e,t){return t=g(t,0),Ty(e,t,Math.min(4,e.length))};function xu(e,t,n,i){this._tileset=e,this._tile=t,this._resource=n,c(i)||(i=[]),this._contents=i,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(xu.prototype,{featurePropertiesDirty:{get:function(){const e=this._contents,t=e.length;for(let n=0;n0){const o=Math.min(t,mn.maximumTextureSize),r=Math.ceil(t/mn.maximumTextureSize),s=1/o,a=.5*s,l=1/r,u=.5*l;n=new G(o,r),i=new fe(s,a,l,u)}this._translucentFeaturesLength=0,this._featuresLength=t,this._textureDimensions=n,this._textureStep=i,this._owner=e.owner,this._statistics=e.statistics,this._colorChangedCallback=e.colorChangedCallback}function l4(e){const t=e._textureDimensions;return t.x*t.y*4}function u4(e){if(!c(e._batchValues)){const t=l4(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function d4(e){if(!c(e._showAlphaProperties)){const n=new Uint8Array(2*e._featuresLength).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}function KA(e,t){if(!c(e)||e<0||e>=t)throw new E(`batchId is required and between zero and featuresLength - 1 (${t}`-NaN)}Object.defineProperties(_a.prototype,{translucentFeaturesLength:{get:function(){return this._translucentFeaturesLength}},byteLength:{get:function(){let e=0;return c(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),c(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}}}),_a.DEFAULT_COLOR_VALUE=X.WHITE,_a.DEFAULT_SHOW_VALUE=!0,_a.prototype.setShow=function(e,t){if(KA(e,this._featuresLength),T.typeOf.bool("show",t),t&&!c(this._showAlphaProperties))return;const n=d4(this),i=2*e,o=t?255:0;n[i]!==o&&(n[i]=o,u4(this)[4*e+3]=t?n[i+1]:0,this._batchValuesDirty=!0)},_a.prototype.setAllShow=function(e){T.typeOf.bool("show",e);const t=this._featuresLength;for(let n=0;n0){const i=e._pickIds,o=l4(e),r=new Uint8Array(o),s=e._owner,a=e._statistics;for(let l=0;l=a)throw new E(`Parent index ${t} exceeds the total number of instances: ${a}`);if(n.indexOf(t)>-1)throw new E("Circular dependency detected in the batch table hierarchy.");n.push(t);const l=c(i)?i[t]:1,u=c(i)?r[t]:t;for(let d=0;d0;){if(l[t=d.pop()]===u)continue;l[t]=u;const h=n(e,t);if(c(h))return h;const m=o[t],_=s[t];for(let p=0;p=t)throw new E(`batchId is required and must be between zero and featuresLength - 1 (${t}`-NaN)}function _4(e,t){return e=Et.replaceMain(e,"tile_main"),t?`${e}uniform float tile_colorBlend; \nvoid tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n tile_featureColor = czm_gammaCorrect(tile_featureColor); \n out_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n} \n`:`${e}void tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n} \n`}function g4(e,t,n){if(!c(t))return _4(e,n);let i=new RegExp(`(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+${t};`);const o=e.match(i);if(!c(o))return _4(e,n);const r=o[0],s=o[2];let u;if(e=(e=Et.replaceMain(e,"tile_main")).replace(r,""),"vec3"===s||"vec4"===s){const d="vec3"===s?`vec4(${t}, 1.0)`:t,h="vec3"===s?"tile_diffuse.xyz":"tile_diffuse";i=new RegExp(t,"g"),e=e.replace(i,h),u=` vec4 source = ${d}; \n tile_diffuse = tile_diffuse_final(source, tile_featureColor); \n tile_main(); \n`}else"sampler2D"===s&&(e=function oue(e,t){const n=`texture(${t}`;let r,i=0,o=e.indexOf(n,i);for(;o>-1;){let s=0;for(let u=o;u0?(s="",e&&(s+="uniform bool tile_translucentCommand; \n"),s+=`uniform sampler2D tile_batchTexture; \nout vec4 tile_featureColor; \nout vec2 tile_featureSt; \nvoid main() \n{ \n vec2 st = computeSt(${t}); \n vec4 featureProperties = texture(tile_batchTexture, st); \n tile_color(featureProperties); \n float show = ceil(featureProperties.a); \n gl_Position *= show; \n`,e&&(s+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n gl_Position *= 0.0; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n gl_Position *= 0.0; \n } \n } \n"),s+=" tile_featureColor = featureProperties; \n tile_featureSt = st; \n}"):s=`out vec2 tile_featureSt; \nvoid main() \n{ \n tile_color(vec4(1.0)); \n tile_featureSt = computeSt(${t}); \n}`,`${r}\n${function iue(e){return 1===e._batchTexture.textureDimensions.y?"uniform vec4 tile_textureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n return vec2(centerX + (batchId * stepX), 0.5); \n} \n":"uniform vec4 tile_textureStep; \nuniform vec2 tile_textureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n float stepY = tile_textureStep.z; \n float centerY = tile_textureStep.w; \n float xId = mod(batchId, tile_textureDimensions.x); \n float yId = floor(batchId / tile_textureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}(i)}${s}`}},eo.prototype.getFragmentShaderCallback=function(e,t,n){if(0!==this.featuresLength)return function(i){return i=g4(i,t,!0),mn.maximumVertexTextureImageUnits>0?(i+="uniform sampler2D tile_pickTexture; \nin vec2 tile_featureSt; \nin vec4 tile_featureColor; \nvoid main() \n{ \n tile_color(tile_featureColor); \n",n&&(i+=" out_FragColor.rgb *= out_FragColor.a; \n"),i+="}"):(e&&(i+="uniform bool tile_translucentCommand; \n"),i+="uniform sampler2D tile_pickTexture; \nuniform sampler2D tile_batchTexture; \nin vec2 tile_featureSt; \nvoid main() \n{ \n vec4 featureProperties = texture(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n",e&&(i+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n discard; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n discard; \n } \n } \n"),i+=" tile_color(featureProperties); \n",n&&(i+=" out_FragColor.rgb *= out_FragColor.a; \n"),i+="} \n"),i}},eo.prototype.getClassificationFragmentShaderCallback=function(){if(0!==this.featuresLength)return function(e){return(e=Et.replaceMain(e,"tile_main"))+(mn.maximumVertexTextureImageUnits>0?"uniform sampler2D tile_pickTexture;\nin vec2 tile_featureSt; \nin vec4 tile_featureColor; \nvoid main() \n{ \n tile_main(); \n out_FragColor = tile_featureColor; \n out_FragColor.rgb *= out_FragColor.a; \n}":"uniform sampler2D tile_batchTexture; \nuniform sampler2D tile_pickTexture;\nin vec2 tile_featureSt; \nvoid main() \n{ \n tile_main(); \n vec4 featureProperties = texture(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n out_FragColor = featureProperties; \n out_FragColor.rgb *= out_FragColor.a; \n} \n")}},eo.prototype.getUniformMapCallback=function(){if(0===this.featuresLength)return;const e=this;return function(t){return Gn(t,{tile_batchTexture:function(){return g(e._batchTexture.batchTexture,e._batchTexture.defaultTexture)},tile_textureDimensions:function(){return e._batchTexture.textureDimensions},tile_textureStep:function(){return e._batchTexture.textureStep},tile_colorBlend:function(){return function rue(e){const t=e._content.tileset,n=t.colorBlendMode;if(n===Fw.HIGHLIGHT)return 0;if(n===Fw.REPLACE)return 1;if(n===Fw.MIX)return O.clamp(t.colorBlendAmount,O.EPSILON4,1);throw new E(`Invalid color blend mode "${n}".`)}(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}},eo.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};function aue(e){const t=Zt.shallowClone(e),n=t.pass===ze.TRANSLUCENT;return t.uniformMap=c(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return n},t}function cue(e){const t=Zt.shallowClone(e);return t.pass=ze.TRANSLUCENT,t.renderState=function pue(e){const t=zt(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ji.ALPHA_BLEND,t.stencilTest=Tn.setCesium3DTileBit(),t.stencilMask=Tn.CESIUM_3D_TILE_MASK,Pt.fromCache(t)}(e.renderState),t}function lue(e){const t=Zt.shallowClone(e);return t.renderState=function mue(e){const t=zt(e,!0);return t.stencilTest=Tn.setCesium3DTileBit(),t.stencilMask=Tn.CESIUM_3D_TILE_MASK,Pt.fromCache(t)}(e.renderState),t}function due(e,t){const n=Zt.shallowClone(t),i=zt(n.renderState,!0);i.cull.enabled=!0,i.cull.face=dr.FRONT,i.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i.polygonOffset={enabled:!0,factor:5,units:5},i.stencilTest=Tn.setCesium3DTileBit(),i.stencilMask=Tn.CESIUM_3D_TILE_MASK,n.renderState=Pt.fromCache(i),n.castShadows=!1,n.receiveShadows=!1,n.uniformMap=zt(t.uniformMap);const o=new G(5,5);return n.uniformMap.u_polygonOffset=function(){return o},n.shaderProgram=function uue(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!c(n)){const i=t.fragmentShaderSource.clone();i.defines=c(i.defines)?i.defines.slice(0):[],i.defines.push("POLYGON_OFFSET"),n=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}return n}(e,t.shaderProgram),n}function fue(e,t){const n=Zt.shallowClone(e),i=zt(n.renderState,!0);return i.stencilTest.enabled=!0,i.stencilTest.mask=Tn.SKIP_LOD_MASK,i.stencilTest.reference=Tn.CESIUM_3D_TILE_MASK|t<>>Tn.SKIP_LOD_BIT_SHIFT}eo.prototype.addDerivedCommands=function(e,t){const n=e.commandList,i=n.length,o=this._content._tile,r=o._finalResolution,s=o.tileset,a=s.isSkippingLevelOfDetail&&s.hasMixedContent&&e.context.stencilBuffer,l=function sue(e){const t=e._batchTexture.translucentFeaturesLength;return 0===t?0:t===e.featuresLength?1:2}(this);for(let u=t;un.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return Je.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!Je.binary_ops[String.fromCharCode(t)]||Je.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return Je.isIdentifierStart(t)||Je.isDecimalDigit(t)}throwError(t){const n=new Error(t+" at character "+this.index);throw n.index=this.index,n.description=t,n}runHook(t,n){if(Je.hooks[t]){const i={context:this,node:n};return Je.hooks.run(t,i),i.node}return n}searchHook(t){if(Je.hooks[t]){const n={context:this};return Je.hooks[t].find(function(i){return i.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let t=this.code;for(;t===Je.SPACE_CODE||t===Je.TAB_CODE||t===Je.LF_CODE||t===Je.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions();return this.runHook("after-all",1===t.length?t[0]:{type:Je.COMPOUND,body:t})}gobbleExpressions(t){let i,o,n=[];for(;this.index0;){if(Je.binary_ops.hasOwnProperty(t)&&(!Je.isIdentifierStart(this.code)||this.index+t.lengthr.right_a&&h.right_a?i>h.prec:i<=h.prec;for(;o.length>2&&d(o[o.length-2]);)a=o.pop(),n=o.pop().value,s=o.pop(),t={type:Je.BINARY_EXP,operator:n,left:s,right:a},o.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+u),o.push(r,t)}for(l=o.length-1,t=o[l];l>1;)t={type:Je.BINARY_EXP,operator:o[l-1].value,left:o[l-2],right:t},l-=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,Je.isDecimalDigit(t)||t===Je.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===Je.SQUOTE_CODE||t===Je.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===Je.OBRACK_CODE)o=this.gobbleArray();else{for(n=this.expr.substr(this.index,Je.max_unop_len),i=n.length;i>0;){if(Je.unary_ops.hasOwnProperty(n)&&(!Je.isIdentifierStart(this.code)||this.index+n.length=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(r===Je.COMMA_CODE){if(this.index++,o++,o!==n.length)if(t===Je.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===Je.CBRACK_CODE)for(let s=n.length;s{if("object"!=typeof n||!n.name||!n.init)throw new Error("Invalid JSEP plugin format");this.registered[n.name]||(n.init(this.jsep),this.registered[n.name]=n)})}}(Je),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":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"}),Je.max_unop_len=Je.getMaxKeyLen(Je.unary_ops),Je.max_binop_len=Je.getMaxKeyLen(Je.binary_ops);const g_=e=>new Je(e).parse();Object.getOwnPropertyNames(Je).forEach(e=>{void 0===g_[e]&&"prototype"!==e&&(g_[e]=Je[e])}),g_.Jsep=Je;var xue={name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;const i=n.node,o=this.gobbleExpression();if(o||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;const r=this.gobbleExpression();if(r||this.throwError("Expected expression"),n.node={type:"ConditionalExpression",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 :")}})}};g_.plugins.register(xue);const Bt=Object.freeze({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});function Cu(e,t){let n;T.typeOf.string("expression",e),this._expression=e,e=function Mue(e,t){if(!c(t))return e;for(const n in t)if(t.hasOwnProperty(n)){const i=new RegExp(`\\$\\{${n}\\}`,"g"),o=`(${t[n]})`;c(o)&&(e=e.replace(i,o))}return e}(e,t),e=function Bue(e){let t=e,n="",i=t.indexOf("${");for(;i>=0;){const o=t.indexOf("'"),r=t.indexOf('"');let s;if(o>=0&&o=0&&r=this.arrayArray.length&&this.arrayArray.push([]);const e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new G),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new f),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new fe),this.cartesian4Array[this.cartesian4Index++]}};Cu.prototype.evaluate=function(e,t){Nn.reset();const n=this._runtimeAst.evaluate(e);return t instanceof X&&n instanceof fe?X.fromCartesian4(n,t):n instanceof G||n instanceof f||n instanceof fe?n.clone(t):n},Cu.prototype.evaluateColor=function(e,t){Nn.reset();const n=this._runtimeAst.evaluate(e);return X.fromCartesian4(n,t)},Cu.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e}\n{\n return ${o};\n}\n`,o},Cu.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)},Cu.prototype.getVariables=function(){let e=[];return this._runtimeAst.getVariables(e),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};const Cue=["!","-","+"],A4=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],Uw=/\${(.*?)}/g,Eue=/\\/g,wue="@#%",Sue=/@#%/g,zw=new X,Vw={abs:fs(Math.abs),sqrt:fs(Math.sqrt),cos:fs(Math.cos),sin:fs(Math.sin),tan:fs(Math.tan),acos:fs(Math.acos),asin:fs(Math.asin),atan:fs(Math.atan),radians:fs(O.toRadians),degrees:fs(O.toDegrees),sign:fs(O.sign),floor:fs(Math.floor),ceil:fs(Math.ceil),round:fs(Math.round),exp:fs(Math.exp),exp2:fs(function Due(e){return Math.pow(2,e)}),log:fs(Math.log),log2:fs(function Iue(e){return O.log2(e)}),fract:fs(function vue(e){return e-Math.floor(e)}),length:function Pue(e,t){if("number"==typeof t)return Math.abs(t);if(t instanceof G)return G.magnitude(t);if(t instanceof f)return f.magnitude(t);if(t instanceof fe)return fe.magnitude(t);throw new Ie(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)},normalize:function Oue(e,t){if("number"==typeof t)return 1;if(t instanceof G)return G.normalize(t,Nn.getCartesian2());if(t instanceof f)return f.normalize(t,Nn.getCartesian3());if(t instanceof fe)return fe.normalize(t,Nn.getCartesian4());throw new Ie(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}},Hw={atan2:Gw(Math.atan2,!1),pow:Gw(Math.pow,!1),min:Gw(Math.min,!0),max:Gw(Math.max,!0),distance:function Lue(e,t,n){if("number"==typeof t&&"number"==typeof n)return Math.abs(t-n);if(t instanceof G&&n instanceof G)return G.distance(t,n);if(t instanceof f&&n instanceof f)return f.distance(t,n);if(t instanceof fe&&n instanceof fe)return fe.distance(t,n);throw new Ie(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)},dot:function Rue(e,t,n){if("number"==typeof t&&"number"==typeof n)return t*n;if(t instanceof G&&n instanceof G)return G.dot(t,n);if(t instanceof f&&n instanceof f)return f.dot(t,n);if(t instanceof fe&&n instanceof fe)return fe.dot(t,n);throw new Ie(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)},cross:function Nue(e,t,n){if(t instanceof f&&n instanceof f)return f.cross(t,n,Nn.getCartesian3());throw new Ie(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}},_O={clamp:T4(O.clamp,!0),mix:T4(O.lerp,!0)};function fs(e){return function(t,n){if("number"==typeof n)return e(n);if(n instanceof G)return G.fromElements(e(n.x),e(n.y),Nn.getCartesian2());if(n instanceof f)return f.fromElements(e(n.x),e(n.y),e(n.z),Nn.getCartesian3());if(n instanceof fe)return fe.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),Nn.getCartesian4());throw new Ie(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function Gw(e,t){return function(n,i,o){if(t&&"number"==typeof o){if("number"==typeof i)return e(i,o);if(i instanceof G)return G.fromElements(e(i.x,o),e(i.y,o),Nn.getCartesian2());if(i instanceof f)return f.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),Nn.getCartesian3());if(i instanceof fe)return fe.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),e(i.w,o),Nn.getCartesian4())}if("number"==typeof i&&"number"==typeof o)return e(i,o);if(i instanceof G&&o instanceof G)return G.fromElements(e(i.x,o.x),e(i.y,o.y),Nn.getCartesian2());if(i instanceof f&&o instanceof f)return f.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),Nn.getCartesian3());if(i instanceof fe&&o instanceof fe)return fe.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),e(i.w,o.w),Nn.getCartesian4());throw new Ie(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${o}.`)}}function T4(e,t){return function(n,i,o,r){if(t&&"number"==typeof r){if("number"==typeof i&&"number"==typeof o)return e(i,o,r);if(i instanceof G&&o instanceof G)return G.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),Nn.getCartesian2());if(i instanceof f&&o instanceof f)return f.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),Nn.getCartesian3());if(i instanceof fe&&o instanceof fe)return fe.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),Nn.getCartesian4())}if("number"==typeof i&&"number"==typeof o&&"number"==typeof r)return e(i,o,r);if(i instanceof G&&o instanceof G&&r instanceof G)return G.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),Nn.getCartesian2());if(i instanceof f&&o instanceof f&&r instanceof f)return f.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),Nn.getCartesian3());if(i instanceof fe&&o instanceof fe&&r instanceof fe)return fe.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),Nn.getCartesian4());throw new Ie(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${o}, and ${r}.`)}}function Mt(e,t,n,i,o){this._type=e,this._value=t,this._left=n,this._right=i,this._test=o,this.evaluate=void 0,function Yue(e){e._type===Bt.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===Bt.FUNCTION_CALL?"test"===e._value?e.evaluate=e._evaluateRegExpTest:"exec"===e._value?e.evaluate=e._evaluateRegExpExec:"toString"===e._value&&(e.evaluate=e._evaluateToString):e._type===Bt.UNARY?"!"===e._value?e.evaluate=e._evaluateNot:"-"===e._value?e.evaluate=e._evaluateNegative:"+"===e._value?e.evaluate=e._evaluatePositive:"isNaN"===e._value?e.evaluate=e._evaluateNaN:"isFinite"===e._value?e.evaluate=e._evaluateIsFinite:"isExactClass"===e._value?e.evaluate=e._evaluateIsExactClass:"isClass"===e._value?e.evaluate=e._evaluateIsClass:"getExactClassName"===e._value?e.evaluate=e._evaluateGetExactClassName:"Boolean"===e._value?e.evaluate=e._evaluateBooleanConversion:"Number"===e._value?e.evaluate=e._evaluateNumberConversion:"String"===e._value?e.evaluate=e._evaluateStringConversion:c(Vw[e._value])&&(e.evaluate=function Zue(e){const t=Vw[e];return function(n){const i=this._left.evaluate(n);return t(e,i)}}(e._value)):e._type===Bt.BINARY?"+"===e._value?e.evaluate=e._evaluatePlus:"-"===e._value?e.evaluate=e._evaluateMinus:"*"===e._value?e.evaluate=e._evaluateTimes:"/"===e._value?e.evaluate=e._evaluateDivide:"%"===e._value?e.evaluate=e._evaluateMod:"==="===e._value?e.evaluate=e._evaluateEqualsStrict:"!=="===e._value?e.evaluate=e._evaluateNotEqualsStrict:"<"===e._value?e.evaluate=e._evaluateLessThan:"<="===e._value?e.evaluate=e._evaluateLessThanOrEquals:">"===e._value?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:c(Hw[e._value])&&(e.evaluate=function $ue(e){const t=Hw[e];return function(n){const i=this._left.evaluate(n),o=this._right.evaluate(n);return t(e,i,o)}}(e._value)):e._type===Bt.TERNARY?e.evaluate=function Kue(e){const t=_O[e];return function(n){const i=this._left.evaluate(n),o=this._right.evaluate(n),r=this._test.evaluate(n);return t(e,i,o,r)}}(e._value):e._type===Bt.MEMBER?e.evaluate="brackets"===e._value?e._evaluateMemberBrackets:e._evaluateMemberDot:e._type===Bt.ARRAY?e.evaluate=e._evaluateArray:e._type===Bt.VARIABLE?e.evaluate=e._evaluateVariable:e._type===Bt.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===Bt.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===Bt.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===Bt.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===Bt.REGEX?e.evaluate=e._evaluateRegExp:e._type===Bt.BUILTIN_VARIABLE?"tiles3d_tileset_time"===e._value&&(e.evaluate=Xue):e.evaluate=e._evaluateLiteral}(this)}function gO(e){return e.replace(Sue,"\\")}function yO(e){return e._type>=Bt.LITERAL_NULL}function xi(e,t){let n,i,o,r;if("Literal"===t.type)n=function kue(e){const t=typeof e.value;return null===e.value?new Mt(Bt.LITERAL_NULL,null):"boolean"===t?new Mt(Bt.LITERAL_BOOLEAN,e.value):"number"===t?new Mt(Bt.LITERAL_NUMBER,e.value):"string"===t?e.value.indexOf("${")>=0?new Mt(Bt.VARIABLE_IN_STRING,e.value):new Mt(Bt.LITERAL_STRING,gO(e.value)):void 0}(t);else if("CallExpression"===t.type)n=function Uue(e,t){const n=t.arguments,i=n.length;let o,r,s,a;if("MemberExpression"===t.callee.type){o=t.callee.property.name;const l=t.callee.object;if("test"===o||"exec"===o){if(!c(l.callee)||"regExp"!==l.callee.name)throw new Ie(`${o} is not a function.`);return 0===i?"test"===o?new Mt(Bt.LITERAL_BOOLEAN,!1):new Mt(Bt.LITERAL_NULL,null):(s=xi(e,l),a=xi(e,n[0]),new Mt(Bt.FUNCTION_CALL,o,s,a))}if("toString"===o)return r=xi(e,l),new Mt(Bt.FUNCTION_CALL,o,r);throw new Ie(`Unexpected function call "${o}".`)}if(o=t.callee.name,"color"===o){if(0===i)return new Mt(Bt.LITERAL_COLOR,o);if(r=xi(e,n[0]),c(n[1])){const l=xi(e,n[1]);return new Mt(Bt.LITERAL_COLOR,o,[r,l])}return new Mt(Bt.LITERAL_COLOR,o,[r])}if("rgb"===o||"hsl"===o){if(i<3)throw new Ie(`${o} requires three arguments.`);return r=[xi(e,n[0]),xi(e,n[1]),xi(e,n[2])],new Mt(Bt.LITERAL_COLOR,o,r)}if("rgba"===o||"hsla"===o){if(i<4)throw new Ie(`${o} requires four arguments.`);return r=[xi(e,n[0]),xi(e,n[1]),xi(e,n[2]),xi(e,n[3])],new Mt(Bt.LITERAL_COLOR,o,r)}if("vec2"===o||"vec3"===o||"vec4"===o){r=new Array(i);for(let l=0;l1)throw new Ie(`${o} requires exactly one argument.`);return r=xi(e,n[0]),new Mt(Bt.UNARY,o,r)}if("getExactClassName"===o){if(i>0)throw new Ie(`${o} does not take any argument.`);return new Mt(Bt.UNARY,o)}if(c(Vw[o])){if(1!==i)throw new Ie(`${o} requires exactly one argument.`);return r=xi(e,n[0]),new Mt(Bt.UNARY,o,r)}if(c(Hw[o])){if(2!==i)throw new Ie(`${o} requires exactly two arguments.`);return s=xi(e,n[0]),a=xi(e,n[1]),new Mt(Bt.BINARY,o,s,a)}if(c(_O[o])){if(3!==i)throw new Ie(`${o} requires exactly three arguments.`);s=xi(e,n[0]),a=xi(e,n[1]);const l=xi(e,n[2]);return new Mt(Bt.TERNARY,o,s,a,l)}if("Boolean"===o)return 0===i?new Mt(Bt.LITERAL_BOOLEAN,!1):(r=xi(e,n[0]),new Mt(Bt.UNARY,o,r));if("Number"===o)return 0===i?new Mt(Bt.LITERAL_NUMBER,0):(r=xi(e,n[0]),new Mt(Bt.UNARY,o,r));if("String"===o)return 0===i?new Mt(Bt.LITERAL_STRING,""):(r=xi(e,n[0]),new Mt(Bt.UNARY,o,r));if("regExp"===o)return function zue(e,t){const n=t.arguments;if(0===n.length)return new Mt(Bt.LITERAL_REGEX,new RegExp);const i=xi(e,n[0]);let o;if(n.length>1){const r=xi(e,n[1]);if(yO(i)&&yO(r)){try{o=new RegExp(gO(String(i._value)),r._value)}catch(s){throw new Ie(s)}return new Mt(Bt.LITERAL_REGEX,o)}return new Mt(Bt.REGEX,i,r)}if(yO(i)){try{o=new RegExp(gO(String(i._value)))}catch(r){throw new Ie(r)}return new Mt(Bt.LITERAL_REGEX,o)}return new Mt(Bt.REGEX,i)}(e,t);throw new Ie(`Unexpected function call "${o}".`)}(e,t);else if("Identifier"===t.type)n=function Vue(e){if(function Wue(e){return"czm_"===e.substr(0,4)}(e.name)){const t=function que(e){return e.substr(4)}(e.name);return"tiles3d_"===t.substr(0,8)?new Mt(Bt.BUILTIN_VARIABLE,t):new Mt(Bt.VARIABLE,t)}if("NaN"===e.name)return new Mt(Bt.LITERAL_NUMBER,NaN);if("Infinity"===e.name)return new Mt(Bt.LITERAL_NUMBER,1/0);if("undefined"===e.name)return new Mt(Bt.LITERAL_UNDEFINED,void 0);throw new Ie(`${e.name} is not defined.`)}(t);else if("UnaryExpression"===t.type){i=t.operator;const s=xi(e,t.argument);if(!(Cue.indexOf(i)>-1))throw new Ie(`Unexpected operator "${i}".`);n=new Mt(Bt.UNARY,i,s)}else if("BinaryExpression"===t.type){if(i=t.operator,o=xi(e,t.left),r=xi(e,t.right),!(A4.indexOf(i)>-1))throw new Ie(`Unexpected operator "${i}".`);n=new Mt(Bt.BINARY,i,o,r)}else if("LogicalExpression"===t.type)i=t.operator,o=xi(e,t.left),r=xi(e,t.right),A4.indexOf(i)>-1&&(n=new Mt(Bt.BINARY,i,o,r));else if("ConditionalExpression"===t.type){const s=xi(e,t.test);o=xi(e,t.consequent),r=xi(e,t.alternate),n=new Mt(Bt.CONDITIONAL,"?",o,r,s)}else if("MemberExpression"===t.type)n=function jue(e,t){if("Math"===t.object.name)return function Hue(e){const t=e.property.name;return"PI"===t?new Mt(Bt.LITERAL_NUMBER,Math.PI):"E"===t?new Mt(Bt.LITERAL_NUMBER,Math.E):void 0}(t);if("Number"===t.object.name)return function Gue(e){if("POSITIVE_INFINITY"===e.property.name)return new Mt(Bt.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}(t);let n;const i=xi(e,t.object);return t.computed?(n=xi(e,t.property),new Mt(Bt.MEMBER,"brackets",i,n)):(n=new Mt(Bt.LITERAL_STRING,t.property.name),new Mt(Bt.MEMBER,"dot",i,n))}(e,t);else{if("ArrayExpression"!==t.type)throw new Ie("Compound"===t.type?"Provide exactly one expression.":"Cannot parse expression.");{const s=[];for(let a=0;a1?(X.fromCssColorString(n[0].evaluate(e),t),t.alpha=n[1].evaluate(e)):X.fromCssColorString(n[0].evaluate(e),t):X.fromBytes(255,255,255,255,t);else if("rgb"===this._value)X.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),255,t);else if("rgba"===this._value){const i=255*n[3].evaluate(e);X.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),i,t)}else"hsl"===this._value?X.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),1,t):"hsla"===this._value&&X.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),n[3].evaluate(e),t);return fe.fromColor(t,Nn.getCartesian4())},Mt.prototype._evaluateLiteralVector=function(e){const t=Nn.getArray(),n=this._value,i=this._left,o=i.length;for(let a=0;a1)throw new Ie(`Invalid ${n} constructor. Not enough arguments.`);if(r>s&&o>1)throw new Ie(`Invalid ${n} constructor. Too many arguments.`);if(1===r){const a=t[0];t.push(a,a,a)}return"vec2"===n?G.fromArray(t,0,Nn.getCartesian2()):"vec3"===n?f.fromArray(t,0,Nn.getCartesian3()):"vec4"===n?fe.fromArray(t,0,Nn.getCartesian4()):void 0},Mt.prototype._evaluateLiteralString=function(){return this._value},Mt.prototype._evaluateVariableString=function(e){let t=this._value,n=Uw.exec(t);for(;null!==n;){const i=n[0];let r=jw(e,n[1]);c(r)||(r=""),t=t.replace(i,r),n=Uw.exec(t)}return t},Mt.prototype._evaluateVariable=function(e){return jw(e,this._value)},Mt.prototype._evaluateMemberDot=function(e){if(y_(this._left))return jw(e,this._right.evaluate(e));const t=this._left.evaluate(e);if(!c(t))return;const n=this._right.evaluate(e);if(t instanceof G||t instanceof f||t instanceof fe){if("r"===n)return t.x;if("g"===n)return t.y;if("b"===n)return t.z;if("a"===n)return t.w}return t[n]},Mt.prototype._evaluateMemberBrackets=function(e){if(y_(this._left))return jw(e,this._right.evaluate(e));const t=this._left.evaluate(e);if(!c(t))return;const n=this._right.evaluate(e);if(t instanceof G||t instanceof f||t instanceof fe){if(0===n||"r"===n)return t.x;if(1===n||"g"===n)return t.y;if(2===n||"b"===n)return t.z;if(3===n||"a"===n)return t.w}return t[n]},Mt.prototype._evaluateArray=function(e){const t=[];for(let n=0;n" requires number arguments. Arguments are ${t} and ${n}.`);return t>n},Mt.prototype._evaluateGreaterThanOrEquals=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof n)throw new Ie(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n},Mt.prototype._evaluateOr=function(e){const t=this._left.evaluate(e);if("boolean"!=typeof t)throw new Ie(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;const n=this._right.evaluate(e);if("boolean"!=typeof n)throw new Ie(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n},Mt.prototype._evaluateAnd=function(e){const t=this._left.evaluate(e);if("boolean"!=typeof t)throw new Ie(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;const n=this._right.evaluate(e);if("boolean"!=typeof n)throw new Ie(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n},Mt.prototype._evaluatePlus=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof G&&t instanceof G)return G.add(t,n,Nn.getCartesian2());if(n instanceof f&&t instanceof f)return f.add(t,n,Nn.getCartesian3());if(n instanceof fe&&t instanceof fe)return fe.add(t,n,Nn.getCartesian4());if("string"==typeof t||"string"==typeof n)return t+n;if("number"==typeof t&&"number"==typeof n)return t+n;throw new Ie(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateMinus=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof G&&t instanceof G)return G.subtract(t,n,Nn.getCartesian2());if(n instanceof f&&t instanceof f)return f.subtract(t,n,Nn.getCartesian3());if(n instanceof fe&&t instanceof fe)return fe.subtract(t,n,Nn.getCartesian4());if("number"==typeof t&&"number"==typeof n)return t-n;throw new Ie(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateTimes=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof G&&t instanceof G)return G.multiplyComponents(t,n,Nn.getCartesian2());if(n instanceof G&&"number"==typeof t)return G.multiplyByScalar(n,t,Nn.getCartesian2());if(t instanceof G&&"number"==typeof n)return G.multiplyByScalar(t,n,Nn.getCartesian2());if(n instanceof f&&t instanceof f)return f.multiplyComponents(t,n,Nn.getCartesian3());if(n instanceof f&&"number"==typeof t)return f.multiplyByScalar(n,t,Nn.getCartesian3());if(t instanceof f&&"number"==typeof n)return f.multiplyByScalar(t,n,Nn.getCartesian3());if(n instanceof fe&&t instanceof fe)return fe.multiplyComponents(t,n,Nn.getCartesian4());if(n instanceof fe&&"number"==typeof t)return fe.multiplyByScalar(n,t,Nn.getCartesian4());if(t instanceof fe&&"number"==typeof n)return fe.multiplyByScalar(t,n,Nn.getCartesian4());if("number"==typeof t&&"number"==typeof n)return t*n;throw new Ie(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateDivide=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof G&&t instanceof G)return G.divideComponents(t,n,Nn.getCartesian2());if(t instanceof G&&"number"==typeof n)return G.divideByScalar(t,n,Nn.getCartesian2());if(n instanceof f&&t instanceof f)return f.divideComponents(t,n,Nn.getCartesian3());if(t instanceof f&&"number"==typeof n)return f.divideByScalar(t,n,Nn.getCartesian3());if(n instanceof fe&&t instanceof fe)return fe.divideComponents(t,n,Nn.getCartesian4());if(t instanceof fe&&"number"==typeof n)return fe.divideByScalar(t,n,Nn.getCartesian4());if("number"==typeof t&&"number"==typeof n)return t/n;throw new Ie(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateMod=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof G&&t instanceof G)return G.fromElements(t.x%n.x,t.y%n.y,Nn.getCartesian2());if(n instanceof f&&t instanceof f)return f.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,Nn.getCartesian3());if(n instanceof fe&&t instanceof fe)return fe.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,t.w%n.w,Nn.getCartesian4());if("number"==typeof t&&"number"==typeof n)return t%n;throw new Ie(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateEqualsStrict=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof G&&t instanceof G||n instanceof f&&t instanceof f||n instanceof fe&&t instanceof fe?t.equals(n):t===n},Mt.prototype._evaluateNotEqualsStrict=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof G&&t instanceof G||n instanceof f&&t instanceof f||n instanceof fe&&t instanceof fe?!t.equals(n):t!==n},Mt.prototype._evaluateConditional=function(e){const t=this._test.evaluate(e);if("boolean"!=typeof t)throw new Ie(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)},Mt.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))},Mt.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))},Mt.prototype._evaluateIsExactClass=function(e){return!!c(e)&&e.isExactClass(this._left.evaluate(e))},Mt.prototype._evaluateIsClass=function(e){return!!c(e)&&e.isClass(this._left.evaluate(e))},Mt.prototype._evaluateGetExactClassName=function(e){if(c(e))return e.getExactClassName()},Mt.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)},Mt.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))},Mt.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))},Mt.prototype._evaluateRegExp=function(e){const t=this._value.evaluate(e);let i,n="";c(this._left)&&(n=this._left.evaluate(e));try{i=new RegExp(t,n)}catch(o){throw new Ie(o)}return i},Mt.prototype._evaluateRegExpTest=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof n))throw new Ie(`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)},Mt.prototype._evaluateRegExpMatch=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof n)return t.test(n);if(n instanceof RegExp&&"string"==typeof t)return n.test(t);throw new Ie(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateRegExpNotMatch=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof n)return!t.test(n);if(n instanceof RegExp&&"string"==typeof t)return!n.test(t);throw new Ie(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateRegExpExec=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof n))throw new Ie(`RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);const i=t.exec(n);return c(i)?i[1]:null},Mt.prototype._evaluateToString=function(e){const t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof G||t instanceof f||t instanceof fe)return String(t);throw new Ie(`Unexpected function call "${this._value}".`)},Cu.NULL_SENTINEL="czm_infinity",Mt.prototype.getShaderExpression=function(e,t,n){let i,o,r,s;const a=this._type;let u,d,h,l=this._value;switch(c(this._left)&&(o=Array.isArray(this._left)?E4(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),c(this._right)&&(r=this._right.getShaderExpression(e,t,this)),c(this._test)&&(s=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(l=E4(this._value,e,t,this)),a){case Bt.VARIABLE:return y_(this)?void 0:w4(l,e);case Bt.UNARY:if("Boolean"===l)return`bool(${o})`;if("Number"===l)return`float(${o})`;if("round"===l)return`floor(${o} + 0.5)`;if(c(Vw[l]))return`${l}(${o})`;if("isNaN"===l)return`(${o} != ${o})`;if("isFinite"===l)return`(abs(${o}) < czm_infinity)`;if("String"===l||"isExactClass"===l||"isClass"===l||"getExactClassName"===l)throw new Ie(`Error generating style shader: "${l}" is not supported.`);return l+o;case Bt.BINARY:return"%"===l?`mod(${o}, ${r})`:"==="===l?`(${o} == ${r})`:"!=="===l?`(${o} != ${r})`:"atan2"===l?`atan(${o}, ${r})`:c(Hw[l])?`${l}(${o}, ${r})`:`(${o} ${l} ${r})`;case Bt.TERNARY:if(c(_O[l]))return`${l}(${o}, ${r}, ${s})`;break;case Bt.CONDITIONAL:return`(${s} ? ${o} : ${r})`;case Bt.MEMBER:return y_(this._left)?w4(r,e):"r"===r||"x"===r||"0.0"===r?`${o}[0]`:"g"===r||"y"===r||"1.0"===r?`${o}[1]`:"b"===r||"z"===r||"2.0"===r?`${o}[2]`:"a"===r||"w"===r||"3.0"===r?`${o}[3]`:`${o}[int(${r})]`;case Bt.FUNCTION_CALL:throw new Ie(`Error generating style shader: "${l}" is not supported.`);case Bt.ARRAY:if(4===l.length)return`vec4(${l[0]}, ${l[1]}, ${l[2]}, ${l[3]})`;if(3===l.length)return`vec3(${l[0]}, ${l[1]}, ${l[2]})`;if(2===l.length)return`vec2(${l[0]}, ${l[1]})`;throw new Ie("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case Bt.REGEX:throw new Ie("Error generating style shader: Regular expressions are not supported.");case Bt.VARIABLE_IN_STRING:throw new Ie("Error generating style shader: Converting a variable to a string is not supported.");case Bt.LITERAL_NULL:return Cu.NULL_SENTINEL;case Bt.LITERAL_BOOLEAN:return l?"true":"false";case Bt.LITERAL_NUMBER:return xp(l);case Bt.LITERAL_STRING:if(c(n)&&n._type===Bt.MEMBER&&("r"===l||"g"===l||"b"===l||"a"===l||"x"===l||"y"===l||"z"===l||"w"===l||y_(n._left)))return l;if(i=X.fromCssColorString(l,zw),c(i))return function Que(e){return`vec3(${xp(e.red)}, ${xp(e.green)}, ${xp(e.blue)})`}(i);throw new Ie("Error generating style shader: String literals are not supported.");case Bt.LITERAL_COLOR:if(u=o,"color"===l){if(!c(u))return"vec4(1.0)";if(u.length>1){const m=u[0],_=u[1];return"1.0"!==_&&(t.translucent=!0),`vec4(${m}, ${_})`}return`vec4(${u[0]}, 1.0)`}if("rgb"===l)return i=C4(this),c(i)?Ww(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, 1.0)`;if("rgba"===l)return"1.0"!==u[3]&&(t.translucent=!0),i=C4(this),c(i)?Ww(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, ${u[3]})`;if("hsl"===l)return i=x4(this),c(i)?Ww(i):`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), 1.0)`;if("hsla"===l)return i=x4(this),c(i)?(1!==i.alpha&&(t.translucent=!0),Ww(i)):("1.0"!==u[3]&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), ${u[3]})`);break;case Bt.LITERAL_VECTOR:if(!c(o))throw new E("left should always be defined for type ExpressionNodeType.LITERAL_VECTOR");d=o.length,h=`${l}(`;for(let m=0;m=y&&s0;){const h=t.pop();if(X.equals(h.color,r.color))u=AO(a,l,u,n,i,h.batchIds,o),r.batchIds=r.batchIds.concat(h.batchIds),r.count=u-r.offset;else{const m=u;u=AO(a,l,u,n,i,h.batchIds,o),h.offset=m,h.count=u-m,s.push(h),r=h}}const d=e._va;e._va=e._vaSwap,e._vaSwap=d,e._batchedIndices=s}(e,n):function sde(e,t){const n=e._indices,i=e._indexOffsets,o=e._indexCounts,r=e._batchIdLookUp,s=new n.constructor(n.length);let a=t.pop();const l=[a];let u=bO(n,s,0,i,o,a.batchIds,r);for(a.offset=0,a.count=u;t.length>0;){const d=t.pop();if(X.equals(d.color,a.color))u=bO(n,s,u,i,o,d.batchIds,r),a.batchIds=a.batchIds.concat(d.batchIds),a.count=u-a.offset;else{const h=u;u=bO(n,s,u,i,o,d.batchIds,r),d.offset=h,d.count=u-h,l.push(d),a=d}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=l}(e,n),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0):(e._batchDirty=!1,!1)}(e,t),i=e._commands,o=e._batchedIndices,r=o.length,s=2*r;if(c(i)&&!n&&i.length===s)return;i.length=s;const a=e._va,l=e._sp,u=g(e._modelMatrix,k.IDENTITY),d=e._uniformMap,h=e._boundingVolume;for(let m=0;m{e.isDestroyed()||(e._error=p)}):void 0}}(this)),c(this._error)){const t=this._error;throw this._error=void 0,t}},Hc.prototype.isDestroyed=function(){return!1},Hc.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Ye(this)};const JA=Hc;function Wf(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,function Dde(e,t,n){n=g(n,0);const i=new Uint8Array(t),o=new DataView(t),r=o.getUint32(n+=A_,!0);if(1!==r)throw new Ie(`Only Geometry tile version 1 is supported. Version ${r} is not.`);const s=o.getUint32(n+=A_,!0);if(n+=A_,0===s)return void(e._ready=!0);const a=o.getUint32(n,!0);if(n+=A_,0===a)throw new Ie("Feature table must have a byte length greater than zero");const l=o.getUint32(n,!0),u=o.getUint32(n+=A_,!0),d=o.getUint32(n+=A_,!0),h=fc(i,n+=A_,a);n+=a;const m=new Uint8Array(t,n,l);let _,p;n+=l,u>0&&(_=fc(i,n,u),n+=u,d>0&&(p=new Uint8Array(t,n,d),p=new Uint8Array(p)));const y=g(h.BOXES_LENGTH,0),A=g(h.CYLINDERS_LENGTH,0),x=g(h.ELLIPSOIDS_LENGTH,0),C=g(h.SPHERES_LENGTH,0),w=y+A+x+C,v=new pO(e,w,_,p,function Sde(e){return function(t,n){c(e._geometries)&&e._geometries.updateCommands(t,n)}}(e));if(e._batchTable=v,0===w)return;const D=e.tile.computedTransform;let P;c(h.RTC_CENTER)&&(P=f.unpack(h.RTC_CENTER),k.multiplyByPoint(D,P,P));const N=function vde(e,t){let n,i,o,r,s;const a=g(e.BOXES_LENGTH,0),l=g(e.CYLINDERS_LENGTH,0),u=g(e.ELLIPSOIDS_LENGTH,0),d=g(e.SPHERES_LENGTH,0);a>0&&c(e.BOX_BATCH_IDS)&&(n=new Uint16Array(t.buffer,t.byteOffset+e.BOX_BATCH_IDS.byteOffset,a)),l>0&&c(e.CYLINDER_BATCH_IDS)&&(i=new Uint16Array(t.buffer,t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset,l)),u>0&&c(e.ELLIPSOID_BATCH_IDS)&&(o=new Uint16Array(t.buffer,t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset,u)),d>0&&c(e.SPHERE_BATCH_IDS)&&(r=new Uint16Array(t.buffer,t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset,d));const h=c(n)||c(i)||c(o)||c(r),m=a>0&&!c(n)||l>0&&!c(i)||u>0&&!c(o)||d>0&&!c(r);if(h&&m)throw new Ie("If one group of batch ids is defined, then all batch ids must be defined");if(!(c(n)||c(i)||c(o)||c(r))){let p=0;if(!c(n)&&a>0)for(n=new Uint16Array(a),s=0;s0)for(i=new Uint16Array(l),s=0;s0)for(o=new Uint16Array(u),s=0;s0)for(r=new Uint16Array(d),s=0;s0||A>0||x>0||C>0){let R,B,F,S;return y>0&&(R=new Float32Array(m.buffer,m.byteOffset+h.BOXES.byteOffset,JA.packedBoxLength*y)),A>0&&(B=new Float32Array(m.buffer,m.byteOffset+h.CYLINDERS.byteOffset,JA.packedCylinderLength*A)),x>0&&(F=new Float32Array(m.buffer,m.byteOffset+h.ELLIPSOIDS.byteOffset,JA.packedEllipsoidLength*x)),C>0&&(S=new Float32Array(m.buffer,m.byteOffset+h.SPHERES.byteOffset,JA.packedSphereLength*C)),e._geometries=new JA({boxes:R,boxBatchIds:N.boxes,cylinders:B,cylinderBatchIds:N.cylinders,ellipsoids:F,ellipsoidBatchIds:N.ellipsoids,spheres:S,sphereBatchIds:N.spheres,center:P,modelMatrix:D,batchTable:v,boundingVolume:e.tile.boundingVolume.boundingVolume}),e}Promise.resolve(e)}(this,i,o)}Object.defineProperties(Wf.prototype,{featuresLength:{get:function(){return c(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return c(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return c(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return c(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}}});const A_=Uint32Array.BYTES_PER_ELEMENT;function P4(e){const t=e.featuresLength;if(!c(e._features)&&t>0){const n=new Array(t);c(e._geometries)&&e._geometries.createFeatures(e,n),e._features=n}}Wf.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},Wf.prototype.getFeature=function(e){const t=this.featuresLength;if(!c(e)||e<0||e>=t)throw new E(`batchId is required and between zero and featuresLength - 1 (${t-1}).`);return P4(this),this._features[e]},Wf.prototype.applyDebugSettings=function(e,t){c(this._geometries)&&this._geometries.applyDebugSettings(e,t)},Wf.prototype.applyStyle=function(e){P4(this),c(this._geometries)&&this._geometries.applyStyle(e,this._features)},Wf.prototype.update=function(e,t){c(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),c(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(e,t),this._ready=!0)},Wf.prototype.isDestroyed=function(){return!1},Wf.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),Ye(this)};const Ide=Wf,TO={};function O4(e,t,n,i){if(0!==i)return;1===n&&(t.x=e-1-t.x,t.y=e-1-t.y);const o=t.x;t.x=t.y,t.y=o}TO.encode2D=function(e,t,n){const i=Math.pow(2,e);if(T.typeOf.number("level",e),T.typeOf.number("x",t),T.typeOf.number("y",n),e<1)throw new E("Hilbert level cannot be less than 1.");if(t<0||t>=i||n<0||n>=i)throw new E("Invalid coordinates for given level.");const o={x:t,y:n};let r,s,a,l=BigInt(0);for(a=i/2;a>0;a/=2)r=(o.x&a)>0?1:0,s=(o.y&a)>0?1:0,l+=BigInt((3*r^s)*a*a),O4(i,o,r,s);return l},TO.decode2D=function(e,t){if(T.typeOf.number("level",e),T.typeOf.bigint("index",t),e<1)throw new E("Hilbert level cannot be less than 1.");if(t=BigInt(Math.pow(4,e)))throw new E("Hilbert index exceeds valid maximum for given level.");const n=Math.pow(2,e),i={x:0,y:0};let o,r,s,a;for(s=1,a=t;s>BigInt(61));let n=1&t;const i=(1<=0;s--){const l=(1<<2*(7===s?30-7*Ep:Ep))-1;n+=Number(e>>BigInt(2*s*Ep+1)&BigInt(l))<<2,n=N4[n];const u=s*Ep;o+=n>>Ep+2<>2&i)<=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function B4(e){return 1/2147483648*e}function k4(e){return 1/1073741824*e}function Sp(e,t,n,i,o,r){if(e===Ep){const s=(t<>1),(n<<=1)+(1&s[0]),i,o<<=2,r^qw[0]),Sp(e,t+(s[1]>>1),n+(1&s[1]),i,o+1,r^qw[1]),Sp(e,t+(s[2]>>1),n+(1&s[2]),i,o+2,r^qw[2]),Sp(e,t+(s[3]>>1),n+(1&s[3]),i,o+3,r^qw[3])}}function U4(e){return e&~e+BigInt(1)}Xo.fromToken=function(e){if(T.typeOf.string("token",e),!Xo.isValidToken(e))throw new E("token is invalid.");return new Xo(Xo.getIdFromToken(e))},Xo.isValidId=function(e){return T.typeOf.bigint("cellId",e),!(e<=0||e>>BigInt(61)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))},Xo.isValidToken=function(e){return T.typeOf.string("token",e),!!/^[0-9a-fA-F]{1,16}$/.test(e)&&Xo.isValidId(Xo.getIdFromToken(e))},Xo.getIdFromToken=function(e){return T.typeOf.string("token",e),BigInt("0x"+e+"0".repeat(16-e.length))},Xo.getTokenFromId=function(e){T.typeOf.bigint("cellId",e);const t=Math.floor(function Hde(e){return Vde[(-e&e)%BigInt(67)]}(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n},Xo.getLevel=function(e){if(T.typeOf.bigint("cellId",e),!Xo.isValidId(e))throw new E;let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e>>=BigInt(1);return 30-(t>>1)},Xo.prototype.getChild=function(e){if(T.typeOf.number("index",e),e<0||e>3)throw new E("child index must be in the range [0-3].");if(30===this._level)throw new E("cannot get child of leaf cell.");const t=U4(this._cellId)>>BigInt(2);return new Xo(this._cellId+BigInt(2*e+1-4)*t)},Xo.prototype.getParent=function(){if(0===this._level)throw new E("cannot get parent of root cell.");const e=U4(this._cellId)<>BigInt(2))&BigInt(1),l=s?1:a?2:0;return[i,(o<<1)+l,(r<<1)+l]}(e,t);return function Fde(e,t,n){const i=B4(t),o=B4(n);return F4(e,Yw(i),Yw(o))}(n[0],n[1],n[2])}(this._cellId,this._level);t=f.normalize(t,t);const n=new Se.fromCartesian(t,ge.UNIT_SPHERE);return Se.toCartesian(n,e,new f)},Xo.prototype.getVertex=function(e,t){if(T.typeOf.number("index",e),e<0||e>3)throw new E("vertex index must be in the range [0-3].");t=g(t,ge.WGS84);let n=function Nde(e,t,n){const i=M4(e),o=function Bde(e,t){const n=[[],[]],i=function kde(e){return 1<<30-e>>>0}(t);for(let o=0;o<2;++o){const r=e[o]&-i,s=r+i;n[o][0]=Yw(k4(r)),n[o][1]=Yw(k4(s))}return n}([i[1],i[2]],t),r=n>>1&1;return F4(i[0],o[0][r^1&n],o[1][r])}(this._cellId,this._level,e);n=f.normalize(n,n);const i=new Se.fromCartesian(n,ge.UNIT_SPHERE);return Se.toCartesian(i,t,new f)},Xo.fromFacePositionLevel=function(e,t,n){if(T.typeOf.bigint("position",t),e<0||e>5)throw new E("Invalid S2 Face (must be within 0-5)");if(n<0||n>30)throw new E("Invalid level (must be within 0-30)");if(t<0||t>=Math.pow(4,n))throw new E("Invalid Hilbert position for level");const i=(e<4?"0":"")+(e<2?"0":"")+e.toString(2),o=t.toString(2),r=Array(2*n-o.length+1).join("0"),s=Array(61-2*n).join("0");return new Xo(BigInt(`0b${i}${r}${o}1${s}`))};const Vde=[64,0,1,39,2,15,40,23,3,12,16,59,41,19,24,54,4,64,13,10,17,62,60,28,42,30,20,51,25,44,55,47,5,32,65,38,14,22,11,58,18,53,63,9,61,27,29,50,43,46,31,37,21,57,52,8,26,49,45,36,56,7,48,35,6,34,33,0],Xw=Xo,Ir=function Gde(e,t){return c(e)&&c(e.extensions)&&c(e.extensions[t])};function CO(e){const t=e.lengthBits;let n=e.availableCount;T.typeOf.number("options.lengthBits",t);const i=e.constant,o=e.bitstream;if(c(i))n=t;else{const r=Math.ceil(t/8);if(o.length!==r)throw new Ie(`Availability bitstream must be exactly ${r} bytes long to store ${t} bits. Actual bitstream was ${o.length} bytes long.`);const s=g(e.computeAvailableCountEnabled,!1);!c(n)&&s&&(n=function jde(e,t){let n=0;for(let i=0;i>3]>>i%8&1;return n}(o,t))}this._lengthBits=t,this._availableCount=n,this._constant=i,this._bitstream=o}Object.defineProperties(CO.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}}),CO.prototype.getBit=function(e){if(e<0||e>=this._lengthBits)throw new E("Bit index out of bounds.");return c(this._constant)?this._constant:1==(this._bitstream[e>>3]>>e%8&1)};const z4=CO;function qf(e){const t=(e=g(e,g.EMPTY_OBJECT)).metadataTable,n=e.class,i=e.entityId,o=e.propertyTableJson;T.typeOf.object("options.metadataTable",t),T.typeOf.object("options.class",n),T.typeOf.number("options.entityId",i),T.typeOf.object("options.propertyTableJson",o),this._class=n,this._metadataTable=t,this._entityId=i,this._extensions=o.extensions,this._extras=o.extras}Object.defineProperties(qf.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),qf.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)},qf.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)},qf.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)},qf.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)},qf.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)},qf.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)},qf.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};const V4=qf,Zw={QUADTREE:"QUADTREE",OCTREE:"OCTREE",getBranchingFactor:function(e){switch(e){case Zw.OCTREE:return 8;case Zw.QUADTREE:return 4;default:throw new E("subdivisionScheme is not a valid value.")}}},Xr=Object.freeze(Zw);function vs(){}Object.defineProperties(vs.prototype,{class:{get:function(){E.throwInstantiationError()}}}),vs.prototype.hasProperty=function(e){E.throwInstantiationError()},vs.prototype.hasPropertyBySemantic=function(e){E.throwInstantiationError()},vs.prototype.getPropertyIds=function(e){E.throwInstantiationError()},vs.prototype.getProperty=function(e){E.throwInstantiationError()},vs.prototype.setProperty=function(e,t){E.throwInstantiationError()},vs.prototype.getPropertyBySemantic=function(e){E.throwInstantiationError()},vs.prototype.setPropertyBySemantic=function(e,t){E.throwInstantiationError()},vs.hasProperty=function(e,t,n){if(T.typeOf.string("propertyId",e),T.typeOf.object("properties",t),T.typeOf.object("classDefinition",n),c(t[e]))return!0;const i=n.properties;if(!c(i))return!1;const o=i[e];return!(!c(o)||!c(o.default))},vs.hasPropertyBySemantic=function(e,t,n){T.typeOf.string("semantic",e),T.typeOf.object("properties",t),T.typeOf.object("classDefinition",n);const i=n.propertiesBySemantic;return!!c(i)&&c(i[e])},vs.getPropertyIds=function(e,t,n){T.typeOf.object("properties",e),T.typeOf.object("classDefinition",t),(n=c(n)?n:[]).length=0;for(const o in e)e.hasOwnProperty(o)&&c(e[o])&&n.push(o);const i=t.properties;if(c(i))for(const o in i)i.hasOwnProperty(o)&&!c(e[o])&&c(i[o].default)&&n.push(o);return n},vs.getProperty=function(e,t,n){if(T.typeOf.string("propertyId",e),T.typeOf.object("properties",t),T.typeOf.object("classDefinition",n),!c(n.properties[e]))throw new E(`Class definition missing property ${e}`);const i=n.properties[e];let o=t[e];return Array.isArray(o)&&(o=o.slice()),o=i.handleNoData(o),!c(o)&&c(i.default)?(o=zt(i.default,!0),i.unpackVectorAndMatrixTypes(o,!0)):c(o)?(o=i.normalize(o),o=i.applyValueTransform(o),i.unpackVectorAndMatrixTypes(o,!0)):void 0},vs.setProperty=function(e,t,n,i){if(T.typeOf.string("propertyId",e),T.defined("value",t),T.typeOf.object("properties",n),T.typeOf.object("classDefinition",i),!c(n[e]))return!1;let o;Array.isArray(t)&&(t=t.slice());const r=i.properties;return c(r)&&(o=r[e]),c(o)&&(t=o.packVectorAndMatrixTypes(t,!0),t=o.unapplyValueTransform(t),t=o.unnormalize(t)),n[e]=t,!0},vs.getPropertyBySemantic=function(e,t,n){T.typeOf.string("semantic",e),T.typeOf.object("properties",t),T.typeOf.object("classDefinition",n);const i=n.propertiesBySemantic;if(!c(i))return;const o=i[e];return c(o)?vs.getProperty(o.id,t,n):void 0},vs.setPropertyBySemantic=function(e,t,n,i){if(T.typeOf.string("semantic",e),T.defined("value",t),T.typeOf.object("properties",n),T.typeOf.object("classDefinition",i),!c(i.propertiesBySemantic))return!1;const r=i.propertiesBySemantic[e];return!!c(r)&&vs.setProperty(r.id,t,n,i)};const _i=vs;function Yf(e){const t=(e=g(e,g.EMPTY_OBJECT)).subtreeMetadata,n=e.class;T.typeOf.object("options.subtreeMetadata",t),T.typeOf.object("options.class",n);const i=c(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Yf.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),Yf.prototype.hasProperty=function(e){return _i.hasProperty(e,this._properties,this._class)},Yf.prototype.hasPropertyBySemantic=function(e){return _i.hasPropertyBySemantic(e,this._properties,this._class)},Yf.prototype.getPropertyIds=function(e){return _i.getPropertyIds(this._properties,this._class,e)},Yf.prototype.getProperty=function(e){return _i.getProperty(e,this._properties,this._class)},Yf.prototype.setProperty=function(e,t){return _i.setProperty(e,t,this._properties,this._class)},Yf.prototype.getPropertyBySemantic=function(e){return _i.getPropertyBySemantic(e,this._properties,this._class)},Yf.prototype.setPropertyBySemantic=function(e,t){return _i.setPropertyBySemantic(e,t,this._properties,this._class)};const Wde=Yf,qt={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64",getMinimum:function(e){switch(T.typeOf.string("type",e),e){case qt.INT8:return-128;case qt.UINT8:return 0;case qt.INT16:return-32768;case qt.UINT16:return 0;case qt.INT32:return-2147483648;case qt.UINT32:return 0;case qt.INT64:return zn.supportsBigInt()?BigInt("-9223372036854775808"):-Math.pow(2,63);case qt.UINT64:return zn.supportsBigInt()?BigInt(0):0;case qt.FLOAT32:return-34028234663852886e22;case qt.FLOAT64:return-Number.MAX_VALUE}},getMaximum:function(e){switch(T.typeOf.string("type",e),e){case qt.INT8:return 127;case qt.UINT8:return 255;case qt.INT16:return 32767;case qt.UINT16:return 65535;case qt.INT32:return 2147483647;case qt.UINT32:return 4294967295;case qt.INT64:return zn.supportsBigInt()?BigInt("9223372036854775807"):Math.pow(2,63)-1;case qt.UINT64:return zn.supportsBigInt()?BigInt("18446744073709551615"):Math.pow(2,64)-1;case qt.FLOAT32:return 34028234663852886e22;case qt.FLOAT64:return Number.MAX_VALUE}},isIntegerType:function(e){switch(T.typeOf.string("type",e),e){case qt.INT8:case qt.UINT8:case qt.INT16:case qt.UINT16:case qt.INT32:case qt.UINT32:case qt.INT64:case qt.UINT64:return!0;default:return!1}},isUnsignedIntegerType:function(e){switch(T.typeOf.string("type",e),e){case qt.UINT8:case qt.UINT16:case qt.UINT32:case qt.UINT64:return!0;default:return!1}},isVectorCompatible:function(e){switch(T.typeOf.string("type",e),e){case qt.INT8:case qt.UINT8:case qt.INT16:case qt.UINT16:case qt.INT32:case qt.UINT32:case qt.FLOAT32:case qt.FLOAT64:return!0;default:return!1}},normalize:function(e,t){if("number"!=typeof e&&"bigint"!=typeof e)throw new E("value must be a number or a BigInt");if(!qt.isIntegerType(t))throw new E("type must be an integer type");return Math.max(Number(e)/Number(qt.getMaximum(t)),-1)},unnormalize:function(e,t){if(T.typeOf.number("value",e),!qt.isIntegerType(t))throw new E("type must be an integer type");const n=qt.getMaximum(t),i=qt.isUnsignedIntegerType(t)?0:-n;return e=O.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===qt.INT64||t===qt.UINT64)&&zn.supportsBigInt()&&(e=BigInt(e)),e>n?n:e1?j4(e,t,n):void 0:eDn.getMaximum(t)?j4(e,t,n):void 0}function q4(e,t){return`value ${e} of type ${t} must be finite`}function EO(e,t,n){if(!Array.isArray(e))return n(e,t);for(let i=0;i1;if(!n&&1===o)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);const s=new Array(o).fill(e);return new Array(this._arrayLength).fill(s)},Ws.prototype.handleNoData=function(e){const t=this._noData;return c(t)&&H4(e,t)?void 0:e},Ws.prototype.unpackVectorAndMatrixTypes=function(e,t){t=g(t,!1);const n=xn.getMathType(this._type),i=this._isArray,o=xn.getComponentCount(this._type),r=i&&o>1;return c(n)?t&&r?e.map(function(s){return n.unpack(s)}):i?n.unpackArray(e):n.unpack(e):e},Ws.prototype.packVectorAndMatrixTypes=function(e,t){t=g(t,!1);const n=xn.getMathType(this._type),i=this._isArray,o=xn.getComponentCount(this._type),r=i&&o>1;return c(n)?t&&r?e.map(function(s){return n.pack(s,[])}):i?n.packArray(e,[]):n.pack(e,[]):e},Ws.prototype.validate=function(e){if(c(e)||!c(this._default))return this._required&&!c(e)?"required property must have a value":this._isArray?function Xde(e,t){if(!Array.isArray(t))return`value ${t} must be an array`;const n=t.length;if(!e._isVariableLengthArray&&n!==e._arrayLength)return"Array length does not match property.arrayLength";for(let i=0;i>3]>>e%8&1)}(S,F._values)},B=function(S,I){!function rfe(e,t,n){const i=e>>3,o=e%8;n?t.typedArray[i]|=1<=n)throw new E("index is required and between zero and count - 1. Actual value: "+(n-1))}function Z4(e,t,n){let i,o;if(t.isVariableLengthArray){i=e._arrayOffsets.get(n),o=e._arrayOffsets.get(n+1)-i;const s=xn.getComponentCount(t.type);i*=s,o*=s}else{const a=g(t.arrayLength,1)*e._vectorComponentCount;i=n*a,o=a}const r=new Array(o);for(let s=0;s0;let s=!0;for(let a=0;a<8;++a){let l=n.getUint8(i+a);r&&(s?0!==l&&(l=255&~(l-1),s=!1):l=255&~l),o+=BigInt(l)*(BigInt(1)<0;let s=!0;for(let a=0;a<8;++a){let l=n.getUint8(i+a);r&&(s?0!==l&&(l=255&~(l-1),s=!1):l=255&~l),o+=l*Math.pow(256,a)}return r&&(o=-o),o}(a,i)});else if(t===Dn.UINT64)zn.supportsBigInt()?zn.supportsBigUint64Array()?(o=new BigUint64Array(e.buffer,e.byteOffset,n),s=function(a,l){i.typedArray[a]=BigInt(l)}):(o=new Uint8Array(e.buffer,e.byteOffset,8*n),r=function(a){return function lfe(e,t){const n=t.dataView,i=8*e,o=BigInt(n.getUint32(i,!0)),r=BigInt(n.getUint32(i+4,!0));return o+BigInt(4294967296)*r}(a,i)}):(gn("UINT64 type is not fully supported on this platform. Values greater than 2^53 - 1 may lose precision when read."),o=new Uint8Array(e.buffer,e.byteOffset,8*n),r=function(a){return function cfe(e,t){const n=t.dataView,i=8*e;return n.getUint32(i,!0)+4294967296*n.getUint32(i+4,!0)}(a,i)});else{const a=function ufe(e){switch(e){case Dn.INT8:return ee.BYTE;case Dn.UINT8:return ee.UNSIGNED_BYTE;case Dn.INT16:return ee.SHORT;case Dn.UINT16:return ee.UNSIGNED_SHORT;case Dn.INT32:return ee.INT;case Dn.UINT32:return ee.UNSIGNED_INT;case Dn.FLOAT32:return ee.FLOAT;case Dn.FLOAT64:return ee.DOUBLE}}(t);o=ee.createArrayBufferView(a,e.buffer,e.byteOffset,n),s=function(l,u){i.typedArray[l]=u}}c(r)||(r=function(a){return i.typedArray[a]}),this.typedArray=o,this.dataView=new DataView(o.buffer,o.byteOffset),this.get=r,this.set=s,this._componentType=t}Object.defineProperties(eT.prototype,{hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){return this._byteLength}}}),eT.prototype.get=function(e){X4(this,e);let t=function tfe(e,t){$4(e)&&K4(e);const n=e._classProperty,i=n.isArray,r=xn.getComponentCount(n.type);if(c(e._unpackedValues)){const s=e._unpackedValues[t];return i?zt(s,!0):s}return i||1!==r?Z4(e,n,t):e._getValue(t)}(this,e);return t=this._classProperty.handleNoData(t),c(t)?(t=this._classProperty.normalize(t),t=function hfe(e,t){return!e._hasValueTransform||e._classProperty.isVariableLengthArray?t:wO.valueTransformInPlace(t,e._offset,e._scale,Dn.applyValueTransform)}(this,t),this._classProperty.unpackVectorAndMatrixTypes(t)):(t=this._classProperty.default,this._classProperty.unpackVectorAndMatrixTypes(t))},eT.prototype.set=function(e,t){const n=this._classProperty;T.defined("value",t),X4(this,e);const i=n.validate(t);if(c(i))throw new E(i);t=function pfe(e,t){return!e._hasValueTransform||e._classProperty.isVariableLengthArray?t:wO.valueTransformInPlace(t,e._offset,e._scale,Dn.unapplyValueTransform)}(this,t=n.packVectorAndMatrixTypes(t)),function nfe(e,t,n){(function dfe(e,t,n){if($4(e))return!0;const i=e._arrayOffsets;return!(!c(i)||i.get(t+1)-i.get(t)===n.length)})(e,t,n)&&K4(e);const i=e._classProperty,o=i.isArray,s=xn.getComponentCount(i.type);if(c(e._unpackedValues))return i.isArray&&(n=zt(n,!0)),void(e._unpackedValues[t]=n);if(!o&&1===s)return void e._setValue(t,n);let a,l;if(i.isVariableLengthArray)a=e._arrayOffsets.get(t),l=e._arrayOffsets.get(t+1)-a;else{const d=g(i.arrayLength,1)*e._vectorComponentCount;a=t*d,l=d}for(let u=0;u96?y-97:y>64?y-39:y+4}var A=0;for(p=0;p96?v-97:v>64?v-39:v+4}var D=0;for(w=0;w0?function y(x,C,w,v,D){for(var P=h[0],N=1;N96?y-97:y>64?y-39:y+4}var A=0;for(p=0;p{Ar._error=t}),Ar._decoderTaskProcessor=e}return Ar._decoderTaskProcessor},Ar.decodePointCloud=function(e){const t=Ar._getDecoderTaskProcessor();if(c(Ar._error))throw Ar._error;if(Ar._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])},Ar.decodeBufferView=function(e){const t=Ar._getDecoderTaskProcessor();if(c(Ar._error))throw Ar._error;if(Ar._taskProcessorReady)return t.scheduleTask(e,[e.array.buffer])};const PO=Ar;function Dp(e){const t=(e=g(e,g.EMPTY_OBJECT)).resourceCache,n=e.gltf,i=e.draco,o=e.gltfResource,r=e.baseResource,s=e.cacheKey;T.typeOf.func("options.resourceCache",t),T.typeOf.object("options.gltf",n),T.typeOf.object("options.draco",i),T.typeOf.object("options.gltfResource",o),T.typeOf.object("options.baseResource",r),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=on.UNLOADED,this._promise=void 0,this._dracoError=void 0}function OO(){return(OO=(0,Pe.Z)(function*(e){const t=e._resourceCache;try{const n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._draco.bufferView,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,yield n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=on.PROCESSING,e)}catch(n){if(e.isDestroyed())return;J4(e,n)}})).apply(this,arguments)}function J4(e,t){throw e.unload(),e._state=on.FAILED,e.getError("Failed to load Draco",t)}function LO(){return(LO=(0,Pe.Z)(function*(e,t){try{const n=yield t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=on.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}})).apply(this,arguments)}c(Object.create)&&((Dp.prototype=Object.create(Ya.prototype)).constructor=Dp),Object.defineProperties(Dp.prototype,{cacheKey:{get:function(){return this._cacheKey}},decodedData:{get:function(){return this._decodedData}}}),Dp.prototype.load=(0,Pe.Z)(function*(){return c(this._promise)||(this._state=on.LOADING,this._promise=function Tfe(e){return OO.apply(this,arguments)}(this)),this._promise}),Dp.prototype.process=function(e){if(T.typeOf.object("frameState",e),this._state===on.READY)return!0;if(this._state!==on.PROCESSING||(c(this._dracoError)&&J4(this,this._dracoError),!c(this._bufferViewTypedArray))||c(this._decodePromise))return!1;const t=this._draco,r=this._gltf.bufferViews[t.bufferView],s=t.attributes,a={array:new Uint8Array(this._bufferViewTypedArray),bufferView:r,compressedAttributes:s,dequantizeInShader:!0},l=PO.decodeBufferView(a);if(!c(l))return!1;this._decodePromise=function xfe(e,t){return LO.apply(this,arguments)}(this,l)},Dp.prototype.unload=function(){c(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0};const eH=Dp;function Zf(e){const t=(e=g(e,g.EMPTY_OBJECT)).resourceCache,n=e.gltf,i=e.imageId,o=e.gltfResource,r=e.baseResource,s=e.cacheKey;T.typeOf.func("options.resourceCache",t),T.typeOf.object("options.gltf",n),T.typeOf.number("options.imageId",i),T.typeOf.object("options.gltfResource",o),T.typeOf.object("options.baseResource",r);const a=n.images[i],l=a.bufferView,u=a.uri;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._bufferViewId=l,this._uri=u,this._cacheKey=s,this._bufferViewLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._state=on.UNLOADED,this._promise=void 0}function tH(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}}function RO(){return RO=(0,Pe.Z)(function*(e){e._state=on.LOADING;const t=e._resourceCache;try{const n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=n,yield n.load(),e.isDestroyed())return;const i=n.typedArray,o=yield function Dfe(e){return MO.apply(this,arguments)}(i);if(e.isDestroyed())return;const r=tH(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=on.READY,e}catch(n){return e.isDestroyed()?void 0:nH(e,n,"Failed to load embedded image")}}),RO.apply(this,arguments)}function NO(){return(NO=(0,Pe.Z)(function*(e){e._state=on.LOADING;const n=e._uri,i=e._baseResource.getDerivedResource({url:n});try{const o=yield function Pfe(e){const t=e.getUrlComponent(!1,!0);return Ife.test(t)?My(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}(i);if(e.isDestroyed())return;const r=tH(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=on.READY,e}catch(o){return e.isDestroyed()?void 0:nH(e,o,`Failed to load image: ${n}`)}})).apply(this,arguments)}function nH(e,t,n){return e.unload(),e._state=on.FAILED,Promise.reject(e.getError(n,t))}function MO(){return(MO=(0,Pe.Z)(function*(e){const t=function vfe(e){const t=e.subarray(0,2),n=e.subarray(0,4),i=e.subarray(8,12);if(255===t[0]&&216===t[1])return"image/jpeg";if(137===t[0]&&80===t[1])return"image/png";if(171===t[0]&&75===t[1])return"image/ktx2";if(82===n[0]&&73===n[1]&&70===n[2]&&70===n[3]&&87===i[0]&&69===i[1]&&66===i[2]&&80===i[3])return"image/webp";throw new Ie("Image format is not recognized")}(e);if("image/ktx2"===t){const n=new Uint8Array(e);return My(n)}return Zf._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})})).apply(this,arguments)}c(Object.create)&&((Zf.prototype=Object.create(Ya.prototype)).constructor=Zf),Object.defineProperties(Zf.prototype,{cacheKey:{get:function(){return this._cacheKey}},image:{get:function(){return this._image}},mipLevels:{get:function(){return this._mipLevels}}}),Zf.prototype.load=function(){return c(this._promise)?this._promise:c(this._bufferViewId)?(this._promise=function wfe(e){return RO.apply(this,arguments)}(this),this._promise):(this._promise=function Sfe(e){return NO.apply(this,arguments)}(this),this._promise)};const Ife=/(^data:image\/ktx2)|(\.ktx2$)/i;Zf.prototype.unload=function(){c(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},Zf._loadImageFromTypedArray=function Cfe(e){const t=e.uint8Array,n=e.format,i=e.request,o=g(e.flipY,!1),r=g(e.skipColorSpaceConversion,!1);T.typeOf.object("uint8Array",t),T.typeOf.string("format",n);const s=new Blob([t],{type:n});let a;return jt.supportsImageBitmapOptions().then(function(l){return l?Promise.resolve(jt.createImageBitmapFromBlob(s,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:r})):(a=window.URL.createObjectURL(s),new jt({url:a,request:i}).fetchImage({flipY:o,skipColorSpaceConversion:r}))}).then(function(l){return c(a)&&window.URL.revokeObjectURL(a),l}).catch(function(l){return c(a)&&window.URL.revokeObjectURL(a),Promise.reject(l)})};const iH=Zf,wu=Object.freeze({TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3});function Ip(e){const t=(e=g(e,g.EMPTY_OBJECT)).resourceCache,n=e.gltf,i=e.accessorId,o=e.gltfResource,r=e.baseResource,s=e.draco,a=e.cacheKey,l=g(e.asynchronous,!0),u=g(e.loadBuffer,!1),d=g(e.loadTypedArray,!1);if(T.typeOf.func("options.resourceCache",t),T.typeOf.object("options.gltf",n),T.typeOf.number("options.accessorId",i),T.typeOf.object("options.gltfResource",o),T.typeOf.object("options.baseResource",r),!u&&!d)throw new E("At least one of loadBuffer and loadTypedArray must be true.");const h=n.accessors[i].componentType;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._accessorId=i,this._indexDatatype=h,this._draco=s,this._cacheKey=a,this._asynchronous=l,this._loadBuffer=u,this._loadTypedArray=d,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=on.UNLOADED,this._promise=void 0}c(Object.create)&&((Ip.prototype=Object.create(Ya.prototype)).constructor=Ip),Object.defineProperties(Ip.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}}});const Ofe=new UO;function FO(){return(FO=(0,Pe.Z)(function*(e){e._state=on.LOADING;const t=e._resourceCache;try{const n=t.getDracoLoader({gltf:e._gltf,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,yield n.load(),e.isDestroyed()?void 0:(e._state=on.LOADED,e)}catch(n){if(e.isDestroyed())return;kO(e,n)}})).apply(this,arguments)}function BO(){return(BO=(0,Pe.Z)(function*(e){const t=e._gltf,o=t.accessors[e._accessorId].bufferView;e._state=on.LOADING;const r=e._resourceCache;try{const s=r.getBufferViewLoader({gltf:t,bufferViewId:o,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=s,yield s.load(),e.isDestroyed())return;return e._typedArray=function Nfe(e,t){const o=e._gltf.accessors[e._accessorId],r=o.count,s=o.componentType,a=Ot.getSizeInBytes(s);let d,l=t.buffer,u=t.byteOffset+o.byteOffset;if(u%a!=0){const m=new Uint8Array(l,u,r*a);l=new Uint8Array(m).buffer,u=0,kf("index-buffer-unaligned",`The index array is not aligned to a ${a}-byte boundary.`)}return s===Ot.UNSIGNED_BYTE?d=new Uint8Array(l,u,r):s===Ot.UNSIGNED_SHORT?d=new Uint16Array(l,u,r):s===Ot.UNSIGNED_INT&&(d=new Uint32Array(l,u,r)),d}(e,s.typedArray),e._state=on.PROCESSING,e}catch(s){if(e.isDestroyed())return;kO(e,s)}})).apply(this,arguments)}function kO(e,t){throw e.unload(),e._state=on.FAILED,e.getError("Failed to load index buffer",t)}function UO(){this.typedArray=void 0,this.indexDatatype=void 0,this.context=void 0,this.buffer=void 0}function oH(e,t,n){const i=yn.createIndexBuffer({typedArray:e,context:n,usage:Tt.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}Ip.prototype.load=(0,Pe.Z)(function*(){return c(this._promise)?this._promise:c(this._draco)?(this._promise=function Lfe(e){return FO.apply(this,arguments)}(this),this._promise):(this._promise=function Rfe(e){return BO.apply(this,arguments)}(this),this._promise)}),UO.prototype.set=function(e,t,n){this.typedArray=e,this.indexDatatype=t,this.context=n},UO.prototype.execute=function(){this.buffer=oH(this.typedArray,this.indexDatatype,this.context)},Ip.prototype.process=function(e){if(T.typeOf.object("frameState",e),this._state===on.READY)return!0;if(this._state!==on.LOADED&&this._state!==on.PROCESSING)return!1;let i,t=this._typedArray,n=this._indexDatatype;if(c(this._dracoLoader))try{this._dracoLoader.process(e)&&(t=this._dracoLoader.decodedData.indices.typedArray,this._typedArray=t,n=ee.fromTypedArray(t),this._indexDatatype=n)}catch(o){kO(this,o)}if(!c(t))return!1;if(this._loadBuffer&&this._asynchronous){const o=Ofe;if(o.set(t,n,e.context),!e.jobScheduler.execute(o,wu.BUFFER))return!1;i=o.buffer}else this._loadBuffer&&(i=oH(t,n,e.context));return this.unload(),this._buffer=i,this._typedArray=this._loadTypedArray?t:void 0,this._state=on.READY,this._resourceCache.statistics.addGeometryLoader(this),!0},Ip.prototype.unload=function(){c(this._buffer)&&this._buffer.destroy();const e=this._resourceCache;c(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&e.unload(this._bufferViewLoader),c(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};const rH=Ip,Su=function Mfe(e,t,n){if(n=g(n,!1)){const i=e.indexOf(t);if(i>-1)return i}return e.push(t),e.length-1},hs=function Ffe(e,t){return c(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0};function rn(){}rn.objectLegacy=function(e,t){if(c(e))for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=t(e[n],n);if(c(o))return o}},rn.object=function(e,t){if(c(e)){const n=e.length;for(let i=0;i0)return i.byteStride}return ee.getSizeInBytes(t.componentType)*nT(t.type)};function x_(e){c(e)&&(e.texCoord=g(e.texCoord,0))}const Vfe=function Ufe(e){je.accessor(e,function(n){c(n.bufferView)&&(n.byteOffset=g(n.byteOffset,0))}),je.bufferView(e,function(n){c(n.buffer)&&(n.byteOffset=g(n.byteOffset,0))}),je.mesh(e,function(n){je.meshPrimitive(n,function(i){i.mode=g(i.mode,oe.TRIANGLES),c(i.material)||(c(e.materials)||(e.materials=[]),i.material=Su(e.materials,{name:"default"}))})}),je.accessorContainingVertexAttributeData(e,function(n){const i=e.accessors[n],o=i.bufferView;if(i.normalized=g(i.normalized,!1),c(o)){const r=e.bufferViews[o];r.byteStride=jy(e,i),r.target=oe.ARRAY_BUFFER}}),je.accessorContainingIndexData(e,function(n){const o=e.accessors[n].bufferView;c(o)&&(e.bufferViews[o].target=oe.ELEMENT_ARRAY_BUFFER)}),je.material(e,function(n){const i=g(n.extensions,g.EMPTY_OBJECT),o=i.KHR_materials_common;if(c(o)){const l=o.technique,u=c(o.values)?o.values:{};return o.values=u,u.ambient=c(u.ambient)?u.ambient:[0,0,0,1],u.emission=c(u.emission)?u.emission:[0,0,0,1],u.transparency=g(u.transparency,1),"CONSTANT"!==l&&(u.diffuse=c(u.diffuse)?u.diffuse:[0,0,0,1],"LAMBERT"!==l&&(u.specular=c(u.specular)?u.specular:[0,0,0,1],u.shininess=g(u.shininess,0))),o.transparent=g(o.transparent,!1),void(o.doubleSided=g(o.doubleSided,!1))}n.emissiveFactor=g(n.emissiveFactor,[0,0,0]),n.alphaMode=g(n.alphaMode,"OPAQUE"),n.doubleSided=g(n.doubleSided,!1),"MASK"===n.alphaMode&&(n.alphaCutoff=g(n.alphaCutoff,.5)),c(i.KHR_techniques_webgl)&&je.materialValue(n,function(l){c(l.index)&&x_(l)}),x_(n.emissiveTexture),x_(n.normalTexture),x_(n.occlusionTexture);const s=n.pbrMetallicRoughness;c(s)&&(s.baseColorFactor=g(s.baseColorFactor,[1,1,1,1]),s.metallicFactor=g(s.metallicFactor,1),s.roughnessFactor=g(s.roughnessFactor,1),x_(s.baseColorTexture),x_(s.metallicRoughnessTexture));const a=i.KHR_materials_pbrSpecularGlossiness;c(a)&&(a.diffuseFactor=g(a.diffuseFactor,[1,1,1,1]),a.specularFactor=g(a.specularFactor,[1,1,1]),a.glossinessFactor=g(a.glossinessFactor,1),x_(a.specularGlossinessTexture))}),je.animation(e,function(n){je.animationSampler(n,function(i){i.interpolation=g(i.interpolation,"LINEAR")})});const t=function zfe(e){const t={};return je.animation(e,function(n){je.animationChannel(n,function(i){const o=i.target,s=o.path;("translation"===s||"rotation"===s||"scale"===s)&&(t[o.node]=!0)})}),t}(e);return je.node(e,function(n,i){c(t[i])||c(n.translation)||c(n.rotation)||c(n.scale)?(n.translation=g(n.translation,[0,0,0]),n.rotation=g(n.rotation,[0,0,0,1]),n.scale=g(n.scale,[1,1,1])):n.matrix=g(n.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}),je.sampler(e,function(n){n.wrapS=g(n.wrapS,oe.REPEAT),n.wrapT=g(n.wrapT,oe.REPEAT)}),c(e.scenes)&&!c(e.scene)&&(e.scene=0),e};function Kw(e){e.extras=c(e.extras)?e.extras:{},e.extras._pipeline=c(e.extras._pipeline)?e.extras._pipeline:{}}const zO=function Hfe(e){return je.shader(e,function(t){Kw(t)}),je.buffer(e,function(t){Kw(t)}),je.image(e,function(t){Kw(t)}),Kw(e),e},sH=function Wfe(e,t){const n=e.extensionsUsed;if(c(n)){const i=n.indexOf(t);i>=0&&n.splice(i,1),function Gfe(e,t){const n=e.extensionsRequired;if(c(n)){const i=n.indexOf(t);i>=0&&n.splice(i,1),0===n.length&&delete e.extensionsRequired}}(e,t),0===n.length&&delete e.extensionsUsed}};function aH(e,t,n){const i=new DataView(e.buffer),o=new Array(n);for(let r=0;r0){const h=g(d.binary_glTF,d.KHR_binary_glTF);c(h)&&(h.extras._pipeline.source=u,delete h.uri)}return sH(l,"KHR_binary_glTF"),l}(e,n):function Zfe(e,t){const n=t[2];let o,r,i=12;for(;i0&&(s[0].extras._pipeline.source=r)}return o}(e,n)};function Qw(e){c(e.extras)&&(c(e.extras._pipeline)&&delete e.extras._pipeline,0===Object.keys(e.extras).length&&delete e.extras)}const Qfe=function Kfe(e){return je.shader(e,function(t){Qw(t)}),je.buffer(e,function(t){Qw(t)}),je.image(e,function(t){Qw(t)}),Qw(e),e},iT=function Jfe(e,t){let n=e.extensionsUsed;c(n)||(n=[],e.extensionsUsed=n),Su(n,t,!0)},VO=function ehe(e){switch(e){case ee.BYTE:return function(t,n,i,o,r){for(let s=0;s-1}const ohe=[oe.ZERO,oe.ONE,oe.SRC_COLOR,oe.ONE_MINUS_SRC_COLOR,oe.SRC_ALPHA,oe.ONE_MINUS_SRC_ALPHA,oe.DST_ALPHA,oe.ONE_MINUS_DST_ALPHA,oe.DST_COLOR,oe.ONE_MINUS_DST_COLOR];function rhe(e,t){if(!c(e))return t;for(let n=0;n<4;n++)if(-1===ohe.indexOf(e[n]))return t;return e}const dhe=function uhe(e){const n={},i={},o={};if(c(e.techniques)){const r={programs:[],shaders:[],techniques:[]},s=e.glExtensionsUsed;delete e.glExtensionsUsed,je.technique(e,function(a,l){const u={name:a.name,program:void 0,attributes:{},uniforms:{}};let d;if(je.techniqueAttribute(a,function(h,m){d=a.parameters[h],u.attributes[m]={semantic:d.semantic}}),je.techniqueUniform(a,function(h,m){d=a.parameters[h],u.uniforms[m]={count:d.count,node:d.node,type:d.type,semantic:d.semantic,value:d.value},c(n[l])||(n[l]={}),n[l][h]=m}),c(o[a.program]))u.program=o[a.program];else{const h=e.programs[a.program],m={name:h.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:s};m.fragmentShader=Su(r.shaders,e.shaders[h.fragmentShader],!0),m.vertexShader=Su(r.shaders,e.shaders[h.vertexShader],!0),u.program=Su(r.programs,m),o[a.program]=u.program}i[l]=Su(r.techniques,u)}),r.techniques.length>0&&(c(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,iT(e,"KHR_techniques_webgl"),function che(e,t){let n=e.extensionsRequired;c(n)||(n=[],e.extensionsRequired=n),Su(n,t,!0),iT(e,t)}(e,"KHR_techniques_webgl"))}return je.material(e,function(r){if(c(r.technique)){const s={technique:i[r.technique]};je.objectLegacy(r.values,function(a,l){c(s.values)||(s.values={});const u=n[r.technique][l];c(u)&&(s.values[u]=a)}),c(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},lH=function fhe(e,t){T.typeOf.object("material",e),T.defined("handler",t);const n=e.pbrMetallicRoughness;if(c(n)){if(c(n.baseColorTexture)){const o=n.baseColorTexture,r=t(o.index,o);if(c(r))return r}if(c(n.metallicRoughnessTexture)){const o=n.metallicRoughnessTexture,r=t(o.index,o);if(c(r))return r}}if(c(e.extensions)){const o=e.extensions.KHR_materials_pbrSpecularGlossiness;if(c(o)){if(c(o.diffuseTexture)){const s=o.diffuseTexture,a=t(s.index,s);if(c(a))return a}if(c(o.specularGlossinessTexture)){const s=o.specularGlossinessTexture,a=t(s.index,s);if(c(a))return a}}const r=e.extensions.KHR_materials_common;if(c(r)&&c(r.values)){const s=r.values.diffuse,a=r.values.ambient,l=r.values.emission,u=r.values.specular;if(c(s)&&c(s.index)){const d=t(s.index,s);if(c(d))return d}if(c(a)&&c(a.index)){const d=t(a.index,a);if(c(d))return d}if(c(l)&&c(l.index)){const d=t(l.index,l);if(c(d))return d}if(c(u)&&c(u.index)){const d=t(u.index,u);if(c(d))return d}}}const i=je.materialValue(e,function(o){if(c(o.index)){const r=t(o.index,o);if(c(r))return r}});if(c(i))return i;if(c(e.emissiveTexture)){const o=e.emissiveTexture,r=t(o.index,o);if(c(r))return r}if(c(e.normalTexture)){const o=e.normalTexture,r=t(o.index,o);if(c(r))return r}if(c(e.occlusionTexture)){const o=e.occlusionTexture,r=t(o.index,o);if(c(r))return r}},uH=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"],phe={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function Nd(){}function Md(){}function dH(e,t,n){const i=e.nodes[t];return!(c(i.mesh)||c(i.camera)||c(i.skin)||c(i.weights)||c(i.extras)||c(i.extensions)&&0!==Object.keys(i.extensions).length||c(n[t])||c(i.children)&&0!==i.children.filter(function(o){return!dH(e,o,n)}).length)}Nd.accessor=function(e,t){e.accessors.splice(t,1),je.mesh(e,function(i){je.meshPrimitive(i,function(o){je.meshPrimitiveAttribute(o,function(a,l){a>t&&o.attributes[l]--}),je.meshPrimitiveTarget(o,function(a){je.meshPrimitiveTargetAttribute(a,function(l,u){l>t&&a[u]--})});const r=o.indices;c(r)&&r>t&&o.indices--;const s=o.extensions;c(s)&&c(s.CESIUM_primitive_outline)&&s.CESIUM_primitive_outline.indices>t&&--s.CESIUM_primitive_outline.indices})}),je.skin(e,function(i){c(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),je.animation(e,function(i){je.animationSampler(i,function(o){c(o.input)&&o.input>t&&o.input--,c(o.output)&&o.output>t&&o.output--})})},Nd.buffer=function(e,t){e.buffers.splice(t,1),je.bufferView(e,function(i){c(i.buffer)&&i.buffer>t&&i.buffer--,c(i.extensions)&&c(i.extensions.EXT_meshopt_compression)&&i.extensions.EXT_meshopt_compression.buffer--})},Nd.bufferView=function(e,t){if(e.bufferViews.splice(t,1),je.accessor(e,function(i){c(i.bufferView)&&i.bufferView>t&&i.bufferView--}),je.shader(e,function(i){c(i.bufferView)&&i.bufferView>t&&i.bufferView--}),je.image(e,function(i){c(i.bufferView)&&i.bufferView>t&&i.bufferView--}),hs(e,"KHR_draco_mesh_compression")&&je.mesh(e,function(i){je.meshPrimitive(i,function(o){c(o.extensions)&&c(o.extensions.KHR_draco_mesh_compression)&&o.extensions.KHR_draco_mesh_compression.bufferView>t&&o.extensions.KHR_draco_mesh_compression.bufferView--})}),hs(e,"EXT_feature_metadata")){const o=e.extensions.EXT_feature_metadata.featureTables;for(const r in o)if(o.hasOwnProperty(r)){const a=o[r].properties;if(c(a))for(const l in a)if(a.hasOwnProperty(l)){const u=a[l];c(u.bufferView)&&u.bufferView>t&&u.bufferView--,c(u.arrayOffsetBufferView)&&u.arrayOffsetBufferView>t&&u.arrayOffsetBufferView--,c(u.stringOffsetBufferView)&&u.stringOffsetBufferView>t&&u.stringOffsetBufferView--}}}if(hs(e,"EXT_structural_metadata")){const o=e.extensions.EXT_structural_metadata.propertyTables;if(c(o)){const r=o.length;for(let s=0;st&&d.values--,c(d.arrayOffsets)&&d.arrayOffsets>t&&d.arrayOffsets--,c(d.stringOffsets)&&d.stringOffsets>t&&d.stringOffsets--}}}}},Nd.image=function(e,t){e.images.splice(t,1),je.texture(e,function(i){c(i.source)&&i.source>t&&--i.source;const o=i.extensions;c(o)&&c(o.EXT_texture_webp)&&o.EXT_texture_webp.source>t?--i.extensions.EXT_texture_webp.source:c(o)&&c(o.KHR_texture_basisu)&&o.KHR_texture_basisu.source>t&&--i.extensions.KHR_texture_basisu.source})},Nd.mesh=function(e,t){e.meshes.splice(t,1),je.node(e,function(i){c(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})},Nd.node=function(e,t){e.nodes.splice(t,1),je.skin(e,function(i){c(i.skeleton)&&i.skeleton>t&&i.skeleton--,i.joints=i.joints.map(function(o){return o>t?o-1:o})}),je.animation(e,function(i){je.animationChannel(i,function(o){c(o.target)&&c(o.target.node)&&o.target.node>t&&o.target.node--})}),je.technique(e,function(i){je.techniqueUniform(i,function(o){c(o.node)&&o.node>t&&o.node--})}),je.node(e,function(i){c(i.children)&&(i.children=i.children.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o}))}),je.scene(e,function(i){i.nodes=i.nodes.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o})})},Nd.material=function(e,t){e.materials.splice(t,1),je.mesh(e,function(i){je.meshPrimitive(i,function(o){c(o.material)&&o.material>t&&o.material--})})},Nd.sampler=function(e,t){e.samplers.splice(t,1),je.texture(e,function(i){c(i.sampler)&&i.sampler>t&&--i.sampler})},Nd.texture=function(e,t){if(e.textures.splice(t,1),je.material(e,function(i){lH(i,function(o,r){r.index>t&&--r.index})}),hs(e,"EXT_feature_metadata")){je.mesh(e,function(r){je.meshPrimitive(r,function(s){const a=s.extensions;if(c(a)&&c(a.EXT_feature_metadata)){const u=a.EXT_feature_metadata.featureIdTextures;if(c(u)){const d=u.length;for(let h=0;ht&&--_.index}}}})});const o=e.extensions.EXT_feature_metadata.featureTextures;for(const r in o)if(o.hasOwnProperty(r)){const a=o[r].properties;if(c(a))for(const l in a)if(a.hasOwnProperty(l)){const d=a[l].texture;d.index>t&&--d.index}}}if(hs(e,"EXT_mesh_features")&&je.mesh(e,function(i){je.meshPrimitive(i,function(o){const r=o.extensions;if(c(r)&&c(r.EXT_mesh_features)){const a=r.EXT_mesh_features.featureIds;if(c(a)){const l=a.length;for(let u=0;ut&&--d.texture.index}}}})}),hs(e,"EXT_structural_metadata")){const o=e.extensions.EXT_structural_metadata.propertyTextures;if(c(o)){const r=o.length;for(let s=0;st&&--d.index}}}}},Md.accessor=function(e){const t={};return je.mesh(e,function(n){je.meshPrimitive(n,function(i){je.meshPrimitiveAttribute(i,function(r){t[r]=!0}),je.meshPrimitiveTarget(i,function(r){je.meshPrimitiveTargetAttribute(r,function(s){t[s]=!0})});const o=i.indices;c(o)&&(t[o]=!0)})}),je.skin(e,function(n){c(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),je.animation(e,function(n){je.animationSampler(n,function(i){c(i.input)&&(t[i.input]=!0),c(i.output)&&(t[i.output]=!0)})}),hs(e,"EXT_mesh_gpu_instancing")&&je.node(e,function(n){c(n.extensions)&&c(n.extensions.EXT_mesh_gpu_instancing)&&Object.keys(n.extensions.EXT_mesh_gpu_instancing.attributes).forEach(function(i){t[n.extensions.EXT_mesh_gpu_instancing.attributes[i]]=!0})}),hs(e,"CESIUM_primitive_outline")&&je.mesh(e,function(n){je.meshPrimitive(n,function(i){const o=i.extensions;if(c(o)&&c(o.CESIUM_primitive_outline)){const s=o.CESIUM_primitive_outline.indices;c(s)&&(t[s]=!0)}})}),t},Md.buffer=function(e){const t={};return je.bufferView(e,function(n){c(n.buffer)&&(t[n.buffer]=!0),c(n.extensions)&&c(n.extensions.EXT_meshopt_compression)&&(t[n.extensions.EXT_meshopt_compression.buffer]=!0)}),t},Md.bufferView=function(e){const t={};if(je.accessor(e,function(n){c(n.bufferView)&&(t[n.bufferView]=!0)}),je.shader(e,function(n){c(n.bufferView)&&(t[n.bufferView]=!0)}),je.image(e,function(n){c(n.bufferView)&&(t[n.bufferView]=!0)}),hs(e,"KHR_draco_mesh_compression")&&je.mesh(e,function(n){je.meshPrimitive(n,function(i){c(i.extensions)&&c(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),hs(e,"EXT_feature_metadata")){const i=e.extensions.EXT_feature_metadata.featureTables;for(const o in i)if(i.hasOwnProperty(o)){const s=i[o].properties;if(c(s))for(const a in s)if(s.hasOwnProperty(a)){const l=s[a];c(l.bufferView)&&(t[l.bufferView]=!0),c(l.arrayOffsetBufferView)&&(t[l.arrayOffsetBufferView]=!0),c(l.stringOffsetBufferView)&&(t[l.stringOffsetBufferView]=!0)}}}if(hs(e,"EXT_structural_metadata")){const i=e.extensions.EXT_structural_metadata.propertyTables;if(c(i)){const o=i.length;for(let r=0;r0&&(t[n.mesh]=!0)}}),t},Md.node=function(e){const t={};return je.skin(e,function(n){c(n.skeleton)&&(t[n.skeleton]=!0),je.skinJoint(n,function(i){t[i]=!0})}),je.animation(e,function(n){je.animationChannel(n,function(i){c(i.target)&&c(i.target.node)&&(t[i.target.node]=!0)})}),je.technique(e,function(n){je.techniqueUniform(n,function(i){c(i.node)&&(t[i.node]=!0)})}),je.node(e,function(n,i){dH(e,i,t)||(t[i]=!0)}),t},Md.material=function(e){const t={};return je.mesh(e,function(n){je.meshPrimitive(n,function(i){c(i.material)&&(t[i.material]=!0)})}),t},Md.texture=function(e){const t={};if(je.material(e,function(n){lH(n,function(i){t[i]=!0})}),hs(e,"EXT_feature_metadata")){je.mesh(e,function(o){je.meshPrimitive(o,function(r){const s=r.extensions;if(c(s)&&c(s.EXT_feature_metadata)){const l=s.EXT_feature_metadata.featureIdTextures;if(c(l)){const u=l.length;for(let d=0;d0)for(s.mesh=n.meshes[l[0]],t=1;t0&&c(s.skin)&&(e.skins[s.skin].skeleton=n.nodes[l[0]]),delete s.skeletons}c(s.jointName)&&delete s.jointName}),je.skin(e,function(s){c(s.inverseBindMatrices)&&(s.inverseBindMatrices=n.accessors[s.inverseBindMatrices]);const a=s.jointNames;if(c(a)){const l=[],u=a.length;for(t=0;t-1&&function mhe(e,t){const i=e[phe[t]];if(c(i)){let o=0;const r=Md[t](e),s=i.length;for(let a=0;a=0&&(a=r.substring(0,s),l=r.substring(s));const d=Hhe[a];c(d)?(u=d+l,t[r]=u):c(Vhe[a])||(u=`_${r}`,t[r]=u)}});for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const r=t[o],s=i.attributes[o];c(s)&&(delete i.attributes[o],i.attributes[r]=s)}})}),je.technique(e,function(n){je.techniqueParameter(n,function(i){const o=t[i.semantic];c(o)&&(i.semantic=o)})})}(e),function The(e){let t;je.accessorWithSemantic(e,"JOINTS_0",function(n){const i=e.accessors[n];t=i.componentType,t===oe.BYTE?Jw(e,i,ee.UNSIGNED_BYTE):t!==oe.UNSIGNED_BYTE&&t!==oe.UNSIGNED_SHORT&&Jw(e,i,ee.UNSIGNED_SHORT)}),je.accessorWithSemantic(e,"WEIGHTS_0",function(n){const i=e.accessors[n];t=i.componentType,t===oe.BYTE?Jw(e,i,ee.UNSIGNED_BYTE):t===oe.SHORT&&Jw(e,i,ee.UNSIGNED_SHORT)})}(e),function jhe(e){je.camera(e,function(t){const n=t.perspective;if(c(n)){const i=n.aspectRatio;c(i)&&0===i&&delete n.aspectRatio;const o=n.yfov;c(o)&&0===o&&(n.yfov=1)}})}(e),function she(e){const t={},n={};c(e.techniques)&&(je.technique(e,function(o,r){const s=o.states;if(c(s)){const a=n[r]={};if(cH(s,oe.BLEND)){a.alphaMode="BLEND";const l=s.functions;c(l)&&(c(l.blendEquationSeparate)||c(l.blendFuncSeparate))&&(t[r]={blendEquation:g(l.blendEquationSeparate,nhe),blendFactors:rhe(l.blendFuncSeparate,ihe)})}cH(s,oe.CULL_FACE)||(a.doubleSided=!0),delete o.states}}),Object.keys(t).length>0&&(c(e.extensions)||(e.extensions={}),iT(e,"KHR_blend")),je.material(e,function(o){if(c(o.technique)){je.objectLegacy(n[o.technique],function(a,l){o[l]=a});const s=t[o.technique];c(s)&&(c(o.extensions)||(o.extensions={}),o.extensions.KHR_blend=s)}}))}(e),dhe(e),function Nhe(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];Array.isArray(n)&&0===n.length&&delete e[t]}je.node(e,function(t){c(t.children)&&0===t.children.length&&delete t.children})}(e)},"2.0":void 0};function fH(e){const t=e.materials;for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const i=t[n],o=i.instanceTechnique;c(o)&&(i.technique=o.technique,i.values=o.values,delete i.instanceTechnique)}}function hH(e,t){const n=[];for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=e[i];t[i]=n.length,n.push(o),c(o.name)||(o.name=i)}return n}const Fhe={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0},Vhe={POSITION:!0,NORMAL:!0,TANGENT:!0},Hhe={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function WO(e,t){return c(t.byteStride)&&0!==t.byteStride?t.byteStride:jy(e,t)}function pH(e){return(!c(e.children)||0===e.children.length)&&(!c(e.meshes)||0===e.meshes.length)&&!c(e.camera)&&!c(e.skin)&&!c(e.skeletons)&&!c(e.jointName)&&(!c(e.translation)||f.fromArray(e.translation).equals(f.ZERO))&&(!c(e.scale)||f.fromArray(e.scale).equals(new f(1,1,1)))&&(!c(e.rotation)||fe.fromArray(e.rotation).equals(new fe(0,0,0,1)))&&(!c(e.matrix)||k.fromColumnMajorArray(e.matrix).equals(k.IDENTITY))&&!c(e.extensions)&&!c(e.extras)}function mH(e,t){je.scene(e,function(n){const i=n.nodes;if(c(i))for(let r=i.length;r>=0;--r)if(i[r]===t)return void i.splice(r,1)}),je.node(e,function(n,i){if(c(n.children)){const o=n.children.indexOf(t);o>-1&&(n.children.splice(o,1),pH(n)&&mH(e,i))}}),delete e.nodes[t]}const Qhe=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],Jhe=["u_diffuse","u_diffuse_mat"];function qO(e){e.pbrMetallicRoughness=c(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function tS(e){return c(e.index)}function nS(e){return Array.isArray(e)&&4===e.length}function _H(e){const t=new Array(4);t[3]=e[3];for(let n=0;n<3;n++){const i=e[n];t[n]=i<=.04045?.07739938080495357*e[n]:Math.pow(.9478672985781991*(i+.055),2.4)}return t}const npe=function whe(e,t){const n=(t=g(t,g.EMPTY_OBJECT)).targetVersion;let i=e.version;e.asset=g(e.asset,{version:"1.0"}),e.asset.version=g(e.asset.version,"1.0"),i=g(i,e.asset.version).toString(),Object.prototype.hasOwnProperty.call(eS,i)||(c(i)&&(i=i.substring(0,3)),Object.prototype.hasOwnProperty.call(eS,i)||(i="1.0"));let o=eS[i];for(;c(o)&&i!==n;)o(e,t),i=e.asset.version,o=eS[i];return t.keepLegacyExtensions||(function epe(e,t){t=g(t,g.EMPTY_OBJECT);const n=g(t.baseColorTextureNames,Qhe),i=g(t.baseColorFactorNames,Jhe);je.material(e,function(o){je.materialValue(o,function(r,s){-1!==n.indexOf(s)&&tS(r)?(qO(o),o.pbrMetallicRoughness.baseColorTexture=r):-1!==i.indexOf(s)&&nS(r)&&(qO(o),o.pbrMetallicRoughness.baseColorFactor=_H(r))})}),jO(e,"KHR_techniques_webgl"),jO(e,"KHR_blend")}(e,t),function tpe(e){je.material(e,function(t){const n=g(t.extensions,g.EMPTY_OBJECT).KHR_materials_common;if(c(n)){"CONSTANT"===n.technique&&(iT(e,"KHR_materials_unlit"),t.extensions=c(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={});const o=c(n.values)?n.values:{},r=o.ambient,s=o.diffuse,a=o.emission,l=o.transparency,u=n.doubleSided,d=n.transparent;qO(t),c(r)&&(nS(r)?t.emissiveFactor=r.slice(0,3):tS(r)&&(t.emissiveTexture=r)),c(s)&&(nS(s)?t.pbrMetallicRoughness.baseColorFactor=_H(s):tS(s)&&(t.pbrMetallicRoughness.baseColorTexture=s)),c(u)&&(t.doubleSided=u),c(a)&&(nS(a)?t.emissiveFactor=a.slice(0,3):tS(a)&&(t.emissiveTexture=a)),c(l)&&(c(t.pbrMetallicRoughness.baseColorFactor)?t.pbrMetallicRoughness.baseColorFactor[3]*=l:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,l]),c(d)&&(t.alphaMode=d?"BLEND":"OPAQUE")}}),jO(e,"KHR_materials_common")}(e)),e},li={POSITION:"POSITION",NORMAL:"NORMAL",TANGENT:"TANGENT",TEXCOORD:"TEXCOORD",COLOR:"COLOR",JOINTS:"JOINTS",WEIGHTS:"WEIGHTS",FEATURE_ID:"_FEATURE_ID",hasSetIndex:function(e){switch(T.typeOf.string("semantic",e),e){case li.POSITION:case li.NORMAL:case li.TANGENT:return!1;case li.TEXCOORD:case li.COLOR:case li.JOINTS:case li.WEIGHTS:case li.FEATURE_ID:return!0;default:throw new E("semantic is not a valid value.")}},fromGltfSemantic:function(e){T.typeOf.string("gltfSemantic",e);let t=e;const i=/^(\w+)_\d+$/.exec(e);switch(null!==i&&(t=i[1]),t){case"POSITION":return li.POSITION;case"NORMAL":return li.NORMAL;case"TANGENT":return li.TANGENT;case"TEXCOORD":return li.TEXCOORD;case"COLOR":return li.COLOR;case"JOINTS":return li.JOINTS;case"WEIGHTS":return li.WEIGHTS;case"_FEATURE_ID":return li.FEATURE_ID}},fromPntsSemantic:function(e){switch(T.typeOf.string("pntsSemantic",e),e){case"POSITION":case"POSITION_QUANTIZED":return li.POSITION;case"RGBA":case"RGB":case"RGB565":return li.COLOR;case"NORMAL":case"NORMAL_OCT16P":return li.NORMAL;case"BATCH_ID":return li.FEATURE_ID;default:throw new E("pntsSemantic is not a valid value.")}},getGlslType:function(e){switch(T.typeOf.string("semantic",e),e){case li.POSITION:case li.NORMAL:case li.TANGENT:return"vec3";case li.TEXCOORD:return"vec2";case li.COLOR:return"vec4";case li.JOINTS:return"ivec4";case li.WEIGHTS:return"vec4";case li.FEATURE_ID:return"int";default:throw new E("semantic is not a valid value.")}},getVariableName:function(e,t){T.typeOf.string("semantic",e);let n=function ipe(e){switch(e){case li.POSITION:return"positionMC";case li.NORMAL:return"normalMC";case li.TANGENT:return"tangentMC";case li.TEXCOORD:return"texCoord";case li.COLOR:return"color";case li.JOINTS:return"joints";case li.WEIGHTS:return"weights";case li.FEATURE_ID:return"featureId";default:throw new E("semantic is not a valid value.")}}(e);return c(t)&&(n+=`_${t}`),n}},ln=Object.freeze(li);function ga(){}ga.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;c(n)&&c(n.message)&&(i+=`\n${n.message}`);const o=new Ie(i);return c(n)&&(o.stack=`Original stack:\n${n.stack}\nHandler stack:\n${o.stack}`),o},ga.getNodeTransform=function(e){return c(e.matrix)?e.matrix:k.fromTranslationQuaternionRotationScale(c(e.translation)?e.translation:f.ZERO,c(e.rotation)?e.rotation:yt.IDENTITY,c(e.scale)?e.scale:f.ONE)},ga.getAttributeBySemantic=function(e,t,n){const i=e.attributes,o=i.length;for(let r=0;r=this._contentAvailabilityBitstreams.length)throw new E("contentIndex out of bounds.");return this._contentAvailabilityBitstreams[t].getBit(e)},Ds.prototype.contentIsAvailableAtCoordinates=function(e,t){const n=this.getTileIndex(e);return this.contentIsAvailableAtIndex(n,t)},Ds.prototype.childSubtreeIsAvailableAtIndex=function(e){return this._childSubtreeAvailability.getBit(e)},Ds.prototype.childSubtreeIsAvailableAtCoordinates=function(e){const t=this.getChildSubtreeIndex(e);return this.childSubtreeIsAvailableAtIndex(t)},Ds.prototype.getLevelOffset=function(e){const t=this._branchingFactor;return(Math.pow(t,e)-1)/(t-1)},Ds.prototype.getParentMortonIndex=function(e){let t=2;return this._subdivisionScheme===Xr.OCTREE&&(t=3),e>>t},Ds.fromSubtreeJson=function(){var e=(0,Pe.Z)(function*(t,n,i,o,r){if(T.typeOf.object("resource",t),c(n)===c(i))throw new E("One of json and subtreeView must be defined.");T.typeOf.object("implicitTileset",o),T.typeOf.object("implicitCoordinates",r);const s=new Ds(t,o,r);let a;a=c(n)?{json:n,binary:void 0}:function $pe(e){const n=new DataView(e.buffer,e.byteOffset);let i=8;const o=n.getUint32(i,!0);i+=8;const r=n.getUint32(i,!0);i+=8;const s=fc(e,i,o);i+=o;return{json:s,binary:e.subarray(i,i+r)}}(i);const l=a.json;let u;s._subtreeJson=l,Ir(l,"3DTILES_metadata")?u=l.extensions["3DTILES_metadata"]:c(l.tileMetadata)&&(u=l.propertyTables[l.tileMetadata]);const d=[];if(c(l.contentMetadata)){const w=l.contentMetadata.length;for(let v=0;v0;for(let m=0;m>BigInt(61)),u=l%2==0?L4.encode2D(i,o,r):L4.encode2D(i,r,o),d=Xw.fromFacePositionLevel(l,BigInt(u),i);let h,m;if(c(s)){const _=(a.maximumHeight+a.minimumHeight)/2;h=n<4?a.minimumHeight:_,m=n<4?_:a.maximumHeight}else h=a.minimumHeight,m=a.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:Xw.getTokenFromId(d._cellId),minimumHeight:h,maximumHeight:m}}}}Object.defineProperties(_c.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._url}},metadata:{get:function(){},set:function(){throw new E("Implicit3DTileContent cannot have metadata")}},batchTable:{get:function(){}},group:{get:function(){return this._group},set:function(e){this._group=e}}}),_c.fromSubtreeJson=function(){var e=(0,Pe.Z)(function*(t,n,i,o,r,s){if(T.defined("tile.implicitTileset",n.implicitTileset),T.defined("tile.implicitCoordinates",n.implicitCoordinates),c(o)===c(r))throw new E("One of json and arrayBuffer must be defined.");let a;s=g(s,0),c(r)&&(a=new Uint8Array(r,s));const l=n.implicitTileset,u=n.implicitCoordinates,d=yield ume.fromSubtreeJson(i,o,a,l,u),h=new _c(t,n,i);return h._implicitSubtree=d,function fme(e,t){const n=e._tile,o=function pme(e,t,n,i){const s=NH(e,t,n,i,0,!0),a=e._tileset.statistics;let l=[s],u=[];const d=e._implicitTileset;for(let h=1;h0&&(r=Qn.OUTSIDE);for(let s=0;s=this._count)throw new E(`index must be in the range [0, ${this._count})`);const n=this._properties[t];if(c(n))return zt(n[e],!0)},uT.prototype.setProperty=function(e,t,n){if(T.typeOf.number("index",e),T.typeOf.string("propertyId",t),e<0||e>=this._count)throw new E(`index must be in the range [0, ${this._count})`);let i=this._properties[t];c(i)||(i=new Array(this._count),this._properties[t]=i),i[e]=zt(n,!0)};const hL=uT;function ba(e){e=g(e,g.EMPTY_OBJECT),T.typeOf.number("options.count",e.count),this._name=e.name,this._id=e.id,this._count=e.count,this._extras=e.extras,this._extensions=e.extensions,this._metadataTable=e.metadataTable,this._jsonMetadataTable=e.jsonMetadataTable,this._batchTableHierarchy=e.batchTableHierarchy}Object.defineProperties(ba.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},count:{get:function(){return this._count}},class:{get:function(){if(c(this._metadataTable))return this._metadataTable.class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){let e=0;return c(this._metadataTable)&&(e+=this._metadataTable.byteLength),c(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e}}}),ba.prototype.hasProperty=function(e,t){return T.typeOf.number("index",e),T.typeOf.string("propertyId",t),!!(c(this._metadataTable)&&this._metadataTable.hasProperty(t)||c(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)||c(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(t))},ba.prototype.hasPropertyBySemantic=function(e,t){return T.typeOf.number("index",e),T.typeOf.string("semantic",t),!!c(this._metadataTable)&&this._metadataTable.hasPropertyBySemantic(t)},ba.prototype.propertyExists=function(e){return T.typeOf.string("propertyId",e),!!(c(this._metadataTable)&&this._metadataTable.hasProperty(e)||c(this._batchTableHierarchy)&&this._batchTableHierarchy.propertyExists(e)||c(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(e))},ba.prototype.propertyExistsBySemantic=function(e){return T.typeOf.string("semantic",e),!!c(this._metadataTable)&&this._metadataTable.hasPropertyBySemantic(e)};const pL=[];function mL(e,t){if(!c(e)||e<0||e>=t)throw new E(`featureId is required and must be between zero and featuresLength - 1 (${t}`-NaN)}ba.prototype.getPropertyIds=function(e,t){return(t=c(t)?t:[]).length=0,c(this._metadataTable)&&t.push.apply(t,this._metadataTable.getPropertyIds(pL)),c(this._batchTableHierarchy)&&t.push.apply(t,this._batchTableHierarchy.getPropertyIds(e,pL)),c(this._jsonMetadataTable)&&t.push.apply(t,this._jsonMetadataTable.getPropertyIds(pL)),t},ba.prototype.getProperty=function(e,t){let n;if(c(this._metadataTable)&&(n=this._metadataTable.getProperty(e,t),c(n))||c(this._batchTableHierarchy)&&(n=this._batchTableHierarchy.getProperty(e,t),c(n))||c(this._jsonMetadataTable)&&(n=this._jsonMetadataTable.getProperty(e,t),c(n)))return n},ba.prototype.setProperty=function(e,t,n){c(this._metadataTable)&&this._metadataTable.setProperty(e,t,n)||c(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n)||(c(this._jsonMetadataTable)||(this._jsonMetadataTable=new hL({count:this._count,properties:{}})),this._jsonMetadataTable.setProperty(e,t,n))},ba.prototype.getPropertyBySemantic=function(e,t){if(c(this._metadataTable))return this._metadataTable.getPropertyBySemantic(e,t)},ba.prototype.setPropertyBySemantic=function(e,t,n){return!!c(this._metadataTable)&&this._metadataTable.setPropertyBySemantic(e,t,n)},ba.prototype.getPropertyTypedArray=function(e){if(T.typeOf.string("propertyId",e),c(this._metadataTable))return this._metadataTable.getPropertyTypedArray(e)},ba.prototype.getPropertyTypedArrayBySemantic=function(e){if(T.typeOf.string("semantic",e),c(this._metadataTable))return this._metadataTable.getPropertyTypedArrayBySemantic(e)},ba.prototype.isClass=function(e,t){mL(e,this.count),T.typeOf.string("className",t);const n=this._batchTableHierarchy;return!!c(n)&&n.isClass(e,t)},ba.prototype.isExactClass=function(e,t){return mL(e,this.count),T.typeOf.string("className",t),this.getExactClassName(e)===t},ba.prototype.getExactClassName=function(e){mL(e,this.count);const t=this._batchTableHierarchy;if(c(t))return t.getClassName(e)};const Yy=ba;function dT(e){const t=(e=g(e,g.EMPTY_OBJECT)).property,n=e.classProperty,i=e.textures;T.typeOf.object("options.property",t),T.typeOf.object("options.classProperty",n),T.typeOf.object("options.textures",i);const o=c(t.channels)?t.channels:[0],r=t,s=E_.createModelTextureReader({textureInfo:r,channels:Pme(o),texture:i[r.index]});this._min=t.min,this._max=t.max;let a=t.offset,l=t.scale;const u=n.hasValueTransform||c(a)||c(l);a=g(a,n.offset),l=g(l,n.scale),a=n.unpackVectorAndMatrixTypes(a),l=n.unpackVectorAndMatrixTypes(l),this._offset=a,this._scale=l,this._hasValueTransform=u,this._textureReader=s,this._classProperty=n,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(dT.prototype,{textureReader:{get:function(){return this._textureReader}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),dT.prototype.isGpuCompatible=function(){const e=this._classProperty,t=e.type,n=e.componentType;return e.isArray?!e.isVariableLengthArray&&e.arrayLength<=4&&t===xn.SCALAR&&n===Dn.UINT8:!(!xn.isVectorType(t)&&t!==xn.SCALAR)&&n===Dn.UINT8};const Dme=[void 0,"float","vec2","vec3","vec4"],Ime=[void 0,"int","ivec2","ivec3","ivec4"];function Pme(e){return e.map(function(t){return"rgba".charAt(t)}).join("")}dT.prototype.getGlslType=function(){const e=this._classProperty;let t=xn.getComponentCount(e.type);return e.isArray&&(t=e.arrayLength),e.normalized?Dme[t]:Ime[t]},dT.prototype.unpackInShader=function(e){return this._classProperty.normalized?e:`${this.getGlslType()}(255.0 * ${e})`};const Ome=dT;function _L(e){const t=(e=g(e,g.EMPTY_OBJECT)).propertyTexture,n=e.class,i=e.textures;T.typeOf.object("options.propertyTexture",t),T.typeOf.object("options.class",n),T.typeOf.object("options.textures",i);const o=t.extensions,r=t.extras,s={};if(c(t.properties))for(const a in t.properties)t.properties.hasOwnProperty(a)&&(s[a]=new Ome({property:t.properties[a],classProperty:n.properties[a],textures:i}));this._name=e.name,this._id=e.id,this._class=n,this._properties=s,this._extras=r,this._extensions=o}Object.defineProperties(_L.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),_L.prototype.getProperty=function(e){return T.typeOf.string("propertyId",e),this._properties[e]};const KH=_L;function QH(e){const t=(e=g(e,g.EMPTY_OBJECT)).property,n=e.classProperty;T.typeOf.object("options.property",t),T.typeOf.object("options.classProperty",n),this._attribute=t.attribute,this._classProperty=n,this._min=t.min,this._max=t.max;let i=t.offset,o=t.scale;const r=n.hasValueTransform||c(i)||c(o);i=g(i,n.offset),o=g(o,n.scale),i=n.unpackVectorAndMatrixTypes(i),o=n.unpackVectorAndMatrixTypes(o),this._offset=i,this._scale=o,this._hasValueTransform=r,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(QH.prototype,{attribute:{get:function(){return this._attribute}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});const Lme=QH;function gL(e){const t=(e=g(e,g.EMPTY_OBJECT)).propertyAttribute,n=e.class;T.typeOf.object("options.propertyAttribute",t),T.typeOf.object("options.class",n);const i={};if(c(t.properties))for(const o in t.properties)t.properties.hasOwnProperty(o)&&(i[o]=new Lme({property:t.properties[o],classProperty:n.properties[o]}));this._name=e.name,this._id=e.id,this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(gL.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),gL.prototype.getProperty=function(e){return T.typeOf.string("propertyId",e),this._properties[e]};const JH=gL;function fT(e){e=g(e,g.EMPTY_OBJECT),T.typeOf.object("options.schema",e.schema),this._schema=e.schema;const t=e.propertyTables;this._propertyTableCount=c(t)?t.length:0,this._propertyTables=t,this._propertyTextures=e.propertyTextures,this._propertyAttributes=e.propertyAttributes,this._statistics=e.statistics,this._extras=e.extras,this._extensions=e.extensions}Object.defineProperties(fT.prototype,{schema:{get:function(){return this._schema}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},propertyTableCount:{get:function(){return this._propertyTableCount}},propertyTables:{get:function(){return this._propertyTables}},propertyTextures:{get:function(){return this._propertyTextures}},propertyAttributes:{get:function(){return this._propertyAttributes}},propertyTablesByteLength:{get:function(){if(!c(this._propertyTables))return 0;let e=0;const t=this._propertyTables.length;for(let n=0;n=r;)x=o[x-r];o.push(x),s[y]=A}A>65534&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):A>255&&t instanceof Uint8Array&&(t=new Uint16Array(t)),y===l?(l=A,t[a]=A):y===u?(u=A,t[a+1]=A):(d=A,t[a+2]=A),y=t8(i,l,u,d,m,_,p)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}(this)}function t8(e,t,n,i,o,r,s){const a=s?1:0,l=o?1:0,d=TL(e,t,a,l,0);if(0===d)return t;const m=o?1:0,_=r?1:0,p=TL(e,n,0,m,_);if(0===p)return n;const y=s?1:0,x=r?1:0,C=TL(e,i,y,0,x);if(0===C)return i;const w=d&p&C;let v,D,P;if(1&w)v=0,D=1,P=2;else if(2&w)v=0,P=1,D=2;else if(4&w)D=0,v=1,P=2;else if(8&w)D=0,P=1,v=2;else if(16&w)P=0,v=1,D=2;else{if(!(32&w)){const F=xL(d),S=xL(p),I=xL(C);return F>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}function n8(e){const t=new Uint8Array(e);return t[e-1]=192,8===e?t[e-1]=96:4===e?t[e-1]=48:2===e?t[e-1]=24:1===e&&(t[e-1]=12),t}function i8(e,t){this._originalVertexCount=t,this._edges=new Set;for(let n=0;n1;)i>>=1,r.push(n8(i));const s=new jn({context:e,source:{arrayBufferView:o,mipLevels:r},width:n,height:1,pixelFormat:vt.LUMINANCE,sampler:new Hi({wrapS:$i.CLAMP_TO_EDGE,wrapT:$i.CLAMP_TO_EDGE,minificationFilter:ei.LINEAR_MIPMAP_LINEAR,magnificationFilter:ls.LINEAR})});return t.outlineTexture=s,s},i8.prototype.hasEdge=function(e,t){const n=Math.min(e,t),i=Math.max(e,t);return this._edges.has(n*this._originalVertexCount+i)};const o8=fS;function r8(e){T.typeOf.object("attribute",e),this.attribute=e,this.loadBuffer=!1,this.loadTypedArray=!1}function hS(e){T.typeOf.object("primitive",e),this.primitive=e,this.attributePlans=[],this.indicesPlan=void 0,this.needsOutlines=!1,this.outlineIndices=void 0}hS.prototype.postProcess=function(e){this.needsOutlines&&(function i_e(e){const t=e.primitive,n=t.indices,o=new o8({triangleIndices:n.typedArray,outlineIndices:e.outlineIndices,originalVertexCount:t.attributes[0].count});n.typedArray=o.updatedTriangleIndices,n.indexDatatype=Ot.fromTypedArray(n.typedArray);const s=new r8(function o_e(e){const t=new bn.Attribute;return t.name="_OUTLINE_COORDINATES",t.typedArray=e,t.componentDatatype=ee.FLOAT,t.type=Wn.VEC3,t.normalized=!1,t.count=e.length/3,t}(o.outlineCoordinates));s.loadBuffer=!0,s.loadTypedArray=!1,e.attributePlans.push(s),t.outlineCoordinates=s.attribute;const a=e.attributePlans,l=e.attributePlans.length;for(let u=0;u{this._resourcesLoaded=!0}).catch(o=>{this._processError=o})),c(this._processError)){this._state=To.FAILED;const o=this._processError;this._processError=void 0,pS(this,o)}const t=this._textureErrors.pop();if(c(t)){const o=this.getError("Failed to load glTF texture",t);throw o.name="TextureError",o}if(this._state===To.FAILED)return!1;let n=!1;try{n=this._process(e)}catch(o){this._state=To.FAILED,pS(this,o)}let i=!1;try{i=this._processTextures(e)}catch(o){this._textureState=To.FAILED,pS(this,o)}return this._incrementallyLoadTextures?n:n&&i};const G_e={VEC2:new G(-1,-1),VEC3:new f(-1,-1,-1),VEC4:new fe(-1,-1,-1,-1)};function q_e(e,t,n,i,o){const r=e.accessors[t],s=Wn.getMathType(r.type),a=g(r.normalized,!1),l=new u_e;l.name=n,l.semantic=i,l.setIndex=o,l.constant=function V_e(e){return e===Number?0:new e}(s),l.componentDatatype=r.componentType,l.normalized=a,l.count=r.count,l.type=r.type,l.min=Dl(s,r.min),l.max=Dl(s,r.max),l.byteOffset=r.byteOffset,l.byteStride=jy(e,r),Ir(r,"WEB3D_quantized_attributes")&&function W_e(e,t,n){const i=e.decodeMatrix,o=Dl(n,e.decodedMin),r=Dl(n,e.decodedMax);c(o)&&c(r)&&(t.min=o,t.max=r);const s=new bn.Quantization;s.componentDatatype=t.componentDatatype,s.type=t.type,4===i.length?(s.quantizedVolumeOffset=i[2],s.quantizedVolumeStepSize=i[0]):9===i.length?(s.quantizedVolumeOffset=new G(i[6],i[7]),s.quantizedVolumeStepSize=new G(i[0],i[4])):16===i.length?(s.quantizedVolumeOffset=new f(i[12],i[13],i[14]),s.quantizedVolumeStepSize=new f(i[0],i[5],i[10])):25===i.length&&(s.quantizedVolumeOffset=new fe(i[20],i[21],i[22],i[23]),s.quantizedVolumeStepSize=new fe(i[0],i[6],i[12],i[18])),t.quantization=s}(r.extensions.WEB3D_quantized_attributes,l,s);const u=l.semantic===ln.POSITION||l.semantic===ln.NORMAL||l.semantic===ln.TANGENT||l.semantic===ln.TEXCOORD;return e.extensionsRequired?.includes("KHR_mesh_quantization")&&a&&u&&function j_e(e,t){const n=function H_e(e){switch(e){case ee.BYTE:return 127;case ee.UNSIGNED_BYTE:return 255;case ee.SHORT:return 32767;case ee.UNSIGNED_SHORT:return 65535;default:return 1}}(e.componentDatatype),i=G_e[e.type];let o=e.min;c(o)&&(o=t.divideByScalar(o,n,o),o=t.maximumByComponent(o,i,o));let r=e.max;c(r)&&(r=t.divideByScalar(r,n,r),r=t.maximumByComponent(r,i,r)),e.min=o,e.max=r}(l,s),l}function u8(e){const n=/^\w+_(\d+)$/.exec(e);if(null!==n)return parseInt(n[1])}const Y_e={gltfSemantic:void 0,renamedSemantic:void 0,modelSemantic:void 0};function vL(e,t,n){let i=n;e._renameBatchIdSemantic&&("_BATCHID"===n||"BATCHID"===n)&&(i="_FEATURE_ID_0");const o=t.fromGltfSemantic(i),r=Y_e;return r.gltfSemantic=n,r.renamedSemantic=i,r.modelSemantic=o,r}function X_e(e){return e===ln.POSITION||e===ln.FEATURE_ID||e===ln.TEXCOORD}function d8(e,t,n,i,o,r,s,a){const l=t.accessors[n],u=l.bufferView,d=i.gltfSemantic,h=i.renamedSemantic,m=i.modelSemantic,_=c(m)?u8(h):void 0,y=q_e(t,n,d,m,_);if(!c(o)&&!c(u))return y;const A=function M_e(e,t,n,i,o,r,s,a){return Pr.getVertexBufferLoader({gltf:t,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:a,bufferViewId:t.accessors[n].bufferView,draco:o,attributeSemantic:i,accessorId:n,asynchronous:e._asynchronous,loadBuffer:r,loadTypedArray:s})}(e,t,n,d,o,r,s,a),x=e._geometryLoaders.length;e._geometryLoaders.push(A);const C=A.load();return e._loaderPromises.push(C),e._geometryCallbacks[x]=()=>{c(o)&&c(o.attributes)&&c(o.attributes[d])?function Z_e(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,e.quantization=t.quantization,n&&(e.buffer=t.buffer),i){const o=c(t.quantization)?t.quantization.componentDatatype:e.componentDatatype;e.typedArray=ee.createArrayBufferView(o,t.typedArray.buffer)}}(y,A,r,s):function $_e(e,t,n,i,o,r){o&&(n.buffer=i.buffer),r&&(n.typedArray=l8(e,t,i.typedArray),o||(n.byteOffset=0,n.byteStride=void 0))}(t,l,y,A,r,s)},y}function f8(e,t,n,i,o,r,s,a){const l=i.modelSemantic,_=e._loadAttributesAsTypedArray,p=!_,y=_||l===ln.POSITION&&!r&&e._loadAttributesFor2D&&!a.scene3DOnly||e._loadForClassification&&l===ln.FEATURE_ID,C=d8(e,t,n,i,o,!s&&p,!!s||y,a),w=new CL.AttributeLoadPlan(C);return w.loadBuffer=p,w.loadTypedArray=y,w}function K_e(e,t,n,i,o,r){const s=c(i.ROTATION),a=c(i.TRANSLATION)&&c(t.accessors[i.TRANSLATION].min)&&c(t.accessors[i.TRANSLATION].max),l=vL(e,Aa,o),u=l.modelSemantic,m=e._loadAttributesAsTypedArray||s&&(u===Aa.TRANSLATION||u===Aa.ROTATION||u===Aa.SCALE)||!r.context.instancedArrays;return d8(e,t,n,l,void 0,!m,m||u===Aa.TRANSLATION&&(!a||e._loadAttributesFor2D&&!r.scene3DOnly),r)}function $f(e,t,n,i,o,r){const s=E_.getImageIdFromTexture({gltf:t,textureId:n.index,supportedImageFormats:i});if(!c(s))return;const a=Pr.getTextureLoader({gltf:t,textureInfo:n,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:i,frameState:o,asynchronous:e._asynchronous}),l=E_.createModelTextureReader({textureInfo:n}),u=e._textureLoaders.length;e._textureLoaders.push(a);const d=a.load().catch(h=>{if(!e.isDestroyed()){if(!e._incrementallyLoadTextures)throw h;e._textureState=To.FAILED,e._textureErrors.push(h)}});return e._texturesPromises.push(d),e._textureCallbacks[u]=()=>{l.texture=a.texture,c(r)&&(l.texture.sampler=r)},l}function h8(e,t){const n=new s8;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 p8(e,t,n,i){const o=new s8,r=e.featureIds;return o.featureCount=n,o.propertyTableId=t,o.setIndex=u8(r.attribute),o.positionalLabel=i,o}function m8(e,t){const n=new c8;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 _8(e,t,n,i){const o=new c8,r=e.featureIds;o.propertyTableId=t,o.featureCount=n,o.offset=g(r.constant,0);const s=g(r.divisor,0);return o.repeat=0===s?void 0:s,o.positionalLabel=i,o}function ege(e,t,n,i,o,r){const s=new a8;s.featureCount=n.featureCount,s.nullFeatureId=n.nullFeatureId,s.propertyTableId=n.propertyTable,s.label=n.label,s.positionalLabel=r;const a=n.texture;s.textureReader=$f(e,t,a,i,o,Hi.NEAREST);const u=(c(a.channels)?a.channels:[0]).map(function(d){return"rgba".charAt(d)}).join("");return s.textureReader.channels=u,s}function tge(e,t,n,i,o,r,s,a){const l=new a8,u=n.featureIds,d=u.texture;return l.featureCount=s,l.propertyTableId=i,l.textureReader=$f(e,t,d,o,r,Hi.NEAREST),l.textureReader.channels=u.channels,l.positionalLabel=a,l}function nge(e,t,n,i,o,r){const s=new f_e;for(const u in n)if(n.hasOwnProperty(u)){const m=f8(e,t,n[u],vL(e,ln,u),void 0,!1,i,r);s.attributes.push(m.attribute),o.attributePlans.push(m)}return s}function ige(e,t,n,i,o,r){const s=new h_e,a=new CL(s);e._primitiveLoadPlans.push(a);const l=n.material;c(l)&&(s.material=function J_e(e,t,n,i,o){const r=new I_e,s=g(n.extensions,g.EMPTY_OBJECT),a=s.KHR_materials_pbrSpecularGlossiness,l=n.pbrMetallicRoughness;if(r.unlit=c(s.KHR_materials_unlit),c(a)){const u=new D_e;r.specularGlossiness=u,c(a.diffuseTexture)&&(u.diffuseTexture=$f(e,t,a.diffuseTexture,i,o)),c(a.specularGlossinessTexture)&&c(a.specularGlossinessTexture)&&(u.specularGlossinessTexture=$f(e,t,a.specularGlossinessTexture,i,o)),u.diffuseFactor=Dl(fe,a.diffuseFactor),u.specularFactor=Dl(f,a.specularFactor),u.glossinessFactor=a.glossinessFactor,r.pbrSpecularGlossiness=a}else if(c(l)){const u=new v_e;c(l.baseColorTexture)&&(u.baseColorTexture=$f(e,t,l.baseColorTexture,i,o)),c(l.metallicRoughnessTexture)&&(u.metallicRoughnessTexture=$f(e,t,l.metallicRoughnessTexture,i,o)),u.baseColorFactor=Dl(fe,l.baseColorFactor),u.metallicFactor=l.metallicFactor,u.roughnessFactor=l.roughnessFactor,r.metallicRoughness=u}return c(n.emissiveTexture)&&(r.emissiveTexture=$f(e,t,n.emissiveTexture,i,o)),c(n.normalTexture)&&!e._loadForClassification&&(r.normalTexture=$f(e,t,n.normalTexture,i,o)),c(n.occlusionTexture)&&(r.occlusionTexture=$f(e,t,n.occlusionTexture,i,o)),r.emissiveFactor=Dl(f,n.emissiveFactor),r.alphaMode=n.alphaMode,r.alphaCutoff=n.alphaCutoff,r.doubleSided=n.doubleSided,r}(e,t,t.materials[l],o,r));const u=g(n.extensions,g.EMPTY_OBJECT);let d=!1;const h=u.CESIUM_primitive_outline;e._loadPrimitiveOutline&&c(h)&&(d=!0,a.needsOutlines=!0,a.outlineIndices=function oge(e,t,n){return mS(e,t,n.indices,!1)}(e,t,h));const m=e._loadForClassification,_=u.KHR_draco_mesh_compression;let p=!1;const y=n.attributes;if(c(y))for(const N in y)if(y.hasOwnProperty(N)){const R=y[N],B=vL(e,ln,N),F=B.modelSemantic;if(m&&!X_e(F))continue;F===ln.FEATURE_ID&&(p=!0);const S=f8(e,t,R,B,_,i,d,r);a.attributePlans.push(S),s.attributes.push(S.attribute)}const A=n.targets;if(c(A)&&!m){const N=A.length;for(let R=0;R{u.indexDatatype=C.indexDatatype,u.buffer=C.buffer,u.typedArray=C.typedArray};const D=new CL.IndicesLoadPlan(u);return D.loadBuffer=p,D.loadTypedArray=y,D}(e,t,x,_,p,d,r);c(N)&&(a.indicesPlan=N,s.indices=N.indices)}const C=u.EXT_structural_metadata,w=u.EXT_mesh_features,v=u.EXT_feature_metadata,D=c(v);c(w)?function rge(e,t,n,i,o,r){let s;s=c(i)&&c(i.featureIds)?i.featureIds:[];for(let a=0;ai)throw new E("The number of color attachments exceeds the number supported.");for(l=0;li)throw new E("The number of color attachments exceeds the number supported.");for(l=0;l=this._colorTextures.length)throw new E("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},Ou.prototype.getColorRenderbuffer=function(e){if(!c(e)||e<0||e>=this._colorRenderbuffers.length)throw new E("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},Ou.prototype.isDestroyed=function(){return!1},Ou.prototype.destroy=function(){if(this.destroyAttachments){let e=0;const t=this._colorTextures;let n=t.length;for(;e0&&(i|=n.COLOR_BUFFER_BIT),c(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)},Zy.prototype.isDestroyed=function(){return!1},Zy.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),Ye(this)};const Rge=Zy,gc={RGBA4:oe.RGBA4,RGBA8:oe.RGBA8,RGBA16F:oe.RGBA16F,RGBA32F:oe.RGBA32F,RGB5_A1:oe.RGB5_A1,RGB565:oe.RGB565,DEPTH_COMPONENT16:oe.DEPTH_COMPONENT16,STENCIL_INDEX8:oe.STENCIL_INDEX8,DEPTH_STENCIL:oe.DEPTH_STENCIL,DEPTH24_STENCIL8:oe.DEPTH24_STENCIL8,validate:function(e){return e===gc.RGBA4||e===gc.RGBA8||e===gc.RGBA16F||e===gc.RGBA32F||e===gc.RGB5_A1||e===gc.RGB565||e===gc.DEPTH_COMPONENT16||e===gc.STENCIL_INDEX8||e===gc.DEPTH_STENCIL||e===gc.DEPTH24_STENCIL8},getColorFormat:function(e){return e===oe.FLOAT?gc.RGBA32F:e===oe.HALF_FLOAT_OES?gc.RGBA16F:gc.RGBA8}},Qf=Object.freeze(gc);function hT(e){e=g(e,g.EMPTY_OBJECT),T.defined("options.context",e.context);const n=e.context._gl,i=mn.maximumRenderbufferSize,o=g(e.format,Qf.RGBA4),r=c(e.width)?e.width:n.drawingBufferWidth,s=c(e.height)?e.height:n.drawingBufferHeight,a=g(e.numSamples,1);if(!Qf.validate(o))throw new E("Invalid format.");if(T.typeOf.number.greaterThan("width",r,0),r>i)throw new E(`Width must be less than or equal to the maximum renderbuffer size (${i}). Check maximumRenderbufferSize.`);if(T.typeOf.number.greaterThan("height",s,0),s>i)throw new E(`Height must be less than or equal to the maximum renderbuffer size (${i}). Check maximumRenderbufferSize.`);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(hT.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),hT.prototype._getRenderbuffer=function(){return this._renderbuffer},hT.prototype.isDestroyed=function(){return!1},hT.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),Ye(this)};const D_=hT;function Zr(e){if(e=g(e,g.EMPTY_OBJECT),this._numSamples=g(e.numSamples,1),this._colorAttachmentsLength=g(e.colorAttachmentsLength,1),this._color=g(e.color,!0),this._depth=g(e.depth,!1),this._depthStencil=g(e.depthStencil,!1),this._supportsDepthTexture=g(e.supportsDepthTexture,!1),!this._color&&!this._depth&&!this._depthStencil)throw new E("Must enable at least one type of framebuffer attachment.");if(this._depth&&this._depthStencil)throw new E("Cannot have both a depth and depth-stencil attachment.");this._createColorAttachments=g(e.createColorAttachments,!0),this._createDepthAttachments=g(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(Zr.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}}}),Zr.prototype.isDirty=function(e,t,n,i,o){n=g(n,1);const r=this._width!==e||this._height!==t,s=this._numSamples!==n,a=c(i)&&this._pixelDatatype!==i||c(o)&&this._pixelFormat!==o,l=c(1===n?this._framebuffer:this._multisampleFramebuffer);return this._attachmentsDirty||r||s||a||!l||this._color&&!c(this._colorTextures[0])},Zr.prototype.update=function(e,t,n,i,o,r){if(!c(t)||!c(n))throw new E("width and height must be defined.");if(i=e.msaa?g(i,1):1,o=g(o,this._color?g(this._pixelDatatype,bt.UNSIGNED_BYTE):void 0),r=g(r,this._color?g(this._pixelFormat,vt.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){const a=Qf.getColorFormat(o);this._colorRenderbuffers[s]=new D_({context:e,width:t,height:n,format:a,numSamples:this._numSamples})}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new jn({context:e,width:t,height:n,pixelFormat:vt.DEPTH_STENCIL,pixelDatatype:bt.UNSIGNED_INT_24_8,sampler:Hi.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new D_({context:e,width:t,height:n,format:Qf.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new D_({context:e,width:t,height:n,format:Qf.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new jn({context:e,width:t,height:n,pixelFormat:vt.DEPTH_COMPONENT,pixelDatatype:bt.UNSIGNED_INT,sampler:Hi.NEAREST}):this._depthRenderbuffer=new D_({context:e,width:t,height:n,format:Qf.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new Rge({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 Kf({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}},Zr.prototype.getColorTexture=function(e){if((e=g(e,0))>=this._colorAttachmentsLength)throw new E("index must be smaller than total number of color attachments.");return this._colorTextures[e]},Zr.prototype.setColorTexture=function(e,t){if(t=g(t,0),this._createColorAttachments)throw new E("createColorAttachments must be false if setColorTexture is called.");if(t>=this._colorAttachmentsLength)throw new E("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e},Zr.prototype.getColorRenderbuffer=function(e){if((e=g(e,0))>=this._colorAttachmentsLength)throw new E("index must be smaller than total number of color attachments.");return this._colorRenderbuffers[e]},Zr.prototype.setColorRenderbuffer=function(e,t){if(t=g(t,0),this._createColorAttachments)throw new E("createColorAttachments must be false if setColorRenderbuffer is called.");if(t>=this._colorAttachmentsLength)throw new E("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e},Zr.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer},Zr.prototype.setDepthRenderbuffer=function(e){if(this._createDepthAttachments)throw new E("createDepthAttachments must be false if setDepthRenderbuffer is called.");this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e},Zr.prototype.getDepthTexture=function(){return this._depthTexture},Zr.prototype.setDepthTexture=function(e){if(this._createDepthAttachments)throw new E("createDepthAttachments must be false if setDepthTexture is called.");this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e},Zr.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer},Zr.prototype.setDepthStencilRenderbuffer=function(e){if(this._createDepthAttachments)throw new E("createDepthAttachments must be false if setDepthStencilRenderbuffer is called.");this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e},Zr.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture},Zr.prototype.setDepthStencilTexture=function(e){if(this._createDepthAttachments)throw new E("createDepthAttachments must be false if setDepthStencilTexture is called.");this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e},Zr.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)},Zr.prototype.clear=function(e,t,n){const i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i},Zr.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()},Zr.prototype.destroy=function(){if(this._color){let e;const t=this._colorTextures.length;for(e=0;e=s.clientWidth)u=!0;else{if(w.x>.5*s.clientWidth){a.width=w.x,l.frustum.right=m.x-x,Ta=pT(r,n,l,Ta),qs.clipToGLWindowCoordinates(a,Ta,RL),a.x+=w.x,l.position.x=-l.position.x;const v=l.frustum.right;l.frustum.right=-l.frustum.left,l.frustum.left=-v,Ta=pT(r,n,l,Ta),qs.clipToGLWindowCoordinates(a,Ta,NL)}else{a.x+=w.x,a.width-=w.x,l.frustum.left=-m.x-x,Ta=pT(r,n,l,Ta),qs.clipToGLWindowCoordinates(a,Ta,RL),a.x=a.x-a.width,l.position.x=-l.position.x;const v=l.frustum.left;l.frustum.left=-l.frustum.right,l.frustum.right=-v,Ta=pT(r,n,l,Ta),qs.clipToGLWindowCoordinates(a,Ta,NL)}f.clone(_,l.position),l.frustum=p.clone(),((i=G.clone(RL,i)).x<0||i.x>s.clientWidth)&&(i.x=NL.x)}}if(o.mode!==ce.SCENE2D||u){if(Ta=pT(r,n,l,Ta),Ta.z<0&&!(l.frustum instanceof $n)&&!(l.frustum instanceof qa))return;i=qs.clipToGLWindowCoordinates(a,Ta,i)}return i.y=s.clientHeight-i.y,i},qs.wgs84ToDrawingBufferCoordinates=function(e,t,n){if(n=qs.wgs84ToWindowCoordinates(e,t,n),c(n))return qs.transformWindowToDrawingBuffer(e,n,n)};const Jf=new f,jge=new Se;qs.computeActualWgs84Position=function(e,t,n){const i=e.mode;if(i===ce.SCENE3D)return f.clone(t,n);const o=e.mapProjection,r=o.ellipsoid.cartesianToCartographic(t,jge);if(!c(r))return;if(o.project(r,Jf),i===ce.COLUMBUS_VIEW)return f.fromElements(Jf.z,Jf.x,Jf.y,n);if(i===ce.SCENE2D)return f.fromElements(0,Jf.x,Jf.y,n);const s=e.morphTime;return f.fromElements(O.lerp(Jf.z,t.x,s),O.lerp(Jf.x,t.y,s),O.lerp(Jf.y,t.z,s),n)};const x8=new f,C8=new f,E8=new k;qs.clipToGLWindowCoordinates=function(e,t,n){return f.divideByScalar(t,t.w,x8),k.computeViewportTransformation(e,0,1,E8),k.multiplyByPoint(E8,x8,C8),G.fromCartesian3(C8,n)},qs.transformWindowToDrawingBuffer=function(e,t,n){const i=e.canvas;return G.fromElements(t.x*(e.drawingBufferWidth/i.clientWidth),t.y*(e.drawingBufferHeight/i.clientHeight),n)};const Wge=new fe,w8=new fe;qs.drawingBufferToWgs84Coordinates=function(e,t,n,i){const r=e.context.uniformState,s=r.currentFrustum,a=s.x,l=s.y;e.frameState.useLogDepth&&(n=l*(1-a/(Math.pow(2,n*r.log2FarDepthFromNearPlusOne)-1+a))/(l-a));const u=e.view.passState.viewport,d=fe.clone(fe.UNIT_W,Wge);d.x=(t.x-u.x)/u.width*2-1,d.y=(t.y-u.y)/u.height*2-1,d.z=2*n-1,d.w=1;let h,m=e.camera.frustum;if(c(m.fovy))h=k.multiplyByVector(r.inverseViewProjection,d,w8),f.multiplyByScalar(h,1/h.w,h);else{const _=m.offCenterFrustum;c(_)&&(m=_),h=w8,h.x=.5*(d.x*(m.right-m.left)+m.left+m.right),h.y=.5*(d.y*(m.top-m.bottom)+m.bottom+m.top),h.z=.5*(d.z*(a-l)-a-l),h.w=1,h=k.multiplyByVector(r.inverseView,h,h)}return f.fromCartesian4(h,i)};const Ur=qs,jc={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3,NUMBER_OF_SHADOW_MODES:4,castShadows:function(e){return e===jc.ENABLED||e===jc.CAST_ONLY},receiveShadows:function(e){return e===jc.ENABLED||e===jc.RECEIVE_ONLY},fromCastReceive:function(e,t){return e&&t?jc.ENABLED:e?jc.CAST_ONLY:t?jc.RECEIVE_ONLY:jc.DISABLED}},$o=Object.freeze(jc),I_=Object.freeze({LEFT:-1,NONE:0,RIGHT:1}),Ky={};Ky._deprecationWarning=kf;const eh=Uint32Array.BYTES_PER_ELEMENT;Ky.parse=function(e,t){const n=g(t,0);T.defined("arrayBuffer",e),t=n;const i=new Uint8Array(e),o=new DataView(e),r=o.getUint32(t+=eh,!0);if(1!==r)throw new Ie(`Only Batched 3D Model version 1 is supported. Version ${r} is not.`);const s=o.getUint32(t+=eh,!0);let h,m,a=o.getUint32(t+=eh,!0),l=o.getUint32(t+=eh,!0),u=o.getUint32(t+=eh,!0),d=o.getUint32(t+=eh,!0);t+=eh,u>=570425344?(t-=2*eh,h=a,u=l,d=0,a=0,l=0,Ky._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.")):d>=570425344&&(t-=eh,h=u,u=a,d=l,a=0,l=0,Ky._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.")),0===a?m={BATCH_LENGTH:g(h,0)}:(m=fc(i,t,a),t+=a);const _=new Uint8Array(e,t,l);let p,y;t+=l,u>0&&(p=fc(i,t,u),t+=u,d>0&&(y=new Uint8Array(e,t,d),y=new Uint8Array(y),t+=d));const A=n+s-t;if(0===A)throw new Ie("glTF byte length must be greater than 0.");let x;return t%4==0?x=new Uint8Array(e,t,A):(Ky._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),x=new Uint8Array(i.subarray(t,t+A))),{batchLength:h,featureTableJson:m,featureTableBinary:_,batchTableJson:p,batchTableBinary:y,gltf:x}};const qge=Ky;function mT(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function S8(e,t,n,i,o,r){const s=e._cachedTypedArrays;let a=s[t];return c(a)||(a=ee.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+r,o*i),s[t]=a),a}mT.prototype.getGlobalProperty=function(e,t,n){const i=this.json[e];if(c(i))return c(i.byteOffset)?S8(this,e,t=g(t,ee.UNSIGNED_INT),n=g(n,1),1,i.byteOffset):i},mT.prototype.hasProperty=function(e){return c(this.json[e])},mT.prototype.getPropertyArray=function(e,t,n){const i=this.json[e];if(c(i))return c(i.byteOffset)?(c(i.componentType)&&(t=ee.fromName(i.componentType)),S8(this,e,t,n,this.featuresLength,i.byteOffset)):function Yge(e,t,n,i){const o=e._cachedTypedArrays;let r=o[t];return c(r)||(r=ee.createTypedArray(n,i),o[t]=r),r}(this,e,t,i)},mT.prototype.getProperty=function(e,t,n,i,o){if(!c(this.json[e]))return;const s=this.getPropertyArray(e,t,n);if(1===n)return s[i];for(let a=0;a0&&(p=fc(i,t,u),t+=u,d>0&&(y=new Uint8Array(e,t,d),y=new Uint8Array(y),t+=d));const A=n+s-t;if(0===A)throw new Ie("glTF byte length must be greater than 0.");let x;return t%4==0?x=new Uint8Array(e,t,A):(TS._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),x=new Uint8Array(i.subarray(t,t+A))),{gltfFormat:h,featureTableJson:m,featureTableBinary:_,batchTableJson:p,batchTableBinary:y,gltf:x}};const _ye=TS,xS=bn.Attribute,gye=bn.FeatureIdAttribute,O8=bn.Instances;function nh(e){const t=(e=g(e,g.EMPTY_OBJECT)).i3dmResource,n=e.arrayBuffer;let i=e.baseResource;const o=g(e.byteOffset,0),r=g(e.releaseGltfJson,!1),s=g(e.asynchronous,!0),a=g(e.incrementallyLoadTextures,!0),l=g(e.upAxis,Ss.Y),u=g(e.forwardAxis,Ss.X),d=g(e.loadAttributesAsTypedArray,!1),h=g(e.loadIndicesForWireframe,!1),m=g(e.loadPrimitiveOutline,!0);T.typeOf.object("options.i3dmResource",t),T.typeOf.object("options.arrayBuffer",n),i=c(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=l,this._forwardAxis=u,this._loadAttributesAsTypedArray=d,this._loadIndicesForWireframe=h,this._loadPrimitiveOutline=m,this._state=0,this._promise=void 0,this._gltfLoader=void 0,this._buffers=[],this._components=void 0,this._transform=k.IDENTITY,this._batchTable=void 0,this._featureTable=void 0,this._instancesLength=0}c(Object.create)&&((nh.prototype=Object.create(Ya.prototype)).constructor=nh),Object.defineProperties(nh.prototype,{texturesLoaded:{get:function(){return this._gltfLoader?.texturesLoaded}},cacheKey:{get:function(){}},components:{get:function(){return this._components}}}),nh.prototype.load=function(){if(c(this._promise))return this._promise;const e=_ye.parse(this._arrayBuffer,this._byteOffset),i=e.batchTableJson,o=e.batchTableBinary,r=e.gltfFormat,s=new bS(e.featureTableJson,e.featureTableBinary);this._featureTable=s;const a=s.getGlobalProperty("INSTANCES_LENGTH");if(s.featuresLength=a,!c(a))throw new Ie("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=a;const l=s.getGlobalProperty("RTC_CENTER",ee.FLOAT,3);c(l)&&(this._transform=k.fromTranslation(f.fromArray(l))),this._batchTable={json:i,binary:o};const u={upAxis:this._upAxis,forwardAxis:this._forwardAxis,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline};if(0===r){let h=Ty(e.gltf);h=h.replace(/[\s\0]+$/,"");const m=this._baseResource.getDerivedResource({url:h});u.gltfResource=m,u.baseResource=m}else u.gltfResource=this._i3dmResource,u.typedArray=e.gltf;const d=new IL(u);return this._gltfLoader=d,this._state=1,this._promise=d.load().then(()=>{if(!this.isDestroyed())return this._state=2,this}).catch(h=>{if(!this.isDestroyed())throw function yye(e,t){e.unload(),e._state=5;return e.getError("Failed to load i3dm",t)}(this,h)}),this._promise},nh.prototype.process=function(e){if(T.typeOf.object("frameState",e),4===this._state)return!0;const t=this._gltfLoader;let n=!1;if(2===this._state&&(n=t.process(e)),!n)return!1;const i=t.components;return i.transform=k.multiplyTransformation(this._transform,i.transform,i.transform),function Tye(e,t,n){let i;const o=e._featureTable,r=e._instancesLength;if(0===r)return;const s=o.getGlobalProperty("RTC_CENTER",ee.FLOAT,3),a=o.getGlobalProperty("EAST_NORTH_UP"),l=o.hasProperty("NORMAL_UP")||o.hasProperty("NORMAL_UP_OCT32P")||a,u=o.hasProperty("SCALE")||o.hasProperty("SCALE_NON_UNIFORM"),d=function Cye(e,t){if(e.hasProperty("POSITION"))return e.getPropertyArray("POSITION",ee.FLOAT,3);if(e.hasProperty("POSITION_QUANTIZED")){const n=e.getPropertyArray("POSITION_QUANTIZED",ee.UNSIGNED_SHORT,3),i=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",ee.FLOAT,3);if(!c(i))throw new Ie("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");const o=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",ee.FLOAT,3);if(!c(o))throw new Ie("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const r=new Float32Array(n.length);for(let s=0;s0&&(W.instances=j?xye(B):B,j=!0)}}(this,i,e),function bye(e,t){const n=e._batchTable,i=e._instancesLength;if(0===i)return;let o;if(c(n.json))o=ML({count:i,batchTable:n.json,binaryBody:n.binary});else{const r=new Yy({name:rS.BATCH_TABLE_CLASS_NAME,count:i});o=new v_({schema:{},propertyTables:[r]})}t.structuralMetadata=o}(this,i),this._components=i,this._arrayBuffer=void 0,this._state=4,!0};const CS=new f,kL=new Array(4),Aye=new k;function xye(e){const t=new O8;t.transformInWorldSpace=e.transformInWorldSpace;const n=e.attributes,i=n.length;for(let o=0;on[i-1])throw new E("time is out of range.");if(e>=n[t=g(t,0)]){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},Jy.prototype.clampTime=function(e){T.typeOf.number("time",e);const t=this.times;return O.clamp(e,t[0],t[t.length-1])};const zr=Jy;function e0(e){this._value=e,this._valueType=zr.getPointType(e)}Object.defineProperties(e0.prototype,{value:{get:function(){return this._value}}}),e0.prototype.findTimeInterval=function(e){throw new E("findTimeInterval cannot be called on a ConstantSpline.")},e0.prototype.wrapTime=function(e){return T.typeOf.number("time",e),0},e0.prototype.clampTime=function(e){return T.typeOf.number("time",e),0},e0.prototype.evaluate=function(e,t){T.typeOf.number("time",e);const n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};const Dye=e0;function t0(e){const t=(e=g(e,g.EMPTY_OBJECT)).points,n=e.times;if(!c(t)||!c(n))throw new E("points and times are required.");if(t.length<2)throw new E("points.length must be greater than or equal to 2.");if(n.length!==t.length)throw new E("times.length must be equal to points.length.");this._times=n,this._points=t,this._pointType=zr.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(t0.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),t0.prototype.findTimeInterval=zr.prototype.findTimeInterval,t0.prototype.wrapTime=zr.prototype.wrapTime,t0.prototype.clampTime=zr.prototype.clampTime,t0.prototype.evaluate=function(e,t){const 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]:(c(t)||(t=new f),f.lerp(n[o],n[o+1],r,t))};const UL=t0,R8={solve:function(e,t,n,i){if(!(c(e)&&e instanceof Array))throw new E("The array lower is required.");if(!(c(t)&&t instanceof Array))throw new E("The array diagonal is required.");if(!(c(n)&&n instanceof Array))throw new E("The array upper is required.");if(!(c(i)&&i instanceof Array))throw new E("The array right is required.");if(t.length!==i.length)throw new E("diagonal and right must have the same lengths.");if(e.length!==n.length)throw new E("lower and upper must have the same lengths.");if(e.length!==t.length-1)throw new E("lower and upper must be one less than the length of diagonal.");const o=new Array(n.length),r=new Array(i.length),s=new Array(i.length);let a,l;for(a=0;a=0;--a)s[a]=f.subtract(r[a],f.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s}},N8=R8,M8=[],F8=[],B8=[],k8=[];function yc(e){const t=(e=g(e,g.EMPTY_OBJECT)).points,n=e.times,i=e.inTangents,o=e.outTangents;if(!(c(t)&&c(n)&&c(i)&&c(o)))throw new E("times, points, inTangents, and outTangents are required.");if(t.length<2)throw new E("points.length must be greater than or equal to 2.");if(n.length!==t.length)throw new E("times.length must be equal to points.length.");if(i.length!==o.length||i.length!==t.length-1)throw new E("inTangents and outTangents must have a length equal to points.length - 1.");if(this._times=n,this._points=t,this._pointType=zr.getPointType(t[0]),this._pointType!==zr.getPointType(i[0])||this._pointType!==zr.getPointType(o[0]))throw new E("inTangents and outTangents must be of the same type as points.");this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(yc.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}}),yc.createC1=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).times,n=e.points,i=e.tangents;if(!c(n)||!c(t)||!c(i))throw new E("points, times and tangents are required.");if(n.length<2)throw new E("points.length must be greater than or equal to 2.");if(t.length!==n.length||t.length!==i.length)throw new E("times, points and tangents must have the same length.");const o=i.slice(0,i.length-1);return new yc({times:t,points:n,inTangents:i.slice(1,i.length),outTangents:o})},yc.createNaturalCubic=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).times,n=e.points;if(!c(n)||!c(t))throw new E("points and times are required.");if(n.length<2)throw new E("points.length must be greater than or equal to 2.");if(t.length!==n.length)throw new E("times.length must be equal to points.length.");if(n.length<3)return new UL({points:n,times:t});const i=function Pye(e){const t=M8,n=B8,i=F8,o=k8;let r;t.length=n.length=e.length-1,i.length=o.length=e.length,t[0]=n[0]=1,i[0]=2;let s=o[0];for(c(s)||(s=o[0]=new f),f.subtract(e[1],e[0],s),f.multiplyByScalar(s,3,s),r=1;r=n.length||e.index<0))throw new E("options.index must be a valid animation index.");let i=e.index;if(c(i))return GL(this,n[i],e);const o=n.length;for(let r=0;r=this._runtimeAnimations.length||e<0)throw new E("index must be valid within the range of the collection");return this._runtimeAnimations[e]};const ES=[];function Hye(e,t,n){return function(){e.animationRemoved.raiseEvent(t,n)}}ih.prototype.update=function(e){const t=this._runtimeAnimations;let n=t.length;if(0===n)return this._previousTime=void 0,!1;if(!this.animateWhilePaused&&se.equals(e.time,this._previousTime))return!1;this._previousTime=se.clone(e.time,this._previousTime);let i=!1;const o=e.time,r=this._model;for(let s=0;s0&&e.afterRender.push(a._raiseStartEvent)),a.loop===S_.REPEAT)_-=Math.floor(_);else if(a.loop===S_.MIRRORED_REPEAT){const x=Math.floor(_),C=_-x;_=x%2==1?1-C:C}a.reverse&&(_=1-_);let A=_*u*a.multiplier;A=O.clamp(A,a.localStartTime,a.localStopTime),a.animate(A),a.update.numberOfListeners>0&&(a._updateEventTime=A,e.afterRender.push(a._raiseUpdateEvent)),i=!0,y||(a._state=Qy.STOPPED,a.stop.numberOfListeners>0&&e.afterRender.push(a._raiseStopEvent),a.removeOnStop&&ES.push(a))}}n=ES.length;for(let s=0;ss||o<-s&&r>-s}function s0(e,t){if(!c(t))return;const n=oh.clone(t),i=Zt.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 l0e(e){const t=Zt.shallowClone(e);t.pass=ze.TRANSLUCENT;const n=zt(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=Ji.ALPHA_BLEND,t.renderState=Pt.fromCache(n),t}function u0e(e,t){const n=t._silhouetteId%255,i=Zt.shallowClone(e),o=zt(e.renderState,!0);return o.stencilTest={enabled:!0,frontFunction:oe.ALWAYS,backFunction:oe.ALWAYS,reference:n,mask:-1,frontOperation:{fail:oe.KEEP,zFail:oe.KEEP,zPass:oe.REPLACE},backOperation:{fail:oe.KEEP,zFail:oe.KEEP,zPass:oe.REPLACE}},t.isInvisible()&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),i.renderState=Pt.fromCache(o),i}function d0e(e,t){const n=t._silhouetteId%255,i=Zt.shallowClone(e),o=zt(e.renderState,!0);o.cull.enabled=!1,(e.pass===ze.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=ze.TRANSLUCENT,o.depthMask=!1,o.blending=Ji.ALPHA_BLEND),o.stencilTest={enabled:!0,frontFunction:oe.NOTEQUAL,backFunction:oe.NOTEQUAL,reference:n,mask:-1,frontOperation:{fail:oe.KEEP,zFail:oe.KEEP,zPass:oe.KEEP},backOperation:{fail:oe.KEEP,zFail:oe.KEEP,zPass:oe.KEEP}};const s=zt(e.uniformMap);return s.model_silhouettePass=function(){return!0},i.renderState=Pt.fromCache(o),i.uniformMap=s,i.castShadows=!1,i.receiveShadows=!1,i}function m0e(e){const t=Zt.shallowClone(e),n=zt(e.renderState,!0);n.cull.enabled=!0,n.cull.face=dr.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5};const i=zt(t.uniformMap),o=new G(5,5);return i.u_polygonOffset=function(){return o},t.renderState=Pt.fromCache(n),t.uniformMap=i,t.castShadows=!1,t.receiveShadows=!1,t}function _0e(e){const t=Zt.shallowClone(e),n=zt(e.renderState,!0),{stencilTest:i}=n;return i.enabled=!0,i.mask=Tn.SKIP_LOD_MASK,i.reference=Tn.CESIUM_3D_TILE_MASK,i.frontFunction=Bi.GREATER_OR_EQUAL,i.frontOperation.zPass=Xt.REPLACE,i.backFunction=Bi.GREATER_OR_EQUAL,i.backOperation.zPass=Xt.REPLACE,n.stencilMask=Tn.CESIUM_3D_TILE_MASK|Tn.SKIP_LOD_MASK,t.renderState=Pt.fromCache(n),t}oh.clone=function(e){return new oh({command:e.command,updateShadows:e.updateShadows,updateBackFaceCulling:e.updateBackFaceCulling,updateCullFace:e.updateCullFace,updateDebugShowBoundingVolume:e.updateDebugShowBoundingVolume,is2D:e.is2D,derivedCommand2D:e.derivedCommand2D})},Object.defineProperties(wS.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},model:{get:function(){return this._model}},primitiveType:{get:function(){return this._command.primitiveType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=k.clone(e,this._modelMatrix),this._modelMatrix2DDirty=!0,this._boundingVolume=be.transform(this.runtimePrimitive.boundingSphere,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},shadows:{get:function(){return this._shadows},set:function(e){this._shadows=e,function o0e(e){const t=e.shadows,n=$o.castShadows(t),i=$o.receiveShadows(t),o=e._derivedCommands;for(let r=0;r>>Tn.SKIP_LOD_BIT_SHIFT}(o);if(r!==s){const a=function p0e(e){return Tn.CESIUM_3D_TILE_MASK|e< 0.0 && clipDistance < clippingPlanesEdgeWidth) {\n color = clippingPlanesEdgeColor;\n }\n}\n"),e.uniformMap=Gn({model_clippingPlanes:function(){return i.texture},model_clippingPlanesEdgeStyle:function(){const l=X.clone(i.edgeColor);return l.alpha=i.edgeWidth,l},model_clippingPlanesMatrix:function(){return t._clippingPlanesMatrix}},e.uniformMap)};const N0e=q8;function Y8(e,t){T.typeOf.object("model",e),T.typeOf.object("runtimeNode",t),this._model=e,this._runtimeNode=t}Object.defineProperties(Y8.prototype,{name:{get:function(){return this._runtimeNode._name}},id:{get:function(){return this._runtimeNode._id}},show:{get:function(){return this._runtimeNode.show},set:function(e){this._runtimeNode.show=e}},matrix:{get:function(){return this._runtimeNode.transform},set:function(e){c(e)?(this._runtimeNode.transform=e,this._runtimeNode.userAnimated=!0,this._model._userAnimationDirty=!0):(this._runtimeNode.transform=this.originalMatrix,this._runtimeNode.userAnimated=!1)}},originalMatrix:{get:function(){return this._runtimeNode.originalTransform}}});const M0e=Y8,F0e=new f(1,1,1),B0e=f.ZERO,k0e=yt.IDENTITY;function X8(e,t,n){this.translation=f.clone(g(e,B0e)),this.rotation=yt.clone(g(t,k0e)),this.scale=f.clone(g(n,F0e))}X8.prototype.equals=function(e){return this===e||c(e)&&f.equals(this.translation,e.translation)&&yt.equals(this.rotation,e.rotation)&&f.equals(this.scale,e.scale)};const ZL=X8,vS=new k,H0e=new k,G0e=new k,Z8={name:"InstancingPipelineStage",_getInstanceTransformsAsMatrices:e5,_transformsToTypedArray:$L,process:function(e,t,n){const i=t.instances,o=i.attributes[0].count,r=e.shaderBuilder;r.addDefine("HAS_INSTANCING"),r.addVertexLines("mat4 getInstancingTransform()\n{\n mat4 instancingTransform;\n\n #ifdef HAS_INSTANCE_MATRICES\n instancingTransform = mat4(\n a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0, // Column 1\n a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0, // Column 2\n a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0, // Column 3\n a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0 // Column 4\n );\n #else\n vec3 translation = vec3(0.0, 0.0, 0.0);\n vec3 scale = vec3(1.0, 1.0, 1.0);\n \n #ifdef HAS_INSTANCE_TRANSLATION\n translation = a_instanceTranslation;\n #endif\n #ifdef HAS_INSTANCE_SCALE\n scale = a_instanceScale;\n #endif\n\n instancingTransform = mat4(\n scale.x, 0.0, 0.0, 0.0,\n 0.0, scale.y, 0.0, 0.0,\n 0.0, 0.0, scale.z, 0.0,\n translation.x, translation.y, translation.z, 1.0\n ); \n #endif\n\n return instancingTransform;\n}\n\n#ifdef USE_2D_INSTANCING\nmat4 getInstancingTransform2D()\n{\n mat4 instancingTransform2D;\n\n #ifdef HAS_INSTANCE_MATRICES\n instancingTransform2D = mat4(\n a_instancingTransform2DRow0.x, a_instancingTransform2DRow1.x, a_instancingTransform2DRow2.x, 0.0, // Column 1\n a_instancingTransform2DRow0.y, a_instancingTransform2DRow1.y, a_instancingTransform2DRow2.y, 0.0, // Column 2\n a_instancingTransform2DRow0.z, a_instancingTransform2DRow1.z, a_instancingTransform2DRow2.z, 0.0, // Column 3\n a_instancingTransform2DRow0.w, a_instancingTransform2DRow1.w, a_instancingTransform2DRow2.w, 1.0 // Column 4\n );\n #else\n vec3 translation2D = vec3(0.0, 0.0, 0.0);\n vec3 scale = vec3(1.0, 1.0, 1.0);\n \n #ifdef HAS_INSTANCE_TRANSLATION\n translation2D = a_instanceTranslation2D;\n #endif\n #ifdef HAS_INSTANCE_SCALE\n scale = a_instanceScale;\n #endif\n\n instancingTransform2D = mat4(\n scale.x, 0.0, 0.0, 0.0,\n 0.0, scale.y, 0.0, 0.0,\n 0.0, 0.0, scale.z, 0.0,\n translation2D.x, translation2D.y, translation2D.z, 1.0\n ); \n #endif\n\n return instancingTransform2D;\n}\n#endif\n");const s=e.model,a=s.sceneGraph,l=e.runtimeNode,u=n.mode!==ce.SCENE3D&&!n.scene3DOnly&&s._projectTo2D,d=[];(function obe(e,t,n,i,o){const r=hi.getAttributeBySemantic(n,Aa.ROTATION);c(r)?function rbe(e,t,n,i,o){const s=t.attributes[0].count,a=e.model,l=e.runtimeNode;e.shaderBuilder.addDefine("HAS_INSTANCE_MATRICES");let d,h=l.instancingTransformsBuffer;if(c(h)||(d=e5(t,s,e),h=KL($L(d),i),a._modelResources.push(h),l.instancingTransformsBuffer=h),t5(e,h,n,"Transform"),!o)return;const m=zt(i);m.mode=ce.COLUMBUS_VIEW,J8(e,m);let _=l.instancingTransformsBuffer2D;if(!c(_)){const y=function Z0e(e,t,n,i){const o=K8,r=Q8;$8(t,o,r);const a=t.runtimeNode.instancingReferencePoint2D,l=e.length;for(let u=0;u=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:a.buffer,componentsPerAttribute:Wn.getNumberOfComponents(a.type),componentDatatype:a.componentDatatype,normalize:!1,offsetInBytes:a.byteOffset,strideInBytes:a.byteStride,instanceDivisor:1}),r.addAttribute("float",`a_instanceFeatureId_${a.setIndex}`))}}(e,0,i,d);const h={};if(i.transformInWorldSpace?(r.addDefine("USE_LEGACY_INSTANCING",void 0,Oe.VERTEX),r.addUniform("mat4","u_instance_modifiedModelView",Oe.VERTEX),r.addUniform("mat4","u_instance_nodeTransform",Oe.VERTEX),h.u_instance_modifiedModelView=function(){let m=k.multiplyTransformation(s.modelMatrix,a.components.transform,vS);return u?k.multiplyTransformation(n.context.uniformState.view3D,m,vS):(n.mode!==ce.SCENE3D&&(m=Rn.basisTo2D(n.mapProjection,m,vS)),k.multiplyTransformation(n.context.uniformState.view,m,vS))},h.u_instance_nodeTransform=function(){return k.multiplyTransformation(a.axisCorrectionMatrix,l.computedTransform,H0e)},r.addVertexLines("void legacyInstancingStage(\n inout ProcessedAttributes attributes,\n out mat4 instanceModelView,\n out mat3 instanceModelViewInverseTranspose)\n{\n vec3 positionMC = attributes.positionMC;\n\n mat4 instancingTransform = getInstancingTransform();\n \n mat4 instanceModel = instancingTransform * u_instance_nodeTransform;\n instanceModelView = u_instance_modifiedModelView;\n instanceModelViewInverseTranspose = mat3(u_instance_modifiedModelView * instanceModel);\n\n attributes.positionMC = (instanceModel * vec4(positionMC, 1.0)).xyz;\n \n #ifdef USE_2D_INSTANCING\n mat4 instancingTransform2D = getInstancingTransform2D();\n attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;\n #endif\n}\n")):r.addVertexLines("void instancingStage(inout ProcessedAttributes attributes) \n{\n vec3 positionMC = attributes.positionMC;\n \n mat4 instancingTransform = getInstancingTransform();\n \n attributes.positionMC = (instancingTransform * vec4(positionMC, 1.0)).xyz;\n\n #ifdef HAS_NORMALS\n vec3 normalMC = attributes.normalMC;\n attributes.normalMC = (instancingTransform * vec4(normalMC, 0.0)).xyz;\n #endif\n\n #ifdef USE_2D_INSTANCING\n mat4 instancingTransform2D = getInstancingTransform2D();\n attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;\n #endif\n}\n"),u){r.addDefine("USE_2D_INSTANCING",void 0,Oe.VERTEX),r.addUniform("mat4","u_modelView2D",Oe.VERTEX);const m=n.context,_=k.fromTranslation(l.instancingReferencePoint2D,new k);h.u_modelView2D=function(){return k.multiplyTransformation(m.uniformState.view,_,G0e)}}e.uniformMap=Gn(h,e.uniformMap),e.instanceCount=o,e.attributes.push.apply(e.attributes,d)}},AT=new k,j0e=new f;function W0e(e,t,n,i,o){let r=k.multiplyTransformation(t,e,AT);return r=k.multiplyTransformation(r,n,AT),Rn.basisTo2D(i.mapProjection,r,o)}function q0e(e,t,n,i,o){const r=k.fromTranslation(e,AT);let s=k.multiplyTransformation(t,r,AT);s=k.multiplyTransformation(s,n,AT);const a=k.getTranslation(s,j0e);return Ur.computeActualWgs84Position(i,a,o)}function $8(e,t,n){const i=e.model,o=i.sceneGraph;e.runtimeNode.node.instances.transformInWorldSpace?(t=k.multiplyTransformation(i.modelMatrix,o.components.transform,t),n=k.multiplyTransformation(o.axisCorrectionMatrix,e.runtimeNode.computedTransform,n)):(t=k.clone(o.computedModelMatrix,t),t=k.multiplyTransformation(t,e.runtimeNode.computedTransform,t),n=k.clone(k.IDENTITY,n))}const K8=new k,Q8=new k,Y0e=new k,X0e=new f,K0e=new f,Q0e=new f;function J8(e,t){const n=e.runtimeNode,i=e.model.sceneGraph.computedModelMatrix,o=k.multiplyByPoint(i,n.instancingTranslationMin,K0e),r=Ur.computeActualWgs84Position(t,o,o),s=k.multiplyByPoint(i,n.instancingTranslationMax,Q0e),a=Ur.computeActualWgs84Position(t,s,s);n.instancingReferencePoint2D=f.lerp(r,a,.5,new f)}function $L(e){const n=e.length,i=new Float32Array(12*n);for(let o=0;o=this.children.length)throw new E("index must be greater than or equal to 0 and less than the number of children.");return this.sceneGraph._runtimeNodes[this.children[e]]},c0.prototype.configurePipeline=function(){const e=this.node,t=this.pipelineStages;t.length=0;const n=this.updateStages;n.length=0,c(e.instances)&&t.push(cbe),t.push(ube),n.push(lbe)},c0.prototype.updateComputedTransform=function(){this._computedTransform=k.multiply(this._transformToRoot,this._transform,this._computedTransform)},c0.prototype.updateJointMatrices=function(){const e=this._runtimeSkin;if(!c(e))return;e.updateJointMatrices();const t=this._computedJointMatrices,n=e.jointMatrices,i=n.length;for(let o=0;o1&&(i.addDefine("MULTILINE_BATCH_TEXTURE"),i.addUniform("vec2","model_textureDimensions"),o.model_textureDimensions=function(){return l.textureDimensions}),e.uniformMap=Gn(o,e.uniformMap)}},pbe=a5,c5={name:"ClassificationPipelineStage",process:function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,Oe.BOTH);const o=e.runtimePrimitive;c(o.batchLengths)||function mbe(e,t){const n=hi.getAttributeBySemantic(e,ln.POSITION);if(!c(n))throw new Ie("Primitives must have a position attribute to be used for classification.");let i;const o=e.indices,r=c(o);r&&(i=o.typedArray,o.typedArray=void 0);const s=r?o.count:n.count,a=hi.getAttributeBySemantic(e,ln.FEATURE_ID,0);if(!c(a))return t.batchLengths=[s],void(t.batchOffsets=[0]);const l=a.typedArray;a.typedArray=void 0;const u=[],d=[0];let m=l[r?i[0]:0],_=0;for(let y=1;yfunction Mbe(e,t,n){const{getAttributeByName:i,getAttributeInfo:o,sanitizeGlslIdentifier:r}=hi,s=e.class.id,a=n?.classes[s],l=Object.entries(e.properties),u=new Array(l.length);for(let d=0;dfunction Bbe(e,t){const{sanitizeGlslIdentifier:n}=hi,i=e.class.id,o=t?.classes[i],r=Object.entries(e.properties).filter(([a,l])=>l.isGpuCompatible()),s=new Array(r.length);for(let a=0;ad),n.addStructField(Ci.STRUCT_ID_METADATA_FS,r,o);const y=_5({valueExpression:s.unpackInShader(`texture(${h}, attributes.texCoord_${a}).${l}`),renderResources:e,glslType:r,metadataVariable:o,shaderDestination:Oe.FRAGMENT,property:s});n.addFunctionLines(Ci.FUNCTION_ID_INITIALIZE_METADATA_FS,[`metadata.${o} = ${y};`])})(e,t),h5(e.shaderBuilder,t),p5(e.shaderBuilder,t)}function h5(e,t){const{classProperty:n}=t.property,{metadataVariable:i,glslType:o,shaderDestination:r}=t,s=m5(Ci.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,o),a=`${o}MetadataClass`;e.addStructField(Ci.STRUCT_ID_METADATA_CLASS_FS,a,i),e.addFunctionLines(Ci.FUNCTION_ID_INITIALIZE_METADATA_FS,s),Oe.includesVertexShader(r)&&(e.addStructField(Ci.STRUCT_ID_METADATA_CLASS_VS,a,i),e.addFunctionLines(Ci.FUNCTION_ID_INITIALIZE_METADATA_VS,s))}function p5(e,t){const{propertyStatistics:n}=t;if(!c(n))return;const{metadataVariable:i,type:o,glslType:r}=t;if(o===xn.ENUM)return;const l=m5(Ci.METADATA_STATISTICS_FIELDS,n,`metadataStatistics.${i}`,r),u=`${r}MetadataStatistics`;e.addStructField(Ci.STRUCT_ID_METADATA_STATISTICS_FS,u,i),e.addFunctionLines(Ci.FUNCTION_ID_INITIALIZE_METADATA_FS,l),Oe.includesVertexShader(t.shaderDestination)&&(e.addStructField(Ci.STRUCT_ID_METADATA_STATISTICS_VS,u,i),e.addFunctionLines(Ci.FUNCTION_ID_INITIALIZE_METADATA_VS,l))}function m5(e,t,n,i){return c(t)?e.map(function o(r){const s=t[r.specName];if(c(s))return`${n}.${r.shaderName} = ${i}(${s});`}).filter(c):[]}function _5(e){const{valueExpression:t,property:n}=e;if(!n.hasValueTransform)return t;const i=e.metadataVariable,o=`u_${i}_offset`,r=`u_${i}_scale`,{shaderBuilder:s,uniformMap:a}=e.renderResources,{glslType:l,shaderDestination:u}=e;s.addUniform(l,o,u),s.addUniform(l,r,u);const{offset:d,scale:h}=n;return a[o]=()=>d,a[r]=()=>h,`czm_valueTransform(${o}, ${r}, ${t})`}const N_=Ci,iR=Object.freeze({INHERIT:0,OPAQUE:1,TRANSLUCENT:2}),Is={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:gn,process:function(e,t,n){const{shaderBuilder:i,model:o,alphaOptions:r}=e,{customShader:s}=o,{lightingModel:a,translucencyMode:l}=s;c(a)&&(e.lightingOptions.lightingModel=a),l===iR.TRANSLUCENT?r.pass=ze.TRANSLUCENT:l===iR.OPAQUE&&(r.pass=void 0);const u=function Jbe(e,t){const n=function qbe(e){const t={};for(let n=0;n1?function gAe(e,t,n,i){const o=t.quantization;let r,s;c(o)?(r=o.type,s=o.componentDatatype):(r=t.type,s=t.componentDatatype);const a=t.normalized,u=Wn.getNumberOfComponents(r)/i,h=u*ee.getSizeInBytes(s),m=t.byteStride;for(let _=0;_=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=l+1);const u=a===ln.POSITION,d=u?0:n,h=Wn.getNumberOfComponents(r),m={index:d,value:c(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:h,componentDatatype:s,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};if(e.attributes.push(m),!u||!i)return;e.attributes.push({index:n,vertexBuffer:e.runtimePrimitive.positionBuffer2D,count:t.count,componentsPerAttribute:h,componentDatatype:ee.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized})}(e,t,n,l),function bAe(e,t,n){const o=t.variableName;let r,s;t.isQuantized?(r=`a_quantized_${o}`,s=t.quantizedGlslType):(r=`a_${o}`,s=t.glslType);const a=t.attribute.semantic===ln.POSITION;a?e.setPositionAttribute(s,r):e.addAttribute(s,r),a&&n&&e.addAttribute("vec3","a_position2D")}(s,a,l),function yAe(e,t){const n=t.variableName;let o,i=`v_${n}`;"normalMC"===n?(i="v_normalEC",o=t.glslType):"tangentMC"===n?(o="vec3",i="v_tangentEC"):o=t.glslType,e.addVarying(o,i)}(s,a),c(t.semantic)&&function mAe(e,t){const n=t.semantic,i=t.setIndex;switch(n){case ln.NORMAL:e.addDefine("HAS_NORMALS");break;case ln.TANGENT:e.addDefine("HAS_TANGENTS");break;case ln.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case ln.TEXCOORD:case ln.COLOR:e.addDefine(`HAS_${n}_${i}`)}}(s,t),function AAe(e,t,n){const i=ps.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,o=ps.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,r=t.variableName;"tangentMC"===r?(e.addStructField(i,"vec3","tangentMC"),e.addStructField(i,"float","tangentSignMC"),e.addStructField(o,"vec3","tangentEC")):"normalMC"===r?(e.addStructField(i,"vec3","normalMC"),e.addStructField(o,"vec3","normalEC")):(e.addStructField(i,t.glslType,r),e.addStructField(o,t.glslType,r)),"positionMC"===r&&n&&e.addStructField(i,"vec3","position2D")}(s,a,o),function TAe(e,t,n){const i=ps.FUNCTION_ID_INITIALIZE_ATTRIBUTES,o=t.variableName;if("positionMC"===o&&n&&e.addFunctionLines(i,["attributes.position2D = a_position2D;"]),t.isQuantized)return;const s=[];"tangentMC"===o?(s.push("attributes.tangentMC = a_tangentMC.xyz;"),s.push("attributes.tangentSignMC = a_tangentMC.w;")):s.push(`attributes.${o} = a_${o};`),e.addFunctionLines(i,s)}(s,a,l),function xAe(e,t){const i=t.attribute.setIndex;if(c(t.attribute.semantic)&&!c(i))return;let o=ps.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS;const r=t.variableName;let s=`v_${r} = attributes.${r};`;e.addFunctionLines(o,[s]),o=ps.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,s=`attributes.${r} = v_${r};`,e.addFunctionLines(o,[s])}(s,a)}ps.process=function(e,t,n){const i=e.shaderBuilder,o=e.model;i.addStruct(ps.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"ProcessedAttributes",Oe.VERTEX),i.addStruct(ps.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"ProcessedAttributes",Oe.FRAGMENT),i.addStruct(oR.STRUCT_ID_SELECTED_FEATURE,oR.STRUCT_NAME_SELECTED_FEATURE,Oe.BOTH),i.addFunction(ps.FUNCTION_ID_INITIALIZE_ATTRIBUTES,ps.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,Oe.VERTEX),i.addVarying("vec3","v_positionWC"),i.addVarying("vec3","v_positionEC"),i.addStructField(ps.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionWC"),i.addStructField(ps.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionEC"),i.addFunction(ps.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,ps.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,Oe.VERTEX),i.addFunction(ps.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,ps.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,Oe.FRAGMENT),o.type===xa.TILE_PNTS&&i.addDefine("HAS_SRGB_COLOR",void 0,Oe.FRAGMENT);const s=n.mode!==ce.SCENE3D&&!n.scene3DOnly&&o._projectTo2D,a=c(e.runtimeNode.node.instances),l=s&&!a,u=t.attributes.length;for(let d=0;d1?(p=e.attributeIndex,e.attributeIndex+=m):p=_&&!l?0:e.attributeIndex++,pAe(e,h,p,m,s,a)}(function CAe(e,t){let n=!1,i=!1;for(let o=0;o0,u=!c(a)&&l;if(c(r)&&!u){const y=function $Ae(e){const t=zt(ZAe);if(!c(e))return t;for(let n=0;n=0,w=hi.getAttributeBySemantic(t,ln.NORMAL);if(C&&!w)throw new Ie("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,Oe.VERTEX),A.styleTranslucent&&(e.alphaOptions.pass=ze.TRANSLUCENT)}const d=o.pointCloudShading;let h,m,_;d.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,Oe.VERTEX),d.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,Oe.VERTEX),xa.is3DTiles(o.type)&&(m=!0,h=o.content,_=h.tile.refine===Xs.ADD),i.addUniform("vec4","model_pointCloudParameters",Oe.VERTEX),i.addVertexLines("float getPointSizeFromAttenuation(vec3 positionEC) {\n // Variables are packed into a single vector to minimize gl.uniformXXX() calls\n float pointSize = model_pointCloudParameters.x;\n float geometricError = model_pointCloudParameters.y;\n float depthMultiplier = model_pointCloudParameters.z;\n\n float depth = -positionEC.z;\n return min((geometricError / depth) * depthMultiplier, pointSize);\n}\n\n#ifdef HAS_POINT_CLOUD_SHOW_STYLE\nfloat pointCloudShowStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {\n float tiles3d_tileset_time = model_pointCloudParameters.w;\n return float(getShowFromStyle(attributes, metadata, tiles3d_tileset_time));\n}\n#endif\n\n#ifdef HAS_POINT_CLOUD_COLOR_STYLE\nvec4 pointCloudColorStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {\n float tiles3d_tileset_time = model_pointCloudParameters.w;\n return getColorFromStyle(attributes, metadata, tiles3d_tileset_time);\n}\n#endif\n\n#ifdef HAS_POINT_CLOUD_POINT_SIZE_STYLE\nfloat pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {\n float tiles3d_tileset_time = model_pointCloudParameters.w;\n return float(getPointSizeFromStyle(attributes, metadata, tiles3d_tileset_time));\n}\n#elif defined(HAS_POINT_CLOUD_ATTENUATION)\nfloat pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {\n return getPointSizeFromAttenuation(v_positionEC);\n}\n#endif\n\n#ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING\nfloat pointCloudBackFaceCullingStage() {\n #if defined(HAS_NORMALS) && !defined(HAS_DOUBLE_SIDED_MATERIAL)\n // This needs to be computed in eye coordinates so we can't use attributes.normalMC\n return step(-v_normalEC.z, 0.0);\n #else\n return 1.0;\n #endif\n}\n#endif"),e.uniformMap.model_pointCloudParameters=function(){const y=qAe;let A=1;m&&(A=_?5:h.tileset.memoryAdjustedScreenSpaceError),y.x=g(d.maximumAttenuation,A),y.x*=n.pixelRatio;const x=function YAe(e,t,n,i){if(c(i)){const d=i.tile.geometricError;if(d>0)return d}if(c(n.baseResolution))return n.baseResolution;const o=hi.getAttributeBySemantic(t,ln.POSITION),r=o.count,s=e.runtimeNode.transform;let a=f.subtract(o.max,o.min,P5);a=k.multiplyByPointAsVector(s,a,P5);return O.cbrt(a.x*a.y*a.z/r)}(e,t,d,h);let v;return y.y=x*d.geometricErrorScale,v=n.mode===ce.SCENE2D||n.camera.frustum instanceof $n?Number.POSITIVE_INFINITY:n.context.drawingBufferHeight/n.camera.frustum.sseDenominator,y.z=v,m&&(y.w=h.tileset.timeSinceLoad),y}}},P5=new f,XAe={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},ZAe={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"},aR="ProcessedAttributes attributes, Metadata metadata, float tiles3d_tileset_time";function cR(e,t){const n=/attributes\.(\w+)/g;let i=n.exec(e);for(;null!==i;){const o=i[1];-1===t.indexOf(o)&&t.push(o),i=n.exec(e)}}const eTe=I5,O5={name:"PrimitiveOutlinePipelineStage",process:function(e,t,n){const i=e.shaderBuilder,o=e.uniformMap;i.addDefine("HAS_PRIMITIVE_OUTLINE",void 0,Oe.BOTH),i.addAttribute("vec3","a_outlineCoordinates"),i.addVarying("vec3","v_outlineCoordinates");const r=t.outlineCoordinates,s={index:e.attributeIndex++,vertexBuffer:r.buffer,componentsPerAttribute:Wn.getNumberOfComponents(r.type),componentDatatype:r.componentDatatype,offsetInBytes:r.byteOffset,strideInBytes:r.byteStride,normalize:r.normalized};e.attributes.push(s),i.addUniform("sampler2D","model_outlineTexture",Oe.FRAGMENT);const a=o8.createTexture(n.context);o.model_outlineTexture=function(){return a};const l=e.model;i.addUniform("vec4","model_outlineColor",Oe.FRAGMENT),o.model_outlineColor=function(){return l.outlineColor},i.addUniform("bool","model_showOutline",Oe.FRAGMENT),o.model_showOutline=function(){return l.showOutline},i.addVertexLines("void primitiveOutlineStage() {\n v_outlineCoordinates = a_outlineCoordinates;\n}\n"),i.addFragmentLines("void primitiveOutlineStage(inout czm_modelMaterial material) {\n if (!model_showOutline) {\n return;\n }\n\n float outlineX = \n texture(model_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r;\n float outlineY = \n texture(model_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r;\n float outlineZ = \n texture(model_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r;\n float outlineness = max(outlineX, max(outlineY, outlineZ));\n\n material.diffuse = mix(material.diffuse, model_outlineColor.rgb, model_outlineColor.a * outlineness);\n}\n\n")}},iTe=O5,L5={name:"PrimitiveStatisticsPipelineStage",_countGeometry:R5,_count2DPositions:N5,_countMorphTargetAttributes:M5,_countMaterialTextures:F5,_countFeatureIdTextures:B5,_countBinaryMetadata:k5};function R5(e,t){const n=c(t.indices)?t.indices.count:hi.getAttributeBySemantic(t,"POSITION").count,i=t.primitiveType;i===At.POINTS?e.pointsLength+=n:At.isTriangles(i)&&(e.trianglesLength+=function oTe(e,t){switch(e){case At.TRIANGLES:return t/3;case At.TRIANGLE_STRIP:case At.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}(i,n));const o=t.attributes,r=o.length;for(let l=0;l0,h=c(i.skin),m=c(r),p=!(m&&c(r.fragmentShaderText))||r.mode!==tR.REPLACE_MATERIAL,y=hi.hasQuantizedAttributes(n.attributes),A=o.debugWireframe&&At.isTriangles(n.primitiveType)&&(o._enableDebugWireframe||a),x=o.pointCloudShading,C=c(x)&&x.attenuation,w=c(x)&&x.backFaceCulling,v=n.primitiveType===At.POINTS&&(c(s)||C||w),D=o._enableShowOutline&&c(n.outlineCoordinates),P=function ITe(e,t,n){let i;return c(t.instances)&&(i=hi.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),c(i))?{hasFeatureIds:!0,hasPropertyTable:c(i.propertyTableId)}:(i=hi.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),c(i)?{hasFeatureIds:!0,hasPropertyTable:c(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}(o,i,n),N=c(o.classificationType);u&&t.push(_Te),t.push(EAe),A&&t.push(DTe),N&&t.push(_be),d&&t.push(VAe),h&&t.push(ATe),v&&t.push(eTe),y&&t.push(lAe),p&&t.push(LAe),t.push(nR),t.push(N_),P.hasPropertyTable&&(t.push(oR),t.push(pbe),t.push(bbe)),m&&t.push(oAe),t.push(SAe),o.allowPicking&&t.push(jAe),D&&t.push(iTe),t.push(hbe),t.push(aTe)};const PTe=G5;function uR(e){e=g(e,g.EMPTY_OBJECT),T.typeOf.object("options.skin",e.skin),T.typeOf.object("options.sceneGraph",e.sceneGraph),this._sceneGraph=e.sceneGraph,this._skin=e.skin,this._inverseBindMatrices=void 0,this._joints=[],this._jointMatrices=[],function OTe(e){const t=e.skin,n=t.inverseBindMatrices;e._inverseBindMatrices=n;const i=t.joints,o=i.length,r=e.sceneGraph._runtimeNodes,s=e.joints,a=e._jointMatrices;for(let l=0;l czm_splitPosition) discard;\n if (model_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;\n#endif\n}\n");const o={};i.addUniform("float",PS.SPLIT_DIRECTION_UNIFORM_NAME,Oe.FRAGMENT),o[PS.SPLIT_DIRECTION_UNIFORM_NAME]=function(){return t.splitDirection},e.uniformMap=Gn(o,e.uniformMap)}},qTe=PS,XTe=function YTe(e,t){T.typeOf.object("modelRenderResources",e),T.typeOf.object("runtimeNode",t),this.model=e.model,this.shaderBuilder=e.shaderBuilder.clone(),this.uniformMap=zt(e.uniformMap),this.alphaOptions=zt(e.alphaOptions),this.renderStateOptions=zt(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},$Te=function ZTe(e){e=g(e,g.EMPTY_OBJECT),this.lightingModel=g(e.lightingModel,DS.UNLIT)},QTe=function KTe(e,t){T.typeOf.object("nodeRenderResources",e),T.typeOf.object("runtimePrimitive",t),this.model=e.model,this.runtimeNode=e.runtimeNode,this.attributes=e.attributes.slice(),this.attributeIndex=e.attributeIndex,this.featureIdVertexAttributeSetIndex=e.featureIdVertexAttributeSetIndex,this.uniformMap=zt(e.uniformMap),this.alphaOptions=zt(e.alphaOptions),this.renderStateOptions=zt(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.shaderBuilder=e.shaderBuilder.clone(),this.instanceCount=e.instanceCount,this.runtimePrimitive=t;const n=t.primitive;this.count=c(n.indices)?n.indices.count:hi.getAttributeBySemantic(n,"POSITION").count,this.hasPropertyTable=!1,this.indices=n.indices,this.wireframeIndexBuffer=void 0,this.primitiveType=n.primitiveType;const i=hi.getPositionMinMax(n,this.runtimeNode.instancingTranslationMin,this.runtimeNode.instancingTranslationMax);this.positionMin=f.clone(i.min,new f),this.positionMax=f.clone(i.max,new f),this.boundingSphere=be.fromCornerPoints(this.positionMin,this.positionMax,new be),this.lightingOptions=new $Te,this.pickId=void 0};function Wc(e){const t=(e=g(e,g.EMPTY_OBJECT)).modelComponents;T.typeOf.object("options.model",e.model),T.typeOf.object("options.modelComponents",t),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=k.clone(k.IDENTITY),this._computedModelMatrix2D=k.clone(k.IDENTITY),this._axisCorrectionMatrix=hi.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new k),this._runtimeArticulations={},function JTe(e){const t=e._components,n=t.scene;q5(e,e._model.modelMatrix);const r=t.articulations,s=r.length,a=e._runtimeArticulations;for(let C=0;C0&&(this._hash={},e.length=0)};const _n=F_;function l0(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdSet={},this._batchTextureIdMap=new _n}Object.defineProperties(l0.prototype,{batchTexturesByteLength:{get:function(){const e=this._batchTextureIdMap.length,t=this._batchTextureIdMap.values;let n=0;for(let i=0;i0&&(h=fc(n,t,a),t+=a,l>0&&(m=new Uint8Array(e,t,l),t+=l));const _=new bS(u,d),p=_.getGlobalProperty("POINTS_LENGTH");if(_.featuresLength=p,!c(p))throw new Ie("Feature table global property: POINTS_LENGTH must be defined");let y=_.getGlobalProperty("RTC_CENTER",ee.FLOAT,3);c(y)&&(y=f.unpack(y));const A=function _xe(e,t){const n=e.json;let i,o,r;const s=c(n.extensions)?n.extensions["3DTILES_draco_point_compression"]:void 0,a=c(t)&&c(t.extensions)?t.extensions["3DTILES_draco_point_compression"]:void 0;let l,u,d,h,m,_;if(c(a)&&(r=a.properties),c(s)){o=s.properties;const p=s.byteOffset,y=s.byteLength;if(!c(o)||!c(p)||!c(y))throw new Ie("Draco properties, byteOffset, and byteLength must be defined");i=e.buffer.slice(p,p+y),l=c(o.POSITION),u=c(o.RGB)||c(o.RGBA),d=c(o.NORMAL),h=c(o.BATCH_ID),m=c(o.RGBA)}return c(i)&&(_={buffer:i,featureTableProperties:o,batchTableProperties:r,properties:Gn(o,r),dequantizeInShader:!0}),{draco:_,hasPositions:l,hasColors:u,isTranslucent:m,hasNormals:d,hasBatchIds:h}}(_,h);if(A.rtcCenter=y,A.pointsLength=p,!A.hasPositions){const x=function gxe(e){const t=e.json;let n;if(c(t.POSITION))return n=e.getPropertyArray("POSITION",ee.FLOAT,3),{name:ln.POSITION,semantic:ln.POSITION,typedArray:n,isQuantized:!1,componentDatatype:ee.FLOAT,type:Wn.VEC3};if(c(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",ee.UNSIGNED_SHORT,3);const i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",ee.FLOAT,3);if(!c(i))throw new Ie("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const o=65535,r=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",ee.FLOAT,3);if(!c(r))throw new Ie("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:ln.POSITION,semantic:ln.POSITION,typedArray:n,isQuantized:!0,componentDatatype:ee.FLOAT,type:Wn.VEC3,quantizedRange:o,quantizedVolumeOffset:f.unpack(r),quantizedVolumeScale:f.unpack(i),quantizedComponentDatatype:ee.UNSIGNED_SHORT,quantizedType:Wn.VEC3}}}(_);A.positions=x,A.hasPositions=A.hasPositions||c(x)}if(!A.hasPositions)throw new Ie("Either POSITION or POSITION_QUANTIZED must be defined.");if(!A.hasNormals){const x=function bxe(e){const t=e.json;let n;return c(t.NORMAL)?(n=e.getPropertyArray("NORMAL",ee.FLOAT,3),{name:ln.NORMAL,semantic:ln.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:ee.FLOAT,type:Wn.VEC3}):c(t.NORMAL_OCT16P)?(n=e.getPropertyArray("NORMAL_OCT16P",ee.UNSIGNED_BYTE,2),{name:ln.NORMAL,semantic:ln.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:255,quantizedType:Wn.VEC2,quantizedComponentDatatype:ee.UNSIGNED_BYTE,componentDatatype:ee.FLOAT,type:Wn.VEC3}):void 0}(_);A.normals=x,A.hasNormals=A.hasNormals||c(x)}if(!A.hasColors){const x=function yxe(e){const t=e.json;let n;if(c(t.RGBA))return n=e.getPropertyArray("RGBA",ee.UNSIGNED_BYTE,4),{name:ln.COLOR,semantic:ln.COLOR,setIndex:0,typedArray:n,componentDatatype:ee.UNSIGNED_BYTE,type:Wn.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(c(t.RGB))return n=e.getPropertyArray("RGB",ee.UNSIGNED_BYTE,3),{name:"COLOR",semantic:ln.COLOR,setIndex:0,typedArray:n,componentDatatype:ee.UNSIGNED_BYTE,type:Wn.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(c(t.RGB565))return n=e.getPropertyArray("RGB565",ee.UNSIGNED_SHORT,1),{name:"COLOR",semantic:ln.COLOR,setIndex:0,typedArray:n,componentDatatype:ee.FLOAT,type:Wn.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(c(t.CONSTANT_RGBA)){const i=e.getGlobalProperty("CONSTANT_RGBA",ee.UNSIGNED_BYTE,4),o=i[3],r=X.fromBytes(i[0],i[1],i[2],o);return{name:ln.COLOR,semantic:ln.COLOR,setIndex:0,constantColor:r,componentDatatype:ee.FLOAT,type:Wn.VEC4,isQuantized:!1,isTranslucent:o<255}}}(_);A.colors=x,A.hasColors=A.hasColors||c(x),A.hasConstantColor=c(A.constantColor),A.isTranslucent=c(x)&&x.isTranslucent}if(!A.hasBatchIds){const x=function Axe(e){if(c(e.json.BATCH_ID)){const n=e.getPropertyArray("BATCH_ID",ee.UNSIGNED_SHORT,1);return{name:ln.FEATURE_ID,semantic:ln.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:ee.fromTypedArray(n),type:Wn.SCALAR}}}(_);A.batchIds=x,A.hasBatchIds=A.hasBatchIds||c(x)}if(A.hasBatchIds){const x=_.getGlobalProperty("BATCH_LENGTH");if(!c(x))throw new Ie("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");A.batchLength=x}return c(m)&&(m=new Uint8Array(m),A.batchTableJson=h,A.batchTableBinary=m),A};const K5=$5,Txe=bn.Components,xxe=bn.Scene,Cxe=bn.Node,Exe=bn.Primitive,wxe=bn.Attribute,Q5=bn.Quantization,Sxe=bn.FeatureIdAttribute,vxe=bn.Material,Dxe=bn.MetallicRoughness;function zp(e){const t=(e=g(e,g.EMPTY_OBJECT)).arrayBuffer,n=g(e.byteOffset,0);T.typeOf.object("options.arrayBuffer",t),this._arrayBuffer=t,this._byteOffset=n,this._loadAttributesFor2D=g(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=on.UNLOADED,this._buffers=[],this._components=void 0,this._transform=k.IDENTITY}function Oxe(e){switch(e){case 1:return"SCALAR";case 2:return"VEC2";case 3:return"VEC3";case 4:return"VEC4";default:throw new E("componentsPerAttribute must be a number from 1-4")}}function Lxe(e){switch(e){case oe.BYTE:return"BYTE";case oe.UNSIGNED_BYTE:return"UNSIGNED_BYTE";case oe.SHORT:return"SHORT";case oe.UNSIGNED_SHORT:return"UNSIGNED_SHORT";case oe.INT:return"INT";case oe.UNSIGNED_INT:return"UNSIGNED_INT";case oe.DOUBLE:return"DOUBLE";case oe.FLOAT:return"FLOAT";default:throw new E("value is not a valid WebGL constant")}}function CT(e,t,n){let o,i=t.typedArray;if(t.octEncoded&&(o=new Q5,o.octEncoded=t.octEncoded,o.octEncodedZXY=t.octEncodedZXY,o.normalizationRange=t.quantizedRange,o.type=t.quantizedType,o.componentDatatype=t.quantizedComponentDatatype),t.isQuantized){o=new Q5;const a=t.quantizedRange;o.normalizationRange=a,o.quantizedVolumeOffset=f.ZERO;const l=t.quantizedVolumeScale;o.quantizedVolumeDimensions=l,o.quantizedVolumeStepSize=f.divideByScalar(l,a,new f),o.componentDatatype=t.quantizedComponentDatatype,o.type=t.quantizedType}const r=new wxe;if(r.name=t.name,r.semantic=t.semantic,r.setIndex=t.setIndex,r.componentDatatype=t.componentDatatype,r.type=t.type,r.normalized=g(t.normalized,!1),r.min=t.min,r.max=t.max,r.quantization=o,t.isRGB565&&(i=Fi.decodeRGB565(i)),c(t.constantColor)){const a=new Array(4);r.constant=X.pack(t.constantColor,a)}else{const a=yn.createVertexBuffer({typedArray:i,context:n,usage:Tt.STATIC_DRAW});a.vertexArrayDestroyable=!1,e._buffers.push(a),r.buffer=a}return r.semantic===ln.POSITION&&e._loadAttributesFor2D&&(r.typedArray=i),r}let J5,LS;c(Object.create)&&((zp.prototype=Object.create(Ya.prototype)).constructor=zp),Object.defineProperties(zp.prototype,{cacheKey:{get:function(){}},components:{get:function(){return this._components}},transform:{get:function(){return this._transform}}}),zp.prototype.load=function(){if(c(this._promise))return this._promise;this._parsedContent=K5.parse(this._arrayBuffer,this._byteOffset),this._state=on.PROCESSING,this._promise=Promise.resolve(this)},zp.prototype.process=function(e){if(c(this._error)){const t=this._error;throw this._error=void 0,t}if(this._state===on.READY)return!0;if(this._state===on.PROCESSING){if(c(this._decodePromise))return!1;this._decodePromise=function Ixe(e,t){const i=e._parsedContent.draco;let o;if(o=c(i)?PO.decodePointCloud(i,t):Promise.resolve(),c(o))return e._decodePromise=o,o.then(function(r){if(!e.isDestroyed())return c(r)&&function Pxe(e,t,n){e._state=on.READY;const i=e._parsedContent;let o;if(c(n.POSITION)){if(o={name:"POSITION",semantic:ln.POSITION,typedArray:n.POSITION.array,componentDatatype:ee.FLOAT,type:Wn.VEC3,isQuantized:!1},c(n.POSITION.data.quantization)){const a=n.POSITION.data.quantization,l=a.range,u=f.fromElements(l,l,l),d=f.unpack(a.minValues),h=(1<0&&function Hxe(e,t,n,i){const o=t.attributes,r=n.length;for(let s=0;s0?e._errorEvent.raiseEvent(t):console.log(t)}function pR(e,t){if(!c(e)&&!c(t))return!1;if(c(e)!==c(t))return!0;const n=e.alpha,i=t.alpha;return Math.floor(n)!==Math.floor(i)||Math.ceil(n)!==Math.ceil(i)}Object.defineProperties(ho.prototype,{ready:{get:function(){return this._ready}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},incrementallyLoadTextures:{get:function(){return g(this._loader.incrementallyLoadTextures,!1)}},texturesReadyEvent:{get:function(){return this._texturesReadyEvent}},loader:{get:function(){return this._loader}},statistics:{get:function(){return this._statistics}},activeAnimations:{get:function(){return this._activeAnimations}},clampAnimations:{get:function(){return this._clampAnimations},set:function(e){this._clampAnimations=e}},cull:{get:function(){return this._cull}},opaquePass:{get:function(){return this._opaquePass}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){T.defined("pointCloudShading",e),e!==this._pointCloudShading&&this.resetDrawCommands(),this._pointCloudShading=e}},customShader:{get:function(){return this._customShader},set:function(e){e!==this._customShader&&this.resetDrawCommands(),this._customShader=e}},sceneGraph:{get:function(){return this._sceneGraph}},content:{get:function(){return this._content}},heightReference:{get:function(){return this._heightReference},set:function(e){e!==this._heightReference&&(this._heightDirty=!0),this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far must be greater than near");this._distanceDisplayCondition=Jn.clone(e,this._distanceDisplayCondition)}},structuralMetadata:{get:function(){return this._sceneGraph.components.structuralMetadata}},featureTableId:{get:function(){return this._featureTableId},set:function(e){this._featureTableId=e}},featureTables:{get:function(){return this._featureTables},set:function(e){this._featureTables=e}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._idDirty=!0),this._id=e}},allowPicking:{get:function(){return this._allowPicking}},style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}},color:{get:function(){return this._color},set:function(e){pR(e,this._color)&&this.resetDrawCommands(),this._color=X.clone(e,this._color)}},colorBlendMode:{get:function(){return this._colorBlendMode},set:function(e){this._colorBlendMode=e}},colorBlendAmount:{get:function(){return this._colorBlendAmount},set:function(e){this._colorBlendAmount=e}},silhouetteColor:{get:function(){return this._silhouetteColor},set:function(e){if(!X.equals(e,this._silhouetteColor)){const t=pR(e,this._silhouetteColor);this._silhouetteDirty=this._silhouetteDirty||t}this._silhouetteColor=X.clone(e,this._silhouetteColor)}},silhouetteSize:{get:function(){return this._silhouetteSize},set:function(e){if(e!==this._silhouetteSize){const t=this._silhouetteSize,n=e>0&&0===t||0===e&&t>0;this._silhouetteDirty=this._silhouetteDirty||n,this._backFaceCullingDirty=this._backFaceCullingDirty||n}this._silhouetteSize=e}},boundingSphere:{get:function(){if(!this._ready)throw new E("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");return tG(this,c(this._clampedModelMatrix)?this._clampedModelMatrix:this.modelMatrix),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,!0===this._debugWireframe&&!1===this._enableDebugWireframe&&this.type===xa.GLTF&&gn("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){"number"==typeof e&&(e=`featureId_${e}`),T.typeOf.string("value",e),e!==this._featureIdLabel&&(this._featureTableIdDirty=!0),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){"number"==typeof e&&(e=`instanceFeatureId_${e}`),T.typeOf.string("value",e),e!==this._instanceFeatureIdLabel&&(this._featureTableIdDirty=!0),this._instanceFeatureIdLabel=e}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&(Bd.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},lightColor:{get:function(){return this._lightColor},set:function(e){c(e)!==c(this._lightColor)&&this.resetDrawCommands(),this._lightColor=f.clone(e,this._lightColor)}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){T.typeOf.object("imageBasedLighting",this._imageBasedLighting),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}}}),ho.prototype.getNode=function(e){if(!this._ready)throw new E("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");return T.typeOf.string("name",e),this._nodesByName[e]},ho.prototype.setArticulationStage=function(e,t){if(T.typeOf.number("value",t),!this._ready)throw new E("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");this._sceneGraph.setArticulationStage(e,t)},ho.prototype.applyArticulations=function(){if(!this._ready)throw new E("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");this._sceneGraph.applyArticulations()},ho.prototype.makeStyleDirty=function(){this._styleDirty=!0},ho.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};const qxe=new k,Yxe=new ne,Xxe=new k;function eG(e){const t=e.featureTables[e.featureTableId];e._styleCommandsNeeded=yT.getStyleCommandsNeeded(t.featuresLength,t.batchTexture.translucentFeaturesLength)}ho.prototype.update=function(e){let t=!1;try{t=function Zxe(e,t){return!(!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded)||(t.afterRender.push(()=>!0),e._loader.process(t))}(this,e)}catch(n){hR(this,this._loader.incrementallyLoadTextures||"TextureError"!==n.name?hi.getError("model",this._resource,n):n)}if(function $xe(e,t){c(e._customShader)&&e._customShader.update(t)}(this,e),function Kxe(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;const n=this._loader.components;if(!c(n)){if(this._loader.isUnloaded())return;const r=hi.getError("model",this._resource,new Ie("Failed to load model."));hR(r),this._rejectLoad=this._rejectLoad&&this._rejectLoad(r)}const i=n.structuralMetadata;c(i)&&i.propertyTableCount>0&&function jxe(e,t){const n=e._featureTables,i=t.propertyTables,o=i.length;for(let r=0;r0&&(e.featureTableId=function Wxe(e,t){const n=t._featureIdLabel,i=t._instanceFeatureIdLabel;let o,r,s,a;for(o=0;o{this._ready=!0,this._readyEvent.raiseEvent(this)});this._loader.incrementallyLoadTextures&&!this._texturesLoaded&&this._loader.texturesLoaded&&(this.resetDrawCommands(),this._texturesLoaded=!0,this._texturesReadyEvent.raiseEvent(this)),function dCe(e){if(!e._idDirty)return;e._idDirty=!1;const t=e._id,n=e._pickIds,i=n.length;for(let o=0;o=i&&r<=o}(e,t),i=e.isInvisible(),o=e.hasSilhouette(t),s=t.passes;e._show&&0!==e._computedScale&&n&&(!i||o)&&!e._ignoreCommands&&(s.render||s.pick&&e.allowPicking)&&(function bCe(e,t){const n=t.creditDisplay,i=e._credits,o=i.length;for(let r=0;r0&&e.alpha<1},ho.prototype.isInvisible=function(){const e=this.color;return c(e)&&0===e.alpha},ho.prototype.hasSilhouette=function(e){return iG(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!c(this._classificationType)},ho.prototype.hasSkipLevelOfDetail=function(e){return!!xa.is3DTiles(this.type)&&(e.context.stencilBuffer&&this._content.tileset.isSkippingLevelOfDetail)},ho.prototype.isClippingEnabled=function(){const e=this._clippingPlanes;return c(e)&&e.enabled&&0!==e.length},ho.prototype.isDestroyed=function(){return!1},ho.prototype.destroy=function(){const e=this._loader;c(e)&&e.destroy();const t=this._featureTables;if(c(t)){const i=t.length;for(let o=0;o0,i=c(this.structuralMetadata)?this.structuralMetadata.propertyAttributes:void 0,o=c(i)&&c(i[0]);!t||n&&!o?n?(this.featureTables[this.featureTableId].applyStyle(e),eG(this)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0):this.resetDrawCommands()};const u0=ho;function ms(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}function wT(e,t,n,i){return Gn(i,{cull:!1,releaseGltfJson:!0,opaquePass:ze.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,enableShowOutline:e._enableShowOutline,showOutline:e.showOutline,outlineColor:e.outlineColor})}Object.defineProperties(ms.prototype,{featuresLength:{get:function(){const e=this._model,t=e.featureTables,n=e.featureTableId;return c(t)&&c(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(){const 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(){const e=this._model,t=e.featureTables,n=e.featureTableId;if(c(t)&&c(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}}}),ms.prototype.getFeature=function(e){const t=this._model,n=t.featureTableId;if(!c(n))throw new E("No feature ID set is selected. Make sure Cesium3DTileset.featureIdLabel or Cesium3DTileset.instanceFeatureIdLabel is defined");const i=t.featureTables[n];if(!c(i))throw new E("No feature table found for the selected feature ID set");const o=i.featuresLength;if(!c(e)||e<0||e>=o)throw new E(`featureId is required and must be between 0 and featuresLength - 1 (${o-1}).`);return i.getFeature(e)},ms.prototype.hasProperty=function(e,t){const n=this._model,i=n.featureTableId;return!!c(i)&&n.featureTables[i].hasProperty(e,t)},ms.prototype.applyDebugSettings=function(e,t){t=e?t:X.WHITE,0===this.featuresLength?this._model.color=t:c(this.batchTable)&&this.batchTable.setAllColor(t)},ms.prototype.applyStyle=function(e){this._model.style=e},ms.prototype.update=function(e,t){const 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;const o=e.clippingPlanes;n.referenceMatrix=e.clippingPlanesOriginMatrix,c(o)&&i.clippingPlanesDirty&&(n._clippingPlanes=o.enabled&&i._isClipped?o:void 0),c(o)&&c(n._clippingPlanes)&&n._clippingPlanes!==o&&(n._clippingPlanes=o,n._clippingPlanesState=0),n.update(t),!this._ready&&n.ready&&(n.activeAnimations.addAll({loop:S_.REPEAT}),this._ready=!0)},ms.prototype.isDestroyed=function(){return!1},ms.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),Ye(this)},ms.fromGltf=function(){var e=(0,Pe.Z)(function*(t,n,i,o){const r=new ms(t,n,i),a=wT(t,n,r,{gltf:o,basePath:i});a.classificationType=t.vectorClassificationOnly?void 0:t.classificationType;const u=yield u0.fromGltfAsync(a);return r._model=u,r});return function(t,n,i,o){return e.apply(this,arguments)}}(),ms.fromB3dm=function(){var e=(0,Pe.Z)(function*(t,n,i,o,r){const s=new ms(t,n,i),l=wT(t,n,s,{arrayBuffer:o,byteOffset:r,resource:i});l.classificationType=t.vectorClassificationOnly?void 0:t.classificationType;const d=yield u0.fromB3dm(l);return s._model=d,s});return function(t,n,i,o,r){return e.apply(this,arguments)}}(),ms.fromI3dm=function(){var e=(0,Pe.Z)(function*(t,n,i,o,r){const s=new ms(t,n,i),l=wT(t,n,s,{arrayBuffer:o,byteOffset:r,resource:i}),u=yield u0.fromI3dm(l);return s._model=u,s});return function(t,n,i,o,r){return e.apply(this,arguments)}}(),ms.fromPnts=function(){var e=(0,Pe.Z)(function*(t,n,i,o,r){const s=new ms(t,n,i),l=wT(t,n,s,{arrayBuffer:o,byteOffset:r,resource:i}),u=yield u0.fromPnts(l);return s._model=u,s});return function(t,n,i,o,r){return e.apply(this,arguments)}}(),ms.fromGeoJson=function(){var e=(0,Pe.Z)(function*(t,n,i,o){const r=new ms(t,n,i),a=wT(t,n,r,{geoJson:o,resource:i}),l=yield u0.fromGeoJson(a);return r._model=l,r});return function(t,n,i,o){return e.apply(this,arguments)}}();const d0=ms;function Lu(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(Lu.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}}}),Lu.fromJson=function(e,t,n,i){const o=new Lu(e,t,n);return o._tileset.loadTileset(o._resource,i,o._tile),o._ready=!0,o},Lu.prototype.hasProperty=function(e,t){return!1},Lu.prototype.getFeature=function(e){},Lu.prototype.applyDebugSettings=function(e,t){},Lu.prototype.applyStyle=function(e){},Lu.prototype.update=function(e,t){},Lu.prototype.isDestroyed=function(){return!1},Lu.prototype.destroy=function(){return Ye(this)};const TCe=Lu;function Il(e,t,n,i){this.near=g(e,0),this.nearValue=g(t,0),this.far=g(n,1),this.farValue=g(i,0)}Il.clone=function(e,t){if(c(e))return c(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new Il(e.near,e.nearValue,e.far,e.farValue)},Il.packedLength=4,Il.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),t[n++]=e.near,t[n++]=e.nearValue,t[n++]=e.far,t[n]=e.farValue,t},Il.unpack=function(e,t,n){if(!c(e))throw new E("array is required");return t=g(t,0),c(n)||(n=new Il),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n},Il.equals=function(e,t){return e===t||c(e)&&c(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue},Il.prototype.clone=function(e){return Il.clone(this,e)},Il.prototype.equals=function(e){return Il.equals(this,e)};const Mn=Il;function Ud(){this.high=f.clone(f.ZERO),this.low=f.clone(f.ZERO)}Ud.encode=function(e,t){let n;return T.typeOf.number("value",e),c(t)||(t={high:0,low:0}),e>=0?(n=65536*Math.floor(e/65536),t.high=n,t.low=e-n):(n=65536*Math.floor(-e/65536),t.high=-n,t.low=e+n),t};const rh={high:0,low:0};Ud.fromCartesian=function(e,t){T.typeOf.object("cartesian",e),c(t)||(t=new Ud);const n=t.high,i=t.low;return Ud.encode(e.x,rh),n.x=rh.high,i.x=rh.low,Ud.encode(e.y,rh),n.y=rh.high,i.y=rh.low,Ud.encode(e.z,rh),n.z=rh.high,i.z=rh.low,t};const _R=new Ud;Ud.writeElements=function(e,t,n){T.defined("cartesianArray",t),T.typeOf.number("index",n),T.typeOf.number.greaterThanOrEquals("index",n,0),Ud.fromCartesian(e,_R);const i=_R.high,o=_R.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};const Gi=Ud;function _s(e,t,n,i){if(T.defined("context",e),!t||0===t.length)throw new E("At least one attribute is required.");const o=_s._verifyAttributes(t);n=g(n,0);const r=[],s={};let a,l;const u=o.length;for(let h=0;h0?ee.getSizeInBytes(e[0].componentDatatype):0,o=i>0?t%i:0;return t+=0===o?0:i-o,t},_s._createArrayViews=function(e,t){const n=[];let i=0;const o=e.length;for(let r=0;r0){const n=new ArrayBuffer(t*e.vertexSizeInBytes);if(c(e.arrayBuffer)){const r=new Uint8Array(n),s=new Uint8Array(e.arrayBuffer),a=s.length;for(let l=0;l0){t.needsCommit=!1;const n=t.vertexBuffer,i=e._size*t.vertexSizeInBytes,o=c(n);if(!o||n.sizeInBytes0){const i=e.vertexSizeInBytes*t;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,i,e.vertexSizeInBytes*n),i)}}function gR(e){const t=e.va;if(!c(t))return;const n=t.length;for(let i=0;i=this._size)throw new E("offsetInVertices must be greater than or equal to zero and less than the vertex array size.");if(e+t>this._size)throw new E("offsetInVertices + lengthInVertices cannot exceed the vertex array size.");const n=this._allBuffers;for(let i=0,o=n.length;i!0)}if(c(n)&&(o=e.addImage(t,n)),c(i)&&(o=e.addSubRegion(t,i)),this._imageIndexPromise=o,!c(o))return;const a=e.getImageIndex(t);!c(a)||c(i)?o.then(s).catch(function(l){console.error(`Error loading image for billboard: ${l}`),r._imageIndexPromise=void 0}):s(a)},Ei.prototype.setImage=function(e,t){if(!c(e))throw new E("id is required.");if(!c(t))throw new E("image is required.");this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,c(this._billboardCollection._textureAtlas)&&this._loadImage())},Ei.prototype.setImageSubRegion=function(e,t){if(!c(e))throw new E("id is required.");if(!c(t))throw new E("subRegion is required.");this._imageId===e&&Vt.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=Vt.clone(t),c(this._billboardCollection._textureAtlas)&&this._loadImage())},Ei.prototype._setTranslate=function(e){if(!c(e))throw new E("value is required.");const t=this._translate;G.equals(t,e)||(G.clone(e,t),vo(this,sG))},Ei.prototype._getActualPosition=function(){return c(this._clampedPosition)?this._clampedPosition:this._actualPosition},Ei.prototype._setActualPosition=function(e){c(this._clampedPosition)||f.clone(e,this._actualPosition),vo(this,NS)};const uG=new fe;Ei._computeActualPosition=function(e,t,n,i){return c(e._clampedPosition)?(n.mode!==e._mode&&e._updateClamping(),e._clampedPosition):n.mode===ce.SCENE3D?t:(k.multiplyByPoint(i,t,uG),Ur.computeActualWgs84Position(n,uG))};const dG=new f;Ei._computeScreenSpacePosition=function(e,t,n,i,o,r){const s=k.multiplyByPoint(e,t,dG),a=Ur.wgs84WithEyeOffsetToWindowCoordinates(o,s,n,r);if(c(a))return G.add(a,i,a),a};const FS=new G(0,0);Ei.prototype.computeScreenSpacePosition=function(e,t){const n=this._billboardCollection;if(c(t)||(t=new G),!c(n))throw new E("Billboard must be in a collection. Was it removed?");if(!c(e))throw new E("scene is required.");G.clone(this._pixelOffset,FS),G.add(FS,this._translate,FS);let i=n.modelMatrix,o=this._position;if(c(this._clampedPosition)&&(o=this._clampedPosition,e.mode!==ce.SCENE3D)){const s=e.mapProjection,a=s.ellipsoid,l=s.unproject(o,ST);o=a.cartographicToCartesian(l,dG),i=k.IDENTITY}return Ei._computeScreenSpacePosition(i,o,this._eyeOffset,FS,e,t)},Ei.getScreenSpaceBoundingBox=function(e,t,n){let i=e.width,o=e.height;const r=e.scale;i*=r,o*=r;let s=t.x;e.horizontalOrigin===Ca.RIGHT?s-=i:e.horizontalOrigin===Ca.CENTER&&(s-=.5*i);let a=t.y;return e.verticalOrigin===ao.BOTTOM||e.verticalOrigin===ao.BASELINE?a-=o:e.verticalOrigin===ao.CENTER&&(a-=.5*o),c(n)||(n=new Vt),n.x=s,n.y=a,n.width=i,n.height=o,n},Ei.prototype.equals=function(e){return this===e||c(e)&&this._id===e._id&&f.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&&Vt.equals(this._imageSubRegion,e._imageSubRegion)&&X.equals(this._color,e._color)&&G.equals(this._pixelOffset,e._pixelOffset)&&G.equals(this._translate,e._translate)&&f.equals(this._eyeOffset,e._eyeOffset)&&Mn.equals(this._scaleByDistance,e._scaleByDistance)&&Mn.equals(this._translucencyByDistance,e._translucencyByDistance)&&Mn.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Jn.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},Ei.prototype._destroy=function(){c(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),c(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0};const Ko=Ei,xr=Object.freeze({OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2}),qc=Object.freeze({FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25});function sh(e,t,n,i,o){this.bottomLeft=g(e,G.ZERO),this.topRight=g(t,G.ZERO),this.childNode1=n,this.childNode2=i,this.imageIndex=o}const kCe=new G(16,16);function Vp(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.borderWidthInPixels,1),n=g(e.initialSize,kCe);if(!c(e.context))throw new E("context is required.");if(t<0)throw new E("borderWidthInPixels must be greater than or equal to zero.");if(n.x<1||n.y<1)throw new E("initialSize must be greater than zero.");this._context=e.context,this._pixelFormat=g(e.pixelFormat,vt.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=kr(),this._idHash={},this._indexHash={},this._initialSize=n,this._root=void 0}function BS(e,t,n){if(c(t)){if(!c(t.childNode1)&&!c(t.childNode2)){if(c(t.imageIndex))return;const r=t.topRight.x-t.bottomLeft.x-n.width,s=t.topRight.y-t.bottomLeft.y-n.height;if(r<0||s<0)return;if(0===r&&0===s)return t;if(r>s){t.childNode1=new sh(new G(t.bottomLeft.x,t.bottomLeft.y),new G(t.bottomLeft.x+n.width,t.topRight.y));const a=t.bottomLeft.x+n.width+e._borderWidthInPixels;a0){const s=e._texture.width,a=e._texture.height,l=2*(s+t.width+r),u=2*(a+t.height+r),d=s/l,h=a/u,m=new sh(new G(s+r,r),new G(l,a)),_=new sh(new G,new G(l,a),e._root,m),p=new sh(new G(r,a+r),new G(l,u)),y=new sh(new G,new G(l,u),_,p);for(let C=0;C0)&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1)),c(o._labelDimensions))_=o._labelDimensions.x,m=o._labelDimensions.y;else{let x=0,C=0;const w=o._imageIndex;if(-1!==w){const D=n[w];if(!c(D))throw new E(`Invalid billboard image index: ${w}`);x=D.height,C=D.width}m=Math.round(g(o.height,e._textureAtlas.texture.dimensions.y*x)),_=Math.round(g(o.width,e._textureAtlas.texture.width*C))}const p=Math.floor(O.clamp(_,0,CR)),y=Math.floor(O.clamp(m,0,CR)),A=p*CR+y;e._instanced?(r=o._index,s(r,a,l,d,A)):(r=4*o._index,s(r+0,a,l,d,A),s(r+1,a,l,d,A),s(r+2,a,l,d,A),s(r+3,a,l,d,A))}function NG(e,t,n,i,o){if(o.heightReference===Qt.CLAMP_TO_GROUND){const p=e._scene,y=t.context,A=t.globeTranslucencyState.translucent,x=c(p.globe)&&p.globe.depthTestAgainstTerrain;e._shaderClampToGround=y.depthTexture&&!A&&x}let r;const s=i[co.textureCoordinateBoundsOrLabelTranslate];if(mn.maximumVertexTextureImageUnits>0){let p=0,y=0;return c(o._labelTranslate)&&(p=o._labelTranslate.x,y=o._labelTranslate.y),void(e._instanced?(r=o._index,s(r,p,y,0,0)):(r=4*o._index,s(r+0,p,y,0,0),s(r+1,p,y,0,0),s(r+2,p,y,0,0),s(r+3,p,y,0,0)))}let a=0,l=0,u=0,d=0;const h=o._imageIndex;if(-1!==h){const p=n[h];if(!c(p))throw new E(`Invalid billboard image index: ${h}`);a=p.x,l=p.y,u=p.width,d=p.height}const m=a+u,_=l+d;e._instanced?(r=o._index,s(r,a,l,m,_)):(r=4*o._index,s(r+0,a,l,m,_),s(r+1,a,l,m,_),s(r+2,a,l,m,_),s(r+3,a,l,m,_))}function MG(e,t,n,i,o){if(!e._sdf)return;let r;const s=i[co.sdf],a=o.outlineColor,l=o.outlineWidth,u=X.floatToByte(a.red),d=X.floatToByte(a.green),h=X.floatToByte(a.blue),m=u*f0+d*zd+h,_=l/qc.RADIUS,p=X.floatToByte(a.alpha)*f0+X.floatToByte(_)*zd;e._instanced?(r=o._index,s(r,m,p)):(r=4*o._index,s(r+0,m+wG,p),s(r+1,m+SG,p),s(r+2,m+vG,p),s(r+3,m+DG,p))}function rEe(e,t,n,i,o){CG(e,0,0,i,o),IG(e,0,n,i,o),PG(e,0,n,i,o),ER(e,t,n,i,o),wR(e,0,n,i,o),OG(e,0,0,i,o),LG(e,0,0,i,o),RG(e,t,n,i,o),NG(e,t,n,i,o),function oEe(e,t,n,i,o){if(!c(e._batchTable))return;const r=i[co.a_batchId],s=o._batchIndex;let a;e._instanced?(a=o._index,r(a,s)):(a=4*o._index,r(a+0,s),r(a+1,s),r(a+2,s),r(a+3,s))}(e,0,0,i,o),MG(e,0,0,i,o)}function SR(e,t,n,i,o,r){let s;i.mode===ce.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;const a=[];for(let l=0;l0){this._vaf=function JCe(e,t,n,i,o,r){const s=[{index:co.positionHighAndScale,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[vT]},{index:co.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[vT]},{index:co.compressedAttribute0,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[pG]},{index:co.compressedAttribute1,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[yG]},{index:co.compressedAttribute2,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[_G]},{index:co.eyeOffset,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[mG]},{index:co.scaleByDistance,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[gG]},{index:co.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[bG]},{index:co.compressedAttribute3,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[AG]},{index:co.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[YCe]}];return i&&s.push({index:co.direction,componentsPerAttribute:2,componentDatatype:ee.FLOAT,vertexBuffer:QCe(e)}),c(o)&&s.push({index:co.a_batchId,componentsPerAttribute:1,componentDatatype:ee.FLOAT,bufferUsage:Tt.STATIC_DRAW}),r&&s.push({index:co.sdf,componentsPerAttribute:2,componentDatatype:ee.FLOAT,usage:n[TG]}),new oG(e,s,i?t:4*t,i)}(i,n,this._buffersUsage,this._instanced,this._batchTable,this._sdf),h=this._vaf.writers;for(let R=0;R0){const R=lEe;R.length=0,(l[vT]||l[jCe]||l[GCe])&&R.push(CG),(l[DT]||l[pG]||l[VCe]||l[HCe]||l[zCe])&&(R.push(IG),this._instanced&&R.push(wR)),(l[DT]||l[WCe]||l[yG])&&(R.push(PG),R.push(ER)),(l[DT]||l[_G])&&R.push(ER),l[mG]&&R.push(wR),l[gG]&&R.push(OG),l[bG]&&R.push(LG),(l[AG]||l[qCe]||l[DT]||l[vT])&&R.push(RG),(l[DT]||l[vT])&&R.push(NG),l[TG]&&R.push(MG);const B=R.length;if(h=this._vaf.writers,a/n>.1){for(let F=0;F1.5*n&&(s.length=n),!c(this._vaf)||!c(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,be.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let p,y=k.IDENTITY;e.mode===ce.SCENE3D?(y=this.modelMatrix,p=be.clone(this._baseVolumeWC,this._boundingVolume)):p=be.clone(this._baseVolume2D,this._boundingVolume),function aEe(e,t,n){let i=1;(!e._allSizedInMeters||0!==e._maxPixelOffset)&&(i=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight));let o=i*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(o*=.5),n.radius+=o+(i*e._maxPixelOffset+e._maxEyeOffset)}(this,e,p);const A=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,A){this._rsOpaque=this._blendOption===xr.OPAQUE||this._blendOption===xr.OPAQUE_AND_TRANSLUCENT?Pt.fromCache({depthTest:{enabled:!0,func:oe.LESS},depthMask:!0}):void 0;const R=this._blendOption===xr.TRANSLUCENT;this._rsTranslucent=this._blendOption===xr.TRANSLUCENT||this._blendOption===xr.OPAQUE_AND_TRANSLUCENT?Pt.fromCache({depthTest:{enabled:!0,func:R?oe.LEQUAL:oe.LESS},depthMask:R,blending:Ji.ALPHA_BLEND}):void 0}let x,C,w,v,D;this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance;const P=mn.maximumVertexTextureImageUnits>0;if(A||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){x="#ifdef INSTANCED\nin vec2 direction;\n#endif\nin vec4 positionHighAndScale;\nin vec4 positionLowAndRotation;\nin vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)\nin vec4 compressedAttribute1; // aligned axis, translucency by distance, image width\nin vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free\nin vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)\nin vec4 scaleByDistance; // near, nearScale, far, farScale\nin vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale\nin vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions\nin vec2 sdf; // sdf outline color (rgb) and width (w)\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\nin vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates\n#endif\n#ifdef VECTOR_TILE\nin float a_batchId;\n#endif\n\nout vec2 v_textureCoordinates;\n#ifdef FRAGMENT_DEPTH_CHECK\nout vec4 v_textureCoordinateBounds;\nout vec4 v_originTextureCoordinateAndTranslate;\nout vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\nout mat2 v_rotationMatrix;\n#endif\n\nout vec4 v_pickColor;\nout vec4 v_color;\n#ifdef SDF\nout vec4 v_outlineColor;\nout float v_outlineWidth;\n#endif\n\nconst float UPPER_BOUND = 32768.0;\n\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\n\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\n\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n{\n // Note the halfSize cannot be computed in JavaScript because it is sent via\n // compressed vertex attributes that coerce it to an integer.\n vec2 halfSize = imageSize * scale * 0.5;\n halfSize *= ((direction * 2.0) - 1.0);\n\n vec2 originTranslate = origin * abs(halfSize);\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n if (validAlignedAxis || rotation != 0.0)\n {\n float angle = rotation;\n if (validAlignedAxis)\n {\n vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);\n angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n }\n\n float cosTheta = cos(angle);\n float sinTheta = sin(angle);\n rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\n halfSize = rotationMatrix * halfSize;\n }\n else\n {\n rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\n mpp = czm_metersPerPixel(positionEC);\n positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\n positionEC.xy += (translate + pixelOffset) * mpp;\n\n return positionEC;\n}\n\n#ifdef VERTEX_DEPTH_CHECK\nfloat getGlobeDepth(vec4 positionEC)\n{\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n\n float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n\n if (globeDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\nvoid main()\n{\n // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndScale.xyz;\n vec3 positionLow = positionLowAndRotation.xyz;\n float scale = positionHighAndScale.w;\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n float rotation = positionLowAndRotation.w;\n#else\n float rotation = 0.0;\n#endif\n\n float compressed = compressedAttribute0.x;\n\n vec2 pixelOffset;\n pixelOffset.x = floor(compressed * SHIFT_RIGHT7);\n compressed -= pixelOffset.x * SHIFT_LEFT7;\n pixelOffset.x -= UPPER_BOUND;\n\n vec2 origin;\n origin.x = floor(compressed * SHIFT_RIGHT5);\n compressed -= origin.x * SHIFT_LEFT5;\n\n origin.y = floor(compressed * SHIFT_RIGHT3);\n compressed -= origin.y * SHIFT_LEFT3;\n\n#ifdef FRAGMENT_DEPTH_CHECK\n vec2 depthOrigin = origin.xy;\n#endif\n origin -= vec2(1.0);\n\n float show = floor(compressed * SHIFT_RIGHT2);\n compressed -= show * SHIFT_LEFT2;\n\n#ifdef INSTANCED\n vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\n vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n#else\n vec2 direction;\n direction.x = floor(compressed * SHIFT_RIGHT1);\n direction.y = compressed - direction.x * SHIFT_LEFT1;\n\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\n\n float temp = compressedAttribute0.y * SHIFT_RIGHT8;\n pixelOffset.y = -(floor(temp) - UPPER_BOUND);\n\n vec2 translate;\n translate.y = (temp - floor(temp)) * SHIFT_LEFT16;\n\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n translate.x = floor(temp) - UPPER_BOUND;\n\n translate.y += (temp - floor(temp)) * SHIFT_LEFT8;\n translate.y -= UPPER_BOUND;\n\n temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\n\n vec2 imageSize = vec2(floor(temp), temp2);\n\n#ifdef FRAGMENT_DEPTH_CHECK\n float labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\n float applyTranslate = 0.0;\n if (labelHorizontalOrigin != 0.0) // is a billboard, so set apply translate to false\n {\n applyTranslate = 1.0;\n labelHorizontalOrigin -= 2.0;\n depthOrigin.x = labelHorizontalOrigin + 1.0;\n }\n\n depthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n#endif\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\n temp = compressedAttribute3.w;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 dimensions;\n dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n dimensions.x = floor(temp);\n#endif\n\n#ifdef ALIGNED_AXIS\n vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\n temp = compressedAttribute2.z * SHIFT_RIGHT5;\n bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\n vec3 alignedAxis = vec3(0.0);\n bool validAlignedAxis = false;\n#endif\n\n vec4 pickColor;\n vec4 color;\n\n temp = compressedAttribute2.y;\n temp = temp * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n\n temp = compressedAttribute2.x;\n temp = temp * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n temp = compressedAttribute2.z * SHIFT_RIGHT8;\n bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\n temp = floor(temp) * SHIFT_RIGHT8;\n\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor /= 255.0;\n\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n\n#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\n float eyeDepth = positionEC.z;\n#endif\n\n positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n positionEC.xyz *= show;\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\n scale *= distanceScale;\n translate *= distanceScale;\n // push vertex behind near plane for clipping\n if (scale == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\n float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\n pixelOffset *= pixelOffsetScale;\n#endif\n\n#ifdef DISTANCE_DISPLAY_CONDITION\n float nearSq = compressedAttribute3.x;\n float farSq = compressedAttribute3.y;\n if (lengthSq < nearSq || lengthSq > farSq)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n mat2 rotationMatrix;\n float mpp;\n\n#ifdef DISABLE_DEPTH_DISTANCE\n float disableDepthTestDistance = compressedAttribute3.z;\n#endif\n\n#ifdef VERTEX_DEPTH_CHECK\nif (lengthSq < disableDepthTestDistance) {\n float depthsilon = 10.0;\n\n vec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\n vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth1 = getGlobeDepth(pEC1);\n\n if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n {\n vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth2 = getGlobeDepth(pEC2);\n\n if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n {\n vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth3 = getGlobeDepth(pEC3);\n if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n {\n positionEC.xyz = vec3(0.0);\n }\n }\n }\n}\n#endif\n\n positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n gl_Position = czm_projection * positionEC;\n v_textureCoordinates = textureCoordinates;\n\n#ifdef LOG_DEPTH\n czm_vertexLogDepth();\n#endif\n\n#ifdef DISABLE_DEPTH_DISTANCE\n if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n {\n disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n }\n\n if (disableDepthTestDistance != 0.0)\n {\n // Don't try to \"multiply both sides\" by w. Greater/less-than comparisons won't work for negative values of w.\n float zclip = gl_Position.z / gl_Position.w;\n bool clipped = (zclip < -1.0 || zclip > 1.0);\n if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n {\n // Position z on the near plane.\n gl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0;\n#endif\n }\n }\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\n if (sizeInMeters) {\n translate /= mpp;\n dimensions /= mpp;\n imageSize /= mpp;\n }\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n v_rotationMatrix = rotationMatrix;\n#else\n v_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n#endif\n\n float enableDepthCheck = 0.0;\n if (lengthSq < disableDepthTestDistance)\n {\n enableDepthCheck = 1.0;\n }\n\n float dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\n float dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\n\n float iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\n float ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\n\n v_compressed.x = eyeDepth;\n v_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\n v_compressed.z = dw * SHIFT_LEFT12 + dh;\n v_compressed.w = iw * SHIFT_LEFT12 + ih;\n v_originTextureCoordinateAndTranslate.xy = depthOrigin;\n v_originTextureCoordinateAndTranslate.zw = translate;\n v_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n\n#endif\n\n#ifdef SDF\n vec4 outlineColor;\n float outlineWidth;\n\n temp = sdf.x;\n temp = temp * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n\n temp = sdf.y;\n temp = temp * SHIFT_RIGHT8;\n float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.a = floor(temp);\n outlineColor /= 255.0;\n\n v_outlineWidth = outlineWidth / 255.0;\n v_outlineColor = outlineColor;\n v_outlineColor.a *= translucency;\n#endif\n\n v_pickColor = pickColor;\n\n v_color = color;\n v_color.a *= translucency;\n\n}\n",C='uniform sampler2D u_atlas;\n\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\n\nin vec2 v_textureCoordinates;\nin vec4 v_pickColor;\nin vec4 v_color;\n\n#ifdef SDF\nin vec4 v_outlineColor;\nin float v_outlineWidth;\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\nin vec4 v_textureCoordinateBounds; // the min and max x and y values for the texture coordinates\nin vec4 v_originTextureCoordinateAndTranslate; // texture coordinate at the origin, billboard translate (used for label glyphs)\nin vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\nin mat2 v_rotationMatrix;\n\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT1 = 2.0;\n\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\n\nfloat getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize)\n{\n vec2 lookupVector = imageSize * (depthLookupST - adjustedST);\n lookupVector = v_rotationMatrix * lookupVector;\n vec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y)); // aligns label glyph with bounding rectangle. Will be zero for billboards because dimensions and imageSize will be equal\n\n vec2 translation = v_originTextureCoordinateAndTranslate.zw;\n\n if (applyTranslate)\n {\n // this is only needed for labels where the horizontal origin is not LEFT\n // it moves the label back to where the "origin" should be since all label glyphs are set to HorizontalOrigin.LEFT\n translation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0));\n }\n\n vec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;\n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));\n\n if (logDepthOrDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\n\n\n#ifdef SDF\n\n// Get the distance from the edge of a glyph at a given position sampling an SDF texture.\nfloat getDistance(vec2 position)\n{\n return texture(u_atlas, position).r;\n}\n\n// Samples the sdf texture at the given position and produces a color based on the fill color and the outline.\nvec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)\n{\n float distance = getDistance(position);\n\n if (outlineWidth > 0.0)\n {\n // Don\'t get the outline edge exceed the SDF_EDGE\n float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);\n float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\n vec4 sdfColor = mix(outlineColor, v_color, outlineFactor);\n float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);\n return vec4(sdfColor.rgb, sdfColor.a * alpha);\n }\n else\n {\n float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\n return vec4(v_color.rgb, v_color.a * alpha);\n }\n}\n#endif\n\nvoid main()\n{\n vec4 color = texture(u_atlas, v_textureCoordinates);\n\n#ifdef SDF\n float outlineWidth = v_outlineWidth;\n vec4 outlineColor = v_outlineColor;\n\n // Get the current distance\n float distance = getDistance(v_textureCoordinates);\n\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n float smoothing = fwidth(distance);\n // Get an offset that is approximately half the distance to the neighbor pixels\n // 0.354 is approximately half of 1/sqrt(2)\n vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));\n\n // Sample the center point\n vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n\n // Sample the 4 neighbors\n vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\n\n // Equally weight the center sample and the 4 neighboring samples\n color = (center + color1 + color2 + color3 + color4)/5.0;\n#else\n // If no derivatives available (IE 10?), just do a single sample\n float smoothing = 1.0/32.0;\n color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n#endif\n\n color = czm_gammaCorrect(color);\n#else\n color = czm_gammaCorrect(color);\n color *= czm_gammaCorrect(v_color);\n#endif\n\n// Fully transparent parts of the billboard are not pickable.\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\n if (color.a < 0.005) // matches 0/255 and 1/255\n {\n discard;\n }\n#else\n// The billboard is rendered twice. The opaque pass discards translucent fragments\n// and the translucent pass discards opaque fragments.\n#ifdef OPAQUE\n if (color.a < 0.995) // matches < 254/255\n {\n discard;\n }\n#else\n if (color.a >= 0.995) // matches 254/255 and 255/255\n {\n discard;\n }\n#endif\n#endif\n\n#ifdef VECTOR_TILE\n color *= u_highlightColor;\n#endif\n out_FragColor = color;\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth();\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\n float temp = v_compressed.y;\n\n temp = temp * SHIFT_RIGHT1;\n\n float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;\n bool enableDepthTest = temp2 != 0.0;\n bool applyTranslate = floor(temp) != 0.0;\n\n if (enableDepthTest) {\n temp = v_compressed.z;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 dimensions;\n dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n dimensions.x = floor(temp);\n\n temp = v_compressed.w;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 imageSize;\n imageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;\n imageSize.x = floor(temp);\n\n vec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;\n adjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);\n\n float epsilonEyeDepth = v_compressed.x + czm_epsilon1;\n float globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);\n\n // negative values go into the screen\n if (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)\n {\n float globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize); // top left corner\n if (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)\n {\n float globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize); // top right corner\n if (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)\n {\n discard;\n }\n }\n }\n }\n#endif\n\n}\n',D=[],c(this._batchTable)&&(D.push("VECTOR_TILE"),x=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(x),C=this._batchTable.getFragmentShaderCallback(!1,void 0)(C)),w=new Et({defines:D,sources:[x]}),this._instanced&&w.defines.push("INSTANCED"),this._shaderRotation&&w.defines.push("ROTATION"),this._shaderAlignedAxis&&w.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&w.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&w.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&w.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&w.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&w.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&w.defines.push(P?"VERTEX_DEPTH_CHECK":"FRAGMENT_DEPTH_CHECK");const R=1-qc.CUTOFF;this._sdf&&w.defines.push("SDF");const B=c(this._batchTable)?"VECTOR_TILE":"";this._blendOption===xr.OPAQUE_AND_TRANSLUCENT&&(v=new Et({defines:["OPAQUE",B],sources:[C]}),this._shaderClampToGround&&v.defines.push(P?"VERTEX_DEPTH_CHECK":"FRAGMENT_DEPTH_CHECK"),this._sdf&&(v.defines.push("SDF"),v.defines.push(`SDF_EDGE ${R}`)),this._sp=mi.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:w,fragmentShaderSource:v,attributeLocations:co}),v=new Et({defines:["TRANSLUCENT",B],sources:[C]}),this._shaderClampToGround&&v.defines.push(P?"VERTEX_DEPTH_CHECK":"FRAGMENT_DEPTH_CHECK"),this._sdf&&(v.defines.push("SDF"),v.defines.push(`SDF_EDGE ${R}`)),this._spTranslucent=mi.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:w,fragmentShaderSource:v,attributeLocations:co})),this._blendOption===xr.OPAQUE&&(v=new Et({defines:[B],sources:[C]}),this._shaderClampToGround&&v.defines.push(P?"VERTEX_DEPTH_CHECK":"FRAGMENT_DEPTH_CHECK"),this._sdf&&(v.defines.push("SDF"),v.defines.push(`SDF_EDGE ${R}`)),this._sp=mi.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:w,fragmentShaderSource:v,attributeLocations:co})),this._blendOption===xr.TRANSLUCENT&&(v=new Et({defines:[B],sources:[C]}),this._shaderClampToGround&&v.defines.push(P?"VERTEX_DEPTH_CHECK":"FRAGMENT_DEPTH_CHECK"),this._sdf&&(v.defines.push("SDF"),v.defines.push(`SDF_EDGE ${R}`)),this._spTranslucent=mi.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:w,fragmentShaderSource:v,attributeLocations:co})),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}const N=e.commandList;if(m.render||m.pick){const R=this._colorCommands,B=this._blendOption===xr.OPAQUE,F=this._blendOption===xr.OPAQUE_AND_TRANSLUCENT,S=this._vaf.va,I=S.length;let M,L=this._uniforms;c(this._batchTable)?(L=this._batchTable.getUniformMapCallback()(L),M=this._batchTable.getPickId()):M="v_pickColor",R.length=I;const U=F?2*I:I;for(let z=0;z0}},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){c(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){const t=g(this._heightOffset,0),n=this._content.tileset.ellipsoid,i=n.cartesianToCartographic(this._billboard.position,dEe);i.height=i.height-t+e;const 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=X.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){const t=this._billboardImage!==e;this._billboardImage=e,t&&h0(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(){const e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}}),Ps.defaultColor=X.WHITE,Ps.defaultPointOutlineColor=X.BLACK,Ps.defaultPointOutlineWidth=0,Ps.defaultPointSize=8,Ps.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},Ps.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)},Ps.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},Ps.prototype.getPropertyInherited=function(e){return m_.getPropertyInherited(this._content,this._batchId,e)},Ps.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},Ps.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},Ps.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},Ps.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};const PT=Ps;let k_;const BG=function hEe(e,t){if(!c(e))throw new E("text is required.");if(""===e)return;t=g(t,g.EMPTY_OBJECT);const n=g(t.font,"10px sans-serif"),i=g(t.stroke,!1),o=g(t.fill,!0),r=g(t.strokeWidth,1),s=g(t.backgroundColor,X.TRANSPARENT),a=g(t.padding,0),l=2*a,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=n;const d=u.getContext("2d",{willReadFrequently:!0});c(k_)||(c(d.imageSmoothingEnabled)?k_="imageSmoothingEnabled":c(d.mozImageSmoothingEnabled)?k_="mozImageSmoothingEnabled":c(d.webkitImageSmoothingEnabled)?k_="webkitImageSmoothingEnabled":c(d.msImageSmoothingEnabled)&&(k_="msImageSmoothingEnabled")),d.font=n,d.lineJoin="round",d.lineWidth=r,d[k_]=!1,u.style.visibility="hidden",document.body.appendChild(u);const h=function fEe(e,t,n,i,o){const r=e.measureText(t);if(/\S/.test(t)){const a=document.defaultView.getComputedStyle(e.canvas).getPropertyValue("font-size").replace("px",""),l=document.createElement("canvas"),u=100,d=r.width+u|0,h=3*a,m=h/2;l.width=d,l.height=h;const _=l.getContext("2d");_.font=n,_.fillStyle="white",_.fillRect(0,0,l.width+1,l.height+1),i&&(_.strokeStyle="black",_.lineWidth=e.lineWidth,_.strokeText(t,u/2,m)),o&&(_.fillStyle="black",_.fillText(t,u/2,m));const p=_.getImageData(0,0,d,h).data,y=p.length,A=4*d;let x,C,w,v;for(x=0;x=0;--x)if(255!==p[x]){v=x/A|0;break}let D=-1;for(x=0;x]/,o=[];let r="",s=Vr.LTR,a="";const l=e.length;for(let u=0;u";case">":return"<"}}Object.defineProperties(ah.prototype,{show:{get:function(){return this._show},set:function(e){if(!c(e))throw new E("value is required.");if(this._show!==e){this._show=e;const t=this._glyphs;for(let i=0,o=t.length;iu+1?s[u+1].Type===Vr.RTL?(l=h+l,a=0):(l=RT(l,a,d.Word),a+=d.Word.length):l=RT(l,0,h)):d.Type===Vr.RTL?l=RT(l,a,h):d.Type===Vr.LTR?(l+=d.Word,a=l.length):(d.Type===Vr.WEAK||d.Type===Vr.BRACKETS)&&(u>0&&s[u-1].Type===Vr.RTL?s.length>u+1?s[u+1].Type===Vr.RTL?l=RT(l,a,h):(l+=d.Word,a=l.length):l+=d.Word:(l+=d.Word,a=l.length))}n+=l,i0;let h=t._backgroundBillboard;const m=e._backgroundBillboardCollection;d?(c(h)||(h=m.add({collection:e,image:HG,imageSubRegion:DEe}),t._backgroundBillboard=h),h.color=t._backgroundColor,h.show=t._show,h.position=t._position,h.eyeOffset=t._eyeOffset,h.pixelOffset=t._pixelOffset,h.horizontalOrigin=Ca.LEFT,h.verticalOrigin=t._verticalOrigin,h.heightReference=t._heightReference,h.scale=t.totalScale,h.pickPrimitive=t,h.id=t._id,h.translucencyByDistance=t._translucencyByDistance,h.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,h.scaleByDistance=t._scaleByDistance,h.distanceDisplayCondition=t._distanceDisplayCondition,h.disableDepthTestDistance=t._disableDepthTestDistance,h.clusterShow=t.clusterShow):c(h)&&(m.remove(h),t._backgroundBillboard=h=void 0);const _=e._glyphTextureCache;for(u=0;u0&&w.height>0){const v=pEe(w,{cutoff:qc.CUTOFF,radius:qc.RADIUS}),D=w.getContext("2d"),P=w.width,N=w.height,R=D.getImageData(0,0,P,N);for(let B=0;B0?C=w.pop():(C=e._billboardCollection.add({collection:e}),C._labelDimensions=new G,C._labelTranslate=new G),a.billboard=C),C.show=t._show,C.position=t._position,C.eyeOffset=t._eyeOffset,C.pixelOffset=t._pixelOffset,C.horizontalOrigin=Ca.LEFT,C.verticalOrigin=t._verticalOrigin,C.heightReference=t._heightReference,C.scale=t.totalScale,C.pickPrimitive=t,C.id=t._id,C.image=A,C.translucencyByDistance=t._translucencyByDistance,C.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,C.scaleByDistance=t._scaleByDistance,C.distanceDisplayCondition=t._distanceDisplayCondition,C.disableDepthTestDistance=t._disableDepthTestDistance,C._batchIndex=t._batchIndex,C.outlineColor=t.outlineColor,t.style===Rl.FILL_AND_OUTLINE?(C.color=t._fillColor,C.outlineWidth=t.outlineWidth):t.style===Rl.FILL?(C.color=t._fillColor,C.outlineWidth=0):t.style===Rl.OUTLINE&&(C.color=X.TRANSPARENT,C.outlineWidth=t.outlineWidth)}}t._repositionAllGlyphs=!0}function GG(e,t,n){return t===Ca.CENTER?-e/2:t===Ca.RIGHT?-(e+n.x):n.x}const Qo=new G,NEe=new G;function MEe(e){const t=e._glyphs,n=e._renderedText;let i,o,r=0,s=0;const a=[];let h,l=Number.NEGATIVE_INFINITY,u=0,d=1;const m=t.length,_=e._backgroundBillboard,p=G.clone(c(_)?e._backgroundPadding:G.ZERO,NEe);for(p.x/=e._relativeSize,p.y/=e._relativeSize,h=0;h0&&(D=x===Ca.CENTER?-s/2-p.x:x===Ca.RIGHT?-(s+2*p.x):0,Qo.x=D*A,Qo.y=C===ao.TOP?y-u-l:C===ao.CENTER?(y-u)/2-l:C===ao.BASELINE?-p.y-l:0,Qo.y=Qo.y*A,_.width=R,_.height=B,_._setTranslate(Qo),_._labelTranslate=G.clone(Qo,_._labelTranslate)),e.heightReference===Qt.CLAMP_TO_GROUND)for(h=0;h0?xr.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)},Vd.prototype.isDestroyed=function(){return!1},Vd.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(),Ye(this)};const kS=Vd,NT="void clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane,\n out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n\n // Distance that p0 is behind the near plane. Negative means p0 is\n // in front of the near plane.\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n\n // Camera looks down -Z.\n // When moving a point along +Z: LESS VISIBLE\n // * Points in front of the camera move closer to the camera.\n // * Points behind the camrea move farther away from the camera.\n // When moving a point along -Z: MORE VISIBLE\n // * Points in front of the camera move farther away from the camera.\n // * Points behind the camera move closer to the camera.\n\n // Positive denominator: -Z, becoming more visible\n // Negative denominator: +Z, becoming less visible\n // Nearly zero: parallel to near plane\n float denominator = -direction.z;\n\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n // p0 is behind the near plane and the line to p1 is nearly parallel to\n // the near plane, so cull the segment completely.\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n // p0 is behind the near plane, and the line to p1 is moving distinctly\n // toward or away from it.\n\n // t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction)\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n // Near plane intersection is not between the two points.\n // We already confirmed p0 is behind the naer plane, so now\n // we know the entire segment is behind it.\n culledByNearPlane = true;\n }\n else\n {\n // Segment crosses the near plane, update p0 to lie exactly on it.\n p0 = p0 + t * direction;\n\n // Numerical noise might put us a bit on the wrong side of the near plane.\n // Don't let that happen.\n p0.z = min(p0.z, -czm_currentFrustum.x);\n\n clipped = true;\n }\n }\n\n clippedPositionEC = vec4(p0, 1.0);\n positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n}\n\nvec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n{\n // expandDirection +1 is to the _left_ when looking from positionEC toward nextEC.\n\n#ifdef POLYLINE_DASH\n // Compute the window coordinates of the points.\n vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\n vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\n vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\n\n // Determine the relative screen space direction of the line.\n vec2 lineDir;\n if (usePrevious) {\n lineDir = normalize(positionWindow.xy - previousWindow.xy);\n }\n else {\n lineDir = normalize(nextWindow.xy - positionWindow.xy);\n }\n angle = atan(lineDir.x, lineDir.y) - 1.570796327; // precomputed atan(1,0)\n\n // Quantize the angle so it doesn't change rapidly between segments.\n angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n#endif\n\n vec4 clippedPrevWC, clippedPrevEC;\n bool prevSegmentClipped, prevSegmentCulled;\n clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\n\n vec4 clippedNextWC, clippedNextEC;\n bool nextSegmentClipped, nextSegmentCulled;\n clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\n\n bool segmentClipped, segmentCulled;\n vec4 clippedPositionWC, clippedPositionEC;\n clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\n\n if (segmentCulled)\n {\n return vec4(0.0, 0.0, 0.0, 1.0);\n }\n\n vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\n vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\n\n // If a segment was culled, we can't use the corresponding direction\n // computed above. We should never see both of these be true without\n // `segmentCulled` above also being true.\n if (prevSegmentCulled)\n {\n directionToPrevWC = -directionToNextWC;\n }\n else if (nextSegmentCulled)\n {\n directionToNextWC = -directionToPrevWC;\n }\n\n vec2 thisSegmentForwardWC, otherSegmentForwardWC;\n if (usePrevious)\n {\n thisSegmentForwardWC = -directionToPrevWC;\n otherSegmentForwardWC = directionToNextWC;\n }\n else\n {\n thisSegmentForwardWC = directionToNextWC;\n otherSegmentForwardWC = -directionToPrevWC;\n }\n\n vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\n\n vec2 leftWC = thisSegmentLeftWC;\n float expandWidth = width * 0.5;\n\n // When lines are split at the anti-meridian, the position may be at the\n // same location as the next or previous position, and we need to handle\n // that to avoid producing NaNs.\n if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n {\n vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\n\n vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\n float leftSumLength = length(leftSumWC);\n leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\n\n // The sine of the angle between the two vectors is given by the formula\n // |a x b| = |a||b|sin(theta)\n // which is\n // float sinAngle = length(cross(vec3(leftWC, 0.0), vec3(-thisSegmentForwardWC, 0.0)));\n // Because the z components of both vectors are zero, the x and y coordinate will be zero.\n // Therefore, the sine of the angle is just the z component of the cross product.\n vec2 u = -thisSegmentForwardWC;\n vec2 v = leftWC;\n float sinAngle = abs(u.x * v.y - u.y * v.x);\n expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n }\n\n vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;\n return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;\n}\n\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\n vec4 positionEC = czm_modelViewRelativeToEye * position;\n vec4 prevEC = czm_modelViewRelativeToEye * previous;\n vec4 nextEC = czm_modelViewRelativeToEye * next;\n return getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);\n}\n",WG="#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\n\nin vec2 v_st;\n\nvoid main()\n{\n czm_materialInput materialInput;\n\n vec2 st = v_st;\n st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);\n\n materialInput.s = st.s;\n materialInput.st = st;\n materialInput.str = vec3(st, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#ifdef VECTOR_TILE\n out_FragColor *= u_highlightColor;\n#endif\n\n czm_writeLogDepth();\n}\n";function ch(e,t,n){if(!c(e))throw new E("context is required");if(!c(t))throw new E("attributes is required");if(!c(n))throw new E("numberOfInstances is required");if(this._attributes=t,this._numberOfInstances=n,0===t.length)return;const i=function BEe(e){let t=!1;const n=e.length;for(let i=0;i=this._numberOfInstances)throw new E("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new E("attributeIndex is out of range");const i=this._attributes,s=4*this._stride*e+4*this._offsets[t];let a;a=this._packFloats&&i[t].componentDatatype!==bt.UNSIGNED_BYTE?function zEe(e,t,n){let i=fe.unpack(e,t,MT);const o=fe.unpackFloat(i);i=fe.unpack(e,t+4,MT);const r=fe.unpackFloat(i);i=fe.unpack(e,t+8,MT);const s=fe.unpackFloat(i);i=fe.unpack(e,t+12,MT);const a=fe.unpackFloat(i);return fe.fromElements(o,r,s,a,n)}(this._batchValues,s,YG):fe.unpack(this._batchValues,s,YG);const l=qG(i,t);return c(l.fromCartesian4)?l.fromCartesian4(a,n):c(l.clone)?l.clone(a,n):a.x};const HEe=[void 0,void 0,new G,new f,new fe],GEe=new fe;function ZEe(e,t){const i=e._attributes[t],o=i.componentsPerAttribute,r=i.functionName,s=function YEe(e){return 1===e?"float":`vec${e}`}(o),a=function XEe(e){return 1===e?".x":2===e?".xy":3===e?".xyz":""}(o);let u=`${s} ${r}(float batchId) \n{ \n vec2 st = computeSt(batchId); \n st.x += batchTextureStep.x * float(${e._offsets[t]}); \n`;return u+=e._packFloats&&i.componentDatatype!==bt.UNSIGNED_BYTE?"vec4 textureValue; \ntextureValue.x = czm_unpackFloat(texture(batchTexture, st)); \ntextureValue.y = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x, 0.0))); \ntextureValue.z = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0))); \ntextureValue.w = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0))); \n":" vec4 textureValue = texture(batchTexture, st); \n",u+=` ${s} value = textureValue${a}; \n`,e._pixelDatatype!==bt.UNSIGNED_BYTE||i.componentDatatype!==ee.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===bt.FLOAT&&i.componentDatatype===ee.UNSIGNED_BYTE&&i.normalize&&(u+="value /= 255.0; \n"):u+="value *= 255.0; \n",u+=" return value; \n} \n",u}ch.prototype.setBatchedAttribute=function(e,t,n){if(e<0||e>=this._numberOfInstances)throw new E("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new E("attributeIndex is out of range");if(!c(n))throw new E("value is required.");const i=this._attributes,r=this.getBatchedAttribute(e,t,HEe[i[t].componentsPerAttribute]),s=qG(this._attributes,t);if(c(s.equals)?s.equals(r,n):r===n)return;const l=GEe;l.x=c(n.x)?n.x:n,l.y=c(n.y)?n.y:0,l.z=c(n.z)?n.z:0,l.w=c(n.w)?n.w:0;const h=4*this._stride*e+4*this._offsets[t];this._packFloats&&i[t].componentDatatype!==bt.UNSIGNED_BYTE?function VEe(e,t,n){let i=fe.packFloat(e.x,MT);fe.pack(i,t,n),i=fe.packFloat(e.y,i),fe.pack(i,t,n+4),i=fe.packFloat(e.z,i),fe.pack(i,t,n+8),i=fe.packFloat(e.w,i),fe.pack(i,t,n+12)}(l,this._batchValues,h):fe.pack(l,this._batchValues,h),this._batchValuesDirty=!0},ch.prototype.update=function(e){c(this._texture)&&!this._batchValuesDirty||0===this._attributes.length||(this._batchValuesDirty=!1,c(this._texture)||function jEe(e,t){const n=e._textureDimensions;e._texture=new jn({context:t,pixelFormat:vt.RGBA,pixelDatatype:e._pixelDatatype,width:n.x,height:n.y,sampler:Hi.NEAREST,flipY:!1})}(this,e.context),function WEe(e){const t=e._textureDimensions;e._texture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}(this))},ch.prototype.getUniformMapCallback=function(){const e=this;return function(t){return 0===e._attributes.length?t:Gn(t,{batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}})}},ch.prototype.getVertexShaderCallback=function(){const e=this._attributes;if(0===e.length)return function(i){return i};let t="uniform highp sampler2D batchTexture; \n";t+=`${function qEe(e){const t=e._stride;return 1===e._textureDimensions.y?`uniform vec4 batchTextureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = batchTextureStep.x; \n float centerX = batchTextureStep.y; \n float numberOfAttributes = float(${t}); \n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n} \n`:`uniform vec4 batchTextureStep; \nuniform vec2 batchTextureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = batchTextureStep.x; \n float centerX = batchTextureStep.y; \n float stepY = batchTextureStep.z; \n float centerY = batchTextureStep.w; \n float numberOfAttributes = float(${t}); \n float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x); \n float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n`}(this)}\n`;const n=e.length;for(let i=0;i0;for(const o in t)if(t.hasOwnProperty(o))if("diffuse"===o||"emission"===o){const s=i&&bwe(t[o],e)?t[o]:`czm_gammaCorrect(${t[o]})`;e.shaderSource+=`material.${o} = ${s}; \n`}else e.shaderSource+="alpha"===o?`material.alpha = ${t.alpha}; \n`:`material.${o} = ${t[o]};\n`}e.shaderSource+="return material;\n}\n"}}(t),function Ewe(e){const t=e._template.uniforms;for(const n in t)t.hasOwnProperty(n)&&KG(e,n)}(t),function Swe(e){const t=e._strict,n=e._template.materials;for(const i in n)if(n.hasOwnProperty(i)){const o=new tt({strict:t,fabric:n[i],count:e._count});e._count=o._count,e._uniforms=Gn(e._uniforms,o._uniforms,!0),e.materials[i]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);const r="czm_getMaterial",s=`${r}_${e._count++}`;if(FT(o,r,s),e.shaderSource=o.shaderSource+e.shaderSource,0===FT(e,i,`${s}(materialInput)`)&&t)throw new E(`strict: shader source does not use material '${i}'.`)}}(t),n=g(n,0===t._translucentFunctions.length||void 0),n=g(e.translucent,n),c(n)&&t._translucentFunctions.push("function"==typeof n?function(){return n(t)}:n)}(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),c(tt._uniformList[this.type])||(tt._uniformList[this.type]=Object.keys(this._uniforms))}function PR(e,t,n,i){if(c(e))for(const o in e)if(e.hasOwnProperty(o)){const r=-1!==t.indexOf(o);(i&&!r||!i&&r)&&n(o,t)}}function ZG(e,t){let n=`fabric: property name '${e}' is not valid. It should be `;for(let i=0;i-1)return!0;return!1}const $G={mat2:oo,mat3:ne,mat4:k},Twe=/\.ktx2$/i;function KG(e,t){const n=e._strict,i=e._template.uniforms,o=i[t],r=function wwe(e){let t=e.type;if(!c(t)){const n=typeof e;if("number"===n)t="float";else if("boolean"===n)t="bool";else if("string"===n||e instanceof jt||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===tt.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"===n)if(Array.isArray(e))(4===e.length||9===e.length||16===e.length)&&(t=`mat${Math.sqrt(e.length)}`);else{let i=0;for(const o in e)e.hasOwnProperty(o)&&(i+=1);i>=2&&i<=4?t=`vec${i}`:6===i&&(t="samplerCube")}}return t}(o);if(!c(r))throw new E(`fabric: uniform '${t}' has invalid type.`);let s;if("channels"===r){if(s=FT(e,t,o,!1),0===s&&n)throw new E(`strict: shader source does not use channels '${t}'.`)}else{if("sampler2D"===r){const u=`${t}Dimensions`;(function vwe(e,t,n){return FT(e,t,t,n)})(e,u)>0&&(i[u]={type:"ivec3",x:1,y:1},KG(e,u))}new RegExp(`uniform\\s+${r}\\s+${t}\\s*;`).test(e.shaderSource)||(e.shaderSource=`uniform ${r} ${t};`+e.shaderSource);const l=`${t}_${e._count++}`;if(s=FT(e,t,l),1===s&&n)throw new E(`strict: shader source does not use uniform '${t}'.`);if(e.uniforms[t]=o,"sampler2D"===r)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(function xwe(e){let t;return function(n,i){const o=n.uniforms,r=o[e],s=t!==r,a=!c(r)||r===tt.DefaultImageId;t=r;let u,d,l=n._textures[e];if(r instanceof HTMLVideoElement){if(r.readyState>=2){if(s&&c(l)&&(l!==i.defaultTexture&&l.destroy(),l=void 0),!c(l)||l===i.defaultTexture){const m=new Hi({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});return l=new jn({context:i,source:r,sampler:m}),void(n._textures[e]=l)}l.copyFrom({source:r})}else c(l)||(n._textures[e]=i.defaultTexture);return}if(r instanceof jn&&r!==l){n._texturePaths[e]=void 0;const m=n._textures[e];return c(m)&&m!==n._defaultTexture&&m.destroy(),n._textures[e]=r,u=`${e}Dimensions`,void(o.hasOwnProperty(u)&&(d=o[u],d.x=r._width,d.y=r._height))}if(s&&c(l)&&a&&(l!==n._defaultTexture&&l.destroy(),l=void 0),c(l)||(n._texturePaths[e]=void 0,l=n._textures[e]=n._defaultTexture,u=`${e}Dimensions`,o.hasOwnProperty(u)&&(d=o[u],d.x=l._width,d.y=l._height)),a)return;const h=r instanceof jt;if(!c(n._texturePaths[e])||h&&r.url!==n._texturePaths[e].url||!h&&r!==n._texturePaths[e]){if("string"==typeof r||h){const m=h?r:jt.createIfNeeded(r);let _;_=Twe.test(m.url)?My(m.url):m.fetchImage(),Promise.resolve(_).then(function(p){n._loadedImages.push({id:e,image:p})}).catch(function(){c(l)&&l!==n._defaultTexture&&l.destroy(),n._textures[e]=n._defaultTexture})}else(r instanceof HTMLCanvasElement||r instanceof HTMLImageElement)&&n._loadedImages.push({id:e,image:r});n._texturePaths[e]=r}}}(t));else if("samplerCube"===r)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(function Cwe(e){return function(t,n){const i=t.uniforms[e];if(i instanceof d_){const r=t._textures[e];return r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=i)}if(c(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=n.defaultCubeMap),i===tt.DefaultCubeMapId)return;const o=i.positiveX+i.negativeX+i.positiveY+i.negativeY+i.positiveZ+i.negativeZ;if(o!==t._texturePaths[e]){const r=[jt.createIfNeeded(i.positiveX).fetchImage(),jt.createIfNeeded(i.negativeX).fetchImage(),jt.createIfNeeded(i.positiveY).fetchImage(),jt.createIfNeeded(i.negativeY).fetchImage(),jt.createIfNeeded(i.positiveZ).fetchImage(),jt.createIfNeeded(i.negativeZ).fetchImage()];Promise.all(r).then(function(s){t._loadedCubeMaps.push({id:e,images:s})}),t._texturePaths[e]=o}}}(t));else if(-1!==r.indexOf("mat")){const u=new $G[r];e._uniforms[l]=function(){return $G[r].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[l]=function(){return e.uniforms[t]}}}function FT(e,t,n,i){i=g(i,!0);let o=0;const a=new RegExp(`([\\w${i?".":""}])?`+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(a,function(l,u,d){return u||d?l:(o+=1,n)}),o}tt._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},tt.DefaultImageId="czm_defaultImage",tt.DefaultCubeMapId="czm_defaultCubeMap",tt._materialCache.addMaterial(tt.ColorType="Color",{fabric:{type:tt.ColorType,uniforms:{color:new X(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),tt._materialCache.addMaterial(tt.ImageType="Image",{fabric:{type:tt.ImageType,uniforms:{image:tt.DefaultImageId,repeat:new G(1,1),color:new X(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}}),tt._materialCache.addMaterial(tt.DiffuseMapType="DiffuseMap",{fabric:{type:tt.DiffuseMapType,uniforms:{image:tt.DefaultImageId,channels:"rgb",repeat:new G(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),tt._materialCache.addMaterial(tt.AlphaMapType="AlphaMap",{fabric:{type:tt.AlphaMapType,uniforms:{image:tt.DefaultImageId,channel:"a",repeat:new G(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),tt._materialCache.addMaterial(tt.SpecularMapType="SpecularMap",{fabric:{type:tt.SpecularMapType,uniforms:{image:tt.DefaultImageId,channel:"r",repeat:new G(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),tt._materialCache.addMaterial(tt.EmissionMapType="EmissionMap",{fabric:{type:tt.EmissionMapType,uniforms:{image:tt.DefaultImageId,channels:"rgb",repeat:new G(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),tt._materialCache.addMaterial(tt.BumpMapType="BumpMap",{fabric:{type:tt.BumpMapType,uniforms:{image:tt.DefaultImageId,channel:"r",strength:.8,repeat:new G(1,1)},source:"uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n vec2 centerPixel = fract(repeat * st);\n float centerBump = texture(image, centerPixel).channel;\n\n float imageWidth = float(imageDimensions.x);\n vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\n float rightBump = texture(image, rightPixel).channel;\n\n float imageHeight = float(imageDimensions.y);\n vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\n float topBump = texture(image, leftPixel).channel;\n\n vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\n vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n\n material.normal = normalEC;\n material.diffuse = vec3(0.01);\n\n return material;\n}\n"},translucent:!1}),tt._materialCache.addMaterial(tt.NormalMapType="NormalMap",{fabric:{type:tt.NormalMapType,uniforms:{image:tt.DefaultImageId,channels:"rgb",strength:.8,repeat:new G(1,1)},source:"uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec4 textureValue = texture(image, fract(repeat * materialInput.st));\n vec3 normalTangentSpace = textureValue.channels;\n normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;\n normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);\n normalTangentSpace = normalize(normalTangentSpace);\n vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n \n material.normal = normalEC;\n \n return material;\n}\n"},translucent:!1}),tt._materialCache.addMaterial(tt.GridType="Grid",{fabric:{type:tt.GridType,uniforms:{color:new X(0,1,0,1),cellAlpha:.1,lineCount:new G(8,8),lineThickness:new G(1,1),lineOffset:new G(0,0)},source:'uniform vec4 color;\nuniform float cellAlpha;\nuniform vec2 lineCount;\nuniform vec2 lineThickness;\nuniform vec2 lineOffset;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\n float value;\n\n // Fuzz Factor - Controls blurriness of lines\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n const float fuzz = 1.2;\n vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;\n\n // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.\n vec2 dx = abs(dFdx(st));\n vec2 dy = abs(dFdy(st));\n vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\n value = min(\n smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n#else\n // If no derivatives available (IE 10?), revert to view-dependent fuzz\n const float fuzz = 0.05;\n\n vec2 range = 0.5 - (lineThickness * 0.05);\n value = min(\n 1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),\n 1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));\n#endif\n\n // Edges taken from RimLightingMaterial.glsl\n // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html\n float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));\n float sRim = smoothstep(0.8, 1.0, dRim);\n value *= (1.0 - sRim);\n\n vec4 halfColor;\n halfColor.rgb = color.rgb * 0.5;\n halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));\n halfColor = czm_gammaCorrect(halfColor);\n material.diffuse = halfColor.rgb;\n material.emission = halfColor.rgb;\n material.alpha = halfColor.a;\n\n return material;\n}\n'},translucent:function(e){const t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}}),tt._materialCache.addMaterial(tt.StripeType="Stripe",{fabric:{type:tt.StripeType,uniforms:{horizontal:!0,evenColor:new X(1,1,1,.5),oddColor:new X(0,0,1,.5),offset:0,repeat:5},source:"uniform vec4 evenColor;\nuniform vec4 oddColor;\nuniform float offset;\nuniform float repeat;\nuniform bool horizontal;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // Based on the Stripes Fragment Shader in the Orange Book (11.1.2)\n float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));\n float value = fract((coord - offset) * (repeat * 0.5));\n float dist = min(value, min(abs(value - 0.5), 1.0 - value));\n\n vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));\n vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);\n color = czm_gammaCorrect(color);\n\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}}),tt._materialCache.addMaterial(tt.CheckerboardType="Checkerboard",{fabric:{type:tt.CheckerboardType,uniforms:{lightColor:new X(1,1,1,.5),darkColor:new X(0,0,0,.5),repeat:new G(5,5)},source:"uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\n float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0\n\n // Find the distance from the closest separator (region between two colors)\n float scaledWidth = fract(repeat.s * st.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n float scaledHeight = fract(repeat.t * st.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n float value = min(scaledWidth, scaledHeight);\n\n vec4 currentColor = mix(lightColor, darkColor, b);\n vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);\n\n color = czm_gammaCorrect(color);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),tt._materialCache.addMaterial(tt.DotType="Dot",{fabric:{type:tt.DotType,uniforms:{lightColor:new X(1,1,0,.75),darkColor:new X(0,1,1,.75),repeat:new G(5,5)},source:"uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\n float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0\n\n vec4 color = mix(lightColor, darkColor, b);\n color = czm_gammaCorrect(color);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),tt._materialCache.addMaterial(tt.WaterType="Water",{fabric:{type:tt.WaterType,uniforms:{baseWaterColor:new X(.2,.3,.6,1),blendColor:new X(0,1,.699,1),specularMap:tt.DefaultImageId,normalMap:tt.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:"// Thanks for the contribution Jonas\n// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog\n\nuniform sampler2D specularMap;\nuniform sampler2D normalMap;\nuniform vec4 baseWaterColor;\nuniform vec4 blendColor;\nuniform float frequency;\nuniform float animationSpeed;\nuniform float amplitude;\nuniform float specularIntensity;\nuniform float fadeFactor;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float time = czm_frameNumber * animationSpeed;\n\n // fade is a function of the distance from the fragment and the frequency of the waves\n float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\n\n float specularMapValue = texture(specularMap, materialInput.st).r;\n\n // note: not using directional motion at this time, just set the angle to 0.0;\n vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\n vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\n\n // fade out the normal perturbation as we move further from the water surface\n normalTangentSpace.xy /= fade;\n\n // attempt to fade out the normal perturbation as we approach non water areas (low specular map value)\n normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\n\n normalTangentSpace = normalize(normalTangentSpace);\n\n // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane\n float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\n\n // fade out water effect as specular map value decreases\n material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\n\n // base color is a blend of the water and non-water color based on the value from the specular map\n // may need a uniform blend factor to better control this\n material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\n\n // diffuse highlights are based on how perturbed the normal is\n material.diffuse += (0.1 * tsPerturbationRatio);\n\n material.diffuse = material.diffuse;\n\n material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\n\n material.specular = specularIntensity;\n material.shininess = 10.0;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}}),tt._materialCache.addMaterial(tt.RimLightingType="RimLighting",{fabric:{type:tt.RimLightingType,uniforms:{color:new X(1,0,0,.7),rimColor:new X(1,1,1,.4),width:.3},source:"uniform vec4 color;\nuniform vec4 rimColor;\nuniform float width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html\n float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));\n float s = smoothstep(1.0 - width, 1.0, d);\n\n vec4 outColor = czm_gammaCorrect(color);\n vec4 outRimColor = czm_gammaCorrect(rimColor);\n\n material.diffuse = outColor.rgb;\n material.emission = outRimColor.rgb * s;\n material.alpha = mix(outColor.a, outRimColor.a, s);\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}}),tt._materialCache.addMaterial(tt.FadeType="Fade",{fabric:{type:tt.FadeType,uniforms:{fadeInColor:new X(1,0,0,1),fadeOutColor:new X(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new G(.5,.5)},source:"uniform vec4 fadeInColor;\nuniform vec4 fadeOutColor;\nuniform float maximumDistance;\nuniform bool repeat;\nuniform vec2 fadeDirection;\nuniform vec2 time;\n\nfloat getTime(float t, float coord)\n{\n float scalar = 1.0 / maximumDistance;\n float q = distance(t, coord) * scalar;\n if (repeat)\n {\n float r = distance(t, coord + 1.0) * scalar;\n float s = distance(t, coord - 1.0) * scalar;\n q = min(min(r, s), q);\n }\n return clamp(q, 0.0, 1.0);\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float s = getTime(time.x, st.s) * fadeDirection.s;\n float t = getTime(time.y, st.t) * fadeDirection.t;\n\n float u = length(vec2(s, t));\n vec4 color = mix(fadeInColor, fadeOutColor, u);\n\n color = czm_gammaCorrect(color);\n material.emission = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}}),tt._materialCache.addMaterial(tt.PolylineArrowType="PolylineArrow",{fabric:{type:tt.PolylineArrowType,uniforms:{color:new X(1,1,1,1)},source:"uniform vec4 color;\n\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\n float slope = (p0.y - p1.y) / (p0.x - p1.x);\n return slope * (x - p0.x) + p0.y;\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;\n#else\n // If no derivatives available (IE 10?), 2.5% of the line will be the arrow head\n float base = 0.975;\n#endif\n\n vec2 center = vec2(1.0, 0.5);\n float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\n float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\n\n float halfWidth = 0.15;\n float s = step(0.5 - halfWidth, st.t);\n s *= 1.0 - step(0.5 + halfWidth, st.t);\n s *= 1.0 - step(base, st.s);\n\n float t = step(base, materialInput.st.s);\n t *= 1.0 - step(ptOnUpperLine, st.t);\n t *= step(ptOnLowerLine, st.t);\n\n // Find the distance from the closest separator (region between two colors)\n float dist;\n if (st.s < base)\n {\n float d1 = abs(st.t - (0.5 - halfWidth));\n float d2 = abs(st.t - (0.5 + halfWidth));\n dist = min(d1, d2);\n }\n else\n {\n float d1 = czm_infinity;\n if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n {\n d1 = abs(st.s - base);\n }\n float d2 = abs(st.t - ptOnUpperLine);\n float d3 = abs(st.t - ptOnLowerLine);\n dist = min(min(d1, d2), d3);\n }\n\n vec4 outsideColor = vec4(0.0);\n vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));\n vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);\n\n outColor = czm_gammaCorrect(outColor);\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n return material;\n}\n"},translucent:!0}),tt._materialCache.addMaterial(tt.PolylineDashType="PolylineDash",{fabric:{type:tt.PolylineDashType,uniforms:{color:new X(1,0,1,1),gapColor:new X(0,0,0,0),dashLength:16,dashPattern:255},source:"uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nin float v_polylineAngle;\n\nconst float maskLength = 16.0;\n\nmat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n\n // Get the relative position within the dash from 0 to 1\n float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\n // Figure out the mask index.\n float maskIndex = floor(dashPosition * maskLength);\n // Test the bit mask.\n float maskTest = floor(dashPattern / pow(2.0, maskIndex));\n vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n if (fragColor.a < 0.005) { // matches 0/255 and 1/255\n discard;\n }\n\n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n}\n"},translucent:!0}),tt._materialCache.addMaterial(tt.PolylineGlowType="PolylineGlow",{fabric:{type:tt.PolylineGlowType,uniforms:{color:new X(0,.5,1,1),glowPower:.25,taperPower:1},source:"uniform vec4 color;\nuniform float glowPower;\nuniform float taperPower;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n\n if (taperPower <= 0.99999) {\n glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\n }\n\n vec4 fragColor;\n fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * color.a;\n fragColor = czm_gammaCorrect(fragColor);\n\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n\n return material;\n}\n"},translucent:!0}),tt._materialCache.addMaterial(tt.PolylineOutlineType="PolylineOutline",{fabric:{type:tt.PolylineOutlineType,uniforms:{color:new X(1,1,1,1),outlineColor:new X(1,0,0,1),outlineWidth:1},source:"uniform vec4 color;\nuniform vec4 outlineColor;\nuniform float outlineWidth;\n\nin float v_width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;\n float b = step(0.5 - halfInteriorWidth, st.t);\n b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n\n // Find the distance from the closest separator (region between two colors)\n float d1 = abs(st.t - (0.5 - halfInteriorWidth));\n float d2 = abs(st.t - (0.5 + halfInteriorWidth));\n float dist = min(d1, d2);\n\n vec4 currentColor = mix(outlineColor, color, b);\n vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\n outColor = czm_gammaCorrect(outColor);\n\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}}),tt._materialCache.addMaterial(tt.ElevationContourType="ElevationContour",{fabric:{type:tt.ElevationContourType,uniforms:{spacing:100,color:new X(1,0,0,1),width:1},source:"uniform vec4 color;\nuniform float spacing;\nuniform float width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float distanceToContour = mod(materialInput.height, spacing);\n\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n float dxc = abs(dFdx(materialInput.height));\n float dyc = abs(dFdy(materialInput.height));\n float dF = max(dxc, dyc) * czm_pixelRatio * width;\n float alpha = (distanceToContour < dF) ? 1.0 : 0.0;\n#else\n // If no derivatives available (IE 10?), use pixel ratio\n float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;\n#endif\n\n vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n\n return material;\n}\n"},translucent:!1}),tt._materialCache.addMaterial(tt.ElevationRampType="ElevationRamp",{fabric:{type:tt.ElevationRampType,uniforms:{image:tt.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:"uniform sampler2D image;\nuniform float minimumHeight;\nuniform float maximumHeight;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);\n vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n"},translucent:!1}),tt._materialCache.addMaterial(tt.SlopeRampMaterialType="SlopeRamp",{fabric:{type:tt.SlopeRampMaterialType,uniforms:{image:tt.DefaultImageId},source:"uniform sampler2D image;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec4 rampColor = texture(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n"},translucent:!1}),tt._materialCache.addMaterial(tt.AspectRampMaterialType="AspectRamp",{fabric:{type:tt.AspectRampMaterialType,uniforms:{image:tt.DefaultImageId},source:"uniform sampler2D image;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n"},translucent:!1}),tt._materialCache.addMaterial(tt.ElevationBandType="ElevationBand",{fabric:{type:tt.ElevationBandType,uniforms:{heights:tt.DefaultImageId,colors:tt.DefaultImageId},source:"uniform sampler2D heights;\nuniform sampler2D colors;\n\n// This material expects heights to be sorted from lowest to highest.\n\nfloat getHeight(int idx, float invTexSize)\n{\n vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);\n#ifdef OES_texture_float\n return texture(heights, uv).x;\n#else\n return czm_unpackFloat(texture(heights, uv));\n#endif\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float height = materialInput.height;\n float invTexSize = 1.0 / float(heightsDimensions.x);\n\n float minHeight = getHeight(0, invTexSize);\n float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize);\n\n // early-out when outside the height range\n if (height < minHeight || height > maxHeight) {\n material.diffuse = vec3(0.0);\n material.alpha = 0.0;\n return material;\n }\n\n // Binary search to find heights above and below.\n int idxBelow = 0;\n int idxAbove = heightsDimensions.x;\n float heightBelow = minHeight;\n float heightAbove = maxHeight;\n\n // while loop not allowed, so use for loop with max iterations.\n // maxIterations of 16 supports a texture size up to 65536 (2^16).\n const int maxIterations = 16;\n for (int i = 0; i < maxIterations; i++) {\n if (idxBelow >= idxAbove - 1) {\n break;\n }\n\n int idxMid = (idxBelow + idxAbove) / 2;\n float heightTex = getHeight(idxMid, invTexSize);\n\n if (height > heightTex) {\n idxBelow = idxMid;\n heightBelow = heightTex;\n } else {\n idxAbove = idxMid;\n heightAbove = heightTex;\n }\n }\n\n float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);\n vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);\n vec4 color = texture(colors, colorUv);\n\n // undo preumultiplied alpha\n if (color.a > 0.0) \n {\n color.rgb /= color.a;\n }\n \n color.rgb = czm_gammaCorrect(color.rgb);\n\n material.diffuse = color.rgb;\n material.alpha = color.a;\n return material;\n}\n"},translucent:!0});const Ea=tt,QG=O.EPSILON10,wa=function Dwe(e,t,n,i){if(T.defined("equalsEpsilon",t),!c(e))return;n=g(n,!1);const o=c(i),r=e.length;if(r<2)return e;let s,l,u,a=e[0],d=0,h=-1;for(s=1;sO.EPSILON12);const I=F*(t*t-n*n)/(n*n),M=I*(256+I*(I*(74-47*I)-128))/1024,U=S*S,j=n*(1+I*(4096+I*(I*(320-175*I)-768))/16384)*(N-M*B*(S+M*(R*(2*U-1)-M*S*(4*B*B-3)*(4*U-3)/6)/4)),W=Math.atan2(_*P,A-C*D),q=Math.atan2(h*P,A*D-C);e._distance=j,e._startHeading=W,e._endHeading=q,e._uSquared=I}(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=Se.clone(t,e._start),e._end=Se.clone(n,e._end),e._start.height=0,e._end.height=0,function Iwe(e){const t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,r=Math.cos(e._startHeading),s=Math.sin(e._startHeading),a=(1-o)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+a*a),u=l*a,d=Math.atan2(a,r),h=l*s,m=h*h,_=1-m,p=Math.sqrt(_),y=t/4,A=y*y,x=A*y,C=A*A,w=1+y-3*A/4+5*x/4-175*C/64,v=1-y+15*A/8-35*x/8,D=1-3*y+35*A/4,P=1-5*y,N=w*d-v*Math.sin(2*d)*y/2-D*Math.sin(4*d)*A/16-P*Math.sin(6*d)*x/48-5*Math.sin(8*d)*C/512,R=e._constants;R.a=n,R.b=i,R.f=o,R.cosineHeading=r,R.sineHeading=s,R.tanU=a,R.cosineU=l,R.sineU=u,R.sigma=d,R.sineAlpha=h,R.sineSquaredAlpha=m,R.cosineSquaredAlpha=_,R.cosineAlpha=p,R.u2Over4=y,R.u4Over16=A,R.u6Over64=x,R.u8Over256=C,R.a0=w,R.a1=v,R.a2=D,R.a3=P,R.distanceRatio=N}(e)}function BT(e,t,n){const i=g(n,ge.WGS84);this._ellipsoid=i,this._start=new Se,this._end=new Se,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,c(e)&&c(t)&&e9(this,e,t,i)}Object.defineProperties(BT.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return T.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return T.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return T.defined("distance",this._distance),this._endHeading}}}),BT.prototype.setEndPoints=function(e,t){T.defined("start",e),T.defined("end",t),e9(this,e,t,this._ellipsoid)},BT.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},BT.prototype.interpolateUsingSurfaceDistance=function(e,t){T.defined("distance",this._distance);const 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),l=Math.sin(4*i),u=Math.sin(6*i),d=Math.sin(8*i),h=i*i,_=n.u8Over256,p=n.u2Over4,y=n.u6Over64,A=n.u4Over16;let x=i*h*2*_*o/3+i*(1-p+7*A/4-15*y/4+579*_/64-(A-15*y/4+187*_/16)*o-(5*y/4-115*_/16)*r-29*_*s/16)+(p/2-A+71*y/32-85*_/16)*a+(5*A/16-5*y/4+383*_/96)*l-h*((y-11*_/2)*a+5*_*l/2)+(29*y/96-29*_/16)*u+539*_*d/1536;const C=Math.asin(Math.sin(x)*n.cosineAlpha),w=Math.atan(n.a/n.b*Math.tan(C));x-=n.sigma;const v=Math.cos(2*n.sigma+x),D=Math.sin(x),P=Math.cos(x),F=Math.atan2(D*n.sineHeading,n.cosineU*P-n.sineU*D*n.cosineHeading)-JG(n.f,n.sineAlpha,n.cosineSquaredAlpha,x,D,P,v);return c(t)?(t.longitude=this._start.longitude+F,t.latitude=w,t.height=0,t):new Se(this._start.longitude+F,w,0)};const kT=BT;function LR(e,t,n){if(0===e)return t*n;const i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,l=a*i,u=n;return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*l/1048576)*u-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*l/524288)*Math.sin(2*u)+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*l/8388608)*Math.sin(4*u)-(35*r/3072+175*s/12288+3675*a/262144+13475*l/1048576)*Math.sin(6*u)+(315*s/131072+2205*a/524288+43659*l/8388608)*Math.sin(8*u)-(693*a/1310720+6237*l/5242880)*Math.sin(10*u)+1001*l/8388608*Math.sin(12*u))}function p0(e,t){if(0===e)return Math.log(Math.tan(.5*(O.PI_OVER_TWO+t)));const n=e*Math.sin(t);return Math.log(Math.tan(.5*(O.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}const Fwe=new f,RR=new f;function t9(e,t,n,i){const o=f.normalize(i.cartographicToCartesian(t,RR),Fwe),r=f.normalize(i.cartographicToCartesian(n,RR),RR);T.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(f.angleBetween(o,r))-Math.PI),.0125);const s=i.maximumRadius,a=i.minimumRadius,l=s*s;e._ellipticitySquared=(l-a*a)/l,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=Se.clone(t,e._start),e._start.height=0,e._end=Se.clone(n,e._end),e._end.height=0,e._heading=function Nwe(e,t,n,i,o){const r=p0(e._ellipticity,n),s=p0(e._ellipticity,o);return Math.atan2(O.negativePiToPi(i-t),s-r)}(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=function Mwe(e,t,n,i,o,r,s){const a=e._heading,l=r-i;let u=0;if(O.equalsEpsilon(Math.abs(a),O.PI_OVER_TWO,O.EPSILON8))if(t===n)u=t*Math.cos(o)*O.negativePiToPi(l);else{const d=Math.sin(o);u=t*Math.cos(o)*O.negativePiToPi(l)/Math.sqrt(1-e._ellipticitySquared*d*d)}else{const d=LR(e._ellipticity,t,o);u=(LR(e._ellipticity,t,s)-d)/Math.cos(a)}return Math.abs(u)}(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function n9(e,t,n,i,o,r){if(0===n)return Se.clone(e,r);const s=o*o;let a,l,u;if(Math.abs(O.PI_OVER_TWO-Math.abs(t))>O.EPSILON8)if(l=function Rwe(e,t,n){const i=e/n;if(0===t)return i;const o=i*i,r=o*i,s=r*i,l=t*t,u=l*l,d=u*l,h=d*l,m=h*l,_=m*l,p=Math.sin(2*i),y=Math.cos(2*i),A=Math.sin(4*i),x=Math.cos(4*i),C=Math.sin(6*i),w=Math.cos(6*i),v=Math.sin(8*i),D=Math.cos(8*i),P=Math.sin(10*i);return i+i*l/4+7*i*u/64+15*i*d/256+579*i*h/16384+1515*i*m/65536+16837*i*_/1048576+(3*i*u/16+45*i*d/256-i*(32*o-561)*h/4096-i*(232*o-1677)*m/16384+i*(399985-90560*o+512*s)*_/5242880)*y+(21*i*d/256+483*i*h/4096-i*(224*o-1969)*m/16384-i*(33152*o-112599)*_/1048576)*x+(151*i*h/4096+4681*i*m/65536+1479*i*_/16384-453*r*_/32768)*w+(1097*i*m/65536+42783*i*_/1048576)*D+8011*i*_/1048576*Math.cos(10*i)+(3*l/8+3*u/16+213*d/2048-3*o*d/64+255*h/4096-33*o*h/512+20861*m/524288-33*o*m/512+s*m/1024+28273*_/1048576-471*o*_/8192+9*s*_/4096)*p+(21*u/256+21*d/256+533*h/8192-21*o*h/512+197*m/4096-315*o*m/4096+584039*_/16777216-12517*o*_/131072+7*s*_/2048)*A+(151*d/6144+151*h/4096+5019*m/131072-453*o*m/16384+26965*_/786432-8607*o*_/131072)*C+(1097*h/131072+1097*m/65536+225797*_/10485760-1097*o*_/65536)*v+(8011*m/2621440+8011*_/1048576)*P+293393*_/251658240*Math.sin(12*i)}(LR(o,i,e.latitude)+n*Math.cos(t),o,i),Math.abs(t)0?e.longitude+u:e.longitude-u)}return c(r)?(r.longitude=a,r.latitude=l,r.height=0,r):new Se(a,l,0)}function lh(e,t,n){const i=g(n,ge.WGS84);this._ellipsoid=i,this._start=new Se,this._end=new Se,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,c(e)&&c(t)&&t9(this,e,t,i)}Object.defineProperties(lh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return T.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return T.defined("distance",this._distance),this._heading}}}),lh.fromStartHeadingDistance=function(e,t,n,i,o){T.defined("start",e),T.defined("heading",t),T.defined("distance",n),T.typeOf.number.greaterThan("distance",n,0);const r=g(i,ge.WGS84),s=r.maximumRadius,a=r.minimumRadius,l=s*s,d=Math.sqrt((l-a*a)/l),h=n9(e,t=O.negativePiToPi(t),n,r.maximumRadius,d);return!c(o)||c(i)&&!i.equals(o.ellipsoid)?new lh(e,h,r):(o.setEndPoints(e,h),o)},lh.prototype.setEndPoints=function(e,t){T.defined("start",e),T.defined("end",t),t9(this,e,t,this._ellipsoid)},lh.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},lh.prototype.interpolateUsingSurfaceDistance=function(e,t){if(T.typeOf.number("distance",e),!c(this._distance)||0===this._distance)throw new E("EllipsoidRhumbLine must have distinct start and end set.");return n9(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},lh.prototype.findIntersectionWithLongitude=function(e,t){if(T.typeOf.number("intersectionLongitude",e),!c(this._distance)||0===this._distance)throw new E("EllipsoidRhumbLine must have distinct start and end set.");const n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=O.negativePiToPi(e),O.equalsEpsilon(Math.abs(e),Math.PI,O.EPSILON14)&&(e=O.sign(r.longitude)*Math.PI),c(t)||(t=new Se),Math.abs(O.PI_OVER_TWO-o)<=O.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(O.equalsEpsilon(Math.abs(O.PI_OVER_TWO-o),O.PI_OVER_TWO,O.EPSILON8))return O.equalsEpsilon(e,r.longitude,O.EPSILON12)?void 0:(t.longitude=e,t.latitude=O.PI_OVER_TWO*O.sign(O.PI_OVER_TWO-i),t.height=0,t);const s=r.latitude,a=n*Math.sin(s),l=Math.tan(.5*(O.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),u=(1+a)/(1-a);let h,d=r.latitude;do{h=d;const m=n*Math.sin(h);d=2*Math.atan(l*Math.pow((1+m)/(1-m)/u,n/2))-O.PI_OVER_TWO}while(!O.equalsEpsilon(d,h,O.EPSILON12));return t.longitude=e,t.latitude=d,t.height=0,t},lh.prototype.findIntersectionWithLatitude=function(e,t){if(T.typeOf.number("intersectionLatitude",e),!c(this._distance)||0===this._distance)throw new E("EllipsoidRhumbLine must have distinct start and end set.");const n=this._ellipticity,i=this._heading,o=this._start;if(O.equalsEpsilon(Math.abs(i),O.PI_OVER_TWO,O.EPSILON8))return;const r=p0(n,o.latitude),s=p0(n,e),a=Math.tan(i)*(s-r),l=O.negativePiToPi(o.longitude+a);return c(t)?(t.longitude=l,t.latitude=e,t.height=0,t):new Se(l,e,0)};const Hd=lh,Za={numberOfPoints:function(e,t,n){const i=f.distance(e,t);return Math.ceil(i/n)},numberOfPointsRhumbLine:function(e,t,n){const 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))))}},Bwe=new Se;Za.extractHeights=function(e,t){const n=e.length,i=new Array(n);for(let o=0;o0){t=g(t,k.IDENTITY);const o=k.inverseTransformation(t,kwe),r=k.multiplyByPoint(o,f.ZERO,Uwe),s=f.normalize(k.multiplyByPointAsVector(o,f.UNIT_Y,i9),i9),a=Hn.fromPointNormal(r,s,zwe),l=f.normalize(k.multiplyByPointAsVector(o,f.UNIT_X,o9),o9),u=Hn.fromPointNormal(r,l,Vwe);let d=1;n.push(f.clone(e[0]));let h=n[0];const m=e.length;for(let _=1;_2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(f.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id,c(t)&&(i=k.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=Hr.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(c9),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=be.fromPoints(this._actualPositions),this._boundingVolumeWC=be.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new be}const a9=Yc.POSITION_INDEX=0,Xwe=Yc.SHOW_INDEX=1,Zwe=Yc.WIDTH_INDEX=2,$we=Yc.MATERIAL_INDEX=3,zT=Yc.POSITION_SIZE_INDEX=4,Kwe=Yc.DISTANCE_DISPLAY_CONDITION=5,c9=Yc.NUMBER_OF_PROPERTIES=6;function uh(e,t){++e._propertiesChanged[t];const n=e._polylineCollection;c(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(Yc.prototype,{show:{get:function(){return this._show},set:function(e){if(!c(e))throw new E("value is required.");e!==this._show&&(this._show=e,uh(this,Xwe))}},positions:{get:function(){return this._positions},set:function(e){if(!c(e))throw new E("value is required.");let t=wa(e,f.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(f.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&uh(this,zT),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=be.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=be.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),uh(this,a9),this.update()}},material:{get:function(){return this._material},set:function(e){if(!c(e))throw new E("material is required.");this._material!==e&&(this._material=e,uh(this,$we))}},width:{get:function(){return this._width},set:function(e){if(!c(e))throw new E("value is required.");e!==this._width&&(this._width=e,uh(this,Zwe))}},loop:{get:function(){return this._loop},set:function(e){if(!c(e))throw new E("value is required.");if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!f.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(f.clone(t[0]))):t.length>2&&f.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,uh(this,zT)}}},id:{get:function(){return this._id},set:function(e){this._id=e,c(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!c(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far distance must be greater than near distance.");Jn.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Jn.clone(e,this._distanceDisplayCondition),uh(this,Kwe))}}}),Yc.prototype.update=function(){let e=k.IDENTITY;c(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);const t=this._segments.positions.length,n=this._segments.lengths,i=this._propertiesChanged[a9]>0||this._propertiesChanged[zT]>0;if((!k.equals(e,this._modelMatrix)||i)&&(this._segments=Hr.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=be.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=k.clone(e,this._modelMatrix),this._segments.positions.length!==t)uh(this,zT);else{const o=n.length;for(let r=0;r2){if(o[BR]||o[l9]){const p=e.mode===ce.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,y=Gi.fromCartesian(p.center,d9),A=fe.fromElements(y.low.x,y.low.y,y.low.z,p.radius,f9);this._batchTable.setBatchedAttribute(i._index,2,y.high),this._batchTable.setBatchedAttribute(i._index,3,A)}if(o[tSe]){const p=h9;p.x=0,p.y=Number.MAX_VALUE;const y=i.distanceDisplayCondition;c(y)&&(p.x=y.near,p.y=y.far),this._batchTable.setBatchedAttribute(i._index,4,p)}}i._clean()}}l.length=0,this._polylinesUpdated=!1}o=this._propertiesChanged;for(let l=0;l0){const q=B.isTranslucent();a>=s?(S=new Zt({owner:e}),n.push(S)):S=n[a],++a,I=Gn(m(B._uniforms),e._uniformMap),S.boundingVolume=be.clone(VT,S.boundingVolume),S.modelMatrix=i,S.shaderProgram=D,S.vertexArray=y.va,S.renderState=q?e._translucentRS:e._opaqueRS,S.pass=q?ze.TRANSLUCENT:ze.OPAQUE,S.debugShowBoundingVolume=d,S.pickId="v_pickColor",S.uniformMap=I,S.count=F,S.offset=v,v+=F,F=0,l=!0,r.push(S)}B=M._material,B.update(o),R=U}const z=M._locatorBuckets,j=z.length;for(let q=0;q0&&(a>=s?(S=new Zt({owner:e}),n.push(S)):S=n[a],++a,I=Gn(m(B._uniforms),e._uniformMap),S.boundingVolume=be.clone(VT,S.boundingVolume),S.modelMatrix=i,S.shaderProgram=D,S.vertexArray=y.va,S.renderState=B.isTranslucent()?e._translucentRS:e._opaqueRS,S.pass=B.isTranslucent()?ze.TRANSLUCENT:ze.OPAQUE,S.debugShowBoundingVolume=d,S.pickId="v_pickColor",S.uniformMap=I,S.count=F,S.offset=v,l=!0,r.push(S)),R=void 0}}n.length=a}(this,e,this._colorCommands,r)};const VT=new be,p9=new be;Ru.prototype.isDestroyed=function(){return!1},Ru.prototype.destroy=function(){return g9(this),UR(this),y9(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),Ye(this)};const m9=[0,0,0];function _9(e,t,n){e._createVertexArray=!1,UR(e),g9(e),function aSe(e){const t=e._mode,n=e._modelMatrix,i=e._polylineBuckets={},o=e._polylines,r=o.length;for(let s=0;s1){a.update();const l=a.material;let u=i[l.type];c(u)||(u=i[l.type]=new Gd(l,t,n)),u.addPolyline(a)}}}(e);const i=[[]];let o=i[0];const r=e._batchTable,s=e._useHighlightColor,a=[0];let l=0;const u=[[]];let d=0;const h=e._polylineBuckets;let m,_;for(m in h)h.hasOwnProperty(m)&&(_=h[m],_.updateShader(t,r,s),d+=_.lengthOfPositions);if(d>0){const p=e._mode,y=new Float32Array(6*d*3),A=new Float32Array(4*d);let x,C=0,w=0,v=0;for(m in h)if(h.hasOwnProperty(m)){_=h[m],_.write(y,A,C,w,v,r,t,n),p===ce.MORPHING&&(c(x)||(x=new Float32Array(6*d*3)),_.writeForMorph(x,C));const I=_.lengthOfPositions;C+=6*I*3,w+=4*I,v+=4*I,l=_.updateIndices(i,a,u,l)}const D=e._positionBufferUsage.bufferUsage,P=Tt.STATIC_DRAW;let N;e._positionBuffer=yn.createVertexBuffer({context:t,typedArray:y,usage:D}),c(x)&&(N=yn.createVertexBuffer({context:t,typedArray:x,usage:D})),e._texCoordExpandAndBatchIndexBuffer=yn.createVertexBuffer({context:t,typedArray:A,usage:P});const R=3*Float32Array.BYTES_PER_ELEMENT,B=4*Float32Array.BYTES_PER_ELEMENT;let F=0;const S=i.length;for(let I=0;I0){const L=new Uint16Array(o),M=yn.createIndexBuffer({context:t,typedArray:L,usage:Tt.STATIC_DRAW,indexDatatype:Ot.UNSIGNED_SHORT});F+=a[I];const U=6*(I*(R*O.SIXTY_FOUR_KILOBYTES)-F*R),z=R+U,j=R+z,W=R+j,q=R+W,V=R+q,Z=[{index:bc.position3DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:U,strideInBytes:6*R},{index:bc.position3DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:z,strideInBytes:6*R},{index:bc.position2DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:U,strideInBytes:6*R},{index:bc.position2DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:z,strideInBytes:6*R},{index:bc.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:j,strideInBytes:6*R},{index:bc.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:W,strideInBytes:6*R},{index:bc.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:j,strideInBytes:6*R},{index:bc.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:W,strideInBytes:6*R},{index:bc.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:q,strideInBytes:6*R},{index:bc.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:V,strideInBytes:6*R},{index:bc.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:q,strideInBytes:6*R},{index:bc.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:V,strideInBytes:6*R},{index:bc.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:ee.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:I*(B*O.SIXTY_FOUR_KILOBYTES)-F*B}];let ie,Y,Q,K;p===ce.SCENE3D?(Y=e._positionBuffer,ie="vertexBuffer",Q=m9,K="value"):p===ce.SCENE2D||p===ce.COLUMBUS_VIEW?(Y=m9,ie="value",Q=e._positionBuffer,K="vertexBuffer"):(Y=N,ie="vertexBuffer",Q=e._positionBuffer,K="vertexBuffer"),Z[0][ie]=Y,Z[1][ie]=Y,Z[2][K]=Q,Z[3][K]=Q,Z[4][ie]=Y,Z[5][ie]=Y,Z[6][K]=Q,Z[7][K]=Q,Z[8][ie]=Y,Z[9][ie]=Y,Z[10][K]=Q,Z[11][K]=Q;const me=new ds({context:t,attributes:Z,indexBuffer:M});e._vertexArrays.push({va:me,buckets:u[I]})}}}function rSe(e,t){return t instanceof jn?t.id:t}const VS=[];function sSe(e){const t=Ea._uniformList[e.type],n=t.length;VS.length=2*n;let i=0;for(let o=0;o farSq)\n {\n show = 0.0;\n }\n #endif\n\n float polylineAngle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\n gl_Position = czm_viewportOrthographic * positionWC * show;\n\n v_st.s = texCoord;\n v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\n\n v_width = width;\n v_pickColor = pickColor;\n v_polylineAngle = polylineAngle;\n}\n"),s=new Et({defines:i,sources:[NT,r]});this.shaderProgram=mi.fromCache({context:e,vertexShaderSource:s,fragmentShaderSource:o,attributeLocations:bc})},Gd.prototype.getPolylinePositionsLength=function(e){let t;if(this.mode===ce.SCENE3D||!b9(e))return t=e._actualPositions.length,4*t-4;let n=0;const i=e._segments.lengths;t=i.length;for(let o=0;o0,A=_._index,x=this.getSegments(_,a),C=x.positions,w=x.lengths,v=C.length,D=_.getPickId(s).color;let R,P=0,N=0;for(let j=0;j0||$r.x>0&&Ml.x<0)&&f.clone($r,Ml),($r.x<0&&Fl.x>0||$r.x>0&&Fl.x<0)&&f.clone($r,Fl));const Z=V?2:4;for(let ie=q?2:0;ie2&&(r.setBatchedAttribute(A,2,L),r.setBatchedAttribute(A,3,M),r.setBatchedAttribute(A,4,U))}};const dSe=new f,fSe=new f,hSe=new f,A9=new f;Gd.prototype.writeForMorph=function(e,t){const n=this.modelMatrix,i=this.polylines,o=i.length;for(let r=0;r0&&(l=a[a.length-1]+1);const u=this.polylines,d=u.length;for(let h=0;h0))continue;_[0]=y}else _=m._segments.lengths;const p=_.length;if(p>0){let y=0;for(let A=0;AO.SIXTY_FOUR_KILOBYTES&&(m._locatorBuckets.push({locator:r,count:y}),y=0,t.push(4),a=[],e.push(a),l=0,r.count=s,s=0,i=0,r=new zR(0,0,this),n[++o]=[r]),a.push(l,l+2,l+1),a.push(l+1,l+2,l+3),y+=6,s+=6,i+=6,l+=4}m._locatorBuckets.push({locator:r,count:y}),l+4>O.SIXTY_FOUR_KILOBYTES&&(t.push(0),a=[],e.push(a),l=0,r.count=s,i=0,s=0,r=new zR(0,0,this),n[++o]=[r])}m._clean()}return r.count=s,i},Gd.prototype.getPolylineStartIndex=function(e){const t=this.polylines;let n=0;const i=t.length;for(let o=0;o0){e._boundingVolume2D=be.fromPoints(o,e._boundingVolume2D);const u=e._boundingVolume2D.center;e._boundingVolume2D.center=new f(u.z,u.x,u.y)}return m0.positions=o,m0.lengths=e._segments.lengths,m0},Gd.prototype.writeUpdate=function(e,t,n,i){const o=this.mode,r=i.ellipsoid.maximumRadius*O.PI;let s=t._actualLength;if(s){e+=this.getPolylineStartIndex(t);let a=x9;const l=6*s*3;!c(a)||a.lengthl&&(a=new Float32Array(a.buffer,0,l));const u=this.getSegments(t,i),d=u.positions,h=u.lengths;let y,m=0,_=0,p=0;s=d.length;for(let A=0;A0||$r.x>0&&Ml.x<0)&&f.clone($r,Ml),($r.x<0&&Fl.x>0||$r.x>0&&Fl.x<0)&&f.clone($r,Fl));const D=w?2:4;for(let P=C?2:0;P{if(e.isDestroyed())return;e._positions=new Float64Array(a.positions);const l=e._billboardCollection,u=e._labelCollection,d=e._polylineCollection;n=e._positions;const h=e._batchIds,m=n.length/3;for(let _=0;_{e.isDestroyed()||(e._error=a)})}(this,e.mapProjection.ellipsoid)),c(this._error)){const t=this._error;throw this._error=void 0,t}},jp.prototype.isDestroyed=function(){return!1},jp.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),Ye(this)};const DSe=jp;function dh(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=g(e.ellipsoid,ge.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=g(e.center,f.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Yo.BOTH}Object.defineProperties(dh.prototype,{trianglesLength:{get:function(){return c(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return c(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});const OSe=new pa("createVectorTilePolygons",5),LSe=new X;dh.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},dh.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},dh.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},dh.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},dh.prototype.update=function(e){if(this._ready)this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e);else if(c(this._promise)||(this._promise=function RSe(e){if(c(e._primitive))return;let t=e._positions,n=e._counts,i=e._indexCounts,o=e._indices,r=e._transferrableBatchIds,s=e._batchTableColors,a=e._packedBuffer;if(!c(s)){t=e._positions=e._positions.slice(),n=e._counts=e._counts.slice(),i=e._indexCounts=e._indexCounts.slice(),o=e._indices=e._indices.slice(),e._center=e._ellipsoid.cartographicToCartesian(Ce.center(e._rectangle)),r=e._transferrableBatchIds=new Uint32Array(e._batchIds),s=e._batchTableColors=new Uint32Array(r.length);const _=e._batchTable,p=s.length;for(let y=0;y{if(e.isDestroyed())return;e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;const p=new Float64Array(_.packedBuffer),y=p[0];(function PSe(e,t){let n=1;const i=t[n++],o=e._boundingVolumes=new Array(i);for(let a=0;a{e.isDestroyed()||(e._error=_)}):void 0}(this)),c(this._error)){const t=this._error;throw this._error=void 0,t}},dh.prototype.isDestroyed=function(){return!1},dh.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Ye(this)};const MSe=dh;function Nu(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=g(e.ellipsoid,ge.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=X.clone(X.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(Nu.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});const kSe=new pa("createVectorTilePolylines",5),_0={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};const jT=new k,C9=new f;Nu.getPolylinePositions=function(e,t){const n=e._batchIds,i=e._decodedPositions,o=e._decodedPositionOffsets;if(!c(n)||!c(i))return;let r,s;const a=n.length;let l=0,u=0;for(r=0;r{e.isDestroyed()||(e._error=d)}):void 0}(this,t)),c(this._error)){const i=this._error;throw this._error=void 0,i}return}(function VSe(e,t){c(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){return k.clone(t.uniformState.view,jT),k.multiplyByPoint(jT,e._center,C9),k.setTranslation(jT,C9,jT),jT},u_highlightColor:function(){return e._highlightColor}})})(this,t),function jSe(e,t){if(c(e._sp))return;const n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)("in vec4 currentPosition;\nin vec4 previousPosition;\nin vec4 nextPosition;\nin vec2 expandAndWidth;\nin float a_batchId;\n\nuniform mat4 u_modifiedModelView;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = u_modifiedModelView * currentPosition;\n vec4 prev = u_modifiedModelView * previousPosition;\n vec4 next = u_modifiedModelView * nextPosition;\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n}\n"),o=n.getFragmentShaderCallback(!1,void 0,!1)("uniform vec4 u_highlightColor; \nvoid main()\n{\n out_FragColor = u_highlightColor;\n}\n"),r=new Et({defines:["VECTOR_TILE",zn.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[NT,i]}),s=new Et({defines:["VECTOR_TILE"],sources:[o]});e._sp=mi.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:_0})}(this,t),function HSe(e){c(e._rs)||(e._rs=Pt.fromCache({blending:Ji.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:{enabled:!0,factor:-5,units:-5}}))}(this);const n=e.passes;(n.render||n.pick)&&function WSe(e,t){if(!c(e._command)){const n=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new Zt({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:n,boundingVolume:e._boundingVolume,pass:ze.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}(this,e)},Nu.prototype.isDestroyed=function(){return!1},Nu.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),Ye(this)};const E9=Nu;function fh(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=g(e.ellipsoid,ge.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,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._minimumMaximumVectorHeights=new G(wo._defaultMinTerrainHeight,wo._defaultMaxTerrainHeight),this._boundingVolume=Eo.fromRectangle(e.rectangle,wo._defaultMinTerrainHeight,wo._defaultMaxTerrainHeight,this._ellipsoid),this._classificationType=e.classificationType,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._startEllipsoidNormals=void 0,this._endEllipsoidNormals=void 0,this._startPositionAndHeights=void 0,this._startFaceNormalAndVertexCornerIds=void 0,this._endPositionAndHeights=void 0,this._endFaceNormalAndHalfWidths=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=X.clone(X.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(fh.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});const eve=new pa("createVectorTileClampedPolylines"),Wp={startEllipsoidNormal:0,endEllipsoidNormal:1,startPositionAndHeight:2,endPositionAndHeight:3,startFaceNormalAndVertexCorner:4,endFaceNormalAndHalfWidth:5,a_batchId:6};const WT=new k,w9=new f;function S9(e){return Pt.fromCache({cull:{enabled:!0,face:dr.FRONT},blending:Ji.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Bi.EQUAL,frontOperation:{fail:Xt.KEEP,zFail:Xt.KEEP,zPass:Xt.KEEP},backFunction:Bi.EQUAL,backOperation:{fail:Xt.KEEP,zFail:Xt.KEEP,zPass:Xt.KEEP},reference:Tn.CESIUM_3D_TILE_MASK,mask:Tn.CESIUM_3D_TILE_MASK}})}fh.prototype.getPositions=function(e){return E9.getPolylinePositions(this,e)},fh.prototype.createFeatures=function(e,t){const n=this._batchIds,i=n.length;for(let o=0;o{e.isDestroyed()||(e._error=t)})}(this).then(function tve(e,t){if(c(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;c(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=function JSe(e){const t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,a=new Float64Array(2+Ce.packedLength+ge.packedLength+f.packedLength);let l=0;return a[l++]=n,a[l++]=i,Ce.pack(t,a,l),l+=Ce.packedLength,ge.pack(o,a,l),l+=ge.packedLength,f.pack(r,a,l),a}(e));const u=eve.scheduleTask({positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer]);return c(u)?u.then(function(d){e.isDestroyed()||(e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(d.decodedPositions),e._decodedPositionOffsets=new Uint32Array(d.decodedPositionOffsets)),e._startEllipsoidNormals=new Float32Array(d.startEllipsoidNormals),e._endEllipsoidNormals=new Float32Array(d.endEllipsoidNormals),e._startPositionAndHeights=new Float32Array(d.startPositionAndHeights),e._startFaceNormalAndVertexCornerIds=new Float32Array(d.startFaceNormalAndVertexCornerIds),e._endPositionAndHeights=new Float32Array(d.endPositionAndHeights),e._endFaceNormalAndHalfWidths=new Float32Array(d.endFaceNormalAndHalfWidths),e._vertexBatchIds=new Uint16Array(d.vertexBatchIds),e._indices=d.indexDatatype===Ot.UNSIGNED_SHORT?new Uint16Array(d.indices):new Uint32Array(d.indices),function nve(e,t){if(!c(e._va)){const n=e._startEllipsoidNormals,i=e._endEllipsoidNormals,o=e._startPositionAndHeights,r=e._endPositionAndHeights,s=e._startFaceNormalAndVertexCornerIds,a=e._endFaceNormalAndHalfWidths,l=e._vertexBatchIds,u=e._indices;let d=n.byteLength+i.byteLength;d+=o.byteLength+r.byteLength,d+=s.byteLength+a.byteLength,d+=l.byteLength+u.byteLength,e._trianglesLength=u.length/3,e._geometryByteLength=d;const h=yn.createVertexBuffer({context:t,typedArray:n,usage:Tt.STATIC_DRAW}),m=yn.createVertexBuffer({context:t,typedArray:i,usage:Tt.STATIC_DRAW}),_=yn.createVertexBuffer({context:t,typedArray:o,usage:Tt.STATIC_DRAW}),p=yn.createVertexBuffer({context:t,typedArray:r,usage:Tt.STATIC_DRAW}),y=yn.createVertexBuffer({context:t,typedArray:s,usage:Tt.STATIC_DRAW}),A=yn.createVertexBuffer({context:t,typedArray:a,usage:Tt.STATIC_DRAW}),x=yn.createVertexBuffer({context:t,typedArray:l,usage:Tt.STATIC_DRAW}),C=yn.createIndexBuffer({context:t,typedArray:u,usage:Tt.STATIC_DRAW,indexDatatype:2===u.BYTES_PER_ELEMENT?Ot.UNSIGNED_SHORT:Ot.UNSIGNED_INT});e._va=new ds({context:t,attributes:[{index:Wp.startEllipsoidNormal,vertexBuffer:h,componentDatatype:ee.FLOAT,componentsPerAttribute:3},{index:Wp.endEllipsoidNormal,vertexBuffer:m,componentDatatype:ee.FLOAT,componentsPerAttribute:3},{index:Wp.startPositionAndHeight,vertexBuffer:_,componentDatatype:ee.FLOAT,componentsPerAttribute:4},{index:Wp.endPositionAndHeight,vertexBuffer:p,componentDatatype:ee.FLOAT,componentsPerAttribute:4},{index:Wp.startFaceNormalAndVertexCorner,vertexBuffer:y,componentDatatype:ee.FLOAT,componentsPerAttribute:4},{index:Wp.endFaceNormalAndHalfWidth,vertexBuffer:A,componentDatatype:ee.FLOAT,componentsPerAttribute:4},{index:Wp.a_batchId,vertexBuffer:x,componentDatatype:ee.UNSIGNED_SHORT,componentsPerAttribute:1}],indexBuffer:C}),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}}(e,t),e._ready=!0)}).catch(d=>{e.isDestroyed()||(e._error=d)}):void 0}(this,t))),c(this._error)){const i=this._error;throw this._error=void 0,i}return}(function ive(e,t){c(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){return k.clone(t.uniformState.view,WT),k.multiplyByPoint(WT,e._center,w9),k.setTranslation(WT,w9,WT),WT},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})})(this,t),function rve(e,t){if(c(e._sp))return;const n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)('in vec3 startEllipsoidNormal;\nin vec3 endEllipsoidNormal;\nin vec4 startPositionAndHeight;\nin vec4 endPositionAndHeight;\nin vec4 startFaceNormalAndVertexCorner;\nin vec4 endFaceNormalAndHalfWidth;\nin float a_batchId;\n\nuniform mat4 u_modifiedModelView;\nuniform vec2 u_minimumMaximumVectorHeights;\n\nout vec4 v_startPlaneEC;\nout vec4 v_endPlaneEC;\nout vec4 v_rightPlaneEC;\nout float v_halfWidth;\nout vec3 v_volumeUpEC;\n\nvoid main()\n{\n // vertex corner IDs\n // 3-----------7\n // /| left /|\n // / | 1 / |\n // 2-----------6 5 end\n // | / | /\n // start |/ right |/\n // 0-----------4\n //\n float isEnd = floor(startFaceNormalAndVertexCorner.w * 0.251); // 0 for front, 1 for end\n float isTop = floor(startFaceNormalAndVertexCorner.w * mix(0.51, 0.19, isEnd)); // 0 for bottom, 1 for top\n\n vec3 forward = endPositionAndHeight.xyz - startPositionAndHeight.xyz;\n vec3 right = normalize(cross(forward, startEllipsoidNormal));\n\n vec4 position = vec4(startPositionAndHeight.xyz, 1.0);\n position.xyz += forward * isEnd;\n\n v_volumeUpEC = czm_normal * normalize(cross(right, forward));\n\n // Push for volume height\n float offset;\n vec3 ellipsoidNormal = mix(startEllipsoidNormal, endEllipsoidNormal, isEnd);\n\n // offset height to create volume\n offset = mix(startPositionAndHeight.w, endPositionAndHeight.w, isEnd);\n offset = mix(u_minimumMaximumVectorHeights.y, u_minimumMaximumVectorHeights.x, isTop) - offset;\n position.xyz += offset * ellipsoidNormal;\n\n // move from RTC to EC\n position = u_modifiedModelView * position;\n right = czm_normal * right;\n\n // Push for width in a direction that is in the start or end plane and in a plane with right\n // N = normalEC ("right-facing" direction for push)\n // R = right\n // p = angle between N and R\n // w = distance to push along R if R == N\n // d = distance to push along N\n //\n // N R\n // { p| } * cos(p) = dot(N, R) = w / d\n // d | |w * d = w / dot(N, R)\n // { | }\n // o---------- polyline segment ----\x3e\n //\n vec3 scratchNormal = mix(-startFaceNormalAndVertexCorner.xyz, endFaceNormalAndHalfWidth.xyz, isEnd);\n scratchNormal = cross(scratchNormal, mix(startEllipsoidNormal, endEllipsoidNormal, isEnd));\n vec3 miterPushNormal = czm_normal * normalize(scratchNormal);\n\n offset = 2.0 * endFaceNormalAndHalfWidth.w * max(0.0, czm_metersPerPixel(position)); // offset = widthEC\n offset = offset / dot(miterPushNormal, right);\n position.xyz += miterPushNormal * (offset * sign(0.5 - mod(startFaceNormalAndVertexCorner.w, 2.0)));\n\n gl_Position = czm_depthClamp(czm_projection * position);\n\n position = u_modifiedModelView * vec4(startPositionAndHeight.xyz, 1.0);\n vec3 startNormalEC = czm_normal * startFaceNormalAndVertexCorner.xyz;\n v_startPlaneEC = vec4(startNormalEC, -dot(startNormalEC, position.xyz));\n v_rightPlaneEC = vec4(right, -dot(right, position.xyz));\n\n position = u_modifiedModelView * vec4(endPositionAndHeight.xyz, 1.0);\n vec3 endNormalEC = czm_normal * endFaceNormalAndHalfWidth.xyz;\n v_endPlaneEC = vec4(endNormalEC, -dot(endNormalEC, position.xyz));\n v_halfWidth = endFaceNormalAndHalfWidth.w;\n}\n'),o=n.getFragmentShaderCallback(!1,void 0,!0)("in vec4 v_startPlaneEC;\nin vec4 v_endPlaneEC;\nin vec4 v_rightPlaneEC;\nin float v_halfWidth;\nin vec3 v_volumeUpEC;\n\nuniform vec4 u_highlightColor;\nvoid main()\n{\n float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));\n\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n out_FragColor = vec4(0.0, 0.0, 1.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float halfMaxWidth = v_halfWidth * czm_metersPerPixel(eyeCoordinate);\n\n // Expand halfMaxWidth if direction to camera is almost perpendicular with the volume's up direction\n halfMaxWidth += halfMaxWidth * (1.0 - dot(-normalize(eyeCoordinate.xyz), v_volumeUpEC));\n\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneEC, eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneEC, eyeCoordinate.xyz);\n\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n out_FragColor = vec4(logDepthOrDepth, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n out_FragColor = u_highlightColor;\n\n czm_writeDepthClamp();\n}\n"),r=new Et({defines:["VECTOR_TILE",zn.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[NT,i]}),s=new Et({defines:["VECTOR_TILE"],sources:[o]});e._sp=mi.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:Wp})}(this,t),function ove(e){c(e._rs)||(e._rs=S9(!1),e._rs3DTiles=S9(!0))}(this);const n=e.passes;(n.render||n.pick)&&function sve(e,t){let n=e._command;if(!c(e._command)){const o=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new Zt({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:o,boundingVolume:e._boundingVolume,pass:ze.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});const r=Zt.shallowClone(n,n.derivedCommands.tileset);r.renderState=e._rs3DTiles,r.pass=ze.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r}const i=e._classificationType;(i===Yo.TERRAIN||i===Yo.BOTH)&&t.commandList.push(n),(i===Yo.CESIUM_3D_TILE||i===Yo.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}(this,e)},fh.prototype.isDestroyed=function(){return!1},fh.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),Ye(this)};const fve=fh,hve=new Se,pve=new f;function jd(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,function Tve(e,t,n){n=g(n,0);const i=new Uint8Array(t),o=new DataView(t),r=o.getUint32(n+=Mu,!0);if(1!==r)throw new Ie(`Only Vector tile version 1 is supported. Version ${r} is not.`);const s=o.getUint32(n+=Mu,!0);if(n+=Mu,0===s)return void(e._ready=!0);const a=o.getUint32(n,!0);if(n+=Mu,0===a)throw new Ie("Feature table must have a byte length greater than zero");const l=o.getUint32(n,!0),u=o.getUint32(n+=Mu,!0),d=o.getUint32(n+=Mu,!0),h=o.getUint32(n+=Mu,!0),m=o.getUint32(n+=Mu,!0),_=o.getUint32(n+=Mu,!0),p=o.getUint32(n+=Mu,!0),y=fc(i,n+=Mu,a);n+=a;const A=new Uint8Array(t,n,l);let x,C;n+=l,u>0&&(x=fc(i,n,u),n+=u,d>0&&(C=new Uint8Array(t,n,d),C=new Uint8Array(C),n+=d));const w=g(y.POLYGONS_LENGTH,0),v=g(y.POLYLINES_LENGTH,0),D=g(y.POINTS_LENGTH,0),P=w+v+D,N=new pO(e,P,x,C,function gve(e){return function(t,n){c(e._polygons)&&e._polygons.updateCommands(t,n)}}(e));if(e._batchTable=N,0===P)return;const R=new bS(y,A),B=R.getGlobalProperty("REGION");if(!c(B))throw new Ie("Feature table global property: REGION must be defined");const F=Ce.unpack(B),S=B[4],I=B[5],L=e._tile.computedTransform;let M=R.getGlobalProperty("RTC_CENTER",ee.FLOAT,3);c(M)?(M=f.unpack(M),k.multiplyByPoint(L,M,M)):(M=Ce.center(F),M.height=O.lerp(S,I,.5),M=ge.WGS84.cartographicToCartesian(M));const U=function yve(e,t){let n,i,o,r;const s=g(e.POLYGONS_LENGTH,0),a=g(e.POLYLINES_LENGTH,0),l=g(e.POINTS_LENGTH,0);s>0&&c(e.POLYGON_BATCH_IDS)&&(n=new Uint16Array(t.buffer,t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset,s)),a>0&&c(e.POLYLINE_BATCH_IDS)&&(i=new Uint16Array(t.buffer,t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset,a)),l>0&&c(e.POINT_BATCH_IDS)&&(o=new Uint16Array(t.buffer,t.byteOffset+e.POINT_BATCH_IDS.byteOffset,l));const u=c(n)||c(i)||c(o),d=s>0&&!c(n)||a>0&&!c(i)||l>0&&!c(o);if(u&&d)throw new Ie("If one group of batch ids is defined, then all batch ids must be defined");if(!c(n)&&!c(i)&&!c(o)){let m=0;if(!c(n)&&s>0)for(n=new Uint16Array(s),r=0;r0)for(i=new Uint16Array(a),r=0;r0)for(o=new Uint16Array(l),r=0;r0){R.featuresLength=w;const z=g(R.getPropertyArray("POLYGON_COUNTS",ee.UNSIGNED_INT,1),R.getPropertyArray("POLYGON_COUNT",ee.UNSIGNED_INT,1));if(!c(z))throw new Ie("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");const j=g(R.getPropertyArray("POLYGON_INDEX_COUNTS",ee.UNSIGNED_INT,1),R.getPropertyArray("POLYGON_INDEX_COUNT",ee.UNSIGNED_INT,1));if(!c(j))throw new Ie("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");const W=z.reduce(function(Y,Q){return Y+2*Q},0),q=j.reduce(function(Y,Q){return Y+Q},0),V=new Uint32Array(t,n,q);n+=h;const $=new Uint16Array(t,n,W);let Z,ie;n+=m,c(y.POLYGON_MINIMUM_HEIGHTS)&&c(y.POLYGON_MAXIMUM_HEIGHTS)&&(Z=R.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",ee.FLOAT,1),ie=R.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",ee.FLOAT,1)),e._polygons=new MSe({positions:$,counts:z,indexCounts:j,indices:V,minimumHeight:S,maximumHeight:I,polygonMinimumHeights:Z,polygonMaximumHeights:ie,center:M,rectangle:F,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:N,batchIds:U.polygons,modelMatrix:L})}if(v>0){R.featuresLength=v;const z=g(R.getPropertyArray("POLYLINE_COUNTS",ee.UNSIGNED_INT,1),R.getPropertyArray("POLYLINE_COUNT",ee.UNSIGNED_INT,1));if(!c(z))throw new Ie("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let j=R.getPropertyArray("POLYLINE_WIDTHS",ee.UNSIGNED_SHORT,1);if(!c(j)){j=new Uint16Array(v);for(let ie=0;ie0){const z=new Uint16Array(t,n,3*D);n+=p,e._points=new DSe({positions:z,batchIds:U.points,minimumHeight:S,maximumHeight:I,rectangle:F,batchTable:N})}}(this,i,o)}Object.defineProperties(jd.prototype,{featuresLength:{get:function(){return c(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return c(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){let e=0;return c(this._polygons)&&(e+=this._polygons.trianglesLength),c(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){let e=0;return c(this._polygons)&&(e+=this._polygons.geometryByteLength),c(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return c(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return c(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}}});const Mu=Uint32Array.BYTES_PER_ELEMENT;function bve(e){return new E9(e)}function Ave(e){return new fve(e)}function GR(e){const t=e.featuresLength;if(!c(e._features)&&t>0){const n=new Array(t);c(e._polygons)&&e._polygons.createFeatures(e,n),c(e._polylines)&&e._polylines.createFeatures(e,n),c(e._points)&&e._points.createFeatures(e,n),e._features=n}}jd.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},jd.prototype.getFeature=function(e){const t=this.featuresLength;if(!c(e)||e<0||e>=t)throw new E(`batchId is required and between zero and featuresLength - 1 (${t-1}).`);return c(this._features)||GR(this),this._features[e]},jd.prototype.applyDebugSettings=function(e,t){c(this._polygons)&&this._polygons.applyDebugSettings(e,t),c(this._polylines)&&this._polylines.applyDebugSettings(e,t),c(this._points)&&this._points.applyDebugSettings(e,t)},jd.prototype.applyStyle=function(e){c(this._features)||GR(this),c(this._polygons)&&this._polygons.applyStyle(e,this._features),c(this._polylines)&&this._polylines.applyStyle(e,this._features),c(this._points)&&this._points.applyStyle(e,this._features)},jd.prototype.update=function(e,t){let n=!0;c(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),n=n&&this._polygons.ready),c(this._polylines)&&(this._polylines.update(t),n=n&&this._polylines.ready),c(this._points)&&(this._points.update(t),n=n&&this._points.ready),c(this._batchTable)&&n&&(c(this._features)||GR(this),this._batchTable.update(e,t),this._ready=!0)},jd.prototype.getPolylinePositions=function(e){const t=this._polylines;if(c(t))return t.getPositions(e)},jd.prototype.isDestroyed=function(){return!1},jd.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(),Ye(this)};const Cve=jd,v9={b3dm:function(e,t,n,i,o){return d0.fromB3dm(e,t,n,i,o)},pnts:function(e,t,n,i,o){return d0.fromPnts(e,t,n,i,o)},i3dm:function(e,t,n,i,o){return d0.fromI3dm(e,t,n,i,o)},cmpt:function(e,t,n,i,o){return Sle.fromTileType(e,t,n,i,o,v9)},externalTileset:function(e,t,n,i){return TCe.fromJson(e,t,n,i)},geom:function(e,t,n,i,o){return new Ide(e,t,n,i,o)},vctr:function(e,t,n,i,o){return new Cve(e,t,n,i,o)},subt:function(e,t,n,i,o){return zH.fromSubtreeJson(e,t,n,void 0,i,o)},subtreeJson:function(e,t,n,i){return zH.fromSubtreeJson(e,t,n,i)},glb:function(e,t,n,i,o){if(i.byteLength<12)throw new Ie("Invalid glb content");const a=new DataView(i,o).getUint32(8,!0),l=new Uint8Array(i,o,a);return d0.fromGltf(e,t,n,l)},gltf:function(e,t,n,i){return d0.fromGltf(e,t,n,i)},geoJson:function(e,t,n,i){return d0.fromGeoJson(e,t,n,i)}},D9=v9,Or=Object.freeze({UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5}),Fu={BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",COMPOSITE:"cmpt",POINT_CLOUD:"pnts",VECTOR:"vctr",GEOMETRY:"geom",GLTF:"gltf",GLTF_BINARY:"glb",IMPLICIT_SUBTREE:"subt",IMPLICIT_SUBTREE_JSON:"subtreeJson",EXTERNAL_TILESET:"externalTileset",MULTIPLE_CONTENT:"multipleContent",GEOJSON:"geoJson",VOXEL_BINARY:"voxl",VOXEL_JSON:"voxelJson",isBinaryFormat:function(e){switch(e){case Fu.BATCHED_3D_MODEL:case Fu.INSTANCED_3D_MODEL:case Fu.COMPOSITE:case Fu.POINT_CLOUD:case Fu.VECTOR:case Fu.GEOMETRY:case Fu.IMPLICIT_SUBTREE:case Fu.VOXEL_BINARY:case Fu.GLTF_BINARY:return!0;default:return!1}}},Ac=Object.freeze(Fu),g0=Object.freeze({NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0}),gs={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},hh=new Array(gs.NUMBER_OF_PASSES);hh[gs.RENDER]=Object.freeze({pass:gs.RENDER,isRender:!0,requestTiles:!0,ignoreCommands:!1}),hh[gs.PICK]=Object.freeze({pass:gs.PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1}),hh[gs.SHADOW]=Object.freeze({pass:gs.SHADOW,isRender:!1,requestTiles:!0,ignoreCommands:!1}),hh[gs.PRELOAD]=Object.freeze({pass:gs.PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0}),hh[gs.PRELOAD_FLIGHT]=Object.freeze({pass:gs.PRELOAD_FLIGHT,isRender:!1,requestTiles:!0,ignoreCommands:!0}),hh[gs.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({pass:gs.REQUEST_RENDER_MODE_DEFER_CHECK,isRender:!1,requestTiles:!0,ignoreCommands:!0}),hh[gs.MOST_DETAILED_PRELOAD]=Object.freeze({pass:gs.MOST_DETAILED_PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0}),hh[gs.MOST_DETAILED_PICK]=Object.freeze({pass:gs.MOST_DETAILED_PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1}),gs.getPassOptions=function(e){return hh[e]};const Os=Object.freeze(gs);function ph(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}Object.defineProperties(ph.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!0}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(e){throw new E("Empty3DTileContent cannot have content metadata")}},batchTable:{get:function(){}},group:{get:function(){},set:function(e){throw new E("Empty3DTileContent cannot have group metadata")}}}),ph.prototype.hasProperty=function(e,t){return!1},ph.prototype.getFeature=function(e){},ph.prototype.applyDebugSettings=function(e,t){},ph.prototype.applyStyle=function(e){},ph.prototype.update=function(e,t){},ph.prototype.isDestroyed=function(){return!1},ph.prototype.destroy=function(){return Ye(this)};const I9=ph;function mh(e){const t=(e=g(e,g.EMPTY_OBJECT)).content,n=e.class;T.typeOf.object("options.content",t),T.typeOf.object("options.class",n),this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(mh.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),mh.prototype.hasProperty=function(e){return _i.hasProperty(e,this._properties,this._class)},mh.prototype.hasPropertyBySemantic=function(e){return _i.hasPropertyBySemantic(e,this._properties,this._class)},mh.prototype.getPropertyIds=function(e){return _i.getPropertyIds(this._properties,this._class,e)},mh.prototype.getProperty=function(e){return _i.getProperty(e,this._properties,this._class)},mh.prototype.setProperty=function(e,t){return _i.setProperty(e,t,this._properties,this._class)},mh.prototype.getPropertyBySemantic=function(e){return _i.getPropertyBySemantic(e,this._properties,this._class)},mh.prototype.setPropertyBySemantic=function(e,t){return _i.setPropertyBySemantic(e,t,this._properties,this._class)};const Eve=mh;function jR(e,t){const n=Ir(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!c(n))return;if(!c(e.schema))return void jR._oneTimeWarning("findContentMetadata-missing-root-schema","Could not find a metadata schema for content metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");const i=g(e.schema.classes,g.EMPTY_OBJECT);return c(n.class)?new Eve({content:n,class:i[n.class]}):void 0}jR._oneTimeWarning=gn;const P9=jR,O9=function wve(e,t){const n=e.metadataExtension;if(!c(n))return;const i=n.groups,o=Ir(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"].group:t.group;if("number"==typeof o)return i[o];const r=n.groupIds.findIndex(function(s){return s===o});return r>=0?i[r]:void 0};function _h(e){const t=(e=g(e,g.EMPTY_OBJECT)).tile,n=e.class;T.typeOf.object("options.tile",t),T.typeOf.object("options.class",n),this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(_h.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),_h.prototype.hasProperty=function(e){return _i.hasProperty(e,this._properties,this._class)},_h.prototype.hasPropertyBySemantic=function(e){return _i.hasPropertyBySemantic(e,this._properties,this._class)},_h.prototype.getPropertyIds=function(e){return _i.getPropertyIds(this._properties,this._class,e)},_h.prototype.getProperty=function(e){return _i.getProperty(e,this._properties,this._class)},_h.prototype.setProperty=function(e,t){return _i.setProperty(e,t,this._properties,this._class)},_h.prototype.getPropertyBySemantic=function(e){return _i.getPropertyBySemantic(e,this._properties,this._class)},_h.prototype.setPropertyBySemantic=function(e,t){return _i.setPropertyBySemantic(e,t,this._properties,this._class)};const Sve=_h;function WR(e,t){const n=Ir(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!c(n))return;if(!c(e.schema))return void WR._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.");const i=g(e.schema.classes,g.EMPTY_OBJECT);return c(n.class)?new Sve({tile:n,class:i[n.class]}):void 0}WR._oneTimeWarning=gn;const vve=WR,L9=function Dve(e){const t=new Uint8Array(e);let n=Mw(t);if("glTF"===n&&(n="glb"),Ac.isBinaryFormat(n))return{contentType:n,binaryPayload:t};const i=function Ive(e){let t;try{t=fc(e)}catch{throw new Ie("Invalid tile content.")}return t}(t);if(c(i.root))return{contentType:Ac.EXTERNAL_TILESET,jsonPayload:i};if(c(i.asset))return{contentType:Ac.GLTF,jsonPayload:i};if(c(i.tileAvailability))return{contentType:Ac.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(c(i.type))return{contentType:Ac.GEOJSON,jsonPayload:i};if(c(i.voxelTable))return{contentType:Ac.VOXEL_JSON,jsonPayload:i};throw new Ie("Invalid tile content.")};function Bu(e,t,n,i){this._tileset=e,this._tile=t,this._tilesetResource=n,this._contents=[],this._contentsCreated=!1;const o=c(i.contents)?i.contents:i.content;this._innerContentHeaders=o,this._requestsInFlight=0,this._cancelCount=0;const 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;sfunction Rve(e,t,n){return XR.apply(this,arguments)}(e,r,s)),o=yield Promise.all(i);return e._contentsCreated=!0,e._contents=o.filter(c),o}),YR.apply(this,arguments)}function XR(){return(XR=(0,Pe.Z)(function*(e,t,n){if(c(t))try{const i=L9(t);if(i.contentType===Ac.EXTERNAL_TILESET)throw new Ie("External tilesets are disallowed inside multiple contents");e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===Ac.GEOMETRY||i.contentType===Ac.VECTOR;const o=e._tileset,r=e._innerContentResources[n],s=e._tile;let a;const l=D9[i.contentType];a=c(i.binaryPayload)?yield Promise.resolve(l(o,s,r,i.binaryPayload.buffer,0)):yield Promise.resolve(l(o,s,r,i.jsonPayload));const u=e._innerContentHeaders[n];s.hasImplicitContentMetadata?a.metadata=s.implicitSubtree.getContentMetadataView(s.implicitCoordinates,n):s.hasImplicitContent||(a.metadata=P9(o,u));const d=O9(o,u);return c(d)&&(a.group=new c4({metadata:d})),a}catch(i){N9(e,n,i)}})).apply(this,arguments)}function N9(e,t,n){const i=e._tileset,o=e._innerContentResources[t].url,r=c(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}`))}Object.defineProperties(Bu.prototype,{featurePropertiesDirty:{get:function(){const e=this._contents,t=e.length;for(let n=0;n4)throw new E("options.componentsPerAttribute must be between 1 and 4.");if(!c(e.values))throw new E("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=g(e.normalize,!1),this.values=e.values},lo=function Bve(e){e=g(e,g.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color},Yn=Object.freeze({NONE:0,TOP:1,ALL:2});var kve=st(6718);const Uve=new f,zve=new f,qp={computeArea2D:function(e){T.defined("positions",e),T.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);const t=e.length;let n=0;for(let i=t-1,o=0;o0?El.COUNTER_CLOCKWISE:El.CLOCKWISE},triangulate:function(e,t){T.defined("positions",e);const n=G.packArray(e);return kve(n,t,2)}},M9=new f,F9=new f,B9=new f,k9=new f,U9=new f,z9=new f,gh=new f,V9=new G,H9=new G,G9=new G,y0=new G;qp.computeSubdivision=function(e,t,n,i,o){o=g(o,O.RADIANS_PER_DEGREE);const r=c(i);T.typeOf.object("ellipsoid",e),T.defined("positions",t),T.defined("indices",n),T.typeOf.number.greaterThanOrEquals("indices.length",n.length,3),T.typeOf.number.equals("indices.length % 3","0",n.length%3,0),T.typeOf.number.greaterThan("granularity",o,0);const s=n.slice(0);let a;const l=t.length,u=new Array(3*l),d=new Array(2*l);let h=0,m=0;for(a=0;a0;){const w=s.pop(),v=s.pop(),D=s.pop(),P=f.fromArray(u,3*D,M9),N=f.fromArray(u,3*v,F9),R=f.fromArray(u,3*w,B9);let B,F,S;r&&(B=G.fromArray(d,2*D,V9),F=G.fromArray(d,2*v,H9),S=G.fromArray(d,2*w,G9));const I=f.multiplyByScalar(f.normalize(P,k9),y,k9),L=f.multiplyByScalar(f.normalize(N,U9),y,U9),M=f.multiplyByScalar(f.normalize(R,z9),y,z9),U=f.magnitudeSquared(f.subtract(I,L,gh)),z=f.magnitudeSquared(f.subtract(L,M,gh)),j=f.magnitudeSquared(f.subtract(M,I,gh)),W=Math.max(U,z,j);let q,V,$;W>x?U===W?(q=`${Math.min(D,v)} ${Math.max(D,v)}`,a=p[q],c(a)||(V=f.add(P,N,gh),f.multiplyByScalar(V,.5,V),u.push(V.x,V.y,V.z),a=u.length/3-1,p[q]=a,r&&($=G.add(B,F,y0),G.multiplyByScalar($,.5,$),d.push($.x,$.y))),s.push(D,a,w),s.push(a,v,w)):z===W?(q=`${Math.min(v,w)} ${Math.max(v,w)}`,a=p[q],c(a)||(V=f.add(N,R,gh),f.multiplyByScalar(V,.5,V),u.push(V.x,V.y,V.z),a=u.length/3-1,p[q]=a,r&&($=G.add(F,S,y0),G.multiplyByScalar($,.5,$),d.push($.x,$.y))),s.push(v,a,D),s.push(a,w,D)):j===W&&(q=`${Math.min(w,D)} ${Math.max(w,D)}`,a=p[q],c(a)||(V=f.add(R,P,gh),f.multiplyByScalar(V,.5,V),u.push(V.x,V.y,V.z),a=u.length/3-1,p[q]=a,r&&($=G.add(S,B,y0),G.multiplyByScalar($,.5,$),d.push($.x,$.y))),s.push(w,a,v),s.push(a,D,v)):(_.push(D),_.push(v),_.push(w))}const C={attributes:{position:new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:At.TRIANGLES};return r&&(C.attributes.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:d})),new Cn(C)};const Vve=new Se,Hve=new Se,Gve=new Se,ZR=new Se;qp.computeRhumbLineSubdivision=function(e,t,n,i,o){o=g(o,O.RADIANS_PER_DEGREE);const r=c(i);T.typeOf.object("ellipsoid",e),T.defined("positions",t),T.defined("indices",n),T.typeOf.number.greaterThanOrEquals("indices.length",n.length,3),T.typeOf.number.equals("indices.length % 3","0",n.length%3,0),T.typeOf.number.greaterThan("granularity",o,0);const s=n.slice(0);let a;const l=t.length,u=new Array(3*l),d=new Array(2*l);let h=0,m=0;for(a=0;a0;){const D=s.pop(),P=s.pop(),N=s.pop(),R=f.fromArray(u,3*N,M9),B=f.fromArray(u,3*P,F9),F=f.fromArray(u,3*D,B9);let S,I,L;r&&(S=G.fromArray(d,2*N,V9),I=G.fromArray(d,2*P,H9),L=G.fromArray(d,2*D,G9));const M=e.cartesianToCartographic(R,Vve),U=e.cartesianToCartographic(B,Hve),z=e.cartesianToCartographic(F,Gve);x.setEndPoints(M,U);const j=x.surfaceDistance;C.setEndPoints(U,z);const W=C.surfaceDistance;w.setEndPoints(z,M);const q=w.surfaceDistance,V=Math.max(j,W,q);let $,Z,ie,Y,Q;V>A?j===V?($=`${Math.min(N,P)} ${Math.max(N,P)}`,a=p[$],c(a)||(Z=x.interpolateUsingFraction(.5,ZR),ie=.5*(M.height+U.height),Y=f.fromRadians(Z.longitude,Z.latitude,ie,e,gh),u.push(Y.x,Y.y,Y.z),a=u.length/3-1,p[$]=a,r&&(Q=G.add(S,I,y0),G.multiplyByScalar(Q,.5,Q),d.push(Q.x,Q.y))),s.push(N,a,D),s.push(a,P,D)):W===V?($=`${Math.min(P,D)} ${Math.max(P,D)}`,a=p[$],c(a)||(Z=C.interpolateUsingFraction(.5,ZR),ie=.5*(U.height+z.height),Y=f.fromRadians(Z.longitude,Z.latitude,ie,e,gh),u.push(Y.x,Y.y,Y.z),a=u.length/3-1,p[$]=a,r&&(Q=G.add(I,L,y0),G.multiplyByScalar(Q,.5,Q),d.push(Q.x,Q.y))),s.push(P,a,N),s.push(a,D,N)):q===V&&($=`${Math.min(D,N)} ${Math.max(D,N)}`,a=p[$],c(a)||(Z=w.interpolateUsingFraction(.5,ZR),ie=.5*(z.height+M.height),Y=f.fromRadians(Z.longitude,Z.latitude,ie,e,gh),u.push(Y.x,Y.y,Y.z),a=u.length/3-1,p[$]=a,r&&(Q=G.add(L,S,y0),G.multiplyByScalar(Q,.5,Q),d.push(Q.x,Q.y))),s.push(D,a,P),s.push(a,N,P)):(_.push(N),_.push(P),_.push(D))}const v={attributes:{position:new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:At.TRIANGLES};return r&&(v.attributes.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:d})),new Cn(v)},qp.scaleToGeodeticHeight=function(e,t,n,i){n=g(n,ge.WGS84);let o=Uve,r=zve;if(t=g(t,0),i=g(i,!0),c(e)){const s=e.length;for(let a=0;aa?O.TWO_PI-l+a:a-l;const y=Math.ceil(_/t)+1,A=Math.ceil(p/t)+1,x=_/(y-1),C=p/(A-1),w=Ce.northwest(e,r),v=Ce.center(e,qve);(0!==n||0!==i)&&(v.longitudeO.PI_OVER_TWO||d<-O.PI_OVER_TWO||d>O.PI_OVER_TWO)throw new E("Rotated rectangle is invalid. It crosses over either the north or south pole.");F.granYCos=S.granYCos,F.granYSin=S.granYSin,F.granXCos=S.granXCos,F.granXSin=S.granXSin,B.north=u,B.south=d,B.east=a,B.west=l}if(0!==i){n-=i;const S=Ce.northwest(B,s),I=q9(S,n,x,C,0,y,A);F.stGranYCos=I.granYCos,F.stGranXCos=I.granXCos,F.stGranYSin=I.granYSin,F.stGranXSin=I.granXSin,F.stNwCorner=S,F.stWest=I.west,F.stSouth=I.south}return F};const $a=$R,Yve=new be,Xve=new be,Zve=new f,$ve=new Ce;function Y9(e,t){const n=e._ellipsoid,i=t.height,o=t.width,r=t.northCap,s=t.southCap;let a=i,l=2,u=0,d=4;r&&(l-=1,a-=1,u+=1,d-=2),s&&(l-=1,a-=1,u+=1,d-=2),u+=l*o+2*a-d;const h=new Float64Array(3*u);let p,m=0,_=0;const y=Zve;if(r)$a.computePosition(t,n,!1,_,0,y),h[m++]=y.x,h[m++]=y.y,h[m++]=y.z;else for(p=0;p=0;p--)$a.computePosition(t,n,!1,_,p,y),h[m++]=y.x,h[m++]=y.y,h[m++]=y.z;for(p=0,_=i-2;_>0;_--)$a.computePosition(t,n,!1,_,p,y),h[m++]=y.x,h[m++]=y.y,h[m++]=y.z;const x=Ot.createTypedArray(h.length/3,h.length/3*2);let C=0;for(let v=0;vn&&(n=l),++a,l=t[a]}const r=[];for(let a=0;ai&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)},tipsify:function(e){const t=(e=g(e,g.EMPTY_OBJECT)).indices,n=e.maximumIndex,i=g(e.cacheSize,24);let o;function s(S,I,L,M,U,z,j){let q,W=-1,V=-1,$=0;for(;$V||-1===V)&&(V=q,W=Z)),++$}return-1===W?function r(S,I,L,M){for(;I.length>=1;){const U=I[I.length-1];if(I.splice(I.length-1,1),S[U].numLiveTriangles>0)return U}for(;o0)return++o,o-1;++o}return-1}(M,z,0,j):W}if(!c(t))throw new E("indices is required.");const a=t.length;if(a<3||a%3!=0)throw new E("indices length must be a multiple of three.");if(n<=0)throw new E("maximumIndex must be greater than zero.");if(i<3)throw new E("cacheSize must be greater than two.");let l=0,u=0,d=t[u];const h=a;if(c(n))l=n+1;else{for(;ul&&(l=d),++u,d=t[u];if(-1===l)return 0;++l}const m=[];let _;for(_=0;_i&&(w.timeStamp=A,++A),++u}y=s(0,i,x,m,A,C,l)}return P}},sDe=QR,Ka={};function WS(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function t6(e){const t={};for(const n in e)if(e.hasOwnProperty(n)&&c(e[n])&&c(e[n].values)){const i=e[n];t[n]=new Ze({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function uDe(e,t,n){for(const i in t)if(t.hasOwnProperty(i)&&c(t[i])&&c(t[i].values)){const o=t[i];for(let r=0;r=3){const i=Ot.createTypedArray(t,6*(t-2));WS(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r0){const t=e.length-1,i=Ot.createTypedArray(t,6*(t-1)),o=e[0];let r=0;for(let s=1;so&&(o=n[r]);e.indices=sDe.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e},Ka.fitToUnsignedShortIndices=function(e){if(!c(e))throw new E("geometry is required.");if(c(e.indices)&&e.primitiveType!==At.TRIANGLES&&e.primitiveType!==At.LINES&&e.primitiveType!==At.POINTS)throw new E("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");const t=[],n=Cn.computeNumberOfVertices(e);if(c(e.indices)&&n>=O.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=t6(e.attributes);const a=e.indices,l=a.length;let u;e.primitiveType===At.TRIANGLES?u=3:e.primitiveType===At.LINES?u=2:e.primitiveType===At.POINTS&&(u=1);for(let d=0;d=O.SIXTY_FOUR_KILOBYTES&&(t.push(new Cn({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=t6(e.attributes))}0!==o.length&&t.push(new Cn({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};const n6=new f,dDe=new Se;Ka.projectTo2D=function(e,t,n,i,o){if(!c(e))throw new E("geometry is required.");if(!c(t))throw new E("attributeName is required.");if(!c(n))throw new E("attributeName3D is required.");if(!c(i))throw new E("attributeName2D is required.");if(!c(e.attributes[t]))throw new E(`geometry must have attribute matching the attributeName argument: ${t}.`);if(e.attributes[t].componentDatatype!==ee.DOUBLE)throw new E("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");const r=e.attributes[t],s=(o=c(o)?o:new Yr).ellipsoid,a=r.values,l=new Float64Array(a.length);let u=0;for(let d=0;dA&&(A=C)}return new Cn({attributes:d,indices:p,primitiveType:u,boundingSphere:c(y)?new be(y,A):void 0})}Ka.combineInstances=function(e){if(!c(e)||e.length<1)throw new E("instances is required and must have length greater than zero.");const t=[],n=[],i=e.length;for(let r=0;r0&&o.push(nN(t,"geometry")),n.length>0&&(o.push(nN(n,"westHemisphereGeometry")),o.push(nN(n,"eastHemisphereGeometry"))),o};const kl=new f,qT=new f,x0=new f,C0=new f;Ka.computeNormal=function(e){if(!c(e))throw new E("geometry is required.");if(!c(e.attributes.position)||!c(e.attributes.position.values))throw new E("geometry.attributes.position.values is required.");if(!c(e.indices))throw new E("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new E("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==At.TRIANGLES)throw new E("geometry.primitiveType must be PrimitiveType.TRIANGLES.");const 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),l=new Array(r);let u;for(u=0;u0){for(d=0;d=0||t.x>=0||n.x>=0)return;!function CDe(e,t,n){if(0!==e.y&&0!==t.y&&0!==n.y)return Yp(e,e.y<0),Yp(t,t.y<0),void Yp(n,n.y<0);const i=Math.abs(e.y),o=Math.abs(t.y),r=Math.abs(n.y);let s;s=O.sign(i>o?i>r?e.y:n.y:o>r?t.y:n.y);const a=s<0;Yp(e,a),Yp(t,a),Yp(n,a)}(e,t,n);const i=e.y<0,o=t.y<0,r=n.y<0;let s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;const a=iN.indices;1===s?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(Ul(e,t,z_,H_),Ul(e,n,V_,G_),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(Ul(t,n,z_,H_),Ul(t,e,V_,G_),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(Ul(n,e,z_,H_),Ul(n,t,V_,G_),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):2===s&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?o?r||(Ul(n,e,z_,H_),Ul(n,t,V_,G_),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(Ul(t,n,z_,H_),Ul(t,e,V_,G_),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(Ul(e,t,z_,H_),Ul(e,n,V_,G_),a[0]=1,a[1]=2,a[3]=1,a[6]=0));const l=iN.positions;return l[0]=e,l[1]=t,l[2]=n,l.length=3,(1===s||2===s)&&(l[3]=z_,l[4]=V_,l[5]=H_,l[6]=G_,l.length=7),iN}function a6(e,t){const n=e.attributes;if(0===n.position.values.length)return;for(const o in n)if(n.hasOwnProperty(o)&&c(n[o])&&c(n[o].values)){const r=n[o];r.values=ee.createTypedArray(r.componentDatatype,r.values)}const i=Cn.computeNumberOfVertices(e);return e.indices=Ot.createTypedArray(i,e.indices),t&&(e.boundingSphere=be.fromVertices(n.position.values)),e}function E0(e){const t=e.attributes,n={};for(const i in t)if(t.hasOwnProperty(i)&&c(t[i])&&c(t[i].values)){const o=t[i];n[i]=new Ze({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new Cn({attributes:n,indices:[],primitiveType:e.primitiveType})}function oN(e,t,n){const i=c(e.geometry.boundingSphere);t=a6(t,i),n=a6(n,i),c(n)&&!c(t)?e.geometry=n:!c(n)&&c(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function rN(e,t){const n=new e,i=new e,o=new e;return function(r,s,a,l,u,d,h,m){const _=e.fromArray(u,r*t,n),p=e.fromArray(u,s*t,i),y=e.fromArray(u,a*t,o);e.multiplyByScalar(_,l.x,_),e.multiplyByScalar(p,l.y,p),e.multiplyByScalar(y,l.z,y);const A=e.add(_,p,_);e.add(A,y,A),m&&e.normalize(A,A),e.pack(A,d,h*t)}}const wDe=rN(fe,4),ZS=rN(f,3),c6=rN(G,2),SDe=function(e,t,n,i,o,r,s){r[s]=o[e]*i.x+o[t]*i.y+o[n]*i.z>O.EPSILON6?1:0},XT=new f,sN=new f,aN=new f,vDe=new f;function $S(e,t,n,i,o,r,s,a,l,u,d,h,m,_,p,y){if(!(c(r)||c(s)||c(a)||c(l)||c(u)||0!==_))return;const A=f.fromArray(o,3*e,XT),x=f.fromArray(o,3*t,sN),C=f.fromArray(o,3*n,aN),w=rDe(i,A,x,C,vDe);if(c(w)){if(c(r)&&ZS(e,t,n,w,r,h.normal.values,y,!0),c(u)){const v=f.fromArray(u,3*e,XT),D=f.fromArray(u,3*t,sN),P=f.fromArray(u,3*n,aN);let N;f.multiplyByScalar(v,w.x,v),f.multiplyByScalar(D,w.y,D),f.multiplyByScalar(P,w.z,P),f.equals(v,f.ZERO)&&f.equals(D,f.ZERO)&&f.equals(P,f.ZERO)?(N=XT,N.x=0,N.y=0,N.z=0):(N=f.add(v,D,v),f.add(N,P,N),f.normalize(N,N)),f.pack(N,h.extrudeDirection.values,3*y)}if(c(d)&&SDe(e,t,n,w,d,h.applyOffset.values,y),c(s)&&ZS(e,t,n,w,s,h.tangent.values,y,!0),c(a)&&ZS(e,t,n,w,a,h.bitangent.values,y,!0),c(l)&&c6(e,t,n,w,l,h.st.values,y),_>0)for(let v=0;v<_;v++){const D=m[v];DDe(e,t,n,w,y,p[D],h[D])}}}function DDe(e,t,n,i,o,r,s){const l=r.values,u=s.values;switch(r.componentsPerAttribute){case 4:wDe(e,t,n,i,l,u,o,!1);break;case 3:ZS(e,t,n,i,l,u,o,!1);break;case 2:c6(e,t,n,i,l,u,o,!1);break;default:u[o]=l[e]*i.x+l[t]*i.y+l[n]*i.z}}function Wd(e,t,n,i,o,r){const s=e.position.values.length/3;if(-1!==o){const a=i[o],l=n[a];return-1===l?(n[a]=s,e.position.values.push(r.x,r.y,r.z),t.push(s),s):(t.push(l),l)}return e.position.values.push(r.x,r.y,r.z),t.push(s),s}const IDe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function l6(e){const t=e.geometry,n=t.attributes,i=n.position.values,o=c(n.normal)?n.normal.values:void 0,r=c(n.bitangent)?n.bitangent.values:void 0,s=c(n.tangent)?n.tangent.values:void 0,a=c(n.st)?n.st.values:void 0,l=c(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=c(n.applyOffset)?n.applyOffset.values:void 0,d=t.indices,h=[];for(const N in n)n.hasOwnProperty(N)&&!IDe[N]&&c(n[N])&&h.push(N);const m=h.length,_=E0(t),p=E0(t);let y,A,x,C,w;const v=[];v.length=i.length/3;const D=[];for(D.length=i.length/3,w=0;w3){const M=L.positions,U=L.indices,z=U.length;for(let j=0;j0)continue;const l=f.unpack(i,s,p6);(a.y<0&&l.y>0||a.y>0&&l.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):f.pack(a,i,s));const u=f.unpack(o,s,cN);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(s+30||be.intersectPlane(n,Hn.ORIGIN_ZX_PLANE)!==Qn.INTERSECTING))return e;if(t.geometryType!==ky.NONE)switch(t.geometryType){case ky.POLYLINES:!function BDe(e){const t=e.geometry,n=t.attributes,i=n.position.values,o=n.prevPosition.values,r=n.nextPosition.values,s=n.expandAndWidth.values,a=c(n.st)?n.st.values:void 0,l=c(n.color)?n.color.values:void 0,u=E0(t),d=E0(t);let h,m,_,p=!1;const y=i.length/3;for(h=0;h3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;o=0){const u=i[a];o=u.offset+u.count,s=u.index,r=n[s].indices.length}else o=0,s=0,r=n[s].indices.length;const l=e.length;for(let u=0;ur&&(o=0,r=n[++s].indices.length),i.push({index:s,offset:o,count:m}),o+=m}}const bh={};function HDe(e,t){const n=e.attributes;for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];c(o)&&c(o.values)&&t.push(o.values.buffer)}c(e.indices)&&t.push(e.indices.buffer)}function WDe(e,t){const n=e.length,i=new Float64Array(1+19*n);let o=0;i[o++]=n;for(let r=0;r0&&(t=function zDe(e){const t=e.instances,n=e.projection,i=e.elementIndexUintSupported,o=e.scene3DOnly,r=e.vertexCacheOptimize,s=e.compressVertices,a=e.modelMatrix;let l,u,d,h=t.length;for(l=0;l1){const s=e[0].modelMatrix;for(r=1;r0&&(n=uo.createAttributeLocations(t[0]),e.createPickOffsets&&(r=function VDe(e,t){const n=[];return uN(e,"geometry",t,n),uN(e,"westHemisphereGeometry",t,n),uN(e,"eastHemisphereGeometry",t,n),n}(i,t))),c(i[0].attributes)&&c(i[0].attributes.offset)&&(s=new Array(o),a=!0));const l=new Array(o),u=new Array(o);for(let d=0;d0&&(n.set(l.indices,s),s+=p)}return t.push(n.buffer),{stringTable:i,packedData:n}},bh.unpackCreateGeometryResults=function(e){const t=e.stringTable,n=e.packedData;let i;const o=new Array(n[0]);let r=0,s=1;for(;s0)for(v=Ot.createTypedArray(A.length/x,y),i=0;i1?`vec${s}`:"float"} ${l};`;let d="",h="";i&&(d+="vec2 st;\n",h+=` st = czm_decompressTextureCoordinates(${s>1?`${l}.x`:l});\n`),n&&o&&r?(d+="vec3 normal;\nvec3 tangent;\nvec3 bitangent;\n",h+=` czm_octDecode(${l}.${i?"yz":"xy"}, normal, tangent, bitangent);\n`):(n&&(d+="vec3 normal;\n",h+=` normal = czm_octDecode(${l}${s>1?"."+(i?"y":"x"):""});\n`),o&&(d+="vec3 tangent;\n",h+=` tangent = czm_octDecode(${l}.${i&&n?"z":"y"});\n`),r&&(d+="vec3 bitangent;\n",h+=` bitangent = czm_octDecode(${l}.${i&&n?"z":"y"});\n`));let m=t;return m=m.replace(/in\s+vec3\s+normal;/g,""),m=m.replace(/in\s+vec2\s+st;/g,""),m=m.replace(/in\s+vec3\s+tangent;/g,""),m=m.replace(/in\s+vec3\s+bitangent;/g,""),m=Et.replaceMain(m,"czm_non_compressed_main"),[u,d,m,`void main() \n{ \n${h} czm_non_compressed_main(); \n}`].join("\n")}function E6(e,t){const n=e.vertexAttributes;for(const i in n)if(n.hasOwnProperty(i)&&!c(t[i]))throw new E(`Appearance/Geometry mismatch. The appearance requires vertex shader attribute input '${i}', which was not computed as part of the Geometry. Use the appearance's vertexFormat property when constructing the geometry.`)}function iIe(e,t){return function(){return e[t]}}fr._modifyShaderPosition=function(e,t,n){let i,o="",r="",s="";for(;null!==(i=eIe.exec(t));){const a=i[1],l=`vec4 czm_compute${a[0].toUpperCase()}${a.substr(1)}()`;"vec4 czm_computePosition()"!==l&&(o+=`${l};\n`),c(e.rtcCenter)?(o+="uniform mat4 u_modifiedModelView;\n",r+="in vec4 position;\n",s+=`${l}\n{\n return u_modifiedModelView * position;\n}\n\n`,t=(t=(t=(t=t.replace(/in\s+vec(?:3|4)\s+position3DHigh;/g,"")).replace(/in\s+vec(?:3|4)\s+position3DLow;/g,"")).replace(/czm_modelViewRelativeToEye\s+\*\s+/g,"")).replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):n?s+=`${l}\n{\n return czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);\n}\n\n`:(r+=`in vec3 ${a}2DHigh;\nin vec3 ${a}2DLow;\n`,s+=`${l}\n{\n vec4 p;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy),\n czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow),\n czm_morphTime);\n }\n return p;\n}\n\n`)}return[o,r,t,s].join("\n")},fr._appendShowToShader=function(e,t){return c(e._batchTableAttributeIndices.show)?`${Et.replaceMain(t,"czm_non_show_main")}\nvoid main() \n{ \n czm_non_show_main(); \n gl_Position *= czm_batchTable_show(batchId); \n}`:t},fr._updateColorAttribute=function(e,t,n){if(!c(e._batchTableAttributeIndices.color)&&!c(e._batchTableAttributeIndices.depthFailColor)||-1===t.search(/in\s+vec4\s+color;/g))return t;if(n&&!c(e._batchTableAttributeIndices.depthFailColor))throw new E("A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute.");let i=t;return i=i.replace(/in\s+vec4\s+color;/g,""),i=i.replace(/(\b)color(\b)/g,n?"$1czm_batchTable_depthFailColor(batchId)$2":"$1czm_batchTable_color(batchId)$2"),i},fr._updatePickColorAttribute=function(e){let t=e.replace(/in\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2"),t},fr._appendOffsetToShader=function(e,t){if(!c(e._batchTableAttributeIndices.offset))return t;let n="in float batchId;\n";n+="in float applyOffset;";let i=t.replace(/in\s+float\s+batchId;/g,"in float batchId;\nin float applyOffset;"),o="vec4 $1 = czm_computePosition();\n";return o+=" if (czm_sceneMode == czm_sceneMode3D)\n",o+=" {\n",o+=" $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);",o+=" }\n",o+=" else\n",o+=" {\n",o+=" $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);",o+=" }\n",i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,"vec4 $1 = czm_computePosition();\n if (czm_sceneMode == czm_sceneMode3D)\n {\n $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0); }\n else\n {\n $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0); }\n"),i},fr._appendDistanceDisplayConditionToShader=function(e,t,n){if(!c(e._batchTableAttributeIndices.distanceDisplayCondition))return t;let o="void main() \n{ \n czm_non_distanceDisplayCondition_main(); \n vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);\n vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);\n vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);\n float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);\n";return o+=n?" vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n":" vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);\n vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);\n vec4 centerRTE;\n if (czm_morphTime == 1.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);\n }\n else\n {\n centerRTE = czm_columbusViewMorph(\n czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),\n czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),\n czm_morphTime);\n }\n",o+=" float radiusSq = boundingSphereRadius * boundingSphereRadius; \n float distanceSq; \n if (czm_sceneMode == czm_sceneMode2D) \n { \n distanceSq = czm_eyeHeight2D.y - radiusSq; \n } \n else \n { \n distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; \n } \n distanceSq = max(distanceSq, 0.0); \n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; \n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; \n float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; \n gl_Position *= show; \n}",`${Et.replaceMain(t,"czm_non_distanceDisplayCondition_main")}\n${o}`};const fN=Math.max(zn.hardwareConcurrency-1,1);let QS;const oIe=new pa("combineGeometry"),w6=new Gi,S6=new Se,v6=new f,D6=new be,hN=new f,lIe=new f;function I6(e,t){if(!c(e._batchTableAttributeIndices.offset)||e._batchTableOffsetsUpdated||t.scene3DOnly)return;const i=e._batchTableOffsetAttribute2DIndex,o=t.mapProjection,r=o.ellipsoid,s=e._batchTable,a=e._instanceBoundingSpheres,l=a.length;for(let u=0;u0){if(0===mn.maximumVertexTextureImageUnits)throw new Ie("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!==Qr.COMPLETE&&this._state!==Qr.COMBINED&&(this.asynchronous?function rIe(e,t){let n,i,o,r;const s=e._instanceIds;if(e._state===Qr.READY){n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];const a=e._numberOfInstances=n.length,l=[];let d,u=[];for(o=0;o0){const y=new Float64Array(h);for(p=[y.buffer],r=0;r<_;++r)d=m[r],i=d.geometry,c(i.constructor.pack)&&(i.constructor.pack(i,y,d.offset),d.geometry=y)}l.push(QS[o].scheduleTask({subTasks:u[o]},p))}e._state=Qr.CREATING,Promise.all(l).then(function(h){e._createGeometryResults=h,e._state=Qr.CREATED}).catch(function(h){KT(e,t,Qr.FAILED,h)})}else if(e._state===Qr.CREATED){const a=[];n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];const u=t.mapProjection,d=oIe.scheduleTask(dN.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:n,ellipsoid:u.ellipsoid,projection:u,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:t.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},a),a);e._createGeometryResults=void 0,e._state=Qr.COMBINING,Promise.resolve(d).then(function(h){const m=dN.unpackCombineGeometryResults(h);e._geometries=m.geometries,e._attributeLocations=m.attributeLocations,e.modelMatrix=k.clone(m.modelMatrix,e.modelMatrix),e._pickOffsets=m.pickOffsets,e._offsetInstanceExtend=m.offsetInstanceExtend,e._instanceBoundingSpheres=m.boundingSpheres,e._instanceBoundingSpheresCV=m.boundingSpheresCV,c(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=Qr.COMBINED):KT(e,t,Qr.FAILED,void 0)}).catch(function(h){KT(e,t,Qr.FAILED,h)})}}(this,e):function sIe(e,t){const n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],i=e._numberOfInstances=n.length,o=new Array(i),r=e._instanceIds;let s,a,l=0;for(a=0;a0?(e._recomputeBoundingSpheres=!0,e._state=Qr.COMBINED):KT(e,t,Qr.FAILED,void 0)}(this,e)),this._state===Qr.COMBINED&&(function cIe(e,t){if(!c(e._batchTableAttributeIndices.distanceDisplayCondition)||e._batchTableBoundingSpheresUpdated)return;const i=e._batchTableBoundingSphereAttributeIndices,o=i.center3DHigh,r=i.center3DLow,s=i.center2DHigh,a=i.center2DLow,l=i.radius,u=t.mapProjection,d=u.ellipsoid,h=e._batchTable,m=e._instanceBoundingSpheres,_=m.length;for(let p=0;p<_;++p){let y=m[p];if(!c(y))continue;const A=e.modelMatrix;c(A)&&(y=be.transform(y,A,D6));const x=y.center,C=y.radius;let w=Gi.fromCartesian(x,w6);if(h.setBatchedAttribute(p,o,w.high),h.setBatchedAttribute(p,r,w.low),!t.scene3DOnly){const v=d.cartesianToCartographic(x,S6),D=u.project(v,v6);w=Gi.fromCartesian(D,w6),h.setBatchedAttribute(p,s,w.high),h.setBatchedAttribute(p,a,w.low)}h.setBatchedAttribute(p,l,C)}e._batchTableBoundingSpheresUpdated=!0}(this,e),I6(this,e),function uIe(e,t){const n=e._attributeLocations,i=e._geometries,o=t.scene3DOnly,r=t.context,s=[],a=i.length;for(let l=0;l0||be.intersectPlane(y,Hn.ORIGIN_ZX_PLANE)!==Qn.INTERSECTING?l.push(y):(u.push(y),d.push(y))}let h=l[0],m=d[0],_=u[0];for(i=1;i4)throw new E("value must be and array with length between 1 and 4.");const s=A6(r);e.setBatchedAttribute(t,n,s),"offset"===o&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}const bIe=new f;function KT(e,t,n,i){e._error=i,e._state=n,t.afterRender.push(function(){if(e._ready=e._state===Qr.COMPLETE||e._state===Qr.FAILED,!c(i))return!0})}fr.prototype.getGeometryInstanceAttributes=function(e){if(!c(e))throw new E("id is required");if(!c(this._batchTable))throw new E("must call update before calling getGeometryInstanceAttributes");let t=this._perInstanceAttributeCache.get(e);if(c(t))return t;let n=-1;const i=this._lastPerInstanceAttributeIndex,o=this._instanceIds,r=o.length;for(let u=0;u0){zl.longitude=.5*(t.west+t.east),zl.latitude=u;const y=n.cartographicToCartesian(zl,v0.origin);f.clone(l,v0.direction);const A=Hn.fromPointNormal(e.southwestCornerCartesian,e.westNormal,M6);rr.rayPlane(v0,A,e.southwestCornerCartesian),d=n.geodeticSurfaceNormal(y,JS)}else d=n.geodeticSurfaceNormalCartographic(Ce.southeast(t),JS);const h=f.cross(d,a,N6);f.normalize(h,e.southNormal);const m=t.north;let _;if(m<0){zl.longitude=.5*(t.west+t.east),zl.latitude=m;const y=n.cartographicToCartesian(zl,v0.origin);f.negate(l,v0.direction);const A=Hn.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,M6);rr.rayPlane(v0,A,e.northeastCornerCartesian),_=n.geodeticSurfaceNormal(y,JS)}else _=n.geodeticSurfaceNormalCartographic(Ce.northwest(t),JS);const p=f.cross(a,_,N6);f.normalize(p,e.northNormal)})(this,e.rectangle,t),this._orientedBoundingBox=void 0,this._boundingSphere=void 0,g(e.computeBoundingVolumes,!0)&&this.computeBoundingVolumes(t)}Object.defineProperties(S0.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),S0.prototype.computeBoundingVolumes=function(e){this._orientedBoundingBox=Eo.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,e),this._boundingSphere=be.fromOrientedBoundingBox(this._orientedBoundingBox)};const R6=new f,JS=new f,N6=new f,xIe=new f,CIe=new f,EIe=new f,wIe=new f,zl=new Se,M6=new Hn(f.UNIT_X,0),v0=new fi,vIe=new f,DIe=new f,IIe=new f(0,-1,0),PIe=new f(0,0,-1),F6=new f;S0.prototype.distanceToCamera=function(e){T.defined("frameState",e);const t=function OIe(e,t){const n=t.camera,i=n.positionWC,o=n.positionCartographic;let s,a,l,r=0;if(!Ce.contains(e.rectangle,o)){let u=e.southwestCornerCartesian,d=e.northeastCornerCartesian,h=e.westNormal,m=e.southNormal,_=e.eastNormal,p=e.northNormal;t.mode!==ce.SCENE3D&&(u=t.mapProjection.project(Ce.southwest(e.rectangle),vIe),u.z=u.y,u.y=u.x,u.x=0,d=t.mapProjection.project(Ce.northeast(e.rectangle),DIe),d.z=d.y,d.y=d.x,d.x=0,h=IIe,_=f.UNIT_Y,m=PIe,p=f.UNIT_Z);const y=f.subtract(i,u,F6),A=f.dot(y,h),x=f.dot(y,m),C=f.subtract(i,d,F6),w=f.dot(C,_),v=f.dot(C,p);A>0?r+=A*A:w>0&&(r+=w*w),x>0?r+=x*x:v>0&&(r+=v*v)}if(t.mode===ce.SCENE3D?(s=o.height,a=e.minimumHeight,l=e.maximumHeight):(s=i.x,a=0,l=0),s>l){const u=s-l;r+=u*u}else if(s10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n},Xp.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},Xp.prototype.contains=function(e){return-1!==this._array.indexOf(e)},Xp.prototype.clear=function(){this._array.length=this._offset=this._length=0},Xp.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};const pN=Xp,No={computeHierarchyPackedLength:function(e,t){let n=0;const i=[e];for(;i.length>0;){const o=i.pop();if(!c(o))continue;n+=2;const r=o.positions,s=o.holes;if(c(r)&&r.length>0&&(n+=r.length*t.packedLength),c(s)){const a=s.length;for(let l=0;l0;){const r=o.pop();if(!c(r))continue;const s=r.positions,a=r.holes;if(t[n++]=c(s)?s.length:0,t[n++]=c(a)?a.length:0,c(s)){const l=s.length;for(let u=0;u0?new Array(o):void 0;for(let a=0;aO.PI){const l=s;s=a,a=l}return r.longitudea?void 0:n.cartographicToCartesian(r)}(e,t,n);const o=rr.lineSegmentPlane(e,t,Hn.ORIGIN_XY_PLANE);return c(o)?n.scaleToGeodeticSurface(o,o):void 0}const jIe=new Se;function WIe(e,t,n){const i=[];let o,r,s,a,l,u=0;for(;ut.cartesianToCartographic(h,jIe).longitude;if(0===s)i.push({position:u,type:s,visited:!1,next:a,theta:d(o)});else if(0!==a){if(l=GIe(o,r,t,n),++u,!c(l))continue;e.splice(u,0,l),i.push({position:u,type:s,visited:!1,next:a,theta:d(l)})}++u}return i}function G6(e,t,n,i,o,r,s){const a=[];let l=r;const u=h=>m=>m.position===h,d=[];do{a.push(n[l]);const m=i.findIndex(u(l)),_=i[m];if(!c(_)){++l;continue}const{visited:p,type:y,next:A}=_;if(_.visited=!0,0===y){if(0===A){const v=i[m-(s?1:-1)];if(v?.position!==l+1){++l;continue}v.visited=!0}if(!p&&s&&A>0||r===l&&!s&&A<0){++l;continue}}if(!(s?y>=0:y<=0)){++l;continue}p||d.push(l);const w=i[m+(s?1:-1)];c(w)?l=w.position:++l}while(l=0&&l!==r&&a.lengthu.theta-d.theta),o=G6(i,o,s,a,1,0,s[0].z>=0))}return i},No.polygonsFromHierarchy=function(e,t,n,i,o,r){const s=[],a=[],l=new pN;l.enqueue(e);let u=c(r);for(;0!==l.length;){const d=l.dequeue();let h=d.positions;const m=d.holes;let _,p;if(i)for(p=h.length,_=0;_1){for(const N of P)l.enqueue(new j_(N,m));continue}}let C=h.slice();const w=c(m)?m.length:0,v=[];let D;for(_=0;_0?(n.push(0),i.push(this._planeVertices[0]),o=this._edgeNormals[0]):Hn.getPointDistance(this._boundingPlanes[1],t)>0&&(n.push(1),i.push(this._planeVertices[1]),o=this._edgeNormals[1]),r=0;r<4;r++)s=2+r,Hn.getPointDistance(this._boundingPlanes[s],t)>0&&(n.push(s),i.push(this._planeVertices[s]),o=this._edgeNormals[s]);if(0===n.length)return 0;if(1===n.length)return l=this._boundingPlanes[n[0]],a=EN(Hn.projectPointOntoPlane(l,t,CN),i[0],0,o),f.distance(a,t);if(2===n.length){if(0===n[0]){const m=[this._vertices[4*n[0]+(n[1]-2)],this._vertices[4*n[0]+(n[1]-2+1)%4]];return a=Y6(t,m[0],m[1]),f.distance(a,t)}let h,d=Number.MAX_VALUE;for(r=0;r<2;r++)l=this._boundingPlanes[n[r]],a=EN(Hn.projectPointOntoPlane(l,t,CN),i[r],0,this._edgeNormals[n[r]]),h=f.distanceSquared(a,t),h3)return a=EN(Hn.projectPointOntoPlane(this._boundingPlanes[1],t,CN),this._planeVertices[1],0,this._edgeNormals[1]),f.distance(a,t);const u=2===n[1]&&5===n[2]?0:1;return f.distance(t,0===n[0]?this._vertices[(n[1]-2+u)%4]:this._vertices[4+(n[1]-2+u)%4])};const h1e=new f,p1e=new f;function Y6(e,t,n){const i=f.subtract(n,t,h1e),o=f.subtract(e,t,p1e);let r=f.dot(i,o);if(r<=0)return t;const s=f.dot(i,i);return r>=s?n:(r/=s,new f((1-r)*t.x+r*n.x,(1-r)*t.y+r*n.y,(1-r)*t.z+r*n.z))}const m1e=new Hn(f.UNIT_X,0);function EN(e,t,n,i){let r,s,a,o=Number.MAX_VALUE;for(let l=0;l0&&(p=!0,h+=u),s1||Ir(n,"3DTILES_multiple_contents"),s=o&&!r?n.contents[0]:n.content;this._contentHeader=s,this.transform=c(n.transform)?k.unpack(n.transform):k.clone(k.IDENTITY);const a=c(i)?i.computedTransform:e.modelMatrix,l=k.multiply(a,this.transform,new k),u=c(i)?i._initialTransform:k.IDENTITY;let d,h,m;this._initialTransform=k.multiply(u,this.transform,new k),this.computedTransform=l,this.metadata=vve(e,n),this._boundingVolume=this.createBoundingVolume(n.boundingVolume,l),this._boundingVolume2D=void 0,c(s)&&c(s.boundingVolume)&&(d=this.createBoundingVolume(s.boundingVolume,l)),this._contentBoundingVolume=d,this._contentBoundingVolume2D=void 0,c(n.viewerRequestVolume)&&(h=this.createBoundingVolume(n.viewerRequestVolume,l)),this._viewerRequestVolume=h,this.geometricError=n.geometricError,this._geometricError=n.geometricError,c(this._geometricError)||(this._geometricError=c(i)?i._geometricError:e._geometricError,Mo._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale(),c(n.refine)?(("replace"===n.refine||"add"===n.refine)&&Mo._deprecationWarning("lowercase-refine",`This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`),m="REPLACE"===n.refine.toUpperCase()?Xs.REPLACE:Xs.ADD):m=c(i)?i.refine:Xs.REPLACE,this.refine=m,this.children=[],this.parent=i;let _,y,A,x,p=!1;if(t=jt.createIfNeeded(t),r)y=Or.UNLOADED,A=t.clone();else if(c(s)){let D=s.uri;c(s.url)&&(Mo._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),D=s.url),""===D?(Mo._deprecationWarning("contentUriEmpty","content.uri property is an empty string, which creates a circular dependency, making this tileset invalid. Omit the content property instead"),_=new I9(e,this),p=!0,y=Or.READY):(y=Or.UNLOADED,A=t.getDerivedResource({url:D}),x=Of.getServerKey(A.getUrlComponent()))}else _=new I9(e,this),p=!0,y=Or.READY;this._content=_,this._contentResource=A,this._contentState=y,this._expiredContent=void 0,this._serverKey=x,this.hasEmptyContent=p,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasImplicitContentMetadata=!1,this.hasMultipleContents=r,this.cacheNode=void 0;const C=n.expire;let w,v;c(C)&&(w=C.duration,c(C.date)&&(v=se.fromIso8601(C.date))),this.expireDuration=w,this.expireDate=v,this.lastStyleTime=0,this._optimChildrenWithinParent=g0.NOT_COMPUTED,this.clippingPlanesDirty=!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._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._clippingPlanesState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=X.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 se,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Mo._deprecationWarning=kf,Object.defineProperties(Mo.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return g(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 c(this._color)||(this._color=new X),X.clone(this._color)},set:function(e){this._color=X.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||c(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===Or.READY}},contentUnloaded:{get:function(){return this._contentState===Or.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===Or.EXPIRED}},contentFailed:{get:function(){return this._contentState===Or.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});const Qp=new f,ej=new se;function D1e(e){return function(){return e._priority}}function vN(){return vN=(0,Pe.Z)(function*(e,t,n,i,o){const r=e._contentState;let s;e._contentState=Or.LOADING,++t.statistics.numberOfPendingRequests;try{s=yield o}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===Ao.CANCELLED)return e._contentState=r,void++t.statistics.numberOfAttemptedRequests;throw e._contentState=Or.FAILED,a}if(e.isDestroyed())--t.statistics.numberOfPendingRequests;else{if(n.cancelled||n.state===Ao.CANCELLED)return e._contentState=r,--t.statistics.numberOfPendingRequests,void++t.statistics.numberOfAttemptedRequests;try{const a=yield function L1e(e,t){return DN.apply(this,arguments)}(e,s);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=a,e._contentState=Or.PROCESSING,a)}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=Or.FAILED,a}}}),vN.apply(this,arguments)}function DN(){return(DN=(0,Pe.Z)(function*(e,t){const n=L9(t),i=e._tileset;let o;i._disableSkipLevelOfDetail=i._disableSkipLevelOfDetail||n.contentType===Ac.GEOMETRY||n.contentType===Ac.VECTOR,(n.contentType===Ac.IMPLICIT_SUBTREE||n.contentType===Ac.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0),n.contentType===Ac.EXTERNAL_TILESET&&(e.hasTilesetContent=!0);const r=D9[n.contentType];if(e.isDestroyed())return;o=c(n.binaryPayload)?yield Promise.resolve(r(i,e,e._contentResource,n.binaryPayload.buffer,0)):yield Promise.resolve(r(i,e,e._contentResource,n.jsonPayload));const s=e._contentHeader;e.hasImplicitContentMetadata?o.metadata=e.implicitSubtree.getContentMetadataView(e.implicitCoordinates,0):e.hasImplicitContent||(o.metadata=P9(i,s));const a=O9(i,s);return c(a)&&(o.group=new c4({metadata:a})),o})).apply(this,arguments)}Mo.prototype.getScreenSpaceError=function(e,t,n){const i=this._tileset,o=g(n,1),r=c(this.parent)?this.parent.geometricError:i._scaledGeometricError,s=t?r:this.geometricError;if(0===s)return 0;const{camera:a,context:l}=e;let u=a.frustum;const d=l.drawingBufferWidth,h=l.drawingBufferHeight*o;let m;if(e.mode===ce.SCENE2D||u instanceof $n){const _=u.offCenterFrustum;c(_)&&(u=_),m=s/(Math.max(u.top-u.bottom,u.right-u.left)/Math.max(d,h))}else{const _=Math.max(this._distanceToCamera,O.EPSILON7);if(m=s*h/(_*u.sseDenominator),i.dynamicScreenSpaceError){const A=i.dynamicScreenSpaceErrorFactor;m-=O.fog(_,i._dynamicScreenSpaceErrorComputedDensity)*A}}return m/=e.pixelRatio,m},Mo.prototype.updateVisibility=function(e){const{parent:t,tileset:n}=this;if(this._updatedVisibilityFrame===n._updatedVisibilityFrame)return;const i=c(t)?t.computedTransform:n.modelMatrix,o=c(t)?t._visibilityPlaneMask:Tu.MASK_INDETERMINATE;this.updateTransform(i),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!==Tu.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=function S1e(e,t){const n=t.parent,o=c(n)&&(!e.isSkippingLevelOfDetail||0===t._screenSpaceError||n.hasTilesetContent||n.hasImplicitContent)?n._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-o}(n,this),this._priorityProgressiveResolution=function w1e(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;const n=e.memoryAdjustedScreenSpaceError;let i=t._screenSpaceErrorProgressiveResolution>n;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;const o=t.parent,r=t._screenSpaceErrorProgressiveResolution<=n,s=c(o)&&o._screenSpaceErrorProgressiveResolution>n;return r&&s&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}(n,this),this.priorityDeferred=function E1e(e,t){const{tileset:n,boundingSphere:i}=e,{radius:o,center:r}=i,{camera:s}=t,a=f.multiplyByScalar(s.directionWC,e._centerZDepth,Qp),l=f.add(s.positionWC,a,Qp),u=f.subtract(l,r,Qp);if(f.magnitude(u)>o){const v=f.normalize(u,Qp),D=f.multiplyByScalar(v,o,Qp),P=f.add(r,D,Qp),N=f.subtract(P,s.positionWC,Qp),R=f.normalize(N,Qp);e._foveatedFactor=1-Math.abs(f.dot(s.directionWC,R))}else e._foveatedFactor=0;const m=e.refine===Xs.REPLACE,_=n.isSkippingLevelOfDetail;if(m&&!_||!n.foveatedScreenSpaceError||1===n.foveatedConeSize||e._priorityProgressiveResolution&&m&&_||n._pass===Os.PRELOAD_FLIGHT||n._pass===Os.PRELOAD)return!1;const p=1-Math.cos(.5*s.frustum.fov),y=n.foveatedConeSize*p;if(e._foveatedFactor<=y)return!1;const x=O.clamp((e._foveatedFactor-y)/(p-y),0,1),C=n.foveatedInterpolationCallback(n.foveatedMinimumScreenSpaceErrorRelaxation,n.memoryAdjustedScreenSpaceError,x),w=0===e._screenSpaceError&&c(e.parent)?.5*e.parent._screenSpaceError:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-C<=w}(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame},Mo.prototype.updateExpiration=function(){if(c(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){const e=se.now(ej);se.lessThan(this.expireDate,e)&&(this._contentState=Or.EXPIRED,this._expiredContent=this._content)}},Mo.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?function I1e(e){let t=e._content;const n=e._tileset;if(!c(t)){const o=Ir(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new Nve(n,e,e._contentResource.clone(),o),e._content=t}const i=t.requestInnerContents();if(c(i))return e._contentState=Or.LOADING,i.then(o=>{if(!e.isDestroyed()&&c(o))return e._contentState=Or.PROCESSING,t}).catch(o=>{if(!e.isDestroyed())throw e._contentState=Or.FAILED,o})}(this):function O1e(e){const t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});const i=new n_({throttle:!0,throttleByServer:!0,type:t_.TILES3D,priorityFunction:D1e(e),serverKey:e._serverKey});e._request=i,t.request=i;const o=e._tileset,r=t.fetchArrayBuffer();if(c(r))return function P1e(e,t,n,i,o){return vN.apply(this,arguments)}(e,o,i,n,r);++o.statistics.numberOfAttemptedRequests}(this)},Mo.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()},Mo.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=Or.UNLOADED,this.lastStyleTime=0,this.clippingPlanesDirty=0===this._clippingPlanesState,this._clippingPlanesState=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())};const tj=new be;function IN(e,t){if(t.mode!==ce.SCENE3D&&!c(e._boundingVolume2D)){const i=be.projectTo2D(e._boundingVolume.boundingSphere,t.mapProjection,tj);e._boundingVolume2D=new av(i.center,i.radius)}return t.mode!==ce.SCENE3D?e._boundingVolume2D:e._boundingVolume}Mo.prototype.visibility=function(e,t){const n=e.cullingVolume,i=IN(this,e),o=this._tileset,r=o.clippingPlanes;if(c(r)&&r.enabled){const s=r.computeIntersectionWithBoundingVolume(i,o.clippingPlanesOriginMatrix);if(this._isClipped=s!==Qn.INSIDE,s===Qn.OUTSIDE)return Tu.MASK_OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)},Mo.prototype.contentVisibility=function(e){if(!c(this._contentBoundingVolume)||this._visibilityPlaneMask===Tu.MASK_INSIDE)return Qn.INSIDE;const t=e.cullingVolume,n=function R1e(e,t){if(t.mode!==ce.SCENE3D&&!c(e._contentBoundingVolume2D)){const i=be.projectTo2D(e._contentBoundingVolume.boundingSphere,t.mapProjection,tj);e._contentBoundingVolume2D=new av(i.center,i.radius)}return t.mode!==ce.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}(this,e),i=this._tileset,o=i.clippingPlanes;if(c(o)&&o.enabled){const r=o.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=r!==Qn.INSIDE,r===Qn.OUTSIDE)return Qn.OUTSIDE}return t.computeVisibility(n)},Mo.prototype.distanceToTile=function(e){return IN(this,e).distanceToCamera(e)};const N1e=new f;Mo.prototype.distanceToTileCenter=function(e){const n=IN(this,e).boundingVolume,i=f.subtract(n.center,e.camera.positionWC,N1e);return f.dot(e.camera.directionWC,i)},Mo.prototype.insideViewerRequestVolume=function(e){const t=this._viewerRequestVolume;return!c(t)||0===t.distanceToCamera(e)};const nj=new ne,ij=new f,M1e=new ne,oj=new f,rj=new Ce,F1e=new Eo,PN=new k;Mo.prototype.createBoundingVolume=function(e,t,n){const i=this.metadata;let o;if(c(i)&&(o=LH.parseBoundingVolumeSemantic("TILE",i)),c(o)&&(e=o),!c(e))throw new Ie("boundingVolume must be defined");if(Ir(e,"3DTILES_bounding_volume_S2"))return new _1e(e.extensions["3DTILES_bounding_volume_S2"]);const{box:r,region:s,sphere:a}=e;if(c(r))return function B1e(e,t,n){let i=f.fromElements(e[0],e[1],e[2],oj),o=ne.fromArray(e,3,M1e);i=k.multiplyByPoint(t,i,i);const r=k.getMatrix3(t,nj);return o=ne.multiply(r,o,o),c(n)?(n.update(i,o),n):new R0(i,o)}(r,t,n);if(c(s))return function U1e(e,t,n,i){if(!k.equalsEpsilon(t,n,O.EPSILON8))return function k1e(e,t,n,i){const o=Ce.unpack(e,0,rj),a=Eo.fromRectangle(o,e[4],e[5],ge.WGS84,F1e);let l=a.center,u=a.halfAxes;t=k.multiplyTransformation(t,k.inverseTransformation(n,PN),PN),l=k.multiplyByPoint(t,l,l);const d=k.getMatrix3(t,nj);return u=ne.multiply(d,u,u),c(i)&&i instanceof R0?(i.update(l,u),i):new R0(l,u)}(e,t,n,i);if(c(i))return i;const o=Ce.unpack(e,0,rj);return new QT({rectangle:o,minimumHeight:e[4],maximumHeight:e[5]})}(s,t,this._initialTransform,n);if(c(a))return function z1e(e,t,n){let i=f.fromElements(e[0],e[1],e[2],oj),o=e[3];i=k.multiplyByPoint(t,i,i);const r=k.getScale(t,ij);return o*=f.maximumComponent(r),c(n)?(n.update(i,o),n):new av(i,o)}(a,t,n);throw new Ie("boundingVolume must contain a sphere, region, or box")},Mo.prototype.updateTransform=function(e){e=g(e,k.IDENTITY);const t=k.multiplyTransformation(e,this.transform,PN);if(k.equals(t,this.computedTransform))return;k.clone(t,this.computedTransform);const i=this._header,o=this._contentHeader;this._boundingVolume=this.createBoundingVolume(i.boundingVolume,this.computedTransform,this._boundingVolume),c(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(o.boundingVolume,this.computedTransform,this._contentBoundingVolume)),c(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(i.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()},Mo.prototype.updateGeometricErrorScale=function(){const e=k.getScale(this.computedTransform,ij),t=f.maximumComponent(e);if(this.geometricError=this._geometricError*t,!c(this.parent)){const n=this._tileset;n._scaledGeometricError=n._geometricError*t}},Mo.prototype.update=function(e,t,n){const{commandList:i}=t,o=i.length;(function G1e(e,t){const n=t.clippingPlanes;let i=0;c(n)&&e._isClipped&&n.enabled&&(i=n.clippingPlanesState),i!==e._clippingPlanesState&&(e._clippingPlanesState=i,e.clippingPlanesDirty=!0)})(this,e),function V1e(e,t,n,i){if(!i.isRender)return;const o=c(e._contentHeader)&&c(e._contentHeader.boundingVolume),r=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!o;if(r){let l;l=e._finalResolution?e.hasRenderableContent?X.WHITE:X.DARKGRAY:X.YELLOW,c(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(l)),e._debugBoundingVolume.update(n);const u=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");u.color=ti.toValue(l,u.color)}else!r&&c(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&o?(c(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(X.BLUE)),e._debugContentBoundingVolume.update(n)):!t.debugShowContentBoundingVolume&&c(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&c(e._viewerRequestVolume)?(c(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(X.YELLOW)),e._debugViewerRequestVolume.update(n)):!t.debugShowViewerRequestVolume&&c(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());const s=t.debugColorizeTiles&&!e._debugColorizeTiles||c(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=X.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),a&&t.makeStyleDirty()}(this,e,t,n),function H1e(e,t,n){const i=e._expiredContent;if(!e.hasMultipleContents&&c(i)){if(!e.contentReady){try{i.update(t,n)}catch{}return}e._expiredContent.destroy(),e._expiredContent=void 0}if(c(e.content))try{e.content.update(t,n)}catch(o){throw e._contentState=Or.FAILED,o}}(this,e,t);const r=i.length;this._commandsLength=r-o;for(let s=o;se.cacheBytes||n);){const s=r.item;r=r.next,this.unloadTile(e,s,t)}},eg.prototype.trim=function(){this._trimTiles=!0};const $1e=eg;function uv(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 ON(e,t){let n;return n="_loadTimestamp"===t?se.toDate(e).getTime():e,n}uv.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=ON(e,n),this._referenceMaximum[n]=ON(t,n)};const LN=[new X(.1,.1,.1,1),new X(.153,.278,.878,1),new X(.827,.231,.49,1),new X(.827,.188,.22,1),new X(1,.592,.259,1),new X(1,.843,0,1)];uv.prototype.colorize=function(e,t){if(!c(this.tilePropertyName)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;const i=function K1e(e,t){const n=e.tilePropertyName;if(c(n)){const i=ON(t[n],n);return c(i)?(e._maximum=Math.max(i,e._maximum),e._minimum=Math.min(i,e._minimum),i):(e.tilePropertyName=void 0,i)}}(this,e),o=this._previousMinimum,r=this._previousMaximum;if(o===Number.MAX_VALUE||r===-Number.MAX_VALUE)return;const s=r-o+O.EPSILON7,d=O.clamp(i-o,0,s)/s*(LN.length-1),h=Math.floor(d),m=Math.ceil(d),_=d-h,p=LN[h],y=LN[m],A=X.clone(X.WHITE);A.red=O.lerp(p.red,y.red,_),A.green=O.lerp(p.green,y.green,_),A.blue=O.lerp(p.blue,y.blue,_),e._debugColor=A},uv.prototype.resetMinimumMaximum=function(){const e=this.tilePropertyName;if(c(e)){const t=this._referenceMinimum[e],n=this._referenceMaximum[e],i=c(t)&&c(n);this._previousMinimum=i?t:this._minimum,this._previousMaximum=i?n:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}};const Q1e=uv;function N0(){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}function dv(e,t,n,i){const o=t.innerContents,r=t.pointsLength,s=t.trianglesLength,a=t.featuresLength,l=t.geometryByteLength,u=t.texturesByteLength,d=t.batchTableByteLength;if(i?(e.numberOfFeaturesLoaded+=n?-a:a,e.numberOfPointsLoaded+=n?-r:r,e.geometryByteLength+=n?-l:l,e.texturesByteLength+=n?-u:u,e.batchTableByteLength+=n?-d:d):(e.numberOfFeaturesSelected+=n?-a:a,e.numberOfPointsSelected+=n?-r:r,e.numberOfTrianglesSelected+=n?-s:s),c(o)){const h=o.length;for(let m=0;m>1))^e>>2))^e>>4))^e>>8)}function NN(e){return 1023&((e=4278190335&((e=50393103&((e=51130563&((e&=153391689)^e>>2))^e>>4))^e>>8))^e>>16)}ox.encode2D=function(e,t){if(T.typeOf.number("x",e),T.typeOf.number("y",t),e<0||e>65535||t<0||t>65535)throw new E("inputs must be 16-bit unsigned integers");return(fj(e)|fj(t)<<1)>>>0},ox.decode2D=function(e,t){if(T.typeOf.number("mortonIndex",e),e<0||e>4294967295)throw new E("input must be a 32-bit unsigned integer");return c(t)||(t=new Array(2)),t[0]=hj(e),t[1]=hj(e>>1),t},ox.encode3D=function(e,t,n){if(T.typeOf.number("x",e),T.typeOf.number("y",t),T.typeOf.number("z",n),e<0||e>1023||t<0||t>1023||n<0||n>1023)throw new E("inputs must be 10-bit unsigned integers");return RN(e)|RN(t)<<1|RN(n)<<2},ox.decode3D=function(e,t){if(T.typeOf.number("mortonIndex",e),e<0||e>1073741823)throw new E("input must be a 30-bit unsigned integer");return c(t)||(t=new Array(3)),t[0]=NN(e),t[1]=NN(e>>1),t[2]=NN(e>>2),t};const fv=ox;function Do(e){if(T.typeOf.string("options.subdivisionScheme",e.subdivisionScheme),T.typeOf.number("options.subtreeLevels",e.subtreeLevels),T.typeOf.number("options.level",e.level),T.typeOf.number("options.x",e.x),T.typeOf.number("options.y",e.y),e.subdivisionScheme===Xr.OCTREE&&T.typeOf.number("options.z",e.z),e.level<0)throw new E("level must be non-negative");if(e.x<0)throw new E("x must be non-negative");if(e.y<0)throw new E("y must be non-negative");if(e.subdivisionScheme===Xr.OCTREE&&e.z<0)throw new E("z must be non-negative");const t=1<=t)throw new E("x is out of range");if(e.y>=t)throw new E("y is out of range");if(e.subdivisionScheme===Xr.OCTREE&&e.z>=t)throw new E("z is out of range");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===Xr.OCTREE&&(this.z=e.z)}function MN(e,t){if(e.subdivisionScheme!==t.subdivisionScheme)throw new E("coordinates must have same subdivisionScheme");if(e.subtreeLevels!==t.subtreeLevels)throw new E("coordinates must have same subtreeLevels")}Object.defineProperties(Do.prototype,{childIndex:{get:function(){let e=0;return e|=1&this.x,e|=(1&this.y)<<1,this.subdivisionScheme===Xr.OCTREE&&(e|=(1&this.z)<<2),e}},mortonIndex:{get:function(){return this.subdivisionScheme===Xr.OCTREE?fv.encode3D(this.x,this.y,this.z):fv.encode2D(this.x,this.y)}},tileIndex:{get:function(){return(this.subdivisionScheme===Xr.OCTREE?((1<<3*this.level)-1)/7:((1<<2*this.level)-1)/3)+this.mortonIndex}}}),Do.prototype.getDescendantCoordinates=function(e){T.typeOf.object("offsetCoordinates",e),MN(this,e);const t=this.level+e.level,n=(this.x<this.level)throw new E("ancestor cannot be above the tileset root");const t=1<>t,r=this.y===e.y>>t;return this.subdivisionScheme===Xr.OCTREE?o&&r&&this.z===e.z>>t:o&&r},Do.prototype.isEqual=function(e){return T.typeOf.object("otherCoordinates",e),this.subdivisionScheme===e.subdivisionScheme&&this.subtreeLevels===e.subtreeLevels&&this.level===e.level&&this.x===e.x&&this.y===e.y&&(this.subdivisionScheme!==Xr.OCTREE||this.z===e.z)},Do.prototype.isImplicitTilesetRoot=function(){return 0===this.level},Do.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels==0},Do.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels==this.subtreeLevels-1},Do.prototype.getTemplateValues=function(){const e={level:this.level,x:this.x,y:this.y};return this.subdivisionScheme===Xr.OCTREE&&(e.z=this.z),e};const pj=[0,0,0];Do.fromMortonIndex=function(e,t,n,i){let o;return e===Xr.OCTREE?(o=fv.decode3D(i,pj),new Do({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1],z:o[2]})):(o=fv.decode2D(i,pj),new Do({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1]}))},Do.fromTileIndex=function(e,t,n){let i,o,r;return e===Xr.OCTREE?(i=Math.floor(O.log2(7*n+1)/3),o=((1<<3*i)-1)/7,r=n-o):(i=Math.floor(O.log2(3*n+1)/2),o=((1<<2*i)-1)/3,r=n-o),Do.fromMortonIndex(e,t,i,r)};const oPe=Do;function Ch(){}function mj(e,t){if(e.updateVisibility(t),!e.isVisible)return;const n=e.children.length>0;if((e.hasTilesetContent||e.hasImplicitContent)&&n){const r=e.children[0];return mj(r,t),void(e._visible=r._visible)}if(!function sPe(e,t){const{parent:n,tileset:i}=e;return!(!c(n)||n.hasTilesetContent||n.hasImplicitContent||n.refine!==Xs.ADD)&&e.getScreenSpaceError(t,!0)<=i.memoryAdjustedScreenSpaceError}(e,t))return e.refine===Xs.REPLACE&&e._optimChildrenWithinParent===g0.USE_OPTIMIZATION&&n&&!function aPe(e,t){let n=!1;const i=e.children;for(let o=0;oe.tileset.memoryAdjustedScreenSpaceError)},Ch.selectTile=function(e,t){if(e.contentVisibility(t)===Qn.OUTSIDE)return;const{content:n,tileset:i}=e;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,e.lastStyleTime=0,i._selectedTilesToStyle.push(e)):e._selectedFrame0;){rx.stackMaximumLength=Math.max(rx.stackMaximumLength,s.length);const a=s.pop(),l=a.refine===Xs.ADD,u=a.refine===Xs.REPLACE,d=lPe(a);d&&uPe(a,s,t),(l||u&&!d)&&(dPe(e,a),o(a,t),fPe(a,t),a.hasRenderableContent&&!a.contentAvailable&&(n=!1)),r(a,t)}return rx.stack.trim(rx.stackMaximumLength),n};const hPe=_j;function gj(){}const sx={stack:new gp,stackMaximumLength:0},ax={stack:new gp,stackMaximumLength:0};function FN(e,t){e.contentAvailable&&Xc.selectTile(e,t)}function pPe(e,t,n){const i=e.refine===Xs.REPLACE,{tileset:o,children:r}=e,{updateTile:s,loadTile:a,touchTile:l}=Xc;for(let p=0;p0;){ax.stackMaximumLength=Math.max(ax.stackMaximumLength,a.length);const l=a.pop(),u=l.children,d=u.length,h=!l.hasRenderableContent&&n(l);if(h||l.contentAvailable||!l.hasRenderableContent&&0===l.children.length||(s=!1),i(l,t),l.isVisible||(o(l,t),r(l,t)),h)for(let _=0;_0;){sx.stackMaximumLength=Math.max(sx.stackMaximumLength,a.length);const l=a.pop(),u=l.parent,d=!c(u)||u._refines;l._refines=!!i(l)&&pPe(l,a,t)&&d;const h=!l._refines&&d;l.hasRenderableContent?l.refine===Xs.ADD?(FN(l,t),o(l,t)):l.refine===Xs.REPLACE&&(o(l,t),h&&FN(l,t)):(n._emptyTiles.push(l),o(l,t),h&&FN(l,t)),r(l,t),s(l,t)}})(n,t),sx.stack.trim(sx.stackMaximumLength),ax.stack.trim(ax.stackMaximumLength);const i=e._requestedTiles;for(let o=0;o0;){lx.stackMaximumLength=Math.max(lx.stackMaximumLength,r.length);const a=r.pop().children;for(let l=0;ln._depth+e.skipLevels)}function xPe(e,t,n){const{tileset:i,children:o}=e,{updateTile:r,loadTile:s,touchTile:a}=Xc;for(let u=0;ut:e._screenSpaceError>t))}yj.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;const n=e.root;if(Xc.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;(function EPe(e,t){const{tileset:n}=e,i=n.immediatelyLoadDesiredLevelOfDetail?Number.MAX_VALUE:Math.max(n.baseScreenSpaceError,n.memoryAdjustedScreenSpaceError),{canTraverse:o,loadTile:r,visitTile:s,touchTile:a}=Xc,l=cx.stack;for(l.push(e);l.length>0;){cx.stackMaximumLength=Math.max(cx.stackMaximumLength,l.length);const u=l.pop();APe(u,t);const d=u.parent,h=!c(d)||d._refines;u._refines=!!o(u)&&xPe(u,l,t)&&h;const m=!u._refines&&h;u.hasRenderableContent?u.refine===Xs.ADD?(hv(u,t),r(u,t)):u.refine===Xs.REPLACE&&(CPe(u,i)?(r(u,t),m&&hv(u,t)):m?(hv(u,t),r(u,t)):TPe(n,u)&&r(u,t)):(n._emptyTiles.push(u),r(u,t),m&&hv(u,t)),s(u,t),a(u,t)}})(n,t),function wPe(e,t){const{selectTile:n,canTraverse:i}=Xc,{stack:o,ancestorStack:r}=Eh;let s;for(o.push(e);o.length>0||r.length>0;){if(Eh.stackMaximumLength=Math.max(Eh.stackMaximumLength,o.length),Eh.ancestorStackMaximumLength=Math.max(Eh.ancestorStackMaximumLength,r.length),r.length>0){const u=r.peek();if(u._stackLength===o.length){r.pop(),u!==s&&(u._finalResolution=!1),n(u,t);continue}}const a=o.pop();if(!c(a))continue;const l=i(a);if(a._shouldSelect)if(a.refine===Xs.ADD)n(a,t);else{if(a._selectionDepth=r.length,a._selectionDepth>0&&(a.tileset.hasMixedContent=!0),s=a,!l){n(a,t);continue}r.push(a),a._stackLength=o.length}if(l){const u=a.children;for(let d=0;dwo._defaultMinTerrainHeight&&(a._initialClippingPlanesOriginMatrix=Rn.eastNorthUpToFixedFrame(_)),a._clippingPlanesOriginMatrix=k.clone(a._initialClippingPlanesOriginMatrix),a});return function(t,n){return e.apply(this,arguments)}}(),Cr.loadJson=function(e){return jt.createIfNeeded(e).fetchJson()},Cr.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()},Cr.prototype.loadTileset=function(e,t,n){const i=t.asset;if(!c(i))throw new Ie("Tileset must have an asset property.");if("0.0"!==i.version&&"1.0"!==i.version&&"1.1"!==i.version)throw new Ie("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");c(t.extensionsRequired)&&Cr.checkSupportedExtensions(t.extensionsRequired);const o=this._statistics,r=i.tilesetVersion;c(r)&&(this._basePath+=`?v=${r}`,(e=e.clone()).setQueryParameters({v:r}));const s=bj(this,e,t.root,n);c(n)&&(n.children.push(s),s._depth=n._depth+1);const a=[];for(a.push(s);a.length>0;){const l=a.pop();++o.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&l.refine===Xs.ADD;const u=l._header.children;if(c(u))for(let d=0;d{!c(r)||t.isDestroyed()||e.isDestroyed()||(e._processingQueue.push(t),++n.numberOfTilesProcessing)}).catch(r=>{xj(r,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?function jPe(e,t){const n=t,i=Ej;for(i.push(t);i.length>0;){const o=(t=i.pop()).children;for(let r=0;r0?t.tileFailed.raiseEvent({url:i,message:o}):(console.log(`A 3D tile failed to load: ${i}`),console.log(`Error: ${o}`))}Cr.prototype.postPassesUpdate=function(e){c(this._root)&&(function MPe(e,t){const n=e._requestedTilesInFlight;let i=0;for(let o=0;o=1?(r.cancelRequests(),++i):i>0&&(n[o-i]=r):++i}n.length-=i}(this,e),function qPe(e,t){const n=e._statistics,i=e._statisticsLast,o=n.numberOfPendingRequests,r=n.numberOfTilesProcessing,s=i.numberOfPendingRequests,a=i.numberOfTilesProcessing;nx.clone(n,i);const l=o!==s||r!==a;l&&t.afterRender.push(function(){return e.loadProgress.raiseEvent(o,r),!0}),e._tilesLoaded=0===n.numberOfPendingRequests&&0===n.numberOfTilesProcessing&&0===n.numberOfAttemptedRequests,l&&e._tilesLoaded&&(t.afterRender.push(function(){return e.allTilesLoaded.raiseEvent(),!0}),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push(function(){return e.initialTilesLoaded.raiseEvent(),!0})))}(this,e),this._cache.unloadTiles(this,wj),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)},Cr.prototype.prePassesUpdate=function(e){if(!c(this._root))return;!function kPe(e,t){!function BPe(e){const t=e._processingQueue;let n=0;for(let i=0;i0&&(t[i-n]=o)}t.length-=n}(e);const n=e._processingQueue,{cacheBytes:i,maximumCacheOverflowBytes:o,statistics:r}=e,s=i+o;let a=!1;for(let l=0;ls){a=!0;break}const u=n[l];try{u.process(e,t),u.contentReady&&(--r.numberOfTilesProcessing,e.tileLoad.raiseEvent(u))}catch(d){--r.numberOfTilesProcessing,xj(d,e,u)}}e.totalMemoryUsageInBytes0&&function UPe(e){gn("increase-screenSpaceError","The tiles needed to meet maximumScreenSpaceError would use more memory than allocated for this tileset.\n The tileset will be rendered with a larger screen space error (see memoryAdjustedScreenSpaceError).\n Consider using larger values for cacheBytes and maximumCacheOverflowBytes."),e._memoryAdjustedScreenSpaceError*=1.02;const t=e._processingQueue;for(let n=0;nA.minimumRadius){const w=Se.fromCartesian(C,A,DPe);n=f.normalize(a.positionWC,Aj),i=a.directionWC,o=a.positionCartographic.height,r=0,s=2*w.height}else{const w=k.multiplyByPoint(y,a.positionWC,OPe);if(n=f.UNIT_Z,i=k.multiplyByPointAsVector(y,a.directionWC,LPe),i=f.normalize(i,i),o=w.z,u instanceof R0){const v=l._header.boundingVolume.box[11];r=C.z-v,s=C.z+v}else if(u instanceof av){const v=x.radius;r=C.z-v,s=C.z+v}}}const h=r+(s-r)*e.dynamicScreenSpaceErrorHeightFalloff,_=O.clamp((o-h)/(s-h),0,1);let p=1-Math.abs(f.dot(i,n));p*=1-_,e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*p}(this,e),e.newFrame&&this._cache.reset()};const pv=new f,VPe={maximumFractionDigits:3};function Cj(e){const t=e/1048576;return t<1?t.toLocaleString(void 0,VPe):Math.round(t).toLocaleString()}function kN(e){const{halfAxes:t,radius:n,center:i}=e.boundingVolume.boundingVolume;let o=f.clone(i,pv);if(c(t))o.x+=.75*(t[0]+t[3]+t[6]),o.y+=.75*(t[1]+t[4]+t[7]),o.z+=.75*(t[2]+t[5]+t[8]);else if(c(n)){let r=f.normalize(i,pv);r=f.multiplyByScalar(r,.75*n,pv),o=f.add(r,i,pv)}return o}function UN(e,t,n){let i="",o=0;if(t.debugShowGeometricError&&(i+=`\nGeometric error: ${e.geometricError}`,o++),t.debugShowRenderingStatistics&&(i+=`\nCommands: ${e.commandsLength}`,o++,e.content.pointsLength>0&&(i+=`\nPoints: ${e.content.pointsLength}`,o++),e.content.trianglesLength>0&&(i+=`\nTriangles: ${e.content.trianglesLength}`,o++),i+=`\nFeatures: ${e.content.featuresLength}`,o++),t.debugShowMemoryUsage&&(i+=`\nTexture Memory: ${Cj(e.content.texturesByteLength)}`,i+=`\nGeometry Memory: ${Cj(e.content.geometryByteLength)}`,o+=2),t.debugShowUrl)if(e.hasMultipleContents){i+="\nUrls:";const s=e.content.innerContentUrls;for(let a=0;a0;e._backfaceCommands.length=0,a&&(c(e._stencilClearCommand)||(e._stencilClearCommand=new cr({stencil:0,pass:ze.CESIUM_3D_TILE,renderState:Pt.fromCache({stencilMask:Tn.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));const{statistics:l,tileVisible:u}=e,d=n.isRender,h=i.length;for(let p=0;p=0;--A)i[h+y+A]=i[h+A];for(let A=0;A0&&e._pointCloudEyeDomeLighting.update(t,r,e.pointCloudShading,e.boundingSphere),e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(c(e._tileDebugLabels)||(e._tileDebugLabels=new kS),function HPe(e,t){const n=e._selectedTiles,i=n.length,o=e._emptyTiles,r=o.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(c(e.debugPickedTile)){const s=c(e.debugPickPosition)?e.debugPickPosition:kN(e.debugPickedTile);UN(e.debugPickedTile,e,s).pixelOffset=new G(15,-15)}}else{for(let s=0;s{t.push(qn.clone(i))});const n=e.asset.extras;if(c(n)&&c(n.cesium)&&c(n.cesium.credits)){const i=n.cesium.credits;for(let o=0;oi.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}Cr.prototype.trimLoadedTiles=function(){this._cache.trim()},Cr.prototype.getTraversal=function(e){const{pass:t}=e;return t===Os.MOST_DETAILED_PRELOAD||t===Os.MOST_DETAILED_PICK?hPe:this.isSkippingLevelOfDetail?SPe:gPe},Cr.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)},Cr.prototype.updateForPass=function(e,t){T.typeOf.object("frameState",e),T.typeOf.object("tilesetPassState",t);const n=t.pass;if(n===Os.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===Os.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===Os.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))return;const i=e.commandList,o=e.camera,r=e.cullingVolume;t.ready=!1;const s=Os.getPassOptions(n),a=s.ignoreCommands,l=g(t.commandList,i),u=l.length;e.commandList=l,e.camera=g(t.camera,o),e.cullingVolume=g(t.cullingVolume,r);const d=this._statisticsPerPass[n];(this.show||a)&&(this._pass=n,t.ready=ZPe(this,e,d,s)),a&&(l.length=u),e.commandList=i,e.camera=o,e.cullingVolume=r},Cr.prototype.hasExtension=function(e){return!!c(this._extensionsUsed)&&this._extensionsUsed.indexOf(e)>-1},Cr.prototype.isDestroyed=function(){return!1},Cr.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),c(this._root)){const e=Ej;for(e.push(this._root);e.length>0;){const t=e.pop();t.destroy();const n=t.children;for(let i=0;i0&&(o=Math.ceil(o/r)*r),e._parseBody(n,o)}})},M0.prototype._parseValue=function(e,t,n){let i;if("UInt8"===t)i=e.getUint8(n),n+=1;else if("Int8"===t)i=e.getInt8(n),n+=1;else if("UInt16"===t)i=e.getUint16(n,!0),n+=2;else if("Int16"===t)i=e.getInt16(n,!0),n+=2;else if("UInt32"===t)i=e.getUint32(n,!0),n+=4;else if("Oid32"===t)i=e.getUint32(n,!0),n+=4;else if("Int32"===t)i=e.getInt32(n,!0),n+=4;else if("UInt64"===t){const o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=o+Math.pow(2,32)*r,n+=8}else if("Int64"===t){const o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=r=0}const sOe=new f,aOe=new f,cOe=new f,lOe=new f,uOe=new f,dOe=new f,fOe=new f,hOe=new f,pOe=new f,mOe=new f;ux.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(c(this._customAttributes)&&c(this._customAttributes.positions)){const i=new f(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,ne.multiplyByVector(this._customAttributes.parentRotation,i,i);let r,s,a,l,o=Number.MAX_VALUE;const u=this._customAttributes.positions,d=this._customAttributes.indices;let h;h=c(d)?d.length:u.length/3;for(let m=0;m=0&&y=0&&(u=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${A}`}).url)}}else c(this._parent._data.textureData)&&(a=!0,u=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,s.pbrMetallicRoughness.baseColorTexture={index:0});let d=[],h=[],m=[];return a&&(d=[{sampler:0,source:0}],h=[{uri:u}],m=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]),{scene:0,scenes:[{nodes:e}],nodes:t,meshes:n,buffers:i,bufferViews:o,accessors:r,materials:[s],textures:d,images:h,samplers:m,asset:{version:"2.0"}}};const vj=ux;function Zc(e,t,n){let i,o,r,s;n?(i=0,o=e):(i=e._level+1,o=e._layer),"number"==typeof t?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}function mv(e,t,n,i){return i[e+t*n]}function gOe(e,t,n){const i=n.nativeExtent;let o=(e-i.west)/(i.east-i.west)*(n.width-1),r=(t-i.south)/(i.north-i.south)*(n.height-1);const s=Math.floor(o);let a=Math.floor(r);o-=s,r-=a;const l=st.customAttributes.featureIndex.length?{}:this.getFieldsForFeature(t.customAttributes.featureIndex[n.index])},Zc.prototype.getFieldsForFeature=function(e){const t={};for(const n in this.fields)if(this.fields.hasOwnProperty(n)){const i=this.fields[n];e>=0&&eC.nativeExtent.west&&w.xC.nativeExtent.south&&w.y0){const o=this._geometryData[0].resource.url,r=this._layer._data.store.defaultGeometrySchema,s=this._geometryData[0],a=yield KPe.decode(o,r,s,this._featureData[0]);if(!c(a))return;e=s._generateGltf(a.meshData.nodesInScene,a.meshData.nodes,a.meshData.meshes,a.meshData.buffers,a.meshData.bufferViews,a.meshData.accessors),this._geometryData[0]._customAttributes=a.meshData._customAttributes}const n=this._dataProvider._binarizeGltf(e),i=new Blob([n],{type:"application/binary"});return URL.createObjectURL(i)}),J_.prototype._hookedRequestContent=J_.prototype.requestContent,J_.prototype.requestContent=function(){return this.tileset._isI3STileSet?this._isLoading?void 0:(this._isLoading=!0,this._i3sNode._createContentURL().then(e=>{if(c(e))return this._contentResource=new jt({url:e}),this._hookedRequestContent();this._isLoading=!1}).then(e=>(this._isLoading=!1,e))):this._hookedRequestContent()},Object.defineProperties(J_.prototype,{i3sNode:{get:function(){return this._i3sNode}}});const Dj=Zc;function Vl(e,t,n){this._dataProvider=e,!c(t.href)&&c(n)&&(t.href=`layers/${n}`);const i=this._dataProvider.resource.getUrlComponent();let o="";o=i.match(/layers\/\d/)?`${i}`.replace(/\/+$/,""):`${i}`.replace(/\/?$/,"/").concat(`${t.href}`),this._version=t.store.version;const r=this._version.split(".");this._majorVersion=parseInt(r[0]),this._minorVersion=r.length>1?parseInt(r[1]):0,this._resource=new jt({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._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties(Vl.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(c(this.version))return this.majorVersion<1||1===this.majorVersion&&this.minorVersion<=6}}}),Vl.prototype.load=function(){var e=(0,Pe.Z)(function*(t){if(4326!==this._data.spatialReference.wkid)throw new Ie(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(yield this._dataProvider.loadGeoidData(),yield this._loadRootNode(t),yield this._create3DTileset(t),this._rootNode._tile=this._tileset._root,this._tileset._root._i3sNode=this._rootNode,this.legacyVersion16)return this._rootNode._loadChildren()});return function(t){return e.apply(this,arguments)}}(),Vl.prototype._computeGeometryDefinitions=function(e){if(this._geometryDefinitions=[],c(this._data.geometryDefinitions))for(let t=0;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/.',!0)),jN};const wh=F0;function WN(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.missingImageUrl))throw new E("options.missingImageUrl is required.");if(!c(e.pixelsToCheck))throw new E("options.pixelsToCheck is required.");this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;const t=jt.createIfNeeded(e.missingImageUrl),n=this;t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then(function i(r){c(r.blob)&&(n._missingImageByteLength=r.blob.size);let s=VE(r);if(e.disableCheckIfAllPixelsAreTransparent){let a=!0;const l=r.width,u=e.pixelsToCheck;for(let d=0,h=u.length;a&&d0&&(a=!1)}a&&(s=void 0)}n._missingImagePixels=s,n._isReady=!0}).catch(function o(){n._missingImagePixels=void 0,n._isReady=!0})}WN.prototype.isReady=function(){return this._isReady},WN.prototype.shouldDiscardImage=function(e){if(!this._isReady)throw new E("shouldDiscardImage must not be called before the discard policy is ready.");const t=this._pixelsToCheck,n=this._missingImagePixels;if(!c(n)||c(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;const i=VE(e),o=e.width;for(let r=0,s=t.length;r1&&"name"===o?(t=1,n=i):t>2&&"title"===o?(t=2,n=i):t>3&&/name/i.test(i)?(t=3,n=i):t>4&&/title/i.test(i)&&(t=4,n=i)}c(n)&&(this.name=e[n])},qN.prototype.configureDescriptionFromProperties=function(e){this.description=function t(n){let i='';for(const o in n)if(n.hasOwnProperty(o)){const r=n[o];c(r)&&(i+="object"==typeof r?``:``)}return i+="
${o}${t(r)}
${o}${r}
",i}(e)};const B0=qN;function k0(){E.throwInstantiationError()}Object.defineProperties(k0.prototype,{rectangle:{get:E.throwInstantiationError},tileWidth:{get:E.throwInstantiationError},tileHeight:{get:E.throwInstantiationError},maximumLevel:{get:E.throwInstantiationError},minimumLevel:{get:E.throwInstantiationError},tilingScheme:{get:E.throwInstantiationError},tileDiscardPolicy:{get:E.throwInstantiationError},errorEvent:{get:E.throwInstantiationError},credit:{get:E.throwInstantiationError},proxy:{get:E.throwInstantiationError},hasAlphaChannel:{get:E.throwInstantiationError}}),k0.prototype.getTileCredits=function(e,t,n){E.throwInstantiationError()},k0.prototype.requestImage=function(e,t,n,i){E.throwInstantiationError()},k0.prototype.pickFeatures=function(e,t,n,i,o){E.throwInstantiationError()};const COe=/\.ktx2$/i;k0.loadImage=function(e,t){T.defined("url",t);const n=jt.createIfNeeded(t);return COe.test(n.url)?My(n):c(e)&&c(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):n.fetchImage({preferImageBitmap:!0,flipY:!0})};const U0=k0,z0=Object.freeze({SATELLITE:1,OCEANS:2,HILLSHADE:3});function Oj(e){this.useTiles=g(e.usePreCachedTilesIfAvailable,!0);const t=e.ellipsoid;this.tilingScheme=g(e.tilingScheme,new Ad({ellipsoid:t})),this.rectangle=g(e.rectangle,this.tilingScheme.rectangle),this.ellipsoid=t;let n=e.credit;"string"==typeof n&&(n=new qn(n)),this.credit=n,this.tileCredits=void 0,this.tileDiscardPolicy=e.tileDiscardPolicy,this.tileWidth=g(e.tileWidth,256),this.tileHeight=g(e.tileHeight,256),this.maximumLevel=e.maximumLevel}function YN(){return(YN=(0,Pe.Z)(function*(e,t){const n=e.getDerivedResource({queryParameters:{f:"json"}});try{!function EOe(e,t){const n=e.tileInfo;if(c(n)){if(t.tileWidth=n.rows,t.tileHeight=n.cols,102100===n.spatialReference.wkid||102113===n.spatialReference.wkid)t.tilingScheme=new Td({ellipsoid:t.ellipsoid});else{if(4326!==e.tileInfo.spatialReference.wkid)throw new Ie(`Tile spatial reference WKID ${e.tileInfo.spatialReference.wkid} is not supported.`);t.tilingScheme=new Ad({ellipsoid:t.ellipsoid})}if(t.maximumLevel=e.tileInfo.lods.length-1,c(e.fullExtent)){if(c(e.fullExtent.spatialReference)&&c(e.fullExtent.spatialReference.wkid))if(102100===e.fullExtent.spatialReference.wkid||102113===e.fullExtent.spatialReference.wkid){const i=new or,o=e.fullExtent,r=i.unproject(new f(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 f(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(4326!==e.fullExtent.spatialReference.wkid)throw new Ie(`fullExtent.spatialReference WKID ${e.fullExtent.spatialReference.wkid} is not supported.`);t.rectangle=Ce.fromDegrees(e.fullExtent.xmin,e.fullExtent.ymin,e.fullExtent.xmax,e.fullExtent.ymax)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}else t.useTiles=!1;c(e.copyrightText)&&e.copyrightText.length>0&&(c(t.credit)?t.tileCredits=[new qn(e.copyrightText)]:t.credit=new qn(e.copyrightText))}(yield n.fetchJson(),t)}catch(i){!function wOe(e,t){let n=`An error occurred while accessing ${e.url}`;throw c(t)&&c(t.message)&&(n+=`: ${t.message}`),new Ie(n)}(e,i)}})).apply(this,arguments)}function Xd(e){e=g(e,g.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=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=g(e.tilingScheme,new Ad({ellipsoid:e.ellipsoid})),this._useTiles=g(e.usePreCachedTilesIfAvailable,!0),this._rectangle=g(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,this._credit=e.credit,this._tileCredits=void 0;let t=e.credit;"string"==typeof t&&(t=new qn(t)),this.enablePickFeatures=g(e.enablePickFeatures,!0),this._errorEvent=new Ue}function Lj(e,t,n,i,o){let r;if(e._useTiles)r=e._resource.getDerivedResource({url:`tile/${i}/${n}/${t}`,request:o});else{const s=e._tilingScheme.tileXYToNativeRectangle(t,n,i),l={bbox:`${s.west},${s.south},${s.east},${s.north}`,size:`${e._tileWidth},${e._tileHeight}`,format:"png32",transparent:!0,f:"image"};e._tilingScheme.projection instanceof Yr?(l.bboxSR=4326,l.imageSR=4326):(l.bboxSR=3857,l.imageSR=3857),e.layers&&(l.layers=`show:${e.layers}`),r=e._resource.getDerivedResource({url:"export",request:o,queryParameters:l})}return r}Oj.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&&!c(this.tileDiscardPolicy)&&(e._tileDiscardPolicy=new xOe({missingImageUrl:Lj(e,0,0,this.maximumLevel).url,pixelsToCheck:[new G(0,0),new G(200,20),new G(20,200),new G(80,110),new G(160,130)],disableCheckIfAllPixelsAreTransparent:!0}))},Xd.fromBasemapType=function(){var e=(0,Pe.Z)(function*(t,n){let i,o,r;switch(T.defined("style",t),n=g(n,g.EMPTY_OBJECT),t){case z0.SATELLITE:{i=g(n.token,wh.defaultAccessToken),o=jt.createIfNeeded(wh.defaultWorldImageryServer),o.appendForwardSlash();const s=wh.getDefaultTokenCredit(i);c(s)&&(r=qn.clone(s))}break;case z0.OCEANS:{i=g(n.token,wh.defaultAccessToken),o=jt.createIfNeeded(wh.defaultWorldOceanServer),o.appendForwardSlash();const s=wh.getDefaultTokenCredit(i);c(s)&&(r=qn.clone(s))}break;case z0.HILLSHADE:{i=g(n.token,wh.defaultAccessToken),o=jt.createIfNeeded(wh.defaultWorldHillshadeServer),o.appendForwardSlash();const s=wh.getDefaultTokenCredit(i);c(s)&&(r=qn.clone(s))}break;default:throw new E(`Unsupported basemap type: ${t}`)}return Xd.fromUrl(o,{...n,token:i,credit:r,usePreCachedTilesIfAvailable:!0})});return function(t,n){return e.apply(this,arguments)}}(),Object.defineProperties(Xd.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}}}),Xd.fromUrl=function(){var e=(0,Pe.Z)(function*(t,n){T.defined("url",t),n=g(n,g.EMPTY_OBJECT);const i=jt.createIfNeeded(t);i.appendForwardSlash(),c(n.token)&&i.setQueryParameters({token:n.token});const o=new Xd(n);o._resource=i;const r=new Oj(n);return g(n.usePreCachedTilesIfAvailable,!0)&&(yield function SOe(e,t){return YN.apply(this,arguments)}(i,r)),r.build(o),o});return function(t,n){return e.apply(this,arguments)}}(),Xd.prototype.getTileCredits=function(e,t,n){return this._tileCredits},Xd.prototype.requestImage=function(e,t,n,i){return U0.loadImage(this,Lj(this,e,t,n,i))},Xd.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures)return;const r=this._tilingScheme.tileXYToNativeRectangle(e,t,n);let s,a,l;if(this._tilingScheme.projection instanceof Yr)s=O.toDegrees(i),a=O.toDegrees(o),l="4326";else{const m=this._tilingScheme.projection.project(new Se(i,o,0));s=m.x,a=m.y,l="3857"}let u="visible";return c(this._layers)&&(u+=`:${this._layers}`),this._resource.getDerivedResource({url:"identify",queryParameters:{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:l,layers:u}}).fetchJson().then(function(m){const _=[],p=m.results;if(!c(p))return _;for(let y=0;y`),this._tilingScheme=new Td({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 Ue}Mj.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;n0&&":"===i[i.length-1]&&(i=i.substr(0,i.length-1)):i="http:"===document.location.protocol?"http":"https";const o=g(n.mapStyle,Rj.AERIAL),r=jt.createIfNeeded(t);r.appendForwardSlash();const s={incl:"ImageryProviders",key:n.key,uriScheme:i};c(n.mapLayer)&&(s.mapLayer=n.mapLayer);const a=r.getDerivedResource({url:`REST/v1/Imagery/Metadata/${o}`,queryParameters:s}),l=new Jr(n);l._resource=r;const u=new Mj(n);return yield function IOe(e,t,n){return XN.apply(this,arguments)}(a,u),u.build(l),l});return function(t,n){return e.apply(this,arguments)}}();const POe=new Ce;Jr.prototype.getTileCredits=function(e,t,n){const i=this._tilingScheme.tileXYToRectangle(e,t,n,POe);return function ROe(e,t,n){++t;const i=[];for(let o=0,r=e.length;o=h.zoomMin&&t<=h.zoomMax){const m=Ce.intersection(n,h.bbox,LOe);c(m)&&(l=!0)}}l&&i.push(s.credit)}return i}(this._attributionList,n,i)},Jr.prototype.requestImage=function(e,t,n,i){const o=U0.loadImage(this,function OOe(e,t,n,i,o){const s=e._imageUrlSubdomains,a=(t+n+i)%s.length;return e._resource.getDerivedResource({url:e._imageUrlTemplate,request:o,templateValues:{quadkey:Jr.tileXYToQuadKey(t,n,i),subdomain:s[a],culture:e._culture},queryParameters:{n:"z"}})}(this,e,t,n,i));if(c(o))return o.catch(function(r){return c(r.blob)&&0===r.blob.size?Nj.EMPTY_IMAGE:Promise.reject(r)})},Jr.prototype.pickFeatures=function(e,t,n,i,o){},Jr.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){const r=1<=0;--o){const r=1<0?i.split(""):["a","b","c"],this._subdomains=i,this._tileWidth=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._minimumLevel=g(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._tilingScheme=g(e.tilingScheme,new Td({ellipsoid:e.ellipsoid})),this._rectangle=g(e.rectangle,this._tilingScheme.rectangle),this._rectangle=Ce.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let o=e.credit;"string"==typeof o&&(o=new qn(o)),this._credit=o,this._hasAlphaChannel=g(e.hasAlphaChannel,!0);const r=e.customTags,s=Gn(Bj,r),a=Gn(MOe,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=g(e.enablePickFeatures,!0)}Object.defineProperties(fx.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}}}),fx.prototype.getTileCredits=function(e,t,n){},fx.prototype.requestImage=function(e,t,n,i){return U0.loadImage(this,function FOe(e,t,n,i,o){bv=!1,Av=!1;const r=e._resource,s=r.getUrlComponent(!0),a=e._tags,l={},u=s.match(Fj);return c(u)&&u.forEach(function(d){const h=d.substring(1,d.length-1);c(a[h])&&(l[h]=a[h](e,t,n,i))}),r.getDerivedResource({request:o,templateValues:l})}(this,e,t,n,i))},fx.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures||!c(this._pickFeaturesResource)||0===this._getFeatureInfoFormats.length)return;let r=0;const s=this;function a(u,d){return u.callback(d)}return function l(){if(r>=s._getFeatureInfoFormats.length)return Promise.resolve([]);const u=s._getFeatureInfoFormats[r],d=function BOe(e,t,n,i,o,r,s){bv=!1,Av=!1,ZN=!1,$N=!1;const a=e._pickFeaturesResource,l=a.getUrlComponent(!0),u=e._pickFeaturesTags,d={},h=l.match(Fj);return c(h)&&h.forEach(function(m){const _=m.substring(1,m.length-1);c(u[_])&&(d[_]=u[_](e,t,n,i,o,r,s))}),a.getDerivedResource({templateValues:d})}(s,e,t,n,i,o,u.format);return++r,"json"===u.type?d.fetchJson().then(u.callback).catch(l):"xml"===u.type?d.fetchXML().then(u.callback).catch(l):"text"===u.type||"html"===u.type?d.fetchText().then(u.callback).catch(l):d.fetch({responseType:u.format}).then(a.bind(void 0,u)).catch(l)}()};let bv=!1;const $c=new Ce;let Av=!1;const hx=new Ce;let ZN=!1;const V0=new G;let $N=!1;function H0(e,t,n){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){const i=e.urlSchemeZeroPadding[t];if("string"==typeof i){const o=i.length;o>1&&(n=n.length>=o?n:new Array(o-n.toString().length+1).join("0")+n)}}return n}function Tv(e,t,n,i){bv||(e.tilingScheme.tileXYToRectangle(t,n,i,$c),$c.west=O.toDegrees($c.west),$c.south=O.toDegrees($c.south),$c.east=O.toDegrees($c.east),$c.north=O.toDegrees($c.north),bv=!0)}function xv(e,t,n,i){Av||(e.tilingScheme.tileXYToNativeRectangle(t,n,i,hx),Av=!0)}const rLe=new Ce,G0=new f;function Cv(e,t,n,i,o,r,s){if(ZN)return;KN(e,0,0,0,o,r);const a=G0,l=e.tilingScheme.tileXYToNativeRectangle(t,n,i,rLe);V0.x=e.tileWidth*(a.x-l.west)/l.width|0,V0.y=e.tileHeight*(l.north-a.y)/l.height|0,ZN=!0}const uLe=new Se;function KN(e,t,n,i,o,r,s){if(!$N){if(e.tilingScheme.projection instanceof Yr)G0.x=O.toDegrees(o),G0.y=O.toDegrees(r);else{const a=uLe;a.longitude=o,a.latitude=r,e.tilingScheme.projection.project(a,G0)}$N=!0}}const Jp=fx;function Hl(e){Jp.call(this,e)}function kj(e,t){return e.westt.rectangle.east&&(e.east=t.rectangle.east),e.southt.rectangle.north&&(e.north=t.rectangle.north),e}function Uj(e,t,n){const 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}Hl._requestMetadata=function(){var e=(0,Pe.Z)(function*(t,n,i,o){try{const r=yield i.fetchXML();return Hl._metadataSuccess(r,t,n,i,o)}catch(r){if(r instanceof OA)return Hl._metadataFailure(t,n);throw r}});return function(t,n,i,o){return e.apply(this,arguments)}}(),Hl.fromUrl=function(){var e=(0,Pe.Z)(function*(t,n){T.defined("url",t);const i=jt.createIfNeeded(t);i.appendForwardSlash();const o=i,r=i.getDerivedResource({url:"tilemapresource.xml"});n=g(n,g.EMPTY_OBJECT);const s=yield Hl._requestMetadata(n,o,r);return new Hl(s)});return function(t,n){return e.apply(this,arguments)}}(),c(Object.create)&&((Hl.prototype=Object.create(Jp.prototype)).constructor=Hl),Hl._metadataSuccess=function(e,t,n,i,o){const r=/tileformat/i,s=/tileset/i,a=/tilesets/i,l=/boundingbox/i;let u,d,h;const m=[],_=e.childNodes[0].childNodes;for(let R=0;R<_.length;R++)if(r.test(_.item(R).nodeName))u=_.item(R);else if(a.test(_.item(R).nodeName)){h=_.item(R);const B=_.item(R).childNodes;for(let F=0;F`),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new Ue}zj.prototype.build=function(e){e._channel=this.channel,e._version=this.version,e._tilingScheme=this.tilingScheme},Object.defineProperties(Tc.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}}}),Tc.fromUrl=function(){var e=(0,Pe.Z)(function*(t,n,i){T.defined("url",t),T.defined("channel",n),i=g(i,{});const o=g(i.path,"/default_map"),r=jt.createIfNeeded(t).getDerivedResource({url:"/"===o[0]?o.substring(1):o});r.appendForwardSlash();const s=r.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),a=new zj(i);a.channel=n,yield function pLe(e,t,n){return QN.apply(this,arguments)}(s,a);const l=new Tc(i);return a.build(l),l._resource=r,l._url=t,l._path=o,l});return function(t,n,i){return e.apply(this,arguments)}}(),Tc.prototype.getTileCredits=function(e,t,n){},Tc.prototype.requestImage=function(e,t,n,i){const 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 U0.loadImage(this,o)},Tc.prototype.pickFeatures=function(e,t,n,i,o){},Tc._logoUrl=void 0,Object.defineProperties(Tc,{logoUrl:{get:function(){return c(Tc._logoUrl)||(Tc._logoUrl=ni("Assets/Images/google_earth_credit.png")),Tc._logoUrl},set:function(e){T.defined("value",e),Tc._logoUrl=e}}});const mLe=Tc,_Le=/\/$/,Vj=new qn('© Mapbox © OpenStreetMap Improve this map');function j0(e){const t=(e=g(e,g.EMPTY_OBJECT)).mapId;if(!c(t))throw new E("options.mapId is required.");const n=e.accessToken;if(!c(n))throw new E("options.accessToken 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;const i=jt.createIfNeeded(g(e.url,"https://{s}.tiles.mapbox.com/v4/"));this._mapId=t,this._accessToken=n;let o=g(e.format,"png");/\./.test(o)||(o=`.${o}`),this._format=o;let s,r=i.getUrlComponent();_Le.test(r)||(r+="/"),r+=`${t}/{z}/{x}/{y}${this._format}`,i.url=r,i.setQueryParameters({access_token:n}),c(e.credit)?(s=e.credit,"string"==typeof s&&(s=new qn(s))):s=Vj,this._resource=i,this._imageryProvider=new Jp({url:i,credit:s,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(j0.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}}}),j0.prototype.getTileCredits=function(e,t,n){},j0.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)},j0.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)},j0._defaultCredit=Vj;const gLe=j0;function ng(e){e=g(e,g.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;const t=g(e.rectangle,Ce.MAX_VALUE),n=new Ad({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 Ue;let i=e.credit;"string"==typeof i&&(i=new qn(i)),this._credit=i,T.defined("options.url",e.url);const o=jt.createIfNeeded(e.url);this._resource=o,T.typeOf.number("options.tileWidth",e.tileWidth),T.typeOf.number("options.tileHeight",e.tileHeight),this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}function JN(e,t,n){return eM.apply(this,arguments)}function eM(){return(eM=(0,Pe.Z)(function*(e,t,n){try{return yield U0.loadImage(null,e)}catch(i){return function yLe(e,t,n,i){let o=`Failed to load image ${e.url}`;c(t)&&c(t.message)&&(o+=`: ${t.message}`);const r=Wa.reportError(i,n,c(n)?n._errorEvent:void 0,o,0,0,0,t);if(r.retry)return JN(e,n,r);throw c(n)&&(n._hasError=!0),new Ie(o)}(e,i,t,n)}})).apply(this,arguments)}Object.defineProperties(ng.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}}}),ng.fromUrl=function(){var e=(0,Pe.Z)(function*(t,n){T.defined("url",t);const i=jt.createIfNeeded(t),o=yield JN(i);n=g(n,g.EMPTY_OBJECT);const r=new ng({...n,url:t,tileWidth:o.width,tileHeight:o.height});return r._image=o,r});return function(t,n){return e.apply(this,arguments)}}(),ng.prototype.getTileCredits=function(e,t,n){},ng.prototype.requestImage=function(){var e=(0,Pe.Z)(function*(t,n,i,o){if(!this._hasError&&!c(this._image)){const r=yield JN(this._resource,this);return this._image=r,Wa.reportSuccess(this._errorEvent),r}return this._image});return function(t,n,i,o){return e.apply(this,arguments)}}(),ng.prototype.pickFeatures=function(e,t,n,i,o){};const bLe=ng;function TLe(e){const t=[],n=e.features;for(let i=0;i0)for(let r=0;r\s*<\/body>/im,LLe=//im,RLe=/([\s\S]*)<\/title>/im;function Hj(e){if(OLe.test(e)||LLe.test(e))return;let t;const n=RLe.exec(e);n&&n.length>1&&(t=n[1]);const i=new B0;return i.name=t,i.description=e,i.data=e,[i]}const iM=function ALe(e,t,n){if(!c(e))throw new E("type is required.");if(this.type=e,!c(t))if("json"===e)t="application/json";else if("xml"===e)t="text/xml";else if("html"===e)t="text/html";else{if("text"!==e)throw new E('format is required when type is not "json", "xml", "html", or "text".');t="text/plain"}if(this.format=t,!c(n))if("json"===e)n=TLe;else if("xml"===e)n=wLe;else if("html"===e)n=Hj;else{if("text"!==e)throw new E('callback is required when type is not "json", "xml", "html", or "text".');n=Hj}this.callback=n};function px(e){e=g(e,g.EMPTY_OBJECT),T.typeOf.object("options.clock",e.clock),T.typeOf.object("options.times",e.times),T.typeOf.func("options.requestImageFunction",e.requestImageFunction),T.typeOf.func("options.reloadFunction",e.reloadFunction),this._tileCache={},this._tilesRequestedForInterval=[];const 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)}function Gj(e,t,n){return`${e}-${t}-${n}`}function jj(e){const t=e._times;if(!c(t))return;const n=e._clock,i=n.currentTime,r=n.multiplier;if(!(n.canAnimate&&n.shouldAnimate||0===r))return;let s,a=t.indexOf(i);if(a<0)return;const l=t.get(a);return r>0?(s=se.secondsDifference(l.stop,i),++a):(s=se.secondsDifference(l.start,i),--a),s/=r,a>=0&&s<=5?t.get(a):void 0}function Wj(e,t,n){const i=e._times.indexOf(n.start),o=e._tileCache;let r=o[i];c(r)||(r=o[i]={});const s=t.key;if(c(r[s]))return!0;const a=function NLe(e){const t=e.split("-");if(3===t.length)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}(s),l=new n_({throttle:!1,throttleByServer:!0,type:t_.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(a.x,a.y,a.level,l,n);return!!c(u)&&(r[s]={promise:u,request:l},!0)}Object.defineProperties(px.prototype,{clock:{get:function(){return this._clock},set:function(e){if(!c(e))throw new E("value is required.");this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){if(!c(e))throw new E("value is required.");this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}}),px.prototype.getFromCache=function(e,t,n,i){const o=Gj(e,t,n);let r;const s=this._tileCache[this._currentIntervalIndex];if(c(s)&&c(s[o])){const a=s[o];r=a.promise.catch(function(l){throw i.state=a.request.state,l}),delete s[o]}return r},px.prototype.checkApproachingInterval=function(e,t,n,i){const o=Gj(e,t,n),r=this._tilesRequestedForInterval,s=jj(this),a={key:o,priorityFunction:i.priorityFunction};(!c(s)||!Wj(this,a,s))&&r.push(a),r.length>=512&&r.splice(0,256)},px.prototype._clockOnTick=function(e){const i=this._times.indexOf(e.currentTime),o=this._currentIntervalIndex;if(i!==o){const s=this._tileCache[o];for(const a in s)s.hasOwnProperty(a)&&s[a].request.cancel();return delete this._tileCache[o],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,void this._reloadFunction()}const r=jj(this);if(c(r)){const s=this._tilesRequestedForInterval;let a=!0;for(;a&&0!==s.length;){const l=s.pop();a=Wj(this,l,r),a||s.push(l)}}};const qj=px,MLe=[3034,3035,3042,3043,3044],FLe=[4471,4559];function Vu(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.url))throw new E("options.url is required.");if(!c(e.layers))throw new E("options.layers is required.");if(c(e.times)&&!c(e.clock))throw new E("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=g(e.getFeatureInfoUrl,e.url);const t=jt.createIfNeeded(e.url),n=jt.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(Vu.DefaultParameters,!0),n.setQueryParameters(Vu.GetFeatureInfoDefaultParameters,!0),c(e.parameters)&&t.setQueryParameters(Xj(e.parameters)),c(e.getFeatureInfoParameters)&&n.setQueryParameters(Xj(e.getFeatureInfoParameters));const i=this;this._reload=void 0,c(e.times)&&(this._timeDynamicImagery=new qj({clock:e.clock,times:e.times,requestImageFunction:function(s,a,l,u,d){return Yj(i,s,a,l,u,d)},reloadFunction:function(){c(i._reload)&&i._reload()}}));const 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=g(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof or?"EPSG:3857":"CRS:84");const s=o.crs.split(":");if("EPSG"===s[0]&&2===s.length){const a=Number(s[1]);(a>=4e3&&a<5e3&&!FLe.includes(a)||MLe.includes(a))&&(o.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else o.srs=g(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof or?"EPSG:3857":"EPSG:4326");t.setQueryParameters(o,!0),n.setQueryParameters(o,!0);const 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 Jp({url:t,pickFeaturesUrl:n,tilingScheme:g(e.tilingScheme,new Ad({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:g(e.getFeatureInfoFormats,Vu.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures})}function Yj(e,t,n,i,o,r){const s=c(r)?r.data:void 0,a=e._tileProvider;return c(s)&&a._resource.setQueryParameters(s),a.requestImage(t,n,i,o)}function Xj(e){const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}Object.defineProperties(Vu.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}}}),Vu.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)},Vu.prototype.requestImage=function(e,t,n,i){let o;const r=this._timeDynamicImagery;let s;return c(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),c(o)||(o=Yj(this,e,t,n,i,s)),c(o)&&c(r)&&r.checkApproachingInterval(e,t,n,i),o},Vu.prototype.pickFeatures=function(e,t,n,i,o){const r=this._timeDynamicImagery;return function BLe(e,t,n,i,o,r,s){const a=c(s)?s.data:void 0,l=e._tileProvider;return c(a)&&l._pickFeaturesResource.setQueryParameters(a),l.pickFeatures(t,n,i,o,r)}(this,e,t,n,i,o,c(r)?r.currentInterval:void 0)},Vu.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),Vu.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),Vu.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new iM("json","application/json")),Object.freeze(new iM("xml","text/xml")),Object.freeze(new iM("text","text/html"))]);const Zj=Vu,kLe=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function mx(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.url))throw new E("options.url is required.");if(!c(e.layer))throw new E("options.layer is required.");if(!c(e.style))throw new E("options.style is required.");if(!c(e.tileMatrixSetID))throw new E("options.tileMatrixSetID is required.");if(c(e.times)&&!c(e.clock))throw new E("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;const t=jt.createIfNeeded(e.url),n=e.style,i=e.tileMatrixSetID,o=t.url,r=o.match(/{/g);!c(r)||1===r.length&&/{s}/.test(o)?(t.setQueryParameters(kLe),this._useKvp=!0):(t.setTemplateValues({style:n,Style:n,TileMatrixSet:i}),this._useKvp=!1),this._resource=t,this._layer=e.layer,this._style=n,this._tileMatrixSetID=i,this._tileMatrixLabels=e.tileMatrixLabels,this._format=g(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=c(e.tilingScheme)?e.tilingScheme:new Td({ellipsoid:e.ellipsoid}),this._tileWidth=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._minimumLevel=g(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=g(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;const s=this;this._reload=void 0,c(e.times)&&(this._timeDynamicImagery=new qj({clock:e.clock,times:e.times,requestImageFunction:function(h,m,_,p,y){return $j(s,h,m,_,p,y)},reloadFunction:function(){c(s._reload)&&s._reload()}}));const a=this._tilingScheme.positionToTileXY(Ce.southwest(this._rectangle),this._minimumLevel),l=this._tilingScheme.positionToTileXY(Ce.northeast(this._rectangle),this._minimumLevel),u=(Math.abs(l.x-a.x)+1)*(Math.abs(l.y-a.y)+1);if(u>4)throw new E(`The imagery provider's rectangle and minimumLevel indicate that there are ${u} tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.`);this._errorEvent=new Ue;const d=e.credit;this._credit="string"==typeof d?new qn(d):d,this._subdomains=e.subdomains,this._subdomains=Array.isArray(this._subdomains)?this._subdomains.slice():c(this._subdomains)&&this._subdomains.length>0?this._subdomains.split(""):["a","b","c"]}function $j(e,t,n,i,o,r){const s=e._tileMatrixLabels,a=c(s)?s[i]:i.toString(),l=e._subdomains,u=e._dimensions,d=c(r)?r.data:void 0;let h,m;if(e._useKvp){let _={};_.tilematrix=a,_.layer=e._layer,_.style=e._style,_.tilerow=n,_.tilecol=t,_.tilematrixset=e._tileMatrixSetID,_.format=e._format,c(u)&&(_=Gn(_,u)),c(d)&&(_=Gn(_,d)),m={s:l[(t+n+i)%l.length]},h=e._resource.getDerivedResource({queryParameters:_,request:o}),h.setTemplateValues(m)}else m={TileMatrix:a,TileRow:n.toString(),TileCol:t.toString(),s:l[(t+n+i)%l.length]},h=e._resource.getDerivedResource({request:o}),h.setTemplateValues(m),c(u)&&h.setTemplateValues(u),c(d)&&h.setTemplateValues(d);return U0.loadImage(e,h)}Object.defineProperties(mx.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,c(this._reload)&&this._reload())}}}),mx.prototype.getTileCredits=function(e,t,n){},mx.prototype.requestImage=function(e,t,n,i){let o;const r=this._timeDynamicImagery;let s;return c(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),c(o)||(o=$j(this,e,t,n,i,s)),c(o)&&c(r)&&r.checkApproachingInterval(e,t,n,i),o},mx.prototype.pickFeatures=function(e,t,n,i,o){};const Kj=mx,ULe={ARCGIS_MAPSERVER:gv.fromUrl,BING:(e=(0,Pe.Z)(function*(t,n){return NOe.fromUrl(t,n)}),function(n,i){return e.apply(this,arguments)}),GOOGLE_EARTH:function(){var e=(0,Pe.Z)(function*(t,n){const i=n.channel;return delete n.channel,mLe.fromUrl(t,i,n)});return function(n,i){return e.apply(this,arguments)}}(),MAPBOX:(e,t)=>new gLe({url:e,...t}),SINGLE_TILE:bLe.fromUrl,TMS:Ev.fromUrl,URL_TEMPLATE:(e,t)=>new Jp({url:e,...t}),WMS:(e,t)=>new Zj({url:e,...t}),WMTS:(e,t)=>new Kj({url:e,...t})};var e;function Zd(e){e=g(e,g.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 Ue}Object.defineProperties(Zd.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(){}}}),Zd.fromAssetId=function(){var e=(0,Pe.Z)(function*(t,n){T.typeOf.number("assetId",t),n=g(n,g.EMPTY_OBJECT);const i=kA._createEndpointResource(t,n),o=t.toString()+n.accessToken+n.server;let r=Zd._endpointCache[o];c(r)||(r=i.fetchJson(),Zd._endpointCache[o]=r);const s=yield r;if("IMAGERY"!==s.type)throw new Ie(`Cesium ion asset ${t} is not an imagery asset.`);let a;const l=s.externalType;if(c(l)){const d=ULe[l];if(!c(d))throw new Ie(`Unrecognized Cesium ion imagery type: ${l}`);const h={...s.options},m=h.url;delete h.url,a=yield d(m,h)}else a=yield Ev.fromUrl(new kA(s,i));const u=new Zd(n);return a.errorEvent.addEventListener(function(d){d.provider=u,u._errorEvent.raiseEvent(d)}),u._tileCredits=kA.getCreditsFromEndpoint(s,i),u._imageryProvider=a,u});return function(t,n){return e.apply(this,arguments)}}(),Zd.prototype.getTileCredits=function(e,t,n){const i=this._imageryProvider.getTileCredits(e,t,n);return c(i)?this._tileCredits.concat(i):this._tileCredits},Zd.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)},Zd.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)},Zd._endpointCache={};const Sv=Zd,vv=Object.freeze({AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4}),Dv=function zLe(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.style,vv.AERIAL);return Sv.fromAssetId(t)},ji=Object.freeze({UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7});function W0(e,t,n,i,o){this.imageryLayer=e,this.x=t,this.y=n,this.level=i,this.request=void 0,0!==i&&(this.parent=e.getImageryFromCache(t/2|0,n/2|0,i-1)),this.state=ji.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!c(o)&&e.ready&&(o=e.imageryProvider.tilingScheme.tileXYToRectangle(t,n,i)),this.rectangle=o}W0.createPlaceholder=function(e){const t=new W0(e,0,0,0);return t.addReference(),t.state=ji.PLACEHOLDER,t},W0.prototype.addReference=function(){++this.referenceCount},W0.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.imageryLayer.removeImageryFromCache(this),c(this.parent)&&this.parent.releaseReference(),c(this.image)&&c(this.image.destroy)&&this.image.destroy(),c(this.texture)&&this.texture.destroy(),c(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),Ye(this),0):this.referenceCount},W0.prototype.processStateMachine=function(e,t,n){this.state===ji.UNLOADED&&!n&&(this.state=ji.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===ji.RECEIVED&&(this.state=ji.TRANSITIONING,this.imageryLayer._createTexture(e.context,this)),(this.state===ji.TEXTURE_LOADED||this.state===ji.READY&&t&&!this.texture)&&(this.state=ji.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};const Qj=W0;function oM(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}oM.prototype.freeResources=function(){c(this.readyImagery)&&this.readyImagery.releaseReference(),c(this.loadingImagery)&&this.loadingImagery.releaseReference()},oM.prototype.processStateMachine=function(e,t,n){const i=this.loadingImagery,o=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===ji.READY)return c(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this),!0;let s,r=i.parent;for(;c(r)&&(r.state!==ji.READY||!this.useWebMercatorT&&!c(r.texture));)r.state!==ji.FAILED&&r.state!==ji.INVALID&&(s=s||r),r=r.parent;return this.readyImagery!==r&&(c(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=r,c(r)&&(r.addReference(),this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this))),!(i.state!==ji.FAILED&&i.state!==ji.INVALID||c(s)&&(s.processStateMachine(t,!this.useWebMercatorT,n),1))};const Jj=oM;function bi(e,t){this._imageryProvider=e,this._readyEvent=new Ue,this._errorEvent=new Ue,t=g(t,g.EMPTY_OBJECT),e=g(e,g.EMPTY_OBJECT),this.alpha=g(t.alpha,g(e._defaultAlpha,1)),this.nightAlpha=g(t.nightAlpha,g(e._defaultNightAlpha,1)),this.dayAlpha=g(t.dayAlpha,g(e._defaultDayAlpha,1)),this.brightness=g(t.brightness,g(e._defaultBrightness,bi.DEFAULT_BRIGHTNESS)),this.contrast=g(t.contrast,g(e._defaultContrast,bi.DEFAULT_CONTRAST)),this.hue=g(t.hue,g(e._defaultHue,bi.DEFAULT_HUE)),this.saturation=g(t.saturation,g(e._defaultSaturation,bi.DEFAULT_SATURATION)),this.gamma=g(t.gamma,g(e._defaultGamma,bi.DEFAULT_GAMMA)),this.splitDirection=g(t.splitDirection,bi.DEFAULT_SPLIT),this.minificationFilter=g(t.minificationFilter,g(e._defaultMinificationFilter,bi.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=g(t.magnificationFilter,g(e._defaultMagnificationFilter,bi.DEFAULT_MAGNIFICATION_FILTER)),this.show=g(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=g(t.rectangle,Ce.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new Jj(Qj.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=g(t.colorToAlphaThreshold,bi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD)}Object.defineProperties(bi.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},ready:{get:function(){return c(this._imageryProvider)}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},rectangle:{get:function(){return this._rectangle}}}),bi.DEFAULT_BRIGHTNESS=1,bi.DEFAULT_CONTRAST=1,bi.DEFAULT_HUE=0,bi.DEFAULT_SATURATION=1,bi.DEFAULT_GAMMA=1,bi.DEFAULT_SPLIT=I_.NONE,bi.DEFAULT_MINIFICATION_FILTER=ei.LINEAR,bi.DEFAULT_MAGNIFICATION_FILTER=ls.LINEAR,bi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004,bi.fromProviderAsync=function(e,t){T.typeOf.object("imageryProviderPromise",e);const n=new bi(void 0,t);return function YLe(e,t){sM.apply(this,arguments)}(n,Promise.resolve(e)),n},bi.fromWorldImagery=function(e){return e=g(e,g.EMPTY_OBJECT),bi.fromProviderAsync(Dv({style:e.style}),e)},bi.prototype.isBaseLayer=function(){return this._isBaseLayer},bi.prototype.isDestroyed=function(){return!1},bi.prototype.destroy=function(){return Ye(this)};const eW=new Ce,tW=new Ce,rM=new Ce,nW=new Ce;function iW(e,t,n){return`${e}:${t}:${n}`}function oW(e,t,n){return JSON.stringify([e,t,n])}bi.prototype.getImageryRectangle=function(){return Ce.intersection(this._imageryProvider.rectangle,this._rectangle)},bi.prototype._createTileImagerySkeletons=function(e,t,n){const i=e.data;if(!c(t)||c(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||c(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;c(n)||(n=i.imagery.length);const o=this._imageryProvider;if(!this.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),i.imagery.splice(n,0,this._skeletonPlaceholder),!0;const r=o.tilingScheme.projection instanceof or&&e.rectangle.north<or.MaximumLatitude&&e.rectangle.south>-or.MaximumLatitude,s=Ce.intersection(o.rectangle,this._rectangle,eW);let a=Ce.intersection(e.rectangle,s,tW);if(!c(a)){if(!this.isBaseLayer())return!1;const L=s,M=e.rectangle;a=tW,M.south>=L.north?a.north=a.south=L.north:M.north<=L.south?a.north=a.south=L.south:(a.south=Math.max(M.south,L.south),a.north=Math.min(M.north,L.north)),M.west>=L.east?a.west=a.east=L.east:M.east<=L.west?a.west=a.east=L.west:(a.west=Math.max(M.west,L.west),a.east=Math.min(M.east,L.east))}let l=0;a.south>0?l=a.south:a.north<0&&(l=a.north);let h=function WLe(e,t,n){const i=e._imageryProvider,o=i.tilingScheme,r=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof Yr?1:Math.cos(n),u=r.maximumRadius*o.rectangle.width*s/(i.tileWidth*o.getNumberOfXTilesAtLevel(0))/t,d=Math.log(u)/Math.log(2);return 0|Math.round(d)}(this,1*t.getLevelMaximumGeometricError(e.level),l);h=Math.max(0,h);const m=o.maximumLevel;if(h>m&&(h=m),c(o.minimumLevel)){const L=o.minimumLevel;h<L&&(h=L)}const _=o.tilingScheme,p=_.positionToTileXY(Ce.northwest(a),h),y=_.positionToTileXY(Ce.southeast(a),h);let A=e.rectangle.width/512,x=e.rectangle.height/512;const C=_.tileXYToRectangle(p.x,p.y,h);Math.abs(C.south-e.rectangle.north)<x&&p.y<y.y&&++p.y,Math.abs(C.east-e.rectangle.west)<A&&p.x<y.x&&++p.x;const w=_.tileXYToRectangle(y.x,y.y,h);Math.abs(w.north-e.rectangle.south)<x&&y.y>p.y&&--y.y,Math.abs(w.west-e.rectangle.east)<A&&y.x>p.x&&--y.x;const v=Ce.clone(e.rectangle,nW);let N,D=_.tileXYToRectangle(p.x,p.y,h),P=Ce.intersection(D,s,rM);r?(_.rectangleToNativeRectangle(v,v),_.rectangleToNativeRectangle(D,D),_.rectangleToNativeRectangle(P,P),_.rectangleToNativeRectangle(s,s),N=_.tileXYToNativeRectangle.bind(_),A=v.width/512,x=v.height/512):N=_.tileXYToRectangle.bind(_);let R,S,B=0,F=1;!this.isBaseLayer()&&Math.abs(P.west-v.west)>=A&&(B=Math.min(1,(P.west-v.west)/v.width)),!this.isBaseLayer()&&Math.abs(P.north-v.north)>=x&&(F=Math.max(0,(P.north-v.south)/v.height));const I=F;for(let L=p.x;L<=y.x;L++)if(R=B,D=N(L,p.y,h),P=Ce.simpleIntersection(D,s,rM),c(P)){B=Math.min(1,(P.east-v.west)/v.width),L===y.x&&(this.isBaseLayer()||Math.abs(P.east-v.east)<A)&&(B=1),F=I;for(let M=p.y;M<=y.y;M++){if(S=F,D=N(L,M,h),P=Ce.simpleIntersection(D,s,rM),!c(P))continue;F=Math.max(0,(P.south-v.south)/v.height),M===y.y&&(this.isBaseLayer()||Math.abs(P.south-v.south)<x)&&(F=0);const U=new fe(R,F,B,S),z=this.getImageryFromCache(L,M,h);i.imagery.splice(n,0,new Jj(z,U,r)),++n}}return!0},bi.prototype._calculateTextureTranslationAndScale=function(e,t){let n=t.readyImagery.rectangle,i=e.rectangle;if(t.useWebMercatorT){const l=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;n=l.rectangleToNativeRectangle(n,eW),i=l.rectangleToNativeRectangle(i,nW)}const o=i.width,r=i.height,s=o/n.width,a=r/n.height;return new fe(s*(i.west-n.west)/o,a*(i.south-n.south)/r,s,a)},bi.prototype._requestImagery=function(e){const t=this._imageryProvider,n=this;function o(s){if(e.request.state===Ao.CANCELLED)return e.state=ji.UNLOADED,void(e.request=void 0);e.state=ji.FAILED,e.request=void 0,n._requestImageError=Wa.reportError(n._requestImageError,t,t.errorEvent,`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`,e.x,e.y,e.level,s),n._requestImageError.retry&&r()}function r(){const s=new n_({throttle:!1,throttleByServer:!0,type:t_.IMAGERY});e.request=s,e.state=ji.TRANSITIONING;const a=t.requestImage(e.x,e.y,e.level,s);if(!c(a))return e.state=ji.UNLOADED,void(e.request=void 0);c(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),a.then(function(l){!function i(s){if(!c(s))return o();e.image=s,e.state=ji.RECEIVED,e.request=void 0,Wa.reportSuccess(n._requestImageError)}(l)}).catch(function(l){o(l)})}r()},bi.prototype._createTextureWebGL=function(e,t){const n=new Hi({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),i=t.image;return c(i.internalFormat)?new jn({context:e,pixelFormat:i.internalFormat,width:i.width,height:i.height,source:{arrayBufferView:i.bufferView},sampler:n}):new jn({context:e,source:i,pixelFormat:this._imageryProvider.hasAlphaChannel?vt.RGBA:vt.RGB,sampler:n})},bi.prototype._createTexture=function(e,t){const n=this._imageryProvider,i=t.image;if(c(n.tileDiscardPolicy)){const r=n.tileDiscardPolicy;if(c(r)){if(!r.isReady())return void(t.state=ji.RECEIVED);if(r.shouldDiscardImage(i))return void(t.state=ji.INVALID)}}if(this.minificationFilter!==ei.NEAREST&&this.minificationFilter!==ei.LINEAR)throw new E("ImageryLayer minification filter must be NEAREST or LINEAR");const o=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof or?t.textureWebMercator=o:t.texture=o,t.image=void 0,t.state=ji.TEXTURE_LOADED},bi.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter;const i=this.magnificationFilter;if(n===ei.LINEAR&&i===ls.LINEAR&&!vt.isCompressedFormat(t.pixelFormat)&&O.isPowerOfTwo(t.width)&&O.isPowerOfTwo(t.height)){n=ei.LINEAR_MIPMAP_LINEAR;const r=mn.maximumTextureFilterAnisotropy,s=Math.min(r,g(this._maximumAnisotropy,r)),a=iW(n,i,s);let l=e.cache.imageryLayerMipmapSamplers;c(l)||(l={},e.cache.imageryLayerMipmapSamplers=l);let u=l[a];c(u)||(u=l[a]=new Hi({wrapS:$i.CLAMP_TO_EDGE,wrapT:$i.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:s})),t.generateMipmap(By.NICEST),t.sampler=u}else{const r=iW(n,i,0);let s=e.cache.imageryLayerNonMipmapSamplers;c(s)||(s={},e.cache.imageryLayerNonMipmapSamplers=s);let a=s[r];c(a)||(a=s[r]=new Hi({wrapS:$i.CLAMP_TO_EDGE,wrapT:$i.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=a}},bi.prototype._reprojectTexture=function(e,t,n){const i=t.textureWebMercator||t.texture,o=t.rectangle,r=e.context;if((n=g(n,!0))&&!(this._imageryProvider.tilingScheme.projection instanceof Yr)&&o.width/i.width>1e-5){const s=this;t.addReference();const a=new Ew({persists:!0,owner:this,preExecute:function(l){!function jLe(e,t,n,i){let o=t.cache.imageryLayer_reproject;if(!c(o)){o=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){c(this.framebuffer)&&this.framebuffer.destroy(),c(this.vertexArray)&&this.vertexArray.destroy(),c(this.shaderProgram)&&this.shaderProgram.destroy()}};const A=new Float32Array(256);let x=0;for(let P=0;P<64;++P){const N=P/63;A[x++]=0,A[x++]=N,A[x++]=1,A[x++]=N}const C={position:0,webMercatorT:1},w=Nf.getRegularGridIndices(2,64),v=yn.createIndexBuffer({context:t,typedArray:w,usage:Tt.STATIC_DRAW,indexDatatype:Ot.UNSIGNED_SHORT});o.vertexArray=new ds({context:t,attributes:[{index:C.position,vertexBuffer:yn.createVertexBuffer({context:t,typedArray:A,usage:Tt.STATIC_DRAW}),componentsPerAttribute:2},{index:C.webMercatorT,vertexBuffer:yn.createVertexBuffer({context:t,sizeInBytes:512,usage:Tt.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:v});const D=new Et({sources:["in vec4 position;\nin float webMercatorT;\n\nuniform vec2 u_textureDimensions;\n\nout vec2 v_textureCoordinates;\n\nvoid main()\n{\n v_textureCoordinates = vec2(position.x, webMercatorT);\n gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n"]});o.shaderProgram=mi.fromCache({context:t,vertexShaderSource:D,fragmentShaderSource:"uniform sampler2D u_texture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n out_FragColor = texture(u_texture, v_textureCoordinates);\n}\n",attributeLocations:C}),o.sampler=new Hi({wrapS:$i.CLAMP_TO_EDGE,wrapT:$i.CLAMP_TO_EDGE,minificationFilter:ei.LINEAR,magnificationFilter:ls.LINEAR})}n.sampler=o.sampler;const r=n.width,s=n.height;Iv.textureDimensions.x=r,Iv.textureDimensions.y=s,Iv.texture=n;let a=Math.sin(i.south);const l=.5*Math.log((1+a)/(1-a));a=Math.sin(i.north);const d=1/(.5*Math.log((1+a)/(1-a))-l),h=new jn({context:t,width:r,height:s,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});O.isPowerOfTwo(r)&&O.isPowerOfTwo(s)&&h.generateMipmap(By.NICEST);const m=i.south,_=i.north,p=GLe;let y=0;for(let A=0;A<64;++A){const C=O.lerp(m,_,A/63);a=Math.sin(C);const v=(.5*Math.log((1+a)/(1-a))-l)*d;p[y++]=v,p[y++]=v}o.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(p),e.shaderProgram=o.shaderProgram,e.outputTexture=h,e.uniformMap=Iv,e.vertexArray=o.vertexArray}(l,r,i,t.rectangle)},postExecute:function(l){t.texture=l,s._finalizeReprojectTexture(r,l),t.state=ji.READY,t.releaseReference()},canceled:function(){t.state=ji.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(a)}else n&&(t.texture=i),this._finalizeReprojectTexture(r,i),t.state=ji.READY},bi.prototype.queueReprojectionCommands=function(e){const t=this._reprojectComputeCommands,n=t.length;for(let i=0;i<n;++i)e.commandList.push(t[i]);t.length=0},bi.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach(function(e){c(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0},bi.prototype.getImageryFromCache=function(e,t,n,i){const o=oW(e,t,n);let r=this._imageryCache[o];return c(r)||(r=new Qj(this,e,t,n,i),this._imageryCache[o]=r),r.addReference(),r},bi.prototype.removeImageryFromCache=function(e){const t=oW(e.x,e.y,e.level);delete this._imageryCache[t]};const Iv={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new G,texture:void 0},GLe=zn.supportsTypedArrays()?new Float32Array(128):void 0;function sM(){return sM=(0,Pe.Z)(function*(e,t){let n;try{if(n=yield Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){!function qLe(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}(e._errorEvent,i)}}),sM.apply(this,arguments)}const xc=bi,rW=function XLe(e){if(!c(e))throw new E("uri is required.");const t=new Hs(e);t.normalize();let n=t.path();const i=n.lastIndexOf("/");return-1!==i&&(n=n.substr(i+1)),n};function _x(){this._cache={}}_x.prototype.fromColor=function(e,t){if(!c(e))throw new E("color is required");if(!c(t))throw new E("size is required");return Pv(void 0,void 0,e,t,this._cache)},_x.prototype.fromUrl=function(e,t,n){if(!c(e))throw new E("url is required");if(!c(t))throw new E("color is required");if(!c(n))throw new E("size is required");return Pv(e,void 0,t,n,this._cache)},_x.prototype.fromMakiIconId=function(e,t,n){if(!c(e))throw new E("id is required");if(!c(t))throw new E("color is required");if(!c(n))throw new E("size is required");return Pv(ni(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)},_x.prototype.fromText=function(e,t,n){if(!c(e))throw new E("text is required");if(!c(t))throw new E("color is required");if(!c(n))throw new E("size is required");return Pv(void 0,e,t,n,this._cache)};const ZLe=new X;function sW(e,t,n){const i=n/2.5;let o=i,r=i;t.width>t.height?r=i*(t.height/t.width):t.width<t.height&&(o=i*(t.width/t.height));const s=Math.round((n-o)/2),a=Math.round(7/24*n-r/2);e.globalCompositeOperation="destination-out",e.drawImage(t,s-1,a,o,r),e.drawImage(t,s,a-1,o,r),e.drawImage(t,s+1,a,o,r),e.drawImage(t,s,a+1,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=X.BLACK.toCssColorString(),e.fillRect(s-1,a-1,o+2,r+2),e.globalCompositeOperation="destination-out",e.drawImage(t,s,a,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=X.WHITE.toCssColorString(),e.fillRect(s-1,a-2,o+2,r+2)}const gx=new Array(4);function Pv(e,t,n,i,o){gx[0]=e,gx[1]=t,gx[2]=n,gx[3]=i;const r=JSON.stringify(gx),s=o[r];if(c(s))return s;const a=document.createElement("canvas");a.width=i,a.height=i;const l=a.getContext("2d");if(function $Le(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,ZLe).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()}(l,n,i),c(e)){const d=jt.createIfNeeded(e).fetchImage().then(function(h){return sW(l,h,i),o[r]=a,a});return o[r]=d,d}if(c(t)){const u=BG(t,{font:`bold ${i}px sans-serif`});sW(l,u,i)}return o[r]=a,a}const aW=_x;function QLe(e){return e}function eRe(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(n){return cW(e,n)})}:cW(e,t)}function cW(e,t){var n=t.id,i=t.bbox,o=null==t.properties?{}:t.properties,r=function tRe(e,t){var n=function JLe(e){if(null==e)return QLe;var t,n,i=e.scale[0],o=e.scale[1],r=e.translate[0],s=e.translate[1];return function(a,l){l||(t=n=0);var u=2,d=a.length,h=new Array(d);for(h[0]=(t+=a[0])*i+r,h[1]=(n+=a[1])*o+s;u<d;)h[u]=a[u],++u;return h}}(e.transform),i=e.arcs;function o(d,h){h.length&&h.pop();for(var m=i[d<0?~d:d],_=0,p=m.length;_<p;++_)h.push(n(m[_],_));d<0&&function KLe(e,t){for(var n,i=e.length,o=i-t;o<--i;)n=e[o],e[o++]=e[i],e[i]=n}(h,p)}function r(d){return n(d)}function s(d){for(var h=[],m=0,_=d.length;m<_;++m)o(d[m],h);return h.length<2&&h.push(h[0]),h}function a(d){for(var h=s(d);h.length<4;)h.push(h[0]);return h}function l(d){return d.map(a)}return function u(d){var m,h=d.type;switch(h){case"GeometryCollection":return{type:h,geometries:d.geometries.map(u)};case"Point":m=r(d.coordinates);break;case"MultiPoint":m=d.coordinates.map(r);break;case"LineString":m=s(d.arcs);break;case"MultiLineString":m=d.arcs.map(s);break;case"Polygon":m=l(d.arcs);break;case"MultiPolygon":m=d.arcs.map(l);break;default:return null}return{type:h,coordinates:m}}(t)}(e,t);return null==n&&null==i?{type:"Feature",properties:o,geometry:r}:null==i?{type:"Feature",id:n,properties:o,geometry:r}:{type:"Feature",id:n,bbox:i,properties:o,geometry:r}}function em(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new Ue,this.setValue(e)}Object.defineProperties(em.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}}),em.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value},em.prototype.setValue=function(e){const t=this._value;if(t!==e){const n=c(e),i=n&&"function"==typeof e.clone,o=n&&"function"==typeof e.equals;(!o||!e.equals(t))&&(this._hasClone=i,this._hasEquals=o,this._value=i?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}},em.prototype.equals=function(e){return this===e||e instanceof em&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))},em.prototype.valueOf=function(){return this._value},em.prototype.toString=function(){return String(this._value)};const xo=em;function iRe(e){return new xo(e)}const pe=function oRe(e,t,n){return function nRe(e,t,n,i,o){return{configurable:i,get:function(){return this[t]},set:function(r){const s=this[t],a=this[n];c(a)&&(a(),this[n]=void 0),void 0!==r&&(!c(r)||!c(r.getValue))&&c(o)&&(r=o(r)),s!==r&&(this[t]=r,this._definitionChanged.raiseEvent(this,e,r,s)),c(r)&&c(r.definitionChanged)&&(this[n]=r.definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this,e,r,r)},this))}}}(e,`_${e.toString()}`,`_${e.toString()}Subscription`,g(t,!1),g(n,iRe))};function yx(e){this._definitionChanged=new Ue,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=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._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(yx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),image:pe("image"),scale:pe("scale"),pixelOffset:pe("pixelOffset"),eyeOffset:pe("eyeOffset"),horizontalOrigin:pe("horizontalOrigin"),verticalOrigin:pe("verticalOrigin"),heightReference:pe("heightReference"),color:pe("color"),rotation:pe("rotation"),alignedAxis:pe("alignedAxis"),sizeInMeters:pe("sizeInMeters"),width:pe("width"),height:pe("height"),scaleByDistance:pe("scaleByDistance"),translucencyByDistance:pe("translucencyByDistance"),pixelOffsetScaleByDistance:pe("pixelOffsetScaleByDistance"),imageSubRegion:pe("imageSubRegion"),distanceDisplayCondition:pe("distanceDisplayCondition"),disableDepthTestDistance:pe("disableDepthTestDistance")}),yx.prototype.clone=function(e){return c(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e):new yx(this)},yx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this._show,e.show),this.image=g(this._image,e.image),this.scale=g(this._scale,e.scale),this.pixelOffset=g(this._pixelOffset,e.pixelOffset),this.eyeOffset=g(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=g(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=g(this._verticalOrigin,e.verticalOrigin),this.heightReference=g(this._heightReference,e.heightReference),this.color=g(this._color,e.color),this.rotation=g(this._rotation,e.rotation),this.alignedAxis=g(this._alignedAxis,e.alignedAxis),this.sizeInMeters=g(this._sizeInMeters,e.sizeInMeters),this.width=g(this._width,e.width),this.height=g(this._height,e.height),this.scaleByDistance=g(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=g(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=g(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=g(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=g(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=g(this._disableDepthTestDistance,e.disableDepthTestDistance)};const aM=yx;function q0(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new Ue,this.setCallback(e,t)}Object.defineProperties(q0.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}}),q0.prototype.getValue=function(e,t){return this._callback(e,t)},q0.prototype.setCallback=function(e,t){if(!c(e))throw new E("callback is required.");if(!c(t))throw new E("isConstant is required.");const n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)},q0.prototype.equals=function(e){return this===e||e instanceof q0&&this._callback===e._callback&&this._isConstant===e._isConstant};const cM=q0;function Hu(){E.throwInstantiationError()}Object.defineProperties(Hu.prototype,{isConstant:{get:E.throwInstantiationError},definitionChanged:{get:E.throwInstantiationError}}),Hu.prototype.getValue=E.throwInstantiationError,Hu.prototype.equals=E.throwInstantiationError,Hu.equals=function(e,t){return e===t||c(e)&&e.equals(t)},Hu.arrayEquals=function(e,t){if(e===t)return!0;if(!c(e)||!c(t)||e.length!==t.length)return!1;const n=e.length;for(let i=0;i<n;i++)if(!Hu.equals(e[i],t[i]))return!1;return!0},Hu.isConstant=function(e){return!c(e)||e.isConstant},Hu.getValueOrUndefined=function(e,t,n){return c(e)?e.getValue(t,n):void 0},Hu.getValueOrDefault=function(e,t,n,i){return c(e)?g(e.getValue(t,i),n):n},Hu.getValueOrClonedDefault=function(e,t,n,i){let o;return c(e)&&(o=e.getValue(t,i)),c(o)||(o=n.clone(o)),o};const te=Hu;function Y0(e){this._definitionChanged=new Ue,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(Y0.prototype,{isConstant:{get:function(){return te.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:pe("color")}),Y0.prototype.getType=function(e){return"Color"},Y0.prototype.getValue=function(e,t){return c(t)||(t={}),t.color=te.getValueOrClonedDefault(this._color,e,X.WHITE,t.color),t},Y0.prototype.equals=function(e){return this===e||e instanceof Y0&&te.equals(this._color,e._color)};const Fn=Y0,Zs=Object.freeze({FIXED:0,INERTIAL:1});function X0(){E.throwInstantiationError()}Object.defineProperties(X0.prototype,{isConstant:{get:E.throwInstantiationError},definitionChanged:{get:E.throwInstantiationError},referenceFrame:{get:E.throwInstantiationError}}),X0.prototype.getValue=E.throwInstantiationError,X0.prototype.getValueInReferenceFrame=E.throwInstantiationError,X0.prototype.equals=E.throwInstantiationError;const lM=new ne;X0.convertToReferenceFrame=function(e,t,n,i,o){if(!c(t))return t;if(c(o)||(o=new f),n===i)return f.clone(t,o);let r=Rn.computeIcrfToFixedMatrix(e,lM);return c(r)||(r=Rn.computeTemeToPseudoFixedMatrix(e,lM)),n===Zs.INERTIAL?ne.multiplyByVector(r,t,o):n===Zs.FIXED?ne.multiplyByVector(ne.transpose(r,lM),t,o):void 0};const uM=X0;function ig(e,t){this._definitionChanged=new Ue,this._value=f.clone(e),this._referenceFrame=g(t,Zs.FIXED)}Object.defineProperties(ig.prototype,{isConstant:{get:function(){return!c(this._value)||this._referenceFrame===Zs.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),ig.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Zs.FIXED,t)},ig.prototype.setValue=function(e,t){let n=!1;f.equals(this._value,e)||(n=!0,this._value=f.clone(e)),c(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)},ig.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new E("time is required.");if(!c(t))throw new E("referenceFrame is required.");return uM.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)},ig.prototype.equals=function(e){return this===e||e instanceof ig&&f.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};const Ov=ig;function Lv(){E.throwInstantiationError()}Object.defineProperties(Lv.prototype,{name:{get:E.throwInstantiationError},clock:{get:E.throwInstantiationError},entities:{get:E.throwInstantiationError},isLoading:{get:E.throwInstantiationError},changedEvent:{get:E.throwInstantiationError},errorEvent:{get:E.throwInstantiationError},loadingEvent:{get:E.throwInstantiationError},show:{get:E.throwInstantiationError},clustering:{get:E.throwInstantiationError}}),Lv.prototype.update=function(e){E.throwInstantiationError()},Lv.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};const og=Lv;function Er(e,t){if(e=g(e,g.EMPTY_OBJECT),c(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new E("disableDepthTestDistance must be greater than or equal to 0.0.");let n=e.translucencyByDistance,i=e.scaleByDistance,o=e.distanceDisplayCondition;if(c(n)){if(n.far<=n.near)throw new E("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=Mn.clone(n)}if(c(i)){if(i.far<=i.near)throw new E("scaleByDistance.far must be greater than scaleByDistance.near.");i=Mn.clone(i)}if(c(o)){if(o.far<=o.near)throw new E("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");o=Jn.clone(o)}this._show=g(e.show,!0),this._position=f.clone(g(e.position,f.ZERO)),this._actualPosition=f.clone(this._position),this._color=X.clone(g(e.color,X.WHITE)),this._outlineColor=X.clone(g(e.outlineColor,X.TRANSPARENT)),this._outlineWidth=g(e.outlineWidth,0),this._pixelSize=g(e.pixelSize,10),this._scaleByDistance=i,this._translucencyByDistance=n,this._distanceDisplayCondition=o,this._disableDepthTestDistance=g(e.disableDepthTestDistance,0),this._id=e.id,this._collection=g(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}const lW=Er.SHOW_INDEX=0,uW=Er.POSITION_INDEX=1,rRe=Er.COLOR_INDEX=2,sRe=Er.OUTLINE_COLOR_INDEX=3,aRe=Er.OUTLINE_WIDTH_INDEX=4,cRe=Er.PIXEL_SIZE_INDEX=5,lRe=Er.SCALE_BY_DISTANCE_INDEX=6,uRe=Er.TRANSLUCENCY_BY_DISTANCE_INDEX=7,dRe=Er.DISTANCE_DISPLAY_CONDITION_INDEX=8,fRe=Er.DISABLE_DEPTH_DISTANCE_INDEX=9;function Gl(e,t){const n=e._pointPrimitiveCollection;c(n)&&(n._updatePointPrimitive(e,t),e._dirty=!0)}Er.NUMBER_OF_PROPERTIES=10,Object.defineProperties(Er.prototype,{show:{get:function(){return this._show},set:function(e){if(!c(e))throw new E("value is required.");this._show!==e&&(this._show=e,Gl(this,lW))}},position:{get:function(){return this._position},set:function(e){if(!c(e))throw new E("value is required.");const t=this._position;f.equals(t,e)||(f.clone(e,t),f.clone(e,this._actualPosition),Gl(this,uW))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far distance must be greater than near distance.");const t=this._scaleByDistance;Mn.equals(t,e)||(this._scaleByDistance=Mn.clone(e,t),Gl(this,lRe))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far distance must be greater than near distance.");const t=this._translucencyByDistance;Mn.equals(t,e)||(this._translucencyByDistance=Mn.clone(e,t),Gl(this,uRe))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){if(!c(e))throw new E("value is required.");this._pixelSize!==e&&(this._pixelSize=e,Gl(this,cRe))}},color:{get:function(){return this._color},set:function(e){if(!c(e))throw new E("value is required.");const t=this._color;X.equals(t,e)||(X.clone(e,t),Gl(this,rRe))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!c(e))throw new E("value is required.");const t=this._outlineColor;X.equals(t,e)||(X.clone(e,t),Gl(this,sRe))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!c(e))throw new E("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,Gl(this,aRe))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far must be greater than near");Jn.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=Jn.clone(e,this._distanceDisplayCondition),Gl(this,dRe))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(!c(e)||e<0)throw new E("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,Gl(this,fRe)}}},id:{get:function(){return this._id},set:function(e){this._id=e,c(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,Gl(this,lW))}}}),Er.prototype.getPickId=function(e){return c(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},Er.prototype._getActualPosition=function(){return this._actualPosition},Er.prototype._setActualPosition=function(e){f.clone(e,this._actualPosition),Gl(this,uW)};const dW=new fe;Er._computeActualPosition=function(e,t,n){return t.mode===ce.SCENE3D?e:(k.multiplyByPoint(n,e,dW),Ur.computeActualWgs84Position(t,dW))};const fW=new fe;Er._computeScreenSpacePosition=function(e,t,n,i){const o=k.multiplyByVector(e,fe.fromElements(t.x,t.y,t.z,1,fW),fW);return Ur.wgs84ToWindowCoordinates(n,o,i)},Er.prototype.computeScreenSpacePosition=function(e,t){const n=this._pointPrimitiveCollection;if(c(t)||(t=new G),!c(n))throw new E("PointPrimitive must be in a collection.");if(!c(e))throw new E("scene is required.");const o=Er._computeScreenSpacePosition(n.modelMatrix,this._actualPosition,e,t);if(c(o))return o.y=e.canvas.clientHeight-o.y,o},Er.getScreenSpaceBoundingBox=function(e,t,n){const i=e.pixelSize,o=.5*i,r=t.x-o,s=t.y-o,a=i,l=i;return c(n)||(n=new Vt),n.x=r,n.y=s,n.width=a,n.height=l,n},Er.prototype.equals=function(e){return this===e||c(e)&&this._id===e._id&&f.equals(this._position,e._position)&&X.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&X.equals(this._outlineColor,e._outlineColor)&&Mn.equals(this._scaleByDistance,e._scaleByDistance)&&Mn.equals(this._translucencyByDistance,e._translucencyByDistance)&&Jn.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},Er.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};const Cc=Er,Rv="in vec4 v_color;\nin vec4 v_outlineColor;\nin float v_innerPercent;\nin float v_pixelDistance;\nin vec4 v_pickColor;\n\nvoid main()\n{\n // The distance in UV space from this fragment to the center of the point, at most 0.5.\n float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n // The max distance stops one pixel shy of the edge to leave space for anti-aliasing.\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);\n\n vec4 color = mix(v_outlineColor, v_color, innerAlpha);\n color.a *= wholeAlpha;\n\n// Fully transparent parts of the billboard are not pickable.\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\n if (color.a < 0.005) // matches 0/255 and 1/255\n {\n discard;\n }\n#else\n// The billboard is rendered twice. The opaque pass discards translucent fragments\n// and the translucent pass discards opaque fragments.\n#ifdef OPAQUE\n if (color.a < 0.995) // matches < 254/255\n {\n discard;\n }\n#else\n if (color.a >= 0.995) // matches 254/255 and 255/255\n {\n discard;\n }\n#endif\n#endif\n\n out_FragColor = czm_gammaCorrect(color);\n czm_writeLogDepth();\n}\n",pRe=Cc.SHOW_INDEX,dM=Cc.POSITION_INDEX,hW=Cc.COLOR_INDEX,mRe=Cc.OUTLINE_COLOR_INDEX,_Re=Cc.OUTLINE_WIDTH_INDEX,gRe=Cc.PIXEL_SIZE_INDEX,pW=Cc.SCALE_BY_DISTANCE_INDEX,mW=Cc.TRANSLUCENCY_BY_DISTANCE_INDEX,_W=Cc.DISTANCE_DISPLAY_CONDITION_INDEX,yRe=Cc.DISABLE_DEPTH_DISTANCE_INDEX,fM=Cc.NUMBER_OF_PROPERTIES,va={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepth:5};function jl(e){e=g(e,g.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(fM),this._maxPixelSize=1,this._baseVolume=new be,this._baseVolumeWC=new be,this._baseVolume2D=new be,this._boundingVolume=new be,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=g(e.show,!0),this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this._modelMatrix=k.clone(k.IDENTITY),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.blendOption=g(e.blendOption,xr.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=ce.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[Tt.STATIC_DRAW,Tt.STATIC_DRAW,Tt.STATIC_DRAW,Tt.STATIC_DRAW,Tt.STATIC_DRAW,Tt.STATIC_DRAW,Tt.STATIC_DRAW,Tt.STATIC_DRAW,Tt.STATIC_DRAW];const t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}function gW(e){const t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}function hM(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;const t=[],n=e._pointPrimitives,i=n.length;for(let o=0,r=0;o<i;++o){const s=n[o];s&&(s._index=r++,t.push(s))}e._pointPrimitives=t}}Object.defineProperties(jl.prototype,{length:{get:function(){return hM(this),this._pointPrimitives.length}}}),jl.prototype.add=function(e){const t=new Cc(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t},jl.prototype.remove=function(e){return!!this.contains(e)&&(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},jl.prototype.removeAll=function(){gW(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},jl.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},jl.prototype.contains=function(e){return c(e)&&e._pointPrimitiveCollection===this},jl.prototype.get=function(e){if(!c(e))throw new E("index is required.");return hM(this),this._pointPrimitives[e]},jl.prototype.computeNewBuffersUsage=function(){const e=this._buffersUsage;let t=!1;const n=this._propertiesChanged;for(let i=0;i<fM;++i){const o=0===n[i]?Tt.STATIC_DRAW:Tt.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};const pM=new Gi;function yW(e,t,n,i){const o=i._index,r=i._getActualPosition();e._mode===ce.SCENE3D&&(be.expand(e._baseVolume,r,e._baseVolume),e._boundingVolumeDirty=!0),Gi.fromCartesian(r,pM);const s=i.pixelSize,a=i.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,s+a);const u=pM.high;(0,n[va.positionHighAndSize])(o,u.x,u.y,u.z,s);const h=pM.low;(0,n[va.positionLowAndOutline])(o,h.x,h.y,h.z,a)}const Nv=65536,bx=256;function bW(e,t,n,i){const o=i._index,r=i.color,s=i.getPickId(t).color,a=i.outlineColor;let l=X.floatToByte(r.red),u=X.floatToByte(r.green),d=X.floatToByte(r.blue);const h=l*Nv+u*bx+d;l=X.floatToByte(a.red),u=X.floatToByte(a.green),d=X.floatToByte(a.blue);const m=l*Nv+u*bx+d;l=X.floatToByte(s.red),u=X.floatToByte(s.green),d=X.floatToByte(s.blue);const _=l*Nv+u*bx+d,p=X.floatToByte(r.alpha)*Nv+X.floatToByte(a.alpha)*bx+X.floatToByte(s.alpha);(0,n[va.compressedAttribute0])(o,h,m,_,p)}function AW(e,t,n,i){const o=i._index;let r=0,s=1,a=1,l=1;const u=i.translucencyByDistance;c(u)&&(r=u.near,s=u.nearValue,a=u.far,l=u.farValue,(1!==s||1!==l)&&(e._shaderTranslucencyByDistance=!0));let d=i.show&&i.clusterShow;0===i.color.alpha&&0===i.outlineColor.alpha&&(d=!1),s=O.clamp(s,0,1),s=1===s?255:255*s|0;const h=(d?1:0)*bx+s;l=O.clamp(l,0,1),l=1===l?255:255*l|0,(0,n[va.compressedAttribute1])(o,h,l,r,a)}function TW(e,t,n,i){const o=i._index,r=n[va.scaleByDistance];let s=0,a=1,l=1,u=1;const d=i.scaleByDistance;c(d)&&(s=d.near,a=d.nearValue,l=d.far,u=d.farValue,(1!==a||1!==u)&&(e._shaderScaleByDistance=!0)),r(o,s,a,l,u)}function xW(e,t,n,i){const o=i._index,r=n[va.distanceDisplayConditionAndDisableDepth];let s=0,a=Number.MAX_VALUE;const l=i.distanceDisplayCondition;c(l)&&(s=l.near,a=l.far,s*=s,a*=a,e._shaderDistanceDisplayCondition=!0);let u=i.disableDepthTestDistance;u*=u,u>0&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1)),r(o,s,a,u)}function ARe(e,t,n,i){yW(e,0,n,i),bW(0,t,n,i),AW(e,0,n,i),TW(e,0,n,i),xW(e,0,n,i)}function mM(e,t,n,i,o,r){let s;i.mode===ce.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;const a=[];for(let l=0;l<n;++l){const u=t[l],h=Cc._computeActualPosition(u.position,i,o);c(h)&&(u._setActualPosition(h),r?a.push(h):be.expand(s,h,s))}r&&be.fromPoints(a,s)}const CRe=[];jl.prototype.update=function(e){if(hM(this),!this.show)return;this._maxTotalPointSize=mn.maximumAliasedPointSize,function TRe(e,t){const n=t.mode,i=e._pointPrimitives,o=e._pointPrimitivesToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==ce.SCENE3D&&!k.equals(r,e.modelMatrix)?(e._mode=n,k.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===ce.SCENE3D||n===ce.SCENE2D||n===ce.COLUMBUS_VIEW)&&mM(e,i,i.length,t,r,!0)):n===ce.MORPHING?mM(e,i,i.length,t,r,!0):(n===ce.SCENE2D||n===ce.COLUMBUS_VIEW)&&mM(e,o,e._pointPrimitivesToUpdateIndex,t,r,!1)}(this,e);const n=this._pointPrimitives.length,i=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,r=this._propertiesChanged;let a;const l=e.context,u=e.passes,d=u.pick;if(this._createVertexArray||!d&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let D=0;D<fM;++D)r[D]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=function bRe(e,t,n){return new oG(e,[{index:va.positionHighAndSize,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[dM]},{index:va.positionLowAndShow,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[dM]},{index:va.compressedAttribute0,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[hW]},{index:va.compressedAttribute1,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[mW]},{index:va.scaleByDistance,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[pW]},{index:va.distanceDisplayConditionAndDisableDepth,componentsPerAttribute:3,componentDatatype:ee.FLOAT,usage:n[_W]}],t)}(l,n,this._buffersUsage),a=this._vaf.writers;for(let D=0;D<n;++D){const P=this._pointPrimitives[D];P._dirty=!1,ARe(this,l,a,P)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(o>0){const D=CRe;D.length=0,(r[dM]||r[_Re]||r[gRe])&&D.push(yW),(r[hW]||r[mRe])&&D.push(bW),(r[pRe]||r[mW])&&D.push(AW),r[pW]&&D.push(TW),(r[_W]||r[yRe])&&D.push(xW);const P=D.length;if(a=this._vaf.writers,o/n>.1){for(let N=0;N<o;++N){const R=i[N];R._dirty=!1;for(let B=0;B<P;++B)D[B](this,l,a,R)}this._vaf.commit()}else{for(let N=0;N<o;++N){const R=i[N];R._dirty=!1;for(let B=0;B<P;++B)D[B](this,l,a,R);this._vaf.subCommit(R._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>1.5*n&&(i.length=n),!c(this._vaf)||!c(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,be.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let h,m=k.IDENTITY;e.mode===ce.SCENE3D?(m=this.modelMatrix,h=be.clone(this._baseVolumeWC,this._boundingVolume)):h=be.clone(this._baseVolume2D,this._boundingVolume),function xRe(e,t,n){const o=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;n.radius+=o}(this,e,h);const _=this._blendOption!==this.blendOption;let p,y,A,x,C,w;this._blendOption=this.blendOption,_&&(this._rsOpaque=this._blendOption===xr.OPAQUE||this._blendOption===xr.OPAQUE_AND_TRANSLUCENT?Pt.fromCache({depthTest:{enabled:!0,func:oe.LEQUAL},depthMask:!0}):void 0,this._rsTranslucent=this._blendOption===xr.TRANSLUCENT||this._blendOption===xr.OPAQUE_AND_TRANSLUCENT?Pt.fromCache({depthTest:{enabled:!0,func:oe.LEQUAL},depthMask:!1,blending:Ji.ALPHA_BLEND}):void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance,(_||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(p=new Et({sources:['uniform float u_maxTotalPointSize;\n\nin vec4 positionHighAndSize;\nin vec4 positionLowAndOutline;\nin vec4 compressedAttribute0; // color, outlineColor, pick color\nin vec4 compressedAttribute1; // show, translucency by distance, some free space\nin vec4 scaleByDistance; // near, nearScale, far, farScale\nin vec3 distanceDisplayConditionAndDisableDepth; // near, far, disableDepthTestDistance\n\nout vec4 v_color;\nout vec4 v_outlineColor;\nout float v_innerPercent;\nout float v_pixelDistance;\nout vec4 v_pickColor;\n\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\n\nvoid main()\n{\n // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndSize.xyz;\n vec3 positionLow = positionLowAndOutline.xyz;\n float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\n float totalSize = positionHighAndSize.w + outlineWidthBothSides;\n float outlinePercent = outlineWidthBothSides / totalSize;\n // Scale in response to browser-zoom.\n totalSize *= czm_pixelRatio;\n\n float temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float show = floor(temp);\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 color;\n vec4 outlineColor;\n vec4 pickColor;\n\n // compressedAttribute0.z => pickColor.rgb\n\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n\n // compressedAttribute0.x => color.rgb\n\n temp = compressedAttribute0.x * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n // compressedAttribute0.y => outlineColor.rgb\n\n temp = compressedAttribute0.y * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n\n // compressedAttribute0.w => color.a, outlineColor.a, pickColor.a\n\n temp = compressedAttribute0.w * SHIFT_RIGHT8;\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor = pickColor / 255.0;\n\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor /= 255.0;\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\n if (totalSize > 0.0) {\n // Add padding for anti-aliasing on both sides.\n totalSize += 3.0;\n }\n\n // Clamp to max point size.\n totalSize = min(totalSize, u_maxTotalPointSize);\n // If size is too small, push vertex behind near plane for clipping.\n // Note that context.minimumAliasedPointSize "will be at most 1.0".\n if (totalSize < 1.0)\n {\n positionEC.xyz = vec3(0.0);\n totalSize = 1.0;\n }\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency < 0.004)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef DISTANCE_DISPLAY_CONDITION\n float nearSq = distanceDisplayConditionAndDisableDepth.x;\n float farSq = distanceDisplayConditionAndDisableDepth.y;\n if (lengthSq < nearSq || lengthSq > farSq) {\n // push vertex behind camera to force it to be clipped\n positionEC.xyz = vec3(0.0, 0.0, 1.0);\n }\n#endif\n\n gl_Position = czm_projection * positionEC;\n czm_vertexLogDepth();\n\n#ifdef DISABLE_DEPTH_DISTANCE\n float disableDepthTestDistance = distanceDisplayConditionAndDisableDepth.z;\n if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n {\n disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n }\n\n if (disableDepthTestDistance != 0.0)\n {\n // Don\'t try to "multiply both sides" by w. Greater/less-than comparisons won\'t work for negative values of w.\n float zclip = gl_Position.z / gl_Position.w;\n bool clipped = (zclip < -1.0 || zclip > 1.0);\n if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n {\n // Position z on the near plane.\n gl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\n czm_vertexLogDepth(vec4(czm_currentFrustum.x));\n#endif\n }\n }\n#endif\n\n v_color = color;\n v_color.a *= translucency * show;\n v_outlineColor = outlineColor;\n v_outlineColor.a *= translucency * show;\n\n v_innerPercent = 1.0 - outlinePercent;\n v_pixelDistance = 2.0 / totalSize;\n gl_PointSize = totalSize * show;\n gl_Position *= show;\n\n v_pickColor = pickColor;\n}\n']}),this._shaderScaleByDistance&&p.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&p.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&p.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&p.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===xr.OPAQUE_AND_TRANSLUCENT&&(y=new Et({defines:["OPAQUE"],sources:[Rv]}),this._sp=mi.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:p,fragmentShaderSource:y,attributeLocations:va}),y=new Et({defines:["TRANSLUCENT"],sources:[Rv]}),this._spTranslucent=mi.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:p,fragmentShaderSource:y,attributeLocations:va})),this._blendOption===xr.OPAQUE&&(y=new Et({sources:[Rv]}),this._sp=mi.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:p,fragmentShaderSource:y,attributeLocations:va})),this._blendOption===xr.TRANSLUCENT&&(y=new Et({sources:[Rv]}),this._spTranslucent=mi.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:p,fragmentShaderSource:y,attributeLocations:va})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);const v=e.commandList;if(u.render||d){const D=this._colorCommands,P=this._blendOption===xr.OPAQUE,N=this._blendOption===xr.OPAQUE_AND_TRANSLUCENT;A=this._vaf.va,x=A.length,D.length=x;const R=N?2*x:x;for(w=0;w<R;++w){const B=P||N&&w%2==0;C=D[w],c(C)||(C=D[w]=new Zt),C.primitiveType=At.POINTS,C.pass=B||!N?ze.OPAQUE:ze.TRANSLUCENT,C.owner=this;const F=N?Math.floor(w/2):w;C.boundingVolume=h,C.modelMatrix=m,C.shaderProgram=B?this._sp:this._spTranslucent,C.uniformMap=this._uniforms,C.vertexArray=A[F].va,C.renderState=B?this._rsOpaque:this._rsTranslucent,C.debugShowBoundingVolume=this.debugShowBoundingVolume,C.pickId="v_pickColor",v.push(C)}}},jl.prototype.isDestroyed=function(){return!1},jl.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),gW(this._pointPrimitives),Ye(this)};const CW=jl,EW=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class gM{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,i]=new Uint8Array(t,0,2);if(219!==n)throw new Error("Data does not appear to be in a KDBush format.");const o=i>>4;if(1!==o)throw new Error(`Got v${o} data when expected v1.`);const r=EW[15&i];if(!r)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new gM(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;const r=EW.indexOf(this.ArrayType),s=2*t*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(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,8,t),this.coords=new this.ArrayType(this.data,8+a+l,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+s+a+l),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+l,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+r]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){const i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=n,i}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return yM(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().");const{ids:r,coords:s,nodeSize:a}=this,l=[0,r.length-1,0],u=[];for(;l.length;){const d=l.pop()||0,h=l.pop()||0,m=l.pop()||0;if(h-m<=a){for(let A=m;A<=h;A++){const x=s[2*A],C=s[2*A+1];x>=t&&x<=i&&C>=n&&C<=o&&u.push(r[A])}continue}const _=m+h>>1,p=s[2*_],y=s[2*_+1];p>=t&&p<=i&&y>=n&&y<=o&&u.push(r[_]),(0===d?t<=p:n<=y)&&(l.push(m),l.push(_-1),l.push(1-d)),(0===d?i>=p:o>=y)&&(l.push(_+1),l.push(h),l.push(1-d))}return u}within(t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:r,nodeSize:s}=this,a=[0,o.length-1,0],l=[],u=i*i;for(;a.length;){const d=a.pop()||0,h=a.pop()||0,m=a.pop()||0;if(h-m<=s){for(let A=m;A<=h;A++)SW(r[2*A],r[2*A+1],t,n)<=u&&l.push(o[A]);continue}const _=m+h>>1,p=r[2*_],y=r[2*_+1];SW(p,y,t,n)<=u&&l.push(o[_]),(0===d?t-i<=p:n-i<=y)&&(a.push(m),a.push(_-1),a.push(1-d)),(0===d?t+i>=p:n+i>=y)&&(a.push(_+1),a.push(h),a.push(1-d))}return l}}function yM(e,t,n,i,o,r){if(o-i<=n)return;const s=i+o>>1;wW(e,t,s,i,o,r),yM(e,t,n,i,s-1,1-r),yM(e,t,n,s+1,o,1-r)}function wW(e,t,n,i,o,r){for(;o>i;){if(o-i>600){const u=o-i+1,d=n-i+1,h=Math.log(u),m=.5*Math.exp(2*h/3),_=.5*Math.sqrt(h*m*(u-m)/u)*(d-u/2<0?-1:1);wW(e,t,n,Math.max(i,Math.floor(n-d*m/u+_)),Math.min(o,Math.floor(n+(u-d)*m/u+_)),r)}const s=t[2*n+r];let a=i,l=o;for(Tx(e,t,i,n),t[2*o+r]>s&&Tx(e,t,i,o);a<l;){for(Tx(e,t,a,l),a++,l--;t[2*a+r]<s;)a++;for(;t[2*l+r]>s;)l--}t[2*i+r]===s?Tx(e,t,i,l):(l++,Tx(e,t,l,o)),l<=n&&(i=l+1),n<=l&&(o=l-1)}}function Tx(e,t,n,i){bM(e,n,i),bM(t,2*n,2*i),bM(t,2*n+1,2*i+1)}function bM(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function SW(e,t,n,i){const o=e-n,r=t-i;return o*o+r*r}function Gu(e){e=g(e,g.EMPTY_OBJECT),this._enabled=g(e.enabled,!1),this._pixelRange=g(e.pixelRange,80),this._minimumClusterSize=g(e.minimumClusterSize,2),this._clusterBillboards=g(e.clusterBillboards,!0),this._clusterLabels=g(e.clusterLabels,!0),this._clusterPoints=g(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 Ue,this.show=g(e.show,!0)}function vW(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}const ERe=new Vt;function DW(e,t,n,i,o){if(c(e._labelCollection)&&i._clusterLabels?o=vR.getScreenSpaceBoundingBox(e,t,o):c(e._billboardCollection)&&i._clusterBillboards?o=Ko.getScreenSpaceBoundingBox(e,t,o):c(e._pointPrimitiveCollection)&&i._clusterPoints&&(o=Cc.getScreenSpaceBoundingBox(e,t,o)),vW(o,n),i._clusterLabels&&!c(e._labelCollection)&&c(e.id)&&PW(i,e.id.id)&&c(e.id._label)){const s=i._labelCollection.get(i._collectionIndicesByEntity[e.id.id].labelIndex),a=vR.getScreenSpaceBoundingBox(s,t,ERe);vW(a,n),o=Vt.union(o,a,o)}return o}function wRe(e,t){e.clusterShow=!0,!c(e._labelCollection)&&c(e.id)&&PW(t,e.id.id)&&c(e.id._label)&&(t._labelCollection.get(t._collectionIndicesByEntity[e.id.id].labelIndex).clusterShow=!0)}function IW(e,t,n,i){const 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 PW(e,t){return c(e)&&c(e._collectionIndicesByEntity[t])&&c(e._collectionIndicesByEntity[t].labelIndex)}function AM(e,t,n,i,o){if(!c(e))return;const r=e.length;for(let s=0;s<r;++s){const a=e.get(s);if(a.clusterShow=!1,!a.show||o._scene.mode===ce.SCENE3D&&!i.isPointVisible(a.position))continue;const l=o._clusterLabels&&c(a._labelCollection),u=o._clusterBillboards&&c(a.id._billboard),d=o._clusterPoints&&c(a.id._point);if(l&&(d||u))continue;const h=a.computeScreenSpacePosition(n);c(h)&&t.push({index:s,collection:e,clustered:!1,coord:h})}}const SRe=new Vt,vRe=new Vt,DRe=new Vt;function TM(e,t,n,i){return function(o){let r=this[e];c(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let a,l,s=this._collectionIndicesByEntity[o.id];if(c(s)||(s=this._collectionIndicesByEntity[o.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),c(r)&&c(s[i]))return r.get(s[i]);c(r)||(r=this[e]=new t({scene:this._scene}));const u=this[n];u.length>0?(a=u.shift(),l=r.get(a)):(l=r.add(),a=r.length-1),s[i]=a;const d=this;return Promise.resolve().then(function(){d._clusterDirty=!0}),l}}function xM(e,t){const n=e._collectionIndicesByEntity[t];!c(n.billboardIndex)&&!c(n.labelIndex)&&!c(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}function CM(e){if(!c(e))return;const t=e.length;for(let n=0;n<t;++n)e.get(n).clusterShow=!0}Gu.prototype._initialize=function(e){this._scene=e;const t=function IRe(e){return function(t){if(c(t)&&t<.05||!e.enabled)return;const n=e._scene,i=e._labelCollection,o=e._billboardCollection,r=e._pointCollection;if(!c(i)&&!c(o)&&!c(r)||!e._clusterBillboards&&!e._clusterLabels&&!e._clusterPoints)return;let s=e._clusterLabelCollection,a=e._clusterBillboardCollection,l=e._clusterPointCollection;c(s)?s.removeAll():s=e._clusterLabelCollection=new kS({scene:n}),c(a)?a.removeAll():a=e._clusterBillboardCollection=new IT({scene:n}),c(l)?l.removeAll():l=e._clusterPointCollection=new CW;const u=e._pixelRange,d=e._minimumClusterSize,h=e._previousClusters,m=[],_=e._previousHeight,p=n.camera.positionCartographic.height,x=new tP(n.mapProjection.ellipsoid,n.camera.positionWC),C=[];let w,v,D,P,N,R,B,F,S,I,L,M;if(e._clusterLabels&&AM(i,C,n,x,e),e._clusterBillboards&&AM(o,C,n,x,e),e._clusterPoints&&AM(r,C,n,x,e),C.length>0){const U=new gM(C.length,64,Uint32Array);for(let z=0;z<C.length;++z)U.add(C[z].coord.x,C[z].coord.y);if(U.finish(),p<_)for(D=h.length,w=0;w<D;++w){const z=h[w];if(!x.isPointVisible(z.position))continue;const j=Ko._computeScreenSpacePosition(k.IDENTITY,z.position,f.ZERO,G.ZERO,n);if(!c(j))continue;const W=1-p/_;let q=z.width=z.width*W,V=z.height=z.height*W;for(q=Math.max(q,z.minimumWidth),V=Math.max(V,z.minimumHeight),N=U.range(j.x-.5*q,j.y-.5*V,j.x+q,j.y+V),R=N.length,I=0,S=[],v=0;v<R;++v)B=N[v],F=C[B],F.clustered||(++I,L=F.collection,M=F.index,S.push(L.get(M).id));if(I>=d)for(IW(z.position,I,S,e),m.push(z),v=0;v<R;++v)C[N[v]].clustered=!0}for(D=C.length,w=0;w<D;++w){const z=C[w];if(z.clustered)continue;z.clustered=!0,L=z.collection,M=z.index;const j=L.get(M);P=DW(j,z.coord,u,e,SRe);const W=Vt.clone(P,vRe);N=U.range(P.x,P.y,P.x+P.width,P.y+P.height),R=N.length;const q=f.clone(j.position);for(I=1,S=[j.id],v=0;v<R;++v)if(B=N[v],F=C[B],!F.clustered){const V=F.collection.get(F.index),$=DW(V,F.coord,u,e,DRe);f.add(V.position,q,q),Vt.union(W,$,W),++I,S.push(V.id)}if(I>=d){const V=f.multiplyByScalar(q,1/I,q);for(IW(V,I,S,e),m.push({position:V,width:W.width,height:W.height,minimumWidth:P.width,minimumHeight:P.height}),v=0;v<R;++v)C[N[v]].clustered=!0}else wRe(j,e)}}0===s.length&&(s.destroy(),e._clusterLabelCollection=void 0),0===a.length&&(a.destroy(),e._clusterBillboardCollection=void 0),0===l.length&&(l.destroy(),e._clusterPointCollection=void 0),e._previousClusters=m,e._previousHeight=p}}(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(Gu.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),Gu.prototype.getLabel=TM("_labelCollection",kS,"_unusedLabelIndices","labelIndex"),Gu.prototype.removeLabel=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!c(this._labelCollection)||!c(t)||!c(t.labelIndex))return;const n=t.labelIndex;t.labelIndex=void 0,xM(this,e.id);const i=this._labelCollection.get(n);i.show=!1,i.text="",i.id=void 0,this._unusedLabelIndices.push(n),this._clusterDirty=!0},Gu.prototype.getBillboard=TM("_billboardCollection",IT,"_unusedBillboardIndices","billboardIndex"),Gu.prototype.removeBillboard=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!c(this._billboardCollection)||!c(t)||!c(t.billboardIndex))return;const n=t.billboardIndex;t.billboardIndex=void 0,xM(this,e.id);const i=this._billboardCollection.get(n);i.id=void 0,i.show=!1,i.image=void 0,this._unusedBillboardIndices.push(n),this._clusterDirty=!0},Gu.prototype.getPoint=TM("_pointCollection",CW,"_unusedPointIndices","pointIndex"),Gu.prototype.removePoint=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!c(this._pointCollection)||!c(t)||!c(t.pointIndex))return;const n=t.pointIndex;t.pointIndex=void 0,xM(this,e.id);const i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0},Gu.prototype.update=function(e){if(!this.show)return;let t;c(this._labelCollection)&&this._labelCollection.length>0&&0===this._labelCollection.get(0)._glyphs.length&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),c(this._billboardCollection)&&this._billboardCollection.length>0&&!c(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,function PRe(e){e.enabled||(c(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),c(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),c(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,CM(e._labelCollection),CM(e._billboardCollection),CM(e._pointCollection))}(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),c(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),c(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),c(this._clusterPointCollection)&&this._clusterPointCollection.update(e),c(this._labelCollection)&&this._labelCollection.update(e),c(this._billboardCollection)&&this._billboardCollection.update(e),c(this._pointCollection)&&this._pointCollection.update(e)},Gu.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(),c(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};const EM=Gu,ju=function ORe(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.componentDatatype))throw new E("options.componentDatatype is required.");if(!c(e.componentsPerAttribute))throw new E("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new E("options.componentsPerAttribute must be between 1 and 4.");if(!c(e.value))throw new E("options.value is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=g(e.normalize,!1),this.value=e.value},wM=[Yr,or],LRe=wM.length,OW=Math.cos(O.toRadians(30)),LW=Math.cos(O.toRadians(150));function tm(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions;if(!c(t)||t.length<2)throw new E("At least two positions are required.");if(c(e.arcType)&&e.arcType!==Xn.GEODESIC&&e.arcType!==Xn.RHUMB)throw new E("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=g(e.width,1),this._positions=t,this.granularity=g(e.granularity,9999),this.loop=g(e.loop,!1),this.arcType=g(e.arcType,Xn.GEODESIC),this._ellipsoid=ge.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(tm.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+ge.packedLength+1+1}}}),tm.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<LRe;i++)if(t instanceof wM[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};const RRe=new f,MW=new f,FW=new f;function SM(e,t,n,i,o){const r=Qa(i,e,0,RRe),s=Qa(i,e,n,MW),a=Qa(i,t,0,FW),l=Sh(s,r,MW),u=Sh(a,r,FW);return f.cross(u,l,o),f.normalize(o,o)}const NRe=new Se,MRe=new f,FRe=new f,BRe=new f;function vM(e,t,n,i,o,r,s,a,l,u,d){if(0===o)return;let h;r===Xn.GEODESIC?h=new kT(e,t,s):r===Xn.RHUMB&&(h=new Hd(e,t,s));const m=h.surfaceDistance;if(m<o)return;const _=SM(e,t,i,s,BRe),p=Math.ceil(m/o),y=m/p;let A=y;const x=p-1;let C=a.length;for(let w=0;w<x;w++){const v=h.interpolateUsingSurfaceDistance(A,NRe),D=Qa(s,v,n,MRe),P=Qa(s,v,i,FRe);f.pack(_,a,C),f.pack(D,l,C),f.pack(P,u,C),d.push(v.latitude),d.push(v.longitude),C+=3,A+=y}}const DM=new Se;function Qa(e,t,n,i){return Se.clone(t,DM),DM.height=n,Se.toCartesian(DM,e,i)}function Sh(e,t,n){return f.subtract(e,t,n),f.normalize(n,n),n}function BW(e,t,n,i){return i=Sh(e,t,i),i=f.cross(i,n,i),i=f.normalize(i,i),f.cross(n,i,i)}tm.pack=function(e,t,n){T.typeOf.object("value",e),T.defined("array",t);let i=g(n,0);const o=e._positions,r=o.length;t[i++]=r;for(let s=0;s<r;++s)f.pack(o[s],t,i),i+=3;return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,ge.pack(e._ellipsoid,t,i),i+=ge.packedLength,t[i++]=e._projectionIndex,t[i++]=e._scene3DOnly?1:0,t},tm.unpack=function(e,t,n){T.defined("array",e);let i=g(t,0);const o=e[i++],r=new Array(o);for(let m=0;m<o;m++)r[m]=f.unpack(e,i),i+=3;const s=e[i++],a=1===e[i++],l=e[i++],u=ge.unpack(e,i);i+=ge.packedLength;const d=e[i++],h=1===e[i++];return c(n)||(n=new tm({positions:r})),n._positions=r,n.granularity=s,n.loop=a,n.arcType=l,n._ellipsoid=u,n._projectionIndex=d,n._scene3DOnly=h,n};const kRe=new f,URe=new f,zRe=new f,kW=new f;function IM(e,t,n,i,o){const r=Sh(n,t,kW),s=BW(e,t,r,kRe),a=BW(i,t,r,URe);if(O.equalsEpsilon(f.dot(s,a),-1,O.EPSILON5))return o=f.cross(r,s,o),f.normalize(o,o);o=f.add(a,s,o),o=f.normalize(o,o);const l=f.cross(r,o,zRe);return f.dot(a,l)<0&&(o=f.negate(o,o)),o}const Mv=Hn.fromPointNormal(f.ZERO,f.UNIT_Y),GRe=new f,jRe=new f,WRe=new f,qRe=new f,YRe=new f,Fv=new f,Bv=new Se,UW=new Se,zW=new Se;tm.createGeometry=function(e){const t=!e._scene3DOnly;let n=e.loop;const i=e._ellipsoid,o=e.granularity,r=e.arcType,s=new wM[e._projectionIndex](i),l=1e3;let u,d;const h=e._positions,m=h.length;let _,p,y,A;2===m&&(n=!1);const x=new Hd(void 0,void 0,i);let C,w,v;const D=[h[0]];for(d=0;d<m-1;d++)_=h[d],p=h[d+1],C=rr.lineSegmentPlane(_,p,Mv,Fv),c(C)&&!f.equalsEpsilon(C,_,O.EPSILON7)&&!f.equalsEpsilon(C,p,O.EPSILON7)&&(e.arcType===Xn.GEODESIC?D.push(f.clone(C)):e.arcType===Xn.RHUMB&&(v=i.cartesianToCartographic(C,Bv).longitude,y=i.cartesianToCartographic(_,Bv),A=i.cartesianToCartographic(p,UW),x.setEndPoints(y,A),w=x.findIntersectionWithLongitude(v,zW),C=i.cartographicToCartesian(w,Fv),c(C)&&!f.equalsEpsilon(C,_,O.EPSILON7)&&!f.equalsEpsilon(C,p,O.EPSILON7)&&D.push(f.clone(C)))),D.push(p);n&&(_=h[m-1],p=h[0],C=rr.lineSegmentPlane(_,p,Mv,Fv),c(C)&&!f.equalsEpsilon(C,_,O.EPSILON7)&&!f.equalsEpsilon(C,p,O.EPSILON7)&&(e.arcType===Xn.GEODESIC?D.push(f.clone(C)):e.arcType===Xn.RHUMB&&(v=i.cartesianToCartographic(C,Bv).longitude,y=i.cartesianToCartographic(_,Bv),A=i.cartesianToCartographic(p,UW),x.setEndPoints(y,A),w=x.findIntersectionWithLongitude(v,zW),C=i.cartographicToCartesian(w,Fv),c(C)&&!f.equalsEpsilon(C,_,O.EPSILON7)&&!f.equalsEpsilon(C,p,O.EPSILON7)&&D.push(f.clone(C)))));let P=D.length,N=new Array(P);for(d=0;d<P;d++){const Z=Se.fromCartesian(D[d],i);Z.height=0,N[d]=Z}if(N=wa(N,Se.equalsEpsilon),P=N.length,P<2)return;const R=[],B=[],F=[],S=[];let I=GRe,L=jRe,M=WRe,U=qRe,z=YRe;const j=N[0],W=N[1];for(I=Qa(i,N[P-1],0,I),U=Qa(i,W,0,U),L=Qa(i,j,0,L),M=Qa(i,j,l,M),z=n?IM(I,L,M,U,z):SM(j,W,l,i,z),f.pack(z,B,0),f.pack(L,F,0),f.pack(M,S,0),R.push(j.latitude),R.push(j.longitude),vM(j,W,0,l,o,r,i,B,F,S,R),d=1;d<P-1;++d){I=f.clone(L,I),L=f.clone(U,L);const Z=N[d];Qa(i,Z,l,M),Qa(i,N[d+1],0,U),IM(I,L,M,U,z),u=B.length,f.pack(z,B,u),f.pack(L,F,u),f.pack(M,S,u),R.push(Z.latitude),R.push(Z.longitude),vM(N[d],N[d+1],0,l,o,r,i,B,F,S,R)}const V=N[P-1],$=N[P-2];if(L=Qa(i,V,0,L),M=Qa(i,V,l,M),n){const Z=N[0];I=Qa(i,$,0,I),U=Qa(i,Z,0,U),z=IM(I,L,M,U,z)}else z=SM($,V,l,i,z);if(u=B.length,f.pack(z,B,u),f.pack(L,F,u),f.pack(M,S,u),R.push(V.latitude),R.push(V.longitude),n){for(vM(V,j,0,l,o,r,i,B,F,S,R),u=B.length,d=0;d<3;++d)B[u+d]=B[d],F[u+d]=F[d],S[u+d]=S[d];R.push(j.latitude),R.push(j.longitude)}return function bNe(e,t,n,i,o,r,s){let a,l;const u=t._ellipsoid,d=n.length/3-1,h=8*d,m=4*h,_=36*d,p=h>65535?new Uint32Array(_):new Uint16Array(_),y=new Float64Array(3*h),A=new Float32Array(m),x=new Float32Array(m),C=new Float32Array(m),w=new Float32Array(m),v=new Float32Array(m);let D,P,N,R;s&&(D=new Float32Array(m),P=new Float32Array(m),N=new Float32Array(m),R=new Float32Array(2*h));const B=r.length/2;let F=0;const S=qW;S.height=0;const I=YW;I.height=0;let L=XW,M=PM;if(s)for(l=0,a=1;a<B;a++)S.latitude=r[l],S.longitude=r[l+1],I.latitude=r[l+2],I.longitude=r[l+3],L=t.project(S,L),M=t.project(I,M),F+=f.distance(L,M),l+=2;const U=i.length/3;M=f.unpack(i,0,M);let j,z=0;for(l=3,a=1;a<U;a++)L=f.clone(M,L),M=f.unpack(i,l,M),z+=f.distance(L,M),l+=3;l=3;let W=0,q=0,V=0,$=0,Z=!1,ie=f.unpack(n,0,$W),Y=f.unpack(i,0,PM),Q=f.unpack(o,0,KW);e&&VW(Q,f.unpack(n,n.length-6,ZW),ie,Y)&&(Q=f.negate(Q,Q));let K=0,me=0,we=0;for(a=0;a<d;a++){const qe=f.clone(ie,ZW),$e=f.clone(Y,XW);let kt,sn,wn,Lt,ot=f.clone(Q,tNe);if(Z&&(ot=f.negate(ot,ot)),ie=f.unpack(n,l,$W),Y=f.unpack(i,l,PM),Q=f.unpack(o,l,KW),Z=VW(Q,qe,ie,Y),S.latitude=r[W],S.longitude=r[W+1],I.latitude=r[W+2],I.longitude=r[W+3],s){const Qi=eNe(S,I);kt=t.project(S,cNe),sn=t.project(I,lNe);const zs=Sh(sn,kt,JW);zs.y=Math.abs(zs.y),wn=OM,Lt=LM,0===Qi||f.dot(zs,f.UNIT_Y)>OW?(wn=xx(t,S,ot,kt,OM),Lt=xx(t,I,Q,sn,LM)):1===Qi?(Lt=xx(t,I,Q,sn,LM),wn.x=0,wn.y=O.sign(S.longitude-Math.abs(I.longitude)),wn.z=0):(wn=xx(t,S,ot,kt,OM),Lt.x=0,Lt.y=O.sign(S.longitude-I.longitude),Lt.z=0)}const On=f.distance($e,Y),ii=Gi.fromCartesian(qe,mNe),an=f.subtract(ie,qe,uNe),en=f.normalize(an,QW);let he=f.subtract($e,qe,dNe);he=f.normalize(he,he);let Te=f.cross(en,he,QW);Te=f.normalize(Te,Te);let dn=f.cross(he,ot,hNe);dn=f.normalize(dn,dn);let Dt=f.subtract(Y,ie,fNe);Dt=f.normalize(Dt,Dt);let Wi=f.cross(Q,Dt,pNe);Wi=f.normalize(Wi,Wi);const Co=On/z,bl=K/z;let sa,Ba,Qe,ra=0,dt=0,ut=0;if(s){ra=f.distance(kt,sn),sa=Gi.fromCartesian(kt,_Ne),Ba=f.subtract(sn,kt,JW),Qe=f.normalize(Ba,gNe);const Qi=Qe.x;Qe.x=Qe.y,Qe.y=-Qi,dt=ra/F,ut=me/F}for(j=0;j<8;j++){const Qi=$+4*j,zs=q+2*j,oi=Qi+3,Kn=j<4?1:-1,si=2===j||3===j||6===j||7===j?1:-1;f.pack(ii.high,A,Qi),A[oi]=an.x,f.pack(ii.low,x,Qi),x[oi]=an.y,f.pack(dn,C,Qi),C[oi]=an.z,f.pack(Wi,w,Qi),w[oi]=Co*Kn,f.pack(Te,v,Qi);let Ui=bl*si;0===Ui&&si<0&&(Ui=9),v[oi]=Ui,s&&(D[Qi]=sa.high.x,D[Qi+1]=sa.high.y,D[Qi+2]=sa.low.x,D[Qi+3]=sa.low.y,N[Qi]=-wn.y,N[Qi+1]=wn.x,N[Qi+2]=Lt.y,N[Qi+3]=-Lt.x,P[Qi]=Ba.x,P[Qi+1]=Ba.y,P[Qi+2]=Qe.x,P[Qi+3]=Qe.y,R[zs]=dt*Kn,Ui=ut*si,0===Ui&&si<0&&(Ui=9),R[zs+1]=Ui)}const rt=sNe,Ut=aNe,nn=oNe,Ln=rNe,yo=Ce.fromCartographicArray(nNe,iNe),jo=wo.getMinimumMaximumHeights(yo,u),ka=jo.minimumTerrainHeight,Ua=jo.maximumTerrainHeight;we+=Math.abs(ka),we+=Math.abs(Ua),WW(qe,$e,ka,Ua,rt,nn),WW(ie,Y,ka,Ua,Ut,Ln);let mr=f.multiplyByScalar(Te,O.EPSILON5,eq);f.add(rt,mr,rt),f.add(Ut,mr,Ut),f.add(nn,mr,nn),f.add(Ln,mr,Ln),kv(rt,Ut),kv(nn,Ln),f.pack(rt,y,V),f.pack(Ut,y,V+3),f.pack(Ln,y,V+6),f.pack(nn,y,V+9),mr=f.multiplyByScalar(Te,-2*O.EPSILON5,eq),f.add(rt,mr,rt),f.add(Ut,mr,Ut),f.add(nn,mr,nn),f.add(Ln,mr,Ln),kv(rt,Ut),kv(nn,Ln),f.pack(rt,y,V+12),f.pack(Ut,y,V+15),f.pack(Ln,y,V+18),f.pack(nn,y,V+21),W+=2,l+=3,q+=16,V+=24,$+=32,K+=On,me+=ra}l=0;let le=0;for(a=0;a<d;a++){for(j=0;j<nq;j++)p[l+j]=tq[j]+le;le+=8,l+=nq}const Ae=yNe;be.fromVertices(n,f.ZERO,3,Ae[0]),be.fromVertices(i,f.ZERO,3,Ae[1]);const xe=be.fromBoundingSpheres(Ae);xe.radius+=we/(2*d);const De={position:new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:nm(A),startLoAndForwardOffsetY:nm(x),startNormalAndForwardOffsetZ:nm(C),endNormalAndTextureCoordinateNormalizationX:nm(w),rightNormalAndTextureCoordinateNormalizationY:nm(v)};return s&&(De.startHiLo2D=nm(D),De.offsetAndRight2D=nm(P),De.startEndNormals2D=nm(N),De.texcoordNormalization2D=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,normalize:!1,values:R})),new Cn({attributes:De,indices:p,boundingSphere:xe})}(n,s,F,S,B,R,t)};const XRe=new f,ZRe=new ne,$Re=new yt;function VW(e,t,n,i){const o=Sh(n,t,XRe),r=f.dot(o,e);if(r>OW||r<LW){const s=Sh(i,n,kW),l=yt.fromAxisAngle(s,r<LW?O.PI_OVER_TWO:-O.PI_OVER_TWO,$Re),u=ne.fromQuaternion(l,ZRe);return ne.multiplyByVector(u,e,e),!0}return!1}const HW=new Se,KRe=new f,GW=new f;function xx(e,t,n,i,o){const r=Se.toCartesian(t,e._ellipsoid,KRe);let s=f.add(r,n,GW),a=!1;const l=e._ellipsoid;let u=l.cartesianToCartographic(s,HW);Math.abs(t.longitude-u.longitude)>O.PI_OVER_TWO&&(a=!0,s=f.subtract(r,n,GW),u=l.cartesianToCartographic(s,HW)),u.height=0;const d=e.project(u,o);return(o=f.subtract(d,i,o)).z=0,o=f.normalize(o,o),a&&f.negate(o,o),o}const QRe=new f,jW=new f;function WW(e,t,n,i,o,r){const s=f.subtract(t,e,QRe);f.normalize(s,s);let l=f.multiplyByScalar(s,n-0,jW);f.add(e,l,o),l=f.multiplyByScalar(s,i-1e3,jW),f.add(t,l,r)}const JRe=new f;function kv(e,t){const n=Hn.getPointDistance(Mv,e),i=Hn.getPointDistance(Mv,t);let o=JRe;O.equalsEpsilon(n,0,O.EPSILON2)?(o=Sh(t,e,o),f.multiplyByScalar(o,O.EPSILON2,o),f.add(e,o,e)):O.equalsEpsilon(i,0,O.EPSILON2)&&(o=Sh(e,t,o),f.multiplyByScalar(o,O.EPSILON2,o),f.add(t,o,t))}function eNe(e,t){const n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(O.equalsEpsilon(n,O.PI,O.EPSILON11)){const o=O.sign(t.longitude);return e.longitude=o*(n-O.EPSILON11),1}if(O.equalsEpsilon(i,O.PI,O.EPSILON11)){const o=O.sign(e.longitude);return t.longitude=o*(i-O.EPSILON11),2}return 0}const qW=new Se,YW=new Se,XW=new f,PM=new f,ZW=new f,$W=new f,tNe=new f,KW=new f,nNe=[qW,YW],iNe=new Ce,oNe=new f,rNe=new f,sNe=new f,aNe=new f,cNe=new f,lNe=new f,OM=new f,LM=new f,uNe=new f,dNe=new f,fNe=new f,QW=new f,hNe=new f,pNe=new f,mNe=new Gi,_Ne=new Gi,JW=new f,gNe=new f,eq=new f,yNe=[new be,new be],tq=[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],nq=tq.length;function nm(e){return new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}tm._projectNormal=xx;const iq=tm;let RM=`${NT}\nin vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 prevPosition3DHigh;\nin vec3 prevPosition3DLow;\nin vec3 nextPosition3DHigh;\nin vec3 nextPosition3DLow;\nin vec2 expandAndWidth;\nin vec4 color;\nin float batchId;\n\nout vec4 v_color;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n v_color = color;\n}\n`;const ENe=K9;function rg(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.translucent,!0),i=rg.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,RM),this._fragmentShaderSource=g(e.fragmentShaderSource,ENe),this._renderState=Sa.getDefaultRenderState(t,!1,e.renderState),this._closed=!1,this._vertexFormat=i}zn.isInternetExplorer()||(RM=`#define CLIP_POLYLINE \n${RM}`),Object.defineProperties(rg.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}}}),rg.VERTEX_FORMAT=et.POSITION_ONLY,rg.prototype.getFragmentShaderSource=Sa.prototype.getFragmentShaderSource,rg.prototype.isTranslucent=Sa.prototype.isTranslucent,rg.prototype.getRenderState=Sa.prototype.getRenderState;const $d=rg;let NM=`${NT}\nin vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 prevPosition3DHigh;\nin vec3 prevPosition3DLow;\nin vec3 nextPosition3DHigh;\nin vec3 nextPosition3DLow;\nin vec2 expandAndWidth;\nin vec2 st;\nin float batchId;\n\nout float v_width;\nout vec2 v_st;\nout float v_polylineAngle;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n v_width = width;\n v_st.s = st.s;\n v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);\n v_polylineAngle = angle;\n}\n`;const wNe=WG;function sg(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.translucent,!0),i=sg.VERTEX_FORMAT;this.material=c(e.material)?e.material:Ea.fromType(Ea.ColorType),this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,NM),this._fragmentShaderSource=g(e.fragmentShaderSource,wNe),this._renderState=Sa.getDefaultRenderState(t,!1,e.renderState),this._closed=!1,this._vertexFormat=i}zn.isInternetExplorer()||(NM=`#define CLIP_POLYLINE \n${NM}`),Object.defineProperties(sg.prototype,{vertexShaderSource:{get:function(){let e=this._vertexShaderSource;return-1!==this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)&&(e=`#define POLYLINE_DASH\n${e}`),e}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),sg.VERTEX_FORMAT=et.POSITION_AND_ST,sg.prototype.getFragmentShaderSource=Sa.prototype.getFragmentShaderSource,sg.prototype.isTranslucent=Sa.prototype.isTranslucent,sg.prototype.getRenderState=Sa.prototype.getRenderState;const Wu=sg;function vh(e){e=g(e,g.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;let t=e.appearance;c(t)||(t=new Wu),this.appearance=t,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,Yo.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this._debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=oq(!1),this._renderState3DTiles=oq(!0),this._renderStateMorph=Pt.fromCache({cull:{enabled:!0,face:dr.FRONT},depthTest:{enabled:!0},blending:Ji.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}function oq(e){return Pt.fromCache({cull:{enabled:!0},blending:Ji.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Bi.EQUAL,frontOperation:{fail:Xt.KEEP,zFail:Xt.KEEP,zPass:Xt.KEEP},backFunction:Bi.EQUAL,backOperation:{fail:Xt.KEEP,zFail:Xt.KEEP,zPass:Xt.KEEP},reference:Tn.CESIUM_3D_TILE_MASK,mask:Tn.CESIUM_3D_TILE_MASK}})}function rq(e,t,n,i,o,r,s){n.mode===ce.MORPHING?t=t.derivedCommands.colorMorph:n.mode!==ce.SCENE3D&&(t=t.derivedCommands.color2D),t.modelMatrix=i,t.boundingVolume=r,t.cull=o,t.debugShowBoundingVolume=s,n.commandList.push(t)}Object.defineProperties(vh.prototype,{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}},ready:{get:function(){return this._ready}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}}),vh.initializeTerrainHeights=function(){return wo.initialize()},vh.prototype.update=function(e){if(!c(this._primitive)&&!c(this.geometryInstances))return;if(!wo.initialized){if(!this.asynchronous)throw new E("For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.");return void vh.initializeTerrainHeights()}let t;const n=this,i=this._primitiveOptions;if(!c(this._primitive)){const o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],r=o.length,s=new Array(r);let a;for(t=0;t<r;++t)if(a=o[t].attributes,!c(a)||!c(a.color)){this._hasPerInstanceColors=!1;break}for(t=0;t<r;++t){const l=o[t];a={};const u=l.attributes;for(const d in u)u.hasOwnProperty(d)&&(a[d]=u[d]);c(a.width)||(a.width=new ju({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,value:[l.geometry.width]})),l.geometry._scene3DOnly=e.scene3DOnly,iq.setProjectionAndEllipsoid(l.geometry,e.mapProjection),s[t]=new Un({geometry:l.geometry,attributes:a,id:l.id,pickPrimitive:n})}i.geometryInstances=s,i.appearance=this.appearance,i._createShaderProgramFunction=function(l,u,d){!function SNe(e,t,n){const i=t.context,o=e._primitive,r=o._attributeLocations;let s=o._batchTable.getVertexShaderCallback()('in vec3 position3DHigh;\nin vec3 position3DLow;\n\n// In 2D and in 3D, texture coordinate normalization component signs encodes:\n// * X sign - sidedness relative to right plane\n// * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume\n#ifndef COLUMBUS_VIEW_2D\nin vec4 startHiAndForwardOffsetX;\nin vec4 startLoAndForwardOffsetY;\nin vec4 startNormalAndForwardOffsetZ;\nin vec4 endNormalAndTextureCoordinateNormalizationX;\nin vec4 rightNormalAndTextureCoordinateNormalizationY;\n#else\nin vec4 startHiLo2D;\nin vec4 offsetAndRight2D;\nin vec4 startEndNormals2D;\nin vec2 texcoordNormalization2D;\n#endif\n\nin float batchId;\n\nout vec4 v_startPlaneNormalEcAndHalfWidth;\nout vec4 v_endPlaneNormalEcAndBatchId;\nout vec4 v_rightPlaneEC;\nout vec4 v_endEcAndStartEcX;\nout vec4 v_texcoordNormalizationAndStartEcYZ;\n\n// For materials\n#ifdef WIDTH_VARYING\nout float v_width;\n#endif\n#ifdef ANGLE_VARYING\nout float v_polylineAngle;\n#endif\n\n#ifdef PER_INSTANCE_COLOR\nout vec4 v_color;\n#endif\n\nvoid main()\n{\n#ifdef COLUMBUS_VIEW_2D\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;\n\n vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);\n vec3 ecEnd = forwardDirectionEC + ecStart;\n forwardDirectionEC = normalize(forwardDirectionEC);\n\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n\n v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);\n v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;\n\n#else // COLUMBUS_VIEW_2D\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\n vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\n vec3 ecEnd = ecStart + offset;\n\n vec3 forwardDirectionEC = normalize(offset);\n\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n\n v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n\n#endif // COLUMBUS_VIEW_2D\n\n v_endEcAndStartEcX.xyz = ecEnd;\n v_endEcAndStartEcX.w = ecStart.x;\n v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#endif // PER_INSTANCE_COLOR\n\n // Compute a normal along which to "push" the position out, extending the miter depending on view distance.\n // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.\n // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.\n vec4 positionRelativeToEye = czm_computePosition();\n\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition\n float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\n vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Extrude bottom vertices downward for far view distances, like for GroundPrimitives\n upOrDown = cross(forwardDirectionEC, normalEC);\n upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;\n upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\n upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;\n positionEC.xyz += upOrDown;\n\n v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\n\n // Determine distance along normalEC to push for a volume of appropriate width.\n // Make volumes about double pixel width for a conservative fit - in practice the\n // extra cost here is minimal compared to the loose volume heights.\n //\n // N = normalEC (guaranteed "right-facing")\n // R = rightEC\n // p = angle between N and R\n // w = distance to push along R if R == N\n // d = distance to push along N\n //\n // N R\n // { p| } * cos(p) = dot(N, R) = w / d\n // d | |w * d = w / dot(N, R)\n // { | }\n // o---------- polyline segment ----\x3e\n //\n float width = czm_batchTable_width(batchId);\n#ifdef WIDTH_VARYING\n v_width = width;\n#endif\n\n v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\n v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\n\n v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\n v_endPlaneNormalEcAndBatchId.w = batchId;\n\n width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R\n width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N\n\n // Determine if this vertex is on the "left" or "right"\n#ifdef COLUMBUS_VIEW_2D\n normalEC *= sign(texcoordNormalization2D.x);\n#else\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n#endif\n\n positionEC.xyz += width * normalEC;\n gl_Position = czm_depthClamp(czm_projection * positionEC);\n\n#ifdef ANGLE_VARYING\n // Approximate relative screen space direction of the line.\n vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));\n approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\n v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n');s=Xi._appendShowToShader(o,s),s=Xi._appendDistanceDisplayConditionToShader(o,s),s=Xi._modifyShaderPosition(e,s,t.scene3DOnly);let a=o._batchTable.getVertexShaderCallback()('in vec3 position3DHigh;\nin vec3 position3DLow;\n\nin vec4 startHiAndForwardOffsetX;\nin vec4 startLoAndForwardOffsetY;\nin vec4 startNormalAndForwardOffsetZ;\nin vec4 endNormalAndTextureCoordinateNormalizationX;\nin vec4 rightNormalAndTextureCoordinateNormalizationY;\nin vec4 startHiLo2D;\nin vec4 offsetAndRight2D;\nin vec4 startEndNormals2D;\nin vec2 texcoordNormalization2D;\n\nin float batchId;\n\nout vec3 v_forwardDirectionEC;\nout vec3 v_texcoordNormalizationAndHalfWidth;\nout float v_batchId;\n\n// For materials\n#ifdef WIDTH_VARYING\nout float v_width;\n#endif\n#ifdef ANGLE_VARYING\nout float v_polylineAngle;\n#endif\n\n#ifdef PER_INSTANCE_COLOR\nout vec4 v_color;\n#else\nout vec2 v_alignedPlaneDistances;\nout float v_texcoordT;\n#endif\n\n// Morphing planes using SLERP or NLERP doesn\'t seem to work, so instead draw the material directly on the shadow volume.\n// Morph views are from very far away and aren\'t meant to be used precisely, so this should be sufficient.\nvoid main()\n{\n v_batchId = batchId;\n\n // Start position\n vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));\n vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);\n vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\n vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\n vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\n vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\n\n // Start plane\n vec4 startPlane2D;\n vec4 startPlane3D;\n startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\n startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);\n startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);\n\n // Right plane\n vec4 rightPlane2D;\n vec4 rightPlane3D;\n rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\n rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);\n rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);\n\n // End position\n posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);\n posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);\n posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\n posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\n posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\n vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\n vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));\n vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));\n\n // End plane\n vec4 endPlane2D;\n vec4 endPlane3D;\n endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\n endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);\n endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);\n\n // Forward direction\n v_forwardDirectionEC = normalize(endEC - startEC);\n\n vec2 cleanTexcoordNormalization2D;\n cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);\n cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));\n vec2 cleanTexcoordNormalization3D;\n cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;\n cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));\n\n v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#else // PER_INSTANCE_COLOR\n // For computing texture coordinates\n\n v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);\n v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);\n#endif // PER_INSTANCE_COLOR\n\n#ifdef WIDTH_VARYING\n float width = czm_batchTable_width(batchId);\n float halfWidth = width * 0.5;\n v_width = width;\n v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#else\n float halfWidth = 0.5 * czm_batchTable_width(batchId);\n v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#endif\n\n // Compute a normal along which to "push" the position out, extending the miter depending on view distance.\n // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.\n // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.\n // Since this is morphing, compute both 3D and 2D positions and then blend.\n\n // ****** 3D ******\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition\n float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);\n vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Nudge the top vertex upwards to prevent flickering\n vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));\n geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);\n geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\n positionEc3D.xyz += geodeticSurfaceNormal;\n\n // Determine if this vertex is on the "left" or "right"\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n\n // A "perfect" implementation would push along normals according to the angle against forward.\n // In practice, just pushing the normal out by halfWidth is sufficient for morph views.\n positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)\n\n // ****** 2D ******\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition\n absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));\n absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));\n planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);\n upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Nudge the top vertex upwards to prevent flickering\n geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));\n geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);\n geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\n positionEc2D.xyz += geodeticSurfaceNormal;\n\n // Determine if this vertex is on the "left" or "right"\n normalEC *= sign(texcoordNormalization2D.x);\n#ifndef PER_INSTANCE_COLOR\n // Use vertex\'s sidedness to compute its texture coordinate.\n v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);\n#endif\n\n // A "perfect" implementation would push along normals according to the angle against forward.\n // In practice, just pushing the normal out by halfWidth is sufficient for morph views.\n positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)\n\n // Blend for actual position\n gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);\n\n#ifdef ANGLE_VARYING\n // Approximate relative screen space direction of the line.\n vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));\n approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\n v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n');a=Xi._appendShowToShader(o,a),a=Xi._appendDistanceDisplayConditionToShader(o,a),a=Xi._modifyShaderPosition(e,a,t.scene3DOnly);let l=o._batchTable.getVertexShaderCallback()('in vec4 v_startPlaneNormalEcAndHalfWidth;\nin vec4 v_endPlaneNormalEcAndBatchId;\nin vec4 v_rightPlaneEC; // Technically can compute distance for this here\nin vec4 v_endEcAndStartEcX;\nin vec4 v_texcoordNormalizationAndStartEcYZ;\n\n#ifdef PER_INSTANCE_COLOR\nin vec4 v_color;\n#endif\n\nvoid main(void)\n{\n float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));\n vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\n\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\n\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n // Check distance of the eye coordinate against start and end planes with normals in the right plane.\n // For computing unskewed lengthwise texture coordinate.\n // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.\n\n // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"\n vec3 alignedPlaneNormal;\n\n // start aligned plane\n alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\n alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\n\n // end aligned plane\n alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\n alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n\n#ifdef PER_INSTANCE_COLOR\n out_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\n // Clamp - distance to aligned planes may be negative due to mitering,\n // so fragment texture coordinate might be out-of-bounds.\n float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\n s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\n float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\n\n czm_materialInput materialInput;\n\n materialInput.s = s;\n materialInput.st = vec2(s, t);\n materialInput.str = vec3(s, t, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n\n // Premultiply alpha. Required for classification primitives on translucent globe.\n out_FragColor.rgb *= out_FragColor.a;\n\n czm_writeDepthClamp();\n}\n');const u=[`GLOBE_MINIMUM_ALTITUDE ${t.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`];let d="",h="";c(n.material)?(h=c(n.material)?n.material.shaderSource:"",-1!==h.search(/in\s+float\s+v_polylineAngle;/g)&&u.push("ANGLE_VARYING"),-1!==h.search(/in\s+float\s+v_width;/g)&&u.push("WIDTH_VARYING")):d="PER_INSTANCE_COLOR",u.push(d);const m=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",d]:[d],_=new Et({defines:u,sources:[s]}),p=new Et({defines:m,sources:[h,l]});e._sp=mi.replaceCache({context:i,shaderProgram:o._sp,vertexShaderSource:_,fragmentShaderSource:p,attributeLocations:r});let y=i.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!c(y)){const x=new Et({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[s]});y=i.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:i,shaderProgram:e._sp2D,vertexShaderSource:x,fragmentShaderSource:p,attributeLocations:r})}e._sp2D=y;let A=i.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!c(A)){const x=new Et({defines:u.concat([`MAX_TERRAIN_HEIGHT ${wo._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[a]});l=o._batchTable.getVertexShaderCallback()("in vec3 v_forwardDirectionEC;\nin vec3 v_texcoordNormalizationAndHalfWidth;\nin float v_batchId;\n\n#ifdef PER_INSTANCE_COLOR\nin vec4 v_color;\n#else\nin vec2 v_alignedPlaneDistances;\nin float v_texcoordT;\n#endif\n\nfloat rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {\n // We don't expect the ray to ever be parallel to the plane\n return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);\n}\n\nvoid main(void)\n{\n vec4 eyeCoordinate = gl_FragCoord;\n eyeCoordinate /= eyeCoordinate.w;\n\n#ifdef PER_INSTANCE_COLOR\n out_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\n // Use distances for planes aligned with segment to prevent skew in dashing\n float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);\n float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);\n\n // Clamp - distance to aligned planes may be negative due to mitering\n distanceFromStart = max(0.0, distanceFromStart);\n distanceFromEnd = max(0.0, distanceFromEnd);\n\n float s = distanceFromStart / (distanceFromStart + distanceFromEnd);\n s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;\n\n czm_materialInput materialInput;\n\n materialInput.s = s;\n materialInput.st = vec2(s, v_texcoordT);\n materialInput.str = vec3(s, v_texcoordT, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n}\n");const C=new Et({defines:m,sources:[h,l]});A=i.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:i,shaderProgram:e._spMorph,vertexShaderSource:x,fragmentShaderSource:C,attributeLocations:r})}e._spMorph=A}(n,u,d)},i._createCommandsFunction=function(l,u,d,h,m,_,p){!function vNe(e,t,n,i,o,r){const s=e._primitive,a=s._va.length;o.length=a,r.length=a;const u=t instanceof $d?{}:n._uniforms,d=s._batchTable.getUniformMapCallback()(u);for(let h=0;h<a;h++){const m=s._va[h];let _=o[h];c(_)||(_=o[h]=new Zt({owner:e,primitiveType:s._primitiveType})),_.vertexArray=m,_.renderState=e._renderState,_.shaderProgram=e._sp,_.uniformMap=d,_.pass=ze.TERRAIN_CLASSIFICATION,_.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";const p=Zt.shallowClone(_,_.derivedCommands.tileset);p.renderState=e._renderState3DTiles,p.pass=ze.CESIUM_3D_TILE_CLASSIFICATION,_.derivedCommands.tileset=p;const y=Zt.shallowClone(_,_.derivedCommands.color2D);y.shaderProgram=e._sp2D,_.derivedCommands.color2D=y;const A=Zt.shallowClone(p,p.derivedCommands.color2D);A.shaderProgram=e._sp2D,p.derivedCommands.color2D=A;const x=Zt.shallowClone(_,_.derivedCommands.colorMorph);x.renderState=e._renderStateMorph,x.shaderProgram=e._spMorph,x.pickId="czm_batchTable_pickColor(v_batchId)",_.derivedCommands.colorMorph=x}}(n,u,d,0,_,p)},i._updateAndQueueCommandsFunction=function(l,u,d,h,m,_,p,y){!function DNe(e,t,n,i,o,r,s){const a=e._primitive;let l;Xi._updateBoundingVolumes(a,t,o),t.mode===ce.SCENE3D?l=a._boundingSphereWC:t.mode===ce.COLUMBUS_VIEW?l=a._boundingSphereCV:t.mode===ce.SCENE2D&&c(a._boundingSphere2D)?l=a._boundingSphere2D:c(a._boundingSphereMorph)&&(l=a._boundingSphereMorph);const d=e.classificationType,h=d!==Yo.CESIUM_3D_TILE,m=d!==Yo.TERRAIN&&!(t.mode===ce.MORPHING);let _;const p=t.passes;if(p.render||p.pick&&a.allowPicking){const y=n.length;for(let A=0;A<y;++A){const x=l[A];h&&(_=n[A],rq(0,_,t,o,r,x,s)),m&&(_=n[A].derivedCommands.tileset,rq(0,_,t,o,r,x,s))}}}(n,u,d,0,m,_,p)},this._primitive=new Xi(i)}if(this.appearance instanceof $d&&!this._hasPerInstanceColors)throw new E("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&c(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})},vh.prototype.getGeometryInstanceAttributes=function(e){if(!c(this._primitive))throw new E("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},vh.isSupported=function(e){return e.frameState.context.depthTexture},vh.prototype.isDestroyed=function(){return!1},vh.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,Ye(this)};const Uv=vh,sq="#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nin vec4 v_sphericalExtents;\n#else // SPHERICAL\nin vec2 v_inversePlaneExtents;\nin vec4 v_westPlane;\nin vec4 v_southPlane;\n#endif // SPHERICAL\nin vec3 v_uvMinAndSphericalLongitudeRotation;\nin vec3 v_uMaxAndInverseDistance;\nin vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n\n#ifdef PER_INSTANCE_COLOR\nin vec4 v_color;\n#endif\n\n#ifdef NORMAL_EC\nvec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\n return eyeCoordinate.xyz / eyeCoordinate.w;\n}\n\nvec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {\n vec2 glFragCoordXY = gl_FragCoord.xy;\n // Sample depths at both offset and negative offset\n float upOrRightLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\n float downOrLeftLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\n // Explicitly evaluate both paths\n // Necessary for multifrustum and for edges of the screen\n bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\n float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);\n float useDownOrLeft = float(useUpOrRight == 0.0);\n vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);\n vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);\n return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;\n}\n#endif // NORMAL_EC\n\nvoid main(void)\n{\n#ifdef REQUIRES_EC\n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n#endif\n\n#ifdef REQUIRES_WC\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n#endif\n\n#ifdef TEXTURE_COORDINATES\n vec2 uv;\n#ifdef SPHERICAL\n // Treat world coords as a sphere normal for spherical coordinates\n vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);\n sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;\n sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\n uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;\n uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;\n#else // SPHERICAL\n // Unpack planes and transform to eye space\n uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\n uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n#endif // SPHERICAL\n#endif // TEXTURE_COORDINATES\n\n#ifdef PICK\n#ifdef CULL_FRAGMENTS\n // When classifying translucent geometry, logDepthOrDepth == 0.0\n // indicates a region that should not be classified, possibly due to there\n // being opaque pixels there in another buffer.\n // Check for logDepthOrDepth != 0.0 to make sure this should be classified.\n if (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0 || logDepthOrDepth != 0.0) {\n out_FragColor.a = 1.0; // 0.0 alpha leads to discard from ShaderSource.createPickFragmentShaderSource\n czm_writeDepthClamp();\n }\n#else // CULL_FRAGMENTS\n out_FragColor.a = 1.0;\n#endif // CULL_FRAGMENTS\n#else // PICK\n\n#ifdef CULL_FRAGMENTS\n // When classifying translucent geometry, logDepthOrDepth == 0.0\n // indicates a region that should not be classified, possibly due to there\n // being opaque pixels there in another buffer.\n if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) {\n discard;\n }\n#endif\n\n#ifdef NORMAL_EC\n // Compute normal by sampling adjacent pixels in 2x2 block in screen space\n vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));\n vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));\n vec3 normalEC = normalize(cross(leftRight, downUp));\n#endif\n\n\n#ifdef PER_INSTANCE_COLOR\n\n vec4 color = czm_gammaCorrect(v_color);\n#ifdef FLAT\n out_FragColor = color;\n#else // FLAT\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = -eyeCoordinate.xyz;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n\n // Premultiply alpha. Required for classification primitives on translucent globe.\n out_FragColor.rgb *= out_FragColor.a;\n\n#else // PER_INSTANCE_COLOR\n\n // Material support.\n // USES_ is distinct from REQUIRES_, because some things are dependencies of each other or\n // dependencies for culling but might not actually be used by the material.\n\n czm_materialInput materialInput;\n\n#ifdef USES_NORMAL_EC\n materialInput.normalEC = normalEC;\n#endif\n\n#ifdef USES_POSITION_TO_EYE_EC\n materialInput.positionToEyeEC = -eyeCoordinate.xyz;\n#endif\n\n#ifdef USES_TANGENT_TO_EYE\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);\n#endif\n\n#ifdef USES_ST\n // Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired\n // texture coordinate system, which typically forms a tight oriented bounding box around the geometry.\n // Shader is provided a set of reference points for remapping.\n materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;\n materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;\n#endif\n\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else // FLAT\n out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n\n // Premultiply alpha. Required for classification primitives on translucent globe.\n out_FragColor.rgb *= out_FragColor.a;\n\n#endif // PER_INSTANCE_COLOR\n czm_writeDepthClamp();\n#endif // PICK\n}\n";function Wl(e,t,n){T.typeOf.bool("extentsCulling",e),T.typeOf.bool("planarExtents",t),T.typeOf.object("appearance",n),this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};const i=new MM;i.requiresTextureCoordinates=e,i.requiresEC=!n.flat;const o=new MM;if(o.requiresTextureCoordinates=e,n instanceof yi)i.requiresNormalEC=!n.flat;else{const r=`${n.material.shaderSource}\n${n.fragmentShaderSource}`;i.normalEC=-1!==r.indexOf("materialInput.normalEC")||-1!==r.indexOf("czm_getDefaultMaterial"),i.positionToEyeEC=-1!==r.indexOf("materialInput.positionToEyeEC"),i.tangentToEyeMatrix=-1!==r.indexOf("materialInput.tangentToEyeMatrix"),i.st=-1!==r.indexOf("materialInput.st")}this._colorShaderDependencies=i,this._pickShaderDependencies=o,this._appearance=n,this._extentsCulling=e,this._planarExtents=t}Wl.prototype.createFragmentShader=function(e){T.typeOf.bool("columbusView2D",e);const 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 yi&&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 yi||(o=t.material.shaderSource),new Et({defines:i,sources:[o,sq]})},Wl.prototype.createPickFragmentShader=function(e){T.typeOf.bool("columbusView2D",e);const 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 Et({defines:n,sources:[sq],pickColorQualifier:"in"})},Wl.prototype.createVertexShader=function(e,t,n,i){return T.defined("defines",e),T.typeOf.string("vertexShaderSource",t),T.typeOf.bool("columbusView2D",n),T.defined("mapProjection",i),uq(this._colorShaderDependencies,this._planarExtents,n,e,t,this._appearance,i,this._projectionExtentDefines)},Wl.prototype.createPickVertexShader=function(e,t,n,i){return T.defined("defines",e),T.typeOf.string("vertexShaderSource",t),T.typeOf.bool("columbusView2D",n),T.defined("mapProjection",i),uq(this._pickShaderDependencies,this._planarExtents,n,e,t,void 0,i,this._projectionExtentDefines)};const aq=new f,cq=new Se,lq={high:0,low:0};function uq(e,t,n,i,o,r,s,a){const l=i.slice();if(""===a.eastMostYhighDefine){const u=cq;u.longitude=O.PI,u.latitude=0,u.height=0;const d=s.project(u,aq);let h=Gi.encode(d.x,lq);a.eastMostYhighDefine=`EAST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.eastMostYlowDefine=`EAST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`;const m=cq;m.longitude=-O.PI,m.latitude=0,m.height=0;const _=s.project(m,aq);h=Gi.encode(_.x,lq),a.westMostYhighDefine=`WEST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.westMostYlowDefine=`WEST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`}return n&&(l.push(a.eastMostYhighDefine),l.push(a.eastMostYlowDefine),l.push(a.westMostYhighDefine),l.push(a.westMostYlowDefine)),c(r)&&r instanceof yi&&l.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(l.push("TEXTURE_COORDINATES"),t||n||l.push("SPHERICAL"),n&&l.push("COLUMBUS_VIEW_2D")),new Et({defines:l,sources:[o]})}function MM(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}function dq(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)/G.distance(t,e)}Object.defineProperties(MM.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}}});const PNe=[new G,new G,new G,new G];function fq(e,t){const n=PNe,i=G.unpack(t,0,n[0]),o=G.unpack(t,2,n[1]),r=G.unpack(t,4,n[2]);e.uMaxVmax=new ju({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,value:[o.x,o.y,r.x,r.y]});const s=1/dq(i,o,r),a=1/dq(i,r,o);e.uvMinAndExtents=new ju({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,value:[i.x,i.y,s,a]})}const hq=new Se,pq=new f,ONe=new f,LNe=new f,zv={high:0,low:0};function mq(e,t,n){const i=hq;i.height=0,i.longitude=e.west,i.latitude=e.south;const o=t.project(i,pq);i.latitude=e.north;const r=t.project(i,ONe);i.longitude=e.east,i.latitude=e.south;const s=t.project(i,LNe),a=[0,0,0,0],l=[0,0,0,0];let u=Gi.encode(o.x,zv);a[0]=u.high,l[0]=u.low,u=Gi.encode(o.y,zv),a[1]=u.high,l[1]=u.low,u=Gi.encode(r.y,zv),a[2]=u.high,l[2]=u.low,u=Gi.encode(s.x,zv),a[3]=u.high,l[3]=u.low,n.planes2D_HIGH=new ju({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,value:a}),n.planes2D_LOW=new ju({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,value:l})}const RNe=new k,NNe=new k,_q=new f,MNe=new Se,FNe=[new Se,new Se,new Se,new Se,new Se,new Se,new Se,new Se],kNe=new f,UNe=new f,zNe=new Gi;Wl.getPlanarTextureCoordinateAttributes=function(e,t,n,i,o){T.typeOf.object("boundingRectangle",e),T.defined("textureCoordinateRotationPoints",t),T.typeOf.object("ellipsoid",n),T.typeOf.object("projection",i);const r=pq,s=kNe,a=UNe;!function BNe(e,t,n,i,o,r){const s=Ce.center(e,MNe);s.height=n;const a=Se.toCartesian(s,t,_q),l=Rn.eastNorthUpToFixedFrame(a,t,RNe),u=k.inverse(l,NNe),d=e.west,h=e.east,m=e.north,_=e.south,p=FNe;p[0].latitude=_,p[0].longitude=d,p[1].latitude=m,p[1].longitude=d,p[2].latitude=m,p[2].longitude=h,p[3].latitude=_,p[3].longitude=h;const y=.5*(d+h),A=.5*(m+_);p[4].latitude=_,p[4].longitude=y,p[5].latitude=m,p[5].longitude=y,p[6].latitude=A,p[6].longitude=d,p[7].latitude=A,p[7].longitude=h;let x=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,w=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY;for(let R=0;R<8;R++){p[R].height=n;const B=Se.toCartesian(p[R],t,_q);k.multiplyByPoint(u,B,B),B.z=0,x=Math.min(x,B.x),C=Math.max(C,B.x),w=Math.min(w,B.y),v=Math.max(v,B.y)}const D=i;D.x=x,D.y=w,D.z=0,k.multiplyByPoint(l,D,D);const P=o;P.x=C,P.y=w,P.z=0,k.multiplyByPoint(l,P,P),f.subtract(P,D,o);const N=r;N.x=x,N.y=v,N.z=0,k.multiplyByPoint(l,N,N),f.subtract(N,D,r)}(e,n,g(o,0),r,s,a);const l={};fq(l,t);const u=Gi.fromCartesian(r,zNe);return l.southWest_HIGH=new ju({componentDatatype:ee.FLOAT,componentsPerAttribute:3,normalize:!1,value:f.pack(u.high,[0,0,0])}),l.southWest_LOW=new ju({componentDatatype:ee.FLOAT,componentsPerAttribute:3,normalize:!1,value:f.pack(u.low,[0,0,0])}),l.eastward=new ju({componentDatatype:ee.FLOAT,componentsPerAttribute:3,normalize:!1,value:f.pack(s,[0,0,0])}),l.northward=new ju({componentDatatype:ee.FLOAT,componentsPerAttribute:3,normalize:!1,value:f.pack(a,[0,0,0])}),mq(e,i,l),l};const VNe=new f;function gq(e,t,n,i){const o=hq;o.latitude=e,o.longitude=t,o.height=0;const r=Se.toCartesian(o,n,VNe),s=Math.sqrt(r.x*r.x+r.y*r.y),a=O.fastApproximateAtan2(s,r.z),l=O.fastApproximateAtan2(r.x,r.y);return i.x=a,i.y=l,i}const yq=new G;Wl.getSphericalExtentGeometryInstanceAttributes=function(e,t,n,i){T.typeOf.object("boundingRectangle",e),T.defined("textureCoordinateRotationPoints",t),T.typeOf.object("ellipsoid",n),T.typeOf.object("projection",i);const o=gq(e.south,e.west,n,yq);let r=o.x,s=o.y;const a=gq(e.north,e.east,n,yq);let l=a.x,u=a.y,d=0;s>u&&(d=O.PI-s,s=-O.PI,u+=d),r-=O.EPSILON5,s-=O.EPSILON5,l+=O.EPSILON5,u+=O.EPSILON5;const _={sphericalExtents:new ju({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,s,1/(l-r),1/(u-s)]}),longitudeRotation:new ju({componentDatatype:ee.FLOAT,componentsPerAttribute:1,normalize:!1,value:[d]})};return fq(_,t),mq(e,i,_),_},Wl.hasAttributesForTextureCoordinatePlanes=function(e){return c(e.southWest_HIGH)&&c(e.southWest_LOW)&&c(e.northward)&&c(e.eastward)&&c(e.planes2D_HIGH)&&c(e.planes2D_LOW)&&c(e.uMaxVmax)&&c(e.uvMinAndExtents)},Wl.hasAttributesForSphericalExtents=function(e){return c(e.sphericalExtents)&&c(e.longitudeRotation)&&c(e.planes2D_HIGH)&&c(e.planes2D_LOW)&&c(e.uMaxVmax)&&c(e.uvMinAndExtents)},Wl.shouldUseSphericalCoordinates=function(e){return T.typeOf.object("rectangle",e),function HNe(e){return Math.max(e.width,e.height)>Wl.MAX_WIDTH_FOR_PLANAR_EXTENTS}(e)},Wl.MAX_WIDTH_FOR_PLANAR_EXTENTS=O.toRadians(1);const ag=Wl;function cg(e){e=g(e,g.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,Yo.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=g(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:g(e.vertexCacheOptimize,!1),interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:g(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}function Z0(e,t){const n=t?Bi.EQUAL:Bi.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:Xt.KEEP,zFail:Xt.DECREMENT_WRAP,zPass:Xt.KEEP},backFunction:n,backOperation:{fail:Xt.KEEP,zFail:Xt.INCREMENT_WRAP,zPass:Xt.KEEP},reference:Tn.CESIUM_3D_TILE_MASK,mask:Tn.CESIUM_3D_TILE_MASK},stencilMask:Tn.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:__.LESS_OR_EQUAL},depthMask:!1}}function FM(e){return{stencilTest:{enabled:e,frontFunction:Bi.NOT_EQUAL,frontOperation:{fail:Xt.ZERO,zFail:Xt.ZERO,zPass:Xt.ZERO},backFunction:Bi.NOT_EQUAL,backOperation:{fail:Xt.ZERO,zFail:Xt.ZERO,zPass:Xt.ZERO},reference:0,mask:Tn.CLASSIFICATION_MASK},stencilMask:Tn.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ji.PRE_MULTIPLIED_ALPHA_BLEND}}Object.defineProperties(cg.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}}}),cg.isSupported=function(e){return e.context.stencilBuffer};const GNe={stencilTest:{enabled:!0,frontFunction:Bi.NOT_EQUAL,frontOperation:{fail:Xt.ZERO,zFail:Xt.ZERO,zPass:Xt.ZERO},backFunction:Bi.NOT_EQUAL,backOperation:{fail:Xt.ZERO,zFail:Xt.ZERO,zPass:Xt.ZERO},reference:0,mask:Tn.CLASSIFICATION_MASK},stencilMask:Tn.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function bq(e,t){return Math.floor(e%t/2)}function BM(e,t,n,i,o,r){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,e.debugShowBoundingVolume=r,t.commandList.push(e)}function Aq(e,t,n,i,o){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,t.commandList.push(e)}cg.prototype.update=function(e){if(!c(this._primitive)&&!c(this.geometryInstances))return;let t=this.appearance;c(t)&&c(t.material)&&t.material.update(e.context);const n=this,i=this._primitiveOptions;if(!c(this._primitive)){const o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],r=o.length;let s,a,l,h,u=!1,d=!0,m=!1,_=!1;for(r>0&&(l=o[0].attributes,m=ag.hasAttributesForSphericalExtents(l),_=ag.hasAttributesForTextureCoordinatePlanes(l),h=l.color),s=0;s<r;s++){a=o[s];const y=a.attributes.color;if(c(y))u=!0;else if(u)throw new E("All GeometryInstances must have color attributes to use per-instance color.");d=d&&c(y)&&ti.equals(h,y)}if(!d&&!m&&!_)throw new E("All GeometryInstances must have the same color attribute except via GroundPrimitives");if(u&&!c(t)&&(t=new yi({flat:!0}),this.appearance=t),!u&&t instanceof yi)throw new E("PerInstanceColorAppearance requires color GeometryInstanceAttributes on all GeometryInstances");if(c(t.material)&&!m&&!_)throw new E("Materials on ClassificationPrimitives are not supported except via GroundPrimitives");this._usePickOffsets=!m&&!_,this._hasSphericalExtentsAttribute=m,this._hasPlanarExtentsAttributes=_,this._hasPerColorAttribute=u;const p=new Array(r);for(s=0;s<r;++s)a=o[s],p[s]=new Un({geometry:a.geometry,attributes:a.attributes,modelMatrix:a.modelMatrix,id:a.id,pickPrimitive:g(this._pickPrimitive,n)});i.appearance=t,i.geometryInstances=p,c(this._createBoundingVolumeFunction)&&(i._createBoundingVolumeFunction=function(y,A){n._createBoundingVolumeFunction(y,A)}),i._createRenderStatesFunction=function(y,A,x,C){!function jNe(e,t,n,i){if(c(e._rsStencilDepthPass))return;const o=!e.debugShowShadowVolume;e._rsStencilDepthPass=Pt.fromCache(Z0(o,!1)),e._rsStencilDepthPass3DTiles=Pt.fromCache(Z0(o,!0)),e._rsColorPass=Pt.fromCache(FM(o)),e._rsPickPass=Pt.fromCache(GNe)}(n)},i._createShaderProgramFunction=function(y,A,x){!function qNe(e,t){const n=t.context,i=e._primitive;let o='in vec3 position3DHigh;\nin vec3 position3DLow;\nin float batchId;\n\n#ifdef EXTRUDED_GEOMETRY\nin vec3 extrudeDirection;\n\nuniform float u_globeMinimumAltitude;\n#endif // EXTRUDED_GEOMETRY\n\n#ifdef PER_INSTANCE_COLOR\nout vec4 v_color;\n#endif // PER_INSTANCE_COLOR\n\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nout vec4 v_sphericalExtents;\n#else // SPHERICAL\nout vec2 v_inversePlaneExtents;\nout vec4 v_westPlane;\nout vec4 v_southPlane;\n#endif // SPHERICAL\nout vec3 v_uvMinAndSphericalLongitudeRotation;\nout vec3 v_uMaxAndInverseDistance;\nout vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n\nvoid main()\n{\n vec4 position = czm_computePosition();\n\n#ifdef EXTRUDED_GEOMETRY\n float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));\n delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;\n\n //extrudeDirection is zero for the top layer\n position = position + vec4(extrudeDirection * delta, 0.0);\n#endif\n\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\n v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);\n v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);\n#else // SPHERICAL\n#ifdef COLUMBUS_VIEW_2D\n vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);\n vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);\n\n // If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w):\n // - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts)\n // - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w)\n // - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow)\n vec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));\n bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;\n planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);\n planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);\n\n // - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0)\n // - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x)\n // - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow)\n idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;\n idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));\n planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);\n planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);\n\n vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;\n vec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;\n vec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;\n#else // COLUMBUS_VIEW_2D\n // 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction\n vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;\n vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;\n vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;\n#endif // COLUMBUS_VIEW_2D\n\n vec3 eastWard = southEastCorner - southWestCorner;\n float eastExtent = length(eastWard);\n eastWard /= eastExtent;\n\n vec3 northWard = northWestCorner - southWestCorner;\n float northExtent = length(northWard);\n northWard /= northExtent;\n\n v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\n v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\n v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n#endif // SPHERICAL\n vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);\n vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);\n\n v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);\n v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);\n v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;\n#endif // TEXTURE_COORDINATES\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#endif\n\n gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);\n}\n';o=e._primitive._batchTable.getVertexShaderCallback()(o),o=Xi._appendDistanceDisplayConditionToShader(i,o),o=Xi._modifyShaderPosition(e,o,t.scene3DOnly),o=Xi._updateColorAttribute(i,o);const r=e._hasPlanarExtentsAttributes,s=r||e._hasSphericalExtentsAttribute;e._extruded&&(o=function WNe(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/in\s+vec3\s+extrudeDirection;/g)){const n="compressedAttributes",i=`in vec2 ${n};`,o="vec3 extrudeDirection;\n",r=` extrudeDirection = czm_octDecode(${n}, 65535.0);\n`;let s=t;return s=s.replace(/in\s+vec3\s+extrudeDirection;/g,""),s=Et.replaceMain(s,"czm_non_compressed_main"),[i,o,s,`void main() \n{ \n${r} czm_non_compressed_main(); \n}`].join("\n")}}(i,o));const a=e._extruded?"EXTRUDED_GEOMETRY":"";let l=new Et({defines:[a],sources:[o]});const u=new Et({sources:[mO]}),d=e._primitive._attributeLocations,h=new ag(s,r,e.appearance);if(e._spStencil=mi.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:d}),e._primitive.allowPicking){let p=Et.createPickVertexShaderSource(o);p=Xi._appendShowToShader(i,p),p=Xi._updatePickColorAttribute(p);const y=h.createPickFragmentShader(!1),A=h.createPickVertexShader([a],p,!1,t.mapProjection);if(e._spPick=mi.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:A,fragmentShaderSource:y,attributeLocations:d}),s){let x=n.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!c(x)){const C=h.createPickFragmentShader(!0),w=h.createPickVertexShader([a],p,!0,t.mapProjection);x=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:w,fragmentShaderSource:C,attributeLocations:d})}e._spPick2D=x}}else e._spPick=mi.fromCache({context:n,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:d});o=Xi._appendShowToShader(i,o),l=new Et({defines:[a],sources:[o]}),e._sp=mi.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:d});const m=h.createFragmentShader(!1),_=h.createVertexShader([a],o,!1,t.mapProjection);if(e._spColor=mi.replaceCache({context:n,shaderProgram:e._spColor,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:d}),s){let p=n.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!c(p)){const y=h.createFragmentShader(!0),A=h.createVertexShader([a],o,!0,t.mapProjection);p=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:A,fragmentShaderSource:y,attributeLocations:d})}e._spColor2D=p}}(n,A)},i._createCommandsFunction=function(y,A,x,C,w,v,D){!function ZNe(e,t,n,i,o,r,s){(function YNe(e,t){const n=e._primitive;let i=2*n._va.length;t.length=i;let o,r,s,a=0,l=n._batchTable.getUniformMapCallback()(e._uniformMap);const u=e._needs2DShader;for(o=0;o<i;o+=2){const _=n._va[a++];r=t[o],c(r)||(r=t[o]=new Zt({owner:e,primitiveType:n._primitiveType})),r.vertexArray=_,r.renderState=e._rsStencilDepthPass,r.shaderProgram=e._sp,r.uniformMap=l,r.pass=ze.TERRAIN_CLASSIFICATION,s=Zt.shallowClone(r,r.derivedCommands.tileset),s.renderState=e._rsStencilDepthPass3DTiles,s.pass=ze.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,r=t[o+1],c(r)||(r=t[o+1]=new Zt({owner:e,primitiveType:n._primitiveType})),r.vertexArray=_,r.renderState=e._rsColorPass,r.shaderProgram=e._spColor,r.pass=ze.TERRAIN_CLASSIFICATION;const y=e.appearance.material;if(c(y)&&(l=Gn(l,y._uniforms)),r.uniformMap=l,s=Zt.shallowClone(r,r.derivedCommands.tileset),s.pass=ze.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,u){let A=Zt.shallowClone(r,r.derivedCommands.appearance2D);A.shaderProgram=e._spColor2D,r.derivedCommands.appearance2D=A,A=Zt.shallowClone(s,s.derivedCommands.appearance2D),A.shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=A}}const d=e._commandsIgnoreShow,h=e._spStencil;let m=0;i=d.length=i/2;for(let _=0;_<i;++_){const p=d[_]=Zt.shallowClone(t[m],d[_]);p.shaderProgram=h,p.pass=ze.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,m+=2}})(e,r),function XNe(e,t){const n=e._usePickOffsets,i=e._primitive;let r,a,o=2*i._va.length,s=0;n&&(r=i._pickOffsets,o=2*r.length),t.length=o;let l,u,d,h=0;const m=i._batchTable.getUniformMapCallback()(e._uniformMap),_=e._needs2DShader;for(l=0;l<o;l+=2){let p=i._va[h++];if(n&&(a=r[s++],p=i._va[a.index]),u=t[l],c(u)||(u=t[l]=new Zt({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),u.vertexArray=p,u.renderState=e._rsStencilDepthPass,u.shaderProgram=e._sp,u.uniformMap=m,u.pass=ze.TERRAIN_CLASSIFICATION,n&&(u.offset=a.offset,u.count=a.count),d=Zt.shallowClone(u,u.derivedCommands.tileset),d.renderState=e._rsStencilDepthPass3DTiles,d.pass=ze.CESIUM_3D_TILE_CLASSIFICATION,u.derivedCommands.tileset=d,u=t[l+1],c(u)||(u=t[l+1]=new Zt({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),u.vertexArray=p,u.renderState=e._rsPickPass,u.shaderProgram=e._spPick,u.uniformMap=m,u.pass=ze.TERRAIN_CLASSIFICATION,n&&(u.offset=a.offset,u.count=a.count),d=Zt.shallowClone(u,u.derivedCommands.tileset),d.pass=ze.CESIUM_3D_TILE_CLASSIFICATION,u.derivedCommands.tileset=d,_){let y=Zt.shallowClone(u,u.derivedCommands.pick2D);y.shaderProgram=e._spPick2D,u.derivedCommands.pick2D=y,y=Zt.shallowClone(d,d.derivedCommands.pick2D),y.shaderProgram=e._spPick2D,d.derivedCommands.pick2D=y}}}(e,s)}(n,0,0,0,0,v,D)},i._updateAndQueueCommandsFunction=c(this._updateAndQueueCommandsFunction)?function(y,A,x,C,w,v,D,P){n._updateAndQueueCommandsFunction(y,A,x,C,w,v,D,P)}:function(y,A,x,C,w,v,D,P){!function $Ne(e,t,n,i,o,r,s,a){const l=e._primitive;let u;Xi._updateBoundingVolumes(l,t,o),t.mode===ce.SCENE3D?u=l._boundingSphereWC:t.mode===ce.COLUMBUS_VIEW?u=l._boundingSphereCV:t.mode===ce.SCENE2D&&c(l._boundingSphere2D)?u=l._boundingSphere2D:c(l._boundingSphereMorph)&&(u=l._boundingSphereMorph);const d=e.classificationType,h=d!==Yo.CESIUM_3D_TILE,m=d!==Yo.TERRAIN,_=t.passes;let p,y,A;if(_.render){const x=n.length;for(p=0;p<x;++p)y=u[bq(p,x)],h&&(A=n[p],BM(A,t,o,r,y,s)),m&&(A=n[p].derivedCommands.tileset,BM(A,t,o,r,y,s));if(t.invertClassification){const C=e._commandsIgnoreShow,w=C.length;for(p=0;p<w;++p)y=u[p],A=C[p],BM(A,t,o,r,y,s)}}if(_.pick){const x=i.length,C=l._pickOffsets;for(p=0;p<x;++p)y=u[C[bq(p,x)].index],h&&(A=i[p],Aq(A,t,o,r,y)),m&&(A=i[p].derivedCommands.tileset,Aq(A,t,o,r,y))}}(n,A,x,C,w,v,D)},this._primitive=new Xi(i)}if(this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=Pt.fromCache(Z0(!1,!1)),this._rsStencilDepthPass3DTiles=Pt.fromCache(Z0(!1,!0)),this._rsColorPass=Pt.fromCache(FM(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=Pt.fromCache(Z0(!0,!1)),this._rsStencilDepthPass3DTiles=Pt.fromCache(Z0(!0,!0)),this._rsColorPass=Pt.fromCache(FM(!0))),this._primitive.appearance!==t){if(!this._hasSphericalExtentsAttribute&&!this._hasPlanarExtentsAttributes&&c(t.material))throw new E("Materials on ClassificationPrimitives are not supported except via GroundPrimitive");if(!this._hasPerColorAttribute&&t instanceof yi)throw new E("PerInstanceColorAppearance requires color GeometryInstanceAttribute");this._primitive.appearance=t}this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{c(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})},cg.prototype.getGeometryInstanceAttributes=function(e){if(!c(this._primitive))throw new E("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},cg.prototype.isDestroyed=function(){return!1},cg.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,Ye(this)};const Tq=cg,KNe={u_globeMinimumAltitude:function(){return 55e3}};function Ec(e){let t=(e=g(e,g.EMPTY_OBJECT)).appearance;const n=e.geometryInstances;if(!c(t)&&c(n)){const o=Array.isArray(n)?n:[n],r=o.length;for(let s=0;s<r;s++){const a=o[s].attributes;if(c(a)&&c(a.color)){t=new yi({flat:!0});break}}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,Yo.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=wo._defaultMaxTerrainHeight,this._minTerrainHeight=wo._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0,this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:g(e.vertexCacheOptimize,!1),interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:g(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:KNe}}function xq(e){return function(t,n){const i=n.maximumRadius,o=i/Math.cos(.5*t)-i;return e._maxHeight+o}}function Cq(e){return function(t,n){return e._minHeight}}Object.defineProperties(Ec.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}}}),Ec.isSupported=Tq.isSupported;const QNe=new f,JNe=new f,eMe=new f,tMe=new Se,nMe=new Ce;function Vv(e,t){const n=e.mapProjection.ellipsoid;if(!c(t.attributes)||!c(t.attributes.position3DHigh))return c(t.rectangle)?t.rectangle:void 0;const i=t.attributes.position3DHigh.values,o=t.attributes.position3DLow.values,r=i.length;let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(let h=0;h<r;h+=3){const m=f.unpack(i,h,QNe),_=f.unpack(o,h,JNe),p=f.add(m,_,eMe),y=n.cartesianToCartographic(p,tMe),A=y.latitude,x=y.longitude;s=Math.min(s,A),a=Math.min(a,x),l=Math.max(l,A),u=Math.max(u,x)}const d=nMe;return d.north=l,d.south=s,d.east=u,d.west=a,d}function kM(e,t){return Math.floor(e%t/2)}function UM(e,t,n,i,o,r,s){const a=e._primitive;n.mode!==ce.SCENE3D&&t.shaderProgram===a._spColor&&a._needs2DShader&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=r,t.cull=o,t.debugShowBoundingVolume=s,n.commandList.push(t)}function Eq(e,t,n,i,o,r){const s=e._primitive;n.mode!==ce.SCENE3D&&t.shaderProgram===s._spPick&&s._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=r,t.cull=o,n.commandList.push(t)}Ec.initializeTerrainHeights=function(){return wo.initialize()},Ec.prototype.update=function(e){if(!c(this._primitive)&&!c(this.geometryInstances))return;if(!wo.initialized){if(!this.asynchronous)throw new E("For synchronous GroundPrimitives, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void Ec.initializeTerrainHeights()}const t=this,n=this._classificationPrimitiveOptions;if(!c(this._primitive)){const i=e.mapProjection.ellipsoid;let o,r,s;const a=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],l=a.length,u=new Array(l);let d,h;for(d=0;d<l;++d){o=a[d],r=o.geometry;const y=Vv(e,r);c(h)?c(y)&&Ce.union(h,y,h):h=Ce.clone(y);const A=o.id;if(c(A)&&c(y)){const x=wo.getBoundingSphere(y,i);this._boundingSpheresKeys.push(A),this._boundingSpheres.push(x)}if(s=r.constructor,!c(s)||!c(s.createShadowVolume))throw new E("Not all of the geometry instances have GroundPrimitive support.")}!function iMe(e,t,n){const i=wo.getMinimumMaximumHeights(t,n);e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}(this,h,i);const m=e.terrainExaggeration,_=e.terrainExaggerationRelativeHeight;this._minHeight=hp.getHeight(this._minTerrainHeight,m,_),this._maxHeight=hp.getHeight(this._maxTerrainHeight,m,_);const p=Ec._supportsMaterials(e.context);if(this._useFragmentCulling=p,p){let y,A=!0;for(d=0;d<l;++d)if(o=a[d],r=o.geometry,h=Vv(e,r),ag.shouldUseSphericalCoordinates(h)){A=!1;break}for(d=0;d<l;++d){o=a[d],r=o.geometry,s=r.constructor;const x=Vv(e,r),C=r.textureCoordinateRotationPoints;y=A?ag.getPlanarTextureCoordinateAttributes(x,C,i,e.mapProjection,this._maxHeight):ag.getSphericalExtentGeometryInstanceAttributes(x,C,i,e.mapProjection);const w=o.attributes;for(const v in w)w.hasOwnProperty(v)&&(y[v]=w[v]);u[d]=new Un({geometry:s.createShadowVolume(r,Cq(this),xq(this)),attributes:y,id:o.id})}}else for(d=0;d<l;++d)o=a[d],r=o.geometry,s=r.constructor,u[d]=new Un({geometry:s.createShadowVolume(r,Cq(this),xq(this)),attributes:o.attributes,id:o.id});n.geometryInstances=u,n.appearance=this.appearance,n._createBoundingVolumeFunction=function(y,A){!function oMe(e,t,n){const i=t.mapProjection.ellipsoid,o=Vv(t,n),r=Eo.fromRectangle(o,e._minHeight,e._maxHeight,i);if(e._boundingVolumes.push(r),!t.scene3DOnly){const a=be.fromRectangleWithHeights2D(o,t.mapProjection,e._maxHeight,e._minHeight);f.fromElements(a.center.z,a.center.x,a.center.y,a.center),e._boundingVolumes2D.push(a)}}(t,y,A)},n._updateAndQueueCommandsFunction=function(y,A,x,C,w,v,D,P){!function rMe(e,t,n,i,o,r,s,a){let l;l=t.mode===ce.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;const u=e.classificationType,d=u!==Yo.CESIUM_3D_TILE,h=u!==Yo.TERRAIN,m=t.passes,_=e._primitive;let p,y,A;if(m.render){const x=n.length;for(p=0;p<x;++p)y=l[kM(p,x)],d&&(A=n[p],UM(e,A,t,o,r,y,s)),h&&(A=n[p].derivedCommands.tileset,UM(e,A,t,o,r,y,s));if(t.invertClassification){const C=_._commandsIgnoreShow,w=C.length;for(p=0;p<w;++p)y=l[p],A=C[p],UM(e,A,t,o,r,y,s)}}if(m.pick){const x=i.length;let C;for(e._useFragmentCulling||(C=_._primitive._pickOffsets),p=0;p<x;++p)y=l[kM(p,x)],e._useFragmentCulling||(y=l[C[kM(p,x)].index]),d&&(A=i[p],Eq(e,A,t,o,r,y)),h&&(A=i[p].derivedCommands.tileset,Eq(e,A,t,o,r,y))}}(t,A,x,C,w,v,D)},this._primitive=new Tq(n)}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&c(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})},Ec.prototype.getBoundingSphere=function(e){const t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},Ec.prototype.getGeometryInstanceAttributes=function(e){if(!c(this._primitive))throw new E("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},Ec.prototype.isDestroyed=function(){return!1},Ec.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Ye(this)},Ec._supportsMaterials=function(e){return e.depthTexture},Ec.supportsMaterials=function(e){return T.typeOf.object("scene",e),Ec._supportsMaterials(e.frameState.context)};const $0=Ec,sMe=new G(1,1),cMe=X.WHITE;function K0(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new Ue,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(K0.prototype,{isConstant:{get:function(){return te.isConstant(this._image)&&te.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:pe("image"),repeat:pe("repeat"),color:pe("color"),transparent:pe("transparent")}),K0.prototype.getType=function(e){return"Image"},K0.prototype.getValue=function(e,t){return c(t)||(t={}),t.image=te.getValueOrUndefined(this._image,e),t.repeat=te.getValueOrClonedDefault(this._repeat,e,sMe,t.repeat),t.color=te.getValueOrClonedDefault(this._color,e,cMe,t.color),te.getValueOrDefault(this._transparent,e,!1)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t},K0.prototype.equals=function(e){return this===e||e instanceof K0&&te.equals(this._image,e._image)&&te.equals(this._repeat,e._repeat)&&te.equals(this._color,e._color)&&te.equals(this._transparent,e._transparent)};const lMe=K0;function uMe(e){if(e instanceof X)return new Fn(e);if("string"==typeof e||e instanceof jt||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){const t=new lMe;return t.image=e,t}throw new E(`Unable to infer material type: ${e}`)}const Kc=function dMe(e,t){return pe(e,t,uMe)};function Cx(e){this._definitionChanged=new Ue,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Cx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),dimensions:pe("dimensions"),heightReference:pe("heightReference"),fill:pe("fill"),material:Kc("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")}),Cx.prototype.clone=function(e){return c(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 Cx(this)},Cx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.dimensions=g(this.dimensions,e.dimensions),this.heightReference=g(this.heightReference,e.heightReference),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const fMe=Cx;function Ex(e){this._definitionChanged=new Ue,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Ex.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),positions:pe("positions"),width:pe("width"),height:pe("height"),heightReference:pe("heightReference"),extrudedHeight:pe("extrudedHeight"),extrudedHeightReference:pe("extrudedHeightReference"),cornerType:pe("cornerType"),granularity:pe("granularity"),fill:pe("fill"),material:Kc("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition"),classificationType:pe("classificationType"),zIndex:pe("zIndex")}),Ex.prototype.clone=function(e){return c(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 Ex(this)},Ex.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.width=g(this.width,e.width),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=g(this.cornerType,e.cornerType),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};const hMe=Ex;function pMe(e){return e}const Dh=function mMe(e,t){return pe(e,t,pMe)};function wx(e){this._definitionChanged=new Ue,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(wx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),length:pe("length"),topRadius:pe("topRadius"),bottomRadius:pe("bottomRadius"),heightReference:pe("heightReference"),fill:pe("fill"),material:Kc("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),numberOfVerticalLines:pe("numberOfVerticalLines"),slices:pe("slices"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")}),wx.prototype.clone=function(e){return c(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 wx(this)},wx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.length=g(this.length,e.length),this.topRadius=g(this.topRadius,e.topRadius),this.bottomRadius=g(this.bottomRadius,e.bottomRadius),this.heightReference=g(this.heightReference,e.heightReference),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=g(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=g(this.slices,e.slices),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const _Me=wx;function Sx(e){this._definitionChanged=new Ue,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Sx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),semiMajorAxis:pe("semiMajorAxis"),semiMinorAxis:pe("semiMinorAxis"),height:pe("height"),heightReference:pe("heightReference"),extrudedHeight:pe("extrudedHeight"),extrudedHeightReference:pe("extrudedHeightReference"),rotation:pe("rotation"),stRotation:pe("stRotation"),granularity:pe("granularity"),fill:pe("fill"),material:Kc("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),numberOfVerticalLines:pe("numberOfVerticalLines"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition"),classificationType:pe("classificationType"),zIndex:pe("zIndex")}),Sx.prototype.clone=function(e){return c(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 Sx(this)},Sx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.semiMajorAxis=g(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=g(this.semiMinorAxis,e.semiMinorAxis),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=g(this.rotation,e.rotation),this.stRotation=g(this.stRotation,e.stRotation),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=g(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};const gMe=Sx;function vx(e){this._definitionChanged=new Ue,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(vx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),radii:pe("radii"),innerRadii:pe("innerRadii"),minimumClock:pe("minimumClock"),maximumClock:pe("maximumClock"),minimumCone:pe("minimumCone"),maximumCone:pe("maximumCone"),heightReference:pe("heightReference"),fill:pe("fill"),material:Kc("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),stackPartitions:pe("stackPartitions"),slicePartitions:pe("slicePartitions"),subdivisions:pe("subdivisions"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")}),vx.prototype.clone=function(e){return c(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 vx(this)},vx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.radii=g(this.radii,e.radii),this.innerRadii=g(this.innerRadii,e.innerRadii),this.minimumClock=g(this.minimumClock,e.minimumClock),this.maximumClock=g(this.maximumClock,e.maximumClock),this.minimumCone=g(this.minimumCone,e.minimumCone),this.maximumCone=g(this.maximumCone,e.maximumCone),this.heightReference=g(this.heightReference,e.heightReference),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.stackPartitions=g(this.stackPartitions,e.stackPartitions),this.slicePartitions=g(this.slicePartitions,e.slicePartitions),this.subdivisions=g(this.subdivisions,e.subdivisions),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const yMe=vx;function Dx(e){this._definitionChanged=new Ue,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Dx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),text:pe("text"),font:pe("font"),style:pe("style"),scale:pe("scale"),showBackground:pe("showBackground"),backgroundColor:pe("backgroundColor"),backgroundPadding:pe("backgroundPadding"),pixelOffset:pe("pixelOffset"),eyeOffset:pe("eyeOffset"),horizontalOrigin:pe("horizontalOrigin"),verticalOrigin:pe("verticalOrigin"),heightReference:pe("heightReference"),fillColor:pe("fillColor"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),translucencyByDistance:pe("translucencyByDistance"),pixelOffsetScaleByDistance:pe("pixelOffsetScaleByDistance"),scaleByDistance:pe("scaleByDistance"),distanceDisplayCondition:pe("distanceDisplayCondition"),disableDepthTestDistance:pe("disableDepthTestDistance")}),Dx.prototype.clone=function(e){return c(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 Dx(this)},Dx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.text=g(this.text,e.text),this.font=g(this.font,e.font),this.style=g(this.style,e.style),this.scale=g(this.scale,e.scale),this.showBackground=g(this.showBackground,e.showBackground),this.backgroundColor=g(this.backgroundColor,e.backgroundColor),this.backgroundPadding=g(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=g(this.pixelOffset,e.pixelOffset),this.eyeOffset=g(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=g(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=g(this.verticalOrigin,e.verticalOrigin),this.heightReference=g(this.heightReference,e.heightReference),this.fillColor=g(this.fillColor,e.fillColor),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=g(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=g(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=g(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=g(this.disableDepthTestDistance,e.disableDepthTestDistance)};const wq=Dx,zM=new ZL;function Ix(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new Ue,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(Ix.prototype,{isConstant:{get:function(){return te.isConstant(this._translation)&&te.isConstant(this._rotation)&&te.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:pe("translation"),rotation:pe("rotation"),scale:pe("scale")}),Ix.prototype.getValue=function(e,t){return c(t)||(t=new ZL),t.translation=te.getValueOrClonedDefault(this._translation,e,zM.translation,t.translation),t.rotation=te.getValueOrClonedDefault(this._rotation,e,zM.rotation,t.rotation),t.scale=te.getValueOrClonedDefault(this._scale,e,zM.scale,t.scale),t},Ix.prototype.equals=function(e){return this===e||e instanceof Ix&&te.equals(this._translation,e._translation)&&te.equals(this._rotation,e._rotation)&&te.equals(this._scale,e._scale)};const bMe=Ix;function Ih(e,t){this._propertyNames=[],this._definitionChanged=new Ue,c(e)&&this.merge(e,t)}function AMe(e){return new xo(e)}Object.defineProperties(Ih.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){const e=this._propertyNames;for(let t=0,n=e.length;t<n;t++)if(!te.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),Ih.prototype.hasProperty=function(e){return-1!==this._propertyNames.indexOf(e)},Ih.prototype.addProperty=function(e,t,n){const i=this._propertyNames;if(!c(e))throw new E("propertyName is required.");if(-1!==i.indexOf(e))throw new E(`${e} is already a registered property.`);i.push(e),Object.defineProperty(this,e,pe(e,!0,g(n,AMe))),c(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)},Ih.prototype.removeProperty=function(e){const n=this._propertyNames.indexOf(e);if(!c(e))throw new E("propertyName is required.");if(-1===n)throw new E(`${e} is not a registered property.`);this._propertyNames.splice(n,1),delete this[e],this._definitionChanged.raiseEvent(this)},Ih.prototype.getValue=function(e,t){if(!c(e))throw new E("time is required.");c(t)||(t={});const n=this._propertyNames;for(let i=0,o=n.length;i<o;i++){const r=n[i];t[r]=te.getValueOrUndefined(this[r],e,t[r])}return t},Ih.prototype.merge=function(e,t){if(!c(e))throw new E("source is required.");const n=this._propertyNames,i=c(e._propertyNames)?e._propertyNames:Object.keys(e);for(let o=0,r=i.length;o<r;o++){const s=i[o],a=this[s],l=e[s];void 0===a&&-1===n.indexOf(s)&&this.addProperty(s,void 0,t),void 0!==l&&(void 0!==a?c(a)&&c(a.merge)&&a.merge(l):this[s]=c(l)&&c(l.merge)&&c(l.clone)?l.clone():l)}},Ih.prototype.equals=function(e){return this===e||e instanceof Ih&&function TMe(e,t){const n=e._propertyNames,i=t._propertyNames,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;++r){const s=n[r];if(-1===i.indexOf(s)||!te.equals(e[s],t[s]))return!1}return!0}(this,e)};const Px=Ih;function Sq(e){return new bMe(e)}function Ox(e){this._definitionChanged=new Ue,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._runAnimations=void 0,this._runAnimationsSubscription=void 0,this._clampAnimations=void 0,this._clampAnimationsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._articulations=void 0,this._articulationsSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this._customShader=void 0,this._customShaderSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Ox.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),uri:pe("uri"),scale:pe("scale"),minimumPixelSize:pe("minimumPixelSize"),maximumScale:pe("maximumScale"),incrementallyLoadTextures:pe("incrementallyLoadTextures"),runAnimations:pe("runAnimations"),clampAnimations:pe("clampAnimations"),shadows:pe("shadows"),heightReference:pe("heightReference"),silhouetteColor:pe("silhouetteColor"),silhouetteSize:pe("silhouetteSize"),color:pe("color"),colorBlendMode:pe("colorBlendMode"),colorBlendAmount:pe("colorBlendAmount"),imageBasedLightingFactor:pe("imageBasedLightingFactor"),lightColor:pe("lightColor"),distanceDisplayCondition:pe("distanceDisplayCondition"),nodeTransformations:pe("nodeTransformations",void 0,function xMe(e){return new Px(e,Sq)}),articulations:pe("articulations",void 0,function CMe(e){return new Px(e)}),clippingPlanes:pe("clippingPlanes"),customShader:pe("customShader")}),Ox.prototype.clone=function(e){return c(e)?(e.show=this.show,e.uri=this.uri,e.scale=this.scale,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.heightReference=this._heightReference,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.lightColor=this.lightColor,e.distanceDisplayCondition=this.distanceDisplayCondition,e.nodeTransformations=this.nodeTransformations,e.articulations=this.articulations,e.clippingPlanes=this.clippingPlanes,e.customShader=this.customShader,e):new Ox(this)},Ox.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.uri=g(this.uri,e.uri),this.scale=g(this.scale,e.scale),this.minimumPixelSize=g(this.minimumPixelSize,e.minimumPixelSize),this.maximumScale=g(this.maximumScale,e.maximumScale),this.incrementallyLoadTextures=g(this.incrementallyLoadTextures,e.incrementallyLoadTextures),this.runAnimations=g(this.runAnimations,e.runAnimations),this.clampAnimations=g(this.clampAnimations,e.clampAnimations),this.shadows=g(this.shadows,e.shadows),this.heightReference=g(this.heightReference,e.heightReference),this.silhouetteColor=g(this.silhouetteColor,e.silhouetteColor),this.silhouetteSize=g(this.silhouetteSize,e.silhouetteSize),this.color=g(this.color,e.color),this.colorBlendMode=g(this.colorBlendMode,e.colorBlendMode),this.colorBlendAmount=g(this.colorBlendAmount,e.colorBlendAmount),this.imageBasedLightingFactor=g(this.imageBasedLightingFactor,e.imageBasedLightingFactor),this.lightColor=g(this.lightColor,e.lightColor),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.clippingPlanes=g(this.clippingPlanes,e.clippingPlanes),this.customShader=g(this.customShader,e.customShader);const t=e.nodeTransformations;if(c(t)){const i=this.nodeTransformations;c(i)?i.merge(t):this.nodeTransformations=new Px(t,Sq)}const n=e.articulations;if(c(n)){const i=this.articulations;c(i)?i.merge(n):this.articulations=new Px(n)}};const EMe=Ox;function Lx(e){this._definitionChanged=new Ue,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Lx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),uri:pe("uri"),maximumScreenSpaceError:pe("maximumScreenSpaceError")}),Lx.prototype.clone=function(e){return c(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new Lx(this)},Lx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.uri=g(this.uri,e.uri),this.maximumScreenSpaceError=g(this.maximumScreenSpaceError,e.maximumScreenSpaceError)};const wMe=Lx;function Rx(e){this._definitionChanged=new Ue,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Rx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),leadTime:pe("leadTime"),trailTime:pe("trailTime"),width:pe("width"),resolution:pe("resolution"),material:Kc("material"),distanceDisplayCondition:pe("distanceDisplayCondition")}),Rx.prototype.clone=function(e){return c(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new Rx(this)},Rx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.leadTime=g(this.leadTime,e.leadTime),this.trailTime=g(this.trailTime,e.trailTime),this.width=g(this.width,e.width),this.resolution=g(this.resolution,e.resolution),this.material=g(this.material,e.material),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const vq=Rx;function Nx(e){this._definitionChanged=new Ue,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Nx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),plane:pe("plane"),dimensions:pe("dimensions"),fill:pe("fill"),material:Kc("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")}),Nx.prototype.clone=function(e){return c(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,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 Nx(this)},Nx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.plane=g(this.plane,e.plane),this.dimensions=g(this.dimensions,e.dimensions),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const SMe=Nx;function Mx(e){this._definitionChanged=new Ue,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Mx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),pixelSize:pe("pixelSize"),heightReference:pe("heightReference"),color:pe("color"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),scaleByDistance:pe("scaleByDistance"),translucencyByDistance:pe("translucencyByDistance"),distanceDisplayCondition:pe("distanceDisplayCondition"),disableDepthTestDistance:pe("disableDepthTestDistance")}),Mx.prototype.clone=function(e){return c(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new Mx(this)},Mx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.pixelSize=g(this.pixelSize,e.pixelSize),this.heightReference=g(this.heightReference,e.heightReference),this.color=g(this.color,e.color),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.scaleByDistance=g(this.scaleByDistance,e.scaleByDistance),this.translucencyByDistance=g(this._translucencyByDistance,e.translucencyByDistance),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=g(this.disableDepthTestDistance,e.disableDepthTestDistance)};const vMe=Mx;function Fx(e){this._definitionChanged=new Ue,this._show=void 0,this._showSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=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._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._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=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._textureCoordinates=void 0,this._textureCoordinatesSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Fx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),hierarchy:pe("hierarchy",void 0,function DMe(e){return Array.isArray(e)&&(e=new j_(e)),new xo(e)}),height:pe("height"),heightReference:pe("heightReference"),extrudedHeight:pe("extrudedHeight"),extrudedHeightReference:pe("extrudedHeightReference"),stRotation:pe("stRotation"),granularity:pe("granularity"),fill:pe("fill"),material:Kc("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),perPositionHeight:pe("perPositionHeight"),closeTop:pe("closeTop"),closeBottom:pe("closeBottom"),arcType:pe("arcType"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition"),classificationType:pe("classificationType"),zIndex:pe("zIndex"),textureCoordinates:pe("textureCoordinates")}),Fx.prototype.clone=function(e){return c(e)?(e.show=this.show,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,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.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.arcType=this.arcType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e.textureCoordinates=this.textureCoordinates,e):new Fx(this)},Fx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.hierarchy=g(this.hierarchy,e.hierarchy),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.stRotation=g(this.stRotation,e.stRotation),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.perPositionHeight=g(this.perPositionHeight,e.perPositionHeight),this.closeTop=g(this.closeTop,e.closeTop),this.closeBottom=g(this.closeBottom,e.closeBottom),this.arcType=g(this.arcType,e.arcType),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex),this.textureCoordinates=g(this.textureCoordinates,e.textureCoordinates)};const VM=Fx;function Bx(e){this._definitionChanged=new Ue,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._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Bx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),positions:pe("positions"),width:pe("width"),granularity:pe("granularity"),material:Kc("material"),depthFailMaterial:Kc("depthFailMaterial"),arcType:pe("arcType"),clampToGround:pe("clampToGround"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition"),classificationType:pe("classificationType"),zIndex:pe("zIndex")}),Bx.prototype.clone=function(e){return c(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new Bx(this)},Bx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.width=g(this.width,e.width),this.granularity=g(this.granularity,e.granularity),this.material=g(this.material,e.material),this.depthFailMaterial=g(this.depthFailMaterial,e.depthFailMaterial),this.arcType=g(this.arcType,e.arcType),this.clampToGround=g(this.clampToGround,e.clampToGround),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};const Q0=Bx;function kx(e){this._definitionChanged=new Ue,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._shapeSubscription=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._distanceDisplayConditionSubsription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(kx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),positions:pe("positions"),shape:pe("shape"),cornerType:pe("cornerType"),granularity:pe("granularity"),fill:pe("fill"),material:Kc("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")}),kx.prototype.clone=function(e){return c(e)?(e.show=this.show,e.positions=this.positions,e.shape=this.shape,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):new kx(this)},kx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.shape=g(this.shape,e.shape),this.cornerType=g(this.cornerType,e.cornerType),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const IMe=kx;function Ux(e){this._definitionChanged=new Ue,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=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._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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Ux.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),coordinates:pe("coordinates"),height:pe("height"),heightReference:pe("heightReference"),extrudedHeight:pe("extrudedHeight"),extrudedHeightReference:pe("extrudedHeightReference"),rotation:pe("rotation"),stRotation:pe("stRotation"),granularity:pe("granularity"),fill:pe("fill"),material:Kc("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition"),classificationType:pe("classificationType"),zIndex:pe("zIndex")}),Ux.prototype.clone=function(e){return c(e)?(e.show=this.show,e.coordinates=this.coordinates,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.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new Ux(this)},Ux.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.coordinates=g(this.coordinates,e.coordinates),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=g(this.rotation,e.rotation),this.stRotation=g(this.stRotation,e.stRotation),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};const Dq=Ux;function zx(e){this._definitionChanged=new Ue,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=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.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(zx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),positions:pe("positions"),minimumHeights:pe("minimumHeights"),maximumHeights:pe("maximumHeights"),granularity:pe("granularity"),fill:pe("fill"),material:Kc("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")}),zx.prototype.clone=function(e){return c(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,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):new zx(this)},zx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.minimumHeights=g(this.minimumHeights,e.minimumHeights),this.maximumHeights=g(this.maximumHeights,e.maximumHeights),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const Iq=zx,PMe=new Se;function OMe(e){return new Ov(e)}function Rs(e,t){return pe(e,void 0,function(n){return n instanceof t?n:new t(n)})}function Kd(e){let t=(e=g(e,g.EMPTY_OBJECT)).id;c(t)||(t=kr()),this._availability=void 0,this._id=t,this._definitionChanged=new Ue,this._name=e.name,this._show=g(e.show,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","tileset","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall"],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._tileset=void 0,this._tilesetSubscription=void 0,this._orientation=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function HM(e,t,n){const i=t.length;for(let o=0;o<i;o++){const r=t[o],s=r._show;(!n&&s)!==(n&&s)&&HM(r,r._children,n)}e._definitionChanged.raiseEvent(e,"isShowing",n,!n)}Object.defineProperties(Kd.prototype,{availability:Dh("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:Dh("name"),show:{get:function(){return this._show},set:function(e){if(!c(e))throw new E("value is required.");if(e===this._show)return;const t=this.isShowing;this._show=e;const n=this.isShowing;t!==n&&HM(this,this._children,n),this._definitionChanged.raiseEvent(this,"show",e,!e)}},isShowing:{get:function(){return this._show&&(!c(this.entityCollection)||this.entityCollection.show)&&(!c(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){const t=this._parent;if(t===e)return;const n=this.isShowing;if(c(t)){const o=t._children.indexOf(this);t._children.splice(o,1)}this._parent=e,c(e)&&e._children.push(this);const i=this.isShowing;n!==i&&HM(this,this._children,i),this._definitionChanged.raiseEvent(this,"parent",e,t)}},propertyNames:{get:function(){return this._propertyNames}},billboard:Rs("billboard",aM),box:Rs("box",fMe),corridor:Rs("corridor",hMe),cylinder:Rs("cylinder",_Me),description:pe("description"),ellipse:Rs("ellipse",gMe),ellipsoid:Rs("ellipsoid",yMe),label:Rs("label",wq),model:Rs("model",EMe),tileset:Rs("tileset",wMe),orientation:pe("orientation"),path:Rs("path",vq),plane:Rs("plane",SMe),point:Rs("point",vMe),polygon:Rs("polygon",VM),polyline:Rs("polyline",Q0),polylineVolume:Rs("polylineVolume",IMe),properties:Rs("properties",Px),position:function LMe(e){return pe(e,void 0,OMe)}("position"),rectangle:Rs("rectangle",Dq),viewFrom:pe("viewFrom"),wall:Rs("wall",Iq)}),Kd.prototype.isAvailable=function(e){if(!c(e))throw new E("time is required.");const t=this._availability;return!c(t)||t.contains(e)},Kd.prototype.addProperty=function(e){const t=this._propertyNames;if(!c(e))throw new E("propertyName is required.");if(-1!==t.indexOf(e))throw new E(`${e} is already a registered property.`);if(e in this)throw new E(`${e} is a reserved property name.`);t.push(e),Object.defineProperty(this,e,Dh(e,!0))},Kd.prototype.removeProperty=function(e){const n=this._propertyNames.indexOf(e);if(!c(e))throw new E("propertyName is required.");if(-1===n)throw new E(`${e} is not a registered property.`);this._propertyNames.splice(n,1),delete this[e]},Kd.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.name=g(this.name,e.name),this.availability=g(this.availability,e.availability);const t=this._propertyNames,n=c(e._propertyNames)?e._propertyNames:Object.keys(e),i=n.length;for(let o=0;o<i;o++){const r=n[o];if("parent"===r||"name"===r||"availability"===r||"children"===r)continue;const s=this[r],a=e[r];!c(s)&&-1===t.indexOf(r)&&this.addProperty(r),c(a)&&(c(s)?c(s.merge)&&s.merge(a):this[r]=c(a.merge)&&c(a.clone)?a.clone():a)}};const Pq=new ne,Oq=new f,Lq=new yt;Kd.prototype.computeModelMatrix=function(e,t){T.typeOf.object("time",e);const n=te.getValueOrUndefined(this._position,e,Oq);if(!c(n))return;const i=te.getValueOrUndefined(this._orientation,e,Lq);return c(i)?k.fromRotationTranslation(ne.fromQuaternion(i,Pq),n,t):Rn.eastNorthUpToFixedFrame(n,void 0,t)},Kd.prototype.computeModelMatrixForHeightReference=function(e,t,n,i,o){T.typeOf.object("time",e);const r=te.getValueOrDefault(t,e,Qt.NONE);let s=te.getValueOrUndefined(this._position,e,Oq);if(r===Qt.NONE||!c(s)||f.equalsEpsilon(s,f.ZERO,O.EPSILON8))return this.computeModelMatrix(e,o);const a=i.cartesianToCartographic(s,PMe);r===Qt.CLAMP_TO_GROUND?a.height=n:a.height+=n,s=i.cartographicToCartesian(a,s);const l=te.getValueOrUndefined(this._orientation,e,Lq);return c(l)?k.fromRotationTranslation(ne.fromQuaternion(l,Pq),s,o):Rn.eastNorthUpToFixedFrame(s,void 0,o)},Kd.supportsMaterialsforEntitiesOnTerrain=function(e){return $0.supportsMaterials(e)},Kd.supportsPolylinesOnTerrain=function(e){return Uv.isSupported(e)};const wc=Kd,Rq={id:void 0};function Vx(e){if(e._firing)e._refire=!0;else if(0===e._suspendCount){const t=e._addedEntities,n=e._removedEntities,i=e._changedEntities;if(0!==i.length||0!==t.length||0!==n.length){e._firing=!0;do{e._refire=!1;const 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 Da(e){this._owner=e,this._entities=new _n,this._addedEntities=new _n,this._removedEntities=new _n,this._changedEntities=new _n,this._suspendCount=0,this._collectionChanged=new Ue,this._id=kr(),this._show=!0,this._firing=!1,this._refire=!1}Da.prototype.suspendEvents=function(){this._suspendCount++},Da.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new E("resumeEvents can not be called before suspendEvents.");this._suspendCount--,Vx(this)},Object.defineProperties(Da.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(!c(e))throw new E("value is required.");if(e===this._show)return;let t;this.suspendEvents();const n=[],i=this._entities.values,o=i.length;for(t=0;t<o;t++)n.push(i[t].isShowing);for(this._show=e,t=0;t<o;t++){const r=n[t],s=i[t];r!==s.isShowing&&s.definitionChanged.raiseEvent(s,"isShowing",s.isShowing,r)}this.resumeEvents()}},owner:{get:function(){return this._owner}}}),Da.prototype.computeAvailability=function(){let e=St.MAXIMUM_VALUE,t=St.MINIMUM_VALUE;const n=this._entities.values;for(let i=0,o=n.length;i<o;i++){const s=n[i].availability;if(c(s)){const a=s.start,l=s.stop;se.lessThan(a,e)&&!a.equals(St.MINIMUM_VALUE)&&(e=a),se.greaterThan(l,t)&&!l.equals(St.MAXIMUM_VALUE)&&(t=l)}}return St.MAXIMUM_VALUE.equals(e)&&(e=St.MINIMUM_VALUE),St.MINIMUM_VALUE.equals(t)&&(t=St.MAXIMUM_VALUE),new ci({start:e,stop:t})},Da.prototype.add=function(e){if(!c(e))throw new E("entity is required.");e instanceof wc||(e=new wc(e));const t=e.id,n=this._entities;if(n.contains(t))throw new Ie(`An entity with id ${t} already exists in this collection.`);return e.entityCollection=this,n.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(Da.prototype._onEntityDefinitionChanged,this),Vx(this),e},Da.prototype.remove=function(e){return!!c(e)&&this.removeById(e.id)},Da.prototype.contains=function(e){if(!c(e))throw new E("entity is required");return this._entities.get(e.id)===e},Da.prototype.removeById=function(e){if(!c(e))return!1;const n=this._entities.get(e);return!!this._entities.remove(e)&&(this._addedEntities.remove(e)||(this._removedEntities.set(e,n),this._changedEntities.remove(e)),this._entities.remove(e),n.definitionChanged.removeEventListener(Da.prototype._onEntityDefinitionChanged,this),Vx(this),!0)},Da.prototype.removeAll=function(){const e=this._entities,t=e.length,n=e.values,i=this._addedEntities,o=this._removedEntities;for(let r=0;r<t;r++){const s=n[r],a=s.id,l=i.get(a);c(l)||(s.definitionChanged.removeEventListener(Da.prototype._onEntityDefinitionChanged,this),o.set(a,s))}e.removeAll(),i.removeAll(),this._changedEntities.removeAll(),Vx(this)},Da.prototype.getById=function(e){if(!c(e))throw new E("id is required.");return this._entities.get(e)},Da.prototype.getOrCreateEntity=function(e){if(!c(e))throw new E("id is required.");let t=this._entities.get(e);return c(t)||(Rq.id=e,t=new wc(Rq),this.add(t)),t},Da.prototype._onEntityDefinitionChanged=function(e){const t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),Vx(this)};const J0=Da;function Hv(e){return f.fromDegrees(e[0],e[1],e[2])}const GM={"urn:ogc:def:crs:OGC:1.3:CRS84":Hv,"EPSG:4326":Hv,"urn:ogc:def:crs:EPSG::4326":Hv},Nq={},Mq={};let WM,jM=48,qM=X.ROYALBLUE,YM=X.YELLOW,XM=2,ZM=X.fromBytes(255,255,0,100),$M=!1;const RMe={small:24,medium:48,large:64},NMe=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function Fq(e,t){let n="";for(const i in e)if(e.hasOwnProperty(i)){if(i===t||-1!==NMe.indexOf(i))continue;const o=e[i];c(o)&&(n+="object"==typeof o?`<tr><th>${i}</th><td>${Fq(o)}</td></tr>`:`<tr><th>${i}</th><td>${o}</td></tr>`)}return n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function FMe(e,t){return new cM(function MMe(e,t,n){let i;return function(o,r){return c(i)||(i=e(t,n)),i}}(Fq,e,t),!0)}function Gv(e,t,n){let i=e.id;if(c(i)&&"Feature"===e.type){let s=2,a=i;for(;c(t.getById(a));)a=`${i}_${s}`,s++;i=a}else i=kr();const o=t.getOrCreateEntity(i),r=e.properties;if(c(r)){let s;o.properties=r;const a=r.title;if(c(a))o.name=a,s="title";else{let u=Number.MAX_VALUE;for(const d in r)if(r.hasOwnProperty(d)&&r[d]){const h=d.toLowerCase();if(u>1&&"title"===h){u=1,s=d;break}u>2&&"name"===h?(u=2,s=d):u>3&&/title/i.test(d)?(u=3,s=d):u>4&&/name/i.test(d)&&(u=4,s=d)}c(s)&&(o.name=r[s])}const l=r.description;null!==l&&(o.description=c(l)?new xo(l):n(r,s))}return o}function KM(e,t){const n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=t(e[i]);return n}const Bq={Feature:Uq,FeatureCollection:function BMe(e,t,n,i,o){const r=t.features;for(let s=0,a=r.length;s<a;s++)Uq(e,r[s],0,i,o)},GeometryCollection:zq,LineString:Wq,MultiLineString:qq,MultiPoint:Gq,MultiPolygon:Zq,Point:Hq,Polygon:Xq,Topology:$q},kq={GeometryCollection:zq,LineString:Wq,MultiLineString:qq,MultiPoint:Gq,MultiPolygon:Zq,Point:Hq,Polygon:Xq,Topology:$q};function Uq(e,t,n,i,o){if(null===t.geometry)return void Gv(t,e._entityCollection,o.describe);if(!c(t.geometry))throw new Ie("feature.geometry is required.");const r=t.geometry.type,s=kq[r];if(!c(s))throw new Ie(`Unknown geometry type: ${r}`);s(e,t,t.geometry,i,o)}function zq(e,t,n,i,o){const r=n.geometries;for(let s=0,a=r.length;s<a;s++){const l=r[s],u=l.type,d=kq[u];if(!c(d))throw new Ie(`Unknown geometry type: ${u}`);d(e,t,l,i,o)}}function Vq(e,t,n,i,o){let r=o.markerSymbol,s=o.markerColor,a=o.markerSize;const l=t.properties;if(c(l)){const _=l["marker-color"];c(_)&&(s=X.fromCssColorString(_)),a=g(RMe[l["marker-size"]],a);const p=l["marker-symbol"];c(p)&&(r=p)}let u;u=c(r)?1===r.length?e._pinBuilder.fromText(r.toUpperCase(),s,a):e._pinBuilder.fromMakiIconId(r,s,a):e._pinBuilder.fromColor(s,a);const d=new aM;d.verticalOrigin=new xo(ao.BOTTOM),2===i.length&&o.clampToGround&&(d.heightReference=Qt.CLAMP_TO_GROUND);const h=Gv(t,e._entityCollection,o.describe);h.billboard=d,h.position=new Ov(n(i));const m=Promise.resolve(u).then(function(_){d.image=new xo(_)}).catch(function(){d.image=new xo(e._pinBuilder.fromColor(s,a))});e._promises.push(m)}function Hq(e,t,n,i,o){Vq(e,t,i,n.coordinates,o)}function Gq(e,t,n,i,o){const r=n.coordinates;for(let s=0;s<r.length;s++)Vq(e,t,i,r[s],o)}function jq(e,t,n,i,o){let r=o.strokeMaterialProperty,s=o.strokeWidthProperty;const a=t.properties;if(c(a)){const d=a["stroke-width"];let h;c(d)&&(s=new xo(d));const m=a.stroke;c(m)&&(h=X.fromCssColorString(m));const _=a["stroke-opacity"];c(_)&&1!==_&&(c(h)||(h=r.color.getValue().clone()),h.alpha=_),c(h)&&(r=new Fn(h))}const l=Gv(t,e._entityCollection,o.describe),u=new Q0;l.polyline=u,u.clampToGround=o.clampToGround,u.material=r,u.width=s,u.positions=new xo(KM(i,n)),u.arcType=Xn.RHUMB}function Wq(e,t,n,i,o){jq(e,t,i,n.coordinates,o)}function qq(e,t,n,i,o){const r=n.coordinates;for(let s=0;s<r.length;s++)jq(e,t,i,r[s],o)}function Yq(e,t,n,i,o){if(0===i.length||0===i[0].length)return;let r=o.strokeMaterialProperty.color,s=o.fillMaterialProperty,a=o.strokeWidthProperty;const l=t.properties;if(c(l)){const _=l["stroke-width"];let p;c(_)&&(a=new xo(_));const y=l.stroke;c(y)&&(p=X.fromCssColorString(y));let x,A=l["stroke-opacity"];c(A)&&1!==A&&(c(p)||(p=r.getValue().clone()),p.alpha=A),c(p)&&(r=new xo(p));const C=l.fill,w=s.color.getValue();c(C)&&(x=X.fromCssColorString(C),x.alpha=w.alpha),A=l["fill-opacity"],c(A)&&A!==w.alpha&&(c(x)||(x=w.clone()),x.alpha=A),c(x)&&(s=new Fn(x))}const u=new VM;u.outline=new xo(!0),u.outlineColor=r,u.outlineWidth=a,u.material=s,u.arcType=Xn.RHUMB;const d=[];for(let _=1,p=i.length;_<p;_++)d.push(new j_(KM(i[_],n)));const h=i[0];u.hierarchy=new xo(new j_(KM(h,n),d)),h[0].length>2?u.perPositionHeight=new xo(!0):o.clampToGround||(u.height=0),Gv(t,e._entityCollection,o.describe).polygon=u}function Xq(e,t,n,i,o){Yq(e,t,i,n.coordinates,o)}function Zq(e,t,n,i,o){const r=n.coordinates;for(let s=0;s<r.length;s++)Yq(e,t,i,r[s],o)}function $q(e,t,n,i,o){for(const r in n.objects)if(n.objects.hasOwnProperty(r)){const s=eRe(n,n.objects[r]);(0,Bq[s.type])(e,s,s,i,o)}}function im(e){this._name=e,this._changed=new Ue,this._error=new Ue,this._isLoading=!1,this._loading=new Ue,this._entityCollection=new J0(this),this._promises=[],this._pinBuilder=new aW,this._entityCluster=new EM,this._credit=void 0,this._resourceCredits=[]}function Kq(e,t,n,i){if(!c(t))throw new E("data is required.");og.setLoading(e,!0);let o=(n=g(n,g.EMPTY_OBJECT)).credit;"string"==typeof o&&(o=new qn(o)),e._credit=o;let r=t,s=n.sourceUri;if("string"==typeof t||t instanceof jt){r=(t=jt.createIfNeeded(t)).fetchJson(),s=g(s,t.getUrlComponent());const a=e._resourceCredits,l=t.credits;if(c(l)){const u=l.length;for(let d=0;d<u;d++)a.push(l[d])}}return n={describe:g(n.describe,FMe),markerSize:g(n.markerSize,jM),markerSymbol:g(n.markerSymbol,WM),markerColor:g(n.markerColor,qM),strokeWidthProperty:new xo(g(n.strokeWidth,XM)),strokeMaterialProperty:new Fn(g(n.stroke,YM)),fillMaterialProperty:new Fn(g(n.fill,ZM)),clampToGround:g(n.clampToGround,$M)},Promise.resolve(r).then(function(a){return function kMe(e,t,n,i,o){let r;c(i)&&(r=rW(i)),c(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));const s=Bq[t.type];if(!c(s))throw new Ie(`Unsupported GeoJSON object type: ${t.type}`);const a=t.crs;let l=null!==a?Hv:null;if(c(a)){if(!c(a.properties))throw new Ie("crs.properties is undefined.");const u=a.properties;if("name"===a.type){if(l=GM[u.name],!c(l))throw new Ie(`Unknown crs name: ${u.name}`)}else if("link"===a.type){let d=Nq[u.href];if(c(d)||(d=Mq[u.type]),!c(d))throw new Ie(`Unable to resolve crs link: ${JSON.stringify(u)}`);l=d(u)}else{if("EPSG"!==a.type)throw new Ie(`Unknown crs type: ${a.type}`);if(l=GM[`EPSG:${u.code}`],!c(l))throw new Ie(`Unknown crs EPSG code: ${u.code}`)}}return Promise.resolve(l).then(function(u){return o&&e._entityCollection.removeAll(),null!==u&&s(e,t,t,u,n),Promise.all(e._promises).then(function(){return e._promises.length=0,og.setLoading(e,!1),e})})}(e,a,n,s,i)}).catch(function(a){throw og.setLoading(e,!1),e._error.raiseEvent(e,a),a})}im.load=function(e,t){return(new im).load(e,t)},Object.defineProperties(im,{markerSize:{get:function(){return jM},set:function(e){jM=e}},markerSymbol:{get:function(){return WM},set:function(e){WM=e}},markerColor:{get:function(){return qM},set:function(e){qM=e}},stroke:{get:function(){return YM},set:function(e){YM=e}},strokeWidth:{get:function(){return XM},set:function(e){XM=e}},fill:{get:function(){return ZM},set:function(e){ZM=e}},clampToGround:{get:function(){return $M},set:function(e){$M=e}},crsNames:{get:function(){return GM}},crsLinkHrefs:{get:function(){return Nq}},crsLinkTypes:{get:function(){return Mq}}}),Object.defineProperties(im.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},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){if(!c(e))throw new E("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),im.prototype.load=function(e,t){return Kq(this,e,t,!0)},im.prototype.process=function(e,t){return Kq(this,e,t,!1)},im.prototype.update=function(e){return!0};const Qq=im,om=Object.freeze({UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2}),$s=Object.freeze({TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2});let QM;QM=typeof performance<"u"&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()};const wr=QM;function JM(e,t,n){this.heading=g(e,0),this.pitch=g(t,0),this.range=g(n,0)}JM.clone=function(e,t){if(c(e))return c(t)||(t=new JM),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};const Hx=JM;function zMe(e){return void 0===e}function ql(e){return"boolean"==typeof e}function Fo(e,t){for(var n=e.length-1;n>=0;n--)e[n]===t&&e.splice(n,1)}function lg(e,t){for(var n=e.length-1;n>=0;n--)!0===t(e[n])&&e.splice(n,1)}function Gx(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var eb=/[A-Za-z]/,Ia=/[\d]/,qu=/\s/,e2=/['"]/,GMe=/[\x00-\x1F\x7F]/,Jq=/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,qMe=Jq+/\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+/\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,e7=/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,t7=(new RegExp("[".concat(Jq+e7,"]")),qMe+e7),ug=new RegExp("[".concat(t7,"]")),n7=function(){function e(t){void 0===t&&(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){return this.getAttrs()[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 r,n=this.getClass(),i=n?n.split(qu):[],o=t.split(qu);r=o.shift();)-1===i.indexOf(r)&&i.push(r);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var r,n=this.getClass(),i=n?n.split(qu):[],o=t.split(qu);i.length&&(r=o.shift());){var s=i.indexOf(r);-1!==s&&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-1!==(" "+this.getClass()+" ").indexOf(" "+t+" ")},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["<",t,n=n?" "+n:"",">",this.getInnerHtml(),"</",t,">"].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}(),$Me=function(){function e(t){void 0===t&&(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 n7({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<t.getAnchorText().length&&(n.title=t.getAnchorHref()),n},e.prototype.createCssClass=function(t){var n=this.className;if(n){for(var i=[n],o=t.getCssClassSuffixes(),r=0,s=o.length;r<s;r++)i.push(n+"-"+o[r]);return i.join(" ")}return""},e.prototype.processAnchorText=function(t){return this.doTruncate(t)},e.prototype.doTruncate=function(t){var n=this.truncate;if(!n||!n.length)return t;var i=n.length,o=n.location;return"smart"===o?function YMe(e,t,n){var i,o;null==n?(n="…",o=3,i=8):(o=n.length,i=n.length);var s=function(C){var w="";return C.scheme&&C.host&&(w+=C.scheme+"://"),C.host&&(w+=C.host),C.path&&(w+="/"+C.path),C.query&&(w+="?"+C.query),C.fragment&&(w+="#"+C.fragment),w},a=function(C,w){var v=w/2,D=Math.ceil(v),P=-1*Math.floor(v),N="";return P<0&&(N=C.substr(P)),C.substr(0,D)+n+N};if(e.length<=t)return e;var w,v,D,l=t-o,u=(w={},(D=(v=e).match(/^([a-z]+):\/\//i))&&(w.scheme=D[1],v=v.substr(D[0].length)),(D=v.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(w.host=D[1],v=v.substr(D[0].length)),(D=v.match(/^\/(.*?)(?=(\?|#|$))/i))&&(w.path=D[1],v=v.substr(D[0].length)),(D=v.match(/^\?(.*?)(?=(#|$))/i))&&(w.query=D[1],v=v.substr(D[0].length)),(D=v.match(/^#(.*?)$/i))&&(w.fragment=D[1]),w);if(u.query){var d=u.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);d&&(u.query=u.query.substr(0,d[1].length),e=s(u))}if(e.length<=t||(u.host&&(u.host=u.host.replace(/^www\./,""),e=s(u)),e.length<=t))return e;var h="";if(u.host&&(h+=u.host),h.length>=l)return u.host.length==t?(u.host.substr(0,t-o)+n).substr(0,l+i):a(h,l).substr(0,l+i);var m="";if(u.path&&(m+="/"+u.path),u.query&&(m+="?"+u.query),m){if((h+m).length>=l)return(h+m).length==t?(h+m).substr(0,t):(h+a(m,l-h.length)).substr(0,l+i);h+=m}if(u.fragment){var p="#"+u.fragment;if((h+p).length>=l)return(h+p).length==t?(h+p).substr(0,t):(h+a(p,l-h.length)).substr(0,l+i);h+=p}if(u.scheme&&u.host){var A=u.scheme+"://";if((h+A).length<l)return(A+h).substr(0,t)}if(h.length<=t)return h;var x="";return l>0&&(x=h.substr(-1*Math.floor(l/2))),(h.substr(0,Math.ceil(l/2))+n+x).substr(0,l+i)}(t,i):"middle"===o?function XMe(e,t,n){if(e.length<=t)return e;var i,o;null==n?(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)}(t,i):function ZMe(e,t,n){return function HMe(e,t,n){var i;return e.length>t&&(null==n?(n="…",i=3):i=n.length,e=e.substring(0,t-i)+n),e}(e,t,n)}(t,i)},e}(),jr=st(3449),jx=function(){function e(t){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(t){this.offset=t},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.type]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),QMe=new RegExp("^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|verm\xf6gensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|verm\xf6gensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|\u043a\u0430\u0442\u043e\u043b\u0438\u043a|\u0627\u062a\u0635\u0627\u0644\u0627\u062a|\u0627\u0644\u0628\u062d\u0631\u064a\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0639\u0644\u064a\u0627\u0646|\u067e\u0627\u06a9\u0633\u062a\u0627\u0646|\u0643\u0627\u062b\u0648\u0644\u064a\u0643|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|\u043c\u043e\u0441\u043a\u0432\u0430|\u043e\u043d\u043b\u0430\u0439\u043d|\u0627\u0628\u0648\u0638\u0628\u064a|\u0627\u0631\u0627\u0645\u0643\u0648|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0641\u0644\u0633\u0637\u064a\u0646|\u0645\u0644\u064a\u0633\u064a\u0627|\u092d\u093e\u0930\u0924\u092e\u094d|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|\u05d9\u05e9\u05e8\u05d0\u05dc|\u0627\u06cc\u0631\u0627\u0646|\u0628\u0627\u0632\u0627\u0631|\u0628\u06be\u0627\u0631\u062a|\u0633\u0648\u062f\u0627\u0646|\u0633\u0648\u0631\u064a\u0629|\u0647\u0645\u0631\u0627\u0647|\u092d\u093e\u0930\u094b\u0924|\u0938\u0902\u0917\u0920\u0928|\u09ac\u09be\u0982\u09b2\u09be|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0d2d\u0d3e\u0d30\u0d24\u0d02|\u5609\u91cc\u5927\u9152\u5e97|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|\u0434\u0435\u0442\u0438|\u0441\u0430\u0439\u0442|\u0628\u0627\u0631\u062a|\u0628\u064a\u062a\u0643|\u0680\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0634\u0628\u0643\u0629|\u0639\u0631\u0627\u0642|\u0639\u0645\u0627\u0646|\u0645\u0648\u0642\u0639|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u09ad\u09be\u09f0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b2d\u0b3e\u0b30\u0b24|\u0cad\u0cbe\u0cb0\u0ca4|\u0dbd\u0d82\u0d9a\u0dcf|\u30a2\u30de\u30be\u30f3|\u30b0\u30fc\u30b0\u30eb|\u30af\u30e9\u30a6\u30c9|\u30dd\u30a4\u30f3\u30c8|\u7ec4\u7ec7\u673a\u6784|\u96fb\u8a0a\u76c8\u79d1|\u9999\u683c\u91cc\u62c9|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|\u0431\u0435\u043b|\u043a\u043e\u043c|\u049b\u0430\u0437|\u043c\u043a\u0434|\u043c\u043e\u043d|\u043e\u0440\u0433|\u0440\u0443\u0441|\u0441\u0440\u0431|\u0443\u043a\u0440|\u0570\u0561\u0575|\u05e7\u05d5\u05dd|\u0639\u0631\u0628|\u0642\u0637\u0631|\u0643\u0648\u0645|\u0645\u0635\u0631|\u0915\u0949\u092e|\u0928\u0947\u091f|\u0e04\u0e2d\u0e21|\u0e44\u0e17\u0e22|\u0ea5\u0eb2\u0ea7|\u30b9\u30c8\u30a2|\u30bb\u30fc\u30eb|\u307f\u3093\u306a|\u4e2d\u6587\u7f51|\u4e9a\u9a6c\u900a|\u5929\u4e3b\u6559|\u6211\u7231\u4f60|\u65b0\u52a0\u5761|\u6de1\u9a6c\u9521|\u8bfa\u57fa\u4e9a|\u98de\u5229\u6d66|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|\u03b5\u03bb|\u03b5\u03c5|\u0431\u0433|\u0435\u044e|\u0440\u0444|\u10d2\u10d4|\ub2f7\ub137|\ub2f7\ucef4|\uc0bc\uc131|\ud55c\uad6d|\u30b3\u30e0|\u4e16\u754c|\u4e2d\u4fe1|\u4e2d\u56fd|\u4e2d\u570b|\u4f01\u4e1a|\u4f5b\u5c71|\u4fe1\u606f|\u5065\u5eb7|\u516b\u5366|\u516c\u53f8|\u516c\u76ca|\u53f0\u6e7e|\u53f0\u7063|\u5546\u57ce|\u5546\u5e97|\u5546\u6807|\u5609\u91cc|\u5728\u7ebf|\u5927\u62ff|\u5a31\u4e50|\u5bb6\u96fb|\u5e7f\u4e1c|\u5fae\u535a|\u6148\u5584|\u624b\u673a|\u62db\u8058|\u653f\u52a1|\u653f\u5e9c|\u65b0\u95fb|\u65f6\u5c1a|\u66f8\u7c4d|\u673a\u6784|\u6e38\u620f|\u6fb3\u9580|\u70b9\u770b|\u79fb\u52a8|\u7f51\u5740|\u7f51\u5e97|\u7f51\u7ad9|\u7f51\u7edc|\u8054\u901a|\u8c37\u6b4c|\u8d2d\u7269|\u901a\u8ca9|\u96c6\u56e2|\u98df\u54c1|\u9910\u5385|\u9999\u6e2f)$"),JMe=/[\/?#]/,e2e=/[-+&@#/%=~_()|'$*\[\]{}\u2713]/,i7=/[?!:,.;^]/,o7=/https?:\/\//i,t2e=new RegExp("^"+o7.source,"i"),n2e=new RegExp(i7.source+"$"),i2e=/^(javascript|vbscript):/i,o2e=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,r2e=/^(?:\/\/)?([^/#?:]+)/;function t2(e){return eb.test(e)}function r7(e){return eb.test(e)||Ia.test(e)||"+"===e||"-"===e||"."===e}function rm(e){return ug.test(e)}function n2(e){return"_"===e||rm(e)}function s7(e){return ug.test(e)||e2e.test(e)||i7.test(e)}function i2(e){return JMe.test(e)}function a7(e){return QMe.test(e.toLowerCase())}var c2e=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,l2e=/[:/?#]/,d2e=/^(https?:\/\/)?(www\.)?/i,f2e=/^\/\//,h2e=function(e){function t(n){var i=e.call(this,n)||this;return i.type="url",i.url="",i.urlMatchType="scheme",i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.protocolPrepended=!1,i.urlMatchType=n.urlMatchType,i.url=n.url,i.protocolRelativeMatch=n.protocolRelativeMatch,i.stripPrefix=n.stripPrefix,i.stripTrailingSlash=n.stripTrailingSlash,i.decodePercentEncoding=n.decodePercentEncoding,i}return(0,jr.ZT)(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var n=this.url;return!this.protocolRelativeMatch&&"scheme"!==this.urlMatchType&&!this.protocolPrepended&&(n=this.url="http://"+n,this.protocolPrepended=!0),n},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=function _2e(e){return e.replace(f2e,"")}(n)),this.stripPrefix.scheme&&(n=function p2e(e){return e.replace(t2e,"")}(n)),this.stripPrefix.www&&(n=function m2e(e){return e.replace(d2e,"$1")}(n)),this.stripTrailingSlash&&(n=function g2e(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e}(n)),this.decodePercentEncoding&&(n=function y2e(e){var t=e.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(t)}catch{return t}}(n)),n},t}(jx),b2e=/^mailto:/i,A2e=new RegExp("[".concat(t7,"!#$%&'*+/=?^_`{|}~-]"));function o2(e){return A2e.test(e)}var C2e=function(e){function t(n){var i=e.call(this,n)||this;return i.type="email",i.email="",i.email=n.email,i}return(0,jr.ZT)(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(jx);function c7(e){return"_"===e||ug.test(e)}var w2e=["twitter","facebook","instagram","tiktok"],S2e=function(e){function t(n){var i=e.call(this,n)||this;return i.type="hashtag",i.serviceName="twitter",i.hashtag="",i.serviceName=n.serviceName,i.hashtag=n.hashtag,i}return(0,jr.ZT)(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var n=this.serviceName,i=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+i;case"facebook":return"https://www.facebook.com/hashtag/"+i;case"instagram":return"https://instagram.com/explore/tags/"+i;case"tiktok":return"https://www.tiktok.com/tag/"+i;default:throw Gx(n),new Error("Invalid hashtag service: ".concat(n))}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t}(jx),v2e={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/},D2e=/[-\w.]/;function l7(e){return D2e.test(e)}var P2e=["twitter","instagram","soundcloud","tiktok"],O2e=function(e){function t(n){var i=e.call(this,n)||this;return i.type="mention",i.serviceName="twitter",i.mention="",i.mention=n.mention,i.serviceName=n.serviceName,i}return(0,jr.ZT)(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t}(jx),L2e=/[-. ]/,R2e=/[-. ()]/,N2e=/[,;]/,B2e=new RegExp("^".concat(/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/.source,"|").concat(/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source,"$"));function u7(e){return L2e.test(e)}function r2(e){return N2e.test(e)}var U2e=function(e){function t(n){var i=e.call(this,n)||this;return i.type="phone",i.number="",i.plusSign=!1,i.number=n.number,i.plusSign=n.plusSign,i}return(0,jr.ZT)(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(jx);var V2e=/[\(\{\[]/,d7=/[\)\}\]]/,f7={")":"(","}":"{","]":"["};function s2(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"scheme"}}function a2(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"tld"}}function c2(e,t){return{type:"phone",startIdx:e,state:t,acceptStateReached:!1}}var Qd=function e(t){void 0===t&&(t={}),this.idx=void 0!==t.idx?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing},X2e=function(){function e(t){void 0===t&&(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=function $2e(e){return null==e&&(e=!0),ql(e)?{schemeMatches:e,tldMatches:e,ipV4Matches:e}:{schemeMatches:!ql(e.schemeMatches)||e.schemeMatches,tldMatches:!ql(e.tldMatches)||e.tldMatches,ipV4Matches:!ql(e.ipV4Matches)||e.ipV4Matches}}(t.urls),this.email=ql(t.email)?t.email:this.email,this.phone=ql(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=ql(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=function K2e(e){return null==e&&(e=!0),ql(e)?{scheme:e,www:e}:{scheme:!ql(e.scheme)||e.scheme,www:!ql(e.www)||e.www}}(t.stripPrefix),this.stripTrailingSlash=ql(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=ql(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(!1!==n&&-1===P2e.indexOf(n))throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(!1!==i&&-1===w2e.indexOf(i))throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=function Q2e(e){return"number"==typeof e?{length:e,location:"end"}:function VMe(e,t){for(var n in t)t.hasOwnProperty(n)&&zMe(e[n])&&(e[n]=t[n]);return e}(e||{},{length:Number.POSITIVE_INFINITY,location:"end"})}(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){return new e(n).link(t)},e.parse=function(t,n){return new e(n).parse(t)},e.prototype.parse=function(t){var n=this,i=["a","style","script"],o=0,r=[];return function Y2e(e,t){for(var n=t.onOpenTag,i=t.onCloseTag,o=t.onText,r=t.onComment,s=t.onDoctype,a=new Qd,l=0,u=e.length,d=0,h=0,m=a;l<u;){var _=e.charAt(l);switch(d){case 0:"<"===_&&V();break;case 1:"!"===(Q=_)?d=13:"/"===Q?(d=2,m=new Qd((0,jr.pi)((0,jr.pi)({},m),{isClosing:!0}))):"<"===Q?V():eb.test(Q)?(d=3,m=new Qd((0,jr.pi)((0,jr.pi)({},m),{isOpening:!0}))):(d=0,m=a);break;case 2:x(_);break;case 3:A(_);break;case 4:C(_);break;case 5:w(_);break;case 6:v(_);break;case 7:D(_);break;case 8:P(_);break;case 9:N(_);break;case 10:R(_);break;case 11:B(_);break;case 12:F(_);break;case 13:"--"===e.substr(l,2)?(l+=2,m=new Qd((0,jr.pi)((0,jr.pi)({},m),{type:"comment"})),d=14):"DOCTYPE"===e.substr(l,7).toUpperCase()?(l+=7,m=new Qd((0,jr.pi)((0,jr.pi)({},m),{type:"doctype"})),d=20):q();break;case 14:I(_);break;case 15:L(_);break;case 16:M(_);break;case 17:U(_);break;case 18:z(_);break;case 19:j(_);break;case 20:W(_);break;default:Gx(d)}l++}var Q;function A(Q){qu.test(Q)?(m=new Qd((0,jr.pi)((0,jr.pi)({},m),{name:ie()})),d=4):"<"===Q?V():"/"===Q?(m=new Qd((0,jr.pi)((0,jr.pi)({},m),{name:ie()})),d=12):">"===Q?(m=new Qd((0,jr.pi)((0,jr.pi)({},m),{name:ie()})),$()):!eb.test(Q)&&!Ia.test(Q)&&":"!==Q&&q()}function x(Q){">"===Q?q():eb.test(Q)?d=3:q()}function C(Q){qu.test(Q)||("/"===Q?d=12:">"===Q?$():"<"===Q?V():"="===Q||e2.test(Q)||GMe.test(Q)?q():d=5)}function w(Q){qu.test(Q)?d=6:"/"===Q?d=12:"="===Q?d=7:">"===Q?$():"<"===Q?V():e2.test(Q)&&q()}function v(Q){qu.test(Q)||("/"===Q?d=12:"="===Q?d=7:">"===Q?$():"<"===Q?V():e2.test(Q)?q():d=5)}function D(Q){qu.test(Q)||('"'===Q?d=8:"'"===Q?d=9:/[>=`]/.test(Q)?q():"<"===Q?V():d=10)}function P(Q){'"'===Q&&(d=11)}function N(Q){"'"===Q&&(d=11)}function R(Q){qu.test(Q)?d=4:">"===Q?$():"<"===Q&&V()}function B(Q){qu.test(Q)?d=4:"/"===Q?d=12:">"===Q?$():"<"===Q?V():(d=4,function Y(){l--}())}function F(Q){">"===Q?(m=new Qd((0,jr.pi)((0,jr.pi)({},m),{isClosing:!0})),$()):d=4}function I(Q){"-"===Q?d=15:">"===Q?q():d=16}function L(Q){"-"===Q?d=18:">"===Q?q():d=16}function M(Q){"-"===Q&&(d=17)}function U(Q){d="-"===Q?18:16}function z(Q){">"===Q?$():"!"===Q?d=19:"-"===Q||(d=16)}function j(Q){"-"===Q?d=17:">"===Q?$():d=16}function W(Q){">"===Q?$():"<"===Q&&V()}function q(){d=0,m=a}function V(){d=1,m=new Qd({idx:l})}function $(){var Q=e.slice(h,m.idx);Q&&o(Q,h),"comment"===m.type?r(m.idx):"doctype"===m.type?s(m.idx):(m.isOpening&&n(m.name,m.idx),m.isClosing&&i(m.name,m.idx)),q(),h=l+1}function ie(){return e.slice(m.idx+(m.isClosing?2:1),l).toLowerCase()}h<l&&function Z(){var Q=e.slice(h,l);o(Q,h),h=l+1}()}(t,{onOpenTag:function(s){i.indexOf(s)>=0&&o++},onText:function(s,a){if(0===o){var u=s.split(/( | |<|<|>|>|"|"|')/gi),d=a;u.forEach(function(h,m){if(m%2==0){var _=n.parseText(h,d);r.push.apply(r,_)}d+=h.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)},e.prototype.compactMatches=function(t){t.sort(function(l,u){return l.getOffset()-u.getOffset()});for(var n=0;n<t.length-1;){var i=t[n],o=i.getOffset(),r=i.getMatchedText().length,s=o+r;if(n+1<t.length){if(t[n+1].getOffset()===o){var a=t[n+1].getMatchedText().length>r?n:n+1;t.splice(a,1);continue}if(t[n+1].getOffset()<s){t.splice(n+1,1);continue}}n++}return t},e.prototype.removeUnwantedMatches=function(t){return this.hashtag||lg(t,function(n){return"hashtag"===n.getType()}),this.email||lg(t,function(n){return"email"===n.getType()}),this.phone||lg(t,function(n){return"phone"===n.getType()}),this.mention||lg(t,function(n){return"mention"===n.getType()}),this.urls.schemeMatches||lg(t,function(n){return"url"===n.getType()&&"scheme"===n.getUrlMatchType()}),this.urls.tldMatches||lg(t,function(n){return"url"===n.getType()&&"tld"===n.getUrlMatchType()}),this.urls.ipV4Matches||lg(t,function(n){return"url"===n.getType()&&"ipV4"===n.getUrlMatchType()}),t},e.prototype.parseText=function(t,n){void 0===n&&(n=0),n=n||0;for(var i=function z2e(e,t){for(var n=t.tagBuilder,i=t.stripPrefix,o=t.stripTrailingSlash,r=t.decodePercentEncoding,s=t.hashtagServiceName,a=t.mentionServiceName,l=[],u=e.length,d=[],h=0;h<u;h++){var m=e.charAt(h);if(0===d.length)A(m);else for(var _=d.length-1;_>=0;_--){var p=d[_];switch(p.state){case 11:he=p,"/"===m?he.state=12:Fo(d,he);break;case 12:N(p,m);break;case 0:x(p,m);break;case 1:C(p,m);break;case 2:w(p,m);break;case 3:v(p,m);break;case 4:D(p,m);break;case 5:R(p,m);break;case 6:B(p,m);break;case 7:F(p,m);break;case 13:S(p,m);break;case 14:I(p,m);break;case 8:L(p,m);break;case 9:M(p,m);break;case 10:U(p,m);break;case 15:z(p,m);break;case 16:j(p,m);break;case 17:W(p,m);break;case 18:q(p,m);break;case 19:V(p,m);break;case 20:$(p,m);break;case 21:Z(p,m);break;case 22:ie(p,m);break;case 23:Y(p,m);break;case 24:Q(p,m);break;case 25:K(p,m);break;case 26:me(p,m);break;case 27:we(p,m);break;case 28:le(p,m);break;case 29:Ae(p,m);break;case 30:xe(p,m);break;case 31:De(p,m);break;case 32:$e(p,m);break;case 33:ot(p,m);break;case 34:kt(p,m);break;case 35:sn(p,m);break;case 36:wn(p,m);break;case 37:qe(p,m);break;case 38:Lt(p,m);break;case 39:On(p,m);break;case 40:ii(p,m);break;case 41:an(p,m);break;default:Gx(p.state)}}}for(var he,y=d.length-1;y>=0;y--)d.forEach(function(he){return en(he)});return l;function A(he){if("#"===he)d.push(function W2e(e,t){return{type:"hashtag",startIdx:e,state:t,acceptStateReached:!1}}(h,28));else if("@"===he)d.push(function q2e(e,t){return{type:"mention",startIdx:e,state:t,acceptStateReached:!1}}(h,30));else if("/"===he)d.push(a2(h,11));else if("+"===he)d.push(c2(h,37));else if("("===he)d.push(c2(h,32));else{if(Ia.test(he)&&(d.push(c2(h,38)),d.push(function G2e(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"ipV4",octetsEncountered:1}}(h,13))),function T2e(e){return ug.test(e)}(he)){var Te="m"===he.toLowerCase()?15:22;d.push(function j2e(e,t){return{type:"email",startIdx:e,state:t,acceptStateReached:!1}}(h,Te))}t2(he)&&d.push(s2(h,0)),ug.test(he)&&d.push(a2(h,5))}}function x(he,Te){":"===Te?he.state=2:"-"===Te?he.state=1:r7(Te)||Fo(d,he)}function C(he,Te){"-"===Te||("/"===Te?(Fo(d,he),d.push(a2(h,11))):r7(Te)?he.state=0:Fo(d,he))}function w(he,Te){"/"===Te?he.state=3:"."===Te?Fo(d,he):rm(Te)?(he.state=5,t2(Te)&&d.push(s2(h,0))):Fo(d,he)}function v(he,Te){"/"===Te?he.state=4:s7(Te)?(he.state=10,he.acceptStateReached=!0):en(he)}function D(he,Te){"/"===Te?he.state=10:rm(Te)?(he.state=5,he.acceptStateReached=!0):Fo(d,he)}function N(he,Te){rm(Te)?he.state=5:Fo(d,he)}function R(he,Te){"."===Te?he.state=7:"-"===Te?he.state=6:":"===Te?he.state=8:i2(Te)?he.state=10:n2(Te)||en(he)}function B(he,Te){"-"===Te||("."===Te?en(he):rm(Te)?he.state=5:en(he))}function F(he,Te){"."===Te?en(he):rm(Te)?(he.state=5,he.acceptStateReached=!0):en(he)}function S(he,Te){"."===Te?he.state=14:":"===Te?he.state=8:Ia.test(Te)||(i2(Te)?he.state=10:ug.test(Te)?Fo(d,he):en(he))}function I(he,Te){Ia.test(Te)?(he.octetsEncountered++,4===he.octetsEncountered&&(he.acceptStateReached=!0),he.state=13):en(he)}function L(he,Te){Ia.test(Te)?he.state=9:en(he)}function M(he,Te){Ia.test(Te)||(i2(Te)?he.state=10:en(he))}function U(he,Te){s7(Te)||en(he)}function z(he,Te){"a"===Te.toLowerCase()?he.state=16:ie(he,Te)}function j(he,Te){"i"===Te.toLowerCase()?he.state=17:ie(he,Te)}function W(he,Te){"l"===Te.toLowerCase()?he.state=18:ie(he,Te)}function q(he,Te){"t"===Te.toLowerCase()?he.state=19:ie(he,Te)}function V(he,Te){"o"===Te.toLowerCase()?he.state=20:ie(he,Te)}function $(he,Te){":"===Te.toLowerCase()?he.state=21:ie(he,Te)}function Z(he,Te){o2(Te)?he.state=22:Fo(d,he)}function ie(he,Te){"."===Te?he.state=23:"@"===Te?he.state=24:o2(Te)?he.state=22:Fo(d,he)}function Y(he,Te){"."===Te||"@"===Te?Fo(d,he):o2(Te)?he.state=22:Fo(d,he)}function Q(he,Te){rm(Te)?he.state=25:Fo(d,he)}function K(he,Te){"."===Te?he.state=27:"-"===Te?he.state=26:n2(Te)||en(he)}function me(he,Te){"-"===Te||"."===Te?en(he):n2(Te)?he.state=25:en(he)}function we(he,Te){"."===Te||"-"===Te?en(he):rm(Te)?(he.state=25,he.acceptStateReached=!0):en(he)}function le(he,Te){c7(Te)?(he.state=29,he.acceptStateReached=!0):Fo(d,he)}function Ae(he,Te){c7(Te)||en(he)}function xe(he,Te){l7(Te)?(he.state=31,he.acceptStateReached=!0):Fo(d,he)}function De(he,Te){l7(Te)||(ug.test(Te)?Fo(d,he):en(he))}function qe(he,Te){Ia.test(Te)?he.state=38:(Fo(d,he),A(Te))}function $e(he,Te){Ia.test(Te)?he.state=33:Fo(d,he),A(Te)}function ot(he,Te){Ia.test(Te)?he.state=34:Fo(d,he)}function kt(he,Te){Ia.test(Te)?he.state=35:Fo(d,he)}function sn(he,Te){")"===Te?he.state=36:Fo(d,he)}function wn(he,Te){Ia.test(Te)?he.state=38:u7(Te)?he.state=39:Fo(d,he)}function Lt(he,Te){he.acceptStateReached=!0,r2(Te)?he.state=40:"#"===Te?he.state=41:Ia.test(Te)||("("===Te?he.state=32:u7(Te)?he.state=39:(en(he),t2(Te)&&d.push(s2(h,0))))}function On(he,Te){Ia.test(Te)?he.state=38:"("===Te?he.state=32:(en(he),A(Te))}function ii(he,Te){r2(Te)||("#"===Te?he.state=41:Ia.test(Te)?he.state=38:en(he))}function an(he,Te){r2(Te)?he.state=40:Ia.test(Te)?Fo(d,he):en(he)}function en(he){if(Fo(d,he),he.acceptStateReached){var Te=he.startIdx,dn=e.slice(he.startIdx,h);if(dn=function H2e(e){for(var t={"(":0,"{":0,"[":0},n=0;n<e.length;n++){var i=e.charAt(n);V2e.test(i)?t[i]++:d7.test(i)&&t[f7[i]]--}for(var r,o=e.length-1;o>=0;)if(r=e.charAt(o),d7.test(r)){var s=f7[r];if(!(t[s]<0))break;t[s]++,o--}else{if(!n2e.test(r))break;o--}return e.slice(0,o+1)}(dn),"url"===he.type){if("@"===e.charAt(he.startIdx-1))return;var Wi=he.matchType;if("scheme"===Wi){var Co=o7.exec(dn);if(Co&&(Te+=Co.index,dn=dn.slice(Co.index)),!function s2e(e){if(i2e.test(e))return!1;var t=e.match(o2e);if(!t)return!1;var i=t[2];return!!t[1]||!(-1===i.indexOf(".")||!eb.test(i))}(dn))return}else if("tld"===Wi){if(!function a2e(e){var t=e.match(r2e);if(!t)return!1;var i=t[0].split(".");return!(i.length<2||!a7(i[i.length-1]))}(dn))return}else if("ipV4"===Wi){if(!function u2e(e){var t=e.split(l2e,1)[0];return c2e.test(t)}(dn))return}else Gx(Wi);l.push(new h2e({tagBuilder:n,matchedText:dn,offset:Te,urlMatchType:Wi,url:dn,protocolRelativeMatch:"//"===dn.slice(0,2),stripPrefix:i,stripTrailingSlash:o,decodePercentEncoding:r}))}else if("email"===he.type)(function x2e(e){return a7(e.split(".").pop()||"")})(dn)&&l.push(new C2e({tagBuilder:n,matchedText:dn,offset:Te,email:dn.replace(b2e,"")}));else if("hashtag"===he.type)(function E2e(e){return e.length<=140})(dn)&&l.push(new S2e({tagBuilder:n,matchedText:dn,offset:Te,serviceName:s,hashtag:dn.slice(1)}));else if("mention"===he.type)(function I2e(e,t){return v2e[t].test(e)})(dn,a)&&l.push(new O2e({tagBuilder:n,matchedText:dn,offset:Te,serviceName:a,mention:dn.slice(1)}));else if("phone"===he.type){if(function k2e(e){return("+"===e.charAt(0)||R2e.test(e))&&B2e.test(e)}(dn=dn.replace(/ +$/g,""))){var bl=dn.replace(/[^0-9,;#]/g,"");l.push(new U2e({tagBuilder:n,matchedText:dn,offset:Te,number:bl,plusSign:"+"===dn.charAt(0)}))}}else Gx(he)}}}(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),o=0,r=i.length;o<r;o++)i[o].setOffset(n+i[o].getOffset());return i},e.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"<").replace(/>/g,">"));for(var n=this.parse(t),i=[],o=0,r=0,s=n.length;r<s;r++){var a=n[r];i.push(t.substring(o,a.getOffset())),i.push(this.createMatchReturnVal(a)),o=a.getOffset()+a.getMatchedText().length}return i.push(t.substring(o)),i.join("")},e.prototype.createMatchReturnVal=function(t){var n;return this.replaceFn&&(n=this.replaceFn.call(this.context,t)),"string"==typeof n?n:!1===n?t.getMatchedText():n instanceof n7?n.toAnchorString():t.buildTag().toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new $Me({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version="4.0.0",e}();const J2e=X2e,Wx=15,h7=573;function Xv(e){return Zv(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Zv(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Zv(n):n),[])}const b7=[0,1,2,3].concat(...Xv([[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 Jo(){const e=this;function n(o,r){let s=0;do{s|=1&o,o>>>=1,s<<=1}while(--r>0);return s>>>1}e.build_tree=function(o){const r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems;let l,u,h,d=-1;for(o.heap_len=0,o.heap_max=h7,l=0;l<a;l++)0!==r[2*l]?(o.heap[++o.heap_len]=d=l,o.depth[l]=0):r[2*l+1]=0;for(;o.heap_len<2;)h=o.heap[++o.heap_len]=d<2?++d:0,r[2*h]=1,o.depth[h]=0,o.opt_len--,s&&(o.static_len-=s[2*h+1]);for(e.max_code=d,l=Math.floor(o.heap_len/2);l>=1;l--)o.pqdownheap(r,l);h=a;do{l=o.heap[1],o.heap[1]=o.heap[o.heap_len--],o.pqdownheap(r,1),u=o.heap[1],o.heap[--o.heap_max]=l,o.heap[--o.heap_max]=u,r[2*h]=r[2*l]+r[2*u],o.depth[h]=Math.max(o.depth[l],o.depth[u])+1,r[2*l+1]=r[2*u+1]=h,o.heap[1]=h++,o.pqdownheap(r,1)}while(o.heap_len>=2);o.heap[--o.heap_max]=o.heap[1],function t(o){const r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,u=e.stat_desc.max_length;let d,h,m,_,p,y,A=0;for(_=0;_<=Wx;_++)o.bl_count[_]=0;for(r[2*o.heap[o.heap_max]+1]=0,d=o.heap_max+1;d<h7;d++)h=o.heap[d],_=r[2*r[2*h+1]+1]+1,_>u&&(_=u,A++),r[2*h+1]=_,!(h>e.max_code)&&(o.bl_count[_]++,p=0,h>=l&&(p=a[h-l]),y=r[2*h],o.opt_len+=y*(_+p),s&&(o.static_len+=y*(s[2*h+1]+p)));if(0!==A){do{for(_=u-1;0===o.bl_count[_];)_--;o.bl_count[_]--,o.bl_count[_+1]+=2,o.bl_count[u]--,A-=2}while(A>0);for(_=u;0!==_;_--)for(h=o.bl_count[_];0!==h;)m=o.heap[--d],!(m>e.max_code)&&(r[2*m+1]!=_&&(o.opt_len+=(_-r[2*m+1])*r[2*m],r[2*m+1]=_),h--)}}(o),function i(o,r,s){const a=[];let u,d,h,l=0;for(u=1;u<=Wx;u++)a[u]=l=l+s[u-1]<<1;for(d=0;d<=r;d++)h=o[2*d+1],0!==h&&(o[2*d]=n(a[h]++,h))}(r,e.max_code,o.bl_count)}}function Ks(e,t,n,i,o){const r=this;r.static_tree=e,r.extra_bits=t,r.extra_base=n,r.elems=i,r.max_length=o}Jo._length_code=[0,1,2,3,4,5,6,7].concat(...Xv([[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]])),Jo.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],Jo.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],Jo.d_code=function(e){return e<256?b7[e]:b7[256+(e>>>7)]},Jo.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],Jo.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],Jo.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Jo.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const aFe=Xv([[144,8],[112,9],[24,7],[8,8]]);Ks.static_ltree=Zv([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].map((e,t)=>[e,aFe[t]]));const lFe=Xv([[30,5]]);function Jd(e,t,n,i,o){const r=this;r.good_length=e,r.max_lazy=t,r.nice_length=n,r.max_chain=i,r.func=o}Ks.static_dtree=Zv([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].map((e,t)=>[e,lFe[t]])),Ks.static_l_desc=new Ks(Ks.static_ltree,Jo.extra_lbits,257,286,Wx),Ks.static_d_desc=new Ks(Ks.static_dtree,Jo.extra_dbits,0,30,Wx),Ks.static_bl_desc=new Ks(null,Jo.extra_blbits,0,19,7);const Zu=[new Jd(0,0,0,0,0),new Jd(4,4,8,4,1),new Jd(4,5,16,8,1),new Jd(4,6,32,32,1),new Jd(4,4,16,16,2),new Jd(8,16,32,32,2),new Jd(8,16,128,128,2),new Jd(8,32,128,256,2),new Jd(32,128,258,1024,2),new Jd(32,258,258,4096,2)],Kv=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Qc=262;function T7(e,t,n,i){const o=e[2*t],r=e[2*n];return o<r||o==r&&i[t]<=i[n]}function mFe(){const e=this;let t,n,i,o,r,s,a,l,u,d,h,m,_,p,y,A,x,C,w,v,D,P,N,R,B,F,S,I,L,M,U,z,j;const W=new Jo,q=new Jo,V=new Jo;let $,Z,ie,Y,Q,K;function we(){let Qe;for(Qe=0;Qe<286;Qe++)U[2*Qe]=0;for(Qe=0;Qe<30;Qe++)z[2*Qe]=0;for(Qe=0;Qe<19;Qe++)j[2*Qe]=0;U[512]=1,e.opt_len=e.static_len=0,Z=ie=0}function Ae(Qe,dt){let rt,ut=-1,Ut=Qe[1],nn=0,Ln=7,yo=4;0===Ut&&(Ln=138,yo=3),Qe[2*(dt+1)+1]=65535;for(let jo=0;jo<=dt;jo++)rt=Ut,Ut=Qe[2*(jo+1)+1],!(++nn<Ln&&rt==Ut)&&(nn<yo?j[2*rt]+=nn:0!==rt?(rt!=ut&&j[2*rt]++,j[32]++):nn<=10?j[34]++:j[36]++,nn=0,ut=rt,0===Ut?(Ln=138,yo=3):rt==Ut?(Ln=6,yo=3):(Ln=7,yo=4))}function De(Qe){e.pending_buf[e.pending++]=Qe}function qe(Qe){De(255&Qe),De(Qe>>>8&255)}function ot(Qe,dt){let ut;const rt=dt;K>16-rt?(ut=Qe,Q|=ut<<K&65535,qe(Q),Q=ut>>>16-K,K+=rt-16):(Q|=Qe<<K&65535,K+=rt)}function kt(Qe,dt){const ut=2*Qe;ot(65535&dt[ut],65535&dt[ut+1])}function sn(Qe,dt){let ut,Ut,rt=-1,nn=Qe[1],Ln=0,yo=7,jo=4;for(0===nn&&(yo=138,jo=3),ut=0;ut<=dt;ut++)if(Ut=nn,nn=Qe[2*(ut+1)+1],!(++Ln<yo&&Ut==nn)){if(Ln<jo)do{kt(Ut,j)}while(0!=--Ln);else 0!==Ut?(Ut!=rt&&(kt(Ut,j),Ln--),kt(16,j),ot(Ln-3,2)):Ln<=10?(kt(17,j),ot(Ln-3,3)):(kt(18,j),ot(Ln-11,7));Ln=0,rt=Ut,0===nn?(yo=138,jo=3):Ut==nn?(yo=6,jo=3):(yo=7,jo=4)}}function Lt(){16==K?(qe(Q),Q=0,K=0):K>=8&&(De(255&Q),Q>>>=8,K-=8)}function ii(Qe,dt){let ut,rt,Ut;if(e.dist_buf[Z]=Qe,e.lc_buf[Z]=255&dt,Z++,0===Qe?U[2*dt]++:(ie++,Qe--,U[2*(Jo._length_code[dt]+256+1)]++,z[2*Jo.d_code(Qe)]++),!(8191&Z)&&S>2){for(ut=8*Z,rt=D-x,Ut=0;Ut<30;Ut++)ut+=z[2*Ut]*(5+Jo.extra_dbits[Ut]);if(ut>>>=3,ie<Math.floor(Z/2)&&ut<Math.floor(rt/2))return!0}return Z==$-1}function an(Qe,dt){let ut,rt,nn,Ln,Ut=0;if(0!==Z)do{ut=e.dist_buf[Ut],rt=e.lc_buf[Ut],Ut++,0===ut?kt(rt,Qe):(nn=Jo._length_code[rt],kt(nn+256+1,Qe),Ln=Jo.extra_lbits[nn],0!==Ln&&(rt-=Jo.base_length[nn],ot(rt,Ln)),ut--,nn=Jo.d_code(ut),kt(nn,dt),Ln=Jo.extra_dbits[nn],0!==Ln&&(ut-=Jo.base_dist[nn],ot(ut,Ln)))}while(Ut<Z);kt(256,Qe),Y=Qe[513]}function en(){K>8?qe(Q):K>0&&De(255&Q),Q=0,K=0}function Te(Qe,dt,ut){ot(0+(ut?1:0),3),function he(Qe,dt,ut){en(),Y=8,ut&&(qe(dt),qe(~dt)),e.pending_buf.set(l.subarray(Qe,Qe+dt),e.pending),e.pending+=dt}(Qe,dt,!0)}function Dt(Qe){(function dn(Qe,dt,ut){let rt,Ut,nn=0;S>0?(W.build_tree(e),q.build_tree(e),nn=function xe(){let Qe;for(Ae(U,W.max_code),Ae(z,q.max_code),V.build_tree(e),Qe=18;Qe>=3&&0===j[2*Jo.bl_order[Qe]+1];Qe--);return e.opt_len+=3*(Qe+1)+5+5+4,Qe}(),rt=e.opt_len+3+7>>>3,Ut=e.static_len+3+7>>>3,Ut<=rt&&(rt=Ut)):rt=Ut=dt+5,dt+4<=rt&&-1!=Qe?Te(Qe,dt,ut):Ut==rt?(ot(2+(ut?1:0),3),an(Ks.static_ltree,Ks.static_dtree)):(ot(4+(ut?1:0),3),function wn(Qe,dt,ut){let rt;for(ot(Qe-257,5),ot(dt-1,5),ot(ut-4,4),rt=0;rt<ut;rt++)ot(j[2*Jo.bl_order[rt]+1],3);sn(U,Qe-1),sn(z,dt-1)}(W.max_code+1,q.max_code+1,nn+1),an(U,z)),we(),ut&&en()})(x>=0?x:-1,D-x,Qe),x=D,t.flush_pending()}function Wi(){let Qe,dt,ut,rt;do{if(rt=u-N-D,0===rt&&0===D&&0===N)rt=r;else if(-1==rt)rt--;else if(D>=r+r-Qc){l.set(l.subarray(r,r+r),0),P-=r,D-=r,x-=r,Qe=_,ut=Qe;do{dt=65535&h[--ut],h[ut]=dt>=r?dt-r:0}while(0!=--Qe);Qe=r,ut=Qe;do{dt=65535&d[--ut],d[ut]=dt>=r?dt-r:0}while(0!=--Qe);rt+=r}if(0===t.avail_in)return;Qe=t.read_buf(l,D+N,rt),N+=Qe,N>=3&&(m=255&l[D],m=(m<<A^255&l[D+1])&y)}while(N<Qc&&0!==t.avail_in)}function bl(Qe){let rt,Ut,dt=B,ut=D,nn=R;const Ln=D>r-Qc?D-(r-Qc):0;let yo=M;const jo=a,ka=D+258;let Ua=l[ut+nn-1],mr=l[ut+nn];R>=L&&(dt>>=2),yo>N&&(yo=N);do{if(rt=Qe,l[rt+nn]==mr&&l[rt+nn-1]==Ua&&l[rt]==l[ut]&&l[++rt]==l[ut+1]){ut+=2,rt++;do{}while(l[++ut]==l[++rt]&&l[++ut]==l[++rt]&&l[++ut]==l[++rt]&&l[++ut]==l[++rt]&&l[++ut]==l[++rt]&&l[++ut]==l[++rt]&&l[++ut]==l[++rt]&&l[++ut]==l[++rt]&&ut<ka);if(Ut=258-(ka-ut),ut=ka-258,Ut>nn){if(P=Qe,nn=Ut,Ut>=yo)break;Ua=l[ut+nn-1],mr=l[ut+nn]}}}while((Qe=65535&d[Qe&jo])>Ln&&0!=--dt);return nn<=N?nn:N}e.depth=[],e.bl_count=[],e.heap=[],U=[],z=[],j=[],e.pqdownheap=function(Qe,dt){const ut=e.heap,rt=ut[dt];let Ut=dt<<1;for(;Ut<=e.heap_len&&(Ut<e.heap_len&&T7(Qe,ut[Ut+1],ut[Ut],e.depth)&&Ut++,!T7(Qe,rt,ut[Ut],e.depth));)ut[dt]=ut[Ut],dt=Ut,Ut<<=1;ut[dt]=rt},e.deflateInit=function(Qe,dt,ut,rt,Ut,nn){return rt||(rt=8),Ut||(Ut=8),nn||(nn=0),Qe.msg=null,-1==dt&&(dt=6),Ut<1||Ut>9||8!=rt||ut<9||ut>15||dt<0||dt>9||nn<0||nn>2?-2:(Qe.dstate=e,s=ut,r=1<<s,a=r-1,p=Ut+7,_=1<<p,y=_-1,A=Math.floor((p+3-1)/3),l=new Uint8Array(2*r),d=[],h=[],$=1<<Ut+6,e.pending_buf=new Uint8Array(4*$),i=4*$,e.dist_buf=new Uint16Array($),e.lc_buf=new Uint8Array($),S=dt,I=nn,function Ba(Qe){return Qe.total_in=Qe.total_out=0,Qe.msg=null,e.pending=0,e.pending_out=0,n=113,o=0,function le(){W.dyn_tree=U,W.stat_desc=Ks.static_l_desc,q.dyn_tree=z,q.stat_desc=Ks.static_d_desc,V.dyn_tree=j,V.stat_desc=Ks.static_bl_desc,Q=0,K=0,Y=8,we()}(),function me(){u=2*r,h[_-1]=0;for(let Qe=0;Qe<_-1;Qe++)h[Qe]=0;F=Zu[S].max_lazy,L=Zu[S].good_length,M=Zu[S].nice_length,B=Zu[S].max_chain,D=0,x=0,N=0,C=R=2,v=0,m=0}(),0}(Qe))},e.deflateEnd=function(){return 42!=n&&113!=n&&666!=n?-2:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,h=null,d=null,l=null,e.dstate=null,113==n?-3:0)},e.deflateParams=function(Qe,dt,ut){let rt=0;return-1==dt&&(dt=6),dt<0||dt>9||ut<0||ut>2?-2:(Zu[S].func!=Zu[dt].func&&0!==Qe.total_in&&(rt=Qe.deflate(1)),S!=dt&&(S=dt,F=Zu[S].max_lazy,L=Zu[S].good_length,M=Zu[S].nice_length,B=Zu[S].max_chain),I=ut,rt)},e.deflateSetDictionary=function(Qe,dt,ut){let Ut,rt=ut,nn=0;if(!dt||42!=n)return-2;if(rt<3)return 0;for(rt>r-Qc&&(rt=r-Qc,nn=ut-rt),l.set(dt.subarray(nn,nn+rt),0),D=rt,x=rt,m=255&l[0],m=(m<<A^255&l[1])&y,Ut=0;Ut<=rt-3;Ut++)m=(m<<A^255&l[Ut+2])&y,d[Ut&a]=h[m],h[m]=Ut;return 0},e.deflate=function(Qe,dt){let ut,rt,Ut,nn,Ln;if(dt>4||dt<0)return-2;if(!Qe.next_out||!Qe.next_in&&0!==Qe.avail_in||666==n&&4!=dt)return Qe.msg=Kv[4],-2;if(0===Qe.avail_out)return Qe.msg=Kv[7],-5;if(t=Qe,nn=o,o=dt,42==n&&(rt=8+(s-8<<4)<<8,Ut=(S-1&255)>>1,Ut>3&&(Ut=3),rt|=Ut<<6,0!==D&&(rt|=32),rt+=31-rt%31,n=113,function $e(Qe){De(Qe>>8&255),De(255&Qe)}(rt)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return o=-1,0}else if(0===t.avail_in&&dt<=nn&&4!=dt)return t.msg=Kv[7],-5;if(666==n&&0!==t.avail_in)return Qe.msg=Kv[7],-5;if(0!==t.avail_in||0!==N||0!=dt&&666!=n){switch(Ln=-1,Zu[S].func){case 0:Ln=function Co(Qe){let ut,dt=65535;for(dt>i-5&&(dt=i-5);;){if(N<=1){if(Wi(),0===N&&0==Qe)return 0;if(0===N)break}if(D+=N,N=0,ut=x+dt,(0===D||D>=ut)&&(N=D-ut,D=ut,Dt(!1),0===t.avail_out)||D-x>=r-Qc&&(Dt(!1),0===t.avail_out))return 0}return Dt(4==Qe),0===t.avail_out?4==Qe?2:0:4==Qe?3:1}(dt);break;case 1:Ln=function ra(Qe){let ut,dt=0;for(;;){if(N<Qc){if(Wi(),N<Qc&&0==Qe)return 0;if(0===N)break}if(N>=3&&(m=(m<<A^255&l[D+2])&y,dt=65535&h[m],d[D&a]=h[m],h[m]=D),0!==dt&&(D-dt&65535)<=r-Qc&&2!=I&&(C=bl(dt)),C>=3)if(ut=ii(D-P,C-3),N-=C,C<=F&&N>=3){C--;do{D++,m=(m<<A^255&l[D+2])&y,dt=65535&h[m],d[D&a]=h[m],h[m]=D}while(0!=--C);D++}else D+=C,C=0,m=255&l[D],m=(m<<A^255&l[D+1])&y;else ut=ii(0,255&l[D]),N--,D++;if(ut&&(Dt(!1),0===t.avail_out))return 0}return Dt(4==Qe),0===t.avail_out?4==Qe?2:0:4==Qe?3:1}(dt);break;case 2:Ln=function sa(Qe){let ut,rt,dt=0;for(;;){if(N<Qc){if(Wi(),N<Qc&&0==Qe)return 0;if(0===N)break}if(N>=3&&(m=(m<<A^255&l[D+2])&y,dt=65535&h[m],d[D&a]=h[m],h[m]=D),R=C,w=P,C=2,0!==dt&&R<F&&(D-dt&65535)<=r-Qc&&(2!=I&&(C=bl(dt)),C<=5&&(1==I||3==C&&D-P>4096)&&(C=2)),R>=3&&C<=R){rt=D+N-3,ut=ii(D-1-w,R-3),N-=R-1,R-=2;do{++D<=rt&&(m=(m<<A^255&l[D+2])&y,dt=65535&h[m],d[D&a]=h[m],h[m]=D)}while(0!=--R);if(v=0,C=2,D++,ut&&(Dt(!1),0===t.avail_out))return 0}else if(0!==v){if(ut=ii(0,255&l[D-1]),ut&&Dt(!1),D++,N--,0===t.avail_out)return 0}else v=1,D++,N--}return 0!==v&&(ut=ii(0,255&l[D-1]),v=0),Dt(4==Qe),0===t.avail_out?4==Qe?2:0:4==Qe?3:1}(dt)}if((2==Ln||3==Ln)&&(n=666),0==Ln||2==Ln)return 0===t.avail_out&&(o=-1),0;if(1==Ln){if(1==dt)!function On(){ot(2,3),kt(256,Ks.static_ltree),Lt(),1+Y+10-K<9&&(ot(2,3),kt(256,Ks.static_ltree),Lt()),Y=7}();else if(Te(0,0,!1),3==dt)for(ut=0;ut<_;ut++)h[ut]=0;if(t.flush_pending(),0===t.avail_out)return o=-1,0}}return 4!=dt?0:1}}function x7(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}x7.prototype={deflateInit:function(e,t){const n=this;return n.dstate=new mFe,t||(t=Wx),n.dstate.deflateInit(n,e,t)},deflate:function(e){const t=this;return t.dstate?t.dstate.deflate(t,e):-2},deflateEnd:function(){const e=this;if(!e.dstate)return-2;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams:function(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):-2},deflateSetDictionary:function(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):-2},read_buf:function(e,t,n){const i=this;let o=i.avail_in;return o>n&&(o=n),0===o?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:function(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(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,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const Zi=0,Ph=1,vc=-2,er=-3,C7=-4,Oh=-5,Jc=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],E7=1440,wFe=[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],SFe=[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],vFe=[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],DFe=[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],IFe=[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],PFe=[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],sm=15;function _2(){let t,n,i,o,r,s;function a(u,d,h,m,_,p,y,A,x,C,w){let v,D,P,N,R,B,F,S,I,L,M,U,z,j,W;L=0,R=h;do{i[u[d+L]]++,L++,R--}while(0!==R);if(i[0]==h)return y[0]=-1,A[0]=0,Zi;for(S=A[0],B=1;B<=sm&&0===i[B];B++);for(F=B,S<B&&(S=B),R=sm;0!==R&&0===i[R];R--);for(P=R,S>R&&(S=R),A[0]=S,j=1<<B;B<R;B++,j<<=1)if((j-=i[B])<0)return er;if((j-=i[R])<0)return er;for(i[R]+=j,s[1]=B=0,L=1,z=2;0!=--R;)s[z]=B+=i[L],z++,L++;R=0,L=0;do{0!==(B=u[d+L])&&(w[s[B]++]=R),L++}while(++R<h);for(h=s[P],s[0]=R=0,L=0,N=-1,U=-S,r[0]=0,M=0,W=0;F<=P;F++)for(v=i[F];0!=v--;){for(;F>U+S;){if(N++,U+=S,W=P-U,W=W>S?S:W,(D=1<<(B=F-U))>v+1&&(D-=v+1,z=F,B<W))for(;++B<W&&!((D<<=1)<=i[++z]);)D-=i[z];if(W=1<<B,C[0]+W>E7)return er;r[N]=M=C[0],C[0]+=W,0!==N?(s[N]=R,o[0]=B,o[1]=S,B=R>>>U-S,o[2]=M-r[N-1]-B,x.set(o,3*(r[N-1]+B))):y[0]=M}for(o[1]=F-U,L>=h?o[0]=192:w[L]<m?(o[0]=w[L]<256?0:96,o[2]=w[L++]):(o[0]=p[w[L]-m]+16+64,o[2]=_[w[L++]-m]),D=1<<F-U,B=R>>>U;B<W;B+=D)x.set(o,3*(M+B));for(B=1<<F-1;R&B;B>>>=1)R^=B;for(R^=B,I=(1<<U)-1;(R&I)!=s[N];)N--,U-=S,I=(1<<U)-1}return 0!==j&&1!=P?Oh:Zi}function l(u){let d;for(t||(t=[],n=[],i=new Int32Array(sm+1),o=[],r=new Int32Array(sm),s=new Int32Array(sm+1)),n.length<u&&(n=[]),d=0;d<u;d++)n[d]=0;for(d=0;d<sm+1;d++)i[d]=0;for(d=0;d<3;d++)o[d]=0;r.set(i.subarray(0,sm),0),s.set(i.subarray(0,sm+1),0)}this.inflate_trees_bits=function(u,d,h,m,_){let p;return l(19),t[0]=0,p=a(u,0,19,19,null,null,h,d,m,t,n),p==er?_.msg="oversubscribed dynamic bit lengths tree":(p==Oh||0===d[0])&&(_.msg="incomplete dynamic bit lengths tree",p=er),p},this.inflate_trees_dynamic=function(u,d,h,m,_,p,y,A,x){let C;return l(288),t[0]=0,C=a(h,0,u,257,vFe,DFe,p,m,A,t,n),C!=Zi||0===m[0]?(C==er?x.msg="oversubscribed literal/length tree":C!=C7&&(x.msg="incomplete literal/length tree",C=er),C):(l(288),C=a(h,u,d,0,IFe,PFe,y,_,A,t,n),C!=Zi||0===_[0]&&u>257?(C==er?x.msg="oversubscribed distance tree":C==Oh?(x.msg="incomplete distance tree",C=er):C!=C7&&(x.msg="empty distance tree with lengths",C=er),C):Zi)}}_2.inflate_trees_fixed=function(e,t,n,i){return e[0]=9,t[0]=5,n[0]=wFe,i[0]=SFe,Zi};const nD=0,w7=1,S7=2,v7=3,D7=4,I7=5,P7=6,g2=7,O7=8,iD=9;function OFe(){const e=this;let t,i,h,_,n=0,o=0,r=0,s=0,a=0,l=0,u=0,d=0,m=0,p=0;function y(A,x,C,w,v,D,P,N){let R,B,F,S,I,L,M,U,z,j,W,q,V,$,Z,ie;M=N.next_in_index,U=N.avail_in,I=P.bitb,L=P.bitk,z=P.write,j=z<P.read?P.read-z-1:P.end-z,W=Jc[A],q=Jc[x];do{for(;L<20;)U--,I|=(255&N.read_byte(M++))<<L,L+=8;if(R=I&W,B=C,F=w,ie=3*(F+R),0!==(S=B[ie]))for(;;){if(I>>=B[ie+1],L-=B[ie+1],16&S){for(S&=15,V=B[ie+2]+(I&Jc[S]),I>>=S,L-=S;L<15;)U--,I|=(255&N.read_byte(M++))<<L,L+=8;for(R=I&q,B=v,F=D,ie=3*(F+R),S=B[ie];;){if(I>>=B[ie+1],L-=B[ie+1],16&S){for(S&=15;L<S;)U--,I|=(255&N.read_byte(M++))<<L,L+=8;if($=B[ie+2]+(I&Jc[S]),I>>=S,L-=S,j-=V,z>=$)Z=z-$,z-Z>0&&2>z-Z?(P.win[z++]=P.win[Z++],P.win[z++]=P.win[Z++],V-=2):(P.win.set(P.win.subarray(Z,Z+2),z),z+=2,Z+=2,V-=2);else{Z=z-$;do{Z+=P.end}while(Z<0);if(S=P.end-Z,V>S){if(V-=S,z-Z>0&&S>z-Z)do{P.win[z++]=P.win[Z++]}while(0!=--S);else P.win.set(P.win.subarray(Z,Z+S),z),z+=S,Z+=S,S=0;Z=0}}if(z-Z>0&&V>z-Z)do{P.win[z++]=P.win[Z++]}while(0!=--V);else P.win.set(P.win.subarray(Z,Z+V),z),z+=V,Z+=V,V=0;break}if(64&S)return N.msg="invalid distance code",V=N.avail_in-U,V=L>>3<V?L>>3:V,U+=V,M-=V,L-=V<<3,P.bitb=I,P.bitk=L,N.avail_in=U,N.total_in+=M-N.next_in_index,N.next_in_index=M,P.write=z,er;R+=B[ie+2],R+=I&Jc[S],ie=3*(F+R),S=B[ie]}break}if(64&S)return 32&S?(V=N.avail_in-U,V=L>>3<V?L>>3:V,U+=V,M-=V,L-=V<<3,P.bitb=I,P.bitk=L,N.avail_in=U,N.total_in+=M-N.next_in_index,N.next_in_index=M,P.write=z,Ph):(N.msg="invalid literal/length code",V=N.avail_in-U,V=L>>3<V?L>>3:V,U+=V,M-=V,L-=V<<3,P.bitb=I,P.bitk=L,N.avail_in=U,N.total_in+=M-N.next_in_index,N.next_in_index=M,P.write=z,er);if(R+=B[ie+2],R+=I&Jc[S],ie=3*(F+R),0===(S=B[ie])){I>>=B[ie+1],L-=B[ie+1],P.win[z++]=B[ie+2],j--;break}}else I>>=B[ie+1],L-=B[ie+1],P.win[z++]=B[ie+2],j--}while(j>=258&&U>=10);return V=N.avail_in-U,V=L>>3<V?L>>3:V,U+=V,M-=V,L-=V<<3,P.bitb=I,P.bitk=L,N.avail_in=U,N.total_in+=M-N.next_in_index,N.next_in_index=M,P.write=z,Zi}e.init=function(A,x,C,w,v,D){t=nD,u=A,d=x,h=C,m=w,_=v,p=D,i=null},e.proc=function(A,x,C){let w,v,D,B,F,S,I,P=0,N=0,R=0;for(R=x.next_in_index,B=x.avail_in,P=A.bitb,N=A.bitk,F=A.write,S=F<A.read?A.read-F-1:A.end-F;;)switch(t){case nD:if(S>=258&&B>=10&&(A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,C=y(u,d,h,m,_,p,A,x),R=x.next_in_index,B=x.avail_in,P=A.bitb,N=A.bitk,F=A.write,S=F<A.read?A.read-F-1:A.end-F,C!=Zi)){t=C==Ph?g2:iD;break}r=u,i=h,o=m,t=w7;case w7:for(w=r;N<w;){if(0===B)return A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);C=Zi,B--,P|=(255&x.read_byte(R++))<<N,N+=8}if(v=3*(o+(P&Jc[w])),P>>>=i[v+1],N-=i[v+1],D=i[v],0===D){s=i[v+2],t=P7;break}if(16&D){a=15&D,n=i[v+2],t=S7;break}if(!(64&D)){r=D,o=v/3+i[v+2];break}if(32&D){t=g2;break}return t=iD,x.msg="invalid literal/length code",C=er,A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);case S7:for(w=a;N<w;){if(0===B)return A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);C=Zi,B--,P|=(255&x.read_byte(R++))<<N,N+=8}n+=P&Jc[w],P>>=w,N-=w,r=d,i=_,o=p,t=v7;case v7:for(w=r;N<w;){if(0===B)return A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);C=Zi,B--,P|=(255&x.read_byte(R++))<<N,N+=8}if(v=3*(o+(P&Jc[w])),P>>=i[v+1],N-=i[v+1],D=i[v],16&D){a=15&D,l=i[v+2],t=D7;break}if(!(64&D)){r=D,o=v/3+i[v+2];break}return t=iD,x.msg="invalid distance code",C=er,A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);case D7:for(w=a;N<w;){if(0===B)return A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);C=Zi,B--,P|=(255&x.read_byte(R++))<<N,N+=8}l+=P&Jc[w],P>>=w,N-=w,t=I7;case I7:for(I=F-l;I<0;)I+=A.end;for(;0!==n;){if(0===S&&(F==A.end&&0!==A.read&&(F=0,S=F<A.read?A.read-F-1:A.end-F),0===S&&(A.write=F,C=A.inflate_flush(x,C),F=A.write,S=F<A.read?A.read-F-1:A.end-F,F==A.end&&0!==A.read&&(F=0,S=F<A.read?A.read-F-1:A.end-F),0===S)))return A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);A.win[F++]=A.win[I++],S--,I==A.end&&(I=0),n--}t=nD;break;case P7:if(0===S&&(F==A.end&&0!==A.read&&(F=0,S=F<A.read?A.read-F-1:A.end-F),0===S&&(A.write=F,C=A.inflate_flush(x,C),F=A.write,S=F<A.read?A.read-F-1:A.end-F,F==A.end&&0!==A.read&&(F=0,S=F<A.read?A.read-F-1:A.end-F),0===S)))return A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);C=Zi,A.win[F++]=s,S--,t=nD;break;case g2:if(N>7&&(N-=8,B++,R--),A.write=F,C=A.inflate_flush(x,C),F=A.write,S=F<A.read?A.read-F-1:A.end-F,A.read!=A.write)return A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);t=O7;case O7:return C=Ph,A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);case iD:return C=er,A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C);default:return C=vc,A.bitb=P,A.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,A.write=F,A.inflate_flush(x,C)}},e.free=function(){}}const L7=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ib=0,y2=1,R7=2,N7=3,M7=4,F7=5,oD=6,rD=7,B7=8,fg=9;function LFe(e,t){const n=this;let a,i=ib,o=0,r=0,s=0;const l=[0],u=[0],d=new OFe;let h=0,m=new Int32Array(3*E7);const p=new _2;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(y,A){A&&(A[0]=0),i==oD&&d.free(y),i=ib,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(y,A){let x,C,w;return C=y.next_out_index,w=n.read,x=(w<=n.write?n.write:n.end)-w,x>y.avail_out&&(x=y.avail_out),0!==x&&A==Oh&&(A=Zi),y.avail_out-=x,y.total_out+=x,y.next_out.set(n.win.subarray(w,w+x),C),C+=x,w+=x,w==n.end&&(w=0,n.write==n.end&&(n.write=0),x=n.write-w,x>y.avail_out&&(x=y.avail_out),0!==x&&A==Oh&&(A=Zi),y.avail_out-=x,y.total_out+=x,y.next_out.set(n.win.subarray(w,w+x),C),C+=x,w+=x),y.next_out_index=C,n.read=w,A},n.proc=function(y,A){let x,C,w,v,D,P,N,R;for(v=y.next_in_index,D=y.avail_in,C=n.bitb,w=n.bitk,P=n.write,N=P<n.read?n.read-P-1:n.end-P;;){let B,F,S,I,L,M,U,z;switch(i){case ib:for(;w<3;){if(0===D)return n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);A=Zi,D--,C|=(255&y.read_byte(v++))<<w,w+=8}switch(x=7&C,h=1&x,x>>>1){case 0:C>>>=3,w-=3,x=7&w,C>>>=x,w-=x,i=y2;break;case 1:B=[],F=[],S=[[]],I=[[]],_2.inflate_trees_fixed(B,F,S,I),d.init(B[0],F[0],S[0],0,I[0],0),C>>>=3,w-=3,i=oD;break;case 2:C>>>=3,w-=3,i=N7;break;case 3:return C>>>=3,w-=3,i=fg,y.msg="invalid block type",A=er,n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A)}break;case y2:for(;w<32;){if(0===D)return n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);A=Zi,D--,C|=(255&y.read_byte(v++))<<w,w+=8}if((~C>>>16&65535)!=(65535&C))return i=fg,y.msg="invalid stored block lengths",A=er,n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);o=65535&C,C=w=0,i=0!==o?R7:0!==h?rD:ib;break;case R7:if(0===D||0===N&&(P==n.end&&0!==n.read&&(P=0,N=P<n.read?n.read-P-1:n.end-P),0===N&&(n.write=P,A=n.inflate_flush(y,A),P=n.write,N=P<n.read?n.read-P-1:n.end-P,P==n.end&&0!==n.read&&(P=0,N=P<n.read?n.read-P-1:n.end-P),0===N)))return n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);if(A=Zi,x=o,x>D&&(x=D),x>N&&(x=N),n.win.set(y.read_buf(v,x),P),v+=x,D-=x,P+=x,N-=x,0!=(o-=x))break;i=0!==h?rD:ib;break;case N7:for(;w<14;){if(0===D)return n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);A=Zi,D--,C|=(255&y.read_byte(v++))<<w,w+=8}if(r=x=16383&C,(31&x)>29||(x>>5&31)>29)return i=fg,y.msg="too many length or distance symbols",A=er,n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);if(x=258+(31&x)+(x>>5&31),!a||a.length<x)a=[];else for(R=0;R<x;R++)a[R]=0;C>>>=14,w-=14,s=0,i=M7;case M7:for(;s<4+(r>>>10);){for(;w<3;){if(0===D)return n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);A=Zi,D--,C|=(255&y.read_byte(v++))<<w,w+=8}a[L7[s++]]=7&C,C>>>=3,w-=3}for(;s<19;)a[L7[s++]]=0;if(l[0]=7,x=p.inflate_trees_bits(a,l,u,m,y),x!=Zi)return(A=x)==er&&(a=null,i=fg),n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);s=0,i=F7;case F7:for(;x=r,!(s>=258+(31&x)+(x>>5&31));){let j,W;for(x=l[0];w<x;){if(0===D)return n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);A=Zi,D--,C|=(255&y.read_byte(v++))<<w,w+=8}if(x=m[3*(u[0]+(C&Jc[x]))+1],W=m[3*(u[0]+(C&Jc[x]))+2],W<16)C>>>=x,w-=x,a[s++]=W;else{for(R=18==W?7:W-14,j=18==W?11:3;w<x+R;){if(0===D)return n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);A=Zi,D--,C|=(255&y.read_byte(v++))<<w,w+=8}if(C>>>=x,w-=x,j+=C&Jc[R],C>>>=R,w-=R,R=s,x=r,R+j>258+(31&x)+(x>>5&31)||16==W&&R<1)return a=null,i=fg,y.msg="invalid bit length repeat",A=er,n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);W=16==W?a[R-1]:0;do{a[R++]=W}while(0!=--j);s=R}}if(u[0]=-1,L=[],M=[],U=[],z=[],L[0]=9,M[0]=6,x=r,x=p.inflate_trees_dynamic(257+(31&x),1+(x>>5&31),a,L,M,U,z,m,y),x!=Zi)return x==er&&(a=null,i=fg),A=x,n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);d.init(L[0],M[0],m,U[0],m,z[0]),i=oD;case oD:if(n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,(A=d.proc(n,y,A))!=Ph)return n.inflate_flush(y,A);if(A=Zi,d.free(y),v=y.next_in_index,D=y.avail_in,C=n.bitb,w=n.bitk,P=n.write,N=P<n.read?n.read-P-1:n.end-P,0===h){i=ib;break}i=rD;case rD:if(n.write=P,A=n.inflate_flush(y,A),P=n.write,N=P<n.read?n.read-P-1:n.end-P,n.read!=n.write)return n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);i=B7;case B7:return A=Ph,n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);case fg:return A=er,n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A);default:return A=vc,n.bitb=C,n.bitk=w,y.avail_in=D,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,A)}}},n.free=function(y){n.reset(y,null),n.win=null,m=null},n.set_dictionary=function(y,A,x){n.win.set(y.subarray(A,A+x),0),n.read=n.write=x},n.sync_point=function(){return i==y2?1:0}}const FFe=[0,0,255,255];function BFe(){const e=this;function t(n){return n&&n.istate?(n.total_in=n.total_out=0,n.msg=null,n.istate.mode=7,n.istate.blocks.reset(n,null),Zi):vc}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=function(n){return e.blocks&&e.blocks.free(n),e.blocks=null,Zi},e.inflateInit=function(n,i){return n.msg=null,e.blocks=null,i<8||i>15?(e.inflateEnd(n),vc):(e.wbits=i,n.istate.blocks=new LFe(n,1<<i),t(n),Zi)},e.inflate=function(n,i){let o,r;if(!n||!n.istate||!n.next_in)return vc;const s=n.istate;for(i=4==i?Oh:Zi,o=Oh;;)switch(s.mode){case 0:if(0===n.avail_in)return o;if(o=i,n.avail_in--,n.total_in++,8!=(15&(s.method=n.read_byte(n.next_in_index++)))){s.mode=13,n.msg="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.wbits){s.mode=13,n.msg="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===n.avail_in)return o;if(o=i,n.avail_in--,n.total_in++,r=255&n.read_byte(n.next_in_index++),((s.method<<8)+r)%31!=0){s.mode=13,n.msg="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===n.avail_in)return o;o=i,n.avail_in--,n.total_in++,s.need=(255&n.read_byte(n.next_in_index++))<<24&4278190080,s.mode=3;case 3:if(0===n.avail_in)return o;o=i,n.avail_in--,n.total_in++,s.need+=(255&n.read_byte(n.next_in_index++))<<16&16711680,s.mode=4;case 4:if(0===n.avail_in)return o;o=i,n.avail_in--,n.total_in++,s.need+=(255&n.read_byte(n.next_in_index++))<<8&65280,s.mode=5;case 5:return 0===n.avail_in?o:(o=i,n.avail_in--,n.total_in++,s.need+=255&n.read_byte(n.next_in_index++),s.mode=6,2);case 6:return s.mode=13,n.msg="need dictionary",s.marker=0,vc;case 7:if(o=s.blocks.proc(n,o),o==er){s.mode=13,s.marker=0;break}if(o==Zi&&(o=i),o!=Ph)return o;o=i,s.blocks.reset(n,s.was),s.mode=12;case 12:return n.avail_in=0,Ph;case 13:return er;default:return vc}},e.inflateSetDictionary=function(n,i,o){let r=0,s=o;if(!n||!n.istate||6!=n.istate.mode)return vc;const a=n.istate;return s>=1<<a.wbits&&(s=(1<<a.wbits)-1,r=o-s),a.blocks.set_dictionary(i,r,s),a.mode=7,Zi},e.inflateSync=function(n){let i,o,r,s,a;if(!n||!n.istate)return vc;const l=n.istate;if(13!=l.mode&&(l.mode=13,l.marker=0),0===(i=n.avail_in))return Oh;for(o=n.next_in_index,r=l.marker;0!==i&&r<4;)n.read_byte(o)==FFe[r]?r++:r=0!==n.read_byte(o)?0:4-r,o++,i--;return n.total_in+=o-n.next_in_index,n.next_in_index=o,n.avail_in=i,l.marker=r,4!=r?er:(s=n.total_in,a=n.total_out,t(n),n.total_in=s,n.total_out=a,l.mode=7,Zi)},e.inflateSyncPoint=function(n){return n&&n.istate&&n.istate.blocks?n.istate.blocks.sync_point():vc}}function j7(){}j7.prototype={inflateInit:function(e){const t=this;return t.istate=new BFe,e||(e=15),t.istate.inflateInit(t,e)},inflate:function(e){const t=this;return t.istate?t.istate.inflate(t,e):vc},inflateEnd:function(){const e=this;if(!e.istate)return vc;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync:function(){const e=this;return e.istate?e.istate.inflateSync(e):vc},inflateSetDictionary:function(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):vc},read_byte:function(e){return this.next_in[e]},read_buf:function(e,t){return this.next_in.subarray(e,e+t)}};const zFe={chunkSize:524288,maxWorkers:typeof navigator<"u"&&navigator.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},Dc=Object.assign({},zFe);function W7(e){if(void 0!==e.baseURL&&(Dc.baseURL=e.baseURL),void 0!==e.chunkSize&&(Dc.chunkSize=e.chunkSize),void 0!==e.maxWorkers&&(Dc.maxWorkers=e.maxWorkers),void 0!==e.terminateWorkerTimeout&&(Dc.terminateWorkerTimeout=e.terminateWorkerTimeout),void 0!==e.useWebWorkers&&(Dc.useWebWorkers=e.useWebWorkers),void 0!==e.Deflate&&(Dc.Deflate=e.Deflate),void 0!==e.Inflate&&(Dc.Inflate=e.Inflate),void 0!==e.workerScripts){if(e.workerScripts.deflate){if(!Array.isArray(e.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");Dc.workerScripts||(Dc.workerScripts={}),Dc.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!Array.isArray(e.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");Dc.workerScripts||(Dc.workerScripts={}),Dc.workerScripts.inflate=e.workerScripts.inflate}}}const q7=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)1&t?t=t>>>1^3988292384:t>>>=1;q7[e]=t}const $x=class HFe{constructor(t){this.crc=t||-1}append(t){let n=0|this.crc;for(let i=0,o=0|t.length;i<o;i++)n=n>>>8^q7[255&(n^t[i])];this.crc=n}get(){return~this.crc}},GFe=function jFe(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new TextEncoder).encode(e)},Ja={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=Ja.getPartial(n);return 32===i?e.concat(t):Ja._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;return 0===t?0:32*(t-1)+Ja.getPartial(e[t-1])},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=Ja.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>Math.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let s=0;s<e.length;s++)i.push(n|e[s]>>>t),n=e[s]<<32-t;const r=Ja.getPartial(e.length?e[e.length-1]:0);return i.push(Ja.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},sD={bytes:{fromBits(e){const n=Ja.bitLength(e)/8,i=new Uint8Array(n);let o;for(let r=0;r<n;r++)3&r||(o=e[r/4]),i[r]=o>>>24,o<<=8;return i},toBits(e){const t=[];let n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],3==(3&n)&&(t.push(i),i=0);return 3&n&&t.push(Ja.partial(8*(3&n),i)),t}}},A2={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};A2.sha1.prototype={blockSize:512,reset:function(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update:function(e){const t=this;"string"==typeof e&&(e=sD.utf8String.toBits(e));const n=t._buffer=Ja.concat(t._buffer,e),i=t._length,o=t._length=i+Ja.bitLength(e);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const r=new Uint32Array(n);let 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:function(){const e=this;let t=e._buffer;const n=e._h;t=Ja.concat(t,[Ja.partial(1,1)]);for(let i=t.length+2;15&i;i++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(e,t,n,i){return e<=19?t&n|~t&i:e<=39?t^n^i:e<=59?t&n|t&i|n&i:e<=79?t^n^i:void 0},_S:function(e,t){return t<<e|t>>>32-e},_block:function(e){const t=this,n=t._h,i=Array(80);for(let u=0;u<16;u++)i[u]=e[u];let o=n[0],r=n[1],s=n[2],a=n[3],l=n[4];for(let u=0;u<=79;u++){u>=16&&(i[u]=t._S(1,i[u-3]^i[u-8]^i[u-14]^i[u-16]));const d=t._S(5,o)+t._f(u,r,s,a)+l+i[u]+t._key[Math.floor(u/20)]|0;l=a,a=s,s=t._S(30,r),r=o,o=d}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]+l|0}};const Y7_aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],o=e.length;let r,s,a,l=1;if(4!==o&&6!==o&&8!==o)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),a=[]],r=o;r<4*o+28;r++){let u=s[r-1];(r%o==0||8===o&&r%o==4)&&(u=n[u>>>24]<<24^n[u>>16&255]<<16^n[u>>8&255]<<8^n[255&u],r%o==0&&(u=u<<8^u>>>24^l<<24,l=l<<1^283*(l>>7))),s[r]=s[r-o]^u}for(let u=0;r;u++,r--){const d=s[3&u?r:r-4];a[u]=r<=4||u<4?d:i[0][n[d>>>24]]^i[1][n[d>>16&255]]^i[2][n[d>>8&255]]^i[3][n[255&d]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],o=[],r=[];let s,a,l,u;for(let d=0;d<256;d++)r[(o[d]=d<<1^283*(d>>7))^d]=d;for(let d=s=0;!n[d];d^=a||1,s=r[s]||1){let h=s^s<<1^s<<2^s<<3^s<<4;h=h>>8^255&h^99,n[d]=h,i[h]=d,u=o[l=o[a=o[d]]];let m=16843009*u^65537*l^257*a^16843008*d,_=257*o[h]^16843008*h;for(let p=0;p<4;p++)e[p][d]=_=_<<24^_>>>8,t[p][h]=m=m<<24^m>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(4!==e.length)throw new Error("invalid aes block size");const n=this._key[t],i=n.length/4-2,o=[0,0,0,0],r=this._tables[t],s=r[0],a=r[1],l=r[2],u=r[3],d=r[4];let A,x,C,h=e[0]^n[0],m=e[t?3:1]^n[1],_=e[2]^n[2],p=e[t?1:3]^n[3],y=4;for(let w=0;w<i;w++)A=s[h>>>24]^a[m>>16&255]^l[_>>8&255]^u[255&p]^n[y],x=s[m>>>24]^a[_>>16&255]^l[p>>8&255]^u[255&h]^n[y+1],C=s[_>>>24]^a[p>>16&255]^l[h>>8&255]^u[255&m]^n[y+2],p=s[p>>>24]^a[h>>16&255]^l[m>>8&255]^u[255&_]^n[y+3],y+=4,h=A,m=x,_=C;for(let w=0;w<4;w++)o[t?3&-w:w]=d[h>>>24]<<24^d[m>>16&255]<<16^d[_>>8&255]<<8^d[255&p]^n[y++],A=h,h=m,m=_,_=p,p=A;return o}},WFe={getRandomValues(e){const t=new Uint32Array(e.buffer),n=i=>{let o=987654321;const r=4294967295;return function(){return o=36969*(65535&o)+(o>>16)&r,(((o<<16)+(i=18e3*(65535&i)+(i>>16)&r)&r)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let o,i=0;i<e.length;i+=4){const r=n(4294967296*(o||Math.random()));o=987654071*r(),t[i/4]=4294967296*r()|0}return e}},X7_ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const o=Ja.bitLength(t);for(let r=0;r<i;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return Ja.clamp(t,o)}},Kx={importKey:e=>new Kx.hmacSha1(sD.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,i<0||n<0)throw new Error("invalid params to pbkdf2");const o=1+(i>>5)<<2;let r,s,a,l,u;const d=new ArrayBuffer(o),h=new DataView(d);let m=0;const _=Ja;for(t=sD.bytes.toBits(t),u=1;m<(o||1);u++){for(r=s=e.encrypt(_.concat(t,[u])),a=1;a<n;a++)for(s=e.encrypt(s),l=0;l<s.length;l++)r[l]^=s[l];for(a=0;m<(o||1)&&a<r.length;a++)h.setInt32(m,r[a]),m+=4}return d.slice(0,i/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=A2.sha1,i=[[],[]],o=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>o&&(e=n.hash(e));for(let r=0;r<o;r++)i[0][r]=909522486^e[r],i[1][r]=1549556828^e[r];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},Z7="Invalid pasword",qFe="raw",$7={name:"PBKDF2"},ZFe=Object.assign({hash:{name:"HMAC"}},$7),K7=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},$7),$Fe=["deriveBits"],Qx=[8,12,16],Jx=[16,24,32],Q7=[0,0,0,0],aD=typeof crypto<"u",J7=aD&&typeof crypto.subtle<"u",ef=sD.bytes,eY=Y7_aes,tY=X7_ctrGladman,nY=Kx.hmacSha1;class KFe{constructor(t,n,i){Object.assign(this,{password:t,signed:n,strength:i-1,pendingInput:new Uint8Array(0)})}append(t){var n=this;return(0,Pe.Z)(function*(){const i=n;if(i.password){const r=el(t,0,Qx[i.strength]+2);yield function JFe(e,t,n){return T2.apply(this,arguments)}(i,r,i.password),i.password=null,i.aesCtrGladman=new tY(new eY(i.keys.key),Array.from(Q7)),i.hmac=new nY(i.keys.authentication),t=el(t,Qx[i.strength]+2)}const o=new Uint8Array(t.length-10-(t.length-10)%16);return iY(i,t,o,0,10,!0)})()}flush(){const t=this,n=t.pendingInput,i=el(n,0,n.length-10),o=el(n,n.length-10);let r=new Uint8Array(0);if(i.length){const a=ef.toBits(i);t.hmac.update(a);const l=t.aesCtrGladman.update(a);r=ef.fromBits(l)}let s=!0;if(t.signed){const a=el(ef.fromBits(t.hmac.digest()),0,10);for(let l=0;l<10;l++)a[l]!=o[l]&&(s=!1)}return{valid:s,data:r}}}class QFe{constructor(t,n){Object.assign(this,{password:t,strength:n-1,pendingInput:new Uint8Array(0)})}append(t){var n=this;return(0,Pe.Z)(function*(){const i=n;let o=new Uint8Array(0);i.password&&(o=yield function eBe(e,t){return x2.apply(this,arguments)}(i,i.password),i.password=null,i.aesCtrGladman=new tY(new eY(i.keys.key),Array.from(Q7)),i.hmac=new nY(i.keys.authentication));const r=new Uint8Array(o.length+t.length-t.length%16);return r.set(o,0),iY(i,t,r,o.length,0)})()}flush(){const t=this;let n=new Uint8Array(0);if(t.pendingInput.length){const o=t.aesCtrGladman.update(ef.toBits(t.pendingInput));t.hmac.update(o),n=ef.fromBits(o)}const i=el(ef.fromBits(t.hmac.digest()),0,10);return{data:w2(n,i),signature:i}}}function iY(e,t,n,i,o,r){const s=t.length-o;let a;for(e.pendingInput.length&&(t=w2(e.pendingInput,t),n=function oBe(e,t){if(t&&t>e.length){const n=e;(e=new Uint8Array(t)).set(n,0)}return e}(n,s-s%16)),a=0;a<=s-16;a+=16){const l=ef.toBits(el(t,a,a+16));r&&e.hmac.update(l);const u=e.aesCtrGladman.update(l);r||e.hmac.update(u),n.set(ef.fromBits(u),a+i)}return e.pendingInput=el(t,a),n}function T2(){return T2=(0,Pe.Z)(function*(e,t,n){yield oY(e,n,el(t,0,Qx[e.strength]));const i=el(t,Qx[e.strength]),o=e.keys.passwordVerification;if(o[0]!=i[0]||o[1]!=i[1])throw new Error(Z7)}),T2.apply(this,arguments)}function x2(){return x2=(0,Pe.Z)(function*(e,t){const n=function tBe(e){return aD&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues(e):WFe.getRandomValues(e)}(new Uint8Array(Qx[e.strength]));return yield oY(e,t,n),w2(n,e.keys.passwordVerification)}),x2.apply(this,arguments)}function oY(e,t,n){return C2.apply(this,arguments)}function C2(){return C2=(0,Pe.Z)(function*(e,t,n){const i=GFe(t),o=yield function nBe(e,t,n,i,o){return aD&&J7&&"function"==typeof crypto.subtle.importKey?crypto.subtle.importKey(e,t,n,i,o):Kx.importKey(t)}(qFe,i,ZFe,!1,$Fe),r=yield function iBe(e,t,n){return E2.apply(this,arguments)}(Object.assign({salt:n},K7),o,8*(2*Jx[e.strength]+2)),s=new Uint8Array(r);e.keys={key:ef.toBits(el(s,0,Jx[e.strength])),authentication:ef.toBits(el(s,Jx[e.strength],2*Jx[e.strength])),passwordVerification:el(s,2*Jx[e.strength])}}),C2.apply(this,arguments)}function E2(){return E2=(0,Pe.Z)(function*(e,t,n){return aD&&J7&&"function"==typeof crypto.subtle.deriveBits?yield crypto.subtle.deriveBits(e,t,n):Kx.pbkdf2(t,e.salt,K7.iterations,n)}),E2.apply(this,arguments)}function w2(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 el(e,t,n){return e.subarray(t,n)}class rBe{constructor(t,n){Object.assign(this,{password:t,passwordVerification:n}),aY(this,t)}append(t){const n=this;if(n.password){const i=rY(n,t.subarray(0,12));if(n.password=null,i[11]!=n.passwordVerification)throw new Error(Z7);t=t.subarray(12)}return rY(n,t)}flush(){return{valid:!0,data:new Uint8Array(0)}}}class sBe{constructor(t,n){Object.assign(this,{password:t,passwordVerification:n}),aY(this,t)}append(t){const n=this;let i,o;if(n.password){n.password=null;const r=crypto.getRandomValues(new Uint8Array(12));r[11]=n.passwordVerification,i=new Uint8Array(t.length+r.length),i.set(sY(n,r),0),o=12}else i=new Uint8Array(t.length),o=0;return i.set(sY(n,t),o),i}flush(){return{data:new Uint8Array(0)}}}function rY(e,t){const n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=cY(e)^t[i],S2(e,n[i]);return n}function sY(e,t){const n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=cY(e)^t[i],S2(e,t[i]);return n}function aY(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new $x(e.keys[0]),e.crcKey2=new $x(e.keys[2]);for(let n=0;n<t.length;n++)S2(e,t.charCodeAt(n))}function S2(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=uY(e.keys[1]+lY(e.keys[0])),e.keys[1]=uY(Math.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function cY(e){const t=2|e.keys[2];return lY(Math.imul(t,1^t)>>>8)}function lY(e){return 255&e}function uY(e){return 4294967295&e}const dY="inflate",fY="Invalid signature";class cBe{constructor(t,{signature:n,password:i,signed:o,compressed:r,zipCrypto:s,passwordVerification:a,encryptionStrength:l},{chunkSize:u}){const d=!!i;Object.assign(this,{signature:n,encrypted:d,signed:o,compressed:r,inflate:r&&new t({chunkSize:u}),crc32:o&&new $x,zipCrypto:s,decrypt:d&&s?new rBe(i,a):new KFe(i,o,l)})}append(t){var n=this;return(0,Pe.Z)(function*(){const i=n;return i.encrypted&&t.length&&(t=yield i.decrypt.append(t)),i.compressed&&t.length&&(t=yield i.inflate.append(t)),(!i.encrypted||i.zipCrypto)&&i.signed&&t.length&&i.crc32.append(t),t})()}flush(){var t=this;return(0,Pe.Z)(function*(){const n=t;let i,o=new Uint8Array(0);if(n.encrypted){const r=n.decrypt.flush();if(!r.valid)throw new Error(fY);o=r.data}if((!n.encrypted||n.zipCrypto)&&n.signed){const r=new DataView(new Uint8Array(4).buffer);if(i=n.crc32.get(),r.setUint32(0,i),n.signature!=r.getUint32(0,!1))throw new Error(fY)}return n.compressed&&(o=(yield n.inflate.append(o))||new Uint8Array(0),yield n.inflate.flush()),{data:o,signature:i}})()}}class lBe{constructor(t,{encrypted:n,signed:i,compressed:o,level:r,zipCrypto:s,password:a,passwordVerification:l,encryptionStrength:u},{chunkSize:d}){Object.assign(this,{encrypted:n,signed:i,compressed:o,deflate:o&&new t({level:r||5,chunkSize:d}),crc32:i&&new $x,zipCrypto:s,encrypt:n&&s?new sBe(a,l):new QFe(a,u)})}append(t){var n=this;return(0,Pe.Z)(function*(){const i=n;let o=t;return i.compressed&&t.length&&(o=yield i.deflate.append(t)),i.encrypted&&o.length&&(o=yield i.encrypt.append(o)),(!i.encrypted||i.zipCrypto)&&i.signed&&t.length&&i.crc32.append(t),o})()}flush(){var t=this;return(0,Pe.Z)(function*(){const n=t;let i,o=new Uint8Array(0);if(n.compressed&&(o=(yield n.deflate.flush())||new Uint8Array(0)),n.encrypted){o=yield n.encrypt.append(o);const r=n.encrypt.flush();i=r.signature;const s=new Uint8Array(o.length+r.data.length);s.set(o,0),s.set(r.data,o.length),o=s}return(!n.encrypted||n.zipCrypto)&&n.signed&&(i=n.crc32.get()),{data:o,signature:i}})()}}const hY="init",pY="append",v2="flush";let mY=!0;const D2=(e,t,n,i,o,r,s)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},n),scripts:s,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,o(e)}}),r?function hBe(e,t){let n;const i={type:"module"};if(!e.interface){if(mY)try{e.worker=o({},t.baseURL)}catch{mY=!1,e.worker=o(i,t.baseURL)}else e.worker=o(i,t.baseURL);e.worker.addEventListener("message",function l(u){const d=u.data;if(n){const h=d.error,m=d.type;if(h){const _=new Error(h.message);_.stack=h.stack,n.reject(_),n=null,e.onTaskFinished()}else if(m==hY||m==v2||m==pY){const _=d.data;m==v2?(n.resolve({data:new Uint8Array(_),signature:d.signature}),n=null,e.onTaskFinished()):n.resolve(_&&new Uint8Array(_))}}},!1),e.interface={append:u=>r({type:pY,data:u}),flush:()=>r({type:v2}),abort(){e.onTaskFinished()}}}return e.interface;function o(u,d){let h,m;h=e.scripts[0],"function"==typeof h&&(h=h());try{m=new URL(h,d)}catch{m=h}return new Worker(m,u)}function r(u){return s.apply(this,arguments)}function s(){return(s=(0,Pe.Z)(function*(u){if(!n){const d=e.options,h=e.scripts.slice(1);yield a({scripts:h,type:hY,options:d,config:{chunkSize:t.chunkSize}})}return a(u)})).apply(this,arguments)}function a(u){const d=e.worker,h=new Promise((m,_)=>n={resolve:m,reject:_});try{if(u.data)try{u.data=u.data.buffer,d.postMessage(u,[u.data])}catch{d.postMessage(u)}else d.postMessage(u)}catch(m){n.reject(m),n=null,e.onTaskFinished()}return h}}(e,i):function fBe(e,t){const n=function uBe(e,t,n){return t.codecType.startsWith("deflate")?new lBe(e,t,n):t.codecType.startsWith(dY)?new cBe(e,t,n):void 0}(e.codecConstructor,e.options,t);return{append:i=>(0,Pe.Z)(function*(){try{return yield n.append(i)}catch(o){throw e.onTaskFinished(),o}})(),flush:()=>(0,Pe.Z)(function*(){try{return yield n.flush()}finally{e.onTaskFinished()}})(),abort(){e.onTaskFinished()}}}(e,i));let lm=[];const I2=[];function P2(e){e.terminateTimeout&&(clearTimeout(e.terminateTimeout),e.terminateTimeout=null)}const O2="text/plain";class bY{constructor(){this.size=0}init(){this.initialized=!0}}class TBe extends bY{}class AY extends bY{writeUint8Array(t){this.size+=t.length}}class xBe extends AY{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:O2})}writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:O2})}getData(){if(this.blob.text)return this.blob.text();{const t=new FileReader;return new Promise((n,i)=>{t.onload=o=>n(o.target.result),t.onerror=()=>i(t.error),t.readAsText(this.blob,this.encoding)})}}}class CBe extends AY{constructor(t){super(),this.data="data:"+(t||"")+";base64,",this.pending=[]}writeUint8Array(t){super.writeUint8Array(t);let n=0,i=this.pending;const o=this.pending.length;for(this.pending="",n=0;n<3*Math.floor((o+t.length)/3)-o;n++)i+=String.fromCharCode(t[n]);for(;n<t.length;n++)this.pending+=String.fromCharCode(t[n]);i.length>2?this.data+=btoa(i):this.pending=i}getData(){return this.data+btoa(this.pending)}}class TY extends TBe{constructor(t){super(),this.blob=t,this.size=t.size}readUint8Array(t,n){var i=this;return(0,Pe.Z)(function*(){if(i.blob.arrayBuffer)return new Uint8Array(yield i.blob.slice(t,t+n).arrayBuffer());{const o=new FileReader;return new Promise((r,s)=>{o.onload=a=>r(new Uint8Array(a.target.result)),o.onerror=()=>s(o.error),o.readAsArrayBuffer(i.blob.slice(t,t+n))})}})()}}function OY(e,t){this.v=e,this.k=t}function Lh(e){return new OY(e,0)}function eC(e){var t,n;function i(r,s){try{var a=e[r](s),l=a.value,u=l instanceof OY;Promise.resolve(u?l.v:l).then(function(d){if(u){var h="return"===r?"return":"next";if(!l.k||d.done)return i(h,d);d=e[h](d).value}o(a.done?"return":"normal",d)},function(d){i("throw",d)})}catch(d){o("throw",d)}}function o(r,s){switch(r){case"return":t.resolve({value:s,done:!0});break;case"throw":t.reject(s);break;default:t.resolve({value:s,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(r,s){return new Promise(function(a,l){var u={key:r,arg:s,resolve:a,reject:l,next:null};n?n=n.next=u:(t=n=u,i(r,s))})},"function"!=typeof e.return&&(this.return=void 0)}eC.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},eC.prototype.next=function(e){return this._invoke("next",e)},eC.prototype.throw=function(e){return this._invoke("throw",e)},eC.prototype.return=function(e){return this._invoke("return",e)};const cD=4294967295,NY=101075792,NBe=1,MBe=39169,FBe=10,BBe=1,kBe=21589,UBe=28789,zBe=25461,GBe=(new Date(2107,11,31),new Date(1980,0,1),"\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("")),j2=function WBe(e,t){if(t&&"cp437"==t.trim().toLowerCase())return(e=>{let t="";for(let n=0;n<e.length;n++)t+=GBe[e[n]];return t})(e);if(typeof TextDecoder>"u"){const n=new FileReader;return new Promise((i,o)=>{n.onload=r=>i(r.target.result),n.onerror=()=>o(n.error),n.readAsText(new Blob([e]))})}return new TextDecoder(t).decode(e)},YBe="Abort error";function W2(){return W2=(0,Pe.Z)(function*(e,t,n,i,o,r,s){const a=Math.max(r.chunkSize,64);return l();function l(){return u.apply(this,arguments)}function u(){return(u=(0,Pe.Z)(function*(d=0,h=0){const m=s.signal,_=o();if(d<_){q2(m,e);const p=yield t.readUint8Array(d+i,Math.min(a,_-d)),y=p.length;q2(m,e);const A=yield e.append(p);if(q2(m,e),h+=(yield UY(n,A)),s.onprogress)try{s.onprogress(d+y,_)}catch{}return l(d+a,h)}{const p=yield e.flush();return h+=(yield UY(n,p.data)),{signature:p.signature,length:h}}})).apply(this,arguments)}}),W2.apply(this,arguments)}function q2(e,t){if(e&&e.aborted)throw t.abort(),new Error(YBe)}function UY(e,t){return Y2.apply(this,arguments)}function Y2(){return Y2=(0,Pe.Z)(function*(e,t){return t.length&&(yield e.writeUint8Array(t)),t.length}),Y2.apply(this,arguments)}const ZBe=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class zY{constructor(t){ZBe.forEach(n=>this[n]=t[n])}}const X2="File format is not recognized",t3e="Zip64 extra field not found",VY="Compression method not supported",jY=["uncompressedSize","compressedSize","offset"];class o3e{constructor(t,n={}){Object.assign(this,{reader:t,options:n,config:Dc})}getEntriesGenerator(t={}){var n=this;return function vBe(e){return function(){return new eC(e.apply(this,arguments))}}(function*(){const i=n,o=i.reader;if(o.initialized||(yield Lh(o.init())),o.size<22)throw new Error(X2);const r=yield Lh(function u3e(e,t,n,i,o){return K2.apply(this,arguments)}(o,101010256,o.size,22,1048560));if(!r)throw new Error("End of central directory not found");const s=Pa(r);let a=Ns(s,12),l=Ns(s,16),u=tl(s,8),d=0;if(l==cD||a==cD||65535==u){const y=Pa(yield Lh(um(o,r.offset-20,20)));if(117853008!=Ns(y,0))throw new Error("End of Zip64 central directory not found");l=dD(y,8);let A=yield Lh(um(o,l,56)),x=Pa(A);const C=r.offset-20-56;if(Ns(x,0)!=NY&&l!=C){const w=l;l=C,d=l-w,A=yield Lh(um(o,l,56)),x=Pa(A)}if(Ns(x,0)!=NY)throw new Error("End of Zip64 central directory locator not found");u=dD(x,32),a=dD(x,40),l-=a}if(l<0||l>=o.size)throw new Error(X2);let h=0,m=yield Lh(um(o,l,a)),_=Pa(m);if(a){const p=r.offset-a;if(33639248!=Ns(_,h)&&l!=p){const y=l;l=p,d=l-y,m=yield Lh(um(o,l,a)),_=Pa(m)}}if(l<0||l>=o.size)throw new Error(X2);for(let p=0;p<u;p++){const y=new r3e(o,i.config,i.options);if(33639248!=Ns(_,h))throw new Error("Central directory header not found");WY(y,_,h+6);const A=!!y.bitFlag.languageEncodingFlag,x=h+46,C=x+y.filenameLength,w=C+y.extraFieldLength,v=tl(_,h+4),D=0==(0&v);Object.assign(y,{versionMadeBy:v,msDosCompatible:D,compressedSize:0,uncompressedSize:0,commentLength:tl(_,h+32),directory:D&&16==(16&ab(_,h+38)),offset:Ns(_,h+42)+d,internalFileAttribute:Ns(_,h+34),externalFileAttribute:Ns(_,h+38),rawFilename:m.subarray(x,C),filenameUTF8:A,commentUTF8:A,rawExtraField:m.subarray(C,w)});const P=w+y.commentLength;y.rawComment=m.subarray(w,P);const N=sb(i,t,"filenameEncoding"),R=sb(i,t,"commentEncoding"),[B,F]=yield Lh(Promise.all([j2(y.rawFilename,y.filenameUTF8?"utf-8":N||"cp437"),j2(y.rawComment,y.commentUTF8?"utf-8":R||"cp437")]));y.filename=B,y.comment=F,!y.directory&&y.filename.endsWith("/")&&(y.directory=!0),yield Lh(qY(y,y,_,h+6));const S=new zY(y);if(S.getData=(I,L)=>y.getData(I,S,L),h=P,t.onprogress)try{t.onprogress(p+1,u,new zY(y))}catch{}yield S}return!0})()}getEntries(t={}){var n=this;return(0,Pe.Z)(function*(){const i=[],o=n.getEntriesGenerator(t);let r=o.next();for(;!(yield r).done;)i.push((yield r).value),r=o.next();return i})()}close(){return(0,Pe.Z)(function*(){})()}}class r3e{constructor(t,n,i){Object.assign(this,{reader:t,config:n,options:i})}getData(t,n,i={}){var o=this;return(0,Pe.Z)(function*(){const r=o,{reader:s,offset:a,extraFieldAES:l,compressionMethod:u,config:d,bitFlag:h,signature:m,rawLastModDate:_,compressedSize:p}=r,y=r.localDirectory={};s.initialized||(yield s.init());let A=yield um(s,a,30);const x=Pa(A);let C=sb(r,i,"password");if(C=C&&C.length&&C,l&&99!=l.originalCompressionMethod)throw new Error(VY);if(0!=u&&8!=u)throw new Error(VY);if(67324752!=Ns(x,0))throw new Error("Local file header not found");WY(y,x,4),A=yield um(s,a,30+y.filenameLength+y.extraFieldLength),y.rawExtraField=A.subarray(30+y.filenameLength),yield qY(r,y,x,4),n.lastAccessDate=y.lastAccessDate,n.creationDate=y.creationDate;const w=r.encrypted&&y.encrypted,v=w&&!l;if(w){if(!v&&void 0===l.strength)throw new Error("Encryption method not supported");if(!C)throw new Error("File contains encrypted entry")}const D=yield function pBe(e,t,n){const o=!(!t.compressed&&!t.signed&&!t.encrypted)&&(t.useWebWorkers||void 0===t.useWebWorkers&&n.useWebWorkers),r=o&&n.workerScripts?n.workerScripts[t.codecType]:[];if(lm.length<n.maxWorkers){const a={};return lm.push(a),D2(a,e,t,n,s,o,r)}{const a=lm.find(l=>!l.busy);return a?(P2(a),D2(a,e,t,n,s,o,r)):new Promise(l=>I2.push({resolve:l,codecConstructor:e,options:t,webWorker:o,scripts:r}))}function s(a){if(I2.length){const[{resolve:l,codecConstructor:u,options:d,webWorker:h,scripts:m}]=I2.splice(0,1);l(D2(a,u,d,n,s,h,m))}else a.worker?(P2(a),Number.isFinite(n.terminateWorkerTimeout)&&n.terminateWorkerTimeout>=0&&(a.terminateTimeout=setTimeout(()=>{lm=lm.filter(l=>l!=a),a.terminate()},n.terminateWorkerTimeout))):lm=lm.filter(l=>l!=a)}}(d.Inflate,{codecType:dY,password:C,zipCrypto:v,encryptionStrength:l&&l.strength,signed:sb(r,i,"checkSignature"),passwordVerification:v&&(h.dataDescriptor?_>>>8&255:m>>>24&255),signature:m,compressed:0!=u,encrypted:w,useWebWorkers:sb(r,i,"useWebWorkers")},d);t.initialized||(yield t.init());const P=sb(r,i,"signal"),N=a+30+y.filenameLength+y.extraFieldLength;return yield function XBe(e,t,n,i,o,r,s){return W2.apply(this,arguments)}(D,s,t,N,()=>p,d,{onprogress:i.onprogress,signal:P}),t.getData()})()}}function WY(e,t,n){const i=e.rawBitFlag=tl(t,n+2),o=1==(1&i),r=Ns(t,n+6);Object.assign(e,{encrypted:o,version:tl(t,n),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:2048==(2048&i)},rawLastModDate:r,lastModDate:d3e(r),filenameLength:tl(t,n+22),extraFieldLength:tl(t,n+24)})}function qY(e,t,n,i){return Z2.apply(this,arguments)}function Z2(){return Z2=(0,Pe.Z)(function*(e,t,n,i){const o=t.rawExtraField,r=t.extraField=new Map,s=Pa(new Uint8Array(o));let a=0;try{for(;a<o.length;){const y=tl(s,a),A=tl(s,a+2);r.set(y,{type:y,data:o.slice(a+4,a+4+A)}),a+=4+A}}catch{}const l=tl(n,i+4);t.signature=Ns(n,i+10),t.uncompressedSize=Ns(n,i+18),t.compressedSize=Ns(n,i+14);const u=r.get(NBe);u&&(function s3e(e,t){t.zip64=!0;const n=Pa(e.data);e.values=[];for(let o=0;o<Math.floor(e.data.length/8);o++)e.values.push(dD(n,0+8*o));const i=jY.filter(o=>t[o]==cD);for(let o=0;o<i.length;o++)e[i[o]]=e.values[o];jY.forEach(o=>{if(t[o]==cD){if(void 0===e[o])throw new Error(t3e);t[o]=e[o]}})}(u,t),t.extraFieldZip64=u);const d=r.get(UBe);d&&(yield YY(d,"filename","rawFilename",t,e),t.extraFieldUnicodePath=d);const h=r.get(zBe);h&&(yield YY(h,"comment","rawComment",t,e),t.extraFieldUnicodeComment=h);const m=r.get(MBe);m?(function a3e(e,t,n){const i=Pa(e.data);e.vendorVersion=ab(i,0),e.vendorId=ab(i,2);const o=ab(i,4);e.strength=o,e.originalCompressionMethod=n,t.compressionMethod=e.compressionMethod=tl(i,5)}(m,t,l),t.extraFieldAES=m):t.compressionMethod=l;const _=r.get(FBe);_&&(function c3e(e,t){const n=Pa(e.data);let o,i=4;try{for(;i<e.data.length&&!o;){const r=tl(n,i),s=tl(n,i+2);r==BBe&&(o=e.data.slice(i+4,i+4+s)),i+=4+s}}catch{}try{if(o&&24==o.length){const r=Pa(o),s=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),l=r.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:l});const u=Q2(s),m={lastModDate:u,lastAccessDate:Q2(a),creationDate:Q2(l)};Object.assign(e,m),Object.assign(t,m)}}catch{}}(_,t),t.extraFieldNTFS=_);const p=r.get(kBe);p&&(function l3e(e,t){const n=Pa(e.data),i=ab(n,0),o=[],r=[];1==(1&i)&&(o.push("lastModDate"),r.push("rawLastModDate")),2==(2&i)&&(o.push("lastAccessDate"),r.push("rawLastAccessDate")),4==(4&i)&&(o.push("creationDate"),r.push("rawCreationDate"));let s=1;o.forEach((a,l)=>{if(e.data.length>=s+4){const u=Ns(n,s);t[a]=e[a]=new Date(1e3*u),e[r[l]]=u}s+=4})}(p,t),t.extraFieldExtendedTimestamp=p)}),Z2.apply(this,arguments)}function YY(e,t,n,i,o){return $2.apply(this,arguments)}function $2(){return $2=(0,Pe.Z)(function*(e,t,n,i,o){const r=Pa(e.data);e.version=ab(r,0),e.signature=Ns(r,1);const s=new $x;s.append(o[n]);const a=Pa(new Uint8Array(4));a.setUint32(0,s.get(),!0),e[t]=yield j2(e.data.subarray(5)),e.valid=!o.bitFlag.languageEncodingFlag&&e.signature==Ns(a,0),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}),$2.apply(this,arguments)}function K2(){return K2=(0,Pe.Z)(function*(e,t,n,i,o){const r=new Uint8Array(4);!function f3e(e,t,n){e.setUint32(t,n,!0)}(Pa(r),0,t);const a=i+o;return(yield l(i))||(yield l(Math.min(a,n)));function l(d){return u.apply(this,arguments)}function u(){return(u=(0,Pe.Z)(function*(d){const h=n-d,m=yield um(e,h,d);for(let _=m.length-i;_>=0;_--)if(m[_]==r[0]&&m[_+1]==r[1]&&m[_+2]==r[2]&&m[_+3]==r[3])return{offset:h+_,buffer:m.slice(_,_+i).buffer}})).apply(this,arguments)}}),K2.apply(this,arguments)}function sb(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function d3e(e){const t=(4294901760&e)>>16,n=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch{}}function Q2(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function ab(e,t){return e.getUint8(t)}function tl(e,t){return e.getUint16(t,!0)}function Ns(e,t){return e.getUint32(t,!0)}function dD(e,t){return Number(e.getBigUint64(t,!0))}function Pa(e){return new DataView(e.buffer)}function um(e,t,n){return e.readUint8Array(t,n)}new Uint8Array([7,0,2,0,65,69,3,0,0]),W7({Deflate:function _Fe(e){const n=new x7,i=function gFe(e){return e+5*(Math.floor(e/16383)+1)}(e&&e.chunkSize?e.chunkSize:65536),r=new Uint8Array(i);let s=e?e.level:-1;typeof s>"u"&&(s=-1),n.deflateInit(s),n.next_out=r,this.append=function(a,l){let u,d,h=0,m=0,_=0;const p=[];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,u=n.deflate(0),0!=u)throw new Error("deflating: "+n.msg);n.next_out_index&&p.push(n.next_out_index==i?new Uint8Array(r):r.slice(0,n.next_out_index)),_+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=h&&(l(n.next_in_index),h=n.next_in_index)}while(n.avail_in>0||0===n.avail_out);return p.length>1?(d=new Uint8Array(_),p.forEach(function(y){d.set(y,m),m+=y.length})):d=p[0]||new Uint8Array(0),d}},this.flush=function(){let a,l,u=0,d=0;const h=[];do{if(n.next_out_index=0,n.avail_out=i,a=n.deflate(4),1!=a&&0!=a)throw new Error("deflating: "+n.msg);i-n.avail_out>0&&h.push(r.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||0===n.avail_out);return n.deflateEnd(),l=new Uint8Array(d),h.forEach(function(m){l.set(m,u),u+=m.length}),l}},Inflate:function kFe(e){const n=new j7,i=e&&e.chunkSize?Math.floor(2*e.chunkSize):131072,r=new Uint8Array(i);let s=!1;n.inflateInit(),n.next_out=r,this.append=function(a,l){const u=[];let d,h,m=0,_=0,p=0;if(0!==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,0===n.avail_in&&!s&&(n.next_in_index=0,s=!0),d=n.inflate(0),s&&d===Oh){if(0!==n.avail_in)throw new Error("inflating: bad input")}else if(d!==Zi&&d!==Ph)throw new Error("inflating: "+n.msg);if((s||d===Ph)&&n.avail_in===a.length)throw new Error("inflating: bad input");n.next_out_index&&u.push(n.next_out_index===i?new Uint8Array(r):r.slice(0,n.next_out_index)),p+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=m&&(l(n.next_in_index),m=n.next_in_index)}while(n.avail_in>0||0===n.avail_out);return u.length>1?(h=new Uint8Array(p),u.forEach(function(y){h.set(y,_),_+=y.length})):h=u[0]||new Uint8Array(0),h}},this.flush=function(){n.inflateEnd()}}});const Lr=function S3e(e){if("string"==typeof e){const t=document.getElementById(e);if(null===t)throw new E(`Element with id "${e}" does not exist in the document.`);e=t}return e};function aF(){this._removalFunctions=[]}aF.prototype.add=function(e,t,n){if(!c(e))throw new E("event is required");const i=e.addEventListener(t,n);this._removalFunctions.push(i);const o=this;return function(){i();const r=o._removalFunctions;r.splice(r.indexOf(i),1)}},aF.prototype.removeAll=function(){const e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};const Rh=aF;function hg(){this._eventHelper=new Rh,this._definitionChanged=new Ue,this._intervals=new kc,this._intervals.changedEvent.addEventListener(hg.prototype._intervalsChanged,this)}Object.defineProperties(hg.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),hg.prototype.getValue=function(e,t){if(!c(e))throw new E("time is required");const n=this._intervals.findDataForIntervalContainingDate(e);if(c(n))return n.getValue(e,t)},hg.prototype.equals=function(e){return this===e||e instanceof hg&&this._intervals.equals(e._intervals,te.equals)},hg.prototype._intervalsChanged=function(){(function v3e(e,t,n,i){function o(){n.raiseEvent(e)}const r=[];t.removeAll();const s=i.length;for(let a=0;a<s;a++){const l=i.get(a);c(l.data)&&-1===r.indexOf(l.data)&&t.add(l.data.definitionChanged,o)}})(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)};const D3e=hg;function dm(e){this._referenceFrame=g(e,Zs.FIXED),this._definitionChanged=new Ue,this._composite=new D3e,this._composite.definitionChanged.addEventListener(dm.prototype._raiseDefinitionChanged,this)}Object.defineProperties(dm.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),dm.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Zs.FIXED,t)},dm.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new E("time is required.");if(!c(t))throw new E("referenceFrame is required.");const i=this._composite._intervals.findDataForIntervalContainingDate(e);if(c(i))return i.getValueInReferenceFrame(e,t,n)},dm.prototype.equals=function(e){return this===e||e instanceof dm&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,te.equals)},dm.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};const QY=dm;function cF(e){let t=(e=g(e,g.EMPTY_OBJECT)).currentTime,n=e.startTime,i=e.stopTime;if(t=c(t)?se.clone(t):c(n)?se.clone(n):c(i)?se.addDays(i,-1,new se):se.now(),n=c(n)?se.clone(n):se.clone(t),i=c(i)?se.clone(i):se.addDays(n,1,new se),se.greaterThan(n,i))throw new E("startTime must come before stopTime.");this.startTime=n,this.stopTime=i,this.clockRange=g(e.clockRange,om.UNBOUNDED),this.canAnimate=g(e.canAnimate,!0),this.onTick=new Ue,this.onStop=new Ue,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=wr(),this.currentTime=t,this.multiplier=g(e.multiplier,1),this.shouldAnimate=g(e.shouldAnimate,!1),this.clockStep=g(e.clockStep,$s.SYSTEM_CLOCK_MULTIPLIER)}Object.defineProperties(cF.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){se.equals(this._currentTime,e)||(this._clockStep===$s.SYSTEM_CLOCK&&(this._clockStep=$s.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===$s.SYSTEM_CLOCK&&(this._clockStep=$s.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===$s.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=se.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===$s.SYSTEM_CLOCK&&(this._clockStep=$s.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),cF.prototype.tick=function(){const e=wr();let t=se.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){const n=this._clockStep;if(n===$s.SYSTEM_CLOCK)t=se.now(t);else{const i=this._multiplier;t=se.addSeconds(t,n===$s.TICK_DEPENDENT?i:i*((e-this._lastSystemTime)/1e3),t);const o=this.clockRange,r=this.startTime,s=this.stopTime;if(o===om.CLAMPED)se.lessThan(t,r)?t=se.clone(r,t):se.greaterThan(t,s)&&(t=se.clone(s,t),this.onStop.raiseEvent(this));else if(o===om.LOOP_STOP)for(se.lessThan(t,r)&&(t=se.clone(r,t));se.greaterThan(t,s);)t=se.addSeconds(r,se.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};const hD=cF;function pg(){this._definitionChanged=new Ue,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}Object.defineProperties(pg.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:Dh("startTime"),stopTime:Dh("stopTime"),currentTime:Dh("currentTime"),clockRange:Dh("clockRange"),clockStep:Dh("clockStep"),multiplier:Dh("multiplier")}),pg.prototype.clone=function(e){return c(e)||(e=new pg),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e},pg.prototype.equals=function(e){return this===e||c(e)&&se.equals(this.startTime,e.startTime)&&se.equals(this.stopTime,e.stopTime)&&se.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier},pg.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.startTime=g(this.startTime,e.startTime),this.stopTime=g(this.stopTime,e.stopTime),this.currentTime=g(this.currentTime,e.currentTime),this.clockRange=g(this.clockRange,e.clockRange),this.clockStep=g(this.clockStep,e.clockStep),this.multiplier=g(this.multiplier,e.multiplier)},pg.prototype.getValue=function(e){return c(e)||(e=new hD),e.startTime=g(this.startTime,e.startTime),e.stopTime=g(this.stopTime,e.stopTime),e.currentTime=g(this.currentTime,e.currentTime),e.clockRange=g(this.clockRange,e.clockRange),e.multiplier=g(this.multiplier,e.multiplier),e.clockStep=g(this.clockStep,e.clockStep),e};const I3e=pg,O3e=function P3e(e,t){this.position=e,this.headingPitchRoll=t},R3e=function L3e(e,t){this.position=e,this.headingPitchRange=t};function pD(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new Ue,this.tourEnd=new Ue,this.entryStart=new Ue,this.entryEnd=new Ue,this._activeEntries=[]}function JY(e){for(let t=e.pop();void 0!==t;t=e.pop())t.stop()}function eX(e,t,n){const i=this.playlist[this.playlistIndex];if(i){const o=N3e.bind(this,e,t,n);if(this._activeEntries.push(i),this.entryStart.raiseEvent(i),i.blocking)i.play(o,e.scene.camera,t);else{const r=this;i.play(function(){r.entryEnd.raiseEvent(i);const s=r._activeEntries.indexOf(i);s>=0&&r._activeEntries.splice(s,1)}),o(e,t,n)}}else c(n)&&n(!1)}function N3e(e,t,n,i){const o=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(o,i),i)n(i);else{const r=this._activeEntries.indexOf(o);r>=0&&this._activeEntries.splice(r,1),this.playlistIndex++,eX.call(this,e,t,n)}}pD.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},pD.prototype.play=function(e,t){this.tourStart.raiseEvent();const n=this;eX.call(this,e,t,function(i){n.playlistIndex=0,i||JY(n._activeEntries),n.tourEnd.raiseEvent(i)})},pD.prototype.stop=function(){JY(this._activeEntries)};const M3e=pD;var Ii=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return this.None(e)},Out:function(e){return this.None(e)},InOut:function(e){return this.None(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 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}}),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 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}}),Back:Object.freeze({In:function(e){var t=1.70158;return 1===e?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return 0===e?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Ii.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*Ii.Bounce.In(2*e):.5*Ii.Bounce.Out(2*e-1)+.5}}),generatePow:function(e){return void 0===e&&(e=4),e=(e=e<Number.EPSILON?Number.EPSILON:e)>1e4?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(2*t,e)/2:(1-Math.pow(2-2*t,e))/2+.5}}}}),cb=function(){return performance.now()},tX=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){void 0===t&&(t=cb()),void 0===n&&(n=!1);var i=Object.keys(this._tweens);if(0===i.length)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var r=this._tweens[i[o]];r&&!1===r.update(t,!n)&&!n&&delete this._tweens[i[o]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),mg={Linear:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=mg.Utils.Linear;return t<0?r(e[0],e[1],i):t>1?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=mg.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=mg.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[n<o+1?n:o+1],e[n<o+2?n:o+2],i-o)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=mg.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var i=t;i>1;i--)n*=i;return e[t]=n,n}}(),CatmullRom:function(e,t,n,i,o){var r=.5*(n-e),s=.5*(i-t),a=o*o;return(2*t-2*n+r+s)*(o*a)+(-3*t+3*n-2*r-s)*a+r*o+t}}},lF=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),uF=new tX,nX=function(){function e(t,n){void 0===n&&(n=uF),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=Ii.Linear.None,this._interpolationFunction=mg.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=lF.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.to=function(t,n){if(void 0===n&&(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,this},e.prototype.duration=function(t){return void 0===t&&(t=1e3),this._duration=t,this},e.prototype.dynamic=function(t){return void 0===t&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,n){if(void 0===t&&(t=cb()),void 0===n&&(n=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var i in this._reversed=!1,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],l=Array.isArray(a),u=l?"array":typeof a,d=!l&&Array.isArray(i[s]);if("undefined"!==u&&"function"!==u){if(d){if(0===(h=i[s]).length)continue;for(var m=[a],_=0,p=h.length;_<p;_+=1){var y=this._handleRelativeValue(a,h[_]);if(isNaN(y)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}m.push(y)}d&&(i[s]=m)}if("object"!==u&&!l||!a||d)(typeof n[s]>"u"||r)&&(n[s]=a),l||(n[s]*=1),o[s]=d?i[s].slice().reverse():n[s]||0;else{n[s]=l?[]:{};var A=a;for(var x in A)n[s][x]=A[x];o[s]=l?[]:{};var h=i[s];if(!this._isDynamic){var C={};for(var x in h)C[x]=h[x];i[s]=h=C}this._setupProperties(A,n[s],h,o[s],r)}}}},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 void 0===t&&(t=cb()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this)),this},e.prototype.resume=function(t){return void 0===t&&(t=cb()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var t=0,n=this._chainedTweens.length;t<n;t++)this._chainedTweens[t].stop();return this},e.prototype.group=function(t){return void 0===t&&(t=uF),this._group=t,this},e.prototype.delay=function(t){return void 0===t&&(t=0),this._delayTime=t,this},e.prototype.repeat=function(t){return void 0===t&&(t=0),this._initialRepeat=t,this._repeat=t,this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},e.prototype.yoyo=function(t){return void 0===t&&(t=!1),this._yoyo=t,this},e.prototype.easing=function(t){return void 0===t&&(t=Ii.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return void 0===t&&(t=mg.Linear),this._interpolationFunction=t,this},e.prototype.chain=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._chainedTweens=t,this},e.prototype.onStart=function(t){return this._onStartCallback=t,this},e.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},e.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},e.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},e.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},e.prototype.onStop=function(t){return this._onStopCallback=t,this},e.prototype.update=function(t,n){if(void 0===t&&(t=cb()),void 0===n&&(n=!0),this._isPaused)return!0;var i,o;if(!this._goToEnd&&!this._isPlaying){if(t>this._startTime+this._duration)return!1;n&&this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),!1===this._onEveryStartCallbackFired&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),o=(t-this._startTime)/this._duration;var s=this._easingFunction(o=0===this._duration||o>1?1:o);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,s),this._onUpdateCallback&&this._onUpdateCallback(this._object,o),1===o){if(this._repeat>0){for(i in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)!this._yoyo&&"string"==typeof this._valuesEnd[i]&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._startTime=void 0!==this._repeatDelayTime?t+this._repeatDelayTime:t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,l=this._chainedTweens.length;a<l;a++)this._chainedTweens[a].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(t,n,i,o){for(var r in i)if(void 0!==n[r]){var s=n[r]||0,a=i[r],l=Array.isArray(t[r]),u=Array.isArray(a);!l&&u?t[r]=this._interpolationFunction(a,o):"object"==typeof a&&a?this._updateProperties(t[r],s,a,o):"number"==typeof(a=this._handleRelativeValue(s,a))&&(t[r]=s+(a-s)*o)}},e.prototype._handleRelativeValue=function(t,n){return"string"!=typeof n?n:"+"===n.charAt(0)||"-"===n.charAt(0)?t+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(t){var n=this._valuesStartRepeat[t],i=this._valuesEnd[t];this._valuesStartRepeat[t]="string"==typeof i?this._valuesStartRepeat[t]+parseFloat(i):this._valuesEnd[t],this._valuesEnd[t]=n},e}(),tf=uF;tf.getAll.bind(tf),tf.removeAll.bind(tf),tf.add.bind(tf),tf.remove.bind(tf),tf.update.bind(tf);const Pc=Object.freeze({LINEAR_NONE:Ii.Linear.None,QUADRATIC_IN:Ii.Quadratic.In,QUADRATIC_OUT:Ii.Quadratic.Out,QUADRATIC_IN_OUT:Ii.Quadratic.InOut,CUBIC_IN:Ii.Cubic.In,CUBIC_OUT:Ii.Cubic.Out,CUBIC_IN_OUT:Ii.Cubic.InOut,QUARTIC_IN:Ii.Quartic.In,QUARTIC_OUT:Ii.Quartic.Out,QUARTIC_IN_OUT:Ii.Quartic.InOut,QUINTIC_IN:Ii.Quintic.In,QUINTIC_OUT:Ii.Quintic.Out,QUINTIC_IN_OUT:Ii.Quintic.InOut,SINUSOIDAL_IN:Ii.Sinusoidal.In,SINUSOIDAL_OUT:Ii.Sinusoidal.Out,SINUSOIDAL_IN_OUT:Ii.Sinusoidal.InOut,EXPONENTIAL_IN:Ii.Exponential.In,EXPONENTIAL_OUT:Ii.Exponential.Out,EXPONENTIAL_IN_OUT:Ii.Exponential.InOut,CIRCULAR_IN:Ii.Circular.In,CIRCULAR_OUT:Ii.Circular.Out,CIRCULAR_IN_OUT:Ii.Circular.InOut,ELASTIC_IN:Ii.Elastic.In,ELASTIC_OUT:Ii.Elastic.Out,ELASTIC_IN_OUT:Ii.Elastic.InOut,BACK_IN:Ii.Back.In,BACK_OUT:Ii.Back.Out,BACK_IN_OUT:Ii.Back.InOut,BOUNCE_IN:Ii.Bounce.In,BOUNCE_OUT:Ii.Bounce.Out,BOUNCE_IN_OUT:Ii.Bounce.InOut});function mD(e,t,n){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=n,this.flyToMode=t}mD.prototype.play=function(e,t,n){if(this.activeCamera=t,c(e)&&null!==e){const o=this;this.activeCallback=function(r){delete o.activeCallback,delete o.activeCamera,e(!c(r)&&r)}}const i=this.getCameraOptions(n);if(this.view.headingPitchRoll)t.flyTo(i);else if(this.view.headingPitchRange){const o=new be(this.view.position);t.flyToBoundingSphere(o,i)}},mD.prototype.stop=function(){c(this.activeCamera)&&this.activeCamera.cancelFlight(),c(this.activeCallback)&&this.activeCallback(!0)},mD.prototype.getCameraOptions=function(e){let t={duration:this.duration};return c(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=Pc.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),c(e)&&(t=Gn(t,e)),t};const j3e=mD;function dF(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}dF.prototype.play=function(e){const t=this;this.activeCallback=e,this.timeout=setTimeout(function(){delete t.activeCallback,e(!1)},1e3*this.duration)},dF.prototype.stop=function(){clearTimeout(this.timeout),c(this.activeCallback)&&this.activeCallback(!0)};const W3e=dF;function Nh(e,t){this._value=void 0,this._definitionChanged=new Ue,this._eventHelper=new Rh,this._referenceFrame=g(t,Zs.FIXED),this.setValue(e)}Object.defineProperties(Nh.prototype,{isConstant:{get:function(){const e=this._value;if(!c(e))return!0;const t=e.length;for(let n=0;n<t;n++)if(!te.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),Nh.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Zs.FIXED,t)},Nh.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new E("time is required.");if(!c(t))throw new E("referenceFrame is required.");const i=this._value;if(!c(i))return;const o=i.length;c(n)||(n=new Array(o));let r=0,s=0;for(;r<o;){const l=i[r].getValueInReferenceFrame(e,t,n[r]);c(l)&&(n[s]=l,s++),r++}return n.length=s,n},Nh.prototype.setValue=function(e){const t=this._eventHelper;if(t.removeAll(),c(e)){this._value=e.slice();const n=e.length;for(let i=0;i<n;i++){const o=e[i];c(o)&&t.add(o.definitionChanged,Nh.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},Nh.prototype.equals=function(e){return this===e||e instanceof Nh&&this._referenceFrame===e._referenceFrame&&te.arrayEquals(this._value,e._value)},Nh.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};const q3e=Nh;function _g(e){let t=e._targetProperty;if(!c(t)){let n=e._targetEntity;if(!c(n)){if(n=e._targetCollection.getById(e._targetId),!c(n))return void(e._targetEntity=e._targetProperty=void 0);n.definitionChanged.addEventListener(nl.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=n}const i=e._targetPropertyNames;t=e._targetEntity;for(let o=0,r=i.length;o<r&&c(t);++o)t=t[i[o]];e._targetProperty=t}return t}function nl(e,t,n){if(!c(e))throw new E("targetCollection is required.");if(!c(t)||""===t)throw new E("targetId is required.");if(!c(n)||0===n.length)throw new E("targetPropertyNames is required.");for(let i=0;i<n.length;i++){const o=n[i];if(!c(o)||""===o)throw new E("reference contains invalid properties.")}this._targetCollection=e,this._targetId=t,this._targetPropertyNames=n,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new Ue,e.collectionChanged.addEventListener(nl.prototype._onCollectionChanged,this)}Object.defineProperties(nl.prototype,{isConstant:{get:function(){return te.isConstant(_g(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){const e=_g(this);return c(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return _g(this)}}}),nl.fromString=function(e,t){if(!c(e))throw new E("targetCollection is required.");if(!c(t))throw new E("referenceString is required.");let n;const i=[];let o=!0,r=!1,s="";for(let a=0;a<t.length;++a){const l=t.charAt(a);r?(s+=l,r=!1):"\\"===l?r=!0:o&&"#"===l?(n=s,o=!1,s=""):o||"."!==l?s+=l:(i.push(s),s="")}return i.push(s),new nl(e,n,i)},nl.prototype.getValue=function(e,t){const n=_g(this);return c(n)?n.getValue(e,t):void 0},nl.prototype.getValueInReferenceFrame=function(e,t,n){const i=_g(this);return c(i)?i.getValueInReferenceFrame(e,t,n):void 0},nl.prototype.getType=function(e){const t=_g(this);return c(t)?t.getType(e):void 0},nl.prototype.equals=function(e){if(this===e)return!0;const t=this._targetPropertyNames,n=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==n.length)return!1;const i=this._targetPropertyNames.length;for(let o=0;o<i;o++)if(t[o]!==n[o])return!1;return!0},nl.prototype._onTargetEntityDefinitionChanged=function(e,t,n,i){c(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))},nl.prototype._onCollectionChanged=function(e,t,n){let i=this._targetEntity;c(i)&&-1!==n.indexOf(i)?(i.definitionChanged.removeEventListener(nl.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):c(i)||(i=_g(this),c(i)&&this._definitionChanged.raiseEvent(this))};const iX=nl,lb=Object.freeze({NONE:0,HOLD:1,EXTRAPOLATE:2}),fF={type:"Linear",getRequiredDataPoints:function(e){return 2},interpolateOrderZero:function(e,t,n,i,o){if(2!==t.length)throw new E("The xTable provided to the linear interpolator must have exactly two elements.");if(i<=0)throw new E("There must be at least 1 dependent variable for each independent variable.");let r,s,a;c(o)||(o=new Array(i));const l=t[0],u=t[1];if(l===u)throw new E("Divide by zero error: xTable[0] and xTable[1] are equal");for(r=0;r<i;r++)s=n[r],a=n[r+i],o[r]=((a-s)*e+u*s-l*a)/(u-l);return o}},Y3e=fF,oX={packedLength:1,pack:function(e,t,n){t[n=g(n,0)]=e},unpack:function(e,t,n){return e[t=g(t,0)]}};function rX(e,t,n){let i;const o=e.length,r=n.length,s=o+r;if(e.length=s,o!==t){let a=o-1;for(i=s-1;i>=t;i--)e[i]=e[a--]}for(i=0;i<r;i++)e[t++]=n[i]}function sX(e,t){return e instanceof se?e:"string"==typeof e?se.fromIso8601(e):se.addSeconds(t,e,new se)}const hF=[],pF=[];function _D(e,t,n,i,o){let s,a,l,u,d,h,r=0;for(;r<i.length;){d=sX(i[r],e),l=ke(t,d,se.compare);let m=0,_=0;if(l<0){for(l=~l,u=l*o,a=void 0,h=t[l];r<i.length&&(d=sX(i[r],e),!(c(a)&&se.compare(a,d)>=0||c(h)&&se.compare(d,h)>=0));){for(hF[m++]=d,r+=1,s=0;s<o;s++)pF[_++]=i[r],r+=1;a=d}m>0&&(pF.length=_,rX(n,u,pF),hF.length=m,rX(t,l,hF))}else{for(s=0;s<o;s++)r++,n[l*o+s]=i[r];r++}}}function Ku(e,t){T.defined("type",e);let n=e;n===Number&&(n=oX);let s,i=n.packedLength,o=g(n.packedInterpolationLength,i),r=0;if(c(t)){const a=t.length;s=new Array(a);for(let l=0;l<a;l++){let u=t[l];u===Number&&(u=oX);const d=u.packedLength;i+=d,o+=g(u.packedInterpolationLength,d),s[l]=u}r=a}this._type=e,this._innerType=n,this._interpolationDegree=1,this._interpolationAlgorithm=Y3e,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=i,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new Ue,this._derivativeTypes=t,this._innerDerivativeTypes=s,this._inputOrder=r,this._forwardExtrapolationType=lb.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=lb.NONE,this._backwardExtrapolationDuration=0}function aX(e,t,n){const i=e._packedLength;e._times.splice(t,n),e._values.splice(t*i,n*i),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}Object.defineProperties(Ku.prototype,{isConstant:{get:function(){return 0===this._values.length}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}}),Ku.prototype.getValue=function(e,t){T.defined("time",e);const n=this._times,i=n.length;if(0===i)return;let o;const r=this._innerType,s=this._values;let a=ke(n,e,se.compare);if(a<0){if(a=~a,0===a){if(o=this._backwardExtrapolationDuration,this._backwardExtrapolationType===lb.NONE||0!==o&&se.secondsDifference(n[a],e)>o)return;if(this._backwardExtrapolationType===lb.HOLD)return r.unpack(s,0,t)}if(a>=i){if(a=i-1,o=this._forwardExtrapolationDuration,this._forwardExtrapolationType===lb.NONE||0!==o&&se.secondsDifference(e,n[a])>o)return;if(this._forwardExtrapolationType===lb.HOLD)return a=i-1,r.unpack(s,a*r.packedLength,t)}const l=this._xTable,u=this._yTable,d=this._interpolationAlgorithm,h=this._packedInterpolationLength,m=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;const v=Math.min(d.getRequiredDataPoints(this._interpolationDegree,m),i);v!==this._numberOfPoints&&(this._numberOfPoints=v,l.length=v,u.length=v*h)}const _=this._numberOfPoints-1;if(_<1)return;let p=0,y=i-1;if(y-p+1>=_+1){let v=a-(_/2|0)-1;v<p&&(v=p);let D=v+_;D>y&&(D=y,v=D-_,v<p&&(v=p)),p=v,y=D}const x=y-p+1;for(let v=0;v<x;++v)l[v]=se.secondsDifference(n[p+v],n[y]);if(c(r.convertPackedArrayForInterpolation))r.convertPackedArrayForInterpolation(s,p,y,u);else{let v=0;const D=this._packedLength;let P=p*D;const N=(y+1)*D;for(;P<N;)u[v]=s[P],P++,v++}const C=se.secondsDifference(e,n[y]);let w;if(0!==m&&c(d.interpolate)){const v=Math.floor(h/(m+1));w=d.interpolate(C,l,u,v,m,m,this._interpolationResult)}else w=d.interpolateOrderZero(C,l,u,h,this._interpolationResult);return c(r.unpackInterpolationResult)?r.unpackInterpolationResult(w,s,p,y,t):r.unpack(w,0,t)}return r.unpack(s,a*this._packedLength,t)},Ku.prototype.setInterpolationOptions=function(e){if(!c(e))return;let t=!1;const n=e.interpolationAlgorithm,i=e.interpolationDegree;c(n)&&this._interpolationAlgorithm!==n&&(this._interpolationAlgorithm=n,t=!0),c(i)&&this._interpolationDegree!==i&&(this._interpolationDegree=i,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))},Ku.prototype.addSample=function(e,t,n){const i=this._innerDerivativeTypes,o=c(i);T.defined("time",e),T.defined("value",t),o&&T.defined("derivatives",n);const r=this._innerType,s=[];if(s.push(e),r.pack(t,s,s.length),o){const a=i.length;for(let l=0;l<a;l++)i[l].pack(n[l],s,s.length)}_D(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},Ku.prototype.addSamples=function(e,t,n){const i=this._innerDerivativeTypes,o=c(i);if(T.defined("times",e),T.defined("values",t),e.length!==t.length)throw new E("times and values must be the same length.");if(o&&(!c(n)||n.length!==e.length))throw new E("times and derivativeValues must be the same length.");const r=this._innerType,s=e.length,a=[];for(let l=0;l<s;l++)if(a.push(e[l]),r.pack(t[l],a,a.length),o){const u=n[l],d=i.length;for(let h=0;h<d;h++)i[h].pack(u[h],a,a.length)}_D(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},Ku.prototype.addSamplesPackedArray=function(e,t){T.defined("packedSamples",e),_D(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},Ku.prototype.removeSample=function(e){T.defined("time",e);const t=ke(this._times,e,se.compare);return!(t<0||(aX(this,t,1),0))},Ku.prototype.removeSamples=function(e){T.defined("timeInterval",e);const t=this._times;let n=ke(t,e.start,se.compare);n<0?n=~n:e.isStartIncluded||++n;let i=ke(t,e.stop,se.compare);i<0?i=~i:e.isStopIncluded&&++i,aX(this,n,i-n)},Ku.prototype.equals=function(e){if(this===e)return!0;if(!c(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;const t=this._derivativeTypes,n=c(t),i=e._derivativeTypes;if(n!==c(i))return!1;let r,s;if(n){if(s=t.length,s!==i.length)return!1;for(r=0;r<s;r++)if(t[r]!==i[r])return!1}const a=this._times,l=e._times;if(s=a.length,s!==l.length)return!1;for(r=0;r<s;r++)if(!se.equals(a[r],l[r]))return!1;const u=this._values,d=e._values;for(s=u.length,r=0;r<s;r++)if(u[r]!==d[r])return!1;return!0},Ku._mergeNewSamples=_D;const X3e=Ku;function Xl(e,t){let n;if((t=g(t,0))>0){n=new Array(t);for(let i=0;i<t;i++)n[i]=f}this._numberOfDerivatives=t,this._property=new X3e(f,n),this._definitionChanged=new Ue,this._referenceFrame=g(e,Zs.FIXED),this._property._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)}Object.defineProperties(Xl.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}}),Xl.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Zs.FIXED,t)},Xl.prototype.getValueInReferenceFrame=function(e,t,n){if(T.defined("time",e),T.defined("referenceFrame",t),n=this._property.getValue(e,n),c(n))return uM.convertToReferenceFrame(e,n,this._referenceFrame,t,n)},Xl.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)},Xl.prototype.addSample=function(e,t,n){const i=this._numberOfDerivatives;if(i>0&&(!c(n)||n.length!==i))throw new E("derivatives length must be equal to the number of derivatives.");this._property.addSample(e,t,n)},Xl.prototype.addSamples=function(e,t,n){this._property.addSamples(e,t,n)},Xl.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},Xl.prototype.removeSample=function(e){return this._property.removeSample(e)},Xl.prototype.removeSamples=function(e){this._property.removeSamples(e)},Xl.prototype.equals=function(e){return this===e||e instanceof Xl&&te.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};const mF=Xl;function fm(e){this._definitionChanged=new Ue,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(fm.prototype,{isConstant:{get:function(){return te.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return c(this._value)?this._value.referenceFrame:Zs.FIXED}}}),fm.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Zs.FIXED,t)},fm.prototype.setValue=function(e){this._value!==e&&(this._value=e,c(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),c(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},fm.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new E("time is required.");if(!c(t))throw new E("referenceFrame is required.");if(c(this._value))return n=this._value.getValueInReferenceFrame(e,t,n),c(n)?ge.WGS84.scaleToGeodeticSurface(n,n):void 0},fm.prototype.equals=function(e){return this===e||e instanceof fm&&this._value===e._value},fm.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};const _F=fm;function gg(){this._definitionChanged=new Ue,this._intervals=new kc,this._intervals.changedEvent.addEventListener(gg.prototype._intervalsChanged,this)}Object.defineProperties(gg.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),gg.prototype.getValue=function(e,t){if(!c(e))throw new E("time is required");const n=this._intervals.findDataForIntervalContainingDate(e);return c(n)&&"function"==typeof n.clone?n.clone(t):n},gg.prototype.equals=function(e){return this===e||e instanceof gg&&this._intervals.equals(e._intervals,te.equals)},gg.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};const Z3e=gg,cX={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){let t=e.toLowerCase();return t=PU(t),cX[t]}};let gF;typeof DOMParser<"u"&&(gF=new DOMParser);const $3e=new J2e({stripPrefix:!1,email:!1,replaceFn:function(e){return"scheme"===e.urlMatchType||"www"===e.urlMatchType}}),hm=32,lX=2414016,uX=1,dX=16093e3,fX=.1,hX=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],pX=["http://www.google.com/kml/ext/2.2"],Be={kml:hX,gx:pX,atom:["http://www.w3.org/2005/Atom"],kmlgx:hX.concat(pX)},yF={Document:vX,Folder:function mke(e,t,n,i){const o=TD(e,t,n),r=zt(n);r.parentEntity=o.entity,vX(0,t,r,i)},Placemark:function _ke(e,t,n,i){const o=TD(e,t,n),r=o.entity,s=o.styleEntity;let a=!1;const l=t.childNodes;for(let u=0,d=l.length;u<d&&!a;u++){const h=l.item(u),m=SX[h.localName];c(m)&&(m(e,n.entityCollection,h,r,s,r.id),a=!0)}a||(r.merge(s),AD(e,r,s))},NetworkLink:function wke(e,t,n,i){const r=TD(e,t,n).entity,s=n.sourceResource,a=n.uriResolver;let l=Pi(t,"Link",Be.kml);if(c(l)||(l=Pi(t,"Url",Be.kml)),c(l)){let d,h,u=Pn(l,"href",Be.kml);if(c(u)){let m=u;if(u=AF(u,s,n.uriResolver),/^data:/.test(u.getUrlComponent()))/\.kmz/i.test(s.getUrlComponent())||(m=s.getDerivedResource({url:m}));else{if(m=u.clone(),d=Pn(l,"viewRefreshMode",Be.kml),"onRegion"===d)return void gn("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");h=g(Pn(l,"viewBoundScale",Be.kml),1);const A="onStop"===d?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",x=g(Pn(l,"viewFormat",Be.kml),A),C=Pn(l,"httpQuery",Be.kml);c(x)&&u.setQueryParameters(cp(xD(x))),c(C)&&u.setQueryParameters(cp(xD(C))),vF(u,e.camera,e.canvas,h,e._lastCameraView.bbox,e._ellipsoid)}const _={sourceUri:m,uriResolver:a,context:r.id,screenOverlayContainer:n.screenOverlayContainer},p=new J0,y=IF(e,p,u,_).then(function(A){const x=e._entityCollection,C=p.values;x.suspendEvents();for(let D=0;D<C.length;D++){const P=C[D];c(P.parent)||(P.parent=r,PF(P)),x.add(P)}x.resumeEvents();const w=Pn(l,"refreshMode",Be.kml);let v=g(ri(l,"refreshInterval",Be.kml),0);if("onInterval"===w&&v>0||"onExpire"===w||"onStop"===d){const D=Pi(A,"NetworkLinkControl",Be.kml),P=c(D),N=se.now(),R={id:kr(),href:u,cookie:{},lastUpdated:N,updating:!1,entity:r,viewBoundScale:h,needsUpdate:!1,cameraUpdateTime:N};let B=0;if(P&&(R.cookie=cp(g(Pn(D,"cookie",Be.kml),"")),B=g(ri(D,"minRefreshPeriod",Be.kml),0)),"onInterval"===w)P&&(v=Math.max(B,v)),R.refreshMode=mm.INTERVAL,R.time=v;else if("onExpire"===w){let F;if(P&&(F=Pn(D,"expires",Be.kml)),c(F))try{const S=se.fromIso8601(F),I=se.secondsDifference(S,N);I>0&&I<B&&se.addSeconds(N,B,S),R.refreshMode=mm.EXPIRE,R.time=S}catch{gn("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else gn("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else c(e.camera)?(R.refreshMode=mm.STOP,R.time=g(ri(l,"viewRefreshTime",Be.kml),0)):gn("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires the `camera` property to be defined.");c(R.refreshMode)&&e._networkLinks.set(R.id,R)}}).catch(function(A){gn(`An error occured during loading ${u.url}`),e._error.raiseEvent(e,A)});i.addPromise(y)}}},GroundOverlay:function xke(e,t,n,i){const r=TD(e,t,n).entity;let s,a=!1;const l=e._ellipsoid,u=yD(Pi(t,"LatLonQuad",Be.gx),l),d=ri(t,"drawOrder",Be.kml);if(c(u))s=xF(),s.hierarchy=new j_(u),s.zIndex=d,r.polygon=s,a=!0;else{s=new Dq,s.zIndex=d,r.rectangle=s;const p=Pi(t,"LatLonBox",Be.kml);if(c(p)){let y=ri(p,"west",Be.kml),A=ri(p,"south",Be.kml),x=ri(p,"east",Be.kml),C=ri(p,"north",Be.kml);c(y)&&(y=O.negativePiToPi(O.toRadians(y))),c(A)&&(A=O.clampToLatitudeRange(O.toRadians(A))),c(x)&&(x=O.negativePiToPi(O.toRadians(x))),c(C)&&(C=O.clampToLatitudeRange(O.toRadians(C))),s.coordinates=new Ce(y,A,x,C);const w=ri(p,"rotation",Be.kml);if(c(w)){const v=O.toRadians(w);s.rotation=v,s.stRotation=v}}}const h=Pi(t,"Icon",Be.kml),m=CF(h,e,n.sourceResource,n.uriResolver,!0);if(c(m)){a&&gn("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");const p=ri(h,"x",Be.gx),y=ri(h,"y",Be.gx),A=ri(h,"w",Be.gx),x=ri(h,"h",Be.gx);(c(p)||c(y)||c(A)||c(x))&&gn("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),s.material=m,s.material.color=yg(t,"color",Be.kml),s.material.transparent=!0}else s.material=yg(t,"color",Be.kml);let _=Pn(t,"altitudeMode",Be.kml);c(_)?"absolute"===_?(s.height=ri(t,"altitude",Be.kml),s.zIndex=void 0):"clampToGround"!==_&&gn("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${_}`):(_=Pn(t,"altitudeMode",Be.gx),"relativeToSeaFloor"===_?(gn("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),s.height=ri(t,"altitude",Be.kml),s.zIndex=void 0):"clampToSeaFloor"===_?gn("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):c(_)&&gn("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${_}`))},PhotoOverlay:PX,ScreenOverlay:function Tke(e,t,n,i){const o=n.screenOverlayContainer;if(!c(o))return;const r=n.sourceResource,s=n.uriResolver,l=CF(Pi(t,"Icon",Be.kml),e,r,s,!1);if(!c(l))return;const u=document.createElement("img");e._screenOverlays.push(u),u.src=l.url,u.onload=function(){const d=["position: absolute"],h=Pi(t,"screenXY",Be.kml),m=Pi(t,"overlayXY",Be.kml),_=Pi(t,"size",Be.kml);let p,y,A,x,C,w;c(_)&&(p=pm(_,"x"),y=pm(_,"y"),A=es(_,"xunits"),x=es(_,"yunits"),c(p)&&-1!==p&&0!==p&&("fraction"===A?C=`width: ${Math.floor(100*p)}%`:"pixels"===A&&(C=`width: ${p}px`),d.push(C)),c(y)&&-1!==y&&0!==y&&("fraction"===x?w=`height: ${Math.floor(100*y)}%`:"pixels"===x&&(w=`height: ${y}px`),d.push(w))),u.style=d.join(";");let v=0,D=u.height;c(m)&&(p=pm(m,"x"),y=pm(m,"y"),A=es(m,"xunits"),x=es(m,"yunits"),c(p)&&("fraction"===A?v=p*u.width:("pixels"===A||"insetPixels"===A)&&(v=p)),c(y)&&("fraction"===x?D=y*u.height:("pixels"===x||"insetPixels"===x)&&(D=y))),c(h)&&(p=pm(h,"x"),y=pm(h,"y"),A=es(h,"xunits"),x=es(h,"yunits"),c(p)&&("fraction"===A?C=`left: calc(${Math.floor(100*p)}% - ${v}px)`:"pixels"===A?C=`left: ${p-v}px`:"insetPixels"===A&&(C=`right: ${p-v}px`),d.push(C)),c(y)&&("fraction"===x?w=`bottom: calc(${Math.floor(100*y)}% - ${D}px)`:"pixels"===x?w=`bottom: ${y-D}px`:"insetPixels"===x&&(w=`top: ${y-D}px`),d.push(w))),u.style=d.join(";")},o.appendChild(u)},Tour:function yke(e,t,n,i){const o=Pn(t,"name",Be.kml),r=es(t,"id"),s=new M3e(o,r),a=Pi(t,"Playlist",Be.gx);if(a){const l=e._ellipsoid,u=a.childNodes;for(let d=0;d<u.length;d++){const h=u[d];if(h.localName){const m=gke[h.localName];m?m(s,h,l):console.log(`Unknown KML Tour playlist entry type ${h.localName}`)}}}e._kmlTours.push(s)}};function nf(e){this._dataSource=e,this._deferred=ap(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}function mX(e){const t={xsi:"http://www.w3.org/2001/XMLSchema-instance"};let n,i,o,r;for(const s in t)t.hasOwnProperty(s)&&(o=RegExp(`[< ]${s}:`),r=`xmlns:${s}=`,o.test(e)&&-1===e.indexOf(r)&&(c(n)||(n=e.substr(0,e.indexOf("<kml")+4),i=e.substr(n.length)),n+=` ${r}"${t[s]}"`));return c(n)&&(e=n+i),e}function _X(e){let t=e.indexOf("xmlns:");const n=e.indexOf(">",t);let i,o,r;for(;-1!==t&&t<n;)i=e.slice(t,e.indexOf('"',t)),o=t,t=e.indexOf(i,t+1),-1!==t?(r=e.indexOf('"',e.indexOf('"',t)+1),t=(e=e.slice(0,t-1)+e.slice(r+1,e.length)).indexOf("xmlns:",o-1)):t=e.indexOf("xmlns:",o+1);return e}function bF(e,t){const n=g(cX.detectFromFilename(e.filename),"application/octet-stream");return Promise.resolve(e.getData(new CBe(n))).then(function(i){t[e.filename]=i})}function il(e,t,n,i){const o=i.keys,r=new Hs("."),s=e.querySelectorAll(t);for(let a=0;a<s.length;a++){const l=s[a],u=l.getAttribute(n);if(c(u)){const h=new Hs(u).absoluteTo(r).toString(),m=o.indexOf(h);if(-1!==m){const _=o[m];l.setAttribute(n,i[_]),"a"===t&&null===l.getAttribute("download")&&l.setAttribute("download",_)}}}}function ol(e,t,n,i){const o=e.querySelectorAll(t);for(let r=0;r<o.length;r++){const s=o[r],l=AF(s.getAttribute(n),i);c(l)&&s.setAttribute(n,l.url)}}function gX(e,t,n){let i=es(e,"id");i=c(i)&&0!==i.length?i:kr(),c(n)&&(i=n+i);let o=t.getById(i);return c(o)&&(i=kr(),c(n)&&(i=n+i)),o=t.add(new wc({id:i})),c(o.kml)||(o.addProperty("kml"),o.kml=new Ike),o}function tC(e,t){return"absolute"===e||"relativeToGround"===e||"relativeToSeaFloor"===t}function gD(e,t){if(!c(e))return f.fromDegrees(0,0,0,t);const n=e.match(/[^\s,\n]+/g);if(!c(n))return f.fromDegrees(0,0,0,t);let i=parseFloat(n[0]),o=parseFloat(n[1]),r=parseFloat(n[2]);return i=isNaN(i)?0:i,o=isNaN(o)?0:o,r=isNaN(r)?0:r,f.fromDegrees(i,o,r,t)}function yD(e,t){if(!c(e))return;const n=e.textContent.match(/[^\s\n]+/g);if(!c(n))return;const i=n.length,o=new Array(i);let r=0;for(let s=0;s<i;s++)o[r++]=gD(n[s],t);return o}function pm(e,t){if(!c(e))return;const n=e.getAttribute(t);if(null!==n){const i=parseFloat(n);return isNaN(i)?void 0:i}}function es(e,t){if(!c(e))return;const n=e.getAttribute(t);return null!==n?n:void 0}function Pi(e,t,n){if(!c(e))return;const i=e.childNodes,o=i.length;for(let r=0;r<o;r++){const s=i[r];if(s.localName===t&&-1!==n.indexOf(s.namespaceURI))return s}}function yX(e,t,n){if(!c(e))return;const i=[],o=e.getElementsByTagNameNS("*",t),r=o.length;for(let s=0;s<r;s++){const a=o[s];a.localName===t&&-1!==n.indexOf(a.namespaceURI)&&i.push(a)}return i}function Qu(e,t,n){if(!c(e))return[];const i=[],o=e.childNodes,r=o.length;for(let s=0;s<r;s++){const a=o[s];a.localName===t&&-1!==n.indexOf(a.namespaceURI)&&i.push(a)}return i}function ri(e,t,n){const i=Pi(e,t,n);if(c(i)){const o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function Pn(e,t,n){const i=Pi(e,t,n);if(c(i))return i.textContent.trim()}function Ju(e,t,n){const i=Pi(e,t,n);if(c(i)){const o=i.textContent.trim();return"1"===o||/^true$/i.test(o)}}function AF(e,t,n){if(!c(e))return;let i;if(c(n)){let o=n[e=e.replace(/\\/g,"/")];if(c(o))i=new jt({url:o});else{const r=new Hs(t.getUrlComponent());o=n[new Hs(e).absoluteTo(r)],c(o)&&(i=new jt({url:o}))}}return c(i)||(i=t.getDerivedResource({url:e})),i}Object.defineProperties(nf.prototype,{dataSource:{get:function(){return this._dataSource}}}),nf.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0},nf.prototype.addPromise=function(e){this._promises.push(e)},nf.prototype.wait=function(){const e=this._deferred;return this._used||e.resolve(),Promise.all([e.promise,Promise.all(this._promises)])},nf.prototype.process=function(){const e=1===this._stack.length;return e&&(this._started=rl._getTimestamp()),this._process(e)},nf.prototype._giveUpTime=function(){if(this._timeoutSet)return;this._timeoutSet=!0,this._timeThreshold=50;const e=this;setTimeout(function(){e._timeoutSet=!1,e._started=rl._getTimestamp(),e._process(!0)},0)},nf.prototype._nextNode=function(){const e=this._stack,t=e[e.length-1],n=t.index,i=t.nodes;if(n!==i.length)return++t.index,i[n]},nf.prototype._pop=function(){const e=this._stack;return e.pop(),0!==e.length||(this._deferred.resolve(),!1)},nf.prototype._process=function(e){const t=this.dataSource,n=this._stack[this._stack.length-1].processingData;let i=this._nextNode();for(;c(i);){const o=yF[i.localName];if(c(o)&&(-1!==Be.kml.indexOf(i.namespaceURI)||-1!==Be.gx.indexOf(i.namespaceURI))&&(o(t,i,n,this),this._timeoutSet||rl._getTimestamp()>this._started+this._timeThreshold))return void this._giveUpTime();i=this._nextNode()}this._pop()&&e&&this._process(!0)};const Oc={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function TF(e,t){if(!c(e)||/^\s*$/gm.test(e))return;"#"===e[0]&&(e=e.substring(1));const n=parseInt(e.substring(0,2),16)/255,i=parseInt(e.substring(2,4),16)/255,o=parseInt(e.substring(4,6),16)/255,r=parseInt(e.substring(6,8),16)/255;return t?(r>0?(Oc.maximumRed=r,Oc.red=void 0):(Oc.maximumRed=void 0,Oc.red=0),o>0?(Oc.maximumGreen=o,Oc.green=void 0):(Oc.maximumGreen=void 0,Oc.green=0),i>0?(Oc.maximumBlue=i,Oc.blue=void 0):(Oc.maximumBlue=void 0,Oc.blue=0),Oc.alpha=n,X.fromRandom(Oc)):new X(r,o,i,n)}function yg(e,t,n){const i=Pn(e,t,n);if(c(i))return TF(i,"random"===Pn(e,"colorMode",n))}function bX(){const e=new aM;return e.width=hm,e.height=hm,e.scaleByDistance=new Mn(lX,uX,dX,fX),e.pixelOffsetScaleByDistance=new Mn(lX,uX,dX,fX),e}function xF(){const e=new VM;return e.outline=!0,e.outlineColor=X.WHITE,e}function AX(){const e=new wq;return e.translucencyByDistance=new Mn(3e6,1,5e6,0),e.pixelOffset=new G(17,0),e.horizontalOrigin=Ca.LEFT,e.font="16px sans-serif",e.style=Rl.FILL_AND_OUTLINE,e}function CF(e,t,n,i,o){let r=Pn(e,"href",Be.kml);if(!c(r)||0===r.length)return;if(0===r.indexOf("root://icons/palette-")){const a=r.charAt(21);let l=g(ri(e,"x",Be.gx),0),u=g(ri(e,"y",Be.gx),0);l=Math.min(l/32,7),u=7-Math.min(u/32,7),r=`https://maps.google.com/mapfiles/kml/pal${a}/icon${8*u+l}.png`}const s=AF(r,n,i);if(o){const a=Pn(e,"refreshMode",Be.kml),l=Pn(e,"viewRefreshMode",Be.kml);"onInterval"===a||"onExpire"===a?gn(`kml-refreshMode-${a}`,`KML - Unsupported Icon refreshMode: ${a}`):("onStop"===l||"onRegion"===l)&&gn(`kml-refreshMode-${l}`,`KML - Unsupported Icon viewRefreshMode: ${l}`);const u=g(Pn(e,"viewBoundScale",Be.kml),1),d="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",h=g(Pn(e,"viewFormat",Be.kml),d),m=Pn(e,"httpQuery",Be.kml);return c(h)&&s.setQueryParameters(cp(xD(h))),c(m)&&s.setQueryParameters(cp(xD(m))),vF(s,t.camera,t.canvas,u,t._lastCameraView.bbox,t._ellipsoid),s}return s}function nke(e,t,n,i,o){let r=ri(t,"scale",Be.kml);const s=ri(t,"heading",Be.kml),a=yg(t,"color",Be.kml),l=Pi(t,"Icon",Be.kml);let u=CF(l,e,i,o,!1);c(l)&&!c(u)&&(u=!1);const d=ri(l,"x",Be.gx),h=ri(l,"y",Be.gx),m=ri(l,"w",Be.gx),_=ri(l,"h",Be.gx),p=Pi(t,"hotSpot",Be.kml),y=pm(p,"x"),A=pm(p,"y"),x=es(p,"xunits"),C=es(p,"yunits");let v,D,w=n.billboard;c(w)||(w=bX(),n.billboard=w),w.image=u,w.scale=r,w.color=a,(c(d)||c(h)||c(m)||c(_))&&(w.imageSubRegion=new Vt(d,h,m,_)),c(s)&&0!==s&&(w.rotation=O.toRadians(-s),w.alignedAxis=f.UNIT_Z),r=g(r,1),c(y)&&("pixels"===x?v=-y*r:"insetPixels"===x?v=(y-hm)*r:"fraction"===x&&(v=-y*hm*r),v+=.5*hm*r),c(A)&&("pixels"===C?D=A*r:"insetPixels"===C?D=(-A+hm)*r:"fraction"===C&&(D=A*hm*r),D-=.5*hm*r),(c(v)||c(D))&&(w.pixelOffset=new G(v,D))}function bD(e,t,n,i,o){for(let r=0,s=t.childNodes.length;r<s;r++){const a=t.childNodes.item(r);if("IconStyle"===a.localName)nke(e,a,n,i,o);else if("LabelStyle"===a.localName){let l=n.label;c(l)||(l=AX(),n.label=l),l.scale=g(ri(a,"scale",Be.kml),l.scale),l.fillColor=g(yg(a,"color",Be.kml),l.fillColor),l.text=n.name}else if("LineStyle"===a.localName){let l=n.polyline;c(l)||(l=new Q0,n.polyline=l),l.width=ri(a,"width",Be.kml),l.material=yg(a,"color",Be.kml),c(yg(a,"outerColor",Be.gx))&&gn("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),c(ri(a,"outerWidth",Be.gx))&&gn("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),c(ri(a,"physicalWidth",Be.gx))&&gn("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),c(Ju(a,"labelVisibility",Be.gx))&&gn("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if("PolyStyle"===a.localName){let l=n.polygon;c(l)||(l=xF(),n.polygon=l),l.material=g(yg(a,"color",Be.kml),l.material),l.fill=g(Ju(a,"fill",Be.kml),l.fill),l.outline=g(Ju(a,"outline",Be.kml),l.outline)}else if("BalloonStyle"===a.localName){const l=g(TF(Pn(a,"bgColor",Be.kml)),X.WHITE),u=g(TF(Pn(a,"textColor",Be.kml)),X.BLACK),d=Pn(a,"text",Be.kml);n.addProperty("balloonStyle"),n.balloonStyle={bgColor:l,textColor:u,text:d}}else if("ListStyle"===a.localName){const l=Pn(a,"listItemType",Be.kml);("radioFolder"===l||"checkOffOnly"===l)&&gn(`kml-listStyle-${l}`,`KML - Unsupported ListStyle with listItemType: ${l}`)}}}function oke(e,t,n){return t.fetchXML().then(function(i){return TX(e,i,n,t,!0)})}function TX(e,t,n,i,o,r){let s,a,l,u;const d=yX(t,"Style",Be.kml);if(c(d)){const y=d.length;for(s=0;s<y;s++)u=d[s],a=es(u,"id"),c(a)&&(a=`#${a}`,o&&c(i)&&(a=i.getUrlComponent()+a),c(n.getById(a))||(l=new wc({id:a}),n.add(l),bD(e,u,l,i,r)))}const h=yX(t,"StyleMap",Be.kml);if(c(h)){const y=h.length;for(s=0;s<y;s++){const A=h[s];if(a=es(A,"id"),c(a)){const x=Qu(A,"Pair",Be.kml);for(let C=0;C<x.length;C++){const w=x[C],v=Pn(w,"key",Be.kml);if("normal"===v){if(a=`#${a}`,o&&c(i)&&(a=i.getUrlComponent()+a),!c(n.getById(a))){l=n.getOrCreateEntity(a);let D=Pn(w,"styleUrl",Be.kml);if(c(D)){"#"!==D[0]&&(D=`#${D}`),o&&c(i)&&(D=i.getUrlComponent()+D);const P=n.getById(D);c(P)&&l.merge(P)}else u=Pi(w,"Style",Be.kml),bD(e,u,l,i,r)}}else gn(`kml-styleMap-${v}`,`KML - Unsupported StyleMap key: ${v}`)}}}}const m=[],_=t.getElementsByTagName("styleUrl"),p=_.length;for(s=0;s<p;s++){const y=_[s].textContent;if("#"!==y[0]){const A=y.split("#");if(2===A.length){const C=i.getDerivedResource({url:A[0]});m.push(oke(e,C,n))}}}return m}function EF(e,t,n){const i=new iX(e,t.id,["position"]),o=new _F(t.position);t.polyline=c(n.polyline)?n.polyline.clone():new Q0,t.polyline.positions=new q3e([i,o])}function xX(e,t){return!c(e)&&!c(t)||"clampToGround"===e?Qt.CLAMP_TO_GROUND:"relativeToGround"===e?Qt.RELATIVE_TO_GROUND:"absolute"===e?Qt.NONE:"clampToSeaFloor"===t?(gn("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),Qt.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(gn("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),Qt.RELATIVE_TO_GROUND):(c(e)?gn("kml-altitudeMode-unknown",`KML - Unknown <kml:altitudeMode>:${e}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`):gn("kml-gx:altitudeMode-unknown",`KML - Unknown <gx:altitudeMode>:${t}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`),Qt.CLAMP_TO_GROUND)}function rke(e,t,n){return"relativeToSeaFloor"===n||"absolute"===t||"relativeToGround"===t?e:((c(t)&&"clampToGround"!==t||c(n)&&"clampToSeaFloor"!==n)&&gn("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g(t,n)}`),new _F(e))}function AD(e,t,n,i){let o=t.label;c(o)||(o=c(n.label)?n.label.clone():AX(),t.label=o),o.text=t.name;let r=t.billboard;c(r)||(r=c(n.billboard)?n.billboard.clone():bX(),t.billboard=r),c(r.image)?r.image.getValue()||(r.image=void 0):r.image=e._pinBuilder.fromColor(X.YELLOW,64);let s=1;c(r.scale)&&(s=r.scale.getValue(),0!==s?o.pixelOffset=new G(16*s+1,0):(o.pixelOffset=void 0,o.horizontalOrigin=void 0)),c(i)&&e._clampToGround&&(r.heightReference=i,o.heightReference=i)}function CX(e,t){let n=e.path;c(n)||(n=new vq,n.leadTime=0,e.path=n);const i=t.polyline;c(i)&&(n.material=i.material,n.width=i.width)}function EX(e,t,n,i,o){const r=Pi(n,"coordinates",Be.kml),s=Pn(n,"altitudeMode",Be.kml),a=Pn(n,"altitudeMode",Be.gx),l=Ju(n,"extrude",Be.kml),u=Ju(n,"tessellate",Be.kml),d=tC(s,a),h=ri(n,"drawOrder",Be.gx),m=e._ellipsoid,_=yD(r,m);let p=o.polyline;if(d&&l){const y=new Iq;i.wall=y,y.positions=_;const A=o.polygon;c(A)&&(y.fill=A.fill,y.material=A.material),y.outline=!0,c(p)?(y.outlineColor=c(p.material)?p.material.color:X.WHITE,y.outlineWidth=p.width):c(A)&&(y.outlineColor=c(A.material)?A.material.color:X.WHITE)}else if(e._clampToGround&&!d&&u){const y=new Q0;y.clampToGround=!0,i.polyline=y,y.positions=_,c(p)?(y.material=c(p.material)?p.material.color.getValue(St.MINIMUM_VALUE):X.WHITE,y.width=g(p.width,1)):(y.material=X.WHITE,y.width=1),y.zIndex=h}else c(h)&&gn("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!u&&gn("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),p=c(p)?p.clone():new Q0,i.polyline=p,p.positions=function ske(e,t,n,i){if(!c(e))return;if("relativeToSeaFloor"===n||"absolute"===t||"relativeToGround"===t)return e;(c(t)&&"clampToGround"!==t||c(n)&&"clampToSeaFloor"!==n)&&gn("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g(t,n)}`);const o=e.length;for(let r=0;r<o;r++){const s=e[r];i.scaleToGeodeticSurface(s,s)}return e}(_,s,a,m),(!u||d)&&(p.arcType=Xn.NONE);return!0}function wX(e,t,n,i,o,r,s,a,l){const u=e[0],d=e[e.length-1],h=new mF;h.addSamples(e,t),n.intervals.addInterval(new ci({start:u,stop:d,isStartIncluded:l,isStopIncluded:l,data:rke(h,s,a)})),i.addInterval(new ci({start:u,stop:d,isStartIncluded:l,isStopIncluded:l})),o.intervals.addInterval(new ci({start:u,stop:d,isStartIncluded:l,isStopIncluded:l,data:r}))}const SX={Point:function ake(e,t,n,i,o){const r=Pn(n,"coordinates",Be.kml),s=Pn(n,"altitudeMode",Be.kml),a=Pn(n,"altitudeMode",Be.gx),l=Ju(n,"extrude",Be.kml),d=gD(r,e._ellipsoid);return i.position=d,AD(e,i,o,xX(s,a)),l&&tC(s,a)&&EF(t,i,o),!0},LineString:EX,LinearRing:EX,Polygon:function cke(e,t,n,i,o){const r=Pi(n,"outerBoundaryIs",Be.kml);let s=Pi(r,"LinearRing",Be.kml),a=Pi(s,"coordinates",Be.kml);const l=e._ellipsoid;let u=yD(a,l);const d=Ju(n,"extrude",Be.kml),_=tC(Pn(n,"altitudeMode",Be.kml),Pn(n,"altitudeMode",Be.gx)),p=c(o.polygon)?o.polygon.clone():xF(),y=o.polyline;if(c(y)&&(p.outlineColor=c(y.material)?y.material.color:X.WHITE,p.outlineWidth=y.width),i.polygon=p,_?(p.perPositionHeight=!0,p.extrudedHeight=d?0:void 0):e._clampToGround||(p.height=0),c(u)){const A=new j_(u),x=Qu(n,"innerBoundaryIs",Be.kml);for(let C=0;C<x.length;C++){s=Qu(x[C],"LinearRing",Be.kml);for(let w=0;w<s.length;w++)a=Pi(s[w],"coordinates",Be.kml),u=yD(a,l),c(u)&&A.holes.push(new j_(u))}p.hierarchy=A}return!0},Track:function lke(e,t,n,i,o){const r=Pn(n,"altitudeMode",Be.kml),s=Pn(n,"altitudeMode",Be.gx),a=Qu(n,"coord",Be.gx),l=Qu(n,"angles",Be.gx),u=Qu(n,"when",Be.kml),d=Ju(n,"extrude",Be.kml),h=tC(r,s),m=e._ellipsoid;l.length>0&&gn("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");const _=Math.min(a.length,u.length),p=[],y=[];for(let x=0;x<_;x++){const C=gD(a[x].textContent,m);p.push(C),y.push(se.fromIso8601(u[x].textContent))}const A=new mF;return A.addSamples(y,p),i.position=A,AD(e,i,o,xX(r,s)),CX(i,o),i.availability=new kc,u.length>0&&i.availability.addInterval(new ci({start:y[0],stop:y[y.length-1]})),h&&d&&EF(t,i,o),!0},MultiTrack:function uke(e,t,n,i,o){const r=Ju(n,"interpolate",Be.gx),s=Qu(n,"Track",Be.gx);let a,l,u,d=!1;const h=new Z3e,m=new kc,_=new QY,p=e._ellipsoid;for(let y=0,A=s.length;y<A;y++){const x=s[y],C=Qu(x,"when",Be.kml),w=Qu(x,"coord",Be.gx),v=Pn(x,"altitudeMode",Be.kml),D=Pn(x,"altitudeMode",Be.gx),P=tC(v,D),N=Ju(x,"extrude",Be.kml),R=Math.min(w.length,C.length),B=[];a=[];for(let F=0;F<R;F++){const S=gD(w[F].textContent,p);B.push(S),a.push(se.fromIso8601(C[F].textContent))}r&&(c(l)&&wX([l,a[0]],[u,B[0]],_,m,h,!1,"absolute",void 0,!1),l=a[R-1],u=B[B.length-1]),wX(a,B,_,m,h,P&&N,v,D,!0),d=d||P&&N}return i.availability=m,i.position=_,AD(e,i,o),CX(i,o),d&&(EF(t,i,o),i.polyline.show=h),!0},MultiGeometry:function dke(e,t,n,i,o,r){const s=n.childNodes;let a=!1;for(let l=0,u=s.length;l<u;l++){const d=s.item(l),h=SX[d.localName];if(c(h)){const m=gX(d,t,r);m.parent=i,m.name=i.name,m.availability=i.availability,m.description=i.description,m.kml=i.kml,h(e,t,d,m,o)&&(a=!0)}}return a},Model:function fke(e,t,n,i,o){return gn("kml-unsupportedGeometry",`KML - Unsupported geometry: ${n.localName}`),!1}};let no;function TD(e,t,n){const o=n.parentEntity,r=n.sourceResource,s=n.uriResolver,a=gX(t,n.entityCollection,n.context),l=a.kml,u=function ike(e,t,n,i,o){const r=new wc;let s,a=-1;const l=t.childNodes,u=l.length;for(let h=0;h<u;h++){const m=l[h];("Style"===m.localName||"StyleMap"===m.localName)&&(a=h)}if(-1!==a){const h=l[a];if("Style"===h.localName)bD(e,h,r,i,o);else{const m=Qu(h,"Pair",Be.kml);for(let _=0;_<m.length;_++){const p=m[_],y=Pn(p,"key",Be.kml);if("normal"===y){const A=Pn(p,"styleUrl",Be.kml);c(A)?(s=n.getById(A),c(s)||(s=n.getById(`#${A}`)),c(s)&&r.merge(s)):bD(e,Pi(p,"Style",Be.kml),r,i,o)}else gn(`kml-styleMap-${y}`,`KML - Unsupported StyleMap key: ${y}`)}}}const d=Pn(t,"styleUrl",Be.kml);if(c(d)){let h=d;if("#"!==d[0]&&-1!==d.indexOf("#")){const m=d.split("#");h=`${i.getDerivedResource({url:m[0]}).getUrlComponent()}#${m[1]}`}s=n.getById(h),c(s)||(s=n.getById(`#${h}`)),c(s)&&r.merge(s)}return r}(e,t,n.styleCollection,r,s),d=Pn(t,"name",Be.kml);a.name=d,a.parent=o;let h=function tke(e){const t=Pi(e,"TimeSpan",Be.kmlgx);if(!c(t))return;let n;const i=Pi(t,"begin",Be.kmlgx);let o=c(i)?se.fromIso8601(i.textContent):void 0;const r=Pi(t,"end",Be.kmlgx);let s=c(r)?se.fromIso8601(r.textContent):void 0;if(c(o)&&c(s)){if(se.lessThan(s,o)){const a=o;o=s,s=a}n=new kc,n.addInterval(new ci({start:o,stop:s}))}else c(o)?(n=new kc,n.addInterval(new ci({start:o,stop:St.MAXIMUM_VALUE}))):c(s)&&(n=new kc,n.addInterval(new ci({start:St.MINIMUM_VALUE,stop:s})));return n}(t);c(h)||(h=function eke(e){const t=Pi(e,"TimeStamp",Be.kmlgx),n=Pn(t,"when",Be.kmlgx);if(!c(t)||!c(n)||0===n.length)return;const i=se.fromIso8601(n),o=new kc;return o.addInterval(new ci({start:i,stop:St.MAXIMUM_VALUE})),o}(t)),a.availability=h,PF(a);const _=Ju(t,"visibility",Be.kml);a.show=function m(w){return!w||w.show&&m(w.parent)}(o)&&g(_,!0);const p=Pi(t,"author",Be.atom),y=l.author;y.name=Pn(p,"name",Be.atom),y.uri=Pn(p,"uri",Be.atom),y.email=Pn(p,"email",Be.atom);const A=Pi(t,"link",Be.atom),x=l.link;x.href=es(A,"href"),x.hreflang=es(A,"hreflang"),x.rel=es(A,"rel"),x.type=es(A,"type"),x.title=es(A,"title"),x.length=es(A,"length"),l.address=Pn(t,"address",Be.kml),l.phoneNumber=Pn(t,"phoneNumber",Be.kml),l.snippet=Pn(t,"Snippet",Be.kml),function hke(e,t){const n=Pi(e,"ExtendedData",Be.kml);if(!c(n))return;c(Pi(n,"SchemaData",Be.kml))&&gn("kml-schemaData","KML - SchemaData is unsupported"),c(es(n,"xmlns:prefix"))&&gn("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");const i={},o=Qu(n,"Data",Be.kml);if(c(o)){const r=o.length;for(let s=0;s<r;s++){const a=o[s],l=es(a,"name");c(l)&&(i[l]={displayName:Pn(a,"displayName",Be.kml),value:Pn(a,"value",Be.kml)})}}t.kml.extendedData=i}(t,a),function pke(e,t,n,i,o){let r,s,a;const l=t.kml,u=l.extendedData,d=Pn(e,"description",Be.kml),h=g(t.balloonStyle,n.balloonStyle);let y,m=X.WHITE,_=X.BLACK,p=d;if(c(h)&&(m=g(h.bgColor,X.WHITE),_=g(h.textColor,X.BLACK),p=g(h.text,d)),c(p)){if(p=p.replace("$[name]",g(t.name,"")),p=p.replace("$[description]",g(d,"")),p=p.replace("$[address]",g(l.address,"")),p=p.replace("$[Snippet]",g(l.snippet,"")),p=p.replace("$[id]",t.id),p=p.replace("$[geDirections]",""),c(u)){const C=p.match(/\$\[.+?\]/g);if(null!==C)for(r=0;r<C.length;r++){const w=C[r];let v=w.substr(2,w.length-3);const D=/\/displayName$/.test(v);v=v.replace(/\/displayName$/,""),y=u[v],c(y)&&(y=D?y.displayName:y.value),c(y)&&(p=p.replace(w,g(y,"")))}}}else if(c(u)&&(a=Object.keys(u),a.length>0)){for(p='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',r=0;r<a.length;r++)s=a[r],y=u[s],p+=`<tr><th>${g(y.displayName,s)}</th><td>${g(y.value,"")}</td></tr>`;p+="</tbody></table>"}if(!c(p))return;p=$3e.link(p),no.innerHTML=p;const A=no.querySelectorAll("a");for(r=0;r<A.length;r++)A[r].setAttribute("target","_blank");c(i)&&i.keys.length>1&&(il(no,"a","href",i),il(no,"link","href",i),il(no,"area","href",i),il(no,"img","src",i),il(no,"iframe","src",i),il(no,"video","src",i),il(no,"audio","src",i),il(no,"source","src",i),il(no,"track","src",i),il(no,"input","src",i),il(no,"embed","src",i),il(no,"script","src",i),il(no,"video","poster",i)),ol(no,"a","href",o),ol(no,"link","href",o),ol(no,"area","href",o),ol(no,"img","src",o),ol(no,"iframe","src",o),ol(no,"video","src",o),ol(no,"audio","src",o),ol(no,"source","src",o),ol(no,"track","src",o),ol(no,"input","src",o),ol(no,"embed","src",o),ol(no,"script","src",o),ol(no,"video","poster",o);let x='<div class="cesium-infoBox-description-lighter" style="';x+="overflow:auto;",x+="word-wrap:break-word;",x+=`background-color:${m.toCssColorString()};`,x+=`color:${_.toCssColorString()};`,x+='">',x+=`${no.innerHTML}</div>`,no.innerHTML="",t.description=x}(t,a,u,s,r);const C=e._ellipsoid;return IX(t,a,C),DX(t,a,C),c(Pi(t,"Region",Be.kml))&&gn("kml-region","KML - Placemark Regions are unsupported"),{entity:a,styleEntity:u}}function vX(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}typeof document<"u"&&(no=document.createElement("div"));const gke={FlyTo:function Ake(e,t,n){const i=ri(t,"duration",Be.gx),o=Pn(t,"flyToMode",Be.gx),r={kml:{}};IX(t,r,n),DX(t,r,n);const a=new j3e(i,o,r.kml.lookAt||r.kml.camera);e.addPlaylistEntry(a)},Wait:function bke(e,t){const n=ri(t,"duration",Be.gx);e.addPlaylistEntry(new W3e(n))},SoundCue:wF,AnimatedUpdate:wF,TourControl:wF};function wF(e,t){gn(`KML Tour unsupported node ${t.localName}`)}function DX(e,t,n){const i=Pi(e,"Camera",Be.kml);if(c(i)){const o=g(ri(i,"longitude",Be.kml),0),r=g(ri(i,"latitude",Be.kml),0),s=g(ri(i,"altitude",Be.kml),0),a=g(ri(i,"heading",Be.kml),0),l=g(ri(i,"tilt",Be.kml),0),u=g(ri(i,"roll",Be.kml),0),d=f.fromDegrees(o,r,s,n),h=wy.fromDegrees(a,l-90,u);t.kml.camera=new O3e(d,h)}}function IX(e,t,n){const i=Pi(e,"LookAt",Be.kml);if(c(i)){const o=g(ri(i,"longitude",Be.kml),0),r=g(ri(i,"latitude",Be.kml),0),s=g(ri(i,"altitude",Be.kml),0);let a=ri(i,"heading",Be.kml),l=ri(i,"tilt",Be.kml);const u=g(ri(i,"range",Be.kml),0);l=O.toRadians(g(l,0)),a=O.toRadians(g(a,0));const d=new Hx(a,l-O.PI_OVER_TWO,u),h=f.fromDegrees(o,r,s,n);t.kml.lookAt=new R3e(h,d)}}function PX(e,t,n,i){e._unsupportedNode.raiseEvent(e,n.parentEntity,t,n.entityCollection,n.styleCollection,n.sourceResource,n.uriResolver),gn(`kml-unsupportedFeature-${t.nodeName}`,`KML - Unsupported feature: ${t.nodeName}`)}const mm={INTERVAL:0,EXPIRE:1,STOP:2};function xD(e){if(!c(e)||0===e.length)return"";const t=e[0];return("&"===t||"?"===t)&&(e=e.substring(1)),e}const Cke=new Ce,ub=new Se,SF=new G,Eke=new f;function vF(e,t,n,i,o,r){function s(u){return u<-O.PI_OVER_TWO?-O.PI_OVER_TWO:u>O.PI_OVER_TWO?O.PI_OVER_TWO:u}function a(u){return u>O.PI?u-O.TWO_PI:u<-O.PI?u+O.TWO_PI:u}let l=NU(e.queryParameters);if(l=l.replace(/%5B/g,"[").replace(/%5D/g,"]"),c(t)&&t._mode!==ce.MORPHING){let u,d;if(o=g(o,Cke),c(n)&&(SF.x=.5*n.clientWidth,SF.y=.5*n.clientHeight,u=t.pickEllipsoid(SF,r,Eke)),c(u)?d=r.cartesianToCartographic(u,ub):(d=Ce.center(o,ub),u=r.cartographicToCartesian(d)),c(i)&&!O.equalsEpsilon(i,1,O.EPSILON9)){const x=o.width*i*.5,C=o.height*i*.5;o=new Ce(a(d.longitude-x),s(d.latitude-C),a(d.longitude+x),s(d.latitude+C))}l=l.replace("[bboxWest]",O.toDegrees(o.west).toString()),l=l.replace("[bboxSouth]",O.toDegrees(o.south).toString()),l=l.replace("[bboxEast]",O.toDegrees(o.east).toString()),l=l.replace("[bboxNorth]",O.toDegrees(o.north).toString());const h=O.toDegrees(d.longitude).toString(),m=O.toDegrees(d.latitude).toString();l=l.replace("[lookatLon]",h),l=l.replace("[lookatLat]",m),l=l.replace("[lookatTilt]",O.toDegrees(t.pitch).toString()),l=l.replace("[lookatHeading]",O.toDegrees(t.heading).toString()),l=l.replace("[lookatRange]",f.distance(t.positionWC,u)),l=l.replace("[lookatTerrainLon]",h),l=l.replace("[lookatTerrainLat]",m),l=l.replace("[lookatTerrainAlt]",d.height.toString()),r.cartesianToCartographic(t.positionWC,ub),l=l.replace("[cameraLon]",O.toDegrees(ub.longitude).toString()),l=l.replace("[cameraLat]",O.toDegrees(ub.latitude).toString()),l=l.replace("[cameraAlt]",O.toDegrees(ub.height).toString());const _=t.frustum,p=_.aspectRatio;let y="",A="";if(c(p)){const x=O.toDegrees(_.fov);p>1?(y=x,A=x/p):(A=x,y=x*p)}l=l.replace("[horizFov]",y.toString()),l=l.replace("[vertFov]",A.toString())}else l=l.replace("[bboxWest]","-180"),l=l.replace("[bboxSouth]","-90"),l=l.replace("[bboxEast]","180"),l=l.replace("[bboxNorth]","90"),l=l.replace("[lookatLon]",""),l=l.replace("[lookatLat]",""),l=l.replace("[lookatRange]",""),l=l.replace("[lookatTilt]",""),l=l.replace("[lookatHeading]",""),l=l.replace("[lookatTerrainLon]",""),l=l.replace("[lookatTerrainLat]",""),l=l.replace("[lookatTerrainAlt]",""),l=l.replace("[cameraLon]",""),l=l.replace("[cameraLat]",""),l=l.replace("[cameraAlt]",""),l=l.replace("[horizFov]",""),l=l.replace("[vertFov]","");c(n)?(l=l.replace("[horizPixels]",n.clientWidth),l=l.replace("[vertPixels]",n.clientHeight)):(l=l.replace("[horizPixels]",""),l=l.replace("[vertPixels]","")),l=l.replace("[terrainEnabled]","1"),l=l.replace("[clientVersion]","1"),l=l.replace("[kmlVersion]","2.2"),l=l.replace("[clientName]","Cesium"),l=l.replace("[language]","English"),e.setQueryParameters(cp(l))}function DF(e,t,n,i,o,r,s){t.removeAll();const a=n.documentElement;let u=Pn("Document"===a.localName?a:Pi(a,"Document",Be.kml),"name",Be.kml);c(u)||(u=rW(i.getUrlComponent())),c(e._name)||(e._name=u);const d=new rl._DeferredLoading(e),h=new J0(e);return Promise.all(TX(e,n,h,i,!1,o)).then(function(){let m=n.documentElement;if("kml"===m.localName){const p=m.childNodes;for(let y=0;y<p.length;y++){const A=p[y];if(c(yF[A.localName])){m=A;break}}}const _={parentEntity:void 0,entityCollection:t,styleCollection:h,sourceResource:i,uriResolver:o,context:s,screenOverlayContainer:r};return t.suspendEvents(),function Ske(e,t,n,i){const o=yF[t.localName];c(o)?o(e,t,n,i):PX(e,t,n)}(e,m,_,d),t.resumeEvents(),d.wait().then(function(){return n.documentElement})})}function IF(e,t,n,i){let o=(i=g(i,g.EMPTY_OBJECT)).sourceUri;const r=i.uriResolver,s=i.context;let a=i.screenOverlayContainer,l=n;if("string"==typeof n||n instanceof jt){l=(n=jt.createIfNeeded(n)).fetchBlob(),o=g(o,n.clone());const u=e._resourceCredits,d=n.credits;if(c(d)){const h=d.length;for(let m=0;m<h;m++)u.push(d[m])}}else o=g(o,jt.DEFAULT.clone());return o=jt.createIfNeeded(o),c(a)&&(a=Lr(a)),Promise.resolve(l).then(function(u){return u instanceof Blob?function K3e(e){const t=e.slice(0,Math.min(4,e.size)),n=ap(),i=new FileReader;return i.addEventListener("load",function(){n.resolve(1347093252===new DataView(i.result).getUint32(0,!1))}),i.addEventListener("error",function(){n.reject(i.error)}),i.readAsArrayBuffer(t),n.promise}(u).then(function(d){return d?function vke(e,t,n,i,o){const r=ni("ThirdParty/Workers/z-worker-pako.js");W7({workerScripts:{deflate:[r,"./pako_deflate.min.js"],inflate:[r,"./pako_inflate.min.js"]}});const s=new o3e(new TY(n));return Promise.resolve(s.getEntries()).then(function(a){const l=[],u={};let d;for(let h=0;h<a.length;h++){const m=a[h];m.directory||(!/\.kml$/i.test(m.filename)||c(d)&&/\//i.test(m.filename)?l.push(bF(m,u)):(c(d)&&l.push(bF(d,u)),d=m))}return c(d)&&l.push(function J3e(e,t){return Promise.resolve(e.getData(new xBe)).then(function(n){n=_X(n=mX(n)),t.kml=gF.parseFromString(n,"application/xml")})}(d,u)),Promise.all(l).then(function(){if(s.close(),!c(u.kml))throw new Ie("KMZ file does not contain a KML document.");return u.keys=Object.keys(u),DF(e,t,u.kml,i,u,o)})})}(e,t,u,o,a):function Q3e(e){const t=ap(),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}(u).then(function(h){let m,_;h=_X(h=mX(h));try{m=gF.parseFromString(h,"application/xml")}catch(p){_=p.toString()}if(c(_)||m.body||"parsererror"===m.documentElement.tagName){let p=c(_)?_:m.documentElement.firstChild.nodeValue;throw p||(p=m.body.innerText),new Ie(p)}return DF(e,t,m,o,r,a,s)})}):DF(e,t,u,o,r,a,s)}).catch(function(u){return e._error.raiseEvent(e,u),console.log(u),Promise.reject(u)})}function rl(e){const t=(e=g(e,g.EMPTY_OBJECT)).camera,n=e.canvas;this._changed=new Ue,this._error=new Ue,this._loading=new Ue,this._refresh=new Ue,this._unsupportedNode=new Ue,this._clock=void 0,this._entityCollection=new J0(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new aW,this._networkLinks=new _n,this._entityCluster=new EM,this.canvas=n,this.camera=t,this._lastCameraView={position:c(t)?f.clone(t.positionWC):void 0,direction:c(t)?f.clone(t.directionWC):void 0,up:c(t)?f.clone(t.upWC):void 0,bbox:c(t)?t.computeViewRectangle():Ce.clone(Ce.MAX_VALUE)},this._ellipsoid=g(e.ellipsoid,ge.WGS84);let i=e.credit;"string"==typeof i&&(i=new qn(i)),this._credit=i,this._resourceCredits=[],this._kmlTours=[],this._screenOverlays=[]}function PF(e){const t=e.parent;if(c(t)){const n=t.availability;if(c(n)){const i=e.availability;c(i)?i.intersect(n):e.availability=n}}}rl.load=function(e,t){return new rl(t=g(t,g.EMPTY_OBJECT)).load(e,t)},Object.defineProperties(rl.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}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!c(e))throw new E("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}},kmlTours:{get:function(){return this._kmlTours}}}),rl.prototype.load=function(e,t){if(!c(e))throw new E("data is required.");t=g(t,g.EMPTY_OBJECT),og.setLoading(this,!0);const n=this._name;this._name=void 0,this._clampToGround=g(t.clampToGround,!1);const i=this;return IF(this,this._entityCollection,e,t).then(function(){let o;const r=i._entityCollection.computeAvailability();let s=r.start,a=r.stop;const l=se.equals(s,St.MINIMUM_VALUE),u=se.equals(a,St.MAXIMUM_VALUE);if(!l||!u){let h;l&&(h=new Date,h.setHours(0,0,0,0),s=se.fromDate(h)),u&&(h=new Date,h.setHours(24,0,0,0),a=se.fromDate(h)),o=new I3e,o.startTime=s,o.stopTime=a,o.currentTime=se.clone(s),o.clockRange=om.LOOP_STOP,o.clockStep=$s.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(se.secondsDifference(a,s)/60,1),31556900))}let d=!1;return o!==i._clock&&(i._clock=o,d=!0),n!==i._name&&(d=!0),d&&i._changed.raiseEvent(i),og.setLoading(i,!1),i}).catch(function(o){return og.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})},rl.prototype.destroy=function(){for(;this._screenOverlays.length>0;)this._screenOverlays.pop().remove()};const OF=new _n;function Ike(){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}rl.prototype.update=function(e){const t=this._networkLinks;if(0===t.length)return!0;const n=se.now(),i=this;function o(d){const h=d._children,m=h.length;for(let _=0;_<m;++_){const p=h[_];OF.set(p.id,p),o(p)}}OF.removeAll();let r=!1;const s=this._lastCameraView,a=this.camera;c(a)&&!(a.positionWC.equalsEpsilon(s.position,O.EPSILON7)&&a.directionWC.equalsEpsilon(s.direction,O.EPSILON7)&&a.upWC.equalsEpsilon(s.up,O.EPSILON7))&&(s.position=f.clone(a.positionWC),s.direction=f.clone(a.directionWC),s.up=f.clone(a.upWC),s.bbox=a.computeViewRectangle(),r=!0);const l=new _n;let u=!1;return t.values.forEach(function(d){const h=d.entity;if(!OF.contains(h.id)){if(!d.updating){let m=!1;if(d.refreshMode===mm.INTERVAL?se.secondsDifference(n,d.lastUpdated)>d.time&&(m=!0):d.refreshMode===mm.EXPIRE?se.greaterThan(n,d.time)&&(m=!0):d.refreshMode===mm.STOP&&(r&&(d.needsUpdate=!0,d.cameraUpdateTime=n),d.needsUpdate&&se.secondsDifference(n,d.cameraUpdateTime)>=d.time&&(m=!0)),m){o(h),d.updating=!0;const _=new J0,p=d.href.clone();p.setQueryParameters(d.cookie);const y=g(i._ellipsoid,ge.WGS84);vF(p,i.camera,i.canvas,d.viewBoundScale,s.bbox,y),IF(i,_,p,{context:h.id}).then(function Dke(e,t,n,i,o){return function(r){if(!i.contains(t.id))return;let s=!1;const a=Pi(r,"NetworkLinkControl",Be.kml);let u=0;if(c(a)){if(c(Pi(a,"Update",Be.kml)))return gn("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,void i.remove(t.id);t.cookie=cp(g(Pn(a,"cookie",Be.kml),"")),u=g(ri(a,"minRefreshPeriod",Be.kml),0)}const d=se.now(),h=t.refreshMode;if(h===mm.INTERVAL)c(a)&&(t.time=Math.max(u,t.time));else if(h===mm.EXPIRE){let N;if(c(a)&&(N=Pn(a,"expires",Be.kml)),c(N))try{const R=se.fromIso8601(N),B=se.secondsDifference(R,d);B>0&&B<u&&se.addSeconds(d,u,R),t.time=R}catch{gn("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),s=!0}else gn("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),s=!0}const m=t.entity,_=e._entityCollection,p=n.values;function y(N){_.remove(N);const R=N._children,B=R.length;for(let F=0;F<B;++F)y(R[F])}_.suspendEvents();const A=_.values.slice();let x;for(x=0;x<A.length;++x){const N=A[x];N.parent===m&&(N.parent=void 0,y(N))}for(_.resumeEvents(),_.suspendEvents(),x=0;x<p.length;x++){const N=p[x];c(N.parent)||(N.parent=m,PF(N)),_.add(N)}_.resumeEvents(),s?i.remove(t.id):t.lastUpdated=d;const C=_.computeAvailability(),w=C.start,v=C.stop,D=se.equals(w,St.MINIMUM_VALUE),P=se.equals(v,St.MAXIMUM_VALUE);if(!D||!P){const N=e._clock;(N.startTime!==w||N.stopTime!==v)&&(N.startTime=w,N.stopTime=v,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,o.getUrlComponent(!0))}}(i,d,_,l,p)).catch(function(A){const x=`NetworkLink ${d.href} refresh failed: ${A}`;console.log(x),i._error.raiseEvent(i,x)}),u=!0}}l.set(d.id,d)}}),u&&(this._networkLinks=l,this._changed.raiseEvent(this)),!0},rl._DeferredLoading=nf,rl._getTimestamp=wr;const Pke=rl;function db(e,t){this._conditionsExpression=zt(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,function Lke(e,t){const n=[],i=e._conditions;if(!c(i))return;const o=i.length;for(let r=0;r<o;++r){const s=i[r],a=String(s[0]),l=String(s[1]);n.push(new Oke(new Hy(a,t),new Hy(l,t)))}e._runtimeConditions=n}(this,t)}function Oke(e,t){this.condition=e,this.expression=t}Object.defineProperties(db.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}}),db.prototype.evaluate=function(e,t){const n=this._runtimeConditions;if(!c(n))return;const i=n.length;for(let o=0;o<i;++o){const r=n[o];if(r.condition.evaluate(e))return r.expression.evaluate(e,t)}},db.prototype.evaluateColor=function(e,t){const n=this._runtimeConditions;if(!c(n))return;const i=n.length;for(let o=0;o<i;++o){const r=n[o];if(r.condition.evaluate(e))return r.expression.evaluateColor(e,t)}},db.prototype.getShaderFunction=function(e,t,n,i){const o=this._runtimeConditions;if(!c(o)||0===o.length)return;let r="";const s=o.length;for(let a=0;a<s;++a){const l=o[a];r+=` ${0===a?"if":"else if"} (${l.condition.getShaderExpression(t,n)})\n {\n return ${l.expression.getShaderExpression(t,n)};\n }\n`}return r=`${i} ${e}\n{\n${r} return ${i}(1.0);\n}\n`,r},db.prototype.getVariables=function(){let e=[];const t=this._runtimeConditions;if(!c(t)||0===t.length)return e;const n=t.length;for(let i=0;i<n;++i){const 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};const Rke=db;function _m(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,function Nke(e,t){t=g(zt(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;const n={};if(c(t.meta)){const i=t.defines,o=g(t.meta,g.EMPTY_OBJECT);for(const r in o)o.hasOwnProperty(r)&&(n[r]=new Hy(o[r],i))}e._meta=n,e._ready=!0}(this,e)}function Uo(e,t){const n=g(e._style,g.EMPTY_OBJECT).defines;if(c(t))return"boolean"==typeof t||"number"==typeof t?new Hy(String(t)):"string"==typeof t?new Hy(t,n):c(t.conditions)?new Rke(t,n):t}function zo(e){if(c(e))return c(e.expression)?e.expression:c(e.conditionsExpression)?zt(e.conditionsExpression,!0):e}Object.defineProperties(_m.prototype,{style:{get:function(){return this._style}},show:{get:function(){return this._show},set:function(e){this._show=Uo(this,e),this._style.show=zo(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=Uo(this,e),this._style.color=zo(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=Uo(this,e),this._style.pointSize=zo(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=Uo(this,e),this._style.pointOutlineColor=zo(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=Uo(this,e),this._style.pointOutlineWidth=zo(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=Uo(this,e),this._style.labelColor=zo(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=Uo(this,e),this._style.labelOutlineColor=zo(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=Uo(this,e),this._style.labelOutlineWidth=zo(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=Uo(this,e),this._style.font=zo(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=Uo(this,e),this._style.labelStyle=zo(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=Uo(this,e),this._style.labelText=zo(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=Uo(this,e),this._style.backgroundColor=zo(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=Uo(this,e),this._style.backgroundPadding=zo(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=Uo(this,e),this._style.backgroundEnabled=zo(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=Uo(this,e),this._style.scaleByDistance=zo(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=Uo(this,e),this._style.translucencyByDistance=zo(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=Uo(this,e),this._style.distanceDisplayCondition=zo(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=Uo(this,e),this._style.heightOffset=zo(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=Uo(this,e),this._style.anchorLineEnabled=zo(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=Uo(this,e),this._style.anchorLineColor=zo(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=Uo(this,e),this._style.image=zo(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=Uo(this,e),this._style.disableDepthTestDistance=zo(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=Uo(this,e),this._style.horizontalOrigin=zo(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=Uo(this,e),this._style.verticalOrigin=zo(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=Uo(this,e),this._style.labelHorizontalOrigin=zo(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=Uo(this,e),this._style.labelVerticalOrigin=zo(this._labelVerticalOrigin)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}}),_m.fromUrl=function(e){if(!c(e))throw new E("url is required");return jt.createIfNeeded(e).fetchJson(e).then(function(n){return new _m(n)})},_m.prototype.getColorShaderFunction=function(e,t,n){return this._colorShaderFunctionReady?(n.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,this._colorShaderFunction=c(this.color)&&c(this.color.getShaderFunction)?this.color.getShaderFunction(e,t,n,"vec4"):void 0,this._colorShaderTranslucent=n.translucent,this._colorShaderFunction)},_m.prototype.getShowShaderFunction=function(e,t,n){return this._showShaderFunctionReady||(this._showShaderFunctionReady=!0,this._showShaderFunction=c(this.show)&&c(this.show.getShaderFunction)?this.show.getShaderFunction(e,t,n,"bool"):void 0),this._showShaderFunction},_m.prototype.getPointSizeShaderFunction=function(e,t,n){return this._pointSizeShaderFunctionReady||(this._pointSizeShaderFunctionReady=!0,this._pointSizeShaderFunction=c(this.pointSize)&&c(this.pointSize.getShaderFunction)?this.pointSize.getShaderFunction(e,t,n,"float"):void 0),this._pointSizeShaderFunction},_m.prototype.getVariables=function(){let e=[];return c(this.color)&&c(this.color.getVariables)&&e.push.apply(e,this.color.getVariables()),c(this.show)&&c(this.show.getVariables)&&e.push.apply(e,this.show.getVariables()),c(this.pointSize)&&c(this.pointSize.getVariables)&&e.push.apply(e,this.pointSize.getVariables()),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};const OX=_m,Mke="uniform vec4 u_initialColor;\n\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_DAY_NIGHT_ALPHA\nuniform float u_dayTextureNightAlpha[TEXTURE_UNITS];\nuniform float u_dayTextureDayAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform float u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_COLOR_TO_ALPHA\nuniform vec4 u_colorsToAlpha[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n#endif\n\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nuniform vec2 u_lightingFadeDistance;\n#endif\n\n#ifdef TILE_LIMIT_RECTANGLE\nuniform vec4 u_cartographicLimitRectangle;\n#endif\n\n#ifdef GROUND_ATMOSPHERE\nuniform vec2 u_nightFadeDistance;\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\nuniform highp sampler2D u_clippingPlanes;\nuniform mat4 u_clippingPlanesMatrix;\nuniform vec4 u_clippingPlanesEdgeStyle;\n#endif\n\n#if defined(GROUND_ATMOSPHERE) || defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nuniform float u_minimumBrightness;\n#endif\n\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift; // Hue, saturation, brightness\n#endif\n\n#ifdef HIGHLIGHT_FILL_TILE\nuniform vec4 u_fillHighlightColor;\n#endif\n\n#ifdef TRANSLUCENT\nuniform vec4 u_frontFaceAlphaByDistance;\nuniform vec4 u_backFaceAlphaByDistance;\nuniform vec4 u_translucencyRectangle;\n#endif\n\n#ifdef UNDERGROUND_COLOR\nuniform vec4 u_undergroundColor;\nuniform vec4 u_undergroundColorAlphaByDistance;\n#endif\n\n#ifdef ENABLE_VERTEX_LIGHTING\nuniform float u_lambertDiffuseMultiplier;\nuniform float u_vertexShadowDarkness;\n#endif\n\nin vec3 v_positionMC;\nin vec3 v_positionEC;\nin vec3 v_textureCoordinates;\nin vec3 v_normalMC;\nin vec3 v_normalEC;\n\n#ifdef APPLY_MATERIAL\nin float v_height;\nin float v_slope;\nin float v_aspect;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nin float v_distance;\n#endif\n\n#if defined(GROUND_ATMOSPHERE) || defined(FOG)\nin vec3 v_atmosphereRayleighColor;\nin vec3 v_atmosphereMieColor;\nin float v_atmosphereOpacity;\n#endif\n\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nfloat interpolateByDistance(vec4 nearFarScalar, float distance)\n{\n float startDistance = nearFarScalar.x;\n float startValue = nearFarScalar.y;\n float endDistance = nearFarScalar.z;\n float endValue = nearFarScalar.w;\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\n return mix(startValue, endValue, t);\n}\n#endif\n\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)\n{\n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\n#endif\n\n#ifdef TRANSLUCENT\nbool inTranslucencyRectangle()\n{\n return\n v_textureCoordinates.x > u_translucencyRectangle.x &&\n v_textureCoordinates.x < u_translucencyRectangle.z &&\n v_textureCoordinates.y > u_translucencyRectangle.y &&\n v_textureCoordinates.y < u_translucencyRectangle.w;\n}\n#endif\n\nvec4 sampleAndBlend(\n vec4 previousColor,\n sampler2D textureToSample,\n vec2 tileTextureCoordinates,\n vec4 textureCoordinateRectangle,\n vec4 textureCoordinateTranslationAndScale,\n float textureAlpha,\n float textureNightAlpha,\n float textureDayAlpha,\n float textureBrightness,\n float textureContrast,\n float textureHue,\n float textureSaturation,\n float textureOneOverGamma,\n float split,\n vec4 colorToAlpha,\n float nightBlend)\n{\n // This crazy step stuff sets the alpha to 0.0 if this following condition is true:\n // tileTextureCoordinates.s < textureCoordinateRectangle.s ||\n // tileTextureCoordinates.s > textureCoordinateRectangle.p ||\n // tileTextureCoordinates.t < textureCoordinateRectangle.t ||\n // tileTextureCoordinates.t > textureCoordinateRectangle.q\n // In other words, the alpha is zero if the fragment is outside the rectangle\n // covered by this texture. Would an actual 'if' yield better performance?\n vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n\n alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n\n#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)\n textureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);\n#endif\n\n vec2 translation = textureCoordinateTranslationAndScale.xy;\n vec2 scale = textureCoordinateTranslationAndScale.zw;\n vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n vec4 value = texture(textureToSample, textureCoordinates);\n vec3 color = value.rgb;\n float alpha = value.a;\n\n#ifdef APPLY_COLOR_TO_ALPHA\n vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);\n colorDiff.r = max(max(colorDiff.r, colorDiff.g), colorDiff.b);\n alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);\n#endif\n\n#if !defined(APPLY_GAMMA)\n vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));\n color = tempColor.rgb;\n alpha = tempColor.a;\n#else\n color = pow(color, vec3(textureOneOverGamma));\n#endif\n\n#ifdef APPLY_SPLIT\n float splitPosition = czm_splitPosition;\n // Split to the left\n if (split < 0.0 && gl_FragCoord.x > splitPosition) {\n alpha = 0.0;\n }\n // Split to the right\n else if (split > 0.0 && gl_FragCoord.x < splitPosition) {\n alpha = 0.0;\n }\n#endif\n\n#ifdef APPLY_BRIGHTNESS\n color = mix(vec3(0.0), color, textureBrightness);\n#endif\n\n#ifdef APPLY_CONTRAST\n color = mix(vec3(0.5), color, textureContrast);\n#endif\n\n#ifdef APPLY_HUE\n color = czm_hue(color, textureHue);\n#endif\n\n#ifdef APPLY_SATURATION\n color = czm_saturation(color, textureSaturation);\n#endif\n\n float sourceAlpha = alpha * textureAlpha;\n float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n outAlpha += sign(outAlpha) - 1.0;\n\n vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n\n // When rendering imagery for a tile in multiple passes,\n // some GPU/WebGL implementation combinations will not blend fragments in\n // additional passes correctly if their computation includes an unmasked\n // divide-by-zero operation,\n // even if it's not in the output or if the output has alpha zero.\n //\n // For example, without sanitization for outAlpha,\n // this renders without artifacts:\n // if (outAlpha == 0.0) { outColor = vec3(0.0); }\n //\n // but using czm_branchFreeTernary will cause portions of the tile that are\n // alpha-zero in the additional pass to render as black instead of blending\n // with the previous pass:\n // outColor = czm_branchFreeTernary(outAlpha == 0.0, vec3(0.0), outColor);\n //\n // So instead, sanitize against divide-by-zero,\n // store this state on the sign of outAlpha, and correct on return.\n\n return vec4(outColor, max(outAlpha, 0.0));\n}\n\nvec3 colorCorrect(vec3 rgb) {\n#ifdef COLOR_CORRECT\n // Convert rgb color to hsb\n vec3 hsb = czm_RGBToHSB(rgb);\n // Perform hsb shift\n hsb.x += u_hsbShift.x; // hue\n hsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0); // saturation\n hsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0; // brightness\n // Convert shifted hsb back to rgb\n rgb = czm_HSBToRGB(hsb);\n#endif\n return rgb;\n}\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);\n\nconst float fExposure = 2.0;\n\nvec3 computeEllipsoidPosition()\n{\n float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);\n vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);\n xy *= czm_viewport.zw * mpp * 0.5;\n\n vec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));\n czm_ray ray = czm_ray(vec3(0.0), direction);\n\n vec3 ellipsoid_center = czm_view[3].xyz;\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n\n vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);\n return (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;\n}\n\nvoid main()\n{\n#ifdef TILE_LIMIT_RECTANGLE\n if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||\n v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)\n {\n discard;\n }\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\n float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n#endif\n\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)\n vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)); // normalized surface normal in model coordinates\n vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordinates\n#endif\n\n#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)\n float nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);\n#else\n float nightBlend = 0.0;\n#endif\n\n // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0\n // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the\n // fragments on the edges of tiles even though the vertex shader is outputting\n // coordinates strictly in the 0-1 range.\n vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);\n\n#ifdef SHOW_TILE_BOUNDARIES\n if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\n v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n {\n color = vec4(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\n float cameraDist;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;\n }\n else if (czm_sceneMode == czm_sceneModeColumbusView)\n {\n cameraDist = -czm_view[3].z;\n }\n else\n {\n cameraDist = length(czm_view[3]);\n }\n float fadeOutDist = u_lightingFadeDistance.x;\n float fadeInDist = u_lightingFadeDistance.y;\n if (czm_sceneMode != czm_sceneMode3D) {\n vec3 radii = czm_ellipsoidRadii;\n float maxRadii = max(radii.x, max(radii.y, radii.z));\n fadeOutDist -= maxRadii;\n fadeInDist -= maxRadii;\n }\n float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#else\n float fade = 0.0;\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\n vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\n vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\n waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\n\n float mask = texture(u_waterMask, waterMaskTextureCoordinates).r;\n\n if (mask > 0.0)\n {\n mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);\n\n vec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC);\n vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx);\n\n vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\n\n color = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);\n }\n#endif\n\n#ifdef APPLY_MATERIAL\n czm_materialInput materialInput;\n materialInput.st = v_textureCoordinates.st;\n materialInput.normalEC = normalize(v_normalEC);\n materialInput.positionToEyeEC = -v_positionEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalize(v_normalEC)); \n materialInput.slope = v_slope;\n materialInput.height = v_height;\n materialInput.aspect = v_aspect;\n czm_material material = czm_getMaterial(materialInput);\n vec4 materialColor = vec4(material.diffuse, material.alpha);\n color = alphaBlend(materialColor, color);\n#endif\n\n#ifdef ENABLE_VERTEX_LIGHTING\n float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * u_lambertDiffuseMultiplier + u_vertexShadowDarkness, 0.0, 1.0);\n vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);\n#elif defined(ENABLE_DAYNIGHT_SHADING)\n float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);\n diffuseIntensity = mix(1.0, diffuseIntensity, fade);\n vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);\n#else\n vec4 finalColor = color;\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\n vec4 clippingPlanesEdgeColor = vec4(1.0);\n clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;\n float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;\n\n if (clipDistance < clippingPlanesEdgeWidth)\n {\n finalColor = clippingPlanesEdgeColor;\n }\n#endif\n\n#ifdef HIGHLIGHT_FILL_TILE\n finalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);\n#endif\n\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\n vec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\n vec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n\n#if defined(GROUND_ATMOSPHERE) || defined(FOG)\n if (!czm_backFacing())\n {\n bool dynamicLighting = false;\n #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\n dynamicLighting = true; \n #endif\n\n vec3 rayleighColor;\n vec3 mieColor;\n float opacity;\n\n vec3 positionWC;\n vec3 lightDirection;\n\n // When the camera is far away (camera distance > nightFadeOutDistance), the scattering is computed in the fragment shader.\n // Otherwise, the scattering is computed in the vertex shader.\n #ifdef PER_FRAGMENT_GROUND_ATMOSPHERE\n positionWC = computeEllipsoidPosition();\n lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));\n computeAtmosphereScattering(\n positionWC,\n lightDirection,\n rayleighColor,\n mieColor,\n opacity\n );\n #else\n positionWC = v_positionMC;\n lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));\n rayleighColor = v_atmosphereRayleighColor;\n mieColor = v_atmosphereMieColor;\n opacity = v_atmosphereOpacity;\n #endif\n\n rayleighColor = colorCorrect(rayleighColor);\n mieColor = colorCorrect(mieColor);\n\n vec4 groundAtmosphereColor = computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);\n\n // Fog is applied to tiles selected for fog, close to the Earth.\n #ifdef FOG\n vec3 fogColor = groundAtmosphereColor.rgb;\n \n // If there is lighting, apply that to the fog.\n #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\n float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);\n fogColor *= darken; \n #endif\n\n #ifndef HDR\n fogColor.rgb = czm_acesTonemapping(fogColor.rgb);\n fogColor.rgb = czm_inverseGamma(fogColor.rgb);\n #endif\n \n const float modifier = 0.15;\n finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor.rgb, modifier), finalColor.a);\n\n #else\n // The transmittance is based on optical depth i.e. the length of segment of the ray inside the atmosphere.\n // This value is larger near the \"circumference\", as it is further away from the camera. We use it to\n // brighten up that area of the ground atmosphere.\n const float transmittanceModifier = 0.5;\n float transmittance = transmittanceModifier + clamp(1.0 - groundAtmosphereColor.a, 0.0, 1.0);\n\n vec3 finalAtmosphereColor = finalColor.rgb + groundAtmosphereColor.rgb * transmittance;\n\n #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\n float fadeInDist = u_nightFadeDistance.x;\n float fadeOutDist = u_nightFadeDistance.y;\n \n float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.05, 1.0);\n float darken = clamp(dot(normalize(positionWC), atmosphereLightDirection), 0.0, 1.0);\n vec3 darkenendGroundAtmosphereColor = mix(groundAtmosphereColor.rgb, finalAtmosphereColor.rgb, darken);\n\n finalAtmosphereColor = mix(darkenendGroundAtmosphereColor, finalAtmosphereColor, sunlitAtmosphereIntensity);\n #endif\n \n #ifndef HDR\n finalAtmosphereColor.rgb = vec3(1.0) - exp(-fExposure * finalAtmosphereColor.rgb);\n #else\n finalAtmosphereColor.rgb = czm_saturation(finalAtmosphereColor.rgb, 1.6);\n #endif\n \n finalColor.rgb = mix(finalColor.rgb, finalAtmosphereColor.rgb, fade);\n #endif\n }\n#endif\n\n#ifdef UNDERGROUND_COLOR\n if (czm_backFacing())\n {\n float distanceFromEllipsoid = max(czm_eyeHeight, 0.0);\n float distance = max(v_distance - distanceFromEllipsoid, 0.0);\n float blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);\n vec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);\n finalColor = alphaBlend(undergroundColor, finalColor);\n }\n#endif\n\n#ifdef TRANSLUCENT\n if (inTranslucencyRectangle())\n {\n vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;\n finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);\n }\n#endif\n \n out_FragColor = finalColor;\n}\n\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n\nfloat waveFade(float edge0, float edge1, float x)\n{\n float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return pow(1.0 - y, 5.0);\n}\n\nfloat linearFade(float edge0, float edge1, float x)\n{\n return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\n\n// Based on water rendering by Jonas Wagner:\n// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog\n\n// low altitude wave settings\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\n\n// high altitude wave settings\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\n\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)\n{\n vec3 positionToEyeEC = -positionEyeCoordinates;\n float positionToEyeECLength = length(positionToEyeEC);\n\n // The double normalize below works around a bug in Firefox on Android devices.\n vec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));\n\n // Fade out the waves as the camera moves far from the surface.\n float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n\n#ifdef SHOW_OCEAN_WAVES\n // high altitude waves\n float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\n vec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\n vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\n\n // low altitude waves\n time = czm_frameNumber * oceanAnimationSpeedLowAltitude;\n noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\n vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\n\n // blend the 2 wave layers based on distance to surface\n float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\n float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\n vec3 normalTangentSpace =\n (highAltitudeFade * normalTangentSpaceHighAltitude) +\n (lowAltitudeFade * normalTangentSpaceLowAltitude);\n normalTangentSpace = normalize(normalTangentSpace);\n\n // fade out the normal perturbation as we move farther from the water surface\n normalTangentSpace.xy *= waveIntensity;\n normalTangentSpace = normalize(normalTangentSpace);\n#else\n vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\n\n vec3 normalEC = enuToEye * normalTangentSpace;\n\n const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\n\n // Use diffuse light to highlight the waves\n float diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;\n vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);\n\n#ifdef SHOW_OCEAN_WAVES\n // Where diffuse light is low or non-existent, use wave highlights based solely on\n // the wave bumpiness and no particular light direction.\n float tsPerturbationRatio = normalTangentSpace.z;\n vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\n vec3 nonDiffuseHighlight = vec3(0.0);\n#endif\n\n // Add specular highlights in 3D, and in all modes when zoomed in.\n float specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);\n float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\n float specular = specularIntensity * surfaceReflectance;\n\n#ifdef HDR\n specular *= 1.4;\n\n float e = 0.2;\n float d = 3.3;\n float c = 1.7;\n\n vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));\n#else\n vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;\n#endif\n\n return vec4(color, imageryColor.a);\n}\n\n#endif // #ifdef SHOW_REFLECTIVE_OCEAN\n",Fke="#ifdef QUANTIZATION_BITS12\nin vec4 compressed0;\nin float compressed1;\n#else\nin vec4 position3DAndHeight;\nin vec4 textureCoordAndEncodedNormals;\n#endif\n\n#ifdef GEODETIC_SURFACE_NORMALS\nin vec3 geodeticSurfaceNormal;\n#endif\n\n#ifdef EXAGGERATION\nuniform vec2 u_terrainExaggerationAndRelativeHeight;\n#endif\n\nuniform vec3 u_center3D;\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_tileRectangle;\n\n// Uniforms for 2D Mercator projection\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\n\nout vec3 v_positionMC;\nout vec3 v_positionEC;\n\nout vec3 v_textureCoordinates;\nout vec3 v_normalMC;\nout vec3 v_normalEC;\n\n#ifdef APPLY_MATERIAL\nout float v_slope;\nout float v_aspect;\nout float v_height;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nout float v_distance;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nout vec3 v_atmosphereRayleighColor;\nout vec3 v_atmosphereMieColor;\nout float v_atmosphereOpacity;\n#endif\n\n// These functions are generated at runtime.\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\n\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return u_modifiedModelViewProjection * vec4(position, 1.0);\n}\n\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\n // The width of a tile at level 11, in radians and assuming a single root tile, is\n // 2.0 * czm_pi / pow(2.0, 11.0)\n // We want to just linearly interpolate the 2D position from the texture coordinates\n // when we're at this level or higher. The constant below is the expression\n // above evaluated and then rounded up at the 4th significant digit.\n const float maxTileWidth = 0.003068;\n float positionFraction = textureCoordinates.y;\n float southLatitude = u_southAndNorthLatitude.x;\n float northLatitude = u_southAndNorthLatitude.y;\n if (northLatitude - southLatitude > maxTileWidth)\n {\n float southMercatorY = u_southMercatorYAndOneOverHeight.x;\n float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\n\n float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\n currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\n positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n }\n return positionFraction;\n}\n\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\n return textureCoordinates.y;\n}\n\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n return u_modifiedModelViewProjection * rtcPosition2D;\n}\n\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\n\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, height, textureCoordinates);\n}\n\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\n // We do not do RTC while morphing, so there is potential for jitter.\n // This is unlikely to be noticeable, though.\n vec3 position3DWC = position + u_center3D;\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\n return czm_modelViewProjection * morphPosition;\n}\n\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\n\nvoid main()\n{\n#ifdef QUANTIZATION_BITS12\n vec2 xy = czm_decompressTextureCoordinates(compressed0.x);\n vec2 zh = czm_decompressTextureCoordinates(compressed0.y);\n vec3 position = vec3(xy, zh.x);\n float height = zh.y;\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);\n\n height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\n position = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\n float encodedNormal = compressed1;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\n float encodedNormal = 0.0;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = compressed0.w;\n#else\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = 0.0;\n#endif\n\n#else\n // A single float per element\n vec3 position = position3DAndHeight.xyz;\n float height = position3DAndHeight.w;\n vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = textureCoordAndEncodedNormals.z;\n float encodedNormal = textureCoordAndEncodedNormals.w;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = textureCoordAndEncodedNormals.z;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = textureCoordAndEncodedNormals.z;\n float encodedNormal = 0.0;\n#else\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = 0.0;\n#endif\n\n#endif\n\n vec3 position3DWC = position + u_center3D;\n\n#ifdef GEODETIC_SURFACE_NORMALS\n vec3 ellipsoidNormal = geodeticSurfaceNormal;\n#else\n vec3 ellipsoidNormal = normalize(position3DWC);\n#endif\n\n#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)\n float exaggeration = u_terrainExaggerationAndRelativeHeight.x;\n float relativeHeight = u_terrainExaggerationAndRelativeHeight.y;\n float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;\n\n // stop from going through center of earth\n float minRadius = min(min(czm_ellipsoidRadii.x, czm_ellipsoidRadii.y), czm_ellipsoidRadii.z);\n newHeight = max(newHeight, -minRadius);\n\n vec3 offset = ellipsoidNormal * (newHeight - height);\n position += offset;\n position3DWC += offset;\n height = newHeight;\n#endif\n\n gl_Position = getPosition(position, height, textureCoordinates);\n\n v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\n v_positionMC = position3DWC; // position in model coordinates\n\n v_textureCoordinates = vec3(textureCoordinates, webMercatorT);\n\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\n vec3 normalMC = czm_octDecode(encodedNormal);\n\n#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)\n vec3 projection = dot(normalMC, ellipsoidNormal) * ellipsoidNormal;\n vec3 rejection = normalMC - projection;\n normalMC = normalize(projection + rejection * exaggeration);\n#endif\n\n v_normalMC = normalMC;\n v_normalEC = czm_normal3D * v_normalMC;\n#endif\n\n#if defined(FOG) || (defined(GROUND_ATMOSPHERE) && !defined(PER_FRAGMENT_GROUND_ATMOSPHERE))\n\n bool dynamicLighting = false;\n\n #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\n dynamicLighting = true;\n #endif\n\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\n vec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\n vec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n\n vec3 lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(position3DWC));\n\n computeAtmosphereScattering(\n position3DWC,\n lightDirection,\n v_atmosphereRayleighColor,\n v_atmosphereMieColor,\n v_atmosphereOpacity\n );\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\n v_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);\n#endif\n\n#ifdef APPLY_MATERIAL\n float northPoleZ = czm_ellipsoidRadii.z;\n vec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);\n vec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));\n float dotProd = abs(dot(ellipsoidNormal, v_normalMC));\n v_slope = acos(dotProd);\n vec3 normalRejected = ellipsoidNormal * dotProd;\n vec3 normalProjected = v_normalMC - normalRejected;\n vec3 aspectVector = normalize(normalProjected);\n v_aspect = acos(dot(aspectVector, vectorEastMC));\n float determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);\n v_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);\n v_height = height;\n#endif\n}\n",CD="uniform vec3 u_radiiAndDynamicAtmosphereColor;\n\nuniform float u_atmosphereLightIntensity;\nuniform float u_atmosphereRayleighScaleHeight;\nuniform float u_atmosphereMieScaleHeight;\nuniform float u_atmosphereMieAnisotropy;\nuniform vec3 u_atmosphereRayleighCoefficient;\nuniform vec3 u_atmosphereMieCoefficient;\n\nconst float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.\nconst int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.\nconst int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.\n\n/**\n * Rational approximation to tanh(x)\n*/\nfloat approximateTanh(float x) {\n float x2 = x * x;\n return max(-1.0, min(+1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));\n}\n\n/**\n * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as\n * the transmittance value for the ray.\n *\n * @param {czm_ray} primaryRay The ray from the camera to the position.\n * @param {float} primaryRayLength The length of the primary ray.\n * @param {vec3} lightDirection The direction of the light to calculate the scattering from.\n * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.\n * @param {vec3} mieColor The variable the Mie scattering will be written to.\n * @param {float} opacity The variable the transmittance will be written to.\n * @glslFunction\n */\nvoid computeScattering(\n czm_ray primaryRay,\n float primaryRayLength,\n vec3 lightDirection,\n float atmosphereInnerRadius,\n out vec3 rayleighColor,\n out vec3 mieColor,\n out float opacity\n) {\n\n // Initialize the default scattering amounts to 0.\n rayleighColor = vec3(0.0);\n mieColor = vec3(0.0);\n opacity = 0.0;\n\n float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\n\n vec3 origin = vec3(0.0);\n\n // Calculate intersection from the camera to the outer ring of the atmosphere.\n czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);\n\n // Return empty colors if no intersection with the atmosphere geometry.\n if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {\n return;\n }\n\n // To deal with smaller values of PRIMARY_STEPS (e.g. 4)\n // we implement a split strategy: sky or horizon.\n // For performance reasons, instead of a if/else branch\n // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0\n float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);\n // Value close to 0.0: close to the horizon\n // Value close to 1.0: above in the sky\n float w_stop_gt_lprl = 0.5 * (1.0 + approximateTanh(x));\n \n // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.\n float start_0 = primaryRayAtmosphereIntersect.start;\n primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);\n // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.\n primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));\n\n // For the number of ray steps, distinguish inside or outside atmosphere (outer space)\n // (1) from outer space we have to use more ray steps to get a realistic rendering\n // (2) within atmosphere we need fewer steps for faster rendering\n float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters\n float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + approximateTanh(x_o_a));\n int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.\n int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.\n\n // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.\n float rayPositionLength = primaryRayAtmosphereIntersect.start;\n // (1) Outside the atmosphere: constant rayStepLength\n // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps\n float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;\n float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));\n float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));\n\n vec3 rayleighAccumulation = vec3(0.0);\n vec3 mieAccumulation = vec3(0.0);\n vec2 opticalDepth = vec2(0.0);\n vec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);\n\n // Sample positions on the primary ray.\n for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {\n\n // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (i >= PRIMARY_STEPS) {\n break;\n }\n\n // Calculate sample position along viewpoint ray.\n vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);\n\n // Calculate height of sample position above ellipsoid.\n float sampleHeight = length(samplePosition) - atmosphereInnerRadius;\n\n // Calculate and accumulate density of particles at the sample position.\n vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;\n opticalDepth += sampleDensity;\n\n // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.\n czm_ray lightRay = czm_ray(samplePosition, lightDirection);\n czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);\n\n float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);\n float lightPositionLength = 0.0;\n\n vec2 lightOpticalDepth = vec2(0.0);\n\n // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.\n for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {\n\n // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (j >= LIGHT_STEPS) {\n break;\n }\n\n // Calculate sample position along light ray.\n vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);\n\n // Calculate height of the light sample position above ellipsoid.\n float lightHeight = length(lightPosition) - atmosphereInnerRadius;\n\n // Calculate density of photons at the light sample position.\n lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;\n\n // Increment distance on light ray.\n lightPositionLength += lightStepLength;\n }\n\n // Compute attenuation via the primary ray and the light ray.\n vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));\n\n // Accumulate the scattering.\n rayleighAccumulation += sampleDensity.x * attenuation;\n mieAccumulation += sampleDensity.y * attenuation;\n\n // Increment distance on primary ray.\n rayPositionLength += (rayStepLength += rayStepLengthIncrease);\n }\n\n // Compute the scattering amount.\n rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;\n mieColor = u_atmosphereMieCoefficient * mieAccumulation;\n\n // Compute the transmittance i.e. how much light is passing through the atmosphere.\n opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));\n}\n\nvec4 computeAtmosphereColor(\n vec3 positionWC,\n vec3 lightDirection,\n vec3 rayleighColor,\n vec3 mieColor,\n float opacity\n) {\n // Setup the primary ray: from the camera position to the vertex position.\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n\n float cosAngle = dot(cameraToPositionWCDirection, lightDirection);\n float cosAngleSq = cosAngle * cosAngle;\n\n float G = u_atmosphereMieAnisotropy;\n float GSq = G * G;\n\n // The Rayleigh phase function.\n float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);\n // The Mie phase function.\n float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));\n\n // The final color is generated by combining the effects of the Rayleigh and Mie scattering.\n vec3 rayleigh = rayleighPhase * rayleighColor;\n vec3 mie = miePhase * mieColor;\n\n vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;\n\n return vec4(color, opacity);\n}\n",LX="void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {\n\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);\n \n float atmosphereInnerRadius = length(positionWC);\n\n computeScattering(\n primaryRay,\n length(cameraToPositionWC),\n lightDirection,\n atmosphereInnerRadius,\n rayleighColor,\n mieColor,\n opacity\n );\n}\n",Bke=new G,LF=function kke(e,t){T.typeOf.object("clippingPlaneCollection",e),T.typeOf.object("context",t);const n=e.unionClippingRegions,i=e.length,o=Bd.useFloatTexture(t),r=Bd.getTextureResolution(e,t,Bke),s=r.x,a=r.y;let l=o?function Vke(e,t){const i=1/t;let o=`${1/e}`;-1===o.indexOf(".")&&(o+=".0");let r=`${i}`;return-1===r.indexOf(".")&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int pixY = clippingPlaneNumber / ${e};\n int pixX = clippingPlaneNumber - (pixY * ${e});\n float u = (float(pixX) + 0.5) * ${o};\n float v = (float(pixY) + 0.5) * ${r};\n vec4 plane = texture(packedClippingPlanes, vec2(u, v));\n return czm_transformPlane(plane, transform);\n}\n`}(s,a):function Hke(e,t){const i=1/t;let o=`${1/e}`;-1===o.indexOf(".")&&(o+=".0");let r=`${i}`;return-1===r.indexOf(".")&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int clippingPlaneStartIndex = clippingPlaneNumber * 2;\n int pixY = clippingPlaneStartIndex / ${e};\n int pixX = clippingPlaneStartIndex - (pixY * ${e});\n float u = (float(pixX) + 0.5) * ${o};\n float v = (float(pixY) + 0.5) * ${r};\n vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;\n vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n vec4 plane;\n plane.xyz = czm_octDecode(oct, 65535.0);\n plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + ${o}, v)));\n return czm_transformPlane(plane, transform);\n}\n`}(s,a);return l+="\n",l+=n?function Uke(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount;\n float pixelWidth = czm_metersPerPixel(position);\n bool breakAndDiscard = false;\n for (int i = 0; i < ${e}; ++i)\n {\n vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));\n if (amount <= 0.0)\n {\n breakAndDiscard = true;\n break;\n }\n }\n if (breakAndDiscard) {\n discard;\n }\n return clipAmount;\n}\n`}(i):function zke(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n bool clipped = true;\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount = 0.0;\n float pixelWidth = czm_metersPerPixel(position);\n for (int i = 0; i < ${e}; ++i)\n {\n vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = max(amount, clipAmount);\n clipped = clipped && (amount <= 0.0);\n }\n if (clipped)\n {\n discard;\n }\n return clipAmount;\n}\n`}(i),l};function Gke(e,t,n,i,o){this.numberOfDayTextures=e,this.flags=t,this.material=n,this.shaderProgram=i,this.clippingShaderState=o}function RF(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}RF.prototype.getShaderProgram=function(e){const t=e.frameState,n=e.surfaceTile,i=e.numberOfDayTextures,o=e.applyBrightness,r=e.applyContrast,s=e.applyHue,a=e.applySaturation,l=e.applyGamma,u=e.applyAlpha,d=e.applyDayNightAlpha,h=e.applySplit,m=e.showReflectiveOcean,_=e.showOceanWaves,p=e.enableLighting,y=e.dynamicAtmosphereLighting,A=e.dynamicAtmosphereLightingFromSun,x=e.showGroundAtmosphere,C=e.perFragmentGroundAtmosphere,w=e.hasVertexNormals,v=e.useWebMercatorProjection,D=e.enableFog,P=e.enableClippingPlanes,N=e.clippingPlanes,B=e.hasImageryLayerCutout,F=e.colorCorrect,S=e.highlightFillTile,I=e.colorToAlpha,L=e.hasGeodeticSurfaceNormals,M=e.hasExaggeration,U=e.showUndergroundColor,z=e.translucent;let j=0,W="";const V=n.renderedMesh.encoding;V.quantization===Vc.BITS12&&(j=1,W="QUANTIZATION_BITS12");let Z=0,ie="";e.clippedByBoundaries&&(Z=1,ie="TILE_LIMIT_RECTANGLE");let Y=0,Q="";B&&(Y=1,Q="APPLY_IMAGERY_CUTOUT");const K=t.mode,me=K|o<<2|r<<3|s<<4|a<<5|l<<6|u<<7|m<<8|_<<9|p<<10|y<<11|A<<12|x<<13|C<<14|w<<15|v<<16|D<<17|j<<18|h<<19|P<<20|Z<<21|Y<<22|F<<23|S<<24|I<<25|L<<26|M<<27|U<<28|z<<29|d<<30;let we=0;c(N)&&N.length>0&&(we=P?N.clippingPlanesState:0);let le=n.surfaceShader;if(c(le)&&le.numberOfDayTextures===i&&le.flags===me&&le.material===this.material&&le.clippingShaderState===we)return le.shaderProgram;let Ae=this._shadersByTexturesFlags[i];if(c(Ae)||(Ae=this._shadersByTexturesFlags[i]=[]),le=Ae[me],!c(le)||le.material!==this.material||le.clippingShaderState!==we){const xe=this.baseVertexShaderSource.clone(),De=this.baseFragmentShaderSource.clone();0!==we&&De.sources.unshift(LF(N,t.context)),xe.defines.push(W),De.defines.push(`TEXTURE_UNITS ${i}`,ie,Q),o&&De.defines.push("APPLY_BRIGHTNESS"),r&&De.defines.push("APPLY_CONTRAST"),s&&De.defines.push("APPLY_HUE"),a&&De.defines.push("APPLY_SATURATION"),l&&De.defines.push("APPLY_GAMMA"),u&&De.defines.push("APPLY_ALPHA"),d&&De.defines.push("APPLY_DAY_NIGHT_ALPHA"),m&&(De.defines.push("SHOW_REFLECTIVE_OCEAN"),xe.defines.push("SHOW_REFLECTIVE_OCEAN")),_&&De.defines.push("SHOW_OCEAN_WAVES"),I&&De.defines.push("APPLY_COLOR_TO_ALPHA"),U&&(xe.defines.push("UNDERGROUND_COLOR"),De.defines.push("UNDERGROUND_COLOR")),z&&(xe.defines.push("TRANSLUCENT"),De.defines.push("TRANSLUCENT")),p&&(w?(xe.defines.push("ENABLE_VERTEX_LIGHTING"),De.defines.push("ENABLE_VERTEX_LIGHTING")):(xe.defines.push("ENABLE_DAYNIGHT_SHADING"),De.defines.push("ENABLE_DAYNIGHT_SHADING"))),y&&(xe.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),De.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),A&&(xe.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),De.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),x&&(xe.defines.push("GROUND_ATMOSPHERE"),De.defines.push("GROUND_ATMOSPHERE"),C&&(xe.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),De.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),xe.defines.push("INCLUDE_WEB_MERCATOR_Y"),De.defines.push("INCLUDE_WEB_MERCATOR_Y"),D&&(xe.defines.push("FOG"),De.defines.push("FOG")),h&&De.defines.push("APPLY_SPLIT"),P&&De.defines.push("ENABLE_CLIPPING_PLANES"),F&&De.defines.push("COLOR_CORRECT"),S&&De.defines.push("HIGHLIGHT_FILL_TILE"),L&&xe.defines.push("GEODETIC_SURFACE_NORMALS"),M&&xe.defines.push("EXAGGERATION");let qe=" vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)\n {\n vec4 color = initialColor;\n";B&&(qe+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(let ot=0;ot<i;++ot)qe+=B?` cutoutAndColorResult = u_dayTextureCutoutRectangles[${ot}];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = sampleAndBlend(\n`:" color = sampleAndBlend(\n",qe+=` color,\n u_dayTextures[${ot}],\n u_dayTextureUseWebMercatorT[${ot}] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle[${ot}],\n u_dayTextureTranslationAndScale[${ot}],\n ${u?`u_dayTextureAlpha[${ot}]`:"1.0"},\n ${d?`u_dayTextureNightAlpha[${ot}]`:"1.0"},\n${d?`u_dayTextureDayAlpha[${ot}]`:"1.0"},\n${o?`u_dayTextureBrightness[${ot}]`:"0.0"},\n ${r?`u_dayTextureContrast[${ot}]`:"0.0"},\n ${s?`u_dayTextureHue[${ot}]`:"0.0"},\n ${a?`u_dayTextureSaturation[${ot}]`:"0.0"},\n ${l?`u_dayTextureOneOverGamma[${ot}]`:"0.0"},\n ${h?`u_dayTextureSplit[${ot}]`:"0.0"},\n ${I?`u_colorsToAlpha[${ot}]`:"vec4(0.0)"},\n nightBlend );\n`,B&&(qe+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n");qe+=" return color;\n }",De.sources.push(qe),xe.sources.push(function jke(e){let o;switch(e){case ce.SCENE3D:o="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }";break;case ce.SCENE2D:case ce.COLUMBUS_VIEW:o="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }";break;case ce.MORPHING:o="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }"}return o}(K)),xe.sources.push(function Wke(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}(v));const $e=mi.fromCache({context:t.context,vertexShaderSource:xe,fragmentShaderSource:De,attributeLocations:V.getAttributeLocations()});le=Ae[me]=new Gke(i,me,this.material,$e,we)}return n.surfaceShader=le,le.shaderProgram},RF.prototype.destroy=function(){let e,t;const n=this._shadersByTexturesFlags;for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];if(!c(o))continue;for(e in o)o.hasOwnProperty(e)&&(t=o[e],c(t)&&t.shaderProgram.destroy())}return Ye(this)};const qke=RF,ys=Object.freeze({NONE:-1,PARTIAL:0,FULL:1}),Zl=Object.freeze({START:0,LOADING:1,DONE:2,FAILED:3}),Io=Object.freeze({FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6});function Vo(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new fe(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new f,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=Io.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new be,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}Object.defineProperties(Vo.prototype,{eligibleForUnloading:{get:function(){const e=this.terrainState;let n=!(e===Io.RECEIVING||e===Io.TRANSFORMING);const i=this.imagery;for(let o=0,r=i.length;n&&o<r;++o){const s=i[o];n=!c(s.loadingImagery)||s.loadingImagery.state!==ji.TRANSITIONING}return n}},renderedMesh:{get:function(){return c(this.vertexArray)?this.mesh:c(this.fill)?this.fill.mesh:void 0}}});const Yke=new Se;function NF(e,t,n,i,o,r){let s=e.getExaggeratedPosition(i,o,r);if(c(t)&&t!==ce.SCENE3D){const l=n.ellipsoid.cartesianToCartographic(s,Yke);s=n.project(l,r),s=f.fromElements(s.z,s.x,s.y,r)}return s}const Xke=new f,Zke=new f,$ke=new f;function RX(e,t,n,i){const o=e.renderedMesh,r=o.vertices,s=o.encoding,a=r.length/s.stride;let l=Iy.clone(s);l.hasGeodeticSurfaceNormals=t,l=Iy.clone(l);const u=l.stride,d=new Float32Array(a*u);t?s.addGeodeticSurfaceNormals(r,d,n):s.removeGeodeticSurfaceNormals(r,d),o.vertices=d,o.stride=u,o!==e.mesh?(Vo._freeVertexArray(e.fill.vertexArray),e.fill.vertexArray=Vo._createVertexArrayForMesh(i.context,o)):(Vo._freeVertexArray(e.vertexArray),e.vertexArray=Vo._createVertexArrayForMesh(i.context,o)),Vo._freeVertexArray(e.wireframeVertexArray),e.wireframeVertexArray=void 0}Vo.prototype.pick=function(e,t,n,i,o){const r=this.renderedMesh;if(!c(r))return;const s=r.vertices,a=r.indices,l=r.encoding,u=a.length;let d=Number.MAX_VALUE;for(let h=0;h<u;h+=3){const _=a[h+1],p=a[h+2],y=NF(l,t,n,s,a[h],Xke),A=NF(l,t,n,s,_,Zke),x=NF(l,t,n,s,p,$ke),C=rr.rayTriangleParametric(e,y,A,x,i);c(C)&&C<d&&C>=0&&(d=C)}return d!==Number.MAX_VALUE?fi.getPoint(e,d,o):void 0},Vo.prototype.freeResources=function(){c(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=Io.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();const e=this.imagery;for(let t=0,n=e.length;t<n;++t)e[t].freeResources();this.imagery.length=0,this.freeVertexArray()},Vo.prototype.freeVertexArray=function(){Vo._freeVertexArray(this.vertexArray),this.vertexArray=void 0,Vo._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0},Vo.initialize=function(e,t,n){let i=e.data;c(i)||(i=e.data=new Vo),e.state===Zl.START&&(function Kke(e,t,n){let i=t.getTileDataAvailable(e.x,e.y,e.level);if(!c(i)&&c(e.parent)){const o=e.parent,r=o.data;c(r)&&c(r.terrainData)&&(i=r.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}!1===i&&(e.data.terrainState=Io.FAILED);for(let o=0,r=n.length;o<r;++o){const s=n.get(o);s.show&&s._createTileImagerySkeletons(e,t)}}(e,t,n),e.state=Zl.LOADING)},Vo.processStateMachine=function(e,t,n,i,o,r,s){Vo.initialize(e,n,i);const a=e.data;if(e.state===Zl.LOADING&&function Qke(e,t,n,i,o,r){const s=e.data,a=e.parent;if(s.terrainState===Io.FAILED&&void 0!==a&&(void 0!==a.data&&void 0!==a.data.terrainData&&!1!==a.data.terrainData.canUpsample||Vo.processStateMachine(a,t,n,i,o,r,!0)),s.terrainState===Io.FAILED&&function Jke(e,t,n,i,o,r,s){const a=t.parent;if(!a)return void(t.state=Zl.FAILED);const l=a.data.terrainData,u=a.x,d=a.y,h=a.level;if(!c(l))return;const m=l.upsample(i.tilingScheme,u,d,h,o,r,s);c(m)&&(e.terrainState=Io.RECEIVING,Promise.resolve(m).then(function(_){c(_)&&(e.terrainData=_,e.terrainState=Io.RECEIVED)}).catch(function(){e.terrainState=Io.FAILED}))}(s,e,0,n,e.x,e.y,e.level),s.terrainState===Io.UNLOADED&&function eUe(e,t,n,i,o){function a(){const l=new n_({throttle:!1,throttleByServer:!0,type:t_.TERRAIN});e.request=l;const u=t.requestTileGeometry(n,i,o,l);c(u)?(e.terrainState=Io.RECEIVING,Promise.resolve(u).then(function(d){!function r(l){if(!c(l))return e.terrainState=Io.UNLOADED,void(e.request=void 0);e.terrainData=l,e.terrainState=Io.RECEIVED,e.request=void 0}(d)}).catch(function(d){!function s(l){if(e.request.state===Ao.CANCELLED)return e.terrainData=void 0,e.terrainState=Io.UNLOADED,void(e.request=void 0);e.terrainState=Io.FAILED,e.request=void 0,t._requestError=Wa.reportError(t._requestError,t,t.errorEvent,`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${o}. Error message: "${l}"`,n,i,o),t._requestError.retry&&a()}(d)})):(e.terrainState=Io.UNLOADED,e.request=void 0)}a()}(s,n,e.x,e.y,e.level),s.terrainState===Io.RECEIVED&&function nUe(e,t,n,i,o,r){const a=tUe;a.tilingScheme=n.tilingScheme,a.x=i,a.y=o,a.level=r,a.exaggeration=t.terrainExaggeration,a.exaggerationRelativeHeight=t.terrainExaggerationRelativeHeight,a.throttle=!0;const u=e.terrainData.createMesh(a);c(u)&&(e.terrainState=Io.TRANSFORMING,Promise.resolve(u).then(function(d){e.mesh=d,e.terrainState=Io.TRANSFORMED}).catch(function(){e.terrainState=Io.FAILED}))}(s,t,n,e.x,e.y,e.level),s.terrainState===Io.TRANSFORMED&&(function iUe(e,t,n,i,o,r,s){e.vertexArray=Vo._createVertexArrayForMesh(t,e.mesh),e.terrainState=Io.READY,e.fill=e.fill&&e.fill.destroy(s)}(s,t.context,0,0,0,0,r),s.updateExaggeration(e,t,o)),s.terrainState>=Io.RECEIVED&&void 0===s.waterMaskTexture&&n.hasWaterMask)if(void 0!==s.terrainData.waterMask)!function rUe(e,t){const n=t.terrainData.waterMask,i=function oUe(e){let t=e.cache.tile_waterMaskData;if(!c(t)){const n=jn.create({context:e,pixelFormat:vt.LUMINANCE,pixelDatatype:bt.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1,t={allWaterTexture:n,sampler:new Hi({wrapS:$i.CLAMP_TO_EDGE,wrapT:$i.CLAMP_TO_EDGE,minificationFilter:ei.LINEAR,magnificationFilter:ls.LINEAR}),destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}(e);let o;const r=n.length;if(1===r){if(0===n[0])return;o=i.allWaterTexture}else{const s=Math.sqrt(r);o=jn.create({context:e,pixelFormat:vt.LUMINANCE,pixelDatatype:bt.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:i.sampler,flipY:!1}),o.referenceCount=0}++o.referenceCount,t.waterMaskTexture=o,fe.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}(t.context,s);else{const u=s._findAncestorTileWithTerrainData(e);c(u)&&c(u.data.waterMaskTexture)&&(s.waterMaskTexture=u.data.waterMaskTexture,++s.waterMaskTexture.referenceCount,s._computeWaterMaskTranslationAndScale(e,u,s.waterMaskTranslationAndScale))}}(e,t,n,i,o,r),s)return;const l=e.renderable;e.renderable=c(a.vertexArray);const u=a.terrainState===Io.READY;e.upsampledFromParent=c(a.terrainData)&&a.terrainData.wasCreatedByUpsampling();const d=a.processImagery(e,n,t);if(u&&d){const h=e._loadedCallbacks,m={};for(const _ in h)h.hasOwnProperty(_)&&(h[_](e)||(m[_]=h[_]));e._loadedCallbacks=m,e.state=Zl.DONE}l&&(e.renderable=!0)},Vo.prototype.processImagery=function(e,t,n,i){let r=e.upsampledFromParent,s=!1,a=!0;const l=e.data.imagery;let u,d;for(u=0,d=l.length;u<d;++u){const h=l[u];if(!c(h.loadingImagery)){r=!1;continue}if(h.loadingImagery.state===ji.PLACEHOLDER){const _=h.loadingImagery.imageryLayer;if(_.ready){h.freeResources(),l.splice(u,1),_._createTileImagerySkeletons(e,t,u),--u,d=l.length;continue}r=!1}const m=h.processStateMachine(e,n,i);a=a&&m,s=s||m||c(h.readyImagery),r=r&&c(h.loadingImagery)&&(h.loadingImagery.state===ji.FAILED||h.loadingImagery.state===ji.INVALID)}return e.upsampledFromParent=r,e.renderable=e.renderable&&(s||a),a},Vo.prototype.addGeodeticSurfaceNormals=function(e,t){RX(this,!0,e,t)},Vo.prototype.removeGeodeticSurfaceNormals=function(e){RX(this,!1,void 0,e)},Vo.prototype.updateExaggeration=function(e,t,n){const i=this,o=i.renderedMesh;if(void 0===o)return;const r=t.terrainExaggeration,s=t.terrainExaggerationRelativeHeight,a=1!==r,l=o.encoding,u=l.exaggeration!==r;if((u||l.exaggerationRelativeHeight!==s)&&(u&&(a&&!l.hasGeodeticSurfaceNormals?i.addGeodeticSurfaceNormals(e.tilingScheme.ellipsoid,t):!a&&l.hasGeodeticSurfaceNormals&&i.removeGeodeticSurfaceNormals(t)),l.exaggeration=r,l.exaggerationRelativeHeight=s,void 0!==n)){n._tileToUpdateHeights.push(e);const h=e.customData,m=h.length;for(let _=0;_<m;_++)h[_].level=-1}};const tUe={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};Vo._createVertexArrayForMesh=function(e,t){const i=yn.createVertexBuffer({context:e,typedArray:t.vertices,usage:Tt.STATIC_DRAW}),o=t.encoding.getAttributes(i),r=t.indices.indexBuffers||{};let s=r[e.id];if(!c(s)||s.isDestroyed()){const a=t.indices;s=yn.createIndexBuffer({context:e,typedArray:a,usage:Tt.STATIC_DRAW,indexDatatype:Ot.fromSizeInBytes(a.BYTES_PER_ELEMENT)}),s.vertexArrayDestroyable=!1,s.referenceCount=1,r[e.id]=s,t.indices.indexBuffers=r}else++s.referenceCount;return new ds({context:e,attributes:o,indexBuffer:s})},Vo._freeVertexArray=function(e){if(c(e)){const t=e.indexBuffer;e.isDestroyed()||e.destroy(),c(t)&&!t.isDestroyed()&&c(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}},Vo.prototype._findAncestorTileWithTerrainData=function(e){let t=e.parent;for(;c(t)&&(!c(t.data)||!c(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t},Vo.prototype._computeWaterMaskTranslationAndScale=function(e,t,n){const i=t.rectangle,o=e.rectangle,r=o.width,s=o.height,a=r/i.width,l=s/i.height;return n.x=a*(o.west-i.west)/r,n.y=l*(o.south-i.south)/s,n.z=a,n.w=l,n};const bg=Vo,In={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},NX={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>=NX.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}},wi=NX;function fb(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 fe}fb.prototype.update=function(e,t,n){this.changedThisFrame&&(UX(e,t,this.tile,n),this.changedThisFrame=!1)},fb.prototype.destroy=function(e){this._destroyVertexArray(e),c(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)},fb.prototype._destroyVertexArray=function(e){c(this.vertexArray)&&(c(e)?e.push(this.vertexArray):bg._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};const sUe=new pN;function ts(e,t,n,i,o,r,s,a,l){if(void 0===i)return;let u=i;for(;u&&(u._lastSelectionResultFrame!==o||wi.wasKicked(u._lastSelectionResult)||wi.originalResult(u._lastSelectionResult)===wi.CULLED);){if(s)return;const d=u.parent;if(r>=In.NORTHWEST&&void 0!==d)switch(r){case In.NORTHWEST:u=u===d.northwestChild?d:void 0;break;case In.NORTHEAST:u=u===d.northeastChild?d:void 0;break;case In.SOUTHWEST:u=u===d.southwestChild?d:void 0;break;case In.SOUTHEAST:u=u===d.southeastChild?d:void 0}else u=d}if(void 0!==u){if(u._lastSelectionResult===wi.RENDERED){if(c(u.data.vertexArray))return;return void function aUe(e,t,n,i,o,r,s,a){const l=i.data;if(void 0===l.fill)l.fill=new fb(i);else if(l.fill.visitedFrame===r)return;l.fill.enqueuedFrame!==r&&(l.fill.enqueuedFrame=r,l.fill.changedThisFrame=!1,s.enqueue(i)),function cUe(e,t,n,i,o,r){const s=i.data.fill;let a;const l=n.data.fill;let u,d,h,m,_,p;switch(c(l)?(l.visitedFrame=t.frameNumber,l.changedThisFrame&&(UX(e,t,n,r),l.changedThisFrame=!1),a=n.data.fill.mesh):a=n.data.mesh,o){case In.WEST:u=s.westMeshes,d=s.westTiles;break;case In.SOUTH:u=s.southMeshes,d=s.southTiles;break;case In.EAST:u=s.eastMeshes,d=s.eastTiles;break;case In.NORTH:u=s.northMeshes,d=s.northTiles;break;case In.NORTHWEST:return s.changedThisFrame=s.changedThisFrame||s.northwestMesh!==a,s.northwestMesh=a,void(s.northwestTile=n);case In.NORTHEAST:return s.changedThisFrame=s.changedThisFrame||s.northeastMesh!==a,s.northeastMesh=a,void(s.northeastTile=n);case In.SOUTHWEST:return s.changedThisFrame=s.changedThisFrame||s.southwestMesh!==a,s.southwestMesh=a,void(s.southwestTile=n);case In.SOUTHEAST:return s.changedThisFrame=s.changedThisFrame||s.southeastMesh!==a,s.southeastMesh=a,void(s.southeastTile=n)}if(n.level<=i.level)return s.changedThisFrame=s.changedThisFrame||u[0]!==a||1!==u.length,u[0]=a,d[0]=n,u.length=1,void(d.length=1);const y=n.rectangle;let A;const x=i.rectangle;switch(o){case In.WEST:for(A=(x.north-x.south)*O.EPSILON5,h=0;h<d.length&&(_=d[h],p=_.rectangle,!O.greaterThan(y.north,p.south,A));++h);for(m=h;m<d.length&&(_=d[m],p=_.rectangle,!O.greaterThanOrEquals(y.south,p.north,A));++m);break;case In.SOUTH:for(A=(x.east-x.west)*O.EPSILON5,h=0;h<d.length&&(_=d[h],p=_.rectangle,!O.lessThan(y.west,p.east,A));++h);for(m=h;m<d.length&&(_=d[m],p=_.rectangle,!O.lessThanOrEquals(y.east,p.west,A));++m);break;case In.EAST:for(A=(x.north-x.south)*O.EPSILON5,h=0;h<d.length&&(_=d[h],p=_.rectangle,!O.lessThan(y.south,p.north,A));++h);for(m=h;m<d.length&&(_=d[m],p=_.rectangle,!O.lessThanOrEquals(y.north,p.south,A));++m);break;case In.NORTH:for(A=(x.east-x.west)*O.EPSILON5,h=0;h<d.length&&(_=d[h],p=_.rectangle,!O.greaterThan(y.east,p.west,A));++h);for(m=h;m<d.length&&(_=d[m],p=_.rectangle,!O.greaterThanOrEquals(y.west,p.east,A));++m);}m-h==1?(s.changedThisFrame=s.changedThisFrame||u[h]!==a,u[h]=a,d[h]=n):(s.changedThisFrame=!0,u.splice(h,m-h,a),d.splice(h,m-h,n))}(e,t,n,i,o,a)}(e,t,n,u,r,o,a,l)}if(wi.originalResult(i._lastSelectionResult)!==wi.CULLED)switch(r){case In.WEST:ts(e,t,n,i.northwestChild,o,r,!0,a,l),ts(e,t,n,i.southwestChild,o,r,!0,a,l);break;case In.EAST:ts(e,t,n,i.southeastChild,o,r,!0,a,l),ts(e,t,n,i.northeastChild,o,r,!0,a,l);break;case In.SOUTH:ts(e,t,n,i.southwestChild,o,r,!0,a,l),ts(e,t,n,i.southeastChild,o,r,!0,a,l);break;case In.NORTH:ts(e,t,n,i.northeastChild,o,r,!0,a,l),ts(e,t,n,i.northwestChild,o,r,!0,a,l);break;case In.NORTHWEST:ts(e,t,n,i.northwestChild,o,r,!0,a,l);break;case In.NORTHEAST:ts(e,t,n,i.northeastChild,o,r,!0,a,l);break;case In.SOUTHWEST:ts(e,t,n,i.southwestChild,o,r,!0,a,l);break;case In.SOUTHEAST:ts(e,t,n,i.southeastChild,o,r,!0,a,l);break;default:throw new E("Invalid edge")}}}fb.updateFillTiles=function(e,t,n,i){const o=e._quadtree,r=o._levelZeroTiles,s=o._lastSelectionFrameNumber,a=sUe;a.clear();for(let u=0;u<t.length;++u)c(t[u].data.vertexArray)&&a.enqueue(t[u]);let l=a.dequeue();for(;void 0!==l;){const u=l.findTileToWest(r),d=l.findTileToSouth(r),h=l.findTileToEast(r),m=l.findTileToNorth(r);ts(e,n,l,u,s,In.EAST,!1,a,i),ts(e,n,l,d,s,In.NORTH,!1,a,i),ts(e,n,l,h,s,In.WEST,!1,a,i),ts(e,n,l,m,s,In.SOUTH,!1,a,i);const _=u.findTileToNorth(r),p=u.findTileToSouth(r),y=h.findTileToNorth(r),A=h.findTileToSouth(r);ts(e,n,l,_,s,In.SOUTHEAST,!1,a,i),ts(e,n,l,y,s,In.SOUTHWEST,!1,a,i),ts(e,n,l,p,s,In.NORTHEAST,!1,a,i),ts(e,n,l,A,s,In.NORTHWEST,!1,a,i),l=a.dequeue()}};const Ag=new Se,lUe=new Se,hb=new f,MF=new f,FF=new G,BF=new G,sl=new G;function ED(){this.height=0,this.encodedNormal=new G}function wD(e,t,n,i,o,r,s,a,l){if(c(o))return o;let u;if(c(r)&&c(s))u=.5*(r.height+s.height);else if(c(r))u=r.height;else if(c(s))u=s.height;else if(c(a))u=a.height;else{const h=e.tile.data.tileBoundingRegion;let m=0,_=0;c(h)&&(m=h.minimumHeight,_=h.maximumHeight),u=.5*(m+_)}return zX(0,t,0,0,u,l),l}const uUe={minimumHeight:0,maximumHeight:0},dUe=new f,MX=new ED,FX=new ED,BX=new ED,kX=new ED,fUe=typeof Uint8Array<"u"?new Uint8Array(81):void 0,hUe={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function UX(e,t,n,i){bg.initialize(n,e.terrainProvider,e._imageryLayers);const o=n.data,r=o.fill,s=n.rectangle,a=t.terrainExaggeration,l=t.terrainExaggerationRelativeHeight,u=1!==a,d=n.tilingScheme.ellipsoid;let h=DD(r,d,0,1,r.northwestTile,r.northwestMesh,r.northTiles,r.northMeshes,r.westTiles,r.westMeshes,BX),m=DD(r,d,0,0,r.southwestTile,r.southwestMesh,r.westTiles,r.westMeshes,r.southTiles,r.southMeshes,MX),_=DD(r,d,1,0,r.southeastTile,r.southeastMesh,r.southTiles,r.southMeshes,r.eastTiles,r.eastMeshes,FX),p=DD(r,d,1,1,r.northeastTile,r.northeastMesh,r.eastTiles,r.eastMeshes,r.northTiles,r.northMeshes,kX);h=wD(r,d,0,0,h,m,p,_,BX),m=wD(r,d,0,0,m,h,_,p,MX),_=wD(r,d,0,0,_,m,p,h,FX),p=wD(r,d,0,0,p,_,h,m,kX);const y=m.height,A=_.height,x=h.height,C=p.height;let w=Math.min(y,A,x,C),v=Math.max(y,A,x,C);const D=.5*(w+v);let P,N;const R=e.getLevelMaximumGeometricError(n.level);let F=4*Math.acos((d.maximumRadius-R)/d.maximumRadius);if(F*=1.5,s.width>F&&v-w<=R){const L=new jP({width:9,height:9,buffer:fUe,structure:{heightOffset:v}}),M=hUe;M.tilingScheme=n.tilingScheme,M.x=n.x,M.y=n.y,M.level=n.level,M.exaggeration=a,M.exaggerationRelativeHeight=l,r.mesh=L._createMeshSync(M)}else{const L=u,M=Ce.center(s,lUe);M.height=D;const U=d.cartographicToCartesian(M,dUe),z=new Iy(U,void 0,void 0,void 0,void 0,!0,!0,L,a,l);let W,j=5;for(W=r.westMeshes,P=0,N=W.length;P<N;++P)j+=W[P].eastIndicesNorthToSouth.length;for(W=r.southMeshes,P=0,N=W.length;P<N;++P)j+=W[P].northIndicesWestToEast.length;for(W=r.eastMeshes,P=0,N=W.length;P<N;++P)j+=W[P].westIndicesSouthToNorth.length;for(W=r.northMeshes,P=0,N=W.length;P<N;++P)j+=W[P].southIndicesEastToWest.length;const q=uUe;q.minimumHeight=w,q.maximumHeight=v;const V=z.stride;let $=new Float32Array(j*V),Z=0;const ie=Z;Z=SD(d,s,z,$,Z,0,1,h.height,h.encodedNormal,1,q),Z=PD(r,d,z,$,Z,r.westTiles,r.westMeshes,In.EAST,q);const Y=Z;Z=SD(d,s,z,$,Z,0,0,m.height,m.encodedNormal,0,q),Z=PD(r,d,z,$,Z,r.southTiles,r.southMeshes,In.NORTH,q);const Q=Z;Z=SD(d,s,z,$,Z,1,0,_.height,_.encodedNormal,0,q),Z=PD(r,d,z,$,Z,r.eastTiles,r.eastMeshes,In.WEST,q);const K=Z;Z=SD(d,s,z,$,Z,1,1,p.height,p.encodedNormal,1,q),Z=PD(r,d,z,$,Z,r.northTiles,r.northMeshes,In.SOUTH,q),w=q.minimumHeight,v=q.maximumHeight;const me=Eo.fromRectangle(s,w,v,n.tilingScheme.ellipsoid),we=or.geodeticLatitudeToMercatorAngle(s.south),le=1/(or.geodeticLatitudeToMercatorAngle(s.north)-we),Ae=(or.geodeticLatitudeToMercatorAngle(M.latitude)-we)*le,xe=d.geodeticSurfaceNormalCartographic(Ag,MF),De=Fi.octEncode(xe,FF),qe=Z;z.encode($,Z*V,me.center,G.fromElements(.5,.5,sl),D,De,Ae,xe),++Z;const $e=Z,kt=3*($e-1);let Lt;if(($.length-$e*V)*Float32Array.BYTES_PER_ELEMENT>=kt*($e<256?1:2)){const Te=$e*V*Float32Array.BYTES_PER_ELEMENT;Lt=$e<256?new Uint8Array($.buffer,Te,kt):new Uint16Array($.buffer,Te,kt)}else Lt=$e<256?new Uint8Array(kt):new Uint16Array(kt);$=new Float32Array($.buffer,0,$e*V);let On=0;for(P=0;P<$e-2;++P)Lt[On++]=qe,Lt[On++]=P,Lt[On++]=P+1;Lt[On++]=qe,Lt[On++]=P,Lt[On++]=0;const ii=[];for(P=Y;P>=ie;--P)ii.push(P);const an=[];for(P=Q;P>=Y;--P)an.push(P);const en=[];for(P=K;P>=Q;--P)en.push(P);const he=[];for(he.push(0),P=qe-1;P>=K;--P)he.push(P);r.mesh=new fw(z.center,$,Lt,kt,$e,w,v,be.fromOrientedBoundingBox(me),function AUe(e,t,n,i,o,r){const s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,l=bUe;return f.fromRadians(n.west,n.south,o,a,l[0]),f.fromRadians(n.east,n.south,o,a,l[1]),f.fromRadians(n.west,n.north,o,a,l[2]),f.fromRadians(n.east,n.north,o,a,l[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,i,r)}(e,me.center,s,w,v),z.stride,me,z,ii,an,en,he)}const S=t.context;r._destroyVertexArray(i),r.vertexArray=bg._createVertexArrayForMesh(S,r.mesh),o.processImagery(n,e.terrainProvider,t,!0);const I=r.waterMaskTexture;if(r.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){const L=o._findAncestorTileWithTerrainData(n);c(L)&&c(L.data.waterMaskTexture)&&(r.waterMaskTexture=L.data.waterMaskTexture,++r.waterMaskTexture.referenceCount,o._computeWaterMaskTranslationAndScale(n,L,r.waterMaskTranslationAndScale))}c(I)&&(--I.referenceCount,0===I.referenceCount&&I.destroy())}function SD(e,t,n,i,o,r,s,a,l,u,d){const h=Ag;h.longitude=O.lerp(t.west,t.east,r),h.latitude=O.lerp(t.south,t.north,s),h.height=a;const m=e.cartographicToCartesian(h,hb);let _;n.hasGeodeticSurfaceNormals&&(_=e.geodeticSurfaceNormal(m,MF));const p=BF;return p.x=r,p.y=s,n.encode(i,o*n.stride,m,p,a,l,u,_),d.minimumHeight=Math.min(d.minimumHeight,a),d.maximumHeight=Math.max(d.maximumHeight,a),o+1}const vD=new Ce;function nC(e,t,n,i){let o=e.rectangle;const r=t.rectangle;0===t.x&&1===n.x&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?(o=Ce.clone(e.rectangle,vD),o.west-=O.TWO_PI,o.east-=O.TWO_PI):0===e.x&&0===n.x&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&(o=Ce.clone(e.rectangle,vD),o.west+=O.TWO_PI,o.east+=O.TWO_PI);const s=o.east-o.west,a=(r.west-o.west)/s,u=o.north-o.south,d=(r.south-o.south)/u;let m=(n.x-a)/((r.east-o.west)/s-a),_=(n.y-d)/((r.north-o.south)/u-d);return Math.abs(m)<Math.EPSILON5?m=0:Math.abs(m-1)<Math.EPSILON5&&(m=1),Math.abs(_)<Math.EPSILON5?_=0:Math.abs(_-1)<Math.EPSILON5&&(_=1),i.x=m,i.y=_,i}const pUe=new G;function kF(e,t,n,i,o){const r=e.encoding,s=e.vertices;if(o.height=r.decodeHeight(s,t),r.hasVertexNormals)r.getOctEncodedNormal(s,t,o.encodedNormal);else{const a=o.encodedNormal;a.x=0,a.y=0}}const mUe=new G,_Ue=new f;function zX(e,t,n,i,o,r){r.height=o;const s=t.geodeticSurfaceNormalCartographic(Ag,hb);Fi.octEncode(s,r.encodedNormal)}function DD(e,t,n,i,o,r,s,a,l,u,d){if(HX(e,t,a,s,!1,n,i,d)||HX(e,t,u,l,!0,n,i,d))return d;let m,_;return UF(o,r)?(m=0===n?0===i?r.eastIndicesNorthToSouth[0]:r.southIndicesEastToWest[0]:0===i?r.northIndicesWestToEast[0]:r.westIndicesSouthToNorth[0],kF(r,m,0,0,d),d):(_=0===n?0===i?ID(e.westMeshes,e.westTiles,In.EAST,e.southMeshes,e.southTiles,In.NORTH,n,i):ID(e.northMeshes,e.northTiles,In.SOUTH,e.westMeshes,e.westTiles,In.EAST,n,i):0===i?ID(e.southMeshes,e.southTiles,In.NORTH,e.eastMeshes,e.eastTiles,In.WEST,n,i):ID(e.eastMeshes,e.eastTiles,In.WEST,e.northMeshes,e.northTiles,In.SOUTH,n,i),c(_)?(zX(0,t,0,0,_,d),d):void 0)}function ID(e,t,n,i,o,r,s,a){const l=VX(e,t,!1,n),u=VX(i,o,!0,r);return c(l)&&c(u)?.5*(l+u):c(l)?l:u}function PD(e,t,n,i,o,r,s,a,l){for(let u=0;u<r.length;++u)o=yUe(e,t,n,i,o,r[u],s[u],a,l);return o}function yUe(e,t,n,i,o,r,s,a,l){let u=r.rectangle;a===In.EAST&&0===e.tile.x?(u=Ce.clone(r.rectangle,vD),u.west-=O.TWO_PI,u.east-=O.TWO_PI):a===In.WEST&&0===r.x&&(u=Ce.clone(r.rectangle,vD),u.west+=O.TWO_PI,u.east+=O.TWO_PI);const d=e.tile.rectangle;let h,m,_,p;switch(o>0&&(n.decodeTextureCoordinates(i,o-1,sl),h=sl.x,m=sl.y),a){case In.WEST:_=s.westIndicesSouthToNorth,p=!1;break;case In.NORTH:_=s.northIndicesWestToEast,p=!0;break;case In.EAST:_=s.eastIndicesNorthToSouth,p=!1;break;case In.SOUTH:_=s.southIndicesEastToWest,p=!0}const y=r,A=e.tile,x=s.encoding,C=s.vertices,w=n.stride;let v,D;x.hasWebMercatorT&&(v=or.geodeticLatitudeToMercatorAngle(d.south),D=1/(or.geodeticLatitudeToMercatorAngle(d.north)-v));for(let P=0;P<_.length;++P){const N=_[P],R=x.decodeTextureCoordinates(C,N,sl);nC(y,A,R,R);const B=R.x,F=R.y,S=p?B:F;if(S<0||S>1||Math.abs(B-h)<O.EPSILON5&&Math.abs(F-m)<O.EPSILON5)continue;const I=Math.abs(B)<O.EPSILON5||Math.abs(B-1)<O.EPSILON5,L=Math.abs(F)<O.EPSILON5||Math.abs(F-1)<O.EPSILON5;if(I&&L)continue;const M=x.decodePosition(C,N,hb),U=x.decodeHeight(C,N);let z;x.hasVertexNormals?z=x.getOctEncodedNormal(C,N,FF):(z=FF,z.x=0,z.y=0);let W,j=F;if(x.hasWebMercatorT){const q=O.lerp(d.south,d.north,F);j=(or.geodeticLatitudeToMercatorAngle(q)-v)*D}n.hasGeodeticSurfaceNormals&&(W=t.geodeticSurfaceNormal(M,MF)),n.encode(i,o*w,M,R,U,z,j,W),l.minimumHeight=Math.min(l.minimumHeight,U),l.maximumHeight=Math.max(l.maximumHeight,U),++o}return o}function VX(e,t,n,i,o,r){let s,a,l;n?(s=0,a=e.length,l=1):(s=e.length-1,a=-1,l=-1);for(let u=s;u!==a;u+=l){const d=e[u];if(!UF(t[u],d))continue;let m;switch(i){case In.WEST:m=d.westIndicesSouthToNorth;break;case In.SOUTH:m=d.southIndicesEastToWest;break;case In.EAST:m=d.eastIndicesNorthToSouth;break;case In.NORTH:m=d.northIndicesWestToEast}const _=m[n?0:m.length-1];if(c(_))return d.encoding.decodeHeight(d.vertices,_)}}function UF(e,t){return c(t)&&(!c(e.data.fill)||!e.data.fill.changedThisFrame)}function HX(e,t,n,i,o,r,s,a){let l,u,d,h,m;const _=i[o?0:n.length-1],p=n[o?0:n.length-1];if(UF(_,p)&&(0===r?0===s?(l=o?p.northIndicesWestToEast:p.eastIndicesNorthToSouth,u=o,d=o):(l=o?p.eastIndicesNorthToSouth:p.southIndicesEastToWest,u=!o,d=!1):0===s?(l=o?p.westIndicesSouthToNorth:p.northIndicesWestToEast,u=!o,d=!0):(l=o?p.southIndicesEastToWest:p.westIndicesSouthToNorth,u=o,d=!o),l.length>0)){h=o?0:l.length-1,m=l[h],p.encoding.decodeTextureCoordinates(p.vertices,m,sl);const y=nC(_,e.tile,sl,sl);if(y.x===r&&y.y===s)return kF(p,m,0,0,a),!0;if(h=ke(l,u?r:s,function(A,x){p.encoding.decodeTextureCoordinates(p.vertices,A,sl);const C=nC(_,e.tile,sl,sl);return d?u?C.x-r:C.y-s:u?r-C.x:s-C.y}),!(h<0))return kF(p,l[h],0,0,a),!0;if(h=~h,h>0&&h<l.length)return function gUe(e,t,n,i,o,r,s,a,l,u){const d=i.encoding,h=i.vertices,m=nC(t,n,d.decodeTextureCoordinates(h,o,sl),sl),_=nC(t,n,d.decodeTextureCoordinates(h,r,BF),BF);let p;p=l?(s-m.x)/(_.x-m.x):(a-m.y)/(_.y-m.y);const y=d.decodeHeight(h,o),A=d.decodeHeight(h,r),x=n.rectangle;let C;if(Ag.longitude=O.lerp(x.west,x.east,s),Ag.latitude=O.lerp(x.south,x.north,a),u.height=Ag.height=O.lerp(y,A,p),d.hasVertexNormals){const w=d.getOctEncodedNormal(h,o,pUe),v=d.getOctEncodedNormal(h,r,mUe),D=Fi.octDecode(w.x,w.y,hb),P=Fi.octDecode(v.x,v.y,_Ue);C=f.lerp(D,P,p,hb),f.normalize(C,C),Fi.octEncode(C,u.encodedNormal)}else C=e.geodeticSurfaceNormalCartographic(Ag,hb),Fi.octEncode(C,u.encodedNormal)}(t,_,e.tile,p,l[h-1],l[h],r,s,u,a),!0}return!1}const bUe=[new f,new f,new f,new f],GX=fb;function Ho(e){if(!c(e))throw new E("options is required.");if(!c(e.terrainProvider))throw new E("options.terrainProvider is required.");if(!c(e.imageryLayers))throw new E("options.imageryLayers is required.");if(!c(e.surfaceShaderSet))throw new E("options.surfaceShaderSet is required.");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=$o.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 Ue,this._removeLayerAddedListener=this._imageryLayers.layerAdded.addEventListener(Ho.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener(Ho.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener(Ho.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener(Ho.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new Ue,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 X(0,0,.5,1),this._clippingPlanes=void 0,this.cartographicLimitRectangle=Ce.clone(Ce.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldTerrainExaggeration=void 0,this._oldTerrainExaggerationRelativeHeight=void 0}function TUe(e,t){let n=e.loadingImagery;c(n)||(n=e.readyImagery);let i=t.loadingImagery;return c(i)||(i=t.readyImagery),n.imageryLayer._layerIndex-i.imageryLayer._layerIndex}function jX(e,t){const n=t.globeTranslucencyState;n.translucent?n.pushDerivedCommands(e,e.renderState.blending.enabled,t):t.commandList.push(e)}Object.defineProperties(Ho.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){if(!c(e))throw new E("value is required.");this._baseColor=e,this._firstPassInitialColor=fe.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){if(!c(e))throw new E("value is required.");this._quadtree=e}},tilingScheme:{get:function(){if(c(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,c(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){Bd.setOwner(e,this,"_clippingPlanes")}}}),Ho.prototype.update=function(e){this._imageryLayers._update()},Ho.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(i){i.data.imagery.sort(TUe)})),function xUe(e,t){const n=t.creditDisplay,i=e._terrainProvider;c(i)&&c(i.credit)&&n.addCreditToNextFrame(i.credit);const o=e._imageryLayers;for(let r=0,s=o.length;r<s;++r){const a=o.get(r);a.ready&&a.show&&c(a.imageryProvider.credit)&&n.addCreditToNextFrame(a.imageryProvider.credit)}}(this,e);const t=this._vertexArraysToDestroy,n=t.length;for(let i=0;i<n;++i)bg._freeVertexArray(t[i]);t.length=0},Ho.prototype.beginUpdate=function(e){const t=this._tilesToRenderByTextureCount;for(let i=0,o=t.length;i<o;++i){const r=t[i];c(r)&&(r.length=0)}const n=this._clippingPlanes;c(n)&&n.enabled&&n.update(e),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1},Ho.prototype.endUpdate=function(e){if(!c(this._renderState)){this._renderState=Pt.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:__.LESS}}),this._blendRenderState=Pt.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:__.LESS_OR_EQUAL},blending:Ji.ALPHA_BLEND});let s=zt(this._renderState,!0);s.cull.enabled=!1,this._disableCullingRenderState=Pt.fromCache(s),s=zt(this._blendRenderState,!0),s.cull.enabled=!1,this._disableCullingBlendRenderState=Pt.fromCache(s)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&GX.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);const t=this.quadtree,n=e.terrainExaggeration,i=e.terrainExaggerationRelativeHeight,o=this._oldTerrainExaggeration!==n||this._oldTerrainExaggerationRelativeHeight!==i;this._oldTerrainExaggeration=n,this._oldTerrainExaggerationRelativeHeight=i,o&&t.forEachLoadedTile(function(s){s.data.updateExaggeration(s,e,t)});const r=this._tilesToRenderByTextureCount;for(let s=0,a=r.length;s<a;++s){const l=r[s];if(c(l))for(let u=0,d=l.length;u<d;++u){const h=l[u],m=h.data.tileBoundingRegion;qUe(this,h,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,m.minimumHeight)}}},Ho.prototype.updateForPick=function(e){const t=this._drawCommands;for(let n=0,i=this._usedDrawCommands;n<i;++n)jX(t[n],e)},Ho.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},Ho.prototype.getLevelMaximumGeometricError=function(e){return c(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(e):0},Ho.prototype.loadTile=function(e,t){let o,n=t.data,i=!0;c(n)&&(i=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===wi.CULLED_BUT_NEEDED,o=n.terrainState),bg.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)!==ys.NONE&&n.boundingVolumeSourceTile===t&&(i=!1,bg.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i))};const CUe=new be,WX=new Ce,EUe=new Ce,wUe=new Se;function OD(e,t){if(t.west<t.east)return t;const n=Ce.clone(t,EUe);return Ce.center(e,wUe).longitude>0?n.east=O.PI:n.west=-O.PI,n}function qX(e,t){if(t.cameraUnderground||t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;const n=e._clippingPlanes;return!!(c(n)&&n.enabled||!Ce.equals(e.cartographicLimitRectangle,Ce.MAX_VALUE))}Ho.prototype.computeTileVisibility=function(e,t,n){const i=this.computeDistanceToTile(e,t);e._distance=i;const o=qX(this,t);if(t.fog.enabled&&!o&&O.fog(i,t.fog.density)>=1)return ys.NONE;const r=e.data,s=r.tileBoundingRegion;if(void 0===r.boundingVolumeSourceTile)return ys.PARTIAL;const a=t.cullingVolume;let l=s.boundingVolume;c(l)||(l=s.boundingSphere),r.clippedByBoundaries=!1;const u=OD(e.rectangle,this.cartographicLimitRectangle),d=Ce.simpleIntersection(u,e.rectangle,WX);if(!c(d))return ys.NONE;if(Ce.equals(d,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==ce.SCENE3D&&(l=CUe,be.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,s.minimumHeight,s.maximumHeight,l),f.fromElements(l.center.z,l.center.x,l.center.y,l.center),t.mode===ce.MORPHING&&c(r.renderedMesh)&&(l=be.union(s.boundingSphere,l,l))),!c(l))return ys.PARTIAL;const h=this._clippingPlanes;if(c(h)&&h.enabled){const y=h.computeIntersectionWithBoundingVolume(l);if(e.isClipped=y!==Qn.INSIDE,y===Qn.OUTSIDE)return ys.NONE}let m;const _=a.computeVisibility(l);if(_===Qn.OUTSIDE?m=ys.NONE:_===Qn.INTERSECTING?m=ys.PARTIAL:_===Qn.INSIDE&&(m=ys.FULL),m===ys.NONE)return m;if(t.mode===ce.SCENE3D&&!(t.mode===ce.SCENE3D&&t.camera.frustum instanceof $n)&&c(n)&&!o){const y=r.occludeePointInScaledSpace;return!c(y)||n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(y,s.minimumHeight)?m:ys.NONE}return m},Ho.prototype.canRefine=function(e){return!!c(e.data.terrainData)||void 0!==this.terrainProvider.getTileDataAvailable(2*e.x,2*e.y,e.level+1)};const SUe=[],vUe=[];Ho.prototype.canRenderWithoutLosingDetail=function(e,t){const n=e.data,i=SUe;i.length=this._imageryLayers.length;let s,a,l,o=!1,r=!1;for(c(n)&&(o=n.terrainState===Io.READY,r=!0,s=n.imagery),a=0,l=i.length;a<l;++a)i[a]=r;if(c(s))for(a=0,l=s.length;a<l;++a){const h=s[a],m=h.loadingImagery,_=!c(m)||m.state===ji.FAILED||m.state===ji.INVALID,p=(h.loadingImagery||h.readyImagery).imageryLayer._layerIndex;i[p]=_&&i[p]}const u=this.quadtree._lastSelectionFrameNumber,d=vUe;for(d.length=0,d.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);d.length>0;){const h=d.pop(),m=h._lastSelectionResultFrame===u?h._lastSelectionResult:wi.NONE;if(m===wi.RENDERED){if(!c(h.data))continue;if(!o&&h.data.terrainState===Io.READY)return!1;const p=h.data.imagery;for(a=0,l=p.length;a<l;++a){const y=p[a],A=y.loadingImagery;if(!(c(A)&&A.state!==ji.FAILED&&A.state!==ji.INVALID||i[(y.loadingImagery||y.readyImagery).imageryLayer._layerIndex]))return!1}}else m===wi.REFINED&&d.push(h.southwestChild,h.southeastChild,h.northwestChild,h.northeastChild)}return!0};const DUe=new f;Ho.prototype.computeTileLoadPriority=function(e,t){const n=e.data;if(void 0===n)return 0;const i=n.tileBoundingRegion.boundingVolume;if(void 0===i)return 0;const r=t.camera.directionWC,s=f.subtract(i.center,t.camera.positionWC,DUe),a=f.magnitude(s);return a<O.EPSILON5?0:(f.divideByScalar(s,a,s),(1-f.dot(s,r))*e._distance)};const YX=new k,LD=new k,IUe=new fe,PUe=new fe,OUe=new fe,LUe=new f,XX=new f,RUe=new f,NUe=new f;Ho.prototype.showTileThisFrame=function(e,t){let n=0;const i=e.data.imagery;for(let a=0,l=i.length;a<l;++a){const u=i[a];c(u.readyImagery)&&0!==u.readyImagery.imageryLayer.alpha&&++n}let o=this._tilesToRenderByTextureCount[n];c(o)||(o=[],this._tilesToRenderByTextureCount[n]=o),o.push(e),c(e.data.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;const s=this._debug;++s.tilesRendered,s.texturesRendered+=n};const MUe=[new f,new f,new f,new f];function ZX(e,t,n,i,o,r){const s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,l=MUe;return f.fromRadians(n.west,n.south,o,a,l[0]),f.fromRadians(n.east,n.south,o,a,l[1]),f.fromRadians(n.west,n.north,o,a,l[2]),f.fromRadians(n.east,n.north,o,a,l[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,i,r)}Ho.prototype.computeDistanceToTile=function(e,t){!function FUe(e,t,n){let i=e.data;void 0===i&&(i=e.data=new bg);const o=e.tilingScheme.ellipsoid;void 0===i.tileBoundingRegion&&(i.tileBoundingRegion=new QT({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:o,minimumHeight:0,maximumHeight:0}));const r=i.tileBoundingRegion,s=r.minimumHeight,a=r.maximumHeight;let l=!1,u=e;const d=i.mesh,h=i.terrainData;if(void 0!==d&&void 0!==d.minimumHeight&&void 0!==d.maximumHeight)r.minimumHeight=d.minimumHeight,r.maximumHeight=d.maximumHeight,l=!0;else if(void 0!==h&&void 0!==h._minimumHeight&&void 0!==h._maximumHeight)r.minimumHeight=h._minimumHeight,r.maximumHeight=h._maximumHeight;else{r.minimumHeight=Number.NaN,r.maximumHeight=Number.NaN;let m=e.parent;for(;void 0!==m;){const _=m.data;if(void 0!==_){const p=_.mesh,y=_.terrainData;if(void 0!==p&&void 0!==p.minimumHeight&&void 0!==p.maximumHeight){r.minimumHeight=p.minimumHeight,r.maximumHeight=p.maximumHeight;break}if(void 0!==y&&void 0!==y._minimumHeight&&void 0!==y._maximumHeight){r.minimumHeight=y._minimumHeight,r.maximumHeight=y._maximumHeight;break}}m=m.parent}u=m}if(void 0!==u){const m=n.terrainExaggeration,_=n.terrainExaggerationRelativeHeight;1!==m&&(l=!1,r.minimumHeight=hp.getHeight(r.minimumHeight,m,_),r.maximumHeight=hp.getHeight(r.maximumHeight,m,_)),l?i.boundingVolumeIsFromMesh||(r._orientedBoundingBox=Eo.clone(d.orientedBoundingBox,r._orientedBoundingBox),r._boundingSphere=be.clone(d.boundingSphere3D,r._boundingSphere),i.occludeePointInScaledSpace=f.clone(d.occludeePointInScaledSpace,i.occludeePointInScaledSpace),c(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=ZX(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace))):(r.minimumHeight!==s||r.maximumHeight!==a||void 0===r._orientedBoundingBox||void 0===r._boundingSphere)&&(r.computeBoundingVolumes(o),i.occludeePointInScaledSpace=ZX(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace)),i.boundingVolumeSourceTile=u,i.boundingVolumeIsFromMesh=l}else i.boundingVolumeSourceTile=void 0,i.boundingVolumeIsFromMesh=!1}(e,this,t);const n=e.data;if(void 0===n.boundingVolumeSourceTile)return 9999999999;const o=n.tileBoundingRegion,r=o.minimumHeight,s=o.maximumHeight;if(n.boundingVolumeSourceTile!==e){const l=t.camera.positionCartographic.height;Math.abs(l-r)>Math.abs(l-s)?(o.minimumHeight=r,o.maximumHeight=r):(o.minimumHeight=s,o.maximumHeight=s)}const a=o.distanceToCamera(t);return o.minimumHeight=r,o.maximumHeight=s,a},Ho.prototype.isDestroyed=function(){return!1},Ho.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.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(),Ye(this)},Ho.prototype._onLayerAdded=function(e,t){if(!this.isDestroyed()&&e.show){const n=this._terrainProvider,i=this,o=this._imageryLayersUpdatedEvent,r=function(){e._imageryCache={},i._quadtree.forEachLoadedTile(function(s){if(c(s._loadedCallbacks[e._layerIndex]))return;let a;const l=s.data.imagery,u=l.length;let d=-1,h=0;for(a=0;a<u;++a){const _=l[a];if(g(_.readyImagery,_.loadingImagery).imageryLayer===e)-1===d&&(d=a),++h;else if(-1!==d)break}-1!==d&&e._createTileImagerySkeletons(s,n,d+h)&&(s._loadedCallbacks[e._layerIndex]=function BUe(e,t,n){return function(i){let o,r,s=-1;const a=i.data.imagery,l=a.length;let u;for(u=0;u<l;++u)if(o=a[u],r=g(o.readyImagery,o.loadingImagery),r.imageryLayer===t){s=u;break}if(-1!==s){const d=s+e;if(o=a[d],r=c(o)?g(o.readyImagery,o.loadingImagery):void 0,!c(r)||r.imageryLayer!==t)return!t._createTileImagerySkeletons(i,n,d);for(u=s;u<d;++u)a[u].freeResources();a.splice(s,e)}return!0}}(h,e,n),s.state=Zl.LOADING)})};e.ready&&(e.imageryProvider._reload=r),this._quadtree.forEachLoadedTile(function(s){e._createTileImagerySkeletons(s,n)&&(s.state=Zl.LOADING,0!==s.level&&(s._lastSelectionResultFrame!==i.quadtree._lastSelectionFrameNumber||s._lastSelectionResult!==wi.RENDERED)&&(s.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}},Ho.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile(function(n){const i=n.data.imagery;let o=-1,r=0;for(let s=0,a=i.length;s<a;++s){const l=i[s];let u=l.loadingImagery;if(c(u)||(u=l.readyImagery),u.imageryLayer===e)-1===o&&(o=s),l.freeResources(),++r;else if(-1!==o)break}-1!==o&&i.splice(o,r)}),c(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()},Ho.prototype._onLayerMoved=function(e,t,n){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()},Ho.prototype._onLayerShownOrHidden=function(e,t,n){n?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};const kUe=new k,UUe=new k;function $X(e,t){const 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_terrainExaggerationAndRelativeHeight:function(){return this.properties.terrainExaggerationAndRelativeHeight},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){const i=e.context.uniformState.view,o=k.multiplyByPoint(i,this.properties.rtc,XX);return k.setTranslation(i,o,YX),YX},u_modifiedModelViewProjection:function(){const i=e.context.uniformState.view,o=e.context.uniformState.projection,r=k.multiplyByPoint(i,this.properties.rtc,XX);return k.setTranslation(i,r,LD),k.multiply(o,LD,LD),LD},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(){const i=t._clippingPlanes;return c(i)&&c(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){const i=t._clippingPlanes,o=c(i)?k.multiply(e.context.uniformState.view,i.modelMatrix,kUe):k.IDENTITY;return k.inverseTranspose(o,UUe)},u_clippingPlanesEdgeStyle:function(){const i=this.properties.clippingPlanesEdgeColor;return i.alpha=this.properties.clippingPlanesEdgeWidth,i},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 fe(0,0,.5,1),fillHighlightColor:new X(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new G(65e5,9e6),nightFadeDistance:new G(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new f(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new f(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new f,center3D:void 0,rtc:new f,modifiedModelView:new k,tileRectangle:new fe,terrainExaggerationAndRelativeHeight:new G(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new G,southMercatorYAndOneOverHeight:new G,waterMask:void 0,waterMaskTranslationAndScale:new fe,minMaxHeight:new G,scaleAndBias:new k,clippingPlanesEdgeColor:X.clone(X.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new fe,frontFaceAlphaByDistance:new fe,backFaceAlphaByDistance:new fe,localizedTranslucencyRectangle:new fe,undergroundColor:X.clone(X.TRANSPARENT),undergroundColorAlphaByDistance:new fe,lambertDiffuseMultiplier:0,vertexShadowDarkness:0}};return c(t.materialUniformMap)?Gn(n,t.materialUniformMap):n}function zUe(e,t,n){const i=n.data;let o,r;if(c(i.vertexArray)?(o=i.mesh,r=i.vertexArray):c(i.fill)&&c(i.fill.vertexArray)&&(o=i.fill.mesh,r=i.fill.vertexArray),c(o)&&c(r)){if(c(i.wireframeVertexArray)){if(i.wireframeVertexArray.mesh===o)return;i.wireframeVertexArray.destroy(),i.wireframeVertexArray=void 0}i.wireframeVertexArray=function VUe(e,t,n){const o={indices:n.indices,primitiveType:At.TRIANGLES};uo.toWireframe(o);const r=o.indices,s=yn.createIndexBuffer({context:e,typedArray:r,usage:Tt.STATIC_DRAW,indexDatatype:Ot.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new ds({context:e,attributes:t._attributes,indexBuffer:s})}(e,r,o),i.wireframeVertexArray.mesh=o}}let KX,QX,RD;!function(){const e=new Un({geometry:cv.fromDimensions({dimensions:new f(2,2,2)})}),t=new Un({geometry:new wN({radius:1})});let i,o,n=new k;function r(s){return new Xi({geometryInstances:s,appearance:new yi({translucent:!1,flat:!0}),asynchronous:!1})}KX=function(s,a){return s===i||(RD(),i=s,n=k.fromRotationTranslation(s.halfAxes,s.center,n),e.modelMatrix=n,e.attributes.color=ti.fromColor(a),o=r(e)),o},QX=function(s,a){return s===i||(RD(),i=s,n=k.fromTranslation(s.center,n),n=k.multiplyByUniformScale(n,s.radius,n),t.modelMatrix=n,t.attributes.color=ti.fromColor(a),o=r(t)),o},RD=function(){c(o)&&(o.destroy(),o=void 0,i=void 0)}}();const HUe=new fe(0,0,0,0),GUe={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,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0,hasGeodeticSurfaceNormals:void 0,hasExaggeration:void 0},jUe=X.TRANSPARENT,WUe=new Mn;function qUe(e,t,n){const i=t.data;c(i.vertexArray)||(void 0===i.fill&&(i.fill=new GX(t)),i.fill.update(e,n));const o=n.creditDisplay,r=i.terrainData;if(c(r)&&c(r.credits)){const he=r.credits;for(let Te=0,dn=he.length;Te<dn;++Te)o.addCreditToNextFrame(he[Te])}let s=mn.maximumTextureImageUnits,a=i.waterMaskTexture,l=i.waterMaskTranslationAndScale;!c(a)&&c(i.fill)&&(a=i.fill.waterMaskTexture,l=i.fill.waterMaskTranslationAndScale);const u=n.cameraUnderground,d=n.globeTranslucencyState,h=d.translucent,m=d.frontFaceAlphaByDistance,_=d.backFaceAlphaByDistance,p=d.rectangle,y=g(e.undergroundColor,jUe),A=g(e.undergroundColorAlphaByDistance,WUe),x=qX(e,n)&&n.mode===ce.SCENE3D&&y.alpha>0&&(A.nearValue>0||A.farValue>0),C=e.lambertDiffuseMultiplier,w=e.vertexShadowDarkness,v=e.hasWaterMask&&c(a),D=e.oceanNormalMap,P=v&&c(D),R=c(e.terrainProvider)&&e.terrainProvider.hasVertexNormals,B=n.fog.enabled&&n.fog.renderable&&!u,F=e.showGroundAtmosphere&&n.mode===ce.SCENE3D,S=$o.castShadows(e.shadows)&&!h,I=$o.receiveShadows(e.shadows)&&!h,L=e.hueShift,M=e.saturationShift,U=e.brightnessShift;let z=!(O.equalsEpsilon(L,0,O.EPSILON7)&&O.equalsEpsilon(M,0,O.EPSILON7)&&O.equalsEpsilon(U,0,O.EPSILON7)),j=!1;F&&(j=f.magnitude(n.camera.positionWC)>e.nightFadeOutDistance),v&&--s,P&&--s,c(n.shadowState)&&n.shadowState.shadowsEnabled&&--s,c(e.clippingPlanes)&&e.clippingPlanes.enabled&&--s,s-=d.numberOfTextureUniforms;const W=i.renderedMesh;let q=W.center;const V=W.encoding,$=i.tileBoundingRegion,Z=n.terrainExaggeration,ie=n.terrainExaggerationRelativeHeight,Y=1!==Z,Q=V.hasGeodeticSurfaceNormals,K=IUe;let me=0,we=0,le=0,Ae=0,xe=!1;if(n.mode!==ce.SCENE3D){const he=n.mapProjection,Te=he.project(Ce.southwest(t.rectangle),RUe),dn=he.project(Ce.northeast(t.rectangle),NUe);if(K.x=Te.x,K.y=Te.y,K.z=dn.x,K.w=dn.y,n.mode!==ce.MORPHING&&(q=LUe,q.x=0,q.y=.5*(K.z+K.x),q.z=.5*(K.w+K.y),K.x-=q.y,K.y-=q.z,K.z-=q.y,K.w-=q.z),n.mode===ce.SCENE2D&&V.quantization===Vc.BITS12){const Dt=1/(Math.pow(2,12)-1)*.5,Wi=(K.z-K.x)*Dt,Co=(K.w-K.y)*Dt;K.x-=Wi,K.y-=Co,K.z+=Wi,K.w+=Co}he instanceof or&&(me=t.rectangle.south,we=t.rectangle.north,le=or.geodeticLatitudeToMercatorAngle(me),Ae=1/(or.geodeticLatitudeToMercatorAngle(we)-le),xe=!0)}const De=GUe;De.frameState=n,De.surfaceTile=i,De.showReflectiveOcean=v,De.showOceanWaves=P,De.enableLighting=e.enableLighting,De.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,De.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,De.showGroundAtmosphere=F,De.atmosphereLightIntensity=e.atmosphereLightIntensity,De.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,De.atmosphereMieCoefficient=e.atmosphereMieCoefficient,De.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,De.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,De.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,De.perFragmentGroundAtmosphere=j,De.hasVertexNormals=R,De.useWebMercatorProjection=xe,De.clippedByBoundaries=i.clippedByBoundaries,De.hasGeodeticSurfaceNormals=Q,De.hasExaggeration=Y;const qe=i.imagery;let $e=0;const ot=qe.length,kt=e.showSkirts&&!u&&!h,sn=e.backFaceCulling&&!u&&!h,Lt=sn?e._blendRenderState:e._disableCullingBlendRenderState;let On=sn?e._renderState:e._disableCullingRenderState,ii=e._firstPassInitialColor;const an=n.context;if(c(e._debug.boundingSphereTile)||RD(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;const he=e._drawCommands.length;for(let Te=0;Te<he;++Te)e._uniformMaps[Te]=$X(n,e)}do{let Te,dn,he=0;if(e._drawCommands.length<=e._usedDrawCommands?(Te=new Zt,Te.owner=t,Te.cull=!1,Te.boundingVolume=new be,Te.orientedBoundingBox=void 0,dn=$X(n,e),e._drawCommands.push(Te),e._uniformMaps.push(dn)):(Te=e._drawCommands[e._usedDrawCommands],dn=e._uniformMaps[e._usedDrawCommands]),Te.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){const aa=$.boundingVolume,za=$.boundingSphere;c(aa)?KX(aa,X.RED).update(n):c(za)&&QX(za,X.RED).update(n)}const Dt=dn.properties;fe.clone(ii,Dt.initialColor),Dt.oceanNormalMap=D,Dt.lightingFadeDistance.x=e.lightingFadeOutDistance,Dt.lightingFadeDistance.y=e.lightingFadeInDistance,Dt.nightFadeDistance.x=e.nightFadeOutDistance,Dt.nightFadeDistance.y=e.nightFadeInDistance,Dt.atmosphereLightIntensity=e.atmosphereLightIntensity,Dt.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,Dt.atmosphereMieCoefficient=e.atmosphereMieCoefficient,Dt.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,Dt.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,Dt.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,Dt.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;const Wi=u?_:m,Co=u?m:_;c(Wi)&&(fe.fromElements(Wi.near,Wi.nearValue,Wi.far,Wi.farValue,Dt.frontFaceAlphaByDistance),fe.fromElements(Co.near,Co.nearValue,Co.far,Co.farValue,Dt.backFaceAlphaByDistance)),fe.fromElements(A.near,A.nearValue,A.far,A.farValue,Dt.undergroundColorAlphaByDistance),X.clone(y,Dt.undergroundColor),Dt.lambertDiffuseMultiplier=C,Dt.vertexShadowDarkness=w;const bl=!c(i.vertexArray)&&c(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;bl&&X.clone(e.fillHighlightColor,Dt.fillHighlightColor),Dt.terrainExaggerationAndRelativeHeight.x=Z,Dt.terrainExaggerationAndRelativeHeight.y=ie,Dt.center3D=W.center,f.clone(q,Dt.rtc),fe.clone(K,Dt.tileRectangle),Dt.southAndNorthLatitude.x=me,Dt.southAndNorthLatitude.y=we,Dt.southMercatorYAndOneOverHeight.x=le,Dt.southMercatorYAndOneOverHeight.y=Ae;const ra=PUe,sa=OD(t.rectangle,e.cartographicLimitRectangle),Ba=OUe,Qe=OD(t.rectangle,p);f.fromElements(L,M,U,Dt.hsbShift);const dt=t.rectangle,ut=1/dt.width,rt=1/dt.height;ra.x=(sa.west-dt.west)*ut,ra.y=(sa.south-dt.south)*rt,ra.z=(sa.east-dt.west)*ut,ra.w=(sa.north-dt.south)*rt,fe.clone(ra,Dt.localizedCartographicLimitRectangle),Ba.x=(Qe.west-dt.west)*ut,Ba.y=(Qe.south-dt.south)*rt,Ba.z=(Qe.east-dt.west)*ut,Ba.w=(Qe.north-dt.south)*rt,fe.clone(Ba,Dt.localizedTranslucencyRectangle);const Ut=B&&O.fog(t._distance,n.fog.density)>O.EPSILON3;z=z&&(Ut||F);let nn=!1,Ln=!1,yo=!1,jo=!1,ka=!1,Ua=!1,mr=!1,Qi=!1,zs=!1,oi=!1;for(;he<s&&$e<ot;){const aa=qe[$e],za=aa.readyImagery;if(++$e,!c(za)||0===za.imageryLayer.alpha)continue;const uy=aa.useWebMercatorT?za.textureWebMercator:za.texture;if(!c(uy))throw new E("readyImagery is not actually ready!");const qr=za.imageryLayer;c(aa.textureTranslationAndScale)||(aa.textureTranslationAndScale=qr._calculateTextureTranslationAndScale(t,aa)),Dt.dayTextures[he]=uy,Dt.dayTextureTranslationAndScale[he]=aa.textureTranslationAndScale,Dt.dayTextureTexCoordsRectangle[he]=aa.textureCoordinateRectangle,Dt.dayTextureUseWebMercatorT[he]=aa.useWebMercatorT,Dt.dayTextureAlpha[he]=qr.alpha,Ua=Ua||1!==Dt.dayTextureAlpha[he],Dt.dayTextureNightAlpha[he]=qr.nightAlpha,mr=mr||1!==Dt.dayTextureNightAlpha[he],Dt.dayTextureDayAlpha[he]=qr.dayAlpha,mr=mr||1!==Dt.dayTextureDayAlpha[he],Dt.dayTextureBrightness[he]=qr.brightness,nn=nn||Dt.dayTextureBrightness[he]!==xc.DEFAULT_BRIGHTNESS,Dt.dayTextureContrast[he]=qr.contrast,Ln=Ln||Dt.dayTextureContrast[he]!==xc.DEFAULT_CONTRAST,Dt.dayTextureHue[he]=qr.hue,yo=yo||Dt.dayTextureHue[he]!==xc.DEFAULT_HUE,Dt.dayTextureSaturation[he]=qr.saturation,jo=jo||Dt.dayTextureSaturation[he]!==xc.DEFAULT_SATURATION,Dt.dayTextureOneOverGamma[he]=1/qr.gamma,ka=ka||Dt.dayTextureOneOverGamma[he]!==1/xc.DEFAULT_GAMMA,Dt.dayTextureSplit[he]=qr.splitDirection,Qi=Qi||0!==Dt.dayTextureSplit[he];let Wm=Dt.dayTextureCutoutRectangles[he];if(c(Wm)||(Wm=Dt.dayTextureCutoutRectangles[he]=new fe),fe.clone(fe.ZERO,Wm),c(qr.cutoutRectangle)){const Bc=OD(dt,qr.cutoutRectangle),dy=Ce.simpleIntersection(Bc,dt,WX);zs=c(dy)||zs,Wm.x=(Bc.west-dt.west)*ut,Wm.y=(Bc.south-dt.south)*rt,Wm.z=(Bc.east-dt.west)*ut,Wm.w=(Bc.north-dt.south)*rt}let gd=Dt.colorsToAlpha[he];c(gd)||(gd=Dt.colorsToAlpha[he]=new fe);const L1=c(qr.colorToAlpha)&&qr.colorToAlphaThreshold>0;if(oi=oi||L1,L1){const Bc=qr.colorToAlpha;gd.x=Bc.red,gd.y=Bc.green,gd.z=Bc.blue,gd.w=qr.colorToAlphaThreshold}else gd.w=-1;if(c(za.credits)){const Bc=za.credits;for(let dy=0,qm=Bc.length;dy<qm;++dy)o.addCreditToNextFrame(Bc[dy])}++he}Dt.dayTextures.length=he,Dt.waterMask=a,fe.clone(l,Dt.waterMaskTranslationAndScale),Dt.minMaxHeight.x=V.minimumHeight,Dt.minMaxHeight.y=V.maximumHeight,k.clone(V.matrix,Dt.scaleAndBias);const Kn=e._clippingPlanes,si=c(Kn)&&Kn.enabled&&t.isClipped;si&&(Dt.clippingPlanesEdgeColor=X.clone(Kn.edgeColor,Dt.clippingPlanesEdgeColor),Dt.clippingPlanesEdgeWidth=Kn.edgeWidth),De.numberOfDayTextures=he,De.applyBrightness=nn,De.applyContrast=Ln,De.applyHue=yo,De.applySaturation=jo,De.applyGamma=ka,De.applyAlpha=Ua,De.applyDayNightAlpha=mr,De.applySplit=Qi,De.enableFog=Ut,De.enableClippingPlanes=si,De.clippingPlanes=Kn,De.hasImageryLayerCutout=zs,De.colorCorrect=z,De.highlightFillTile=bl,De.colorToAlpha=oi,De.showUndergroundColor=x,De.translucent=h;let Ui=i.renderedMesh.indices.length;kt||(Ui=i.renderedMesh.indexCountWithoutSkirts),Te.shaderProgram=e._surfaceShaderSet.getShaderProgram(De),Te.castShadows=S,Te.receiveShadows=I,Te.renderState=On,Te.primitiveType=At.TRIANGLES,Te.vertexArray=i.vertexArray||i.fill.vertexArray,Te.count=Ui,Te.uniformMap=dn,Te.pass=ze.GLOBE,e._debug.wireframe&&(zUe(an,0,t),c(i.wireframeVertexArray)&&(Te.vertexArray=i.wireframeVertexArray,Te.primitiveType=At.LINES,Te.count=2*Ui));let Wr=Te.boundingVolume;const uc=Te.orientedBoundingBox;n.mode!==ce.SCENE3D?(be.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,$.minimumHeight,$.maximumHeight,Wr),f.fromElements(Wr.center.z,Wr.center.x,Wr.center.y,Wr.center),n.mode===ce.MORPHING&&(Wr=be.union($.boundingSphere,Wr,Wr))):(Te.boundingVolume=be.clone($.boundingSphere,Wr),Te.orientedBoundingBox=Eo.clone($.boundingVolume,uc)),Te.dirty=!0,h&&d.updateDerivedCommands(Te,n),jX(Te,n),On=Lt,ii=HUe}while($e<ot)}const YUe=Ho;function JX(){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(JX.prototype,{enabled:{get:function(){return this._enabled},set:function(e){T.typeOf.bool("enabled",e),this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){T.typeOf.number.greaterThanOrEquals("frontFaceAlpha",e,0),T.typeOf.number.lessThanOrEquals("frontFaceAlpha",e,1),this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){if(c(e)&&e.far<e.near)throw new E("far distance must be greater than near distance.");this._frontFaceAlphaByDistance=Mn.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){T.typeOf.number.greaterThanOrEquals("backFaceAlpha",e,0),T.typeOf.number.lessThanOrEquals("backFaceAlpha",e,1),this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){if(c(e)&&e.far<e.near)throw new E("far distance must be greater than near distance.");this._backFaceAlphaByDistance=Mn.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){c(e)||(e=Ce.clone(Ce.MAX_VALUE)),Ce.clone(e,this._rectangle)}}});const XUe=JX;function ns(){this._layers=[],this.layerAdded=new Ue,this.layerRemoved=new Ue,this.layerMoved=new Ue,this.layerShownOrHidden=new Ue}function ND(e,t){if(!c(t))throw new E("layer is required.");const n=e.indexOf(t);if(-1===n)throw new E("layer is not in this collection.");return n}function eZ(e,t,n){const i=e._layers;if((t=O.clamp(t,0,i.length-1))===(n=O.clamp(n,0,i.length-1)))return;const o=i[t];i[t]=i[n],i[n]=o,e._update(),e.layerMoved.raiseEvent(o,n,t)}Object.defineProperties(ns.prototype,{length:{get:function(){return this._layers.length}}}),ns.prototype.add=function(e,t){const n=c(t);if(!c(e))throw new E("layer is required.");if(n){if(t<0)throw new E("index must be greater than or equal to zero.");if(t>this._layers.length)throw new E("index must be less than or equal to the number of layers.")}n?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t);const i=e.readyEvent.addEventListener(()=>{this.layerShownOrHidden.raiseEvent(e,e._layerIndex,e.show),i()})},ns.prototype.addImageryProvider=function(e,t){if(!c(e))throw new E("imageryProvider is required.");const n=new xc(e);return this.add(n,t),n},ns.prototype.remove=function(e,t){t=g(t,!0);const n=this._layers.indexOf(e);return-1!==n&&(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0)},ns.prototype.removeAll=function(e){e=g(e,!0);const t=this._layers;for(let n=0,i=t.length;n<i;n++){const o=t[n];this.layerRemoved.raiseEvent(o,n),e&&o.destroy()}this._layers=[]},ns.prototype.contains=function(e){return-1!==this.indexOf(e)},ns.prototype.indexOf=function(e){return this._layers.indexOf(e)},ns.prototype.get=function(e){if(!c(e))throw new E("index is required.","index");return this._layers[e]},ns.prototype.raise=function(e){const t=ND(this._layers,e);eZ(this,t,t+1)},ns.prototype.lower=function(e){const t=ND(this._layers,e);eZ(this,t,t-1)},ns.prototype.raiseToTop=function(e){const t=ND(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))},ns.prototype.lowerToBottom=function(e){const t=ND(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};const ZUe=new Ce;function tZ(e,t,n,i){const o=e.globe._surface._tilesToRender;let r;for(let a=0;!c(r)&&a<o.length;++a){const l=o[a];Ce.contains(l.rectangle,t)&&(r=l)}if(!c(r))return;const s=r.data.imagery;for(let a=s.length-1;a>=0;--a){const l=s[a],u=l.readyImagery;if(!c(u)||!u.imageryLayer.ready)continue;if(n&&!c(u.imageryLayer.imageryProvider.pickFeatures)||!Ce.contains(u.rectangle,t))continue;const h=ZUe,m=1/1024;h.west=O.lerp(r.rectangle.west,r.rectangle.east,l.textureCoordinateRectangle.x-m),h.east=O.lerp(r.rectangle.west,r.rectangle.east,l.textureCoordinateRectangle.z+m),h.south=O.lerp(r.rectangle.south,r.rectangle.north,l.textureCoordinateRectangle.y-m),h.north=O.lerp(r.rectangle.south,r.rectangle.north,l.textureCoordinateRectangle.w+m),Ce.contains(h,t)&&i(u)}}ns.prototype.pickImageryLayers=function(e,t){const n=t.globe.pick(e,t);if(!c(n))return;const i=t.globe.ellipsoid.cartesianToCartographic(n),o=[];return tZ(t,i,!1,function(r){o.push(r.imageryLayer)}),0!==o.length?o:void 0},ns.prototype.pickImageryLayerFeatures=function(e,t){const n=t.globe.pick(e,t);if(!c(n))return;const i=t.globe.ellipsoid.cartesianToCartographic(n),o=[],r=[];return tZ(t,i,!0,function(s){if(!s.imageryLayer.ready)return;const l=s.imageryLayer.imageryProvider.pickFeatures(s.x,s.y,s.level,i.longitude,i.latitude);c(l)&&(o.push(l),r.push(s.imageryLayer))}),0!==o.length?Promise.all(o).then(function(s){const a=[];for(let l=0;l<s.length;++l){const u=s[l],d=r[l];if(c(u)&&u.length>0)for(let h=0;h<u.length;++h){const m=u[h];m.imageryLayer=d,c(m.position)||(m.position=i),a.push(m)}}return a}):void 0},ns.prototype.queueReprojectionCommands=function(e){const t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)},ns.prototype.cancelReprojections=function(){const e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()},ns.prototype.isDestroyed=function(){return!1},ns.prototype.destroy=function(){return this.removeAll(!0),Ye(this)},ns.prototype._update=function(){let e=!0;const t=this._layers;let 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&&(c(i._show)&&(c(n)||(n=[]),n.push(i)),i._show=i.show);if(c(n))for(o=0,r=n.length;o<r;++o)i=n[o],this.layerShownOrHidden.raiseEvent(i,i._layerIndex,i.show)};const $Ue=ns;function nZ(e){this._ellipsoid=new tP(e.ellipsoid,f.ZERO)}Object.defineProperties(nZ.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});const KUe=nZ;function ec(e){if(!c(e))throw new E("options is required.");if(!c(e.x))throw new E("options.x is required.");if(!c(e.y))throw new E("options.y is required.");if(e.x<0||e.y<0)throw new E("options.x and options.y must be greater than or equal to zero.");if(!c(e.level))throw new E("options.level is required and must be greater than or equal to zero.");if(!c(e.tilingScheme))throw new E("options.tilingScheme is required.");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=wi.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=Zl.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}function MD(e){c(e)&&e.freeResources()}ec.createLevelZeroTiles=function(e){if(!c(e))throw new E("tilingScheme is required.");const t=e.getNumberOfXTilesAtLevel(0),n=e.getNumberOfYTilesAtLevel(0),i=new Array(t*n);let o=0;for(let r=0;r<n;++r)for(let s=0;s<t;++s)i[o++]=new ec({tilingScheme:e,x:s,y:r,level:0});return i},ec.prototype._updateCustomData=function(e,t,n){let o,r,s,i=this.customData;if(c(t)&&c(n)){for(i=i.filter(function(a){return-1===n.indexOf(a)}),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{const a=this._parent;if(c(a)&&this._frameUpdated!==a._frameUpdated){i.length=0,s=this._rectangle;const l=a.customData;for(o=0;o<l.length;++o)r=l[o],Ce.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=a._frameUpdated}}},Object.defineProperties(ec.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 c(this._southwestChild)||(this._southwestChild=new ec({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return c(this._southeastChild)||(this._southeastChild=new ec({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return c(this._northwestChild)||(this._northwestChild=new ec({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return c(this._northeastChild)||(this._northeastChild=new ec({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<Zl.DONE}},eligibleForUnloading:{get:function(){let e=!0;return c(this.data)&&(e=this.data.eligibleForUnloading,c(e)||(e=!0)),e}}}),ec.prototype.findLevelZeroTile=function(e,t,n){const 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]},ec.prototype.findTileToWest=function(e){const t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;const n=t.findTileToWest(e);return void 0!==n?t.southwestChild===this?n.southeastChild:n.northeastChild:void 0},ec.prototype.findTileToEast=function(e){const t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;const n=t.findTileToEast(e);return void 0!==n?t.southeastChild===this?n.southwestChild:n.northwestChild:void 0},ec.prototype.findTileToSouth=function(e){const t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;const n=t.findTileToSouth(e);return void 0!==n?t.southwestChild===this?n.northwestChild:n.northeastChild:void 0},ec.prototype.findTileToNorth=function(e){const t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;const n=t.findTileToNorth(e);return void 0!==n?t.northwestChild===this?n.southwestChild:n.southeastChild:void 0},ec.prototype.freeResources=function(){this.state=Zl.START,this.renderable=!1,this.upsampledFromParent=!1,c(this.data)&&c(this.data.freeResources)&&this.data.freeResources(),MD(this._southwestChild),this._southwestChild=void 0,MD(this._southeastChild),this._southeastChild=void 0,MD(this._northwestChild),this._northwestChild=void 0,MD(this._northeastChild),this._northeastChild=void 0};const QUe=ec;function FD(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function iZ(e,t){const 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.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},FD.prototype.trimTiles=function(e){let t=this.tail,n=!0;for(;n&&c(this._lastBeforeStartOfFrame)&&this.count>e&&c(t);){n=t!==this._lastBeforeStartOfFrame;const i=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),iZ(this,t)),t=i}},FD.prototype.markTileRendered=function(e){const t=this.head;if(t!==e)return++this.count,c(t)?((c(e.replacementPrevious)||c(e.replacementNext))&&iZ(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,void(this.head=e)):(e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,void(this.tail=e));e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext)};const JUe=FD;function $l(e){if(!c(e)||!c(e.tileProvider))throw new E("options.tileProvider is required.");if(c(e.tileProvider.quadtree))throw new E("A QuadtreeTileProvider can only be used with a single QuadtreePrimitive");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};const n=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new JUe,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=g(e.maximumScreenSpaceError,2),this.tileCacheSize=g(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new KUe({ellipsoid:n}),this._tileLoadProgressEvent=new Ue,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}function oZ(e){const 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}let iC;Object.defineProperties($l.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}}),$l.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0},$l.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;c(t);)t.state!==Zl.START&&e(t),t=t.replacementNext},$l.prototype.forEachRenderedTile=function(e){const t=this._tilesToRender;for(let n=0,i=t.length;n<i;++n)e(t[n])},$l.prototype.updateHeight=function(e,t){const n=this,i={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t,removeFunc:function(){const 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)}};return n._addHeightCallbacks.push(i),i.removeFunc},$l.prototype.update=function(e){c(this._tileProvider.update)&&this._tileProvider.update(e)},$l.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(function eze(e){const t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,oZ(e);const n=e._levelZeroTiles;if(c(n))for(let i=0;i<n.length;++i){const r=n[i].customData,s=r.length;for(let a=0;a<s;++a){const l=r[a];l.level=0,e._addHeightCallbacks.push(l)}n[i].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),oZ(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())},$l.prototype.render=function(e){const t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),function oze(e,t){const n=e._debug;if(n.suspendLodUpdate)return;let o;e._tilesToRender.length=0;const r=e._tileProvider;if(!c(e._levelZeroTiles)){if(!c(r.tilingScheme))return;{e._levelZeroTiles=QUe.createLevelZeroTiles(r.tilingScheme);const x=e._levelZeroTiles.length;if(oC.length<x)for(oC=new Array(x),o=0;o<x;++o)void 0===oC[o]&&(oC[o]=new rC)}}let s;e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;const a=e._levelZeroTiles,l=a.length>1?e._occluders:void 0;iC=t.camera.positionCartographic,a.sort(nze);const u=e._addHeightCallbacks,d=e._removeHeightCallbacks,h=t.frameNumber;let m;if(u.length>0||d.length>0){for(o=0,m=a.length;o<m;++o)s=a[o],s._updateCustomData(h,u,d);u.length=0,d.length=0}const _=t.camera;e._cameraPositionCartographic=_.positionCartographic;const p=k.getTranslation(_.transform,ize);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(p,e._cameraReferenceFrameOriginCartographic),o=0,m=a.length;o<m;++o)s=a[o],e._tileReplacementQueue.markTileRendered(s),s.renderable?Js(e,s,r,t,l,!1,oC[o]):(Mh(e,e._tileLoadQueueHigh,s,t),++n.tilesWaitingForChildren);e._lastSelectionFrameNumber=h}(this,e),function pze(e,t){const n=e._tileProvider,i=e._tilesToRender;for(let o=0,r=i.length;o<r;++o)n.showTileThisFrame(i[o],t)}(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)},$l.prototype.endFrame=function(e){!e.passes.render||e.mode===ce.MORPHING||(function uze(e,t){const n=e._tileLoadQueueHigh,i=e._tileLoadQueueMedium,o=e._tileLoadQueueLow;if(0===n.length&&0===i.length&&0===o.length)return;e._tileReplacementQueue.trimTiles(e.tileCacheSize);const r=wr()+e._loadQueueTimeSlice,s=e._tileProvider;let a=VF(e,t,s,r,n,!1);a=VF(e,t,s,r,i,a),VF(e,t,s,r,o,a)}(this,e),function hze(e,t){if(!c(e.tileProvider.tilingScheme))return;const n=fze;n.length=0;const i=e._tileToUpdateHeights,s=wr()+e._updateHeightsTimeSlice,a=t.mode,l=t.mapProjection,u=e.tileProvider.tilingScheme.ellipsoid;let d;for(;i.length>0;){const h=i[0];if(!c(h.data)||!c(h.data.mesh)){const y=h._lastSelectionResultFrame===e._lastSelectionFrameNumber?h._lastSelectionResult:wi.NONE;(y===wi.RENDERED||y===wi.CULLED_BUT_NEEDED)&&n.push(h),i.shift(),e._lastTileIndex=0;continue}const m=h.customData,_=m.length;let p=!1;for(d=e._lastTileIndex;d<_;++d){const y=m[d],A=h.data.terrainData,x=c(A)&&A.wasCreatedByUpsampling();if(h.level>y.level&&!x){if(c(y.positionOnEllipsoidSurface)||(y.positionOnEllipsoidSurface=f.fromRadians(y.positionCartographic.longitude,y.positionCartographic.latitude,0,u)),a===ce.SCENE3D){const w=u.geodeticSurfaceNormal(y.positionOnEllipsoidSurface,pb.direction),v=u.getSurfaceNormalIntersectionWithZAxis(y.positionOnEllipsoidSurface,11500,pb.origin);if(!c(v)){let D=0;c(h.data.tileBoundingRegion)&&(D=h.data.tileBoundingRegion.minimumHeight);const P=Math.min(D,-11500),N=f.multiplyByScalar(w,Math.abs(P)+1,gm);f.subtract(y.positionOnEllipsoidSurface,N,pb.origin)}}else Se.clone(y.positionCartographic,HF),HF.height=-11500,l.project(HF,gm),f.fromElements(gm.z,gm.x,gm.y,gm),f.clone(gm,pb.origin),f.clone(f.UNIT_X,pb.direction);const C=h.data.pick(pb,a,l,!1,gm);c(C)&&(c(y.callback)&&y.callback(C),y.level=h.level)}if(wr()>=s){p=!0;break}}if(p){e._lastTileIndex=d;break}e._lastTileIndex=0,i.shift()}for(d=0;d<n.length;d++)i.push(n[d])}(this,e),function tze(e,t){const n=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;if(n!==e._lastTileLoadQueueLength||e._tilesInvalidated){const o=Ue.prototype.raiseEvent.bind(e._tileLoadProgressEvent,n);t.afterRender.push(()=>(o(),!0)),e._lastTileLoadQueueLength=n}const 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))}(this,e))},$l.prototype.isDestroyed=function(){return!1},$l.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};const rZ=new Se;function nze(e,t){let n=Ce.center(e.rectangle,rZ);const i=n.longitude-iC.longitude,o=n.latitude-iC.latitude;n=Ce.center(t.rectangle,rZ);const r=n.longitude-iC.longitude,s=n.latitude-iC.latitude;return i*i+o*o-(r*r+s*s)}const ize=new f;let oC=[];function Mh(e,t,n,i){n.needsLoading&&(void 0!==e.tileProvider.computeTileLoadPriority&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function rC(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function sZ(){this.southwest=new rC,this.southeast=new rC,this.northwest=new rC,this.northeast=new rC}sZ.prototype.combine=function(e){const 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};const zF=new Array(31);for(let e=0;e<zF.length;++e)zF[e]=new sZ;function Js(e,t,n,i,o,r,s){if(n.computeTileVisibility(t,i,o)!==ys.NONE)return function rze(e,t,n,i,o){const r=e._debug;++r.tilesVisited,e._tileReplacementQueue.markTileRendered(n),n._updateCustomData(t.frameNumber),n.level>r.maxDepthVisited&&(r.maxDepthVisited=n.level);const s=function cze(e,t,n){if(t.mode===ce.SCENE2D||t.camera.frustum instanceof $n||t.camera.frustum instanceof qa)return function lze(e,t,n){let o=t.camera.frustum;const r=o.offCenterFrustum;c(r)&&(o=r);const s=t.context,a=s.drawingBufferWidth,l=s.drawingBufferHeight;let h=e._tileProvider.getLevelMaximumGeometricError(n.level)/(Math.max(o.top-o.bottom,o.right-o.left)/Math.max(a,l));return t.fog.enabled&&t.mode!==ce.SCENE2D&&(h-=O.fog(n._distance,t.fog.density)*t.fog.sse),h/=t.pixelRatio,h}(e,t,n);const i=e._tileProvider.getLevelMaximumGeometricError(n.level),o=n._distance;let a=i*t.context.drawingBufferHeight/(o*t.camera.frustum.sseDenominator);return t.fog.enabled&&(a-=O.fog(o,t.fog.density)*t.fog.sse),a/=t.pixelRatio,a}(e,t,n)<e.maximumScreenSpaceError,a=n.southwestChild,l=n.southeastChild,u=n.northwestChild,d=n.northeastChild,m=n._lastSelectionResultFrame===e._lastSelectionFrameNumber?n._lastSelectionResult:wi.NONE,_=e.tileProvider;if(s||i){const p=wi.originalResult(m)===wi.RENDERED,y=wi.originalResult(m)===wi.CULLED||m===wi.NONE;let x=p||y||n.state===Zl.DONE;if(x||c(_.canRenderWithoutLosingDetail)&&(x=_.canRenderWithoutLosingDetail(n)),x)return s&&Mh(e,e._tileLoadQueueMedium,n,t),BD(e,n),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=m===wi.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=wi.RENDERED,void(o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n));i=!0,s&&Mh(e,e._tileLoadQueueHigh,n,t)}if(_.canRefine(n)){if(a.upsampledFromParent&&l.upsampledFromParent&&u.upsampledFromParent&&d.upsampledFromParent)return BD(e,n),Mh(e,e._tileLoadQueueMedium,n,t),e._tileReplacementQueue.markTileRendered(a),e._tileReplacementQueue.markTileRendered(l),e._tileReplacementQueue.markTileRendered(u),e._tileReplacementQueue.markTileRendered(d),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=m===wi.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=wi.RENDERED,void(o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n));n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=wi.REFINED;const y=e._tilesToRender.length,A=e._tileLoadQueueLow.length,x=e._tileLoadQueueMedium.length,C=e._tileLoadQueueHigh.length,w=e._tileToUpdateHeights.length;if(function sze(e,t,n,i,o,r,s,a){const l=r.camera.positionCartographic,u=e._tileProvider,d=e._occluders,h=zF[t.level],m=h.southwest,_=h.southeast,p=h.northwest,y=h.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(Js(e,t,u,r,d,s,m),Js(e,n,u,r,d,s,_),Js(e,i,u,r,d,s,p),Js(e,o,u,r,d,s,y)):(Js(e,i,u,r,d,s,p),Js(e,t,u,r,d,s,m),Js(e,o,u,r,d,s,y),Js(e,n,u,r,d,s,_)):l.latitude<t.rectangle.north?(Js(e,n,u,r,d,s,_),Js(e,t,u,r,d,s,m),Js(e,o,u,r,d,s,y),Js(e,i,u,r,d,s,p)):(Js(e,o,u,r,d,s,y),Js(e,i,u,r,d,s,p),Js(e,n,u,r,d,s,_),Js(e,t,u,r,d,s,m)),h.combine(a)}(e,a,l,u,d,t,i,o),y!==e._tilesToRender.length){const P=o.notYetRenderableCount;let N=!1;if(!o.allAreRenderable&&!o.anyWereRenderedLastFrame){const R=e._tilesToRender;for(let F=y;F<R.length;++F){let S=R[F];for(;void 0!==S&&S._lastSelectionResult!==wi.KICKED&&S!==n;)S._lastSelectionResult=wi.kick(S._lastSelectionResult),S=S.parent}e._tilesToRender.length=y,e._tileToUpdateHeights.length=w,BD(e,n),n._lastSelectionResult=wi.RENDERED;const B=m===wi.RENDERED;!B&&P>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=A,e._tileLoadQueueMedium.length=x,e._tileLoadQueueHigh.length=C,Mh(e,e._tileLoadQueueMedium,n,t),o.notYetRenderableCount=n.renderable?0:1,N=!0),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=B,B||e._tileToUpdateHeights.push(n),++r.tilesWaitingForChildren}e.preloadAncestors&&!N&&Mh(e,e._tileLoadQueueLow,n,t)}}else n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=wi.RENDERED,BD(e,n),Mh(e,e._tileLoadQueueHigh,n,t),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=m===wi.RENDERED,o.notYetRenderableCount=n.renderable?0:1}(e,i,t,r,s);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),s.allAreRenderable=!0,s.anyWereRenderedLastFrame=!1,s.notYetRenderableCount=0,function aze(e,t){const n=t.rectangle;return c(e._cameraPositionCartographic)&&Ce.contains(n,e._cameraPositionCartographic)||c(e._cameraReferenceFrameOriginCartographic)&&Ce.contains(n,e._cameraReferenceFrameOriginCartographic)}(e,t)){(!c(t.data)||!c(t.data.vertexArray))&&Mh(e,e._tileLoadQueueMedium,t,i);const l=t._lastSelectionResultFrame===e._lastSelectionFrameNumber?t._lastSelectionResult:wi.NONE;l!==wi.CULLED_BUT_NEEDED&&l!==wi.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=wi.CULLED_BUT_NEEDED}else(e.preloadSiblings||0===t.level)&&Mh(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=wi.CULLED;t._lastSelectionResultFrame=i.frameNumber}function BD(e,t){e._tilesToRender.push(t)}function dze(e,t){return e._loadPriority-t._loadPriority}function VF(e,t,n,i,o,r){void 0!==n.computeTileLoadPriority&&o.sort(dze);for(let s=0,a=o.length;s<a&&(wr()<i||!r);++s){const l=o[s];e._tileReplacementQueue.markTileRendered(l),n.loadTile(t,l),r=!0}return r}const pb=new fi,HF=new Se,gm=new f,fze=[],mze=$l;function ed(e){e=g(e,ge.WGS84);const t=new Ff({ellipsoid:e}),n=new $Ue;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new qke,this._material=void 0,this._surface=new mze({tileProvider:new YUe({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new Ue,this._undergroundColor=X.clone(X.BLACK),this._undergroundColorAlphaByDistance=new Mn(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new XUe,GF(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new jt({url:ni("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 f(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new f(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=$o.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.terrainExaggeration=1,this.terrainExaggerationRelativeHeight=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this.vertexShadowDarkness=.3}function GF(e){const t=[],n=c(e._material)&&(e._material.shaderSource.match(/slope/)||e._material.shaderSource.match("normalEC")),i=[CD,LX];!c(e._material)||n&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.materialUniformMap=void 0:(i.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms),i.push(Mke),e._surfaceShaderSet.baseVertexShaderSource=new Et({sources:[CD,LX,Fke],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new Et({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}Object.defineProperties(ed.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!c(this._surface)||0===this._surface._tileLoadQueueHigh.length&&0===this._surface._tileLoadQueueMedium.length&&0===this._surface._tileLoadQueueLow.length}},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}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){c(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),c(this._material)&&GF(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,GF(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=X.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){if(c(e)&&e.far<e.near)throw new E("far distance must be greater than near distance.");this._undergroundColorAlphaByDistance=Mn.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});const gze=[],yze={start:0,stop:0};ed.prototype.pickWorldCoordinates=function(e,t,n,i){if(!c(e))throw new E("ray is required");if(!c(t))throw new E("scene is required");n=g(n,!0);const o=t.mode,r=t.mapProjection,s=gze;s.length=0;const a=this._surface._tilesToRender;let u,d,h,l=a.length;for(d=0;d<l;++d){u=a[d];const m=u.data;if(!c(m))continue;let _=m.pickBoundingSphere;if(o!==ce.SCENE3D)m.pickBoundingSphere=_=be.fromRectangleWithHeights2D(u.rectangle,r,m.tileBoundingRegion.minimumHeight,m.tileBoundingRegion.maximumHeight,_),f.fromElements(_.center.z,_.center.x,_.center.y,_.center);else{if(!c(m.renderedMesh))continue;be.clone(m.tileBoundingRegion.boundingSphere,_)}const p=rr.raySphere(e,_,yze);c(p)&&s.push(m)}for(s.sort(function _ze(e){return function(t,n){return be.distanceSquaredTo(t.pickBoundingSphere,e)-be.distanceSquaredTo(n.pickBoundingSphere,e)}}(e.origin)),l=s.length,d=0;d<l&&(h=s[d].pick(e,t.mode,t.mapProjection,n,i),!c(h));++d);return h};const bze=new Se;ed.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),c(n)&&t.mode!==ce.SCENE3D){n=f.fromElements(n.y,n.z,n.x,n);const i=t.mapProjection.unproject(n,bze);n=t.globe.ellipsoid.cartographicToCartesian(i,n)}return n};const Aze=new f,aZ=new f,Tze=new Se,xze=new fi;function jF(e,t){return c(e)&&Ce.contains(e.rectangle,t)?e:void 0}ed.prototype.getHeight=function(e){if(!c(e))throw new E("cartographic is required");const t=this._surface._levelZeroTiles;if(!c(t))return;let n,i;const 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(;c(n);)n=jF(n._southwestChild,e)||jF(n._southeastChild,e)||jF(n._northwestChild,e)||n._northeastChild,c(n)&&c(n.data)&&c(n.data.renderedMesh)&&(r=n);if(n=r,!c(n)||!c(n.data)||!c(n.data.renderedMesh))return;const s=this._surface._tileProvider.tilingScheme.projection,a=this._surface._tileProvider.tilingScheme.ellipsoid,l=f.fromRadians(e.longitude,e.latitude,0,a,Aze),u=xze,d=a.geodeticSurfaceNormal(l,u.direction),h=a.getSurfaceNormalIntersectionWithZAxis(l,11500,u.origin);if(!c(h)){let _;c(n.data.tileBoundingRegion)&&(_=n.data.tileBoundingRegion.minimumHeight);const p=Math.min(g(_,0),-11500),y=f.multiplyByScalar(d,Math.abs(p)+1,aZ);f.subtract(l,y,u.origin)}const m=n.data.pick(u,void 0,s,!1,aZ);return c(m)?a.cartesianToCartographic(m,Tze).height:void 0},ed.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)},ed.prototype.beginFrame=function(e){const t=this._surface,n=t.tileProvider,i=this.terrainProvider,o=this.showWaterEffect&&c(i)&&i.hasWaterMask&&i.hasWaterMask;if(o&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;const a=this._oceanNormalMapResource,l=a.url;if(c(l)){const u=this;a.fetchImage().then(function(d){l===u._oceanNormalMapResource.url&&(u._oceanNormalMap=u._oceanNormalMap&&u._oceanNormalMap.destroy(),u._oceanNormalMap=new jn({context:e.context,source:d}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}const s=e.mode;e.passes.render&&(this._zoomedOutOceanSpecularIntensity=this.showGroundAtmosphere?.4:.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===ce.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))},ed.prototype.render=function(e){this.show&&(c(this._material)&&this._material.update(e.context),this._surface.render(e))},ed.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)},ed.prototype.isDestroyed=function(){return!1},ed.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(),Ye(this)};const Cze=ed,wze=function Eze(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i},cZ={},lZ=-.0529921,uZ=-.1059842,dZ=13.0120009,fZ=13.3407154,hZ=.9856003,pZ=26.4057084,mZ=13.064993,_Z=.3287146,gZ=1.7484877,yZ=-.1589763,bZ=.0036096,AZ=.1643573,TZ=12.9590088;let WF=new se;cZ.ComputeMoon=function(e,t){c(e)||(e=se.now()),WF=se.addSeconds(e,32.184,WF);const n=se.totalDays(WF)-2451545,i=n/It.DAYS_PER_JULIAN_CENTURY,o=(125.045+lZ*n)*O.RADIANS_PER_DEGREE,r=(250.089+uZ*n)*O.RADIANS_PER_DEGREE,s=(260.008+dZ*n)*O.RADIANS_PER_DEGREE,a=(176.625+fZ*n)*O.RADIANS_PER_DEGREE,l=(357.529+hZ*n)*O.RADIANS_PER_DEGREE,u=(311.589+pZ*n)*O.RADIANS_PER_DEGREE,d=(134.963+mZ*n)*O.RADIANS_PER_DEGREE,h=(276.617+_Z*n)*O.RADIANS_PER_DEGREE,m=(34.226+gZ*n)*O.RADIANS_PER_DEGREE,_=(15.134+yZ*n)*O.RADIANS_PER_DEGREE,p=(119.743+bZ*n)*O.RADIANS_PER_DEGREE,y=(239.961+AZ*n)*O.RADIANS_PER_DEGREE,A=(25.053+TZ*n)*O.RADIANS_PER_DEGREE,x=Math.sin(o),C=Math.sin(r),w=Math.sin(s),v=Math.sin(a),D=Math.sin(l),P=Math.sin(u),N=Math.sin(d),R=Math.sin(h),B=Math.sin(m),F=Math.sin(_),S=Math.sin(p),I=Math.sin(y),L=Math.sin(A),M=Math.cos(o),U=Math.cos(r),z=Math.cos(s),j=Math.cos(a),W=Math.cos(l),q=Math.cos(u),V=Math.cos(d),$=Math.cos(h),Z=Math.cos(m),ie=Math.cos(_),Y=Math.cos(p),Q=Math.cos(y),K=Math.cos(A),me=(269.9949+.0031*i-3.8787*x-.1204*C+.07*w-.0172*v+.0072*P-.0052*F+.0043*L)*O.RADIANS_PER_DEGREE,we=(66.5392+.013*i+1.5419*M+.0239*U-.0278*z+.0068*j-.0029*q+9e-4*V+8e-4*ie-9e-4*K)*O.RADIANS_PER_DEGREE,le=(38.3213+13.17635815*n-14e-13*n*n+3.561*x+.1208*C-.0642*w+.0158*v+.0252*D-.0066*P-.0047*N-.0046*R+.0028*B+.0052*F+.004*S+.0019*I-.0044*L)*O.RADIANS_PER_DEGREE,Ae=(13.17635815-2*n*14e-13+3.561*M*lZ+.1208*U*uZ-.0642*z*dZ+.0158*j*fZ+.0252*W*hZ-.0066*q*pZ-.0047*V*mZ-.0046*$*_Z+.0028*Z*gZ+.0052*ie*yZ+.004*Y*bZ+.0019*Q*AZ-.0044*K*TZ)/86400*O.RADIANS_PER_DEGREE;return c(t)||(t=new wze),t.rightAscension=me,t.declination=we,t.rotation=le,t.rotationRate=Ae,t};const Dze=cZ;function xZ(e){(!c(e)||"function"!=typeof e)&&(e=Dze.ComputeMoon),this._computeFunction=e}const Ize=new f,Pze=new f,Oze=new f,Rze=new ne,Nze=new yt;xZ.prototype.evaluate=function(e,t){c(e)||(e=se.now());const n=this._computeFunction(e),i=function Lze(e,t,n){const i=Ize;i.x=Math.cos(e+O.PI_OVER_TWO),i.y=Math.sin(e+O.PI_OVER_TWO),i.z=0;const o=Math.cos(t),r=Oze;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);const s=f.cross(r,i,Pze);return c(n)||(n=new ne),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}(n.rightAscension,n.declination,t),o=O.zeroToTwoPi(n.rotation),r=yt.fromAxisAngle(f.UNIT_Z,o,Nze),s=ne.fromQuaternion(yt.conjugate(r,r),Rze);return ne.multiply(s,i,i)};const Mze=xZ,qF={},Bze=32.184,kze=2451545;function CZ(e,t){t=se.addSeconds(e,Bze,t);const n=se.totalDays(t)-kze;return t=se.addSeconds(t,function Fze(e){const t=6.239996+.0172019696544*e;return.001657*Math.sin(t+.01671*Math.sin(t))}(n),t),t}const kD=new se(2451545,0,it.TAI),Kl=O.RADIANS_PER_DEGREE,al=O.RADIANS_PER_ARCSECOND,EZ=new ne;function wZ(e,t,n,i,o,r,s){if(n<0&&(n=-n,o+=O.PI),n<0||n>O.PI)throw new E("The inclination is out of range. Inclination must be greater than or equal to zero and less than or equal to Pi radians.");const a=e*(1-t),l=i-o,u=o,d=function Vze(e,t){if(t<0||t>=1)throw new E("eccentricity out of range.");const n=function Gze(e,t){if(t<0||t>=1)throw new E("eccentricity out of range.");const n=Math.floor(e/O.TWO_PI);let r,i=(e-=n*O.TWO_PI)+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE;for(r=0;r<SZ&&Math.abs(o-i)>Hze;++r)o=i,i=o-(o-t*Math.sin(o)-e)/(1-t*Math.cos(o));if(r>=SZ)throw new E("Kepler equation did not converge");return o=i+n*O.TWO_PI,o}(e,t);return function jze(e,t){if(t<0||t>=1)throw new E("eccentricity out of range.");const n=Math.floor(e/O.TWO_PI);e-=n*O.TWO_PI;const i=Math.cos(e)-t,o=Math.sin(e)*Math.sqrt(1-t*t);let r=Math.atan2(o,i);return r=O.zeroToTwoPi(r),e<0&&(r-=O.TWO_PI),r+=n*O.TWO_PI,r}(n,t)}(r-i,t);if("Hyperbolic"===function zze(e,t){if(e<0)throw new E("eccentricity cannot be negative.");return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}(t,0)&&Math.abs(O.negativePiToPi(d))>=Math.acos(-1/t))throw new E("The true anomaly of the hyperbolic orbit lies outside of the bounds of the hyperbola.");!function Wze(e,t,n,i){if(t<0||t>O.PI)throw new E("inclination out of range");const o=Math.cos(e),r=Math.sin(e),s=Math.cos(t),a=Math.sin(t),l=Math.cos(n),u=Math.sin(n);c(i)?(i[0]=l*o-u*r*s,i[1]=u*o+l*r*s,i[2]=r*a,i[3]=-l*r-u*o*s,i[4]=-u*r+l*o*s,i[5]=o*a,i[6]=u*a,i[7]=-l*a,i[8]=s):i=new ne(l*o-u*r*s,-l*r-u*o*s,u*a,u*o+l*r*s,-u*r+l*o*s,-l*a,r*a,o*a,s)}(l,n,u,EZ);const m=a*(1+t),_=Math.cos(d),p=Math.sin(d),y=1+t*_;if(y<=O.Epsilon10)throw new E("elements cannot be converted to cartesian");const A=m/y;return c(s)?(s.x=A*_,s.y=A*p,s.z=0):s=new f(A*_,A*p,0),ne.multiplyByVector(EZ,s,s)}const SZ=50,Hze=O.EPSILON8,Yze=100.46645683*Kl,Xze=1295977422.83429*al,mb=new se(0,0,it.TAI);function GZ(e,t){CZ(e,mb);const i=(mb.dayNumber-kD.dayNumber+(mb.secondsOfDay-kD.secondsOfDay)/It.SECONDS_PER_DAY)/It.DAYS_PER_JULIAN_CENTURY,o=i*i,r=o*i,s=r*i;let a=383397.7725+.004*i,l=.055545526-16e-9*i;const u=5.15668983*Kl;let d=-8e-5*i+.02966*o-42e-6*r-13e-8*s;const h=83.35324312*Kl;let m=14643420.2669*i-38.2702*o-.045047*r+21301e-8*s;const _=125.04455501*Kl;let p=-6967919.3631*i+6.3602*o+.007625*r-3586e-8*s;const y=218.31664563*Kl;let A=1732559343.4847*i-6.391*o+.006588*r-3169e-8*s;const x=297.85019547*Kl+al*(1602961601.209*i-6.3706*o+.006593*r-3169e-8*s),w=134.96340251*Kl+al*(1717915923.2178*i+31.8792*o+.051635*r-2447e-7*s),v=357.52910918*Kl+al*(129596581.0481*i-.5532*o+136e-6*r-1149e-8*s),D=310.17137918*Kl-al*(6967051.436*i+6.2068*o+.007618*r-3219e-8*s),P=2*x,N=4*x,R=6*x,B=2*w,F=3*w,S=4*w,I=2*(93.27209062*Kl+al*(1739527262.8478*i-12.7512*o-.001037*r+417e-8*s));a+=3400.4*Math.cos(P)-635.6*Math.cos(P-w)-235.6*Math.cos(w)+218.1*Math.cos(P-v)+181*Math.cos(P+w),l+=.014216*Math.cos(P-w)+.008551*Math.cos(P-B)-.001383*Math.cos(w)+.001356*Math.cos(P+w)-.001147*Math.cos(N-F)-914e-6*Math.cos(N-B)+869e-6*Math.cos(P-v-w)-627e-6*Math.cos(P)-394e-6*Math.cos(N-S)+282e-6*Math.cos(P-v-B)-279e-6*Math.cos(x-w)-236e-6*Math.cos(B)+231e-6*Math.cos(N)+229e-6*Math.cos(R-S)-201e-6*Math.cos(B-I),d+=486.26*Math.cos(P-I)-40.13*Math.cos(P)+37.51*Math.cos(I)+25.73*Math.cos(B-I)+19.97*Math.cos(P-v-I),m+=-55609*Math.sin(P-w)-34711*Math.sin(P-B)-9792*Math.sin(w)+9385*Math.sin(N-F)+7505*Math.sin(N-B)+5318*Math.sin(P+w)+3484*Math.sin(N-S)-3417*Math.sin(P-v-w)-2530*Math.sin(R-S)-2376*Math.sin(P)-2075*Math.sin(P-F)-1883*Math.sin(B)-1736*Math.sin(R-5*w)+1626*Math.sin(v)-1370*Math.sin(R-F),p+=-5392*Math.sin(P-I)-540*Math.sin(v)-441*Math.sin(P)+423*Math.sin(I)-288*Math.sin(B-I),A+=-3332.9*Math.sin(P)+1197.4*Math.sin(P-w)-662.5*Math.sin(v)+396.3*Math.sin(w)-218*Math.sin(P-v);const L=2*D,M=3*D;d+=46.997*Math.cos(D)*i-.614*Math.cos(P-I+D)*i+.614*Math.cos(P-I-D)*i-.0297*Math.cos(L)*o-.0335*Math.cos(D)*o+.0012*Math.cos(P-I+L)*o-16e-5*Math.cos(D)*r+4e-5*Math.cos(M)*r+4e-5*Math.cos(L)*r;const U=2.116*Math.sin(D)*i-.111*Math.sin(P-I-D)*i-.0015*Math.sin(D)*o;return m+=U,A+=U,p+=-520.77*Math.sin(D)*i+13.66*Math.sin(P-I+D)*i+1.12*Math.sin(P-D)*i-1.06*Math.sin(I-D)*i+.66*Math.sin(L)*o+.371*Math.sin(D)*o-.035*Math.sin(P-I+L)*o-.015*Math.sin(P-I+D)*o+.0014*Math.sin(D)*r-.0011*Math.sin(M)*r-9e-4*Math.sin(L)*r,a*=1e3,wZ(a,l,u+d*al,h+m*al,_+p*al,y+A*al,t)}const WZ=new ne(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819);let sC=new f;qF.computeSunPositionInEarthInertialFrame=function(e,t){return c(e)||(e=se.now()),c(t)||(t=new f),sC=function vVe(e,t){CZ(e,mb);const i=(mb.dayNumber-kD.dayNumber+(mb.secondsOfDay-kD.secondsOfDay)/It.SECONDS_PER_DAY)/(10*It.DAYS_PER_JULIAN_CENTURY),o=.3595362*i,r=149598022260.7121+957426.3679999999*Math.cos(16002*o)+-2243968.05*Math.sin(16002*o)+-2273887.624*Math.cos(21863*o)+-688150.202*Math.sin(21863*o)+927506.794*Math.cos(32004*o)+1017265.516*Math.sin(32004*o)+-119678.29599999999*Math.cos(10931*o)+807828.498*Math.sin(10931*o)+478713.18399999995*Math.cos(14529*o)+209437.01799999998*Math.sin(14529*o)+-613351.267*Math.cos(16368*o)+359034.888*Math.sin(16368*o)+284235.953*Math.cos(15318*o)+-418874.03599999996*Math.sin(15318*o)+-164557.657*Math.cos(32794*o)+329115.314*Math.sin(32794*o),s=Yze+Xze*i+-325e-7*Math.cos(10*o)+-105e-7*Math.sin(10*o)+-322e-7*Math.cos(16002*o)+-137e-7*Math.sin(16002*o)+-7899999999999999e-21*Math.cos(21863*o)+258e-7*Math.sin(21863*o)+23199999999999998e-21*Math.cos(10931*o)+35e-7*Math.sin(10931*o)+-5199999999999999e-21*Math.cos(1473*o)+-11599999999999999e-21*Math.sin(1473*o)+97e-7*Math.cos(32004*o)+-88e-7*Math.sin(32004*o)+55e-7*Math.cos(4387*o)+-112e-7*Math.sin(4387*o)+-41e-7*Math.cos(73*o)+-8e-6*Math.sin(73*o);return wZ(r,.0167086342-.0004203654*i,469.97289*al*i,102.93734808*Kl+11612.3529*al*i,174.87317577*Kl-8679.27034*al*i,s,t)}(e,sC),t=f.negate(sC,t),function IVe(e,t){t=GZ(e,t),f.multiplyByScalar(t,-.01215058143522694,t)}(e,sC),f.subtract(t,sC,t),ne.multiplyByVector(WZ,t,t),t},qF.computeMoonPositionInEarthInertialFrame=function(e,t){return c(e)||(e=se.now()),t=GZ(e,t),ne.multiplyByVector(WZ,t,t),t};const YF=qF,PVe=new f;function cl(e){const t=(e=g(e,g.EMPTY_OBJECT)).minimum,n=e.maximum;if(T.typeOf.object("min",t),T.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===Yn.TOP)throw new E("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");const i=g(e.vertexFormat,et.DEFAULT);this._minimum=f.clone(t),this._maximum=f.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}cl.fromDimensions=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).dimensions;T.typeOf.object("dimensions",t),T.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),T.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),T.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);const n=f.multiplyByScalar(t,.5,new f);return new cl({minimum:f.negate(n,new f),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},cl.fromAxisAlignedBoundingBox=function(e){return T.typeOf.object("boundingBox",e),new cl({minimum:e.minimum,maximum:e.maximum})},cl.packedLength=2*f.packedLength+et.packedLength+1,cl.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),f.pack(e._minimum,t,n),f.pack(e._maximum,t,n+f.packedLength),et.pack(e._vertexFormat,t,n+2*f.packedLength),t[n+2*f.packedLength+et.packedLength]=g(e._offsetAttribute,-1),t};const qZ=new f,YZ=new f,XZ=new et,ZZ={minimum:qZ,maximum:YZ,vertexFormat:XZ,offsetAttribute:void 0};let XF;cl.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=f.unpack(e,t,qZ),o=f.unpack(e,t+f.packedLength,YZ),r=et.unpack(e,t+2*f.packedLength,XZ),s=e[t+2*f.packedLength+et.packedLength];return c(n)?(n._minimum=f.clone(i,n._minimum),n._maximum=f.clone(o,n._maximum),n._vertexFormat=et.clone(r,n._vertexFormat),n._offsetAttribute=-1===s?void 0:s,n):(ZZ.offsetAttribute=-1===s?void 0:s,new cl(ZZ))},cl.createGeometry=function(e){const t=e._minimum,n=e._maximum,i=e._vertexFormat;if(f.equals(t,n))return;const o=new lo;let r,s;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(s=new Float64Array(72),s[0]=t.x,s[1]=t.y,s[2]=n.z,s[3]=n.x,s[4]=t.y,s[5]=n.z,s[6]=n.x,s[7]=n.y,s[8]=n.z,s[9]=t.x,s[10]=n.y,s[11]=n.z,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=n.x,s[16]=t.y,s[17]=t.z,s[18]=n.x,s[19]=n.y,s[20]=t.z,s[21]=t.x,s[22]=n.y,s[23]=t.z,s[24]=n.x,s[25]=t.y,s[26]=t.z,s[27]=n.x,s[28]=n.y,s[29]=t.z,s[30]=n.x,s[31]=n.y,s[32]=n.z,s[33]=n.x,s[34]=t.y,s[35]=n.z,s[36]=t.x,s[37]=t.y,s[38]=t.z,s[39]=t.x,s[40]=n.y,s[41]=t.z,s[42]=t.x,s[43]=n.y,s[44]=n.z,s[45]=t.x,s[46]=t.y,s[47]=n.z,s[48]=t.x,s[49]=n.y,s[50]=t.z,s[51]=n.x,s[52]=n.y,s[53]=t.z,s[54]=n.x,s[55]=n.y,s[56]=n.z,s[57]=t.x,s[58]=n.y,s[59]=n.z,s[60]=t.x,s[61]=t.y,s[62]=t.z,s[63]=n.x,s[64]=t.y,s[65]=t.z,s[66]=n.x,s[67]=t.y,s[68]=n.z,s[69]=t.x,s[70]=t.y,s[71]=n.z,o.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:s})),i.normal){const u=new Float32Array(72);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=1,u[9]=0,u[10]=0,u[11]=1,u[12]=0,u[13]=0,u[14]=-1,u[15]=0,u[16]=0,u[17]=-1,u[18]=0,u[19]=0,u[20]=-1,u[21]=0,u[22]=0,u[23]=-1,u[24]=1,u[25]=0,u[26]=0,u[27]=1,u[28]=0,u[29]=0,u[30]=1,u[31]=0,u[32]=0,u[33]=1,u[34]=0,u[35]=0,u[36]=-1,u[37]=0,u[38]=0,u[39]=-1,u[40]=0,u[41]=0,u[42]=-1,u[43]=0,u[44]=0,u[45]=-1,u[46]=0,u[47]=0,u[48]=0,u[49]=1,u[50]=0,u[51]=0,u[52]=1,u[53]=0,u[54]=0,u[55]=1,u[56]=0,u[57]=0,u[58]=1,u[59]=0,u[60]=0,u[61]=-1,u[62]=0,u[63]=0,u[64]=-1,u[65]=0,u[66]=0,u[67]=-1,u[68]=0,u[69]=0,u[70]=-1,u[71]=0,o.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:u})}if(i.st){const u=new Float32Array(48);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=1,u[5]=1,u[6]=0,u[7]=1,u[8]=1,u[9]=0,u[10]=0,u[11]=0,u[12]=0,u[13]=1,u[14]=1,u[15]=1,u[16]=0,u[17]=0,u[18]=1,u[19]=0,u[20]=1,u[21]=1,u[22]=0,u[23]=1,u[24]=1,u[25]=0,u[26]=0,u[27]=0,u[28]=0,u[29]=1,u[30]=1,u[31]=1,u[32]=1,u[33]=0,u[34]=0,u[35]=0,u[36]=0,u[37]=1,u[38]=1,u[39]=1,u[40]=0,u[41]=0,u[42]=1,u[43]=0,u[44]=1,u[45]=1,u[46]=0,u[47]=1,o.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:u})}if(i.tangent){const u=new Float32Array(72);u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u[6]=1,u[7]=0,u[8]=0,u[9]=1,u[10]=0,u[11]=0,u[12]=-1,u[13]=0,u[14]=0,u[15]=-1,u[16]=0,u[17]=0,u[18]=-1,u[19]=0,u[20]=0,u[21]=-1,u[22]=0,u[23]=0,u[24]=0,u[25]=1,u[26]=0,u[27]=0,u[28]=1,u[29]=0,u[30]=0,u[31]=1,u[32]=0,u[33]=0,u[34]=1,u[35]=0,u[36]=0,u[37]=-1,u[38]=0,u[39]=0,u[40]=-1,u[41]=0,u[42]=0,u[43]=-1,u[44]=0,u[45]=0,u[46]=-1,u[47]=0,u[48]=-1,u[49]=0,u[50]=0,u[51]=-1,u[52]=0,u[53]=0,u[54]=-1,u[55]=0,u[56]=0,u[57]=-1,u[58]=0,u[59]=0,u[60]=1,u[61]=0,u[62]=0,u[63]=1,u[64]=0,u[65]=0,u[66]=1,u[67]=0,u[68]=0,u[69]=1,u[70]=0,u[71]=0,o.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:u})}if(i.bitangent){const u=new Float32Array(72);u[0]=0,u[1]=1,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=1,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=1,u[14]=0,u[15]=0,u[16]=1,u[17]=0,u[18]=0,u[19]=1,u[20]=0,u[21]=0,u[22]=1,u[23]=0,u[24]=0,u[25]=0,u[26]=1,u[27]=0,u[28]=0,u[29]=1,u[30]=0,u[31]=0,u[32]=1,u[33]=0,u[34]=0,u[35]=1,u[36]=0,u[37]=0,u[38]=1,u[39]=0,u[40]=0,u[41]=1,u[42]=0,u[43]=0,u[44]=1,u[45]=0,u[46]=0,u[47]=1,u[48]=0,u[49]=0,u[50]=1,u[51]=0,u[52]=0,u[53]=1,u[54]=0,u[55]=0,u[56]=1,u[57]=0,u[58]=0,u[59]=1,u[60]=0,u[61]=0,u[62]=1,u[63]=0,u[64]=0,u[65]=1,u[66]=0,u[67]=0,u[68]=1,u[69]=0,u[70]=0,u[71]=1,o.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:u})}r=new Uint16Array(36),r[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else s=new Float64Array(24),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=n.x,s[4]=t.y,s[5]=t.z,s[6]=n.x,s[7]=n.y,s[8]=t.z,s[9]=t.x,s[10]=n.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=n.z,s[15]=n.x,s[16]=t.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=t.x,s[22]=n.y,s[23]=n.z,o.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:s}),r=new Uint16Array(36),r[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;const a=f.subtract(n,t,PVe),l=.5*f.magnitude(a);if(c(e._offsetAttribute)){const d=e._offsetAttribute===Yn.NONE?0:1,h=new Uint8Array(s.length/3).fill(d);o.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new Cn({attributes:o,indices:r,primitiveType:At.TRIANGLES,boundingSphere:new be(f.ZERO,l),offsetAttribute:e._offsetAttribute})},cl.getUnitBox=function(){return c(XF)||(XF=cl.createGeometry(cl.fromDimensions({dimensions:new f(1,1,1),vertexFormat:et.POSITION_ONLY}))),XF};const Tg=cl,$Z="uniform vec3 u_radii;\nuniform vec3 u_oneOverEllipsoidRadiiSquared;\n\nin vec3 v_positionEC;\n\nvec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n{\n vec3 positionEC = czm_pointAlongRay(ray, intersection);\n vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;\n vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));\n vec3 sphericalNormal = normalize(positionMC / u_radii);\n vec3 normalMC = geodeticNormal * side; // normalized surface normal (always facing the viewer) in model coordinates\n vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordinates\n\n vec2 st = czm_ellipsoidWgs84TextureCoordinates(sphericalNormal);\n vec3 positionToEyeEC = -positionEC;\n\n czm_materialInput materialInput;\n materialInput.s = st.s;\n materialInput.st = st;\n materialInput.str = (positionMC + u_radii) / u_radii;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef ONLY_SUN_LIGHTING\n return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);\n#else\n return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n\nvoid main()\n{\n // PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii\n // in the vertex shader. Only when it is larger than some constant, march along the ray.\n // Otherwise perform one intersection test which will be the common case.\n\n // Test if the ray intersects a sphere with the ellipsoid's maximum radius.\n // For very oblate ellipsoids, using the ellipsoid's radii for an intersection test\n // may cause false negatives. This will discard fragments before marching the ray forward.\n float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;\n vec3 direction = normalize(v_positionEC);\n vec3 ellipsoidCenter = czm_modelView[3].xyz;\n\n float t1 = -1.0;\n float t2 = -1.0;\n\n float b = -2.0 * dot(direction, ellipsoidCenter);\n float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;\n\n float discriminant = b * b - 4.0 * c;\n if (discriminant >= 0.0) {\n t1 = (-b - sqrt(discriminant)) * 0.5;\n t2 = (-b + sqrt(discriminant)) * 0.5;\n }\n\n if (t1 < 0.0 && t2 < 0.0) {\n discard;\n }\n\n float t = min(t1, t2);\n if (t < 0.0) {\n t = 0.0;\n }\n\n // March ray forward to intersection with larger sphere and find\n czm_ray ray = czm_ray(t * direction, direction);\n\n vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);\n\n if (czm_isEmpty(intersection))\n {\n discard;\n }\n\n // If the viewer is outside, compute outsideFaceColor, with normals facing outward.\n vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\n\n // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.\n vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\n\n out_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\n out_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n\n#if (defined(WRITE_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))\n t = (intersection.start != 0.0) ? intersection.start : intersection.stop;\n vec3 positionEC = czm_pointAlongRay(ray, t);\n vec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n#ifdef LOG_DEPTH\n czm_writeLogDepth(1.0 + positionCC.w);\n#else\n float z = positionCC.z / positionCC.w;\n\n float n = czm_depthRange.near;\n float f = czm_depthRange.far;\n\n gl_FragDepth = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n}\n",KZ="in vec3 position;\n\nuniform vec3 u_radii;\n\nout vec3 v_positionEC;\n\nvoid main()\n{\n // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.\n // Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry,\n // but doing it here allows us to change the radii without rewriting the vertex data, and\n // allows all ellipsoids to reuse the same vertex data.\n vec4 p = vec4(u_radii * position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n gl_Position = czm_modelViewProjection * p; // position in clip coordinates\n\n // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums\n // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the\n // ellipsoid (does not write depth) that was rendered in the farther frustum.\n //\n // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates\n // artifacts since some fragments can be alpha blended twice. This is solved by only rendering\n // the ellipsoid in the closest frustum to the viewer.\n gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\n\n czm_vertexLogDepth();\n}\n",ZF={position:0};function UD(e){e=g(e,g.EMPTY_OBJECT),this.center=f.clone(g(e.center,f.ZERO)),this._center=new f,this.radii=f.clone(e.radii),this._radii=new f,this._oneOverEllipsoidRadiiSquared=new f,this._boundingSphere=new be,this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this._modelMatrix=new k,this._computedModelMatrix=new k,this.show=g(e.show,!0),this.material=g(e.material,Ea.fromType(Ea.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.onlySunLighting=g(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=g(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 Zt({owner:g(e._owner,this)}),this._pickCommand=new Zt({owner:g(e._owner,this),pickOnly:!0});const 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}}}UD.prototype.update=function(e){if(!this.show||e.mode!==ce.SCENE3D||!c(this.center)||!c(this.radii))return;if(!c(this.material))throw new E("this.material must be defined.");const t=e.context,n=this.material.isTranslucent(),i=this._translucent!==n;(!c(this._rs)||i)&&(this._translucent=n,this._rs=Pt.fromCache({cull:{enabled:!0,face:dr.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!n&&t.fragmentDepth,blending:n?Ji.ALPHA_BLEND:void 0})),c(this._va)||(this._va=function OVe(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(c(t))return t;const n=Tg.createGeometry(Tg.fromDimensions({dimensions:new f(2,2,2),vertexFormat:et.POSITION_ONLY}));return t=ds.fromGeometry({context:e,geometry:n,attributeLocations:ZF,bufferUsage:Tt.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}(t));let o=!1;const r=this.radii;if(!f.equals(this._radii,r)){f.clone(r,this._radii);const y=this._oneOverEllipsoidRadiiSquared;y.x=1/(r.x*r.x),y.y=1/(r.y*r.y),y.z=1/(r.z*r.z),o=!0}(!k.equals(this.modelMatrix,this._modelMatrix)||!f.equals(this.center,this._center))&&(k.clone(this.modelMatrix,this._modelMatrix),f.clone(this.center,this._center),k.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(f.clone(f.ZERO,this._boundingSphere.center),this._boundingSphere.radius=f.maximumComponent(r),be.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));const s=this._material!==this.material;this._material=this.material,this._material.update(t);const a=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;const l=e.useLogDepth,u=this._useLogDepth!==l;this._useLogDepth=l;const d=this._colorCommand;let h,m;(s||a||i||u)&&(h=new Et({sources:[KZ]}),m=new Et({sources:[this.material.shaderSource,$Z]}),this.onlySunLighting&&m.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&m.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),m.defines.push("LOG_DEPTH")),this._sp=mi.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:m,attributeLocations:ZF}),d.vertexArray=this._va,d.renderState=this._rs,d.shaderProgram=this._sp,d.uniformMap=Gn(this._uniforms,this.material._uniforms),d.executeInClosestFrustum=n);const _=e.commandList,p=e.passes;if(p.render&&(d.boundingVolume=this._boundingSphere,d.debugShowBoundingVolume=this.debugShowBoundingVolume,d.modelMatrix=this._computedModelMatrix,d.pass=n?ze.TRANSLUCENT:ze.OPAQUE,_.push(d)),p.pick){const y=this._pickCommand;(!c(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||!c(this._pickSP)||u)&&(h=new Et({sources:[KZ]}),m=new Et({sources:[this.material.shaderSource,$Z],pickColorQualifier:"uniform"}),this.onlySunLighting&&m.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&m.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),m.defines.push("LOG_DEPTH")),this._pickSP=mi.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:m,attributeLocations:ZF}),y.vertexArray=this._va,y.renderState=this._rs,y.shaderProgram=this._pickSP,y.uniformMap=Gn(Gn(this._uniforms,this._pickUniforms),this.material._uniforms),y.executeInClosestFrustum=n),y.boundingVolume=this._boundingSphere,y.modelMatrix=this._computedModelMatrix,y.pass=n?ze.TRANSLUCENT:ze.OPAQUE,_.push(y)}},UD.prototype.isDestroyed=function(){return!1},UD.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(),Ye(this)};const LVe=UD;function aC(e){let t=(e=g(e,g.EMPTY_OBJECT)).textureUrl;c(t)||(t=ni("Assets/Textures/moonSmall.jpg")),this.show=g(e.show,!0),this.textureUrl=t,this._ellipsoid=g(e.ellipsoid,ge.MOON),this.onlySunLighting=g(e.onlySunLighting,!0),this._ellipsoidPrimitive=new LVe({radii:this.ellipsoid.radii,material:Ea.fromType(Ea.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new Mze}Object.defineProperties(aC.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});const zD=new ne,RVe=new ne,NVe=new f,VD=[];aC.prototype.update=function(e){if(!this.show)return;const t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;const n=e.time;c(Rn.computeIcrfToFixedMatrix(n,zD))||Rn.computeTemeToPseudoFixedMatrix(n,zD);const i=this._axes.evaluate(n,RVe);ne.transpose(i,i),ne.multiply(zD,i,i);const o=YF.computeMoonPositionInEarthInertialFrame(n,NVe);ne.multiplyByVector(zD,o,o),k.fromRotationTranslation(i,o,t.modelMatrix);const r=e.commandList;return e.commandList=VD,VD.length=0,t.update(e),e.commandList=r,1===VD.length?VD[0]:void 0},aC.prototype.isDestroyed=function(){return!1},aC.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),Ye(this)};const MVe=aC,FVe=new f,BVe=new f,kVe=new f,UVe=new f,zVe=new f,VVe=new f(1,1,1),QZ=Math.cos,JZ=Math.sin;function Fh(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.radii,VVe),n=g(e.innerRadii,t),i=g(e.minimumClock,0),o=g(e.maximumClock,O.TWO_PI),r=g(e.minimumCone,0),s=g(e.maximumCone,O.PI),a=Math.round(g(e.stackPartitions,64)),l=Math.round(g(e.slicePartitions,64)),u=g(e.vertexFormat,et.DEFAULT);if(l<3)throw new E("options.slicePartitions cannot be less than three.");if(a<3)throw new E("options.stackPartitions cannot be less than three.");this._radii=f.clone(t),this._innerRadii=f.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=l,this._vertexFormat=et.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}Fh.packedLength=2*f.packedLength+et.packedLength+7,Fh.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),f.pack(e._radii,t,n),f.pack(e._innerRadii,t,n+=f.packedLength),et.pack(e._vertexFormat,t,n+=f.packedLength),n+=et.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=g(e._offsetAttribute,-1),t};const e$=new f,t$=new f,n$=new et,ym={radii:e$,innerRadii:t$,vertexFormat:n$,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};let $F;Fh.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);const i=f.unpack(e,t,e$),o=f.unpack(e,t+=f.packedLength,t$),r=et.unpack(e,t+=f.packedLength,n$);t+=et.packedLength;const s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t++],m=e[t];return c(n)?(n._radii=f.clone(i,n._radii),n._innerRadii=f.clone(o,n._innerRadii),n._vertexFormat=et.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=l,n._maximumCone=u,n._stackPartitions=d,n._slicePartitions=h,n._offsetAttribute=-1===m?void 0:m,n):(ym.minimumClock=s,ym.maximumClock=a,ym.minimumCone=l,ym.maximumCone=u,ym.stackPartitions=d,ym.slicePartitions=h,ym.offsetAttribute=-1===m?void 0:m,new Fh(ym))},Fh.createGeometry=function(e){const t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;const n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;const i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._vertexFormat;let l=e._slicePartitions+1,u=e._stackPartitions+1;l=Math.round(l*Math.abs(o-i)/O.TWO_PI),u=Math.round(u*Math.abs(s-r)/O.PI),l<2&&(l=2),u<2&&(u=2);let d,h,m=0;const _=[r],p=[i];for(d=0;d<u;d++)_.push(r+d*(s-r)/(u-1));for(_.push(s),h=0;h<l;h++)p.push(i+h*(o-i)/(l-1));p.push(o);const y=_.length,A=p.length;let x=0,C=1;const w=n.x!==t.x||n.y!==t.y||n.z!==t.z;let v=!1,D=!1,P=!1;w&&(C=2,r>0&&(v=!0,x+=l-1),s<Math.PI&&(D=!0,x+=l-1),(o-i)%O.TWO_PI?(P=!0,x+=2*(u-1)+1):x+=1);const N=A*y*C,R=new Float64Array(3*N),B=new Array(N).fill(!1),F=new Array(N).fill(!1),S=l*u*C,L=Ot.createTypedArray(S,6*(S+x+1-(l+u)*C)),M=a.normal?new Float32Array(3*N):void 0,U=a.tangent?new Float32Array(3*N):void 0,z=a.bitangent?new Float32Array(3*N):void 0,j=a.st?new Float32Array(2*N):void 0,W=new Array(y),q=new Array(y);for(d=0;d<y;d++)W[d]=JZ(_[d]),q[d]=QZ(_[d]);const V=new Array(A),$=new Array(A);for(h=0;h<A;h++)$[h]=QZ(p[h]),V[h]=JZ(p[h]);for(d=0;d<y;d++)for(h=0;h<A;h++)R[m++]=t.x*W[d]*$[h],R[m++]=t.y*W[d]*V[h],R[m++]=t.z*q[d];let ie,Y,Q,K,Z=N/2;if(w)for(d=0;d<y;d++)for(h=0;h<A;h++)R[m++]=n.x*W[d]*$[h],R[m++]=n.y*W[d]*V[h],R[m++]=n.z*q[d],B[Z]=!0,d>0&&d!==y-1&&0!==h&&h!==A-1&&(F[Z]=!0),Z++;for(m=0,d=1;d<y-2;d++)for(ie=d*A,Y=(d+1)*A,h=1;h<A-2;h++)L[m++]=Y+h,L[m++]=Y+h+1,L[m++]=ie+h+1,L[m++]=Y+h,L[m++]=ie+h+1,L[m++]=ie+h;if(w){const kt=y*A;for(d=1;d<y-2;d++)for(ie=kt+d*A,Y=kt+(d+1)*A,h=1;h<A-2;h++)L[m++]=Y+h,L[m++]=ie+h,L[m++]=ie+h+1,L[m++]=Y+h,L[m++]=ie+h+1,L[m++]=Y+h+1}if(w){if(v)for(K=y*A,d=1;d<A-2;d++)L[m++]=d,L[m++]=d+1,L[m++]=K+d+1,L[m++]=d,L[m++]=K+d+1,L[m++]=K+d;if(D)for(Q=y*A-A,K=y*A*C-A,d=1;d<A-2;d++)L[m++]=Q+d+1,L[m++]=Q+d,L[m++]=K+d,L[m++]=Q+d+1,L[m++]=K+d,L[m++]=K+d+1}if(P){for(d=1;d<y-2;d++)K=A*y+A*d,Q=A*d,L[m++]=K,L[m++]=Q+A,L[m++]=Q,L[m++]=K,L[m++]=K+A,L[m++]=Q+A;for(d=1;d<y-2;d++)K=A*y+A*(d+1)-1,Q=A*(d+1)-1,L[m++]=Q+A,L[m++]=K,L[m++]=Q,L[m++]=Q+A,L[m++]=K+A,L[m++]=K}const me=new lo;a.position&&(me.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:R}));let we=0,le=0,Ae=0,xe=0;const De=N/2;let qe;const $e=ge.fromCartesian3(t),ot=ge.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(d=0;d<N;d++){qe=B[d]?ot:$e;const kt=f.fromArray(R,3*d,FVe),sn=qe.geodeticSurfaceNormal(kt,BVe);if(F[d]&&f.negate(sn,sn),a.st){const wn=G.negate(sn,zVe);j[we++]=Math.atan2(wn.y,wn.x)/O.TWO_PI+.5,j[we++]=Math.asin(sn.z)/Math.PI+.5}if(a.normal&&(M[le++]=sn.x,M[le++]=sn.y,M[le++]=sn.z),a.tangent||a.bitangent){const wn=kVe;let On,Lt=0;if(B[d]&&(Lt=De),On=!v&&d>=Lt&&d<Lt+2*A?f.UNIT_X:f.UNIT_Z,f.cross(On,sn,wn),f.normalize(wn,wn),a.tangent&&(U[Ae++]=wn.x,U[Ae++]=wn.y,U[Ae++]=wn.z),a.bitangent){const ii=f.cross(sn,wn,UVe);f.normalize(ii,ii),z[xe++]=ii.x,z[xe++]=ii.y,z[xe++]=ii.z}}}a.st&&(me.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:j})),a.normal&&(me.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:M})),a.tangent&&(me.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:U})),a.bitangent&&(me.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:z}))}if(c(e._offsetAttribute)){const sn=e._offsetAttribute===Yn.NONE?0:1,wn=new Uint8Array(R.length/3).fill(sn);me.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:wn})}return new Cn({attributes:me,indices:L,primitiveType:At.TRIANGLES,boundingSphere:be.fromEllipsoid($e),offsetAttribute:e._offsetAttribute})},Fh.getUnitEllipsoid=function(){return c($F)||($F=Fh.createGeometry(new Fh({radii:new f(1,1,1),vertexFormat:et.POSITION_ONLY}))),$F};const cC=Fh,KF=[],QF=[];function JF(e,t,n,i,o){if(i>=o)return;const r=Math.floor(.5*(i+o));JF(e,t,n,i,r),JF(e,t,n,r+1,o),function HVe(e,t,n,i,o,r){const s=o-i+1,a=r-o,l=KF,u=QF;let d,h;for(d=0;d<s;++d)l[d]=e[i+d];for(h=0;h<a;++h)u[h]=e[o+h+1];d=0,h=0;for(let m=i;m<=r;++m){const _=l[d],p=u[h];d<s&&(h>=a||t(_,p,n)<=0)?(e[m]=_,++d):h<a&&(e[m]=p,++h)}}(e,t,n,i,r,o)}const eB=function GVe(e,t,n){if(!c(e))throw new E("array is required.");if(!c(t))throw new E("comparator is required.");const i=e.length,o=Math.ceil(.5*i);KF.length=o,QF.length=o,JF(e,t,n,0,i-1),KF.length=0,QF.length=0};function Oa(e,t){if(!c(e))throw new E("occluderBoundingSphere is required.");if(!c(t))throw new E("camera position is required.");this._occluderPosition=f.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}const HD=new f;Object.defineProperties(Oa.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){if(!c(e))throw new E("cameraPosition is required.");e=f.clone(e,this._cameraPosition);const t=f.subtract(this._occluderPosition,e,HD);let n=f.magnitudeSquared(t);const i=this._occluderRadius*this._occluderRadius;let o,r,s;n>i?(o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=f.multiplyByScalar(t,n,HD),s=f.add(e,f.multiplyByScalar(r,o*o*n,HD),HD)):o=Number.MAX_VALUE,this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}}),Oa.fromBoundingSphere=function(e,t,n){if(!c(e))throw new E("occluderBoundingSphere is required.");if(!c(t))throw new E("camera position is required.");return c(n)?(f.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new Oa(e,t)};const i$=new f;Oa.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=f.subtract(e,this._occluderPosition,i$),n=this._occluderRadius;if(n=f.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=f.subtract(e,this._cameraPosition,t),n*n>f.magnitudeSquared(t)}return!1};const jVe=new f;Oa.prototype.isBoundingSphereVisible=function(e){const t=f.clone(e.center,jVe),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=f.subtract(t,this._occluderPosition,i$),o=this._occluderRadius-n;if(o=f.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0&&(o=Math.sqrt(o)+this._horizonDistance,i=f.subtract(t,this._cameraPosition,i),o*o+n*n>f.magnitudeSquared(i));if(o>0){i=f.subtract(t,this._cameraPosition,i);const r=f.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>r*s||(o=Math.sqrt(o)+this._horizonDistance,o*o+a>r)}return!0}return!1};const WVe=new f;Oa.prototype.computeVisibility=function(e){if(!c(e))throw new E("occludeeBS is required.");const t=f.clone(e.center),n=e.radius;if(n>this._occluderRadius)return ys.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=f.subtract(t,this._occluderPosition,WVe),o=this._occluderRadius-n;const r=f.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=f.subtract(t,this._cameraPosition,i);const s=f.magnitudeSquared(i);return o*o+n*n<s?ys.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,s<o*o+n*n?ys.FULL:ys.PARTIAL):(i=f.subtract(t,this._horizonPlanePosition,i),f.dot(i,this._horizonPlaneNormal)>-n?ys.PARTIAL:ys.FULL))}}return ys.NONE};const GD=new f;Oa.computeOccludeePoint=function(e,t,n){if(!c(e))throw new E("occluderBoundingSphere is required.");if(!c(n))throw new E("positions is required.");if(0===n.length)throw new E("positions must contain at least one element");const i=f.clone(t),o=f.clone(e.center),r=e.radius,s=n.length;if(f.equals(o,t))throw new E("occludeePosition must be different than occluderBoundingSphere.center");const a=f.normalize(f.subtract(i,o,GD),GD),l=-f.dot(a,o),u=Oa._anyRotationVector(o,a,l);let h,d=Oa._horizonToPlaneNormalDotProduct(e,a,l,u,n[0]);if(d){for(let _=1;_<s;++_){if(h=Oa._horizonToPlaneNormalDotProduct(e,a,l,u,n[_]),!h)return;h<d&&(d=h)}if(!(d<.0017453283658983088))return f.add(o,f.multiplyByScalar(a,r/d,GD),GD)}};const qVe=[];Oa.computeOccludeePointFromRectangle=function(e,t){if(!c(e))throw new E("rectangle is required.");t=g(t,ge.WGS84);const n=Ce.subsample(e,t,0,qVe),i=be.fromPoints(n),o=f.ZERO;if(!f.equals(o,i.center))return Oa.computeOccludeePoint(new be(o,t.minimumRadius),i.center,n)};const YVe=new f;Oa._anyRotationVector=function(e,t,n){const i=f.abs(t,YVe);let o=i.x>i.y?0:1;(0===o&&i.z>i.x||1===o&&i.z>i.y)&&(o=2);const r=new f;let s;0===o?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=f.UNIT_X):1===o?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=f.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=f.UNIT_Z);const a=(f.dot(t,i)+n)/-f.dot(t,s);return f.normalize(f.subtract(f.add(i,f.multiplyByScalar(s,a,r),i),e,i),i)};const XVe=new f;Oa._rotationVector=function(e,t,n,i,o){let r=f.subtract(i,e,XVe);if(r=f.normalize(r,r),f.dot(t,r)<.9999999847691291){const s=f.cross(t,r,r);if(f.magnitude(s)>O.EPSILON13)return f.normalize(s,new f)}return o};const tB=new f,ZVe=new f,jD=new f,o$=new f;Oa._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){const r=f.clone(o,tB),s=f.clone(e.center,ZVe),a=e.radius;let l=f.subtract(s,r,jD);const u=f.magnitudeSquared(l),d=a*a;if(u<d)return!1;const h=u-d,m=Math.sqrt(h),A=m*(1/Math.sqrt(u))*m;l=f.normalize(l,l);const x=f.add(r,f.multiplyByScalar(l,A,o$),o$),C=Math.sqrt(h-A*A);let w=this._rotationVector(s,t,n,r,i),v=f.fromElements(w.x*w.x*l.x+(w.x*w.y-w.z)*l.y+(w.x*w.z+w.y)*l.z,(w.x*w.y+w.z)*l.x+w.y*w.y*l.y+(w.y*w.z-w.x)*l.z,(w.x*w.z-w.y)*l.x+(w.y*w.z+w.x)*l.y+w.z*w.z*l.z,tB);v=f.normalize(v,v);const D=f.multiplyByScalar(v,C,tB);w=f.normalize(f.subtract(f.add(x,D,jD),s,jD),jD);const P=f.dot(t,w);w=f.normalize(f.subtract(f.subtract(x,D,w),s,w),w);const N=f.dot(t,w);return P<N?P:N};const $Ve=Oa;function of(e){e=g(e,g.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=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far,this._cullingVolume=new Tu,this._perspectiveMatrix=new k,this._infinitePerspective=new k}function nB(e){if(!(c(e.right)&&c(e.left)&&c(e.top)&&c(e.bottom)&&c(e.near)&&c(e.far)))throw new E("right, left, top, bottom, near, or far parameters are not set.");const t=e.top,n=e.bottom,i=e.right,o=e.left,r=e.near,s=e.far;if(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||s!==e._far){if(e.near<=0||e.near>e.far)throw new E("near must be greater than zero and less than far.");e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=s,e._perspectiveMatrix=k.computePerspectiveOffCenter(o,i,n,t,r,s,e._perspectiveMatrix),e._infinitePerspective=k.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective)}}Object.defineProperties(of.prototype,{projectionMatrix:{get:function(){return nB(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return nB(this),this._infinitePerspective}}});const KVe=new f,QVe=new f,JVe=new f,e4e=new f;of.prototype.computeCullingVolume=function(e,t,n){if(!c(e))throw new E("position is required.");if(!c(t))throw new E("direction is required.");if(!c(n))throw new E("up is required.");const i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,l=this.near,u=this.far,d=f.cross(t,n,KVe),h=QVe;f.multiplyByScalar(t,l,h),f.add(e,h,h);const m=JVe;f.multiplyByScalar(t,u,m),f.add(e,m,m);const _=e4e;f.multiplyByScalar(d,a,_),f.add(h,_,_),f.subtract(_,e,_),f.normalize(_,_),f.cross(_,n,_),f.normalize(_,_);let p=i[0];return c(p)||(p=i[0]=new fe),p.x=_.x,p.y=_.y,p.z=_.z,p.w=-f.dot(_,e),f.multiplyByScalar(d,s,_),f.add(h,_,_),f.subtract(_,e,_),f.cross(n,_,_),f.normalize(_,_),p=i[1],c(p)||(p=i[1]=new fe),p.x=_.x,p.y=_.y,p.z=_.z,p.w=-f.dot(_,e),f.multiplyByScalar(n,r,_),f.add(h,_,_),f.subtract(_,e,_),f.cross(d,_,_),f.normalize(_,_),p=i[2],c(p)||(p=i[2]=new fe),p.x=_.x,p.y=_.y,p.z=_.z,p.w=-f.dot(_,e),f.multiplyByScalar(n,o,_),f.add(h,_,_),f.subtract(_,e,_),f.cross(_,d,_),f.normalize(_,_),p=i[3],c(p)||(p=i[3]=new fe),p.x=_.x,p.y=_.y,p.z=_.z,p.w=-f.dot(_,e),p=i[4],c(p)||(p=i[4]=new fe),p.x=t.x,p.y=t.y,p.z=t.z,p.w=-f.dot(t,h),f.negate(t,_),p=i[5],c(p)||(p=i[5]=new fe),p.x=_.x,p.y=_.y,p.z=_.z,p.w=-f.dot(_,m),this._cullingVolume},of.prototype.getPixelDimensions=function(e,t,n,i,o){if(nB(this),!c(e)||!c(t))throw new E("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new E("drawingBufferWidth must be greater than zero.");if(t<=0)throw new E("drawingBufferHeight must be greater than zero.");if(!c(n))throw new E("distance is required.");if(!c(i))throw new E("pixelRatio is required");if(i<=0)throw new E("pixelRatio must be greater than zero.");if(!c(o))throw new E("A result object is required.");const r=1/this.near;let s=this.top*r;const a=2*i*n*s/t;return s=this.right*r,o.x=2*i*n*s/e,o.y=a,o},of.prototype.clone=function(e){return c(e)||(e=new of),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},of.prototype.equals=function(e){return c(e)&&e instanceof of&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},of.prototype.equalsEpsilon=function(e,t,n){return e===this||c(e)&&e instanceof of&&O.equalsEpsilon(this.right,e.right,t,n)&&O.equalsEpsilon(this.left,e.left,t,n)&&O.equalsEpsilon(this.top,e.top,t,n)&&O.equalsEpsilon(this.bottom,e.bottom,t,n)&&O.equalsEpsilon(this.near,e.near,t,n)&&O.equalsEpsilon(this.far,e.far,t,n)};const xg=of;function Lc(e){e=g(e,g.EMPTY_OBJECT),this._offCenterFrustum=new xg,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=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far,this.xOffset=g(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=g(e.yOffset,0),this._yOffset=this.yOffset}function td(e){if(!(c(e.fov)&&c(e.aspectRatio)&&c(e.near)&&c(e.far)))throw new E("fov, aspectRatio, near, or far parameters are not set.");const 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 E("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new E("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new E("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:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),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}}Lc.packedLength=6,Lc.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(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},Lc.unpack=function(e,t,n){return T.defined("array",e),t=g(t,0),c(n)||(n=new Lc),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},Object.defineProperties(Lc.prototype,{projectionMatrix:{get:function(){return td(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return td(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return td(this),this._fovy}},sseDenominator:{get:function(){return td(this),this._sseDenominator}},offCenterFrustum:{get:function(){return td(this),this._offCenterFrustum}}}),Lc.prototype.computeCullingVolume=function(e,t,n){return td(this),this._offCenterFrustum.computeCullingVolume(e,t,n)},Lc.prototype.getPixelDimensions=function(e,t,n,i,o){return td(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)},Lc.prototype.clone=function(e){return c(e)||(e=new Lc),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},Lc.prototype.equals=function(e){return!!(c(e)&&e instanceof Lc)&&(td(this),td(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},Lc.prototype.equalsEpsilon=function(e,t,n){return!!(c(e)&&e instanceof Lc)&&(td(this),td(e),O.equalsEpsilon(this.fov,e.fov,t,n)&&O.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};const Po=Lc,r$="in vec4 position;\nin vec2 textureCoordinates;\n\nout vec2 v_textureCoordinates;\n\nvoid main() \n{\n gl_Position = position;\n v_textureCoordinates = textureCoordinates;\n}\n";function WD(e){this._context=e}let lC;const t4e=new Zt({primitiveType:At.TRIANGLES}),n4e=new cr({color:new X(0,0,0,0)});WD.prototype.execute=function(e){if(T.defined("computeCommand",e),c(e.preExecute)&&e.preExecute(e),!c(e.fragmentShaderSource)&&!c(e.shaderProgram))throw new E("computeCommand.fragmentShaderSource or computeCommand.shaderProgram is required.");T.defined("computeCommand.outputTexture",e.outputTexture);const t=e.outputTexture,n=t.width,i=t.height,o=this._context,r=c(e.vertexArray)?e.vertexArray:o.getViewportQuadVertexArray(),s=c(e.shaderProgram)?e.shaderProgram:function o4e(e,t){return mi.fromCache({context:e,vertexShaderSource:r$,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}(o,e.fragmentShaderSource),a=function i4e(e,t){return new Kf({context:e,colorTextures:[t],destroyAttachments:!1})}(o,t),l=function r4e(e,t){return(!c(lC)||lC.viewport.width!==e||lC.viewport.height!==t)&&(lC=Pt.fromCache({viewport:new Vt(0,0,e,t)})),lC}(n,i),u=e.uniformMap,d=n4e;d.framebuffer=a,d.renderState=l,d.execute(o);const h=t4e;h.vertexArray=r,h.renderState=l,h.shaderProgram=s,h.uniformMap=u,h.framebuffer=a,h.execute(o),a.destroy(),e.persists||(s.destroy(),c(e.vertexArray)&&r.destroy()),c(e.postExecute)&&e.postExecute(t)},WD.prototype.isDestroyed=function(){return!1},WD.prototype.destroy=function(){return Ye(this)};const s4e=WD,Cg=function a4e(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0};function nd(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}function iB(e,t){const n=t.derivedKeywords,i=n.length;for(let o=0;o<i;++o)iB(e,e._shaders[n[o]+t.keyword]);delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}Object.defineProperties(nd.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),nd.prototype.replaceShaderProgram=function(e){return c(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)},nd.prototype.getShaderProgram=function(e){let t=e.vertexShaderSource,n=e.fragmentShaderSource;const i=e.attributeLocations;"string"==typeof t&&(t=new Et({sources:[t]})),"string"==typeof n&&(n=new Et({sources:[n]}));const o=t.getCacheKey(),r=n.getCacheKey(),s=c(i)?function c4e(e){const t=Object.keys(e).sort();return JSON.stringify(e,t)}(i):"",a=`${o}:${r}:${s}`;let l;if(c(this._shaders[a]))l=this._shaders[a],delete this._shadersToRelease[a];else{const u=this._context,d=t.createCombinedVertexShader(u),h=n.createCombinedFragmentShader(u),m=new mi({gl:u._gl,logShaderCompilation:u.logShaderCompilation,debugShaders:u.debugShaders,vertexShaderSource:t,vertexShaderText:d,fragmentShaderSource:n,fragmentShaderText:h,attributeLocations:i});l={cache:this,shaderProgram:m,keyword:a,derivedKeywords:[],count:0},m._cachedShader=l,this._shaders[a]=l,++this._numberOfShaders}return++l.count,l.shaderProgram},nd.prototype.replaceDerivedShaderProgram=function(e,t,n){const i=e._cachedShader,r=this._shaders[t+i.keyword];if(c(r)){iB(this,r);const s=i.derivedKeywords.indexOf(t);s>-1&&i.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,n)},nd.prototype.getDerivedShaderProgram=function(e,t){const o=this._shaders[t+e._cachedShader.keyword];if(c(o))return o.shaderProgram},nd.prototype.createDerivedShaderProgram=function(e,t,n){const i=e._cachedShader,o=t+i.keyword;let r=n.vertexShaderSource,s=n.fragmentShaderSource;const a=n.attributeLocations;"string"==typeof r&&(r=new Et({sources:[r]})),"string"==typeof s&&(s=new Et({sources:[s]}));const l=this._context,u=r.createCombinedVertexShader(l),d=s.createCombinedFragmentShader(l),h=new mi({gl:l._gl,logShaderCompilation:l.logShaderCompilation,debugShaders:l.debugShaders,vertexShaderSource:r,vertexShaderText:u,fragmentShaderSource:s,fragmentShaderText:d,attributeLocations:a}),m={cache:this,shaderProgram:h,keyword:o,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),h._cachedShader=m,this._shaders[o]=m,h},nd.prototype.destroyReleasedShaderPrograms=function(){const e=this._shadersToRelease;for(const t in e)e.hasOwnProperty(t)&&(iB(this,e[t]),--this._numberOfShaders);this._shadersToRelease={}},nd.prototype.releaseShaderProgram=function(e){if(c(e)){const t=e._cachedShader;t&&0==--t.count&&(this._shadersToRelease[t.keyword]=t)}},nd.prototype.isDestroyed=function(){return!1},nd.prototype.destroy=function(){const e=this._shaders;for(const t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return Ye(this)};const l4e=nd;function Eg(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}Object.defineProperties(Eg.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}}),Eg.prototype.getTexture=function(e){const t=this._textures[e];if(c(t))return delete this._texturesToRelease[e],++t.count,t.texture},Eg.prototype.addTexture=function(e,t){const n={texture:t,count:1};t.finalDestroy=t.destroy;const i=this;t.destroy=function(){0==--n.count&&(i._texturesToRelease[e]=n)},this._textures[e]=n,++this._numberOfTextures},Eg.prototype.destroyReleasedTextures=function(){const e=this._texturesToRelease;for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];delete this._textures[t],n.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}},Eg.prototype.isDestroyed=function(){return!1},Eg.prototype.destroy=function(){const e=this._textures;for(const t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return Ye(this)};const u4e=Eg,qD=function d4e(e){e=g(e,g.EMPTY_OBJECT),this.color=X.clone(g(e.color,X.WHITE)),this.intensity=g(e.intensity,2)};function _b(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new Vt,this._viewportCartesian4=new fe,this._viewportDirty=!1,this._viewportOrthographicMatrix=k.clone(k.IDENTITY),this._viewportTransformation=k.clone(k.IDENTITY),this._model=k.clone(k.IDENTITY),this._view=k.clone(k.IDENTITY),this._inverseView=k.clone(k.IDENTITY),this._projection=k.clone(k.IDENTITY),this._infiniteProjection=k.clone(k.IDENTITY),this._entireFrustum=new G,this._currentFrustum=new G,this._frustumPlanes=new fe,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=ne.clone(k.IDENTITY),this._view3DDirty=!0,this._view3D=new k,this._inverseView3DDirty=!0,this._inverseView3D=new k,this._inverseModelDirty=!0,this._inverseModel=new k,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new ne,this._viewRotation=new ne,this._inverseViewRotation=new ne,this._viewRotation3D=new ne,this._inverseViewRotation3D=new ne,this._inverseProjectionDirty=!0,this._inverseProjection=new k,this._modelViewDirty=!0,this._modelView=new k,this._modelView3DDirty=!0,this._modelView3D=new k,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new k,this._inverseModelViewDirty=!0,this._inverseModelView=new k,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new k,this._viewProjectionDirty=!0,this._viewProjection=new k,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new k,this._modelViewProjectionDirty=!0,this._modelViewProjection=new k,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new k,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new k,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new k,this._normalDirty=!0,this._normal=new ne,this._normal3DDirty=!0,this._normal3D=new ne,this._inverseNormalDirty=!0,this._inverseNormal=new ne,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new ne,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new Gi,this._cameraPosition=new f,this._sunPositionWC=new f,this._sunPositionColumbusView=new f,this._sunDirectionWC=new f,this._sunDirectionEC=new f,this._moonDirectionEC=new f,this._lightDirectionWC=new f,this._lightDirectionEC=new f,this._lightColor=new f,this._lightColorHdr=new f,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new f,this._cameraRight=new f,this._cameraUp=new f,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new G,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new X,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new G,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._invertClassificationColor=void 0,this._splitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}Object.defineProperties(_b.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!Vt.equals(e,this._viewport)){Vt.clone(e,this._viewport);const 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 s$(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return s$(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){k.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,k.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){const e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,k.getMatrix3(this.inverseModel,e),ne.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return oB(this),this._view3D}},viewRotation:{get:function(){return oB(this),this._viewRotation}},viewRotation3D:{get:function(){return oB(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return l$(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return l$(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return function T4e(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode===ce.SCENE2D||e._mode===ce.MORPHING||e._orthographicIn3D?k.clone(k.ZERO,e._inverseProjection):k.inverse(e._projection,e._inverseProjection))}(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return function x4e(e){e._modelViewDirty&&(e._modelViewDirty=!1,k.multiplyTransformation(e._view,e._model,e._modelView))}(this),this._modelView}},modelView3D:{get:function(){return function C4e(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,k.multiplyTransformation(e.view3D,e._model,e._modelView3D))}(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return function I4e(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;const 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]}}(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return function E4e(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,k.inverse(e.modelView,e._inverseModelView))}(this),this._inverseModelView}},inverseModelView3D:{get:function(){return function w4e(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,k.inverse(e.modelView3D,e._inverseModelView3D))}(this),this._inverseModelView3D}},viewProjection:{get:function(){return function S4e(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,k.multiply(e._projection,e._view,e._viewProjection))}(this),this._viewProjection}},inverseViewProjection:{get:function(){return function v4e(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,k.inverse(e.viewProjection,e._inverseViewProjection))}(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return function D4e(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,k.multiply(e._projection,e.modelView,e._modelViewProjection))}(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return function P4e(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,k.inverse(e.modelViewProjection,e._inverseModelViewProjection))}(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return function O4e(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,k.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return function L4e(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,k.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}(this),this._modelViewInfiniteProjection}},normal:{get:function(){return function R4e(e){if(e._normalDirty){e._normalDirty=!1;const t=e._normal;k.getMatrix3(e.inverseModelView,t),ne.transpose(t,t)}}(this),this._normal}},normal3D:{get:function(){return function N4e(e){if(e._normal3DDirty){e._normal3DDirty=!1;const t=e._normal3D;k.getMatrix3(e.inverseModelView3D,t),ne.transpose(t,t)}}(this),this._normal3D}},inverseNormal:{get:function(){return function M4e(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;const t=e._inverseNormal;k.getMatrix3(e.modelView,t),ne.transpose(t,t)}}(this),this._inverseNormal}},inverseNormal3D:{get:function(){return function F4e(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;const t=e._inverseNormal3D;k.getMatrix3(e.modelView3D,t),ne.transpose(t,t)}}(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}},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 c$(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return c$(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},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 g(this._ellipsoid,ge.WGS84)}}});let uC=new ne;const g4e=new Se;_b.prototype.updateCamera=function(e){(function f4e(e,t){k.clone(t,e._view),k.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})(this,e.viewMatrix),function h4e(e,t){k.clone(t,e._inverseView),k.getMatrix3(t,e._inverseViewRotation)}(this,e.inverseViewMatrix),function _4e(e,t){f.clone(t.positionWC,e._cameraPosition),f.clone(t.directionWC,e._cameraDirection),f.clone(t.rightWC,e._cameraRight),f.clone(t.upWC,e._cameraUp);const n=t.positionCartographic;e._eyeHeight=c(n)?n.height:-e._ellipsoid.maximumRadius,e._encodedCameraPositionMCDirty=!0}(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==ce.SCENE2D&&e.frustum instanceof $n},_b.prototype.updateFrustum=function(e){(function p4e(e,t){k.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0})(this,e.projectionMatrix),c(e.infiniteProjectionMatrix)&&function m4e(e,t){k.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=O.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne;const t=e.offCenterFrustum;c(t)&&(e=t),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right},_b.prototype.updatePass=function(e){this._pass=e};const b4e=[],A4e=new qD;function s$(e){if(e._viewportDirty){const t=e._viewport;k.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),k.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}_b.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;const t=e.camera;this.updateCamera(t),e.mode===ce.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),function y4e(e,t){c(Rn.computeIcrfToFixedMatrix(t.time,uC))||(uC=Rn.computeTemeToPseudoFixedMatrix(t.time,uC));let n=YF.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);ne.multiplyByVector(uC,n,n),f.normalize(n,e._sunDirectionWC),n=ne.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),f.normalize(n,n),n=YF.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),ne.multiplyByVector(uC,n,n),ne.multiplyByVector(e.viewRotation3D,n,n),f.normalize(n,n);const i=t.mapProjection,r=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,g4e);i.project(r,e._sunPositionColumbusView)}(this,e);const n=g(e.light,A4e);n instanceof qD?(this._lightDirectionWC=f.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=f.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=f.normalize(f.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=ne.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));const i=n.color;let o=f.fromElements(i.red,i.green,i.blue,this._lightColorHdr);o=f.multiplyByScalar(o,n.intensity,o);const r=f.maximumComponent(o);r>1?f.divideByScalar(o,r,this._lightColor):f.clone(o,this._lightColor);const s=e.brdfLutGenerator,a=c(s)?s.colorTexture:void 0;this._brdfLut=a,this._environmentMap=g(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=g(e.sphericalHarmonicCoefficients,b4e),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,c(this._specularEnvironmentMaps)&&G.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=Rn.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;const l=t.frustum.fov,u=this._viewport;let d;d=c(l)?u.height>u.width?2*Math.tan(.5*l)/u.height:2*Math.tan(.5*l)/u.width:1/Math.max(u.width,u.height),this._geometricToleranceOverMeter=d*e.maximumScreenSpaceError,X.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};const a$=new f;function c$(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,k.multiplyByPoint(e.inverseModel,e._cameraPosition,a$),Gi.fromCartesian(a$,e._encodedCameraPositionMC))}const B4e=new f,k4e=new f,U4e=new f,z4e=new f,V4e=new Se,H4e=new f,G4e=new k;function oB(e){e._view3DDirty&&(e._mode===ce.SCENE3D?k.clone(e._view,e._view3D):function j4e(e,t,n,i,o,r,s,a){const l=B4e;l.x=e.y,l.y=e.z,l.z=e.x;const u=k4e;u.x=n.y,u.y=n.z,u.z=n.x;const d=U4e;d.x=i.y,d.y=i.z,d.z=i.x;const h=z4e;h.x=t.y,h.y=t.z,h.z=t.x,r===ce.SCENE2D&&(l.z=.5*o);const m=s.unproject(l,V4e);m.longitude=O.clamp(m.longitude,-Math.PI,Math.PI),m.latitude=O.clamp(m.latitude,-O.PI_OVER_TWO,O.PI_OVER_TWO);const _=s.ellipsoid,p=_.cartographicToCartesian(m,H4e),y=Rn.eastNorthUpToFixedFrame(p,_,G4e);k.multiplyByPointAsVector(y,u,u),k.multiplyByPointAsVector(y,d,d),k.multiplyByPointAsVector(y,h,h),c(a)||(a=new k),a[0]=u.x,a[1]=d.x,a[2]=-h.x,a[3]=0,a[4]=u.y,a[5]=d.y,a[6]=-h.y,a[7]=0,a[8]=u.z,a[9]=d.z,a[10]=-h.z,a[11]=0,a[12]=-f.dot(u,p),a[13]=-f.dot(d,p),a[14]=f.dot(h,p),a[15]=1}(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),k.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function l$(e){e._inverseView3DDirty&&(k.inverseTransformation(e.view3D,e._inverseView3D),k.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}const W4e=_b;function ll(e,t){T.defined("canvas",e);const{getWebGLStub:n,requestWebgl1:i,webgl:o={},allowTextureFilterAnisotropic:r=!0}=g(t,{});o.alpha=g(o.alpha,!1),o.stencil=g(o.stencil,!0),o.powerPreference=g(o.powerPreference,"high-performance");const s=c(n)?n(e,o):function q4e(e,t,n){if(typeof WebGLRenderingContext>"u")throw new Ie("The browser does not support WebGL. Visit http://get.webgl.org.");!n&&!(typeof WebGL2RenderingContext<"u")&&(n=!0);const r=e.getContext(n?"webgl":"webgl2",t);if(!c(r))throw new Ie("The browser supports WebGL, but initialization failed.");return r}(e,o,i),l=typeof WebGL2RenderingContext<"u"&&s instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=s,this._gl=s,this._webgl2=l,this._id=kr(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new l4e(this),this._textureCache=new u4e;const u=s;this._stencilBits=u.getParameter(u.STENCIL_BITS),mn._maximumCombinedTextureImageUnits=u.getParameter(u.MAX_COMBINED_TEXTURE_IMAGE_UNITS),mn._maximumCubeMapSize=u.getParameter(u.MAX_CUBE_MAP_TEXTURE_SIZE),mn._maximumFragmentUniformVectors=u.getParameter(u.MAX_FRAGMENT_UNIFORM_VECTORS),mn._maximumTextureImageUnits=u.getParameter(u.MAX_TEXTURE_IMAGE_UNITS),mn._maximumRenderbufferSize=u.getParameter(u.MAX_RENDERBUFFER_SIZE),mn._maximumTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),mn._maximumVaryingVectors=u.getParameter(u.MAX_VARYING_VECTORS),mn._maximumVertexAttributes=u.getParameter(u.MAX_VERTEX_ATTRIBS),mn._maximumVertexTextureImageUnits=u.getParameter(u.MAX_VERTEX_TEXTURE_IMAGE_UNITS),mn._maximumVertexUniformVectors=u.getParameter(u.MAX_VERTEX_UNIFORM_VECTORS),mn._maximumSamples=this._webgl2?u.getParameter(u.MAX_SAMPLES):0;const d=u.getParameter(u.ALIASED_LINE_WIDTH_RANGE);mn._minimumAliasedLineWidth=d[0],mn._maximumAliasedLineWidth=d[1];const h=u.getParameter(u.ALIASED_POINT_SIZE_RANGE);mn._minimumAliasedPointSize=h[0],mn._maximumAliasedPointSize=h[1];const m=u.getParameter(u.MAX_VIEWPORT_DIMS);mn._maximumViewportWidth=m[0],mn._maximumViewportHeight=m[1];const _=u.getShaderPrecisionFormat(u.FRAGMENT_SHADER,u.HIGH_FLOAT);mn._highpFloatSupported=0!==_.precision;const p=u.getShaderPrecisionFormat(u.FRAGMENT_SHADER,u.HIGH_INT);mn._highpIntSupported=0!==p.rangeMax,this._antialias=u.getContextAttributes().antialias,this._standardDerivatives=!!Sr(u,["OES_standard_derivatives"]),this._blendMinmax=!!Sr(u,["EXT_blend_minmax"]),this._elementIndexUint=!!Sr(u,["OES_element_index_uint"]),this._depthTexture=!!Sr(u,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!Sr(u,["EXT_frag_depth"]),this._debugShaders=Sr(u,["WEBGL_debug_shaders"]),this._textureFloat=!!Sr(u,["OES_texture_float"]),this._textureHalfFloat=!!Sr(u,["OES_texture_half_float"]),this._textureFloatLinear=!!Sr(u,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!Sr(u,["OES_texture_half_float_linear"]),this._colorBufferFloat=!!Sr(u,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!Sr(u,["EXT_float_blend"]),this._colorBufferHalfFloat=!!Sr(u,["EXT_color_buffer_half_float"]),this._s3tc=!!Sr(u,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!Sr(u,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!Sr(u,["WEBGL_compressed_texture_astc"]),this._etc=!!Sr(u,["WEBG_compressed_texture_etc"]),this._etc1=!!Sr(u,["WEBGL_compressed_texture_etc1"]),this._bc7=!!Sr(u,["EXT_texture_compression_bptc"]),My.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);const y=r?Sr(u,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;let A,x,C,w,v,D,P,N,R,B;if(this._textureFilterAnisotropic=y,mn._maximumTextureFilterAnisotropy=c(y)?u.getParameter(y.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,l){const L=this;A=function(){return L._gl.createVertexArray()},x=function(M){L._gl.bindVertexArray(M)},C=function(M){L._gl.deleteVertexArray(M)},w=function(M,U,z,j,W){u.drawElementsInstanced(M,U,z,j,W)},v=function(M,U,z,j){u.drawArraysInstanced(M,U,z,j)},D=function(M,U){u.vertexAttribDivisor(M,U)},P=function(M){u.drawBuffers(M)}}else N=Sr(u,["OES_vertex_array_object"]),c(N)&&(A=function(){return N.createVertexArrayOES()},x=function(L){N.bindVertexArrayOES(L)},C=function(L){N.deleteVertexArrayOES(L)}),R=Sr(u,["ANGLE_instanced_arrays"]),c(R)&&(w=function(L,M,U,z,j){R.drawElementsInstancedANGLE(L,M,U,z,j)},v=function(L,M,U,z){R.drawArraysInstancedANGLE(L,M,U,z)},D=function(L,M){R.vertexAttribDivisorANGLE(L,M)}),B=Sr(u,["WEBGL_draw_buffers"]),c(B)&&(P=function(L){B.drawBuffersWEBGL(L)});this.glCreateVertexArray=A,this.glBindVertexArray=x,this.glDeleteVertexArray=C,this.glDrawElementsInstanced=w,this.glDrawArraysInstanced=v,this.glVertexAttribDivisor=D,this.glDrawBuffers=P,this._vertexArrayObject=!!N,this._instancedArrays=!!R,this._drawBuffers=!!B,mn._maximumDrawBuffers=this.drawBuffers?u.getParameter(oe.MAX_DRAW_BUFFERS):1,mn._maximumColorAttachments=this.drawBuffers?u.getParameter(oe.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new X(0,0,0,0),this._clearDepth=1,this._clearStencil=0;const F=new W4e,S=new Cg(this),I=Pt.fromCache();this._defaultPassState=S,this._defaultRenderState=I,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=F,this._currentRenderState=I,this._currentPassState=S,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let L=0;L<mn._maximumVertexAttributes;L++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this.options={getWebGLStub:n,requestWebgl1:i,webgl:o,allowTextureFilterAnisotropic:r},this.cache={},Pt.apply(u,I,S)}function Z4e(e,t,n){const i=e.getError();if(i!==e.NO_ERROR)throw new Ie(function X4e(e,t,n,i){let o=`${function Y4e(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}(e,i)}: ${t.name}(`;for(let r=0;r<n.length;++r)0!==r&&(o+=", "),o+=n[r];return o+=");",o}(e,t,n,i))}function $4e(e,t,n){return{get:function(){return n(e,`get: ${t}`,e[t]),e[t]},set:function(i){e[t]=i,n(e,`set: ${t}`,i)}}}function Sr(e,t){const n=t.length;for(let i=0;i<n;++i){const o=e.getExtension(t[i]);if(o)return o}}const Q4e={};function u$(e,t,n,i){const o=e._currentRenderState,r=e._currentPassState;e._currentRenderState=t,e._currentPassState=n,Pt.partialApply(e._gl,o,t,r,n,i)}let rB;function sB(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=rB;if(c(t))t._bind(),function J4e(e){if(e.validateFramebuffer){const t=e._gl,n=t.checkFramebufferStatus(t.FRAMEBUFFER);if(n!==t.FRAMEBUFFER_COMPLETE){let i;switch(n){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:i="Framebuffer is not complete. Incomplete attachment: at least one attachment point with a renderbuffer or texture attached has its attached object no longer in existence or has an attached image with a width or height of zero, or the color attachment point has a non-color-renderable image attached, or the depth attachment point has a non-depth-renderable image attached, or the stencil attachment point has a non-stencil-renderable image attached. Color-renderable formats include GL_RGBA4, GL_RGB5_A1, and GL_RGB565. GL_DEPTH_COMPONENT16 is the only depth-renderable format. GL_STENCIL_INDEX8 is the only stencil-renderable format.";break;case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:i="Framebuffer is not complete. Incomplete dimensions: not all attached images have the same width and height.";break;case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:i="Framebuffer is not complete. Missing attachment: no images are attached to the framebuffer.";break;case t.FRAMEBUFFER_UNSUPPORTED:i="Framebuffer is not complete. Unsupported: the combination of internal formats of the attached images violates an implementation-dependent set of restrictions."}throw new E(i)}}}(e),n=t._getActiveColorAttachments();else{const i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}Object.defineProperties(ll.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=function K4e(e,t){if(!c(t))return e;function n(o){return function(){const r=o.apply(e,arguments);return t(e,o,arguments),r}}const i={};for(const o in e){const r=e[o];r instanceof Function?i[o]=n(r):Object.defineProperty(i,o,$4e(e,o,t))}return i}(this._originalGLContext,e?Z4e:void 0)}},defaultTexture:{get:function(){return void 0===this._defaultTexture&&(this._defaultTexture=new jn({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultEmissiveTexture:{get:function(){return void 0===this._defaultEmissiveTexture&&(this._defaultEmissiveTexture=new jn({context:this,pixelFormat:vt.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0])},flipY:!1})),this._defaultEmissiveTexture}},defaultNormalTexture:{get:function(){return void 0===this._defaultNormalTexture&&(this._defaultNormalTexture=new jn({context:this,pixelFormat:vt.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([128,128,255])},flipY:!1})),this._defaultNormalTexture}},defaultCubeMap:{get:function(){if(void 0===this._defaultCubeMap){const e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new d_({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 Q4e}}}),typeof WebGLRenderingContext<"u"&&(rB=[oe.BACK]);const eHe=new cr;ll.prototype.clear=function(e,t){e=g(e,eHe),t=g(t,this._defaultPassState);const n=this._gl;let i=0;const o=e.color,r=e.depth,s=e.stencil;c(o)&&(X.equals(this._clearColor,o)||(X.clone(o,this._clearColor),n.clearColor(o.red,o.green,o.blue,o.alpha)),i|=n.COLOR_BUFFER_BIT),c(r)&&(r!==this._clearDepth&&(this._clearDepth=r,n.clearDepth(r)),i|=n.DEPTH_BUFFER_BIT),c(s)&&(s!==this._clearStencil&&(this._clearStencil=s,n.clearStencil(s)),i|=n.STENCIL_BUFFER_BIT),u$(this,g(e.renderState,this._defaultRenderState),t,!0),sB(this,g(e.framebuffer,t.framebuffer)),n.clear(i)},ll.prototype.draw=function(e,t,n,i){T.defined("drawCommand",e),T.defined("drawCommand.shaderProgram",e._shaderProgram),t=g(t,this._defaultPassState);const o=g(e._framebuffer,t.framebuffer),r=g(e._renderState,this._defaultRenderState);n=g(n,e._shaderProgram),i=g(i,e._uniformMap),function tHe(e,t,n,i,o){if(c(t)&&o.depthTest&&o.depthTest.enabled&&!t.hasDepthAttachment)throw new E("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");sB(e,t),u$(e,o,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}(this,o,t,n,r),function nHe(e,t,n,i){const o=t._primitiveType,r=t._vertexArray;let s=t._offset,a=t._count;const l=t.instanceCount;if(!At.validate(o))throw new E("drawCommand.primitiveType is required and must be valid.");if(T.defined("drawCommand.vertexArray",r),T.typeOf.number.greaterThanOrEquals("drawCommand.offset",s,0),c(a)&&T.typeOf.number.greaterThanOrEquals("drawCommand.count",a,0),T.typeOf.number.greaterThanOrEquals("drawCommand.instanceCount",l,0),l>0&&!e.instancedArrays)throw new E("Instanced arrays extension is not supported");e._us.model=g(t._modelMatrix,k.IDENTITY),n._setUniforms(i,e._us,e.validateShaderProgram),r._bind();const u=r.indexBuffer;c(u)?(s*=u.bytesPerIndex,a=c(a)?Math.min(a,u.numberOfIndices):u.numberOfIndices,0===l?e._gl.drawElements(o,a,u.indexDatatype,s):e.glDrawElementsInstanced(o,a,u.indexDatatype,s,l)):(a=c(a)?Math.min(a,r.numberOfVertices):r.numberOfVertices,0===l?e._gl.drawArrays(o,s,a):e.glDrawArraysInstanced(o,s,a,l)),r._unBind()}(this,e,n,i)},ll.prototype.endFrame=function(){const e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null),this.drawBuffers&&this.glDrawBuffers(rB);const 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)},ll.prototype.readPixels=function(e){const t=this._gl;e=g(e,g.EMPTY_OBJECT);const n=Math.max(g(e.x,0),0),i=Math.max(g(e.y,0),0),o=g(e.width,t.drawingBufferWidth),r=g(e.height,t.drawingBufferHeight),s=e.framebuffer;T.typeOf.number.greaterThan("readState.width",o,0),T.typeOf.number.greaterThan("readState.height",r,0);let a=bt.UNSIGNED_BYTE;c(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype);const l=vt.createTypedArray(vt.RGBA,a,o,r);return sB(this,s),t.readPixels(n,i,o,r,vt.RGBA,bt.toWebGLConstant(a,this),l),l};const d$={position:0,textureCoordinates:1};function aB(e,t,n){this._pickObjects=e,this.key=t,this.color=n}ll.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!c(e)){const t=new Cn({attributes:{position:new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:At.TRIANGLES});e=ds.fromGeometry({context:this,geometry:t,attributeLocations:d$,bufferUsage:Tt.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e},ll.prototype.createViewportQuadCommand=function(e,t){return t=g(t,g.EMPTY_OBJECT),new Zt({vertexArray:this.getViewportQuadVertexArray(),primitiveType:At.TRIANGLES,renderState:t.renderState,shaderProgram:mi.fromCache({context:this,vertexShaderSource:r$,fragmentShaderSource:e,attributeLocations:d$}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})},ll.prototype.getObjectByPickColor=function(e){return T.defined("pickColor",e),this._pickObjects[e.toRgba()]},Object.defineProperties(aB.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),aB.prototype.destroy=function(){delete this._pickObjects[this.key]},ll.prototype.createPickId=function(e){T.defined("object",e),++this._nextPickColor[0];const t=this._nextPickColor[0];if(0===t)throw new Ie("Out of unique Pick IDs.");return this._pickObjects[t]=e,new aB(this._pickObjects,t,X.fromRgba(t))},ll.prototype.isDestroyed=function(){return!1},ll.prototype.destroy=function(){const e=this.cache;for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];c(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(),Ye(this)},ll._deprecationWarning=kf;const iHe=ll;function dC(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(dC.prototype,{colorTexture:{get:function(){return this._colorTexture}}}),dC.prototype.update=function(e){if(!c(this._colorTexture)){const t=e.context,n=new jn({context:t,width:256,height:256,pixelFormat:vt.RGBA,pixelDatatype:bt.UNSIGNED_BYTE,sampler:Hi.NEAREST});this._colorTexture=n;const i=new Kf({context:t,colorTextures:[n],destroyAttachments:!1});(function rHe(e,t,n){const i=t.createViewportQuadCommand("in vec2 v_textureCoordinates;\nconst float M_PI = 3.141592653589793;\n\nfloat vdcRadicalInverse(int i)\n{\n float r;\n float base = 2.0;\n float value = 0.0;\n float invBase = 1.0 / base;\n float invBi = invBase;\n for (int x = 0; x < 100; x++)\n {\n if (i <= 0)\n {\n break;\n }\n r = mod(float(i), base);\n value += r * invBi;\n invBi *= invBase;\n i = int(float(i) * invBase);\n }\n return value;\n}\n\nvec2 hammersley2D(int i, int N)\n{\n return vec2(float(i) / float(N), vdcRadicalInverse(i));\n}\n\nvec3 importanceSampleGGX(vec2 xi, float roughness, vec3 N)\n{\n float a = roughness * roughness;\n float phi = 2.0 * M_PI * xi.x;\n float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\n float sinTheta = sqrt(1.0 - cosTheta * cosTheta);\n vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\n vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\n vec3 tangentX = normalize(cross(upVector, N));\n vec3 tangentY = cross(N, tangentX);\n return tangentX * H.x + tangentY * H.y + N * H.z;\n}\n\nfloat G1_Smith(float NdotV, float k)\n{\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfloat G_Smith(float roughness, float NdotV, float NdotL)\n{\n float k = roughness * roughness / 2.0;\n return G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\n\nvec2 integrateBrdf(float roughness, float NdotV)\n{\n vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\n float A = 0.0;\n float B = 0.0;\n const int NumSamples = 1024;\n for (int i = 0; i < NumSamples; i++)\n {\n vec2 xi = hammersley2D(i, NumSamples);\n vec3 H = importanceSampleGGX(xi, roughness, vec3(0.0, 0.0, 1.0));\n vec3 L = 2.0 * dot(V, H) * H - V;\n float NdotL = clamp(L.z, 0.0, 1.0);\n float NdotH = clamp(H.z, 0.0, 1.0);\n float VdotH = clamp(dot(V, H), 0.0, 1.0);\n if (NdotL > 0.0)\n {\n float G = G_Smith(roughness, NdotV, NdotL);\n float G_Vis = G * VdotH / (NdotH * NdotV);\n float Fc = pow(1.0 - VdotH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n return vec2(A, B) / float(NumSamples);\n}\n\nvoid main()\n{\n out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n",{framebuffer:n,renderState:Pt.fromCache({viewport:new Vt(0,0,256,256)})});e._drawCommand=i})(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}},dC.prototype.isDestroyed=function(){return!1},dC.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),Ye(this)};const sHe=dC,f$={},cHe=new f,h$=new f;function p$(e,t,n,i){if(c(i)&&n(.5)>i){const o=n(0),r=n(1),s=n(.5),a=s-o,l=s-r;return function(u){const d=n(u);return u<=.5?O.lerp(e,-O.PI_OVER_TWO,(d-o)/a):O.lerp(-O.PI_OVER_TWO,t,1-(d-r)/l)}}return function(o){return O.lerp(e,t,o)}}function cB(e,t,n,i,o){let r=o;const s=Math.max(n,i);if(!c(r)){const u=e.up,d=e.right,h=e.frustum,m=f.subtract(e.position,t,cHe),_=f.magnitude(f.multiplyByScalar(u,f.dot(m,u),h$)),p=f.magnitude(f.multiplyByScalar(d,f.dot(m,d),h$));r=Math.min(.2*function aHe(e,t,n){let i,o,r;if(e instanceof Po){const 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)}return e instanceof xg?(i=e.near,o=e.top,r=e.right,Math.max(t*i/r,n*i/o)):Math.max(t,n)}(h,_,p),1e9)}if(s<r){const u=-Math.pow(1e6*(r-n),.125),d=Math.pow(1e6*(r-i),1/8);return function(h){return-Math.pow(h*(d-u)+u,8)/1e6+r}}return function(a){return O.lerp(n,i,a)}}function fC(e,t){return O.equalsEpsilon(e,O.TWO_PI,O.EPSILON11)&&(e=0),t>e+Math.PI?e+=O.TWO_PI:t<e-Math.PI&&(e-=O.TWO_PI),e}const m$=new f;function lHe(e,t,n,i,o,r,s,a){const l=e.camera,u=f.clone(l.position,m$),d=l.pitch,h=fC(l.heading,i),m=fC(l.roll,r),_=cB(l,n,u.z,n.z,s),p=p$(d,o,_,a);return function y(A){const x=A.time/t;l.setView({orientation:{heading:O.lerp(h,i,x),pitch:p(x),roll:O.lerp(m,r,x)}}),G.lerp(u,n,x,l.position),l.position.z=_(x)}}const fHe=new Se,hHe=new Se;function pHe(e,t,n,i,o,r,s,a,l,u){const d=e.camera,m=e.mapProjection.ellipsoid,_=Se.clone(d.positionCartographic,fHe),p=d.pitch,y=fC(d.heading,i),A=fC(d.roll,r),x=m.cartesianToCartographic(n,hHe);_.longitude=O.zeroToTwoPi(_.longitude),x.longitude=O.zeroToTwoPi(x.longitude);let C=!1;if(c(a)){const P=O.zeroToTwoPi(a),N=Math.min(_.longitude,x.longitude),R=Math.max(_.longitude,x.longitude),B=P>=N&&P<=R;if(c(l)){const F=Math.abs(_.longitude-x.longitude),S=O.TWO_PI-F;(B?F:S)<(B?S:F)*l&&!B&&(C=!0)}else B||(C=!0)}C?function uHe(e,t){e.longitude<t.longitude?e.longitude+=O.TWO_PI:t.longitude+=O.TWO_PI}(_,x):function dHe(e,t){const n=e.longitude-t.longitude;n<-O.PI?e.longitude+=O.TWO_PI:n>O.PI&&(t.longitude+=O.TWO_PI)}(_,x);const w=cB(d,n,_.height,x.height,s),v=p$(p,o,w,u);return function D(){const P=_.longitude,N=x.longitude,R=_.latitude,B=x.latitude;return function(S){const I=S.time/t,L=f.fromRadians(O.lerp(P,N,I),O.lerp(R,B,I),w(I),m);d.setView({destination:L,orientation:{heading:O.lerp(y,i,I),pitch:v(I),roll:O.lerp(A,r,I)}})}}()}function mHe(e,t,n,i,o,r,s){const a=e.camera,l=f.clone(a.position,m$),u=fC(a.heading,i),h=cB(a,n,a.frustum.right-a.frustum.left,n.z,s);return function m(_){const p=_.time/t;a.setView({orientation:{heading:O.lerp(u,i,p)}}),G.lerp(l,n,p,a.position);const y=h(p),A=a.frustum,x=A.top/A.right,C=.5*(y-(A.right-A.left));A.right+=C,A.left-=C,A.top=x*A.right,A.bottom=-A.top}}const _$=new Se,_He=new f;function lB(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function g$(e,t){return function n(){"function"==typeof t&&t(),e.enableInputs=!0}}f$.createTween=function(e,t){let n=(t=g(t,g.EMPTY_OBJECT)).destination;if(!c(e))throw new E("scene is required.");if(!c(n))throw new E("destination is required.");const i=e.mode;if(i===ce.MORPHING)return lB();const o=g(t.convert,!0),r=e.mapProjection,s=r.ellipsoid,a=t.maximumHeight,l=t.flyOverLongitude,u=t.flyOverLongitudeWeight,d=t.pitchAdjustHeight;let h=t.easingFunction;o&&i!==ce.SCENE3D&&(s.cartesianToCartographic(n,_$),n=r.project(_$,_He));const m=e.camera,_=t.endTransform;c(_)&&m._setTransform(_);let p=t.duration;c(p)||(p=Math.ceil(f.distance(m.position,n)/1e6)+2,p=Math.min(p,3));const y=g(t.heading,0),A=g(t.pitch,-O.PI_OVER_TWO),x=g(t.roll,0),C=e.screenSpaceCameraController;C.enableInputs=!1;const w=g$(C,t.complete),v=g$(C,t.cancel),D=m.frustum;let P=e.mode===ce.SCENE2D;if(P=P&&G.equalsEpsilon(m.position,n,O.EPSILON6),P=P&&O.equalsEpsilon(Math.max(D.right-D.left,D.top-D.bottom),n.z,O.EPSILON6),P=P||e.mode!==ce.SCENE2D&&f.equalsEpsilon(n,m.position,O.EPSILON10),P=P&&O.equalsEpsilon(O.negativePiToPi(y),O.negativePiToPi(m.heading),O.EPSILON10)&&O.equalsEpsilon(O.negativePiToPi(A),O.negativePiToPi(m.pitch),O.EPSILON10)&&O.equalsEpsilon(O.negativePiToPi(x),O.negativePiToPi(m.roll),O.EPSILON10),P)return lB(w,v);const N=new Array(4);if(N[ce.SCENE2D]=mHe,N[ce.SCENE3D]=pHe,N[ce.COLUMBUS_VIEW]=lHe,p<=0)return lB(function(){N[i](e,1,n,y,A,x,a,l,u,d)({time:1}),"function"==typeof w&&w()},v);const R=N[i](e,p,n,y,A,x,a,l,u,d);if(!c(h)){const B=m.positionCartographic.height;h=B>(i===ce.SCENE3D?s.cartesianToCartographic(n).height:n.z)&&B>11500?Pc.CUBIC_OUT:Pc.QUINTIC_IN_OUT}return{duration:p,easingFunction:h,startObject:{time:0},stopObject:{time:p},update:R,complete:w,cancel:v}};const gHe=f$,bm=Object.freeze({ROTATE:0,INFINITE_SCROLL:1});function fn(e){if(!c(e))throw new E("scene is required.");this._scene=e,this._transform=k.clone(k.IDENTITY),this._invTransform=k.clone(k.IDENTITY),this._actualTransform=k.clone(k.IDENTITY),this._actualInvTransform=k.clone(k.IDENTITY),this._transformChanged=!1,this.position=new f,this._position=new f,this._positionWC=new f,this._positionCartographic=new Se,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new f,this._direction=new f,this._directionWC=new f,this.up=new f,this._up=new f,this._upWC=new f,this.right=new f,this._right=new f,this._rightWC=new f,this.frustum=new Po,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=O.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 Ue,this._moveEnd=new Ue,this._changed=new Ue,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this._changedHeading=void 0,this.percentageChanged=.5,this._viewMatrix=new k,this._invViewMatrix=new k,y$(this),this._mode=ce.SCENE3D,this._modeChanged=!0;const t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new Se(Math.PI,O.PI_OVER_TWO)),this._max2Dfrustum=void 0,R$(this,fn.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=f.magnitude(this.position);n+=n*fn.DEFAULT_VIEW_FACTOR,f.normalize(this.position,this.position),f.multiplyByScalar(this.position,n,this.position)}function y$(e){k.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),k.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),k.inverseTransformation(e._viewMatrix,e._invViewMatrix)}fn.TRANSFORM_2D=new k(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),fn.TRANSFORM_2D_INVERSE=k.inverseTransformation(fn.TRANSFORM_2D,new k),fn.DEFAULT_VIEW_RECTANGLE=Ce.fromDegrees(-95,-20,-70,90),fn.DEFAULT_VIEW_FACTOR=.5,fn.DEFAULT_OFFSET=new Hx(0,-O.PI_OVER_FOUR,0),fn.prototype.canPreloadFlight=function(){return c(this._currentFlight)&&this._mode!==ce.SCENE2D},fn.prototype._updateCameraChanged=function(){const e=this;if(function yHe(e){if(c(e._oldPositionWC)){e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;const t=f.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=f.magnitude(t),e._oldPositionWC=f.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=wr()):e.timeSinceMoved=Math.max(wr()-e._lastMovedTimestamp,0)/1e3}else e._oldPositionWC=f.clone(e.positionWC,e._oldPositionWC)}(e),0===e._changed.numberOfListeners)return;const t=e.percentageChanged,n=e.heading;c(e._changedHeading)||(e._changedHeading=n);let i=Math.abs(e._changedHeading-n)%O.TWO_PI;i=i>O.PI?O.TWO_PI-i:i;const o=i/Math.PI;if(o>t&&(e._changed.raiseEvent(o),e._changedHeading=n),e._mode===ce.SCENE2D){if(!c(e._changedFrustum))return e._changedPosition=f.clone(e.position,e._changedPosition),void(e._changedFrustum=e.frustum.clone());const u=e.position,d=e._changedPosition,h=e.frustum,m=e._changedFrustum,_=u.x+h.left,p=u.x+h.right,y=d.x+m.left,A=d.x+m.right,x=u.y+h.bottom,C=u.y+h.top,w=d.y+m.bottom,v=d.y+m.top,D=Math.max(_,y),P=Math.min(p,A),N=Math.max(x,w),R=Math.min(C,v);let B;if(D>=P||N>=C)B=1;else{let F=m;_<y&&p>A&&x<w&&C>v&&(F=h),B=1-(P-D)*(R-N)/((F.right-F.left)*(F.top-F.bottom))}return void(B>t&&(e._changed.raiseEvent(B),e._changedPosition=f.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum)))}if(!c(e._changedDirection))return e._changedPosition=f.clone(e.positionWC,e._changedPosition),void(e._changedDirection=f.clone(e.directionWC,e._changedDirection));const r=O.acosClamped(f.dot(e.directionWC,e._changedDirection));let s;s=c(e.frustum.fovy)?r/(.5*e.frustum.fovy):r;const l=f.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(s>t||l>t)&&(e._changed.raiseEvent(Math.max(s,l)),e._changedPosition=f.clone(e.positionWC,e._changedPosition),e._changedDirection=f.clone(e.directionWC,e._changedDirection))};const AHe=new Se,THe=new f,YD=new f,xHe=new fe,CHe=new fe,EHe=new fe,wHe=new fe,SHe=new fe,uB=new f;function La(e){const t=e._mode;let n=!1,i=0;t===ce.SCENE2D&&(i=e.frustum.right-e.frustum.left,n=i!==e._positionCartographic.height);let o=e._position;const r=!f.equals(o,e.position)||n;r&&(o=f.clone(e.position,e._position));let s=e._direction;const a=!f.equals(s,e.direction);a&&(f.normalize(e.direction,e.direction),s=f.clone(e.direction,e._direction));let l=e._up;const u=!f.equals(l,e.up);u&&(f.normalize(e.up,e.up),l=f.clone(e.up,e._up));let d=e._right;const h=!f.equals(d,e.right);h&&(f.normalize(e.right,e.right),d=f.clone(e.right,e._right));const m=e._transformChanged||e._modeChanged;e._transformChanged=!1,m&&(k.inverseTransformation(e._transform,e._invTransform),e._mode===ce.COLUMBUS_VIEW||e._mode===ce.SCENE2D?k.equals(k.IDENTITY,e._transform)?k.clone(fn.TRANSFORM_2D,e._actualTransform):e._mode===ce.COLUMBUS_VIEW?function bHe(e){Rn.basisTo2D(e._projection,e._transform,e._actualTransform)}(e):function vHe(e){const t=e._projection,n=t.ellipsoid,i=k.getColumn(e._transform,3,xHe),o=n.cartesianToCartographic(i,AHe),r=t.project(o,THe),s=CHe;s.x=r.z,s.y=r.x,s.z=r.y,s.w=1;const a=fe.clone(fe.UNIT_X,SHe),l=fe.add(k.getColumn(e._transform,0,YD),i,YD);n.cartesianToCartographic(l,o),t.project(o,r);const u=EHe;u.x=r.z,u.y=r.x,u.z=r.y,u.w=0,f.subtract(u,s,u),u.x=0;const d=wHe;if(f.magnitudeSquared(u)>O.EPSILON10)f.cross(a,u,d);else{const h=fe.add(k.getColumn(e._transform,1,YD),i,YD);n.cartesianToCartographic(h,o),t.project(o,r),d.x=r.z,d.y=r.x,d.z=r.y,d.w=0,f.subtract(d,s,d),d.x=0,f.magnitudeSquared(d)<O.EPSILON10&&(fe.clone(fe.UNIT_Y,u),fe.clone(fe.UNIT_Z,d))}f.cross(d,a,u),f.normalize(u,u),f.cross(a,u,d),f.normalize(d,d),k.setColumn(e._actualTransform,0,u,e._actualTransform),k.setColumn(e._actualTransform,1,d,e._actualTransform),k.setColumn(e._actualTransform,2,a,e._actualTransform),k.setColumn(e._actualTransform,3,s,e._actualTransform)}(e):k.clone(e._transform,e._actualTransform),k.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);const _=e._actualTransform;if(r||m)if(e._positionWC=k.multiplyByPoint(_,o,e._positionWC),t===ce.SCENE3D||t===ce.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{const p=uB;p.x=e._positionWC.y,p.y=e._positionWC.z,p.z=e._positionWC.x,t===ce.SCENE2D&&(p.z=i),e._projection.unproject(p,e._positionCartographic)}if(a||u||h){const p=f.dot(s,f.cross(l,d,uB));if(Math.abs(1-p)>O.EPSILON2){const y=1/f.magnitudeSquared(l),A=f.dot(l,s)*y,x=f.multiplyByScalar(s,A,uB);l=f.normalize(f.subtract(l,x,e._up),e._up),f.clone(l,e.up),d=f.cross(s,l,e._right),f.clone(d,e.right)}}(a||m)&&(e._directionWC=k.multiplyByPointAsVector(_,s,e._directionWC),f.normalize(e._directionWC,e._directionWC)),(u||m)&&(e._upWC=k.multiplyByPointAsVector(_,l,e._upWC),f.normalize(e._upWC,e._upWC)),(h||m)&&(e._rightWC=k.multiplyByPointAsVector(_,d,e._rightWC),f.normalize(e._rightWC,e._rightWC)),(r||a||u||h||m)&&y$(e)}function b$(e,t){let n;return n=O.equalsEpsilon(Math.abs(e.z),1,O.EPSILON3)?Math.atan2(t.y,t.x)-O.PI_OVER_TWO:Math.atan2(e.y,e.x)-O.PI_OVER_TWO,O.TWO_PI-O.zeroToTwoPi(n)}function A$(e){return O.PI_OVER_TWO-O.acosClamped(e.z)}function T$(e,t,n){let i=0;return O.equalsEpsilon(Math.abs(e.z),1,O.EPSILON3)||(i=Math.atan2(-n.z,t.z),i=O.zeroToTwoPi(i+O.TWO_PI)),i}const XD=new k,ZD=new k;Object.defineProperties(fn.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return La(this),this._invTransform}},viewMatrix:{get:function(){return La(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return La(this),this._invViewMatrix}},positionCartographic:{get:function(){return La(this),this._positionCartographic}},positionWC:{get:function(){return La(this),this._positionWC}},directionWC:{get:function(){return La(this),this._directionWC}},upWC:{get:function(){return La(this),this._upWC}},rightWC:{get:function(){return La(this),this._rightWC}},heading:{get:function(){if(this._mode!==ce.MORPHING){const e=this._projection.ellipsoid,t=k.clone(this._transform,XD),n=Rn.eastNorthUpToFixedFrame(this.positionWC,e,ZD);this._setTransform(n);const i=b$(this.direction,this.up);return this._setTransform(t),i}}},pitch:{get:function(){if(this._mode!==ce.MORPHING){const e=this._projection.ellipsoid,t=k.clone(this._transform,XD),n=Rn.eastNorthUpToFixedFrame(this.positionWC,e,ZD);this._setTransform(n);const i=A$(this.direction);return this._setTransform(t),i}}},roll:{get:function(){if(this._mode!==ce.MORPHING){const e=this._projection.ellipsoid,t=k.clone(this._transform,XD),n=Rn.eastNorthUpToFixedFrame(this.positionWC,e,ZD);this._setTransform(n);const i=T$(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}}}),fn.prototype.update=function(e){if(!c(e))throw new E("mode is required.");if(e===ce.SCENE2D&&!(this.frustum instanceof qa))throw new E("An OrthographicOffCenterFrustum is required in 2D.");if(!(e!==ce.SCENE3D&&e!==ce.COLUMBUS_VIEW||this.frustum instanceof Po||this.frustum instanceof $n))throw new E("A PerspectiveFrustum or OrthographicFrustum is required in 3D and Columbus view");let t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==ce.MORPHING,t=this._mode===ce.SCENE2D),t){const n=this._max2Dfrustum=this.frustum.clone();if(!(n instanceof qa))throw new E("The camera frustum is expected to be orthographic for 2D camera control.");const o=n.top/n.right;n.right=2*this._maxCoord.x,n.left=-n.right,n.top=o*n.right,n.bottom=-n.top}this._mode===ce.SCENE2D&&w$(this,this.position)};const DHe=new f,IHe=new f,PHe=new f;fn.prototype._setTransform=function(e){const t=f.clone(this.positionWC,DHe),n=f.clone(this.upWC,IHe),i=f.clone(this.directionWC,PHe);k.clone(e,this._transform),this._transformChanged=!0,La(this);const o=this._actualInvTransform;k.multiplyByPoint(o,t,this.position),k.multiplyByPointAsVector(o,i,this.direction),k.multiplyByPointAsVector(o,n,this.up),f.cross(this.direction,this.up,this.right),La(this)};const OHe=new G,LHe=new fi,RHe=new f,NHe=new f;function x$(e){if(!k.equals(k.IDENTITY,e.transform))return f.magnitude(e.position);const t=e._scene,n=t.globe,i=OHe;let o,r,s;if(i.x=t.drawingBufferWidth/2,i.y=t.drawingBufferHeight/2,c(n)){const a=e.getPickRay(i,LHe);o=n.pickWorldCoordinates(a,t,!0,RHe)}if(t.pickPositionSupported&&(r=t.pickPositionWorldCoordinates(i,NHe)),c(o)||c(r)){const a=c(r)?f.distance(r,e.positionWC):Number.POSITIVE_INFINITY,l=c(o)?f.distance(o,e.positionWC):Number.POSITIVE_INFINITY;s=Math.min(a,l)}else s=Math.max(e.positionCartographic.height,0);return s}fn.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof $n&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=x$(this)))};const $D=new f,dB=new k,MHe=new k,fB=new yt,hB=new ne,C$=new Se,UHe=new f,zHe=new f,VHe=new f;function E$(e,t,n,i){const o=f.clone(n.direction,UHe),r=f.clone(n.up,zHe);if(e._scene.mode===ce.SCENE3D){const l=Rn.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,XD),u=k.inverseTransformation(l,ZD);k.multiplyByPointAsVector(u,o,o),k.multiplyByPointAsVector(u,r,r)}const s=f.cross(o,r,VHe);return i.heading=b$(o,r),i.pitch=A$(o),i.roll=T$(o,r,s),i}const pB={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},gb=new wy;fn.prototype.setView=function(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.orientation,g.EMPTY_OBJECT);const n=this._mode;if(n===ce.MORPHING)return;c(e.endTransform)&&this._setTransform(e.endTransform);let i=g(e.convert,!0),o=g(e.destination,f.clone(this.positionWC,$D));c(o)&&c(o.west)&&(o=this.getRectangleCameraCoordinates(o,$D),i=!1),c(t.direction)&&(t=E$(this,o,t,pB.orientation)),gb.heading=g(t.heading,0),gb.pitch=g(t.pitch,-O.PI_OVER_TWO),gb.roll=g(t.roll,0),n===ce.SCENE3D?function FHe(e,t,n){const i=k.clone(e.transform,dB),o=Rn.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,MHe);e._setTransform(o),f.clone(f.ZERO,e.position),n.heading=n.heading-O.PI_OVER_TWO;const r=yt.fromHeadingPitchRoll(n,fB),s=ne.fromQuaternion(r,hB);ne.getColumn(s,0,e.direction),ne.getColumn(s,2,e.up),f.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}(this,o,gb):n===ce.SCENE2D?function kHe(e,t,n,i){const o=k.clone(e.transform,dB);if(e._setTransform(k.IDENTITY),!f.equals(t,e.positionWC)){if(i){const l=e._projection,u=l.ellipsoid.cartesianToCartographic(t,C$);t=l.project(u,$D)}G.clone(t,e.position);const r=.5*-t.z,s=-r,a=e.frustum;if(s>r){const l=a.top/a.right;a.right=s,a.left=r,a.top=a.right*l,a.bottom=-a.top}}if(e._scene.mapMode2D===bm.ROTATE){n.heading=n.heading-O.PI_OVER_TWO,n.pitch=-O.PI_OVER_TWO,n.roll=0;const r=yt.fromHeadingPitchRoll(n,fB),s=ne.fromQuaternion(r,hB);ne.getColumn(s,2,e.up),f.cross(e.direction,e.up,e.right)}e._setTransform(o)}(this,o,gb,i):function BHe(e,t,n,i){const o=k.clone(e.transform,dB);if(e._setTransform(k.IDENTITY),!f.equals(t,e.positionWC)){if(i){const a=e._projection,l=a.ellipsoid.cartesianToCartographic(t,C$);t=a.project(l,$D)}f.clone(t,e.position)}n.heading=n.heading-O.PI_OVER_TWO;const r=yt.fromHeadingPitchRoll(n,fB),s=ne.fromQuaternion(r,hB);ne.getColumn(s,0,e.direction),ne.getColumn(s,2,e.up),f.cross(e.direction,e.up,e.right),e._setTransform(o),e._adjustOrthographicFrustum(!0)}(this,o,gb,i)};const HHe=new f;function w$(e,t){const i=e._maxCoord.x,o=e._maxCoord.y;let r,s;e._scene.mapMode2D===bm.ROTATE?(s=i,r=-s):(s=t.x-2*i,r=t.x+2*i),t.x>i&&(t.x=s),t.x<-i&&(t.x=r),t.y>o&&(t.y=o),t.y<-o&&(t.y=-o)}fn.prototype.flyHome=function(e){const t=this._mode;if(t===ce.MORPHING&&this._scene.completeMorph(),t===ce.SCENE2D)this.flyTo({destination:fn.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:k.IDENTITY});else if(t===ce.SCENE3D){const n=this.getRectangleCameraCoordinates(fn.DEFAULT_VIEW_RECTANGLE);let i=f.magnitude(n);i+=i*fn.DEFAULT_VIEW_FACTOR,f.normalize(n,n),f.multiplyByScalar(n,i,n),this.flyTo({destination:n,duration:e,endTransform:k.IDENTITY})}else if(t===ce.COLUMBUS_VIEW){const n=this._projection.ellipsoid.maximumRadius;let i=new f(0,-1,1);i=f.multiplyByScalar(f.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(f.normalize(i,HHe).z),roll:0},endTransform:k.IDENTITY,convert:!1})}},fn.prototype.worldToCameraCoordinates=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new fe),La(this),k.multiplyByVector(this._actualInvTransform,e,t)},fn.prototype.worldToCameraCoordinatesPoint=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new f),La(this),k.multiplyByPoint(this._actualInvTransform,e,t)},fn.prototype.worldToCameraCoordinatesVector=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new f),La(this),k.multiplyByPointAsVector(this._actualInvTransform,e,t)},fn.prototype.cameraToWorldCoordinates=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new fe),La(this),k.multiplyByVector(this._actualTransform,e,t)},fn.prototype.cameraToWorldCoordinatesPoint=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new f),La(this),k.multiplyByPoint(this._actualTransform,e,t)},fn.prototype.cameraToWorldCoordinatesVector=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new f),La(this),k.multiplyByPointAsVector(this._actualTransform,e,t)};const S$=new f;fn.prototype.move=function(e,t){if(!c(e))throw new E("direction is required.");const n=this.position;f.multiplyByScalar(e,t,S$),f.add(n,S$,n),this._mode===ce.SCENE2D&&w$(this,n),this._adjustOrthographicFrustum(!0)},fn.prototype.moveForward=function(e){e=g(e,this.defaultMoveAmount),this._mode===ce.SCENE2D?KD(this,e):this.move(this.direction,e)},fn.prototype.moveBackward=function(e){e=g(e,this.defaultMoveAmount),this._mode===ce.SCENE2D?KD(this,-e):this.move(this.direction,-e)},fn.prototype.moveUp=function(e){e=g(e,this.defaultMoveAmount),this.move(this.up,e)},fn.prototype.moveDown=function(e){e=g(e,this.defaultMoveAmount),this.move(this.up,-e)},fn.prototype.moveRight=function(e){e=g(e,this.defaultMoveAmount),this.move(this.right,e)},fn.prototype.moveLeft=function(e){e=g(e,this.defaultMoveAmount),this.move(this.right,-e)},fn.prototype.lookLeft=function(e){e=g(e,this.defaultLookAmount),this._mode!==ce.SCENE2D&&this.look(this.up,-e)},fn.prototype.lookRight=function(e){e=g(e,this.defaultLookAmount),this._mode!==ce.SCENE2D&&this.look(this.up,e)},fn.prototype.lookUp=function(e){e=g(e,this.defaultLookAmount),this._mode!==ce.SCENE2D&&this.look(this.right,-e)},fn.prototype.lookDown=function(e){e=g(e,this.defaultLookAmount),this._mode!==ce.SCENE2D&&this.look(this.right,e)};const GHe=new yt,jHe=new ne;fn.prototype.look=function(e,t){if(!c(e))throw new E("axis is required.");const n=g(t,this.defaultLookAmount),i=yt.fromAxisAngle(e,-n,GHe),o=ne.fromQuaternion(i,jHe),r=this.direction,s=this.up,a=this.right;ne.multiplyByVector(o,r,r),ne.multiplyByVector(o,s,s),ne.multiplyByVector(o,a,a)},fn.prototype.twistLeft=function(e){e=g(e,this.defaultLookAmount),this.look(this.direction,e)},fn.prototype.twistRight=function(e){e=g(e,this.defaultLookAmount),this.look(this.direction,-e)};const WHe=new yt,qHe=new ne;fn.prototype.rotate=function(e,t){if(!c(e))throw new E("axis is required.");const n=g(t,this.defaultRotateAmount),i=yt.fromAxisAngle(e,-n,WHe),o=ne.fromQuaternion(i,qHe);ne.multiplyByVector(o,this.position,this.position),ne.multiplyByVector(o,this.direction,this.direction),ne.multiplyByVector(o,this.up,this.up),f.cross(this.direction,this.up,this.right),f.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)},fn.prototype.rotateDown=function(e){D$(this,e=g(e,this.defaultRotateAmount))},fn.prototype.rotateUp=function(e){D$(this,-(e=g(e,this.defaultRotateAmount)))};const YHe=new f,XHe=new f,ZHe=new f,v$=new f;function D$(e,t){const n=e.position;if(c(e.constrainedAxis)&&!f.equalsEpsilon(e.position,f.ZERO,O.EPSILON2)){const i=f.normalize(n,YHe),o=f.equalsEpsilon(i,e.constrainedAxis,O.EPSILON2),r=f.equalsEpsilon(i,f.negate(e.constrainedAxis,v$),O.EPSILON2);if(o||r)(o&&t<0||r&&t>0)&&e.rotate(e.right,t);else{const s=f.normalize(e.constrainedAxis,XHe);let a=f.dot(i,s),l=O.acosClamped(a);t>0&&t>l&&(t=l-O.EPSILON4),a=f.dot(i,f.negate(s,v$)),l=O.acosClamped(a),t<0&&-t>l&&(t=-l+O.EPSILON4);const u=f.cross(s,i,ZHe);e.rotate(u,t)}}else e.rotate(e.right,t)}function I$(e,t){c(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function KD(e,t){const n=e.frustum;if(!(n instanceof qa&&c(n.left)&&c(n.right)&&c(n.bottom)&&c(n.top)))throw new E("The camera frustum is expected to be orthographic for 2D camera control.");let i;if(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===bm.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===bm.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 P$(e,t){e.move(e.direction,t)}fn.prototype.rotateRight=function(e){I$(this,-(e=g(e,this.defaultRotateAmount)))},fn.prototype.rotateLeft=function(e){I$(this,e=g(e,this.defaultRotateAmount))},fn.prototype.zoomIn=function(e){e=g(e,this.defaultZoomAmount),this._mode===ce.SCENE2D?KD(this,e):P$(this,e)},fn.prototype.zoomOut=function(e){e=g(e,this.defaultZoomAmount),this._mode===ce.SCENE2D?KD(this,-e):P$(this,-e)},fn.prototype.getMagnitude=function(){return this._mode===ce.SCENE3D?f.magnitude(this.position):this._mode===ce.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===ce.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};const $He=new k;fn.prototype.lookAt=function(e,t){if(!c(e))throw new E("target is required");if(!c(t))throw new E("offset is required");if(this._mode===ce.MORPHING)throw new E("lookAt is not supported while morphing.");const n=Rn.eastNorthUpToFixedFrame(e,ge.WGS84,$He);this.lookAtTransform(n,t)};const KHe=new f,QHe=new yt,JHe=new yt,e8e=new ne;function O$(e,t,n){t=O.clamp(t,-O.PI_OVER_TWO,O.PI_OVER_TWO),e=O.zeroToTwoPi(e)-O.PI_OVER_TWO;const i=yt.fromAxisAngle(f.UNIT_Y,-t,QHe),o=yt.fromAxisAngle(f.UNIT_Z,-e,JHe),r=yt.multiply(o,i,o),s=ne.fromQuaternion(r,e8e),a=f.clone(f.UNIT_X,KHe);return ne.multiplyByVector(s,a,a),f.negate(a,a),f.multiplyByScalar(a,n,a),a}fn.prototype.lookAtTransform=function(e,t){if(!c(e))throw new E("transform is required");if(this._mode===ce.MORPHING)throw new E("lookAtTransform is not supported while morphing.");if(this._setTransform(e),!c(t))return;let n;if(n=c(t.heading)?O$(t.heading,t.pitch,t.range):t,this._mode===ce.SCENE2D){G.clone(G.ZERO,this.position),f.negate(n,this.up),this.up.z=0,f.magnitudeSquared(this.up)<O.EPSILON10&&f.clone(f.UNIT_Y,this.up),f.normalize(this.up,this.up),this._setTransform(k.IDENTITY),f.negate(f.UNIT_Z,this.direction),f.cross(this.direction,this.up,this.right),f.normalize(this.right,this.right);const i=this.frustum,o=i.top/i.right;return i.right=.5*f.magnitude(n),i.left=-i.right,i.top=o*i.right,i.bottom=-i.top,void this._setTransform(e)}f.clone(n,this.position),f.negate(this.position,this.direction),f.normalize(this.direction,this.direction),f.cross(this.direction,f.UNIT_Z,this.right),f.magnitudeSquared(this.right)<O.EPSILON10&&f.clone(f.UNIT_X,this.right),f.normalize(this.right,this.right),f.cross(this.right,this.direction,this.up),f.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};const hC=new Se,t8e=new Se,n8e=new f,i8e=new f,o8e=new f,r8e=new f,s8e=new f,a8e=new f,c8e=new f,mB=new f,l8e={direction:new f,right:new f,up:new f};let L$;function Ra(e,t,n,i){return Math.abs(f.dot(t,n))/i-f.dot(e,n)}function R$(e,t,n,i){const o=e._projection.ellipsoid,r=i?e:l8e,s=t.north,a=t.south;let l=t.east;const u=t.west;u>l&&(l+=O.TWO_PI);const d=.5*(u+l);let h;if(a<-O.PI_OVER_TWO+O.RADIANS_PER_DEGREE&&s>O.PI_OVER_TWO-O.RADIANS_PER_DEGREE)h=0;else{const B=hC;B.longitude=d,B.latitude=s,B.height=0;const F=t8e;F.longitude=d,F.latitude=a,F.height=0;let S=L$;(!c(S)||S.ellipsoid!==o)&&(L$=S=new kT(void 0,void 0,o)),S.setEndPoints(B,F),h=S.interpolateUsingFraction(.5,hC).latitude}const m=hC;m.longitude=d,m.latitude=h,m.height=0;const _=o.cartographicToCartesian(m,c8e),p=hC;p.longitude=l,p.latitude=s;const y=o.cartographicToCartesian(p,n8e);p.longitude=u;const A=o.cartographicToCartesian(p,o8e);p.longitude=d;const x=o.cartographicToCartesian(p,s8e);p.latitude=a;const C=o.cartographicToCartesian(p,a8e);p.longitude=l;const w=o.cartographicToCartesian(p,r8e);p.longitude=u;const v=o.cartographicToCartesian(p,i8e);f.subtract(A,_,A),f.subtract(w,_,w),f.subtract(y,_,y),f.subtract(v,_,v),f.subtract(x,_,x),f.subtract(C,_,C);const D=o.geodeticSurfaceNormal(_,r.direction);f.negate(D,D);const P=f.cross(D,f.UNIT_Z,r.right);f.normalize(P,P);const N=f.cross(P,D,r.up);let R;if(e.frustum instanceof $n){const B=Math.max(f.distance(y,A),f.distance(w,v)),F=Math.max(f.distance(y,w),f.distance(A,v));let S,I;const L=e.frustum._offCenterFrustum,M=L.right/L.top,U=F*M;B>U?(S=B,I=S/M):(I=F,S=U),R=Math.max(S,I)}else{const B=Math.tan(.5*e.frustum.fovy),F=e.frustum.aspectRatio*B;if(R=Math.max(Ra(D,N,A,B),Ra(D,N,w,B),Ra(D,N,y,B),Ra(D,N,v,B),Ra(D,N,x,B),Ra(D,N,C,B),Ra(D,P,A,F),Ra(D,P,w,F),Ra(D,P,y,F),Ra(D,P,v,F),Ra(D,P,x,F),Ra(D,P,C,F)),a<0&&s>0){const S=hC;S.longitude=u,S.latitude=0,S.height=0;let I=o.cartographicToCartesian(S,mB);f.subtract(I,_,I),R=Math.max(R,Ra(D,N,I,B),Ra(D,P,I,F)),S.longitude=l,I=o.cartographicToCartesian(S,mB),f.subtract(I,_,I),R=Math.max(R,Ra(D,N,I,B),Ra(D,P,I,F))}}return f.add(_,f.multiplyByScalar(D,-R,mB),n)}const u8e=new Se,d8e=new f,f8e=new f,p8e=new Se,m8e=new f,_8e=new f;fn.prototype.getRectangleCameraCoordinates=function(e,t){if(!c(e))throw new E("rectangle is required");const n=this._mode;return c(t)||(t=new f),n===ce.SCENE3D?R$(this,e,t):n===ce.COLUMBUS_VIEW?function h8e(e,t,n){const i=e._projection;t.west>t.east&&(t=Ce.MAX_VALUE);const o=e._actualTransform,r=e._actualInvTransform,s=u8e;s.longitude=t.east,s.latitude=t.north;const a=i.project(s,d8e);k.multiplyByPoint(o,a,a),k.multiplyByPoint(r,a,a),s.longitude=t.west,s.latitude=t.south;const l=i.project(s,f8e);if(k.multiplyByPoint(o,l,l),k.multiplyByPoint(r,l,l),n.x=.5*(a.x-l.x)+l.x,n.y=.5*(a.y-l.y)+l.y,c(e.frustum.fovy)){const u=Math.tan(.5*e.frustum.fovy);n.z=.5*Math.max((a.x-l.x)/(e.frustum.aspectRatio*u),(a.y-l.y)/u)}else n.z=Math.max(a.x-l.x,a.y-l.y);return n}(this,e,t):n===ce.SCENE2D?function g8e(e,t,n){const i=e._projection;let o=t.east;t.west>t.east&&(e._scene.mapMode2D===bm.INFINITE_SCROLL?o+=O.TWO_PI:o=(t=Ce.MAX_VALUE).east);let r=p8e;r.longitude=o,r.latitude=t.north;const s=i.project(r,m8e);r.longitude=t.west,r.latitude=t.south;const a=i.project(r,_8e),l=.5*Math.abs(s.x-a.x);let d,h,u=.5*Math.abs(s.y-a.y);const m=e.frustum.right/e.frustum.top,_=u*m;return l>_?(d=l,h=d/m):(h=u,d=_),u=Math.max(2*d,2*h),n.x=.5*(s.x-a.x)+a.x,n.y=.5*(s.y-a.y)+a.y,r=i.unproject(n,r),r.height=u,i.project(r,n)}(this,e,t):void 0};const y8e=new fi,A8e=new fi,x8e=new fi;fn.prototype.pickEllipsoid=function(e,t,n){if(!c(e))throw new E("windowPosition is required.");const i=this._scene.canvas;if(0!==i.clientWidth&&0!==i.clientHeight){if(c(n)||(n=new f),t=g(t,ge.WGS84),this._mode===ce.SCENE3D)n=function b8e(e,t,n,i){n=g(n,ge.WGS84);const o=e.getPickRay(t,y8e),r=rr.rayEllipsoid(o,n);if(r)return fi.getPoint(o,r.start>0?r.start:r.stop,i)}(this,e,t,n);else if(this._mode===ce.SCENE2D)n=function T8e(e,t,n,i){let r=e.getPickRay(t,A8e).origin;r=f.fromElements(r.y,r.z,0,r);const s=n.unproject(r);if(!(s.latitude<-O.PI_OVER_TWO||s.latitude>O.PI_OVER_TWO))return n.ellipsoid.cartographicToCartesian(s,i)}(this,e,this._projection,n);else{if(this._mode!==ce.COLUMBUS_VIEW)return;n=function C8e(e,t,n,i){const o=e.getPickRay(t,x8e);fi.getPoint(o,-o.origin.x/o.direction.x,i);const s=n.unproject(new f(i.y,i.z,0));if(!(s.latitude<-O.PI_OVER_TWO||s.latitude>O.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI))return n.ellipsoid.cartographicToCartesian(s,i)}(this,e,this._projection,n)}return n}};const E8e=new f,w8e=new f,S8e=new f,QD=new f;fn.prototype.getPickRay=function(e,t){if(!c(e))throw new E("windowPosition is required.");c(t)||(t=new fi);const n=this._scene.canvas;if(n.clientWidth<=0||n.clientHeight<=0)return;const i=this.frustum;return c(i.aspectRatio)&&c(i.fov)&&c(i.near)?function v8e(e,t,n){const i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=Math.tan(.5*e.frustum.fovy),a=e.frustum.aspectRatio*s,l=e.frustum.near,u=2/o*t.x-1,d=2/r*(r-t.y)-1,h=e.positionWC;f.clone(h,n.origin);const m=f.multiplyByScalar(e.directionWC,l,E8e);f.add(h,m,m);const _=f.multiplyByScalar(e.rightWC,u*l*a,w8e),p=f.multiplyByScalar(e.upWC,d*l*s,S8e),y=f.add(m,_,n.direction);return f.add(y,p,y),f.subtract(y,h,y),f.normalize(y,y),n}(this,e,t):function D8e(e,t,n){const i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight;let s=e.frustum;const a=s.offCenterFrustum;c(a)&&(s=a);let l=2/o*t.x-1;l*=.5*(s.right-s.left);let u=2/r*(r-t.y)-1;u*=.5*(s.top-s.bottom);const d=n.origin;return f.clone(e.position,d),f.multiplyByScalar(e.right,l,QD),f.add(QD,d,d),f.multiplyByScalar(e.up,u,QD),f.add(QD,d,d),f.clone(e.directionWC,n.direction),(e._mode===ce.COLUMBUS_VIEW||e._mode===ce.SCENE2D)&&f.fromElements(n.origin.z,n.origin.x,n.origin.y,n.origin),n}(this,e,t)};const I8e=new f,P8e=new f;fn.prototype.distanceToBoundingSphere=function(e){if(!c(e))throw new E("boundingSphere is required.");const t=f.subtract(this.positionWC,e.center,I8e),n=f.multiplyByScalar(this.directionWC,f.dot(t,this.directionWC),P8e);return Math.max(0,f.magnitude(n)-e.radius)};const O8e=new G;fn.prototype.getPixelSize=function(e,t,n){if(!c(e))throw new E("boundingSphere is required.");if(!c(t))throw new E("drawingBufferWidth is required.");if(!c(n))throw new E("drawingBufferHeight is required.");const i=this.distanceToBoundingSphere(e),o=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,O8e);return Math.max(o.x,o.y)};const R8e=new f,N$=new f,N8e=new f,M8e=new f;fn.prototype.createCorrectPositionTween=function(e){if(!c(e))throw new E("duration is required.");if(this._mode===ce.COLUMBUS_VIEW)return function F8e(e,t){let n=e.position;const i=e.direction,o=e.worldToCameraCoordinatesVector(f.UNIT_X,R8e),r=-f.dot(o,n)/f.dot(o,i),s=f.add(n,f.multiplyByScalar(i,r,N$),N$);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,N8e);const a=Math.tan(.5*e.frustum.fovy),l=e.frustum.aspectRatio*a,u=f.magnitude(f.subtract(n,s,M8e)),h=a*u,m=e._maxCoord.x,_=e._maxCoord.y,p=Math.max(l*u-m,m),y=Math.max(h-_,_);if((n.z<-p||n.z>p||n.y<-y||n.y>y)&&(s.y<-p||s.y>p||s.z<-y||s.z>y))return function L8e(e,t,n,i,o,r){const s=f.clone(t);return 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),{easingFunction:Pc.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:r,update:function a(l){const u=f.lerp(t,s,l.time,new f);e.worldToCameraCoordinatesPoint(u,e.position)}}}(e,n,s,p,y,t)}(this,e)};const B8e=new f,bs={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};function M$(e,t,n){n=Hx.clone(c(n)?n:fn.DEFAULT_OFFSET);const i=e._scene.screenSpaceCameraController.minimumZoomDistance,o=e._scene.screenSpaceCameraController.maximumZoomDistance,r=n.range;if(!c(r)||0===r){const s=t.radius;n.range=0===s?100:e.frustum instanceof $n||e._mode===ce.SCENE2D?function U8e(e,t){let n=e.frustum;const i=n.offCenterFrustum;let o,r;c(i)&&(n=i);const s=n.right/n.top,a=t*s;return t>a?(o=t,r=o/s):(r=t,o=a),1.5*Math.max(o,r)}(e,s):function k8e(e,t){const n=e.frustum,i=Math.tan(.5*n.fovy);return Math.max(t/(n.aspectRatio*i),t/i)}(e,s),n.range=O.clamp(n.range,i,o)}return n}fn.prototype.cancelFlight=function(){c(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)},fn.prototype.completeFlight=function(){if(c(this._currentFlight)){this._currentFlight.cancelTween();const e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}};e.destination=bs.destination,e.orientation.heading=bs.heading,e.orientation.pitch=bs.pitch,e.orientation.roll=bs.roll,this.setView(e),c(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}},fn.prototype.flyTo=function(e){let t=(e=g(e,g.EMPTY_OBJECT)).destination;if(!c(t))throw new E("destination is required.");if(this._mode===ce.MORPHING)return;this.cancelFlight();const i=t instanceof Ce;i&&(t=this.getRectangleCameraCoordinates(t,B8e));let o=g(e.orientation,g.EMPTY_OBJECT);if(c(o.direction)&&(o=E$(this,t,o,pB.orientation)),c(e.duration)&&e.duration<=0){const d=pB;return d.destination=e.destination,d.orientation.heading=o.heading,d.orientation.pitch=o.pitch,d.orientation.roll=o.roll,d.convert=e.convert,d.endTransform=e.endTransform,this.setView(d),void("function"==typeof e.complete&&e.complete())}const r=this;let s;bs.destination=t,bs.heading=o.heading,bs.pitch=o.pitch,bs.roll=o.roll,bs.duration=e.duration,bs.complete=function(){s===r._currentFlight&&(r._currentFlight=void 0),c(e.complete)&&e.complete()},bs.cancel=e.cancel,bs.endTransform=e.endTransform,bs.convert=!i&&e.convert,bs.maximumHeight=e.maximumHeight,bs.pitchAdjustHeight=e.pitchAdjustHeight,bs.flyOverLongitude=e.flyOverLongitude,bs.flyOverLongitudeWeight=e.flyOverLongitudeWeight,bs.easingFunction=e.easingFunction;const a=this._scene,l=gHe.createTween(a,bs);if(0===l.duration)return void("function"==typeof l.complete&&l.complete());s=a.tweens.add(l),this._currentFlight=s;let u=this._scene.preloadFlightCamera;this._mode!==ce.SCENE2D&&(c(u)||(u=fn.clone(this)),u.setView({destination:t,orientation:o}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))},fn.prototype.viewBoundingSphere=function(e,t){if(!c(e))throw new E("boundingSphere is required.");if(this._mode===ce.MORPHING)throw new E("viewBoundingSphere is not supported while morphing.");t=M$(this,e,t),this.lookAt(e.center,t)};const V8e=new k,H8e=new f,G8e=new f,j8e=new f,W8e=new f,q8e=new fe,Y8e=new yt,X8e=new ne;fn.prototype.flyToBoundingSphere=function(e,t){if(!c(e))throw new E("boundingSphere is required.");t=g(t,g.EMPTY_OBJECT);const n=this._mode===ce.SCENE2D||this._mode===ce.COLUMBUS_VIEW;this._setTransform(k.IDENTITY);const i=M$(this,e,t.offset);let o;o=n?f.multiplyByScalar(f.UNIT_Z,i.range,H8e):O$(i.heading,i.pitch,i.range);const r=Rn.eastNorthUpToFixedFrame(e.center,ge.WGS84,V8e);let s,a;if(k.multiplyByPoint(r,o,o),!n){if(s=f.subtract(e.center,o,G8e),f.normalize(s,s),a=k.multiplyByPointAsVector(r,f.UNIT_Z,j8e),1-Math.abs(f.dot(s,a))<O.EPSILON6){const u=yt.fromAxisAngle(s,i.heading,Y8e),d=ne.fromQuaternion(u,X8e);f.fromCartesian4(k.getColumn(r,1,q8e),a),ne.multiplyByVector(d,a,a)}const l=f.cross(s,a,W8e);f.cross(l,s,a),f.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})};const F$=new f,B$=new f,_B=new f,k$=new f,pC=[new f,new f,new f,new f],gB=new G,$8e=new f,Am=[new Se,new Se,new Se,new Se];function JD(e,t,n,i,o,r){gB.x=e,gB.y=t;const s=i.pickEllipsoid(gB,o,$8e);return c(s)?(Am[n]=o.cartesianToCartographic(s,Am[n]),1):(Am[n]=o.cartesianToCartographic(r[n],Am[n]),0)}fn.prototype.computeViewRectangle=function(e,t){e=g(e,ge.WGS84);const n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new be(f.ZERO,e.maximumRadius);if(n.computeVisibility(i)===Qn.OUTSIDE)return;const r=this._scene.canvas,s=r.clientWidth,a=r.clientHeight;let l=0;const u=function Z8e(e,t){const n=t.radii,o=f.multiplyComponents(t.oneOverRadii,e.positionWC,F$),r=f.magnitude(o),s=f.normalize(o,B$);let a,l;f.equalsEpsilon(s,f.UNIT_Z,O.EPSILON10)?(a=new f(0,1,0),l=new f(0,0,1)):(a=f.normalize(f.cross(f.UNIT_Z,s,_B),_B),l=f.normalize(f.cross(s,a,k$),k$));const u=Math.sqrt(f.magnitudeSquared(o)-1),d=f.multiplyByScalar(s,1/r,F$),h=u/r,m=f.multiplyByScalar(a,h,B$),_=f.multiplyByScalar(l,h,_B),p=f.add(d,_,pC[0]);f.subtract(p,m,p),f.multiplyComponents(n,p,p);const y=f.subtract(d,_,pC[1]);f.subtract(y,m,y),f.multiplyComponents(n,y,y);const A=f.subtract(d,_,pC[2]);f.add(A,m,A),f.multiplyComponents(n,A,A);const x=f.add(d,_,pC[3]);return f.add(x,m,x),f.multiplyComponents(n,x,x),pC}(this,e);if(l+=JD(0,0,0,this,e,u),l+=JD(0,a,1,this,e,u),l+=JD(s,a,2,this,e,u),l+=JD(s,0,3,this,e,u),l<2)return Ce.MAX_VALUE;t=Ce.fromCartographicArray(Am,t);let d=0,h=Am[3].longitude;for(let m=0;m<4;++m){const _=Am[m].longitude,p=Math.abs(_-h);d+=p>O.PI?O.TWO_PI-p:p,h=_}return O.equalsEpsilon(Math.abs(d),O.TWO_PI,O.EPSILON9)&&(t.west=-O.PI,t.east=O.PI,Am[0].latitude>=0?t.north=O.PI_OVER_TWO:t.south=-O.PI_OVER_TWO),t},fn.prototype.switchToPerspectiveFrustum=function(){if(this._mode===ce.SCENE2D||this.frustum instanceof Po)return;const e=this._scene;this.frustum=new Po,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=O.toRadians(60)},fn.prototype.switchToOrthographicFrustum=function(){if(this._mode===ce.SCENE2D||this.frustum instanceof $n)return;const e=x$(this),t=this._scene;this.frustum=new $n,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e},fn.clone=function(e,t){return c(t)||(t=new fn(e._scene)),f.clone(e.position,t.position),f.clone(e.direction,t.direction),f.clone(e.up,t.up),f.clone(e.right,t.right),k.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};const pr=fn,wg=function K8e(e){T.typeOf.object("options",e),T.typeOf.number("options.pass",e.pass),this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1},Q8e=100,mC="#ffffff",yB="#48b";function z$(e,t){this.credit=e,this.count=g(t,1)}const V$="cesium-credit-delimiter";function H$(e){const t=document.createElement("span");return t.textContent=e,t.className=V$,t}function G$(e,t){if(c(t)){const n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function j$(e,t,n,i){const o=e.childNodes;let r=-1;t.sort(function(s,a){return a.count-s.count});for(let s=0;s<t.length;++s){const a=t[s].credit;if(c(a)){if(r=s,c(n)&&(r*=2,s>0)){const u=r-1;if(o.length<=u)e.appendChild(H$(n));else{const d=o[u];d.className!==V$&&e.replaceChild(H$(n),d)}}const l=a.element;if(o.length<=r)e.appendChild(G$(l,i));else{const u=o[r];u._creditId!==a._id&&e.replaceChild(G$(l,i),u)}}}for(++r;r<o.length;)e.removeChild(o[r])}function Na(e,t){let n=`${e} {`;for(const i in t)t.hasOwnProperty(i)&&(n+=`${i}: ${t[i]}; `);return n+=" }\n",n}function tr(e,t,n){T.defined("container",e);const i=this;n=g(n,document.body);const o=document.createElement("div");o.className="cesium-credit-lightbox-overlay",n.appendChild(o);const r=document.createElement("div");function s(p){r.contains(p.target)||i.hideLightbox()}r.className="cesium-credit-lightbox",o.appendChild(r),o.addEventListener("click",s,!1);const a=document.createElement("div");a.className="cesium-credit-lightbox-title",a.textContent="Data provided by:",r.appendChild(a);const l=document.createElement("a");l.onclick=this.hideLightbox.bind(this),l.innerHTML="×",l.className="cesium-credit-lightbox-close",r.appendChild(l);const u=document.createElement("ul");r.appendChild(u);const d=document.createElement("div");d.className="cesium-credit-logoContainer",d.style.display="inline",e.appendChild(d);const h=document.createElement("div");h.className="cesium-credit-textContainer",h.style.display="inline",e.appendChild(h);const m=document.createElement("a");m.className="cesium-credit-expand-link",m.onclick=this.showLightbox.bind(this),m.textContent="Data attribution",e.appendChild(m),function n5e(e){let t="";t+=Na(".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+=Na(".cesium-credit-lightbox",{"background-color":"#303336",color:mC,position:"relative","min-height":`${Q8e}px`,margin:"auto"}),t+=Na(".cesium-credit-lightbox > ul > li a, .cesium-credit-lightbox > ul > li a:visited",{color:mC}),t+=Na(".cesium-credit-lightbox > ul > li a:hover",{color:yB}),t+=Na(".cesium-credit-lightbox.cesium-credit-lightbox-expanded",{border:"1px solid #444","border-radius":"5px","max-width":"370px"}),t+=Na(".cesium-credit-lightbox.cesium-credit-lightbox-mobile",{height:"100%",width:"100%"}),t+=Na(".cesium-credit-lightbox-title",{padding:"20px 20px 0 20px"}),t+=Na(".cesium-credit-lightbox-close",{"font-size":"18pt",cursor:"pointer",position:"absolute",top:"0",right:"6px",color:mC}),t+=Na(".cesium-credit-lightbox-close:hover",{color:yB}),t+=Na(".cesium-credit-lightbox > ul",{margin:"0",padding:"12px 20px 12px 40px","font-size":"13px"}),t+=Na(".cesium-credit-lightbox > ul > li",{"padding-bottom":"6px"}),t+=Na(".cesium-credit-lightbox > ul > li *",{padding:"0",margin:"0"}),t+=Na(".cesium-credit-expand-link",{"padding-left":"5px",cursor:"pointer","text-decoration":"underline",color:mC}),t+=Na(".cesium-credit-expand-link:hover",{color:yB}),t+=Na(".cesium-credit-text",{color:mC}),t+=Na(".cesium-credit-textContainer *, .cesium-credit-logoContainer *",{display:"inline"});const i=g(function n(r){if(r.shadowRoot)return r.shadowRoot;if(r.getRootNode){const s=r.getRootNode();if(s instanceof ShadowRoot)return s}}(e),document.head),o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}(e);const _=qn.clone(tr.cesiumCredit);this._delimiter=g(t," \u2022 "),this._screenContainer=h,this._cesiumCreditContainer=d,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=r,this._creditList=u,this._lightbox=o,this._hideLightbox=s,this._expandLink=m,this._expanded=!1,this._staticCredits=[],this._cesiumCredit=_,this._previousCesiumCredit=void 0,this._currentCesiumCredit=_,this._creditDisplayElementPool=[],this._creditDisplayElementIndex=0,this._currentFrameCredits={screenCredits:new _n,lightboxCredits:new _n},this._defaultCredit=void 0,this.viewport=n,this.container=e}function W$(e,t,n,i){i=g(i,1);let o=t.get(n.id);if(c(o))o.count<Number.MAX_VALUE&&(o.count+=i);else{const r=e._creditDisplayElementPool,s=e._creditDisplayElementPoolIndex;s<r.length?(o=r[s],o.credit=n,o.count=i):(o=new z$(n,i),r.push(o)),++e._creditDisplayElementPoolIndex,t.set(n.id,o)}}let eI;function q$(){if(!c(eI)){let e=ni("Assets/Images/ion-credit.png");0!==e.indexOf("http://")&&0!==e.indexOf("https://")&&0!==e.indexOf("data:")&&(e=new Hs(e).path()),eI=new qn(`<a href="https://cesium.com/" target="_blank"><img src="${e}" title="Cesium ion"/></a>`,!0)}return tr._cesiumCreditInitialized||(tr._cesiumCredit=eI,tr._cesiumCreditInitialized=!0),eI}tr.prototype.addCreditToNextFrame=function(e){if(T.defined("credit",e),e.isIon())return c(this._defaultCredit)||(this._defaultCredit=qn.clone(q$())),void(this._currentCesiumCredit=this._defaultCredit);let t;t=e.showOnScreen?this._currentFrameCredits.screenCredits:this._currentFrameCredits.lightboxCredits,W$(this,t,e)},tr.prototype.addStaticCredit=function(e){T.defined("credit",e);const t=this._staticCredits;(function J8e(e,t){const n=e.length;for(let i=0;i<n;i++)if(qn.equals(e[i],t))return!0;return!1})(t,e)||t.push(e)},tr.prototype.removeStaticCredit=function(e){T.defined("credit",e);const t=this._staticCredits,n=t.indexOf(e);-1!==n&&t.splice(n,1)},tr.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0},tr.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1},tr.prototype.update=function(){this._expanded&&function t5e(e){const t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<576?(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(.5*(i-t.clientHeight))}px`),e._lastViewportWidth=n),n>=576&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor(.5*(i-t.clientHeight))}px`,e._lastViewportHeight=i)}(this)},tr.prototype.beginFrame=function(){const e=this._currentFrameCredits;this._creditDisplayElementPoolIndex=0;const t=e.screenCredits,n=e.lightboxCredits;t.removeAll(),n.removeAll();const i=this._staticCredits;for(let o=0;o<i.length;++o){const r=i[o],s=r.showOnScreen?t:n;r.isIon()&&qn.equals(tr.cesiumCredit,this._cesiumCredit)||W$(this,s,r,Number.MAX_VALUE)}qn.equals(tr.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=qn.clone(tr.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit},tr.prototype.endFrame=function(){j$(this._screenContainer,this._currentFrameCredits.screenCredits.values,this._delimiter,void 0);const t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",j$(this._creditList,t,void 0,"li"),function e5e(e){const t=e._previousCesiumCredit,n=e._currentCesiumCredit;qn.equals(n,t)||(c(t)&&e._cesiumCreditContainer.removeChild(t.element),c(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}(this)},tr.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),Ye(this)},tr.prototype.isDestroyed=function(){return!1},tr._cesiumCredit=void 0,tr._cesiumCreditInitialized=!1,Object.defineProperties(tr,{cesiumCredit:{get:function(){return q$(),tr._cesiumCredit},set:function(e){tr._cesiumCredit=e,tr._cesiumCreditInitialized=!0}}}),tr.CreditDisplayElement=z$;const i5e=tr;function Sg(e){T.typeOf.object("options",e),T.typeOf.object("options.frustum",e.frustum),T.typeOf.object("options.origin",e.origin),T.typeOf.object("options.orientation",e.orientation);const t=e.frustum,n=e.orientation,i=e.origin,o=g(e.vertexFormat,et.DEFAULT),r=g(e._drawNearPlane,!0);let s,a;t instanceof Po?(s=0,a=Po.packedLength):t instanceof $n&&(s=1,a=$n.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=f.clone(i),this._orientation=yt.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+f.packedLength+yt.packedLength+et.packedLength}Sg.pack=function(e,t,n){T.typeOf.object("value",e),T.defined("array",t),n=g(n,0);const i=e._frustumType,o=e._frustum;return t[n++]=i,0===i?(Po.pack(o,t,n),n+=Po.packedLength):($n.pack(o,t,n),n+=$n.packedLength),f.pack(e._origin,t,n),yt.pack(e._orientation,t,n+=f.packedLength),et.pack(e._vertexFormat,t,n+=yt.packedLength),t[n+=et.packedLength]=e._drawNearPlane?1:0,t};const r5e=new Po,s5e=new $n,a5e=new yt,c5e=new f,l5e=new et;function yb(e,t,n,i,o,r,s,a){const l=e/3*2;for(let u=0;u<4;++u)c(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.z),c(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),c(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e+=3;o[l]=0,o[l+1]=0,o[l+2]=1,o[l+3]=0,o[l+4]=1,o[l+5]=1,o[l+6]=0,o[l+7]=1}Sg.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=e[t++];let o;0===i?(o=Po.unpack(e,t,r5e),t+=Po.packedLength):(o=$n.unpack(e,t,s5e),t+=$n.packedLength);const r=f.unpack(e,t,c5e),s=yt.unpack(e,t+=f.packedLength,a5e),a=et.unpack(e,t+=yt.packedLength,l5e),l=1===e[t+=et.packedLength];return c(n)?(n._frustum=o.clone(i===n._frustumType?n._frustum:void 0),n._frustumType=i,n._origin=f.clone(r,n._origin),n._orientation=yt.clone(s,n._orientation),n._vertexFormat=et.clone(a,n._vertexFormat),n._drawNearPlane=l,n):new Sg({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:l})};const u5e=new ne,d5e=new k,bB=new k,Y$=new f,X$=new f,Z$=new f,f5e=new f,h5e=new f,p5e=new f,Tm=new Array(3),_C=new Array(4);_C[0]=new fe(-1,-1,1,1),_C[1]=new fe(1,-1,1,1),_C[2]=new fe(1,1,1,1),_C[3]=new fe(-1,1,1,1);const $$=new Array(4);for(let e=0;e<4;++e)$$[e]=new fe;Sg._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){const l=ne.fromQuaternion(t,u5e);let u=g(r,Y$),d=g(s,X$),h=g(a,Z$);u=ne.getColumn(l,0,u),d=ne.getColumn(l,1,d),h=ne.getColumn(l,2,h),f.normalize(u,u),f.normalize(d,d),f.normalize(h,h),f.negate(u,u);const m=k.computeView(e,h,d,u,d5e);let _,p;if(0===n){const A=k.multiply(i.projectionMatrix,m,bB);p=k.inverse(A,bB)}else _=k.inverseTransformation(m,bB);c(p)?(Tm[0]=i.near,Tm[1]=i.far):(Tm[0]=0,Tm[1]=i.near,Tm[2]=i.far);for(let A=0;A<2;++A)for(let x=0;x<4;++x){let C=fe.clone(_C[x],$$[x]);if(c(p)){C=k.multiplyByVector(p,C,C),f.multiplyByScalar(C,1/C.w,C),f.subtract(C,e,C),f.normalize(C,C);const v=f.dot(h,C);f.multiplyByScalar(C,Tm[A]/v,C),f.add(C,e,C)}else{const w=i.offCenterFrustum;c(w)&&(i=w);const v=Tm[A],D=Tm[A+1];C.x=.5*(C.x*(i.right-i.left)+i.left+i.right),C.y=.5*(C.y*(i.top-i.bottom)+i.bottom+i.top),C.z=.5*(C.z*(v-D)-v-D),C.w=1,k.multiplyByVector(_,C,C)}o[12*A+3*x]=C.x,o[12*A+3*x+1]=C.y,o[12*A+3*x+2]=C.z}},Sg.createGeometry=function(e){const t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=e._vertexFormat,a=r?6:5;let l=new Float64Array(72);Sg._computeNearFarPlanes(i,o,t,n,l);let u=24;l[u]=l[12],l[u+1]=l[13],l[u+2]=l[14],l[u+3]=l[0],l[u+4]=l[1],l[u+5]=l[2],l[u+6]=l[9],l[u+7]=l[10],l[u+8]=l[11],l[u+9]=l[21],l[u+10]=l[22],l[u+11]=l[23],u+=12,l[u]=l[15],l[u+1]=l[16],l[u+2]=l[17],l[u+3]=l[3],l[u+4]=l[4],l[u+5]=l[5],l[u+6]=l[0],l[u+7]=l[1],l[u+8]=l[2],l[u+9]=l[12],l[u+10]=l[13],l[u+11]=l[14],u+=12,l[u]=l[3],l[u+1]=l[4],l[u+2]=l[5],l[u+3]=l[15],l[u+4]=l[16],l[u+5]=l[17],l[u+6]=l[18],l[u+7]=l[19],l[u+8]=l[20],l[u+9]=l[6],l[u+10]=l[7],l[u+11]=l[8],u+=12,l[u]=l[6],l[u+1]=l[7],l[u+2]=l[8],l[u+3]=l[18],l[u+4]=l[19],l[u+5]=l[20],l[u+6]=l[21],l[u+7]=l[22],l[u+8]=l[23],l[u+9]=l[9],l[u+10]=l[10],l[u+11]=l[11],r||(l=l.subarray(12));const d=new lo({position:new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:l})});if(c(s.normal)||c(s.tangent)||c(s.bitangent)||c(s.st)){const m=c(s.normal)?new Float32Array(12*a):void 0,_=c(s.tangent)?new Float32Array(12*a):void 0,p=c(s.bitangent)?new Float32Array(12*a):void 0,y=c(s.st)?new Float32Array(8*a):void 0,A=Y$,x=X$,C=Z$,w=f.negate(A,f5e),v=f.negate(x,h5e),D=f.negate(C,p5e);u=0,r&&(yb(u,m,_,p,y,D,A,x),u+=12),yb(u,m,_,p,y,C,w,x),u+=12,yb(u,m,_,p,y,w,D,x),u+=12,yb(u,m,_,p,y,v,D,w),u+=12,yb(u,m,_,p,y,A,C,x),u+=12,yb(u,m,_,p,y,x,C,w),c(m)&&(d.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:m})),c(_)&&(d.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:_})),c(p)&&(d.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:p})),c(y)&&(d.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:y}))}const h=new Uint16Array(6*a);for(let m=0;m<a;++m){const _=6*m,p=4*m;h[_]=p,h[_+1]=p+1,h[_+2]=p+2,h[_+3]=p,h[_+4]=p+2,h[_+5]=p+3}return new Cn({attributes:d,indices:h,primitiveType:At.TRIANGLES,boundingSphere:be.fromVertices(l)})};const K$=Sg;function gC(e){T.typeOf.object("options",e),T.typeOf.object("options.frustum",e.frustum),T.typeOf.object("options.origin",e.origin),T.typeOf.object("options.orientation",e.orientation);const t=e.frustum,n=e.orientation,i=e.origin,o=g(e._drawNearPlane,!0);let r,s;t instanceof Po?(r=0,s=Po.packedLength):t instanceof $n&&(r=1,s=$n.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=f.clone(i),this._orientation=yt.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+f.packedLength+yt.packedLength}gC.pack=function(e,t,n){T.typeOf.object("value",e),T.defined("array",t),n=g(n,0);const i=e._frustumType,o=e._frustum;return t[n++]=i,0===i?(Po.pack(o,t,n),n+=Po.packedLength):($n.pack(o,t,n),n+=$n.packedLength),f.pack(e._origin,t,n),yt.pack(e._orientation,t,n+=f.packedLength),t[n+=yt.packedLength]=e._drawNearPlane?1:0,t};const _5e=new Po,g5e=new $n,y5e=new yt,b5e=new f;gC.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=e[t++];let o;0===i?(o=Po.unpack(e,t,_5e),t+=Po.packedLength):(o=$n.unpack(e,t,g5e),t+=$n.packedLength);const r=f.unpack(e,t,b5e),s=yt.unpack(e,t+=f.packedLength,y5e),a=1===e[t+=yt.packedLength];return c(n)?(n._frustum=o.clone(i===n._frustumType?n._frustum:void 0),n._frustumType=i,n._origin=f.clone(r,n._origin),n._orientation=yt.clone(s,n._orientation),n._drawNearPlane=a,n):new gC({frustum:o,origin:r,orientation:s,_drawNearPlane:a})},gC.createGeometry=function(e){const t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(24);K$._computeNearFarPlanes(i,o,t,n,s);const a=new lo({position:new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:s})});let l,u;const d=r?2:1,h=new Uint16Array(8*(d+1));let m=r?0:1;for(;m<2;++m)l=r?8*m:0,u=4*m,h[l]=u,h[l+1]=u+1,h[l+2]=u+1,h[l+3]=u+2,h[l+4]=u+2,h[l+5]=u+3,h[l+6]=u+3,h[l+7]=u;for(m=0;m<2;++m)l=8*(d+m),u=4*m,h[l]=u,h[l+1]=u+4,h[l+2]=u+1,h[l+3]=u+5,h[l+4]=u+2,h[l+5]=u+6,h[l+6]=u+3,h[l+7]=u+7;return new Cn({attributes:a,indices:h,primitiveType:At.LINES,boundingSphere:be.fromVertices(s)})};const A5e=gC;function nI(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.camera))throw new E("options.camera is required.");this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=g(e.color,X.CYAN),this._updateOnChange=g(e.updateOnChange,!0),this.show=g(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}const T5e=new f,x5e=new ne,C5e=new yt,E5e=new Po,w5e=new xg,S5e=new $n,v5e=new qa,D5e=new X,I5e=[1,1e5];nI.prototype.update=function(e){if(!this.show)return;const t=this._planesPrimitives,n=this._outlinePrimitives;let 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(0===t.length){const r=this._camera,s=r.frustum;let a;a=s instanceof Po?E5e:s instanceof xg?w5e:s instanceof $n?S5e:v5e,a=s.clone(a);let l,u=this._frustumSplits;!c(u)||u.length<=1?(u=I5e,u[0]=this._camera.frustum.near,u[1]=this._camera.frustum.far,l=1):l=u.length-1;const d=r.positionWC,h=r.directionWC,m=r.upWC;let _=r.rightWC;_=f.negate(_,T5e);const p=x5e;ne.setColumn(p,0,_,p),ne.setColumn(p,1,m,p),ne.setColumn(p,2,h,p);const y=yt.fromRotationMatrix(p,C5e);for(t.length=n.length=l,i=0;i<l;++i)a.near=u[i],a.far=u[i+1],t[i]=new Xi({geometryInstances:new Un({geometry:new K$({origin:d,orientation:y,frustum:a,_drawNearPlane:0===i}),attributes:{color:ti.fromColor(X.fromAlpha(this._color,.1,D5e))},id:this.id,pickPrimitive:this}),appearance:new yi({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new Xi({geometryInstances:new Un({geometry:new A5e({origin:d,orientation:y,frustum:a,_drawNearPlane:0===i}),attributes:{color:ti.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new yi({translucent:!1,flat:!0}),asynchronous:!1})}for(o=t.length,i=0;i<o;++i)n[i].update(e),t[i].update(e)},nI.prototype.isDestroyed=function(){return!1},nI.prototype.destroy=function(){const 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 Ye(this)};const yC=nI;function bC(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=g(e,0)}const AC=zn.supportsTypedArrays()?new Float32Array(12):[],Q$=new f,J$=new f,TB=new f,eK=new f,iI=new f;bC.prototype.update=function(e){if(this._mode=e.mode,e.mode!==ce.SCENE3D)return;const t=e.context,n=e.mapProjection.ellipsoid.radii,i=new ge(n.x+this._ellipsoidOffset,n.y+this._ellipsoidOffset,n.z+this._ellipsoidOffset),o=e.useLogDepth;if(c(this._command)||(this._rs=Pt.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new Zt({renderState:this._rs,boundingVolume:new be(f.ZERO,i.maximumRadius),pass:ze.OPAQUE,owner:this})),!c(this._sp)||this._useLogDepth!==o){this._useLogDepth=o;const s=new Et({sources:["in vec4 position;\n\nout vec4 positionEC;\n\nvoid main()\n{\n positionEC = czm_modelView * position;\n gl_Position = czm_projection * positionEC;\n\n czm_vertexLogDepth();\n}\n"]}),a=new Et({sources:["in vec4 positionEC;\n\nvoid main()\n{\n vec3 position;\n vec3 direction;\n if (czm_orthographicIn3D == 1.0)\n {\n vec2 uv = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw;\n vec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y); // left, bottom\n vec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x); // right, top\n position = vec3(mix(minPlane, maxPlane, uv), 0.0);\n direction = vec3(0.0, 0.0, -1.0);\n } \n else \n {\n position = vec3(0.0);\n direction = normalize(positionEC.xyz);\n }\n\n czm_ray ray = czm_ray(position, direction);\n\n vec3 ellipsoid_center = czm_view[3].xyz;\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n if (!czm_isEmpty(intersection))\n {\n out_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n }\n else\n {\n discard;\n }\n\n czm_writeLogDepth();\n}\n"]});o&&(a.defines.push("LOG_DEPTH"),s.defines.push("LOG_DEPTH")),this._sp=mi.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}const r=function L5e(e,t){const n=e.radii,i=t.camera;let o,r,s;if(i.frustum instanceof $n)o=f.ZERO,r=i.rightWC,s=i.upWC;else{const m=f.multiplyComponents(e.oneOverRadii,i.positionWC,Q$),_=f.normalize(m,J$),p=f.normalize(f.cross(f.UNIT_Z,m,TB),TB),y=f.normalize(f.cross(_,p,eK),eK),A=f.magnitude(m),x=Math.sqrt(A*A-1);o=f.multiplyByScalar(_,1/A,Q$);const C=x/A;r=f.multiplyByScalar(p,C,J$),s=f.multiplyByScalar(y,C,TB)}const a=f.add(o,s,iI);f.subtract(a,r,a),f.multiplyComponents(n,a,a),f.pack(a,AC,0);const l=f.subtract(o,s,iI);f.subtract(l,r,l),f.multiplyComponents(n,l,l),f.pack(l,AC,3);const u=f.add(o,s,iI);f.add(u,r,u),f.multiplyComponents(n,u,u),f.pack(u,AC,6);const d=f.subtract(o,s,iI);return f.add(d,r,d),f.multiplyComponents(n,d,d),f.pack(d,AC,9),AC}(i,e);if(c(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(r);else{const s=new Cn({attributes:{position:new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:r})},indices:[0,1,2,2,1,3],primitiveType:At.TRIANGLES});this._va=ds.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:Tt.DYNAMIC_DRAW}),this._command.vertexArray=this._va}},bC.prototype.execute=function(e,t){this._mode===ce.SCENE3D&&this._command.execute(e,t)},bC.prototype.isDestroyed=function(){return!1},bC.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};const R5e=bC;function TC(){}const N5e=/\bgl_FragDepth\b/,M5e=/\bdiscard\b/;TC.createDepthOnlyDerivedCommand=function(e,t,n,i){let o,r;return c(i)||(i={}),c(i.depthOnlyCommand)&&(o=i.depthOnlyCommand.shaderProgram,r=i.depthOnlyCommand.renderState),i.depthOnlyCommand=Zt.shallowClone(t,i.depthOnlyCommand),c(o)&&i.shaderProgramId===t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=o,i.depthOnlyCommand.renderState=r):(i.depthOnlyCommand.shaderProgram=function F5e(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!c(n)){const i=t._attributeLocations;let r,o=t.fragmentShaderSource,s=!1;const a=o.sources;let l=a.length;for(r=0;r<l;++r)if(N5e.test(a[r])||M5e.test(a[r])){s=!0;break}let u=!1;const d=o.defines;for(l=d.length,r=0;r<l;++r)if("LOG_DEPTH"===d[r]){u=!0;break}let h;s||u?!s&&u&&(h="void main() \n{ \n out_FragColor = vec4(1.0); \n czm_writeLogDepth(); \n} \n",o=new Et({defines:["LOG_DEPTH"],sources:[h]})):(h="void main() \n{ \n out_FragColor = vec4(1.0); \n} \n",o=new Et({sources:[h]})),n=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:i})}return n}(n,t.shaderProgram),i.depthOnlyCommand.renderState=function B5e(e,t){const n=e._depthOnlyRenderStateCache;let i=n[t.id];if(!c(i)){const o=Pt.getState(t);o.depthMask=!0,o.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i=Pt.fromCache(o),n[t.id]=i}return i}(e,t.renderState),i.shaderProgramId=t.shaderProgram.id),i};const k5e=/\s+czm_writeLogDepth\(/,U5e=/\s+czm_vertexLogDepth\(/;TC.createLogDepthCommand=function(e,t,n){let i;return c(n)||(n={}),c(n.command)&&(i=n.command.shaderProgram),n.command=Zt.shallowClone(e,n.command),c(i)&&n.shaderProgramId===e.shaderProgram.id?n.command.shaderProgram=i:(n.command.shaderProgram=function z5e(e,t){if(t.fragmentShaderSource.defines.indexOf("LOG_DEPTH_READ_ONLY")>=0)return t;let i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!c(i)){const o=t._attributeLocations,r=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();r.defines=c(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),s.defines=c(s.defines)?s.defines.slice(0):[],s.defines.push("LOG_DEPTH");let a,l,u=!1,d=r.sources,h=d.length;for(a=0;a<h;++a)if(U5e.test(d[a])){u=!0;break}if(!u){for(a=0;a<h;++a)d[a]=Et.replaceMain(d[a],"czm_log_depth_main");l="\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",d.push(l)}for(d=s.sources,h=d.length,u=!1,a=0;a<h;++a)k5e.test(d[a])&&(u=!0);-1!==s.defines.indexOf("LOG_DEPTH_WRITE")&&(u=!0);let m="";if(!u){for(a=0;a<h;a++)d[a]=Et.replaceMain(d[a],"czm_log_depth_main");m+="\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}d.push(m),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o})}return i}(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id),n},TC.createPickDerivedCommand=function(e,t,n,i){let o,r;return c(i)||(i={}),c(i.pickCommand)&&(o=i.pickCommand.shaderProgram,r=i.pickCommand.renderState),i.pickCommand=Zt.shallowClone(t,i.pickCommand),c(o)&&i.shaderProgramId===t.shaderProgram.id?(i.pickCommand.shaderProgram=o,i.pickCommand.renderState=r):(i.pickCommand.shaderProgram=function V5e(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!c(i)){const o=t._attributeLocations;let r=t.fragmentShaderSource;const s=r.sources,a=s.length,u=s.some(m=>m.includes("out_FragData"))?"out_FragData_0":"out_FragColor",d=`void main () \n{ \n czm_non_pick_main(); \n if (${u}.a == 0.0) { \n discard; \n } \n ${u} = ${n}; \n} `,h=new Array(a+1);for(let m=0;m<a;++m)h[m]=Et.replaceMain(s[m],"czm_non_pick_main");h[a]=d,r=new Et({sources:h,defines:r.defines}),i=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:o})}return i}(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=function H5e(e,t){const n=e.picking.pickRenderStateCache;let i=n[t.id];if(!c(i)){const o=Pt.getState(t);o.blending.enabled=!1,o.depthMask=!0,i=Pt.fromCache(o),n[t.id]=i}return i}(e,t.renderState),i.shaderProgramId=t.shaderProgram.id),i},TC.createHdrCommand=function(e,t,n){let i;return c(n)||(n={}),c(n.command)&&(i=n.command.shaderProgram),n.command=Zt.shallowClone(e,n.command),c(i)&&n.shaderProgramId===e.shaderProgram.id?n.command.shaderProgram=i:(n.command.shaderProgram=function G5e(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(!c(n)){const i=t._attributeLocations,o=t.vertexShaderSource.clone(),r=t.fragmentShaderSource.clone();o.defines=c(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),r.defines=c(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),n=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:i})}return n}(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id),n};const xC=TC;function oI(e){if(!c(e))throw new E("scene is required.");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;const t=this;function n(i){const o=i.alpha;if(!c(o))return t._alpha=void 0,t._beta=void 0,void(t._gamma=void 0);t._alpha=O.toRadians(o),t._beta=O.toRadians(i.beta),t._gamma=O.toRadians(i.gamma)}window.addEventListener("deviceorientation",n,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",n,!1)}}const j5e=new yt,tK=new yt,W5e=new ne;oI.prototype.update=function(){c(this._alpha)&&(c(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma),function q5e(e,t,n,i){const o=e.direction,r=e.right,s=e.up,a=yt.fromAxisAngle(o,n,tK),l=yt.fromAxisAngle(r,i,j5e),u=yt.multiply(l,a,l),d=yt.fromAxisAngle(s,t,tK);yt.multiply(d,u,u);const h=ne.fromQuaternion(u,W5e);ne.multiplyByVector(h,r,r),ne.multiplyByVector(h,s,s),ne.multiplyByVector(h,o,o)}(this._scene.camera,-(this._lastAlpha-this._alpha),this._lastBeta-this._beta,this._lastGamma-this._gamma),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma)},oI.prototype.isDestroyed=function(){return!1},oI.prototype.destroy=function(){return this._removeListener(),Ye(this)};const Y5e=oI;function nK(){this.enabled=!0,this.renderable=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}const rI=[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],rf=[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<rf.length;++e)rf[e]*=1e6;const iK=rf[1],xB=rf[rf.length-1];for(let e=0;e<rf.length;++e)rf[e]=(rf[e]-xB)/(iK-xB);let Fs=0;const Z5e=new f;nK.prototype.update=function(e){if(!(e.fog.enabled=this.enabled))return;e.fog.renderable=this.renderable;const n=e.camera,i=n.positionCartographic;if(!c(i)||i.height>8e5||e.mode!==ce.SCENE3D)return void(e.fog.enabled=!1);const o=i.height,r=function X5e(e){const t=rI,n=t.length;if(e<t[0])return Fs=0,Fs;if(e>t[n-1])return Fs=n-2,Fs;if(e>=t[Fs]){if(Fs+1<n&&e<t[Fs+1])return Fs;if(Fs+2<n&&e<t[Fs+2])return++Fs,Fs}else if(Fs-1>=0&&e>=t[Fs-1])return--Fs,Fs;let i;for(i=0;i<n-2&&!(e>=t[i]&&e<t[i+1]);++i);return Fs=i,Fs}(o),s=O.clamp((o-rI[r])/(rI[r+1]-rI[r]),0,1);let a=O.lerp(rf[r],rf[r+1],s);const l=1e6*this.density;a=a*(l-l/iK*xB)*1e-6;const d=f.normalize(n.positionWC,Z5e);a*=1-Math.abs(f.dot(n.directionWC,d)),e.fog.density=a,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness};const $5e=nK,Q5e=function K5e(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=ce.SCENE3D,this.morphTime=ce.getMorphTime(ce.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,depth:!1,postProcess:!1,offscreen:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.terrainExaggeration=1,this.terrainExaggerationRelativeHeight=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},Bs_OPAQUE_FRONT_FACE=0,Bs_OPAQUE_BACK_FACE=1,Bs_DEPTH_ONLY_FRONT_FACE=2,Bs_DEPTH_ONLY_BACK_FACE=3,Bs_DEPTH_ONLY_FRONT_AND_BACK_FACE=4,Bs_TRANSLUCENT_FRONT_FACE=5,Bs_TRANSLUCENT_BACK_FACE=6,Bs_TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST=7,Bs_TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST=8,Bs_PICK_FRONT_FACE=9,Bs_PICK_BACK_FACE=10,vg=11,oK=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function Dg(){this._frontFaceAlphaByDistance=new Mn(0,1,0,1),this._backFaceAlphaByDistance=new Mn(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(vg),this._derivedBlendCommandTypes=new Array(vg),this._derivedPickCommandTypes=new Array(vg),this._derivedCommandTypesToUpdate=new Array(vg),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}function rK(e,t,n,i){return e?c(n)?(Mn.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 sK(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function CB(e,t,n,i,o){let r=0;const a=e._backFaceTranslucent;if(!e._frontFaceTranslucent)return r;const l=t.cameraUnderground,u=e._requiresManualDepthTest,d=i?Bs_PICK_FRONT_FACE:u?Bs_TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:Bs_TRANSLUCENT_FRONT_FACE,h=i?Bs_PICK_BACK_FACE:u?Bs_TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:Bs_TRANSLUCENT_BACK_FACE;return t.mode===ce.SCENE2D?(o[r++]=Bs_DEPTH_ONLY_FRONT_FACE,o[r++]=d,r):(a?(n||(o[r++]=Bs_DEPTH_ONLY_FRONT_AND_BACK_FACE),l?(o[r++]=d,o[r++]=h):(o[r++]=h,o[r++]=d)):l?(n||(o[r++]=Bs_DEPTH_ONLY_BACK_FACE),o[r++]=Bs_OPAQUE_FRONT_FACE,o[r++]=h):(n||(o[r++]=Bs_DEPTH_ONLY_FRONT_FACE),o[r++]=Bs_OPAQUE_BACK_FACE,o[r++]=d),r)}function Ql(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function aK(e,t){return e.indexOf(t)>-1}function rGe(e,t){Ql(e.defines,"TRANSLUCENT"),Ql(t.defines,"TRANSLUCENT")}function sGe(e,t){Ql(e.defines,"GROUND_ATMOSPHERE"),Ql(t.defines,"GROUND_ATMOSPHERE"),Ql(e.defines,"FOG"),Ql(t.defines,"FOG"),Ql(e.defines,"TRANSLUCENT"),Ql(t.defines,"TRANSLUCENT")}function EB(e,t){aK(t.defines,"TILE_LIMIT_RECTANGLE")||aK(t.defines,"ENABLE_CLIPPING_PLANES")||(t.sources=["void main() \n{ \n out_FragColor = vec4(1.0); \n} \n"])}function wB(e,t){const n=t.sources,i=n.length;for(let r=0;r<i;++r)n[r]=Et.replaceMain(n[r],"czm_globe_translucency_main");n.push("\n\nuniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n#ifdef MANUAL_DEPTH_TEST \n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st)); \n if (logDepthOrDepth != 0.0) \n { \n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); \n float depthEC = eyeCoordinate.z / eyeCoordinate.w; \n if (v_positionEC.z < depthEC) \n { \n discard; \n } \n } \n#endif \n czm_globe_translucency_main(); \n vec4 classificationColor = texture(u_classificationTexture, st); \n if (classificationColor.a > 0.0) \n { \n // Reverse premultiplication process to get the correct composited result of the classification primitives \n classificationColor.rgb /= classificationColor.a; \n } \n out_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + out_FragColor * (1.0 - classificationColor.a); \n} \n")}function cK(e,t){wB(0,t),Ql(e.defines,"GROUND_ATMOSPHERE"),Ql(t.defines,"GROUND_ATMOSPHERE"),Ql(e.defines,"FOG"),Ql(t.defines,"FOG")}function aGe(e,t){wB(0,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function cGe(e,t){cK(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function lK(e,t){t.sources=["uniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n vec4 pickColor = texture(u_classificationTexture, st); \n if (pickColor == vec4(0.0)) \n { \n discard; \n } \n out_FragColor = pickColor; \n} \n"]}function lGe(e,t,n,i,o,r){if(!c(o))return t;if(!i&&c(n))return n;let s=e.shaderCache.getDerivedShaderProgram(t,r);if(!c(s)){const a=t._attributeLocations,l=t.vertexShaderSource.clone(),u=t.fragmentShaderSource.clone();l.defines=c(l.defines)?l.defines.slice(0):[],u.defines=c(u.defines)?u.defines.slice(0):[],o(l,u),s=e.shaderCache.createDerivedShaderProgram(t,r,{vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a})}return s}function uGe(e){e.cull.face=dr.BACK,e.cull.enabled=!0}function dGe(e){e.cull.face=dr.FRONT,e.cull.enabled=!0}function fGe(e){e.cull.face=dr.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function hGe(e){e.cull.face=dr.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function pGe(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function uK(e){e.cull.face=dr.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=Ji.ALPHA_BLEND}function dK(e){e.cull.face=dr.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=Ji.ALPHA_BLEND}function mGe(e){e.cull.face=dr.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function _Ge(e){e.cull.face=dr.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function gGe(e,t,n,i,o){if(!c(i))return e;if(!n&&c(t))return t;let r=o[e.id];if(!c(r)){const s=Pt.getState(e);i(s),r=Pt.fromCache(s),o[e.id]=r}return r}function bb(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function yGe(e,t,n,i,o){return c(o)?!i&&c(n)?n:Gn(t,o(e),!1):t}function id(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}Object.defineProperties(Dg.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}}}),Dg.prototype.update=function(e){const t=e.globe;if(!c(t)||!t.show)return this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,void(this._useDepthPlane=!1);this._frontFaceAlphaByDistance=rK(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=rK(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=sK(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=sK(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=function nGe(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==ce.SCENE2D&&t.context.depthTexture}(this,e,t),this._sunVisibleThroughGlobe=function J5e(e,t){return e._frontFaceTranslucent&&(t.cameraUnderground||e._backFaceTranslucent)}(this,e),this._environmentVisible=function eGe(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}(this,e),this._useDepthPlane=function tGe(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}(this,e),this._numberOfTextureUniforms=function iGe(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}(this),this._rectangle=Ce.clone(t.translucency.rectangle,this._rectangle),function oGe(e,t){e._derivedCommandsLength=CB(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=CB(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=CB(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<vg;++n)(i&1<<n)>0&&(e._derivedCommandTypesToUpdate[o++]=n);e._derivedCommandsToUpdateLength=o;const r=i!==e._derivedCommandKey;e._derivedCommandKey=i,e._derivedCommandsDirty=r,!c(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=function bGe(){return[new id({pass:ze.GLOBE,pickOnly:!1,getShaderProgramFunction:rGe,getRenderStateFunction:uGe,getUniformMapFunction:void 0}),new id({pass:ze.GLOBE,pickOnly:!1,getShaderProgramFunction:sGe,getRenderStateFunction:dGe,getUniformMapFunction:void 0}),new id({pass:ze.GLOBE,pickOnly:!1,getShaderProgramFunction:EB,getRenderStateFunction:fGe,getUniformMapFunction:void 0}),new id({pass:ze.GLOBE,pickOnly:!1,getShaderProgramFunction:EB,getRenderStateFunction:hGe,getUniformMapFunction:void 0}),new id({pass:ze.GLOBE,pickOnly:!1,getShaderProgramFunction:EB,getRenderStateFunction:pGe,getUniformMapFunction:void 0}),new id({pass:ze.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:wB,getRenderStateFunction:uK,getUniformMapFunction:bb}),new id({pass:ze.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:cK,getRenderStateFunction:dK,getUniformMapFunction:bb}),new id({pass:ze.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:aGe,getRenderStateFunction:uK,getUniformMapFunction:bb}),new id({pass:ze.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:cGe,getRenderStateFunction:dK,getUniformMapFunction:bb}),new id({pass:ze.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:lK,getRenderStateFunction:mGe,getUniformMapFunction:bb}),new id({pass:ze.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:lK,getRenderStateFunction:_Ge,getUniformMapFunction:bb})]}())}(this,e)};const fK=new Array(vg),hK=new Array(vg);function pK(e,t,n,i,o,r,s){for(let a=0;a<t;++a){const l=e[a],u=l.derivedCommands.type;(!c(s)||s.indexOf(u)>-1)&&n(l,i,o,r)}}function mK(e,t,n,i,o,r){for(let s=0;s<t;++s)n(e[s],i,o,r)}Dg.prototype.updateDerivedCommands=function(e,t){const n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(0!==i){for(let o=0;o<i;++o)hK[o]=this._derivedCommandPacks[n[o]],fK[o]=oK[n[o]];!function AGe(e,t,n,i,o,r,s){let a=t.derivedCommands.globeTranslucency;const l=e._derivedCommandsDirty;if(t.dirty||!c(a)||l){t.dirty=!1,c(a)||(a={},t.derivedCommands.globeTranslucency=a);const u=s.frameNumber,d=g(a.uniformMapDirtyFrame,0),h=g(a.shaderProgramDirtyFrame,0),m=g(a.renderStateDirtyFrame,0),_=a.uniformMap!==t.uniformMap,p=a.shaderProgramId!==t.shaderProgram.id,y=a.renderStateId!==t.renderState.id;_&&(a.uniformMapDirtyFrame=u),p&&(a.shaderProgramDirtyFrame=u),y&&(a.renderStateDirtyFrame=u),a.uniformMap=t.uniformMap,a.shaderProgramId=t.shaderProgram.id,a.renderStateId=t.renderState.id;for(let A=0;A<n;++A){const x=r[A],C=i[A],w=o[A];let D,P,N,v=a[w];c(v)?(D=v.uniformMap,P=v.shaderProgram,N=v.renderState):(D=void 0,P=void 0,N=void 0),v=Zt.shallowClone(t,v),a[w]=v;const R=g(v.derivedCommands.uniformMapDirtyFrame,0),B=g(v.derivedCommands.shaderProgramDirtyFrame,0),F=g(v.derivedCommands.renderStateDirtyFrame,0),S=_||R<d,I=p||B<h,L=y||F<m;S&&(v.derivedCommands.uniformMapDirtyFrame=u),I&&(v.derivedCommands.shaderProgramDirtyFrame=u),L&&(v.derivedCommands.renderStateDirtyFrame=u),v.derivedCommands.type=C,v.pass=x.pass,v.pickOnly=x.pickOnly,v.uniformMap=yGe(e,t.uniformMap,D,S,x.getUniformMapFunction),v.shaderProgram=lGe(s.context,t.shaderProgram,P,I,x.getShaderProgramFunction,w),v.renderState=gGe(t.renderState,N,L,x.getRenderStateFunction,x.renderStateCache)}}}(this,e,i,n,fK,hK,t)}},Dg.prototype.pushDerivedCommands=function(e,t,n){const i=n.passes.pick;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),0===r)return void n.commandList.push(e);const s=e.derivedCommands.globeTranslucency;for(let a=0;a<r;++a)n.commandList.push(s[oK[o[a]]])};const TGe=[Bs_OPAQUE_FRONT_FACE,Bs_OPAQUE_BACK_FACE],xGe=[Bs_DEPTH_ONLY_FRONT_FACE,Bs_DEPTH_ONLY_BACK_FACE,Bs_DEPTH_ONLY_FRONT_AND_BACK_FACE];Dg.prototype.executeGlobeCommands=function(e,t,n,i,o){const r=i.context,s=e.commands[ze.GLOBE],a=e.indices[ze.GLOBE];0!==a&&(this._globeTranslucencyFramebuffer=n,n.clearClassification(r,o),pK(s,a,t,i,r,o,TGe))},Dg.prototype.executeGlobeClassificationCommands=function(e,t,n,i,o){const r=i.context,s=e.commands[ze.GLOBE],a=e.indices[ze.GLOBE],l=e.commands[ze.TERRAIN_CLASSIFICATION],u=e.indices[ze.TERRAIN_CLASSIFICATION];if(0===a||0===u)return;const d=this._frontFaceTranslucent,h=this._backFaceTranslucent;if((!d||!h)&&mK(l,u,t,i,r,o),!d&&!h)return;this._globeTranslucencyFramebuffer=n;const m=r.uniformState.globeDepthTexture,_=o.framebuffer;if(o.framebuffer=n.classificationFramebuffer,pK(s,a,t,i,r,o,xGe),r.depthTexture){const p=n.packDepth(r,o);r.uniformState.globeDepthTexture=p}mK(l,u,t,i,r,o),r.uniformState.globeDepthTexture=m,o.framebuffer=_};const CGe=Dg,Ig="uniform sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n out_FragColor = texture(colorTexture, v_textureCoordinates);\n}\n";function sf(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new Zo({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new Zo({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 cr({color:new X(0,0,0,0),owner:this}),this._clearCommand=new cr({color:new X(0,0,0,0),depth:1,stencil:0});const e=this;this._uniformMap={colorTexture:function(){return e._fbo.getColorTexture()},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._fboClassified.getColorTexture()}}}Object.defineProperties(sf.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}}),sf.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};const EGe={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Bi.EQUAL,frontOperation:{fail:Xt.KEEP,zFail:Xt.KEEP,zPass:Xt.KEEP},backFunction:Bi.NEVER,reference:0,mask:Tn.CLASSIFICATION_MASK},blending:Ji.ALPHA_BLEND},wGe={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Bi.NOT_EQUAL,frontOperation:{fail:Xt.KEEP,zFail:Xt.KEEP,zPass:Xt.KEEP},backFunction:Bi.NEVER,reference:0,mask:Tn.CLASSIFICATION_MASK},blending:Ji.ALPHA_BLEND},SGe={depthMask:!0,depthTest:{enabled:!0},stencilTest:Tn.setCesium3DTileBit(),stencilMask:Tn.CESIUM_3D_TILE_MASK,blending:Ji.ALPHA_BLEND};sf.prototype.update=function(e,t,n){const i=this._fbo.getColorTexture(),o=this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;const r=this._numSamples!==t,s=e.drawingBufferWidth,a=e.drawingBufferHeight,l=!c(i)||i.width!==s||i.height!==a;if((l||o||r)&&(this._numSamples=t,this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),c(this._previousFramebuffer)||(this._depthStencilTexture=new jn({context:e,width:s,height:a,pixelFormat:vt.DEPTH_STENCIL,pixelDatatype:bt.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new D_({context:e,width:s,height:a,format:Qf.DEPTH24_STENCIL8,numSamples:t})))),!c(this._fbo.framebuffer)||l||o||r){let u,d;this._fbo.destroy(),this._fboClassified.destroy(),c(this._previousFramebuffer)?(u=n.getDepthStencilTexture(),d=n.getDepthStencilRenderbuffer()):(u=this._depthStencilTexture,d=this._depthStencilRenderbuffer),this._fbo.setDepthStencilTexture(u),c(d)&&this._fbo.setDepthStencilRenderbuffer(d),this._fbo.update(e,s,a,t),c(this._previousFramebuffer)||(this._fboClassified.setDepthStencilTexture(u),this._fboClassified.update(e,s,a))}if(c(this._rsUnclassified)||(this._rsUnclassified=Pt.fromCache(EGe),this._rsClassified=Pt.fromCache(wGe),this._rsDefault=Pt.fromCache(SGe)),!c(this._unclassifiedCommand)||o||r){c(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());const u=c(this._previousFramebuffer)?"uniform sampler2D colorTexture;\nin vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n#ifdef UNCLASSIFIED\n out_FragColor = color * czm_invertClassificationColor;\n#else\n out_FragColor = color;\n#endif\n}\n":"uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform sampler2D classifiedTexture;\nin vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n bool isClassified = all(equal(texture(classifiedTexture, v_textureCoordinates), vec4(0.0)));\n#ifdef UNCLASSIFIED\n vec4 highlightColor = czm_invertClassificationColor;\n if (isClassified)\n {\n discard;\n }\n#else\n vec4 highlightColor = vec4(1.0);\n if (!isClassified)\n {\n discard;\n }\n#endif\n out_FragColor = color * highlightColor;\n gl_FragDepth = texture(depthTexture, v_textureCoordinates).r;\n}\n",d=new Et({defines:["UNCLASSIFIED"],sources:[u]}),h=new Et({sources:[u]});this._unclassifiedCommand=e.createViewportQuadCommand(d,{renderState:c(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(h,{renderState:c(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),c(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),c(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(Ig,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}},sf.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)},sf.prototype.clear=function(e,t){c(this._previousFramebuffer)?this._fbo.clear(e,this._clearColorCommand,t):(this._fbo.clear(e,this._clearCommand,t),this._fboClassified.clear(e,this._clearCommand,t))},sf.prototype.executeClassified=function(e,t){if(!c(this._previousFramebuffer)){const 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)},sf.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)},sf.prototype.isDestroyed=function(){return!1},sf.prototype.destroy=function(){return this._fbo.destroy(),this._fboClassified.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),c(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),Ye(this)};const _K=sf;function sI(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}function xm(e){if(c(e)&&e.length!==wu.NUMBER_OF_JOB_TYPES)throw new E("A budget must be specified for each job type; budgets.length should equal JobType.NUMBER_OF_JOB_TYPES.");const t=new Array(wu.NUMBER_OF_JOB_TYPES);t[wu.TEXTURE]=new sI(c(e)?e[wu.TEXTURE]:10),t[wu.PROGRAM]=new sI(c(e)?e[wu.PROGRAM]:10),t[wu.BUFFER]=new sI(c(e)?e[wu.BUFFER]:30);const n=t.length;let i,o=0;for(i=0;i<n;++i)o+=t[i].total;const 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}Object.defineProperties(sI.prototype,{total:{get:function(){return this._total}}}),xm.getTimestamp=wr,Object.defineProperties(xm.prototype,{totalBudget:{get:function(){return this._totalBudget}}}),xm.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget},xm.prototype.resetBudgets=function(){const e=this._budgets,t=e.length;for(let n=0;n<t;++n){const i=e[n];i.starvedLastFrame=i.starvedThisFrame,i.starvedThisFrame=!1,i.usedThisFrame=0,i.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0},xm.prototype.execute=function(e,t){const 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){const l=n.length;let u;for(u=0;u<l&&(r=n[u],!(r.usedThisFrame+r.stolenFromMeThisFrame<r.total)||r.starvedLastFrame);++u);if(u===l&&o)return!1;o&&(i.starvedThisFrame=!0)}const s=xm.getTimestamp();e.execute();const a=xm.getTimestamp()-s;return this._totalUsedThisFrame+=a,r?r.stolenFromMeThisFrame+=a:i.usedThisFrame+=a,this._executedThisFrame[t]=!0,!0};const IGe=xm;function aI(e){e=g(e,g.EMPTY_OBJECT);const t=Lr(e.container);if(!c(t))throw new E("container is required");this._container=t;const n=document.createElement("div");n.className="cesium-performanceDisplay";const i=document.createElement("div");i.className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),i.appendChild(this._fpsText);const 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=wr(),this._lastMsSampleTime=wr(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;const r=document.createElement("div");r.className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),r.appendChild(this._throttledText),n.appendChild(r)}Object.defineProperties(aI.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(this._throttledText.nodeValue=e?"(throttled)":"",this._throttled=e)}}}),aI.prototype.update=function(e){const t=wr(),n=g(e,!0);this._fpsFrameCount++;const i=t-this._lastFpsSampleTime;if(i>1e3){let r="N/A";n&&(r=1e3*this._fpsFrameCount/i|0),this._fpsText.nodeValue=`${r} FPS`,this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;const 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}},aI.prototype.destroy=function(){return Ye(this)};const PGe=aI;function cI(e){e=g(e,!0),this.value=cI.toValue(e)}Object.defineProperties(cI.prototype,{componentDatatype:{get:function(){return ee.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}}),cI.toValue=function(e,t){if(!c(e))throw new E("show is required.");return c(t)?(t[0]=e,t):new Uint8Array([e])};const Oi=cI;function Pg(){this._framebuffer=new Zo,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(Pg.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}}),Pg.prototype.update=function(e,t){(function OGe(e,t,n){e._framebuffer.update(t,n.width,n.height)})(this,e,t),function LGe(e,t,n){c(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand("uniform highp sampler2D u_texture;\nin vec2 v_textureCoordinates;\nvoid main()\n{\n out_FragColor = czm_packDepth(texture(u_texture, v_textureCoordinates).r);\n}\n",{renderState:Pt.fromCache(),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=n,e._copyDepthCommand.framebuffer=e.framebuffer}(this,e,t)};const RGe=new fe,NGe=new fe(1,1/255,1/65025,1/16581375);Pg.prototype.getDepth=function(e,t,n){if(!c(this.framebuffer))return;const i=e.readPixels({x:t,y:n,width:1,height:1,framebuffer:this.framebuffer}),o=fe.unpack(i,0,RGe);return fe.divideByScalar(o,255,o),fe.dot(o,NGe)},Pg.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},Pg.prototype.isDestroyed=function(){return!1},Pg.prototype.destroy=function(){return this._framebuffer.destroy(),c(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=c(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),Ye(this)};const MGe=Pg;function ks(e){e=g(e,g.EMPTY_OBJECT),this._primitives=[],this._guid=kr(),this._primitiveAdded=new Ue,this._primitiveRemoved=new Ue,this._zIndex=void 0,this.show=g(e.show,!0),this.destroyPrimitives=g(e.destroyPrimitives,!0)}function lI(e,t){if(!e.contains(t))throw new E("primitive is not in this collection.");return e._primitives.indexOf(t)}Object.defineProperties(ks.prototype,{length:{get:function(){return this._primitives.length}},primitiveAdded:{get:function(){return this._primitiveAdded}},primitiveRemoved:{get:function(){return this._primitiveRemoved}}}),ks.prototype.add=function(e,t){const n=c(t);if(!c(e))throw new E("primitive is required.");if(n){if(t<0)throw new E("index must be greater than or equal to zero.");if(t>this._primitives.length)throw new E("index must be less than or equal to the number of primitives.")}const i=e._external=e._external||{};return(i._composites=i._composites||{})[this._guid]={collection:this},n?this._primitives.splice(t,0,e):this._primitives.push(e),this._primitiveAdded.raiseEvent(e),e},ks.prototype.remove=function(e){if(this.contains(e)){const t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),this._primitiveRemoved.raiseEvent(e),!0}return!1},ks.prototype.removeAndDestroy=function(e){const t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},ks.prototype.removeAll=function(){const e=this._primitives,t=e.length;for(let n=0;n<t;++n)delete e[n]._external._composites[this._guid],this.destroyPrimitives&&e[n].destroy(),this._primitiveRemoved.raiseEvent(e[n]);this._primitives=[]},ks.prototype.contains=function(e){return!!(c(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])},ks.prototype.raise=function(e){if(c(e)){const t=lI(this,e),n=this._primitives;if(t!==n.length-1){const i=n[t];n[t]=n[t+1],n[t+1]=i}}},ks.prototype.raiseToTop=function(e){if(c(e)){const t=lI(this,e),n=this._primitives;t!==n.length-1&&(n.splice(t,1),n.push(e))}},ks.prototype.lower=function(e){if(c(e)){const t=lI(this,e),n=this._primitives;if(0!==t){const i=n[t];n[t]=n[t-1],n[t-1]=i}}},ks.prototype.lowerToBottom=function(e){if(c(e)){const t=lI(this,e),n=this._primitives;0!==t&&(n.splice(t,1),n.unshift(e))}},ks.prototype.get=function(e){if(!c(e))throw new E("index is required.");return this._primitives[e]},ks.prototype.update=function(e){if(!this.show)return;const t=this._primitives;for(let n=0;n<t.length;++n)t[n].update(e)},ks.prototype.prePassesUpdate=function(e){const t=this._primitives;for(let n=0;n<t.length;++n){const i=t[n];c(i.prePassesUpdate)&&i.prePassesUpdate(e)}},ks.prototype.updateForPass=function(e,t){const n=this._primitives;for(let i=0;i<n.length;++i){const o=n[i];c(o.updateForPass)&&o.updateForPass(e,t)}},ks.prototype.postPassesUpdate=function(e){const t=this._primitives;for(let n=0;n<t.length;++n){const i=t[n];c(i.postPassesUpdate)&&i.postPassesUpdate(e)}},ks.prototype.isDestroyed=function(){return!1},ks.prototype.destroy=function(){return this.removeAll(),Ye(this)};const Og=ks,BGe=function FGe(e,t){this.near=g(e,0),this.far=g(t,0);const n=ze.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},SB="uniform highp sampler2D u_depthTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n out_FragColor = czm_packDepth(texture(u_depthTexture, v_textureCoordinates).r);\n}\n";function af(){this._picking=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new Zo({depthStencil:!0,supportsDepthTexture:!0}),this._outputFramebuffer=new Zo({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new Zo,this._tempCopyDepthFramebuffer=new Zo,this._updateDepthFramebuffer=new Zo({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 Vt,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}function gK(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;const r=!Vt.equals(e._viewport,o.viewport);let s=r!==e._useScissorTest;e._useScissorTest=r,Vt.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=Vt.clone(o.viewport,e._scissorRectangle),s=!0),(!c(e._rs)||!Vt.equals(e._viewport,e._rs.viewport)||s)&&(e._rs=Pt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=Pt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:Ji.ALPHA_BLEND}),e._rsUpdate=Pt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Bi.EQUAL,frontOperation:{fail:Xt.KEEP,zFail:Xt.KEEP,zPass:Xt.KEEP},backFunction:Bi.NEVER,reference:Tn.CESIUM_3D_TILE_MASK,mask:Tn.CESIUM_3D_TILE_MASK}})),c(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(SB,{uniformMap:{u_depthTexture:function(){return e.colorFramebufferManager.getDepthStencilTexture()}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer.framebuffer,e._copyDepthCommand.renderState=e._rs,c(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(Ig,{uniformMap:{colorTexture:function(){return e.colorFramebufferManager.getColorTexture()}},owner:e})),e._copyColorCommand.renderState=e._rs,c(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(SB,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer.framebuffer,e._tempCopyDepthCommand.renderState=e._rs,c(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(Ig,{uniformMap:{colorTexture:function(){return e._tempCopyDepthFramebuffer.getColorTexture()}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer.framebuffer,e._updateDepthCommand.renderState=e._rsUpdate,c(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new cr({color:new X(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}Object.defineProperties(af.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}}}),af.prototype.update=function(e,t,n,i,o,r){const s=n.width,a=n.height,l=o?e.halfFloatingPointTexture?bt.HALF_FLOAT:bt.FLOAT:bt.UNSIGNED_BYTE;this._numSamples=i,this.picking?this._pickColorFramebuffer.update(e,s,a):this._outputFramebuffer.update(e,s,a,i,l),this._copyDepthFramebuffer.update(e,s,a),gK(this,e,s,a,t),e.uniformState.globeDepthTexture=void 0,this._useHdr=o,this._clearGlobeDepth=r},af.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)},af.prototype.executeCopyDepth=function(e,t){c(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())},af.prototype.executeUpdateDepth=function(e,t,n,i){const o=c(i)?i:t.framebuffer.depthStencilTexture;if(n||o!==this.colorFramebufferManager.getDepthStencilTexture()){if(c(this._updateDepthCommand)){if(!c(this._updateDepthFramebuffer.framebuffer)||this._updateDepthFramebuffer.getDepthStencilTexture()!==o||this._updateDepthFramebuffer.getColorTexture()!==this._copyDepthFramebuffer.getColorTexture()){const r=this._copyDepthFramebuffer.getColorTexture().width,s=this._copyDepthFramebuffer.getColorTexture().height;this._tempCopyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.update(e,r,s);const a=this._copyDepthFramebuffer.getColorTexture();this._updateDepthFramebuffer.setColorTexture(a,0),this._updateDepthFramebuffer.setDepthStencilTexture(o),this._updateDepthFramebuffer.update(e,r,s),gK(this,e,r,s,t)}this._tempCopyDepthTexture=o,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)}}else c(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)},af.prototype.executeCopyColor=function(e,t){c(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},af.prototype.clear=function(e,t,n){const i=this._clearGlobeColorCommand;c(i)&&(X.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))},af.prototype.isDestroyed=function(){return!1},af.prototype.destroy=function(){return function kGe(e){e._pickColorFramebuffer.destroy(),e._outputFramebuffer.destroy(),e._copyDepthFramebuffer.destroy(),e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer.destroy()}(this),c(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),c(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),c(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),c(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),Ye(this)};const UGe=af;function Lg(){this._framebuffer=new Zo({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new Zo,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new Vt,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties(Lg.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()}}}),Lg.prototype.updateAndClear=function(e,t,n,i){const o=t.width,r=t.height;(function VGe(e,t,n,i,o){e._framebuffer.update(t,n,i,1,o?t.halfFloatingPointTexture?bt.HALF_FLOAT:bt.FLOAT:bt.UNSIGNED_BYTE),e._packedDepthFramebuffer.update(t,n,i)})(this,n,o,r,e),function HGe(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;const r=!Vt.equals(e._viewport,o.viewport);let s=r!==e._useScissorTest;e._useScissorTest=r,Vt.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=Vt.clone(o.viewport,e._scissorRectangle),s=!0),(!c(e._renderState)||!Vt.equals(e._viewport,e._renderState.viewport)||s)&&(e._renderState=Pt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),c(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(SB,{uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),c(e._clearCommand)||(e._clearCommand=new cr({color:new X(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}(this,n,o,r,i),this._useHdr=e},Lg.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)},Lg.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture},Lg.prototype.isDestroyed=function(){return!1},Lg.prototype.destroy=function(){return function zGe(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}(this),Ye(this)};const GGe=Lg,yK="#ifdef MRT\nlayout (location = 0) out vec4 out_FragData_0;\nlayout (location = 1) out vec4 out_FragData_1;\n#else\nlayout (location = 0) out vec4 out_FragColor;\n#endif\n\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n if (texture(u_depthTexture, v_textureCoordinates).r < 1.0)\n {\n#ifdef MRT\n out_FragData_0 = u_bgColor;\n out_FragData_1 = vec4(u_bgColor.a);\n#else\n out_FragColor = u_bgColor;\n#endif\n return;\n }\n \n discard;\n}\n";function Bh(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;const 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 Zo({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new Zo({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new Zo({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new Zo({createColorAttachments:!1}),this._opaqueClearCommand=new cr({color:new X(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new cr({color:new X(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new cr({color:new X(0,0,0,0),owner:this}),this._alphaClearCommand=new cr({color:new X(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 Vt,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function bK(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function vB(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function AK(e){bK(e),vB(e)}Bh.prototype.update=function(e,t,n,i,o){if(!this.isSupported())return;this._opaqueFBO=n,this._opaqueTexture=n.getColorTexture(0),this._depthStencilTexture=n.getDepthStencilTexture();const{width:r,height:s}=this._opaqueTexture,a=this._accumulationTexture,l=!c(a)||a.width!==r||a.height!==s||i!==this._useHDR,u=this._numSamples!==o;if((l||u)&&(this._numSamples=o,function WGe(e,t,n,i){bK(e),e._accumulationTexture=new jn({context:t,width:n,height:i,pixelFormat:vt.RGBA,pixelDatatype:bt.FLOAT});const o=new Float32Array(n*i*4);e._revealageTexture=new jn({context:t,pixelFormat:vt.RGBA,pixelDatatype:bt.FLOAT,source:{arrayBufferView:o,width:n,height:i},flipY:!1})}(this,e,r,s)),(!c(this._translucentFBO.framebuffer)||l||u)&&!function qGe(e,t){vB(e);const n=oe.FRAMEBUFFER_COMPLETE;let i=!0;const{width:o,height:r}=e._accumulationTexture;return 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)&&(vB(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),(e._translucentFBO.status!==n||e._alphaFBO.status!==n||e._adjustTranslucentFBO.status!==n||e._adjustAlphaFBO.status!==n)&&(AK(e),e._translucentMultipassSupport=!1,i=!1)),i}(this,e))return;this._useHDR=i;const d=this;let h,m;c(this._compositeCommand)||(h=new Et({sources:["/**\n * Compositing for Weighted Blended Order-Independent Transparency. See:\n * - http://jcgt.org/published/0002/02/09/\n * - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html\n */\n\nuniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 opaque = texture(u_opaque, v_textureCoordinates);\n vec4 accum = texture(u_accumulation, v_textureCoordinates);\n float r = texture(u_revealage, v_textureCoordinates).r;\n\n#ifdef MRT\n vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\n vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\n\n out_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n\n if (opaque != czm_backgroundColor)\n {\n out_FragColor.a = 1.0;\n }\n}\n"]}),this._translucentMRTSupport&&h.defines.push("MRT"),m={u_opaque:function(){return d._opaqueTexture},u_accumulation:function(){return d._accumulationTexture},u_revealage:function(){return d._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this})),c(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(h=new Et({defines:["MRT"],sources:[yK]}),m={u_bgColor:function(){return d._translucentMRTClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this})):this._translucentMultipassSupport&&(h=new Et({sources:[yK]}),m={u_bgColor:function(){return d._translucentMultipassClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this}),m={u_bgColor:function(){return d._alphaClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this}))),this._viewport.width=r,this._viewport.height=s;const _=!Vt.equals(this._viewport,t.viewport);let p=_!==this._useScissorTest;this._useScissorTest=_,Vt.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=Vt.clone(t.viewport,this._scissorRectangle),p=!0),(!c(this._rs)||!Vt.equals(this._viewport,this._rs.viewport)||p)&&(this._rs=Pt.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),c(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),c(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)};const YGe={enabled:!0,color:new X(0,0,0,0),equationRgb:Sl.ADD,equationAlpha:Sl.ADD,functionSourceRgb:ur.ONE,functionDestinationRgb:ur.ONE,functionSourceAlpha:ur.ZERO,functionDestinationAlpha:ur.ONE_MINUS_SOURCE_ALPHA},XGe={enabled:!0,color:new X(0,0,0,0),equationRgb:Sl.ADD,equationAlpha:Sl.ADD,functionSourceRgb:ur.ONE,functionDestinationRgb:ur.ONE,functionSourceAlpha:ur.ONE,functionDestinationAlpha:ur.ONE},ZGe={enabled:!0,color:new X(0,0,0,0),equationRgb:Sl.ADD,equationAlpha:Sl.ADD,functionSourceRgb:ur.ZERO,functionDestinationRgb:ur.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:ur.ZERO,functionDestinationAlpha:ur.ONE_MINUS_SOURCE_ALPHA};function DB(e,t,n,i){let o=n[i.id];if(!c(o)){const r=Pt.getState(i);r.depthMask=!1,r.blending=t,o=Pt.fromCache(r),n[i.id]=o}return o}function IB(e,t,n,i){const{shaderCache:o}=e,r=o.getDerivedShaderProgram(t,n);if(c(r))return r;const s=t._attributeLocations,a=t.fragmentShaderSource.clone();a.sources=a.sources.map(function(d){return Et.replaceMain(d,"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;\nbool czm_discard = false;\n");const l=[...i.matchAll(/out_FragData_(\d+)/g)];let u="";for(let d=0;d<l.length;d++){const h=l[d];u=`layout (location = ${h[1]}) out vec4 ${h[0]};\n${u}`}return a.sources.push(u),a.sources.push(`void main()\n{\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n${i}}\n`),o.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:s})}Bh.prototype.createDerivedCommands=function(e,t,n){if(c(n)||(n={}),this._translucentMRTSupport){let a,l;return c(n.translucentCommand)&&(a=n.translucentCommand.shaderProgram,l=n.translucentCommand.renderState),n.translucentCommand=Zt.shallowClone(e,n.translucentCommand),c(a)&&n.shaderProgramId===e.shaderProgram.id?(n.translucentCommand.shaderProgram=a,n.translucentCommand.renderState=l):(n.translucentCommand.shaderProgram=function n9e(e,t){return IB(e,t,"translucentMRT"," vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;\n float ai = czm_out_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n out_FragData_0 = vec4(Ci * wzi, ai);\n out_FragData_1 = vec4(ai * wzi);\n")}(t,e.shaderProgram),n.translucentCommand.renderState=function $Ge(e,t,n){return DB(0,YGe,e._translucentRenderStateCache,n)}(this,0,e.renderState),n.shaderProgramId=e.shaderProgram.id),n}let i,o,r,s;return c(n.translucentCommand)&&(i=n.translucentCommand.shaderProgram,o=n.translucentCommand.renderState,r=n.alphaCommand.shaderProgram,s=n.alphaCommand.renderState),n.translucentCommand=Zt.shallowClone(e,n.translucentCommand),n.alphaCommand=Zt.shallowClone(e,n.alphaCommand),c(i)&&n.shaderProgramId===e.shaderProgram.id?(n.translucentCommand.shaderProgram=i,n.translucentCommand.renderState=o,n.alphaCommand.shaderProgram=r,n.alphaCommand.renderState=s):(n.translucentCommand.shaderProgram=function i9e(e,t){return IB(e,t,"translucentMultipass"," vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;\n float ai = czm_out_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n out_FragColor = vec4(Ci, ai) * wzi;\n")}(t,e.shaderProgram),n.translucentCommand.renderState=function KGe(e,t,n){return DB(0,XGe,e._translucentRenderStateCache,n)}(this,0,e.renderState),n.alphaCommand.shaderProgram=function o9e(e,t){return IB(e,t,"alphaMultipass"," float ai = czm_out_FragColor.a;\n out_FragColor = vec4(ai);\n")}(t,e.shaderProgram),n.alphaCommand.renderState=function QGe(e,t,n){return DB(0,ZGe,e._alphaRenderStateCache,n)}(this,0,e.renderState),n.shaderProgramId=e.shaderProgram.id),n},Bh.prototype.executeCommands=function(e,t,n,i,o){this._translucentMRTSupport?function s9e(e,t,n,i,o,r){const{context:s,frameState:a}=t,{useLogDepth:l,shadowState:u}=a,d=t._hdr,h=i.framebuffer,m=u.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i);const _=e._opaqueFBO.framebuffer;let p,y;i.framebuffer=e._translucentFBO.framebuffer;for(let A=0;A<o.length;++A)p=o[A],p=l?p.derivedCommands.logDepth.command:p,p=d?p.derivedCommands.hdr.command:p,y=m&&p.receiveShadows?p.derivedCommands.oit.shadows.translucentCommand:p.derivedCommands.oit.translucentCommand,n(y,t,s,i,_);c(r)&&(p=r.unclassifiedCommand,y=m&&p.receiveShadows?p.derivedCommands.oit.shadows.translucentCommand:p.derivedCommands.oit.translucentCommand,n(y,t,s,i,_)),i.framebuffer=h}(this,e,t,n,i,o):function r9e(e,t,n,i,o,r){let s,a,l;const{context:u,frameState:d}=t,{useLogDepth:h,shadowState:m}=d,_=t._hdr,p=i.framebuffer,y=m.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(u,i),i.framebuffer=e._adjustAlphaFBO.framebuffer,e._adjustAlphaCommand.execute(u,i);const A=e._opaqueFBO.framebuffer;for(i.framebuffer=e._translucentFBO.framebuffer,l=0;l<o.length;++l)s=o[l],s=h?s.derivedCommands.logDepth.command:s,s=_?s.derivedCommands.hdr.command:s,a=y&&s.receiveShadows?s.derivedCommands.oit.shadows.translucentCommand:s.derivedCommands.oit.translucentCommand,n(a,t,u,i,A);for(c(r)&&(s=r.unclassifiedCommand,a=y&&s.receiveShadows?s.derivedCommands.oit.shadows.translucentCommand:s.derivedCommands.oit.translucentCommand,n(a,t,u,i,A)),i.framebuffer=e._alphaFBO.framebuffer,l=0;l<o.length;++l)s=o[l],s=h?s.derivedCommands.logDepth.command:s,s=_?s.derivedCommands.hdr.command:s,a=y&&s.receiveShadows?s.derivedCommands.oit.shadows.alphaCommand:s.derivedCommands.oit.alphaCommand,n(a,t,u,i,A);c(r)&&(s=r.unclassifiedCommand,a=y&&s.receiveShadows?s.derivedCommands.oit.shadows.alphaCommand:s.derivedCommands.oit.alphaCommand,n(a,t,u,i,A)),i.framebuffer=p}(this,e,t,n,i,o)},Bh.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},Bh.prototype.clear=function(e,t,n){const i=t.framebuffer;t.framebuffer=this._opaqueFBO.framebuffer,X.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},Bh.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},Bh.prototype.isDestroyed=function(){return!1},Bh.prototype.destroy=function(){return AK(this),c(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),c(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),c(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),Ye(this)};const a9e=Bh;function CC(){this._framebuffer=new Zo({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(CC.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}}),CC.prototype.update=function(e,t,n){const i=n.width,o=n.height;this._framebuffer.isDirty(i,o)&&function l9e(e,t){e._framebuffer.update(t,t.drawingBufferWidth,t.drawingBufferHeight);const o=new Cg(t);o.blendingEnabled=!1,o.scissorTest={enabled:!0,rectangle:new Vt},o.viewport=new Vt,e._passState=o}(this,e);const s=this._passState;return s.framebuffer=this.framebuffer,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},CC.prototype.isDestroyed=function(){return!1},CC.prototype.destroy=function(){return function c9e(e){e._framebuffer.destroy()}(this),Ye(this)};const u9e=CC;function EC(e){const t=new Cg(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new Vt},t.viewport=new Vt,this._context=e,this._fb=new Zo({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}EC.prototype.begin=function(e,t){const n=this._context,i=t.width,o=t.height;return Vt.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};const wC=new X;EC.prototype.end=function(e){const t=g(e.width,1),n=g(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(.5*t),l=Math.floor(.5*n);let u=0,d=0,h=0,m=-1;for(let _=0;_<s;++_){if(-a<=u&&u<=a&&-l<=d&&d<=l){const p=4*((l-d)*t+u+a);wC.red=X.byteToFloat(o[p]),wC.green=X.byteToFloat(o[p+1]),wC.blue=X.byteToFloat(o[p+2]),wC.alpha=X.byteToFloat(o[p+3]);const y=i.getObjectByPickColor(wC);if(c(y))return y}if(u===d||u<0&&-u===d||u>0&&u===1-d){const p=h;h=-m,m=p}u+=h,d+=m}},EC.prototype.isDestroyed=function(){return!1},EC.prototype.destroy=function(){return this._fb.destroy(),Ye(this)};const d9e=EC;function kh(){this._numSamples=1,this._colorFramebuffer=new Zo({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new Zo({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new X(0,0,0,0),this._clearCommand=new cr({color:new X(0,0,0,0),depth:1,owner:this})}Object.defineProperties(kh.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}}),kh.prototype.update=function(e,t,n,i){const o=t.width,r=t.height,s=n?e.halfFloatingPointTexture?bt.HALF_FLOAT:bt.FLOAT:bt.UNSIGNED_BYTE;this._numSamples=i,this._colorFramebuffer.update(e,o,r,i,s),this._idFramebuffer.update(e,o,r)},kh.prototype.clear=function(e,t,n){X.clone(n,this._clearCommand.color),X.clone(this._idClearColor,this._clearCommand.color),this._colorFramebuffer.clear(e,this._clearCommand,t),this._idFramebuffer.clear(e,this._clearCommand,t)},kh.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer},kh.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer},kh.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)},kh.prototype.isDestroyed=function(){return!1},kh.prototype.destroy=function(){return function f9e(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}(this),Ye(this)};const TK=kh;function Rg(){}Rg.getShadowCastShaderKeyword=function(e,t,n,i){return`castShadow ${e} ${t} ${n} ${i}`},Rg.createShadowCastVertexShader=function(e,t,n){const i=e.defines.slice(0),o=e.sources.slice(0);i.push("SHADOW_MAP"),n&&i.push("GENERATE_POSITION");const r=Et.findPositionVarying(e),s=c(r);if(t&&!s){const a=o.length;for(let u=0;u<a;++u)o[u]=Et.replaceMain(o[u],"czm_shadow_cast_main");o.push("out vec3 v_positionEC; \nvoid main() \n{ \n czm_shadow_cast_main(); \n v_positionEC = (czm_inverseProjection * gl_Position).xyz; \n}")}return new Et({defines:i,sources:o})},Rg.createShadowCastFragmentShader=function(e,t,n,i){const o=e.defines.slice(0),r=e.sources.slice(0);o.push("SHADOW_MAP");let s=Et.findPositionVarying(e);const a=c(s);a||(s="v_positionEC");const l=r.length;for(let d=0;d<l;++d)r[d]=Et.replaceMain(r[d],"czm_shadow_cast_main");let u="";return t&&(a||(u+="in vec3 v_positionEC; \n"),u+="uniform vec4 shadowMap_lightPositionEC; \n"),u+=i?"void main() \n{ \n":"void main() \n{ \n czm_shadow_cast_main(); \n if (out_FragColor.a == 0.0) \n { \n discard; \n } \n",u+=t?` float distance = length(${s}); \n if (distance >= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n out_FragColor = czm_packDepth(distance); \n`:n?" out_FragColor = vec4(1.0); \n":" out_FragColor = czm_packDepth(gl_FragCoord.z); \n",u+="} \n",r.push(u),new Et({defines:o,sources:r})},Rg.getShadowReceiveShaderKeyword=function(e,t,n,i){return`receiveShadow ${e._usesDepthTexture}${e._polygonOffsetSupported}${e._isPointLight}${e._isSpotLight}${e._numberOfCascades>1}${e.debugCascadeColors}${e.softShadows}${t}${n}${i}`},Rg.createShadowReceiveVertexShader=function(e,t,n){const i=e.defines.slice(0),o=e.sources.slice(0);return i.push("SHADOW_MAP"),t&&i.push(n?"GENERATE_POSITION_AND_NORMAL":"GENERATE_POSITION"),new Et({defines:i,sources:o})},Rg.createShadowReceiveFragmentShader=function(e,t,n,i,o){const r=Et.findNormalVarying(e),s=!i&&c(r)||i&&o,a=Et.findPositionVarying(e),l=c(a),u=t._usesDepthTexture,d=t._polygonOffsetSupported,h=t._isPointLight,m=t._isSpotLight,_=t._numberOfCascades>1,p=t.debugCascadeColors,y=t.softShadows,A=h?t._pointBias:i?t._terrainBias:t._primitiveBias,x=e.defines.slice(0),C=e.sources.slice(0),w=C.length;for(let P=0;P<w;++P)C[P]=Et.replaceMain(C[P],"czm_shadow_receive_main");h?x.push("USE_CUBE_MAP_SHADOW"):u&&x.push("USE_SHADOW_DEPTH_TEXTURE"),y&&!h&&x.push("USE_SOFT_SHADOWS"),_&&n&&i&&x.push(s?"ENABLE_VERTEX_LIGHTING":"ENABLE_DAYNIGHT_SHADING"),n&&A.normalShading&&s&&(x.push("USE_NORMAL_SHADING"),A.normalShadingSmooth>0&&x.push("USE_NORMAL_SHADING_SMOOTH"));let D,v="";return v+=h?"uniform samplerCube shadowMap_textureCube; \n":"uniform sampler2D shadowMap_texture; \n",D=l?` return vec4(${a}, 1.0); \n`:"#ifndef LOG_DEPTH \n return czm_windowToEyeCoordinates(gl_FragCoord); \n#else \n return vec4(v_logPositionEC, 1.0); \n#endif \n",v+=`uniform mat4 shadowMap_matrix; \nuniform vec3 shadowMap_lightDirectionEC; \nuniform vec4 shadowMap_lightPositionEC; \nuniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; \nuniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth; \n#ifdef LOG_DEPTH \nin vec3 v_logPositionEC; \n#endif \nvec4 getPositionEC() \n{ \n${D}} \nvec3 getNormalEC() \n{ \n${s?` return normalize(${r}); \n`:" return vec3(1.0); \n"}} \nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL) \n{ \n${A.normalOffset&&s?" float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x; \n float normalOffsetScale = 1.0 - nDotL; \n vec3 offset = normalOffset * normalOffsetScale * normalEC; \n positionEC.xyz += offset; \n":""}} \n`,v+="void main() \n{ \n czm_shadow_receive_main(); \n vec4 positionEC = getPositionEC(); \n vec3 normalEC = getNormalEC(); \n float depth = -positionEC.z; \n",v+=" czm_shadowParameters shadowParameters; \n shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; \n shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; \n shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; \n shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; \n",i?v+=" shadowParameters.depthBias *= max(depth * 0.01, 1.0); \n":d||(v+=" shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); \n"),v+=h?" vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz; \n float distance = length(directionEC); \n directionEC = normalize(directionEC); \n float radius = shadowMap_lightPositionEC.w; \n // Stop early if the fragment is beyond the point light radius \n if (distance > radius) \n { \n return; \n } \n vec3 directionWC = czm_inverseViewRotation * directionEC; \n shadowParameters.depth = distance / radius; \n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n shadowParameters.texCoords = directionWC; \n float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters); \n":m?" vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); \n float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n vec4 shadowPosition = shadowMap_matrix * positionEC; \n // Spot light uses a perspective projection, so perform the perspective divide \n shadowPosition /= shadowPosition.w; \n // Stop early if the fragment is not in the shadow bounds \n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n { \n return; \n } \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n":_?" float maxDepth = shadowMap_cascadeSplits[1].w; \n // Stop early if the eye depth exceeds the last cascade \n if (depth > maxDepth) \n { \n return; \n } \n // Get the cascade based on the eye-space depth \n vec4 weights = czm_cascadeWeights(depth); \n // Apply normal offset \n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n // Transform position into the cascade \n vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC; \n // Get visibility \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n // Fade out shadows that are far away \n float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z; \n float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0); \n visibility = mix(visibility, 1.0, fade); \n"+(p?" // Draw cascade colors for debugging \n out_FragColor *= czm_cascadeColor(weights); \n":""):" float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n vec4 shadowPosition = shadowMap_matrix * positionEC; \n // Stop early if the fragment is not in the shadow bounds \n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n { \n return; \n } \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n",v+=" out_FragColor.rgb *= visibility; \n} \n",C.push(v),new Et({defines:x,sources:C})};const Ab=Rg;function cf(e){const t=(e=g(e,g.EMPTY_OBJECT)).context;if(!c(t))throw new E("context is required.");if(!c(e.lightCamera))throw new E("lightCamera is required.");if(c(e.numberOfCascades)&&1!==e.numberOfCascades&&4!==e.numberOfCascades)throw new E("Only one or four cascades are supported.");this._enabled=g(e.enabled,!0),this._softShadows=g(e.softShadows,!1),this._normalOffset=g(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=g(e.fromLightSource,!0),this.darkness=g(e.darkness,.3),this._darkness=this.darkness,this.fadingEnabled=g(e.fadingEnabled,!0),this.maximumDistance=g(e.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let i,n=!0;(zn.isInternetExplorer()||zn.isEdge()||(zn.isChrome()||zn.isFirefox())&&zn.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 k,this._shadowMapTexture=void 0,this._lightDirectionEC=new f,this._lightPositionEC=new fe,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new uI,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new be,this._isPointLight=g(e.isPointLight,!1),this._pointLightRadius=g(e.pointLightRadius,100),this._cascadesEnabled=!this._isPointLight&&g(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?g(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new G,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new qa:c(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new fe,new fe],this._cascadeMatrices=[new k,new k,new k,new k],this._cascadeDistances=new fe,i=this._isPointLight?6:this._cascadesEnabled?this._numberOfCascades:1,this._passes=new Array(i);for(let o=0;o<i;++o)this._passes[o]=new h9e(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,OB(this),this._clearCommand=new cr({depth:1,color:new X}),this._clearPassState=new Cg(t),this._size=g(e.size,2048),this.size=this._size}function h9e(e){this.camera=new uI,this.passState=new Cg(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function PB(e,t){return Pt.fromCache({cull:{enabled:!0,face:dr.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 OB(e){const t=!e._usesDepthTexture;e._primitiveRenderState=PB(t,e._primitiveBias),e._terrainRenderState=PB(t,e._terrainBias),e._pointRenderState=PB(t,e._pointBias)}function LB(e){const t=e._passes.length;for(let n=0;n<t;++n){const i=e._passes[n],o=i.framebuffer;c(o)&&!o.isDestroyed()&&o.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function xK(e,t){e._isPointLight?function _9e(e,t){const n=new D_({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Qf.DEPTH_COMPONENT16}),i=new d_({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:vt.RGBA,pixelDatatype:bt.UNSIGNED_BYTE,sampler:Hi.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){const s=new Kf({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}(e,t):e._usesDepthTexture?function m9e(e,t){const n=new jn({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:vt.DEPTH_STENCIL,pixelDatatype:bt.UNSIGNED_INT_24_8,sampler:Hi.NEAREST}),i=new Kf({context:t,depthStencilTexture:n,destroyAttachments:!1}),o=e._passes.length;for(let r=0;r<o;++r){const s=e._passes[r];s.framebuffer=i,s.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}(e,t):function p9e(e,t){const n=new D_({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Qf.DEPTH_COMPONENT16}),i=new jn({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:vt.RGBA,pixelDatatype:bt.UNSIGNED_BYTE,sampler:Hi.NEAREST}),o=new Kf({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),r=e._passes.length;for(let s=0;s<r;++s){const a=e._passes[s];a.framebuffer=o,a.passState.framebuffer=o}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}(e,t)}function CK(e,t,n){n=g(n,0),(e._isPointLight||0===n)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}cf.MAXIMUM_DISTANCE=2e4,cf.prototype.debugCreateRenderStates=function(){OB(this)},Object.defineProperties(cf.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){!function b9e(e,t){e._size=t;const n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){o.x=t=mn.maximumCubeMapSize>=t?t:mn.maximumCubeMapSize,o.y=t;const r=new Vt(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 1===i?(o.x=t=mn.maximumTextureSize>=t?t:mn.maximumTextureSize,o.y=t,n[0].passState.viewport=new Vt(0,0,t,t)):4===i&&(o.x=2*(t=mn.maximumTextureSize>=2*t?t:mn.maximumTextureSize/2),o.y=2*t,n[0].passState.viewport=new Vt(0,0,t,t),n[1].passState.viewport=new Vt(t,0,t,t),n[2].passState.viewport=new Vt(0,t,t,t),n[3].passState.viewport=new Vt(t,t,t,t));e._clearPassState.viewport=new Vt(0,0,o.x,o.y);for(let r=0;r<i;++r){const s=n[r],a=s.passState.viewport;s.textureOffsets=new k(a.width/o.x,0,0,a.x/o.x,0,a.height/o.y,0,a.y/o.y,0,0,1,0,0,0,0,1)}}(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}}});const A9e=new Vt;const lf=new Array(8);lf[0]=new fe(-1,-1,-1,1),lf[1]=new fe(1,-1,-1,1),lf[2]=new fe(1,1,-1,1),lf[3]=new fe(-1,1,-1,1),lf[4]=new fe(-1,-1,1,1),lf[5]=new fe(1,-1,1,1),lf[6]=new fe(1,1,1,1),lf[7]=new fe(-1,1,1,1);const Cm=new k,RB=new Array(8);for(let e=0;e<8;++e)RB[e]=new fe;const E9e=[X.RED,X.GREEN,X.BLUE,X.MAGENTA],w9e=new f;function S9e(e,t){!function x9e(e,t){const n=t.context,i=t.context.drawingBufferWidth,r=.3*Math.min(i,t.context.drawingBufferHeight),s=A9e;s.x=i-r,s.y=0,s.width=r,s.height=r;let a=e._debugShadowViewCommand;c(a)||(a=function T9e(e,t){let n;n=e._isPointLight?"uniform samplerCube shadowMap_textureCube; \nin vec2 v_textureCoordinates; \nvoid main() \n{ \n vec2 uv = v_textureCoordinates; \n vec3 dir; \n \n if (uv.y < 0.5) \n { \n if (uv.x < 0.333) \n { \n dir.x = -1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = -1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else \n { \n dir.z = -1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 1.0; \n } \n } \n else \n { \n if (uv.x < 0.333) \n { \n dir.x = 1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = 1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else \n { \n dir.z = 1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 3.0; \n } \n } \n \n float shadow = czm_unpackDepth(czm_textureCube(shadowMap_textureCube, dir)); \n out_FragColor = vec4(vec3(shadow), 1.0); \n} \n":`uniform sampler2D shadowMap_texture; \nin vec2 v_textureCoordinates; \nvoid main() \n{ \n${e._usesDepthTexture?" float shadow = texture(shadowMap_texture, v_textureCoordinates).r; \n":" float shadow = czm_unpackDepth(texture(shadowMap_texture, v_textureCoordinates)); \n"} out_FragColor = vec4(vec3(shadow), 1.0); \n} \n`;const i=t.createViewportQuadCommand(n,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return i.pass=ze.OVERLAY,i}(e,n),e._debugShadowViewCommand=a),(!c(a.renderState)||!Vt.equals(a.renderState.viewport,s))&&(a.renderState=Pt.fromCache({viewport:Vt.clone(s)})),t.commandList.push(e._debugShadowViewCommand)}(e,t);const n=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(n&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new yC({camera:e._sceneCamera,color:X.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){n&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new yC({camera:e._shadowMapCamera,color:X.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 yC({camera:e._passes[i].camera,color:E9e[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!c(e._debugLightFrustum)||e._needsUpdate){const i=e._shadowMapCamera.positionWC,o=yt.IDENTITY,r=2*e._pointLightRadius,s=f.fromElements(r,r,r,w9e),a=k.fromTranslationQuaternionRotationScale(i,o,s,Cm);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=function C9e(e,t){const n=new Un({geometry:new cv({minimum:new f(-.5,-.5,-.5),maximum:new f(.5,.5,.5)}),attributes:{color:ti.fromColor(t)}}),i=new Un({geometry:new wN({radius:.5}),attributes:{color:ti.fromColor(t)}});return new Xi({geometryInstances:[n,i],appearance:new yi({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}(a,X.YELLOW)}e._debugLightFrustum.update(t)}else(!c(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new yC({camera:e._shadowMapCamera,color:X.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function uI(){this.viewMatrix=new k,this.inverseViewMatrix=new k,this.frustum=void 0,this.positionCartographic=new Se,this.positionWC=new f,this.directionWC=f.clone(f.UNIT_Z),this.upWC=f.clone(f.UNIT_Y),this.rightWC=f.clone(f.UNIT_X),this.viewProjectionMatrix=new k}uI.prototype.clone=function(e){k.clone(e.viewMatrix,this.viewMatrix),k.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),Se.clone(e.positionCartographic,this.positionCartographic),f.clone(e.positionWC,this.positionWC),f.clone(e.directionWC,this.directionWC),f.clone(e.upWC,this.upWC),f.clone(e.rightWC,this.rightWC)};const v9e=new k(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);uI.prototype.getViewProjection=function(){return k.multiply(this.frustum.projectionMatrix,this.viewMatrix,this.viewProjectionMatrix),k.multiply(v9e,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};const D9e=new Array(5),I9e=new Po,P9e=new Array(4),EK=new f,wK=new f,L9e=new k,R9e=new f,N9e=new f,SK=new f,F9e=[new f(-1,0,0),new f(0,-1,0),new f(0,0,-1),new f(1,0,0),new f(0,1,0),new f(0,0,1)],B9e=[new f(0,-1,0),new f(0,0,-1),new f(0,-1,0),new f(0,-1,0),new f(0,0,1),new f(0,-1,0)],k9e=[new f(0,0,1),new f(1,0,0),new f(-1,0,0),new f(0,0,-1),new f(1,0,0),new f(1,0,0)],z9e=new f,V9e=new f,vK=new be,DK=vK.center;cf.prototype.update=function(e){if(function G9e(e,t){const n=t.camera,i=e._lightCamera,o=e._sceneCamera,r=e._shadowMapCamera;e._cascadesEnabled?f.clone(i.directionWC,r.directionWC):e._isPointLight?f.clone(i.positionWC,r.positionWC):r.clone(i);const s=e._lightDirectionEC;let a,l;k.multiplyByPointAsVector(n.viewMatrix,r.directionWC,s),f.normalize(s,s),f.negate(s,s),k.multiplyByPoint(n.viewMatrix,r.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius,e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),l=Math.min(t.shadowState.farPlane,e.maximumDistance),l=Math.max(l,a+1)):(a=n.frustum.near,l=e.maximumDistance),e._sceneCamera=pr.clone(n,o),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=l,e._distance=l-a,function H9e(e,t){const n=e._sceneCamera,i=e._shadowMapCamera,o=vK;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance)return e._outOfView=!0,void(e._needsUpdate=!1);const r=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,z9e),s=f.negate(i.directionWC,V9e),a=f.dot(r,s);if(e.fadingEnabled){const l=O.clamp(a/.1,0,1);e._darkness=O.lerp(1,e.darkness,l)}else e._darkness=e.darkness;if(a<0)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)o.center=i.positionWC,o.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(o)===Qn.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),be.clone(o,e._boundingSphere);else{const r=i.frustum.far/2,s=f.add(i.positionWC,f.multiplyByScalar(i.directionWC,r,DK),DK);o.center=s,o.radius=r,e._outOfView=t.cullingVolume.computeVisibility(o)===Qn.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),be.clone(o,e._boundingSphere)}}(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}(this,e),this._needsUpdate)if(function y9e(e,t){(!c(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(LB(e),xK(e,t),function g9e(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==oe.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,OB(e),LB(e),xK(e,t))}(e,t),CK(e,t))}(this,e.context),this._isPointLight&&function U9e(e,t){const n=new Po;n.fov=O.PI_OVER_TWO,n.near=1,n.far=e._pointLightRadius,n.aspectRatio=1;for(let i=0;i<6;++i){const o=e._passes[i].camera;o.positionWC=e._shadowMapCamera.positionWC,o.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(o.positionWC,o.positionCartographic),o.directionWC=F9e[i],o.upWC=B9e[i],o.rightWC=k9e[i],k.computeView(o.positionWC,o.directionWC,o.upWC,o.rightWC,o.viewMatrix),k.inverse(o.viewMatrix,o.inverseViewMatrix),o.frustum=n}}(this,e),this._cascadesEnabled&&(function M9e(e,t){const n=e._shadowMapCamera,i=e._sceneCamera,o=k.multiply(i.frustum.projectionMatrix,i.viewMatrix,Cm),r=k.inverse(o,Cm),s=n.directionWC;let a=i.directionWC;f.equalsEpsilon(s,a,O.EPSILON10)&&(a=i.upWC);const l=f.cross(s,a,R9e);a=f.cross(l,s,N9e),f.normalize(a,a),f.normalize(l,l);const u=f.fromElements(0,0,0,SK);let d=k.computeView(u,s,a,l,L9e);const h=k.multiply(d,r,Cm),m=f.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,EK),_=f.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,wK);for(let v=0;v<8;++v){const D=fe.clone(lf[v],RB[v]);k.multiplyByVector(h,D,D),f.divideByScalar(D,D.w,D),f.minimumByComponent(D,m,m),f.maximumByComponent(D,_,_)}_.z+=1e3,m.z-=10;const p=SK;p.x=-.5*(m.x+_.x),p.y=-.5*(m.y+_.y),p.z=-_.z;const y=k.fromTranslation(p,Cm);d=k.multiply(y,d,d);const A=.5*(_.x-m.x),x=.5*(_.y-m.y),C=_.z-m.z,w=n.frustum;w.left=-A,w.right=A,w.bottom=-x,w.top=x,w.near=.01,w.far=C,k.clone(d,n.viewMatrix),k.inverse(d,n.inverseViewMatrix),k.getTranslation(n.inverseViewMatrix,n.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),f.clone(s,n.directionWC),f.clone(a,n.upWC),f.clone(l,n.rightWC)}(this,e),this._numberOfCascades>1&&function O9e(e,t){const n=e._shadowMapCamera,i=e._sceneCamera,o=i.frustum.near,r=i.frustum.far,s=e._numberOfCascades;let a;const l=r-o,u=r/o;let d=.9,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,d=.9);const m=P9e,_=D9e;for(_[0]=o,_[s]=r,a=0;a<s;++a){const F=(a+1)/s,S=o*Math.pow(u,F),L=O.lerp(o+l*F,S,d);_[a+1]=L,m[a]=L-_[a]}if(h){for(a=0;a<s;++a)m[a]=Math.min(m[a],e._maximumCascadeDistances[a]);let F=_[0];for(a=0;a<s-1;++a)F+=m[a],_[a+1]=F}fe.unpack(_,0,e._cascadeSplits[0]),fe.unpack(_,1,e._cascadeSplits[1]),fe.unpack(m,0,e._cascadeDistances);const p=n.frustum,y=p.left,A=p.right,x=p.bottom,C=p.top,w=p.near,v=p.far,D=n.positionWC,P=n.directionWC,N=n.upWC,R=i.frustum.clone(I9e),B=n.getViewProjection();for(a=0;a<s;++a){R.near=_[a],R.far=_[a+1];const F=k.multiply(R.projectionMatrix,i.viewMatrix,Cm),S=k.inverse(F,Cm),I=k.multiply(B,S,Cm),L=f.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,EK),M=f.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,wK);for(let q=0;q<8;++q){const V=fe.clone(lf[q],RB[q]);k.multiplyByVector(I,V,V),f.divideByScalar(V,V.w,V),f.minimumByComponent(V,L,L),f.maximumByComponent(V,M,M)}L.x=Math.max(L.x,0),L.y=Math.max(L.y,0),L.z=0,M.x=Math.min(M.x,1),M.y=Math.min(M.y,1),M.z=Math.min(M.z,1);const U=e._passes[a],z=U.camera;z.clone(n);const j=z.frustum;j.left=y+L.x*(A-y),j.right=y+M.x*(A-y),j.bottom=x+L.y*(C-x),j.top=x+M.y*(C-x),j.near=w+L.z*(v-w),j.far=w+M.z*(v-w),U.cullingVolume=z.frustum.computeCullingVolume(D,P,N);const W=e._cascadeMatrices[a];k.multiply(z.getViewProjection(),i.inverseViewMatrix,W),k.multiply(U.textureOffsets,W,W)}}(this,e)),this._isPointLight)this._shadowMapCullingVolume=Tu.fromBoundingSphere(this._boundingSphere);else{const t=this._shadowMapCamera;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(t.positionWC,t.directionWC,t.upWC),1===this._passes.length&&this._passes[0].camera.clone(t)}if(1===this._passes.length){const t=this._sceneCamera.inverseViewMatrix;k.multiply(this._shadowMapCamera.getViewProjection(),t,this._shadowMapMatrix)}this.debugShow&&S9e(this,e)},cf.prototype.updatePass=function(e,t){CK(this,e,t)};const j9e=new G;function IK(e,t,n){const 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(){const r=j9e;return r.x=1/e._textureSize.x,r.y=1/e._textureSize.y,fe.fromElements(r.x,r.y,i.depthBias,i.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return fe.fromElements(i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new fe,combinedUniforms2:new fe};return Gn(t,o,!1)}function W9e(e,t,n,i,o,r){let s,a,l;if(c(r)&&(s=r.shaderProgram,a=r.renderState,l=r.uniformMap),(r=Zt.shallowClone(n,r)).castShadows=!0,r.receiveShadows=!1,!c(s)||o!==n.shaderProgram.id||t){const u=n.shaderProgram,d=n.pass===ze.GLOBE,h=n.pass!==ze.TRANSLUCENT,m=e._isPointLight,_=e._usesDepthTexture,p=Ab.getShadowCastShaderKeyword(m,d,_,h);if(s=i.shaderCache.getDerivedShaderProgram(u,p),!c(s)){const x=u.fragmentShaderSource,C=Ab.createShadowCastVertexShader(u.vertexShaderSource,m,d),w=Ab.createShadowCastFragmentShader(x,m,_,h);s=i.shaderCache.createDerivedShaderProgram(u,p,{vertexShaderSource:C,fragmentShaderSource:w,attributeLocations:u._attributeLocations})}a=e._primitiveRenderState,m?a=e._pointRenderState:d&&(a=e._terrainRenderState),n.renderState.cull.enabled||(a=zt(a,!1),a.cull=zt(a.cull,!1),a.cull.enabled=!1,a=Pt.fromCache(a)),l=IK(e,n.uniformMap,d)}return r.shaderProgram=s,r.renderState=a,r.uniformMap=l,r}cf.createReceiveDerivedCommand=function(e,t,n,i,o){c(o)||(o={});const s=t.shaderProgram,a=s.vertexShaderSource,l=s.fragmentShaderSource,u=t.pass===ze.GLOBE;let d=!1;if(u&&(d=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&e.length>0){let h,m;c(o.receiveCommand)&&(h=o.receiveCommand.shaderProgram,m=o.receiveCommand.uniformMap),o.receiveCommand=Zt.shallowClone(t,o.receiveCommand),o.castShadows=!1,o.receiveShadows=!0;const _=o.receiveShaderCastShadows!==t.castShadows,p=o.receiveShaderProgramId!==t.shaderProgram.id;if(!c(h)||p||n||_){const y=Ab.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,d);if(h=i.shaderCache.getDerivedShaderProgram(s,y),!c(h)){const A=Ab.createShadowReceiveVertexShader(a,u,d),x=Ab.createShadowReceiveFragmentShader(l,e[0],t.castShadows,u,d);h=i.shaderCache.createDerivedShaderProgram(s,y,{vertexShaderSource:A,fragmentShaderSource:x,attributeLocations:s._attributeLocations})}m=IK(e[0],t.uniformMap,u)}o.receiveCommand.shaderProgram=h,o.receiveCommand.uniformMap=m,o.receiveShaderProgramId=t.shaderProgram.id,o.receiveShaderCastShadows=t.castShadows}return o},cf.createCastDerivedCommand=function(e,t,n,i,o){if(c(o)||(o={}),t.castShadows){let r=o.castCommands;c(r)||(r=o.castCommands=[]);const s=o.castShaderProgramId,a=e.length;r.length=a;for(let l=0;l<a;++l)r[l]=W9e(e[l],n,t,i,s,r[l]);o.castShaderProgramId=t.shaderProgram.id}return o},cf.prototype.isDestroyed=function(){return!1},cf.prototype.destroy=function(){LB(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 Ye(this)};const dI=cf,NB="uniform sampler2D colorTexture;\n\n#ifdef DEBUG_SHOW_DEPTH\nuniform sampler2D u_packedTranslucentDepth;\n#endif\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n#ifdef DEBUG_SHOW_DEPTH\n if (v_textureCoordinates.x < 0.5)\n {\n out_FragColor.rgb = vec3(czm_unpackDepth(texture(u_packedTranslucentDepth, v_textureCoordinates)));\n out_FragColor.a = 1.0;\n }\n#else\n vec4 color = texture(colorTexture, v_textureCoordinates);\n\n#ifdef PICK\n if (color == vec4(0.0))\n {\n discard;\n }\n#else\n // Reverse premultiplication process to get the correct composited result of the classification primitives\n color.rgb /= color.a;\n#endif\n out_FragColor = color;\n#endif\n}\n";function Em(e){this._drawClassificationFBO=new Zo({createDepthAttachments:!1}),this._accumulationFBO=new Zo({createDepthAttachments:!1}),this._packFBO=new Zo,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 cr({color:new X(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new cr({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new Vt,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}function PK(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function OK(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}Object.defineProperties(Em.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}}),Em.prototype.executeTranslucentCommands=function(e,t,n,i,o){const r=i.length;let s,a;const l=e.frameState.useLogDepth,u=e.context,d=n.framebuffer;for(a=0;a<r;++a)if(s=i[a],s=l?s.derivedCommands.logDepth.command:s,s.depthForTranslucentClassification){this._hasTranslucentDepth=!0;break}if(this._hasTranslucentDepth){for(function $9e(e,t,n,i){if(!e.isSupported())return;e._opaqueDepthStencilTexture=i;const o=e._opaqueDepthStencilTexture.width,r=e._opaqueDepthStencilTexture.height;let s,a;if(e._drawClassificationFBO.isDirty(o,r)&&(function X9e(e,t,n,i){PK(e),e._translucentDepthStencilTexture=new jn({context:t,width:n,height:i,pixelFormat:vt.DEPTH_STENCIL,pixelDatatype:bt.UNSIGNED_INT_24_8,sampler:Hi.NEAREST})}(e,t,o,r),function Z9e(e,t,n,i){OK(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)}(e,t,o,r)),c(e._packDepthCommand)||(s=new Et({sources:["uniform sampler2D u_opaqueDepthTexture;\nuniform sampler2D u_translucentDepthTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n float opaqueDepth = texture(u_opaqueDepthTexture, v_textureCoordinates).r;\n float translucentDepth = texture(u_translucentDepthTexture, v_textureCoordinates).r;\n translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);\n out_FragColor = czm_packDepth(translucentDepth);\n}\n"]}),a={u_opaqueDepthTexture:function(){return e._opaqueDepthStencilTexture},u_translucentDepthTexture:function(){return e._translucentDepthStencilTexture}},e._packDepthCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),!c(e._compositeCommand)){s=new Et({sources:[NB]}),a={colorTexture:function(){return e._textureToComposite}},e._compositeCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e});const d=e._compositeCommand,h=d.shaderProgram,m=t.shaderCache.createDerivedShaderProgram(h,"pick",{vertexShaderSource:h.vertexShaderSource,fragmentShaderSource:new Et({sources:s.sources,defines:["PICK"]}),attributeLocations:h._attributeLocations}),_=Zt.shallowClone(d);_.shaderProgram=m,d.derivedCommands.pick=_}c(e._copyCommand)||(s=new Et({sources:[NB]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),c(e._accumulateCommand)||(s=new Et({sources:[NB]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._accumulateCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),e._viewport.width=o,e._viewport.height=r;const l=!Vt.equals(e._viewport,n.viewport);let u=l!==e._useScissorTest;e._useScissorTest=l,Vt.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=Vt.clone(n.viewport,e._scissorRectangle),u=!0),(!c(e._rsDepth)||!Vt.equals(e._viewport,e._rsDepth.viewport)||u)&&(e._rsDepth=Pt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),c(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),(!c(e._rsAccumulate)||!Vt.equals(e._viewport,e._rsAccumulate.viewport)||u)&&(e._rsAccumulate=Pt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Bi.EQUAL,reference:Tn.CESIUM_3D_TILE_MASK}})),c(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!c(e._rsComp)||!Vt.equals(e._viewport,e._rsComp.viewport)||u)&&(e._rsComp=Pt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:Ji.ALPHA_BLEND})),c(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}(this,u,n,o),n.framebuffer=this._drawClassificationFBO.framebuffer,this._clearDepthStencilCommand.execute(u,n),a=0;a<r;++a)s=i[a],s=l?s.derivedCommands.logDepth.command:s,s.depthForTranslucentClassification&&t(s.derivedCommands.depth.depthOnlyCommand,e,u,n);this._frustumsDrawn+=this._hasTranslucentDepth?1:0,this._hasTranslucentDepth&&(n.framebuffer=this._packFBO.framebuffer,this._packDepthCommand.execute(u,n)),n.framebuffer=d}},Em.prototype.executeClassificationCommands=function(e,t,n,i){if(!this._hasTranslucentDepth)return;const o=e.context,r=o.uniformState,s=n.framebuffer;2===this._frustumsDrawn&&(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(ze.CESIUM_3D_TILE_CLASSIFICATION);const a=r.globeDepthTexture;r.globeDepthTexture=this._packFBO.getColorTexture();const l=i.commands[ze.CESIUM_3D_TILE_CLASSIFICATION],u=i.indices[ze.CESIUM_3D_TILE_CLASSIFICATION];for(let d=0;d<u;++d)t(l[d],e,o,n);r.globeDepthTexture=a,n.framebuffer=s,1!==this._frustumsDrawn&&(n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=s)},Em.prototype.execute=function(e,t){this._hasTranslucentDepth&&(this._textureToComposite=1===this._frustumsDrawn?this._drawClassificationFBO.getColorTexture():this._accumulationFBO.getColorTexture(),(e.frameState.passes.pick?this._compositeCommand.derivedCommands.pick:this._compositeCommand).execute(e.context,t),function K9e(e,t,n){if(!e._hasTranslucentDepth)return;const 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}(this,e,t))},Em.prototype.isSupported=function(){return this._supported},Em.prototype.isDestroyed=function(){return!1},Em.prototype.destroy=function(){return PK(this),OK(this),c(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),c(this._packDepthCommand)&&(this._packDepthCommand.shaderProgram=this._packDepthCommand.shaderProgram&&this._packDepthCommand.shaderProgram.destroy()),Ye(this)};const Q9e=Em;function J9e(){this.command=void 0,this.near=void 0,this.far=void 0}function fI(e,t,n){const i=e.context;let o,r;i.depthTexture&&(o=new UGe),e._useOIT&&i.depthTexture&&(r=new a9e(i));const s=new Cg(i);s.viewport=Vt.clone(n),this.camera=t,this._cameraClone=pr.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=s,this.pickFramebuffer=new d9e(i),this.pickDepthFramebuffer=new u9e,this.sceneFramebuffer=new TK,this.globeDepth=o,this.globeTranslucencyFramebuffer=new GGe,this.oit=r,this.translucentTileClassification=new Q9e(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}const LK=new f,RK=new f;function i6e(e,t,n,i,o){t.debugShowFrustums&&(n.debugOverlappingFrustums=0);const r=e.frustumCommandsList,s=r.length;for(let a=0;a<s;++a){const l=r[a],u=l.near;if(i>l.far)continue;if(o<u)break;const h=n.pass,m=l.indices[h]++;if(l.commands[h][m]=n,t.debugShowFrustums&&(n.debugOverlappingFrustums|=1<<a),n.executeInClosestFrustum)break}if(t.debugShowFrustums){const a=e.debugFrustumStatistics.commandsInFrustums;a[n.debugOverlappingFrustums]=c(a[n.debugOverlappingFrustums])?a[n.debugOverlappingFrustums]+1:1,++e.debugFrustumStatistics.totalCommands}t.updateDerivedCommands(n)}fI.prototype.checkForCameraUpdates=function(e){const t=this.camera,n=this._cameraClone;return function t6e(e,t,n){const i=1/Math.max(1,function e6e(e,t){const 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)}(e.position,t.position));return f.multiplyByScalar(e.position,i,LK),f.multiplyByScalar(t.position,i,RK),f.equalsEpsilon(LK,RK,n)&&f.equalsEpsilon(e.direction,t.direction,n)&&f.equalsEpsilon(e.up,t.up,n)&&f.equalsEpsilon(e.right,t.right,n)&&k.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}(t,n,O.EPSILON15)?(this._cameraStartFired&&wr()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=wr(),pr.clone(t,n),!0)};const NK=new Tu,o6e=new ip;fI.prototype.createPotentiallyVisibleSet=function(e){const 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:{}});const l=this.frustumCommandsList,u=l.length,d=ze.NUMBER_OF_PASSES;for(let I=0;I<u;++I)for(let L=0;L<d;++L)l[I].indices[L]=0;r.length=0,s.length=0;const h=this._commandExtents,m=h.length;let _=0,p=+Number.MAX_VALUE,y=-Number.MAX_VALUE;const A=t.shadowState.shadowsEnabled;let x=+Number.MAX_VALUE,C=-Number.MAX_VALUE,w=Number.MAX_VALUE;const v=t.mode===ce.SCENE3D?t.occluder:void 0;let D=t.cullingVolume;const P=NK.planes;for(let I=0;I<5;++I)P[I]=D.planes[I];D=NK;const N=a.length;for(let I=0;I<N;++I){const L=a[I],M=L.pass;if(M===ze.COMPUTE)r.push(L);else if(M===ze.OVERLAY)s.push(L);else{let U,z;const j=L.boundingVolume;if(c(j)){if(!e.isVisible(L,D,v))continue;const q=j.computePlaneDistances(o,i,o6e);U=q.start,z=q.stop,p=Math.min(p,U),y=Math.max(y,z),A&&L.receiveShadows&&U<dI.MAXIMUM_DISTANCE&&!(M===ze.GLOBE&&U<-100&&z>100)&&(M!==ze.GLOBE&&U<100&&(w=Math.min(w,z-U)),x=Math.min(x,U),C=Math.max(C,z))}else L instanceof cr?(U=n.frustum.near,z=n.frustum.far):(U=n.frustum.near,z=n.frustum.far,p=Math.min(p,U),y=Math.max(y,z));let W=h[_];c(W)||(W=h[_]=new J9e),W.command=L,W.near=U,W.far=z,_++}}let R,B;for(A&&(x=Math.min(Math.max(x,n.frustum.near),n.frustum.far),C=Math.max(Math.min(C,n.frustum.far),x)),A&&(t.shadowState.nearPlane=x,t.shadowState.farPlane=C,t.shadowState.closestObjectSize=w),function n6e(e,t,n,i){const o=t.frameState,r=o.camera,s=o.useLogDepth?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,a=t.mode===ce.SCENE2D,l=t.nearToFarDistance2D;let u;i*=1+O.EPSILON2,n=Math.min(Math.max(n,r.frustum.near),r.frustum.far),i=Math.max(Math.min(i,r.frustum.far),n),a?(i=Math.min(i,r.position.z+t.nearToFarDistance2D),n=Math.min(n,i),u=Math.ceil(Math.max(1,i-n)/t.nearToFarDistance2D)):u=Math.ceil(Math.log(i/n)/Math.log(s));const d=e.frustumCommandsList;d.length=u;for(let h=0;h<u;++h){let m,_;a?(m=Math.min(i-l,n+h*l),_=Math.min(i,m+l)):(m=Math.max(n,Math.pow(s,h)*n),_=Math.min(i,s*m));let p=d[h];c(p)?(p.near=m,p.far=_):p=d[h]=new BGe(m,_)}}(this,e,p,y),R=0;R<_;R++)B=h[R],i6e(this,e,B.command,B.near,B.far);if(_<m)for(R=_;R<m&&(B=h[R],c(B.command));R++)B.command=void 0;const F=l.length,S=t.frustumSplits;S.length=F+1;for(let I=0;I<F;++I)S[I]=l[I].near,I===F-1&&(S[I+1]=l[I].far)},fI.prototype.destroy=function(){let e;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();const t=this.pickDepths,n=t.length;for(e=0;e<n;++e)t[e].destroy()};const MK=fI,FK=.1,r6e=new wg({pass:Os.MOST_DETAILED_PRELOAD}),s6e=new wg({pass:Os.MOST_DETAILED_PICK}),MB=new wg({pass:Os.PICK});function ta(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;const t=new Vt(0,0,1,1),n=new pr(e);n.frustum=new $n({width:FK,aspectRatio:1,near:.1}),this._pickOffscreenView=new MK(e,n,t)}ta.prototype.update=function(){this._pickPositionCacheDirty=!0},ta.prototype.getPickDepth=function(e,t){const n=e.view.pickDepths;let i=n[t];return c(i)||(i=new MGe,n[t]=i),i};const a6e=new qa,c6e=new f,hI=new f,l6e=new G,u6e=new k,f6e=new xg,h6e=new G;function BK(e,t,n,i,o){const r=e.camera.frustum;return r instanceof $n||r instanceof qa?function d6e(e,t,n,i,o){const r=e.camera;let s=r.frustum;const a=s.offCenterFrustum;c(a)&&(s=a);let l=2*(t.x-o.x)/o.width-1;l*=.5*(s.right-s.left);let u=2*(o.height-t.y-o.y)/o.height-1;u*=.5*(s.top-s.bottom);const d=k.clone(r.transform,u6e);r._setTransform(k.IDENTITY);const h=f.clone(r.position,c6e);f.multiplyByScalar(r.right,l,hI),f.add(hI,h,h),f.multiplyByScalar(r.up,u,hI),f.add(hI,h,h),r._setTransform(d),e.mode===ce.SCENE2D&&f.fromElements(h.z,h.x,h.y,h);const m=s.getPixelDimensions(o.width,o.height,1,1,l6e),_=a6e;return _.right=.5*m.x,_.left=-_.right,_.top=.5*m.y,_.bottom=-_.top,_.near=s.near,_.far=s.far,_.computeCullingVolume(h,r.directionWC,r.upWC)}(e,t,0,0,o):function p6e(e,t,n,i,o){const r=e.camera,s=r.frustum,a=s.near,l=Math.tan(.5*s.fovy),m=(2*(t.x-o.x)/o.width-1)*a*(s.aspectRatio*l),_=(2*(o.height-t.y-o.y)/o.height-1)*a*l,p=s.getPixelDimensions(o.width,o.height,1,1,h6e),y=p.x*n*.5,A=p.y*i*.5,x=f6e;return x.top=_+A,x.bottom=_-A,x.right=m+y,x.left=m-y,x.near=a,x.far=s.far,x.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}(e,t,n,i,o)}let Tb=3,SC=3,uf=new Vt(0,0,Tb,SC);const kK=new G,FB=new X(0,0,0,0);ta.prototype.pick=function(e,t,n,i){if(!c(t))throw new E("windowPosition is undefined.");Tb=g(n,3),SC=g(i,Tb);const o=e.context,r=o.uniformState,s=e.frameState,a=e.defaultView;e.view=a;const l=a.viewport;l.x=0,l.y=0,l.width=o.drawingBufferWidth,l.height=o.drawingBufferHeight;let u=a.passState;u.viewport=Vt.clone(l,u.viewport);const d=Ur.transformWindowToDrawingBuffer(e,t,kK);e.jobScheduler.disableThisFrame(),e.updateFrameState(),s.cullingVolume=BK(e,d,Tb,SC,l),s.invertClassification=!1,s.passes.pick=!0,s.tilesetPassState=MB,r.update(s),e.updateEnvironment(),uf.x=d.x-.5*(Tb-1),uf.y=e.drawingBufferHeight-d.y-.5*(SC-1),uf.width=Tb,uf.height=SC,u=a.pickFramebuffer.begin(uf,a.viewport),e.updateAndExecuteCommands(u,FB),e.resolveFramebuffers(u);const h=a.pickFramebuffer.end(uf);return o.endFrame(),h};const _6e=new Po,g6e=new xg,y6e=new $n,b6e=new qa;ta.prototype.pickPositionWorldCoordinates=function(e,t,n){if(!e.useDepthPicking)return;if(!c(t))throw new E("windowPosition is undefined.");if(!e.context.depthTexture)throw new E("Picking from the depth buffer is not supported. Check pickPositionSupported.");const i=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(i))return f.clone(this._pickPositionCache[i],n);const o=e.frameState,r=e.context,s=r.uniformState,a=e.defaultView;e.view=a;const l=Ur.transformWindowToDrawingBuffer(e,t,kK);e.pickTranslucentDepth?function m6e(e,t){const n=e.context,i=e.frameState,o=e.environmentState,r=e.defaultView;e.view=r;const s=r.viewport;s.x=0,s.y=0,s.width=n.drawingBufferWidth,s.height=n.drawingBufferHeight;let a=r.passState;a.viewport=Vt.clone(s,a.viewport),e.clearPasses(i.passes),i.passes.pick=!0,i.passes.depth=!0,i.cullingVolume=BK(e,t,1,1,s),i.tilesetPassState=MB,e.updateEnvironment(),o.renderTranslucentDepthForPick=!0,a=r.pickDepthFramebuffer.update(n,t,s),e.updateAndExecuteCommands(a,FB),e.resolveFramebuffers(a),n.endFrame()}(e,l):(e.updateFrameState(),s.update(o),e.updateEnvironment()),l.y=e.drawingBufferHeight-l.y;const u=e.camera;let d;d=c(u.frustum.fov)?u.frustum.clone(_6e):c(u.frustum.infiniteProjectionMatrix)?u.frustum.clone(g6e):c(u.frustum.width)?u.frustum.clone(y6e):u.frustum.clone(b6e);const h=a.frustumCommandsList,m=h.length;for(let _=0;_<m;++_){const y=this.getPickDepth(e,_).getDepth(r,l.x,l.y);if(c(y)&&y>0&&y<1){const A=h[_];let x;return e.mode===ce.SCENE2D?(x=u.position.z,u.position.z=x-A.near+1,d.far=Math.max(1,A.far-A.near),d.near=1,s.update(o),s.updateFrustum(d)):(d.near=A.near*(0!==_?e.opaqueFrustumNearOffset:1),d.far=A.far,s.updateFrustum(d)),n=Ur.drawingBufferToWgs84Coordinates(e,l,y,n),e.mode===ce.SCENE2D&&(u.position.z=x,s.update(o)),this._pickPositionCache[i]=f.clone(n),n}}this._pickPositionCache[i]=void 0};const A6e=new Se;function UK(e,t){let n,i;const o=[],r=[],s=[],a=[];c(e)||(e=Number.MAX_VALUE);let l=t();for(;c(l);){const u=l.object,h=l.exclude;if(c(l.position)&&!c(u)){o.push(l);break}if(!c(u)||!c(u.primitive)||!h&&(o.push(l),0>=--e))break;const m=u.primitive;let _=!1;"function"==typeof m.getGeometryInstanceAttributes&&c(u.id)&&(i=m.getGeometryInstanceAttributes(u.id),c(i)&&c(i.show)&&(_=!0,i.show=Oi.toValue(!1,i.show),s.push(i))),u instanceof m_&&(_=!0,u.show=!1,a.push(u)),_||(m.show=!1,r.push(m)),l=t()}for(n=0;n<r.length;++n)r[n].show=!0;for(n=0;n<s.length;++n)i=s[n],i.show=Oi.toValue(!0,i.show);for(n=0;n<a.length;++n)a[n].show=!0;return o}ta.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),c(n)&&e.mode!==ce.SCENE3D){f.fromElements(n.y,n.z,n.x,n);const i=e.mapProjection,o=i.ellipsoid,r=i.unproject(n,A6e);o.cartographicToCartesian(r,n)}return n},ta.prototype.drillPick=function(e,t,n,i,o){const r=this;return UK(n,function(){const l=r.pick(e,t,i,o);if(c(l))return{object:l,position:void 0,exclude:!1}}).map(function(l){return l.object})};const zK=new f,T6e=new f;function x6e(e,t,n){this.ray=e,this.width=t,this.tilesets=n,this.ready=!1;const i=this;this.promise=new Promise(o=>{i._completePick=()=>{o()}})}function VK(e,t,n,i){const o=t.direction,r=f.mostOrthogonalAxis(o,zK),s=f.cross(o,r,zK),a=f.cross(o,s,T6e);return i.position=t.origin,i.direction=o,i.up=a,i.right=s,i.frustum.width=g(n,FK),i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function C6e(e,t,n){const i=t.frameState,s=n.tilesets,a=e._pickOffscreenView.camera,l=VK(0,n.ray,n.width,a),u=r6e;u.camera=a,u.cullingVolume=l;let d=!0;const h=s.length;for(let m=0;m<h;++m){const _=s[m];_.show&&t.primitives.contains(_)&&(_.updateForPass(i,u),d=d&&u.ready)}return d&&n._completePick(),d}function HK(e,t,n){const i=e.length;for(let o=0;o<i;++o){const r=e.get(o);r.show&&(c(r.isCesium3DTileset)?(!c(t)||-1===t.indexOf(r))&&n.push(r):r instanceof Og&&HK(r,t,n))}}function pI(e,t,n,i,o,r){const s=[];if(HK(t.primitives,i,s),0===s.length)return Promise.resolve(r());const a=new x6e(n,o,s);return e._mostDetailedRayPicks.push(a),a.promise.then(function(){return r()})}function E6e(e,t){return!(!c(e)||!c(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function GK(e,t,n,i,o,r,s,a){return UK(i,function(){return function w6e(e,t,n,i,o,r,s){const a=t.context,l=a.uniformState,u=t.frameState,d=e._pickOffscreenView;t.view=d,VK(0,n,o,d.camera),uf=Vt.clone(d.viewport,uf);const h=d.pickFramebuffer.begin(uf,d.viewport);let m;t.jobScheduler.disableThisFrame(),t.updateFrameState(),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,u.tilesetPassState=s?s6e:MB,l.update(u),t.updateEnvironment(),t.updateAndExecuteCommands(h,FB),t.resolveFramebuffers(h);const _=d.pickFramebuffer.end(uf);if(t.context.depthTexture){const p=d.frustumCommandsList.length;for(let y=0;y<p;++y){const x=e.getPickDepth(t,y).getDepth(a,0,0);if(c(x)&&x>0&&x<1){const C=d.frustumCommandsList[y],w=C.near*(0!==y?t.opaqueFrustumNearOffset:1);m=fi.getPoint(n,w+x*(C.far-w));break}}}if(t.view=t.defaultView,a.endFrame(),c(_)||c(m))return{object:_,position:m,exclude:!c(m)&&r||E6e(_,i)}}(e,t,n,o,r,s,a)})}function xb(e,t,n,i,o,r,s){const a=GK(e,t,n,1,i,o,r,s);if(a.length>0)return a[0]}function jK(e,t,n,i,o,r,s,a){return GK(e,t,n,i,o,r,s,a)}function mI(e,t){return new Promise((n,i)=>{t.then(function(o){const r=e.postRender.addEventListener(function(){r(),n(o)});e.requestRender()}).catch(function(o){i(o)})})}ta.prototype.updateMostDetailedRayPicks=function(e){const t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)C6e(this,e,t[n])&&t.splice(n--,1)},ta.prototype.pickFromRay=function(e,t,n,i){if(T.defined("ray",t),e.mode!==ce.SCENE3D)throw new E("Ray intersections are only supported in 3D mode.");return xb(this,e,t,n,i,!1,!1)},ta.prototype.drillPickFromRay=function(e,t,n,i,o){if(T.defined("ray",t),e.mode!==ce.SCENE3D)throw new E("Ray intersections are only supported in 3D mode.");return jK(this,e,t,n,i,o,!1,!1)},ta.prototype.pickFromRayMostDetailed=function(e,t,n,i){if(T.defined("ray",t),e.mode!==ce.SCENE3D)throw new E("Ray intersections are only supported in 3D mode.");const o=this;return t=fi.clone(t),n=c(n)?n.slice():n,mI(e,pI(o,e,t,n,i,function(){return xb(o,e,t,n,i,!1,!0)}))},ta.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,o){if(T.defined("ray",t),e.mode!==ce.SCENE3D)throw new E("Ray intersections are only supported in 3D mode.");const r=this;return t=fi.clone(t),i=c(i)?i.slice():i,mI(e,pI(r,e,t,i,o,function(){return jK(r,e,t,n,i,o,!1,!0)}))};const S6e=new f,v6e=new f,D6e=new fi,WK=new Se;function BB(e,t){const n=e.globe,i=c(n)?n.ellipsoid:e.mapProjection.ellipsoid,o=wo._defaultMaxTerrainHeight,r=i.geodeticSurfaceNormalCartographic(t,v6e),s=Se.toCartesian(t,i,S6e),a=D6e;a.origin=s,a.direction=r;const l=new fi;return fi.getPoint(a,o,l.origin),f.negate(r,l.direction),l}function qK(e,t){const n=e.globe,i=c(n)?n.ellipsoid:e.mapProjection.ellipsoid;return BB(e,Se.fromCartesian(t,i,WK))}function YK(e,t){const n=e.globe,i=c(n)?n.ellipsoid:e.mapProjection.ellipsoid;return Se.fromCartesian(t,i,WK).height}function I6e(e,t,n,i,o){const r=BB(t,n);return pI(e,t,r,i,o,function(){const s=xb(e,t,r,i,o,!0,!0);if(c(s))return YK(t,s.position)})}function P6e(e,t,n,i,o,r){const s=qK(t,n);return pI(e,t,s,i,o,function(){const a=xb(e,t,s,i,o,!0,!0);if(c(a))return f.clone(a.position,r)})}ta.prototype.sampleHeight=function(e,t,n,i){if(T.defined("position",t),e.mode!==ce.SCENE3D)throw new E("sampleHeight is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new E("sampleHeight requires depth texture support. Check sampleHeightSupported.");const r=xb(this,e,BB(e,t),n,i,!0,!1);if(c(r))return YK(e,r.position)},ta.prototype.clampToHeight=function(e,t,n,i,o){if(T.defined("cartesian",t),e.mode!==ce.SCENE3D)throw new E("clampToHeight is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new E("clampToHeight requires depth texture support. Check clampToHeightSupported.");const s=xb(this,e,qK(e,t),n,i,!0,!1);if(c(s))return f.clone(s.position,o)},ta.prototype.sampleHeightMostDetailed=function(e,t,n,i){if(T.defined("positions",t),e.mode!==ce.SCENE3D)throw new E("sampleHeightMostDetailed is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new E("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");n=c(n)?n.slice():n;const o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=I6e(this,e,t[s],n,i);return mI(e,Promise.all(r).then(function(s){const a=s.length;for(let l=0;l<a;++l)t[l].height=s[l];return t}))},ta.prototype.clampToHeightMostDetailed=function(e,t,n,i){if(T.defined("cartesians",t),e.mode!==ce.SCENE3D)throw new E("clampToHeightMostDetailed is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new E("clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.");n=c(n)?n.slice():n;const o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=P6e(this,e,t[s],n,i,t[s]);return mI(e,Promise.all(r).then(function(s){const a=s.length;for(let l=0;l<a;++l)t[l]=s[l];return t}))},ta.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};const O6e=ta,kB="#define SAMPLES 8\n\nuniform float delta;\nuniform float sigma;\nuniform float direction; // 0.0 for x direction, 1.0 for y direction\n\nuniform sampler2D colorTexture;\n\n#ifdef USE_STEP_SIZE\nuniform float stepSize;\n#else\nuniform vec2 step;\n#endif\n\nin vec2 v_textureCoordinates;\n\n// Incremental Computation of the Gaussian:\n// https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html\n\nvoid main()\n{\n vec2 st = v_textureCoordinates;\n vec2 dir = vec2(1.0 - direction, direction);\n\n#ifdef USE_STEP_SIZE\n vec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));\n#else\n vec2 step = step;\n#endif\n\n vec3 g;\n g.x = 1.0 / (sqrt(czm_twoPi) * sigma);\n g.y = exp((-0.5 * delta * delta) / (sigma * sigma));\n g.z = g.y * g.y;\n\n vec4 result = texture(colorTexture, st) * g.x;\n for (int i = 1; i < SAMPLES; ++i)\n {\n g.xy *= g.yz;\n\n vec2 offset = float(i) * dir * step;\n result += texture(colorTexture, st - offset) * g.x;\n result += texture(colorTexture, st + offset) * g.x;\n }\n\n out_FragColor = result;\n}\n";function Ng(){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 Zo,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new G,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}function XK(e){const t=e._framebuffers;if(!c(t))return;const 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 ZK(e){const t=e._commands;if(!c(t))return;const n=t.length;for(let i=0;i<n;++i)t[i].shaderProgram.destroy();e._commands=void 0}function K6e(e,t){let n;if(0===t)n={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{const 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 Q6e(e,t){let n="uniform sampler2D colorTexture; \nin vec2 v_textureCoordinates; \nfloat sampleTexture(vec2 offset) { \n";return n+=0===e?" vec4 color = texture(colorTexture, v_textureCoordinates + offset); \n return czm_luminance(color.rgb); \n":" return texture(colorTexture, v_textureCoordinates + offset).r; \n",n+="}\n\n",n+="uniform vec2 colorTextureDimensions; \nuniform vec2 minMaxLuminance; \nuniform sampler2D previousLuminance; \nvoid main() { \n float color = 0.0; \n float xStep = 1.0 / colorTextureDimensions.x; \n float yStep = 1.0 / colorTextureDimensions.y; \n int count = 0; \n for (int i = 0; i < 3; ++i) { \n for (int j = 0; j < 3; ++j) { \n vec2 offset; \n offset.x = -xStep + float(i) * xStep; \n offset.y = -yStep + float(j) * yStep; \n if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { \n continue; \n } \n color += sampleTexture(offset); \n ++count; \n } \n } \n if (count > 0) { \n color /= float(count); \n } \n",e===t-1&&(n+=" float previous = texture(previousLuminance, vec2(0.5)).r; \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n color = previous + (color - previous) / (60.0 * 1.5); \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n"),n+=" out_FragColor = vec4(color); \n} \n",n}Object.defineProperties(Ng.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){const e=this._framebuffers;if(c(e))return e[e.length-1].getColorTexture(0)}}}),Ng.prototype.clear=function(e){const t=this._framebuffers;if(!c(t))return;let n=this._clearCommand;c(n)||(n=this._clearCommand=new cr({color:new X(0,0,0,0),framebuffer:void 0}));const i=t.length;for(let o=0;o<i;++o)t[o].clear(e,n)},Ng.prototype.update=function(e){const t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,function $6e(e,t){XK(e);let n=e._width,i=e._height;const o=t.halfFloatingPointTexture?bt.HALF_FLOAT:bt.FLOAT,r=Math.ceil(Math.log(Math.max(n,i))/Math.log(3)),s=new Array(r);for(let l=0;l<r;++l)n=Math.max(Math.ceil(n/3),1),i=Math.max(Math.ceil(i/3),1),s[l]=new Zo,s[l].update(t,n,i,1,o);const a=s[r-1].getColorTexture(0);e._previousLuminance.update(t,a.width,a.height,1,o),e._framebuffers=s}(this,e),function J6e(e,t){ZK(e);const n=e._framebuffers,i=n.length,o=new Array(i);for(let r=0;r<i;++r)o[r]=t.createViewportQuadCommand(Q6e(r,i),{framebuffer:n[r].framebuffer,uniformMap:K6e(e,r)});e._commands=o}(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;const 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},Ng.prototype.execute=function(e,t){this._colorTexture=t;const n=this._commands;if(!c(n))return;const i=n.length;for(let o=0;o<i;++o)n[o].execute(e)},Ng.prototype.isDestroyed=function(){return!1},Ng.prototype.destroy=function(){return XK(this),ZK(this),Ye(this)};const eje=Ng;function Fg(e){const t=(e=g(e,g.EMPTY_OBJECT)).fragmentShader,n=g(e.textureScale,1),i=g(e.pixelFormat,vt.RGBA);if(T.typeOf.string("options.fragmentShader",t),T.typeOf.number.greaterThan("options.textureScale",n,0),T.typeOf.number.lessThanOrEquals("options.textureScale",n,1),!vt.isColorFormat(i))throw new E("options.pixelFormat must be a color format.");this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=n,this._forcePowerOfTwo=g(e.forcePowerOfTwo,!1),this._sampleMode=g(e.sampleMode,0),this._pixelFormat=i,this._pixelDatatype=g(e.pixelDatatype,bt.UNSIGNED_BYTE),this._clearColor=g(e.clearColor,X.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;const o=new Cg;o.scissorTest={enabled:!0,rectangle:c(e.scissorRectangle)?Vt.clone(e.scissorRectangle):new Vt},this._passState=o,this._ready=!1;let r=e.name;c(r)||(r=kr()),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(Fg.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(c(this._textureCache)){const e=this._textureCache.getFramebuffer(this._name);if(c(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}}});const tje=/uniform\s+sampler2D\s+depthTexture/g;function nje(e,t,n){const i=t[n];return("string"==typeof i||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof HTMLVideoElement||i instanceof ImageData)&&e._dirtyUniforms.push(n),{get:function(){return t[n]},set:function(o){const r=t[n];t[n]=o;const s=e._actualUniforms,a=s[n];c(a)&&a!==r&&a instanceof jn&&!c(e._textureCache.getStageByName(n))&&(e._texturesToRelease.push(a),delete s[n],delete s[`${n}Dimensions`]),r instanceof jn&&e._texturesToRelease.push(r),"string"==typeof o||o instanceof HTMLCanvasElement||o instanceof HTMLImageElement||o instanceof HTMLVideoElement||o instanceof ImageData?e._dirtyUniforms.push(n):s[n]=o}}}function ije(e,t){return function(){const n=e._actualUniforms[t];return"function"==typeof n?n():n}}function oje(e,t){return function(){const n=e[t]();if(c(n))return n.dimensions}}function cje(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function lje(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function $K(e){c(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();const t=e._textureCache;if(!c(t))return;const n=e._uniforms,i=e._actualUniforms;for(const o in i)i.hasOwnProperty(o)&&i[o]instanceof jn&&(c(t.getStageByName(n[o]))||i[o].destroy(),e._dirtyUniforms.push(o))}Fg.prototype._isSupported=function(e){return!tje.test(this._fragmentShader)||e.depthTexture},Fg.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&$K(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=function dje(e){let t=c(e._selected)?e._selected.length:0;const n=c(e._parentSelected)?e._parentSelected:0;let i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,e._combinedSelected=c(e._selected)&&c(e._parentSelected)?e._selected.concat(e._parentSelected):c(e._parentSelected)?e._parentSelected:e._selected,!i&&c(e._combinedSelected)){if(!c(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}(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=c(this._selected)?this._selected.length:0,this._parentSelectedLength=c(this._parentSelected)?this._parentSelected.length:0,function fje(e,t){if(!e._selectedDirty)return;e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;const n=e._combinedSelected;if(!c(n))return;let i,o,r=0;const s=n.length;for(i=0;i<s;++i)o=n[i],c(o.pickIds)?r+=o.pickIds.length:c(o.pickId)&&++r;if(0===s||0===r){const d=new Uint8Array(4);return d[0]=255,d[1]=255,d[2]=255,d[3]=255,void(e._selectedIdTexture=new jn({context:t,pixelFormat:vt.RGBA,pixelDatatype:bt.UNSIGNED_BYTE,source:{arrayBufferView:d,width:1,height:1},sampler:Hi.NEAREST}))}let a,l=0;const u=new Uint8Array(4*r);for(i=0;i<s;++i)if(o=n[i],c(o.pickIds)){const d=o.pickIds,h=d.length;for(let m=0;m<h;++m)a=d[m].color,u[l]=X.floatToByte(a.red),u[l+1]=X.floatToByte(a.green),u[l+2]=X.floatToByte(a.blue),u[l+3]=X.floatToByte(a.alpha),l+=4}else c(o.pickId)&&(a=o.pickId.color,u[l]=X.floatToByte(a.red),u[l+1]=X.floatToByte(a.green),u[l+2]=X.floatToByte(a.blue),u[l+3]=X.floatToByte(a.alpha),l+=4);e._selectedIdTexture=new jn({context:t,pixelFormat:vt.RGBA,pixelDatatype:bt.UNSIGNED_BYTE,source:{arrayBufferView:u,width:r,height:1},sampler:Hi.NEAREST})}(this,e),function rje(e){if(c(e._uniformMap))return;const t={},n={},i=e._uniforms,o=e._actualUniforms;for(const r in i)if(i.hasOwnProperty(r)){"function"!=typeof i[r]?(t[r]=ije(e,r),n[r]=nje(e,i,r)):(t[r]=i[r],n[r]=i[r]),o[r]=i[r];const s=t[r]();("string"==typeof s||s instanceof jn||s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement)&&(t[`${r}Dimensions`]=oje(t,r))}e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=Gn(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}})}(this),function uje(e,t){let n,i,o;const r=e._texturesToRelease;let s=r.length;for(n=0;n<s;++n)i=r[n],i=i&&i.destroy();r.length=0;const a=e._texturesToCreate;for(s=a.length,n=0;n<s;++n){const h=a[n];o=h.name,e._actualUniforms[o]=new jn({context:t,source:h.source})}a.length=0;const l=e._dirtyUniforms;if(0===l.length&&!c(e._texturePromise))return void(e._ready=!0);if(0===l.length||c(e._texturePromise))return;s=l.length;const u=e._uniforms,d=[];for(n=0;n<s;++n){o=l[n];const h=u[o],m=e._textureCache.getStageByName(h);if(c(m))e._actualUniforms[o]=lje(e,h);else if("string"==typeof h){const _=new jt({url:h});d.push(_.fetchImage().then(cje(e,o)))}else e._texturesToCreate.push({name:o,source:h})}l.length=0,d.length>0?(e._ready=!1,e._texturePromise=Promise.all(d).then(function(){e._ready=!0,e._texturePromise=void 0})):e._ready=!0}(this,e),function sje(e,t){if(c(e._command)&&!e._logDepthChanged&&!e._selectedDirty)return;let n=e._fragmentShader;if(c(e._selectedIdTexture)){const o=e._selectedIdTexture.width;n=n.replace(/in\s+vec2\s+v_textureCoordinates;/g,""),n=`#define CZM_SELECTED_FEATURE \nuniform sampler2D czm_idTexture; \nuniform sampler2D czm_selectedIdTexture; \nuniform float czm_selectedIdTextureStep; \nin vec2 v_textureCoordinates; \nbool czm_selected(vec2 offset) \n{ \n bool selected = false;\n vec4 id = texture(czm_idTexture, v_textureCoordinates + offset); \n for (int i = 0; i < ${o}; ++i) \n { \n vec4 selectedId = texture(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5)); \n if (all(equal(id, selectedId))) \n { \n return true; \n } \n } \n return false; \n} \n\nbool czm_selected() \n{ \n return czm_selected(vec2(0.0)); \n} \n\n${n}`}const i=new Et({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}(this,e),function aje(e){let n,i;1===e._sampleMode?(n=ei.LINEAR,i=ls.LINEAR):(n=ei.NEAREST,i=ls.NEAREST);const o=e._sampler;(!c(o)||o.minificationFilter!==n||o.magnificationFilter!==i)&&(e._sampler=new Hi({wrapS:$i.CLAMP_TO_EDGE,wrapT:$i.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}(this),this._selectedDirty=!1,!this._ready))return;const n=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=n,!c(n))return;const i=n.getColorTexture(0);let o;(i.width!==e.drawingBufferWidth||i.height!==e.drawingBufferHeight)&&(o=this._renderState,(!c(o)||i.width!==o.viewport.width||i.height!==o.viewport.height)&&(this._renderState=Pt.fromCache({viewport:new Vt(0,0,i.width,i.height)}))),this._command.renderState=o},Fg.prototype.execute=function(e,t,n,i){if(!(c(this._command)&&c(this._command.framebuffer)&&this._ready&&this._enabled))return;this._colorTexture=t,this._depthTexture=n,this._idTexture=i,Hi.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler);const o=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;c(o)&&(o.context=e),this._command.execute(e,o)},Fg.prototype.isDestroyed=function(){return!1},Fg.prototype.destroy=function(){return $K(this),Ye(this)};const Go=Fg;function Bg(e){e=g(e,g.EMPTY_OBJECT),T.defined("options.stages",e.stages),T.typeOf.number.greaterThan("options.stages.length",e.stages.length,0),this._stages=e.stages,this._inputPreviousStageTexture=g(e.inputPreviousStageTexture,!0);let t=e.name;c(t)||(t=kr()),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(Bg.prototype,{ready:{get:function(){const 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){const 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}}}),Bg.prototype._isSupported=function(e){const t=this._stages,n=t.length;for(let i=0;i<n;++i)if(!t[i]._isSupported(e))return!1;return!0},Bg.prototype.get=function(e){return T.typeOf.number.greaterThanOrEquals("index",e,0),T.typeOf.number.lessThan("index",e,this.length),this._stages[e]},Bg.prototype.update=function(e,t){this._selectedDirty=function hje(e){let t=c(e._selected)?e._selected.length:0;const n=c(e._parentSelected)?e._parentSelected:0;let i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,e._combinedSelected=c(e._selected)&&c(e._parentSelected)?e._selected.concat(e._parentSelected):c(e._parentSelected)?e._parentSelected:e._selected,!i&&c(e._combinedSelected)){if(!c(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}(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=c(this._selected)?this._selected.length:0,this._parentSelectedLength=c(this._parentSelected)?this._parentSelected.length:0;const n=this._stages,i=n.length;for(let o=0;o<i;++o){const r=n[o];this._selectedDirty&&(r.parentSelected=this._combinedSelected),r.update(e,t)}},Bg.prototype.isDestroyed=function(){return!1},Bg.prototype.destroy=function(){const e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return Ye(this)};const df=Bg,vr={};function _I(e){const o=`#define USE_STEP_SIZE\n${kB}`,r=new Go({name:`${e}_x_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:1}),s=new Go({name:`${e}_y_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:1}),a={};return Object.defineProperties(a,{delta:{get:function(){return r.uniforms.delta},set:function(l){r.uniforms.delta=s.uniforms.delta=l}},sigma:{get:function(){return r.uniforms.sigma},set:function(l){r.uniforms.sigma=s.uniforms.sigma=l}},stepSize:{get:function(){return r.uniforms.stepSize},set:function(l){r.uniforms.stepSize=s.uniforms.stepSize=l}}}),new df({name:e,stages:[r,s],uniforms:a})}vr.createBlurStage=function(){return _I("czm_blur")},vr.createDepthOfFieldStage=function(){const e=_I("czm_depth_of_field_blur"),t=new Go({name:"czm_depth_of_field_composite",fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\nuniform float focalDistance;\n\nin vec2 v_textureCoordinates;\n\nvec4 toEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera = posInCamera / posInCamera.w;\n return posInCamera;\n}\n\nfloat computeDepthBlur(float depth)\n{\n float f;\n if (depth < focalDistance)\n {\n f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);\n }\n else\n {\n f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);\n f = pow(f, 0.1);\n }\n f *= f;\n f = clamp(f, 0.0, 1.0);\n return pow(f, 0.5);\n}\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 posInCamera = toEye(v_textureCoordinates, depth);\n float d = computeDepthBlur(-posInCamera.z);\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), d);\n}\n",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 df({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})},vr.isDepthOfFieldSupported=function(e){return e.context.depthTexture},vr.createEdgeDetectionStage=function(){const e=kr();return new Go({name:`czm_edge_detection_${e}`,fragmentShader:"uniform sampler2D depthTexture;\nuniform float length;\nuniform vec4 color;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n float directions[3];\n directions[0] = -1.0;\n directions[1] = 0.0;\n directions[2] = 1.0;\n\n float scalars[3];\n scalars[0] = 3.0;\n scalars[1] = 10.0;\n scalars[2] = 3.0;\n\n float padx = czm_pixelRatio / czm_viewport.z;\n float pady = czm_pixelRatio / czm_viewport.w;\n\n#ifdef CZM_SELECTED_FEATURE\n bool selected = false;\n for (int i = 0; i < 3; ++i)\n {\n float dir = directions[i];\n selected = selected || czm_selected(vec2(-padx, dir * pady));\n selected = selected || czm_selected(vec2(padx, dir * pady));\n selected = selected || czm_selected(vec2(dir * padx, -pady));\n selected = selected || czm_selected(vec2(dir * padx, pady));\n if (selected)\n {\n break;\n }\n }\n if (!selected)\n {\n out_FragColor = vec4(color.rgb, 0.0);\n return;\n }\n#endif\n\n float horizEdge = 0.0;\n float vertEdge = 0.0;\n\n for (int i = 0; i < 3; ++i)\n {\n float dir = directions[i];\n float scale = scalars[i];\n\n horizEdge -= texture(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;\n horizEdge += texture(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;\n\n vertEdge -= texture(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;\n vertEdge += texture(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;\n }\n\n float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);\n out_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);\n}\n",uniforms:{length:.25,color:X.clone(X.BLACK)}})},vr.isEdgeDetectionSupported=function(e){return e.context.depthTexture},vr.createSilhouetteStage=function(e){const t=function pje(e){if(!c(e))return vr.createEdgeDetectionStage();const t=new df({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),n={};let i="",o="";for(let a=0;a<e.length;++a)i+=`uniform sampler2D edgeTexture${a}; \n`,o+=` vec4 edge${a} = texture(edgeTexture${a}, v_textureCoordinates); \n if (edge${a}.a > 0.0) \n { \n color = edge${a}; \n break; \n } \n`,n[`edgeTexture${a}`]=e[a].name;const s=new Go({name:"czm_edge_detection_combine",fragmentShader:`${i}in vec2 v_textureCoordinates; \nvoid main() { \n vec4 color = vec4(0.0); \n for (int i = 0; i < ${e.length}; i++) \n { \n${o} } \n out_FragColor = color; \n} \n`,uniforms:n});return new df({name:"czm_edge_detection_composite",stages:[t,s]})}(e),n=new Go({name:"czm_silhouette_color_edges",fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D silhouetteTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 silhouetteColor = texture(silhouetteTexture, v_textureCoordinates);\n vec4 color = texture(colorTexture, v_textureCoordinates);\n out_FragColor = mix(color, silhouetteColor, silhouetteColor.a);\n}\n",uniforms:{silhouetteTexture:t.name}});return new df({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})},vr.isSilhouetteSupported=function(e){return e.context.depthTexture},vr.createBloomStage=function(){const e=new Go({name:"czm_bloom_contrast_bias",fragmentShader:"uniform sampler2D colorTexture;\nuniform float contrast;\nuniform float brightness;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 sceneColor = texture(colorTexture, v_textureCoordinates).xyz;\n sceneColor = czm_RGBToHSB(sceneColor);\n sceneColor.z += brightness;\n sceneColor = czm_HSBToRGB(sceneColor);\n\n float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));\n sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);\n out_FragColor = vec4(sceneColor, 1.0);\n}\n",uniforms:{contrast:128,brightness:-.3}}),t=_I("czm_bloom_blur"),n=new df({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new Go({name:"czm_bloom_generate_composite",fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D bloomTexture;\nuniform bool glowOnly;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 color = texture(colorTexture, v_textureCoordinates);\n\n#ifdef CZM_SELECTED_FEATURE\n if (czm_selected()) {\n out_FragColor = color;\n return;\n }\n#endif\n\n vec4 bloom = texture(bloomTexture, v_textureCoordinates);\n out_FragColor = glowOnly ? bloom : bloom + color;\n}\n",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 df({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})},vr.createAmbientOcclusionStage=function(){const e=new Go({name:"czm_ambient_occlusion_generate",fragmentShader:"uniform sampler2D randomTexture;\nuniform sampler2D depthTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\n\nin vec2 v_textureCoordinates;\n\nvec4 clipToEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\n posEC = posEC / posEC.w;\n return posEC;\n}\n\n//Reconstruct Normal Without Edge Removation\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\n vec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\n vec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\n vec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\n vec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\n\n vec3 up = posInCamera.xyz - posInCameraUp.xyz;\n vec3 down = posInCameraDown.xyz - posInCamera.xyz;\n vec3 left = posInCamera.xyz - posInCameraLeft.xyz;\n vec3 right = posInCameraRight.xyz - posInCamera.xyz;\n\n vec3 DX = length(left) < length(right) ? left : right;\n vec3 DY = length(up) < length(down) ? up : down;\n\n return normalize(cross(DY, DX));\n}\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 posInCamera = clipToEye(v_textureCoordinates, depth);\n\n if (posInCamera.z > frustumLength)\n {\n out_FragColor = vec4(1.0);\n return;\n }\n\n vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\n float depthU = czm_readDepth(depthTexture, v_textureCoordinates - vec2(0.0, pixelSize.y));\n float depthD = czm_readDepth(depthTexture, v_textureCoordinates + vec2(0.0, pixelSize.y));\n float depthL = czm_readDepth(depthTexture, v_textureCoordinates - vec2(pixelSize.x, 0.0));\n float depthR = czm_readDepth(depthTexture, v_textureCoordinates + vec2(pixelSize.x, 0.0));\n vec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\n\n float ao = 0.0;\n vec2 sampleDirection = vec2(1.0, 0.0);\n float gapAngle = 90.0 * czm_radiansPerDegree;\n\n // RandomNoise\n float randomVal = texture(randomTexture, v_textureCoordinates / pixelSize / 255.0).x;\n\n //Loop for each direction\n for (int i = 0; i < 4; i++)\n {\n float newGapAngle = gapAngle * (float(i) + randomVal);\n float cosVal = cos(newGapAngle);\n float sinVal = sin(newGapAngle);\n\n //Rotate Sampling Direction\n vec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\n float localAO = 0.0;\n float localStepSize = stepSize;\n\n //Loop for each step\n for (int j = 0; j < 6; j++)\n {\n vec2 newCoords = v_textureCoordinates + rotatedSampleDirection * localStepSize * pixelSize;\n\n //Exception Handling\n if(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n {\n break;\n }\n\n float stepDepthInfo = czm_readDepth(depthTexture, newCoords);\n vec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\n vec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\n float len = length(diffVec);\n\n if (len > lengthCap)\n {\n break;\n }\n\n float dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\n float weight = len / lengthCap;\n weight = 1.0 - weight * weight;\n\n if (dotVal < bias)\n {\n dotVal = 0.0;\n }\n\n localAO = max(localAO, dotVal * weight);\n localStepSize += stepSize;\n }\n ao += localAO;\n }\n\n ao /= 4.0;\n ao = 1.0 - clamp(ao, 0.0, 1.0);\n ao = pow(ao, intensity);\n out_FragColor = vec4(vec3(ao), 1.0);\n}\n",uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=_I("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;const n=new df({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),i=new Go({name:"czm_ambient_occlusion_composite",fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D ambientOcclusionTexture;\nuniform bool ambientOcclusionOnly;\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 color = texture(colorTexture, v_textureCoordinates);\n vec4 ao = texture(ambientOcclusionTexture, v_textureCoordinates);\n out_FragColor = ambientOcclusionOnly ? ao : ao * color;\n}\n",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 df({name:"czm_ambient_occlusion",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})},vr.isAmbientOcclusionSupported=function(e){return e.context.depthTexture},vr.createFXAAStage=function(){return new Go({name:"czm_FXAA",fragmentShader:"#define FXAA_QUALITY_PRESET 39 \n/**\n * @license\n * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of NVIDIA CORPORATION nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples\n// Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h\n\n// Steps used to integrate into Cesium:\n// * The following defines are set:\n// #define FXAA_PC 1\n// #define FXAA_WEBGL_1 1\n// #define FXAA_GREEN_AS_LUMA 1\n// #define FXAA_EARLY_EXIT 1\n// #define FXAA_GLSL_120 1\n// * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed.\n// * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace\n// /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/.\n// * There are no implicit conversions from ivec* to vec* so replace:\n// #define FxaaInt2 ivec2\n// with\n// #define FxaaInt2 vec2\n// * The texture2DLod function is only available in vertex shaders so replace:\n// #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)\n// #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)\n// with\n// #define FxaaTexTop(t, p) texture(t, p)\n// #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))\n// * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.\n// * The following parameters to FxaaPixelShader are unused and can be removed:\n// fxaaConsolePosPos\n// fxaaConsoleRcpFrameOpt\n// fxaaConsoleRcpFrameOpt2\n// fxaaConsole360RcpFrameOpt2\n// fxaaConsoleEdgeSharpness\n// fxaaConsoleEdgeThreshold\n// fxaaConsoleEdgeThresholdMi\n// fxaaConsole360ConstDir\n\n//\n// Choose the quality preset.\n// This needs to be compiled into the shader as it effects code.\n// Best option to include multiple presets is to\n// in each shader define the preset, then include this file.\n//\n// OPTIONS\n// -----------------------------------------------------------------------\n// 10 to 15 - default medium dither (10=fastest, 15=highest quality)\n// 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)\n// 39 - no dither, very expensive\n//\n// NOTES\n// -----------------------------------------------------------------------\n// 12 = slightly faster then FXAA 3.9 and higher edge quality (default)\n// 13 = about same speed as FXAA 3.9 and better than 12\n// 23 = closest to FXAA 3.9 visually and performance wise\n// _ = the lowest digit is directly related to performance\n// _ = the highest digit is directly related to style\n//\n//#define FXAA_QUALITY_PRESET 12\n\n\n#if (FXAA_QUALITY_PRESET == 10)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 3.0\n #define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 3.0\n #define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 4.0\n #define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 4.0\n #define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 4.0\n #define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 2.0\n #define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 3.0\n #define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n #define FXAA_QUALITY_PS 9\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 4.0\n #define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n #define FXAA_QUALITY_PS 10\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 4.0\n #define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n #define FXAA_QUALITY_PS 11\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 4.0\n #define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.0\n #define FXAA_QUALITY_P2 1.0\n #define FXAA_QUALITY_P3 1.0\n #define FXAA_QUALITY_P4 1.0\n #define FXAA_QUALITY_P5 1.5\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture(t, p)\n#define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))\n\nFxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\n\nFxaaFloat4 FxaaPixelShader(\n //\n // Use noperspective interpolation here (turn off perspective interpolation).\n // {xy} = center of pixel\n FxaaFloat2 pos,\n //\n // Input color texture.\n // {rgb_} = color in linear or perceptual color space\n // if (FXAA_GREEN_AS_LUMA == 0)\n // {___a} = luma in perceptual color space (not linear)\n FxaaTex tex,\n //\n // Only used on FXAA Quality.\n // This must be from a constant/uniform.\n // {x_} = 1.0/screenWidthInPixels\n // {_y} = 1.0/screenHeightInPixels\n FxaaFloat2 fxaaQualityRcpFrame,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_SUBPIX define.\n // It is here now to allow easier tuning.\n // Choose the amount of sub-pixel aliasing removal.\n // This can effect sharpness.\n // 1.00 - upper limit (softer)\n // 0.75 - default amount of filtering\n // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)\n // 0.25 - almost off\n // 0.00 - completely off\n FxaaFloat fxaaQualitySubpix,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.\n // It is here now to allow easier tuning.\n // The minimum amount of local contrast required to apply algorithm.\n // 0.333 - too little (faster)\n // 0.250 - low quality\n // 0.166 - default\n // 0.125 - high quality\n // 0.063 - overkill (slower)\n FxaaFloat fxaaQualityEdgeThreshold,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.\n // It is here now to allow easier tuning.\n // Trims the algorithm from processing darks.\n // 0.0833 - upper limit (default, the start of visible unfiltered edges)\n // 0.0625 - high quality (faster)\n // 0.0312 - visible limit (slower)\n // Special notes when using FXAA_GREEN_AS_LUMA,\n // Likely want to set this to zero.\n // As colors that are mostly not-green\n // will appear very dark in the green channel!\n // Tune by looking at mostly non-green content,\n // then start at zero and increase until aliasing is a problem.\n FxaaFloat fxaaQualityEdgeThresholdMin\n) {\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posM;\n posM.x = pos.x;\n posM.y = pos.y;\n FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n #define lumaM rgbyM.y\n FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\n/*--------------------------------------------------------------------------*/\n FxaaFloat maxSM = max(lumaS, lumaM);\n FxaaFloat minSM = min(lumaS, lumaM);\n FxaaFloat maxESM = max(lumaE, maxSM);\n FxaaFloat minESM = min(lumaE, minSM);\n FxaaFloat maxWN = max(lumaN, lumaW);\n FxaaFloat minWN = min(lumaN, lumaW);\n FxaaFloat rangeMax = max(maxWN, maxESM);\n FxaaFloat rangeMin = min(minWN, minESM);\n FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\n FxaaFloat range = rangeMax - rangeMin;\n FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\n FxaaBool earlyExit = range < rangeMaxClamped;\n/*--------------------------------------------------------------------------*/\n if(earlyExit)\n return rgbyM;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNS = lumaN + lumaS;\n FxaaFloat lumaWE = lumaW + lumaE;\n FxaaFloat subpixRcpRange = 1.0/range;\n FxaaFloat subpixNSWE = lumaNS + lumaWE;\n FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\n FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNESE = lumaNE + lumaSE;\n FxaaFloat lumaNWNE = lumaNW + lumaNE;\n FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\n FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNWSW = lumaNW + lumaSW;\n FxaaFloat lumaSWSE = lumaSW + lumaSE;\n FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\n FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\n FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\n FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\n FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\n FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\n/*--------------------------------------------------------------------------*/\n FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\n FxaaFloat lengthSign = fxaaQualityRcpFrame.x;\n FxaaBool horzSpan = edgeHorz >= edgeVert;\n FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\n/*--------------------------------------------------------------------------*/\n if(!horzSpan) lumaN = lumaW;\n if(!horzSpan) lumaS = lumaE;\n if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\n FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\n/*--------------------------------------------------------------------------*/\n FxaaFloat gradientN = lumaN - lumaM;\n FxaaFloat gradientS = lumaS - lumaM;\n FxaaFloat lumaNN = lumaN + lumaM;\n FxaaFloat lumaSS = lumaS + lumaM;\n FxaaBool pairN = abs(gradientN) >= abs(gradientS);\n FxaaFloat gradient = max(abs(gradientN), abs(gradientS));\n if(pairN) lengthSign = -lengthSign;\n FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posB;\n posB.x = posM.x;\n posB.y = posM.y;\n FxaaFloat2 offNP;\n offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\n offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\n if(!horzSpan) posB.x += lengthSign * 0.5;\n if( horzSpan) posB.y += lengthSign * 0.5;\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posN;\n posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\n posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\n FxaaFloat2 posP;\n posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\n posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\n FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\n FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));\n FxaaFloat subpixE = subpixC * subpixC;\n FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));\n/*--------------------------------------------------------------------------*/\n if(!pairN) lumaNN = lumaSS;\n FxaaFloat gradientScaled = gradient * 1.0/4.0;\n FxaaFloat lumaMM = lumaM - lumaNN * 0.5;\n FxaaFloat subpixF = subpixD * subpixE;\n FxaaBool lumaMLTZero = lumaMM < 0.0;\n/*--------------------------------------------------------------------------*/\n lumaEndN -= lumaNN * 0.5;\n lumaEndP -= lumaNN * 0.5;\n FxaaBool doneN = abs(lumaEndN) >= gradientScaled;\n FxaaBool doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\n FxaaBool doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\n/*--------------------------------------------------------------------------*/\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 3)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 4)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 5)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 6)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 7)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 8)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 9)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 10)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 11)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 12)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n/*--------------------------------------------------------------------------*/\n FxaaFloat dstN = posM.x - posN.x;\n FxaaFloat dstP = posP.x - posM.x;\n if(!horzSpan) dstN = posM.y - posN.y;\n if(!horzSpan) dstP = posP.y - posM.y;\n/*--------------------------------------------------------------------------*/\n FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\n FxaaFloat spanLength = (dstP + dstN);\n FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\n FxaaFloat spanLengthRcp = 1.0/spanLength;\n/*--------------------------------------------------------------------------*/\n FxaaBool directionN = dstN < dstP;\n FxaaFloat dst = min(dstN, dstP);\n FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\n FxaaFloat subpixG = subpixF * subpixF;\n FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\n FxaaFloat subpixH = subpixG * fxaaQualitySubpix;\n/*--------------------------------------------------------------------------*/\n FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\n FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\n if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\n if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\n return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);\n}\n\nin vec2 v_textureCoordinates;\n\nuniform sampler2D colorTexture;\n\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\n\nvoid main()\n{\n vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\n vec4 color = FxaaPixelShader(\n v_textureCoordinates,\n colorTexture,\n fxaaQualityRcpFrame,\n fxaaQualitySubpix,\n fxaaQualityEdgeThreshold,\n fxaaQualityEdgeThresholdMin);\n float alpha = texture(colorTexture, v_textureCoordinates).a;\n out_FragColor = vec4(color.rgb, alpha);\n}\n",sampleMode:1})},vr.createAcesTonemappingStage=function(e){let t=e?"#define AUTO_EXPOSURE\n":"";return t+="uniform sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\nvoid main()\n{\n vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n\n#ifdef AUTO_EXPOSURE\n color /= texture(autoExposure, vec2(0.5)).r;\n#endif\n color = czm_acesTonemapping(color);\n color = czm_inverseGamma(color);\n\n out_FragColor = vec4(color, fragmentColor.a);\n}\n",new Go({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0}})},vr.createFilmicTonemappingStage=function(e){let t=e?"#define AUTO_EXPOSURE\n":"";return t+="uniform sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See slides 142 and 143:\n// http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting\n\nvoid main()\n{\n vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n\n#ifdef AUTO_EXPOSURE\n float exposure = texture(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n\n\tconst float A = 0.22; // shoulder strength\n\tconst float B = 0.30; // linear strength\n\tconst float C = 0.10; // linear angle\n\tconst float D = 0.20; // toe strength\n\tconst float E = 0.01; // toe numerator\n\tconst float F = 0.30; // toe denominator\n\n\tconst float white = 11.2; // linear white point value\n\n\tvec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;\n\tfloat w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;\n\n\tc = czm_inverseGamma(c / w);\n\tout_FragColor = vec4(c, fragmentColor.a);\n}\n",new Go({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0}})},vr.createReinhardTonemappingStage=function(e){let t=e?"#define AUTO_EXPOSURE\n":"";return t+="uniform sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See equation 3:\n// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf\n\nvoid main()\n{\n vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\n float exposure = texture(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n color = color / (1.0 + color);\n color = czm_inverseGamma(color);\n out_FragColor = vec4(color, fragmentColor.a);\n}\n",new Go({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0}})},vr.createModifiedReinhardTonemappingStage=function(e){let t=e?"#define AUTO_EXPOSURE\n":"";return t+="uniform sampler2D colorTexture;\nuniform vec3 white;\n\nin vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See equation 4:\n// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf\n\nvoid main()\n{\n vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\n float exposure = texture(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n color = (color * (1.0 + color / white)) / (1.0 + color);\n color = czm_inverseGamma(color);\n out_FragColor = vec4(color, fragmentColor.a);\n}\n",new Go({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:X.WHITE,autoExposure:void 0}})},vr.createAutoExposureStage=function(){return new eje},vr.createBlackAndWhiteStage=function(){return new Go({name:"czm_black_and_white",fragmentShader:"uniform sampler2D colorTexture;\nuniform float gradations;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;\n#ifdef CZM_SELECTED_FEATURE\n if (czm_selected()) {\n out_FragColor = vec4(rgb, 1.0);\n return;\n }\n#endif\n float luminance = czm_luminance(rgb);\n float darkness = luminance * gradations;\n darkness = (darkness - fract(darkness)) / gradations;\n out_FragColor = vec4(vec3(darkness), 1.0);\n}\n",uniforms:{gradations:5}})},vr.createBrightnessStage=function(){return new Go({name:"czm_brightness",fragmentShader:"uniform sampler2D colorTexture;\nuniform float brightness;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;\n vec3 target = vec3(0.0);\n out_FragColor = vec4(mix(target, rgb, brightness), 1.0);\n}\n",uniforms:{brightness:.5}})},vr.createNightVisionStage=function(){return new Go({name:"czm_night_vision",fragmentShader:"uniform sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\n vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;\n vec3 green = vec3(0.0, 1.0, 0.0);\n out_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n}\n"})},vr.createDepthViewStage=function(){return new Go({name:"czm_depth_view",fragmentShader:"uniform sampler2D depthTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n out_FragColor = vec4(vec3(depth), 1.0);\n}\n"})},vr.createLensFlareStage=function(){return new Go({name:"czm_lens_flare",fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D dirtTexture;\nuniform sampler2D starTexture;\nuniform vec2 dirtTextureDimensions;\nuniform float distortion;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform float dirtAmount;\nuniform float earthRadius;\nuniform float intensity;\n\nin vec2 v_textureCoordinates;\n\n// whether it is in space or not\n// 6500000.0 is empirical value\n#define DISTANCE_TO_SPACE 6500000.0\n\n// return ndc from world coordinate biased earthRadius\nvec4 getNDCFromWC(vec3 WC, float earthRadius)\n{\n vec4 positionEC = czm_view * vec4(WC, 1.0);\n positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n}\n\n// Check if current pixel is included Earth\n// if then mask it gradually\nfloat isInEarth(vec2 texcoord, vec2 sceneSize)\n{\n vec2 NDC = texcoord * 2.0 - 1.0;\n vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);\n vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);\n NDC.xy -= earthPosSC.xy;\n\n float X = abs(NDC.x) * sceneSize.x;\n float Y = abs(NDC.y) * sceneSize.y;\n\n return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));\n}\n\n// For Chromatic effect\nvec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)\n{\n vec2 sceneSize = czm_viewport.zw;\n vec3 color;\n if(isSpace)\n {\n color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture(tex, texcoord + direction * distortion.r).r;\n color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture(tex, texcoord + direction * distortion.g).g;\n color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture(tex, texcoord + direction * distortion.b).b;\n }\n else\n {\n color.r = texture(tex, texcoord + direction * distortion.r).r;\n color.g = texture(tex, texcoord + direction * distortion.g).g;\n color.b = texture(tex, texcoord + direction * distortion.b).b;\n }\n return vec4(clamp(color, 0.0, 1.0), 0.0);\n}\n\nvoid main(void)\n{\n vec4 originalColor = texture(colorTexture, v_textureCoordinates);\n vec3 rgb = originalColor.rgb;\n bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;\n\n // Sun position\n vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);\n vec4 sunPositionEC = czm_view * sunPos;\n vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);\n sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);\n\n // If sun is not in the screen space, use original color.\n if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))\n {\n // Lens flare is disabled when not in space until #5932 is fixed.\n // https://github.com/CesiumGS/cesium/issues/5932\n out_FragColor = originalColor;\n return;\n }\n\n vec2 texcoord = vec2(1.0) - v_textureCoordinates;\n vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\n vec2 invPixelSize = 1.0 / pixelSize;\n vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);\n\n // ghost vector to image centre:\n vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;\n vec3 direction = normalize(vec3(ghostVec, 0.0));\n\n // sample ghosts:\n vec4 result = vec4(0.0);\n vec4 ghost = vec4(0.0);\n for (int i = 0; i < 4; ++i)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n // Only bright spots from the centre of the source image\n ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);\n }\n result += ghost;\n\n // sample halo\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weightForHalo = pow(1.0 - weightForHalo, 5.0);\n\n result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;\n\n // dirt on lens\n vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;\n if (dirtTexCoords.x > 1.0)\n {\n dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);\n }\n if (dirtTexCoords.y > 1.0)\n {\n dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);\n }\n result += dirtAmount * texture(dirtTexture, dirtTexCoords);\n\n // Rotating starburst texture's coordinate\n // dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0))\n float camrot = czm_view[0].z + czm_view[1].y;\n float cosValue = cos(camrot);\n float sinValue = sin(camrot);\n mat3 rotation = mat3(\n cosValue, -sinValue, 0.0,\n sinValue, cosValue, 0.0,\n 0.0, 0.0, 1.0\n );\n\n vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);\n vec3 st2 = vec3((rotation * st1).xy, 1.0);\n vec3 st3 = st2 * 0.5 + vec3(0.5);\n vec2 lensStarTexcoord = st3.xy;\n float weightForLensFlare = length(vec3(sunPos.xy, 0.0));\n float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);\n\n if (!isSpace)\n {\n result *= oneMinusWeightForLensFlare * intensity * 0.2;\n }\n else\n {\n result *= oneMinusWeightForLensFlare * intensity;\n result *= texture(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;\n }\n\n result += texture(colorTexture, v_textureCoordinates);\n\n out_FragColor = result;\n}\n",uniforms:{dirtTexture:ni("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:ni("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:ge.WGS84.maximumRadius}})};const wm=vr;function Uh(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function vC(e){for(;c(e.length);)e=e.get(e.length-1);return e.name}function UB(e,t,n,i,o){if(!i.enabled||!i._isSupported(t))return o;const r=n[i.name]={};c(o)&&(r[vC(e.getStageByName(o))]=!0);const s=i.uniforms;if(c(s)){const a=Object.getOwnPropertyNames(s),l=a.length;for(let u=0;u<l;++u){const d=s[a[u]];if("string"==typeof d){const h=e.getStageByName(d);c(h)&&(r[vC(h)]=!0)}}}return i.name}function DC(e,t,n,i,o){if(c(i.enabled)&&!i.enabled||c(i._isSupported)&&!i._isSupported(t))return o;const r=o,s=!c(i.inputPreviousStageTexture)||i.inputPreviousStageTexture;let a=o;const l=i.length;for(let h=0;h<l;++h){const m=i.get(h);a=c(m.length)?DC(e,t,n,m,o):UB(e,t,n,m,o),s&&(o=a)}let u,d;if(s)for(u=1;u<l;++u)d=vC(i.get(u)),c(n[d])||(n[d]={}),n[d][r]=!0;else for(u=1;u<l;++u){d=vC(i.get(u));const h=n[d];for(let m=0;m<u;++m)h[vC(i.get(m))]=!0}return a}function gje(e,t,n){const o=e._collection.getStageByName(t),r=o._textureScale,s=o._forcePowerOfTwo,a=o._pixelFormat,l=o._pixelDatatype,u=o._clearColor;let d,h;const m=e._framebuffers,_=m.length;for(d=0;d<_;++d){if(h=m[d],r!==h.textureScale||s!==h.forcePowerOfTwo||a!==h.pixelFormat||l!==h.pixelDatatype||!X.equals(u,h.clearColor))continue;const p=h.stages,y=p.length;let A=!1;for(let x=0;x<y;++x)if(n[p[x]]){A=!0;break}if(!A)break}return c(h)&&d<_?(h.stages.push(t),h):(h={textureScale:r,forcePowerOfTwo:s,pixelFormat:a,pixelDatatype:l,clearColor:u,stages:[t],buffer:new Zo({pixelFormat:a,pixelDatatype:l}),clear:void 0},m.push(h),h)}function zB(e){const t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}Uh.prototype.updateDependencies=function(){this._updateDependencies=!0},Uh.prototype.update=function(e){const t=this._collection,n=this._updateDependencies,i=c(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),o=c(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),r=c(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),s=c(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),a=!c(t._activeStages)||t._activeStages.length>0||i||o||r||s;if((n||!a&&this._framebuffers.length>0)&&(zB(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!a)return;0===this._framebuffers.length&&function yje(e,t){const n=function _je(e,t){const n={};if(c(e.ambientOcclusion)){const o=e.bloom,r=e._tonemapping,s=e.fxaa;let a=DC(e,t,n,e.ambientOcclusion,void 0);a=DC(e,t,n,o,a),a=UB(e,t,n,r,a),a=DC(e,t,n,e,a),UB(e,t,n,s,a)}else DC(e,t,n,e,void 0);return n}(e._collection,t);for(const i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=gje(e,i,n[i]))}(this,e);const l=e.drawingBufferWidth,u=e.drawingBufferHeight;!n&&this._width===l&&this._height===u||(this._width=l,this._height=u,this._updateDependencies=!1,zB(this),function bje(e,t){const n=e._width,i=e._height,o=e._framebuffers,r=o.length;for(let s=0;s<r;++s){const a=o[s],l=a.textureScale;let u=Math.ceil(n*l),d=Math.ceil(i*l),h=Math.min(u,d);a.forcePowerOfTwo&&(O.isPowerOfTwo(h)||(h=O.nextPowerOfTwo(h)),u=h,d=h),a.buffer.update(t,u,d),a.clear=new cr({color:a.clearColor,framebuffer:a.buffer.framebuffer})}}(this,e))},Uh.prototype.clear=function(e){const t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)},Uh.prototype.getStageByName=function(e){return this._collection.getStageByName(e)},Uh.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)},Uh.prototype.getFramebuffer=function(e){const t=this._stageNameToFramebuffer[e];if(c(t))return t.buffer.framebuffer},Uh.prototype.isDestroyed=function(){return!1},Uh.prototype.destroy=function(){return zB(this),Ye(this)};const KK=Uh,IC={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===IC.REINHARD||e===IC.MODIFIED_REINHARD||e===IC.FILMIC||e===IC.ACES}},PC=Object.freeze(IC),VB=[];function tc(){const e=wm.createFXAAStage(),t=wm.createAmbientOcclusionStage(),n=wm.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=wm.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=PC.ACES;const i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;const o=new KK(this),r={},s=VB;for(s.push(e,t,n,i);s.length>0;){const l=s.pop();r[l.name]=l,l._textureCache=o;const u=l.length;if(c(u))for(let d=0;d<u;++d)s.push(l.get(d))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;const 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}function HB(e){if(!e._stagesRemoved)return;e._stagesRemoved=!1;const t=[],n=e._stages,i=n.length;for(let o=0,r=0;o<i;++o){const s=n[o];s&&(s._index=r++,t.push(s))}e._stages=t}function kg(e){for(;c(e.length);)e=e.get(e.length-1);return e.outputTexture}function ff(e,t,n,i,o){if(c(e.execute))return void e.execute(t,n,i,o);const r=e.length;let s;if(e.inputPreviousStageTexture)for(ff(e.get(0),t,n,i,o),s=1;s<r;++s)ff(e.get(s),t,kg(e.get(s-1)),i,o);else for(s=0;s<r;++s)ff(e.get(s),t,n,i,o)}Object.defineProperties(tc.prototype,{ready:{get:function(){let e=!1;const t=this._stages;for(let a=t.length-1;a>=0;--a){const l=t[a];e=e||l.ready&&l.enabled}const 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 HB(this),this._stages.length}},outputTexture:{get:function(){const e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);const t=this._stages;for(let s=t.length-1;s>=0;--s){const a=t[s];if(c(a)&&a.ready&&a.enabled)return this.getOutputTexture(a.name)}const i=this._tonemapping;if(i.enabled&&i.ready)return this.getOutputTexture(i.name);const o=this._bloom;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);const r=this._ao;return r.enabled&&r.ready?this.getOutputTexture(r.name):void 0}},hasSelected:{get:function(){const e=this._stages.slice();for(;e.length>0;){const t=e.pop();if(!c(t))continue;if(c(t.selected))return!0;const n=t.length;if(c(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;if(!PC.validate(e))throw new E("tonemapper was set to an invalid value.");c(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());const t=this._autoExposureEnabled;let n;switch(e){case PC.REINHARD:n=wm.createReinhardTonemappingStage(t);break;case PC.MODIFIED_REINHARD:n=wm.createModifiedReinhardTonemappingStage(t);break;case PC.FILMIC:n=wm.createFilmicTonemappingStage(t);break;default:n=wm.createAcesTonemappingStage(t)}if(t){const i=this._autoExposure;n.uniforms.autoExposure=function(){return i.outputTexture}}this._tonemapper=e,this._tonemapping=n,c(this._stageNames)&&(this._stageNames[n.name]=n,n._textureCache=this._textureCache),this._textureCacheDirty=!0}}}),tc.prototype.add=function(e){T.typeOf.object("stage",e);const t=this._stageNames,n=VB;for(n.push(e);n.length>0;){const o=n.pop();if(c(t[o.name]))throw new E(`${o.name} has already been added to the collection or does not have a unique name.`);t[o.name]=o,o._textureCache=this._textureCache;const r=o.length;if(c(r))for(let s=0;s<r;++s)n.push(o.get(s))}const i=this._stages;return e._index=i.length,i.push(e),this._textureCacheDirty=!0,e},tc.prototype.remove=function(e){if(!this.contains(e))return!1;const t=this._stageNames,n=VB;for(n.push(e);n.length>0;){const i=n.pop();delete t[i.name];const o=i.length;if(c(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},tc.prototype.contains=function(e){return c(e)&&c(e._index)&&e._textureCache===this._textureCache},tc.prototype.get=function(e){HB(this);const t=this._stages,n=t.length;return T.typeOf.number.greaterThanOrEquals("stages length",n,0),T.typeOf.number.greaterThanOrEquals("index",e,0),T.typeOf.number.lessThan("index",e,n),t[e]},tc.prototype.removeAll=function(){const e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0},tc.prototype.getStageByName=function(e){return this._stageNames[e]},tc.prototype.update=function(e,t,n){HB(this);const i=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=i;const r=this._stages;let a,l,s=o.length=r.length,u=0;for(a=0;a<s;++a)l=r[a],l.ready&&l.enabled&&l._isSupported(e)&&(o[u++]=l);o.length=u;let d=u!==i.length;if(!d)for(a=0;a<u;++a)if(o[a]!==i[a]){d=!0;break}const h=this._ao,m=this._bloom,_=this._autoExposure,p=this._tonemapping,y=this._fxaa;p.enabled=n;const A=h.enabled&&h._isSupported(e),x=m.enabled&&m._isSupported(e),C=p.enabled&&p._isSupported(e),w=y.enabled&&y._isSupported(e);if((d||this._textureCacheDirty||A!==this._aoEnabled||x!==this._bloomEnabled||C!==this._tonemappingEnabled||w!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=A,this._bloomEnabled=x,this._tonemappingEnabled=C,this._fxaaEnabled=w,this._textureCacheDirty=!1),c(this._randomTexture)&&!A&&(this._randomTexture.destroy(),this._randomTexture=void 0),!c(this._randomTexture)&&A){s=196608;const v=new Uint8Array(s);for(a=0;a<s;a+=3)v[a]=Math.floor(255*Math.random());this._randomTexture=new jn({context:e,pixelFormat:vt.RGB,pixelDatatype:bt.UNSIGNED_BYTE,source:{arrayBufferView:v,width:256,height:256},sampler:new Hi({wrapS:$i.REPEAT,wrapT:$i.REPEAT,minificationFilter:ei.NEAREST,magnificationFilter:ls.NEAREST})})}for(this._textureCache.update(e),y.update(e,t),h.update(e,t),m.update(e,t),p.update(e,t),this._autoExposureEnabled&&_.update(e,t),s=r.length,a=0;a<s;++a)r[a].update(e,t);for(u=0,a=0;a<s;++a)l=r[a],l.ready&&l.enabled&&l._isSupported(e)&&u++;d=u!==o.length,d&&this.update(e,t,n)},tc.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)},tc.prototype.getOutputTexture=function(e){const t=this.getStageByName(e);if(c(t))return kg(t)},tc.prototype.execute=function(e,t,n,i){const o=this._activeStages,r=o.length,s=this._fxaa,a=this._ao,l=this._bloom,u=this._autoExposure,d=this._tonemapping,h=a.enabled&&a._isSupported(e),m=l.enabled&&l._isSupported(e),_=this._autoExposureEnabled,p=d.enabled&&d._isSupported(e),y=s.enabled&&s._isSupported(e);if(!(y||h||m||p||0!==r))return;let A=t;h&&a.ready&&(ff(a,e,A,n,i),A=kg(a)),m&&l.ready&&(ff(l,e,A,n,i),A=kg(l)),_&&u.ready&&ff(u,e,A,n,i),p&&d.ready&&(ff(d,e,A,n,i),A=kg(d));let x=A;if(r>0){ff(o[0],e,A,n,i);for(let C=1;C<r;++C)ff(o[C],e,kg(o[C-1]),n,i);x=kg(o[r-1])}y&&s.ready&&ff(s,e,x,n,i)},tc.prototype.copy=function(e,t){if(!c(this._copyColorCommand)){const n=this;this._copyColorCommand=e.createViewportQuadCommand(Ig,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)},tc.prototype.isDestroyed=function(){return!1},tc.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(),Ye(this)};const Aje=tc,Jl=Object.freeze({SHIFT:0,CTRL:1,ALT:2}),Ai=Object.freeze({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});function Sm(e,t,n){const i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;const o=i.getBoundingClientRect();return n.x=t.clientX-o.left,n.y=t.clientY-o.top,n}function GB(e,t){let n=e;return c(t)&&(n+=`+${t}`),n}function Ug(e){return e.shiftKey?Jl.SHIFT:e.ctrlKey?Jl.CTRL:e.altKey?Jl.ALT:void 0}const is={LEFT:0,MIDDLE:1,RIGHT:2};function ul(e,t,n,i){function o(r){i(e,r)}zn.isInternetExplorer()?n.addEventListener(t,o,!1):n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}const QK={position:new G};function jB(e){e._lastSeenTouchEvent=wr()}function WB(e){return wr()-e._lastSeenTouchEvent>od.mouseEmulationIgnoreMilliseconds}function qB(e,t,n){const i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function JK(e,t){if(!WB(e))return;const n=t.button;let i;if(e._buttonDown[n]=!0,n===is.LEFT)i=Ai.LEFT_DOWN;else if(n===is.MIDDLE)i=Ai.MIDDLE_DOWN;else{if(n!==is.RIGHT)return;i=Ai.RIGHT_DOWN}const o=Sm(e,t,e._primaryPosition);G.clone(o,e._primaryStartPosition),G.clone(o,e._primaryPreviousPosition);const r=Ug(t),s=e.getInputAction(i,r);c(s)&&(G.clone(o,QK.position),s(QK),t.preventDefault())}const eQ={position:new G},tQ={position:new G};function YB(e,t,n,i){const o=Ug(i),r=e.getInputAction(t,o),s=e.getInputAction(n,o);if(c(r)||c(s)){const a=Sm(e,i,e._primaryPosition);c(r)&&(G.clone(a,eQ.position),r(eQ)),c(s)&&qB(e._primaryStartPosition,a,e._clickPixelTolerance)&&(G.clone(a,tQ.position),s(tQ))}}function nQ(e,t){if(!WB(e))return;const n=t.button;n!==is.LEFT&&n!==is.MIDDLE&&n!==is.RIGHT||(e._buttonDown[is.LEFT]&&(YB(e,Ai.LEFT_UP,Ai.LEFT_CLICK,t),e._buttonDown[is.LEFT]=!1),e._buttonDown[is.MIDDLE]&&(YB(e,Ai.MIDDLE_UP,Ai.MIDDLE_CLICK,t),e._buttonDown[is.MIDDLE]=!1),e._buttonDown[is.RIGHT]&&(YB(e,Ai.RIGHT_UP,Ai.RIGHT_CLICK,t),e._buttonDown[is.RIGHT]=!1))}const XB={startPosition:new G,endPosition:new G};function iQ(e,t){if(!WB(e))return;const n=Ug(t),i=Sm(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(Ai.MOUSE_MOVE,n);c(r)&&(G.clone(o,XB.startPosition),G.clone(i,XB.endPosition),r(XB)),G.clone(i,o),(e._buttonDown[is.LEFT]||e._buttonDown[is.MIDDLE]||e._buttonDown[is.RIGHT])&&t.preventDefault()}const oQ={position:new G};function Cje(e,t){let i;if(t.button!==is.LEFT)return;i=Ai.LEFT_DOUBLE_CLICK;const o=Ug(t),r=e.getInputAction(i,o);c(r)&&(Sm(e,t,oQ.position),r(oQ))}function Eje(e,t){let n;if(c(t.deltaY)){const r=t.deltaMode;n=r===t.DOM_DELTA_PIXEL?-t.deltaY:r===t.DOM_DELTA_LINE?40*-t.deltaY:120*-t.deltaY}else n=t.detail>0?-120*t.detail:t.wheelDelta;if(!c(n))return;const i=Ug(t),o=e.getInputAction(Ai.WHEEL,i);c(o)&&(o(n),t.preventDefault())}function wje(e,t){jB(e);const n=t.changedTouches;let i;const o=n.length;let r,s;const a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.set(s,Sm(e,r,new G));gI(e,t);const l=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,l.set(s,G.clone(a.get(s)))}function rQ(e,t){jB(e);const n=t.changedTouches;let i;const o=n.length;let r,s;const a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.remove(s);gI(e,t);const l=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,l.remove(s)}const sQ={position:new G},ZB={position1:new G,position2:new G},aQ={position:new G},cQ={position:new G},lQ={position:new G};function gI(e,t){const n=Ug(t),i=e._positions,o=i.length;let r,s;const a=e._isPinching;if(1!==o&&e._buttonDown[is.LEFT]&&(e._buttonDown[is.LEFT]=!1,c(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(Ai.LEFT_UP,n),c(r)&&(G.clone(e._primaryPosition,aQ.position),r(aQ)),0===o&&!e._isTouchHolding&&(s=e.getInputAction(Ai.LEFT_CLICK,n),c(s))&&qB(e._primaryStartPosition,e._previousPositions.values[0],e._clickPixelTolerance)&&(G.clone(e._primaryPosition,cQ.position),s(cQ)),e._isTouchHolding=!1),0===o&&a&&(e._isPinching=!1,r=e.getInputAction(Ai.PINCH_END,n),c(r)&&r()),1===o&&!a){const l=i.values[0];G.clone(l,e._primaryPosition),G.clone(l,e._primaryStartPosition),G.clone(l,e._primaryPreviousPosition),e._buttonDown[is.LEFT]=!0,r=e.getInputAction(Ai.LEFT_DOWN,n),c(r)&&(G.clone(l,sQ.position),r(sQ)),e._touchHoldTimer=setTimeout(function(){!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(Ai.RIGHT_CLICK,n),c(s))&&qB(e._primaryStartPosition,e._previousPositions.values[0],e._holdPixelTolerance)&&(G.clone(e._primaryPosition,lQ.position),s(lQ))},od.touchHoldDelayMilliseconds),t.preventDefault()}2===o&&!a&&(e._isPinching=!0,r=e.getInputAction(Ai.PINCH_START,n),c(r)&&(G.clone(i.values[0],ZB.position1),G.clone(i.values[1],ZB.position2),r(ZB),t.preventDefault()))}function Sje(e,t){jB(e);const n=t.changedTouches;let i;const o=n.length;let r,s;const a=e._positions;for(i=0;i<o;++i){r=n[i],s=r.identifier;const u=a.get(s);c(u)&&Sm(e,r,u)}uQ(e,t);const l=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,G.clone(a.get(s),l.get(s))}const $B={startPosition:new G,endPosition:new G},OC={distance:{startPosition:new G,endPosition:new G},angleAndHeight:{startPosition:new G,endPosition:new G}};function uQ(e,t){const n=Ug(t),i=e._positions,o=e._previousPositions,r=i.length;let s;if(1===r&&e._buttonDown[is.LEFT]){const a=i.values[0];G.clone(a,e._primaryPosition);const l=e._primaryPreviousPosition;s=e.getInputAction(Ai.MOUSE_MOVE,n),c(s)&&(G.clone(l,$B.startPosition),G.clone(a,$B.endPosition),s($B)),G.clone(a,l),t.preventDefault()}else if(2===r&&e._isPinching&&(s=e.getInputAction(Ai.PINCH_MOVE,n),c(s))){const a=i.values[0],l=i.values[1],u=o.values[0],d=o.values[1],h=l.x-a.x,m=l.y-a.y,_=.25*Math.sqrt(h*h+m*m),p=d.x-u.x,y=d.y-u.y,A=.25*Math.sqrt(p*p+y*y),x=.125*(l.y+a.y),C=.125*(d.y+u.y),w=Math.atan2(m,h),v=Math.atan2(y,p);G.fromElements(0,A,OC.distance.startPosition),G.fromElements(0,_,OC.distance.endPosition),G.fromElements(v,C,OC.angleAndHeight.startPosition),G.fromElements(w,x,OC.angleAndHeight.endPosition),s(OC)}}function vje(e,t){if(t.target.setPointerCapture(t.pointerId),"touch"===t.pointerType){const n=e._positions,i=t.pointerId;n.set(i,Sm(e,t,new G)),gI(e,t),e._previousPositions.set(i,G.clone(n.get(i)))}else JK(e,t)}function dQ(e,t){if("touch"===t.pointerType){const i=t.pointerId;e._positions.remove(i),gI(e,t),e._previousPositions.remove(i)}else nQ(e,t)}function Dje(e,t){if("touch"===t.pointerType){const n=e._positions,i=t.pointerId,o=n.get(i);if(!c(o))return;Sm(e,t,o),uQ(e,t);const r=e._previousPositions;G.clone(n.get(i),r.get(i))}else iQ(e,t)}function od(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-od.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new G,this._primaryPosition=new G,this._primaryPreviousPosition=new G,this._positions=new _n,this._previousPositions=new _n,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=g(e,document),function Tje(e){const t=e._element,n=c(t.disableRootEvents)?t:document;let i;zn.supportsPointerEvents()?(ul(e,"pointerdown",t,vje),ul(e,"pointerup",t,dQ),ul(e,"pointermove",t,Dje),ul(e,"pointercancel",t,dQ)):(ul(e,"mousedown",t,JK),ul(e,"mouseup",n,nQ),ul(e,"mousemove",n,iQ),ul(e,"touchstart",t,wje),ul(e,"touchend",n,rQ),ul(e,"touchmove",n,Sje),ul(e,"touchcancel",n,rQ)),ul(e,"dblclick",t,Cje),i="onwheel"in t?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",ul(e,i,t,Eje)}(this)}od.prototype.setInputAction=function(e,t,n){if(!c(e))throw new E("action is required.");if(!c(t))throw new E("type is required.");const i=GB(t,n);this._inputEvents[i]=e},od.prototype.getInputAction=function(e,t){if(!c(e))throw new E("type is required.");const n=GB(e,t);return this._inputEvents[n]},od.prototype.removeInputAction=function(e,t){if(!c(e))throw new E("type is required.");const n=GB(e,t);delete this._inputEvents[n]},od.prototype.isDestroyed=function(){return!1},od.prototype.destroy=function(){return function xje(e){const t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}(this),Ye(this)},od.mouseEmulationIgnoreMilliseconds=800,od.touchHoldDelayMilliseconds=1500;const KB=od;function zg(e){T.typeOf.object("scene",e),this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}zg.prototype.completeMorph=function(){c(this._completeMorph)&&this._completeMorph()},zg.prototype.morphTo2D=function(e,t){c(this._completeMorph)&&this._completeMorph();const n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof $n,this._previousMode!==ce.SCENE2D&&this._previousMode!==ce.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,ce.SCENE2D,!0),n._mode=ce.MORPHING,n.camera._setTransform(k.IDENTITY),this._previousMode===ce.COLUMBUS_VIEW?function aWe(e,t){t*=.5;const n=e._scene,i=n.camera,o=f.clone(i.position,Qje),r=f.clone(i.direction,Jje),s=f.clone(i.up,eWe),a=f.negate(f.UNIT_Z,tWe),l=f.clone(f.UNIT_Y,nWe),u=t3;if(t>0)f.clone(f.ZERO,t3),u.z=5*n.mapProjection.ellipsoid.maximumRadius;else{f.clone(o,t3);const A=oWe;k.multiplyByPoint(pr.TRANSFORM_2D,o,A.origin),k.multiplyByPointAsVector(pr.TRANSFORM_2D,r,A.direction);const x=n.globe;if(c(x)){const C=x.pickWorldCoordinates(A,n,!0,rWe);c(C)&&(k.multiplyByPoint(pr.TRANSFORM_2D_INVERSE,C,u),u.z+=f.distance(o,u))}}const d=iWe;d.right=.5*u.z,d.left=-d.right,d.top=d.right*(n.drawingBufferHeight/n.drawingBufferWidth),d.bottom=-d.top;const h=sWe;h.position=u,h.direction=a,h.up=l,h.frustum=d;const m=wQ(h);function p(A,x){A.position.z=x}LC(e,m);const y=n.tweens.add({duration:t,easingFunction:Pc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function _(A){eu(o,u,A.time,i.position),eu(r,a,A.time,i.direction),eu(s,l,A.time,i.up),f.cross(i.direction,i.up,i.right),f.normalize(i.right,i.right),i._adjustOrthographicFrustum(!0)},complete:function(){bQ(e,t,h,p,m)}});e._currentTweens.push(y)}(this,e):function pWe(e,t,n){const i=e._scene,o=i.camera,r=cWe;if((t*=.5)>0)f.clone(f.ZERO,r.position),r.position.z=5*n.maximumRadius,f.negate(f.UNIT_Z,r.direction),f.clone(f.UNIT_Y,r.up);else{n.cartesianToCartographic(o.positionWC,AQ),i.mapProjection.project(AQ,r.position),f.negate(f.UNIT_Z,r.direction),f.clone(f.UNIT_Y,r.up);const h=dWe;f.clone(r.position2D,h.origin);const m=f.clone(o.directionWC,h.direction),_=n.scaleToGeodeticSurface(o.positionWC,hWe),p=Rn.eastNorthUpToFixedFrame(_,n,fWe);k.inverseTransformation(p,p),k.multiplyByPointAsVector(p,m,m),k.multiplyByPointAsVector(pr.TRANSFORM_2D,m,m);const y=i.globe;if(c(y)){const A=y.pickWorldCoordinates(h,i,!0,uWe);if(c(A)){const x=f.distance(r.position2D,A);A.x+=x,f.clone(A,r.position2D)}}}function s(h,m){h.position.x=m}k.multiplyByPoint(pr.TRANSFORM_2D,r.position,r.position2D),k.multiplyByPointAsVector(pr.TRANSFORM_2D,r.direction,r.direction2D),k.multiplyByPointAsVector(pr.TRANSFORM_2D,r.up,r.up2D);const a=r.frustum;a.right=.5*r.position.z,a.left=-a.right,a.top=a.right*(i.drawingBufferHeight/i.drawingBufferWidth),a.bottom=-a.top;const l=lWe;k.multiplyByPoint(pr.TRANSFORM_2D_INVERSE,r.position2D,l.position),f.clone(r.direction,l.direction),f.clone(r.up,l.up),l.frustum=a;const u=wQ(l);LC(e,u),xQ(e,t,r,function d(){bQ(e,t,r,s,u)})}(this,e,t),0===e&&c(this._completeMorph)&&this._completeMorph())};const Ije=new f,Pje=new f,Oje=new f,Lje=new f,Rje=new f,Nje=new f,Mje=new f,Fje=new Se,Bje=new k,kje=new Po,Uje=new $n,zje={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};zg.prototype.morphToColumbusView=function(e,t){c(this._completeMorph)&&this._completeMorph();const n=this._scene;if(this._previousMode=n.mode,this._previousMode===ce.COLUMBUS_VIEW||this._previousMode===ce.MORPHING)return;this._scene.morphStart.raiseEvent(this,this._previousMode,ce.COLUMBUS_VIEW,!0),n.camera._setTransform(k.IDENTITY);let i=Ije;const o=Pje,r=Oje;if(e>0)i.x=0,i.y=-1,i.z=1,i=f.multiplyByScalar(f.normalize(i,i),5*t.maximumRadius,i),f.negate(f.normalize(i,o),o),f.cross(f.UNIT_X,o,r);else{const u=n.camera;if(this._previousMode===ce.SCENE2D)f.clone(u.position,i),i.z=u.frustum.right-u.frustum.left,f.negate(f.UNIT_Z,o),f.clone(f.UNIT_Y,r);else{f.clone(u.positionWC,i),f.clone(u.directionWC,o),f.clone(u.upWC,r);const d=t.scaleToGeodeticSurface(i,Mje),h=Rn.eastNorthUpToFixedFrame(d,t,Bje);k.inverseTransformation(h,h),n.mapProjection.project(t.cartesianToCartographic(i,Fje),i),k.multiplyByPointAsVector(h,o,o),k.multiplyByPointAsVector(h,r,r)}}let s;this._morphToOrthographic?(s=Uje,s.width=n.camera.frustum.right-n.camera.frustum.left,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(s=kje,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,s.fov=O.toRadians(60));const a=zje;a.position=i,a.direction=o,a.up=r,a.frustum=s;const l=function _We(e){return function(t){const n=t._scene;n._mode=ce.COLUMBUS_VIEW,n.morphTime=ce.getMorphTime(ce.COLUMBUS_VIEW),yI(t);const i=n.camera;(t._previousModeMode!==ce.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,f.clone(e.position,i.position),f.clone(e.direction,i.direction),f.clone(e.up,i.up),f.cross(i.direction,i.up,i.right),f.normalize(i.right,i.right));const o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);const r=c(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,ce.COLUMBUS_VIEW,r)}}(a);LC(this,l),this._previousMode===ce.SCENE2D?function mWe(e,t,n,i){t*=.5;const o=e._scene,r=o.camera,s=f.clone(n.position,e3),a=f.clone(n.direction,gQ),l=f.clone(n.up,yQ);function u(){r.frustum=n.frustum.clone();const d=f.clone(r.position,pQ),h=f.clone(r.direction,mQ),m=f.clone(r.up,_Q);d.z=s.z;const p=o.tweens.add({duration:t,easingFunction:Pc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function _(y){eu(d,s,y.time,r.position),eu(h,a,y.time,r.direction),eu(m,l,y.time,r.up),f.cross(r.direction,r.up,r.right),f.normalize(r.right,r.right)},complete:function(){i(e)}});e._currentTweens.push(p)}o._mode=ce.MORPHING,e._morphToOrthographic?u():TQ(e,0,n,u)}(this,e,a,l):(a.position2D=k.multiplyByPoint(pr.TRANSFORM_2D,i,Lje),a.direction2D=k.multiplyByPointAsVector(pr.TRANSFORM_2D,o,Rje),a.up2D=k.multiplyByPointAsVector(pr.TRANSFORM_2D,r,Nje),n._mode=ce.MORPHING,xQ(this,e,a,l)),0===e&&c(this._completeMorph)&&this._completeMorph()};const QB={position:new f,direction:new f,up:new f,frustum:void 0},fQ=new Po;function LC(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new KB(e._scene.canvas);const n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,Ai.LEFT_DOWN),e._morphHandler.setInputAction(n,Ai.MIDDLE_DOWN),e._morphHandler.setInputAction(n,Ai.RIGHT_DOWN),e._morphHandler.setInputAction(n,Ai.WHEEL)}}function yI(e){const 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()}zg.prototype.morphTo3D=function(e,t){c(this._completeMorph)&&this._completeMorph();const n=this._scene;if(this._previousMode=n.mode,this._previousMode!==ce.SCENE3D&&this._previousMode!==ce.MORPHING){if(this._scene.morphStart.raiseEvent(this,this._previousMode,ce.SCENE3D,!0),n._mode=ce.MORPHING,n.camera._setTransform(k.IDENTITY),this._previousMode===ce.SCENE2D)!function Kje(e,t,n){const i=e._scene,o=i.camera;let r,s;(t/=3)>0?(r=QB,f.fromDegrees(0,0,5*n.maximumRadius,n,r.position),f.negate(r.position,r.direction),f.normalize(r.direction,r.direction),f.clone(f.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=hQ(e,n)),e._morphToOrthographic?(s=$je,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.width=o.frustum.right-o.frustum.left):(s=fQ,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.fov=O.toRadians(60)),r.frustum=s;const a=EQ(r);let l;LC(e,a),l=e._morphToOrthographic?function(){JB(e,t,r,a)}:function(){TQ(e,t,r,function(){JB(e,t,r,a)})},t>0?(i._mode=ce.SCENE2D,o.flyTo({duration:t,destination:f.fromDegrees(0,0,5*n.maximumRadius,n,e3),complete:function(){i._mode=ce.MORPHING,l()}})):l()}(this,e,t);else{let i,o;e>0?(i=QB,f.fromDegrees(0,0,5*t.maximumRadius,t,i.position),f.negate(i.position,i.direction),f.normalize(i.direction,i.direction),f.clone(f.UNIT_Z,i.up)):i=hQ(this,t);const r=n.camera;r.frustum instanceof $n?o=r.frustum.clone():(o=fQ,o.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,o.fov=O.toRadians(60)),i.frustum=o;const s=EQ(i);LC(this,s),JB(this,e,i,s)}0===e&&c(this._completeMorph)&&this._completeMorph()}},zg.prototype.isDestroyed=function(){return!1},zg.prototype.destroy=function(){return yI(this),Ye(this)};const Vje=new Se,Hje=new f,Gje=new k;function hQ(e,t){const n=e._scene,i=n.camera,o=QB,r=o.position,s=o.direction,a=o.up,l=n.mapProjection.unproject(i.position,Vje);t.cartographicToCartesian(l,r);const u=t.scaleToGeodeticSurface(r,Hje),d=Rn.eastNorthUpToFixedFrame(u,t,Gje);return k.multiplyByPointAsVector(d,i.direction,s),k.multiplyByPointAsVector(d,i.up,a),o}const jje=new f,Wje=new f,qje=new f,Yje=new f,Xje=new f,Zje=new f;function JB(e,t,n,i){t*=.5;const o=e._scene,r=o.camera,s=f.clone(r.position,jje),a=f.clone(r.direction,Wje),l=f.clone(r.up,qje),u=k.multiplyByPoint(pr.TRANSFORM_2D_INVERSE,n.position,Yje),d=k.multiplyByPointAsVector(pr.TRANSFORM_2D_INVERSE,n.direction,Xje),h=k.multiplyByPointAsVector(pr.TRANSFORM_2D_INVERSE,n.up,Zje),_=o.tweens.add({duration:t,easingFunction:Pc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function m(p){eu(s,u,p.time,r.position),eu(a,d,p.time,r.direction),eu(l,h,p.time,r.up),f.cross(r.direction,r.up,r.right),f.normalize(r.right,r.right)},complete:function(){CQ(e,o,0,1,t,i)}});e._currentTweens.push(_)}const $je=new $n,pQ=new f,mQ=new f,_Q=new f,e3=new f,gQ=new f,yQ=new f;function eu(e,t,n,i){return f.lerp(e,t,n,i)}function bQ(e,t,n,i,o){const r=e._scene,s=r.camera;if(s.frustum instanceof $n)return;const a=s.frustum.fov,l=.5*O.RADIANS_PER_DEGREE,u=n.position.z*Math.tan(.5*a);s.frustum.far=u/Math.tan(.5*l)+1e7;const h=r.tweens.add({duration:t,easingFunction:Pc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function d(m){s.frustum.fov=O.lerp(a,l,m.time);const _=u/Math.tan(.5*s.frustum.fov);i(s,_)},complete:function(){s.frustum=n.frustum.clone(),o(e)}});e._currentTweens.push(h)}const Qje=new f,Jje=new f,eWe=new f,t3=new f,tWe=new f,nWe=new f,iWe=new qa,oWe=new fi,rWe=new f,sWe={position:void 0,direction:void 0,up:void 0,frustum:void 0},AQ=new Se,cWe={position:new f,direction:new f,up:new f,position2D:new f,direction2D:new f,up2D:new f,frustum:new qa},lWe={position:new f,direction:new f,up:new f,frustum:void 0},uWe=new f,dWe=new fi,fWe=new k,hWe=new f;function TQ(e,t,n,i){const o=e._scene,r=o.camera,s=r.frustum.right-r.frustum.left;r.frustum=n.frustum.clone();const a=r.frustum.fov,l=.5*O.RADIANS_PER_DEGREE,u=s*Math.tan(.5*a);r.frustum.far=u/Math.tan(.5*l)+1e7,r.frustum.fov=l;const h=o.tweens.add({duration:t,easingFunction:Pc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function d(m){r.frustum.fov=O.lerp(l,a,m.time),r.position.z=u/Math.tan(.5*r.frustum.fov)},complete:function(){i(e)}});e._currentTweens.push(h)}function xQ(e,t,n,i){const o=e._scene,r=o.camera,s=f.clone(r.position,pQ),a=f.clone(r.direction,mQ),l=f.clone(r.up,_Q),u=f.clone(n.position2D,e3),d=f.clone(n.direction2D,gQ),h=f.clone(n.up2D,yQ),_=o.tweens.add({duration:t,easingFunction:Pc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function m(p){eu(s,u,p.time,r.position),eu(a,d,p.time,r.direction),eu(l,h,p.time,r.up),f.cross(r.direction,r.up,r.right),f.normalize(r.right,r.right),r._adjustOrthographicFrustum(!0)},complete:function(){CQ(e,o,1,0,t,i)}});e._currentTweens.push(_)}function CQ(e,t,n,i,o,r){const s={object:t,property:"morphTime",startValue:n,stopValue:i,duration:o,easingFunction:Pc.QUARTIC_OUT};c(r)&&(s.complete=function(){r(e)});const a=t.tweens.addProperty(s);e._currentTweens.push(a)}function EQ(e){return function(t){const n=t._scene;n._mode=ce.SCENE3D,n.morphTime=ce.getMorphTime(ce.SCENE3D),yI(t);const i=n.camera;(t._previousMode!==ce.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,f.clone(e.position,i.position),f.clone(e.direction,i.direction),f.clone(e.up,i.up),f.cross(i.direction,i.up,i.right),f.normalize(i.right,i.right),i.frustum=e.frustum.clone());const o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);const r=c(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,ce.SCENE3D,r)}}function wQ(e){return function(t){const n=t._scene;n._mode=ce.SCENE2D,n.morphTime=ce.getMorphTime(ce.SCENE2D),yI(t);const i=n.camera;f.clone(e.position,i.position),i.position.z=2*n.mapProjection.ellipsoid.maximumRadius,f.clone(e.direction,i.direction),f.clone(e.up,i.up),f.cross(i.direction,i.up,i.right),f.normalize(i.right,i.right),i.frustum=e.frustum.clone();const o=c(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,ce.SCENE2D,o)}}const gWe=zg,Ki=Object.freeze({LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4});function Ma(e,t){let n=e;return c(t)&&(n+=`+${t}`),n}function SQ(e,t,n){const i=Ma(Ki.PINCH,t),o=e._update,r=e._isDown,s=e._eventStartPosition,a=e._pressTime,l=e._releaseTime;o[i]=!0,r[i]=!1,s[i]=new G;let u=e._movement[i];c(u)||(u=e._movement[i]={}),u.distance={startPosition:new G,endPosition:new G},u.angleAndHeight={startPosition:new G,endPosition:new G},u.prevAngle=0,e._eventHandler.setInputAction(function(d){e._buttonsDown++,r[i]=!0,a[i]=new Date,G.lerp(d.position1,d.position2,.5,s[i])},Ai.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[i]=!1,l[i]=new Date},Ai.PINCH_END,t),e._eventHandler.setInputAction(function(d){if(r[i]){o[i]?(function yWe(e,t){G.clone(e.distance.startPosition,t.distance.startPosition),G.clone(e.distance.endPosition,t.distance.endPosition),G.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),G.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}(d,u),o[i]=!1,u.prevAngle=u.angleAndHeight.startPosition.x):(G.clone(d.distance.endPosition,u.distance.endPosition),G.clone(d.angleAndHeight.endPosition,u.angleAndHeight.endPosition));let h=u.angleAndHeight.endPosition.x;const m=u.prevAngle,_=2*Math.PI;for(;h>=m+Math.PI;)h-=_;for(;h<m-Math.PI;)h+=_;u.angleAndHeight.endPosition.x=-h*n.clientWidth/12,u.angleAndHeight.startPosition.x=-m*n.clientWidth/12}},Ai.PINCH_MOVE,t)}function vQ(e,t){const n=Ma(Ki.WHEEL,t),i=e._pressTime,o=e._releaseTime,r=e._update;r[n]=!0;let s=e._movement[n];c(s)||(s=e._movement[n]={});let a=e._lastMovement[n];c(a)||(a=e._lastMovement[n]={startPosition:new G,endPosition:new G,valid:!1}),s.startPosition=new G,G.clone(G.ZERO,s.startPosition),s.endPosition=new G,e._eventHandler.setInputAction(function(l){const u=7.5*O.toRadians(l);i[n]=o[n]=new Date,s.endPosition.x=0,s.endPosition.y=u,G.clone(s.endPosition,a.endPosition),a.valid=!0,r[n]=!1},Ai.WHEEL,t)}function Cb(e,t,n){const i=Ma(n,t),o=e._isDown,r=e._eventStartPosition,s=e._pressTime,a=e._releaseTime;o[i]=!1,r[i]=new G;let u,d,l=e._lastMovement[i];c(l)||(l=e._lastMovement[i]={startPosition:new G,endPosition:new G,valid:!1}),n===Ki.LEFT_DRAG?(u=Ai.LEFT_DOWN,d=Ai.LEFT_UP):n===Ki.RIGHT_DRAG?(u=Ai.RIGHT_DOWN,d=Ai.RIGHT_UP):n===Ki.MIDDLE_DRAG&&(u=Ai.MIDDLE_DOWN,d=Ai.MIDDLE_UP),e._eventHandler.setInputAction(function(h){e._buttonsDown++,l.valid=!1,o[i]=!0,s[i]=new Date,G.clone(h.position,r[i])},u,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[i]=!1,a[i]=new Date},d,t)}function DQ(e,t){G.clone(e.startPosition,t.startPosition),G.clone(e.endPosition,t.endPosition)}function IQ(e,t){const n=e._update,i=e._movement,o=e._lastMovement,r=e._isDown;for(const s in Ki)if(Ki.hasOwnProperty(s)){const a=Ki[s];if(c(a)){const l=Ma(a,t);n[l]=!0,c(e._lastMovement[l])||(e._lastMovement[l]={startPosition:new G,endPosition:new G,valid:!1}),c(e._movement[l])||(e._movement[l]={startPosition:new G,endPosition:new G})}}e._eventHandler.setInputAction(function(s){for(const a in Ki)if(Ki.hasOwnProperty(a)){const l=Ki[a];if(c(l)){const u=Ma(l,t);r[u]&&(n[u]?(DQ(i[u],o[u]),o[u].valid=!0,DQ(s,i[u]),n[u]=!1):G.clone(s.endPosition,i[u].endPosition))}}G.clone(s.endPosition,e._currentMousePosition)},Ai.MOUSE_MOVE,t)}function tu(e){if(!c(e))throw new E("canvas is required.");this._eventHandler=new KB(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new G,vQ(this,void 0),SQ(this,void 0,e),Cb(this,void 0,Ki.LEFT_DRAG),Cb(this,void 0,Ki.RIGHT_DRAG),Cb(this,void 0,Ki.MIDDLE_DRAG),IQ(this,void 0);for(const t in Jl)if(Jl.hasOwnProperty(t)){const n=Jl[t];c(n)&&(vQ(this,n),SQ(this,n,e),Cb(this,n,Ki.LEFT_DRAG),Cb(this,n,Ki.RIGHT_DRAG),Cb(this,n,Ki.MIDDLE_DRAG),IQ(this,n))}}Object.defineProperties(tu.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){const e=!(this._update[Ma(Ki.WHEEL)]&&this._update[Ma(Ki.WHEEL,Jl.SHIFT)]&&this._update[Ma(Ki.WHEEL,Jl.CTRL)]&&this._update[Ma(Ki.WHEEL,Jl.ALT)]);return this._buttonsDown>0||e}}}),tu.prototype.isMoving=function(e,t){if(!c(e))throw new E("type is required.");const n=Ma(e,t);return!this._update[n]},tu.prototype.getMovement=function(e,t){if(!c(e))throw new E("type is required.");const n=Ma(e,t);return this._movement[n]},tu.prototype.getLastMovement=function(e,t){if(!c(e))throw new E("type is required.");const n=Ma(e,t),i=this._lastMovement[n];if(i.valid)return i},tu.prototype.isButtonDown=function(e,t){if(!c(e))throw new E("type is required.");const n=Ma(e,t);return this._isDown[n]},tu.prototype.getStartMousePosition=function(e,t){if(!c(e))throw new E("type is required.");if(e===Ki.WHEEL)return this._currentMousePosition;const n=Ma(e,t);return this._eventStartPosition[n]},tu.prototype.getButtonPressTime=function(e,t){if(!c(e))throw new E("type is required.");const n=Ma(e,t);return this._pressTime[n]},tu.prototype.getButtonReleaseTime=function(e,t){if(!c(e))throw new E("type is required.");const n=Ma(e,t);return this._releaseTime[n]},tu.prototype.reset=function(){for(const e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},tu.prototype.isDestroyed=function(){return!1},tu.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),Ye(this)};const bWe=tu;function bI(e,t,n,i,o,r,s,a,l,u){this._tweens=e,this._tweenjs=t,this._startObject=zt(n),this._stopObject=zt(i),this._duration=o,this._delay=r,this._easingFunction=s,this._update=a,this._complete=l,this.cancel=u,this.needsStart=!0}function rd(){this._tweens=[]}Object.defineProperties(bI.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}}}),bI.prototype.cancelTween=function(){this._tweens.remove(this)},Object.defineProperties(rd.prototype,{length:{get:function(){return this._tweens.length}}}),rd.prototype.add=function(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.startObject)||!c(e.stopObject))throw new E("options.startObject and options.stopObject are required.");if(!c(e.duration)||e.duration<0)throw new E("options.duration is required and must be positive.");if(0===e.duration)return c(e.complete)&&e.complete(),new bI(this);const t=e.duration/It.SECONDS_PER_MILLISECOND,n=g(e.delay,0),i=n/It.SECONDS_PER_MILLISECOND,o=g(e.easingFunction,Pc.LINEAR_NONE),r=e.startObject,s=new nX(r);s.to(zt(e.stopObject),t),s.delay(i),s.easing(o),c(e.update)&&s.onUpdate(function(){e.update(r)}),s.onComplete(g(e.complete,null)),s.repeat(g(e._repeat,0));const a=new bI(this,s,e.startObject,e.stopObject,e.duration,n,o,e.update,e.complete,e.cancel);return this._tweens.push(a),a},rd.prototype.addProperty=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).object,n=e.property,i=e.startValue,o=e.stopValue;if(!c(t)||!c(e.property))throw new E("options.object and options.property are required.");if(!c(t[n]))throw new E("options.object must have the specified property.");if(!c(i)||!c(o))throw new E("options.startValue and options.stopValue are required.");return this.add({startObject:{value:i},stopObject:{value:o},duration:g(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function r(s){t[n]=s.value},complete:e.complete,cancel:e.cancel,_repeat:e._repeat})},rd.prototype.addAlpha=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).material;if(!c(t))throw new E("options.material is required.");const n=[];for(const o in t.uniforms)t.uniforms.hasOwnProperty(o)&&c(t.uniforms[o])&&c(t.uniforms[o].alpha)&&n.push(o);if(0===n.length)throw new E("material has no properties with alpha components.");return this.add({startObject:{alpha:g(e.startValue,0)},stopObject:{alpha:g(e.stopValue,1)},duration:g(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function i(o){const r=n.length;for(let s=0;s<r;++s)t.uniforms[n[s]].alpha=o.alpha},complete:e.complete,cancel:e.cancel})},rd.prototype.addOffsetIncrement=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).material;if(!c(t))throw new E("material is required.");if(!c(t.uniforms.offset))throw new E("material.uniforms must have an offset property.");const n=t.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})},rd.prototype.remove=function(e){if(!c(e))return!1;const t=this._tweens.indexOf(e);return-1!==t&&(e.tweenjs.stop(),c(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0)},rd.prototype.removeAll=function(){const e=this._tweens;for(let t=0;t<e.length;++t){const n=e[t];n.tweenjs.stop(),c(n.cancel)&&n.cancel()}e.length=0},rd.prototype.contains=function(e){return c(e)&&-1!==this._tweens.indexOf(e)},rd.prototype.get=function(e){if(!c(e))throw new E("index is required.");return this._tweens[e]},rd.prototype.update=function(e){const t=this._tweens;let n=0;for(e=c(e)?e/It.SECONDS_PER_MILLISECOND:wr();n<t.length;){const i=t[n],o=i.tweenjs;i.needsStart?(i.needsStart=!1,o.start(e)):o.update(e)?n++:(o.stop(),t.splice(n,1))}};const PQ=rd;function RC(e){if(!c(e))throw new E("scene is required.");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=Ki.LEFT_DRAG,this.zoomEventTypes=[Ki.RIGHT_DRAG,Ki.WHEEL,Ki.PINCH],this.rotateEventTypes=Ki.LEFT_DRAG,this.tiltEventTypes=[Ki.MIDDLE_DRAG,Ki.PINCH,{eventType:Ki.LEFT_DRAG,modifier:Jl.CTRL},{eventType:Ki.RIGHT_DRAG,modifier:Jl.CTRL}],this.lookEventTypes={eventType:Ki.LEFT_DRAG,modifier:Jl.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._aggregator=new bWe(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 PQ,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new G(-1,-1),this._tiltCenter=new f,this._rotateMousePosition=new G(-1,-1),this._rotateStartPosition=new f,this._strafeStartPosition=new f,this._strafeMousePosition=new G,this._strafeEndMousePosition=new G,this._zoomMouseStart=new G(-1,-1),this._zoomWorldPosition=new f,this._useZoomWorldPosition=!1,this._panLastMousePosition=new G,this._panLastWorldPosition=new f,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,this._maxCoord=e.mapProjection.project(new Se(Math.PI,O.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=2e-4,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}const xWe=.4;function CWe(e,t,n,i,o,r,s){let a=r[s];c(a)||(a=r[s]={startPosition:new G,endPosition:new G,motion:new G,inertiaEnabled:!0});const l=e.getButtonPressTime(t,n),u=e.getButtonReleaseTime(t,n),d=l&&u&&(u.getTime()-l.getTime())/1e3,m=u&&((new Date).getTime()-u.getTime())/1e3;if(l&&u&&d<xWe){const _=function AWe(e,t){return e<0?0:Math.exp(-25*(1-t)*e)}(m,i),p=e.getLastMovement(t,n);if(!c(p)||function TWe(e){return G.equalsEpsilon(e.startPosition,e.endPosition,O.EPSILON14)}(p)||!a.inertiaEnabled||(a.motion.x=.5*(p.endPosition.x-p.startPosition.x),a.motion.y=.5*(p.endPosition.y-p.startPosition.y),a.startPosition=G.clone(p.startPosition,a.startPosition),a.endPosition=G.multiplyByScalar(a.motion,_,a.endPosition),a.endPosition=G.add(a.startPosition,a.endPosition,a.endPosition),isNaN(a.endPosition.x)||isNaN(a.endPosition.y)||G.distance(a.startPosition,a.endPosition)<.5))return;e.isButtonDown(t,n)||o(r,e.getStartMousePosition(t,n),a)}}function EWe(e,t){if(c(t)){let n=e[t];c(n)&&(n.inertiaEnabled=!0);const i=e._inertiaDisablers[t];if(c(i)){const o=i.length;for(let r=0;r<o;++r)n=e[i[r]],c(n)&&(n.inertiaEnabled=!1)}}}const OQ=[];function nc(e,t,n,i,o,r){if(!c(n))return;const s=e._aggregator;Array.isArray(n)||(OQ[0]=n,n=OQ);const a=n.length;for(let l=0;l<a;++l){const u=n[l],d=c(u.eventType)?u.eventType:u,h=u.modifier,m=s.isMoving(d,h)&&s.getMovement(d,h),_=s.getStartMousePosition(d,h);e.enableInputs&&t&&(m?(i(e,_,m),EWe(e,r)):o<1&&CWe(s,d,h,o,i,e,r))}}const AI=new fi,wWe=new f,SWe=new G,vWe=new f,DWe=new G,IWe=new f,PWe=new f,OWe=new f,LWe=new f,LQ=new f,RWe=new f,NWe=new f,MWe=new f,FWe=new f,BWe=new f,kWe=new f,UWe=new f,zWe=new f,VWe=new f,HWe=new f,Vg=new f,RQ=new f,NQ=new f,n3={orientation:new wy};function i3(e,t,n,i,o,r){let s=1;c(r)&&(s=O.clamp(Math.abs(r),.25,1));const a=n.endPosition.y-n.startPosition.y,u=a>0?e.minimumZoomDistance*s:0,d=e.maximumZoomDistance;let m=i*(o-u);m=O.clamp(m,e._minimumZoomRate,e._maximumZoomRate);let _=a/e._scene.canvas.clientHeight;_=Math.min(_,e.maximumMovementRatio);let p=m*_;if(e.enableCollisionDetection||0===e.minimumZoomDistance||!c(e._globe)){if(p>0&&Math.abs(o-u)<1||p<0&&Math.abs(o-d)<1)return;o-p<u?p=o-u-1:o-p>d&&(p=o-d)}const y=e._scene,A=y.camera,x=y.mode,C=n3.orientation;if(C.heading=A.heading,C.pitch=A.pitch,C.roll=A.roll,A.frustum instanceof $n)return void(Math.abs(p)>0&&(A.zoomIn(p),A._adjustOrthographicFrustum(!0)));const w=g(n.inertiaEnabled,G.equals(t,e._zoomMouseStart));let P,v=e._zoomingOnVector,D=e._rotatingZoom;if(w||(e._zoomMouseStart=G.clone(t,e._zoomMouseStart),c(e._globe)&&x===ce.SCENE2D?(P=A.getPickRay(t,AI).origin,P=f.fromElements(P.y,P.z,P.x)):c(e._globe)&&(P=zh(e,t,wWe)),c(P)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=f.clone(P,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,v=e._zoomingOnVector=!1,D=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),!e._useZoomWorldPosition)return void A.zoomIn(p);let N=x===ce.COLUMBUS_VIEW;if(A.positionCartographic.height<2e6&&(D=!0),!w||D){if(x===ce.SCENE2D){const R=e._zoomWorldPosition,B=A.position;if(!f.equals(R,B)&&A.positionCartographic.height<2*e._maxCoord.x){const F=A.position.x,S=f.subtract(R,B,vWe);f.normalize(S,S);const I=f.distance(R,B)*p/(.5*A.getMagnitude());A.move(S,.5*I),(A.position.x<0&&F>0||A.position.x>0&&F<0)&&(P=A.getPickRay(t,AI).origin,P=f.fromElements(P.y,P.z,P.x),e._zoomWorldPosition=f.clone(P,e._zoomWorldPosition))}}else if(x===ce.SCENE3D){const R=f.normalize(A.position,LQ);if(e._cameraUnderground||e._zoomingUnderground||A.positionCartographic.height<3e3&&Math.abs(f.dot(A.direction,R))<.6)N=!0;else{const B=y.canvas,F=DWe;F.x=B.clientWidth/2,F.y=B.clientHeight/2;const S=zh(e,F,IWe);if(c(S))if(A.positionCartographic.height<1e6){if(!(f.dot(A.direction,R)>=-.5)){const I=NWe;f.clone(A.position,I);const L=e._zoomWorldPosition;let M=RWe;if(M=f.normalize(L,M),f.dot(M,R)<0)return;const U=HWe,z=BWe;f.clone(A.direction,z),f.add(I,f.multiplyByScalar(z,1e3,Vg),U);const j=kWe,W=UWe;f.subtract(L,I,j),f.normalize(j,W);const q=f.dot(R,W);if(q>=0)return void(e._zoomMouseStart.x=-1);const V=Math.acos(-q),$=f.magnitude(I),Z=f.magnitude(L),ie=$-p,Y=f.magnitude(j),me=Math.asin(O.clamp(Y/Z*Math.sin(V),-1,1))-Math.asin(O.clamp(ie/Z*Math.sin(V),-1,1))+V,we=MWe;f.normalize(I,we);let le=FWe;le=f.cross(W,we,le),le=f.normalize(le,le),f.normalize(f.cross(we,le,Vg),z),f.multiplyByScalar(f.normalize(U,Vg),f.magnitude(U)-p,U),f.normalize(I,I),f.multiplyByScalar(I,ie,I);const Ae=zWe;f.multiplyByScalar(f.add(f.multiplyByScalar(we,Math.cos(me)-1,RQ),f.multiplyByScalar(z,Math.sin(me),NQ),Vg),ie,Ae),f.add(I,Ae,I),f.normalize(U,we),f.normalize(f.cross(we,le,Vg),z);const xe=VWe;return f.multiplyByScalar(f.add(f.multiplyByScalar(we,Math.cos(me)-1,RQ),f.multiplyByScalar(z,Math.sin(me),NQ),Vg),f.magnitude(U),xe),f.add(U,xe,U),f.clone(I,A.position),f.normalize(f.subtract(U,I,Vg),A.direction),f.clone(A.direction,A.direction),f.cross(A.direction,A.up,A.right),f.cross(A.right,A.direction,A.up),void A.setView(n3)}N=!0}else{const I=f.normalize(S,PWe),L=f.normalize(e._zoomWorldPosition,OWe),M=f.dot(L,I);if(M>0&&M<1){const U=O.acosClamped(M),z=f.cross(L,I,LWe),j=Math.abs(U)>O.toRadians(20)?.75*A.positionCartographic.height:A.positionCartographic.height-p;A.rotate(z,U*(p/j))}}else N=!0}}e._rotatingZoom=!N}if(!w&&N||v){let R;const B=Ur.wgs84ToWindowCoordinates(y,e._zoomWorldPosition,SWe);R=x!==ce.COLUMBUS_VIEW&&G.equals(t,e._zoomMouseStart)&&c(B)?A.getPickRay(B,AI):A.getPickRay(t,AI);const F=R.direction;(x===ce.COLUMBUS_VIEW||x===ce.SCENE2D)&&f.fromElements(F.y,F.z,F.x,F),A.move(F,p),e._zoomingOnVector=!0}else A.zoomIn(p);e._cameraUnderground||A.setView(n3)}const GWe=new fi,jWe=new fi,WWe=new f;function qWe(e,t,n){const o=e._scene.camera;let r=o.getPickRay(n.startPosition,GWe).origin,s=o.getPickRay(n.endPosition,jWe).origin;r=f.fromElements(r.y,r.z,r.x,r),s=f.fromElements(s.y,s.z,s.x,s);const a=f.subtract(r,s,WWe),l=f.magnitude(a);l>0&&(f.normalize(a,a),o.move(a,l))}function MQ(e,t,n){c(n.distance)&&(n=n.distance),i3(e,t,n,e._zoomFactor,e._scene.camera.getMagnitude())}const YWe=new G,XWe=new G;function FQ(e,t,n){if(c(n.angleAndHeight))return void function ZWe(e,t,n){let i=e._rotateFactor*e._rotateRateRangeAdjustment;i>e._maximumRotateRate&&(i=e._maximumRotateRate),i<e._minimumRotateRate&&(i=e._minimumRotateRate);const o=e._scene,r=o.camera;let a=(n.endPosition.x-n.startPosition.x)/o.canvas.clientWidth;a=Math.min(a,e.maximumMovementRatio);const l=i*a*Math.PI*4;r.twistRight(l)}(e,0,n.angleAndHeight);const i=e._scene,o=i.camera,r=i.canvas,s=r.clientWidth,a=r.clientHeight;let l=YWe;l.x=2/s*n.startPosition.x-1,l.y=2/a*(a-n.startPosition.y)-1,l=G.normalize(l,l);let u=XWe;u.x=2/s*n.endPosition.x-1,u.y=2/a*(a-n.endPosition.y)-1,u=G.normalize(u,u);let d=O.acosClamped(l.x);l.y<0&&(d=O.TWO_PI-d);let h=O.acosClamped(u.x);u.y<0&&(h=O.TWO_PI-h),o.twistRight(h-d)}const BQ=new fi,KWe=new f,QWe=new f;function zh(e,t,n){const i=e._scene,o=e._globe,r=i.camera;let s;if(i.pickPositionSupported&&(s=i.pickPositionWorldCoordinates(t,KWe)),!c(o))return f.clone(s,n);const a=!e._cameraUnderground,l=r.getPickRay(t,BQ),u=o.pickWorldCoordinates(l,i,a,QWe),d=c(s)?f.distance(s,r.positionWC):Number.POSITIVE_INFINITY,h=c(u)?f.distance(u,r.positionWC):Number.POSITIVE_INFINITY;return f.clone(d<h?s:u,n)}const JWe=new Se;function TI(e){const n=e._scene,i=n.camera;let r=0;if(n.mode===ce.SCENE3D){const l=e._ellipsoid.cartesianToCartographic(i.position,JWe);c(l)&&(r=l.height)}else r=i.position.z;const s=g(e._scene.globeHeight,0);return Math.abs(s-r)}const eqe=new f;function kQ(e,t){const n=t.origin,i=t.direction,o=TI(e),r=f.normalize(n,eqe);let s=Math.abs(f.dot(r,i));return s=2*Math.max(s,.5),o*s}function UQ(e,t,n,i){let o=f.distance(t.origin,n);const r=TI(e);return o>O.clamp(5*r,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance)&&(o=Math.min(o,r/5),o=Math.max(o,100)),fi.getPoint(t,o,i)}function zQ(e,t,n,i){let o;return c(n)?(o=f.distance(t.origin,n),o>e._maximumUndergroundPickDistance&&(o=TI(e))):o=TI(e),fi.getPoint(t,o,i)}const tqe=new G;function VQ(e,t){const n=t.endPosition,i=G.subtract(t.endPosition,t.startPosition,tqe),o=e._strafeEndMousePosition;G.add(o,i,o),t.endPosition=o,a3(e,t,e._strafeStartPosition),t.endPosition=n}const HQ=new fi,nqe=new fi,o3=new f,iqe=new f,oqe=new f,rqe=new f,sqe=new Hn(f.UNIT_X,0),aqe=new G,cqe=new G;function lqe(e,t,n){if(f.equals(t,e._translateMousePosition)||(e._looking=!1),f.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking)return void fl(e,0,n);if(e._strafing)return void VQ(e,n);const o=e._scene.camera,r=e._cameraUnderground,s=G.clone(n.startPosition,aqe),a=G.clone(n.endPosition,cqe);let l=o.getPickRay(s,HQ);const u=f.clone(f.ZERO,rqe),d=f.UNIT_X;let h;if(o.position.z<e._minimumPickingTerrainHeight&&(h=zh(e,s,o3),c(h)&&(u.x=h.x)),r||u.x>o.position.z&&c(h)){let w=h;return r&&(w=zQ(e,l,h,o3)),G.clone(t,e._strafeMousePosition),G.clone(t,e._strafeEndMousePosition),f.clone(w,e._strafeStartPosition),e._strafing=!0,void a3(e,n,e._strafeStartPosition)}const m=Hn.fromPointNormal(u,d,sqe);l=o.getPickRay(s,HQ);const _=rr.rayPlane(l,m,o3),p=o.getPickRay(a,nqe),y=rr.rayPlane(p,m,iqe);if(!c(_)||!c(y))return e._looking=!0,fl(e,0,n),void G.clone(t,e._translateMousePosition);const A=f.subtract(_,y,oqe),x=A.x;A.x=A.y,A.y=A.z,A.z=x;const C=f.magnitude(A);C>O.EPSILON6&&(f.normalize(A,A),o.move(A,C))}const GQ=new G,xI=new fi,CI=new f,uqe=new f,jQ=new k,dqe=new k,fqe=new f,hqe=new Hn(f.UNIT_X,0),r3=new f,s3=new Se,WQ=new k,pqe=new yt,mqe=new ne,EI=new f;function _qe(e,t,n){if(c(n.angleAndHeight)&&(n=n.angleAndHeight),G.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking)return void fl(e,0,n);const o=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(o.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,function gqe(e,t,n){const i=e._scene,o=i.camera,r=i.canvas,s=GQ;s.x=r.clientWidth/2,s.y=r.clientHeight/2;const a=o.getPickRay(s,xI),l=f.UNIT_X,u=a.origin,d=a.direction;let h;const m=f.dot(l,d);if(Math.abs(m)>O.EPSILON6&&(h=-f.dot(l,u)/m),!c(h)||h<=0)return e._looking=!0,fl(e,0,n),void G.clone(t,e._tiltCenterMousePosition);const _=f.multiplyByScalar(d,h,CI);f.add(u,_,_);const p=i.mapProjection,y=p.ellipsoid;f.fromElements(_.y,_.z,_.x,_);const A=p.unproject(_,s3);y.cartographicToCartesian(A,_);const x=Rn.eastNorthUpToFixedFrame(_,y,jQ),C=e._globe,w=e._ellipsoid;e._globe=void 0,e._ellipsoid=ge.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;const v=k.clone(o.transform,WQ);o._setTransform(x),dl(e,0,n,f.UNIT_Z),o._setTransform(v),e._globe=C,e._ellipsoid=w;const D=w.maximumRadius;e._rotateFactor=1/D,e._rotateRateRangeAdjustment=D}(e,t,n)):function yqe(e,t,n){const i=e._scene,o=i.camera,r=e._cameraUnderground;let s,a;const l=f.UNIT_X;if(G.equals(t,e._tiltCenterMousePosition))s=f.clone(e._tiltCenter,CI);else{if(o.position.z<e._minimumPickingTerrainHeight&&(s=zh(e,t,CI)),!c(s)){a=o.getPickRay(t,xI);const S=a.origin,I=a.direction;let L;const M=f.dot(l,I);if(Math.abs(M)>O.EPSILON6&&(L=-f.dot(l,S)/M),!c(L)||L<=0)return e._looking=!0,fl(e,0,n),void G.clone(t,e._tiltCenterMousePosition);s=f.multiplyByScalar(I,L,CI),f.add(S,s,s)}r&&(c(a)||(a=o.getPickRay(t,xI)),UQ(e,a,s,s)),G.clone(t,e._tiltCenterMousePosition),f.clone(s,e._tiltCenter)}const d=GQ;d.x=i.canvas.clientWidth/2,d.y=e._tiltCenterMousePosition.y,a=o.getPickRay(d,xI);const h=f.clone(f.ZERO,fqe);h.x=s.x;const m=Hn.fromPointNormal(h,l,hqe),_=rr.rayPlane(a,m,uqe),p=o._projection,y=p.ellipsoid;f.fromElements(s.y,s.z,s.x,s);let A=p.unproject(s,s3);y.cartographicToCartesian(A,s);const x=Rn.eastNorthUpToFixedFrame(s,y,jQ);let C;c(_)?(f.fromElements(_.y,_.z,_.x,_),A=p.unproject(_,s3),y.cartographicToCartesian(A,_),C=Rn.eastNorthUpToFixedFrame(_,y,dqe)):C=x;const w=e._globe,v=e._ellipsoid;e._globe=void 0,e._ellipsoid=ge.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let D=f.UNIT_Z;const P=k.clone(o.transform,WQ);o._setTransform(x);const N=f.cross(f.UNIT_Z,f.normalize(o.position,r3),r3),R=f.dot(o.right,N);if(dl(e,0,n,D,!1,!0),o._setTransform(C),R<0){const S=n.startPosition.y-n.endPosition.y;(r&&S<0||!r&&S>0)&&(D=void 0);const I=o.constrainedAxis;o.constrainedAxis=void 0,dl(e,0,n,D,!0,!1),o.constrainedAxis=I}else dl(e,0,n,D,!0,!1);if(c(o.constrainedAxis)){const S=f.cross(o.direction,o.constrainedAxis,EI);f.equalsEpsilon(S,f.ZERO,O.EPSILON6)||(f.dot(S,o.right)<0&&f.negate(S,S),f.cross(S,o.direction,o.up),f.cross(o.direction,o.up,o.right),f.normalize(o.up,o.up),f.normalize(o.right,o.right))}o._setTransform(P),e._globe=w,e._ellipsoid=v;const B=v.maximumRadius;e._rotateFactor=1/B,e._rotateRateRangeAdjustment=B;const F=f.clone(o.positionWC,r3);if(e.enableCollisionDetection&&p3(e),!f.equals(o.positionWC,F)){o._setTransform(C),o.worldToCameraCoordinatesPoint(F,F);const S=f.magnitudeSquared(F);f.magnitudeSquared(o.position)>S&&(f.normalize(o.position,o.position),f.multiplyByScalar(o.position,Math.sqrt(S),o.position));const I=f.angleBetween(F,o.position),L=f.cross(F,o.position,F);f.normalize(L,L);const M=yt.fromAxisAngle(L,I,pqe),U=ne.fromQuaternion(M,mqe);ne.multiplyByVector(U,o.direction,o.direction),ne.multiplyByVector(U,o.up,o.up),f.cross(o.direction,o.up,o.right),f.cross(o.right,o.direction,o.up),o._setTransform(P)}}(e,t,n)}const qQ=new G,YQ=new fi,XQ=new f;function bqe(e,t,n){c(n.distance)&&(n=n.distance);const i=e._scene,o=i.camera,r=i.canvas,s=e._cameraUnderground;let a;s?a=t:(a=qQ,a.x=r.clientWidth/2,a.y=r.clientHeight/2);const l=o.getPickRay(a,YQ),u=l.origin,d=l.direction;let m,_;if(o.position.z<e._minimumPickingTerrainHeight&&(m=zh(e,a,XQ)),c(m)&&(_=f.distance(u,m)),s){const p=kQ(e,l);_=c(_)?Math.min(_,p):p}if(!c(_)){const p=f.UNIT_X;_=-f.dot(p,u)/f.dot(p,d)}i3(e,t,n,e._zoomFactor,_)}const Tqe=new fi,xqe=new Hn(f.UNIT_X,0),Cqe=new f,Eqe=new f;function a3(e,t,n){const i=e._scene,o=i.camera,r=o.getPickRay(t.endPosition,Tqe);let s=f.clone(o.direction,Eqe);i.mode===ce.COLUMBUS_VIEW&&f.fromElements(s.z,s.x,s.y,s);const a=Hn.fromPointNormal(n,s,xqe),l=rr.rayPlane(r,a,Cqe);c(l)&&(s=f.subtract(n,l,s),i.mode===ce.COLUMBUS_VIEW&&f.fromElements(s.y,s.z,s.x,s),f.add(o.position,s,o.position))}const ZQ=new f,$Q=new Se,c3=new f,l3=new ge,wqe=new f,Sqe=new f,vqe=new f;function Dqe(e,t,n){const o=e._scene.camera,r=e._cameraUnderground;let a,l,s=e._ellipsoid;if(!k.equals(o.transform,k.IDENTITY))return void dl(e,0,n);const u=s.geodeticSurfaceNormal(o.position,wqe);if(G.equals(t,e._rotateMousePosition)){if(e._looking)fl(e,0,n,u);else if(e._rotating)dl(e,0,n);else if(e._strafing)VQ(e,n);else{if(f.magnitude(o.position)<f.magnitude(e._rotateStartPosition))return;a=f.magnitude(e._rotateStartPosition),l=c3,l.x=l.y=l.z=a,s=ge.fromCartesian3(l,l3),d3(e,0,n,s)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;const d=s.cartesianToCartographic(o.positionWC,$Q).height;if(c(e._globe)&&d<e._minimumPickingTerrainHeight){const m=zh(e,n.startPosition,vqe);if(c(m)){let _=!1;const p=o.getPickRay(n.startPosition,BQ);if(r)_=!0,zQ(e,p,m,m);else{const y=s.geodeticSurfaceNormal(m,Sqe);_=Math.abs(f.dot(p.direction,y))<.05||f.magnitude(o.position)<f.magnitude(m)}_?(G.clone(t,e._strafeEndMousePosition),f.clone(m,e._strafeStartPosition),e._strafing=!0,a3(e,n,e._strafeStartPosition)):(a=f.magnitude(m),l=c3,l.x=l.y=l.z=a,s=ge.fromCartesian3(l,l3),d3(e,0,n,s),f.clone(m,e._rotateStartPosition))}else e._looking=!0,fl(e,0,n,u)}else c(o.pickEllipsoid(n.startPosition,e._ellipsoid,ZQ))?(d3(e,0,n,e._ellipsoid),f.clone(ZQ,e._rotateStartPosition)):d>e._minimumTrackBallHeight?(e._rotating=!0,dl(e,0,n)):(e._looking=!0,fl(e,0,n,u));G.clone(t,e._rotateMousePosition)}function dl(e,t,n,i,o,r){o=g(o,!1),r=g(r,!1);const s=e._scene,a=s.camera,l=s.canvas,u=a.constrainedAxis;c(i)&&(a.constrainedAxis=i);const d=f.magnitude(a.position);let h=e._rotateFactor*(d-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=e._minimumRotateRate);let m=(n.startPosition.x-n.endPosition.x)/l.clientWidth,_=(n.startPosition.y-n.endPosition.y)/l.clientHeight;m=Math.min(m,e.maximumMovementRatio),_=Math.min(_,e.maximumMovementRatio);const p=h*m*Math.PI*2,y=h*_*Math.PI;o||a.rotateRight(p),r||a.rotateUp(y),a.constrainedAxis=u}const u3=fe.clone(fe.UNIT_W),KQ=fe.clone(fe.UNIT_W),wI=new f,Eb=new f,SI=new f,QQ=new f,Iqe=new G,Pqe=new G,Oqe=new G,Lqe=new G,Rqe=new fi;function d3(e,t,n,i){const o=e._scene,r=o.camera,s=G.clone(n.startPosition,Iqe),a=G.clone(n.endPosition,Pqe),l=i.cartesianToCartographic(r.positionWC,$Q).height;let u,d;if(!n.inertiaEnabled&&l<e._minimumPickingTerrainHeight&&(u=f.clone(e._panLastWorldPosition,u3),!c(e._globe)&&!G.equalsEpsilon(s,e._panLastMousePosition)&&(u=zh(e,s,u3)),!c(e._globe)&&c(u))){const h=f.subtract(u,r.positionWC,Eb),m=f.multiplyByScalar(r.directionWC,f.dot(r.directionWC,h),Eb),_=f.magnitude(m),p=r.frustum.getPixelDimensions(o.drawingBufferWidth,o.drawingBufferHeight,_,o.pixelRatio,Lqe),y=G.subtract(a,s,Oqe),A=f.multiplyByScalar(r.rightWC,y.x*p.x,Eb),x=f.normalize(r.positionWC,LQ),C=r.getPickRay(a,Rqe).direction,w=f.subtract(C,f.projectVector(C,r.rightWC,SI),SI),v=f.angleBetween(w,r.directionWC);let D=1;c(r.frustum.fov)&&(D=Math.max(Math.tan(v),.1));let P=Math.abs(f.dot(r.directionWC,x));const N=-y.y*p.y*2/Math.sqrt(D)*(1-P),R=f.multiplyByScalar(C,N,SI);P=Math.abs(f.dot(r.upWC,x));const B=f.multiplyByScalar(r.upWC,-y.y*(1-P)*p.y,QQ);d=f.add(u,A,KQ),d=f.add(d,R,d),d=f.add(d,B,d),f.clone(d,e._panLastWorldPosition),G.clone(a,e._panLastMousePosition)}if((!c(u)||!c(d))&&(u=r.pickEllipsoid(s,i,u3),d=r.pickEllipsoid(a,i,KQ)),!c(u)||!c(d))return e._rotating=!0,void dl(e,0,n);if(u=r.worldToCameraCoordinates(u,u),d=r.worldToCameraCoordinates(d,d),c(r.constrainedAxis)){const h=r.constrainedAxis,m=f.mostOrthogonalAxis(h,wI);f.cross(m,h,m),f.normalize(m,m);const _=f.cross(h,m,Eb),p=f.magnitude(u),y=f.dot(h,u),A=Math.acos(y/p),x=f.multiplyByScalar(h,y,SI);f.subtract(u,x,x),f.normalize(x,x);const C=f.magnitude(d),w=f.dot(h,d),v=Math.acos(w/C),D=f.multiplyByScalar(h,w,QQ);f.subtract(d,D,D),f.normalize(D,D);let P=Math.acos(f.dot(x,m));f.dot(x,_)<0&&(P=O.TWO_PI-P);let N=Math.acos(f.dot(D,m));f.dot(D,_)<0&&(N=O.TWO_PI-N);const R=P-N;let B;B=f.equalsEpsilon(h,r.position,O.EPSILON2)?r.right:f.cross(h,r.position,wI);const F=f.cross(h,B,wI),S=f.dot(F,f.subtract(u,h,Eb)),I=f.dot(F,f.subtract(d,h,Eb));let L;L=S>0&&I>0?v-A:S>0&&I<=0?f.dot(r.position,h)>0?-A-v:A+v:A-v,r.rotateRight(R),r.rotateUp(L)}else{f.normalize(u,u),f.normalize(d,d);const h=f.dot(u,d),m=f.cross(u,d,wI);if(h<1&&!f.equalsEpsilon(m,f.ZERO,O.EPSILON14)){const _=Math.acos(h);r.rotate(m,_)}}}const Nqe=new f,Mqe=new Se;let JQ=0;function eJ(e,t,n){c(n.distance)&&(n=n.distance);const i=n.inertiaEnabled,o=e._ellipsoid,r=e._scene,s=r.camera,a=r.canvas,l=e._cameraUnderground;let u;l?u=t:(u=qQ,u.x=a.clientWidth/2,u.y=a.clientHeight/2);const d=s.getPickRay(u,YQ);let h;const m=o.cartesianToCartographic(s.position,Mqe).height,_=Math.abs(JQ)<e.minimumPickingTerrainDistanceWithInertia;let y;if((i?_:m<e._minimumPickingTerrainHeight)&&(h=zh(e,u,XQ)),c(h)&&(y=f.distance(d.origin,h),JQ=y),l){const x=kQ(e,d);y=c(y)?Math.min(y,x):x}c(y)||(y=m);const A=f.normalize(s.position,Nqe);i3(e,t,n,e._zoomFactor,y,f.dot(A,s.direction))}const tJ=new G,vI=new fi,NC=new f,Fqe=new f,nJ=new k,Bqe=new k,iJ=new k,kqe=new yt,Uqe=new ne,f3=new Se,h3=new f;function zqe(e,t,n){const o=e._scene.camera;if(!k.equals(o.transform,k.IDENTITY))return;if(c(n.angleAndHeight)&&(n=n.angleAndHeight),G.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){const a=e._ellipsoid.geodeticSurfaceNormal(o.position,h3);return void fl(e,0,n,a)}const s=e._ellipsoid.cartesianToCartographic(o.position,f3);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,function Hqe(e,t,n){const i=e._ellipsoid,o=e._scene,r=o.camera,s=.25*e.minimumZoomDistance,a=i.cartesianToCartographic(r.positionWC,Vqe).height;if(a-s-1<O.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;const l=o.canvas,u=tJ;u.x=l.clientWidth/2,u.y=l.clientHeight/2;const d=r.getPickRay(u,vI);let h;const m=rr.rayEllipsoid(d,i);if(c(m))h=fi.getPoint(d,m.start,NC);else{if(!(a>e._minimumTrackBallHeight)){e._looking=!0;const C=e._ellipsoid.geodeticSurfaceNormal(r.position,h3);return fl(e,0,n,C),void G.clone(t,e._tiltCenterMousePosition)}{const C=rr.grazingAltitudeLocation(d,i);if(!c(C))return;const w=i.cartesianToCartographic(C,f3);w.height=0,h=i.cartographicToCartesian(w,NC)}}const _=Rn.eastNorthUpToFixedFrame(h,i,nJ),p=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=ge.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;const A=k.clone(r.transform,iJ);r._setTransform(_),dl(e,0,n,f.UNIT_Z),r._setTransform(A),e._globe=p,e._ellipsoid=y;const x=y.maximumRadius;e._rotateFactor=1/x,e._rotateRateRangeAdjustment=x}(e,t,n)):function Gqe(e,t,n){const i=e._ellipsoid,o=e._scene,r=o.camera,s=e._cameraUnderground;let a,l,u;if(G.equals(t,e._tiltCenterMousePosition))a=f.clone(e._tiltCenter,NC);else{if(a=zh(e,t,NC),!c(a)){if(l=r.getPickRay(t,vI),u=rr.rayEllipsoid(l,i),!c(u)){if(i.cartesianToCartographic(r.position,f3).height<=e._minimumTrackBallHeight){e._looking=!0;const I=e._ellipsoid.geodeticSurfaceNormal(r.position,h3);fl(e,0,n,I),G.clone(t,e._tiltCenterMousePosition)}return}a=fi.getPoint(l,u.start,NC)}s&&(c(l)||(l=r.getPickRay(t,vI)),UQ(e,l,a,a)),G.clone(t,e._tiltCenterMousePosition),f.clone(a,e._tiltCenter)}const h=tJ;h.x=o.canvas.clientWidth/2,h.y=e._tiltCenterMousePosition.y,l=r.getPickRay(h,vI);const m=f.magnitude(a),_=f.fromElements(m,m,m,c3),p=ge.fromCartesian3(_,l3);if(u=rr.rayEllipsoid(l,p),!c(u))return;const y=f.magnitude(l.origin)>m?u.start:u.stop,A=fi.getPoint(l,y,Fqe),x=Rn.eastNorthUpToFixedFrame(a,i,nJ),C=Rn.eastNorthUpToFixedFrame(A,p,Bqe),w=e._globe,v=e._ellipsoid;e._globe=void 0,e._ellipsoid=ge.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let D=f.UNIT_Z;const P=k.clone(r.transform,iJ);r._setTransform(C);const N=f.cross(A,r.positionWC,EI);if(f.dot(r.rightWC,N)<0){const S=n.startPosition.y-n.endPosition.y;(s&&S<0||!s&&S>0)&&(D=void 0);const I=r.constrainedAxis;r.constrainedAxis=void 0,dl(e,0,n,D,!0,!1),r.constrainedAxis=I}else dl(e,0,n,D,!0,!1);if(r._setTransform(x),dl(e,0,n,D,!1,!0),c(r.constrainedAxis)){const S=f.cross(r.direction,r.constrainedAxis,EI);f.equalsEpsilon(S,f.ZERO,O.EPSILON6)||(f.dot(S,r.right)<0&&f.negate(S,S),f.cross(S,r.direction,r.up),f.cross(r.direction,r.up,r.right),f.normalize(r.up,r.up),f.normalize(r.right,r.right))}r._setTransform(P),e._globe=w,e._ellipsoid=v;const B=v.maximumRadius;e._rotateFactor=1/B,e._rotateRateRangeAdjustment=B;const F=f.clone(r.positionWC,EI);if(e.enableCollisionDetection&&p3(e),!f.equals(r.positionWC,F)){r._setTransform(C),r.worldToCameraCoordinatesPoint(F,F);const S=f.magnitudeSquared(F);f.magnitudeSquared(r.position)>S&&(f.normalize(r.position,r.position),f.multiplyByScalar(r.position,Math.sqrt(S),r.position));const I=f.angleBetween(F,r.position),L=f.cross(F,r.position,F);f.normalize(L,L);const M=yt.fromAxisAngle(L,I,kqe),U=ne.fromQuaternion(M,Uqe);ne.multiplyByVector(U,r.direction,r.direction),ne.multiplyByVector(U,r.up,r.up),f.cross(r.direction,r.up,r.right),f.cross(r.right,r.direction,r.up),r._setTransform(P)}}(e,t,n)}const Vqe=new Se,jqe=new G,Wqe=new G,oJ=new fi,rJ=new fi,qqe=new f,Yqe=new f;function fl(e,t,n,i){const r=e._scene.camera,s=jqe;s.x=n.startPosition.x,s.y=0;const a=Wqe;a.x=n.endPosition.x,a.y=0;let h,m,l=r.getPickRay(s,oJ),u=r.getPickRay(a,rJ),d=0;r.frustum instanceof $n?(h=l.origin,m=u.origin,f.add(r.direction,h,h),f.add(r.direction,m,m),f.subtract(h,r.position,h),f.subtract(m,r.position,m),f.normalize(h,h),f.normalize(m,m)):(h=l.direction,m=u.direction);let _=f.dot(h,m);_<1&&(d=Math.acos(_)),d=n.startPosition.x>n.endPosition.x?-d:d;const p=e._horizontalRotationAxis;if(c(i)?r.look(i,-d):c(p)?r.look(p,-d):r.lookLeft(d),s.x=0,s.y=n.startPosition.y,a.x=0,a.y=n.endPosition.y,l=r.getPickRay(s,oJ),u=r.getPickRay(a,rJ),d=0,r.frustum instanceof $n?(h=l.origin,m=u.origin,f.add(r.direction,h,h),f.add(r.direction,m,m),f.subtract(h,r.position,h),f.subtract(m,r.position,m),f.normalize(h,h),f.normalize(m,m)):(h=l.direction,m=u.direction),_=f.dot(h,m),_<1&&(d=Math.acos(_)),d=n.startPosition.y>n.endPosition.y?-d:d,i=g(i,p),c(i)){const y=r.direction,A=f.negate(i,qqe),x=f.equalsEpsilon(y,i,O.EPSILON2),C=f.equalsEpsilon(y,A,O.EPSILON2);if(x||C)(x&&d<0||C&&d>0)&&r.look(r.right,-d);else{_=f.dot(y,i);let w=O.acosClamped(_);d>0&&d>w&&(d=w-O.EPSILON4),_=f.dot(y,A),w=O.acosClamped(_),d<0&&-d>w&&(d=-w+O.EPSILON4);const v=f.cross(i,y,Yqe);r.look(v,d)}}else r.lookUp(d)}const Zqe=new k,$qe=new Se;function p3(e){e._adjustedHeightForTerrain=!0;const t=e._scene,n=t.mode,i=t.globe;if(!c(i)||n===ce.SCENE2D||n===ce.MORPHING)return;const o=t.camera,r=i.ellipsoid,s=t.mapProjection;let a,l;k.equals(o.transform,k.IDENTITY)||(a=k.clone(o.transform,Zqe),l=f.magnitude(o.position),o._setTransform(k.IDENTITY));const u=$qe;n===ce.SCENE3D?r.cartesianToCartographic(o.position,u):s.unproject(o.position,u);let d=!1;if(u.height<e._minimumCollisionTerrainHeight){const h=e._scene.globeHeight;if(c(h)){const m=h+e.minimumZoomDistance;u.height<m&&(u.height=m,n===ce.SCENE3D?r.cartographicToCartesian(u,o.position):s.project(u,o.position),d=!0)}}c(a)&&(o._setTransform(a),d&&(f.normalize(o.position,o.position),f.negate(o.position,o.direction),f.multiplyByScalar(o.position,Math.max(l,e.minimumZoomDistance),o.position),f.normalize(o.direction,o.direction),f.cross(o.direction,o.up,o.right),f.cross(o.right,o.direction,o.up)))}RC.prototype.onMap=function(){const e=this._scene,n=e.camera;return e.mode!==ce.COLUMBUS_VIEW||Math.abs(n.position.x)-this._maxCoord.x<0&&Math.abs(n.position.y)-this._maxCoord.y<0};const Kqe=new f,Qqe=new f;RC.prototype.update=function(){const e=this._scene,t=e.camera,n=e.globe,i=e.mode;k.equals(t.transform,k.IDENTITY)?(this._globe=n,this._ellipsoid=c(this._globe)?this._globe.ellipsoid:e.mapProjection.ellipsoid):(this._globe=void 0,this._ellipsoid=ge.UNIT_SPHERE);const o=c(this._globe)?this._globe.terrainExaggeration:1,r=c(this._globe)?this._globe.terrainExaggerationRelativeHeight:0;this._minimumCollisionTerrainHeight=hp.getHeight(this.minimumCollisionTerrainHeight,o,r),this._minimumPickingTerrainHeight=hp.getHeight(this.minimumPickingTerrainHeight,o,r),this._minimumTrackBallHeight=hp.getHeight(this.minimumTrackBallHeight,o,r),this._cameraUnderground=e.cameraUnderground&&c(this._globe);const s=this._ellipsoid.maximumRadius;this._rotateFactor=1/s,this._rotateRateRangeAdjustment=s,this._adjustedHeightForTerrain=!1;const a=f.clone(t.positionWC,Kqe),l=f.clone(t.directionWC,Qqe);i===ce.SCENE2D?function $We(e){const t=e._scene.mapMode2D===bm.ROTATE;k.equals(k.IDENTITY,e._scene.camera.transform)?(nc(e,e.enableTranslate,e.translateEventTypes,qWe,e.inertiaTranslate,"_lastInertiaTranslateMovement"),nc(e,e.enableZoom,e.zoomEventTypes,MQ,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&nc(e,e.enableRotate,e.tiltEventTypes,FQ,e.inertiaSpin,"_lastInertiaTiltMovement")):(nc(e,e.enableZoom,e.zoomEventTypes,MQ,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&nc(e,e.enableRotate,e.translateEventTypes,FQ,e.inertiaSpin,"_lastInertiaSpinMovement"))}(this):i===ce.COLUMBUS_VIEW?(this._horizontalRotationAxis=f.UNIT_Z,function Aqe(e){const n=e._scene.camera;if(k.equals(k.IDENTITY,n.transform)){const i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),nc(e,e.enableTilt,e.tiltEventTypes,_qe,e.inertiaSpin,"_lastInertiaTiltMovement"),nc(e,e.enableTranslate,e.translateEventTypes,lqe,e.inertiaTranslate,"_lastInertiaTranslateMovement"),nc(e,e.enableZoom,e.zoomEventTypes,bqe,e.inertiaZoom,"_lastInertiaZoomMovement"),nc(e,e.enableLook,e.lookEventTypes,fl),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){const o=n.createCorrectPositionTween(e.bounceAnimationTime);c(o)&&(e._tween=i.add(o))}i.update()}else nc(e,e.enableRotate,e.rotateEventTypes,dl,e.inertiaSpin,"_lastInertiaSpinMovement"),nc(e,e.enableZoom,e.zoomEventTypes,eJ,e.inertiaZoom,"_lastInertiaZoomMovement")}(this)):i===ce.SCENE3D&&(this._horizontalRotationAxis=void 0,function Xqe(e){nc(e,e.enableRotate,e.rotateEventTypes,Dqe,e.inertiaSpin,"_lastInertiaSpinMovement"),nc(e,e.enableZoom,e.zoomEventTypes,eJ,e.inertiaZoom,"_lastInertiaZoomMovement"),nc(e,e.enableTilt,e.tiltEventTypes,zqe,e.inertiaSpin,"_lastInertiaTiltMovement"),nc(e,e.enableLook,e.lookEventTypes,fl)}(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain&&(!f.equals(a,t.positionWC)||!f.equals(l,t.directionWC))&&p3(this),this._aggregator.reset()},RC.prototype.isDestroyed=function(){return!1},RC.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),Ye(this)};const Jqe=RC;function Vh(){this._sceneFramebuffer=new TK;const e=.125,t=new Array(6);t[0]=new Go({fragmentShader:Ig,textureScale:e,forcePowerOfTwo:!0,sampleMode:1});const n=t[1]=new Go({fragmentShader:'uniform sampler2D colorTexture;\n\nuniform float avgLuminance;\nuniform float threshold;\nuniform float offset;\n\nin vec2 v_textureCoordinates;\n\nfloat key(float avg)\n{\n float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\n return max(0.0, guess) + 0.1;\n}\n\n// See section 9. "The bright-pass filter" of Realtime HDR Rendering\n// http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf\n\nvoid main()\n{\n vec4 color = texture(colorTexture, v_textureCoordinates);\n vec3 xyz = czm_RGBToXYZ(color.rgb);\n float luminance = xyz.r;\n\n float scaledLum = key(avgLuminance) * luminance / avgLuminance;\n float brightLum = max(scaledLum - threshold, 0.0);\n float brightness = brightLum / (offset + brightLum);\n\n xyz.r = brightness;\n out_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n',uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new G,t[2]=new Go({fragmentShader:kB,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 Go({fragmentShader:kB,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 Go({fragmentShader:Ig,sampleMode:1}),this._uCenter=new G,this._uRadius=void 0,t[5]=new Go({fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D colorTexture2;\n\nuniform vec2 center;\nuniform float radius;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color0 = texture(colorTexture, v_textureCoordinates);\n vec4 color1 = texture(colorTexture2, v_textureCoordinates);\n\n float x = length(gl_FragCoord.xy - center) / radius;\n float t = smoothstep(0.5, 0.8, x);\n out_FragColor = mix(color0 + color1, color1, t);\n}\n",uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new df({stages:t});const o=new KK(this),r=t.length;for(let s=0;s<r;++s)t[s]._textureCache=o;this._textureCache=o,this.length=t.length}Vh.prototype.get=function(e){return this._stages.get(e)},Vh.prototype.getStageByName=function(e){const t=this._stages.length;for(let n=0;n<t;++n){const i=this._stages.get(n);if(i.name===e)return i}};const n7e=new fe,sJ=new G,i7e=new G,aJ=new k;Vh.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)},Vh.prototype.update=function(e){const t=e.context,n=e.viewport,i=this._sceneFramebuffer;i.update(t,n);const o=i.framebuffer;return this._textureCache.update(t),this._stages.update(t,!1),function o7e(e,t,n){const i=t.uniformState,o=i.sunPositionWC,r=i.view,s=i.viewProjection,a=i.projection;let l=k.computeViewportTransformation(n,0,1,aJ);const u=k.multiplyByPoint(r,o,n7e);let d=Rn.pointToGLWindowCoordinates(s,l,o,sJ);u.x+=O.SOLAR_RADIUS;const h=Rn.pointToGLWindowCoordinates(a,l,u,u),m=30*G.magnitude(G.subtract(h,d,h))*2,_=i7e;_.x=m,_.y=m,e._uCenter=G.clone(d,e._uCenter),e._uRadius=.15*Math.max(_.x,_.y);const p=t.drawingBufferWidth,y=t.drawingBufferHeight,A=e._stages,x=A.get(0),C=x.outputTexture.width,w=x.outputTexture.height,v=new Vt;v.width=C,v.height=w,l=k.computeViewportTransformation(v,0,1,aJ),d=Rn.pointToGLWindowCoordinates(s,l,o,sJ),_.x*=C/p,_.y*=w/y;const D=x.scissorRectangle;D.x=Math.max(d.x-.5*_.x,0),D.y=Math.max(d.y-.5*_.y,0),D.width=Math.min(_.x,p),D.height=Math.min(_.y,y);for(let P=1;P<4;++P)Vt.clone(D,A.get(P).scissorRectangle)}(this,t,n),o},Vh.prototype.execute=function(e){const 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)},Vh.prototype.copy=function(e,t){if(!c(this._copyColorCommand)){const n=this;this._copyColorCommand=e.createViewportQuadCommand(Ig,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)},Vh.prototype.isDestroyed=function(){return!1},Vh.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),Ye(this)};const r7e=Vh;function cJ(){this._cachedShowFrustumsShaders={}}const MC=new X,l7e=new Zt;cJ.prototype.executeDebugShowFrustumsCommand=function(e,t,n){const i=t.shaderProgram.id;let o=this._cachedShowFrustumsShaders[i];c(o)||(o=function a7e(e,t){const n=e.context,i=t,o=i.fragmentShaderSource.clone(),r=[];o.sources=o.sources.map(function(d){d=Et.replaceMain(d,"czm_Debug_main");const h=/out_FragData_(\d+)/g;let m;for(;null!==(m=h.exec(d));)-1===r.indexOf(m[1])&&r.push(m[1]);return d});const s=r.length;let l,a="";if(a+="uniform vec3 debugShowCommandsColor;\n",a+="uniform vec3 debugShowFrustumsColor;\n",a+="void main() \n{ \n czm_Debug_main(); \n",s>0)for(l=0;l<s;++l)a+=` out_FragData_${r[l]}.rgb *= debugShowCommandsColor;\n`,a+=` out_FragData_${r[l]}.rgb *= debugShowFrustumsColor;\n`;else a+=" out_FragColor.rgb *= debugShowCommandsColor;\n",a+=" out_FragColor.rgb *= debugShowFrustumsColor;\n";a+="}",o.sources.push(a);const u=function s7e(e){const t={},n=e.vertexAttributes;for(const i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}(i);return mi.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:o,attributeLocations:u})}(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=o);const r=Zt.shallowClone(t,l7e);r.shaderProgram=o,r.uniformMap=function c7e(e,t){let n;return n=c(t.uniformMap)?t.uniformMap:{},c(n.debugShowCommandsColor)||c(n.debugShowFrustumsColor)||(n.debugShowCommandsColor=function(){return e.debugShowCommands?(c(t._debugColor)||(t._debugColor=X.fromRandom()),t._debugColor):X.WHITE},n.debugShowFrustumsColor=function(){return e.debugShowFrustums?(MC.red=1&t.debugOverlappingFrustums?1:0,MC.green=2&t.debugOverlappingFrustums?1:0,MC.blue=4&t.debugOverlappingFrustums?1:0,MC.alpha=1,MC):X.WHITE}),n}(e,t),r.execute(e.context,n)};const u7e=cJ,DI=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function ki(e){const t=(e=g(e,g.EMPTY_OBJECT)).canvas;let n=e.creditContainer,i=e.creditViewport;const o=zt(e.contextOptions);if(!c(t))throw new E("options and options.canvas are required.");const r=c(n),s=new iHe(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)),c(i)||(i=t.parentNode),this._id=kr(),this._jobScheduler=new IGe,this._frameState=new Q5e(s,new i5e(n," \u2022 ",i),this._jobScheduler),this._frameState.scene3DOnly=g(e.scene3DOnly,!1),this._removeCreditContainer=!r,this._creditContainer=n,this._canvas=t,this._context=s,this._computeEngine=new s4e(s),this._globe=void 0,this._globeTranslucencyState=new CGe,this._primitives=new Og,this._groundPrimitives=new Og,this._globeHeight=void 0,this._cameraUnderground=!1,this._logDepthBuffer=s.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new PQ,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=g(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new R5e(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new cr({color:new X,stencil:0,owner:this}),this._depthClearCommand=new cr({depth:1,owner:this}),this._stencilClearCommand=new cr({stencil:0}),this._classificationStencilClearCommand=new cr({stencil:0,renderState:Pt.fromCache({stencilMask:Tn.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new gWe(this),this._preUpdate=new Ue,this._postUpdate=new Ue,this._renderError=new Ue,this._preRender=new Ue,this._postRender=new Ue,this._minimumDisableDepthTestDistance=0,this._debugInspector=new u7e,this._msaaSamples=g(e.msaaSamples,1),this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new Ue,this.morphComplete=new Ue,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=X.clone(X.BLACK),this._mode=ce.SCENE3D,this._mapProjection=c(e.mapProjection)?e.mapProjection:new Yr,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,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.fog=new $5e,this._shadowMapCamera=new pr(this),this.shadowMap=new dI({context:s,lightCamera:this._shadowMapCamera,enabled:g(e.shadows,!1)}),this.invertClassification=!1,this.invertClassificationColor=X.clone(X.WHITE),this._actualInvertClassificationColor=X.clone(this._invertClassificationColor),this._invertClassification=new _K,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new Aje,this._brdfLutGenerator=new sHe,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new Jqe(this),this._cameraUnderground=!1,this._mapMode2D=g(e.mapMode2D,bm.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=g(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=g(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=Of.requestCompletedEvent.addEventListener(DI(this)),this._removeTaskProcessorListenerCallback=pa.taskCompletedEvent.addEventListener(DI(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;const a=new Vt(0,0,s.drawingBufferWidth,s.drawingBufferHeight),l=new pr(this);this._logDepthBuffer&&(l.frustum.near=.1,l.frustum.far=1e10),this.preloadFlightCamera=new pr(this),this.preloadFlightCullingVolume=void 0,this._picking=new O6e(this),this._defaultView=new MK(this,l,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 qD,dJ(this,0,se.now()),this.updateFrameState(),this.initializeFrame()}function lJ(e,t,n){const i=e._frameState,o=e._context,r=e._view.oit,s=i.shadowState.lightShadowMaps,a=i.shadowState.lightShadowsEnabled;let l=t.derivedCommands;c(t.pickId)&&(l.picking=xC.createPickDerivedCommand(e,t,o,l.picking)),t.pickOnly||(l.depth=xC.createDepthOnlyDerivedCommand(e,t,o,l.depth)),l.originalCommand=t,e._hdr&&(l.hdr=xC.createHdrCommand(t,o,l.hdr),l=(t=l.hdr.command).derivedCommands),a&&t.receiveShadows&&(l.shadows=dI.createReceiveDerivedCommand(s,t,n,o,l.shadows)),t.pass===ze.TRANSLUCENT&&c(r)&&r.isSupported()&&(a&&t.receiveShadows?(l.oit=c(l.oit)?l.oit:{},l.oit.shadows=r.createDerivedCommands(l.shadows.receiveCommand,o,l.oit.shadows)):l.oit=r.createDerivedCommands(t,o,l.oit))}Object.defineProperties(ki.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 mn.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return mn.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 qA.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,function d7e(e,t){for(let i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;const n=[];c(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(DI(e))),n.push(t.terrainProviderChanged.addEventListener(DI(e)))),e._removeGlobeCallbacks=n}(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(c(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(c(this.globe))return this.globe.terrainProvider},set:function(e){this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),c(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(c(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){if(this.scene3DOnly&&e!==ce.SCENE3D)throw new E("Only SceneMode.SCENE3D is valid when scene3DOnly is true.");if(e===ce.SCENE2D)this.morphTo2D(0);else if(e===ce.SCENE3D)this.morphTo3D(0);else{if(e!==ce.COLUMBUS_VIEW)throw new E("value must be a valid SceneMode enumeration.");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){if(this.camera.frustum instanceof $n)throw new E("VR is unsupported with an orthographic projection.");this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new pr(this),c(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new Y5e(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){if(!c(e)||e<0)throw new E("minimumDisableDepthTestDistance must be greater than or equal to 0.0.");this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){this._logDepthBuffer!==(e=this._context.fragmentDepth&&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){const t=this._context,n=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=n!==this._hdr,this._hdr=n}},highDynamicRangeSupported:{get:function(){const 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,mn.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}}}),ki.prototype.getCompressedTextureFormatSupported=function(e){const t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc"===e||"etc"===e)&&t.etc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1||("WEBGL_compressed_texture_astc"===e||"astc"===e)&&t.astc||("EXT_texture_compression_bptc"===e||"bc7"===e)&&t.bc7},ki.prototype.updateDerivedCommands=function(e){if(!c(e.derivedCommands))return;const t=this._frameState,n=this._context;let i=!1;const o=t.shadowState.lastDirtyTime;e.lastDirtyTime!==o&&(e.lastDirtyTime=o,e.dirty=!0,i=!0);const r=t.useLogDepth,s=this._hdr,a=e.derivedCommands,l=c(a.logDepth),u=c(a.hdr),d=c(a.originalCommand),h=r&&!l,_=!(r&&s||d);e.dirty=e.dirty||h||s&&!u||_,e.dirty&&(e.dirty=!1,t.shadowState.shadowsEnabled&&e.castShadows&&(a.shadows=dI.createCastDerivedCommand(t.shadowState.shadowMaps,e,i,n,a.shadows)),(l||h)&&(a.logDepth=xC.createLogDepthCommand(e,n,a.logDepth),lJ(this,a.logDepth.command,i)),(d||_)&&lJ(this,e,i))};const f7e=new wg({pass:Os.RENDER}),m3=new wg({pass:Os.PRELOAD}),_3=new wg({pass:Os.PRELOAD_FLIGHT}),h7e=new wg({pass:Os.REQUEST_RENDER_MODE_DEFER_CHECK}),uJ=new be;let g3;function dJ(e,t,n){const i=e._frameState;i.frameNumber=t,i.time=se.clone(n,i.time)}ki.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1},ki.prototype.updateFrameState=function(){const 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=function p7e(e){const t=e.globe;if(e._mode===ce.SCENE3D&&c(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent)return uJ.radius=t.ellipsoid.minimumRadius+e.frameState.minimumTerrainHeight,g3=$Ve.fromBoundingSphere(uJ,e.camera.positionWC,g3),g3}(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof $n||this.camera.frustum instanceof qa),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState,c(this.globe)&&(t.terrainExaggeration=this.globe.terrainExaggeration,t.terrainExaggerationRelativeHeight=this.globe.terrainExaggerationRelativeHeight),c(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=X.clone(this.invertClassificationColor,this._actualInvertClassificationColor),_K.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,t.maximumScreenSpaceError=c(this.globe)?this.globe.maximumScreenSpaceError:2,this.clearPasses(t.passes),t.tilesetPassState=void 0},ki.prototype.isVisible=function(e,t,n){return c(e)&&(!c(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==Qn.OUTSIDE&&(!c(n)||!e.occlude||!e.boundingVolume.isOccluded(n)))};let II=new k(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function na(e,t,n,i,o){const r=t._frameState;if(c(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof cr)return void e.execute(n,i);e.debugShowBoundingVolume&&c(e.boundingVolume)&&function m7e(e,t,n,i){const o=t._frameState,r=o.context,s=e.boundingVolume;c(t._debugVolume)&&t._debugVolume.destroy();let a,l=f.clone(s.center);if(o.mode!==ce.SCENE3D){l=k.multiplyByPoint(II,l,l);const m=o.mapProjection,_=m.unproject(l);l=m.ellipsoid.cartographicToCartesian(_)}if(c(s.radius)){const m=s.radius;a=uo.toWireframe(cC.createGeometry(new cC({radii:new f(m,m,m),vertexFormat:yi.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Xi({geometryInstances:new Un({geometry:a,modelMatrix:k.fromTranslation(l),attributes:{color:new ti(1,0,0,1)}}),appearance:new yi({flat:!0,translucent:!1}),asynchronous:!1})}else{const m=s.halfAxes;a=uo.toWireframe(Tg.createGeometry(Tg.fromDimensions({dimensions:new f(2,2,2),vertexFormat:yi.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Xi({geometryInstances:new Un({geometry:a,modelMatrix:k.fromRotationTranslation(m,l,new k),attributes:{color:new ti(1,0,0,1)}}),appearance:new yi({flat:!0,translucent:!1}),asynchronous:!1})}const u=o.commandList,d=o.commandList=[];let h;t._debugVolume.update(o),e=d[0],o.useLogDepth&&(e=xC.createLogDepthCommand(e,r).command),c(i)&&(h=n.framebuffer,n.framebuffer=i),e.execute(r,n),c(h)&&(n.framebuffer=h),o.commandList=u}(e,t,i,o),r.useLogDepth&&c(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);const s=r.passes;if(!s.pick&&!s.depth&&t._hdr&&c(e.derivedCommands)&&c(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),s.pick||s.depth){if(s.pick&&!s.depth&&c(e.derivedCommands.picking))return void(e=e.derivedCommands.picking.pickCommand).execute(n,i);if(c(e.derivedCommands.depth))return void(e=e.derivedCommands.depth.depthOnlyCommand).execute(n,i)}t.debugShowCommands||t.debugShowFrustums?t._debugInspector.executeDebugShowFrustumsCommand(t,e,i):r.shadowState.lightShadowsEnabled&&e.receiveShadows&&c(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(n,i):e.execute(n,i)}function FC(e,t,n,i){const o=t._frameState;let r=e.derivedCommands;c(r)&&(o.useLogDepth&&c(r.logDepth)&&(e=r.logDepth.command),r=e.derivedCommands,c(r.picking)?(e=r.picking.pickCommand).execute(n,i):c(r.depth)&&(e=r.depth.depthOnlyCommand).execute(n,i))}function fJ(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}function _7e(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+O.EPSILON12}function g7e(e,t,n,i,o){const r=e.context;eB(i,fJ,e.camera.positionWC),c(o)&&t(o.unclassifiedCommand,e,r,n);const s=i.length;for(let a=0;a<s;++a)t(i[a],e,r,n)}function y7e(e,t,n,i,o){const r=e.context;eB(i,_7e,e.camera.positionWC),c(o)&&t(o.unclassifiedCommand,e,r,n);const s=i.length;for(let a=0;a<s;++a)t(i[a],e,r,n)}function b7e(e,t,n,i){const o=e.context;eB(i,fJ,e.camera.positionWC);const r=i.length;for(let s=0;s<r;++s)t(i[s],e,o,n)}II=k.inverseTransformation(II,II);const A7e=new Po,T7e=new xg,x7e=new $n,C7e=new qa;function y3(e,t){const n=e.camera,i=e.context,o=e.frameState,r=i.uniformState;let s;r.updateCamera(n),s=c(n.frustum.fov)?n.frustum.clone(A7e):c(n.frustum.infiniteProjectionMatrix)?n.frustum.clone(T7e):c(n.frustum.width)?n.frustum.clone(x7e):n.frustum.clone(C7e),s.near=n.frustum.near,s.far=n.frustum.far,r.updateFrustum(s),r.updatePass(ze.ENVIRONMENT);const a=o.passes,l=a.pick,u=e._environmentState,d=e._view,h=u.renderTranslucentDepthForPick,m=u.useWebVR;if(!l){const I=u.skyBoxCommand;if(c(I)&&na(I,e,i,t),u.isSkyAtmosphereVisible&&na(u.skyAtmosphereCommand,e,i,t),u.isSunVisible&&(u.sunDrawCommand.execute(i,t),e.sunBloom&&!m)){let L;L=u.useGlobeDepthFramebuffer?d.globeDepth.framebuffer:u.usePostProcess?d.sceneFramebuffer.framebuffer:u.originalFramebuffer,e._sunPostProcess.execute(i),e._sunPostProcess.copy(i,L),t.framebuffer=L}u.isMoonVisible&&u.moonCommand.execute(i,t)}let _;u.useOIT?(c(e._executeOITFunction)||(e._executeOITFunction=function(I,L,M,U,z){d.globeDepth.prepareColorTextures(i),d.oit.executeCommands(I,L,M,U,z)}),_=e._executeOITFunction):_=a.render?g7e:y7e;const p=d.frustumCommandsList,y=p.length,A=u.clearGlobeDepth,x=u.useDepthPlane,C=e._globeTranslucencyState,w=C.translucent,v=e._view.globeTranslucencyFramebuffer,D=e._depthClearCommand,P=e._stencilClearCommand,N=e._classificationStencilClearCommand,R=e._depthPlane,B=u.usePostProcessSelected,F=n.position.z;let S;for(let I=0;I<y;++I){const L=y-I-1,M=p[L];e.mode===ce.SCENE2D?(n.position.z=F-M.near+1,s.far=Math.max(1,M.far-M.near),s.near=1,r.update(o),r.updateFrustum(s)):(s.near=0!==L?M.near*e.opaqueFrustumNearOffset:M.near,s.far=M.far,r.updateFrustum(s)),D.execute(i,t),i.stencilBuffer&&P.execute(i,t),r.updatePass(ze.GLOBE);let U=M.commands[ze.GLOBE],z=M.indices[ze.GLOBE];if(w)C.executeGlobeCommands(M,na,v,e,t);else for(S=0;S<z;++S)na(U[S],e,i,t);const j=d.globeDepth;if(c(j)&&u.useGlobeDepthFramebuffer&&j.executeCopyDepth(i,t),!u.renderTranslucentDepthForPick)if(r.updatePass(ze.TERRAIN_CLASSIFICATION),U=M.commands[ze.TERRAIN_CLASSIFICATION],z=M.indices[ze.TERRAIN_CLASSIFICATION],w)C.executeGlobeClassificationCommands(M,na,v,e,t);else for(S=0;S<z;++S)na(U[S],e,i,t);if(A&&(D.execute(i,t),x&&R.execute(i,t)),!u.useInvertClassification||l||u.renderTranslucentDepthForPick){for(r.updatePass(ze.CESIUM_3D_TILE),U=M.commands[ze.CESIUM_3D_TILE],z=M.indices[ze.CESIUM_3D_TILE],S=0;S<z;++S)na(U[S],e,i,t);if(z>0&&(c(j)&&u.useGlobeDepthFramebuffer&&(j.prepareColorTextures(i,A),j.executeUpdateDepth(i,t,A,j.depthStencilTexture)),!u.renderTranslucentDepthForPick))for(r.updatePass(ze.CESIUM_3D_TILE_CLASSIFICATION),U=M.commands[ze.CESIUM_3D_TILE_CLASSIFICATION],z=M.indices[ze.CESIUM_3D_TILE_CLASSIFICATION],S=0;S<z;++S)na(U[S],e,i,t)}else{e._invertClassification.clear(i,t);const $=t.framebuffer;for(t.framebuffer=e._invertClassification._fbo.framebuffer,r.updatePass(ze.CESIUM_3D_TILE),U=M.commands[ze.CESIUM_3D_TILE],z=M.indices[ze.CESIUM_3D_TILE],S=0;S<z;++S)na(U[S],e,i,t);for(c(j)&&u.useGlobeDepthFramebuffer&&(e._invertClassification.prepareTextures(i),j.executeUpdateDepth(i,t,A,e._invertClassification._fbo.getDepthStencilTexture())),r.updatePass(ze.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),U=M.commands[ze.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],z=M.indices[ze.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],S=0;S<z;++S)na(U[S],e,i,t);for(t.framebuffer=$,e._invertClassification.executeClassified(i,t),1===o.invertClassificationColor.alpha&&e._invertClassification.executeUnclassified(i,t),z>0&&i.stencilBuffer&&N.execute(i,t),r.updatePass(ze.CESIUM_3D_TILE_CLASSIFICATION),U=M.commands[ze.CESIUM_3D_TILE_CLASSIFICATION],z=M.indices[ze.CESIUM_3D_TILE_CLASSIFICATION],S=0;S<z;++S)na(U[S],e,i,t)}for(z>0&&i.stencilBuffer&&P.execute(i,t),r.updatePass(ze.VOXELS),U=M.commands[ze.VOXELS],z=M.indices[ze.VOXELS],U.length=z,b7e(e,na,t,U),r.updatePass(ze.OPAQUE),U=M.commands[ze.OPAQUE],z=M.indices[ze.OPAQUE],S=0;S<z;++S)na(U[S],e,i,t);let W;if(0!==L&&e.mode!==ce.SCENE2D&&(s.near=M.near,r.updateFrustum(s)),!l&&u.useInvertClassification&&o.invertClassificationColor.alpha<1&&(W=e._invertClassification),r.updatePass(ze.TRANSLUCENT),U=M.commands[ze.TRANSLUCENT],U.length=M.indices[ze.TRANSLUCENT],_(e,na,t,U,W),M.indices[ze.CESIUM_3D_TILE_CLASSIFICATION]>0&&d.translucentTileClassification.isSupported()&&(d.translucentTileClassification.executeTranslucentCommands(e,na,t,U,j.depthStencilTexture),d.translucentTileClassification.executeClassificationCommands(e,na,t,M)),i.depthTexture&&e.useDepthPicking&&(u.useGlobeDepthFramebuffer||h)){const $=j.depthStencilTexture,Z=e._picking.getPickDepth(e,L);Z.update(i,$),Z.executeCopyDepth(i,t)}if(l||!B)continue;const V=t.framebuffer;if(t.framebuffer=d.sceneFramebuffer.getIdFramebuffer(),s.near=0!==L?M.near*e.opaqueFrustumNearOffset:M.near,s.far=M.far,r.updateFrustum(s),r.updatePass(ze.GLOBE),U=M.commands[ze.GLOBE],z=M.indices[ze.GLOBE],w)C.executeGlobeCommands(M,FC,v,e,t);else for(S=0;S<z;++S)FC(U[S],e,i,t);for(A&&(D.framebuffer=t.framebuffer,D.execute(i,t),D.framebuffer=void 0),A&&x&&R.execute(i,t),r.updatePass(ze.CESIUM_3D_TILE),U=M.commands[ze.CESIUM_3D_TILE],z=M.indices[ze.CESIUM_3D_TILE],S=0;S<z;++S)FC(U[S],e,i,t);for(r.updatePass(ze.OPAQUE),U=M.commands[ze.OPAQUE],z=M.indices[ze.OPAQUE],S=0;S<z;++S)FC(U[S],e,i,t);for(r.updatePass(ze.TRANSLUCENT),U=M.commands[ze.TRANSLUCENT],z=M.indices[ze.TRANSLUCENT],S=0;S<z;++S)FC(U[S],e,i,t);t.framebuffer=V}}function hJ(e){e.context.uniformState.updatePass(ze.COMPUTE);const n=e._environmentState.sunComputeCommand;c(n)&&n.execute(e._computeEngine);const i=e._computeCommandList,o=i.length;for(let r=0;r<o;++r)i[r].execute(e._computeEngine)}function w7e(e,t,n){const i=n.shadowMapCullingVolume,o=n.isPointLight,r=n.passes,s=r.length,a=t.length;for(let l=0;l<a;++l){const u=t[l];if(e.updateDerivedCommands(u),u.castShadows&&(u.pass===ze.GLOBE||u.pass===ze.CESIUM_3D_TILE||u.pass===ze.OPAQUE||u.pass===ze.TRANSLUCENT)&&e.isVisible(u,i))if(o)for(let d=0;d<s;++d)r[d].commandList.push(u);else if(1===s)r[0].commandList.push(u);else{let d=!1;for(let h=s-1;h>=0;--h)if(e.isVisible(u,r[h].cullingVolume))r[h].commandList.push(u),d=!0;else if(d)break}}}function pJ(e){const t=e.frameState,n=t.shadowState.shadowMaps,i=n.length;if(!t.shadowState.shadowsEnabled)return;const o=e.context,r=o.uniformState;for(let s=0;s<i;++s){const a=n[s];if(a.outOfView)continue;const l=a.passes,u=l.length;for(let h=0;h<u;++h)l[h].commandList.length=0;w7e(e,e.frameState.commandList,a);for(let h=0;h<u;++h){const m=a.passes[h];r.updateCamera(m.camera),a.updatePass(o,h);const _=m.commandList.length;for(let p=0;p<_;++p){const y=m.commandList[p];r.updatePass(y.pass),na(y.derivedCommands.shadows.castCommands[s],e,o,m.passState)}}}}const S7e=new f;ki.prototype.updateAndExecuteCommands=function(e,t){const i=this._frameState.mode;this._environmentState.useWebVR?function v7e(e,t,n){const i=e._view,o=i.camera,s=e._environmentState.renderTranslucentDepthForPick;b3(e,t,n),_J(e),i.createPotentiallyVisibleSet(e),hJ(e),s||pJ(e);const a=t.viewport;a.x=0,a.y=0,a.width=.5*a.width;const l=pr.clone(o,e._cameraVR);l.frustum=o.frustum;const u=o.frustum.near,d=u*g(e.focalLength,5),h=g(e.eyeSeparation,d/30),m=f.multiplyByScalar(l.right,.5*h,S7e);o.frustum.aspectRatio=a.width/a.height;const _=.5*h*u/d;f.add(l.position,m,o.position),o.frustum.xOffset=_,y3(e,t),a.x=a.width,f.subtract(l.position,m,o.position),o.frustum.xOffset=-_,y3(e,t),pr.clone(l,o)}(this,e,t):i!==ce.SCENE2D||this._mapMode2D===bm.ROTATE?vm(!0,this,e,t):(b3(this,e,t),function F7e(e,t){const n=e.context,i=e.frameState,o=e.camera,r=t.viewport,s=Vt.clone(r,M7e);t.viewport=s;const l=I7e;e.mapProjection.project(D7e,l);const d=f.clone(o.position,P7e),h=k.clone(o.transform,L7e),m=o.frustum.clone();o._setTransform(k.IDENTITY);const _=k.computeViewportTransformation(s,0,1,O7e),p=o.frustum.projectionMatrix,y=o.positionWC.y,A=f.fromElements(O.sign(y)*l.x-y,0,-o.positionWC.x,R7e),x=Rn.pointToGLWindowCoordinates(p,_,A,N7e);x.x=Math.floor(x.x);const C=s.x,w=s.width;if(0===y||x.x<=C||x.x>=C+w)vm(!0,e,t);else if(Math.abs(C+.5*w-x.x)<1)s.width=x.x-s.x,o.position.x*=O.sign(o.position.x),o.frustum.right=0,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),vm(!0,e,t),s.x=x.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),vm(!1,e,t);else if(x.x>C+.5*w){s.width=x.x-C;const v=o.frustum.right;o.frustum.right=l.x-y,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),vm(!0,e,t),s.x=x.x,s.width=C+w-x.x,o.position.x=-o.position.x,o.frustum.left=-o.frustum.right,o.frustum.right=v-2*o.frustum.right,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),vm(!1,e,t)}else{s.x=x.x,s.width=C+w-x.x;const v=o.frustum.left;o.frustum.left=-l.x-y,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),vm(!0,e,t),s.x=C,s.width=x.x-C,o.position.x=-o.position.x,o.frustum.right=-o.frustum.left,o.frustum.left=v-2*o.frustum.left,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),vm(!1,e,t)}o._setTransform(h),f.clone(d,o.position),o.frustum=m.clone(),t.viewport=r}(this,e))};const D7e=new Se(Math.PI,O.PI_OVER_TWO),I7e=new f,P7e=new f,O7e=new k,L7e=new k,R7e=new f,N7e=new f,M7e=new Vt;function vm(e,t,n,i){const r=t._view,s=t._environmentState.renderTranslucentDepthForPick;e||(t.frameState.commandList.length=0),_J(t),r.createPotentiallyVisibleSet(t),e&&(c(i)&&b3(t,n,i),hJ(t),s||pJ(t)),y3(t,n)}const mJ=new Tu;function _J(e){const t=e._frameState;e._groundPrimitives.update(t),e._primitives.update(t),function B7e(e){const t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e._debugFrustumPlanes=e.debugShowFrustumPlanes?new yC({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),c(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}(e),function k7e(e){const t=e._frameState,n=t.shadowMaps,i=n.length,o=i>0&&!t.passes.pick&&e.mode===ce.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){const 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)}}}(e),e._globe&&e._globe.render(t)}function b3(e,t,n){const i=e._context,o=e._frameState,r=e._environmentState,s=e._view,l=e._frameState.passes.pick;c(s.globeDepth)&&(s.globeDepth.picking=l);const u=r.useWebVR;r.originalFramebuffer=t.framebuffer,c(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!u?e._sunPostProcess=new r7e:c(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!c(e.sun)&&c(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);const d=e._clearColorCommand;X.clone(n,d.color),d.execute(i,t);const h=r.useGlobeDepthFramebuffer=c(s.globeDepth);h&&(s.globeDepth.update(i,t,s.viewport,e.msaaSamples,e._hdr,r.clearGlobeDepth),s.globeDepth.clear(i,t,n));const m=s.oit,_=r.useOIT=!l&&c(m)&&m.isSupported();_&&(m.update(i,t,s.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),m.clear(i,t,n),r.useOIT=m.isSupported());const p=e.postProcessStages;let y=r.usePostProcess=!l&&(e._hdr||p.length>0||p.ambientOcclusion.enabled||p.fxaa.enabled||p.bloom.enabled);if(r.usePostProcessSelected=!1,y&&(s.sceneFramebuffer.update(i,s.viewport,e._hdr,e.msaaSamples),s.sceneFramebuffer.clear(i,t,n),p.update(i,o.useLogDepth,e._hdr),p.clear(i),y=r.usePostProcess=p.ready,r.usePostProcessSelected=y&&p.hasSelected),r.isSunVisible&&e.sunBloom&&!u?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(i,t,n)):h?t.framebuffer=s.globeDepth.framebuffer:y&&(t.framebuffer=s.sceneFramebuffer.framebuffer),c(t.framebuffer)&&d.execute(i,t),r.useInvertClassification=!l&&c(t.framebuffer)&&e.invertClassification){let x;if(1===e.frameState.invertClassificationColor.alpha&&r.useGlobeDepthFramebuffer&&(x=s.globeDepth.framebuffer),c(x)||i.depthTexture){if(e._invertClassification.previousFramebuffer=x,e._invertClassification.update(i,e.msaaSamples,s.globeDepth.colorFramebufferManager),e._invertClassification.clear(i,t),e.frameState.invertClassificationColor.alpha<1&&_){const C=e._invertClassification.unclassifiedCommand,w=C.derivedCommands;w.oit=m.createDerivedCommands(C,i,w.oit)}}else r.useInvertClassification=!1}e._globeTranslucencyState.translucent&&s.globeTranslucencyFramebuffer.updateAndClear(e._hdr,s.viewport,i,t)}function G7e(e){e._jobScheduler.resetBudgets();const t=e._frameState;e.primitives.prePassesUpdate(t),c(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function j7e(e){e.primitives.postPassesUpdate(e._frameState),Of.update()}ki.prototype.updateEnvironment=function(){const e=this._frameState,t=this._view,n=this._environmentState,o=e.passes.offscreen,r=this.skyAtmosphere,s=this.globe,a=this._globeTranslucencyState;if(!e.passes.render||this._mode!==ce.SCENE2D&&t.camera.frustum instanceof $n||!a.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{c(r)?(c(s)?(r.setDynamicAtmosphereColor(s.enableLighting&&s.dynamicAtmosphereLighting,s.dynamicAtmosphereLightingFromSun),n.isReadyForAtmosphere=n.isReadyForAtmosphere||!s.show||s._surface._tilesToRender.length>0):n.isReadyForAtmosphere=!0,n.skyAtmosphereCommand=r.update(e,s),c(n.skyAtmosphereCommand)&&this.updateDerivedCommands(n.skyAtmosphereCommand)):n.skyAtmosphereCommand=void 0,n.skyBoxCommand=c(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;const y=c(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;n.sunDrawCommand=c(y)?y.drawCommand:void 0,n.sunComputeCommand=c(y)?y.computeCommand:void 0,n.moonCommand=c(this.moon)?this.moon.update(e):void 0}const l=n.clearGlobeDepth=c(s)&&s.show&&(!s.depthTestAgainstTerrain||this.mode===ce.SCENE2D);(n.useDepthPlane=l&&this.mode===ce.SCENE3D&&a.useDepthPlane)&&this._depthPlane.update(e),n.renderTranslucentDepthForPick=!1,n.useWebVR=this._useWebVR&&this.mode!==ce.SCENE2D&&!o;const d=e.mode!==ce.SCENE3D||a.sunVisibleThroughGlobe?void 0:e.occluder;let h=e.cullingVolume;const m=mJ.planes;for(let y=0;y<5;++y)m[y]=h.planes[y];h=mJ,n.isSkyAtmosphereVisible=c(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(n.sunDrawCommand,h,d),n.isMoonVisible=this.isVisible(n.moonCommand,h,d);const _=this.specularEnvironmentMaps;let p=this._specularEnvironmentMapAtlas;!c(_)||c(p)&&p.url===_?!c(_)&&c(p)&&(p.destroy(),this._specularEnvironmentMapAtlas=void 0):(p=p&&p.destroy(),this._specularEnvironmentMapAtlas=new qA(_)),c(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e)},ki.prototype.resolveFramebuffers=function(e){const t=this._context,n=this._environmentState,i=this._view,o=i.globeDepth;c(o)&&o.prepareColorTextures(t);const r=n.useOIT,s=n.useGlobeDepthFramebuffer,a=n.usePostProcess,l=n.originalFramebuffer,u=s?o.colorFramebufferManager:void 0,d=i.sceneFramebuffer._colorFramebuffer,h=i.sceneFramebuffer.idFramebuffer;r&&(e.framebuffer=a?d.framebuffer:l,i.oit.execute(t,e));const m=i.translucentTileClassification;if(m.hasTranslucentDepth&&m.isSupported()&&m.execute(this,e),a){i.sceneFramebuffer.prepareColorTextures(t);let _=d;s&&!r&&(_=u);const p=this.postProcessStages,y=_.getColorTexture(0),A=h.getColorTexture(0),x=g(u,d).getDepthStencilTexture();p.execute(t,y,x,A),p.copy(t,l)}!r&&!a&&s&&(e.framebuffer=l,o.executeCopyColor(t,e))},ki.prototype.initializeFrame=function(){120==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeight=function z7e(e){const t=e._globe,i=e.camera.positionCartographic;if(c(t)&&t.show&&c(i))return t.getHeight(i)}(this),this._cameraUnderground=function V7e(e){const n=e._mode,i=e.globe,o=e._screenSpaceCameraController,r=e.camera.positionCartographic;if(!c(r))return!1;if(!o.onMap()&&r.height<0)return!0;if(!c(i)||!i.show||n===ce.SCENE2D||n===ce.MORPHING)return!1;const s=e._globeHeight;return c(s)&&r.height<s}(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),c(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};const W7e=new X;function q7e(e){const 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=f7e;let r=g(e.backgroundColor,X.BLACK);e._hdr&&(r=X.clone(r,W7e),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,e.fog.update(t),i.update(t);const s=e.shadowMap;c(s)&&s.enabled&&(!c(e.light)||e.light instanceof qD?f.negate(i.sunDirectionWC,e._shadowMapCamera.direction):f.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(s)),e._computeCommandList.length=0,e._overlayCommandList.length=0;const a=o.viewport;a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight;const l=o.passState;l.framebuffer=void 0,l.blendingEnabled=void 0,l.scissorTest=void 0,l.viewport=Vt.clone(a,l.viewport),c(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(l,r),e.resolveFramebuffers(l),l.framebuffer=void 0,function E7e(e,t){e.context.uniformState.updatePass(ze.OVERLAY);const i=e.context,o=e._overlayCommandList,r=o.length;for(let s=0;s<r;++s)o[s].execute(i,t)}(e,l),c(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function Hg(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function Y7e(e){return e._picking.updateMostDetailedRayPicks(e)}function X7e(e){const t=e._frameState;m3.camera=t.camera,m3.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,m3)}function Z7e(e){const t=e._frameState;t.camera.canPreloadFlight()&&(_3.camera=e.preloadFlightCamera,_3.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,_3))}function $7e(e){e.primitives.updateForPass(e._frameState,h7e)}ki.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);const t=this._frameState;t.newFrame=!1,c(e)||(e=se.now());const n=this._view.checkForCameraUpdates(this);let i=!this.requestRenderMode||this._renderRequested||n||this._logDepthBufferDirty||this._hdrDirty||this.mode===ce.MORPHING;if(!i&&c(this.maximumRenderTimeChange)&&c(this._lastRenderTime)){const o=Math.abs(se.secondsDifference(this._lastRenderTime,e));i=i||o>this.maximumRenderTimeChange}i&&(this._lastRenderTime=se.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1,dJ(this,O.incrementWrap(t.frameNumber,15e6,1),e),t.newFrame=!0),Hg(this,G7e),this.primitives.show&&(Hg(this,Y7e),Hg(this,X7e),Hg(this,Z7e),i||Hg(this,$7e)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),Hg(this,q7e)),function H7e(e,t){if(e.debugShowFramesPerSecond){if(!c(e._performanceDisplay)){const n=document.createElement("div");n.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(n);const o=new PGe({container:n});e._performanceDisplay=o,e._performanceContainer=n}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)}else c(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}(this,i),Hg(this,j7e),function U7e(e){const t=e._frameState.afterRender;for(let n=0,i=t.length;n<i;++n)t[n]()&&e.requestRender();t.length=0}(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())},ki.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},ki.prototype.requestRender=function(){this._renderRequested=!0},ki.prototype.clampLineWidth=function(e){return Math.max(mn.minimumAliasedLineWidth,Math.min(e,mn.maximumAliasedLineWidth))},ki.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n)},ki.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)},ki.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)},ki.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)},ki.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)},ki.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)},ki.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)},ki.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)},ki.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)},ki.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)},ki.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)},ki.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)},ki.prototype.cartesianToCanvasCoordinates=function(e,t){return Ur.wgs84ToWindowCoordinates(this,e,t)},ki.prototype.completeMorph=function(){this._transitioner.completeMorph()},ki.prototype.morphTo2D=function(e){let t;const n=this.globe;t=c(n)?n.ellipsoid:this.mapProjection.ellipsoid,e=g(e,2),this._transitioner.morphTo2D(e,t)},ki.prototype.morphToColumbusView=function(e){let t;const n=this.globe;t=c(n)?n.ellipsoid:this.mapProjection.ellipsoid,e=g(e,2),this._transitioner.morphToColumbusView(e,t)},ki.prototype.morphTo3D=function(e){let t;const n=this.globe;t=c(n)?n.ellipsoid:this.mapProjection.ellipsoid,e=g(e,2),this._transitioner.morphTo3D(e,t)},ki.prototype.setTerrain=function(e){return T.typeOf.object("terrain",e),function K7e(e,t){e._removeTerrainProviderReadyListener=e._removeTerrainProviderReadyListener&&e._removeTerrainProviderReadyListener(),t.ready?c(e.globe)&&(e.globe.terrainProvider=t.provider):(e.globe.terrainProvider=void 0,e._removeTerrainProviderReadyListener=t.readyEvent.addEventListener(n=>{c(e)&&c(e.globe)&&(e.globe.terrainProvider=n),e._removeTerrainProviderReadyListener()}))}(this,e),e},ki.prototype.isDestroyed=function(){return!1},ki.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(),c(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,Ye(this)};const Q7e=ki,gJ="float interpolateByDistance(vec4 nearFarScalar, float distance)\n{\n float startDistance = nearFarScalar.x;\n float startValue = nearFarScalar.y;\n float endDistance = nearFarScalar.z;\n float endValue = nearFarScalar.w;\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\n return mix(startValue, endValue, t);\n}\n\nvec3 getLightDirection(vec3 positionWC)\n{\n float lightEnum = u_radiiAndDynamicAtmosphereColor.z;\n vec3 lightDirection =\n positionWC * float(lightEnum == 0.0) +\n czm_lightDirectionWC * float(lightEnum == 1.0) +\n czm_sunDirectionWC * float(lightEnum == 2.0);\n return normalize(lightDirection);\n}\n\nvoid computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)\n{\n float ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;\n\n // Adjustment to the atmosphere radius applied based on the camera height.\n float distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;\n float distanceAdjustMax = czm_ellipsoidRadii.x;\n float distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;\n float distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);\n\n // Since atmosphere scattering assumes the atmosphere is a spherical shell, we compute an inner radius of the atmosphere best fit \n // for the position on the ellipsoid.\n float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;\n float atmosphereInnerRadius = (length(czm_viewerPositionWC) - czm_eyeHeight) - radiusAdjust;\n\n // Setup the primary ray: from the camera position to the vertex position.\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);\n\n underTranslucentGlobe = 0.0;\n\n // Brighten the sky atmosphere under the Earth's atmosphere when translucency is enabled.\n #if defined(GLOBE_TRANSLUCENT)\n\n // Check for intersection with the inner radius of the atmopshere.\n czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);\n if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {\n \n // Compute position on globe.\n vec3 direction = normalize(positionWC);\n czm_ray ellipsoidRay = czm_ray(positionWC, -direction);\n czm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);\n vec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);\n\n // Control the color using the camera angle.\n float angle = dot(normalize(czm_viewerPositionWC), normalize(onEarth));\n\n // Control the opacity using the distance from Earth.\n opacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionWC - onEarth));\n vec3 horizonColor = vec3(0.1, 0.2, 0.3);\n vec3 nearColor = vec3(0.0);\n\n rayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);\n \n // Set the traslucent flag to avoid alpha adjustment in computeFinalColor funciton.\n underTranslucentGlobe = 1.0;\n return;\n }\n #endif\n\n computeScattering(\n primaryRay,\n length(cameraToPositionWC),\n lightDirection,\n atmosphereInnerRadius,\n rayleighColor,\n mieColor,\n opacity\n );\n\n // Alter the opacity based on how close the viewer is to the ground.\n // (0.0 = At edge of atmosphere, 1.0 = On ground)\n float cameraHeight = czm_eyeHeight + atmosphereInnerRadius;\n float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\n opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);\n\n // Alter alpha based on time of day (0.0 = night , 1.0 = day)\n float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;\n opacity *= pow(nightAlpha, 0.5);\n}\n";function wb(e){e=g(e,ge.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;const n=f.multiplyByScalar(e.radii,1.025,new f);this._scaleMatrix=k.fromScale(n),this._modelMatrix=new k,this._command=new Zt({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new f(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new f(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 f;const i=new f;i.x=1.025*e.maximumRadius,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;const 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(wb.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),wb.prototype.setDynamicAtmosphereColor=function(e,t){this._radiiAndDynamicAtmosphereColor.z=e?t?2:1:0};const A3=new k;wb.prototype.update=function(e,t){if(!this.show)return;const n=e.mode;if(n!==ce.SCENE3D&&n!==ce.MORPHING||!e.passes.render)return;const i=k.fromRotationTranslation(e.context.uniformState.inverseViewRotation,f.ZERO,A3),o=k.multiplyTransformation(i,Ss.Y_UP_TO_Z_UP,A3),r=k.multiply(this._scaleMatrix,o,A3);k.clone(r,this._modelMatrix);const s=e.context,a=function tYe(e){return!(O.equalsEpsilon(e.hueShift,0,O.EPSILON7)&&O.equalsEpsilon(e.saturationShift,0,O.EPSILON7)&&O.equalsEpsilon(e.brightnessShift,0,O.EPSILON7))}(this),l=e.globeTranslucencyState.translucent,u=this.perFragmentAtmosphere||l||!c(t)||!t.show,d=this._command;if(!c(d.vertexArray)){const m=cC.createGeometry(new cC({radii:new f(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:et.POSITION_ONLY}));d.vertexArray=ds.fromGeometry({context:s,geometry:m,attributeLocations:uo.createAttributeLocations(m),bufferUsage:Tt.STATIC_DRAW}),d.renderState=Pt.fromCache({cull:{enabled:!0,face:dr.FRONT},blending:Ji.ALPHA_BLEND,depthMask:!1})}const h=a|u<<2|l<<3;if(h!==this._flags){this._flags=h;const m=[];a&&m.push("COLOR_CORRECT"),u&&m.push("PER_FRAGMENT_ATMOSPHERE"),l&&m.push("GLOBE_TRANSLUCENT");const _=new Et({defines:m,sources:[CD,gJ,"in vec4 position;\n\nout vec3 v_outerPositionWC;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\nout vec3 v_mieColor;\nout vec3 v_rayleighColor;\nout float v_opacity;\nout float v_translucent;\n#endif\n\nvoid main(void)\n{\n vec4 positionWC = czm_model * position;\n vec3 lightDirection = getLightDirection(positionWC.xyz);\n\n #ifndef PER_FRAGMENT_ATMOSPHERE\n computeAtmosphereScattering(\n positionWC.xyz,\n lightDirection,\n v_rayleighColor,\n v_mieColor,\n v_opacity,\n v_translucent\n );\n #endif\n \n v_outerPositionWC = positionWC.xyz;\n gl_Position = czm_modelViewProjection * position;\n}\n"]}),p=new Et({defines:m,sources:[CD,gJ,"in vec3 v_outerPositionWC;\n\nuniform vec3 u_hsbShift;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\nin vec3 v_mieColor;\nin vec3 v_rayleighColor;\nin float v_opacity;\nin float v_translucent;\n#endif\n\nvoid main (void)\n{\n vec3 lightDirection = getLightDirection(v_outerPositionWC);\n \n vec3 mieColor;\n vec3 rayleighColor;\n float opacity;\n float translucent;\n\n #ifdef PER_FRAGMENT_ATMOSPHERE\n computeAtmosphereScattering(\n v_outerPositionWC,\n lightDirection,\n rayleighColor,\n mieColor,\n opacity,\n translucent\n );\n #else\n mieColor = v_mieColor;\n rayleighColor = v_rayleighColor;\n opacity = v_opacity;\n translucent = v_translucent;\n #endif\n\n vec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);\n\n #ifndef HDR\n color.rgb = czm_acesTonemapping(color.rgb);\n color.rgb = czm_inverseGamma(color.rgb);\n #endif\n\n #ifdef COLOR_CORRECT\n // Convert rgb color to hsb\n vec3 hsb = czm_RGBToHSB(color.rgb);\n // Perform hsb shift\n hsb.x += u_hsbShift.x; // hue\n hsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0); // saturation\n hsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0; // brightness\n // Convert shifted hsb back to rgb\n color.rgb = czm_HSBToRGB(hsb);\n #endif\n\n // For the parts of the sky atmosphere that are not behind a translucent globe,\n // we mix in the default opacity so that the sky atmosphere still appears at distance.\n // This is needed because the opacity in the sky atmosphere is initially adjusted based\n // on the camera height.\n if (translucent == 0.0) {\n color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);\n }\n\n out_FragColor = color;\n}\n"]});this._spSkyAtmosphere=mi.fromCache({context:s,vertexShaderSource:_,fragmentShaderSource:p}),d.shaderProgram=this._spSkyAtmosphere}return d},wb.prototype.isDestroyed=function(){return!1},wb.prototype.destroy=function(){const e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),Ye(this)};const nYe=wb;function PI(e){this.sources=e.sources,this._sources=void 0,this.show=g(e.show,!0),this._command=new Zt({modelMatrix:k.clone(k.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}PI.prototype.update=function(e,t){const n=this;if(!this.show||e.mode!==ce.SCENE3D&&e.mode!==ce.MORPHING||!e.passes.render)return;const i=e.context;if(this._sources!==this.sources){this._sources=this.sources;const r=this.sources;if(!(c(r.positiveX)&&c(r.negativeX)&&c(r.positiveY)&&c(r.negativeY)&&c(r.positiveZ)&&c(r.negativeZ)))throw new E("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof r.positiveX!=typeof r.negativeX||typeof r.positiveX!=typeof r.positiveY||typeof r.positiveX!=typeof r.negativeY||typeof r.positiveX!=typeof r.positiveZ||typeof r.positiveX!=typeof r.negativeZ)throw new E("this.sources properties must all be the same type.");"string"==typeof r.positiveX?function iYe(e,t,n){if(T.defined("context",e),!(c(t)&&c(t.positiveX)&&c(t.negativeX)&&c(t.positiveY)&&c(t.negativeY)&&c(t.positiveZ)&&c(t.negativeZ)))throw new E("urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");const i={flipY:!0,skipColorSpaceConversion:n,preferImageBitmap:!0},o=[jt.createIfNeeded(t.positiveX).fetchImage(i),jt.createIfNeeded(t.negativeX).fetchImage(i),jt.createIfNeeded(t.positiveY).fetchImage(i),jt.createIfNeeded(t.negativeY).fetchImage(i),jt.createIfNeeded(t.positiveZ).fetchImage(i),jt.createIfNeeded(t.negativeZ).fetchImage(i)];return Promise.all(o).then(function(r){return new d_({context:e,source:{positiveX:r[0],negativeX:r[1],positiveY:r[2],negativeY:r[3],positiveZ:r[4],negativeZ:r[5]}})})}(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 d_({context:i,source:r}))}const o=this._command;if(!c(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return n._cubeMap}};const r=Tg.createGeometry(Tg.fromDimensions({dimensions:new f(2,2,2),vertexFormat:et.POSITION_ONLY})),s=this._attributeLocations=uo.createAttributeLocations(r);o.vertexArray=ds.fromGeometry({context:i,geometry:r,attributeLocations:s,bufferUsage:Tt.STATIC_DRAW}),o.renderState=Pt.fromCache({blending:Ji.ALPHA_BLEND})}if(!c(o.shaderProgram)||this._useHdr!==t){const r=new Et({defines:[t?"HDR":""],sources:["uniform samplerCube u_cubeMap;\n\nin vec3 v_texCoord;\n\nvoid main()\n{\n vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));\n out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n}\n"]});o.shaderProgram=mi.fromCache({context:i,vertexShaderSource:"in vec3 position;\n\nout vec3 v_texCoord;\n\nvoid main()\n{\n vec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position.xyz;\n}\n",fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._useHdr=t}return c(this._cubeMap)?o:void 0},PI.prototype.isDestroyed=function(){return!1},PI.prototype.destroy=function(){const 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(),Ye(this)};const aYe=PI;function BC(){this.show=!0,this._drawCommand=new Zt({primitiveType:At.TRIANGLES,boundingVolume:new be,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new be,this._boundingVolume2D=new be,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;const e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(BC.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});const dYe=new G,fYe=new G,hYe=new fe,kC=new fe;BC.prototype.update=function(e,t,n){if(!this.show)return;const i=e.mode;if(i===ce.SCENE2D||i===ce.MORPHING||!e.passes.render)return;const o=e.context,r=t.viewport.width,s=t.viewport.height;if(!c(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 v=Math.max(r,s);v=Math.pow(2,Math.ceil(Math.log(v)/Math.log(2))-2),v=Math.max(1,v),this._texture=new jn({context:o,width:v,height:v,pixelFormat:vt.RGBA,pixelDatatype:n?o.halfFloatingPointTexture?bt.HALF_FLOAT:bt.FLOAT:bt.UNSIGNED_BYTE}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;const P=this;this._commands.computeCommand=new Ew({fragmentShaderSource:"uniform float u_radiusTS;\n\nin vec2 v_textureCoordinates;\n\nvec2 rotate(vec2 p, vec2 direction)\n{\n return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\n\nvec4 addBurst(vec2 position, vec2 direction, float lengthScalar)\n{\n vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\n float radius = length(rotatedPosition) * lengthScalar;\n float burst = 1.0 - smoothstep(0.0, 0.55, radius);\n return vec4(burst);\n}\n\nvoid main()\n{\n float lengthScalar = 2.0 / sqrt(2.0);\n vec2 position = v_textureCoordinates - vec2(0.5);\n float radius = length(position) * lengthScalar;\n float surface = step(radius, u_radiusTS);\n vec4 color = vec4(vec2(1.0), surface + 0.2, surface);\n\n float glow = 1.0 - smoothstep(0.0, 0.55, radius);\n color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\n\n vec4 burst = vec4(0.0);\n\n // The following loop has been manually unrolled for speed, to\n // avoid sin() and cos().\n //\n //for (float i = 0.4; i < 3.2; i += 1.047) {\n // vec2 direction = vec2(sin(i), cos(i));\n // burst += 0.4 * addBurst(position, direction, lengthScalar);\n //\n // direction = vec2(sin(i - 0.08), cos(i - 0.08));\n // burst += 0.3 * addBurst(position, direction, lengthScalar);\n //}\n\n burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar); // angle == 0.4\n burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar); // angle == 0.4 + 1.047\n burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar); // angle == 0.4 + 1.047 * 2.0\n\n burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar); // angle == 0.4 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar); // angle == 0.4 + 1.047 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar); // angle == 0.4 + 1.047 * 2.0 - 0.08\n\n // End of manual loop unrolling.\n\n color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\n\n out_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n",outputTexture:this._texture,uniformMap:{u_radiusTS:function(){return P._radiusTS}},persists:!1,owner:this,postExecute:function(){P._commands.computeCommand=void 0}})}const a=this._drawCommand;if(!c(a.vertexArray)){const v={direction:0},D=new Uint8Array(8);D[0]=0,D[1]=0,D[2]=255,D[3]=0,D[4]=255,D[5]=255,D[6]=0,D[7]=255;const P=yn.createVertexBuffer({context:o,typedArray:D,usage:Tt.STATIC_DRAW}),N=[{index:v.direction,vertexBuffer:P,componentsPerAttribute:2,normalize:!0,componentDatatype:ee.UNSIGNED_BYTE}],R=yn.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Tt.STATIC_DRAW,indexDatatype:Ot.UNSIGNED_SHORT});a.vertexArray=new ds({context:o,attributes:N,indexBuffer:R}),a.shaderProgram=mi.fromCache({context:o,vertexShaderSource:"in vec2 direction;\n\nuniform float u_size;\n\nout vec2 v_textureCoordinates;\n\nvoid main() \n{\n vec4 position;\n if (czm_morphTime == 1.0)\n {\n position = vec4(czm_sunPositionWC, 1.0);\n }\n else\n {\n position = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n }\n \n vec4 positionEC = czm_view * position;\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n vec2 halfSize = vec2(u_size * 0.5);\n halfSize *= ((direction * 2.0) - 1.0);\n \n gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\n \n v_textureCoordinates = direction;\n}\n",fragmentShaderSource:"uniform sampler2D u_texture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color = texture(u_texture, v_textureCoordinates);\n out_FragColor = czm_gammaCorrect(color);\n}\n",attributeLocations:v}),a.renderState=Pt.fromCache({blending:Ji.ALPHA_BLEND}),a.uniformMap=this._uniformMap}const l=o.uniformState.sunPositionWC,u=o.uniformState.sunPositionColumbusView,d=this._boundingVolume,h=this._boundingVolume2D;f.clone(l,d.center),h.center.x=u.z,h.center.y=u.x,h.center.z=u.y,d.radius=O.SOLAR_RADIUS+O.SOLAR_RADIUS*this._glowLengthTS,h.radius=d.radius,i===ce.SCENE3D?be.clone(d,a.boundingVolume):i===ce.COLUMBUS_VIEW&&be.clone(h,a.boundingVolume);const m=Ur.computeActualWgs84Position(e,l,kC),_=f.magnitude(f.subtract(m,e.camera.position,kC)),p=o.uniformState.projection,y=hYe;y.x=0,y.y=0,y.z=-_,y.w=1;const A=k.multiplyByVector(p,y,kC),x=Ur.clipToGLWindowCoordinates(t.viewport,A,dYe);y.x=O.SOLAR_RADIUS;const C=k.multiplyByVector(p,y,kC),w=Ur.clipToGLWindowCoordinates(t.viewport,C,fYe);return this._size=G.magnitude(G.subtract(w,x,kC)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands},BC.prototype.isDestroyed=function(){return!1},BC.prototype.destroy=function(){const 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(),Ye(this)};const pYe=BC;function Sb(e){return ni(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}function yJ(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,c(e._scene)&&(e._scene.pixelRatio=t),t}function bJ(e){const t=e._canvas;let n=t.clientWidth,i=t.clientHeight;const o=yJ(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=o,i*=o,t.width=n,t.height=i,e._canRender=0!==n&&0!==i,e._lastDevicePixelRatio=window.devicePixelRatio}function AJ(e){const t=e._canvas,n=t.width,i=t.height;if(0!==n&&0!==i){const o=e._scene.camera.frustum;c(o.aspectRatio)?o.aspectRatio=n/i:(o.top=o.right*(i/n),o.bottom=-o.top)}}function Gg(e,t){if(!c(e))throw new E("container is required.");e=Lr(e),t=g(t,g.EMPTY_OBJECT);const n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);const i=document.createElement("canvas"),o=zn.supportsImageRenderingPixelated();function r(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=zn.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1},g(t.blurActiveElementOnCanvasFocus,!0)&&(i.addEventListener("mousedown",r),i.addEventListener("pointerdown",r)),n.appendChild(i);const a=document.createElement("div");a.className="cesium-widget-credits";const l=c(t.creditContainer)?Lr(t.creditContainer):n;l.appendChild(a);const u=c(t.creditViewport)?Lr(t.creditViewport):n,d=g(t.showRenderLoopErrors,!0),h=g(t.useBrowserRecommendedResolution,!0);this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=u,this._creditContainer=l,this._innerCreditContainer=a,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=d,this._resolutionScale=1,this._useBrowserRecommendedResolution=h,this._forceResize=!1,this._clock=c(t.clock)?t.clock:new hD,bJ(this);try{const m=new Q7e({canvas:i,contextOptions:t.contextOptions,creditContainer:a,creditViewport:u,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:g(t.scene3DOnly,!1),shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=m,m.camera.constrainedAxis=f.UNIT_Z,yJ(this),AJ(this);const _=g(m.mapProjection.ellipsoid,ge.WGS84);let p=t.globe;c(p)||(p=new Cze(_)),!1!==p&&(m.globe=p,m.globe.shadows=g(t.terrainShadows,$o.RECEIVE_ONLY));let y=t.skyBox;c(y)||(y=new aYe({sources:{positiveX:Sb("px"),negativeX:Sb("mx"),positiveY:Sb("py"),negativeY:Sb("my"),positiveZ:Sb("pz"),negativeZ:Sb("mz")}})),!1!==y&&(m.skyBox=y,m.sun=new pYe,m.moon=new MVe);let A=t.skyAtmosphere;c(A)||(A=new nYe(_),A.show=!1!==t.globe&&p.show),!1!==A&&(m.skyAtmosphere=A);let x=t.baseLayer;if(!1!==t.globe&&!1!==x&&(c(x)||(x=xc.fromWorldImagery()),m.imageryLayers.add(x)),c(t.terrainProvider)&&!1!==t.globe&&(m.terrainProvider=t.terrainProvider),c(t.terrain)&&!1!==t.globe){if(c(t.terrainProvider))throw new E("Specify either options.terrainProvider or options.terrain.");m.setTerrain(t.terrain)}this._screenSpaceEventHandler=new KB(i),c(t.sceneMode)&&(t.sceneMode===ce.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===ce.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=g(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;const C=this;this._onRenderError=function(w,v){C._useDefaultRenderLoop=!1,C._renderLoopRunning=!1,C._showRenderLoopErrors&&C.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,v)},m.renderError.addEventListener(this._onRenderError)}catch(m){throw d&&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:',m),m}}Object.defineProperties(Gg.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){if(e<=0)throw new E("targetFrameRate must be greater than 0, or undefined.");this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&function mYe(e){e._renderLoopRunning=!0;let t=0;requestAnimationFrame(function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{const o=e._targetFrameRate;if(c(o)){const r=1e3/o,s=i-t;s>r&&(e.resize(),e.render(),t=i-s%r),requestAnimationFrame(n)}else e.resize(),e.render(),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})}(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){if(e<=0)throw new E("resolutionScale must be greater than 0.");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)}}}),Gg.prototype.showErrorPanel=function(e,t,n){const i=this._element,o=document.createElement("div");o.className="cesium-widget-errorPanel";const r=document.createElement("div");r.className="cesium-widget-errorPanel-content",o.appendChild(r);const s=document.createElement("div");s.className="cesium-widget-errorPanel-header",s.appendChild(document.createTextNode(e)),r.appendChild(s);const a=document.createElement("div");function l(){a.style.maxHeight=`${Math.max(Math.round(.9*i.clientHeight-100),30)}px`}a.className="cesium-widget-errorPanel-scroll",r.appendChild(a),l(),c(window.addEventListener)&&window.addEventListener("resize",l,!1);const u=c(t),d=c(n);if(u||d){const _=document.createElement("div");if(_.className="cesium-widget-errorPanel-message",a.appendChild(_),d){let p=XP(n);u||("string"==typeof n&&(n=new Error(n)),t=XP({name:n.name,message:n.message}),p=n.stack),typeof console<"u"&&console.error(`${e}\n${t}\n${p}`);const y=document.createElement("div");y.className="cesium-widget-errorPanel-message-details collapsed";const A=document.createElement("span");A.className="cesium-widget-errorPanel-more-details",A.appendChild(document.createTextNode("See more...")),y.appendChild(A),y.onclick=function(x){y.removeChild(A),y.appendChild(document.createTextNode(p)),y.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",y.onclick=void 0},a.appendChild(y)}_.innerHTML=`<p>${t}</p>`}const h=document.createElement("div");h.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(h);const m=document.createElement("button");m.setAttribute("type","button"),m.className="cesium-button",m.appendChild(document.createTextNode("OK")),m.onclick=function(){c(l)&&c(window.removeEventListener)&&window.removeEventListener("resize",l,!1),i.removeChild(o)},h.appendChild(m),i.appendChild(o)},Gg.prototype.isDestroyed=function(){return!1},Gg.prototype.destroy=function(){c(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Ye(this)},Gg.prototype.resize=function(){const e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,bJ(this),AJ(this),this._scene.requestRender())},Gg.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();const e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};const _Ye=Gg;function ic(){this._dataSources=[],this._dataSourceAdded=new Ue,this._dataSourceRemoved=new Ue,this._dataSourceMoved=new Ue}function OI(e,t){if(!c(t))throw new E("dataSource is required.");const n=e.indexOf(t);if(-1===n)throw new E("dataSource is not in this collection.");return n}function TJ(e,t,n){const i=e._dataSources,o=i.length-1;if((t=O.clamp(t,0,o))===(n=O.clamp(n,0,o)))return;const r=i[t];i[t]=i[n],i[n]=r,e.dataSourceMoved.raiseEvent(r,n,t)}Object.defineProperties(ic.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}}),ic.prototype.add=function(e){if(!c(e))throw new E("dataSource is required.");const t=this,n=this._dataSources;return Promise.resolve(e).then(function(i){return n===t._dataSources&&(t._dataSources.push(i),t._dataSourceAdded.raiseEvent(t,i)),i})},ic.prototype.remove=function(e,t){t=g(t,!1);const n=this._dataSources.indexOf(e);return-1!==n&&(this._dataSources.splice(n,1),this._dataSourceRemoved.raiseEvent(this,e),t&&"function"==typeof e.destroy&&e.destroy(),!0)},ic.prototype.removeAll=function(e){e=g(e,!1);const t=this._dataSources;for(let n=0,i=t.length;n<i;++n){const o=t[n];this._dataSourceRemoved.raiseEvent(this,o),e&&"function"==typeof o.destroy&&o.destroy()}this._dataSources=[]},ic.prototype.contains=function(e){return-1!==this.indexOf(e)},ic.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},ic.prototype.get=function(e){if(!c(e))throw new E("index is required.");return this._dataSources[e]},ic.prototype.getByName=function(e){if(!c(e))throw new E("name is required.");return this._dataSources.filter(function(t){return t.name===e})},ic.prototype.raise=function(e){const t=OI(this._dataSources,e);TJ(this,t,t+1)},ic.prototype.lower=function(e){const t=OI(this._dataSources,e);TJ(this,t,t-1)},ic.prototype.raiseToTop=function(e){const t=OI(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))},ic.prototype.lowerToBottom=function(e){const t=OI(this._dataSources,e);0!==t&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))},ic.prototype.isDestroyed=function(){return!1},ic.prototype.destroy=function(){return this.removeAll(!0),Ye(this)};const gYe=ic;function hf(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}Object.defineProperties(hf.prototype,{length:{get:function(){return this._length}}}),hf.prototype.add=function(e,t){T.defined("primitive",e),c(t)&&T.typeOf.number("zIndex",t),t=g(t,0);let n=this._collections[t];if(!c(n)){n=new Og({destroyPrimitives:!1}),n._zIndex=t,this._collections[t]=n;const i=this._collectionsArray;let o=0;for(;o<i.length&&i[o]._zIndex<t;)o++;i.splice(o,0,n)}return n.add(e),this._length++,e._zIndex=t,e},hf.prototype.set=function(e,t){return T.defined("primitive",e),T.typeOf.number("zIndex",t),t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e},hf.prototype.remove=function(e,t){if(this.contains(e)){const n=e._zIndex,i=this._collections[n];let o;return o=t?i.remove(e):i.removeAndDestroy(e),o&&this._length--,0===i.length&&(this._collectionsArray.splice(this._collectionsArray.indexOf(i),1),this._collections[n]=void 0,i.destroy()),o}return!1},hf.prototype.removeAll=function(){const e=this._collectionsArray;for(let t=0;t<e.length;t++){const n=e[t];n.destroyPrimitives=!0,n.destroy()}this._collections={},this._collectionsArray=[],this._length=0},hf.prototype.contains=function(e){if(!c(e))return!1;const t=this._collections[e._zIndex];return c(t)&&t.contains(e)},hf.prototype.update=function(e){if(!this.show)return;const t=this._collectionsArray;for(let n=0;n<t.length;n++)t[n].update(e)},hf.prototype.isDestroyed=function(){return!1},hf.prototype.destroy=function(){return this.removeAll(),Ye(this)};const yYe=hf,$t=Object.freeze({DONE:0,PENDING:1,FAILED:2}),bYe=X.WHITE,AYe=f.ZERO,TYe=Qt.NONE,xYe=G.ZERO,wYe=f.ZERO,SYe=Ca.CENTER,vYe=ao.CENTER,IYe=new f,PYe=new X,OYe=new f,LYe=new G,RYe=new Mn,NYe=new Mn,MYe=new Mn,FYe=new Vt,BYe=new Jn;function xJ(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function Dm(e,t){if(!c(e))throw new E("entityCluster is required.");if(!c(t))throw new E("entityCollection is required.");t.collectionChanged.addEventListener(Dm.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new _n,this._onCollectionChanged(t,t.values,[],[])}function T3(e,t,n){c(e)&&(e.billboard=void 0,n.removeBillboard(t))}Dm.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){const r=t[i],s=r.entity,a=s._billboard;let l,h,u=r.billboard,d=s.isShowing&&s.isAvailable(e)&&te.getValueOrDefault(a._show,e,!0);if(d&&(h=te.getValueOrUndefined(s._position,e,IYe),l=te.getValueOrUndefined(a._image,e),d=c(h)&&c(l)),!d){T3(r,s,n);continue}te.isConstant(s._position)||(n._clusterDirty=!0),c(u)||(u=n.getBillboard(s),u.id=s,u.image=void 0,r.billboard=u),u.show=d,(!c(u.image)||r.textureValue!==l)&&(u.image=l,r.textureValue=l),u.position=h,u.color=te.getValueOrDefault(a._color,e,bYe,PYe),u.eyeOffset=te.getValueOrDefault(a._eyeOffset,e,AYe,OYe),u.heightReference=te.getValueOrDefault(a._heightReference,e,TYe),u.pixelOffset=te.getValueOrDefault(a._pixelOffset,e,xYe,LYe),u.scale=te.getValueOrDefault(a._scale,e,1),u.rotation=te.getValueOrDefault(a._rotation,e,0),u.alignedAxis=te.getValueOrDefault(a._alignedAxis,e,wYe),u.horizontalOrigin=te.getValueOrDefault(a._horizontalOrigin,e,SYe),u.verticalOrigin=te.getValueOrDefault(a._verticalOrigin,e,vYe),u.width=te.getValueOrUndefined(a._width,e),u.height=te.getValueOrUndefined(a._height,e),u.scaleByDistance=te.getValueOrUndefined(a._scaleByDistance,e,RYe),u.translucencyByDistance=te.getValueOrUndefined(a._translucencyByDistance,e,NYe),u.pixelOffsetScaleByDistance=te.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,MYe),u.sizeInMeters=te.getValueOrDefault(a._sizeInMeters,e,!1),u.distanceDisplayCondition=te.getValueOrUndefined(a._distanceDisplayCondition,e,BYe),u.disableDepthTestDistance=te.getValueOrUndefined(a._disableDepthTestDistance,e);const m=te.getValueOrUndefined(a._imageSubRegion,e,FYe);c(m)&&u.setImageSubRegion(u._imageId,m)}return!0},Dm.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new E("entity is required.");if(!c(t))throw new E("result is required.");const n=this._items.get(e.id);if(!c(n)||!c(n.billboard))return $t.FAILED;const i=n.billboard;if(i.heightReference===Qt.NONE)t.center=f.clone(i.position,t.center);else{if(!c(i._clampedPosition))return $t.PENDING;t.center=f.clone(i._clampedPosition,t.center)}return t.radius=0,$t.DONE},Dm.prototype.isDestroyed=function(){return!1},Dm.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Dm.prototype._onCollectionChanged,this);const e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return Ye(this)},Dm.prototype._onCollectionChanged=function(e,t,n,i){let o,r;const s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],c(r._billboard)&&c(r._position)&&s.set(r.id,new xJ(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._billboard)&&c(r._position)?s.contains(r.id)||s.set(r.id,new xJ(r)):(T3(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],T3(s.get(r.id),r,a),s.remove(r.id)};const kYe=Dm;function x3(e){this._name=e,this._clock=void 0,this._changed=new Ue,this._error=new Ue,this._isLoading=!1,this._loading=new Ue,this._entityCollection=new J0(this),this._entityCluster=new EM}Object.defineProperties(x3.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){og.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){if(!c(e))throw new E("value must be defined.");this._entityCluster=e}}}),x3.prototype.update=function(e){return!0};const UYe=x3;function jg(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.translucent,!0),n=g(e.closed,!1),i=g(e.materialSupport,jg.MaterialSupport.TEXTURED);this.material=c(e.material)?e.material:Ea.fromType(Ea.ColorType),this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,i.vertexShaderSource),this._fragmentShaderSource=g(e.fragmentShaderSource,i.fragmentShaderSource),this._renderState=Sa.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._materialSupport=i,this._vertexFormat=i.vertexFormat,this._flat=g(e.flat,!1),this._faceForward=g(e.faceForward,!n)}Object.defineProperties(jg.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}}}),jg.prototype.getFragmentShaderSource=Sa.prototype.getFragmentShaderSource,jg.prototype.isTranslucent=Sa.prototype.isTranslucent,jg.prototype.getRenderState=Sa.prototype.getRenderState,jg.MaterialSupport={BASIC:Object.freeze({vertexFormat:et.POSITION_AND_NORMAL,vertexShaderSource:"in vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 normal;\nin float batchId;\n\nout vec3 v_positionEC;\nout vec3 v_normalEC;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",fragmentShaderSource:"in vec3 v_positionEC;\nin vec3 v_normalEC;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n"}),TEXTURED:Object.freeze({vertexFormat:et.POSITION_NORMAL_AND_ST,vertexShaderSource:"in vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 normal;\nin vec2 st;\nin float batchId;\n\nout vec3 v_positionEC;\nout vec3 v_normalEC;\nout vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",fragmentShaderSource:"in vec3 v_positionEC;\nin vec3 v_normalEC;\nin vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n"}),ALL:Object.freeze({vertexFormat:et.ALL,vertexShaderSource:"in vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 normal;\nin vec3 tangent;\nin vec3 bitangent;\nin vec2 st;\nin float batchId;\n\nout vec3 v_positionEC;\nout vec3 v_normalEC;\nout vec3 v_tangentEC;\nout vec3 v_bitangentEC;\nout vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_tangentEC = czm_normal * tangent; // tangent in eye coordinates\n v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",fragmentShaderSource:"in vec3 v_positionEC;\nin vec3 v_normalEC;\nin vec3 v_tangentEC;\nin vec3 v_bitangentEC;\nin vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = tangentToEyeMatrix;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n"})};const ia=jg;function UC(e,t){if(e=g(e,0),(t=g(t,Number.MAX_VALUE))<=e)throw new E("far distance must be greater than near distance.");this.value=new Float32Array([e,t])}Object.defineProperties(UC.prototype,{componentDatatype:{get:function(){return ee.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}}),UC.fromDistanceDisplayCondition=function(e){if(!c(e))throw new E("distanceDisplayCondition is required.");if(e.far<=e.near)throw new E("distanceDisplayCondition.far distance must be greater than distanceDisplayCondition.near distance.");return new UC(e.near,e.far)},UC.toValue=function(e,t){if(!c(e))throw new E("distanceDisplayCondition is required.");return c(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};const mo=UC;function vb(){E.throwInstantiationError()}Object.defineProperties(vb.prototype,{isConstant:{get:E.throwInstantiationError},definitionChanged:{get:E.throwInstantiationError}}),vb.prototype.getType=E.throwInstantiationError,vb.prototype.getValue=E.throwInstantiationError,vb.prototype.equals=E.throwInstantiationError,vb.getValue=function(e,t,n){let i;return c(t)&&(i=t.getType(e),c(i))?((!c(n)||n.type!==i)&&(n=Ea.fromType(i)),t.getValue(e,n.uniforms),n):((!c(n)||n.type!==Ea.ColorType)&&(n=Ea.fromType(Ea.ColorType)),X.clone(X.WHITE,n.uniforms.color),n)};const oc=vb;function Wg(e,t,n){T.defined("geometryUpdater",e),T.defined("primitives",t),T.defined("orderedGroundPrimitives",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}Wg.prototype._isHidden=function(e,t,n){return!e.isShowing||!e.isAvailable(n)||!te.getValueOrDefault(t.show,n,!0)},Wg.prototype._setOptions=E.throwInstantiationError,Wg.prototype.update=function(e){T.defined("time",e);const 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;const r=this._entity,s=r[this._geometryUpdater._geometryPropertyName];if(this._setOptions(r,s,e),this._isHidden(r,s,e))return;const a=this._geometryUpdater.shadowsProperty.getValue(e),l=this._options;if(!c(s.fill)||s.fill.getValue(e)){const u=t.fillMaterialProperty,d=u instanceof Fn;let h;const m=t._getIsClosed(l);if(d)h=new yi({closed:m,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{const _=oc.getValue(e,u,this._material);this._material=_,h=new ia({material:_,translucent:_.isTranslucent(),closed:m})}if(n)l.vertexFormat=yi.VERTEX_FORMAT,this._primitive=o.add(new $0({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:h,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),te.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{l.vertexFormat=h.vertexFormat;const _=this._geometryUpdater.createFillGeometryInstance(e);d&&(h.translucent=255!==_.attributes.color.value[3]),this._primitive=i.add(new Xi({geometryInstances:_,appearance:h,asynchronous:!1,shadows:a}))}}if(!n&&c(s.outline)&&s.outline.getValue(e)){const u=this._geometryUpdater.createOutlineGeometryInstance(e),d=te.getValueOrDefault(s.outlineWidth,e,1);this._outlinePrimitive=i.add(new Xi({geometryInstances:u,appearance:new yi({flat:!0,translucent:255!==u.attributes.color.value[3],renderState:{lineWidth:t._scene.clampLineWidth(d)}}),asynchronous:!1,shadows:a}))}},Wg.prototype.getBoundingSphere=function(e){if(!c(e))throw new E("result is required.");const t=this._entity,n=this._primitive,i=this._outlinePrimitive;let o;return c(n)&&n.show&&n.ready&&(o=n.getGeometryInstanceAttributes(t),c(o)&&c(o.boundingSphere))||c(i)&&i.show&&i.ready&&(o=i.getGeometryInstanceAttributes(t),c(o)&&c(o.boundingSphere))?(be.clone(o.boundingSphere,e),$t.DONE):c(n)&&!n.ready||c(i)&&!i.ready?$t.PENDING:$t.FAILED},Wg.prototype.isDestroyed=function(){return!1},Wg.prototype.destroy=function(){const e=this._primitives;this._geometryUpdater._onTerrain?this._orderedGroundPrimitives.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),Ye(this)};const _o=Wg,qYe=new Fn(X.WHITE),YYe=new xo(!0),XYe=new xo(!0),ZYe=new xo(!1),$Ye=new xo(X.BLACK),KYe=new xo($o.DISABLED),QYe=new xo(new Jn),JYe=new xo(Yo.BOTH);function rc(e){T.defined("options.entity",e.entity),T.defined("options.scene",e.scene),T.defined("options.geometryOptions",e.geometryOptions),T.defined("options.geometryPropertyName",e.geometryPropertyName),T.defined("options.observedPropertyNames",e.observedPropertyNames);const t=e.entity,n=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new Ue,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=n,this._id=`${n}-${t.id}`,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=wc.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(rc.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!c(this._entity.availability)&&te.isConstant(this._showProperty)&&te.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!c(this._entity.availability)&&te.isConstant(this._showProperty)&&te.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),rc.prototype.isOutlineVisible=function(e){const n=this._outlineEnabled&&this._entity.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e);return g(n,!1)},rc.prototype.isFilled=function(e){const n=this._fillEnabled&&this._entity.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e);return g(n,!1)},rc.prototype.createFillGeometryInstance=E.throwInstantiationError,rc.prototype.createOutlineGeometryInstance=E.throwInstantiationError,rc.prototype.isDestroyed=function(){return!1},rc.prototype.destroy=function(){Ye(this)},rc.prototype._isHidden=function(e,t){const n=t.show;return c(n)&&n.isConstant&&!n.getValue(St.MINIMUM_VALUE)},rc.prototype._isOnTerrain=function(e,t){return!1},rc.prototype._getIsClosed=function(e){return!0},rc.prototype._isDynamic=E.throwInstantiationError,rc.prototype._setStaticOptions=E.throwInstantiationError,rc.prototype._onEntityPropertyChanged=function(e,t,n,i){if(-1===this._observedPropertyNames.indexOf(t))return;const o=this._entity[this._geometryPropertyName];if(!c(o))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));const r=o.fill,s=!c(r)||!r.isConstant||r.getValue(St.MINIMUM_VALUE),a=o.outline;let l=c(a);if(l&&a.isConstant&&(l=a.getValue(St.MINIMUM_VALUE)),!s&&!l)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));const u=o.show;if(this._isHidden(e,o))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));this._materialProperty=g(o.material,qYe),this._fillProperty=g(r,XYe),this._showProperty=g(u,YYe),this._showOutlineProperty=g(o.outline,ZYe),this._outlineColorProperty=l?g(o.outlineColor,$Ye):void 0,this._shadowsProperty=g(o.shadows,KYe),this._distanceDisplayConditionProperty=g(o.distanceDisplayCondition,QYe),this._classificationTypeProperty=g(o.classificationType,JYe),this._fillEnabled=s;const d=this._isOnTerrain(e,o)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof Fn);if(l&&d&&(gn(gn.geometryOutlines),l=!1),this._onTerrain=d,this._outlineEnabled=l,this._isDynamic(e,o))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,o),this._isClosed=this._getIsClosed(this._options);const h=o.outlineWidth;this._outlineWidth=c(h)?h.getValue(St.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}},rc.prototype.createDynamicUpdater=function(e,t){if(T.defined("primitives",e),T.defined("groundPrimitives",t),!this._dynamic)throw new E("This instance does not represent dynamic geometry.");return new this.constructor.DynamicGeometryUpdater(this,e,t)};const Oo=rc,CJ=new f,eXe=new Se;function Db(e,t,n,i){T.defined("scene",e),T.defined("positionProperty",t),this._scene=e,this._heightReference=n,this._extrudedHeightReference=i,this._positionProperty=t,this._position=new f,this._cartographicPosition=new Se,this._normal=new f,this._definitionChanged=new Ue,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;const o=this;if(c(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener(function(){o._updateClamping()}),this._removeModeListener=e.morphComplete.addEventListener(function(){o._updateClamping()})),t.isConstant){const r=t.getValue(St.MINIMUM_VALUE,CJ);if(!c(r)||f.equals(r,f.ZERO)||!c(e.globe))return;this._position=f.clone(r,this._position),this._updateClamping(),this._normal=e.globe.ellipsoid.geodeticSurfaceNormal(r,this._normal)}}Object.defineProperties(Db.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),Db.prototype._updateClamping=function(){c(this._removeCallbackFunc)&&this._removeCallbackFunc();const e=this._scene,t=e.globe,n=this._position;if(!c(t)||f.equals(n,f.ZERO))return void(this._terrainHeight=0);const i=t.ellipsoid,o=t._surface,r=this,s=i.cartesianToCartographic(n,this._cartographicPosition),a=t.getHeight(s);this._terrainHeight=c(a)?a:0,this._removeCallbackFunc=o.updateHeight(s,function l(u){if(e.mode===ce.SCENE3D){const d=i.cartesianToCartographic(u,eXe);r._terrainHeight=d.height}else r._terrainHeight=u.x;r.definitionChanged.raiseEvent()})},Db.prototype.getValue=function(e,t){const n=te.getValueOrDefault(this._heightReference,e,Qt.NONE),i=te.getValueOrDefault(this._extrudedHeightReference,e,Qt.NONE);if(n===Qt.NONE&&i!==Qt.RELATIVE_TO_GROUND)return this._position=f.clone(f.ZERO,this._position),f.clone(f.ZERO,t);if(this._positionProperty.isConstant)return f.multiplyByScalar(this._normal,this._terrainHeight,t);const o=this._scene,r=this._positionProperty.getValue(e,CJ);if(!c(r)||f.equals(r,f.ZERO)||!c(o.globe))return f.clone(f.ZERO,t);if(f.equalsEpsilon(this._position,r,O.EPSILON10))return f.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=f.clone(r,this._position),this._updateClamping();const s=o.globe.ellipsoid.geodeticSurfaceNormal(r,this._normal);return f.multiplyByScalar(s,this._terrainHeight,t)},Db.prototype.isDestroyed=function(){return!1},Db.prototype.destroy=function(){return c(this._removeEventListener)&&this._removeEventListener(),c(this._removeModeListener)&&this._removeModeListener(),c(this._removeCallbackFunc)&&this._removeCallbackFunc(),Ye(this)};const EJ=Db,C3=function tXe(e,t,n,i){if(Oo.prototype._onEntityPropertyChanged.call(this,e,t,n,i),-1===this._observedPropertyNames.indexOf(t))return;const o=this._entity[this._geometryPropertyName];if(!c(o))return;c(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);const r=o.heightReference;if(c(r)){const s=new cM(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new EJ(this._scene,s,r)}},wJ=f.ZERO,SJ=new f,nXe=new f,vJ=new X;function iXe(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function hl(e,t){Oo.call(this,{entity:e,scene:t,geometryOptions:new iXe(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function Ib(e,t,n){_o.call(this,e,t,n)}c(Object.create)&&((hl.prototype=Object.create(Oo.prototype)).constructor=hl),Object.defineProperties(hl.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),hl.prototype.createFillGeometryInstance=function(e){if(T.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i=new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),s={show:i,distanceDisplayCondition:mo.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};if(this._materialProperty instanceof Fn){let a;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,vJ)),c(a)||(a=X.WHITE),s.color=ti.fromColor(a)}return c(this._options.offsetAttribute)&&(s.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,wJ,SJ))),new Un({id:t,geometry:Tg.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:s})},hl.prototype.createOutlineGeometryInstance=function(e){if(T.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,X.BLACK,vJ),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ti.fromColor(i),distanceDisplayCondition:mo.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,wJ,SJ))),new Un({id:t,geometry:cv.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:r})},hl.prototype._computeCenter=function(e,t){return te.getValueOrUndefined(this._entity.position,e,t)},hl.prototype._isHidden=function(e,t){return!c(t.dimensions)||!c(e.position)||Oo.prototype._isHidden.call(this,e,t)},hl.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&te.isConstant(e.orientation)&&t.dimensions.isConstant&&te.isConstant(t.outlineWidth))},hl.prototype._setStaticOptions=function(e,t){const n=te.getValueOrDefault(t.heightReference,St.MINIMUM_VALUE,Qt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Fn?yi.VERTEX_FORMAT:ia.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(St.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==Qt.NONE?Yn.ALL:void 0},hl.prototype._onEntityPropertyChanged=C3,hl.DynamicGeometryUpdater=Ib,c(Object.create)&&((Ib.prototype=Object.create(_o.prototype)).constructor=Ib),Ib.prototype._isHidden=function(e,t,n){const i=te.getValueOrUndefined(e.position,n,nXe),o=this._options.dimensions;return!c(i)||!c(o)||_o.prototype._isHidden.call(this,e,t,n)},Ib.prototype._setOptions=function(e,t,n){const i=te.getValueOrDefault(t.heightReference,n,Qt.NONE),o=this._options;o.dimensions=te.getValueOrUndefined(t.dimensions,n,o.dimensions),o.offsetAttribute=i!==Qt.NONE?Yn.ALL:void 0};const oXe=hl,Rr=Object.freeze({ROUNDED:0,MITERED:1,BEVELED:2}),Us=[new f,new f],rXe=new f,sXe=new f,aXe=new f,cXe=new f,lXe=new f,uXe=new f,dXe=new f,fXe=new f,hXe=new f,Pb=new f,LI=new f,zC={};let E3=new Se;function w3(e,t,n,i){const s=f.angleBetween(e[0],e[1]),a=Math.ceil(s/i),l=new Array(a);let u;if(t===n){for(u=0;u<a;u++)l[u]=t;return l.push(n),l}const h=(n-t)/a;for(u=1;u<a;u++)l[u]=t+u*h;return l[0]=t,l.push(n),l}const RI=new f,NI=new f,_Xe=new f(-1,0,0);let qg=new k;const gXe=new k;let S3=new ne;const yXe=ne.IDENTITY.clone(),bXe=new f,AXe=new fe,DJ=new f;function Hh(e,t,n,i,o,r,s,a){let l=bXe,u=AXe;qg=Rn.eastNorthUpToFixedFrame(e,o,qg),l=k.multiplyByPointAsVector(qg,_Xe,l),l=f.normalize(l,l);const d=function mXe(e,t,n,i){const o=new zc(n,i),r=o.projectPointOntoPlane(f.add(n,e,RI),RI),s=o.projectPointOntoPlane(f.add(n,t,NI),NI),a=G.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}(l,t,e,o);S3=ne.fromRotationZ(d,S3),DJ.z=r,qg=k.multiplyTransformation(qg,k.fromRotationTranslation(S3,DJ,gXe),qg);const h=yXe;h[0]=s;for(let m=0;m<a;m++)for(let _=0;_<n.length;_+=3)u=f.fromArray(n,_,u),u=ne.multiplyByVector(h,u,u),u=k.multiplyByPoint(qg,u,u),i.push(u.x,u.y,u.z);return i}const TXe=new f;function v3(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3)i=Hh(f.fromArray(e,a,TXe),t,n,i,o,r[a/3],s,1);return i}function IJ(e,t){const n=e.length,i=new Array(3*n);let o=0;const r=t.x+t.width/2,s=t.y+t.height/2;for(let a=0;a<n;a++)i[o++]=e[a].x-r,i[o++]=0,i[o++]=e[a].y-s;return i}const PJ=new yt,OJ=new f,LJ=new ne;function RJ(e,t,n,i,o,r,s,a,l,u){const d=f.angleBetween(f.subtract(t,e,Pb),f.subtract(n,e,LI)),h=i===Rr.BEVELED?0:Math.ceil(d/O.toRadians(5));let m,_,p;if(m=ne.fromQuaternion(yt.fromAxisAngle(o?f.negate(e,Pb):e,d/(h+1),PJ),LJ),t=f.clone(t,OJ),h>0){const y=u?2:1;for(let A=0;A<h;A++)t=ne.multiplyByVector(m,t,t),_=f.subtract(t,e,Pb),_=f.normalize(_,_),o||(_=f.negate(_,_)),p=r.scaleToGeodeticSurface(t,LI),s=Hh(p,_,a,s,r,l,1,y)}else _=f.subtract(t,e,Pb),_=f.normalize(_,_),o||(_=f.negate(_,_)),p=r.scaleToGeodeticSurface(t,LI),s=Hh(p,_,a,s,r,l,1,1),n=f.clone(n,OJ),_=f.subtract(n,e,Pb),_=f.normalize(_,_),o||(_=f.negate(_,_)),p=r.scaleToGeodeticSurface(n,LI),s=Hh(p,_,a,s,r,l,1,1);return s}zC.removeDuplicatesFromShape=function(e){const t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){const s=e[o];G.equals(e[i],s)||n.push(s)}return n},zC.angleIsGreaterThanPi=function(e,t,n,i){const o=new zc(n,i),r=o.projectPointOntoPlane(f.add(n,e,RI),RI),s=o.projectPointOntoPlane(f.add(n,t,NI),NI);return s.x*r.y-s.y*r.x>=0};const CXe=new f,EXe=new f;zC.computePositions=function(e,t,n,i,o){const r=i._ellipsoid,s=function pXe(e,t){const n=new Array(e.length);for(let i=0;i<e.length;i++){const o=e[i];E3=t.cartesianToCartographic(o,E3),n[i]=E3.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}(e,r),a=i._granularity,l=i._cornerType,u=o?function xXe(e,t){const n=e.length,i=new Array(6*n);let o=0;const r=t.x+t.width/2,s=t.y+t.height/2;let a=e[0];i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s;for(let l=1;l<n;l++){a=e[l];const u=a.x-r,d=a.y-s;i[o++]=u,i[o++]=0,i[o++]=d,i[o++]=u,i[o++]=0,i[o++]=d}return a=e[0],i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s,i}(t,n):IJ(t,n),d=o?IJ(t,n):void 0,h=n.height/2,m=n.width/2;let _=e.length,p=[],y=o?[]:void 0,A=rXe,x=sXe,C=aXe,w=cXe,v=lXe,D=uXe,P=dXe,N=fXe,R=hXe,B=e[0],F=e[1];w=r.geodeticSurfaceNormal(B,w),A=f.subtract(F,B,A),A=f.normalize(A,A),N=f.cross(w,A,N),N=f.normalize(N,N);let L,M,S=s[0],I=s[1];o&&(y=Hh(B,N,d,y,r,S+h,1,1)),R=f.clone(B,R),B=F,x=f.negate(A,x);for(let j=1;j<_-1;j++){const W=o?2:1;if(F=e[j+1],B.equals(F)){gn("Positions are too close and are considered equivalent with rounding error.");continue}A=f.subtract(F,B,A),A=f.normalize(A,A),C=f.add(A,x,C),C=f.normalize(C,C),w=r.geodeticSurfaceNormal(B,w);const q=f.multiplyByScalar(w,f.dot(A,w),CXe);f.subtract(A,q,q),f.normalize(q,q);const V=f.multiplyByScalar(w,f.dot(x,w),EXe);if(f.subtract(x,V,V),f.normalize(V,V),O.equalsEpsilon(Math.abs(f.dot(q,V)),1,O.EPSILON7))p=Hh(R,N,u,p,r,S+h,1,1),R=B;else{C=f.cross(C,w,C),C=f.cross(w,C,C),C=f.normalize(C,C);const Z=1/Math.max(.25,f.magnitude(f.cross(C,x,Pb))),ie=zC.angleIsGreaterThanPi(A,x,B,r);ie?(v=f.add(B,f.multiplyByScalar(C,Z*m,C),v),D=f.add(v,f.multiplyByScalar(N,m,D),D),Us[0]=f.clone(R,Us[0]),Us[1]=f.clone(D,Us[1]),L=w3(Us,S+h,I+h,a),M=Hr.generateArc({positions:Us,granularity:a,ellipsoid:r}),p=v3(M,N,u,p,r,L,1),N=f.cross(w,A,N),N=f.normalize(N,N),P=f.add(v,f.multiplyByScalar(N,m,P),P),l===Rr.ROUNDED||l===Rr.BEVELED?RJ(v,D,P,l,ie,r,p,u,I+h,o):(C=f.negate(C,C),p=Hh(B,C,u,p,r,I+h,Z,W)),R=f.clone(P,R)):(v=f.add(B,f.multiplyByScalar(C,Z*m,C),v),D=f.add(v,f.multiplyByScalar(N,-m,D),D),Us[0]=f.clone(R,Us[0]),Us[1]=f.clone(D,Us[1]),L=w3(Us,S+h,I+h,a),M=Hr.generateArc({positions:Us,granularity:a,ellipsoid:r}),p=v3(M,N,u,p,r,L,1),N=f.cross(w,A,N),N=f.normalize(N,N),P=f.add(v,f.multiplyByScalar(N,-m,P),P),l===Rr.ROUNDED||l===Rr.BEVELED?RJ(v,D,P,l,ie,r,p,u,I+h,o):p=Hh(B,C,u,p,r,I+h,Z,W),R=f.clone(P,R)),x=f.negate(A,x)}S=I,I=s[j+1],B=F}Us[0]=f.clone(R,Us[0]),Us[1]=f.clone(B,Us[1]),L=w3(Us,S+h,I+h,a),M=Hr.generateArc({positions:Us,granularity:a,ellipsoid:r}),p=v3(M,N,u,p,r,L,1),o&&(y=Hh(B,N,d,y,r,I+h,1,1)),_=p.length;const z=new Float64Array(o?_+y.length:_);return z.set(p),o&&z.set(y,_),z};const VC=zC,D3={},Ob=new f,NJ=new f,wXe=new f,MJ=new f,sc=[new f,new f],FJ=new f,BJ=new f,kJ=new f,SXe=new f,vXe=new f,DXe=new f,IXe=new f,PXe=new f,OXe=new f,LXe=new f,UJ=new yt,zJ=new ne;function MI(e,t,n,i,o){const r=f.angleBetween(f.subtract(t,e,Ob),f.subtract(n,e,NJ)),s=i===Rr.BEVELED?1:Math.ceil(r/O.toRadians(5))+1,a=3*s,l=new Array(a);let u;l[a-3]=n.x,l[a-2]=n.y,l[a-1]=n.z,u=ne.fromQuaternion(yt.fromAxisAngle(o?f.negate(e,Ob):e,r/s,UJ),zJ);let d=0;t=f.clone(t,Ob);for(let h=0;h<s;h++)t=ne.multiplyByVector(u,t,t),l[d++]=t.x,l[d++]=t.y,l[d++]=t.z;return l}function VJ(e,t,n,i){let o=Ob;return i||(t=f.negate(t,t)),o=f.add(e,t,o),[o.x,o.y,o.z,n.x,n.y,n.z]}function I3(e,t,n,i){const o=new Array(e.length),r=new Array(e.length),s=f.multiplyByScalar(t,n,Ob),a=f.negate(s,NJ);let l=0,u=e.length-1;for(let d=0;d<e.length;d+=3){const h=f.fromArray(e,d,wXe),m=f.add(h,a,MJ);o[l++]=m.x,o[l++]=m.y,o[l++]=m.z;const _=f.add(h,s,MJ);r[u--]=_.z,r[u--]=_.y,r[u--]=_.x}return i.push(o,r),i}D3.addAttribute=function(e,t,n,i){const o=t.x,r=t.y,s=t.z;c(n)&&(e[n]=o,e[n+1]=r,e[n+2]=s),c(i)&&(e[i]=s,e[i-1]=r,e[i-2]=o)};const NXe=new f,MXe=new f;D3.computePositions=function(e){const t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes;let a=FJ,l=BJ,u=kJ,d=SXe,h=vXe,m=DXe,_=IXe,p=PXe,y=OXe,A=LXe,x=[];const C=s?[]:void 0,w=s?[]:void 0;let P,v=n[0],D=n[1];l=f.normalize(f.subtract(D,v,l),l),a=i.geodeticSurfaceNormal(v,a),d=f.normalize(f.cross(a,l,d),d),s&&(C.push(d.x,d.y,d.z),w.push(a.x,a.y,a.z)),_=f.clone(v,_),v=D,u=f.negate(l,u);const N=[];let R;const B=n.length;for(R=1;R<B-1;R++){a=i.geodeticSurfaceNormal(v,a),D=n[R+1],l=f.normalize(f.subtract(D,v,l),l),h=f.normalize(f.add(l,u,h),h);const S=f.multiplyByScalar(a,f.dot(l,a),NXe);f.subtract(l,S,S),f.normalize(S,S);const I=f.multiplyByScalar(a,f.dot(u,a),MXe);if(f.subtract(u,I,I),f.normalize(I,I),!O.equalsEpsilon(Math.abs(f.dot(S,I)),1,O.EPSILON7)){h=f.cross(h,a,h),h=f.cross(a,h,h),h=f.normalize(h,h);const M=o/Math.max(.25,f.magnitude(f.cross(h,u,Ob))),U=VC.angleIsGreaterThanPi(l,u,v,i);h=f.multiplyByScalar(h,M,h),U?(p=f.add(v,h,p),A=f.add(p,f.multiplyByScalar(d,o,A),A),y=f.add(p,f.multiplyByScalar(d,2*o,y),y),sc[0]=f.clone(_,sc[0]),sc[1]=f.clone(A,sc[1]),P=Hr.generateArc({positions:sc,granularity:t,ellipsoid:i}),x=I3(P,d,o,x),s&&(C.push(d.x,d.y,d.z),w.push(a.x,a.y,a.z)),m=f.clone(y,m),d=f.normalize(f.cross(a,l,d),d),y=f.add(p,f.multiplyByScalar(d,2*o,y),y),_=f.add(p,f.multiplyByScalar(d,o,_),_),N.push(r===Rr.ROUNDED||r===Rr.BEVELED?{leftPositions:MI(p,m,y,r,U)}:{leftPositions:VJ(v,f.negate(h,h),y,U)})):(y=f.add(v,h,y),A=f.add(y,f.negate(f.multiplyByScalar(d,o,A),A),A),p=f.add(y,f.negate(f.multiplyByScalar(d,2*o,p),p),p),sc[0]=f.clone(_,sc[0]),sc[1]=f.clone(A,sc[1]),P=Hr.generateArc({positions:sc,granularity:t,ellipsoid:i}),x=I3(P,d,o,x),s&&(C.push(d.x,d.y,d.z),w.push(a.x,a.y,a.z)),m=f.clone(p,m),d=f.normalize(f.cross(a,l,d),d),p=f.add(y,f.negate(f.multiplyByScalar(d,2*o,p),p),p),_=f.add(y,f.negate(f.multiplyByScalar(d,o,_),_),_),N.push(r===Rr.ROUNDED||r===Rr.BEVELED?{rightPositions:MI(y,m,p,r,U)}:{rightPositions:VJ(v,h,p,U)})),u=f.negate(l,u)}v=D}let F;return a=i.geodeticSurfaceNormal(v,a),sc[0]=f.clone(_,sc[0]),sc[1]=f.clone(v,sc[1]),P=Hr.generateArc({positions:sc,granularity:t,ellipsoid:i}),x=I3(P,d,o,x),s&&(C.push(d.x,d.y,d.z),w.push(a.x,a.y,a.z)),r===Rr.ROUNDED&&(F=function RXe(e){let t=FJ,n=BJ,i=kJ,o=e[1];n=f.fromArray(e[1],o.length-3,n),i=f.fromArray(e[0],0,i),t=f.midpoint(n,i,t);const r=MI(t,n,i,Rr.ROUNDED,!1),s=e.length-1,a=e[s-1];return o=e[s],n=f.fromArray(a,a.length-3,n),i=f.fromArray(o,0,i),t=f.midpoint(n,i,t),[r,MI(t,n,i,Rr.ROUNDED,!1)]}(x)),{positions:x,corners:N,lefts:C,normals:w,endPositions:F}};const io=D3,HJ=new f,GJ=new f,FI=new f,BI=new f,FXe=new f,jJ=new f,Im=new f,Lb=new f;function WJ(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function sd(e,t,n,i,o,r){const s=e.normals,a=e.tangents,l=e.bitangents,u=f.normalize(f.cross(n,t,Im),Im);r.normal&&io.addAttribute(s,t,i,o),r.tangent&&io.addAttribute(a,u,i,o),r.bitangent&&io.addAttribute(l,n,i,o)}function qJ(e,t,n){const i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,l=new lo;let u,m,p,d=0,h=0,_=0;for(m=0;m<i.length;m+=2)p=i[m].length-3,d+=p,_+=2*p,h+=i[m+1].length-3;for(d+=3,h+=3,m=0;m<o.length;m++){u=o[m];const K=o[m].leftPositions;c(K)?(p=K.length,d+=p,_+=p):(p=o[m].rightPositions.length,h+=p,_+=p)}const y=c(r);let A;y&&(A=r[0].length-3,d+=A,h+=A,A/=3,_+=6*A);const x=d+h,C=new Float64Array(x),P={normals:t.normal?new Float32Array(x):void 0,tangents:t.tangent?new Float32Array(x):void 0,bitangents:t.bitangent?new Float32Array(x):void 0};let B,F,S,I,U,z,N=0,R=x-1,L=HJ,M=GJ;const j=A/2,W=Ot.createTypedArray(x/3,_);let q=0;if(y){z=FI,U=BI;const K=r[0];for(L=f.fromArray(a,0,L),M=f.fromArray(s,0,M),m=0;m<j;m++)z=f.fromArray(K,3*(j-1-m),z),U=f.fromArray(K,3*(j+m),U),io.addAttribute(C,U,N),io.addAttribute(C,z,void 0,R),sd(P,L,M,N,R,t),F=N/3,I=F+1,B=(R-2)/3,S=B-1,W[q++]=B,W[q++]=F,W[q++]=S,W[q++]=S,W[q++]=F,W[q++]=I,N+=3,R-=3}let Y,Q,V=0,$=0,Z=i[V++],ie=i[V++];for(C.set(Z,N),C.set(ie,R-ie.length+1),M=f.fromArray(s,$,M),p=ie.length-3,m=0;m<p;m+=3)Y=n.geodeticSurfaceNormal(f.fromArray(Z,m,Im),Im),Q=n.geodeticSurfaceNormal(f.fromArray(ie,p-m,Lb),Lb),L=f.normalize(f.add(Y,Q,L),L),sd(P,L,M,N,R,t),F=N/3,I=F+1,B=(R-2)/3,S=B-1,W[q++]=B,W[q++]=F,W[q++]=S,W[q++]=S,W[q++]=F,W[q++]=I,N+=3,R-=3;for(Y=n.geodeticSurfaceNormal(f.fromArray(Z,p,Im),Im),Q=n.geodeticSurfaceNormal(f.fromArray(ie,p,Lb),Lb),L=f.normalize(f.add(Y,Q,L),L),$+=3,m=0;m<o.length;m++){let K;u=o[m];const me=u.leftPositions,we=u.rightPositions;let le,Ae,xe=jJ,De=FI,qe=BI;if(L=f.fromArray(a,$,L),c(me)){for(sd(P,L,M,void 0,R,t),R-=3,le=I,Ae=S,K=0;K<me.length/3;K++)xe=f.fromArray(me,3*K,xe),W[q++]=le,W[q++]=Ae-K-1,W[q++]=Ae-K,io.addAttribute(C,xe,void 0,R),De=f.fromArray(C,3*(Ae-K-1),De),qe=f.fromArray(C,3*le,qe),M=f.normalize(f.subtract(De,qe,M),M),sd(P,L,M,void 0,R,t),R-=3;xe=f.fromArray(C,3*le,xe),De=f.subtract(f.fromArray(C,3*Ae,De),xe,De),qe=f.subtract(f.fromArray(C,3*(Ae-K),qe),xe,qe),M=f.normalize(f.add(De,qe,M),M),sd(P,L,M,N,void 0,t),N+=3}else{for(sd(P,L,M,N,void 0,t),N+=3,le=S,Ae=I,K=0;K<we.length/3;K++)xe=f.fromArray(we,3*K,xe),W[q++]=le,W[q++]=Ae+K,W[q++]=Ae+K+1,io.addAttribute(C,xe,N),De=f.fromArray(C,3*le,De),qe=f.fromArray(C,3*(Ae+K),qe),M=f.normalize(f.subtract(De,qe,M),M),sd(P,L,M,N,void 0,t),N+=3;xe=f.fromArray(C,3*le,xe),De=f.subtract(f.fromArray(C,3*(Ae+K),De),xe,De),qe=f.subtract(f.fromArray(C,3*Ae,qe),xe,qe),M=f.normalize(f.negate(f.add(qe,De,M),M),M),sd(P,L,M,void 0,R,t),R-=3}for(Z=i[V++],ie=i[V++],Z.splice(0,3),ie.splice(ie.length-3,3),C.set(Z,N),C.set(ie,R-ie.length+1),p=ie.length-3,$+=3,M=f.fromArray(s,$,M),K=0;K<ie.length;K+=3)Y=n.geodeticSurfaceNormal(f.fromArray(Z,K,Im),Im),Q=n.geodeticSurfaceNormal(f.fromArray(ie,p-K,Lb),Lb),L=f.normalize(f.add(Y,Q,L),L),sd(P,L,M,N,R,t),I=N/3,F=I-1,S=(R-2)/3,B=S+1,W[q++]=B,W[q++]=F,W[q++]=S,W[q++]=S,W[q++]=F,W[q++]=I,N+=3,R-=3;N-=3,R+=3}if(L=f.fromArray(a,a.length-3,L),sd(P,L,M,N,R,t),y){N+=3,R-=3,z=FI,U=BI;const K=r[1];for(m=0;m<j;m++)z=f.fromArray(K,3*(A-m-1),z),U=f.fromArray(K,3*m,U),io.addAttribute(C,z,void 0,R),io.addAttribute(C,U,N),sd(P,L,M,N,R,t),I=N/3,F=I-1,S=(R-2)/3,B=S+1,W[q++]=B,W[q++]=F,W[q++]=S,W[q++]=S,W[q++]=F,W[q++]=I,N+=3,R-=3}if(l.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:C}),t.st){const K=new Float32Array(x/3*2);let me,we,le=0;if(y){d/=3,h/=3;const Ae=Math.PI/(A+1);let xe;we=1/(d-A+1),me=1/(h-A+1);const De=A/2;for(m=De+1;m<A+1;m++)xe=O.PI_OVER_TWO+Ae*m,K[le++]=me*(1+Math.cos(xe)),K[le++]=.5*(1+Math.sin(xe));for(m=1;m<h-A+1;m++)K[le++]=m*me,K[le++]=0;for(m=A;m>De;m--)xe=O.PI_OVER_TWO-m*Ae,K[le++]=1-me*(1+Math.cos(xe)),K[le++]=.5*(1+Math.sin(xe));for(m=De;m>0;m--)xe=O.PI_OVER_TWO-Ae*m,K[le++]=1-we*(1+Math.cos(xe)),K[le++]=.5*(1+Math.sin(xe));for(m=d-A;m>0;m--)K[le++]=m*we,K[le++]=1;for(m=1;m<De+1;m++)xe=O.PI_OVER_TWO+Ae*m,K[le++]=we*(1+Math.cos(xe)),K[le++]=.5*(1+Math.sin(xe))}else{for(d/=3,h/=3,we=1/(d-1),me=1/(h-1),m=0;m<h;m++)K[le++]=m*me,K[le++]=0;for(m=d;m>0;m--)K[le++]=(m-1)*we,K[le++]=1}l.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:K})}return t.normal&&(l.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:P.normals})),t.tangent&&(l.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:P.tangents})),t.bitangent&&(l.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:P.bitangents})),{attributes:l,indices:W}}function P3(e,t,n){n[t++]=e[0],n[t++]=e[1],n[t++]=e[2];for(let i=3;i<e.length;i+=3){const o=e[i],r=e[i+1],s=e[i+2];n[t++]=o,n[t++]=r,n[t++]=s,n[t++]=o,n[t++]=r,n[t++]=s}return n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n}const YJ=new f,HC=new f,nu=new Se;function XJ(e,t,n,i,o,r){const s=f.subtract(t,e,YJ);f.normalize(s,s);const a=n.geodeticSurfaceNormal(e,HC),l=f.cross(s,a,YJ);f.multiplyByScalar(l,i,l);let u=o.latitude,d=o.longitude,h=r.latitude,m=r.longitude;f.add(e,l,HC),n.cartesianToCartographic(HC,nu);let _=nu.latitude,p=nu.longitude;u=Math.min(u,_),d=Math.min(d,p),h=Math.max(h,_),m=Math.max(m,p),f.subtract(e,l,HC),n.cartesianToCartographic(HC,nu),_=nu.latitude,p=nu.longitude,u=Math.min(u,_),d=Math.min(d,p),h=Math.max(h,_),m=Math.max(m,p),o.latitude=u,o.longitude=d,r.latitude=h,r.longitude=m}const iu=new f,GC=new f,Rc=new Se,Nc=new Se;function ZJ(e,t,n,i,o){e=WJ(e,t);const r=wa(e,f.equalsEpsilon),s=r.length;if(s<2||n<=0)return new Ce;const a=.5*n;let l,u;if(Rc.latitude=Number.POSITIVE_INFINITY,Rc.longitude=Number.POSITIVE_INFINITY,Nc.latitude=Number.NEGATIVE_INFINITY,Nc.longitude=Number.NEGATIVE_INFINITY,i===Rr.ROUNDED){const m=r[0];f.subtract(m,r[1],iu),f.normalize(iu,iu),f.multiplyByScalar(iu,a,iu),f.add(m,iu,GC),t.cartesianToCartographic(GC,nu),l=nu.latitude,u=nu.longitude,Rc.latitude=Math.min(Rc.latitude,l),Rc.longitude=Math.min(Rc.longitude,u),Nc.latitude=Math.max(Nc.latitude,l),Nc.longitude=Math.max(Nc.longitude,u)}for(let m=0;m<s-1;++m)XJ(r[m],r[m+1],t,a,Rc,Nc);const d=r[s-1];f.subtract(d,r[s-2],iu),f.normalize(iu,iu),f.multiplyByScalar(iu,a,iu),f.add(d,iu,GC),XJ(d,GC,t,a,Rc,Nc),i===Rr.ROUNDED&&(t.cartesianToCartographic(GC,nu),l=nu.latitude,u=nu.longitude,Rc.latitude=Math.min(Rc.latitude,l),Rc.longitude=Math.min(Rc.longitude,u),Nc.latitude=Math.max(Nc.latitude,l),Nc.longitude=Math.max(Nc.longitude,u));const h=c(o)?o:new Ce;return h.north=Nc.latitude,h.south=Rc.latitude,h.east=Nc.longitude,h.west=Rc.longitude,h}function Gh(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions,n=e.width;T.defined("options.positions",t),T.defined("options.width",n);const i=g(e.height,0),o=g(e.extrudedHeight,i);this._positions=t,this._ellipsoid=ge.clone(g(e.ellipsoid,ge.WGS84)),this._vertexFormat=et.clone(g(e.vertexFormat,et.DEFAULT)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=g(e.cornerType,Rr.ROUNDED),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*f.packedLength+ge.packedLength+et.packedLength+7}Gh.pack=function(e,t,n){T.defined("value",e),T.defined("array",t),n=g(n,0);const i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=f.packedLength)f.pack(i[r],t,n);return ge.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=ge.packedLength),n+=et.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=g(e._offsetAttribute,-1),t};const $J=ge.clone(ge.UNIT_SPHERE),KJ=new et,jh={positions:void 0,ellipsoid:$J,vertexFormat:KJ,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Gh.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=f.packedLength)o[p]=f.unpack(e,t);const r=ge.unpack(e,t,$J),s=et.unpack(e,t+=ge.packedLength,KJ);t+=et.packedLength;const a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t++],m=1===e[t++],_=e[t];return c(n)?(n._positions=o,n._ellipsoid=ge.clone(r,n._ellipsoid),n._vertexFormat=et.clone(s,n._vertexFormat),n._width=a,n._height=l,n._extrudedHeight=u,n._cornerType=d,n._granularity=h,n._shadowVolume=m,n._offsetAttribute=-1===_?void 0:_,n):(jh.positions=o,jh.width=a,jh.height=l,jh.extrudedHeight=u,jh.cornerType=d,jh.granularity=h,jh.shadowVolume=m,jh.offsetAttribute=-1===_?void 0:_,new Gh(jh))},Gh.computeRectangle=function(e,t){const n=(e=g(e,g.EMPTY_OBJECT)).positions,i=e.width;return T.defined("options.positions",n),T.defined("options.width",i),ZJ(n,g(e.ellipsoid,ge.WGS84),i,g(e.cornerType,Rr.ROUNDED),t)},Gh.createGeometry=function(e){let t=e._positions;const n=e._width,i=e._ellipsoid;t=WJ(t,i);const o=wa(t,f.equalsEpsilon);if(o.length<2||n<=0)return;const r=e._height,s=e._extrudedHeight,a=!O.equalsEpsilon(r,s,0,O.EPSILON2),l=e._vertexFormat,u={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0};let d;if(a)u.height=r,u.extrudedHeight=s,u.shadowVolume=e._shadowVolume,u.offsetAttribute=e._offsetAttribute,d=function kXe(e,t){const n=new et({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,r=qJ(io.computePositions(e),n,i),s=e.height,a=e.extrudedHeight;let l=r.attributes;const u=r.indices;let d=l.position.values,h=d.length;const m=new Float64Array(6*h);let _=new Float64Array(h);_.set(d);let y,p=new Float64Array(4*h);d=po.scaleToGeodeticHeight(d,s,i),p=P3(d,0,p),_=po.scaleToGeodeticHeight(_,a,i),p=P3(_,2*h,p),m.set(d),m.set(_,h),m.set(p,2*h),l.position.values=m,l=function BXe(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;const n=e.position.values;let i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);const r=e.position.values.length/18,s=3*r,a=2*r,l=2*s;let u;if(t.normal||t.bitangent||t.tangent){const d=t.normal?new Float32Array(6*s):void 0,h=t.tangent?new Float32Array(6*s):void 0,m=t.bitangent?new Float32Array(6*s):void 0;let _=HJ,p=GJ,y=FI,A=BI,x=FXe,C=jJ,w=l;for(u=0;u<s;u+=3){const v=w+l;_=f.fromArray(n,u,_),p=f.fromArray(n,u+s,p),y=f.fromArray(n,(u+3)%s,y),p=f.subtract(p,_,p),y=f.subtract(y,_,y),A=f.normalize(f.cross(p,y,A),A),t.normal&&(io.addAttribute(d,A,v),io.addAttribute(d,A,v+3),io.addAttribute(d,A,w),io.addAttribute(d,A,w+3)),(t.tangent||t.bitangent)&&(C=f.fromArray(i,u,C),t.bitangent&&(io.addAttribute(m,C,v),io.addAttribute(m,C,v+3),io.addAttribute(m,C,w),io.addAttribute(m,C,w+3)),t.tangent&&(x=f.normalize(f.cross(C,A,x),x),io.addAttribute(h,x,v),io.addAttribute(h,x,v+3),io.addAttribute(h,x,w),io.addAttribute(h,x,w+3))),w+=6}if(t.normal){for(d.set(i),u=0;u<s;u+=3)d[u+s]=-i[u],d[u+s+1]=-i[u+1],d[u+s+2]=-i[u+2];e.normal.values=d}else e.normal=void 0;if(t.bitangent?(m.set(o),m.set(o,s),e.bitangent.values=m):e.bitangent=void 0,t.tangent){const v=e.tangent.values;h.set(v),h.set(v,s),e.tangent.values=h}}if(t.st){const d=e.st.values,h=new Float32Array(6*a);h.set(d),h.set(d,a);let m=2*a;for(let _=0;_<2;_++){for(h[m++]=d[0],h[m++]=d[1],u=2;u<a;u+=2){const p=d[u],y=d[u+1];h[m++]=p,h[m++]=y,h[m++]=p,h[m++]=y}h[m++]=d[0],h[m++]=d[1]}e.st.values=h}return e}(l,t);const A=h/3;if(e.shadowVolume){const B=l.normal.values;h=B.length;let F=new Float32Array(6*h);for(y=0;y<h;y++)B[y]=-B[y];F.set(B,h),F=P3(B,4*h,F),l.extrudeDirection=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:F}),t.normal||(l.normal=void 0)}if(c(e.offsetAttribute)){let B=new Uint8Array(6*A);B=e.offsetAttribute===Yn.TOP?B.fill(1,0,A).fill(1,2*A,4*A):B.fill(e.offsetAttribute===Yn.NONE?0:1),l.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}const x=u.length,C=A+A,w=Ot.createTypedArray(m.length/3,2*x+3*C);w.set(u);let D,P,N,R,v=x;for(y=0;y<x;y+=3){const B=u[y],F=u[y+1];w[v++]=u[y+2]+A,w[v++]=F+A,w[v++]=B+A}for(y=0;y<C;y+=2)D=y+C,P=D+C,N=D+1,R=P+1,w[v++]=D,w[v++]=P,w[v++]=N,w[v++]=N,w[v++]=P,w[v++]=R;return{attributes:l,indices:w}}(u,l);else if(d=qJ(io.computePositions(u),l,i),d.attributes.position.values=po.scaleToGeodeticHeight(d.attributes.position.values,r,i),c(e._offsetAttribute)){const p=e._offsetAttribute===Yn.NONE?0:1,A=new Uint8Array(d.attributes.position.values.length/3).fill(p);d.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}const h=d.attributes,m=be.fromVertices(h.position.values,void 0,3);return l.position||(d.attributes.position.values=void 0),new Cn({attributes:h,indices:d.indices,primitiveType:At.TRIANGLES,boundingSphere:m,offsetAttribute:e._offsetAttribute})},Gh.createShadowVolume=function(e,t,n){const i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Gh({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:et.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(Gh.prototype,{rectangle:{get:function(){return c(this._rectangle)||(this._rectangle=ZJ(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});const O3=Gh,QJ=new f,JJ=new f,UXe=new f;function eee(e,t){const n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new lo;let a,d,m,l=0,u=0,h=0;for(d=0;d<i.length;d+=2)m=i[d].length-3,l+=m,h+=m/3*4,u+=i[d+1].length-3;for(l+=3,u+=3,d=0;d<o.length;d++){a=o[d];const U=o[d].leftPositions;c(U)?(m=U.length,l+=m,h+=m/3*2):(m=o[d].rightPositions.length,u+=m,h+=m/3*2)}const _=c(r);let p;_&&(p=r[0].length-3,l+=p,u+=p,p/=3,h+=4*p);const y=l+u,A=new Float64Array(y);let w,v,D,P,N,R,x=0,C=y-1;const B=p/2,F=Ot.createTypedArray(y/3,h+4);let S=0;if(F[S++]=x/3,F[S++]=(C-2)/3,_){n.push(x/3),R=QJ,N=JJ;const U=r[0];for(d=0;d<B;d++)R=f.fromArray(U,3*(B-1-d),R),N=f.fromArray(U,3*(B+d),N),io.addAttribute(A,N,x),io.addAttribute(A,R,void 0,C),v=x/3,P=v+1,w=(C-2)/3,D=w-1,F[S++]=w,F[S++]=D,F[S++]=v,F[S++]=P,x+=3,C-=3}let I=0,L=i[I++],M=i[I++];for(A.set(L,x),A.set(M,C-M.length+1),m=M.length-3,n.push(x/3,(C-2)/3),d=0;d<m;d+=3)v=x/3,P=v+1,w=(C-2)/3,D=w-1,F[S++]=w,F[S++]=D,F[S++]=v,F[S++]=P,x+=3,C-=3;for(d=0;d<o.length;d++){let U;a=o[d];const z=a.leftPositions,j=a.rightPositions;let W,q=UXe;if(c(z)){for(C-=3,W=D,n.push(P),U=0;U<z.length/3;U++)q=f.fromArray(z,3*U,q),F[S++]=W-U-1,F[S++]=W-U,io.addAttribute(A,q,void 0,C),C-=3;n.push(W-Math.floor(z.length/6)),t===Rr.BEVELED&&n.push((C-2)/3+1),x+=3}else{for(x+=3,W=P,n.push(D),U=0;U<j.length/3;U++)q=f.fromArray(j,3*U,q),F[S++]=W+U,F[S++]=W+U+1,io.addAttribute(A,q,x),x+=3;n.push(W+Math.floor(j.length/6)),t===Rr.BEVELED&&n.push(x/3-1),C-=3}for(L=i[I++],M=i[I++],L.splice(0,3),M.splice(M.length-3,3),A.set(L,x),A.set(M,C-M.length+1),m=M.length-3,U=0;U<M.length;U+=3)P=x/3,v=P-1,D=(C-2)/3,w=D+1,F[S++]=w,F[S++]=D,F[S++]=v,F[S++]=P,x+=3,C-=3;x-=3,C+=3,n.push(x/3,(C-2)/3)}if(_){x+=3,C-=3,R=QJ,N=JJ;const U=r[1];for(d=0;d<B;d++)R=f.fromArray(U,3*(p-d-1),R),N=f.fromArray(U,3*d,N),io.addAttribute(A,R,void 0,C),io.addAttribute(A,N,x),P=x/3,v=P-1,D=(C-2)/3,w=D+1,F[S++]=w,F[S++]=D,F[S++]=v,F[S++]=P,x+=3,C-=3;n.push(x/3)}else n.push(x/3,(C-2)/3);return F[S++]=x/3,F[S++]=(C-2)/3,s.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:A}),{attributes:s,indices:F,wallIndices:n}}function jC(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions,n=e.width;T.typeOf.object("options.positions",t),T.typeOf.number("options.width",n);const i=g(e.height,0),o=g(e.extrudedHeight,i);this._positions=t,this._ellipsoid=ge.clone(g(e.ellipsoid,ge.WGS84)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=g(e.cornerType,Rr.ROUNDED),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*f.packedLength+ge.packedLength+6}jC.pack=function(e,t,n){T.typeOf.object("value",e),T.typeOf.object("array",t),n=g(n,0);const i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=f.packedLength)f.pack(i[r],t,n);return ge.pack(e._ellipsoid,t,n),n+=ge.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=g(e._offsetAttribute,-1),t};const tee=ge.clone(ge.UNIT_SPHERE),Pm={positions:void 0,ellipsoid:tee,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};jC.unpack=function(e,t,n){T.typeOf.object("array",e),t=g(t,0);const i=e[t++],o=new Array(i);for(let m=0;m<i;++m,t+=f.packedLength)o[m]=f.unpack(e,t);const r=ge.unpack(e,t,tee);t+=ge.packedLength;const s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t];return c(n)?(n._positions=o,n._ellipsoid=ge.clone(r,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=l,n._cornerType=u,n._granularity=d,n._offsetAttribute=-1===h?void 0:h,n):(Pm.positions=o,Pm.width=s,Pm.height=a,Pm.extrudedHeight=l,Pm.cornerType=u,Pm.granularity=d,Pm.offsetAttribute=-1===h?void 0:h,new jC(Pm))},jC.createGeometry=function(e){let t=e._positions;const n=e._width,i=e._ellipsoid;t=function zXe(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}(t,i);const o=wa(t,f.equalsEpsilon);if(o.length<2||n<=0)return;const r=e._height,s=e._extrudedHeight,a=!O.equalsEpsilon(r,s,0,O.EPSILON2),l={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};let u;if(a)l.height=r,l.extrudedHeight=s,l.offsetAttribute=e._offsetAttribute,u=function VXe(e){const t=e.ellipsoid,i=eee(io.computePositions(e),e.cornerType),o=i.wallIndices,r=e.height,s=e.extrudedHeight,a=i.attributes,l=i.indices;let u=a.position.values,d=u.length,h=new Float64Array(d);h.set(u);const m=new Float64Array(2*d);if(u=po.scaleToGeodeticHeight(u,r,t),h=po.scaleToGeodeticHeight(h,s,t),m.set(u),m.set(h,d),a.position.values=m,d/=3,c(e.offsetAttribute)){let w=new Uint8Array(2*d);w=e.offsetAttribute===Yn.TOP?w.fill(1,0,d):w.fill(e.offsetAttribute===Yn.NONE?0:1),a.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:w})}let _;const p=l.length,y=Ot.createTypedArray(m.length/3,2*(p+o.length));y.set(l);let x,C,A=p;for(_=0;_<p;_+=2){const v=l[_+1];y[A++]=l[_]+d,y[A++]=v+d}for(_=0;_<o.length;_++)x=o[_],C=x+d,y[A++]=x,y[A++]=C;return{attributes:a,indices:y}}(l);else if(u=eee(io.computePositions(l),l.cornerType),u.attributes.position.values=po.scaleToGeodeticHeight(u.attributes.position.values,r,i),c(e._offsetAttribute)){const p=e._offsetAttribute===Yn.NONE?0:1,y=new Uint8Array(u.attributes.position.values.length/3).fill(p);u.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}const d=u.attributes,h=be.fromVertices(d.position.values,void 0,3);return new Cn({attributes:d,indices:u.indices,primitiveType:At.LINES,boundingSphere:h,offsetAttribute:e._offsetAttribute})};const HXe=jC,GXe=new xo(0);function ac(e){Oo.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}c(Object.create)&&((ac.prototype=Object.create(Oo.prototype)).constructor=ac),Object.defineProperties(ac.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),ac.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!c(t.height)&&!c(t.extrudedHeight)&&$0.isSupported(this._scene)},ac.prototype._getIsClosed=function(e){const t=e.height,n=e.extrudedHeight;return 0===t||c(n)&&n!==t},ac.prototype._computeCenter=E.throwInstantiationError,ac.prototype._onEntityPropertyChanged=function(e,t,n,i){if(Oo.prototype._onEntityPropertyChanged.call(this,e,t,n,i),-1===this._observedPropertyNames.indexOf(t))return;const o=this._entity[this._geometryPropertyName];if(!c(o))return;c(o.zIndex)&&(c(o.height)||c(o.extrudedHeight))&&gn(gn.geometryZIndex),this._zIndex=g(o.zIndex,GXe),c(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);const r=o.heightReference,s=o.extrudedHeightReference;if(c(r)||c(s)){const a=new cM(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new EJ(this._scene,a,r,s)}},ac.prototype.destroy=function(){c(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),Oo.prototype.destroy.call(this)},ac.getGeometryHeight=function(e,t){if(T.defined("heightReference",t),c(e))return t!==Qt.CLAMP_TO_GROUND?e:0;t!==Qt.NONE&&gn(gn.geometryHeightReference)},ac.getGeometryExtrudedHeight=function(e,t){if(T.defined("extrudedHeightReference",t),c(e))return t!==Qt.CLAMP_TO_GROUND?e:ac.CLAMP_TO_GROUND;t!==Qt.NONE&&gn(gn.geometryExtrudedHeightReference)},ac.CLAMP_TO_GROUND="clamp",ac.computeGeometryOffsetAttribute=function(e,t,n,i){(!c(e)||!c(t))&&(t=Qt.NONE),(!c(n)||!c(i))&&(i=Qt.NONE);let o=0;return t!==Qt.NONE&&o++,i===Qt.RELATIVE_TO_GROUND&&o++,2===o?Yn.ALL:1===o?Yn.TOP:void 0};const pi=ac,nee=new X,iee=f.ZERO,oee=new f,ree=new Ce;function jXe(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function ad(e,t){pi.call(this,{entity:e,scene:t,geometryOptions:new jXe(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function Rb(e,t,n){_o.call(this,e,t,n)}c(Object.create)&&((ad.prototype=Object.create(pi.prototype)).constructor=ad),ad.prototype.createFillGeometryInstance=function(e){if(T.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i={show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:mo.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Fn){let o;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,nee)),c(o)||(o=X.WHITE),i.color=ti.fromColor(o)}return c(this._options.offsetAttribute)&&(i.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,iee,oee))),new Un({id:t,geometry:new O3(this._options),attributes:i})},ad.prototype.createOutlineGeometryInstance=function(e){if(T.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,X.BLACK,nee),o={show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ti.fromColor(i),distanceDisplayCondition:mo.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return c(this._options.offsetAttribute)&&(o.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,iee,oee))),new Un({id:t,geometry:new HXe(this._options),attributes:o})},ad.prototype._computeCenter=function(e,t){const n=te.getValueOrUndefined(this._entity.corridor.positions,e);if(c(n)&&0!==n.length)return f.clone(n[Math.floor(n.length/2)],t)},ad.prototype._isHidden=function(e,t){return!c(t.positions)||!c(t.width)||Oo.prototype._isHidden.call(this,e,t)},ad.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!te.isConstant(t.height)||!te.isConstant(t.extrudedHeight)||!te.isConstant(t.granularity)||!te.isConstant(t.width)||!te.isConstant(t.outlineWidth)||!te.isConstant(t.cornerType)||!te.isConstant(t.zIndex)||this._onTerrain&&!te.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Fn)},ad.prototype._setStaticOptions=function(e,t){let n=te.getValueOrUndefined(t.height,St.MINIMUM_VALUE);const i=te.getValueOrDefault(t.heightReference,St.MINIMUM_VALUE,Qt.NONE);let o=te.getValueOrUndefined(t.extrudedHeight,St.MINIMUM_VALUE);const r=te.getValueOrDefault(t.extrudedHeightReference,St.MINIMUM_VALUE,Qt.NONE);c(o)&&!c(n)&&(n=0);const s=this._options;s.vertexFormat=this._materialProperty instanceof Fn?yi.VERTEX_FORMAT:ia.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(St.MINIMUM_VALUE,s.positions),s.width=t.width.getValue(St.MINIMUM_VALUE),s.granularity=te.getValueOrUndefined(t.granularity,St.MINIMUM_VALUE),s.cornerType=te.getValueOrUndefined(t.cornerType,St.MINIMUM_VALUE),s.offsetAttribute=pi.computeGeometryOffsetAttribute(n,i,o,r),s.height=pi.getGeometryHeight(n,i),o=pi.getGeometryExtrudedHeight(o,r),o===pi.CLAMP_TO_GROUND&&(o=wo.getMinimumMaximumHeights(O3.computeRectangle(s,ree)).minimumTerrainHeight),s.extrudedHeight=o},ad.DynamicGeometryUpdater=Rb,c(Object.create)&&((Rb.prototype=Object.create(_o.prototype)).constructor=Rb),Rb.prototype._isHidden=function(e,t,n){const i=this._options;return!c(i.positions)||!c(i.width)||_o.prototype._isHidden.call(this,e,t,n)},Rb.prototype._setOptions=function(e,t,n){const i=this._options;let o=te.getValueOrUndefined(t.height,n);const r=te.getValueOrDefault(t.heightReference,n,Qt.NONE);let s=te.getValueOrUndefined(t.extrudedHeight,n);const a=te.getValueOrDefault(t.extrudedHeightReference,n,Qt.NONE);c(s)&&!c(o)&&(o=0),i.positions=te.getValueOrUndefined(t.positions,n),i.width=te.getValueOrUndefined(t.width,n),i.granularity=te.getValueOrUndefined(t.granularity,n),i.cornerType=te.getValueOrUndefined(t.cornerType,n),i.offsetAttribute=pi.computeGeometryOffsetAttribute(o,r,s,a),i.height=pi.getGeometryHeight(o,r),s=pi.getGeometryExtrudedHeight(s,a),s===pi.CLAMP_TO_GROUND&&(s=wo.getMinimumMaximumHeights(O3.computeRectangle(i,ree)).minimumTerrainHeight),i.extrudedHeight=s};const WXe=ad,see={computePositions:function(e,t,n,i,o){const r=.5*e,s=-r,a=i+i,u=new Float64Array(3*(o?2*a:a));let d,h=0,m=0;const _=o?3*a:0,p=o?3*(a+i):3*i;for(d=0;d<i;d++){const y=d/i*O.TWO_PI,A=Math.cos(y),x=Math.sin(y),C=A*n,w=x*n,v=A*t,D=x*t;u[m+_]=C,u[m+_+1]=w,u[m+_+2]=s,u[m+p]=v,u[m+p+1]=D,u[m+p+2]=r,m+=3,o&&(u[h++]=C,u[h++]=w,u[h++]=s,u[h++]=v,u[h++]=D,u[h++]=r)}return u}},aee=see,L3=new G,qXe=new f,YXe=new f,XXe=new f,ZXe=new f;function Wh(e){const t=(e=g(e,g.EMPTY_OBJECT)).length,n=e.topRadius,i=e.bottomRadius,o=g(e.vertexFormat,et.DEFAULT),r=g(e.slices,128);if(!c(t))throw new E("options.length must be defined.");if(!c(n))throw new E("options.topRadius must be defined.");if(!c(i))throw new E("options.bottomRadius must be defined.");if(r<3)throw new E("options.slices must be greater than or equal to 3.");if(c(e.offsetAttribute)&&e.offsetAttribute===Yn.TOP)throw new E("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=et.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}Wh.packedLength=et.packedLength+5,Wh.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),et.pack(e._vertexFormat,t,n),n+=et.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=g(e._offsetAttribute,-1),t};const cee=new et,Nb={vertexFormat:cee,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};let R3;Wh.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);const i=et.unpack(e,t,cee);t+=et.packedLength;const o=e[t++],r=e[t++],s=e[t++],a=e[t++],l=e[t];return c(n)?(n._vertexFormat=et.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=-1===l?void 0:l,n):(Nb.length=o,Nb.topRadius=r,Nb.bottomRadius=s,Nb.slices=a,Nb.offsetAttribute=-1===l?void 0:l,new Wh(Nb))},Wh.createGeometry=function(e){let t=e._length;const n=e._topRadius,i=e._bottomRadius,o=e._vertexFormat,r=e._slices;if(t<=0||n<0||i<0||0===n&&0===i)return;const s=r+r,a=r+s,l=s+s,u=aee.computePositions(t,n,i,r,!0),d=o.st?new Float32Array(2*l):void 0,h=o.normal?new Float32Array(3*l):void 0,m=o.tangent?new Float32Array(3*l):void 0,_=o.bitangent?new Float32Array(3*l):void 0;let p;const y=o.normal||o.tangent||o.bitangent;if(y){const N=o.tangent||o.bitangent;let R=0,B=0,F=0;const S=Math.atan2(i-n,t),I=qXe;I.z=Math.sin(S);const L=Math.cos(S);let M=XXe,U=YXe;for(p=0;p<r;p++){const z=p/r*O.TWO_PI,j=L*Math.cos(z),W=L*Math.sin(z);y&&(I.x=j,I.y=W,N&&(M=f.normalize(f.cross(f.UNIT_Z,I,M),M)),o.normal&&(h[R++]=I.x,h[R++]=I.y,h[R++]=I.z,h[R++]=I.x,h[R++]=I.y,h[R++]=I.z),o.tangent&&(m[B++]=M.x,m[B++]=M.y,m[B++]=M.z,m[B++]=M.x,m[B++]=M.y,m[B++]=M.z),o.bitangent&&(U=f.normalize(f.cross(I,M,U),U),_[F++]=U.x,_[F++]=U.y,_[F++]=U.z,_[F++]=U.x,_[F++]=U.y,_[F++]=U.z))}for(p=0;p<r;p++)o.normal&&(h[R++]=0,h[R++]=0,h[R++]=-1),o.tangent&&(m[B++]=1,m[B++]=0,m[B++]=0),o.bitangent&&(_[F++]=0,_[F++]=-1,_[F++]=0);for(p=0;p<r;p++)o.normal&&(h[R++]=0,h[R++]=0,h[R++]=1),o.tangent&&(m[B++]=1,m[B++]=0,m[B++]=0),o.bitangent&&(_[F++]=0,_[F++]=1,_[F++]=0)}const x=Ot.createTypedArray(l,12*r-12);let C=0,w=0;for(p=0;p<r-1;p++)x[C++]=w,x[C++]=w+2,x[C++]=w+3,x[C++]=w,x[C++]=w+3,x[C++]=w+1,w+=2;for(x[C++]=s-2,x[C++]=0,x[C++]=1,x[C++]=s-2,x[C++]=1,x[C++]=s-1,p=1;p<r-1;p++)x[C++]=s+p+1,x[C++]=s+p,x[C++]=s;for(p=1;p<r-1;p++)x[C++]=a,x[C++]=a+p,x[C++]=a+p+1;let v=0;if(o.st){const N=Math.max(n,i);for(p=0;p<l;p++){const R=f.fromArray(u,3*p,ZXe);d[v++]=(R.x+N)/(2*N),d[v++]=(R.y+N)/(2*N)}}const D=new lo;o.position&&(D.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:u})),o.normal&&(D.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:h})),o.tangent&&(D.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:m})),o.bitangent&&(D.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:_})),o.st&&(D.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:d})),L3.x=.5*t,L3.y=Math.max(i,n);const P=new be(f.ZERO,G.magnitude(L3));if(c(e._offsetAttribute)){t=u.length;const N=e._offsetAttribute===Yn.NONE?0:1,R=new Uint8Array(t/3).fill(N);D.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:R})}return new Cn({attributes:D,indices:x,primitiveType:At.TRIANGLES,boundingSphere:P,offsetAttribute:e._offsetAttribute})},Wh.getUnitCylinder=function(){return c(R3)||(R3=Wh.createGeometry(new Wh({topRadius:1,bottomRadius:1,length:1,vertexFormat:et.POSITION_ONLY}))),R3};const $Xe=Wh,N3=new G;function Mb(e){const t=(e=g(e,g.EMPTY_OBJECT)).length,n=e.topRadius,i=e.bottomRadius,o=g(e.slices,128),r=Math.max(g(e.numberOfVerticalLines,16),0);if(T.typeOf.number("options.positions",t),T.typeOf.number("options.topRadius",n),T.typeOf.number("options.bottomRadius",i),T.typeOf.number.greaterThanOrEquals("options.slices",o,3),c(e.offsetAttribute)&&e.offsetAttribute===Yn.TOP)throw new E("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}Mb.packedLength=6,Mb.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=g(e._offsetAttribute,-1),t};const Yg={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};Mb.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=e[t++],o=e[t++],r=e[t++],s=e[t++],a=e[t++],l=e[t];return c(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=-1===l?void 0:l,n):(Yg.length=i,Yg.topRadius=o,Yg.bottomRadius=r,Yg.slices=s,Yg.numberOfVerticalLines=a,Yg.offsetAttribute=-1===l?void 0:l,new Mb(Yg))},Mb.createGeometry=function(e){let t=e._length;const n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||0===n&&0===i)return;const s=2*o,a=aee.computePositions(t,n,i,o,!1);let u,l=2*o;if(r>0){const y=Math.min(r,o);u=Math.round(o/y),l+=y}const d=Ot.createTypedArray(s,2*l);let m,h=0;for(m=0;m<o-1;m++)d[h++]=m,d[h++]=m+1,d[h++]=m+o,d[h++]=m+1+o;if(d[h++]=o-1,d[h++]=0,d[h++]=o+o-1,d[h++]=o,r>0)for(m=0;m<o;m+=u)d[h++]=m,d[h++]=m+o;const _=new lo;_.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:a}),N3.x=.5*t,N3.y=Math.max(i,n);const p=new be(f.ZERO,G.magnitude(N3));if(c(e._offsetAttribute)){t=a.length;const y=e._offsetAttribute===Yn.NONE?0:1,A=new Uint8Array(t/3).fill(y);_.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}return new Cn({attributes:_,indices:d,primitiveType:At.LINES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};const KXe=Mb,lee=f.ZERO,uee=new f,QXe=new f,dee=new X;function JXe(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function pl(e,t){Oo.call(this,{entity:e,scene:t,geometryOptions:new JXe(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function Fb(e,t,n){_o.call(this,e,t,n)}c(Object.create)&&((pl.prototype=Object.create(Oo.prototype)).constructor=pl),Object.defineProperties(pl.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),pl.prototype.createFillGeometryInstance=function(e){if(T.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i=new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),s={show:i,distanceDisplayCondition:mo.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};if(this._materialProperty instanceof Fn){let a;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,dee)),c(a)||(a=X.WHITE),s.color=ti.fromColor(a)}return c(this._options.offsetAttribute)&&(s.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,lee,uee))),new Un({id:t,geometry:new $Xe(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:s})},pl.prototype.createOutlineGeometryInstance=function(e){if(T.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,X.BLACK,dee),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ti.fromColor(i),distanceDisplayCondition:mo.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,lee,uee))),new Un({id:t,geometry:new KXe(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:r})},pl.prototype._computeCenter=function(e,t){return te.getValueOrUndefined(this._entity.position,e,t)},pl.prototype._isHidden=function(e,t){return!c(e.position)||!c(t.length)||!c(t.topRadius)||!c(t.bottomRadius)||Oo.prototype._isHidden.call(this,e,t)},pl.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&te.isConstant(e.orientation)&&t.length.isConstant&&t.topRadius.isConstant&&t.bottomRadius.isConstant&&te.isConstant(t.slices)&&te.isConstant(t.outlineWidth)&&te.isConstant(t.numberOfVerticalLines))},pl.prototype._setStaticOptions=function(e,t){const n=te.getValueOrDefault(t.heightReference,St.MINIMUM_VALUE,Qt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Fn?yi.VERTEX_FORMAT:ia.MaterialSupport.TEXTURED.vertexFormat,i.length=t.length.getValue(St.MINIMUM_VALUE),i.topRadius=t.topRadius.getValue(St.MINIMUM_VALUE),i.bottomRadius=t.bottomRadius.getValue(St.MINIMUM_VALUE),i.slices=te.getValueOrUndefined(t.slices,St.MINIMUM_VALUE),i.numberOfVerticalLines=te.getValueOrUndefined(t.numberOfVerticalLines,St.MINIMUM_VALUE),i.offsetAttribute=n!==Qt.NONE?Yn.ALL:void 0},pl.prototype._onEntityPropertyChanged=C3,pl.DynamicGeometryUpdater=Fb,c(Object.create)&&((Fb.prototype=Object.create(_o.prototype)).constructor=Fb),Fb.prototype._isHidden=function(e,t,n){const i=this._options,o=te.getValueOrUndefined(e.position,n,QXe);return!c(o)||!c(i.length)||!c(i.topRadius)||!c(i.bottomRadius)||_o.prototype._isHidden.call(this,e,t,n)},Fb.prototype._setOptions=function(e,t,n){const i=te.getValueOrDefault(t.heightReference,n,Qt.NONE),o=this._options;o.length=te.getValueOrUndefined(t.length,n),o.topRadius=te.getValueOrUndefined(t.topRadius,n),o.bottomRadius=te.getValueOrUndefined(t.bottomRadius,n),o.slices=te.getValueOrUndefined(t.slices,n),o.numberOfVerticalLines=te.getValueOrUndefined(t.numberOfVerticalLines,n),o.offsetAttribute=i!==Qt.NONE?Yn.ALL:void 0};const eZe=pl;function Bb(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new _n}Bb.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))},Bb.prototype.remove=function(e){const t=e.id,n=this._dynamicUpdaters.get(t);c(n)&&(this._dynamicUpdaters.remove(t),n.destroy())},Bb.prototype.update=function(e){const t=this._dynamicUpdaters.values;for(let n=0,i=t.length;n<i;n++)t[n].update(e);return!0},Bb.prototype.removeAllPrimitives=function(){const e=this._dynamicUpdaters.values;for(let t=0,n=e.length;t<n;t++)e[t].destroy();this._dynamicUpdaters.removeAll()},Bb.prototype.getBoundingSphere=function(e,t){return e=this._dynamicUpdaters.get(e.id),c(e)&&c(e.getBoundingSphere)?e.getBoundingSphere(t):$t.FAILED};const fee=Bb,M3={},kI=new f,hee=new f,pee=new yt,mee=new ne;function kb(e,t,n,i,o,r,s,a,l,u){const d=e+t;f.multiplyByScalar(i,Math.cos(d),kI),f.multiplyByScalar(n,Math.sin(d),hee),f.add(kI,hee,kI);let h=Math.cos(e);h*=h;let m=Math.sin(e);m*=m;const p=r/Math.sqrt(s*h+o*m)/a;return yt.fromAxisAngle(kI,p,pee),ne.fromQuaternion(pee,mee),ne.multiplyByVector(mee,l,u),f.normalize(u,u),f.multiplyByScalar(u,a,u),u}const _ee=new f,gee=new f,F3=new f,tZe=new f;M3.raisePositionsToHeight=function(e,t,n){const i=t.ellipsoid,o=t.height,r=t.extrudedHeight,a=new Float64Array(3*(n?e.length/3*2:e.length/3)),l=e.length,u=n?l:0;for(let d=0;d<l;d+=3){const h=d+1,m=d+2,_=f.fromArray(e,d,_ee);i.scaleToGeodeticSurface(_,_);const p=f.clone(_,gee),y=i.geodeticSurfaceNormal(_,tZe),A=f.multiplyByScalar(y,o,F3);f.add(_,A,_),n&&(f.multiplyByScalar(y,r,A),f.add(p,A,p),a[d+u]=p.x,a[h+u]=p.y,a[m+u]=p.z),a[d]=_.x,a[h]=_.y,a[m]=_.z}return a};const nZe=new f,iZe=new f,oZe=new f;M3.computeEllipsePositions=function(e,t,n){const i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,s=e.center,a=8*e.granularity,l=i*i,u=o*o,d=o*i,h=f.magnitude(s),m=f.normalize(s,nZe);let _=f.cross(f.UNIT_Z,s,iZe);_=f.normalize(_,_);const p=f.cross(m,_,oZe);let y=1+Math.ceil(O.PI_OVER_TWO/a);const A=O.PI_OVER_TWO/(y-1);let x=O.PI_OVER_TWO-y*A;x<0&&(y-=Math.ceil(Math.abs(x)/A));const w=t?new Array(y*(y+2)*2*3):void 0;let v=0,D=_ee,P=gee;const N=4*y*3;let R=N-1,B=0;const F=n?new Array(N):void 0;let S,I,L,M,U;for(x=O.PI_OVER_TWO,D=kb(x,r,p,_,l,d,u,h,m,D),t&&(w[v++]=D.x,w[v++]=D.y,w[v++]=D.z),n&&(F[R--]=D.z,F[R--]=D.y,F[R--]=D.x),x=O.PI_OVER_TWO-A,S=1;S<y+1;++S){if(D=kb(x,r,p,_,l,d,u,h,m,D),P=kb(Math.PI-x,r,p,_,l,d,u,h,m,P),t){for(w[v++]=D.x,w[v++]=D.y,w[v++]=D.z,L=2*S+2,I=1;I<L-1;++I)M=I/(L-1),U=f.lerp(D,P,M,F3),w[v++]=U.x,w[v++]=U.y,w[v++]=U.z;w[v++]=P.x,w[v++]=P.y,w[v++]=P.z}n&&(F[R--]=D.z,F[R--]=D.y,F[R--]=D.x,F[B++]=P.x,F[B++]=P.y,F[B++]=P.z),x=O.PI_OVER_TWO-(S+1)*A}for(S=y;S>1;--S){if(x=O.PI_OVER_TWO-(S-1)*A,D=kb(-x,r,p,_,l,d,u,h,m,D),P=kb(x+Math.PI,r,p,_,l,d,u,h,m,P),t){for(w[v++]=D.x,w[v++]=D.y,w[v++]=D.z,L=2*(S-1)+2,I=1;I<L-1;++I)M=I/(L-1),U=f.lerp(D,P,M,F3),w[v++]=U.x,w[v++]=U.y,w[v++]=U.z;w[v++]=P.x,w[v++]=P.y,w[v++]=P.z}n&&(F[R--]=D.z,F[R--]=D.y,F[R--]=D.x,F[B++]=P.x,F[B++]=P.y,F[B++]=P.z)}x=O.PI_OVER_TWO,D=kb(-x,r,p,_,l,d,u,h,m,D);const z={};return t&&(w[v++]=D.x,w[v++]=D.y,w[v++]=D.z,z.positions=w,z.numPts=y),n&&(F[R--]=D.z,F[R--]=D.y,F[R--]=D.x,z.outerPositions=F),z};const qh=M3,Ub=new f,B3=new f,k3=new f,yee=new f,os=new G,bee=new ne,rZe=new ne,U3=new yt,Aee=new f,Tee=new f,xee=new f,UI=new Se,Cee=new f,Eee=new G,wee=new G;function See(e,t,n){const i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,l=t.stRotation,u=n?e.length/3*2:e.length/3,d=t.shadowVolume,h=i.st?new Float32Array(2*u):void 0,m=i.normal?new Float32Array(3*u):void 0,_=i.tangent?new Float32Array(3*u):void 0,p=i.bitangent?new Float32Array(3*u):void 0,y=d?new Float32Array(3*u):void 0;let A=0,x=Aee,C=Tee,w=xee;const v=new Yr(a),D=v.project(a.cartesianToCartographic(o,UI),Cee),P=a.scaleToGeodeticSurface(o,Ub);a.geodeticSurfaceNormal(P,P);let N=bee,R=rZe;if(0!==l){let U=yt.fromAxisAngle(P,l,U3);N=ne.fromQuaternion(U,N),U=yt.fromAxisAngle(P,-l,U3),R=ne.fromQuaternion(U,R)}else N=ne.clone(ne.IDENTITY,N),R=ne.clone(ne.IDENTITY,R);const B=G.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Eee),F=G.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,wee);let S=e.length;const I=n?S:0,L=I/3*2;for(let U=0;U<S;U+=3){const z=U+1,j=U+2,W=f.fromArray(e,U,Ub);if(i.st){const q=ne.multiplyByVector(N,W,B3),V=v.project(a.cartesianToCartographic(q,UI),k3);f.subtract(V,D,V),os.x=(V.x+r)/(2*r),os.y=(V.y+s)/(2*s),B.x=Math.min(os.x,B.x),B.y=Math.min(os.y,B.y),F.x=Math.max(os.x,F.x),F.y=Math.max(os.y,F.y),n&&(h[A+L]=os.x,h[A+1+L]=os.y),h[A++]=os.x,h[A++]=os.y}(i.normal||i.tangent||i.bitangent||d)&&(x=a.geodeticSurfaceNormal(W,x),d&&(y[U+I]=-x.x,y[z+I]=-x.y,y[j+I]=-x.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(C=f.normalize(f.cross(f.UNIT_Z,x,C),C),ne.multiplyByVector(R,C,C)),i.normal&&(m[U]=x.x,m[z]=x.y,m[j]=x.z,n&&(m[U+I]=-x.x,m[z+I]=-x.y,m[j+I]=-x.z)),i.tangent&&(_[U]=C.x,_[z]=C.y,_[j]=C.z,n&&(_[U+I]=-C.x,_[z+I]=-C.y,_[j+I]=-C.z)),i.bitangent&&(w=f.normalize(f.cross(x,C,w),w),p[U]=w.x,p[z]=w.y,p[j]=w.z,n&&(p[U+I]=w.x,p[z+I]=w.y,p[j+I]=w.z))))}if(i.st){S=h.length;for(let U=0;U<S;U+=2)h[U]=(h[U]-B.x)/(F.x-B.x),h[U+1]=(h[U+1]-B.y)/(F.y-B.y)}const M=new lo;if(i.position){const U=qh.raisePositionsToHeight(e,t,n);M.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:U})}if(i.st&&(M.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:h})),i.normal&&(M.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:m})),i.tangent&&(M.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:_})),i.bitangent&&(M.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:p})),d&&(M.extrudeDirection=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:y})),n&&c(t.offsetAttribute)){let U=new Uint8Array(u);U=t.offsetAttribute===Yn.TOP?U.fill(1,0,u/2):U.fill(t.offsetAttribute===Yn.NONE?0:1),M.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:U})}return M}function vee(e){const t=new Array(e*(e+1)*12-6);let i,o,r,s,a,n=0;for(i=0,r=1,s=0;s<3;s++)t[n++]=r++,t[n++]=i,t[n++]=r;for(s=2;s<e+1;++s){for(r=s*(s+1)-1,i=(s-1)*s-1,t[n++]=r++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=r++,t[n++]=i,t[n++]=r}for(o=2*e,++r,++i,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;for(t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i++,t[n++]=i,++i,s=e-1;s>1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=i++,t[n++]=i++,t[n++]=r++}for(s=0;s<3;s++)t[n++]=i++,t[n++]=i,t[n++]=r;return t}let Xg=new f;const zI=new be,VI=new be;function Dee(e,t,n,i,o,r,s){const l=qh.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,u=l.length/3,d=new Array(u);for(let m=0;m<u;++m)d[m]=f.fromArray(l,3*m);const h=Ce.fromCartesianArray(d,r,s);return h.width>O.PI&&(h.north=h.north>0?O.PI_OVER_TWO-O.EPSILON7:h.north,h.south=h.south<0?O.EPSILON7-O.PI_OVER_TWO:h.south,h.east=O.PI,h.west=-O.PI),h}function pf(e){const t=(e=g(e,g.EMPTY_OBJECT)).center,n=g(e.ellipsoid,ge.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=g(e.granularity,O.RADIANS_PER_DEGREE),s=g(e.vertexFormat,et.DEFAULT);if(T.defined("options.center",t),T.typeOf.number("options.semiMajorAxis",i),T.typeOf.number("options.semiMinorAxis",o),i<o)throw new E("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new E("granularity must be greater than zero.");const a=g(e.height,0),l=g(e.extrudedHeight,a);this._center=f.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=ge.clone(n),this._rotation=g(e.rotation,0),this._stRotation=g(e.stRotation,0),this._height=Math.max(l,a),this._granularity=r,this._vertexFormat=et.clone(s),this._extrudedHeight=Math.min(l,a),this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}pf.packedLength=f.packedLength+ge.packedLength+et.packedLength+9,pf.pack=function(e,t,n){return T.defined("value",e),T.defined("array",t),n=g(n,0),f.pack(e._center,t,n),ge.pack(e._ellipsoid,t,n+=f.packedLength),et.pack(e._vertexFormat,t,n+=ge.packedLength),n+=et.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]=g(e._offsetAttribute,-1),t};const Iee=new f,Pee=new ge,Oee=new et,mf={center:Iee,ellipsoid:Pee,vertexFormat:Oee,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};pf.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=f.unpack(e,t,Iee),o=ge.unpack(e,t+=f.packedLength,Pee),r=et.unpack(e,t+=ge.packedLength,Oee);t+=et.packedLength;const s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t++],m=e[t++],_=1===e[t++],p=e[t];return c(n)?(n._center=f.clone(i,n._center),n._ellipsoid=ge.clone(o,n._ellipsoid),n._vertexFormat=et.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=l,n._stRotation=u,n._height=d,n._granularity=h,n._extrudedHeight=m,n._shadowVolume=_,n._offsetAttribute=-1===p?void 0:p,n):(mf.height=d,mf.extrudedHeight=m,mf.granularity=h,mf.stRotation=u,mf.rotation=l,mf.semiMajorAxis=s,mf.semiMinorAxis=a,mf.shadowVolume=_,mf.offsetAttribute=-1===p?void 0:p,new pf(mf))},pf.computeRectangle=function(e,t){const n=(e=g(e,g.EMPTY_OBJECT)).center,i=g(e.ellipsoid,ge.WGS84),o=e.semiMajorAxis,r=e.semiMinorAxis,s=g(e.granularity,O.RADIANS_PER_DEGREE),a=g(e.rotation,0);if(T.defined("options.center",n),T.typeOf.number("options.semiMajorAxis",o),T.typeOf.number("options.semiMinorAxis",r),o<r)throw new E("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(s<=0)throw new E("granularity must be greater than zero.");return Dee(n,o,r,a,s,i,t)},pf.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;const t=e._height,n=e._extrudedHeight,i=!O.equalsEpsilon(t,n,0,O.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);const 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};let r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=function lZe(e){const t=e.center,n=e.ellipsoid,i=e.semiMajorAxis;let o=f.multiplyByScalar(n.geodeticSurfaceNormal(t,Ub),e.height,Ub);zI.center=f.add(t,o,zI.center),zI.radius=i,o=f.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),VI.center=f.add(t,o,VI.center),VI.radius=i;const r=qh.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,l=r.outerPositions,u=be.union(zI,VI),d=See(s,e,!0);let h=vee(a);const m=h.length;h.length=2*m;const _=s.length/3;for(let v=0;v<m;v+=3)h[v+m]=h[v+2]+_,h[v+1+m]=h[v+1]+_,h[v+2+m]=h[v]+_;const p=Ot.createTypedArray(2*_/3,h),y=new Cn({attributes:d,indices:p,primitiveType:At.TRIANGLES}),A=function aZe(e,t){const n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,s=t.ellipsoid,a=t.height,l=t.extrudedHeight,u=t.stRotation,d=e.length/3*2,h=new Float64Array(3*d),m=n.st?new Float32Array(2*d):void 0,_=n.normal?new Float32Array(3*d):void 0,p=n.tangent?new Float32Array(3*d):void 0,y=n.bitangent?new Float32Array(3*d):void 0,A=t.shadowVolume,x=A?new Float32Array(3*d):void 0;let C=0,w=Aee,v=Tee,D=xee;const P=new Yr(s),N=P.project(s.cartesianToCartographic(i,UI),Cee),R=s.scaleToGeodeticSurface(i,Ub);s.geodeticSurfaceNormal(R,R);const B=yt.fromAxisAngle(R,u,U3),F=ne.fromQuaternion(B,bee),S=G.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Eee),I=G.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,wee);let L=e.length;const M=L/3*2;for(let z=0;z<L;z+=3){const j=z+1,W=z+2;let V,q=f.fromArray(e,z,Ub);if(n.st){const Z=ne.multiplyByVector(F,q,B3),ie=P.project(s.cartesianToCartographic(Z,UI),k3);f.subtract(ie,N,ie),os.x=(ie.x+o)/(2*o),os.y=(ie.y+r)/(2*r),S.x=Math.min(os.x,S.x),S.y=Math.min(os.y,S.y),I.x=Math.max(os.x,I.x),I.y=Math.max(os.y,I.y),m[C+M]=os.x,m[C+1+M]=os.y,m[C++]=os.x,m[C++]=os.y}q=s.scaleToGeodeticSurface(q,q),V=f.clone(q,B3),w=s.geodeticSurfaceNormal(q,w),A&&(x[z+L]=-w.x,x[j+L]=-w.y,x[W+L]=-w.z);let $=f.multiplyByScalar(w,a,yee);if(q=f.add(q,$,q),$=f.multiplyByScalar(w,l,$),V=f.add(V,$,V),n.position&&(h[z+L]=V.x,h[j+L]=V.y,h[W+L]=V.z,h[z]=q.x,h[j]=q.y,h[W]=q.z),n.normal||n.tangent||n.bitangent){D=f.clone(w,D);const Z=f.fromArray(e,(z+3)%L,yee);f.subtract(Z,q,Z);const ie=f.subtract(V,q,k3);w=f.normalize(f.cross(ie,Z,w),w),n.normal&&(_[z]=w.x,_[j]=w.y,_[W]=w.z,_[z+L]=w.x,_[j+L]=w.y,_[W+L]=w.z),n.tangent&&(v=f.normalize(f.cross(D,w,v),v),p[z]=v.x,p[j]=v.y,p[W]=v.z,p[z+L]=v.x,p[z+1+L]=v.y,p[z+2+L]=v.z),n.bitangent&&(y[z]=D.x,y[j]=D.y,y[W]=D.z,y[z+L]=D.x,y[j+L]=D.y,y[W+L]=D.z)}}if(n.st){L=m.length;for(let z=0;z<L;z+=2)m[z]=(m[z]-S.x)/(I.x-S.x),m[z+1]=(m[z+1]-S.y)/(I.y-S.y)}const U=new lo;if(n.position&&(U.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:h})),n.st&&(U.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:m})),n.normal&&(U.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:_})),n.tangent&&(U.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:p})),n.bitangent&&(U.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:y})),A&&(U.extrudeDirection=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:x})),c(t.offsetAttribute)){let z=new Uint8Array(d);z=t.offsetAttribute===Yn.TOP?z.fill(1,0,d/2):z.fill(t.offsetAttribute===Yn.NONE?0:1),U.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return U}(l,e);h=function cZe(e){const t=e.length/3,n=Ot.createTypedArray(t,6*t);let i=0;for(let o=0;o<t;o++){const s=o+t,a=(o+1)%t,l=a+t;n[i++]=o,n[i++]=s,n[i++]=a,n[i++]=a,n[i++]=s,n[i++]=l}return n}(l);const x=Ot.createTypedArray(2*l.length/3,h),C=new Cn({attributes:A,indices:x,primitiveType:At.TRIANGLES}),w=uo.combineInstances([new Un({geometry:y}),new Un({geometry:C})]);return{boundingSphere:u,attributes:w[0].attributes,indices:w[0].indices}}(o);else if(r=function sZe(e){const t=e.center;Xg=f.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,Xg),e.height,Xg),Xg=f.add(t,Xg,Xg);const n=new be(Xg,e.semiMajorAxis),i=qh.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=See(o,e,!1);let a=vee(r);return a=Ot.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}(o),c(e._offsetAttribute)){const a=e._offsetAttribute===Yn.NONE?0:1,l=new Uint8Array(r.attributes.position.values.length/3).fill(a);r.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:l})}return new Cn({attributes:r.attributes,indices:r.indices,primitiveType:At.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})},pf.createShadowVolume=function(e,t,n){const i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new pf({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:et.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(pf.prototype,{rectangle:{get:function(){return c(this._rectangle)||(this._rectangle=Dee(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return c(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function uZe(e){const t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];const i=qh.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 l=0;l<o;++l)r[l]=f.fromArray(i,3*l);return Cn._textureCoordinateRotationPoints(r,t,e._ellipsoid,e.rectangle)}(this)),this._textureCoordinateRotationPoints}}});const z3=pf,Lee=new f;let Zg=new f;const HI=new be,GI=new be;function zb(e){const t=(e=g(e,g.EMPTY_OBJECT)).center,n=g(e.ellipsoid,ge.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=g(e.granularity,O.RADIANS_PER_DEGREE);if(!c(t))throw new E("center is required.");if(!c(i))throw new E("semiMajorAxis is required.");if(!c(o))throw new E("semiMinorAxis is required.");if(i<o)throw new E("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new E("granularity must be greater than zero.");const s=g(e.height,0),a=g(e.extrudedHeight,s);this._center=f.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=ge.clone(n),this._rotation=g(e.rotation,0),this._height=Math.max(a,s),this._granularity=r,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(g(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}zb.packedLength=f.packedLength+ge.packedLength+8,zb.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),f.pack(e._center,t,n),ge.pack(e._ellipsoid,t,n+=f.packedLength),n+=ge.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=g(e._offsetAttribute,-1),t};const Ree=new f,Nee=new ge,Yh={center:Ree,ellipsoid:Nee,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};zb.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);const i=f.unpack(e,t,Ree),o=ge.unpack(e,t+=f.packedLength,Nee);t+=ge.packedLength;const r=e[t++],s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t++],m=e[t];return c(n)?(n._center=f.clone(i,n._center),n._ellipsoid=ge.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=s,n._rotation=a,n._height=l,n._granularity=u,n._extrudedHeight=d,n._numberOfVerticalLines=h,n._offsetAttribute=-1===m?void 0:m,n):(Yh.height=l,Yh.extrudedHeight=d,Yh.granularity=u,Yh.rotation=a,Yh.semiMajorAxis=r,Yh.semiMinorAxis=s,Yh.numberOfVerticalLines=h,Yh.offsetAttribute=-1===m?void 0:m,new zb(Yh))},zb.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;const t=e._height,n=e._extrudedHeight,i=!O.equalsEpsilon(t,n,0,O.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);const o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines};let r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=function fZe(e){const t=e.center,n=e.ellipsoid,i=e.semiMajorAxis;let o=f.multiplyByScalar(n.geodeticSurfaceNormal(t,Lee),e.height,Lee);HI.center=f.add(t,o,HI.center),HI.radius=i,o=f.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),GI.center=f.add(t,o,GI.center),GI.radius=i;let r=qh.computeEllipsePositions(e,!1,!0).outerPositions;const s=new lo({position:new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:qh.raisePositionsToHeight(r,e,!0)})});r=s.position.values;const a=be.union(HI,GI);let l=r.length/3;if(c(e.offsetAttribute)){let p=new Uint8Array(l);p=e.offsetAttribute===Yn.TOP?p.fill(1,0,l/2):p.fill(e.offsetAttribute===Yn.NONE?0:1),s.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}let u=g(e.numberOfVerticalLines,16);u=O.clamp(u,0,l/2);const d=Ot.createTypedArray(l,2*l+2*u);l/=2;let m,_,h=0;for(m=0;m<l;++m)d[h++]=m,d[h++]=(m+1)%l,d[h++]=m+l,d[h++]=(m+1)%l+l;if(u>0){const p=Math.min(u,l);_=Math.round(l/p);const y=Math.min(_*u,l);for(m=0;m<y;m+=_)d[h++]=m,d[h++]=m+l}return{boundingSphere:a,attributes:s,indices:d}}(o);else if(r=function dZe(e){const t=e.center;Zg=f.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,Zg),e.height,Zg),Zg=f.add(t,Zg,Zg);const n=new be(Zg,e.semiMajorAxis),i=qh.computeEllipsePositions(e,!1,!0).outerPositions,o=new lo({position:new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:qh.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Ot.createTypedArray(r,2*r);let a=0;for(let l=0;l<r;++l)s[a++]=l,s[a++]=(l+1)%r;return{boundingSphere:n,attributes:o,indices:s}}(o),c(e._offsetAttribute)){const a=e._offsetAttribute===Yn.NONE?0:1,l=new Uint8Array(r.attributes.position.values.length/3).fill(a);r.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:l})}return new Cn({attributes:r.attributes,indices:r.indices,primitiveType:At.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};const hZe=zb,Mee=new X,Fee=f.ZERO,Bee=new f,kee=new Ce;function pZe(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function cd(e,t){pi.call(this,{entity:e,scene:t,geometryOptions:new pZe(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function Vb(e,t,n){_o.call(this,e,t,n)}c(Object.create)&&((cd.prototype=Object.create(pi.prototype)).constructor=cd),cd.prototype.createFillGeometryInstance=function(e){if(T.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i={show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:mo.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Fn){let o;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,Mee)),c(o)||(o=X.WHITE),i.color=ti.fromColor(o)}return c(this._options.offsetAttribute)&&(i.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,Fee,Bee))),new Un({id:t,geometry:new z3(this._options),attributes:i})},cd.prototype.createOutlineGeometryInstance=function(e){if(T.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,X.BLACK,Mee),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ti.fromColor(i),distanceDisplayCondition:mo.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,Fee,Bee))),new Un({id:t,geometry:new hZe(this._options),attributes:r})},cd.prototype._computeCenter=function(e,t){return te.getValueOrUndefined(this._entity.position,e,t)},cd.prototype._isHidden=function(e,t){return!c(e.position)||!c(t.semiMajorAxis)||!c(t.semiMinorAxis)||Oo.prototype._isHidden.call(this,e,t)},cd.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!te.isConstant(t.rotation)||!te.isConstant(t.height)||!te.isConstant(t.extrudedHeight)||!te.isConstant(t.granularity)||!te.isConstant(t.stRotation)||!te.isConstant(t.outlineWidth)||!te.isConstant(t.numberOfVerticalLines)||!te.isConstant(t.zIndex)||this._onTerrain&&!te.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Fn)},cd.prototype._setStaticOptions=function(e,t){let n=te.getValueOrUndefined(t.height,St.MINIMUM_VALUE);const i=te.getValueOrDefault(t.heightReference,St.MINIMUM_VALUE,Qt.NONE);let o=te.getValueOrUndefined(t.extrudedHeight,St.MINIMUM_VALUE);const r=te.getValueOrDefault(t.extrudedHeightReference,St.MINIMUM_VALUE,Qt.NONE);c(o)&&!c(n)&&(n=0);const s=this._options;s.vertexFormat=this._materialProperty instanceof Fn?yi.VERTEX_FORMAT:ia.MaterialSupport.TEXTURED.vertexFormat,s.center=e.position.getValue(St.MINIMUM_VALUE,s.center),s.semiMajorAxis=t.semiMajorAxis.getValue(St.MINIMUM_VALUE,s.semiMajorAxis),s.semiMinorAxis=t.semiMinorAxis.getValue(St.MINIMUM_VALUE,s.semiMinorAxis),s.rotation=te.getValueOrUndefined(t.rotation,St.MINIMUM_VALUE),s.granularity=te.getValueOrUndefined(t.granularity,St.MINIMUM_VALUE),s.stRotation=te.getValueOrUndefined(t.stRotation,St.MINIMUM_VALUE),s.numberOfVerticalLines=te.getValueOrUndefined(t.numberOfVerticalLines,St.MINIMUM_VALUE),s.offsetAttribute=pi.computeGeometryOffsetAttribute(n,i,o,r),s.height=pi.getGeometryHeight(n,i),o=pi.getGeometryExtrudedHeight(o,r),o===pi.CLAMP_TO_GROUND&&(o=wo.getMinimumMaximumHeights(z3.computeRectangle(s,kee)).minimumTerrainHeight),s.extrudedHeight=o},cd.DynamicGeometryUpdater=Vb,c(Object.create)&&((Vb.prototype=Object.create(_o.prototype)).constructor=Vb),Vb.prototype._isHidden=function(e,t,n){const i=this._options;return!c(i.center)||!c(i.semiMajorAxis)||!c(i.semiMinorAxis)||_o.prototype._isHidden.call(this,e,t,n)},Vb.prototype._setOptions=function(e,t,n){const i=this._options;let o=te.getValueOrUndefined(t.height,n);const r=te.getValueOrDefault(t.heightReference,n,Qt.NONE);let s=te.getValueOrUndefined(t.extrudedHeight,n);const a=te.getValueOrDefault(t.extrudedHeightReference,n,Qt.NONE);c(s)&&!c(o)&&(o=0),i.center=te.getValueOrUndefined(e.position,n,i.center),i.semiMajorAxis=te.getValueOrUndefined(t.semiMajorAxis,n),i.semiMinorAxis=te.getValueOrUndefined(t.semiMinorAxis,n),i.rotation=te.getValueOrUndefined(t.rotation,n),i.granularity=te.getValueOrUndefined(t.granularity,n),i.stRotation=te.getValueOrUndefined(t.stRotation,n),i.numberOfVerticalLines=te.getValueOrUndefined(t.numberOfVerticalLines,n),i.offsetAttribute=pi.computeGeometryOffsetAttribute(o,r,s,a),i.height=pi.getGeometryHeight(o,r),s=pi.getGeometryExtrudedHeight(s,a),s===pi.CLAMP_TO_GROUND&&(s=wo.getMinimumMaximumHeights(z3.computeRectangle(i,kee)).minimumTerrainHeight),i.extrudedHeight=s};const mZe=cd,_Ze=new Fn(X.WHITE),V3=f.ZERO,H3=new f,gZe=new f,yZe=new f,G3=new X,bZe=new f(1,1,1);function AZe(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function ml(e,t){Oo.call(this,{entity:e,scene:t,geometryOptions:new AZe(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function WC(e,t,n){_o.call(this,e,t,n),this._scene=e._scene,this._modelMatrix=new k,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new f,this._material={}}c(Object.create)&&((ml.prototype=Object.create(Oo.prototype)).constructor=ml),Object.defineProperties(ml.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),ml.prototype.createFillGeometryInstance=function(e,t,n){T.defined("time",e);const i=this._entity,o=i.isAvailable(e);let r;const s=new Oi(o&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),u={show:s,distanceDisplayCondition:mo.fromDistanceDisplayCondition(a),color:void 0,offset:void 0};if(this._materialProperty instanceof Fn){let d;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||o)&&(d=this._materialProperty.color.getValue(e,G3)),c(d)||(d=X.WHITE),r=ti.fromColor(d),u.color=r}return c(this._options.offsetAttribute)&&(u.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,V3,H3))),new Un({id:i,geometry:new cC(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,n),attributes:u})},ml.prototype.createOutlineGeometryInstance=function(e,t,n){T.defined("time",e);const i=this._entity,o=i.isAvailable(e),r=te.getValueOrDefault(this._outlineColorProperty,e,X.BLACK,G3),s=this._distanceDisplayConditionProperty.getValue(e),a={show:new Oi(o&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ti.fromColor(r),distanceDisplayCondition:mo.fromDistanceDisplayCondition(s),offset:void 0};return c(this._options.offsetAttribute)&&(a.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,V3,H3))),new Un({id:i,geometry:new Kp(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,n),attributes:a})},ml.prototype._computeCenter=function(e,t){return te.getValueOrUndefined(this._entity.position,e,t)},ml.prototype._isHidden=function(e,t){return!c(e.position)||!c(t.radii)||Oo.prototype._isHidden.call(this,e,t)},ml.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&te.isConstant(e.orientation)&&t.radii.isConstant&&te.isConstant(t.innerRadii)&&te.isConstant(t.stackPartitions)&&te.isConstant(t.slicePartitions)&&te.isConstant(t.outlineWidth)&&te.isConstant(t.minimumClock)&&te.isConstant(t.maximumClock)&&te.isConstant(t.minimumCone)&&te.isConstant(t.maximumCone)&&te.isConstant(t.subdivisions))},ml.prototype._setStaticOptions=function(e,t){const n=te.getValueOrDefault(t.heightReference,St.MINIMUM_VALUE,Qt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Fn?yi.VERTEX_FORMAT:ia.MaterialSupport.TEXTURED.vertexFormat,i.radii=t.radii.getValue(St.MINIMUM_VALUE,i.radii),i.innerRadii=te.getValueOrUndefined(t.innerRadii,i.radii),i.minimumClock=te.getValueOrUndefined(t.minimumClock,St.MINIMUM_VALUE),i.maximumClock=te.getValueOrUndefined(t.maximumClock,St.MINIMUM_VALUE),i.minimumCone=te.getValueOrUndefined(t.minimumCone,St.MINIMUM_VALUE),i.maximumCone=te.getValueOrUndefined(t.maximumCone,St.MINIMUM_VALUE),i.stackPartitions=te.getValueOrUndefined(t.stackPartitions,St.MINIMUM_VALUE),i.slicePartitions=te.getValueOrUndefined(t.slicePartitions,St.MINIMUM_VALUE),i.subdivisions=te.getValueOrUndefined(t.subdivisions,St.MINIMUM_VALUE),i.offsetAttribute=n!==Qt.NONE?Yn.ALL:void 0},ml.prototype._onEntityPropertyChanged=C3,ml.DynamicGeometryUpdater=WC,c(Object.create)&&((WC.prototype=Object.create(_o.prototype)).constructor=WC),WC.prototype.update=function(e){T.defined("time",e);const t=this._entity,n=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!te.getValueOrDefault(n.show,e,!0))return c(this._primitive)&&(this._primitive.show=!1),void(c(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));const i=te.getValueOrUndefined(n.radii,e,gZe);let o=c(i)?t.computeModelMatrixForHeightReference(e,n.heightReference,.5*i.z,this._scene.mapProjection.ellipsoid,this._modelMatrix):void 0;if(!c(o)||!c(i))return c(this._primitive)&&(this._primitive.show=!1),void(c(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));const r=te.getValueOrDefault(n.fill,e,!0),s=te.getValueOrDefault(n.outline,e,!1),a=te.getValueOrClonedDefault(n.outlineColor,e,X.BLACK,G3),l=oc.getValue(e,g(n.material,_Ze),this._material),u=te.getValueOrUndefined(n.innerRadii,e,yZe),d=te.getValueOrUndefined(n.minimumClock,e),h=te.getValueOrUndefined(n.maximumClock,e),m=te.getValueOrUndefined(n.minimumCone,e),_=te.getValueOrUndefined(n.maximumCone,e),p=te.getValueOrUndefined(n.stackPartitions,e),y=te.getValueOrUndefined(n.slicePartitions,e),A=te.getValueOrUndefined(n.subdivisions,e),x=te.getValueOrDefault(n.outlineWidth,e,1),C=te.getValueOrDefault(n.heightReference,e,Qt.NONE),w=C!==Qt.NONE?Yn.ALL:void 0,v=this._scene.mode,D=v===ce.SCENE3D&&C===Qt.NONE,P=this._options,N=this._geometryUpdater.shadowsProperty.getValue(e),B=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),F=te.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,V3,H3);if(!D||this._lastSceneMode!==v||!c(this._primitive)||P.stackPartitions!==p||P.slicePartitions!==y||c(u)&&!f.equals(P.innerRadii!==u)||P.minimumClock!==d||P.maximumClock!==h||P.minimumCone!==m||P.maximumCone!==_||P.subdivisions!==A||this._lastOutlineWidth!==x||P.offsetAttribute!==w){const I=this._primitives;if(I.removeAndDestroy(this._primitive),I.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=v,this._lastOutlineWidth=x,P.stackPartitions=p,P.slicePartitions=y,P.subdivisions=A,P.offsetAttribute=w,P.radii=f.clone(D?bZe:i,P.radii),c(u))if(D){const z=f.magnitude(i);P.innerRadii=f.fromElements(u.x/z,u.y/z,u.z/z,P.innerRadii)}else P.innerRadii=f.clone(u,P.innerRadii);else P.innerRadii=void 0;P.minimumClock=d,P.maximumClock=h,P.minimumCone=m,P.maximumCone=_;const L=new ia({material:l,translucent:l.isTranslucent(),closed:!0});P.vertexFormat=L.vertexFormat;const M=this._geometryUpdater.createFillGeometryInstance(e,D,this._modelMatrix);this._primitive=I.add(new Xi({geometryInstances:M,appearance:L,asynchronous:!1,shadows:N}));const U=this._geometryUpdater.createOutlineGeometryInstance(e,D,this._modelMatrix);this._outlinePrimitive=I.add(new Xi({geometryInstances:U,appearance:new yi({flat:!0,translucent:255!==U.attributes.color.value[3],renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(x)}}),asynchronous:!1,shadows:N})),this._lastShow=r,this._lastOutlineShow=s,this._lastOutlineColor=X.clone(a,this._lastOutlineColor),this._lastDistanceDisplayCondition=B,this._lastOffset=f.clone(F,this._lastOffset)}else if(this._primitive.ready){const I=this._primitive,L=this._outlinePrimitive;I.show=!0,L.show=!0,I.appearance.material=l;let M=this._attributes;c(M)||(M=I.getGeometryInstanceAttributes(t),this._attributes=M),r!==this._lastShow&&(M.show=Oi.toValue(r,M.show),this._lastShow=r);let U=this._outlineAttributes;c(U)||(U=L.getGeometryInstanceAttributes(t),this._outlineAttributes=U),s!==this._lastOutlineShow&&(U.show=Oi.toValue(s,U.show),this._lastOutlineShow=s),X.equals(a,this._lastOutlineColor)||(U.color=ti.toValue(a,U.color),X.clone(a,this._lastOutlineColor)),Jn.equals(B,this._lastDistanceDisplayCondition)||(M.distanceDisplayCondition=mo.toValue(B,M.distanceDisplayCondition),U.distanceDisplayCondition=mo.toValue(B,U.distanceDisplayCondition),Jn.clone(B,this._lastDistanceDisplayCondition)),f.equals(F,this._lastOffset)||(M.offset=Kr.toValue(F,M.offset),U.offset=Kr.toValue(F,M.offset),f.clone(F,this._lastOffset))}D&&(i.x=Math.max(i.x,.001),i.y=Math.max(i.y,.001),i.z=Math.max(i.z,.001),o=k.multiplyByScale(o,i,o),this._primitive.modelMatrix=o,this._outlinePrimitive.modelMatrix=o)};const TZe=ml;function Hb(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.vertexFormat,et.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}Hb.packedLength=et.packedLength,Hb.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),et.pack(e._vertexFormat,t,n),t};const Uee=new et,xZe={vertexFormat:Uee};Hb.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=et.unpack(e,t,Uee);return c(n)?(n._vertexFormat=et.clone(i,n._vertexFormat),n):new Hb(xZe)};const jI=new f(-.5,-.5,0),WI=new f(.5,.5,0);Hb.createGeometry=function(e){const t=e._vertexFormat,n=new lo;let i,o;if(t.position){if(o=new Float64Array(12),o[0]=jI.x,o[1]=jI.y,o[2]=0,o[3]=WI.x,o[4]=jI.y,o[5]=0,o[6]=WI.x,o[7]=WI.y,o[8]=0,o[9]=jI.x,o[10]=WI.y,o[11]=0,n.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:o}),t.normal){const r=new Float32Array(12);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=1,r[9]=0,r[10]=0,r[11]=1,n.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:r})}if(t.st){const r=new Float32Array(8);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=1,r[5]=1,r[6]=0,r[7]=1,n.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:r})}if(t.tangent){const r=new Float32Array(12);r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r[6]=1,r[7]=0,r[8]=0,r[9]=1,r[10]=0,r[11]=0,n.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:r})}if(t.bitangent){const r=new Float32Array(12);r[0]=0,r[1]=1,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=1,r[8]=0,r[9]=0,r[10]=1,r[11]=0,n.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:r})}i=new Uint16Array(6),i[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3}return new Cn({attributes:n,indices:i,primitiveType:At.TRIANGLES,boundingSphere:new be(f.ZERO,Math.sqrt(2))})};const CZe=Hb;function Gb(){this._workerName="createPlaneOutlineGeometry"}Gb.packedLength=0,Gb.pack=function(e,t){return T.defined("value",e),T.defined("array",t),t},Gb.unpack=function(e,t,n){return T.defined("array",e),c(n)?n:new Gb};const Om=new f(-.5,-.5,0),qI=new f(.5,.5,0);Gb.createGeometry=function(){const e=new lo,t=new Uint16Array(8),n=new Float64Array(12);return n[0]=Om.x,n[1]=Om.y,n[2]=Om.z,n[3]=qI.x,n[4]=Om.y,n[5]=Om.z,n[6]=qI.x,n[7]=qI.y,n[8]=Om.z,n[9]=Om.x,n[10]=qI.y,n[11]=Om.z,e.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:n}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new Cn({attributes:e,indices:t,primitiveType:At.LINES,boundingSphere:new be(f.ZERO,Math.sqrt(2))})};const EZe=Gb,wZe=new f,zee=new X;function SZe(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function ou(e,t){Oo.call(this,{entity:e,scene:t,geometryOptions:new SZe(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}function jb(e,t,n){_o.call(this,e,t,n)}c(Object.create)&&((ou.prototype=Object.create(Oo.prototype)).constructor=ou),ou.prototype.createFillGeometryInstance=function(e){if(T.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e);let i,o;const r=new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=mo.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Fn){let _;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(_=this._materialProperty.color.getValue(e,zee)),c(_)||(_=X.WHITE),o=ti.fromColor(_),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};const l=t.plane,u=this._options;let d=t.computeModelMatrix(e);const h=te.getValueOrDefault(l.plane,e,u.plane),m=te.getValueOrUndefined(l.dimensions,e,u.dimensions);return u.plane=h,u.dimensions=m,d=j3(h,m,d,d),new Un({id:t,geometry:new CZe(this._options),modelMatrix:d,attributes:i})},ou.prototype.createOutlineGeometryInstance=function(e){if(T.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,X.BLACK,zee),o=this._distanceDisplayConditionProperty.getValue(e),r=t.plane,s=this._options;let a=t.computeModelMatrix(e);const l=te.getValueOrDefault(r.plane,e,s.plane),u=te.getValueOrUndefined(r.dimensions,e,s.dimensions);return s.plane=l,s.dimensions=u,a=j3(l,u,a,a),new Un({id:t,geometry:new EZe,modelMatrix:a,attributes:{show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ti.fromColor(i),distanceDisplayCondition:mo.fromDistanceDisplayCondition(o)}})},ou.prototype._isHidden=function(e,t){return!c(t.plane)||!c(t.dimensions)||!c(e.position)||Oo.prototype._isHidden.call(this,e,t)},ou.prototype._getIsClosed=function(e){return!1},ou.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&te.isConstant(e.orientation)&&t.plane.isConstant&&t.dimensions.isConstant&&te.isConstant(t.outlineWidth))},ou.prototype._setStaticOptions=function(e,t){const i=this._options;i.vertexFormat=this._materialProperty instanceof Fn?yi.VERTEX_FORMAT:ia.MaterialSupport.TEXTURED.vertexFormat,i.plane=t.plane.getValue(St.MINIMUM_VALUE,i.plane),i.dimensions=t.dimensions.getValue(St.MINIMUM_VALUE,i.dimensions)},ou.DynamicGeometryUpdater=jb,c(Object.create)&&((jb.prototype=Object.create(_o.prototype)).constructor=jb),jb.prototype._isHidden=function(e,t,n){const i=this._options,o=te.getValueOrUndefined(e.position,n,wZe);return!c(o)||!c(i.plane)||!c(i.dimensions)||_o.prototype._isHidden.call(this,e,t,n)},jb.prototype._setOptions=function(e,t,n){const i=this._options;i.plane=te.getValueOrDefault(t.plane,n,i.plane),i.dimensions=te.getValueOrUndefined(t.dimensions,n,i.dimensions)};const vZe=new f,DZe=new f,IZe=new f,PZe=new f,OZe=new ne,LZe=new ne,RZe=new k;function j3(e,t,n,i){const o=e.normal,s=f.multiplyByScalar(o,-e.distance,IZe);let a=f.clone(f.UNIT_Z,DZe);O.equalsEpsilon(Math.abs(f.dot(a,o)),1,O.EPSILON8)&&(a=f.clone(f.UNIT_Y,a));const l=f.cross(a,o,vZe);a=f.cross(o,l,a),f.normalize(l,l),f.normalize(a,a);const u=OZe;ne.setColumn(u,0,l,u),ne.setColumn(u,1,a,u),ne.setColumn(u,2,o,u);const d=f.fromElements(t.x,t.y,1,PZe),h=ne.multiplyByScale(u,d,LZe),m=k.fromRotationTranslation(h,s,RZe);return k.multiplyTransformation(n,m,i)}ou.createPrimitiveMatrix=j3;const NZe=ou,MZe=new f,FZe=new Vt,BZe=new G,kZe=new G,UZe=new f,zZe=new f,VZe=new f,qC=new f,HZe=new f,GZe=new f,Vee=new yt,jZe=new ne,WZe=new ne,qZe=new f;function YZe(e,t,n,i,o,r,s,a,l){const u=e.positions;let d=po.triangulate(e.positions2D,e.holes);d.length<3&&(d=[0,1,2]);const h=Ot.createTypedArray(u.length,d.length);h.set(d);let m=jZe;if(0!==i){let S=yt.fromAxisAngle(s,i,Vee);if(m=ne.fromQuaternion(S,m),t.tangent||t.bitangent){S=yt.fromAxisAngle(s,-i,Vee);const I=ne.fromQuaternion(S,WZe);a=f.normalize(ne.multiplyByVector(I,a,a),a),t.bitangent&&(l=f.normalize(f.cross(s,a,l),l))}}else m=ne.clone(ne.IDENTITY,m);const _=kZe;t.st&&(_.x=n.x,_.y=n.y);const p=u.length,y=3*p,A=new Float64Array(y),x=t.normal?new Float32Array(y):void 0,C=t.tangent?new Float32Array(y):void 0,w=t.bitangent?new Float32Array(y):void 0,v=t.st?new Float32Array(2*p):void 0;let D=0,P=0,N=0,R=0,B=0;for(let S=0;S<p;S++){const I=u[S];if(A[D++]=I.x,A[D++]=I.y,A[D++]=I.z,t.st)if(c(o)&&o.positions.length===p)v[B++]=o.positions[S].x,v[B++]=o.positions[S].y;else{const M=r(ne.multiplyByVector(m,I,MZe),BZe);G.subtract(M,_,M);const U=O.clamp(M.x/n.width,0,1),z=O.clamp(M.y/n.height,0,1);v[B++]=U,v[B++]=z}t.normal&&(x[P++]=s.x,x[P++]=s.y,x[P++]=s.z),t.tangent&&(C[R++]=a.x,C[R++]=a.y,C[R++]=a.z),t.bitangent&&(w[N++]=l.x,w[N++]=l.y,w[N++]=l.z)}const F=new lo;return t.position&&(F.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:A})),t.normal&&(F.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:x})),t.tangent&&(F.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:C})),t.bitangent&&(F.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:w})),t.st&&(F.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:v})),new Cn({attributes:F,indices:h,primitiveType:At.TRIANGLES})}function $g(e){const t=(e=g(e,g.EMPTY_OBJECT)).polygonHierarchy,n=e.textureCoordinates;T.defined("options.polygonHierarchy",t);const i=g(e.vertexFormat,et.DEFAULT);this._vertexFormat=et.clone(i),this._polygonHierarchy=t,this._stRotation=g(e.stRotation,0),this._ellipsoid=ge.clone(g(e.ellipsoid,ge.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=ui.computeHierarchyPackedLength(t,f)+et.packedLength+ge.packedLength+(c(n)?ui.computeHierarchyPackedLength(n,G):1)+2}$g.fromPositions=function(e){return e=g(e,g.EMPTY_OBJECT),T.defined("options.positions",e.positions),new $g({polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates})},$g.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),n=ui.packPolygonHierarchy(e._polygonHierarchy,t,n,f),ge.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=ge.packedLength),n+=et.packedLength,t[n++]=e._stRotation,c(e._textureCoordinates)?n=ui.packPolygonHierarchy(e._textureCoordinates,t,n,G):t[n++]=-1,t[n++]=e.packedLength,t};const XZe=ge.clone(ge.UNIT_SPHERE),ZZe=new et,$Ze={polygonHierarchy:{}};$g.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=ui.unpackPolygonHierarchy(e,t,f);t=i.startingIndex,delete i.startingIndex;const o=ge.unpack(e,t,XZe),r=et.unpack(e,t+=ge.packedLength,ZZe);t+=et.packedLength;const s=e[t++],a=-1===e[t]?void 0:ui.unpackPolygonHierarchy(e,t,G);c(a)?(t=a.startingIndex,delete a.startingIndex):t++;const l=e[t++];return c(n)||(n=new $g($Ze)),n._polygonHierarchy=i,n._ellipsoid=ge.clone(o,n._ellipsoid),n._vertexFormat=et.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=l,n},$g.createGeometry=function(e){const t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=c(o);let s=n.positions;if(s=wa(s,f.equalsEpsilon,!0),s.length<3)return;let a=UZe,l=zZe,u=VZe,d=HZe;const h=GZe;if(!ev.computeProjectTo2DArguments(s,qC,d,h))return;if(a=f.cross(d,h,a),a=f.normalize(a,a),!f.equalsEpsilon(qC,f.ZERO,O.EPSILON6)){const B=e._ellipsoid.geodeticSurfaceNormal(qC,qZe);f.dot(a,B)<0&&(a=f.negate(a,a),d=f.negate(d,d))}const _=ev.createProjectPointsTo2DFunction(qC,d,h),p=ev.createProjectPointTo2DFunction(qC,d,h);t.tangent&&(l=f.clone(d,l)),t.bitangent&&(u=f.clone(h,u));const y=ui.polygonsFromHierarchy(n,r,_,!1),A=y.hierarchy,x=y.polygons,w=r?ui.polygonsFromHierarchy(o,!0,function(B){return B},!1).polygons:void 0;if(0===A.length)return;s=A[0].outerRing;const v=be.fromPoints(s),D=ui.computeBoundingRectangle(a,p,s,i,FZe),P=[];for(let B=0;B<x.length;B++){const F=new Un({geometry:YZe(x[B],t,D,i,r?w[B]:void 0,p,a,l,u)});P.push(F)}const N=uo.combineInstances(P)[0];N.attributes.position.values=new Float64Array(N.attributes.position.values),N.indices=Ot.createTypedArray(N.attributes.position.values.length/3,N.indices);const R=N.attributes;return t.position||delete R.position,new Cn({attributes:R,indices:N.indices,primitiveType:N.primitiveType,boundingSphere:v})};const KZe=$g;function Dr(e,t){this.position=e,c(this.position)||(this.position=new G),this.tangentPlane=t,c(this.tangentPlane)||(this.tangentPlane=Dr.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(Dr.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(){const e=G.magnitude(this.position);return this.tangentPlane.plane.normal.z*(O.PI_OVER_TWO-2*Math.atan2(e,2*this.ellipsoid.maximumRadius))}},longitude:{get:function(){let e=O.PI_OVER_TWO+Math.atan2(this.y,this.x);return e>Math.PI&&(e-=O.TWO_PI),e}}});const Wb=new Se,QZe=new f;Dr.prototype.getLatitude=function(e){c(e)||(e=ge.WGS84),Wb.latitude=this.conformalLatitude,Wb.longitude=this.longitude,Wb.height=0;const t=this.ellipsoid.cartographicToCartesian(Wb,QZe);return e.cartesianToCartographic(t,Wb),Wb.latitude};const JZe=new fi,e$e=new f,t$e=new f;Dr.fromCartesian=function(e,t){T.defined("cartesian",e);const n=O.signNotZero(e.z);let i=Dr.NORTH_POLE_TANGENT_PLANE,o=Dr.SOUTH_POLE;n<0&&(i=Dr.SOUTH_POLE_TANGENT_PLANE,o=Dr.NORTH_POLE);const r=JZe;r.origin=i.ellipsoid.scaleToGeocentricSurface(e,r.origin),r.direction=f.subtract(r.origin,o,e$e),f.normalize(r.direction,r.direction);const s=rr.rayPlane(r,i.plane,t$e),a=f.subtract(s,o,s),l=f.dot(i.xAxis,a),u=n*f.dot(i.yAxis,a);return c(t)?(t.position=new G(l,u),t.tangentPlane=i,t):new Dr(new G(l,u),i)},Dr.fromCartesianArray=function(e,t){T.defined("cartesians",e);const n=e.length;c(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=Dr.fromCartesian(e[i],t[i]);return t},Dr.clone=function(e,t){if(c(e))return c(t)?(t.position=e.position,t.tangentPlane=e.tangentPlane,t):new Dr(e.position,e.tangentPlane)},Dr.HALF_UNIT_SPHERE=Object.freeze(new ge(.5,.5,.5)),Dr.NORTH_POLE=Object.freeze(new f(0,0,.5)),Dr.SOUTH_POLE=Object.freeze(new f(0,0,-.5)),Dr.NORTH_POLE_TANGENT_PLANE=Object.freeze(new zc(Dr.NORTH_POLE,Dr.HALF_UNIT_SPHERE)),Dr.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new zc(Dr.SOUTH_POLE,Dr.HALF_UNIT_SPHERE));const ru=Dr,n$e=new Se,Hee=new Se;function i$e(e,t,n,i){const r=i.cartesianToCartographic(e,n$e).height,s=i.cartesianToCartographic(t,Hee);s.height=r,i.cartographicToCartesian(s,t);const a=i.cartesianToCartographic(n,Hee);a.height=r-100,i.cartographicToCartesian(a,n)}const Gee=new Vt,o$e=new f,r$e=new f,s$e=new f,a$e=new f,c$e=new f,l$e=new f;let YI=new f,_f=new f,qb=new f;const u$e=new G,d$e=new G,f$e=new f,jee=new yt,h$e=new ne,p$e=new ne;function W3(e){const t=e.vertexFormat,n=e.geometry,i=e.shadowVolume,o=n.attributes.position.values,r=c(n.attributes.st)?n.attributes.st.values:void 0;let s=o.length;const a=e.wall,l=e.top||a,u=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||i){const d=e.boundingRectangle,h=e.rotationAxis,m=e.projectTo2d,_=e.ellipsoid,p=e.stRotation,y=e.perPositionHeight,A=u$e;A.x=d.x,A.y=d.y;const x=t.st?new Float32Array(s/3*2):void 0;let C;t.normal&&(C=y&&l&&!a?n.attributes.normal.values:new Float32Array(s));const w=t.tangent?new Float32Array(s):void 0,v=t.bitangent?new Float32Array(s):void 0,D=i?new Float32Array(s):void 0;let P=0,N=0,R=r$e,B=s$e,F=a$e,S=!0,I=h$e,L=p$e;if(0!==p){let z=yt.fromAxisAngle(h,p,jee);I=ne.fromQuaternion(z,I),z=yt.fromAxisAngle(h,-p,jee),L=ne.fromQuaternion(z,L)}else I=ne.clone(ne.IDENTITY,I),L=ne.clone(ne.IDENTITY,L);let M=0,U=0;l&&u&&(M=s/2,U=s/3,s/=2);for(let z=0;z<s;z+=3){const j=f.fromArray(o,z,f$e);if(t.st&&!c(r)){let W=ne.multiplyByVector(I,j,o$e);W=_.scaleToGeodeticSurface(W,W);const q=m(W,d$e);G.subtract(q,A,q);const V=O.clamp(q.x/d.width,0,1),$=O.clamp(q.y/d.height,0,1);u&&(x[P+U]=V,x[P+1+U]=$),l&&(x[P]=V,x[P+1]=$),P+=2}if(t.normal||t.tangent||t.bitangent||i){const W=N+1,q=N+2;if(a){if(z+3<s){const V=f.fromArray(o,z+3,c$e);if(S){const $=f.fromArray(o,z+s,l$e);y&&i$e(j,V,$,_),f.subtract(V,j,V),f.subtract($,j,$),R=f.normalize(f.cross($,V,R),R),S=!1}f.equalsEpsilon(V,j,O.EPSILON10)&&(S=!0)}(t.tangent||t.bitangent)&&(F=_.geodeticSurfaceNormal(j,F),t.tangent&&(B=f.normalize(f.cross(F,R,B),B)))}else R=_.geodeticSurfaceNormal(j,R),(t.tangent||t.bitangent)&&(y&&(YI=f.fromArray(C,N,YI),_f=f.cross(f.UNIT_Z,YI,_f),_f=f.normalize(ne.multiplyByVector(L,_f,_f),_f),t.bitangent&&(qb=f.normalize(f.cross(YI,_f,qb),qb))),B=f.cross(f.UNIT_Z,R,B),B=f.normalize(ne.multiplyByVector(L,B,B),B),t.bitangent&&(F=f.normalize(f.cross(R,B,F),F)));t.normal&&(e.wall?(C[N+M]=R.x,C[W+M]=R.y,C[q+M]=R.z):u&&(C[N+M]=-R.x,C[W+M]=-R.y,C[q+M]=-R.z),(l&&!y||a)&&(C[N]=R.x,C[W]=R.y,C[q]=R.z)),i&&(a&&(R=_.geodeticSurfaceNormal(j,R)),D[N+M]=-R.x,D[W+M]=-R.y,D[q+M]=-R.z),t.tangent&&(e.wall?(w[N+M]=B.x,w[W+M]=B.y,w[q+M]=B.z):u&&(w[N+M]=-B.x,w[W+M]=-B.y,w[q+M]=-B.z),l&&(y?(w[N]=_f.x,w[W]=_f.y,w[q]=_f.z):(w[N]=B.x,w[W]=B.y,w[q]=B.z))),t.bitangent&&(u&&(v[N+M]=F.x,v[W+M]=F.y,v[q+M]=F.z),l&&(y?(v[N]=qb.x,v[W]=qb.y,v[q]=qb.z):(v[N]=F.x,v[W]=F.y,v[q]=F.z))),N+=3}}t.st&&!c(r)&&(n.attributes.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:x})),t.normal&&(n.attributes.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:C})),t.tangent&&(n.attributes.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:w})),t.bitangent&&(n.attributes.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:v})),i&&(n.attributes.extrudeDirection=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:D}))}if(e.extrude&&c(e.offsetAttribute)){const d=o.length/3;let h=new Uint8Array(d);e.offsetAttribute===Yn.TOP?l&&u||a?h=h.fill(1,0,d/2):l&&(h=h.fill(1)):h=h.fill(e.offsetAttribute===Yn.NONE?0:1),n.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return n}const m$e=new Se,_$e=new Se,Lm={westOverIDL:0,eastOverIDL:0};let Yb=new kT;const y$e=new Se;function Wee(e,t,n,i){const o=e.surfaceDistance,r=Math.ceil(o*t),s=r>0?o/(r-1):Number.POSITIVE_INFINITY;let a=0;for(let l=0;l<r;l++){const u=e.interpolateUsingSurfaceDistance(a,y$e);a+=s;const d=u.longitude,h=u.latitude;n.west=Math.min(n.west,d),n.east=Math.max(n.east,d),n.south=Math.min(n.south,h),n.north=Math.max(n.north,h);const m=d>=0?d:d+O.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,m),i.eastOverIDL=Math.max(i.eastOverIDL,m)}}const qee=[];function b$e(e,t,n,i,o,r,s,a,l,u){const d={walls:[]};let h;if(s||a){const C=ui.createGeometryFromPositions(e,t,n,i,r,l,u),w=C.attributes.position.values,v=C.indices;let D,P;if(s&&a){const N=w.concat(w);D=N.length/3,P=Ot.createTypedArray(D,2*v.length),P.set(v);const R=v.length,B=D/2;for(h=0;h<R;h+=3){const F=P[h]+B,S=P[h+1]+B;P[h+R]=P[h+2]+B,P[h+1+R]=S,P[h+2+R]=F}if(C.attributes.position.values=N,r&&l.normal){const F=C.attributes.normal.values;C.attributes.normal.values=new Float32Array(N.length),C.attributes.normal.values.set(F)}if(l.st&&c(n)){const F=C.attributes.st.values;C.attributes.st.values=new Float32Array(2*D),C.attributes.st.values=F.concat(F)}C.indices=P}else if(a){for(D=w.length/3,P=Ot.createTypedArray(D,v.length),h=0;h<v.length;h+=3)P[h]=v[h+2],P[h+1]=v[h+1],P[h+2]=v[h];C.indices=P}d.topAndBottom=new Un({geometry:C})}let m=o.outerRing;const _=zc.fromPoints(m,e);let p=_.projectPointsOntoPlane(m,qee),y=po.computeWindingOrder2D(p);y===El.CLOCKWISE&&(m=m.slice().reverse());let A=ui.computeWallGeometry(m,n,e,i,r,u);d.walls.push(new Un({geometry:A}));const x=o.holes;for(h=0;h<x.length;h++){let C=x[h];p=_.projectPointsOntoPlane(C,qee),y=po.computeWindingOrder2D(p),y===El.COUNTER_CLOCKWISE&&(C=C.slice().reverse()),A=ui.computeWallGeometry(C,n,e,i,r,u),d.walls.push(new Un({geometry:A}))}return d}function _l(e){if(T.typeOf.object("options",e),T.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),c(e.perPositionHeight)&&e.perPositionHeight&&c(e.height))throw new E("Cannot use both options.perPositionHeight and options.height");if(c(e.arcType)&&e.arcType!==Xn.GEODESIC&&e.arcType!==Xn.RHUMB)throw new E("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");const t=e.polygonHierarchy,n=g(e.vertexFormat,et.DEFAULT),i=g(e.ellipsoid,ge.WGS84),o=g(e.granularity,O.RADIANS_PER_DEGREE),r=g(e.stRotation,0),s=e.textureCoordinates,a=g(e.perPositionHeight,!1),l=a&&c(e.extrudedHeight);let u=g(e.height,0),d=g(e.extrudedHeight,u);if(!l){const h=Math.max(u,d);d=Math.min(u,d),u=h}this._vertexFormat=et.clone(n),this._ellipsoid=ge.clone(i),this._granularity=o,this._stRotation=r,this._height=u,this._extrudedHeight=d,this._closeTop=g(e.closeTop,!0),this._closeBottom=g(e.closeBottom,!0),this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=l,this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=g(e.arcType,Xn.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=s,this.packedLength=ui.computeHierarchyPackedLength(t,f)+ge.packedLength+et.packedLength+(s?ui.computeHierarchyPackedLength(s,G):1)+12}_l.fromPositions=function(e){return e=g(e,g.EMPTY_OBJECT),T.defined("options.positions",e.positions),new _l({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,textureCoordinates:e.textureCoordinates})},_l.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),n=ui.packPolygonHierarchy(e._polygonHierarchy,t,n,f),ge.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=ge.packedLength),n+=et.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._stRotation,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._closeTop?1:0,t[n++]=e._closeBottom?1:0,t[n++]=e._shadowVolume?1:0,t[n++]=g(e._offsetAttribute,-1),t[n++]=e._arcType,c(e._textureCoordinates)?n=ui.packPolygonHierarchy(e._textureCoordinates,t,n,G):t[n++]=-1,t[n++]=e.packedLength,t};const A$e=ge.clone(ge.UNIT_SPHERE),T$e=new et,x$e={polygonHierarchy:{}};_l.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=ui.unpackPolygonHierarchy(e,t,f);t=i.startingIndex,delete i.startingIndex;const o=ge.unpack(e,t,A$e),r=et.unpack(e,t+=ge.packedLength,T$e);t+=et.packedLength;const s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=1===e[t++],h=1===e[t++],m=1===e[t++],_=1===e[t++],p=1===e[t++],y=e[t++],A=e[t++],x=-1===e[t]?void 0:ui.unpackPolygonHierarchy(e,t,G);c(x)?(t=x.startingIndex,delete x.startingIndex):t++;const C=e[t++];return c(n)||(n=new _l(x$e)),n._polygonHierarchy=i,n._ellipsoid=ge.clone(o,n._ellipsoid),n._vertexFormat=et.clone(r,n._vertexFormat),n._height=s,n._extrudedHeight=a,n._granularity=l,n._stRotation=u,n._perPositionHeightExtrude=d,n._perPositionHeight=h,n._closeTop=m,n._closeBottom=_,n._shadowVolume=p,n._offsetAttribute=-1===y?void 0:y,n._arcType=A,n._textureCoordinates=x,n.packedLength=C,n};const C$e=new G,E$e=new G,w$e=new ru;function Yee(e,t,n,i,o,r){const s=e.longitude,a=s>=0?s:s+O.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);const l=e.getLatitude(n);let u=l;if(r.south=Math.min(r.south,l),r.north=Math.max(r.north,l),i!==Xn.RHUMB){const m=G.subtract(t.position,e.position,C$e),_=G.dot(t.position,m)/G.dot(m,m);if(_>0&&_<1){const p=G.add(t.position,G.multiplyByScalar(m,-_,m),E$e),y=ru.clone(t,w$e);y.position=p;const A=y.getLatitude(n);r.south=Math.min(r.south,A),r.north=Math.max(r.north,A),Math.abs(l)>Math.abs(A)&&(u=A)}}let h=Math.sign(t.x*e.y-e.x*t.y);0!==h&&(h*=G.angleBetween(t.position,e.position)),u>=0&&(o.northAngle+=h),u<=0&&(o.southAngle+=h)}const Xee=new ru,S$e=new ru,su={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};_l.computeRectangleFromPositions=function(e,t,n,i){if(T.defined("positions",e),c(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,su.northAngle=0,su.southAngle=0,su.westOverIdl=Number.POSITIVE_INFINITY,su.eastOverIdl=Number.NEGATIVE_INFINITY;const o=e.length;let r=ru.fromCartesian(e[0],S$e);for(let s=1;s<o;s++){const a=ru.fromCartesian(e[s],Xee);Yee(a,r,t,n,su,i),r=ru.clone(a,r)}return Yee(ru.fromCartesian(e[0],Xee),r,t,n,su,i),i.east-i.west>su.eastOverIdl-su.westOverIdl&&(i.west=su.westOverIdl,i.east=su.eastOverIdl,i.east>O.PI&&(i.east=i.east-O.TWO_PI),i.west>O.PI&&(i.west=i.west-O.TWO_PI)),O.equalsEpsilon(Math.abs(su.northAngle),O.TWO_PI,O.EPSILON10)&&(i.north=O.PI_OVER_TWO,i.east=O.PI,i.west=-O.PI),O.equalsEpsilon(Math.abs(su.southAngle),O.TWO_PI,O.EPSILON10)&&(i.south=-O.PI_OVER_TWO,i.east=O.PI,i.west=-O.PI),i},_l.computeRectangle=function(e,t){T.typeOf.object("options",e),T.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),kf("PolygonGeometry.computeRectangle","PolygonGeometry.computeRectangle was deprecated in CesiumJS 1.110. It will be removed in CesiumJS 1.112. Use PolygonGeometry.computeRectangleFromPositions instead.");const n=g(e.granularity,O.RADIANS_PER_DEGREE),i=g(e.arcType,Xn.GEODESIC);if(i!==Xn.GEODESIC&&i!==Xn.RHUMB)throw new E("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");const o=e.polygonHierarchy,r=g(e.ellipsoid,ge.WGS84);return function g$e(e,t,n,i,o){if(o=g(o,new Ce),!c(e)||e.length<3)return o.west=0,o.north=0,o.south=0,o.east=0,o;if(n===Xn.RHUMB)return Ce.fromCartesianArray(e,t,o);Yb.ellipsoid.equals(t)||(Yb=new kT(void 0,void 0,t)),o.west=Number.POSITIVE_INFINITY,o.east=Number.NEGATIVE_INFINITY,o.south=Number.POSITIVE_INFINITY,o.north=Number.NEGATIVE_INFINITY,Lm.westOverIDL=Number.POSITIVE_INFINITY,Lm.eastOverIDL=Number.NEGATIVE_INFINITY;const r=1/O.chordLength(i,t.maximumRadius),s=e.length;let u,a=t.cartesianToCartographic(e[0],_$e),l=m$e;for(let d=1;d<s;d++)u=l,l=a,a=t.cartesianToCartographic(e[d],u),Yb.setEndPoints(l,a),Wee(Yb,r,o,Lm);return u=l,l=a,a=t.cartesianToCartographic(e[0],u),Yb.setEndPoints(l,a),Wee(Yb,r,o,Lm),o.east-o.west>Lm.eastOverIDL-Lm.westOverIDL&&(o.west=Lm.westOverIDL,o.east=Lm.eastOverIDL,o.east>O.PI&&(o.east=o.east-O.TWO_PI),o.west>O.PI&&(o.west=o.west-O.TWO_PI)),o}(o.positions,r,i,n,t)};const v$e=new ru;function D$e(e,t,n){return e.height>=O.PI||e.width>=O.PI?ru.fromCartesian(t[0],v$e).tangentPlane:zc.fromPoints(t,n)}const Zee=new Se;function P$e(e,t,n){if(e.height>=O.PI||e.width>=O.PI)return(o,r)=>{if(e.south<0&&e.north>0){const s=n.cartesianToCartographic(o,Zee);return c(r)||(r=new G),r.x=s.longitude/O.PI,r.y=s.latitude/O.PI_OVER_TWO,r}return ru.fromCartesian(o,r)};const i=zc.fromPoints(t,n);return(o,r)=>i.projectPointsOntoPlane(o,r)}_l.createGeometry=function(e){const t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,l=e._closeBottom,u=e._arcType,d=e._textureCoordinates,h=c(d),m=r.positions;if(m.length<3)return;const _=e.rectangle,p=ui.polygonsFromHierarchy(r,h,function I$e(e,t,n){return(i,o)=>{if(e.height>=O.PI||e.width>=O.PI){if(e.south<0&&e.north>0){c(o)||(o=[]);for(let s=0;s<i.length;++s){const a=n.cartesianToCartographic(i[s],Zee);o[s]=new G(a.longitude/O.PI,a.latitude/O.PI_OVER_TWO)}return o.length=i.length,o}return ru.fromCartesianArray(i,o)}return zc.fromPoints(t,n).projectPointsOntoPlane(i,o)}}(_,m,n),!s,n,function O$e(e,t,n,i){return(o,r)=>!i&&(e.height>=O.PI_OVER_TWO||e.width>=2*O.PI_OVER_THREE)?ui.splitPolygonsOnEquator(o,t,n,r):o}(_,n,u,s)),y=p.hierarchy,A=p.polygons,C=h?ui.polygonsFromHierarchy(d,!0,function(M){return M},!1,n).polygons:void 0;if(0===y.length)return;const w=y[0].outerRing,v=function L$e(e,t,n,i){if(t.height>=O.PI||t.width>=O.PI)return Vt.fromRectangle(t,void 0,Gee);const o=e,r=zc.fromPoints(o,n);return ui.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),o,i,Gee)}(w,_,n,o),D=[],P=e._height,N=e._extrudedHeight,R=e._perPositionHeightExtrude||!O.equalsEpsilon(P,N,0,O.EPSILON2),B={perPositionHeight:s,vertexFormat:t,geometry:void 0,rotationAxis:D$e(_,w,n).plane.normal,projectTo2d:P$e(_,w,n),boundingRectangle:v,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u};let F;if(R)for(B.extrude=!0,B.top=a,B.bottom=l,B.shadowVolume=e._shadowVolume,B.offsetAttribute=e._offsetAttribute,F=0;F<A.length;F++){const M=b$e(n,A[F],h?C[F]:void 0,i,y[F],s,a,l,t,u);let U;a&&l?(U=M.topAndBottom,B.geometry=ui.scaleToGeodeticHeightExtruded(U.geometry,P,N,n,s)):a?(U=M.topAndBottom,U.geometry.attributes.position.values=po.scaleToGeodeticHeight(U.geometry.attributes.position.values,P,n,!s),B.geometry=U.geometry):l&&(U=M.topAndBottom,U.geometry.attributes.position.values=po.scaleToGeodeticHeight(U.geometry.attributes.position.values,N,n,!0),B.geometry=U.geometry),(a||l)&&(B.wall=!1,U.geometry=W3(B),D.push(U));const z=M.walls;B.wall=!0;for(let j=0;j<z.length;j++){const W=z[j];B.geometry=ui.scaleToGeodeticHeightExtruded(W.geometry,P,N,n,s),W.geometry=W3(B),D.push(W)}}else for(F=0;F<A.length;F++){const M=new Un({geometry:ui.createGeometryFromPositions(n,A[F],h?C[F]:void 0,i,s,t,u)});if(M.geometry.attributes.position.values=po.scaleToGeodeticHeight(M.geometry.attributes.position.values,P,n,!s),B.geometry=M.geometry,M.geometry=W3(B),c(e._offsetAttribute)){const z=e._offsetAttribute===Yn.NONE?0:1,j=new Uint8Array(M.geometry.attributes.position.values.length/3).fill(z);M.geometry.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:j})}D.push(M)}const S=uo.combineInstances(D)[0];S.attributes.position.values=new Float64Array(S.attributes.position.values),S.indices=Ot.createTypedArray(S.attributes.position.values.length/3,S.indices);const I=S.attributes,L=be.fromVertices(I.position.values);return t.position||delete I.position,new Cn({attributes:I,indices:S.indices,primitiveType:S.primitiveType,boundingSphere:L,offsetAttribute:e._offsetAttribute})},_l.createShadowVolume=function(e,t,n){const i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new _l({polygonHierarchy:e._polygonHierarchy,ellipsoid:o,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:r,height:s,vertexFormat:et.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(_l.prototype,{rectangle:{get:function(){return c(this._rectangle)||(this._rectangle=_l.computeRectangleFromPositions(this._polygonHierarchy.positions,this._ellipsoid,this._arcType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return c(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function R$e(e){const t=-e._stRotation;return 0===t?[0,0,0,1,1,0]:Cn._textureCoordinateRotationPoints(e._polygonHierarchy.positions,t,e._ellipsoid,e.rectangle)}(this)),this._textureCoordinateRotationPoints}}});const q3=_l,$ee=[],XI=[];function N$e(e,t,n,i,o){const s=zc.fromPoints(t,e).projectPointsOntoPlane(t,$ee);po.computeWindingOrder2D(s)===El.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let l,u,d=t.length,h=0;if(i)for(l=new Float64Array(2*d*3),u=0;u<d;u++){const p=t[u],y=t[(u+1)%d];l[h++]=p.x,l[h++]=p.y,l[h++]=p.z,l[h++]=y.x,l[h++]=y.y,l[h++]=y.z}else{let p=0;if(o===Xn.GEODESIC)for(u=0;u<d;u++)p+=ui.subdivideLineCount(t[u],t[(u+1)%d],n);else if(o===Xn.RHUMB)for(u=0;u<d;u++)p+=ui.subdivideRhumbLineCount(e,t[u],t[(u+1)%d],n);for(l=new Float64Array(3*p),u=0;u<d;u++){let y;o===Xn.GEODESIC?y=ui.subdivideLine(t[u],t[(u+1)%d],n,XI):o===Xn.RHUMB&&(y=ui.subdivideRhumbLine(e,t[u],t[(u+1)%d],n,XI));const A=y.length;for(let x=0;x<A;++x)l[h++]=y[x]}}d=l.length/3;const _=Ot.createTypedArray(d,2*d);for(h=0,u=0;u<d-1;u++)_[h++]=u,_[h++]=u+1;return _[h++]=d-1,_[h++]=0,new Un({geometry:new Cn({attributes:new lo({position:new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:l})}),indices:_,primitiveType:At.LINES})})}function M$e(e,t,n,i,o){const s=zc.fromPoints(t,e).projectPointsOntoPlane(t,$ee);po.computeWindingOrder2D(s)===El.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let l,u,d=t.length;const h=new Array(d);let m=0;if(i)for(l=new Float64Array(2*d*3*2),u=0;u<d;++u){h[u]=m/3;const A=t[u],x=t[(u+1)%d];l[m++]=A.x,l[m++]=A.y,l[m++]=A.z,l[m++]=x.x,l[m++]=x.y,l[m++]=x.z}else{let A=0;if(o===Xn.GEODESIC)for(u=0;u<d;u++)A+=ui.subdivideLineCount(t[u],t[(u+1)%d],n);else if(o===Xn.RHUMB)for(u=0;u<d;u++)A+=ui.subdivideRhumbLineCount(e,t[u],t[(u+1)%d],n);for(l=new Float64Array(3*A*2),u=0;u<d;++u){let x;h[u]=m/3,o===Xn.GEODESIC?x=ui.subdivideLine(t[u],t[(u+1)%d],n,XI):o===Xn.RHUMB&&(x=ui.subdivideRhumbLine(e,t[u],t[(u+1)%d],n,XI));const C=x.length;for(let w=0;w<C;++w)l[m++]=x[w]}}d=l.length/6;const _=h.length,y=Ot.createTypedArray(d+_,2*(2*d+_));for(m=0,u=0;u<d;++u)y[m++]=u,y[m++]=(u+1)%d,y[m++]=u+d,y[m++]=(u+1)%d+d;for(u=0;u<_;u++){const A=h[u];y[m++]=A,y[m++]=A+d}return new Un({geometry:new Cn({attributes:new lo({position:new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:l})}),indices:y,primitiveType:At.LINES})})}function Kg(e){if(T.typeOf.object("options",e),T.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&c(e.height))throw new E("Cannot use both options.perPositionHeight and options.height");if(c(e.arcType)&&e.arcType!==Xn.GEODESIC&&e.arcType!==Xn.RHUMB)throw new E("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");const t=e.polygonHierarchy,n=g(e.ellipsoid,ge.WGS84),i=g(e.granularity,O.RADIANS_PER_DEGREE),o=g(e.perPositionHeight,!1),r=o&&c(e.extrudedHeight),s=g(e.arcType,Xn.GEODESIC);let a=g(e.height,0),l=g(e.extrudedHeight,a);if(!r){const u=Math.max(a,l);l=Math.min(a,l),a=u}this._ellipsoid=ge.clone(n),this._granularity=i,this._height=a,this._extrudedHeight=l,this._arcType=s,this._polygonHierarchy=t,this._perPositionHeight=o,this._perPositionHeightExtrude=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=ui.computeHierarchyPackedLength(t,f)+ge.packedLength+8}Kg.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),n=ui.packPolygonHierarchy(e._polygonHierarchy,t,n,f),ge.pack(e._ellipsoid,t,n),n+=ge.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._arcType,t[n++]=g(e._offsetAttribute,-1),t[n]=e.packedLength,t};const F$e=ge.clone(ge.UNIT_SPHERE),B$e={polygonHierarchy:{}};Kg.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=ui.unpackPolygonHierarchy(e,t,f);t=i.startingIndex,delete i.startingIndex;const o=ge.unpack(e,t,F$e);t+=ge.packedLength;const r=e[t++],s=e[t++],a=e[t++],l=1===e[t++],u=1===e[t++],d=e[t++],h=e[t++],m=e[t];return c(n)||(n=new Kg(B$e)),n._polygonHierarchy=i,n._ellipsoid=ge.clone(o,n._ellipsoid),n._height=r,n._extrudedHeight=s,n._granularity=a,n._perPositionHeight=u,n._perPositionHeightExtrude=l,n._arcType=d,n._offsetAttribute=-1===h?void 0:h,n.packedLength=m,n},Kg.fromPositions=function(e){return e=g(e,g.EMPTY_OBJECT),T.defined("options.positions",e.positions),new Kg({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})},Kg.createGeometry=function(e){const t=e._ellipsoid,n=e._granularity,o=e._perPositionHeight,r=e._arcType,s=ui.polygonOutlinesFromHierarchy(e._polygonHierarchy,!o,t);if(0===s.length)return;let a;const l=[],u=O.chordLength(n,t.maximumRadius),d=e._height,h=e._extrudedHeight;let _,p;if(e._perPositionHeightExtrude||!O.equalsEpsilon(d,h,0,O.EPSILON2))for(p=0;p<s.length;p++){if(a=M$e(t,s[p],u,o,r),a.geometry=ui.scaleToGeodeticHeightExtruded(a.geometry,d,h,t,o),c(e._offsetAttribute)){const x=a.geometry.attributes.position.values.length/3;let C=new Uint8Array(x);e._offsetAttribute===Yn.TOP?C=C.fill(1,0,x/2):(_=e._offsetAttribute===Yn.NONE?0:1,C=C.fill(_)),a.geometry.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}l.push(a)}else for(p=0;p<s.length;p++){if(a=N$e(t,s[p],u,o,r),a.geometry.attributes.position.values=po.scaleToGeodeticHeight(a.geometry.attributes.position.values,d,t,!o),c(e._offsetAttribute)){_=e._offsetAttribute===Yn.NONE?0:1;const C=new Uint8Array(a.geometry.attributes.position.values.length/3).fill(_);a.geometry.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}l.push(a)}const y=uo.combineInstances(l)[0],A=be.fromVertices(y.attributes.position.values);return new Cn({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:A,offsetAttribute:e._offsetAttribute})};const k$e=Kg,Kee="Entity polygons cannot have both height and perPositionHeight. height will be ignored",Qee="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",Jee=new X,ete=f.ZERO,tte=new f,nte=new Ce,U$e=[],z$e=new G;function V$e(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.textureCoordinates=void 0}function gl(e,t){pi.call(this,{entity:e,scene:t,geometryOptions:new V$e(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function Xb(e,t,n){_o.call(this,e,t,n)}c(Object.create)&&((gl.prototype=Object.create(pi.prototype)).constructor=gl),gl.prototype.createFillGeometryInstance=function(e){if(T.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i=this._options,o={show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:mo.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Fn){let s;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,Jee)),c(s)||(s=X.WHITE),o.color=ti.fromColor(s)}let r;return c(i.offsetAttribute)&&(o.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,ete,tte))),r=i.perPositionHeight&&!c(i.extrudedHeight)?new KZe(i):new q3(i),new Un({id:t,geometry:r,attributes:o})},gl.prototype.createOutlineGeometryInstance=function(e){if(T.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=this._options,o=te.getValueOrDefault(this._outlineColorProperty,e,X.BLACK,Jee),r=this._distanceDisplayConditionProperty.getValue(e),s={show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ti.fromColor(o),distanceDisplayCondition:mo.fromDistanceDisplayCondition(r),offset:void 0};let a;return c(i.offsetAttribute)&&(s.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,ete,tte))),a=i.perPositionHeight&&!c(i.extrudedHeight)?new Y_(i):new k$e(i),new Un({id:t,geometry:a,attributes:s})},gl.prototype._computeCenter=function(e,t){const n=te.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(!c(n))return;const i=n.positions;if(0===i.length)return;const r=zc.fromPoints(i,this._scene.mapProjection.ellipsoid),s=r.projectPointsOntoPlane(i,U$e),a=s.length;let l=0,u=a-1,d=new G;for(let m=0;m<a;u=m++){const _=s[m],p=s[u],y=_.x*p.y-p.x*_.y;let A=G.add(_,p,z$e);A=G.multiplyByScalar(A,y,A),d=G.add(d,A,d),l+=y}return d=G.multiplyByScalar(d,1/(3*l),d),r.projectPointOntoEllipsoid(d,t)},gl.prototype._isHidden=function(e,t){return!c(t.hierarchy)||Oo.prototype._isHidden.call(this,e,t)},gl.prototype._isOnTerrain=function(e,t){const n=pi.prototype._isOnTerrain.call(this,e,t),i=t.perPositionHeight,o=c(i)&&(!i.isConstant||i.getValue(St.MINIMUM_VALUE));return n&&!o},gl.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!te.isConstant(t.height)||!te.isConstant(t.extrudedHeight)||!te.isConstant(t.granularity)||!te.isConstant(t.stRotation)||!te.isConstant(t.textureCoordinates)||!te.isConstant(t.outlineWidth)||!te.isConstant(t.perPositionHeight)||!te.isConstant(t.closeTop)||!te.isConstant(t.closeBottom)||!te.isConstant(t.zIndex)||!te.isConstant(t.arcType)||this._onTerrain&&!te.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Fn)},gl.prototype._setStaticOptions=function(e,t){const i=this._options;i.vertexFormat=this._materialProperty instanceof Fn?yi.VERTEX_FORMAT:ia.MaterialSupport.TEXTURED.vertexFormat;const o=t.hierarchy.getValue(St.MINIMUM_VALUE);let r=te.getValueOrUndefined(t.height,St.MINIMUM_VALUE);const s=te.getValueOrDefault(t.heightReference,St.MINIMUM_VALUE,Qt.NONE);let a=te.getValueOrUndefined(t.extrudedHeight,St.MINIMUM_VALUE);const l=te.getValueOrDefault(t.extrudedHeightReference,St.MINIMUM_VALUE,Qt.NONE),u=te.getValueOrDefault(t.perPositionHeight,St.MINIMUM_VALUE,!1);let d;r=pi.getGeometryHeight(r,s),u?(c(r)&&(r=void 0,gn(Kee)),s!==Qt.NONE&&u&&(r=void 0,gn(Qee))):(c(a)&&!c(r)&&(r=0),d=pi.computeGeometryOffsetAttribute(r,s,a,l)),i.polygonHierarchy=o,i.granularity=te.getValueOrUndefined(t.granularity,St.MINIMUM_VALUE),i.stRotation=te.getValueOrUndefined(t.stRotation,St.MINIMUM_VALUE),i.perPositionHeight=u,i.closeTop=te.getValueOrDefault(t.closeTop,St.MINIMUM_VALUE,!0),i.closeBottom=te.getValueOrDefault(t.closeBottom,St.MINIMUM_VALUE,!0),i.offsetAttribute=d,i.height=r,i.arcType=te.getValueOrDefault(t.arcType,St.MINIMUM_VALUE,Xn.GEODESIC),i.textureCoordinates=te.getValueOrUndefined(t.textureCoordinates,St.MINIMUM_VALUE),a=pi.getGeometryExtrudedHeight(a,l),a===pi.CLAMP_TO_GROUND&&(a=wo.getMinimumMaximumHeights(q3.computeRectangle(i,nte)).minimumTerrainHeight),i.extrudedHeight=a},gl.prototype._getIsClosed=function(e){const t=e.height,n=e.extrudedHeight,i=c(n)&&n!==t;return!e.perPositionHeight&&(!i&&0===t||i&&e.closeTop&&e.closeBottom)},gl.DynamicGeometryUpdater=Xb,c(Object.create)&&((Xb.prototype=Object.create(_o.prototype)).constructor=Xb),Xb.prototype._isHidden=function(e,t,n){return!c(this._options.polygonHierarchy)||_o.prototype._isHidden.call(this,e,t,n)},Xb.prototype._setOptions=function(e,t,n){const i=this._options;i.polygonHierarchy=te.getValueOrUndefined(t.hierarchy,n);let o=te.getValueOrUndefined(t.height,n);const r=te.getValueOrDefault(t.heightReference,n,Qt.NONE),s=te.getValueOrDefault(t.extrudedHeightReference,n,Qt.NONE);let a=te.getValueOrUndefined(t.extrudedHeight,n);const l=te.getValueOrUndefined(t.perPositionHeight,n);let u;o=pi.getGeometryHeight(o,s),l?(c(o)&&(o=void 0,gn(Kee)),r!==Qt.NONE&&l&&(o=void 0,gn(Qee))):(c(a)&&!c(o)&&(o=0),u=pi.computeGeometryOffsetAttribute(o,r,a,s)),i.granularity=te.getValueOrUndefined(t.granularity,n),i.stRotation=te.getValueOrUndefined(t.stRotation,n),i.textureCoordinates=te.getValueOrUndefined(t.textureCoordinates,n),i.perPositionHeight=te.getValueOrUndefined(t.perPositionHeight,n),i.closeTop=te.getValueOrDefault(t.closeTop,n,!0),i.closeBottom=te.getValueOrDefault(t.closeBottom,n,!0),i.offsetAttribute=u,i.height=o,i.arcType=te.getValueOrDefault(t.arcType,n,Xn.GEODESIC),a=pi.getGeometryExtrudedHeight(a,s),a===pi.CLAMP_TO_GROUND&&(a=wo.getMinimumMaximumHeights(q3.computeRectangle(i,nte)).minimumTerrainHeight),i.extrudedHeight=a};const H$e=gl;function YC(e){const t=(e=g(e,g.EMPTY_OBJECT)).polylinePositions,n=e.shapePositions;if(!c(t))throw new E("options.polylinePositions is required.");if(!c(n))throw new E("options.shapePositions is required.");this._positions=t,this._shape=n,this._ellipsoid=ge.clone(g(e.ellipsoid,ge.WGS84)),this._cornerType=g(e.cornerType,Rr.ROUNDED),this._vertexFormat=et.clone(g(e.vertexFormat,et.DEFAULT)),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let i=1+t.length*f.packedLength;i+=1+n.length*G.packedLength,this.packedLength=i+ge.packedLength+et.packedLength+2}YC.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");let i;n=g(n,0);const o=e._positions;let r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=f.packedLength)f.pack(o[i],t,n);const s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=G.packedLength)G.pack(s[i],t,n);return ge.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=ge.packedLength),n+=et.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};const ite=ge.clone(ge.UNIT_SPHERE),ote=new et,XC={polylinePositions:void 0,shapePositions:void 0,ellipsoid:ite,vertexFormat:ote,cornerType:void 0,granularity:void 0};YC.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);let i,o=e[t++];const r=new Array(o);for(i=0;i<o;++i,t+=f.packedLength)r[i]=f.unpack(e,t);o=e[t++];const s=new Array(o);for(i=0;i<o;++i,t+=G.packedLength)s[i]=G.unpack(e,t);const a=ge.unpack(e,t,ite),l=et.unpack(e,t+=ge.packedLength,ote);t+=et.packedLength;const u=e[t++],d=e[t];return c(n)?(n._positions=r,n._shape=s,n._ellipsoid=ge.clone(a,n._ellipsoid),n._vertexFormat=et.clone(l,n._vertexFormat),n._cornerType=u,n._granularity=d,n):(XC.polylinePositions=r,XC.shapePositions=s,XC.cornerType=u,XC.granularity=d,new YC(XC))};const j$e=new Vt;YC.createGeometry=function(e){const n=wa(e._positions,f.equalsEpsilon);let i=e._shape;if(i=VC.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;po.computeWindingOrder2D(i)===El.CLOCKWISE&&i.reverse();const o=Vt.fromPoints(i,j$e);return function G$e(e,t,n,i){const o=new lo;i.position&&(o.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:e}));const r=t.length,s=e.length/3,a=(s-2*r)/(2*r),l=po.triangulate(t),d=Ot.createTypedArray(s,(a-1)*r*6+2*l.length);let h,m,_,p,y,A;const x=2*r;let C=0;for(h=0;h<a-1;h++){for(m=0;m<r-1;m++)_=2*m+h*r*2,A=_+x,p=_+1,y=p+x,d[C++]=p,d[C++]=_,d[C++]=y,d[C++]=y,d[C++]=_,d[C++]=A;_=2*r-2+h*r*2,p=_+1,y=p+x,A=_+x,d[C++]=p,d[C++]=_,d[C++]=y,d[C++]=y,d[C++]=_,d[C++]=A}if(i.st||i.tangent||i.bitangent){const D=new Float32Array(2*s),P=1/(a-1),N=1/n.height,R=n.height/2;let B,F,S=0;for(h=0;h<a;h++){for(B=h*P,F=N*(t[0].y+R),D[S++]=B,D[S++]=F,m=1;m<r;m++)F=N*(t[m].y+R),D[S++]=B,D[S++]=F,D[S++]=B,D[S++]=F;F=N*(t[0].y+R),D[S++]=B,D[S++]=F}for(m=0;m<r;m++)B=0,F=N*(t[m].y+R),D[S++]=B,D[S++]=F;for(m=0;m<r;m++)B=(a-1)*P,F=N*(t[m].y+R),D[S++]=B,D[S++]=F;o.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:new Float32Array(D)})}const w=s-2*r;for(h=0;h<l.length;h+=3){const D=l[h]+w,P=l[h+1]+w,N=l[h+2]+w;d[C++]=D,d[C++]=P,d[C++]=N,d[C++]=N+r,d[C++]=P+r,d[C++]=D+r}let v=new Cn({attributes:o,indices:d,boundingSphere:be.fromVertices(e),primitiveType:At.TRIANGLES});if(i.normal&&(v=uo.computeNormal(v)),i.tangent||i.bitangent){try{v=uo.computeTangentAndBitangent(v)}catch{gn("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}i.tangent||(v.attributes.tangent=void 0),i.bitangent||(v.attributes.bitangent=void 0),i.st||(v.attributes.st=void 0)}return v}(VC.computePositions(n,i,o,e,!0),i,o,e._vertexFormat)};const W$e=YC;function ZC(e){const t=(e=g(e,g.EMPTY_OBJECT)).polylinePositions,n=e.shapePositions;if(!c(t))throw new E("options.polylinePositions is required.");if(!c(n))throw new E("options.shapePositions is required.");this._positions=t,this._shape=n,this._ellipsoid=ge.clone(g(e.ellipsoid,ge.WGS84)),this._cornerType=g(e.cornerType,Rr.ROUNDED),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let i=1+t.length*f.packedLength;i+=1+n.length*G.packedLength,this.packedLength=i+ge.packedLength+2}ZC.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");let i;n=g(n,0);const o=e._positions;let r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=f.packedLength)f.pack(o[i],t,n);const s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=G.packedLength)G.pack(s[i],t,n);return ge.pack(e._ellipsoid,t,n),n+=ge.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};const rte=ge.clone(ge.UNIT_SPHERE),$C={polylinePositions:void 0,shapePositions:void 0,ellipsoid:rte,height:void 0,cornerType:void 0,granularity:void 0};ZC.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);let i,o=e[t++];const r=new Array(o);for(i=0;i<o;++i,t+=f.packedLength)r[i]=f.unpack(e,t);o=e[t++];const s=new Array(o);for(i=0;i<o;++i,t+=G.packedLength)s[i]=G.unpack(e,t);const a=ge.unpack(e,t,rte);t+=ge.packedLength;const l=e[t++],u=e[t];return c(n)?(n._positions=r,n._shape=s,n._ellipsoid=ge.clone(a,n._ellipsoid),n._cornerType=l,n._granularity=u,n):($C.polylinePositions=r,$C.shapePositions=s,$C.cornerType=l,$C.granularity=u,new ZC($C))};const Y$e=new Vt;ZC.createGeometry=function(e){const n=wa(e._positions,f.equalsEpsilon);let i=e._shape;if(i=VC.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;po.computeWindingOrder2D(i)===El.CLOCKWISE&&i.reverse();const o=Vt.fromPoints(i,Y$e);return function q$e(e,t){const n=new lo;n.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:e});const i=t.length,o=n.position.values.length/3,s=e.length/3/i,a=Ot.createTypedArray(o,2*i*(s+1));let l,u,d=0;l=0;let h=l*i;for(u=0;u<i-1;u++)a[d++]=u+h,a[d++]=u+h+1;for(a[d++]=i-1+h,a[d++]=h,l=s-1,h=l*i,u=0;u<i-1;u++)a[d++]=u+h,a[d++]=u+h+1;for(a[d++]=i-1+h,a[d++]=h,l=0;l<s-1;l++){const _=i*l,p=_+i;for(u=0;u<i;u++)a[d++]=u+_,a[d++]=u+p}return new Cn({attributes:n,indices:Ot.createTypedArray(o,a),boundingSphere:be.fromVertices(e),primitiveType:At.LINES})}(VC.computePositions(n,i,o,e,!1),i)};const X$e=ZC,ste=new X;function Z$e(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0}function gf(e,t){Oo.call(this,{entity:e,scene:t,geometryOptions:new Z$e(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function Zb(e,t,n){_o.call(this,e,t,n)}c(Object.create)&&((gf.prototype=Object.create(Oo.prototype)).constructor=gf),gf.prototype.createFillGeometryInstance=function(e){if(T.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e);let i,o;const r=new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=mo.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Fn){let l;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(l=this._materialProperty.color.getValue(e,ste)),c(l)||(l=X.WHITE),o=ti.fromColor(l),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new Un({id:t,geometry:new W$e(this._options),attributes:i})},gf.prototype.createOutlineGeometryInstance=function(e){if(T.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,X.BLACK,ste),o=this._distanceDisplayConditionProperty.getValue(e);return new Un({id:t,geometry:new X$e(this._options),attributes:{show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ti.fromColor(i),distanceDisplayCondition:mo.fromDistanceDisplayCondition(o)}})},gf.prototype._isHidden=function(e,t){return!c(t.positions)||!c(t.shape)||Oo.prototype._isHidden.call(this,e,t)},gf.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&t.shape.isConstant&&te.isConstant(t.granularity)&&te.isConstant(t.outlineWidth)&&te.isConstant(t.cornerType))},gf.prototype._setStaticOptions=function(e,t){const n=t.granularity,i=t.cornerType,o=this._options;o.vertexFormat=this._materialProperty instanceof Fn?yi.VERTEX_FORMAT:ia.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(St.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(St.MINIMUM_VALUE,o.shape),o.granularity=c(n)?n.getValue(St.MINIMUM_VALUE):void 0,o.cornerType=c(i)?i.getValue(St.MINIMUM_VALUE):void 0},gf.DynamicGeometryUpdater=Zb,c(Object.create)&&((Zb.prototype=Object.create(_o.prototype)).constructor=Zb),Zb.prototype._isHidden=function(e,t,n){const i=this._options;return!c(i.polylinePositions)||!c(i.shapePositions)||_o.prototype._isHidden.call(this,e,t,n)},Zb.prototype._setOptions=function(e,t,n){const i=this._options;i.polylinePositions=te.getValueOrUndefined(t.positions,n,i.polylinePositions),i.shapePositions=te.getValueOrUndefined(t.shape,n),i.granularity=te.getValueOrUndefined(t.granularity,n),i.cornerType=te.getValueOrUndefined(t.cornerType,n)};const $$e=gf,Y3=new f,ate=new f,cte=new f,lte=new f,ute=new Ce,K$e=new G,Q$e=new be,J$e=new be;function dte(e,t){const n=new Cn({attributes:new lo,primitiveType:At.TRIANGLES});return n.attributes.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}const X3=new f,fte=new f;function hte(e,t){const n=e._vertexFormat,i=e._ellipsoid,o=t.height,r=t.width,s=t.northCap,a=t.southCap;let l=0,u=o,d=o,h=0;s&&(l=1,d-=1,h+=1),a&&(u-=1,d-=1,h+=1),h+=r*d;const m=n.position?new Float64Array(3*h):void 0,_=n.st?new Float32Array(2*h):void 0;let p=0,y=0;const A=Y3,x=K$e;let C=Number.MAX_VALUE,w=Number.MAX_VALUE,v=-Number.MAX_VALUE,D=-Number.MAX_VALUE;for(let I=l;I<u;++I)for(let L=0;L<r;++L)$a.computePosition(t,i,n.st,I,L,A,x),m[p++]=A.x,m[p++]=A.y,m[p++]=A.z,n.st&&(_[y++]=x.x,_[y++]=x.y,C=Math.min(C,x.x),w=Math.min(w,x.y),v=Math.max(v,x.x),D=Math.max(D,x.y));if(s&&($a.computePosition(t,i,n.st,0,0,A,x),m[p++]=A.x,m[p++]=A.y,m[p++]=A.z,n.st&&(_[y++]=x.x,_[y++]=x.y,C=x.x,w=x.y,v=x.x,D=x.y)),a&&($a.computePosition(t,i,n.st,o-1,0,A,x),m[p++]=A.x,m[p++]=A.y,m[p]=A.z,n.st&&(_[y++]=x.x,_[y]=x.y,C=Math.min(C,x.x),w=Math.min(w,x.y),v=Math.max(v,x.x),D=Math.max(D,x.y))),n.st&&(C<0||w<0||v>1||D>1))for(let I=0;I<_.length;I+=2)_[I]=(_[I]-C)/(v-C),_[I+1]=(_[I+1]-w)/(D-w);const P=function eKe(e,t,n,i){const o=e.length,r=t.normal?new Float32Array(o):void 0,s=t.tangent?new Float32Array(o):void 0,a=t.bitangent?new Float32Array(o):void 0;let l=0;const u=lte,d=cte;let h=ate;if(t.normal||t.tangent||t.bitangent)for(let m=0;m<o;m+=3){const _=f.fromArray(e,m,Y3),p=l+1,y=l+2;h=n.geodeticSurfaceNormal(_,h),(t.tangent||t.bitangent)&&(f.cross(f.UNIT_Z,h,d),ne.multiplyByVector(i,d,d),f.normalize(d,d),t.bitangent&&f.normalize(f.cross(h,d,u),u)),t.normal&&(r[l]=h.x,r[p]=h.y,r[y]=h.z),t.tangent&&(s[l]=d.x,s[p]=d.y,s[y]=d.z),t.bitangent&&(a[l]=u.x,a[p]=u.y,a[y]=u.z),l+=3}return dte(t,{positions:e,normals:r,tangents:s,bitangents:a})}(m,n,i,t.tangentRotationMatrix);let N=6*(r-1)*(d-1);s&&(N+=3*(r-1)),a&&(N+=3*(r-1));const R=Ot.createTypedArray(h,N);let S,B=0,F=0;for(S=0;S<d-1;++S){for(let I=0;I<r-1;++I){const M=B+r,U=M+1,z=B+1;R[F++]=B,R[F++]=M,R[F++]=z,R[F++]=z,R[F++]=M,R[F++]=U,++B}++B}if(s||a){let I=h-1;const L=h-1;let M,U;if(s&&a&&(I=h-2),B=0,s)for(S=0;S<r-1;S++)M=B,U=M+1,R[F++]=I,R[F++]=M,R[F++]=U,++B;if(a)for(B=(d-1)*r,S=0;S<r-1;S++)M=B,U=M+1,R[F++]=M,R[F++]=L,R[F++]=U,++B}return P.indices=R,n.st&&(P.attributes.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:_})),P}function $b(e,t,n,i,o){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n+2],e[t++]=o[n],e[t++]=o[n+1],e[t]=o[n+2],e}function Kb(e,t,n,i){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n],e[t]=i[n+1],e}const Z3=new et;const iKe=[new f,new f,new f,new f],pte=new Se,oKe=new Se;function $3(e,t,n,i,o){if(0===n)return Ce.clone(e,o);const r=$a.computeOptions(e,t,n,0,ute,pte),s=r.height,a=r.width,l=iKe;return $a.computePosition(r,i,!1,0,0,l[0]),$a.computePosition(r,i,!1,0,a-1,l[1]),$a.computePosition(r,i,!1,s-1,0,l[2]),$a.computePosition(r,i,!1,s-1,a-1,l[3]),Ce.fromCartesianArray(l,i,o)}function yf(e){const t=(e=g(e,g.EMPTY_OBJECT)).rectangle;if(T.typeOf.object("rectangle",t),Ce.validate(t),t.north<t.south)throw new E("options.rectangle.north must be greater than or equal to options.rectangle.south");const n=g(e.height,0),i=g(e.extrudedHeight,n);this._rectangle=Ce.clone(t),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._ellipsoid=ge.clone(g(e.ellipsoid,ge.WGS84)),this._surfaceHeight=Math.max(n,i),this._rotation=g(e.rotation,0),this._stRotation=g(e.stRotation,0),this._vertexFormat=et.clone(g(e.vertexFormat,et.DEFAULT)),this._extrudedHeight=Math.min(n,i),this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}yf.packedLength=Ce.packedLength+ge.packedLength+et.packedLength+7,yf.pack=function(e,t,n){return T.typeOf.object("value",e),T.defined("array",t),n=g(n,0),Ce.pack(e._rectangle,t,n),ge.pack(e._ellipsoid,t,n+=Ce.packedLength),et.pack(e._vertexFormat,t,n+=ge.packedLength),n+=et.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=g(e._offsetAttribute,-1),t};const mte=new Ce,_te=ge.clone(ge.UNIT_SPHERE),Rm={rectangle:mte,ellipsoid:_te,vertexFormat:Z3,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};yf.unpack=function(e,t,n){T.defined("array",e),t=g(t,0);const i=Ce.unpack(e,t,mte),o=ge.unpack(e,t+=Ce.packedLength,_te),r=et.unpack(e,t+=ge.packedLength,Z3);t+=et.packedLength;const s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=1===e[t++],m=e[t];return c(n)?(n._rectangle=Ce.clone(i,n._rectangle),n._ellipsoid=ge.clone(o,n._ellipsoid),n._vertexFormat=et.clone(r,n._vertexFormat),n._granularity=s,n._surfaceHeight=a,n._rotation=l,n._stRotation=u,n._extrudedHeight=d,n._shadowVolume=h,n._offsetAttribute=-1===m?void 0:m,n):(Rm.granularity=s,Rm.height=a,Rm.rotation=l,Rm.stRotation=u,Rm.extrudedHeight=d,Rm.shadowVolume=h,Rm.offsetAttribute=-1===m?void 0:m,new yf(Rm))},yf.computeRectangle=function(e,t){const n=(e=g(e,g.EMPTY_OBJECT)).rectangle;if(T.typeOf.object("rectangle",n),Ce.validate(n),n.north<n.south)throw new E("options.rectangle.north must be greater than or equal to options.rectangle.south");const i=g(e.granularity,O.RADIANS_PER_DEGREE),o=g(e.ellipsoid,ge.WGS84);return $3(n,i,g(e.rotation,0),o,t)};const rKe=new ne,gte=new yt,sKe=new Se;yf.createGeometry=function(e){if(O.equalsEpsilon(e._rectangle.north,e._rectangle.south,O.EPSILON10)||O.equalsEpsilon(e._rectangle.east,e._rectangle.west,O.EPSILON10))return;let t=e._rectangle;const n=e._ellipsoid,i=e._rotation,o=e._stRotation,r=e._vertexFormat,s=$a.computeOptions(t,e._granularity,i,o,ute,pte,oKe),a=rKe;if(0!==o||0!==i){const _=Ce.center(t,sKe),p=n.geodeticSurfaceNormalCartographic(_,X3);yt.fromAxisAngle(p,-o,gte),ne.fromQuaternion(gte,a)}else ne.clone(ne.IDENTITY,a);const l=e._surfaceHeight,u=e._extrudedHeight,d=!O.equalsEpsilon(l,u,0,O.EPSILON2);let h,m;if(s.lonScalar=1/e._rectangle.width,s.latScalar=1/e._rectangle.height,s.tangentRotationMatrix=a,t=e._rectangle,d){h=function nKe(e,t){const n=e._shadowVolume,i=e._offsetAttribute,o=e._vertexFormat,r=e._extrudedHeight,s=e._surfaceHeight,a=e._ellipsoid,l=t.height,u=t.width;let d;if(n){const Lt=et.clone(o,Z3);Lt.normal=!0,e._vertexFormat=Lt}const h=hte(e,t);n&&(e._vertexFormat=o);let m=po.scaleToGeodeticHeight(h.attributes.position.values,s,a,!1);m=new Float64Array(m);let _=m.length;const p=2*_,y=new Float64Array(p);y.set(m);const A=po.scaleToGeodeticHeight(h.attributes.position.values,r,a);y.set(A,_),h.attributes.position.values=y;const x=o.normal?new Float32Array(p):void 0,C=o.tangent?new Float32Array(p):void 0,w=o.bitangent?new Float32Array(p):void 0,v=o.st?new Float32Array(p/3*2):void 0;let D,P,N;if(o.normal){for(P=h.attributes.normal.values,x.set(P),d=0;d<_;d++)P[d]=-P[d];x.set(P,_),h.attributes.normal.values=x}if(n){P=h.attributes.normal.values,o.normal||(h.attributes.normal=void 0);const Lt=new Float32Array(p);for(d=0;d<_;d++)P[d]=-P[d];Lt.set(P,_),h.attributes.extrudeDirection=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:Lt})}const R=c(i);if(R){const Lt=_/3*2;let On=new Uint8Array(Lt);i===Yn.TOP?On=On.fill(1,0,Lt/2):(N=i===Yn.NONE?0:1,On=On.fill(N)),h.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:On})}if(o.tangent){const Lt=h.attributes.tangent.values;for(C.set(Lt),d=0;d<_;d++)Lt[d]=-Lt[d];C.set(Lt,_),h.attributes.tangent.values=C}if(o.bitangent){const Lt=h.attributes.bitangent.values;w.set(Lt),w.set(Lt,_),h.attributes.bitangent.values=w}o.st&&(D=h.attributes.st.values,v.set(D),v.set(D,_/3*2),h.attributes.st.values=v);const B=h.indices,F=B.length,S=_/3,I=Ot.createTypedArray(p/3,2*F);for(I.set(B),d=0;d<F;d+=3)I[d+F]=B[d+2]+S,I[d+1+F]=B[d+1]+S,I[d+2+F]=B[d]+S;h.indices=I;const L=t.northCap,M=t.southCap;let U=l,z=2,j=0,W=4,q=4;L&&(z-=1,U-=1,j+=1,W-=2,q-=1),M&&(z-=1,U-=1,j+=1,W-=2,q-=1),j+=z*u+2*U-W;const V=2*(j+q);let $=new Float64Array(3*V);const Z=n?new Float32Array(3*V):void 0;let ie=R?new Uint8Array(V):void 0,Y=o.st?new Float32Array(2*V):void 0;const Q=i===Yn.TOP;R&&!Q&&(N=i===Yn.ALL?1:0,ie=ie.fill(N));let K=0,me=0,we=0,le=0;const Ae=u*U;let xe;for(d=0;d<Ae;d+=u)xe=3*d,$=$b($,K,xe,m,A),K+=6,o.st&&(Y=Kb(Y,me,2*d,D),me+=4),n&&(we+=3,Z[we++]=P[xe],Z[we++]=P[xe+1],Z[we++]=P[xe+2]),Q&&(ie[le++]=1,le+=1);if(M){const Lt=L?Ae+1:Ae;for(xe=3*Lt,d=0;d<2;d++)$=$b($,K,xe,m,A),K+=6,o.st&&(Y=Kb(Y,me,2*Lt,D),me+=4),n&&(we+=3,Z[we++]=P[xe],Z[we++]=P[xe+1],Z[we++]=P[xe+2]),Q&&(ie[le++]=1,le+=1)}else for(d=Ae-u;d<Ae;d++)xe=3*d,$=$b($,K,xe,m,A),K+=6,o.st&&(Y=Kb(Y,me,2*d,D),me+=4),n&&(we+=3,Z[we++]=P[xe],Z[we++]=P[xe+1],Z[we++]=P[xe+2]),Q&&(ie[le++]=1,le+=1);for(d=Ae-1;d>0;d-=u)xe=3*d,$=$b($,K,xe,m,A),K+=6,o.st&&(Y=Kb(Y,me,2*d,D),me+=4),n&&(we+=3,Z[we++]=P[xe],Z[we++]=P[xe+1],Z[we++]=P[xe+2]),Q&&(ie[le++]=1,le+=1);if(L){const Lt=Ae;for(xe=3*Lt,d=0;d<2;d++)$=$b($,K,xe,m,A),K+=6,o.st&&(Y=Kb(Y,me,2*Lt,D),me+=4),n&&(we+=3,Z[we++]=P[xe],Z[we++]=P[xe+1],Z[we++]=P[xe+2]),Q&&(ie[le++]=1,le+=1)}else for(d=u-1;d>=0;d--)xe=3*d,$=$b($,K,xe,m,A),K+=6,o.st&&(Y=Kb(Y,me,2*d,D),me+=4),n&&(we+=3,Z[we++]=P[xe],Z[we++]=P[xe+1],Z[we++]=P[xe+2]),Q&&(ie[le++]=1,le+=1);let De=function tKe(e,t,n){const i=e.length,o=t.normal?new Float32Array(i):void 0,r=t.tangent?new Float32Array(i):void 0,s=t.bitangent?new Float32Array(i):void 0;let a=0,l=0,u=0,d=!0,h=lte,m=cte,_=ate;if(t.normal||t.tangent||t.bitangent)for(let p=0;p<i;p+=6){const y=f.fromArray(e,p,Y3),A=f.fromArray(e,(p+6)%i,X3);if(d){const x=f.fromArray(e,(p+3)%i,fte);f.subtract(A,y,A),f.subtract(x,y,x),_=f.normalize(f.cross(x,A,_),_),d=!1}f.equalsEpsilon(A,y,O.EPSILON10)&&(d=!0),(t.tangent||t.bitangent)&&(h=n.geodeticSurfaceNormal(y,h),t.tangent&&(m=f.normalize(f.cross(h,_,m),m))),t.normal&&(o[a++]=_.x,o[a++]=_.y,o[a++]=_.z,o[a++]=_.x,o[a++]=_.y,o[a++]=_.z),t.tangent&&(r[l++]=m.x,r[l++]=m.y,r[l++]=m.z,r[l++]=m.x,r[l++]=m.y,r[l++]=m.z),t.bitangent&&(s[u++]=h.x,s[u++]=h.y,s[u++]=h.z,s[u++]=h.x,s[u++]=h.y,s[u++]=h.z)}return dte(t,{positions:e,normals:o,tangents:r,bitangents:s})}($,o,a);o.st&&(De.attributes.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:Y})),n&&(De.attributes.extrudeDirection=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:Z})),R&&(De.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:ie}));const qe=Ot.createTypedArray(V,6*j);let $e,ot,kt,sn;_=$.length/3;let wn=0;for(d=0;d<_-1;d+=2){$e=d,sn=($e+2)%_;const Lt=f.fromArray($,3*$e,X3),On=f.fromArray($,3*sn,fte);f.equalsEpsilon(Lt,On,O.EPSILON10)||(ot=($e+1)%_,kt=(ot+2)%_,qe[wn++]=$e,qe[wn++]=ot,qe[wn++]=sn,qe[wn++]=sn,qe[wn++]=ot,qe[wn++]=kt)}return De.indices=qe,De=uo.combineInstances([new Un({geometry:h}),new Un({geometry:De})]),De[0]}(e,s);const _=be.fromRectangle3D(t,n,l,J$e),p=be.fromRectangle3D(t,n,u,Q$e);m=be.union(_,p)}else{if(h=hte(e,s),h.attributes.position.values=po.scaleToGeodeticHeight(h.attributes.position.values,l,n,!1),c(e._offsetAttribute)){const p=e._offsetAttribute===Yn.NONE?0:1,y=new Uint8Array(h.attributes.position.values.length/3).fill(p);h.attributes.applyOffset=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}m=be.fromRectangle3D(t,n,l)}return r.position||delete h.attributes.position,new Cn({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:m,offsetAttribute:e._offsetAttribute})},yf.createShadowVolume=function(e,t,n){const i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new yf({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:o,stRotation:e._stRotation,granularity:i,extrudedHeight:s,height:r,vertexFormat:et.POSITION_ONLY,shadowVolume:!0})};const yte=new Ce,aKe=[new G,new G,new G],cKe=new oo,lKe=new Se;Object.defineProperties(yf.prototype,{rectangle:{get:function(){return c(this._rotatedRectangle)||(this._rotatedRectangle=$3(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return c(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function uKe(e){if(0===e._stRotation)return[0,0,0,1,1,0];const r=$3(Ce.clone(e._rectangle,yte),e._granularity,e._rotation-e._stRotation,e._ellipsoid,yte),s=aKe;s[0].x=r.west,s[0].y=r.south,s[1].x=r.west,s[1].y=r.north,s[2].x=r.east,s[2].y=r.south;const a=e.rectangle,l=oo.fromRotation(e._stRotation,cKe),u=Ce.center(a,lKe);for(let p=0;p<3;++p){const y=s[p];y.x-=u.longitude,y.y-=u.latitude,oo.multiplyByVector(l,y,y),y.x+=u.longitude,y.y+=u.latitude,y.x=(y.x-a.west)/a.width,y.y=(y.y-a.south)/a.height}const d=s[0],h=s[1],m=s[2],_=new Array(6);return G.pack(d,_),G.pack(h,_,2),G.pack(m,_,4),_}(this)),this._textureCoordinateRotationPoints}}});const K3=yf,bte=new X,Ate=f.ZERO,Tte=new f,xte=new Ce,dKe=new Ce,fKe=new Se;function hKe(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function ld(e,t){pi.call(this,{entity:e,scene:t,geometryOptions:new hKe(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function Qb(e,t,n){_o.call(this,e,t,n)}c(Object.create)&&((ld.prototype=Object.create(pi.prototype)).constructor=ld),ld.prototype.createFillGeometryInstance=function(e){if(T.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i={show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:mo.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Fn){let o;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,bte)),c(o)||(o=X.WHITE),i.color=ti.fromColor(o)}return c(this._options.offsetAttribute)&&(i.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,Ate,Tte))),new Un({id:t,geometry:new K3(this._options),attributes:i})},ld.prototype.createOutlineGeometryInstance=function(e){if(T.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,X.BLACK,bte),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ti.fromColor(i),distanceDisplayCondition:mo.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=Kr.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,Ate,Tte))),new Un({id:t,geometry:new $9(this._options),attributes:r})},ld.prototype._computeCenter=function(e,t){const n=te.getValueOrUndefined(this._entity.rectangle.coordinates,e,dKe);if(!c(n))return;const i=Ce.center(n,fKe);return Se.toCartesian(i,ge.WGS84,t)},ld.prototype._isHidden=function(e,t){return!c(t.coordinates)||Oo.prototype._isHidden.call(this,e,t)},ld.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!te.isConstant(t.height)||!te.isConstant(t.extrudedHeight)||!te.isConstant(t.granularity)||!te.isConstant(t.stRotation)||!te.isConstant(t.rotation)||!te.isConstant(t.outlineWidth)||!te.isConstant(t.zIndex)||this._onTerrain&&!te.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Fn)},ld.prototype._setStaticOptions=function(e,t){const n=this._materialProperty instanceof Fn;let i=te.getValueOrUndefined(t.height,St.MINIMUM_VALUE);const o=te.getValueOrDefault(t.heightReference,St.MINIMUM_VALUE,Qt.NONE);let r=te.getValueOrUndefined(t.extrudedHeight,St.MINIMUM_VALUE);const s=te.getValueOrDefault(t.extrudedHeightReference,St.MINIMUM_VALUE,Qt.NONE);c(r)&&!c(i)&&(i=0);const a=this._options;a.vertexFormat=n?yi.VERTEX_FORMAT:ia.MaterialSupport.TEXTURED.vertexFormat,a.rectangle=t.coordinates.getValue(St.MINIMUM_VALUE,a.rectangle),a.granularity=te.getValueOrUndefined(t.granularity,St.MINIMUM_VALUE),a.stRotation=te.getValueOrUndefined(t.stRotation,St.MINIMUM_VALUE),a.rotation=te.getValueOrUndefined(t.rotation,St.MINIMUM_VALUE),a.offsetAttribute=pi.computeGeometryOffsetAttribute(i,o,r,s),a.height=pi.getGeometryHeight(i,o),r=pi.getGeometryExtrudedHeight(r,s),r===pi.CLAMP_TO_GROUND&&(r=wo.getMinimumMaximumHeights(K3.computeRectangle(a,xte)).minimumTerrainHeight),a.extrudedHeight=r},ld.DynamicGeometryUpdater=Qb,c(Object.create)&&((Qb.prototype=Object.create(_o.prototype)).constructor=Qb),Qb.prototype._isHidden=function(e,t,n){return!c(this._options.rectangle)||_o.prototype._isHidden.call(this,e,t,n)},Qb.prototype._setOptions=function(e,t,n){const i=this._options;let o=te.getValueOrUndefined(t.height,n);const r=te.getValueOrDefault(t.heightReference,n,Qt.NONE);let s=te.getValueOrUndefined(t.extrudedHeight,n);const a=te.getValueOrDefault(t.extrudedHeightReference,n,Qt.NONE);c(s)&&!c(o)&&(o=0),i.rectangle=te.getValueOrUndefined(t.coordinates,n,i.rectangle),i.granularity=te.getValueOrUndefined(t.granularity,n),i.stRotation=te.getValueOrUndefined(t.stRotation,n),i.rotation=te.getValueOrUndefined(t.rotation,n),i.offsetAttribute=pi.computeGeometryOffsetAttribute(o,r,s,a),i.height=pi.getGeometryHeight(o,r),s=pi.getGeometryExtrudedHeight(s,a),s===pi.CLAMP_TO_GROUND&&(s=wo.getMinimumMaximumHeights(K3.computeRectangle(i,xte)).minimumTerrainHeight),i.extrudedHeight=s};const pKe=ld,Cte=new X,mKe=new Jn,_Ke=new Jn,gKe=f.ZERO,yKe=new f;function ud(e,t,n,i,o,r,s){let a;this.translucent=t,this.appearanceType=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.depthFailMaterial=void 0,this.closed=r,this.shadows=s,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new _n,this.updaters=new _n,this.updatersWithAttributes=new _n,this.attributes=new _n,this.subscriptions=new _n,this.showsUpdated=new _n,this.itemsToRemove=[],this.invalidated=!1,c(o)&&(a=o.definitionChanged.addEventListener(ud.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=a}function Jb(e,t,n,i,o){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}function Ete(e,t){for(let i=e.length-1;i>=0;i--){const o=e[i];if(o.remove(t))return 0===o.updaters.length&&(e.splice(i,1),o.destroy()),!0}return!1}function wte(e,t,n){let i=!1;const o=t.length;for(let r=0;r<o;++r){const s=t[r],a=s.itemsToRemove,l=a.length;if(l>0)for(r=0;r<l;r++){const u=a[r];s.remove(u),e.add(n,u),i=!0}}return i}function ZI(e,t,n,i){let r,o=t.length;for(r=o-1;r>=0;r--){const s=t[r];if(s.invalidated){t.splice(r,1);const a=s.updaters.values,l=a.length;for(let u=0;u<l;u++)e.add(n,a[u]);s.destroy()}}for(o=t.length,r=0;r<o;++r)i=t[r].update(n)&&i;return i}function Ste(e,t,n){const i=e.length;for(let o=0;o<i;o++){const r=e[o];if(r.contains(t))return r.getBoundingSphere(t,n)}return $t.FAILED}function vte(e){const t=e.length;for(let n=0;n<t;n++)e[n].destroy();e.length=0}ud.prototype.onMaterialChanged=function(){this.invalidated=!0},ud.prototype.isMaterial=function(e){const t=this.depthFailMaterialProperty,n=e.depthFailMaterialProperty;return n===t||!!c(t)&&t.equals(n)},ud.prototype.add=function(e,t){const n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&te.isConstant(e.distanceDisplayConditionProperty)&&te.isConstant(e.terrainOffsetProperty)){const i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))}else this.updatersWithAttributes.set(n,e)},ud.prototype.remove=function(e){const t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);const n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},ud.prototype.update=function(e){let t=!0,n=0,i=this.primitive;const o=this.primitives;let r;if(this.createPrimitive){const s=this.geometry.values;if(s.length>0){let l;c(i)&&(c(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),c(this.depthFailAppearanceType)&&(c(this.depthFailMaterialProperty)&&(this.depthFailMaterial=oc.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),l=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),i=new Xi({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed}),depthFailAppearance:l,shadows:this.shadows}),o.add(i),t=!1}else{c(i)&&(o.remove(i),i=void 0);const l=this.oldPrimitive;c(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(c(i)&&i.ready){i.show=!0,c(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),c(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Fn)&&(this.depthFailMaterial=oc.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);const s=this.updatersWithAttributes.values,a=s.length,l=this.waitingOnCreate;for(r=0;r<a;r++){const u=s[r],d=this.geometry.get(u.id);let h=this.attributes.get(d.id.id);if(c(h)||(h=i.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),!u.fillMaterialProperty.isConstant||l){const x=te.getValueOrDefault(u.fillMaterialProperty.color,e,X.WHITE,Cte);X.equals(h._lastColor,x)||(h._lastColor=X.clone(x,h._lastColor),h.color=ti.toValue(x,h.color),(this.translucent&&255===h.color[3]||!this.translucent&&255!==h.color[3])&&(this.itemsToRemove[n++]=u))}if(c(this.depthFailAppearanceType)&&u.depthFailMaterialProperty instanceof Fn&&(!u.depthFailMaterialProperty.isConstant||l)){const x=te.getValueOrDefault(u.depthFailMaterialProperty.color,e,X.WHITE,Cte);X.equals(h._lastDepthFailColor,x)||(h._lastDepthFailColor=X.clone(x,h._lastDepthFailColor),h.depthFailColor=ti.toValue(x,h.depthFailColor))}const m=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e));m!==(1===h.show[0])&&(h.show=Oi.toValue(m,h.show));const p=u.distanceDisplayConditionProperty;if(!te.isConstant(p)){const A=te.getValueOrDefault(p,e,_Ke,mKe);Jn.equals(A,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Jn.clone(A,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=mo.toValue(A,h.distanceDisplayCondition))}const y=u.terrainOffsetProperty;if(!te.isConstant(y)){const A=te.getValueOrDefault(y,e,gKe,yKe);f.equals(A,h._lastOffset)||(h._lastOffset=f.clone(A,h._lastOffset),h.offset=Kr.toValue(A,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else c(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t},ud.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=this.geometry.get(o.id);let s=this.attributes.get(r.id.id);c(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));const a=o.entity.isShowing;a!==(1===s.show[0])&&(s.show=Oi.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},ud.prototype.contains=function(e){return this.updaters.contains(e.id)},ud.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return $t.PENDING;const i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&0===i.show[0]?$t.FAILED:(i.boundingSphere.clone(t),$t.DONE)},ud.prototype.destroy=function(){const e=this.primitive,t=this.primitives;c(e)&&t.remove(e);const n=this.oldPrimitive;c(n)&&t.remove(n),c(this.removeMaterialSubscription)&&this.removeMaterialSubscription()},Jb.prototype.add=function(e,t){let n,i;const o=t.createFillGeometryInstance(e);255===o.attributes.color.value[3]?(n=this._solidItems,i=!1):(n=this._translucentItems,i=!0);const r=n.length;for(let a=0;a<r;a++){const l=n[a];if(l.isMaterial(t))return void l.add(t,o)}const s=new ud(this._primitives,i,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);s.add(t,o),n.push(s)},Jb.prototype.remove=function(e){Ete(this._solidItems,e)||Ete(this._translucentItems,e)},Jb.prototype.update=function(e){let t=ZI(this,this._solidItems,e,!0);t=ZI(this,this._translucentItems,e,t)&&t;const n=wte(this,this._solidItems,e),i=wte(this,this._translucentItems,e);return(n||i)&&(t=ZI(this,this._solidItems,e,t)&&t,t=ZI(this,this._translucentItems,e,t)&&t),t},Jb.prototype.getBoundingSphere=function(e,t){const n=Ste(this._solidItems,e,t);return n===$t.FAILED?Ste(this._translucentItems,e,t):n},Jb.prototype.removeAllPrimitives=function(){vte(this._solidItems),vte(this._translucentItems)};const Qg=Jb,bKe=new Jn,AKe=new Jn,TKe=f.ZERO,xKe=new f;function dd(e,t,n,i,o,r,s){this.primitives=e,this.appearanceType=t,this.materialProperty=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.closed=r,this.shadows=s,this.updaters=new _n,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new _n,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new _n,this.attributes=new _n,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(dd.prototype.onMaterialChanged,this),this.subscriptions=new _n,this.showsUpdated=new _n}dd.prototype.onMaterialChanged=function(){this.invalidated=!0},dd.prototype.isMaterial=function(e){const t=this.materialProperty,n=e.fillMaterialProperty,i=this.depthFailMaterialProperty,o=e.depthFailMaterialProperty;if(n===t&&o===i)return!0;let r=c(t)&&t.equals(n);return r=(!c(i)&&!c(o)||c(i)&&i.equals(o))&&r,r},dd.prototype.add=function(e,t){const n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,t.createFillGeometryInstance(e)),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&te.isConstant(t.distanceDisplayConditionProperty)&&te.isConstant(t.terrainOffsetProperty)){const i=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener(function(o,r,s,a){"isShowing"===r&&i.showsUpdated.set(t.id,t)}))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},dd.prototype.remove=function(e){const t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);const n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};const CKe=new X;function eA(e,t,n,i,o){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}dd.prototype.update=function(e){let t=!0,n=this.primitive;const i=this.primitives,o=this.geometry.values;let r;if(this.createPrimitive){if(o.length>0){let a;c(n)&&(c(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=oc.getValue(e,this.materialProperty,this.material),c(this.depthFailMaterialProperty)&&(this.depthFailMaterial=oc.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),n=new Xi({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{c(n)&&(i.remove(n),n=void 0);const a=this.oldPrimitive;c(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(c(n)&&n.ready){n.show=!0,c(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=oc.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,c(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Fn)&&(this.depthFailMaterial=oc.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);const s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){const l=s[r],u=l.entity,d=this.geometry.get(l.id);let h=this.attributes.get(d.id.id);if(c(h)||(h=n.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),c(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof Fn&&!l.depthFailMaterialProperty.isConstant){const x=te.getValueOrDefault(l.depthFailMaterialProperty.color,e,X.WHITE,CKe);X.equals(h._lastDepthFailColor,x)||(h._lastDepthFailColor=X.clone(x,h._lastDepthFailColor),h.depthFailColor=ti.toValue(x,h.depthFailColor))}const m=u.isShowing&&(l.hasConstantFill||l.isFilled(e));m!==(1===h.show[0])&&(h.show=Oi.toValue(m,h.show));const p=l.distanceDisplayConditionProperty;if(!te.isConstant(p)){const A=te.getValueOrDefault(p,e,AKe,bKe);Jn.equals(A,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Jn.clone(A,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=mo.toValue(A,h.distanceDisplayCondition))}const y=l.terrainOffsetProperty;if(!te.isConstant(y)){const A=te.getValueOrDefault(y,e,TKe,xKe);f.equals(A,h._lastOffset)||(h._lastOffset=f.clone(A,h._lastOffset),h.offset=Kr.toValue(A,h.offset))}}this.updateShows(n)}else c(n)&&!n.ready&&(t=!1);return t},dd.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=o.entity,s=this.geometry.get(o.id);let a=this.attributes.get(s.id.id);c(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));const l=r.isShowing;l!==(1===a.show[0])&&(a.show=Oi.toValue(l,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},dd.prototype.contains=function(e){return this.updaters.contains(e.id)},dd.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return $t.PENDING;const i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&0===i.show[0]?$t.FAILED:(i.boundingSphere.clone(t),$t.DONE)},dd.prototype.destroy=function(){const e=this.primitive,t=this.primitives;c(e)&&t.remove(e);const n=this.oldPrimitive;c(n)&&t.remove(n),this.removeMaterialSubscription()},eA.prototype.add=function(e,t){const n=this._items,i=n.length;for(let r=0;r<i;r++){const s=n[r];if(s.isMaterial(t))return void s.add(e,t)}const o=new dd(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);o.add(e,t),n.push(o)},eA.prototype.remove=function(e){const t=this._items;for(let i=t.length-1;i>=0;i--){const o=t[i];if(o.remove(e)){0===o.updaters.length&&(t.splice(i,1),o.destroy());break}}},eA.prototype.update=function(e){let t;const n=this._items;for(t=n.length-1;t>=0;t--){const r=n[t];if(r.invalidated){n.splice(t,1);const s=r.updaters.values,a=s.length;for(let l=0;l<a;l++)this.add(e,s[l]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o},eA.prototype.getBoundingSphere=function(e,t){const n=this._items,i=n.length;for(let o=0;o<i;o++){const r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return $t.FAILED},eA.prototype.removeAllPrimitives=function(){const e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};const Jg=eA;var EKe=st(3727);function $I(){this._tree=new EKe}function ey(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}function wKe(e,t){return e.id===t.id}ey.fromRectangleAndId=function(e,t,n){return n.minX=t.west,n.minY=t.south,n.maxX=t.east,n.maxY=t.north,n.id=e,n},$I.prototype.insert=function(e,t){T.typeOf.string("id",e),T.typeOf.object("rectangle",t);const n=ey.fromRectangleAndId(e,t,new ey);this._tree.insert(n)};const SKe=new ey;$I.prototype.remove=function(e,t){T.typeOf.string("id",e),T.typeOf.object("rectangle",t);const n=ey.fromRectangleAndId(e,t,SKe);this._tree.remove(n,wKe)};const vKe=new ey;$I.prototype.collides=function(e){T.typeOf.object("rectangle",e);const t=ey.fromRectangleAndId("",e,vKe);return this._tree.collides(t)};const Dte=$I,DKe=new X,IKe=new Jn,PKe=new Jn;function Xh(e,t,n,i){this.primitives=e,this.zIndex=i,this.classificationType=t,this.color=n,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new _n,this.updaters=new _n,this.updatersWithAttributes=new _n,this.attributes=new _n,this.subscriptions=new _n,this.showsUpdated=new _n,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new Dte}function tA(e,t){this._batches=[],this._primitives=e,this._classificationType=t}Xh.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},Xh.prototype.add=function(e,t){const n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),this.rectangleCollisionCheck.insert(n,t.geometry.rectangle),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&te.isConstant(e.distanceDisplayConditionProperty)){const i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))}else this.updatersWithAttributes.set(n,e)},Xh.prototype.remove=function(e){const t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);const i=this.subscriptions.get(t);return c(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},Xh.prototype.update=function(e){let t=!0,i=this.primitive;const o=this.primitives;let r;if(this.createPrimitive){const s=this.geometry.values;if(s.length>0)c(i)&&(c(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new $0({show:!1,asynchronous:!0,geometryInstances:s.slice(),classificationType:this.classificationType}),o.add(i,this.zIndex),t=!1;else{c(i)&&(o.remove(i),i=void 0);const l=this.oldPrimitive;c(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(c(i)&&i.ready){i.show=!0,c(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);const s=this.updatersWithAttributes.values,a=s.length,l=this.waitingOnCreate;for(r=0;r<a;r++){const u=s[r],d=this.geometry.get(u.id);let h=this.attributes.get(d.id.id);if(c(h)||(h=i.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),!u.fillMaterialProperty.isConstant||l){const A=te.getValueOrDefault(u.fillMaterialProperty.color,e,X.WHITE,DKe);X.equals(h._lastColor,A)||(h._lastColor=X.clone(A,h._lastColor),h.color=ti.toValue(A,h.color))}const m=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e));m!==(1===h.show[0])&&(h.show=Oi.toValue(m,h.show));const p=u.distanceDisplayConditionProperty;if(!te.isConstant(p)){const y=te.getValueOrDefault(p,e,PKe,IKe);Jn.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Jn.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=mo.toValue(y,h.distanceDisplayCondition))}}this.updateShows(i),this.waitingOnCreate=!1}else c(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=0,t},Xh.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=this.geometry.get(o.id);let s=this.attributes.get(r.id.id);c(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));const a=o.entity.isShowing;a!==(1===s.show[0])&&(s.show=Oi.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},Xh.prototype.contains=function(e){return this.updaters.contains(e.id)},Xh.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return $t.PENDING;const i=n.getBoundingSphere(e.entity);return c(i)?(i.clone(t),$t.DONE):$t.FAILED},Xh.prototype.removeAllPrimitives=function(){const e=this.primitives,t=this.primitive;c(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());const n=this.oldPrimitive;c(n)&&(e.remove(n),this.oldPrimitive=void 0)},tA.prototype.add=function(e,t){const n=t.createFillGeometryInstance(e),i=this._batches,o=te.getValueOrDefault(t.zIndex,0);let r;const s=i.length;for(let a=0;a<s;++a){const l=i[a];if(l.zIndex===o&&!l.overlapping(n.geometry.rectangle)){r=l;break}}return c(r)||(r=new Xh(this._primitives,this._classificationType,n.attributes.color.value,o),i.push(r)),r.add(t,n),r},tA.prototype.remove=function(e){const t=this._batches,n=t.length;for(let i=0;i<n;++i)if(t[i].remove(e))return},tA.prototype.update=function(e){let t,n,i=!0;const o=this._batches,r=o.length;for(t=0;t<r;++t)i=o[t].update(e)&&i;for(t=0;t<r;++t){const s=o[t],a=s.itemsToRemove,l=a.length;for(let u=0;u<l;u++){n=a[u],s.remove(n);const d=this.add(e,n);s.isDirty=!0,d.isDirty=!0}}for(t=r-1;t>=0;--t){const s=o[t];s.isDirty&&(i=o[t].update(e)&&i,s.isDirty=!1),0===s.geometry.length&&o.splice(t,1)}return i},tA.prototype.getBoundingSphere=function(e,t){const n=this._batches,i=n.length;for(let o=0;o<i;++o){const r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return $t.FAILED},tA.prototype.removeAllPrimitives=function(){const e=this._batches,t=e.length;for(let n=0;n<t;++n)e[n].removeAllPrimitives()};const Ite=tA,OKe=new Jn,LKe=new Jn;function au(e,t,n,i,o,r){this.primitives=e,this.classificationType=t,this.appearanceType=n,this.materialProperty=i,this.updaters=new _n,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new _n,this.material=void 0,this.updatersWithAttributes=new _n,this.attributes=new _n,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(au.prototype.onMaterialChanged,this),this.subscriptions=new _n,this.showsUpdated=new _n,this.usingSphericalTextureCoordinates=o,this.zIndex=r,this.rectangleCollisionCheck=new Dte}function nA(e,t,n){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=n}au.prototype.onMaterialChanged=function(){this.invalidated=!0},au.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},au.prototype.isMaterial=function(e){const t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Fn&&t instanceof Fn||c(t)&&t.equals(n)},au.prototype.add=function(e,t,n){const i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),this.rectangleCollisionCheck.insert(i,n.geometry.rectangle),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&te.isConstant(t.distanceDisplayConditionProperty)){const o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,l){"isShowing"===s&&o.showsUpdated.set(t.id,t)}))}else this.updatersWithAttributes.set(i,t);this.createPrimitive=!0},au.prototype.remove=function(e){const t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);const i=this.subscriptions.get(t);return c(i)&&(i(),this.subscriptions.remove(t)),!0}return!1},au.prototype.update=function(e){let t=!0,n=this.primitive;const i=this.primitives,o=this.geometry.values;let r;if(this.createPrimitive){if(o.length>0)c(n)&&(c(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=oc.getValue(e,this.materialProperty,this.material),n=new $0({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{c(n)&&(i.remove(n),n=void 0);const a=this.oldPrimitive;c(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(c(n)&&n.ready){n.show=!0,c(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=oc.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;const s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){const l=s[r],u=l.entity,d=this.geometry.get(l.id);let h=this.attributes.get(d.id.id);c(h)||(h=n.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h));const m=u.isShowing&&(l.hasConstantFill||l.isFilled(e));m!==(1===h.show[0])&&(h.show=Oi.toValue(m,h.show));const p=l.distanceDisplayConditionProperty;if(!te.isConstant(p)){const y=te.getValueOrDefault(p,e,LKe,OKe);Jn.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Jn.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=mo.toValue(y,h.distanceDisplayCondition))}}this.updateShows(n)}else c(n)&&!n.ready&&(t=!1);return t},au.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=o.entity,s=this.geometry.get(o.id);let a=this.attributes.get(s.id.id);c(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));const l=r.isShowing;l!==(1===a.show[0])&&(a.show=Oi.toValue(l,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},au.prototype.contains=function(e){return this.updaters.contains(e.id)},au.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return $t.PENDING;const i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&0===i.show[0]?$t.FAILED:(i.boundingSphere.clone(t),$t.DONE)},au.prototype.destroy=function(){const e=this.primitive,t=this.primitives;c(e)&&t.remove(e);const n=this.oldPrimitive;c(n)&&t.remove(n),this.removeMaterialSubscription()},nA.prototype.add=function(e,t){const n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=ag.shouldUseSphericalCoordinates(o.geometry.rectangle),s=te.getValueOrDefault(t.zIndex,0);for(let l=0;l<i;++l){const u=n[l];if(u.isMaterial(t)&&u.usingSphericalTextureCoordinates===r&&u.zIndex===s&&!u.overlapping(o.geometry.rectangle))return void u.add(e,t,o)}const a=new au(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,r,s);a.add(e,t,o),n.push(a)},nA.prototype.remove=function(e){const t=this._items;for(let i=t.length-1;i>=0;i--){const o=t[i];if(o.remove(e)){0===o.updaters.length&&(t.splice(i,1),o.destroy());break}}},nA.prototype.update=function(e){let t;const n=this._items;for(t=n.length-1;t>=0;t--){const r=n[t];if(r.invalidated){n.splice(t,1);const s=r.updaters.values,a=s.length;for(let l=0;l<a;l++)this.add(e,s[l]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o},nA.prototype.getBoundingSphere=function(e,t){const n=this._items,i=n.length;for(let o=0;o<i;o++){const r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return $t.FAILED},nA.prototype.removeAllPrimitives=function(){const e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};const RKe=nA,NKe=new X,MKe=new Jn,FKe=new Jn,BKe=f.ZERO,kKe=new f;function Zh(e,t,n,i){this.translucent=t,this.width=n,this.shadows=i,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new _n,this.updaters=new _n,this.updatersWithAttributes=new _n,this.attributes=new _n,this.itemsToRemove=[],this.subscriptions=new _n,this.showsUpdated=new _n}function iA(e,t,n){this._primitives=e,this._scene=t,this._shadows=n,this._solidBatches=new _n,this._translucentBatches=new _n}Zh.prototype.add=function(e,t){const n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant&&te.isConstant(e.distanceDisplayConditionProperty)&&te.isConstant(e.terrainOffsetProperty)){const i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))}else this.updatersWithAttributes.set(n,e)},Zh.prototype.remove=function(e){const t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);const n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},Zh.prototype.update=function(e){let t=!0,n=0,i=this.primitive;const o=this.primitives;let r;if(this.createPrimitive){const s=this.geometry.values;if(s.length>0)c(i)&&(c(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new Xi({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new yi({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),o.add(i),t=!1;else{c(i)&&(o.remove(i),i=void 0);const l=this.oldPrimitive;c(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(c(i)&&i.ready){i.show=!0,c(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);const s=this.updatersWithAttributes.values,a=s.length,l=this.waitingOnCreate;for(r=0;r<a;r++){const u=s[r],d=this.geometry.get(u.id);let h=this.attributes.get(d.id.id);if(c(h)||(h=i.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),!u.outlineColorProperty.isConstant||l){const x=te.getValueOrDefault(u.outlineColorProperty,e,X.WHITE,NKe);X.equals(h._lastColor,x)||(h._lastColor=X.clone(x,h._lastColor),h.color=ti.toValue(x,h.color),(this.translucent&&255===h.color[3]||!this.translucent&&255!==h.color[3])&&(this.itemsToRemove[n++]=u))}const m=u.entity.isShowing&&(u.hasConstantOutline||u.isOutlineVisible(e));m!==(1===h.show[0])&&(h.show=Oi.toValue(m,h.show));const p=u.distanceDisplayConditionProperty;if(!te.isConstant(p)){const A=te.getValueOrDefault(p,e,FKe,MKe);Jn.equals(A,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Jn.clone(A,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=mo.toValue(A,h.distanceDisplayCondition))}const y=u.terrainOffsetProperty;if(!te.isConstant(y)){const A=te.getValueOrDefault(y,e,BKe,kKe);f.equals(A,h._lastOffset)||(h._lastOffset=f.clone(A,h._lastOffset),h.offset=Kr.toValue(A,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else c(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t},Zh.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=this.geometry.get(o.id);let s=this.attributes.get(r.id.id);c(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));const a=o.entity.isShowing;a!==(1===s.show[0])&&(s.show=Oi.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},Zh.prototype.contains=function(e){return this.updaters.contains(e.id)},Zh.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return $t.PENDING;const i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&0===i.show[0]?$t.FAILED:(i.boundingSphere.clone(t),$t.DONE)},Zh.prototype.removeAllPrimitives=function(){const e=this.primitives,t=this.primitive;c(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());const n=this.oldPrimitive;c(n)&&(e.remove(n),this.oldPrimitive=void 0)},iA.prototype.add=function(e,t){const n=t.createOutlineGeometryInstance(e),i=this._scene.clampLineWidth(t.outlineWidth);let o,r;255===n.attributes.color.value[3]?(o=this._solidBatches,r=o.get(i),c(r)||(r=new Zh(this._primitives,!1,i,this._shadows),o.set(i,r)),r.add(t,n)):(o=this._translucentBatches,r=o.get(i),c(r)||(r=new Zh(this._primitives,!0,i,this._shadows),o.set(i,r)),r.add(t,n))},iA.prototype.remove=function(e){let t;const n=this._solidBatches.values,i=n.length;for(t=0;t<i;t++)if(n[t].remove(e))return;const o=this._translucentBatches.values,r=o.length;for(t=0;t<r;t++)if(o[t].remove(e))return},iA.prototype.update=function(e){let t,n,i,o;const r=this._solidBatches.values,s=r.length,a=this._translucentBatches.values,l=a.length;let u,d=!0,h=!1;do{for(h=!1,n=0;n<s;n++){o=r[n],d=o.update(e),u=o.itemsToRemove;const m=u.length;if(m>0)for(h=!0,t=0;t<m;t++)i=u[t],o.remove(i),this.add(e,i)}for(n=0;n<l;n++){o=a[n],d=o.update(e),u=o.itemsToRemove;const m=u.length;if(m>0)for(h=!0,t=0;t<m;t++)i=u[t],o.remove(i),this.add(e,i)}}while(h);return d},iA.prototype.getBoundingSphere=function(e,t){let n;const i=this._solidBatches.values,o=i.length;for(n=0;n<o;n++){const a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}const r=this._translucentBatches.values,s=r.length;for(n=0;n<s;n++){const a=r[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return $t.FAILED},iA.prototype.removeAllPrimitives=function(){let e;const t=this._solidBatches.values,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();const i=this._translucentBatches.values,o=i.length;for(e=0;e<o;e++)i[e].removeAllPrimitives()};const Pte=iA,Ote={};function UKe(e,t){return O.equalsEpsilon(e.latitude,t.latitude,O.EPSILON10)&&O.equalsEpsilon(e.longitude,t.longitude,O.EPSILON10)}const zKe=new Se,VKe=new Se,GKe=new Array(2),jKe=new Array(2),WKe={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};Ote.computePositions=function(e,t,n,i,o,r){const s=function HKe(e,t,n,i){const o=(t=wa(t,f.equalsEpsilon)).length;if(o<2)return;const r=c(i),s=c(n),a=new Array(o),l=new Array(o),u=new Array(o),d=t[0];a[0]=d;const h=e.cartesianToCartographic(d,zKe);s&&(h.height=n[0]),l[0]=h.height,u[0]=r?i[0]:0;let p=l[0]===u[0],y=1;for(let A=1;A<o;++A){const x=t[A],C=e.cartesianToCartographic(x,VKe);s&&(C.height=n[A]),p=p&&0===C.height,UKe(h,C)?h.height<C.height&&(l[y-1]=C.height):(a[y]=x,l[y]=C.height,u[y]=r?i[A]:0,p=p&&l[y]===u[y],Se.clone(C,h),++y)}return p||y<2?void 0:(a.length=y,l.length=y,u.length=y,{positions:a,topHeights:l,bottomHeights:u})}(e,t,n,i);if(!c(s))return;n=s.topHeights,i=s.bottomHeights;const a=(t=s.positions).length,l=a-2;let u,d;const h=O.chordLength(o,e.maximumRadius),m=WKe;if(m.minDistance=h,m.ellipsoid=e,r){let p,_=0;for(p=0;p<a-1;p++)_+=Hr.numberOfPoints(t[p],t[p+1],h)+1;u=new Float64Array(3*_),d=new Float64Array(3*_);const y=GKe,A=jKe;m.positions=y,m.height=A;let x=0;for(p=0;p<a-1;p++){y[0]=t[p],y[1]=t[p+1],A[0]=n[p],A[1]=n[p+1];const C=Hr.generateArc(m);u.set(C,x),A[0]=i[p],A[1]=i[p+1],d.set(Hr.generateArc(m),x),x+=C.length}}else m.positions=t,m.height=n,u=new Float64Array(Hr.generateArc(m)),m.height=i,d=new Float64Array(Hr.generateArc(m));return{bottomPositions:d,topPositions:u,numCorners:l}};const Lte=Ote,Q3=new f,KI=new f,qKe=new f,Rte=new f,YKe=new f,XKe=new f,ZKe=new f;function ty(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions,n=e.maximumHeights,i=e.minimumHeights;if(!c(t))throw new E("options.positions is required.");if(c(n)&&n.length!==t.length)throw new E("options.positions and options.maximumHeights must have the same length.");if(c(i)&&i.length!==t.length)throw new E("options.positions and options.minimumHeights must have the same length.");const o=g(e.vertexFormat,et.DEFAULT),r=g(e.granularity,O.RADIANS_PER_DEGREE),s=g(e.ellipsoid,ge.WGS84);this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=et.clone(o),this._granularity=r,this._ellipsoid=ge.clone(s),this._workerName="createWallGeometry";let a=1+t.length*f.packedLength+2;c(i)&&(a+=i.length),c(n)&&(a+=n.length),this.packedLength=a+ge.packedLength+et.packedLength+1}ty.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");let i;n=g(n,0);const o=e._positions;let r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=f.packedLength)f.pack(o[i],t,n);const s=e._minimumHeights;if(r=c(s)?s.length:0,t[n++]=r,c(s))for(i=0;i<r;++i)t[n++]=s[i];const a=e._maximumHeights;if(r=c(a)?a.length:0,t[n++]=r,c(a))for(i=0;i<r;++i)t[n++]=a[i];return ge.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=ge.packedLength),t[n+=et.packedLength]=e._granularity,t};const Nte=ge.clone(ge.UNIT_SPHERE),Mte=new et,KC={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:Nte,vertexFormat:Mte,granularity:void 0};ty.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);let i,o=e[t++];const r=new Array(o);for(i=0;i<o;++i,t+=f.packedLength)r[i]=f.unpack(e,t);let s,a;if(o=e[t++],o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];if(o=e[t++],o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];const l=ge.unpack(e,t,Nte),u=et.unpack(e,t+=ge.packedLength,Mte),d=e[t+=et.packedLength];return c(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=ge.clone(l,n._ellipsoid),n._vertexFormat=et.clone(u,n._vertexFormat),n._granularity=d,n):(KC.positions=r,KC.minimumHeights=s,KC.maximumHeights=a,KC.granularity=d,new ty(KC))},ty.fromConstantHeights=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions;if(!c(t))throw new E("options.positions is required.");let n,i;const o=e.minimumHeight,r=e.maximumHeight,s=c(o),a=c(r);if(s||a){const u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let d=0;d<u;++d)s&&(n[d]=o),a&&(i[d]=r)}return new ty({positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},ty.createGeometry=function(e){const o=e._vertexFormat,s=e._ellipsoid,a=Lte.computePositions(s,e._positions,e._maximumHeights,e._minimumHeights,e._granularity,!0);if(!c(a))return;const l=a.bottomPositions,u=a.topPositions,d=a.numCorners;let h=u.length,m=2*h;const _=o.position?new Float64Array(m):void 0,p=o.normal?new Float32Array(m):void 0,y=o.tangent?new Float32Array(m):void 0,A=o.bitangent?new Float32Array(m):void 0,x=o.st?new Float32Array(m/3*2):void 0;let C=0,w=0,v=0,D=0,P=0,N=ZKe,R=XKe,B=YKe,F=!0;h/=3;let S,I=0;const L=1/(h-d-1);for(S=0;S<h;++S){const W=3*S,q=f.fromArray(u,W,Q3),V=f.fromArray(l,W,KI);if(o.position&&(_[C++]=V.x,_[C++]=V.y,_[C++]=V.z,_[C++]=q.x,_[C++]=q.y,_[C++]=q.z),o.st&&(x[P++]=I,x[P++]=0,x[P++]=I,x[P++]=1),o.normal||o.tangent||o.bitangent){let $=f.clone(f.ZERO,Rte);const Z=f.subtract(q,s.geodeticSurfaceNormal(q,KI),KI);if(S+1<h&&($=f.fromArray(u,W+3,Rte)),F){const ie=f.subtract($,q,qKe),Y=f.subtract(Z,q,Q3);N=f.normalize(f.cross(Y,ie,N),N),F=!1}f.equalsEpsilon(q,$,O.EPSILON10)?F=!0:(I+=L,o.tangent&&(R=f.normalize(f.subtract($,q,R),R)),o.bitangent&&(B=f.normalize(f.cross(N,R,B),B))),o.normal&&(p[w++]=N.x,p[w++]=N.y,p[w++]=N.z,p[w++]=N.x,p[w++]=N.y,p[w++]=N.z),o.tangent&&(y[D++]=R.x,y[D++]=R.y,y[D++]=R.z,y[D++]=R.x,y[D++]=R.y,y[D++]=R.z),o.bitangent&&(A[v++]=B.x,A[v++]=B.y,A[v++]=B.z,A[v++]=B.x,A[v++]=B.y,A[v++]=B.z)}}const M=new lo;o.position&&(M.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:_})),o.normal&&(M.normal=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:p})),o.tangent&&(M.tangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:y})),o.bitangent&&(M.bitangent=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:A})),o.st&&(M.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:x}));const U=m/3;m-=6*(d+1);const z=Ot.createTypedArray(U,m);let j=0;for(S=0;S<U-2;S+=2){const W=S,q=S+2,V=f.fromArray(_,3*W,Q3),$=f.fromArray(_,3*q,KI);if(f.equalsEpsilon(V,$,O.EPSILON10))continue;const ie=S+3;z[j++]=S+1,z[j++]=W,z[j++]=ie,z[j++]=ie,z[j++]=W,z[j++]=q}return new Cn({attributes:M,indices:z,primitiveType:At.TRIANGLES,boundingSphere:new be.fromVertices(_)})};const $Ke=ty,Fte=new f,Bte=new f;function ny(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions,n=e.maximumHeights,i=e.minimumHeights;if(!c(t))throw new E("options.positions is required.");if(c(n)&&n.length!==t.length)throw new E("options.positions and options.maximumHeights must have the same length.");if(c(i)&&i.length!==t.length)throw new E("options.positions and options.minimumHeights must have the same length.");const o=g(e.granularity,O.RADIANS_PER_DEGREE),r=g(e.ellipsoid,ge.WGS84);this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._granularity=o,this._ellipsoid=ge.clone(r),this._workerName="createWallOutlineGeometry";let s=1+t.length*f.packedLength+2;c(i)&&(s+=i.length),c(n)&&(s+=n.length),this.packedLength=s+ge.packedLength+1}ny.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");let i;n=g(n,0);const o=e._positions;let r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=f.packedLength)f.pack(o[i],t,n);const s=e._minimumHeights;if(r=c(s)?s.length:0,t[n++]=r,c(s))for(i=0;i<r;++i)t[n++]=s[i];const a=e._maximumHeights;if(r=c(a)?a.length:0,t[n++]=r,c(a))for(i=0;i<r;++i)t[n++]=a[i];return ge.pack(e._ellipsoid,t,n),t[n+=ge.packedLength]=e._granularity,t};const kte=ge.clone(ge.UNIT_SPHERE),QC={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:kte,granularity:void 0};ny.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);let i,o=e[t++];const r=new Array(o);for(i=0;i<o;++i,t+=f.packedLength)r[i]=f.unpack(e,t);let s,a;if(o=e[t++],o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];if(o=e[t++],o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];const l=ge.unpack(e,t,kte),u=e[t+=ge.packedLength];return c(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=ge.clone(l,n._ellipsoid),n._granularity=u,n):(QC.positions=r,QC.minimumHeights=s,QC.maximumHeights=a,QC.granularity=u,new ny(QC))},ny.fromConstantHeights=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions;if(!c(t))throw new E("options.positions is required.");let n,i;const o=e.minimumHeight,r=e.maximumHeight,s=c(o),a=c(r);if(s||a){const u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let d=0;d<u;++d)s&&(n[d]=o),a&&(i[d]=r)}return new ny({positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid})},ny.createGeometry=function(e){const s=Lte.computePositions(e._ellipsoid,e._positions,e._maximumHeights,e._minimumHeights,e._granularity,!1);if(!c(s))return;const a=s.bottomPositions,l=s.topPositions;let u=l.length,d=2*u;const h=new Float64Array(d);let _,m=0;for(u/=3,_=0;_<u;++_){const C=3*_,w=f.fromArray(l,C,Fte),v=f.fromArray(a,C,Bte);h[m++]=v.x,h[m++]=v.y,h[m++]=v.z,h[m++]=w.x,h[m++]=w.y,h[m++]=w.z}const p=new lo({position:new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:h})}),y=d/3;d=2*y-4+y;const A=Ot.createTypedArray(y,d);let x=0;for(_=0;_<y-2;_+=2){const C=_,w=_+2,v=f.fromArray(h,3*C,Fte),D=f.fromArray(h,3*w,Bte);if(f.equalsEpsilon(v,D,O.EPSILON10))continue;const P=_+1,N=_+3;A[x++]=P,A[x++]=C,A[x++]=P,A[x++]=N,A[x++]=C,A[x++]=w}return A[x++]=y-2,A[x++]=y-1,new Cn({attributes:p,indices:A,primitiveType:At.LINES,boundingSphere:new be.fromVertices(h)})};const KKe=ny,Ute=new X;function QKe(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0}function fd(e,t){Oo.call(this,{entity:e,scene:t,geometryOptions:new QKe(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function oA(e,t,n){_o.call(this,e,t,n)}c(Object.create)&&((fd.prototype=Object.create(Oo.prototype)).constructor=fd),fd.prototype.createFillGeometryInstance=function(e){if(T.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e);let i,o;const r=new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=mo.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Fn){let l;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(l=this._materialProperty.color.getValue(e,Ute)),c(l)||(l=X.WHITE),o=ti.fromColor(l),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new Un({id:t,geometry:new $Ke(this._options),attributes:i})},fd.prototype.createOutlineGeometryInstance=function(e){if(T.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,X.BLACK,Ute),o=this._distanceDisplayConditionProperty.getValue(e);return new Un({id:t,geometry:new KKe(this._options),attributes:{show:new Oi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ti.fromColor(i),distanceDisplayCondition:mo.fromDistanceDisplayCondition(o)}})},fd.prototype._isHidden=function(e,t){return!c(t.positions)||Oo.prototype._isHidden.call(this,e,t)},fd.prototype._getIsClosed=function(e){return!1},fd.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&te.isConstant(t.minimumHeights)&&te.isConstant(t.maximumHeights)&&te.isConstant(t.outlineWidth)&&te.isConstant(t.granularity))},fd.prototype._setStaticOptions=function(e,t){const n=t.minimumHeights,i=t.maximumHeights,o=t.granularity,s=this._options;s.vertexFormat=this._materialProperty instanceof Fn?yi.VERTEX_FORMAT:ia.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(St.MINIMUM_VALUE,s.positions),s.minimumHeights=c(n)?n.getValue(St.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=c(i)?i.getValue(St.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=c(o)?o.getValue(St.MINIMUM_VALUE):void 0},fd.DynamicGeometryUpdater=oA,c(Object.create)&&((oA.prototype=Object.create(_o.prototype)).constructor=oA),oA.prototype._isHidden=function(e,t,n){return!c(this._options.positions)||_o.prototype._isHidden.call(this,e,t,n)},oA.prototype._setOptions=function(e,t,n){const i=this._options;i.positions=te.getValueOrUndefined(t.positions,n,i.positions),i.minimumHeights=te.getValueOrUndefined(t.minimumHeights,n,i.minimumHeights),i.maximumHeights=te.getValueOrUndefined(t.maximumHeights,n,i.maximumHeights),i.granularity=te.getValueOrUndefined(t.granularity,n)};const eQe=[],zte=[oXe,eZe,WXe,mZe,TZe,NZe,H$e,$$e,pKe,fd];function JC(e,t){this.entity=e,this.scene=t;const n=new Array(zte.length),i=new Ue;function o(s){i.raiseEvent(s)}const r=new Rh;for(let s=0;s<n.length;s++){const a=new zte[s](e,t);r.add(a.geometryChanged,o),n[s]=a}this.updaters=n,this.geometryChanged=i,this.eventHelper=r,this._removeEntitySubscription=e.definitionChanged.addEventListener(JC.prototype._onEntityPropertyChanged,this)}function cu(e,t,n,i){T.defined("scene",e),T.defined("entityCollection",t),n=g(n,e.primitives),i=g(i,e.groundPrimitives),this._scene=e,this._primitives=n,this._groundPrimitives=i,this._entityCollection=void 0,this._addedObjects=new _n,this._removedObjects=new _n,this._changedObjects=new _n;const o=$o.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(2*o),this._closedColorBatches=new Array(2*o),this._closedMaterialBatches=new Array(2*o),this._openColorBatches=new Array(2*o),this._openMaterialBatches=new Array(2*o);const r=wc.supportsMaterialsforEntitiesOnTerrain(e);let s;for(this._supportsMaterialsforEntitiesOnTerrain=r,s=0;s<o;++s)this._outlineBatches[s]=new Pte(n,e,s,!1),this._outlineBatches[o+s]=new Pte(n,e,s,!0),this._closedColorBatches[s]=new Qg(n,yi,void 0,!0,s,!0),this._closedColorBatches[o+s]=new Qg(n,yi,void 0,!0,s,!1),this._closedMaterialBatches[s]=new Jg(n,ia,void 0,!0,s,!0),this._closedMaterialBatches[o+s]=new Jg(n,ia,void 0,!0,s,!1),this._openColorBatches[s]=new Qg(n,yi,void 0,!1,s,!0),this._openColorBatches[o+s]=new Qg(n,yi,void 0,!1,s,!1),this._openMaterialBatches[s]=new Jg(n,ia,void 0,!1,s,!0),this._openMaterialBatches[o+s]=new Jg(n,ia,void 0,!1,s,!1);const a=Yo.NUMBER_OF_CLASSIFICATION_TYPES,l=new Array(a),u=[];if(r)for(s=0;s<a;++s)u.push(new RKe(i,s,ia)),l[s]=new Ite(i,s);else for(s=0;s<a;++s)l[s]=new Ite(i,s);this._groundColorBatches=l,this._groundMaterialBatches=u,this._dynamicBatch=new fee(n,i),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new _n,this._updaterSets=new _n,this._entityCollection=t,t.collectionChanged.addEventListener(cu.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,eQe)}JC.prototype._onEntityPropertyChanged=function(e,t,n,i){const o=this.updaters;for(let r=0;r<o.length;r++)o[r]._onEntityPropertyChanged(e,t,n,i)},JC.prototype.forEach=function(e){const t=this.updaters;for(let n=0;n<t.length;n++)e(t[n])},JC.prototype.destroy=function(){this.eventHelper.removeAll();const e=this.updaters;for(let t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),Ye(this)},cu.prototype.update=function(e){T.defined("time",e);const t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.values;let a,l,u,d;const h=this;for(a=s.length-1;a>-1;a--)l=s[a],u=l.id,d=this._updaterSets.get(u),d.entity===l?d.forEach(function(y){h._removeUpdater(y),h._insertUpdaterIntoBatch(e,y)}):(o.push(l),n.push(l));for(a=o.length-1;a>-1;a--)l=o[a],u=l.id,d=this._updaterSets.get(u),d.forEach(this._removeUpdater.bind(this)),d.destroy(),this._updaterSets.remove(u),this._subscriptions.get(u)(),this._subscriptions.remove(u);for(a=n.length-1;a>-1;a--)l=n[a],u=l.id,d=new JC(l,this._scene),this._updaterSets.set(u,d),d.forEach(function(y){h._insertUpdaterIntoBatch(e,y)}),this._subscriptions.set(u,d.geometryChanged.addEventListener(cu._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let m=!0;const _=this._batches,p=_.length;for(a=0;a<p;a++)m=_[a].update(e)&&m;return m};const tQe=[],nQe=new be;cu.prototype.getBoundingSphere=function(e,t){T.defined("entity",e),T.defined("result",t);const n=tQe,i=nQe;let o=0,r=$t.DONE;const s=this._batches,a=s.length,u=this._updaterSets.get(e.id).updaters;for(let d=0;d<u.length;d++){const h=u[d];for(let m=0;m<a;m++){if(r=s[m].getBoundingSphere(h,i),r===$t.PENDING)return $t.PENDING;r===$t.DONE&&(n[o]=be.clone(i,n[o]),o++)}}return 0===o?$t.FAILED:(n.length=o,be.fromBoundingSpheres(n,t),$t.DONE)},cu.prototype.isDestroyed=function(){return!1},cu.prototype.destroy=function(){let e;this._entityCollection.collectionChanged.removeEventListener(cu.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();const t=this._batches;let n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();const i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();this._subscriptions.removeAll();const o=this._updaterSets.values;for(n=o.length,e=0;e<n;e++)o[e].destroy();return this._updaterSets.removeAll(),Ye(this)},cu.prototype._removeUpdater=function(e){const t=this._batches,n=t.length;for(let i=0;i<n;i++)t[i].remove(e)},cu.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic)return void this._dynamicBatch.add(e,t);let n;(t.outlineEnabled||t.fillEnabled)&&(n=t.shadowsProperty.getValue(e));const i=$o.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(c(t.terrainOffsetProperty)?this._outlineBatches[i+n].add(e,t):this._outlineBatches[n].add(e,t)),t.fillEnabled)if(t.onTerrain){const o=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof Fn?this._groundColorBatches[o].add(e,t):this._groundMaterialBatches[o].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof Fn?c(t.terrainOffsetProperty)?this._closedColorBatches[i+n].add(e,t):this._closedColorBatches[n].add(e,t):c(t.terrainOffsetProperty)?this._closedMaterialBatches[i+n].add(e,t):this._closedMaterialBatches[n].add(e,t):t.fillMaterialProperty instanceof Fn?c(t.terrainOffsetProperty)?this._openColorBatches[i+n].add(e,t):this._openColorBatches[n].add(e,t):c(t.terrainOffsetProperty)?this._openMaterialBatches[i+n].add(e,t):this._openMaterialBatches[n].add(e,t)},cu._onGeometryChanged=function(e){const n=this._changedObjects,i=e.entity,o=i.id;!c(this._removedObjects.get(o))&&!c(n.get(o))&&n.set(o,i)},cu.prototype._onCollectionChanged=function(e,t,n){const i=this._addedObjects,o=this._removedObjects,r=this._changedObjects;let s,a,l;for(s=n.length-1;s>-1;s--)l=n[s],a=l.id,i.remove(a)||(o.set(a,l),r.remove(a));for(s=t.length-1;s>-1;s--)l=t[s],a=l.id,o.remove(a)?r.set(a,l):i.set(a,l)};const iQe=cu,sQe=Rl.FILL,aQe=X.WHITE,cQe=X.BLACK,dQe=new X(.165,.165,.165,.8),fQe=new G(7,5),hQe=G.ZERO,pQe=f.ZERO,mQe=Qt.NONE,_Qe=Ca.CENTER,gQe=ao.CENTER,yQe=new f,bQe=new X,AQe=new X,TQe=new X,xQe=new G,CQe=new f,EQe=new G,wQe=new Mn,SQe=new Mn,vQe=new Mn,DQe=new Jn;function Vte(e){this.entity=e,this.label=void 0,this.index=void 0}function Nm(e,t){if(!c(e))throw new E("entityCluster is required.");if(!c(t))throw new E("entityCollection is required.");t.collectionChanged.addEventListener(Nm.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new _n,this._onCollectionChanged(t,t.values,[],[])}function J3(e,t,n){c(e)&&(e.label=void 0,n.removeLabel(t))}Nm.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){const r=t[i],s=r.entity,a=s._label;let l,h,u=r.label,d=s.isShowing&&s.isAvailable(e)&&te.getValueOrDefault(a._show,e,!0);if(d&&(h=te.getValueOrUndefined(s._position,e,yQe),l=te.getValueOrUndefined(a._text,e),d=c(h)&&c(l)),!d){J3(r,s,n);continue}te.isConstant(s._position)||(n._clusterDirty=!0);let m=!1;const _=te.getValueOrDefault(a._heightReference,e,mQe);c(u)||(u=n.getLabel(s),u.id=s,r.label=u,m=f.equals(u.position,h)&&u.heightReference===_),u.show=!0,u.position=h,u.text=l,u.scale=te.getValueOrDefault(a._scale,e,1),u.font=te.getValueOrDefault(a._font,e,"30px sans-serif"),u.style=te.getValueOrDefault(a._style,e,sQe),u.fillColor=te.getValueOrDefault(a._fillColor,e,aQe,bQe),u.outlineColor=te.getValueOrDefault(a._outlineColor,e,cQe,AQe),u.outlineWidth=te.getValueOrDefault(a._outlineWidth,e,1),u.showBackground=te.getValueOrDefault(a._showBackground,e,!1),u.backgroundColor=te.getValueOrDefault(a._backgroundColor,e,dQe,TQe),u.backgroundPadding=te.getValueOrDefault(a._backgroundPadding,e,fQe,xQe),u.pixelOffset=te.getValueOrDefault(a._pixelOffset,e,hQe,EQe),u.eyeOffset=te.getValueOrDefault(a._eyeOffset,e,pQe,CQe),u.heightReference=_,u.horizontalOrigin=te.getValueOrDefault(a._horizontalOrigin,e,_Qe),u.verticalOrigin=te.getValueOrDefault(a._verticalOrigin,e,gQe),u.translucencyByDistance=te.getValueOrUndefined(a._translucencyByDistance,e,wQe),u.pixelOffsetScaleByDistance=te.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,SQe),u.scaleByDistance=te.getValueOrUndefined(a._scaleByDistance,e,vQe),u.distanceDisplayCondition=te.getValueOrUndefined(a._distanceDisplayCondition,e,DQe),u.disableDepthTestDistance=te.getValueOrUndefined(a._disableDepthTestDistance,e),m&&u._updateClamping()}return!0},Nm.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new E("entity is required.");if(!c(t))throw new E("result is required.");const n=this._items.get(e.id);if(!c(n)||!c(n.label))return $t.FAILED;const i=n.label;return t.center=f.clone(g(i._clampedPosition,i.position),t.center),t.radius=0,$t.DONE},Nm.prototype.isDestroyed=function(){return!1},Nm.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Nm.prototype._onCollectionChanged,this);const e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return Ye(this)},Nm.prototype._onCollectionChanged=function(e,t,n,i){let o,r;const s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],c(r._label)&&c(r._position)&&s.set(r.id,new Vte(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._label)&&c(r._position)?s.contains(r.id)||s.set(r.id,new Vte(r)):(J3(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],J3(s.get(r.id),r,a),s.remove(r.id)};const IQe=Nm;function ek(){return ek=(0,Pe.Z)(function*(e,t,n,i){return c(i)||(i=!1),T.typeOf.object("terrainProvider",e),T.typeOf.number("level",t),T.typeOf.bool("rejectOnTileFail",i),T.defined("positions",n),function RQe(e,t,n,i){const o=e.tilingScheme;let r;const s=[],a={};for(r=0;r<n.length;++r){const u=o.positionToTileXY(n[r],t);if(!c(u))continue;const d=u.toString();if(!a.hasOwnProperty(d)){const h={x:u.x,y:u.y,level:t,tilingScheme:o,terrainProvider:e,positions:[]};a[d]=h,s.push(h)}a[d].positions.push(n[r])}const l=[];return tk(s,l,i).then(function(){return Promise.all(l).then(function(){return n})})}(e,t,n,i)}),ek.apply(this,arguments)}function tk(e,t,n){return e.length?function OQe(e,t,n){const i=e[0],o=i.terrainProvider.requestTileGeometry(i.x,i.y,i.level);if(!o)return!1;let r;return r=n?o.then(Gte(i)):o.then(Gte(i)).catch(function NQe(e){const t=e.positions;return function(){for(let n=0;n<t.length;++n)t[n].height=void 0}}(i)),e.shift(),t.push(r),!0}(e,t,n)?tk(e,t):function LQe(e){return new Promise(function(t){setTimeout(t,e)})}(100).then(()=>tk(e,t)):Promise.resolve()}function Hte(e,t,n){const i=t.interpolateHeight(n,e.longitude,e.latitude);return void 0!==i&&(e.height=i,!0)}function Gte(e){const 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)if(!Hte(t[r],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)Hte(t[r],i,n)}):Promise.resolve()}}const MQe=function PQe(e,t,n,i){return ek.apply(this,arguments)},nk=new G;function jte(e,t,n){return ik.apply(this,arguments)}function ik(){return ik=(0,Pe.Z)(function*(e,t,n){if(c(n)||(n=!1),!c(e))throw new E("terrainProvider is required.");if(!c(t))throw new E("positions is required.");const i=[],o=[],r=e.availability;if(!c(r))throw new E("sampleTerrainMostDetailed requires a terrain provider that has tile availability.");const s=[];for(let l=0;l<t.length;++l){const u=t[l],d=r.computeMaximumLevelAtPosition(u);if(o[l]=d,0===d){e.tilingScheme.positionToTileXY(u,1,nk);const m=e.loadTileDataAvailability(nk.x,nk.y,1);c(m)&&s.push(m)}let h=i[d];c(h)||(i[d]=h=[]),h.push(u)}yield Promise.all(s),yield Promise.all(i.map(function(l,u){if(c(l))return MQe(e,u,l,n)}));const a=[];for(let l=0;l<t.length;++l){const u=t[l];r.computeMaximumLevelAtPosition(u)!==o[l]&&a.push(u)}return a.length>0&&(yield jte(e,a,n)),t}),ik.apply(this,arguments)}const ok=jte,zQe=$o.ENABLED,VQe=Qt.NONE,HQe=X.RED,jQe=X.WHITE,WQe=dS.HIGHLIGHT,YQe=new G(1,1),XQe=new k,ZQe=new k,Wte=new X,qte=new Array(4),$Qe=new f;function bf(e,t){T.typeOf.object("scene",e),T.typeOf.object("entityCollection",t),t.collectionChanged.addEventListener(bf.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new _n,this._onCollectionChanged(t,t.values,[],[])}function KQe(e,t,n,i){return rk.apply(this,arguments)}function rk(){return rk=(0,Pe.Z)(function*(e,t,n,i){const o=e._primitives,r=e._modelHash;try{const s=yield u0.fromGltfAsync({url:n,incrementallyLoadTextures:i,scene:e._scene});if(e.isDestroyed()||!c(r[t.id]))return;s.id=t,o.add(s),r[t.id].modelPrimitive=s,s.errorEvent.addEventListener(a=>{c(r[t.id])&&(console.log(a),"TextureError"!==a.name&&s.incrementallyLoadTextures&&(r[t.id].loadFailed=!0))})}catch(s){if(e.isDestroyed()||!c(r[t.id]))return;console.log(s),r[t.id].loadFailed=!0}}),rk.apply(this,arguments)}bf.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._entitiesToVisualize.values,n=this._modelHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){const s=t[o],a=s._model;let l,h,u=n[s.id],d=s.isShowing&&s.isAvailable(e)&&te.getValueOrDefault(a._show,e,!0);if(d&&(h=s.computeModelMatrix(e,XQe),l=jt.createIfNeeded(te.getValueOrUndefined(a._uri,e)),d=c(h)&&c(l)),!d){c(u)&&u.modelPrimitive&&(u.modelPrimitive.show=!1);continue}c(u)&&l.url===u.url||(c(u?.modelPrimitive)&&(i.removeAndDestroy(u.modelPrimitive),delete n[s.id]),u={modelPrimitive:void 0,url:l.url,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFailed:!1,modelUpdated:!1,awaitingSampleTerrain:!1,clampedBoundingSphere:void 0,sampleTerrainFailed:!1},n[s.id]=u,KQe(this,s,l,te.getValueOrDefault(a._incrementallyLoadTextures,e,!0)));const m=u.modelPrimitive;if(!c(m))continue;m.show=!0,m.scale=te.getValueOrDefault(a._scale,e,1),m.minimumPixelSize=te.getValueOrDefault(a._minimumPixelSize,e,0),m.maximumScale=te.getValueOrUndefined(a._maximumScale,e),m.modelMatrix=k.clone(h,m.modelMatrix),m.shadows=te.getValueOrDefault(a._shadows,e,zQe),m.heightReference=te.getValueOrDefault(a._heightReference,e,VQe),m.distanceDisplayCondition=te.getValueOrUndefined(a._distanceDisplayCondition,e),m.silhouetteColor=te.getValueOrDefault(a._silhouetteColor,e,HQe,Wte),m.silhouetteSize=te.getValueOrDefault(a._silhouetteSize,e,0),m.color=te.getValueOrDefault(a._color,e,jQe,Wte),m.colorBlendMode=te.getValueOrDefault(a._colorBlendMode,e,WQe),m.colorBlendAmount=te.getValueOrDefault(a._colorBlendAmount,e,.5),m.clippingPlanes=te.getValueOrUndefined(a._clippingPlanes,e),m.clampAnimations=te.getValueOrDefault(a._clampAnimations,e,!0),m.imageBasedLighting.imageBasedLightingFactor=te.getValueOrDefault(a._imageBasedLightingFactor,e,YQe);let _=te.getValueOrUndefined(a._lightColor,e);if(c(_)&&(X.pack(_,qte,0),_=f.unpack(qte,0,$Qe)),m.lightColor=_,m.customShader=te.getValueOrUndefined(a._customShader,e),n[s.id].modelUpdated=!0,m.ready){const p=te.getValueOrDefault(a._runAnimations,e,!0);u.animationsRunning!==p&&(p?m.activeAnimations.addAll({loop:S_.REPEAT}):m.activeAnimations.removeAll(),u.animationsRunning=p);const y=te.getValueOrUndefined(a._nodeTransformations,e,u.nodeTransformationsScratch);if(c(y)){const C=Object.keys(y);for(let w=0,v=C.length;w<v;++w){const D=C[w],P=y[D];if(!c(P))continue;const N=m.getNode(D);if(!c(N))continue;const R=k.fromTranslationRotationScale(P,ZQe);N.matrix=k.multiply(N.originalMatrix,R,R)}}let A=!1;const x=te.getValueOrUndefined(a._articulations,e,u.articulationsScratch);if(c(x)){const C=Object.keys(x);for(let w=0,v=C.length;w<v;++w){const D=C[w],P=x[D];c(P)&&(A=!0,m.setArticulationStage(D,P))}}A&&m.applyArticulations()}}return!0},bf.prototype.isDestroyed=function(){return!1},bf.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(bf.prototype._onCollectionChanged,this);const e=this._entitiesToVisualize.values,t=this._modelHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)sk(0,e[i],t,n);return Ye(this)},bf._sampleTerrainMostDetailed=ok;const rA=new f,Yte=new Se;function sk(e,t,n,i){const o=n[t.id];c(o)&&(i.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function QQe(e,t){const n=t[e.id];c(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}bf.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new E("entity is required.");if(!c(t))throw new E("result is required.");const n=this._modelHash[e.id];if(!c(n)||n.loadFailed)return $t.FAILED;const i=n.modelPrimitive;if(!(c(i)&&i.show&&i.ready&&n.modelUpdated))return $t.PENDING;const r=this._scene.globe,s=c(r)?r.terrainProvider:void 0,a=i.heightReference!==Qt.NONE;if(c(r)&&a){const l=r.ellipsoid,u=i.modelMatrix;rA.x=u[12],rA.y=u[13],rA.z=u[14];const d=l.cartesianToCartographic(rA);if(!c(s.availability)){i.heightReference===Qt.CLAMP_TO_GROUND&&(d.height=0);const _=l.cartographicToCartesian(d);return be.clone(i.boundingSphere,t),t.center=_,$t.DONE}let h=this._modelHash[e.id].clampedBoundingSphere;return this._modelHash[e.id].sampleTerrainFailed?(this._modelHash[e.id].sampleTerrainFailed=!1,$t.FAILED):c(h)?(be.clone(h,t),this._modelHash[e.id].clampedBoundingSphere=void 0,$t.DONE):(h=new be,this._modelHash[e.id].awaitingSampleTerrain||(Se.clone(d,Yte),this._modelHash[e.id].awaitingSampleTerrain=!0,bf._sampleTerrainMostDetailed(s,[Yte]).then(p=>{if(this.isDestroyed())return;this._modelHash[e.id].awaitingSampleTerrain=!1;const y=p[0];i.heightReference===Qt.RELATIVE_TO_GROUND&&(y.height+=d.height),l.cartographicToCartesian(y,rA),be.clone(i.boundingSphere,h),h.center=rA,this._modelHash[e.id].clampedBoundingSphere=be.clone(h)}).catch(p=>{this.isDestroyed()||(this._modelHash[e.id].sampleTerrainFailed=!0,this._modelHash[e.id].awaitingSampleTerrain=!1)})),$t.PENDING)}return be.clone(i.boundingSphere,t),$t.DONE},bf.prototype._onCollectionChanged=function(e,t,n,i){let o,r;const s=this._entitiesToVisualize,a=this._modelHash,l=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],c(r._model)&&c(r._position)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],c(r._model)&&c(r._position)?(QQe(r,a),s.set(r.id,r)):(sk(0,r,a,l),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],sk(0,r,a,l),s.remove(r.id)};const JQe=bf,eJe=new k;function Mm(e,t){if(!c(e))throw new E("scene is required.");if(!c(t))throw new E("entityCollection is required.");t.collectionChanged.addEventListener(Mm.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new _n,this._onCollectionChanged(t,t.values,[],[])}function ak(e,t,n,i){const o=n[t.id];c(o)&&(c(o.tilesetPrimitive)&&i.removeAndDestroy(o.tilesetPrimitive),delete n[t.id])}function tJe(e,t,n,i){return ck.apply(this,arguments)}function ck(){return ck=(0,Pe.Z)(function*(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{const o=yield tg.fromUrl(e);if(o.id=n,i.add(o),!c(t[n.id]))return;t[n.id].tilesetPrimitive=o}catch(o){console.error(o),t[n.id].loadFail=!0}}),ck.apply(this,arguments)}Mm.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._entitiesToVisualize.values,n=this._tilesetHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){const s=t[o],a=s._tileset;let l;const u=n[s.id],d=s.isShowing&&s.isAvailable(e)&&te.getValueOrDefault(a._show,e,!0);let h;d&&(h=s.computeModelMatrix(e,eJe),l=jt.createIfNeeded(te.getValueOrUndefined(a._uri,e)));const m=c(u)?u.tilesetPrimitive:void 0;d?((!c(u)||l.url!==u.url)&&(c(m)&&i.removeAndDestroy(m),delete n[s.id],tJe(l,n,s,i)),c(m)&&(m.show=!0,c(h)&&(m.modelMatrix=h),m.maximumScreenSpaceError=te.getValueOrDefault(a.maximumScreenSpaceError,e,m.maximumScreenSpaceError))):c(m)&&(m.show=!1)}return!0},Mm.prototype.isDestroyed=function(){return!1},Mm.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Mm.prototype._onCollectionChanged,this);const e=this._entitiesToVisualize.values,t=this._tilesetHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)ak(0,e[i],t,n);return Ye(this)},Mm.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new E("entity is required.");if(!c(t))throw new E("result is required.");const n=this._tilesetHash[e.id];if(!c(n)||n.loadFail)return $t.FAILED;const i=n.tilesetPrimitive;return c(i)?i.show?(be.clone(i.boundingSphere,t),$t.DONE):$t.FAILED:$t.PENDING},Mm.prototype._onCollectionChanged=function(e,t,n,i){let o,r;const s=this._entitiesToVisualize,a=this._tilesetHash,l=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],c(r._tileset)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],c(r._tileset)?s.set(r.id,r):(ak(0,r,a,l),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],ak(0,r,a,l),s.remove(r.id)};const nJe=Mm;function Fm(e){this._definitionChanged=new Ue,this._intervals=new kc,this._intervals.changedEvent.addEventListener(Fm.prototype._intervalsChanged,this),this._referenceFrame=g(e,Zs.FIXED)}Object.defineProperties(Fm.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),Fm.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Zs.FIXED,t)},Fm.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new E("time is required.");if(!c(t))throw new E("referenceFrame is required.");const i=this._intervals.findDataForIntervalContainingDate(e);if(c(i))return uM.convertToReferenceFrame(e,i,this._referenceFrame,t,n)},Fm.prototype.equals=function(e){return this===e||e instanceof Fm&&this._intervals.equals(e._intervals,te.equals)&&this._referenceFrame===e._referenceFrame},Fm.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};const iJe=Fm,Xte=new ci,lk=new ci,uk=new ci;function Zte(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function $te(e,t,n,i,o,r,s,a){for(;e instanceof iX;)e=e.resolvedProperty;return s=e instanceof mF?function sJe(e,t,n,i,o,r,s,a,l){let d,u=a;d=e.getValueInReferenceFrame(t,r,l[u]),c(d)&&(l[u++]=d);let h=!c(o)||se.lessThanOrEquals(o,t)||se.greaterThanOrEquals(o,n),m=0;const _=i.length;let p=i[m];const y=n;let x,C,w,A=!1;for(;m<_;){if(!h&&se.greaterThanOrEquals(p,o)&&(d=e.getValueInReferenceFrame(o,r,l[u]),c(d)&&(l[u++]=d),h=!0),se.greaterThan(p,t)&&se.lessThan(p,y)&&!p.equals(o)&&(d=e.getValueInReferenceFrame(p,r,l[u]),c(d)&&(l[u++]=d)),m<_-1){if(s>0&&!A){const D=se.secondsDifference(i[m+1],p);A=D>s,A&&(x=Math.ceil(D/s),C=0,w=D/Math.max(x,2),x=Math.max(x-1,1))}if(A&&C<x){p=se.addSeconds(p,w,new se),C++;continue}}A=!1,m++,p=i[m]}return d=e.getValueInReferenceFrame(n,r,l[u]),c(d)&&(l[u++]=d),u}(e,t,n,e._property._times,i,o,r,s,a):e instanceof QY?function uJe(e,t,n,i,o,r,s,a){lk.start=t,lk.stop=n;let l=s;const u=e.intervals;for(let d=0;d<u.length;d++){const h=u.get(d);if(!ci.intersect(h,lk,Xte).isEmpty){const m=h.start,_=h.stop;let p=t;se.greaterThan(m,p)&&(p=m);let y=n;se.lessThan(_,y)&&(y=_),l=$te(h.data,p,y,i,o,r,l,a)}}return l}(e,t,n,i,o,r,s,a):e instanceof iJe?function cJe(e,t,n,i,o,r,s,a){uk.start=t,uk.stop=n;let l=s;const u=e.intervals;for(let d=0;d<u.length;d++){const h=u.get(d);if(!ci.intersect(h,uk,Xte).isEmpty){let m=h.start;h.isStartIncluded||(m=h.isStopIncluded?h.stop:se.addSeconds(h.start,se.secondsDifference(h.stop,h.start)/2,new se));const _=e.getValueInReferenceFrame(m,o,a[l]);c(_)&&(a[l]=_,l++)}}return l}(e,t,n,0,o,0,s,a):e instanceof Ov||e instanceof _F&&te.isConstant(e)?function lJe(e,t,n,i,o,r,s,a){const l=e.getValueInReferenceFrame(t,o,a[s]);return c(l)&&(a[s++]=l),s}(e,t,0,0,o,0,s,a):function aJe(e,t,n,i,o,r,s,a){let l,u=0,d=s,h=t;const m=Math.max(r,60);let _=!c(i)||se.lessThanOrEquals(i,t)||se.greaterThanOrEquals(i,n);for(;se.lessThan(h,n);)!_&&se.greaterThanOrEquals(h,i)&&(_=!0,l=e.getValueInReferenceFrame(i,o,a[d]),c(l)&&(a[d]=l,d++)),l=e.getValueInReferenceFrame(h,o,a[d]),c(l)&&(a[d]=l,d++),u++,h=se.addSeconds(t,m*u,new se);return l=e.getValueInReferenceFrame(n,o,a[d]),c(l)&&(a[d]=l,d++),d}(e,t,n,i,o,r,s,a),s}function Kte(e,t,n,i,o,r,s){c(s)||(s=[]);const a=$te(e,t,n,i,o,r,0,s);return s.length=a,s}const Qte=new ne;function eE(e,t){this._unusedIndexes=[],this._polylineCollection=new GS,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}function Bm(e,t){if(!c(e))throw new E("scene is required.");if(!c(t))throw new E("entityCollection is required.");t.collectionChanged.addEventListener(Bm.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new _n,this._onCollectionChanged(t,t.values,[],[])}eE.prototype.update=function(e){if(this._referenceFrame===Zs.INERTIAL){let t=Rn.computeIcrfToFixedMatrix(e,Qte);c(t)||(t=Rn.computeTemeToPseudoFixedMatrix(e,Qte)),k.fromRotationTranslation(t,f.ZERO,this._polylineCollection.modelMatrix)}},eE.prototype.updateObject=function(e,t){const n=t.entity,i=n._path,o=n._position;let r,s;const a=i._show;let l=t.polyline,u=n.isShowing&&n.isAvailable(e)&&(!c(a)||a.getValue(e));if(u){const h=te.getValueOrUndefined(i._leadTime,e),m=te.getValueOrUndefined(i._trailTime,e),_=n._availability,p=c(_),y=c(h),A=c(m);if(u=p||y&&A,u){if(A&&(r=se.addSeconds(e,-m,new se)),y&&(s=se.addSeconds(e,h,new se)),p){const x=_.start,C=_.stop;(!A||se.greaterThan(x,r))&&(r=x),(!y||se.lessThan(C,s))&&(s=C)}u=se.lessThan(r,s)}}if(!u)return void(c(l)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,l.show=!1,t.index=void 0));if(!c(l)){const h=this._unusedIndexes;if(h.length>0){const _=h.pop();l=this._polylineCollection.get(_),t.index=_}else t.index=this._polylineCollection.length,l=this._polylineCollection.add();l.id=n,t.polyline=l}const d=te.getValueOrDefault(i._resolution,e,60);l.show=!0,l.positions=Kte(o,r,s,e,this._referenceFrame,d,l.positions.slice()),l.material=oc.getValue(e,i._material,l.material),l.width=te.getValueOrDefault(i._width,e,1),l.distanceDisplayCondition=te.getValueOrUndefined(i._distanceDisplayCondition,e,l.distanceDisplayCondition)},eE.prototype.removeObject=function(e){const t=e.polyline;c(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},eE.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),Ye(this)},Bm.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._updaters;for(const i in t)t.hasOwnProperty(i)&&t[i].update(e);const n=this._items.values;if(0===n.length&&c(this._updaters)&&Object.keys(this._updaters).length>0){for(const i in t)t.hasOwnProperty(i)&&t[i].destroy();this._updaters={}}for(let i=0,o=n.length;i<o;i++){const r=n[i],l=r.updater;let u=Zs.FIXED;this._scene.mode===ce.SCENE3D&&(u=r.entity._position.referenceFrame);let d=this._updaters[u];l===d&&c(d)?d.updateObject(e,r):(c(l)&&l.removeObject(r),c(d)||(d=new eE(this._scene,u),d.update(e),this._updaters[u]=d),r.updater=d,c(d)&&d.updateObject(e,r))}return!0},Bm.prototype.isDestroyed=function(){return!1},Bm.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Bm.prototype._onCollectionChanged,this);const e=this._updaters;for(const t in e)e.hasOwnProperty(t)&&e[t].destroy();return Ye(this)},Bm.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s;const a=this._items;for(o=t.length-1;o>-1;o--)r=t[o],c(r._path)&&c(r._position)&&a.set(r.id,new Zte(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._path)&&c(r._position)?a.contains(r.id)||a.set(r.id,new Zte(r)):(s=a.get(r.id),c(s)&&(c(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),c(s)&&(c(s.updater)&&s.updater.removeObject(s),a.remove(r.id))},Bm._subSample=Kte;const dJe=Bm,Jte=X.WHITE,ene=X.BLACK,one=new X,fJe=new f,rne=new X,sne=new Mn,ane=new Mn,cne=new Jn;function lne(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 km(e,t){if(!c(e))throw new E("entityCluster is required.");if(!c(t))throw new E("entityCollection is required.");t.collectionChanged.addEventListener(km.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new _n,this._onCollectionChanged(t,t.values,[],[])}function tE(e,t,n){if(c(e)){if(c(e.pointPrimitive))return e.pointPrimitive=void 0,void n.removePoint(t);c(e.billboard)&&(e.billboard=void 0,n.removeBillboard(t))}}km.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){const r=t[i],s=r.entity,a=s._point;let l=r.pointPrimitive,u=r.billboard;const d=te.getValueOrDefault(a._heightReference,e,Qt.NONE);let m,h=s.isShowing&&s.isAvailable(e)&&te.getValueOrDefault(a._show,e,!0);if(h&&(m=te.getValueOrUndefined(s._position,e,fJe),h=c(m)),!h){tE(r,s,n);continue}te.isConstant(s._position)||(n._clusterDirty=!0);let _=!1,p=!1;if(d===Qt.NONE||c(u)?d===Qt.NONE&&!c(l)&&(c(u)&&(tE(r,s,n),u=void 0),l=n.getPoint(s),l.id=s,r.pointPrimitive=l):(c(l)&&(tE(r,s,n),l=void 0),u=n.getBillboard(s),u.id=s,u.image=void 0,r.billboard=u,_=!0,p=f.equals(u.position,m)&&u.heightReference===d),c(l))l.show=!0,l.position=m,l.scaleByDistance=te.getValueOrUndefined(a._scaleByDistance,e,sne),l.translucencyByDistance=te.getValueOrUndefined(a._translucencyByDistance,e,ane),l.color=te.getValueOrDefault(a._color,e,Jte,one),l.outlineColor=te.getValueOrDefault(a._outlineColor,e,ene,rne),l.outlineWidth=te.getValueOrDefault(a._outlineWidth,e,0),l.pixelSize=te.getValueOrDefault(a._pixelSize,e,1),l.distanceDisplayCondition=te.getValueOrUndefined(a._distanceDisplayCondition,e,cne),l.disableDepthTestDistance=te.getValueOrDefault(a._disableDepthTestDistance,e,0);else if(c(u)){u.show=!0,u.position=m,u.scaleByDistance=te.getValueOrUndefined(a._scaleByDistance,e,sne),u.translucencyByDistance=te.getValueOrUndefined(a._translucencyByDistance,e,ane),u.distanceDisplayCondition=te.getValueOrUndefined(a._distanceDisplayCondition,e,cne),u.disableDepthTestDistance=te.getValueOrDefault(a._disableDepthTestDistance,e,0),u.heightReference=d;const y=te.getValueOrDefault(a._color,e,Jte,one),A=te.getValueOrDefault(a._outlineColor,e,ene,rne),x=Math.round(te.getValueOrDefault(a._outlineWidth,e,0));let C=Math.max(1,Math.round(te.getValueOrDefault(a._pixelSize,e,1)));if(x>0?(u.scale=1,_=_||x!==r.outlineWidth||C!==r.pixelSize||!X.equals(y,r.color)||!X.equals(A,r.outlineColor)):(u.scale=C/50,C=50,_=_||x!==r.outlineWidth||!X.equals(y,r.color)||!X.equals(A,r.outlineColor)),_){r.color=X.clone(y,r.color),r.outlineColor=X.clone(A,r.outlineColor),r.pixelSize=C,r.outlineWidth=x;const w=y.alpha,v=y.toCssColorString(),D=A.toCssColorString(),P=JSON.stringify([v,C,D,x]);u.setImage(P,FG(w,v,D,x,C))}p&&u._updateClamping()}}return!0},km.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new E("entity is required.");if(!c(t))throw new E("result is required.");const n=this._items.get(e.id);if(!c(n)||!c(n.pointPrimitive)&&!c(n.billboard))return $t.FAILED;if(c(n.pointPrimitive))t.center=f.clone(n.pointPrimitive.position,t.center);else{const i=n.billboard;if(!c(i._clampedPosition))return $t.PENDING;t.center=f.clone(i._clampedPosition,t.center)}return t.radius=0,$t.DONE},km.prototype.isDestroyed=function(){return!1},km.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(km.prototype._onCollectionChanged,this);const e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return Ye(this)},km.prototype._onCollectionChanged=function(e,t,n,i){let o,r;const s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],c(r._point)&&c(r._position)&&s.set(r.id,new lne(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._point)&&c(r._position)?s.contains(r.id)||s.set(r.id,new lne(r)):(tE(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],tE(s.get(r.id),r,a),s.remove(r.id)};const hJe=km,une=[];function pJe(e,t,n,i,o){const r=une;let s;r.length=o;const a=n.red,l=n.green,u=n.blue,d=n.alpha,h=i.red,m=i.green,_=i.blue,p=i.alpha;if(X.equals(n,i)){for(s=0;s<o;s++)r[s]=X.clone(n);return r}const y=(h-a)/o,A=(m-l)/o,x=(_-u)/o,C=(p-d)/o;for(s=0;s<o;s++)r[s]=new X(a+s*y,l+s*A,u+s*x,d+s*C);return r}function nE(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions,n=e.colors,i=g(e.width,1),o=g(e.colorsPerVertex,!1);if(!c(t)||t.length<2)throw new E("At least two positions are required.");if("number"!=typeof i)throw new E("width must be a number");if(c(n)&&(o&&n.length<t.length||!o&&n.length<t.length-1))throw new E("colors has an invalid length.");this._positions=t,this._colors=n,this._width=i,this._colorsPerVertex=o,this._vertexFormat=et.clone(g(e.vertexFormat,et.DEFAULT)),this._arcType=g(e.arcType,Xn.GEODESIC),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._ellipsoid=ge.clone(g(e.ellipsoid,ge.WGS84)),this._workerName="createPolylineGeometry";let r=1+t.length*f.packedLength;r+=c(n)?1+n.length*X.packedLength:1,this.packedLength=r+ge.packedLength+et.packedLength+4}nE.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");let i;n=g(n,0);const o=e._positions;let r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=f.packedLength)f.pack(o[i],t,n);const s=e._colors;for(r=c(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=X.packedLength)X.pack(s[i],t,n);return ge.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=ge.packedLength),n+=et.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};const dne=ge.clone(ge.UNIT_SPHERE),fne=new et,iy={positions:void 0,colors:void 0,ellipsoid:dne,vertexFormat:fne,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};nE.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);let i,o=e[t++];const r=new Array(o);for(i=0;i<o;++i,t+=f.packedLength)r[i]=f.unpack(e,t);o=e[t++];const s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=X.packedLength)s[i]=X.unpack(e,t);const a=ge.unpack(e,t,dne),l=et.unpack(e,t+=ge.packedLength,fne);t+=et.packedLength;const u=e[t++],d=1===e[t++],h=e[t++],m=e[t];return c(n)?(n._positions=r,n._colors=s,n._ellipsoid=ge.clone(a,n._ellipsoid),n._vertexFormat=et.clone(l,n._vertexFormat),n._width=u,n._colorsPerVertex=d,n._arcType=h,n._granularity=m,n):(iy.positions=r,iy.colors=s,iy.width=u,iy.colorsPerVertex=d,iy.arcType=h,iy.granularity=m,new nE(iy))};const hne=new f,pne=new f,mne=new f,_ne=new f;nE.createGeometry=function(e){const t=e._width,n=e._vertexFormat;let i=e._colors;const o=e._colorsPerVertex,r=e._arcType,s=e._granularity,a=e._ellipsoid;let l,u,d;const h=[];let m=wa(e._positions,f.equalsEpsilon,!1,h);if(c(i)&&h.length>0){let U=0,z=h[0];i=i.filter(function(j,W){let q=!1;return q=o?W===z||0===W&&1===z:W+1===z,!q||(U++,z=h[U],!1)})}let _=m.length;if(_<2||t<=0)return;if(r===Xn.GEODESIC||r===Xn.RHUMB){let U,z;r===Xn.GEODESIC?(U=O.chordLength(s,a.maximumRadius),z=Hr.numberOfPoints):(U=s,z=Hr.numberOfPointsRhumbLine);const j=Hr.extractHeights(m,a);if(c(i)){let W=1;for(l=0;l<_-1;++l)W+=z(m[l],m[l+1],U);const q=new Array(W);let V=0;for(l=0;l<_-1;++l){const ie=i[l],Y=z(m[l],m[l+1],U);if(o&&l<W){const K=pJe(0,0,ie,i[l+1],Y),me=K.length;for(u=0;u<me;++u)q[V++]=K[u]}else for(u=0;u<Y;++u)q[V++]=X.clone(ie)}q[V]=X.clone(i[i.length-1]),i=q,une.length=0}m=r===Xn.GEODESIC?Hr.generateCartesianArc({positions:m,minDistance:U,ellipsoid:a,height:j}):Hr.generateCartesianRhumbArc({positions:m,granularity:U,ellipsoid:a,height:j})}_=m.length;const p=4*_-4,y=new Float64Array(3*p),A=new Float64Array(3*p),x=new Float64Array(3*p),C=new Float32Array(2*p),w=n.st?new Float32Array(2*p):void 0,v=c(i)?new Uint8Array(4*p):void 0;let B,D=0,P=0,N=0,R=0;for(u=0;u<_;++u){let U,z;0===u?(B=hne,f.subtract(m[0],m[1],B),f.add(m[0],B,B)):B=m[u-1],f.clone(B,mne),f.clone(m[u],pne),u===_-1?(B=hne,f.subtract(m[_-1],m[_-2],B),f.add(m[_-1],B,B)):B=m[u+1],f.clone(B,_ne),c(v)&&(U=0===u||o?i[u]:i[u-1],u!==_-1&&(z=i[u]));const W=u===_-1?2:4;for(d=0===u?2:0;d<W;++d){f.pack(pne,y,D),f.pack(mne,A,D),f.pack(_ne,x,D),D+=3;const q=d-2<0?-1:1;if(C[P++]=d%2*2-1,C[P++]=q*t,n.st&&(w[N++]=u/(_-1),w[N++]=Math.max(C[P-2],0)),c(v)){const V=d<2?U:z;v[R++]=X.floatToByte(V.red),v[R++]=X.floatToByte(V.green),v[R++]=X.floatToByte(V.blue),v[R++]=X.floatToByte(V.alpha)}}}const F=new lo;F.position=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:y}),F.prevPosition=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:A}),F.nextPosition=new Ze({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:x}),F.expandAndWidth=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:C}),n.st&&(F.st=new Ze({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:w})),c(v)&&(F.color=new Ze({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:4,values:v,normalize:!0}));const S=Ot.createTypedArray(p,6*_-6);let I=0,L=0;const M=_-1;for(u=0;u<M;++u)S[L++]=I,S[L++]=I+2,S[L++]=I+1,S[L++]=I+1,S[L++]=I+2,S[L++]=I+3,I+=4;return new Cn({attributes:F,indices:S,primitiveType:At.TRIANGLES,boundingSphere:be.fromPoints(m),geometryType:ky.POLYLINES})};const mJe=nE,_Je=new xo(0),QI={},gne=new X,gJe=new Fn(X.WHITE),yJe=new xo(!0),bJe=new xo($o.DISABLED),AJe=new xo(new Jn),TJe=new xo(Yo.BOTH);function xJe(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function CJe(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function hd(e,t){if(!c(e))throw new E("entity is required");if(!c(t))throw new E("scene is required");this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(hd.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new Ue,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new xJe,this._groundGeometryOptions=new CJe,this._id=`polyline-${e.id}`,this._clampToGround=!1,this._supportsPolylinesOnTerrain=wc.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(hd.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!c(this._entity.availability)&&te.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}}),hd.prototype.isOutlineVisible=function(e){return!1},hd.prototype.isFilled=function(e){const n=this._fillEnabled&&this._entity.isAvailable(e)&&this._showProperty.getValue(e);return g(n,!1)},hd.prototype.createFillGeometryInstance=function(e){if(!c(e))throw new E("time is required.");if(!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i=new Oi(n&&t.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),s={show:i,distanceDisplayCondition:mo.fromDistanceDisplayCondition(o)};let a;return this._materialProperty instanceof Fn&&(c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,gne)),c(a)||(a=X.WHITE),s.color=ti.fromColor(a)),this.clampToGround?new Un({id:t,geometry:new iq(this._groundGeometryOptions),attributes:s}):(c(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof Fn&&(c(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(a=this._depthFailMaterialProperty.color.getValue(e,gne)),c(a)||(a=X.WHITE),s.depthFailColor=ti.fromColor(a)),new Un({id:t,geometry:new mJe(this._geometryOptions),attributes:s}))},hd.prototype.createOutlineGeometryInstance=function(e){throw new E("This instance does not represent an outlined geometry.")},hd.prototype.isDestroyed=function(){return!1},hd.prototype.destroy=function(){this._entitySubscription(),Ye(this)},hd.prototype._onEntityPropertyChanged=function(e,t,n,i){if("availability"!==t&&"polyline"!==t)return;const o=this._entity.polyline;if(!c(o))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));const r=o.positions,s=o.show;if(c(s)&&s.isConstant&&!s.getValue(St.MINIMUM_VALUE)||!c(r))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));const a=o.zIndex,l=g(o.material,gJe),u=l instanceof Fn;this._materialProperty=l,this._depthFailMaterialProperty=o.depthFailMaterial,this._showProperty=g(s,yJe),this._shadowsProperty=g(o.shadows,bJe),this._distanceDisplayConditionProperty=g(o.distanceDisplayCondition,AJe),this._classificationTypeProperty=g(o.classificationType,TJe),this._fillEnabled=!0,this._zIndex=g(a,_Je);const d=o.width,h=o.arcType,m=o.clampToGround,_=o.granularity;if(r.isConstant&&te.isConstant(d)&&te.isConstant(h)&&te.isConstant(_)&&te.isConstant(m)&&te.isConstant(a)){const p=this._geometryOptions,y=r.getValue(St.MINIMUM_VALUE,p.positions);if(!c(y)||y.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));let A;A=u&&(!c(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof Fn)?$d.VERTEX_FORMAT:Wu.VERTEX_FORMAT,p.vertexFormat=A,p.positions=y,p.width=c(d)?d.getValue(St.MINIMUM_VALUE):void 0,p.arcType=c(h)?h.getValue(St.MINIMUM_VALUE):void 0,p.granularity=c(_)?_.getValue(St.MINIMUM_VALUE):void 0;const x=this._groundGeometryOptions;x.positions=y,x.width=p.width,x.arcType=p.arcType,x.granularity=p.granularity,this._clampToGround=!!c(m)&&m.getValue(St.MINIMUM_VALUE),!this._clampToGround&&c(a)&&gn("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))},hd.prototype.createDynamicUpdater=function(e,t){if(T.defined("primitives",e),T.defined("groundPrimitives",t),!this._dynamic)throw new E("This instance does not represent dynamic geometry.");return new iE(e,t,this)};const sA={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function iE(e,t,n){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=n,this._positions=[]}function yne(e){if(c(e._line))return e._line;const t=e._geometryUpdater._scene.id;let n=QI[t];const i=e._primitives;!c(n)||n.isDestroyed()?(n=new GS,QI[t]=n,i.add(n)):i.contains(n)||i.add(n);const o=n.add();return o.id=e._geometryUpdater._entity,e._line=o,o}iE.prototype.update=function(e){const t=this._geometryUpdater,n=t._entity,i=n.polyline;let r=te.getValueOrUndefined(i.positions,e,this._positions);t._clampToGround=te.getValueOrDefault(i._clampToGround,e,!1),t._groundGeometryOptions.positions=r,t._groundGeometryOptions.width=te.getValueOrDefault(i._width,e,1),t._groundGeometryOptions.arcType=te.getValueOrDefault(i._arcType,e,Xn.GEODESIC),t._groundGeometryOptions.granularity=te.getValueOrDefault(i._granularity,e,9999);const s=this._groundPrimitives;if(c(this._groundPolylinePrimitive)&&(s.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!n.isShowing||!n.isAvailable(e)||!te.getValueOrDefault(i._show,e,!0)||!c(r)||r.length<2)return;const d=t.fillMaterialProperty;let h;if(d instanceof Fn)h=new $d;else{const m=oc.getValue(e,d,this._material);h=new Wu({material:m,translucent:m.isTranslucent()}),this._material=m}return this._groundPolylinePrimitive=s.add(new Uv({geometryInstances:t.createFillGeometryInstance(e),appearance:h,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),te.getValueOrUndefined(t.zIndex,e)),void(c(this._line)&&(this._line.show=!1))}const a=yne(this);if(!n.isShowing||!n.isAvailable(e)||!te.getValueOrDefault(i._show,e,!0))return void(a.show=!1);if(!c(r)||r.length<2)return void(a.show=!1);let l=Xn.GEODESIC;l=te.getValueOrDefault(i._arcType,e,l);const u=t._scene.globe;l!==Xn.NONE&&c(u)&&(sA.ellipsoid=u.ellipsoid,sA.positions=r,sA.granularity=te.getValueOrUndefined(i._granularity,e),sA.height=Hr.extractHeights(r,u.ellipsoid),r=l===Xn.GEODESIC?Hr.generateCartesianArc(sA):Hr.generateCartesianRhumbArc(sA)),a.show=!0,a.positions=r.slice(),a.material=oc.getValue(e,t.fillMaterialProperty,a.material),a.width=te.getValueOrDefault(i._width,e,1),a.distanceDisplayCondition=te.getValueOrUndefined(i._distanceDisplayCondition,e,a.distanceDisplayCondition)},iE.prototype.getBoundingSphere=function(e){if(T.defined("result",e),this._geometryUpdater.clampToGround){const t=this._groundPolylinePrimitive;if(c(t)&&t.show&&t.ready){const n=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(c(n)&&c(n.boundingSphere))return be.clone(n.boundingSphere,e),$t.DONE}return c(t)&&!t.ready?$t.PENDING:$t.DONE}{const t=yne(this);if(t.show&&t.positions.length>0)return be.fromPoints(t.positions,e),$t.DONE}return $t.FAILED},iE.prototype.isDestroyed=function(){return!1},iE.prototype.destroy=function(){const t=this._geometryUpdater._scene.id,n=QI[t];c(n)&&(n.remove(this._line),0===n.length&&(this._primitives.removeAndDestroy(n),delete QI[t])),c(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),Ye(this)};const EJe=hd,wJe=new X,SJe=new Jn,vJe=new Jn;function pd(e,t,n,i,o){let r;r=n instanceof Fn?$d:Wu,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=r,this.materialProperty=n,this.updaters=new _n,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new _n,this.material=void 0,this.updatersWithAttributes=new _n,this.attributes=new _n,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(pd.prototype.onMaterialChanged,this),this.subscriptions=new _n,this.showsUpdated=new _n,this.zIndex=i,this._asynchronous=o}function aA(e,t,n){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=g(n,!0)}pd.prototype.onMaterialChanged=function(){this.invalidated=!0},pd.prototype.isMaterial=function(e){const t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Fn&&t instanceof Fn||c(t)&&t.equals(n)},pd.prototype.add=function(e,t,n){const i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&te.isConstant(t.distanceDisplayConditionProperty)){const o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,l){"isShowing"===s&&o.showsUpdated.set(t.id,t)}))}else this.updatersWithAttributes.set(i,t);this.createPrimitive=!0},pd.prototype.remove=function(e){const t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);const n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t)),!0}return!1},pd.prototype.update=function(e){let t=!0,n=this.primitive;const i=this.orderedGroundPrimitives,o=this.geometry.values;let r;if(this.createPrimitive){if(o.length>0)c(n)&&(c(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),n=new Uv({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===Wu&&(this.material=oc.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),i.add(n,this.zIndex),t=!1;else{c(n)&&(i.remove(n),n=void 0);const a=this.oldPrimitive;c(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(c(n)&&n.ready){n.show=!0,c(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===Wu&&(this.material=oc.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);const s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){const l=s[r],u=l.entity,d=this.geometry.get(l.id);let h=this.attributes.get(d.id.id);if(c(h)||(h=n.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),!l.fillMaterialProperty.isConstant){const A=te.getValueOrDefault(l.fillMaterialProperty.color,e,X.WHITE,wJe);X.equals(h._lastColor,A)||(h._lastColor=X.clone(A,h._lastColor),h.color=ti.toValue(A,h.color))}const m=u.isShowing&&(l.hasConstantFill||l.isFilled(e));m!==(1===h.show[0])&&(h.show=Oi.toValue(m,h.show));const p=l.distanceDisplayConditionProperty;if(!te.isConstant(p)){const y=te.getValueOrDefault(p,e,vJe,SJe);Jn.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Jn.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=mo.toValue(y,h.distanceDisplayCondition))}}this.updateShows(n)}else c(n)&&!n.ready&&(t=!1);return t},pd.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=o.entity,s=this.geometry.get(o.id);let a=this.attributes.get(s.id.id);c(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));const l=r.isShowing;l!==(1===a.show[0])&&(a.show=Oi.toValue(l,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},pd.prototype.contains=function(e){return this.updaters.contains(e.id)},pd.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return $t.PENDING;const i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&0===i.show[0]?$t.FAILED:(i.boundingSphere.clone(t),$t.DONE)},pd.prototype.destroy=function(){const e=this.primitive,t=this.orderedGroundPrimitives;c(e)&&t.remove(e);const n=this.oldPrimitive;c(n)&&t.remove(n),this.removeMaterialSubscription()},aA.prototype.add=function(e,t){const n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=te.getValueOrDefault(t.zIndex,0);for(let a=0;a<i;++a){const l=n[a];if(l.isMaterial(t)&&l.zIndex===r)return void l.add(e,t,o)}const s=new pd(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,r,this._asynchronous);s.add(e,t,o),n.push(s)},aA.prototype.remove=function(e){const t=this._items;for(let i=t.length-1;i>=0;i--){const o=t[i];if(o.remove(e)){0===o.updaters.length&&(t.splice(i,1),o.destroy());break}}},aA.prototype.update=function(e){let t;const n=this._items;for(t=n.length-1;t>=0;t--){const r=n[t];if(r.invalidated){n.splice(t,1);const s=r.updaters.values,a=s.length;for(let l=0;l<a;l++)this.add(e,s[l]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o},aA.prototype.getBoundingSphere=function(e,t){const n=this._items,i=n.length;for(let o=0;o<i;o++){const r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return $t.FAILED},aA.prototype.removeAllPrimitives=function(){const e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};const DJe=aA,IJe=[];function bne(e,t){const n=e._batches,i=n.length;for(let o=0;o<i;o++)n[o].remove(t)}function Ane(e,t,n){if(n.isDynamic)return void e._dynamicBatch.add(t,n);if(n.clampToGround&&n.fillEnabled){const s=n.classificationTypeProperty.getValue(t);return void e._groundBatches[s].add(t,n)}let i;n.fillEnabled&&(i=n.shadowsProperty.getValue(t));let r,o=0;c(n.depthFailMaterialProperty)&&(o=n.depthFailMaterialProperty instanceof Fn?1:2),c(i)&&(r=i+o*$o.NUMBER_OF_SHADOW_MODES),n.fillEnabled&&(n.fillMaterialProperty instanceof Fn?e._colorBatches[r].add(t,n):e._materialBatches[r].add(t,n))}function Af(e,t,n,i){let o;T.defined("scene",e),T.defined("entityCollection",t),i=g(i,e.groundPrimitives),n=g(n,e.primitives),this._scene=e,this._primitives=n,this._entityCollection=void 0,this._addedObjects=new _n,this._removedObjects=new _n,this._changedObjects=new _n;const r=$o.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(3*r),this._materialBatches=new Array(3*r),o=0;o<r;++o)this._colorBatches[o]=new Qg(n,$d,void 0,!1,o),this._materialBatches[o]=new Jg(n,Wu,void 0,!1,o),this._colorBatches[o+r]=new Qg(n,$d,$d,!1,o),this._materialBatches[o+r]=new Jg(n,Wu,$d,!1,o),this._colorBatches[o+2*r]=new Qg(n,$d,Wu,!1,o),this._materialBatches[o+2*r]=new Jg(n,Wu,Wu,!1,o);this._dynamicBatch=new fee(n,i);const s=Yo.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(s),o=0;o<s;++o)this._groundBatches[o]=new DJe(i,o);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new _n,this._updaters=new _n,this._entityCollection=t,t.collectionChanged.addEventListener(Af.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,IJe)}Af.prototype.update=function(e){T.defined("time",e);const t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.values;let a,l,u,d;for(a=s.length-1;a>-1;a--)l=s[a],u=l.id,d=this._updaters.get(u),d.entity===l?(bne(this,d),Ane(this,e,d)):(o.push(l),n.push(l));for(a=o.length-1;a>-1;a--)l=o[a],u=l.id,d=this._updaters.get(u),bne(this,d),d.destroy(),this._updaters.remove(u),this._subscriptions.get(u)(),this._subscriptions.remove(u);for(a=n.length-1;a>-1;a--)l=n[a],u=l.id,d=new EJe(l,this._scene),this._updaters.set(u,d),Ane(this,e,d),this._subscriptions.set(u,d.geometryChanged.addEventListener(Af._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let h=!0;const m=this._batches,_=m.length;for(a=0;a<_;a++)h=m[a].update(e)&&h;return h};const PJe=[],OJe=new be;Af.prototype.getBoundingSphere=function(e,t){T.defined("entity",e),T.defined("result",t);const n=PJe,i=OJe;let o=0,r=$t.DONE;const s=this._batches,a=s.length,l=this._updaters.get(e.id);for(let u=0;u<a;u++){if(r=s[u].getBoundingSphere(l,i),r===$t.PENDING)return $t.PENDING;r===$t.DONE&&(n[o]=be.clone(i,n[o]),o++)}return 0===o?$t.FAILED:(n.length=o,be.fromBoundingSpheres(n,t),$t.DONE)},Af.prototype.isDestroyed=function(){return!1},Af.prototype.destroy=function(){let e;this._entityCollection.collectionChanged.removeEventListener(Af.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();const t=this._batches;let n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();const i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();return this._subscriptions.removeAll(),Ye(this)},Af._onGeometryChanged=function(e){const n=this._changedObjects,i=e.entity,o=i.id;!c(this._removedObjects.get(o))&&!c(n.get(o))&&n.set(o,i)},Af.prototype._onCollectionChanged=function(e,t,n){const i=this._addedObjects,o=this._removedObjects,r=this._changedObjects;let s,a,l;for(s=n.length-1;s>-1;s--)l=n[s],a=l.id,i.remove(a)||(o.set(a,l),r.remove(a));for(s=t.length-1;s>-1;s--)l=t[s],a=l.id,o.remove(a)?r.set(a,l):i.set(a,l)};const LJe=Af;function lu(e){T.typeOf.object("options",e),T.typeOf.object("options.scene",e.scene),T.typeOf.object("options.dataSourceCollection",e.dataSourceCollection),$0.initializeTerrainHeights(),Uv.initializeTerrainHeights();const t=e.scene,n=e.dataSourceCollection;this._eventHelper=new Rh,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=g(e.visualizersCallback,lu.defaultVisualizersCallback);let i=!1;const o=new Og,r=new Og;n.length>0&&(t.primitives.add(o),t.groundPrimitives.add(r),i=!0),this._primitives=o,this._groundPrimitives=r;for(let u=0,d=n.length;u<d;u++)this._onDataSourceAdded(n,n.get(u));const s=new UYe;let a,l;if(this._onDataSourceAdded(void 0,s),this._defaultDataSource=s,!i){const u=this,d=function(){t.primitives.add(o),t.groundPrimitives.add(r),a(),l(),u._removeDefaultDataSourceListener=void 0,u._removeDataSourceCollectionListener=void 0};a=s.entities.collectionChanged.addEventListener(d),l=n.dataSourceAdded.addEventListener(d)}this._removeDefaultDataSourceListener=a,this._removeDataSourceCollectionListener=l,this._ready=!1}lu.defaultVisualizersCallback=function(e,t,n){const i=n.entities;return[new kYe(t,i),new iQe(e,i,n._primitives,n._groundPrimitives),new IQe(t,i),new JQe(e,i),new nJe(e,i),new hJe(t,i),new dJe(e,i),new LJe(e,i,n._primitives,n._groundPrimitives)]},Object.defineProperties(lu.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}}}),lu.prototype.isDestroyed=function(){return!1},lu.prototype.destroy=function(){this._eventHelper.removeAll();const e=this._dataSourceCollection;for(let t=0,n=e.length;t<n;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),c(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),Ye(this)},lu.prototype.update=function(e){if(T.defined("time",e),!wo.initialized)return this._ready=!1,!1;let n,i,o,r,t=!0;const s=this._dataSourceCollection,a=s.length;for(n=0;n<a;n++){const l=s.get(n);for(c(l.update)&&(t=l.update(e)&&t),o=l._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t}for(o=this._defaultDataSource._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t;return this._ready=t,t},lu.prototype._postRender=function(){const e=this._scene.frameState,t=this._dataSourceCollection,n=t.length;for(let i=0;i<n;i++){const o=t.get(i),r=o.credit;c(r)&&e.creditDisplay.addCreditToNextFrame(r);const s=o._resourceCredits;if(c(s)){const a=s.length;for(let l=0;l<a;l++)e.creditDisplay.addCreditToNextFrame(s[l])}}};const RJe=[],NJe=new be;lu.prototype.getBoundingSphere=function(e,t,n){if(T.defined("entity",e),T.typeOf.bool("allowPartial",t),T.defined("result",n),!this._ready)return $t.PENDING;let i,o,r=this._defaultDataSource;if(!r.entities.contains(e)){r=void 0;const m=this._dataSourceCollection;for(o=m.length,i=0;i<o;i++){const _=m.get(i);if(_.entities.contains(e)){r=_;break}}}if(!c(r))return $t.FAILED;const s=RJe,a=NJe;let l=0,u=$t.DONE;const d=r._visualizers,h=d.length;for(i=0;i<h;i++)if(c(d[i].getBoundingSphere)){if(u=d[i].getBoundingSphere(e,a),!t&&u===$t.PENDING)return $t.PENDING;u===$t.DONE&&(s[l]=be.clone(a,s[l]),l++)}return 0===l?$t.FAILED:(s.length=l,be.fromBoundingSpheres(s,n),$t.DONE)},lu.prototype._onDataSourceAdded=function(e,t){const n=this._scene,o=this._groundPrimitives,r=this._primitives.add(new Og),s=o.add(new yYe);t._primitives=r,t._groundPrimitives=s;const a=t.clustering;a._initialize(n),r.add(a),t._visualizers=this._visualizersCallback(n,a,t)},lu.prototype._onDataSourceRemoved=function(e,t){const n=this._primitives,i=this._groundPrimitives,o=t._primitives,r=t._groundPrimitives;o.remove(t.clustering);const a=t._visualizers,l=a.length;for(let u=0;u<l;u++)a[u].destroy();n.remove(o),i.remove(r),t._visualizers=void 0},lu.prototype._onDataSourceMoved=function(e,t,n){const i=this._primitives,o=this._groundPrimitives,r=e._primitives,s=e._groundPrimitives;t===n+1?(i.raise(r),o.raise(s)):t===n-1?(i.lower(r),o.lower(s)):0===t?(i.lowerToBottom(r),o.lowerToBottom(s),i.raise(r),o.raise(s)):(i.raiseToTop(r),o.raiseToTop(s))};const MJe=lu;function dk(e,t){return fk.apply(this,arguments)}function fk(){return fk=(0,Pe.Z)(function*(e,t){const n=t.terrainProvider,i=t.mapProjection,o=i.ellipsoid;let r;const s=t.camera.getRectangleCameraCoordinates(e);if(r=t.mode===ce.SCENE3D?o.cartesianToCartographic(s):i.unproject(s),!c(n))return r;if(!c(n.availability)||t.mode===ce.SCENE2D)return r;const l=[Ce.center(e),Ce.southeast(e),Ce.southwest(e),Ce.northeast(e),Ce.northwest(e)],u=yield dk._sampleTerrainMostDetailed(n,l);let d=!1;const h=u.reduce(function(_,p){return c(p.height)?(d=!0,Math.max(p.height,_)):_},-Number.MAX_VALUE),m=r;return d&&(m.height+=h),m}),fk.apply(this,arguments)}dk._sampleTerrainMostDetailed=ok;const Tne=dk,xne_modifyFragmentShader=function(t){return(t=Et.replaceMain(t,"czm_splitter_main"))+"uniform float czm_splitDirection; \nvoid main() \n{ \n#ifndef SHADOW_MAP\n if (czm_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard; \n if (czm_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard; \n#endif\n czm_splitter_main(); \n} \n"},xne_addUniforms=function(t,n){n.czm_splitDirection=function(){return t.splitDirection}},oy_NEEDS_DECODE=0,oy_DECODING=1,oy_READY=2,oy_FAILED=3;function oE(e){T.typeOf.object("options",e),T.typeOf.object("options.arrayBuffer",e.arrayBuffer),this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=X.clone(X.DARKGRAY),this._highlightColor=X.clone(X.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=oy_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=g(e.opaquePass,ze.OPAQUE),this._cull=g(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=k.clone(k.IDENTITY),this._modelMatrix=k.clone(k.IDENTITY),this.time=0,this.shadows=$o.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=g(e.splitDirection,I_.NONE),this._splittingEnabled=!1,this._error=void 0,function kJe(e,t){const n=K5.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&&c(n.batchTableBinary)&&(n.styleableProperties=pO.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),c(n.draco)){const a=n.draco;e._decodingState=oy_NEEDS_DECODE,a.dequantizeInShader=e._dequantizeInShader}const i=n.positions;c(i)&&(e._isQuantized=i.isQuantized,e._quantizedVolumeScale=i.quantizedVolumeScale,e._quantizedVolumeOffset=i.quantizedVolumeOffset,e._quantizedRange=i.quantizedRange);const o=n.normals;c(o)&&(e._isOctEncoded16P=o.octEncoded);const r=n.colors;c(r)&&(c(r.constantColor)&&(e._constantColor=X.clone(r.constantColor,e._constantColor),e._hasColors=!1),e._isRGB565=r.isRGB565);const s=n.batchIds;c(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}(this,e)}Object.defineProperties(oE.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},color:{get:function(){return X.clone(this._highlightColor)},set:function(e){this._highlightColor=X.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(c(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=be.clone(e,this._boundingSphere)}}});const UJe=new f,zJe=new f,VJe=new f;let Cne,JI;function Ene(e,t){const n=ee.fromTypedArray(e);return n===ee.INT||n===ee.UNSIGNED_INT||n===ee.DOUBLE?(gn("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}const jJe=new fe,WJe=new fe,qJe=new X,pk=new k,XJe=new k;function mk(e,t){const n=/czm_3dtiles_property_(\d+)/g;let i=n.exec(e);for(;null!==i;){const o=parseInt(i[1]);-1===t.indexOf(o)&&t.push(o),i=n.exec(e)}}function _k(e,t){e=e.slice(e.indexOf("\n"));const n=/czm_3dtiles_builtin_property_(\w+)/g;let i=n.exec(e);for(;null!==i;){const o=i[1];-1===t.indexOf(o)&&t.push(o),i=n.exec(e)}}function gk(e,t){const n=e.numberOfAttributes;for(let i=0;i<n;++i){const o=e.getAttribute(i);if(o.index===t)return o}}const KJe={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 QJe(e,t,n){let i,o,r;const s=t.context,a=c(n),l=e._isQuantized,u=e._isQuantizedDraco,d=e._isOctEncoded16P,h=e._isOctEncodedDraco,m=e._isRGB565,_=e._isTranslucent,p=e._hasColors,y=e._hasNormals,A=e._hasBatchIds,x=e._backFaceCulling,C=e._normalShading,w=e._drawCommand.vertexArray,v=e.clippingPlanes,D=e._attenuation;let P,N,R,B=_;const F=zt(KJe),S={},I=e._styleableShaderAttributes;for(o in I)I.hasOwnProperty(o)&&(r=I[o],F[o]=`czm_3dtiles_property_${r.location}`,S[r.location]=r);if(a){const le={translucent:!1},Ae="(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)";P=n.getColorShaderFunction(`getColorFromStyle${Ae}`,F,le),N=n.getShowShaderFunction(`getShowFromStyle${Ae}`,F,le),R=n.getPointSizeShaderFunction(`getPointSizeFromStyle${Ae}`,F,le),c(P)&&le.translucent&&(B=!0)}e._styleTranslucent=B;const L=c(P),M=c(N),U=c(R),z=e.isClipped,j=[],W=[];L&&(mk(P,j),_k(P,W)),M&&(mk(N,j),_k(N,W)),U&&(mk(R,j),_k(R,W));const q=W.indexOf("COLOR")>=0,V=W.indexOf("NORMAL")>=0;if(V&&!y)throw new Ie("Style references the NORMAL semantic but the point cloud does not have normals");for(o in I)if(I.hasOwnProperty(o)){r=I[o];const le=j.indexOf(r.location)>=0;gk(w,r.location).enabled=le}const $=p&&(!L||q);p&&(gk(w,1).enabled=$);const Z=y&&(C||x||V);y&&(gk(w,2).enabled=Z);const ie={a_position:0};$&&(ie.a_color=1),Z&&(ie.a_normal=2),A&&(ie.a_batchId=3);let Y="";const Q=j.length;for(i=0;i<Q;++i){const le=j[i];r=S[le];const Ae=r.componentCount,xe=`czm_3dtiles_property_${le}`;let De;De=1===Ae?"float":`vec${Ae}`,Y+=`in ${De} ${xe}; \n`,ie[xe]=r.location}!function $Je(e,t){const n=t.context,i=e._isQuantized,o=e._isQuantizedDraco,r=e._isOctEncodedDraco;let s={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){const a=jJe;if(a.x=e._attenuation?e.maximumAttenuation:e._pointSize,a.x*=t.pixelRatio,a.y=e.time,e._attenuation){let u;u=t.mode===ce.SCENE2D||t.camera.frustum instanceof $n?Number.POSITIVE_INFINITY:n.drawingBufferHeight/t.camera.frustum.sseDenominator,a.z=e.geometricError*e.geometricErrorScale,a.w=u}return a},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){return e.isClipped?e.clippingPlanes.texture:n.defaultTexture},u_clippingPlanesEdgeStyle:function(){const a=e.clippingPlanes;if(!c(a))return X.TRANSPARENT;const l=X.clone(a.edgeColor,qJe);return l.alpha=a.edgeWidth,l},u_clippingPlanesMatrix:function(){const a=e.clippingPlanes;if(!c(a))return k.IDENTITY;const l=g(e.clippingPlanesOriginMatrix,e._modelMatrix);k.multiply(n.uniformState.view3D,l,pk);const u=k.multiply(pk,a.modelMatrix,pk);return k.inverseTranspose(u,XJe)}};xne_addUniforms(e,s),(i||o||r)&&(s=Gn(s,{u_quantizedVolumeScaleAndOctEncodedRange:function(){const a=WJe;if(c(e._quantizedVolumeScale)){const l=f.clone(e._quantizedVolumeScale,a);f.divideByScalar(l,e._quantizedRange,a)}return a.w=e._octEncodedRange,a}})),c(e._uniformMapLoaded)&&(s=e._uniformMapLoaded(s)),e._drawCommand.uniformMap=s}(e,t);let K="in vec3 a_position; \nout vec4 v_color; \nuniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; \nuniform vec4 u_constantColor; \nuniform vec4 u_highlightColor; \n";K+="float u_pointSize; \nfloat tiles3d_tileset_time; \n",D&&(K+="float u_geometricError; \nfloat u_depthMultiplier; \n"),K+=Y,$&&(K+=_?"in vec4 a_color; \n":m?"in float a_color; \nconst float SHIFT_RIGHT_11 = 1.0 / 2048.0; \nconst float SHIFT_RIGHT_5 = 1.0 / 32.0; \nconst float SHIFT_LEFT_11 = 2048.0; \nconst float SHIFT_LEFT_5 = 32.0; \nconst float NORMALIZE_6 = 1.0 / 64.0; \nconst float NORMALIZE_5 = 1.0 / 32.0; \n":"in vec3 a_color; \n"),Z&&(K+=d||h?"in vec2 a_normal; \n":"in vec3 a_normal; \n"),A&&(K+="in float a_batchId; \n"),(l||u||h)&&(K+="uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; \n"),L&&(K+=P),M&&(K+=N),U&&(K+=R),K+="void main() \n{ \n u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; \n tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; \n",D&&(K+=" u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; \n u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; \n"),K+=$?_?" vec4 color = a_color; \n":m?" float compressed = a_color; \n float r = floor(compressed * SHIFT_RIGHT_11); \n compressed -= r * SHIFT_LEFT_11; \n float g = floor(compressed * SHIFT_RIGHT_5); \n compressed -= g * SHIFT_LEFT_5; \n float b = compressed; \n vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5); \n vec4 color = vec4(rgb, 1.0); \n":" vec4 color = vec4(a_color, 1.0); \n":" vec4 color = u_constantColor; \n",K+=l||u?" vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; \n":" vec3 position = a_position; \n",K+=" vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); \n",Z?(K+=d?" vec3 normal = czm_octDecode(a_normal); \n":h?" vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; \n":" vec3 normal = a_normal; \n",K+=" vec3 normalEC = czm_normal * normal; \n"):K+=" vec3 normal = vec3(1.0); \n",L&&(K+=" color = getColorFromStyle(position, position_absolute, color, normal); \n"),M&&(K+=" float show = float(getShowFromStyle(position, position_absolute, color, normal)); \n"),K+=U?" gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; \n":D?" vec4 positionEC = czm_modelView * vec4(position, 1.0); \n float depth = -positionEC.z; \n gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); \n":" gl_PointSize = u_pointSize; \n",K+=" color = color * u_highlightColor; \n",Z&&C&&(K+=" float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); \n diffuseStrength = max(diffuseStrength, 0.4); \n color.xyz *= diffuseStrength * czm_lightColor; \n"),K+=" v_color = color; \n gl_Position = czm_modelViewProjection * vec4(position, 1.0); \n",Z&&x&&(K+=" float visible = step(-normalEC.z, 0.0); \n gl_Position *= visible; \n gl_PointSize *= visible; \n"),M&&(K+=" gl_Position.w *= float(show); \n gl_PointSize *= float(show); \n"),K+="} \n";let me="in vec4 v_color; \n";z&&(me+="uniform highp sampler2D u_clippingPlanes; \nuniform mat4 u_clippingPlanesMatrix; \nuniform vec4 u_clippingPlanesEdgeStyle; \n",me+="\n",me+=LF(v,s),me+="\n"),me+="void main() \n{ \n out_FragColor = czm_gammaCorrect(v_color); \n",z&&(me+=function FJe(e,t,n){return T.typeOf.string("samplerUniformName",e),T.typeOf.string("matrixUniformName",t),T.typeOf.string("styleUniformName",n),` float clipDistance = clip(gl_FragCoord, ${e}, ${t}); \n vec4 clippingPlanesEdgeColor = vec4(1.0); \n clippingPlanesEdgeColor.rgb = ${n}.rgb; \n float clippingPlanesEdgeWidth = ${n}.a; \n if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n { \n out_FragColor = clippingPlanesEdgeColor;\n } \n`}("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),me+="} \n",e.splitDirection!==I_.NONE&&(me=xne_modifyFragmentShader(me)),c(e._vertexShaderLoaded)&&(K=e._vertexShaderLoaded(K)),c(e._fragmentShaderLoaded)&&(me=e._fragmentShaderLoaded(me));const we=e._drawCommand;c(we.shaderProgram)&&we.shaderProgram.destroy(),we.shaderProgram=mi.fromCache({context:s,vertexShaderSource:K,fragmentShaderSource:me,attributeLocations:ie});try{we.shaderProgram._bind()}catch{throw new Ie("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}const eet=new fe,tet=new f;oE.prototype.update=function(e){const t=e.context;if(c(this._error)){const u=this._error;throw this._error=void 0,u}if(function JJe(e,t){if(e._decodingState===oy_READY)return!1;if(e._decodingState===oy_NEEDS_DECODE){const n=e._parsedContent,i=n.draco,o=PO.decodePointCloud(i,t);c(o)&&(e._decodingState=oy_DECODING,o.then(function(r){e._decodingState=oy_READY;const s=c(r.POSITION)?r.POSITION.array:void 0,a=c(r.RGB)?r.RGB.array:void 0,l=c(r.RGBA)?r.RGBA.array:void 0,u=c(r.NORMAL)?r.NORMAL.array:void 0,d=c(r.BATCH_ID)?r.BATCH_ID.array:void 0,h=c(s)&&c(r.POSITION.data.quantization),m=c(u)&&c(r.NORMAL.data.quantization);if(h){const A=r.POSITION.data.quantization,x=A.range;e._quantizedVolumeScale=f.fromElements(x,x,x),e._quantizedVolumeOffset=f.unpack(A.minValues),e._quantizedRange=(1<<A.quantizationBits)-1,e._isQuantizedDraco=!0}m&&(e._octEncodedRange=(1<<r.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);let _=n.styleableProperties;const p=i.batchTableProperties;for(const A in p)if(p.hasOwnProperty(A)){const x=r[A];c(_)||(_={}),_[A]={typedArray:x.array,componentCount:x.data.componentsPerAttribute}}c(s)&&(n.positions={typedArray:s});const y=g(l,a);c(y)&&(n.colors={typedArray:y}),c(u)&&(n.normals={typedArray:u}),c(d)&&(n.batchIds={typedArray:d}),n.styleableProperties=_}).catch(function(r){e._decodingState=oy_FAILED,e._error=r}))}return!0}(this,t))return;let i=!1,o=!k.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,o=!0),c(this._drawCommand)||(function ZJe(e,t){const n=t.context,i=e._parsedContent,o=e._pointsLength,r=i.positions,s=i.colors,a=i.normals,l=i.batchIds,u=i.styleableProperties,d=c(u),h=e._isQuantized,m=e._isQuantizedDraco,_=e._isOctEncoded16P,p=e._isOctEncodedDraco,y=e._quantizedRange,A=e._octEncodedRange,x=e._isRGB565,C=e._isTranslucent,w=e._hasColors,v=e._hasNormals,D=e._hasBatchIds;let P,N;const R=[],B={};if(e._styleableShaderAttributes=B,d){let W=4;for(const q in u)if(u.hasOwnProperty(q)){const V=u[q],$=Ene(V.typedArray,q);P=V.componentCount,N=ee.fromTypedArray($);const Z=yn.createVertexBuffer({context:n,typedArray:$,usage:Tt.STATIC_DRAW});e._geometryByteLength+=Z.sizeInBytes,R.push({index:W,vertexBuffer:Z,componentsPerAttribute:P,componentDatatype:N,normalize:!1,offsetInBytes:0,strideInBytes:0}),B[q]={location:W,componentCount:P},++W}}const F=yn.createVertexBuffer({context:n,typedArray:r.typedArray,usage:Tt.STATIC_DRAW});let S,I,L;e._geometryByteLength+=F.sizeInBytes,w&&(S=yn.createVertexBuffer({context:n,typedArray:s.typedArray,usage:Tt.STATIC_DRAW}),e._geometryByteLength+=S.sizeInBytes),v&&(I=yn.createVertexBuffer({context:n,typedArray:a.typedArray,usage:Tt.STATIC_DRAW}),e._geometryByteLength+=I.sizeInBytes),D&&(l.typedArray=Ene(l.typedArray,"batchIds"),L=yn.createVertexBuffer({context:n,typedArray:l.typedArray,usage:Tt.STATIC_DRAW}),e._geometryByteLength+=L.sizeInBytes);let M=[];N=h?ee.UNSIGNED_SHORT:m?y<=255?ee.UNSIGNED_BYTE:ee.UNSIGNED_SHORT:ee.FLOAT,M.push({index:0,vertexBuffer:F,componentsPerAttribute:3,componentDatatype:N,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(e._boundingSphere=h||m?be.fromCornerPoints(f.ZERO,e._quantizedVolumeScale):function GJe(e){const n=e.length/3,i=Math.min(n,20),o=function HJe(e){if(!c(JI)){Cne=new hy(0),JI=new Array(e);for(let t=0;t<e;++t)JI[t]=Cne.random()}return JI}(20),r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=f.fromElements(r,r,r,UJe),l=f.fromElements(s,s,s,zJe);for(let d=0;d<i;++d){const h=Math.floor(o[d]*n),m=f.unpack(e,3*h,VJe);f.minimumByComponent(a,m,a),f.maximumByComponent(l,m,l)}const u=be.fromCornerPoints(a,l);return u.radius+=O.EPSILON2,u}(r.typedArray)),w&&M.push(x?{index:1,vertexBuffer:S,componentsPerAttribute:1,componentDatatype:ee.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0}:{index:1,vertexBuffer:S,componentsPerAttribute:C?4:3,componentDatatype:ee.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0}),v&&(_?(P=2,N=ee.UNSIGNED_BYTE):p?(P=2,N=A<=255?ee.UNSIGNED_BYTE:ee.UNSIGNED_SHORT):(P=3,N=ee.FLOAT),M.push({index:2,vertexBuffer:I,componentsPerAttribute:P,componentDatatype:N,normalize:!1,offsetInBytes:0,strideInBytes:0})),D&&M.push({index:3,vertexBuffer:L,componentsPerAttribute:1,componentDatatype:ee.fromTypedArray(l.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),d&&(M=M.concat(R));const U=new ds({context:n,attributes:M}),z={depthTest:{enabled:!0}},j={depthTest:{enabled:!0},depthMask:!1,blending:Ji.ALPHA_BLEND};e._opaquePass===ze.CESIUM_3D_TILE&&(z.stencilTest=Tn.setCesium3DTileBit(),z.stencilMask=Tn.CESIUM_3D_TILE_MASK,j.stencilTest=Tn.setCesium3DTileBit(),j.stencilMask=Tn.CESIUM_3D_TILE_MASK),e._opaqueRenderState=Pt.fromCache(z),e._translucentRenderState=Pt.fromCache(j),e._drawCommand=new Zt({boundingVolume:new be,cull:e._cull,modelMatrix:new k,primitiveType:At.POINTS,vertexArray:U,count:o,shaderProgram:void 0,uniformMap:void 0,renderState:C?e._translucentRenderState:e._opaqueRenderState,pass:C?ze.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}(this,e),o=!0,i=!0,this._ready=!0,this._parsedContent=void 0),o){k.clone(this.modelMatrix,this._modelMatrix);const u=this._drawCommand.modelMatrix;if(k.clone(this._modelMatrix,u),c(this._rtcCenter)&&k.multiplyByTranslation(u,this._rtcCenter,u),c(this._quantizedVolumeOffset)&&k.multiplyByTranslation(u,this._quantizedVolumeOffset,u),e.mode!==ce.SCENE3D){const h=e.mapProjection,m=k.getColumn(u,3,eet);fe.equals(m,fe.UNIT_W)||Rn.basisTo2D(h,u,u)}const d=this._drawCommand.boundingVolume;if(be.clone(this._boundingSphere,d),this._cull){const h=d.center;k.multiplyByPoint(u,h,h);const m=k.getScale(u,tet);d.radius*=f.maximumComponent(m)}}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);const r=this.splitDirection!==I_.NONE;this._splittingEnabled!==r&&(this._splittingEnabled=r,i=!0),i&&QJe(this,e,this._style),this._drawCommand.castShadows=$o.castShadows(this.shadows),this._drawCommand.receiveShadows=$o.receiveShadows(this.shadows);const s=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=s?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=s?ze.TRANSLUCENT:this._opaquePass;const l=e.passes;(l.render||l.pick)&&e.commandList.push(this._drawCommand)},oE.prototype.isDestroyed=function(){return!1},oE.prototype.destroy=function(){const e=this._drawCommand;return c(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),Ye(this)};const net=oE;function ry(e){e=g(e,g.EMPTY_OBJECT),T.typeOf.object("options.clock",e.clock),T.typeOf.object("options.intervals",e.intervals),this.show=g(e.show,!0),this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this.shadows=g(e.shadows,$o.ENABLED),this.maximumMemoryUsage=g(e.maximumMemoryUsage,256),this.shading=new gS(e.shading),this.style=e.style,this.frameFailed=new Ue,this.frameChanged=new Ue,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new LL,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}function iet(e){return`uniform vec4 czm_pickColor;\n${e}`}function oet(e){return function(t){return Gn(t,{czm_pickColor:function(){return e._pickId.color}})}}function ret(){return"czm_pickColor"}Object.defineProperties(ry.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){Bd.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(c(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}}),ry.prototype.makeStyleDirty=function(){this._styleDirty=!0},ry.prototype._getAverageLoadTime=function(){return 0===this._runningLength?.05:this._runningAverage};const set=new se;function yk(e){const t=e._clock;return t.canAnimate&&t.shouldAnimate?t.multiplier:0}function sy(e,t){return e._intervals.indexOf(t.start)}function vne(e,t){return function(n){const i=c(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}`))}}const pet=new k,get=new gS;function Dne(e,t,n,i){const o=g(e.shading,get),r=t.pointCloud,s=g(t.transform,k.IDENTITY);r.modelMatrix=k.multiplyTransformation(e.modelMatrix,s,pet),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=function met(e,t){const n=e.shading;return c(n)&&c(n.baseResolution)?n.baseResolution:c(t.boundingSphere)?O.cbrt(t.boundingSphere.volume()/t.pointsLength):0}(e,r),r.geometricErrorScale=o.geometricErrorScale,r.maximumAttenuation=function _et(e){const t=e.shading;return c(t)&&c(t.maximumAttenuation)?t.maximumAttenuation:10}(e);try{r.update(i)}catch(a){vne(e,t.uri)(a)}t.touchedFrameNumber=i.frameNumber}function bk(e,t,n,i){const o=function det(e,t,n){const i=sy(e,t),o=e._frames;let r=o[i];if(!c(r)){const s=t.data.transform,a=c(s)?k.fromArray(s):void 0,l=t.data.uri;r={pointCloud:void 0,transform:a,timestamp:wr(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:l},o[i]=r,jt.fetchArrayBuffer({url:l}).then(function(u){r.pointCloud=new net({arrayBuffer:u,cull:!0,fragmentShaderLoaded:iet,uniformMapLoaded:oet(e),pickIdLoaded:ret})}).catch(vne(e,l))}return r}(e,t,i);!function het(e,t,n,i){t.touchedFrameNumber<i.frameNumber-1&&(t.sequential=!1);const o=t.pointCloud;if(c(o)&&!t.ready){const r=i.commandList,s=r.length;Dne(e,t,n,i),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,r.length=s,t.sequential)&&function fet(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}(e,(wr()-t.timestamp)/1e3)}t.touchedFrameNumber=i.frameNumber}(e,o,n,i)}function Ine(e,t){const n=e._frames,i=n.length;for(let o=0;o<i;++o){const r=n[o];if(c(r)&&(!c(t)||t(r))){const s=r.pointCloud;r.ready&&(e._totalMemoryUsageInBytes-=s.geometryByteLength),c(s)&&s.destroy(),r===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),n[o]=void 0}}}function Pne(e,t,n,i,o){return!!c(n)&&(!!n.ready||(bk(e,t,i,o),n.ready))}const cA={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};ry.prototype.update=function(e){if(e.mode===ce.MORPHING||!this.show)return;c(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),c(this._loadTimestamp)||(this._loadTimestamp=se.clone(e.time));const t=Math.max(1e3*se.secondsDifference(e.time,this._loadTimestamp),0),n=this._clippingPlanes;let i=0,o=!1;const r=c(n)&&n.enabled;r&&(n.update(e),i=n.clippingPlanesState),this._clippingPlanesState!==i&&(this._clippingPlanesState=i,o=!0);const s=this._styleDirty;this._styleDirty=!1,(o||s)&&function Tet(e,t,n){const i=e._frames,o=i.length;for(let r=0;r<o;++r){const s=i[r];c(s)&&c(s.pointCloud)&&(s.pointCloud.clippingPlanesDirty=t,s.pointCloud.styleDirty=n)}}(this,o,s),cA.timeSinceLoad=t,cA.isClipped=r;const a=this.shading,l=this._pointCloudEyeDomeLighting,u=e.commandList,d=u.length;let h=this._previousInterval,m=this._nextInterval;const _=function cet(e){const t=e._intervals,o=t.indexOf(e._clock.currentTime);return t.get(o)}(this);if(!c(_))return;let p=!1;const y=yk(this),A=0===y;y!==this._clockMultiplier&&(p=!0,this._clockMultiplier=y),(!c(h)||A)&&(h=_),(!c(m)||p||function uet(e,t,n){const i=yk(e),o=sy(e,t),r=sy(e,n);return i>=0?o>=r:o<=r}(this,_,m))&&(m=function aet(e,t){const n=e._intervals,i=e._clock,o=yk(e);if(0===o)return;const r=e._getAverageLoadTime(),s=se.addSeconds(i.currentTime,r*o,set);let a=n.indexOf(s);return a===sy(e,t)&&(o>=0?++a:--a),n.get(a)}(this,_)),h=function Aet(e,t,n,i,o){let r,s,a;const l=e._intervals,u=e._frames,d=sy(e,n),h=sy(e,t);if(d>=h){for(r=d;r>=h;--r)if(s=l.get(r),a=u[r],Pne(e,s,a,i,o))return s}else for(r=d;r<=h;++r)if(s=l.get(r),a=u[r],Pne(e,s,a,i,o))return s;return t}(this,h,_,cA,e);let x=function bet(e,t){const n=sy(e,t),i=e._frames[n];if(c(i)&&i.ready)return i}(this,h);c(x)||(bk(this,h,cA,e),x=this._lastRenderedFrame),c(x)&&Dne(this,x,cA,e),c(m)&&bk(this,m,cA,e);const C=this;c(x)&&!c(this._lastRenderedFrame)&&e.afterRender.push(function(){return!0}),c(x)&&x!==this._lastRenderedFrame&&C.frameChanged.numberOfListeners>0&&e.afterRender.push(function(){return C.frameChanged.raiseEvent(C),!0}),this._previousInterval=h,this._nextInterval=m,this._lastRenderedFrame=x,this._totalMemoryUsageInBytes>1024*this.maximumMemoryUsage*1024&&Ine(this,function yet(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}(e));const P=u.length-d;c(a)&&a.attenuation&&a.eyeDomeLighting&&P>0&&l.update(e,d,a,this.boundingSphere)},ry.prototype.isDestroyed=function(){return!1},ry.prototype.destroy=function(){return Ine(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),Ye(this)};const One=ry,Ak="// Main intersection function for Voxel scenes.\n// See IntersectBox.glsl, IntersectCylinder.glsl, or IntersectEllipsoid.glsl\n// for the definition of intersectShape. The appropriate function is selected\n// based on the VoxelPrimitive shape type, and added to the shader in\n// Scene/VoxelRenderResources.js.\n// See also IntersectClippingPlane.glsl and IntersectDepth.glsl.\n// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT,\n// getFirstIntersection, initializeIntersections, nextIntersection.\n\n/* Intersection defines (set in Scene/VoxelRenderResources.js)\n#define INTERSECTION_COUNT ###\n*/\n\nRayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, out Intersections ix) {\n // Do a ray-shape intersection to find the exact starting and ending points.\n intersectShape(ray, ix);\n\n // Exit early if the positive shape was completely missed or behind the ray.\n RayShapeIntersection intersection = getFirstIntersection(ix);\n if (intersection.entry.w == NO_HIT) {\n // Positive shape was completely missed - so exit early.\n return intersection;\n }\n\n // Clipping planes\n #if defined(CLIPPING_PLANES)\n intersectClippingPlanes(ray, ix);\n #endif\n\n // Depth\n #if defined(DEPTH_TEST)\n intersectDepth(screenCoord, ray, ix);\n #endif\n\n // Find the first intersection that's in front of the ray\n #if (INTERSECTION_COUNT > 1)\n initializeIntersections(ix);\n for (int i = 0; i < INTERSECTION_COUNT; ++i) {\n intersection = nextIntersection(ix);\n if (intersection.exit.w > 0.0) {\n // Set start to 0.0 when ray is inside the shape.\n intersection.entry.w = max(intersection.entry.w, 0.0);\n break;\n }\n }\n #else\n // Set start to 0.0 when ray is inside the shape.\n intersection.entry.w = max(intersection.entry.w, 0.0);\n #endif\n\n return intersection;\n}\n",Bet=function Fet(e){const t=new W5;this.shaderBuilder=t;const n=e._customShader,i=Gn(e._uniformMap,n.uniformMap);e._uniformMap=i;const o=n.uniforms;for(const m in o)o.hasOwnProperty(m)&&t.addUniform(o[m].type,m,Oe.FRAGMENT);t.addUniform("sampler2D","u_megatextureTextures[METADATA_COUNT]",Oe.FRAGMENT),this.uniformMap=i;const r=e._clippingPlanes,s=c(r)&&r.enabled?r.length:0;this.clippingPlanes=r,this.clippingPlanesLength=s,t.addVertexLines(["in vec2 position;\n\nuniform vec4 u_ndcSpaceAxisAlignedBoundingBox;\n\nvoid main() {\n vec2 aabbMin = u_ndcSpaceAxisAlignedBoundingBox.xy;\n vec2 aabbMax = u_ndcSpaceAxisAlignedBoundingBox.zw;\n vec2 translation = 0.5 * (aabbMax + aabbMin);\n vec2 scale = 0.5 * (aabbMax - aabbMin);\n gl_Position = vec4(position * scale + translation, 0.0, 1.0);\n}\n"]),t.addFragmentLines([n.fragmentShaderText,"#line 0","// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js\n#define OCTREE_FLAG_INTERNAL 0\n#define OCTREE_FLAG_LEAF 1\n#define OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 2\n\n#define OCTREE_MAX_LEVELS 32 // Harcoded value because GLSL doesn't like variable length loops\n\nuniform sampler2D u_octreeInternalNodeTexture;\nuniform vec2 u_octreeInternalNodeTexelSizeUv;\nuniform int u_octreeInternalNodeTilesPerRow;\n#if (SAMPLE_COUNT > 1)\nuniform sampler2D u_octreeLeafNodeTexture;\nuniform vec2 u_octreeLeafNodeTexelSizeUv;\nuniform int u_octreeLeafNodeTilesPerRow;\n#endif\n\nstruct OctreeNodeData {\n int data;\n int flag;\n};\n\nstruct TraversalData {\n ivec4 octreeCoords;\n int parentOctreeIndex;\n};\n\nstruct SampleData {\n int megatextureIndex;\n ivec4 tileCoords;\n vec3 tileUv;\n #if (SAMPLE_COUNT > 1)\n float weight;\n #endif\n};\n\n// Integer mod: For WebGL1 only\nint intMod(in int a, in int b) {\n return a - (b * (a / b));\n}\nint normU8_toInt(in float value) {\n return int(value * 255.0);\n}\nint normU8x2_toInt(in vec2 value) {\n return int(value.x * 255.0) + 256 * int(value.y * 255.0);\n}\nfloat normU8x2_toFloat(in vec2 value) {\n return float(normU8x2_toInt(value)) / 65535.0;\n}\n\nOctreeNodeData getOctreeNodeData(in vec2 octreeUv) {\n vec4 texData = texture(u_octreeInternalNodeTexture, octreeUv);\n\n OctreeNodeData data;\n data.data = normU8x2_toInt(texData.xy);\n data.flag = normU8x2_toInt(texData.zw);\n return data;\n}\n\nOctreeNodeData getOctreeChildData(in int parentOctreeIndex, in ivec3 childCoord) {\n int childIndex = childCoord.z * 4 + childCoord.y * 2 + childCoord.x;\n int octreeCoordX = intMod(parentOctreeIndex, u_octreeInternalNodeTilesPerRow) * 9 + 1 + childIndex;\n int octreeCoordY = parentOctreeIndex / u_octreeInternalNodeTilesPerRow;\n vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);\n return getOctreeNodeData(octreeUv);\n}\n\nint getOctreeParentIndex(in int octreeIndex) {\n int octreeCoordX = intMod(octreeIndex, u_octreeInternalNodeTilesPerRow) * 9;\n int octreeCoordY = octreeIndex / u_octreeInternalNodeTilesPerRow;\n vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);\n vec4 parentData = texture(u_octreeInternalNodeTexture, octreeUv);\n int parentOctreeIndex = normU8x2_toInt(parentData.xy);\n return parentOctreeIndex;\n}\n\n/**\n* Convert a position in the uv-space of the tileset bounding shape\n* into the uv-space of a tile within the tileset\n*/\nvec3 getTileUv(in vec3 shapePosition, in ivec4 octreeCoords) {\n\t// PERFORMANCE_IDEA: use bit-shifting (only in WebGL2)\n float dimAtLevel = pow(2.0, float(octreeCoords.w));\n return shapePosition * dimAtLevel - vec3(octreeCoords.xyz);\n}\n\nvoid getOctreeLeafSampleData(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleData) {\n sampleData.megatextureIndex = data.data;\n sampleData.tileCoords = (data.flag == OCTREE_FLAG_PACKED_LEAF_FROM_PARENT)\n ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)\n : octreeCoords;\n}\n\n#if (SAMPLE_COUNT > 1)\nvoid getOctreeLeafSampleDatas(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleDatas[SAMPLE_COUNT]) {\n int leafIndex = data.data;\n int leafNodeTexelCount = 2;\n // Adding 0.5 moves to the center of the texel\n float leafCoordXStart = float(intMod(leafIndex, u_octreeLeafNodeTilesPerRow) * leafNodeTexelCount) + 0.5;\n float leafCoordY = float(leafIndex / u_octreeLeafNodeTilesPerRow) + 0.5;\n\n // Get an interpolation weight and a flag to determine whether to read the parent texture\n vec2 leafUv0 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 0.0, leafCoordY);\n vec4 leafData0 = texture(u_octreeLeafNodeTexture, leafUv0);\n float lerp = normU8x2_toFloat(leafData0.xy);\n sampleDatas[0].weight = 1.0 - lerp;\n sampleDatas[1].weight = lerp;\n // TODO: this looks wrong? Should be comparing to OCTREE_FLAG_PACKED_LEAF_FROM_PARENT\n sampleDatas[0].tileCoords = (normU8_toInt(leafData0.z) == 1)\n ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)\n : octreeCoords;\n sampleDatas[1].tileCoords = (normU8_toInt(leafData0.w) == 1)\n ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)\n : octreeCoords;\n\n // Get megatexture indices for both samples\n vec2 leafUv1 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 1.0, leafCoordY);\n vec4 leafData1 = texture(u_octreeLeafNodeTexture, leafUv1);\n sampleDatas[0].megatextureIndex = normU8x2_toInt(leafData1.xy);\n sampleDatas[1].megatextureIndex = normU8x2_toInt(leafData1.zw);\n}\n#endif\n\nOctreeNodeData traverseOctreeDownwards(in vec3 shapePosition, inout TraversalData traversalData) {\n float sizeAtLevel = 1.0 / pow(2.0, float(traversalData.octreeCoords.w));\n vec3 start = vec3(traversalData.octreeCoords.xyz) * sizeAtLevel;\n vec3 end = start + vec3(sizeAtLevel);\n OctreeNodeData childData;\n\n for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {\n // Find out which octree child contains the position\n // 0 if before center, 1 if after\n vec3 center = 0.5 * (start + end);\n vec3 childCoord = step(center, shapePosition);\n\n // Get octree coords for the next level down\n ivec4 octreeCoords = traversalData.octreeCoords;\n traversalData.octreeCoords = ivec4(octreeCoords.xyz * 2 + ivec3(childCoord), octreeCoords.w + 1);\n\n childData = getOctreeChildData(traversalData.parentOctreeIndex, ivec3(childCoord));\n\n if (childData.flag != OCTREE_FLAG_INTERNAL) {\n // leaf tile - stop traversing\n break;\n }\n\n // interior tile - keep going deeper\n start = mix(start, center, childCoord);\n end = mix(center, end, childCoord);\n traversalData.parentOctreeIndex = childData.data;\n }\n\n return childData;\n}\n\n/**\n* Transform a given position to an octree tile coordinate and a position within that tile,\n* and find the corresponding megatexture index and texture coordinates\n*/\nvoid traverseOctreeFromBeginning(in vec3 shapePosition, out TraversalData traversalData, out SampleData sampleDatas[SAMPLE_COUNT]) {\n traversalData.octreeCoords = ivec4(0);\n traversalData.parentOctreeIndex = 0;\n\n OctreeNodeData nodeData = getOctreeNodeData(vec2(0.0));\n if (nodeData.flag != OCTREE_FLAG_LEAF) {\n nodeData = traverseOctreeDownwards(shapePosition, traversalData);\n }\n\n #if (SAMPLE_COUNT == 1)\n getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);\n sampleDatas[0].tileUv = getTileUv(shapePosition, sampleDatas[0].tileCoords);\n #else\n getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);\n sampleDatas[0].tileUv = getTileUv(shapePosition, sampleDatas[0].tileCoords);\n sampleDatas[1].tileUv = getTileUv(shapePosition, sampleDatas[1].tileCoords);\n #endif\n}\n\nbool inRange(in vec3 v, in vec3 minVal, in vec3 maxVal) {\n return clamp(v, minVal, maxVal) == v;\n}\n\nbool insideTile(in vec3 shapePosition, in ivec4 octreeCoords) {\n vec3 tileUv = getTileUv(shapePosition, octreeCoords);\n\tbool inside = inRange(tileUv, vec3(0.0), vec3(1.0));\n\t// Assume (!) the position is always inside the root tile.\n\treturn inside || octreeCoords.w == 0;\n}\n\nvoid traverseOctreeFromExisting(in vec3 shapePosition, inout TraversalData traversalData, inout SampleData sampleDatas[SAMPLE_COUNT]) {\n if (insideTile(shapePosition, traversalData.octreeCoords)) {\n for (int i = 0; i < SAMPLE_COUNT; i++) {\n sampleDatas[0].tileUv = getTileUv(shapePosition, sampleDatas[0].tileCoords);\n }\n return;\n }\n\n // Go up tree until we find a parent tile containing shapePosition\n for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {\n traversalData.octreeCoords.xyz /= 2;\n traversalData.octreeCoords.w -= 1;\n\n if (insideTile(shapePosition, traversalData.octreeCoords)) {\n break;\n }\n\n traversalData.parentOctreeIndex = getOctreeParentIndex(traversalData.parentOctreeIndex);\n }\n\n // Go down tree\n OctreeNodeData nodeData = traverseOctreeDownwards(shapePosition, traversalData);\n\n #if (SAMPLE_COUNT == 1)\n getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);\n sampleDatas[0].tileUv = getTileUv(shapePosition, sampleDatas[0].tileCoords);\n #else\n getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);\n sampleDatas[0].tileUv = getTileUv(shapePosition, sampleDatas[0].tileCoords);\n sampleDatas[1].tileUv = getTileUv(shapePosition, sampleDatas[1].tileCoords);\n #endif\n}\n","/* Intersection defines\n#define INTERSECTION_COUNT ###\n*/\n\n#define NO_HIT (-czm_infinity)\n#define INF_HIT (czm_infinity * 0.5)\n#define RAY_SHIFT (0.000003163)\n#define RAY_SCALE (1.003163)\n\nstruct Ray {\n vec3 pos;\n vec3 dir;\n#if defined(SHAPE_BOX)\n vec3 dInv;\n#endif\n};\n\nstruct RayShapeIntersection {\n vec4 entry;\n vec4 exit;\n};\n\nstruct Intersections {\n // Don't access these member variables directly - call the functions instead.\n\n // Store an array of ray-surface intersections. Each intersection is composed of:\n // .xyz for the surface normal at the intersection point\n // .w for the T value\n // The scale of the normal encodes the shape intersection type:\n // length(intersection.xyz) = 1: positive shape entry\n // length(intersection.xyz) = 2: positive shape exit\n // length(intersection.xyz) = 3: negative shape entry\n // length(intersection.xyz) = 4: negative shape exit\n // INTERSECTION_COUNT is the number of ray-*shape* (volume) intersections,\n // so we need twice as many to track ray-*surface* intersections\n vec4 intersections[INTERSECTION_COUNT * 2];\n\n #if (INTERSECTION_COUNT > 1)\n // Maintain state for future nextIntersection calls\n int index;\n int surroundCount;\n bool surroundIsPositive;\n #endif\n};\n\nRayShapeIntersection getFirstIntersection(in Intersections ix) \n{\n return RayShapeIntersection(ix.intersections[0], ix.intersections[1]);\n}\n\nvec4 encodeIntersectionType(vec4 intersection, int index, bool entry)\n{\n float scale = float(index > 0) * 2.0 + float(!entry) + 1.0;\n return vec4(intersection.xyz * scale, intersection.w);\n}\n\n// Use defines instead of real functions because WebGL1 cannot access array with non-constant index.\n#define setIntersection(/*inout Intersections*/ ix, /*int*/ index, /*float*/ t, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = vec4(0.0, float(!positive) * 2.0 + float(!enter) + 1.0, 0.0, (t))\n#define setIntersectionPair(/*inout Intersections*/ ix, /*int*/ index, /*vec2*/ entryExit) (ix).intersections[(index) * 2 + 0] = vec4(0.0, float((index) > 0) * 2.0 + 1.0, 0.0, (entryExit).x); (ix).intersections[(index) * 2 + 1] = vec4(0.0, float((index) > 0) * 2.0 + 2.0, 0.0, (entryExit).y)\n#define setSurfaceIntersection(/*inout Intersections*/ ix, /*int*/ index, /*vec4*/ intersection) (ix).intersections[(index)] = intersection;\n#define setShapeIntersection(/*inout Intersections*/ ix, /*int*/ index, /*RayShapeIntersection*/ intersection) (ix).intersections[(index) * 2 + 0] = encodeIntersectionType((intersection).entry, (index), true); (ix).intersections[(index) * 2 + 1] = encodeIntersectionType((intersection).exit, (index), false)\n\n#if (INTERSECTION_COUNT > 1)\nvoid initializeIntersections(inout Intersections ix) {\n // Sort the intersections from min T to max T with bubble sort.\n // Note: If this sorting function changes, some of the intersection test may\n // need to be updated. Search for \"bubble sort\" to find those areas.\n const int sortPasses = INTERSECTION_COUNT * 2 - 1;\n for (int n = sortPasses; n > 0; --n) {\n for (int i = 0; i < sortPasses; ++i) {\n // The loop should be: for (i = 0; i < n; ++i) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (i >= n) { break; }\n\n vec4 intersect0 = ix.intersections[i + 0];\n vec4 intersect1 = ix.intersections[i + 1];\n\n bool inOrder = intersect0.w <= intersect1.w;\n\n ix.intersections[i + 0] = inOrder ? intersect0 : intersect1;\n ix.intersections[i + 1] = inOrder ? intersect1 : intersect0;\n }\n }\n\n // Prepare initial state for nextIntersection\n ix.index = 0;\n ix.surroundCount = 0;\n ix.surroundIsPositive = false;\n}\n#endif\n\n#if (INTERSECTION_COUNT > 1)\nRayShapeIntersection nextIntersection(inout Intersections ix) {\n vec4 surfaceIntersection = vec4(0.0, 0.0, 0.0, NO_HIT);\n RayShapeIntersection shapeIntersection = RayShapeIntersection(surfaceIntersection, surfaceIntersection);\n\n const int passCount = INTERSECTION_COUNT * 2;\n\n if (ix.index == passCount) {\n return shapeIntersection;\n }\n\n for (int i = 0; i < passCount; ++i) {\n // The loop should be: for (i = ix.index; i < passCount; ++i) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to continue instead.\n if (i < ix.index) {\n continue;\n }\n\n ix.index = i + 1;\n\n surfaceIntersection = ix.intersections[i];\n int intersectionType = int(length(surfaceIntersection.xyz) - 0.5);\n bool currShapeIsPositive = intersectionType < 2;\n bool enter = intMod(intersectionType, 2) == 0;\n\n ix.surroundCount += enter ? +1 : -1;\n ix.surroundIsPositive = currShapeIsPositive ? enter : ix.surroundIsPositive;\n\n // entering positive or exiting negative\n if (ix.surroundCount == 1 && ix.surroundIsPositive && enter == currShapeIsPositive) {\n shapeIntersection.entry = surfaceIntersection;\n }\n\n // exiting positive or entering negative after being inside positive\n bool exitPositive = !enter && currShapeIsPositive && ix.surroundCount == 0;\n bool enterNegativeFromPositive = enter && !currShapeIsPositive && ix.surroundCount == 2 && ix.surroundIsPositive;\n if (exitPositive || enterNegativeFromPositive) {\n shapeIntersection.exit = surfaceIntersection;\n\n // entry and exit have been found, so the loop can stop\n if (exitPositive) {\n // After exiting positive shape there is nothing left to intersect, so jump to the end index.\n ix.index = passCount;\n }\n break;\n }\n }\n\n return shapeIntersection;\n}\n#endif\n\n// NOTE: initializeIntersections, nextIntersection aren't even declared unless INTERSECTION_COUNT > 1\n","// See Octree.glsl for the definitions of SampleData and intMod\n\n/* Megatexture defines (set in Scene/VoxelRenderResources.js)\n#define SAMPLE_COUNT ###\n#define NEAREST_SAMPLING\n#define PADDING\n*/\n\nuniform ivec2 u_megatextureSliceDimensions; // number of slices per tile, in two dimensions\nuniform ivec2 u_megatextureTileDimensions; // number of tiles per megatexture, in two dimensions\nuniform vec2 u_megatextureVoxelSizeUv;\nuniform vec2 u_megatextureSliceSizeUv;\nuniform vec2 u_megatextureTileSizeUv;\n\nuniform ivec3 u_dimensions; // does not include padding\n#if defined(PADDING)\n uniform ivec3 u_paddingBefore;\n uniform ivec3 u_paddingAfter;\n#endif\n\n// Integer min, max, clamp: For WebGL1 only\nint intMin(int a, int b) {\n return a <= b ? a : b;\n}\nint intMax(int a, int b) {\n return a >= b ? a : b;\n}\nint intClamp(int v, int minVal, int maxVal) {\n return intMin(intMax(v, minVal), maxVal);\n}\n\nvec2 index1DTo2DTexcoord(int index, ivec2 dimensions, vec2 uvScale)\n{\n int indexX = intMod(index, dimensions.x);\n int indexY = index / dimensions.x;\n return vec2(indexX, indexY) * uvScale;\n}\n\n/*\n How is 3D data stored in a 2D megatexture?\n\n In this example there is only one loaded tile and it has 2x2x2 voxels (8 voxels total).\n The data is sliced by Z. The data at Z = 0 is placed in texels (0,0), (0,1), (1,0), (1,1) and\n the data at Z = 1 is placed in texels (2,0), (2,1), (3,0), (3,1).\n Note that there could be empty space in the megatexture because it's a power of two.\n\n 0 1 2 3\n +---+---+---+---+\n | | | | | 3\n +---+---+---+---+\n | | | | | 2\n +-------+-------+\n |010|110|011|111| 1\n |--- ---|--- ---|\n |000|100|001|101| 0\n +-------+-------+\n\n When doing linear interpolation the megatexture needs to be sampled twice: once for\n the Z slice above the voxel coordinate and once for the slice below. The two slices\n are interpolated with fract(coord.z - 0.5). For example, a Z coordinate of 1.0 is\n halfway between two Z slices so the interpolation factor is 0.5. Below is a side view\n of the 3D voxel grid with voxel coordinates on the left side.\n\n 2 +---+\n |001|\n 1 +-z-+\n |000|\n 0 +---+\n\n When doing nearest neighbor the megatexture only needs to be sampled once at the closest Z slice.\n*/\n\nProperties getPropertiesFromMegatexture(in SampleData sampleData) {\n vec3 tileUv = clamp(sampleData.tileUv, vec3(0.0), vec3(1.0)); // TODO is the clamp necessary?\n int tileIndex = sampleData.megatextureIndex;\n vec3 voxelCoord = tileUv * vec3(u_dimensions);\n ivec3 voxelDimensions = u_dimensions;\n\n #if defined(PADDING)\n voxelDimensions += u_paddingBefore + u_paddingAfter;\n voxelCoord += vec3(u_paddingBefore);\n #endif\n\n #if defined(NEAREST_SAMPLING)\n // Round to the center of the nearest voxel\n voxelCoord = floor(voxelCoord) + vec3(0.5);\n #endif\n\n // Tile location\n vec2 tileUvOffset = index1DTo2DTexcoord(tileIndex, u_megatextureTileDimensions, u_megatextureTileSizeUv);\n\n // Slice location\n float slice = voxelCoord.z - 0.5;\n int sliceIndex = int(floor(slice));\n int sliceIndex0 = intClamp(sliceIndex, 0, voxelDimensions.z - 1);\n vec2 sliceUvOffset0 = index1DTo2DTexcoord(sliceIndex0, u_megatextureSliceDimensions, u_megatextureSliceSizeUv);\n\n // Voxel location\n vec2 voxelUvOffset = clamp(voxelCoord.xy, vec2(0.5), vec2(voxelDimensions.xy) - vec2(0.5)) * u_megatextureVoxelSizeUv;\n\n // Final location in the megatexture\n vec2 uv0 = tileUvOffset + sliceUvOffset0 + voxelUvOffset;\n\n #if defined(NEAREST_SAMPLING)\n return getPropertiesFromMegatextureAtUv(uv0);\n #else\n float sliceLerp = fract(slice);\n int sliceIndex1 = intMin(sliceIndex + 1, voxelDimensions.z - 1);\n vec2 sliceUvOffset1 = index1DTo2DTexcoord(sliceIndex1, u_megatextureSliceDimensions, u_megatextureSliceSizeUv);\n vec2 uv1 = tileUvOffset + sliceUvOffset1 + voxelUvOffset;\n Properties properties0 = getPropertiesFromMegatextureAtUv(uv0);\n Properties properties1 = getPropertiesFromMegatextureAtUv(uv1);\n return mixProperties(properties0, properties1, sliceLerp);\n #endif\n}\n\n// Convert an array of sample datas to a final weighted properties.\nProperties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_COUNT]) {\n #if (SAMPLE_COUNT == 1)\n return getPropertiesFromMegatexture(sampleDatas[0]);\n #else\n // When more than one sample is taken the accumulator needs to start at 0\n Properties properties = clearProperties();\n for (int i = 0; i < SAMPLE_COUNT; ++i) {\n float weight = sampleDatas[i].weight;\n\n // Avoid reading the megatexture when the weight is 0 as it can be costly.\n if (weight > 0.0) {\n Properties tempProperties = getPropertiesFromMegatexture(sampleDatas[i]);\n tempProperties = scaleProperties(tempProperties, weight);\n properties = sumProperties(properties, tempProperties);\n }\n }\n return properties;\n #endif\n}\n"]),s>0&&(t.addDefine("CLIPPING_PLANES",void 0,Oe.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",s,Oe.FRAGMENT),r.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,Oe.FRAGMENT),t.addFragmentLines(["// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT,\n// NO_HIT, setIntersectionPair\n\n/* Clipping plane defines (set in Scene/VoxelRenderResources.js)\n#define CLIPPING_PLANES_UNION\n#define CLIPPING_PLANES_COUNT\n#define CLIPPING_PLANES_INTERSECTION_INDEX\n*/\n\nuniform sampler2D u_clippingPlanesTexture;\nuniform mat4 u_clippingPlanesMatrix;\n\n// Plane is in Hessian Normal Form\nvec4 intersectPlane(in Ray ray, in vec4 plane) {\n vec3 n = plane.xyz; // normal\n float w = plane.w; // -dot(pointOnPlane, normal)\n\n float a = dot(ray.pos, n);\n float b = dot(ray.dir, n);\n float t = -(w + a) / b;\n\n return vec4(n, t);\n}\n\nvoid intersectClippingPlanes(in Ray ray, inout Intersections ix) {\n vec4 backSide = vec4(-ray.dir, -INF_HIT);\n vec4 farSide = vec4(ray.dir, +INF_HIT);\n RayShapeIntersection clippingVolume;\n\n #if (CLIPPING_PLANES_COUNT == 1)\n // Union and intersection are the same when there's one clipping plane, and the code\n // is more simplified.\n vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, 0, u_clippingPlanesMatrix);\n vec4 intersection = intersectPlane(ray, planeUv);\n bool reflects = dot(ray.dir, intersection.xyz) < 0.0;\n clippingVolume.entry = reflects ? backSide : intersection;\n clippingVolume.exit = reflects ? intersection : farSide;\n setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);\n #elif defined(CLIPPING_PLANES_UNION)\n vec4 firstTransmission = vec4(ray.dir, +INF_HIT);\n vec4 lastReflection = vec4(-ray.dir, -INF_HIT);\n for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {\n vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i, u_clippingPlanesMatrix);\n vec4 intersection = intersectPlane(ray, planeUv);\n if (dot(ray.dir, planeUv.xyz) > 0.0) {\n firstTransmission = intersection.w <= firstTransmission.w ? intersection : firstTransmission;\n } else {\n lastReflection = intersection.w >= lastReflection.w ? intersection : lastReflection;\n }\n }\n clippingVolume.entry = backSide;\n clippingVolume.exit = lastReflection;\n setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 0, clippingVolume);\n clippingVolume.entry = firstTransmission;\n clippingVolume.exit = farSide;\n setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 1, clippingVolume);\n #else // intersection\n vec4 lastTransmission = vec4(ray.dir, -INF_HIT);\n vec4 firstReflection = vec4(-ray.dir, +INF_HIT);\n for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {\n vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i, u_clippingPlanesMatrix);\n vec4 intersection = intersectPlane(ray, planeUv);\n if (dot(ray.dir, planeUv.xyz) > 0.0) {\n lastTransmission = intersection.w > lastTransmission.w ? intersection : lastTransmission;\n } else {\n firstReflection = intersection.w < firstReflection.w ? intersection: firstReflection;\n }\n }\n if (lastTransmission.w < firstReflection.w) {\n clippingVolume.entry = lastTransmission;\n clippingVolume.exit = firstReflection;\n } else {\n clippingVolume.entry = vec4(-ray.dir, NO_HIT);\n clippingVolume.exit = vec4(ray.dir, NO_HIT);\n }\n setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);\n #endif\n}\n"])),e._depthTest&&(t.addDefine("DEPTH_TEST",void 0,Oe.FRAGMENT),t.addFragmentLines(["// See IntersectionUtils.glsl for the definitions of Ray, Intersections,\n// setIntersectionPair, INF_HIT, NO_HIT\n\n/* intersectDepth defines (set in Scene/VoxelRenderResources.js)\n#define DEPTH_INTERSECTION_INDEX ###\n*/\n\nuniform mat4 u_transformPositionViewToUv;\n\nvoid intersectDepth(in vec2 screenCoord, in Ray ray, inout Intersections ix) {\n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));\n if (logDepthOrDepth != 0.0) {\n // Calculate how far the ray must travel before it hits the depth buffer.\n vec4 eyeCoordinateDepth = czm_screenToEyeCoordinates(screenCoord, logDepthOrDepth);\n eyeCoordinateDepth /= eyeCoordinateDepth.w;\n vec3 depthPositionUv = vec3(u_transformPositionViewToUv * eyeCoordinateDepth);\n float t = dot(depthPositionUv - ray.pos, ray.dir);\n setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(t, +INF_HIT));\n } else {\n // There's no depth at this location.\n setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(NO_HIT));\n }\n}\n"]));const a=e._provider.shape;"BOX"===a?(t.addDefine("SHAPE_BOX",void 0,Oe.FRAGMENT),t.addFragmentLines(["/* Box defines (set in Scene/VoxelBoxShape.js)\n#define BOX_HAS_SHAPE_BOUNDS\n*/\n\n#if defined(BOX_HAS_SHAPE_BOUNDS)\n uniform vec3 u_boxUvToShapeUvScale;\n uniform vec3 u_boxUvToShapeUvTranslate;\n#endif\n\nvec3 convertUvToShapeUvSpace(in vec3 positionUv) {\n#if defined(BOX_HAS_SHAPE_BOUNDS)\n return positionUv * u_boxUvToShapeUvScale + u_boxUvToShapeUvTranslate;\n#else\n return positionUv;\n#endif\n}\n\nvec3 convertShapeUvToUvSpace(in vec3 shapeUv) {\n#if defined(BOX_HAS_SHAPE_BOUNDS)\n return (shapeUv - u_boxUvToShapeUvTranslate) / u_boxUvToShapeUvScale;\n#else\n return shapeUv;\n#endif\n}\n","// See IntersectionUtils.glsl for the definitions of Ray and NO_HIT\n// See convertUvToBox.glsl for the definition of convertShapeUvToUvSpace\n\n/* Box defines (set in Scene/VoxelBoxShape.js)\n#define BOX_INTERSECTION_INDEX ### // always 0\n*/\n\nuniform vec3 u_renderMinBounds;\nuniform vec3 u_renderMaxBounds;\n\nstruct Box {\n vec3 p0;\n vec3 p1;\n};\n\nBox constructVoxelBox(in ivec4 octreeCoords, in vec3 tileUv)\n{\n // Find the min/max cornerpoints of the voxel in tile coordinates\n vec3 tileOrigin = vec3(octreeCoords.xyz);\n vec3 numSamples = vec3(u_dimensions);\n vec3 voxelSize = 1.0 / numSamples;\n vec3 coordP0 = floor(tileUv * numSamples) * voxelSize + tileOrigin;\n vec3 coordP1 = coordP0 + voxelSize;\n\n // Transform to the UV coordinates of the scaled tileset\n float tileSize = 1.0 / pow(2.0, float(octreeCoords.w));\n vec3 p0 = convertShapeUvToUvSpace(coordP0 * tileSize);\n vec3 p1 = convertShapeUvToUvSpace(coordP1 * tileSize);\n\n return Box(p0, p1);\n}\n\nvec3 getBoxNormal(in Box box, in Ray ray, in float t)\n{\n vec3 hitPoint = ray.pos + t * ray.dir;\n vec3 lower = step(hitPoint, box.p0);\n vec3 upper = step(box.p1, hitPoint);\n return normalize(upper - lower);\n}\n\n// Find the distances along a ray at which the ray intersects an axis-aligned box\n// See https://tavianator.com/2011/ray_box.html\nRayShapeIntersection intersectBox(in Ray ray, in Box box)\n{\n // Consider the box as the intersection of the space between 3 pairs of parallel planes\n // Compute the distance along the ray to each plane\n vec3 t0 = (box.p0 - ray.pos) * ray.dInv;\n vec3 t1 = (box.p1 - ray.pos) * ray.dInv;\n\n // Identify candidate entries/exits based on distance from ray.pos\n vec3 entries = min(t0, t1);\n vec3 exits = max(t0, t1);\n\n // The actual box intersection points are the furthest entry and the closest exit\n float entryT = max(max(entries.x, entries.y), entries.z);\n float exitT = min(min(exits.x, exits.y), exits.z);\n\n vec3 entryNormal = getBoxNormal(box, ray, entryT - RAY_SHIFT);\n vec3 exitNormal = getBoxNormal(box, ray, exitT + RAY_SHIFT);\n\n if (entryT > exitT) {\n entryT = NO_HIT;\n exitT = NO_HIT;\n }\n\n return RayShapeIntersection(vec4(entryNormal, entryT), vec4(exitNormal, exitT));\n}\n\nvoid intersectShape(in Ray ray, inout Intersections ix)\n{\n RayShapeIntersection intersection = intersectBox(ray, Box(u_renderMinBounds, u_renderMaxBounds));\n setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection);\n}\n",Ak])):"CYLINDER"===a?t.addFragmentLines(["// See IntersectionUtils.glsl for the definitions of Ray, setIntersection,\n// setIntersectionPair\n\n/* Cylinder defines (set in Scene/VoxelCylinderShape.js)\n#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN\n#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MAX\n#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT\n#define CYLINDER_HAS_RENDER_BOUNDS_HEIGHT\n#define CYLINDER_HAS_RENDER_BOUNDS_HEIGHT_FLAT\n#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE\n#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF\n#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF\n#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_HALF\n#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO\n\n#define CYLINDER_HAS_SHAPE_BOUNDS_RADIUS\n#define CYLINDER_HAS_SHAPE_BOUNDS_RADIUS_FLAT\n#define CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT\n#define CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT_FLAT\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_RANGE_EQUAL_ZERO\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED\n\n#define CYLINDER_INTERSECTION_INDEX_RADIUS_MAX\n#define CYLINDER_INTERSECTION_INDEX_RADIUS_MIN\n#define CYLINDER_INTERSECTION_INDEX_ANGLE\n*/\n\n// Cylinder uniforms\n#if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MAX) || defined(CYLINDER_HAS_RENDER_BOUNDS_HEIGHT)\n uniform vec3 u_cylinderUvToRenderBoundsScale;\n uniform vec3 u_cylinderUvToRenderBoundsTranslate;\n#endif\n#if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN) && !defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT)\n uniform float u_cylinderUvToRenderRadiusMin;\n#endif\n#if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE)\n uniform vec2 u_cylinderRenderAngleMinMax;\n#endif\n\nvec4 intersectHalfPlane(Ray ray, float angle) {\n vec2 o = ray.pos.xy;\n vec2 d = ray.dir.xy;\n vec2 planeDirection = vec2(cos(angle), sin(angle));\n vec2 planeNormal = vec2(planeDirection.y, -planeDirection.x);\n\n float a = dot(o, planeNormal);\n float b = dot(d, planeNormal);\n float t = -a / b;\n\n vec2 p = o + t * d;\n bool outside = dot(p, planeDirection) < 0.0;\n if (outside) return vec4(-INF_HIT, +INF_HIT, NO_HIT, NO_HIT);\n\n return vec4(-INF_HIT, t, t, +INF_HIT);\n}\n\n#define POSITIVE_HIT vec2(t, +INF_HIT);\n#define NEGATIVE_HIT vec2(-INF_HIT, t);\n\nvec2 intersectHalfSpace(Ray ray, float angle)\n{\n vec2 o = ray.pos.xy;\n vec2 d = ray.dir.xy;\n vec2 n = vec2(sin(angle), -cos(angle));\n\n float a = dot(o, n);\n float b = dot(d, n);\n float t = -a / b;\n float s = sign(a);\n\n // Half space cuts right through the camera, pick the side to intersect\n if (a == 0.0) {\n if (b >= 0.0) {\n return POSITIVE_HIT;\n } else {\n return NEGATIVE_HIT;\n }\n }\n\n if (t >= 0.0 != s >= 0.0) {\n return POSITIVE_HIT;\n } else {\n return NEGATIVE_HIT;\n }\n}\n\nvec2 intersectRegularWedge(Ray ray, float minAngle, float maxAngle)\n{\n vec2 o = ray.pos.xy;\n vec2 d = ray.dir.xy;\n vec2 n1 = vec2(sin(minAngle), -cos(minAngle));\n vec2 n2 = vec2(-sin(maxAngle), cos(maxAngle));\n\n float a1 = dot(o, n1);\n float a2 = dot(o, n2);\n float b1 = dot(d, n1);\n float b2 = dot(d, n2);\n\n float t1 = -a1 / b1;\n float t2 = -a2 / b2;\n float s1 = sign(a1);\n float s2 = sign(a2);\n\n float tmin = min(t1, t2);\n float tmax = max(t1, t2);\n float smin = tmin == t1 ? s1 : s2;\n float smax = tmin == t1 ? s2 : s1;\n\n bool e = tmin >= 0.0;\n bool f = tmax >= 0.0;\n bool g = smin >= 0.0;\n bool h = smax >= 0.0;\n\n if (e != g && f == h) return vec2(tmin, tmax);\n else if (e == g && f == h) return vec2(-INF_HIT, tmin);\n else if (e != g && f != h) return vec2(tmax, +INF_HIT);\n else return vec2(NO_HIT);\n}\n\nvec4 intersectFlippedWedge(Ray ray, float minAngle, float maxAngle)\n{\n vec2 planeIntersectMin = intersectHalfSpace(ray, minAngle);\n vec2 planeIntersectMax = intersectHalfSpace(ray, maxAngle + czm_pi);\n return vec4(planeIntersectMin, planeIntersectMax);\n}\n\nvec2 intersectUnitCylinder(Ray ray)\n{\n vec3 o = ray.pos;\n vec3 d = ray.dir;\n\n float a = dot(d.xy, d.xy);\n float b = dot(o.xy, d.xy);\n float c = dot(o.xy, o.xy) - 1.0;\n float det = b * b - a * c;\n\n if (det < 0.0) {\n return vec2(NO_HIT);\n }\n\n det = sqrt(det);\n float ta = (-b - det) / a;\n float tb = (-b + det) / a;\n float t1 = min(ta, tb);\n float t2 = max(ta, tb);\n\n float z1 = o.z + t1 * d.z;\n float z2 = o.z + t2 * d.z;\n\n if (abs(z1) >= 1.0)\n {\n float tCap = (sign(z1) - o.z) / d.z;\n t1 = abs(b + a * tCap) < det ? tCap : NO_HIT;\n }\n\n if (abs(z2) >= 1.0)\n {\n float tCap = (sign(z2) - o.z) / d.z;\n t2 = abs(b + a * tCap) < det ? tCap : NO_HIT;\n }\n\n return vec2(t1, t2);\n}\n\nvec2 intersectUnitCircle(Ray ray) {\n vec3 o = ray.pos;\n vec3 d = ray.dir;\n\n float t = -o.z / d.z;\n vec2 zPlanePos = o.xy + d.xy * t;\n float distSqr = dot(zPlanePos, zPlanePos);\n\n if (distSqr > 1.0) {\n return vec2(NO_HIT);\n }\n\n return vec2(t, t);\n}\n\nvec2 intersectInfiniteUnitCylinder(Ray ray)\n{\n vec3 o = ray.pos;\n vec3 d = ray.dir;\n\n float a = dot(d.xy, d.xy);\n float b = dot(o.xy, d.xy);\n float c = dot(o.xy, o.xy) - 1.0;\n float det = b * b - a * c;\n\n if (det < 0.0) {\n return vec2(NO_HIT);\n }\n\n det = sqrt(det);\n float t1 = (-b - det) / a;\n float t2 = (-b + det) / a;\n float tmin = min(t1, t2);\n float tmax = max(t1, t2);\n\n return vec2(tmin, tmax);\n}\n\nvoid intersectShape(Ray ray, inout Intersections ix)\n{\n #if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MAX) || defined(CYLINDER_HAS_RENDER_BOUNDS_HEIGHT)\n ray.pos = ray.pos * u_cylinderUvToRenderBoundsScale + u_cylinderUvToRenderBoundsTranslate;\n ray.dir *= u_cylinderUvToRenderBoundsScale;\n #else\n // Position is converted from [0,1] to [-1,+1] because shape intersections assume unit space is [-1,+1].\n // Direction is scaled as well to be in sync with position.\n ray.pos = ray.pos * 2.0 - 1.0;\n ray.dir *= 2.0;\n #endif\n\n #if defined(CYLINDER_HAS_RENDER_BOUNDS_HEIGHT_FLAT)\n vec2 outerIntersect = intersectUnitCircle(ray);\n #else\n vec2 outerIntersect = intersectUnitCylinder(ray);\n #endif\n\n setIntersectionPair(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MAX, outerIntersect);\n\n if (outerIntersect.x == NO_HIT) {\n return;\n }\n\n #if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT)\n // When the cylinder is perfectly thin it's necessary to sandwich the\n // inner cylinder intersection inside the outer cylinder intersection.\n\n // Without this special case,\n // [outerMin, outerMax, innerMin, innerMax] will bubble sort to\n // [outerMin, innerMin, outerMax, innerMax] which will cause the back\n // side of the cylinder to be invisible because it will think the ray\n // is still inside the inner (negative) cylinder after exiting the\n // outer (positive) cylinder.\n\n // With this special case,\n // [outerMin, innerMin, innerMax, outerMax] will bubble sort to\n // [outerMin, innerMin, innerMax, outerMax] which will work correctly.\n\n // Note: If initializeIntersections() changes its sorting function\n // from bubble sort to something else, this code may need to change.\n vec2 innerIntersect = intersectInfiniteUnitCylinder(ray);\n setIntersection(ix, 0, outerIntersect.x, true, true); // positive, enter\n setIntersection(ix, 1, innerIntersect.x, false, true); // negative, enter\n setIntersection(ix, 2, innerIntersect.y, false, false); // negative, exit\n setIntersection(ix, 3, outerIntersect.y, true, false); // positive, exit\n #elif defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN)\n Ray innerRay = Ray(ray.pos * u_cylinderUvToRenderRadiusMin, ray.dir * u_cylinderUvToRenderRadiusMin);\n vec2 innerIntersect = intersectInfiniteUnitCylinder(innerRay);\n setIntersectionPair(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MIN, innerIntersect);\n #endif\n\n #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF)\n vec2 wedgeIntersect = intersectRegularWedge(ray, u_cylinderRenderAngleMinMax.x, u_cylinderRenderAngleMinMax.y);\n setIntersectionPair(ix, CYLINDER_INTERSECTION_INDEX_ANGLE, wedgeIntersect);\n #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF)\n vec4 wedgeIntersect = intersectFlippedWedge(ray, u_cylinderRenderAngleMinMax.x, u_cylinderRenderAngleMinMax.y);\n setIntersectionPair(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersect.xy);\n setIntersectionPair(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersect.zw);\n #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_HALF)\n vec2 wedgeIntersect = intersectHalfSpace(ray, u_cylinderRenderAngleMinMax.x);\n setIntersectionPair(ix, CYLINDER_INTERSECTION_INDEX_ANGLE, wedgeIntersect);\n #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO)\n vec4 wedgeIntersect = intersectHalfPlane(ray, u_cylinderRenderAngleMinMax.x);\n setIntersectionPair(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersect.xy);\n setIntersectionPair(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersect.zw);\n #endif\n}\n",Ak,"/* Cylinder defines (set in Scene/VoxelCylinderShape.js)\n#define CYLINDER_HAS_SHAPE_BOUNDS_RADIUS\n#define CYLINDER_HAS_SHAPE_BOUNDS_RADIUS_FLAT\n#define CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT\n#define CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT_FLAT\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_RANGE_EQUAL_ZERO\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED\n*/\n\n#if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)\n uniform vec2 u_cylinderUvToShapeUvRadius; // x = scale, y = offset\n#endif\n#if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)\n uniform vec2 u_cylinderUvToShapeUvHeight; // x = scale, y = offset\n#endif\n#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)\n uniform vec2 u_cylinderUvToShapeUvAngle; // x = scale, y = offset\n#endif\n#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY)\n uniform vec2 u_cylinderShapeUvAngleMinMax;\n#endif\n#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED)\n uniform float u_cylinderShapeUvAngleRangeZeroMid;\n#endif\n\nvec3 convertUvToShapeUvSpace(in vec3 positionUv) {\n vec3 positionLocal = positionUv * 2.0 - 1.0; // [-1,+1]\n\n // Compute radius\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS_FLAT)\n float radius = 1.0;\n #else\n float radius = length(positionLocal.xy); // [0,1]\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)\n radius = radius * u_cylinderUvToShapeUvRadius.x + u_cylinderUvToShapeUvRadius.y; // x = scale, y = offset\n #endif\n #endif\n\n // Compute height\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT_FLAT)\n float height = 1.0;\n #else\n float height = positionUv.z; // [0,1]\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)\n height = height * u_cylinderUvToShapeUvHeight.x + u_cylinderUvToShapeUvHeight.y; // x = scale, y = offset\n #endif\n #endif\n\n // Compute angle\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_RANGE_EQUAL_ZERO)\n float angle = 1.0;\n #else\n float angle = (atan(positionLocal.y, positionLocal.x) + czm_pi) / czm_twoPi; // [0,1]\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED)\n // Comparing against u_cylinderShapeUvAngleMinMax has precision problems. u_cylinderShapeUvAngleRangeZeroMid is more conservative.\n angle += float(angle < u_cylinderShapeUvAngleRangeZeroMid);\n #endif\n\n // Avoid flickering from reading voxels from both sides of the -pi/+pi discontinuity.\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY)\n angle = angle > u_cylinderShapeUvAngleRangeZeroMid ? u_cylinderShapeUvAngleMinMax.x : angle;\n #elif defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY)\n angle = angle < u_cylinderShapeUvAngleRangeZeroMid ? u_cylinderShapeUvAngleMinMax.y : angle;\n #endif\n\n angle = angle * u_cylinderUvToShapeUvAngle.x + u_cylinderUvToShapeUvAngle.y; // x = scale, y = offset\n #endif\n #endif\n\n return vec3(radius, height, angle);\n}\n"]):"ELLIPSOID"===a&&t.addFragmentLines(["// See IntersectionUtils.glsl for the definitions of Ray, Intersections,\n// setIntersection, setIntersectionPair, INF_HIT, NO_HIT\n\n/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_MAX\n#define ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_MIN\n#define ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_FLAT\n#define ELLIPSOID_INTERSECTION_INDEX_LONGITUDE\n#define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX\n#define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN\n#define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX\n#define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN\n*/\n\n#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE)\n uniform vec2 u_ellipsoidRenderLongitudeMinMax;\n#endif\n#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF)\n uniform vec2 u_ellipsoidRenderLatitudeCosSqrHalfMinMax;\n#endif\n#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_MAX)\n uniform float u_ellipsoidInverseOuterScaleUv;\n#endif\n#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_MIN)\n uniform float u_ellipsoidInverseInnerScaleUv;\n#endif\n\nvec2 intersectZPlane(Ray ray)\n{\n float o = ray.pos.z;\n float d = ray.dir.z;\n float t = -o / d;\n float s = sign(o);\n\n if (t >= 0.0 != s >= 0.0) return vec2(t, +INF_HIT);\n else return vec2(-INF_HIT, t);\n}\n\nvec4 intersectHalfPlane(Ray ray, float angle) {\n vec2 o = ray.pos.xy;\n vec2 d = ray.dir.xy;\n vec2 planeDirection = vec2(cos(angle), sin(angle));\n vec2 planeNormal = vec2(planeDirection.y, -planeDirection.x);\n\n float a = dot(o, planeNormal);\n float b = dot(d, planeNormal);\n float t = -a / b;\n\n vec2 p = o + t * d;\n bool outside = dot(p, planeDirection) < 0.0;\n if (outside) return vec4(-INF_HIT, +INF_HIT, NO_HIT, NO_HIT);\n\n return vec4(-INF_HIT, t, t, +INF_HIT);\n}\n\nvec2 intersectHalfSpace(Ray ray, float angle)\n{\n vec2 o = ray.pos.xy;\n vec2 d = ray.dir.xy;\n vec2 n = vec2(sin(angle), -cos(angle));\n\n float a = dot(o, n);\n float b = dot(d, n);\n float t = -a / b;\n float s = sign(a);\n\n if (t >= 0.0 != s >= 0.0) return vec2(t, +INF_HIT);\n else return vec2(-INF_HIT, t);\n}\n\nvec2 intersectRegularWedge(Ray ray, float minAngle, float maxAngle)\n{\n vec2 o = ray.pos.xy;\n vec2 d = ray.dir.xy;\n vec2 n1 = vec2(sin(minAngle), -cos(minAngle));\n vec2 n2 = vec2(-sin(maxAngle), cos(maxAngle));\n\n float a1 = dot(o, n1);\n float a2 = dot(o, n2);\n float b1 = dot(d, n1);\n float b2 = dot(d, n2);\n\n float t1 = -a1 / b1;\n float t2 = -a2 / b2;\n float s1 = sign(a1);\n float s2 = sign(a2);\n\n float tmin = min(t1, t2);\n float tmax = max(t1, t2);\n float smin = tmin == t1 ? s1 : s2;\n float smax = tmin == t1 ? s2 : s1;\n\n bool e = tmin >= 0.0;\n bool f = tmax >= 0.0;\n bool g = smin >= 0.0;\n bool h = smax >= 0.0;\n\n if (e != g && f == h) return vec2(tmin, tmax);\n else if (e == g && f == h) return vec2(-INF_HIT, tmin);\n else if (e != g && f != h) return vec2(tmax, +INF_HIT);\n else return vec2(NO_HIT);\n}\n\nvec4 intersectFlippedWedge(Ray ray, float minAngle, float maxAngle)\n{\n vec2 planeIntersectMin = intersectHalfSpace(ray, minAngle);\n vec2 planeIntersectMax = intersectHalfSpace(ray, maxAngle + czm_pi);\n return vec4(planeIntersectMin, planeIntersectMax);\n}\n\nvec2 intersectUnitSphere(Ray ray)\n{\n vec3 o = ray.pos;\n vec3 d = ray.dir;\n\n float b = dot(d, o);\n float c = dot(o, o) - 1.0;\n float det = b * b - c;\n\n if (det < 0.0) {\n return vec2(NO_HIT);\n }\n\n det = sqrt(det);\n float t1 = -b - det;\n float t2 = -b + det;\n float tmin = min(t1, t2);\n float tmax = max(t1, t2);\n\n return vec2(tmin, tmax);\n}\n\nvec2 intersectUnitSphereUnnormalizedDirection(Ray ray)\n{\n vec3 o = ray.pos;\n vec3 d = ray.dir;\n\n float a = dot(d, d);\n float b = dot(d, o);\n float c = dot(o, o) - 1.0;\n float det = b * b - a * c;\n\n if (det < 0.0) {\n return vec2(NO_HIT);\n }\n\n det = sqrt(det);\n float t1 = (-b - det) / a;\n float t2 = (-b + det) / a;\n float tmin = min(t1, t2);\n float tmax = max(t1, t2);\n\n return vec2(tmin, tmax);\n}\n\nvec2 intersectDoubleEndedCone(Ray ray, float cosSqrHalfAngle)\n{\n vec3 o = ray.pos;\n vec3 d = ray.dir;\n float a = d.z * d.z - dot(d, d) * cosSqrHalfAngle;\n float b = d.z * o.z - dot(o, d) * cosSqrHalfAngle;\n float c = o.z * o.z - dot(o, o) * cosSqrHalfAngle;\n float det = b * b - a * c;\n\n if (det < 0.0) {\n return vec2(NO_HIT);\n }\n\n det = sqrt(det);\n float t1 = (-b - det) / a;\n float t2 = (-b + det) / a;\n float tmin = min(t1, t2);\n float tmax = max(t1, t2);\n return vec2(tmin, tmax);\n}\n\nvec4 intersectFlippedCone(Ray ray, float cosSqrHalfAngle) {\n vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);\n\n if (intersect.x == NO_HIT) {\n return vec4(-INF_HIT, +INF_HIT, NO_HIT, NO_HIT);\n }\n\n vec3 o = ray.pos;\n vec3 d = ray.dir;\n float tmin = intersect.x;\n float tmax = intersect.y;\n float zmin = o.z + tmin * d.z;\n float zmax = o.z + tmax * d.z;\n\n // One interval\n if (zmin < 0.0 && zmax < 0.0) return vec4(-INF_HIT, +INF_HIT, NO_HIT, NO_HIT);\n else if (zmin < 0.0) return vec4(-INF_HIT, tmax, NO_HIT, NO_HIT);\n else if (zmax < 0.0) return vec4(tmin, +INF_HIT, NO_HIT, NO_HIT);\n // Two intervals\n else return vec4(-INF_HIT, tmin, tmax, +INF_HIT);\n}\n\nvec2 intersectRegularCone(Ray ray, float cosSqrHalfAngle) {\n vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);\n\n if (intersect.x == NO_HIT) {\n return vec2(NO_HIT);\n }\n\n vec3 o = ray.pos;\n vec3 d = ray.dir;\n float tmin = intersect.x;\n float tmax = intersect.y;\n float zmin = o.z + tmin * d.z;\n float zmax = o.z + tmax * d.z;\n\n if (zmin < 0.0 && zmax < 0.0) return vec2(NO_HIT);\n else if (zmin < 0.0) return vec2(tmax, +INF_HIT);\n else if (zmax < 0.0) return vec2(-INF_HIT, tmin);\n else return vec2(tmin, tmax);\n}\n\nvoid intersectShape(in Ray ray, inout Intersections ix) {\n // Position is converted from [0,1] to [-1,+1] because shape intersections assume unit space is [-1,+1].\n // Direction is scaled as well to be in sync with position.\n ray.pos = ray.pos * 2.0 - 1.0;\n ray.dir *= 2.0;\n\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_MAX)\n Ray outerRay = Ray(ray.pos * u_ellipsoidInverseOuterScaleUv, ray.dir * u_ellipsoidInverseOuterScaleUv);\n #else\n Ray outerRay = ray;\n #endif\n\n // Outer ellipsoid\n vec2 outerIntersect = intersectUnitSphereUnnormalizedDirection(outerRay);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX, outerIntersect);\n\n // Exit early if the outer ellipsoid was missed.\n if (outerIntersect.x == NO_HIT) {\n return;\n }\n\n // Inner ellipsoid\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_FLAT)\n // When the ellipsoid is perfectly thin it's necessary to sandwich the\n // inner ellipsoid intersection inside the outer ellipsoid intersection.\n\n // Without this special case,\n // [outerMin, outerMax, innerMin, innerMax] will bubble sort to\n // [outerMin, innerMin, outerMax, innerMax] which will cause the back\n // side of the ellipsoid to be invisible because it will think the ray\n // is still inside the inner (negative) ellipsoid after exiting the\n // outer (positive) ellipsoid.\n\n // With this special case,\n // [outerMin, innerMin, innerMax, outerMax] will bubble sort to\n // [outerMin, innerMin, innerMax, outerMax] which will work correctly.\n\n // Note: If initializeIntersections() changes its sorting function\n // from bubble sort to something else, this code may need to change.\n setIntersection(ix, 0, outerIntersect.x, true, true); // positive, enter\n setIntersection(ix, 1, outerIntersect.x, false, true); // negative, enter\n setIntersection(ix, 2, outerIntersect.y, false, false); // negative, exit\n setIntersection(ix, 3, outerIntersect.y, true, false); // positive, exit\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_MIN)\n Ray innerRay = Ray(ray.pos * u_ellipsoidInverseInnerScaleUv, ray.dir * u_ellipsoidInverseInnerScaleUv);\n vec2 innerIntersect = intersectUnitSphereUnnormalizedDirection(innerRay);\n\n if (innerIntersect == vec2(NO_HIT)) {\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN, innerIntersect);\n } else {\n // When the ellipsoid is very large and thin it's possible for floating\n // point math to cause the ray to intersect the inner ellipsoid before\n // the outer ellipsoid. To prevent this from happening, clamp innerIntersect\n // to outerIntersect and sandwhich the intersections like described above.\n //\n // In theory a similar fix is needed for cylinders, however it's more\n // complicated to implement because the inner shape is allowed to be\n // intersected first.\n innerIntersect.x = max(innerIntersect.x, outerIntersect.x);\n innerIntersect.y = min(innerIntersect.y, outerIntersect.y);\n setIntersection(ix, 0, outerIntersect.x, true, true); // positive, enter\n setIntersection(ix, 1, innerIntersect.x, false, true); // negative, enter\n setIntersection(ix, 2, innerIntersect.y, false, false); // negative, exit\n setIntersection(ix, 3, outerIntersect.y, true, false); // positive, exit\n }\n #endif\n\n // Flip the ray because the intersection function expects a cone growing towards +Z.\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF)\n Ray flippedRay = outerRay;\n flippedRay.dir.z *= -1.0;\n flippedRay.pos.z *= -1.0;\n #endif\n\n // Bottom cone\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF)\n vec2 bottomConeIntersection = intersectRegularCone(flippedRay, u_ellipsoidRenderLatitudeCosSqrHalfMinMax.x);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF)\n vec2 bottomConeIntersection = intersectZPlane(flippedRay);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF)\n vec4 bottomConeIntersection = intersectFlippedCone(ray, u_ellipsoidRenderLatitudeCosSqrHalfMinMax.x);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 0, bottomConeIntersection.xy);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 1, bottomConeIntersection.zw);\n #endif\n\n // Top cone\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF)\n vec4 topConeIntersection = intersectFlippedCone(flippedRay, u_ellipsoidRenderLatitudeCosSqrHalfMinMax.y);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 0, topConeIntersection.xy);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 1, topConeIntersection.zw);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF)\n vec2 topConeIntersection = intersectZPlane(ray);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF)\n vec2 topConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeCosSqrHalfMinMax.y);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);\n #endif\n\n // Wedge\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO)\n vec4 wedgeIntersect = intersectHalfPlane(ray, u_ellipsoidRenderLongitudeMinMax.x);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersect.xy);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersect.zw);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF)\n vec2 wedgeIntersect = intersectRegularWedge(ray, u_ellipsoidRenderLongitudeMinMax.x, u_ellipsoidRenderLongitudeMinMax.y);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE, wedgeIntersect);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_HALF)\n vec2 wedgeIntersect = intersectHalfSpace(ray, u_ellipsoidRenderLongitudeMinMax.x);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE, wedgeIntersect);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF)\n vec4 wedgeIntersect = intersectFlippedWedge(ray, u_ellipsoidRenderLongitudeMinMax.x, u_ellipsoidRenderLongitudeMinMax.y);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersect.xy);\n setIntersectionPair(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersect.zw);\n #endif\n}\n",Ak,'/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY\n#define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE\n#define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO\n#define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED\n#define ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE\n#define ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE_RANGE_EQUAL_ZERO\n#define ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_MIN\n#define ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_FLAT\n#define ELLIPSOID_IS_SPHERE\n*/\n\nuniform vec3 u_ellipsoidRadiiUv; // [0,1]\n#if !defined(ELLIPSOID_IS_SPHERE)\n uniform vec3 u_ellipsoidInverseRadiiSquaredUv;\n#endif\n#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY) || defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED)\n uniform vec3 u_ellipsoidShapeUvLongitudeMinMaxMid;\n#endif\n#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)\n uniform vec2 u_ellipsoidUvToShapeUvLongitude; // x = scale, y = offset\n#endif\n#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)\n uniform vec2 u_ellipsoidUvToShapeUvLatitude; // x = scale, y = offset\n#endif\n#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_MIN) && !defined(ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_FLAT)\n uniform float u_ellipsoidInverseHeightDifferenceUv;\n uniform vec2 u_ellipseInnerRadiiUv; // [0,1]\n#endif\n\n// robust iterative solution without trig functions\n// https://github.com/0xfaded/ellipse_demo/issues/1\n// https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse\n// Pro: Good when radii.x ~= radii.y\n// Con: Breaks at pos.x ~= 0.0, especially inside the ellipse\n// Con: Inaccurate with exterior points and thin ellipses\nfloat ellipseDistanceIterative (vec2 pos, vec2 radii) {\n vec2 p = abs(pos);\n vec2 invRadii = 1.0 / radii;\n vec2 a = vec2(1.0, -1.0) * (radii.x * radii.x - radii.y * radii.y) * invRadii;\n vec2 t = vec2(0.70710678118); // sqrt(2) / 2\n vec2 v = radii * t;\n\n const int iterations = 3;\n for (int i = 0; i < iterations; ++i) {\n vec2 e = a * pow(t, vec2(3.0));\n vec2 q = normalize(p - e) * length(v - e);\n t = normalize((q + e) * invRadii);\n v = radii * t;\n }\n return length(v * sign(pos) - pos) * sign(p.y - v.y);\n}\n\nvec3 convertUvToShapeUvSpace(in vec3 positionUv) {\n // Compute position and normal.\n // Convert positionUv [0,1] to local space [-1,+1] to "normalized" cartesian space [-a,+a] where a = (radii + height) / (max(radii) + height).\n // A point on the largest ellipsoid axis would be [-1,+1] and everything else would be smaller.\n vec3 positionLocal = positionUv * 2.0 - 1.0;\n #if defined(ELLIPSOID_IS_SPHERE)\n vec3 posEllipsoid = positionLocal * u_ellipsoidRadiiUv.x;\n vec3 normal = normalize(posEllipsoid);\n #else\n vec3 posEllipsoid = positionLocal * u_ellipsoidRadiiUv;\n vec3 normal = normalize(posEllipsoid * u_ellipsoidInverseRadiiSquaredUv); // geodetic surface normal\n #endif\n\n // Compute longitude\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO)\n float longitude = 1.0;\n #else\n float longitude = (atan(normal.y, normal.x) + czm_pi) / czm_twoPi;\n\n // Correct the angle when max < min\n // Technically this should compare against min longitude - but it has precision problems so compare against the middle of empty space.\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED)\n longitude += float(longitude < u_ellipsoidShapeUvLongitudeMinMaxMid.z);\n #endif\n\n // Avoid flickering from reading voxels from both sides of the -pi/+pi discontinuity.\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY)\n longitude = longitude > u_ellipsoidShapeUvLongitudeMinMaxMid.z ? u_ellipsoidShapeUvLongitudeMinMaxMid.x : longitude;\n #endif\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY)\n longitude = longitude < u_ellipsoidShapeUvLongitudeMinMaxMid.z ? u_ellipsoidShapeUvLongitudeMinMaxMid.y : longitude;\n #endif\n\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)\n longitude = longitude * u_ellipsoidUvToShapeUvLongitude.x + u_ellipsoidUvToShapeUvLongitude.y;\n #endif\n #endif\n\n // Compute latitude\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE_RANGE_EQUAL_ZERO)\n float latitude = 1.0;\n #else\n float latitude = (asin(normal.z) + czm_piOverTwo) / czm_pi;\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)\n latitude = latitude * u_ellipsoidUvToShapeUvLatitude.x + u_ellipsoidUvToShapeUvLatitude.y;\n #endif\n #endif\n\n // Compute height\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_FLAT)\n // TODO: This breaks down when minBounds == maxBounds. To fix it, this\n // function would have to know if ray is intersecting the front or back of the shape\n // and set the shape space position to 1 (front) or 0 (back) accordingly.\n float height = 1.0;\n #else\n #if defined(ELLIPSOID_IS_SPHERE)\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_MIN)\n float height = (length(posEllipsoid) - u_ellipseInnerRadiiUv.x) * u_ellipsoidInverseHeightDifferenceUv;\n #else\n float height = length(posEllipsoid);\n #endif\n #else\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_MIN)\n // Convert the 3D position to a 2D position relative to the ellipse (radii.x, radii.z) (assuming radii.x == radii.y which is true for WGS84).\n // This is an optimization so that math can be done with ellipses instead of ellipsoids.\n vec2 posEllipse = vec2(length(posEllipsoid.xy), posEllipsoid.z);\n float height = ellipseDistanceIterative(posEllipse, u_ellipseInnerRadiiUv) * u_ellipsoidInverseHeightDifferenceUv;\n #else\n // TODO: this is probably not correct\n float height = length(posEllipsoid);\n #endif\n #endif\n #endif\n\n return vec3(longitude, latitude, height);\n}\n']),t.addFragmentLines(["// See Intersection.glsl for the definition of intersectScene\n// See IntersectionUtils.glsl for the definition of nextIntersection\n// See convertUvToBox.glsl, convertUvToCylinder.glsl, or convertUvToEllipsoid.glsl\n// for the definition of convertUvToShapeUvSpace. The appropriate function is \n// selected based on the VoxelPrimitive shape type, and added to the shader in\n// Scene/VoxelRenderResources.js.\n// See Octree.glsl for the definitions of TraversalData, SampleData,\n// traverseOctreeFromBeginning, and traverseOctreeFromExisting\n// See Megatexture.glsl for the definition of accumulatePropertiesFromMegatexture\n\n#define STEP_COUNT_MAX 1000 // Harcoded value because GLSL doesn't like variable length loops\n#define ALPHA_ACCUM_MAX 0.98 // Must be > 0.0 and <= 1.0\n\nuniform mat3 u_transformDirectionViewToLocal;\nuniform vec3 u_cameraPositionUv;\nuniform float u_stepSize;\n\n#if defined(PICKING)\n uniform vec4 u_pickColor;\n#endif\n\n#if defined(JITTER)\nfloat hash(vec2 p)\n{\n vec3 p3 = fract(vec3(p.xyx) * 50.0); // magic number = hashscale\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n}\n#endif\n\nvec4 getStepSize(in SampleData sampleData, in Ray viewRay, in RayShapeIntersection shapeIntersection) {\n#if defined(SHAPE_BOX)\n Box voxelBox = constructVoxelBox(sampleData.tileCoords, sampleData.tileUv);\n RayShapeIntersection voxelIntersection = intersectBox(viewRay, voxelBox);\n vec4 entry = shapeIntersection.entry.w >= voxelIntersection.entry.w ? shapeIntersection.entry : voxelIntersection.entry;\n float exit = min(voxelIntersection.exit.w, shapeIntersection.exit.w);\n float dt = (exit - entry.w) * RAY_SCALE;\n return vec4(normalize(entry.xyz), dt);\n#else\n float dimAtLevel = pow(2.0, float(sampleData.tileCoords.w));\n return vec4(viewRay.dir, u_stepSize / dimAtLevel);\n#endif\n}\n\nvoid main()\n{\n vec4 fragCoord = gl_FragCoord;\n vec2 screenCoord = (fragCoord.xy - czm_viewport.xy) / czm_viewport.zw; // [0,1]\n vec3 eyeDirection = normalize(czm_windowToEyeCoordinates(fragCoord).xyz);\n vec3 viewDirWorld = normalize(czm_inverseViewRotation * eyeDirection); // normalize again just in case\n vec3 viewDirUv = normalize(u_transformDirectionViewToLocal * eyeDirection); // normalize again just in case\n vec3 viewPosUv = u_cameraPositionUv;\n #if defined(SHAPE_BOX)\n vec3 dInv = 1.0 / viewDirUv;\n Ray viewRayUv = Ray(viewPosUv, viewDirUv, dInv);\n #else\n Ray viewRayUv = Ray(viewPosUv, viewDirUv);\n #endif\n\n Intersections ix;\n RayShapeIntersection shapeIntersection = intersectScene(screenCoord, viewRayUv, ix);\n\n // Exit early if the scene was completely missed.\n if (shapeIntersection.entry.w == NO_HIT) {\n discard;\n }\n\n float currT = shapeIntersection.entry.w * RAY_SCALE;\n float endT = shapeIntersection.exit.w;\n vec3 positionUv = viewPosUv + currT * viewDirUv;\n vec3 positionUvShapeSpace = convertUvToShapeUvSpace(positionUv);\n\n // Traverse the tree from the start position\n TraversalData traversalData;\n SampleData sampleDatas[SAMPLE_COUNT];\n traverseOctreeFromBeginning(positionUvShapeSpace, traversalData, sampleDatas);\n vec4 step = getStepSize(sampleDatas[0], viewRayUv, shapeIntersection);\n\n #if defined(JITTER)\n float noise = hash(screenCoord); // [0,1]\n currT += noise * step.w;\n positionUv += noise * step.w * viewDirUv;\n #endif\n\n FragmentInput fragmentInput;\n #if defined(STATISTICS)\n setStatistics(fragmentInput.metadata.statistics);\n #endif\n\n vec4 colorAccum =vec4(0.0);\n\n for (int stepCount = 0; stepCount < STEP_COUNT_MAX; ++stepCount) {\n // Read properties from the megatexture based on the traversal state\n Properties properties = accumulatePropertiesFromMegatexture(sampleDatas);\n\n // Prepare the custom shader inputs\n copyPropertiesToMetadata(properties, fragmentInput.metadata);\n fragmentInput.voxel.positionUv = positionUv;\n fragmentInput.voxel.positionShapeUv = positionUvShapeSpace;\n fragmentInput.voxel.positionUvLocal = sampleDatas[0].tileUv;\n fragmentInput.voxel.viewDirUv = viewDirUv;\n fragmentInput.voxel.viewDirWorld = viewDirWorld;\n fragmentInput.voxel.surfaceNormal = step.xyz;\n fragmentInput.voxel.travelDistance = step.w;\n\n // Run the custom shader\n czm_modelMaterial materialOutput;\n fragmentMain(fragmentInput, materialOutput);\n\n // Sanitize the custom shader output\n vec4 color = vec4(materialOutput.diffuse, materialOutput.alpha);\n color.rgb = max(color.rgb, vec3(0.0));\n color.a = clamp(color.a, 0.0, 1.0);\n\n // Pre-multiplied alpha blend\n colorAccum += (1.0 - colorAccum.a) * vec4(color.rgb * color.a, color.a);\n\n // Stop traversing if the alpha has been fully saturated\n if (colorAccum.a > ALPHA_ACCUM_MAX) {\n colorAccum.a = ALPHA_ACCUM_MAX;\n break;\n }\n\n if (step.w == 0.0) {\n // Shape is infinitely thin. The ray may have hit the edge of a\n // foreground voxel. Step ahead slightly to check for more voxels\n step.w == 0.00001;\n }\n\n // Keep raymarching\n currT += step.w;\n positionUv += step.w * viewDirUv;\n\n // Check if there's more intersections.\n if (currT > endT) {\n #if (INTERSECTION_COUNT == 1)\n break;\n #else\n shapeIntersection = nextIntersection(ix);\n if (shapeIntersection.entry.w == NO_HIT) {\n break;\n } else {\n // Found another intersection. Resume raymarching there\n currT = shapeIntersection.entry.w * RAY_SCALE;\n endT = shapeIntersection.exit.w;\n positionUv = viewPosUv + currT * viewDirUv;\n }\n #endif\n }\n\n // Traverse the tree from the current ray position.\n // This is similar to traverseOctreeFromBeginning but is faster when the ray is in the same tile as the previous step.\n positionUvShapeSpace = convertUvToShapeUvSpace(positionUv);\n traverseOctreeFromExisting(positionUvShapeSpace, traversalData, sampleDatas);\n step = getStepSize(sampleDatas[0], viewRayUv, shapeIntersection);\n }\n\n // Convert the alpha from [0,ALPHA_ACCUM_MAX] to [0,1]\n colorAccum.a /= ALPHA_ACCUM_MAX;\n\n #if defined(PICKING)\n // If alpha is 0.0 there is nothing to pick\n if (colorAccum.a == 0.0) {\n discard;\n }\n out_FragColor = u_pickColor;\n #else\n out_FragColor = colorAccum;\n #endif\n}\n"]);const l=e._shape,u=l.shaderDefines;for(const m in u)if(u.hasOwnProperty(m)){let _=u[m];c(_)&&(_=!0===_?void 0:_,t.addDefine(m,_,Oe.FRAGMENT))}let d=l.shaderMaximumIntersectionsLength;s>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",d,Oe.FRAGMENT),d+=1===s?1:r.unionClippingRegions?2:1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",d,Oe.FRAGMENT),d+=1),t.addDefine("INTERSECTION_COUNT",d,Oe.FRAGMENT),(!f.equals(e.paddingBefore,f.ZERO)||!f.equals(e.paddingAfter,f.ZERO))&&t.addDefine("PADDING",void 0,Oe.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,Oe.FRAGMENT),e._jitter&&t.addDefine("JITTER",void 0,Oe.FRAGMENT),e._nearestSampling&&t.addDefine("NEAREST_SAMPLING",void 0,Oe.FRAGMENT),t.addDefine("SAMPLE_COUNT",`${e._traversal._sampleCount}`,Oe.FRAGMENT)};function t1(e){return e===xn.SCALAR?"float":e===xn.VEC2?"vec2":e===xn.VEC3?"vec3":e===xn.VEC4?"vec4":void 0}function Uet(e){return e===xn.SCALAR?".r":e===xn.VEC2?".ra":e===xn.VEC3?".rgb":e===xn.VEC4?"":void 0}function zet(e){return e===xn.SCALAR?"vec3":e===xn.VEC2?"mat2":e===xn.VEC3?"mat3":e===xn.VEC4?"mat4":void 0}function Lne(e){let t=e.toString();return-1===t.indexOf(".")&&(t=`${e}.0`),t}function Vet(e,t){return e===xn.SCALAR?"":`[${t}]`}const jet=function Get(e,t){const n=new Bet(e);!function ket(e,t){const{shaderBuilder:n}=e,{names:i,types:o,minimumValues:s,maximumValues:a}=t._provider,l=o.length,u=c(s)&&c(a);n.addDefine("METADATA_COUNT",l,Oe.FRAGMENT),u&&n.addDefine("STATISTICS",void 0,Oe.FRAGMENT);for(let R=0;R<l;R++){const B=i[R],F=o[R],S=`PropertyStatistics_${B}`;n.addStruct(S,`PropertyStatistics_${B}`,Oe.FRAGMENT);const L=t1(F);n.addStructField(S,L,"min"),n.addStructField(S,L,"max")}const d="Statistics",h="Statistics",m="statistics";n.addStruct(d,h,Oe.FRAGMENT);for(let R=0;R<l;R++){const B=i[R];n.addStructField(d,`PropertyStatistics_${B}`,B)}const _="Metadata",p="Metadata",y="metadata";n.addStruct(_,p,Oe.FRAGMENT),n.addStructField(_,h,m);for(let R=0;R<l;R++){const B=i[R],S=t1(o[R]);n.addStructField(_,S,B)}for(let R=0;R<l;R++){const B=i[R],S=zet(o[R]),I=`VoxelProperty_${B}`;n.addStruct(I,`VoxelProperty_${B}`,Oe.FRAGMENT),n.addStructField(I,S,"partialDerivativeLocal"),n.addStructField(I,S,"partialDerivativeWorld"),n.addStructField(I,S,"partialDerivativeView"),n.addStructField(I,S,"partialDerivativeValid")}const A="Voxel",x="Voxel";n.addStruct(A,x,Oe.FRAGMENT);for(let R=0;R<l;R++){const B=i[R];n.addStructField(A,`VoxelProperty_${B}`,B)}n.addStructField(A,"vec3","positionEC"),n.addStructField(A,"vec3","positionUv"),n.addStructField(A,"vec3","positionShapeUv"),n.addStructField(A,"vec3","positionUvLocal"),n.addStructField(A,"vec3","viewDirUv"),n.addStructField(A,"vec3","viewDirWorld"),n.addStructField(A,"vec3","surfaceNormal"),n.addStructField(A,"float","travelDistance");const w="FragmentInput";n.addStruct(w,"FragmentInput",Oe.FRAGMENT),n.addStructField(w,p,y),n.addStructField(w,x,"voxel");const D="Properties",P="Properties",N="properties";n.addStruct(D,P,Oe.FRAGMENT);for(let R=0;R<l;R++){const B=i[R],S=t1(o[R]);n.addStructField(D,S,B)}{const R="clearProperties";n.addFunction(R,`${P} clearProperties()`,Oe.FRAGMENT),n.addFunctionLines(R,[`${P} ${N};`]);for(let B=0;B<l;B++){const F=i[B],L=t1(o[B]);n.addFunctionLines(R,[`${N}.${F} = ${L}(0.0);`])}n.addFunctionLines(R,[`return ${N};`])}{const R="sumProperties";n.addFunction(R,`${P} sumProperties(${P} propertiesA, ${P} propertiesB)`,Oe.FRAGMENT),n.addFunctionLines(R,[`${P} ${N};`]);for(let B=0;B<l;B++){const F=i[B];n.addFunctionLines(R,[`${N}.${F} = propertiesA.${F} + propertiesB.${F};`])}n.addFunctionLines(R,[`return ${N};`])}{const R="scaleProperties";n.addFunction(R,`${P} scaleProperties(${P} ${N}, float scale)`,Oe.FRAGMENT),n.addFunctionLines(R,[`${P} scaledProperties = ${N};`]);for(let B=0;B<l;B++)n.addFunctionLines(R,[`scaledProperties.${i[B]} *= scale;`]);n.addFunctionLines(R,["return scaledProperties;"])}{const R="mixProperties";n.addFunction(R,`${P} mixProperties(${P} propertiesA, ${P} propertiesB, float mixFactor)`,Oe.FRAGMENT),n.addFunctionLines(R,[`${P} ${N};`]);for(let B=0;B<l;B++){const F=i[B];n.addFunctionLines(R,[`${N}.${F} = mix(propertiesA.${F}, propertiesB.${F}, mixFactor);`])}n.addFunctionLines(R,[`return ${N};`])}{const R="copyPropertiesToMetadata";n.addFunction(R,`void copyPropertiesToMetadata(in ${P} ${N}, inout ${p} ${y})`,Oe.FRAGMENT);for(let B=0;B<l;B++){const F=i[B];n.addFunctionLines(R,[`${y}.${F} = ${N}.${F};`])}}if(u){const R="setStatistics";n.addFunction(R,`void setStatistics(inout ${h} ${m})`,Oe.FRAGMENT);for(let B=0;B<l;B++){const F=i[B],S=o[B],I=xn.getComponentCount(S);for(let L=0;L<I;L++){const M=Vet(S,L),z=a[B][L];n.addFunctionLines(R,[`${m}.${F}.min${M} = ${Lne(s[B][L])};`,`${m}.${F}.max${M} = ${Lne(z)};`])}}}{const R="getPropertiesFromMegatextureAtUv";n.addFunction(R,`${P} getPropertiesFromMegatextureAtUv(vec2 texcoord)`,Oe.FRAGMENT),n.addFunctionLines(R,[`${P} ${N};`]);for(let B=0;B<l;B++){const F=i[B],L=Uet(o[B]);n.addFunctionLines(R,[`properties.${F} = texture(u_megatextureTextures[${B}], texcoord)${L};`])}n.addFunctionLines(R,[`return ${N};`])}}(n,e);const{shaderBuilder:i,clippingPlanes:o,clippingPlanesLength:r}=n;if(r>0){const p="getClippingPlane",y=LF(o,t),A=0,x=y.indexOf(")")+1,C=y.indexOf("{",x)+1,w=y.indexOf("}",C),v=y.slice(A,x),D=y.slice(C,w);i.addFunction(p,v,Oe.FRAGMENT),i.addFunctionLines(p,[D])}const s=i.clone();s.addDefine("PICKING",void 0,Oe.FRAGMENT);const a=i.buildShaderProgram(t),l=s.buildShaderProgram(t),u=Pt.fromCache({cull:{enabled:!0,face:dr.BACK},depthTest:{enabled:!1},depthMask:!1,blending:Ji.PRE_MULTIPLIED_ALPHA_BLEND}),d=t.getViewportQuadVertexArray(),h=e._depthTest,m=new Zt({vertexArray:d,primitiveType:At.TRIANGLES,renderState:u,shaderProgram:a,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:ze.VOXELS,executeInClosestFrustum:!0,owner:this,cull:h,occlude:h}),_=Zt.shallowClone(m,new Zt);if(_.shaderProgram=l,_.pickOnly=!0,c(e._drawCommand)){const p=e._drawCommand;p.shaderProgram=p.shaderProgram&&p.shaderProgram.destroy()}if(c(e._drawCommandPick)){const p=e._drawCommandPick;p.shaderProgram=p.shaderProgram&&p.shaderProgram.destroy()}e._drawCommand=m,e._drawCommandPick=_};function Mc(){this.orientedBoundingBox=new Eo,this.boundingSphere=new be,this.boundTransform=new k,this.shapeTransform=new k,this._minBounds=f.clone(Mc.DefaultMinBounds,new f),this._maxBounds=f.clone(Mc.DefaultMaxBounds,new f),this.shaderUniforms={renderMinBounds:new f,renderMaxBounds:new f,boxUvToShapeUvScale:new f,boxUvToShapeUvTranslate:new f},this.shaderDefines={BOX_INTERSECTION_INDEX:void 0,BOX_HAS_SHAPE_BOUNDS:void 0},this.shaderMaximumIntersectionsLength=0}const Wet=new f,Tk=new f,qet=new ne,Yet=new f,Xet=new f,Zet=new f,$et=new f,Rne=k.fromRotationTranslation(ne.fromUniformScale(.5,new ne),new f(.5,.5,.5),new k);Mc.prototype.update=function(e,t,n,i,o){i=g(i,Mc.DefaultMinBounds),o=g(o,Mc.DefaultMaxBounds),T.typeOf.object("modelMatrix",e),T.typeOf.object("minBounds",t),T.typeOf.object("maxBounds",n);const r=Mc.DefaultMinBounds,s=Mc.DefaultMaxBounds;t=this._minBounds=f.clamp(t,r,s,this._minBounds),n=this._maxBounds=f.clamp(n,r,s,this._maxBounds),i=f.clamp(i,r,s,Yet),o=f.clamp(o,r,s,Xet);const a=f.clamp(t,i,o,Zet),l=f.clamp(n,i,o,$et),u=k.getScale(e,Tk);if(a.x>l.x||a.y>l.y||a.z>l.z||(a.x===l.x)+(a.y===l.y)+(a.z===l.z)>=2||i.x>o.x||i.y>o.y||i.z>o.z||0===u.x||0===u.y||0===u.z)return!1;this.shapeTransform=k.clone(e,this.shapeTransform),this.orientedBoundingBox=Nne(a,l,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=k.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=be.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);const{shaderUniforms:d,shaderDefines:h}=this;for(const p in h)h.hasOwnProperty(p)&&(h[p]=void 0);const m=!f.equals(t,r)||!f.equals(n,s);let _=0;if(h.BOX_INTERSECTION_INDEX=_,_+=1,d.renderMinBounds=k.multiplyByPoint(Rne,a,d.renderMinBounds),d.renderMaxBounds=k.multiplyByPoint(Rne,l,d.renderMaxBounds),m){h.BOX_HAS_SHAPE_BOUNDS=!0;const p=t;d.boxUvToShapeUvScale=f.fromElements(2/(p.x===n.x?1:n.x-p.x),2/(p.y===n.y?1:n.y-p.y),2/(p.z===n.z?1:n.z-p.z),d.boxUvToShapeUvScale),d.boxUvToShapeUvTranslate=f.fromElements(-d.boxUvToShapeUvScale.x*(.5*p.x+.5),-d.boxUvToShapeUvScale.y*(.5*p.y+.5),-d.boxUvToShapeUvScale.z*(.5*p.z+.5),d.boxUvToShapeUvTranslate)}return this.shaderMaximumIntersectionsLength=_,!0};const Ket=new f,Qet=new f;function Nne(e,t,n,i){const r=Mc.DefaultMaxBounds;if(f.equals(e,Mc.DefaultMinBounds)&&f.equals(t,r))i.center=k.getTranslation(n,i.center),i.halfAxes=k.getMatrix3(n,i.halfAxes);else{let a=k.getScale(n,Tk);const l=f.midpoint(e,t,Wet);i.center=k.multiplyByPoint(n,l,i.center),a=f.fromElements(.5*a.x*(t.x-e.x),.5*a.y*(t.y-e.y),.5*a.z*(t.z-e.z),Tk);const u=k.getRotation(n,qet);i.halfAxes=ne.setScale(u,a,i.halfAxes)}return i}Mc.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){T.typeOf.number("tileLevel",e),T.typeOf.number("tileX",t),T.typeOf.number("tileY",n),T.typeOf.number("tileZ",i),T.typeOf.object("result",o);const r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e);return Nne(f.fromElements(O.lerp(r.x,s.x,a*t),O.lerp(r.y,s.y,a*n),O.lerp(r.z,s.z,a*i),Ket),f.fromElements(O.lerp(r.x,s.x,a*(t+1)),O.lerp(r.y,s.y,a*(n+1)),O.lerp(r.z,s.z,a*(i+1)),Qet),this.shapeTransform,o)},Mc.prototype.computeApproximateStepSize=function(e){return T.typeOf.object("dimensions",e),1/f.maximumComponent(e)},Mc.DefaultMinBounds=Object.freeze(new f(-1,-1,-1)),Mc.DefaultMaxBounds=Object.freeze(new f(1,1,1));const xk=Mc;function Nr(){this.orientedBoundingBox=new Eo,this.boundingSphere=new be,this.boundTransform=new k,this.shapeTransform=new k,this._minimumRadius=Nr.DefaultMinBounds.x,this._maximumRadius=Nr.DefaultMaxBounds.x,this._minimumHeight=Nr.DefaultMinBounds.y,this._maximumHeight=Nr.DefaultMaxBounds.y,this._minimumAngle=Nr.DefaultMinBounds.z,this._maximumAngle=Nr.DefaultMaxBounds.z,this.shaderUniforms={cylinderUvToRenderBoundsScale:new f,cylinderUvToRenderBoundsTranslate:new f,cylinderUvToRenderRadiusMin:0,cylinderRenderAngleMinMax:new G,cylinderUvToShapeUvRadius:new G,cylinderUvToShapeUvHeight:new G,cylinderUvToShapeUvAngle:new G,cylinderShapeUvAngleMinMax:new G,cylinderShapeUvAngleRangeZeroMid:0},this.shaderDefines={CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MAX:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT:void 0,CYLINDER_HAS_RENDER_BOUNDS_HEIGHT:void 0,CYLINDER_HAS_RENDER_BOUNDS_HEIGHT_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_EQUAL_HALF:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF:void 0,CYLINDER_HAS_SHAPE_BOUNDS_RADIUS:void 0,CYLINDER_HAS_SHAPE_BOUNDS_RADIUS_FLAT:void 0,CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT:void 0,CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT_FLAT:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_RANGE_EQUAL_ZERO: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}const Mne=new f,Jet=new f,ett=new f,ttt=new ne,ntt=new k,itt=new k,ott=k.fromRotationTranslation(ne.fromUniformScale(2,new ne),new f(-1,-1,-1),new k);Nr.prototype.update=function(e,t,n,i,o){i=g(i,Nr.DefaultMinBounds),o=g(o,Nr.DefaultMaxBounds),T.typeOf.object("modelMatrix",e),T.typeOf.object("minBounds",t),T.typeOf.object("maxBounds",n);const r=Nr.DefaultMinBounds.x,s=Nr.DefaultMaxBounds.x,a=Nr.DefaultMinBounds.y,l=Nr.DefaultMaxBounds.y,u=Nr.DefaultMinBounds.z,d=Nr.DefaultMaxBounds.z,h=d-u,m=.5*h,_=O.EPSILON10,p=O.EPSILON3,y=O.EPSILON10,A=O.clamp(t.x,r,s),x=O.clamp(n.x,r,s),C=O.clamp(i.x,r,s),w=O.clamp(o.x,r,s),v=Math.max(A,C),D=Math.min(x,w),P=O.clamp(t.y,a,l),N=O.clamp(n.y,a,l),R=O.clamp(i.y,a,l),B=O.clamp(o.y,a,l),F=Math.max(P,R),S=Math.min(N,B),I=O.negativePiToPi(t.z),L=O.negativePiToPi(n.z),M=O.negativePiToPi(i.z),U=O.negativePiToPi(o.z),z=Math.max(I,M),j=Math.min(L,U),W=k.getScale(e,Mne);if(0===D||v>D||F>S||O.equalsEpsilon(W.x,0,void 0,_)||O.equalsEpsilon(W.y,0,void 0,_)||O.equalsEpsilon(W.z,0,void 0,_))return!1;this._minimumRadius=A,this._maximumRadius=x,this._minimumHeight=P,this._maximumHeight=N,this._minimumAngle=I,this._maximumAngle=L,this.shapeTransform=k.clone(e,this.shapeTransform),this.orientedBoundingBox=Ek(v,D,F,S,z,j,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=k.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=be.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);const $=A===r&&x===s,Z=P===a&&N===l,ie=L<I,Y=L-I+ie*h,we=Y<=y,le=Y>m+y&&Y<h-y||Y>y&&Y<m-y||Y>=m-y&&Y<=m+y||we,Ae=O.equalsEpsilon(I,u,void 0,p),xe=O.equalsEpsilon(L,d,void 0,p),De=D===s,qe=v===r,$e=F===a&&S===l,kt=j-z+(j<z)*h,sn=kt>m+y&&kt<h-y,wn=kt>y&&kt<m-y,Lt=kt>=m-y&&kt<=m+y,On=kt<=y,ii=sn||wn||Lt||On,an=this.shaderUniforms,en=this.shaderDefines;for(const Te in en)en.hasOwnProperty(Te)&&(en[Te]=void 0);let he=0;if(en.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=he,he+=1,qe||(en.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,en.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=he,he+=1,an.cylinderUvToRenderRadiusMin=D/v),De||(en.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MAX=!0),v===D&&(en.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0),$e||(en.CYLINDER_HAS_RENDER_BOUNDS_HEIGHT=!0),F===S&&(en.CYLINDER_HAS_RENDER_BOUNDS_HEIGHT_FLAT=!0),P===N&&(en.CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT_FLAT=!0),A===x&&(en.CYLINDER_HAS_SHAPE_BOUNDS_RADIUS_FLAT=!0),$||(en.CYLINDER_HAS_SHAPE_BOUNDS_RADIUS=!0,an.cylinderUvToShapeUvRadius=G.fromElements(1/(x-A),A/(A-x),an.cylinderUvToShapeUvRadius)),Z||(en.CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT=!0,an.cylinderUvToShapeUvHeight=G.fromElements(2/(N-P),(P+1)/(P-N),an.cylinderUvToShapeUvHeight)),!De||!$e){const Te=.5*(S-F),dn=f.fromElements(1/D,1/D,1/(0===Te?1:Te),ett),Dt=f.fromElements(0,0,.5*-dn.z*(F+S),Jet),Wi=k.fromRotationTranslation(ne.fromScale(dn,ttt),Dt,ntt),Co=k.multiplyTransformation(Wi,ott,itt);an.cylinderUvToRenderBoundsScale=k.getScale(Co,an.cylinderUvToRenderBoundsScale),an.cylinderUvToRenderBoundsTranslate=k.getTranslation(Co,an.cylinderUvToRenderBoundsTranslate)}if(ie&&(en.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED=!0),ii&&(en.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,en.CYLINDER_INTERSECTION_INDEX_ANGLE=he,sn?(en.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF=!0,he+=1):wn?(en.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF=!0,he+=2):Lt?(en.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_HALF=!0,he+=1):On&&(en.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0,he+=2),an.cylinderRenderAngleMinMax=G.fromElements(z,j,an.cylinderAngleMinMax)),le){en.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0,we&&(en.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0),Ae&&(en.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY=!0),xe&&(en.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY=!0);const dn=(L-u)/h,Dt=1-Y/h;an.cylinderShapeUvAngleMinMax=G.fromElements((I-u)/h,dn,an.cylinderShapeUvAngleMinMax),an.cylinderShapeUvAngleRangeZeroMid=(dn+.5*Dt)%1,an.cylinderUvToShapeUvAngle=G.fromElements(h/Y,-(I-u)/Y,an.cylinderUvToShapeUvAngle)}return this.shaderMaximumIntersectionsLength=he,!0},Nr.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){T.typeOf.number("tileLevel",e),T.typeOf.number("tileX",t),T.typeOf.number("tileY",n),T.typeOf.number("tileZ",i),T.typeOf.object("result",o);const r=this._minimumRadius,s=this._maximumRadius,a=this._minimumHeight,l=this._maximumHeight,u=this._minimumAngle,d=this._maximumAngle,h=1/Math.pow(2,e);return Ek(O.lerp(r,s,t*h),O.lerp(r,s,(t+1)*h),O.lerp(a,l,n*h),O.lerp(a,l,(n+1)*h),O.lerp(u,d,i*h),O.lerp(u,d,(i+1)*h),this.shapeTransform,o)};const rtt=new Eo,stt=new f,att=new f,ctt=new f;Nr.prototype.computeApproximateStepSize=function(e){T.typeOf.object("dimensions",e);const t=this.shapeTransform,i=this._maximumRadius,o=this._minimumHeight,r=this._maximumHeight,s=this._minimumAngle,a=this._maximumAngle,u=1-1/e.y,d=1-1/e.z,x=Ek(O.lerp(this._minimumRadius,i,1-1/e.x),i,O.lerp(o,r,u),r,O.lerp(s,a,d),a,t,rtt),C=ne.getScale(x.halfAxes,stt),w=k.getScale(t,att),v=f.divideComponents(C,w,ctt);return f.minimumComponent(v)},Nr.DefaultMinBounds=Object.freeze(new f(0,-1,-O.PI)),Nr.DefaultMaxBounds=Object.freeze(new f(1,1,+O.PI));const utt=new Array(5),dtt=new f,ftt=new ne,htt=new k,ptt=new k,mtt=new k,Ck=new k,_tt=new f,gtt=new f,ytt=new f,Fne=new Array(8);for(let e=0;e<8;e++)Fne[e]=new f;function Bne(e,t,n){return Math.abs(fe.dot(e,t))<n}function Ek(e,t,n,i,o,r,s,a){const l=Nr.DefaultMinBounds,u=Nr.DefaultMaxBounds;if(e===l.x&&t===u.x&&n===l.y&&i===u.y&&o===l.z&&r===u.z)return a.center=k.getTranslation(s,a.center),a.halfAxes=k.getMatrix3(s,a.halfAxes),a;r<o&&(r+=O.TWO_PI);const x=r-o,C=o+.5*x,w=utt;let v=0;w[v++]=o,w[v++]=r,w[v++]=C,x>O.PI&&(w[v++]=C-O.PI_OVER_TWO,w[v++]=C+O.PI_OVER_TWO);let D=1,P=1,N=-1,R=-1;for(let ie=0;ie<v;++ie){const Y=w[ie]-C,Q=Math.cos(Y),K=Math.sin(Y),me=Q*e,we=K*e,le=Q*t,Ae=K*t;D=Math.min(D,me),P=Math.min(P,we),D=Math.min(D,le),P=Math.min(P,Ae),N=Math.max(N,me),R=Math.max(R,we),N=Math.max(N,le),R=Math.max(R,Ae)}const B=N-D,F=R-P,S=i-n,U=f.fromElements(.5*(D+N),.5*(P+R),.5*(n+i),dtt),z=ne.fromRotationZ(C,ftt),j=f.fromElements(B,F,S,Mne),W=k.fromScale(j,mtt),q=k.fromRotation(z,ptt),V=k.fromTranslation(U,htt),$=k.multiplyTransformation(q,k.multiplyTransformation(V,W,Ck),Ck),Z=k.multiplyTransformation(s,$,Ck);return function btt(e){const t=k.getColumn(e,0,_tt),n=k.getColumn(e,1,gtt),i=k.getColumn(e,2,ytt),o=O.EPSILON4;return Bne(t,n,o)&&Bne(n,i,o)}(Z)?Eo.fromTransformation(Z,a):function Att(e,t){const n=Fne;f.fromElements(-.5,-.5,-.5,n[0]),f.fromElements(-.5,-.5,.5,n[1]),f.fromElements(-.5,.5,-.5,n[2]),f.fromElements(-.5,.5,.5,n[3]),f.fromElements(.5,-.5,-.5,n[4]),f.fromElements(.5,-.5,.5,n[5]),f.fromElements(.5,.5,-.5,n[6]),f.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)k.multiplyByPoint(e,n[i],n[i]);return Eo.fromPoints(n,t)}(Z,a)}const wk=Nr;function Fc(){this.orientedBoundingBox=new Eo,this.boundingSphere=new be,this.boundTransform=new k,this.shapeTransform=new k,this._rectangle=new Ce,this._minimumHeight=Fc.DefaultMinBounds.z,this._maximumHeight=Fc.DefaultMaxBounds.z,this._ellipsoid=new ge,this._translation=new f,this._rotation=new ne,this.shaderUniforms={ellipsoidRadiiUv:new f,ellipsoidInverseRadiiSquaredUv:new f,ellipsoidRenderLongitudeMinMax:new G,ellipsoidShapeUvLongitudeMinMaxMid:new f,ellipsoidUvToShapeUvLongitude:new G,ellipsoidUvToShapeUvLatitude:new G,ellipsoidRenderLatitudeCosSqrHalfMinMax:new G,ellipsoidInverseHeightDifferenceUv:0,ellipseInnerRadiiUv:new G,ellipsoidInverseInnerScaleUv:0,ellipsoidInverseOuterScaleUv:0},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_EQUAL_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_RANGE_EQUAL_ZERO:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE: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_RENDER_BOUNDS_LATITUDE_RANGE_EQUAL_ZERO:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE_RANGE_EQUAL_ZERO:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_MAX:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_MIN:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_FLAT:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_MIN:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_FLAT:void 0,ELLIPSOID_IS_SPHERE: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}const Ttt=new f,xtt=new ne,kne=new f,Une=new f,zne=new f,Vne=new f,Ctt=new Ce;Fc.prototype.update=function(e,t,n,i,o){i=g(i,Fc.DefaultMinBounds),o=g(o,Fc.DefaultMaxBounds),T.typeOf.object("modelMatrix",e),T.typeOf.object("minBounds",t),T.typeOf.object("maxBounds",n);const r=Fc.DefaultMinBounds.x,s=Fc.DefaultMaxBounds.x,a=s-r,l=.5*a,u=Fc.DefaultMinBounds.y,d=Fc.DefaultMaxBounds.y,h=d-u,m=O.EPSILON10,_=O.EPSILON3,p=O.EPSILON10,y=O.EPSILON10,A=O.EPSILON3,x=O.clamp(t.x,r,s),C=O.clamp(n.x,r,s),w=O.clamp(i.x,r,s),v=O.clamp(o.x,r,s),D=Math.max(x,w),P=Math.min(C,v),N=O.clamp(t.y,u,d),R=O.clamp(n.y,u,d),B=O.clamp(i.y,u,d),F=O.clamp(o.y,u,d),S=Math.max(N,B),I=Math.min(R,F),L=k.getScale(e,Ttt),M=L.x===L.y&&L.y===L.z,U=f.minimumComponent(L),z=Math.max(t.z,-U),j=Math.max(n.z,-U),W=Math.max(i.z,-U),q=Math.max(o.z,-U),V=Math.max(z,W),$=Math.min(j,q),Z=f.add(L,f.fromElements(z,z,z,Une),Une),ie=f.add(L,f.fromElements(j,j,j,kne),kne),Y=f.maximumComponent(ie),Q=f.add(L,f.fromElements(V,V,V,Vne),Vne),K=f.add(L,f.fromElements($,$,$,zne),zne);if(S>I||S===d||I===u||V>$||O.equalsEpsilon(K,f.ZERO,void 0,m))return!1;this._rectangle=Ce.fromRadians(x,N,C,R),this._translation=k.getTranslation(e,this._translation),this._rotation=k.getRotation(e,this._rotation),this._ellipsoid=ge.fromCartesian3(L,this._ellipsoid),this._minimumHeight=z,this._maximumHeight=j;const me=Ce.fromRadians(D,S,P,I,Ctt);this.orientedBoundingBox=Hne(me,V,$,this._ellipsoid,this._translation,this._rotation,this.orientedBoundingBox),this.shapeTransform=k.fromRotationTranslation(ne.setScale(this._rotation,ie,xtt),this._translation,this.shapeTransform),this.boundTransform=k.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=be.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);const le=P-D+(P<D)*a,Ae=le<=p,xe=le>l+p&&le<a-p,De=le>=l-p&&le<=l+p,qe=le>p&&le<l-p,$e=Ae||xe||De||qe,kt=C-x+(C<x)*a,ii=kt<=p||kt>l+p&&kt<a-p||kt>=l-p&&kt<=l+p||kt>p&&kt<l-p,an=I<-A,en=I>=-A&&I<=+A,he=I>+A&&I<d-y,Te=an||en||he,dn=S>u+y&&S<-A,Dt=S>=-A&&S<=+A,Wi=S>+A,Co=dn||Dt||Wi,bl=Te||Co,ra=R-N,Ln=R<-A||R>=-A&&R<=+A||R>+A&&R<d-y||N>u+y&&N<-A||N>=-A&&N<=+A||N>+A,yo=!f.equals(Q,f.ZERO),jo=!f.equals(K,f.ZERO),ka=yo||jo,Ua=$-V,mr=!f.equals(Z,f.ZERO),Qi=!f.equals(ie,f.ZERO),zs=mr||Qi,oi=this.shaderUniforms,Kn=this.shaderDefines;for(const Ui in Kn)Kn.hasOwnProperty(Ui)&&(Kn[Ui]=void 0);oi.ellipsoidRadiiUv=f.divideByScalar(ie,Y,oi.ellipsoidRadiiUv),oi.ellipsoidInverseRadiiSquaredUv=f.divideComponents(f.ONE,f.multiplyComponents(oi.ellipsoidRadiiUv,oi.ellipsoidRadiiUv,oi.ellipsoidInverseRadiiSquaredUv),oi.ellipsoidInverseRadiiSquaredUv);let si=0;if(Kn.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=si,si+=1,ka&&(0===Ua&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_FLAT=!0),yo&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_MIN=!0,Kn.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=si,si+=1,oi.ellipsoidInverseInnerScaleUv=Y/(Y-(j-V))),jo&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_HEIGHT_MAX=!0,oi.ellipsoidInverseOuterScaleUv=Y/(Y-(j-$)))),zs){if(mr){Kn.ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_MIN=!0;const Ui=(j-z)/Y;oi.ellipsoidInverseHeightDifferenceUv=1/Ui,oi.ellipseInnerRadiiUv=G.fromElements(oi.ellipsoidRadiiUv.x*(1-Ui),oi.ellipsoidRadiiUv.z*(1-Ui),oi.ellipseInnerRadiiUv)}z===j&&(Kn.ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_FLAT=!0)}if($e&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,Kn.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=si,xe?(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,si+=1):qe?(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,si+=2):De?(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_HALF=!0,si+=1):Ae&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,si+=2),oi.ellipsoidRenderLongitudeMinMax=G.fromElements(D,P,oi.ellipsoidRenderLongitudeMinMax)),ii&&(Kn.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0,C<x&&(Kn.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED=!0),oi.ellipsoidUvToShapeUvLongitude=G.fromElements(a/kt,-(x-r)/kt,oi.ellipsoidUvToShapeUvLongitude)),$e){const Ui=O.equalsEpsilon(D,r,void 0,_),Wr=O.equalsEpsilon(P,s,void 0,_);Ui&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY=!0),Wr&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY=!0),oi.ellipsoidShapeUvLongitudeMinMaxMid=f.fromElements((x-r)/a,(C-r)/a,((P-r)/a+.5*(1-le/a))%1,oi.ellipsoidShapeUvLongitudeMinMaxMid)}if(bl){Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE=!0,Co&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,Kn.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=si,dn?(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,si+=1):Dt?(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,si+=1):Wi&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,si+=2)),Te&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,Kn.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=si,an?(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,si+=2):en?(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,si+=1):he&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,si+=1)),S===I&&(Kn.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_RANGE_EQUAL_ZERO=!0);const Ui=Math.pow(Math.cos(O.PI_OVER_TWO-Math.abs(S)),2),Wr=Math.pow(Math.cos(O.PI_OVER_TWO-Math.abs(I)),2);oi.ellipsoidRenderLatitudeCosSqrHalfMinMax=G.fromElements(Ui,Wr,oi.ellipsoidRenderLatitudeCosSqrHalfMinMax)}return Ln&&(Kn.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,N===R&&(Kn.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE_RANGE_EQUAL_ZERO=!0),oi.ellipsoidUvToShapeUvLatitude=G.fromElements(h/ra,(u-N)/ra,oi.ellipsoidUvToShapeUvLatitude)),M&&(Kn.ELLIPSOID_IS_SPHERE=!0),this.shaderMaximumIntersectionsLength=si,!0};const Ett=new Ce;function Hne(e,t,n,i,o,r,s){return(s=Eo.fromRectangle(e,t,n,i,s)).center=f.add(s.center,o,s.center),s.halfAxes=ne.multiply(s.halfAxes,r,s.halfAxes),s}Fc.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){T.typeOf.number("tileLevel",e),T.typeOf.number("tileX",t),T.typeOf.number("tileY",n),T.typeOf.number("tileZ",i),T.typeOf.object("result",o);const r=1/Math.pow(2,e),d=i*r,h=(i+1)*r;return Hne(Ce.subsection(this._rectangle,t*r,n*r,(t+1)*r,(n+1)*r,Ett),O.lerp(this._minimumHeight,this._maximumHeight,d),O.lerp(this._minimumHeight,this._maximumHeight,h),this._ellipsoid,this._translation,this._rotation,o)},Fc.prototype.computeApproximateStepSize=function(e){T.typeOf.object("dimensions",e);const o=this._maximumHeight;return(o-this._minimumHeight)/(this._ellipsoid.maximumRadius+o)*.5/e.z},Fc.DefaultMinBounds=Object.freeze(new f(-O.PI,-O.PI_OVER_TWO,-Number.MAX_VALUE)),Fc.DefaultMaxBounds=Object.freeze(new f(+O.PI,+O.PI_OVER_TWO,+Number.MAX_VALUE));const Sk=Fc,yl={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER",getMinBounds:function(e){switch(e){case yl.BOX:return xk.DefaultMinBounds;case yl.ELLIPSOID:return Sk.DefaultMinBounds;case yl.CYLINDER:return wk.DefaultMinBounds;default:throw new E(`Invalid shape type ${e}`)}},getMaxBounds:function(e){switch(e){case yl.BOX:return xk.DefaultMaxBounds;case yl.ELLIPSOID:return Sk.DefaultMaxBounds;case yl.CYLINDER:return wk.DefaultMaxBounds;default:throw new E(`Invalid shape type ${e}`)}},getShapeConstructor:function(e){switch(e){case yl.BOX:return xk;case yl.ELLIPSOID:return Sk;case yl.CYLINDER:return wk;default:throw new E(`Invalid shape type ${e}`)}}},lA=Object.freeze(yl);function md(e){T.typeOf.object("options",e),T.defined("options.comparator",e.comparator),c(e.maximumLength)&&T.typeOf.number.greaterThanOrEquals("options.maximumLength",e.maximumLength,0),this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=c(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}function n1(e,t,n){const i=e._array,o=i[t];i[t]=i[n],i[n]=o}function rE(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function vk(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function Gne(e,t){if(0===t)return;const n=Math.floor(O.log2(t+1))%2==0,i=Math.floor((t-1)/2),o=rE(e,t,i);for(o!==n&&(n1(e,t,i),t=i);t>=3;){const r=Math.floor((t-3)/4);if(rE(e,t,r)!==o)break;n1(e,t,r),t=r}}function jne(e,t){const n=e._length,i=Math.floor(O.log2(t+1))%2==0;let o;for(;(o=2*t+1)<n;){let r=o;const s=o+1;if(s<n){rE(e,s,r)===i&&(r=s);const a=2*o+1,l=Math.max(Math.min(n-a,4),0);for(let u=0;u<l;u++){const d=a+u;rE(e,d,r)===i&&(r=d)}}if(rE(e,r,t)===i&&(n1(e,r,t),r!==o&&r!==s)){const a=Math.floor((r-1)/2);vk(e,r,a)===i&&n1(e,r,a)}t=r}}Object.defineProperties(md.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(c(e)){for(T.typeOf.number.greaterThanOrEquals("maximumLength",e,0);this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}}),md.prototype.clone=function(){const n=this._array,i=this._length,o=new md({comparator:this._comparator,maximumLength:this._maximumLength});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o},md.prototype.reset=function(){this._length=0;const e=this._maximumLength;if(c(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0},md.prototype.resort=function(){const e=this._length;for(let t=0;t<e;t++)Gne(this,t)},md.prototype.insert=function(e){let t;const n=this._maximumLength;if(c(n)){if(0===n)return;if(this._length===n){if(this._comparator(e,this._array[0])<=0)return e;t=this.removeMinimum()}}const i=this._length;return this._array[i]=e,this._length++,Gne(this,i),t},md.prototype.removeMinimum=function(){const e=this._length;if(0===e)return;this._length--;const t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],jne(this,0)),this._array[e-1]=void 0,t},md.prototype.removeMaximum=function(){const e=this._length;if(0===e)return;let t;if(this._length--,e<=2)t=this._array[e-1];else{const n=vk(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&jne(this,n)}return this._array[e-1]=void 0,t},md.prototype.getMinimum=function(){if(0!==this._length)return this._array[0]},md.prototype.getMaximum=function(){const e=this._length;if(0!==e)return e<=2?this._array[e-1]:this._array[vk(this,1,2)?1:2]};const wtt=md,Wne=Object.freeze({UNLOADED:0,RECEIVING:1,RECEIVED:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function i1(e,t){this.spatialNode=e,this.keyframe=t,this.state=Wne.UNLOADED,this.metadatas=[],this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}i1.priorityComparator=function(e,t){return e.priority-t.priority},i1.searchComparator=function(e,t){return e.keyframe-t.keyframe},i1.LoadState=Wne;const go=i1;function Um(e,t,n,i,o){if(i===Dn.UNSIGNED_SHORT&&(i=Dn.FLOAT32),i===Dn.FLOAT32&&!e.floatingPointTexture)throw new Ie("Floating point texture not supported");let s,a;i===Dn.FLOAT32||i===Dn.FLOAT64?s=bt.FLOAT:i===Dn.UINT8&&(s=bt.UNSIGNED_BYTE),1===n?a=e.webgl2?vt.RED:vt.LUMINANCE:2===n?a=e.webgl2?vt.RG:vt.LUMINANCE_ALPHA:3===n?a=vt.RGB:4===n&&(a=vt.RGBA),o=Math.min(g(o,134217728),536870912);const d=mn.maximumTextureSize,h=Dn.getSizeInBytes(i),m=Math.floor(o/(n*h)),_=Math.min(d,O.previousPowerOfTwo(Math.floor(Math.sqrt(m)))),p=Math.ceil(Math.sqrt(t.x)),y=Math.ceil(t.z/p),A=p*t.x,x=y*t.y,C=Math.floor(_/A),w=Math.floor(_/x);if(0===C||0===w)throw new Ie("Tileset is too large to fit into megatexture");this.channelCount=n,this.componentType=i,this.voxelCountPerTile=f.clone(t,new f),this.maximumTileCount=C*w,this.regionCountPerMegatexture=new G(C,w),this.voxelCountPerRegion=new G(A,x),this.sliceCountPerRegion=new G(p,y),this.voxelSizeUv=new G(1/_,1/_),this.sliceSizeUv=new G(t.x/_,t.y/_),this.regionSizeUv=new G(A/_,x/_),this.texture=new jn({context:e,pixelFormat:a,pixelDatatype:s,flipY:!1,width:_,height:_,sampler:new Hi({wrapS:$i.CLAMP_TO_EDGE,wrapT:$i.CLAMP_TO_EDGE,minificationFilter:ei.LINEAR,magnificationFilter:ls.LINEAR})});const v=Dn.toComponentDatatype(i);this.tileVoxelDataTemp=ee.createTypedArray(v,A*x*n),this.nodes=new Array(this.maximumTileCount);for(let D=0;D<this.maximumTileCount;D++)this.nodes[D]=new Stt(D);for(let D=0;D<this.maximumTileCount;D++){const P=this.nodes[D];P.previousNode=D>0?this.nodes[D-1]:void 0,P.nextNode=D<this.maximumTileCount-1?this.nodes[D+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0}function Stt(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}Um.prototype.add=function(e){if(this.isFull())throw new E("Trying to add when there are no empty spots");const t=this.emptyList;this.emptyList=this.emptyList.nextNode,c(this.emptyList)&&(this.emptyList.previousNode=void 0),t.nextNode=this.occupiedList,c(t.nextNode)&&(t.nextNode.previousNode=t),this.occupiedList=t;const n=t.index;return this.writeDataToTexture(n,e),this.occupiedCount++,n},Um.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new E("Megatexture index out of bounds");const t=this.nodes[e];c(t.previousNode)&&(t.previousNode.nextNode=t.nextNode),c(t.nextNode)&&(t.nextNode.previousNode=t.previousNode),t.nextNode=this.emptyList,c(t.nextNode)&&(t.nextNode.previousNode=t),t.previousNode=void 0,this.emptyList=t,this.occupiedCount--},Um.prototype.isFull=function(){return void 0===this.emptyList},Um.getApproximateTextureMemoryByteLength=function(e,t,n,i){i===Dn.UNSIGNED_SHORT&&(i=Dn.FLOAT32);const o=Dn.getSizeInBytes(i),r=e*t.x*t.y*t.z,s=Math.ceil(Math.sqrt(t.z)),a=Math.ceil(t.z/s),l=s*t.x,u=a*t.y;let d=O.previousPowerOfTwo(Math.floor(Math.sqrt(r)));for(;!(Math.floor(d/l)*Math.floor(d/u)>=e);)d*=2;return d*d*n*o},Um.prototype.writeDataToTexture=function(e,t){const 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 y=0;y<i.z;y++){const A=y%o.x*i.x,x=Math.floor(y/o.x)*i.y;for(let C=0;C<i.y;C++)for(let w=0;w<i.x;w++){const v=y*i.y*i.x+C*i.x+w,D=(x+C)*r.x+(A+w);for(let P=0;P<s;P++)a[D*s+P]=n[v*s+P]}}const l=this.regionCountPerMegatexture,u=r.x,d=r.y,h=e%l.x*r.x,m=Math.floor(e/l.x)*r.y;this.texture.copyFrom({source:{arrayBufferView:a,width:u,height:d},xOffset:h,yOffset:m})},Um.prototype.isDestroyed=function(){return!1},Um.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),Ye(this)};const qne=Um;function uu(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.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new Eo,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(r,s)}const vtt=new f;uu.prototype.computeBoundingVolumes=function(e,t){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);const n=ne.getScale(this.orientedBoundingBox.halfAxes,vtt),i=2*f.maximumComponent(n);this.approximateVoxelSize=i/f.minimumComponent(t)},uu.prototype.constructChildNodes=function(e,t){const{level:n,x:i,y:o,z:r}=this,s=2*i,a=2*o,l=2*r,u=a+1,d=s+1,h=l+1,m=n+1;this.children=[[m,s,a,l],[m,d,a,l],[m,s,u,l],[m,d,u,l],[m,s,a,h],[m,d,a,h],[m,s,u,h],[m,d,u,h]].map(([p,y,A,x])=>new uu(p,y,A,x,this,e,t))},uu.prototype.visibility=function(e,t){return e.cullingVolume.computeVisibilityWithPlaneMask(this.orientedBoundingBox,t)},uu.prototype.computeScreenSpaceError=function(e,t){let i=Math.sqrt(this.orientedBoundingBox.distanceSquaredTo(e));i=Math.max(i,O.EPSILON7),this.screenSpaceError=t*(this.approximateVoxelSize/i)};const Yne={keyframe:0};function sE(e,t){return Yne.keyframe=e,ke(t,Yne,go.searchComparator)}function Dtt(e,t){const n=sE(e,t);return n<0?O.clamp(~n-1,0,t.length-1):n}function Xne(e,t){return e*Math.exp(4*e)+t*(t>=0?1:-200)}uu.prototype.computeSurroundingRenderableKeyframeNodes=function(e){let t=this;const n=t.level,i=Math.floor(e),o=Math.ceil(e);let r,s,a=+Number.MAX_VALUE,l=+Number.MAX_VALUE;for(;c(t);){const{renderableKeyframeNodes:h}=t;if(h.length>=1){const m=Dtt(i,h),_=h[m],y=h[o===i||i<_.keyframe?m:Math.min(m+1,h.length-1)],A=i-_.keyframe,x=Xne(n-t.level,A);x<a&&(a=x,r=_);const C=y.keyframe-o,w=Xne(n-t.level,C);if(w<l&&(l=w,s=y),0===A&&0===C)break}t=t.parent}if(this.renderableKeyframeNodePrevious=r,this.renderableKeyframeNodeNext=s,!c(r)||!c(s))return;const u=r.keyframe,d=s.keyframe;this.renderableKeyframeNodeLerp=u===d?0:O.clamp((e-u)/(d-u),0,1)},uu.prototype.isVisited=function(e){return this.visitedFrameNumber===e},uu.prototype.createKeyframeNode=function(e){let t=sE(e,this.keyframeNodes);if(t<0){t=~t;const n=new go(this,e);this.keyframeNodes.splice(t,0,n)}},uu.prototype.destroyKeyframeNode=function(e,t){const n=e.keyframe,i=sE(n,this.keyframeNodes);if(i<0)throw new E("Keyframe node does not exist.");if(this.keyframeNodes.splice(i,1),-1!==e.megatextureIndex){for(let r=0;r<t.length;r++)t[r].remove(e.megatextureIndex);const o=sE(n,this.renderableKeyframeNodes);if(o<0)throw new E("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(o,1)}e.spatialNode=void 0,e.state=go.LoadState.UNLOADED,e.metadatas={},e.megatextureIndex=-1,e.priority=-Number.MAX_VALUE,e.highPriorityFrameNumber=-1},uu.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.state!==go.LoadState.RECEIVED||-1!==e.megatextureIndex||e.metadatas.length!==t.length)throw new E("Keyframe node cannot be added to megatexture");for(let o=0;o<t.length;o++)e.megatextureIndex=t[o].add(e.metadatas[o]),e.metadatas[o]=void 0;e.state=go.LoadState.LOADED;const n=this.renderableKeyframeNodes;let i=sE(e.keyframe,n);if(i>=0)throw new E("Keyframe already renderable");i=~i,n.splice(i,0,e)},uu.prototype.isRenderable=function(e){const t=this.renderableKeyframeNodePrevious,n=this.renderableKeyframeNodeNext,i=this.level;return c(t)&&c(n)&&(t.spatialNode.level===i||n.spatialNode.level===i)&&this.visitedFrameNumber===e};const Itt=uu;function zm(e,t,n,i,o,r,s){this._primitive=e;const a=i.length;this.megatextures=new Array(a);for(let y=0;y<a;y++){const x=xn.getComponentCount(i[y]);this.megatextures[y]=new qne(t,n,x,o[y],s)}const l=this.megatextures[0].maximumTileCount;this._simultaneousRequestCount=0,this._debugPrint=!1,this._frameNumber=0,this.rootNode=new Itt(0,0,0,0,void 0,e._shape,n),this._priorityQueue=new wtt({maximumLength:l,comparator:go.priorityComparator}),this._highPriorityKeyframeNodes=new Array(l),this._keyframeNodesInMegatexture=new Array(l),this._keyframeCount=r,this._sampleCount=void 0,this._keyframeLocation=0,this._binaryTreeKeyframeWeighting=new Array(r);const d=this._binaryTreeKeyframeWeighting;d[0]=0,d[r-1]=0,Dk(d,1,r-2,0);const m=2048,_=Math.floor(m/9),p=Math.ceil(l/_);this.internalNodeTexture=new jn({context:t,pixelFormat:vt.RGBA,pixelDatatype:bt.UNSIGNED_BYTE,flipY:!1,width:m,height:p,sampler:new Hi({minificationFilter:ei.NEAREST,magnificationFilter:ls.NEAREST})}),this.internalNodeTilesPerRow=_,this.internalNodeTexelSizeUv=new G(1/m,1/p),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new G}function Dk(e,t,n,i){if(t>n)return;const o=Math.floor((t+n)/2);e[o]=i,Dk(e,t,o-1,i+1),Dk(e,o+1,n,i+1)}function Zne(e,t){const n=e._primitive;if(t.computeBoundingVolumes(n._shape,n._provider.dimensions),c(t.children))for(let r=0;r<8;r++)Zne(e,t.children[r])}function Ptt(e,t){if(e._simultaneousRequestCount>=zm.simultaneousRequestCountMaximum)return;const n=e._primitive,i=n._provider,{keyframe:s,spatialNode:a}=t,l=i.requestData({tileLevel:a.level,tileX:a.x,tileY:a.y,tileZ:a.z,keyframe:s});c(l)?(e._simultaneousRequestCount++,t.state=go.LoadState.RECEIVING,l.then(function o(u){e._simultaneousRequestCount--;const d=n._provider.types.length;if(c(u))if(u===go.LoadState.FAILED)t.state=go.LoadState.FAILED;else if(Array.isArray(u)&&u.length===d){const h=e.megatextures;for(let m=0;m<d;m++){const{voxelCountPerTile:_,channelCount:p}=h[m],{x:y,y:A,z:x}=_,w=u[m];if(w.length!==y*A*x*p){t.state=go.LoadState.FAILED;break}t.metadatas[m]=w,t.state=go.LoadState.RECEIVED}}else t.state=go.LoadState.FAILED;else t.state=go.LoadState.UNAVAILABLE}).catch(function r(){e._simultaneousRequestCount--,t.state=go.LoadState.FAILED})):t.state=go.LoadState.FAILED}zm.simultaneousRequestCountMaximum=50,zm.prototype.update=function(e,t,n,i){const r=e.context,s=this.megatextures[0].maximumTileCount,a=this._keyframeCount,l=this._primitive._levelBlendFactor,h=(l>0?2:1)*(a>1?2:1);this._sampleCount=h;const m=h>=2;if(m&&!c(this.leafNodeTexture)){const C=Math.floor(512),w=Math.ceil(s/C);this.leafNodeTexture=new jn({context:r,pixelFormat:vt.RGBA,pixelDatatype:bt.UNSIGNED_BYTE,flipY:!1,width:1024,height:w,sampler:new Hi({minificationFilter:ei.NEAREST,magnificationFilter:ls.NEAREST})}),this.leafNodeTexelSizeUv=G.fromElements(1/1024,1/w,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=C}else!m&&c(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=O.clamp(t,0,a-1),n&&Zne(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;const _=wr();!function Ltt(e,t){const n=e._frameNumber,i=e._primitive,o=i._shape,{dimensions:r}=i,s=i.screenSpaceError,a=e._priorityQueue,l=e._keyframeLocation,u=e._keyframeCount,d=e.rootNode,{camera:h,context:m,pixelRatio:_}=t,{positionWC:p,frustum:y}=h,x=m.drawingBufferHeight/_/y.sseDenominator;function C(I,L,M){const U=Math.min(Math.abs(L-I),Math.abs(L-M)),z=Math.max(I,u-M-1,1),j=Math.pow(1-U/z,4),W=Math.exp(-e._binaryTreeKeyframeWeighting[L]);return O.lerp(W,j,.15+.85*j)}a.reset(),function w(I,L){if(I.computeScreenSpaceError(p,x),(L=I.visibility(t,L))===Tu.MASK_OUTSIDE)return;I.visitedFrameNumber=n;const M=O.clamp(Math.floor(l),0,u-2),U=M+1;if(1===u)I.createKeyframeNode(0);else if(I.keyframeNodes.length!==u)for(let V=0;V<u;V++)I.createKeyframeNode(V);const z=function Ott(e){return e/(1+e)}(I.screenSpaceError);let j=!1;const W=I.keyframeNodes;for(let V=0;V<W.length;V++){const $=W[V];$.priority=10*z+C(M,$.keyframe,U),$.state!==go.LoadState.UNAVAILABLE&&$.state!==go.LoadState.FAILED&&$.priority!==-Number.MAX_VALUE&&a.insert($),$.state===go.LoadState.LOADED&&(j=!0)}if(I.screenSpaceError<s||!j)I.children=void 0;else{c(I.children)||I.constructChildNodes(o,r);for(let V=0;V<8;V++)w(I.children[V],L)}}(d,Tu.MASK_INDETERMINATE);const v=e._highPriorityKeyframeNodes;let P,D=0;for(;a.length>0;)P=a.removeMaximum(),P.highPriorityFrameNumber=n,v[D]=P,D++;const N=e._keyframeNodesInMegatexture,R=e.megatextures[0],B=R.occupiedCount;N.length=B,N.sort(function(I,L){return I.highPriorityFrameNumber===L.highPriorityFrameNumber?L.priority-I.priority:L.highPriorityFrameNumber-I.highPriorityFrameNumber});let F=0,S=0;for(let I=0;I<D;I++)if(P=v[I],P.state!==go.LoadState.LOADED&&void 0!==P.spatialNode&&(P.state===go.LoadState.UNLOADED&&Ptt(e,P),P.state===go.LoadState.RECEIVED)){let L=0;if(R.isFull()){L=B-1-F,F++;const M=N[L];M.spatialNode.destroyKeyframeNode(M,e.megatextures)}else L=B+S,S++;P.spatialNode.addKeyframeNodeToMegatextures(P,e.megatextures),N[L]=P}}(this,e);const p=wr();!function Ntt(e,t,n){const i=e._primitive._screenSpaceError,o=e._keyframeLocation,r=e._frameNumber,s=t>=2;let a=0,l=0;const u=[],d=[];const m=e.rootNode;m.computeSurroundingRenderableKeyframeNodes(o),m.isRenderable(r)&&function h(_,p,y,A,x){let C=!1;if(c(_.children))for(let w=0;w<8;w++){const v=_.children[w];v.computeSurroundingRenderableKeyframeNodes(o),v.isRenderable(r)&&(C=!0)}if(C){u[x]=o1.INTERNAL<<16|p,u[y]=A,a++,x=9*(A=p)+1;for(let w=0;w<8;w++)h(_.children[w],p=a,y=9*p+0,A,x+w)}else{if(s){const w=5*l,v=_.renderableKeyframeNodePrevious,D=_.level-v.spatialNode.level,P=v.spatialNode.parent,N=c(P)?P.renderableKeyframeNodePrevious:v,R=function Mtt(e,t,n){if(void 0===e.parent)return 0;const i=e.screenSpaceError;return O.clamp(((t-i)/(e.parent.screenSpaceError-i)+n-1)/n,0,1)}(_,i,n),B=D,F=1,S=v.megatextureIndex,I=N.megatextureIndex;d[w+0]=R,d[w+1]=B,d[w+2]=F,d[w+3]=S,d[w+4]=I,u[x]=o1.LEAF<<16|l}else{const w=_.renderableKeyframeNodePrevious;u[x]=(_.level-w.spatialNode.level==0?o1.LEAF:o1.PACKED_LEAF_FROM_PARENT)<<16|w.megatextureIndex}l++}}(m,0,0,0,0),function Ftt(e,t,n,i){const o=vt.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)),l=new Uint8Array(s*a*o);for(let h=0;h<e.length;h++){const m=e[h],_=h*o;for(let p=0;p<o;p++)l[_+p]=m>>>8*p&255}i.copyFrom({source:{arrayBufferView:l,width:s,height:a},xOffset:0,yOffset:0})}(u,9,e.internalNodeTilesPerRow,e.internalNodeTexture),s&&function Btt(e,t,n,i){const o=vt.componentsLength(i.pixelFormat),s=Math.ceil(e.length/5),a=Math.max(1,t*Math.min(s,n)),l=Math.max(1,Math.ceil(s/n)),u=new Uint8Array(a*l*o);for(let m=0;m<s;m++){const p=e[5*m+1],y=e[5*m+2],A=e[5*m+3],x=e[5*m+4],C=O.clamp(Math.floor(65536*e[5*m+0]),0,65535);u[8*m+0]=C>>>0&255,u[8*m+1]=C>>>8&255,u[8*m+2]=255&p,u[8*m+3]=255&y,u[8*m+4]=A>>>0&255,u[8*m+5]=A>>>8&255,u[8*m+6]=x>>>0&255,u[8*m+7]=x>>>8&255}i.copyFrom({source:{arrayBufferView:u,width:a,height:l},xOffset:0,yOffset:0})}(d,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}(this,h,l);const y=wr();this._debugPrint&&function Rtt(e,t,n,i){const o=e._keyframeCount,r=e.rootNode,s=Object.keys(go.LoadState).length,a=new Array(s),l=new Array(s);let u=0;for(let x=0;x<s;x++){const C=new Array(o);a[x]=C;for(let w=0;w<o;w++)C[w]=0;l[x]=0}!function d(x){const C=x.keyframeNodes;for(let w=0;w<C.length;w++){const v=C[w],P=v.state;a[P][v.keyframe]+=1,l[P]+=1,u++}if(c(x.children))for(let w=0;w<8;w++)d(x.children[w])}(r);const h=`KEYFRAMES: ${a[go.LoadState.LOADED]}`,m=`UNLOADED: ${l[go.LoadState.UNLOADED]} | RECEIVING: ${l[go.LoadState.RECEIVING]} | RECEIVED: ${l[go.LoadState.RECEIVED]} | LOADED: ${l[go.LoadState.LOADED]} | FAILED: ${l[go.LoadState.FAILED]} | UNAVAILABLE: ${l[go.LoadState.UNAVAILABLE]} | TOTAL: ${u}`,_=Math.round(100*t)/100,p=Math.round(100*n)/100,y=Math.round(100*i)/100;console.log(`${h} || ${m} || ${`LOAD: ${_} | OCT: ${p} | ALL: ${y}`}`)}(this,p-_,y-p,y-_)},zm.prototype.isRenderable=function(e){return e.isRenderable(this._frameNumber)},zm.prototype.isDestroyed=function(){return!1},zm.prototype.destroy=function(){const 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(),Ye(this)};const o1={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};zm.getApproximateTextureMemoryByteLength=function(e,t,n,i){let o=0;const r=n.length;for(let s=0;s<r;s++){const l=i[s],u=xn.getComponentCount(n[s]);o+=qne.getApproximateTextureMemoryByteLength(e,t,u,l)}return o};const $ne=zm,Ik=Object.freeze({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"});function uA(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}function Vtt(e,t,n){const{id:i,textureUniform:o,image:r}=t,s=n.webgl2?r1(o,r,n):function Htt(e,t,n){const{typedArray:i,sampler:o}=e,r=Kne(o),s=o.wrapS===$i.REPEAT||o.wrapS===$i.MIRRORED_REPEAT||o.wrapT===$i.REPEAT||o.wrapT===$i.MIRRORED_REPEAT,{width:a,height:l}=c(i)?e:t,u=[a,l].every(O.isPowerOfTwo);if(!r&&!s||u)return r1(e,t,n);if(!c(i))return r1(e,JO(t),n);if(e.pixelDatatype===bt.UNSIGNED_BYTE){const h=function ktt(e,t,n){const 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}(i,a,l);return r1({sampler:o},JO(h),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."),Qne(e,n)}(o,r,n),a=e._textures[i];c(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function r1(e,t,n){const{typedArray:i,sampler:o}=e,r=c(i)?Qne(e,n):new jn({context:n,source:t,sampler:o});return Kne(o)&&r.generateMipmap(),r}function Kne(e){return[ei.NEAREST_MIPMAP_NEAREST,ei.NEAREST_MIPMAP_LINEAR,ei.LINEAR_MIPMAP_NEAREST,ei.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function Qne(e,t){const{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:s,sampler:a}=e;return new jn({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:o,height:r},sampler:a,flipY:!1})}uA.prototype.getTexture=function(e){return this._textures[e]},uA.prototype.loadTexture2D=function(e,t){c(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):function ztt(e,t,n){n.resource.fetchImage().then(function(i){e._loadedImages.push({id:t,image:i,textureUniform:n})}).catch(function(){const i=e._textures[t];c(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture})}(this,e,t)},uA.prototype.update=function(e){if(e.frameNumber===this._lastUpdatedFrame)return;this._lastUpdatedFrame=e.frameNumber;const t=e.context;this._defaultTexture=t.defaultTexture;const n=this._loadedImages;for(let i=0;i<n.length;i++)Vtt(this,n[i],t);n.length=0},uA.prototype.isDestroyed=function(){return!1},uA.prototype.destroy=function(){const e=this._textures;for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];n!==this._defaultTexture&&n.destroy()}return Ye(this)};const Gtt=uA;function aE(e){e=g(e,g.EMPTY_OBJECT),this.mode=g(e.mode,tR.MODIFY_MATERIAL),this.lightingModel=e.lightingModel,this.uniforms=g(e.uniforms,g.EMPTY_OBJECT),this.varyings=g(e.varyings,g.EMPTY_OBJECT),this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.translucencyMode=g(e.translucencyMode,iR.INHERIT),this._textureManager=new Gtt,this._defaultTexture=void 0,this.uniformMap=function jtt(e){const t=e.uniforms,n={};for(const i in t)if(t.hasOwnProperty(i)){const o=t[i],r=o.type;if(r===Ik.SAMPLER_CUBE)throw new E("CustomShader does not support samplerCube uniforms");r===Ik.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=Wtt(e,i)):n[i]=qtt(e,i)}return n}(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},function Ytt(e){const t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.metadata.(\w+)/g;let o;const r=e.vertexShaderText;c(r)&&(o=e.usedVariablesVertex.attributeSet,ay(r,t,o),o=e.usedVariablesVertex.featureIdSet,ay(r,n,o),o=e.usedVariablesVertex.metadataSet,ay(r,i,o));const s=e.fragmentShaderText;c(s)&&(o=e.usedVariablesFragment.attributeSet,ay(s,t,o),o=e.usedVariablesFragment.featureIdSet,ay(s,n,o),o=e.usedVariablesFragment.metadataSet,ay(s,i,o),ay(s,/material\.(\w+)/g,e.usedVariablesFragment.materialSet))}(this),function Xtt(e){const t=e.usedVariablesVertex.attributeSet;Fa(t,"position","positionMC","vertex"),Fa(t,"normal","normalMC","vertex"),Fa(t,"tangent","tangentMC","vertex"),Fa(t,"bitangent","bitangentMC","vertex"),Fa(t,"positionWC","positionMC","vertex"),Fa(t,"positionEC","positionMC","vertex"),Fa(t,"normalEC","normalMC","vertex"),Fa(t,"tangentEC","tangentMC","vertex"),Fa(t,"bitangentEC","bitangentMC","vertex");const n=e.usedVariablesFragment.attributeSet;Fa(n,"position","positionEC","fragment"),Fa(n,"normal","normalEC","fragment"),Fa(n,"tangent","tangentEC","fragment"),Fa(n,"bitangent","bitangentEC","fragment"),Fa(n,"normalMC","normalEC","fragment"),Fa(n,"tangentMC","tangentEC","fragment"),Fa(n,"bitangentMC","bitangentEC","fragment")}(this)}function Wtt(e,t){return function(){return g(e._textureManager.getTexture(t),e._defaultTexture)}}function qtt(e,t){return function(){return e.uniforms[t].value}}function ay(e,t,n){let i;for(;null!==(i=t.exec(e));)n[i[1]]=!0}function Jne(e){return/^.*MC$/.test(e)?`${e} (model coordinates)`:/^.*WC$/.test(e)?`${e} (Cartesian world coordinates)`:/^.*EC$/.test(e)?`${e} (eye coordinates)`:e}function Fa(e,t,n,i){if(e.hasOwnProperty(t)){const o=`${Jne(t)} is not available in the ${i} shader. Did you mean ${Jne(n)} instead?`;throw new E(o)}}aE.prototype.setUniform=function(e,t){if(T.typeOf.string("uniformName",e),T.defined("value",t),!c(this.uniforms[e]))throw new E(`Uniform ${e} must be declared in the CustomShader constructor.`);const n=this.uniforms[e];n.type===Ik.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):n.value=c(t.clone)?t.clone(n.value):t},aE.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)},aE.prototype.isDestroyed=function(){return!1},aE.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),Ye(this)};const Ztt=aE;function Tf(e){e=g(e,g.EMPTY_OBJECT),this._ready=!1,this._provider=g(e.provider,Tf.DefaultProvider),this._traversal=void 0,this._shape=void 0,this._shapeVisible=!1,this._paddingBefore=new f,this._paddingAfter=new f,this._minBounds=new f,this._minBoundsOld=new f,this._maxBounds=new f,this._maxBoundsOld=new f,this._minClippingBounds=new f,this._minClippingBoundsOld=new f,this._maxClippingBounds=new f,this._maxClippingBoundsOld=new f,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this._compoundModelMatrix=new k,this._compoundModelMatrixOld=new k,this._customShader=g(e.customShader,Tf.DefaultCustomShader),this._customShaderCompilationEvent=new Ue,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=e.clock,this._transformPositionWorldToUv=new k,this._transformPositionUvToWorld=new k,this._transformDirectionWorldToLocal=new ne,this._transformNormalLocalToWorld=new ne,this._stepSizeUv=1,this._jitter=!0,this._nearestSampling=!1,this._levelBlendFactor=0,this._stepSizeMultiplier=1,this._depthTest=!0,this._useLogDepth=void 0,this._screenSpaceError=4,this._debugPolylines=new GS,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1,this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new G,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new G,megatextureTextures:[],megatextureSliceDimensions:new G,megatextureTileDimensions:new G,megatextureVoxelSizeUv:new G,megatextureSliceSizeUv:new G,megatextureTileSizeUv:new G,dimensions:new f,paddingBefore:new f,paddingAfter:new f,transformPositionViewToUv:new k,transformPositionUvToView:new k,transformDirectionViewToLocal:new ne,transformNormalLocalToWorld:new ne,cameraPositionUv:new f,ndcSpaceAxisAlignedBoundingBox:new fe,clippingPlanesTexture:void 0,clippingPlanesMatrix:new k,stepSize:0,pickColor:new X},this._shapeDefinesOld={},this._uniformMap={};const t=this._uniforms,n=this._uniformMap;for(const o in t)t.hasOwnProperty(o)&&(n[`u_${o}`]=function(){return t[o]});!function $tt(e,t){const{shape:n,minBounds:i=lA.getMinBounds(n),maxBounds:o=lA.getMaxBounds(n)}=t;e.minBounds=i,e.maxBounds=o,e.minClippingBounds=lA.getMinBounds(n),e.maxClippingBounds=lA.getMaxBounds(n),eie(e,t);const r=lA.getShapeConstructor(n);e._shape=new r,e._shapeVisible=tie(e,e._shape,t)}(this,this._provider)}Object.defineProperties(Tf.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){T.typeOf.object("modelMatrix",e),this._modelMatrix=k.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){T.typeOf.bool("show",e),this._disableRender=!e}},disableUpdate:{get:function(){return this._disableUpdate},set:function(e){T.typeOf.bool("disableUpdate",e),this._disableUpdate=e}},debugDraw:{get:function(){return this._debugDraw},set:function(e){T.typeOf.bool("debugDraw",e),this._debugDraw=e}},depthTest:{get:function(){return this._depthTest},set:function(e){T.typeOf.bool("depthTest",e),this._depthTest!==e&&(this._depthTest=e,this._shaderDirty=!0)}},jitter:{get:function(){return this._jitter},set:function(e){T.typeOf.bool("jitter",e),this._jitter!==e&&(this._jitter=e,this._shaderDirty=!0)}},nearestSampling:{get:function(){return this._nearestSampling},set:function(e){T.typeOf.bool("nearestSampling",e),this._nearestSampling!==e&&(this._nearestSampling=e,this._shaderDirty=!0)}},levelBlendFactor:{get:function(){return this._levelBlendFactor},set:function(e){T.typeOf.number("levelBlendFactor",e),this._levelBlendFactor=O.clamp(e,0,1)}},screenSpaceError:{get:function(){return this._screenSpaceError},set:function(e){T.typeOf.number("screenSpaceError",e),this._screenSpaceError=e}},stepSize:{get:function(){return this._stepSizeMultiplier},set:function(e){T.typeOf.number("stepSize",e),this._stepSizeMultiplier=e}},minBounds:{get:function(){return this._minBounds},set:function(e){T.defined("minBounds",e),this._minBounds=f.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){T.defined("maxBounds",e),this._maxBounds=f.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){T.defined("minClippingBounds",e),this._minClippingBounds=f.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){T.defined("maxClippingBounds",e),this._maxClippingBounds=f.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){Bd.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(this._customShader!==e){const t=this._uniformMap,i=this._customShader.uniformMap;for(const o in i)i.hasOwnProperty(o)&&delete t[o];this._customShader=c(e)?e:Tf.DefaultCustomShader,this._shaderDirty=!0}}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}}});const Ktt=new f,Qtt=new fe,Jtt=new fe,ent=new f,tnt=new f,nnt=new ne,int=new ne,ont=new k,rnt=new k,snt=new k,ant=k.fromRotationTranslation(ne.fromUniformScale(.5,new ne),new f(.5,.5,.5),new k),cnt=k.fromRotationTranslation(ne.fromUniformScale(2,new ne),new f(-1,-1,-1),new k);function eie(e,t){const n=g(t.shapeTransform,k.IDENTITY),i=g(t.globalTransform,k.IDENTITY);return k.multiplyTransformation(i,e._modelMatrix,e._compoundModelMatrix),k.multiplyTransformation(e._compoundModelMatrix,n,e._compoundModelMatrix),cE(e,"_compoundModelMatrix","_compoundModelMatrixOld")+cE(e,"_minBounds","_minBoundsOld")+cE(e,"_maxBounds","_maxBoundsOld")+cE(e,"_minClippingBounds","_minClippingBoundsOld")+cE(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function cE(e,t,n){const i=e[t],o=e[n],r=!i.equals(o);return r&&i.clone(o),r?1:0}function tie(e,t,n){if(!t.update(e._compoundModelMatrix,e.minBounds,e.maxBounds,e.minClippingBounds,e.maxClippingBounds))return!1;const o=t.shapeTransform,r=k.inverse(o,ont),s=k.getRotation(o,nnt),a=k.getScale(o,ent),l=f.maximumComponent(a),u=f.divideByScalar(a,l,tnt),d=ne.multiplyByScale(s,u,int);return e._stepSizeUv=t.computeApproximateStepSize(n.dimensions),e._transformPositionWorldToUv=k.multiplyTransformation(ant,r,e._transformPositionWorldToUv),e._transformPositionUvToWorld=k.multiplyTransformation(o,cnt,e._transformPositionUvToWorld),e._transformDirectionWorldToLocal=k.getMatrix3(r,e._transformDirectionWorldToLocal),e._transformNormalLocalToWorld=ne.inverseTranspose(d,e._transformNormalLocalToWorld),!0}Tf.prototype.update=function(e){const t=this._provider;this._customShader.update(e);const n=e.context;if(!this._ready)return function lnt(e,t,n){const i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=X.clone(e._pickId.color,i.pickColor);const{shaderDefines:o,shaderUniforms:r}=e._shape;e._shapeDefinesOld=zt(o,!0);const s=e._uniformMap;for(const a in r)if(r.hasOwnProperty(a)){const l=`u_${a}`;c(s[l])&&gn(`VoxelPrimitive: Uniform name "${l}" is already defined`),s[l]=function(){return r[a]}}i.dimensions=f.clone(t.dimensions,i.dimensions),e._paddingBefore=f.clone(g(t.paddingBefore,f.ZERO),e._paddingBefore),i.paddingBefore=f.clone(e._paddingBefore,i.paddingBefore),e._paddingAfter=f.clone(g(t.paddingAfter,f.ZERO),e._paddingBefore),i.paddingAfter=f.clone(e._paddingAfter,i.paddingAfter),e._traversal=function unt(e,t,n){const i=f.clone(t.dimensions,Ktt);f.add(i,e._paddingBefore,i),f.add(i,e._paddingAfter,i);const o=t.maximumTileCount,r=c(o)?$ne.getApproximateTextureMemoryByteLength(o,i,t.types,t.componentTypes):void 0,s=g(t.keyframeCount,1);return new $ne(e,n,i,t.types,t.componentTypes,s,r)}(e,t,n),function dnt(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=G.clone(e.internalNodeTexelSizeUv,t.octreeInternalNodeTexelSizeUv),t.octreeInternalNodeTilesPerRow=e.internalNodeTilesPerRow;const 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=G.clone(i.sliceCountPerRegion,t.megatextureSliceDimensions),t.megatextureTileDimensions=G.clone(i.regionCountPerMegatexture,t.megatextureTileDimensions),t.megatextureVoxelSizeUv=G.clone(i.voxelSizeUv,t.megatextureVoxelSizeUv),t.megatextureSliceSizeUv=G.clone(i.sliceSizeUv,t.megatextureSliceSizeUv),t.megatextureTileSizeUv=G.clone(i.regionSizeUv,t.megatextureTileSizeUv)}(e._traversal,i)}(this,t,n),void e.afterRender.push(()=>(this._ready=!0,!0));const i=eie(this,t),o=this._shape;if(i&&(this._shapeVisible=tie(this,o,t),function fnt(e,t){const n=t.shaderDefines,i=Object.keys(n).some(o=>n[o]!==e._shapeDefinesOld[o]);return i&&(e._shapeDefinesOld=zt(n,!0)),i}(this,o)&&(this._shaderDirty=!0)),!this._shapeVisible)return;const r=function hnt(e,t){if(!c(e)||!c(t))return 0;let i,n=t.currentTime,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));const r=se.secondsDifference(i.stop,i.start);return o+se.secondsDifference(n,i.start)/r}(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&&function Tnt(e,t){const n=e._traversal,i=e._debugPolylines;function o(l,u,d,h){i.add({positions:[l,u],width:h,material:Ea.fromType("Color",{color:d})})}function r(l,u,d){const h=l.computeCorners();o(h[0],h[1],u,d),o(h[2],h[3],u,d),o(h[4],h[5],u,d),o(h[6],h[7],u,d),o(h[0],h[2],u,d),o(h[4],h[6],u,d),o(h[1],h[3],u,d),o(h[5],h[7],u,d),o(h[0],h[4],u,d),o(h[2],h[6],u,d),o(h[1],h[5],u,d),o(h[3],h[7],u,d)}i.removeAll(),r(e._shape.orientedBoundingBox,X.WHITE,5),function s(l){if(!n.isRenderable(l))return;const u=l.level,h=Math.max(1,5/Math.pow(2,u));if(r(l.orientedBoundingBox,[X.RED,X.LIME,X.BLUE][u%3],h),c(l.children))for(let p=0;p<8;p++)s(l.children[p])}(n.rootNode);o(f.ZERO,ynt,X.RED,10),o(f.ZERO,bnt,X.LIME,10),o(f.ZERO,Ant,X.BLUE,10),i.update(t)}(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),function pnt(e,t){const n=e.clippingPlanes;if(!c(n))return!1;n.update(t);const{clippingPlanesState:i,enabled:o}=n;if(o){const r=e._uniforms;r.clippingPlanesTexture=n.texture,r.clippingPlanesMatrix=k.transpose(k.multiplyTransformation(k.inverse(n.modelMatrix,r.clippingPlanesMatrix),e._transformPositionUvToWorld,r.clippingPlanesMatrix),r.clippingPlanesMatrix)}return(e._clippingPlanesState!==i||e._clippingPlanesEnabled!==o)&&(e._clippingPlanesState=i,e._clippingPlanesEnabled=o,!0)}(this,e)&&(this._shaderDirty=!0);const d=this._uniforms;c(s.leafNodeTexture)&&(d.octreeLeafNodeTexture=s.leafNodeTexture,d.octreeLeafNodeTexelSizeUv=G.clone(s.leafNodeTexelSizeUv,d.octreeLeafNodeTexelSizeUv),d.octreeLeafNodeTilesPerRow=s.leafNodeTilesPerRow),this._shaderDirty&&(jet(this,n),this._shaderDirty=!1);const _=function gnt(e,t,n){const i=k.fromRotationTranslation(e.halfAxes,e.center,rnt),o=k.multiply(t,i,snt);let u,r=+Number.MAX_VALUE,s=-Number.MAX_VALUE,a=+Number.MAX_VALUE,l=-Number.MAX_VALUE;const d=_nt,h=nie.length;for(u=0;u<h;u++)k.multiplyByVector(o,nie[u],d[u]);for(u=0;u<h;u++){const m=d[u];if(m.z>=-m.w){const _=m.x/m.w,p=m.y/m.w;r=Math.min(r,_),s=Math.max(s,_),a=Math.min(a,p),l=Math.max(l,p)}else for(let _=0;_<3;_++){const y=d[mnt[3*u+_]];if(y.z>=-y.w){const A=m.z+m.w,w=fe.lerp(m,y,A/(A-(y.z+y.w)),Qtt),v=w.x/w.w,D=w.y/w.w;r=Math.min(r,v),s=Math.max(s,v),a=Math.min(a,D),l=Math.max(l,D)}}}return r=O.clamp(r,-1,1),a=O.clamp(a,-1,1),s=O.clamp(s,-1,1),l=O.clamp(l,-1,1),n=fe.fromElements(r,a,s,l,n)}(o.orientedBoundingBox,n.uniformState.viewProjection,Jtt);if(1===_.x||1===_.y||-1===_.z||-1===_.w)return;d.ndcSpaceAxisAlignedBoundingBox=fe.clone(_,d.ndcSpaceAxisAlignedBoundingBox),d.transformPositionViewToUv=k.multiplyTransformation(this._transformPositionWorldToUv,n.uniformState.inverseView,d.transformPositionViewToUv),d.transformPositionUvToView=k.multiplyTransformation(n.uniformState.view,this._transformPositionUvToWorld,d.transformPositionUvToView),d.transformDirectionViewToLocal=ne.multiply(this._transformDirectionWorldToLocal,n.uniformState.inverseViewRotation,d.transformDirectionViewToLocal),d.transformNormalLocalToWorld=ne.clone(this._transformNormalLocalToWorld,d.transformNormalLocalToWorld),d.cameraPositionUv=k.multiplyByPoint(this._transformPositionWorldToUv,e.camera.positionWC,d.cameraPositionUv),d.stepSize=this._stepSizeUv*this._stepSizeMultiplier;const w=e.passes.pick?this._drawCommandPick:this._drawCommand;w.boundingVolume=o.boundingSphere,e.commandList.push(w)},Tf.prototype.isDestroyed=function(){return!1},Tf.prototype.destroy=function(){const e=this._drawCommand;c(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());const t=this._drawCommandPick;return c(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(),Ye(this)};const nie=new Array(new fe(-1,-1,-1,1),new fe(1,-1,-1,1),new fe(-1,1,-1,1),new fe(1,1,-1,1),new fe(-1,-1,1,1),new fe(1,-1,1,1),new fe(-1,1,1,1),new fe(1,1,1,1)),mnt=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),_nt=new Array(new fe,new fe,new fe,new fe,new fe,new fe,new fe,new fe),Pk=3e7,ynt=new f(Pk,0,0),bnt=new f(0,Pk,0),Ant=new f(0,0,Pk);function iie(){this.ready=!0,this.shape=lA.BOX,this.dimensions=new f(1,1,1),this.names=["data"],this.types=[xn.SCALAR],this.componentTypes=[Dn.FLOAT32],this.maximumTileCount=1}Tf.DefaultCustomShader=new Ztt({fragmentShaderText:"void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)\n{\n material.diffuse = vec3(1.0);\n material.alpha = 1.0;\n}"}),iie.prototype.requestData=function(e){if(!((c(e)?g(e.tileLevel,0):0)>=1))return Promise.resolve([new Float32Array(1)])},Tf.DefaultProvider=new iie;const oie=Tf,rie=new ne,sie=new ne,aie=new ne,xnt=new k,s1=new f,cie=new f,Ok=new f,Lk=new f,lie=new f,uie=new f,dA=new se;function lE(e,t,n){T.defined("entity",e),T.defined("scene",t),this.entity=e,this.scene=t,this.ellipsoid=g(n,ge.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new f,this._defaultOffset3D=void 0,this._offset3D=new f}Object.defineProperties(lE,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=f.clone(e,new f)}}}),lE.defaultOffset3D=new f(-14e3,3500,3500);const a1=new Hx,wnt=new f;lE.prototype.update=function(e,t){T.defined("time",e);const n=this.scene,i=this.ellipsoid,o=n.mode;if(o===ce.MORPHING)return;const r=this.entity,s=r.position;if(!c(s))return;const a=r!==this._lastEntity,l=o!==this._mode,u=n.camera;let d=a||l,h=!0;if(a){const m=r.viewFrom,_=c(m);if(!_&&c(t)){a1.pitch=-O.PI_OVER_FOUR,a1.range=0;const p=s.getValue(e,wnt);if(c(p)){const y=2-1/Math.max(1,f.magnitude(p)/i.maximumRadius);a1.pitch*=y}u.viewBoundingSphere(t,a1),this.boundingSphere=t,d=!1,h=!1}else(!_||!c(m.getValue(e,this._offset3D)))&&f.clone(lE._defaultOffset3D,this._offset3D)}else!l&&this._mode!==ce.SCENE2D&&f.clone(u.position,this._offset3D);this._lastEntity=r,this._mode=o,function Ent(e,t,n,i,o,r,s){const a=e.scene.mode;let l=o.getValue(r,e._lastCartesian);if(c(l)){let h,m,_,p,y,A,u=!1,d=!1;if(a===ce.SCENE3D){se.addSeconds(r,.001,dA);let C=o.getValue(dA,s1);if(c(C)||(se.addSeconds(r,-.001,dA),C=o.getValue(dA,s1),d=!0),c(C)){let D,w=Rn.computeFixedToIcrfMatrix(r,rie),v=Rn.computeFixedToIcrfMatrix(dA,sie);c(w)&&c(v)?D=ne.transpose(w,aie):(D=Rn.computeTemeToPseudoFixedMatrix(r,aie),w=ne.transpose(D,rie),v=Rn.computeTemeToPseudoFixedMatrix(dA,sie),ne.transpose(v,v));const P=ne.multiplyByVector(w,l,lie),N=ne.multiplyByVector(v,C,uie);f.subtract(P,N,Lk);const R=1e3*f.magnitude(Lk),B=O.GRAVITATIONALPARAMETER,F=-B/(R*R-2*B/f.magnitude(P));F<0||F>1.25*s.maximumRadius?(h=cie,f.normalize(l,h),f.negate(h,h),_=f.clone(f.UNIT_Z,Ok),m=f.cross(_,h,s1),f.magnitude(m)>O.EPSILON7&&(f.normalize(h,h),f.normalize(m,m),_=f.cross(h,m,Ok),f.normalize(_,_),u=!0)):f.equalsEpsilon(l,C,O.EPSILON7)||(_=cie,f.normalize(P,_),f.normalize(N,N),m=f.cross(_,N,Ok),d&&(m=f.multiplyByScalar(m,-1,m)),f.equalsEpsilon(m,f.ZERO,O.EPSILON7)||(h=f.cross(m,_,s1),ne.multiplyByVector(D,h,h),ne.multiplyByVector(D,m,m),ne.multiplyByVector(D,_,_),f.normalize(h,h),f.normalize(m,m),f.normalize(_,_),u=!0))}}c(e.boundingSphere)&&(l=e.boundingSphere.center),i&&(p=f.clone(t.position,Lk),y=f.clone(t.direction,lie),A=f.clone(t.up,uie));const x=xnt;u?(x[0]=h.x,x[1]=h.y,x[2]=h.z,x[3]=0,x[4]=m.x,x[5]=m.y,x[6]=m.z,x[7]=0,x[8]=_.x,x[9]=_.y,x[10]=_.z,x[11]=0,x[12]=l.x,x[13]=l.y,x[14]=l.z,x[15]=0):Rn.eastNorthUpToFixedFrame(l,s,x),t._setTransform(x),i&&(f.clone(p,t.position),f.clone(y,t.direction),f.clone(A,t.up),f.cross(y,A,t.right))}if(n){const u=a===ce.SCENE2D||f.equals(e._offset3D,f.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,u)}}(this,u,d,h,s,e,i)};const Snt=lE;var uE;typeof ko<"u"&&(uE=ko),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,a){function l(S,I){return(null===S||typeof S in y)&&S===I}function u(S,I){var L;return function(){L||(L=p.a.setTimeout(function(){L=e,S()},I))}}function d(S,I){var L;return function(){clearTimeout(L),L=p.a.setTimeout(S,I)}}function h(S,I){I&&"change"!==I?"beforeChange"===I?this.pc(S):this.gb(S,I):this.qc(S)}function m(S,I){null!==I&&I.s&&I.s()}function _(S,I){var L=this.qd,M=L[v];M.ra||(this.Qb&&this.mb[I]?(L.uc(I,S,this.mb[I]),this.mb[I]=null,--this.Qb):M.I[I]||L.uc(I,S,M.J?{da:S}:L.$c(S)),S.Ja&&S.gd())}var S,I,L,M,U,z,p=typeof s<"u"?s:{};p.b=function(S,I){for(var L=S.split("."),M=p,U=0;U<L.length-1;U++)M=M[L[U]];M[L[L.length-1]]=I},p.L=function(S,I,L){S[I]=L},p.version="3.5.1",p.b("version",p.version),p.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},p.a=function(){function S(Y,Q){for(var K in Y)U.call(Y,K)&&Q(K,Y[K])}function I(Y,Q){if(Q)for(var K in Q)U.call(Q,K)&&(Y[K]=Q[K]);return Y}function L(Y,Q){return Y.__proto__=Q,Y}function M(Y,Q,K,me){var we=Y[Q].match(Z)||[];p.a.D(K.match(Z),function(le){p.a.Na(we,le,me)}),Y[Q]=we.join(" ")}var U=Object.prototype.hasOwnProperty,z={__proto__:[]}instanceof Array,j="function"==typeof Symbol,W={},q={};W[i&&/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],W.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),S(W,function(Y,Q){if(Q.length)for(var K=0,me=Q.length;K<me;K++)q[Q[K]]=Y});var ie,V={propertychange:!0},$=n&&function(){for(var Y=3,Q=n.createElement("div"),K=Q.getElementsByTagName("i");Q.innerHTML="\x3c!--[if gt IE "+ ++Y+"]><i></i><![endif]--\x3e",K[0];);return 4<Y?Y:e}(),Z=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(Y,Q,K){for(var me=0,we=Y.length;me<we;me++)Q.call(K,Y[me],me,Y)},A:"function"==typeof Array.prototype.indexOf?function(Y,Q){return Array.prototype.indexOf.call(Y,Q)}:function(Y,Q){for(var K=0,me=Y.length;K<me;K++)if(Y[K]===Q)return K;return-1},Lb:function(Y,Q,K){for(var me=0,we=Y.length;me<we;me++)if(Q.call(K,Y[me],me,Y))return Y[me];return e},Pa:function(Y,Q){var K=p.a.A(Y,Q);0<K?Y.splice(K,1):0===K&&Y.shift()},wc:function(Y){var Q=[];return Y&&p.a.D(Y,function(K){0>p.a.A(Q,K)&&Q.push(K)}),Q},Mb:function(Y,Q,K){var me=[];if(Y)for(var we=0,le=Y.length;we<le;we++)me.push(Q.call(K,Y[we],we));return me},jb:function(Y,Q,K){var me=[];if(Y)for(var we=0,le=Y.length;we<le;we++)Q.call(K,Y[we],we)&&me.push(Y[we]);return me},Nb:function(Y,Q){if(Q instanceof Array)Y.push.apply(Y,Q);else for(var K=0,me=Q.length;K<me;K++)Y.push(Q[K]);return Y},Na:function(Y,Q,K){var me=p.a.A(p.a.bc(Y),Q);0>me?K&&Y.push(Q):K||Y.splice(me,1)},Ba:z,extend:I,setPrototypeOf:L,Ab:z?L:I,P:S,Ga:function(Y,Q,K){if(!Y)return Y;var we,me={};for(we in Y)U.call(Y,we)&&(me[we]=Q.call(K,Y[we],we,Y));return me},Tb:function(Y){for(;Y.firstChild;)p.removeNode(Y.firstChild)},Yb:function(Y){for(var Q=((Y=p.a.la(Y))[0]&&Y[0].ownerDocument||n).createElement("div"),K=0,me=Y.length;K<me;K++)Q.appendChild(p.oa(Y[K]));return Q},Ca:function(Y,Q){for(var K=0,me=Y.length,we=[];K<me;K++){var le=Y[K].cloneNode(!0);we.push(Q?p.oa(le):le)}return we},va:function(Y,Q){if(p.a.Tb(Y),Q)for(var K=0,me=Q.length;K<me;K++)Y.appendChild(Q[K])},Xc:function(Y,Q){var K=Y.nodeType?[Y]:Y;if(0<K.length){for(var me=K[0],we=me.parentNode,le=0,Ae=Q.length;le<Ae;le++)we.insertBefore(Q[le],me);for(le=0,Ae=K.length;le<Ae;le++)p.removeNode(K[le])}},Ua:function(Y,Q){if(Y.length){for(Q=8===Q.nodeType&&Q.parentNode||Q;Y.length&&Y[0].parentNode!==Q;)Y.splice(0,1);for(;1<Y.length&&Y[Y.length-1].parentNode!==Q;)Y.length--;if(1<Y.length){var K=Y[0],me=Y[Y.length-1];for(Y.length=0;K!==me;)Y.push(K),K=K.nextSibling;Y.push(me)}}return Y},Zc:function(Y,Q){7>$?Y.setAttribute("selected",Q):Y.selected=Q},Db:function(Y){return null===Y||Y===e?"":Y.trim?Y.trim():Y.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(Y,Q){return!(Q.length>(Y=Y||"").length)&&Y.substring(0,Q.length)===Q},vd:function(Y,Q){if(Y===Q)return!0;if(11===Y.nodeType)return!1;if(Q.contains)return Q.contains(1!==Y.nodeType?Y.parentNode:Y);if(Q.compareDocumentPosition)return 16==(16&Q.compareDocumentPosition(Y));for(;Y&&Y!=Q;)Y=Y.parentNode;return!!Y},Sb:function(Y){return p.a.vd(Y,Y.ownerDocument.documentElement)},kd:function(Y){return!!p.a.Lb(Y,p.a.Sb)},R:function(Y){return Y&&Y.tagName&&Y.tagName.toLowerCase()},Ac:function(Y){return p.onError?function(){try{return Y.apply(this,arguments)}catch(Q){throw p.onError&&p.onError(Q),Q}}:Y},setTimeout:function(Y,Q){return setTimeout(p.a.Ac(Y),Q)},Gc:function(Y){setTimeout(function(){throw p.onError&&p.onError(Y),Y},0)},B:function(Y,Q,K){var me=p.a.Ac(K);if(K=V[Q],p.options.useOnlyNativeEvents||K||!o)if(K||"function"!=typeof Y.addEventListener){if(!(typeof Y.attachEvent<"u"))throw Error("Browser doesn't support addEventListener or attachEvent");var we=function(Ae){me.call(Y,Ae)},le="on"+Q;Y.attachEvent(le,we),p.a.K.za(Y,function(){Y.detachEvent(le,we)})}else Y.addEventListener(Q,me,!1);else ie||(ie="function"==typeof o(Y).on?"on":"bind"),o(Y)[ie](Q,me)},Fb:function(Y,Q){if(!Y||!Y.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var K;if(K=!("input"!==p.a.R(Y)||!Y.type||"click"!=Q.toLowerCase()||"checkbox"!=(K=Y.type)&&"radio"!=K),p.options.useOnlyNativeEvents||!o||K)if("function"==typeof n.createEvent){if("function"!=typeof Y.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(K=n.createEvent(q[Q]||"HTMLEvents")).initEvent(Q,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,Y),Y.dispatchEvent(K)}else if(K&&Y.click)Y.click();else{if(!(typeof Y.fireEvent<"u"))throw Error("Browser doesn't support triggering events");Y.fireEvent("on"+Q)}else o(Y).trigger(Q)},f:function(Y){return p.O(Y)?Y():Y},bc:function(Y){return p.O(Y)?Y.v():Y},Eb:function(Y,Q,K){var me;Q&&("object"==typeof Y.classList?(me=Y.classList[K?"add":"remove"],p.a.D(Q.match(Z),function(we){me.call(Y.classList,we)})):"string"==typeof Y.className.baseVal?M(Y.className,"baseVal",Q,K):M(Y,"className",Q,K))},Bb:function(Y,Q){var K=p.a.f(Q);(null===K||K===e)&&(K="");var me=p.h.firstChild(Y);!me||3!=me.nodeType||p.h.nextSibling(me)?p.h.va(Y,[Y.ownerDocument.createTextNode(K)]):me.data=K,p.a.Ad(Y)},Yc:function(Y,Q){if(Y.name=Q,7>=$)try{var K=Y.name.replace(/[&<>'"]/g,function(me){return"&#"+me.charCodeAt(0)+";"});Y.mergeAttributes(n.createElement("<input name='"+K+"'/>"),!1)}catch{}},Ad:function(Y){9<=$&&(Y=1==Y.nodeType?Y:Y.parentNode).style&&(Y.style.zoom=Y.style.zoom)},wd:function(Y){if($){var Q=Y.style.width;Y.style.width=0,Y.style.width=Q}},Pd:function(Y,Q){Y=p.a.f(Y),Q=p.a.f(Q);for(var K=[],me=Y;me<=Q;me++)K.push(me);return K},la:function(Y){for(var Q=[],K=0,me=Y.length;K<me;K++)Q.push(Y[K]);return Q},Da:function(Y){return j?Symbol(Y):Y},Zd:6===$,$d:7===$,W:$,Lc:function(Y,Q){for(var K=p.a.la(Y.getElementsByTagName("input")).concat(p.a.la(Y.getElementsByTagName("textarea"))),me="string"==typeof Q?function(Ae){return Ae.name===Q}:function(Ae){return Q.test(Ae.name)},we=[],le=K.length-1;0<=le;le--)me(K[le])&&we.push(K[le]);return we},Nd:function(Y){return"string"==typeof Y&&(Y=p.a.Db(Y))?r&&r.parse?r.parse(Y):new Function("return "+Y)():null},hc:function(Y,Q,K){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(p.a.f(Y),Q,K)},Od:function(Y,Q,K){var me=(K=K||{}).params||{},we=K.includeFields||this.Jc,le=Y;if("object"==typeof Y&&"form"===p.a.R(Y)){le=Y.action;for(var Ae=we.length-1;0<=Ae;Ae--)for(var xe=p.a.Lc(Y,we[Ae]),De=xe.length-1;0<=De;De--)me[xe[De].name]=xe[De].value}Q=p.a.f(Q);var qe=n.createElement("form");for(var $e in qe.style.display="none",qe.action=le,qe.method="post",Q)(Y=n.createElement("input")).type="hidden",Y.name=$e,Y.value=p.a.hc(p.a.f(Q[$e])),qe.appendChild(Y);S(me,function(ot,kt){var sn=n.createElement("input");sn.type="hidden",sn.name=ot,sn.value=kt,qe.appendChild(sn)}),n.body.appendChild(qe),K.submitter?K.submitter(qe):qe.submit(),setTimeout(function(){qe.parentNode.removeChild(qe)},0)}}}(),p.b("utils",p.a),p.b("utils.arrayForEach",p.a.D),p.b("utils.arrayFirst",p.a.Lb),p.b("utils.arrayFilter",p.a.jb),p.b("utils.arrayGetDistinctValues",p.a.wc),p.b("utils.arrayIndexOf",p.a.A),p.b("utils.arrayMap",p.a.Mb),p.b("utils.arrayPushAll",p.a.Nb),p.b("utils.arrayRemoveItem",p.a.Pa),p.b("utils.cloneNodes",p.a.Ca),p.b("utils.createSymbolOrString",p.a.Da),p.b("utils.extend",p.a.extend),p.b("utils.fieldsIncludedWithJsonPost",p.a.Jc),p.b("utils.getFormFields",p.a.Lc),p.b("utils.objectMap",p.a.Ga),p.b("utils.peekObservable",p.a.bc),p.b("utils.postJson",p.a.Od),p.b("utils.parseJson",p.a.Nd),p.b("utils.registerEventHandler",p.a.B),p.b("utils.stringifyJson",p.a.hc),p.b("utils.range",p.a.Pd),p.b("utils.toggleDomNodeCssClass",p.a.Eb),p.b("utils.triggerEvent",p.a.Fb),p.b("utils.unwrapObservable",p.a.f),p.b("utils.objectForEach",p.a.P),p.b("utils.addOrRemoveItem",p.a.Na),p.b("utils.setTextContent",p.a.Bb),p.b("unwrap",p.a.f),Function.prototype.bind||(Function.prototype.bind=function(S){var I=this;if(1===arguments.length)return function(){return I.apply(S,arguments)};var L=Array.prototype.slice.call(arguments,1);return function(){var M=L.slice(0);return M.push.apply(M,arguments),I.apply(S,M)}}),p.a.g=new function(){var M,U,S=0,I="__ko__"+(new Date).getTime(),L={};return p.a.W?(M=function(z,j){var W=z[I];if(!W||"null"===W||!L[W]){if(!j)return e;W=z[I]="ko"+S++,L[W]={}}return L[W]},U=function(z){var j=z[I];return!!j&&(delete L[j],z[I]=null,!0)}):(M=function(z,j){var W=z[I];return!W&&j&&(W=z[I]={}),W},U=function(z){return!!z[I]&&(delete z[I],!0)}),{get:function(z,j){var W=M(z,!1);return W&&W[j]},set:function(z,j,W){(z=M(z,W!==e))&&(z[j]=W)},Ub:function(z,j,W){return(z=M(z,!0))[j]||(z[j]=W)},clear:U,Z:function(){return S+++I}}},p.b("utils.domData",p.a.g),p.b("utils.domData.clear",p.a.g.clear),p.a.K=new function(){function S(j,W){var q=p.a.g.get(j,M);return q===e&&W&&p.a.g.set(j,M,q=[]),q}function I(j){if(W=S(j,!1))for(var W=W.slice(0),q=0;q<W.length;q++)W[q](j);p.a.g.clear(j),p.a.K.cleanExternalData(j),z[j.nodeType]&&L(j.childNodes,!0)}function L(j,W){for(var V,q=[],$=0;$<j.length;$++)if((!W||8===j[$].nodeType)&&(I(q[q.length]=V=j[$]),j[$]!==V))for(;$--&&-1==p.a.A(q,j[$]););}var M=p.a.g.Z(),U={1:!0,8:!0,9:!0},z={1:!0,9:!0};return{za:function(j,W){if("function"!=typeof W)throw Error("Callback must be a function");S(j,!0).push(W)},yb:function(j,W){var q=S(j,!1);q&&(p.a.Pa(q,W),0==q.length&&p.a.g.set(j,M,e))},oa:function(j){return p.u.G(function(){U[j.nodeType]&&(I(j),z[j.nodeType]&&L(j.getElementsByTagName("*")))}),j},removeNode:function(j){p.oa(j),j.parentNode&&j.parentNode.removeChild(j)},cleanExternalData:function(j){o&&"function"==typeof o.cleanData&&o.cleanData([j])}}},p.oa=p.a.K.oa,p.removeNode=p.a.K.removeNode,p.b("cleanNode",p.oa),p.b("removeNode",p.removeNode),p.b("utils.domNodeDisposal",p.a.K),p.b("utils.domNodeDisposal.addDisposeCallback",p.a.K.za),p.b("utils.domNodeDisposal.removeDisposeCallback",p.a.K.yb),S=[0,"",""],U={thead:I=[1,"<table>","</table>"],tbody:I,tfoot:I,tr:[2,"<table><tbody>","</tbody></table>"],td:L=[3,"<table><tbody><tr>","</tr></tbody></table>"],th:L,option:M=[1,"<select multiple='multiple'>","</select>"],optgroup:M},z=8>=p.a.W,p.a.ua=function(j,W){var q;if(o){if(o.parseHTML)q=o.parseHTML(j,W)||[];else if((q=o.clean([j],W))&&q[0]){for(var V=q[0];V.parentNode&&11!==V.parentNode.nodeType;)V=V.parentNode;V.parentNode&&V.parentNode.removeChild(V)}}else{(q=W)||(q=n),V=q.parentWindow||q.defaultView||t;var ie,$=p.a.Db(j).toLowerCase(),Z=q.createElement("div");for(ie=($=$.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&U[$[1]]||S,$=ie[0],ie="ignored<div>"+ie[1]+j+ie[2]+"</div>","function"==typeof V.innerShiv?Z.appendChild(V.innerShiv(ie)):(z&&q.body.appendChild(Z),Z.innerHTML=ie,z&&Z.parentNode.removeChild(Z));$--;)Z=Z.lastChild;q=p.a.la(Z.lastChild.childNodes)}return q},p.a.Md=function(j,W){var q=p.a.ua(j,W);return q.length&&q[0].parentElement||p.a.Yb(q)},p.a.fc=function(j,W){if(p.a.Tb(j),null!==(W=p.a.f(W))&&W!==e)if("string"!=typeof W&&(W=W.toString()),o)o(j).html(W);else for(var q=p.a.ua(W,j.ownerDocument),V=0;V<q.length;V++)j.appendChild(q[V])},p.b("utils.parseHtmlFragment",p.a.ua),p.b("utils.setHtml",p.a.fc),p.aa=function(){function S(L,M){if(L)if(8==L.nodeType)null!=(U=p.aa.Uc(L.nodeValue))&&M.push({ud:L,Kd:U});else if(1==L.nodeType)for(var U=0,z=L.childNodes,j=z.length;U<j;U++)S(z[U],M)}var I={};return{Xb:function(L){if("function"!=typeof L)throw Error("You can only pass a function to ko.memoization.memoize()");var M=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return I[M]=L,"\x3c!--[ko_memo:"+M+"]--\x3e"},bd:function(L,M){var U=I[L];if(U===e)throw Error("Couldn't find any memo with ID "+L+". Perhaps it's already been unmemoized.");try{return U.apply(null,M||[]),!0}finally{delete I[L]}},cd:function(L,M){var U=[];S(L,U);for(var z=0,j=U.length;z<j;z++){var W=U[z].ud,q=[W];M&&p.a.Nb(q,M),p.aa.bd(U[z].Kd,q),W.nodeValue="",W.parentNode&&W.parentNode.removeChild(W)}},Uc:function(L){return(L=L.match(/^\[ko_memo\:(.*?)\]$/))?L[1]:null}}}(),p.b("memoization",p.aa),p.b("memoization.memoize",p.aa.Xb),p.b("memoization.unmemoize",p.aa.bd),p.b("memoization.parseMemoText",p.aa.Uc),p.b("memoization.unmemoizeDomNodeAndDescendants",p.aa.cd),p.na=function(){function S(){if(U)for(var V,W=U,q=0;j<U;)if(V=M[j++]){if(j>W){if(5e3<=++q){j=U,p.a.Gc(Error("'Too much recursion' after processing "+q+" task groups."));break}W=U}try{V()}catch($){p.a.Gc($)}}}function I(){S(),j=U=M.length=0}var L,W,q,M=[],U=0,z=1,j=0;return t.MutationObserver?(W=I,q=n.createElement("div"),new MutationObserver(W).observe(q,{attributes:!0}),L=function(){q.classList.toggle("foo")}):L=n&&"onreadystatechange"in n.createElement("script")?function(W){var q=n.createElement("script");q.onreadystatechange=function(){q.onreadystatechange=null,n.documentElement.removeChild(q),q=null,W()},n.documentElement.appendChild(q)}:function(W){setTimeout(W,0)},{scheduler:L,zb:function(W){return U||p.na.scheduler(I),M[U++]=W,z++},cancel:function(W){(W-=z-U)>=j&&W<U&&(M[W]=null)},resetForTesting:function(){var W=U-j;return j=U=M.length=0,W},Sd:S}}(),p.b("tasks",p.na),p.b("tasks.schedule",p.na.zb),p.b("tasks.runEarly",p.na.Sd),p.Ta={throttle:function(S,I){S.throttleEvaluation=I;var L=null;return p.$({read:S,write:function(M){clearTimeout(L),L=p.a.setTimeout(function(){S(M)},I)}})},rateLimit:function(S,I){var L,M,U;"number"==typeof I?L=I:(L=I.timeout,M=I.method),S.Hb=!1,U="function"==typeof M?M:"notifyWhenChangesStop"==M?d:u,S.ub(function(z){return U(z,L,I)})},deferred:function(S,I){if(!0!==I)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");S.Hb||(S.Hb=!0,S.ub(function(L){var M,U=!1;return function(){if(!U){p.na.cancel(M),M=p.na.zb(L);try{U=!0,S.notifySubscribers(e,"dirty")}finally{U=!1}}}}))},notify:function(S,I){S.equalityComparer="always"==I?null:l}};var y={undefined:1,boolean:1,number:1,string:1};p.b("extenders",p.Ta),p.ic=function(S,I,L){this.da=S,this.lc=I,this.mc=L,this.Ib=!1,this.fb=this.Jb=null,p.L(this,"dispose",this.s),p.L(this,"disposeWhenNodeIsRemoved",this.l)},p.ic.prototype.s=function(){this.Ib||(this.fb&&p.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},p.ic.prototype.l=function(S){this.Jb=S,p.a.K.za(S,this.fb=this.s.bind(this))},p.T=function(){p.a.Ab(this,A),A.qb(this)};var A={qb:function(S){S.U={change:[]},S.sc=1},subscribe:function(S,I,L){var M=this;L=L||"change";var U=new p.ic(M,I?S.bind(I):S,function(){p.a.Pa(M.U[L],U),M.hb&&M.hb(L)});return M.Qa&&M.Qa(L),M.U[L]||(M.U[L]=[]),M.U[L].push(U),U},notifySubscribers:function(S,I){if("change"===(I=I||"change")&&this.Gb(),this.Wa(I)){var L="change"===I&&this.ed||this.U[I].slice(0);try{p.u.xc();for(var U,M=0;U=L[M];++M)U.Ib||U.lc(S)}finally{p.u.end()}}},ob:function(){return this.sc},Dd:function(S){return this.ob()!==S},Gb:function(){++this.sc},ub:function(S){var M,U,z,j,W,I=this,L=p.O(I);I.gb||(I.gb=I.notifySubscribers,I.notifySubscribers=h);var q=S(function(){I.Ja=!1,L&&j===I&&(j=I.nc?I.nc():I());var V=U||W&&I.sb(z,j);W=U=M=!1,V&&I.gb(z=j)});I.qc=function(V,$){$&&I.Ja||(W=!$),I.ed=I.U.change.slice(0),I.Ja=M=!0,j=V,q()},I.pc=function(V){M||(z=V,I.gb(V,"beforeChange"))},I.rc=function(){W=!0},I.gd=function(){I.sb(z,I.v(!0))&&(U=!0)}},Wa:function(S){return this.U[S]&&this.U[S].length},Bd:function(S){if(S)return this.U[S]&&this.U[S].length||0;var I=0;return p.a.P(this.U,function(L,M){"dirty"!==L&&(I+=M.length)}),I},sb:function(S,I){return!this.equalityComparer||!this.equalityComparer(S,I)},toString:function(){return"[object Object]"},extend:function(S){var I=this;return S&&p.a.P(S,function(L,M){var U=p.Ta[L];"function"==typeof U&&(I=U(I,M)||I)}),I}};p.L(A,"init",A.qb),p.L(A,"subscribe",A.subscribe),p.L(A,"extend",A.extend),p.L(A,"getSubscriptionsCount",A.Bd),p.a.Ba&&p.a.setPrototypeOf(A,Function.prototype),p.T.fn=A,p.Qc=function(S){return null!=S&&"function"==typeof S.subscribe&&"function"==typeof S.notifySubscribers},p.b("subscribable",p.T),p.b("isSubscribable",p.Qc),p.S=p.u=function(){function S(z){L.push(M),M=z}function I(){M=L.pop()}var M,L=[],U=0;return{xc:S,end:I,cc:function(z){if(M){if(!p.Qc(z))throw Error("Only subscribable things can act as dependencies");M.od.call(M.pd,z,z.fd||(z.fd=++U))}},G:function(z,j,W){try{return S(),z.apply(j,W||[])}finally{I()}},qa:function(){if(M)return M.o.qa()},Va:function(){if(M)return M.o.Va()},Ya:function(){if(M)return M.Ya},o:function(){if(M)return M.o}}}(),p.b("computedContext",p.S),p.b("computedContext.getDependenciesCount",p.S.qa),p.b("computedContext.getDependencies",p.S.Va),p.b("computedContext.isInitial",p.S.Ya),p.b("computedContext.registerDependency",p.S.cc),p.b("ignoreDependencies",p.Yd=p.u.G);var x=p.a.Da("_latestValue");p.ta=function(S){function I(){return 0<arguments.length?(I.sb(I[x],arguments[0])&&(I.ya(),I[x]=arguments[0],I.xa()),this):(p.u.cc(I),I[x])}return I[x]=S,p.a.Ba||p.a.extend(I,p.T.fn),p.T.fn.qb(I),p.a.Ab(I,C),p.options.deferUpdates&&p.Ta.deferred(I,!0),I};var C={equalityComparer:l,v:function(){return this[x]},xa:function(){this.notifySubscribers(this[x],"spectate"),this.notifySubscribers(this[x])},ya:function(){this.notifySubscribers(this[x],"beforeChange")}};p.a.Ba&&p.a.setPrototypeOf(C,p.T.fn);var w=p.ta.Ma="__ko_proto__";C[w]=p.ta,p.O=function(S){if((S="function"==typeof S&&S[w])&&S!==C[w]&&S!==p.o.fn[w])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!S},p.Za=function(S){return"function"==typeof S&&(S[w]===C[w]||S[w]===p.o.fn[w]&&S.Nc)},p.b("observable",p.ta),p.b("isObservable",p.O),p.b("isWriteableObservable",p.Za),p.b("isWritableObservable",p.Za),p.b("observable.fn",C),p.L(C,"peek",C.v),p.L(C,"valueHasMutated",C.xa),p.L(C,"valueWillMutate",C.ya),p.Ha=function(S){if("object"!=typeof(S=S||[])||!("length"in S))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return S=p.ta(S),p.a.Ab(S,p.Ha.fn),S.extend({trackArrayChanges:!0})},p.Ha.fn={remove:function(S){for(var I=this.v(),L=[],M="function"!=typeof S||p.O(S)?function(j){return j===S}:S,U=0;U<I.length;U++){var z=I[U];if(M(z)){if(0===L.length&&this.ya(),I[U]!==z)throw Error("Array modified during remove; cannot remove item");L.push(z),I.splice(U,1),U--}}return L.length&&this.xa(),L},removeAll:function(S){if(S===e){var I=this.v(),L=I.slice(0);return this.ya(),I.splice(0,I.length),this.xa(),L}return S?this.remove(function(M){return 0<=p.a.A(S,M)}):[]},destroy:function(S){var I=this.v(),L="function"!=typeof S||p.O(S)?function(z){return z===S}:S;this.ya();for(var M=I.length-1;0<=M;M--){var U=I[M];L(U)&&(U._destroy=!0)}this.xa()},destroyAll:function(S){return S===e?this.destroy(function(){return!0}):S?this.destroy(function(I){return 0<=p.a.A(S,I)}):[]},indexOf:function(S){var I=this();return p.a.A(I,S)},replace:function(S,I){var L=this.indexOf(S);0<=L&&(this.ya(),this.v()[L]=I,this.xa())},sorted:function(S){var I=this().slice(0);return S?I.sort(S):I.sort()},reversed:function(){return this().slice(0).reverse()}},p.a.Ba&&p.a.setPrototypeOf(p.Ha.fn,p.ta.fn),p.a.D("pop push reverse shift sort splice unshift".split(" "),function(S){p.Ha.fn[S]=function(){var I=this.v();this.ya(),this.zc(I,S,arguments);var L=I[S].apply(I,arguments);return this.xa(),L===I?this:L}}),p.a.D(["slice"],function(S){p.Ha.fn[S]=function(){var I=this();return I[S].apply(I,arguments)}}),p.Pc=function(S){return p.O(S)&&"function"==typeof S.remove&&"function"==typeof S.push},p.b("observableArray",p.Ha),p.b("isObservableArray",p.Pc),p.Ta.trackArrayChanges=function(S,I){if(S.Ob={},I&&"object"==typeof I&&p.a.extend(S.Ob,I),S.Ob.sparse=!0,!S.zc){var z,j,q,M=!1,U=null,W=0,V=S.Qa,$=S.hb;S.Qa=function(Z){V&&V.call(S,Z),"arrayChange"===Z&&function L(){function Z(){if(W){var Y,ie=[].concat(S.v()||[]);S.Wa("arrayChange")&&((!U||1<W)&&(U=p.a.Pb(q,ie,S.Ob)),Y=U),q=ie,U=null,W=0,Y&&Y.length&&S.notifySubscribers(Y,"arrayChange")}}M?Z():(M=!0,j=S.subscribe(function(){++W},null,"spectate"),q=[].concat(S.v()||[]),U=null,z=S.subscribe(Z))}()},S.hb=function(Z){$&&$.call(S,Z),"arrayChange"!==Z||S.Wa("arrayChange")||(z&&z.s(),j&&j.s(),j=z=null,M=!1,q=e)},S.zc=function(Z,ie,Y){function Q(qe,$e,ot){return K[K.length]={status:qe,value:$e,index:ot}}if(M&&!W){var K=[],me=Z.length,we=Y.length,le=0;switch(ie){case"push":le=me;case"unshift":for(ie=0;ie<we;ie++)Q("added",Y[ie],le+ie);break;case"pop":le=me-1;case"shift":me&&Q("deleted",Z[le],le);break;case"splice":ie=Math.min(Math.max(0,0>Y[0]?me+Y[0]:Y[0]),me),me=1===we?me:Math.min(ie+(Y[1]||0),me),we=ie+we-2,le=Math.max(me,we);for(var Ae=[],xe=[],De=2;ie<le;++ie,++De)ie<me&&xe.push(Q("deleted",Z[ie],ie)),ie<we&&Ae.push(Q("added",Y[De],ie));p.a.Kc(xe,Ae);break;default:return}U=K}}}};var v=p.a.Da("_state");p.o=p.$=function(S,I,L){function M(){if(0<arguments.length){if("function"!=typeof U)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 U.apply(z.nb,arguments),this}return z.ra||p.u.cc(M),(z.ka||z.J&&M.Xa())&&M.ha(),z.X}if("object"==typeof S?L=S:(L=L||{},S&&(L.read=S)),"function"!=typeof L.read)throw Error("Pass a function that returns the value of the ko.computed");var U=L.write,z={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:L.read,nb:I||L.owner,l:L.disposeWhenNodeIsRemoved||L.l||null,Sa:L.disposeWhen||L.Sa,Rb:null,I:{},V:0,Ic:null};return M[v]=z,M.Nc="function"==typeof U,p.a.Ba||p.a.extend(M,p.T.fn),p.T.fn.qb(M),p.a.Ab(M,D),L.pure?(z.wb=!0,z.J=!0,p.a.extend(M,P)):L.deferEvaluation&&p.a.extend(M,N),p.options.deferUpdates&&p.Ta.deferred(M,!0),z.l&&(z.jc=!0,z.l.nodeType||(z.l=null)),z.J||L.deferEvaluation||M.ha(),z.l&&M.ja()&&p.a.K.za(z.l,z.Rb=function(){M.s()}),M};var D={equalityComparer:l,qa:function(){return this[v].V},Va:function(){var S=[];return p.a.P(this[v].I,function(I,L){S[L.Ka]=L.da}),S},Vb:function(S){if(!this[v].V)return!1;var I=this.Va();return-1!==p.a.A(I,S)||!!p.a.Lb(I,function(L){return L.Vb&&L.Vb(S)})},uc:function(S,I,L){if(this[v].wb&&I===this)throw Error("A 'pure' computed must not be called recursively");this[v].I[S]=L,L.Ka=this[v].V++,L.La=I.ob()},Xa:function(){var S,I,L=this[v].I;for(S in L)if(Object.prototype.hasOwnProperty.call(L,S)&&(I=L[S],this.Ia&&I.da.Ja||I.da.Dd(I.La)))return!0},Jd:function(){this.Ia&&!this[v].rb&&this.Ia(!1)},ja:function(){var S=this[v];return S.ka||0<S.V},Rd:function(){this.Ja?this[v].ka&&(this[v].sa=!0):this.Hc()},$c:function(S){if(S.Hb){var I=S.subscribe(this.Jd,this,"dirty"),L=S.subscribe(this.Rd,this);return{da:S,s:function(){I.s(),L.s()}}}return S.subscribe(this.Hc,this)},Hc:function(){var S=this,I=S.throttleEvaluation;I&&0<=I?(clearTimeout(this[v].Ic),this[v].Ic=p.a.setTimeout(function(){S.ha(!0)},I)):S.Ia?S.Ia(!0):S.ha(!0)},ha:function(S){var I=this[v],L=I.Sa,M=!1;if(!I.rb&&!I.ra){if(I.l&&!p.a.Sb(I.l)||L&&L()){if(!I.jc)return void this.s()}else I.jc=!1;I.rb=!0;try{M=this.zd(S)}finally{I.rb=!1}return M}},zd:function(S){var I=this[v],M=!1,L=I.wb?e:!I.V;p.u.xc({pd:M={qd:this,mb:I.I,Qb:I.V},od:_,o:this,Ya:L}),I.I={},I.V=0;var U=this.yd(I,M);return I.V?M=this.sb(I.X,U):(this.s(),M=!0),M&&(I.J?this.Gb():this.notifySubscribers(I.X,"beforeChange"),I.X=U,this.notifySubscribers(I.X,"spectate"),!I.J&&S&&this.notifySubscribers(I.X),this.rc&&this.rc()),L&&this.notifySubscribers(I.X,"awake"),M},yd:function(S,I){try{var L=S.Wc;return S.nb?L.call(S.nb):L()}finally{p.u.end(),I.Qb&&!S.J&&p.a.P(I.mb,m),S.sa=S.ka=!1}},v:function(S){var I=this[v];return(I.ka&&(S||!I.V)||I.J&&this.Xa())&&this.ha(),I.X},ub:function(S){p.T.fn.ub.call(this,S),this.nc=function(){return this[v].J||(this[v].sa?this.ha():this[v].ka=!1),this[v].X},this.Ia=function(I){this.pc(this[v].X),this[v].ka=!0,I&&(this[v].sa=!0),this.qc(this,!I)}},s:function(){var S=this[v];!S.J&&S.I&&p.a.P(S.I,function(I,L){L.s&&L.s()}),S.l&&S.Rb&&p.a.K.yb(S.l,S.Rb),S.I=e,S.V=0,S.ra=!0,S.sa=!1,S.ka=!1,S.J=!1,S.l=e,S.Sa=e,S.Wc=e,this.Nc||(S.nb=e)}},P={Qa:function(S){var I=this,L=I[v];if(!L.ra&&L.J&&"change"==S){if(L.J=!1,L.sa||I.Xa())L.I=null,L.V=0,I.ha()&&I.Gb();else{var M=[];p.a.P(L.I,function(U,z){M[z.Ka]=U}),p.a.D(M,function(U,z){var j=L.I[U],W=I.$c(j.da);W.Ka=z,W.La=j.La,L.I[U]=W}),I.Xa()&&I.ha()&&I.Gb()}L.ra||I.notifySubscribers(L.X,"awake")}},hb:function(S){var I=this[v];I.ra||"change"!=S||this.Wa("change")||(p.a.P(I.I,function(L,M){M.s&&(I.I[L]={da:M.da,Ka:M.Ka,La:M.La},M.s())}),I.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var S=this[v];return S.J&&(S.sa||this.Xa())&&this.ha(),p.T.fn.ob.call(this)}},N={Qa:function(S){"change"!=S&&"beforeChange"!=S||this.v()}};p.a.Ba&&p.a.setPrototypeOf(D,p.T.fn);var R=p.ta.Ma;D[R]=p.o,p.Oc=function(S){return"function"==typeof S&&S[R]===D[R]},p.Fd=function(S){return p.Oc(S)&&S[v]&&S[v].wb},p.b("computed",p.o),p.b("dependentObservable",p.o),p.b("isComputed",p.Oc),p.b("isPureComputed",p.Fd),p.b("computed.fn",D),p.L(D,"peek",D.v),p.L(D,"dispose",D.s),p.L(D,"isActive",D.ja),p.L(D,"getDependenciesCount",D.qa),p.L(D,"getDependencies",D.Va),p.xb=function(S,I){return"function"==typeof S?p.o(S,I,{pure:!0}):((S=p.a.extend({},S)).pure=!0,p.o(S,I))},p.b("pureComputed",p.xb),function(){function S(M,U,z){if(z=z||new L,"object"!=typeof(M=U(M))||null===M||M===e||M instanceof RegExp||M instanceof Date||M instanceof String||M instanceof Number||M instanceof Boolean)return M;var j=M instanceof Array?[]:{};return z.save(M,j),function I(M,U){if(M instanceof Array){for(var z=0;z<M.length;z++)U(z);"function"==typeof M.toJSON&&U("toJSON")}else for(z in M)U(z)}(M,function(W){var q=U(M[W]);switch(typeof q){case"boolean":case"number":case"string":case"function":j[W]=q;break;case"object":case"undefined":var V=z.get(q);j[W]=V!==e?V:S(q,U,z)}}),j}function L(){this.keys=[],this.values=[]}p.ad=function(M){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return S(M,function(U){for(var z=0;p.O(U)&&10>z;z++)U=U();return U})},p.toJSON=function(M,U,z){return M=p.ad(M),p.a.hc(M,U,z)},L.prototype={constructor:L,save:function(M,U){var z=p.a.A(this.keys,M);0<=z?this.values[z]=U:(this.keys.push(M),this.values.push(U))},get:function(M){return 0<=(M=p.a.A(this.keys,M))?this.values[M]:e}}}(),p.b("toJS",p.ad),p.b("toJSON",p.toJSON),p.Wd=function(S,I,L){function M(U){var z=p.xb(S,L).extend({ma:"always"}),j=z.subscribe(function(W){W&&(j.s(),U(W))});return z.notifySubscribers(z.v()),j}return"function"!=typeof Promise||I?M(I.bind(L)):new Promise(M)},p.b("when",p.Wd),p.w={M:function(S){switch(p.a.R(S)){case"option":return!0===S.__ko__hasDomDataOptionValue__?p.a.g.get(S,p.c.options.$b):7>=p.a.W?S.getAttributeNode("value")&&S.getAttributeNode("value").specified?S.value:S.text:S.value;case"select":return 0<=S.selectedIndex?p.w.M(S.options[S.selectedIndex]):e;default:return S.value}},cb:function(S,I,L){switch(p.a.R(S)){case"option":"string"==typeof I?(p.a.g.set(S,p.c.options.$b,e),"__ko__hasDomDataOptionValue__"in S&&delete S.__ko__hasDomDataOptionValue__,S.value=I):(p.a.g.set(S,p.c.options.$b,I),S.__ko__hasDomDataOptionValue__=!0,S.value="number"==typeof I?I:"");break;case"select":(""===I||null===I)&&(I=e);for(var j,M=-1,U=0,z=S.options.length;U<z;++U)if((j=p.w.M(S.options[U]))==I||""===j&&I===e){M=U;break}(L||0<=M||I===e&&1<S.size)&&(S.selectedIndex=M,6===p.a.W&&p.a.setTimeout(function(){S.selectedIndex=M},0));break;default:(null===I||I===e)&&(I=""),S.value=I}}},p.b("selectExtensions",p.w),p.b("selectExtensions.readValue",p.w.M),p.b("selectExtensions.writeValue",p.w.cb),p.m=function(){function S(W){123===(W=p.a.Db(W)).charCodeAt(0)&&(W=W.slice(1,-1));var $,q=[],V=(W+="\n,").match(M),Z=[],ie=0;if(1<V.length){for(var Q,Y=0;Q=V[Y];++Y){var K=Q.charCodeAt(0);if(44===K){if(0>=ie){q.push($&&Z.length?{key:$,value:Z.join("")}:{unknown:$||Z.join("")}),$=ie=0,Z=[];continue}}else if(58===K){if(!ie&&!$&&1===Z.length){$=Z.pop();continue}}else{if(47===K&&1<Q.length&&(47===Q.charCodeAt(1)||42===Q.charCodeAt(1)))continue;47===K&&Y&&1<Q.length?(K=V[Y-1].match(U))&&!z[K[0]]&&(V=(W=W.substr(W.indexOf(Q)+1)).match(M),Y=-1,Q="/"):40===K||123===K||91===K?++ie:41===K||125===K||93===K?--ie:$||Z.length||34!==K&&39!==K||(Q=Q.slice(1,-1))}Z.push(Q)}if(0<ie)throw Error("Unbalanced parentheses, braces, or brackets")}return q}var I=["true","false","null","undefined"],L=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,M=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),U=/[\])"'A-Za-z0-9_$]+$/,z={in:1,return:1,typeof:1},j={};return{Ra:[],wa:j,ac:S,vb:function(W,q){function V(K,me){var we;if(!Y){var le=p.getBindingHandler(K);if(le&&le.preprocess&&!(me=le.preprocess(me,K,V)))return;(le=j[K])&&(0<=p.a.A(I,we=me)?we=!1:(le=we.match(L),we=null!==le&&(le[1]?"Object("+le[1]+")"+le[2]:we)),le=we),le&&Z.push("'"+("string"==typeof j[K]?j[K]:K)+"':function(_z){"+we+"=_z}")}ie&&(me="function(){return "+me+" }"),$.push("'"+K+"':"+me)}var $=[],Z=[],ie=(q=q||{}).valueAccessors,Y=q.bindingParams,Q="string"==typeof W?S(W):W;return p.a.D(Q,function(K){V(K.key||K.unknown,K.value)}),Z.length&&V("_ko_property_writers","{"+Z.join(",")+" }"),$.join(",")},Id:function(W,q){for(var V=0;V<W.length;V++)if(W[V].key==q)return!0;return!1},eb:function(W,q,V,$,Z){W&&p.O(W)?!p.Za(W)||Z&&W.v()===$||W($):(W=q.get("_ko_property_writers"))&&W[V]&&W[V]($)}}}(),p.b("expressionRewriting",p.m),p.b("expressionRewriting.bindingRewriteValidators",p.m.Ra),p.b("expressionRewriting.parseObjectLiteral",p.m.ac),p.b("expressionRewriting.preProcessBindings",p.m.vb),p.b("expressionRewriting._twoWayBindings",p.m.wa),p.b("jsonExpressionRewriting",p.m),p.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",p.m.vb),function(){function S(V){return 8==V.nodeType&&z.test(U?V.text:V.nodeValue)}function I(V){return 8==V.nodeType&&j.test(U?V.text:V.nodeValue)}function L(V,$){for(var Z=V,ie=1,Y=[];Z=Z.nextSibling;){if(I(Z)&&(p.a.g.set(Z,q,!0),0==--ie))return Y;Y.push(Z),S(Z)&&ie++}if(!$)throw Error("Cannot find closing comment tag to match: "+V.nodeValue);return null}function M(V,$){var Z=L(V,$);return Z?0<Z.length?Z[Z.length-1].nextSibling:V.nextSibling:null}var U=n&&"\x3c!--test--\x3e"===n.createComment("test").text,z=U?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,j=U?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,W={ul:!0,ol:!0},q="__ko_matchedEndComment__";p.h={ea:{},childNodes:function(V){return S(V)?L(V):V.childNodes},Ea:function(V){if(S(V))for(var $=0,Z=(V=p.h.childNodes(V)).length;$<Z;$++)p.removeNode(V[$]);else p.a.Tb(V)},va:function(V,$){if(S(V)){p.h.Ea(V);for(var Z=V.nextSibling,ie=0,Y=$.length;ie<Y;ie++)Z.parentNode.insertBefore($[ie],Z)}else p.a.va(V,$)},Vc:function(V,$){var Z;S(V)?(Z=V.nextSibling,V=V.parentNode):Z=V.firstChild,Z?$!==Z&&V.insertBefore($,Z):V.appendChild($)},Wb:function(V,$,Z){Z?(Z=Z.nextSibling,S(V)&&(V=V.parentNode),Z?$!==Z&&V.insertBefore($,Z):V.appendChild($)):p.h.Vc(V,$)},firstChild:function(V){if(S(V))return!V.nextSibling||I(V.nextSibling)?null:V.nextSibling;if(V.firstChild&&I(V.firstChild))throw Error("Found invalid end comment, as the first child of "+V);return V.firstChild},nextSibling:function(V){if(S(V)&&(V=M(V)),V.nextSibling&&I(V.nextSibling)){var $=V.nextSibling;if(I($)&&!p.a.g.get($,q))throw Error("Found end comment without a matching opening comment, as child of "+V);return null}return V.nextSibling},Cd:S,Vd:function(V){return(V=(U?V.text:V.nodeValue).match(z))?V[1]:null},Sc:function(V){if(W[p.a.R(V)]){var $=V.firstChild;if($)do{if(1===$.nodeType){var Z,ie=null;if(Z=$.firstChild)do{if(ie)ie.push(Z);else if(S(Z)){var Y=M(Z,!0);Y?Z=Y:ie=[Z]}else I(Z)&&(ie=[Z])}while(Z=Z.nextSibling);if(Z=ie)for(ie=$.nextSibling,Y=0;Y<Z.length;Y++)ie?V.insertBefore(Z[Y],ie):V.appendChild(Z[Y])}}while($=$.nextSibling)}}}}(),p.b("virtualElements",p.h),p.b("virtualElements.allowedBindings",p.h.ea),p.b("virtualElements.emptyNode",p.h.Ea),p.b("virtualElements.insertAfter",p.h.Wb),p.b("virtualElements.prepend",p.h.Vc),p.b("virtualElements.setDomNodeChildren",p.h.va),p.ga=function(){this.nd={}},p.a.extend(p.ga.prototype,{nodeHasBindings:function(S){switch(S.nodeType){case 1:return null!=S.getAttribute("data-bind")||p.j.getComponentNameForNode(S);case 8:return p.h.Cd(S);default:return!1}},getBindings:function(S,I){var L=(L=this.getBindingsString(S,I))?this.parseBindingsString(L,I,S):null;return p.j.tc(L,S,I,!1)},getBindingAccessors:function(S,I){var L=(L=this.getBindingsString(S,I))?this.parseBindingsString(L,I,S,{valueAccessors:!0}):null;return p.j.tc(L,S,I,!0)},getBindingsString:function(S){switch(S.nodeType){case 1:return S.getAttribute("data-bind");case 8:return p.h.Vd(S);default:return null}},parseBindingsString:function(S,I,L,M){try{var j,U=this.nd,z=S+(M&&M.valueAccessors||"");if(!(j=U[z])){var W,q="with($context){with($data||{}){return{"+p.m.vb(S,M)+"}}}";W=new Function("$context","$element",q),j=U[z]=W}return j(I,L)}catch(V){throw V.message="Unable to parse bindings.\nBindings value: "+S+"\nMessage: "+V.message,V}}}),p.ga.instance=new p.ga,p.b("bindingProvider",p.ga),function(){function S(le){var Ae=(le=p.a.g.get(le,we))&&le.N;Ae&&(le.N=null,Ae.Tc())}function I(le,Ae,xe){this.node=le,this.yc=Ae,this.kb=[],this.H=!1,Ae.N||p.a.K.za(le,S),xe&&xe.N&&(xe.N.kb.push(le),this.Kb=xe)}function L(le){return function(){return le}}function M(le){return le()}function U(le){return p.a.Ga(p.u.G(le),function(Ae,xe){return function(){return le()[xe]}})}function j(le,Ae){return U(this.getBindings.bind(this,le,Ae))}function W(le,Ae){var xe=p.h.firstChild(Ae);if(xe){var De,qe=p.ga.instance,$e=qe.preprocessNode;if($e){for(;De=xe;)xe=p.h.nextSibling(De),$e.call(qe,De);xe=p.h.firstChild(Ae)}for(;De=xe;)xe=p.h.nextSibling(De),q(le,De)}p.i.ma(Ae,p.i.H)}function q(le,Ae){var xe=le,De=1===Ae.nodeType;De&&p.h.Sc(Ae),(De||p.ga.instance.nodeHasBindings(Ae))&&(xe=$(Ae,null,le).bindingContextForDescendants),xe&&!K[p.a.R(Ae)]&&W(xe,Ae)}function $(le,Ae,xe){var $e,De=p.a.g.Ub(le,we,{}),qe=De.hd;if(!Ae){if(qe)throw Error("You cannot apply bindings multiple times to the same element.");De.hd=!0}if(qe||(De.context=xe),De.Zb||(De.Zb={}),Ae&&"function"!=typeof Ae)$e=Ae;else{var ot=p.ga.instance,kt=ot.getBindingAccessors||j,sn=p.$(function(){return($e=Ae?Ae(xe,le):kt.call(ot,le,xe))&&(xe[ie]&&xe[ie](),xe[Q]&&xe[Q]()),$e},null,{l:le});$e&&sn.ja()||(sn=null)}var Lt,wn=xe;if($e){var On=function(){return p.a.Ga(sn?sn():$e,M)},ii=sn?function(an){return function(){return M(sn()[an])}}:function(an){return $e[an]};On.get=function(an){return $e[an]&&M(ii(an))},On.has=function(an){return an in $e},p.i.H in $e&&p.i.subscribe(le,p.i.H,function(){var an=(0,$e[p.i.H])();if(an){var en=p.h.childNodes(le);en.length&&an(en,p.Ec(en[0]))}}),p.i.pa in $e&&(wn=p.i.Cb(le,xe),p.i.subscribe(le,p.i.pa,function(){var an=(0,$e[p.i.pa])();an&&p.h.firstChild(le)&&an(le)})),De=function V(le){var Ae=[],xe={},De=[];return p.a.P(le,function qe($e){if(!xe[$e]){var ot=p.getBindingHandler($e);ot&&(ot.after&&(De.push($e),p.a.D(ot.after,function(kt){if(le[kt]){if(-1!==p.a.A(De,kt))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+De.join(", "));qe(kt)}}),De.length--),Ae.push({key:$e,Mc:ot})),xe[$e]=!0}}),Ae}($e),p.a.D(De,function(an){var en=an.Mc.init,he=an.Mc.update,Te=an.key;if(8===le.nodeType&&!p.h.ea[Te])throw Error("The binding '"+Te+"' cannot be used with virtual elements");try{"function"==typeof en&&p.u.G(function(){var dn=en(le,ii(Te),On,wn.$data,wn);if(dn&&dn.controlsDescendantBindings){if(Lt!==e)throw Error("Multiple bindings ("+Lt+" and "+Te+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");Lt=Te}}),"function"==typeof he&&p.$(function(){he(le,ii(Te),On,wn.$data,wn)},null,{l:le})}catch(dn){throw dn.message='Unable to process binding "'+Te+": "+$e[Te]+'"\nMessage: '+dn.message,dn}})}return{shouldBindDescendants:De=Lt===e,bindingContextForDescendants:De&&wn}}function Z(le,Ae){return le&&le instanceof p.fa?le:new p.fa(le,e,e,Ae)}var ie=p.a.Da("_subscribable"),Y=p.a.Da("_ancestorBindingInfo"),Q=p.a.Da("_dataDependency");p.c={};var K={script:!0,textarea:!0,template:!0};p.getBindingHandler=function(le){return p.c[le]};var me={};p.fa=function(le,Ae,xe,De,qe){function $e(){var ii=wn?sn():sn,an=p.a.f(ii);return Ae?(p.a.extend(ot,Ae),Y in Ae&&(ot[Y]=Ae[Y])):(ot.$parents=[],ot.$root=an,ot.ko=p),ot[ie]=Lt,kt?an=ot.$data:(ot.$rawData=ii,ot.$data=an),xe&&(ot[xe]=an),De&&De(ot,Ae,an),Ae&&Ae[ie]&&!p.S.o().Vb(Ae[ie])&&Ae[ie](),On&&(ot[Q]=On),ot.$data}var Lt,ot=this,kt=le===me,sn=kt?e:le,wn="function"==typeof sn&&!p.O(sn),On=qe&&qe.dataDependency;qe&&qe.exportDependencies?$e():((Lt=p.xb($e)).v(),Lt.ja()?Lt.equalityComparer=null:ot[ie]=e)},p.fa.prototype.createChildContext=function(le,Ae,xe,De){if(!De&&Ae&&"object"==typeof Ae&&(Ae=(De=Ae).as,xe=De.extend),Ae&&De&&De.noChildContext){var qe="function"==typeof le&&!p.O(le);return new p.fa(me,this,null,function($e){xe&&xe($e),$e[Ae]=qe?le():le},De)}return new p.fa(le,this,Ae,function($e,ot){$e.$parentContext=ot,$e.$parent=ot.$data,$e.$parents=(ot.$parents||[]).slice(0),$e.$parents.unshift($e.$parent),xe&&xe($e)},De)},p.fa.prototype.extend=function(le,Ae){return new p.fa(me,this,null,function(xe){p.a.extend(xe,"function"==typeof le?le(xe):le)},Ae)};var we=p.a.g.Z();I.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},I.prototype.sd=function(le){p.a.Pa(this.kb,le),!this.kb.length&&this.H&&this.Cc()},I.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,p.a.K.yb(this.node,S),p.i.ma(this.node,p.i.pa),this.Tc())},p.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(le,Ae,xe,De,qe){var $e=p.a.g.Ub(le,we,{});return $e.Fa||($e.Fa=new p.T),qe&&qe.notifyImmediately&&$e.Zb[Ae]&&p.u.G(xe,De,[le]),$e.Fa.subscribe(xe,De,Ae)},ma:function(le,Ae){var xe=p.a.g.get(le,we);if(xe&&(xe.Zb[Ae]=!0,xe.Fa&&xe.Fa.notifySubscribers(le,Ae),Ae==p.i.H))if(xe.N)xe.N.Cc();else if(xe.N===e&&xe.Fa&&xe.Fa.Wa(p.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(le,Ae){var xe=p.a.g.Ub(le,we,{});return xe.N||(xe.N=new I(le,xe,Ae[Y])),Ae[Y]==xe?Ae:Ae.extend(function(De){De[Y]=xe})}},p.Td=function(le){return(le=p.a.g.get(le,we))&&le.context},p.ib=function(le,Ae,xe){return 1===le.nodeType&&p.h.Sc(le),$(le,Ae,Z(xe))},p.ld=function(le,Ae,xe){return xe=Z(xe),p.ib(le,function z(le,Ae,xe){return"function"==typeof le?U(le.bind(null,Ae,xe)):p.a.Ga(le,L)}(Ae,xe,le),xe)},p.Oa=function(le,Ae){1!==Ae.nodeType&&8!==Ae.nodeType||W(Z(le),Ae)},p.vc=function(le,Ae,xe){if(!o&&t.jQuery&&(o=t.jQuery),2>arguments.length){if(!(Ae=n.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!Ae||1!==Ae.nodeType&&8!==Ae.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");q(Z(le,xe),Ae)},p.Dc=function(le){return!le||1!==le.nodeType&&8!==le.nodeType?e:p.Td(le)},p.Ec=function(le){return(le=p.Dc(le))?le.$data:e},p.b("bindingHandlers",p.c),p.b("bindingEvent",p.i),p.b("bindingEvent.subscribe",p.i.subscribe),p.b("bindingEvent.startPossiblyAsyncContentBinding",p.i.Cb),p.b("applyBindings",p.vc),p.b("applyBindingsToDescendants",p.Oa),p.b("applyBindingAccessorsToNode",p.ib),p.b("applyBindingsToNode",p.ld),p.b("contextFor",p.Dc),p.b("dataFor",p.Ec)}(),function(S){function I(j,W){var V,q=Object.prototype.hasOwnProperty.call(U,j)?U[j]:S;q?q.subscribe(W):((q=U[j]=new p.T).subscribe(W),function L(j,W){M("getConfig",[j],function(q){q?M("loadComponent",[j,q],function(V){W(V,q)}):W(null,null)})}(j,function($,Z){var ie=!(!Z||!Z.synchronous);z[j]={definition:$,Gd:ie},delete U[j],V||ie?q.notifySubscribers($):p.na.zb(function(){q.notifySubscribers($)})}),V=!0)}function M(j,W,q,V){V||(V=p.j.loaders.slice(0));var $=V.shift();if($){var Z=$[j];if(Z){var ie=!1;if(Z.apply($,W.concat(function(Y){ie?q(null):null!==Y?q(Y):M(j,W,q,V)}))!==S&&(ie=!0,!$.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else M(j,W,q,V)}else q(null)}var U={},z={};p.j={get:function(j,W){var q=Object.prototype.hasOwnProperty.call(z,j)?z[j]:S;q?q.Gd?p.u.G(function(){W(q.definition)}):p.na.zb(function(){W(q.definition)}):I(j,W)},Bc:function(j){delete z[j]},oc:M},p.j.loaders=[],p.b("components",p.j),p.b("components.get",p.j.get),p.b("components.clearCachedDefinition",p.j.Bc)}(),function(){function I(q,V,$){if("function"==typeof V)$(function(ie){return new V(ie)});else if("function"==typeof V[W])$(V[W]);else if("instance"in V){var Z=V.instance;$(function(){return Z})}else"viewModel"in V?I(q,V.viewModel,$):q("Unknown viewModel value: "+V)}function L(q){switch(p.a.R(q)){case"script":return p.a.ua(q.text);case"textarea":return p.a.ua(q.value);case"template":if(M(q.content))return p.a.Ca(q.content.childNodes)}return p.a.Ca(q.childNodes)}function M(q){return t.DocumentFragment?q instanceof DocumentFragment:q&&11===q.nodeType}function U(q,V,$){"string"==typeof V.require?t.require?(0,t.require)([V.require],function(Z){Z&&"object"==typeof Z&&Z.Xd&&Z.default&&(Z=Z.default),$(Z)}):q("Uses require, but no AMD loader is present"):$(V)}function z(q){return function(V){throw Error("Component '"+q+"': "+V)}}var j={};p.j.register=function(q,V){if(!V)throw Error("Invalid configuration for "+q);if(p.j.tb(q))throw Error("Component "+q+" is already registered");j[q]=V},p.j.tb=function(q){return Object.prototype.hasOwnProperty.call(j,q)},p.j.unregister=function(q){delete j[q],p.j.Bc(q)},p.j.Fc={getConfig:function(q,V){V(p.j.tb(q)?j[q]:null)},loadComponent:function(q,V,$){var Z=z(q);U(Z,V,function(ie){!function S(q,V,$,Z){function ie(){0==--Q&&Z(Y)}var Y={},Q=2,K=$.template;$=$.viewModel,K?U(V,K,function(me){p.j.oc("loadTemplate",[q,me],function(we){Y.template=we,ie()})}):ie(),$?U(V,$,function(me){p.j.oc("loadViewModel",[q,me],function(we){Y[W]=we,ie()})}):ie()}(q,Z,ie,$)})},loadTemplate:function(q,V,$){if(q=z(q),"string"==typeof V)$(p.a.ua(V));else if(V instanceof Array)$(V);else if(M(V))$(p.a.la(V.childNodes));else if(V.element)if(V=V.element,t.HTMLElement?V instanceof HTMLElement:V&&V.tagName&&1===V.nodeType)$(L(V));else if("string"==typeof V){var Z=n.getElementById(V);Z?$(L(Z)):q("Cannot find element with ID "+V)}else q("Unknown element type: "+V);else q("Unknown template value: "+V)},loadViewModel:function(q,V,$){I(z(q),V,$)}};var W="createViewModel";p.b("components.register",p.j.register),p.b("components.isRegistered",p.j.tb),p.b("components.unregister",p.j.unregister),p.b("components.defaultLoader",p.j.Fc),p.j.loaders.push(p.j.Fc),p.j.dd=j}(),function(){function S(L,M){if(U=L.getAttribute("params")){var U=I.parseBindingsString(U,M,L,{valueAccessors:!0,bindingParams:!0}),z=(U=p.a.Ga(U,function(W){return p.o(W,null,{l:L})}),p.a.Ga(U,function(W){var q=W.v();return W.ja()?p.o({read:function(){return p.a.f(W())},write:p.Za(q)&&function(V){W()(V)},l:L}):q}));return Object.prototype.hasOwnProperty.call(z,"$raw")||(z.$raw=U),z}return{$raw:{}}}p.j.getComponentNameForNode=function(L){var M=p.a.R(L);if(p.j.tb(M)&&(-1!=M.indexOf("-")||""+L=="[object HTMLUnknownElement]"||8>=p.a.W&&L.tagName===M))return M},p.j.tc=function(L,M,U,z){if(1===M.nodeType){var j=p.j.getComponentNameForNode(M);if(j){if((L=L||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var W={name:j,params:S(M,U)};L.component=z?function(){return W}:W}}return L};var I=new p.ga;9>p.a.W&&(p.j.register=function(L){return function(M){return L.apply(this,arguments)}}(p.j.register),n.createDocumentFragment=function(L){return function(){var z,M=L(),U=p.j.dd;for(z in U);return M}}(n.createDocumentFragment))}(),function(){var L=0;p.c.component={init:function(M,U,z,j,W){function q(){var Y=V&&V.dispose;"function"==typeof Y&&Y.call(V),Z&&Z.s(),$=V=Z=null}var V,$,Z,ie=p.a.la(p.h.childNodes(M));return p.h.Ea(M),p.a.K.za(M,q),p.o(function(){var Q,K,Y=p.a.f(U());if("string"==typeof Y?Q=Y:(Q=p.a.f(Y.name),K=p.a.f(Y.params)),!Q)throw Error("No component name specified");var me=p.i.Cb(M,W),we=$=++L;p.j.get(Q,function(le){if($===we){if(q(),!le)throw Error("Unknown component '"+Q+"'");!function S(M,U,z){if(!(U=U.template))throw Error("Component '"+M+"' has no template");M=p.a.Ca(U),p.h.va(z,M)}(Q,le,M);var Ae=function I(M,U,z){var j=M.createViewModel;return j?j.call(M,U,z):U}(le,K,{element:M,templateNodes:ie});le=me.createChildContext(Ae,{extend:function(xe){xe.$component=Ae,xe.$componentTemplateNodes=ie}}),Ae&&Ae.koDescendantsComplete&&(Z=p.i.subscribe(M,p.i.pa,Ae.koDescendantsComplete,Ae)),V=Ae,p.Oa(le,M)}})},null,{l:M}),{controlsDescendantBindings:!0}}},p.h.ea.component=!0}();var B={class:"className",for:"htmlFor"};p.c.attr={update:function(S,I){var L=p.a.f(I())||{};p.a.P(L,function(M,U){U=p.a.f(U);var z=M.indexOf(":"),j=(z="lookupNamespaceURI"in S&&0<z&&S.lookupNamespaceURI(M.substr(0,z)),!1===U||null===U||U===e);j?z?S.removeAttributeNS(z,M):S.removeAttribute(M):U=U.toString(),8>=p.a.W&&M in B?(M=B[M],j?S.removeAttribute(M):S[M]=U):j||(z?S.setAttributeNS(z,M,U):S.setAttribute(M,U)),"name"===M&&p.a.Yc(S,j?"":U)})}},p.c.checked={after:["value","attr"],init:function(S,I,L){function M(){var Y=S.checked,Q=z();if(!p.S.Ya()&&(Y||!W&&!p.S.qa())){var K=p.u.G(I);if(V){var me=$?K.v():K,we=ie;ie=Q,we!==Q?Y&&(p.a.Na(me,Q,!0),p.a.Na(me,we,!1)):p.a.Na(me,Q,Y),$&&p.Za(K)&&K(me)}else j&&(Q===e?Q=Y:Y||(Q=e)),p.m.eb(K,L,"checked",Q,!0)}}var z=p.xb(function(){return L.has("checkedValue")?p.a.f(L.get("checkedValue")):Z?L.has("value")?p.a.f(L.get("value")):S.value:void 0}),j="checkbox"==S.type,W="radio"==S.type;if(j||W){var q=I(),V=j&&p.a.f(q)instanceof Array,$=!(V&&q.push&&q.splice),Z=W||V,ie=V?z():e;W&&!S.name&&p.c.uniqueName.init(S,function(){return!0}),p.o(M,null,{l:S}),p.a.B(S,"click",M),p.o(function U(){var Y=p.a.f(I()),Q=z();V?(S.checked=0<=p.a.A(Y,Q),ie=Q):S.checked=j&&Q===e?!!Y:z()===Y},null,{l:S}),q=e}}},p.m.wa.checked=!0,p.c.checkedValue={update:function(S,I){S.value=p.a.f(I())}},p.c.class={update:function(S,I){var L=p.a.Db(p.a.f(I()));p.a.Eb(S,S.__ko__cssValue,!1),S.__ko__cssValue=L,p.a.Eb(S,L,!0)}},p.c.css={update:function(S,I){var L=p.a.f(I());null!==L&&"object"==typeof L?p.a.P(L,function(M,U){U=p.a.f(U),p.a.Eb(S,M,U)}):p.c.class.update(S,I)}},p.c.enable={update:function(S,I){var L=p.a.f(I());L&&S.disabled?S.removeAttribute("disabled"):L||S.disabled||(S.disabled=!0)}},p.c.disable={update:function(S,I){p.c.enable.update(S,function(){return!p.a.f(I())})}},p.c.event={init:function(S,I,L,M,U){var z=I()||{};p.a.P(z,function(j){"string"==typeof j&&p.a.B(S,j,function(W){var q,V=I()[j];if(V){try{var $=p.a.la(arguments);$.unshift(M=U.$data),q=V.apply(M,$)}finally{!0!==q&&(W.preventDefault?W.preventDefault():W.returnValue=!1)}!1===L.get(j+"Bubble")&&(W.cancelBubble=!0,W.stopPropagation&&W.stopPropagation())}})})}},p.c.foreach={Rc:function(S){return function(){var I=S(),L=p.a.bc(I);return L&&"number"!=typeof L.length?(p.a.f(I),{foreach:L.data,as:L.as,noChildContext:L.noChildContext,includeDestroyed:L.includeDestroyed,afterAdd:L.afterAdd,beforeRemove:L.beforeRemove,afterRender:L.afterRender,beforeMove:L.beforeMove,afterMove:L.afterMove,templateEngine:p.ba.Ma}):{foreach:I,templateEngine:p.ba.Ma}}},init:function(S,I){return p.c.template.init(S,p.c.foreach.Rc(I))},update:function(S,I,L,M,U){return p.c.template.update(S,p.c.foreach.Rc(I),L,M,U)}},p.m.Ra.foreach=!1,p.h.ea.foreach=!0,p.c.hasfocus={init:function(S,I,L){function M(j){S.__ko_hasfocusUpdating=!0;var W=S.ownerDocument;if("activeElement"in W){var q;try{q=W.activeElement}catch{q=W.body}j=q===S}W=I(),p.m.eb(W,L,"hasfocus",j,!0),S.__ko_hasfocusLastValue=j,S.__ko_hasfocusUpdating=!1}var U=M.bind(null,!0),z=M.bind(null,!1);p.a.B(S,"focus",U),p.a.B(S,"focusin",U),p.a.B(S,"blur",z),p.a.B(S,"focusout",z),S.__ko_hasfocusLastValue=!1},update:function(S,I){var L=!!p.a.f(I());S.__ko_hasfocusUpdating||S.__ko_hasfocusLastValue===L||(L?S.focus():S.blur(),!L&&S.__ko_hasfocusLastValue&&S.ownerDocument.body.focus(),p.u.G(p.a.Fb,null,[S,L?"focusin":"focusout"]))}},p.m.wa.hasfocus=!0,p.c.hasFocus=p.c.hasfocus,p.m.wa.hasFocus="hasfocus",p.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(S,I){p.a.fc(S,I())}},function(){function S(I,L,M){p.c[I]={init:function(U,z,j,W,q){var V,$,ie,Y,Q,Z={};if(L){W=j.get("as");var K=j.get("noChildContext");Z={as:W,noChildContext:K,exportDependencies:Q=!(W&&K)}}return Y=(ie="render"==j.get("completeOn"))||j.has(p.i.pa),p.o(function(){var Ae,me=p.a.f(z()),we=!M!=!me,le=!$;(Q||we!==V)&&(Y&&(q=p.i.Cb(U,q)),we&&((!L||Q)&&(Z.dataDependency=p.S.o()),Ae=L?q.createChildContext("function"==typeof me?me:z,Z):p.S.qa()?q.extend(null,Z):q),le&&p.S.qa()&&($=p.a.Ca(p.h.childNodes(U),!0)),we?(le||p.h.va(U,p.a.Ca($)),p.Oa(Ae,U)):(p.h.Ea(U),ie||p.i.ma(U,p.i.H)),V=we)},null,{l:U}),{controlsDescendantBindings:!0}}},p.m.Ra[I]=!1,p.h.ea[I]=!0}S("if"),S("ifnot",!1,!0),S("with",!0)}(),p.c.let={init:function(S,I,L,M,U){return I=U.extend(I),p.Oa(I,S),{controlsDescendantBindings:!0}}},p.h.ea.let=!0;var F={};p.c.options={init:function(S){if("select"!==p.a.R(S))throw Error("options binding applies only to SELECT elements");for(;0<S.length;)S.remove(0);return{controlsDescendantBindings:!0}},update:function(S,I,L){function M(){return p.a.jb(S.options,function(K){return K.selected})}function U(K,me,we){var le=typeof me;return"function"==le?me(K):"string"==le?K[me]:we}function z(K,me){if(Y&&V)p.i.ma(S,p.i.H);else if(ie.length){var we=0<=p.a.A(ie,p.w.M(me[0]));p.a.Zc(me[0],we),Y&&!we&&p.u.G(p.a.Fb,null,[S,"change"])}}var j=S.multiple,W=0!=S.length&&j?S.scrollTop:null,q=p.a.f(I()),V=L.get("valueAllowUnset")&&L.has("value"),$=L.get("optionsIncludeDestroyed");I={};var Z,ie=[];V||(j?ie=p.a.Mb(M(),p.w.M):0<=S.selectedIndex&&ie.push(p.w.M(S.options[S.selectedIndex]))),q&&(typeof q.length>"u"&&(q=[q]),Z=p.a.jb(q,function(K){return $||K===e||null===K||!p.a.f(K._destroy)}),L.has("optionsCaption")&&null!==(q=p.a.f(L.get("optionsCaption")))&&q!==e&&Z.unshift(F));var Y=!1;I.beforeRemove=function(K){S.removeChild(K)},q=z,L.has("optionsAfterRender")&&"function"==typeof L.get("optionsAfterRender")&&(q=function(K,me){z(0,me),p.u.G(L.get("optionsAfterRender"),null,[me[0],K!==F?K:e])}),p.a.ec(S,Z,function(K,me,we){return we.length&&(ie=!V&&we[0].selected?[p.w.M(we[0])]:[],Y=!0),me=S.ownerDocument.createElement("option"),K===F?(p.a.Bb(me,L.get("optionsCaption")),p.w.cb(me,e)):(we=U(K,L.get("optionsValue"),K),p.w.cb(me,p.a.f(we)),K=U(K,L.get("optionsText"),we),p.a.Bb(me,K)),[me]},I,q),V||(j?ie.length&&M().length<ie.length:ie.length&&0<=S.selectedIndex?p.w.M(S.options[S.selectedIndex])!==ie[0]:ie.length||0<=S.selectedIndex)&&p.u.G(p.a.Fb,null,[S,"change"]),(V||p.S.Ya())&&p.i.ma(S,p.i.H),p.a.wd(S),W&&20<Math.abs(W-S.scrollTop)&&(S.scrollTop=W)}},p.c.options.$b=p.a.g.Z(),p.c.selectedOptions={init:function(S,I,L){function M(){var j=I(),W=[];p.a.D(S.getElementsByTagName("option"),function(q){q.selected&&W.push(p.w.M(q))}),p.m.eb(j,L,"selectedOptions",W)}function U(){var j=p.a.f(I()),W=S.scrollTop;j&&"number"==typeof j.length&&p.a.D(S.getElementsByTagName("option"),function(q){var V=0<=p.a.A(j,p.w.M(q));q.selected!=V&&p.a.Zc(q,V)}),S.scrollTop=W}if("select"!=p.a.R(S))throw Error("selectedOptions binding applies only to SELECT elements");var z;p.i.subscribe(S,p.i.H,function(){z?M():(p.a.B(S,"change",M),z=p.o(U,null,{l:S}))},null,{notifyImmediately:!0})},update:function(){}},p.m.wa.selectedOptions=!0,p.c.style={update:function(S,I){var L=p.a.f(I()||{});p.a.P(L,function(M,U){if((null===(U=p.a.f(U))||U===e||!1===U)&&(U=""),o)o(S).css(M,U);else if(/^--/.test(M))S.style.setProperty(M,U);else{M=M.replace(/-(\w)/g,function(j,W){return W.toUpperCase()});var z=S.style[M];S.style[M]=U,U===z||S.style[M]!=z||isNaN(U)||(S.style[M]=U+"px")}})}},p.c.submit={init:function(S,I,L,M,U){if("function"!=typeof I())throw Error("The value for a submit binding must be a function");p.a.B(S,"submit",function(z){var j,W=I();try{j=W.call(U.$data,S)}finally{!0!==j&&(z.preventDefault?z.preventDefault():z.returnValue=!1)}})}},p.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(S,I){p.a.Bb(S,I())}},p.h.ea.text=!0,function(){if(t&&t.navigator){var L,M,U,z,j,S=function(Z){if(Z)return parseFloat(Z[1])},I=t.navigator.userAgent;(L=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(j=S(I.match(/Edge\/([^ ]+)$/)))||S(I.match(/Chrome\/([^ ]+)/))||(M=S(I.match(/Version\/([^ ]+) Safari/)))||(U=S(I.match(/Firefox\/([^ ]+)/)))||(z=p.a.W||S(I.match(/MSIE ([^ ]+)/)))||(z=S(I.match(/rv:([^ )]+)/)))}if(8<=z&&10>z)var W=p.a.g.Z(),q=p.a.g.Z(),V=function(Z){var ie=this.activeElement;(ie=ie&&p.a.g.get(ie,q))&&ie(Z)},$=function(Z,ie){var Y=Z.ownerDocument;p.a.g.get(Y,W)||(p.a.g.set(Y,W,!0),p.a.B(Y,"selectionchange",V)),p.a.g.set(Z,q,ie)};p.c.textInput={init:function(Z,ie,Y){function Q($e,ot){p.a.B(Z,$e,ot)}function me(){Ae||(xe=Z.value,Ae=p.a.setTimeout(we,4))}function we(){clearTimeout(Ae),xe=Ae=e;var $e=Z.value;le!==$e&&(le=$e,p.m.eb(ie(),Y,"textInput",$e))}var Ae,xe,le=Z.value,De=9==p.a.W?me:we,qe=!1;z&&Q("keypress",we),11>z&&Q("propertychange",function($e){qe||"value"!==$e.propertyName||De($e)}),8==z&&(Q("keyup",we),Q("keydown",we)),$&&($(Z,De),Q("dragend",me)),(!z||9<=z)&&Q("input",De),5>M&&"textarea"===p.a.R(Z)?(Q("keydown",me),Q("paste",me),Q("cut",me)):11>L?Q("keydown",me):4>U?(Q("DOMAutoComplete",we),Q("dragdrop",we),Q("drop",we)):j&&"number"===Z.type&&Q("keydown",me),Q("change",we),Q("blur",we),p.o(function K(){var $e=p.a.f(ie());(null===$e||$e===e)&&($e=""),xe!==e&&$e===xe?p.a.setTimeout(K,4):Z.value!==$e&&(qe=!0,Z.value=$e,qe=!1,le=Z.value)},null,{l:Z})}},p.m.wa.textInput=!0,p.c.textinput={preprocess:function(Z,ie,Y){Y("textInput",Z)}}}(),p.c.uniqueName={init:function(S,I){if(I()){var L="ko_unique_"+ ++p.c.uniqueName.rd;p.a.Yc(S,L)}}},p.c.uniqueName.rd=0,p.c.using={init:function(S,I,L,M,U){var z;return L.has("as")&&(z={as:L.get("as"),noChildContext:L.get("noChildContext")}),I=U.createChildContext(I,z),p.Oa(I,S),{controlsDescendantBindings:!0}}},p.h.ea.using=!0,p.c.value={init:function(S,I,L){var M=p.a.R(S),U="input"==M;if(!U||"checkbox"!=S.type&&"radio"!=S.type){var z=[],j=L.get("valueUpdate"),W=!1,q=null;j&&(z="string"==typeof j?[j]:p.a.wc(j),p.a.Pa(z,"change"));var $,Z,V=function(){q=null,W=!1;var ie=I(),Y=p.w.M(S);p.m.eb(ie,L,"value",Y)};!p.a.W||!U||"text"!=S.type||"off"==S.autocomplete||S.form&&"off"==S.form.autocomplete||-1!=p.a.A(z,"propertychange")||(p.a.B(S,"propertychange",function(){W=!0}),p.a.B(S,"focus",function(){W=!1}),p.a.B(S,"blur",function(){W&&V()})),p.a.D(z,function(ie){var Y=V;p.a.Ud(ie,"after")&&(Y=function(){q=p.w.M(S),p.a.setTimeout(V,0)},ie=ie.substring(5)),p.a.B(S,ie,Y)}),$=U&&"file"==S.type?function(){var ie=p.a.f(I());null===ie||ie===e||""===ie?S.value="":p.u.G(V)}:function(){var ie=p.a.f(I()),Y=p.w.M(S);null!==q&&ie===q?p.a.setTimeout($,0):(ie!==Y||Y===e)&&("select"===M?(Y=L.get("valueAllowUnset"),p.w.cb(S,ie,Y),Y||ie===p.w.M(S)||p.u.G(V)):p.w.cb(S,ie))},"select"===M?p.i.subscribe(S,p.i.H,function(){Z?L.get("valueAllowUnset")?$():V():(p.a.B(S,"change",V),Z=p.o($,null,{l:S}))},null,{notifyImmediately:!0}):(p.a.B(S,"change",V),p.o($,null,{l:S}))}else p.ib(S,{checkedValue:I})},update:function(){}},p.m.wa.value=!0,p.c.visible={update:function(S,I){var L=p.a.f(I()),M="none"!=S.style.display;L&&!M?S.style.display="":!L&&M&&(S.style.display="none")}},p.c.hidden={update:function(S,I){p.c.visible.update(S,function(){return!p.a.f(I())})}},function(S){p.c[S]={init:function(I,L,M,U,z){return p.c.event.init.call(this,I,function(){var j={};return j[S]=L(),j},M,U,z)}}}("click"),p.ca=function(){},p.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},p.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},p.ca.prototype.makeTemplateSource=function(S,I){if("string"==typeof S){var L=(I=I||n).getElementById(S);if(!L)throw Error("Cannot find template with ID "+S);return new p.C.F(L)}if(1==S.nodeType||8==S.nodeType)return new p.C.ia(S);throw Error("Unknown template type: "+S)},p.ca.prototype.renderTemplate=function(S,I,L,M){return S=this.makeTemplateSource(S,M),this.renderTemplateSource(S,I,L,M)},p.ca.prototype.isTemplateRewritten=function(S,I){return!1===this.allowTemplateRewriting||this.makeTemplateSource(S,I).data("isRewritten")},p.ca.prototype.rewriteTemplate=function(S,I,L){I=I((S=this.makeTemplateSource(S,L)).text()),S.text(I),S.data("isRewritten",!0)},p.b("templateEngine",p.ca),p.kc=function(){function S(M,U,z,j){M=p.m.ac(M);for(var W=p.m.Ra,q=0;q<M.length;q++){var V=M[q].key;if(Object.prototype.hasOwnProperty.call(W,V)){var $=W[V];if("function"==typeof $){if(V=$(M[q].value))throw Error(V)}else if(!$)throw Error("This template engine does not support the '"+V+"' binding within its templates")}}return z="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+p.m.vb(M,{valueAccessors:!0})+" } })()},'"+z.toLowerCase()+"')",j.createJavaScriptEvaluatorBlock(z)+U}var I=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,L=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(M,U,z){U.isTemplateRewritten(M,z)||U.rewriteTemplate(M,function(j){return p.kc.Ld(j,U)},z)},Ld:function(M,U){return M.replace(I,function(z,j,W,q,V){return S(V,j,W,U)}).replace(L,function(z,j){return S(j,"\x3c!-- ko --\x3e","#comment",U)})},md:function(M,U){return p.aa.Xb(function(z,j){var W=z.nextSibling;W&&W.nodeName.toLowerCase()===U&&p.ib(W,M,j)})}}}(),p.b("__tr_ambtns",p.kc.md),function(){p.C={},p.C.F=function(L){if(this.F=L){var M=p.a.R(L);this.ab="script"===M?1:"textarea"===M?2:"template"==M&&L.content&&11===L.content.nodeType?3:4}},p.C.F.prototype.text=function(){var L=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[L];var M=arguments[0];"innerHTML"===L?p.a.fc(this.F,M):this.F[L]=M};var S=p.a.g.Z()+"_";p.C.F.prototype.data=function(L){if(1===arguments.length)return p.a.g.get(this.F,S+L);p.a.g.set(this.F,S+L,arguments[1])};var I=p.a.g.Z();p.C.F.prototype.nodes=function(){var L=this.F;if(0==arguments.length){var M=p.a.g.get(L,I)||{},U=M.lb||(3===this.ab?L.content:4===this.ab?L:e);if(!U||M.jd){var z=this.text();z&&z!==M.bb&&(U=p.a.Md(z,L.ownerDocument),p.a.g.set(L,I,{lb:U,bb:z,jd:!0}))}return U}M=arguments[0],this.ab!==e&&this.text(""),p.a.g.set(L,I,{lb:M})},p.C.ia=function(L){this.F=L},p.C.ia.prototype=new p.C.F,p.C.ia.prototype.constructor=p.C.ia,p.C.ia.prototype.text=function(){if(0==arguments.length){var L=p.a.g.get(this.F,I)||{};return L.bb===e&&L.lb&&(L.bb=L.lb.innerHTML),L.bb}p.a.g.set(this.F,I,{bb:arguments[0]})},p.b("templateSources",p.C),p.b("templateSources.domElement",p.C.F),p.b("templateSources.anonymousTemplate",p.C.ia)}(),function(){function S(q,V,$){var Z;for(V=p.h.nextSibling(V);q&&(Z=q)!==V;)$(Z,q=p.h.nextSibling(Z))}function I(q,V){if(q.length){var $=q[0],Z=q[q.length-1],ie=$.parentNode,Y=p.ga.instance,Q=Y.preprocessNode;if(Q){if(S($,Z,function(K,me){var we=K.previousSibling,le=Q.call(Y,K);le&&(K===$&&($=le[0]||me),K===Z&&(Z=le[le.length-1]||we))}),q.length=0,!$)return;$===Z?q.push($):(q.push($,Z),p.a.Ua(q,ie))}S($,Z,function(K){1!==K.nodeType&&8!==K.nodeType||p.vc(V,K)}),S($,Z,function(K){1!==K.nodeType&&8!==K.nodeType||p.aa.cd(K,[V])}),p.a.Ua(q,ie)}}function L(q){return q.nodeType?q:0<q.length?q[0]:null}function M(q,V,$,Z,ie){ie=ie||{};var Y=(q&&L(q)||$||{}).ownerDocument,Q=ie.templateEngine||z;if(p.kc.xd($,Q,Y),"number"!=typeof($=Q.renderTemplate($,Z,ie,Y)).length||0<$.length&&"number"!=typeof $[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(Y=!1,V){case"replaceChildren":p.h.va(q,$),Y=!0;break;case"replaceNode":p.a.Xc(q,$),Y=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+V)}return Y&&(I($,Z),ie.afterRender&&p.u.G(ie.afterRender,null,[$,Z[ie.as||"$data"]]),"replaceChildren"==V&&p.i.ma(q,p.i.H)),$}function U(q,V,$){return p.O(q)?q():"function"==typeof q?q(V,$):q}var z;p.gc=function(q){if(q!=e&&!(q instanceof p.ca))throw Error("templateEngine must inherit from ko.templateEngine");z=q},p.dc=function(q,V,$,Z,ie){if((($=$||{}).templateEngine||z)==e)throw Error("Set a template engine before calling renderTemplate");if(ie=ie||"replaceChildren",Z){var Y=L(Z);return p.$(function(){var K=V&&V instanceof p.fa?V:new p.fa(V,null,null,null,{exportDependencies:!0}),Q=U(q,K.$data,K);K=M(Z,ie,Q,K,$),"replaceNode"==ie&&(Y=L(Z=K))},null,{Sa:function(){return!Y||!p.a.Sb(Y)},l:Y&&"replaceNode"==ie?Y.parentNode:Y})}return p.aa.Xb(function(Q){p.dc(q,V,$,Q,"replaceNode")})},p.Qd=function(q,V,$,Z,ie){function Y(xe,De){p.u.G(p.a.ec,null,[Z,xe,K,$,Q,De]),p.i.ma(Z,p.i.H)}function Q(xe,De){I(De,me),$.afterRender&&$.afterRender(De,xe),me=null}function K(xe,De){me=ie.createChildContext(xe,{as:we,noChildContext:$.noChildContext,extend:function($e){$e.$index=De,we&&($e[we+"Index"]=De)}});var qe=U(q,xe,me);return M(Z,"ignoreTargetNode",qe,me,$)}var me,we=$.as,le=!1===$.includeDestroyed||p.options.foreachHidesDestroyed&&!$.includeDestroyed;if(le||$.beforeRemove||!p.Pc(V))return p.$(function(){var xe=p.a.f(V)||[];typeof xe.length>"u"&&(xe=[xe]),le&&(xe=p.a.jb(xe,function(De){return De===e||null===De||!p.a.f(De._destroy)})),Y(xe)},null,{l:Z});Y(V.v());var Ae=V.subscribe(function(xe){Y(V(),xe)},null,"arrayChange");return Ae.l(Z),Ae};var j=p.a.g.Z(),W=p.a.g.Z();p.c.template={init:function(q,V){var $=p.a.f(V());if("string"==typeof $||"name"in $)p.h.Ea(q);else if("nodes"in $){if(p.O($=$.nodes||[]))throw Error('The "nodes" option must be a plain, non-observable array.');var Z=$[0]&&$[0].parentNode;Z&&p.a.g.get(Z,W)||(Z=p.a.Yb($),p.a.g.set(Z,W,!0)),new p.C.ia(q).nodes(Z)}else{if(!(0<($=p.h.childNodes(q)).length))throw Error("Anonymous template defined, but no template content was provided");Z=p.a.Yb($),new p.C.ia(q).nodes(Z)}return{controlsDescendantBindings:!0}},update:function(q,V,$,Z,ie){var Y=V();$=!0,Z=null,"string"==typeof(V=p.a.f(Y))?V={}:(Y="name"in V?V.name:q,"if"in V&&($=p.a.f(V.if)),$&&"ifnot"in V&&($=!p.a.f(V.ifnot)),$&&!Y&&($=!1)),"foreach"in V?Z=p.Qd(Y,$&&V.foreach||[],V,q,ie):$?($=ie,"data"in V&&($=ie.createChildContext(V.data,{as:V.as,noChildContext:V.noChildContext,exportDependencies:!0})),Z=p.dc(Y,$,V,q)):p.h.Ea(q),ie=Z,(V=p.a.g.get(q,j))&&"function"==typeof V.s&&V.s(),p.a.g.set(q,j,!ie||ie.ja&&!ie.ja()?e:ie)}},p.m.Ra.template=function(q){return 1==(q=p.m.ac(q)).length&&q[0].unknown||p.m.Id(q,"name")?null:"This template engine does not support anonymous templates nested within its templates"},p.h.ea.template=!0}(),p.b("setTemplateEngine",p.gc),p.b("renderTemplate",p.dc),p.a.Kc=function(S,I,L){var M,U,z,j,W;if(S.length&&I.length)for(M=U=0;(!L||M<L)&&(j=S[U]);++U){for(z=0;W=I[z];++z)if(j.value===W.value){j.moved=W.index,W.moved=j.index,I.splice(z,1),M=z=0;break}M+=z}},p.a.Pb=function(){function S(I,L,M,U,z){var V,Z,K,me,we,j=Math.min,W=Math.max,q=[],$=I.length,ie=L.length,Y=ie-$||1,Q=$+ie+1;for(V=0;V<=$;V++)for(me=K,q.push(K=[]),we=j(ie,V+Y),Z=W(0,V-1);Z<=we;Z++)K[Z]=Z?V?I[V-1]===L[Z-1]?me[Z-1]:j(me[Z]||Q,K[Z-1]||Q)+1:Z+1:V+1;for(j=[],W=[],Y=[],V=$,Z=ie;V||Z;)ie=q[V][Z]-1,Z&&ie===q[V][Z-1]?W.push(j[j.length]={status:M,value:L[--Z],index:Z}):V&&ie===q[V-1][Z]?Y.push(j[j.length]={status:U,value:I[--V],index:V}):(--Z,--V,z.sparse||j.push({status:"retained",value:L[Z]}));return p.a.Kc(Y,W,!z.dontLimitMoves&&10*$),j.reverse()}return function(I,L,M){return M="boolean"==typeof M?{dontLimitMoves:M}:M||{},(I=I||[]).length<(L=L||[]).length?S(I,L,"added","deleted",M):S(L,I,"deleted","added",M)}}(),p.b("utils.compareArrays",p.a.Pb),function(){function S(M,U,z,j,W){var q=[],V=p.$(function(){var $=U(z,W,p.a.Ua(q,M))||[];0<q.length&&(p.a.Xc(q,$),j&&p.u.G(j,null,[z,$,W])),q.length=0,p.a.Nb(q,$)},null,{l:M,Sa:function(){return!p.a.kd(q)}});return{Y:q,$:V.ja()?V:e}}var I=p.a.g.Z(),L=p.a.g.Z();p.a.ec=function(M,U,z,j,W,q){function V(an){qe={Aa:an,pb:p.ta(me++)},Q.push(qe),Y||De.push(qe)}function $(an){me!==(qe=ie[an]).pb.v()&&xe.push(qe),qe.pb(me++),p.a.Ua(qe.Y,M),Q.push(qe)}function Z(an,en){if(an)for(var he=0,Te=en.length;he<Te;he++)p.a.D(en[he].Y,function(dn){an(dn,he,en[he].Aa)})}typeof(U=U||[]).length>"u"&&(U=[U]),j=j||{};var qe,Lt,On,ii,ie=p.a.g.get(M,I),Y=!ie,Q=[],K=0,me=0,we=[],le=[],Ae=[],xe=[],De=[],$e=0;if(Y)p.a.D(U,V);else{if(!q||ie&&ie._countWaitingForRemove){var ot=p.a.Mb(ie,function(an){return an.Aa});q=p.a.Pb(ot,U,{dontLimitMoves:j.dontLimitMoves,sparse:!0})}var kt,sn,wn;for(ot=0;kt=q[ot];ot++)switch(sn=kt.moved,wn=kt.index,kt.status){case"deleted":for(;K<wn;)$(K++);sn===e&&((qe=ie[K]).$&&(qe.$.s(),qe.$=e),p.a.Ua(qe.Y,M).length&&(j.beforeRemove&&(Q.push(qe),$e++,qe.Aa===L?qe=null:Ae.push(qe)),qe&&we.push.apply(we,qe.Y))),K++;break;case"added":for(;me<wn;)$(K++);sn!==e?(le.push(Q.length),$(sn)):V(kt.value)}for(;me<U.length;)$(K++);Q._countWaitingForRemove=$e}p.a.g.set(M,I,Q),Z(j.beforeMove,xe),p.a.D(we,j.beforeRemove?p.oa:p.removeNode);try{ii=M.ownerDocument.activeElement}catch{}if(le.length)for(;(ot=le.shift())!=e;){for(qe=Q[ot],Lt=e;ot;)if((On=Q[--ot].Y)&&On.length){Lt=On[On.length-1];break}for(U=0;K=qe.Y[U];Lt=K,U++)p.h.Wb(M,K,Lt)}for(ot=0;qe=Q[ot];ot++){for(qe.Y||p.a.extend(qe,S(M,z,qe.Aa,W,qe.pb)),U=0;K=qe.Y[U];Lt=K,U++)p.h.Wb(M,K,Lt);!qe.Ed&&W&&(W(qe.Aa,qe.Y,qe.pb),qe.Ed=!0,Lt=qe.Y[qe.Y.length-1])}for(ii&&M.ownerDocument.activeElement!=ii&&ii.focus(),Z(j.beforeRemove,Ae),ot=0;ot<Ae.length;++ot)Ae[ot].Aa=L;Z(j.afterMove,xe),Z(j.afterAdd,De)}}(),p.b("utils.setDomNodeChildrenFromArrayMapping",p.a.ec),p.ba=function(){this.allowTemplateRewriting=!1},p.ba.prototype=new p.ca,p.ba.prototype.constructor=p.ba,p.ba.prototype.renderTemplateSource=function(S,I,L,M){return(I=9>p.a.W||!S.nodes?null:S.nodes())?p.a.la(I.cloneNode(!0).childNodes):(S=S.text(),p.a.ua(S,M))},p.ba.Ma=new p.ba,p.gc(p.ba.Ma),p.b("nativeTemplateEngine",p.ba),function(){p.$a=function(){var I=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(L,M,U,z){if(z=z||n,U=U||{},2>I)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var j=L.data("precompiled");return j||(j=L.text()||"",j=o.template(null,"{{ko_with $item.koBindingContext}}"+j+"{{/ko_with}}"),L.data("precompiled",j)),L=[M.$data],M=o.extend({koBindingContext:M},U.templateOptions),(M=o.tmpl(j,L,M)).appendTo(z.createElement("div")),o.fragments={},M},this.createJavaScriptEvaluatorBlock=function(L){return"{{ko_code ((function() { return "+L+" })()) }}"},this.addTemplate=function(L,M){n.write("<script type='text/html' id='"+L+"'>"+M+"<\/script>")},0<I&&(o.tmpl.tag.ko_code={open:"__.push($1 || '');"},o.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},p.$a.prototype=new p.ca,p.$a.prototype.constructor=p.$a;var S=new p.$a;0<S.Hd&&p.gc(S),p.b("jqueryTmplTemplateEngine",p.$a)}()}(t.ko={})}();var vnt=ko;typeof window<"u"?(ko=window.ko,typeof uE<"u"?window.ko=uE:delete window.ko):(ko=global.ko,typeof uE<"u"?global.ko=uE:delete global.ko);const Rk=vnt;var Nk="__knockoutObservables",Mk="__knockoutSubscribable";function die(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=fie(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach(function(o){if(o!==Nk&&o!==Mk&&!(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&&function Int(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=function Pnt(e,t,n){var i=function Ont(e,t){var n=t[Mk];if(!n){n=new e.subscribable,Object.defineProperty(t,Mk,{value:n});var i={};(function Lnt(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!0!==n.pause&&t.notifySubscribers(this),r}})})(t,n,i),function Rnt(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}})})}(e,t,n,i)}return n}(e,n);return i.subscribe(t)}(e,t,i))})}(n,a)}}),e}function fie(e,t){var n=e[Nk];return!n&&t&&(n={},Object.defineProperty(e,Nk,{value:n})),n}function Dnt(e,t,n){var o={owner:e,deferEvaluation:!0};if("function"==typeof n)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("function"!=typeof n.get)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]=this.computed(o),die.call(this,e,[t]),e}function hie(e,t){if(!e)return null;var n=fie(e,!1);return n&&n[t]||null}function Nnt(e,t){var n=hie(e,t);n&&n.valueHasMutated()}const Fnt_attachToKo=function Mnt(e){e.track=die,e.getObservable=hie,e.valueHasMutated=Nnt,e.defineProperty=Dnt},pie="http://www.w3.org/2000/svg",mie="cesium-svgPath-svg";Fnt_attachToKo(Rk),function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){const i=document.createElementNS(pie,"svg:svg");i.setAttribute("class",mie);const o=document.createElementNS(pie,"path");return i.appendChild(o),e.virtualElements.setDomNodeChildren(t,[i]),e.computed({read:function(){const r=e.unwrap(n());o.setAttribute("d",e.unwrap(r.path));const 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",`${mie} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}(Rk);const wt=Rk,du=function knt(e,t,n,i,o){return n.call(i,e[t]),wt.getObservable(e,t).subscribe(n,i,o)},cy="http://www.w3.org/2000/svg",_ie="http://www.w3.org/1999/xlink";let c1;const dE=X.fromCssColorString("rgba(247,250,255,0.384)"),l1=X.fromCssColorString("rgba(143,191,255,0.216)"),Fk=X.fromCssColorString("rgba(153,197,255,0.098)"),u1=X.fromCssColorString("rgba(255,255,255,0.086)"),Unt=X.fromCssColorString("rgba(255,255,255,0.267)"),znt=X.fromCssColorString("rgba(255,255,255,0)"),gie=X.fromCssColorString("rgba(66,67,68,0.3)"),yie=X.fromCssColorString("rgba(0,0,0,0.5)");function Vm(e){return X.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}const fE={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 _d(e){const t=document.createElementNS(cy,e.tagName);for(const n in e)if(e.hasOwnProperty(n)&&"tagName"!==n)if("children"===n){const i=e.children.length;for(let o=0;o<i;++o)t.appendChild(_d(e.children[o]))}else 0===n.indexOf("xlink:")?t.setAttributeNS(_ie,n.substring(6),e[n]):"textContent"===n?t.textContent=e[n]:t.setAttribute(n,e[n]);return t}function Bk(e,t,n){const i=document.createElementNS(cy,"text");i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("class","cesium-animation-svgText");const o=document.createElementNS(cy,"tspan");return o.textContent=n,i.appendChild(o),i}const d1=new X;function Mr(e,t){const n=t.alpha,i=1-n;return d1.red=e.red*i+t.red*n,d1.green=e.green*i+t.green*n,d1.blue=e.blue*i+t.blue*n,d1.toCssColorString()}function kk(e,t,n){const i=fE[n];return _d({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:""}]})}function $h(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;const n=this;this._clickFunction=function(){const i=n._viewModel.command;i.canExecute&&i()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[du(t,"toggled",this.setToggled,this),du(t,"tooltip",this.setTooltip,this),du(t.command,"canExecute",this.setEnabled,this)]}function fA(e,t){if(!c(e))throw new E("container is required.");if(!c(t))throw new E("viewModel is required.");e=Lr(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;const 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]);const 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];const r=document.createElementNS(cy,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",_ie);const s=document.createElementNS(cy,"g");this._topG=s,this._realtimeSVG=new $h(function Hnt(e,t,n){const i=fE[n],o=fE.animation_pathWingButton;return _d({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:""}]})}(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new $h(kk(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new $h(kk(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new $h(kk(84,99,"animation_pathPause"),t.pauseViewModel);const a=document.createElementNS(cy,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);const l=_d({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=l;const u=fE.animation_pathSwooshFX,d=fE.animation_pathPointer,h=_d({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:u.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:u.d},{tagName:u.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:u.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=h,this._shuttleRingPointer=_d({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:d.tagName,d:d.d});const m=_d({tagName:"g",transform:"translate(100,100)"});this._knobOuter=_d({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});const p=_d({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:61});this._knobDate=Bk(0,-24,""),this._knobTime=Bk(0,-7,""),this._knobStatus=Bk(0,-41,"");const y=_d({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:61}),A=document.createElementNS(cy,"g");A.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(o),s.appendChild(A),s.appendChild(m),s.appendChild(a),A.appendChild(l),A.appendChild(h),A.appendChild(this._shuttleRingPointer),m.appendChild(this._knobOuter),m.appendChild(p),m.appendChild(this._knobDate),m.appendChild(this._knobTime),m.appendChild(this._knobStatus),m.appendChild(y),r.appendChild(s),e.appendChild(r);const x=this;function C(N){!function Gnt(e,t){const n=e._viewModel,i=n.shuttleRingDragging;if(!i||c1===e)if("mousedown"===t.type||i&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||i&&"touchmove"===t.type&&1===t.touches.length){const o=e._centerX,r=e._centerY,a=e._svgNode.getBoundingClientRect();let l,u;if("touchstart"===t.type||"touchmove"===t.type?(l=t.touches[0].clientX,u=t.touches[0].clientY):(l=t.clientX,u=t.clientY),!i&&(l>a.right||l<a.left||u<a.top||u>a.bottom))return;const d=e._shuttleRingPointer.getBoundingClientRect();let _=180*Math.atan2(u-r-a.top,l-o-a.left)/Math.PI+90;_>180&&(_-=360);const p=n.shuttleRingAngle;i||l<d.right&&l>d.left&&u>d.top&&u<d.bottom?(c1=e,n.shuttleRingDragging=!0,n.shuttleRingAngle=_):_<p?n.slower():_>p&&n.faster(),t.preventDefault()}else e===c1&&(c1=void 0),n.shuttleRingDragging=!1}(x,N)}this._mouseCallback=C,l.addEventListener("mousedown",C,!0),l.addEventListener("touchstart",C,!0),h.addEventListener("mousedown",C,!0),h.addEventListener("touchstart",C,!0),n.addEventListener("mousemove",C,!0),n.addEventListener("touchmove",C,!0),n.addEventListener("mouseup",C,!0),n.addEventListener("touchend",C,!0),n.addEventListener("touchcancel",C,!0),this._shuttleRingPointer.addEventListener("mousedown",C,!0),this._shuttleRingPointer.addEventListener("touchstart",C,!0),this._knobOuter.addEventListener("mousedown",C,!0),this._knobOuter.addEventListener("touchstart",C,!0);const w=this._knobTime.childNodes[0],v=this._knobDate.childNodes[0],D=this._knobStatus.childNodes[0];let P;this._subscriptions=[du(t.pauseViewModel,"toggled",function(N){P!==N&&(P=N,x._shuttleRingPointer.setAttribute("class",P?"cesium-animation-shuttleRingPausePointer":"cesium-animation-shuttleRingPointer"))}),du(t,"shuttleRingAngle",function(N){!function Vnt(e,t,n){e.setAttribute("transform",`translate(100,100) rotate(${n})`),t.setAttribute("transform",`rotate(${n})`)}(x._shuttleRingPointer,x._knobOuter,N)}),du(t,"dateLabel",function(N){v.textContent!==N&&(v.textContent=N)}),du(t,"timeLabel",function(N){w.textContent!==N&&(w.textContent=N)}),du(t,"multiplierLabel",function(N){D.textContent!==N&&(D.textContent=N)})],this.applyThemeChanges(),this.resize()}$h.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);const e=this._subscriptions;for(let t=0,n=e.length;t<n;t++)e[t].dispose();Ye(this)},$h.prototype.isDestroyed=function(){return!1},$h.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e)return void this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");if(this._toggled)return void this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");this.svgElement.setAttribute("class","cesium-animation-rectButton")}},$h.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&this.svgElement.setAttribute("class",e?"cesium-animation-rectButton cesium-animation-buttonToggled":"cesium-animation-rectButton"))},$h.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(fA.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),fA.prototype.isDestroyed=function(){return!1},fA.prototype.destroy=function(){c(this._observer)&&(this._observer.disconnect(),this._observer=void 0);const 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();const n=this._subscriptions;for(let i=0,o=n.length;i<o;i++)n[i].dispose();return Ye(this)},fA.prototype.resize=function(){const e=this._container.clientWidth,t=this._container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;const n=this._svgNode,i=200,o=132;let r=e,s=t;0===e&&0===t?(r=i,s=o):0===e?(s=t,r=i*(t/o)):0===t&&(r=e,s=o*(e/i));const a=r/i,l=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},${l})`),this._centerX=Math.max(1,100*a),this._centerY=Math.max(1,100*l),this._lastHeight=e,this._lastWidth=t},fA.prototype.applyThemeChanges=function(){const e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(c(this._observer))return;const d=this;return d._observer=new MutationObserver(function(){e.body.contains(d._container)&&(d._observer.disconnect(),d._observer=void 0,d.applyThemeChanges())}),void d._observer.observe(e,{childList:!0,subtree:!0})}const t=Vm(this._themeNormal),n=Vm(this._themeHover),i=Vm(this._themeSelect),o=Vm(this._themeDisabled),r=Vm(this._themeKnob),s=Vm(this._themePointer),a=Vm(this._themeSwoosh),l=Vm(this._themeSwooshHover),u=_d({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Mr(t,dE)},{tagName:"stop",offset:"12%","stop-color":Mr(t,l1)},{tagName:"stop",offset:"46%","stop-color":Mr(t,Fk)},{tagName:"stop",offset:"81%","stop-color":Mr(t,u1)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Mr(n,dE)},{tagName:"stop",offset:"12%","stop-color":Mr(n,l1)},{tagName:"stop",offset:"46%","stop-color":Mr(n,Fk)},{tagName:"stop",offset:"81%","stop-color":Mr(n,u1)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Mr(i,dE)},{tagName:"stop",offset:"12%","stop-color":Mr(i,l1)},{tagName:"stop",offset:"46%","stop-color":Mr(i,Fk)},{tagName:"stop",offset:"81%","stop-color":Mr(i,u1)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Mr(o,Unt)},{tagName:"stop",offset:"75%","stop-color":Mr(o,znt)}]},{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":l.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":l.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":Mr(s,yie)},{tagName:"stop",offset:"100%","stop-color":Mr(s,yie)}]},{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":Mr(r,dE)},{tagName:"stop",offset:"60%","stop-color":Mr(r,gie)},{tagName:"stop",offset:"85%","stop-color":Mr(r,l1)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":Mr(r,gie)},{tagName:"stop",offset:"60%","stop-color":Mr(r,dE)},{tagName:"stop",offset:"85%","stop-color":Mr(r,u1)}]}]});c(this._defsElement)?this._svgNode.replaceChild(u,this._defsElement):this._svgNode.appendChild(u),this._defsElement=u};const jnt=fA,Fr=function Wnt(e,t){if(!c(e))throw new E("func is required.");t=g(t,!0);const n=new Ue,i=new Ue;function o(){if(!o.canExecute)throw new E("Cannot execute command, canExecute is false.");const r={args:arguments,cancel:!1};let s;return n.raiseEvent(r),r.cancel||(s=e.apply(null,arguments),i.raiseEvent(s)),s}return o.canExecute=t,wt.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o};function bie(e,t){if(!c(e))throw new E("command is required.");this._command=e,t=g(t,g.EMPTY_OBJECT),this.toggled=g(t.toggled,!1),this.tooltip=g(t.tooltip,""),wt.track(this,["toggled","tooltip"])}Object.defineProperties(bie.prototype,{command:{get:function(){return this._command}}});const f1=bie,qnt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Aie(e,t){return e-t}function Uk(e,t){const n=ke(t,e,Aie);return n<0?~n:n}function fu(e){if(!c(e))throw new E("clockViewModel is required.");const t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=fu.defaultDateFormatter,this._timeFormatter=fu.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,wt.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(fu.defaultTicks),this.timeLabel=void 0,wt.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,wt.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,wt.defineProperty(this,"multiplierLabel",function(){const s=t._clockViewModel;if(s.clockStep===$s.SYSTEM_CLOCK)return"Today";const a=s.multiplier;return a%1==0?`${a.toFixed(0)}x`:`${a.toFixed(3).replace(/0{0,3}$/,"")}x`}),this.shuttleRingAngle=void 0,wt.defineProperty(this,"shuttleRingAngle",{get:function(){return function Xnt(e,t,n){if(n.clockStep===$s.SYSTEM_CLOCK)return 15;if(Math.abs(e)<=1)return 15*e;const i=t[t.length-1];e>i?e=i:e<-i&&(e=-i);let s,l;return e>0?(s=Math.log(i),l=(s-0)/90,(Math.log(e)-0)/l+15):(s=Math.log(-t[0]),l=(s-0)/90,-((Math.log(Math.abs(e))-0)/l+15))}(e.multiplier,t._allShuttleRingTicks,e)},set:function(s){s=Math.max(Math.min(s,105),-105);const a=t._allShuttleRingTicks,l=t._clockViewModel;if(l.clockStep=$s.SYSTEM_CLOCK_MULTIPLIER,105===Math.abs(s))return void(l.multiplier=s>0?a[a.length-1]:a[0]);let u=function Ynt(e,t){if(Math.abs(e)<=15)return e/15;let o,s;return e>0?(o=Math.log(t[t.length-1]),s=(o-0)/90,Math.exp(0+s*(e-15))):(o=Math.log(-t[0]),s=(o-0)/90,-Math.exp(0+s*(Math.abs(e)-15)))}(s,a);if(t.snapToTicks)u=a[Uk(u,a)];else if(0!==u){const d=Math.abs(u);if(d>100){const h=d.toFixed(0).length-2,m=Math.pow(10,h);u=Math.round(u/m)*m|0}else d>15?u=Math.round(u):d>1?u=+u.toFixed(1):d>0&&(u=+u.toFixed(2))}l.multiplier=u}}),this._canAnimate=void 0,wt.defineProperty(this,"_canAnimate",function(){const s=t._clockViewModel,a=s.clockRange;if(t.shuttleRingDragging||a===om.UNBOUNDED)return!0;const l=s.multiplier,u=s.currentTime,d=s.startTime;let h=!1;if(a===om.LOOP_STOP)h=se.greaterThan(u,d)||u.equals(d)&&l>0;else{const m=s.stopTime;h=se.greaterThan(u,d)&&se.lessThan(u,m)||u.equals(d)&&l>0||u.equals(m)&&l<0}return h||(s.shouldAnimate=!1),h}),this._isSystemTimeAvailable=void 0,wt.defineProperty(this,"_isSystemTimeAvailable",function(){const s=t._clockViewModel;if(s.clockRange===om.UNBOUNDED)return!0;const l=s.systemTime;return se.greaterThanOrEquals(l,s.startTime)&&se.lessThanOrEquals(l,s.stopTime)}),this._isAnimating=void 0,wt.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});const n=Fr(function(){const s=t._clockViewModel;s.shouldAnimate?s.shouldAnimate=!1:t._canAnimate&&(s.shouldAnimate=!0)});this._pauseViewModel=new f1(n,{toggled:wt.computed(function(){return!t._isAnimating}),tooltip:"Pause"});const i=Fr(function(){const s=t._clockViewModel,a=s.multiplier;a>0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playReverseViewModel=new f1(i,{toggled:wt.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});const o=Fr(function(){const s=t._clockViewModel,a=s.multiplier;a<0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playForwardViewModel=new f1(o,{toggled:wt.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==$s.SYSTEM_CLOCK}),tooltip:"Play Forward"});const r=Fr(function(){t._clockViewModel.clockStep=$s.SYSTEM_CLOCK},wt.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new f1(r,{toggled:wt.computed(function(){return e.clockStep===$s.SYSTEM_CLOCK}),tooltip:wt.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=Fr(function(){const s=t._clockViewModel,a=t._allShuttleRingTicks,u=Uk(s.multiplier,a)-1;u>=0&&(s.multiplier=a[u])}),this._faster=Fr(function(){const s=t._clockViewModel,a=t._allShuttleRingTicks,u=Uk(s.multiplier,a)+1;u<a.length&&(s.multiplier=a[u])})}fu.defaultDateFormatter=function(e,t){const n=se.toGregorianDate(e);return`${qnt[n.month-1]} ${n.day} ${n.year}`},fu.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],fu.defaultTimeFormatter=function(e,t){const n=se.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`},fu.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},fu.prototype.setShuttleRingTicks=function(e){if(!c(e))throw new E("positiveTicks is required.");let t,n,i;const 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(Aie);const s=[];for(n=r.length,t=n-1;t>=0;--t)i=r[t],0!==i&&s.push(-i);Array.prototype.push.apply(s,r),this._allShuttleRingTicks=s},Object.defineProperties(fu.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){if("function"!=typeof e)throw new E("dateFormatter must be a function");this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){if("function"!=typeof e)throw new E("timeFormatter must be a function");this._timeFormatter=e}}}),fu._maxShuttleRingAngle=105,fu._realtimeShuttleRingAngle=15;const Znt=fu,Tie=function $nt(e){return e=g(e,g.EMPTY_OBJECT),xw.fromIonAssetId(1,{requestVertexNormals:g(e.requestVertexNormals,!1),requestWaterMask:g(e.requestWaterMask,!1)})};function h1(e){T.typeOf.object("terrainProviderPromise",e),this._ready=!1,this._provider=void 0,this._errorEvent=new Ue,this._readyEvent=new Ue,function Qnt(e,t){zk.apply(this,arguments)}(this,e)}function zk(){return zk=(0,Pe.Z)(function*(e,t){let n;try{n=yield Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){!function Knt(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}(e._errorEvent,i)}}),zk.apply(this,arguments)}Object.defineProperties(h1.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}}}),h1.fromWorldTerrain=function(e){return new h1(Tie(e))};const Jnt=h1;function xie(e){const t=(e=g(e,g.EMPTY_OBJECT)).globe,n=g(e.imageryProviderViewModels,[]),i=g(e.terrainProviderViewModels,[]);if(!c(t))throw new E("globe is required");this._globe=t,this.imageryProviderViewModels=n.slice(0),this.terrainProviderViewModels=i.slice(0),this.dropDownVisible=!1,wt.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);const o=wt.getObservable(this,"imageryProviderViewModels"),r=wt.pureComputed(function(){const h=o(),m={};let _;for(_=0;_<h.length;_++){const A=h[_],x=A.category;c(m[x])?m[x].push(A):m[x]=[A]}const p=Object.keys(m),y=[];for(_=0;_<p.length;_++){const A=p[_];y.push({name:A,providers:m[A]})}return y});this._imageryProviders=r;const s=wt.getObservable(this,"terrainProviderViewModels"),a=wt.pureComputed(function(){const h=s(),m={};let _;for(_=0;_<h.length;_++){const A=h[_],x=A.category;c(m[x])?m[x].push(A):m[x]=[A]}const p=Object.keys(m),y=[];for(_=0;_<p.length;_++){const A=p[_];y.push({name:A,providers:m[A]})}return y});this._terrainProviders=a,this.buttonTooltip=void 0,wt.defineProperty(this,"buttonTooltip",function(){const h=this.selectedImagery,m=this.selectedTerrain,_=c(h)?h.name:void 0,p=c(m)?m.name:void 0;return c(_)&&c(p)?`${_}\n${p}`:c(_)?_:p}),this.buttonImageUrl=void 0,wt.defineProperty(this,"buttonImageUrl",function(){const h=this.selectedImagery;if(c(h))return h.iconUrl}),this.selectedImagery=void 0;const l=wt.observable();this._currentImageryLayers=[],wt.defineProperty(this,"selectedImagery",{get:function(){return l()},set:function(h){if(l()===h)return void(this.dropDownVisible=!1);let m;const _=this._currentImageryLayers,p=_.length,y=this._globe.imageryLayers;let A=!1;for(m=0;m<p;m++){const x=y.length;for(let C=0;C<x;C++){const w=y.get(C);if(w===_[m]){y.remove(w),A=!0;break}}}if(c(h)){const x=h.creationCommand();if(Array.isArray(x)){const C=x.length;for(this._currentImageryLayers=[],m=C-1;m>=0;m--){const w=xc.fromProviderAsync(x[m]);y.add(w,0),this._currentImageryLayers.push(w)}}else{this._currentImageryLayers=[];const C=xc.fromProviderAsync(x);if(C.name=h.name,A)y.add(C,0);else{const w=y.get(0);c(w)&&y.remove(w),y.add(C,0)}this._currentImageryLayers.push(C)}}l(h),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;const u=wt.observable();wt.defineProperty(this,"selectedTerrain",{get:function(){return u()},set:function(h){if(u()===h)return void(this.dropDownVisible=!1);let m;if(c(h)&&(m=h.creationCommand()),c(m)&&!c(m.then))this._globe.depthTestAgainstTerrain=!(m instanceof Ff),this._globe.terrainProvider=m;else if(c(m)){let _=!1;const p=this._globe.terrainProviderChanged.addEventListener(()=>{_=!0,p()}),A=new Jnt(m).readyEvent.addEventListener(x=>{_||(this._globe.depthTestAgainstTerrain=!(x instanceof Ff),this._globe.terrainProvider=x,A())})}u(h),this.dropDownVisible=!1}});const d=this;this._toggleDropDown=Fr(function(){d.dropDownVisible=!d.dropDownVisible}),this.selectedImagery=g(e.selectedImageryProviderViewModel,n[0]),this.selectedTerrain=g(e.selectedTerrainProviderViewModel,i[0])}Object.defineProperties(xie.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});const eit=xie;function p1(e,t){if(!c(e))throw new E("container is required.");e=Lr(e);const n=new eit(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);const 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);const r=document.createElement("div");r.className="cesium-baseLayerPicker-dropDown",r.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(r);const s=document.createElement("div");s.className="cesium-baseLayerPicker-sectionTitle",s.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),s.innerHTML="Imagery",r.appendChild(s);const a=document.createElement("div");a.className="cesium-baseLayerPicker-section",a.setAttribute("data-bind","foreach: _imageryProviders"),r.appendChild(a);const l=document.createElement("div");l.className="cesium-baseLayerPicker-category",a.appendChild(l);const u=document.createElement("div");u.className="cesium-baseLayerPicker-categoryTitle",u.setAttribute("data-bind","text: name"),l.appendChild(u);const d=document.createElement("div");d.className="cesium-baseLayerPicker-choices",d.setAttribute("data-bind","foreach: providers"),l.appendChild(d);const h=document.createElement("div");h.className="cesium-baseLayerPicker-item",h.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),d.appendChild(h);const m=document.createElement("img");m.className="cesium-baseLayerPicker-itemIcon",m.setAttribute("data-bind","attr: { src: iconUrl }"),m.setAttribute("draggable","false"),h.appendChild(m);const _=document.createElement("div");_.className="cesium-baseLayerPicker-itemLabel",_.setAttribute("data-bind","text: name"),h.appendChild(_);const p=document.createElement("div");p.className="cesium-baseLayerPicker-sectionTitle",p.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),p.innerHTML="Terrain",r.appendChild(p);const y=document.createElement("div");y.className="cesium-baseLayerPicker-section",y.setAttribute("data-bind","foreach: _terrainProviders"),r.appendChild(y);const A=document.createElement("div");A.className="cesium-baseLayerPicker-category",y.appendChild(A);const x=document.createElement("div");x.className="cesium-baseLayerPicker-categoryTitle",x.setAttribute("data-bind","text: name"),A.appendChild(x);const C=document.createElement("div");C.className="cesium-baseLayerPicker-choices",C.setAttribute("data-bind","foreach: providers"),A.appendChild(C);const w=document.createElement("div");w.className="cesium-baseLayerPicker-item",w.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),C.appendChild(w);const v=document.createElement("img");v.className="cesium-baseLayerPicker-itemIcon",v.setAttribute("data-bind","attr: { src: iconUrl }"),v.setAttribute("draggable","false"),w.appendChild(v);const D=document.createElement("div");D.className="cesium-baseLayerPicker-itemLabel",D.setAttribute("data-bind","text: name"),w.appendChild(D),wt.applyBindings(n,i),wt.applyBindings(n,r),this._viewModel=n,this._container=e,this._element=i,this._dropPanel=r,this._closeDropDown=function(P){i.contains(P.target)||r.contains(P.target)||(n.dropDownVisible=!1)},zn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(p1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),p1.prototype.isDestroyed=function(){return!1},p1.prototype.destroy=function(){return zn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),wt.cleanNode(this._element),wt.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),Ye(this)};const tit=p1,nit=new qn("MapQuest, Open Street Map and contributors, CC-BY-SA");function m1(e){e=g(e,g.EMPTY_OBJECT);const t=jt.createIfNeeded(g(e.url,"https://tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+=`{z}/{x}/{y}${e.retinaTiles?"@2x":""}.${g(e.fileExtension,"png")}`;const n=new Td({ellipsoid:e.ellipsoid}),r=g(e.minimumLevel,0),s=e.maximumLevel,a=g(e.rectangle,n.rectangle),l=n.positionToTileXY(Ce.southwest(a),r),u=n.positionToTileXY(Ce.northeast(a),r),d=(Math.abs(u.x-l.x)+1)*(Math.abs(u.y-l.y)+1);if(d>4)throw new E(`The rectangle and minimumLevel indicate that there are ${d} tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.`);let h=g(e.credit,nit);"string"==typeof h&&(h=new qn(h)),Jp.call(this,{url:t,credit:h,tilingScheme:n,tileWidth:256,tileHeight:256,minimumLevel:r,maximumLevel:s,rectangle:a})}c(Object.create)&&((m1.prototype=Object.create(Jp.prototype)).constructor=m1);const hE=m1;function Cie(e){if(!c(e.name))throw new E("options.name is required.");if(!c(e.tooltip))throw new E("options.tooltip is required.");if(!c(e.iconUrl))throw new E("options.iconUrl is required.");if("function"!=typeof e.creationFunction)throw new E("options.creationFunction is required.");let t=e.creationFunction;c(t.canExecute)||(t=Fr(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=g(e.category,""),wt.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(Cie.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});const oa=Cie;function pE(e){c(e)||(e=new hD),this._clock=e,this._eventHelper=new Rh,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=wt.observable(se.now()),this.systemTime.equalityComparer=se.equals,this.startTime=wt.observable(e.startTime),this.startTime.equalityComparer=se.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=wt.observable(e.stopTime),this.stopTime.equalityComparer=se.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=wt.observable(e.currentTime),this.currentTime.equalityComparer=se.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=wt.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=wt.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=wt.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=wt.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=wt.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),wt.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(pE.prototype,{clock:{get:function(){return this._clock}}}),pE.prototype.synchronize=function(){const e=this._clock;this.systemTime=se.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},pE.prototype.isDestroyed=function(){return!1},pE.prototype.destroy=function(){this._eventHelper.removeAll(),Ye(this)};const ait=pE;function _1(e,t){c(t)||(t=document.body),t=Lr(t);const n=this,i=wt.observable(Es.fullscreen),o=wt.observable(Es.enabled),r=t.ownerDocument;this.isFullscreen=void 0,wt.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,wt.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(s){o(s&&Es.enabled)}}),this.tooltip=void 0,wt.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Fr(function(){Es.fullscreen?Es.exitFullscreen():Es.requestFullscreen(n._fullscreenElement)},wt.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=g(Lr(e),r.body),this._callback=function(){i(Es.fullscreen)},r.addEventListener(Es.changeEventName,this._callback)}Object.defineProperties(_1.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){if(!(e instanceof Element))throw new E("value must be a valid Element.");this._fullscreenElement=e}},command:{get:function(){return this._command}}}),_1.prototype.isDestroyed=function(){return!1},_1.prototype.destroy=function(){document.removeEventListener(Es.changeEventName,this._callback),Ye(this)};const cit=_1;function g1(e,t){if(!c(e))throw new E("container is required.");e=Lr(e);const n=new cit(t,e);n._exitFullScreenPath="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",n._enterFullScreenPath="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";const 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),wt.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(g1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),g1.prototype.isDestroyed=function(){return!1},g1.prototype.destroy=function(){return this._viewModel.destroy(),wt.cleanNode(this._element),this._container.removeChild(this._element),Ye(this)};const dit=g1,Vk=Object.freeze({SEARCH:0,AUTOCOMPLETE:1});function Hk(e){T.defined("url",e),this._url=jt.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(Hk.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}}),Hk.prototype.geocode=function(){var e=(0,Pe.Z)(function*(t,n){return T.typeOf.string("query",t),this._url.getDerivedResource({url:n===Vk.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:t}}).fetchJson().then(function(o){return o.features.map(function(r){let s;const a=r.bbox;return s=c(a)?Ce.fromDegrees(a[0],a[1],a[2],a[3]):f.fromDegrees(r.geometry.coordinates[0],r.geometry.coordinates[1]),{displayName:r.properties.label,destination:s,attributions:o.attributions}})})});return function(t,n){return e.apply(this,arguments)}}();const fit=Hk;function Gk(e){e=g(e,g.EMPTY_OBJECT),T.typeOf.object("options.scene",e.scene);const t=g(e.accessToken,l_.defaultAccessToken),n=jt.createIfNeeded(g(e.server,l_.defaultServer));n.appendForwardSlash();const i=l_.getDefaultTokenCredit(t);c(i)&&e.scene.frameState.creditDisplay.addStaticCredit(qn.clone(i));const o=n.getDerivedResource({url:"v1/geocode"});c(t)&&o.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=n,this._pelias=new fit(o)}Object.defineProperties(Gk.prototype,{credit:{get:function(){}}}),Gk.prototype.geocode=function(){var e=(0,Pe.Z)(function*(t,n){return this._pelias.geocode(t,n)});return function(t,n){return e.apply(this,arguments)}}();const hit=Gk;function y1(){E.throwInstantiationError()}Object.defineProperties(y1.prototype,{credit:{get:E.throwInstantiationError}}),y1.getCreditsFromResult=function(e){if(c(e.attributions))return e.attributions.map(qn.getIonCredit)},y1.prototype.geocode=E.throwInstantiationError;const Eie=y1;function hu(e){if(!c(e)||!c(e.scene))throw new E("options.scene is required.");this._geocoderServices=c(e.geocoderServices)?e.geocoderServices:[new hit({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 Ue,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=vie,this._handleArrowUp=Sie;const t=this;this._suggestionsVisible=wt.pureComputed(function(){const o=wt.getObservable(t,"_suggestions")().length>0,r=wt.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=Fr(function(i){return i=g(i,Vk.SEARCH),t._focusTextbox=!1,c(t._selectedSuggestion)?(t.activateSuggestion(t._selectedSuggestion),!1):(t.hideSuggestions(),t.isSearchInProgress?void function bit(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}(t):function git(e,t,n){return Wk.apply(this,arguments)}(t,t._geocoderServices,i))}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(i,o){return("ArrowDown"===o.key||"Down"===o.key||40===o.keyCode||"ArrowUp"===o.key||"Up"===o.key||38===o.keyCode)&&o.preventDefault(),!0},this.handleKeyUp=function(i,o){const r="ArrowDown"===o.key||"Down"===o.key||40===o.keyCode,a="Enter"===o.key||13===o.keyCode;return"ArrowUp"===o.key||"Up"===o.key||38===o.keyCode?Sie(t):r?vie(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;const o=i.destination;Pie(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=g(e.autocomplete,!0),this.destinationFound=g(e.destinationFound,hu.flyToDestination),this._focusTextbox=!1,wt.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);const n=wt.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){hu._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,wt.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,wt.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){if("string"!=typeof i)throw new E("value must be a valid string.");this._searchText=i}}),this.flightDuration=void 0,wt.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){if(c(i)&&i<0)throw new E("value must be positive.");this._flightDuration=i}})}function Sie(e){if(0===e._suggestions.length)return;const t=e._suggestions.indexOf(e._selectedSuggestion);if(-1===t||0===t)return void(e._selectedSuggestion=void 0);const n=t-1;e._selectedSuggestion=e._suggestions[n],hu._adjustSuggestionsScroll(e,n)}function vie(e){if(0===e._suggestions.length)return;const t=e._suggestions.length,i=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t;e._selectedSuggestion=e._suggestions[i],hu._adjustSuggestionsScroll(e,i)}function _it(e,t,n){return jk.apply(this,arguments)}function jk(){return jk=(0,Pe.Z)(function*(e,t,n){try{return{state:"fulfilled",value:yield e.geocode(t,n),credits:e.credit}}catch(i){return{state:"rejected",reason:i}}}),jk.apply(this,arguments)}function Wk(){return Wk=(0,Pe.Z)(function*(e,t,n){const i=e._searchText;if(Iie(i))return void e.showSuggestions();let o,r;for(e._isSearchInProgress=!0,e._wasGeocodeCancelled=!1,o=0;o<t.length;o++){if(e._wasGeocodeCancelled)return;if(r=yield _it(t[o],i,n),c(r)&&"fulfilled"===r.state&&r.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,Yk(e);const s=r.value;if("fulfilled"===r.state&&c(s)&&s.length>0){e._searchText=s[0].displayName,e.destinationFound(e,s[0].destination);const a=Die(e,Eie.getCreditsFromResult(s[0]));c(a)||qk(e,t[o].credit)}else e._searchText=`${i} (not found)`}),Wk.apply(this,arguments)}function qk(e,t){c(t)&&!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function Die(e,t){return c(t)&&t.forEach(n=>qk(e,n)),t}function Yk(e){!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function Iie(e){return/^\s*$/.test(e)}function Pie(e){wt.getObservable(e,"_suggestions").removeAll()}function Xk(){return Xk=(0,Pe.Z)(function*(e){if(!e.autoComplete)return;const t=e._searchText;if(Pie(e),Yk(e),!Iie(t))for(const n of e._geocoderServices){const i=yield n.geocode(t,Vk.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(i),i.length>0){let o=!0;i.forEach(r=>{const s=Eie.getCreditsFromResult(r);o=o&&!c(s),Die(e,s)}),o&&qk(e,n.credit)}if(e._suggestions.length>=5)return}}),Xk.apply(this,arguments)}Object.defineProperties(hu.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}}}),hu.prototype.destroy=function(){this._suggestionSubscription.dispose()},hu.flyToDestination=function mit(e,t){const n=e._scene,o=n.mapProjection.ellipsoid,r=n.camera,s=n.terrainProvider;let l,a=t;return t instanceof Ce?O.equalsEpsilon(t.south,t.north,O.EPSILON7)&&O.equalsEpsilon(t.east,t.west,O.EPSILON7)?t=Ce.center(t):l=Tne(t,n):t=o.cartesianToCartographic(t),c(l)||(l=function pit(e,t){const n=c(t)?t.availability:void 0;return c(n)?ok(t,[e]).then(function(i){return(e=i[0]).height+=1e3,e}):(e.height+=1e3,Promise.resolve(e))}(t,s)),l.then(function(u){a=o.cartographicToCartesian(u)}).finally(function(){r.flyTo({destination:a,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:k.IDENTITY})})},hu._updateSearchSuggestions=function Ait(e){return Xk.apply(this,arguments)},hu._adjustSuggestionsScroll=function yit(e,t){const n=Lr(e._viewContainer),i=n.getElementsByClassName("search-results")[0],r=n.getElementsByTagName("li")[t];if(0===t)return void(i.scrollTop=0);const s=r.offsetTop;s+r.clientHeight>i.clientHeight?i.scrollTop=s+r.clientHeight:s<i.scrollTop&&(i.scrollTop=s)},hu.prototype.isDestroyed=function(){return!1},hu.prototype.destroy=function(){return Yk(this),Ye(this)};const Tit=hu;function b1(e){if(!c(e)||!c(e.container))throw new E("options.container is required.");if(!c(e.scene))throw new E("options.scene is required.");const t=Lr(e.container),n=new Tit(e);n._startSearchPath="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",n._stopSearchPath="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";const i=document.createElement("form");i.setAttribute("data-bind","submit: search");const 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;const 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);const s=document.createElement("div");s.className="search-results",s.setAttribute("data-bind","visible: _suggestionsVisible");const a=document.createElement("ul");a.setAttribute("data-bind","foreach: _suggestions");const l=document.createElement("li");a.appendChild(l),l.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),s.appendChild(a),t.appendChild(s),wt.applyBindings(n,i),wt.applyBindings(n,s),this._container=t,this._searchSuggestionsContainer=s,this._viewModel=n,this._form=i,this._onInputBegin=function(u){let d=u.target;"function"==typeof u.composedPath&&(d=u.composedPath()[0]),t.contains(d)||(n._focusTextbox=!1,n.hideSuggestions())},this._onInputEnd=function(u){n._focusTextbox=!0,n.showSuggestions()},zn.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(b1.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}}),b1.prototype.isDestroyed=function(){return!1},b1.prototype.destroy=function(){const e=this._container;return zn.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(),wt.cleanNode(this._form),wt.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),Ye(this)};const Eit=b1;function Oie(e,t){if(!c(e))throw new E("scene is required.");this._scene=e,this._duration=t;const n=this;this._command=Fr(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",wt.track(this,["tooltip"])}Object.defineProperties(Oie.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){if(c(e)&&e<0)throw new E("value must be positive.");this._duration=e}}});const wit=Oie;function A1(e,t,n){if(!c(e))throw new E("container is required.");e=Lr(e);const i=new wit(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";const 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),wt.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(A1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),A1.prototype.isDestroyed=function(){return!1},A1.prototype.destroy=function(){return wt.cleanNode(this._element),this._container.removeChild(this._element),Ye(this)};const Sit=A1;function Zk(){this._cameraClicked=new Ue,this._closeClicked=new Ue,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",wt.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,wt.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?"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":"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"}}),wt.defineProperty(this,"_bodyless",{get:function(){return!c(this.description)||0===this.description.length}})}Zk.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(Zk.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});const Iit=Zk;function T1(e){T.defined("container",e),e=Lr(e);const t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);const n=document.createElement("div");n.className="cesium-infoBox-title",n.setAttribute("data-bind","text: titleText"),t.appendChild(n);const 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);const 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);const 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);const s=new Iit;wt.applyBindings(s,t),this._container=e,this._element=t,this._frame=r,this._viewModel=s,this._descriptionSubscription=void 0;const a=this;r.addEventListener("load",function(){const l=r.contentDocument,u=l.createElement("link");u.href=ni("Widgets/InfoBox/InfoBoxDescription.css"),u.rel="stylesheet",u.type="text/css";const d=l.createElement("div");d.className="cesium-infoBox-description",l.head.appendChild(u),l.body.appendChild(d),a._descriptionSubscription=du(s,"description",function(h){r.style.height="5px",d.innerHTML=h;let m=null;const _=d.firstElementChild;if(null!==_&&1===d.childNodes.length){const y=window.getComputedStyle(_);if(null!==y){const x=X.fromCssColorString(y["background-color"]);c(x)&&0!==x.alpha&&(m=y["background-color"])}}t.style["background-color"]=m;const p=d.getBoundingClientRect().height;r.style.height=`${p}px`})}),r.setAttribute("src","about:blank")}Object.defineProperties(T1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),T1.prototype.isDestroyed=function(){return!1},T1.prototype.destroy=function(){const e=this._container;return wt.cleanNode(this._element),e.removeChild(this._element),c(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),Ye(this)};const Pit=T1;function Lie(){this.showInstructions=!1;const e=this;this._command=Fr(function(){e.showInstructions=!e.showInstructions}),this._showClick=Fr(function(){e._touch=!1}),this._showTouch=Fr(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",wt.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(Lie.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});const Oit=Lie;function x1(e){if(!c(e)||!c(e.container))throw new E("options.container is required.");const t=Lr(e.container),n=new Oit,i=g(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";const o=document.createElement("span");o.className="cesium-navigationHelpButton-wrapper",t.appendChild(o);const 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);const s=document.createElement("div");s.className="cesium-navigation-help",s.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),o.appendChild(s);const 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}');const l=document.createElement("img");l.src=ni("Widgets/Images/NavigationHelp/Mouse.svg"),l.className="cesium-navigation-button-icon",l.style.width="25px",l.style.height="25px",a.appendChild(l),a.appendChild(document.createTextNode("Mouse"));const u=document.createElement("button");u.type="button",u.className="cesium-navigation-button cesium-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');const d=document.createElement("img");d.src=ni("Widgets/Images/NavigationHelp/Touch.svg"),d.className="cesium-navigation-button-icon",d.style.width="25px",d.style.height="25px",u.appendChild(d),u.appendChild(document.createTextNode("Touch")),s.appendChild(a),s.appendChild(u);const h=document.createElement("div");h.className="cesium-click-navigation-help cesium-navigation-help-instructions",h.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),h.innerHTML=` <table> <tr> <td><img src="${ni("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="${ni("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="${ni("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(h);const m=document.createElement("div");m.className="cesium-touch-navigation-help cesium-navigation-help-instructions",m.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),m.innerHTML=` <table> <tr> <td><img src="${ni("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="${ni("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="${ni("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="${ni("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(m),wt.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(_){o.contains(_.target)||(n.showInstructions=!1)},zn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(x1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),x1.prototype.isDestroyed=function(){return!1},x1.prototype.destroy=function(){return zn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),wt.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Ye(this)};const Lit=x1;function C1(e){if(!c(e))throw new E("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof $n,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,wt.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);const t=this;wt.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=Fr(function(){t.sceneMode===ce.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new Rh,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===ce.SCENE2D||t._scene.camera.frustum instanceof $n}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=c(e.camera._currentFlight)}),this._switchToPerspective=Fr(function(){t.sceneMode!==ce.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=Fr(function(){t.sceneMode!==ce.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=ce}Object.defineProperties(C1.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}}}),C1.prototype.isDestroyed=function(){return!1},C1.prototype.destroy=function(){this._eventHelper.removeAll(),Ye(this)};const Rit=C1;function E1(e,t){if(!c(e))throw new E("container is required.");if(!c(t))throw new E("scene is required.");e=Lr(e);const n=new Rit(t);n._perspectivePath="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",n._orthographicPath="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";const i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);const 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='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',i.appendChild(o);const 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);const 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),wt.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},zn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(E1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),E1.prototype.isDestroyed=function(){return!1},E1.prototype.destroy=function(){return this._viewModel.destroy(),zn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),wt.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Ye(this)};const Fit=E1;function w1(e,t){if(!c(e))throw new E("scene is required.");this._scene=e;const n=this;this._eventHelper=new Rh,this._eventHelper.add(e.morphStart,function(o,r,s,a){n.sceneMode=s,n.dropDownVisible=!1}),this._duration=g(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",wt.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,wt.defineProperty(this,"selectedTooltip",function(){const o=n.sceneMode;return o===ce.SCENE2D?n.tooltip2D:o===ce.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=Fr(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=Fr(function(){e.morphTo2D(n._duration)}),this._morphTo3D=Fr(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=Fr(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=ce}Object.defineProperties(w1.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new E("duration value must be positive.");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}}}),w1.prototype.isDestroyed=function(){return!1},w1.prototype.destroy=function(){this._eventHelper.removeAll(),Ye(this)};const Bit=w1;function S1(e,t,n){if(!c(e))throw new E("container is required.");if(!c(t))throw new E("scene is required.");e=Lr(e);const i=new Bit(t,n);i._globePath="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",i._flatMapPath="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",i._columbusViewPath="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";const o=document.createElement("span");o.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(o);const 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='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',o.appendChild(r);const 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);const 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);const l=document.createElement("button");l.type="button",l.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",l.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(l),wt.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(u){o.contains(u.target)||(i.dropDownVisible=!1)},zn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(S1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),S1.prototype.isDestroyed=function(){return!1},S1.prototype.destroy=function(){return this._viewModel.destroy(),zn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),wt.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Ye(this)};const Vit=S1,Hit=new G,v1="-1000px";function mE(e,t,n){if(!c(e))throw new E("scene is required.");if(!c(t))throw new E("selectionIndicatorElement is required.");if(!c(n))throw new E("container is required.");this._scene=e,this._screenPositionX=v1,this._screenPositionY=v1,this._tweens=e.tweens,this._container=g(n,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,wt.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,wt.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&c(this.position)}}),wt.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return Ur.wgs84ToWindowCoordinates(e,i,o)}}mE.prototype.update=function(){if(this.showSelection&&c(this.position)){const e=this.computeScreenSpacePosition(this.position,Hit);if(c(e)){const t=this._container,n=t.parentNode.clientWidth,i=t.parentNode.clientHeight,o=this._selectionIndicatorElement.clientWidth,r=.5*o;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`}else this._screenPositionX=v1,this._screenPositionY=v1}},mE.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Pc.EXPONENTIAL_OUT})},mE.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Pc.EXPONENTIAL_OUT})},Object.defineProperties(mE.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});const Git=mE;function D1(e,t){if(!c(e))throw new E("container is required.");e=Lr(e),this._container=e;const 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;const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");const s=document.createElementNS(i,"g");s.setAttribute("transform","translate(80,80)"),r.appendChild(s);const a=document.createElementNS(i,"path");a.setAttribute("data-bind","attr: { transform: _transform }"),a.setAttribute("d","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"),s.appendChild(a),n.appendChild(r);const l=new Git(t,this._element,this._container);this._viewModel=l,wt.applyBindings(this._viewModel,this._element)}Object.defineProperties(D1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),D1.prototype.isDestroyed=function(){return!1},D1.prototype.destroy=function(){const e=this._container;return wt.cleanNode(this._element),e.removeChild(this._element),Ye(this)};const jit=D1;function ly(e,t,n){this._color=e,this._height=t,this._base=g(n,0)}ly.prototype.getHeight=function(){return this._height},ly.prototype.getBase=function(){return this._base},ly.prototype.getStartTime=function(){return this._start},ly.prototype.getStopTime=function(){return this._stop},ly.prototype.setRange=function(e,t){this._start=e,this._stop=t},ly.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){const n=se.secondsDifference(this._start,e.epochJulian);let i=Math.round(e.timeBarWidth*e.getAlpha(n));const o=se.secondsDifference(this._stop,e.epochJulian);let 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};const Wit=ly;function Rie(e,t,n,i){this.interval=e,this.height=t,this.color=n||new X(.5,.5,.5,1),this.backgroundColor=i||new X(0,0,0,0)}Rie.prototype.render=function(e,t){const n=this.interval.start,i=this.interval.stop,o=t.startJulian,r=se.addSeconds(t.startJulian,t.duration,new se);if(se.lessThan(n,o)&&se.greaterThan(i,r))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(se.lessThanOrEquals(n,r)&&se.greaterThanOrEquals(i,o)){let s,a,l;for(s=0;s<t.timeBarWidth;++s){const u=se.addSeconds(t.startJulian,s/t.timeBarWidth*t.duration,new se);!c(a)&&se.greaterThanOrEquals(u,n)?a=s:!c(l)&&se.greaterThanOrEquals(u,i)&&(l=s)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),c(a)&&(c(l)||(l=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(a,t.y,Math.max(l-a,1),this.height))}};const qit=Rie;let $k=1e12;const pu_none=0,pu_scrub=1,pu_slide=2,pu_zoom=3,pu_touchOnly=4,cc_none=0,cc_scrub=1,cc_slideZoom=2,cc_singleTap=3,cc_ignore=4,Gm=[.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],Yit=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function lc(e,t){if(!c(e))throw new E("container is required.");if(!c(t))throw new E("clock is required.");const n=(e=Lr(e)).ownerDocument;this.container=e;const 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=pu_none,this._touchMode=cc_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=function Xit(e){return function(t){e._mouseMode!==pu_touchOnly&&(0===t.button?(e._mouseMode=pu_scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,e._mouseMode=2===t.button?pu_zoom:pu_slide)),t.preventDefault()}}(this),this._onMouseUp=function Zit(e){return function(t){e._mouseMode=pu_none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}(this),this._onMouseMove=function $it(e){return function(t){let n;if(e._mouseMode===pu_scrub){t.preventDefault();const 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===pu_slide){if(n=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==n){const i=n*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(se.addSeconds(e._startJulian,i,new se),se.addSeconds(e._endJulian,i,new se))}}else e._mouseMode===pu_zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==n&&e.zoomFrom(Math.pow(1.01,n)))}}(this),this._onMouseWheel=function Kit(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;$k=Math.max(Math.min(Math.abs(n),$k),1),n/=$k,e.zoomFrom(Math.pow(1.05,-n))}}(this),this._onTouchStart=function Qit(e){return function(t){const n=t.touches.length;let i,o;const r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=pu_touchOnly,1===n?(i=se.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=cc_scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===n?"-16px 0":"0 0")):(e._touchMode=cc_singleTap,e._touchState.centerX=t.touches[0].clientX-r)):2===n?(e._touchMode=cc_slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=cc_ignore}}(this),this._onTouchMove=function eot(e){return function(t){let n,i,o,r,s,a,l=1;const u=e._topDiv.getBoundingClientRect().left;e._touchMode===cc_singleTap&&(e._touchMode=cc_slideZoom),e._mouseMode=pu_touchOnly,e._touchMode===cc_scrub?(t.preventDefault(),1===t.changedTouches.length&&(i=t.changedTouches[0].clientX-u,i>=0&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===cc_slideZoom&&(o=t.touches.length,2===o?(r=.5*(t.touches[0].clientX+t.touches[1].clientX)-u,s=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===o&&(r=t.touches[0].clientX-u,s=0),c(r)&&(s>0&&e._touchState.spanX>0?(l=e._touchState.spanX/s,a=se.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*l)/e._topDiv.clientWidth,new se)):(n=e._touchState.centerX-r,a=se.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new se)),e.zoomTo(a,se.addSeconds(a,e._timeBarSecondsSpan*l,new se)),e._touchState.centerX=r,e._touchState.spanX=s))}}(this),this._onTouchEnd=function Jit(e){return function(t){const n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===cc_singleTap?(e._touchMode=cc_scrub,e._onTouchMove(t)):e._touchMode===cc_scrub&&e._onTouchMove(t),e._mouseMode=pu_touchOnly,1!==n?e._touchMode=n>0?cc_ignore:cc_none:e._touchMode===cc_slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}(this);const 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()}function Kk(e){return e<10?`0${e.toString()}`:e.toString()}lc.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)},lc.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)},lc.prototype.isDestroyed=function(){return!1},lc.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);const e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);const 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),Ye(this)},lc.prototype.addHighlightRange=function(e,t,n){const i=new Wit(e,t,n);return this._highlightRanges.push(i),this.resize(),i},lc.prototype.addTrack=function(e,t,n,i){const o=new qit(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o},lc.prototype.zoomTo=function(e,t){if(!c(e))throw new E("startTime is required.");if(!c(t))throw new E("stopTime is required");if(se.lessThanOrEquals(t,e))throw new E("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=se.secondsDifference(t,e),this._clock&&this._clock.clockRange!==om.UNBOUNDED){const i=this._clock.startTime,o=this._clock.stopTime,r=se.secondsDifference(o,i),s=se.secondsDifference(i,this._startJulian),a=se.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):s>0?(this._endJulian=se.addSeconds(this._endJulian,s,new se),this._startJulian=i,this._timeBarSecondsSpan=se.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=se.addSeconds(this._startJulian,a,new se),this._endJulian=o,this._timeBarSecondsSpan=se.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();const 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)},lc.prototype.zoomFrom=function(e){let t=se.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;const n=this._timeBarSecondsSpan-t;this.zoomTo(se.addSeconds(this._startJulian,t-t*e,new se),se.addSeconds(this._endJulian,n*e-n,new se))},lc.prototype.makeLabel=function(e){const t=se.toGregorianDate(e),n=t.millisecond;let i=" UTC";if(n>0&&this._timeBarSecondsSpan<3600){for(i=Math.floor(n).toString();i.length<3;)i=`0${i}`;i=`.${i}`}return`${Yit[t.month-1]} ${t.day} ${t.year} ${Kk(t.hour)}:${Kk(t.minute)}:${Kk(t.second)}${i}`},lc.prototype.smallestTicInPixels=7,lc.prototype._makeTics=function(){const e=this._timeBarEle,t=se.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),i=n-8;let o;const r=this;this._needleEle.style.left=`${n.toString()}px`;let s="";const a=.01,l=31536e6,u=1e-10;let d=0,h=this._timeBarSecondsSpan;h<a?(h=a,this._timeBarSecondsSpan=a,this._endJulian=se.addSeconds(this._startJulian,a,new se)):h>l&&(h=l,this._timeBarSecondsSpan=l,this._endJulian=se.addSeconds(this._startJulian,l,new se));let m=this._timeBarEle.clientWidth;m<10&&(m=10);const _=this._startJulian,p=Math.min(h/m*1e-5,.4);let y;const A=se.toGregorianDate(_);y=se.fromDate(h>31536e4?new Date(Date.UTC(100*Math.floor(A.year/100),0)):h>31536e3?new Date(Date.UTC(10*Math.floor(A.year/10),0)):h>86400?new Date(Date.UTC(A.year,0)):new Date(Date.UTC(A.year,A.month,A.day)));const x=se.secondsDifference(this._startJulian,se.addSeconds(y,p,new se));let C=x+h;function w(V){return Math.floor(x/V)*V}function v(V,$){return Math.ceil(V/$+.5)*$}function D(V){return(V-x)/h}function P(V,$){return V-$*Math.round(V/$)}this._epochJulian=y,this._rulerEle.innerHTML=this.makeLabel(se.addSeconds(this._endJulian,-a,new se));let N=this._rulerEle.offsetWidth+20;N<30&&(N=180);const R=d;d-=u;const B={startTime:x,startJulian:_,epochJulian:y,duration:h,timeBarWidth:m,getAlpha:D};this._highlightRanges.forEach(function(V){s+=V.render(B)});let F=0,S=0,I=0,L=N/m;L>1&&(L=1),L*=this._timeBarSecondsSpan;let M=-1,U=-1;const z=Gm.length;let j;for(j=0;j<z;++j){const V=Gm[j];if(++M,F=V,V>L&&V>d)break;U<0&&m*(V/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(U=M)}if(M>0){for(;M>0;)if(--M,Math.abs(P(F,Gm[M]))<1e-5){Gm[M]>=d&&(S=Gm[M]);break}if(U>=0)for(;U<M;){if(Math.abs(P(S,Gm[U]))<1e-5&&Gm[U]>=d){I=Gm[U];break}++U}}d=R,d>u&&I<1e-5&&Math.abs(d-F)>u&&(I=d,d<=F+u&&(S=0));let q,W=-999999;if(m*(I/this._timeBarSecondsSpan)>=3)for(o=w(I);o<=C;o=v(o,I))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(m*D(o)).toString()}px;"></span>`;if(m*(S/this._timeBarSecondsSpan)>=3)for(o=w(S);o<=C;o=v(o,S))s+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(m*D(o)).toString()}px;"></span>`;if(m*(F/this._timeBarSecondsSpan)>=2){this._mainTicSpan=F,C+=F,o=w(F);const V=se.computeTaiMinusUtc(y);for(;o<=C;){let $=se.addSeconds(_,o-x,new se);if(F>2.1){const Q=se.computeTaiMinusUtc($);Math.abs(Q-V)>.1&&(o+=Q-V,$=se.addSeconds(_,o-x,new se))}const Z=Math.round(m*D(o)),ie=this.makeLabel($);this._rulerEle.innerHTML=ie,q=this._rulerEle.offsetWidth,q<10&&(q=N);const Y=Z-(q/2-1);Y>W?(W=Y+q+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${Z.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${Y.toString()}px;">${ie}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${Z.toString()}px;"></span>`,o=v(o,F)}}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),B.y=0,this._trackList.forEach(function(V){V.render(r._context,B),B.y+=V.height})},lc.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;const e=this._scrubElement;if(c(this._scrubElement)){const t=se.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`)}c(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(se.addSeconds(this._startJulian,this._timelineDrag,new se),se.addSeconds(this._endJulian,this._timelineDrag,new se)))},lc.prototype._setTimeBarTime=function(e,t){e=Math.round(e),this._scrubJulian=se.addSeconds(this._startJulian,t,new se),this._scrubElement&&(this._scrubElement.style.left=`${(e-8).toString()}px`,this._needleEle.style.left=`${e.toString()}px`);const 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)},lc.prototype.resize=function(){const 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};const tot=lc;var not=st(8097);function Nie(){const e=window.screen;c(e)&&(c(e.unlockOrientation)?e.unlockOrientation():c(e.mozUnlockOrientation)?e.mozUnlockOrientation():c(e.msUnlockOrientation)?e.msUnlockOrientation():c(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function I1(e,t){if(!c(e))throw new E("scene is required.");const n=this,i=wt.observable(Es.enabled),o=wt.observable(!1);this.isVRMode=void 0,wt.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,wt.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&Es.enabled)}}),this.tooltip=void 0,wt.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});const r=wt.observable(!1);this._isOrthographic=void 0,wt.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new Rh,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof $n)}),this._locked=!1,this._noSleep=new not,this._command=Fr(function(){!function oot(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(Nie(),e._locked=!1),e._noSleep.disable(),Es.exitFullscreen(),n(!1)):(Es.fullscreen||Es.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=function iot(e){let t=!1;const n=window.screen;return c(n)&&(c(n.lockOrientation)?t=n.lockOrientation(e):c(n.mozLockOrientation)?t=n.mozLockOrientation(e):c(n.msLockOrientation)?t=n.msLockOrientation(e):c(n.orientation&&n.orientation.lock)&&(t=n.orientation.lock(e))),t}("landscape")),t.useWebVR=!0,n(!0)))}(n,e,o,r)},wt.getObservable(this,"isVREnabled")),this._vrElement=g(Lr(t),document.body),this._callback=function(){!Es.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(Nie(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(Es.changeEventName,this._callback)}Object.defineProperties(I1.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){if(!(e instanceof Element))throw new E("value must be a valid Element.");this._vrElement=e}},command:{get:function(){return this._command}}}),I1.prototype.isDestroyed=function(){return!1},I1.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Es.changeEventName,this._callback),Ye(this)};const rot=I1;function P1(e,t,n){if(!c(e))throw new E("container is required.");if(!c(t))throw new E("scene is required.");e=Lr(e);const i=new rot(t,n);i._exitVRPath="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",i._enterVRPath="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";const 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),wt.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(P1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),P1.prototype.isDestroyed=function(){return!1},P1.prototype.destroy=function(){return this._viewModel.destroy(),wt.cleanNode(this._element),this._container.removeChild(this._element),Ye(this)};const cot=P1,jm=new be;function Mie(e){const t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function lot(e){const t=e.getPropertyIds();let n="";return t.forEach(function(i){const o=e.getProperty(i);c(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 uot(e){let t;const n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){const 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))}const o=n.length;for(t=0;t<o;t++){const r=n[t];if(c(r)&&""!==r)return r}return"Unnamed Feature"}function Fie(e,t){const n=e.scene.pick(t.position);if(c(n)){const i=g(n.id,n.primitive.id);if(i instanceof wc)return i;if(n instanceof m_)return new wc({name:uot(n),description:lot(n),feature:n})}if(c(e.scene.globe))return function hot(e,t){const n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!c(o))return;const r=new wc({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!c(s)||0===s.length)return void(e.selectedEntity=kie());const a=s[0],l=new wc({id:a.name,description:a.description});if(c(a.position)){const u=e.scene.globe.ellipsoid.cartographicToCartesian(a.position,fot);l.position=new Ov(u)}e.selectedEntity=l},function(){e.selectedEntity===r&&(e.selectedEntity=kie())}),r}(e,t.position)}const dot=new se;function Bie(e,t,n){if(c(n)){const i=n.clock;if(c(i)&&(i.getValue(t),c(e))){const o=i.startTime;let r=i.stopTime;se.equals(o,r)&&(r=se.addSeconds(o,O.EPSILON2,dot)),e.updateFromClock(),e.zoomTo(o,r)}}}const fot=new f;function kie(){return new wc({id:"None",description:"No features found."})}function Li(e,t){if(!c(e))throw new E("container is required.");e=Lr(e),t=g(t,g.EMPTY_OBJECT);const n=!(c(t.globe)&&!1===t.globe||c(t.baseLayerPicker)&&!1===t.baseLayerPicker);if(!n&&c(t.selectedImageryProviderViewModel))throw new E("options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.baseLayer instead or set options.baseLayerPicker to true.");if(!n&&c(t.selectedTerrainProviderViewModel))throw new E("options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.terrainProvider instead or set options.baseLayerPicker to true.");const i=this,o=document.createElement("div");o.className="cesium-viewer",e.appendChild(o);const r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",o.appendChild(r);const s=document.createElement("div");s.className="cesium-viewer-bottom",o.appendChild(s);const a=g(t.scene3DOnly,!1);let l,u,d=!1;c(t.clockViewModel)?(u=t.clockViewModel,l=u.clock):(l=new hD,u=new ait(l),d=!0),c(t.shouldAnimate)&&(l.shouldAnimate=t.shouldAnimate);const h=new _Ye(r,{baseLayer:!(n||c(t.baseLayer)||c(t.imageryProvider))&&void 0,clock:l,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:c(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});let m=t.dataSources,_=!1;c(m)||(m=new gYe,_=!0);const p=h.scene,y=new MJe({scene:p,dataSourceCollection:m}),A=new Rh;let x,C;if(A.add(l.onTick,Li.prototype._onTick,this),A.add(p.morphStart,Li.prototype._clearTrackedObject,this),!c(t.selectionIndicator)||!1!==t.selectionIndicator){const Z=document.createElement("div");Z.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(Z),x=new jit(Z,p)}if(!c(t.infoBox)||!1!==t.infoBox){const Z=document.createElement("div");Z.className="cesium-viewer-infoBoxContainer",o.appendChild(Z),C=new Pit(Z);const ie=C.viewModel;A.add(ie.cameraClicked,Li.prototype._onInfoBoxCameraClicked,this),A.add(ie.closeClicked,Li.prototype._onInfoBoxClockClicked,this)}const w=document.createElement("div");let v,D,P,N,R,B,F,S,I,L,M,U,z,j,W;if(w.className="cesium-viewer-toolbar",o.appendChild(w),!c(t.geocoder)||!1!==t.geocoder){const Z=document.createElement("div");let ie;Z.className="cesium-viewer-geocoderContainer",w.appendChild(Z),c(t.geocoder)&&"boolean"!=typeof t.geocoder&&(ie=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),v=new Eit({container:Z,geocoderServices:ie,scene:p}),A.add(v.viewModel.search.beforeExecute,Li.prototype._clearObjects,this)}if((!c(t.homeButton)||!1!==t.homeButton)&&(D=new Sit(w,p),c(v)&&A.add(D.viewModel.command.afterExecute,function(){const Z=v.viewModel;Z.searchText="",Z.isSearchInProgress&&Z.search()}),A.add(D.viewModel.command.beforeExecute,Li.prototype._clearTrackedObject,this)),!0===t.sceneModePicker&&a)throw new E("options.sceneModePicker is not available when options.scene3DOnly is set to true.");if(!a&&(!c(t.sceneModePicker)||!1!==t.sceneModePicker)&&(P=new Vit(w,p)),t.projectionPicker&&(N=new Fit(w,p)),n){const Z=g(t.imageryProviderViewModels,function iit(){const e=[],t=devicePixelRatio>=2;return e.push(new oa({name:"Bing Maps Aerial",iconUrl:ni("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Dv({style:vv.AERIAL})}})),e.push(new oa({name:"Bing Maps Aerial with Labels",iconUrl:ni("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Dv({style:vv.AERIAL_WITH_LABELS})}})),e.push(new oa({name:"Bing Maps Roads",iconUrl:ni("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Dv({style:vv.ROAD})}})),e.push(new oa({name:"ArcGIS World Imagery",iconUrl:ni("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 \nhttps://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9",category:"Other",creationFunction:function(){return gv.fromBasemapType(z0.SATELLITE,{enablePickFeatures:!1})}})),e.push(new oa({name:"ArcGIS World Hillshade",iconUrl:ni("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 \nhttps://www.arcgis.com/home/item.html?id=1b243539f4514b6ba35e7d995890db1d",category:"Other",creationFunction:function(){return gv.fromBasemapType(z0.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new oa({name:"Esri World Ocean",iconUrl:ni("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 \nhttps://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500",category:"Other",creationFunction:function(){return gv.fromBasemapType(z0.OCEANS,{enablePickFeatures:!1})}})),e.push(new oa({name:"Open\xadStreet\xadMap",iconUrl:ni("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",category:"Other",creationFunction:function(){return new hE({url:"https://tile.openstreetmap.org/"})}})),e.push(new oa({name:"Stadia x Stamen Watercolor",iconUrl:ni("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.\nhttps://docs.stadiamaps.com/map-styles/stamen-watercolor/",category:"Other",creationFunction:function(){return new hE({url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/",fileExtension:"jpg",credit:'© <a href="https://stamen.com/" target="_blank">Stamen Design</a>\n © <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>\n © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>\n © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>'})}})),e.push(new oa({name:"Stadia x Stamen Toner",iconUrl:ni("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.\nhttps://docs.stadiamaps.com/map-styles/stamen-toner/",category:"Other",creationFunction:function(){return new hE({url:"https://tiles.stadiamaps.com/tiles/stamen_toner/",retinaTiles:t,credit:'© <a href="https://stamen.com/" target="_blank">Stamen Design</a>\n © <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>\n © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>\n © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>'})}})),e.push(new oa({name:"Stadia Alidade Smooth",iconUrl:ni("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.\nhttps://docs.stadiamaps.com/map-styles/alidade-smooth/",category:"Other",creationFunction:function(){return new hE({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth/",retinaTiles:t,credit:'© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>\n © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>\n © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>'})}})),e.push(new oa({name:"Stadia Alidade Smooth Dark",iconUrl:ni("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.\nhttps://docs.stadiamaps.com/map-styles/alidade-smooth-dark/",category:"Other",creationFunction:function(){return new hE({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/",retinaTiles:t,credit:'© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>\n © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>\n © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>'})}})),e.push(new oa({name:"Sentinel-2",iconUrl:ni("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 Sv.fromAssetId(3954)}})),e.push(new oa({name:"Blue Marble",iconUrl:ni("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return Sv.fromAssetId(3845)}})),e.push(new oa({name:"Earth at night",iconUrl:ni("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 Sv.fromAssetId(3812)}})),e.push(new oa({name:"Natural Earth\xa0II",iconUrl:ni("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",category:"Cesium ion",creationFunction:function(){return Ev.fromUrl(ni("Assets/Textures/NaturalEarthII"))}})),e}()),ie=g(t.terrainProviderViewModels,function rit(){const e=[];return e.push(new oa({name:"WGS84 Ellipsoid",iconUrl:ni("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new Ff}})),e.push(new oa({name:"Cesium World Terrain",iconUrl:ni("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 Tie({requestWaterMask:!0,requestVertexNormals:!0})}})),e}());R=new tit(w,{globe:p.globe,imageryProviderViewModels:Z,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:ie,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),B=w.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}if(c(t.baseLayer)&&!1!==t.baseLayer&&(n&&(R.viewModel.selectedImagery=void 0),p.imageryLayers.removeAll(),p.imageryLayers.add(t.baseLayer)),c(t.terrainProvider)&&(n&&(R.viewModel.selectedTerrain=void 0),p.terrainProvider=t.terrainProvider),c(t.terrain)){if(c(t.terrainProvider))throw new E("Specify either options.terrainProvider or options.terrain.");n&&(R.viewModel.selectedTerrain=void 0,p.globe.depthTestAgainstTerrain=!0),p.setTerrain(t.terrain)}if(!c(t.navigationHelpButton)||!1!==t.navigationHelpButton){let Z=!0;try{if(c(window.localStorage)){const ie=window.localStorage.getItem("cesium-hasSeenNavHelp");c(ie)&&ie?Z=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}F=new Lit({container:w,instructionsInitiallyVisible:g(t.navigationInstructionsInitiallyVisible,Z)})}if(!c(t.animation)||!1!==t.animation){const Z=document.createElement("div");Z.className="cesium-viewer-animationContainer",o.appendChild(Z),S=new jnt(Z,new Znt(u))}if(!c(t.timeline)||!1!==t.timeline){const Z=document.createElement("div");Z.className="cesium-viewer-timelineContainer",o.appendChild(Z),I=new tot(Z,l),I.addEventListener("settime",Mie,!1),I.zoomTo(l.startTime,l.stopTime)}if((!c(t.fullscreenButton)||!1!==t.fullscreenButton)&&(U=document.createElement("div"),U.className="cesium-viewer-fullscreenContainer",o.appendChild(U),L=new dit(U,t.fullscreenElement),M=du(L.viewModel,"isFullscreenEnabled",function(Z){U.style.display=Z?"block":"none",c(I)&&(I.container.style.right=`${U.clientWidth}px`,I.resize())})),t.vrButton){const Z=document.createElement("div");Z.className="cesium-viewer-vrContainer",o.appendChild(Z),z=new cot(Z,p,t.fullScreenElement),j=du(z.viewModel,"isVREnabled",function(ie){Z.style.display=ie?"block":"none",c(L)&&(Z.style.right=`${U.clientWidth}px`),c(I)&&(I.container.style.right=`${Z.clientWidth}px`,I.resize())}),W=du(z.viewModel,"isVRMode",function(ie){!function pot(e,t){const n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,l=e._timeline,u=e._fullscreenButton,d=e._infoBox,h=e._selectionIndicator,m=t?"hidden":"visible";if(c(n)&&(n.container.style.visibility=m),c(i)&&(i.container.style.visibility=m),c(o)&&(o.container.style.visibility=m),c(r)&&(r.container.style.visibility=m),c(s)&&(s.container.style.visibility=m),c(a)&&(a.container.style.visibility=m),c(l)&&(l.container.style.visibility=m),c(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=m),c(d)&&(d.container.style.visibility=m),c(h)&&(h.container.style.visibility=m),e._container){const _=t||!c(u)?0:u.container.clientWidth;e._vrButton.container.style.right=`${_}px`,e.forceResize()}}(i,ie)})}this._baseLayerPickerDropDown=B,this._fullscreenSubscription=M,this._vrSubscription=j,this._vrModeSubscription=W,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=g(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=s,this._element=o,this._cesiumWidget=h,this._selectionIndicator=x,this._infoBox=C,this._dataSourceCollection=m,this._destroyDataSourceCollection=_,this._dataSourceDisplay=y,this._clockViewModel=u,this._destroyClockViewModel=d,this._toolbar=w,this._homeButton=D,this._sceneModePicker=P,this._projectionPicker=N,this._baseLayerPicker=R,this._navigationHelpButton=F,this._animation=S,this._timeline=I,this._fullscreenButton=L,this._vrButton=z,this._geocoder=v,this._eventHelper=A,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=c(C)||c(x),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 Ue,this._trackedEntityChanged=new Ue,wt.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),A.add(m.dataSourceAdded,Li.prototype._onDataSourceAdded,this),A.add(m.dataSourceRemoved,Li.prototype._onDataSourceRemoved,this),A.add(p.postUpdate,Li.prototype.resize,this),A.add(p.postRender,Li.prototype._postRender,this);const q=m.length;for(let Z=0;Z<q;Z++)this._dataSourceAdded(m,m.get(Z));this._dataSourceAdded(void 0,y.defaultDataSource),A.add(m.dataSourceAdded,Li.prototype._dataSourceAdded,this),A.add(m.dataSourceRemoved,Li.prototype._dataSourceRemoved,this),h.screenSpaceEventHandler.setInputAction(function $(Z){i.selectedEntity=Fie(i,Z)},Ai.LEFT_CLICK),h.screenSpaceEventHandler.setInputAction(function V(Z){const ie=Fie(i,Z);c(ie)?te.getValueOrUndefined(ie.position,i.clock.currentTime)?i.trackedEntity=ie:i.zoomTo(ie):c(i.trackedEntity)&&(i.trackedEntity=void 0)},Ai.LEFT_DOUBLE_CLICK)}function Uie(e,t,n,i){if(!c(t))throw new E("zoomTarget is required.");Qk(e);const 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 xc){let s;return s=c(r.imageryProvider)?Promise.resolve(r.getImageryRectangle()):new Promise(a=>{const l=r.readyEvent.addEventListener(()=>{l(),a(r.getImageryRectangle())})}),void s.then(function(a){return Tne(a,e.scene)}).then(function(a){e._zoomPromise===o&&(e._zoomTarget=a)})}if(r instanceof tg||r instanceof One||r instanceof oie)return void(e._zoomTarget=r);if(r.isLoading&&c(r.loadingEvent)){const s=r.loadingEvent.addEventListener(function(){s(),e._zoomPromise===o&&(e._zoomTarget=r.entities.values.slice(0))});return}if(Array.isArray(r))return void(e._zoomTarget=r.slice(0));r=g(r.values,r),c(r.entities)&&(r=r.entities.values),e._zoomTarget=Array.isArray(r)?r.slice(0):[r]}}),e.scene.requestRender(),o}function _E(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function Qk(e){c(e._zoomPromise)&&(_E(e),e._completeZoom(!1))}Object.defineProperties(Li.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,Qk(this);const t=this.scene,n=t.mode;c(e)&&c(e.position)?this._needTrackedEntityUpdate=!0:(this._needTrackedEntityUpdate=!1,(n===ce.COLUMBUS_VIEW||n===ce.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===ce.COLUMBUS_VIEW||n===ce.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(k.IDENTITY)),this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;const t=c(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;c(e)?c(t)&&t.animateAppear():c(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,Bie(this._timeline,this.clock,e))}}}),Li.prototype.extend=function(e,t){if(!c(e))throw new E("mixin is required.");e(this,t)},Li.prototype.resize=function(){const e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=c(this._animation),r=c(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;const s=i-125,a=this._baseLayerPickerDropDown;c(a)&&(a.style.maxHeight=`${s}px`),c(this._geocoder)&&(this._geocoder.searchSuggestionsContainer.style.maxHeight=`${s}px`),c(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);const l=this._timeline;let u,d=0,h=0,m=0;if(o&&"hidden"!==window.getComputedStyle(this._animation.container).visibility){const _=this._lastWidth;u=this._animation.container,n>900?(d=169,_<=900&&(u.style.width="169px",u.style.height="112px",this._animation.resize())):n>=600?(d=136,(_<600||_>900)&&(u.style.width="136px",u.style.height="90px",this._animation.resize())):(d=106,(_>600||0===_)&&(u.style.width="106px",u.style.height="70px",this._animation.resize())),h=d+5}if(r&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){const _=this._fullscreenButton,p=this._vrButton,y=l.container,A=y.style;m=y.clientHeight+3,A.left=`${d}px`;let x=0;c(_)&&(x+=_.container.clientWidth),c(p)&&(x+=p.container.clientWidth),A.right=`${x}px`,l.resize()}this._bottomContainer.style.left=`${h}px`,this._bottomContainer.style.bottom=`${m}px`,this._lastWidth=n,this._lastHeight=i},Li.prototype.forceResize=function(){this._lastWidth=0,this.resize()},Li.prototype.render=function(){this._cesiumWidget.render()},Li.prototype.isDestroyed=function(){return!1},Li.prototype.destroy=function(){let e;this.screenSpaceEventHandler.removeInputAction(Ai.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Ai.LEFT_DOUBLE_CLICK);const 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(),c(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),c(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),c(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),c(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),c(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),c(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),c(this._timeline)&&(this._timeline.removeEventListener("settime",Mie,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),c(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),c(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),c(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),c(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()),Ye(this)},Li.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Li.prototype._onEntityCollectionChanged,this)},Li.prototype._dataSourceRemoved=function(e,t){const n=t.entities;n.collectionChanged.removeEventListener(Li.prototype._onEntityCollectionChanged,this),c(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),c(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)},Li.prototype._onTick=function(e){const t=e.currentTime,n=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=n);const i=this._entityView;c(i)&&this._dataSourceDisplay.getBoundingSphere(this._trackedEntity,!1,jm)===$t.DONE&&i.update(t,jm);let o,r=!1;const s=this.selectedEntity,a=c(s)&&this._enableInfoOrSelection;a&&s.isShowing&&s.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(s,!0,jm)!==$t.FAILED?o=jm.center:c(s.position)&&(o=s.position.getValue(t,o)),r=c(o));const l=c(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;c(l)&&(l.position=f.clone(o,l.position),l.showSelection=a&&r,l.update());const u=c(this._infoBox)?this._infoBox.viewModel:void 0;c(u)&&(u.showInfo=a,u.enableCamera=r,u.isCameraTracking=this.trackedEntity===this.selectedEntity,a?(u.titleText=g(s.name,s.id),u.description=te.getValueOrDefault(s.description,t,"")):(u.titleText="",u.description=""))},Li.prototype._onEntityCollectionChanged=function(e,t,n){const i=n.length;for(let o=0;o<i;o++){const r=n[o];this.trackedEntity===r&&(this.trackedEntity=void 0),this.selectedEntity===r&&(this.selectedEntity=void 0)}},Li.prototype._onInfoBoxCameraClicked=function(e){e.isCameraTracking&&this.trackedEntity===this.selectedEntity?this.trackedEntity=void 0:c(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)},Li.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},Li.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},Li.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},Li.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Bie(this.timeline,this.clock,e)},Li.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);const n=t.entities.id,i=this._eventHelper.add(t.changedEvent,Li.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i},Li.prototype._onDataSourceRemoved=function(e,t){const n=this.clockTrackedDataSource===t,i=t.entities.id;if(this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0,n){const o=e.length;this.clockTrackedDataSource=this._automaticallyTrackDataSourceClocks&&o>0?e.get(o-1):void 0}},Li.prototype.zoomTo=function(e,t){return Uie(this,e,{offset:t},!1)},Li.prototype.flyTo=function(e,t){return Uie(this,e,t,!0)},Li.prototype._postRender=function(){(function mot(e){const t=e._zoomTarget;if(!c(t)||e.scene.mode===ce.MORPHING)return;const n=e.scene,i=n.camera,o=g(e._zoomOptions,{});let r;function s(d){c(o.offset)||(o.offset=new Hx(0,-.5,d.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(d,o.offset),i.lookAtTransform(k.IDENTITY),e._completeZoom(!0)),_E(e)}if(t instanceof One){if(c(t.boundingSphere))return void s(t.boundingSphere);const d=t.frameChanged.addEventListener(function(h){s(h.boundingSphere),d()});return}if(t instanceof tg||t instanceof oie)return void s(t.boundingSphere);if(t instanceof Se)return 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)),void _E(e);const a=t,l=[];for(let d=0,h=a.length;d<h;d++){const m=e._dataSourceDisplay.getBoundingSphere(a[d],!1,jm);if(m===$t.PENDING)return;m!==$t.FAILED&&l.push(be.clone(jm))}if(0===l.length)return void Qk(e);e.trackedEntity=void 0;const u=be.fromBoundingSpheres(l);e._zoomIsFlight?(_E(e),i.flyToBoundingSphere(u,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:o.offset})):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(k.IDENTITY),_E(e),e._completeZoom(!0))})(this),function _ot(e){if(!e._needTrackedEntityUpdate)return;const t=e._trackedEntity,n=e.clock.currentTime,i=te.getValueOrUndefined(t.position,n);if(!c(i))return;const o=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,jm);if(r===$t.PENDING)return;const s=o.mode;(s===ce.COLUMBUS_VIEW||s===ce.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(s===ce.COLUMBUS_VIEW||s===ce.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);const a=r!==$t.FAILED?jm:void 0;e._entityView=new Snt(t,o,o.mapProjection.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}(this)};const got=Li;var We=st(3714);let O1=(()=>{class e{constructor(){this.baseLayerImageryGroup=new Map,this.standardLayerImageryGroup=new Map,this.overlayLayerImageryGroup=new Map,this.baseLayerDataSourceGroup=new Map,this.standardLayerDataSourceGroup=new Map,this.overlayLayerDataSourceGroup=new Map,this.dataSourceOpacity=new Map,this.terrainLayerGroup=new Map,this.tilesetLayerGroup=new Map,this.cesiumCurrentTime=se.now(),this.cesiumTimeInterval=new kc,this.viewerOptions={timeline:!1,animation:!1,sceneModePicker:!1,homeButton:!1,baseLayerPicker:!1,geocoder:!1,navigationHelpButton:!1,navigationInstructionsInitiallyVisible:!1,fullscreenButton:!1,scene3DOnly:!0,skyAtmosphere:!1,infoBox:!1,selectionIndicator:!1,baseLayer:!1},this.EPSG="EPSG:3857"}setControls(n){typeof n.ionAccessToken<"u"&&this.addIonAccessToken(n.ionAccessToken),typeof n.GoogleMapsApiKey<"u"&&this.addGoogleMapsApiKey(n.GoogleMapsApiKey),typeof n.timeline<"u"&&(this.viewerOptions.timeline=n.timeline),typeof n.animation<"u"&&(this.viewerOptions.animation=n.animation),typeof n.sceneModePicker<"u"&&(this.viewerOptions.sceneModePicker=n.sceneModePicker),typeof n.homeButton<"u"&&(this.viewerOptions.homeButton=n.homeButton),typeof n.baseLayerPicker<"u"&&(this.viewerOptions.baseLayerPicker=n.baseLayerPicker),typeof n.navigationHelpButton<"u"&&(this.viewerOptions.navigationHelpButton=n.navigationHelpButton),typeof n.navigationInstructionsInitiallyVisible<"u"&&(this.viewerOptions.navigationInstructionsInitiallyVisible=n.navigationInstructionsInitiallyVisible),typeof n.fullscreenButton<"u"&&(this.viewerOptions.fullscreenButton=n.fullscreenButton),typeof n.scene3DOnly<"u"&&(this.viewerOptions.scene3DOnly=n.scene3DOnly),typeof n.infoBox<"u"&&(this.viewerOptions.infoBox=n.infoBox),typeof n.selectionIndicator<"u"&&(this.viewerOptions.selectionIndicator=n.selectionIndicator)}createMap(n){this.viewer=new got(n,this.viewerOptions),this.viewer.imageryLayers.removeAll();const i=this.viewer.scene;i.fog.enabled=!1,i.globe.showGroundAtmosphere=!1,this.viewer.clock.currentTime=this.cesiumCurrentTime,this.viewer.infoBox.container.getElementsByTagName("iframe")[0].remove();const o=document.createElement("div");return o.className="cesium-infoBox-content",o.id="cesiumInfoBoxContent",this.viewer.infoBox.container.children[0].append(o),this.viewer.scene.primitives.destroyPrimitives=!1,{viewer:this.viewer}}setZoom(n,i){const r=55908226/Math.pow(2,n-=this.viewer.canvas.width/1e3),s=this.viewer.camera.positionCartographic;this.viewer.camera.setView({destination:f.fromRadians(s.longitude,s.latitude,r)})}getZoom(){let n;return this.viewer?(n=Math.round(Math.log10(55908226/this.viewer.camera.positionCartographic.height)/.3),n<0&&(n=0)):n=2,n+=this.viewer.canvas.width/1e3,n}setCenter(n){this.viewer.camera.setView({destination:f.fromDegrees(n.lon,n.lat,this.viewer.camera.positionCartographic.height)})}getCenter(){const n=this.viewer.camera.positionCartographic;return{lat:n.latitude*(180/Math.PI),lon:n.longitude*(180/Math.PI)}}setExtent(n,i,o){const r=Ce.fromDegrees(n[0],n[1],n[2],n[3]);this.viewer.camera.setView({destination:r})}getCurrentExtent(n){let i;const o=this.viewer.camera.computeViewRectangle();return o&&(i=[o.west*(180/Math.PI),o.south*(180/Math.PI),o.east*(180/Math.PI),o.north*(180/Math.PI)]),i}setViewAngle(n,i){const o=Object.assign({destination:this.viewer.camera.position,orientation:{heading:this.viewer.camera.heading,pitch:O.toRadians(n-90),roll:this.viewer.camera.roll}},i||{});this.viewer.camera.flyTo(o)}setNadirViewAngle(n){0!==this.getViewAngle()?n?this.setViewAngle(0,n):this.setViewAngle(0):n.complete&&"function"==typeof n.complete&&n.complete()}getViewAngle(){return O.toDegrees(this.viewer.camera.pitch)+90}setRotation(n,i){const o=Object.assign({destination:this.viewer.camera.position,orientation:{heading:O.toRadians(360-n),pitch:this.viewer.camera.pitch,roll:this.viewer.camera.roll}},i||{});this.viewer.camera.flyTo(o)}getRotation(){return 360-O.toDegrees(this.viewer.camera.heading)}getAll2DLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?o=this.baseLayerImageryGroup.size+this.baseLayerDataSourceGroup.size:"layers"===i?o=this.standardLayerImageryGroup.size+this.standardLayerDataSourceGroup.size:"overlays"===i&&(o=this.overlayLayerImageryGroup.size+this.overlayLayerDataSourceGroup.size),o}get2DImageryLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?o=this.baseLayerImageryGroup.size:"layers"===i?o=this.standardLayerImageryGroup.size:"overlays"===i&&(o=this.overlayLayerImageryGroup.size),o}getDataSourceLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?o=this.baseLayerDataSourceGroup.size:"layers"===i?o=this.standardLayerDataSourceGroup.size:"overlays"===i&&(o=this.overlayLayerDataSourceGroup.size),o}getVisible2DLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?(this.baseLayerImageryGroup.forEach(r=>{r.show&&o++}),this.baseLayerDataSourceGroup.forEach(r=>{r.show&&o++})):"layers"===i?(this.standardLayerImageryGroup.forEach(r=>{r.show&&o++}),this.standardLayerDataSourceGroup.forEach(r=>{r.show&&o++})):"overlays"===i&&(this.overlayLayerImageryGroup.forEach(r=>{r.show&&o++}),this.overlayLayerDataSourceGroup.forEach(r=>{r.show&&o++})),o}get3DLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?o=this.terrainLayerGroup.size:"layers"===i&&(o=this.tilesetLayerGroup.size),o}getVisible3DLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?this.terrainLayerGroup.forEach(r=>{r&&o++}):"layers"===i&&this.tilesetLayerGroup.forEach(r=>{r.show&&o++}),o}set2DUkisLayers(n,i){const o=i.toLowerCase(),r=[];this.remove2DLayers(o),n.forEach(s=>{const a=s.type;if("geojson"===a||"kml"===a){const l=this.create_dataSource_layer(s);typeof l<"u"&&("baselayers"===o?this.baseLayerDataSourceGroup.set(s.id,l):"layers"===o?this.standardLayerDataSourceGroup.set(s.id,l):"overlays"===o&&this.overlayLayerDataSourceGroup.set(s.id,l),this.viewer.dataSources.add(l))}else{const l=this.create_2D_layer(s);if(typeof l<"u"){r.push(l);let u=n.indexOf(s);u>this.viewer.imageryLayers.length&&(u=this.viewer.imageryLayers.length),"baselayers"===o?this.baseLayerImageryGroup.set(s.id,l):"layers"===o?(u+=this.get2DImageryLayersSize("baselayers"),this.standardLayerImageryGroup.set(s.id,l)):"overlays"===o&&(u+=this.get2DImageryLayersSize("baselayers")+this.get2DImageryLayersSize("layers"),this.overlayLayerImageryGroup.set(s.id,l)),this.viewer.imageryLayers.add(l,u)}}})}set3DUkisLayers(n,i){const o=i.toLowerCase();this.remove3DLayers(o),n.forEach(r=>{this.create_3D_layer(r)})}create_2D_layer(n){let i;switch(n.type){case xt.Aq:i=this.create_xyz_layer(n);break;case xt.MR:i=this.create_wms_layer(n);break;case xt.$6:i=this.create_wmts_layer(n);break;case xt.CY:if(n instanceof xt.YY){i=this.create_xyz_layer(n);break}if(n instanceof xt.DJ){i=this.create_tms_layer(n);break}console.log("Not supportet layer type: "+n.type+" layer: "+n.name);break;default:console.log("Not supportet layer type: "+n.type+" layer: "+n.name)}return i}create_3D_layer(n){n.custom_layer instanceof xw||n.custom_layer instanceof Ff?this.setTerrain(n):n.custom_layer instanceof tg||n.custom_layer instanceof _v?this.create_3Dtileset_layer(n):console.log("Not supportet layer type: "+n.name)}create_xyz_layer(n){let i=20,o=!1;return n.maxZoom&&(i=n.maxZoom),n.popup&&(o=!0),new xc(new Jp({url:n.url,subdomains:n.subdomains,credit:n.attribution,maximumLevel:i,enablePickFeatures:o}),{show:n.visible,alpha:n.opacity})}create_wms_layer(n){let i="image/png",o=20;n.maxZoom&&(o=n.maxZoom),n.params.FORMAT&&(i=n.params.FORMAT);let r={};return n.bbox&&(r.rectangle=Ce.fromDegrees(n.bbox[0],n.bbox[1],n.bbox[2],n.bbox[3])),r={url:n.url,credit:n.attribution,layers:n.params.LAYERS,parameters:{transparent:n.params.TRANSPARENT,format:i,tiled:n.params.TILED},maximumLevel:o,srs:this.EPSG,tilingScheme:new Td},n.params.TIME&&(r.clock=this.viewer.clock,r.times=this.cesiumTimeInterval),r.enablePickFeatures=!!n.popup,new xc(new Zj(r),{show:n.visible,alpha:n.opacity})}create_wmts_layer(n){const o=n.params.matrixSetOptions;let r={};return r=o.matrixIds?{url:n.url,credit:n.attribution,layer:n.params.layer,style:n.params.style,format:n.params.format,tileMatrixSetID:o.matrixSet,tileMatrixLabels:o.matrixIds,maximumLevel:o.matrixIds.length-1}:{url:n.url,credit:n.attribution,layer:n.params.layer,style:n.params.style,format:n.params.format,tileMatrixSetID:this.EPSG,tileMatrixLabels:Array(17).fill(null).map((a,l)=>this.EPSG+":"+l),maximumLevel:16},n.bbox&&(r.rectangle=Ce.fromDegrees(n.bbox[0],n.bbox[1],n.bbox[2],n.bbox[3])),new xc(new Kj(r),{show:n.visible,alpha:n.opacity})}create_tms_layer(n){const i={url:n.url,fileExtension:"png",maximumLevel:n.maxZoom,minimumLevel:n.minZoom};n.attribution&&(i.credit=new qn(n.attribution));const o=new Ev(i);return new xc(o,{show:n.visible,alpha:n.opacity})}create_dataSource_layer(n){let i;return"geojson"===n.type?i=this.create_geojson_layer(n):"kml"===n.type&&(i=this.create_kml_layer(n)),i}create_geojson_layer(n){const i=new Qq;let o=X.fromCssColorString("#FFFFFF99"),r=X.fromCssColorString("#3399CC"),s=1,a=!1;if(n.options&&n.options.style){const u=n.options.style(n.data)[0];u&&(o=X.fromCssColorString(u.fill_.color_)||o,r=X.fromCssColorString(u.stroke_.color_)||r,s=u.stroke_.width_||s),n.options.clampToGround&&(a=n.options.clampToGround)}const l={fill:o.withAlpha(n.opacity*o.alpha),stroke:r.withAlpha(n.opacity*r.alpha),strokeWidth:s,clampToGround:a};return n.attribution&&(l.credit=new qn(n.attribution)),i.load(n.data,l),i.show=n.visible,i.name=n.name,this.dataSourceOpacity.set(n.id,n.opacity),i}create_kml_layer(n){const i=new Pke,o={};return n.attribution&&(o.credit=new qn(n.attribution)),i.load(n.data,o),i.show=n.visible,i.name=n.id,i}getLayerById(n,i){const o=i.toLowerCase();let r;return"baselayers"===o?this.baseLayerImageryGroup.has(n)?r=this.baseLayerImageryGroup.get(n):this.baseLayerDataSourceGroup.has(n)&&(r=this.baseLayerDataSourceGroup.get(n)):"layers"===o?this.standardLayerImageryGroup.has(n)?r=this.standardLayerImageryGroup.get(n):this.standardLayerDataSourceGroup.has(n)&&(r=this.standardLayerDataSourceGroup.get(n)):"overlays"===o&&(this.overlayLayerImageryGroup.has(n)?r=this.overlayLayerImageryGroup.get(n):this.overlayLayerDataSourceGroup.has(n)&&(r=this.overlayLayerDataSourceGroup.get(n))),r}removeAll2DLayers(){let n=Array.from(this.baseLayerImageryGroup.keys());this.remove2DLayer(n,"baselayers"),n=Array.from(this.standardLayerImageryGroup.keys()),this.remove2DLayer(n,"layers"),n=Array.from(this.overlayLayerImageryGroup.keys()),this.remove2DLayer(n,"overlays"),n=Array.from(this.baseLayerDataSourceGroup.keys()),this.remove2DLayer(n,"baselayers"),n=Array.from(this.standardLayerDataSourceGroup.keys()),this.remove2DLayer(n,"layers"),n=Array.from(this.overlayLayerDataSourceGroup.keys()),this.remove2DLayer(n,"overlays")}remove2DLayers(n){const i=n.toLowerCase();if("baselayers"===i){let o=Array.from(this.baseLayerImageryGroup.keys());this.remove2DLayer(o,"baselayers"),o=Array.from(this.baseLayerDataSourceGroup.keys()),this.remove2DLayer(o,"baselayers")}else if("layers"===i){let o=Array.from(this.standardLayerImageryGroup.keys());this.remove2DLayer(o,"layers"),o=Array.from(this.standardLayerDataSourceGroup.keys()),this.remove2DLayer(o,"layers")}else if("overlays"===i){let o=Array.from(this.overlayLayerImageryGroup.keys());this.remove2DLayer(o,"overlays"),o=Array.from(this.overlayLayerDataSourceGroup.keys()),this.remove2DLayer(o,"overlays")}}remove2DLayer(n,i){const o=i.toLowerCase();"baselayers"===o?n.forEach(r=>{this.baseLayerImageryGroup.has(r)?(this.viewer.imageryLayers.remove(this.baseLayerImageryGroup.get(r)),this.baseLayerImageryGroup.delete(r)):this.baseLayerDataSourceGroup.has(r)&&(this.viewer.dataSources.remove(this.baseLayerDataSourceGroup.get(r)),this.baseLayerDataSourceGroup.delete(r),this.dataSourceOpacity.has(r)&&this.dataSourceOpacity.delete(r))}):"layers"===o?n.forEach(r=>{this.standardLayerImageryGroup.has(r)?(this.viewer.imageryLayers.remove(this.standardLayerImageryGroup.get(r)),this.standardLayerImageryGroup.delete(r)):this.standardLayerDataSourceGroup.has(r)&&(this.viewer.dataSources.remove(this.standardLayerDataSourceGroup.get(r)),this.standardLayerDataSourceGroup.delete(r),this.dataSourceOpacity.has(r)&&this.dataSourceOpacity.delete(r))}):"overlays"===o&&n.forEach(r=>{this.overlayLayerImageryGroup.has(r)?(this.viewer.imageryLayers.remove(this.overlayLayerImageryGroup.get(r)),this.overlayLayerImageryGroup.delete(r)):this.overlayLayerDataSourceGroup.has(r)&&(this.viewer.dataSources.remove(this.overlayLayerDataSourceGroup.get(r)),this.overlayLayerDataSourceGroup.delete(r),this.dataSourceOpacity.has(r)&&this.dataSourceOpacity.delete(r))})}removeAll3DLayers(){let n=Array.from(this.terrainLayerGroup.keys());this.remove3DLayer(n,"baselayers"),n=Array.from(this.tilesetLayerGroup.keys()),this.remove3DLayer(n,"layers")}remove3DLayers(n){const i=n.toLowerCase();if("baselayers"===i){const o=Array.from(this.terrainLayerGroup.keys());this.remove3DLayer(o,"baselayers")}else if("layers"===i){const o=Array.from(this.tilesetLayerGroup.keys());this.remove3DLayer(o,"layers"),this.tilesetLayerGroup.clear()}}remove3DLayer(n,i){const o=i.toLowerCase();"baselayers"===o?n.forEach(r=>{this.terrainLayerGroup.has(r)&&(this.removeTerrain(),this.terrainLayerGroup.delete(r))}):"layers"===o&&n.forEach(r=>{this.tilesetLayerGroup.has(r)&&(this.viewer.scene.primitives.remove(this.tilesetLayerGroup.get(r)),this.tilesetLayerGroup.delete(r))})}update2DLayerOpacity(n,i){const o=i.toLowerCase();if("baselayers"===o){for(const r of n)if(this.baseLayerImageryGroup.has(r.id)){const s=this.baseLayerImageryGroup.get(r.id);s&&s.alpha!==r.opacity&&(s.alpha=r.opacity)}else if(this.baseLayerDataSourceGroup.has(r.id)&&this.dataSourceOpacity.get(r.id)!=r.opacity){const s=this.baseLayerDataSourceGroup.get(r.id);this.viewer.dataSources.remove(s);const a=this.create_dataSource_layer(r);this.viewer.dataSources.add(a),this.baseLayerDataSourceGroup.set(r.id,a),this.dataSourceOpacity.set(r.id,r.opacity)}}else if("layers"===o){for(const r of n)if(this.standardLayerImageryGroup.has(r.id)){const s=this.standardLayerImageryGroup.get(r.id);s&&s.alpha!==r.opacity&&(s.alpha=r.opacity)}else if(this.standardLayerDataSourceGroup.has(r.id)&&this.dataSourceOpacity.get(r.id)!=r.opacity){const s=this.standardLayerDataSourceGroup.get(r.id);this.viewer.dataSources.remove(s);const a=this.create_dataSource_layer(r);this.viewer.dataSources.add(a),this.standardLayerDataSourceGroup.set(r.id,a),this.dataSourceOpacity.set(r.id,r.opacity)}}else if("overlays"===o)for(const r of n)if(this.overlayLayerImageryGroup.has(r.id)){const s=this.overlayLayerImageryGroup.get(r.id);s&&s.alpha!==r.opacity&&(s.alpha=r.opacity)}else if(this.overlayLayerDataSourceGroup.has(r.id)&&this.dataSourceOpacity.get(r.id)!=r.opacity){const s=this.overlayLayerDataSourceGroup.get(r.id);this.viewer.dataSources.remove(s);const a=this.create_dataSource_layer(r);this.viewer.dataSources.add(a),this.overlayLayerDataSourceGroup.set(r.id,a),this.dataSourceOpacity.set(r.id,r.opacity)}}update2DLayerVisibility(n,i){const o=i.toLowerCase();for(const r of n)if("geojson"===r.type||"kml"===r.type){if("baselayers"===o){const s=this.baseLayerDataSourceGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}else if("layers"===o){const s=this.standardLayerDataSourceGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}else if("overlays"===o){const s=this.overlayLayerDataSourceGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}}else if("baselayers"===o){if(this.baseLayerImageryGroup.has(r.id)){const s=this.baseLayerImageryGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}}else if("layers"===o){if(this.standardLayerImageryGroup.has(r.id)){const s=this.standardLayerImageryGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}}else if("overlays"===o&&this.overlayLayerImageryGroup.has(r.id)){const s=this.overlayLayerImageryGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}}update2DLayerZIndex(n,i){const o=i.toLowerCase(),r=this.viewer.imageryLayers;if("baselayers"===o){for(const s of n)if(this.baseLayerImageryGroup.has(s.id)){const a=this.baseLayerImageryGroup.get(s.id);if(a){const l=r.indexOf(a),u=n.indexOf(s);if(l!==u){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)r.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)r.lower(a)}}}}else if("layers"===o){for(const s of n)if(this.standardLayerImageryGroup.has(s.id)){const a=this.standardLayerImageryGroup.get(s.id);if(a){const l=r.indexOf(a),u=n.indexOf(s)+this.get2DImageryLayersSize("baselayers");if(l!==u){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)r.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)r.lower(a)}}}}else if("overlays"===o)for(const s of n)if(this.overlayLayerImageryGroup.has(s.id)){const a=this.overlayLayerImageryGroup.get(s.id);if(a){const l=r.indexOf(a),u=n.indexOf(s)+this.get2DImageryLayersSize("baselayers")+this.get2DImageryLayersSize("layers");if(l!==u){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)r.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)r.lower(a)}}}}updateDataSourceZIndex(n,i){const o=this.viewer.dataSources;if(o.length>1){const r=i.toLowerCase();if("baselayers"===r){for(const s of n)if(this.baseLayerDataSourceGroup.has(s.id)){const a=this.baseLayerDataSourceGroup.get(s.id);if(a){const l=o.indexOf(a),u=n.indexOf(s);if(l!==u&&l>=0){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)o.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)o.lower(a)}}}}else if("layers"===r){for(const s of n)if(this.standardLayerDataSourceGroup.has(s.id)){const a=this.standardLayerDataSourceGroup.get(s.id);if(a){const l=o.indexOf(a),u=n.indexOf(s)+this.getDataSourceLayersSize("baselayers");if(l!==u&&l>=0){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)o.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)o.lower(a)}}}}else if("overlays"===r)for(const s of n)if(this.overlayLayerDataSourceGroup.has(s.id)){const a=this.overlayLayerDataSourceGroup.get(s.id);if(a){const l=o.indexOf(a),u=n.indexOf(s)+this.getDataSourceLayersSize("baselayers")+this.getDataSourceLayersSize("layers");if(l!==u&&l>=0){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)o.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)o.lower(a)}}}}}setTerrain(n){n.visible&&(this.viewer.terrainProvider=n.custom_layer),this.terrainLayerGroup.set(n.id,n.visible)}setDefaultTerrain(){this.viewer.terrainProvider=new Ff}removeTerrain(){this.viewer.terrainProvider=new Ff({})}create_3Dtileset_layer(n){try{const i=this.viewer.scene.primitives.add(n.custom_layer);null==i.style&&(i.style=new OX({show:"true",color:"color('lightgrey',"+n.opacity+")"})),i.credit=new qn(n.attribution),this.tilesetLayerGroup.set(n.id,i)}catch(i){console.log(`There was an error creating the 3D Data Provider: ${i}`)}}dataCallback(n,i){let o;return o=se.toIso8601(0===i?n.stop:n.start),{Time:o}}update3DLayerVisibility(n,i){const o=i.toLowerCase();for(const r of n)if("baselayers"===o){const s=r;(s.custom_layer instanceof xw||s.custom_layer instanceof Ff)&&r.visible&&(this.removeTerrain(),this.setTerrain(s))}else if("layers"===o&&this.tilesetLayerGroup.has(r.id)){const s=this.tilesetLayerGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}}update3DLayerOpacity(n,i){const o=i.toLowerCase();for(const r of n)if("baselayers"!==o&&"layers"===o&&r.custom_layer instanceof tg&&this.tilesetLayerGroup.has(r.id)){const a=this.tilesetLayerGroup.get(r.id);a&&(a.style=new OX({show:"true",color:"color('lightgrey',"+r.opacity+")"}))}}initTime(n){this.cesiumCurrentTime=se.fromIso8601(n)}updateTime(n){const i=se.fromIso8601(n);se.equals(i,this.cesiumCurrentTime)||(this.cesiumCurrentTime=i,this.viewer.clock.currentTime=i)}setTimeInterval(n){this.cesiumTimeInterval=kc.fromIso8601DateArray({iso8601Dates:n,leadingInterval:!0,trailingInterval:!0,isStopIncluded:!1,dataCallback:this.dataCallback})}addIonAccessToken(n){l_.defaultAccessToken=n}addGoogleMapsApiKey(n){}destroyLayerGrpoups(){this.baseLayerImageryGroup.clear(),this.standardLayerImageryGroup.clear(),this.overlayLayerImageryGroup.clear(),this.baseLayerDataSourceGroup.clear(),this.standardLayerDataSourceGroup.clear(),this.overlayLayerDataSourceGroup.clear(),this.dataSourceOpacity.clear(),this.terrainLayerGroup.clear(),this.tilesetLayerGroup.clear()}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=We.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var bot=st(5992),Aot=st(6021);const Tot=["cesiumMapDiv"],xot=["cesiumCreditDiv"];let Cot=(()=>{class e{constructor(n){this.mapSvc=n,this.subs=[],this.mapCreated=new bot.x,this.initState=!0}ngOnInit(){this.twoDlayersSvc||console.error("provide a LayersService as Input to ukis-map-cesium"),this.mapStateSvc||console.error("provide a MapStateService as Input to ukis-map-cesium"),this.mapSvc.removeAll2DLayers(),this.startTime&&this.mapSvc.initTime(this.startTime)}ngAfterViewInit(){this.initMap(),this.subscribeToLayers();const n=this.mapStateSvc.getMapState().getValue();this.setMapState(n),this.mapSvc.setViewAngle(n.viewAngle),this.mapSvc.setRotation(n.rotation),this.subscribeToMapEvents(),this.subscribeToMapState()}ngOnDestroy(){const n=this.calcMapStateFromCamera("user");this.mapStateSvc.setMapState(n),this.subs.forEach(i=>i.unsubscribe()),this.viewer?.scene?.primitives&&(this.viewer.imageryLayers.removeAll(),this.viewer.dataSources.removeAll(),this.viewer.scene.primitives.removeAll(),this.viewer.scene.primitives.destroy()),this.mapSvc.destroyLayerGrpoups()}initMap(){this.timeInterval&&this.mapSvc.setTimeInterval(this.timeInterval),this.mapSvc.setControls(this.controls);const n=this.mapSvc.createMap(this.mapDivView.nativeElement);this.viewer=n.viewer,this.mapCreated.next(!0)}subscribeToLayers(){if(this.twoDlayersSvc){const n=this.twoDlayersSvc.getBaseLayers().subscribe(r=>this.addUpdateBaseLayers(r));this.subs.push(n);const i=this.twoDlayersSvc.getLayers().subscribe(r=>this.addUpdate2DLayers(r,"layers"));this.subs.push(i);const o=this.twoDlayersSvc.getOverlays().subscribe(r=>this.addUpdate2DLayers(r,"overlays"));this.subs.push(o)}if(this.threeDlayersSvc){const n=this.threeDlayersSvc.getBaseLayers().subscribe(o=>this.addUpdateTerrainLayers(o));this.subs.push(n);const i=this.threeDlayersSvc.getLayers().subscribe(o=>this.addUpdate3DLayers(o,"layers"));this.subs.push(i)}}subscribeToMapState(){if(this.mapStateSvc){const n=this.mapStateSvc.getMapState().pipe((0,Aot.T)(1)).subscribe(i=>this.setMapState(i));this.subs.push(n)}}setMapState(n){const i=this.mapStateSvc.getLastAction().getValue();"user"===n.options.notifier?"setExtent"===i?this.mapSvc.setExtent(n.extent,!0):"setState"===i?(this.mapSvc.setZoom(n.zoom),this.mapSvc.setCenter(n.center),this.mapSvc.setRotation(n.rotation),this.mapSvc.setViewAngle(n.viewAngle)):"setRotation"===i?this.mapSvc.setRotation(n.rotation):"setAngle"===i&&this.mapSvc.setViewAngle(n.viewAngle):"map"===n.options.notifier&&this.mapSvc.updateTime(n.time)}calcMapStateFromCamera(n){const i=this.mapStateSvc.getMapState().getValue().time,o=this.mapSvc.getZoom(),r=this.mapSvc.getCenter(),s=this.mapSvc.getCurrentExtent(),a=this.mapSvc.getViewAngle(),l=this.mapSvc.getRotation();return new un.U5(o,r,{notifier:n},s,i,a,l)}subscribeToMapEvents(){this.viewer.camera.changed.addEventListener(n=>{const i=this.calcMapStateFromCamera("map");this.mapStateSvc.setMapState(i)}),this.viewer.selectedEntityChanged.addEventListener(()=>{const n=this.viewer.selectedEntity,i=this.viewer.infoBox.container.getElementsByClassName("cesium-infoBox-title")[0];if(i.innerHTML="Layer Attributes",n&&(n.entityCollection?.owner instanceof Qq?(i.innerHTML=n.entityCollection.owner.name,n.name=n.entityCollection.owner.name):n.name="Layer Attributes",n.description)){const o=n.description.getValue(this.mapSvc.cesiumCurrentTime);this.viewer.infoBox.container.getElementsByClassName("cesium-infoBox-content")[0].innerHTML=o,n.name="Layer Attributes"}})}addUpdateBaseLayers(n){n.length>0&&(n.length!==this.mapSvc.getAll2DLayersSize("baselayers")?this.add2DBaseLayers(n):this.update2DBaseLayers(n))}add2DBaseLayers(n){if(n.length>0){const i=n.filter(o=>!0===o.visible);0===i.length?n[0].visible=!0:i.length>1&&(n.forEach(o=>o.visible=!1),n[0].visible=!0),this.mapSvc.set2DUkisLayers(n,"baselayers")}}update2DBaseLayers(n){this.mapSvc.update2DLayerVisibility(n,"baselayers")}addUpdateTerrainLayers(n){n.length>0&&this.mapSvc.update3DLayerVisibility(n,"baselayers")}addTerrainLayers(n){if(n.length>0){const i=n.filter(o=>!0===o.visible);0===i.length?n[0].visible=!0:i.length>1&&(n.forEach(o=>o.visible=!1),n[0].visible=!0),this.mapSvc.set3DUkisLayers(n,"baselayers")}}addUpdate2DLayers(n,i){n.length!==this.mapSvc.getAll2DLayersSize(i)?this.addLayers(n,i):this.updateLayers(n,i)}addLayers(n,i){this.mapSvc.set2DUkisLayers(n,i)}updateLayers(n,i){this.mapSvc.update2DLayerVisibility(n,i),this.mapSvc.update2DLayerOpacity(n,i),this.mapSvc.update2DLayerZIndex(n,i),this.mapSvc.updateDataSourceZIndex(n,i)}addUpdate3DLayers(n,i){n.length!==this.mapSvc.get3DLayersSize(i)?this.add3DLayers(n,i):this.update3DLayers(n,i)}add3DLayers(n,i){this.mapSvc.set3DUkisLayers(n,i)}update3DLayers(n,i){this.mapSvc.update3DLayerVisibility(n,i),this.mapSvc.update3DLayerOpacity(n,i)}static#e=this.\u0275fac=function(i){return new(i||e)(We.Y36(O1))};static#t=this.\u0275cmp=We.Xpm({type:e,selectors:[["ukis-map-cesium"]],viewQuery:function(i,o){if(1&i&&(We.Gf(Tot,5),We.Gf(xot,5)),2&i){let r;We.iGM(r=We.CRH())&&(o.mapDivView=r.first),We.iGM(r=We.CRH())&&(o.creditDivView=r.first)}},inputs:{twoDlayersSvc:"twoDlayersSvc",threeDlayersSvc:"threeDlayersSvc",mapStateSvc:["mapState","mapStateSvc"],controls:"controls",timeInterval:"timeInterval",startTime:"startTime"},decls:4,vars:0,consts:[[1,"map","cesiumMap"],["cesiumMapDiv",""],[1,"cesiumCredits"],["cesiumCreditDiv",""]],template:function(i,o){1&i&&We._UZ(0,"div",0,1)(2,"div",2,3)},styles:[":root{--ukis-crosshair-color: #ff0004;--ukis-popup-bg-color: rgb(238, 238, 238);--ukis-drop-shadow: drop-shadow(0 1px 4px rgba(0, 0, 0, .2))}.cesium-viewer .cesium-viewer-cesiumWidgetContainer{height:100%}.cesiumMap{width:100%;height:100%;position:relative}.cesium-viewer-bottom .cesium-credit-logoContainer{display:none!important}.cesium-credit-lightbox ul{padding-left:20px}.cesium-infoBox{top:0;left:0;margin:.5rem;background-color:var(--ukis-popup-bg-color);filter:var(--ukis-drop-shadow);border:none;border-radius:0;box-shadow:none;z-index:1000000}.cesium-infoBox .cesium-infoBox-title{background-color:var(--ukis-popup-bg-color);border-bottom-left-radius:0;color:var(--clr-global-font-color);height:30px;font-weight:600;padding-top:.5rem}.cesium-infoBox button.cesium-infoBox-camera{display:none}.cesium-infoBox button.cesium-infoBox-close{color:var(--clr-global-font-color)}.cesium-infoBox-content{padding:.75rem;color:var(--clr-global-font-color)}.cesium-infoBox-defaultTable{background-color:var(--ukis-popup-bg-color);color:var(--clr-global-font-color)}.cesium-infoBox-defaultTable tr td:first-child{font-weight:600}.cesium-selection-wrapper svg{fill:var(--ukis-popup-bg-color);stroke:#0072a3;stroke-width:1.1px}\n"],encapsulation:2})}return e})(),Eot=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=We.oAB({type:e});static#n=this.\u0275inj=We.cJS({providers:[O1],imports:[Zn.ez]})}return e})();var Jk=st(9631),zie=st(400),wot=st(9032),Sot=st(5784),vot=st(2334),Dot=st(3254),Iot=st(5900),Pot=st(2227);function Oot(e,t){if(1&e&&(We.ynx(0),We._UZ(1,"ukis-map-ol",15),We.BQk()),2&e){const n=We.oxw();We.xp6(1),We.Q6J("layersSvc",n.twoDlayerSvc)("mapState",n.mapStateSvc)}}function Lot(e,t){if(1&e&&(We.ynx(0),We._UZ(1,"ukis-map-cesium",16),We.BQk()),2&e){const n=We.oxw();We.xp6(1),We.Q6J("twoDlayersSvc",n.twoDlayerSvc)("threeDlayersSvc",n.threeDlayerSvc)("mapState",n.mapStateSvc)("controls",n.controls)}}function Rot(e,t){if(1&e&&(We.TgZ(0,"clr-vertical-nav-group",17),We._UZ(1,"clr-icon",18),We._uU(2," 3D Tilelayers "),We.TgZ(3,"clr-vertical-nav-group-children",7),We._UZ(4,"ukis-layer-control",19),We.qZA()()),2&e){const n=We.oxw();We.Q6J("clrVerticalNavGroupExpanded",!0),We.xp6(4),We.Q6J("layersSvc",n.threeDlayerSvc)("layersSort",!1)("mapStateSvc",n.mapStateSvc)}}function Not(e,t){if(1&e&&(We.TgZ(0,"clr-vertical-nav-group",5),We._UZ(1,"clr-icon",20),We._uU(2," 3D Terrain "),We.TgZ(3,"clr-vertical-nav-group-children",7),We._UZ(4,"ukis-base-layer-control",10),We.qZA()()),2&e){const n=We.oxw();We.Q6J("clrVerticalNavGroupExpanded",!0),We.xp6(4),We.Q6J("layersSvc",n.threeDlayerSvc)("mapStateSvc",n.mapStateSvc)}}function Mot(e,t){if(1&e){const n=We.EpF();We.TgZ(0,"a",21),We.NdJ("click",function(){We.CHM(n);const o=We.oxw();return We.KtG(o.changeMapDimension())}),We._UZ(1,"clr-icon",22),We._uU(2," 3D View "),We.qZA()}}function Fot(e,t){if(1&e){const n=We.EpF();We.TgZ(0,"a",21),We.NdJ("click",function(){We.CHM(n);const o=We.oxw();return We.KtG(o.changeMapDimension())}),We._UZ(1,"clr-icon",23),We._uU(2," 2D View "),We.qZA()}}let Bot=(()=>{class e{constructor(n,i,o,r,s){this.twoDlayerSvc=n,this.threeDlayerSvc=i,this.mapOlSvc=o,this.mapStateSvc=r,this.mapCesiumSvc=s,this.class="content-container",this.startState={zoom:3,center:{lat:40,lon:13},rotation:0,viewAngle:0},this.is2dMap=!1,this.controls={infoBox:!0,selectionIndicator:!0}}ngOnInit(){this.addBaselayers(),this.addLayers(),this.addOverlays(),this.addTilelayer(),this.addTerrainlayer(),this.mapStateSvc.setMapState(this.startState)}ngOnDestroy(){}addBaselayers(){[new Kt.gY({visible:!0}),new Kt.Kl({visible:!1}),new Kt.um({visible:!1})].map(i=>this.twoDlayerSvc.addLayer(i,"Baselayers"))}addLayers(){[new xt.RC({type:"wmts",url:"https://tiles.geoservice.dlr.de/service/wmts",name:"TDM90 DEM",id:"TDM90_DEM",params:{layer:"TDM90_DEM",style:"default",matrixSetOptions:{matrixSet:"EPSG:3857",tileMatrixPrefix:"EPSG:3857"},format:"image/png"},visible:!1,description:"TDM90_DEM maxZoom: 8",attribution:' | TDM90 Data \xa9: <a href="http://www.dlr.de" target="_blank">DLR</a> licensed for <a rel="license" target="_blank" href="https://geoservice.dlr.de/resources/licenses/tdm90/License_for_the_Utilization_of_90m_DEM_for_Scientific_Use.pdf">scientific use</a>',legendImg:"https://tiles.geoservice.dlr.de/service/wmts?layer=TDM90_DEM&style=default&tilematrixset=EPSG%3A3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=EPSG%3A3857%3A4&TileCol=8&TileRow=5",cssClass:"custom-layer"}),new xt.YY({type:"wms",url:"https://geoservice.dlr.de/eoc/land/wms",name:"GUF Mosaic",id:"GUF28_DLR_v1_Mosaic",params:{LAYERS:"GUF28_DLR_v1_Mosaic",STYLES:"guf_8bit",TRANSPARENT:!0},tileSize:512,visible:!1,description:"GUF28_DLR_v1_Mosaic",attribution:' | GUF\xae: <a href="https://www.dlr.de/eoc/en/desktopdefault.aspx/tabid-9628/16557_read-40454/">DLR License</a>',legendImg:""}),new xt.TI({type:"wms",id:"metopGome2Ozone",name:"MetOp GOME-2 L2C Daily O3 Combined",visible:!0,opacity:.8,description:"MetOp GOME-2 Total Column Ozone (O3) Composite Layer",legendImg:"https://geoservice.dlr.de/eoc/atmosphere/wms?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=METOP_GOME-2_L2C_P1D_COMB_O3",url:"https://geoservice.dlr.de/eoc/atmosphere/wms",params:{LAYERS:"METOP_GOME-2_L2C_P1D_COMB_O3",FORMAT:"image/vnd.jpeg-png",VERSION:"1.1.1",TRANSPARENT:!0},expanded:!1,popup:!0,time:(new Date).toISOString()}),new xt.TI({type:"wms",id:"gsp_yearly",name:"Global SnowPack Yearly",visible:!1,opacity:1,description:"This product shows the snow cover duration for a hydrological year. Its beginning differs from the calendar year, since some of the precipitation that falls in late autumn and winter falls as snow and only drains away when the snow melts in the following spring or summer.",legendImg:"https://geoservice.dlr.de/eoc/land/wms?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=GSP_SCD_P1Y",url:"https://geoservice.dlr.de/eoc/land/wms",params:{LAYERS:"GSP_SCD_P1Y",TRANSPARENT:!0},expanded:!1,popup:!0})].map(i=>this.twoDlayerSvc.addLayer(i,"Layers"))}addOverlays(){[new Kt.fc({visible:!0,displayName:"Litelables"}),new xt.YY({type:"wms",url:"https://geoservice.dlr.de/eoc/land/wms",name:"WSF Evolution",id:"WSF_Evolution",params:{LAYERS:"WSF_Evolution",STYLES:"wsfevolution",TRANSPARENT:!0},tileSize:512,visible:!1,description:"World Settlement Footprint Evolution",attribution:'DLR/EOC: <a href="https://www.dlr.de/eoc/</a>',legendImg:"https://geoservice.dlr.de/eoc/land/wms?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=WSF_Evolution"}),new xt.DJ({id:"kml_test",name:"KML Vector Layer",attribution:"\xa9 DLR KML",type:"kml",data:"assets/kml/TimeZones.kml",visible:!1}),new xt.DJ({id:"geojson_test",name:"GeoJSON Vector Layer (default)",attribution:"\xa9 DLR GeoJSON",type:"geojson",data:zie,visible:!1,popup:!0}),new xt.DJ({id:"geojson_test2",name:"GeoJSON Vector Layer (styled)",attribution:"\xa9 DLR GeoJSON",type:"geojson",data:zie,visible:!1,popup:!0,options:{style:i=>{let o=[],r=new wot.ZP({stroke:new Sot.Z({color:"#FF7400",width:1}),fill:new vot.Z({color:"#FF740099"})});return o.push(r),o},clampToGround:!1}})].map(i=>this.twoDlayerSvc.addLayer(i,"Overlays"))}addTilelayer(){var n=this;return(0,Pe.Z)(function*(){[new xt.AO({name:"Hamburg 3D",displayName:"Hamburg 3D (LoD2 Tileset)",id:"hamburg_3d",custom_layer:yield tg.fromUrl("https://daten-hamburg.de/gdi3d/datasource-data/LoD2/tileset.json",{show:!1}),visible:!1,description:"3D Model of Hamburg",type:"custom",opacity:1,attribution:"\xa9 Hamburg Masterportal"}),new xt.AO({name:"Frankfurt 3D",displayName:"Frankfurt 3D (Esri i3s)",id:"i3s_3d",custom_layer:yield _v.fromUrl("https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0",{show:!1}),visible:!1,description:"Esri Portal 3D Model",type:"custom",opacity:1,attribution:"\xa9 Esri"})].map(s=>n.threeDlayerSvc.addLayer(s,"Layers"))})()}addTerrainlayer(){var n=this;return(0,Pe.Z)(function*(){[new xt.AO({name:"Hamburg Terrain",displayName:"Hamburg Terrain",id:"hamburg_terrain",custom_layer:yield xw.fromUrl("https://daten-hamburg.de/gdi3d/datasource-data/Gelaende/",{credit:new qn("\xa9 MasterPortal Hamburg")}),visible:!1,attribution:"\xa9 MasterPortal Hamburg",description:"Gel\xe4ndemodell Hamburg",type:"custom"}),new xt.AO({name:"Ellipsoid",displayName:"Ellipsoid",id:"ellipsoid",custom_layer:new Ff({}),visible:!0,attribution:"",description:"",type:"custom"})].map(s=>n.threeDlayerSvc.addLayer(s,"Baselayers"))})()}changeMapDimension(){this.is2dMap?this.is2dMap=!1:this.mapCesiumSvc.setNadirViewAngle({complete:()=>{this.is2dMap=!0}})}setViewAngle(){this.mapStateSvc.setViewAngle(45)}resetViewAngle(){this.mapStateSvc.setViewAngle(0)}setRotation(){this.mapStateSvc.setRotation(10)}resetRotation(){this.mapStateSvc.setRotation(0)}static#e=this.\u0275fac=function(i){return new(i||e)(We.Y36("twoDlayerSvc"),We.Y36("threeDlayerSvc"),We.Y36(Jk.BR),We.Y36(un.I3),We.Y36(O1))};static#t=this.\u0275cmp=We.Xpm({type:e,selectors:[["app-route-example-cesium"]],hostVars:2,hostBindings:function(i,o){2&i&&We.Tol(o.class)},features:[We._Bn([un.I3,Jk.BR,O1,{provide:"twoDlayerSvc",useClass:xt.KD},{provide:"threeDlayerSvc",useClass:xt.KD}])],decls:35,vars:20,consts:[[1,"content-area","map-view"],[4,"ngIf"],[1,"right",3,"clrVerticalNavCollapsible","clr-nav-level"],["class","layers three-d-layer-control",3,"clrVerticalNavGroupExpanded",4,"ngIf"],["class","layers",3,"clrVerticalNavGroupExpanded",4,"ngIf"],[1,"layers",3,"clrVerticalNavGroupExpanded"],["shape","world","title","Overlays","clrVerticalNavIcon",""],[1,"padding","title-ellipsis"],[3,"layersSvc","mapStateSvc","layersSort","layerfilter"],["shape","layers","clrVerticalNavIcon","","title","layers"],[3,"layersSvc","mapStateSvc"],["shape","world","title","Baselayers","clrVerticalNavIcon",""],["shape","cog","title","Actions","clrVerticalNavIcon",""],[1,"btn","btn-primary",3,"click"],["clrVerticalNavLink","","class","iconButton",3,"click",4,"ngIf"],[3,"layersSvc","mapState"],[3,"twoDlayersSvc","threeDlayersSvc","mapState","controls"],[1,"layers","three-d-layer-control",3,"clrVerticalNavGroupExpanded"],["shape","block","clrVerticalNavIcon","","title","tilelayers"],[3,"layersSvc","layersSort","mapStateSvc"],["shape","world","title","terain","clrVerticalNavIcon",""],["clrVerticalNavLink","",1,"iconButton",3,"click"],["shape","block","title","3D View","clrVerticalNavIcon",""],["shape","map","title","2D View","clrVerticalNavIcon",""]],template:function(i,o){1&i&&(We.TgZ(0,"main",0),We.YNc(1,Oot,2,2,"ng-container",1),We.YNc(2,Lot,2,4,"ng-container",1),We.qZA(),We.TgZ(3,"clr-vertical-nav",2),We.YNc(4,Rot,5,4,"clr-vertical-nav-group",3),We.YNc(5,Not,5,3,"clr-vertical-nav-group",4),We.TgZ(6,"clr-vertical-nav-group",5),We._UZ(7,"clr-icon",6),We._uU(8," Overlays "),We.TgZ(9,"clr-vertical-nav-group-children",7),We._UZ(10,"ukis-layer-control",8),We.qZA()(),We.TgZ(11,"clr-vertical-nav-group",5),We._UZ(12,"clr-icon",9),We._uU(13," Layers "),We.TgZ(14,"clr-vertical-nav-group-children",7),We._UZ(15,"ukis-layer-control",10),We.qZA()(),We.TgZ(16,"clr-vertical-nav-group",5),We._UZ(17,"clr-icon",11),We._uU(18," Baselayers "),We.TgZ(19,"clr-vertical-nav-group-children",7),We._UZ(20,"ukis-base-layer-control",10),We.qZA()(),We.TgZ(21,"clr-vertical-nav-group",5),We._UZ(22,"clr-icon",12),We._uU(23," Actions "),We.TgZ(24,"clr-vertical-nav-group-children",7)(25,"button",13),We.NdJ("click",function(){return o.setViewAngle()}),We._uU(26,"set ViewAngle"),We.qZA(),We.TgZ(27,"button",13),We.NdJ("click",function(){return o.resetViewAngle()}),We._uU(28,"reset ViewAngle"),We.qZA(),We.TgZ(29,"button",13),We.NdJ("click",function(){return o.setRotation()}),We._uU(30,"set Rotation"),We.qZA(),We.TgZ(31,"button",13),We.NdJ("click",function(){return o.resetRotation()}),We._uU(32,"reset Rotation"),We.qZA()()(),We.YNc(33,Mot,3,0,"a",14),We.YNc(34,Fot,3,0,"a",14),We.qZA()),2&i&&(We.xp6(1),We.Q6J("ngIf",o.is2dMap),We.xp6(1),We.Q6J("ngIf",!o.is2dMap),We.xp6(1),We.Q6J("clrVerticalNavCollapsible",!0)("clr-nav-level",2),We.xp6(1),We.Q6J("ngIf",!o.is2dMap),We.xp6(1),We.Q6J("ngIf",!o.is2dMap),We.xp6(1),We.Q6J("clrVerticalNavGroupExpanded",!0),We.xp6(4),We.Q6J("layersSvc",o.twoDlayerSvc)("mapStateSvc",o.mapStateSvc)("layersSort",!1)("layerfilter","Overlays"),We.xp6(1),We.Q6J("clrVerticalNavGroupExpanded",!0),We.xp6(4),We.Q6J("layersSvc",o.twoDlayerSvc)("mapStateSvc",o.mapStateSvc),We.xp6(1),We.Q6J("clrVerticalNavGroupExpanded",!0),We.xp6(4),We.Q6J("layersSvc",o.twoDlayerSvc)("mapStateSvc",o.mapStateSvc),We.xp6(1),We.Q6J("clrVerticalNavGroupExpanded",!0),We.xp6(12),We.Q6J("ngIf",o.is2dMap),We.xp6(1),We.Q6J("ngIf",!o.is2dMap))},dependencies:[Zn.O5,pn.qvL,pn.saT,pn.fzC,pn.zYX,pn.A0B,pn.d6G,pn.ogR,Cot,Dot.E,Iot.l,Pot.j],styles:['.cesium-svgPath-svg{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.cesium-button{display:inline-block;position:relative;background:#303336;border:1px solid #444;color:#edffff;fill:#edffff;border-radius:4px;padding:5px 12px;margin:2px 3px;cursor:pointer;overflow:hidden;-webkit-user-select:none;user-select:none}.cesium-button:focus{color:#fff;fill:#fff;border-color:#ea4;outline:none}.cesium-button:hover{color:#fff;fill:#fff;background:#48b;border-color:#aef;box-shadow:0 0 8px #fff}.cesium-button:active{color:#000;fill:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-button:disabled,.cesium-button-disabled,.cesium-button-disabled:focus,.cesium-button-disabled:hover,.cesium-button-disabled:active{background:#303336;border-color:#444;color:#646464;fill:#646464;box-shadow:none;cursor:default}.cesium-button option{background-color:#000;color:#eee}.cesium-button option:disabled{color:#777}.cesium-button input,.cesium-button label{cursor:pointer}.cesium-button input{vertical-align:sub}.cesium-toolbar-button{box-sizing:border-box;width:32px;height:32px;border-radius:14%;padding:0;vertical-align:middle;z-index:0}.cesium-performanceDisplay-defaultContainer{position:absolute;top:50px;right:10px;text-align:right}.cesium-performanceDisplay{background-color:#282828b3;padding:7px;border-radius:5px;border:1px solid #444;font:700 12px sans-serif}.cesium-performanceDisplay-fps{color:#e52}.cesium-performanceDisplay-throttled{color:#a42}.cesium-performanceDisplay-ms{color:#de3}.cesium-animation-theme{visibility:hidden;display:block;position:absolute;z-index:-100}.cesium-animation-themeNormal{color:#222}.cesium-animation-themeHover{color:#4488b0}.cesium-animation-themeSelect{color:#242}.cesium-animation-themeDisabled{color:#333}.cesium-animation-themeKnob{color:#222}.cesium-animation-themePointer{color:#2e2}.cesium-animation-themeSwoosh{color:#8ac}.cesium-animation-themeSwooshHover{color:#aef}.cesium-animation-svgText{fill:#edffff;font-family:Sans-Serif;font-size:15px;text-anchor:middle}.cesium-animation-blank{fill:#000;fill-opacity:.01;stroke:none}.cesium-animation-rectButton{cursor:pointer;-webkit-user-select:none;user-select:none}.cesium-animation-rectButton .cesium-animation-buttonGlow{fill:#fff;stroke:none;display:none}.cesium-animation-rectButton:hover .cesium-animation-buttonGlow{display:block}.cesium-animation-rectButton .cesium-animation-buttonPath{fill:#edffff}.cesium-animation-rectButton .cesium-animation-buttonMain{stroke:#444;stroke-width:1.2}.cesium-animation-rectButton:hover .cesium-animation-buttonMain{stroke:#aef}.cesium-animation-rectButton:active .cesium-animation-buttonMain{fill:#abd6ff}.cesium-animation-buttonDisabled{-webkit-user-select:none;user-select:none}.cesium-animation-buttonDisabled .cesium-animation-buttonMain{stroke:#555}.cesium-animation-buttonDisabled .cesium-animation-buttonPath{fill:#818181}.cesium-animation-buttonDisabled .cesium-animation-buttonGlow{display:none}.cesium-animation-buttonToggled .cesium-animation-buttonGlow{display:block;fill:#2e2}.cesium-animation-buttonToggled .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-buttonToggled:hover .cesium-animation-buttonGlow{fill:#fff}.cesium-animation-buttonToggled:hover .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-shuttleRingG,.cesium-animation-shuttleRingPointer,.cesium-animation-shuttleRingPausePointer{cursor:pointer}.cesium-animation-shuttleRingBack{fill:#181818;fill-opacity:.8;stroke:#333;stroke-width:1.2}.cesium-animation-shuttleRingSwoosh line{stroke:#8ac;stroke-width:3;stroke-opacity:.2;stroke-linecap:round}.cesium-animation-knobOuter{cursor:pointer;stroke:#444;stroke-width:1.2}.cesium-animation-knobInner{cursor:pointer}.cesium-baseLayerPicker-selected{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.cesium-baseLayerPicker-dropDown{display:block;position:absolute;box-sizing:content-box;top:auto;right:0;width:320px;max-height:500px;margin-top:5px;background-color:#262626bf;border:1px solid #444;padding:6px;overflow:auto;border-radius:10px;-webkit-user-select:none;user-select:none;transform:translateY(-20%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-baseLayerPicker-dropDown-visible{transform:translate(0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-baseLayerPicker-sectionTitle{display:block;font-family:sans-serif;font-size:16pt;text-align:left;color:#edffff;margin-bottom:4px}.cesium-baseLayerPicker-choices{margin-bottom:5px}.cesium-baseLayerPicker-categoryTitle{color:#edffff;font-size:11pt}.cesium-baseLayerPicker-choices{display:block;border:1px solid #888;border-radius:5px;padding:5px 0}.cesium-baseLayerPicker-item{display:inline-block;vertical-align:top;margin:2px 5px;width:64px;text-align:center;cursor:pointer}.cesium-baseLayerPicker-itemLabel{display:block;font-family:sans-serif;font-size:8pt;text-align:center;vertical-align:middle;color:#edffff;cursor:pointer;word-wrap:break-word}.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemLabel,.cesium-baseLayerPicker-item:focus .cesium-baseLayerPicker-itemLabel{text-decoration:underline}.cesium-baseLayerPicker-itemIcon{display:inline-block;position:relative;width:inherit;height:auto;background-size:100% 100%;border:solid 1px #444;border-radius:9px;color:#edffff;margin:0;padding:0;cursor:pointer;box-sizing:border-box}.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemIcon{border-color:#fff;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemLabel{color:#bdecf8}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemIcon{border:double 4px rgb(189,236,248)}.cesium-widget{font-family:sans-serif;font-size:16px;overflow:hidden;display:block;position:relative;top:0;left:0;width:100%;height:100%}.cesium-widget,.cesium-widget canvas{width:100%;height:100%;touch-action:none}.cesium-widget-credits{display:block;position:absolute;bottom:0;left:0;color:#fff;font-size:10px;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;inset:0;text-align:center;background:rgba(0,0,0,.7);z-index:99999}.cesium-widget-errorPanel:before{display:inline-block;vertical-align:middle;height:100%;content:""}.cesium-widget-errorPanel-content{width:75%;max-width:500px;display:inline-block;text-align:left;vertical-align:middle;border:1px solid #510c00;border-radius:7px;background-color:#f0d9d5;font-size:14px;color:#510c00}.cesium-widget-errorPanel-content.expanded{max-width:75%}.cesium-widget-errorPanel-header{font-size:18px;font-family:Open Sans,Verdana,Geneva,sans-serif;background:#d69d93;border-bottom:2px solid #510c00;border-radius:3px 3px 0 0;padding:15px}.cesium-widget-errorPanel-scroll{overflow:auto;font-family:Open Sans,Verdana,Geneva,sans-serif;white-space:pre-wrap;padding:0 15px;margin:10px 0 20px}.cesium-widget-errorPanel-buttonPanel{padding:0 15px;margin:10px 0 20px;text-align:right}.cesium-widget-errorPanel-buttonPanel button{border-color:#510c00;background:#d69d93;color:#202020;margin:0}.cesium-widget-errorPanel-buttonPanel button:focus{border-color:#510c00;background:#f0d9d5;color:#510c00}.cesium-widget-errorPanel-buttonPanel button:hover{border-color:#510c00;background:#f0d9d5;color:#510c00}.cesium-widget-errorPanel-buttonPanel button:active{border-color:#510c00;background:#b17b72;color:#510c00}.cesium-widget-errorPanel-more-details{text-decoration:underline;cursor:pointer}.cesium-widget-errorPanel-more-details:hover{color:#2b0700}.cesium-cesiumInspector{border-radius:5px;transition:width ease-in-out .25s;background:rgba(48,51,54,.8);border:1px solid #444;color:#edffff;display:inline-block;position:relative;padding:4px 12px;-webkit-user-select:none;user-select:none;overflow:hidden}.cesium-cesiumInspector-button{text-align:center;font-size:11pt}.cesium-cesiumInspector-visible .cesium-cesiumInspector-button{border-bottom:1px solid #aaa;padding-bottom:3px}.cesium-cesiumInspector input:enabled,.cesium-cesiumInspector-button{cursor:pointer}.cesium-cesiumInspector-visible{width:185px;height:auto}.cesium-cesiumInspector-hidden{width:122px;height:17px}.cesium-cesiumInspector-sectionContent{max-height:600px}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionContent{max-height:0;padding:0!important;overflow:hidden}.cesium-cesiumInspector-dropDown{margin:5px 0;font-family:sans-serif;font-size:10pt;width:185px}.cesium-cesiumInspector-frustumStatistics{padding:5px;background-color:#505050bf}.cesium-cesiumInspector-pickButton{background-color:#0000004d;border:1px solid #444;color:#edffff;border-radius:5px;padding:3px 7px;cursor:pointer;-webkit-user-select:none;user-select:none;margin:0 auto}.cesium-cesiumInspector-pickButton:focus{outline:none}.cesium-cesiumInspector-pickButton:active,.cesium-cesiumInspector-pickButtonHighlight{color:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-cesiumInspector-center{text-align:center}.cesium-cesiumInspector-sectionHeader{font-weight:700;font-size:10pt;margin:0;cursor:pointer}.cesium-cesiumInspector-pickSection{border:1px solid #aaa;border-radius:5px;padding:3px;margin-bottom:5px}.cesium-cesiumInspector-sectionContent{margin-bottom:10px;transition:max-height .25s}.cesium-cesiumInspector-tileText{padding-bottom:10px;border-bottom:1px solid #aaa}.cesium-cesiumInspector-relativeText{padding-top:10px}.cesium-cesiumInspector-sectionHeader:before{margin-right:5px;content:"-";width:1ch;display:inline-block}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionHeader:before{content:"+"}ul.cesium-cesiumInspector-statistics{margin:0;padding-top:3px;padding-bottom:3px}ul.cesium-cesiumInspector-statistics+ul.cesium-cesiumInspector-statistics{border-top:1px solid #aaa}.cesium-cesiumInspector-slider{margin-top:5px}.cesium-cesiumInspector-slider input[type=number]{text-align:left;background-color:#222;outline:none;border:1px solid #444;color:#edffff;width:100px;border-radius:3px;padding:1px;margin-left:10px;cursor:auto}.cesium-cesiumInspector-slider input[type=number]::-webkit-outer-spin-button,.cesium-cesiumInspector-slider input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.cesium-cesiumInspector-slider input[type=range]{margin-left:5px;vertical-align:middle}.cesium-cesiumInspector-hide .cesium-cesiumInspector-styleEditor{display:none}.cesium-cesiumInspector-styleEditor{padding:10px;border-radius:5px;background:rgba(48,51,54,.8);border:1px solid #444}.cesium-cesiumInspector-styleEditor textarea{width:100%;height:300px;background:transparent;color:#edffff;border:none;padding:0;white-space:pre;overflow-wrap:normal;overflow-x:auto}.cesium-3DTilesInspector{width:300px;pointer-events:all}.cesium-3DTilesInspector-statistics{font-size:11px}.cesium-3DTilesInspector-disabledElementsInfo{margin:5px 0 0;padding:0 0 0 20px;color:#eed202}.cesium-3DTilesInspector div,.cesium-3DTilesInspector input[type=range]{width:100%;box-sizing:border-box}.cesium-cesiumInspector-error{color:#ff9e9e;overflow:auto}.cesium-3DTilesInspector .cesium-cesiumInspector-section{margin-top:3px}.cesium-3DTilesInspector .cesium-cesiumInspector-sectionHeader+.cesium-cesiumInspector-show{border-top:1px solid white}input.cesium-cesiumInspector-url{overflow:hidden;white-space:nowrap;overflow-x:scroll;background-color:transparent;color:#fff;outline:none;border:none;height:1em;width:100%}.cesium-cesiumInspector .field-group{display:table}.cesium-cesiumInspector .field-group>label{display:table-cell;font-weight:700}.cesium-cesiumInspector .field-group>.field{display:table-cell;width:100%}.cesium-VoxelInspector{width:300px;pointer-events:all}.cesium-VoxelInspector div,.cesium-VoxelInspector input[type=range]{width:100%;box-sizing:border-box}.cesium-VoxelInspector .cesium-cesiumInspector-section{margin-top:3px}.cesium-VoxelInspector .cesium-cesiumInspector-sectionHeader+.cesium-cesiumInspector-show{border-top:1px solid white}.cesium-button.cesium-fullscreenButton,.cesium-button.cesium-vrButton{display:block;width:100%;height:100%;margin:0;border-radius:0}.cesium-viewer-geocoderContainer .cesium-geocoder-input{border:solid 1px #444;background-color:#282828b3;color:#fff;display:inline-block;vertical-align:middle;width:0;height:32px;margin:0;padding:0 32px 0 0;border-radius:0;box-sizing:border-box;transition:width ease-in-out .25s,background-color .2s ease-in-out;-webkit-appearance:none}.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input{border-color:#aef;box-shadow:0 0 8px #fff}.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus{border-color:#ea4;background-color:#0f0f0fe6;box-shadow:none;outline:none}.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input,.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus,.cesium-viewer-geocoderContainer .cesium-geocoder-input-wide{padding-left:4px;width:250px}.cesium-viewer-geocoderContainer .search-results{position:absolute;background-color:#000;color:#eee;overflow-y:auto;opacity:.8;width:100%}.cesium-viewer-geocoderContainer .search-results ul{list-style-type:none;margin:0;padding:0}.cesium-viewer-geocoderContainer .search-results ul li{font-size:14px;padding:3px 10px}.cesium-viewer-geocoderContainer .search-results ul li:hover{cursor:pointer}.cesium-viewer-geocoderContainer .search-results ul li.active{background:#48b}.cesium-geocoder-searchButton{background-color:#303336;display:inline-block;position:absolute;cursor:pointer;width:32px;top:1px;right:1px;height:30px;vertical-align:middle;fill:#edffff}.cesium-geocoder-searchButton:hover{background-color:#48b}.cesium-infoBox{display:block;position:absolute;top:50px;right:0;width:40%;max-width:480px;background:rgba(38,38,38,.95);color:#edffff;border:1px solid #444;border-right:none;border-top-left-radius:7px;border-bottom-left-radius:7px;box-shadow:0 0 10px 1px #000;transform:translate(100%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-infoBox-visible{transform:translate(0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-infoBox-title{display:block;height:20px;padding:5px 30px 5px 25px;background:rgba(84,84,84,1);border-top-left-radius:7px;text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:content-box}.cesium-infoBox-bodyless .cesium-infoBox-title{border-bottom-left-radius:7px}button.cesium-infoBox-camera{display:block;position:absolute;top:4px;left:4px;width:22px;height:22px;background:transparent;border-color:transparent;border-radius:3px;padding:0 5px;margin:0}button.cesium-infoBox-close{display:block;position:absolute;top:5px;right:5px;height:20px;background:transparent;border:none;border-radius:2px;font-weight:700;font-size:16px;padding:0 5px;margin:0;color:#edffff}button.cesium-infoBox-close:focus{background:rgba(238,136,0,.44);outline:none}button.cesium-infoBox-close:hover{background:#888;color:#000}button.cesium-infoBox-close:active{background:#a00;color:#000}.cesium-infoBox-bodyless .cesium-infoBox-iframe{display:none}.cesium-infoBox-iframe{border:none;width:100%;width:calc(100% - 2px)}span.cesium-sceneModePicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-sceneModePicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-sceneModePicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none{display:none}.cesium-sceneModePicker-slide-svg{transition:left 2s;top:0;left:0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D{margin:0 0 3px}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-icon2D{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-iconColumbusView{left:200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon3D{left:-200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon2D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-icon3D{left:-100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-iconColumbusView{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}span.cesium-projectionPicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-projectionPicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-projectionPicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-projectionPicker-wrapper .cesium-projectionPicker-none{display:none}.cesium-projectionPicker-wrapper .cesium-projectionPicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective,.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic{margin:0 0 3px}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective .cesium-projectionPicker-iconOrthographic{left:100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic .cesium-projectionPicker-iconPerspective{left:-100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-performance-watchdog-message-area{position:relative;background-color:#ff0;color:#000;padding:10px}.cesium-performance-watchdog-message{margin-right:30px}.cesium-performance-watchdog-message-dismiss{position:absolute;right:0;margin:0 10px 0 0}.cesium-navigationHelpButton-wrapper{position:relative;display:inline-block}.cesium-navigation-help{visibility:hidden;position:absolute;top:38px;right:2px;width:250px;border-radius:10px;transform:scale(.01);transform-origin:234px -10px;transition:visibility 0s .25s,transform .25s ease-in}.cesium-navigation-help-visible{visibility:visible;transform:scale(1);transition:transform .25s ease-out}.cesium-navigation-help-instructions{border:1px solid #444;background-color:#262626bf;padding-bottom:5px;border-radius:0 0 10px 10px}.cesium-click-navigation-help{display:none}.cesium-touch-navigation-help{display:none;padding-top:5px}.cesium-click-navigation-help-visible,.cesium-touch-navigation-help-visible{display:block}.cesium-navigation-help-pan{color:#6cf;font-weight:700}.cesium-navigation-help-zoom{color:#65fd00;font-weight:700}.cesium-navigation-help-rotate{color:#ffd800;font-weight:700}.cesium-navigation-help-tilt{color:#d800d8;font-weight:700}.cesium-navigation-help-details{color:#fff}.cesium-navigation-button{color:#fff;background-color:transparent;border-bottom:none;border-top:1px solid #444;border-right:1px solid #444;margin:0;width:50%;cursor:pointer}.cesium-navigation-button-icon{vertical-align:middle;padding:5px 1px}.cesium-navigation-button:focus{outline:none}.cesium-navigation-button-left{border-radius:10px 0 0;border-left:1px solid #444}.cesium-navigation-button-right{border-radius:0 10px 0 0;border-left:none}.cesium-navigation-button-selected{background-color:#262626bf}.cesium-navigation-button-unselected{background-color:#000000bf}.cesium-navigation-button-unselected:hover{background-color:#4c4c4cbf}.cesium-selection-wrapper{position:absolute;width:160px;height:160px;pointer-events:none;visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in}.cesium-selection-wrapper-visible{visibility:visible;opacity:1;transition:opacity .2s ease-out}.cesium-selection-wrapper svg{fill:#2e2;stroke:#000;stroke-width:1.1px}.cesium-timeline-main{position:relative;left:0;bottom:0;overflow:hidden;border:solid 1px #888;-webkit-user-select:none;user-select:none}.cesium-timeline-trackContainer{width:100%;overflow:auto;border-top:solid 1px #888;position:relative;top:0;left:0}.cesium-timeline-tracks{position:absolute;top:0;left:0;width:100%}.cesium-timeline-needle{position:absolute;left:0;top:1.7em;bottom:0;width:1px;background:#f00}.cesium-timeline-bar{position:relative;left:0;top:0;overflow:hidden;cursor:pointer;width:100%;height:1.7em;background:linear-gradient(to bottom,rgba(116,117,119,.8) 0%,rgba(58,68,82,.8) 11%,rgba(46,50,56,.8) 46%,rgba(53,53,53,.8) 81%,rgba(53,53,53,.8) 100%)}.cesium-timeline-ruler{visibility:hidden;white-space:nowrap;font-size:80%;z-index:-200}.cesium-timeline-highlight{position:absolute;bottom:0;left:0;background:#08f}.cesium-timeline-ticLabel{position:absolute;top:0;left:0;white-space:nowrap;font-size:80%;color:#eee}.cesium-timeline-ticMain{position:absolute;bottom:0;left:0;width:1px;height:50%;background:#eee}.cesium-timeline-ticSub{position:absolute;bottom:0;left:0;width:1px;height:33%;background:#aaa}.cesium-timeline-ticTiny{position:absolute;bottom:0;left:0;width:1px;height:25%;background:#888}.cesium-timeline-icon16{display:block;position:absolute;width:16px;height:16px;background-image:url(TimelineIcons.16c81c09c14707a4.png);background-repeat:no-repeat}.cesium-viewer{font-family:sans-serif;font-size:16px;overflow:hidden;display:block;position:relative;top:0;left:0;width:100%;height:100%}.cesium-viewer-cesiumWidgetContainer{width:100%;height:100%}.cesium-viewer-bottom{display:block;position:absolute;bottom:0;left:0;padding-right:5px}.cesium-viewer .cesium-widget-credits{display:inline;position:static;bottom:auto;left:auto;padding-right:0;color:#fff;font-size:10px;text-shadow:0 0 2px #000000}.cesium-viewer-timelineContainer{position:absolute;bottom:0;left:169px;right:29px;height:27px;padding:0;margin:0;overflow:hidden;font-size:14px}.cesium-viewer-animationContainer{position:absolute;bottom:0;left:0;padding:0;width:169px;height:112px}.cesium-viewer-fullscreenContainer,.cesium-viewer-vrContainer{position:absolute;bottom:0;right:0;padding:0;width:29px;height:29px;overflow:hidden}.cesium-viewer-toolbar{display:block;position:absolute;top:5px;right:5px}.cesium-viewer-cesiumInspectorContainer{display:block;position:absolute;top:50px;right:10px}.cesium-viewer-geocoderContainer{position:relative;display:inline-block;margin:0 3px}.cesium-viewer-cesium3DTilesInspectorContainer,.cesium-viewer-voxelInspectorContainer{display:block;position:absolute;top:50px;right:10px;max-height:calc(100% - 120px);box-sizing:border-box;overflow-y:auto;overflow-x:hidden}ukis-map-ol,ukis-map-cesium{height:100%}\n'],encapsulation:2})}return e})();var kot=st(2233),Uot=st(9498),Vie=st(1794);const zot=[{path:"",component:Bot}];let Hie=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=We.oAB({type:e});static#n=this.\u0275inj=We.cJS({imports:[Vie.Bz.forChild(zot),Vie.Bz]})}return e})(),Vot=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=We.oAB({type:e});static#n=this.\u0275inj=We.cJS({imports:[Zn.ez,Hie,Uot.q,pn.K6A,Eot,kot.cE,Jk.oC]})}return e})()}}]); \ No newline at end of file diff --git a/283.0b696c2c70bddaf2.js b/283.0b696c2c70bddaf2.js deleted file mode 100644 index 7005f2514..000000000 --- a/283.0b696c2c70bddaf2.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdemo_maps=self.webpackChunkdemo_maps||[]).push([[283],{751:(se,a,T)=>{"use strict";function y(_){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(c){return typeof c}:function(c){return c&&"function"==typeof Symbol&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(_)}function I(_,c){for(var w=0;w<c.length;w++){var L=c[w];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(_,h(L.key),L)}}function O(_,c,w){return c&&I(_.prototype,c),w&&I(_,w),Object.defineProperty(_,"prototype",{writable:!1}),_}function h(_){var c=function x(_,c){if("object"!==y(_)||null===_)return _;var w=_[Symbol.toPrimitive];if(void 0!==w){var L=w.call(_,c||"default");if("object"!==y(L))return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===c?String:Number)(_)}(_,"string");return"symbol"===y(c)?c:String(c)}var Z,R,le=T(6979).codes,U=le.ERR_AMBIGUOUS_ARGUMENT,W=le.ERR_INVALID_ARG_TYPE,V=le.ERR_INVALID_ARG_VALUE,ie=le.ERR_INVALID_RETURN_VALUE,N=le.ERR_MISSING_ARGS,M=T(732),Y=T(413).inspect,ve=T(413).types,ne=ve.isPromise,oe=ve.isRegExp,Ae=T(8531)(),pe=T(8930)(),u=T(4082)("RegExp.prototype.test");function p(){var _=T(710);Z=_.isDeepEqual,R=_.isDeepStrictEqual}var ye=!1,z=se.exports=H,Oe={};function b(_){throw _.message instanceof Error?_.message:new M(_)}function X(_,c,w,L){if(!w){var P=!1;if(0===c)P=!0,L="No value argument passed to `assert.ok()`";else if(L instanceof Error)throw L;var ue=new M({actual:w,expected:!0,message:L,operator:"==",stackStartFn:_});throw ue.generatedMessage=P,ue}}function H(){for(var _=arguments.length,c=new Array(_),w=0;w<_;w++)c[w]=arguments[w];X.apply(void 0,[H,c.length].concat(c))}z.fail=function k(_,c,w,L,P){var Le,ue=arguments.length;if(0===ue?Le="Failed":1===ue?(w=_,_=void 0):(!1===ye&&(ye=!0,(process.emitWarning?process.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===ue&&(L="!=")),w instanceof Error)throw w;var xe={actual:_,expected:c,operator:void 0===L?"fail":L,stackStartFn:P||k};void 0!==w&&(xe.message=w);var Fe=new M(xe);throw Le&&(Fe.message=Le,Fe.generatedMessage=!0),Fe},z.AssertionError=M,z.ok=H,z.equal=function _(c,w,L){if(arguments.length<2)throw new N("actual","expected");c!=w&&b({actual:c,expected:w,message:L,operator:"==",stackStartFn:_})},z.notEqual=function _(c,w,L){if(arguments.length<2)throw new N("actual","expected");c==w&&b({actual:c,expected:w,message:L,operator:"!=",stackStartFn:_})},z.deepEqual=function _(c,w,L){if(arguments.length<2)throw new N("actual","expected");void 0===Z&&p(),Z(c,w)||b({actual:c,expected:w,message:L,operator:"deepEqual",stackStartFn:_})},z.notDeepEqual=function _(c,w,L){if(arguments.length<2)throw new N("actual","expected");void 0===Z&&p(),Z(c,w)&&b({actual:c,expected:w,message:L,operator:"notDeepEqual",stackStartFn:_})},z.deepStrictEqual=function _(c,w,L){if(arguments.length<2)throw new N("actual","expected");void 0===Z&&p(),R(c,w)||b({actual:c,expected:w,message:L,operator:"deepStrictEqual",stackStartFn:_})},z.notDeepStrictEqual=function J(_,c,w){if(arguments.length<2)throw new N("actual","expected");void 0===Z&&p(),R(_,c)&&b({actual:_,expected:c,message:w,operator:"notDeepStrictEqual",stackStartFn:J})},z.strictEqual=function _(c,w,L){if(arguments.length<2)throw new N("actual","expected");pe(c,w)||b({actual:c,expected:w,message:L,operator:"strictEqual",stackStartFn:_})},z.notStrictEqual=function _(c,w,L){if(arguments.length<2)throw new N("actual","expected");pe(c,w)&&b({actual:c,expected:w,message:L,operator:"notStrictEqual",stackStartFn:_})};var be=O(function _(c,w,L){var P=this;(function F(_,c){if(!(_ instanceof c))throw new TypeError("Cannot call a class as a function")})(this,_),w.forEach(function(ue){ue in c&&(P[ue]=void 0!==L&&"string"==typeof L[ue]&&oe(c[ue])&&u(c[ue],L[ue])?L[ue]:c[ue])})});function ae(_,c,w,L){if("function"!=typeof c){if(oe(c))return u(c,_);if(2===arguments.length)throw new W("expected",["Function","RegExp"],c);if("object"!==y(_)||null===_){var P=new M({actual:_,expected:c,message:w,operator:"deepStrictEqual",stackStartFn:L});throw P.operator=L.name,P}var ue=Object.keys(c);if(c instanceof Error)ue.push("name","message");else if(0===ue.length)throw new V("error",c,"may not be an empty object");return void 0===Z&&p(),ue.forEach(function(Le){"string"==typeof _[Le]&&oe(c[Le])&&u(c[Le],_[Le])||function me(_,c,w,L,P,ue){if(!(w in _)||!R(_[w],c[w])){if(!L){var Le=new be(_,P),ke=new be(c,P,_),xe=new M({actual:Le,expected:ke,operator:"deepStrictEqual",stackStartFn:ue});throw xe.actual=_,xe.expected=c,xe.operator=ue.name,xe}b({actual:_,expected:c,message:L,operator:ue.name,stackStartFn:ue})}}(_,c,Le,w,ue,L)}),!0}return void 0!==c.prototype&&_ instanceof c||!Error.isPrototypeOf(c)&&!0===c.call({},_)}function Re(_){if("function"!=typeof _)throw new W("fn","Function",_);try{_()}catch(c){return c}return Oe}function K(_){return ne(_)||null!==_&&"object"===y(_)&&"function"==typeof _.then&&"function"==typeof _.catch}function ge(_){return Promise.resolve().then(function(){var c;if("function"==typeof _){if(!K(c=_()))throw new ie("instance of Promise","promiseFn",c)}else{if(!K(_))throw new W("promiseFn",["Function","Promise"],_);c=_}return Promise.resolve().then(function(){return c}).then(function(){return Oe}).catch(function(w){return w})})}function de(_,c,w,L){if("string"==typeof w){if(4===arguments.length)throw new W("error",["Object","Error","Function","RegExp"],w);if("object"===y(c)&&null!==c){if(c.message===w)throw new U("error/message",'The error message "'.concat(c.message,'" is identical to the message.'))}else if(c===w)throw new U("error/message",'The error "'.concat(c,'" is identical to the message.'));L=w,w=void 0}else if(null!=w&&"object"!==y(w)&&"function"!=typeof w)throw new W("error",["Object","Error","Function","RegExp"],w);if(c===Oe){var P="";w&&w.name&&(P+=" (".concat(w.name,")")),P+=L?": ".concat(L):".",b({actual:void 0,expected:w,operator:_.name,message:"Missing expected ".concat("rejects"===_.name?"rejection":"exception").concat(P),stackStartFn:_})}if(w&&!ae(c,w,L,_))throw c}function De(_,c,w,L){if(c!==Oe){if("string"==typeof w&&(L=w,w=void 0),!w||ae(c,w)){var P=L?": ".concat(L):".";b({actual:c,expected:w,operator:_.name,message:"Got unwanted ".concat("doesNotReject"===_.name?"rejection":"exception").concat(P,"\n")+'Actual message: "'.concat(c&&c.message,'"'),stackStartFn:_})}throw c}}function _e(_,c,w,L,P){if(!oe(c))throw new W("regexp","RegExp",c);var ue="match"===P;if("string"!=typeof _||u(c,_)!==ue){if(w instanceof Error)throw w;var Le=!w;w=w||("string"!=typeof _?'The "string" argument must be of type string. Received type '+"".concat(y(_)," (").concat(Y(_),")"):(ue?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(Y(c),". Input:\n\n").concat(Y(_),"\n"));var ke=new M({actual:_,expected:c,message:w,operator:P,stackStartFn:L});throw ke.generatedMessage=Le,ke}}function Ne(){for(var _=arguments.length,c=new Array(_),w=0;w<_;w++)c[w]=arguments[w];X.apply(void 0,[Ne,c.length].concat(c))}z.throws=function _(c){for(var w=arguments.length,L=new Array(w>1?w-1:0),P=1;P<w;P++)L[P-1]=arguments[P];de.apply(void 0,[_,Re(c)].concat(L))},z.rejects=function _(c){for(var w=arguments.length,L=new Array(w>1?w-1:0),P=1;P<w;P++)L[P-1]=arguments[P];return ge(c).then(function(ue){return de.apply(void 0,[_,ue].concat(L))})},z.doesNotThrow=function _(c){for(var w=arguments.length,L=new Array(w>1?w-1:0),P=1;P<w;P++)L[P-1]=arguments[P];De.apply(void 0,[_,Re(c)].concat(L))},z.doesNotReject=function _(c){for(var w=arguments.length,L=new Array(w>1?w-1:0),P=1;P<w;P++)L[P-1]=arguments[P];return ge(c).then(function(ue){return De.apply(void 0,[_,ue].concat(L))})},z.ifError=function _(c){if(null!=c){var w="ifError got unwanted exception: ";"object"===y(c)&&"string"==typeof c.message?w+=0===c.message.length&&c.constructor?c.constructor.name:c.message:w+=Y(c);var L=new M({actual:c,expected:null,operator:"ifError",message:w,stackStartFn:_}),P=c.stack;if("string"==typeof P){var ue=P.split("\n");ue.shift();for(var Le=L.stack.split("\n"),ke=0;ke<ue.length;ke++){var xe=Le.indexOf(ue[ke]);if(-1!==xe){Le=Le.slice(0,xe);break}}L.stack="".concat(Le.join("\n"),"\n").concat(ue.join("\n"))}throw L}},z.match=function _(c,w,L){_e(c,w,L,_,"match")},z.doesNotMatch=function _(c,w,L){_e(c,w,L,_,"doesNotMatch")},z.strict=Ae(Ne,z,{equal:z.strictEqual,deepEqual:z.deepStrictEqual,notEqual:z.notStrictEqual,notDeepEqual:z.notDeepStrictEqual}),z.strict.strict=z.strict},732:(se,a,T)=>{"use strict";function y(b,k){var X=Object.keys(b);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(b);k&&(H=H.filter(function(J){return Object.getOwnPropertyDescriptor(b,J).enumerable})),X.push.apply(X,H)}return X}function I(b){for(var k=1;k<arguments.length;k++){var X=null!=arguments[k]?arguments[k]:{};k%2?y(Object(X),!0).forEach(function(H){O(b,H,X[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(X)):y(Object(X)).forEach(function(H){Object.defineProperty(b,H,Object.getOwnPropertyDescriptor(X,H))})}return b}function O(b,k,X){return(k=j(k))in b?Object.defineProperty(b,k,{value:X,enumerable:!0,configurable:!0,writable:!0}):b[k]=X,b}function x(b,k){for(var X=0;X<k.length;X++){var H=k[X];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(b,j(H.key),H)}}function j(b){var k=function le(b,k){if("object"!==oe(b)||null===b)return b;var X=b[Symbol.toPrimitive];if(void 0!==X){var H=X.call(b,k||"default");if("object"!==oe(H))return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===k?String:Number)(b)}(b,"string");return"symbol"===oe(k)?k:String(k)}function V(b,k){if(k&&("object"===oe(k)||"function"==typeof k))return k;if(void 0!==k)throw new TypeError("Derived constructors may only return object or undefined");return ie(b)}function ie(b){if(void 0===b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function N(b){var k="function"==typeof Map?new Map:void 0;return N=function(H){if(null===H||!function Y(b){return-1!==Function.toString.call(b).indexOf("[native code]")}(H))return H;if("function"!=typeof H)throw new TypeError("Super expression must either be null or a function");if(typeof k<"u"){if(k.has(H))return k.get(H);k.set(H,J)}function J(){return M(H,arguments,ne(this).constructor)}return J.prototype=Object.create(H.prototype,{constructor:{value:J,enumerable:!1,writable:!0,configurable:!0}}),ve(J,H)},N(b)}function M(b,k,X){return(M=B()?Reflect.construct.bind():function(J,be,me){var ae=[null];ae.push.apply(ae,be);var K=new(Function.bind.apply(J,ae));return me&&ve(K,me.prototype),K}).apply(null,arguments)}function B(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ve(b,k){return(ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(H,J){return H.__proto__=J,H})(b,k)}function ne(b){return(ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)})(b)}function oe(b){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"==typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(b)}var pe=T(413).inspect,d=T(6979).codes.ERR_INVALID_ARG_TYPE;function Z(b,k,X){return(void 0===X||X>b.length)&&(X=b.length),b.substring(X-k.length,X)===k}var ee="",we="",i="",p="",q={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function Ee(b){var k=Object.keys(b),X=Object.create(Object.getPrototypeOf(b));return k.forEach(function(H){X[H]=b[H]}),Object.defineProperty(X,"message",{value:b.message}),X}function ye(b){return pe(b,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var Oe=function(b,k){!function U(b,k){if("function"!=typeof k&&null!==k)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(k&&k.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),Object.defineProperty(b,"prototype",{writable:!1}),k&&ve(b,k)}(H,b);var X=function W(b){var k=B();return function(){var J,H=ne(b);if(k){var be=ne(this).constructor;J=Reflect.construct(H,arguments,be)}else J=H.apply(this,arguments);return V(this,J)}}(H);function H(J){var be;if(function h(b,k){if(!(b instanceof k))throw new TypeError("Cannot call a class as a function")}(this,H),"object"!==oe(J)||null===J)throw new d("options","Object",J);var me=J.message,ae=J.operator,Re=J.stackStartFn,K=J.actual,ge=J.expected,de=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=me)be=X.call(this,String(me));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(ee="\x1b[34m",we="\x1b[32m",p="\x1b[39m",i="\x1b[31m"):(ee="",we="",p="",i="")),"object"===oe(K)&&null!==K&&"object"===oe(ge)&&null!==ge&&"stack"in K&&K instanceof Error&&"stack"in ge&&ge instanceof Error&&(K=Ee(K),ge=Ee(ge)),"deepStrictEqual"===ae||"strictEqual"===ae)be=X.call(this,function z(b,k,X){var H="",J="",be=0,me="",ae=!1,Re=ye(b),K=Re.split("\n"),ge=ye(k).split("\n"),de=0,De="";if("strictEqual"===X&&"object"===oe(b)&&"object"===oe(k)&&null!==b&&null!==k&&(X="strictEqualObject"),1===K.length&&1===ge.length&&K[0]!==ge[0]){var _e=K[0].length+ge[0].length;if(_e<=10){if(!("object"===oe(b)&&null!==b||"object"===oe(k)&&null!==k||0===b&&0===k))return"".concat(q[X],"\n\n")+"".concat(K[0]," !== ").concat(ge[0],"\n")}else if("strictEqualObject"!==X&&_e<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;K[0][de]===ge[0][de];)de++;de>2&&(De="\n ".concat(function R(b,k){if(k=Math.floor(k),0==b.length||0==k)return"";var X=b.length*k;for(k=Math.floor(Math.log(k)/Math.log(2));k;)b+=b,k--;return b+b.substring(0,X-b.length)}(" ",de),"^"),de=0)}}for(var _=K[K.length-1],c=ge[ge.length-1];_===c&&(de++<2?me="\n ".concat(_).concat(me):H=_,K.pop(),ge.pop(),0!==K.length&&0!==ge.length);)_=K[K.length-1],c=ge[ge.length-1];var w=Math.max(K.length,ge.length);if(0===w){var L=Re.split("\n");if(L.length>30)for(L[26]="".concat(ee,"...").concat(p);L.length>27;)L.pop();return"".concat(q.notIdentical,"\n\n").concat(L.join("\n"),"\n")}de>3&&(me="\n".concat(ee,"...").concat(p).concat(me),ae=!0),""!==H&&(me="\n ".concat(H).concat(me),H="");var P=0,ue=q[X]+"\n".concat(we,"+ actual").concat(p," ").concat(i,"- expected").concat(p),Le=" ".concat(ee,"...").concat(p," Lines skipped");for(de=0;de<w;de++){var ke=de-be;if(K.length<de+1)ke>1&&de>2&&(ke>4?(J+="\n".concat(ee,"...").concat(p),ae=!0):ke>3&&(J+="\n ".concat(ge[de-2]),P++),J+="\n ".concat(ge[de-1]),P++),be=de,H+="\n".concat(i,"-").concat(p," ").concat(ge[de]),P++;else if(ge.length<de+1)ke>1&&de>2&&(ke>4?(J+="\n".concat(ee,"...").concat(p),ae=!0):ke>3&&(J+="\n ".concat(K[de-2]),P++),J+="\n ".concat(K[de-1]),P++),be=de,J+="\n".concat(we,"+").concat(p," ").concat(K[de]),P++;else{var xe=ge[de],Fe=K[de],Ue=Fe!==xe&&(!Z(Fe,",")||Fe.slice(0,-1)!==xe);Ue&&Z(xe,",")&&xe.slice(0,-1)===Fe&&(Ue=!1,Fe+=","),Ue?(ke>1&&de>2&&(ke>4?(J+="\n".concat(ee,"...").concat(p),ae=!0):ke>3&&(J+="\n ".concat(K[de-2]),P++),J+="\n ".concat(K[de-1]),P++),be=de,J+="\n".concat(we,"+").concat(p," ").concat(Fe),H+="\n".concat(i,"-").concat(p," ").concat(xe),P+=2):(J+=H,H="",(1===ke||0===de)&&(J+="\n ".concat(Fe),P++))}if(P>20&&de<w-2)return"".concat(ue).concat(Le,"\n").concat(J,"\n").concat(ee,"...").concat(p).concat(H,"\n")+"".concat(ee,"...").concat(p)}return"".concat(ue).concat(ae?Le:"","\n").concat(J).concat(H).concat(me).concat(De)}(K,ge,ae));else if("notDeepStrictEqual"===ae||"notStrictEqual"===ae){var De=q[ae],_e=ye(K).split("\n");if("notStrictEqual"===ae&&"object"===oe(K)&&null!==K&&(De=q.notStrictEqualObject),_e.length>30)for(_e[26]="".concat(ee,"...").concat(p);_e.length>27;)_e.pop();be=X.call(this,1===_e.length?"".concat(De," ").concat(_e[0]):"".concat(De,"\n\n").concat(_e.join("\n"),"\n"))}else{var Ne=ye(K),_="",c=q[ae];"notDeepEqual"===ae||"notEqual"===ae?(Ne="".concat(q[ae],"\n\n").concat(Ne)).length>1024&&(Ne="".concat(Ne.slice(0,1021),"...")):(_="".concat(ye(ge)),Ne.length>512&&(Ne="".concat(Ne.slice(0,509),"...")),_.length>512&&(_="".concat(_.slice(0,509),"...")),"deepEqual"===ae||"equal"===ae?Ne="".concat(c,"\n\n").concat(Ne,"\n\nshould equal\n\n"):_=" ".concat(ae," ").concat(_)),be=X.call(this,"".concat(Ne).concat(_))}return Error.stackTraceLimit=de,be.generatedMessage=!me,Object.defineProperty(ie(be),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),be.code="ERR_ASSERTION",be.actual=K,be.expected=ge,be.operator=ae,Error.captureStackTrace&&Error.captureStackTrace(ie(be),Re),be.name="AssertionError",V(be)}return function F(b,k,X){k&&x(b.prototype,k),X&&x(b,X),Object.defineProperty(b,"prototype",{writable:!1})}(H,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:k,value:function(be,me){return pe(this,I(I({},me),{},{customInspect:!1,depth:0}))}}]),H}(N(Error),pe.custom);se.exports=Oe},6979:(se,a,T)=>{"use strict";function y(u){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(u)}function I(u,d){for(var Z=0;Z<d.length;Z++){var R=d[Z];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(u,h(R.key),R)}}function h(u){var d=function x(u,d){if("object"!==y(u)||null===u)return u;var Z=u[Symbol.toPrimitive];if(void 0!==Z){var R=Z.call(u,d||"default");if("object"!==y(R))return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===d?String:Number)(u)}(u,"string");return"symbol"===y(d)?d:String(d)}function le(u,d){return(le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,ee){return R.__proto__=ee,R})(u,d)}function N(u){return(N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)})(u)}var B,Y,M={};function ve(u,d,Z){Z||(Z=Error);var ee=function(we){!function j(u,d){if("function"!=typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),d&&le(u,d)}(p,we);var i=function U(u){var d=function ie(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ee,R=N(u);if(d){var we=N(this).constructor;ee=Reflect.construct(R,arguments,we)}else ee=R.apply(this,arguments);return function W(u,d){if(d&&("object"===y(d)||"function"==typeof d))return d;if(void 0!==d)throw new TypeError("Derived constructors may only return object or undefined");return function V(u){if(void 0===u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(u)}(this,ee)}}(p);function p(q,fe,Ee){var ye;return function F(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}(this,p),ye=i.call(this,function R(we,i,p){return"string"==typeof d?d:d(we,i,p)}(q,fe,Ee)),ye.code=u,ye}return function O(u,d,Z){return d&&I(u.prototype,d),Z&&I(u,Z),Object.defineProperty(u,"prototype",{writable:!1}),u}(p)}(Z);M[u]=ee}function ne(u,d){if(Array.isArray(u)){var Z=u.length;return u=u.map(function(R){return String(R)}),Z>2?"one of ".concat(d," ").concat(u.slice(0,Z-1).join(", "),", or ")+u[Z-1]:2===Z?"one of ".concat(d," ").concat(u[0]," or ").concat(u[1]):"of ".concat(d," ").concat(u[0])}return"of ".concat(d," ").concat(String(u))}ve("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),ve("ERR_INVALID_ARG_TYPE",function(u,d,Z){var R,ee;if(void 0===B&&(B=T(751)),B("string"==typeof u,"'name' must be a string"),"string"==typeof d&&function oe(u,d,Z){return u.substr(!Z||Z<0?0:+Z,d.length)===d}(d,"not ")?(R="must not be",d=d.replace(/^not /,"")):R="must be",function Ae(u,d,Z){return(void 0===Z||Z>u.length)&&(Z=u.length),u.substring(Z-d.length,Z)===d}(u," argument"))ee="The ".concat(u," ").concat(R," ").concat(ne(d,"type"));else{var we=function pe(u,d,Z){return"number"!=typeof Z&&(Z=0),!(Z+d.length>u.length)&&-1!==u.indexOf(d,Z)}(u,".")?"property":"argument";ee='The "'.concat(u,'" ').concat(we," ").concat(R," ").concat(ne(d,"type"))}return ee+". Received type ".concat(y(Z))},TypeError),ve("ERR_INVALID_ARG_VALUE",function(u,d){var Z=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===Y&&(Y=T(413));var R=Y.inspect(d);return R.length>128&&(R="".concat(R.slice(0,128),"...")),"The argument '".concat(u,"' ").concat(Z,". Received ").concat(R)},TypeError,RangeError),ve("ERR_INVALID_RETURN_VALUE",function(u,d,Z){var R;return R=Z&&Z.constructor&&Z.constructor.name?"instance of ".concat(Z.constructor.name):"type ".concat(y(Z)),"Expected ".concat(u,' to be returned from the "').concat(d,'"')+" function but got ".concat(R,".")},TypeError),ve("ERR_MISSING_ARGS",function(){for(var u=arguments.length,d=new Array(u),Z=0;Z<u;Z++)d[Z]=arguments[Z];void 0===B&&(B=T(751)),B(d.length>0,"At least one arg needs to be specified");var R="The ",ee=d.length;switch(d=d.map(function(we){return'"'.concat(we,'"')}),ee){case 1:R+="".concat(d[0]," argument");break;case 2:R+="".concat(d[0]," and ").concat(d[1]," arguments");break;default:R+=d.slice(0,ee-1).join(", "),R+=", and ".concat(d[ee-1]," arguments")}return"".concat(R," must be specified")},TypeError),se.exports.codes=M},710:(se,a,T)=>{"use strict";function y(l,s){return function F(l){if(Array.isArray(l))return l}(l)||function x(l,s){var C=null==l?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(null!=C){var $,re,Se,r,m=[],A=!0,G=!1;try{if(Se=(C=C.call(l)).next,0===s){if(Object(C)!==C)return;A=!1}else for(;!(A=($=Se.call(C)).done)&&(m.push($.value),m.length!==s);A=!0);}catch(o){G=!0,re=o}finally{try{if(!A&&null!=C.return&&(r=C.return(),Object(r)!==r))return}finally{if(G)throw re}}return m}}(l,s)||function O(l,s){if(l){if("string"==typeof l)return h(l,s);var C=Object.prototype.toString.call(l).slice(8,-1);if("Object"===C&&l.constructor&&(C=l.constructor.name),"Map"===C||"Set"===C)return Array.from(l);if("Arguments"===C||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return h(l,s)}}(l,s)||function I(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(l,s){(null==s||s>l.length)&&(s=l.length);for(var C=0,$=new Array(s);C<s;C++)$[C]=l[C];return $}function j(l){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(l)}var le=void 0!==/a/g.flags,U=function(s){var C=[];return s.forEach(function($){return C.push($)}),C},W=function(s){var C=[];return s.forEach(function($,re){return C.push([re,$])}),C},V=Object.is?Object.is:T(5726),ie=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},N=Number.isNaN?Number.isNaN:T(6847);function M(l){return l.call.bind(l)}var B=M(Object.prototype.hasOwnProperty),Y=M(Object.prototype.propertyIsEnumerable),ve=M(Object.prototype.toString),ne=T(413).types,oe=ne.isAnyArrayBuffer,Ae=ne.isArrayBufferView,pe=ne.isDate,u=ne.isMap,d=ne.isRegExp,Z=ne.isSet,R=ne.isNativeError,ee=ne.isBoxedPrimitive,we=ne.isNumberObject,i=ne.isStringObject,p=ne.isBooleanObject,q=ne.isBigIntObject,fe=ne.isSymbolObject,Ee=ne.isFloat32Array,ye=ne.isFloat64Array;function z(l){if(0===l.length||l.length>10)return!0;for(var s=0;s<l.length;s++){var C=l.charCodeAt(s);if(C<48||C>57)return!0}return 10===l.length&&l>=Math.pow(2,32)}function Oe(l){return Object.keys(l).filter(z).concat(ie(l).filter(Object.prototype.propertyIsEnumerable.bind(l)))}function b(l,s){if(l===s)return 0;for(var C=l.length,$=s.length,re=0,Se=Math.min(C,$);re<Se;++re)if(l[re]!==s[re]){C=l[re],$=s[re];break}return C<$?-1:$<C?1:0}var J=0,be=1,me=2,ae=3;function _e(l,s,C,$){if(l===s)return 0!==l||!C||V(l,s);if(C){if("object"!==j(l))return"number"==typeof l&&N(l)&&N(s);if("object"!==j(s)||null===l||null===s||Object.getPrototypeOf(l)!==Object.getPrototypeOf(s))return!1}else{if(null===l||"object"!==j(l))return(null===s||"object"!==j(s))&&l==s;if(null===s||"object"!==j(s))return!1}var re=ve(l);if(re!==ve(s))return!1;if(Array.isArray(l)){if(l.length!==s.length)return!1;var r=Oe(l),m=Oe(s);return r.length===m.length&&_(l,s,C,$,be,r)}if("[object Object]"===re&&(!u(l)&&u(s)||!Z(l)&&Z(s)))return!1;if(pe(l)){if(!pe(s)||Date.prototype.getTime.call(l)!==Date.prototype.getTime.call(s))return!1}else if(d(l)){if(!d(s)||!function Re(l,s){return le?l.source===s.source&&l.flags===s.flags:RegExp.prototype.toString.call(l)===RegExp.prototype.toString.call(s)}(l,s))return!1}else if(R(l)||l instanceof Error){if(l.message!==s.message||l.name!==s.name)return!1}else{if(Ae(l)){if(C||!Ee(l)&&!ye(l)){if(!function ge(l,s){return l.byteLength===s.byteLength&&0===b(new Uint8Array(l.buffer,l.byteOffset,l.byteLength),new Uint8Array(s.buffer,s.byteOffset,s.byteLength))}(l,s))return!1}else if(!function K(l,s){if(l.byteLength!==s.byteLength)return!1;for(var C=0;C<l.byteLength;C++)if(l[C]!==s[C])return!1;return!0}(l,s))return!1;var A=Oe(l),G=Oe(s);return A.length===G.length&&_(l,s,C,$,J,A)}if(Z(l))return!(!Z(s)||l.size!==s.size)&&_(l,s,C,$,me);if(u(l))return!(!u(s)||l.size!==s.size)&&_(l,s,C,$,ae);if(oe(l)){if(!function de(l,s){return l.byteLength===s.byteLength&&0===b(new Uint8Array(l),new Uint8Array(s))}(l,s))return!1}else if(ee(l)&&!function De(l,s){return we(l)?we(s)&&V(Number.prototype.valueOf.call(l),Number.prototype.valueOf.call(s)):i(l)?i(s)&&String.prototype.valueOf.call(l)===String.prototype.valueOf.call(s):p(l)?p(s)&&Boolean.prototype.valueOf.call(l)===Boolean.prototype.valueOf.call(s):q(l)?q(s)&&BigInt.prototype.valueOf.call(l)===BigInt.prototype.valueOf.call(s):fe(s)&&Symbol.prototype.valueOf.call(l)===Symbol.prototype.valueOf.call(s)}(l,s))return!1}return _(l,s,C,$,J)}function Ne(l,s){return s.filter(function(C){return Y(l,C)})}function _(l,s,C,$,re,Se){if(5===arguments.length){Se=Object.keys(l);var r=Object.keys(s);if(Se.length!==r.length)return!1}for(var m=0;m<Se.length;m++)if(!B(s,Se[m]))return!1;if(C&&5===arguments.length){var A=ie(l);if(0!==A.length){var G=0;for(m=0;m<A.length;m++){var o=A[m];if(Y(l,o)){if(!Y(s,o))return!1;Se.push(o),G++}else if(Y(s,o))return!1}var S=ie(s);if(A.length!==S.length&&Ne(s,S).length!==G)return!1}else{var t=ie(s);if(0!==t.length&&0!==Ne(s,t).length)return!1}}if(0===Se.length&&(re===J||re===be&&0===l.length||0===l.size))return!0;if(void 0===$)$={val1:new Map,val2:new Map,position:0};else{var D=$.val1.get(l);if(void 0!==D){var ce=$.val2.get(s);if(void 0!==ce)return D===ce}$.position++}$.val1.set(l,$.position),$.val2.set(s,$.position);var e=function xe(l,s,C,$,re,Se){var r=0;if(Se===me){if(!function ue(l,s,C,$){for(var re=null,Se=U(l),r=0;r<Se.length;r++){var m=Se[r];if("object"===j(m)&&null!==m)null===re&&(re=new Set),re.add(m);else if(!s.has(m)){if(C||!L(l,s,m))return!1;null===re&&(re=new Set),re.add(m)}}if(null!==re){for(var A=U(s),G=0;G<A.length;G++){var o=A[G];if("object"===j(o)&&null!==o){if(!c(re,o,C,$))return!1}else if(!C&&!l.has(o)&&!c(re,o,C,$))return!1}return 0===re.size}return!0}(l,s,C,re))return!1}else if(Se===ae){if(!function ke(l,s,C,$){for(var re=null,Se=W(l),r=0;r<Se.length;r++){var m=y(Se[r],2),A=m[0],G=m[1];if("object"===j(A)&&null!==A)null===re&&(re=new Set),re.add(A);else{var o=s.get(A);if(void 0===o&&!s.has(A)||!_e(G,o,C,$)){if(C||!P(l,s,A,G,$))return!1;null===re&&(re=new Set),re.add(A)}}}if(null!==re){for(var S=W(s),t=0;t<S.length;t++){var D=y(S[t],2),ce=D[0],e=D[1];if("object"===j(ce)&&null!==ce){if(!Le(re,l,ce,e,C,$))return!1}else if(!(C||l.has(ce)&&_e(l.get(ce),e,!1,$)||Le(re,l,ce,e,!1,$)))return!1}return 0===re.size}return!0}(l,s,C,re))return!1}else if(Se===be)for(;r<l.length;r++){if(!B(l,r)){if(B(s,r))return!1;for(var m=Object.keys(l);r<m.length;r++){var A=m[r];if(!B(s,A)||!_e(l[A],s[A],C,re))return!1}return m.length===Object.keys(s).length}if(!B(s,r)||!_e(l[r],s[r],C,re))return!1}for(r=0;r<$.length;r++){var G=$[r];if(!_e(l[G],s[G],C,re))return!1}return!0}(l,s,C,Se,$,re);return $.val1.delete(l),$.val2.delete(s),e}function c(l,s,C,$){for(var re=U(l),Se=0;Se<re.length;Se++){var r=re[Se];if(_e(s,r,C,$))return l.delete(r),!0}return!1}function w(l){switch(j(l)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":l=+l;case"number":if(N(l))return!1}return!0}function L(l,s,C){var $=w(C);return $??(s.has($)&&!l.has($))}function P(l,s,C,$,re){var Se=w(C);if(null!=Se)return Se;var r=s.get(Se);return!(void 0===r&&!s.has(Se)||!_e($,r,!1,re))&&!l.has(Se)&&_e($,r,!1,re)}function Le(l,s,C,$,re,Se){for(var r=U(l),m=0;m<r.length;m++){var A=r[m];if(_e(C,A,re,Se)&&_e($,s.get(A),re,Se))return l.delete(A),!0}return!1}se.exports={isDeepEqual:function Fe(l,s){return _e(l,s,!1)},isDeepStrictEqual:function Ue(l,s){return _e(l,s,!0)}}},5920:(se,a,T)=>{"use strict";var y=T(751),I=T(8450),O=T(4860),h=T(372),x=T(3179);for(var F in x)a[F]=x[F];function U(W){if("number"!=typeof W||W<a.DEFLATE||W>a.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=W,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}a.NONE=0,a.DEFLATE=1,a.INFLATE=2,a.GZIP=3,a.GUNZIP=4,a.DEFLATERAW=5,a.INFLATERAW=6,a.UNZIP=7,U.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,y(this.init_done,"close before init"),y(this.mode<=a.UNZIP),this.mode===a.DEFLATE||this.mode===a.GZIP||this.mode===a.DEFLATERAW?O.deflateEnd(this.strm):(this.mode===a.INFLATE||this.mode===a.GUNZIP||this.mode===a.INFLATERAW||this.mode===a.UNZIP)&&h.inflateEnd(this.strm),this.mode=a.NONE,this.dictionary=null)},U.prototype.write=function(W,V,ie,N,M,B,Y){return this._write(!0,W,V,ie,N,M,B,Y)},U.prototype.writeSync=function(W,V,ie,N,M,B,Y){return this._write(!1,W,V,ie,N,M,B,Y)},U.prototype._write=function(W,V,ie,N,M,B,Y,ve){if(y.equal(arguments.length,8),y(this.init_done,"write before init"),y(this.mode!==a.NONE,"already finalized"),y.equal(!1,this.write_in_progress,"write already in progress"),y.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,y.equal(!1,void 0===V,"must provide flush value"),this.write_in_progress=!0,V!==a.Z_NO_FLUSH&&V!==a.Z_PARTIAL_FLUSH&&V!==a.Z_SYNC_FLUSH&&V!==a.Z_FULL_FLUSH&&V!==a.Z_FINISH&&V!==a.Z_BLOCK)throw new Error("Invalid flush value");if(null==ie&&(ie=Buffer.alloc(0),M=0,N=0),this.strm.avail_in=M,this.strm.input=ie,this.strm.next_in=N,this.strm.avail_out=ve,this.strm.output=B,this.strm.next_out=Y,this.flush=V,!W)return this._process(),this._checkError()?this._afterSync():void 0;var ne=this;return process.nextTick(function(){ne._process(),ne._after()}),this},U.prototype._afterSync=function(){var W=this.strm.avail_out,V=this.strm.avail_in;return this.write_in_progress=!1,[V,W]},U.prototype._process=function(){var W=null;switch(this.mode){case a.DEFLATE:case a.GZIP:case a.DEFLATERAW:this.err=O.deflate(this.strm,this.flush);break;case a.UNZIP:switch(this.strm.avail_in>0&&(W=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===W)break;if(31!==this.strm.input[W]){this.mode=a.INFLATE;break}if(this.gzip_id_bytes_read=1,W++,1===this.strm.avail_in)break;case 1:if(null===W)break;139===this.strm.input[W]?(this.gzip_id_bytes_read=2,this.mode=a.GUNZIP):this.mode=a.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case a.INFLATE:case a.GUNZIP:case a.INFLATERAW:for(this.err=h.inflate(this.strm,this.flush),this.err===a.Z_NEED_DICT&&this.dictionary&&(this.err=h.inflateSetDictionary(this.strm,this.dictionary),this.err===a.Z_OK?this.err=h.inflate(this.strm,this.flush):this.err===a.Z_DATA_ERROR&&(this.err=a.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===a.GUNZIP&&this.err===a.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=h.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},U.prototype._checkError=function(){switch(this.err){case a.Z_OK:case a.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===a.Z_FINISH)return this._error("unexpected end of file"),!1;break;case a.Z_STREAM_END:break;case a.Z_NEED_DICT:return this._error(null==this.dictionary?"Missing dictionary":"Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},U.prototype._after=function(){if(this._checkError()){var W=this.strm.avail_out,V=this.strm.avail_in;this.write_in_progress=!1,this.callback(V,W),this.pending_close&&this.close()}},U.prototype._error=function(W){this.strm.msg&&(W=this.strm.msg),this.onerror(W,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},U.prototype.init=function(W,V,ie,N,M){y(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),y(W>=8&&W<=15,"invalid windowBits"),y(V>=-1&&V<=9,"invalid compression level"),y(ie>=1&&ie<=9,"invalid memlevel"),y(N===a.Z_FILTERED||N===a.Z_HUFFMAN_ONLY||N===a.Z_RLE||N===a.Z_FIXED||N===a.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(V,W,ie,N,M),this._setDictionary()},U.prototype.params=function(){throw new Error("deflateParams Not supported")},U.prototype.reset=function(){this._reset(),this._setDictionary()},U.prototype._init=function(W,V,ie,N,M){switch(this.level=W,this.windowBits=V,this.memLevel=ie,this.strategy=N,this.flush=a.Z_NO_FLUSH,this.err=a.Z_OK,(this.mode===a.GZIP||this.mode===a.GUNZIP)&&(this.windowBits+=16),this.mode===a.UNZIP&&(this.windowBits+=32),(this.mode===a.DEFLATERAW||this.mode===a.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new I,this.mode){case a.DEFLATE:case a.GZIP:case a.DEFLATERAW:this.err=O.deflateInit2(this.strm,this.level,a.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case a.INFLATE:case a.GUNZIP:case a.INFLATERAW:case a.UNZIP:this.err=h.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==a.Z_OK&&this._error("Init error"),this.dictionary=M,this.write_in_progress=!1,this.init_done=!0},U.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=a.Z_OK,this.mode){case a.DEFLATE:case a.DEFLATERAW:this.err=O.deflateSetDictionary(this.strm,this.dictionary)}this.err!==a.Z_OK&&this._error("Failed to set dictionary")}},U.prototype._reset=function(){switch(this.err=a.Z_OK,this.mode){case a.DEFLATE:case a.DEFLATERAW:case a.GZIP:this.err=O.deflateReset(this.strm);break;case a.INFLATE:case a.INFLATERAW:case a.GUNZIP:this.err=h.inflateReset(this.strm)}this.err!==a.Z_OK&&this._error("Failed to reset stream")},a.Zlib=U},9283:(se,a,T)=>{"use strict";var y=T(4387).Buffer,I=T(5743).Transform,O=T(5920),h=T(413),x=T(751).ok,F=T(4387).kMaxLength,j="Cannot create final Buffer. It would be larger than 0x"+F.toString(16)+" bytes";O.Z_MIN_WINDOWBITS=8,O.Z_MAX_WINDOWBITS=15,O.Z_DEFAULT_WINDOWBITS=15,O.Z_MIN_CHUNK=64,O.Z_MAX_CHUNK=1/0,O.Z_DEFAULT_CHUNK=16384,O.Z_MIN_MEMLEVEL=1,O.Z_MAX_MEMLEVEL=9,O.Z_DEFAULT_MEMLEVEL=8,O.Z_MIN_LEVEL=-1,O.Z_MAX_LEVEL=9,O.Z_DEFAULT_LEVEL=O.Z_DEFAULT_COMPRESSION;for(var le=Object.keys(O),U=0;U<le.length;U++){var W=le[U];W.match(/^Z/)&&Object.defineProperty(a,W,{enumerable:!0,value:O[W],writable:!1})}for(var V={Z_OK:O.Z_OK,Z_STREAM_END:O.Z_STREAM_END,Z_NEED_DICT:O.Z_NEED_DICT,Z_ERRNO:O.Z_ERRNO,Z_STREAM_ERROR:O.Z_STREAM_ERROR,Z_DATA_ERROR:O.Z_DATA_ERROR,Z_MEM_ERROR:O.Z_MEM_ERROR,Z_BUF_ERROR:O.Z_BUF_ERROR,Z_VERSION_ERROR:O.Z_VERSION_ERROR},ie=Object.keys(V),N=0;N<ie.length;N++){var M=ie[N];V[V[M]]=M}function B(i,p,q){var fe=[],Ee=0;function ye(){for(var b;null!==(b=i.read());)fe.push(b),Ee+=b.length;i.once("readable",ye)}function Oe(){var b,k=null;Ee>=F?k=new RangeError(j):b=y.concat(fe,Ee),fe=[],i.close(),q(k,b)}i.on("error",function z(b){i.removeListener("end",Oe),i.removeListener("readable",ye),q(b)}),i.on("end",Oe),i.end(p),ye()}function Y(i,p){if("string"==typeof p&&(p=y.from(p)),!y.isBuffer(p))throw new TypeError("Not a string or buffer");return i._processChunk(p,i._finishFlushFlag)}function ve(i){if(!(this instanceof ve))return new ve(i);R.call(this,i,O.DEFLATE)}function ne(i){if(!(this instanceof ne))return new ne(i);R.call(this,i,O.INFLATE)}function oe(i){if(!(this instanceof oe))return new oe(i);R.call(this,i,O.GZIP)}function Ae(i){if(!(this instanceof Ae))return new Ae(i);R.call(this,i,O.GUNZIP)}function pe(i){if(!(this instanceof pe))return new pe(i);R.call(this,i,O.DEFLATERAW)}function u(i){if(!(this instanceof u))return new u(i);R.call(this,i,O.INFLATERAW)}function d(i){if(!(this instanceof d))return new d(i);R.call(this,i,O.UNZIP)}function Z(i){return i===O.Z_NO_FLUSH||i===O.Z_PARTIAL_FLUSH||i===O.Z_SYNC_FLUSH||i===O.Z_FULL_FLUSH||i===O.Z_FINISH||i===O.Z_BLOCK}function R(i,p){var q=this;if(this._opts=i=i||{},this._chunkSize=i.chunkSize||a.Z_DEFAULT_CHUNK,I.call(this,i),i.flush&&!Z(i.flush))throw new Error("Invalid flush flag: "+i.flush);if(i.finishFlush&&!Z(i.finishFlush))throw new Error("Invalid flush flag: "+i.finishFlush);if(this._flushFlag=i.flush||O.Z_NO_FLUSH,this._finishFlushFlag=typeof i.finishFlush<"u"?i.finishFlush:O.Z_FINISH,i.chunkSize&&(i.chunkSize<a.Z_MIN_CHUNK||i.chunkSize>a.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+i.chunkSize);if(i.windowBits&&(i.windowBits<a.Z_MIN_WINDOWBITS||i.windowBits>a.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+i.windowBits);if(i.level&&(i.level<a.Z_MIN_LEVEL||i.level>a.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+i.level);if(i.memLevel&&(i.memLevel<a.Z_MIN_MEMLEVEL||i.memLevel>a.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+i.memLevel);if(i.strategy&&i.strategy!=a.Z_FILTERED&&i.strategy!=a.Z_HUFFMAN_ONLY&&i.strategy!=a.Z_RLE&&i.strategy!=a.Z_FIXED&&i.strategy!=a.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+i.strategy);if(i.dictionary&&!y.isBuffer(i.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new O.Zlib(p);var fe=this;this._hadError=!1,this._handle.onerror=function(z,Oe){ee(fe),fe._hadError=!0;var b=new Error(z);b.errno=Oe,b.code=a.codes[Oe],fe.emit("error",b)};var Ee=a.Z_DEFAULT_COMPRESSION;"number"==typeof i.level&&(Ee=i.level);var ye=a.Z_DEFAULT_STRATEGY;"number"==typeof i.strategy&&(ye=i.strategy),this._handle.init(i.windowBits||a.Z_DEFAULT_WINDOWBITS,Ee,i.memLevel||a.Z_DEFAULT_MEMLEVEL,ye,i.dictionary),this._buffer=y.allocUnsafe(this._chunkSize),this._offset=0,this._level=Ee,this._strategy=ye,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!q._handle},configurable:!0,enumerable:!0})}function ee(i,p){p&&process.nextTick(p),i._handle&&(i._handle.close(),i._handle=null)}function we(i){i.emit("close")}Object.defineProperty(a,"codes",{enumerable:!0,value:Object.freeze(V),writable:!1}),a.Deflate=ve,a.Inflate=ne,a.Gzip=oe,a.Gunzip=Ae,a.DeflateRaw=pe,a.InflateRaw=u,a.Unzip=d,a.createDeflate=function(i){return new ve(i)},a.createInflate=function(i){return new ne(i)},a.createDeflateRaw=function(i){return new pe(i)},a.createInflateRaw=function(i){return new u(i)},a.createGzip=function(i){return new oe(i)},a.createGunzip=function(i){return new Ae(i)},a.createUnzip=function(i){return new d(i)},a.deflate=function(i,p,q){return"function"==typeof p&&(q=p,p={}),B(new ve(p),i,q)},a.deflateSync=function(i,p){return Y(new ve(p),i)},a.gzip=function(i,p,q){return"function"==typeof p&&(q=p,p={}),B(new oe(p),i,q)},a.gzipSync=function(i,p){return Y(new oe(p),i)},a.deflateRaw=function(i,p,q){return"function"==typeof p&&(q=p,p={}),B(new pe(p),i,q)},a.deflateRawSync=function(i,p){return Y(new pe(p),i)},a.unzip=function(i,p,q){return"function"==typeof p&&(q=p,p={}),B(new d(p),i,q)},a.unzipSync=function(i,p){return Y(new d(p),i)},a.inflate=function(i,p,q){return"function"==typeof p&&(q=p,p={}),B(new ne(p),i,q)},a.inflateSync=function(i,p){return Y(new ne(p),i)},a.gunzip=function(i,p,q){return"function"==typeof p&&(q=p,p={}),B(new Ae(p),i,q)},a.gunzipSync=function(i,p){return Y(new Ae(p),i)},a.inflateRaw=function(i,p,q){return"function"==typeof p&&(q=p,p={}),B(new u(p),i,q)},a.inflateRawSync=function(i,p){return Y(new u(p),i)},h.inherits(R,I),R.prototype.params=function(i,p,q){if(i<a.Z_MIN_LEVEL||i>a.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+i);if(p!=a.Z_FILTERED&&p!=a.Z_HUFFMAN_ONLY&&p!=a.Z_RLE&&p!=a.Z_FIXED&&p!=a.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+p);if(this._level!==i||this._strategy!==p){var fe=this;this.flush(O.Z_SYNC_FLUSH,function(){x(fe._handle,"zlib binding closed"),fe._handle.params(i,p),fe._hadError||(fe._level=i,fe._strategy=p,q&&q())})}else process.nextTick(q)},R.prototype.reset=function(){return x(this._handle,"zlib binding closed"),this._handle.reset()},R.prototype._flush=function(i){this._transform(y.alloc(0),"",i)},R.prototype.flush=function(i,p){var q=this,fe=this._writableState;("function"==typeof i||void 0===i&&!p)&&(p=i,i=O.Z_FULL_FLUSH),fe.ended?p&&process.nextTick(p):fe.ending?p&&this.once("end",p):fe.needDrain?p&&this.once("drain",function(){return q.flush(i,p)}):(this._flushFlag=i,this.write(y.alloc(0),"",p))},R.prototype.close=function(i){ee(this,i),process.nextTick(we,this)},R.prototype._transform=function(i,p,q){var fe,Ee=this._writableState,z=(Ee.ending||Ee.ended)&&(!i||Ee.length===i.length);return null===i||y.isBuffer(i)?this._handle?(z?fe=this._finishFlushFlag:(fe=this._flushFlag,i.length>=Ee.length&&(this._flushFlag=this._opts.flush||O.Z_NO_FLUSH)),void this._processChunk(i,fe,q)):q(new Error("zlib binding closed")):q(new Error("invalid input"))},R.prototype._processChunk=function(i,p,q){var fe=i&&i.length,Ee=this._chunkSize-this._offset,ye=0,z=this,Oe="function"==typeof q;if(!Oe){var X,b=[],k=0;this.on("error",function(ae){X=ae}),x(this._handle,"zlib binding closed");do{var H=this._handle.writeSync(p,i,ye,fe,this._buffer,this._offset,Ee)}while(!this._hadError&&me(H[0],H[1]));if(this._hadError)throw X;if(k>=F)throw ee(this),new RangeError(j);var J=y.concat(b,k);return ee(this),J}x(this._handle,"zlib binding closed");var be=this._handle.write(p,i,ye,fe,this._buffer,this._offset,Ee);function me(ae,Re){if(this&&(this.buffer=null,this.callback=null),!z._hadError){var K=Ee-Re;if(x(K>=0,"have should not go down"),K>0){var ge=z._buffer.slice(z._offset,z._offset+K);z._offset+=K,Oe?z.push(ge):(b.push(ge),k+=ge.length)}if((0===Re||z._offset>=z._chunkSize)&&(Ee=z._chunkSize,z._offset=0,z._buffer=y.allocUnsafe(z._chunkSize)),0===Re){if(ye+=fe-ae,fe=ae,!Oe)return!0;var de=z._handle.write(p,i,ye,fe,z._buffer,z._offset,z._chunkSize);return de.callback=me,void(de.buffer=i)}if(!Oe)return!1;q()}}be.buffer=i,be.callback=me},h.inherits(ve,R),h.inherits(ne,R),h.inherits(oe,R),h.inherits(Ae,R),h.inherits(pe,R),h.inherits(u,R),h.inherits(d,R)},5775:(se,a)=>{"use strict";var T=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function y(h,x){return Object.prototype.hasOwnProperty.call(h,x)}a.assign=function(h){for(var x=Array.prototype.slice.call(arguments,1);x.length;){var F=x.shift();if(F){if("object"!=typeof F)throw new TypeError(F+"must be non-object");for(var j in F)y(F,j)&&(h[j]=F[j])}}return h},a.shrinkBuf=function(h,x){return h.length===x?h:h.subarray?h.subarray(0,x):(h.length=x,h)};var I={arraySet:function(h,x,F,j,le){if(x.subarray&&h.subarray)h.set(x.subarray(F,F+j),le);else for(var U=0;U<j;U++)h[le+U]=x[F+U]},flattenChunks:function(h){var x,F,j,le,U,W;for(j=0,x=0,F=h.length;x<F;x++)j+=h[x].length;for(W=new Uint8Array(j),le=0,x=0,F=h.length;x<F;x++)W.set(U=h[x],le),le+=U.length;return W}},O={arraySet:function(h,x,F,j,le){for(var U=0;U<j;U++)h[le+U]=x[F+U]},flattenChunks:function(h){return[].concat.apply([],h)}};a.setTyped=function(h){h?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,I)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,O))},a.setTyped(T)},2443:se=>{"use strict";se.exports=function a(T,y,I,O){for(var h=65535&T|0,x=T>>>16&65535|0,F=0;0!==I;){I-=F=I>2e3?2e3:I;do{x=x+(h=h+y[O++]|0)|0}while(--F);h%=65521,x%=65521}return h|x<<16|0}},3179:se=>{"use strict";se.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_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}},5209:se=>{"use strict";var T=function a(){for(var I,O=[],h=0;h<256;h++){I=h;for(var x=0;x<8;x++)I=1&I?3988292384^I>>>1:I>>>1;O[h]=I}return O}();se.exports=function y(I,O,h,x){var F=T,j=x+h;I^=-1;for(var le=x;le<j;le++)I=I>>>8^F[255&(I^O[le])];return-1^I}},4860:(se,a,T)=>{"use strict";var re,y=T(5775),I=T(1741),O=T(2443),h=T(5209),x=T(5171),F=0,V=0,N=-2,u=2,d=8,p=286,q=30,fe=19,Ee=2*p+1,ye=15,z=3,Oe=258,b=Oe+z+1,X=42,ae=113;function Ne(e,g){return e.msg=x[g],g}function _(e){return(e<<1)-(e>4?9:0)}function c(e){for(var g=e.length;--g>=0;)e[g]=0}function w(e){var g=e.state,E=g.pending;E>e.avail_out&&(E=e.avail_out),0!==E&&(y.arraySet(e.output,g.pending_buf,g.pending_out,E,e.next_out),e.next_out+=E,g.pending_out+=E,e.total_out+=E,e.avail_out-=E,g.pending-=E,0===g.pending&&(g.pending_out=0))}function L(e,g){I._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,g),e.block_start=e.strstart,w(e.strm)}function P(e,g){e.pending_buf[e.pending++]=g}function ue(e,g){e.pending_buf[e.pending++]=g>>>8&255,e.pending_buf[e.pending++]=255&g}function Le(e,g,E,n){var f=e.avail_in;return f>n&&(f=n),0===f?0:(e.avail_in-=f,y.arraySet(g,e.input,e.next_in,f,E),1===e.state.wrap?e.adler=O(e.adler,g,f,E):2===e.state.wrap&&(e.adler=h(e.adler,g,f,E)),e.next_in+=f,e.total_in+=f,f)}function ke(e,g){var f,v,E=e.max_chain_length,n=e.strstart,he=e.prev_length,Q=e.nice_match,te=e.strstart>e.w_size-b?e.strstart-(e.w_size-b):0,Te=e.window,Ge=e.w_mask,Ze=e.prev,Ie=e.strstart+Oe,je=Te[n+he-1],Me=Te[n+he];e.prev_length>=e.good_match&&(E>>=2),Q>e.lookahead&&(Q=e.lookahead);do{if(Te[(f=g)+he]===Me&&Te[f+he-1]===je&&Te[f]===Te[n]&&Te[++f]===Te[n+1]){n+=2,f++;do{}while(Te[++n]===Te[++f]&&Te[++n]===Te[++f]&&Te[++n]===Te[++f]&&Te[++n]===Te[++f]&&Te[++n]===Te[++f]&&Te[++n]===Te[++f]&&Te[++n]===Te[++f]&&Te[++n]===Te[++f]&&n<Ie);if(v=Oe-(Ie-n),n=Ie-Oe,v>he){if(e.match_start=g,he=v,v>=Q)break;je=Te[n+he-1],Me=Te[n+he]}}}while((g=Ze[g&Ge])>te&&0!=--E);return he<=e.lookahead?he:e.lookahead}function xe(e){var E,n,f,v,he,g=e.w_size;do{if(v=e.window_size-e.lookahead-e.strstart,e.strstart>=g+(g-b)){y.arraySet(e.window,e.window,g,g,0),e.match_start-=g,e.strstart-=g,e.block_start-=g,E=n=e.hash_size;do{f=e.head[--E],e.head[E]=f>=g?f-g:0}while(--n);E=n=g;do{f=e.prev[--E],e.prev[E]=f>=g?f-g:0}while(--n);v+=g}if(0===e.strm.avail_in)break;if(n=Le(e.strm,e.window,e.strstart+e.lookahead,v),e.lookahead+=n,e.lookahead+e.insert>=z)for(e.ins_h=e.window[he=e.strstart-e.insert],e.ins_h=(e.ins_h<<e.hash_shift^e.window[he+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[he+z-1])&e.hash_mask,e.prev[he&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=he,he++,e.insert--,!(e.lookahead+e.insert<z)););}while(e.lookahead<b&&0!==e.strm.avail_in)}function Ue(e,g){for(var E,n;;){if(e.lookahead<b){if(xe(e),e.lookahead<b&&g===F)return 1;if(0===e.lookahead)break}if(E=0,e.lookahead>=z&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,E=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==E&&e.strstart-E<=e.w_size-b&&(e.match_length=ke(e,E)),e.match_length>=z)if(n=I._tr_tally(e,e.strstart-e.match_start,e.match_length-z),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=z){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,E=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=I._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<z-1?e.strstart:z-1,4===g?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}function l(e,g){for(var E,n,f;;){if(e.lookahead<b){if(xe(e),e.lookahead<b&&g===F)return 1;if(0===e.lookahead)break}if(E=0,e.lookahead>=z&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,E=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=z-1,0!==E&&e.prev_length<e.max_lazy_match&&e.strstart-E<=e.w_size-b&&(e.match_length=ke(e,E),e.match_length<=5&&(1===e.strategy||e.match_length===z&&e.strstart-e.match_start>4096)&&(e.match_length=z-1)),e.prev_length>=z&&e.match_length<=e.prev_length){f=e.strstart+e.lookahead-z,n=I._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-z),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=f&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,E=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=z-1,e.strstart++,n&&(L(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=I._tr_tally(e,0,e.window[e.strstart-1]))&&L(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=I._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<z-1?e.strstart:z-1,4===g?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}function $(e,g,E,n,f){this.good_length=e,this.max_lazy=g,this.nice_length=E,this.max_chain=n,this.func=f}function r(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=d,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new y.Buf16(2*Ee),this.dyn_dtree=new y.Buf16(2*(2*q+1)),this.bl_tree=new y.Buf16(2*(2*fe+1)),c(this.dyn_ltree),c(this.dyn_dtree),c(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new y.Buf16(ye+1),this.heap=new y.Buf16(2*p+1),c(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new y.Buf16(2*p+1),c(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function m(e){var g;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=u,(g=e.state).pending=0,g.pending_out=0,g.wrap<0&&(g.wrap=-g.wrap),g.status=g.wrap?X:ae,e.adler=2===g.wrap?0:1,g.last_flush=F,I._tr_init(g),V):Ne(e,N)}function A(e){var g=m(e);return g===V&&function Se(e){e.window_size=2*e.w_size,c(e.head),e.max_lazy_match=re[e.level].max_lazy,e.good_match=re[e.level].good_length,e.nice_match=re[e.level].nice_length,e.max_chain_length=re[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=z-1,e.match_available=0,e.ins_h=0}(e.state),g}function o(e,g,E,n,f,v){if(!e)return N;var he=1;if(-1===g&&(g=6),n<0?(he=0,n=-n):n>15&&(he=2,n-=16),f<1||f>9||E!==d||n<8||n>15||g<0||g>9||v<0||v>4)return Ne(e,N);8===n&&(n=9);var Q=new r;return e.state=Q,Q.strm=e,Q.wrap=he,Q.gzhead=null,Q.w_bits=n,Q.w_size=1<<Q.w_bits,Q.w_mask=Q.w_size-1,Q.hash_bits=f+7,Q.hash_size=1<<Q.hash_bits,Q.hash_mask=Q.hash_size-1,Q.hash_shift=~~((Q.hash_bits+z-1)/z),Q.window=new y.Buf8(2*Q.w_size),Q.head=new y.Buf16(Q.hash_size),Q.prev=new y.Buf16(Q.w_size),Q.lit_bufsize=1<<f+6,Q.pending_buf_size=4*Q.lit_bufsize,Q.pending_buf=new y.Buf8(Q.pending_buf_size),Q.d_buf=1*Q.lit_bufsize,Q.l_buf=3*Q.lit_bufsize,Q.level=g,Q.strategy=v,Q.method=E,A(e)}re=[new $(0,0,0,0,function Fe(e,g){var E=65535;for(E>e.pending_buf_size-5&&(E=e.pending_buf_size-5);;){if(e.lookahead<=1){if(xe(e),0===e.lookahead&&g===F)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+E;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,L(e,!1),0===e.strm.avail_out)||e.strstart-e.block_start>=e.w_size-b&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===g?(L(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&L(e,!1),1)}),new $(4,4,8,4,Ue),new $(4,5,16,8,Ue),new $(4,6,32,32,Ue),new $(4,4,16,16,l),new $(8,16,32,32,l),new $(8,16,128,128,l),new $(8,32,128,256,l),new $(32,128,258,1024,l),new $(32,258,258,4096,l)],a.deflateInit=function S(e,g){return o(e,g,d,15,8,0)},a.deflateInit2=o,a.deflateReset=A,a.deflateResetKeep=m,a.deflateSetHeader=function G(e,g){return e&&e.state&&2===e.state.wrap?(e.state.gzhead=g,V):N},a.deflate=function t(e,g){var E,n,f,v;if(!e||!e.state||g>5||g<0)return e?Ne(e,N):N;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||666===n.status&&4!==g)return Ne(e,0===e.avail_out?-5:N);if(n.strm=e,E=n.last_flush,n.last_flush=g,n.status===X)if(2===n.wrap)e.adler=0,P(n,31),P(n,139),P(n,8),n.gzhead?(P(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),P(n,255&n.gzhead.time),P(n,n.gzhead.time>>8&255),P(n,n.gzhead.time>>16&255),P(n,n.gzhead.time>>24&255),P(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),P(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(P(n,255&n.gzhead.extra.length),P(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=h(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(P(n,0),P(n,0),P(n,0),P(n,0),P(n,0),P(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),P(n,3),n.status=ae);else{var he=d+(n.w_bits-8<<4)<<8;he|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(he|=32),he+=31-he%31,n.status=ae,ue(n,he),0!==n.strstart&&(ue(n,e.adler>>>16),ue(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(f=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>f&&(e.adler=h(e.adler,n.pending_buf,n.pending-f,f)),w(e),f=n.pending,n.pending!==n.pending_buf_size));)P(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>f&&(e.adler=h(e.adler,n.pending_buf,n.pending-f,f)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){f=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>f&&(e.adler=h(e.adler,n.pending_buf,n.pending-f,f)),w(e),f=n.pending,n.pending===n.pending_buf_size)){v=1;break}v=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,P(n,v)}while(0!==v);n.gzhead.hcrc&&n.pending>f&&(e.adler=h(e.adler,n.pending_buf,n.pending-f,f)),0===v&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){f=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>f&&(e.adler=h(e.adler,n.pending_buf,n.pending-f,f)),w(e),f=n.pending,n.pending===n.pending_buf_size)){v=1;break}v=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,P(n,v)}while(0!==v);n.gzhead.hcrc&&n.pending>f&&(e.adler=h(e.adler,n.pending_buf,n.pending-f,f)),0===v&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&w(e),n.pending+2<=n.pending_buf_size&&(P(n,255&e.adler),P(n,e.adler>>8&255),e.adler=0,n.status=ae)):n.status=ae),0!==n.pending){if(w(e),0===e.avail_out)return n.last_flush=-1,V}else if(0===e.avail_in&&_(g)<=_(E)&&4!==g)return Ne(e,-5);if(666===n.status&&0!==e.avail_in)return Ne(e,-5);if(0!==e.avail_in||0!==n.lookahead||g!==F&&666!==n.status){var te=2===n.strategy?function C(e,g){for(var E;;){if(0===e.lookahead&&(xe(e),0===e.lookahead)){if(g===F)return 1;break}if(e.match_length=0,E=I._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,E&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===g?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}(n,g):3===n.strategy?function s(e,g){for(var E,n,f,v,he=e.window;;){if(e.lookahead<=Oe){if(xe(e),e.lookahead<=Oe&&g===F)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=z&&e.strstart>0&&(n=he[f=e.strstart-1])===he[++f]&&n===he[++f]&&n===he[++f]){v=e.strstart+Oe;do{}while(n===he[++f]&&n===he[++f]&&n===he[++f]&&n===he[++f]&&n===he[++f]&&n===he[++f]&&n===he[++f]&&n===he[++f]&&f<v);e.match_length=Oe-(v-f),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=z?(E=I._tr_tally(e,1,e.match_length-z),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(E=I._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),E&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===g?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}(n,g):re[n.level].func(n,g);if((3===te||4===te)&&(n.status=666),1===te||3===te)return 0===e.avail_out&&(n.last_flush=-1),V;if(2===te&&(1===g?I._tr_align(n):5!==g&&(I._tr_stored_block(n,0,0,!1),3===g&&(c(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),w(e),0===e.avail_out))return n.last_flush=-1,V}return 4!==g?V:n.wrap<=0?1:(2===n.wrap?(P(n,255&e.adler),P(n,e.adler>>8&255),P(n,e.adler>>16&255),P(n,e.adler>>24&255),P(n,255&e.total_in),P(n,e.total_in>>8&255),P(n,e.total_in>>16&255),P(n,e.total_in>>24&255)):(ue(n,e.adler>>>16),ue(n,65535&e.adler)),w(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?V:1)},a.deflateEnd=function D(e){var g;return e&&e.state?(g=e.state.status)!==X&&69!==g&&73!==g&&91!==g&&103!==g&&g!==ae&&666!==g?Ne(e,N):(e.state=null,g===ae?Ne(e,-3):V):N},a.deflateSetDictionary=function ce(e,g){var n,f,v,he,Q,te,Te,Ge,E=g.length;if(!e||!e.state||2===(he=(n=e.state).wrap)||1===he&&n.status!==X||n.lookahead)return N;for(1===he&&(e.adler=O(e.adler,g,E,0)),n.wrap=0,E>=n.w_size&&(0===he&&(c(n.head),n.strstart=0,n.block_start=0,n.insert=0),Ge=new y.Buf8(n.w_size),y.arraySet(Ge,g,E-n.w_size,n.w_size,0),g=Ge,E=n.w_size),Q=e.avail_in,te=e.next_in,Te=e.input,e.avail_in=E,e.next_in=0,e.input=g,xe(n);n.lookahead>=z;){f=n.strstart,v=n.lookahead-(z-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[f+z-1])&n.hash_mask,n.prev[f&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=f,f++}while(--v);n.strstart=f,n.lookahead=z-1,xe(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=z-1,n.match_available=0,e.next_in=te,e.input=Te,e.avail_in=Q,n.wrap=he,V},a.deflateInfo="pako deflate (from Nodeca project)"},9140:se=>{"use strict";se.exports=function(I,O){var h,x,F,j,le,U,W,V,ie,N,M,B,Y,ve,ne,oe,Ae,pe,u,d,Z,R,ee,we,i;we=I.input,F=(x=I.next_in)+(I.avail_in-5),i=I.output,le=(j=I.next_out)-(O-I.avail_out),U=j+(I.avail_out-257),W=(h=I.state).dmax,V=h.wsize,ie=h.whave,N=h.wnext,M=h.window,B=h.hold,Y=h.bits,ve=h.lencode,ne=h.distcode,oe=(1<<h.lenbits)-1,Ae=(1<<h.distbits)-1;e:do{Y<15&&(B+=we[x++]<<Y,B+=we[x++]<<(Y+=8),Y+=8),pe=ve[B&oe];t:for(;;){if(B>>>=u=pe>>>24,Y-=u,0==(u=pe>>>16&255))i[j++]=65535&pe;else{if(!(16&u)){if(64&u){if(32&u){h.mode=12;break e}I.msg="invalid literal/length code",h.mode=30;break e}pe=ve[(65535&pe)+(B&(1<<u)-1)];continue t}for(d=65535&pe,(u&=15)&&(Y<u&&(B+=we[x++]<<Y,Y+=8),d+=B&(1<<u)-1,B>>>=u,Y-=u),Y<15&&(B+=we[x++]<<Y,B+=we[x++]<<(Y+=8),Y+=8),pe=ne[B&Ae];;){if(B>>>=u=pe>>>24,Y-=u,16&(u=pe>>>16&255)){if(Z=65535&pe,Y<(u&=15)&&(B+=we[x++]<<Y,(Y+=8)<u&&(B+=we[x++]<<Y,Y+=8)),(Z+=B&(1<<u)-1)>W){I.msg="invalid distance too far back",h.mode=30;break e}if(B>>>=u,Y-=u,Z>(u=j-le)){if((u=Z-u)>ie&&h.sane){I.msg="invalid distance too far back",h.mode=30;break e}if(R=0,ee=M,0===N){if(R+=V-u,u<d){d-=u;do{i[j++]=M[R++]}while(--u);R=j-Z,ee=i}}else if(N<u){if(R+=V+N-u,(u-=N)<d){d-=u;do{i[j++]=M[R++]}while(--u);if(R=0,N<d){d-=u=N;do{i[j++]=M[R++]}while(--u);R=j-Z,ee=i}}}else if(R+=N-u,u<d){d-=u;do{i[j++]=M[R++]}while(--u);R=j-Z,ee=i}for(;d>2;)i[j++]=ee[R++],i[j++]=ee[R++],i[j++]=ee[R++],d-=3;d&&(i[j++]=ee[R++],d>1&&(i[j++]=ee[R++]))}else{R=j-Z;do{i[j++]=i[R++],i[j++]=i[R++],i[j++]=i[R++],d-=3}while(d>2);d&&(i[j++]=i[R++],d>1&&(i[j++]=i[R++]))}break}if(64&u){I.msg="invalid distance code",h.mode=30;break e}pe=ne[(65535&pe)+(B&(1<<u)-1)]}}break}}while(x<F&&j<U);B&=(1<<(Y-=(d=Y>>3)<<3))-1,I.next_in=x-=d,I.next_out=j,I.avail_in=x<F?F-x+5:5-(x-F),I.avail_out=j<U?U-j+257:257-(j-U),h.hold=B,h.bits=Y}},372:(se,a,T)=>{"use strict";var y=T(5775),I=T(2443),O=T(5209),h=T(9140),x=T(6347),ie=0,B=-2,Ae=1,c=852,w=592;function ue(o){return(o>>>24&255)+(o>>>8&65280)+((65280&o)<<8)+((255&o)<<24)}function Le(){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 y.Buf16(320),this.work=new y.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ke(o){var S;return o&&o.state?(o.total_in=o.total_out=(S=o.state).total=0,o.msg="",S.wrap&&(o.adler=1&S.wrap),S.mode=Ae,S.last=0,S.havedict=0,S.dmax=32768,S.head=null,S.hold=0,S.bits=0,S.lencode=S.lendyn=new y.Buf32(c),S.distcode=S.distdyn=new y.Buf32(w),S.sane=1,S.back=-1,ie):B}function xe(o){var S;return o&&o.state?((S=o.state).wsize=0,S.whave=0,S.wnext=0,ke(o)):B}function Fe(o,S){var t,D;return!o||!o.state||(D=o.state,S<0?(t=0,S=-S):(t=1+(S>>4),S<48&&(S&=15)),S&&(S<8||S>15))?B:(null!==D.window&&D.wbits!==S&&(D.window=null),D.wrap=t,D.wbits=S,xe(o))}function Ue(o,S){var t,D;return o?(D=new Le,o.state=D,D.window=null,(t=Fe(o,S))!==ie&&(o.state=null),t):B}var C,$,s=!0;function re(o){if(s){var S;for(C=new y.Buf32(512),$=new y.Buf32(32),S=0;S<144;)o.lens[S++]=8;for(;S<256;)o.lens[S++]=9;for(;S<280;)o.lens[S++]=7;for(;S<288;)o.lens[S++]=8;for(x(1,o.lens,0,288,C,0,o.work,{bits:9}),S=0;S<32;)o.lens[S++]=5;x(2,o.lens,0,32,$,0,o.work,{bits:5}),s=!1}o.lencode=C,o.lenbits=9,o.distcode=$,o.distbits=5}function Se(o,S,t,D){var ce,e=o.state;return null===e.window&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0,e.window=new y.Buf8(e.wsize)),D>=e.wsize?(y.arraySet(e.window,S,t-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):((ce=e.wsize-e.wnext)>D&&(ce=D),y.arraySet(e.window,S,t-D,ce,e.wnext),(D-=ce)?(y.arraySet(e.window,S,t-D,D,0),e.wnext=D,e.whave=e.wsize):(e.wnext+=ce,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=ce))),0}a.inflateReset=xe,a.inflateReset2=Fe,a.inflateResetKeep=ke,a.inflateInit=function l(o){return Ue(o,15)},a.inflateInit2=Ue,a.inflate=function r(o,S){var t,D,ce,e,g,E,n,f,v,he,Q,te,Te,Ge,Ie,je,Me,Be,Ve,qe,ze,Ce,We,He,Ze=0,Pe=new y.Buf8(4),Ye=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!o||!o.state||!o.output||!o.input&&0!==o.avail_in)return B;12===(t=o.state).mode&&(t.mode=13),g=o.next_out,ce=o.output,e=o.next_in,D=o.input,f=t.hold,v=t.bits,he=E=o.avail_in,Q=n=o.avail_out,Ce=ie;e:for(;;)switch(t.mode){case Ae:if(0===t.wrap){t.mode=13;break}for(;v<16;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}if(2&t.wrap&&35615===f){t.check=0,Pe[0]=255&f,Pe[1]=f>>>8&255,t.check=O(t.check,Pe,2,0),f=0,v=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&f)<<8)+(f>>8))%31){o.msg="incorrect header check",t.mode=30;break}if(8!=(15&f)){o.msg="unknown compression method",t.mode=30;break}if(v-=4,ze=8+(15&(f>>>=4)),0===t.wbits)t.wbits=ze;else if(ze>t.wbits){o.msg="invalid window size",t.mode=30;break}t.dmax=1<<ze,o.adler=t.check=1,t.mode=512&f?10:12,f=0,v=0;break;case 2:for(;v<16;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}if(t.flags=f,8!=(255&t.flags)){o.msg="unknown compression method",t.mode=30;break}if(57344&t.flags){o.msg="unknown header flags set",t.mode=30;break}t.head&&(t.head.text=f>>8&1),512&t.flags&&(Pe[0]=255&f,Pe[1]=f>>>8&255,t.check=O(t.check,Pe,2,0)),f=0,v=0,t.mode=3;case 3:for(;v<32;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}t.head&&(t.head.time=f),512&t.flags&&(Pe[0]=255&f,Pe[1]=f>>>8&255,Pe[2]=f>>>16&255,Pe[3]=f>>>24&255,t.check=O(t.check,Pe,4,0)),f=0,v=0,t.mode=4;case 4:for(;v<16;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}t.head&&(t.head.xflags=255&f,t.head.os=f>>8),512&t.flags&&(Pe[0]=255&f,Pe[1]=f>>>8&255,t.check=O(t.check,Pe,2,0)),f=0,v=0,t.mode=5;case 5:if(1024&t.flags){for(;v<16;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}t.length=f,t.head&&(t.head.extra_len=f),512&t.flags&&(Pe[0]=255&f,Pe[1]=f>>>8&255,t.check=O(t.check,Pe,2,0)),f=0,v=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&((te=t.length)>E&&(te=E),te&&(t.head&&(ze=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),y.arraySet(t.head.extra,D,e,te,ze)),512&t.flags&&(t.check=O(t.check,D,te,e)),E-=te,e+=te,t.length-=te),t.length))break e;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===E)break e;te=0;do{ze=D[e+te++],t.head&&ze&&t.length<65536&&(t.head.name+=String.fromCharCode(ze))}while(ze&&te<E);if(512&t.flags&&(t.check=O(t.check,D,te,e)),E-=te,e+=te,ze)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=8;case 8:if(4096&t.flags){if(0===E)break e;te=0;do{ze=D[e+te++],t.head&&ze&&t.length<65536&&(t.head.comment+=String.fromCharCode(ze))}while(ze&&te<E);if(512&t.flags&&(t.check=O(t.check,D,te,e)),E-=te,e+=te,ze)break e}else t.head&&(t.head.comment=null);t.mode=9;case 9:if(512&t.flags){for(;v<16;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}if(f!==(65535&t.check)){o.msg="header crc mismatch",t.mode=30;break}f=0,v=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),o.adler=t.check=0,t.mode=12;break;case 10:for(;v<32;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}o.adler=t.check=ue(f),f=0,v=0,t.mode=11;case 11:if(0===t.havedict)return o.next_out=g,o.avail_out=n,o.next_in=e,o.avail_in=E,t.hold=f,t.bits=v,2;o.adler=t.check=1,t.mode=12;case 12:if(5===S||6===S)break e;case 13:if(t.last){f>>>=7&v,v-=7&v,t.mode=27;break}for(;v<3;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}switch(t.last=1&f,v-=1,3&(f>>>=1)){case 0:t.mode=14;break;case 1:if(re(t),t.mode=20,6===S){f>>>=2,v-=2;break e}break;case 2:t.mode=17;break;case 3:o.msg="invalid block type",t.mode=30}f>>>=2,v-=2;break;case 14:for(f>>>=7&v,v-=7&v;v<32;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}if((65535&f)!=(f>>>16^65535)){o.msg="invalid stored block lengths",t.mode=30;break}if(t.length=65535&f,f=0,v=0,t.mode=15,6===S)break e;case 15:t.mode=16;case 16:if(te=t.length){if(te>E&&(te=E),te>n&&(te=n),0===te)break e;y.arraySet(ce,D,e,te,g),E-=te,e+=te,n-=te,g+=te,t.length-=te;break}t.mode=12;break;case 17:for(;v<14;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}if(t.nlen=257+(31&f),v-=5,t.ndist=1+(31&(f>>>=5)),v-=5,t.ncode=4+(15&(f>>>=5)),f>>>=4,v-=4,t.nlen>286||t.ndist>30){o.msg="too many length or distance symbols",t.mode=30;break}t.have=0,t.mode=18;case 18:for(;t.have<t.ncode;){for(;v<3;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}t.lens[Ye[t.have++]]=7&f,f>>>=3,v-=3}for(;t.have<19;)t.lens[Ye[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,Ce=x(0,t.lens,0,19,t.lencode,0,t.work,We={bits:t.lenbits}),t.lenbits=We.bits,Ce){o.msg="invalid code lengths set",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have<t.nlen+t.ndist;){for(;je=(Ze=t.lencode[f&(1<<t.lenbits)-1])>>>16&255,Me=65535&Ze,!((Ie=Ze>>>24)<=v);){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}if(Me<16)f>>>=Ie,v-=Ie,t.lens[t.have++]=Me;else{if(16===Me){for(He=Ie+2;v<He;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}if(f>>>=Ie,v-=Ie,0===t.have){o.msg="invalid bit length repeat",t.mode=30;break}ze=t.lens[t.have-1],te=3+(3&f),f>>>=2,v-=2}else if(17===Me){for(He=Ie+3;v<He;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}v-=Ie,ze=0,te=3+(7&(f>>>=Ie)),f>>>=3,v-=3}else{for(He=Ie+7;v<He;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}v-=Ie,ze=0,te=11+(127&(f>>>=Ie)),f>>>=7,v-=7}if(t.have+te>t.nlen+t.ndist){o.msg="invalid bit length repeat",t.mode=30;break}for(;te--;)t.lens[t.have++]=ze}}if(30===t.mode)break;if(0===t.lens[256]){o.msg="invalid code -- missing end-of-block",t.mode=30;break}if(t.lenbits=9,Ce=x(1,t.lens,0,t.nlen,t.lencode,0,t.work,We={bits:t.lenbits}),t.lenbits=We.bits,Ce){o.msg="invalid literal/lengths set",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,Ce=x(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,We={bits:t.distbits}),t.distbits=We.bits,Ce){o.msg="invalid distances set",t.mode=30;break}if(t.mode=20,6===S)break e;case 20:t.mode=21;case 21:if(E>=6&&n>=258){o.next_out=g,o.avail_out=n,o.next_in=e,o.avail_in=E,t.hold=f,t.bits=v,h(o,Q),g=o.next_out,ce=o.output,n=o.avail_out,e=o.next_in,D=o.input,E=o.avail_in,f=t.hold,v=t.bits,12===t.mode&&(t.back=-1);break}for(t.back=0;je=(Ze=t.lencode[f&(1<<t.lenbits)-1])>>>16&255,Me=65535&Ze,!((Ie=Ze>>>24)<=v);){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}if(je&&!(240&je)){for(Be=Ie,Ve=je,qe=Me;je=(Ze=t.lencode[qe+((f&(1<<Be+Ve)-1)>>Be)])>>>16&255,Me=65535&Ze,!(Be+(Ie=Ze>>>24)<=v);){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}f>>>=Be,v-=Be,t.back+=Be}if(f>>>=Ie,v-=Ie,t.back+=Ie,t.length=Me,0===je){t.mode=26;break}if(32&je){t.back=-1,t.mode=12;break}if(64&je){o.msg="invalid literal/length code",t.mode=30;break}t.extra=15&je,t.mode=22;case 22:if(t.extra){for(He=t.extra;v<He;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}t.length+=f&(1<<t.extra)-1,f>>>=t.extra,v-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;je=(Ze=t.distcode[f&(1<<t.distbits)-1])>>>16&255,Me=65535&Ze,!((Ie=Ze>>>24)<=v);){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}if(!(240&je)){for(Be=Ie,Ve=je,qe=Me;je=(Ze=t.distcode[qe+((f&(1<<Be+Ve)-1)>>Be)])>>>16&255,Me=65535&Ze,!(Be+(Ie=Ze>>>24)<=v);){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}f>>>=Be,v-=Be,t.back+=Be}if(f>>>=Ie,v-=Ie,t.back+=Ie,64&je){o.msg="invalid distance code",t.mode=30;break}t.offset=Me,t.extra=15&je,t.mode=24;case 24:if(t.extra){for(He=t.extra;v<He;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}t.offset+=f&(1<<t.extra)-1,f>>>=t.extra,v-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){o.msg="invalid distance too far back",t.mode=30;break}t.mode=25;case 25:if(0===n)break e;if(t.offset>(te=Q-n)){if((te=t.offset-te)>t.whave&&t.sane){o.msg="invalid distance too far back",t.mode=30;break}Te=te>t.wnext?t.wsize-(te-=t.wnext):t.wnext-te,te>t.length&&(te=t.length),Ge=t.window}else Ge=ce,Te=g-t.offset,te=t.length;te>n&&(te=n),n-=te,t.length-=te;do{ce[g++]=Ge[Te++]}while(--te);0===t.length&&(t.mode=21);break;case 26:if(0===n)break e;ce[g++]=t.length,n--,t.mode=21;break;case 27:if(t.wrap){for(;v<32;){if(0===E)break e;E--,f|=D[e++]<<v,v+=8}if(o.total_out+=Q-=n,t.total+=Q,Q&&(o.adler=t.check=t.flags?O(t.check,ce,Q,g-Q):I(t.check,ce,Q,g-Q)),Q=n,(t.flags?f:ue(f))!==t.check){o.msg="incorrect data check",t.mode=30;break}f=0,v=0}t.mode=28;case 28:if(t.wrap&&t.flags){for(;v<32;){if(0===E)break e;E--,f+=D[e++]<<v,v+=8}if(f!==(4294967295&t.total)){o.msg="incorrect length check",t.mode=30;break}f=0,v=0}t.mode=29;case 29:Ce=1;break e;case 30:Ce=-3;break e;case 31:return-4;default:return B}return o.next_out=g,o.avail_out=n,o.next_in=e,o.avail_in=E,t.hold=f,t.bits=v,(t.wsize||Q!==o.avail_out&&t.mode<30&&(t.mode<27||4!==S))&&Se(o,o.output,o.next_out,Q-o.avail_out)?(t.mode=31,-4):(Q-=o.avail_out,o.total_in+=he-=o.avail_in,o.total_out+=Q,t.total+=Q,t.wrap&&Q&&(o.adler=t.check=t.flags?O(t.check,ce,Q,o.next_out-Q):I(t.check,ce,Q,o.next_out-Q)),o.data_type=t.bits+(t.last?64:0)+(12===t.mode?128:0)+(20===t.mode||15===t.mode?256:0),(0===he&&0===Q||4===S)&&Ce===ie&&(Ce=-5),Ce)},a.inflateEnd=function m(o){if(!o||!o.state)return B;var S=o.state;return S.window&&(S.window=null),o.state=null,ie},a.inflateGetHeader=function A(o,S){var t;return o&&o.state&&2&(t=o.state).wrap?(t.head=S,S.done=!1,ie):B},a.inflateSetDictionary=function G(o,S){var D,t=S.length;return o&&o.state&&(0===(D=o.state).wrap||11===D.mode)?11===D.mode&&I(1,S,t,0)!==D.check?-3:Se(o,S,t,t)?(D.mode=31,-4):(D.havedict=1,ie):B},a.inflateInfo="pako inflate (from Nodeca project)"},6347:(se,a,T)=>{"use strict";var y=T(5775),le=[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],U=[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],W=[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],V=[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];se.exports=function(N,M,B,Y,ve,ne,oe,Ae){var Ee,ye,z,Oe,b,H,Re,K,ge,pe=Ae.bits,u=0,d=0,Z=0,R=0,ee=0,we=0,i=0,p=0,q=0,fe=0,k=null,X=0,J=new y.Buf16(16),be=new y.Buf16(16),me=null,ae=0;for(u=0;u<=15;u++)J[u]=0;for(d=0;d<Y;d++)J[M[B+d]]++;for(ee=pe,R=15;R>=1&&0===J[R];R--);if(ee>R&&(ee=R),0===R)return ve[ne++]=20971520,ve[ne++]=20971520,Ae.bits=1,0;for(Z=1;Z<R&&0===J[Z];Z++);for(ee<Z&&(ee=Z),p=1,u=1;u<=15;u++)if(p<<=1,(p-=J[u])<0)return-1;if(p>0&&(0===N||1!==R))return-1;for(be[1]=0,u=1;u<15;u++)be[u+1]=be[u]+J[u];for(d=0;d<Y;d++)0!==M[B+d]&&(oe[be[M[B+d]]++]=d);if(0===N?(k=me=oe,H=19):1===N?(k=le,X-=257,me=U,ae-=257,H=256):(k=W,me=V,H=-1),fe=0,d=0,u=Z,b=ne,we=ee,i=0,z=-1,Oe=(q=1<<ee)-1,1===N&&q>852||2===N&&q>592)return 1;for(;;){Re=u-i,oe[d]<H?(K=0,ge=oe[d]):oe[d]>H?(K=me[ae+oe[d]],ge=k[X+oe[d]]):(K=96,ge=0),Ee=1<<u-i,Z=ye=1<<we;do{ve[b+(fe>>i)+(ye-=Ee)]=Re<<24|K<<16|ge|0}while(0!==ye);for(Ee=1<<u-1;fe&Ee;)Ee>>=1;if(0!==Ee?(fe&=Ee-1,fe+=Ee):fe=0,d++,0==--J[u]){if(u===R)break;u=M[B+oe[d]]}if(u>ee&&(fe&Oe)!==z){for(0===i&&(i=ee),b+=Z,p=1<<(we=u-i);we+i<R&&!((p-=J[we+i])<=0);)we++,p<<=1;if(q+=1<<we,1===N&&q>852||2===N&&q>592)return 1;ve[z=fe&Oe]=ee<<24|we<<16|b-ne|0}}return 0!==fe&&(ve[b+fe]=u-i<<24|64<<16|0),Ae.bits=ee,0}},5171:se=>{"use strict";se.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"}},1741:(se,a,T)=>{"use strict";var y=T(5775);function F(r){for(var m=r.length;--m>=0;)r[m]=0}var N=256,M=286,B=30,ne=15,oe=16,R=[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],ee=[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],we=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],i=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],q=new Array(576);F(q);var fe=new Array(60);F(fe);var Ee=new Array(512);F(Ee);var ye=new Array(256);F(ye);var z=new Array(29);F(z);var k,X,H,Oe=new Array(B);function b(r,m,A,G,o){this.static_tree=r,this.extra_bits=m,this.extra_base=A,this.elems=G,this.max_length=o,this.has_stree=r&&r.length}function J(r,m){this.dyn_tree=r,this.max_code=0,this.stat_desc=m}function be(r){return r<256?Ee[r]:Ee[256+(r>>>7)]}function me(r,m){r.pending_buf[r.pending++]=255&m,r.pending_buf[r.pending++]=m>>>8&255}function ae(r,m,A){r.bi_valid>oe-A?(r.bi_buf|=m<<r.bi_valid&65535,me(r,r.bi_buf),r.bi_buf=m>>oe-r.bi_valid,r.bi_valid+=A-oe):(r.bi_buf|=m<<r.bi_valid&65535,r.bi_valid+=A)}function Re(r,m,A){ae(r,A[2*m],A[2*m+1])}function K(r,m){var A=0;do{A|=1&r,r>>>=1,A<<=1}while(--m>0);return A>>>1}function De(r,m,A){var S,t,G=new Array(ne+1),o=0;for(S=1;S<=ne;S++)G[S]=o=o+A[S-1]<<1;for(t=0;t<=m;t++){var D=r[2*t+1];0!==D&&(r[2*t]=K(G[D]++,D))}}function Ne(r){var m;for(m=0;m<M;m++)r.dyn_ltree[2*m]=0;for(m=0;m<B;m++)r.dyn_dtree[2*m]=0;for(m=0;m<19;m++)r.bl_tree[2*m]=0;r.dyn_ltree[512]=1,r.opt_len=r.static_len=0,r.last_lit=r.matches=0}function _(r){r.bi_valid>8?me(r,r.bi_buf):r.bi_valid>0&&(r.pending_buf[r.pending++]=r.bi_buf),r.bi_buf=0,r.bi_valid=0}function w(r,m,A,G){var o=2*m,S=2*A;return r[o]<r[S]||r[o]===r[S]&&G[m]<=G[A]}function L(r,m,A){for(var G=r.heap[A],o=A<<1;o<=r.heap_len&&(o<r.heap_len&&w(m,r.heap[o+1],r.heap[o],r.depth)&&o++,!w(m,G,r.heap[o],r.depth));)r.heap[A]=r.heap[o],A=o,o<<=1;r.heap[A]=G}function P(r,m,A){var G,o,t,D,S=0;if(0!==r.last_lit)do{G=r.pending_buf[r.d_buf+2*S]<<8|r.pending_buf[r.d_buf+2*S+1],o=r.pending_buf[r.l_buf+S],S++,0===G?Re(r,o,m):(Re(r,(t=ye[o])+N+1,m),0!==(D=R[t])&&ae(r,o-=z[t],D),Re(r,t=be(--G),A),0!==(D=ee[t])&&ae(r,G-=Oe[t],D))}while(S<r.last_lit);Re(r,256,m)}function ue(r,m){var t,D,e,A=m.dyn_tree,G=m.stat_desc.static_tree,o=m.stat_desc.has_stree,S=m.stat_desc.elems,ce=-1;for(r.heap_len=0,r.heap_max=573,t=0;t<S;t++)0!==A[2*t]?(r.heap[++r.heap_len]=ce=t,r.depth[t]=0):A[2*t+1]=0;for(;r.heap_len<2;)A[2*(e=r.heap[++r.heap_len]=ce<2?++ce:0)]=1,r.depth[e]=0,r.opt_len--,o&&(r.static_len-=G[2*e+1]);for(m.max_code=ce,t=r.heap_len>>1;t>=1;t--)L(r,A,t);e=S;do{t=r.heap[1],r.heap[1]=r.heap[r.heap_len--],L(r,A,1),D=r.heap[1],r.heap[--r.heap_max]=t,r.heap[--r.heap_max]=D,A[2*e]=A[2*t]+A[2*D],r.depth[e]=(r.depth[t]>=r.depth[D]?r.depth[t]:r.depth[D])+1,A[2*t+1]=A[2*D+1]=e,r.heap[1]=e++,L(r,A,1)}while(r.heap_len>=2);r.heap[--r.heap_max]=r.heap[1],function de(r,m){var e,g,E,n,f,v,A=m.dyn_tree,G=m.max_code,o=m.stat_desc.static_tree,S=m.stat_desc.has_stree,t=m.stat_desc.extra_bits,D=m.stat_desc.extra_base,ce=m.stat_desc.max_length,he=0;for(n=0;n<=ne;n++)r.bl_count[n]=0;for(A[2*r.heap[r.heap_max]+1]=0,e=r.heap_max+1;e<573;e++)(n=A[2*A[2*(g=r.heap[e])+1]+1]+1)>ce&&(n=ce,he++),A[2*g+1]=n,!(g>G)&&(r.bl_count[n]++,f=0,g>=D&&(f=t[g-D]),r.opt_len+=(v=A[2*g])*(n+f),S&&(r.static_len+=v*(o[2*g+1]+f)));if(0!==he){do{for(n=ce-1;0===r.bl_count[n];)n--;r.bl_count[n]--,r.bl_count[n+1]+=2,r.bl_count[ce]--,he-=2}while(he>0);for(n=ce;0!==n;n--)for(g=r.bl_count[n];0!==g;)!((E=r.heap[--e])>G)&&(A[2*E+1]!==n&&(r.opt_len+=(n-A[2*E+1])*A[2*E],A[2*E+1]=n),g--)}}(r,m),De(A,ce,r.bl_count)}function Le(r,m,A){var G,S,o=-1,t=m[1],D=0,ce=7,e=4;for(0===t&&(ce=138,e=3),m[2*(A+1)+1]=65535,G=0;G<=A;G++)S=t,t=m[2*(G+1)+1],!(++D<ce&&S===t)&&(D<e?r.bl_tree[2*S]+=D:0!==S?(S!==o&&r.bl_tree[2*S]++,r.bl_tree[32]++):D<=10?r.bl_tree[34]++:r.bl_tree[36]++,D=0,o=S,0===t?(ce=138,e=3):S===t?(ce=6,e=3):(ce=7,e=4))}function ke(r,m,A){var G,S,o=-1,t=m[1],D=0,ce=7,e=4;for(0===t&&(ce=138,e=3),G=0;G<=A;G++)if(S=t,t=m[2*(G+1)+1],!(++D<ce&&S===t)){if(D<e)do{Re(r,S,r.bl_tree)}while(0!=--D);else 0!==S?(S!==o&&(Re(r,S,r.bl_tree),D--),Re(r,16,r.bl_tree),ae(r,D-3,2)):D<=10?(Re(r,17,r.bl_tree),ae(r,D-3,3)):(Re(r,18,r.bl_tree),ae(r,D-11,7));D=0,o=S,0===t?(ce=138,e=3):S===t?(ce=6,e=3):(ce=7,e=4)}}F(Oe);var l=!1;function C(r,m,A,G){ae(r,0+(G?1:0),3),function c(r,m,A,G){_(r),G&&(me(r,A),me(r,~A)),y.arraySet(r.pending_buf,r.window,m,A,r.pending),r.pending+=A}(r,m,A,!0)}a._tr_init=function s(r){l||(function _e(){var r,m,A,G,o,S=new Array(ne+1);for(A=0,G=0;G<28;G++)for(z[G]=A,r=0;r<1<<R[G];r++)ye[A++]=G;for(ye[A-1]=G,o=0,G=0;G<16;G++)for(Oe[G]=o,r=0;r<1<<ee[G];r++)Ee[o++]=G;for(o>>=7;G<B;G++)for(Oe[G]=o<<7,r=0;r<1<<ee[G]-7;r++)Ee[256+o++]=G;for(m=0;m<=ne;m++)S[m]=0;for(r=0;r<=143;)q[2*r+1]=8,r++,S[8]++;for(;r<=255;)q[2*r+1]=9,r++,S[9]++;for(;r<=279;)q[2*r+1]=7,r++,S[7]++;for(;r<=287;)q[2*r+1]=8,r++,S[8]++;for(De(q,287,S),r=0;r<B;r++)fe[2*r+1]=5,fe[2*r]=K(r,5);k=new b(q,R,257,M,ne),X=new b(fe,ee,0,B,ne),H=new b(new Array(0),we,0,19,7)}(),l=!0),r.l_desc=new J(r.dyn_ltree,k),r.d_desc=new J(r.dyn_dtree,X),r.bl_desc=new J(r.bl_tree,H),r.bi_buf=0,r.bi_valid=0,Ne(r)},a._tr_stored_block=C,a._tr_flush_block=function re(r,m,A,G){var o,S,t=0;r.level>0?(2===r.strm.data_type&&(r.strm.data_type=function Ue(r){var A,m=4093624447;for(A=0;A<=31;A++,m>>>=1)if(1&m&&0!==r.dyn_ltree[2*A])return 0;if(0!==r.dyn_ltree[18]||0!==r.dyn_ltree[20]||0!==r.dyn_ltree[26])return 1;for(A=32;A<N;A++)if(0!==r.dyn_ltree[2*A])return 1;return 0}(r)),ue(r,r.l_desc),ue(r,r.d_desc),t=function xe(r){var m;for(Le(r,r.dyn_ltree,r.l_desc.max_code),Le(r,r.dyn_dtree,r.d_desc.max_code),ue(r,r.bl_desc),m=18;m>=3&&0===r.bl_tree[2*i[m]+1];m--);return r.opt_len+=3*(m+1)+5+5+4,m}(r),(S=r.static_len+3+7>>>3)<=(o=r.opt_len+3+7>>>3)&&(o=S)):o=S=A+5,A+4<=o&&-1!==m?C(r,m,A,G):4===r.strategy||S===o?(ae(r,2+(G?1:0),3),P(r,q,fe)):(ae(r,4+(G?1:0),3),function Fe(r,m,A,G){var o;for(ae(r,m-257,5),ae(r,A-1,5),ae(r,G-4,4),o=0;o<G;o++)ae(r,r.bl_tree[2*i[o]+1],3);ke(r,r.dyn_ltree,m-1),ke(r,r.dyn_dtree,A-1)}(r,r.l_desc.max_code+1,r.d_desc.max_code+1,t+1),P(r,r.dyn_ltree,r.dyn_dtree)),Ne(r),G&&_(r)},a._tr_tally=function Se(r,m,A){return r.pending_buf[r.d_buf+2*r.last_lit]=m>>>8&255,r.pending_buf[r.d_buf+2*r.last_lit+1]=255&m,r.pending_buf[r.l_buf+r.last_lit]=255&A,r.last_lit++,0===m?r.dyn_ltree[2*A]++:(r.matches++,m--,r.dyn_ltree[2*(ye[A]+N+1)]++,r.dyn_dtree[2*be(m)]++),r.last_lit===r.lit_bufsize-1},a._tr_align=function $(r){ae(r,2,3),Re(r,256,q),function ge(r){16===r.bi_valid?(me(r,r.bi_buf),r.bi_buf=0,r.bi_valid=0):r.bi_valid>=8&&(r.pending_buf[r.pending++]=255&r.bi_buf,r.bi_buf>>=8,r.bi_valid-=8)}(r)}},8450:se=>{"use strict";se.exports=function a(){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}},9169:(se,a,T)=>{"use strict";var y=T(8867),I="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),O=Object.prototype.toString,h=Array.prototype.concat,x=T(3039),j=T(4843)(),le=function(W,V,ie,N){if(V in W)if(!0===N){if(W[V]===ie)return}else if(!function(W){return"function"==typeof W&&"[object Function]"===O.call(W)}(N)||!N())return;j?x(W,V,ie,!0):x(W,V,ie)},U=function(W,V){var ie=arguments.length>2?arguments[2]:{},N=y(V);I&&(N=h.call(N,Object.getOwnPropertySymbols(V)));for(var M=0;M<N.length;M+=1)le(W,N[M],V[N[M]],ie[N[M]])};U.supportsDescriptors=!!j,se.exports=U},3395:se=>{"use strict";se.exports=function(T){return T!=T}},6847:(se,a,T)=>{"use strict";var y=T(2344),I=T(9169),O=T(3395),h=T(4191),x=T(5326),F=y(h(),Number);I(F,{getPolyfill:h,implementation:O,shim:x}),se.exports=F},4191:(se,a,T)=>{"use strict";var y=T(3395);se.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:y}},5326:(se,a,T)=>{"use strict";var y=T(9169),I=T(4191);se.exports=function(){var h=I();return y(Number,{isNaN:h},{isNaN:function(){return Number.isNaN!==h}}),h}},2300:se=>{"use strict";var a=function(T){return T!=T};se.exports=function(y,I){return 0===y&&0===I?1/y==1/I:!!(y===I||a(y)&&a(I))}},5726:(se,a,T)=>{"use strict";var y=T(9169),I=T(2344),O=T(2300),h=T(8930),x=T(5108),F=I(h(),Object);y(F,{getPolyfill:h,implementation:O,shim:x}),se.exports=F},8930:(se,a,T)=>{"use strict";var y=T(2300);se.exports=function(){return"function"==typeof Object.is?Object.is:y}},5108:(se,a,T)=>{"use strict";var y=T(8930),I=T(9169);se.exports=function(){var h=y();return I(Object,{is:h},{is:function(){return Object.is!==h}}),h}},6168:(se,a,T)=>{"use strict";var y;if(!Object.keys){var I=Object.prototype.hasOwnProperty,O=Object.prototype.toString,h=T(2691),x=Object.prototype.propertyIsEnumerable,F=!x.call({toString:null},"toString"),j=x.call(function(){},"prototype"),le=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],U=function(N){var M=N.constructor;return M&&M.prototype===N},W={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},V=function(){if(typeof window>"u")return!1;for(var N in window)try{if(!W["$"+N]&&I.call(window,N)&&null!==window[N]&&"object"==typeof window[N])try{U(window[N])}catch{return!0}}catch{return!0}return!1}();y=function(M){var B=null!==M&&"object"==typeof M,Y="[object Function]"===O.call(M),ve=h(M),ne=B&&"[object String]"===O.call(M),oe=[];if(!B&&!Y&&!ve)throw new TypeError("Object.keys called on a non-object");var Ae=j&&Y;if(ne&&M.length>0&&!I.call(M,0))for(var pe=0;pe<M.length;++pe)oe.push(String(pe));if(ve&&M.length>0)for(var u=0;u<M.length;++u)oe.push(String(u));else for(var d in M)(!Ae||"prototype"!==d)&&I.call(M,d)&&oe.push(String(d));if(F)for(var Z=function(N){if(typeof window>"u"||!V)return U(N);try{return U(N)}catch{return!1}}(M),R=0;R<le.length;++R)(!Z||"constructor"!==le[R])&&I.call(M,le[R])&&oe.push(le[R]);return oe}}se.exports=y},8867:(se,a,T)=>{"use strict";var y=Array.prototype.slice,I=T(2691),O=Object.keys,h=O?function(j){return O(j)}:T(6168),x=Object.keys;h.shim=function(){if(Object.keys){var j=function(){var le=Object.keys(arguments);return le&&le.length===arguments.length}(1,2);j||(Object.keys=function(U){return I(U)?x(y.call(U)):x(U)})}else Object.keys=h;return Object.keys||h},se.exports=h},2691:se=>{"use strict";var a=Object.prototype.toString;se.exports=function(y){var I=a.call(y),O="[object Arguments]"===I;return O||(O="[object Array]"!==I&&null!==y&&"object"==typeof y&&"number"==typeof y.length&&y.length>=0&&"[object Function]"===a.call(y.callee)),O}},7620:(se,a,T)=>{"use strict";var y=T(8867),I=T(294)(),O=T(4082),h=Object,x=O("Array.prototype.push"),F=O("Object.prototype.propertyIsEnumerable"),j=I?Object.getOwnPropertySymbols:null;se.exports=function(U,W){if(null==U)throw new TypeError("target must be an object");var V=h(U);if(1===arguments.length)return V;for(var ie=1;ie<arguments.length;++ie){var N=h(arguments[ie]),M=y(N),B=I&&(Object.getOwnPropertySymbols||j);if(B)for(var Y=B(N),ve=0;ve<Y.length;++ve){var ne=Y[ve];F(N,ne)&&x(M,ne)}for(var oe=0;oe<M.length;++oe){var Ae=M[oe];F(N,Ae)&&(V[Ae]=N[Ae])}}return V}},8531:(se,a,T)=>{"use strict";var y=T(7620);se.exports=function(){return!Object.assign||function(){if(!Object.assign)return!1;for(var h="abcdefghijklmnopqrst",x=h.split(""),F={},j=0;j<x.length;++j)F[x[j]]=x[j];var le=Object.assign({},F),U="";for(var W in le)U+=W;return h!==U}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var h=Object.preventExtensions({1:2});try{Object.assign(h,"xy")}catch{return"y"===h[1]}return!1}()?y:Object.assign}},5743:(se,a,T)=>{se.exports=O;var y=T(991).EventEmitter;function O(){y.call(this)}T(9117)(O,y),O.Readable=T(3679),O.Writable=T(6246),O.Duplex=T(6615),O.Transform=T(6085),O.PassThrough=T(7881),O.finished=T(7297),O.pipeline=T(792),O.Stream=O,O.prototype.pipe=function(h,x){var F=this;function j(M){h.writable&&!1===h.write(M)&&F.pause&&F.pause()}function le(){F.readable&&F.resume&&F.resume()}F.on("data",j),h.on("drain",le),!h._isStdio&&(!x||!1!==x.end)&&(F.on("end",W),F.on("close",V));var U=!1;function W(){U||(U=!0,h.end())}function V(){U||(U=!0,"function"==typeof h.destroy&&h.destroy())}function ie(M){if(N(),0===y.listenerCount(this,"error"))throw M}function N(){F.removeListener("data",j),h.removeListener("drain",le),F.removeListener("end",W),F.removeListener("close",V),F.removeListener("error",ie),h.removeListener("error",ie),F.removeListener("end",N),F.removeListener("close",N),h.removeListener("close",N)}return F.on("error",ie),h.on("error",ie),F.on("end",N),F.on("close",N),h.on("close",N),h.emit("pipe",F),h}}}]); \ No newline at end of file diff --git a/394.8a12a10ca8a809c9.js b/394.8a12a10ca8a809c9.js new file mode 100644 index 000000000..f66c44edb --- /dev/null +++ b/394.8a12a10ca8a809c9.js @@ -0,0 +1 @@ +(self.webpackChunkdemo_maps=self.webpackChunkdemo_maps||[]).push([[394],{268:(Ei,ai)=>{var Zn,Jt,mt,c,ue,E,ae,pn,we,xt,un;Jt={defaultNoDataValue:-34027999387901484e22,decode:function(be,Le){var De=E(be,(Le=Le||{}).inputOffset||0,Le.encodedMaskData||null===Le.encodedMaskData),Be=null!==Le.noDataValue?Le.noDataValue:Jt.defaultNoDataValue,Me=mt(De,Le.pixelType||Float32Array,Le.encodedMaskData,Be,Le.returnMask),g={width:De.width,height:De.height,pixelData:Me.resultPixels,minValue:Me.minValue,maxValue:De.pixels.maxValue,noDataValue:Be};return Me.resultMask&&(g.maskData=Me.resultMask),Le.returnEncodedMask&&De.mask&&(g.encodedMaskData=De.mask.bitset?De.mask.bitset:null),Le.returnFileInfo&&(g.fileInfo=c(De),Le.computeUsedBitDepths&&(g.fileInfo.bitDepths=ue(De))),g}},mt=function(be,Le,A,De,Be){var ht,rt,An,Me=0,g=be.pixels.numBlocksX,it=be.pixels.numBlocksY,ze=Math.floor(be.width/g),Ve=Math.floor(be.height/it),ke=2*be.maxZError,Ze=Number.MAX_VALUE;A=A||(be.mask?be.mask.bitset:null),rt=new Le(be.width*be.height),Be&&A&&(An=new Uint8Array(be.width*be.height));for(var Xt,tt,T=new Float32Array(ze*Ve),Kt=0;Kt<=it;Kt++){var Et=Kt!==it?Ve:be.height%it;if(0!==Et)for(var H=0;H<=g;H++){var J=H!==g?ze:be.width%g;if(0!==J){var Ne,He,Nt,hn,le=Kt*be.width*Ve+H*ze,xe=be.width-J,ge=be.pixels.blocks[Me];if(ge.encoding<2?(0===ge.encoding?Ne=ge.rawData:(ae(ge.stuffedData,ge.bitsPerPixel,ge.numValidPixels,ge.offset,ke,T,be.pixels.maxValue),Ne=T),He=0):Nt=2===ge.encoding?0:ge.offset,A)for(tt=0;tt<Et;tt++){for(7&le&&(hn=A[le>>3],hn<<=7&le),Xt=0;Xt<J;Xt++)7&le||(hn=A[le>>3]),128&hn?(An&&(An[le]=1),Ze=Ze>(ht=ge.encoding<2?Ne[He++]:Nt)?ht:Ze,rt[le++]=ht):(An&&(An[le]=0),rt[le++]=De),hn<<=1;le+=xe}else if(ge.encoding<2)for(tt=0;tt<Et;tt++){for(Xt=0;Xt<J;Xt++)Ze=Ze>(ht=Ne[He++])?ht:Ze,rt[le++]=ht;le+=xe}else for(Ze=Ze>Nt?Nt:Ze,tt=0;tt<Et;tt++){for(Xt=0;Xt<J;Xt++)rt[le++]=Nt;le+=xe}if(1===ge.encoding&&He!==ge.numValidPixels)throw"Block and Mask do not match";Me++}}}return{resultPixels:rt,resultMask:An,minValue:Ze}},c=function(be){return{fileIdentifierString:be.fileIdentifierString,fileVersion:be.fileVersion,imageType:be.imageType,height:be.height,width:be.width,maxZError:be.maxZError,eofOffset:be.eofOffset,mask:be.mask?{numBlocksX:be.mask.numBlocksX,numBlocksY:be.mask.numBlocksY,numBytes:be.mask.numBytes,maxValue:be.mask.maxValue}:null,pixels:{numBlocksX:be.pixels.numBlocksX,numBlocksY:be.pixels.numBlocksY,numBytes:be.pixels.numBytes,maxValue:be.pixels.maxValue,noDataValue:be.noDataValue}}},ue=function(be){for(var Le=be.pixels.numBlocksX*be.pixels.numBlocksY,A={},De=0;De<Le;De++){var Be=be.pixels.blocks[De];0===Be.encoding?A.float32=!0:1===Be.encoding?A[Be.bitsPerPixel]=!0:A[0]=!0}return Object.keys(A)},E=function(be,Le,A){var De={},Be=new Uint8Array(be,Le,10);if(De.fileIdentifierString=String.fromCharCode.apply(null,Be),"CntZImage"!==De.fileIdentifierString.trim())throw"Unexpected file identifier string: "+De.fileIdentifierString;Le+=10;var Me=new DataView(be,Le,24);if(De.fileVersion=Me.getInt32(0,!0),De.imageType=Me.getInt32(4,!0),De.height=Me.getUint32(8,!0),De.width=Me.getUint32(12,!0),De.maxZError=Me.getFloat64(16,!0),Le+=24,!A)if(Me=new DataView(be,Le,16),De.mask={},De.mask.numBlocksY=Me.getUint32(0,!0),De.mask.numBlocksX=Me.getUint32(4,!0),De.mask.numBytes=Me.getUint32(8,!0),De.mask.maxValue=Me.getFloat32(12,!0),Le+=16,De.mask.numBytes>0){var g=new Uint8Array(Math.ceil(De.width*De.height/8)),it=(Me=new DataView(be,Le,De.mask.numBytes)).getInt16(0,!0),ze=2,Ve=0;do{if(it>0)for(;it--;)g[Ve++]=Me.getUint8(ze++);else{var ke=Me.getUint8(ze++);for(it=-it;it--;)g[Ve++]=ke}it=Me.getInt16(ze,!0),ze+=2}while(ze<De.mask.numBytes);if(-32768!==it||Ve<g.length)throw"Unexpected end of mask RLE encoding";De.mask.bitset=g,Le+=De.mask.numBytes}else De.mask.numBytes|De.mask.numBlocksY|De.mask.maxValue||(De.mask.bitset=new Uint8Array(Math.ceil(De.width*De.height/8)));Me=new DataView(be,Le,16),De.pixels={},De.pixels.numBlocksY=Me.getUint32(0,!0),De.pixels.numBlocksX=Me.getUint32(4,!0),De.pixels.numBytes=Me.getUint32(8,!0),De.pixels.maxValue=Me.getFloat32(12,!0),Le+=16;var Ze=De.pixels.numBlocksX,ht=De.pixels.numBlocksY,rt=Ze+(De.width%Ze>0?1:0),An=ht+(De.height%ht>0?1:0);De.pixels.blocks=new Array(rt*An);for(var T=0,Xt=0;Xt<An;Xt++)for(var tt=0;tt<rt;tt++){var Kt=0;Me=new DataView(be,Le,Math.min(10,be.byteLength-Le));var H={};De.pixels.blocks[T++]=H;var J=Me.getUint8(0);if(Kt++,H.encoding=63&J,H.encoding>3)throw"Invalid block encoding ("+H.encoding+")";if(2!==H.encoding){if(0!==J&&2!==J){if(H.offsetType=J>>=6,2===J)H.offset=Me.getInt8(1),Kt++;else if(1===J)H.offset=Me.getInt16(1,!0),Kt+=2;else{if(0!==J)throw"Invalid block offset type";H.offset=Me.getFloat32(1,!0),Kt+=4}if(1===H.encoding)if(J=Me.getUint8(Kt),Kt++,H.bitsPerPixel=63&J,H.numValidPixelsType=J>>=6,2===J)H.numValidPixels=Me.getUint8(Kt),Kt++;else if(1===J)H.numValidPixels=Me.getUint16(Kt,!0),Kt+=2;else{if(0!==J)throw"Invalid valid pixel count type";H.numValidPixels=Me.getUint32(Kt,!0),Kt+=4}}var le;if(Le+=Kt,3!==H.encoding)if(0===H.encoding){var ge=(De.pixels.numBytes-1)/4;if(ge!==Math.floor(ge))throw"uncompressed block has invalid length";le=new ArrayBuffer(4*ge),new Uint8Array(le).set(new Uint8Array(be,Le,4*ge));var Ne=new Float32Array(le);H.rawData=Ne,Le+=4*ge}else if(1===H.encoding){var He=Math.ceil(H.numValidPixels*H.bitsPerPixel/8),Nt=Math.ceil(He/4);le=new ArrayBuffer(4*Nt),new Uint8Array(le).set(new Uint8Array(be,Le,He)),H.stuffedData=new Uint32Array(le),Le+=He}}else Le++}return De.eofOffset=Le,De},ae=function(be,Le,A,De,Be,Me,g){var Ve,Ze,ht,it=(1<<Le)-1,ze=0,ke=0,rt=Math.ceil((g-De)/Be),An=4*be.length-Math.ceil(Le*A/8);for(be[be.length-1]<<=8*An,Ve=0;Ve<A;Ve++){if(0===ke&&(ht=be[ze++],ke=32),ke>=Le)Ze=ht>>>ke-Le&it,ke-=Le;else{var T=Le-ke;Ze=(ht&it)<<T&it,Ze+=(ht=be[ze++])>>>(ke=32-T)}Me[Ve]=Ze<rt?De+Ze*Be:g}return Me},pn=Jt,we=function(){"use strict";var Jt_unstuff=function(E,ae,be,Le,A,De,Be,Me){var ze,ke,Ze,ht,rt,g=(1<<be)-1,it=0,Ve=0,An=4*E.length-Math.ceil(be*Le/8);if(E[E.length-1]<<=8*An,A)for(ze=0;ze<Le;ze++)0===Ve&&(Ze=E[it++],Ve=32),Ve>=be?(ke=Ze>>>Ve-be&g,Ve-=be):(ke=(Ze&g)<<(ht=be-Ve)&g,ke+=(Ze=E[it++])>>>(Ve=32-ht)),ae[ze]=A[ke];else for(rt=Math.ceil((Me-De)/Be),ze=0;ze<Le;ze++)0===Ve&&(Ze=E[it++],Ve=32),Ve>=be?(ke=Ze>>>Ve-be&g,Ve-=be):(ke=(Ze&g)<<(ht=be-Ve)&g,ke+=(Ze=E[it++])>>>(Ve=32-ht)),ae[ze]=ke<rt?De+ke*Be:Me},Jt_unstuff2=function(E,ae,be,Le,A,De,Be,Me){var ze,Ze,ht,rt,g=(1<<be)-1,it=0,Ve=0,ke=0;if(A)for(ze=0;ze<Le;ze++)0===Ve&&(ht=E[it++],Ve=32,ke=0),Ve>=be?(Ze=ht>>>ke&g,Ve-=be,ke+=be):(Ze=ht>>>ke&g,Ve=32-(rt=be-Ve),Ze|=((ht=E[it++])&(1<<rt)-1)<<be-rt,ke=rt),ae[ze]=A[Ze];else{var An=Math.ceil((Me-De)/Be);for(ze=0;ze<Le;ze++)0===Ve&&(ht=E[it++],Ve=32,ke=0),Ve>=be?(Ze=ht>>>ke&g,Ve-=be,ke+=be):(Ze=ht>>>ke&g,Ve=32-(rt=be-Ve),Ze|=((ht=E[it++])&(1<<rt)-1)<<be-rt,ke=rt),ae[ze]=Ze<An?De+Ze*Be:Me}return ae},mt={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(E){for(var ae=65535,be=65535,Le=E.length,A=Math.floor(Le/2),De=0;A;){var Be=A>=359?359:A;A-=Be;do{ae+=E[De++]<<8,be+=ae+=E[De++]}while(--Be);ae=(65535&ae)+(ae>>>16),be=(65535&be)+(be>>>16)}return 1&Le&&(be+=ae+=E[De]<<8),((be=(65535&be)+(be>>>16))<<16|(ae=(65535&ae)+(ae>>>16)))>>>0},readHeaderInfo:function(E,ae){var be=ae.ptr,Le=new Uint8Array(E,be,6),A={};if(A.fileIdentifierString=String.fromCharCode.apply(null,Le),0!==A.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+A.fileIdentifierString;be+=6;var De=new DataView(E,be,8),Be=De.getInt32(0,!0);if(A.fileVersion=Be,be+=4,Be>=3&&(A.checksum=De.getUint32(4,!0),be+=4),De=new DataView(E,be,12),A.height=De.getUint32(0,!0),A.width=De.getUint32(4,!0),be+=8,Be>=4?(A.numDims=De.getUint32(8,!0),be+=4):A.numDims=1,De=new DataView(E,be,40),A.numValidPixel=De.getUint32(0,!0),A.microBlockSize=De.getInt32(4,!0),A.blobSize=De.getInt32(8,!0),A.imageType=De.getInt32(12,!0),A.maxZError=De.getFloat64(16,!0),A.zMin=De.getFloat64(24,!0),A.zMax=De.getFloat64(32,!0),be+=40,ae.headerInfo=A,ae.ptr=be,Be>=3&&this.computeChecksumFletcher32(new Uint8Array(E,be-(Be>=4?52:48),A.blobSize-14))!==A.checksum)throw"Checksum failed.";return!0},checkMinMaxRanges:function(E,ae){var be=ae.headerInfo,Le=this.getDataTypeArray(be.imageType),A=be.numDims*this.getDataTypeSize(be.imageType),De=this.readSubArray(E,ae.ptr,Le,A),Be=this.readSubArray(E,ae.ptr+A,Le,A);ae.ptr+=2*A;var Me,g=!0;for(Me=0;Me<be.numDims;Me++)if(De[Me]!==Be[Me]){g=!1;break}return be.minValues=De,be.maxValues=Be,g},readSubArray:function(E,ae,be,Le){var A;if(be===Uint8Array)A=new Uint8Array(E,ae,Le);else{var De=new ArrayBuffer(Le);new Uint8Array(De).set(new Uint8Array(E,ae,Le)),A=new be(De)}return A},readMask:function(E,ae){var g,it,be=ae.ptr,Le=ae.headerInfo,A=Le.width*Le.height,De=Le.numValidPixel,Be=new DataView(E,be,4),Me={};if(Me.numBytes=Be.getUint32(0,!0),be+=4,(0===De||A===De)&&0!==Me.numBytes)throw"invalid mask";if(0===De)g=new Uint8Array(Math.ceil(A/8)),Me.bitset=g,it=new Uint8Array(A),ae.pixels.resultMask=it,be+=Me.numBytes;else if(Me.numBytes>0){g=new Uint8Array(Math.ceil(A/8));var ze=(Be=new DataView(E,be,Me.numBytes)).getInt16(0,!0),Ve=2,ke=0,Ze=0;do{if(ze>0)for(;ze--;)g[ke++]=Be.getUint8(Ve++);else for(Ze=Be.getUint8(Ve++),ze=-ze;ze--;)g[ke++]=Ze;ze=Be.getInt16(Ve,!0),Ve+=2}while(Ve<Me.numBytes);if(-32768!==ze||ke<g.length)throw"Unexpected end of mask RLE encoding";it=new Uint8Array(A);var ht=0,rt=0;for(rt=0;rt<A;rt++)7&rt?(ht=g[rt>>3],ht<<=7&rt):ht=g[rt>>3],128&ht&&(it[rt]=1);ae.pixels.resultMask=it,Me.bitset=g,be+=Me.numBytes}return ae.ptr=be,ae.mask=Me,!0},readDataOneSweep:function(E,ae,be){var it,Le=ae.ptr,A=ae.headerInfo,De=A.numDims,Be=A.width*A.height,g=A.numValidPixel*mt.getDataTypeSize(A.imageType)*De,ze=ae.pixels.resultMask;if(be===Uint8Array)it=new Uint8Array(E,Le,g);else{var Ve=new ArrayBuffer(g);new Uint8Array(Ve).set(new Uint8Array(E,Le,g)),it=new be(Ve)}if(it.length===Be*De)ae.pixels.resultPixels=it;else{ae.pixels.resultPixels=new be(Be*De);var Ze=0,ht=0,rt=0,An=0;if(De>1)for(rt=0;rt<De;rt++)for(An=rt*Be,ht=0;ht<Be;ht++)ze[ht]&&(ae.pixels.resultPixels[An+ht]=it[Ze++]);else for(ht=0;ht<Be;ht++)ze[ht]&&(ae.pixels.resultPixels[ht]=it[Ze++])}return ae.ptr=Le+=g,!0},readHuffmanTree:function(E,ae){var be=this.HUFFMAN_LUT_BITS_MAX,Le=new DataView(E,ae.ptr,16);if(ae.ptr+=16,Le.getInt32(0,!0)<2)throw"unsupported Huffman version";var De=Le.getInt32(4,!0),Be=Le.getInt32(8,!0),Me=Le.getInt32(12,!0);if(Be>=Me)return!1;var g=new Uint32Array(Me-Be);mt.decodeBits(E,ae,g);var ze,Ve,ke,Ze,it=[];for(ze=Be;ze<Me;ze++)it[Ve=ze-(ze<De?0:De)]={first:g[ze-Be],second:null};var ht=E.byteLength-ae.ptr,rt=Math.ceil(ht/4),An=new ArrayBuffer(4*rt);new Uint8Array(An).set(new Uint8Array(E,ae.ptr,ht));var Kt,Xt=new Uint32Array(An),tt=0,Et=0;for(Kt=Xt[0],ze=Be;ze<Me;ze++)(Ze=it[Ve=ze-(ze<De?0:De)].first)>0&&(it[Ve].second=Kt<<tt>>>32-Ze,32-tt>=Ze?32===(tt+=Ze)&&(tt=0,Kt=Xt[++Et]):(Et++,it[Ve].second|=(Kt=Xt[Et])>>>32-(tt+=Ze-32)));var J,H=0,le=new c;for(ze=0;ze<it.length;ze++)void 0!==it[ze]&&(H=Math.max(H,it[ze].first));J=H>=be?be:H,H>=30&&console.log("WARning, large NUM LUT BITS IS "+H);var ge,Ne,He,Nt,Gn,xe=[];for(ze=Be;ze<Me;ze++)if((Ze=it[Ve=ze-(ze<De?0:De)].first)>0)if(ge=[Ze,Ve],Ze<=J)for(Ne=it[Ve].second<<J-Ze,He=1<<J-Ze,ke=0;ke<He;ke++)xe[Ne|ke]=ge;else for(Ne=it[Ve].second,Gn=le,Nt=Ze-1;Nt>=0;Nt--)Ne>>>Nt&1?(Gn.right||(Gn.right=new c),Gn=Gn.right):(Gn.left||(Gn.left=new c),Gn=Gn.left),0===Nt&&!Gn.val&&(Gn.val=ge[1]);return{decodeLut:xe,numBitsLUTQick:J,numBitsLUT:H,tree:le,stuffedData:Xt,srcPtr:Et,bitPos:tt}},readHuffman:function(E,ae,be){var T,Xt,tt,Et,H,le,xe,ge,Ne,Le=ae.headerInfo,A=Le.numDims,De=ae.headerInfo.height,Be=ae.headerInfo.width,Me=Be*De,g=this.readHuffmanTree(E,ae),it=g.decodeLut,ze=g.tree,Ve=g.stuffedData,ke=g.srcPtr,Ze=g.bitPos,ht=g.numBitsLUTQick,rt=g.numBitsLUT,An=0===ae.headerInfo.imageType?128:0,Kt=ae.pixels.resultMask,He=0;Ze>0&&(ke++,Ze=0);var $i,Nt=Ve[ke],hn=1===ae.encodeMode,Gn=new be(Me*A),pi=Gn;for($i=0;$i<Le.numDims;$i++){if(A>1&&(pi=new be(Gn.buffer,Me*$i,Me),He=0),ae.headerInfo.numValidPixel===Be*De)for(ge=0,le=0;le<De;le++)for(xe=0;xe<Be;xe++,ge++){if(Xt=0,H=Et=Nt<<Ze>>>32-ht,32-Ze<ht&&(H=Et|=Ve[ke+1]>>>64-Ze-ht),it[H])Xt=it[H][1],Ze+=it[H][0];else for(H=Et=Nt<<Ze>>>32-rt,32-Ze<rt&&(H=Et|=Ve[ke+1]>>>64-Ze-rt),T=ze,Ne=0;Ne<rt;Ne++)if(!(T=Et>>>rt-Ne-1&1?T.right:T.left).left&&!T.right){Xt=T.val,Ze=Ze+Ne+1;break}Ze>=32&&(Ze-=32,Nt=Ve[++ke]),tt=Xt-An,hn?(tt+=xe>0?He:le>0?pi[ge-Be]:He,pi[ge]=tt&=255,He=tt):pi[ge]=tt}else for(ge=0,le=0;le<De;le++)for(xe=0;xe<Be;xe++,ge++)if(Kt[ge]){if(Xt=0,H=Et=Nt<<Ze>>>32-ht,32-Ze<ht&&(H=Et|=Ve[ke+1]>>>64-Ze-ht),it[H])Xt=it[H][1],Ze+=it[H][0];else for(H=Et=Nt<<Ze>>>32-rt,32-Ze<rt&&(H=Et|=Ve[ke+1]>>>64-Ze-rt),T=ze,Ne=0;Ne<rt;Ne++)if(!(T=Et>>>rt-Ne-1&1?T.right:T.left).left&&!T.right){Xt=T.val,Ze=Ze+Ne+1;break}Ze>=32&&(Ze-=32,Nt=Ve[++ke]),tt=Xt-An,hn?(tt+=xe>0&&Kt[ge-1]?He:le>0&&Kt[ge-Be]?pi[ge-Be]:He,pi[ge]=tt&=255,He=tt):pi[ge]=tt}ae.ptr=ae.ptr+4*(ke+1)+(Ze>0?4:0)}ae.pixels.resultPixels=Gn},decodeBits:function(E,ae,be,Le,A){var De=ae.headerInfo,Be=De.fileVersion,Me=0,g=new DataView(E,ae.ptr,5),it=g.getUint8(0);Me++;var ze=it>>6,Ve=0===ze?4:3-ze,ke=(32&it)>0,Ze=31&it,ht=0;if(1===Ve)ht=g.getUint8(Me),Me++;else if(2===Ve)ht=g.getUint16(Me,!0),Me+=2;else{if(4!==Ve)throw"Invalid valid pixel count type";ht=g.getUint32(Me,!0),Me+=4}var An,T,Xt,tt,Kt,Et,H,J,xe,rt=2*De.maxZError,ge=De.numDims>1?De.maxValues[A]:De.zMax;if(ke){for(ae.counter.lut++,J=g.getUint8(Me),Me++,tt=Math.ceil((J-1)*Ze/8),Kt=Math.ceil(tt/4),T=new ArrayBuffer(4*Kt),Xt=new Uint8Array(T),ae.ptr+=Me,Xt.set(new Uint8Array(E,ae.ptr,tt)),H=new Uint32Array(T),ae.ptr+=tt,xe=0;J-1>>>xe;)xe++;tt=Math.ceil(ht*xe/8),Kt=Math.ceil(tt/4),T=new ArrayBuffer(4*Kt),(Xt=new Uint8Array(T)).set(new Uint8Array(E,ae.ptr,tt)),An=new Uint32Array(T),ae.ptr+=tt,Et=Be>=3?function(E,ae,be,Le,A,De){var Ze,Be=(1<<ae)-1,Me=0,g=0,it=0,ze=0,Ve=0,ke=0,ht=[],rt=Math.ceil((De-Le)/A);for(g=0;g<be;g++)0===ze&&(Ze=E[Me++],ze=32,ke=0),ze>=ae?(Ve=Ze>>>ke&Be,ze-=ae,ke+=ae):(Ve=Ze>>>ke&Be,ze=32-(it=ae-ze),Ve|=((Ze=E[Me++])&(1<<it)-1)<<ae-it,ke=it),ht[g]=Ve<rt?Le+Ve*A:De;return ht.unshift(Le),ht}(H,Ze,J-1,Le,rt,ge):function(E,ae,be,Le,A,De){var ke,Be=(1<<ae)-1,Me=0,g=0,it=0,ze=0,Ve=0,Ze=[],ht=4*E.length-Math.ceil(ae*be/8);E[E.length-1]<<=8*ht;var rt=Math.ceil((De-Le)/A);for(g=0;g<be;g++)0===ze&&(ke=E[Me++],ze=32),ze>=ae?(Ve=ke>>>ze-ae&Be,ze-=ae):(Ve=(ke&Be)<<(it=ae-ze)&Be,Ve+=(ke=E[Me++])>>>(ze=32-it)),Ze[g]=Ve<rt?Le+Ve*A:De;return Ze.unshift(Le),Ze}(H,Ze,J-1,Le,rt,ge),Be>=3?Jt_unstuff2(An,be,xe,ht,Et):Jt_unstuff(An,be,xe,ht,Et)}else ae.counter.bitstuffer++,xe=Ze,ae.ptr+=Me,xe>0&&(tt=Math.ceil(ht*xe/8),Kt=Math.ceil(tt/4),T=new ArrayBuffer(4*Kt),(Xt=new Uint8Array(T)).set(new Uint8Array(E,ae.ptr,tt)),An=new Uint32Array(T),ae.ptr+=tt,Be>=3?null==Le?function(E,ae,be,Le){var Be,it,ze,Ve,A=(1<<be)-1,De=0,Me=0,g=0;for(Be=0;Be<Le;Be++)0===Me&&(ze=E[De++],Me=32,g=0),Me>=be?(it=ze>>>g&A,Me-=be,g+=be):(it=ze>>>g&A,Me=32-(Ve=be-Me),it|=((ze=E[De++])&(1<<Ve)-1)<<be-Ve,g=Ve),ae[Be]=it}(An,be,xe,ht):Jt_unstuff2(An,be,xe,ht,!1,Le,rt,ge):null==Le?function(E,ae,be,Le){var Be,g,it,ze,A=(1<<be)-1,De=0,Me=0,Ve=4*E.length-Math.ceil(be*Le/8);for(E[E.length-1]<<=8*Ve,Be=0;Be<Le;Be++)0===Me&&(it=E[De++],Me=32),Me>=be?(g=it>>>Me-be&A,Me-=be):(g=(it&A)<<(ze=be-Me)&A,g+=(it=E[De++])>>>(Me=32-ze)),ae[Be]=g}(An,be,xe,ht):Jt_unstuff(An,be,xe,ht,!1,Le,rt,ge))},readTiles:function(E,ae,be){var Le=ae.headerInfo,A=Le.width,De=Le.height,Be=Le.microBlockSize,Me=Le.imageType,g=mt.getDataTypeSize(Me),it=Math.ceil(A/Be),ze=Math.ceil(De/Be);ae.pixels.numBlocksY=ze,ae.pixels.numBlocksX=it,ae.pixels.ptr=0;var Ne,He,Nt,Gn,pi,Br,Eo,gt,Ve=0,ke=0,Ze=0,ht=0,rt=0,An=0,Xt=0,tt=0,Et=0,H=0,J=0,le=0,xe=0,ge=0,$i=new be(Be*Be),Qi=De%Be||Be,pr=A%Be||Be,Ri=Le.numDims,jn=ae.pixels.resultMask,re=ae.pixels.resultPixels;for(Ze=0;Ze<ze;Ze++)for(rt=Ze!==ze-1?Be:Qi,ht=0;ht<it;ht++)for(Et=Ze*A*Be+ht*Be,H=A-(An=ht!==it-1?Be:pr),gt=0;gt<Ri;gt++){if(Ri>1&&(re=new be(ae.pixels.resultPixels.buffer,A*De*gt*g,A*De)),He={},ge=0,ge++,tt=(Xt=(Ne=new DataView(E,ae.ptr,Math.min(10,E.byteLength-ae.ptr))).getUint8(0))>>6&255,(Xt>>2&15)!=(ht*Be>>3&15))throw"integrity issue";if((pi=3&Xt)>3)throw ae.ptr+=ge,"Invalid block encoding ("+pi+")";if(2!==pi)if(0===pi){if(ae.counter.uncompressed++,ae.ptr+=ge,J=(J=rt*An*g)<(le=E.byteLength-ae.ptr)?J:le,Nt=new ArrayBuffer(J%g==0?J:J+g-J%g),new Uint8Array(Nt).set(new Uint8Array(E,ae.ptr,J)),Gn=new be(Nt),xe=0,jn)for(Ve=0;Ve<rt;Ve++){for(ke=0;ke<An;ke++)jn[Et]&&(re[Et]=Gn[xe++]),Et++;Et+=H}else for(Ve=0;Ve<rt;Ve++){for(ke=0;ke<An;ke++)re[Et++]=Gn[xe++];Et+=H}ae.ptr+=xe*g}else if(Br=mt.getDataTypeUsed(Me,tt),Eo=mt.getOnePixel(He,ge,Br,Ne),ge+=mt.getDataTypeSize(Br),3===pi)if(ae.ptr+=ge,ae.counter.constantoffset++,jn)for(Ve=0;Ve<rt;Ve++){for(ke=0;ke<An;ke++)jn[Et]&&(re[Et]=Eo),Et++;Et+=H}else for(Ve=0;Ve<rt;Ve++){for(ke=0;ke<An;ke++)re[Et++]=Eo;Et+=H}else if(ae.ptr+=ge,mt.decodeBits(E,ae,$i,Eo,gt),ge=0,jn)for(Ve=0;Ve<rt;Ve++){for(ke=0;ke<An;ke++)jn[Et]&&(re[Et]=$i[ge++]),Et++;Et+=H}else for(Ve=0;Ve<rt;Ve++){for(ke=0;ke<An;ke++)re[Et++]=$i[ge++];Et+=H}else ae.counter.constant++,ae.ptr+=ge}},formatFileInfo:function(E){return{fileIdentifierString:E.headerInfo.fileIdentifierString,fileVersion:E.headerInfo.fileVersion,imageType:E.headerInfo.imageType,height:E.headerInfo.height,width:E.headerInfo.width,numValidPixel:E.headerInfo.numValidPixel,microBlockSize:E.headerInfo.microBlockSize,blobSize:E.headerInfo.blobSize,maxZError:E.headerInfo.maxZError,pixelType:mt.getPixelType(E.headerInfo.imageType),eofOffset:E.eofOffset,mask:E.mask?{numBytes:E.mask.numBytes}:null,pixels:{numBlocksX:E.pixels.numBlocksX,numBlocksY:E.pixels.numBlocksY,maxValue:E.headerInfo.zMax,minValue:E.headerInfo.zMin,noDataValue:E.noDataValue}}},constructConstantSurface:function(E){var ae=E.headerInfo.zMax,be=E.headerInfo.numDims,Le=E.headerInfo.height*E.headerInfo.width,A=Le*be,De=0,Be=0,Me=0,g=E.pixels.resultMask;if(g)if(be>1)for(De=0;De<be;De++)for(Me=De*Le,Be=0;Be<Le;Be++)g[Be]&&(E.pixels.resultPixels[Me+Be]=ae);else for(Be=0;Be<Le;Be++)g[Be]&&(E.pixels.resultPixels[Be]=ae);else if(E.pixels.resultPixels.fill)E.pixels.resultPixels.fill(ae);else for(Be=0;Be<A;Be++)E.pixels.resultPixels[Be]=ae},getDataTypeArray:function(E){var ae;switch(E){case 0:ae=Int8Array;break;case 1:ae=Uint8Array;break;case 2:ae=Int16Array;break;case 3:ae=Uint16Array;break;case 4:ae=Int32Array;break;case 5:ae=Uint32Array;break;case 6:default:ae=Float32Array;break;case 7:ae=Float64Array}return ae},getPixelType:function(E){var ae;switch(E){case 0:ae="S8";break;case 1:ae="U8";break;case 2:ae="S16";break;case 3:ae="U16";break;case 4:ae="S32";break;case 5:ae="U32";break;case 6:default:ae="F32";break;case 7:ae="F64"}return ae},isValidPixelValue:function(E,ae){if(null==ae)return!1;var be;switch(E){case 0:be=ae>=-128&&ae<=127;break;case 1:be=ae>=0&&ae<=255;break;case 2:be=ae>=-32768&&ae<=32767;break;case 3:be=ae>=0&&ae<=65536;break;case 4:be=ae>=-2147483648&&ae<=2147483647;break;case 5:be=ae>=0&&ae<=4294967296;break;case 6:be=ae>=-34027999387901484e22&&ae<=34027999387901484e22;break;case 7:be=ae>=5e-324&&ae<=17976931348623157e292;break;default:be=!1}return be},getDataTypeSize:function(E){var ae=0;switch(E){case 0:case 1:ae=1;break;case 2:case 3:ae=2;break;case 4:case 5:case 6:ae=4;break;case 7:ae=8;break;default:ae=E}return ae},getDataTypeUsed:function(E,ae){var be=E;switch(E){case 2:case 4:be=E-ae;break;case 3:case 5:be=E-2*ae;break;case 6:be=0===ae?E:1===ae?2:1;break;case 7:be=0===ae?E:E-2*ae+1;break;default:be=E}return be},getOnePixel:function(E,ae,be,Le){var A=0;switch(be){case 0:A=Le.getInt8(ae);break;case 1:A=Le.getUint8(ae);break;case 2:A=Le.getInt16(ae,!0);break;case 3:A=Le.getUint16(ae,!0);break;case 4:A=Le.getInt32(ae,!0);break;case 5:A=Le.getUInt32(ae,!0);break;case 6:A=Le.getFloat32(ae,!0);break;case 7:A=Le.getFloat64(ae,!0);break;default:throw"the decoder does not understand this pixel type"}return A}},c=function(E,ae,be){this.val=E,this.left=ae,this.right=be},ue={decode:function(E,ae){var be=(ae=ae||{}).noDataValue,Le=0,A={};if(A.ptr=ae.inputOffset||0,A.pixels={},mt.readHeaderInfo(E,A)){var De=A.headerInfo,Be=De.fileVersion,Me=mt.getDataTypeArray(De.imageType);mt.readMask(E,A),De.numValidPixel!==De.width*De.height&&!A.pixels.resultMask&&(A.pixels.resultMask=ae.maskData);var ke,g=De.width*De.height;if(A.pixels.resultPixels=new Me(g*De.numDims),A.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==De.numValidPixel)if(De.zMax===De.zMin)mt.constructConstantSurface(A);else if(Be>=4&&mt.checkMinMaxRanges(E,A))mt.constructConstantSurface(A);else{var it=new DataView(E,A.ptr,2),ze=it.getUint8(0);if(A.ptr++,ze)mt.readDataOneSweep(E,A,Me);else if(Be>1&&De.imageType<=1&&Math.abs(De.maxZError-.5)<1e-5){var Ve=it.getUint8(1);if(A.ptr++,A.encodeMode=Ve,Ve>2||Be<4&&Ve>1)throw"Invalid Huffman flag "+Ve;Ve?mt.readHuffman(E,A,Me):mt.readTiles(E,A,Me)}else mt.readTiles(E,A,Me)}A.eofOffset=A.ptr,ae.inputOffset?(ke=A.headerInfo.blobSize+ae.inputOffset-A.ptr,Math.abs(ke)>=1&&(A.eofOffset=ae.inputOffset+A.headerInfo.blobSize)):(ke=A.headerInfo.blobSize-A.ptr,Math.abs(ke)>=1&&(A.eofOffset=A.headerInfo.blobSize));var Ze={width:De.width,height:De.height,pixelData:A.pixels.resultPixels,minValue:De.zMin,maxValue:De.zMax,validPixelCount:De.numValidPixel,dimCount:De.numDims,dimStats:{minValues:De.minValues,maxValues:De.maxValues},maskData:A.pixels.resultMask};if(A.pixels.resultMask&&mt.isValidPixelValue(De.imageType,be)){var ht=A.pixels.resultMask;for(Le=0;Le<g;Le++)ht[Le]||(Ze.pixelData[Le]=be);Ze.noDataValue=be}return A.noDataValue=be,ae.returnFileInfo&&(Ze.fileInfo=mt.formatFileInfo(A)),Ze}},getBandCount:function(E){for(var ae=0,be=0,Le={ptr:0,pixels:{}};be<E.byteLength-58;)mt.readHeaderInfo(E,Le),ae++,Le.ptr=be+=Le.headerInfo.blobSize;return ae}};return ue}(),xt=function(){var Jt=new ArrayBuffer(4),mt=new Uint8Array(Jt);return new Uint32Array(Jt)[0]=1,1===mt[0]}(),un={decode:function(Jt,mt){if(!xt)throw"Big endian system is not supported.";var ae,be,Ve,ke,Ze,c=(mt=mt||{}).inputOffset||0,ue=new Uint8Array(Jt,c,10),E=String.fromCharCode.apply(null,ue);if("CntZImage"===E.trim())ae=pn,be=1;else{if("Lerc2"!==E.substring(0,5))throw"Unexpected file identifier string: "+E;ae=we,be=2}for(var De,Me,g,Le=0,A=Jt.byteLength-10,Be=[],it={width:0,height:0,pixels:[],pixelType:mt.pixelType,mask:null,statistics:[]};c<A;){var ze=ae.decode(Jt,{inputOffset:c,encodedMaskData:De,maskData:g,returnMask:0===Le,returnEncodedMask:0===Le,returnFileInfo:!0,pixelType:mt.pixelType||null,noDataValue:mt.noDataValue||null});c=ze.fileInfo.eofOffset,0===Le&&(De=ze.encodedMaskData,g=ze.maskData,it.width=ze.width,it.height=ze.height,it.dimCount=ze.dimCount||1,it.pixelType=ze.pixelType||ze.fileInfo.pixelType,it.mask=ze.maskData),be>1&&ze.fileInfo.mask&&ze.fileInfo.mask.numBytes>0&&Be.push(ze.maskData),Le++,it.pixels.push(ze.pixelData),it.statistics.push({minValue:ze.minValue,maxValue:ze.maxValue,noDataValue:ze.noDataValue,dimStats:ze.dimStats})}if(be>1&&Be.length>1){for(Ze=it.width*it.height,it.bandMasks=Be,(g=new Uint8Array(Ze)).set(Be[0]),Ve=1;Ve<Be.length;Ve++)for(Me=Be[Ve],ke=0;ke<Ze;ke++)g[ke]=g[ke]&Me[ke];it.maskData=g}return it}},void 0!==(Zn=function(){return un}.apply(ai,[]))&&(Ei.exports=Zn)},6646:Ei=>{"use strict";Ei.exports=function wt(we,xt){xt||(xt={});var c,ue,E,ae,be,Le,De,Me,g,un=null==xt.cutoff?.25:xt.cutoff,Jt=null==xt.radius?8:xt.radius,mt=xt.channel||0;if(ArrayBuffer.isView(we)||Array.isArray(we)){if(!xt.width||!xt.height)throw Error("For raw data width and height should be provided by options");c=xt.width,ue=xt.height,ae=we,Le=xt.stride?xt.stride:Math.floor(we.length/c/ue)}else window.HTMLCanvasElement&&we instanceof window.HTMLCanvasElement?(ae=(De=we).getContext("2d").getImageData(0,0,c=De.width,ue=De.height).data,Le=4):window.CanvasRenderingContext2D&&we instanceof window.CanvasRenderingContext2D?(ae=we.getImageData(0,0,c=(De=we.canvas).width,ue=De.height).data,Le=4):window.ImageData&&we instanceof window.ImageData&&(c=we.width,ue=we.height,ae=we.data,Le=4);if(E=Math.max(c,ue),window.Uint8ClampedArray&&ae instanceof window.Uint8ClampedArray||window.Uint8Array&&ae instanceof window.Uint8Array)for(be=ae,ae=Array(c*ue),Me=0,g=Math.floor(be.length/Le);Me<g;Me++)ae[Me]=be[Me*Le+mt]/255;else if(1!==Le)throw Error("Raw data can have only 1 value per pixel");var it=Array(c*ue),ze=Array(c*ue),Ve=Array(E),ke=Array(E),Ze=Array(E+1),ht=Array(E);for(Me=0,g=c*ue;Me<g;Me++){var rt=ae[Me];it[Me]=1===rt?0:0===rt?ai:Math.pow(Math.max(0,.5-rt),2),ze[Me]=1===rt?ai:0===rt?0:Math.pow(Math.max(0,rt-.5),2)}Zn(it,c,ue,Ve,ke,ht,Ze),Zn(ze,c,ue,Ve,ke,ht,Ze);var An=window.Float32Array?new Float32Array(c*ue):new Array(c*ue);for(Me=0,g=c*ue;Me<g;Me++)An[Me]=Math.min(Math.max(1-((it[Me]-ze[Me])/Jt+un),0),1);return An};var ai=1e20;function Zn(we,xt,un,Jt,mt,c,ue){for(var E=0;E<xt;E++){for(var ae=0;ae<un;ae++)Jt[ae]=we[ae*xt+E];for(pn(Jt,mt,c,ue,un),ae=0;ae<un;ae++)we[ae*xt+E]=mt[ae]}for(ae=0;ae<un;ae++){for(E=0;E<xt;E++)Jt[E]=we[ae*xt+E];for(pn(Jt,mt,c,ue,xt),E=0;E<xt;E++)we[ae*xt+E]=Math.sqrt(mt[E])}}function pn(we,xt,un,Jt,mt){un[0]=0,Jt[0]=-ai,Jt[1]=+ai;for(var c=1,ue=0;c<mt;c++){for(var E=(we[c]+c*c-(we[un[ue]]+un[ue]*un[ue]))/(2*c-2*un[ue]);E<=Jt[ue];)ue--,E=(we[c]+c*c-(we[un[ue]]+un[ue]*un[ue]))/(2*c-2*un[ue]);un[++ue]=c,Jt[ue]=E,Jt[ue+1]=+ai}for(c=0,ue=0;c<mt;c++){for(;Jt[ue+1]<c;)ue++;xt[c]=(c-un[ue])*(c-un[ue])+we[un[ue]]}}},7343:function(Ei){Ei.exports=function(){"use strict";const{entries:ai,setPrototypeOf:wt,isFrozen:Zn,getPrototypeOf:pn,getOwnPropertyDescriptor:we}=Object;let{freeze:xt,seal:un,create:Jt}=Object,{apply:mt,construct:c}=typeof Reflect<"u"&&Reflect;xt||(xt=function(re){return re}),un||(un=function(re){return re}),mt||(mt=function(re,mi,ji){return re.apply(mi,ji)}),c||(c=function(re,mi){return new re(...mi)});const ue=ze(Array.prototype.forEach),E=ze(Array.prototype.pop),ae=ze(Array.prototype.push),be=ze(String.prototype.toLowerCase),Le=ze(String.prototype.toString),A=ze(String.prototype.match),De=ze(String.prototype.replace),Be=ze(String.prototype.indexOf),Me=ze(String.prototype.trim),g=ze(RegExp.prototype.test),it=function Ve(jn){return function(){for(var re=arguments.length,mi=new Array(re),ji=0;ji<re;ji++)mi[ji]=arguments[ji];return c(jn,mi)}}(TypeError);function ze(jn){return function(re){for(var mi=arguments.length,ji=new Array(mi>1?mi-1:0),Ye=1;Ye<mi;Ye++)ji[Ye-1]=arguments[Ye];return mt(jn,re,ji)}}function ke(jn,re){let mi=arguments.length>2&&void 0!==arguments[2]?arguments[2]:be;wt&&wt(jn,null);let ji=re.length;for(;ji--;){let Ye=re[ji];if("string"==typeof Ye){const Li=mi(Ye);Li!==Ye&&(Zn(re)||(re[ji]=Li),Ye=Li)}jn[Ye]=!0}return jn}function Ze(jn){const re=Jt(null);for(const[mi,ji]of ai(jn))void 0!==we(jn,mi)&&(re[mi]=ji);return re}function ht(jn,re){for(;null!==jn;){const ji=we(jn,re);if(ji){if(ji.get)return ze(ji.get);if("function"==typeof ji.value)return ze(ji.value)}jn=pn(jn)}return function mi(ji){return console.warn("fallback value for",ji),null}}const rt=xt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),An=xt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),T=xt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Xt=xt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),tt=xt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Kt=xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Et=xt(["#text"]),H=xt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),J=xt(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),le=xt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xe=xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ge=un(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ne=un(/<%[\w\W]*|[\w\W]*%>/gm),He=un(/\${[\w\W]*}/gm),Nt=un(/^data-[\-\w.\u00B7-\uFFFF]/),hn=un(/^aria-[\-\w]+$/),Gn=un(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pi=un(/^(?:\w+script|data):/i),$i=un(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qi=un(/^html$/i);var pr=Object.freeze({__proto__:null,MUSTACHE_EXPR:ge,ERB_EXPR:Ne,TMPLIT_EXPR:He,DATA_ATTR:Nt,ARIA_ATTR:hn,IS_ALLOWED_URI:Gn,IS_SCRIPT_OR_DATA:pi,ATTR_WHITESPACE:$i,DOCTYPE_NAME:Qi});return function Ri(){let jn=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window;const re=Sn=>Ri(Sn);if(re.version="3.0.6",re.removed=[],!jn||!jn.document||9!==jn.document.nodeType)return re.isSupported=!1,re;let{document:mi}=jn;const ji=mi,Ye=ji.currentScript,{DocumentFragment:Li,HTMLTemplateElement:Qc,Node:_i,Element:kT,NodeFilter:Ry,NamedNodeMap:gP=jn.NamedNodeMap||jn.MozNamedAttrMap,HTMLFormElement:_z,DOMParser:It,trustedTypes:ap}=jn,yo=kT.prototype,UT=ht(yo,"cloneNode"),Is=ht(yo,"nextSibling"),Jm=ht(yo,"childNodes"),e_=ht(yo,"parentNode");if("function"==typeof Qc){const Sn=mi.createElement("template");Sn.content&&Sn.content.ownerDocument&&(mi=Sn.content.ownerDocument)}let Zs,t_="";const{implementation:Ly,createNodeIterator:n_,createDocumentFragment:Jc,getElementsByTagName:Ny}=mi,{importNode:_t}=ji;let Ya={};re.isSupported="function"==typeof ai&&"function"==typeof e_&&Ly&&void 0!==Ly.createHTMLDocument;const{MUSTACHE_EXPR:My,ERB_EXPR:O,TMPLIT_EXPR:ot,DATA_ATTR:Fy,ARIA_ATTR:XE,IS_SCRIPT_OR_DATA:By,ATTR_WHITESPACE:ky}=pr;let{IS_ALLOWED_URI:ZE}=pr,Ji=null;const Rf=ke({},[...rt,...An,...T,...tt,...Et]);let f=null;const $E=ke({},[...H,...J,...le,...xe]);let mr=Object.seal(Jt(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}})),i_=null,Uy=null,ro=!0,zT=!0,KE=!1,QE=!0,Ce=!1,kt=!1,cp=!1,zy=!1,Lf=!1,o_=!1,Vy=!1,V=!0,VT=!1,HT=!0,r_=!1,lp={},up=null;const JE=ke({},["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"]);let ew=null;const tw=ke({},["audio","video","img","source","image","track"]);let GT=null;const jT=ke({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",Dt="http://www.w3.org/2000/svg",bc="http://www.w3.org/1999/xhtml";let Nf=bc,WT=!1,s_=null;const Ds=ke({},[he,Dt,bc],Le);let Mf=null;const gz=["application/xhtml+xml","text/html"];let de=null,dp=null;const qT=mi.createElement("form"),Zr=function(Re){return Re instanceof RegExp||Re instanceof Function},YT=function(){let Re=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dp||dp!==Re){if((!Re||"object"!=typeof Re)&&(Re={}),Re=Ze(Re),Mf=Mf=-1===gz.indexOf(Re.PARSER_MEDIA_TYPE)?"text/html":Re.PARSER_MEDIA_TYPE,de="application/xhtml+xml"===Mf?Le:be,Ji="ALLOWED_TAGS"in Re?ke({},Re.ALLOWED_TAGS,de):Rf,f="ALLOWED_ATTR"in Re?ke({},Re.ALLOWED_ATTR,de):$E,s_="ALLOWED_NAMESPACES"in Re?ke({},Re.ALLOWED_NAMESPACES,Le):Ds,GT="ADD_URI_SAFE_ATTR"in Re?ke(Ze(jT),Re.ADD_URI_SAFE_ATTR,de):jT,ew="ADD_DATA_URI_TAGS"in Re?ke(Ze(tw),Re.ADD_DATA_URI_TAGS,de):tw,up="FORBID_CONTENTS"in Re?ke({},Re.FORBID_CONTENTS,de):JE,i_="FORBID_TAGS"in Re?ke({},Re.FORBID_TAGS,de):{},Uy="FORBID_ATTR"in Re?ke({},Re.FORBID_ATTR,de):{},lp="USE_PROFILES"in Re&&Re.USE_PROFILES,ro=!1!==Re.ALLOW_ARIA_ATTR,zT=!1!==Re.ALLOW_DATA_ATTR,KE=Re.ALLOW_UNKNOWN_PROTOCOLS||!1,QE=!1!==Re.ALLOW_SELF_CLOSE_IN_ATTR,Ce=Re.SAFE_FOR_TEMPLATES||!1,kt=Re.WHOLE_DOCUMENT||!1,Lf=Re.RETURN_DOM||!1,o_=Re.RETURN_DOM_FRAGMENT||!1,Vy=Re.RETURN_TRUSTED_TYPE||!1,zy=Re.FORCE_BODY||!1,V=!1!==Re.SANITIZE_DOM,VT=Re.SANITIZE_NAMED_PROPS||!1,HT=!1!==Re.KEEP_CONTENT,r_=Re.IN_PLACE||!1,ZE=Re.ALLOWED_URI_REGEXP||Gn,Nf=Re.NAMESPACE||bc,mr=Re.CUSTOM_ELEMENT_HANDLING||{},Re.CUSTOM_ELEMENT_HANDLING&&Zr(Re.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(mr.tagNameCheck=Re.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Re.CUSTOM_ELEMENT_HANDLING&&Zr(Re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(mr.attributeNameCheck=Re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Re.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof Re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(mr.allowCustomizedBuiltInElements=Re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(zT=!1),o_&&(Lf=!0),lp&&(Ji=ke({},[...Et]),f=[],!0===lp.html&&(ke(Ji,rt),ke(f,H)),!0===lp.svg&&(ke(Ji,An),ke(f,J),ke(f,xe)),!0===lp.svgFilters&&(ke(Ji,T),ke(f,J),ke(f,xe)),!0===lp.mathMl&&(ke(Ji,tt),ke(f,le),ke(f,xe))),Re.ADD_TAGS&&(Ji===Rf&&(Ji=Ze(Ji)),ke(Ji,Re.ADD_TAGS,de)),Re.ADD_ATTR&&(f===$E&&(f=Ze(f)),ke(f,Re.ADD_ATTR,de)),Re.ADD_URI_SAFE_ATTR&&ke(GT,Re.ADD_URI_SAFE_ATTR,de),Re.FORBID_CONTENTS&&(up===JE&&(up=Ze(up)),ke(up,Re.FORBID_CONTENTS,de)),HT&&(Ji["#text"]=!0),kt&&ke(Ji,["html","head","body"]),Ji.table&&(ke(Ji,["tbody"]),delete i_.tbody),Re.TRUSTED_TYPES_POLICY){if("function"!=typeof Re.TRUSTED_TYPES_POLICY.createHTML)throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof Re.TRUSTED_TYPES_POLICY.createScriptURL)throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Zs=Re.TRUSTED_TYPES_POLICY,t_=Zs.createHTML("")}else void 0===Zs&&(Zs=function(re,mi){if("object"!=typeof re||"function"!=typeof re.createPolicy)return null;let ji=null;const Ye="data-tt-policy-suffix";mi&&mi.hasAttribute(Ye)&&(ji=mi.getAttribute(Ye));const Li="dompurify"+(ji?"#"+ji:"");try{return re.createPolicy(Li,{createHTML:Qc=>Qc,createScriptURL:Qc=>Qc})}catch{return console.warn("TrustedTypes policy "+Li+" could not be created."),null}}(ap,Ye)),null!==Zs&&"string"==typeof t_&&(t_=Zs.createHTML(""));xt&&xt(Re),dp=Re}},iw=ke({},["mi","mo","mn","ms","mtext"]),XT=ke({},["foreignobject","desc","title","annotation-xml"]),Rt=ke({},["title","style","font","a","script"]),a_=ke({},An);ke(a_,T),ke(a_,Xt);const Pn=ke({},tt);ke(Pn,Kt);const fa=function(Re){ae(re.removed,{element:Re});try{Re.parentNode.removeChild(Re)}catch{Re.remove()}},c_=function(Re,jt){try{ae(re.removed,{attribute:jt.getAttributeNode(Re),from:jt})}catch{ae(re.removed,{attribute:null,from:jt})}if(jt.removeAttribute(Re),"is"===Re&&!f[Re])if(Lf||o_)try{fa(jt)}catch{}else try{jt.setAttribute(Re,"")}catch{}},l_=function(Re){let jt=null,bn=null;if(zy)Re="<remove></remove>"+Re;else{const $r=A(Re,/^[\r\n\t ]+/);bn=$r&&$r[0]}"application/xhtml+xml"===Mf&&Nf===bc&&(Re='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Re+"</body></html>");const bo=Zs?Zs.createHTML(Re):Re;if(Nf===bc)try{jt=(new It).parseFromString(bo,Mf)}catch{}if(!jt||!jt.documentElement){jt=Ly.createDocument(Nf,"template",null);try{jt.documentElement.innerHTML=WT?t_:bo}catch{}}const Ps=jt.body||jt.documentElement;return Re&&bn&&Ps.insertBefore(mi.createTextNode(bn),Ps.childNodes[0]||null),Nf===bc?Ny.call(jt,kt?"html":"body")[0]:kt?jt.documentElement:Ps},ow=function(Re){return n_.call(Re.ownerDocument||Re,Re,Ry.SHOW_ELEMENT|Ry.SHOW_COMMENT|Ry.SHOW_TEXT,null)},rw=function(Re){return"function"==typeof _i&&Re instanceof _i},Ll=function(Re,jt,bn){Ya[Re]&&ue(Ya[Re],bo=>{bo.call(re,jt,bn,dp)})},ZT=function(Re){let jt=null;if(Ll("beforeSanitizeElements",Re,null),function(Re){return Re instanceof _z&&("string"!=typeof Re.nodeName||"string"!=typeof Re.textContent||"function"!=typeof Re.removeChild||!(Re.attributes instanceof gP)||"function"!=typeof Re.removeAttribute||"function"!=typeof Re.setAttribute||"string"!=typeof Re.namespaceURI||"function"!=typeof Re.insertBefore||"function"!=typeof Re.hasChildNodes)}(Re))return fa(Re),!0;const bn=de(Re.nodeName);if(Ll("uponSanitizeElement",Re,{tagName:bn,allowedTags:Ji}),Re.hasChildNodes()&&!rw(Re.firstElementChild)&&g(/<[/\w]/g,Re.innerHTML)&&g(/<[/\w]/g,Re.textContent))return fa(Re),!0;if(!Ji[bn]||i_[bn]){if(!i_[bn]&&u_(bn)&&(mr.tagNameCheck instanceof RegExp&&g(mr.tagNameCheck,bn)||mr.tagNameCheck instanceof Function&&mr.tagNameCheck(bn)))return!1;if(HT&&!up[bn]){const bo=e_(Re)||Re.parentNode,Ps=Jm(Re)||Re.childNodes;if(Ps&&bo)for(let ha=Ps.length-1;ha>=0;--ha)bo.insertBefore(UT(Ps[ha],!0),Is(Re))}return fa(Re),!0}return Re instanceof kT&&!function(Re){let jt=e_(Re);(!jt||!jt.tagName)&&(jt={namespaceURI:Nf,tagName:"template"});const bn=be(Re.tagName),bo=be(jt.tagName);return!!s_[Re.namespaceURI]&&(Re.namespaceURI===Dt?jt.namespaceURI===bc?"svg"===bn:jt.namespaceURI===he?"svg"===bn&&("annotation-xml"===bo||iw[bo]):!!a_[bn]:Re.namespaceURI===he?jt.namespaceURI===bc?"math"===bn:jt.namespaceURI===Dt?"math"===bn&&XT[bo]:!!Pn[bn]:Re.namespaceURI===bc?!(jt.namespaceURI===Dt&&!XT[bo]||jt.namespaceURI===he&&!iw[bo])&&!Pn[bn]&&(Rt[bn]||!a_[bn]):!("application/xhtml+xml"!==Mf||!s_[Re.namespaceURI]))}(Re)||("noscript"===bn||"noembed"===bn||"noframes"===bn)&&g(/<\/no(script|embed|frames)/i,Re.innerHTML)?(fa(Re),!0):(Ce&&3===Re.nodeType&&(jt=Re.textContent,ue([My,O,ot],bo=>{jt=De(jt,bo," ")}),Re.textContent!==jt&&(ae(re.removed,{element:Re.cloneNode()}),Re.textContent=jt)),Ll("afterSanitizeElements",Re,null),!1)},sw=function(Re,jt,bn){if(V&&("id"===jt||"name"===jt)&&(bn in mi||bn in qT))return!1;if((!zT||Uy[jt]||!g(Fy,jt))&&(!ro||!g(XE,jt)))if(!f[jt]||Uy[jt]){if(!(u_(Re)&&(mr.tagNameCheck instanceof RegExp&&g(mr.tagNameCheck,Re)||mr.tagNameCheck instanceof Function&&mr.tagNameCheck(Re))&&(mr.attributeNameCheck instanceof RegExp&&g(mr.attributeNameCheck,jt)||mr.attributeNameCheck instanceof Function&&mr.attributeNameCheck(jt))||"is"===jt&&mr.allowCustomizedBuiltInElements&&(mr.tagNameCheck instanceof RegExp&&g(mr.tagNameCheck,bn)||mr.tagNameCheck instanceof Function&&mr.tagNameCheck(bn))))return!1}else if(!GT[jt]&&!g(ZE,De(bn,ky,""))&&("src"!==jt&&"xlink:href"!==jt&&"href"!==jt||"script"===Re||0!==Be(bn,"data:")||!ew[Re])&&(!KE||g(By,De(bn,ky,"")))&&bn)return!1;return!0},u_=function(Re){return Re.indexOf("-")>0},aw=function(Re){Ll("beforeSanitizeAttributes",Re,null);const{attributes:jt}=Re;if(!jt)return;const bn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f};let bo=jt.length;for(;bo--;){const Ps=jt[bo],{name:$r,namespaceURI:ha,value:Ff}=Ps,d_=de($r);let $s="value"===$r?Ff:Me(Ff);if(bn.attrName=d_,bn.attrValue=$s,bn.keepAttr=!0,bn.forceKeepAttr=void 0,Ll("uponSanitizeAttribute",Re,bn),$s=bn.attrValue,bn.forceKeepAttr||(c_($r,Re),!bn.keepAttr))continue;if(!QE&&g(/\/>/i,$s)){c_($r,Re);continue}Ce&&ue([My,O,ot],Ou=>{$s=De($s,Ou," ")});const cw=de(Re.nodeName);if(sw(cw,d_,$s)){if(VT&&("id"===d_||"name"===d_)&&(c_($r,Re),$s="user-content-"+$s),Zs&&"object"==typeof ap&&"function"==typeof ap.getAttributeType&&!ha)switch(ap.getAttributeType(cw,d_)){case"TrustedHTML":$s=Zs.createHTML($s);break;case"TrustedScriptURL":$s=Zs.createScriptURL($s)}try{ha?Re.setAttributeNS(ha,$r,$s):Re.setAttribute($r,$s),E(re.removed)}catch{}}}Ll("afterSanitizeAttributes",Re,null)},TP=function Sn(Re){let jt=null;const bn=ow(Re);for(Ll("beforeSanitizeShadowDOM",Re,null);jt=bn.nextNode();)Ll("uponSanitizeShadowNode",jt,null),!ZT(jt)&&(jt.content instanceof Li&&Sn(jt.content),aw(jt));Ll("afterSanitizeShadowDOM",Re,null)};return re.sanitize=function(Sn){let Re=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},jt=null,bn=null,bo=null,Ps=null;if(WT=!Sn,WT&&(Sn="\x3c!--\x3e"),"string"!=typeof Sn&&!rw(Sn)){if("function"!=typeof Sn.toString)throw it("toString is not a function");if("string"!=typeof(Sn=Sn.toString()))throw it("dirty is not a string, aborting")}if(!re.isSupported)return Sn;if(cp||YT(Re),re.removed=[],"string"==typeof Sn&&(r_=!1),r_){if(Sn.nodeName){const Ff=de(Sn.nodeName);if(!Ji[Ff]||i_[Ff])throw it("root node is forbidden and cannot be sanitized in-place")}}else if(Sn instanceof _i)jt=l_("\x3c!----\x3e"),bn=jt.ownerDocument.importNode(Sn,!0),1===bn.nodeType&&"BODY"===bn.nodeName||"HTML"===bn.nodeName?jt=bn:jt.appendChild(bn);else{if(!Lf&&!Ce&&!kt&&-1===Sn.indexOf("<"))return Zs&&Vy?Zs.createHTML(Sn):Sn;if(jt=l_(Sn),!jt)return Lf?null:Vy?t_:""}jt&&zy&&fa(jt.firstChild);const $r=ow(r_?Sn:jt);for(;bo=$r.nextNode();)ZT(bo)||(bo.content instanceof Li&&TP(bo.content),aw(bo));if(r_)return Sn;if(Lf){if(o_)for(Ps=Jc.call(jt.ownerDocument);jt.firstChild;)Ps.appendChild(jt.firstChild);else Ps=jt;return(f.shadowroot||f.shadowrootmode)&&(Ps=_t.call(ji,Ps,!0)),Ps}let ha=kt?jt.outerHTML:jt.innerHTML;return kt&&Ji["!doctype"]&&jt.ownerDocument&&jt.ownerDocument.doctype&&jt.ownerDocument.doctype.name&&g(Qi,jt.ownerDocument.doctype.name)&&(ha="<!DOCTYPE "+jt.ownerDocument.doctype.name+">\n"+ha),Ce&&ue([My,O,ot],Ff=>{ha=De(ha,Ff," ")}),Zs&&Vy?Zs.createHTML(ha):ha},re.setConfig=function(){YT(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),cp=!0},re.clearConfig=function(){dp=null,cp=!1},re.isValidAttribute=function(Sn,Re,jt){dp||YT({});const bn=de(Sn),bo=de(Re);return sw(bn,bo,jt)},re.addHook=function(Sn,Re){"function"==typeof Re&&(Ya[Sn]=Ya[Sn]||[],ae(Ya[Sn],Re))},re.removeHook=function(Sn){if(Ya[Sn])return E(Ya[Sn])},re.removeHooks=function(Sn){Ya[Sn]&&(Ya[Sn]=[])},re.removeAllHooks=function(){Ya={}},re}()}()},6276:Ei=>{Ei.exports&&(Ei.exports=function ai(){var we=3,xt=4,be=12,Le=13,Be=16,Me=17;function Ze(T,Xt){return 55296<=T.charCodeAt(Xt)&&T.charCodeAt(Xt)<=56319&&56320<=T.charCodeAt(Xt+1)&&T.charCodeAt(Xt+1)<=57343}function ht(T,Xt){void 0===Xt&&(Xt=0);var tt=T.charCodeAt(Xt);if(55296<=tt&&tt<=56319&&Xt<T.length-1){var Kt=tt;return 56320<=(Et=T.charCodeAt(Xt+1))&&Et<=57343?1024*(Kt-55296)+(Et-56320)+65536:Kt}if(56320<=tt&&tt<=57343&&Xt>=1){var Et=tt;return 55296<=(Kt=T.charCodeAt(Xt-1))&&Kt<=56319?1024*(Kt-55296)+(Et-56320)+65536:Et}return tt}function rt(T,Xt,tt){var Kt=[T].concat(Xt).concat([tt]),Et=Kt[Kt.length-2],H=tt,J=Kt.lastIndexOf(14);if(J>1&&Kt.slice(1,J).every(function(ge){return ge==we})&&-1==[we,Le,Me].indexOf(T))return 2;var le=Kt.lastIndexOf(xt);if(le>0&&Kt.slice(1,le).every(function(ge){return ge==xt})&&-1==[be,xt].indexOf(Et))return Kt.filter(function(ge){return ge==xt}).length%2==1?3:4;if(0==Et&&1==H)return 0;if(2==Et||0==Et||1==Et)return 14==H&&Xt.every(function(ge){return ge==we})?2:1;if(2==H||0==H||1==H)return 1;if(6==Et&&(6==H||7==H||9==H||10==H))return 0;if(!(9!=Et&&7!=Et||7!=H&&8!=H))return 0;if((10==Et||8==Et)&&8==H)return 0;if(H==we||15==H)return 0;if(5==H)return 0;if(Et==be)return 0;var xe=-1!=Kt.indexOf(we)?Kt.lastIndexOf(we)-1:Kt.length-2;return-1!=[Le,Me].indexOf(Kt[xe])&&Kt.slice(xe+1,-1).every(function(ge){return ge==we})&&14==H||15==Et&&-1!=[Be,Me].indexOf(H)?0:-1!=Xt.indexOf(xt)?2:Et==xt&&H==xt?0:1}function An(T){return 1536<=T&&T<=1541||1757==T||1807==T||2274==T||3406==T||69821==T||70082<=T&&T<=70083||72250==T||72326<=T&&T<=72329||73030==T?be:13==T?0:10==T?1:0<=T&&T<=9||11<=T&&T<=12||14<=T&&T<=31||127<=T&&T<=159||173==T||1564==T||6158==T||8203==T||8206<=T&&T<=8207||8232==T||8233==T||8234<=T&&T<=8238||8288<=T&&T<=8292||8293==T||8294<=T&&T<=8303||55296<=T&&T<=57343||65279==T||65520<=T&&T<=65528||65529<=T&&T<=65531||113824<=T&&T<=113827||119155<=T&&T<=119162||917504==T||917505==T||917506<=T&&T<=917535||917632<=T&&T<=917759||918e3<=T&&T<=921599?2:768<=T&&T<=879||1155<=T&&T<=1159||1160<=T&&T<=1161||1425<=T&&T<=1469||1471==T||1473<=T&&T<=1474||1476<=T&&T<=1477||1479==T||1552<=T&&T<=1562||1611<=T&&T<=1631||1648==T||1750<=T&&T<=1756||1759<=T&&T<=1764||1767<=T&&T<=1768||1770<=T&&T<=1773||1809==T||1840<=T&&T<=1866||1958<=T&&T<=1968||2027<=T&&T<=2035||2070<=T&&T<=2073||2075<=T&&T<=2083||2085<=T&&T<=2087||2089<=T&&T<=2093||2137<=T&&T<=2139||2260<=T&&T<=2273||2275<=T&&T<=2306||2362==T||2364==T||2369<=T&&T<=2376||2381==T||2385<=T&&T<=2391||2402<=T&&T<=2403||2433==T||2492==T||2494==T||2497<=T&&T<=2500||2509==T||2519==T||2530<=T&&T<=2531||2561<=T&&T<=2562||2620==T||2625<=T&&T<=2626||2631<=T&&T<=2632||2635<=T&&T<=2637||2641==T||2672<=T&&T<=2673||2677==T||2689<=T&&T<=2690||2748==T||2753<=T&&T<=2757||2759<=T&&T<=2760||2765==T||2786<=T&&T<=2787||2810<=T&&T<=2815||2817==T||2876==T||2878==T||2879==T||2881<=T&&T<=2884||2893==T||2902==T||2903==T||2914<=T&&T<=2915||2946==T||3006==T||3008==T||3021==T||3031==T||3072==T||3134<=T&&T<=3136||3142<=T&&T<=3144||3146<=T&&T<=3149||3157<=T&&T<=3158||3170<=T&&T<=3171||3201==T||3260==T||3263==T||3266==T||3270==T||3276<=T&&T<=3277||3285<=T&&T<=3286||3298<=T&&T<=3299||3328<=T&&T<=3329||3387<=T&&T<=3388||3390==T||3393<=T&&T<=3396||3405==T||3415==T||3426<=T&&T<=3427||3530==T||3535==T||3538<=T&&T<=3540||3542==T||3551==T||3633==T||3636<=T&&T<=3642||3655<=T&&T<=3662||3761==T||3764<=T&&T<=3769||3771<=T&&T<=3772||3784<=T&&T<=3789||3864<=T&&T<=3865||3893==T||3895==T||3897==T||3953<=T&&T<=3966||3968<=T&&T<=3972||3974<=T&&T<=3975||3981<=T&&T<=3991||3993<=T&&T<=4028||4038==T||4141<=T&&T<=4144||4146<=T&&T<=4151||4153<=T&&T<=4154||4157<=T&&T<=4158||4184<=T&&T<=4185||4190<=T&&T<=4192||4209<=T&&T<=4212||4226==T||4229<=T&&T<=4230||4237==T||4253==T||4957<=T&&T<=4959||5906<=T&&T<=5908||5938<=T&&T<=5940||5970<=T&&T<=5971||6002<=T&&T<=6003||6068<=T&&T<=6069||6071<=T&&T<=6077||6086==T||6089<=T&&T<=6099||6109==T||6155<=T&&T<=6157||6277<=T&&T<=6278||6313==T||6432<=T&&T<=6434||6439<=T&&T<=6440||6450==T||6457<=T&&T<=6459||6679<=T&&T<=6680||6683==T||6742==T||6744<=T&&T<=6750||6752==T||6754==T||6757<=T&&T<=6764||6771<=T&&T<=6780||6783==T||6832<=T&&T<=6845||6846==T||6912<=T&&T<=6915||6964==T||6966<=T&&T<=6970||6972==T||6978==T||7019<=T&&T<=7027||7040<=T&&T<=7041||7074<=T&&T<=7077||7080<=T&&T<=7081||7083<=T&&T<=7085||7142==T||7144<=T&&T<=7145||7149==T||7151<=T&&T<=7153||7212<=T&&T<=7219||7222<=T&&T<=7223||7376<=T&&T<=7378||7380<=T&&T<=7392||7394<=T&&T<=7400||7405==T||7412==T||7416<=T&&T<=7417||7616<=T&&T<=7673||7675<=T&&T<=7679||8204==T||8400<=T&&T<=8412||8413<=T&&T<=8416||8417==T||8418<=T&&T<=8420||8421<=T&&T<=8432||11503<=T&&T<=11505||11647==T||11744<=T&&T<=11775||12330<=T&&T<=12333||12334<=T&&T<=12335||12441<=T&&T<=12442||42607==T||42608<=T&&T<=42610||42612<=T&&T<=42621||42654<=T&&T<=42655||42736<=T&&T<=42737||43010==T||43014==T||43019==T||43045<=T&&T<=43046||43204<=T&&T<=43205||43232<=T&&T<=43249||43302<=T&&T<=43309||43335<=T&&T<=43345||43392<=T&&T<=43394||43443==T||43446<=T&&T<=43449||43452==T||43493==T||43561<=T&&T<=43566||43569<=T&&T<=43570||43573<=T&&T<=43574||43587==T||43596==T||43644==T||43696==T||43698<=T&&T<=43700||43703<=T&&T<=43704||43710<=T&&T<=43711||43713==T||43756<=T&&T<=43757||43766==T||44005==T||44008==T||44013==T||64286==T||65024<=T&&T<=65039||65056<=T&&T<=65071||65438<=T&&T<=65439||66045==T||66272==T||66422<=T&&T<=66426||68097<=T&&T<=68099||68101<=T&&T<=68102||68108<=T&&T<=68111||68152<=T&&T<=68154||68159==T||68325<=T&&T<=68326||69633==T||69688<=T&&T<=69702||69759<=T&&T<=69761||69811<=T&&T<=69814||69817<=T&&T<=69818||69888<=T&&T<=69890||69927<=T&&T<=69931||69933<=T&&T<=69940||70003==T||70016<=T&&T<=70017||70070<=T&&T<=70078||70090<=T&&T<=70092||70191<=T&&T<=70193||70196==T||70198<=T&&T<=70199||70206==T||70367==T||70371<=T&&T<=70378||70400<=T&&T<=70401||70460==T||70462==T||70464==T||70487==T||70502<=T&&T<=70508||70512<=T&&T<=70516||70712<=T&&T<=70719||70722<=T&&T<=70724||70726==T||70832==T||70835<=T&&T<=70840||70842==T||70845==T||70847<=T&&T<=70848||70850<=T&&T<=70851||71087==T||71090<=T&&T<=71093||71100<=T&&T<=71101||71103<=T&&T<=71104||71132<=T&&T<=71133||71219<=T&&T<=71226||71229==T||71231<=T&&T<=71232||71339==T||71341==T||71344<=T&&T<=71349||71351==T||71453<=T&&T<=71455||71458<=T&&T<=71461||71463<=T&&T<=71467||72193<=T&&T<=72198||72201<=T&&T<=72202||72243<=T&&T<=72248||72251<=T&&T<=72254||72263==T||72273<=T&&T<=72278||72281<=T&&T<=72283||72330<=T&&T<=72342||72344<=T&&T<=72345||72752<=T&&T<=72758||72760<=T&&T<=72765||72767==T||72850<=T&&T<=72871||72874<=T&&T<=72880||72882<=T&&T<=72883||72885<=T&&T<=72886||73009<=T&&T<=73014||73018==T||73020<=T&&T<=73021||73023<=T&&T<=73029||73031==T||92912<=T&&T<=92916||92976<=T&&T<=92982||94095<=T&&T<=94098||113821<=T&&T<=113822||119141==T||119143<=T&&T<=119145||119150<=T&&T<=119154||119163<=T&&T<=119170||119173<=T&&T<=119179||119210<=T&&T<=119213||119362<=T&&T<=119364||121344<=T&&T<=121398||121403<=T&&T<=121452||121461==T||121476==T||121499<=T&&T<=121503||121505<=T&&T<=121519||122880<=T&&T<=122886||122888<=T&&T<=122904||122907<=T&&T<=122913||122915<=T&&T<=122916||122918<=T&&T<=122922||125136<=T&&T<=125142||125252<=T&&T<=125258||917536<=T&&T<=917631||917760<=T&&T<=917999?we:127462<=T&&T<=127487?xt:2307==T||2363==T||2366<=T&&T<=2368||2377<=T&&T<=2380||2382<=T&&T<=2383||2434<=T&&T<=2435||2495<=T&&T<=2496||2503<=T&&T<=2504||2507<=T&&T<=2508||2563==T||2622<=T&&T<=2624||2691==T||2750<=T&&T<=2752||2761==T||2763<=T&&T<=2764||2818<=T&&T<=2819||2880==T||2887<=T&&T<=2888||2891<=T&&T<=2892||3007==T||3009<=T&&T<=3010||3014<=T&&T<=3016||3018<=T&&T<=3020||3073<=T&&T<=3075||3137<=T&&T<=3140||3202<=T&&T<=3203||3262==T||3264<=T&&T<=3265||3267<=T&&T<=3268||3271<=T&&T<=3272||3274<=T&&T<=3275||3330<=T&&T<=3331||3391<=T&&T<=3392||3398<=T&&T<=3400||3402<=T&&T<=3404||3458<=T&&T<=3459||3536<=T&&T<=3537||3544<=T&&T<=3550||3570<=T&&T<=3571||3635==T||3763==T||3902<=T&&T<=3903||3967==T||4145==T||4155<=T&&T<=4156||4182<=T&&T<=4183||4228==T||6070==T||6078<=T&&T<=6085||6087<=T&&T<=6088||6435<=T&&T<=6438||6441<=T&&T<=6443||6448<=T&&T<=6449||6451<=T&&T<=6456||6681<=T&&T<=6682||6741==T||6743==T||6765<=T&&T<=6770||6916==T||6965==T||6971==T||6973<=T&&T<=6977||6979<=T&&T<=6980||7042==T||7073==T||7078<=T&&T<=7079||7082==T||7143==T||7146<=T&&T<=7148||7150==T||7154<=T&&T<=7155||7204<=T&&T<=7211||7220<=T&&T<=7221||7393==T||7410<=T&&T<=7411||7415==T||43043<=T&&T<=43044||43047==T||43136<=T&&T<=43137||43188<=T&&T<=43203||43346<=T&&T<=43347||43395==T||43444<=T&&T<=43445||43450<=T&&T<=43451||43453<=T&&T<=43456||43567<=T&&T<=43568||43571<=T&&T<=43572||43597==T||43755==T||43758<=T&&T<=43759||43765==T||44003<=T&&T<=44004||44006<=T&&T<=44007||44009<=T&&T<=44010||44012==T||69632==T||69634==T||69762==T||69808<=T&&T<=69810||69815<=T&&T<=69816||69932==T||70018==T||70067<=T&&T<=70069||70079<=T&&T<=70080||70188<=T&&T<=70190||70194<=T&&T<=70195||70197==T||70368<=T&&T<=70370||70402<=T&&T<=70403||70463==T||70465<=T&&T<=70468||70471<=T&&T<=70472||70475<=T&&T<=70477||70498<=T&&T<=70499||70709<=T&&T<=70711||70720<=T&&T<=70721||70725==T||70833<=T&&T<=70834||70841==T||70843<=T&&T<=70844||70846==T||70849==T||71088<=T&&T<=71089||71096<=T&&T<=71099||71102==T||71216<=T&&T<=71218||71227<=T&&T<=71228||71230==T||71340==T||71342<=T&&T<=71343||71350==T||71456<=T&&T<=71457||71462==T||72199<=T&&T<=72200||72249==T||72279<=T&&T<=72280||72343==T||72751==T||72766==T||72873==T||72881==T||72884==T||94033<=T&&T<=94078||119142==T||119149==T?5:4352<=T&&T<=4447||43360<=T&&T<=43388?6:4448<=T&&T<=4519||55216<=T&&T<=55238?7:4520<=T&&T<=4607||55243<=T&&T<=55291?8:44032==T||44060==T||44088==T||44116==T||44144==T||44172==T||44200==T||44228==T||44256==T||44284==T||44312==T||44340==T||44368==T||44396==T||44424==T||44452==T||44480==T||44508==T||44536==T||44564==T||44592==T||44620==T||44648==T||44676==T||44704==T||44732==T||44760==T||44788==T||44816==T||44844==T||44872==T||44900==T||44928==T||44956==T||44984==T||45012==T||45040==T||45068==T||45096==T||45124==T||45152==T||45180==T||45208==T||45236==T||45264==T||45292==T||45320==T||45348==T||45376==T||45404==T||45432==T||45460==T||45488==T||45516==T||45544==T||45572==T||45600==T||45628==T||45656==T||45684==T||45712==T||45740==T||45768==T||45796==T||45824==T||45852==T||45880==T||45908==T||45936==T||45964==T||45992==T||46020==T||46048==T||46076==T||46104==T||46132==T||46160==T||46188==T||46216==T||46244==T||46272==T||46300==T||46328==T||46356==T||46384==T||46412==T||46440==T||46468==T||46496==T||46524==T||46552==T||46580==T||46608==T||46636==T||46664==T||46692==T||46720==T||46748==T||46776==T||46804==T||46832==T||46860==T||46888==T||46916==T||46944==T||46972==T||47e3==T||47028==T||47056==T||47084==T||47112==T||47140==T||47168==T||47196==T||47224==T||47252==T||47280==T||47308==T||47336==T||47364==T||47392==T||47420==T||47448==T||47476==T||47504==T||47532==T||47560==T||47588==T||47616==T||47644==T||47672==T||47700==T||47728==T||47756==T||47784==T||47812==T||47840==T||47868==T||47896==T||47924==T||47952==T||47980==T||48008==T||48036==T||48064==T||48092==T||48120==T||48148==T||48176==T||48204==T||48232==T||48260==T||48288==T||48316==T||48344==T||48372==T||48400==T||48428==T||48456==T||48484==T||48512==T||48540==T||48568==T||48596==T||48624==T||48652==T||48680==T||48708==T||48736==T||48764==T||48792==T||48820==T||48848==T||48876==T||48904==T||48932==T||48960==T||48988==T||49016==T||49044==T||49072==T||49100==T||49128==T||49156==T||49184==T||49212==T||49240==T||49268==T||49296==T||49324==T||49352==T||49380==T||49408==T||49436==T||49464==T||49492==T||49520==T||49548==T||49576==T||49604==T||49632==T||49660==T||49688==T||49716==T||49744==T||49772==T||49800==T||49828==T||49856==T||49884==T||49912==T||49940==T||49968==T||49996==T||50024==T||50052==T||50080==T||50108==T||50136==T||50164==T||50192==T||50220==T||50248==T||50276==T||50304==T||50332==T||50360==T||50388==T||50416==T||50444==T||50472==T||50500==T||50528==T||50556==T||50584==T||50612==T||50640==T||50668==T||50696==T||50724==T||50752==T||50780==T||50808==T||50836==T||50864==T||50892==T||50920==T||50948==T||50976==T||51004==T||51032==T||51060==T||51088==T||51116==T||51144==T||51172==T||51200==T||51228==T||51256==T||51284==T||51312==T||51340==T||51368==T||51396==T||51424==T||51452==T||51480==T||51508==T||51536==T||51564==T||51592==T||51620==T||51648==T||51676==T||51704==T||51732==T||51760==T||51788==T||51816==T||51844==T||51872==T||51900==T||51928==T||51956==T||51984==T||52012==T||52040==T||52068==T||52096==T||52124==T||52152==T||52180==T||52208==T||52236==T||52264==T||52292==T||52320==T||52348==T||52376==T||52404==T||52432==T||52460==T||52488==T||52516==T||52544==T||52572==T||52600==T||52628==T||52656==T||52684==T||52712==T||52740==T||52768==T||52796==T||52824==T||52852==T||52880==T||52908==T||52936==T||52964==T||52992==T||53020==T||53048==T||53076==T||53104==T||53132==T||53160==T||53188==T||53216==T||53244==T||53272==T||53300==T||53328==T||53356==T||53384==T||53412==T||53440==T||53468==T||53496==T||53524==T||53552==T||53580==T||53608==T||53636==T||53664==T||53692==T||53720==T||53748==T||53776==T||53804==T||53832==T||53860==T||53888==T||53916==T||53944==T||53972==T||54e3==T||54028==T||54056==T||54084==T||54112==T||54140==T||54168==T||54196==T||54224==T||54252==T||54280==T||54308==T||54336==T||54364==T||54392==T||54420==T||54448==T||54476==T||54504==T||54532==T||54560==T||54588==T||54616==T||54644==T||54672==T||54700==T||54728==T||54756==T||54784==T||54812==T||54840==T||54868==T||54896==T||54924==T||54952==T||54980==T||55008==T||55036==T||55064==T||55092==T||55120==T||55148==T||55176==T?9:44033<=T&&T<=44059||44061<=T&&T<=44087||44089<=T&&T<=44115||44117<=T&&T<=44143||44145<=T&&T<=44171||44173<=T&&T<=44199||44201<=T&&T<=44227||44229<=T&&T<=44255||44257<=T&&T<=44283||44285<=T&&T<=44311||44313<=T&&T<=44339||44341<=T&&T<=44367||44369<=T&&T<=44395||44397<=T&&T<=44423||44425<=T&&T<=44451||44453<=T&&T<=44479||44481<=T&&T<=44507||44509<=T&&T<=44535||44537<=T&&T<=44563||44565<=T&&T<=44591||44593<=T&&T<=44619||44621<=T&&T<=44647||44649<=T&&T<=44675||44677<=T&&T<=44703||44705<=T&&T<=44731||44733<=T&&T<=44759||44761<=T&&T<=44787||44789<=T&&T<=44815||44817<=T&&T<=44843||44845<=T&&T<=44871||44873<=T&&T<=44899||44901<=T&&T<=44927||44929<=T&&T<=44955||44957<=T&&T<=44983||44985<=T&&T<=45011||45013<=T&&T<=45039||45041<=T&&T<=45067||45069<=T&&T<=45095||45097<=T&&T<=45123||45125<=T&&T<=45151||45153<=T&&T<=45179||45181<=T&&T<=45207||45209<=T&&T<=45235||45237<=T&&T<=45263||45265<=T&&T<=45291||45293<=T&&T<=45319||45321<=T&&T<=45347||45349<=T&&T<=45375||45377<=T&&T<=45403||45405<=T&&T<=45431||45433<=T&&T<=45459||45461<=T&&T<=45487||45489<=T&&T<=45515||45517<=T&&T<=45543||45545<=T&&T<=45571||45573<=T&&T<=45599||45601<=T&&T<=45627||45629<=T&&T<=45655||45657<=T&&T<=45683||45685<=T&&T<=45711||45713<=T&&T<=45739||45741<=T&&T<=45767||45769<=T&&T<=45795||45797<=T&&T<=45823||45825<=T&&T<=45851||45853<=T&&T<=45879||45881<=T&&T<=45907||45909<=T&&T<=45935||45937<=T&&T<=45963||45965<=T&&T<=45991||45993<=T&&T<=46019||46021<=T&&T<=46047||46049<=T&&T<=46075||46077<=T&&T<=46103||46105<=T&&T<=46131||46133<=T&&T<=46159||46161<=T&&T<=46187||46189<=T&&T<=46215||46217<=T&&T<=46243||46245<=T&&T<=46271||46273<=T&&T<=46299||46301<=T&&T<=46327||46329<=T&&T<=46355||46357<=T&&T<=46383||46385<=T&&T<=46411||46413<=T&&T<=46439||46441<=T&&T<=46467||46469<=T&&T<=46495||46497<=T&&T<=46523||46525<=T&&T<=46551||46553<=T&&T<=46579||46581<=T&&T<=46607||46609<=T&&T<=46635||46637<=T&&T<=46663||46665<=T&&T<=46691||46693<=T&&T<=46719||46721<=T&&T<=46747||46749<=T&&T<=46775||46777<=T&&T<=46803||46805<=T&&T<=46831||46833<=T&&T<=46859||46861<=T&&T<=46887||46889<=T&&T<=46915||46917<=T&&T<=46943||46945<=T&&T<=46971||46973<=T&&T<=46999||47001<=T&&T<=47027||47029<=T&&T<=47055||47057<=T&&T<=47083||47085<=T&&T<=47111||47113<=T&&T<=47139||47141<=T&&T<=47167||47169<=T&&T<=47195||47197<=T&&T<=47223||47225<=T&&T<=47251||47253<=T&&T<=47279||47281<=T&&T<=47307||47309<=T&&T<=47335||47337<=T&&T<=47363||47365<=T&&T<=47391||47393<=T&&T<=47419||47421<=T&&T<=47447||47449<=T&&T<=47475||47477<=T&&T<=47503||47505<=T&&T<=47531||47533<=T&&T<=47559||47561<=T&&T<=47587||47589<=T&&T<=47615||47617<=T&&T<=47643||47645<=T&&T<=47671||47673<=T&&T<=47699||47701<=T&&T<=47727||47729<=T&&T<=47755||47757<=T&&T<=47783||47785<=T&&T<=47811||47813<=T&&T<=47839||47841<=T&&T<=47867||47869<=T&&T<=47895||47897<=T&&T<=47923||47925<=T&&T<=47951||47953<=T&&T<=47979||47981<=T&&T<=48007||48009<=T&&T<=48035||48037<=T&&T<=48063||48065<=T&&T<=48091||48093<=T&&T<=48119||48121<=T&&T<=48147||48149<=T&&T<=48175||48177<=T&&T<=48203||48205<=T&&T<=48231||48233<=T&&T<=48259||48261<=T&&T<=48287||48289<=T&&T<=48315||48317<=T&&T<=48343||48345<=T&&T<=48371||48373<=T&&T<=48399||48401<=T&&T<=48427||48429<=T&&T<=48455||48457<=T&&T<=48483||48485<=T&&T<=48511||48513<=T&&T<=48539||48541<=T&&T<=48567||48569<=T&&T<=48595||48597<=T&&T<=48623||48625<=T&&T<=48651||48653<=T&&T<=48679||48681<=T&&T<=48707||48709<=T&&T<=48735||48737<=T&&T<=48763||48765<=T&&T<=48791||48793<=T&&T<=48819||48821<=T&&T<=48847||48849<=T&&T<=48875||48877<=T&&T<=48903||48905<=T&&T<=48931||48933<=T&&T<=48959||48961<=T&&T<=48987||48989<=T&&T<=49015||49017<=T&&T<=49043||49045<=T&&T<=49071||49073<=T&&T<=49099||49101<=T&&T<=49127||49129<=T&&T<=49155||49157<=T&&T<=49183||49185<=T&&T<=49211||49213<=T&&T<=49239||49241<=T&&T<=49267||49269<=T&&T<=49295||49297<=T&&T<=49323||49325<=T&&T<=49351||49353<=T&&T<=49379||49381<=T&&T<=49407||49409<=T&&T<=49435||49437<=T&&T<=49463||49465<=T&&T<=49491||49493<=T&&T<=49519||49521<=T&&T<=49547||49549<=T&&T<=49575||49577<=T&&T<=49603||49605<=T&&T<=49631||49633<=T&&T<=49659||49661<=T&&T<=49687||49689<=T&&T<=49715||49717<=T&&T<=49743||49745<=T&&T<=49771||49773<=T&&T<=49799||49801<=T&&T<=49827||49829<=T&&T<=49855||49857<=T&&T<=49883||49885<=T&&T<=49911||49913<=T&&T<=49939||49941<=T&&T<=49967||49969<=T&&T<=49995||49997<=T&&T<=50023||50025<=T&&T<=50051||50053<=T&&T<=50079||50081<=T&&T<=50107||50109<=T&&T<=50135||50137<=T&&T<=50163||50165<=T&&T<=50191||50193<=T&&T<=50219||50221<=T&&T<=50247||50249<=T&&T<=50275||50277<=T&&T<=50303||50305<=T&&T<=50331||50333<=T&&T<=50359||50361<=T&&T<=50387||50389<=T&&T<=50415||50417<=T&&T<=50443||50445<=T&&T<=50471||50473<=T&&T<=50499||50501<=T&&T<=50527||50529<=T&&T<=50555||50557<=T&&T<=50583||50585<=T&&T<=50611||50613<=T&&T<=50639||50641<=T&&T<=50667||50669<=T&&T<=50695||50697<=T&&T<=50723||50725<=T&&T<=50751||50753<=T&&T<=50779||50781<=T&&T<=50807||50809<=T&&T<=50835||50837<=T&&T<=50863||50865<=T&&T<=50891||50893<=T&&T<=50919||50921<=T&&T<=50947||50949<=T&&T<=50975||50977<=T&&T<=51003||51005<=T&&T<=51031||51033<=T&&T<=51059||51061<=T&&T<=51087||51089<=T&&T<=51115||51117<=T&&T<=51143||51145<=T&&T<=51171||51173<=T&&T<=51199||51201<=T&&T<=51227||51229<=T&&T<=51255||51257<=T&&T<=51283||51285<=T&&T<=51311||51313<=T&&T<=51339||51341<=T&&T<=51367||51369<=T&&T<=51395||51397<=T&&T<=51423||51425<=T&&T<=51451||51453<=T&&T<=51479||51481<=T&&T<=51507||51509<=T&&T<=51535||51537<=T&&T<=51563||51565<=T&&T<=51591||51593<=T&&T<=51619||51621<=T&&T<=51647||51649<=T&&T<=51675||51677<=T&&T<=51703||51705<=T&&T<=51731||51733<=T&&T<=51759||51761<=T&&T<=51787||51789<=T&&T<=51815||51817<=T&&T<=51843||51845<=T&&T<=51871||51873<=T&&T<=51899||51901<=T&&T<=51927||51929<=T&&T<=51955||51957<=T&&T<=51983||51985<=T&&T<=52011||52013<=T&&T<=52039||52041<=T&&T<=52067||52069<=T&&T<=52095||52097<=T&&T<=52123||52125<=T&&T<=52151||52153<=T&&T<=52179||52181<=T&&T<=52207||52209<=T&&T<=52235||52237<=T&&T<=52263||52265<=T&&T<=52291||52293<=T&&T<=52319||52321<=T&&T<=52347||52349<=T&&T<=52375||52377<=T&&T<=52403||52405<=T&&T<=52431||52433<=T&&T<=52459||52461<=T&&T<=52487||52489<=T&&T<=52515||52517<=T&&T<=52543||52545<=T&&T<=52571||52573<=T&&T<=52599||52601<=T&&T<=52627||52629<=T&&T<=52655||52657<=T&&T<=52683||52685<=T&&T<=52711||52713<=T&&T<=52739||52741<=T&&T<=52767||52769<=T&&T<=52795||52797<=T&&T<=52823||52825<=T&&T<=52851||52853<=T&&T<=52879||52881<=T&&T<=52907||52909<=T&&T<=52935||52937<=T&&T<=52963||52965<=T&&T<=52991||52993<=T&&T<=53019||53021<=T&&T<=53047||53049<=T&&T<=53075||53077<=T&&T<=53103||53105<=T&&T<=53131||53133<=T&&T<=53159||53161<=T&&T<=53187||53189<=T&&T<=53215||53217<=T&&T<=53243||53245<=T&&T<=53271||53273<=T&&T<=53299||53301<=T&&T<=53327||53329<=T&&T<=53355||53357<=T&&T<=53383||53385<=T&&T<=53411||53413<=T&&T<=53439||53441<=T&&T<=53467||53469<=T&&T<=53495||53497<=T&&T<=53523||53525<=T&&T<=53551||53553<=T&&T<=53579||53581<=T&&T<=53607||53609<=T&&T<=53635||53637<=T&&T<=53663||53665<=T&&T<=53691||53693<=T&&T<=53719||53721<=T&&T<=53747||53749<=T&&T<=53775||53777<=T&&T<=53803||53805<=T&&T<=53831||53833<=T&&T<=53859||53861<=T&&T<=53887||53889<=T&&T<=53915||53917<=T&&T<=53943||53945<=T&&T<=53971||53973<=T&&T<=53999||54001<=T&&T<=54027||54029<=T&&T<=54055||54057<=T&&T<=54083||54085<=T&&T<=54111||54113<=T&&T<=54139||54141<=T&&T<=54167||54169<=T&&T<=54195||54197<=T&&T<=54223||54225<=T&&T<=54251||54253<=T&&T<=54279||54281<=T&&T<=54307||54309<=T&&T<=54335||54337<=T&&T<=54363||54365<=T&&T<=54391||54393<=T&&T<=54419||54421<=T&&T<=54447||54449<=T&&T<=54475||54477<=T&&T<=54503||54505<=T&&T<=54531||54533<=T&&T<=54559||54561<=T&&T<=54587||54589<=T&&T<=54615||54617<=T&&T<=54643||54645<=T&&T<=54671||54673<=T&&T<=54699||54701<=T&&T<=54727||54729<=T&&T<=54755||54757<=T&&T<=54783||54785<=T&&T<=54811||54813<=T&&T<=54839||54841<=T&&T<=54867||54869<=T&&T<=54895||54897<=T&&T<=54923||54925<=T&&T<=54951||54953<=T&&T<=54979||54981<=T&&T<=55007||55009<=T&&T<=55035||55037<=T&&T<=55063||55065<=T&&T<=55091||55093<=T&&T<=55119||55121<=T&&T<=55147||55149<=T&&T<=55175||55177<=T&&T<=55203?10:9757==T||9977==T||9994<=T&&T<=9997||127877==T||127938<=T&&T<=127940||127943==T||127946<=T&&T<=127948||128066<=T&&T<=128067||128070<=T&&T<=128080||128110==T||128112<=T&&T<=128120||128124==T||128129<=T&&T<=128131||128133<=T&&T<=128135||128170==T||128372<=T&&T<=128373||128378==T||128400==T||128405<=T&&T<=128406||128581<=T&&T<=128583||128587<=T&&T<=128591||128675==T||128692<=T&&T<=128694||128704==T||128716==T||129304<=T&&T<=129308||129310<=T&&T<=129311||129318==T||129328<=T&&T<=129337||129341<=T&&T<=129342||129489<=T&&T<=129501?Le:127995<=T&&T<=127999?14:8205==T?15:9792==T||9794==T||9877<=T&&T<=9878||9992==T||10084==T||127752==T||127806==T||127859==T||127891==T||127908==T||127912==T||127979==T||127981==T||128139==T||128187<=T&&T<=128188||128295==T||128300==T||128488==T||128640==T||128658==T?Be:128102<=T&&T<=128105?Me:11}return this.nextBreak=function(T,Xt){if(void 0===Xt&&(Xt=0),Xt<0)return 0;if(Xt>=T.length-1)return T.length;for(var tt=An(ht(T,Xt)),Kt=[],Et=Xt+1;Et<T.length;Et++)if(!Ze(T,Et-1)){var H=An(ht(T,Et));if(rt(tt,Kt,H))return Et;Kt.push(H)}return T.length},this.splitGraphemes=function(T){for(var Kt,Xt=[],tt=0;(Kt=this.nextBreak(T,tt))<T.length;)Xt.push(T.slice(tt,Kt)),tt=Kt;return tt<T.length&&Xt.push(T.slice(tt)),Xt},this.iterateGraphemes=function(T){var Xt=0,tt={next:function(){var Kt,Et;return(Et=this.nextBreak(T,Xt))<T.length?(Kt=T.slice(Xt,Et),Xt=Et,{value:Kt,done:!1}):Xt<T.length?(Kt=T.slice(Xt),Xt=T.length,{value:Kt,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(tt[Symbol.iterator]=function(){return tt}),tt},this.countGraphemes=function(T){for(var Kt,Xt=0,tt=0;(Kt=this.nextBreak(T,tt))<T.length;)tt=Kt,Xt++;return tt<T.length&&Xt++,Xt},this})},9997:Ei=>{var ai=function(wt){null==wt&&(wt=(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,wt.constructor==Array?this.init_by_array(wt,wt.length):this.init_seed(wt)};ai.prototype.init_seed=function(wt){for(this.mt[0]=wt>>>0,this.mti=1;this.mti<this.N;this.mti++)this.mt[this.mti]=(1812433253*((4294901760&(wt=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30))>>>16)<<16)+1812433253*(65535&wt)+this.mti,this.mt[this.mti]>>>=0},ai.prototype.init_by_array=function(wt,Zn){var pn,we,xt;for(this.init_seed(19650218),pn=1,we=0,xt=this.N>Zn?this.N:Zn;xt;xt--)this.mt[pn]=(this.mt[pn]^(1664525*((4294901760&(un=this.mt[pn-1]^this.mt[pn-1]>>>30))>>>16)<<16)+1664525*(65535&un))+wt[we]+we,this.mt[pn]>>>=0,we++,++pn>=this.N&&(this.mt[0]=this.mt[this.N-1],pn=1),we>=Zn&&(we=0);for(xt=this.N-1;xt;xt--){var un;this.mt[pn]=(this.mt[pn]^(1566083941*((4294901760&(un=this.mt[pn-1]^this.mt[pn-1]>>>30))>>>16)<<16)+1566083941*(65535&un))-pn,this.mt[pn]>>>=0,++pn>=this.N&&(this.mt[0]=this.mt[this.N-1],pn=1)}this.mt[0]=2147483648},ai.prototype.random_int=function(){var wt,Zn=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var pn;for(this.mti==this.N+1&&this.init_seed(5489),pn=0;pn<this.N-this.M;pn++)this.mt[pn]=this.mt[pn+this.M]^(wt=this.mt[pn]&this.UPPER_MASK|this.mt[pn+1]&this.LOWER_MASK)>>>1^Zn[1&wt];for(;pn<this.N-1;pn++)this.mt[pn]=this.mt[pn+(this.M-this.N)]^(wt=this.mt[pn]&this.UPPER_MASK|this.mt[pn+1]&this.LOWER_MASK)>>>1^Zn[1&wt];this.mt[this.N-1]=this.mt[this.M-1]^(wt=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK)>>>1^Zn[1&wt],this.mti=0}return wt=this.mt[this.mti++],wt^=wt>>>11,wt^=wt<<7&2636928640,wt^=wt<<15&4022730752,(wt^=wt>>>18)>>>0},ai.prototype.random_int31=function(){return this.random_int()>>>1},ai.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},ai.prototype.random=function(){return this.random_int()*(1/4294967296)},ai.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},ai.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)},Ei.exports=ai},8097:(Ei,ai,wt)=>{const{webm:Zn,mp4:pn}=wt(9288),we=()=>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,xt=()=>"wakeLock"in navigator;Ei.exports=class un{constructor(){if(this.enabled=!1,xt()){this._wakeLock=null;const mt=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",mt),document.addEventListener("fullscreenchange",mt)}else we()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",Zn),this._addSourceToVideo(this.noSleepVideo,"mp4",pn),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(mt,c,ue){var E=document.createElement("source");E.src=ue,E.type=`video/${c}`,mt.appendChild(E)}get isEnabled(){return this.enabled}enable(){return xt()?navigator.wakeLock.request("screen").then(mt=>{this._wakeLock=mt,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",()=>{console.log("Wake Lock released.")})}).catch(mt=>{throw this.enabled=!1,console.error(`${mt.name}, ${mt.message}`),mt}):we()?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),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(c=>(this.enabled=!0,c)).catch(c=>{throw this.enabled=!1,c})}disable(){xt()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):we()?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}},9288:Ei=>{Ei.exports={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK",mp4:"data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"}},1753:function(Ei,ai,wt){var Zn,pn;!function(we,xt){"use strict";Ei.exports?Ei.exports=xt():void 0!==(pn="function"==typeof(Zn=xt)?Zn.call(ai,wt,ai,Ei):Zn)&&(Ei.exports=pn)}(0,function(we){"use strict";var xt=we&&we.IPv6;return{best:function un(mt){var be,ue=mt.toLowerCase().split(":"),E=ue.length,ae=8;for(""===ue[0]&&""===ue[1]&&""===ue[2]?(ue.shift(),ue.shift()):""===ue[0]&&""===ue[1]?ue.shift():""===ue[E-1]&&""===ue[E-2]&&ue.pop(),-1!==ue[(E=ue.length)-1].indexOf(".")&&(ae=7),be=0;be<E&&""!==ue[be];be++);if(be<ae)for(ue.splice(be,1,"0000");ue.length<ae;)ue.splice(be,0,"0000");for(var Le,A=0;A<ae;A++){Le=ue[A].split("");for(var De=0;De<3&&"0"===Le[0]&&Le.length>1;De++)Le.splice(0,1);ue[A]=Le.join("")}var Be=-1,Me=0,g=0,it=-1,ze=!1;for(A=0;A<ae;A++)ze?"0"===ue[A]?g+=1:(ze=!1,g>Me&&(Be=it,Me=g)):"0"===ue[A]&&(ze=!0,it=A,g=1);g>Me&&(Be=it,Me=g),Me>1&&ue.splice(Be,Me,""),E=ue.length;var Ve="";for(""===ue[0]&&(Ve=":"),A=0;A<E&&(Ve+=ue[A],A!==E-1);A++)Ve+=":";return""===ue[E-1]&&(Ve+=":"),Ve},noConflict:function Jt(){return we.IPv6===this&&(we.IPv6=xt),this}}})},518:function(Ei,ai,wt){var Zn,pn;!function(we,xt){"use strict";Ei.exports?Ei.exports=xt():void 0!==(pn="function"==typeof(Zn=xt)?Zn.call(ai,wt,ai,Ei):Zn)&&(Ei.exports=pn)}(0,function(we){"use strict";var xt=we&&we.SecondLevelDomains,un={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(Jt){var mt=Jt.lastIndexOf(".");if(mt<=0||mt>=Jt.length-1)return!1;var c=Jt.lastIndexOf(".",mt-1);if(c<=0||c>=mt-1)return!1;var ue=un.list[Jt.slice(mt+1)];return!!ue&&ue.indexOf(" "+Jt.slice(c+1,mt)+" ")>=0},is:function(Jt){var mt=Jt.lastIndexOf(".");if(mt<=0||mt>=Jt.length-1)return!1;if(Jt.lastIndexOf(".",mt-1)>=0)return!1;var ue=un.list[Jt.slice(mt+1)];return!!ue&&ue.indexOf(" "+Jt.slice(0,mt)+" ")>=0},get:function(Jt){var mt=Jt.lastIndexOf(".");if(mt<=0||mt>=Jt.length-1)return null;var c=Jt.lastIndexOf(".",mt-1);if(c<=0||c>=mt-1)return null;var ue=un.list[Jt.slice(mt+1)];return!ue||ue.indexOf(" "+Jt.slice(c+1,mt)+" ")<0?null:Jt.slice(c+1)},noConflict:function(){return we.SecondLevelDomains===this&&(we.SecondLevelDomains=xt),this}};return un})},5098:function(Ei,ai,wt){var Zn,pn,we;!function(xt,un){"use strict";Ei.exports?Ei.exports=un(wt(8786),wt(1753),wt(518)):(pn=[wt(8786),wt(1753),wt(518)],void 0!==(we="function"==typeof(Zn=un)?Zn.apply(ai,pn):Zn)&&(Ei.exports=we))}(0,function(xt,un,Jt,mt){"use strict";var c=mt&&mt.URI;function ue(H,J){var le=arguments.length>=1;if(!(this instanceof ue))return le?arguments.length>=2?new ue(H,J):new ue(H):new ue;if(void 0===H){if(le)throw new TypeError("undefined is not a valid argument for URI");H=typeof location<"u"?location.href+"":""}if(null===H&&le)throw new TypeError("null is not a valid argument for URI");return this.href(H),void 0!==J?this.absoluteTo(J):this}ue.version="1.19.11";var ae=ue.prototype,be=Object.prototype.hasOwnProperty;function Le(H){return H.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function A(H){return void 0===H?"Undefined":String(Object.prototype.toString.call(H)).slice(8,-1)}function De(H){return"Array"===A(H)}function Be(H,J){var xe,ge,le={};if("RegExp"===A(J))le=null;else if(De(J))for(xe=0,ge=J.length;xe<ge;xe++)le[J[xe]]=!0;else le[J]=!0;for(xe=0,ge=H.length;xe<ge;xe++)(le&&void 0!==le[H[xe]]||!le&&J.test(H[xe]))&&(H.splice(xe,1),ge--,xe--);return H}function Me(H,J){var le,xe;if(De(J)){for(le=0,xe=J.length;le<xe;le++)if(!Me(H,J[le]))return!1;return!0}var ge=A(J);for(le=0,xe=H.length;le<xe;le++)if("RegExp"===ge){if("string"==typeof H[le]&&H[le].match(J))return!0}else if(H[le]===J)return!0;return!1}function g(H,J){if(!De(H)||!De(J)||H.length!==J.length)return!1;H.sort(),J.sort();for(var le=0,xe=H.length;le<xe;le++)if(H[le]!==J[le])return!1;return!0}function it(H){return H.replace(/^\/+|\/+$/g,"")}function ze(H){return escape(H)}function Ve(H){return encodeURIComponent(H).replace(/[!'()*]/g,ze).replace(/\*/g,"%2A")}ue._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:ue.preventInvalidHostname,duplicateQueryParameters:ue.duplicateQueryParameters,escapeQuerySpace:ue.escapeQuerySpace}},ue.preventInvalidHostname=!1,ue.duplicateQueryParameters=!1,ue.escapeQuerySpace=!0,ue.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,ue.idn_expression=/[^a-z0-9\._-]/i,ue.punycode_expression=/(xn--)/i,ue.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ue.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*$/,ue.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`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,ue.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},ue.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,ue.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,ue.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},ue.hostProtocols=["http","https"],ue.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,ue.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"},ue.getDomAttribute=function(H){if(H&&H.nodeName){var J=H.nodeName.toLowerCase();if("input"!==J||"image"===H.type)return ue.domAttributes[J]}},ue.encode=Ve,ue.decode=decodeURIComponent,ue.iso8859=function(){ue.encode=escape,ue.decode=unescape},ue.unicode=function(){ue.encode=Ve,ue.decode=decodeURIComponent},ue.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,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)/gi,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)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},ue.encodeQuery=function(H,J){var le=ue.encode(H+"");return void 0===J&&(J=ue.escapeQuerySpace),J?le.replace(/%20/g,"+"):le},ue.decodeQuery=function(H,J){H+="",void 0===J&&(J=ue.escapeQuerySpace);try{return ue.decode(J?H.replace(/\+/g,"%20"):H)}catch{return H}};var Ze,ke={encode:"encode",decode:"decode"},ht=function(H,J){return function(le){try{return ue[J](le+"").replace(ue.characters[H][J].expression,function(xe){return ue.characters[H][J].map[xe]})}catch{return le}}};for(Ze in ke)ue[Ze+"PathSegment"]=ht("pathname",ke[Ze]),ue[Ze+"UrnPathSegment"]=ht("urnpath",ke[Ze]);var rt=function(H,J,le){return function(xe){var ge;ge=le?function(hn){return ue[J](ue[le](hn))}:ue[J];for(var Ne=(xe+"").split(H),He=0,Nt=Ne.length;He<Nt;He++)Ne[He]=ge(Ne[He]);return Ne.join(H)}};function An(H){return function(J,le){return void 0===J?this._parts[H]||"":(this._parts[H]=J||null,this.build(!le),this)}}function T(H,J){return function(le,xe){return void 0===le?this._parts[H]||"":(null!==le&&(le+="").charAt(0)===J&&(le=le.substring(1)),this._parts[H]=le,this.build(!xe),this)}}ue.decodePath=rt("/","decodePathSegment"),ue.decodeUrnPath=rt(":","decodeUrnPathSegment"),ue.recodePath=rt("/","encodePathSegment","decode"),ue.recodeUrnPath=rt(":","encodeUrnPathSegment","decode"),ue.encodeReserved=ht("reserved","encode"),ue.parse=function(H,J){var le;return J||(J={preventInvalidHostname:ue.preventInvalidHostname}),(le=(H=(H=H.replace(ue.leading_whitespace_expression,"")).replace(ue.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(J.fragment=H.substring(le+1)||null,H=H.substring(0,le)),(le=H.indexOf("?"))>-1&&(J.query=H.substring(le+1)||null,H=H.substring(0,le)),"//"===(H=(H=H.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(J.protocol=null,H=H.substring(2),H=ue.parseAuthority(H,J)):(le=H.indexOf(":"))>-1&&(J.protocol=H.substring(0,le)||null,J.protocol&&!J.protocol.match(ue.protocol_expression)?J.protocol=void 0:"//"===H.substring(le+1,le+3).replace(/\\/g,"/")?(H=H.substring(le+3),H=ue.parseAuthority(H,J)):(H=H.substring(le+1),J.urn=!0)),J.path=H,J},ue.parseHost=function(H,J){H||(H="");var xe,ge,le=(H=H.replace(/\\/g,"/")).indexOf("/");if(-1===le&&(le=H.length),"["===H.charAt(0))xe=H.indexOf("]"),J.hostname=H.substring(1,xe)||null,J.port=H.substring(xe+2,le)||null,"/"===J.port&&(J.port=null);else{var Ne=H.indexOf(":"),He=H.indexOf("/"),Nt=H.indexOf(":",Ne+1);-1!==Nt&&(-1===He||Nt<He)?(J.hostname=H.substring(0,le)||null,J.port=null):(ge=H.substring(0,le).split(":"),J.hostname=ge[0]||null,J.port=ge[1]||null)}return J.hostname&&"/"!==H.substring(le).charAt(0)&&(le++,H="/"+H),J.preventInvalidHostname&&ue.ensureValidHostname(J.hostname,J.protocol),J.port&&ue.ensureValidPort(J.port),H.substring(le)||"/"},ue.parseAuthority=function(H,J){return H=ue.parseUserinfo(H,J),ue.parseHost(H,J)},ue.parseUserinfo=function(H,J){var le=H;-1!==H.indexOf("\\")&&(H=H.replace(/\\/g,"/"));var He,ge=H.indexOf("/"),Ne=H.lastIndexOf("@",ge>-1?ge:H.length-1);return Ne>-1&&(-1===ge||Ne<ge)?(He=H.substring(0,Ne).split(":"),J.username=He[0]?ue.decode(He[0]):null,He.shift(),J.password=He[0]?ue.decode(He.join(":")):null,H=le.substring(Ne+1)):(J.username=null,J.password=null),H},ue.parseQuery=function(H,J){if(!H)return{};if(!(H=H.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var Ne,He,Nt,le={},xe=H.split("&"),ge=xe.length,hn=0;hn<ge;hn++)Ne=xe[hn].split("="),He=ue.decodeQuery(Ne.shift(),J),Nt=Ne.length?ue.decodeQuery(Ne.join("="),J):null,"__proto__"!==He&&(be.call(le,He)?(("string"==typeof le[He]||null===le[He])&&(le[He]=[le[He]]),le[He].push(Nt)):le[He]=Nt);return le},ue.build=function(H){var J="",le=!1;return H.protocol&&(J+=H.protocol+":"),!H.urn&&(J||H.hostname)&&(J+="//",le=!0),J+=ue.buildAuthority(H)||"","string"==typeof H.path&&("/"!==H.path.charAt(0)&&le&&(J+="/"),J+=H.path),"string"==typeof H.query&&H.query&&(J+="?"+H.query),"string"==typeof H.fragment&&H.fragment&&(J+="#"+H.fragment),J},ue.buildHost=function(H){var J="";return H.hostname?(ue.ip6_expression.test(H.hostname)?J+="["+H.hostname+"]":J+=H.hostname,H.port&&(J+=":"+H.port),J):""},ue.buildAuthority=function(H){return ue.buildUserinfo(H)+ue.buildHost(H)},ue.buildUserinfo=function(H){var J="";return H.username&&(J+=ue.encode(H.username)),H.password&&(J+=":"+ue.encode(H.password)),J&&(J+="@"),J},ue.buildQuery=function(H,J,le){var ge,Ne,He,Nt,xe="";for(Ne in H)if("__proto__"!==Ne&&be.call(H,Ne))if(De(H[Ne]))for(ge={},He=0,Nt=H[Ne].length;He<Nt;He++)void 0!==H[Ne][He]&&void 0===ge[H[Ne][He]+""]&&(xe+="&"+ue.buildQueryParameter(Ne,H[Ne][He],le),!0!==J&&(ge[H[Ne][He]+""]=!0));else void 0!==H[Ne]&&(xe+="&"+ue.buildQueryParameter(Ne,H[Ne],le));return xe.substring(1)},ue.buildQueryParameter=function(H,J,le){return ue.encodeQuery(H,le)+(null!==J?"="+ue.encodeQuery(J,le):"")},ue.addQuery=function(H,J,le){if("object"==typeof J)for(var xe in J)be.call(J,xe)&&ue.addQuery(H,xe,J[xe]);else{if("string"!=typeof J)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===H[J])return void(H[J]=le);"string"==typeof H[J]&&(H[J]=[H[J]]),De(le)||(le=[le]),H[J]=(H[J]||[]).concat(le)}},ue.setQuery=function(H,J,le){if("object"==typeof J)for(var xe in J)be.call(J,xe)&&ue.setQuery(H,xe,J[xe]);else{if("string"!=typeof J)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");H[J]=void 0===le?null:le}},ue.removeQuery=function(H,J,le){var xe,ge,Ne;if(De(J))for(xe=0,ge=J.length;xe<ge;xe++)H[J[xe]]=void 0;else if("RegExp"===A(J))for(Ne in H)J.test(Ne)&&(H[Ne]=void 0);else if("object"==typeof J)for(Ne in J)be.call(J,Ne)&&ue.removeQuery(H,Ne,J[Ne]);else{if("string"!=typeof J)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==le?"RegExp"===A(le)?H[J]=!De(H[J])&&le.test(H[J])?void 0:Be(H[J],le):H[J]!==String(le)||De(le)&&1!==le.length?De(H[J])&&(H[J]=Be(H[J],le)):H[J]=void 0:H[J]=void 0}},ue.hasQuery=function(H,J,le,xe){switch(A(J)){case"String":break;case"RegExp":for(var ge in H)if(be.call(H,ge)&&J.test(ge)&&(void 0===le||ue.hasQuery(H,ge,le)))return!0;return!1;case"Object":for(var Ne in J)if(be.call(J,Ne)&&!ue.hasQuery(H,Ne,J[Ne]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(A(le)){case"Undefined":return J in H;case"Boolean":return le===!!(De(H[J])?H[J].length:H[J]);case"Function":return!!le(H[J],J,H);case"Array":return!!De(H[J])&&(xe?Me:g)(H[J],le);case"RegExp":return De(H[J])?!!xe&&Me(H[J],le):!(!H[J]||!H[J].match(le));case"Number":le=String(le);case"String":return De(H[J])?!!xe&&Me(H[J],le):H[J]===le;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},ue.joinPaths=function(){for(var H=[],J=[],le=0,xe=0;xe<arguments.length;xe++){var ge=new ue(arguments[xe]);H.push(ge);for(var Ne=ge.segment(),He=0;He<Ne.length;He++)"string"==typeof Ne[He]&&J.push(Ne[He]),Ne[He]&&le++}if(!J.length||!le)return new ue("");var Nt=new ue("").segment(J);return(""===H[0].path()||"/"===H[0].path().slice(0,1))&&Nt.path("/"+Nt.path()),Nt.normalize()},ue.commonPath=function(H,J){var xe,le=Math.min(H.length,J.length);for(xe=0;xe<le;xe++)if(H.charAt(xe)!==J.charAt(xe)){xe--;break}return xe<1?H.charAt(0)===J.charAt(0)&&"/"===H.charAt(0)?"/":"":(("/"!==H.charAt(xe)||"/"!==J.charAt(xe))&&(xe=H.substring(0,xe).lastIndexOf("/")),H.substring(0,xe+1))},ue.withinString=function(H,J,le){le||(le={});var xe=le.start||ue.findUri.start,ge=le.end||ue.findUri.end,Ne=le.trim||ue.findUri.trim,He=le.parens||ue.findUri.parens,Nt=/[a-z0-9-]=["']?$/i;for(xe.lastIndex=0;;){var hn=xe.exec(H);if(!hn)break;var Gn=hn.index;if(le.ignoreHtml){var pi=H.slice(Math.max(Gn-3,0),Gn);if(pi&&Nt.test(pi))continue}for(var $i=Gn+H.slice(Gn).search(ge),Qi=H.slice(Gn,$i),pr=-1;;){var Br=He.exec(Qi);if(!Br)break;pr=Math.max(pr,Br.index+Br[0].length)}if(!((Qi=pr>-1?Qi.slice(0,pr)+Qi.slice(pr).replace(Ne,""):Qi.replace(Ne,"")).length<=hn[0].length||le.ignore&&le.ignore.test(Qi))){var Ri=J(Qi,Gn,$i=Gn+Qi.length,H);if(void 0===Ri){xe.lastIndex=$i;continue}Ri=String(Ri),H=H.slice(0,Gn)+Ri+H.slice($i),xe.lastIndex=Gn+Ri.length}}return xe.lastIndex=0,H},ue.ensureValidHostname=function(H,J){var le=!!H,ge=!1;if(!!J&&(ge=Me(ue.hostProtocols,J)),ge&&!le)throw new TypeError("Hostname cannot be empty, if protocol is "+J);if(H&&H.match(ue.invalid_hostname_characters)){if(!xt)throw new TypeError('Hostname "'+H+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(xt.toASCII(H).match(ue.invalid_hostname_characters))throw new TypeError('Hostname "'+H+'" contains characters other than [A-Z0-9.-:_]')}},ue.ensureValidPort=function(H){if(H){var J=Number(H);if(!(function E(H){return/^[0-9]+$/.test(H)}(J)&&J>0&&J<65536))throw new TypeError('Port "'+H+'" is not a valid port')}},ue.noConflict=function(H){if(H){var J={URI:this.noConflict()};return mt.URITemplate&&"function"==typeof mt.URITemplate.noConflict&&(J.URITemplate=mt.URITemplate.noConflict()),mt.IPv6&&"function"==typeof mt.IPv6.noConflict&&(J.IPv6=mt.IPv6.noConflict()),mt.SecondLevelDomains&&"function"==typeof mt.SecondLevelDomains.noConflict&&(J.SecondLevelDomains=mt.SecondLevelDomains.noConflict()),J}return mt.URI===this&&(mt.URI=c),this},ae.build=function(H){return!0===H?this._deferred_build=!0:(void 0===H||this._deferred_build)&&(this._string=ue.build(this._parts),this._deferred_build=!1),this},ae.clone=function(){return new ue(this)},ae.valueOf=ae.toString=function(){return this.build(!1)._string},ae.protocol=An("protocol"),ae.username=An("username"),ae.password=An("password"),ae.hostname=An("hostname"),ae.port=An("port"),ae.query=T("query","?"),ae.fragment=T("fragment","#"),ae.search=function(H,J){var le=this.query(H,J);return"string"==typeof le&&le.length?"?"+le:le},ae.hash=function(H,J){var le=this.fragment(H,J);return"string"==typeof le&&le.length?"#"+le:le},ae.pathname=function(H,J){if(void 0===H||!0===H){var le=this._parts.path||(this._parts.hostname?"/":"");return H?(this._parts.urn?ue.decodeUrnPath:ue.decodePath)(le):le}return this._parts.path=this._parts.urn?H?ue.recodeUrnPath(H):"":H?ue.recodePath(H):"/",this.build(!J),this},ae.path=ae.pathname,ae.href=function(H,J){var le;if(void 0===H)return this.toString();this._string="",this._parts=ue._parts();var xe=H instanceof ue,ge="object"==typeof H&&(H.hostname||H.path||H.pathname);if(H.nodeName&&(H=H[ue.getDomAttribute(H)]||"",ge=!1),!xe&&ge&&void 0!==H.pathname&&(H=H.toString()),"string"==typeof H||H instanceof String)this._parts=ue.parse(String(H),this._parts);else{if(!xe&&!ge)throw new TypeError("invalid input");var He=xe?H._parts:H;for(le in He)"query"!==le&&be.call(this._parts,le)&&(this._parts[le]=He[le]);He.query&&this.query(He.query,!1)}return this.build(!J),this},ae.is=function(H){var J=!1,le=!1,xe=!1,ge=!1,Ne=!1,He=!1,Nt=!1,hn=!this._parts.urn;switch(this._parts.hostname&&(hn=!1,le=ue.ip4_expression.test(this._parts.hostname),xe=ue.ip6_expression.test(this._parts.hostname),Ne=(ge=!(J=le||xe))&&Jt&&Jt.has(this._parts.hostname),He=ge&&ue.idn_expression.test(this._parts.hostname),Nt=ge&&ue.punycode_expression.test(this._parts.hostname)),H.toLowerCase()){case"relative":return hn;case"absolute":return!hn;case"domain":case"name":return ge;case"sld":return Ne;case"ip":return J;case"ip4":case"ipv4":case"inet4":return le;case"ip6":case"ipv6":case"inet6":return xe;case"idn":return He;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return Nt}return null};var Xt=ae.protocol,tt=ae.port,Kt=ae.hostname;ae.protocol=function(H,J){if(H&&!(H=H.replace(/:(\/\/)?$/,"")).match(ue.protocol_expression))throw new TypeError('Protocol "'+H+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return Xt.call(this,H,J)},ae.scheme=ae.protocol,ae.port=function(H,J){return this._parts.urn?void 0===H?"":this:(void 0!==H&&(0===H&&(H=null),H&&(":"===(H+="").charAt(0)&&(H=H.substring(1)),ue.ensureValidPort(H))),tt.call(this,H,J))},ae.hostname=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0!==H){var le={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==ue.parseHost(H,le))throw new TypeError('Hostname "'+H+'" contains characters other than [A-Z0-9.-]');H=le.hostname,this._parts.preventInvalidHostname&&ue.ensureValidHostname(H,this._parts.protocol)}return Kt.call(this,H,J)},ae.origin=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H){var le=this.protocol();return this.authority()?(le?le+"://":"")+this.authority():""}var ge=ue(H);return this.protocol(ge.protocol()).authority(ge.authority()).build(!J),this},ae.host=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H)return this._parts.hostname?ue.buildHost(this._parts):"";if("/"!==ue.parseHost(H,this._parts))throw new TypeError('Hostname "'+H+'" contains characters other than [A-Z0-9.-]');return this.build(!J),this},ae.authority=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H)return this._parts.hostname?ue.buildAuthority(this._parts):"";if("/"!==ue.parseAuthority(H,this._parts))throw new TypeError('Hostname "'+H+'" contains characters other than [A-Z0-9.-]');return this.build(!J),this},ae.userinfo=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H){var le=ue.buildUserinfo(this._parts);return le&&le.substring(0,le.length-1)}return"@"!==H[H.length-1]&&(H+="@"),ue.parseUserinfo(H,this._parts),this.build(!J),this},ae.resource=function(H,J){var le;return void 0===H?this.path()+this.search()+this.hash():(le=ue.parse(H),this._parts.path=le.path,this._parts.query=le.query,this._parts.fragment=le.fragment,this.build(!J),this)},ae.subdomain=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H){if(!this._parts.hostname||this.is("IP"))return"";var le=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,le)||""}var xe=this._parts.hostname.length-this.domain().length,ge=this._parts.hostname.substring(0,xe),Ne=new RegExp("^"+Le(ge));if(H&&"."!==H.charAt(H.length-1)&&(H+="."),-1!==H.indexOf(":"))throw new TypeError("Domains cannot contain colons");return H&&ue.ensureValidHostname(H,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(Ne,H),this.build(!J),this},ae.domain=function(H,J){if(this._parts.urn)return void 0===H?"":this;if("boolean"==typeof H&&(J=H,H=void 0),void 0===H){if(!this._parts.hostname||this.is("IP"))return"";var le=this._parts.hostname.match(/\./g);if(le&&le.length<2)return this._parts.hostname;var xe=this._parts.hostname.length-this.tld(J).length-1;return xe=this._parts.hostname.lastIndexOf(".",xe-1)+1,this._parts.hostname.substring(xe)||""}if(!H)throw new TypeError("cannot set domain empty");if(-1!==H.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(ue.ensureValidHostname(H,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=H;else{var ge=new RegExp(Le(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(ge,H)}return this.build(!J),this},ae.tld=function(H,J){if(this._parts.urn)return void 0===H?"":this;if("boolean"==typeof H&&(J=H,H=void 0),void 0===H){if(!this._parts.hostname||this.is("IP"))return"";var le=this._parts.hostname.lastIndexOf("."),xe=this._parts.hostname.substring(le+1);return!0!==J&&Jt&&Jt.list[xe.toLowerCase()]&&Jt.get(this._parts.hostname)||xe}var ge;if(!H)throw new TypeError("cannot set TLD empty");if(H.match(/[^a-zA-Z0-9-]/)){if(!Jt||!Jt.is(H))throw new TypeError('TLD "'+H+'" contains characters other than [A-Z0-9]');ge=new RegExp(Le(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(ge,H)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");ge=new RegExp(Le(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(ge,H)}return this.build(!J),this},ae.directory=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H||!0===H){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var le=this._parts.path.length-this.filename().length-1,xe=this._parts.path.substring(0,le)||(this._parts.hostname?"/":"");return H?ue.decodePath(xe):xe}var ge=this._parts.path.length-this.filename().length,Ne=this._parts.path.substring(0,ge),He=new RegExp("^"+Le(Ne));return this.is("relative")||(H||(H="/"),"/"!==H.charAt(0)&&(H="/"+H)),H&&"/"!==H.charAt(H.length-1)&&(H+="/"),H=ue.recodePath(H),this._parts.path=this._parts.path.replace(He,H),this.build(!J),this},ae.filename=function(H,J){if(this._parts.urn)return void 0===H?"":this;if("string"!=typeof H){if(!this._parts.path||"/"===this._parts.path)return"";var le=this._parts.path.lastIndexOf("/"),xe=this._parts.path.substring(le+1);return H?ue.decodePathSegment(xe):xe}var ge=!1;"/"===H.charAt(0)&&(H=H.substring(1)),H.match(/\.?\//)&&(ge=!0);var Ne=new RegExp(Le(this.filename())+"$");return H=ue.recodePath(H),this._parts.path=this._parts.path.replace(Ne,H),ge?this.normalizePath(J):this.build(!J),this},ae.suffix=function(H,J){if(this._parts.urn)return void 0===H?"":this;if(void 0===H||!0===H){if(!this._parts.path||"/"===this._parts.path)return"";var ge,Ne,le=this.filename(),xe=le.lastIndexOf(".");return-1===xe?"":(ge=le.substring(xe+1),Ne=/^[a-z0-9%]+$/i.test(ge)?ge:"",H?ue.decodePathSegment(Ne):Ne)}"."===H.charAt(0)&&(H=H.substring(1));var Nt,He=this.suffix();if(He)Nt=H?new RegExp(Le(He)+"$"):new RegExp(Le("."+He)+"$");else{if(!H)return this;this._parts.path+="."+ue.recodePath(H)}return Nt&&(H=ue.recodePath(H),this._parts.path=this._parts.path.replace(Nt,H)),this.build(!J),this},ae.segment=function(H,J,le){var xe=this._parts.urn?":":"/",ge=this.path(),Ne="/"===ge.substring(0,1),He=ge.split(xe);if(void 0!==H&&"number"!=typeof H&&(le=J,J=H,H=void 0),void 0!==H&&"number"!=typeof H)throw new Error('Bad segment "'+H+'", must be 0-based integer');if(Ne&&He.shift(),H<0&&(H=Math.max(He.length+H,0)),void 0===J)return void 0===H?He:He[H];if(null===H||void 0===He[H])if(De(J)){He=[];for(var Nt=0,hn=J.length;Nt<hn;Nt++)!J[Nt].length&&(!He.length||!He[He.length-1].length)||(He.length&&!He[He.length-1].length&&He.pop(),He.push(it(J[Nt])))}else(J||"string"==typeof J)&&(J=it(J),""===He[He.length-1]?He[He.length-1]=J:He.push(J));else J?He[H]=it(J):He.splice(H,1);return Ne&&He.unshift(""),this.path(He.join(xe),le)},ae.segmentCoded=function(H,J,le){var xe,ge,Ne;if("number"!=typeof H&&(le=J,J=H,H=void 0),void 0===J){if(De(xe=this.segment(H,J,le)))for(ge=0,Ne=xe.length;ge<Ne;ge++)xe[ge]=ue.decode(xe[ge]);else xe=void 0!==xe?ue.decode(xe):void 0;return xe}if(De(J))for(ge=0,Ne=J.length;ge<Ne;ge++)J[ge]=ue.encode(J[ge]);else J="string"==typeof J||J instanceof String?ue.encode(J):J;return this.segment(H,J,le)};var Et=ae.query;return ae.query=function(H,J){if(!0===H)return ue.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof H){var le=ue.parseQuery(this._parts.query,this._parts.escapeQuerySpace),xe=H.call(this,le);return this._parts.query=ue.buildQuery(xe||le,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!J),this}return void 0!==H&&"string"!=typeof H?(this._parts.query=ue.buildQuery(H,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!J),this):Et.call(this,H,J)},ae.setQuery=function(H,J,le){var xe=ue.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof H||H instanceof String)xe[H]=void 0!==J?J:null;else{if("object"!=typeof H)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var ge in H)be.call(H,ge)&&(xe[ge]=H[ge])}return this._parts.query=ue.buildQuery(xe,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof H&&(le=J),this.build(!le),this},ae.addQuery=function(H,J,le){var xe=ue.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return ue.addQuery(xe,H,void 0===J?null:J),this._parts.query=ue.buildQuery(xe,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof H&&(le=J),this.build(!le),this},ae.removeQuery=function(H,J,le){var xe=ue.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return ue.removeQuery(xe,H,J),this._parts.query=ue.buildQuery(xe,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof H&&(le=J),this.build(!le),this},ae.hasQuery=function(H,J,le){var xe=ue.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return ue.hasQuery(xe,H,J,le)},ae.setSearch=ae.setQuery,ae.addSearch=ae.addQuery,ae.removeSearch=ae.removeQuery,ae.hasSearch=ae.hasQuery,ae.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()},ae.normalizeProtocol=function(H){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!H)),this},ae.normalizeHostname=function(H){return this._parts.hostname&&(this.is("IDN")&&xt?this._parts.hostname=xt.toASCII(this._parts.hostname):this.is("IPv6")&&un&&(this._parts.hostname=un.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!H)),this},ae.normalizePort=function(H){return"string"==typeof this._parts.protocol&&this._parts.port===ue.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!H)),this},ae.normalizePath=function(H){var J=this._parts.path;if(!J)return this;if(this._parts.urn)return this._parts.path=ue.recodeUrnPath(this._parts.path),this.build(!H),this;if("/"===this._parts.path)return this;var le,ge,Ne,xe="";for("/"!==(J=ue.recodePath(J)).charAt(0)&&(le=!0,J="/"+J),("/.."===J.slice(-3)||"/."===J.slice(-2))&&(J+="/"),J=J.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),le&&(xe=J.substring(1).match(/^(\.\.\/)+/)||"")&&(xe=xe[0]);-1!==(ge=J.search(/\/\.\.(\/|$)/));)0!==ge?(-1===(Ne=J.substring(0,ge).lastIndexOf("/"))&&(Ne=ge),J=J.substring(0,Ne)+J.substring(ge+3)):J=J.substring(3);return le&&this.is("relative")&&(J=xe+J.substring(1)),this._parts.path=J,this.build(!H),this},ae.normalizePathname=ae.normalizePath,ae.normalizeQuery=function(H){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(ue.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!H)),this},ae.normalizeFragment=function(H){return this._parts.fragment||(this._parts.fragment=null,this.build(!H)),this},ae.normalizeSearch=ae.normalizeQuery,ae.normalizeHash=ae.normalizeFragment,ae.iso8859=function(){var H=ue.encode,J=ue.decode;ue.encode=escape,ue.decode=decodeURIComponent;try{this.normalize()}finally{ue.encode=H,ue.decode=J}return this},ae.unicode=function(){var H=ue.encode,J=ue.decode;ue.encode=Ve,ue.decode=unescape;try{this.normalize()}finally{ue.encode=H,ue.decode=J}return this},ae.readable=function(){var H=this.clone();H.username("").password("").normalize();var J="";if(H._parts.protocol&&(J+=H._parts.protocol+"://"),H._parts.hostname&&(H.is("punycode")&&xt?(J+=xt.toUnicode(H._parts.hostname),H._parts.port&&(J+=":"+H._parts.port)):J+=H.host()),H._parts.hostname&&H._parts.path&&"/"!==H._parts.path.charAt(0)&&(J+="/"),J+=H.path(!0),H._parts.query){for(var le="",xe=0,ge=H._parts.query.split("&"),Ne=ge.length;xe<Ne;xe++){var He=(ge[xe]||"").split("=");le+="&"+ue.decodeQuery(He[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==He[1]&&(le+="="+ue.decodeQuery(He[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}J+="?"+le.substring(1)}return J+ue.decodeQuery(H.hash(),!0)},ae.absoluteTo=function(H){var xe,ge,Ne,J=this.clone(),le=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(H instanceof ue||(H=new ue(H)),J._parts.protocol||(J._parts.protocol=H._parts.protocol,this._parts.hostname))return J;for(ge=0;Ne=le[ge];ge++)J._parts[Ne]=H._parts[Ne];return J._parts.path?(".."===J._parts.path.substring(-2)&&(J._parts.path+="/"),"/"!==J.path().charAt(0)&&(xe=(xe=H.directory())||(0===H.path().indexOf("/")?"/":""),J._parts.path=(xe?xe+"/":"")+J._parts.path,J.normalizePath())):(J._parts.path=H._parts.path,J._parts.query||(J._parts.query=H._parts.query)),J.build(),J},ae.relativeTo=function(H){var le,xe,ge,Ne,He,J=this.clone().normalize();if(J._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(H=new ue(H).normalize(),le=J._parts,xe=H._parts,Ne=J.path(),He=H.path(),"/"!==Ne.charAt(0))throw new Error("URI is already relative");if("/"!==He.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(le.protocol===xe.protocol&&(le.protocol=null),le.username!==xe.username||le.password!==xe.password||null!==le.protocol||null!==le.username||null!==le.password)return J.build();if(le.hostname!==xe.hostname||le.port!==xe.port)return J.build();if(le.hostname=null,le.port=null,Ne===He)return le.path="",J.build();if(!(ge=ue.commonPath(Ne,He)))return J.build();var Nt=xe.path.substring(ge.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return le.path=Nt+le.path.substring(ge.length)||"./",J.build()},ae.equals=function(H){var xe,ge,He,Nt,hn,J=this.clone(),le=new ue(H),Ne={};if(J.normalize(),le.normalize(),J.toString()===le.toString())return!0;if(He=J.query(),Nt=le.query(),J.query(""),le.query(""),J.toString()!==le.toString()||He.length!==Nt.length)return!1;for(hn in xe=ue.parseQuery(He,this._parts.escapeQuerySpace),ge=ue.parseQuery(Nt,this._parts.escapeQuerySpace),xe)if(be.call(xe,hn)){if(De(xe[hn])){if(!g(xe[hn],ge[hn]))return!1}else if(xe[hn]!==ge[hn])return!1;Ne[hn]=!0}for(hn in ge)if(be.call(ge,hn)&&!Ne[hn])return!1;return!0},ae.preventInvalidHostname=function(H){return this._parts.preventInvalidHostname=!!H,this},ae.duplicateQueryParameters=function(H){return this._parts.duplicateQueryParameters=!!H,this},ae.escapeQuerySpace=function(H){return this._parts.escapeQuerySpace=!!H,this},ue})},8786:function(Ei,ai,wt){var Zn;Ei=wt.nmd(Ei),function(pn){"object"==typeof global&&global;var Jt,mt=2147483647,c=36,E=26,ae=38,be=700,Be=/^xn--/,Me=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,it={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ze=c-1,Ve=Math.floor,ke=String.fromCharCode;function ht(ge){throw new RangeError(it[ge])}function rt(ge,Ne){for(var He=ge.length,Nt=[];He--;)Nt[He]=Ne(ge[He]);return Nt}function An(ge,Ne){var He=ge.split("@"),Nt="";return He.length>1&&(Nt=He[0]+"@",ge=He[1]),Nt+rt((ge=ge.replace(g,".")).split("."),Ne).join(".")}function T(ge){for(var hn,Gn,Ne=[],He=0,Nt=ge.length;He<Nt;)(hn=ge.charCodeAt(He++))>=55296&&hn<=56319&&He<Nt?56320==(64512&(Gn=ge.charCodeAt(He++)))?Ne.push(((1023&hn)<<10)+(1023&Gn)+65536):(Ne.push(hn),He--):Ne.push(hn);return Ne}function Xt(ge){return rt(ge,function(Ne){var He="";return Ne>65535&&(He+=ke((Ne-=65536)>>>10&1023|55296),Ne=56320|1023&Ne),He+ke(Ne)}).join("")}function tt(ge){return ge-48<10?ge-22:ge-65<26?ge-65:ge-97<26?ge-97:c}function Kt(ge,Ne){return ge+22+75*(ge<26)-((0!=Ne)<<5)}function Et(ge,Ne,He){var Nt=0;for(ge=He?Ve(ge/be):ge>>1,ge+=Ve(ge/Ne);ge>ze*E>>1;Nt+=c)ge=Ve(ge/ze);return Ve(Nt+(ze+1)*ge/(ge+ae))}function H(ge){var Nt,$i,Qi,pr,Br,Eo,Ri,gt,jn,re,Ne=[],He=ge.length,hn=0,Gn=128,pi=72;for(($i=ge.lastIndexOf("-"))<0&&($i=0),Qi=0;Qi<$i;++Qi)ge.charCodeAt(Qi)>=128&&ht("not-basic"),Ne.push(ge.charCodeAt(Qi));for(pr=$i>0?$i+1:0;pr<He;){for(Br=hn,Eo=1,Ri=c;pr>=He&&ht("invalid-input"),((gt=tt(ge.charCodeAt(pr++)))>=c||gt>Ve((mt-hn)/Eo))&&ht("overflow"),hn+=gt*Eo,!(gt<(jn=Ri<=pi?1:Ri>=pi+E?E:Ri-pi));Ri+=c)Eo>Ve(mt/(re=c-jn))&&ht("overflow"),Eo*=re;pi=Et(hn-Br,Nt=Ne.length+1,0==Br),Ve(hn/Nt)>mt-Gn&&ht("overflow"),Gn+=Ve(hn/Nt),hn%=Nt,Ne.splice(hn++,0,Gn)}return Xt(Ne)}function J(ge){var Ne,He,Nt,hn,Gn,pi,$i,Qi,pr,Br,Eo,gt,jn,re,mi,Ri=[];for(gt=(ge=T(ge)).length,Ne=128,He=0,Gn=72,pi=0;pi<gt;++pi)(Eo=ge[pi])<128&&Ri.push(ke(Eo));for(Nt=hn=Ri.length,hn&&Ri.push("-");Nt<gt;){for($i=mt,pi=0;pi<gt;++pi)(Eo=ge[pi])>=Ne&&Eo<$i&&($i=Eo);for($i-Ne>Ve((mt-He)/(jn=Nt+1))&&ht("overflow"),He+=($i-Ne)*jn,Ne=$i,pi=0;pi<gt;++pi)if((Eo=ge[pi])<Ne&&++He>mt&&ht("overflow"),Eo==Ne){for(Qi=He,pr=c;!(Qi<(Br=pr<=Gn?1:pr>=Gn+E?E:pr-Gn));pr+=c)Ri.push(ke(Kt(Br+(mi=Qi-Br)%(re=c-Br),0))),Qi=Ve(mi/re);Ri.push(ke(Kt(Qi,0))),Gn=Et(He,jn,Nt==hn),He=0,++Nt}++He,++Ne}return Ri.join("")}Jt={version:"1.3.2",ucs2:{decode:T,encode:Xt},decode:H,encode:J,toASCII:function xe(ge){return An(ge,function(Ne){return Me.test(Ne)?"xn--"+J(Ne):Ne})},toUnicode:function le(ge){return An(ge,function(Ne){return Be.test(Ne)?H(Ne.slice(4).toLowerCase()):Ne})}},void 0!==(Zn=function(){return Jt}.call(ai,wt,ai,Ei))&&(Ei.exports=Zn)}()},8394:(Ei,ai,wt)=>{"use strict";wt.r(ai),wt.d(ai,{RouteCesiumModule:()=>Tct,RouteCesiumModuleRoutingModule:()=>Rre});var Zn=wt(3223),pn=wt(7243),we=wt(1921),xt=wt(2474),un=wt(285),Jt=wt(9766);const c=function mt(e){return null!=e};function ue(e){let t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(n){t=n.stack}this.stack=t}c(Object.create)&&((ue.prototype=Object.create(Error.prototype)).constructor=ue),ue.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return c(this.stack)&&(e+=`\n${this.stack.toString()}`),e},ue.throwInstantiationError=function(){throw new ue("This function defines an interface and should not be called directly.")};const E=ue,ae={};function Le(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}ae.typeOf={},ae.defined=function(e,t){if(!c(t))throw new E(function be(e){return`${e} is required, actual value was undefined`}(e))},ae.typeOf.func=function(e,t){if("function"!=typeof t)throw new E(Le(typeof t,"function",e))},ae.typeOf.string=function(e,t){if("string"!=typeof t)throw new E(Le(typeof t,"string",e))},ae.typeOf.number=function(e,t){if("number"!=typeof t)throw new E(Le(typeof t,"number",e))},ae.typeOf.number.lessThan=function(e,t,n){if(ae.typeOf.number(e,t),t>=n)throw new E(`Expected ${e} to be less than ${n}, actual value was ${t}`)},ae.typeOf.number.lessThanOrEquals=function(e,t,n){if(ae.typeOf.number(e,t),t>n)throw new E(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)},ae.typeOf.number.greaterThan=function(e,t,n){if(ae.typeOf.number(e,t),t<=n)throw new E(`Expected ${e} to be greater than ${n}, actual value was ${t}`)},ae.typeOf.number.greaterThanOrEquals=function(e,t,n){if(ae.typeOf.number(e,t),t<n)throw new E(`Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`)},ae.typeOf.object=function(e,t){if("object"!=typeof t)throw new E(Le(typeof t,"object",e))},ae.typeOf.bool=function(e,t){if("boolean"!=typeof t)throw new E(Le(typeof t,"boolean",e))},ae.typeOf.bigint=function(e,t){if("bigint"!=typeof t)throw new E(Le(typeof t,"bigint",e))},ae.typeOf.number.equals=function(e,t,n,i){if(ae.typeOf.number(e,n),ae.typeOf.number(t,i),n!==i)throw new E(`${e} must be equal to ${t}, the actual values are ${n} and ${i}`)};const A=ae,Be=function De(e,t,n){A.defined("array",e),A.defined("itemToFind",t),A.defined("comparator",n);let r,s,i=0,o=e.length-1;for(;i<=o;)if(r=~~((i+o)/2),s=n(e[r],t),s<0)i=r+1;else{if(!(s>0))return r;o=r-1}return~(o+1)};function Me(e,t){return e??t}Me.EMPTY_OBJECT=Object.freeze({});const g=Me,ze=function it(e){if(null===e||isNaN(e))throw new E("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0},Ve=[31,28,31,30,31,30,31,31,30,31,30,31],Ze=function ke(e,t,n,i,o,r,s,a){e=g(e,1),t=g(t,1),n=g(n,1),i=g(i,0),o=g(o,0),r=g(r,0),s=g(s,0),a=g(a,!1),function y(){A.typeOf.number.greaterThanOrEquals("Year",e,1),A.typeOf.number.lessThanOrEquals("Year",e,9999),A.typeOf.number.greaterThanOrEquals("Month",t,1),A.typeOf.number.lessThanOrEquals("Month",t,12),A.typeOf.number.greaterThanOrEquals("Day",n,1),A.typeOf.number.lessThanOrEquals("Day",n,31),A.typeOf.number.greaterThanOrEquals("Hour",i,0),A.typeOf.number.lessThanOrEquals("Hour",i,23),A.typeOf.number.greaterThanOrEquals("Minute",o,0),A.typeOf.number.lessThanOrEquals("Minute",o,59),A.typeOf.bool("IsLeapSecond",a),A.typeOf.number.greaterThanOrEquals("Second",r,0),A.typeOf.number.lessThanOrEquals("Second",r,a?60:59),A.typeOf.number.greaterThanOrEquals("Millisecond",s,0),A.typeOf.number.lessThan("Millisecond",s,1e3)}(),function b(){const x=2===t&&ze(e)?Ve[t-1]+1:Ve[t-1];if(n>x)throw new E("Month and Day represents invalid date")}(),this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=s,this.isLeapSecond=a},rt=function ht(e,t){this.julianDate=e,this.offset=t},T=Object.freeze({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:2400000.5}),tt=Object.freeze({UTC:0,TAI:1}),Kt=new Ze,Et=[31,28,31,30,31,30,31,31,30,31,30,31];function J(e,t){return gt.compare(e.julianDate,t.julianDate)}const le=new rt;function xe(e){le.julianDate=e;const t=gt.leapSeconds;let n=Be(t,le,J);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&>.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),gt.addSeconds(e,i,e)}function ge(e,t){le.julianDate=e;const n=gt.leapSeconds;let i=Be(n,le,J);if(i<0&&(i=~i),0===i)return gt.addSeconds(e,-n[0].offset,t);if(i>=n.length)return gt.addSeconds(e,-n[i-1].offset,t);const o=gt.secondsDifference(n[i].julianDate,e);return 0===o?gt.addSeconds(e,-n[i].offset,t):o<=1?void 0:gt.addSeconds(e,-n[--i].offset,t)}function Ne(e,t,n){const i=t/T.SECONDS_PER_DAY|0;return e+=i,(t-=T.SECONDS_PER_DAY*i)<0&&(e--,t+=T.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function He(e,t,n,i,o,r,s){const a=(t-14)/12|0,l=e+4800+a;let u=(1461*l/4|0)+(367*(t-2-12*a)/12|0)-(3*((l+100)/100|0)/4|0)+n-32075;(i-=12)<0&&(i+=24);const d=r+(i*T.SECONDS_PER_HOUR+o*T.SECONDS_PER_MINUTE+s*T.SECONDS_PER_MILLISECOND);return d>=43200&&(u-=1),[u,d]}const Nt=/^(\d{4})$/,hn=/^(\d{4})-(\d{2})$/,Gn=/^(\d{4})-?(\d{3})$/,pi=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,$i=/^(\d{4})-?(\d{2})-?(\d{2})$/,Qi=/([Z+\-])?(\d{2})?:?(\d{2})?$/,pr=/^(\d{2})(\.\d+)?/.source+Qi.source,Br=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Qi.source,Eo=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Qi.source,Ri="Invalid ISO 8601 date.";function gt(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=g(e,0),t=g(t,0),n=g(n,tt.UTC);const i=0|e;Ne(i,t+=(e-i)*T.SECONDS_PER_DAY,this),n===tt.UTC&&xe(this)}gt.fromGregorianDate=function(e,t){if(!(e instanceof Ze))throw new E("date must be a valid GregorianDate.");const n=He(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return c(t)?(Ne(n[0],n[1],t),xe(t),t):new gt(n[0],n[1],tt.UTC)},gt.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new E("date must be a valid JavaScript Date.");const n=He(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return c(t)?(Ne(n[0],n[1],t),xe(t),t):new gt(n[0],n[1],tt.UTC)},gt.fromIso8601=function(e,t){if("string"!=typeof e)throw new E(Ri);let i,n=(e=e.replace(",",".")).split("T"),o=1,r=1,s=0,a=0,l=0,u=0;const d=n[0],h=n[1];let m,_,p,y;if(!c(d))throw new E(Ri);if(n=d.match($i),null!==n){if(p=d.split("-").length-1,p>0&&2!==p)throw new E(Ri);i=+n[1],o=+n[2],r=+n[3]}else if(n=d.match(hn),null!==n)i=+n[1],o=+n[2];else if(n=d.match(Nt),null!==n)i=+n[1];else{let C;if(n=d.match(Gn),null!==n){if(i=+n[1],C=+n[2],_=ze(i),C<1||_&&C>366||!_&&C>365)throw new E(Ri)}else{if(n=d.match(pi),null===n)throw new E(Ri);{i=+n[1];const w=+n[2],v=+n[3]||0;if(p=d.split("-").length-1,p>0&&(!c(n[3])&&1!==p||c(n[3])&&2!==p))throw new E(Ri);C=7*w+v-new Date(Date.UTC(i,0,4)).getUTCDay()-3}}m=new Date(Date.UTC(i,0,1)),m.setUTCDate(C),o=m.getUTCMonth()+1,r=m.getUTCDate()}if(_=ze(i),o<1||o>12||r<1||(2!==o||!_)&&r>Et[o-1]||_&&2===o&&r>29)throw new E(Ri);if(c(h)){if(n=h.match(Eo),null!==n){if(p=h.split(":").length-1,p>0&&2!==p&&3!==p)throw new E(Ri);s=+n[1],a=+n[2],l=+n[3],u=1e3*+(n[4]||0),y=5}else if(n=h.match(Br),null!==n){if(p=h.split(":").length-1,p>2)throw new E(Ri);s=+n[1],a=+n[2],l=60*+(n[3]||0),y=4}else{if(n=h.match(pr),null===n)throw new E(Ri);s=+n[1],a=60*+(n[2]||0),y=3}if(a>=60||l>=61||s>24||24===s&&(a>0||l>0||u>0))throw new E(Ri);const w=+n[y+1],v=+(n[y+2]||0);switch(n[y]){case"+":s-=w,a-=v;break;case"-":s+=w,a+=v;break;case"Z":break;default:a+=new Date(Date.UTC(i,o-1,r,s,a)).getTimezoneOffset()}}const b=60===l;for(b&&l--;a>=60;)a-=60,s++;for(;s>=24;)s-=24,r++;for(m=_&&2===o?29:Et[o-1];r>m;)r-=m,o++,o>12&&(o-=12,i++),m=_&&2===o?29:Et[o-1];for(;a<0;)a+=60,s--;for(;s<0;)s+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),m=_&&2===o?29:Et[o-1],r+=m;const x=He(i,o,r,s,a,l,u);return c(t)?(Ne(x[0],x[1],t),xe(t)):t=new gt(x[0],x[1],tt.UTC),b&>.addSeconds(t,1,t),t},gt.now=function(e){return gt.fromDate(new Date,e)};const jn=new gt(0,0,tt.TAI);gt.toGregorianDate=function(e,t){if(!c(e))throw new E("julianDate is required.");let n=!1,i=ge(e,jn);c(i)||(gt.addSeconds(e,-1,jn),i=ge(jn,jn),n=!0);let o=i.dayNumber;const r=i.secondsOfDay;r>=43200&&(o+=1);let s=o+68569|0;const a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;const l=4e3*(s+1)/1461001|0;s=s-(1461*l/4|0)+31|0;const u=80*s/2447|0,d=s-(2447*u/80|0)|0;s=u/11|0;const h=u+2-12*s|0,m=100*(a-49)+l+s|0;let _=r/T.SECONDS_PER_HOUR|0,p=r-_*T.SECONDS_PER_HOUR;const y=p/T.SECONDS_PER_MINUTE|0;p-=y*T.SECONDS_PER_MINUTE;let b=0|p;const x=(p-b)/T.SECONDS_PER_MILLISECOND;return _+=12,_>23&&(_-=24),n&&(b+=1),c(t)?(t.year=m,t.month=h,t.day=d,t.hour=_,t.minute=y,t.second=b,t.millisecond=x,t.isLeapSecond=n,t):new Ze(m,h,d,_,y,b,x,n)},gt.toDate=function(e){if(!c(e))throw new E("julianDate is required.");const t=gt.toGregorianDate(e,Kt);let 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))},gt.toIso8601=function(e,t){if(!c(e))throw new E("julianDate is required.");const n=gt.toGregorianDate(e,Kt);let i=n.year,o=n.month,r=n.day,s=n.hour;const a=n.minute,l=n.second,u=n.millisecond;let d;return 1e4===i&&1===o&&1===r&&0===s&&0===a&&0===l&&0===u&&(i=9999,o=12,r=31,s=24),c(t)||0===u?c(t)&&0!==t?(d=(.01*u).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")}:${l.toString().padStart(2,"0")}.${d}Z`):`${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")}:${l.toString().padStart(2,"0")}Z`:(d=(.01*u).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")}:${l.toString().padStart(2,"0")}.${d}Z`)},gt.clone=function(e,t){if(c(e))return c(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new gt(e.dayNumber,e.secondsOfDay,tt.TAI)},gt.compare=function(e,t){if(!c(e))throw new E("left is required.");if(!c(t))throw new E("right is required.");const n=e.dayNumber-t.dayNumber;return 0!==n?n:e.secondsOfDay-t.secondsOfDay},gt.equals=function(e,t){return e===t||c(e)&&c(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},gt.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(gt.secondsDifference(e,t))<=n},gt.totalDays=function(e){if(!c(e))throw new E("julianDate is required.");return e.dayNumber+e.secondsOfDay/T.SECONDS_PER_DAY},gt.secondsDifference=function(e,t){if(!c(e))throw new E("left is required.");if(!c(t))throw new E("right is required.");return(e.dayNumber-t.dayNumber)*T.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},gt.daysDifference=function(e,t){if(!c(e))throw new E("left is required.");if(!c(t))throw new E("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/T.SECONDS_PER_DAY},gt.computeTaiMinusUtc=function(e){le.julianDate=e;const t=gt.leapSeconds;let n=Be(t,le,J);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset},gt.addSeconds=function(e,t,n){if(!c(e))throw new E("julianDate is required.");if(!c(t))throw new E("seconds is required.");if(!c(n))throw new E("result is required.");return Ne(e.dayNumber,e.secondsOfDay+t,n)},gt.addMinutes=function(e,t,n){if(!c(e))throw new E("julianDate is required.");if(!c(t))throw new E("minutes is required.");if(!c(n))throw new E("result is required.");return Ne(e.dayNumber,e.secondsOfDay+t*T.SECONDS_PER_MINUTE,n)},gt.addHours=function(e,t,n){if(!c(e))throw new E("julianDate is required.");if(!c(t))throw new E("hours is required.");if(!c(n))throw new E("result is required.");return Ne(e.dayNumber,e.secondsOfDay+t*T.SECONDS_PER_HOUR,n)},gt.addDays=function(e,t,n){if(!c(e))throw new E("julianDate is required.");if(!c(t))throw new E("days is required.");if(!c(n))throw new E("result is required.");return Ne(e.dayNumber+t,e.secondsOfDay,n)},gt.lessThan=function(e,t){return gt.compare(e,t)<0},gt.lessThanOrEquals=function(e,t){return gt.compare(e,t)<=0},gt.greaterThan=function(e,t){return gt.compare(e,t)>0},gt.greaterThanOrEquals=function(e,t){return gt.compare(e,t)>=0},gt.prototype.clone=function(e){return gt.clone(this,e)},gt.prototype.equals=function(e){return gt.equals(this,e)},gt.prototype.equalsEpsilon=function(e,t){return gt.equalsEpsilon(this,e,t)},gt.prototype.toString=function(){return gt.toIso8601(this)},gt.leapSeconds=[new rt(new gt(2441317,43210,tt.TAI),10),new rt(new gt(2441499,43211,tt.TAI),11),new rt(new gt(2441683,43212,tt.TAI),12),new rt(new gt(2442048,43213,tt.TAI),13),new rt(new gt(2442413,43214,tt.TAI),14),new rt(new gt(2442778,43215,tt.TAI),15),new rt(new gt(2443144,43216,tt.TAI),16),new rt(new gt(2443509,43217,tt.TAI),17),new rt(new gt(2443874,43218,tt.TAI),18),new rt(new gt(2444239,43219,tt.TAI),19),new rt(new gt(2444786,43220,tt.TAI),20),new rt(new gt(2445151,43221,tt.TAI),21),new rt(new gt(2445516,43222,tt.TAI),22),new rt(new gt(2446247,43223,tt.TAI),23),new rt(new gt(2447161,43224,tt.TAI),24),new rt(new gt(2447892,43225,tt.TAI),25),new rt(new gt(2448257,43226,tt.TAI),26),new rt(new gt(2448804,43227,tt.TAI),27),new rt(new gt(2449169,43228,tt.TAI),28),new rt(new gt(2449534,43229,tt.TAI),29),new rt(new gt(2450083,43230,tt.TAI),30),new rt(new gt(2450630,43231,tt.TAI),31),new rt(new gt(2451179,43232,tt.TAI),32),new rt(new gt(2453736,43233,tt.TAI),33),new rt(new gt(2454832,43234,tt.TAI),34),new rt(new gt(2456109,43235,tt.TAI),35),new rt(new gt(2457204,43236,tt.TAI),36),new rt(new gt(2457754,43237,tt.TAI),37)];const re=gt;function mi(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function ji(e,t){return t-e}Object.defineProperties(mi.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),mi.prototype.addEventListener=function(e,t){A.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);const n=this;return function(){n.removeEventListener(e,t)}},mi.prototype.removeEventListener=function(e,t){A.typeOf.func("listener",e);const n=this._listeners,i=this._scopes;let o=-1;for(let r=0;r<n.length;r++)if(n[r]===e&&i[r]===t){o=r;break}return-1!==o&&(this._insideRaiseEvent?(this._toRemove.push(o),n[o]=void 0,i[o]=void 0):(n.splice(o,1),i.splice(o,1)),!0)},mi.prototype.raiseEvent=function(){let e;this._insideRaiseEvent=!0;const t=this._listeners,n=this._scopes;let i=t.length;for(e=0;e<i;e++)c(t[e])&&t[e].apply(n[e],arguments);const o=this._toRemove;if(i=o.length,i>0){for(o.sort(ji),e=0;e<i;e++){const r=o[e];t.splice(r,1),n.splice(r,1)}o.length=0}this._insideRaiseEvent=!1};const Ye=mi;function Li(e){e=g(e,g.EMPTY_OBJECT),this.start=c(e.start)?re.clone(e.start):new re,this.stop=c(e.stop)?re.clone(e.stop):new re,this.data=e.data,this.isStartIncluded=g(e.isStartIncluded,!0),this.isStopIncluded=g(e.isStopIncluded,!0)}Object.defineProperties(Li.prototype,{isEmpty:{get:function(){const e=re.compare(this.stop,this.start);return e<0||0===e&&(!this.isStartIncluded||!this.isStopIncluded)}}});const Qc={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};Li.fromIso8601=function(e,t){A.typeOf.object("options",e),A.typeOf.string("options.iso8601",e.iso8601);const n=e.iso8601.split("/");if(2!==n.length)throw new E("options.iso8601 is an invalid ISO 8601 interval.");const i=re.fromIso8601(n[0]),o=re.fromIso8601(n[1]),r=g(e.isStartIncluded,!0),s=g(e.isStopIncluded,!0),a=e.data;return c(t)?(t.start=i,t.stop=o,t.isStartIncluded=r,t.isStopIncluded=s,t.data=a,t):(Qc.start=i,Qc.stop=o,Qc.isStartIncluded=r,Qc.isStopIncluded=s,Qc.data=a,new Li(Qc))},Li.toIso8601=function(e,t){return A.typeOf.object("timeInterval",e),`${re.toIso8601(e.start,t)}/${re.toIso8601(e.stop,t)}`},Li.clone=function(e,t){if(c(e))return c(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new Li(e)},Li.equals=function(e,t,n){return e===t||c(e)&&c(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&re.equals(e.start,t.start)&&re.equals(e.stop,t.stop)&&(e.data===t.data||c(n)&&n(e.data,t.data)))},Li.equalsEpsilon=function(e,t,n,i){return n=g(n,0),e===t||c(e)&&c(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&re.equalsEpsilon(e.start,t.start,n)&&re.equalsEpsilon(e.stop,t.stop,n)&&(e.data===t.data||c(i)&&i(e.data,t.data)))},Li.intersect=function(e,t,n,i){if(A.typeOf.object("left",e),!c(t))return Li.clone(Li.EMPTY,n);const o=e.start,r=e.stop,s=t.start,a=t.stop,l=re.greaterThanOrEquals(s,o)&&re.greaterThanOrEquals(r,s),u=!l&&re.lessThanOrEquals(s,o)&&re.lessThanOrEquals(o,a);if(!l&&!u)return Li.clone(Li.EMPTY,n);const d=e.isStartIncluded,h=e.isStopIncluded,m=t.isStartIncluded,_=t.isStopIncluded,p=re.lessThan(r,a);return c(n)||(n=new Li),n.start=l?s:o,n.isStartIncluded=d&&m||!re.equals(s,o)&&(l&&m||u&&d),n.stop=p?r:a,n.isStopIncluded=p?h:h&&_||!re.equals(a,r)&&_,n.data=c(i)?i(e.data,t.data):e.data,n},Li.contains=function(e,t){if(A.typeOf.object("timeInterval",e),A.typeOf.object("julianDate",t),e.isEmpty)return!1;const n=re.compare(e.start,t);if(0===n)return e.isStartIncluded;const i=re.compare(t,e.stop);return 0===i?e.isStopIncluded:n<0&&i<0},Li.prototype.clone=function(e){return Li.clone(this,e)},Li.prototype.equals=function(e,t){return Li.equals(this,e,t)},Li.prototype.equalsEpsilon=function(e,t,n){return Li.equalsEpsilon(this,e,t,n)},Li.prototype.toString=function(){return Li.toIso8601(this)},Li.EMPTY=Object.freeze(new Li({start:new re,stop:new re,isStartIncluded:!1,isStopIncluded:!1}));const _i=Li,kT=Object.freeze(re.fromIso8601("0000-01-01T00:00:00Z")),Ry=Object.freeze(re.fromIso8601("9999-12-31T24:00:00Z")),It={MINIMUM_VALUE:kT,MAXIMUM_VALUE:Ry,MAXIMUM_INTERVAL:Object.freeze(new _i({start:kT,stop:Ry}))};function ap(e,t){return re.compare(e.start,t.start)}function yo(e){if(this._intervals=[],this._changedEvent=new Ye,c(e)){const t=e.length;for(let n=0;n<t;n++)this.addInterval(e[n])}}Object.defineProperties(yo.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){const e=this._intervals;return 0===e.length?void 0:e[0].start}},isStartIncluded:{get:function(){const e=this._intervals;return 0!==e.length&&e[0].isStartIncluded}},stop:{get:function(){const e=this._intervals,t=e.length;return 0===t?void 0:e[t-1].stop}},isStopIncluded:{get:function(){const e=this._intervals,t=e.length;return 0!==t&&e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return 0===this._intervals.length}}}),yo.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof yo))return!1;const n=this._intervals,i=e._intervals,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;r++)if(!_i.equals(n[r],i[r],t))return!1;return!0},yo.prototype.get=function(e){if(!c(e))throw new E("index is required.");return this._intervals[e]},yo.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},yo.prototype.findIntervalContainingDate=function(e){const t=this.indexOf(e);return t>=0?this._intervals[t]:void 0},yo.prototype.findDataForIntervalContainingDate=function(e){const t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0},yo.prototype.contains=function(e){return this.indexOf(e)>=0};const UT=new _i;yo.prototype.indexOf=function(e){if(!c(e))throw new E("date is required");const t=this._intervals;UT.start=e,UT.stop=e;let n=Be(t,UT,ap);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-1<t.length&&_i.contains(t[n-1],e)?n-1:~n)},yo.prototype.findInterval=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).start,n=e.stop,i=e.isStartIncluded,o=e.isStopIncluded,r=this._intervals;for(let s=0,a=r.length;s<a;s++){const l=r[s];if((!c(t)||l.start.equals(t))&&(!c(n)||l.stop.equals(n))&&(!c(i)||l.isStartIncluded===i)&&(!c(o)||l.isStopIncluded===o))return r[s]}},yo.prototype.addInterval=function(e,t){if(!c(e))throw new E("interval is required");if(e.isEmpty)return;const n=this._intervals;if(0===n.length||re.greaterThan(e.start,n[n.length-1].stop))return n.push(e),void this._changedEvent.raiseEvent(this);let o,i=Be(n,e,ap);for(i<0?i=~i:i>0&&e.isStartIncluded&&n[i-1].isStartIncluded&&n[i-1].start.equals(e.start)?--i:i<n.length&&!e.isStartIncluded&&n[i].isStartIncluded&&n[i].start.equals(e.start)&&++i,i>0&&(o=re.compare(n[i-1].stop,e.start),(o>0||0===o&&(n[i-1].isStopIncluded||e.isStartIncluded))&&((c(t)?t(n[i-1].data,e.data):n[i-1].data===e.data)?(e=re.greaterThan(e.stop,n[i-1].stop)?new _i({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):new _i({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=re.compare(n[i-1].stop,e.stop),(o>0||0===o&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new _i({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 _i({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i<n.length&&(o=re.compare(e.stop,n[i].start),o>0||0===o&&(e.isStopIncluded||n[i].isStartIncluded));)if(c(t)?t(n[i].data,e.data):n[i].data===e.data)e=new _i({start:e.start,stop:re.greaterThan(n[i].stop,e.stop)?n[i].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:re.greaterThan(n[i].stop,e.stop)?n[i].isStopIncluded:e.isStopIncluded,data:e.data}),n.splice(i,1);else{if(n[i]=new _i({start:e.stop,stop:n[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i].isStopIncluded,data:n[i].data}),!n[i].isEmpty)break;n.splice(i,1)}n.splice(i,0,e),this._changedEvent.raiseEvent(this)},yo.prototype.removeInterval=function(e){if(!c(e))throw new E("interval is required");if(e.isEmpty)return!1;const t=this._intervals;let n=Be(t,e,ap);n<0&&(n=~n);let i=!1;for(n>0&&(re.greaterThan(t[n-1].stop,e.start)||t[n-1].stop.equals(e.start)&&t[n-1].isStopIncluded&&e.isStartIncluded)&&(i=!0,(re.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 _i({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 _i({start:t[n-1].start,stop:e.start,isStartIncluded:t[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[n-1].data})),n<t.length&&!e.isStartIncluded&&t[n].isStartIncluded&&e.start.equals(t[n].start)&&(i=!0,t.splice(n,0,new _i({start:t[n].start,stop:t[n].start,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data})),++n);n<t.length&&re.greaterThan(e.stop,t[n].stop);)i=!0,t.splice(n,1);return n<t.length&&e.stop.equals(t[n].stop)&&(i=!0,!e.isStopIncluded&&t[n].isStopIncluded?n+1<t.length&&t[n+1].start.equals(e.stop)&&t[n].data===t[n+1].data?(t.splice(n,1),t[n]=new _i({start:t[n].start,stop:t[n].stop,isStartIncluded:!0,isStopIncluded:t[n].isStopIncluded,data:t[n].data})):t[n]=new _i({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data}):t.splice(n,1)),n<t.length&&(re.greaterThan(e.stop,t[n].start)||e.stop.equals(t[n].start)&&e.isStopIncluded&&t[n].isStartIncluded)&&(i=!0,t[n]=new _i({start:e.stop,stop:t[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n].isStopIncluded,data:t[n].data})),i&&this._changedEvent.raiseEvent(this),i},yo.prototype.intersect=function(e,t,n){if(!c(e))throw new E("other is required.");const i=new yo;let o=0,r=0;const s=this._intervals,a=e._intervals;for(;o<s.length&&r<a.length;){const l=s[o],u=a[r];if(re.lessThan(l.stop,u.start))++o;else if(re.lessThan(u.stop,l.start))++r;else{if(c(n)||c(t)&&t(l.data,u.data)||!c(t)&&u.data===l.data){const d=_i.intersect(l,u,new _i,n);d.isEmpty||i.addInterval(d,t)}re.lessThan(l.stop,u.stop)||l.stop.equals(u.stop)&&!l.isStopIncluded&&u.isStopIncluded?++o:++r}}return i},yo.fromJulianDateArray=function(e,t){if(!c(e))throw new E("options is required.");if(!c(e.julianDates))throw new E("options.iso8601Array is required.");c(t)||(t=new yo);const n=e.julianDates,i=n.length,o=e.dataCallback,r=g(e.isStartIncluded,!0),s=g(e.isStopIncluded,!0),a=g(e.leadingInterval,!1),l=g(e.trailingInterval,!1);let u,d=0;a&&(++d,u=new _i({start:It.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!r}),u.data=c(o)?o(u,t.length):t.length,t.addInterval(u));for(let h=0;h<i-1;++h){let m=n[h];const _=n[h+1];u=new _i({start:m,stop:_,isStartIncluded:t.length!==d||r,isStopIncluded:h===i-2&&s}),u.data=c(o)?o(u,t.length):t.length,t.addInterval(u),m=_}return l&&(u=new _i({start:n[i-1],stop:It.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0}),u.data=c(o)?o(u,t.length):t.length,t.addInterval(u)),t};const Is=new Ze,Jm=[0,31,28,31,30,31,30,31,31,30,31,30,31];function e_(e,t,n){c(n)||(n=new re),re.toGregorianDate(e,Is);let i=Is.millisecond+t.millisecond,o=Is.second+t.second,r=Is.minute+t.minute,s=Is.hour+t.hour,a=Is.day+t.day,l=Is.month+t.month,u=Is.year+t.year;for(i>=1e3&&(o+=Math.floor(i/1e3),i%=1e3),o>=60&&(r+=Math.floor(o/60),o%=60),r>=60&&(s+=Math.floor(r/60),r%=60),s>=24&&(a+=Math.floor(s/24),s%=24),Jm[2]=ze(u)?29:28;a>Jm[l]||l>=13;)a>Jm[l]&&(a-=Jm[l],++l),l>=13&&(--l,u+=Math.floor(l/12),l%=12,++l),Jm[2]=ze(u)?29:28;return Is.millisecond=i,Is.second=o,Is.minute=r,Is.hour=s,Is.day=a,Is.month=l,Is.year=u,re.fromGregorianDate(Is,n)}const Zs=new re,t_=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function Ly(e,t){if(!c(e)||0===e.length)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,"P"===e[0]){const n=e.match(t_);if(!c(n))return!1;if(c(n[1])&&(t.year=Number(n[1].replace(",","."))),c(n[2])&&(t.month=Number(n[2].replace(",","."))),c(n[3])&&(t.day=7*Number(n[3].replace(",","."))),c(n[4])&&(t.day+=Number(n[4].replace(",","."))),c(n[5])&&(t.hour=Number(n[5].replace(",","."))),c(n[6])&&(t.minute=Number(n[6].replace(",","."))),c(n[7])){const i=Number(n[7].replace(",","."));t.second=Math.floor(i),t.millisecond=i%1*1e3}}else"Z"!==e[e.length-1]&&(e+="Z"),re.toGregorianDate(re.fromIso8601(e,Zs),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}const n_=new Ze;yo.fromIso8601=function(e,t){if(!c(e))throw new E("options is required.");if(!c(e.iso8601))throw new E("options.iso8601 is required.");const n=e.iso8601.split("/"),i=re.fromIso8601(n[0]),o=re.fromIso8601(n[1]),r=[];if(Ly(n[2],n_)){let s=re.clone(i);for(r.push(s);re.compare(s,o)<0;)s=e_(s,n_),re.compare(o,s)<=0&&re.clone(o,s),r.push(s)}else r.push(i,o);return yo.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},yo.fromIso8601DateArray=function(e,t){if(!c(e))throw new E("options is required.");if(!c(e.iso8601Dates))throw new E("options.iso8601Dates is required.");return yo.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(n){return re.fromIso8601(n)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},yo.fromIso8601DurationArray=function(e,t){if(!c(e))throw new E("options is required.");if(!c(e.epoch))throw new E("options.epoch is required.");if(!c(e.iso8601Durations))throw new E("options.iso8601Durations is required.");const n=e.epoch,i=e.iso8601Durations,o=g(e.relativeToPrevious,!1),r=[];let s,a;const l=i.length;for(let u=0;u<l;++u)(Ly(i[u],n_)||0===u)&&(s=o&&c(a)?e_(a,n_):e_(n,n_),r.push(s),a=s);return yo.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};const Jc=yo;var Ny=wt(9997);const _t={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536,FOUR_GIGABYTES:4294967296};_t.sign=g(Math.sign,function(t){return 0==(t=+t)||t!=t?t:t>0?1:-1}),_t.signNotZero=function(e){return e<0?-1:1},_t.toSNorm=function(e,t){return t=g(t,255),Math.round((.5*_t.clamp(e,-1,1)+.5)*t)},_t.fromSNorm=function(e,t){return t=g(t,255),_t.clamp(e,0,t)/t*2-1},_t.normalize=function(e,t,n){return 0===(n=Math.max(n-t,0))?0:_t.clamp((e-t)/n,0,1)},_t.sinh=g(Math.sinh,function(t){return(Math.exp(t)-Math.exp(-t))/2}),_t.cosh=g(Math.cosh,function(t){return(Math.exp(t)+Math.exp(-t))/2}),_t.lerp=function(e,t,n){return(1-n)*e+n*t},_t.PI=Math.PI,_t.ONE_OVER_PI=1/Math.PI,_t.PI_OVER_TWO=Math.PI/2,_t.PI_OVER_THREE=Math.PI/3,_t.PI_OVER_FOUR=Math.PI/4,_t.PI_OVER_SIX=Math.PI/6,_t.THREE_PI_OVER_TWO=3*Math.PI/2,_t.TWO_PI=2*Math.PI,_t.ONE_OVER_TWO_PI=1/(2*Math.PI),_t.RADIANS_PER_DEGREE=Math.PI/180,_t.DEGREES_PER_RADIAN=180/Math.PI,_t.RADIANS_PER_ARCSECOND=_t.RADIANS_PER_DEGREE/3600,_t.toRadians=function(e){if(!c(e))throw new E("degrees is required.");return e*_t.RADIANS_PER_DEGREE},_t.toDegrees=function(e){if(!c(e))throw new E("radians is required.");return e*_t.DEGREES_PER_RADIAN},_t.convertLongitudeRange=function(e){if(!c(e))throw new E("angle is required.");const t=_t.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n},_t.clampToLatitudeRange=function(e){if(!c(e))throw new E("angle is required.");return _t.clamp(e,-1*_t.PI_OVER_TWO,_t.PI_OVER_TWO)},_t.negativePiToPi=function(e){if(!c(e))throw new E("angle is required.");return e>=-_t.PI&&e<=_t.PI?e:_t.zeroToTwoPi(e+_t.PI)-_t.PI},_t.zeroToTwoPi=function(e){if(!c(e))throw new E("angle is required.");if(e>=0&&e<=_t.TWO_PI)return e;const t=_t.mod(e,_t.TWO_PI);return Math.abs(t)<_t.EPSILON14&&Math.abs(e)>_t.EPSILON14?_t.TWO_PI:t},_t.mod=function(e,t){if(!c(e))throw new E("m is required.");if(!c(t))throw new E("n is required.");if(0===t)throw new E("divisor cannot be 0.");return _t.sign(e)===_t.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t},_t.equalsEpsilon=function(e,t,n,i){if(!c(e))throw new E("left is required.");if(!c(t))throw new E("right is required.");n=g(n,0),i=g(i,n);const o=Math.abs(e-t);return o<=i||o<=n*Math.max(Math.abs(e),Math.abs(t))},_t.lessThan=function(e,t,n){if(!c(e))throw new E("first is required.");if(!c(t))throw new E("second is required.");if(!c(n))throw new E("absoluteEpsilon is required.");return e-t<-n},_t.lessThanOrEquals=function(e,t,n){if(!c(e))throw new E("first is required.");if(!c(t))throw new E("second is required.");if(!c(n))throw new E("absoluteEpsilon is required.");return e-t<n},_t.greaterThan=function(e,t,n){if(!c(e))throw new E("first is required.");if(!c(t))throw new E("second is required.");if(!c(n))throw new E("absoluteEpsilon is required.");return e-t>n},_t.greaterThanOrEquals=function(e,t,n){if(!c(e))throw new E("first is required.");if(!c(t))throw new E("second is required.");if(!c(n))throw new E("absoluteEpsilon is required.");return e-t>-n};const Ya=[1];_t.factorial=function(e){if("number"!=typeof e||e<0)throw new E("A number greater than or equal to 0 is required.");const t=Ya.length;if(e>=t){let n=Ya[t-1];for(let i=t;i<=e;i++){const o=n*i;Ya.push(o),n=o}}return Ya[e]},_t.incrementWrap=function(e,t,n){if(n=g(n,0),!c(e))throw new E("n is required.");if(t<=n)throw new E("maximumValue must be greater than minimumValue.");return++e>t&&(e=n),e},_t.isPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>4294967295)throw new E("A number between 0 and (2^32)-1 is required.");return 0!==e&&0==(e&e-1)},_t.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>2147483648)throw new E("A number between 0 and 2^31 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},_t.previousPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>4294967295)throw new E("A number between 0 and (2^32)-1 is required.");return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,((e|=e>>32)>>>0)-(e>>>1)},_t.clamp=function(e,t,n){return A.typeOf.number("value",e),A.typeOf.number("min",t),A.typeOf.number("max",n),e<t?t:e>n?n:e};let My=new Ny;_t.setRandomNumberSeed=function(e){if(!c(e))throw new E("seed is required.");My=new Ny(e)},_t.nextRandomNumber=function(){return My.random()},_t.randomBetween=function(e,t){return _t.nextRandomNumber()*(t-e)+e},_t.acosClamped=function(e){if(!c(e))throw new E("value is required.");return Math.acos(_t.clamp(e,-1,1))},_t.asinClamped=function(e){if(!c(e))throw new E("value is required.");return Math.asin(_t.clamp(e,-1,1))},_t.chordLength=function(e,t){if(!c(e))throw new E("angle is required.");if(!c(t))throw new E("radius is required.");return 2*t*Math.sin(.5*e)},_t.logBase=function(e,t){if(!c(e))throw new E("number is required.");if(!c(t))throw new E("base is required.");return Math.log(e)/Math.log(t)},_t.cbrt=g(Math.cbrt,function(t){const n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n}),_t.log2=g(Math.log2,function(t){return Math.log(t)*Math.LOG2E}),_t.fog=function(e,t){const n=e*t;return 1-Math.exp(-n*n)},_t.fastApproximateAtan=function(e){return A.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},_t.fastApproximateAtan2=function(e,t){A.typeOf.number("x",e),A.typeOf.number("y",t);let n,i=Math.abs(e);n=Math.abs(t);const o=Math.max(i,n);n=Math.min(i,n);const r=n/o;if(isNaN(r))throw new E("either x or y must be nonzero");return i=_t.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?_t.PI_OVER_TWO-i:i,i=e<0?_t.PI-i:i,i=t<0?-i:i,i};const O=_t;function ot(e,t,n){this.x=g(e,0),this.y=g(t,0),this.z=g(n,0)}ot.fromSpherical=function(e,t){A.typeOf.object("spherical",e),c(t)||(t=new ot);const n=e.clock,i=e.cone,o=g(e.magnitude,1),r=o*Math.sin(i);return t.x=r*Math.cos(n),t.y=r*Math.sin(n),t.z=o*Math.cos(i),t},ot.fromElements=function(e,t,n,i){return c(i)?(i.x=e,i.y=t,i.z=n,i):new ot(e,t,n)},ot.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new ot(e.x,e.y,e.z)},ot.fromCartesian4=ot.clone,ot.packedLength=3,ot.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n]=e.z,t},ot.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new ot),n.x=e[t++],n.y=e[t++],n.z=e[t],n},ot.packArray=function(e,t){A.defined("array",e);const n=e.length,i=3*n;if(c(t)){if(!Array.isArray(t)&&t.length!==i)throw new E("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==i&&(t.length=i)}else t=new Array(i);for(let o=0;o<n;++o)ot.pack(e[o],t,3*o);return t},ot.unpackArray=function(e,t){if(A.defined("array",e),A.typeOf.number.greaterThanOrEquals("array.length",e.length,3),e.length%3!=0)throw new E("array length must be a multiple of 3.");const n=e.length;c(t)?t.length=n/3:t=new Array(n/3);for(let i=0;i<n;i+=3){const o=i/3;t[o]=ot.unpack(e,i,t[o])}return t},ot.fromArray=ot.unpack,ot.maximumComponent=function(e){return A.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z)},ot.minimumComponent=function(e){return A.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z)},ot.minimumByComponent=function(e,t,n){return A.typeOf.object("first",e),A.typeOf.object("second",t),A.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n},ot.maximumByComponent=function(e,t,n){return A.typeOf.object("first",e),A.typeOf.object("second",t),A.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n},ot.clamp=function(e,t,n,i){A.typeOf.object("value",e),A.typeOf.object("min",t),A.typeOf.object("max",n),A.typeOf.object("result",i);const o=O.clamp(e.x,t.x,n.x),r=O.clamp(e.y,t.y,n.y),s=O.clamp(e.z,t.z,n.z);return i.x=o,i.y=r,i.z=s,i},ot.magnitudeSquared=function(e){return A.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z},ot.magnitude=function(e){return Math.sqrt(ot.magnitudeSquared(e))};const Fy=new ot;ot.distance=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),ot.subtract(e,t,Fy),ot.magnitude(Fy)},ot.distanceSquared=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),ot.subtract(e,t,Fy),ot.magnitudeSquared(Fy)},ot.normalize=function(e,t){A.typeOf.object("cartesian",e),A.typeOf.object("result",t);const n=ot.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new E("normalized result is not a number");return t},ot.dot=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z},ot.multiplyComponents=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n},ot.divideComponents=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n},ot.add=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n},ot.subtract=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n},ot.multiplyByScalar=function(e,t,n){return A.typeOf.object("cartesian",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n},ot.divideByScalar=function(e,t,n){return A.typeOf.object("cartesian",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n},ot.negate=function(e,t){return A.typeOf.object("cartesian",e),A.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t},ot.abs=function(e,t){return A.typeOf.object("cartesian",e),A.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};const XE=new ot;ot.lerp=function(e,t,n,i){return A.typeOf.object("start",e),A.typeOf.object("end",t),A.typeOf.number("t",n),A.typeOf.object("result",i),ot.multiplyByScalar(t,n,XE),i=ot.multiplyByScalar(e,1-n,i),ot.add(XE,i,i)};const By=new ot,ky=new ot;ot.angleBetween=function(e,t){A.typeOf.object("left",e),A.typeOf.object("right",t),ot.normalize(e,By),ot.normalize(t,ky);const n=ot.dot(By,ky),i=ot.magnitude(ot.cross(By,ky,By));return Math.atan2(i,n)};const ZE=new ot;ot.mostOrthogonalAxis=function(e,t){A.typeOf.object("cartesian",e),A.typeOf.object("result",t);const n=ot.normalize(e,ZE);return ot.abs(n,n),ot.clone(n.x<=n.y?n.x<=n.z?ot.UNIT_X:ot.UNIT_Z:n.y<=n.z?ot.UNIT_Y:ot.UNIT_Z,t)},ot.projectVector=function(e,t,n){A.defined("a",e),A.defined("b",t),A.defined("result",n);const i=ot.dot(e,t)/ot.dot(t,t);return ot.multiplyByScalar(t,i,n)},ot.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},ot.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]},ot.equalsEpsilon=function(e,t,n,i){return e===t||c(e)&&c(t)&&O.equalsEpsilon(e.x,t.x,n,i)&&O.equalsEpsilon(e.y,t.y,n,i)&&O.equalsEpsilon(e.z,t.z,n,i)},ot.cross=function(e,t,n){A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n);const i=e.x,o=e.y,r=e.z,s=t.x,a=t.y,l=t.z,d=r*s-i*l,h=i*a-o*s;return n.x=o*l-r*a,n.y=d,n.z=h,n},ot.midpoint=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),n.z=.5*(e.z+t.z),n},ot.fromDegrees=function(e,t,n,i,o){return A.typeOf.number("longitude",e),A.typeOf.number("latitude",t),e=O.toRadians(e),t=O.toRadians(t),ot.fromRadians(e,t,n,i,o)};let Ji=new ot,Rf=new ot;ot._ellipsoidRadiiSquared=new ot(40680631590769,40680631590769,40408299984661.445),ot.fromRadians=function(e,t,n,i,o){A.typeOf.number("longitude",e),A.typeOf.number("latitude",t),n=g(n,0);const r=c(i)?i.radiiSquared:ot._ellipsoidRadiiSquared,s=Math.cos(t);Ji.x=s*Math.cos(e),Ji.y=s*Math.sin(e),Ji.z=Math.sin(t),Ji=ot.normalize(Ji,Ji),ot.multiplyComponents(r,Ji,Rf);const a=Math.sqrt(ot.dot(Ji,Rf));return Rf=ot.divideByScalar(Rf,a,Rf),Ji=ot.multiplyByScalar(Ji,n,Ji),c(o)||(o=new ot),ot.add(Rf,Ji,o)},ot.fromDegreesArray=function(e,t,n){if(A.defined("coordinates",e),e.length<2||e.length%2!=0)throw new E("the number of coordinates must be a multiple of 2 and at least 2");const i=e.length;c(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){const a=o/2;n[a]=ot.fromDegrees(e[o],e[o+1],0,t,n[a])}return n},ot.fromRadiansArray=function(e,t,n){if(A.defined("coordinates",e),e.length<2||e.length%2!=0)throw new E("the number of coordinates must be a multiple of 2 and at least 2");const i=e.length;c(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){const a=o/2;n[a]=ot.fromRadians(e[o],e[o+1],0,t,n[a])}return n},ot.fromDegreesArrayHeights=function(e,t,n){if(A.defined("coordinates",e),e.length<3||e.length%3!=0)throw new E("the number of coordinates must be a multiple of 3 and at least 3");const i=e.length;c(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){const l=o/3;n[l]=ot.fromDegrees(e[o],e[o+1],e[o+2],t,n[l])}return n},ot.fromRadiansArrayHeights=function(e,t,n){if(A.defined("coordinates",e),e.length<3||e.length%3!=0)throw new E("the number of coordinates must be a multiple of 3 and at least 3");const i=e.length;c(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){const l=o/3;n[l]=ot.fromRadians(e[o],e[o+1],e[o+2],t,n[l])}return n},ot.ZERO=Object.freeze(new ot(0,0,0)),ot.ONE=Object.freeze(new ot(1,1,1)),ot.UNIT_X=Object.freeze(new ot(1,0,0)),ot.UNIT_Y=Object.freeze(new ot(0,1,0)),ot.UNIT_Z=Object.freeze(new ot(0,0,1)),ot.prototype.clone=function(e){return ot.clone(this,e)},ot.prototype.equals=function(e){return ot.equals(this,e)},ot.prototype.equalsEpsilon=function(e,t,n){return ot.equalsEpsilon(this,e,t,n)},ot.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};const f=ot,$E=new f,mr=new f,Uy=function i_(e,t,n,i,o){if(!c(e))throw new E("cartesian is required.");if(!c(t))throw new E("oneOverRadii is required.");if(!c(n))throw new E("oneOverRadiiSquared is required.");if(!c(i))throw new E("centerToleranceSquared is required.");const r=e.x,s=e.y,a=e.z,l=t.x,u=t.y,d=t.z,h=r*r*l*l,m=s*s*u*u,_=a*a*d*d,p=h+m+_,y=Math.sqrt(1/p),b=f.multiplyByScalar(e,y,$E);if(p<i)return isFinite(y)?f.clone(b,o):void 0;const x=n.x,C=n.y,w=n.z,v=mr;v.x=b.x*x*2,v.y=b.y*C*2,v.z=b.z*w*2;let N,R,B,F,S,D,L,M,U,z,G,I=(1-y)*f.magnitude(e)/(.5*f.magnitude(v)),P=0;do{I-=P,B=1/(1+I*x),F=1/(1+I*C),S=1/(1+I*w),D=B*B,L=F*F,M=S*S,U=D*B,z=L*F,G=M*S,N=h*D+m*L+_*M-1,R=h*U*x+m*z*C+_*G*w,P=N/(-2*R)}while(Math.abs(N)>O.EPSILON12);return c(o)?(o.x=r*B,o.y=s*F,o.z=a*S,o):new f(r*B,s*F,a*S)};function ro(e,t,n){this.longitude=g(e,0),this.latitude=g(t,0),this.height=g(n,0)}ro.fromRadians=function(e,t,n,i){return A.typeOf.number("longitude",e),A.typeOf.number("latitude",t),n=g(n,0),c(i)?(i.longitude=e,i.latitude=t,i.height=n,i):new ro(e,t,n)},ro.fromDegrees=function(e,t,n,i){return A.typeOf.number("longitude",e),A.typeOf.number("latitude",t),e=O.toRadians(e),t=O.toRadians(t),ro.fromRadians(e,t,n,i)};const zT=new f,KE=new f,QE=new f;ro._ellipsoidOneOverRadii=new f(1/6378137,1/6378137,1/6356752.314245179),ro._ellipsoidOneOverRadiiSquared=new f(1/40680631590769,1/40680631590769,1/40408299984661.445),ro._ellipsoidCenterToleranceSquared=O.EPSILON1,ro.fromCartesian=function(e,t,n){const i=c(t)?t.oneOverRadii:ro._ellipsoidOneOverRadii,o=c(t)?t.oneOverRadiiSquared:ro._ellipsoidOneOverRadiiSquared,r=c(t)?t._centerToleranceSquared:ro._ellipsoidCenterToleranceSquared,s=Uy(e,i,o,r,KE);if(!c(s))return;let a=f.multiplyComponents(s,o,zT);a=f.normalize(a,a);const l=f.subtract(e,s,QE),u=Math.atan2(a.y,a.x),d=Math.asin(a.z),h=O.sign(f.dot(l,e))*f.magnitude(l);return c(n)?(n.longitude=u,n.latitude=d,n.height=h,n):new ro(u,d,h)},ro.toCartesian=function(e,t,n){return A.defined("cartographic",e),f.fromRadians(e.longitude,e.latitude,e.height,t,n)},ro.clone=function(e,t){if(c(e))return c(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new ro(e.longitude,e.latitude,e.height)},ro.equals=function(e,t){return e===t||c(e)&&c(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},ro.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n},ro.ZERO=Object.freeze(new ro(0,0,0)),ro.prototype.clone=function(e){return ro.clone(this,e)},ro.prototype.equals=function(e){return ro.equals(this,e)},ro.prototype.equalsEpsilon=function(e,t){return ro.equalsEpsilon(this,e,t)},ro.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};const Ce=ro;function kt(e,t){this.x=g(e,0),this.y=g(t,0)}kt.fromElements=function(e,t,n){return c(n)?(n.x=e,n.y=t,n):new kt(e,t)},kt.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t):new kt(e.x,e.y)},kt.fromCartesian3=kt.clone,kt.fromCartesian4=kt.clone,kt.packedLength=2,kt.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e.x,t[n]=e.y,t},kt.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new kt),n.x=e[t++],n.y=e[t],n},kt.packArray=function(e,t){A.defined("array",e);const n=e.length,i=2*n;if(c(t)){if(!Array.isArray(t)&&t.length!==i)throw new E("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==i&&(t.length=i)}else t=new Array(i);for(let o=0;o<n;++o)kt.pack(e[o],t,2*o);return t},kt.unpackArray=function(e,t){if(A.defined("array",e),A.typeOf.number.greaterThanOrEquals("array.length",e.length,2),e.length%2!=0)throw new E("array length must be a multiple of 2.");const n=e.length;c(t)?t.length=n/2:t=new Array(n/2);for(let i=0;i<n;i+=2){const o=i/2;t[o]=kt.unpack(e,i,t[o])}return t},kt.fromArray=kt.unpack,kt.maximumComponent=function(e){return A.typeOf.object("cartesian",e),Math.max(e.x,e.y)},kt.minimumComponent=function(e){return A.typeOf.object("cartesian",e),Math.min(e.x,e.y)},kt.minimumByComponent=function(e,t,n){return A.typeOf.object("first",e),A.typeOf.object("second",t),A.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n},kt.maximumByComponent=function(e,t,n){return A.typeOf.object("first",e),A.typeOf.object("second",t),A.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n},kt.clamp=function(e,t,n,i){A.typeOf.object("value",e),A.typeOf.object("min",t),A.typeOf.object("max",n),A.typeOf.object("result",i);const o=O.clamp(e.x,t.x,n.x),r=O.clamp(e.y,t.y,n.y);return i.x=o,i.y=r,i},kt.magnitudeSquared=function(e){return A.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y},kt.magnitude=function(e){return Math.sqrt(kt.magnitudeSquared(e))};const cp=new kt;kt.distance=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),kt.subtract(e,t,cp),kt.magnitude(cp)},kt.distanceSquared=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),kt.subtract(e,t,cp),kt.magnitudeSquared(cp)},kt.normalize=function(e,t){A.typeOf.object("cartesian",e),A.typeOf.object("result",t);const n=kt.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,isNaN(t.x)||isNaN(t.y))throw new E("normalized result is not a number");return t},kt.dot=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),e.x*t.x+e.y*t.y},kt.cross=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),e.x*t.y-e.y*t.x},kt.multiplyComponents=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x*t.x,n.y=e.y*t.y,n},kt.divideComponents=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x/t.x,n.y=e.y/t.y,n},kt.add=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n},kt.subtract=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n},kt.multiplyByScalar=function(e,t,n){return A.typeOf.object("cartesian",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n},kt.divideByScalar=function(e,t,n){return A.typeOf.object("cartesian",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n},kt.negate=function(e,t){return A.typeOf.object("cartesian",e),A.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t},kt.abs=function(e,t){return A.typeOf.object("cartesian",e),A.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};const zy=new kt;kt.lerp=function(e,t,n,i){return A.typeOf.object("start",e),A.typeOf.object("end",t),A.typeOf.number("t",n),A.typeOf.object("result",i),kt.multiplyByScalar(t,n,zy),i=kt.multiplyByScalar(e,1-n,i),kt.add(zy,i,i)};const Lf=new kt,o_=new kt;kt.angleBetween=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),kt.normalize(e,Lf),kt.normalize(t,o_),O.acosClamped(kt.dot(Lf,o_))};const Vy=new kt;kt.mostOrthogonalAxis=function(e,t){A.typeOf.object("cartesian",e),A.typeOf.object("result",t);const n=kt.normalize(e,Vy);return kt.abs(n,n),kt.clone(n.x<=n.y?kt.UNIT_X:kt.UNIT_Y,t)},kt.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y},kt.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]},kt.equalsEpsilon=function(e,t,n,i){return e===t||c(e)&&c(t)&&O.equalsEpsilon(e.x,t.x,n,i)&&O.equalsEpsilon(e.y,t.y,n,i)},kt.ZERO=Object.freeze(new kt(0,0)),kt.ONE=Object.freeze(new kt(1,1)),kt.UNIT_X=Object.freeze(new kt(1,0)),kt.UNIT_Y=Object.freeze(new kt(0,1)),kt.prototype.clone=function(e){return kt.clone(this,e)},kt.prototype.equals=function(e){return kt.equals(this,e)},kt.prototype.equalsEpsilon=function(e,t,n){return kt.equalsEpsilon(this,e,t,n)},kt.prototype.toString=function(){return`(${this.x}, ${this.y})`};const V=kt;function VT(e,t,n,i){t=g(t,0),n=g(n,0),i=g(i,0),A.typeOf.number.greaterThanOrEquals("x",t,0),A.typeOf.number.greaterThanOrEquals("y",n,0),A.typeOf.number.greaterThanOrEquals("z",i,0),e._radii=new f(t,n,i),e._radiiSquared=new f(t*t,n*n,i*i),e._radiiToTheFourth=new f(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new f(0===t?0:1/t,0===n?0:1/n,0===i?0:1/i),e._oneOverRadiiSquared=new f(0===t?0:1/(t*t),0===n?0:1/(n*n),0===i?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=O.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function ci(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,VT(this,e,t,n)}Object.defineProperties(ci.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}}}),ci.clone=function(e,t){if(!c(e))return;const n=e._radii;return c(t)?(f.clone(n,t._radii),f.clone(e._radiiSquared,t._radiiSquared),f.clone(e._radiiToTheFourth,t._radiiToTheFourth),f.clone(e._oneOverRadii,t._oneOverRadii),f.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new ci(n.x,n.y,n.z)},ci.fromCartesian3=function(e,t){return c(t)||(t=new ci),c(e)&&VT(t,e.x,e.y,e.z),t},ci.WGS84=Object.freeze(new ci(6378137,6378137,6356752.314245179)),ci.UNIT_SPHERE=Object.freeze(new ci(1,1,1)),ci.MOON=Object.freeze(new ci(O.LUNAR_RADIUS,O.LUNAR_RADIUS,O.LUNAR_RADIUS)),ci._default=ci.WGS84,Object.defineProperties(ci,{default:{get:function(){return ci._default},set:function(e){A.typeOf.object("value",e),ci._default=e,f._ellipsoidRadiiSquared=e.radiiSquared,Ce._ellipsoidOneOverRadii=e.oneOverRadii,Ce._ellipsoidOneOverRadiiSquared=e.oneOverRadiiSquared,Ce._ellipsoidCenterToleranceSquared=e._centerToleranceSquared}}}),ci.prototype.clone=function(e){return ci.clone(this,e)},ci.packedLength=f.packedLength,ci.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),f.pack(e._radii,t,n),t},ci.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=f.unpack(e,t);return ci.fromCartesian3(i,n)},ci.prototype.geocentricSurfaceNormal=f.normalize,ci.prototype.geodeticSurfaceNormalCartographic=function(e,t){A.typeOf.object("cartographic",e);const 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 c(t)||(t=new f),t.x=r,t.y=s,t.z=a,f.normalize(t,t)},ci.prototype.geodeticSurfaceNormal=function(e,t){if(A.typeOf.object("cartesian",e),isNaN(e.x)||isNaN(e.y)||isNaN(e.z))throw new E("cartesian has a NaN component");if(!f.equalsEpsilon(e,f.ZERO,O.EPSILON14))return c(t)||(t=new f),t=f.multiplyComponents(e,this._oneOverRadiiSquared,t),f.normalize(t,t)};const HT=new f,r_=new f;ci.prototype.cartographicToCartesian=function(e,t){const n=HT,i=r_;this.geodeticSurfaceNormalCartographic(e,n),f.multiplyComponents(this._radiiSquared,n,i);const o=Math.sqrt(f.dot(n,i));return f.divideByScalar(i,o,i),f.multiplyByScalar(n,e.height,n),c(t)||(t=new f),f.add(i,n,t)},ci.prototype.cartographicArrayToCartesianArray=function(e,t){A.defined("cartographics",e);const n=e.length;c(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=this.cartographicToCartesian(e[i],t[i]);return t};const lp=new f,up=new f,JE=new f;ci.prototype.cartesianToCartographic=function(e,t){const n=this.scaleToGeodeticSurface(e,up);if(!c(n))return;const i=this.geodeticSurfaceNormal(n,lp),o=f.subtract(e,n,JE),r=Math.atan2(i.y,i.x),s=Math.asin(i.z),a=O.sign(f.dot(o,e))*f.magnitude(o);return c(t)?(t.longitude=r,t.latitude=s,t.height=a,t):new Ce(r,s,a)},ci.prototype.cartesianArrayToCartographicArray=function(e,t){A.defined("cartesians",e);const n=e.length;c(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.cartesianToCartographic(e[i],t[i]);return t},ci.prototype.scaleToGeodeticSurface=function(e,t){return Uy(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},ci.prototype.scaleToGeocentricSurface=function(e,t){A.typeOf.object("cartesian",e),c(t)||(t=new f);const n=e.x,i=e.y,o=e.z,r=this._oneOverRadiiSquared,s=1/Math.sqrt(n*n*r.x+i*i*r.y+o*o*r.z);return f.multiplyByScalar(e,s,t)},ci.prototype.transformPositionToScaledSpace=function(e,t){return c(t)||(t=new f),f.multiplyComponents(e,this._oneOverRadii,t)},ci.prototype.transformPositionFromScaledSpace=function(e,t){return c(t)||(t=new f),f.multiplyComponents(e,this._radii,t)},ci.prototype.equals=function(e){return this===e||c(e)&&f.equals(this._radii,e._radii)},ci.prototype.toString=function(){return this._radii.toString()},ci.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,n){if(A.typeOf.object("position",e),!O.equalsEpsilon(this._radii.x,this._radii.y,O.EPSILON15))throw new E("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");A.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),t=g(t,0);const i=this._squaredXOverSquaredZ;if(c(n)||(n=new f),n.x=0,n.y=0,n.z=e.z*(1-i),!(Math.abs(n.z)>=this._radii.z-t))return n};const ew=new f;ci.prototype.getLocalCurvature=function(e,t){A.typeOf.object("surfacePosition",e),c(t)||(t=new V);const n=this.getSurfaceNormalIntersectionWithZAxis(e,0,ew),i=f.distance(e,n);return V.fromElements(1/i,1/(i*(this.minimumRadius*i/this.maximumRadius**2)**2),t)};const tw=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],GT=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function jT(e,t,n){A.typeOf.number("a",e),A.typeOf.number("b",t),A.typeOf.func("func",n);const i=.5*(t+e),o=.5*(t-e);let r=0;for(let s=0;s<5;s++){const a=o*tw[s];r+=GT[s]*(n(i+a)+n(i-a))}return r*=o,r}ci.prototype.surfaceArea=function(e){A.typeOf.object("rectangle",e);const t=e.west;let n=e.east;const i=e.south,o=e.north;for(;n<t;)n+=O.TWO_PI;const r=this._radiiSquared,s=r.x,a=r.y,l=r.z,u=s*a;return jT(i,o,function(d){const h=Math.cos(d),m=Math.sin(d);return Math.cos(d)*jT(t,n,function(_){const p=Math.cos(_),y=Math.sin(_);return Math.sqrt(u*m*m+l*(a*p*p+s*y*y)*h*h)})})};const he=ci;function Dt(e,t,n,i){this.x=g(e,0),this.y=g(t,0),this.z=g(n,0),this.w=g(i,0)}Dt.fromElements=function(e,t,n,i,o){return c(o)?(o.x=e,o.y=t,o.z=n,o.w=i,o):new Dt(e,t,n,i)},Dt.fromColor=function(e,t){return A.typeOf.object("color",e),c(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new Dt(e.red,e.green,e.blue,e.alpha)},Dt.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Dt(e.x,e.y,e.z,e.w)},Dt.packedLength=4,Dt.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},Dt.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new Dt),n.x=e[t++],n.y=e[t++],n.z=e[t++],n.w=e[t],n},Dt.packArray=function(e,t){A.defined("array",e);const n=e.length,i=4*n;if(c(t)){if(!Array.isArray(t)&&t.length!==i)throw new E("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==i&&(t.length=i)}else t=new Array(i);for(let o=0;o<n;++o)Dt.pack(e[o],t,4*o);return t},Dt.unpackArray=function(e,t){if(A.defined("array",e),A.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!=0)throw new E("array length must be a multiple of 4.");const n=e.length;c(t)?t.length=n/4:t=new Array(n/4);for(let i=0;i<n;i+=4){const o=i/4;t[o]=Dt.unpack(e,i,t[o])}return t},Dt.fromArray=Dt.unpack,Dt.maximumComponent=function(e){return A.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)},Dt.minimumComponent=function(e){return A.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)},Dt.minimumByComponent=function(e,t,n){return A.typeOf.object("first",e),A.typeOf.object("second",t),A.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n.w=Math.min(e.w,t.w),n},Dt.maximumByComponent=function(e,t,n){return A.typeOf.object("first",e),A.typeOf.object("second",t),A.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n.w=Math.max(e.w,t.w),n},Dt.clamp=function(e,t,n,i){A.typeOf.object("value",e),A.typeOf.object("min",t),A.typeOf.object("max",n),A.typeOf.object("result",i);const o=O.clamp(e.x,t.x,n.x),r=O.clamp(e.y,t.y,n.y),s=O.clamp(e.z,t.z,n.z),a=O.clamp(e.w,t.w,n.w);return i.x=o,i.y=r,i.z=s,i.w=a,i},Dt.magnitudeSquared=function(e){return A.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Dt.magnitude=function(e){return Math.sqrt(Dt.magnitudeSquared(e))};const bc=new Dt;Dt.distance=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),Dt.subtract(e,t,bc),Dt.magnitude(bc)},Dt.distanceSquared=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),Dt.subtract(e,t,bc),Dt.magnitudeSquared(bc)},Dt.normalize=function(e,t){A.typeOf.object("cartesian",e),A.typeOf.object("result",t);const n=Dt.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w))throw new E("normalized result is not a number");return t},Dt.dot=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Dt.multiplyComponents=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n.w=e.w*t.w,n},Dt.divideComponents=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n.w=e.w/t.w,n},Dt.add=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n},Dt.subtract=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n},Dt.multiplyByScalar=function(e,t,n){return A.typeOf.object("cartesian",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n},Dt.divideByScalar=function(e,t,n){return A.typeOf.object("cartesian",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n},Dt.negate=function(e,t){return A.typeOf.object("cartesian",e),A.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Dt.abs=function(e,t){return A.typeOf.object("cartesian",e),A.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};const Nf=new Dt;Dt.lerp=function(e,t,n,i){return A.typeOf.object("start",e),A.typeOf.object("end",t),A.typeOf.number("t",n),A.typeOf.object("result",i),Dt.multiplyByScalar(t,n,Nf),i=Dt.multiplyByScalar(e,1-n,i),Dt.add(Nf,i,i)};const WT=new Dt;Dt.mostOrthogonalAxis=function(e,t){A.typeOf.object("cartesian",e),A.typeOf.object("result",t);const n=Dt.normalize(e,WT);return Dt.abs(n,n),Dt.clone(n.x<=n.y?n.x<=n.z?n.x<=n.w?Dt.UNIT_X:Dt.UNIT_W:n.z<=n.w?Dt.UNIT_Z:Dt.UNIT_W:n.y<=n.z?n.y<=n.w?Dt.UNIT_Y:Dt.UNIT_W:n.z<=n.w?Dt.UNIT_Z:Dt.UNIT_W,t)},Dt.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Dt.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]&&e.w===t[n+3]},Dt.equalsEpsilon=function(e,t,n,i){return e===t||c(e)&&c(t)&&O.equalsEpsilon(e.x,t.x,n,i)&&O.equalsEpsilon(e.y,t.y,n,i)&&O.equalsEpsilon(e.z,t.z,n,i)&&O.equalsEpsilon(e.w,t.w,n,i)},Dt.ZERO=Object.freeze(new Dt(0,0,0,0)),Dt.ONE=Object.freeze(new Dt(1,1,1,1)),Dt.UNIT_X=Object.freeze(new Dt(1,0,0,0)),Dt.UNIT_Y=Object.freeze(new Dt(0,1,0,0)),Dt.UNIT_Z=Object.freeze(new Dt(0,0,1,0)),Dt.UNIT_W=Object.freeze(new Dt(0,0,0,1)),Dt.prototype.clone=function(e){return Dt.clone(this,e)},Dt.prototype.equals=function(e){return Dt.equals(this,e)},Dt.prototype.equalsEpsilon=function(e,t,n){return Dt.equalsEpsilon(this,e,t,n)},Dt.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const s_=new Float32Array(1),Ds=new Uint8Array(s_.buffer),Mf=new Uint32Array([287454020]),nw=68===new Uint8Array(Mf.buffer)[0];Dt.packFloat=function(e,t){return A.typeOf.number("value",e),c(t)||(t=new Dt),s_[0]=e,nw?(t.x=Ds[0],t.y=Ds[1],t.z=Ds[2],t.w=Ds[3]):(t.x=Ds[3],t.y=Ds[2],t.z=Ds[1],t.w=Ds[0]),t},Dt.unpackFloat=function(e){return A.typeOf.object("packedFloat",e),nw?(Ds[0]=e.x,Ds[1]=e.y,Ds[2]=e.z,Ds[3]=e.w):(Ds[0]=e.w,Ds[1]=e.z,Ds[2]=e.y,Ds[3]=e.x),s_[0]};const de=Dt,qT=function dp(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o};var Zr=wt(5098);const Rt=function XT(e,t){if(null===e||"object"!=typeof e)return e;t=g(t,!1);const n=new e.constructor;for(const i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=XT(o,t)),n[i]=o}return n},Pn=function a_(e,t,n){n=g(n,!1);const i={},o=c(e),r=c(t);let s,a,l;if(o)for(s in e)e.hasOwnProperty(s)&&(a=e[s],r&&n&&"object"==typeof a&&t.hasOwnProperty(s)?(l=t[s],i[s]="object"==typeof l?a_(a,l,n):a):i[s]=a);if(r)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(l=t[s],i[s]=l);return i},fa=function yP(){let e,t;const n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}};function c_(e,t){let n;return typeof document<"u"&&(n=document),c_._implementation(e,t,n)}c_._implementation=function(e,t,n){if(!c(e))throw new E("relative uri is required.");if(!c(t)){if(typeof n>"u")return e;t=g(n.baseURI,n.location.href)}const i=new Zr(e);return""!==i.scheme()?i.toString():i.absoluteTo(t).toString()};const l_=c_,Ll=function rw(e){if(!c(e))throw new E("uri is required.");const t=new Zr(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return-1!==i&&(n=n.substr(i+1)),i=n.lastIndexOf("."),n=-1===i?"":n.substr(i+1),n},ZT={},u_=function sw(e,t,n){c(t)||(t=e.width),c(n)||(n=e.height);let i=ZT[t];c(i)||(i={},ZT[t]=i);let o=i[n];if(!c(o)){const 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},aw=/^blob:/i,Sn=function TP(e){return A.typeOf.string("uri",e),aw.test(e)};let Re;const bn=function jt(e){c(Re)||(Re=document.createElement("a")),Re.href=window.location.href;const t=Re.host,n=Re.protocol;return Re.href=e,Re.href=Re.href,n!==Re.protocol||t!==Re.host},bo=/^data:/i,$r=function Ps(e){return A.typeOf.string("uri",e),bo.test(e)},$s=function d_(e){if(!c(e))throw new E("obj is required.");let t="";for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,s=i.length;r<s;++r)t+=`${o+encodeURIComponent(i[r])}&`;else t+=`${o+encodeURIComponent(i)}&`}return t=t.slice(0,-1),t},Ou=function cw(e){if(!c(e))throw new E("queryString is required.");const t={};if(""===e)return t;const n=e.replace(/\+/g,"%20").split(/[&;]/);for(let i=0,o=n.length;i<o;++i){const r=n[i].split("="),s=decodeURIComponent(r[0]);let a=r[1];a=c(a)?decodeURIComponent(a):"";const l=t[s];"string"==typeof l?t[s]=[l,a]:Array.isArray(l)?l.push(a):t[s]=a}return t},To=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5}),f_=Object.freeze({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3});function lw(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.throttleByServer,!1),n=g(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=g(e.priority,0),this.throttle=n,this.throttleByServer=t,this.type=g(e.type,f_.OTHER),this.serverKey=e.serverKey,this.state=To.UNISSUED,this.deferred=void 0,this.cancelled=!1}lw.prototype.cancel=function(){this.cancelled=!0},lw.prototype.clone=function(e){return c(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=To.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new lw(this)};const h_=lw;function yz(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,"string"==typeof this.responseHeaders&&(this.responseHeaders=function Lre(e){const t={};if(!e)return t;const n=e.split("\r\n");for(let i=0;i<n.length;++i){const o=n[i],r=o.indexOf(": ");if(r>0){const s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}(this.responseHeaders))}yz.prototype.toString=function(){let e="Request has failed.";return c(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};const $T=yz;function p_(e){A.typeOf.object("options",e),A.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function AP(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}Object.defineProperties(p_.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){A.typeOf.number.greaterThanOrEquals("maximumLength",e,0);const t=this._length;if(e<t){const n=this._array;for(let i=e;i<t;++i)n[i]=void 0;this._length=e,n.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}}),p_.prototype.reserve=function(e){e=g(e,this._length),this._array.length=e},p_.prototype.heapify=function(e){e=g(e,0);const t=this._length,n=this._comparator,i=this._array;let o=-1,r=!0;for(;r;){const s=2*(e+1),a=s-1;o=a<t&&n(i[a],i[e])<0?a:e,s<t&&n(i[s],i[o])<0&&(o=s),o!==e?(AP(i,o,e),e=o):r=!1}},p_.prototype.resort=function(){for(let t=Math.ceil(this._length/2);t>=0;--t)this.heapify(t)},p_.prototype.insert=function(e){A.defined("element",e);const t=this._array,n=this._comparator,i=this._maximumLength;let r,o=this._length++;for(o<t.length?t[o]=e:t.push(e);0!==o;){const s=Math.floor((o-1)/2);if(!(n(t[o],t[s])<0))break;AP(t,o,s),o=s}return c(i)&&this._length>i&&(r=t[i],this._length=i),r},p_.prototype.pop=function(e){if(e=g(e,0),0===this._length)return;A.typeOf.number.lessThan("index",e,this._length);const t=this._array,n=t[e];return AP(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};const Wi={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0};let Hy=20;const pa=new p_({comparator:function Fre(e,t){return e.priority-t.priority}});pa.maximumLength=Hy,pa.reserve(Hy);const Od=[];let Bf={};const Bre=typeof document<"u"?new Zr(document.location.href):new Zr,uw=new Ye;function Mo(){}function bz(e){c(e.priorityFunction)&&(e.priority=e.priorityFunction())}function Tz(e){return e.state===To.UNISSUED&&(e.state=To.ISSUED,e.deferred=fa()),e.deferred.promise}function Az(e){const t=Tz(e);return e.state=To.ACTIVE,Od.push(e),++Wi.numberOfActiveRequests,++Wi.numberOfActiveRequestsEver,++Bf[e.serverKey],e.requestFunction().then(function kre(e){return function(t){if(e.state===To.CANCELLED)return;const n=e.deferred;--Wi.numberOfActiveRequests,--Bf[e.serverKey],uw.raiseEvent(),e.state=To.RECEIVED,e.deferred=void 0,n.resolve(t)}}(e)).catch(function Ure(e){return function(t){e.state!==To.CANCELLED&&(++Wi.numberOfFailedRequests,--Wi.numberOfActiveRequests,--Bf[e.serverKey],uw.raiseEvent(t),e.state=To.FAILED,e.deferred.reject(t))}}(e)),t}function m_(e){const t=e.state===To.ACTIVE;if(e.state=To.CANCELLED,++Wi.numberOfCancelledRequests,c(e.deferred)){const n=e.deferred;e.deferred=void 0,n.reject()}t&&(--Wi.numberOfActiveRequests,--Bf[e.serverKey],++Wi.numberOfCancelledActiveRequests),c(e.cancelFunction)&&e.cancelFunction()}Mo.maximumRequests=50,Mo.maximumRequestsPerServer=18,Mo.requestsByServer={},Mo.throttleRequests=!0,Mo.debugShowStatistics=!1,Mo.requestCompletedEvent=uw,Object.defineProperties(Mo,{statistics:{get:function(){return Wi}},priorityHeapLength:{get:function(){return Hy},set:function(e){if(e<Hy)for(;pa.length>e;)m_(pa.pop());Hy=e,pa.maximumLength=e,pa.reserve(e)}}}),Mo.serverHasOpenSlots=function(e,t){t=g(t,1);const n=g(Mo.requestsByServer[e],Mo.maximumRequestsPerServer);return Bf[e]+t<=n},Mo.heapHasOpenSlots=function(e){return pa.length+e<=Hy},Mo.update=function(){let e,t,n=0;const i=Od.length;for(e=0;e<i;++e)t=Od[e],t.cancelled&&m_(t),t.state===To.ACTIVE?n>0&&(Od[e-n]=t):++n;Od.length-=n;const o=pa.internalArray,r=pa.length;for(e=0;e<r;++e)bz(o[e]);pa.resort();const s=Math.max(Mo.maximumRequests-Od.length,0);let a=0;for(;a<s&&pa.length>0;)t=pa.pop(),t.cancelled?m_(t):!t.throttleByServer||Mo.serverHasOpenSlots(t.serverKey)?(Az(t),++a):m_(t);!function zre(){Mo.debugShowStatistics&&(0===Wi.numberOfActiveRequests&&Wi.lastNumberOfActiveRequests>0&&(Wi.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${Wi.numberOfAttemptedRequests}`),Wi.numberOfAttemptedRequests=0),Wi.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${Wi.numberOfCancelledRequests}`),Wi.numberOfCancelledRequests=0),Wi.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${Wi.numberOfCancelledActiveRequests}`),Wi.numberOfCancelledActiveRequests=0),Wi.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${Wi.numberOfFailedRequests}`),Wi.numberOfFailedRequests=0)),Wi.lastNumberOfActiveRequests=Wi.numberOfActiveRequests)}()},Mo.getServerKey=function(e){A.typeOf.string("url",e);let t=new Zr(e);""===t.scheme()&&(t=t.absoluteTo(Bre),t.normalize());let n=t.authority();return/:/.test(n)||(n=`${n}:${"https"===t.scheme()?"443":"80"}`),c(Bf[n])||(Bf[n]=0),n},Mo.request=function(e){if(A.typeOf.object("request",e),A.typeOf.string("request.url",e.url),A.typeOf.func("request.requestFunction",e.requestFunction),$r(e.url)||Sn(e.url))return uw.raiseEvent(),e.state=To.RECEIVED,e.requestFunction();if(++Wi.numberOfAttemptedRequests,c(e.serverKey)||(e.serverKey=Mo.getServerKey(e.url)),Mo.throttleRequests&&e.throttleByServer&&!Mo.serverHasOpenSlots(e.serverKey))return;if(!Mo.throttleRequests||!e.throttle)return Az(e);if(Od.length>=Mo.maximumRequests)return;bz(e);const t=pa.insert(e);if(c(t)){if(t===e)return;m_(t)}return Tz(e)},Mo.clearForSpecs=function(){for(;pa.length>0;)m_(pa.pop());const e=Od.length;for(let t=0;t<e;++t)m_(Od[t]);Od.length=0,Bf={},Wi.numberOfAttemptedRequests=0,Wi.numberOfActiveRequests=0,Wi.numberOfCancelledRequests=0,Wi.numberOfCancelledActiveRequests=0,Wi.numberOfFailedRequests=0,Wi.numberOfActiveRequestsEver=0,Wi.lastNumberOfActiveRequests=0},Mo.numberOfActiveRequestsByServer=function(e){return Bf[e]},Mo.requestHeap=pa;const kf=Mo;function KT(e){let t;this.name="RuntimeError",this.message=e;try{throw new Error}catch(n){t=n.stack}this.stack=t}c(Object.create)&&((KT.prototype=Object.create(Error.prototype)).constructor=KT),KT.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return c(this.stack)&&(e+=`\n${this.stack.toString()}`),e};const Pe=KT,QT={};let Gy={};QT.add=function(e,t){if(!c(e))throw new E("host is required.");if(!c(t)||t<=0)throw new E("port is required to be greater than 0.");const n=`${e.toLowerCase()}:${t}`;c(Gy[n])||(Gy[n]=!0)},QT.remove=function(e,t){if(!c(e))throw new E("host is required.");if(!c(t)||t<=0)throw new E("port is required to be greater than 0.");const n=`${e.toLowerCase()}:${t}`;c(Gy[n])&&delete Gy[n]},QT.contains=function(e){if(!c(e))throw new E("url is required.");const t=function Vre(e){const t=new Zr(e);t.normalize();let n=t.authority();if(0!==n.length){if(t.authority(n),-1!==n.indexOf("@")&&(n=n.split("@")[1]),-1===n.indexOf(":")){let i=t.scheme();if(0===i.length&&(i=window.location.protocol,i=i.substring(0,i.length-1)),"http"===i)n+=":80";else{if("https"!==i)return;n+=":443"}}return n}}(e);return!(!c(t)||!c(Gy[t]))},QT.clear=function(){Gy={}};const xz=QT,Cz=function(){try{const e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}();function Wt(e){"string"==typeof(e=g(e,g.EMPTY_OBJECT))&&(e={url:e}),A.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=Rd(e.templateValues,{}),this._queryParameters=Rd(e.queryParameters,{}),this.headers=Rd(e.headers,{}),this.request=g(e.request,new h_),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=g(e.retryAttempts,0),this._retryCount=0,g(e.parseUrl,!0)?this.parseUrl(e.url,!0,!0):this._url=e.url,this._credits=e.credits}function Rd(e,t){return c(e)?Rt(e):t}let jy;function dw(e,t,n){if(!n)return Pn(e,t);const i=Rt(e,!0);for(const o in t)if(t.hasOwnProperty(o)){let r=i[o];const s=t[o];c(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(s)):i[o]=Array.isArray(s)?s.slice():s}return i}function xP(e){const 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);const l=fa();return Wt._Implementations.createImage(r,a,l,n,i,o),l.promise};const s=kf.request(r);if(c(s))return s.catch(function(a){return r.state!==To.FAILED?Promise.reject(a):t.retryOnError(a).then(function(l){return l?(r.state=To.UNISSUED,r.deferred=void 0,xP({resource:t,flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(a)})})}function Ez(e,t,n){const i={};i[t]=n,e.setQueryParameters(i);const o=e.request,r=e.url;o.url=r,o.requestFunction=function(){const a=fa();return window[n]=function(l){a.resolve(l);try{delete window[n]}catch{window[n]=void 0}},Wt._Implementations.loadAndExecuteScript(r,n,a),a.promise};const s=kf.request(o);if(c(s))return s.catch(function(a){return o.state!==To.FAILED?Promise.reject(a):e.retryOnError(a).then(function(l){return l?(o.state=To.UNISSUED,o.deferred=void 0,Ez(e,t,n)):Promise.reject(a)})})}function CP(e){if(e.state===To.ISSUED||e.state===To.ACTIVE)throw new Pe("The Resource is already being fetched.");e.state=To.UNISSUED,e.deferred=void 0}Wt.createIfNeeded=function(e){return e instanceof Wt?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new Wt({url:e})},Wt.supportsImageBitmapOptions=function(){return c(jy)?jy:"function"!=typeof createImageBitmap?(jy=Promise.resolve(!1),jy):(jy=Wt.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(t){return Promise.all([createImageBitmap(t,{imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"}),createImageBitmap(t)])}).then(function(t){const n=u_(t[0]),i=u_(t[1]);return n[1]!==i[1]}).catch(function(){return!1}),jy)},Object.defineProperties(Wt,{isBlobSupported:{get:function(){return Cz}}}),Object.defineProperties(Wt.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 Ll(this._url)}},isDataUri:{get:function(){return $r(this._url)}},isBlobUri:{get:function(){return Sn(this._url)}},isCrossOriginUrl:{get:function(){return bn(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}}),Wt.prototype.toString=function(){return this.getUrlComponent(!0,!0)},Wt.prototype.parseUrl=function(e,t,n,i){let o=new Zr(e);const r=function Hre(e){return 0===e.length?{}:-1===e.indexOf("=")?{[e]:void 0}:Ou(e)}(o.query());this._queryParameters=t?dw(r,this.queryParameters,n):r,o.search(""),o.fragment(""),c(i)&&""===o.scheme()&&(o=o.absoluteTo(l_(i))),this._url=o.toString()},Wt.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${function Gre(e){const t=Object.keys(e);return 0===t.length?"":1!==t.length||c(e[t[0]])?`?${$s(e)}`:`?${t[0]}`}(this.queryParameters)}`),n=n.replace(/%7B/g,"{").replace(/%7D/g,"}");const i=this._templateValues;return Object.keys(i).length>0&&(n=n.replace(/{(.*?)}/g,function(o,r){const s=i[r];return c(s)?encodeURIComponent(s):o})),t&&c(this.proxy)&&(n=this.proxy.getURL(n)),n},Wt.prototype.setQueryParameters=function(e,t){this._queryParameters=t?dw(this._queryParameters,e,!1):dw(e,this._queryParameters,!1)},Wt.prototype.appendQueryParameters=function(e){this._queryParameters=dw(e,this._queryParameters,!0)},Wt.prototype.setTemplateValues=function(e,t){this._templateValues=t?Pn(this._templateValues,e):Pn(e,this._templateValues)},Wt.prototype.getDerivedResource=function(e){const t=this.clone();if(t._retryCount=0,c(e.url)){const n=g(e.preserveQueryParameters,!1);t.parseUrl(e.url,!0,n,this._url)}return c(e.queryParameters)&&(t._queryParameters=Pn(e.queryParameters,t.queryParameters)),c(e.templateValues)&&(t._templateValues=Pn(e.templateValues,t.templateValues)),c(e.headers)&&(t.headers=Pn(e.headers,t.headers)),c(e.proxy)&&(t.proxy=e.proxy),c(e.request)&&(t.request=e.request),c(e.retryCallback)&&(t.retryCallback=e.retryCallback),c(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},Wt.prototype.retryOnError=function(e){const t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);const n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})},Wt.prototype.clone=function(e){return c(e)?(e._url=this._url,e._queryParameters=Rt(this._queryParameters),e._templateValues=Rt(this._templateValues),e.headers=Rt(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new Wt({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:c(this.credits)?this.credits.slice():void 0})},Wt.prototype.getBaseUri=function(e){return function ow(e,t){if(!c(e))throw new E("uri is required.");let n="";const i=e.lastIndexOf("/");return-1!==i&&(n=e.substring(0,i+1)),t&&(0!==(e=new Zr(e)).query().length&&(n+=`?${e.query()}`),0!==e.fragment().length&&(n+=`#${e.fragment()}`)),n}(this.getUrlComponent(e),e)},Wt.prototype.appendForwardSlash=function(){this._url=function YT(e){return(0===e.length||"/"!==e[e.length-1])&&(e=`${e}/`),e}(this._url)},Wt.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},Wt.fetchArrayBuffer=function(e){return new Wt(e).fetchArrayBuffer()},Wt.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},Wt.fetchBlob=function(e){return new Wt(e).fetchBlob()},Wt.prototype.fetchImage=function(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.preferImageBitmap,!1),n=g(e.preferBlob,!1),i=g(e.flipY,!1),o=g(e.skipColorSpaceConversion,!1);if(CP(this.request),!Cz||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return xP({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});const r=this.fetchBlob();if(!c(r))return;let s,a,l,u;return Wt.supportsImageBitmapOptions().then(function(d){return s=d,a=s&&t,r}).then(function(d){if(!c(d))return;if(u=d,a)return Wt.createImageBitmapFromBlob(d,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});const h=window.URL.createObjectURL(d);return l=new Wt({url:h}),xP({resource:l,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(d){if(c(d))return d.blob=u,a||window.URL.revokeObjectURL(l.url),d}).catch(function(d){return c(l)&&window.URL.revokeObjectURL(l.url),d.blob=u,Promise.reject(d)})},Wt.fetchImage=function(e){return new Wt(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},Wt.prototype.fetchText=function(){return this.fetch({responseType:"text"})},Wt.fetchText=function(e){return new Wt(e).fetchText()},Wt.prototype.fetchJson=function(){const e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(c(e))return e.then(function(t){if(c(t))return JSON.parse(t)})},Wt.fetchJson=function(e){return new Wt(e).fetchJson()},Wt.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},Wt.fetchXML=function(e){return new Wt(e).fetchXML()},Wt.prototype.fetchJsonp=function(e){let t;e=g(e,"callback"),CP(this.request);do{t=`loadJsonp${O.nextRandomNumber().toString().substring(2,8)}`}while(c(window[t]));return Ez(this,e,t)},Wt.fetchJsonp=function(e){return new Wt(e).fetchJsonp(e.callbackParameterName)},Wt.prototype._makeRequest=function(e){const t=this;CP(t.request);const n=t.request,i=t.url;n.url=i,n.requestFunction=function(){const r=e.responseType,s=Pn(e.headers,t.headers),a=e.overrideMimeType,l=e.method,u=e.data,d=fa(),h=Wt._Implementations.loadWithXhr(i,r,l,u,s,d,a);return c(h)&&c(h.abort)&&(n.cancelFunction=function(){h.abort()}),d.promise};const o=kf.request(n);if(c(o))return o.then(function(r){return n.cancelFunction=void 0,r}).catch(function(r){return n.cancelFunction=void 0,n.state!==To.FAILED?Promise.reject(r):t.retryOnError(r).then(function(s){return s?(n.state=To.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};const jre=/^data:(.*?)(;base64)?,(.*)$/;function fw(e,t){const n=decodeURIComponent(t);return e?atob(n):n}function wz(e,t){const n=fw(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return i}Wt.prototype.fetch=function(e){return(e=Rd(e,{})).method="GET",this._makeRequest(e)},Wt.fetch=function(e){return new Wt(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Wt.prototype.delete=function(e){return(e=Rd(e,{})).method="DELETE",this._makeRequest(e)},Wt.delete=function(e){return new Wt(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},Wt.prototype.head=function(e){return(e=Rd(e,{})).method="HEAD",this._makeRequest(e)},Wt.head=function(e){return new Wt(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Wt.prototype.options=function(e){return(e=Rd(e,{})).method="OPTIONS",this._makeRequest(e)},Wt.options=function(e){return new Wt(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Wt.prototype.post=function(e,t){return A.defined("data",e),(t=Rd(t,{})).method="POST",t.data=e,this._makeRequest(t)},Wt.post=function(e){return new Wt(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Wt.prototype.put=function(e,t){return A.defined("data",e),(t=Rd(t,{})).method="PUT",t.data=e,this._makeRequest(t)},Wt.put=function(e){return new Wt(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Wt.prototype.patch=function(e,t){return A.defined("data",e),(t=Rd(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},Wt.patch=function(e){return new Wt(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},(Wt._Implementations={}).loadImageElement=function(e,t,n){const i=new Image;i.onload=function(){0===i.naturalWidth&&0===i.naturalHeight&&0===i.width&&0===i.height&&(i.width=300,i.height=150),n.resolve(i)},i.onerror=function(o){n.reject(o)},t&&(i.crossOrigin=xz.contains(e)?"use-credentials":""),i.src=e},Wt._Implementations.createImage=function(e,t,n,i,o,r){const s=e.url;Wt.supportsImageBitmapOptions().then(function(a){if(!a||!r)return void Wt._Implementations.loadImageElement(s,t,n);const d=fa(),h=Wt._Implementations.loadWithXhr(s,"blob","GET",void 0,void 0,d,void 0,void 0,void 0);return c(h)&&c(h.abort)&&(e.cancelFunction=function(){h.abort()}),d.promise.then(function(m){if(c(m))return Wt.createImageBitmapFromBlob(m,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});n.reject(new Pe(`Successfully retrieved ${s} but it contained no content.`))}).then(function(m){n.resolve(m)})}).catch(function(a){n.reject(a)})},Wt.createImageBitmapFromBlob=function(e,t){return A.defined("options",t),A.typeOf.bool("options.flipY",t.flipY),A.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),A.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};const Yre=typeof XMLHttpRequest>"u";Wt._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){const a=jre.exec(e);if(null!==a)return void r.resolve(function Wre(e,t){t=g(t,"");const n=e[1],i=!!e[2],o=e[3];let r,s;switch(t){case"":case"text":return fw(i,o);case"arraybuffer":return wz(i,o);case"blob":return r=wz(i,o),new Blob([r],{type:n});case"document":return s=new DOMParser,s.parseFromString(fw(i,o),n);case"json":return JSON.parse(fw(i,o));default:throw new E(`Unhandled responseType: ${t}`)}}(a,t));if(Yre)return void function qre(e,t,n,i,o,r,s){fetch(e,{method:n,headers:o}).then(function(){var a=(0,we.Z)(function*(l){if(!l.ok){const u={};return l.headers.forEach((d,h)=>{u[h]=d}),void r.reject(new $T(l.status,l,u))}switch(t){case"text":r.resolve(l.text());break;case"json":r.resolve(l.json());break;default:r.resolve(new Uint8Array(yield l.arrayBuffer()).buffer)}});return function(l){return a.apply(this,arguments)}}()).catch(()=>{r.reject(new $T)})}(e,t,n,0,o,r);const l=new XMLHttpRequest;if(xz.contains(e)&&(l.withCredentials=!0),l.open(n,e,!0),c(s)&&c(l.overrideMimeType)&&l.overrideMimeType(s),c(o))for(const d in o)o.hasOwnProperty(d)&&l.setRequestHeader(d,o[d]);c(t)&&(l.responseType=t);let u=!1;return"string"==typeof e&&(u=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),l.onload=function(){if((l.status<200||l.status>=300)&&(!u||0!==l.status))return void r.reject(new $T(l.status,l.response,l.getAllResponseHeaders()));const d=l.response,h=l.responseType;if("HEAD"===n||"OPTIONS"===n){const _=l.getAllResponseHeaders().trim().split(/[\r\n]+/),p={};return _.forEach(function(y){const b=y.split(": "),x=b.shift();p[x]=b.join(": ")}),void r.resolve(p)}if(204===l.status)r.resolve(void 0);else if(!c(d)||c(t)&&h!==t)if("json"===t&&"string"==typeof d)try{r.resolve(JSON.parse(d))}catch(m){r.reject(m)}else(""===h||"document"===h)&&c(l.responseXML)&&l.responseXML.hasChildNodes()?r.resolve(l.responseXML):""!==h&&"text"!==h||!c(l.responseText)?r.reject(new Pe("Invalid XMLHttpRequest response type.")):r.resolve(l.responseText);else r.resolve(d)},l.onerror=function(d){r.reject(new $T)},l.send(i),l},Wt._Implementations.loadAndExecuteScript=function(e,t,n){return function ha(e){const t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");const 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)})}(e).catch(function(i){n.reject(i)})},(Wt._DefaultImplementations={}).createImage=Wt._Implementations.createImage,Wt._DefaultImplementations.loadWithXhr=Wt._Implementations.loadWithXhr,Wt._DefaultImplementations.loadAndExecuteScript=Wt._Implementations.loadAndExecuteScript,Wt.DEFAULT=Object.freeze(new Wt({url:typeof document>"u"?"":document.location.href.split("?")[0]}));const zt=Wt;function JT(e){e=g(e,g.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=g(e.addNewLeapSeconds,!0),c(e.data)?Sz(this,e.data):Sz(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function Xre(e,t){return re.compare(e.julianDate,t)}function Sz(e,t){if(!c(t.columnNames))throw new Pe("Error in loaded EOP data: The columnNames property is required.");if(!c(t.samples))throw new Pe("Error in loaded EOP data: The samples property is required.");const n=t.columnNames.indexOf("modifiedJulianDateUtc"),i=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),r=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),a=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||i<0||o<0||r<0||s<0||a<0||l<0)throw new Pe("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");const u=e._samples=t.samples,d=e._dates=[];let h;e._dateColumn=n,e._xPoleWanderRadiansColumn=i,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;const m=e._addNewLeapSeconds;for(let _=0,p=u.length;_<p;_+=e._columnCount){const b=u[_+l],C=new re(u[_+n]+T.MODIFIED_JULIAN_DATE_DIFFERENCE,b,tt.TAI);if(d.push(C),m){if(b!==h&&c(h)){const w=re.leapSeconds,v=Be(w,C,Xre);if(v<0){const I=new rt(C,b);w.splice(~v,0,I)}}h=b}}}function vz(e,t,n,i,o){const r=n*i;o.xPoleWander=t[r+e._xPoleWanderRadiansColumn],o.yPoleWander=t[r+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function eA(e,t,n){return t+e*(n-t)}function Iz(e,t,n,i,o,r,s){const a=e._columnCount;if(r>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;const l=t[o],u=t[r];if(l.equals(u)||i.equals(l))return vz(e,n,o,a,s),s;if(i.equals(u))return vz(e,n,r,a,s),s;const d=re.secondsDifference(i,l)/re.secondsDifference(u,l),h=o*a,m=r*a;let _=n[h+e._ut1MinusUtcSecondsColumn],p=n[m+e._ut1MinusUtcSecondsColumn];const y=p-_;if(y>.5||y<-.5){const b=n[h+e._taiMinusUtcSecondsColumn],x=n[m+e._taiMinusUtcSecondsColumn];b!==x&&(u.equals(i)?_=p:p-=x-b)}return s.xPoleWander=eA(d,n[h+e._xPoleWanderRadiansColumn],n[m+e._xPoleWanderRadiansColumn]),s.yPoleWander=eA(d,n[h+e._yPoleWanderRadiansColumn],n[m+e._yPoleWanderRadiansColumn]),s.xPoleOffset=eA(d,n[h+e._xCelestialPoleOffsetRadiansColumn],n[m+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=eA(d,n[h+e._yCelestialPoleOffsetRadiansColumn],n[m+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=eA(d,_,p),s}JT.fromUrl=function(){var e=(0,we.Z)(function*(t,n){A.defined("url",t),n=g(n,g.EMPTY_OBJECT);const i=zt.createIfNeeded(t);let o;try{o=yield i.fetchJson()}catch{throw new Pe(`An error occurred while retrieving the EOP data from the URL ${i.url}.`)}return new JT({addNewLeapSeconds:n.addNewLeapSeconds,data:o})});return function(t,n){return e.apply(this,arguments)}}(),JT.NONE=Object.freeze({compute:function(e,t){return c(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new qT(0,0,0,0,0),t}}),JT.prototype.compute=function(e,t){if(!c(this._samples))return;if(c(t)||(t=new qT(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;const n=this._dates,i=this._lastIndex;let o=0,r=0;if(c(i)){const l=n[i+1],u=re.lessThanOrEquals(n[i],e),d=!c(l),h=d||re.greaterThanOrEquals(l,e);if(u&&h)return o=i,!d&&l.equals(e)&&++o,r=o+1,Iz(this,n,this._samples,e,o,r,t),t}let s=Be(n,e,re.compare,this._dateColumn);return s>=0?(s<n.length-1&&n[s+1].equals(e)&&++s,o=s,r=s):(r=~s,o=r-1,o<0&&(o=0)),this._lastIndex=o,Iz(this,n,this._samples,e,o,r,t),t};const Zre=JT;function ma(e,t,n){this.heading=g(e,0),this.pitch=g(t,0),this.roll=g(n,0)}ma.fromQuaternion=function(e,t){if(!c(e))throw new E("quaternion is required");c(t)||(t=new ma);const 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);return t.heading=-Math.atan2(2*(e.w*e.z+e.x*e.y),1-2*(e.y*e.y+e.z*e.z)),t.roll=Math.atan2(o,i),t.pitch=-O.asinClamped(n),t},ma.fromDegrees=function(e,t,n,i){if(!c(e))throw new E("heading is required");if(!c(t))throw new E("pitch is required");if(!c(n))throw new E("roll is required");return c(i)||(i=new ma),i.heading=e*O.RADIANS_PER_DEGREE,i.pitch=t*O.RADIANS_PER_DEGREE,i.roll=n*O.RADIANS_PER_DEGREE,i},ma.clone=function(e,t){if(c(e))return c(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new ma(e.heading,e.pitch,e.roll)},ma.equals=function(e,t){return e===t||c(e)&&c(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},ma.equalsEpsilon=function(e,t,n,i){return e===t||c(e)&&c(t)&&O.equalsEpsilon(e.heading,t.heading,n,i)&&O.equalsEpsilon(e.pitch,t.pitch,n,i)&&O.equalsEpsilon(e.roll,t.roll,n,i)},ma.prototype.clone=function(e){return ma.clone(this,e)},ma.prototype.equals=function(e){return ma.equals(this,e)},ma.prototype.equalsEpsilon=function(e,t,n){return ma.equalsEpsilon(this,e,t,n)},ma.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};const Wy=ma,Dz=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;let hw,__,pw;function Pz(e){return typeof document>"u"?e:(c(hw)||(hw=document.createElement("a")),hw.href=e,hw.href)}function Oz(){if(c(__))return __;let e;if(e=typeof CESIUM_BASE_URL<"u"?CESIUM_BASE_URL:c("file:///home/runner/work/ukis-frontend-libraries/ukis-frontend-libraries/node_modules/@cesium/engine/Source/Core/buildModuleUrl.js")?l_(".","file:///home/runner/work/ukis-frontend-libraries/ukis-frontend-libraries/node_modules/@cesium/engine/Source/Core/buildModuleUrl.js"):"object"==typeof define&&c(define.amd)&&!define.amd.toUrlUndefined&&c(require.toUrl)?l_("..",g_("Core/buildModuleUrl.js")):function $re(){const e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){const i=e[t].getAttribute("src"),o=Dz.exec(i);if(null!==o)return o[1]}}(),!c(e))throw new E("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return __=new zt({url:Pz(e)}),__.appendForwardSlash(),__}function Kre(e){return Pz(require.toUrl(`../${e}`))}function Rz(e){return Oz().getDerivedResource({url:e}).url}function g_(e){return c(pw)||(pw="object"==typeof define&&c(define.amd)&&!define.amd.toUrlUndefined&&c(require.toUrl)?Kre:Rz),pw(e)}g_._cesiumScriptRegex=Dz,g_._buildModuleUrlFromBaseUrl=Rz,g_._clearBaseResource=function(){__=void 0},g_.setBaseUrl=function(e){__=zt.DEFAULT.getDerivedResource({url:e})},g_.getCesiumBaseUrl=Oz;const Jn=g_,Lz=function Qre(e,t,n){this.x=e,this.y=t,this.s=n};function EP(e){e=g(e,g.EMPTY_OBJECT),this._xysFileUrlTemplate=zt.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=g(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=g(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new re(this._sampleZeroJulianEphemerisDate,0,tt.TAI),this._stepSizeDays=g(e.stepSizeDays,1),this._samplesPerXysFile=g(e.samplesPerXysFile,1e3),this._totalSamples=g(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];const 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)}const Jre=new re(0,0,tt.TAI);function wP(e,t,n){const i=Jre;return i.dayNumber=t,i.secondsOfDay=n,re.daysDifference(i,e._sampleZeroDateTT)}function SP(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n;const i=e._xysFileUrlTemplate;n=c(i)?i.getDerivedResource({templateValues:{0:t}}):new zt({url:Jn(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});const o=n.fetchJson().then(function(r){e._chunkDownloadsInProgress[t]=!1;const s=e._samples,a=r.samples,l=t*e._samplesPerXysFile*3;for(let u=0,d=a.length;u<d;++u)s[l+u]=a[u]});return e._chunkDownloadsInProgress[t]=o,o}EP.prototype.preload=function(e,t,n,i){const o=wP(this,e,t),r=wP(this,n,i);let 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);const u=a/this._samplesPerXysFile|0,d=[];for(let h=s/this._samplesPerXysFile|0;h<=u;++h)d.push(SP(this,h));return Promise.all(d)},EP.prototype.computeXysRadians=function(e,t,n){const i=wP(this,e,t);if(i<0)return;const o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;const r=this._interpolationOrder;let 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 l=!1;const u=this._samples;if(c(u[3*s])||(SP(this,s/this._samplesPerXysFile|0),l=!0),c(u[3*a])||(SP(this,a/this._samplesPerXysFile|0),l=!0),l)return;c(n)?(n.x=0,n.y=0,n.s=0):n=new Lz(0,0,0);const d=i-s*this._stepSizeDays,h=this._work,m=this._denominators,_=this._coef,p=this._xTable;let y,b;for(y=0;y<=r;++y)h[y]=d-p[y];for(y=0;y<=r;++y){for(_[y]=1,b=0;b<=r;++b)b!==y&&(_[y]*=h[b]);_[y]*=m[y];let x=3*(s+y);n.x+=_[y]*u[x++],n.y+=_[y]*u[x++],n.s+=_[y]*u[x]}return n};const ese=EP;function ct(e,t,n,i,o,r,s,a,l){this[0]=g(e,0),this[1]=g(i,0),this[2]=g(s,0),this[3]=g(t,0),this[4]=g(o,0),this[5]=g(a,0),this[6]=g(n,0),this[7]=g(r,0),this[8]=g(l,0)}ct.packedLength=9,ct.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t},ct.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new ct),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},ct.packArray=function(e,t){A.defined("array",e);const n=e.length,i=9*n;if(c(t)){if(!Array.isArray(t)&&t.length!==i)throw new E("If result is a typed array, it must have exactly array.length * 9 elements");t.length!==i&&(t.length=i)}else t=new Array(i);for(let o=0;o<n;++o)ct.pack(e[o],t,9*o);return t},ct.unpackArray=function(e,t){if(A.defined("array",e),A.typeOf.number.greaterThanOrEquals("array.length",e.length,9),e.length%9!=0)throw new E("array length must be a multiple of 9.");const n=e.length;c(t)?t.length=n/9:t=new Array(n/9);for(let i=0;i<n;i+=9){const o=i/9;t[o]=ct.unpack(e,i,t[o])}return t},ct.clone=function(e,t){if(c(e))return c(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new ct(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},ct.fromArray=ct.unpack,ct.fromColumnMajorArray=function(e,t){return A.defined("values",e),ct.clone(e,t)},ct.fromRowMajorArray=function(e,t){return A.defined("values",e),c(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new ct(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},ct.fromQuaternion=function(e,t){A.typeOf.object("quaternion",e);const n=e.x*e.x,i=e.x*e.y,o=e.x*e.z,r=e.x*e.w,s=e.y*e.y,a=e.y*e.z,l=e.y*e.w,u=e.z*e.z,d=e.z*e.w,h=e.w*e.w,m=n-s-u+h,_=2*(i-d),p=2*(o+l),y=2*(i+d),b=-n+s-u+h,x=2*(a-r),C=2*(o-l),w=2*(a+r),v=-n-s+u+h;return c(t)?(t[0]=m,t[1]=y,t[2]=C,t[3]=_,t[4]=b,t[5]=w,t[6]=p,t[7]=x,t[8]=v,t):new ct(m,_,p,y,b,x,C,w,v)},ct.fromHeadingPitchRoll=function(e,t){A.typeOf.object("headingPitchRoll",e);const n=Math.cos(-e.pitch),i=Math.cos(-e.heading),o=Math.cos(e.roll),r=Math.sin(-e.pitch),s=Math.sin(-e.heading),a=Math.sin(e.roll),l=n*i,u=-o*s+a*r*i,d=a*s+o*r*i,h=n*s,m=o*i+a*r*s,_=-a*i+o*r*s,p=-r,y=a*n,b=o*n;return c(t)?(t[0]=l,t[1]=h,t[2]=p,t[3]=u,t[4]=m,t[5]=y,t[6]=d,t[7]=_,t[8]=b,t):new ct(l,u,d,h,m,_,p,y,b)},ct.fromScale=function(e,t){return A.typeOf.object("scale",e),c(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new ct(e.x,0,0,0,e.y,0,0,0,e.z)},ct.fromUniformScale=function(e,t){return A.typeOf.number("scale",e),c(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new ct(e,0,0,0,e,0,0,0,e)},ct.fromCrossProduct=function(e,t){return A.typeOf.object("vector",e),c(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new ct(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},ct.fromRotationX=function(e,t){A.typeOf.number("angle",e);const n=Math.cos(e),i=Math.sin(e);return c(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=i,t[6]=0,t[7]=-i,t[8]=n,t):new ct(1,0,0,0,n,-i,0,i,n)},ct.fromRotationY=function(e,t){A.typeOf.number("angle",e);const n=Math.cos(e),i=Math.sin(e);return c(t)?(t[0]=n,t[1]=0,t[2]=-i,t[3]=0,t[4]=1,t[5]=0,t[6]=i,t[7]=0,t[8]=n,t):new ct(n,0,i,0,1,0,-i,0,n)},ct.fromRotationZ=function(e,t){A.typeOf.number("angle",e);const n=Math.cos(e),i=Math.sin(e);return c(t)?(t[0]=n,t[1]=i,t[2]=0,t[3]=-i,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new ct(n,-i,0,i,n,0,0,0,1)},ct.toArray=function(e,t){return A.typeOf.object("matrix",e),c(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},ct.getElementIndex=function(e,t){return A.typeOf.number.greaterThanOrEquals("row",t,0),A.typeOf.number.lessThanOrEquals("row",t,2),A.typeOf.number.greaterThanOrEquals("column",e,0),A.typeOf.number.lessThanOrEquals("column",e,2),3*e+t},ct.getColumn=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,2),A.typeOf.object("result",n);const i=3*t,r=e[i+1],s=e[i+2];return n.x=e[i],n.y=r,n.z=s,n},ct.setColumn=function(e,t,n,i){A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,2),A.typeOf.object("cartesian",n),A.typeOf.object("result",i);const o=3*t;return(i=ct.clone(e,i))[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i},ct.getRow=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,2),A.typeOf.object("result",n);const o=e[t+3],r=e[t+6];return n.x=e[t],n.y=o,n.z=r,n},ct.setRow=function(e,t,n,i){return A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,2),A.typeOf.object("cartesian",n),A.typeOf.object("result",i),(i=ct.clone(e,i))[t]=n.x,i[t+3]=n.y,i[t+6]=n.z,i};const tse=new f;ct.setScale=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("scale",t),A.typeOf.object("result",n);const i=ct.getScale(e,tse),o=t.x/i.x,r=t.y/i.y,s=t.z/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*s,n[7]=e[7]*s,n[8]=e[8]*s,n};const nse=new f;ct.setUniformScale=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.number("scale",t),A.typeOf.object("result",n);const i=ct.getScale(e,nse),o=t/i.x,r=t/i.y,s=t/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*s,n[7]=e[7]*s,n[8]=e[8]*s,n};const vP=new f;ct.getScale=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),t.x=f.magnitude(f.fromElements(e[0],e[1],e[2],vP)),t.y=f.magnitude(f.fromElements(e[3],e[4],e[5],vP)),t.z=f.magnitude(f.fromElements(e[6],e[7],e[8],vP)),t};const Nz=new f;ct.getMaximumScale=function(e){return ct.getScale(e,Nz),f.maximumComponent(Nz)};const ise=new f;ct.setRotation=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("result",n);const i=ct.getScale(e,ise);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=t[3]*i.y,n[4]=t[4]*i.y,n[5]=t[5]*i.y,n[6]=t[6]*i.z,n[7]=t[7]*i.z,n[8]=t[8]*i.z,n};const ose=new f;ct.getRotation=function(e,t){A.typeOf.object("matrix",e),A.typeOf.object("result",t);const n=ct.getScale(e,ose);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[3]/n.y,t[4]=e[4]/n.y,t[5]=e[5]/n.y,t[6]=e[6]/n.z,t[7]=e[7]/n.z,t[8]=e[8]/n.z,t},ct.multiply=function(e,t,n){A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n);const o=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],r=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],s=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],a=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],u=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],d=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],h=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],n[1]=o,n[2]=r,n[3]=s,n[4]=a,n[5]=l,n[6]=u,n[7]=d,n[8]=h,n},ct.add=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n},ct.subtract=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n},ct.multiplyByVector=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("cartesian",t),A.typeOf.object("result",n);const i=t.x,o=t.y,r=t.z,a=e[1]*i+e[4]*o+e[7]*r,l=e[2]*i+e[5]*o+e[8]*r;return n.x=e[0]*i+e[3]*o+e[6]*r,n.y=a,n.z=l,n},ct.multiplyByScalar=function(e,t,n){return A.typeOf.object("matrix",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},ct.multiplyByScale=function(e,t,n){return A.typeOf.object("matrix",e),A.typeOf.object("scale",t),A.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n},ct.multiplyByUniformScale=function(e,t,n){return A.typeOf.object("matrix",e),A.typeOf.number("scale",t),A.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},ct.negate=function(e,t){return A.typeOf.object("matrix",e),A.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},ct.transpose=function(e,t){A.typeOf.object("matrix",e),A.typeOf.object("result",t);const i=e[3],o=e[6],r=e[1],s=e[4],a=e[7],l=e[2],u=e[5],d=e[8];return t[0]=e[0],t[1]=i,t[2]=o,t[3]=r,t[4]=s,t[5]=a,t[6]=l,t[7]=u,t[8]=d,t};const IP=[1,0,0],DP=[2,2,1];function sse(e){let t=0;for(let n=0;n<3;++n){const i=e[ct.getElementIndex(DP[n],IP[n])];t+=2*i*i}return Math.sqrt(t)}function ase(e,t){const n=O.EPSILON15;let i=0,o=1;for(let u=0;u<3;++u){const d=Math.abs(e[ct.getElementIndex(DP[u],IP[u])]);d>i&&(o=u,i=d)}let r=1,s=0;const a=IP[o],l=DP[o];if(Math.abs(e[ct.getElementIndex(l,a)])>n){const m=(e[ct.getElementIndex(l,l)]-e[ct.getElementIndex(a,a)])/2/e[ct.getElementIndex(l,a)];let _;_=m<0?-1/(-m+Math.sqrt(1+m*m)):1/(m+Math.sqrt(1+m*m)),r=1/Math.sqrt(1+_*_),s=_*r}return(t=ct.clone(ct.IDENTITY,t))[ct.getElementIndex(a,a)]=t[ct.getElementIndex(l,l)]=r,t[ct.getElementIndex(l,a)]=s,t[ct.getElementIndex(a,l)]=-s,t}const mw=new ct,Mz=new ct;ct.computeEigenDecomposition=function(e,t){A.typeOf.object("matrix",e);const n=O.EPSILON20;let o=0,r=0;c(t)||(t={});const s=t.unitary=ct.clone(ct.IDENTITY,t.unitary),a=t.diagonal=ct.clone(e,t.diagonal),l=n*function rse(e){let t=0;for(let n=0;n<9;++n){const i=e[n];t+=i*i}return Math.sqrt(t)}(a);for(;r<10&&sse(a)>l;)ase(a,mw),ct.transpose(mw,Mz),ct.multiply(a,mw,a),ct.multiply(Mz,a,a),ct.multiply(s,mw,s),++o>2&&(++r,o=0);return t},ct.abs=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},ct.determinant=function(e){A.typeOf.object("matrix",e);const n=e[3],i=e[6],r=e[4],s=e[7],l=e[5],u=e[8];return e[0]*(r*u-l*s)+e[1]*(l*i-n*u)+e[2]*(n*s-r*i)},ct.inverse=function(e,t){A.typeOf.object("matrix",e),A.typeOf.object("result",t);const n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],u=e[7],d=e[8],h=ct.determinant(e);if(Math.abs(h)<=O.EPSILON15)throw new E("matrix is not invertible");return t[0]=s*d-u*a,t[1]=u*o-i*d,t[2]=i*a-s*o,t[3]=l*a-r*d,t[4]=n*d-l*o,t[5]=r*o-n*a,t[6]=r*u-l*s,t[7]=l*i-n*u,t[8]=n*s-r*i,ct.multiplyByScalar(t,1/h,t)};const cse=new ct;ct.inverseTranspose=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),ct.inverse(ct.transpose(e,cse),t)},ct.equals=function(e,t){return e===t||c(e)&&c(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]},ct.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(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},ct.IDENTITY=Object.freeze(new ct(1,0,0,0,1,0,0,0,1)),ct.ZERO=Object.freeze(new ct(0,0,0,0,0,0,0,0,0)),ct.COLUMN0ROW0=0,ct.COLUMN0ROW1=1,ct.COLUMN0ROW2=2,ct.COLUMN1ROW0=3,ct.COLUMN1ROW1=4,ct.COLUMN1ROW2=5,ct.COLUMN2ROW0=6,ct.COLUMN2ROW1=7,ct.COLUMN2ROW2=8,Object.defineProperties(ct.prototype,{length:{get:function(){return ct.packedLength}}}),ct.prototype.clone=function(e){return ct.clone(this,e)},ct.prototype.equals=function(e){return ct.equals(this,e)},ct.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]},ct.prototype.equalsEpsilon=function(e,t){return ct.equalsEpsilon(this,e,t)},ct.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`};const oe=ct;function at(e,t,n,i,o,r,s,a,l,u,d,h,m,_,p,y){this[0]=g(e,0),this[1]=g(o,0),this[2]=g(l,0),this[3]=g(m,0),this[4]=g(t,0),this[5]=g(r,0),this[6]=g(u,0),this[7]=g(_,0),this[8]=g(n,0),this[9]=g(s,0),this[10]=g(d,0),this[11]=g(p,0),this[12]=g(i,0),this[13]=g(a,0),this[14]=g(h,0),this[15]=g(y,0)}at.packedLength=16,at.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[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},at.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new at),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},at.packArray=function(e,t){A.defined("array",e);const n=e.length,i=16*n;if(c(t)){if(!Array.isArray(t)&&t.length!==i)throw new E("If result is a typed array, it must have exactly array.length * 16 elements");t.length!==i&&(t.length=i)}else t=new Array(i);for(let o=0;o<n;++o)at.pack(e[o],t,16*o);return t},at.unpackArray=function(e,t){if(A.defined("array",e),A.typeOf.number.greaterThanOrEquals("array.length",e.length,16),e.length%16!=0)throw new E("array length must be a multiple of 16.");const n=e.length;c(t)?t.length=n/16:t=new Array(n/16);for(let i=0;i<n;i+=16){const o=i/16;t[o]=at.unpack(e,i,t[o])}return t},at.clone=function(e,t){if(c(e))return c(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]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new at(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])},at.fromArray=at.unpack,at.fromColumnMajorArray=function(e,t){return A.defined("values",e),at.clone(e,t)},at.fromRowMajorArray=function(e,t){return A.defined("values",e),c(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new at(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])},at.fromRotationTranslation=function(e,t,n){return A.typeOf.object("rotation",e),t=g(t,f.ZERO),c(n)?(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]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,n):new at(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)},at.fromTranslationQuaternionRotationScale=function(e,t,n,i){A.typeOf.object("translation",e),A.typeOf.object("rotation",t),A.typeOf.object("scale",n),c(i)||(i=new at);const o=n.x,r=n.y,s=n.z,a=t.x*t.x,l=t.x*t.y,u=t.x*t.z,d=t.x*t.w,h=t.y*t.y,m=t.y*t.z,_=t.y*t.w,p=t.z*t.z,y=t.z*t.w,b=t.w*t.w,C=2*(l-y),w=2*(u+_),v=2*(l+y),I=-a+h-p+b,P=2*(m-d),N=2*(u-_),R=2*(m+d),B=-a-h+p+b;return i[0]=(a-h-p+b)*o,i[1]=v*o,i[2]=N*o,i[3]=0,i[4]=C*r,i[5]=I*r,i[6]=R*r,i[7]=0,i[8]=w*s,i[9]=P*s,i[10]=B*s,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,i},at.fromTranslationRotationScale=function(e,t){return A.typeOf.object("translationRotationScale",e),at.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},at.fromTranslation=function(e,t){return A.typeOf.object("translation",e),at.fromRotationTranslation(oe.IDENTITY,e,t)},at.fromScale=function(e,t){return A.typeOf.object("scale",e),c(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new at(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},at.fromUniformScale=function(e,t){return A.typeOf.number("scale",e),c(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new at(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)},at.fromRotation=function(e,t){return A.typeOf.object("rotation",e),c(t)||(t=new at),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]=0,t[13]=0,t[14]=0,t[15]=1,t};const qy=new f,Yy=new f,tA=new f;at.fromCamera=function(e,t){A.typeOf.object("camera",e);const n=e.position,i=e.direction,o=e.up;A.typeOf.object("camera.position",n),A.typeOf.object("camera.direction",i),A.typeOf.object("camera.up",o),f.normalize(i,qy),f.normalize(f.cross(qy,o,Yy),Yy),f.normalize(f.cross(Yy,qy,tA),tA);const r=Yy.x,s=Yy.y,a=Yy.z,l=qy.x,u=qy.y,d=qy.z,h=tA.x,m=tA.y,_=tA.z,p=n.x,y=n.y,b=n.z,x=r*-p+s*-y+a*-b,C=h*-p+m*-y+_*-b,w=l*p+u*y+d*b;return c(t)?(t[0]=r,t[1]=h,t[2]=-l,t[3]=0,t[4]=s,t[5]=m,t[6]=-u,t[7]=0,t[8]=a,t[9]=_,t[10]=-d,t[11]=0,t[12]=x,t[13]=C,t[14]=w,t[15]=1,t):new at(r,s,a,x,h,m,_,C,-l,-u,-d,w,0,0,0,1)},at.computePerspectiveFieldOfView=function(e,t,n,i,o){A.typeOf.number.greaterThan("fovY",e,0),A.typeOf.number.lessThan("fovY",e,Math.PI),A.typeOf.number.greaterThan("near",n,0),A.typeOf.number.greaterThan("far",i,0),A.typeOf.object("result",o);const s=1/Math.tan(.5*e),l=(i+n)/(n-i),u=2*i*n/(n-i);return o[0]=s/t,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=l,o[11]=-1,o[12]=0,o[13]=0,o[14]=u,o[15]=0,o},at.computeOrthographicOffCenter=function(e,t,n,i,o,r,s){A.typeOf.number("left",e),A.typeOf.number("right",t),A.typeOf.number("bottom",n),A.typeOf.number("top",i),A.typeOf.number("near",o),A.typeOf.number("far",r),A.typeOf.object("result",s);let a=1/(t-e),l=1/(i-n),u=1/(r-o);const d=-(t+e)*a,h=-(i+n)*l,m=-(r+o)*u;return a*=2,l*=2,u*=-2,s[0]=a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=l,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=u,s[11]=0,s[12]=d,s[13]=h,s[14]=m,s[15]=1,s},at.computePerspectiveOffCenter=function(e,t,n,i,o,r,s){A.typeOf.number("left",e),A.typeOf.number("right",t),A.typeOf.number("bottom",n),A.typeOf.number("top",i),A.typeOf.number("near",o),A.typeOf.number("far",r),A.typeOf.object("result",s);const l=2*o/(i-n),u=(t+e)/(t-e),d=(i+n)/(i-n),h=-(r+o)/(r-o),_=-2*r*o/(r-o);return s[0]=2*o/(t-e),s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=l,s[6]=0,s[7]=0,s[8]=u,s[9]=d,s[10]=h,s[11]=-1,s[12]=0,s[13]=0,s[14]=_,s[15]=0,s},at.computeInfinitePerspectiveOffCenter=function(e,t,n,i,o,r){A.typeOf.number("left",e),A.typeOf.number("right",t),A.typeOf.number("bottom",n),A.typeOf.number("top",i),A.typeOf.number("near",o),A.typeOf.object("result",r);const a=2*o/(i-n),l=(t+e)/(t-e),u=(i+n)/(i-n),m=-2*o;return r[0]=2*o/(t-e),r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=l,r[9]=u,r[10]=-1,r[11]=-1,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r},at.computeViewportTransformation=function(e,t,n,i){c(i)||(i=new at),e=g(e,g.EMPTY_OBJECT);const o=g(e.x,0),r=g(e.y,0),s=g(e.width,0),a=g(e.height,0);t=g(t,0);const l=.5*s,u=.5*a,d=.5*((n=g(n,1))-t),m=u,_=d,p=o+l,y=r+u,b=t+d;return i[0]=l,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=m,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=_,i[11]=0,i[12]=p,i[13]=y,i[14]=b,i[15]=1,i},at.computeView=function(e,t,n,i,o){return A.typeOf.object("position",e),A.typeOf.object("direction",t),A.typeOf.object("up",n),A.typeOf.object("right",i),A.typeOf.object("result",o),o[0]=i.x,o[1]=n.x,o[2]=-t.x,o[3]=0,o[4]=i.y,o[5]=n.y,o[6]=-t.y,o[7]=0,o[8]=i.z,o[9]=n.z,o[10]=-t.z,o[11]=0,o[12]=-f.dot(i,e),o[13]=-f.dot(n,e),o[14]=f.dot(t,e),o[15]=1,o},at.toArray=function(e,t){return A.typeOf.object("matrix",e),c(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]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[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]]},at.getElementIndex=function(e,t){return A.typeOf.number.greaterThanOrEquals("row",t,0),A.typeOf.number.lessThanOrEquals("row",t,3),A.typeOf.number.greaterThanOrEquals("column",e,0),A.typeOf.number.lessThanOrEquals("column",e,3),4*e+t},at.getColumn=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,3),A.typeOf.object("result",n);const i=4*t,r=e[i+1],s=e[i+2],a=e[i+3];return n.x=e[i],n.y=r,n.z=s,n.w=a,n},at.setColumn=function(e,t,n,i){A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,3),A.typeOf.object("cartesian",n),A.typeOf.object("result",i);const o=4*t;return(i=at.clone(e,i))[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i[o+3]=n.w,i},at.getRow=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,3),A.typeOf.object("result",n);const o=e[t+4],r=e[t+8],s=e[t+12];return n.x=e[t],n.y=o,n.z=r,n.w=s,n},at.setRow=function(e,t,n,i){return A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,3),A.typeOf.object("cartesian",n),A.typeOf.object("result",i),(i=at.clone(e,i))[t]=n.x,i[t+4]=n.y,i[t+8]=n.z,i[t+12]=n.w,i},at.setTranslation=function(e,t,n){return A.typeOf.object("matrix",e),A.typeOf.object("translation",t),A.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]=t.x,n[13]=t.y,n[14]=t.z,n[15]=e[15],n};const lse=new f;at.setScale=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("scale",t),A.typeOf.object("result",n);const i=at.getScale(e,lse),o=t.x/i.x,r=t.y/i.y,s=t.z/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3],n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7],n[8]=e[8]*s,n[9]=e[9]*s,n[10]=e[10]*s,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};const use=new f;at.setUniformScale=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.number("scale",t),A.typeOf.object("result",n);const i=at.getScale(e,use),o=t/i.x,r=t/i.y,s=t/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3],n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7],n[8]=e[8]*s,n[9]=e[9]*s,n[10]=e[10]*s,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};const PP=new f;at.getScale=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),t.x=f.magnitude(f.fromElements(e[0],e[1],e[2],PP)),t.y=f.magnitude(f.fromElements(e[4],e[5],e[6],PP)),t.z=f.magnitude(f.fromElements(e[8],e[9],e[10],PP)),t};const Fz=new f;at.getMaximumScale=function(e){return at.getScale(e,Fz),f.maximumComponent(Fz)};const dse=new f;at.setRotation=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("result",n);const i=at.getScale(e,dse);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=e[3],n[4]=t[3]*i.y,n[5]=t[4]*i.y,n[6]=t[5]*i.y,n[7]=e[7],n[8]=t[6]*i.z,n[9]=t[7]*i.z,n[10]=t[8]*i.z,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};const fse=new f;at.getRotation=function(e,t){A.typeOf.object("matrix",e),A.typeOf.object("result",t);const n=at.getScale(e,fse);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[4]/n.y,t[4]=e[5]/n.y,t[5]=e[6]/n.y,t[6]=e[8]/n.z,t[7]=e[9]/n.z,t[8]=e[10]/n.z,t},at.multiply=function(e,t,n){A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n);const i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],u=e[6],d=e[7],h=e[8],m=e[9],_=e[10],p=e[11],y=e[12],b=e[13],x=e[14],C=e[15],w=t[0],v=t[1],I=t[2],P=t[3],N=t[4],R=t[5],B=t[6],F=t[7],S=t[8],D=t[9],L=t[10],M=t[11],U=t[12],z=t[13],G=t[14],W=t[15],j=o*w+l*v+m*I+b*P,Q=r*w+u*v+_*I+x*P,Y=s*w+d*v+p*I+C*P,ne=i*N+a*R+h*B+y*F,X=o*N+l*R+m*B+b*F,K=r*N+u*R+_*B+x*F,$=s*N+d*R+p*B+C*F,me=i*S+a*D+h*L+y*M,Se=o*S+l*D+m*L+b*M,fe=r*S+u*D+_*L+x*M,ye=s*S+d*D+p*L+C*M,ve=i*U+a*z+h*G+y*W,Oe=o*U+l*z+m*G+b*W,Ge=r*U+u*z+_*G+x*W,je=s*U+d*z+p*G+C*W;return n[0]=i*w+a*v+h*I+y*P,n[1]=j,n[2]=Q,n[3]=Y,n[4]=ne,n[5]=X,n[6]=K,n[7]=$,n[8]=me,n[9]=Se,n[10]=fe,n[11]=ye,n[12]=ve,n[13]=Oe,n[14]=Ge,n[15]=je,n},at.add=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n},at.subtract=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n},at.multiplyTransformation=function(e,t,n){A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n);const i=e[0],o=e[1],r=e[2],s=e[4],a=e[5],l=e[6],u=e[8],d=e[9],h=e[10],y=t[0],b=t[1],x=t[2],C=t[4],w=t[5],v=t[6],I=t[8],P=t[9],N=t[10],R=t[12],B=t[13],F=t[14],D=o*y+a*b+d*x,L=r*y+l*b+h*x,M=i*C+s*w+u*v,U=o*C+a*w+d*v,z=r*C+l*w+h*v,G=i*I+s*P+u*N,W=o*I+a*P+d*N,q=r*I+l*P+h*N,j=i*R+s*B+u*F+e[12],Q=o*R+a*B+d*F+e[13],Y=r*R+l*B+h*F+e[14];return n[0]=i*y+s*b+u*x,n[1]=D,n[2]=L,n[3]=0,n[4]=M,n[5]=U,n[6]=z,n[7]=0,n[8]=G,n[9]=W,n[10]=q,n[11]=0,n[12]=j,n[13]=Q,n[14]=Y,n[15]=1,n},at.multiplyByMatrix3=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("rotation",t),A.typeOf.object("result",n);const i=e[0],o=e[1],r=e[2],s=e[4],a=e[5],l=e[6],u=e[8],d=e[9],h=e[10],m=t[0],_=t[1],p=t[2],y=t[3],b=t[4],x=t[5],C=t[6],w=t[7],v=t[8],P=o*m+a*_+d*p,N=r*m+l*_+h*p,R=i*y+s*b+u*x,B=o*y+a*b+d*x,F=r*y+l*b+h*x,S=i*C+s*w+u*v,D=o*C+a*w+d*v,L=r*C+l*w+h*v;return n[0]=i*m+s*_+u*p,n[1]=P,n[2]=N,n[3]=0,n[4]=R,n[5]=B,n[6]=F,n[7]=0,n[8]=S,n[9]=D,n[10]=L,n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n},at.multiplyByTranslation=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("translation",t),A.typeOf.object("result",n);const i=t.x,o=t.y,r=t.z,s=i*e[0]+o*e[4]+r*e[8]+e[12],a=i*e[1]+o*e[5]+r*e[9]+e[13],l=i*e[2]+o*e[6]+r*e[10]+e[14];return 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]=s,n[13]=a,n[14]=l,n[15]=e[15],n},at.multiplyByScale=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("scale",t),A.typeOf.object("result",n);const i=t.x,o=t.y,r=t.z;return 1===i&&1===o&&1===r?at.clone(e,n):(n[0]=i*e[0],n[1]=i*e[1],n[2]=i*e[2],n[3]=e[3],n[4]=o*e[4],n[5]=o*e[5],n[6]=o*e[6],n[7]=e[7],n[8]=r*e[8],n[9]=r*e[9],n[10]=r*e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n)},at.multiplyByUniformScale=function(e,t,n){return A.typeOf.object("matrix",e),A.typeOf.number("scale",t),A.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3],n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7],n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n},at.multiplyByVector=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("cartesian",t),A.typeOf.object("result",n);const i=t.x,o=t.y,r=t.z,s=t.w,l=e[1]*i+e[5]*o+e[9]*r+e[13]*s,u=e[2]*i+e[6]*o+e[10]*r+e[14]*s,d=e[3]*i+e[7]*o+e[11]*r+e[15]*s;return n.x=e[0]*i+e[4]*o+e[8]*r+e[12]*s,n.y=l,n.z=u,n.w=d,n},at.multiplyByPointAsVector=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("cartesian",t),A.typeOf.object("result",n);const i=t.x,o=t.y,r=t.z,a=e[1]*i+e[5]*o+e[9]*r,l=e[2]*i+e[6]*o+e[10]*r;return n.x=e[0]*i+e[4]*o+e[8]*r,n.y=a,n.z=l,n},at.multiplyByPoint=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("cartesian",t),A.typeOf.object("result",n);const i=t.x,o=t.y,r=t.z,a=e[1]*i+e[5]*o+e[9]*r+e[13],l=e[2]*i+e[6]*o+e[10]*r+e[14];return n.x=e[0]*i+e[4]*o+e[8]*r+e[12],n.y=a,n.z=l,n},at.multiplyByScalar=function(e,t,n){return A.typeOf.object("matrix",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n},at.negate=function(e,t){return A.typeOf.object("matrix",e),A.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]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},at.transpose=function(e,t){A.typeOf.object("matrix",e),A.typeOf.object("result",t);const n=e[1],i=e[2],o=e[3],r=e[6],s=e[7],a=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=r,t[10]=e[10],t[11]=e[14],t[12]=o,t[13]=s,t[14]=a,t[15]=e[15],t},at.abs=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},at.equals=function(e,t){return e===t||c(e)&&c(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},at.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(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&&Math.abs(e[9]-t[9])<=n&&Math.abs(e[10]-t[10])<=n&&Math.abs(e[11]-t[11])<=n&&Math.abs(e[12]-t[12])<=n&&Math.abs(e[13]-t[13])<=n&&Math.abs(e[14]-t[14])<=n&&Math.abs(e[15]-t[15])<=n},at.getTranslation=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t},at.getMatrix3=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};const hse=new oe,pse=new oe,mse=new de,_se=new de(0,0,0,1);at.inverse=function(e,t){A.typeOf.object("matrix",e),A.typeOf.object("result",t);const n=e[0],i=e[4],o=e[8],r=e[12],s=e[1],a=e[5],l=e[9],u=e[13],d=e[2],h=e[6],m=e[10],_=e[14],p=e[3],y=e[7],b=e[11],x=e[15];let C=m*x,w=_*b,v=h*x,I=_*y,P=h*b,N=m*y,R=d*x,B=_*p,F=d*b,S=m*p,D=d*y,L=h*p;const M=C*a+I*l+P*u-(w*a+v*l+N*u),U=w*s+R*l+S*u-(C*s+B*l+F*u),z=v*s+B*a+D*u-(I*s+R*a+L*u),G=N*s+F*a+L*l-(P*s+S*a+D*l),W=w*i+v*o+N*r-(C*i+I*o+P*r),q=C*n+B*o+F*r-(w*n+R*o+S*r),j=I*n+R*i+L*r-(v*n+B*i+D*r),Q=P*n+S*i+D*o-(N*n+F*i+L*o);C=o*u,w=r*l,v=i*u,I=r*a,P=i*l,N=o*a,R=n*u,B=r*s,F=n*l,S=o*s,D=n*a,L=i*s;const Y=C*y+I*b+P*x-(w*y+v*b+N*x),ne=w*p+R*b+S*x-(C*p+B*b+F*x),X=v*p+B*y+D*x-(I*p+R*y+L*x),K=N*p+F*y+L*b-(P*p+S*y+D*b),$=v*m+N*_+w*h-(P*_+C*h+I*m),me=F*_+C*d+B*m-(R*m+S*_+w*d),Se=R*h+L*_+I*d-(D*_+v*d+B*h),fe=D*m+P*d+S*h-(F*h+L*m+N*d);let ye=n*M+i*U+o*z+r*G;if(Math.abs(ye)<O.EPSILON21){if(oe.equalsEpsilon(at.getMatrix3(e,hse),pse,O.EPSILON7)&&de.equals(at.getRow(e,3,mse),_se))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new Pe("matrix is not invertible because its determinate is zero.")}return ye=1/ye,t[0]=M*ye,t[1]=U*ye,t[2]=z*ye,t[3]=G*ye,t[4]=W*ye,t[5]=q*ye,t[6]=j*ye,t[7]=Q*ye,t[8]=Y*ye,t[9]=ne*ye,t[10]=X*ye,t[11]=K*ye,t[12]=$*ye,t[13]=me*ye,t[14]=Se*ye,t[15]=fe*ye,t},at.inverseTransformation=function(e,t){A.typeOf.object("matrix",e),A.typeOf.object("result",t);const n=e[0],i=e[1],o=e[2],r=e[4],s=e[5],a=e[6],l=e[8],u=e[9],d=e[10],h=e[12],m=e[13],_=e[14],p=-n*h-i*m-o*_,y=-r*h-s*m-a*_,b=-l*h-u*m-d*_;return t[0]=n,t[1]=r,t[2]=l,t[3]=0,t[4]=i,t[5]=s,t[6]=u,t[7]=0,t[8]=o,t[9]=a,t[10]=d,t[11]=0,t[12]=p,t[13]=y,t[14]=b,t[15]=1,t};const gse=new at;at.inverseTranspose=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),at.inverse(at.transpose(e,gse),t)},at.IDENTITY=Object.freeze(new at(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),at.ZERO=Object.freeze(new at(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),at.COLUMN0ROW0=0,at.COLUMN0ROW1=1,at.COLUMN0ROW2=2,at.COLUMN0ROW3=3,at.COLUMN1ROW0=4,at.COLUMN1ROW1=5,at.COLUMN1ROW2=6,at.COLUMN1ROW3=7,at.COLUMN2ROW0=8,at.COLUMN2ROW1=9,at.COLUMN2ROW2=10,at.COLUMN2ROW3=11,at.COLUMN3ROW0=12,at.COLUMN3ROW1=13,at.COLUMN3ROW2=14,at.COLUMN3ROW3=15,Object.defineProperties(at.prototype,{length:{get:function(){return at.packedLength}}}),at.prototype.clone=function(e){return at.clone(this,e)},at.prototype.equals=function(e){return at.equals(this,e)},at.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]&&e[9]===t[n+9]&&e[10]===t[n+10]&&e[11]===t[n+11]&&e[12]===t[n+12]&&e[13]===t[n+13]&&e[14]===t[n+14]&&e[15]===t[n+15]},at.prototype.equalsEpsilon=function(e,t){return at.equalsEpsilon(this,e,t)},at.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})\n(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})\n(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})\n(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};const k=at;let fp;const _r={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Tc={};Object.defineProperties(Tc,{element:{get:function(){if(Tc.supportsFullscreen())return document[_r.fullscreenElement]}},changeEventName:{get:function(){if(Tc.supportsFullscreen())return _r.fullscreenchange}},errorEventName:{get:function(){if(Tc.supportsFullscreen())return _r.fullscreenerror}},enabled:{get:function(){if(Tc.supportsFullscreen())return document[_r.fullscreenEnabled]}},fullscreen:{get:function(){if(Tc.supportsFullscreen())return null!==Tc.element}}}),Tc.supportsFullscreen=function(){if(c(fp))return fp;fp=!1;const e=document.body;if("function"==typeof e.requestFullscreen)return _r.requestFullscreen="requestFullscreen",_r.exitFullscreen="exitFullscreen",_r.fullscreenEnabled="fullscreenEnabled",_r.fullscreenElement="fullscreenElement",_r.fullscreenchange="fullscreenchange",_r.fullscreenerror="fullscreenerror",fp=!0,fp;const t=["webkit","moz","o","ms","khtml"];let n;for(let i=0,o=t.length;i<o;++i){const r=t[i];n=`${r}RequestFullscreen`,"function"==typeof e[n]?(_r.requestFullscreen=n,fp=!0):(n=`${r}RequestFullScreen`,"function"==typeof e[n]&&(_r.requestFullscreen=n,fp=!0)),n=`${r}ExitFullscreen`,"function"==typeof document[n]?_r.exitFullscreen=n:(n=`${r}CancelFullScreen`,"function"==typeof document[n]&&(_r.exitFullscreen=n)),n=`${r}FullscreenEnabled`,void 0!==document[n]?_r.fullscreenEnabled=n:(n=`${r}FullScreenEnabled`,void 0!==document[n]&&(_r.fullscreenEnabled=n)),n=`${r}FullscreenElement`,void 0!==document[n]?_r.fullscreenElement=n:(n=`${r}FullScreenElement`,void 0!==document[n]&&(_r.fullscreenElement=n)),n=`${r}fullscreenchange`,void 0!==document[`on${n}`]&&("ms"===r&&(n="MSFullscreenChange"),_r.fullscreenchange=n),n=`${r}fullscreenerror`,void 0!==document[`on${n}`]&&("ms"===r&&(n="MSFullscreenError"),_r.fullscreenerror=n)}return fp},Tc.requestFullscreen=function(e,t){Tc.supportsFullscreen()&&e[_r.requestFullscreen]({vrDisplay:t})},Tc.exitFullscreen=function(){Tc.supportsFullscreen()&&document[_r.exitFullscreen]()},Tc._names=_r;const Os=Tc;let _a,_w,Bz,gw,kz,yw,RP,nA,LP,bw,Hz,Aw,NP,MP,FP,BP,Gz,Cw;function y_(e){const t=e.split(".");for(let n=0,i=t.length;n<i;++n)t[n]=parseInt(t[n],10);return t}function OP(){if(!c(_w)&&(_w=!1,!Tw())){const e=/ Chrome\/([\.0-9]+)/.exec(_a.userAgent);null!==e&&(_w=!0,Bz=y_(e[1]))}return _w}function Uz(){if(!c(gw)&&(gw=!1,!OP()&&!Tw()&&/ Safari\/[\.0-9]+/.test(_a.userAgent))){const e=/ Version\/([\.0-9]+)/.exec(_a.userAgent);null!==e&&(gw=!0,kz=y_(e[1]))}return gw}function zz(){if(!c(yw)){yw=!1;const e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(_a.userAgent);null!==e&&(yw=!0,RP=y_(e[1]),RP.isNightly=!!e[2])}return yw}function Vz(){if(!c(nA)){let e;nA=!1,"Microsoft Internet Explorer"===_a.appName?(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(_a.userAgent),null!==e&&(nA=!0,LP=y_(e[1]))):"Netscape"===_a.appName&&(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(_a.userAgent),null!==e&&(nA=!0,LP=y_(e[1])))}return nA}function Tw(){if(!c(bw)){bw=!1;const e=/ Edg\/([\.0-9]+)/.exec(_a.userAgent);null!==e&&(bw=!0,Hz=y_(e[1]))}return bw}function xw(){if(!c(Aw)){Aw=!1;const e=/Firefox\/([\.0-9]+)/.exec(_a.userAgent);null!==e&&(Aw=!0,NP=y_(e[1]))}return Aw}function jz(){if(!c(Cw)){const e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");const t=e.style.imageRendering;Cw=c(t)&&""!==t,Cw&&(Gz=t)}return Cw}function ga(){if(!ga.initialized)throw new E("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return ga._result}_a=typeof navigator<"u"?navigator:{},ga._promise=void 0,ga._result=void 0,ga.initialize=function(){return c(ga._promise)||(ga._promise=new Promise(e=>{const t=new Image;t.onload=function(){e(ga._result=t.width>0&&t.height>0)},t.onerror=function(){e(ga._result=!1)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),ga._promise},Object.defineProperties(ga,{initialized:{get:function(){return c(ga._result)}}});const Xy=[];typeof ArrayBuffer<"u"&&(Xy.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&Xy.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&Xy.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&Xy.push(BigInt64Array),typeof BigUint64Array<"u"&&Xy.push(BigUint64Array));const Nl={isChrome:OP,chromeVersion:function yse(){return OP()&&Bz},isSafari:Uz,safariVersion:function bse(){return Uz()&&kz},isWebkit:zz,webkitVersion:function Tse(){return zz()&&RP},isInternetExplorer:Vz,internetExplorerVersion:function Ase(){return Vz()&&LP},isEdge:Tw,edgeVersion:function xse(){return Tw()&&Hz},isFirefox:xw,firefoxVersion:function wse(){return xw()&&NP},isWindows:function Cse(){return c(MP)||(MP=/Windows/i.test(_a.appVersion)),MP},isIPadOrIOS:function Ese(){return c(FP)||(FP="iPhone"===navigator.platform||"iPod"===navigator.platform||"iPad"===navigator.platform),FP},hardwareConcurrency:g(_a.hardwareConcurrency,3),supportsPointerEvents:function Sse(){return c(BP)||(BP=!xw()&&typeof PointerEvent<"u"&&(!c(_a.pointerEnabled)||_a.pointerEnabled)),BP},supportsImageRenderingPixelated:jz,supportsWebP:ga,imageRenderingValue:function vse(){return jz()?Gz:void 0},typedArrayTypes:Xy,supportsBasis:function(e){return Nl.supportsWebAssembly()&&e.context.supportsBasis},supportsFullscreen:function(){return Os.supportsFullscreen()},supportsTypedArrays:function(){return typeof ArrayBuffer<"u"},supportsBigInt64Array:function(){return typeof BigInt64Array<"u"},supportsBigUint64Array:function(){return typeof BigUint64Array<"u"},supportsBigInt:function(){return typeof BigInt<"u"},supportsWebWorkers:function(){return typeof Worker<"u"},supportsWebAssembly:function(){return typeof WebAssembly<"u"},supportsWebgl2:function(e){return A.defined("scene",e),e.context.webgl2},supportsEsmWebWorkers:function(){return!xw()||parseInt(NP)>=114}},Hn=Nl;function dt(e,t,n,i){this.x=g(e,0),this.y=g(t,0),this.z=g(n,0),this.w=g(i,0)}let iA=new f;dt.fromAxisAngle=function(e,t,n){A.typeOf.object("axis",e),A.typeOf.number("angle",t);const i=t/2,o=Math.sin(i);iA=f.normalize(e,iA);const r=iA.x*o,s=iA.y*o,a=iA.z*o,l=Math.cos(i);return c(n)?(n.x=r,n.y=s,n.z=a,n.w=l,n):new dt(r,s,a,l)};const Ise=[1,2,0],Dse=new Array(3);dt.fromRotationMatrix=function(e,t){let n,i,o,r,s;A.typeOf.object("matrix",e);const a=e[oe.COLUMN0ROW0],l=e[oe.COLUMN1ROW1],u=e[oe.COLUMN2ROW2],d=a+l+u;if(d>0)n=Math.sqrt(d+1),s=.5*n,n=.5/n,i=(e[oe.COLUMN1ROW2]-e[oe.COLUMN2ROW1])*n,o=(e[oe.COLUMN2ROW0]-e[oe.COLUMN0ROW2])*n,r=(e[oe.COLUMN0ROW1]-e[oe.COLUMN1ROW0])*n;else{let m=0;l>a&&(m=1),u>a&&u>l&&(m=2);const _=Ise[m],p=Ise[_];n=Math.sqrt(e[oe.getElementIndex(m,m)]-e[oe.getElementIndex(_,_)]-e[oe.getElementIndex(p,p)]+1);const y=Dse;y[m]=.5*n,n=.5/n,s=(e[oe.getElementIndex(p,_)]-e[oe.getElementIndex(_,p)])*n,y[_]=(e[oe.getElementIndex(_,m)]+e[oe.getElementIndex(m,_)])*n,y[p]=(e[oe.getElementIndex(p,m)]+e[oe.getElementIndex(m,p)])*n,i=-y[0],o=-y[1],r=-y[2]}return c(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new dt(i,o,r,s)};const Wz=new dt;let qz=new dt,kP=new dt,Yz=new dt;dt.fromHeadingPitchRoll=function(e,t){return A.typeOf.object("headingPitchRoll",e),Yz=dt.fromAxisAngle(f.UNIT_X,e.roll,Wz),kP=dt.fromAxisAngle(f.UNIT_Y,-e.pitch,t),t=dt.multiply(kP,Yz,kP),qz=dt.fromAxisAngle(f.UNIT_Z,-e.heading,Wz),dt.multiply(qz,t,t)};const Ew=new f,UP=new f,Ru=new dt,Xz=new dt,ww=new dt;dt.packedLength=4,dt.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},dt.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new dt),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},dt.packedInterpolationLength=3,dt.convertPackedArrayForInterpolation=function(e,t,n,i){dt.unpack(e,4*n,ww),dt.conjugate(ww,ww);for(let o=0,r=n-t+1;o<r;o++){const s=3*o;dt.unpack(e,4*(t+o),Ru),dt.multiply(Ru,ww,Ru),Ru.w<0&&dt.negate(Ru,Ru),dt.computeAxis(Ru,Ew);const a=dt.computeAngle(Ru);c(i)||(i=[]),i[s]=Ew.x*a,i[s+1]=Ew.y*a,i[s+2]=Ew.z*a}},dt.unpackInterpolationResult=function(e,t,n,i,o){c(o)||(o=new dt),f.fromArray(e,0,UP);const r=f.magnitude(UP);return dt.unpack(t,4*i,Xz),0===r?dt.clone(dt.IDENTITY,Ru):dt.fromAxisAngle(UP,r,Ru),dt.multiply(Ru,Xz,o)},dt.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new dt(e.x,e.y,e.z,e.w)},dt.conjugate=function(e,t){return A.typeOf.object("quaternion",e),A.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},dt.magnitudeSquared=function(e){return A.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},dt.magnitude=function(e){return Math.sqrt(dt.magnitudeSquared(e))},dt.normalize=function(e,t){A.typeOf.object("result",t);const n=1/dt.magnitude(e),o=e.y*n,r=e.z*n,s=e.w*n;return t.x=e.x*n,t.y=o,t.z=r,t.w=s,t},dt.inverse=function(e,t){A.typeOf.object("result",t);const n=dt.magnitudeSquared(e);return t=dt.conjugate(e,t),dt.multiplyByScalar(t,1/n,t)},dt.add=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n},dt.subtract=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n},dt.negate=function(e,t){return A.typeOf.object("quaternion",e),A.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},dt.dot=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},dt.multiply=function(e,t,n){A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n);const i=e.x,o=e.y,r=e.z,s=e.w,a=t.x,l=t.y,u=t.z,d=t.w,m=s*l-i*u+o*d+r*a,_=s*u+i*l-o*a+r*d,p=s*d-i*a-o*l-r*u;return n.x=s*a+i*d+o*u-r*l,n.y=m,n.z=_,n.w=p,n},dt.multiplyByScalar=function(e,t,n){return A.typeOf.object("quaternion",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n},dt.divideByScalar=function(e,t,n){return A.typeOf.object("quaternion",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n},dt.computeAxis=function(e,t){A.typeOf.object("quaternion",e),A.typeOf.object("result",t);const n=e.w;if(Math.abs(n-1)<O.EPSILON6||Math.abs(n+1)<O.EPSILON6)return t.x=1,t.y=t.z=0,t;const i=1/Math.sqrt(1-n*n);return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t},dt.computeAngle=function(e){return A.typeOf.object("quaternion",e),Math.abs(e.w-1)<O.EPSILON6?0:2*Math.acos(e.w)};let zP=new dt;dt.lerp=function(e,t,n,i){return A.typeOf.object("start",e),A.typeOf.object("end",t),A.typeOf.number("t",n),A.typeOf.object("result",i),zP=dt.multiplyByScalar(t,n,zP),i=dt.multiplyByScalar(e,1-n,i),dt.add(zP,i,i)};let Zz=new dt,VP=new dt,HP=new dt;dt.slerp=function(e,t,n,i){A.typeOf.object("start",e),A.typeOf.object("end",t),A.typeOf.number("t",n),A.typeOf.object("result",i);let o=dt.dot(e,t),r=t;if(o<0&&(o=-o,r=Zz=dt.negate(t,Zz)),1-o<O.EPSILON6)return dt.lerp(e,r,n,i);const s=Math.acos(o);return VP=dt.multiplyByScalar(e,Math.sin((1-n)*s),VP),HP=dt.multiplyByScalar(r,Math.sin(n*s),HP),i=dt.add(VP,HP,i),dt.multiplyByScalar(i,1/Math.sin(s),i)},dt.log=function(e,t){A.typeOf.object("quaternion",e),A.typeOf.object("result",t);const n=O.acosClamped(e.w);let i=0;return 0!==n&&(i=n/Math.sin(n)),f.multiplyByScalar(e,i,t)},dt.exp=function(e,t){A.typeOf.object("cartesian",e),A.typeOf.object("result",t);const n=f.magnitude(e);let i=0;return 0!==n&&(i=Math.sin(n)/n),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=Math.cos(n),t};const Pse=new f,Ose=new f,oA=new dt,Zy=new dt;dt.computeInnerQuadrangle=function(e,t,n,i){A.typeOf.object("q0",e),A.typeOf.object("q1",t),A.typeOf.object("q2",n),A.typeOf.object("result",i);const o=dt.conjugate(t,oA);dt.multiply(o,n,Zy);const r=dt.log(Zy,Pse);dt.multiply(o,e,Zy);const s=dt.log(Zy,Ose);return f.add(r,s,r),f.multiplyByScalar(r,.25,r),f.negate(r,r),dt.exp(r,oA),dt.multiply(t,oA,i)},dt.squad=function(e,t,n,i,o,r){A.typeOf.object("q0",e),A.typeOf.object("q1",t),A.typeOf.object("s0",n),A.typeOf.object("s1",i),A.typeOf.number("t",o),A.typeOf.object("result",r);const s=dt.slerp(e,t,o,oA),a=dt.slerp(n,i,o,Zy);return dt.slerp(s,a,2*o*(1-o),r)};const Rse=new dt,$z=1.9011074535173003,Sw=Hn.supportsTypedArrays()?new Float32Array(8):[],vw=Hn.supportsTypedArrays()?new Float32Array(8):[],Uf=Hn.supportsTypedArrays()?new Float32Array(8):[],zf=Hn.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){const t=e+1,n=2*t+1;Sw[e]=1/(t*n),vw[e]=t/n}Sw[7]=$z/136,vw[7]=8*$z/17,dt.fastSlerp=function(e,t,n,i){A.typeOf.object("start",e),A.typeOf.object("end",t),A.typeOf.number("t",n),A.typeOf.object("result",i);let r,o=dt.dot(e,t);o>=0?r=1:(r=-1,o=-o);const s=o-1,a=1-n,l=n*n,u=a*a;for(let _=7;_>=0;--_)Uf[_]=(Sw[_]*l-vw[_])*s,zf[_]=(Sw[_]*u-vw[_])*s;const d=r*n*(1+Uf[0]*(1+Uf[1]*(1+Uf[2]*(1+Uf[3]*(1+Uf[4]*(1+Uf[5]*(1+Uf[6]*(1+Uf[7])))))))),m=dt.multiplyByScalar(e,a*(1+zf[0]*(1+zf[1]*(1+zf[2]*(1+zf[3]*(1+zf[4]*(1+zf[5]*(1+zf[6]*(1+zf[7])))))))),Rse);return dt.multiplyByScalar(t,d,i),dt.add(m,i,i)},dt.fastSquad=function(e,t,n,i,o,r){A.typeOf.object("q0",e),A.typeOf.object("q1",t),A.typeOf.object("s0",n),A.typeOf.object("s1",i),A.typeOf.number("t",o),A.typeOf.object("result",r);const s=dt.fastSlerp(e,t,o,oA),a=dt.fastSlerp(n,i,o,Zy);return dt.fastSlerp(s,a,2*o*(1-o),r)},dt.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},dt.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(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},dt.ZERO=Object.freeze(new dt(0,0,0,0)),dt.IDENTITY=Object.freeze(new dt(0,0,0,1)),dt.prototype.clone=function(e){return dt.clone(this,e)},dt.prototype.equals=function(e){return dt.equals(this,e)},dt.prototype.equalsEpsilon=function(e,t){return dt.equalsEpsilon(this,e,t)},dt.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const bt=dt,Ui={},GP={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"}},$y={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},jP={},Ac={east:new f,north:new f,up:new f,west:new f,south:new f,down:new f};let hp=new f,pp=new f,mp=new f;Ui.localFrameToFixedFrameGenerator=function(e,t){if(!GP.hasOwnProperty(e)||!GP[e].hasOwnProperty(t))throw new E("firstAxis and secondAxis must be east, north, up, west, south or down.");const n=GP[e][t];let i;const o=e+t;return c(jP[o])?i=jP[o]:(i=function(r,s,a){if(!c(r))throw new E("origin is required.");if(isNaN(r.x)||isNaN(r.y)||isNaN(r.z))throw new E("origin has a NaN component");if(c(a)||(a=new k),f.equalsEpsilon(r,f.ZERO,O.EPSILON14))f.unpack($y[e],0,hp),f.unpack($y[t],0,pp),f.unpack($y[n],0,mp);else if(O.equalsEpsilon(r.x,0,O.EPSILON14)&&O.equalsEpsilon(r.y,0,O.EPSILON14)){const l=O.sign(r.z);f.unpack($y[e],0,hp),"east"!==e&&"west"!==e&&f.multiplyByScalar(hp,l,hp),f.unpack($y[t],0,pp),"east"!==t&&"west"!==t&&f.multiplyByScalar(pp,l,pp),f.unpack($y[n],0,mp),"east"!==n&&"west"!==n&&f.multiplyByScalar(mp,l,mp)}else{(s=g(s,he.default)).geodeticSurfaceNormal(r,Ac.up);const l=Ac.up,u=Ac.east;u.x=-r.y,u.y=r.x,u.z=0,f.normalize(u,Ac.east),f.cross(l,u,Ac.north),f.multiplyByScalar(Ac.up,-1,Ac.down),f.multiplyByScalar(Ac.east,-1,Ac.west),f.multiplyByScalar(Ac.north,-1,Ac.south),hp=Ac[e],pp=Ac[t],mp=Ac[n]}return a[0]=hp.x,a[1]=hp.y,a[2]=hp.z,a[3]=0,a[4]=pp.x,a[5]=pp.y,a[6]=pp.z,a[7]=0,a[8]=mp.x,a[9]=mp.y,a[10]=mp.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},jP[o]=i),i},Ui.eastNorthUpToFixedFrame=Ui.localFrameToFixedFrameGenerator("east","north"),Ui.northEastDownToFixedFrame=Ui.localFrameToFixedFrameGenerator("north","east"),Ui.northUpEastToFixedFrame=Ui.localFrameToFixedFrameGenerator("north","up"),Ui.northWestUpToFixedFrame=Ui.localFrameToFixedFrameGenerator("north","west");const Lse=new bt,Nse=new f(1,1,1),Mse=new k;Ui.headingPitchRollToFixedFrame=function(e,t,n,i,o){A.typeOf.object("HeadingPitchRoll",t),i=g(i,Ui.eastNorthUpToFixedFrame);const r=bt.fromHeadingPitchRoll(t,Lse),s=k.fromTranslationQuaternionRotationScale(f.ZERO,r,Nse,Mse);return o=i(e,n,o),k.multiply(o,s,o)};const Fse=new k,Bse=new oe;Ui.headingPitchRollQuaternion=function(e,t,n,i,o){A.typeOf.object("HeadingPitchRoll",t);const r=Ui.headingPitchRollToFixedFrame(e,t,n,i,Fse),s=k.getMatrix3(r,Bse);return bt.fromRotationMatrix(s,o)};const kse=new f(1,1,1),Use=new f,Kz=new k,zse=new k,Vse=new oe,Hse=new bt;Ui.fixedFrameToHeadingPitchRoll=function(e,t,n,i){A.defined("transform",e),t=g(t,he.default),n=g(n,Ui.eastNorthUpToFixedFrame),c(i)||(i=new Wy);const o=k.getTranslation(e,Use);if(f.equals(o,f.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=k.inverseTransformation(n(o,t,Kz),Kz),s=k.setScale(e,kse,zse);s=k.setTranslation(s,f.ZERO,s),r=k.multiply(r,s,r);let a=bt.fromRotationMatrix(k.getMatrix3(r,Vse),Hse);return a=bt.normalize(a,a),Wy.fromQuaternion(a,i)};const Zse=O.TWO_PI/86400;let Iw=new re;Ui.computeTemeToPseudoFixedMatrix=function(e,t){if(!c(e))throw new E("date is required.");Iw=re.addSeconds(e,-re.computeTaiMinusUtc(e),Iw);const n=Iw.dayNumber,i=Iw.secondsOfDay;let o;const r=n-2451545;o=i>=43200?(r+.5)/T.DAYS_PER_JULIAN_CENTURY:(r-.5)/T.DAYS_PER_JULIAN_CENTURY;const d=(24110.54841+o*(8640184.812866+o*(.093104+-62e-7*o)))*Zse%O.TWO_PI+(i+.5*T.SECONDS_PER_DAY)%T.SECONDS_PER_DAY*(72921158553e-15+11772758384668e-32*(n-2451545.5)),h=Math.cos(d),m=Math.sin(d);return c(t)?(t[0]=h,t[1]=-m,t[2]=0,t[3]=m,t[4]=h,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new oe(h,m,0,-m,h,0,0,0,1)},Ui.iau2006XysData=new ese,Ui.earthOrientationParameters=Zre.NONE;const WP=32.184;Ui.preloadIcrfFixed=function(e){return Ui.iau2006XysData.preload(e.start.dayNumber,e.start.secondsOfDay+WP,e.stop.dayNumber,e.stop.secondsOfDay+WP)},Ui.computeIcrfToFixedMatrix=function(e,t){if(!c(e))throw new E("date is required.");c(t)||(t=new oe);const n=Ui.computeFixedToIcrfMatrix(e,t);if(c(n))return oe.transpose(n,t)};const Kse=new Lz(0,0,0),Qse=new qT(0,0,0,0,0,0),qP=new oe,YP=new oe;Ui.computeFixedToIcrfMatrix=function(e,t){if(!c(e))throw new E("date is required.");c(t)||(t=new oe);const n=Ui.earthOrientationParameters.compute(e,Qse);if(!c(n))return;const i=e.dayNumber,o=e.secondsOfDay+WP,r=Ui.iau2006XysData.computeXysRadians(i,o,Kse);if(!c(r))return;const s=r.x+n.xPoleOffset,a=r.y+n.yPoleOffset,l=1/(1+Math.sqrt(1-s*s-a*a)),u=qP;u[0]=1-l*s*s,u[3]=-l*s*a,u[6]=s,u[1]=-l*s*a,u[4]=1-l*a*a,u[7]=a,u[2]=-s,u[5]=-a,u[8]=1-l*(s*s+a*a);const d=oe.fromRotationZ(-r.s,YP),h=oe.multiply(u,d,qP),m=e.dayNumber,y=(e.secondsOfDay-re.computeTaiMinusUtc(e)+n.ut1MinusUtc)/T.SECONDS_PER_DAY;let b=.779057273264+y+.00273781191135448*(m-2451545+y);b=b%1*O.TWO_PI;const x=oe.fromRotationZ(b,YP),C=oe.multiply(h,x,qP),w=Math.cos(n.xPoleWander),v=Math.cos(n.yPoleWander),I=Math.sin(n.xPoleWander),P=Math.sin(n.yPoleWander);let N=i-2451545+o/T.SECONDS_PER_DAY;N/=36525;const R=-47e-6*N*O.RADIANS_PER_DEGREE/3600,B=Math.cos(R),F=Math.sin(R),S=YP;return S[0]=w*B,S[1]=w*F,S[2]=I,S[3]=-v*F+P*I*B,S[4]=v*B+P*I*F,S[5]=-P*w,S[6]=-P*F-v*I*B,S[7]=P*B-v*I*F,S[8]=v*w,oe.multiply(C,S,t)};const Jse=new de;Ui.pointToWindowCoordinates=function(e,t,n,i){return(i=Ui.pointToGLWindowCoordinates(e,t,n,i)).y=2*t[5]-i.y,i},Ui.pointToGLWindowCoordinates=function(e,t,n,i){if(!c(e))throw new E("modelViewProjectionMatrix is required.");if(!c(t))throw new E("viewportTransformation is required.");if(!c(n))throw new E("point is required.");c(i)||(i=new V);const o=Jse;return k.multiplyByVector(e,de.fromElements(n.x,n.y,n.z,1,o),o),de.multiplyByScalar(o,1/o.w,o),k.multiplyByVector(t,o,o),V.fromCartesian4(o,i)};const eae=new f,tae=new f,nae=new f;Ui.rotationMatrixFromPositionVelocity=function(e,t,n,i){if(!c(e))throw new E("position is required.");if(!c(t))throw new E("velocity is required.");const o=g(n,he.default).geodeticSurfaceNormal(e,eae);let r=f.cross(t,o,tae);f.equalsEpsilon(r,f.ZERO,O.EPSILON6)&&(r=f.clone(f.UNIT_X,r));const s=f.cross(r,t,nae);return f.normalize(s,s),f.cross(t,s,r),f.negate(r,r),f.normalize(r,r),c(i)||(i=new oe),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};const Qz=new k(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Jz=new Ce,XP=new f,iae=new f,oae=new oe,ZP=new k,eV=new k;Ui.basisTo2D=function(e,t,n){if(!c(e))throw new E("projection is required.");if(!c(t))throw new E("matrix is required.");if(!c(n))throw new E("result is required.");const i=k.getTranslation(t,iae),o=e.ellipsoid;let r;if(f.equals(i,f.ZERO))r=f.clone(f.ZERO,XP);else{const d=o.cartesianToCartographic(i,Jz);r=e.project(d,XP),f.fromElements(r.z,r.x,r.y,r)}const s=Ui.eastNorthUpToFixedFrame(i,o,ZP),a=k.inverseTransformation(s,eV),l=k.getMatrix3(t,oae),u=k.multiplyByMatrix3(a,l,n);return k.multiply(Qz,u,n),k.setTranslation(n,r,n),n},Ui.ellipsoidTo2DModelMatrix=function(e,t,n){if(!c(e))throw new E("projection is required.");if(!c(t))throw new E("center is required.");if(!c(n))throw new E("result is required.");const i=e.ellipsoid,o=Ui.eastNorthUpToFixedFrame(t,i,ZP),r=k.inverseTransformation(o,eV),s=i.cartesianToCartographic(t,Jz),a=e.project(s,XP);f.fromElements(a.z,a.x,a.y,a);const l=k.fromTranslation(a,ZP);return k.multiply(Qz,r,n),k.multiply(l,n,n),n};const In=Ui;function Ln(e,t,n,i){this.west=g(e,0),this.south=g(t,0),this.east=g(n,0),this.north=g(i,0)}Object.defineProperties(Ln.prototype,{width:{get:function(){return Ln.computeWidth(this)}},height:{get:function(){return Ln.computeHeight(this)}}}),Ln.packedLength=4,Ln.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e.west,t[n++]=e.south,t[n++]=e.east,t[n]=e.north,t},Ln.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new Ln),n.west=e[t++],n.south=e[t++],n.east=e[t++],n.north=e[t],n},Ln.computeWidth=function(e){A.typeOf.object("rectangle",e);let t=e.east;const n=e.west;return t<n&&(t+=O.TWO_PI),t-n},Ln.computeHeight=function(e){return A.typeOf.object("rectangle",e),e.north-e.south},Ln.fromDegrees=function(e,t,n,i,o){return e=O.toRadians(g(e,0)),t=O.toRadians(g(t,0)),n=O.toRadians(g(n,0)),i=O.toRadians(g(i,0)),c(o)?(o.west=e,o.south=t,o.east=n,o.north=i,o):new Ln(e,t,n,i)},Ln.fromRadians=function(e,t,n,i,o){return c(o)?(o.west=g(e,0),o.south=g(t,0),o.east=g(n,0),o.north=g(i,0),o):new Ln(e,t,n,i)},Ln.fromCartographicArray=function(e,t){A.defined("cartographics",e);let n=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=Number.MAX_VALUE,r=-Number.MAX_VALUE,s=Number.MAX_VALUE,a=-Number.MAX_VALUE;for(let l=0,u=e.length;l<u;l++){const d=e[l];n=Math.min(n,d.longitude),i=Math.max(i,d.longitude),s=Math.min(s,d.latitude),a=Math.max(a,d.latitude);const h=d.longitude>=0?d.longitude:d.longitude+O.TWO_PI;o=Math.min(o,h),r=Math.max(r,h)}return i-n>r-o&&(n=o,i=r,i>O.PI&&(i-=O.TWO_PI),n>O.PI&&(n-=O.TWO_PI)),c(t)?(t.west=n,t.south=s,t.east=i,t.north=a,t):new Ln(n,s,i,a)},Ln.fromCartesianArray=function(e,t,n){A.defined("cartesians",e),t=g(t,he.default);let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,l=-Number.MAX_VALUE;for(let u=0,d=e.length;u<d;u++){const h=t.cartesianToCartographic(e[u]);i=Math.min(i,h.longitude),o=Math.max(o,h.longitude),a=Math.min(a,h.latitude),l=Math.max(l,h.latitude);const m=h.longitude>=0?h.longitude:h.longitude+O.TWO_PI;r=Math.min(r,m),s=Math.max(s,m)}return o-i>s-r&&(i=r,o=s,o>O.PI&&(o-=O.TWO_PI),i>O.PI&&(i-=O.TWO_PI)),c(n)?(n.west=i,n.south=a,n.east=o,n.north=l,n):new Ln(i,a,o,l)};const rae=new f,sae=new f,aae=new f,cae=new f,lae=new f,$P=new Array(5);for(let e=0;e<$P.length;++e)$P[e]=new f;Ln.fromBoundingSphere=function(e,t,n){A.typeOf.object("boundingSphere",e);const i=e.center,o=e.radius;if(c(t)||(t=he.default),c(n)||(n=new Ln),f.equals(i,f.ZERO))return Ln.clone(Ln.MAX_VALUE,n),n;const r=In.eastNorthUpToFixedFrame(i,t,rae),s=k.multiplyByPointAsVector(r,f.UNIT_X,sae);f.normalize(s,s);const a=k.multiplyByPointAsVector(r,f.UNIT_Y,aae);f.normalize(a,a),f.multiplyByScalar(a,o,a),f.multiplyByScalar(s,o,s);const l=f.negate(a,lae),u=f.negate(s,cae),d=$P;let h=d[0];return f.add(i,a,h),h=d[1],f.add(i,u,h),h=d[2],f.add(i,l,h),h=d[3],f.add(i,s,h),d[4]=i,Ln.fromCartesianArray(d,t,n)},Ln.clone=function(e,t){if(c(e))return c(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new Ln(e.west,e.south,e.east,e.north)},Ln.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e.west-t.west)<=n&&Math.abs(e.south-t.south)<=n&&Math.abs(e.east-t.east)<=n&&Math.abs(e.north-t.north)<=n},Ln.prototype.clone=function(e){return Ln.clone(this,e)},Ln.prototype.equals=function(e){return Ln.equals(this,e)},Ln.equals=function(e,t){return e===t||c(e)&&c(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},Ln.prototype.equalsEpsilon=function(e,t){return Ln.equalsEpsilon(this,e,t)},Ln.validate=function(e){A.typeOf.object("rectangle",e);const t=e.north;A.typeOf.number.greaterThanOrEquals("north",t,-O.PI_OVER_TWO),A.typeOf.number.lessThanOrEquals("north",t,O.PI_OVER_TWO);const n=e.south;A.typeOf.number.greaterThanOrEquals("south",n,-O.PI_OVER_TWO),A.typeOf.number.lessThanOrEquals("south",n,O.PI_OVER_TWO);const i=e.west;A.typeOf.number.greaterThanOrEquals("west",i,-Math.PI),A.typeOf.number.lessThanOrEquals("west",i,Math.PI);const o=e.east;A.typeOf.number.greaterThanOrEquals("east",o,-Math.PI),A.typeOf.number.lessThanOrEquals("east",o,Math.PI)},Ln.southwest=function(e,t){return A.typeOf.object("rectangle",e),c(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new Ce(e.west,e.south)},Ln.northwest=function(e,t){return A.typeOf.object("rectangle",e),c(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new Ce(e.west,e.north)},Ln.northeast=function(e,t){return A.typeOf.object("rectangle",e),c(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new Ce(e.east,e.north)},Ln.southeast=function(e,t){return A.typeOf.object("rectangle",e),c(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new Ce(e.east,e.south)},Ln.center=function(e,t){A.typeOf.object("rectangle",e);let n=e.east;const i=e.west;n<i&&(n+=O.TWO_PI);const o=O.negativePiToPi(.5*(i+n)),r=.5*(e.south+e.north);return c(t)?(t.longitude=o,t.latitude=r,t.height=0,t):new Ce(o,r)},Ln.intersection=function(e,t,n){A.typeOf.object("rectangle",e),A.typeOf.object("otherRectangle",t);let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=O.TWO_PI:r<s&&i>0&&(r+=O.TWO_PI),i<o&&s<0?s+=O.TWO_PI:r<s&&o<0&&(o+=O.TWO_PI);const a=O.negativePiToPi(Math.max(o,s)),l=O.negativePiToPi(Math.min(i,r));if((e.west<e.east||t.west<t.east)&&l<=a)return;const u=Math.max(e.south,t.south),d=Math.min(e.north,t.north);return u>=d?void 0:c(n)?(n.west=a,n.south=u,n.east=l,n.north=d,n):new Ln(a,u,l,d)},Ln.simpleIntersection=function(e,t,n){A.typeOf.object("rectangle",e),A.typeOf.object("otherRectangle",t);const 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 c(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new Ln(i,o,r,s)},Ln.union=function(e,t,n){A.typeOf.object("rectangle",e),A.typeOf.object("otherRectangle",t),c(n)||(n=new Ln);let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=O.TWO_PI:r<s&&i>0&&(r+=O.TWO_PI),i<o&&s<0?s+=O.TWO_PI:r<s&&o<0&&(o+=O.TWO_PI);const a=O.negativePiToPi(Math.min(o,s)),l=O.negativePiToPi(Math.max(i,r));return n.west=a,n.south=Math.min(e.south,t.south),n.east=l,n.north=Math.max(e.north,t.north),n},Ln.expand=function(e,t,n){return A.typeOf.object("rectangle",e),A.typeOf.object("cartographic",t),c(n)||(n=new Ln),n.west=Math.min(e.west,t.longitude),n.south=Math.min(e.south,t.latitude),n.east=Math.max(e.east,t.longitude),n.north=Math.max(e.north,t.latitude),n},Ln.contains=function(e,t){A.typeOf.object("rectangle",e),A.typeOf.object("cartographic",t);let n=t.longitude;const i=t.latitude,o=e.west;let r=e.east;return r<o&&(r+=O.TWO_PI,n<0&&(n+=O.TWO_PI)),(n>o||O.equalsEpsilon(n,o,O.EPSILON14))&&(n<r||O.equalsEpsilon(n,r,O.EPSILON14))&&i>=e.south&&i<=e.north};const uae=new Ce;Ln.subsample=function(e,t,n,i){A.typeOf.object("rectangle",e),t=g(t,he.default),n=g(n,0),c(i)||(i=[]);let o=0;const r=e.north,s=e.south,a=e.east,l=e.west,u=uae;u.height=n,u.longitude=l,u.latitude=r,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.latitude=s,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=l,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.latitude=r<0?r:s>0?s:0;for(let d=1;d<8;++d)u.longitude=-Math.PI+d*O.PI_OVER_TWO,Ln.contains(e,u)&&(i[o]=t.cartographicToCartesian(u,i[o]),o++);return 0===u.latitude&&(u.longitude=l,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++),i.length=o,i},Ln.subsection=function(e,t,n,i,o,r){if(A.typeOf.object("rectangle",e),A.typeOf.number.greaterThanOrEquals("westLerp",t,0),A.typeOf.number.lessThanOrEquals("westLerp",t,1),A.typeOf.number.greaterThanOrEquals("southLerp",n,0),A.typeOf.number.lessThanOrEquals("southLerp",n,1),A.typeOf.number.greaterThanOrEquals("eastLerp",i,0),A.typeOf.number.lessThanOrEquals("eastLerp",i,1),A.typeOf.number.greaterThanOrEquals("northLerp",o,0),A.typeOf.number.lessThanOrEquals("northLerp",o,1),A.typeOf.number.lessThanOrEquals("westLerp",t,i),A.typeOf.number.lessThanOrEquals("southLerp",n,o),c(r)||(r=new Ln),e.west<=e.east){const a=e.east-e.west;r.west=e.west+t*a,r.east=e.west+i*a}else{const a=O.TWO_PI+e.east-e.west;r.west=O.negativePiToPi(e.west+t*a),r.east=O.negativePiToPi(e.west+i*a)}const s=e.north-e.south;return r.south=e.south+n*s,r.north=e.south+o*s,1===t&&(r.west=e.east),1===i&&(r.east=e.east),1===n&&(r.south=e.north),1===o&&(r.north=e.north),r},Ln.MAX_VALUE=Object.freeze(new Ln(-Math.PI,-O.PI_OVER_TWO,Math.PI,O.PI_OVER_TWO));const Te=Ln,ie=Object.freeze({DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047}),Dn={BYTE:ie.BYTE,UNSIGNED_BYTE:ie.UNSIGNED_BYTE,SHORT:ie.SHORT,UNSIGNED_SHORT:ie.UNSIGNED_SHORT,INT:ie.INT,UNSIGNED_INT:ie.UNSIGNED_INT,FLOAT:ie.FLOAT,DOUBLE:ie.DOUBLE,getSizeInBytes:function(e){if(!c(e))throw new E("value is required.");switch(e){case Dn.BYTE:return Int8Array.BYTES_PER_ELEMENT;case Dn.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Dn.SHORT:return Int16Array.BYTES_PER_ELEMENT;case Dn.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Dn.INT:return Int32Array.BYTES_PER_ELEMENT;case Dn.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Dn.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case Dn.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new E("componentDatatype is not a valid value.")}},fromTypedArray:function(e){if(e instanceof Int8Array)return Dn.BYTE;if(e instanceof Uint8Array)return Dn.UNSIGNED_BYTE;if(e instanceof Int16Array)return Dn.SHORT;if(e instanceof Uint16Array)return Dn.UNSIGNED_SHORT;if(e instanceof Int32Array)return Dn.INT;if(e instanceof Uint32Array)return Dn.UNSIGNED_INT;if(e instanceof Float32Array)return Dn.FLOAT;if(e instanceof Float64Array)return Dn.DOUBLE;throw new E("array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array.")},validate:function(e){return c(e)&&(e===Dn.BYTE||e===Dn.UNSIGNED_BYTE||e===Dn.SHORT||e===Dn.UNSIGNED_SHORT||e===Dn.INT||e===Dn.UNSIGNED_INT||e===Dn.FLOAT||e===Dn.DOUBLE)},createTypedArray:function(e,t){if(!c(e))throw new E("componentDatatype is required.");if(!c(t))throw new E("valuesOrLength is required.");switch(e){case Dn.BYTE:return new Int8Array(t);case Dn.UNSIGNED_BYTE:return new Uint8Array(t);case Dn.SHORT:return new Int16Array(t);case Dn.UNSIGNED_SHORT:return new Uint16Array(t);case Dn.INT:return new Int32Array(t);case Dn.UNSIGNED_INT:return new Uint32Array(t);case Dn.FLOAT:return new Float32Array(t);case Dn.DOUBLE:return new Float64Array(t);default:throw new E("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,t,n,i){if(!c(e))throw new E("componentDatatype is required.");if(!c(t))throw new E("buffer is required.");switch(n=g(n,0),i=g(i,(t.byteLength-n)/Dn.getSizeInBytes(e)),e){case Dn.BYTE:return new Int8Array(t,n,i);case Dn.UNSIGNED_BYTE:return new Uint8Array(t,n,i);case Dn.SHORT:return new Int16Array(t,n,i);case Dn.UNSIGNED_SHORT:return new Uint16Array(t,n,i);case Dn.INT:return new Int32Array(t,n,i);case Dn.UNSIGNED_INT:return new Uint32Array(t,n,i);case Dn.FLOAT:return new Float32Array(t,n,i);case Dn.DOUBLE:return new Float64Array(t,n,i);default:throw new E("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return Dn.BYTE;case"UNSIGNED_BYTE":return Dn.UNSIGNED_BYTE;case"SHORT":return Dn.SHORT;case"UNSIGNED_SHORT":return Dn.UNSIGNED_SHORT;case"INT":return Dn.INT;case"UNSIGNED_INT":return Dn.UNSIGNED_INT;case"FLOAT":return Dn.FLOAT;case"DOUBLE":return Dn.DOUBLE;default:throw new E("name is not a valid value.")}}},ee=Object.freeze(Dn);function cn(e,t,n,i){this[0]=g(e,0),this[1]=g(n,0),this[2]=g(t,0),this[3]=g(i,0)}cn.packedLength=4,cn.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t},cn.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new cn),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},cn.packArray=function(e,t){A.defined("array",e);const n=e.length,i=4*n;if(c(t)){if(!Array.isArray(t)&&t.length!==i)throw new E("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==i&&(t.length=i)}else t=new Array(i);for(let o=0;o<n;++o)cn.pack(e[o],t,4*o);return t},cn.unpackArray=function(e,t){if(A.defined("array",e),A.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!=0)throw new E("array length must be a multiple of 4.");const n=e.length;c(t)?t.length=n/4:t=new Array(n/4);for(let i=0;i<n;i+=4){const o=i/4;t[o]=cn.unpack(e,i,t[o])}return t},cn.clone=function(e,t){if(c(e))return c(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new cn(e[0],e[2],e[1],e[3])},cn.fromArray=cn.unpack,cn.fromColumnMajorArray=function(e,t){return A.defined("values",e),cn.clone(e,t)},cn.fromRowMajorArray=function(e,t){return A.defined("values",e),c(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new cn(e[0],e[1],e[2],e[3])},cn.fromScale=function(e,t){return A.typeOf.object("scale",e),c(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new cn(e.x,0,0,e.y)},cn.fromUniformScale=function(e,t){return A.typeOf.number("scale",e),c(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new cn(e,0,0,e)},cn.fromRotation=function(e,t){A.typeOf.number("angle",e);const n=Math.cos(e),i=Math.sin(e);return c(t)?(t[0]=n,t[1]=i,t[2]=-i,t[3]=n,t):new cn(n,-i,i,n)},cn.toArray=function(e,t){return A.typeOf.object("matrix",e),c(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},cn.getElementIndex=function(e,t){return A.typeOf.number.greaterThanOrEquals("row",t,0),A.typeOf.number.lessThanOrEquals("row",t,1),A.typeOf.number.greaterThanOrEquals("column",e,0),A.typeOf.number.lessThanOrEquals("column",e,1),2*e+t},cn.getColumn=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,1),A.typeOf.object("result",n);const i=2*t,r=e[i+1];return n.x=e[i],n.y=r,n},cn.setColumn=function(e,t,n,i){A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,1),A.typeOf.object("cartesian",n),A.typeOf.object("result",i);const o=2*t;return(i=cn.clone(e,i))[o]=n.x,i[o+1]=n.y,i},cn.getRow=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,1),A.typeOf.object("result",n);const o=e[t+2];return n.x=e[t],n.y=o,n},cn.setRow=function(e,t,n,i){return A.typeOf.object("matrix",e),A.typeOf.number.greaterThanOrEquals("index",t,0),A.typeOf.number.lessThanOrEquals("index",t,1),A.typeOf.object("cartesian",n),A.typeOf.object("result",i),(i=cn.clone(e,i))[t]=n.x,i[t+2]=n.y,i};const dae=new V;cn.setScale=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("scale",t),A.typeOf.object("result",n);const i=cn.getScale(e,dae),o=t.x/i.x,r=t.y/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};const fae=new V;cn.setUniformScale=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.number("scale",t),A.typeOf.object("result",n);const i=cn.getScale(e,fae),o=t/i.x,r=t/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};const tV=new V;cn.getScale=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),t.x=V.magnitude(V.fromElements(e[0],e[1],tV)),t.y=V.magnitude(V.fromElements(e[2],e[3],tV)),t};const nV=new V;cn.getMaximumScale=function(e){return cn.getScale(e,nV),V.maximumComponent(nV)};const hae=new V;cn.setRotation=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("result",n);const i=cn.getScale(e,hae);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.y,n[3]=t[3]*i.y,n};const pae=new V;cn.getRotation=function(e,t){A.typeOf.object("matrix",e),A.typeOf.object("result",t);const n=cn.getScale(e,pae);return 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},cn.multiply=function(e,t,n){A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n);const o=e[0]*t[2]+e[2]*t[3],r=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return n[0]=e[0]*t[0]+e[2]*t[1],n[1]=r,n[2]=o,n[3]=s,n},cn.add=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n},cn.subtract=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n},cn.multiplyByVector=function(e,t,n){A.typeOf.object("matrix",e),A.typeOf.object("cartesian",t),A.typeOf.object("result",n);const o=e[1]*t.x+e[3]*t.y;return n.x=e[0]*t.x+e[2]*t.y,n.y=o,n},cn.multiplyByScalar=function(e,t,n){return A.typeOf.object("matrix",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},cn.multiplyByScale=function(e,t,n){return A.typeOf.object("matrix",e),A.typeOf.object("scale",t),A.typeOf.object("result",n),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},cn.multiplyByUniformScale=function(e,t,n){return A.typeOf.object("matrix",e),A.typeOf.number("scale",t),A.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},cn.negate=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},cn.transpose=function(e,t){A.typeOf.object("matrix",e),A.typeOf.object("result",t);const i=e[2],o=e[1],r=e[3];return t[0]=e[0],t[1]=i,t[2]=o,t[3]=r,t},cn.abs=function(e,t){return A.typeOf.object("matrix",e),A.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},cn.equals=function(e,t){return e===t||c(e)&&c(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},cn.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]},cn.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(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},cn.IDENTITY=Object.freeze(new cn(1,0,0,1)),cn.ZERO=Object.freeze(new cn(0,0,0,0)),cn.COLUMN0ROW0=0,cn.COLUMN0ROW1=1,cn.COLUMN1ROW0=2,cn.COLUMN1ROW1=3,Object.defineProperties(cn.prototype,{length:{get:function(){return cn.packedLength}}}),cn.prototype.clone=function(e){return cn.clone(this,e)},cn.prototype.equals=function(e){return cn.equals(this,e)},cn.prototype.equalsEpsilon=function(e,t){return cn.equalsEpsilon(this,e,t)},cn.prototype.toString=function(){return`(${this[0]}, ${this[2]})\n(${this[1]}, ${this[3]})`};const Kr=cn,qi={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",getMathType:function(e){switch(e){case qi.SCALAR:return Number;case qi.VEC2:return V;case qi.VEC3:return f;case qi.VEC4:return de;case qi.MAT2:return Kr;case qi.MAT3:return oe;case qi.MAT4:return k;default:throw new E("attributeType is not a valid value.")}},getNumberOfComponents:function(e){switch(e){case qi.SCALAR:return 1;case qi.VEC2:return 2;case qi.VEC3:return 3;case qi.VEC4:case qi.MAT2:return 4;case qi.MAT3:return 9;case qi.MAT4:return 16;default:throw new E("attributeType is not a valid value.")}},getAttributeLocationCount:function(e){switch(e){case qi.SCALAR:case qi.VEC2:case qi.VEC3:case qi.VEC4:return 1;case qi.MAT2:return 2;case qi.MAT3:return 3;case qi.MAT4:return 4;default:throw new E("attributeType is not a valid value.")}},getGlslType:function(e){switch(A.typeOf.string("attributeType",e),e){case qi.SCALAR:return"float";case qi.VEC2:return"vec2";case qi.VEC3:return"vec3";case qi.VEC4:return"vec4";case qi.MAT2:return"mat2";case qi.MAT3:return"mat3";case qi.MAT4:return"mat4";default:throw new E("attributeType is not a valid value.")}}},Wn=Object.freeze(qi),iV=1/256,so={octEncodeInRange:function(e,t,n){A.defined("vector",e),A.defined("result",n);const i=f.magnitudeSquared(e);if(Math.abs(i-1)>O.EPSILON6)throw new E("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){const o=n.x,r=n.y;n.x=(1-Math.abs(r))*O.signNotZero(o),n.y=(1-Math.abs(o))*O.signNotZero(r)}return n.x=O.toSNorm(n.x,t),n.y=O.toSNorm(n.y,t),n},octEncode:function(e,t){return so.octEncodeInRange(e,255,t)}},rA=new V,rV=new Uint8Array(1);function Dw(e){return rV[0]=e,rV[0]}so.octEncodeToCartesian4=function(e,t){return so.octEncodeInRange(e,65535,rA),t.x=Dw(rA.x*iV),t.y=Dw(rA.x),t.z=Dw(rA.y*iV),t.w=Dw(rA.y),t},so.octDecodeInRange=function(e,t,n,i){if(A.defined("result",i),e<0||e>n||t<0||t>n)throw new E(`x and y must be unsigned normalized integers between 0 and ${n}`);if(i.x=O.fromSNorm(e,n),i.y=O.fromSNorm(t,n),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){const o=i.x;i.x=(1-Math.abs(i.y))*O.signNotZero(o),i.y=(1-Math.abs(o))*O.signNotZero(i.y)}return f.normalize(i,i)},so.octDecode=function(e,t,n){return so.octDecodeInRange(e,t,255,n)},so.octDecodeFromCartesian4=function(e,t){A.typeOf.object("encoded",e),A.typeOf.object("result",t);const n=e.x,i=e.y,o=e.z,r=e.w;if(n<0||n>255||i<0||i>255||o<0||o>255||r<0||r>255)throw new E("x, y, z, and w must be unsigned normalized integers between 0 and 255");return so.octDecodeInRange(256*n+i,256*o+r,65535,t)},so.octPackFloat=function(e){return A.defined("encoded",e),256*e.x+e.y};const KP=new V;function QP(e){return e>>1^-(1&e)}so.octEncodeFloat=function(e){return so.octEncode(e,KP),so.octPackFloat(KP)},so.octDecodeFloat=function(e,t){A.defined("value",e);const n=e/256,i=Math.floor(n);return so.octDecode(i,256*(n-i),t)},so.octPack=function(e,t,n,i){A.defined("v1",e),A.defined("v2",t),A.defined("v3",n),A.defined("result",i);const o=so.octEncodeFloat(e),r=so.octEncodeFloat(t),s=so.octEncode(n,KP);return i.x=65536*s.x+o,i.y=65536*s.y+r,i},so.octUnpack=function(e,t,n,i){A.defined("packed",e),A.defined("v1",t),A.defined("v2",n),A.defined("v3",i);let o=e.x/65536;const r=Math.floor(o),s=65536*(o-r);o=e.y/65536;const a=Math.floor(o),l=65536*(o-a);so.octDecodeFloat(s,t),so.octDecodeFloat(l,n),so.octDecode(r,a,i)},so.compressTextureCoordinates=function(e){return A.defined("textureCoordinates",e),4096*(4095*e.x|0)+(4095*e.y|0)},so.decompressTextureCoordinates=function(e,t){A.defined("compressed",e),A.defined("result",t);const i=Math.floor(e/4096);return t.x=i/4095,t.y=(e-4096*i)/4095,t},so.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),c(n)&&A.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,n.length);const i=e.length;let o=0,r=0,s=0;for(let a=0;a<i;++a)o+=QP(e[a]),r+=QP(t[a]),e[a]=o,t[a]=r,c(n)&&(s+=QP(n[a]),n[a]=s)},so.dequantize=function(e,t,n,i){A.defined("typedArray",e),A.defined("componentDatatype",t),A.defined("type",n),A.defined("count",i);const o=Wn.getNumberOfComponents(n);let r;switch(t){case ee.BYTE:r=127;break;case ee.UNSIGNED_BYTE:r=255;break;case ee.SHORT:r=32767;break;case ee.UNSIGNED_SHORT:r=65535;break;case ee.INT:r=2147483647;break;case ee.UNSIGNED_INT:r=4294967295;break;default:throw new E(`Cannot dequantize component datatype: ${t}`)}const s=new Float32Array(i*o);for(let a=0;a<i;a++)for(let l=0;l<o;l++){const u=a*o+l;s[u]=Math.max(e[u]/r,-1)}return s},so.decodeRGB565=function(e,t){A.defined("typedArray",e);const n=3*e.length;c(t)&&A.typeOf.number.equals("result.length","typedArray.length * 3",t.length,n);const i=e.length;c(t)||(t=new Float32Array(3*i));const s=1/31;for(let l=0;l<i;l++){const u=e[l],h=u>>5&63,m=31&u,_=3*l;t[_]=(u>>11)*s,t[_+1]=.015873015873015872*h,t[_+2]=m*s}return t};const wi=so;function Pw(e){this._ellipsoid=g(e,he.default),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(Pw.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),Pw.prototype.project=function(e,t){const n=this._semimajorAxis,i=e.longitude*n,o=e.latitude*n,r=e.height;return c(t)?(t.x=i,t.y=o,t.z=r,t):new f(i,o,r)},Pw.prototype.unproject=function(e,t){if(!c(e))throw new E("cartesian is required");const n=this._oneOverSemimajorAxis,i=e.x*n,o=e.y*n,r=e.z;return c(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new Ce(i,o,r)};const Qr=Pw,On=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1}),Vf=function mae(e,t){this.start=g(e,0),this.stop=g(t,0)};function wn(e,t){this.center=f.clone(g(e,f.ZERO)),this.radius=g(t,0)}const JP=new f,eO=new f,tO=new f,nO=new f,iO=new f,oO=new f,rO=new f,Rs=new f,sO=new f,aO=new f,cO=new f,lO=new f,_ae=4/3*O.PI;wn.fromPoints=function(e,t){if(c(t)||(t=new wn),!c(e)||0===e.length)return t.center=f.clone(f.ZERO,t.center),t.radius=0,t;const n=f.clone(e[0],rO),i=f.clone(n,JP),o=f.clone(n,eO),r=f.clone(n,tO),s=f.clone(n,nO),a=f.clone(n,iO),l=f.clone(n,oO),u=e.length;let d;for(d=1;d<u;d++){f.clone(e[d],n);const R=n.x,B=n.y,F=n.z;R<i.x&&f.clone(n,i),R>s.x&&f.clone(n,s),B<o.y&&f.clone(n,o),B>a.y&&f.clone(n,a),F<r.z&&f.clone(n,r),F>l.z&&f.clone(n,l)}const h=f.magnitudeSquared(f.subtract(s,i,Rs)),m=f.magnitudeSquared(f.subtract(a,o,Rs)),_=f.magnitudeSquared(f.subtract(l,r,Rs));let p=i,y=s,b=h;m>b&&(b=m,p=o,y=a),_>b&&(b=_,p=r,y=l);const x=sO;x.x=.5*(p.x+y.x),x.y=.5*(p.y+y.y),x.z=.5*(p.z+y.z);let C=f.magnitudeSquared(f.subtract(y,x,Rs)),w=Math.sqrt(C);const v=aO;v.x=i.x,v.y=o.y,v.z=r.z;const I=cO;I.x=s.x,I.y=a.y,I.z=l.z;const P=f.midpoint(v,I,lO);let N=0;for(d=0;d<u;d++){f.clone(e[d],n);const R=f.magnitude(f.subtract(n,P,Rs));R>N&&(N=R);const B=f.magnitudeSquared(f.subtract(n,x,Rs));if(B>C){const F=Math.sqrt(B);w=.5*(w+F),C=w*w;const S=F-w;x.x=(w*x.x+S*n.x)/F,x.y=(w*x.y+S*n.y)/F,x.z=(w*x.z+S*n.z)/F}}return w<N?(f.clone(x,t.center),t.radius=w):(f.clone(P,t.center),t.radius=N),t};const sV=new Qr,gae=new f,yae=new f,uO=new Ce,dO=new Ce;wn.fromRectangle2D=function(e,t,n){return wn.fromRectangleWithHeights2D(e,t,0,0,n)},wn.fromRectangleWithHeights2D=function(e,t,n,i,o){if(c(o)||(o=new wn),!c(e))return o.center=f.clone(f.ZERO,o.center),o.radius=0,o;sV._ellipsoid=he.default,t=g(t,sV),Te.southwest(e,uO),uO.height=n,Te.northeast(e,dO),dO.height=i;const r=t.project(uO,gae),s=t.project(dO,yae),a=s.x-r.x,l=s.y-r.y,u=s.z-r.z;o.radius=.5*Math.sqrt(a*a+l*l+u*u);const d=o.center;return d.x=r.x+.5*a,d.y=r.y+.5*l,d.z=r.z+.5*u,o};const bae=[];wn.fromRectangle3D=function(e,t,n,i){if(t=g(t,he.default),n=g(n,0),c(i)||(i=new wn),!c(e))return i.center=f.clone(f.ZERO,i.center),i.radius=0,i;const o=Te.subsample(e,t,n,bae);return wn.fromPoints(o,i)},wn.fromVertices=function(e,t,n,i){if(c(i)||(i=new wn),!c(e)||0===e.length)return i.center=f.clone(f.ZERO,i.center),i.radius=0,i;t=g(t,f.ZERO),n=g(n,3),A.typeOf.number.greaterThanOrEquals("stride",n,3);const o=rO;o.x=e[0]+t.x,o.y=e[1]+t.y,o.z=e[2]+t.z;const r=f.clone(o,JP),s=f.clone(o,eO),a=f.clone(o,tO),l=f.clone(o,nO),u=f.clone(o,iO),d=f.clone(o,oO),h=e.length;let m;for(m=0;m<h;m+=n){const F=e[m]+t.x,S=e[m+1]+t.y,D=e[m+2]+t.z;o.x=F,o.y=S,o.z=D,F<r.x&&f.clone(o,r),F>l.x&&f.clone(o,l),S<s.y&&f.clone(o,s),S>u.y&&f.clone(o,u),D<a.z&&f.clone(o,a),D>d.z&&f.clone(o,d)}const _=f.magnitudeSquared(f.subtract(l,r,Rs)),p=f.magnitudeSquared(f.subtract(u,s,Rs)),y=f.magnitudeSquared(f.subtract(d,a,Rs));let b=r,x=l,C=_;p>C&&(C=p,b=s,x=u),y>C&&(C=y,b=a,x=d);const w=sO;w.x=.5*(b.x+x.x),w.y=.5*(b.y+x.y),w.z=.5*(b.z+x.z);let v=f.magnitudeSquared(f.subtract(x,w,Rs)),I=Math.sqrt(v);const P=aO;P.x=r.x,P.y=s.y,P.z=a.z;const N=cO;N.x=l.x,N.y=u.y,N.z=d.z;const R=f.midpoint(P,N,lO);let B=0;for(m=0;m<h;m+=n){o.x=e[m]+t.x,o.y=e[m+1]+t.y,o.z=e[m+2]+t.z;const F=f.magnitude(f.subtract(o,R,Rs));F>B&&(B=F);const S=f.magnitudeSquared(f.subtract(o,w,Rs));if(S>v){const D=Math.sqrt(S);I=.5*(I+D),v=I*I;const L=D-I;w.x=(I*w.x+L*o.x)/D,w.y=(I*w.y+L*o.y)/D,w.z=(I*w.z+L*o.z)/D}}return I<B?(f.clone(w,i.center),i.radius=I):(f.clone(R,i.center),i.radius=B),i},wn.fromEncodedCartesianVertices=function(e,t,n){if(c(n)||(n=new wn),!c(e)||!c(t)||e.length!==t.length||0===e.length)return n.center=f.clone(f.ZERO,n.center),n.radius=0,n;const i=rO;i.x=e[0]+t[0],i.y=e[1]+t[1],i.z=e[2]+t[2];const o=f.clone(i,JP),r=f.clone(i,eO),s=f.clone(i,tO),a=f.clone(i,nO),l=f.clone(i,iO),u=f.clone(i,oO),d=e.length;let h;for(h=0;h<d;h+=3){const B=e[h]+t[h],F=e[h+1]+t[h+1],S=e[h+2]+t[h+2];i.x=B,i.y=F,i.z=S,B<o.x&&f.clone(i,o),B>a.x&&f.clone(i,a),F<r.y&&f.clone(i,r),F>l.y&&f.clone(i,l),S<s.z&&f.clone(i,s),S>u.z&&f.clone(i,u)}const m=f.magnitudeSquared(f.subtract(a,o,Rs)),_=f.magnitudeSquared(f.subtract(l,r,Rs)),p=f.magnitudeSquared(f.subtract(u,s,Rs));let y=o,b=a,x=m;_>x&&(x=_,y=r,b=l),p>x&&(x=p,y=s,b=u);const C=sO;C.x=.5*(y.x+b.x),C.y=.5*(y.y+b.y),C.z=.5*(y.z+b.z);let w=f.magnitudeSquared(f.subtract(b,C,Rs)),v=Math.sqrt(w);const I=aO;I.x=o.x,I.y=r.y,I.z=s.z;const P=cO;P.x=a.x,P.y=l.y,P.z=u.z;const N=f.midpoint(I,P,lO);let R=0;for(h=0;h<d;h+=3){i.x=e[h]+t[h],i.y=e[h+1]+t[h+1],i.z=e[h+2]+t[h+2];const B=f.magnitude(f.subtract(i,N,Rs));B>R&&(R=B);const F=f.magnitudeSquared(f.subtract(i,C,Rs));if(F>w){const S=Math.sqrt(F);v=.5*(v+S),w=v*v;const D=S-v;C.x=(v*C.x+D*i.x)/S,C.y=(v*C.y+D*i.y)/S,C.z=(v*C.z+D*i.z)/S}}return v<R?(f.clone(C,n.center),n.radius=v):(f.clone(N,n.center),n.radius=R),n},wn.fromCornerPoints=function(e,t,n){A.typeOf.object("corner",e),A.typeOf.object("oppositeCorner",t),c(n)||(n=new wn);const i=f.midpoint(e,t,n.center);return n.radius=f.distance(i,t),n},wn.fromEllipsoid=function(e,t){return A.typeOf.object("ellipsoid",e),c(t)||(t=new wn),f.clone(f.ZERO,t.center),t.radius=e.maximumRadius,t};const Tae=new f;wn.fromBoundingSpheres=function(e,t){if(c(t)||(t=new wn),!c(e)||0===e.length)return t.center=f.clone(f.ZERO,t.center),t.radius=0,t;const n=e.length;if(1===n)return wn.clone(e[0],t);if(2===n)return wn.union(e[0],e[1],t);const i=[];let o;for(o=0;o<n;o++)i.push(e[o].center);const r=(t=wn.fromPoints(i,t)).center;let s=t.radius;for(o=0;o<n;o++){const a=e[o];s=Math.max(s,f.distance(r,a.center,Tae)+a.radius)}return t.radius=s,t};const Aae=new f,xae=new f,Cae=new f;wn.fromOrientedBoundingBox=function(e,t){A.defined("orientedBoundingBox",e),c(t)||(t=new wn);const n=e.halfAxes,i=oe.getColumn(n,0,Aae),o=oe.getColumn(n,1,xae),r=oe.getColumn(n,2,Cae);return f.add(i,o,i),f.add(i,r,i),t.center=f.clone(e.center,t.center),t.radius=f.magnitude(i),t};const Eae=new f,wae=new f;wn.fromTransformation=function(e,t){A.typeOf.object("transformation",e),c(t)||(t=new wn);const n=k.getTranslation(e,Eae),i=k.getScale(e,wae),o=.5*f.magnitude(i);return t.center=f.clone(n,t.center),t.radius=o,t},wn.clone=function(e,t){if(c(e))return c(t)?(t.center=f.clone(e.center,t.center),t.radius=e.radius,t):new wn(e.center,e.radius)},wn.packedLength=4,wn.pack=function(e,t,n){A.typeOf.object("value",e),A.defined("array",t),n=g(n,0);const i=e.center;return t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n]=e.radius,t},wn.unpack=function(e,t,n){A.defined("array",e),t=g(t,0),c(n)||(n=new wn);const i=n.center;return i.x=e[t++],i.y=e[t++],i.z=e[t++],n.radius=e[t],n};const Sae=new f,vae=new f;wn.union=function(e,t,n){A.typeOf.object("left",e),A.typeOf.object("right",t),c(n)||(n=new wn);const i=e.center,o=e.radius,s=t.radius,a=f.subtract(t.center,i,Sae),l=f.magnitude(a);if(o>=l+s)return e.clone(n),n;if(s>=l+o)return t.clone(n),n;const u=.5*(o+l+s),d=f.multiplyByScalar(a,(-o+u)/l,vae);return f.add(d,i,d),f.clone(d,n.center),n.radius=u,n};const Iae=new f;wn.expand=function(e,t,n){A.typeOf.object("sphere",e),A.typeOf.object("point",t),n=wn.clone(e,n);const i=f.magnitude(f.subtract(t,n.center,Iae));return i>n.radius&&(n.radius=i),n},wn.intersectPlane=function(e,t){A.typeOf.object("sphere",e),A.typeOf.object("plane",t);const i=e.radius,r=f.dot(t.normal,e.center)+t.distance;return r<-i?On.OUTSIDE:r<i?On.INTERSECTING:On.INSIDE},wn.transform=function(e,t,n){return A.typeOf.object("sphere",e),A.typeOf.object("transform",t),c(n)||(n=new wn),n.center=k.multiplyByPoint(t,e.center,n.center),n.radius=k.getMaximumScale(t)*e.radius,n};const Dae=new f;wn.distanceSquaredTo=function(e,t){A.typeOf.object("sphere",e),A.typeOf.object("cartesian",t);const n=f.subtract(e.center,t,Dae),i=f.magnitude(n)-e.radius;return i<=0?0:i*i},wn.transformWithoutScale=function(e,t,n){return A.typeOf.object("sphere",e),A.typeOf.object("transform",t),c(n)||(n=new wn),n.center=k.multiplyByPoint(t,e.center,n.center),n.radius=e.radius,n};const Pae=new f;wn.computePlaneDistances=function(e,t,n,i){A.typeOf.object("sphere",e),A.typeOf.object("position",t),A.typeOf.object("direction",n),c(i)||(i=new Vf);const o=f.subtract(e.center,t,Pae),r=f.dot(n,o);return i.start=r-e.radius,i.stop=r+e.radius,i};const aV=new f,Oae=new f,Rae=new f,Lae=new f,Nae=new f,Mae=new Ce,cV=new Array(8);for(let e=0;e<8;++e)cV[e]=new f;const lV=new Qr;wn.projectTo2D=function(e,t,n){A.typeOf.object("sphere",e),lV._ellipsoid=he.default;const i=(t=g(t,lV)).ellipsoid;let o=e.center;const r=e.radius;let s;s=f.equals(o,f.ZERO)?f.clone(f.UNIT_X,aV):i.geodeticSurfaceNormal(o,aV);const a=f.cross(f.UNIT_Z,s,Oae);f.normalize(a,a);const l=f.cross(s,a,Rae);f.normalize(l,l),f.multiplyByScalar(s,r,s),f.multiplyByScalar(l,r,l),f.multiplyByScalar(a,r,a);const u=f.negate(l,Nae),d=f.negate(a,Lae),h=cV;let m=h[0];f.add(s,l,m),f.add(m,a,m),m=h[1],f.add(s,l,m),f.add(m,d,m),m=h[2],f.add(s,u,m),f.add(m,d,m),m=h[3],f.add(s,u,m),f.add(m,a,m),f.negate(s,s),m=h[4],f.add(s,l,m),f.add(m,a,m),m=h[5],f.add(s,l,m),f.add(m,d,m),m=h[6],f.add(s,u,m),f.add(m,d,m),m=h[7],f.add(s,u,m),f.add(m,a,m);const _=h.length;for(let x=0;x<_;++x){const C=h[x];f.add(o,C,C);const w=i.cartesianToCartographic(C,Mae);t.project(w,C)}o=(n=wn.fromPoints(h,n)).center;const p=o.x,y=o.y;return o.x=o.z,o.y=p,o.z=y,n},wn.isOccluded=function(e,t){return A.typeOf.object("sphere",e),A.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)},wn.equals=function(e,t){return e===t||c(e)&&c(t)&&f.equals(e.center,t.center)&&e.radius===t.radius},wn.prototype.intersectPlane=function(e){return wn.intersectPlane(this,e)},wn.prototype.distanceSquaredTo=function(e){return wn.distanceSquaredTo(this,e)},wn.prototype.computePlaneDistances=function(e,t,n){return wn.computePlaneDistances(this,e,t,n)},wn.prototype.isOccluded=function(e){return wn.isOccluded(this,e)},wn.prototype.equals=function(e){return wn.equals(this,e)},wn.prototype.clone=function(e){return wn.clone(this,e)},wn.prototype.volume=function(){const e=this.radius;return _ae*e*e*e};const Ae=wn;var Fae=wt(7343);let Bae=0;const fO={};function Ld(e,t){let n;A.typeOf.string("html",e);const i=e;c(fO[i])?n=fO[i]:(n=Bae++,fO[i]=n),t=g(t,!1),this._id=n,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(Ld.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(!c(this._element)){const e=Fae.sanitize(this._html),t=document.createElement("div");t.className="cesium-credit-wrapper",t._creditId=this._id,t.style.display="inline",t.innerHTML=e;const n=t.querySelectorAll("a");for(let i=0;i<n.length;i++)n[i].setAttribute("target","_blank");this._element=t}return this._element}}}),Ld.equals=function(e,t){return e===t||c(e)&&c(t)&&e._id===t._id&&e._showOnScreen===t._showOnScreen},Ld.prototype.equals=function(e){return Ld.equals(this,e)},Ld.prototype.isIon=function(){return-1!==this.html.indexOf("ion-credit.png")},Ld.getIonCredit=function(e){const t=c(e.collapsible)&&!e.collapsible;return new Ld(e.html,t)},Ld.clone=function(e){if(c(e))return new Ld(e.html,e.showOnScreen)};const Yn=Ld;function _p(e){e=g(e,g.EMPTY_OBJECT),this._ellipsoid=g(e.ellipsoid,he.default),this._rectangle=g(e.rectangle,Te.MAX_VALUE),this._projection=new Qr(this._ellipsoid),this._numberOfLevelZeroTilesX=g(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=g(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(_p.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),_p.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},_p.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},_p.prototype.rectangleToNativeRectangle=function(e,t){A.defined("rectangle",e);const n=O.toDegrees(e.west),i=O.toDegrees(e.south),o=O.toDegrees(e.east),r=O.toDegrees(e.north);return c(t)?(t.west=n,t.south=i,t.east=o,t.north=r,t):new Te(n,i,o,r)},_p.prototype.tileXYToNativeRectangle=function(e,t,n,i){const o=this.tileXYToRectangle(e,t,n,i);return o.west=O.toDegrees(o.west),o.south=O.toDegrees(o.south),o.east=O.toDegrees(o.east),o.north=O.toDegrees(o.north),o},_p.prototype.tileXYToRectangle=function(e,t,n,i){const o=this._rectangle,r=this.getNumberOfXTilesAtLevel(n),s=this.getNumberOfYTilesAtLevel(n),a=o.width/r,l=e*a+o.west,u=(e+1)*a+o.west,d=o.height/s,h=o.north-t*d,m=o.north-(t+1)*d;return c(i)||(i=new Te(l,m,u,h)),i.west=l,i.south=m,i.east=u,i.north=h,i},_p.prototype.positionToTileXY=function(e,t,n){const i=this._rectangle;if(!Te.contains(i,e))return;const o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t);let l=e.longitude;i.east<i.west&&(l+=O.TWO_PI);let u=(l-i.west)/(i.width/o)|0;u>=o&&(u=o-1);let d=(i.north-e.latitude)/(i.height/r)|0;return d>=r&&(d=r-1),c(n)?(n.x=u,n.y=d,n):new V(u,d)};const Nd=_p;function xc(e){this._ellipsoid=g(e,he.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(xc.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),xc.mercatorAngleToGeodeticLatitude=function(e){return O.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},xc.geodeticLatitudeToMercatorAngle=function(e){e>xc.MaximumLatitude?e=xc.MaximumLatitude:e<-xc.MaximumLatitude&&(e=-xc.MaximumLatitude);const t=Math.sin(e);return.5*Math.log((1+t)/(1-t))},xc.MaximumLatitude=xc.mercatorAngleToGeodeticLatitude(Math.PI),xc.prototype.project=function(e,t){const n=this._semimajorAxis,i=e.longitude*n,o=xc.geodeticLatitudeToMercatorAngle(e.latitude)*n,r=e.height;return c(t)?(t.x=i,t.y=o,t.z=r,t):new f(i,o,r)},xc.prototype.unproject=function(e,t){if(!c(e))throw new E("cartesian is required");const n=this._oneOverSemimajorAxis,i=e.x*n,o=xc.mercatorAngleToGeodeticLatitude(e.y*n),r=e.z;return c(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new Ce(i,o,r)};const or=xc;function gp(e){if(e=g(e,g.EMPTY_OBJECT),this._ellipsoid=g(e.ellipsoid,he.default),this._numberOfLevelZeroTilesX=g(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=g(e.numberOfLevelZeroTilesY,1),this._projection=new or(this._ellipsoid),c(e.rectangleSouthwestInMeters)&&c(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{const i=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new V(-i,-i),this._rectangleNortheastInMeters=new V(i,i)}const t=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new Te(t.longitude,t.latitude,n.longitude,n.latitude)}Object.defineProperties(gp.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),gp.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},gp.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},gp.prototype.rectangleToNativeRectangle=function(e,t){const n=this._projection,i=n.project(Te.southwest(e)),o=n.project(Te.northeast(e));return c(t)?(t.west=i.x,t.south=i.y,t.east=o.x,t.north=o.y,t):new Te(i.x,i.y,o.x,o.y)},gp.prototype.tileXYToNativeRectangle=function(e,t,n,i){const o=this.getNumberOfXTilesAtLevel(n),r=this.getNumberOfYTilesAtLevel(n),s=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,a=this._rectangleSouthwestInMeters.x+e*s,l=this._rectangleSouthwestInMeters.x+(e+1)*s,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,d=this._rectangleNortheastInMeters.y-t*u,h=this._rectangleNortheastInMeters.y-(t+1)*u;return c(i)?(i.west=a,i.south=h,i.east=l,i.north=d,i):new Te(a,h,l,d)},gp.prototype.tileXYToRectangle=function(e,t,n,i){const o=this.tileXYToNativeRectangle(e,t,n,i),r=this._projection,s=r.unproject(new V(o.west,o.south)),a=r.unproject(new V(o.east,o.north));return o.west=s.longitude,o.south=s.latitude,o.east=a.longitude,o.north=a.latitude,o},gp.prototype.positionToTileXY=function(e,t,n){if(!Te.contains(this._rectangle,e))return;const o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,h=this._projection.project(e);let p=(h.x-this._rectangleSouthwestInMeters.x)/a|0;p>=o&&(p=o-1);let y=(this._rectangleNortheastInMeters.y-h.y)/u|0;return y>=r&&(y=r-1),c(n)?(n.x=p,n.y=y,n):new V(p,y)};const Md=gp;function yp(e,t,n){if(!c(e))throw new E("uint8Array is required.");if(t<0)throw new E("byteOffset cannot be negative.");if(n<0)throw new E("byteLength cannot be negative.");if(t+n>e.byteLength)throw new E("sub-region exceeds array bounds.");return t=g(t,0),n=g(n,e.byteLength-t),e=e.subarray(t,t+n),yp.decode(e)}function sA(e,t,n){return t<=e&&e<=n}yp.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)},yp.decodeWithFromCharCode=function(e){let t="";const n=function kae(e){let t=0,n=0,i=0,o=128,r=191;const s=[],a=e.length;for(let l=0;l<a;++l){const u=e[l];if(0===i){if(sA(u,0,127)){s.push(u);continue}if(sA(u,194,223)){i=1,t=31&u;continue}if(sA(u,224,239)){224===u&&(o=160),237===u&&(r=159),i=2,t=15&u;continue}if(sA(u,240,244)){240===u&&(o=144),244===u&&(r=143),i=3,t=7&u;continue}throw new Pe("String decoding failed.")}sA(u,o,r)?(o=128,r=191,t=t<<6|63&u,++n,n===i&&(s.push(t),t=i=n=0)):(t=i=n=0,o=128,r=191,--l)}return s}(e),i=n.length;for(let o=0;o<i;++o){let r=n[o];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(55296+(r>>10),56320+(1023&r)))}return t},yp.decode=typeof TextDecoder<"u"?yp.decodeWithTextDecoder:yp.decodeWithFromCharCode;const Ky=yp,Cc=function Uae(e,t,n){return JSON.parse(Ky(e,t,n))},Ow=Object.freeze({NONE:0,LERC:1});function Xa(e,t,n){this.minimum=f.clone(g(e,f.ZERO)),this.maximum=f.clone(g(t,f.ZERO)),n=c(n)?f.clone(n):f.midpoint(this.minimum,this.maximum,new f),this.center=n}Xa.fromCorners=function(e,t,n){return A.defined("minimum",e),A.defined("maximum",t),c(n)||(n=new Xa),n.minimum=f.clone(e,n.minimum),n.maximum=f.clone(t,n.maximum),n.center=f.midpoint(e,t,n.center),n},Xa.fromPoints=function(e,t){if(c(t)||(t=new Xa),!c(e)||0===e.length)return t.minimum=f.clone(f.ZERO,t.minimum),t.maximum=f.clone(f.ZERO,t.maximum),t.center=f.clone(f.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;const l=e.length;for(let h=1;h<l;h++){const m=e[h],_=m.x,p=m.y,y=m.z;n=Math.min(_,n),r=Math.max(_,r),i=Math.min(p,i),s=Math.max(p,s),o=Math.min(y,o),a=Math.max(y,a)}const u=t.minimum;u.x=n,u.y=i,u.z=o;const d=t.maximum;return d.x=r,d.y=s,d.z=a,t.center=f.midpoint(u,d,t.center),t},Xa.clone=function(e,t){if(c(e))return c(t)?(t.minimum=f.clone(e.minimum,t.minimum),t.maximum=f.clone(e.maximum,t.maximum),t.center=f.clone(e.center,t.center),t):new Xa(e.minimum,e.maximum,e.center)},Xa.equals=function(e,t){return e===t||c(e)&&c(t)&&f.equals(e.center,t.center)&&f.equals(e.minimum,t.minimum)&&f.equals(e.maximum,t.maximum)};let Rw=new f;Xa.intersectPlane=function(e,t){A.defined("box",e),A.defined("plane",t),Rw=f.subtract(e.maximum,e.minimum,Rw);const n=f.multiplyByScalar(Rw,.5,Rw),i=t.normal,o=n.x*Math.abs(i.x)+n.y*Math.abs(i.y)+n.z*Math.abs(i.z),r=f.dot(e.center,i)+t.distance;return r-o>0?On.INSIDE:r+o<0?On.OUTSIDE:On.INTERSECTING},Xa.prototype.clone=function(e){return Xa.clone(this,e)},Xa.prototype.intersectPlane=function(e){return Xa.intersectPlane(this,e)},Xa.prototype.equals=function(e){return Xa.equals(this,e)};const hO=Xa;function Fd(e,t){A.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=new f,this._cameraPositionInScaledSpace=new f,this._distanceToLimbInScaledSpaceSquared=0,c(t)&&(this.cameraPosition=t)}Object.defineProperties(Fd.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){const n=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=f.magnitudeSquared(n)-1;f.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});const uV=new f;Fd.prototype.isPointVisible=function(e){return pO(this._ellipsoid.transformPositionToScaledSpace(e,uV),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},Fd.prototype.isScaledSpacePointVisible=function(e){return pO(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};const zae=new f;Fd.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){const n=this._ellipsoid;let i,o;return c(t)&&t<0&&n.minimumRadius>-t?(o=zae,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),pO(e,o,i)},Fd.prototype.computeHorizonCullingPoint=function(e,t,n){return hV(this._ellipsoid,e,t,n)};const dV=he.clone(he.UNIT_SPHERE);Fd.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){return hV(fV(this._ellipsoid,n,dV),e,t,i)},Fd.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return pV(this._ellipsoid,e,t,n,i,o)},Fd.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){return pV(fV(this._ellipsoid,o,dV),e,t,n,i,r)};const Vae=[];Fd.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){A.typeOf.object("rectangle",e);const i=Te.subsample(e,t,0,Vae),o=Ae.fromPoints(i);if(!(f.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};const Hae=new f;function fV(e,t,n){if(c(t)&&t<0&&e.minimumRadius>-t){const i=f.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,Hae);e=he.fromCartesian3(i,n)}return e}function hV(e,t,n,i){A.typeOf.object("directionToPoint",t),A.defined("positions",n),c(i)||(i=new f);const o=gV(e,t);let r=0;for(let s=0,a=n.length;s<a;++s){const u=mV(e,n[s],o);if(u<0)return;r=Math.max(r,u)}return _V(o,r,i)}const Lw=new f;function pV(e,t,n,i,o,r){A.typeOf.object("directionToPoint",t),A.defined("vertices",n),A.typeOf.number("stride",i),c(r)||(r=new f),i=g(i,3),o=g(o,f.ZERO);const s=gV(e,t);let a=0;for(let l=0,u=n.length;l<u;l+=i){Lw.x=n[l]+o.x,Lw.y=n[l+1]+o.y,Lw.z=n[l+2]+o.z;const d=mV(e,Lw,s);if(d<0)return;a=Math.max(a,d)}return _V(s,a,r)}function pO(e,t,n){const i=t,o=n,r=f.subtract(e,i,uV),s=-f.dot(r,i);return!(o<0?s>0:s>o&&s*s/f.magnitudeSquared(r)>o)}const Gae=new f,jae=new f;function mV(e,t,n){const i=e.transformPositionToScaledSpace(t,Gae);let o=f.magnitudeSquared(i),r=Math.sqrt(o);const s=f.divideByScalar(i,r,jae);o=Math.max(1,o),r=Math.max(1,r);const u=1/r;return 1/(f.dot(s,n)*u-f.magnitude(f.cross(s,n,s))*(Math.sqrt(o-1)*u))}function _V(e,t,n){if(!(t<=0||t===1/0||t!=t))return f.multiplyByScalar(e,t,n)}const mO=new f;function gV(e,t){return f.equals(t,f.ZERO)?t:(e.transformPositionToScaledSpace(t,mO),f.normalize(mO,mO))}const _O=Fd,gO={};function yV(e,t,n){const i=e+t;return O.sign(e)!==O.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}gO.computeDiscriminant=function(e,t,n){if("number"!=typeof e)throw new E("a is a required number.");if("number"!=typeof t)throw new E("b is a required number.");if("number"!=typeof n)throw new E("c is a required number.");return t*t-4*e*n},gO.computeRealRoots=function(e,t,n){if("number"!=typeof e)throw new E("a is a required number.");if("number"!=typeof t)throw new E("b is a required number.");if("number"!=typeof n)throw new E("c is a required number.");let i;if(0===e)return 0===t?[]:[-n/t];if(0===t){if(0===n)return[0,0];const l=Math.abs(n),u=Math.abs(e);if(l<u&&l/u<O.EPSILON14)return[0,0];if(l>u&&u/l<O.EPSILON14)return[];if(i=-n/e,i<0)return[];const d=Math.sqrt(i);return[-d,d]}if(0===n)return i=-t/e,i<0?[i,0]:[0,i];const s=yV(t*t,-4*e*n,O.EPSILON14);if(s<0)return[];const a=-.5*yV(t,O.sign(t)*Math.sqrt(s),O.EPSILON14);return t>0?[a/e,n/a]:[n/a,a/e]};const Hf=gO,yO={};function bO(e,t,n,i){const o=e,r=t/3,s=n/3,a=i,l=o*s,u=r*a,d=r*r,h=s*s,m=o*s-d,_=o*a-r*s,p=r*a-h,y=4*m*p-_*_;let b,x;if(y<0){let Q,Y,ne;d*u>=l*h?(Q=o,Y=m,ne=-2*r*m+o*_):(Q=a,Y=p,ne=-a*_+2*s*p);const K=-(ne<0?-1:1)*Math.abs(Q)*Math.sqrt(-y);x=-ne+K;const $=x/2,me=$<0?-Math.pow(-$,1/3):Math.pow($,1/3),Se=x===K?-me:-Y/me;return b=Y<=0?me+Se:-ne/(me*me+Se*Se+Y),d*u>=l*h?[(b-r)/o]:[-a/(b+s)]}const C=m,w=-2*r*m+o*_,v=p,I=-a*_+2*s*p,P=Math.sqrt(y),N=Math.sqrt(3)/2;let R=Math.abs(Math.atan2(o*P,-w)/3);b=2*Math.sqrt(-C);let B=Math.cos(R);x=b*B;let F=b*(-B/2-N*Math.sin(R));const S=x+F>2*r?x-r:F-r,D=o,L=S/D;R=Math.abs(Math.atan2(a*P,-I)/3),b=2*Math.sqrt(-v),B=Math.cos(R),x=b*B,F=b*(-B/2-N*Math.sin(R));const M=-a,U=x+F<2*s?x+s:F+s,z=M/U,W=-S*U-D*M,j=(s*W-r*(S*M))/(-r*W+s*(D*U));return L<=j?L<=z?j<=z?[L,j,z]:[L,z,j]:[z,L,j]:L<=z?[j,L,z]:j<=z?[j,z,L]:[z,j,L]}yO.computeDiscriminant=function(e,t,n,i){if("number"!=typeof e)throw new E("a is a required number.");if("number"!=typeof t)throw new E("b is a required number.");if("number"!=typeof n)throw new E("c is a required number.");if("number"!=typeof i)throw new E("d is a required number.");const r=t*t,s=n*n;return 18*e*t*n*i+r*s-e*e*27*(i*i)-4*(e*s*n+r*t*i)},yO.computeRealRoots=function(e,t,n,i){if("number"!=typeof e)throw new E("a is a required number.");if("number"!=typeof t)throw new E("b is a required number.");if("number"!=typeof n)throw new E("c is a required number.");if("number"!=typeof i)throw new E("d is a required number.");let o,r;if(0===e)return Hf.computeRealRoots(t,n,i);if(0===t){if(0===n){if(0===i)return[0,0,0];r=-i/e;const s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}return 0===i?(o=Hf.computeRealRoots(e,0,n),0===o.Length?[0]:[o[0],0,o[1]]):bO(e,0,n,i)}return 0===n?0===i?(r=-t/e,r<0?[r,0,0]:[0,0,r]):bO(e,t,0,i):0===i?(o=Hf.computeRealRoots(e,t,n),0===o.length?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]):bO(e,t,n,i)};const TO=yO,AO={};AO.computeDiscriminant=function(e,t,n,i,o){if("number"!=typeof e)throw new E("a is a required number.");if("number"!=typeof t)throw new E("b is a required number.");if("number"!=typeof n)throw new E("c is a required number.");if("number"!=typeof i)throw new E("d is a required number.");if("number"!=typeof o)throw new E("e is a required number.");const r=e*e,a=t*t,l=a*t,u=n*n,d=u*n,h=i*i,m=h*i,_=o*o;return a*u*h-4*l*m-4*e*d*h+18*e*t*n*m-27*r*h*h+r*e*256*(_*o)+o*(18*l*n*i-4*a*d+16*e*u*u-80*e*t*u*i-6*e*a*h+144*r*n*h)+_*(144*e*a*n-27*a*a-128*r*u-192*r*t*i)},AO.computeRealRoots=function(e,t,n,i,o){if("number"!=typeof e)throw new E("a is a required number.");if("number"!=typeof t)throw new E("b is a required number.");if("number"!=typeof n)throw new E("c is a required number.");if("number"!=typeof i)throw new E("d is a required number.");if("number"!=typeof o)throw new E("e is a required number.");if(Math.abs(e)<O.EPSILON15)return TO.computeRealRoots(t,n,i,o);const r=t/e,s=n/e,a=i/e,l=o/e;let u=r<0?1:0;switch(u+=s<0?u+1:u,u+=a<0?u+1:u,u+=l<0?u+1:u,u){case 0:case 3:case 4:case 6:case 7:case 9:case 10:case 12:case 13:case 14:case 15:return function Lu(e,t,n,i){const 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,l=TO.computeRealRoots(1,2*r,r*r-4*a,-s*s);if(l.length>0){const u=-e/4,d=l[l.length-1];if(Math.abs(d)<O.EPSILON14){const h=Hf.computeRealRoots(1,r,a);if(2===h.length){const m=h[0],_=h[1];let p;if(m>=0&&_>=0){const y=Math.sqrt(m),b=Math.sqrt(_);return[u-b,u-y,u+y,u+b]}if(m>=0&&_<0)return p=Math.sqrt(m),[u-p,u+p];if(m<0&&_>=0)return p=Math.sqrt(_),[u-p,u+p]}return[]}if(d>0){const h=Math.sqrt(d),_=(r+d+s/h)/2,p=Hf.computeRealRoots(1,h,(r+d-s/h)/2),y=Hf.computeRealRoots(1,-h,_);return 0!==p.length?(p[0]+=u,p[1]+=u,0!==y.length?(y[0]+=u,y[1]+=u,p[1]<=y[0]?[p[0],p[1],y[0],y[1]]:y[1]<=p[0]?[y[0],y[1],p[0],p[1]]:p[0]>=y[0]&&p[1]<=y[1]?[y[0],p[0],p[1],y[1]]:y[0]>=p[0]&&y[1]<=p[1]?[p[0],y[0],y[1],p[1]]:p[0]>y[0]&&p[0]<y[1]?[y[0],p[0],y[1],p[1]]:[p[0],y[0],p[1],y[1]]):p):0!==y.length?(y[0]+=u,y[1]+=u,y):[]}}return[]}(r,s,a,l);case 1:case 2:case 5:case 8:case 11:return function aA(e,t,n,i){const s=e*e,d=TO.computeRealRoots(1,-2*t,n*e+t*t-4*i,s*i-n*t*e+n*n);if(d.length>0){const h=d[0],m=t-h,_=m*m,p=e/2,y=m/2,b=_-4*i,x=_+4*Math.abs(i),C=s-4*h,w=s+4*Math.abs(h);let v,I,P,N,R,B;if(h<0||b*w<C*x){const D=Math.sqrt(C);v=D/2,I=0===D?0:(e*y-n)/D}else{const D=Math.sqrt(b);v=0===D?0:(e*y-n)/D,I=D/2}0===p&&0===v?(P=0,N=0):O.sign(p)===O.sign(v)?(P=p+v,N=h/P):(N=p-v,P=h/N),0===y&&0===I?(R=0,B=0):O.sign(y)===O.sign(I)?(R=y+I,B=i/R):(B=y-I,R=i/B);const F=Hf.computeRealRoots(1,P,R),S=Hf.computeRealRoots(1,N,B);if(0!==F.length)return 0!==S.length?F[1]<=S[0]?[F[0],F[1],S[0],S[1]]:S[1]<=F[0]?[S[0],S[1],F[0],F[1]]:F[0]>=S[0]&&F[1]<=S[1]?[S[0],F[0],F[1],S[1]]:S[0]>=F[0]&&S[1]<=F[1]?[F[0],S[0],S[1],F[1]]:F[0]>S[0]&&F[0]<S[1]?[S[0],F[0],S[1],F[1]]:[F[0],S[0],F[1],S[1]]:F;if(0!==S.length)return S}return[]}(r,s,a,l);default:return}};const Wae=AO;function Nw(e,t){t=f.clone(g(t,f.ZERO)),f.equals(t,f.ZERO)||f.normalize(t,t),this.origin=f.clone(g(e,f.ZERO)),this.direction=t}Nw.clone=function(e,t){if(c(e))return c(t)?(t.origin=f.clone(e.origin),t.direction=f.clone(e.direction),t):new Nw(e.origin,e.direction)},Nw.getPoint=function(e,t,n){return A.typeOf.object("ray",e),A.typeOf.number("t",t),c(n)||(n=new f),n=f.multiplyByScalar(e.direction,t,n),f.add(e.origin,n,n)};const ii=Nw,wo={rayPlane:function(e,t,n){if(!c(e))throw new E("ray is required.");if(!c(t))throw new E("plane is required.");c(n)||(n=new f);const i=e.origin,o=e.direction,r=t.normal,s=f.dot(r,o);if(Math.abs(s)<O.EPSILON15)return;const a=(-t.distance-f.dot(r,i))/s;return a<0?void 0:(n=f.multiplyByScalar(o,a,n),f.add(i,n,n))}},qae=new f,Yae=new f,bV=new f,TV=new f,AV=new f;wo.rayTriangleParametric=function(e,t,n,i,o){if(!c(e))throw new E("ray is required.");if(!c(t))throw new E("p0 is required.");if(!c(n))throw new E("p1 is required.");if(!c(i))throw new E("p2 is required.");o=g(o,!1);const r=e.origin,s=e.direction,a=f.subtract(n,t,qae),l=f.subtract(i,t,Yae),u=f.cross(s,l,bV),d=f.dot(a,u);let h,m,_,p,y;if(o){if(d<O.EPSILON6||(h=f.subtract(r,t,TV),_=f.dot(h,u),_<0||_>d)||(m=f.cross(h,a,AV),p=f.dot(s,m),p<0||_+p>d))return;y=f.dot(l,m)/d}else{if(Math.abs(d)<O.EPSILON6)return;const b=1/d;if(h=f.subtract(r,t,TV),_=f.dot(h,u)*b,_<0||_>1||(m=f.cross(h,a,AV),p=f.dot(s,m)*b,p<0||_+p>1))return;y=f.dot(l,m)*b}return y},wo.rayTriangle=function(e,t,n,i,o,r){const s=wo.rayTriangleParametric(e,t,n,i,o);if(c(s)&&!(s<0))return c(r)||(r=new f),f.multiplyByScalar(e.direction,s,r),f.add(e.origin,r,r)};const Xae=new ii;wo.lineSegmentTriangle=function(e,t,n,i,o,r,s){if(!c(e))throw new E("v0 is required.");if(!c(t))throw new E("v1 is required.");if(!c(n))throw new E("p0 is required.");if(!c(i))throw new E("p1 is required.");if(!c(o))throw new E("p2 is required.");const a=Xae;f.clone(e,a.origin),f.subtract(t,e,a.direction),f.normalize(a.direction,a.direction);const l=wo.rayTriangleParametric(a,n,i,o,r);if(!(!c(l)||l<0||l>f.distance(e,t)))return c(s)||(s=new f),f.multiplyByScalar(a.direction,l,s),f.add(a.origin,s,s)};const $ae={root0:0,root1:0};function xV(e,t,n){c(n)||(n=new Vf);const o=e.direction,s=t.radius*t.radius,a=f.subtract(e.origin,t.center,bV),h=function Zae(e,t,n,i){const o=t*t-4*e*n;if(o<0)return;if(o>0){const s=1/(2*e),a=Math.sqrt(o),l=(-t+a)*s,u=(-t-a)*s;return l<u?(i.root0=l,i.root1=u):(i.root0=u,i.root1=l),i}const r=-t/(2*e);return 0!==r?(i.root0=i.root1=r,i):void 0}(f.dot(o,o),2*f.dot(o,a),f.magnitudeSquared(a)-s,$ae);if(c(h))return n.start=h.root0,n.stop=h.root1,n}wo.raySphere=function(e,t,n){if(!c(e))throw new E("ray is required.");if(!c(t))throw new E("sphere is required.");if(n=xV(e,t,n),c(n)&&!(n.stop<0))return n.start=Math.max(n.start,0),n};const Kae=new ii;wo.lineSegmentSphere=function(e,t,n,i){if(!c(e))throw new E("p0 is required.");if(!c(t))throw new E("p1 is required.");if(!c(n))throw new E("sphere is required.");const o=Kae;f.clone(e,o.origin);const r=f.subtract(t,e,o.direction),s=f.magnitude(r);if(f.normalize(r,r),i=xV(o,n,i),!(!c(i)||i.stop<0||i.start>s))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};const Qae=new f,Jae=new f;function b_(e,t,n){const i=e+t;return O.sign(e)!==O.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}wo.rayEllipsoid=function(e,t){if(!c(e))throw new E("ray is required.");if(!c(t))throw new E("ellipsoid is required.");const n=t.oneOverRadii,i=f.multiplyComponents(n,e.origin,Qae),o=f.multiplyComponents(n,e.direction,Jae),r=f.magnitudeSquared(i),s=f.dot(i,o);let a,l,u,d,h;if(r>1){if(s>=0)return;const m=s*s;if(a=r-1,l=f.magnitudeSquared(o),u=l*a,m<u)return;if(m>u){d=s*s-u,h=-s+Math.sqrt(d);const p=h/l,y=a/h;return p<y?new Vf(p,y):{start:y,stop:p}}const _=Math.sqrt(a/l);return new Vf(_,_)}return r<1?(a=r-1,l=f.magnitudeSquared(o),u=l*a,d=s*s-u,h=-s+Math.sqrt(d),new Vf(0,h/l)):s<0?(l=f.magnitudeSquared(o),new Vf(0,-s/l)):void 0},wo.quadraticVectorExpression=function(e,t,n,i,o){const r=i*i,s=o*o,a=(e[oe.COLUMN1ROW1]-e[oe.COLUMN2ROW2])*s,l=o*(i*b_(e[oe.COLUMN1ROW0],e[oe.COLUMN0ROW1],O.EPSILON15)+t.y),u=e[oe.COLUMN0ROW0]*r+e[oe.COLUMN2ROW2]*s+i*t.x+n,d=s*b_(e[oe.COLUMN2ROW1],e[oe.COLUMN1ROW2],O.EPSILON15),h=o*(i*b_(e[oe.COLUMN2ROW0],e[oe.COLUMN0ROW2])+t.z);let m;const _=[];if(0===h&&0===d){if(m=Hf.computeRealRoots(a,l,u),0===m.length)return _;const R=m[0],B=Math.sqrt(Math.max(1-R*R,0));if(_.push(new f(i,o*R,o*-B)),_.push(new f(i,o*R,o*B)),2===m.length){const F=m[1],S=Math.sqrt(Math.max(1-F*F,0));_.push(new f(i,o*F,o*-S)),_.push(new f(i,o*F,o*S))}return _}const p=h*h,y=d*d,x=h*d,C=a*a+y,w=2*(l*a+x),v=2*u*a+l*l-y+p,I=2*(u*l-x);if(0===C&&0===w&&0===v&&0===I)return _;m=Wae.computeRealRoots(C,w,v,I,u*u-p);const N=m.length;if(0===N)return _;for(let R=0;R<N;++R){const B=m[R],F=B*B,S=Math.max(1-F,0),D=Math.sqrt(S);let L;L=O.sign(a)===O.sign(u)?b_(a*F+u,l*B,O.EPSILON12):O.sign(u)===O.sign(l*B)?b_(a*F,l*B+u,O.EPSILON12):b_(a*F+l*B,u,O.EPSILON12);const U=L*b_(d*B,h,O.EPSILON15);U<0?_.push(new f(i,o*B,o*D)):U>0?_.push(new f(i,o*B,o*-D)):0!==D?(_.push(new f(i,o*B,o*-D)),_.push(new f(i,o*B,o*D)),++R):_.push(new f(i,o*B,o*D))}return _};const xO=new f,CV=new f,EV=new f,Mw=new f,ece=new f,tce=new oe,nce=new oe,ice=new oe,oce=new oe,rce=new oe,wV=new oe,SV=new oe,vV=new f,sce=new f,ace=new Ce;wo.grazingAltitudeLocation=function(e,t){if(!c(e))throw new E("ray is required.");if(!c(t))throw new E("ellipsoid is required.");const n=e.origin,i=e.direction;if(!f.equals(n,f.ZERO)){const P=t.geodeticSurfaceNormal(n,xO);if(f.dot(i,P)>=0)return n}const o=c(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,xO),s=f.normalize(r,r),a=f.mostOrthogonalAxis(r,Mw),l=f.normalize(f.cross(a,s,CV),CV),u=f.normalize(f.cross(s,l,EV),EV),d=tce;d[0]=s.x,d[1]=s.y,d[2]=s.z,d[3]=l.x,d[4]=l.y,d[5]=l.z,d[6]=u.x,d[7]=u.y,d[8]=u.z;const h=oe.transpose(d,nce),m=oe.fromScale(t.radii,ice),_=oe.fromScale(t.oneOverRadii,oce),p=rce;p[0]=0,p[1]=-i.z,p[2]=i.y,p[3]=i.z,p[4]=0,p[5]=-i.x,p[6]=-i.y,p[7]=i.x,p[8]=0;const y=oe.multiply(oe.multiply(h,_,wV),p,wV),b=oe.multiply(oe.multiply(y,m,SV),d,SV),x=oe.multiplyByVector(y,n,ece),C=wo.quadraticVectorExpression(b,f.negate(x,xO),0,0,1);let w,v;const I=C.length;if(I>0){let P=f.clone(f.ZERO,sce),N=Number.NEGATIVE_INFINITY;for(let B=0;B<I;++B){w=oe.multiplyByVector(m,oe.multiplyByVector(d,C[B],vV),vV);const F=f.normalize(f.subtract(w,n,Mw),Mw),S=f.dot(F,i);S>N&&(N=S,P=f.clone(w,P))}const R=t.cartesianToCartographic(P,ace);return N=O.clamp(N,0,1),v=f.magnitude(f.subtract(P,n,Mw))*Math.sqrt(1-N*N),v=o?-v:v,R.height=v,t.cartographicToCartesian(R,new f)}};const cce=new f;wo.lineSegmentPlane=function(e,t,n,i){if(!c(e))throw new E("endPoint0 is required.");if(!c(t))throw new E("endPoint1 is required.");if(!c(n))throw new E("plane is required.");c(i)||(i=new f);const o=f.subtract(t,e,cce),r=n.normal,s=f.dot(r,o);if(Math.abs(s)<O.EPSILON6)return;const a=f.dot(r,e),l=-(n.distance+a)/s;return l<0||l>1?void 0:(f.multiplyByScalar(o,l,i),f.add(e,i,i),i)},wo.trianglePlaneIntersection=function(e,t,n,i){if(!(c(e)&&c(t)&&c(n)&&c(i)))throw new E("p0, p1, p2, and plane are required.");const o=i.normal,r=i.distance,s=f.dot(o,e)+r<0,a=f.dot(o,t)+r<0,l=f.dot(o,n)+r<0;let d,h,u=0;if(u+=s?1:0,u+=a?1:0,u+=l?1:0,(1===u||2===u)&&(d=new f,h=new f),1===u){if(s)return wo.lineSegmentPlane(e,t,i,d),wo.lineSegmentPlane(e,n,i,h),{positions:[e,t,n,d,h],indices:[0,3,4,1,2,4,1,4,3]};if(a)return wo.lineSegmentPlane(t,n,i,d),wo.lineSegmentPlane(t,e,i,h),{positions:[e,t,n,d,h],indices:[1,3,4,2,0,4,2,4,3]};if(l)return wo.lineSegmentPlane(n,e,i,d),wo.lineSegmentPlane(n,t,i,h),{positions:[e,t,n,d,h],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===u){if(!s)return wo.lineSegmentPlane(t,e,i,d),wo.lineSegmentPlane(n,e,i,h),{positions:[e,t,n,d,h],indices:[1,2,4,1,4,3,0,3,4]};if(!a)return wo.lineSegmentPlane(n,t,i,d),wo.lineSegmentPlane(e,t,i,h),{positions:[e,t,n,d,h],indices:[2,0,4,2,4,3,1,3,4]};if(!l)return wo.lineSegmentPlane(e,n,i,d),wo.lineSegmentPlane(t,n,i,h),{positions:[e,t,n,d,h],indices:[0,1,4,0,4,3,2,3,4]}}};const So=wo;function ps(e,t){if(A.typeOf.object("normal",e),!O.equalsEpsilon(f.magnitude(e),1,O.EPSILON6))throw new E("normal must be normalized.");A.typeOf.number("distance",t),this.normal=f.clone(e),this.distance=t}ps.fromPointNormal=function(e,t,n){if(A.typeOf.object("point",e),A.typeOf.object("normal",t),!O.equalsEpsilon(f.magnitude(t),1,O.EPSILON6))throw new E("normal must be normalized.");const i=-f.dot(t,e);return c(n)?(f.clone(t,n.normal),n.distance=i,n):new ps(t,i)};const lce=new f;ps.fromCartesian4=function(e,t){A.typeOf.object("coefficients",e);const n=f.fromCartesian4(e,lce),i=e.w;if(!O.equalsEpsilon(f.magnitude(n),1,O.EPSILON6))throw new E("normal must be normalized.");return c(t)?(f.clone(n,t.normal),t.distance=i,t):new ps(n,i)},ps.getPointDistance=function(e,t){return A.typeOf.object("plane",e),A.typeOf.object("point",t),f.dot(e.normal,t)+e.distance};const uce=new f;ps.projectPointOntoPlane=function(e,t,n){A.typeOf.object("plane",e),A.typeOf.object("point",t),c(n)||(n=new f);const i=ps.getPointDistance(e,t),o=f.multiplyByScalar(e.normal,i,uce);return f.subtract(t,o,n)};const dce=new k,fce=new de,hce=new f;ps.transform=function(e,t,n){A.typeOf.object("plane",e),A.typeOf.object("transform",t);const i=e.normal,o=e.distance,r=k.inverseTranspose(t,dce);let s=de.fromElements(i.x,i.y,i.z,o,fce);s=k.multiplyByVector(r,s,s);const a=f.fromCartesian4(s,hce);return s=de.divideByScalar(s,f.magnitude(a),s),ps.fromCartesian4(s,n)},ps.clone=function(e,t){return A.typeOf.object("plane",e),c(t)?(f.clone(e.normal,t.normal),t.distance=e.distance,t):new ps(e.normal,e.distance)},ps.equals=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),e.distance===t.distance&&f.equals(e.normal,t.normal)},ps.ORIGIN_XY_PLANE=Object.freeze(new ps(f.UNIT_Z,0)),ps.ORIGIN_YZ_PLANE=Object.freeze(new ps(f.UNIT_X,0)),ps.ORIGIN_ZX_PLANE=Object.freeze(new ps(f.UNIT_Y,0));const qn=ps,CO=new de;function Bd(e,t){if(A.defined("origin",e),e=(t=g(t,he.default)).scaleToGeodeticSurface(e),!c(e))throw new E("origin must not be at the center of the ellipsoid.");const n=In.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=f.fromCartesian4(k.getColumn(n,0,CO)),this._yAxis=f.fromCartesian4(k.getColumn(n,1,CO));const i=f.fromCartesian4(k.getColumn(n,2,CO));this._plane=qn.fromPointNormal(e,i)}Object.defineProperties(Bd.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}}});const pce=new hO;Bd.fromPoints=function(e,t){return A.defined("cartesians",e),new Bd(hO.fromPoints(e,pce).center,t)};const IV=new ii,Fw=new f;Bd.prototype.projectPointOntoPlane=function(e,t){A.defined("cartesian",e);const n=IV;n.origin=e,f.normalize(e,n.direction);let i=So.rayPlane(n,this._plane,Fw);if(c(i)||(f.negate(n.direction,n.direction),i=So.rayPlane(n,this._plane,Fw)),c(i)){const o=f.subtract(i,this._origin,i),r=f.dot(this._xAxis,o),s=f.dot(this._yAxis,o);return c(t)?(t.x=r,t.y=s,t):new V(r,s)}},Bd.prototype.projectPointsOntoPlane=function(e,t){A.defined("cartesians",e),c(t)||(t=[]);let n=0;const i=e.length;for(let o=0;o<i;o++){const r=this.projectPointOntoPlane(e[o],t[n]);c(r)&&(t[n]=r,n++)}return t.length=n,t},Bd.prototype.projectPointToNearestOnPlane=function(e,t){A.defined("cartesian",e),c(t)||(t=new V);const n=IV;n.origin=e,f.clone(this._plane.normal,n.direction);let i=So.rayPlane(n,this._plane,Fw);c(i)||(f.negate(n.direction,n.direction),i=So.rayPlane(n,this._plane,Fw));const o=f.subtract(i,this._origin,i),r=f.dot(this._xAxis,o),s=f.dot(this._yAxis,o);return t.x=r,t.y=s,t},Bd.prototype.projectPointsToNearestOnPlane=function(e,t){A.defined("cartesians",e),c(t)||(t=[]);const n=e.length;t.length=n;for(let i=0;i<n;i++)t[i]=this.projectPointToNearestOnPlane(e[i],t[i]);return t};const mce=new f;Bd.prototype.projectPointOntoEllipsoid=function(e,t){A.defined("cartesian",e),c(t)||(t=new f);const n=this._ellipsoid,i=this._origin,r=this._yAxis,s=mce;return f.multiplyByScalar(this._xAxis,e.x,s),t=f.add(i,s,t),f.multiplyByScalar(r,e.y,s),f.add(t,s,t),n.scaleToGeocentricSurface(t,t),t},Bd.prototype.projectPointsOntoEllipsoid=function(e,t){A.defined("cartesians",e);const n=e.length;c(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.projectPointOntoEllipsoid(e[i],t[i]);return t};const el=Bd;function Ni(e,t){this.center=f.clone(g(e,f.ZERO)),this.halfAxes=oe.clone(g(t,oe.ZERO))}Ni.packedLength=f.packedLength+oe.packedLength,Ni.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),f.pack(e.center,t,n),oe.pack(e.halfAxes,t,n+f.packedLength),t},Ni.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new Ni),f.unpack(e,t,n.center),oe.unpack(e,t+f.packedLength,n.halfAxes),n};const _ce=new f,gce=new f,yce=new f,bce=new f,Tce=new f,Ace=new f,xce=new oe,Cce={unitary:new oe,diagonal:new oe};Ni.fromPoints=function(e,t){if(c(t)||(t=new Ni),!c(e)||0===e.length)return t.halfAxes=oe.ZERO,t.center=f.ZERO,t;let n;const i=e.length,o=f.clone(e[0],_ce);for(n=1;n<i;n++)f.add(o,e[n],o);const r=1/i;f.multiplyByScalar(o,r,o);let m,s=0,a=0,l=0,u=0,d=0,h=0;for(n=0;n<i;n++)m=f.subtract(e[n],o,gce),s+=m.x*m.x,a+=m.x*m.y,l+=m.x*m.z,u+=m.y*m.y,d+=m.y*m.z,h+=m.z*m.z;s*=r,a*=r,l*=r,u*=r,d*=r,h*=r;const _=xce;_[0]=s,_[1]=a,_[2]=l,_[3]=a,_[4]=u,_[5]=d,_[6]=l,_[7]=d,_[8]=h;const p=oe.computeEigenDecomposition(_,Cce),y=oe.clone(p.unitary,t.halfAxes);let b=oe.getColumn(y,0,bce),x=oe.getColumn(y,1,Tce),C=oe.getColumn(y,2,Ace),w=-Number.MAX_VALUE,v=-Number.MAX_VALUE,I=-Number.MAX_VALUE,P=Number.MAX_VALUE,N=Number.MAX_VALUE,R=Number.MAX_VALUE;for(n=0;n<i;n++)m=e[n],w=Math.max(f.dot(b,m),w),v=Math.max(f.dot(x,m),v),I=Math.max(f.dot(C,m),I),P=Math.min(f.dot(b,m),P),N=Math.min(f.dot(x,m),N),R=Math.min(f.dot(C,m),R);b=f.multiplyByScalar(b,.5*(P+w),b),x=f.multiplyByScalar(x,.5*(N+v),x),C=f.multiplyByScalar(C,.5*(R+I),C);const B=f.add(b,x,t.center);f.add(B,C,B);const F=yce;return F.x=w-P,F.y=v-N,F.z=I-R,f.multiplyByScalar(F,.5,F),oe.multiplyByScale(t.halfAxes,F,t.halfAxes),t};const DV=new f,Ece=new f;function PV(e,t,n,i,o,r,s,a,l,u,d){if(!(c(o)&&c(r)&&c(s)&&c(a)&&c(l)&&c(u)))throw new E("all extents (minimum/maximum X/Y/Z) are required.");c(d)||(d=new Ni);const h=d.halfAxes;oe.setColumn(h,0,t,h),oe.setColumn(h,1,n,h),oe.setColumn(h,2,i,h);let m=DV;m.x=(o+r)/2,m.y=(s+a)/2,m.z=(l+u)/2;const _=Ece;_.x=(r-o)/2,_.y=(a-s)/2,_.z=(u-l)/2;const p=d.center;return m=oe.multiplyByVector(h,m,m),f.add(e,m,p),oe.multiplyByScale(h,_,h),d}const OV=new Ce,wce=new f,Sce=new Ce,vce=new Ce,Ice=new Ce,Dce=new Ce,Pce=new Ce,Oce=new f,RV=new f,Rce=new f,LV=new f,Lce=new f,Nce=new V,Mce=new V,Fce=new V,Bce=new V,kce=new V,Uce=new f,zce=new f,Vce=new f,Hce=new f,Gce=new V,jce=new f,Wce=new f,qce=new f,Yce=new qn(f.UNIT_X,0);Ni.fromRectangle=function(e,t,n,i,o){if(!c(e))throw new E("rectangle is required");if(e.width<0||e.width>O.TWO_PI)throw new E("Rectangle width must be between 0 and 2 * pi");if(e.height<0||e.height>O.PI)throw new E("Rectangle height must be between 0 and pi");if(c(i)&&!O.equalsEpsilon(i.radii.x,i.radii.y,O.EPSILON15))throw new E("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");let r,s,a,l,u,d,h;if(t=g(t,0),n=g(n,0),i=g(i,he.default),e.width<=O.PI){const N=Te.center(e,OV),R=i.cartographicToCartesian(N,wce),B=new el(R,i);h=B.plane;const F=N.longitude,S=e.south<0&&e.north>0?0:N.latitude,D=Ce.fromRadians(F,e.north,n,Sce),L=Ce.fromRadians(e.west,e.north,n,vce),M=Ce.fromRadians(e.west,S,n,Ice),U=Ce.fromRadians(e.west,e.south,n,Dce),z=Ce.fromRadians(F,e.south,n,Pce),G=i.cartographicToCartesian(D,Oce);let W=i.cartographicToCartesian(L,RV);const q=i.cartographicToCartesian(M,Rce);let j=i.cartographicToCartesian(U,LV);const Q=i.cartographicToCartesian(z,Lce),Y=B.projectPointToNearestOnPlane(G,Nce),ne=B.projectPointToNearestOnPlane(W,Mce),X=B.projectPointToNearestOnPlane(q,Fce),K=B.projectPointToNearestOnPlane(j,Bce),$=B.projectPointToNearestOnPlane(Q,kce);return r=Math.min(ne.x,X.x,K.x),s=-r,l=Math.max(ne.y,Y.y),a=Math.min(K.y,$.y),L.height=U.height=t,W=i.cartographicToCartesian(L,RV),j=i.cartographicToCartesian(U,LV),u=Math.min(qn.getPointDistance(h,W),qn.getPointDistance(h,j)),d=n,PV(B.origin,B.xAxis,B.yAxis,B.zAxis,r,s,a,l,u,d,o)}const m=e.south>0,_=e.north<0,p=m?e.south:_?e.north:0,y=Te.center(e,OV).longitude,b=f.fromRadians(y,p,n,i,Uce);b.z=0;const C=Math.abs(b.x)<O.EPSILON10&&Math.abs(b.y)<O.EPSILON10?f.UNIT_X:f.normalize(b,zce),w=f.UNIT_Z,v=f.cross(C,w,Vce);h=qn.fromPointNormal(b,C,Yce);const I=f.fromRadians(y+O.PI_OVER_TWO,p,n,i,Hce);s=f.dot(qn.projectPointOntoPlane(h,I,Gce),v),r=-s,l=f.fromRadians(0,e.north,_?t:n,i,jce).z,a=f.fromRadians(0,e.south,m?t:n,i,Wce).z;const P=f.fromRadians(e.east,p,n,i,qce);return u=qn.getPointDistance(h,P),d=0,PV(b,v,w,C,r,s,a,l,u,d,o)},Ni.fromTransformation=function(e,t){return A.typeOf.object("transformation",e),c(t)||(t=new Ni),t.center=k.getTranslation(e,t.center),t.halfAxes=k.getMatrix3(e,t.halfAxes),t.halfAxes=oe.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t},Ni.clone=function(e,t){if(c(e))return c(t)?(f.clone(e.center,t.center),oe.clone(e.halfAxes,t.halfAxes),t):new Ni(e.center,e.halfAxes)},Ni.intersectPlane=function(e,t){if(!c(e))throw new E("box is required.");if(!c(t))throw new E("plane is required.");const n=e.center,i=t.normal,o=e.halfAxes,r=i.x,s=i.y,a=i.z,l=Math.abs(r*o[oe.COLUMN0ROW0]+s*o[oe.COLUMN0ROW1]+a*o[oe.COLUMN0ROW2])+Math.abs(r*o[oe.COLUMN1ROW0]+s*o[oe.COLUMN1ROW1]+a*o[oe.COLUMN1ROW2])+Math.abs(r*o[oe.COLUMN2ROW0]+s*o[oe.COLUMN2ROW1]+a*o[oe.COLUMN2ROW2]),u=f.dot(i,n)+t.distance;return u<=-l?On.OUTSIDE:u>=l?On.INSIDE:On.INTERSECTING};const NV=new f,MV=new f,FV=new f,Xce=new f,BV=new f,Zce=new f;Ni.distanceSquaredTo=function(e,t){if(!c(e))throw new E("box is required.");if(!c(t))throw new E("cartesian is required.");const n=f.subtract(t,e.center,DV),i=e.halfAxes;let o=oe.getColumn(i,0,NV),r=oe.getColumn(i,1,MV),s=oe.getColumn(i,2,FV);const a=f.magnitude(o),l=f.magnitude(r),u=f.magnitude(s);let d=!0,h=!0,m=!0;a>0?f.divideByScalar(o,a,o):d=!1,l>0?f.divideByScalar(r,l,r):h=!1,u>0?f.divideByScalar(s,u,s):m=!1;const _=!d+!h+!m;let p,y,b;if(1===_){let v=o;p=r,y=s,h?m||(v=s,y=o):(v=r,p=o),b=f.cross(p,y,BV),v===o?o=b:v===r?r=b:v===s&&(s=b)}else if(2===_){p=o,h?p=r:m&&(p=s);let v=f.UNIT_Y;v.equalsEpsilon(p,O.EPSILON3)&&(v=f.UNIT_X),y=f.cross(p,v,Xce),f.normalize(y,y),b=f.cross(p,y,BV),f.normalize(b,b),p===o?(r=y,s=b):p===r?(s=y,o=b):p===s&&(o=y,r=b)}else 3===_&&(o=f.UNIT_X,r=f.UNIT_Y,s=f.UNIT_Z);const x=Zce;x.x=f.dot(n,o),x.y=f.dot(n,r),x.z=f.dot(n,s);let w,C=0;return x.x<-a?(w=x.x+a,C+=w*w):x.x>a&&(w=x.x-a,C+=w*w),x.y<-l?(w=x.y+l,C+=w*w):x.y>l&&(w=x.y-l,C+=w*w),x.z<-u?(w=x.z+u,C+=w*w):x.z>u&&(w=x.z-u,C+=w*w),C};const $ce=new f,Kce=new f;Ni.computePlaneDistances=function(e,t,n,i){if(!c(e))throw new E("box is required.");if(!c(t))throw new E("position is required.");if(!c(n))throw new E("direction is required.");c(i)||(i=new Vf);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;const s=e.center,a=e.halfAxes,l=oe.getColumn(a,0,NV),u=oe.getColumn(a,1,MV),d=oe.getColumn(a,2,FV),h=f.add(l,u,$ce);f.add(h,d,h),f.add(h,s,h);const m=f.subtract(h,t,Kce);let _=f.dot(n,m);return o=Math.min(_,o),r=Math.max(_,r),f.add(s,l,h),f.add(h,u,h),f.subtract(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.add(s,l,h),f.subtract(h,u,h),f.add(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.add(s,l,h),f.subtract(h,u,h),f.subtract(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.subtract(s,l,h),f.add(h,u,h),f.add(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.subtract(s,l,h),f.add(h,u,h),f.subtract(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.subtract(s,l,h),f.subtract(h,u,h),f.add(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),f.subtract(s,l,h),f.subtract(h,u,h),f.subtract(h,d,h),f.subtract(h,t,m),_=f.dot(n,m),o=Math.min(_,o),r=Math.max(_,r),i.start=o,i.stop=r,i};const Qce=new f,Jce=new f,ele=new f;Ni.computeCorners=function(e,t){A.typeOf.object("box",e),c(t)||(t=[new f,new f,new f,new f,new f,new f,new f,new f]);const n=e.center,i=e.halfAxes,o=oe.getColumn(i,0,Qce),r=oe.getColumn(i,1,Jce),s=oe.getColumn(i,2,ele);return f.clone(n,t[0]),f.subtract(t[0],o,t[0]),f.subtract(t[0],r,t[0]),f.subtract(t[0],s,t[0]),f.clone(n,t[1]),f.subtract(t[1],o,t[1]),f.subtract(t[1],r,t[1]),f.add(t[1],s,t[1]),f.clone(n,t[2]),f.subtract(t[2],o,t[2]),f.add(t[2],r,t[2]),f.subtract(t[2],s,t[2]),f.clone(n,t[3]),f.subtract(t[3],o,t[3]),f.add(t[3],r,t[3]),f.add(t[3],s,t[3]),f.clone(n,t[4]),f.add(t[4],o,t[4]),f.subtract(t[4],r,t[4]),f.subtract(t[4],s,t[4]),f.clone(n,t[5]),f.add(t[5],o,t[5]),f.subtract(t[5],r,t[5]),f.add(t[5],s,t[5]),f.clone(n,t[6]),f.add(t[6],o,t[6]),f.add(t[6],r,t[6]),f.subtract(t[6],s,t[6]),f.clone(n,t[7]),f.add(t[7],o,t[7]),f.add(t[7],r,t[7]),f.add(t[7],s,t[7]),t};const tle=new oe;Ni.computeTransformation=function(e,t){A.typeOf.object("box",e),c(t)||(t=new k);const n=e.center,i=oe.multiplyByUniformScale(e.halfAxes,2,tle);return k.fromRotationTranslation(i,n,t)};const nle=new Ae;Ni.isOccluded=function(e,t){if(!c(e))throw new E("box is required.");if(!c(t))throw new E("occluder is required.");const n=Ae.fromOrientedBoundingBox(e,nle);return!t.isBoundingSphereVisible(n)},Ni.prototype.intersectPlane=function(e){return Ni.intersectPlane(this,e)},Ni.prototype.distanceSquaredTo=function(e){return Ni.distanceSquaredTo(this,e)},Ni.prototype.computePlaneDistances=function(e,t,n){return Ni.computePlaneDistances(this,e,t,n)},Ni.prototype.computeCorners=function(e){return Ni.computeCorners(this,e)},Ni.prototype.computeTransformation=function(e){return Ni.computeTransformation(this,e)},Ni.prototype.isOccluded=function(e){return Ni.isOccluded(this,e)},Ni.equals=function(e,t){return e===t||c(e)&&c(t)&&f.equals(e.center,t.center)&&oe.equals(e.halfAxes,t.halfAxes)},Ni.prototype.clone=function(e){return Ni.clone(this,e)},Ni.prototype.equals=function(e){return Ni.equals(this,e)};const Ao=Ni,Bw={getHeight:function(e,t,n){if(!Number.isFinite(t))throw new E("scale must be a finite number.");if(!Number.isFinite(n))throw new E("relativeHeight must be a finite number.");return(e-n)*t+n}},ile=new Ce;Bw.getPosition=function(e,t,n,i,o){const r=t.cartesianToCartographic(e,ile);if(!c(r))return f.clone(e,o);const s=Bw.getHeight(r.height,n,i);return f.fromRadians(r.longitude,r.latitude,s,t,o)};const Ec=Bw,tl=Object.freeze({NONE:0,BITS12:1}),T_=new f,ole=new f,Ml=new V,kw=new k,rle=new k,sle=Math.pow(2,12);function ya(e,t,n,i,o,r,s,a,l,u){let h,m,d=tl.NONE;if(c(t)&&c(n)&&c(i)&&c(o)){const _=t.minimum,y=f.subtract(t.maximum,_,ole),b=i-n;d=Math.max(f.maximumComponent(y),b)<sle-1?tl.BITS12:tl.NONE,h=k.inverseTransformation(o,new k);const C=f.negate(_,T_);k.multiply(k.fromTranslation(C,kw),h,h);const w=T_;w.x=1/y.x,w.y=1/y.y,w.z=1/y.z,k.multiply(k.fromScale(w,kw),h,h),m=k.clone(o),k.setTranslation(m,f.ZERO,m),o=k.clone(o,new k);const v=k.fromTranslation(_,kw),I=k.fromScale(y,rle),P=k.multiply(v,I,kw);k.multiply(o,P,o),k.multiply(m,P,m)}this.quantization=d,this.minimumHeight=n,this.maximumHeight=i,this.center=f.clone(e),this.toScaledENU=h,this.fromScaledENU=o,this.matrix=m,this.hasVertexNormals=r,this.hasWebMercatorT=g(s,!1),this.hasGeodeticSurfaceNormals=g(a,!1),this.exaggeration=g(l,1),this.exaggerationRelativeHeight=g(u,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}ya.prototype.encode=function(e,t,n,i,o,r,s,a){const l=i.x,u=i.y;if(this.quantization===tl.BITS12){(n=k.multiplyByPoint(this.toScaledENU,n,T_)).x=O.clamp(n.x,0,1),n.y=O.clamp(n.y,0,1),n.z=O.clamp(n.z,0,1);const h=O.clamp((o-this.minimumHeight)/(this.maximumHeight-this.minimumHeight),0,1);V.fromElements(n.x,n.y,Ml);const m=wi.compressTextureCoordinates(Ml);V.fromElements(n.z,h,Ml);const _=wi.compressTextureCoordinates(Ml);V.fromElements(l,u,Ml);const p=wi.compressTextureCoordinates(Ml);if(e[t++]=m,e[t++]=_,e[t++]=p,this.hasWebMercatorT){V.fromElements(s,0,Ml);const y=wi.compressTextureCoordinates(Ml);e[t++]=y}}else f.subtract(n,this.center,T_),e[t++]=T_.x,e[t++]=T_.y,e[t++]=T_.z,e[t++]=o,e[t++]=l,e[t++]=u,this.hasWebMercatorT&&(e[t++]=s);return this.hasVertexNormals&&(e[t++]=wi.octPackFloat(r)),this.hasGeodeticSurfaceNormals&&(e[t++]=a.x,e[t++]=a.y,e[t++]=a.z),t};const ale=new f,kV=new f;ya.prototype.addGeodeticSurfaceNormals=function(e,t,n){if(this.hasGeodeticSurfaceNormals)return;const i=this.stride,o=e.length/i;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();const r=this.stride;for(let s=0;s<o;s++){for(let d=0;d<i;d++)t[s*r+d]=e[s*i+d];const a=this.decodePosition(t,s,ale),l=n.geodeticSurfaceNormal(a,kV),u=s*r+this._offsetGeodeticSurfaceNormal;t[u]=l.x,t[u+1]=l.y,t[u+2]=l.z}},ya.prototype.removeGeodeticSurfaceNormals=function(e,t){if(!this.hasGeodeticSurfaceNormals)return;const n=this.stride,i=e.length/n;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();const o=this.stride;for(let r=0;r<i;r++)for(let s=0;s<o;s++)t[r*o+s]=e[r*n+s]},ya.prototype.decodePosition=function(e,t,n){if(c(n)||(n=new f),t*=this.stride,this.quantization===tl.BITS12){const i=wi.decompressTextureCoordinates(e[t],Ml);n.x=i.x,n.y=i.y;const o=wi.decompressTextureCoordinates(e[t+1],Ml);return n.z=o.x,k.multiplyByPoint(this.fromScaledENU,n,n)}return n.x=e[t],n.y=e[t+1],n.z=e[t+2],f.add(n,this.center,n)},ya.prototype.getExaggeratedPosition=function(e,t,n){n=this.decodePosition(e,t,n);const i=this.exaggeration,o=this.exaggerationRelativeHeight;if(1!==i&&this.hasGeodeticSurfaceNormals){const s=this.decodeGeodeticSurfaceNormal(e,t,kV),a=this.decodeHeight(e,t),l=Ec.getHeight(a,i,o)-a;n.x+=s.x*l,n.y+=s.y*l,n.z+=s.z*l}return n},ya.prototype.decodeTextureCoordinates=function(e,t,n){return c(n)||(n=new V),t*=this.stride,this.quantization===tl.BITS12?wi.decompressTextureCoordinates(e[t+2],n):V.fromElements(e[t+4],e[t+5],n)},ya.prototype.decodeHeight=function(e,t){return t*=this.stride,this.quantization===tl.BITS12?wi.decompressTextureCoordinates(e[t+1],Ml).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]},ya.prototype.decodeWebMercatorT=function(e,t){return t*=this.stride,this.quantization===tl.BITS12?wi.decompressTextureCoordinates(e[t+3],Ml).x:e[t+6]},ya.prototype.getOctEncodedNormal=function(e,t,n){const i=e[t=t*this.stride+this._offsetVertexNormal]/256,o=Math.floor(i);return V.fromElements(o,256*(i-o),n)},ya.prototype.decodeGeodeticSurfaceNormal=function(e,t,n){return n.x=e[t=t*this.stride+this._offsetGeodeticSurfaceNormal],n.y=e[t+1],n.z=e[t+2],n},ya.prototype._calculateStrideAndOffsets=function(){let e=0;e+=this.quantization===tl.BITS12?3:6,this.hasWebMercatorT&&(e+=1),this.hasVertexNormals&&(this._offsetVertexNormal=e,e+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=e,e+=3),this.stride=e};const Uw={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},zw={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};ya.prototype.getAttributes=function(e){const t=ee.FLOAT,n=ee.getSizeInBytes(t),i=this.stride*n;let o=0;const r=[];function s(a,l){r.push({index:a,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:l,offsetInBytes:o,strideInBytes:i}),o+=l*n}if(this.quantization===tl.NONE){s(Uw.position3DAndHeight,4);let a=2;a+=this.hasWebMercatorT?1:0,a+=this.hasVertexNormals?1:0,s(Uw.textureCoordAndEncodedNormals,a),this.hasGeodeticSurfaceNormals&&s(Uw.geodeticSurfaceNormal,3)}else{const l=this.hasWebMercatorT&&this.hasVertexNormals;s(zw.compressed0,this.hasWebMercatorT||this.hasVertexNormals?4:3),l&&s(zw.compressed1,1),this.hasGeodeticSurfaceNormals&&s(zw.geodeticSurfaceNormal,3)}return r},ya.prototype.getAttributeLocations=function(){return this.quantization===tl.NONE?Uw:zw},ya.clone=function(e,t){if(c(e))return c(t)||(t=new ya),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=f.clone(e.center),t.toScaledENU=k.clone(e.toScaledENU),t.fromScaledENU=k.clone(e.fromScaledENU),t.matrix=k.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t.hasGeodeticSurfaceNormals=e.hasGeodeticSurfaceNormals,t.exaggeration=e.exaggeration,t.exaggerationRelativeHeight=e.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};const Qy=ya,kd={};kd.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});const EO=new f,cle=new k,lle=new f,ule=new f;kd.computeVertices=function(e){if(!c(e)||!c(e.heightmap))throw new E("options.heightmap is required.");if(!c(e.width)||!c(e.height))throw new E("options.width and options.height are required.");if(!c(e.nativeRectangle))throw new E("options.nativeRectangle is required.");if(!c(e.skirtHeight))throw new E("options.skirtHeight is required.");const t=Math.cos,n=Math.sin,i=Math.sqrt,o=Math.atan,r=Math.exp,s=O.PI_OVER_TWO,a=O.toRadians,l=e.heightmap,u=e.width,d=e.height,h=e.skirtHeight,m=h>0,_=g(e.isGeographic,!0),p=g(e.ellipsoid,he.default),y=1/p.maximumRadius,b=Te.clone(e.nativeRectangle),x=Te.clone(e.rectangle);let C,w,v,I;c(x)?(C=x.west,w=x.south,v=x.east,I=x.north):_?(C=a(b.west),w=a(b.south),v=a(b.east),I=a(b.north)):(C=b.west*y,w=s-2*o(r(-b.south*y)),v=b.east*y,I=s-2*o(r(-b.north*y)));let P=e.relativeToCenter;const N=c(P);P=N?P:f.ZERO;const R=g(e.includeWebMercatorT,!1),B=g(e.exaggeration,1),F=g(e.exaggerationRelativeHeight,0),D=1!==B,L=g(e.structure,kd.DEFAULT_STRUCTURE),M=g(L.heightScale,kd.DEFAULT_STRUCTURE.heightScale),U=g(L.heightOffset,kd.DEFAULT_STRUCTURE.heightOffset),z=g(L.elementsPerHeight,kd.DEFAULT_STRUCTURE.elementsPerHeight),G=g(L.stride,kd.DEFAULT_STRUCTURE.stride),W=g(L.elementMultiplier,kd.DEFAULT_STRUCTURE.elementMultiplier),q=g(L.isBigEndian,kd.DEFAULT_STRUCTURE.isBigEndian);let j=Te.computeWidth(b),Q=Te.computeHeight(b);const Y=j/(u-1),ne=Q/(d-1);_||(j*=y,Q*=y);const X=p.radiiSquared,K=X.x,$=X.y,me=X.z;let Se=65536,fe=-65536;const ye=In.eastNorthUpToFixedFrame(P,p),ve=k.inverseTransformation(ye,cle);let Oe,Ge;R&&(Oe=or.geodeticLatitudeToMercatorAngle(w),Ge=1/(or.geodeticLatitudeToMercatorAngle(I)-Oe));const je=lle;je.x=Number.POSITIVE_INFINITY,je.y=Number.POSITIVE_INFINITY,je.z=Number.POSITIVE_INFINITY;const Ke=ule;Ke.x=Number.NEGATIVE_INFINITY,Ke.y=Number.NEGATIVE_INFINITY,Ke.z=Number.NEGATIVE_INFINITY;let Qt=Number.POSITIVE_INFINITY;const nn=u*d,ft=nn+(h>0?2*u+2*d:0),gn=new Array(ft),Ft=new Array(ft),Ht=new Array(ft),Cn=R?new Array(ft):[],pe=D?new Array(ft):[];let Ie=0,on=d,Bt=0,Gi=u;m&&(--Ie,++on,--Bt,++Gi);const qo=1e-5;for(let st=Ie;st<on;++st){let Gt=st;Gt<0&&(Gt=0),Gt>=d&&(Gt=d-1);let an=b.north-ne*Gt;an=_?a(an):s-2*o(r(-an*y));let Vn=(an-w)/(I-w);Vn=O.clamp(Vn,0,1);const Yo=st===Ie,Sr=st===on-1;h>0&&(Yo?an+=qo*Q:Sr&&(an-=qo*Q));const Zc=t(an),$c=n(an),Yr=me*$c;let fo;R&&(fo=(or.geodeticLatitudeToMercatorAngle(an)-Oe)*Ge);for(let qa=Bt;qa<Gi;++qa){let Ss=qa;Ss<0&&(Ss=0),Ss>=u&&(Ss=u-1);const Pu=Gt*(u*G)+Ss*G;let hr;if(1===z)hr=l[Pu];else{let Xs;if(hr=0,q)for(Xs=0;Xs<z;++Xs)hr=hr*W+l[Pu+Xs];else for(Xs=z-1;Xs>=0;--Xs)hr=hr*W+l[Pu+Xs]}hr=hr*M+U,fe=Math.max(fe,hr),Se=Math.min(Se,hr);let Xr=b.west+Y*Ss;_?Xr=a(Xr):Xr*=y;let WE=(Xr-C)/(v-C);WE=O.clamp(WE,0,1);let Pl=Gt*u+Ss;if(h>0){const Xs=qa===Bt,YE=qa===Gi-1,Act=Yo||Sr||Xs||YE;if((Yo||Sr)&&(Xs||YE))continue;Act&&(hr-=h,Xs?(Pl=nn+(d-Gt-1),Xr-=qo*j):Sr?Pl=nn+d+(u-Ss-1):YE?(Pl=nn+d+u+Gt,Xr+=qo*j):Yo&&(Pl=nn+d+u+d+Ss))}const Ol=Zc*t(Xr),qE=Zc*n(Xr),Kc=K*Ol,Rl=$*qE,hs=1/i(Kc*Ol+Rl*qE+Yr*$c),rp=Kc*hs,sp=Rl*hs,_P=Yr*hs,vs=new f;vs.x=rp+Ol*hr,vs.y=sp+qE*hr,vs.z=_P+$c*hr,k.multiplyByPoint(ve,vs,EO),f.minimumByComponent(EO,je,je),f.maximumByComponent(EO,Ke,Ke),Qt=Math.min(Qt,hr),gn[Pl]=vs,Ht[Pl]=new V(WE,Vn),Ft[Pl]=hr,R&&(Cn[Pl]=fo),D&&(pe[Pl]=p.geodeticSurfaceNormal(vs))}}const ua=Ae.fromPoints(gn);let ja,da;c(x)&&(ja=Ao.fromRectangle(x,Se,fe,p)),N&&(da=new _O(p).computeHorizonCullingPointPossiblyUnderEllipsoid(P,gn,Se));const Wa=new hO(je,Ke,P),Qe=new Qy(P,Wa,Qt,fe,ye,!1,R,D,B,F),ut=new Float32Array(ft*Qe.stride);let lt=0;for(let st=0;st<ft;++st)lt=Qe.encode(ut,lt,gn[st],Ht[st],Ft[st],void 0,Cn[st],pe[st]);return{vertices:ut,maximumHeight:fe,minimumHeight:Se,encoding:Qe,boundingSphere3D:ua,orientedBoundingBox:ja,occludeePointInScaledSpace:da}};const UV=kd;function dle(){return!0}const Xe=function fle(e,t){function n(){throw new E(t)}t=g(t,"This object was destroyed, i.e., destroy() was called.");for(const i in e)"function"==typeof e[i]&&(e[i]=n);e.isDestroyed=dle};function zV(){if(!c(Ls._canTransferArrayBuffer)){const e=vO("transferTypedArrayTest");e.postMessage=g(e.webkitPostMessage,e.postMessage);const t=99,n=new Int8Array([t]);try{e.postMessage({array:n},[n.buffer])}catch{return Ls._canTransferArrayBuffer=!1}Ls._canTransferArrayBuffer=new Promise(i=>{e.onmessage=function(o){const r=o.data.array,s=c(r)&&r[0]===t;i(s),e.terminate(),Ls._canTransferArrayBuffer=s}})}return Ls._canTransferArrayBuffer}const wO=new Ye;function SO(e){let t;try{t=new Blob([e],{type:"application/javascript"})}catch{const r=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);r.append(e),t=r.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(t)}function vO(e){const t=new Zr(e),n=0!==t.scheme().length&&0===t.fragment().length,i=e.replace(/\.js$/,""),o={};let r,s;if(bn(e))s=e;else if(!n){const a=Jn(`${Ls._workerModulePrefix}/${i}.js`);bn(a)&&(s=a)}if(s)return r=SO(`import "${s}";`),o.type="module",new Worker(r,o);if(!n&&typeof CESIUM_WORKERS<"u"){const a=`\n importScripts("${SO(CESIUM_WORKERS)}");\n CesiumWorkers["${i}"]();\n `;return r=SO(a),new Worker(r,o)}if(r=e,n||(r=Jn(`${Ls._workerModulePrefix+i}.js`)),!Hn.supportsEsmWebWorkers())throw new Pe("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(r,o)}function IO(){return(IO=(0,we.Z)(function*(e,t){const n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!Hn.supportsWebAssembly()){if(!c(t.fallbackModulePath))throw new Pe(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=Jn(t.fallbackModulePath),n}n.wasmBinaryFile=Jn(t.wasmBinaryFile);const i=yield zt.fetchArrayBuffer({url:n.wasmBinaryFile});return n.wasmBinary=i,n})).apply(this,arguments)}function Ls(e,t){this._workerPath=e,this._maximumActiveTasks=g(t,Number.POSITIVE_INFINITY),this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}const ple=(e,t,n,i)=>{const o=({data:r})=>{if(r.id===t){if(c(r.error)){let s=r.error;"RuntimeError"===s.name?(s=new Pe(r.error.message),s.stack=r.error.stack):"DeveloperError"===s.name?(s=new E(r.error.message),s.stack=r.error.stack):"Error"===s.name&&(s=new Error(r.error.message),s.stack=r.error.stack),wO.raiseEvent(s),i(s)}else wO.raiseEvent(),n(r.result);e.removeEventListener("message",o)}};return o},mle=[];function DO(){return(DO=(0,we.Z)(function*(e,t,n){const i=yield Promise.resolve(zV());c(n)?i||(n.length=0):n=mle;const o=e._nextID++,r=new Promise((s,a)=>{e._worker.addEventListener("message",ple(e._worker,o,s,a))});return e._worker.postMessage({id:o,baseUrl:Jn.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),r})).apply(this,arguments)}function PO(){return PO=(0,we.Z)(function*(e,t,n){++e._activeTasks;try{const i=yield function _le(e,t,n){return DO.apply(this,arguments)}(e,t,n);return--e._activeTasks,i}catch(i){throw--e._activeTasks,i}}),PO.apply(this,arguments)}Ls.prototype.scheduleTask=function(e,t){if(c(this._worker)||(this._worker=vO(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return function gle(e,t,n){return PO.apply(this,arguments)}(this,e,t)},Ls.prototype.initWebAssemblyModule=function(){var e=(0,we.Z)(function*(t){var n=this;if(c(this._webAssemblyPromise))return this._webAssemblyPromise;const i=function(){var o=(0,we.Z)(function*(){const r=n._worker=vO(n._workerPath),s=yield function hle(e,t){return IO.apply(this,arguments)}(n,t),a=yield Promise.resolve(zV());let l;const u=s.wasmBinary;c(u)&&a&&(l=[u]);const d=new Promise((h,m)=>{r.onmessage=function({data:_}){c(_)?h(_.result):m(new Pe("Could not configure wasm module"))}});return r.postMessage({canTransferArrayBuffer:a,parameters:{webAssemblyConfig:s}},l),d});return function(){return o.apply(this,arguments)}}();return this._webAssemblyPromise=i(),this._webAssemblyPromise});return function(t){return e.apply(this,arguments)}}(),Ls.prototype.isDestroyed=function(){return!1},Ls.prototype.destroy=function(){return c(this._worker)&&this._worker.terminate(),Xe(this)},Ls.taskCompletedEvent=wO,Ls._workerModulePrefix=Ls._defaultWorkerModulePrefix="Workers/",Ls._canTransferArrayBuffer=void 0;const ba=Ls;function bp(){E.throwInstantiationError()}Object.defineProperties(bp.prototype,{credits:{get:E.throwInstantiationError},waterMask:{get:E.throwInstantiationError}}),bp.prototype.interpolateHeight=E.throwInstantiationError,bp.prototype.isChildAvailable=E.throwInstantiationError,bp.prototype.createMesh=E.throwInstantiationError,bp.prototype.upsample=E.throwInstantiationError,bp.prototype.wasCreatedByUpsampling=E.throwInstantiationError,bp.maximumAsynchronousTasks=5;const OO=bp,Vw=function yle(e,t,n,i,o,r,s,a,l,u,d,h,m,_,p,y){this.center=e,this.vertices=t,this.stride=g(u,6),this.indices=n,this.indexCountWithoutSkirts=i,this.vertexCountWithoutSkirts=o,this.minimumHeight=r,this.maximumHeight=s,this.boundingSphere3D=a,this.occludeePointInScaledSpace=l,this.orientedBoundingBox=d,this.encoding=h,this.westIndicesSouthToNorth=m,this.southIndicesEastToWest=_,this.eastIndicesNorthToSouth=p,this.northIndicesWestToEast=y},ms={UNSIGNED_BYTE:ie.UNSIGNED_BYTE,UNSIGNED_SHORT:ie.UNSIGNED_SHORT,UNSIGNED_INT:ie.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case ms.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case ms.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case ms.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new E("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return ms.UNSIGNED_SHORT;case 4:return ms.UNSIGNED_INT;case 1:return ms.UNSIGNED_BYTE;default:throw new E("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return c(e)&&(e===ms.UNSIGNED_BYTE||e===ms.UNSIGNED_SHORT||e===ms.UNSIGNED_INT)},createTypedArray:function(e,t){if(!c(e))throw new E("numberOfVertices is required.");return e>=O.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,n,i){if(!c(e))throw new E("numberOfVertices is required.");if(!c(t))throw new E("sourceArray is required.");if(!c(n))throw new E("byteOffset is required.");return e>=O.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)},fromTypedArray:function(e){if(e instanceof Uint8Array)return ms.UNSIGNED_BYTE;if(e instanceof Uint16Array)return ms.UNSIGNED_SHORT;if(e instanceof Uint32Array)return ms.UNSIGNED_INT;throw new E("array must be a Uint8Array, Uint16Array, or Uint32Array.")}},Ot=Object.freeze(ms);function Za(){E.throwInstantiationError()}Object.defineProperties(Za.prototype,{errorEvent:{get:E.throwInstantiationError},credit:{get:E.throwInstantiationError},tilingScheme:{get:E.throwInstantiationError},hasWaterMask:{get:E.throwInstantiationError},hasVertexNormals:{get:E.throwInstantiationError},availability:{get:E.throwInstantiationError}});const VV=[];Za.getRegularGridIndices=function(e,t){if(e*t>=O.FOUR_GIGABYTES)throw new E("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=VV[e];c(n)||(VV[e]=n=[]);let i=n[t];return c(i)||(i=n[t]=e*t<O.SIXTY_FOUR_KILOBYTES?new Uint16Array((e-1)*(t-1)*6):new Uint32Array((e-1)*(t-1)*6),WV(e,t,i,0)),i};const HV=[];Za.getRegularGridIndicesAndEdgeIndices=function(e,t){if(e*t>=O.FOUR_GIGABYTES)throw new E("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=HV[e];c(n)||(HV[e]=n=[]);let i=n[t];if(!c(i)){const o=Za.getRegularGridIndices(e,t),r=jV(e,t);i=n[t]={indices:o,westIndicesSouthToNorth:r.westIndicesSouthToNorth,southIndicesEastToWest:r.southIndicesEastToWest,eastIndicesNorthToSouth:r.eastIndicesNorthToSouth,northIndicesWestToEast:r.northIndicesWestToEast}}return i};const GV=[];function jV(e,t){const n=new Array(t),i=new Array(e),o=new Array(t),r=new Array(e);let s;for(s=0;s<e;++s)r[s]=s,i[s]=e*t-1-s;for(s=0;s<t;++s)o[s]=(s+1)*e-1,n[s]=(t-s-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:i,eastIndicesNorthToSouth:o,northIndicesWestToEast:r}}function WV(e,t,n,i){let o=0;for(let r=0;r<t-1;++r){for(let s=0;s<e-1;++s){const l=o+e,u=l+1,d=o+1;n[i++]=o,n[i++]=l,n[i++]=d,n[i++]=d,n[i++]=l,n[i++]=u,++o}++o}}function Hw(e,t,n,i){let o=e[0];const r=e.length;for(let s=1;s<r;++s){const a=e[s];n[i++]=o,n[i++]=a,n[i++]=t,n[i++]=t,n[i++]=a,n[i++]=t+1,o=a,++t}return i}Za.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){if(e*t>=O.FOUR_GIGABYTES)throw new E("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=GV[e];c(n)||(GV[e]=n=[]);let i=n[t];if(!c(i)){const o=e*t,r=(e-1)*(t-1)*6,s=2*e+2*t,l=o+s,u=r+6*Math.max(0,s-4),d=jV(e,t),h=d.westIndicesSouthToNorth,m=d.southIndicesEastToWest,_=d.eastIndicesNorthToSouth,p=d.northIndicesWestToEast,y=Ot.createTypedArray(l,u);WV(e,t,y,0),Za.addSkirtIndices(h,m,_,p,o,y,r),i=n[t]={indices:y,westIndicesSouthToNorth:h,southIndicesEastToWest:m,eastIndicesNorthToSouth:_,northIndicesWestToEast:p,indexCountWithoutSkirts:r}}return i},Za.addSkirtIndices=function(e,t,n,i,o,r,s){let a=o;s=Hw(e,a,r,s),a+=e.length,s=Hw(t,a,r,s),a+=t.length,s=Hw(n,a,r,s),a+=n.length,Hw(i,a,r,s)},Za.heightmapTerrainQuality=.25,Za.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return 2*e.maximumRadius*Math.PI*Za.heightmapTerrainQuality/(t*n)},Za.prototype.requestTileGeometry=E.throwInstantiationError,Za.prototype.getLevelMaximumGeometricError=E.throwInstantiationError,Za.prototype.getTileDataAvailable=E.throwInstantiationError,Za.prototype.loadTileDataAvailability=E.throwInstantiationError;const Gf=Za;function jf(e){if(!c(e)||!c(e.buffer))throw new E("options.buffer is required.");if(!c(e.width))throw new E("options.width is required.");if(!c(e.height))throw new E("options.height is required.");this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=g(e.childTileMask,15),this._encoding=g(e.encoding,Ow.NONE);const t=UV.DEFAULT_STRUCTURE;let n=e.structure;c(n)?n!==t&&(n.heightScale=g(n.heightScale,t.heightScale),n.heightOffset=g(n.heightOffset,t.heightOffset),n.elementsPerHeight=g(n.elementsPerHeight,t.elementsPerHeight),n.stride=g(n.stride,t.stride),n.elementMultiplier=g(n.elementMultiplier,t.elementMultiplier),n.isBigEndian=g(n.isBigEndian,t.isBigEndian)):n=t,this._structure=n,this._createdByUpsampling=g(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===Ow.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(jf.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});const qV="createVerticesFromHeightmap",ble=new ba(qV),Tle=new ba(qV,OO.maximumAsynchronousTasks);function YV(e,t,n,i,o,r,s,a,l){const u=(a-o.west)*(r-1)/(o.east-o.west),d=(l-o.south)*(s-1)/(o.north-o.south);let h=0|u,m=h+1;m>=r&&(m=r-1,h=r-2);let _=0|d,p=_+1;p>=s&&(p=s-1,_=s-2);const b=d-_;return _=s-1-_,p=s-1-p,XV(u-h,b,(t.decodeHeight(e,_*r+h)-n)/i,(t.decodeHeight(e,_*r+m)-n)/i,(t.decodeHeight(e,p*r+h)-n)/i,(t.decodeHeight(e,p*r+m)-n)/i)}function XV(e,t,n,i,o,r){return t<e?n+e*(i-n)+t*(r-i):n+e*(r-o)+t*(o-n)}function Gw(e,t,n,i,o,r){r*=i;let a,s=0;if(o)for(a=0;a<t;++a)s=s*n+e[r+a];else for(a=t-1;a>=0;--a)s=s*n+e[r+a];return s}function xle(e,t,n,i,o,r,s,a){let l;if(s*=o,r)for(l=0;l<t-1;++l)e[s+l]=a/i|0,a-=e[s+l]*i,i/=n;else for(l=t-1;l>0;--l)e[s+l]=a/i|0,a-=e[s+l]*i,i/=n;e[s+l]=a}jf.prototype.createMesh=function(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.tilingScheme",e.tilingScheme),A.typeOf.number("options.x",e.x),A.typeOf.number("options.y",e.y),A.typeOf.number("options.level",e.level);const t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=g(e.exaggeration,1),s=g(e.exaggerationRelativeHeight,0),a=g(e.throttle,!0),l=t.ellipsoid,u=t.tileXYToNativeRectangle(n,i,o),d=t.tileXYToRectangle(n,i,o),h=l.cartographicToCartesian(Te.center(d)),m=this._structure,p=Gf.getEstimatedLevelZeroGeometricErrorForAHeightmap(l,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(4*p,1e3);const b=(a?Tle:ble).scheduleTask({heightmap:this._buffer,structure:m,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:u,rectangle:d,relativeToCenter:h,ellipsoid:l,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Qr,exaggeration:r,exaggerationRelativeHeight:s,encoding:this._encoding});if(!c(b))return;const x=this;return Promise.resolve(b).then(function(C){let w;w=x._skirtHeight>0?Gf.getRegularGridAndSkirtIndicesAndEdgeIndices(C.gridWidth,C.gridHeight):Gf.getRegularGridIndicesAndEdgeIndices(C.gridWidth,C.gridHeight);const v=C.gridWidth*C.gridHeight;return x._mesh=new Vw(h,new Float32Array(C.vertices),w.indices,w.indexCountWithoutSkirts,v,C.minimumHeight,C.maximumHeight,Ae.clone(C.boundingSphere3D),f.clone(C.occludeePointInScaledSpace),C.numberOfAttributes,Ao.clone(C.orientedBoundingBox),Qy.clone(C.encoding),w.westIndicesSouthToNorth,w.southIndicesEastToWest,w.eastIndicesNorthToSouth,w.northIndicesWestToEast),x._buffer=void 0,x._mesh})},jf.prototype._createMeshSync=function(e){A.typeOf.object("options.tilingScheme",e.tilingScheme),A.typeOf.number("options.x",e.x),A.typeOf.number("options.y",e.y),A.typeOf.number("options.level",e.level);const t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=g(e.exaggeration,1),s=g(e.exaggerationRelativeHeight,0),a=t.ellipsoid,l=t.tileXYToNativeRectangle(n,i,o),u=t.tileXYToRectangle(n,i,o),d=a.cartographicToCartesian(Te.center(u)),h=this._structure,_=Gf.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(4*_,1e3);const p=UV.computeVertices({heightmap:this._buffer,structure:h,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:l,rectangle:u,relativeToCenter:d,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Qr,exaggeration:r,exaggerationRelativeHeight:s});let y;return this._buffer=void 0,y=this._skirtHeight>0?Gf.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):Gf.getRegularGridIndicesAndEdgeIndices(this._width,this._height),this._mesh=new Vw(d,p.vertices,y.indices,y.indexCountWithoutSkirts,p.gridWidth*p.gridHeight,p.minimumHeight,p.maximumHeight,p.boundingSphere3D,p.occludeePointInScaledSpace,p.encoding.stride,p.orientedBoundingBox,p.encoding,y.westIndicesSouthToNorth,y.southIndicesEastToWest,y.eastIndicesNorthToSouth,y.northIndicesWestToEast),this._mesh},jf.prototype.interpolateHeight=function(e,t,n){const i=this._width,o=this._height,r=this._structure,s=r.stride,a=r.elementsPerHeight,l=r.elementMultiplier,u=r.isBigEndian,d=r.heightOffset,h=r.heightScale,m=c(this._mesh);if(!m&&this._encoding===Ow.LERC)return;let y;return m?y=YV(this._mesh.vertices,this._mesh.encoding,d,h,e,i,o,t,n):(y=function Ale(e,t,n,i,o,r,s,a,l,u){const d=(l-r.west)*(s-1)/(r.east-r.west),h=(u-r.south)*(a-1)/(r.north-r.south);let m=0|d,_=m+1;_>=s&&(_=s-1,m=s-2);let p=0|h,y=p+1;y>=a&&(y=a-1,p=a-2);const x=h-p;p=a-1-p,y=a-1-y;return XV(d-m,x,Gw(e,t,n,i,o,p*s+m),Gw(e,t,n,i,o,p*s+_),Gw(e,t,n,i,o,y*s+m),Gw(e,t,n,i,o,y*s+_))}(this._buffer,a,l,s,u,e,i,o,t,n),y=y*h+d),y},jf.prototype.upsample=function(e,t,n,i,o,r,s){if(!c(e))throw new E("tilingScheme is required.");if(!c(t))throw new E("thisX is required.");if(!c(n))throw new E("thisY is required.");if(!c(i))throw new E("thisLevel is required.");if(!c(o))throw new E("descendantX is required.");if(!c(r))throw new E("descendantY is required.");if(!c(s))throw new E("descendantLevel is required.");if(s-i>1)throw new E("Upsampling through more than one level at a time is not currently supported.");const l=this._mesh;if(!c(l))return;const u=this._width,d=this._height,h=this._structure,m=h.stride,_=new this._bufferType(u*d*m),p=l.vertices,y=l.encoding,b=e.tileXYToRectangle(t,n,i),x=e.tileXYToRectangle(o,r,s),C=h.heightOffset,w=h.heightScale,v=h.elementsPerHeight,I=h.elementMultiplier,P=h.isBigEndian,N=Math.pow(I,v-1);for(let R=0;R<d;++R){const B=O.lerp(x.north,x.south,R/(d-1));for(let F=0;F<u;++F){let D=YV(p,y,C,w,b,u,d,O.lerp(x.west,x.east,F/(u-1)),B);D=D<h.lowestEncodedHeight?h.lowestEncodedHeight:D,D=D>h.highestEncodedHeight?h.highestEncodedHeight:D,xle(_,v,I,N,m,P,R*u+F,D)}}return Promise.resolve(new jf({buffer:_,width:u,height:d,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))},jf.prototype.isChildAvailable=function(e,t,n,i){if(!c(e))throw new E("thisX is required.");if(!c(t))throw new E("thisY is required.");if(!c(n))throw new E("childX is required.");if(!c(i))throw new E("childY is required.");let o=2;return n!==2*e&&++o,i!==2*t&&(o-=2),0!=(this._childTileMask&1<<o)},jf.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};const RO=jf;let LO;const ZV="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyYTI3ZDMxOS1mODc4LTQ5NzktOGUzNy04OTA0ZGI5MmM1NGIiLCJpZCI6MjU5LCJpYXQiOjE3MTk4NDM5OTN9.FDHD-mZOIAzA9J_kzOz6AkKK2PHzl2yoMbFqbpsfH6Q",jw={};jw.defaultAccessToken=ZV,jw.defaultServer=new zt({url:"https://api.cesium.com/"}),jw.getDefaultTokenCredit=function(e){if(e===ZV)return c(LO)||(LO=new Yn('<b> This application is using Cesium\'s default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i> with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>',!0)),LO};const A_=jw;function $a(e,t){let n;A.defined("endpoint",e),A.defined("endpointResource",t);const i=e.externalType,o=c(i);if(o){if("3DTILES"!==i&&"STK_TERRAIN_SERVER"!==i)throw new Pe("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");n={url:e.options.url}}else n={url:e.url,retryAttempts:1,retryCallback:Cle};zt.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new Zr(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}function Cle(e,t){const n=g(e._ionRoot,e),i=n._ionEndpointResource,o=typeof Image<"u";return c(t)&&(401===t.statusCode||o&&t.target instanceof Image)?(c(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})):Promise.resolve(!1)}c(Object.create)&&(($a.prototype=Object.create(zt.prototype)).constructor=$a),$a.fromAssetId=function(e,t){const n=$a._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new $a(i,n)})},Object.defineProperties($a.prototype,{credits:{get:function(){return c(this._ionRoot)?this._ionRoot.credits:(c(this._credits)||(this._credits=$a.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource)),this._credits)}}}),$a.getCreditsFromEndpoint=function(e,t){const n=e.attributions.map(Yn.getIonCredit),i=A_.getDefaultTokenCredit(t.queryParameters.access_token);return c(i)&&n.push(Yn.clone(i)),n},$a.prototype.clone=function(e){const t=g(this._ionRoot,this);return c(e)||(e=new $a(t._ionEndpoint,t._ionEndpointResource)),(e=zt.prototype.clone.call(this,e))._ionRoot=t,e._isExternal=this._isExternal,e},$a.prototype.fetchImage=function(e){if(!this._isExternal){const t=e;e={preferBlob:!0},c(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return zt.prototype.fetchImage.call(this,e)},$a.prototype._makeRequest=function(e){return this._isExternal||new Zr(this.url).authority()!==this._ionEndpointDomain||(c(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)),zt.prototype._makeRequest.call(this,e)},$a._createEndpointResource=function(e,t){A.defined("assetId",e),t=g(t,g.EMPTY_OBJECT);let n=g(t.server,A_.defaultServer);const i=g(t.accessToken,A_.defaultAccessToken);n=zt.createIfNeeded(n);const o={url:`v1/assets/${e}/endpoint`};return c(i)&&(o.queryParameters={access_token:i}),n.getDerivedResource(o)};const cA=$a,Ww={clipTriangleAtAxisAlignedThreshold:function(e,t,n,i,o,r){if(!c(e))throw new E("threshold is required.");if(!c(t))throw new E("keepAbove is required.");if(!c(n))throw new E("u0 is required.");if(!c(i))throw new E("u1 is required.");if(!c(o))throw new E("u2 is required.");let s,a,l;c(r)?r.length=0:r=[],t?(s=n<e,a=i<e,l=o<e):(s=n>e,a=i>e,l=o>e);const u=s+a+l;let d,h,m,_,p,y;return 1===u?s?(d=(e-n)/(i-n),h=(e-n)/(o-n),r.push(1),r.push(2),1!==h&&(r.push(-1),r.push(0),r.push(2),r.push(h)),1!==d&&(r.push(-1),r.push(0),r.push(1),r.push(d))):a?(m=(e-i)/(o-i),_=(e-i)/(n-i),r.push(2),r.push(0),1!==_&&(r.push(-1),r.push(1),r.push(0),r.push(_)),1!==m&&(r.push(-1),r.push(1),r.push(2),r.push(m))):l&&(p=(e-o)/(n-o),y=(e-o)/(i-o),r.push(0),r.push(1),1!==y&&(r.push(-1),r.push(2),r.push(1),r.push(y)),1!==p&&(r.push(-1),r.push(2),r.push(0),r.push(p))):2===u?s||n===e?a||i===e?!l&&o!==e&&(h=(e-n)/(o-n),m=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(h),r.push(-1),r.push(1),r.push(2),r.push(m)):(y=(e-o)/(i-o),d=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(y),r.push(-1),r.push(0),r.push(1),r.push(d)):(_=(e-i)/(n-i),p=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(_),r.push(-1),r.push(2),r.push(0),r.push(p)):3!==u&&(r.push(0),r.push(1),r.push(2)),r},computeBarycentricCoordinates:function(e,t,n,i,o,r,s,a,l){if(!c(e))throw new E("x is required.");if(!c(t))throw new E("y is required.");if(!c(n))throw new E("x1 is required.");if(!c(i))throw new E("y1 is required.");if(!c(o))throw new E("x2 is required.");if(!c(r))throw new E("y2 is required.");if(!c(s))throw new E("x3 is required.");if(!c(a))throw new E("y3 is required.");const u=n-s,d=s-o,h=r-a,m=i-a,_=1/(h*u+d*m),p=t-a,y=e-s,b=(h*y+d*p)*_,x=(-m*y+u*p)*_,C=1-b-x;return c(l)?(l.x=b,l.y=x,l.z=C,l):new f(b,x,C)},computeLineSegmentLineSegmentIntersection:function(e,t,n,i,o,r,s,a,l){A.typeOf.number("x00",e),A.typeOf.number("y00",t),A.typeOf.number("x01",n),A.typeOf.number("y01",i),A.typeOf.number("x10",o),A.typeOf.number("y10",r),A.typeOf.number("x11",s),A.typeOf.number("y11",a);const h=(a-r)*(n-e)-(s-o)*(i-t);if(0===h)return;const m=((s-o)*(t-r)-(a-r)*(e-o))/h,_=((n-e)*(t-r)-(i-t)*(e-o))/h;return m>=0&&m<=1&&_>=0&&_<=1?(c(l)||(l=new V),l.x=e+m*(n-e),l.y=t+m*(i-t),l):void 0}},$V=Ww;function Tp(e){if(!c(e)||!c(e.quantizedVertices))throw new E("options.quantizedVertices is required.");if(!c(e.indices))throw new E("options.indices is required.");if(!c(e.minimumHeight))throw new E("options.minimumHeight is required.");if(!c(e.maximumHeight))throw new E("options.maximumHeight is required.");if(!c(e.maximumHeight))throw new E("options.maximumHeight is required.");if(!c(e.boundingSphere))throw new E("options.boundingSphere is required.");if(!c(e.horizonOcclusionPoint))throw new E("options.horizonOcclusionPoint is required.");if(!c(e.westIndices))throw new E("options.westIndices is required.");if(!c(e.southIndices))throw new E("options.southIndices is required.");if(!c(e.eastIndices))throw new E("options.eastIndices is required.");if(!c(e.northIndices))throw new E("options.northIndices is required.");if(!c(e.westSkirtHeight))throw new E("options.westSkirtHeight is required.");if(!c(e.southSkirtHeight))throw new E("options.southSkirtHeight is required.");if(!c(e.eastSkirtHeight))throw new E("options.eastSkirtHeight is required.");if(!c(e.northSkirtHeight))throw new E("options.northSkirtHeight is required.");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;const t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);function o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._heightValues=this._quantizedVertices.subarray(2*t,3*t),this._westIndices=Yw(e.westIndices,o,t),this._southIndices=Yw(e.southIndices,r,t),this._eastIndices=Yw(e.eastIndices,o,t),this._northIndices=Yw(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=g(e.childTileMask,15),this._createdByUpsampling=g(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(Tp.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return c(this._mesh)}}});const qw=[];function Yw(e,t,n){qw.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)qw[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(qw.sort(t),Ot.createTypedArray(n,qw)):e}const KV="createVerticesFromQuantizedTerrainMesh",Ele=new ba(KV),wle=new ba(KV,OO.maximumAsynchronousTasks);Tp.prototype.createMesh=function(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.tilingScheme",e.tilingScheme),A.typeOf.number("options.x",e.x),A.typeOf.number("options.y",e.y),A.typeOf.number("options.level",e.level);const t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=g(e.exaggeration,1),s=g(e.exaggerationRelativeHeight,0),a=g(e.throttle,!0),l=t.ellipsoid,u=t.tileXYToRectangle(n,i,o),h=(a?wle:Ele).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:u,relativeToCenter:this._boundingSphere.center,ellipsoid:l,exaggeration:r,exaggerationRelativeHeight:s});if(!c(h))return;const m=this;return Promise.resolve(h).then(function(_){const p=m._quantizedVertices.length/3,b=Ot.createTypedArray(p+m._westIndices.length+m._southIndices.length+m._eastIndices.length+m._northIndices.length,_.indices),x=new Float32Array(_.vertices),C=_.center,w=_.minimumHeight,v=_.maximumHeight,I=m._boundingSphere,P=m._orientedBoundingBox,N=g(f.clone(_.occludeePointInScaledSpace),m._horizonOcclusionPoint),R=_.vertexStride,B=Qy.clone(_.encoding);return m._mesh=new Vw(C,x,b,_.indexCountWithoutSkirts,p,w,v,I,N,R,P,B,_.westIndicesSouthToNorth,_.southIndicesEastToWest,_.eastIndicesNorthToSouth,_.northIndicesWestToEast),m._quantizedVertices=void 0,m._encodedNormals=void 0,m._indices=void 0,m._uValues=void 0,m._vValues=void 0,m._heightValues=void 0,m._westIndices=void 0,m._southIndices=void 0,m._eastIndices=void 0,m._northIndices=void 0,m._mesh})};const Sle=new ba("upsampleQuantizedTerrainMesh",OO.maximumAsynchronousTasks);Tp.prototype.upsample=function(e,t,n,i,o,r,s){if(!c(e))throw new E("tilingScheme is required.");if(!c(t))throw new E("thisX is required.");if(!c(n))throw new E("thisY is required.");if(!c(i))throw new E("thisLevel is required.");if(!c(o))throw new E("descendantX is required.");if(!c(r))throw new E("descendantY is required.");if(!c(s))throw new E("descendantLevel is required.");if(s-i>1)throw new E("Upsampling through more than one level at a time is not currently supported.");const l=this._mesh;if(!c(this._mesh))return;const u=2*t!==o,d=2*n===r,h=e.ellipsoid,m=e.tileXYToRectangle(o,r,s),_=Sle.scheduleTask({vertices:l.vertices,vertexCountWithoutSkirts:l.vertexCountWithoutSkirts,indices:l.indices,indexCountWithoutSkirts:l.indexCountWithoutSkirts,encoding:l.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:u,isNorthChild:d,childRectangle:m,ellipsoid:h});if(!c(_))return;let p=Math.min(this._westSkirtHeight,this._eastSkirtHeight);p=Math.min(p,this._southSkirtHeight),p=Math.min(p,this._northSkirtHeight);const y=u?.5*p:this._westSkirtHeight,b=d?.5*p:this._southSkirtHeight,x=u?this._eastSkirtHeight:.5*p,C=d?this._northSkirtHeight:.5*p,w=this._credits;return Promise.resolve(_).then(function(v){const I=new Uint16Array(v.vertices),P=Ot.createTypedArray(I.length/3,v.indices);let N;return c(v.encodedNormals)&&(N=new Uint8Array(v.encodedNormals)),new Tp({quantizedVertices:I,indices:P,encodedNormals:N,minimumHeight:v.minimumHeight,maximumHeight:v.maximumHeight,boundingSphere:Ae.clone(v.boundingSphere),orientedBoundingBox:Ao.clone(v.orientedBoundingBox),horizonOcclusionPoint:f.clone(v.horizonOcclusionPoint),westIndices:v.westIndices,southIndices:v.southIndices,eastIndices:v.eastIndices,northIndices:v.northIndices,westSkirtHeight:y,southSkirtHeight:b,eastSkirtHeight:x,northSkirtHeight:C,childTileMask:0,credits:w,createdByUpsampling:!0})})};const QV=new f;function JV(e,t,n,i,o,r,s,a){const l=Math.min(n,o,s),u=Math.max(n,o,s),d=Math.min(i,r,a),h=Math.max(i,r,a);return e>=l&&e<=u&&t>=d&&t<=h}Tp.prototype.interpolateHeight=function(e,t,n){let i=O.clamp((t-e.west)/e.width,0,1);i*=32767;let o=O.clamp((n-e.south)/e.height,0,1);return o*=32767,c(this._mesh)?function Ple(e,t,n){const i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,l=s.length;a<l;a+=3){const u=s[a],d=s[a+1],h=s[a+2],m=r.decodeTextureCoordinates(o,u,vle),_=r.decodeTextureCoordinates(o,d,Ile),p=r.decodeTextureCoordinates(o,h,Dle);if(JV(t,n,m.x,m.y,_.x,_.y,p.x,p.y)){const y=$V.computeBarycentricCoordinates(t,n,m.x,m.y,_.x,_.y,p.x,p.y,QV);if(y.x>=-1e-15&&y.y>=-1e-15&&y.z>=-1e-15){const b=r.decodeHeight(o,u),x=r.decodeHeight(o,d),C=r.decodeHeight(o,h);return y.x*b+y.y*x+y.z*C}}}}(this,i,o):function Ole(e,t,n){const i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,l=s.length;a<l;a+=3){const u=s[a],d=s[a+1],h=s[a+2],m=i[u],_=i[d],p=i[h],y=o[u],b=o[d],x=o[h];if(JV(t,n,m,y,_,b,p,x)){const C=$V.computeBarycentricCoordinates(t,n,m,y,_,b,p,x,QV);if(C.x>=-1e-15&&C.y>=-1e-15&&C.z>=-1e-15)return O.lerp(e._minimumHeight,e._maximumHeight,(C.x*r[u]+C.y*r[d]+C.z*r[h])/32767)}}}(this,i,o)};const vle=new V,Ile=new V,Dle=new V;Tp.prototype.isChildAvailable=function(e,t,n,i){if(!c(e))throw new E("thisX is required.");if(!c(t))throw new E("thisY is required.");if(!c(n))throw new E("childX is required.");if(!c(i))throw new E("childY is required.");let o=2;return n!==2*e&&++o,i!==2*t&&(o-=2),0!=(this._childTileMask&1<<o)},Tp.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};const Rle=Tp;function Jy(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}const x_=new Te;function Lle(e,t,n,i){const o=i.length;for(let r=0;r<o;++r){const s=i[r];if(s.x===t&&s.y===n&&s.level===e)return!0}return!1}Jy.prototype.addAvailableTileRange=function(e,t,n,i,o){const r=this._tilingScheme,s=this._rootNodes;if(0===e)for(let m=n;m<=o;++m)for(let _=t;_<=i;++_)Lle(e,_,m,s)||s.push(new e0(r,void 0,0,_,m));r.tileXYToRectangle(t,n,e,x_);const a=x_.west,l=x_.north;r.tileXYToRectangle(i,o,e,x_);const h=new kle(e,a,x_.south,x_.east,l);for(let m=0;m<s.length;++m){const _=s[m];MO(_.extent,h)&&Ule(this._maximumLevel,_,h)}},Jy.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){const i=this._rootNodes[n];if(t0(i.extent,e)){t=i;break}}return c(t)?lA(void 0,t,e):-1};const Nle=[],Mle=[],Fle=new Te,Ble=new Te;Jy.prototype.computeBestAvailableLevelOverRectangle=function(e){const t=Nle;t.length=0,e.east<e.west?(t.push(Te.fromRadians(-Math.PI,e.south,e.east,e.north,Fle)),t.push(Te.fromRadians(e.west,e.south,Math.PI,e.north,Ble))):t.push(e);const n=Mle;let i;for(n.length=0,i=0;i<this._rootNodes.length;++i)uA(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(c(n[i])&&0===n[i].length)return i;return 0};const e4=new Ce;function e0(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}function kle(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function MO(e,t){const n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east);return i<Math.min(e.north,t.north)&&n<o}function Ule(e,t,n){for(;t.level<e;)if(Xw(t.nw.extent,n))t=t.nw;else if(Xw(t.ne.extent,n))t=t.ne;else if(Xw(t.sw.extent,n))t=t.sw;else{if(!Xw(t.se.extent,n))break;t=t.se}if(0===t.rectangles.length||t.rectangles[t.rectangles.length-1].level<=n.level)t.rectangles.push(n);else{let i=Be(t.rectangles,n.level,zle);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function zle(e,t){return e.level-t}function Xw(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function t0(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function lA(e,t,n){let i=0,o=!1;for(;!o;){const r=t._nw&&t0(t._nw.extent,n),s=t._ne&&t0(t._ne.extent,n),a=t._sw&&t0(t._sw.extent,n),l=t._se&&t0(t._se.extent,n);if(r+s+a+l>1){r&&(i=Math.max(i,lA(t,t._nw,n))),s&&(i=Math.max(i,lA(t,t._ne,n))),a&&(i=Math.max(i,lA(t,t._sw,n))),l&&(i=Math.max(i,lA(t,t._se,n)));break}r?t=t._nw:s?t=t._ne:a?t=t._sw:l?t=t._se:o=!0}for(;t!==e;){const r=t.rectangles;for(let s=r.length-1;s>=0&&r[s].level>i;--s){const a=r[s];t0(a,n)&&(i=a.level)}t=t.parent}return i}function uA(e,t,n){if(!t)return;let i,o=!1;for(i=0;i<n.length;++i)o=o||MO(t.extent,n[i]);if(!o)return;const r=t.rectangles;for(i=0;i<r.length;++i){const s=r[i];e[s.level]||(e[s.level]=n),e[s.level]=Vle(e[s.level],s)}uA(e,t._nw,n),uA(e,t._ne,n),uA(e,t._sw,n),uA(e,t._se,n)}function Vle(e,t){const n=[];for(let i=0;i<e.length;++i){const o=e[i];MO(o,t)?(o.west<t.west&&n.push(new Te(o.west,o.south,t.west,o.north)),o.east>t.east&&n.push(new Te(t.east,o.south,o.east,o.north)),o.south<t.south&&n.push(new Te(Math.max(t.west,o.west),o.south,Math.min(t.east,o.east),t.south)),o.north>t.north&&n.push(new Te(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}Jy.prototype.isTileAvailable=function(e,t,n){const i=this._tilingScheme.tileXYToRectangle(t,n,e,x_);return Te.center(i,e4),this.computeMaximumLevelAtPosition(e4)>=e},Jy.prototype.computeChildMaskForTile=function(e,t,n){const 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},Object.defineProperties(e0.prototype,{nw:{get:function(){return this._nw||(this._nw=new e0(this.tilingScheme,this,this.level+1,2*this.x,2*this.y)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new e0(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new e0(this.tilingScheme,this,this.level+1,2*this.x,2*this.y+1)),this._sw}},se:{get:function(){return this._se||(this._se=new e0(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y+1)),this._se}}});const Zw=Jy,FO=function Hle(e){let t;const n=e.name,i=e.message;t=c(n)&&c(i)?`${n}: ${i}`:e.toString();const o=e.stack;return c(o)&&(t+=`\n${o}`),t};function $w(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=g(r,0),this.retry=!1,this.error=s}$w.reportError=function(e,t,n,i,o,r,s,a){let l=e;return c(e)?(l.provider=t,l.message=i,l.x=o,l.y=r,l.level=s,l.retry=!1,l.error=a,++l.timesRetried):l=new $w(t,i,o,r,s,0,a),c(n)&&n.numberOfListeners>0?n.raiseEvent(l):c(t)&&console.log(`An error occurred in "${t.constructor.name}": ${FO(i)}`),l},$w.reportSuccess=function(e){c(e)&&(e.timesRetried=-1)};const Ka=$w;function Gle(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 t4(e){this.requestVertexNormals=g(e.requestVertexNormals,!1),this.requestWaterMask=g(e.requestWaterMask,!1),this.requestMetadata=g(e.requestMetadata,!0),this.ellipsoid=g(e.ellipsoid,he.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=[]}function n4(e,t,n){return BO.apply(this,arguments)}function BO(){return(BO=(0,we.Z)(function*(e,t,n){if(!t.format){const y="The tile format is not specified in the layer.json file.";throw e.previousError=Ka.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,y),new Pe(y)}if(!t.tiles||0===t.tiles.length){const y="The layer.json file does not specify any tile URL templates.";throw e.previousError=Ka.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,y),new Pe(y)}let i=!1,o=!1,r=!1,s=!0,a=!1;if("heightmap-1.0"===t.format)a=!0,c(e.heightmapStructure)||(e.heightmapStructure={heightScale:.2,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:65535}),o=!0,e.requestWaterMask=!0;else if(0!==t.format.indexOf("quantized-mesh-1.")){const y=`The tile format "${t.format}" is invalid or not supported.`;throw e.previousError=Ka.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,y),new Pe(y)}const l=t.tiles,u=t.maxzoom;if(e.overallMaxZoom=Math.max(e.overallMaxZoom,u),t.projection&&"EPSG:4326"!==t.projection){if("EPSG:3857"!==t.projection){const y=`The projection "${t.projection}" is invalid or not supported.`;throw e.previousError=Ka.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,y),new Pe(y)}e.tilingScheme=new Md({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid})}else e.tilingScheme=new Nd({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});if(e.levelZeroMaximumGeometricError=Gf.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.heightmapWidth,e.tilingScheme.getNumberOfXTilesAtLevel(0)),t.scheme&&"tms"!==t.scheme&&"slippyMap"!==t.scheme){const y=`The scheme "${t.scheme}" is invalid or not supported.`;throw e.previousError=Ka.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,y),new Pe(y)}let d;e.scheme=t.scheme,c(t.extensions)&&-1!==t.extensions.indexOf("octvertexnormals")?i=!0:c(t.extensions)&&-1!==t.extensions.indexOf("vertexnormals")&&(i=!0,s=!1),c(t.extensions)&&-1!==t.extensions.indexOf("watermask")&&(o=!0),c(t.extensions)&&-1!==t.extensions.indexOf("metadata")&&(r=!0);const h=t.metadataAvailability,m=t.available;let _;if(c(m)&&!c(h)){_=new Zw(e.tilingScheme,m.length);for(let y=0;y<m.length;++y){const b=m[y],x=e.tilingScheme.getNumberOfYTilesAtLevel(y);c(e.overallAvailability[y])||(e.overallAvailability[y]=[]);for(let C=0;C<b.length;++C){const w=b[C],v=x-w.endY-1,I=x-w.startY-1;e.overallAvailability[y].push([w.startX,v,w.endX,I]),_.addAvailableTileRange(y,w.startX,v,w.endX,I)}}}else c(h)&&(d=new Zw(e.tilingScheme,u),_=new Zw(e.tilingScheme,u),e.overallAvailability[0]=[[0,0,1,0]],_.addAvailableTileRange(0,0,0,1,0));e.hasWaterMask=e.hasWaterMask||o,e.hasVertexNormals=e.hasVertexNormals||i,e.hasMetadata=e.hasMetadata||r,c(t.attribution)&&(e.attribution.length>0&&(e.attribution+=" "),e.attribution+=t.attribution),e.layers.push(new Gle({resource:e.lastResource,version:t.version,isHeightmap:a,tileUrlTemplates:l,availability:_,hasVertexNormals:i,hasWaterMask:o,hasMetadata:r,availabilityLevels:h,availabilityTilesLoaded:d,littleEndianExtensionSize:s}));const p=t.parentUrl;return!c(p)||(c(_)?(e.lastResource=e.lastResource.getDerivedResource({url:p}),e.lastResource.appendForwardSlash(),e.layerJsonResource=e.lastResource.getDerivedResource({url:"layer.json"}),yield UO(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0))})).apply(this,arguments)}function kO(){return(kO=(0,we.Z)(function*(e,t,n){yield n4(e,t,n);const i=e.overallAvailability.length;if(i>0){const o=e.availability=new Zw(e.tilingScheme,e.overallMaxZoom);for(let r=0;r<i;++r){const s=e.overallAvailability[r];for(let a=0;a<s.length;++a){const l=s[a];o.addAvailableTileRange(r,l[0],l[1],l[2],l[3])}}}if(e.attribution.length>0){const o=new Yn(e.attribution);e.tileCredits.push(o)}return!0})).apply(this,arguments)}function UO(e,t){return zO.apply(this,arguments)}function zO(){return zO=(0,we.Z)(function*(e,t){try{const n=yield e.layerJsonResource.fetchJson();return function Wle(e,t,n){return kO.apply(this,arguments)}(e,n,t)}catch(n){return c(n)&&404===n.statusCode?(yield n4(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):function jle(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(c(t)&&(i+=`\n${t.message}`),e.previousError=Ka.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,i),e.previousError.retry)return UO(e,n);throw new Pe(i)}(e,n,t)}}),zO.apply(this,arguments)}function Nu(e){e=g(e,g.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=g(e.requestVertexNormals,!1),this._requestWaterMask=g(e.requestWaterMask,!1),this._requestMetadata=g(e.requestMetadata,!0),this._errorEvent=new Ye;let t=e.credit;"string"==typeof t&&(t=new Yn(t)),this._credit=t,this._availability=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._layers=void 0,this._tileCredits=void 0}t4.prototype.build=function(e){e._heightmapWidth=this.heightmapWidth,e._scheme=this.scheme;const t=c(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};const VO={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function i4(e){return c(e)&&0!==e.length?{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}:{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}}function o4(e,t,n,i,o,r){if(!c(o))return Promise.reject(new Pe("Terrain tile doesn't exist"));const s=o.tileUrlTemplates;if(0===s.length)return;let a;a=e._scheme&&"tms"!==e._scheme?n:e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;const l=[];let u,d;e._requestVertexNormals&&o.hasVertexNormals&&l.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&l.push("watermask"),e._requestMetadata&&o.hasMetadata&&l.push("metadata");const h=s[(t+a+i)%s.length],m=o.resource;c(m._ionEndpoint)&&!c(m._ionEndpoint.externalType)?(0!==l.length&&(d={extensions:l.join("-")}),u=i4(void 0)):u=i4(l);const _=m.getDerivedResource({url:h,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:d,headers:u,request:r}).fetchArrayBuffer();return c(_)?_.then(function(p){return c(p)?c(e._heightmapStructure)?function qle(e,t,n,i,o){const r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new RO({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})}(e,p):function Yle(e,t,n,i,o,r){const s=r.littleEndianExtensionSize;let a=0;const d=3*Float64Array.BYTES_PER_ELEMENT,h=4*Float64Array.BYTES_PER_ELEMENT,_=3*Uint16Array.BYTES_PER_ELEMENT;let y=Uint16Array.BYTES_PER_ELEMENT,b=3*y;const x=new DataView(t),C=new f(x.getFloat64(a,!0),x.getFloat64(a+8,!0),x.getFloat64(a+16,!0));a+=d;const w=x.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;const v=x.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;const I=new Ae(new f(x.getFloat64(a,!0),x.getFloat64(a+8,!0),x.getFloat64(a+16,!0)),x.getFloat64(a+d,!0));a+=h;const P=new f(x.getFloat64(a,!0),x.getFloat64(a+8,!0),x.getFloat64(a+16,!0));a+=d;const N=x.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;const R=new Uint16Array(t,a,3*N);a+=N*_,N>65536&&(y=Uint32Array.BYTES_PER_ELEMENT,b=3*y);const B=R.subarray(0,N),F=R.subarray(N,2*N),S=R.subarray(2*N,3*N);wi.zigZagDeltaDecode(B,F,S),a%y!=0&&(a+=y-a%y);const D=x.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;const L=Ot.createTypedArrayFromArrayBuffer(N,t,a,3*D);a+=D*b;let M=0;const U=L.length;for(let fe=0;fe<U;++fe){const ye=L[fe];L[fe]=M-ye,0===ye&&++M}const z=x.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;const G=Ot.createTypedArrayFromArrayBuffer(N,t,a,z);a+=z*y;const W=x.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;const q=Ot.createTypedArrayFromArrayBuffer(N,t,a,W);a+=W*y;const j=x.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;const Q=Ot.createTypedArrayFromArrayBuffer(N,t,a,j);a+=j*y;const Y=x.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;const ne=Ot.createTypedArrayFromArrayBuffer(N,t,a,Y);let X,K;for(a+=Y*y;a<x.byteLength;){const fe=x.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;const ye=x.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,fe===VO.OCT_VERTEX_NORMALS&&e._requestVertexNormals)X=new Uint8Array(t,a,2*N);else if(fe===VO.WATER_MASK&&e._requestWaterMask)K=new Uint8Array(t,a,ye);else if(fe===VO.METADATA&&e._requestMetadata){const ve=x.getUint32(a,!0);if(ve>0){const Ge=Cc(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,ve).available;if(c(Ge))for(let je=0;je<Ge.length;++je){const Ke=n+je+1,Qt=Ge[je],nn=e._tilingScheme.getNumberOfYTilesAtLevel(Ke);for(let Pt=0;Pt<Qt.length;++Pt){const ft=Qt[Pt],gn=nn-ft.endY-1,Ft=nn-ft.startY-1;e.availability.addAvailableTileRange(Ke,ft.startX,gn,ft.endX,Ft),r.availability.addAvailableTileRange(Ke,ft.startX,gn,ft.endX,Ft)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=ye}const $=5*e.getLevelMaximumGeometricError(n),me=e._tilingScheme.tileXYToRectangle(i,o,n),Se=Ao.fromRectangle(me,w,v,e._tilingScheme.ellipsoid);return new Rle({center:C,minimumHeight:w,maximumHeight:v,boundingSphere:I,orientedBoundingBox:Se,horizonOcclusionPoint:P,quantizedVertices:R,encodedNormals:X,indices:L,westIndices:G,southIndices:q,eastIndices:Q,northIndices:ne,westSkirtHeight:$,southSkirtHeight:$,eastSkirtHeight:$,northSkirtHeight:$,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:K,credits:e._tileCredits})}(e,p,i,t,n,o):Promise.reject(new Pe("Mesh buffer doesn't exist."))}):void 0}function HO(e,t,n,i){if(0===i)return;const o=e.availabilityLevels,r=i%o==0?i-o:(i/o|0)*o,s=1<<i-r;return{level:r,x:t/s|0,y:n/s|0}}function GO(e,t,n,i,o,r){if(!c(o.availabilityLevels))return{result:!1};let s;const a=function(){delete o.availabilityPromiseCache[s]},l=o.availabilityTilesLoaded,u=o.availability;let d=HO(o,t,n,i);for(;c(d);){if(u.isTileAvailable(d.level,d.x,d.y)&&!l.isTileAvailable(d.level,d.x,d.y)){let h;if(!r&&(s=`${d.level}-${d.x}-${d.y}`,h=o.availabilityPromiseCache[s],!c(h))){const m=new h_({throttle:!1,throttleByServer:!0,type:f_.TERRAIN});h=o4(e,d.x,d.y,d.level,o,m),c(h)&&(o.availabilityPromiseCache[s]=h,h.then(a))}return{result:!0,promise:h}}d=HO(o,d.x,d.y,d.level)}return{result:!1}}Nu.prototype.requestTileGeometry=function(e,t,n,i){const o=this._layers;let r;const s=o.length;let a=!1,l=Promise.resolve();if(1===s)r=o[0];else for(let u=0;u<s;++u){const d=o[u];if(!c(d.availability)||d.availability.isTileAvailable(n,e,t)){r=d;break}const h=GO(this,e,t,n,d,0===u);h.result&&(a=!0,l=l.then(()=>h.promise))}return!c(r)&&a?l.then(()=>new Promise(u=>{setTimeout(()=>{const d=this.requestTileGeometry(e,t,n,i);u(d)},0)})):o4(this,e,t,n,r,i)},Object.defineProperties(Nu.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}}}),Nu.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},Nu.fromIonAssetId=function(){var e=(0,we.Z)(function*(t,n){A.defined("assetId",t);const i=yield cA.fromAssetId(t);return Nu.fromUrl(i,n)});return function(t,n){return e.apply(this,arguments)}}(),Nu.fromUrl=function(){var e=(0,we.Z)(function*(t,n){A.defined("url",t),n=g(n,g.EMPTY_OBJECT),t=yield Promise.resolve(t);const i=zt.createIfNeeded(t);i.appendForwardSlash();const o=new t4(n);o.lastResource=i,o.layerJsonResource=o.lastResource.getDerivedResource({url:"layer.json"}),yield UO(o);const r=new Nu(n);return o.build(r),r});return function(t,n){return e.apply(this,arguments)}}(),Nu.prototype.getTileDataAvailable=function(e,t,n){if(!c(this._availability))return;if(n>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;const i=this._layers,o=i.length;for(let r=0;r<o;++r)if(GO(this,e,t,n,i[r],0===r).result)return;return!1},Nu.prototype.loadTileDataAvailability=function(e,t,n){if(!c(this._availability)||n>this._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;const i=this._layers,o=i.length;for(let r=0;r<o;++r){const s=GO(this,e,t,n,i[r],0===r);if(c(s.promise))return s.promise}},Nu._getAvailabilityTile=HO;const dA=Nu;function n0(e){e=g(e,g.EMPTY_OBJECT),this._tilingScheme=e.tilingScheme,c(this._tilingScheme)||(this._tilingScheme=new Nd({ellipsoid:g(e.ellipsoid,he.default)})),this._levelZeroMaximumGeometricError=Gf.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new Ye}Object.defineProperties(n0.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(){}}}),n0.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new RO({buffer:new Uint8Array(256),width:16,height:16}))},n0.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},n0.prototype.getTileDataAvailable=function(e,t,n){},n0.prototype.loadTileDataAvailability=function(e,t,n){};const Wf=n0,r4=new f,s4=new f,a4=new Ce,jO=new f,Xle=new f,c4=new Ae,Zle=new Nd,fA=[new Ce,new Ce,new Ce,new Ce],hA=new V,rr={};function l4(e){Ce.fromRadians(e.east,e.north,0,fA[0]),Ce.fromRadians(e.west,e.north,0,fA[1]),Ce.fromRadians(e.east,e.south,0,fA[2]),Ce.fromRadians(e.west,e.south,0,fA[3]);let t=0,n=0,i=0,o=0;const r=rr._terrainHeightsMaxLevel;let s;for(s=0;s<=r;++s){let a=!1;for(let l=0;l<4;++l)if(Zle.positionToTileXY(fA[l],s,hA),0===l)i=hA.x,o=hA.y;else if(i!==hA.x||o!==hA.y){a=!0;break}if(a)break;t=i,n=o}if(0!==s)return{x:t,y:n,level:s>r?r:s-1}}rr.initialize=function(){let e=rr._initPromise;return c(e)||(e=zt.fetchJson(Jn("Assets/approximateTerrainHeights.json")).then(function(t){rr._terrainHeights=t}),rr._initPromise=e),e},rr.getMinimumMaximumHeights=function(e,t){if(A.defined("rectangle",e),!c(rr._terrainHeights))throw new E("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=g(t,he.default);const n=l4(e);let i=rr._defaultMinTerrainHeight,o=rr._defaultMaxTerrainHeight;if(c(n)){const s=rr._terrainHeights[`${n.level}-${n.x}-${n.y}`];c(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(Te.northeast(e,a4),r4),t.cartographicToCartesian(Te.southwest(e,a4),s4),f.midpoint(s4,r4,jO);const a=t.scaleToGeodeticSurface(jO,Xle);if(c(a)){const l=f.distance(jO,a);i=Math.min(i,-l)}else i=rr._defaultMinTerrainHeight}return i=Math.max(rr._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}},rr.getBoundingSphere=function(e,t){if(A.defined("rectangle",e),!c(rr._terrainHeights))throw new E("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=g(t,he.default);const n=l4(e);let i=rr._defaultMaxTerrainHeight;if(c(n)){const s=rr._terrainHeights[`${n.level}-${n.x}-${n.y}`];c(s)&&(i=s[1])}const o=Ae.fromRectangle3D(e,t,0);return Ae.fromRectangle3D(e,t,i,c4),Ae.union(o,c4,o)},rr._terrainHeightsMaxLevel=6,rr._defaultMaxTerrainHeight=9e3,rr._defaultMinTerrainHeight=-1e5,rr._terrainHeights=void 0,rr._initPromise=void 0,Object.defineProperties(rr,{initialized:{get:function(){return c(rr._terrainHeights)}}});const vo=rr;function WO(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),6*n<1?e+6*(t-e)*n:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function se(e,t,n,i){this.red=g(e,1),this.green=g(t,1),this.blue=g(n,1),this.alpha=g(i,1)}let qO,YO,qf;se.fromCartesian4=function(e,t){return A.typeOf.object("cartesian",e),c(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new se(e.x,e.y,e.z,e.w)},se.fromBytes=function(e,t,n,i,o){return e=se.byteToFloat(g(e,255)),t=se.byteToFloat(g(t,255)),n=se.byteToFloat(g(n,255)),i=se.byteToFloat(g(i,255)),c(o)?(o.red=e,o.green=t,o.blue=n,o.alpha=i,o):new se(e,t,n,i)},se.fromAlpha=function(e,t,n){return A.typeOf.object("color",e),A.typeOf.number("alpha",t),c(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new se(e.red,e.green,e.blue,t)},Hn.supportsTypedArrays()&&(qO=new ArrayBuffer(4),YO=new Uint32Array(qO),qf=new Uint8Array(qO)),se.fromRgba=function(e,t){return YO[0]=e,se.fromBytes(qf[0],qf[1],qf[2],qf[3],t)},se.fromHsl=function(e,t,n,i,o){e=g(e,0)%1,t=g(t,0),n=g(n,0),i=g(i,1);let r=n,s=n,a=n;if(0!==t){let l;l=n<.5?n*(1+t):n+t-n*t;const u=2*n-l;r=WO(u,l,e+1/3),s=WO(u,l,e),a=WO(u,l,e-1/3)}return c(o)?(o.red=r,o.green=s,o.blue=a,o.alpha=i,o):new se(r,s,a,i)},se.fromRandom=function(e,t){let n=(e=g(e,g.EMPTY_OBJECT)).red;if(!c(n)){const s=g(e.minimumRed,0),a=g(e.maximumRed,1);A.typeOf.number.lessThanOrEquals("minimumRed",s,a),n=s+O.nextRandomNumber()*(a-s)}let i=e.green;if(!c(i)){const s=g(e.minimumGreen,0),a=g(e.maximumGreen,1);A.typeOf.number.lessThanOrEquals("minimumGreen",s,a),i=s+O.nextRandomNumber()*(a-s)}let o=e.blue;if(!c(o)){const s=g(e.minimumBlue,0),a=g(e.maximumBlue,1);A.typeOf.number.lessThanOrEquals("minimumBlue",s,a),o=s+O.nextRandomNumber()*(a-s)}let r=e.alpha;if(!c(r)){const s=g(e.minimumAlpha,0),a=g(e.maximumAlpha,1);A.typeOf.number.lessThanOrEquals("minumumAlpha",s,a),r=s+O.nextRandomNumber()*(a-s)}return c(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new se(n,i,o,r)};const $le=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,Kle=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,Qle=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,Jle=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;se.fromCssColorString=function(e,t){A.typeOf.string("color",e),c(t)||(t=new se);const n=se[(e=e.trim()).toUpperCase()];if(c(n))return se.clone(n,t),t;let i=$le.exec(e);return null!==i?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(g(i[4],"f"),16)/15,t):(i=Kle.exec(e),null!==i?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(g(i[4],"ff"),16)/255,t):(i=Qle.exec(e),null!==i?(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(g(i[4],"1.0")),t):(i=Jle.exec(e),null!==i?se.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(g(i[4],"1.0")),t):t=void 0)))},se.packedLength=4,se.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t},se.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new se),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n},se.byteToFloat=function(e){return e/255},se.floatToByte=function(e){return 1===e?255:256*e|0},se.clone=function(e,t){if(c(e))return c(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new se(e.red,e.green,e.blue,e.alpha)},se.equals=function(e,t){return e===t||c(e)&&c(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},se.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]},se.prototype.clone=function(e){return se.clone(this,e)},se.prototype.equals=function(e){return se.equals(this,e)},se.prototype.equalsEpsilon=function(e,t){return this===e||c(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},se.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`},se.prototype.toCssColorString=function(){const e=se.floatToByte(this.red),t=se.floatToByte(this.green),n=se.floatToByte(this.blue);return 1===this.alpha?`rgb(${e},${t},${n})`:`rgba(${e},${t},${n},${this.alpha})`},se.prototype.toCssHexString=function(){let e=se.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=se.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let n=se.floatToByte(this.blue).toString(16);if(n.length<2&&(n=`0${n}`),this.alpha<1){let i=se.floatToByte(this.alpha).toString(16);return i.length<2&&(i=`0${i}`),`#${e}${t}${n}${i}`}return`#${e}${t}${n}`},se.prototype.toBytes=function(e){const t=se.floatToByte(this.red),n=se.floatToByte(this.green),i=se.floatToByte(this.blue),o=se.floatToByte(this.alpha);return c(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]},se.prototype.toRgba=function(){return qf[0]=se.floatToByte(this.red),qf[1]=se.floatToByte(this.green),qf[2]=se.floatToByte(this.blue),qf[3]=se.floatToByte(this.alpha),YO[0]},se.prototype.brighten=function(e,t){return A.typeOf.number("magnitude",e),A.typeOf.number.greaterThanOrEquals("magnitude",e,0),A.typeOf.object("result",t),t.red=1-(1-this.red)*(e=1-e),t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},se.prototype.darken=function(e,t){return A.typeOf.number("magnitude",e),A.typeOf.number.greaterThanOrEquals("magnitude",e,0),A.typeOf.object("result",t),t.red=this.red*(e=1-e),t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},se.prototype.withAlpha=function(e,t){return se.fromAlpha(this,e,t)},se.add=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),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},se.subtract=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),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},se.multiply=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),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},se.divide=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),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},se.mod=function(e,t,n){return A.typeOf.object("left",e),A.typeOf.object("right",t),A.typeOf.object("result",n),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},se.lerp=function(e,t,n,i){return A.typeOf.object("start",e),A.typeOf.object("end",t),A.typeOf.number("t",n),A.typeOf.object("result",i),i.red=O.lerp(e.red,t.red,n),i.green=O.lerp(e.green,t.green,n),i.blue=O.lerp(e.blue,t.blue,n),i.alpha=O.lerp(e.alpha,t.alpha,n),i},se.multiplyByScalar=function(e,t,n){return A.typeOf.object("color",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n},se.divideByScalar=function(e,t,n){return A.typeOf.object("color",e),A.typeOf.number("scalar",t),A.typeOf.object("result",n),n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n},se.ALICEBLUE=Object.freeze(se.fromCssColorString("#F0F8FF")),se.ANTIQUEWHITE=Object.freeze(se.fromCssColorString("#FAEBD7")),se.AQUA=Object.freeze(se.fromCssColorString("#00FFFF")),se.AQUAMARINE=Object.freeze(se.fromCssColorString("#7FFFD4")),se.AZURE=Object.freeze(se.fromCssColorString("#F0FFFF")),se.BEIGE=Object.freeze(se.fromCssColorString("#F5F5DC")),se.BISQUE=Object.freeze(se.fromCssColorString("#FFE4C4")),se.BLACK=Object.freeze(se.fromCssColorString("#000000")),se.BLANCHEDALMOND=Object.freeze(se.fromCssColorString("#FFEBCD")),se.BLUE=Object.freeze(se.fromCssColorString("#0000FF")),se.BLUEVIOLET=Object.freeze(se.fromCssColorString("#8A2BE2")),se.BROWN=Object.freeze(se.fromCssColorString("#A52A2A")),se.BURLYWOOD=Object.freeze(se.fromCssColorString("#DEB887")),se.CADETBLUE=Object.freeze(se.fromCssColorString("#5F9EA0")),se.CHARTREUSE=Object.freeze(se.fromCssColorString("#7FFF00")),se.CHOCOLATE=Object.freeze(se.fromCssColorString("#D2691E")),se.CORAL=Object.freeze(se.fromCssColorString("#FF7F50")),se.CORNFLOWERBLUE=Object.freeze(se.fromCssColorString("#6495ED")),se.CORNSILK=Object.freeze(se.fromCssColorString("#FFF8DC")),se.CRIMSON=Object.freeze(se.fromCssColorString("#DC143C")),se.CYAN=Object.freeze(se.fromCssColorString("#00FFFF")),se.DARKBLUE=Object.freeze(se.fromCssColorString("#00008B")),se.DARKCYAN=Object.freeze(se.fromCssColorString("#008B8B")),se.DARKGOLDENROD=Object.freeze(se.fromCssColorString("#B8860B")),se.DARKGRAY=Object.freeze(se.fromCssColorString("#A9A9A9")),se.DARKGREEN=Object.freeze(se.fromCssColorString("#006400")),se.DARKGREY=se.DARKGRAY,se.DARKKHAKI=Object.freeze(se.fromCssColorString("#BDB76B")),se.DARKMAGENTA=Object.freeze(se.fromCssColorString("#8B008B")),se.DARKOLIVEGREEN=Object.freeze(se.fromCssColorString("#556B2F")),se.DARKORANGE=Object.freeze(se.fromCssColorString("#FF8C00")),se.DARKORCHID=Object.freeze(se.fromCssColorString("#9932CC")),se.DARKRED=Object.freeze(se.fromCssColorString("#8B0000")),se.DARKSALMON=Object.freeze(se.fromCssColorString("#E9967A")),se.DARKSEAGREEN=Object.freeze(se.fromCssColorString("#8FBC8F")),se.DARKSLATEBLUE=Object.freeze(se.fromCssColorString("#483D8B")),se.DARKSLATEGRAY=Object.freeze(se.fromCssColorString("#2F4F4F")),se.DARKSLATEGREY=se.DARKSLATEGRAY,se.DARKTURQUOISE=Object.freeze(se.fromCssColorString("#00CED1")),se.DARKVIOLET=Object.freeze(se.fromCssColorString("#9400D3")),se.DEEPPINK=Object.freeze(se.fromCssColorString("#FF1493")),se.DEEPSKYBLUE=Object.freeze(se.fromCssColorString("#00BFFF")),se.DIMGRAY=Object.freeze(se.fromCssColorString("#696969")),se.DIMGREY=se.DIMGRAY,se.DODGERBLUE=Object.freeze(se.fromCssColorString("#1E90FF")),se.FIREBRICK=Object.freeze(se.fromCssColorString("#B22222")),se.FLORALWHITE=Object.freeze(se.fromCssColorString("#FFFAF0")),se.FORESTGREEN=Object.freeze(se.fromCssColorString("#228B22")),se.FUCHSIA=Object.freeze(se.fromCssColorString("#FF00FF")),se.GAINSBORO=Object.freeze(se.fromCssColorString("#DCDCDC")),se.GHOSTWHITE=Object.freeze(se.fromCssColorString("#F8F8FF")),se.GOLD=Object.freeze(se.fromCssColorString("#FFD700")),se.GOLDENROD=Object.freeze(se.fromCssColorString("#DAA520")),se.GRAY=Object.freeze(se.fromCssColorString("#808080")),se.GREEN=Object.freeze(se.fromCssColorString("#008000")),se.GREENYELLOW=Object.freeze(se.fromCssColorString("#ADFF2F")),se.GREY=se.GRAY,se.HONEYDEW=Object.freeze(se.fromCssColorString("#F0FFF0")),se.HOTPINK=Object.freeze(se.fromCssColorString("#FF69B4")),se.INDIANRED=Object.freeze(se.fromCssColorString("#CD5C5C")),se.INDIGO=Object.freeze(se.fromCssColorString("#4B0082")),se.IVORY=Object.freeze(se.fromCssColorString("#FFFFF0")),se.KHAKI=Object.freeze(se.fromCssColorString("#F0E68C")),se.LAVENDER=Object.freeze(se.fromCssColorString("#E6E6FA")),se.LAVENDAR_BLUSH=Object.freeze(se.fromCssColorString("#FFF0F5")),se.LAWNGREEN=Object.freeze(se.fromCssColorString("#7CFC00")),se.LEMONCHIFFON=Object.freeze(se.fromCssColorString("#FFFACD")),se.LIGHTBLUE=Object.freeze(se.fromCssColorString("#ADD8E6")),se.LIGHTCORAL=Object.freeze(se.fromCssColorString("#F08080")),se.LIGHTCYAN=Object.freeze(se.fromCssColorString("#E0FFFF")),se.LIGHTGOLDENRODYELLOW=Object.freeze(se.fromCssColorString("#FAFAD2")),se.LIGHTGRAY=Object.freeze(se.fromCssColorString("#D3D3D3")),se.LIGHTGREEN=Object.freeze(se.fromCssColorString("#90EE90")),se.LIGHTGREY=se.LIGHTGRAY,se.LIGHTPINK=Object.freeze(se.fromCssColorString("#FFB6C1")),se.LIGHTSEAGREEN=Object.freeze(se.fromCssColorString("#20B2AA")),se.LIGHTSKYBLUE=Object.freeze(se.fromCssColorString("#87CEFA")),se.LIGHTSLATEGRAY=Object.freeze(se.fromCssColorString("#778899")),se.LIGHTSLATEGREY=se.LIGHTSLATEGRAY,se.LIGHTSTEELBLUE=Object.freeze(se.fromCssColorString("#B0C4DE")),se.LIGHTYELLOW=Object.freeze(se.fromCssColorString("#FFFFE0")),se.LIME=Object.freeze(se.fromCssColorString("#00FF00")),se.LIMEGREEN=Object.freeze(se.fromCssColorString("#32CD32")),se.LINEN=Object.freeze(se.fromCssColorString("#FAF0E6")),se.MAGENTA=Object.freeze(se.fromCssColorString("#FF00FF")),se.MAROON=Object.freeze(se.fromCssColorString("#800000")),se.MEDIUMAQUAMARINE=Object.freeze(se.fromCssColorString("#66CDAA")),se.MEDIUMBLUE=Object.freeze(se.fromCssColorString("#0000CD")),se.MEDIUMORCHID=Object.freeze(se.fromCssColorString("#BA55D3")),se.MEDIUMPURPLE=Object.freeze(se.fromCssColorString("#9370DB")),se.MEDIUMSEAGREEN=Object.freeze(se.fromCssColorString("#3CB371")),se.MEDIUMSLATEBLUE=Object.freeze(se.fromCssColorString("#7B68EE")),se.MEDIUMSPRINGGREEN=Object.freeze(se.fromCssColorString("#00FA9A")),se.MEDIUMTURQUOISE=Object.freeze(se.fromCssColorString("#48D1CC")),se.MEDIUMVIOLETRED=Object.freeze(se.fromCssColorString("#C71585")),se.MIDNIGHTBLUE=Object.freeze(se.fromCssColorString("#191970")),se.MINTCREAM=Object.freeze(se.fromCssColorString("#F5FFFA")),se.MISTYROSE=Object.freeze(se.fromCssColorString("#FFE4E1")),se.MOCCASIN=Object.freeze(se.fromCssColorString("#FFE4B5")),se.NAVAJOWHITE=Object.freeze(se.fromCssColorString("#FFDEAD")),se.NAVY=Object.freeze(se.fromCssColorString("#000080")),se.OLDLACE=Object.freeze(se.fromCssColorString("#FDF5E6")),se.OLIVE=Object.freeze(se.fromCssColorString("#808000")),se.OLIVEDRAB=Object.freeze(se.fromCssColorString("#6B8E23")),se.ORANGE=Object.freeze(se.fromCssColorString("#FFA500")),se.ORANGERED=Object.freeze(se.fromCssColorString("#FF4500")),se.ORCHID=Object.freeze(se.fromCssColorString("#DA70D6")),se.PALEGOLDENROD=Object.freeze(se.fromCssColorString("#EEE8AA")),se.PALEGREEN=Object.freeze(se.fromCssColorString("#98FB98")),se.PALETURQUOISE=Object.freeze(se.fromCssColorString("#AFEEEE")),se.PALEVIOLETRED=Object.freeze(se.fromCssColorString("#DB7093")),se.PAPAYAWHIP=Object.freeze(se.fromCssColorString("#FFEFD5")),se.PEACHPUFF=Object.freeze(se.fromCssColorString("#FFDAB9")),se.PERU=Object.freeze(se.fromCssColorString("#CD853F")),se.PINK=Object.freeze(se.fromCssColorString("#FFC0CB")),se.PLUM=Object.freeze(se.fromCssColorString("#DDA0DD")),se.POWDERBLUE=Object.freeze(se.fromCssColorString("#B0E0E6")),se.PURPLE=Object.freeze(se.fromCssColorString("#800080")),se.RED=Object.freeze(se.fromCssColorString("#FF0000")),se.ROSYBROWN=Object.freeze(se.fromCssColorString("#BC8F8F")),se.ROYALBLUE=Object.freeze(se.fromCssColorString("#4169E1")),se.SADDLEBROWN=Object.freeze(se.fromCssColorString("#8B4513")),se.SALMON=Object.freeze(se.fromCssColorString("#FA8072")),se.SANDYBROWN=Object.freeze(se.fromCssColorString("#F4A460")),se.SEAGREEN=Object.freeze(se.fromCssColorString("#2E8B57")),se.SEASHELL=Object.freeze(se.fromCssColorString("#FFF5EE")),se.SIENNA=Object.freeze(se.fromCssColorString("#A0522D")),se.SILVER=Object.freeze(se.fromCssColorString("#C0C0C0")),se.SKYBLUE=Object.freeze(se.fromCssColorString("#87CEEB")),se.SLATEBLUE=Object.freeze(se.fromCssColorString("#6A5ACD")),se.SLATEGRAY=Object.freeze(se.fromCssColorString("#708090")),se.SLATEGREY=se.SLATEGRAY,se.SNOW=Object.freeze(se.fromCssColorString("#FFFAFA")),se.SPRINGGREEN=Object.freeze(se.fromCssColorString("#00FF7F")),se.STEELBLUE=Object.freeze(se.fromCssColorString("#4682B4")),se.TAN=Object.freeze(se.fromCssColorString("#D2B48C")),se.TEAL=Object.freeze(se.fromCssColorString("#008080")),se.THISTLE=Object.freeze(se.fromCssColorString("#D8BFD8")),se.TOMATO=Object.freeze(se.fromCssColorString("#FF6347")),se.TURQUOISE=Object.freeze(se.fromCssColorString("#40E0D0")),se.VIOLET=Object.freeze(se.fromCssColorString("#EE82EE")),se.WHEAT=Object.freeze(se.fromCssColorString("#F5DEB3")),se.WHITE=Object.freeze(se.fromCssColorString("#FFFFFF")),se.WHITESMOKE=Object.freeze(se.fromCssColorString("#F5F5F5")),se.YELLOW=Object.freeze(se.fromCssColorString("#FFFF00")),se.YELLOWGREEN=Object.freeze(se.fromCssColorString("#9ACD32")),se.TRANSPARENT=Object.freeze(new se(0,0,0,0));const Z=se,u4={};function pA(e,t){if(!c(e))throw new E("identifier is required.");c(u4[e])||(u4[e]=!0,console.warn(g(t,e)))}pA.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.",pA.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",pA.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",pA.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";const _n=pA,Ud=function eue(e,t){if(!c(e)||!c(t))throw new E("identifier and message are required.");_n(e,t)};function i0(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(i0.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}}}),i0.clone=function(e){if(c(e))return new i0(e._format,e._datatype,e._width,e._height,e._buffer)},i0.prototype.clone=function(){return i0.clone(this)};const tue=i0;function Yf(){}Yf._transcodeTaskProcessor=new ba("transcodeKTX2",Number.POSITIVE_INFINITY),Yf._readyPromise=void 0,Yf.transcode=function(e,t){return A.defined("supportedTargetFormats",t),c(Yf._readyPromise)||function nue(){const e=Yf._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return Yf._transcodeTaskProcessor;throw new Pe("KTX2 transcoder could not be initialized.")});Yf._readyPromise=e}(),Yf._readyPromise.then(function(n){let i;if(e instanceof ArrayBuffer){const 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){const i=n.length,o=Object.keys(n[0]),r=o.length;let s;for(s=0;s<i;s++){const a=n[s];for(let l=0;l<r;l++){const u=a[o[l]];a[o[l]]=new tue(u.internalFormat,u.datatype,u.width,u.height,u.levelBuffer)}}if(1===r){for(s=0;s<i;++s)n[s]=n[s][o[0]];1===i&&(n=n[0])}return n}).catch(function(n){throw n})};const iue=Yf;let d4;function f4(e){let t;return A.defined("resourceOrUrlOrBuffer",e),t=e instanceof ArrayBuffer||ArrayBuffer.isView(e)?Promise.resolve(e):zt.createIfNeeded(e).fetchArrayBuffer(),t.then(function(n){return iue.transcode(n,d4)})}f4.setKTX2SupportedFormats=function(e,t,n,i,o,r){d4={s3tc:e,pvrtc:t,astc:n,etc:i,etc1:o,bc7:r}};const o0=f4,Si={UNSIGNED_BYTE:ie.UNSIGNED_BYTE,UNSIGNED_SHORT:ie.UNSIGNED_SHORT,UNSIGNED_INT:ie.UNSIGNED_INT,FLOAT:ie.FLOAT,HALF_FLOAT:ie.HALF_FLOAT_OES,UNSIGNED_INT_24_8:ie.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:ie.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:ie.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:ie.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(e,t){switch(e){case Si.UNSIGNED_BYTE:return ie.UNSIGNED_BYTE;case Si.UNSIGNED_SHORT:return ie.UNSIGNED_SHORT;case Si.UNSIGNED_INT:return ie.UNSIGNED_INT;case Si.FLOAT:return ie.FLOAT;case Si.HALF_FLOAT:return t.webgl2?ie.HALF_FLOAT:ie.HALF_FLOAT_OES;case Si.UNSIGNED_INT_24_8:return ie.UNSIGNED_INT_24_8;case Si.UNSIGNED_SHORT_4_4_4_4:return ie.UNSIGNED_SHORT_4_4_4_4;case Si.UNSIGNED_SHORT_5_5_5_1:return ie.UNSIGNED_SHORT_5_5_5_1;case Si.UNSIGNED_SHORT_5_6_5:return Si.UNSIGNED_SHORT_5_6_5}},isPacked:function(e){return e===Si.UNSIGNED_INT_24_8||e===Si.UNSIGNED_SHORT_4_4_4_4||e===Si.UNSIGNED_SHORT_5_5_5_1||e===Si.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case Si.UNSIGNED_BYTE:return 1;case Si.UNSIGNED_SHORT:case Si.UNSIGNED_SHORT_4_4_4_4:case Si.UNSIGNED_SHORT_5_5_5_1:case Si.UNSIGNED_SHORT_5_6_5:case Si.HALF_FLOAT:return 2;case Si.UNSIGNED_INT:case Si.FLOAT:case Si.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===Si.UNSIGNED_BYTE||e===Si.UNSIGNED_SHORT||e===Si.UNSIGNED_INT||e===Si.FLOAT||e===Si.HALF_FLOAT||e===Si.UNSIGNED_INT_24_8||e===Si.UNSIGNED_SHORT_4_4_4_4||e===Si.UNSIGNED_SHORT_5_5_5_1||e===Si.UNSIGNED_SHORT_5_6_5}},yt=Object.freeze(Si),pt={DEPTH_COMPONENT:ie.DEPTH_COMPONENT,DEPTH_STENCIL:ie.DEPTH_STENCIL,ALPHA:ie.ALPHA,RED:ie.RED,RG:ie.RG,RGB:ie.RGB,RGBA:ie.RGBA,LUMINANCE:ie.LUMINANCE,LUMINANCE_ALPHA:ie.LUMINANCE_ALPHA,RGB_DXT1:ie.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:ie.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:ie.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:ie.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:ie.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:ie.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:ie.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:ie.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:ie.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:ie.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:ie.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:ie.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:ie.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case pt.RGB:return 3;case pt.RGBA:return 4;case pt.LUMINANCE_ALPHA:case pt.RG:return 2;default:return 1}},validate:function(e){return e===pt.DEPTH_COMPONENT||e===pt.DEPTH_STENCIL||e===pt.ALPHA||e===pt.RED||e===pt.RG||e===pt.RGB||e===pt.RGBA||e===pt.LUMINANCE||e===pt.LUMINANCE_ALPHA||e===pt.RGB_DXT1||e===pt.RGBA_DXT1||e===pt.RGBA_DXT3||e===pt.RGBA_DXT5||e===pt.RGB_PVRTC_4BPPV1||e===pt.RGB_PVRTC_2BPPV1||e===pt.RGBA_PVRTC_4BPPV1||e===pt.RGBA_PVRTC_2BPPV1||e===pt.RGBA_ASTC||e===pt.RGB_ETC1||e===pt.RGB8_ETC2||e===pt.RGBA8_ETC2_EAC||e===pt.RGBA_BC7},isColorFormat:function(e){return e===pt.RED||e===pt.ALPHA||e===pt.RGB||e===pt.RGBA||e===pt.LUMINANCE||e===pt.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===pt.DEPTH_COMPONENT||e===pt.DEPTH_STENCIL},isCompressedFormat:function(e){return e===pt.RGB_DXT1||e===pt.RGBA_DXT1||e===pt.RGBA_DXT3||e===pt.RGBA_DXT5||e===pt.RGB_PVRTC_4BPPV1||e===pt.RGB_PVRTC_2BPPV1||e===pt.RGBA_PVRTC_4BPPV1||e===pt.RGBA_PVRTC_2BPPV1||e===pt.RGBA_ASTC||e===pt.RGB_ETC1||e===pt.RGB8_ETC2||e===pt.RGBA8_ETC2_EAC||e===pt.RGBA_BC7},isDXTFormat:function(e){return e===pt.RGB_DXT1||e===pt.RGBA_DXT1||e===pt.RGBA_DXT3||e===pt.RGBA_DXT5},isPVRTCFormat:function(e){return e===pt.RGB_PVRTC_4BPPV1||e===pt.RGB_PVRTC_2BPPV1||e===pt.RGBA_PVRTC_4BPPV1||e===pt.RGBA_PVRTC_2BPPV1},isASTCFormat:function(e){return e===pt.RGBA_ASTC},isETC1Format:function(e){return e===pt.RGB_ETC1},isETC2Format:function(e){return e===pt.RGB8_ETC2||e===pt.RGBA8_ETC2_EAC},isBC7Format:function(e){return e===pt.RGBA_BC7},compressedTextureSizeInBytes:function(e,t,n){switch(e){case pt.RGB_DXT1:case pt.RGBA_DXT1:case pt.RGB_ETC1:case pt.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*8;case pt.RGBA_DXT3:case pt.RGBA_DXT5:case pt.RGBA_ASTC:case pt.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*16;case pt.RGB_PVRTC_4BPPV1:case pt.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(n,8)*4+7)/8);case pt.RGB_PVRTC_2BPPV1:case pt.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(n,8)*2+7)/8);case pt.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(n/4)*16;default:return 0}},textureSizeInBytes:function(e,t,n,i){let o=pt.componentsLength(e);return yt.isPacked(t)&&(o=1),o*yt.sizeInBytes(t)*n*i},alignmentInBytes:function(e,t,n){const i=pt.textureSizeInBytes(e,t,n,1)%4;return 0===i?4:2===i?2:1},createTypedArray:function(e,t,n,i){let o;const r=yt.sizeInBytes(t);return o=r===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:r===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:r===Float32Array.BYTES_PER_ELEMENT&&t===yt.FLOAT?Float32Array:Uint32Array,new o(pt.componentsLength(e)*n*i)},flipY:function(e,t,n,i,o){if(1===o)return e;const r=pt.createTypedArray(t,n,i,o),s=pt.componentsLength(t),a=i*s;for(let l=0;l<o;++l){const u=l*i*s,d=(o-l-1)*i*s;for(let h=0;h<a;++h)r[d+h]=e[u+h]}return r},toInternalFormat:function(e,t,n){if(!n.webgl2)return e;if(e===pt.DEPTH_STENCIL)return ie.DEPTH24_STENCIL8;if(e===pt.DEPTH_COMPONENT){if(t===yt.UNSIGNED_SHORT)return ie.DEPTH_COMPONENT16;if(t===yt.UNSIGNED_INT)return ie.DEPTH_COMPONENT24}if(t===yt.FLOAT)switch(e){case pt.RGBA:return ie.RGBA32F;case pt.RGB:return ie.RGB32F;case pt.RG:return ie.RG32F;case pt.RED:return ie.R32F}if(t===yt.HALF_FLOAT)switch(e){case pt.RGBA:return ie.RGBA16F;case pt.RGB:return ie.RGB16F;case pt.RG:return ie.RG16F;case pt.RED:return ie.R16F}return e}},Ct=Object.freeze(pt),kr=function oue(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},Kw={STREAM_DRAW:ie.STREAM_DRAW,STATIC_DRAW:ie.STATIC_DRAW,DYNAMIC_DRAW:ie.DYNAMIC_DRAW,validate:function(e){return e===Kw.STREAM_DRAW||e===Kw.STATIC_DRAW||e===Kw.DYNAMIC_DRAW}},At=Object.freeze(Kw);function Fl(e){if(e=g(e,g.EMPTY_OBJECT),A.defined("options.context",e.context),!c(e.typedArray)&&!c(e.sizeInBytes))throw new E("Either options.sizeInBytes or options.typedArray is required.");if(c(e.typedArray)&&c(e.sizeInBytes))throw new E("Cannot pass in both options.sizeInBytes and options.typedArray.");if(c(e.typedArray)&&(A.typeOf.object("options.typedArray",e.typedArray),A.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!At.validate(e.usage))throw new E("usage is invalid.");const t=e.context._gl,n=e.bufferTarget,i=e.typedArray;let o=e.sizeInBytes;const r=e.usage,s=c(i);s&&(o=i.byteLength),A.typeOf.number.greaterThan("sizeInBytes",o,0);const a=t.createBuffer();t.bindBuffer(n,a),t.bufferData(n,s?i:o,r),t.bindBuffer(n,null),this._id=kr(),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=r,this._buffer=a,this.vertexArrayDestroyable=!0}Fl.createVertexBuffer=function(e){return A.defined("options.context",e.context),new Fl({context:e.context,bufferTarget:ie.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},Fl.createIndexBuffer=function(e){if(A.defined("options.context",e.context),!Ot.validate(e.indexDatatype))throw new E("Invalid indexDatatype.");if(e.indexDatatype===Ot.UNSIGNED_INT&&!e.context.elementIndexUint)throw new E("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");const t=e.context,n=e.indexDatatype,i=Ot.getSizeInBytes(n),o=new Fl({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(Fl.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),Fl.prototype._getBuffer=function(){return this._buffer},Fl.prototype.copyFromArrayView=function(e,t){t=g(t,0),A.defined("arrayView",e),A.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);const n=this._gl,i=this._bufferTarget;n.bindBuffer(i,this._buffer),n.bufferSubData(i,t,e),n.bindBuffer(i,null)},Fl.prototype.copyFromBuffer=function(e,t,n,i){if(!this._webgl2)throw new E("A WebGL 2 context is required.");if(!c(e))throw new E("readBuffer must be defined.");if(!c(i)||i<=0)throw new E("sizeInBytes must be defined and be greater than zero.");if(!c(t)||t<0||t+i>e._sizeInBytes)throw new E("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!c(n)||n<0||n+i>this._sizeInBytes)throw new E("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(n>=t&&n<t+i||t>n&&t<n+i))throw new E("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===ie.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==ie.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==ie.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===ie.ELEMENT_ARRAY_BUFFER)throw new E("Can not copy an index buffer into another buffer type.");const 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)},Fl.prototype.getBufferData=function(e,t,n,i){if(t=g(t,0),n=g(n,0),!this._webgl2)throw new E("A WebGL 2 context is required.");if(!c(e))throw new E("arrayView is required.");let o,r,s=e.byteLength;if(c(i)?(o=i,c(s)?r=1:(s=e.length,r=e.BYTES_PER_ELEMENT)):c(s)?(o=s-n,r=1):(s=e.length,o=s-n,r=e.BYTES_PER_ELEMENT),n<0||n>s)throw new E("destinationOffset must be greater than zero and less than the arrayView length.");if(n+o>s)throw new E("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new E("sourceOffset must be greater than zero and less than the buffers size.");if(t+o*r>this._sizeInBytes)throw new E("sourceOffset + length must be less than the buffers size.");const a=this._gl,l=ie.COPY_READ_BUFFER;a.bindBuffer(l,this._buffer),a.getBufferSubData(l,t,e,n,i),a.bindBuffer(l,null)},Fl.prototype.isDestroyed=function(){return!1},Fl.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),Xe(this)};const yn=Fl,Ue=Object.freeze({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});function h4(e){e=g(e,g.EMPTY_OBJECT),this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.canceled=e.canceled,this.persists=g(e.persists,!1),this.pass=Ue.COMPUTE,this.owner=e.owner}h4.prototype.execute=function(e){e.execute(this)};const mA=h4,sr={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_maximumSamples:0,_highpFloatSupported:!1,_highpIntSupported:!1};Object.defineProperties(sr,{maximumCombinedTextureImageUnits:{get:function(){return sr._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return sr._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return sr._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return sr._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return sr._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return sr._maximumTextureSize}},maximumVaryingVectors:{get:function(){return sr._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return sr._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return sr._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return sr._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return sr._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return sr._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return sr._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return sr._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return sr._maximumViewportWidth}},maximumViewportHeight:{get:function(){return sr._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return sr._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return sr._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return sr._maximumColorAttachments}},maximumSamples:{get:function(){return sr._maximumSamples}},highpFloatSupported:{get:function(){return sr._highpFloatSupported}},highpIntSupported:{get:function(){return sr._highpIntSupported}}});const dn=sr;function Qw(e,t,n,i,o,r,s,a,l,u,d){this._context=e,this._texture=t,this._textureTarget=n,this._targetFace=i,this._pixelDatatype=s,this._internalFormat=o,this._pixelFormat=r,this._size=a,this._preMultiplyAlpha=l,this._flipY=u,this._initialized=d}Object.defineProperties(Qw.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}}),Qw.prototype.copyFrom=function(e){A.defined("options",e);const t=g(e.xOffset,0),n=g(e.yOffset,0);if(A.defined("options.source",e.source),A.typeOf.number.greaterThanOrEquals("xOffset",t,0),A.typeOf.number.greaterThanOrEquals("yOffset",n,0),t+e.source.width>this._size)throw new E("xOffset + options.source.width must be less than or equal to width.");if(n+e.source.height>this._size)throw new E("yOffset + options.source.height must be less than or equal to height.");const i=e.source,o=this._context._gl,r=this._textureTarget,s=this._targetFace;o.activeTexture(o.TEXTURE0),o.bindTexture(r,this._texture);const a=i.width,l=i.height;let u=i.arrayBufferView;const d=this._size,h=this._pixelFormat,m=this._internalFormat,_=this._pixelDatatype,p=this._preMultiplyAlpha,y=this._flipY,b=g(e.skipColorSpaceConversion,!1);let x=4;c(u)&&(x=Ct.alignmentInBytes(h,_,a)),o.pixelStorei(o.UNPACK_ALIGNMENT,x),o.pixelStorei(o.UNPACK_COLORSPACE_CONVERSION_WEBGL,b?o.NONE:o.BROWSER_DEFAULT_WEBGL);let C=!1;if(!this._initialized){if(0===t&&0===n&&a===d&&l===d)c(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),y&&(u=Ct.flipY(u,h,_,d,d)),o.texImage2D(s,0,m,d,d,0,h,yt.toWebGLConstant(_,this._context),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,y),o.texImage2D(s,0,m,h,yt.toWebGLConstant(_,this._context),i)),C=!0;else{o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1);const w=Ct.createTypedArray(h,_,d,d);o.texImage2D(s,0,m,d,d,0,h,yt.toWebGLConstant(_,this._context),w)}this._initialized=!0}C||(c(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),y&&(u=Ct.flipY(u,h,_,a,l)),o.texSubImage2D(s,0,t,n,a,l,h,yt.toWebGLConstant(_,this._context),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,y),o.texSubImage2D(s,0,t,n,h,yt.toWebGLConstant(_,this._context),i))),o.bindTexture(r,null)},Qw.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){if(e=g(e,0),t=g(t,0),n=g(n,0),i=g(i,0),o=g(o,this._size),r=g(r,this._size),A.typeOf.number.greaterThanOrEquals("xOffset",e,0),A.typeOf.number.greaterThanOrEquals("yOffset",t,0),A.typeOf.number.greaterThanOrEquals("framebufferXOffset",n,0),A.typeOf.number.greaterThanOrEquals("framebufferYOffset",i,0),e+o>this._size)throw new E("xOffset + source.width must be less than or equal to width.");if(t+r>this._size)throw new E("yOffset + source.height must be less than or equal to height.");if(this._pixelDatatype===yt.FLOAT)throw new E("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===yt.HALF_FLOAT)throw new E("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");const s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(this._targetFace,0,e,t,n,i,o,r),s.bindTexture(a,null),this._initialized=!0};const r0=Qw,Jw={DONT_CARE:ie.DONT_CARE,FASTEST:ie.FASTEST,NICEST:ie.NICEST,validate:function(e){return e===Jw.DONT_CARE||e===Jw.FASTEST||e===Jw.NICEST}},s0=Object.freeze(Jw),eS={NEAREST:ie.NEAREST,LINEAR:ie.LINEAR,validate:function(e){return e===eS.NEAREST||e===eS.LINEAR}},Jr=Object.freeze(eS),Ap={NEAREST:ie.NEAREST,LINEAR:ie.LINEAR,NEAREST_MIPMAP_NEAREST:ie.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:ie.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:ie.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:ie.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===Ap.NEAREST||e===Ap.LINEAR||e===Ap.NEAREST_MIPMAP_NEAREST||e===Ap.LINEAR_MIPMAP_NEAREST||e===Ap.NEAREST_MIPMAP_LINEAR||e===Ap.LINEAR_MIPMAP_LINEAR}},Kn=Object.freeze(Ap),tS={CLAMP_TO_EDGE:ie.CLAMP_TO_EDGE,REPEAT:ie.REPEAT,MIRRORED_REPEAT:ie.MIRRORED_REPEAT,validate:function(e){return e===tS.CLAMP_TO_EDGE||e===tS.REPEAT||e===tS.MIRRORED_REPEAT}},zi=Object.freeze(tS);function _A(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.wrapS,zi.CLAMP_TO_EDGE),n=g(e.wrapT,zi.CLAMP_TO_EDGE),i=g(e.minificationFilter,Kn.LINEAR),o=g(e.magnificationFilter,Jr.LINEAR),r=c(e.maximumAnisotropy)?e.maximumAnisotropy:1;if(!zi.validate(t))throw new E("Invalid sampler.wrapS.");if(!zi.validate(n))throw new E("Invalid sampler.wrapT.");if(!Kn.validate(i))throw new E("Invalid sampler.minificationFilter.");if(!Jr.validate(o))throw new E("Invalid sampler.magnificationFilter.");A.typeOf.number.greaterThanOrEquals("maximumAnisotropy",r,1),this._wrapS=t,this._wrapT=n,this._minificationFilter=i,this._magnificationFilter=o,this._maximumAnisotropy=r}Object.defineProperties(_A.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}}),_A.equals=function(e,t){return e===t||c(e)&&c(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},_A.NEAREST=Object.freeze(new _A({wrapS:zi.CLAMP_TO_EDGE,wrapT:zi.CLAMP_TO_EDGE,minificationFilter:Kn.NEAREST,magnificationFilter:Jr.NEAREST}));const vi=_A;function gA(e){e=g(e,g.EMPTY_OBJECT),A.defined("options.context",e.context);const t=e.context,n=e.source;let i,o;if(c(n)){const C=[n.positiveX,n.negativeX,n.positiveY,n.negativeY,n.positiveZ,n.negativeZ];if(!(C[0]&&C[1]&&C[2]&&C[3]&&C[4]&&C[5]))throw new E("options.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.");i=C[0].width,o=C[0].height;for(let w=1;w<6;++w)if(Number(C[w].width)!==i||Number(C[w].height)!==o)throw new E("Each face in options.source must have the same width and height.")}else i=e.width,o=e.height;const r=i,s=g(e.pixelDatatype,yt.UNSIGNED_BYTE),a=g(e.pixelFormat,Ct.RGBA),l=Ct.toInternalFormat(a,s,t);if(!c(i)||!c(o))throw new E("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(i!==o)throw new E("Width must equal height.");if(r<=0)throw new E("Width and height must be greater than zero.");if(r>dn.maximumCubeMapSize)throw new E(`Width and height must be less than or equal to the maximum cube map size (${dn.maximumCubeMapSize}). Check maximumCubeMapSize.`);if(!Ct.validate(a))throw new E("Invalid options.pixelFormat.");if(Ct.isDepthFormat(a))throw new E("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!yt.validate(s))throw new E("Invalid options.pixelDatatype.");if(s===yt.FLOAT&&!t.floatingPointTexture)throw new E("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(s===yt.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new E("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");const u=6*Ct.textureSizeInBytes(a,s,r,r),d=e.preMultiplyAlpha||a===Ct.RGB||a===Ct.LUMINANCE,h=g(e.flipY,!0),m=g(e.skipColorSpaceConversion,!1),_=t._gl,p=_.TEXTURE_CUBE_MAP,y=_.createTexture();function b(C,w,v,I,P){let N=w.arrayBufferView;c(N)||(N=w.bufferView);let R=4;c(N)&&(R=Ct.alignmentInBytes(a,s,i)),_.pixelStorei(_.UNPACK_ALIGNMENT,R),_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,P?_.NONE:_.BROWSER_DEFAULT_WEBGL),c(N)?(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,!1),I&&(N=Ct.flipY(N,a,s,r,r)),_.texImage2D(C,0,l,r,r,0,a,yt.toWebGLConstant(s,t),N)):(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,v),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,I),_.texImage2D(C,0,l,a,yt.toWebGLConstant(s,t),w))}_.activeTexture(_.TEXTURE0),_.bindTexture(p,y),c(n)?(b(_.TEXTURE_CUBE_MAP_POSITIVE_X,n.positiveX,d,h,m),b(_.TEXTURE_CUBE_MAP_NEGATIVE_X,n.negativeX,d,h,m),b(_.TEXTURE_CUBE_MAP_POSITIVE_Y,n.positiveY,d,h,m),b(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,n.negativeY,d,h,m),b(_.TEXTURE_CUBE_MAP_POSITIVE_Z,n.positiveZ,d,h,m),b(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,n.negativeZ,d,h,m)):(_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_X,0,l,r,r,0,a,yt.toWebGLConstant(s,t),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_X,0,l,r,r,0,a,yt.toWebGLConstant(s,t),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Y,0,l,r,r,0,a,yt.toWebGLConstant(s,t),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,l,r,r,0,a,yt.toWebGLConstant(s,t),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Z,0,l,r,r,0,a,yt.toWebGLConstant(s,t),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,l,r,r,0,a,yt.toWebGLConstant(s,t),null)),_.bindTexture(p,null),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p,this._texture=y,this._pixelFormat=a,this._pixelDatatype=s,this._size=r,this._hasMipmap=!1,this._sizeInBytes=u,this._preMultiplyAlpha=d,this._flipY=h,this._sampler=void 0;const x=c(n);this._positiveX=new r0(t,y,p,_.TEXTURE_CUBE_MAP_POSITIVE_X,l,a,s,r,d,h,x),this._negativeX=new r0(t,y,p,_.TEXTURE_CUBE_MAP_NEGATIVE_X,l,a,s,r,d,h,x),this._positiveY=new r0(t,y,p,_.TEXTURE_CUBE_MAP_POSITIVE_Y,l,a,s,r,d,h,x),this._negativeY=new r0(t,y,p,_.TEXTURE_CUBE_MAP_NEGATIVE_Y,l,a,s,r,d,h,x),this._positiveZ=new r0(t,y,p,_.TEXTURE_CUBE_MAP_POSITIVE_Z,l,a,s,r,d,h,x),this._negativeZ=new r0(t,y,p,_.TEXTURE_CUBE_MAP_NEGATIVE_Z,l,a,s,r,d,h,x),this.sampler=c(e.sampler)?e.sampler:new vi}Object.defineProperties(gA.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){let t=e.minificationFilter,n=e.magnificationFilter;const o=this._context,r=this._pixelDatatype;(r===yt.FLOAT&&!o.textureFloatLinear||r===yt.HALF_FLOAT&&!o.textureHalfFloatLinear)&&(t=t===Kn.NEAREST_MIPMAP_NEAREST||t===Kn.NEAREST_MIPMAP_LINEAR||t===Kn.LINEAR_MIPMAP_NEAREST||t===Kn.LINEAR_MIPMAP_LINEAR?Kn.NEAREST_MIPMAP_NEAREST:Kn.NEAREST,n=Jr.NEAREST);const s=o._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.texParameteri(a,s.TEXTURE_MIN_FILTER,t),s.texParameteri(a,s.TEXTURE_MAG_FILTER,n),s.texParameteri(a,s.TEXTURE_WRAP_S,e.wrapS),s.texParameteri(a,s.TEXTURE_WRAP_T,e.wrapT),c(this._textureFilterAnisotropic)&&s.texParameteri(a,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),s.bindTexture(a,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),gA.prototype.generateMipmap=function(e){if(e=g(e,s0.DONT_CARE),this._size>1&&!O.isPowerOfTwo(this._size))throw new E("width and height must be a power of two to call generateMipmap().");if(!s0.validate(e))throw new E("hint is invalid.");this._hasMipmap=!0;const t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)},gA.prototype.isDestroyed=function(){return!1},gA.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=Xe(this._positiveX),this._negativeX=Xe(this._negativeX),this._positiveY=Xe(this._positiveY),this._negativeY=Xe(this._negativeY),this._positiveZ=Xe(this._positiveZ),this._negativeZ=Xe(this._negativeZ),Xe(this)};const C_=gA,rue=new f;function qt(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}const Ns={};Ns[ie.FLOAT]="float",Ns[ie.FLOAT_VEC2]="vec2",Ns[ie.FLOAT_VEC3]="vec3",Ns[ie.FLOAT_VEC4]="vec4",Ns[ie.INT]="int",Ns[ie.INT_VEC2]="ivec2",Ns[ie.INT_VEC3]="ivec3",Ns[ie.INT_VEC4]="ivec4",Ns[ie.BOOL]="bool",Ns[ie.BOOL_VEC2]="bvec2",Ns[ie.BOOL_VEC3]="bvec3",Ns[ie.BOOL_VEC4]="bvec4",Ns[ie.FLOAT_MAT2]="mat2",Ns[ie.FLOAT_MAT3]="mat3",Ns[ie.FLOAT_MAT4]="mat4",Ns[ie.SAMPLER_2D]="sampler2D",Ns[ie.SAMPLER_CUBE]="samplerCube",qt.prototype.getDeclaration=function(e){let t=`uniform ${Ns[this._datatype]} ${e}`;const n=this._size;return t+=1===n?";":`[${n.toString()}];`,t};const nS={czm_viewport:new qt({size:1,datatype:ie.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new qt({size:1,datatype:ie.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new qt({size:1,datatype:ie.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new qt({size:1,datatype:ie.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new qt({size:1,datatype:ie.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new qt({size:1,datatype:ie.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new qt({size:1,datatype:ie.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new qt({size:1,datatype:ie.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new qt({size:1,datatype:ie.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new qt({size:1,datatype:ie.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.eyeHeight}}),czm_eyeHeight2D:new qt({size:1,datatype:ie.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_eyeEllipsoidNormalEC:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.eyeEllipsoidNormalEC}}),czm_eyeEllipsoidCurvature:new qt({size:1,datatype:ie.FLOAT_VEC2,getValue:function(e){return e.eyeEllipsoidCurvature}}),czm_modelToEnu:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.modelToEnu}}),czm_enuToModel:new qt({size:1,datatype:ie.FLOAT_MAT4,getValue:function(e){return e.enuToModel}}),czm_entireFrustum:new qt({size:1,datatype:ie.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new qt({size:1,datatype:ie.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new qt({size:1,datatype:ie.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return k.getTranslation(e.inverseView,rue)}}),czm_frameNumber:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new qt({size:1,datatype:ie.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new qt({size:1,datatype:ie.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new qt({size:1,datatype:ie.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new qt({size:1,datatype:ie.SAMPLER_2D,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapSize:new qt({size:1,datatype:ie.FLOAT_VEC2,getValue:function(e){return e.specularEnvironmentMapsDimensions}}),czm_specularEnvironmentMapsMaximumLOD:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new qt({size:9,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new qt({size:1,datatype:ie.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_fogDensity:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.fogDensity}}),czm_fogMinimumBrightness:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.fogMinimumBrightness}}),czm_atmosphereHsbShift:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.atmosphereHsbShift}}),czm_atmosphereLightIntensity:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.atmosphereLightIntensity}}),czm_atmosphereRayleighCoefficient:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.atmosphereRayleighCoefficient}}),czm_atmosphereRayleighScaleHeight:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.atmosphereRayleighScaleHeight}}),czm_atmosphereMieCoefficient:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.atmosphereMieCoefficient}}),czm_atmosphereMieScaleHeight:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.atmosphereMieScaleHeight}}),czm_atmosphereMieAnisotropy:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.atmosphereMieAnisotropy}}),czm_atmosphereDynamicLighting:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.atmosphereDynamicLighting}}),czm_splitPosition:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.splitPosition}}),czm_geometricToleranceOverMeter:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new qt({size:1,datatype:ie.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new qt({size:1,datatype:ie.FLOAT,getValue:function(e){return e.gamma}}),czm_ellipsoidRadii:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.radii}}),czm_ellipsoidInverseRadii:new qt({size:1,datatype:ie.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.oneOverRadii}})};function p4(e,t,n,i){this.name=n,this.value=void 0,this._value=0,this._gl=e,this._location=i}function m4(e,t,n,i){this.name=n,this.value=void 0,this._value=new V,this._gl=e,this._location=i}function _4(e,t,n,i){this.name=n,this.value=void 0,this._value=void 0,this._gl=e,this._location=i}function g4(e,t,n,i){this.name=n,this.value=void 0,this._value=void 0,this._gl=e,this._location=i}function XO(e,t,n,i){this.name=n,this.value=void 0,this._gl=e,this._location=i,this.textureUnitIndex=void 0}function y4(e,t,n,i){this.name=n,this.value=void 0,this._value=0,this._gl=e,this._location=i}function b4(e,t,n,i){this.name=n,this.value=void 0,this._value=new V,this._gl=e,this._location=i}function T4(e,t,n,i){this.name=n,this.value=void 0,this._value=new f,this._gl=e,this._location=i}function A4(e,t,n,i){this.name=n,this.value=void 0,this._value=new de,this._gl=e,this._location=i}p4.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},m4.prototype.set=function(){const e=this.value;V.equals(e,this._value)||(V.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))},_4.prototype.set=function(){const e=this.value;if(c(e.red))Z.equals(e,this._value)||(this._value=Z.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue));else{if(!c(e.x))throw new E(`Invalid vec3 value for uniform "${this.name}".`);f.equals(e,this._value)||(this._value=f.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z))}},g4.prototype.set=function(){const e=this.value;if(c(e.red))Z.equals(e,this._value)||(this._value=Z.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha));else{if(!c(e.x))throw new E(`Invalid vec4 value for uniform "${this.name}".`);de.equals(e,this._value)||(this._value=de.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w))}},XO.prototype.set=function(){const e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);const t=this.value;e.bindTexture(t._target,t._texture)},XO.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},y4.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},b4.prototype.set=function(){const e=this.value;V.equals(e,this._value)||(V.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))},T4.prototype.set=function(){const e=this.value;f.equals(e,this._value)||(f.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},A4.prototype.set=function(){const e=this.value;de.equals(e,this._value)||(de.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};const aue=new Float32Array(4);function x4(e,t,n,i){this.name=n,this.value=void 0,this._value=new Kr,this._gl=e,this._location=i}x4.prototype.set=function(){if(!Kr.equalsArray(this.value,this._value,0)){Kr.clone(this.value,this._value);const e=Kr.toArray(this.value,aue);this._gl.uniformMatrix2fv(this._location,!1,e)}};const cue=new Float32Array(9);function C4(e,t,n,i){this.name=n,this.value=void 0,this._value=new oe,this._gl=e,this._location=i}C4.prototype.set=function(){if(!oe.equalsArray(this.value,this._value,0)){oe.clone(this.value,this._value);const e=oe.toArray(this.value,cue);this._gl.uniformMatrix3fv(this._location,!1,e)}};const lue=new Float32Array(16);function E4(e,t,n,i){this.name=n,this.value=void 0,this._value=new k,this._gl=e,this._location=i}E4.prototype.set=function(){if(!k.equalsArray(this.value,this._value,0)){k.clone(this.value,this._value);const e=k.toArray(this.value,lue);this._gl.uniformMatrix4fv(this._location,!1,e)}};const uue=function sue(e,t,n,i){switch(t.type){case e.FLOAT:return new p4(e,t,n,i);case e.FLOAT_VEC2:return new m4(e,t,n,i);case e.FLOAT_VEC3:return new _4(e,t,n,i);case e.FLOAT_VEC4:return new g4(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new XO(e,t,n,i);case e.INT:case e.BOOL:return new y4(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new b4(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new T4(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new A4(e,t,n,i);case e.FLOAT_MAT2:return new x4(e,t,n,i);case e.FLOAT_MAT3:return new C4(e,t,n,i);case e.FLOAT_MAT4:return new E4(e,t,n,i);default:throw new Pe(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}};function w4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o),this._gl=e,this._location=i[0]}function S4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(2*o),this._gl=e,this._location=i[0]}function v4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(3*o),this._gl=e,this._location=i[0]}function I4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(4*o),this._gl=e,this._location=i[0]}function ZO(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o),this._gl=e,this._locations=i,this.textureUnitIndex=void 0}function D4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o),this._gl=e,this._location=i[0]}function P4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(2*o),this._gl=e,this._location=i[0]}function O4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(3*o),this._gl=e,this._location=i[0]}function R4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(4*o),this._gl=e,this._location=i[0]}function L4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(4*o),this._gl=e,this._location=i[0]}function N4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(9*o),this._gl=e,this._location=i[0]}function M4(e,t,n,i){const o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(16*o),this._gl=e,this._location=i[0]}w4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1;for(let o=0;o<t;++o){const r=e[o];r!==n[o]&&(n[o]=r,i=!0)}i&&this._gl.uniform1fv(this._location,n)},S4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1,o=0;for(let r=0;r<t;++r){const s=e[r];V.equalsArray(s,n,o)||(V.pack(s,n,o),i=!0),o+=2}i&&this._gl.uniform2fv(this._location,n)},v4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1,o=0;for(let r=0;r<t;++r){const s=e[r];if(c(s.red))(s.red!==n[o]||s.green!==n[o+1]||s.blue!==n[o+2])&&(n[o]=s.red,n[o+1]=s.green,n[o+2]=s.blue,i=!0);else{if(!c(s.x))throw new E("Invalid vec3 value.");f.equalsArray(s,n,o)||(f.pack(s,n,o),i=!0)}o+=3}i&&this._gl.uniform3fv(this._location,n)},I4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1,o=0;for(let r=0;r<t;++r){const s=e[r];if(c(s.red))Z.equalsArray(s,n,o)||(Z.pack(s,n,o),i=!0);else{if(!c(s.x))throw new E("Invalid vec4 value.");de.equalsArray(s,n,o)||(de.pack(s,n,o),i=!0)}o+=4}i&&this._gl.uniform4fv(this._location,n)},ZO.prototype.set=function(){const e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,n=this.value,i=n.length;for(let o=0;o<i;++o){const r=n[o];e.activeTexture(t+o),e.bindTexture(r._target,r._texture)}},ZO.prototype._setSampler=function(e){this.textureUnitIndex=e;const t=this._locations,n=t.length;for(let i=0;i<n;++i)this._gl.uniform1i(t[i],e+i);return e+n},D4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1;for(let o=0;o<t;++o){const r=e[o];r!==n[o]&&(n[o]=r,i=!0)}i&&this._gl.uniform1iv(this._location,n)},P4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1,o=0;for(let r=0;r<t;++r){const s=e[r];V.equalsArray(s,n,o)||(V.pack(s,n,o),i=!0),o+=2}i&&this._gl.uniform2iv(this._location,n)},O4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1,o=0;for(let r=0;r<t;++r){const s=e[r];f.equalsArray(s,n,o)||(f.pack(s,n,o),i=!0),o+=3}i&&this._gl.uniform3iv(this._location,n)},R4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1,o=0;for(let r=0;r<t;++r){const s=e[r];de.equalsArray(s,n,o)||(de.pack(s,n,o),i=!0),o+=4}i&&this._gl.uniform4iv(this._location,n)},L4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1,o=0;for(let r=0;r<t;++r){const s=e[r];Kr.equalsArray(s,n,o)||(Kr.pack(s,n,o),i=!0),o+=4}i&&this._gl.uniformMatrix2fv(this._location,!1,n)},N4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1,o=0;for(let r=0;r<t;++r){const s=e[r];oe.equalsArray(s,n,o)||(oe.pack(s,n,o),i=!0),o+=9}i&&this._gl.uniformMatrix3fv(this._location,!1,n)},M4.prototype.set=function(){const e=this.value,t=e.length,n=this._value;let i=!1,o=0;for(let r=0;r<t;++r){const s=e[r];k.equalsArray(s,n,o)||(k.pack(s,n,o),i=!0),o+=16}i&&this._gl.uniformMatrix4fv(this._location,!1,n)};const fue=function due(e,t,n,i){switch(t.type){case e.FLOAT:return new w4(e,t,n,i);case e.FLOAT_VEC2:return new S4(e,t,n,i);case e.FLOAT_VEC3:return new v4(e,t,n,i);case e.FLOAT_VEC4:return new I4(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new ZO(e,t,n,i);case e.INT:case e.BOOL:return new D4(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new P4(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new O4(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new R4(e,t,n,i);case e.FLOAT_MAT2:return new L4(e,t,n,i);case e.FLOAT_MAT3:return new N4(e,t,n,i);case e.FLOAT_MAT4:return new M4(e,t,n,i);default:throw new Pe(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}};let hue=0;function Xf(e){let t=e.vertexShaderText,n=e.fragmentShaderText;typeof spector<"u"&&(t=t.replace(/^#line/gm,"//#line"),n=n.replace(/^#line/gm,"//#line"));const i=function pue(e,t){const n={};if(!dn.highpFloatSupported||!dn.highpIntSupported){let i,o,r,s;const a=F4(e),l=F4(t),u=a.length,d=l.length;for(i=0;i<u;i++)for(o=0;o<d;o++)if(a[i]===l[o]){r=a[i],s=`czm_mediump_${r}`;const h=new RegExp(`${r}\\b`,"g");t=t.replace(h,s),n[s]=r}}return{fragmentShaderText:t,duplicateUniformNames:n}}(t,n);this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=i.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=i.fragmentShaderText,this.id=hue++}function F4(e){const t=[],n=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(c(n)){const i=n.length;for(let o=0;o<i;o++){const r=n[o].trim(),s=r.slice(r.lastIndexOf(" ")+1);t.push(s)}}return t}Xf.fromCache=function(e){return e=g(e,g.EMPTY_OBJECT),A.defined("options.context",e.context),e.context.shaderCache.getShaderProgram(e)},Xf.replaceCache=function(e){return e=g(e,g.EMPTY_OBJECT),A.defined("options.context",e.context),e.context.shaderCache.replaceShaderProgram(e)},Object.defineProperties(Xf.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return iS(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return iS(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return iS(this),this._uniformsByName}}});const zd="[Cesium WebGL] ";function iS(e){c(e._program)||B4(e)}function B4(e){const t=e._program,n=e._gl,i=function mue(e,t){const n=t._vertexShaderText,i=t._fragmentShaderText,o=e.createShader(e.VERTEX_SHADER);e.shaderSource(o,n),e.compileShader(o);const r=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(r,i),e.compileShader(r);const s=e.createProgram();e.attachShader(s,o),e.attachShader(s,r);const a=t._attributeLocations;if(c(a))for(const m in a)a.hasOwnProperty(m)&&e.bindAttribLocation(s,a[m],m);let l,u;if(e.linkProgram(s),e.getProgramParameter(s,e.LINK_STATUS))return t._logShaderCompilation&&(l=e.getShaderInfoLog(o),c(l)&&l.length>0&&console.log(`${zd}Vertex shader compile log: ${l}`),l=e.getShaderInfoLog(r),c(l)&&l.length>0&&console.log(`${zd}Fragment shader compile log: ${l}`),l=e.getProgramInfoLog(s),c(l)&&l.length>0&&console.log(`${zd}Shader program link log: ${l}`)),e.deleteShader(o),e.deleteShader(r),s;const d=t._debugShaders;throw e.getShaderParameter(r,e.COMPILE_STATUS)?e.getShaderParameter(o,e.COMPILE_STATUS)?(l=e.getProgramInfoLog(s),console.error(`${zd}Shader program link log: ${l}`),h(o,"vertex"),h(r,"fragment"),u=`Program failed to link. Link log: ${l}`):(l=e.getShaderInfoLog(o),console.error(`${zd}Vertex shader compile log: ${l}`),console.error(`${zd} Vertex shader source:\n${n}`),u=`Vertex shader failed to compile. Compile log: ${l}`):(l=e.getShaderInfoLog(r),console.error(`${zd}Fragment shader compile log: ${l}`),console.error(`${zd} Fragment shader source:\n${i}`),u=`Fragment shader failed to compile. Compile log: ${l}`),e.deleteShader(o),e.deleteShader(r),e.deleteProgram(s),new Pe(u);function h(m,_){if(!c(d))return;const p=d.getTranslatedShaderSource(m);""!==p?console.error(`${zd}Translated ${_} shaderSource:\n${p}`):console.error(`${zd}${_} shader translation failed.`)}}(n,e),o=n.getProgramParameter(i,n.ACTIVE_ATTRIBUTES),r=function gue(e,t){const n={},i=[],o=[],r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let s=0;s<r;++s){const a=e.getActiveUniform(t,s),l="[0]",u=-1!==a.name.indexOf(l,a.name.length-l.length)?a.name.slice(0,a.name.length-3):a.name;if(0!==u.indexOf("gl_"))if(a.name.indexOf("[")<0){const d=e.getUniformLocation(t,u);if(null!==d){const h=uue(e,a,u,d);n[u]=h,i.push(h),h._setSampler&&o.push(h)}}else{let d,h,m,_;const p=u.indexOf("[");if(p>=0){if(d=n[u.slice(0,p)],!c(d))continue;h=d._locations,h.length<=1&&(m=d.value,_=e.getUniformLocation(t,u),null!==_&&(h.push(_),m.push(e.getUniform(t,_))))}else{h=[];for(let y=0;y<a.size;++y)_=e.getUniformLocation(t,`${u}[${y}]`),null!==_&&h.push(_);d=fue(e,a,u,h),n[u]=d,i.push(d),d._setSampler&&o.push(d)}}}return{uniformsByName:n,uniforms:i,samplerUniforms:o}}(n,i),s=function yue(e,t){const n=[],i=[];for(const o in t)if(t.hasOwnProperty(o)){const r=t[o];let s=o;const a=e._duplicateUniformNames[s];c(a)&&(r.name=a,s=a);const l=nS[s];c(l)?n.push({uniform:r,automaticUniform:l}):i.push(r)}return{automaticUniforms:n,manualUniforms:i}}(e,r.uniformsByName);e._program=i,e._numberOfVertexAttributes=o,e._vertexAttributes=function _ue(e,t,n){const i={};for(let o=0;o<n;++o){const r=e.getActiveAttrib(t,o),s=e.getAttribLocation(t,r.name);i[r.name]={name:r.name,type:r.type,index:s}}return i}(n,i,o),e._uniformsByName=r.uniformsByName,e._uniforms=r.uniforms,e._automaticUniforms=s.automaticUniforms,e._manualUniforms=s.manualUniforms,e.maximumTextureUnitIndex=function bue(e,t,n){e.useProgram(t);let i=0;const o=n.length;for(let r=0;r<o;++r)i=n[r]._setSampler(i);return e.useProgram(null),i}(n,i,r.samplerUniforms),t&&e._gl.deleteProgram(t),typeof spector<"u"&&(e._program.__SPECTOR_rebuildProgram=function(a,l,u,d){const h=e._vertexShaderText,m=e._fragmentShaderText,_=/ ! = /g;e._vertexShaderText=a.replace(_," != "),e._fragmentShaderText=l.replace(_," != ");try{B4(e),u(e._program)}catch(p){e._vertexShaderText=h,e._fragmentShaderText=m;const b=/(?:Compile|Link) error: ([^]*)/.exec(p.message);d(b?b[1]:p.message)}})}Xf.prototype._bind=function(){iS(this),this._gl.useProgram(this._program)},Xf.prototype._setUniforms=function(e,t,n){let i,o;if(c(e)){const a=this._manualUniforms;for(i=a.length,o=0;o<i;++o){const l=a[o];l.value=e[l.name]()}}const r=this._automaticUniforms;for(i=r.length,o=0;o<i;++o){const a=r[o];a.uniform.value=a.automaticUniform.getValue(t)}const s=this._uniforms;for(i=s.length,o=0;o<i;++o)s[o].set();if(n){const a=this._gl,l=this._program;if(a.validateProgram(l),!a.getProgramParameter(l,a.VALIDATE_STATUS))throw new E(`Program validation failed. Program info log: ${a.getProgramInfoLog(l)}`)}},Xf.prototype.isDestroyed=function(){return!1},Xf.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},Xf.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),Xe(this)};const di=Xf,$O={czm_degreesPerRadian:"/**\n * A built-in GLSL floating-point constant for converting radians to degrees.\n *\n * @alias czm_degreesPerRadian\n * @glslConstant\n *\n * @see CesiumMath.DEGREES_PER_RADIAN\n *\n * @example\n * // GLSL declaration\n * const float czm_degreesPerRadian = ...;\n *\n * // Example\n * float deg = czm_degreesPerRadian * rad;\n */\nconst float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange:"/**\n * A built-in GLSL vec2 constant for defining the depth range.\n * This is a workaround to a bug where IE11 does not implement gl_DepthRange.\n *\n * @alias czm_depthRange\n * @glslConstant\n *\n * @example\n * // GLSL declaration\n * float depthRangeNear = czm_depthRange.near;\n * float depthRangeFar = czm_depthRange.far;\n *\n */\nconst czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_epsilon1:"/**\n * 0.1\n *\n * @name czm_epsilon1\n * @glslConstant\n */\nconst float czm_epsilon1 = 0.1;\n",czm_epsilon2:"/**\n * 0.01\n *\n * @name czm_epsilon2\n * @glslConstant\n */\nconst float czm_epsilon2 = 0.01;\n",czm_epsilon3:"/**\n * 0.001\n *\n * @name czm_epsilon3\n * @glslConstant\n */\nconst float czm_epsilon3 = 0.001;\n",czm_epsilon4:"/**\n * 0.0001\n *\n * @name czm_epsilon4\n * @glslConstant\n */\nconst float czm_epsilon4 = 0.0001;\n",czm_epsilon5:"/**\n * 0.00001\n *\n * @name czm_epsilon5\n * @glslConstant\n */\nconst float czm_epsilon5 = 0.00001;\n",czm_epsilon6:"/**\n * 0.000001\n *\n * @name czm_epsilon6\n * @glslConstant\n */\nconst float czm_epsilon6 = 0.000001;\n",czm_epsilon7:"/**\n * 0.0000001\n *\n * @name czm_epsilon7\n * @glslConstant\n */\nconst float czm_epsilon7 = 0.0000001;\n",czm_infinity:"/**\n * DOC_TBA\n *\n * @name czm_infinity\n * @glslConstant\n */\nconst float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?\n",czm_oneOverPi:"/**\n * A built-in GLSL floating-point constant for <code>1/pi</code>.\n *\n * @alias czm_oneOverPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverPi = ...;\n *\n * // Example\n * float pi = 1.0 / czm_oneOverPi;\n */\nconst float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi:"/**\n * A built-in GLSL floating-point constant for <code>1/2pi</code>.\n *\n * @alias czm_oneOverTwoPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverTwoPi = ...;\n *\n * // Example\n * float pi = 2.0 * czm_oneOverTwoPi;\n */\nconst float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile:"/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}\n *\n * @name czm_passCesium3DTile\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification:"/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}\n *\n * @name czm_passCesium3DTileClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow:"/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}\n *\n * @name czm_passCesium3DTileClassificationIgnoreShow\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification:"/**\n * The automatic GLSL constant for {@link Pass#CLASSIFICATION}\n *\n * @name czm_passClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passClassification = 7.0;\n",czm_passCompute:"/**\n * The automatic GLSL constant for {@link Pass#COMPUTE}\n *\n * @name czm_passCompute\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCompute = 1.0;\n",czm_passEnvironment:"/**\n * The automatic GLSL constant for {@link Pass#ENVIRONMENT}\n *\n * @name czm_passEnvironment\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passEnvironment = 0.0;\n",czm_passGlobe:"/**\n * The automatic GLSL constant for {@link Pass#GLOBE}\n *\n * @name czm_passGlobe\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGlobe = 2.0;\n",czm_passOpaque:"/**\n * The automatic GLSL constant for {@link Pass#OPAQUE}\n *\n * @name czm_passOpaque\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOpaque = 7.0;\n",czm_passOverlay:"/**\n * The automatic GLSL constant for {@link Pass#OVERLAY}\n *\n * @name czm_passOverlay\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOverlay = 10.0;\n",czm_passTerrainClassification:"/**\n * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}\n *\n * @name czm_passTerrainClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent:"/**\n * The automatic GLSL constant for {@link Pass#TRANSLUCENT}\n *\n * @name czm_passTranslucent\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTranslucent = 8.0;\n",czm_passVoxels:"/**\n * The automatic GLSL constant for {@link Pass#VOXELS}\n *\n * @name czm_passVoxels\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passVoxels = 9.0;\n",czm_pi:"/**\n * A built-in GLSL floating-point constant for <code>Math.PI</code>.\n *\n * @alias czm_pi\n * @glslConstant\n *\n * @see CesiumMath.PI\n *\n * @example\n * // GLSL declaration\n * const float czm_pi = ...;\n *\n * // Example\n * float twoPi = 2.0 * czm_pi;\n */\nconst float czm_pi = 3.141592653589793;\n",czm_piOverFour:"/**\n * A built-in GLSL floating-point constant for <code>pi/4</code>.\n *\n * @alias czm_piOverFour\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_FOUR\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverFour = ...;\n *\n * // Example\n * float pi = 4.0 * czm_piOverFour;\n */\nconst float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix:"/**\n * A built-in GLSL floating-point constant for <code>pi/6</code>.\n *\n * @alias czm_piOverSix\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_SIX\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverSix = ...;\n *\n * // Example\n * float pi = 6.0 * czm_piOverSix;\n */\nconst float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree:"/**\n * A built-in GLSL floating-point constant for <code>pi/3</code>.\n *\n * @alias czm_piOverThree\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_THREE\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverThree = ...;\n *\n * // Example\n * float pi = 3.0 * czm_piOverThree;\n */\nconst float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo:"/**\n * A built-in GLSL floating-point constant for <code>pi/2</code>.\n *\n * @alias czm_piOverTwo\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverTwo = ...;\n *\n * // Example\n * float pi = 2.0 * czm_piOverTwo;\n */\nconst float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree:"/**\n * A built-in GLSL floating-point constant for converting degrees to radians.\n *\n * @alias czm_radiansPerDegree\n * @glslConstant\n *\n * @see CesiumMath.RADIANS_PER_DEGREE\n *\n * @example\n * // GLSL declaration\n * const float czm_radiansPerDegree = ...;\n *\n * // Example\n * float rad = czm_radiansPerDegree * deg;\n */\nconst float czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D:"/**\n * The constant identifier for the 2D {@link SceneMode}\n *\n * @name czm_sceneMode2D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D:"/**\n * The constant identifier for the 3D {@link SceneMode}\n *\n * @name czm_sceneMode3D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView:"/**\n * The constant identifier for the Columbus View {@link SceneMode}\n *\n * @name czm_sceneModeColumbusView\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing:"/**\n * The constant identifier for the Morphing {@link SceneMode}\n *\n * @name czm_sceneModeMorphing\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n */\nconst float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius:"/**\n * A built-in GLSL floating-point constant for one solar radius.\n *\n * @alias czm_solarRadius\n * @glslConstant\n *\n * @see CesiumMath.SOLAR_RADIUS\n *\n * @example\n * // GLSL declaration\n * const float czm_solarRadius = ...;\n */\nconst float czm_solarRadius = 695500000.0;\n",czm_threePiOver2:"/**\n * A built-in GLSL floating-point constant for <code>3pi/2</code>.\n *\n * @alias czm_threePiOver2\n * @glslConstant\n *\n * @see CesiumMath.THREE_PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_threePiOver2 = ...;\n *\n * // Example\n * float pi = (2.0 / 3.0) * czm_threePiOver2;\n */\nconst float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi:"/**\n * A built-in GLSL floating-point constant for <code>2pi</code>.\n *\n * @alias czm_twoPi\n * @glslConstant\n *\n * @see CesiumMath.TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_twoPi = ...;\n *\n * // Example\n * float pi = czm_twoPi / 2.0;\n */\nconst float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude:"/**\n * The maximum latitude, in radians, both North and South, supported by a Web Mercator\n * (EPSG:3857) projection. Technically, the Mercator projection is defined\n * for any latitude up to (but not including) 90 degrees, but it makes sense\n * to cut it off sooner because it grows exponentially with increasing latitude.\n * The logic behind this particular cutoff value, which is the one used by\n * Google Maps, Bing Maps, and Esri, is that it makes the projection\n * square. That is, the rectangle is equal in the X and Y directions.\n *\n * The constant value is computed as follows:\n * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))\n *\n * @name czm_webMercatorMaxLatitude\n * @glslConstant\n */\nconst float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct:"/**\n * @name czm_depthRangeStruct\n * @glslStruct\n */\nstruct czm_depthRangeStruct\n{\n float near;\n float far;\n};\n",czm_material:"/**\n * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} specular Intensity of incoming light reflecting in a single direction.\n * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n */\nstruct czm_material\n{\n vec3 diffuse;\n float specular;\n float shininess;\n vec3 normal;\n vec3 emission;\n float alpha;\n};\n",czm_materialInput:"/**\n * Used as input to every material's czm_getMaterial function.\n *\n * @name czm_materialInput\n * @glslStruct\n *\n * @property {float} s 1D texture coordinates.\n * @property {vec2} st 2D texture coordinates.\n * @property {vec3} str 3D texture coordinates.\n * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.\n * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.\n * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.\n * @property {float} height The height of the terrain in meters above or below the ellipsoid. Only available for globe materials.\n * @property {float} slope The slope of the terrain in radians. 0 is flat; pi/2 is vertical. Only available for globe materials.\n * @property {float} aspect The aspect of the terrain in radians. 0 is East, pi/2 is North, pi is West, 3pi/2 is South. Only available for globe materials.\n */\nstruct czm_materialInput\n{\n float s;\n vec2 st;\n vec3 str;\n vec3 normalEC;\n mat3 tangentToEyeMatrix;\n vec3 positionToEyeEC;\n float height;\n float slope;\n float aspect;\n};\n",czm_modelMaterial:"/**\n * Struct for representing a material for a {@link Model}. The model\n * rendering pipeline will pass this struct between material, custom shaders,\n * and lighting stages. This is not to be confused with {@link czm_material}\n * which is used by the older Fabric materials system, although they are similar.\n * <p>\n * All color values (diffuse, specular, emissive) are in linear color space.\n * </p>\n *\n * @name czm_modelMaterial\n * @glslStruct\n *\n * @property {vec4} baseColor The base color of the material.\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.\n * @property {float} roughness A number from 0.0 to 1.0 representing how rough the surface is. Values near 0.0 produce glossy surfaces, while values near 1.0 produce rough surfaces.\n * @property {vec3} normalEC Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.\n * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n */\nstruct czm_modelMaterial {\n vec4 baseColor;\n vec3 diffuse;\n float alpha;\n vec3 specular;\n float roughness;\n vec3 normalEC;\n float occlusion;\n vec3 emissive;\n#ifdef USE_SPECULAR\n float specularWeight;\n#endif\n#ifdef USE_ANISOTROPY\n vec3 anisotropicT;\n vec3 anisotropicB;\n float anisotropyStrength;\n#endif\n#ifdef USE_CLEARCOAT\n float clearcoatFactor;\n float clearcoatRoughness;\n vec3 clearcoatNormal;\n // Add clearcoatF0 when KHR_materials_ior is implemented\n#endif\n};\n",czm_modelVertexOutput:"/**\n * Struct for representing the output of a custom vertex shader.\n * \n * @name czm_modelVertexOutput\n * @glslStruct\n *\n * @see {@link CustomShader}\n * @see {@link Model}\n *\n * @property {vec3} positionMC The position of the vertex in model coordinates\n * @property {float} pointSize A custom value for gl_PointSize. This is only used for point primitives. \n */\nstruct czm_modelVertexOutput {\n vec3 positionMC;\n float pointSize;\n};\n",czm_ray:"/**\n * DOC_TBA\n *\n * @name czm_ray\n * @glslStruct\n */\nstruct czm_ray\n{\n vec3 origin;\n vec3 direction;\n};\n",czm_raySegment:"/**\n * DOC_TBA\n *\n * @name czm_raySegment\n * @glslStruct\n */\nstruct czm_raySegment\n{\n float start;\n float stop;\n};\n\n/**\n * DOC_TBA\n *\n * @name czm_emptyRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\n\n/**\n * DOC_TBA\n *\n * @name czm_fullRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_shadowParameters:"struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\n vec3 texCoords;\n#else\n vec2 texCoords;\n#endif\n\n float depthBias;\n float depth;\n float nDotL;\n vec2 texelStepSize;\n float normalShadingSmooth;\n float darkness;\n};\n",czm_HSBToRGB:"/**\n * Converts an HSB color (hue, saturation, brightness) to RGB\n * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}\n *\n * @name czm_HSBToRGB\n * @glslFunction\n * \n * @param {vec3} hsb The color in HSB.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsb = czm_RGBToHSB(rgb);\n * hsb.z *= 0.1;\n * rgb = czm_HSBToRGB(hsb);\n */\n\nconst vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n\nvec3 czm_HSBToRGB(vec3 hsb)\n{\n vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n}\n",czm_HSLToRGB:"/**\n * Converts an HSL color (hue, saturation, lightness) to RGB\n * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n *\n * @name czm_HSLToRGB\n * @glslFunction\n * \n * @param {vec3} rgb The color in HSL.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n\nvec3 hueToRGB(float hue)\n{\n float r = abs(hue * 6.0 - 3.0) - 1.0;\n float g = 2.0 - abs(hue * 6.0 - 2.0);\n float b = 2.0 - abs(hue * 6.0 - 4.0);\n return clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 czm_HSLToRGB(vec3 hsl)\n{\n vec3 rgb = hueToRGB(hsl.x);\n float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\n return (rgb - 0.5) * c + hsl.z;\n}\n",czm_RGBToHSB:"/**\n * Converts an RGB color to HSB (hue, saturation, brightness)\n * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}\n *\n * @name czm_RGBToHSB\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in HSB.\n *\n * @example\n * vec3 hsb = czm_RGBToHSB(rgb);\n * hsb.z *= 0.1;\n * rgb = czm_HSBToRGB(hsb);\n */\n\nconst vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\nvec3 czm_RGBToHSB(vec3 rgb)\n{\n vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\n vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n float d = q.x - min(q.w, q.y);\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL:"/**\n * Converts an RGB color to HSL (hue, saturation, lightness)\n * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n *\n * @name czm_RGBToHSL\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in HSL.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n \nvec3 RGBtoHCV(vec3 rgb)\n{\n // Based on work by Sam Hocevar and Emil Persson\n vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\n vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\n float c = q.x - min(q.w, q.y);\n float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\n return vec3(h, c, q.x);\n}\n\nvec3 czm_RGBToHSL(vec3 rgb)\n{\n vec3 hcv = RGBtoHCV(rgb);\n float l = hcv.z - hcv.y * 0.5;\n float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\n return vec3(hcv.x, s, l);\n}\n",czm_RGBToXYZ:"/**\n * Converts an RGB color to CIE Yxy.\n * <p>The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n * </p>\n * \n * @name czm_RGBToXYZ\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in CIE Yxy.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_RGBToXYZ(vec3 rgb)\n{\n const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n 0.3576, 0.7152, 0.1192,\n 0.1805, 0.0722, 0.9505);\n vec3 xyz = RGB2XYZ * rgb;\n vec3 Yxy;\n Yxy.r = xyz.g;\n float temp = dot(vec3(1.0), xyz);\n Yxy.gb = xyz.rg / temp;\n return Yxy;\n}\n",czm_XYZToRGB:"/**\n * Converts a CIE Yxy color to RGB.\n * <p>The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n * </p>\n * \n * @name czm_XYZToRGB\n * @glslFunction\n * \n * @param {vec3} Yxy The color in CIE Yxy.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_XYZToRGB(vec3 Yxy)\n{\n const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n -1.5371, 1.8760, -0.2040,\n -0.4985, 0.0416, 1.0572);\n vec3 xyz;\n xyz.r = Yxy.r * Yxy.g / Yxy.b;\n xyz.g = Yxy.r;\n xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n \n return XYZ2RGB * xyz;\n}\n",czm_acesTonemapping:"// See:\n// https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/\n\nvec3 czm_acesTonemapping(vec3 color) {\n float g = 0.985;\n float a = 0.065;\n float b = 0.0001;\n float c = 0.433;\n float d = 0.238;\n\n color = (color * (color + a) - b) / (color * (g * color + c) + d);\n\n color = clamp(color, 0.0, 1.0);\n\n return color;\n}\n",czm_alphaWeight:"/**\n * @private\n */\nfloat czm_alphaWeight(float a)\n{\n float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n\n // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n // http://jcgt.org/published/0002/02/09/\n return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias:"/**\n * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.\n *\n * @name czm_antialias\n * @glslFunction\n *\n * @param {vec4} color1 The color on one side of the edge.\n * @param {vec4} color2 The color on the other side of the edge.\n * @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.\n * @param {float} dist The distance to the edge in texture coordinates.\n * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.\n * @returns {vec4} The anti-aliased color.\n *\n * @example\n * // GLSL declarations\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);\n *\n * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space\n * float dist = abs(textureCoordinates.t - 0.5);\n * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));\n * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);\n */\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\n float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\n float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\n val1 = val1 * (1.0 - val2);\n val1 = val1 * val1 * (3.0 - (2.0 * val1));\n val1 = pow(val1, 0.5); //makes the transition nicer\n \n vec4 midColor = (color1 + color2) * 0.5;\n return mix(midColor, currentColor, val1);\n}\n\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\n return czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_applyHSBShift:"/**\n * Apply a HSB color shift to an RGB color.\n *\n * @param {vec3} rgb The color in RGB space.\n * @param {vec3} hsbShift The amount to shift each component. The xyz components correspond to hue, saturation, and brightness. Shifting the hue by +/- 1.0 corresponds to shifting the hue by a full cycle. Saturation and brightness are clamped between 0 and 1 after the adjustment\n * @param {bool} ignoreBlackPixels If true, black pixels will be unchanged. This is necessary in some shaders such as atmosphere-related effects.\n *\n * @return {vec3} The RGB color after shifting in HSB space and clamping saturation and brightness to a valid range.\n */\nvec3 czm_applyHSBShift(vec3 rgb, vec3 hsbShift, bool ignoreBlackPixels) {\n // Convert rgb color to hsb\n vec3 hsb = czm_RGBToHSB(rgb);\n\n // Perform hsb shift\n // Hue cycles around so no clamp is needed.\n hsb.x += hsbShift.x; // hue\n hsb.y = clamp(hsb.y + hsbShift.y, 0.0, 1.0); // saturation\n\n // brightness\n //\n // Some shaders such as atmosphere-related effects need to leave black\n // pixels unchanged\n if (ignoreBlackPixels) {\n hsb.z = hsb.z > czm_epsilon7 ? hsb.z + hsbShift.z : 0.0;\n } else {\n hsb.z = hsb.z + hsbShift.z;\n }\n hsb.z = clamp(hsb.z, 0.0, 1.0);\n\n // Convert shifted hsb back to rgb\n return czm_HSBToRGB(hsb);\n}\n",czm_approximateSphericalCoordinates:"/**\n * Approximately computes spherical coordinates given a normal.\n * Uses approximate inverse trigonometry for speed and consistency,\n * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.\n *\n * @name czm_approximateSphericalCoordinates\n * @glslFunction\n *\n * @param {vec3} normal arbitrary-length normal.\n *\n * @returns {vec2} Approximate latitude and longitude spherical coordinates.\n */\nvec2 czm_approximateSphericalCoordinates(vec3 normal) {\n // Project into plane with vertical for latitude\n float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\n float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\n return vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_approximateTanh:"/**\n * Compute a rational approximation to tanh(x)\n *\n * @param {float} x A real number input\n * @returns {float} An approximation for tanh(x)\n*/\nfloat czm_approximateTanh(float x) {\n float x2 = x * x;\n return max(-1.0, min(1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));\n}\n",czm_backFacing:"/**\n * Determines if the fragment is back facing\n *\n * @name czm_backFacing\n * @glslFunction \n * \n * @returns {bool} <code>true</code> if the fragment is back facing; otherwise, <code>false</code>.\n */\nbool czm_backFacing()\n{\n // !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/CesiumGS/cesium/pull/8494.\n return gl_FrontFacing == false;\n}\n",czm_branchFreeTernary:"/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a float expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {float} a Value to return if the comparison is true.\n * @param {float} b Value to return if the comparison is false.\n *\n * @returns {float} equivalent of comparison ? a : b\n */\nfloat czm_branchFreeTernary(bool comparison, float a, float b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec2 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec2} a Value to return if the comparison is true.\n * @param {vec2} b Value to return if the comparison is false.\n *\n * @returns {vec2} equivalent of comparison ? a : b\n */\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec3 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec4 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor:"\nvec4 czm_cascadeColor(vec4 weights)\n{\n return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\n vec4(0.0, 1.0, 0.0, 1.0) * weights.y +\n vec4(0.0, 0.0, 1.0, 1.0) * weights.z +\n vec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance:"\nuniform vec4 shadowMap_cascadeDistances;\n\nfloat czm_cascadeDistance(vec4 weights)\n{\n return dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix:"\nuniform mat4 shadowMap_cascadeMatrices[4];\n\nmat4 czm_cascadeMatrix(vec4 weights)\n{\n return shadowMap_cascadeMatrices[0] * weights.x +\n shadowMap_cascadeMatrices[1] * weights.y +\n shadowMap_cascadeMatrices[2] * weights.z +\n shadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights:"\nuniform vec4 shadowMap_cascadeSplits[2];\n\nvec4 czm_cascadeWeights(float depthEye)\n{\n // One component is set to 1.0 and all others set to 0.0.\n vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\n vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n",czm_clipPolygons:"float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) {\n float signedDistance = texture(clippingDistance, uv).r;\n return (signedDistance - 0.5) * 2.0;\n}\n\nvoid czm_clipPolygons(highp sampler2D clippingDistance, int extentsLength, vec2 clippingPosition, int regionIndex) {\n // Position is completely outside of polygons bounds\n vec2 rectUv = clippingPosition;\n if (regionIndex < 0 || rectUv.x <= 0.0 || rectUv.y <= 0.0 || rectUv.x >= 1.0 || rectUv.y >= 1.0) {\n #ifdef CLIPPING_INVERSE \n discard;\n #endif\n return;\n }\n\n vec2 clippingDistanceTextureDimensions = vec2(textureSize(clippingDistance, 0));\n vec2 sampleOffset = max(1.0 / clippingDistanceTextureDimensions, vec2(0.005));\n float dimension = float(extentsLength);\n if (extentsLength > 2) {\n dimension = ceil(log2(float(extentsLength)));\n }\n\n vec2 textureOffset = vec2(mod(float(regionIndex), dimension), floor(float(regionIndex) / dimension)) / dimension;\n vec2 uv = textureOffset + rectUv / dimension;\n\n float signedDistance = getSignedDistance(uv, clippingDistance);\n\n #ifdef CLIPPING_INVERSE\n if (signedDistance > 0.0) {\n discard;\n }\n #else\n if (signedDistance < 0.0) {\n discard;\n }\n #endif\n}\n",czm_columbusViewMorph:"/**\n * DOC_TBA\n *\n * @name czm_columbusViewMorph\n * @glslFunction\n */\nvec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)\n{\n // Just linear for now.\n vec3 p = mix(position2D.xyz, position3D.xyz, time);\n return vec4(p, 1.0);\n}\n",czm_computeAtmosphereColor:"/**\n * Compute the atmosphere color, applying Rayleigh and Mie scattering. This\n * builtin uses automatic uniforms so the atmophere settings are synced with the\n * state of the Scene, even in other contexts like Model.\n *\n * @name czm_computeAtmosphereColor\n * @glslFunction\n *\n * @param {vec3} positionWC Position of the fragment in world coords (low precision)\n * @param {vec3} lightDirection Light direction from the sun or other light source.\n * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function\n * @param {vec3} mieColor The Mie scattering color computed by a scattering function\n * @param {float} opacity The opacity computed by a scattering function.\n */\nvec4 czm_computeAtmosphereColor(\n vec3 positionWC,\n vec3 lightDirection,\n vec3 rayleighColor,\n vec3 mieColor,\n float opacity\n) {\n // Setup the primary ray: from the camera position to the vertex position.\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n\n float cosAngle = dot(cameraToPositionWCDirection, lightDirection);\n float cosAngleSq = cosAngle * cosAngle;\n\n float G = czm_atmosphereMieAnisotropy;\n float GSq = G * G;\n\n // The Rayleigh phase function.\n float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);\n // The Mie phase function.\n float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));\n\n // The final color is generated by combining the effects of the Rayleigh and Mie scattering.\n vec3 rayleigh = rayleighPhase * rayleighColor;\n vec3 mie = miePhase * mieColor;\n\n vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;\n\n return vec4(color, opacity);\n}\n",czm_computeGroundAtmosphereScattering:"/**\n * Compute atmosphere scattering for the ground atmosphere and fog. This method\n * uses automatic uniforms so it is always synced with the scene settings.\n *\n * @name czm_computeGroundAtmosphereScattering\n * @glslfunction\n *\n * @param {vec3} positionWC The position of the fragment in world coordinates.\n * @param {vec3} lightDirection The direction of the light to calculate the scattering from.\n * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.\n * @param {vec3} mieColor The variable the Mie scattering will be written to.\n * @param {float} opacity The variable the transmittance will be written to.\n */\nvoid czm_computeGroundAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);\n\n float atmosphereInnerRadius = length(positionWC);\n\n czm_computeScattering(\n primaryRay,\n length(cameraToPositionWC),\n lightDirection,\n atmosphereInnerRadius,\n rayleighColor,\n mieColor,\n opacity\n );\n}\n",czm_computePosition:"/**\n * Returns a position in model coordinates relative to eye taking into\n * account the current scene mode: 3D, 2D, or Columbus view.\n * <p>\n * This uses standard position attributes, <code>position3DHigh</code>, \n * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>, \n * and should be used when writing a vertex shader for an {@link Appearance}.\n * </p>\n *\n * @name czm_computePosition\n * @glslFunction\n *\n * @returns {vec4} The position relative to eye.\n *\n * @example\n * vec4 p = czm_computePosition();\n * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n *\n * @see czm_translateRelativeToEye\n */\nvec4 czm_computePosition();\n",czm_computeScattering:"/**\n * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as\n * the transmittance value for the ray. This function uses automatic uniforms\n * so the atmosphere settings are always synced with the current scene.\n *\n * @name czm_computeScattering\n * @glslfunction\n *\n * @param {czm_ray} primaryRay The ray from the camera to the position.\n * @param {float} primaryRayLength The length of the primary ray.\n * @param {vec3} lightDirection The direction of the light to calculate the scattering from.\n * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.\n * @param {vec3} mieColor The variable the Mie scattering will be written to.\n * @param {float} opacity The variable the transmittance will be written to.\n */\nvoid czm_computeScattering(\n czm_ray primaryRay,\n float primaryRayLength,\n vec3 lightDirection,\n float atmosphereInnerRadius,\n out vec3 rayleighColor,\n out vec3 mieColor,\n out float opacity\n) {\n const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.\n const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.\n const int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.\n\n // Initialize the default scattering amounts to 0.\n rayleighColor = vec3(0.0);\n mieColor = vec3(0.0);\n opacity = 0.0;\n\n float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\n\n vec3 origin = vec3(0.0);\n\n // Calculate intersection from the camera to the outer ring of the atmosphere.\n czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);\n\n // Return empty colors if no intersection with the atmosphere geometry.\n if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {\n rayleighColor = vec3(1.0, 0.0, 1.0);\n return;\n }\n\n // To deal with smaller values of PRIMARY_STEPS (e.g. 4)\n // we implement a split strategy: sky or horizon.\n // For performance reasons, instead of a if/else branch\n // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0\n float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);\n // Value close to 0.0: close to the horizon\n // Value close to 1.0: above in the sky\n float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));\n\n // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.\n float start_0 = primaryRayAtmosphereIntersect.start;\n primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);\n // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.\n primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));\n\n // For the number of ray steps, distinguish inside or outside atmosphere (outer space)\n // (1) from outer space we have to use more ray steps to get a realistic rendering\n // (2) within atmosphere we need fewer steps for faster rendering\n float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters\n float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));\n int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.\n int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.\n\n // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.\n float rayPositionLength = primaryRayAtmosphereIntersect.start;\n // (1) Outside the atmosphere: constant rayStepLength\n // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps\n float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;\n float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));\n float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));\n\n vec3 rayleighAccumulation = vec3(0.0);\n vec3 mieAccumulation = vec3(0.0);\n vec2 opticalDepth = vec2(0.0);\n vec2 heightScale = vec2(czm_atmosphereRayleighScaleHeight, czm_atmosphereMieScaleHeight);\n\n // Sample positions on the primary ray.\n for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {\n\n // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (i >= PRIMARY_STEPS) {\n break;\n }\n\n // Calculate sample position along viewpoint ray.\n vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);\n\n // Calculate height of sample position above ellipsoid.\n float sampleHeight = length(samplePosition) - atmosphereInnerRadius;\n\n // Calculate and accumulate density of particles at the sample position.\n vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;\n opticalDepth += sampleDensity;\n\n // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.\n czm_ray lightRay = czm_ray(samplePosition, lightDirection);\n czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);\n\n float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);\n float lightPositionLength = 0.0;\n\n vec2 lightOpticalDepth = vec2(0.0);\n\n // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.\n for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {\n\n // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (j >= LIGHT_STEPS) {\n break;\n }\n\n // Calculate sample position along light ray.\n vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);\n\n // Calculate height of the light sample position above ellipsoid.\n float lightHeight = length(lightPosition) - atmosphereInnerRadius;\n\n // Calculate density of photons at the light sample position.\n lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;\n\n // Increment distance on light ray.\n lightPositionLength += lightStepLength;\n }\n\n // Compute attenuation via the primary ray and the light ray.\n vec3 attenuation = exp(-((czm_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (czm_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));\n\n // Accumulate the scattering.\n rayleighAccumulation += sampleDensity.x * attenuation;\n mieAccumulation += sampleDensity.y * attenuation;\n\n // Increment distance on primary ray.\n rayPositionLength += (rayStepLength += rayStepLengthIncrease);\n }\n\n // Compute the scattering amount.\n rayleighColor = czm_atmosphereRayleighCoefficient * rayleighAccumulation;\n mieColor = czm_atmosphereMieCoefficient * mieAccumulation;\n\n // Compute the transmittance i.e. how much light is passing through the atmosphere.\n opacity = length(exp(-((czm_atmosphereMieCoefficient * opticalDepth.y) + (czm_atmosphereRayleighCoefficient * opticalDepth.x))));\n}\n",czm_cosineAndSine:"/**\n * @private\n */\nvec2 cordic(float angle)\n{\n// Scale the vector by the appropriate factor for the 24 iterations to follow.\n vec2 vector = vec2(6.0725293500888267e-1, 0.0);\n// Iteration 1\n float sense = (angle < 0.0) ? -1.0 : 1.0;\n // float factor = sense * 1.0; // 2^-0\n mat2 rotation = mat2(1.0, sense, -sense, 1.0);\n vector = rotation * vector;\n angle -= sense * 7.8539816339744828e-1; // atan(2^-0)\n// Iteration 2\n sense = (angle < 0.0) ? -1.0 : 1.0;\n float factor = sense * 5.0e-1; // 2^-1\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.6364760900080609e-1; // atan(2^-1)\n// Iteration 3\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.5e-1; // 2^-2\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4497866312686414e-1; // atan(2^-2)\n// Iteration 4\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.25e-1; // 2^-3\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2435499454676144e-1; // atan(2^-3)\n// Iteration 5\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.25e-2; // 2^-4\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.2418809995957350e-2; // atan(2^-4)\n// Iteration 6\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.125e-2; // 2^-5\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.1239833430268277e-2; // atan(2^-5)\n// Iteration 7\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.5625e-2; // 2^-6\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5623728620476831e-2; // atan(2^-6)\n// Iteration 8\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.8125e-3; // 2^-7\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.8123410601011111e-3; // atan(2^-7)\n// Iteration 9\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.90625e-3; // 2^-8\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.9062301319669718e-3; // atan(2^-8)\n// Iteration 10\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.953125e-3; // 2^-9\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9531225164788188e-3; // atan(2^-9)\n// Iteration 11\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.765625e-4; // 2^-10\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.7656218955931946e-4; // atan(2^-10)\n// Iteration 12\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.8828125e-4; // 2^-11\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.8828121119489829e-4; // atan(2^-11)\n// Iteration 13\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.44140625e-4; // 2^-12\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4414062014936177e-4; // atan(2^-12)\n// Iteration 14\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.220703125e-4; // 2^-13\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2207031189367021e-4; // atan(2^-13)\n// Iteration 15\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.103515625e-5; // 2^-14\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.1035156174208773e-5; // atan(2^-14)\n// Iteration 16\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.0517578125e-5; // 2^-15\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.0517578115526096e-5; // atan(2^-15)\n// Iteration 17\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.52587890625e-5; // 2^-16\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5258789061315762e-5; // atan(2^-16)\n// Iteration 18\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.62939453125e-6; // 2^-17\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.6293945311019700e-6; // atan(2^-17)\n// Iteration 19\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.814697265625e-6; // 2^-18\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.8146972656064961e-6; // atan(2^-18)\n// Iteration 20\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.9073486328125e-6; // 2^-19\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9073486328101870e-6; // atan(2^-19)\n// Iteration 21\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.5367431640625e-7; // 2^-20\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.5367431640596084e-7; // atan(2^-20)\n// Iteration 22\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.76837158203125e-7; // 2^-21\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.7683715820308884e-7; // atan(2^-21)\n// Iteration 23\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.384185791015625e-7; // 2^-22\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.3841857910155797e-7; // atan(2^-22)\n// Iteration 24\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.1920928955078125e-7; // 2^-23\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n// angle -= sense * 1.1920928955078068e-7; // atan(2^-23)\n\n return vector;\n}\n\n/**\n * Computes the cosine and sine of the provided angle using the CORDIC algorithm.\n *\n * @name czm_cosineAndSine\n * @glslFunction\n *\n * @param {float} angle The angle in radians.\n *\n * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).\n *\n * @example\n * vec2 v = czm_cosineAndSine(czm_piOverSix);\n * float cosine = v.x;\n * float sine = v.y;\n */\nvec2 czm_cosineAndSine(float angle)\n{\n if (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n {\n if (angle < 0.0)\n {\n return -cordic(angle + czm_pi);\n }\n else\n {\n return -cordic(angle - czm_pi);\n }\n }\n else\n {\n return cordic(angle);\n }\n}\n",czm_decompressTextureCoordinates:"/**\n * Decompresses texture coordinates that were packed into a single float.\n *\n * @name czm_decompressTextureCoordinates\n * @glslFunction\n *\n * @param {float} encoded The compressed texture coordinates.\n * @returns {vec2} The decompressed texture coordinates.\n */\n vec2 czm_decompressTextureCoordinates(float encoded)\n {\n float temp = encoded / 4096.0;\n float xZeroTo4095 = floor(temp);\n float stx = xZeroTo4095 / 4095.0;\n float sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\n return vec2(stx, sty);\n }\n",czm_depthClamp:"// emulated noperspective\n#if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH)\nout float v_WindowZ;\n#endif\n\n/**\n * Emulates GL_DEPTH_CLAMP, which is not available in WebGL 1 or 2.\n * GL_DEPTH_CLAMP clamps geometry that is outside the near and far planes, \n * capping the shadow volume. More information here: \n * https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_depth_clamp.txt.\n *\n * When GL_EXT_frag_depth is available we emulate GL_DEPTH_CLAMP by ensuring \n * no geometry gets clipped by setting the clip space z value to 0.0 and then\n * sending the unaltered screen space z value (using emulated noperspective\n * interpolation) to the frag shader where it is clamped to [0,1] and then\n * written with gl_FragDepth (see czm_writeDepthClamp). This technique is based on:\n * https://stackoverflow.com/questions/5960757/how-to-emulate-gl-depth-clamp-nv.\n *\n * When GL_EXT_frag_depth is not available, which is the case on some mobile \n * devices, we must attempt to fix this only in the vertex shader. \n * The approach is to clamp the z value to the far plane, which closes the \n * shadow volume but also distorts the geometry, so there can still be artifacts\n * on frustum seams.\n *\n * @name czm_depthClamp\n * @glslFunction\n *\n * @param {vec4} coords The vertex in clip coordinates.\n * @returns {vec4} The modified vertex.\n *\n * @example\n * gl_Position = czm_depthClamp(czm_modelViewProjection * vec4(position, 1.0));\n *\n * @see czm_writeDepthClamp\n */\nvec4 czm_depthClamp(vec4 coords)\n{\n#ifndef LOG_DEPTH\n#if __VERSION__ == 300 || defined(GL_EXT_frag_depth)\n v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\n coords.z = 0.0;\n#else\n coords.z = min(coords.z, coords.w);\n#endif\n#endif\n return coords;\n}\n",czm_eastNorthUpToEyeCoordinates:"/**\n * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system \n * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the \n * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.\n * <br /><br />\n * The ellipsoid is assumed to be centered at the model coordinate's origin.\n *\n * @name czm_eastNorthUpToEyeCoordinates\n * @glslFunction\n *\n * @param {vec3} positionMC The position on the ellipsoid in model coordinates.\n * @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.\n *\n * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.\n *\n * @example\n * // Transform a vector defined in the east-north-up coordinate \n * // system, (0, 0, 1) which is the surface normal, to eye \n * // coordinates.\n * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);\n */\nmat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\n vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates\n vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordinates\n vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates\n\n return mat3(\n tangentEC.x, tangentEC.y, tangentEC.z,\n bitangentEC.x, bitangentEC.y, bitangentEC.z,\n normalEC.x, normalEC.y, normalEC.z);\n}\n",czm_ellipsoidContainsPoint:"/**\n * DOC_TBA\n *\n * @name czm_ellipsoidContainsPoint\n * @glslFunction\n *\n */\nbool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\n vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\n return (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidTextureCoordinates:"/**\n * Approximate uv coordinates based on the ellipsoid normal.\n *\n * @name czm_ellipsoidTextureCoordinates\n * @glslFunction\n */\nvec2 czm_ellipsoidTextureCoordinates(vec3 normal)\n{\n return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon:"/**\n * Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>\n * if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs\n * <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,\n * <code>vec3</code>s, or <code>vec4</code>s.\n *\n * @name czm_equalsEpsilon\n * @glslFunction\n *\n * @param {} left The first vector.\n * @param {} right The second vector.\n * @param {float} epsilon The epsilon to use for equality testing.\n * @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.\n *\n * @example\n * // GLSL declarations\n * bool czm_equalsEpsilon(float left, float right, float epsilon);\n * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);\n * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);\n * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);\n */\nbool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\n\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\n return (abs(left - right) <= epsilon);\n}\n",czm_eyeOffset:"/**\n * DOC_TBA\n *\n * @name czm_eyeOffset\n * @glslFunction\n *\n * @param {vec4} positionEC DOC_TBA.\n * @param {vec3} eyeOffset DOC_TBA.\n *\n * @returns {vec4} DOC_TBA.\n */\nvec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\n // This equation is approximate in x and y.\n vec4 p = positionEC;\n vec4 zEyeOffset = normalize(p) * eyeOffset.z;\n p.xy += eyeOffset.xy + zEyeOffset.xy;\n p.z += zEyeOffset.z;\n return p;\n}\n",czm_eyeToWindowCoordinates:"/**\n * Transforms a position from eye to window coordinates. The transformation\n * from eye to clip coordinates is done using {@link czm_projection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *\n * @name czm_eyeToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in eye coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_projection\n * @see czm_viewportTransformation\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n */\nvec4 czm_eyeToWindowCoordinates(vec4 positionEC)\n{\n vec4 q = czm_projection * positionEC; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_fastApproximateAtan:"/**\n * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.\n *\n * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on\n * \"Efficient approximations for the arctangent function,\" Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.\n * Adapted from ShaderFastLibs under MIT License.\n *\n * Chosen for the following characteristics over range [0, 1]:\n * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)\n * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)\n *\n * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);\n * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between 0 and 1 inclusive.\n *\n * @returns {float} Approximation of atan(x)\n */\nfloat czm_fastApproximateAtan(float x) {\n return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\n\n/**\n * Approximation of atan2.\n *\n * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html\n * However, we replaced their atan curve with Michael Drobot's (see above).\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between -1 and 1 inclusive.\n * @param {float} y Value between -1 and 1 inclusive.\n *\n * @returns {float} Approximation of atan2(x, y)\n */\nfloat czm_fastApproximateAtan(float x, float y) {\n // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.\n // So range-reduce using abs and by flipping whether x or y is on top.\n float t = abs(x); // t used as swap and atan result.\n float opposite = abs(y);\n float adjacent = max(t, opposite);\n opposite = min(t, opposite);\n\n t = czm_fastApproximateAtan(opposite / adjacent);\n\n // Undo range reduction\n t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\n t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\n t = czm_branchFreeTernary(y < 0.0, -t, t);\n return t;\n}\n",czm_fog:"/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-(scalar * scalar));\n return mix(color, fogColor, fog);\n}\n\n/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n * @param {float} fogModifierConstant A constant to modify the appearance of fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\n return mix(color, fogColor, fog);\n}\n",czm_gammaCorrect:"/**\n * Converts a color from RGB space to linear space.\n *\n * @name czm_gammaCorrect\n * @glslFunction\n *\n * @param {vec3} color The color in RGB space.\n * @returns {vec3} The color in linear space.\n */\nvec3 czm_gammaCorrect(vec3 color) {\n#ifdef HDR\n color = pow(color, vec3(czm_gamma));\n#endif\n return color;\n}\n\nvec4 czm_gammaCorrect(vec4 color) {\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\n return color;\n}\n",czm_geodeticSurfaceNormal:"/**\n * DOC_TBA\n *\n * @name czm_geodeticSurfaceNormal\n * @glslFunction\n *\n * @param {vec3} positionOnEllipsoid DOC_TBA\n * @param {vec3} ellipsoidCenter DOC_TBA\n * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA\n * \n * @returns {vec3} DOC_TBA.\n */\nvec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\n return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial:"/**\n * An czm_material with default values. Every material's czm_getMaterial\n * should use this default material as a base for the material it returns.\n * The default normal value is given by materialInput.normalEC.\n *\n * @name czm_getDefaultMaterial\n * @glslFunction\n *\n * @param {czm_materialInput} input The input used to construct the default material.\n *\n * @returns {czm_material} The default material.\n *\n * @see czm_materialInput\n * @see czm_material\n * @see czm_getMaterial\n */\nczm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\n czm_material material;\n material.diffuse = vec3(0.0);\n material.specular = 0.0;\n material.shininess = 1.0;\n material.normal = materialInput.normalEC;\n material.emission = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n",czm_getDynamicAtmosphereLightDirection:"/**\n * Select which direction vector to use for dynamic atmosphere lighting based on an enum value\n *\n * @name czm_getDynamicAtmosphereLightDirection\n * @glslfunction\n * @see DynamicAtmosphereLightingType.js\n *\n * @param {vec3} positionWC the position of the vertex/fragment in world coordinates. This is normalized and returned when dynamic lighting is turned off.\n * @param {float} lightEnum The enum value for selecting between light sources.\n * @return {vec3} The normalized light direction vector. Depending on the enum value, it is either positionWC, czm_lightDirectionWC or czm_sunDirectionWC\n */\nvec3 czm_getDynamicAtmosphereLightDirection(vec3 positionWC, float lightEnum) {\n const float NONE = 0.0;\n const float SCENE_LIGHT = 1.0;\n const float SUNLIGHT = 2.0;\n\n vec3 lightDirection =\n positionWC * float(lightEnum == NONE) +\n czm_lightDirectionWC * float(lightEnum == SCENE_LIGHT) +\n czm_sunDirectionWC * float(lightEnum == SUNLIGHT);\n return normalize(lightDirection);\n}\n",czm_getLambertDiffuse:"/**\n * Calculates the intensity of diffusely reflected light.\n *\n * @name czm_getLambertDiffuse\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n *\n * @returns {float} The intensity of the diffuse reflection.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\n return max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getSpecular:"/**\n * Calculates the specular intensity of reflected light.\n *\n * @name czm_getSpecular\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n *\n * @returns {float} The intensity of the specular highlight.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\n vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\n float specular = max(dot(toReflectedLight, toEyeEC), 0.0);\n\n // pow has undefined behavior if both parameters <= 0.\n // Prevent this by making sure shininess is at least czm_epsilon2.\n return pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getWaterNoise:"/**\n * @private\n */\nvec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n\n // time dependent sampling directions\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n\n // rotate sampling direction by specified angle\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (texture(normalMap, uv0)) +\n (texture(normalMap, uv1)) +\n (texture(normalMap, uv2)) +\n (texture(normalMap, uv3));\n\n // average and scale to between -1 and 1\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_hue:"/**\n * Adjusts the hue of a color.\n * \n * @name czm_hue\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the hue of the color in radians.\n *\n * @returns {float} The color with the hue adjusted.\n *\n * @example\n * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n */\nvec3 czm_hue(vec3 rgb, float adjustment)\n{\n const mat3 toYIQ = mat3(0.299, 0.587, 0.114,\n 0.595716, -0.274453, -0.321263,\n 0.211456, -0.522591, 0.311135);\n const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,\n 1.0, -0.2721, -0.6474,\n 1.0, -1.107, 1.7046);\n \n vec3 yiq = toYIQ * rgb;\n float hue = atan(yiq.z, yiq.y) + adjustment;\n float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n \n vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\n return toRGB * color;\n}\n",czm_inverseGamma:"/**\n * Converts a color in linear space to RGB space.\n *\n * @name czm_inverseGamma\n * @glslFunction\n *\n * @param {vec3} color The color in linear space.\n * @returns {vec3} The color in RGB space.\n */\nvec3 czm_inverseGamma(vec3 color) {\n return pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_isEmpty:"/**\n * Determines if a time interval is empty.\n *\n * @name czm_isEmpty\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isEmpty(czm_raySegment interval)\n{\n return (interval.stop < 0.0);\n}\n",czm_isFull:"/**\n * Determines if a time interval is empty.\n *\n * @name czm_isFull\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isFull(czm_raySegment interval)\n{\n return (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction:"/**\n * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.\n *\n * @name czm_latitudeToWebMercatorFraction\n * @glslFunction\n *\n * @param {float} latitude The geodetic latitude, in radians.\n * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.\n * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.\n *\n * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern\n * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return\n * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.\n */ \nfloat czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\n float sinLatitude = sin(latitude);\n float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\n \n return (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_lineDistance:"/**\n * Computes distance from an point in 2D to a line in 2D.\n *\n * @name czm_lineDistance\n * @glslFunction\n *\n * param {vec2} point1 A point along the line.\n * param {vec2} point2 A point along the line.\n * param {vec2} point A point that may or may not be on the line.\n * returns {float} The distance from the point to the line.\n */\nfloat czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\n return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_linearToSrgb:"/**\n * Converts a linear RGB color to an sRGB color.\n *\n * @param {vec3|vec4} linearIn The color in linear color space.\n * @returns {vec3|vec4} The color in sRGB color space. The vector type matches the input.\n */\nvec3 czm_linearToSrgb(vec3 linearIn) \n{\n return pow(linearIn, vec3(1.0/2.2));\n}\n\nvec4 czm_linearToSrgb(vec4 linearIn) \n{\n vec3 srgbOut = pow(linearIn.rgb, vec3(1.0/2.2));\n return vec4(srgbOut, linearIn.a);\n}\n",czm_luminance:"/**\n * Computes the luminance of a color. \n *\n * @name czm_luminance\n * @glslFunction\n *\n * @param {vec3} rgb The color.\n * \n * @returns {float} The luminance.\n *\n * @example\n * float light = czm_luminance(vec3(0.0)); // 0.0\n * float dark = czm_luminance(vec3(1.0)); // ~1.0 \n */\nfloat czm_luminance(vec3 rgb)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n return dot(rgb, W);\n}\n",czm_maximumComponent:"/**\n * Find the maximum component of a vector.\n *\n * @name czm_maximumComponent\n * @glslFunction\n *\n * @param {vec2|vec3|vec4} v The input vector.\n * @returns {float} The value of the largest component.\n */\nfloat czm_maximumComponent(vec2 v)\n{\n return max(v.x, v.y);\n}\nfloat czm_maximumComponent(vec3 v)\n{\n return max(max(v.x, v.y), v.z);\n}\nfloat czm_maximumComponent(vec4 v)\n{\n return max(max(max(v.x, v.y), v.z), v.w);\n}\n",czm_metersPerPixel:"/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n * @param {float} pixelRatio The scaling factor from pixel space to coordinate space\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC, float pixelRatio)\n{\n float width = czm_viewport.z;\n float height = czm_viewport.w;\n float pixelWidth;\n float pixelHeight;\n\n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n\n if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n {\n float frustumWidth = right - left;\n float frustumHeight = top - bottom;\n pixelWidth = frustumWidth / width;\n pixelHeight = frustumHeight / height;\n }\n else\n {\n float distanceToPixel = -positionEC.z;\n float inverseNear = 1.0 / czm_currentFrustum.x;\n float tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n }\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}\n\n/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when scaling by pixel ratio.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC)\n{\n return czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates:"/**\n * Transforms a position from model to window coordinates. The transformation\n * from model to clip coordinates is done using {@link czm_modelViewProjection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n * <br /><br />\n * This function should not be confused with {@link czm_viewportOrthographic},\n * which is an orthographic projection matrix that transforms from window \n * coordinates to clip coordinates.\n *\n * @name czm_modelToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in model coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_eyeToWindowCoordinates\n * @see czm_modelViewProjection\n * @see czm_viewportTransformation\n * @see czm_viewportOrthographic\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);\n */\nvec4 czm_modelToWindowCoordinates(vec4 position)\n{\n vec4 q = czm_modelViewProjection * position; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_multiplyWithColorBalance:"/**\n * DOC_TBA\n *\n * @name czm_multiplyWithColorBalance\n * @glslFunction\n */\nvec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n \n vec3 target = left * right;\n float leftLuminance = dot(left, W);\n float rightLuminance = dot(right, W);\n float targetLuminance = dot(target, W);\n \n return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar:"/**\n * Computes a value that scales with distance. The scaling is clamped at the near and\n * far distances, and does not extrapolate. This function works with the\n * {@link NearFarScalar} JavaScript class.\n *\n * @name czm_nearFarScalar\n * @glslFunction\n *\n * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).\n * @param {float} cameraDistSq The square of the current distance from the camera.\n *\n * @returns {float} The value at this distance.\n */\nfloat czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\n float valueAtMin = nearFarScalar.y;\n float valueAtMax = nearFarScalar.w;\n float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\n float farDistanceSq = nearFarScalar.z * nearFarScalar.z;\n\n float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\n\n t = pow(clamp(t, 0.0, 1.0), 0.2);\n\n return mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode:" /**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded, float range)\n {\n if (encoded.x == 0.0 && encoded.y == 0.0) {\n return vec3(0.0, 0.0, 0.0);\n }\n\n encoded = encoded / range * 2.0 - 1.0;\n vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\n if (v.z < 0.0)\n {\n v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n }\n\n return normalize(v);\n }\n\n/**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded)\n {\n return czm_octDecode(encoded, 255.0);\n }\n\n /**\n * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {float} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(float encoded)\n {\n float temp = encoded / 256.0;\n float x = floor(temp);\n float y = (temp - x) * 256.0;\n return czm_octDecode(vec2(x, y));\n }\n\n/**\n * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {vec2} encoded The packed oct-encoded, unit-length vectors.\n * @param {vec3} vector1 One decoded and normalized vector.\n * @param {vec3} vector2 One decoded and normalized vector.\n * @param {vec3} vector3 One decoded and normalized vector.\n */\n void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n {\n float temp = encoded.x / 65536.0;\n float x = floor(temp);\n float encodedFloat1 = (temp - x) * 65536.0;\n\n temp = encoded.y / 65536.0;\n float y = floor(temp);\n float encodedFloat2 = (temp - y) * 65536.0;\n\n vector1 = czm_octDecode(encodedFloat1);\n vector2 = czm_octDecode(encodedFloat2);\n vector3 = czm_octDecode(vec2(x, y));\n }\n\n",czm_packDepth:"/**\n * Packs a depth value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packDepth\n * @glslFunction\n *\n * @param {float} depth The floating-point depth.\n * @returns {vec3} The packed depth.\n */\nvec4 czm_packDepth(float depth)\n{\n // See Aras Pranckevi\u010dius' post Encoding Floats to RGBA\n // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return enc;\n}\n",czm_pbrLighting:"vec3 lambertianDiffuse(vec3 diffuseColor)\n{\n return diffuseColor / czm_pi;\n}\n\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n{\n float versine = 1.0 - VdotH;\n // pow(versine, 5.0) is slow. See https://stackoverflow.com/a/68793086/10082269\n float versineSquared = versine * versine;\n return f0 + (f90 - f0) * versineSquared * versineSquared * versine;\n}\n\n#ifdef USE_ANISOTROPY\n/**\n * @param {float} roughness Material roughness (along the anisotropy bitangent)\n * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)\n * @param {vec3} lightDirection The direction from the fragment to the light source, transformed to tangent-bitangent-normal coordinates\n * @param {vec3} viewDirection The direction from the fragment to the camera, transformed to tangent-bitangent-normal coordinates\n */\nfloat smithVisibilityGGX_anisotropic(float roughness, float tangentialRoughness, vec3 lightDirection, vec3 viewDirection)\n{\n vec3 roughnessScale = vec3(tangentialRoughness, roughness, 1.0);\n float GGXV = lightDirection.z * length(roughnessScale * viewDirection);\n float GGXL = viewDirection.z * length(roughnessScale * lightDirection);\n float v = 0.5 / (GGXV + GGXL);\n return clamp(v, 0.0, 1.0);\n}\n\n/**\n * @param {float} roughness Material roughness (along the anisotropy bitangent)\n * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)\n * @param {vec3} halfwayDirection The unit vector halfway between light and view directions, transformed to tangent-bitangent-normal coordinates\n */\nfloat GGX_anisotropic(float roughness, float tangentialRoughness, vec3 halfwayDirection)\n{\n float roughnessSquared = roughness * tangentialRoughness;\n vec3 f = halfwayDirection * vec3(roughness, tangentialRoughness, roughnessSquared);\n float w2 = roughnessSquared / dot(f, f);\n return roughnessSquared * w2 * w2 / czm_pi;\n}\n#endif\n\nfloat smithVisibilityG1(float NdotV, float roughness)\n{\n // this is the k value for direct lighting.\n // for image based lighting it will be roughness^2 / 2\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\n/**\n * Estimate the geometric self-shadowing of the microfacets in a surface,\n * using the Schlick GGX approximation of a Smith visibility function.\n *\n * @param {float} roughness The roughness of the material.\n * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.\n * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.\n */\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n{\n // Avoid divide-by-zero errors\n NdotL = clamp(NdotL, 0.001, 1.0);\n NdotV += 0.001;\n return (\n smithVisibilityG1(NdotL, roughness) *\n smithVisibilityG1(NdotV, roughness)\n ) / (4.0 * NdotL * NdotV);\n}\n\n/**\n * Estimate the fraction of the microfacets in a surface that are aligned with \n * the halfway vector, which is aligned halfway between the directions from\n * the fragment to the camera and from the fragment to the light source.\n *\n * @param {float} roughness The roughness of the material.\n * @param {float} NdotH The cosine of the angle between the surface normal and the halfway vector.\n * @return {float} The fraction of microfacets aligned to the halfway vector.\n */\nfloat GGX(float roughness, float NdotH)\n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (czm_pi * f * f);\n}\n\n/**\n * Compute the strength of the specular reflection due to direct lighting.\n *\n * @param {vec3} normal The surface normal.\n * @param {vec3} lightDirection The unit vector pointing from the fragment to the light source.\n * @param {vec3} viewDirection The unit vector pointing from the fragment to the camera.\n * @param {vec3} halfwayDirection The unit vector pointing from the fragment to halfway between the light source and the camera.\n * @param {float} roughness The roughness of the material.\n * @return {float} The strength of the specular reflection.\n */\nfloat computeDirectSpecularStrength(vec3 normal, vec3 lightDirection, vec3 viewDirection, vec3 halfwayDirection, float roughness)\n{\n float NdotL = dot(normal, lightDirection);\n float NdotV = abs(dot(normal, viewDirection));\n float G = smithVisibilityGGX(roughness, NdotL, NdotV);\n float NdotH = clamp(dot(normal, halfwayDirection), 0.0, 1.0);\n float D = GGX(roughness, NdotH);\n return G * D;\n}\n\n/**\n * Compute the diffuse and specular contributions using physically based\n * rendering. This function only handles direct lighting.\n * <p>\n * This function only handles the lighting calculations. Metallic/roughness\n * and specular/glossy must be handled separately. See {@MaterialStageFS}\n * </p>\n *\n * @name czm_pbrLighting\n * @glslFunction\n *\n * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position\n * @param {vec3} normalEC The surface normal in eye coordinates\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {czm_modelMaterial} The material properties.\n * @return {vec3} The computed HDR color\n */\nvec3 czm_pbrLighting(vec3 viewDirectionEC, vec3 normalEC, vec3 lightDirectionEC, czm_modelMaterial material)\n{\n vec3 halfwayDirectionEC = normalize(viewDirectionEC + lightDirectionEC);\n float VdotH = clamp(dot(viewDirectionEC, halfwayDirectionEC), 0.0, 1.0);\n float NdotL = clamp(dot(normalEC, lightDirectionEC), 0.001, 1.0);\n\n vec3 f0 = material.specular;\n float reflectance = czm_maximumComponent(f0);\n // Typical dielectrics will have reflectance 0.04, so f90 will be 1.0.\n // In this case, at grazing angle, all incident energy is reflected.\n vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 F = fresnelSchlick2(f0, f90, VdotH);\n\n #if defined(USE_SPECULAR)\n F *= material.specularWeight;\n #endif\n\n float alpha = material.roughness;\n #ifdef USE_ANISOTROPY\n mat3 tbn = mat3(material.anisotropicT, material.anisotropicB, normalEC);\n vec3 lightDirection = lightDirectionEC * tbn;\n vec3 viewDirection = viewDirectionEC * tbn;\n vec3 halfwayDirection = halfwayDirectionEC * tbn;\n float anisotropyStrength = material.anisotropyStrength;\n float tangentialRoughness = mix(alpha, 1.0, anisotropyStrength * anisotropyStrength);\n float G = smithVisibilityGGX_anisotropic(alpha, tangentialRoughness, lightDirection, viewDirection);\n float D = GGX_anisotropic(alpha, tangentialRoughness, halfwayDirection);\n vec3 specularContribution = F * G * D;\n #else\n float specularStrength = computeDirectSpecularStrength(normalEC, lightDirectionEC, viewDirectionEC, halfwayDirectionEC, alpha);\n vec3 specularContribution = F * specularStrength;\n #endif\n\n vec3 diffuseColor = material.diffuse;\n // F here represents the specular contribution\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n\n // Lo = (diffuse + specular) * Li * NdotL\n return (diffuseContribution + specularContribution) * NdotL;\n}\n",czm_phong:"float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\n return czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\n\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\n return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\n\n/**\n * Computes a color using the Phong lighting model.\n *\n * @name czm_phong\n * @glslFunction\n *\n * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.\n * @param {czm_material} material The fragment's material.\n *\n * @returns {vec4} The computed color.\n *\n * @example\n * vec3 positionToEyeEC = // ...\n * czm_material material = // ...\n * vec3 lightDirectionEC = // ...\n * out_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);\n *\n * @see czm_getMaterial\n */\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down)\n float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n }\n\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n vec3 ambient = vec3(0.0);\n vec3 color = ambient + material.emission;\n color += material.diffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_planeDistance:"/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec4 plane, vec3 point) {\n return (dot(plane.xyz, point) + plane.w);\n}\n\n/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js\n * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\n return (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay:"/**\n * Computes the point along a ray at the given time. <code>time</code> can be positive, negative, or zero.\n *\n * @name czm_pointAlongRay\n * @glslFunction\n *\n * @param {czm_ray} ray The ray to compute the point along.\n * @param {float} time The time along the ray.\n * \n * @returns {vec3} The point along the ray at the given time.\n * \n * @example\n * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction\n * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)\n */\nvec3 czm_pointAlongRay(czm_ray ray, float time)\n{\n return ray.origin + (time * ray.direction);\n}\n",czm_rayEllipsoidIntersectionInterval:"/**\n * DOC_TBA\n *\n * @name czm_rayEllipsoidIntersectionInterval\n * @glslFunction\n */\nczm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)\n{\n // ray and ellipsoid center in eye coordinates. radii in model coordinates.\n vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\n vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\n\n q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\n\n float q2 = dot(q, q);\n float qw = dot(q, w);\n\n if (q2 > 1.0) // Outside ellipsoid.\n {\n if (qw >= 0.0) // Looking outward or tangent (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else // qw < 0.0.\n {\n float qw2 = qw * qw;\n float difference = q2 - 1.0; // Positively valued.\n float w2 = dot(w, w);\n float product = w2 * difference;\n\n if (qw2 < product) // Imaginary roots (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else if (qw2 > product) // Distinct roots (2 intersections).\n {\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Avoid cancellation.\n float root0 = temp / w2;\n float root1 = difference / temp;\n if (root0 < root1)\n {\n czm_raySegment i = czm_raySegment(root0, root1);\n return i;\n }\n else\n {\n czm_raySegment i = czm_raySegment(root1, root0);\n return i;\n }\n }\n else // qw2 == product. Repeated roots (2 intersections).\n {\n float root = sqrt(difference / w2);\n czm_raySegment i = czm_raySegment(root, root);\n return i;\n }\n }\n }\n else if (q2 < 1.0) // Inside ellipsoid (2 intersections).\n {\n float difference = q2 - 1.0; // Negatively valued.\n float w2 = dot(w, w);\n float product = w2 * difference; // Negatively valued.\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Positively valued.\n czm_raySegment i = czm_raySegment(0.0, temp / w2);\n return i;\n }\n else // q2 == 1.0. On ellipsoid.\n {\n if (qw < 0.0) // Looking inward.\n {\n float w2 = dot(w, w);\n czm_raySegment i = czm_raySegment(0.0, -qw / w2);\n return i;\n }\n else // qw >= 0.0. Looking outward or tangent.\n {\n return czm_emptyRaySegment;\n }\n }\n}\n",czm_raySphereIntersectionInterval:"/**\n * Compute the intersection interval of a ray with a sphere.\n *\n * @name czm_raySphereIntersectionInterval\n * @glslFunction\n *\n * @param {czm_ray} ray The ray.\n * @param {vec3} center The center of the sphere.\n * @param {float} radius The radius of the sphere.\n * @return {czm_raySegment} The intersection interval of the ray with the sphere.\n */\nczm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)\n{\n vec3 o = ray.origin;\n vec3 d = ray.direction;\n\n vec3 oc = o - center;\n\n float a = dot(d, d);\n float b = 2.0 * dot(d, oc);\n float c = dot(oc, oc) - (radius * radius);\n\n float det = (b * b) - (4.0 * a * c);\n\n if (det < 0.0) {\n return czm_emptyRaySegment;\n }\n\n float sqrtDet = sqrt(det);\n\n float t0 = (-b - sqrtDet) / (2.0 * a);\n float t1 = (-b + sqrtDet) / (2.0 * a);\n\n czm_raySegment result = czm_raySegment(t0, t1);\n return result;\n}\n",czm_readDepth:"float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\n return czm_reverseLogDepth(texture(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective:"/**\n * Reads a value previously transformed with {@link czm_writeNonPerspective}\n * by dividing it by `w`, the value used in the perspective divide.\n * This function is intended to be called in a fragment shader to access a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The value should have been\n * previously written in the vertex shader with a call to\n * {@link czm_writeNonPerspective}.\n *\n * @name czm_readNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.\n * @param {float} oneOverW One over the perspective divide value, `w`. Usually this is simply `gl_FragCoord.w`.\n * @returns {float|vec2|vec3|vec4} The usable value.\n */\nfloat czm_readNonPerspective(float value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\n return value * oneOverW;\n}\n",czm_reverseLogDepth:"float czm_reverseLogDepth(float logZ)\n{\n#ifdef LOG_DEPTH\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;\n float depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#endif\n return logZ;\n}\n",czm_round:"/**\n * Round a floating point value. This function exists because round() doesn't\n * exist in GLSL 1.00. \n *\n * @param {float|vec2|vec3|vec4} value The value to round\n * @param {float|vec2|vec3|vec3} The rounded value. The type matches the input.\n */\nfloat czm_round(float value) {\n return floor(value + 0.5);\n}\n\nvec2 czm_round(vec2 value) {\n return floor(value + 0.5);\n}\n\nvec3 czm_round(vec3 value) {\n return floor(value + 0.5);\n}\n\nvec4 czm_round(vec4 value) {\n return floor(value + 0.5);\n}\n",czm_sampleOctahedralProjection:"/**\n * Samples the 4 neighboring pixels and return the weighted average.\n *\n * @private\n */\nvec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod)\n{\n direction /= dot(vec3(1.0), abs(direction));\n vec2 rev = abs(direction.zx) - vec2(1.0);\n vec2 neg = vec2(direction.x < 0.0 ? rev.x : -rev.x,\n direction.z < 0.0 ? rev.y : -rev.y);\n vec2 uv = direction.y < 0.0 ? neg : direction.xz;\n vec2 coord = 0.5 * uv + vec2(0.5);\n vec2 pixel = 1.0 / textureSize;\n\n if (lod > 0.0)\n {\n // Each subseqeuent mip level is half the size\n float scale = 1.0 / pow(2.0, lod);\n float offset = ((textureSize.y + 1.0) / textureSize.x);\n\n coord.x *= offset;\n coord *= scale;\n\n coord.x += offset + pixel.x;\n coord.y += (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n }\n else\n {\n coord.x *= (textureSize.y / textureSize.x);\n }\n\n // Do bilinear filtering\n #ifndef OES_texture_float_linear\n vec3 color1 = texture(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\n vec3 color2 = texture(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\n vec3 color3 = texture(projectedMap, coord + pixel).rgb;\n vec3 color4 = texture(projectedMap, coord).rgb;\n\n vec2 texturePosition = coord * textureSize;\n\n float fu = fract(texturePosition.x);\n float fv = fract(texturePosition.y);\n\n vec3 average1 = mix(color4, color2, fu);\n vec3 average2 = mix(color1, color3, fu);\n\n vec3 color = mix(average1, average2, fv);\n #else\n vec3 color = texture(projectedMap, coord).rgb;\n #endif\n\n return color;\n}\n\n\n/**\n * Samples from a cube map that has been projected using an octahedral projection from the given direction.\n *\n * @name czm_sampleOctahedralProjection\n * @glslFunction\n *\n * @param {sampler2D} projectedMap The texture with the octahedral projected cube map.\n * @param {vec2} textureSize The width and height dimensions in pixels of the projected map.\n * @param {vec3} direction The normalized direction used to sample the cube map.\n * @param {float} lod The level of detail to sample.\n * @param {float} maxLod The maximum level of detail.\n * @returns {vec3} The color of the cube map at the direction.\n */\nvec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod, float maxLod) {\n float currentLod = floor(lod + 0.5);\n float nextLod = min(currentLod + 1.0, maxLod);\n\n vec3 colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, currentLod);\n vec3 colorNextLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, nextLod);\n\n return mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation:"/**\n * Adjusts the saturation of a color.\n * \n * @name czm_saturation\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the saturation of the color.\n *\n * @returns {float} The color with the saturation adjusted.\n *\n * @example\n * vec3 greyScale = czm_saturation(color, 0.0);\n * vec3 doubleSaturation = czm_saturation(color, 2.0);\n */\nvec3 czm_saturation(vec3 rgb, float adjustment)\n{\n // Algorithm from Chapter 16 of OpenGL Shading Language\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n vec3 intensity = vec3(dot(rgb, W));\n return mix(intensity, rgb, adjustment);\n}\n",czm_shadowDepthCompare:"\nfloat czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)\n{\n return czm_unpackDepth(czm_textureCube(shadowMap, d));\n}\n\nfloat czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture(shadowMap, uv));\n#endif\n}\n\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n",czm_shadowVisibility:"\nfloat czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n float strength = step(0.0, nDotL);\n#endif\n visibility *= strength;\n#endif\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec2 uv = shadowParameters.texCoords;\n\n depth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\n vec2 texelStepSize = shadowParameters.texelStepSize;\n float radius = 1.0;\n float dx0 = -texelStepSize.x * radius;\n float dy0 = -texelStepSize.y * radius;\n float dx1 = texelStepSize.x * radius;\n float dy1 = texelStepSize.y * radius;\n float visibility = (\n czm_shadowDepthCompare(shadowMap, uv, depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n ) * (1.0 / 9.0);\n#else\n float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",czm_signNotZero:"/**\n * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL\n * built-in function <code>sign</code> except that returns 1.0 instead of 0.0 when the input value is 0.0.\n * \n * @name czm_signNotZero\n * @glslFunction\n *\n * @param {} value The value for which to determine the sign.\n * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.\n */\nfloat czm_signNotZero(float value)\n{\n return value >= 0.0 ? 1.0 : -1.0;\n}\n\nvec2 czm_signNotZero(vec2 value)\n{\n return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\n\nvec3 czm_signNotZero(vec3 value)\n{\n return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\n\nvec4 czm_signNotZero(vec4 value)\n{\n return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}\n",czm_sphericalHarmonics:"/**\n * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.\n * <p>\n * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].\n * </p>\n *\n * @name czm_sphericalHarmonics\n * @glslFunction\n *\n * @param {vec3} normal The normalized direction.\n * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.\n * @returns {vec3} The color at the direction.\n *\n * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf\n */\nvec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])\n{\n vec3 L00 = coefficients[0];\n vec3 L1_1 = coefficients[1];\n vec3 L10 = coefficients[2];\n vec3 L11 = coefficients[3];\n vec3 L2_2 = coefficients[4];\n vec3 L2_1 = coefficients[5];\n vec3 L20 = coefficients[6];\n vec3 L21 = coefficients[7];\n vec3 L22 = coefficients[8];\n\n float x = normal.x;\n float y = normal.y;\n float z = normal.z;\n\n return\n L00\n + L1_1 * y\n + L10 * z\n + L11 * x\n + L2_2 * (y * x)\n + L2_1 * (y * z)\n + L20 * (3.0 * z * z - 1.0)\n + L21 * (z * x)\n + L22 * (x * x - y * y);\n}\n",czm_srgbToLinear:"/**\n * Converts an sRGB color to a linear RGB color.\n *\n * @param {vec3|vec4} srgbIn The color in sRGB space\n * @returns {vec3|vec4} The color in linear color space. The vector type matches the input.\n */\nvec3 czm_srgbToLinear(vec3 srgbIn)\n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 czm_srgbToLinear(vec4 srgbIn) \n{\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n",czm_tangentToEyeSpaceMatrix:"/**\n * Creates a matrix that transforms vectors from tangent space to eye space.\n *\n * @name czm_tangentToEyeSpaceMatrix\n * @glslFunction\n *\n * @param {vec3} normalEC The normal vector in eye coordinates.\n * @param {vec3} tangentEC The tangent vector in eye coordinates.\n * @param {vec3} bitangentEC The bitangent vector in eye coordinates.\n *\n * @returns {mat3} The matrix that transforms from tangent space to eye space.\n *\n * @example\n * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);\n * vec3 normal = tangentToEye * texture(normalMap, st).xyz;\n */\nmat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\n vec3 normal = normalize(normalEC);\n vec3 tangent = normalize(tangentEC);\n vec3 bitangent = normalize(bitangentEC);\n return mat3(tangent.x , tangent.y , tangent.z,\n bitangent.x, bitangent.y, bitangent.z,\n normal.x , normal.y , normal.z);\n}\n",czm_textureCube:"/**\n * A wrapper around the texture (WebGL2) / textureCube (WebGL1)\n * function to allow for WebGL 1 support.\n * \n * @name czm_textureCube\n * @glslFunction\n *\n * @param {samplerCube} sampler The sampler.\n * @param {vec3} p The coordinates to sample the texture at.\n */\nvec4 czm_textureCube(samplerCube sampler, vec3 p) {\n#if __VERSION__ == 300\n return texture(sampler, p);\n#else \n return textureCube(sampler, p);\n#endif\n}",czm_transformPlane:"/**\n * Transforms a plane.\n * \n * @name czm_transformPlane\n * @glslFunction\n *\n * @param {vec4} plane The plane in Hessian Normal Form.\n * @param {mat4} transform The inverse-transpose of a transformation matrix.\n */\nvec4 czm_transformPlane(vec4 plane, mat4 transform) {\n vec4 transformedPlane = transform * plane;\n // Convert the transformed plane to Hessian Normal Form\n float normalMagnitude = length(transformedPlane.xyz);\n return transformedPlane / normalMagnitude;\n}\n",czm_translateRelativeToEye:"/**\n * Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},\n * and then provided to the shader as separate <code>high</code> and <code>low</code> bits to\n * be relative to the eye. As shown in the example, the position can then be transformed in eye\n * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},\n * respectively.\n * <p>\n * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as\n * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.\n * </p>\n *\n * @name czm_translateRelativeToEye\n * @glslFunction\n *\n * @param {vec3} high The position's high bits.\n * @param {vec3} low The position's low bits.\n * @returns {vec3} The position translated to be relative to the camera's position.\n *\n * @example\n * in vec3 positionHigh;\n * in vec3 positionLow;\n *\n * void main()\n * {\n * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n * }\n *\n * @see czm_modelViewRelativeToEye\n * @see czm_modelViewProjectionRelativeToEye\n * @see czm_computePosition\n * @see EncodedCartesian3\n */\nvec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\n vec3 highDifference = high - czm_encodedCameraPositionMCHigh;\n // This check handles the case when NaN values have gotten into `highDifference`.\n // Such a thing could happen on devices running iOS.\n if (length(highDifference) == 0.0) { \n highDifference = vec3(0); \n }\n vec3 lowDifference = low - czm_encodedCameraPositionMCLow;\n\n return vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong:"/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\n\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n }\n\n diffuse = clamp(diffuse, 0.0, 1.0);\n\n float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_transpose:"/**\n * Returns the transpose of the matrix. The input <code>matrix</code> can be\n * a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.\n *\n * @name czm_transpose\n * @glslFunction\n *\n * @param {} matrix The matrix to transpose.\n *\n * @returns {} The transposed matrix.\n *\n * @example\n * // GLSL declarations\n * mat2 czm_transpose(mat2 matrix);\n * mat3 czm_transpose(mat3 matrix);\n * mat4 czm_transpose(mat4 matrix);\n *\n * // Transpose a 3x3 rotation matrix to find its inverse.\n * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(\n * positionMC, normalEC);\n * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);\n */\nmat2 czm_transpose(mat2 matrix)\n{\n return mat2(\n matrix[0][0], matrix[1][0],\n matrix[0][1], matrix[1][1]);\n}\n\nmat3 czm_transpose(mat3 matrix)\n{\n return mat3(\n matrix[0][0], matrix[1][0], matrix[2][0],\n matrix[0][1], matrix[1][1], matrix[2][1],\n matrix[0][2], matrix[1][2], matrix[2][2]);\n}\n\nmat4 czm_transpose(mat4 matrix)\n{\n return mat4(\n matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\n matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\n matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\n matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackClippingExtents:"vec2 getLookupUv(vec2 dimensions, int i) {\n int pixY = i / int(dimensions.x);\n int pixX = i - (pixY * int(dimensions.x));\n float pixelWidth = 1.0 / dimensions.x;\n float pixelHeight = 1.0 / dimensions.y;\n float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel\n float v = (float(pixY) + 0.5) * pixelHeight;\n return vec2(u, v);\n}\n\nvec4 czm_unpackClippingExtents(highp sampler2D extentsTexture, int index) {\n vec2 textureDimensions = vec2(textureSize(extentsTexture, 0));\n return texture(extentsTexture, getLookupUv(textureDimensions, index));\n}",czm_unpackDepth:"/**\n * Unpacks a vec4 depth value to a float in [0, 1) range.\n *\n * @name czm_unpackDepth\n * @glslFunction\n *\n * @param {vec4} packedDepth The packed depth.\n *\n * @returns {float} The floating-point depth in [0, 1) range.\n */\n float czm_unpackDepth(vec4 packedDepth)\n {\n // See Aras Pranckevi\u010dius' post Encoding Floats to RGBA\n // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/\n return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n }\n",czm_unpackFloat:"/**\n * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4.\n *\n * @name czm_unpackFloat\n * @glslFunction\n *\n * @param {vec4} packedFloat The packed float.\n *\n * @returns {float} The floating-point depth in arbitrary range.\n */\nfloat czm_unpackFloat(vec4 packedFloat)\n{\n // Convert to [0.0, 255.0] and round to integer\n packedFloat = floor(packedFloat * 255.0 + 0.5);\n float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0;\n float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0; \n if (exponent == -127.0)\n {\n return 0.0;\n }\n float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000);\n float result = sign * exp2(exponent - 23.0) * mantissa;\n return result;\n}\n",czm_unpackUint:"/**\n * Unpack unsigned integers of 1-4 bytes. in WebGL 1, there is no uint type,\n * so the return value is an int.\n * <p>\n * There are also precision limitations in WebGL 1. highp int is still limited\n * to 24 bits. Above the value of 2^24 = 16777216, precision loss may occur.\n * </p>\n *\n * @param {float|vec2|vec3|vec4} packed The packed value. For vectors, the components are listed in little-endian order.\n *\n * @return {int} The unpacked value.\n */\n int czm_unpackUint(float packedValue) {\n float rounded = czm_round(packedValue * 255.0);\n return int(rounded);\n }\n\n int czm_unpackUint(vec2 packedValue) {\n vec2 rounded = czm_round(packedValue * 255.0);\n return int(dot(rounded, vec2(1.0, 256.0)));\n }\n\n int czm_unpackUint(vec3 packedValue) {\n vec3 rounded = czm_round(packedValue * 255.0);\n return int(dot(rounded, vec3(1.0, 256.0, 65536.0)));\n }\n\n int czm_unpackUint(vec4 packedValue) {\n vec4 rounded = czm_round(packedValue * 255.0);\n return int(dot(rounded, vec4(1.0, 256.0, 65536.0, 16777216.0)));\n }\n",czm_valueTransform:"/**\n * Transform metadata values following the EXT_structural_metadata spec\n * by multiplying by scale and adding the offset. Operations are always\n * performed component-wise, even for matrices.\n * \n * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} offset The offset to add\n * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} scale The scale factor to multiply\n * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} value The original value.\n *\n * @return {float|vec2|vec3|vec4|mat2|mat3|mat4} The transformed value of the same scalar/vector/matrix type as the input.\n */\nfloat czm_valueTransform(float offset, float scale, float value) {\n return scale * value + offset;\n}\n\nvec2 czm_valueTransform(vec2 offset, vec2 scale, vec2 value) {\n return scale * value + offset;\n}\n\nvec3 czm_valueTransform(vec3 offset, vec3 scale, vec3 value) {\n return scale * value + offset;\n}\n\nvec4 czm_valueTransform(vec4 offset, vec4 scale, vec4 value) {\n return scale * value + offset;\n}\n\nmat2 czm_valueTransform(mat2 offset, mat2 scale, mat2 value) {\n return matrixCompMult(scale, value) + offset;\n}\n\nmat3 czm_valueTransform(mat3 offset, mat3 scale, mat3 value) {\n return matrixCompMult(scale, value) + offset;\n}\n\nmat4 czm_valueTransform(mat4 offset, mat4 scale, mat4 value) {\n return matrixCompMult(scale, value) + offset;\n}\n",czm_vertexLogDepth:"#ifdef LOG_DEPTH\n// 1.0 at the near plane, increasing linearly from there.\nout float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nout vec3 v_logPositionEC;\n#endif\n#endif\n\nvec4 czm_updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n\n#ifdef SHADOW_MAP\n vec3 logPositionEC = (czm_inverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n#endif\n\n // With the very high far/near ratios used with the logarithmic depth\n // buffer, floating point rounding errors can cause linear depth values\n // to end up on the wrong side of the far plane, even for vertices that\n // are really nowhere near it. Since we always write a correct logarithmic\n // depth value in the fragment shader anyway, we just need to make sure\n // such errors don't cause the primitive to be clipped entirely before\n // we even get to the fragment shader.\n coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\n\n return coords;\n}\n\n/**\n * Writes the logarithmic depth to gl_Position using the already computed gl_Position.\n *\n * @name czm_vertexLogDepth\n * @glslFunction\n */\nvoid czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;\n gl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\n\n/**\n * Writes the logarithmic depth to gl_Position using the provided clip coordinates.\n * <p>\n * An example use case for this function would be moving the vertex in window coordinates\n * before converting back to clip coordinates. Use the original vertex clip coordinates.\n * </p>\n * @name czm_vertexLogDepth\n * @glslFunction\n *\n * @param {vec4} clipCoords The vertex in clip coordinates.\n *\n * @example\n * czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0));\n */\nvoid czm_vertexLogDepth(vec4 clipCoords)\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;\n czm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates:"vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate)\n{\n // Reconstruct NDC coordinates\n float x = 2.0 * screenCoordinate.x - 1.0;\n float y = 2.0 * screenCoordinate.y - 1.0;\n float z = (screenCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n vec4 q = vec4(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= screenCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s\n {\n q = czm_inverseProjection * q;\n }\n else\n {\n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n\n q.x = (q.x * (right - left) + left + right) * 0.5;\n q.y = (q.y * (top - bottom) + bottom + top) * 0.5;\n q.z = (q.z * (near - far) - near - far) * 0.5;\n q.w = 1.0;\n }\n\n return q;\n}\n\n/**\n * Transforms a position from window to eye coordinates.\n * The transform from window to normalized device coordinates is done using components\n * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating\n * the inverse of <code>czm_viewportTransformation</code>. The transformation from\n * normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,\n * which is expected to be the scalar used in the perspective divide. The transformation\n * from clip to eye coordinates is done using {@link czm_inverseProjection}.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec4} fragmentCoordinate The position in window coordinates to transform.\n *\n * @returns {vec4} The transformed position in eye coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @example\n * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);\n */\nvec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\n vec2 screenCoordXY = (fragmentCoordinate.xy - czm_viewport.xy) / czm_viewport.zw;\n return czm_screenToEyeCoordinates(vec4(screenCoordXY, fragmentCoordinate.zw));\n}\n\nvec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)\n{\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#if defined(LOG_DEPTH) || defined(LOG_DEPTH_READ_ONLY)\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\n float depthFromNear = pow(2.0, log2Depth) - 1.0;\n float depthFromCamera = depthFromNear + near;\n vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n return eyeCoordinate;\n#else\n vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);\n vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);\n#endif\n return eyeCoordinate;\n}\n\n/**\n * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.\n * This function produces more accurate results for window positions with log depth than\n * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version\n * of czm_windowToEyeCoordinates.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.\n * @param {float} depthOrLogDepth A depth or log depth for the fragment.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @returns {vec4} The transformed position in eye coordinates.\n */\nvec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)\n{\n vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw;\n return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth);\n}\n",czm_writeDepthClamp:"// emulated noperspective\n#if !defined(LOG_DEPTH)\nin float v_WindowZ;\n#endif\n\n/**\n * Emulates GL_DEPTH_CLAMP. Clamps a fragment to the near and far plane\n * by writing the fragment's depth. See czm_depthClamp for more details.\n *\n * @name czm_writeDepthClamp\n * @glslFunction\n *\n * @example\n * out_FragColor = color;\n * czm_writeDepthClamp();\n *\n * @see czm_depthClamp\n */\nvoid czm_writeDepthClamp()\n{\n#if (!defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))\n gl_FragDepth = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);\n#endif\n}\n",czm_writeLogDepth:"#ifdef LOG_DEPTH\nin float v_depthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\nuniform vec2 u_polygonOffset;\n#endif\n\n#endif\n\n/**\n * Writes the fragment depth to the logarithmic depth buffer.\n * <p>\n * Use this when the vertex shader does not call {@link czm_vertexlogDepth}, for example, when\n * ray-casting geometry using a full screen quad.\n * </p>\n * @name czm_writeLogDepth\n * @glslFunction\n *\n * @param {float} depth The depth coordinate, where 1.0 is on the near plane and\n * depth increases in eye-space units from there\n *\n * @example\n * czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0);\n */\nvoid czm_writeLogDepth(float depth)\n{\n#if (defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))\n // Discard the vertex if it's not between the near and far planes.\n // We allow a bit of epsilon on the near plane comparison because a 1.0\n // from the vertex shader (indicating the vertex should be _on_ the near\n // plane) will not necessarily come here as exactly 1.0.\n if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {\n discard;\n }\n\n#ifdef POLYGON_OFFSET\n // Polygon offset: m * factor + r * units\n float factor = u_polygonOffset[0];\n float units = u_polygonOffset[1];\n\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n // This factor doesn't work in IE 10\n if (factor != 0.0) {\n // m = sqrt(dZdX^2 + dZdY^2);\n float x = dFdx(depth);\n float y = dFdy(depth);\n float m = sqrt(x * x + y * y);\n\n // Apply the factor before computing the log depth.\n depth += m * factor;\n }\n#endif\n\n#endif\n\n gl_FragDepth = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\n // Apply the units after the log depth.\n gl_FragDepth += czm_epsilon7 * units;\n#endif\n\n#endif\n}\n\n/**\n * Writes the fragment depth to the logarithmic depth buffer.\n * <p>\n * Use this when the vertex shader calls {@link czm_vertexlogDepth}.\n * </p>\n *\n * @name czm_writeLogDepth\n * @glslFunction\n */\nvoid czm_writeLogDepth() {\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",czm_writeNonPerspective:"/**\n * Transforms a value for non-perspective interpolation by multiplying\n * it by w, the value used in the perspective divide. This function is\n * intended to be called in a vertex shader to compute the value of a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The fragment shader\n * must call {@link czm_readNonPerspective} to retrieve the final\n * non-perspective value.\n *\n * @name czm_writeNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.\n * @param {float} w The perspective divide value. Usually this is the computed `gl_Position.w`.\n * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a `varying` and read in the\n * fragment shader with {@link czm_readNonPerspective}.\n */\nfloat czm_writeNonPerspective(float value, float w) {\n return value * w;\n}\n\nvec2 czm_writeNonPerspective(vec2 value, float w) {\n return value * w;\n}\n\nvec3 czm_writeNonPerspective(vec3 value, float w) {\n return value * w;\n}\n\nvec4 czm_writeNonPerspective(vec4 value, float w) {\n return value * w;\n}\n"};function k4(e){return(e=e.replace(/\/\/.*/g,"")).replace(/\/\*\*[\s\S]*?\*\//gm,function(t){const n=t.match(/\n/gm).length;let i="";for(let o=0;o<n;++o)i+="\n";return i})}function U4(e,t,n){let i;for(let o=0;o<n.length;++o)n[o].name===e&&(i=n[o]);return c(i)||(i={name:e,glslSource:t=k4(t),dependsOn:[],requiredBy:[],evaluated:!1},n.push(i)),i}function z4(e,t){if(e.evaluated)return;e.evaluated=!0;let n=e.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g);c(n)&&null!==n&&(n=n.filter(function(i,o){return n.indexOf(i)===o}),n.forEach(function(i){if(i!==e.name&&_s._czmBuiltinsAndUniforms.hasOwnProperty(i)){const o=U4(i,_s._czmBuiltinsAndUniforms[i],t);e.dependsOn.push(o),o.requiredBy.push(e),z4(o,t)}}))}function Cue(e){const t=[],n=U4("main",e,t);z4(n,t),function xue(e){const t=[],n=[];for(;e.length>0;){const o=e.pop();n.push(o),0===o.requiredBy.length&&t.push(o)}for(;t.length>0;){const o=t.shift();e.push(o);for(let r=0;r<o.dependsOn.length;++r){const s=o.dependsOn[r],a=s.requiredBy.indexOf(o);s.requiredBy.splice(a,1),0===s.requiredBy.length&&t.push(s)}}const i=[];for(let o=0;o<n.length;++o)0!==n[o].requiredBy.length&&i.push(n[o]);if(0!==i.length){let o="A circular dependency was found in the following built-in functions/structs/constants: \n";for(let r=0;r<i.length;++r)o=`${o+i[r].name}\n`;throw new E(o)}}(t);let i="";for(let o=t.length-1;o>=0;--o)i=`${i+t[o].glslSource}\n`;return i.replace(n.glslSource,"")}function V4(e,t,n){let i,o,r="";const s=e.sources;if(c(s))for(i=0,o=s.length;i<o;++i)r+=`\n#line 0\n${s[i]}`;let a;r=k4(r),r=r.replace(/#version\s+(.*?)\n/gm,function(y,b){if(c(a)&&a!==b)throw new E(`inconsistent versions found: ${a} and ${b}`);return a=b,"\n"});const l=[];r=r.replace(/#extension.*\n/gm,function(y){return l.push(y),"\n"}),r=r.replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");const u=e.pickColorQualifier;c(u)&&(r=_s.createPickFragmentShaderSource(r,u));let d="";const h=l.length;for(i=0;i<h;i++)d+=l[i];t&&(d+="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n#else\n precision mediump float;\n precision mediump int;\n #define highp mediump\n#endif\n\n");const m=e.defines;if(c(m))for(i=0,o=m.length;i<o;++i){const y=m[i];0!==y.length&&(d+=`#define ${y}\n`)}n.textureFloatLinear&&(d+="#define OES_texture_float_linear\n\n"),n.floatingPointTexture&&(d+="#define OES_texture_float\n\n");let _="";e.includeBuiltIns&&(_=Cue(r)),d+="\n#line 0\n";const p=_+r;return n.webgl2&&t&&!/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g.test(p)&&!/czm_out_FragColor/g.test(p)&&/out_FragColor/g.test(p)&&(d+="layout(location = 0) out vec4 out_FragColor;\n\n"),d+=_,d+=r,d=n.webgl2?`#version 300 es\n${d}`:function Tue(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,"\nvarying $2"),/out_FragData_(\d+)/.test(n)&&(n=`#extension GL_EXT_draw_buffers : enable\n${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=n.replaceAll(/gl_FragDepth/g,"gl_FragDepthEXT")),n=`#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n${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}`,n}(d,t),d}function _s(e){const t=(e=g(e,g.EMPTY_OBJECT)).pickColorQualifier;if(c(t)&&"uniform"!==t&&"in"!==t)throw new E("options.pickColorQualifier must be 'uniform' or 'in'.");this.defines=c(e.defines)?e.defines.slice(0):[],this.sources=c(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=g(e.includeBuiltIns,!0)}_s.prototype.clone=function(){return new _s({sources:this.sources,defines:this.defines,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})},_s.replaceMain=function(e,t){return e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t=`void ${t}()`)},_s.prototype.getCacheKey=function(){return`${this.defines.slice().sort().join(",")}:${this.pickColorQualifier}:${this.includeBuiltIns}:${this.sources.join("\n")}`},_s.prototype.createCombinedVertexShader=function(e){return V4(this,!1,e)},_s.prototype.createCombinedFragmentShader=function(e){return V4(this,!0,e)},_s._czmBuiltinsAndUniforms={};for(const e in $O)$O.hasOwnProperty(e)&&(_s._czmBuiltinsAndUniforms[e]=$O[e]);for(const e in nS)if(nS.hasOwnProperty(e)){const t=nS[e];"function"==typeof t.getDeclaration&&(_s._czmBuiltinsAndUniforms[e]=t.getDeclaration(e))}function H4(e,t){const n=e.sources,i=n.length;for(let o=0;o<i;++o)if(-1!==n[o].indexOf(t))return!0;return!1}function G4(e,t){const n=t.length;for(let i=0;i<n;++i){const o=t[i];if(H4(e,o))return o}}_s.createPickVertexShaderSource=function(e){return`${_s.replaceMain(e,"czm_old_main")}\nin vec4 pickColor; \nout vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n czm_pickColor = pickColor; \n}`},_s.createPickFragmentShaderSource=function(e,t){return`${_s.replaceMain(e,"czm_old_main")}\n${t} vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n if (out_FragColor.a == 0.0) { \n discard; \n } \n out_FragColor = czm_pickColor; \n}`};const wue=["v_normalEC","v_normal"];_s.findNormalVarying=function(e){return H4(e,"#ifdef HAS_NORMALS")?function Eue(e,t){const n=e.defines,i=n.length;for(let o=0;o<i;++o)if(n[o]===t)return!0;return!1}(e,"HAS_NORMALS")?"v_normalEC":void 0:G4(e,wue)};const Sue=["v_positionEC"];_s.findPositionVarying=function(e){return G4(e,Sue)};const St=_s;function Mu(e){e=g(e,g.EMPTY_OBJECT),A.defined("options.context",e.context);const t=e.context;let n=e.width,i=e.height;const o=e.source;c(o)&&(c(n)||(n=g(o.videoWidth,o.width)),c(i)||(i=g(o.videoHeight,o.height)));const r=g(e.pixelFormat,Ct.RGBA),s=g(e.pixelDatatype,yt.UNSIGNED_BYTE),a=Ct.toInternalFormat(r,s,t),l=Ct.isCompressedFormat(a);if(!c(n)||!c(i))throw new E("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(A.typeOf.number.greaterThan("width",n,0),n>dn.maximumTextureSize)throw new E(`Width must be less than or equal to the maximum texture size (${dn.maximumTextureSize}). Check maximumTextureSize.`);if(A.typeOf.number.greaterThan("height",i,0),i>dn.maximumTextureSize)throw new E(`Height must be less than or equal to the maximum texture size (${dn.maximumTextureSize}). Check maximumTextureSize.`);if(!Ct.validate(r))throw new E("Invalid options.pixelFormat.");if(!l&&!yt.validate(s))throw new E("Invalid options.pixelDatatype.");if(r===Ct.DEPTH_COMPONENT&&s!==yt.UNSIGNED_SHORT&&s!==yt.UNSIGNED_INT)throw new E("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(r===Ct.DEPTH_STENCIL&&s!==yt.UNSIGNED_INT_24_8)throw new E("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(s===yt.FLOAT&&!t.floatingPointTexture)throw new E("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(s===yt.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new E("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(Ct.isDepthFormat(r)){if(c(o))throw new E("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.");if(!t.depthTexture)throw new E("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.")}if(l){if(!c(o)||!c(o.arrayBufferView))throw new E("When options.pixelFormat is compressed, options.source.arrayBufferView must be defined.");if(Ct.isDXTFormat(a)&&!t.s3tc)throw new E("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_compressed_texture_s3tc extension. Check context.s3tc.");if(Ct.isPVRTCFormat(a)&&!t.pvrtc)throw new E("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_pvrtc extension. Check context.pvrtc.");if(Ct.isASTCFormat(a)&&!t.astc)throw new E("When options.pixelFormat is ASTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_astc extension. Check context.astc.");if(Ct.isETC2Format(a)&&!t.etc)throw new E("When options.pixelFormat is ETC2 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc extension. Check context.etc.");if(Ct.isETC1Format(a)&&!t.etc1)throw new E("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc1 extension. Check context.etc1.");if(Ct.isBC7Format(a)&&!t.bc7)throw new E("When options.pixelFormat is BC7 compressed, this WebGL implementation must support the EXT_texture_compression_bptc extension. Check context.bc7.");if(Ct.compressedTextureSizeInBytes(a,n,i)!==o.arrayBufferView.byteLength)throw new E("The byte length of the array buffer is invalid for the compressed texture with the given width and height.")}const u=e.preMultiplyAlpha||r===Ct.RGB||r===Ct.LUMINANCE,d=g(e.flipY,!0),h=g(e.skipColorSpaceConversion,!1);let m=!0;const _=t._gl,p=_.TEXTURE_2D,y=_.createTexture();_.activeTexture(_.TEXTURE0),_.bindTexture(p,y);let x,b=4;if(c(o)&&c(o.arrayBufferView)&&!l&&(b=Ct.alignmentInBytes(r,s,n)),_.pixelStorei(_.UNPACK_ALIGNMENT,b),_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,h?_.NONE:_.BROWSER_DEFAULT_WEBGL),c(o))if(c(o.arrayBufferView)){_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,!1);let w,v,I,C=o.arrayBufferView;if(l){if(_.compressedTexImage2D(p,0,a,n,i,0,C),c(o.mipLevels))for(v=n,I=i,w=0;w<o.mipLevels.length;++w)v=0|Math.floor(v/2),v<1&&(v=1),I=0|Math.floor(I/2),I<1&&(I=1),_.compressedTexImage2D(p,w+1,a,v,I,0,o.mipLevels[w])}else if(d&&(C=Ct.flipY(C,r,s,n,i)),_.texImage2D(p,0,a,n,i,0,r,yt.toWebGLConstant(s,t),C),c(o.mipLevels))for(v=n,I=i,w=0;w<o.mipLevels.length;++w)v=0|Math.floor(v/2),v<1&&(v=1),I=0|Math.floor(I/2),I<1&&(I=1),_.texImage2D(p,w+1,a,v,I,0,r,yt.toWebGLConstant(s,t),o.mipLevels[w])}else c(o.framebuffer)?(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,!1),o.framebuffer!==t.defaultFramebuffer&&o.framebuffer._bind(),_.copyTexImage2D(p,0,a,o.xOffset,o.yOffset,n,i,0),o.framebuffer!==t.defaultFramebuffer&&o.framebuffer._unBind()):(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,d),_.texImage2D(p,0,a,r,yt.toWebGLConstant(s,t),o));else _.texImage2D(p,0,a,n,i,0,r,yt.toWebGLConstant(s,t),null),m=!1;_.bindTexture(p,null),x=l?Ct.compressedTextureSizeInBytes(r,n,i):Ct.textureSizeInBytes(r,s,n,i),this._id=kr(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p,this._texture=y,this._internalFormat=a,this._pixelFormat=r,this._pixelDatatype=s,this._width=n,this._height=i,this._dimensions=new V(n,i),this._hasMipmap=!1,this._sizeInBytes=x,this._preMultiplyAlpha=u,this._flipY=d,this._initialized=m,this._sampler=void 0,this.sampler=c(e.sampler)?e.sampler:new vi}Mu.create=function(e){return new Mu(e)},Mu.fromFramebuffer=function(e){e=g(e,g.EMPTY_OBJECT),A.defined("options.context",e.context);const t=e.context,n=t._gl,i=g(e.pixelFormat,Ct.RGB),o=g(e.framebufferXOffset,0),r=g(e.framebufferYOffset,0),s=g(e.width,n.drawingBufferWidth),a=g(e.height,n.drawingBufferHeight),l=e.framebuffer;if(!Ct.validate(i))throw new E("Invalid pixelFormat.");if(Ct.isDepthFormat(i)||Ct.isCompressedFormat(i))throw new E("pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.");if(A.defined("options.context",e.context),A.typeOf.number.greaterThanOrEquals("framebufferXOffset",o,0),A.typeOf.number.greaterThanOrEquals("framebufferYOffset",r,0),o+s>n.drawingBufferWidth)throw new E("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(r+a>n.drawingBufferHeight)throw new E("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new Mu({context:t,width:s,height:a,pixelFormat:i,source:{framebuffer:c(l)?l:t.defaultFramebuffer,xOffset:o,yOffset:r,width:s,height:a}})},Object.defineProperties(Mu.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){let t=e.minificationFilter,n=e.magnificationFilter;const i=this._context,r=this._pixelDatatype;(r===yt.FLOAT&&!i.textureFloatLinear||r===yt.HALF_FLOAT&&!i.textureHalfFloatLinear)&&(t=t===Kn.NEAREST_MIPMAP_NEAREST||t===Kn.NEAREST_MIPMAP_LINEAR||t===Kn.LINEAR_MIPMAP_NEAREST||t===Kn.LINEAR_MIPMAP_LINEAR?Kn.NEAREST_MIPMAP_NEAREST:Kn.NEAREST,n=Jr.NEAREST),i.webgl2&&Ct.isDepthFormat(this._pixelFormat)&&(t=Kn.NEAREST,n=Jr.NEAREST);const a=i._gl,l=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(l,this._texture),a.texParameteri(l,a.TEXTURE_MIN_FILTER,t),a.texParameteri(l,a.TEXTURE_MAG_FILTER,n),a.texParameteri(l,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(l,a.TEXTURE_WRAP_T,e.wrapT),c(this._textureFilterAnisotropic)&&a.texParameteri(l,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(l,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),Mu.prototype.copyFrom=function(e){A.defined("options",e);const t=g(e.xOffset,0),n=g(e.yOffset,0);if(A.defined("options.source",e.source),Ct.isDepthFormat(this._pixelFormat))throw new E("Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(Ct.isCompressedFormat(this._pixelFormat))throw new E("Cannot call copyFrom with a compressed texture pixel format.");A.typeOf.number.greaterThanOrEquals("xOffset",t,0),A.typeOf.number.greaterThanOrEquals("yOffset",n,0),A.typeOf.number.lessThanOrEquals("xOffset + options.source.width",t+e.source.width,this._width),A.typeOf.number.lessThanOrEquals("yOffset + options.source.height",n+e.source.height,this._height);const i=e.source,o=this._context,r=o._gl,s=this._textureTarget;r.activeTexture(r.TEXTURE0),r.bindTexture(s,this._texture);const a=i.width,l=i.height;let u=i.arrayBufferView;const d=this._width,h=this._height,m=this._internalFormat,_=this._pixelFormat,p=this._pixelDatatype,y=this._preMultiplyAlpha,b=this._flipY,x=g(e.skipColorSpaceConversion,!1);let C=4;c(u)&&(C=Ct.alignmentInBytes(_,p,a)),r.pixelStorei(r.UNPACK_ALIGNMENT,C),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,x?r.NONE:r.BROWSER_DEFAULT_WEBGL);let w=!1;if(!this._initialized){if(0===t&&0===n&&a===d&&l===h)c(u)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),b&&(u=Ct.flipY(u,_,p,d,h)),r.texImage2D(s,0,m,d,h,0,_,yt.toWebGLConstant(p,o),u)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,b),r.texImage2D(s,0,m,_,yt.toWebGLConstant(p,o),i)),w=!0;else{r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);const v=Ct.createTypedArray(_,p,d,h);r.texImage2D(s,0,m,d,h,0,_,yt.toWebGLConstant(p,o),v)}this._initialized=!0}w||(c(u)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),b&&(u=Ct.flipY(u,_,p,a,l)),r.texSubImage2D(s,0,t,n,a,l,_,yt.toWebGLConstant(p,o),u)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,b),r.texSubImage2D(s,0,t,n,_,yt.toWebGLConstant(p,o),i))),r.bindTexture(s,null)},Mu.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){if(e=g(e,0),t=g(t,0),n=g(n,0),i=g(i,0),o=g(o,this._width),r=g(r,this._height),Ct.isDepthFormat(this._pixelFormat))throw new E("Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(this._pixelDatatype===yt.FLOAT)throw new E("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===yt.HALF_FLOAT)throw new E("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");if(Ct.isCompressedFormat(this._pixelFormat))throw new E("Cannot call copyFrom with a compressed texture pixel format.");A.typeOf.number.greaterThanOrEquals("xOffset",e,0),A.typeOf.number.greaterThanOrEquals("yOffset",t,0),A.typeOf.number.greaterThanOrEquals("framebufferXOffset",n,0),A.typeOf.number.greaterThanOrEquals("framebufferYOffset",i,0),A.typeOf.number.lessThanOrEquals("xOffset + width",e+o,this._width),A.typeOf.number.lessThanOrEquals("yOffset + height",t+r,this._height);const s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(a,0,e,t,n,i,o,r),s.bindTexture(a,null),this._initialized=!0},Mu.prototype.generateMipmap=function(e){if(e=g(e,s0.DONT_CARE),Ct.isDepthFormat(this._pixelFormat))throw new E("Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(Ct.isCompressedFormat(this._pixelFormat))throw new E("Cannot call generateMipmap with a compressed pixel format.");if(!this._context.webgl2){if(this._width>1&&!O.isPowerOfTwo(this._width))throw new E("width must be a power of two to call generateMipmap() in a WebGL1 context.");if(this._height>1&&!O.isPowerOfTwo(this._height))throw new E("height must be a power of two to call generateMipmap() in a WebGL1 context.")}if(!s0.validate(e))throw new E("hint is invalid.");this._hasMipmap=!0;const t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)},Mu.prototype.isDestroyed=function(){return!1},Mu.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),Xe(this)};const Mn=Mu,a0=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3}),Ks={POINTS:ie.POINTS,LINES:ie.LINES,LINE_LOOP:ie.LINE_LOOP,LINE_STRIP:ie.LINE_STRIP,TRIANGLES:ie.TRIANGLES,TRIANGLE_STRIP:ie.TRIANGLE_STRIP,TRIANGLE_FAN:ie.TRIANGLE_FAN,isLines:function(e){return e===Ks.LINES||e===Ks.LINE_LOOP||e===Ks.LINE_STRIP},isTriangles:function(e){return e===Ks.TRIANGLES||e===Ks.TRIANGLE_STRIP||e===Ks.TRIANGLE_FAN},validate:function(e){return e===Ks.POINTS||e===Ks.LINES||e===Ks.LINE_LOOP||e===Ks.LINE_STRIP||e===Ks.TRIANGLES||e===Ks.TRIANGLE_STRIP||e===Ks.TRIANGLE_FAN}},Tt=Object.freeze(Ks);function KO(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=g(e.primitiveType,Tt.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=g(e.geometryType,a0.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}KO.computeNumberOfVertices=function(e){A.typeOf.object("geometry",e);let t=-1;for(const n in e.attributes)if(e.attributes.hasOwnProperty(n)&&c(e.attributes[n])&&c(e.attributes[n].values)){const i=e.attributes[n],o=i.values.length/i.componentsPerAttribute;if(t!==o&&-1!==t)throw new E("All attribute lists must have the same number of attributes.");t=o}return t};const vue=new Ce,Iue=new f,j4=new k,Due=[new Ce,new Ce,new Ce],Pue=[new V,new V,new V],Oue=[new V,new V,new V],Rue=new f,Lue=new bt,Nue=new k,Mue=new Kr;KO._textureCoordinateRotationPoints=function(e,t,n,i){let o;const r=Te.center(i,vue),s=Ce.toCartesian(r,n,Iue),a=In.eastNorthUpToFixedFrame(s,n,j4),l=k.inverse(a,j4),u=Pue,d=Due;d[0].longitude=i.west,d[0].latitude=i.south,d[1].longitude=i.west,d[1].latitude=i.north,d[2].longitude=i.east,d[2].latitude=i.south;let h=Rue;for(o=0;o<3;o++)Ce.toCartesian(d[o],n,h),h=k.multiplyByPointAsVector(l,h,h),u[o].x=h.x,u[o].y=h.y;const m=bt.fromAxisAngle(f.UNIT_Z,-t,Lue),_=oe.fromQuaternion(m,Nue),p=e.length;let y=Number.POSITIVE_INFINITY,b=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,C=Number.NEGATIVE_INFINITY;for(o=0;o<p;o++)h=k.multiplyByPointAsVector(l,e[o],h),h=oe.multiplyByVector(_,h,h),y=Math.min(y,h.x),b=Math.min(b,h.y),x=Math.max(x,h.x),C=Math.max(C,h.y);const w=Kr.fromRotation(t,Mue),v=Oue;v[0].x=y,v[0].y=b,v[1].x=y,v[1].y=C,v[2].x=x,v[2].y=b;const I=u[0],P=u[2].x-I.x,N=u[1].y-I.y;for(o=0;o<3;o++){const D=v[o];Kr.multiplyByVector(w,D,D),D.x=(D.x-I.x)/P,D.y=(D.y-I.y)/N}const R=v[0],B=v[1],F=v[2],S=new Array(6);return V.pack(R,S),V.pack(B,S,2),V.pack(F,S,4),S};const En=KO;function Fue(e,t,n,i){const o=c(t.vertexBuffer),r=c(t.value),s=t.value?t.value.length:t.componentsPerAttribute;if(!o&&!r)throw new E("attribute must have a vertexBuffer or a value.");if(o&&r)throw new E("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(1!==s&&2!==s&&3!==s&&4!==s)throw new E(r?"attribute.value.length must be in the range [1, 4].":"attribute.componentsPerAttribute must be in the range [1, 4].");if(c(t.componentDatatype)&&!ee.validate(t.componentDatatype))throw new E("attribute must have a valid componentDatatype or not specify it.");if(c(t.strideInBytes)&&t.strideInBytes>255)throw new E("attribute must have a strideInBytes less than or equal to 255 or not specify it.");if(c(t.instanceDivisor)&&t.instanceDivisor>0&&!i.instancedArrays)throw new E("instanced arrays is not supported");if(c(t.instanceDivisor)&&t.instanceDivisor<0)throw new E("attribute must have an instanceDivisor greater than or equal to zero");if(c(t.instanceDivisor)&&r)throw new E("attribute cannot have have an instanceDivisor if it is not backed by a buffer");if(c(t.instanceDivisor)&&t.instanceDivisor>0&&0===t.index)throw new E("attribute zero cannot have an instanceDivisor greater than 0");const a={index:g(t.index,n),enabled:g(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:r?t.value.slice(0):void 0,componentsPerAttribute:s,componentDatatype:g(t.componentDatatype,ee.FLOAT),normalize:g(t.normalize,!1),offsetInBytes:g(t.offsetInBytes,0),strideInBytes:g(t.strideInBytes,0),instanceDivisor:g(t.instanceDivisor,0)};if(o)a.vertexAttrib=function(l){const u=this.index;l.bindBuffer(l.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),l.vertexAttribPointer(u,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),l.enableVertexAttribArray(u),this.instanceDivisor>0&&(i.glVertexAttribDivisor(u,this.instanceDivisor),i._vertexAttribDivisors[u]=this.instanceDivisor,i._previousDrawInstanced=!0)},a.disableVertexAttribArray=function(l){l.disableVertexAttribArray(this.index),this.instanceDivisor>0&&i.glVertexAttribDivisor(n,0)};else{switch(a.componentsPerAttribute){case 1:a.vertexAttrib=function(l){l.vertexAttrib1fv(this.index,this.value)};break;case 2:a.vertexAttrib=function(l){l.vertexAttrib2fv(this.index,this.value)};break;case 3:a.vertexAttrib=function(l){l.vertexAttrib3fv(this.index,this.value)};break;case 4:a.vertexAttrib=function(l){l.vertexAttrib4fv(this.index,this.value)}}a.disableVertexAttribArray=function(l){}}e.push(a)}function W4(e,t,n){for(let i=0;i<t.length;++i){const o=t[i];o.enabled&&o.vertexAttrib(e)}c(n)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n._getBuffer())}function Zf(e){e=g(e,g.EMPTY_OBJECT),A.defined("options.context",e.context),A.defined("options.attributes",e.attributes);const t=e.context,n=t._gl,i=e.attributes,o=e.indexBuffer;let r;const s=[];let a=1,l=!1,u=!1,d=i.length;for(r=0;r<d;++r)Fue(s,i[r],r,t);for(d=s.length,r=0;r<d;++r){const _=s[r];if(c(_.vertexBuffer)&&0===_.instanceDivisor){const p=_.strideInBytes||_.componentsPerAttribute*ee.getSizeInBytes(_.componentDatatype);a=_.vertexBuffer.sizeInBytes/p;break}}for(r=0;r<d;++r)s[r].instanceDivisor>0&&(l=!0),c(s[r].value)&&(u=!0);const h={};for(r=0;r<d;++r){const _=s[r].index;if(h[_])throw new E(`Index ${_} is used by more than one attribute.`);h[_]=!0}let m;t.vertexArrayObject&&(m=t.glCreateVertexArray(),t.glBindVertexArray(m),W4(n,s,o),t.glBindVertexArray(null)),this._numberOfVertices=a,this._hasInstancedAttributes=l,this._hasConstantAttributes=u,this._context=t,this._gl=n,this._vao=m,this._attributes=s,this._indexBuffer=o}function q4(e){return e.values.length/e.componentsPerAttribute}function Bue(e){return ee.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}Zf.fromGeometry=function(e){e=g(e,g.EMPTY_OBJECT),A.defined("options.context",e.context);const t=e.context,n=g(e.geometry,g.EMPTY_OBJECT),i=g(e.bufferUsage,At.DYNAMIC_DRAW),o=g(e.attributeLocations,g.EMPTY_OBJECT),r=g(e.interleave,!1),s=e.vertexArrayAttributes;let a,l,u;const d=c(s)?s:[],h=n.attributes;if(r){const p=function kue(e){let t,n,i;const o=[];for(n in e)e.hasOwnProperty(n)&&c(e[n])&&c(e[n].values)&&(o.push(n),e[n].componentDatatype===ee.DOUBLE&&(e[n].componentDatatype=ee.FLOAT,e[n].values=ee.createTypedArray(ee.FLOAT,e[n].values)));let r;const s=o.length;if(s>0)for(r=q4(e[o[0]]),t=1;t<s;++t){const u=q4(e[o[t]]);if(u!==r)throw new Pe(`Each attribute list must have the same number of vertices. Attribute ${o[t]} has a different number of vertices (${u.toString()}) than attribute ${o[0]} (${r.toString()}).`)}o.sort(function(u,d){return ee.getSizeInBytes(e[d].componentDatatype)-ee.getSizeInBytes(e[u].componentDatatype)});let a=0;const l={};for(t=0;t<s;++t)n=o[t],i=e[n],l[n]=a,a+=Bue(i);if(a>0){const u=ee.getSizeInBytes(e[o[0]].componentDatatype),d=a%u;0!==d&&(a+=u-d);const m=new ArrayBuffer(r*a),_={};for(t=0;t<s;++t){n=o[t];const p=ee.getSizeInBytes(e[n].componentDatatype);_[n]={pointer:ee.createTypedArray(e[n].componentDatatype,m),index:l[n]/p,strideInComponentType:a/p}}for(t=0;t<r;++t)for(let p=0;p<s;++p){n=o[p],i=e[n];const y=i.values,b=_[n],x=b.pointer,C=i.componentsPerAttribute;for(let w=0;w<C;++w)x[b.index+w]=y[t*C+w];b.index+=b.strideInComponentType}return{buffer:m,offsetsInBytes:l,vertexSizeInBytes:a}}}(h);if(c(p)){u=yn.createVertexBuffer({context:t,typedArray:p.buffer,usage:i});const y=p.offsetsInBytes,b=p.vertexSizeInBytes;for(a in h)h.hasOwnProperty(a)&&c(h[a])&&(l=h[a],c(l.values)?d.push({index:o[a],vertexBuffer:u,componentDatatype:l.componentDatatype,componentsPerAttribute:l.componentsPerAttribute,normalize:l.normalize,offsetInBytes:y[a],strideInBytes:b}):d.push({index:o[a],value:l.value,componentDatatype:l.componentDatatype,normalize:l.normalize}))}}else for(a in h)if(h.hasOwnProperty(a)&&c(h[a])){l=h[a];let p=l.componentDatatype;p===ee.DOUBLE&&(p=ee.FLOAT),u=void 0,c(l.values)&&(u=yn.createVertexBuffer({context:t,typedArray:ee.createTypedArray(p,l.values),usage:i})),d.push({index:o[a],vertexBuffer:u,value:l.value,componentDatatype:p,componentsPerAttribute:l.componentsPerAttribute,normalize:l.normalize})}let m;const _=n.indices;return c(_)&&(m=En.computeNumberOfVertices(n)>=O.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?yn.createIndexBuffer({context:t,typedArray:new Uint32Array(_),usage:i,indexDatatype:Ot.UNSIGNED_INT}):yn.createIndexBuffer({context:t,typedArray:new Uint16Array(_),usage:i,indexDatatype:Ot.UNSIGNED_SHORT})),new Zf({context:t,attributes:d,indexBuffer:m})},Object.defineProperties(Zf.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),Zf.prototype.getAttribute=function(e){return A.defined("index",e),this._attributes[e]},Zf.prototype._bind=function(){c(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&function Uue(e){const t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;const i=t._vertexAttribDivisors,o=e._attributes,r=dn.maximumVertexAttributes;let s;if(n){const a=o.length;for(s=0;s<a;++s){const l=o[s];if(l.enabled){const u=l.instanceDivisor,d=l.index;u!==i[d]&&(t.glVertexAttribDivisor(d,u),i[d]=u)}}}else for(s=0;s<r;++s)i[s]>0&&(t.glVertexAttribDivisor(s,0),i[s]=0)}(this),this._hasConstantAttributes&&function zue(e,t){const n=e._attributes,i=n.length;for(let o=0;o<i;++o){const r=n[o];r.enabled&&c(r.value)&&r.vertexAttrib(t)}}(this,this._gl)):W4(this._gl,this._attributes,this._indexBuffer)},Zf.prototype._unBind=function(){if(c(this._vao))this._context.glBindVertexArray(null);else{const e=this._attributes,t=this._gl;for(let n=0;n<e.length;++n){const i=e[n];i.enabled&&i.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}},Zf.prototype.isDestroyed=function(){return!1},Zf.prototype.destroy=function(){const e=this._attributes;for(let n=0;n<e.length;++n){const i=e[n].vertexBuffer;c(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}const t=this._indexBuffer;return c(t)&&!t.isDestroyed()&&t.vertexArrayDestroyable&&t.destroy(),c(this._vao)&&this._context.glDeleteVertexArray(this._vao),Xe(this)};const gs=Zf;function E_(e){this._url=e,this._cubeMapBuffers=void 0,this._cubeMaps=void 0,this._texture=void 0,this._mipTextures=void 0,this._va=void 0,this._sp=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._errorEvent=new Ye}Object.defineProperties(E_.prototype,{url:{get:function(){return this._url}},errorEvent:{get:function(){return this._errorEvent}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}}}),E_.isSupported=function(e){return e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat};const jue=new f(1,0,0),Wue=new f(0,0,1),que=new f(-1,0,0),Yue=new f(0,0,-1),oS=new f(0,1,0),Y4=[oS,que,Wue,new f(0,-1,0),jue,oS,Yue,oS,oS],X4=Y4.length,Z4=new Float32Array(3*X4);let $4=0;for(let e=0;e<X4;++e,$4+=3)f.pack(Y4[e],Z4,$4);const Zue=new Float32Array([-1,1,-1,0,0,1,0,0,1,0,1,1,0,-1,-1,-1,1,-1]),$ue=new Uint16Array([0,1,2,2,3,1,7,6,1,3,6,1,2,5,4,3,4,2,4,8,6,3,4,6]);function K4(e){return function(){return e}}function QO(e){let t,n;e._va=e._va&&e._va.destroy(),e._sp=e._sp&&e._sp.destroy();const i=e._cubeMaps;if(c(i))for(n=i.length,t=0;t<n;++t)i[t].destroy();const o=e._mipTextures;if(c(o))for(n=o.length,t=0;t<n;++t)o[t].destroy();e._va=void 0,e._sp=void 0,e._cubeMaps=void 0,e._cubeMapBuffers=void 0,e._mipTextures=void 0}E_.prototype.update=function(e){const t=e.context;if(!E_.isSupported(t)||(c(this._texture)&&c(this._va)&&QO(this),c(this._texture)))return;if(!c(this._texture)&&!this._loading){const _=e.context.textureCache.getTexture(this._url);c(_)&&(QO(this),this._texture=_,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0)}const n=this._cubeMapBuffers;if(!c(n)&&!this._loading){const _=this;o0(this._url).then(function(p){_._cubeMapBuffers=p,_._loading=!1}).catch(function(p){_.isDestroyed()||_._errorEvent.raiseEvent(p)}),this._loading=!0}if(!c(this._cubeMapBuffers))return;const i=[];let o=n[0].positiveX.pixelDatatype;c(o)?i.push("RGBA_NORMALIZED"):o=t.halfFloatingPointTexture?yt.HALF_FLOAT:yt.FLOAT;const r=Ct.RGBA,s=new St({defines:i,sources:["in vec3 v_cubeMapCoordinates;\nuniform samplerCube cubeMap;\n\nvoid main()\n{\n vec4 rgba = czm_textureCube(cubeMap, v_cubeMapCoordinates);\n #ifdef RGBA_NORMALIZED\n out_FragColor = vec4(rgba.rgb, 1.0);\n #else\n float m = rgba.a * 16.0;\n vec3 r = rgba.rgb * m;\n out_FragColor = vec4(r * r, 1.0);\n #endif\n}\n"]});this._va=function Kue(e){const t=yn.createVertexBuffer({context:e,typedArray:Zue,usage:At.STATIC_DRAW}),n=yn.createVertexBuffer({context:e,typedArray:Z4,usage:At.STATIC_DRAW}),i=yn.createIndexBuffer({context:e,typedArray:$ue,usage:At.STATIC_DRAW,indexDatatype:Ot.UNSIGNED_SHORT});return new gs({context:e,attributes:[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:ee.FLOAT},{index:1,vertexBuffer:n,componentsPerAttribute:3,componentDatatype:ee.FLOAT}],indexBuffer:i})}(t),this._sp=di.fromCache({context:t,vertexShaderSource:"in vec4 position;\nin vec3 cubeMapCoordinates;\n\nout vec3 v_cubeMapCoordinates;\n\nvoid main()\n{\n gl_Position = position;\n v_cubeMapCoordinates = cubeMapCoordinates;\n}\n",fragmentShaderSource:s,attributeLocations:{position:0,cubeMapCoordinates:1}});const a=Math.min(n.length,6);this._maximumMipmapLevel=a-1;const l=this._cubeMaps=new Array(a),u=this._mipTextures=new Array(a),d=2*n[0].positiveX.width,h={originalSize:function(){return d}};for(let _=0;_<a;++_){const p=n[_].positiveY;n[_].positiveY=n[_].negativeY,n[_].negativeY=p;const y=l[_]=new C_({context:t,source:n[_],pixelDatatype:o}),b=2*l[_].width,x=u[_]=new Mn({context:t,width:b,height:b,pixelDatatype:o,pixelFormat:r}),C=new mA({vertexArray:this._va,shaderProgram:this._sp,uniformMap:{cubeMap:K4(y)},outputTexture:x,persists:!0,owner:this});e.commandList.push(C),h[`texture${_}`]=K4(x)}this._texture=new Mn({context:t,width:1.5*d+2,height:d,pixelDatatype:o,pixelFormat:r}),this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture);const m=new mA({fragmentShaderSource:"in vec2 v_textureCoordinates;\n\nuniform float originalSize;\nuniform sampler2D texture0;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\n\nconst float yMipLevel1 = 1.0 - (1.0 / pow(2.0, 1.0));\nconst float yMipLevel2 = 1.0 - (1.0 / pow(2.0, 2.0));\nconst float yMipLevel3 = 1.0 - (1.0 / pow(2.0, 3.0));\nconst float yMipLevel4 = 1.0 - (1.0 / pow(2.0, 4.0));\n\nvoid main()\n{\n vec2 uv = v_textureCoordinates;\n vec2 textureSize = vec2(originalSize * 1.5 + 2.0, originalSize);\n vec2 pixel = 1.0 / textureSize;\n\n float mipLevel = 0.0;\n\n if (uv.x - pixel.x > (textureSize.y / textureSize.x))\n {\n mipLevel = 1.0;\n if (uv.y - pixel.y > yMipLevel1)\n {\n mipLevel = 2.0;\n if (uv.y - pixel.y * 3.0 > yMipLevel2)\n {\n mipLevel = 3.0;\n if (uv.y - pixel.y * 5.0 > yMipLevel3)\n {\n mipLevel = 4.0;\n if (uv.y - pixel.y * 7.0 > yMipLevel4)\n {\n mipLevel = 5.0;\n }\n }\n }\n }\n }\n\n if (mipLevel > 0.0)\n {\n float scale = pow(2.0, mipLevel);\n\n uv.y -= (pixel.y * (mipLevel - 1.0) * 2.0);\n uv.x *= ((textureSize.x - 2.0) / textureSize.y);\n\n uv.x -= 1.0 + pixel.x;\n uv.y -= (1.0 - (1.0 / pow(2.0, mipLevel - 1.0)));\n uv *= scale;\n }\n else\n {\n uv.x *= (textureSize.x / textureSize.y);\n }\n\n if(mipLevel == 0.0)\n {\n out_FragColor = texture(texture0, uv);\n }\n else if(mipLevel == 1.0)\n {\n out_FragColor = texture(texture1, uv);\n }\n else if(mipLevel == 2.0)\n {\n out_FragColor = texture(texture2, uv);\n }\n else if(mipLevel == 3.0)\n {\n out_FragColor = texture(texture3, uv);\n }\n else if(mipLevel == 4.0)\n {\n out_FragColor = texture(texture4, uv);\n }\n else if(mipLevel == 5.0)\n {\n out_FragColor = texture(texture5, uv);\n }\n else\n {\n out_FragColor = vec4(0.0);\n }\n}\n",uniformMap:h,outputTexture:this._texture,persists:!1,owner:this});e.commandList.push(m),this._ready=!0},E_.prototype.isDestroyed=function(){return!1},E_.prototype.destroy=function(){return QO(this),this._texture=this._texture&&this._texture.destroy(),Xe(this)};const yA=E_;function bA(e){e=g(e,g.EMPTY_OBJECT);const t=c(e.imageBasedLightingFactor)?V.clone(e.imageBasedLightingFactor):new V(1,1);A.typeOf.object("options.imageBasedLightingFactor",t),A.typeOf.number.greaterThanOrEquals("options.imageBasedLightingFactor.x",t.x,0),A.typeOf.number.lessThanOrEquals("options.imageBasedLightingFactor.x",t.x,1),A.typeOf.number.greaterThanOrEquals("options.imageBasedLightingFactor.y",t.y,0),A.typeOf.number.lessThanOrEquals("options.imageBasedLightingFactor.y",t.y,1),this._imageBasedLightingFactor=t;const n=g(e.luminanceAtZenith,.2);A.typeOf.number("options.luminanceAtZenith",n),this._luminanceAtZenith=n;const i=e.sphericalHarmonicCoefficients;if(c(i)&&(!Array.isArray(i)||9!==i.length))throw new E("options.sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");this._sphericalHarmonicCoefficients=i,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapAtlas=void 0,this._specularEnvironmentMapAtlasDirty=!0,this._specularEnvironmentMapLoaded=!1,this._previousSpecularEnvironmentMapLoaded=!1,this._useDefaultSpecularMaps=!1,this._useDefaultSphericalHarmonics=!1,this._shouldRegenerateShaders=!1,this._previousFrameNumber=void 0,this._previousImageBasedLightingFactor=V.clone(t),this._previousLuminanceAtZenith=n,this._previousSphericalHarmonicCoefficients=i,this._removeErrorListener=void 0}Object.defineProperties(bA.prototype,{imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){A.typeOf.object("imageBasedLightingFactor",e),A.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),A.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),A.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),A.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),this._previousImageBasedLightingFactor=V.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor),this._imageBasedLightingFactor=V.clone(e,this._imageBasedLightingFactor)}},luminanceAtZenith:{get:function(){return this._luminanceAtZenith},set:function(e){this._previousLuminanceAtZenith=this._luminanceAtZenith,this._luminanceAtZenith=e}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){if(c(e)&&(!Array.isArray(e)||9!==e.length))throw new E("sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients,this._sphericalHarmonicCoefficients=e}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){e!==this._specularEnvironmentMaps&&(this._specularEnvironmentMapAtlasDirty=this._specularEnvironmentMapAtlasDirty||e!==this._specularEnvironmentMaps,this._specularEnvironmentMapLoaded=!1),this._specularEnvironmentMaps=e}},enabled:{get:function(){return this._imageBasedLightingFactor.x>0||this._imageBasedLightingFactor.y>0}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},useDefaultSphericalHarmonics:{get:function(){return this._useDefaultSphericalHarmonics}},useSphericalHarmonicCoefficients:{get:function(){return c(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics}},specularEnvironmentMapAtlas:{get:function(){return this._specularEnvironmentMapAtlas}},useDefaultSpecularMaps:{get:function(){return this._useDefaultSpecularMaps}},useSpecularEnvironmentMaps:{get:function(){return c(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps}}}),bA.prototype.update=function(e){if(e.frameNumber===this._previousFrameNumber)return;this._previousFrameNumber=e.frameNumber;const t=e.context;e.brdfLutGenerator.update(e),this._shouldRegenerateShaders=!1;const n=this._imageBasedLightingFactor,i=this._previousImageBasedLightingFactor;V.equals(n,i)||(this._shouldRegenerateShaders=n.x>0&&0===i.x||0===n.x&&i.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||n.y>0&&0===i.y||0===n.y&&i.y>0,this._previousImageBasedLightingFactor=V.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor)),this._luminanceAtZenith!==this._previousLuminanceAtZenith&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||c(this._luminanceAtZenith)!==c(this._previousLuminanceAtZenith),this._previousLuminanceAtZenith=this._luminanceAtZenith),this._previousSphericalHarmonicCoefficients!==this._sphericalHarmonicCoefficients&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||c(this._previousSphericalHarmonicCoefficients)!==c(this._sphericalHarmonicCoefficients),this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients),this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._previousSpecularEnvironmentMapLoaded!==this._specularEnvironmentMapLoaded,this._previousSpecularEnvironmentMapLoaded=this._specularEnvironmentMapLoaded,this._specularEnvironmentMapAtlasDirty&&(function Que(e,t){if(yA.isSupported(t)){if(e._specularEnvironmentMapAtlas=e._specularEnvironmentMapAtlas&&e._specularEnvironmentMapAtlas.destroy(),c(e._specularEnvironmentMaps)){const n=new yA(e._specularEnvironmentMaps);e._specularEnvironmentMapAtlas=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}(this,t),this._specularEnvironmentMapAtlasDirty=!1),c(this._specularEnvironmentMapAtlas)&&(this._specularEnvironmentMapAtlas.update(e),this._specularEnvironmentMapAtlas.ready&&(this._specularEnvironmentMapLoaded=!0));const o=!c(this._specularEnvironmentMapAtlas)&&c(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,r=!c(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,s=!c(this._sphericalHarmonicCoefficients)&&c(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,a=!c(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||o||r||s||a,this._useDefaultSpecularMaps=!c(this._specularEnvironmentMapAtlas)&&c(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!c(this._sphericalHarmonicCoefficients)&&c(e.sphericalHarmonicCoefficients)},bA.prototype.isDestroyed=function(){return!1},bA.prototype.destroy=function(){return this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),Xe(this)};const Q4=bA;function Vd(e){e=g(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(Vd.prototype,{length:{get:function(){return this._length},set:function(e){A.typeOf.number.greaterThanOrEquals("length",e,0);const t=this._array,n=this._length;if(e<n)for(let i=e;i<n;++i)t[i]=void 0;else e>t.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}}),Vd.prototype.get=function(e){return A.typeOf.number.lessThan("index",e,this._array.length),this._array[e]},Vd.prototype.set=function(e,t){A.typeOf.number("index",e),e>=this._length&&(this.length=e+1),this._array[e]=t},Vd.prototype.peek=function(){return this._array[this._length-1]},Vd.prototype.push=function(e){const t=this.length++;this._array[t]=e},Vd.prototype.pop=function(){if(0===this._length)return;const e=this._array[this._length-1];return--this.length,e},Vd.prototype.reserve=function(e){A.typeOf.number.greaterThanOrEquals("length",e,0),e>this._array.length&&(this._array.length=e)},Vd.prototype.resize=function(e){A.typeOf.number.greaterThanOrEquals("length",e,0),this.length=e},Vd.prototype.trim=function(e){e=g(e,this._length),this._array.length=e};const xp=Vd;function rS(e){e=g(e,g.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}rS.ALL=Object.freeze(new rS({color:new Z(0,0,0,0),depth:1,stencil:0})),rS.prototype.execute=function(e,t){e.clear(this,t)};const ar=rS;function gr(e,t,n,i){this.x=g(e,0),this.y=g(t,0),this.width=g(n,0),this.height=g(i,0)}gr.packedLength=4,gr.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t},gr.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new gr),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n},gr.fromPoints=function(e,t){if(c(t)||(t=new gr),!c(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;const n=e.length;let i=e[0].x,o=e[0].y,r=e[0].x,s=e[0].y;for(let a=1;a<n;a++){const l=e[a],u=l.x,d=l.y;i=Math.min(u,i),r=Math.max(u,r),o=Math.min(d,o),s=Math.max(d,s)}return t.x=i,t.y=o,t.width=r-i,t.height=s-o,t};const J4=new Qr,Jue=new Ce,ede=new Ce;gr.fromRectangle=function(e,t,n){if(c(n)||(n=new gr),!c(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;J4._ellipsoid=he.default;const i=(t=g(t,J4)).project(Te.southwest(e,Jue)),o=t.project(Te.northeast(e,ede));return V.subtract(o,i,o),n.x=i.x,n.y=i.y,n.width=o.x,n.height=o.y,n},gr.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new gr(e.x,e.y,e.width,e.height)},gr.union=function(e,t,n){A.typeOf.object("left",e),A.typeOf.object("right",t),c(n)||(n=new gr);const i=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x+e.width,t.x+t.width),s=Math.max(e.y+e.height,t.y+t.height);return n.x=i,n.y=o,n.width=r-i,n.height=s-o,n},gr.expand=function(e,t,n){A.typeOf.object("rectangle",e),A.typeOf.object("point",t),n=gr.clone(e,n);const i=t.x-n.x,o=t.y-n.y;return i>n.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},gr.intersect=function(e,t){A.typeOf.object("left",e),A.typeOf.object("right",t);const n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.width<o||i+e.height<r||i>r+t.height?On.OUTSIDE:On.INTERSECTING},gr.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},gr.prototype.clone=function(e){return gr.clone(this,e)},gr.prototype.intersect=function(e){return gr.intersect(this,e)},gr.prototype.equals=function(e){return gr.equals(this,e)};const Vt=gr,sS={CLOCKWISE:ie.CW,COUNTER_CLOCKWISE:ie.CCW,validate:function(e){return e===sS.CLOCKWISE||e===sS.COUNTER_CLOCKWISE}},Bl=Object.freeze(sS),tde=function eH(e){if("object"!=typeof e||null===e)return e;let t;const n=Object.keys(e);for(let i=0;i<n.length;i++)t=n[i],e.hasOwnProperty(t)&&"_applyFunctions"!==t&&(e[t]=eH(e[t]));return Object.freeze(e)};function tH(e){return e===ie.FUNC_ADD||e===ie.FUNC_SUBTRACT||e===ie.FUNC_REVERSE_SUBTRACT||e===ie.MIN||e===ie.MAX}function aS(e){return e===ie.ZERO||e===ie.ONE||e===ie.SRC_COLOR||e===ie.ONE_MINUS_SRC_COLOR||e===ie.DST_COLOR||e===ie.ONE_MINUS_DST_COLOR||e===ie.SRC_ALPHA||e===ie.ONE_MINUS_SRC_ALPHA||e===ie.DST_ALPHA||e===ie.ONE_MINUS_DST_ALPHA||e===ie.CONSTANT_COLOR||e===ie.ONE_MINUS_CONSTANT_COLOR||e===ie.CONSTANT_ALPHA||e===ie.ONE_MINUS_CONSTANT_ALPHA||e===ie.SRC_ALPHA_SATURATE}function nH(e){return e===ie.NEVER||e===ie.LESS||e===ie.EQUAL||e===ie.LEQUAL||e===ie.GREATER||e===ie.NOTEQUAL||e===ie.GEQUAL||e===ie.ALWAYS}function c0(e){return e===ie.ZERO||e===ie.KEEP||e===ie.REPLACE||e===ie.INCR||e===ie.DECR||e===ie.INVERT||e===ie.INCR_WRAP||e===ie.DECR_WRAP}function Hd(e){const t=g(e,g.EMPTY_OBJECT),n=g(t.cull,g.EMPTY_OBJECT),i=g(t.polygonOffset,g.EMPTY_OBJECT),o=g(t.scissorTest,g.EMPTY_OBJECT),r=g(o.rectangle,g.EMPTY_OBJECT),s=g(t.depthRange,g.EMPTY_OBJECT),a=g(t.depthTest,g.EMPTY_OBJECT),l=g(t.colorMask,g.EMPTY_OBJECT),u=g(t.blending,g.EMPTY_OBJECT),d=g(u.color,g.EMPTY_OBJECT),h=g(t.stencilTest,g.EMPTY_OBJECT),m=g(h.frontOperation,g.EMPTY_OBJECT),_=g(h.backOperation,g.EMPTY_OBJECT),p=g(t.sampleCoverage,g.EMPTY_OBJECT),y=t.viewport;if(this.frontFace=g(t.frontFace,Bl.COUNTER_CLOCKWISE),this.cull={enabled:g(n.enabled,!1),face:g(n.face,ie.BACK)},this.lineWidth=g(t.lineWidth,1),this.polygonOffset={enabled:g(i.enabled,!1),factor:g(i.factor,0),units:g(i.units,0)},this.scissorTest={enabled:g(o.enabled,!1),rectangle:Vt.clone(r)},this.depthRange={near:g(s.near,0),far:g(s.far,1)},this.depthTest={enabled:g(a.enabled,!1),func:g(a.func,ie.LESS)},this.colorMask={red:g(l.red,!0),green:g(l.green,!0),blue:g(l.blue,!0),alpha:g(l.alpha,!0)},this.depthMask=g(t.depthMask,!0),this.stencilMask=g(t.stencilMask,-1),this.blending={enabled:g(u.enabled,!1),color:new Z(g(d.red,0),g(d.green,0),g(d.blue,0),g(d.alpha,0)),equationRgb:g(u.equationRgb,ie.FUNC_ADD),equationAlpha:g(u.equationAlpha,ie.FUNC_ADD),functionSourceRgb:g(u.functionSourceRgb,ie.ONE),functionSourceAlpha:g(u.functionSourceAlpha,ie.ONE),functionDestinationRgb:g(u.functionDestinationRgb,ie.ZERO),functionDestinationAlpha:g(u.functionDestinationAlpha,ie.ZERO)},this.stencilTest={enabled:g(h.enabled,!1),frontFunction:g(h.frontFunction,ie.ALWAYS),backFunction:g(h.backFunction,ie.ALWAYS),reference:g(h.reference,0),mask:g(h.mask,-1),frontOperation:{fail:g(m.fail,ie.KEEP),zFail:g(m.zFail,ie.KEEP),zPass:g(m.zPass,ie.KEEP)},backOperation:{fail:g(_.fail,ie.KEEP),zFail:g(_.zFail,ie.KEEP),zPass:g(_.zPass,ie.KEEP)}},this.sampleCoverage={enabled:g(p.enabled,!1),value:g(p.value,1),invert:g(p.invert,!1)},this.viewport=c(y)?new Vt(y.x,y.y,y.width,y.height):void 0,this.lineWidth<dn.minimumAliasedLineWidth||this.lineWidth>dn.maximumAliasedLineWidth)throw new E("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!Bl.validate(this.frontFace))throw new E("Invalid renderState.frontFace.");if(!function nde(e){return e===ie.FRONT||e===ie.BACK||e===ie.FRONT_AND_BACK}(this.cull.face))throw new E("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new E("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new E("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new E("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new E("renderState.depthRange.far must be less than or equal to one.");if(!function ide(e){return e===ie.NEVER||e===ie.LESS||e===ie.EQUAL||e===ie.LEQUAL||e===ie.GREATER||e===ie.NOTEQUAL||e===ie.GEQUAL||e===ie.ALWAYS}(this.depthTest.func))throw new E("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new E("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!tH(this.blending.equationRgb))throw new E("Invalid renderState.blending.equationRgb.");if(!tH(this.blending.equationAlpha))throw new E("Invalid renderState.blending.equationAlpha.");if(!aS(this.blending.functionSourceRgb))throw new E("Invalid renderState.blending.functionSourceRgb.");if(!aS(this.blending.functionSourceAlpha))throw new E("Invalid renderState.blending.functionSourceAlpha.");if(!aS(this.blending.functionDestinationRgb))throw new E("Invalid renderState.blending.functionDestinationRgb.");if(!aS(this.blending.functionDestinationAlpha))throw new E("Invalid renderState.blending.functionDestinationAlpha.");if(!nH(this.stencilTest.frontFunction))throw new E("Invalid renderState.stencilTest.frontFunction.");if(!nH(this.stencilTest.backFunction))throw new E("Invalid renderState.stencilTest.backFunction.");if(!c0(this.stencilTest.frontOperation.fail))throw new E("Invalid renderState.stencilTest.frontOperation.fail.");if(!c0(this.stencilTest.frontOperation.zFail))throw new E("Invalid renderState.stencilTest.frontOperation.zFail.");if(!c0(this.stencilTest.frontOperation.zPass))throw new E("Invalid renderState.stencilTest.frontOperation.zPass.");if(!c0(this.stencilTest.backOperation.fail))throw new E("Invalid renderState.stencilTest.backOperation.fail.");if(!c0(this.stencilTest.backOperation.zFail))throw new E("Invalid renderState.stencilTest.backOperation.zFail.");if(!c0(this.stencilTest.backOperation.zPass))throw new E("Invalid renderState.stencilTest.backOperation.zPass.");if(c(this.viewport)){if(this.viewport.width<0)throw new E("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new E("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>dn.maximumViewportWidth)throw new E(`renderState.viewport.width must be less than or equal to the maximum viewport width (${dn.maximumViewportWidth.toString()}). Check maximumViewportWidth.`);if(this.viewport.height>dn.maximumViewportHeight)throw new E(`renderState.viewport.height must be less than or equal to the maximum viewport height (${dn.maximumViewportHeight.toString()}). Check maximumViewportHeight.`)}this.id=0,this._applyFunctions=[]}let ode=0,Gd={};function w_(e,t,n){n?e.enable(t):e.disable(t)}function iH(e,t){e.frontFace(t.frontFace)}function oH(e,t){const n=t.cull,i=n.enabled;w_(e,e.CULL_FACE,i),i&&e.cullFace(n.face)}function rH(e,t){e.lineWidth(t.lineWidth)}function sH(e,t){const n=t.polygonOffset,i=n.enabled;w_(e,e.POLYGON_OFFSET_FILL,i),i&&e.polygonOffset(n.factor,n.units)}function aH(e,t,n){const i=t.scissorTest,o=c(n.scissorTest)?n.scissorTest.enabled:i.enabled;if(w_(e,e.SCISSOR_TEST,o),o){const r=c(n.scissorTest)?n.scissorTest.rectangle:i.rectangle;e.scissor(r.x,r.y,r.width,r.height)}}function cH(e,t){const n=t.depthRange;e.depthRange(n.near,n.far)}function lH(e,t){const n=t.depthTest,i=n.enabled;w_(e,e.DEPTH_TEST,i),i&&e.depthFunc(n.func)}function uH(e,t){const n=t.colorMask;e.colorMask(n.red,n.green,n.blue,n.alpha)}function dH(e,t){e.depthMask(t.depthMask)}function fH(e,t){e.stencilMask(t.stencilMask)}function hH(e,t,n){const i=t.blending,o=c(n.blendingEnabled)?n.blendingEnabled:i.enabled;w_(e,e.BLEND,o),o&&(function rde(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}(e,i.color),e.blendEquationSeparate(i.equationRgb,i.equationAlpha),e.blendFuncSeparate(i.functionSourceRgb,i.functionDestinationRgb,i.functionSourceAlpha,i.functionDestinationAlpha))}function pH(e,t){const n=t.stencilTest,i=n.enabled;if(w_(e,e.STENCIL_TEST,i),i){const o=n.frontFunction,r=n.backFunction,s=n.reference,a=n.mask;e.stencilFunc(o,s,a),e.stencilFuncSeparate(e.BACK,r,s,a),e.stencilFuncSeparate(e.FRONT,o,s,a);const l=n.frontOperation;e.stencilOpSeparate(e.FRONT,l.fail,l.zFail,l.zPass);const m=n.backOperation;e.stencilOpSeparate(e.BACK,m.fail,m.zFail,m.zPass)}}function mH(e,t){const n=t.sampleCoverage,i=n.enabled;w_(e,e.SAMPLE_COVERAGE,i),i&&e.sampleCoverage(n.value,n.invert)}Hd.fromCache=function(e){const t=JSON.stringify(e);let n=Gd[t];if(c(n))return++n.referenceCount,n.state;let i=new Hd(e);const o=JSON.stringify(i);return n=Gd[o],c(n)||(i.id=ode++,i=tde(i),n={referenceCount:0,state:i},Gd[o]=n),++n.referenceCount,Gd[t]={referenceCount:1,state:n.state},n.state},Hd.removeFromCache=function(e){const t=new Hd(e),n=JSON.stringify(t),i=Gd[n],o=JSON.stringify(e),r=Gd[o];c(r)&&(--r.referenceCount,0===r.referenceCount&&(delete Gd[o],c(i)&&--i.referenceCount)),c(i)&&0===i.referenceCount&&delete Gd[n]},Hd.getCache=function(){return Gd},Hd.clearCache=function(){Gd={}};const sde=new Vt;function _H(e,t,n){let i=g(t.viewport,n.viewport);c(i)||(i=sde,i.width=n.context.drawingBufferWidth,i.height=n.context.drawingBufferHeight),n.context.uniformState.viewport=i,e.viewport(i.x,i.y,i.width,i.height)}Hd.apply=function(e,t,n){iH(e,t),oH(e,t),rH(e,t),sH(e,t),cH(e,t),lH(e,t),uH(e,t),dH(e,t),fH(e,t),pH(e,t),mH(e,t),aH(e,t,n),hH(e,t,n),_H(e,t,n)},Hd.partialApply=function(e,t,n,i,o,r){if(t!==n){let d=n._applyFunctions[t.id];c(d)||(d=function ade(e,t){const n=[];return e.frontFace!==t.frontFace&&n.push(iH),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&n.push(oH),e.lineWidth!==t.lineWidth&&n.push(rH),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&n.push(sH),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&n.push(cH),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&n.push(lH),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&n.push(uH),e.depthMask!==t.depthMask&&n.push(dH),e.stencilMask!==t.stencilMask&&n.push(fH),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&n.push(pH),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&n.push(mH),n}(t,n),n._applyFunctions[t.id]=d);const h=d.length;for(let m=0;m<h;++m)d[m](e,n)}((c(i.scissorTest)?i.scissorTest:t.scissorTest)!==(c(o.scissorTest)?o.scissorTest:n.scissorTest)||r)&&aH(e,n,o);const l=c(i.blendingEnabled)?i.blendingEnabled:t.blending.enabled,u=c(o.blendingEnabled)?o.blendingEnabled:n.blending.enabled;(l!==u||u&&t.blending!==n.blending)&&hH(e,n,o),(t!==n||i!==o||i.context!==o.context)&&_H(e,n,o)},Hd.getState=function(e){if(!c(e))throw new E("renderState is required.");return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:Vt.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:Z.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:c(e.viewport)?Vt.clone(e.viewport):void 0}};const Lt=Hd,$f={X:0,Y:1,Z:2};$f.Y_UP_TO_Z_UP=k.fromRotationTranslation(oe.fromArray([1,0,0,0,0,1,0,-1,0])),$f.Z_UP_TO_Y_UP=k.fromRotationTranslation(oe.fromArray([1,0,0,0,0,-1,0,1,0])),$f.X_UP_TO_Z_UP=k.fromRotationTranslation(oe.fromArray([0,0,1,0,1,0,-1,0,0])),$f.Z_UP_TO_X_UP=k.fromRotationTranslation(oe.fromArray([0,0,-1,0,1,0,1,0,0])),$f.X_UP_TO_Y_UP=k.fromRotationTranslation(oe.fromArray([0,1,0,-1,0,0,0,0,1])),$f.Y_UP_TO_X_UP=k.fromRotationTranslation(oe.fromArray([0,-1,0,1,0,0,0,0,1])),$f.fromName=function(e){return A.typeOf.string("name",e),$f[e]};const Ms=Object.freeze($f);function l0(e,t,n,i){e=g(e,1),t=g(t,1),n=g(n,1),i=g(i,1),this.value=new Uint8Array([Z.floatToByte(e),Z.floatToByte(t),Z.floatToByte(n),Z.floatToByte(i)])}Object.defineProperties(l0.prototype,{componentDatatype:{get:function(){return ee.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),l0.fromColor=function(e){if(!c(e))throw new E("color is required.");return new l0(e.red,e.green,e.blue,e.alpha)},l0.toValue=function(e,t){if(!c(e))throw new E("color is required.");return c(t)?e.toBytes(t):new Uint8Array(e.toBytes())},l0.equals=function(e,t){return e===t||c(e)&&c(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]};const ei=l0;function kl(e){this.planes=g(e,[])}const TA=[new f,new f,new f];f.clone(f.UNIT_X,TA[0]),f.clone(f.UNIT_Y,TA[1]),f.clone(f.UNIT_Z,TA[2]);const Cp=new f,cde=new f,gH=new qn(new f(1,0,0),0);kl.fromBoundingSphere=function(e,t){if(!c(e))throw new E("boundingSphere is required.");c(t)||(t=new kl);const n=TA.length,i=t.planes;i.length=2*n;const o=e.center,r=e.radius;let s=0;for(let a=0;a<n;++a){const l=TA[a];let u=i[s],d=i[s+1];c(u)||(u=i[s]=new de),c(d)||(d=i[s+1]=new de),f.multiplyByScalar(l,-r,Cp),f.add(o,Cp,Cp),u.x=l.x,u.y=l.y,u.z=l.z,u.w=-f.dot(l,Cp),f.multiplyByScalar(l,r,Cp),f.add(o,Cp,Cp),d.x=-l.x,d.y=-l.y,d.z=-l.z,d.w=-f.dot(f.negate(l,cde),Cp),s+=2}return t},kl.prototype.computeVisibility=function(e){if(!c(e))throw new E("boundingVolume is required.");const t=this.planes;let n=!1;for(let i=0,o=t.length;i<o;++i){const r=e.intersectPlane(qn.fromCartesian4(t[i],gH));if(r===On.OUTSIDE)return On.OUTSIDE;r===On.INTERSECTING&&(n=!0)}return n?On.INTERSECTING:On.INSIDE},kl.prototype.computeVisibilityWithPlaneMask=function(e,t){if(!c(e))throw new E("boundingVolume is required.");if(!c(t))throw new E("parentPlaneMask is required.");if(t===kl.MASK_OUTSIDE||t===kl.MASK_INSIDE)return t;let n=kl.MASK_INSIDE;const i=this.planes;for(let o=0,r=i.length;o<r;++o){const s=o<31?1<<o:0;if(o<31&&!(t&s))continue;const a=e.intersectPlane(qn.fromCartesian4(i[o],gH));if(a===On.OUTSIDE)return kl.MASK_OUTSIDE;a===On.INTERSECTING&&(n|=s)}return n},kl.MASK_OUTSIDE=4294967295,kl.MASK_INSIDE=0,kl.MASK_INDETERMINATE=2147483647;const Fu=kl;function jd(e){e=g(e,g.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=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far,this._cullingVolume=new Fu,this._orthographicMatrix=new k}function yH(e){if(!(c(e.right)&&c(e.left)&&c(e.top)&&c(e.bottom)&&c(e.near)&&c(e.far)))throw new E("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 E("right must be greater than left.");if(e.bottom>e.top)throw new E("top must be greater than bottom.");if(e.near<=0||e.near>e.far)throw new E("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=k.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}Object.defineProperties(jd.prototype,{projectionMatrix:{get:function(){return yH(this),this._orthographicMatrix}}});const lde=new f,ude=new f,dde=new f,JO=new f;jd.prototype.computeCullingVolume=function(e,t,n){if(!c(e))throw new E("position is required.");if(!c(t))throw new E("direction is required.");if(!c(n))throw new E("up is required.");const i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,l=this.near,u=this.far,d=f.cross(t,n,lde);f.normalize(d,d);const h=ude;f.multiplyByScalar(t,l,h),f.add(e,h,h);const m=dde;f.multiplyByScalar(d,a,m),f.add(h,m,m);let _=i[0];return c(_)||(_=i[0]=new de),_.x=d.x,_.y=d.y,_.z=d.z,_.w=-f.dot(d,m),f.multiplyByScalar(d,s,m),f.add(h,m,m),_=i[1],c(_)||(_=i[1]=new de),_.x=-d.x,_.y=-d.y,_.z=-d.z,_.w=-f.dot(f.negate(d,JO),m),f.multiplyByScalar(n,r,m),f.add(h,m,m),_=i[2],c(_)||(_=i[2]=new de),_.x=n.x,_.y=n.y,_.z=n.z,_.w=-f.dot(n,m),f.multiplyByScalar(n,o,m),f.add(h,m,m),_=i[3],c(_)||(_=i[3]=new de),_.x=-n.x,_.y=-n.y,_.z=-n.z,_.w=-f.dot(f.negate(n,JO),m),_=i[4],c(_)||(_=i[4]=new de),_.x=t.x,_.y=t.y,_.z=t.z,_.w=-f.dot(t,h),f.multiplyByScalar(t,u,m),f.add(e,m,m),_=i[5],c(_)||(_=i[5]=new de),_.x=-t.x,_.y=-t.y,_.z=-t.z,_.w=-f.dot(f.negate(t,JO),m),this._cullingVolume},jd.prototype.getPixelDimensions=function(e,t,n,i,o){if(yH(this),!c(e)||!c(t))throw new E("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new E("drawingBufferWidth must be greater than zero.");if(t<=0)throw new E("drawingBufferHeight must be greater than zero.");if(!c(n))throw new E("distance is required.");if(!c(i))throw new E("pixelRatio is required.");if(i<=0)throw new E("pixelRatio must be greater than zero.");if(!c(o))throw new E("A result object is required.");const l=i*(this.top-this.bottom)/t;return o.x=i*(this.right-this.left)/e,o.y=l,o},jd.prototype.clone=function(e){return c(e)||(e=new jd),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},jd.prototype.equals=function(e){return c(e)&&e instanceof jd&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},jd.prototype.equalsEpsilon=function(e,t,n){return e===this||c(e)&&e instanceof jd&&O.equalsEpsilon(this.right,e.right,t,n)&&O.equalsEpsilon(this.left,e.left,t,n)&&O.equalsEpsilon(this.top,e.top,t,n)&&O.equalsEpsilon(this.bottom,e.bottom,t,n)&&O.equalsEpsilon(this.near,e.near,t,n)&&O.equalsEpsilon(this.far,e.far,t,n)};const Qa=jd;function wc(e){e=g(e,g.EMPTY_OBJECT),this._offCenterFrustum=new Qa,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far}function Ep(e){if(!(c(e.width)&&c(e.aspectRatio)&&c(e.near)&&c(e.far)))throw new E("width, aspectRatio, near, or far parameters are not set.");const 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 E("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new E("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;const n=1/e.aspectRatio;t.right=.5*e.width,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}wc.packedLength=4,wc.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t},wc.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new wc),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n},Object.defineProperties(wc.prototype,{projectionMatrix:{get:function(){return Ep(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return Ep(this),this._offCenterFrustum}}}),wc.prototype.computeCullingVolume=function(e,t,n){return Ep(this),this._offCenterFrustum.computeCullingVolume(e,t,n)},wc.prototype.getPixelDimensions=function(e,t,n,i,o){return Ep(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)},wc.prototype.clone=function(e){return c(e)||(e=new wc),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},wc.prototype.equals=function(e){return!!(c(e)&&e instanceof wc)&&(Ep(this),Ep(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},wc.prototype.equalsEpsilon=function(e,t,n){return!!(c(e)&&e instanceof wc)&&(Ep(this),Ep(e),O.equalsEpsilon(this.width,e.width,t,n)&&O.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};const $n=wc;function bH(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.metadata",e.metadata),this._metadata=e.metadata}Object.defineProperties(bH.prototype,{metadata:{get:function(){return this._metadata}}});const TH=bH,cS=function fde(e,t){return t=g(t,0),Ky(e,t,Math.min(4,e.length))};function Ul(e,t,n,i){this._tileset=e,this._tile=t,this._resource=n,c(i)||(i=[]),this._contents=i,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(Ul.prototype,{featurePropertiesDirty:{get:function(){const e=this._contents,t=e.length;for(let n=0;n<t;++n)if(e[n].featurePropertiesDirty)return!0;return!1},set:function(e){const t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].featurePropertiesDirty=e}},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(){return this._contents}},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;const t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].metadata=e}},batchTable:{get:function(){}},group:{get:function(){return this._group},set:function(e){this._group=e;const t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].group=e}}});const AA=Uint32Array.BYTES_PER_ELEMENT;Ul.fromTileType=function(){var e=(0,we.Z)(function*(t,n,i,o,r,s){r=g(r,0);const a=new Uint8Array(o),l=new DataView(o),u=l.getUint32(r+=AA,!0);if(1!==u)throw new Pe(`Only Composite Tile version 1 is supported. Version ${u} is not.`);r+=AA;const d=l.getUint32(r+=AA,!0);r+=AA;let h=i.queryParameters.compositeIndex;h=c(h)?`${h}_`:"";const m=[];m.length=d;for(let y=0;y<d;++y){const b=cS(a,r),x=l.getUint32(r+2*AA,!0),C=s[b],v=i.getDerivedResource({queryParameters:{compositeIndex:`${h}${y}`}});if(!c(C))throw new Pe(`Unknown tile content type, ${b}, inside Composite tile`);m[y]=Promise.resolve(C(t,n,v,o,r)),r+=x}return new Ul(t,n,i,yield Promise.all(m))});return function(t,n,i,o,r,s){return e.apply(this,arguments)}}(),Ul.prototype.hasProperty=function(e,t){return!1},Ul.prototype.getFeature=function(e){},Ul.prototype.applyDebugSettings=function(e,t){const n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyDebugSettings(e,t)},Ul.prototype.applyStyle=function(e){const t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].applyStyle(e)},Ul.prototype.update=function(e,t){const n=this._contents,i=n.length;let o=!0;for(let r=0;r<i;++r)n[r].update(e,t),o=o&&n[r].ready;!this._ready&&o&&(this._ready=!0)},Ul.prototype.pick=function(e,t,n){if(!this._ready)return;let i,o=Number.POSITIVE_INFINITY;const r=this._contents,s=r.length;for(let a=0;a<s;++a){const l=r[a].pick(e,t,n);if(!c(l))continue;const u=f.distance(e.origin,l);u<o&&(i=l,o=u)}return c(i)?n:void 0},Ul.prototype.isDestroyed=function(){return!1},Ul.prototype.destroy=function(){const e=this._contents,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return Xe(this)};const hde=Ul;function xA(e){e=g(e,g.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._modelMatrix=e.modelMatrix,this._primitiveType=g(e.primitiveType,Tt.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=g(e.offset,0),this._instanceCount=g(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=g(e.cull,!0),this.occlude=g(e.occlude,!0),this.executeInClosestFrustum=g(e.executeInClosestFrustum,!1),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.castShadows=g(e.castShadows,!1),this.receiveShadows=g(e.receiveShadows,!1),this.pickOnly=g(e.pickOnly,!1),this.depthForTranslucentClassification=g(e.depthForTranslucentClassification,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}function Ta(e,t){return(e._flags&t)===t}function wp(e,t,n){n?e._flags|=t:e._flags&=~t}Object.defineProperties(xA.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 Ta(this,1)},set:function(e){Ta(this,1)!==e&&(wp(this,1,e),this.dirty=!0)}},occlude:{get:function(){return Ta(this,2)},set:function(e){Ta(this,2)!==e&&(wp(this,2,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 Ta(this,16)},set:function(e){Ta(this,16)!==e&&(wp(this,16,e),this.dirty=!0)}},receiveShadows:{get:function(){return Ta(this,32)},set:function(e){Ta(this,32)!==e&&(wp(this,32,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 Ta(this,4)},set:function(e){Ta(this,4)!==e&&(wp(this,4,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 Ta(this,8)},set:function(e){Ta(this,8)!==e&&(wp(this,8,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 Ta(this,64)},set:function(e){Ta(this,64)!==e&&(wp(this,64,e),this.dirty=!0)}},depthForTranslucentClassification:{get:function(){return Ta(this,128)},set:function(e){Ta(this,128)!==e&&(wp(this,128,e),this.dirty=!0)}}}),xA.shallowClone=function(e,t){if(c(e))return c(t)||(t=new xA),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},xA.prototype.execute=function(e,t){e.draw(this,t)};const $t=xA;function Aa(e){A.typeOf.number("options.featuresLength",e.featuresLength),A.typeOf.object("options.owner",e.owner),this._id=kr();const t=e.featuresLength;let n,i;if(this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[],t>0){const o=Math.min(t,dn.maximumTextureSize),r=Math.ceil(t/dn.maximumTextureSize),s=1/o,a=.5*s,l=1/r,u=.5*l;n=new V(o,r),i=new de(s,a,l,u)}this._translucentFeaturesLength=0,this._featuresLength=t,this._textureDimensions=n,this._textureStep=i,this._owner=e.owner,this._statistics=e.statistics,this._colorChangedCallback=e.colorChangedCallback}function AH(e){const t=e._textureDimensions;return t.x*t.y*4}function xH(e){if(!c(e._batchValues)){const t=AH(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function CH(e){if(!c(e._showAlphaProperties)){const n=new Uint8Array(2*e._featuresLength).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}function CA(e,t){if(!c(e)||e<0||e>=t)throw new E(`batchId is required and between zero and featuresLength - 1 (${t}`-NaN)}Object.defineProperties(Aa.prototype,{translucentFeaturesLength:{get:function(){return this._translucentFeaturesLength}},byteLength:{get:function(){let e=0;return c(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),c(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}}}),Aa.DEFAULT_COLOR_VALUE=Z.WHITE,Aa.DEFAULT_SHOW_VALUE=!0,Aa.prototype.setShow=function(e,t){if(CA(e,this._featuresLength),A.typeOf.bool("show",t),t&&!c(this._showAlphaProperties))return;const n=CH(this),i=2*e,o=t?255:0;n[i]!==o&&(n[i]=o,xH(this)[4*e+3]=t?n[i+1]:0,this._batchValuesDirty=!0)},Aa.prototype.setAllShow=function(e){A.typeOf.bool("show",e);const t=this._featuresLength;for(let n=0;n<t;++n)this.setShow(n,e)},Aa.prototype.getShow=function(e){return CA(e,this._featuresLength),!c(this._showAlphaProperties)||255===this._showAlphaProperties[2*e]};const pde=new Array(4);function EH(e,t,n){const i=e._textureDimensions;return new Mn({context:t,pixelFormat:Ct.RGBA,pixelDatatype:yt.UNSIGNED_BYTE,source:{width:i.x,height:i.y,arrayBufferView:n},flipY:!1,sampler:vi.NEAREST})}Aa.prototype.setColor=function(e,t){if(CA(e,this._featuresLength),A.typeOf.object("color",t),Z.equals(t,Aa.DEFAULT_COLOR_VALUE)&&!c(this._batchValues))return;const n=t.toBytes(pde),i=n[3],o=xH(this),r=4*e,s=CH(this),a=2*e;if(o[r]!==n[0]||o[r+1]!==n[1]||o[r+2]!==n[2]||s[a+1]!==i){o[r]=n[0],o[r+1]=n[1],o[r+2]=n[2];const l=255!==s[a+1];o[r+3]=0!==s[a]?i:0,s[a+1]=i;const d=255!==i;d&&!l?++this._translucentFeaturesLength:!d&&l&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,c(this._colorChangedCallback)&&this._colorChangedCallback(e,t)}},Aa.prototype.setAllColor=function(e){A.typeOf.object("color",e);const t=this._featuresLength;for(let n=0;n<t;++n)this.setColor(n,e)},Aa.prototype.getColor=function(e,t){if(CA(e,this._featuresLength),A.typeOf.object("result",t),!c(this._batchValues))return Z.clone(Aa.DEFAULT_COLOR_VALUE,t);const n=this._batchValues,i=4*e;return Z.fromBytes(n[i],n[i+1],n[i+2],this._showAlphaProperties[2*e+1],t)},Aa.prototype.getPickColor=function(e){return CA(e,this._featuresLength),this._pickIds[e]},Aa.prototype.update=function(e,t){const n=t.context;this._defaultTexture=n.defaultTexture;const i=t.passes;(i.pick||i.postProcess)&&function mde(e,t){const n=e._featuresLength;if(!c(e._pickTexture)&&n>0){const i=e._pickIds,o=AH(e),r=new Uint8Array(o),s=e._owner,a=e._statistics;for(let l=0;l<n;++l){const u=t.createPickId(s.getFeature(l));i.push(u);const d=u.color,h=4*l;r[h]=Z.floatToByte(d.red),r[h+1]=Z.floatToByte(d.green),r[h+2]=Z.floatToByte(d.blue),r[h+3]=Z.floatToByte(d.alpha)}e._pickTexture=EH(e,t,r),c(a)&&(a.batchTableByteLength+=e._pickTexture.sizeInBytes)}}(this,n),this._batchValuesDirty&&(this._batchValuesDirty=!1,c(this._batchTexture)||(this._batchTexture=EH(this,n,this._batchValues),c(this._statistics)&&(this._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes)),function _de(e){const t=e._textureDimensions;e._batchTexture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}(this))},Aa.prototype.isDestroyed=function(){return!1},Aa.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();const e=this._pickIds,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return Xe(this)};const Wd=Aa,gde={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},yde={SCALAR:void 0,VEC2:V,VEC3:f,VEC4:de,MAT2:Kr,MAT3:oe,MAT4:k},S_=function bde(e){const t=e.componentType;let n;n="string"==typeof t?ee.fromName(t):t;const i=gde[e.type];return{componentsPerAttribute:i,classType:yde[e.type],createArrayBufferView:function(r,s,a){return ee.createArrayBufferView(n,r,s,i*a)}}};function Kf(e){this._classes=void 0,this._classIds=void 0,this._classIndexes=void 0,this._parentCounts=void 0,this._parentIndexes=void 0,this._parentIds=void 0,this._byteLength=0,A.typeOf.object("options.extension",e.extension),function Tde(e,t,n){let i,o,r;const s=t.instancesLength,a=t.classes;let _,l=t.classIds,u=t.parentCounts,d=t.parentIds,h=s,m=0;if(c(l.byteOffset)&&(l.componentType=g(l.componentType,ee.UNSIGNED_SHORT),l.type=Wn.SCALAR,r=S_(l),l=r.createArrayBufferView(n.buffer,n.byteOffset+l.byteOffset,s),m+=l.byteLength),c(u)){for(c(u.byteOffset)&&(u.componentType=g(u.componentType,ee.UNSIGNED_SHORT),u.type=Wn.SCALAR,r=S_(u),u=r.createArrayBufferView(n.buffer,n.byteOffset+u.byteOffset,s),m+=u.byteLength),_=new Uint16Array(s),h=0,i=0;i<s;++i)_[i]=h,h+=u[i];m+=_.byteLength}c(d)&&c(d.byteOffset)&&(d.componentType=g(d.componentType,ee.UNSIGNED_SHORT),d.type=Wn.SCALAR,r=S_(d),d=r.createArrayBufferView(n.buffer,n.byteOffset+d.byteOffset,h),m+=d.byteLength);const p=a.length;for(i=0;i<p;++i){const C=a[i].instances,w=Ade(a[i].length,C,n);m+=xde(w),a[i].instances=Pn(w,C)}const y=new Array(p).fill(0),b=new Uint16Array(s);for(i=0;i<s;++i)o=l[i],b[i]=y[o],++y[o];m+=b.byteLength,e._classes=a,e._classIds=l,e._classIndexes=b,e._parentCounts=u,e._parentIndexes=_,e._parentIds=d,e._byteLength=m}(this,e.extension,e.binaryBody),function Ede(e){const t=Cde;t.length=0;const i=e._classIds.length;for(let o=0;o<i;++o)wH(e,o,t)}(this)}function Ade(e,t,n){let i;for(const o in t)if(t.hasOwnProperty(o)){const r=t[o],s=r.byteOffset;if(c(s)){const l=r.type;if(!c(r.componentType))throw new Pe("componentType is required.");if(!c(l))throw new Pe("type is required.");if(!c(n))throw new Pe(`Property ${o} requires a batch table binary.`);const u=S_(r),d=u.componentsPerAttribute,h=u.classType,m=u.createArrayBufferView(n.buffer,n.byteOffset+s,e);c(i)||(i={}),i[o]={typedArray:m,componentCount:d,type:h}}}return i}function xde(e){let t=0;for(const n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}Object.defineProperties(Kf.prototype,{byteLength:{get:function(){return this._byteLength}}});const Cde=[];function wH(e,t,n){const i=e._parentCounts,o=e._parentIds,r=e._parentIndexes,a=e._classIds.length;if(!c(o))return;if(t>=a)throw new E(`Parent index ${t} exceeds the total number of instances: ${a}`);if(n.indexOf(t)>-1)throw new E("Circular dependency detected in the batch table hierarchy.");n.push(t);const l=c(i)?i[t]:1,u=c(i)?r[t]:t;for(let d=0;d<l;++d){const h=o[u+d];h!==t&&wH(e,h,n)}n.pop(t)}const wde=[],Sde=[];let vde=0;function EA(e,t,n){const i=e._parentCounts;return c(e._parentIds)?c(i)?function Ide(e,t,n){const o=e._parentCounts,r=e._parentIds,s=e._parentIndexes,l=wde;l.length=Math.max(l.length,e._classIds.length);const u=++vde,d=Sde;for(d.length=0,d.push(t);d.length>0;){if(l[t=d.pop()]===u)continue;l[t]=u;const h=n(e,t);if(c(h))return h;const m=o[t],_=s[t];for(let p=0;p<m;++p){const y=r[_+p];y!==t&&d.push(y)}}}(e,t,n):function Dde(e,t,n){let i=!0;for(;i;){const o=n(e,t);if(c(o))return o;const r=e._parentIds[t];i=r!==t,t=r}}(e,t,n):n(e,t)}Kf.prototype.hasProperty=function(e,t){const n=EA(this,e,function(i,o){if(c(i._classes[i._classIds[o]].instances[t]))return!0});return c(n)},Kf.prototype.propertyExists=function(e){const t=this._classes,n=t.length;for(let i=0;i<n;++i)if(c(t[i].instances[e]))return!0;return!1},Kf.prototype.getPropertyIds=function(e,t){return(t=c(t)?t:[]).length=0,EA(this,e,function(n,i){const r=n._classes[n._classIds[i]].instances;for(const s in r)r.hasOwnProperty(s)&&-1===t.indexOf(s)&&t.push(s)}),t},Kf.prototype.getProperty=function(e,t){return EA(this,e,function(n,i){const s=n._classIndexes[i],a=n._classes[n._classIds[i]].instances[t];if(c(a))return c(a.typedArray)?function Pde(e,t){const n=e.typedArray,i=e.componentCount;return 1===i?n[t]:e.type.unpack(n,t*i)}(a,s):Rt(a[s],!0)})},Kf.prototype.setProperty=function(e,t,n){const i=EA(this,e,function(o,r){const l=o._classIndexes[r],u=o._classes[o._classIds[r]].instances[t];if(c(u)){if(r!==e)throw new E(`Inherited property "${t}" is read-only.`);return c(u.typedArray)?function Ode(e,t,n){const i=e.typedArray,o=e.componentCount;1===o?i[t]=n:e.type.pack(n,i,t*o)}(u,l,n):u[l]=Rt(n,!0),!0}});return c(i)},Kf.prototype.isClass=function(e,t){const n=EA(this,e,function(i,o){if(i._classes[i._classIds[o]].name===t)return!0});return c(n)},Kf.prototype.getClassName=function(e){return this._classes[this._classIds[e]].name};const SH=Kf,zl=Object.freeze({ADD:ie.FUNC_ADD,SUBTRACT:ie.FUNC_SUBTRACT,REVERSE_SUBTRACT:ie.FUNC_REVERSE_SUBTRACT,MIN:ie.MIN,MAX:ie.MAX}),lr=Object.freeze({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}),Nde={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:zl.ADD,equationAlpha:zl.ADD,functionSourceRgb:lr.SOURCE_ALPHA,functionSourceAlpha:lr.ONE,functionDestinationRgb:lr.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:lr.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:zl.ADD,equationAlpha:zl.ADD,functionSourceRgb:lr.ONE,functionSourceAlpha:lr.ONE,functionDestinationRgb:lr.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:lr.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:zl.ADD,equationAlpha:zl.ADD,functionSourceRgb:lr.SOURCE_ALPHA,functionSourceAlpha:lr.ONE,functionDestinationRgb:lr.ONE,functionDestinationAlpha:lr.ONE})},eo=Object.freeze(Nde),lS=Object.freeze({HIGHLIGHT:0,REPLACE:1,MIX:2}),ur=Object.freeze({FRONT:ie.FRONT,BACK:ie.BACK,FRONT_AND_BACK:ie.FRONT_AND_BACK}),Fi=Object.freeze({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}),Zt=Object.freeze({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}),uS={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15,setCesium3DTileBit:function(){return{enabled:!0,frontFunction:Fi.ALWAYS,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.REPLACE},backFunction:Fi.ALWAYS,backOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.REPLACE},reference:uS.CESIUM_3D_TILE_MASK,mask:uS.CESIUM_3D_TILE_MASK}}},xn=Object.freeze(uS),eR=Wd.DEFAULT_COLOR_VALUE,tR=Wd.DEFAULT_SHOW_VALUE;function to(e,t,n,i,o){let r;this.featuresLength=t,c(n)&&(r=n.extensions),this._extensions=g(r,{});const s=function kde(e){const t={};if(!c(e))return t;for(const n in e)e.hasOwnProperty(n)&&"HIERARCHY"!==n&&"extensions"!==n&&"extras"!==n&&(t[n]=Rt(e[n],!0));return t}(n);this._properties=s,this._batchTableHierarchy=function Ude(e,t,n){if(!c(t))return;let i=e._extensions["3DTILES_batch_table_hierarchy"];const o=t.HIERARCHY;return c(o)&&(to._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=o,i=o),c(i)?new SH({extension:i,binaryBody:n}):void 0}(this,n,i);const a=vH(t,s,i);this._binaryPropertiesByteLength=function zde(e){if(!c(e))return 0;let t=0;for(const n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}(a),this._batchTableBinaryProperties=a,this._content=e,this._batchTexture=new Wd({featuresLength:t,colorChangedCallback:o,owner:e,statistics:e.tileset.statistics})}function vH(e,t,n){let i;for(const o in t)if(t.hasOwnProperty(o)){const r=t[o],s=r.byteOffset;if(c(s)){const l=r.type;if(!c(r.componentType))throw new Pe("componentType is required.");if(!c(l))throw new Pe("type is required.");if(!c(n))throw new Pe(`Property ${o} requires a batch table binary.`);const u=S_(r),d=u.componentsPerAttribute,h=u.classType,m=u.createArrayBufferView(n.buffer,n.byteOffset+s,e);c(i)||(i={}),i[o]={typedArray:m,componentCount:d,type:h}}}return i}to._deprecationWarning=Ud,Object.defineProperties(to.prototype,{batchTableByteLength:{get:function(){let e=this._binaryPropertiesByteLength;return c(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e+=this._batchTexture.byteLength,e}}}),to.getBinaryProperties=function(e,t,n){return vH(e,t,n)},to.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)},to.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)},to.prototype.getShow=function(e){return this._batchTexture.getShow(e)},to.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)},to.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)},to.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)},to.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};const Vde=new Z;function u0(e,t){if(!c(e)||e<0||e>=t)throw new E(`batchId is required and must be between zero and featuresLength - 1 (${t}`-NaN)}function IH(e,t){return e=St.replaceMain(e,"tile_main"),t?`${e}uniform float tile_colorBlend; \nvoid tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n tile_featureColor = czm_gammaCorrect(tile_featureColor); \n out_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n} \n`:`${e}void tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n} \n`}function DH(e,t,n){if(!c(t))return IH(e,n);let i=new RegExp(`(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+${t};`);const o=e.match(i);if(!c(o))return IH(e,n);const r=o[0],s=o[2];let u;if(e=(e=St.replaceMain(e,"tile_main")).replace(r,""),"vec3"===s||"vec4"===s){const d="vec3"===s?`vec4(${t}, 1.0)`:t,h="vec3"===s?"tile_diffuse.xyz":"tile_diffuse";i=new RegExp(t,"g"),e=e.replace(i,h),u=` vec4 source = ${d}; \n tile_diffuse = tile_diffuse_final(source, tile_featureColor); \n tile_main(); \n`}else"sampler2D"===s&&(e=function Wde(e,t){const n=`texture(${t}`;let r,i=0,o=e.indexOf(n,i);for(;o>-1;){let s=0;for(let u=o;u<e.length;++u){const d=e.charAt(u);if("("===d)++s;else if(")"===d&&(--s,0===s)){r=u+1;break}}const l=`tile_diffuse_final(${e.slice(o,r)}, tile_diffuse)`;e=e.slice(0,o)+l+e.slice(r),i=o+l.length,o=e.indexOf(n,i)}return e}(e,t),u=" tile_diffuse = tile_featureColor; \n tile_main(); \n");return e=`uniform float tile_colorBlend; \nvec4 tile_diffuse = vec4(1.0); \nbool isWhite(vec3 color) \n{ \n return all(greaterThan(color, vec3(1.0 - czm_epsilon3))); \n} \nvec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse) \n{ \n vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend); \n vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse; \n return vec4(diffuse.rgb, sourceDiffuse.a); \n} \n${r}\n${e}\nvoid tile_color(vec4 tile_featureColor) \n{ \n${u}`,n&&(e+=" tile_featureColor = czm_gammaCorrect(tile_featureColor); \n out_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n"),e+"} \n"}to.prototype.applyStyle=function(e){if(!c(e))return this.setAllColor(eR),void this.setAllShow(tR);const t=this._content,n=this.featuresLength;for(let i=0;i<n;++i){const o=t.getFeature(i),r=c(e.color)?g(e.color.evaluateColor(o,Vde),eR):eR,s=c(e.show)?g(e.show.evaluate(o),tR):tR;this.setColor(i,r),this.setShow(i,s)}},to.prototype.isClass=function(e,t){u0(e,this.featuresLength),A.typeOf.string("className",t);const n=this._batchTableHierarchy;return!!c(n)&&n.isClass(e,t)},to.prototype.isExactClass=function(e,t){return A.typeOf.string("className",t),this.getExactClassName(e)===t},to.prototype.getExactClassName=function(e){u0(e,this.featuresLength);const t=this._batchTableHierarchy;if(c(t))return t.getClassName(e)},to.prototype.hasProperty=function(e,t){return u0(e,this.featuresLength),A.typeOf.string("name",t),c(this._properties[t])||c(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)},to.prototype.hasPropertyBySemantic=function(){return!1},to.prototype.getPropertyIds=function(e,t){u0(e,this.featuresLength),(t=c(t)?t:[]).length=0;const n=Object.keys(this._properties);return t.push.apply(t,n),c(this._batchTableHierarchy)&&t.push.apply(t,this._batchTableHierarchy.getPropertyIds(e,n)),t},to.prototype.getPropertyBySemantic=function(e,t){},to.prototype.getProperty=function(e,t){if(u0(e,this.featuresLength),A.typeOf.string("name",t),c(this._batchTableBinaryProperties)){const i=this._batchTableBinaryProperties[t];if(c(i))return function Hde(e,t){const n=e.typedArray,i=e.componentCount;return 1===i?n[t]:e.type.unpack(n,t*i)}(i,e)}const n=this._properties[t];if(c(n))return Rt(n[e],!0);if(c(this._batchTableHierarchy)){const i=this._batchTableHierarchy.getProperty(e,t);if(c(i))return i}},to.prototype.setProperty=function(e,t,n){const i=this.featuresLength;if(u0(e,i),A.typeOf.string("name",t),c(this._batchTableBinaryProperties)){const r=this._batchTableBinaryProperties[t];if(c(r))return void function Gde(e,t,n){const i=e.typedArray,o=e.componentCount;1===o?i[t]=n:e.type.pack(n,i,t*o)}(r,e,n)}if(c(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n))return;let o=this._properties[t];c(o)||(this._properties[t]=new Array(i),o=this._properties[t]),o[e]=Rt(n,!0)},to.prototype.getVertexShaderCallback=function(e,t,n){if(0===this.featuresLength)return;const i=this;return function(o){const r=DH(o,n,!1);let s;return dn.maximumVertexTextureImageUnits>0?(s="",e&&(s+="uniform bool tile_translucentCommand; \n"),s+=`uniform sampler2D tile_batchTexture; \nout vec4 tile_featureColor; \nout vec2 tile_featureSt; \nvoid main() \n{ \n vec2 st = computeSt(${t}); \n vec4 featureProperties = texture(tile_batchTexture, st); \n tile_color(featureProperties); \n float show = ceil(featureProperties.a); \n gl_Position *= show; \n`,e&&(s+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n gl_Position *= 0.0; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n gl_Position *= 0.0; \n } \n } \n"),s+=" tile_featureColor = featureProperties; \n tile_featureSt = st; \n}"):s=`out vec2 tile_featureSt; \nvoid main() \n{ \n tile_color(vec4(1.0)); \n tile_featureSt = computeSt(${t}); \n}`,`${r}\n${function jde(e){return 1===e._batchTexture.textureDimensions.y?"uniform vec4 tile_textureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n return vec2(centerX + (batchId * stepX), 0.5); \n} \n":"uniform vec4 tile_textureStep; \nuniform vec2 tile_textureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n float stepY = tile_textureStep.z; \n float centerY = tile_textureStep.w; \n float xId = mod(batchId, tile_textureDimensions.x); \n float yId = floor(batchId / tile_textureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}(i)}${s}`}},to.prototype.getFragmentShaderCallback=function(e,t,n){if(0!==this.featuresLength)return function(i){return i=DH(i,t,!0),dn.maximumVertexTextureImageUnits>0?(i+="uniform sampler2D tile_pickTexture; \nin vec2 tile_featureSt; \nin vec4 tile_featureColor; \nvoid main() \n{ \n tile_color(tile_featureColor); \n",n&&(i+=" out_FragColor.rgb *= out_FragColor.a; \n"),i+="}"):(e&&(i+="uniform bool tile_translucentCommand; \n"),i+="uniform sampler2D tile_pickTexture; \nuniform sampler2D tile_batchTexture; \nin vec2 tile_featureSt; \nvoid main() \n{ \n vec4 featureProperties = texture(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n",e&&(i+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n discard; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n discard; \n } \n } \n"),i+=" tile_color(featureProperties); \n",n&&(i+=" out_FragColor.rgb *= out_FragColor.a; \n"),i+="} \n"),i}},to.prototype.getClassificationFragmentShaderCallback=function(){if(0!==this.featuresLength)return function(e){return(e=St.replaceMain(e,"tile_main"))+(dn.maximumVertexTextureImageUnits>0?"uniform sampler2D tile_pickTexture;\nin vec2 tile_featureSt; \nin vec4 tile_featureColor; \nvoid main() \n{ \n tile_main(); \n out_FragColor = tile_featureColor; \n out_FragColor.rgb *= out_FragColor.a; \n}":"uniform sampler2D tile_batchTexture; \nuniform sampler2D tile_pickTexture;\nin vec2 tile_featureSt; \nvoid main() \n{ \n tile_main(); \n vec4 featureProperties = texture(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n out_FragColor = featureProperties; \n out_FragColor.rgb *= out_FragColor.a; \n} \n")}},to.prototype.getUniformMapCallback=function(){if(0===this.featuresLength)return;const e=this;return function(t){return Pn(t,{tile_batchTexture:function(){return g(e._batchTexture.batchTexture,e._batchTexture.defaultTexture)},tile_textureDimensions:function(){return e._batchTexture.textureDimensions},tile_textureStep:function(){return e._batchTexture.textureStep},tile_colorBlend:function(){return function qde(e){const t=e._content.tileset,n=t.colorBlendMode;if(n===lS.HIGHLIGHT)return 0;if(n===lS.REPLACE)return 1;if(n===lS.MIX)return O.clamp(t.colorBlendAmount,O.EPSILON4,1);throw new E(`Invalid color blend mode "${n}".`)}(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}},to.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};function Xde(e){const t=$t.shallowClone(e),n=t.pass===Ue.TRANSLUCENT;return t.uniformMap=c(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return n},t}function Zde(e){const t=$t.shallowClone(e);return t.pass=Ue.TRANSLUCENT,t.renderState=function tfe(e){const t=Rt(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=eo.ALPHA_BLEND,t.stencilTest=xn.setCesium3DTileBit(),t.stencilMask=xn.CESIUM_3D_TILE_MASK,Lt.fromCache(t)}(e.renderState),t}function $de(e){const t=$t.shallowClone(e);return t.renderState=function nfe(e){const t=Rt(e,!0);return t.stencilTest=xn.setCesium3DTileBit(),t.stencilMask=xn.CESIUM_3D_TILE_MASK,Lt.fromCache(t)}(e.renderState),t}function Qde(e,t){const n=$t.shallowClone(t),i=Rt(n.renderState,!0);i.cull.enabled=!0,i.cull.face=ur.FRONT,i.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i.polygonOffset={enabled:!0,factor:5,units:5},i.stencilTest=xn.setCesium3DTileBit(),i.stencilMask=xn.CESIUM_3D_TILE_MASK,n.renderState=Lt.fromCache(i),n.castShadows=!1,n.receiveShadows=!1,n.uniformMap=Rt(t.uniformMap);const o=new V(5,5);return n.uniformMap.u_polygonOffset=function(){return o},n.shaderProgram=function Kde(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!c(n)){const i=t.fragmentShaderSource.clone();i.defines=c(i.defines)?i.defines.slice(0):[],i.defines.push("POLYGON_OFFSET"),n=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}return n}(e,t.shaderProgram),n}function Jde(e,t){const n=$t.shallowClone(e),i=Rt(n.renderState,!0);return i.stencilTest.enabled=!0,i.stencilTest.mask=xn.SKIP_LOD_MASK,i.stencilTest.reference=xn.CESIUM_3D_TILE_MASK|t<<xn.SKIP_LOD_BIT_SHIFT,i.stencilTest.frontFunction=Fi.GREATER_OR_EQUAL,i.stencilTest.frontOperation.zPass=Zt.REPLACE,i.stencilTest.backFunction=Fi.GREATER_OR_EQUAL,i.stencilTest.backOperation.zPass=Zt.REPLACE,i.stencilMask=xn.CESIUM_3D_TILE_MASK|xn.SKIP_LOD_MASK,n.renderState=Lt.fromCache(i),n}function efe(e){return(e.renderState.stencilTest.reference&xn.SKIP_LOD_MASK)>>>xn.SKIP_LOD_BIT_SHIFT}to.prototype.addDerivedCommands=function(e,t){const n=e.commandList,i=n.length,o=this._content._tile,r=o._finalResolution,s=o.tileset,a=s.isSkippingLevelOfDetail&&s.hasMixedContent&&e.context.stencilBuffer,l=function Yde(e){const t=e._batchTexture.translucentFeaturesLength;return 0===t?0:t===e.featuresLength?1:2}(this);for(let u=t;u<i;++u){const d=n[u];if(d.pass===Ue.COMPUTE)continue;let h=d.derivedCommands.tileset;(!c(h)||d.dirty)&&(h={},d.derivedCommands.tileset=h,h.originalCommand=Xde(d),d.dirty=!1);const m=h.originalCommand;0!==l&&d.pass!==Ue.TRANSLUCENT&&(c(h.translucent)||(h.translucent=Zde(m))),1!==l&&d.pass!==Ue.TRANSLUCENT&&(c(h.opaque)||(h.opaque=$de(m)),a&&(r||(c(h.zback)||(h.zback=Qde(e.context,m)),s._backfaceCommands.push(h.zback)),(!c(h.stencil)||o._selectionDepth!==efe(h.stencil))&&(h.stencil=d.renderState.depthMask?Jde(m,o._selectionDepth):h.opaque)));const _=a?h.stencil:h.opaque,p=h.translucent;d.pass!==Ue.TRANSLUCENT?(0===l&&(n[u]=_),1===l&&(n[u]=p),2===l&&(n[u]=_,n.push(p))):n[u]=m}},to.prototype.update=function(e,t){this._batchTexture.update(e,t)},to.prototype.isDestroyed=function(){return!1},to.prototype.destroy=function(){return this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),Xe(this)};const nR=to,Xo=Object.freeze({TERRAIN:0,CESIUM_3D_TILE:1,BOTH:2,NUMBER_OF_CLASSIFICATION_TYPES:3}),dS=function ife(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds},iR="#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\n\nvoid main(void)\n{\n#ifdef VECTOR_TILE\n out_FragColor = czm_gammaCorrect(u_highlightColor);\n#else\n out_FragColor = vec4(1.0);\n#endif\n czm_writeDepthClamp();\n}\n",OH="in vec3 position;\nin float a_batchId;\n\nuniform mat4 u_modifiedModelViewProjection;\n\nvoid main()\n{\n gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));\n}\n";function Vl(e,t){this._content=e,this._batchId=t,this._color=void 0}Object.defineProperties(Vl.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 c(this._color)||(this._color=new Z),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},polylinePositions:{get:function(){if(c(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)}}}),Vl.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},Vl.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)},Vl.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},Vl.getPropertyInherited=function(e,t,n){const i=e.batchTable;if(c(i)){if(i.hasPropertyBySemantic(t,n))return i.getPropertyBySemantic(t,n);if(i.hasProperty(t,n))return i.getProperty(t,n)}const o=e.metadata;if(c(o)){if(o.hasPropertyBySemantic(n))return o.getPropertyBySemantic(n);if(o.hasProperty(n))return o.getProperty(n)}const r=e.tile,s=r.metadata;if(c(s)){if(s.hasPropertyBySemantic(n))return s.getPropertyBySemantic(n);if(s.hasProperty(n))return s.getProperty(n)}let a;if(c(r.implicitSubtree)&&(a=r.implicitSubtree.metadata),c(a)){if(a.hasPropertyBySemantic(n))return a.getPropertyBySemantic(n);if(a.hasProperty(n))return a.getProperty(n)}const l=c(e.group)?e.group.metadata:void 0;if(c(l)){if(l.hasPropertyBySemantic(n))return l.getPropertyBySemantic(n);if(l.hasProperty(n))return l.getProperty(n)}const u=e.tileset.metadata;if(c(u)){if(u.hasPropertyBySemantic(n))return u.getPropertyBySemantic(n);if(u.hasProperty(n))return u.getProperty(n)}},Vl.prototype.getPropertyInherited=function(e){return Vl.getPropertyInherited(this._content,this._batchId,e)},Vl.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},Vl.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},Vl.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},Vl.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};const v_=Vl,I_=Object.freeze({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});class Je{static get version(){return"1.3.8"}static toString(){return"JavaScript Expression Parser (JSEP) v"+Je.version}static addUnaryOp(t){return Je.max_unop_len=Math.max(t.length,Je.max_unop_len),Je.unary_ops[t]=1,Je}static addBinaryOp(t,n,i){return Je.max_binop_len=Math.max(t.length,Je.max_binop_len),Je.binary_ops[t]=n,i?Je.right_associative.add(t):Je.right_associative.delete(t),Je}static addIdentifierChar(t){return Je.additional_identifier_chars.add(t),Je}static addLiteral(t,n){return Je.literals[t]=n,Je}static removeUnaryOp(t){return delete Je.unary_ops[t],t.length===Je.max_unop_len&&(Je.max_unop_len=Je.getMaxKeyLen(Je.unary_ops)),Je}static removeAllUnaryOps(){return Je.unary_ops={},Je.max_unop_len=0,Je}static removeIdentifierChar(t){return Je.additional_identifier_chars.delete(t),Je}static removeBinaryOp(t){return delete Je.binary_ops[t],t.length===Je.max_binop_len&&(Je.max_binop_len=Je.getMaxKeyLen(Je.binary_ops)),Je.right_associative.delete(t),Je}static removeAllBinaryOps(){return Je.binary_ops={},Je.max_binop_len=0,Je}static removeLiteral(t){return delete Je.literals[t],Je}static removeAllLiterals(){return Je.literals={},Je}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 Je(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 Je.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!Je.binary_ops[String.fromCharCode(t)]||Je.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return Je.isIdentifierStart(t)||Je.isDecimalDigit(t)}throwError(t){const n=new Error(t+" at character "+this.index);throw n.index=this.index,n.description=t,n}runHook(t,n){if(Je.hooks[t]){const i={context:this,node:n};return Je.hooks.run(t,i),i.node}return n}searchHook(t){if(Je.hooks[t]){const n={context:this};return Je.hooks[t].find(function(i){return i.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let t=this.code;for(;t===Je.SPACE_CODE||t===Je.TAB_CODE||t===Je.LF_CODE||t===Je.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions();return this.runHook("after-all",1===t.length?t[0]:{type:Je.COMPOUND,body:t})}gobbleExpressions(t){let i,o,n=[];for(;this.index<this.expr.length;)if(i=this.code,i===Je.SEMCOL_CODE||i===Je.COMMA_CODE)this.index++;else if(o=this.gobbleExpression())n.push(o);else if(this.index<this.expr.length){if(i===t)break;this.throwError('Unexpected "'+this.char+'"')}return n}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,Je.max_binop_len),n=t.length;for(;n>0;){if(Je.binary_ops.hasOwnProperty(t)&&(!Je.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!Je.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}gobbleBinaryExpression(){let t,n,i,o,r,s,a,l,u;if(s=this.gobbleToken(),!s||(n=this.gobbleBinaryOp(),!n))return s;for(r={value:n,prec:Je.binaryPrecedence(n),right_a:Je.right_associative.has(n)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+n),o=[s,r,a];n=this.gobbleBinaryOp();){if(i=Je.binaryPrecedence(n),0===i){this.index-=n.length;break}r={value:n,prec:i,right_a:Je.right_associative.has(n)},u=n;const d=h=>r.right_a&&h.right_a?i>h.prec:i<=h.prec;for(;o.length>2&&d(o[o.length-2]);)a=o.pop(),n=o.pop().value,s=o.pop(),t={type:Je.BINARY_EXP,operator:n,left:s,right:a},o.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+u),o.push(r,t)}for(l=o.length-1,t=o[l];l>1;)t={type:Je.BINARY_EXP,operator:o[l-1].value,left:o[l-2],right:t},l-=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,Je.isDecimalDigit(t)||t===Je.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===Je.SQUOTE_CODE||t===Je.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===Je.OBRACK_CODE)o=this.gobbleArray();else{for(n=this.expr.substr(this.index,Je.max_unop_len),i=n.length;i>0;){if(Je.unary_ops.hasOwnProperty(n)&&(!Je.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!Je.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=i;const r=this.gobbleToken();return r||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:Je.UNARY_EXP,operator:n,argument:r,prefix:!0})}n=n.substr(0,--i)}Je.isIdentifierStart(t)?(o=this.gobbleIdentifier(),Je.literals.hasOwnProperty(o.name)?o={type:Je.LITERAL,value:Je.literals[o.name],raw:o.name}:o.name===Je.this_str&&(o={type:Je.THIS_EXP})):t===Je.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let n=this.code;for(;n===Je.PERIOD_CODE||n===Je.OBRACK_CODE||n===Je.OPAREN_CODE||n===Je.QUMARK_CODE;){let i;if(n===Je.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==Je.PERIOD_CODE)break;i=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===Je.OBRACK_CODE?(t={type:Je.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},this.gobbleSpaces(),n=this.code,n!==Je.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===Je.OPAREN_CODE?t={type:Je.CALL_EXP,arguments:this.gobbleArguments(Je.CPAREN_CODE),callee:t}:(n===Je.PERIOD_CODE||i)&&(i&&this.index--,this.gobbleSpaces(),t={type:Je.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),i&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}gobbleNumericLiteral(){let n,i,t="";for(;Je.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===Je.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);Je.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(n=this.char,"e"===n||"E"===n){for(t+=this.expr.charAt(this.index++),n=this.char,("+"===n||"-"===n)&&(t+=this.expr.charAt(this.index++));Je.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);Je.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return i=this.code,Je.isIdentifierStart(i)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(i===Je.PERIOD_CODE||1===t.length&&t.charCodeAt(0)===Je.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:Je.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="";const n=this.index,i=this.expr.charAt(this.index++);let o=!1;for(;this.index<this.expr.length;){let r=this.expr.charAt(this.index++);if(r===i){o=!0;break}if("\\"===r)switch(r=this.expr.charAt(this.index++),r){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=r}else t+=r}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:Je.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}gobbleIdentifier(){let t=this.code,n=this.index;for(Je.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,Je.isIdentifierPart(t));)this.index++;return{type:Je.IDENTIFIER,name:this.expr.slice(n,this.index)}}gobbleArguments(t){const n=[];let i=!1,o=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let r=this.code;if(r===t){i=!0,this.index++,t===Je.CPAREN_CODE&&o&&o>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(r===Je.COMMA_CODE){if(this.index++,o++,o!==n.length)if(t===Je.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===Je.CBRACK_CODE)for(let s=n.length;s<o;s++)n.push(null)}else if(n.length!==o&&0!==o)this.throwError("Expected comma");else{const s=this.gobbleExpression();(!s||s.type===Je.COMPOUND)&&this.throwError("Expected comma"),n.push(s)}}return i||this.throwError("Expected "+String.fromCharCode(t)),n}gobbleGroup(){this.index++;let t=this.gobbleExpressions(Je.CPAREN_CODE);if(this.code===Je.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:Je.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:Je.ARRAY_EXP,elements:this.gobbleArguments(Je.CBRACK_CODE)}}}const afe=new class rfe{add(t,n,i){if("string"!=typeof arguments[0])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)})}};Object.assign(Je,{hooks:afe,plugins:new class sfe{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(n=>{if("object"!=typeof n||!n.name||!n.init)throw new Error("Invalid JSEP plugin format");this.registered[n.name]||(n.init(this.jsep),this.registered[n.name]=n)})}}(Je),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":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"}),Je.max_unop_len=Je.getMaxKeyLen(Je.unary_ops),Je.max_binop_len=Je.getMaxKeyLen(Je.binary_ops);const D_=e=>new Je(e).parse();Object.getOwnPropertyNames(Je).forEach(e=>{void 0===D_[e]&&"prototype"!==e&&(D_[e]=Je[e])}),D_.Jsep=Je;var lfe={name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;const i=n.node,o=this.gobbleExpression();if(o||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;const r=this.gobbleExpression();if(r||this.throwError("Expected expression"),n.node={type:"ConditionalExpression",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 :")}})}};D_.plugins.register(lfe);const Ut=Object.freeze({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});function Bu(e,t){let n;A.typeOf.string("expression",e),this._expression=e,e=function xfe(e,t){if(!c(t))return e;for(const n in t)if(t.hasOwnProperty(n)){const i=new RegExp(`\\$\\{${n}\\}`,"g"),o=`(${t[n]})`;c(o)&&(e=e.replace(i,o))}return e}(e,t),e=function Efe(e){let t=e,n="",i=t.indexOf("${");for(;i>=0;){const o=t.indexOf("'"),r=t.indexOf('"');let s;if(o>=0&&o<i)s=t.indexOf("'",o+1),n+=t.substr(0,s+1),t=t.substr(s+1),i=t.indexOf("${");else if(r>=0&&r<i)s=t.indexOf('"',r+1),n+=t.substr(0,s+1),t=t.substr(s+1),i=t.indexOf("${");else{n+=t.substr(0,i);const a=t.indexOf("}");if(a<0)throw new Pe("Unmatched {.");n+=`czm_${t.substr(i+2,a-(i+2))}`,t=t.substr(a+1),i=t.indexOf("${")}}return n+=t,n}(function Cfe(e){return e.replace(dfe,ffe)}(e)),D_.addBinaryOp("=~",0),D_.addBinaryOp("!~",0);try{n=D_(e)}catch(i){throw new Pe(i)}this._runtimeAst=Ti(this,n)}Object.defineProperties(Bu.prototype,{expression:{get:function(){return this._expression}}});const Fn={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new V],cartesian3Array:[new f],cartesian4Array:[new de],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);const e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new V),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new f),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new de),this.cartesian4Array[this.cartesian4Index++]}};Bu.prototype.evaluate=function(e,t){Fn.reset();const n=this._runtimeAst.evaluate(e);return t instanceof Z&&n instanceof de?Z.fromCartesian4(n,t):n instanceof V||n instanceof f||n instanceof de?n.clone(t):n},Bu.prototype.evaluateColor=function(e,t){Fn.reset();const n=this._runtimeAst.evaluate(e);return Z.fromCartesian4(n,t)},Bu.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e}\n{\n return ${o};\n}\n`,o},Bu.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)},Bu.prototype.getVariables=function(){let e=[];return this._runtimeAst.getVariables(e),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};const ufe=["!","-","+"],RH=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],fS=/\${(.*?)}/g,dfe=/\\/g,ffe="@#%",hfe=/@#%/g,hS=new Z,pS={abs:ys(Math.abs),sqrt:ys(Math.sqrt),cos:ys(Math.cos),sin:ys(Math.sin),tan:ys(Math.tan),acos:ys(Math.acos),asin:ys(Math.asin),atan:ys(Math.atan),radians:ys(O.toRadians),degrees:ys(O.toDegrees),sign:ys(O.sign),floor:ys(Math.floor),ceil:ys(Math.ceil),round:ys(Math.round),exp:ys(Math.exp),exp2:ys(function mfe(e){return Math.pow(2,e)}),log:ys(Math.log),log2:ys(function _fe(e){return O.log2(e)}),fract:ys(function pfe(e){return e-Math.floor(e)}),length:function gfe(e,t){if("number"==typeof t)return Math.abs(t);if(t instanceof V)return V.magnitude(t);if(t instanceof f)return f.magnitude(t);if(t instanceof de)return de.magnitude(t);throw new Pe(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)},normalize:function yfe(e,t){if("number"==typeof t)return 1;if(t instanceof V)return V.normalize(t,Fn.getCartesian2());if(t instanceof f)return f.normalize(t,Fn.getCartesian3());if(t instanceof de)return de.normalize(t,Fn.getCartesian4());throw new Pe(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}},mS={atan2:_S(Math.atan2,!1),pow:_S(Math.pow,!1),min:_S(Math.min,!0),max:_S(Math.max,!0),distance:function bfe(e,t,n){if("number"==typeof t&&"number"==typeof n)return Math.abs(t-n);if(t instanceof V&&n instanceof V)return V.distance(t,n);if(t instanceof f&&n instanceof f)return f.distance(t,n);if(t instanceof de&&n instanceof de)return de.distance(t,n);throw new Pe(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)},dot:function Tfe(e,t,n){if("number"==typeof t&&"number"==typeof n)return t*n;if(t instanceof V&&n instanceof V)return V.dot(t,n);if(t instanceof f&&n instanceof f)return f.dot(t,n);if(t instanceof de&&n instanceof de)return de.dot(t,n);throw new Pe(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)},cross:function Afe(e,t,n){if(t instanceof f&&n instanceof f)return f.cross(t,n,Fn.getCartesian3());throw new Pe(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}},oR={clamp:LH(O.clamp,!0),mix:LH(O.lerp,!0)};function ys(e){return function(t,n){if("number"==typeof n)return e(n);if(n instanceof V)return V.fromElements(e(n.x),e(n.y),Fn.getCartesian2());if(n instanceof f)return f.fromElements(e(n.x),e(n.y),e(n.z),Fn.getCartesian3());if(n instanceof de)return de.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),Fn.getCartesian4());throw new Pe(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function _S(e,t){return function(n,i,o){if(t&&"number"==typeof o){if("number"==typeof i)return e(i,o);if(i instanceof V)return V.fromElements(e(i.x,o),e(i.y,o),Fn.getCartesian2());if(i instanceof f)return f.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),Fn.getCartesian3());if(i instanceof de)return de.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),e(i.w,o),Fn.getCartesian4())}if("number"==typeof i&&"number"==typeof o)return e(i,o);if(i instanceof V&&o instanceof V)return V.fromElements(e(i.x,o.x),e(i.y,o.y),Fn.getCartesian2());if(i instanceof f&&o instanceof f)return f.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),Fn.getCartesian3());if(i instanceof de&&o instanceof de)return de.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),e(i.w,o.w),Fn.getCartesian4());throw new Pe(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${o}.`)}}function LH(e,t){return function(n,i,o,r){if(t&&"number"==typeof r){if("number"==typeof i&&"number"==typeof o)return e(i,o,r);if(i instanceof V&&o instanceof V)return V.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),Fn.getCartesian2());if(i instanceof f&&o instanceof f)return f.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),Fn.getCartesian3());if(i instanceof de&&o instanceof de)return de.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),Fn.getCartesian4())}if("number"==typeof i&&"number"==typeof o&&"number"==typeof r)return e(i,o,r);if(i instanceof V&&o instanceof V&&r instanceof V)return V.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),Fn.getCartesian2());if(i instanceof f&&o instanceof f&&r instanceof f)return f.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),Fn.getCartesian3());if(i instanceof de&&o instanceof de&&r instanceof de)return de.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),Fn.getCartesian4());throw new Pe(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${o}, and ${r}.`)}}function Mt(e,t,n,i,o){this._type=e,this._value=t,this._left=n,this._right=i,this._test=o,this.evaluate=void 0,function Nfe(e){e._type===Ut.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===Ut.FUNCTION_CALL?"test"===e._value?e.evaluate=e._evaluateRegExpTest:"exec"===e._value?e.evaluate=e._evaluateRegExpExec:"toString"===e._value&&(e.evaluate=e._evaluateToString):e._type===Ut.UNARY?"!"===e._value?e.evaluate=e._evaluateNot:"-"===e._value?e.evaluate=e._evaluateNegative:"+"===e._value?e.evaluate=e._evaluatePositive:"isNaN"===e._value?e.evaluate=e._evaluateNaN:"isFinite"===e._value?e.evaluate=e._evaluateIsFinite:"isExactClass"===e._value?e.evaluate=e._evaluateIsExactClass:"isClass"===e._value?e.evaluate=e._evaluateIsClass:"getExactClassName"===e._value?e.evaluate=e._evaluateGetExactClassName:"Boolean"===e._value?e.evaluate=e._evaluateBooleanConversion:"Number"===e._value?e.evaluate=e._evaluateNumberConversion:"String"===e._value?e.evaluate=e._evaluateStringConversion:c(pS[e._value])&&(e.evaluate=function Ffe(e){const t=pS[e];return function(n){const i=this._left.evaluate(n);return t(e,i)}}(e._value)):e._type===Ut.BINARY?"+"===e._value?e.evaluate=e._evaluatePlus:"-"===e._value?e.evaluate=e._evaluateMinus:"*"===e._value?e.evaluate=e._evaluateTimes:"/"===e._value?e.evaluate=e._evaluateDivide:"%"===e._value?e.evaluate=e._evaluateMod:"==="===e._value?e.evaluate=e._evaluateEqualsStrict:"!=="===e._value?e.evaluate=e._evaluateNotEqualsStrict:"<"===e._value?e.evaluate=e._evaluateLessThan:"<="===e._value?e.evaluate=e._evaluateLessThanOrEquals:">"===e._value?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:c(mS[e._value])&&(e.evaluate=function Bfe(e){const t=mS[e];return function(n){const i=this._left.evaluate(n),o=this._right.evaluate(n);return t(e,i,o)}}(e._value)):e._type===Ut.TERNARY?e.evaluate=function kfe(e){const t=oR[e];return function(n){const i=this._left.evaluate(n),o=this._right.evaluate(n),r=this._test.evaluate(n);return t(e,i,o,r)}}(e._value):e._type===Ut.MEMBER?e.evaluate="brackets"===e._value?e._evaluateMemberBrackets:e._evaluateMemberDot:e._type===Ut.ARRAY?e.evaluate=e._evaluateArray:e._type===Ut.VARIABLE?e.evaluate=e._evaluateVariable:e._type===Ut.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===Ut.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===Ut.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===Ut.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===Ut.REGEX?e.evaluate=e._evaluateRegExp:e._type===Ut.BUILTIN_VARIABLE?"tiles3d_tileset_time"===e._value&&(e.evaluate=Mfe):e.evaluate=e._evaluateLiteral}(this)}function rR(e){return e.replace(hfe,"\\")}function sR(e){return e._type>=Ut.LITERAL_NULL}function Ti(e,t){let n,i,o,r;if("Literal"===t.type)n=function wfe(e){const t=typeof e.value;return null===e.value?new Mt(Ut.LITERAL_NULL,null):"boolean"===t?new Mt(Ut.LITERAL_BOOLEAN,e.value):"number"===t?new Mt(Ut.LITERAL_NUMBER,e.value):"string"===t?e.value.indexOf("${")>=0?new Mt(Ut.VARIABLE_IN_STRING,e.value):new Mt(Ut.LITERAL_STRING,rR(e.value)):void 0}(t);else if("CallExpression"===t.type)n=function Sfe(e,t){const n=t.arguments,i=n.length;let o,r,s,a;if("MemberExpression"===t.callee.type){o=t.callee.property.name;const l=t.callee.object;if("test"===o||"exec"===o){if(!c(l.callee)||"regExp"!==l.callee.name)throw new Pe(`${o} is not a function.`);return 0===i?"test"===o?new Mt(Ut.LITERAL_BOOLEAN,!1):new Mt(Ut.LITERAL_NULL,null):(s=Ti(e,l),a=Ti(e,n[0]),new Mt(Ut.FUNCTION_CALL,o,s,a))}if("toString"===o)return r=Ti(e,l),new Mt(Ut.FUNCTION_CALL,o,r);throw new Pe(`Unexpected function call "${o}".`)}if(o=t.callee.name,"color"===o){if(0===i)return new Mt(Ut.LITERAL_COLOR,o);if(r=Ti(e,n[0]),c(n[1])){const l=Ti(e,n[1]);return new Mt(Ut.LITERAL_COLOR,o,[r,l])}return new Mt(Ut.LITERAL_COLOR,o,[r])}if("rgb"===o||"hsl"===o){if(i<3)throw new Pe(`${o} requires three arguments.`);return r=[Ti(e,n[0]),Ti(e,n[1]),Ti(e,n[2])],new Mt(Ut.LITERAL_COLOR,o,r)}if("rgba"===o||"hsla"===o){if(i<4)throw new Pe(`${o} requires four arguments.`);return r=[Ti(e,n[0]),Ti(e,n[1]),Ti(e,n[2]),Ti(e,n[3])],new Mt(Ut.LITERAL_COLOR,o,r)}if("vec2"===o||"vec3"===o||"vec4"===o){r=new Array(i);for(let l=0;l<i;++l)r[l]=Ti(e,n[l]);return new Mt(Ut.LITERAL_VECTOR,o,r)}if("isNaN"===o||"isFinite"===o)return 0===i?new Mt(Ut.LITERAL_BOOLEAN,"isNaN"===o):(r=Ti(e,n[0]),new Mt(Ut.UNARY,o,r));if("isExactClass"===o||"isClass"===o){if(i<1||i>1)throw new Pe(`${o} requires exactly one argument.`);return r=Ti(e,n[0]),new Mt(Ut.UNARY,o,r)}if("getExactClassName"===o){if(i>0)throw new Pe(`${o} does not take any argument.`);return new Mt(Ut.UNARY,o)}if(c(pS[o])){if(1!==i)throw new Pe(`${o} requires exactly one argument.`);return r=Ti(e,n[0]),new Mt(Ut.UNARY,o,r)}if(c(mS[o])){if(2!==i)throw new Pe(`${o} requires exactly two arguments.`);return s=Ti(e,n[0]),a=Ti(e,n[1]),new Mt(Ut.BINARY,o,s,a)}if(c(oR[o])){if(3!==i)throw new Pe(`${o} requires exactly three arguments.`);s=Ti(e,n[0]),a=Ti(e,n[1]);const l=Ti(e,n[2]);return new Mt(Ut.TERNARY,o,s,a,l)}if("Boolean"===o)return 0===i?new Mt(Ut.LITERAL_BOOLEAN,!1):(r=Ti(e,n[0]),new Mt(Ut.UNARY,o,r));if("Number"===o)return 0===i?new Mt(Ut.LITERAL_NUMBER,0):(r=Ti(e,n[0]),new Mt(Ut.UNARY,o,r));if("String"===o)return 0===i?new Mt(Ut.LITERAL_STRING,""):(r=Ti(e,n[0]),new Mt(Ut.UNARY,o,r));if("regExp"===o)return function vfe(e,t){const n=t.arguments;if(0===n.length)return new Mt(Ut.LITERAL_REGEX,new RegExp);const i=Ti(e,n[0]);let o;if(n.length>1){const r=Ti(e,n[1]);if(sR(i)&&sR(r)){try{o=new RegExp(rR(String(i._value)),r._value)}catch(s){throw new Pe(s)}return new Mt(Ut.LITERAL_REGEX,o)}return new Mt(Ut.REGEX,i,r)}if(sR(i)){try{o=new RegExp(rR(String(i._value)))}catch(r){throw new Pe(r)}return new Mt(Ut.LITERAL_REGEX,o)}return new Mt(Ut.REGEX,i)}(e,t);throw new Pe(`Unexpected function call "${o}".`)}(e,t);else if("Identifier"===t.type)n=function Ife(e){if(function Rfe(e){return"czm_"===e.substr(0,4)}(e.name)){const t=function Lfe(e){return e.substr(4)}(e.name);return"tiles3d_"===t.substr(0,8)?new Mt(Ut.BUILTIN_VARIABLE,t):new Mt(Ut.VARIABLE,t)}if("NaN"===e.name)return new Mt(Ut.LITERAL_NUMBER,NaN);if("Infinity"===e.name)return new Mt(Ut.LITERAL_NUMBER,1/0);if("undefined"===e.name)return new Mt(Ut.LITERAL_UNDEFINED,void 0);throw new Pe(`${e.name} is not defined.`)}(t);else if("UnaryExpression"===t.type){i=t.operator;const s=Ti(e,t.argument);if(!(ufe.indexOf(i)>-1))throw new Pe(`Unexpected operator "${i}".`);n=new Mt(Ut.UNARY,i,s)}else if("BinaryExpression"===t.type){if(i=t.operator,o=Ti(e,t.left),r=Ti(e,t.right),!(RH.indexOf(i)>-1))throw new Pe(`Unexpected operator "${i}".`);n=new Mt(Ut.BINARY,i,o,r)}else if("LogicalExpression"===t.type)i=t.operator,o=Ti(e,t.left),r=Ti(e,t.right),RH.indexOf(i)>-1&&(n=new Mt(Ut.BINARY,i,o,r));else if("ConditionalExpression"===t.type){const s=Ti(e,t.test);o=Ti(e,t.consequent),r=Ti(e,t.alternate),n=new Mt(Ut.CONDITIONAL,"?",o,r,s)}else if("MemberExpression"===t.type)n=function Ofe(e,t){if("Math"===t.object.name)return function Dfe(e){const t=e.property.name;return"PI"===t?new Mt(Ut.LITERAL_NUMBER,Math.PI):"E"===t?new Mt(Ut.LITERAL_NUMBER,Math.E):void 0}(t);if("Number"===t.object.name)return function Pfe(e){if("POSITIVE_INFINITY"===e.property.name)return new Mt(Ut.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}(t);let n;const i=Ti(e,t.object);return t.computed?(n=Ti(e,t.property),new Mt(Ut.MEMBER,"brackets",i,n)):(n=new Mt(Ut.LITERAL_STRING,t.property.name),new Mt(Ut.MEMBER,"dot",i,n))}(e,t);else{if("ArrayExpression"!==t.type)throw new Pe("Compound"===t.type?"Provide exactly one expression.":"Cannot parse expression.");{const s=[];for(let a=0;a<t.elements.length;a++)s[a]=Ti(e,t.elements[a]);n=new Mt(Ut.ARRAY,s)}}return n}function Mfe(e){return c(e)?e.content.tileset.timeSinceLoad:0}function gS(e,t){if(c(e))return e.getPropertyInherited(t)}function P_(e){return"feature"===e._value}function NH(e){const t=e._left,n=t.length;for(let a=0;a<n;++a)if(t[a]._type!==Ut.LITERAL_NUMBER)return;return Z.fromHsl(t[0]._value,t[1]._value,t[2]._value,4===n?t[3]._value:1,hS)}function MH(e){const t=e._left,n=t.length;for(let o=0;o<n;++o)if(t[o]._type!==Ut.LITERAL_NUMBER)return;const i=hS;return i.red=t[0]._value/255,i.green=t[1]._value/255,i.blue=t[2]._value/255,i.alpha=4===n?t[3]._value:1,i}function vp(e){return e%1==0?e.toFixed(1):e.toString()}function yS(e){return`vec4(${vp(e.red)}, ${vp(e.green)}, ${vp(e.blue)}, ${vp(e.alpha)})`}function FH(e,t,n,i){const o=e.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=e[s].getShaderExpression(t,n,i);return r}function BH(e,t){return c(t[e])?t[e]:Bu.NULL_SENTINEL}Mt.prototype._evaluateLiteral=function(){return this._value},Mt.prototype._evaluateLiteralColor=function(e){const t=hS,n=this._left;if("color"===this._value)c(n)?n.length>1?(Z.fromCssColorString(n[0].evaluate(e),t),t.alpha=n[1].evaluate(e)):Z.fromCssColorString(n[0].evaluate(e),t):Z.fromBytes(255,255,255,255,t);else if("rgb"===this._value)Z.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),255,t);else if("rgba"===this._value){const i=255*n[3].evaluate(e);Z.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),i,t)}else"hsl"===this._value?Z.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),1,t):"hsla"===this._value&&Z.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),n[3].evaluate(e),t);return de.fromColor(t,Fn.getCartesian4())},Mt.prototype._evaluateLiteralVector=function(e){const t=Fn.getArray(),n=this._value,i=this._left,o=i.length;for(let a=0;a<o;++a){const l=i[a].evaluate(e);if("number"==typeof l)t.push(l);else if(l instanceof V)t.push(l.x,l.y);else if(l instanceof f)t.push(l.x,l.y,l.z);else{if(!(l instanceof de))throw new Pe(`${n} argument must be a vector or number. Argument is ${l}.`);t.push(l.x,l.y,l.z,l.w)}}const r=t.length,s=parseInt(n.charAt(3));if(0===r)throw new Pe(`Invalid ${n} constructor. No valid arguments.`);if(r<s&&r>1)throw new Pe(`Invalid ${n} constructor. Not enough arguments.`);if(r>s&&o>1)throw new Pe(`Invalid ${n} constructor. Too many arguments.`);if(1===r){const a=t[0];t.push(a,a,a)}return"vec2"===n?V.fromArray(t,0,Fn.getCartesian2()):"vec3"===n?f.fromArray(t,0,Fn.getCartesian3()):"vec4"===n?de.fromArray(t,0,Fn.getCartesian4()):void 0},Mt.prototype._evaluateLiteralString=function(){return this._value},Mt.prototype._evaluateVariableString=function(e){let t=this._value,n=fS.exec(t);for(;null!==n;){const i=n[0];let r=gS(e,n[1]);c(r)||(r=""),t=t.replace(i,r),n=fS.exec(t)}return t},Mt.prototype._evaluateVariable=function(e){return gS(e,this._value)},Mt.prototype._evaluateMemberDot=function(e){if(P_(this._left))return gS(e,this._right.evaluate(e));const t=this._left.evaluate(e);if(!c(t))return;const n=this._right.evaluate(e);if(t instanceof V||t instanceof f||t instanceof de){if("r"===n)return t.x;if("g"===n)return t.y;if("b"===n)return t.z;if("a"===n)return t.w}return t[n]},Mt.prototype._evaluateMemberBrackets=function(e){if(P_(this._left))return gS(e,this._right.evaluate(e));const t=this._left.evaluate(e);if(!c(t))return;const n=this._right.evaluate(e);if(t instanceof V||t instanceof f||t instanceof de){if(0===n||"r"===n)return t.x;if(1===n||"g"===n)return t.y;if(2===n||"b"===n)return t.z;if(3===n||"a"===n)return t.w}return t[n]},Mt.prototype._evaluateArray=function(e){const t=[];for(let n=0;n<this._value.length;n++)t[n]=this._value[n].evaluate(e);return t},Mt.prototype._evaluateNot=function(e){const t=this._left.evaluate(e);if("boolean"!=typeof t)throw new Pe(`Operator "!" requires a boolean argument. Argument is ${t}.`);return!t},Mt.prototype._evaluateNegative=function(e){const t=this._left.evaluate(e);if(t instanceof V)return V.negate(t,Fn.getCartesian2());if(t instanceof f)return f.negate(t,Fn.getCartesian3());if(t instanceof de)return de.negate(t,Fn.getCartesian4());if("number"==typeof t)return-t;throw new Pe(`Operator "-" requires a vector or number argument. Argument is ${t}.`)},Mt.prototype._evaluatePositive=function(e){const t=this._left.evaluate(e);if(!(t instanceof V||t instanceof f||t instanceof de||"number"==typeof t))throw new Pe(`Operator "+" requires a vector or number argument. Argument is ${t}.`);return t},Mt.prototype._evaluateLessThan=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof n)throw new Pe(`Operator "<" requires number arguments. Arguments are ${t} and ${n}.`);return t<n},Mt.prototype._evaluateLessThanOrEquals=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof n)throw new Pe(`Operator "<=" requires number arguments. Arguments are ${t} and ${n}.`);return t<=n},Mt.prototype._evaluateGreaterThan=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof n)throw new Pe(`Operator ">" requires number arguments. Arguments are ${t} and ${n}.`);return t>n},Mt.prototype._evaluateGreaterThanOrEquals=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof n)throw new Pe(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n},Mt.prototype._evaluateOr=function(e){const t=this._left.evaluate(e);if("boolean"!=typeof t)throw new Pe(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;const n=this._right.evaluate(e);if("boolean"!=typeof n)throw new Pe(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n},Mt.prototype._evaluateAnd=function(e){const t=this._left.evaluate(e);if("boolean"!=typeof t)throw new Pe(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;const n=this._right.evaluate(e);if("boolean"!=typeof n)throw new Pe(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n},Mt.prototype._evaluatePlus=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof V&&t instanceof V)return V.add(t,n,Fn.getCartesian2());if(n instanceof f&&t instanceof f)return f.add(t,n,Fn.getCartesian3());if(n instanceof de&&t instanceof de)return de.add(t,n,Fn.getCartesian4());if("string"==typeof t||"string"==typeof n)return t+n;if("number"==typeof t&&"number"==typeof n)return t+n;throw new Pe(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateMinus=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof V&&t instanceof V)return V.subtract(t,n,Fn.getCartesian2());if(n instanceof f&&t instanceof f)return f.subtract(t,n,Fn.getCartesian3());if(n instanceof de&&t instanceof de)return de.subtract(t,n,Fn.getCartesian4());if("number"==typeof t&&"number"==typeof n)return t-n;throw new Pe(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateTimes=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof V&&t instanceof V)return V.multiplyComponents(t,n,Fn.getCartesian2());if(n instanceof V&&"number"==typeof t)return V.multiplyByScalar(n,t,Fn.getCartesian2());if(t instanceof V&&"number"==typeof n)return V.multiplyByScalar(t,n,Fn.getCartesian2());if(n instanceof f&&t instanceof f)return f.multiplyComponents(t,n,Fn.getCartesian3());if(n instanceof f&&"number"==typeof t)return f.multiplyByScalar(n,t,Fn.getCartesian3());if(t instanceof f&&"number"==typeof n)return f.multiplyByScalar(t,n,Fn.getCartesian3());if(n instanceof de&&t instanceof de)return de.multiplyComponents(t,n,Fn.getCartesian4());if(n instanceof de&&"number"==typeof t)return de.multiplyByScalar(n,t,Fn.getCartesian4());if(t instanceof de&&"number"==typeof n)return de.multiplyByScalar(t,n,Fn.getCartesian4());if("number"==typeof t&&"number"==typeof n)return t*n;throw new Pe(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateDivide=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof V&&t instanceof V)return V.divideComponents(t,n,Fn.getCartesian2());if(t instanceof V&&"number"==typeof n)return V.divideByScalar(t,n,Fn.getCartesian2());if(n instanceof f&&t instanceof f)return f.divideComponents(t,n,Fn.getCartesian3());if(t instanceof f&&"number"==typeof n)return f.divideByScalar(t,n,Fn.getCartesian3());if(n instanceof de&&t instanceof de)return de.divideComponents(t,n,Fn.getCartesian4());if(t instanceof de&&"number"==typeof n)return de.divideByScalar(t,n,Fn.getCartesian4());if("number"==typeof t&&"number"==typeof n)return t/n;throw new Pe(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateMod=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof V&&t instanceof V)return V.fromElements(t.x%n.x,t.y%n.y,Fn.getCartesian2());if(n instanceof f&&t instanceof f)return f.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,Fn.getCartesian3());if(n instanceof de&&t instanceof de)return de.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,t.w%n.w,Fn.getCartesian4());if("number"==typeof t&&"number"==typeof n)return t%n;throw new Pe(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateEqualsStrict=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof V&&t instanceof V||n instanceof f&&t instanceof f||n instanceof de&&t instanceof de?t.equals(n):t===n},Mt.prototype._evaluateNotEqualsStrict=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof V&&t instanceof V||n instanceof f&&t instanceof f||n instanceof de&&t instanceof de?!t.equals(n):t!==n},Mt.prototype._evaluateConditional=function(e){const t=this._test.evaluate(e);if("boolean"!=typeof t)throw new Pe(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)},Mt.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))},Mt.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))},Mt.prototype._evaluateIsExactClass=function(e){return!!c(e)&&e.isExactClass(this._left.evaluate(e))},Mt.prototype._evaluateIsClass=function(e){return!!c(e)&&e.isClass(this._left.evaluate(e))},Mt.prototype._evaluateGetExactClassName=function(e){if(c(e))return e.getExactClassName()},Mt.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)},Mt.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))},Mt.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))},Mt.prototype._evaluateRegExp=function(e){const t=this._value.evaluate(e);let i,n="";c(this._left)&&(n=this._left.evaluate(e));try{i=new RegExp(t,n)}catch(o){throw new Pe(o)}return i},Mt.prototype._evaluateRegExpTest=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof n))throw new Pe(`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)},Mt.prototype._evaluateRegExpMatch=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof n)return t.test(n);if(n instanceof RegExp&&"string"==typeof t)return n.test(t);throw new Pe(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateRegExpNotMatch=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof n)return!t.test(n);if(n instanceof RegExp&&"string"==typeof t)return!n.test(t);throw new Pe(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)},Mt.prototype._evaluateRegExpExec=function(e){const t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof n))throw new Pe(`RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);const i=t.exec(n);return c(i)?i[1]:null},Mt.prototype._evaluateToString=function(e){const t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof V||t instanceof f||t instanceof de)return String(t);throw new Pe(`Unexpected function call "${this._value}".`)},Bu.NULL_SENTINEL="czm_infinity",Mt.prototype.getShaderExpression=function(e,t,n){let i,o,r,s;const a=this._type;let u,d,h,l=this._value;switch(c(this._left)&&(o=Array.isArray(this._left)?FH(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),c(this._right)&&(r=this._right.getShaderExpression(e,t,this)),c(this._test)&&(s=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(l=FH(this._value,e,t,this)),a){case Ut.VARIABLE:return P_(this)?void 0:BH(l,e);case Ut.UNARY:if("Boolean"===l)return`bool(${o})`;if("Number"===l)return`float(${o})`;if("round"===l)return`floor(${o} + 0.5)`;if(c(pS[l]))return`${l}(${o})`;if("isNaN"===l)return`(${o} != ${o})`;if("isFinite"===l)return`(abs(${o}) < czm_infinity)`;if("String"===l||"isExactClass"===l||"isClass"===l||"getExactClassName"===l)throw new Pe(`Error generating style shader: "${l}" is not supported.`);return l+o;case Ut.BINARY:return"%"===l?`mod(${o}, ${r})`:"==="===l?`(${o} == ${r})`:"!=="===l?`(${o} != ${r})`:"atan2"===l?`atan(${o}, ${r})`:c(mS[l])?`${l}(${o}, ${r})`:`(${o} ${l} ${r})`;case Ut.TERNARY:if(c(oR[l]))return`${l}(${o}, ${r}, ${s})`;break;case Ut.CONDITIONAL:return`(${s} ? ${o} : ${r})`;case Ut.MEMBER:return P_(this._left)?BH(r,e):"r"===r||"x"===r||"0.0"===r?`${o}[0]`:"g"===r||"y"===r||"1.0"===r?`${o}[1]`:"b"===r||"z"===r||"2.0"===r?`${o}[2]`:"a"===r||"w"===r||"3.0"===r?`${o}[3]`:`${o}[int(${r})]`;case Ut.FUNCTION_CALL:throw new Pe(`Error generating style shader: "${l}" is not supported.`);case Ut.ARRAY:if(4===l.length)return`vec4(${l[0]}, ${l[1]}, ${l[2]}, ${l[3]})`;if(3===l.length)return`vec3(${l[0]}, ${l[1]}, ${l[2]})`;if(2===l.length)return`vec2(${l[0]}, ${l[1]})`;throw new Pe("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case Ut.REGEX:throw new Pe("Error generating style shader: Regular expressions are not supported.");case Ut.VARIABLE_IN_STRING:throw new Pe("Error generating style shader: Converting a variable to a string is not supported.");case Ut.LITERAL_NULL:return Bu.NULL_SENTINEL;case Ut.LITERAL_BOOLEAN:return l?"true":"false";case Ut.LITERAL_NUMBER:return vp(l);case Ut.LITERAL_STRING:if(c(n)&&n._type===Ut.MEMBER&&("r"===l||"g"===l||"b"===l||"a"===l||"x"===l||"y"===l||"z"===l||"w"===l||P_(n._left)))return l;if(i=Z.fromCssColorString(l,hS),c(i))return function Ufe(e){return`vec3(${vp(e.red)}, ${vp(e.green)}, ${vp(e.blue)})`}(i);throw new Pe("Error generating style shader: String literals are not supported.");case Ut.LITERAL_COLOR:if(u=o,"color"===l){if(!c(u))return"vec4(1.0)";if(u.length>1){const m=u[0],_=u[1];return"1.0"!==_&&(t.translucent=!0),`vec4(${m}, ${_})`}return`vec4(${u[0]}, 1.0)`}if("rgb"===l)return i=MH(this),c(i)?yS(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, 1.0)`;if("rgba"===l)return"1.0"!==u[3]&&(t.translucent=!0),i=MH(this),c(i)?yS(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, ${u[3]})`;if("hsl"===l)return i=NH(this),c(i)?yS(i):`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), 1.0)`;if("hsla"===l)return i=NH(this),c(i)?(1!==i.alpha&&(t.translucent=!0),yS(i)):("1.0"!==u[3]&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), ${u[3]})`);break;case Ut.LITERAL_VECTOR:if(!c(o))throw new E("left should always be defined for type ExpressionNodeType.LITERAL_VECTOR");d=o.length,h=`${l}(`;for(let m=0;m<d;++m)h+=o[m],m<d-1&&(h+=", ");return h+=")",h;case Ut.LITERAL_REGEX:throw new Pe("Error generating style shader: Regular expressions are not supported.");case Ut.LITERAL_UNDEFINED:return Bu.NULL_SENTINEL;case Ut.BUILTIN_VARIABLE:if("tiles3d_tileset_time"===l)return l}},Mt.prototype.getVariables=function(e,t){let n,i,o;const r=this._type,s=this._value;if(c(this._left))if(Array.isArray(this._left))for(n=this._left,i=n.length,o=0;o<i;++o)n[o].getVariables(e,this);else this._left.getVariables(e,this);if(c(this._right)&&this._right.getVariables(e,this),c(this._test)&&this._test.getVariables(e,this),Array.isArray(this._value))for(n=this._value,i=n.length,o=0;o<i;++o)n[o].getVariables(e,this);let a;switch(r){case Ut.VARIABLE:P_(this)||e.push(s);break;case Ut.VARIABLE_IN_STRING:for(a=fS.exec(s);null!==a;)e.push(a[1]),a=fS.exec(s);break;case Ut.LITERAL_STRING:c(t)&&t._type===Ut.MEMBER&&P_(t._left)&&e.push(s)}};const d0=Bu;function Qf(e){e=g(e,g.EMPTY_OBJECT),this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=g(e.center,f.ZERO),this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=Z.clone(Z.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=g(e.classificationType,Xo.BOTH),this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};const t=this._batchIds.length;for(let n=0;n<t;++n)this._batchIdLookUp[this._batchIds[n]]=n}Object.defineProperties(Qf.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});const zfe={position:0,a_batchId:1};function kH(e){const t=e?Fi.EQUAL:Fi.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:Zt.KEEP,zFail:Zt.DECREMENT_WRAP,zPass:Zt.KEEP},backFunction:t,backOperation:{fail:Zt.KEEP,zFail:Zt.INCREMENT_WRAP,zPass:Zt.KEEP},reference:xn.CESIUM_3D_TILE_MASK,mask:xn.CESIUM_3D_TILE_MASK},stencilMask:xn.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:I_.LESS_OR_EQUAL},depthMask:!1}}const Gfe={stencilTest:{enabled:!0,frontFunction:Fi.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:Fi.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:xn.CLASSIFICATION_MASK},stencilMask:xn.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:eo.PRE_MULTIPLIED_ALPHA_BLEND},jfe={stencilTest:{enabled:!0,frontFunction:Fi.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:Fi.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:xn.CLASSIFICATION_MASK},stencilMask:xn.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1},O_=new k,UH=new f;function aR(e,t,n,i,o,r,s){const a=e.constructor.BYTES_PER_ELEMENT,l=r.length;for(let u=0;u<l;++u){const h=s[r[u]],_=o[h],p=new e.constructor(e.buffer,a*i[h],_);t.set(p,n),i[h]=n,n+=_}return n}function cR(e,t,n,i,o,r,s){const a=e.bytesPerIndex,l=r.length;for(let u=0;u<l;++u){const h=s[r[u]],_=o[h];t.copyFromBuffer(e,i[h]*a,n*a,_*a),i[h]=n,n+=_}return n}function Zfe(e,t){return t.color.toRgba()-e.color.toRgba()}Qf.prototype.createFeatures=function(e,t){const n=this._batchIds,i=n.length;for(let o=0;o<i;++o){const r=n[o];t[r]=new v_(e,r)}},Qf.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};const the=new Z,nhe=Z.WHITE,ohe=/\$/;function zH(e,t,n,i){const o=e.classificationType,r=o!==Xo.CESIUM_3D_TILE,s=o!==Xo.TERRAIN,a=t.commandList;let u,d,l=n.length;for(d=0;d<l;++d)r&&(u=n[d],u.pass=Ue.TERRAIN_CLASSIFICATION,a.push(u)),s&&(u=n[d].derivedCommands.tileset,u.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,a.push(u));if(t.invertClassification&&c(i))for(l=i.length,d=0;d<l;++d)a.push(i[d])}Qf.prototype.applyStyle=function(e,t){if(!c(e))return void function ehe(e,t){e._updatingAllCommands=!0;const n=e._batchIds;let o,i=n.length;for(o=0;o<i;++o){const a=t[n[o]];a.show=!0,a.color=Z.WHITE}const r=e._batchedIndices;for(i=r.length,o=0;o<i;++o)r[o].color=Z.clone(Z.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}(this,t);const n=e.color,i=n instanceof d0&&!ohe.test(n.expression);this._updatingAllCommands=i;const o=this._batchIds;let s,r=o.length;for(s=0;s<r;++s){const l=t[o[s]];l.color=c(e.color)?e.color.evaluateColor(l,the):nhe,l.show=!c(e.show)||e.show.evaluate(l)}if(i){const a=this._batchedIndices;for(r=a.length,s=0;s<r;++s)a[s].color=Z.clone(Z.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}},Qf.prototype.updateCommands=function(e,t){if(this._updatingAllCommands)return;const n=this._batchIdLookUp,i=n[e];if(!c(i))return;const o=this._indexOffsets,s=o[i],a=this._indexCounts[i],l=this._batchedIndices,u=l.length;let d;for(d=0;d<u;++d){const y=l[d].offset;if(s>=y&&s<y+l[d].count)break}l.push(new dS({color:Z.clone(t),offset:s,count:a,batchIds:[e]}));const h=[],m=[],_=l[d].batchIds,p=_.length;for(let y=0;y<p;++y){const b=_[y];b!==e&&(o[n[b]]<s?h.push(b):m.push(b))}0!==m.length&&l.push(new dS({color:Z.clone(l[d].color),offset:s+a,count:l[d].offset+l[d].count-(s+a),batchIds:m})),0!==h.length?(l[d].count=s-l[d].offset,l[d].batchIds=h):l.splice(d,1),this._batchDirty=!0},Qf.prototype.update=function(e){const t=e.context;(function Vfe(e,t){if(c(e._va))return;const n=yn.createVertexBuffer({context:t,typedArray:e._positions,usage:At.STATIC_DRAW}),i=yn.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:At.STATIC_DRAW}),o=yn.createIndexBuffer({context:t,typedArray:e._indices,usage:At.DYNAMIC_DRAW,indexDatatype:2===e._indices.BYTES_PER_ELEMENT?Ot.UNSIGNED_SHORT:Ot.UNSIGNED_INT}),r=[{index:0,vertexBuffer:n,componentDatatype:ee.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:i,componentDatatype:ee.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new gs({context:t,attributes:r,indexBuffer:o}),t.webgl2&&(e._vaSwap=new gs({context:t,attributes:r,indexBuffer:yn.createIndexBuffer({context:t,sizeInBytes:o.sizeInBytes,usage:At.DYNAMIC_DRAW,indexDatatype:o.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0})(this,t),function Hfe(e,t){if(c(e._sp))return;const n=e._batchTable,i=g(e._attributeLocations,zfe);let o=e._pickId;const r=e._vertexShaderSource;let s=e._fragmentShaderSource;if(c(r))return e._sp=di.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:i}),e._spStencil=e._sp,s=St.replaceMain(s,"czm_non_pick_main"),s=`${s}void main() \n{ \n czm_non_pick_main(); \n out_FragColor = ${o}; \n} \n`,void(e._spPick=di.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:i}));const a=n.getVertexShaderCallback(!1,"a_batchId",void 0)(OH);let l=n.getFragmentShaderCallback(!1,void 0,!0)(iR);o=n.getPickId();let u=new St({sources:[a]}),d=new St({defines:["VECTOR_TILE"],sources:[l]});e._sp=di.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:i}),u=new St({sources:[OH]}),d=new St({defines:["VECTOR_TILE"],sources:[iR]}),e._spStencil=di.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:i}),l=St.replaceMain(l,"czm_non_pick_main"),l=`${l}\nvoid main() \n{ \n czm_non_pick_main(); \n out_FragColor = ${o}; \n} \n`;const h=new St({sources:[a]}),m=new St({defines:["VECTOR_TILE"],sources:[l]});e._spPick=di.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:m,attributeLocations:i})}(this,t),function Wfe(e){c(e._rsStencilDepthPass)||(e._rsStencilDepthPass=Lt.fromCache(kH(!1)),e._rsStencilDepthPass3DTiles=Lt.fromCache(kH(!0)),e._rsColorPass=Lt.fromCache(Gfe),e._rsPickPass=Lt.fromCache(jfe))}(this),function qfe(e,t){if(c(e._uniformMap))return;const n={u_modifiedModelViewProjection:function(){const o=t.uniformState.projection;return k.clone(t.uniformState.view,O_),k.multiplyByPoint(O_,e._center,UH),k.setTranslation(O_,UH,O_),k.multiply(o,O_,O_),O_},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(n)}(this,t);const n=e.passes;n.render&&(function Kfe(e,t){const n=function $fe(e,t){if(!e._batchDirty)return!1;const n=e._batchedIndices,i=n.length;let o=!1;const r={};for(let s=0;s<i;++s){const l=n[s].color.toRgba();if(c(r[l])){o=!0;break}r[l]=!0}return o?o&&!e.forceRebatch&&e._framesSinceLastRebatch<120?void++e._framesSinceLastRebatch:(n.sort(Zfe),t.webgl2?function Xfe(e,t){const n=e._indexOffsets,i=e._indexCounts,o=e._batchIdLookUp;let r=t.pop();const s=[r],a=e._va.indexBuffer,l=e._vaSwap.indexBuffer;let u=cR(a,l,0,n,i,r.batchIds,o);for(r.offset=0,r.count=u;t.length>0;){const h=t.pop();if(Z.equals(h.color,r.color))u=cR(a,l,u,n,i,h.batchIds,o),r.batchIds=r.batchIds.concat(h.batchIds),r.count=u-r.offset;else{const m=u;u=cR(a,l,u,n,i,h.batchIds,o),h.offset=m,h.count=u-m,s.push(h),r=h}}const d=e._va;e._va=e._vaSwap,e._vaSwap=d,e._batchedIndices=s}(e,n):function Yfe(e,t){const n=e._indices,i=e._indexOffsets,o=e._indexCounts,r=e._batchIdLookUp,s=new n.constructor(n.length);let a=t.pop();const l=[a];let u=aR(n,s,0,i,o,a.batchIds,r);for(a.offset=0,a.count=u;t.length>0;){const d=t.pop();if(Z.equals(d.color,a.color))u=aR(n,s,u,i,o,d.batchIds,r),a.batchIds=a.batchIds.concat(d.batchIds),a.count=u-a.offset;else{const h=u;u=aR(n,s,u,i,o,d.batchIds,r),d.offset=h,d.count=u-h,l.push(d),a=d}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=l}(e,n),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0):(e._batchDirty=!1,!1)}(e,t),i=e._commands,o=e._batchedIndices,r=o.length,s=2*r;if(c(i)&&!n&&i.length===s)return;i.length=s;const a=e._va,l=e._sp,u=g(e._modelMatrix,k.IDENTITY),d=e._uniformMap,h=e._boundingVolume;for(let m=0;m<r;++m){const _=o[m].offset,p=o[m].count;let y=i[2*m];c(y)||(y=i[2*m]=new $t({owner:e})),y.vertexArray=a,y.modelMatrix=u,y.offset=_,y.count=p,y.renderState=e._rsStencilDepthPass,y.shaderProgram=l,y.uniformMap=d,y.boundingVolume=h,y.cull=!1,y.pass=Ue.TERRAIN_CLASSIFICATION;const b=$t.shallowClone(y,y.derivedCommands.tileset);b.renderState=e._rsStencilDepthPass3DTiles,b.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,y.derivedCommands.tileset=b;let x=i[2*m+1];c(x)||(x=i[2*m+1]=new $t({owner:e})),x.vertexArray=a,x.modelMatrix=u,x.offset=_,x.count=p,x.renderState=e._rsColorPass,x.shaderProgram=l,x.uniformMap=d,x.boundingVolume=h,x.cull=!1,x.pass=Ue.TERRAIN_CLASSIFICATION;const C=$t.shallowClone(x,x.derivedCommands.tileset);C.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,x.derivedCommands.tileset=C}e._commandsDirty=!0}(this,t),function Qfe(e,t){if(e.classificationType===Xo.TERRAIN||!t.invertClassification||c(e._commandsIgnoreShow)&&!e._commandsDirty)return;const n=e._commands,i=e._commandsIgnoreShow,o=e._spStencil,s=i.length=n.length/2;let a=0;for(let l=0;l<s;++l){const u=i[l]=$t.shallowClone(n[a],i[l]);u.shaderProgram=o,u.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,a+=2}e._commandsDirty=!1}(this,e),function she(e){let n,i,t=e.debugWireframe===e._debugWireframe;if(t=t&&!(e.debugWireframe&&e._wireframeDirty),t)return;c(e._rsWireframe)||(e._rsWireframe=Lt.fromCache({})),e.debugWireframe?(n=e._rsWireframe,i=Tt.LINES):(n=e._rsColorPass,i=Tt.TRIANGLES);const o=e._commands,r=o.length;for(let s=0;s<r;s+=2){const a=o[s+1];a.renderState=n,a.primitiveType=i}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}(this),this._debugWireframe?function rhe(e,t){const n=e.commandList,i=t.length;for(let o=0;o<i;o+=2){const r=t[o+1];r.pass=Ue.OPAQUE,n.push(r)}}(e,this._commands):zH(this,e,this._commands,this._commandsIgnoreShow)),n.pick&&(function Jfe(e){if(!e._pickCommandsDirty)return;const t=e._indexOffsets.length,n=e._pickCommands;n.length=2*t;const i=e._va,o=e._spStencil,r=e._spPick,s=g(e._modelMatrix,k.IDENTITY),a=e._uniformMap;for(let l=0;l<t;++l){const u=e._indexOffsets[l],d=e._indexCounts[l],h=c(e._boundingVolumes)?e._boundingVolumes[l]:e.boundingVolume;let m=n[2*l];c(m)||(m=n[2*l]=new $t({owner:e,pickOnly:!0})),m.vertexArray=i,m.modelMatrix=s,m.offset=u,m.count=d,m.renderState=e._rsStencilDepthPass,m.shaderProgram=o,m.uniformMap=a,m.boundingVolume=h,m.pass=Ue.TERRAIN_CLASSIFICATION;const _=$t.shallowClone(m,m.derivedCommands.tileset);_.renderState=e._rsStencilDepthPass3DTiles,_.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=_;let p=n[2*l+1];c(p)||(p=n[2*l+1]=new $t({owner:e,pickOnly:!0})),p.vertexArray=i,p.modelMatrix=s,p.offset=u,p.count=d,p.renderState=e._rsPickPass,p.shaderProgram=r,p.uniformMap=a,p.boundingVolume=h,p.pass=Ue.TERRAIN_CLASSIFICATION;const y=$t.shallowClone(p,p.derivedCommands.tileset);y.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=y}e._pickCommandsDirty=!1}(this),zH(this,e,this._pickCommands))},Qf.prototype.isDestroyed=function(){return!1},Qf.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),Xe(this)};const VH=Qf;function nl(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,c(this._center)||(this._center=c(this._boundingVolume)?f.clone(this._boundingVolume.center):f.clone(f.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Xo.BOTH}Object.defineProperties(nl.prototype,{trianglesLength:{get:function(){return c(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return c(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}}),nl.packedBoxLength=k.packedLength+f.packedLength,nl.packedCylinderLength=k.packedLength+2,nl.packedEllipsoidLength=k.packedLength+f.packedLength,nl.packedSphereLength=f.packedLength+1;const lhe=new ba("createVectorTileGeometries",5),uhe=new Z;nl.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},nl.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},nl.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},nl.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},nl.prototype.update=function(e){if(this._ready)this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e);else if(c(this._promise)||(this._promise=function dhe(e){if(!c(e._primitive)&&!c(e._verticesPromise)){let t=e._boxes,n=e._boxBatchIds,i=e._cylinders,o=e._cylinderBatchIds,r=e._ellipsoids,s=e._ellipsoidBatchIds,a=e._spheres,l=e._sphereBatchIds,u=e._batchTableColors,d=e._packedBuffer;if(!c(u)){let p=0;c(e._boxes)&&(t=e._boxes=t.slice(),n=e._boxBatchIds=n.slice(),p+=n.length),c(e._cylinders)&&(i=e._cylinders=i.slice(),o=e._cylinderBatchIds=o.slice(),p+=o.length),c(e._ellipsoids)&&(r=e._ellipsoids=r.slice(),s=e._ellipsoidBatchIds=s.slice(),p+=s.length),c(e._spheres)&&(a=e._sphere=a.slice(),l=e._sphereBatchIds=l.slice(),p+=l.length),u=e._batchTableColors=new Uint32Array(p);const y=e._batchTable;for(let b=0;b<p;++b){const x=y.getColor(b,uhe);u[b]=x.toRgba()}d=e._packedBuffer=function ahe(e){const t=new Float64Array(k.packedLength+f.packedLength);let n=0;return f.pack(e._center,t,n),n+=f.packedLength,k.pack(e._modelMatrix,t,n),t}(e)}const h=[];c(t)&&h.push(t.buffer,n.buffer),c(i)&&h.push(i.buffer,o.buffer),c(r)&&h.push(r.buffer,s.buffer),c(a)&&h.push(a.buffer,l.buffer),h.push(u.buffer,d.buffer);const m={boxes:c(t)?t.buffer:void 0,boxBatchIds:c(t)?n.buffer:void 0,cylinders:c(i)?i.buffer:void 0,cylinderBatchIds:c(i)?o.buffer:void 0,ellipsoids:c(r)?r.buffer:void 0,ellipsoidBatchIds:c(r)?s.buffer:void 0,spheres:c(a)?a.buffer:void 0,sphereBatchIds:c(a)?l.buffer:void 0,batchTableColors:u.buffer,packedBuffer:d.buffer},_=e._verticesPromise=lhe.scheduleTask(m,h);return c(_)?_.then(function(p){if(e.isDestroyed())return;const y=new Float64Array(p.packedBuffer);e._indices=2===function che(e,t){let n=0;const i=t[n++],o=t[n++],r=e._boundingVolumes=new Array(o);for(let l=0;l<o;++l)r[l]=Ae.unpack(t,n),n+=Ae.packedLength;const s=t[n++],a=e._batchedIndices=new Array(s);for(let l=0;l<s;++l){const u=Z.unpack(t,n);n+=Z.packedLength;const d=t[n++],h=t[n++],m=t[n++],_=new Array(m);for(let p=0;p<m;++p)_[p]=t[n++];a[l]=new dS({color:u,offset:d,count:h,batchIds:_})}return i}(e,y)?new Uint16Array(p.indices):new Uint32Array(p.indices),e._indexOffsets=new Uint32Array(p.indexOffsets),e._indexCounts=new Uint32Array(p.indexCounts),e._positions=new Float32Array(p.positions),e._vertexBatchIds=new Uint16Array(p.vertexBatchIds),e._batchIds=new Uint16Array(p.batchIds),function fhe(e){c(e._primitive)||(e._primitive=new VH({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:g(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)}(e),e._ready=!0}).catch(p=>{e.isDestroyed()||(e._error=p)}):void 0}}(this)),c(this._error)){const t=this._error;throw this._error=void 0,t}},nl.prototype.isDestroyed=function(){return!1},nl.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Xe(this)};const wA=nl;function qd(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,function mhe(e,t,n){n=g(n,0);const i=new Uint8Array(t),o=new DataView(t),r=o.getUint32(n+=R_,!0);if(1!==r)throw new Pe(`Only Geometry tile version 1 is supported. Version ${r} is not.`);const s=o.getUint32(n+=R_,!0);if(n+=R_,0===s)return void(e._ready=!0);const a=o.getUint32(n,!0);if(n+=R_,0===a)throw new Pe("Feature table must have a byte length greater than zero");const l=o.getUint32(n,!0),u=o.getUint32(n+=R_,!0),d=o.getUint32(n+=R_,!0),h=Cc(i,n+=R_,a);n+=a;const m=new Uint8Array(t,n,l);let _,p;n+=l,u>0&&(_=Cc(i,n,u),n+=u,d>0&&(p=new Uint8Array(t,n,d),p=new Uint8Array(p)));const y=g(h.BOXES_LENGTH,0),b=g(h.CYLINDERS_LENGTH,0),x=g(h.ELLIPSOIDS_LENGTH,0),C=g(h.SPHERES_LENGTH,0),w=y+b+x+C,v=new nR(e,w,_,p,function hhe(e){return function(t,n){c(e._geometries)&&e._geometries.updateCommands(t,n)}}(e));if(e._batchTable=v,0===w)return;const I=e.tile.computedTransform;let P;c(h.RTC_CENTER)&&(P=f.unpack(h.RTC_CENTER),k.multiplyByPoint(I,P,P));const N=function phe(e,t){let n,i,o,r,s;const a=g(e.BOXES_LENGTH,0),l=g(e.CYLINDERS_LENGTH,0),u=g(e.ELLIPSOIDS_LENGTH,0),d=g(e.SPHERES_LENGTH,0);a>0&&c(e.BOX_BATCH_IDS)&&(n=new Uint16Array(t.buffer,t.byteOffset+e.BOX_BATCH_IDS.byteOffset,a)),l>0&&c(e.CYLINDER_BATCH_IDS)&&(i=new Uint16Array(t.buffer,t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset,l)),u>0&&c(e.ELLIPSOID_BATCH_IDS)&&(o=new Uint16Array(t.buffer,t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset,u)),d>0&&c(e.SPHERE_BATCH_IDS)&&(r=new Uint16Array(t.buffer,t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset,d));const h=c(n)||c(i)||c(o)||c(r),m=a>0&&!c(n)||l>0&&!c(i)||u>0&&!c(o)||d>0&&!c(r);if(h&&m)throw new Pe("If one group of batch ids is defined, then all batch ids must be defined");if(!(c(n)||c(i)||c(o)||c(r))){let p=0;if(!c(n)&&a>0)for(n=new Uint16Array(a),s=0;s<a;++s)n[s]=p++;if(!c(i)&&l>0)for(i=new Uint16Array(l),s=0;s<l;++s)i[s]=p++;if(!c(o)&&u>0)for(o=new Uint16Array(u),s=0;s<u;++s)o[s]=p++;if(!c(r)&&d>0)for(r=new Uint16Array(d),s=0;s<d;++s)r[s]=p++}return{boxes:n,cylinders:i,ellipsoids:o,spheres:r}}(h,m);if(y>0||b>0||x>0||C>0){let R,B,F,S;return y>0&&(R=new Float32Array(m.buffer,m.byteOffset+h.BOXES.byteOffset,wA.packedBoxLength*y)),b>0&&(B=new Float32Array(m.buffer,m.byteOffset+h.CYLINDERS.byteOffset,wA.packedCylinderLength*b)),x>0&&(F=new Float32Array(m.buffer,m.byteOffset+h.ELLIPSOIDS.byteOffset,wA.packedEllipsoidLength*x)),C>0&&(S=new Float32Array(m.buffer,m.byteOffset+h.SPHERES.byteOffset,wA.packedSphereLength*C)),e._geometries=new wA({boxes:R,boxBatchIds:N.boxes,cylinders:B,cylinderBatchIds:N.cylinders,ellipsoids:F,ellipsoidBatchIds:N.ellipsoids,spheres:S,sphereBatchIds:N.spheres,center:P,modelMatrix:I,batchTable:v,boundingVolume:e.tile.boundingVolume.boundingVolume}),e}Promise.resolve(e)}(this,i,o)}Object.defineProperties(qd.prototype,{featuresLength:{get:function(){return c(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return c(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return c(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return c(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}}});const R_=Uint32Array.BYTES_PER_ELEMENT;function HH(e){const t=e.featuresLength;if(!c(e._features)&&t>0){const n=new Array(t);c(e._geometries)&&e._geometries.createFeatures(e,n),e._features=n}}qd.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},qd.prototype.getFeature=function(e){const t=this.featuresLength;if(!c(e)||e<0||e>=t)throw new E(`batchId is required and between zero and featuresLength - 1 (${t-1}).`);return HH(this),this._features[e]},qd.prototype.applyDebugSettings=function(e,t){c(this._geometries)&&this._geometries.applyDebugSettings(e,t)},qd.prototype.applyStyle=function(e){HH(this),c(this._geometries)&&this._geometries.applyStyle(e,this._features)},qd.prototype.update=function(e,t){c(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),c(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(e,t),this._ready=!0)},qd.prototype.pick=function(e,t,n){},qd.prototype.isDestroyed=function(){return!1},qd.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),Xe(this)};const _he=qd,lR={};function GH(e,t,n,i){if(0!==i)return;1===n&&(t.x=e-1-t.x,t.y=e-1-t.y);const o=t.x;t.x=t.y,t.y=o}lR.encode2D=function(e,t,n){const i=Math.pow(2,e);if(A.typeOf.number("level",e),A.typeOf.number("x",t),A.typeOf.number("y",n),e<1)throw new E("Hilbert level cannot be less than 1.");if(t<0||t>=i||n<0||n>=i)throw new E("Invalid coordinates for given level.");const o={x:t,y:n};let r,s,a,l=BigInt(0);for(a=i/2;a>0;a/=2)r=(o.x&a)>0?1:0,s=(o.y&a)>0?1:0,l+=BigInt((3*r^s)*a*a),GH(i,o,r,s);return l},lR.decode2D=function(e,t){if(A.typeOf.number("level",e),A.typeOf.bigint("index",t),e<1)throw new E("Hilbert level cannot be less than 1.");if(t<BigInt(0)||t>=BigInt(Math.pow(4,e)))throw new E("Hilbert index exceeds valid maximum for given level.");const n=Math.pow(2,e),i={x:0,y:0};let o,r,s,a;for(s=1,a=t;s<n;s*=2)o=1&Number(a/BigInt(2)),r=1&Number(a^BigInt(o)),GH(s,i,o,r),i.x+=s*o,i.y+=s*r,a/=BigInt(4);return[i.x,i.y]};const jH=lR,Dp=4,WH=[],qH=[],bhe=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],bS=[1,0,0,3];function Zo(e){if(!Hn.supportsBigInt())throw new Pe("S2 required BigInt support");if(!c(e))throw new E("cell ID is required.");if(!Zo.isValidId(e))throw new E("cell ID is invalid.");this._cellId=e,this._level=Zo.getLevel(e)}function YH(e){0===WH.length&&function She(){Op(0,0,0,0,0,0),Op(0,0,0,1,0,1),Op(0,0,0,2,0,2),Op(0,0,0,3,0,3)}();const t=Number(e>>BigInt(61));let n=1&t;const i=(1<<Dp)-1;let o=0,r=0;for(let s=7;s>=0;s--){const l=(1<<2*(7===s?30-7*Dp:Dp))-1;n+=Number(e>>BigInt(2*s*Dp+1)&BigInt(l))<<2,n=qH[n];const u=s*Dp;o+=n>>Dp+2<<u,r+=(n>>2&i)<<u,n&=3}return[t,o,r]}function XH(e,t,n){switch(e){case 0:return new f(1,t,n);case 1:return new f(-t,1,n);case 2:return new f(-t,-n,1);case 3:return new f(-1,-n,-t);case 4:return new f(n,-1,-t);default:return new f(n,t,-1)}}function TS(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function ZH(e){return 1/2147483648*e}function $H(e){return 1/1073741824*e}function Op(e,t,n,i,o,r){if(e===Dp){const s=(t<<Dp)+n;WH[(s<<2)+i]=(o<<2)+r,qH[(o<<2)+i]=(s<<2)+r}else{e++;const s=bhe[r];Op(e,(t<<=1)+(s[0]>>1),(n<<=1)+(1&s[0]),i,o<<=2,r^bS[0]),Op(e,t+(s[1]>>1),n+(1&s[1]),i,o+1,r^bS[1]),Op(e,t+(s[2]>>1),n+(1&s[2]),i,o+2,r^bS[2]),Op(e,t+(s[3]>>1),n+(1&s[3]),i,o+3,r^bS[3])}}function KH(e){return e&~e+BigInt(1)}Zo.fromToken=function(e){if(A.typeOf.string("token",e),!Zo.isValidToken(e))throw new E("token is invalid.");return new Zo(Zo.getIdFromToken(e))},Zo.isValidId=function(e){return A.typeOf.bigint("cellId",e),!(e<=0||e>>BigInt(61)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))},Zo.isValidToken=function(e){return A.typeOf.string("token",e),!!/^[0-9a-fA-F]{1,16}$/.test(e)&&Zo.isValidId(Zo.getIdFromToken(e))},Zo.getIdFromToken=function(e){return A.typeOf.string("token",e),BigInt("0x"+e+"0".repeat(16-e.length))},Zo.getTokenFromId=function(e){A.typeOf.bigint("cellId",e);const t=Math.floor(function Dhe(e){return Ihe[(-e&e)%BigInt(67)]}(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n},Zo.getLevel=function(e){if(A.typeOf.bigint("cellId",e),!Zo.isValidId(e))throw new E;let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e>>=BigInt(1);return 30-(t>>1)},Zo.prototype.getChild=function(e){if(A.typeOf.number("index",e),e<0||e>3)throw new E("child index must be in the range [0-3].");if(30===this._level)throw new E("cannot get child of leaf cell.");const t=KH(this._cellId)>>BigInt(2);return new Zo(this._cellId+BigInt(2*e+1-4)*t)},Zo.prototype.getParent=function(){if(0===this._level)throw new E("cannot get parent of root cell.");const e=KH(this._cellId)<<BigInt(2);return new Zo(this._cellId&~e+BigInt(1)|e)},Zo.prototype.getParentAtLevel=function(e){if(0===this._level||e<0||this._level<e)throw new E("cannot get parent at invalid level.");const t=function vhe(e){return BigInt(1)<<BigInt(2*(30-e))}(e);return new Zo(this._cellId&-t|t)},Zo.prototype.getCenter=function(e){e=g(e,he.WGS84);let t=function The(e,t){const n=function xhe(e,t){const n=YH(e),i=n[0],o=n[1],r=n[2],s=30===t,a=!s&&(BigInt(o)^e>>BigInt(2))&BigInt(1),l=s?1:a?2:0;return[i,(o<<1)+l,(r<<1)+l]}(e,t);return function Che(e,t,n){const i=ZH(t),o=ZH(n);return XH(e,TS(i),TS(o))}(n[0],n[1],n[2])}(this._cellId,this._level);t=f.normalize(t,t);const n=new Ce.fromCartesian(t,he.UNIT_SPHERE);return Ce.toCartesian(n,e,new f)},Zo.prototype.getVertex=function(e,t){if(A.typeOf.number("index",e),e<0||e>3)throw new E("vertex index must be in the range [0-3].");t=g(t,he.WGS84);let n=function Ahe(e,t,n){const i=YH(e),o=function Ehe(e,t){const n=[[],[]],i=function whe(e){return 1<<30-e>>>0}(t);for(let o=0;o<2;++o){const r=e[o]&-i,s=r+i;n[o][0]=TS($H(r)),n[o][1]=TS($H(s))}return n}([i[1],i[2]],t),r=n>>1&1;return XH(i[0],o[0][r^1&n],o[1][r])}(this._cellId,this._level,e);n=f.normalize(n,n);const i=new Ce.fromCartesian(n,he.UNIT_SPHERE);return Ce.toCartesian(i,t,new f)},Zo.fromFacePositionLevel=function(e,t,n){if(A.typeOf.bigint("position",t),e<0||e>5)throw new E("Invalid S2 Face (must be within 0-5)");if(n<0||n>30)throw new E("Invalid level (must be within 0-30)");if(t<0||t>=Math.pow(4,n))throw new E("Invalid Hilbert position for level");const i=(e<4?"0":"")+(e<2?"0":"")+e.toString(2),o=t.toString(2),r=Array(2*n-o.length+1).join("0"),s=Array(61-2*n).join("0");return new Zo(BigInt(`0b${i}${r}${o}1${s}`))};const Ihe=[64,0,1,39,2,15,40,23,3,12,16,59,41,19,24,54,4,64,13,10,17,62,60,28,42,30,20,51,25,44,55,47,5,32,65,38,14,22,11,58,18,53,63,9,61,27,29,50,43,46,31,37,21,57,52,8,26,49,45,36,56,7,48,35,6,34,33,0],AS=Zo,vr=function Phe(e,t){return c(e)&&c(e.extensions)&&c(e.extensions[t])};function dR(e){const t=e.lengthBits;let n=e.availableCount;A.typeOf.number("options.lengthBits",t);const i=e.constant,o=e.bitstream;if(c(i))n=t;else{const r=Math.ceil(t/8);if(o.length!==r)throw new Pe(`Availability bitstream must be exactly ${r} bytes long to store ${t} bits. Actual bitstream was ${o.length} bytes long.`);const s=g(e.computeAvailableCountEnabled,!1);!c(n)&&s&&(n=function Ohe(e,t){let n=0;for(let i=0;i<t;i++)n+=e[i>>3]>>i%8&1;return n}(o,t))}this._lengthBits=t,this._availableCount=n,this._constant=i,this._bitstream=o}Object.defineProperties(dR.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}}),dR.prototype.getBit=function(e){if(e<0||e>=this._lengthBits)throw new E("Bit index out of bounds.");return c(this._constant)?this._constant:1==(this._bitstream[e>>3]>>e%8&1)};const QH=dR;function Jf(e){const t=(e=g(e,g.EMPTY_OBJECT)).metadataTable,n=e.class,i=e.entityId,o=e.propertyTableJson;A.typeOf.object("options.metadataTable",t),A.typeOf.object("options.class",n),A.typeOf.number("options.entityId",i),A.typeOf.object("options.propertyTableJson",o),this._class=n,this._metadataTable=t,this._entityId=i,this._extensions=o.extensions,this._extras=o.extras}Object.defineProperties(Jf.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),Jf.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)},Jf.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)},Jf.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)},Jf.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)},Jf.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)},Jf.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)},Jf.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};const JH=Jf,xS={QUADTREE:"QUADTREE",OCTREE:"OCTREE",getBranchingFactor:function(e){switch(e){case xS.OCTREE:return 8;case xS.QUADTREE:return 4;default:throw new E("subdivisionScheme is not a valid value.")}}},es=Object.freeze(xS);function Fs(){}Object.defineProperties(Fs.prototype,{class:{get:function(){E.throwInstantiationError()}}}),Fs.prototype.hasProperty=function(e){E.throwInstantiationError()},Fs.prototype.hasPropertyBySemantic=function(e){E.throwInstantiationError()},Fs.prototype.getPropertyIds=function(e){E.throwInstantiationError()},Fs.prototype.getProperty=function(e){E.throwInstantiationError()},Fs.prototype.setProperty=function(e,t){E.throwInstantiationError()},Fs.prototype.getPropertyBySemantic=function(e){E.throwInstantiationError()},Fs.prototype.setPropertyBySemantic=function(e,t){E.throwInstantiationError()},Fs.hasProperty=function(e,t,n){if(A.typeOf.string("propertyId",e),A.typeOf.object("properties",t),A.typeOf.object("classDefinition",n),c(t[e]))return!0;const i=n.properties;if(!c(i))return!1;const o=i[e];return!(!c(o)||!c(o.default))},Fs.hasPropertyBySemantic=function(e,t,n){A.typeOf.string("semantic",e),A.typeOf.object("properties",t),A.typeOf.object("classDefinition",n);const i=n.propertiesBySemantic;return!!c(i)&&c(i[e])},Fs.getPropertyIds=function(e,t,n){A.typeOf.object("properties",e),A.typeOf.object("classDefinition",t),(n=c(n)?n:[]).length=0;for(const o in e)e.hasOwnProperty(o)&&c(e[o])&&n.push(o);const i=t.properties;if(c(i))for(const o in i)i.hasOwnProperty(o)&&!c(e[o])&&c(i[o].default)&&n.push(o);return n},Fs.getProperty=function(e,t,n){if(A.typeOf.string("propertyId",e),A.typeOf.object("properties",t),A.typeOf.object("classDefinition",n),!c(n.properties[e]))throw new E(`Class definition missing property ${e}`);const i=n.properties[e];let o=t[e];return Array.isArray(o)&&(o=o.slice()),o=i.handleNoData(o),!c(o)&&c(i.default)?(o=Rt(i.default,!0),i.unpackVectorAndMatrixTypes(o,!0)):c(o)?(o=i.normalize(o),o=i.applyValueTransform(o),i.unpackVectorAndMatrixTypes(o,!0)):void 0},Fs.setProperty=function(e,t,n,i){if(A.typeOf.string("propertyId",e),A.defined("value",t),A.typeOf.object("properties",n),A.typeOf.object("classDefinition",i),!c(n[e]))return!1;let o;Array.isArray(t)&&(t=t.slice());const r=i.properties;return c(r)&&(o=r[e]),c(o)&&(t=o.packVectorAndMatrixTypes(t,!0),t=o.unapplyValueTransform(t),t=o.unnormalize(t)),n[e]=t,!0},Fs.getPropertyBySemantic=function(e,t,n){A.typeOf.string("semantic",e),A.typeOf.object("properties",t),A.typeOf.object("classDefinition",n);const i=n.propertiesBySemantic;if(!c(i))return;const o=i[e];return c(o)?Fs.getProperty(o.id,t,n):void 0},Fs.setPropertyBySemantic=function(e,t,n,i){if(A.typeOf.string("semantic",e),A.defined("value",t),A.typeOf.object("properties",n),A.typeOf.object("classDefinition",i),!c(i.propertiesBySemantic))return!1;const r=i.propertiesBySemantic[e];return!!c(r)&&Fs.setProperty(r.id,t,n,i)};const fi=Fs;function eh(e){const t=(e=g(e,g.EMPTY_OBJECT)).subtreeMetadata,n=e.class;A.typeOf.object("options.subtreeMetadata",t),A.typeOf.object("options.class",n);const i=c(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(eh.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),eh.prototype.hasProperty=function(e){return fi.hasProperty(e,this._properties,this._class)},eh.prototype.hasPropertyBySemantic=function(e){return fi.hasPropertyBySemantic(e,this._properties,this._class)},eh.prototype.getPropertyIds=function(e){return fi.getPropertyIds(this._properties,this._class,e)},eh.prototype.getProperty=function(e){return fi.getProperty(e,this._properties,this._class)},eh.prototype.setProperty=function(e,t){return fi.setProperty(e,t,this._properties,this._class)},eh.prototype.getPropertyBySemantic=function(e){return fi.getPropertyBySemantic(e,this._properties,this._class)},eh.prototype.setPropertyBySemantic=function(e,t){return fi.setPropertyBySemantic(e,t,this._properties,this._class)};const Rhe=eh,Yt={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64",getMinimum:function(e){switch(A.typeOf.string("type",e),e){case Yt.INT8:return-128;case Yt.UINT8:return 0;case Yt.INT16:return-32768;case Yt.UINT16:return 0;case Yt.INT32:return-2147483648;case Yt.UINT32:return 0;case Yt.INT64:return Hn.supportsBigInt()?BigInt("-9223372036854775808"):-Math.pow(2,63);case Yt.UINT64:return Hn.supportsBigInt()?BigInt(0):0;case Yt.FLOAT32:return-34028234663852886e22;case Yt.FLOAT64:return-Number.MAX_VALUE}},getMaximum:function(e){switch(A.typeOf.string("type",e),e){case Yt.INT8:return 127;case Yt.UINT8:return 255;case Yt.INT16:return 32767;case Yt.UINT16:return 65535;case Yt.INT32:return 2147483647;case Yt.UINT32:return 4294967295;case Yt.INT64:return Hn.supportsBigInt()?BigInt("9223372036854775807"):Math.pow(2,63)-1;case Yt.UINT64:return Hn.supportsBigInt()?BigInt("18446744073709551615"):Math.pow(2,64)-1;case Yt.FLOAT32:return 34028234663852886e22;case Yt.FLOAT64:return Number.MAX_VALUE}},isIntegerType:function(e){switch(A.typeOf.string("type",e),e){case Yt.INT8:case Yt.UINT8:case Yt.INT16:case Yt.UINT16:case Yt.INT32:case Yt.UINT32:case Yt.INT64:case Yt.UINT64:return!0;default:return!1}},isUnsignedIntegerType:function(e){switch(A.typeOf.string("type",e),e){case Yt.UINT8:case Yt.UINT16:case Yt.UINT32:case Yt.UINT64:return!0;default:return!1}},isVectorCompatible:function(e){switch(A.typeOf.string("type",e),e){case Yt.INT8:case Yt.UINT8:case Yt.INT16:case Yt.UINT16:case Yt.INT32:case Yt.UINT32:case Yt.FLOAT32:case Yt.FLOAT64:return!0;default:return!1}},normalize:function(e,t){if("number"!=typeof e&&"bigint"!=typeof e)throw new E("value must be a number or a BigInt");if(!Yt.isIntegerType(t))throw new E("type must be an integer type");return Math.max(Number(e)/Number(Yt.getMaximum(t)),-1)},unnormalize:function(e,t){if(A.typeOf.number("value",e),!Yt.isIntegerType(t))throw new E("type must be an integer type");const n=Yt.getMaximum(t),i=Yt.isUnsignedIntegerType(t)?0:-n;return e=O.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===Yt.INT64||t===Yt.UINT64)&&Hn.supportsBigInt()&&(e=BigInt(e)),e>n?n:e<i?i:e},applyValueTransform:function(e,t,n){return n*e+t},unapplyValueTransform:function(e,t,n){return 0===n?0:(e-t)/n},getSizeInBytes:function(e){switch(A.typeOf.string("type",e),e){case Yt.INT8:case Yt.UINT8:return 1;case Yt.INT16:case Yt.UINT16:return 2;case Yt.INT32:case Yt.UINT32:return 4;case Yt.INT64:case Yt.UINT64:return 8;case Yt.FLOAT32:return 4;case Yt.FLOAT64:return 8}},fromComponentDatatype:function(e){switch(A.typeOf.number("componentDatatype",e),e){case ee.BYTE:return Yt.INT8;case ee.UNSIGNED_BYTE:return Yt.UINT8;case ee.SHORT:return Yt.INT16;case ee.UNSIGNED_SHORT:return Yt.UINT16;case ee.INT:return Yt.INT32;case ee.UNSIGNED_INT:return Yt.UINT32;case ee.FLOAT:return Yt.FLOAT32;case ee.DOUBLE:return Yt.FLOAT64}},toComponentDatatype:function(e){switch(A.typeOf.string("type",e),e){case Yt.INT8:return ee.BYTE;case Yt.UINT8:return ee.UNSIGNED_BYTE;case Yt.INT16:return ee.SHORT;case Yt.UINT16:return ee.UNSIGNED_SHORT;case Yt.INT32:return ee.INT;case Yt.UINT32:return ee.UNSIGNED_INT;case Yt.FLOAT32:return ee.FLOAT;case Yt.FLOAT64:return ee.DOUBLE}}},vn=Object.freeze(Yt),Io={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",BOOLEAN:"BOOLEAN",STRING:"STRING",ENUM:"ENUM",isVectorType:function(e){switch(A.typeOf.string("type",e),e){case Io.VEC2:case Io.VEC3:case Io.VEC4:return!0;default:return!1}},isMatrixType:function(e){switch(A.typeOf.string("type",e),e){case Io.MAT2:case Io.MAT3:case Io.MAT4:return!0;default:return!1}},getComponentCount:function(e){switch(A.typeOf.string("type",e),e){case Io.SCALAR:case Io.STRING:case Io.ENUM:case Io.BOOLEAN:return 1;case Io.VEC2:return 2;case Io.VEC3:return 3;case Io.VEC4:case Io.MAT2:return 4;case Io.MAT3:return 9;case Io.MAT4:return 16;default:throw new E(`Invalid metadata type ${e}`)}},getMathType:function(e){switch(e){case Io.VEC2:return V;case Io.VEC3:return f;case Io.VEC4:return de;case Io.MAT2:return Kr;case Io.MAT3:return oe;case Io.MAT4:return k;default:return}}},Tn=Object.freeze(Io);function Qs(e){const t=(e=g(e,g.EMPTY_OBJECT)).id,n=e.type;A.typeOf.string("options.id",t),A.typeOf.string("options.type",n);const i=e.componentType,o=e.enumType,r=c(i)&&vn.isIntegerType(i)&&g(e.normalized,!1);this._id=t,this._name=e.name,this._description=e.description,this._semantic=e.semantic,this._isLegacyExtension=e.isLegacyExtension,this._type=n,this._componentType=i,this._enumType=o,this._valueType=c(o)?o.valueType:i,this._isArray=g(e.isArray,!1),this._isVariableLengthArray=g(e.isVariableLengthArray,!1),this._arrayLength=e.arrayLength,this._min=Rt(e.min,!0),this._max=Rt(e.max,!0),this._normalized=r;let s=Rt(e.offset,!0),a=Rt(e.scale,!0);const l=c(s)||c(a);c(s)||(s=this.expandConstant(0,!0)),c(a)||(a=this.expandConstant(1,!0)),this._offset=s,this._scale=a,this._hasValueTransform=l,this._noData=Rt(e.noData,!0),this._default=Rt(e.default,!0),this._required=g(e.required,!0),this._extras=Rt(e.extras,!0),this._extensions=Rt(e.extensions,!0)}function e8(e,t){if(!Array.isArray(e))return e===t;if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!e8(e[n],t[n]))return!1;return!0}function t8(e,t){const n=e._type,i=e._componentType,o=e._enumType,r=e._normalized;return Tn.isVectorType(n)?function Fhe(e,t,n){return vn.isVectorCompatible(n)?t!==Tn.VEC2||e instanceof V?t!==Tn.VEC3||e instanceof f?t!==Tn.VEC4||e instanceof de?void 0:`vector value ${e} must be a Cartesian4`:`vector value ${e} must be a Cartesian3`:`vector value ${e} must be a Cartesian2`:`componentType ${n} is incompatible with vector type ${t}`}(t,n,i):Tn.isMatrixType(n)?function Bhe(e,t,n){return vn.isVectorCompatible(n)?t!==Tn.MAT2||e instanceof Kr?t!==Tn.MAT3||e instanceof oe?t!==Tn.MAT4||e instanceof k?void 0:`matrix value ${e} must be a Matrix4`:`matrix value ${e} must be a Matrix3`:`matrix value ${e} must be a Matrix2`:`componentType ${n} is incompatible with matrix type ${t}`}(t,n,i):n===Tn.STRING?function khe(e){if("string"!=typeof e)return CS(e,Tn.STRING)}(t):n===Tn.BOOLEAN?function Uhe(e){if("boolean"!=typeof e)return CS(e,Tn.BOOLEAN)}(t):n===Tn.ENUM?function zhe(e,t){const n=typeof e;if(c(t))return"string"===n&&c(t.valuesByName[e])?void 0:`value ${e} is not a valid enum name for ${t.id}`}(t,o):function Vhe(e,t,n){const i=typeof e;switch(t){case vn.INT8:case vn.UINT8:case vn.INT16:case vn.UINT16:case vn.INT32:case vn.UINT32:case vn.FLOAT32:case vn.FLOAT64:return"number"!==i?CS(e,t):isFinite(e)?i8(e,t,n):o8(e,t);case vn.INT64:case vn.UINT64:return"number"!==i&&"bigint"!==i?CS(e,t):"number"!==i||isFinite(e)?i8(e,t,n):o8(e,t)}}(t,i,r)}function CS(e,t){return`value ${e} does not match type ${t}`}function n8(e,t,n){let i=`value ${e} is out of range for type ${t}`;return n&&(i+=" (normalized)"),i}function i8(e,t,n){return n?e<(vn.isUnsignedIntegerType(t)?0:-1)||e>1?n8(e,t,n):void 0:e<vn.getMinimum(t)||e>vn.getMaximum(t)?n8(e,t,n):void 0}function o8(e,t){return`value ${e} of type ${t} must be finite`}function fR(e,t,n){if(!Array.isArray(e))return n(e,t);for(let i=0;i<e.length;i++)e[i]=fR(e[i],t,n);return e}Qs.fromJson=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).id,n=e.property;A.typeOf.string("options.id",t),A.typeOf.object("options.property",n),A.typeOf.string("options.property.type",n.type);const i=function Lhe(e){if("ARRAY"===e.type)return!0;const t=e.type;return t!==Tn.SCALAR&&!Tn.isMatrixType(t)&&!Tn.isVectorType(t)&&(!!c(vn[t])||!(c(e.noData)||c(e.scale)||c(e.offset)||c(e.required)||c(e.count)||c(e.array)||c(e.optional))&&void 0)}(n),o=function Nhe(e,t){const n=e.type,i=e.componentType,o="ARRAY"===n;let r,s,a,l;if(o?(r=!0,s=e.componentCount,a=!c(s)):e.array?(r=!0,s=e.count,a=!c(e.count)):(r=!1,s=void 0,a=!1),c(e.enumType)&&(l=t[e.enumType]),n===Tn.ENUM)return{type:n,componentType:void 0,enumType:l,valueType:l.valueType,isArray:r,isVariableLengthArray:a,arrayLength:s};if(o&&i===Tn.ENUM)return{type:i,componentType:void 0,enumType:l,valueType:l.valueType,isArray:r,isVariableLengthArray:a,arrayLength:s};if(n===Tn.SCALAR||Tn.isMatrixType(n)||Tn.isVectorType(n))return{type:n,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:a,arrayLength:s};if(n===Tn.BOOLEAN||n===Tn.STRING)return{type:n,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:a,arrayLength:s};if(o&&(i===Tn.BOOLEAN||i===Tn.STRING))return{type:i,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:a,arrayLength:s};if(c(i)&&c(vn[i]))return{type:Tn.SCALAR,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:a,arrayLength:s};if(c(vn[n]))return{type:Tn.SCALAR,componentType:n,enumType:void 0,valueType:n,isArray:r,isVariableLengthArray:a,arrayLength:s};throw new E(`unknown metadata type {type: ${n}, componentType: ${i})`)}(n,e.enums);let r;return r=!!c(i)&&(i?!c(n.optional)||!n.optional:g(n.required,!1)),new Qs({id:t,type:o.type,componentType:o.componentType,enumType:o.enumType,isArray:o.isArray,isVariableLengthArray:o.isVariableLengthArray,arrayLength:o.arrayLength,normalized:n.normalized,min:n.min,max:n.max,offset:n.offset,scale:n.scale,noData:n.noData,default:n.default,required:r,name:n.name,description:n.description,semantic:n.semantic,extras:n.extras,extensions:n.extensions,isLegacyExtension:i})},Object.defineProperties(Qs.prototype,{id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},type:{get:function(){return this._type}},enumType:{get:function(){return this._enumType}},componentType:{get:function(){return this._componentType}},valueType:{get:function(){return this._valueType}},isArray:{get:function(){return this._isArray}},isVariableLengthArray:{get:function(){return this._isVariableLengthArray}},arrayLength:{get:function(){return this._arrayLength}},normalized:{get:function(){return this._normalized}},max:{get:function(){return this._max}},min:{get:function(){return this._min}},noData:{get:function(){return this._noData}},default:{get:function(){return this._default}},required:{get:function(){return this._required}},semantic:{get:function(){return this._semantic}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),Qs.prototype.normalize=function(e){return this._normalized?fR(e,this._valueType,vn.normalize):e},Qs.prototype.unnormalize=function(e){return this._normalized?fR(e,this._valueType,vn.unnormalize):e},Qs.prototype.applyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:Qs.valueTransformInPlace(e,this._offset,this._scale,vn.applyValueTransform)},Qs.prototype.unapplyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:Qs.valueTransformInPlace(e,this._offset,this._scale,vn.unapplyValueTransform)},Qs.prototype.expandConstant=function(e,t){t=g(t,!1);const n=this._isArray,i=this._arrayLength,o=Tn.getComponentCount(this._type),r=n&&o>1;if(!n&&1===o)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);const s=new Array(o).fill(e);return new Array(this._arrayLength).fill(s)},Qs.prototype.handleNoData=function(e){const t=this._noData;return c(t)&&e8(e,t)?void 0:e},Qs.prototype.unpackVectorAndMatrixTypes=function(e,t){t=g(t,!1);const n=Tn.getMathType(this._type),i=this._isArray,o=Tn.getComponentCount(this._type),r=i&&o>1;return c(n)?t&&r?e.map(function(s){return n.unpack(s)}):i?n.unpackArray(e):n.unpack(e):e},Qs.prototype.packVectorAndMatrixTypes=function(e,t){t=g(t,!1);const n=Tn.getMathType(this._type),i=this._isArray,o=Tn.getComponentCount(this._type),r=i&&o>1;return c(n)?t&&r?e.map(function(s){return n.pack(s,[])}):i?n.packArray(e,[]):n.pack(e,[]):e},Qs.prototype.validate=function(e){if(c(e)||!c(this._default))return this._required&&!c(e)?"required property must have a value":this._isArray?function Mhe(e,t){if(!Array.isArray(t))return`value ${t} must be an array`;const n=t.length;if(!e._isVariableLengthArray&&n!==e._arrayLength)return"Array length does not match property.arrayLength";for(let i=0;i<n;i++){const o=t8(e,t[i]);if(c(o))return o}}(this,e):t8(this,e)},Qs.valueTransformInPlace=function(e,t,n,i){if(!Array.isArray(e))return i(e,t,n);for(let o=0;o<e.length;o++)e[o]=Qs.valueTransformInPlace(e[o],t[o],n[o],i);return e};const hR=Qs;function SA(e){const t=(e=g(e,g.EMPTY_OBJECT)).count,n=e.property,i=e.classProperty,o=e.bufferViews;A.typeOf.number.greaterThan("options.count",t,0),A.typeOf.object("options.property",n),A.typeOf.object("options.classProperty",i),A.typeOf.object("options.bufferViews",o);const r=i.type,s=i.isArray,a=i.isVariableLengthArray;let l=i.valueType;const u=i.enumType,d=r===Tn.STRING,h=r===Tn.BOOLEAN;let _,m=0;if(a){let S=g(n.arrayOffsetType,n.offsetType);S=g(vn[S],vn.UINT32),_=new pR(o[g(n.arrayOffsets,n.arrayOffsetBufferView)],S,t+1),m+=_.typedArray.byteLength}const p=Tn.getComponentCount(r);let y;y=a?_.get(t)-_.get(0):s?t*i.arrayLength:t;const b=p*y;let x,C;if(d){let S=g(n.stringOffsetType,n.offsetType);S=g(vn[S],vn.UINT32),x=new pR(o[g(n.stringOffsets,n.stringOffsetBufferView)],S,b+1),m+=x.typedArray.byteLength}(d||h)&&(l=vn.UINT8),C=d?x.get(b)-x.get(0):h?Math.ceil(b/8):b;const v=new pR(o[g(n.values,n.bufferView)],l,C);m+=v.typedArray.byteLength;let I=n.offset,P=n.scale;const N=i.hasValueTransform||c(I)||c(P);let R,B;I=g(I,i.offset),P=g(P,i.scale),I=r8(I),P=r8(P);const F=this;d?R=function(S){return function jhe(e,t,n){const i=n.get(e),o=n.get(e+1)-i;return Ky(t.typedArray,i,o)}(S,F._values,F._stringOffsets)}:h?(R=function(S){return function Whe(e,t){return 1==(t.typedArray[e>>3]>>e%8&1)}(S,F._values)},B=function(S,D){!function qhe(e,t,n){const i=e>>3,o=e%8;n?t.typedArray[i]|=1<<o:t.typedArray[i]&=~(1<<o)}(S,F._values,D)}):c(u)?(R=function(S){const D=F._values.get(S);return u.namesByValue[D]},B=function(S,D){F._values.set(S,u.valuesByName[D])}):(R=function(S){return F._values.get(S)},B=function(S,D){F._values.set(S,D)}),this._arrayOffsets=_,this._stringOffsets=x,this._values=v,this._classProperty=i,this._count=t,this._vectorComponentCount=p,this._min=n.min,this._max=n.max,this._offset=I,this._scale=P,this._hasValueTransform=N,this._getValue=R,this._setValue=B,this._unpackedValues=void 0,this._extras=n.extras,this._extensions=n.extensions,this._byteLength=m}function r8(e){if(!Array.isArray(e))return e;const t=[];for(let n=0;n<e.length;n++){const i=e[n];Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}function s8(e,t){const n=e._count;if(!c(t)||t<0||t>=n)throw new E("index is required and between zero and count - 1. Actual value: "+(n-1))}function a8(e,t,n){let i,o;if(t.isVariableLengthArray){i=e._arrayOffsets.get(n),o=e._arrayOffsets.get(n+1)-i;const s=Tn.getComponentCount(t.type);i*=s,o*=s}else{const a=g(t.arrayLength,1)*e._vectorComponentCount;i=n*a,o=a}const r=new Array(o);for(let s=0;s<o;s++)r[s]=e._getValue(i+s);return r}function c8(e){if(c(e._unpackedValues))return!1;const t=e._classProperty,i=t.valueType;return t.type===Tn.STRING||i===vn.INT64&&!Hn.supportsBigInt64Array()||i===vn.UINT64&&!Hn.supportsBigUint64Array()}function l8(e){e._unpackedValues=function Jhe(e){const t=e._count,n=new Array(t),i=e._classProperty,o=i.isArray,s=Tn.getComponentCount(i.type);if(!o&&1===s){for(let a=0;a<t;++a)n[a]=e._getValue(a);return n}for(let a=0;a<t;a++)n[a]=a8(e,i,a);return n}(e),e._arrayOffsets=void 0,e._stringOffsets=void 0,e._values=void 0}function pR(e,t,n){const i=this;let o,r,s;if(t===vn.INT64)Hn.supportsBigInt()?Hn.supportsBigInt64Array()?(o=new BigInt64Array(e.buffer,e.byteOffset,n),s=function(a,l){i.typedArray[a]=BigInt(l)}):(o=new Uint8Array(e.buffer,e.byteOffset,8*n),r=function(a){return function Xhe(e,t){const n=t.dataView,i=8*e;let o=BigInt(0);const r=(128&n.getUint8(i+7))>0;let s=!0;for(let a=0;a<8;++a){let l=n.getUint8(i+a);r&&(s?0!==l&&(l=255&~(l-1),s=!1):l=255&~l),o+=BigInt(l)*(BigInt(1)<<BigInt(8*a))}return r&&(o=-o),o}(a,i)}):(_n("INT64 type is not fully supported on this platform. Values greater than 2^53 - 1 or less than -(2^53 - 1) may lose precision when read."),o=new Uint8Array(e.buffer,e.byteOffset,8*n),r=function(a){return function Yhe(e,t){const n=t.dataView,i=8*e;let o=0;const r=(128&n.getUint8(i+7))>0;let s=!0;for(let a=0;a<8;++a){let l=n.getUint8(i+a);r&&(s?0!==l&&(l=255&~(l-1),s=!1):l=255&~l),o+=l*Math.pow(256,a)}return r&&(o=-o),o}(a,i)});else if(t===vn.UINT64)Hn.supportsBigInt()?Hn.supportsBigUint64Array()?(o=new BigUint64Array(e.buffer,e.byteOffset,n),s=function(a,l){i.typedArray[a]=BigInt(l)}):(o=new Uint8Array(e.buffer,e.byteOffset,8*n),r=function(a){return function $he(e,t){const n=t.dataView,i=8*e,o=BigInt(n.getUint32(i,!0)),r=BigInt(n.getUint32(i+4,!0));return o+BigInt(4294967296)*r}(a,i)}):(_n("UINT64 type is not fully supported on this platform. Values greater than 2^53 - 1 may lose precision when read."),o=new Uint8Array(e.buffer,e.byteOffset,8*n),r=function(a){return function Zhe(e,t){const n=t.dataView,i=8*e;return n.getUint32(i,!0)+4294967296*n.getUint32(i+4,!0)}(a,i)});else{const a=function Khe(e){switch(e){case vn.INT8:return ee.BYTE;case vn.UINT8:return ee.UNSIGNED_BYTE;case vn.INT16:return ee.SHORT;case vn.UINT16:return ee.UNSIGNED_SHORT;case vn.INT32:return ee.INT;case vn.UINT32:return ee.UNSIGNED_INT;case vn.FLOAT32:return ee.FLOAT;case vn.FLOAT64:return ee.DOUBLE}}(t);o=ee.createArrayBufferView(a,e.buffer,e.byteOffset,n),s=function(l,u){i.typedArray[l]=u}}c(r)||(r=function(a){return i.typedArray[a]}),this.typedArray=o,this.dataView=new DataView(o.buffer,o.byteOffset),this.get=r,this.set=s,this._componentType=t}Object.defineProperties(SA.prototype,{hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){return this._byteLength}}}),SA.prototype.get=function(e){s8(this,e);let t=function Hhe(e,t){c8(e)&&l8(e);const n=e._classProperty,i=n.isArray,r=Tn.getComponentCount(n.type);if(c(e._unpackedValues)){const s=e._unpackedValues[t];return i?Rt(s,!0):s}return i||1!==r?a8(e,n,t):e._getValue(t)}(this,e);return t=this._classProperty.handleNoData(t),c(t)?(t=this._classProperty.normalize(t),t=function epe(e,t){return!e._hasValueTransform||e._classProperty.isVariableLengthArray?t:hR.valueTransformInPlace(t,e._offset,e._scale,vn.applyValueTransform)}(this,t),this._classProperty.unpackVectorAndMatrixTypes(t)):(t=this._classProperty.default,this._classProperty.unpackVectorAndMatrixTypes(t))},SA.prototype.set=function(e,t){const n=this._classProperty;A.defined("value",t),s8(this,e);const i=n.validate(t);if(c(i))throw new E(i);t=function tpe(e,t){return!e._hasValueTransform||e._classProperty.isVariableLengthArray?t:hR.valueTransformInPlace(t,e._offset,e._scale,vn.unapplyValueTransform)}(this,t=n.packVectorAndMatrixTypes(t)),function Ghe(e,t,n){(function Qhe(e,t,n){if(c8(e))return!0;const i=e._arrayOffsets;return!(!c(i)||i.get(t+1)-i.get(t)===n.length)})(e,t,n)&&l8(e);const i=e._classProperty,o=i.isArray,s=Tn.getComponentCount(i.type);if(c(e._unpackedValues))return i.isArray&&(n=Rt(n,!0)),void(e._unpackedValues[t]=n);if(!o&&1===s)return void e._setValue(t,n);let a,l;if(i.isVariableLengthArray)a=e._arrayOffsets.get(t),l=e._arrayOffsets.get(t+1)-a;else{const d=g(i.arrayLength,1)*e._vectorComponentCount;a=t*d,l=d}for(let u=0;u<l;++u)e._setValue(a+u,n[u])}(this,e,t=n.unnormalize(t))},SA.prototype.getTypedArray=function(){if(c(this._values))return this._values.typedArray};const npe=SA;function ku(e){const t=(e=g(e,g.EMPTY_OBJECT)).count,n=e.class;A.typeOf.number.greaterThan("options.count",t,0),A.typeOf.object("options.class",n);let i=0;const o={};if(c(e.properties))for(const r in e.properties)if(e.properties.hasOwnProperty(r)){const s=new npe({count:t,property:e.properties[r],classProperty:n.properties[r],bufferViews:e.bufferViews});o[r]=s,i+=s.byteLength}this._count=t,this._class=n,this._properties=o,this._byteLength=i}Object.defineProperties(ku.prototype,{count:{get:function(){return this._count}},class:{get:function(){return this._class}},byteLength:{get:function(){return this._byteLength}}}),ku.prototype.hasProperty=function(e){return fi.hasProperty(e,this._properties,this._class)},ku.prototype.hasPropertyBySemantic=function(e){return fi.hasPropertyBySemantic(e,this._properties,this._class)},ku.prototype.getPropertyIds=function(e){return fi.getPropertyIds(this._properties,this._class,e)},ku.prototype.getProperty=function(e,t){A.typeOf.string("propertyId",t);const n=this._properties[t];let i;return i=c(n)?n.get(e):function ipe(e,t){const n=e.properties;if(!c(n))return;const i=n[t];if(c(i)&&c(i.default)){let o=i.default;return i.isArray&&(o=Rt(o,!0)),o=i.normalize(o),i.unpackVectorAndMatrixTypes(o)}}(this._class,t),i},ku.prototype.setProperty=function(e,t,n){A.typeOf.string("propertyId",t);const i=this._properties[t];return!!c(i)&&(i.set(e,n),!0)},ku.prototype.getPropertyBySemantic=function(e,t){let n;A.typeOf.string("semantic",t);const i=this._class.propertiesBySemantic;if(c(i)&&(n=i[t]),c(n))return this.getProperty(e,n.id)},ku.prototype.setPropertyBySemantic=function(e,t,n){let i;A.typeOf.string("semantic",t);const o=this._class.propertiesBySemantic;return c(o)&&(i=o[t]),!!c(i)&&this.setProperty(e,i.id,n)},ku.prototype.getPropertyTypedArray=function(e){A.typeOf.string("propertyId",e);const t=this._properties[e];if(c(t))return t.getTypedArray()},ku.prototype.getPropertyTypedArrayBySemantic=function(e){let t;A.typeOf.string("semantic",e);const n=this._class.propertiesBySemantic;if(c(n)&&(t=n[e]),c(t))return this.getPropertyTypedArray(t.id)};const vA=ku;function Rp(){}Object.defineProperties(Rp.prototype,{cacheKey:{get:function(){E.throwInstantiationError()}}}),Rp.prototype.load=function(){E.throwInstantiationError()},Rp.prototype.unload=function(){},Rp.prototype.process=function(e){return!1},Rp.prototype.getError=function(e,t){A.typeOf.string("errorMessage",e),c(t)&&c(t.message)&&(e+=`\n${t.message}`);const n=new Pe(e);return c(t)&&(n.stack=`Original stack:\n${t.stack}\nHandler stack:\n${n.stack}`),n},Rp.prototype.isDestroyed=function(){return!1},Rp.prototype.destroy=function(){return this.unload(),Xe(this)};const Ja=Rp,rn=Object.freeze({UNLOADED:0,LOADING:1,LOADED:2,PROCESSING:3,READY:4,FAILED:5});function th(e){const t=(e=g(e,g.EMPTY_OBJECT)).typedArray,n=e.resource,i=e.cacheKey;if(c(t)===c(n))throw new E("One of options.typedArray and options.resource must be defined.");this._typedArray=t,this._resource=n,this._cacheKey=i,this._state=rn.UNLOADED,this._promise=void 0}function mR(){return(mR=(0,we.Z)(function*(e){const t=e._resource;e._state=rn.LOADING;try{const n=yield th._fetchArrayBuffer(t);return e.isDestroyed()?void 0:(e._typedArray=new Uint8Array(n),e._state=rn.READY,e)}catch(n){if(e.isDestroyed())return;throw e._state=rn.FAILED,e.getError(`Failed to load external buffer: ${t.url}`,n)}})).apply(this,arguments)}c(Object.create)&&((th.prototype=Object.create(Ja.prototype)).constructor=th),Object.defineProperties(th.prototype,{cacheKey:{get:function(){return this._cacheKey}},typedArray:{get:function(){return this._typedArray}}}),th.prototype.load=(0,we.Z)(function*(){return c(this._promise)?this._promise:c(this._typedArray)?(this._promise=Promise.resolve(this),this._promise):(this._promise=function ope(e){return mR.apply(this,arguments)}(this),this._promise)}),th._fetchArrayBuffer=function(e){return e.fetchArrayBuffer()},th.prototype.unload=function(){this._typedArray=void 0};const _R=th;!function(){var n,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("object"!=typeof WebAssembly)return{supported:!1};WebAssembly.instantiate(function o(_){for(var p=new Uint8Array(_.length),y=0;y<_.length;++y){var b=_.charCodeAt(y);p[y]=b>96?b-97:b>64?b-39:b+4}var x=0;for(y=0;y<_.length;++y)p[x++]=p[y]<60?t[p[y]]:64*(p[y]-60)+p[++y];return p.buffer.slice(0,x)}("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"),{}).then(function(_){(n=_.instance).exports.__wasm_call_ctors(),n.exports.meshopt_encodeVertexVersion(0),n.exports.meshopt_encodeIndexVersion(1)})}();var rpe=function(){var 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("object"!=typeof WebAssembly)return{supported:!1};var r,o=WebAssembly.validate(n)?a("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"):a("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"),s=WebAssembly.instantiate(o,{}).then(function(x){(r=x.instance).exports.__wasm_call_ctors()});function a(x){for(var C=new Uint8Array(x.length),w=0;w<x.length;++w){var v=x.charCodeAt(w);C[w]=v>96?v-97:v>64?v-39:v+4}var I=0;for(w=0;w<x.length;++w)C[I++]=C[w]<60?i[C[w]]:64*(C[w]-60)+C[++w];return C.buffer.slice(0,I)}function l(x,C,w,v,I,P,N){var R=x.exports.sbrk,B=v+3&-4,F=R(B*I),S=R(P.length),D=new Uint8Array(x.exports.memory.buffer);D.set(P,S);var L=C(F,v,I,S,P.length);if(0==L&&N&&N(F,B,I),w.set(D.subarray(F,F+v*I)),R(F-R(0)),0!=L)throw new Error("Malformed buffer data: "+L)}var u={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},d={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},h=[],m=0;function _(x){var C={object:new Worker(x),pending:0,requests:{}};return C.object.onmessage=function(w){var v=w.data;C.pending-=v.count,C.requests[v.id][v.action](v.value),delete C.requests[v.id]},C}function b(x){var C=x.data;if(!C.id)return self.close();self.ready.then(function(w){try{var v=new Uint8Array(C.count*C.size);l(w,w.exports[C.mode],v,C.count,C.size,C.source,w.exports[C.filter]),self.postMessage({id:C.id,count:C.count,action:"resolve",value:v},[v.buffer])}catch(I){self.postMessage({id:C.id,count:C.count,action:"reject",value:I})}})}return{ready:s,supported:!0,useWorkers:function(x){!function p(x){for(var C="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(o)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+b.name+";"+l.toString()+b.toString(),w=new Blob([C],{type:"text/javascript"}),v=URL.createObjectURL(w),I=h.length;I<x;++I)h[I]=_(v);for(I=x;I<h.length;++I)h[I].object.postMessage({});h.length=x,URL.revokeObjectURL(v)}(x)},decodeVertexBuffer:function(x,C,w,v,I){l(r,r.exports.meshopt_decodeVertexBuffer,x,C,w,v,r.exports[u[I]])},decodeIndexBuffer:function(x,C,w,v){l(r,r.exports.meshopt_decodeIndexBuffer,x,C,w,v)},decodeIndexSequence:function(x,C,w,v){l(r,r.exports.meshopt_decodeIndexSequence,x,C,w,v)},decodeGltfBuffer:function(x,C,w,v,I,P){l(r,r.exports[d[I]],x,C,w,v,r.exports[u[P]])},decodeGltfBufferAsync:function(x,C,w,v,I){return h.length>0?function y(x,C,w,v,I){for(var P=h[0],N=1;N<h.length;++N)h[N].pending<P.pending&&(P=h[N]);return new Promise(function(R,B){var F=new Uint8Array(w),S=++m;P.pending+=x,P.requests[S]={resolve:R,reject:B},P.object.postMessage({id:S,count:x,size:C,source:F,mode:v,filter:I},[F.buffer])})}(x,C,w,d[v],u[I]):s.then(function(){var P=new Uint8Array(x*C);return l(r,r.exports[d[v]],P,x,C,w,r.exports[u[I]]),P})}}}();function L_(e){const t=(e=g(e,g.EMPTY_OBJECT)).resourceCache,n=e.gltf,i=e.bufferViewId,o=e.gltfResource,r=e.baseResource,s=e.cacheKey;A.typeOf.func("options.resourceCache",t),A.typeOf.object("options.gltf",n),A.typeOf.number("options.bufferViewId",i),A.typeOf.object("options.gltfResource",o),A.typeOf.object("options.baseResource",r);const a=n.bufferViews[i];let m,_,p,y,l=a.buffer,u=a.byteOffset,d=a.byteLength,h=!1;if(vr(a,"EXT_meshopt_compression")){const x=a.extensions.EXT_meshopt_compression;l=x.buffer,u=g(x.byteOffset,0),d=x.byteLength,h=!0,m=x.byteStride,_=x.count,p=x.mode,y=g(x.filter,"NONE")}const b=n.buffers[l];this._hasMeshopt=h,this._meshoptByteStride=m,this._meshoptCount=_,this._meshoptMode=p,this._meshoptFilter=y,this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._buffer=b,this._bufferId=l,this._byteOffset=u,this._byteLength=d,this._cacheKey=s,this._bufferLoader=void 0,this._typedArray=void 0,this._state=rn.UNLOADED,this._promise=void 0}function gR(){return(gR=(0,we.Z)(function*(e){try{const t=function ape(e){const t=e._resourceCache,n=e._buffer;if(c(n.uri)){const o=e._baseResource.getDerivedResource({url:n.uri});return t.getExternalBufferLoader({resource:o})}return t.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:e._bufferId})}(e);if(e._bufferLoader=t,yield t.load(),e.isDestroyed())return;const n=t.typedArray,i=new Uint8Array(n.buffer,n.byteOffset+e._byteOffset,e._byteLength);if(e.unload(),e._typedArray=i,e._hasMeshopt){const o=e._meshoptCount,r=e._meshoptByteStride,s=new Uint8Array(o*r);rpe.decodeGltfBuffer(s,o,r,e._typedArray,e._meshoptMode,e._meshoptFilter),e._typedArray=s}return e._state=rn.READY,e}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=rn.FAILED,e.getError("Failed to load buffer view",t)}})).apply(this,arguments)}!function(){var 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("object"!=typeof WebAssembly)return{supported:!1};WebAssembly.instantiate(function o(p){for(var y=new Uint8Array(p.length),b=0;b<p.length;++b){var x=p.charCodeAt(b);y[b]=x>96?x-97:x>64?x-39:x+4}var C=0;for(b=0;b<p.length;++b)y[C++]=y[b]<60?t[y[b]]:64*(y[b]-60)+y[++b];return y.buffer.slice(0,C)}("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:ljjjbh8NdnalTmba3cwfhyindnaEa8KgXcefg8Kcdtfydbg8AaEaXcdtgefydbgCSmba8AaC9Rh8Ja3aCcitfh5a8Naefhga8MaefhKcbhLindndna5aLcitfydbgQaX9hmbaKaXBdbagaXBdbxekdnaEaQcdtgafgeclfydbgCaeydbgeSmba3aecitg8AfydbaXSmeaCae9Rhhaecu7aCfhYaya8AfhCcbheinaYaeSmeaecefheaCydbh8AaCcwfhCa8AaX9hmbkaeah6meka8NaafgeaXaQaeydbcuSEBdbaKaQaXaKydbcuSEBdbkaLcefgLa8J9hmbkka8Kal9hmbkaOhCaHhLa8FhXa8Nh8Aa8MhQcbheindndnaeaCydbgY9hmbdnaqTmbaehYdnaHTmbaLydbhYkaqaYfRbbTmbaAaefcl86bbxdkdnaeaXydbgY9hmbaQydbhYdna8AydbgKcu9hmbaYcu9hmbaAaefcb86bbxikaAaefh8JdnaeaKSmbaeaYSmba8Jce86bbxika8Jcl86bbxdkdnaea8FaYcdtgKfydb9hmbdna8Aydbg8JcuSmbaea8JSmbaQydbg5cuSmbaea5Smba8NaKfydbgacuSmbaaaYSmba8MaKfydbgKcuSmbaKaYSmbdnaOa8JcdtfydbaOaKcdtfydb9hmbaOa5cdtfydbaOaacdtfydb9hmbaAaefcd86bbxlkaAaefcl86bbxikaAaefcl86bbxdkaAaefcl86bbxekaAaefaAaYfRbb86bbkaCclfhCaLclfhLaXclfhXa8Aclfh8AaQclfhQalaecefge9hmbkamceGTmbaAhealhCindnaeRbbce9hmbaecl86bbkaecefheaCcufgCmbkkascxfa8Lcdtfcualcx2alc;v:Q;v:Qe0Ecbyd;S1jjbHjjjjbbggBdbasazcwVg8JBd2agaialavaHz:djjjbh8PdndnaDmbcbhvxekascxfa8JcdtfcualaD2gecdtaecFFFFi0Ecbyd;S1jjbHjjjjbbgvBdbasazcDVg8JBd2alTmbarcd4hYdnaHTmbaDcdthKcbhLavhQinaoaHaLcdtfydbaY2cdtfheawhCaQhXaDh8AinaXaeIdbaCIdbNUdbaeclfheaCclfhCaXclfhXa8Acufg8AmbkaQaKfhQaLcefgLal9hmbxdkkaYcdthYaDcdthKcbhQavhLinaoheawhCaLhXaDh8AinaXaeIdbaCIdbNUdbaeclfheaCclfhCaXclfhXa8Acufg8AmbkaoaYfhoaLaKfhLaQcefgQal9hmbkkascxfa8Jcdtfcualc8S2gealc;D;O;f8U0EgXcbyd;S1jjbHjjjjbbgCBdbasa8Jcefg8ABd2aCcbaez:ljjjbh8KdndndnaDTmbascxfa8AcdtfaXcbyd;S1jjbHjjjjbbgqBdbasa8JcdfgCBd2aqcbaez:ljjjb8AascxfaCcdtfcualaD2gecltgCaecFFFFb0Ecbyd;S1jjbHjjjjbbgwBdbasa8JcifBd2awcbaCz:ljjjb8AadmexdkcbhqcbhwadTmekcbhLabhCindnagaCclfydbgQcx2fgeIdbagaCydbgYcx2fgXIdbgI:tg8RagaCcwfydbgKcx2fg8AIdlaXIdlg8S:tgRNa8AIdbaI:tg8UaeIdla8S:tg8VN:tg8Wa8WNa8Va8AIdwaXIdwg8X:tg8YNaRaeIdwa8X:tg8VN:tgRaRNa8Va8UNa8Ya8RN:tg8Ra8RNMM:rg8UJbbbb9ETmba8Wa8U:vh8Wa8Ra8U:vh8RaRa8U:vhRka8KaOaYcdtfydbc8S2fgeaRa8U:rg8UaRNNg8VaeIdbMUdbaea8Ra8Ua8RNg8ZNg8YaeIdlMUdlaea8Wa8Ua8WNg80Ng81aeIdwMUdwaea8ZaRNg8ZaeIdxMUdxaea80aRNgBaeIdzMUdzaea80a8RNg80aeIdCMUdCaeaRa8Ua8Wa8XNaRaINa8Sa8RNMM:mg8SNgINgRaeIdKMUdKaea8RaINg8RaeId3MUd3aea8WaINg8WaeIdaMUdaaeaIa8SNgIaeId8KMUd8Kaea8UaeIdyMUdya8KaOaQcdtfydbc8S2fgea8VaeIdbMUdbaea8YaeIdlMUdlaea81aeIdwMUdwaea8ZaeIdxMUdxaeaBaeIdzMUdzaea80aeIdCMUdCaeaRaeIdKMUdKaea8RaeId3MUd3aea8WaeIdaMUdaaeaIaeId8KMUd8Kaea8UaeIdyMUdya8KaOaKcdtfydbc8S2fgea8VaeIdbMUdbaea8YaeIdlMUdlaea81aeIdwMUdwaea8ZaeIdxMUdxaeaBaeIdzMUdzaea80aeIdCMUdCaeaRaeIdKMUdKaea8RaeId3MUd3aea8WaeIdaMUdaaeaIaeId8KMUd8Kaea8UaeIdyMUdyaCcxfhCaLcifgLad6mbkcbh8JabhYinaba8JcdtfhQcbhCinaAaQaCcj1jjbfydbcdtfydbgXfRbbhedndnaAaYaCfydbg8AfRbbgLc99fcFeGcpe0mbaeceSmbaecd9hmekdnaLcufcFeGce0mba8Ma8AcdtfydbaX9hmekdnaecufcFeGce0mba8NaXcdtfydba8A9hmekdnaLcv2aefc:q1jjbfRbbTmbaOaXcdtfydbaOa8Acdtfydb0mekdnagaXcx2fgKIdwaga8Acx2fgiIdwg8S:tgRaRNaKIdbaiIdbg8X:tg8Ra8RNaKIdlaiIdlg8V:tg8Ua8UNMM:rgIJbbbb9ETmbaRaI:vhRa8UaI:vh8Ua8RaI:vh8RkJbbacJbbacJbbjZaeceSEaLceSEh80dnagaQaCc:e1jjbfydbcdtfydbcx2fgeIdwa8S:tg8WaRa8WaRNaeIdba8X:tg81a8RNa8UaeIdla8V:tg8ZNMMg8YN:tg8Wa8WNa81a8Ra8YN:tgRaRNa8Za8Ua8YN:tg8Ra8RNMM:rg8UJbbbb9ETmba8Wa8U:vh8Wa8Ra8U:vh8RaRa8U:vhRka8KaOa8Acdtfydbc8S2fgeaRa80aINg8UaRNNg8YaeIdbMUdbaea8Ra8Ua8RNg80Ng81aeIdlMUdlaea8Wa8Ua8WNgINg8ZaeIdwMUdwaea80aRNg80aeIdxMUdxaeaIaRNgBaeIdzMUdzaeaIa8RNg83aeIdCMUdCaeaRa8Ua8Wa8SNaRa8XNa8Va8RNMM:mg8SNgINgRaeIdKMUdKaea8RaINg8RaeId3MUd3aea8WaINg8WaeIdaMUdaaeaIa8SNgIaeId8KMUd8Kaea8UaeIdyMUdya8KaOaXcdtfydbc8S2fgea8YaeIdbMUdbaea81aeIdlMUdlaea8ZaeIdwMUdwaea80aeIdxMUdxaeaBaeIdzMUdzaea83aeIdCMUdCaeaRaeIdKMUdKaea8RaeId3MUd3aea8WaeIdaMUdaaeaIaeId8KMUd8Kaea8UaeIdyMUdykaCclfgCcx9hmbkaYcxfhYa8Jcifg8Jad6mbkaDTmbcbhYinJbbbbh8XagabaYcdtfgeclfydbgKcx2fgCIdwagaeydbgicx2fgXIdwg8Z:tg8Ra8RNaCIdbaXIdbgB:tg8Wa8WNaCIdlaXIdlg83:tg8Ua8UNMMg80agaecwfydbg8Jcx2fgeIdwa8Z:tgINa8Ra8RaINa8WaeIdbaB:tg8SNa8UaeIdla83:tg8VNMMgRN:tJbbbbJbbjZa80aIaINa8Sa8SNa8Va8VNMMg81NaRaRN:tg8Y:va8YJbbbb9BEg8YNhUa81a8RNaIaRN:ta8YNh85a80a8VNa8UaRN:ta8YNh86a81a8UNa8VaRN:ta8YNh87a80a8SNa8WaRN:ta8YNh88a81a8WNa8SaRN:ta8YNh89a8Wa8VNa8Sa8UN:tgRaRNa8UaINa8Va8RN:tgRaRNa8Ra8SNaIa8WN:tgRaRNMM:r:rhRavaiaD2cdtfhCava8JaD2cdtfhXavaKaD2cdtfh8Aa8Z:mh8:a83:mhZaB:mhncbhLaDhQJbbbbh8VJbbbbh8YJbbbbh80Jbbbbh81Jbbbbh8ZJbbbbhBJbbbbh83JbbbbhcJbbbbh9cinasc;WbfaLfgecwfaRa85a8AIdbaCIdbgI:tg8UNaUaXIdbaI:tg8SNMg8RNUdbaeclfaRa87a8UNa86a8SNMg8WNUdbaeaRa89a8UNa88a8SNMg8UNUdbaecxfaRa8:a8RNaZa8WNaIana8UNMMMgINUdbaRa8Ra8WNNa81Mh81aRa8Ra8UNNa8ZMh8ZaRa8Wa8UNNaBMhBaRaIaINNa8XMh8XaRa8RaINNa8VMh8VaRa8WaINNa8YMh8YaRa8UaINNa80Mh80aRa8Ra8RNNa83Mh83aRa8Wa8WNNacMhcaRa8Ua8UNNa9cMh9caCclfhCa8Aclfh8AaXclfhXaLczfhLaQcufgQmbkaqaOaicdtfydbgCc8S2fgea9caeIdbMUdbaeacaeIdlMUdlaea83aeIdwMUdwaeaBaeIdxMUdxaea8ZaeIdzMUdzaea81aeIdCMUdCaea80aeIdKMUdKaea8YaeId3MUd3aea8VaeIdaMUdaaea8XaeId8KMUd8KaeaRaeIdyMUdyaqaOaKcdtfydbgKc8S2fgea9caeIdbMUdbaeacaeIdlMUdlaea83aeIdwMUdwaeaBaeIdxMUdxaea8ZaeIdzMUdzaea81aeIdCMUdCaea80aeIdKMUdKaea8YaeId3MUd3aea8VaeIdaMUdaaea8XaeId8KMUd8KaeaRaeIdyMUdyaqaOa8Jcdtfydbgic8S2fgea9caeIdbMUdbaeacaeIdlMUdlaea83aeIdwMUdwaeaBaeIdxMUdxaea8ZaeIdzMUdzaea81aeIdCMUdCaea80aeIdKMUdKaea8YaeId3MUd3aea8VaeIdaMUdaaea8XaeId8KMUd8KaeaRaeIdyMUdyawaCaD2cltfhQcbhCaDh8AinaQaCfgeasc;WbfaCfgXIdbaeIdbMUdbaeclfgLaXclfIdbaLIdbMUdbaecwfgLaXcwfIdbaLIdbMUdbaecxfgeaXcxfIdbaeIdbMUdbaCczfhCa8Acufg8AmbkawaKaD2cltfhQcbhCaDh8AinaQaCfgeasc;WbfaCfgXIdbaeIdbMUdbaeclfgLaXclfIdbaLIdbMUdbaecwfgLaXcwfIdbaLIdbMUdbaecxfgeaXcxfIdbaeIdbMUdbaCczfhCa8Acufg8AmbkawaiaD2cltfhQcbhCaDh8AinaQaCfgeasc;WbfaCfgXIdbaeIdbMUdbaeclfgLaXclfIdbaLIdbMUdbaecwfgLaXcwfIdbaLIdbMUdbaecxfgeaXcxfIdbaeIdbMUdbaCczfhCa8Acufg8AmbkaYcifgYad6mbkkasydlhJcbhednalTmbaJclfheaJydbh8AaAhCalhLcbhXincbaeydbgQa8A9RaCRbbcpeGEaXfhXaCcefhCaeclfheaQh8AaLcufgLmbkaXce4hekcuadae9Rcifg8Lcx2a8Lc;v:Q;v:Qe0Ecbyd;S1jjbHjjjjbbhhascxfasyd2gecdtfahBdbasaecefgCBd2ascxfaCcdtfcua8Lcdta8LcFFFFi0Ecbyd;S1jjbHjjjjbbgzBdbasaecdfgCBd2ascxfaCcdtfa8Ecbyd;S1jjbHjjjjbbg3BdbasaecifgCBd2ascxfaCcdtfalcbyd;S1jjbHjjjjbbg9eBdbasaeclfBd2a8PJbbjZamclGEhcJbbbbh83dnadak9nmbdna8Lci6mbaxaxNacacN:vhBaDclthTahcwfhSJbbbbh83inasclfabadgoalaOz:cjjjbabhicbhEcbhyinabaycdtfh8JcbheindnaOaiaefydbgXcdtgKfydbg8AaOa8Jaec:S1jjbfydbcdtfydbgCcdtfydbgLSmbaAaCfRbbgYcv2aAaXfRbbgQfc;a1jjbfRbbgaaQcv2aYfg5c;a1jjbfRbbgdVcFeGTmbdnaLa8A9nmba5c:q1jjbfRbbcFeGmekdnaQaY9hmbaQcufcFeGce0mba8MaKfydbaC9hmekahaEcx2fg8AaCaXadcFeGgLEBdla8AaXaCaLEBdba8AaLaaGcb9hBdwaEcefhEkaeclfgecx9hmbkdnaycifgyao9pmbaicxfhiaEcifa8L9nmekkdnaEmbaohdxikcbhYinJbbbbJbbjZa8KaOahaYcx2fg8AydlgLa8AydbgQa8AydwgCEgicdtfydbgac8S2gdfgeIdygR:vaRJbbbb9BEaeIdwagaQaLaCEgKcx2fgCIdwg8UNaeIdzaCIdbgINaeIdaMgRaRMMa8UNaeIdlaCIdlg8SNaeIdCa8UNaeId3MgRaRMMa8SNaeIdbaINaeIdxa8SNaeIdKMgRaRMMaINaeId8KMMM:lNh80JbbbbJbbjZa8KaOaQcdtfydbgyc8S2gXfgeIdygR:vaRJbbbb9BEaeIdwagaLcx2fgCIdwg8WNaeIdzaCIdbg8XNaeIdaMgRaRMMa8WNaeIdlaCIdlg8VNaeIdCa8WNaeId3MgRaRMMa8VNaeIdba8XNaeIdxa8VNaeIdKMgRaRMMa8XNaeId8KMMM:lNh81a8Acwfh8Ja8Aclfh5dnaDTmbaqaXfgXIdwa8WNaXIdza8XNaXIdaMgRaRMMa8WNaXIdla8VNaXIdCa8WNaXId3MgRaRMMa8VNaXIdba8XNaXIdxa8VNaXIdKMgRaRMMa8XNaXId8KMMMh8RavaLaD2cdtfhCawayaD2cltfheaXIdyh8YaDhXinaCIdbgRJbbb;aNaecxfIdba8WaecwfIdbNa8XaeIdbNa8VaeclfIdbNMMMNaRaRNa8YNa8RMMh8RaCclfhCaeczfheaXcufgXmbkaqadfgXIdwa8UNaXIdzaINaXIdaMgRaRMMa8UNaXIdla8SNaXIdCa8UNaXId3MgRaRMMa8SNaXIdbaINaXIdxa8SNaXIdKMgRaRMMaINaXId8KMMMh8WavaKaD2cdtfhCawaaaD2cltfheaXIdyh8XaDhXinaCIdbgRJbbb;aNaecxfIdba8UaecwfIdbNaIaeIdbNa8SaeclfIdbNMMMNaRaRNa8XNa8WMMh8WaCclfhCaeczfheaXcufgXmbka80a8W:lMh80a81a8R:lMh81ka5aLaKa81a809FgeEBdba8AaQaiaeEBdba8Ja81a80aeEUdbaYcefgYaE9hmbkasc;Wbfcbcj;abz:ljjjb8AaSheaEhCinasc;WbfaeydbcO4c;8ZGfgXaXydbcefBdbaecxfheaCcufgCmbkcbhecbhCinasc;WbfaefgXydbh8AaXaCBdba8AaCfhCaeclfgecj;ab9hmbkcbheaShCinasc;WbfaCydbcO4c;8ZGfgXaXydbgXcefBdbazaXcdtfaeBdbaCcxfhCaEaecefge9hmbkaoak9RgXci9Uh9hdnalTmbcbhea3hCinaCaeBdbaCclfhCalaecefge9hmbkkcbh9ia9ecbalz:ljjjbh6aXcO9Uh9ka9hce4h0asydwh9mcbhdcbh5dninahaza5cdtfydbcx2fg8JIdwg8RaB9Emeada9h9pmeJFFuuhRdna0aE9pmbahaza0cdtfydbcx2fIdwJbb;aZNhRkdna8RaR9ETmbada9k0mdkdna6aOa8Jydlg9ncdtg9ofydbg8Afg9pRbba6aOa8Jydbgicdtg9qfydbg9rfg9sRbbVmbdnaJa9rcdtfgeclfydbgCaeydbgeSmbaCae9RhQa9maecitfheaga8Acx2fgKcwfhyaKclfh8Eaga9rcx2fgacwfhmaaclfhrcbhCcehYdnindna3aeydbcdtfydbgXa8ASmba3aeclfydbcdtfydbgLa8ASmbaXaLSmbagaLcx2fgLIdbagaXcx2fgXIdbg8W:tgRarIdbaXIdlg8U:tg8XNaaIdba8W:tg8VaLIdla8U:tg8RN:tgIaRa8EIdba8U:tg8YNaKIdba8W:tg80a8RN:tg8UNa8RamIdbaXIdwg8S:tg81Na8XaLIdwa8S:tg8WN:tg8Xa8RayIdba8S:tg8ZNa8Ya8WN:tg8RNa8Wa8VNa81aRN:tg8Sa8Wa80Na8ZaRN:tgRNMMaIaINa8Xa8XNa8Sa8SNMMa8Ua8UNa8Ra8RNaRaRNMMN:rJbbj8:N9FmdkaecwfheaCcefgCaQ6hYaQaC9hmbkkaYceGTmba0cefh0xeka8Ka8Ac8S2gXfgea8Ka9rc8S2gLfgCIdbaeIdbMUdbaeaCIdlaeIdlMUdlaeaCIdwaeIdwMUdwaeaCIdxaeIdxMUdxaeaCIdzaeIdzMUdzaeaCIdCaeIdCMUdCaeaCIdKaeIdKMUdKaeaCId3aeId3MUd3aeaCIdaaeIdaMUdaaeaCId8KaeId8KMUd8KaeaCIdyaeIdyMUdydnaDTmbaqaXfgeaqaLfgCIdbaeIdbMUdbaeaCIdlaeIdlMUdlaeaCIdwaeIdwMUdwaeaCIdxaeIdxMUdxaeaCIdzaeIdzMUdzaeaCIdCaeIdCMUdCaeaCIdKaeIdKMUdKaeaCId3aeId3MUd3aeaCIdaaeIdaMUdaaeaCId8KaeId8KMUd8KaeaCIdyaeIdyMUdyaTa9r2hYaTa8A2hKawhCaDhLinaCaKfgeaCaYfgXIdbaeIdbMUdbaeclfgQaXclfIdbaQIdbMUdbaecwfgQaXcwfIdbaQIdbMUdbaecxfgeaXcxfIdbaeIdbMUdbaCczfhCaLcufgLmbkka8JcwfhCdndndndnaAaifgXRbbc9: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"),{}).then(function(p){p.instance.exports.__wasm_call_ctors()})}(),c(Object.create)&&((L_.prototype=Object.create(Ja.prototype)).constructor=L_),Object.defineProperties(L_.prototype,{cacheKey:{get:function(){return this._cacheKey}},typedArray:{get:function(){return this._typedArray}}}),L_.prototype.load=(0,we.Z)(function*(){return c(this._promise)||(this._state=rn.LOADING,this._promise=function spe(e){return gR.apply(this,arguments)}(this)),this._promise}),L_.prototype.unload=function(){c(this._bufferLoader)&&!this._bufferLoader.isDestroyed()&&this._resourceCache.unload(this._bufferLoader),this._bufferLoader=void 0,this._typedArray=void 0};const u8=L_;function yr(){}yr._maxDecodingConcurrency=Math.max(Hn.hardwareConcurrency-1,1),yr._decoderTaskProcessor=void 0,yr._taskProcessorReady=!1,yr._error=void 0,yr._getDecoderTaskProcessor=function(){if(!c(yr._decoderTaskProcessor)){const e=new ba("decodeDraco",yr._maxDecodingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}).then(function(t){t?yr._taskProcessorReady=!0:yr._error=new Pe("Draco decoder could not be initialized.")}).catch(t=>{yr._error=t}),yr._decoderTaskProcessor=e}return yr._decoderTaskProcessor},yr.decodePointCloud=function(e){const t=yr._getDecoderTaskProcessor();if(c(yr._error))throw yr._error;if(yr._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])},yr.decodeBufferView=function(e){const t=yr._getDecoderTaskProcessor();if(c(yr._error))throw yr._error;if(yr._taskProcessorReady)return t.scheduleTask(e,[e.array.buffer])};const yR=yr;function Lp(e){const t=(e=g(e,g.EMPTY_OBJECT)).resourceCache,n=e.gltf,i=e.draco,o=e.gltfResource,r=e.baseResource,s=e.cacheKey;A.typeOf.func("options.resourceCache",t),A.typeOf.object("options.gltf",n),A.typeOf.object("options.draco",i),A.typeOf.object("options.gltfResource",o),A.typeOf.object("options.baseResource",r),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=rn.UNLOADED,this._promise=void 0,this._dracoError=void 0}function bR(){return(bR=(0,we.Z)(function*(e){const t=e._resourceCache;try{const n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._draco.bufferView,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,yield n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=rn.PROCESSING,e)}catch(n){if(e.isDestroyed())return;d8(e,n)}})).apply(this,arguments)}function d8(e,t){throw e.unload(),e._state=rn.FAILED,e.getError("Failed to load Draco",t)}function TR(){return(TR=(0,we.Z)(function*(e,t){try{const n=yield t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=rn.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}})).apply(this,arguments)}c(Object.create)&&((Lp.prototype=Object.create(Ja.prototype)).constructor=Lp),Object.defineProperties(Lp.prototype,{cacheKey:{get:function(){return this._cacheKey}},decodedData:{get:function(){return this._decodedData}}}),Lp.prototype.load=(0,we.Z)(function*(){return c(this._promise)||(this._state=rn.LOADING,this._promise=function cpe(e){return bR.apply(this,arguments)}(this)),this._promise}),Lp.prototype.process=function(e){if(A.typeOf.object("frameState",e),this._state===rn.READY)return!0;if(this._state!==rn.PROCESSING||(c(this._dracoError)&&d8(this,this._dracoError),!c(this._bufferViewTypedArray))||c(this._decodePromise))return!1;const t=this._draco,r=this._gltf.bufferViews[t.bufferView],s=t.attributes,a={array:new Uint8Array(this._bufferViewTypedArray),bufferView:r,compressedAttributes:s,dequantizeInShader:!0},l=yR.decodeBufferView(a);if(!c(l))return!1;this._decodePromise=function lpe(e,t){return TR.apply(this,arguments)}(this,l)},Lp.prototype.unload=function(){c(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0};const f8=Lp;function nh(e){const t=(e=g(e,g.EMPTY_OBJECT)).resourceCache,n=e.gltf,i=e.imageId,o=e.gltfResource,r=e.baseResource,s=e.cacheKey;A.typeOf.func("options.resourceCache",t),A.typeOf.object("options.gltf",n),A.typeOf.number("options.imageId",i),A.typeOf.object("options.gltfResource",o),A.typeOf.object("options.baseResource",r);const a=n.images[i],l=a.bufferView,u=a.uri;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._bufferViewId=l,this._uri=u,this._cacheKey=s,this._bufferViewLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._state=rn.UNLOADED,this._promise=void 0}function h8(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}}function AR(){return AR=(0,we.Z)(function*(e){e._state=rn.LOADING;const t=e._resourceCache;try{const n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=n,yield n.load(),e.isDestroyed())return;const i=n.typedArray,o=yield function mpe(e){return CR.apply(this,arguments)}(i);if(e.isDestroyed())return;const r=h8(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=rn.READY,e}catch(n){return e.isDestroyed()?void 0:p8(e,n,"Failed to load embedded image")}}),AR.apply(this,arguments)}function xR(){return(xR=(0,we.Z)(function*(e){e._state=rn.LOADING;const n=e._uri,i=e._baseResource.getDerivedResource({url:n});try{const o=yield function gpe(e){const t=e.getUrlComponent(!1,!0);return _pe.test(t)?o0(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}(i);if(e.isDestroyed())return;const r=h8(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=rn.READY,e}catch(o){return e.isDestroyed()?void 0:p8(e,o,`Failed to load image: ${n}`)}})).apply(this,arguments)}function p8(e,t,n){return e.unload(),e._state=rn.FAILED,Promise.reject(e.getError(n,t))}function CR(){return(CR=(0,we.Z)(function*(e){const t=function ppe(e){const t=e.subarray(0,2),n=e.subarray(0,4),i=e.subarray(8,12);if(255===t[0]&&216===t[1])return"image/jpeg";if(137===t[0]&&80===t[1])return"image/png";if(171===t[0]&&75===t[1])return"image/ktx2";if(82===n[0]&&73===n[1]&&70===n[2]&&70===n[3]&&87===i[0]&&69===i[1]&&66===i[2]&&80===i[3])return"image/webp";throw new Pe("Image format is not recognized")}(e);if("image/ktx2"===t){const n=new Uint8Array(e);return o0(n)}return nh._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})})).apply(this,arguments)}c(Object.create)&&((nh.prototype=Object.create(Ja.prototype)).constructor=nh),Object.defineProperties(nh.prototype,{cacheKey:{get:function(){return this._cacheKey}},image:{get:function(){return this._image}},mipLevels:{get:function(){return this._mipLevels}}}),nh.prototype.load=function(){return c(this._promise)?this._promise:c(this._bufferViewId)?(this._promise=function fpe(e){return AR.apply(this,arguments)}(this),this._promise):(this._promise=function hpe(e){return xR.apply(this,arguments)}(this),this._promise)};const _pe=/(^data:image\/ktx2)|(\.ktx2$)/i;nh.prototype.unload=function(){c(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},nh._loadImageFromTypedArray=function upe(e){const t=e.uint8Array,n=e.format,i=e.request,o=g(e.flipY,!1),r=g(e.skipColorSpaceConversion,!1);A.typeOf.object("uint8Array",t),A.typeOf.string("format",n);const s=new Blob([t],{type:n});let a;return zt.supportsImageBitmapOptions().then(function(l){return l?Promise.resolve(zt.createImageBitmapFromBlob(s,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:r})):(a=window.URL.createObjectURL(s),new zt({url:a,request:i}).fetchImage({flipY:o,skipColorSpaceConversion:r}))}).then(function(l){return c(a)&&window.URL.revokeObjectURL(a),l}).catch(function(l){return c(a)&&window.URL.revokeObjectURL(a),Promise.reject(l)})};const m8=nh,Uu=Object.freeze({TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3});function Np(e){const t=(e=g(e,g.EMPTY_OBJECT)).resourceCache,n=e.gltf,i=e.accessorId,o=e.gltfResource,r=e.baseResource,s=e.draco,a=e.cacheKey,l=g(e.asynchronous,!0),u=g(e.loadBuffer,!1),d=g(e.loadTypedArray,!1);if(A.typeOf.func("options.resourceCache",t),A.typeOf.object("options.gltf",n),A.typeOf.number("options.accessorId",i),A.typeOf.object("options.gltfResource",o),A.typeOf.object("options.baseResource",r),!u&&!d)throw new E("At least one of loadBuffer and loadTypedArray must be true.");const h=n.accessors[i].componentType;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._accessorId=i,this._indexDatatype=h,this._draco=s,this._cacheKey=a,this._asynchronous=l,this._loadBuffer=u,this._loadTypedArray=d,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=rn.UNLOADED,this._promise=void 0}c(Object.create)&&((Np.prototype=Object.create(Ja.prototype)).constructor=Np),Object.defineProperties(Np.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}}});const ype=new vR;function ER(){return(ER=(0,we.Z)(function*(e){e._state=rn.LOADING;const t=e._resourceCache;try{const n=t.getDracoLoader({gltf:e._gltf,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,yield n.load(),e.isDestroyed()?void 0:(e._state=rn.LOADED,e)}catch(n){if(e.isDestroyed())return;SR(e,n)}})).apply(this,arguments)}function wR(){return(wR=(0,we.Z)(function*(e){const t=e._gltf,o=t.accessors[e._accessorId].bufferView;e._state=rn.LOADING;const r=e._resourceCache;try{const s=r.getBufferViewLoader({gltf:t,bufferViewId:o,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=s,yield s.load(),e.isDestroyed())return;return e._typedArray=function Ape(e,t){const o=e._gltf.accessors[e._accessorId],r=o.count,s=o.componentType,a=Ot.getSizeInBytes(s);let d,l=t.buffer,u=t.byteOffset+o.byteOffset;if(u%a!=0){const m=new Uint8Array(l,u,r*a);l=new Uint8Array(m).buffer,u=0,Ud("index-buffer-unaligned",`The index array is not aligned to a ${a}-byte boundary.`)}return s===Ot.UNSIGNED_BYTE?d=new Uint8Array(l,u,r):s===Ot.UNSIGNED_SHORT?d=new Uint16Array(l,u,r):s===Ot.UNSIGNED_INT&&(d=new Uint32Array(l,u,r)),d}(e,s.typedArray),e._state=rn.PROCESSING,e}catch(s){if(e.isDestroyed())return;SR(e,s)}})).apply(this,arguments)}function SR(e,t){throw e.unload(),e._state=rn.FAILED,e.getError("Failed to load index buffer",t)}function vR(){this.typedArray=void 0,this.indexDatatype=void 0,this.context=void 0,this.buffer=void 0}function _8(e,t,n){const i=yn.createIndexBuffer({typedArray:e,context:n,usage:At.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}Np.prototype.load=(0,we.Z)(function*(){return c(this._promise)?this._promise:c(this._draco)?(this._promise=function bpe(e){return ER.apply(this,arguments)}(this),this._promise):(this._promise=function Tpe(e){return wR.apply(this,arguments)}(this),this._promise)}),vR.prototype.set=function(e,t,n){this.typedArray=e,this.indexDatatype=t,this.context=n},vR.prototype.execute=function(){this.buffer=_8(this.typedArray,this.indexDatatype,this.context)},Np.prototype.process=function(e){if(A.typeOf.object("frameState",e),this._state===rn.READY)return!0;if(this._state!==rn.LOADED&&this._state!==rn.PROCESSING)return!1;let i,t=this._typedArray,n=this._indexDatatype;if(c(this._dracoLoader))try{this._dracoLoader.process(e)&&(t=this._dracoLoader.decodedData.indices.typedArray,this._typedArray=t,n=ee.fromTypedArray(t),this._indexDatatype=n)}catch(o){SR(this,o)}if(!c(t))return!1;if(this._loadBuffer&&this._asynchronous){const o=ype;if(o.set(t,n,e.context),!e.jobScheduler.execute(o,Uu.BUFFER))return!1;i=o.buffer}else this._loadBuffer&&(i=_8(t,n,e.context));return this.unload(),this._buffer=i,this._typedArray=this._loadTypedArray?t:void 0,this._state=rn.READY,this._resourceCache.statistics.addGeometryLoader(this),!0},Np.prototype.unload=function(){c(this._buffer)&&this._buffer.destroy();const e=this._resourceCache;c(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&e.unload(this._bufferViewLoader),c(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};const g8=Np,zu=function xpe(e,t,n){if(n=g(n,!1)){const i=e.indexOf(t);if(i>-1)return i}return e.push(t),e.length-1},bs=function Cpe(e,t){return c(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0};function sn(){}sn.objectLegacy=function(e,t){if(c(e))for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=t(e[n],n);if(c(o))return o}},sn.object=function(e,t){if(c(e)){const n=e.length;for(let i=0;i<n;i++){const r=t(e[i],i);if(c(r))return r}}},sn.topLevel=function(e,t,n){const i=e[t];return c(i)&&!Array.isArray(i)?sn.objectLegacy(i,n):sn.object(i,n)},sn.accessor=function(e,t){return sn.topLevel(e,"accessors",t)},sn.accessorWithSemantic=function(e,t,n){const i={};return sn.mesh(e,function(o){return sn.meshPrimitive(o,function(r){const s=sn.meshPrimitiveAttribute(r,function(a,l){if(0===l.indexOf(t)&&!c(i[a])){i[a]=!0;const u=n(a);if(c(u))return u}});return c(s)?s:sn.meshPrimitiveTarget(r,function(a){return sn.meshPrimitiveTargetAttribute(a,function(l,u){if(0===u.indexOf(t)&&!c(i[l])){i[l]=!0;const d=n(l);if(c(d))return d}})})})})},sn.accessorContainingVertexAttributeData=function(e,t){const n={};return sn.mesh(e,function(i){return sn.meshPrimitive(i,function(o){const r=sn.meshPrimitiveAttribute(o,function(s){if(!c(n[s])){n[s]=!0;const a=t(s);if(c(a))return a}});return c(r)?r:sn.meshPrimitiveTarget(o,function(s){return sn.meshPrimitiveTargetAttribute(s,function(a){if(!c(n[a])){n[a]=!0;const l=t(a);if(c(l))return l}})})})})},sn.accessorContainingIndexData=function(e,t){const n={};return sn.mesh(e,function(i){return sn.meshPrimitive(i,function(o){const r=o.indices;if(c(r)&&!c(n[r])){n[r]=!0;const s=t(r);if(c(s))return s}})})},sn.animation=function(e,t){return sn.topLevel(e,"animations",t)},sn.animationChannel=function(e,t){return sn.object(e.channels,t)},sn.animationSampler=function(e,t){return sn.object(e.samplers,t)},sn.buffer=function(e,t){return sn.topLevel(e,"buffers",t)},sn.bufferView=function(e,t){return sn.topLevel(e,"bufferViews",t)},sn.camera=function(e,t){return sn.topLevel(e,"cameras",t)},sn.image=function(e,t){return sn.topLevel(e,"images",t)},sn.material=function(e,t){return sn.topLevel(e,"materials",t)},sn.materialValue=function(e,t){let n=e.values;c(e.extensions)&&c(e.extensions.KHR_techniques_webgl)&&(n=e.extensions.KHR_techniques_webgl.values);for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)){const o=t(n[i],i);if(c(o))return o}},sn.mesh=function(e,t){return sn.topLevel(e,"meshes",t)},sn.meshPrimitive=function(e,t){const n=e.primitives;if(c(n)){const i=n.length;for(let o=0;o<i;o++){const s=t(n[o],o);if(c(s))return s}}},sn.meshPrimitiveAttribute=function(e,t){const n=e.attributes;for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)){const o=t(n[i],i);if(c(o))return o}},sn.meshPrimitiveTarget=function(e,t){const n=e.targets;if(c(n)){const i=n.length;for(let o=0;o<i;++o){const r=t(n[o],o);if(c(r))return r}}},sn.meshPrimitiveTargetAttribute=function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=t(e[n],n);if(c(o))return o}},sn.node=function(e,t){return sn.topLevel(e,"nodes",t)},sn.nodeInTree=function(e,t,n){const i=e.nodes;if(c(i)){const o=t.length;for(let r=0;r<o;r++){const s=t[r],a=i[s];if(c(a)){let l=n(a,s);if(c(l))return l;const u=a.children;if(c(u)&&(l=sn.nodeInTree(e,u,n),c(l)))return l}}}},sn.nodeInScene=function(e,t,n){const i=t.nodes;if(c(i))return sn.nodeInTree(e,i,n)},sn.program=function(e,t){return bs(e,"KHR_techniques_webgl")?sn.object(e.extensions.KHR_techniques_webgl.programs,t):sn.topLevel(e,"programs",t)},sn.sampler=function(e,t){return sn.topLevel(e,"samplers",t)},sn.scene=function(e,t){return sn.topLevel(e,"scenes",t)},sn.shader=function(e,t){return bs(e,"KHR_techniques_webgl")?sn.object(e.extensions.KHR_techniques_webgl.shaders,t):sn.topLevel(e,"shaders",t)},sn.skin=function(e,t){return sn.topLevel(e,"skins",t)},sn.skinJoint=function(e,t){const n=e.joints;if(c(n)){const i=n.length;for(let o=0;o<i;o++){const s=t(n[o]);if(c(s))return s}}},sn.techniqueAttribute=function(e,t){const n=e.attributes;for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)){const o=t(n[i],i);if(c(o))return o}},sn.techniqueUniform=function(e,t){const n=e.uniforms;for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)){const o=t(n[i],i);if(c(o))return o}},sn.techniqueParameter=function(e,t){const n=e.parameters;for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)){const o=t(n[i],i);if(c(o))return o}},sn.technique=function(e,t){return bs(e,"KHR_techniques_webgl")?sn.object(e.extensions.KHR_techniques_webgl.techniques,t):sn.topLevel(e,"techniques",t)},sn.texture=function(e,t){return sn.topLevel(e,"textures",t)};const We=sn,IA=function Epe(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}},h0=function wpe(e,t){const n=t.bufferView;if(c(n)){const i=e.bufferViews[n];if(c(i.byteStride)&&i.byteStride>0)return i.byteStride}return ee.getSizeInBytes(t.componentType)*IA(t.type)};function N_(e){c(e)&&(e.texCoord=g(e.texCoord,0))}const Ipe=function Spe(e){We.accessor(e,function(n){c(n.bufferView)&&(n.byteOffset=g(n.byteOffset,0))}),We.bufferView(e,function(n){c(n.buffer)&&(n.byteOffset=g(n.byteOffset,0))}),We.mesh(e,function(n){We.meshPrimitive(n,function(i){i.mode=g(i.mode,ie.TRIANGLES),c(i.material)||(c(e.materials)||(e.materials=[]),i.material=zu(e.materials,{name:"default"}))})}),We.accessorContainingVertexAttributeData(e,function(n){const i=e.accessors[n],o=i.bufferView;if(i.normalized=g(i.normalized,!1),c(o)){const r=e.bufferViews[o];r.byteStride=h0(e,i),r.target=ie.ARRAY_BUFFER}}),We.accessorContainingIndexData(e,function(n){const o=e.accessors[n].bufferView;c(o)&&(e.bufferViews[o].target=ie.ELEMENT_ARRAY_BUFFER)}),We.material(e,function(n){const i=g(n.extensions,g.EMPTY_OBJECT),o=i.KHR_materials_common;if(c(o)){const l=o.technique,u=c(o.values)?o.values:{};return o.values=u,u.ambient=c(u.ambient)?u.ambient:[0,0,0,1],u.emission=c(u.emission)?u.emission:[0,0,0,1],u.transparency=g(u.transparency,1),"CONSTANT"!==l&&(u.diffuse=c(u.diffuse)?u.diffuse:[0,0,0,1],"LAMBERT"!==l&&(u.specular=c(u.specular)?u.specular:[0,0,0,1],u.shininess=g(u.shininess,0))),o.transparent=g(o.transparent,!1),void(o.doubleSided=g(o.doubleSided,!1))}n.emissiveFactor=g(n.emissiveFactor,[0,0,0]),n.alphaMode=g(n.alphaMode,"OPAQUE"),n.doubleSided=g(n.doubleSided,!1),"MASK"===n.alphaMode&&(n.alphaCutoff=g(n.alphaCutoff,.5)),c(i.KHR_techniques_webgl)&&We.materialValue(n,function(l){c(l.index)&&N_(l)}),N_(n.emissiveTexture),N_(n.normalTexture),N_(n.occlusionTexture);const s=n.pbrMetallicRoughness;c(s)&&(s.baseColorFactor=g(s.baseColorFactor,[1,1,1,1]),s.metallicFactor=g(s.metallicFactor,1),s.roughnessFactor=g(s.roughnessFactor,1),N_(s.baseColorTexture),N_(s.metallicRoughnessTexture));const a=i.KHR_materials_pbrSpecularGlossiness;c(a)&&(a.diffuseFactor=g(a.diffuseFactor,[1,1,1,1]),a.specularFactor=g(a.specularFactor,[1,1,1]),a.glossinessFactor=g(a.glossinessFactor,1),N_(a.specularGlossinessTexture))}),We.animation(e,function(n){We.animationSampler(n,function(i){i.interpolation=g(i.interpolation,"LINEAR")})});const t=function vpe(e){const t={};return We.animation(e,function(n){We.animationChannel(n,function(i){const o=i.target,s=o.path;("translation"===s||"rotation"===s||"scale"===s)&&(t[o.node]=!0)})}),t}(e);return We.node(e,function(n,i){c(t[i])||c(n.translation)||c(n.rotation)||c(n.scale)?(n.translation=g(n.translation,[0,0,0]),n.rotation=g(n.rotation,[0,0,0,1]),n.scale=g(n.scale,[1,1,1])):n.matrix=g(n.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}),We.sampler(e,function(n){n.wrapS=g(n.wrapS,ie.REPEAT),n.wrapT=g(n.wrapT,ie.REPEAT)}),c(e.scenes)&&!c(e.scene)&&(e.scene=0),e};function ES(e){e.extras=c(e.extras)?e.extras:{},e.extras._pipeline=c(e.extras._pipeline)?e.extras._pipeline:{}}const IR=function Dpe(e){return We.shader(e,function(t){ES(t)}),We.buffer(e,function(t){ES(t)}),We.image(e,function(t){ES(t)}),ES(e),e},y8=function Rpe(e,t){const n=e.extensionsUsed;if(c(n)){const i=n.indexOf(t);i>=0&&n.splice(i,1),function Ppe(e,t){const n=e.extensionsRequired;if(c(n)){const i=n.indexOf(t);i>=0&&n.splice(i,1),0===n.length&&delete e.extensionsRequired}}(e,t),0===n.length&&delete e.extensionsUsed}};function b8(e,t,n){const i=new DataView(e.buffer),o=new Array(n);for(let r=0;r<n;++r)o[r]=i.getUint32(e.byteOffset+t+4*r,!0);return o}const Bpe=function Npe(e){if("glTF"!==cS(e))throw new Pe("File is not valid binary glTF");const n=b8(e,0,5),i=n[1];if(1!==i&&2!==i)throw new Pe("Binary glTF version is not 1 or 2");return 1===i?function Mpe(e,t){const n=t[2],i=t[3];if(0!==t[4])throw new Pe("Binary glTF scene format is not JSON");const s=20+i,a=Ky(e,20,i),l=JSON.parse(a);IR(l);const u=e.subarray(s,n),d=l.buffers;if(c(d)&&Object.keys(d).length>0){const h=g(d.binary_glTF,d.KHR_binary_glTF);c(h)&&(h.extras._pipeline.source=u,delete h.uri)}return y8(l,"KHR_binary_glTF"),l}(e,n):function Fpe(e,t){const n=t[2];let o,r,i=12;for(;i<n;){const s=b8(e,i,2),a=s[0],l=s[1];i+=8;const u=e.subarray(i,i+a);if(i+=a,1313821514===l){const d=Ky(u);o=JSON.parse(d),IR(o)}else 5130562===l&&(r=u)}if(c(o)&&c(r)){const s=o.buffers;c(s)&&s.length>0&&(s[0].extras._pipeline.source=r)}return o}(e,n)};function wS(e){c(e.extras)&&(c(e.extras._pipeline)&&delete e.extras._pipeline,0===Object.keys(e.extras).length&&delete e.extras)}const Upe=function kpe(e){return We.shader(e,function(t){wS(t)}),We.buffer(e,function(t){wS(t)}),We.image(e,function(t){wS(t)}),wS(e),e},DA=function zpe(e,t){let n=e.extensionsUsed;c(n)||(n=[],e.extensionsUsed=n),zu(n,t,!0)},DR=function Vpe(e){switch(e){case ee.BYTE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt8(n+s*o)};case ee.UNSIGNED_BYTE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint8(n+s*o)};case ee.SHORT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt16(n+s*o,!0)};case ee.UNSIGNED_SHORT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint16(n+s*o,!0)};case ee.INT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt32(n+s*o,!0)};case ee.UNSIGNED_INT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint32(n+s*o,!0)};case ee.FLOAT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getFloat32(n+s*o,!0)};case ee.DOUBLE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getFloat64(n+s*o,!0)}}},PR=function Hpe(e,t){const n=e.bufferViews,i=e.buffers,o=t.bufferView,r=IA(t.type);if(!c(t.bufferView))return{min:new Array(r).fill(0),max:new Array(r).fill(0)};const s=new Array(r).fill(Number.POSITIVE_INFINITY),a=new Array(r).fill(Number.NEGATIVE_INFINITY),l=n[o],h=i[l.buffer].extras._pipeline.source,m=t.count,_=h0(e,t);let p=t.byteOffset+l.byteOffset+h.byteOffset;const y=t.componentType,b=ee.getSizeInBytes(y),x=new DataView(h.buffer),C=new Array(r),w=DR(y);for(let v=0;v<m;v++){w(x,p,r,b,C);for(let I=0;I<r;I++){const P=C[I];s[I]=Math.min(s[I],P),a[I]=Math.max(a[I],P)}p+=_}return{min:s,max:a}},Gpe=[ie.FUNC_ADD,ie.FUNC_ADD],jpe=[ie.ONE,ie.ZERO,ie.ONE,ie.ZERO];function T8(e,t){const n=e.enable;return!!c(n)&&n.indexOf(t)>-1}const Wpe=[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 qpe(e,t){if(!c(e))return t;for(let n=0;n<4;n++)if(-1===Wpe.indexOf(e[n]))return t;return e}const Qpe=function Kpe(e){const n={},i={},o={};if(c(e.techniques)){const r={programs:[],shaders:[],techniques:[]},s=e.glExtensionsUsed;delete e.glExtensionsUsed,We.technique(e,function(a,l){const u={name:a.name,program:void 0,attributes:{},uniforms:{}};let d;if(We.techniqueAttribute(a,function(h,m){d=a.parameters[h],u.attributes[m]={semantic:d.semantic}}),We.techniqueUniform(a,function(h,m){d=a.parameters[h],u.uniforms[m]={count:d.count,node:d.node,type:d.type,semantic:d.semantic,value:d.value},c(n[l])||(n[l]={}),n[l][h]=m}),c(o[a.program]))u.program=o[a.program];else{const h=e.programs[a.program],m={name:h.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:s};m.fragmentShader=zu(r.shaders,e.shaders[h.fragmentShader],!0),m.vertexShader=zu(r.shaders,e.shaders[h.vertexShader],!0),u.program=zu(r.programs,m),o[a.program]=u.program}i[l]=zu(r.techniques,u)}),r.techniques.length>0&&(c(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,DA(e,"KHR_techniques_webgl"),function Zpe(e,t){let n=e.extensionsRequired;c(n)||(n=[],e.extensionsRequired=n),zu(n,t,!0),DA(e,t)}(e,"KHR_techniques_webgl"))}return We.material(e,function(r){if(c(r.technique)){const s={technique:i[r.technique]};We.objectLegacy(r.values,function(a,l){c(s.values)||(s.values={});const u=n[r.technique][l];c(u)&&(s.values[u]=a)}),c(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},A8=function Jpe(e,t){A.typeOf.object("material",e),A.defined("handler",t);const n=e.pbrMetallicRoughness;if(c(n)){if(c(n.baseColorTexture)){const r=n.baseColorTexture,s=t(r.index,r);if(c(s))return s}if(c(n.metallicRoughnessTexture)){const r=n.metallicRoughnessTexture,s=t(r.index,r);if(c(s))return s}}const{extensions:i}=e;if(c(i)){const r=i.KHR_materials_pbrSpecularGlossiness;if(c(r)){if(c(r.diffuseTexture)){const l=r.diffuseTexture,u=t(l.index,l);if(c(u))return u}if(c(r.specularGlossinessTexture)){const l=r.specularGlossinessTexture,u=t(l.index,l);if(c(u))return u}}const s=i.KHR_materials_specular;if(c(s)){const{specularTexture:l,specularColorTexture:u}=s;if(c(l)){const d=t(l.index,l);if(c(d))return d}if(c(u)){const d=t(u.index,u);if(c(d))return d}}const a=i.KHR_materials_common;if(c(a)&&c(a.values)){const{diffuse:l,ambient:u,emission:d,specular:h}=a.values;if(c(l)&&c(l.index)){const m=t(l.index,l);if(c(m))return m}if(c(u)&&c(u.index)){const m=t(u.index,u);if(c(m))return m}if(c(d)&&c(d.index)){const m=t(d.index,d);if(c(m))return m}if(c(h)&&c(h.index)){const m=t(h.index,h);if(c(m))return m}}}const o=We.materialValue(e,function(r){if(c(r.index)){const s=t(r.index,r);if(c(s))return s}});if(c(o))return o;if(c(e.emissiveTexture)){const r=e.emissiveTexture,s=t(r.index,r);if(c(s))return s}if(c(e.normalTexture)){const r=e.normalTexture,s=t(r.index,r);if(c(s))return s}if(c(e.occlusionTexture)){const r=e.occlusionTexture,s=t(r.index,r);if(c(s))return s}},x8=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"],tme={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function Yd(){}function Xd(){}function C8(e,t,n){const i=e.nodes[t];return!(c(i.mesh)||c(i.camera)||c(i.skin)||c(i.weights)||c(i.extras)||c(i.extensions)&&0!==Object.keys(i.extensions).length||c(n[t])||c(i.children)&&0!==i.children.filter(function(o){return!C8(e,o,n)}).length)}Yd.accessor=function(e,t){e.accessors.splice(t,1),We.mesh(e,function(i){We.meshPrimitive(i,function(o){We.meshPrimitiveAttribute(o,function(a,l){a>t&&o.attributes[l]--}),We.meshPrimitiveTarget(o,function(a){We.meshPrimitiveTargetAttribute(a,function(l,u){l>t&&a[u]--})});const r=o.indices;c(r)&&r>t&&o.indices--;const s=o.extensions;c(s)&&c(s.CESIUM_primitive_outline)&&s.CESIUM_primitive_outline.indices>t&&--s.CESIUM_primitive_outline.indices})}),We.skin(e,function(i){c(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),We.animation(e,function(i){We.animationSampler(i,function(o){c(o.input)&&o.input>t&&o.input--,c(o.output)&&o.output>t&&o.output--})})},Yd.buffer=function(e,t){e.buffers.splice(t,1),We.bufferView(e,function(i){c(i.buffer)&&i.buffer>t&&i.buffer--,c(i.extensions)&&c(i.extensions.EXT_meshopt_compression)&&i.extensions.EXT_meshopt_compression.buffer--})},Yd.bufferView=function(e,t){if(e.bufferViews.splice(t,1),We.accessor(e,function(i){c(i.bufferView)&&i.bufferView>t&&i.bufferView--}),We.shader(e,function(i){c(i.bufferView)&&i.bufferView>t&&i.bufferView--}),We.image(e,function(i){c(i.bufferView)&&i.bufferView>t&&i.bufferView--}),bs(e,"KHR_draco_mesh_compression")&&We.mesh(e,function(i){We.meshPrimitive(i,function(o){c(o.extensions)&&c(o.extensions.KHR_draco_mesh_compression)&&o.extensions.KHR_draco_mesh_compression.bufferView>t&&o.extensions.KHR_draco_mesh_compression.bufferView--})}),bs(e,"EXT_feature_metadata")){const o=e.extensions.EXT_feature_metadata.featureTables;for(const r in o)if(o.hasOwnProperty(r)){const a=o[r].properties;if(c(a))for(const l in a)if(a.hasOwnProperty(l)){const u=a[l];c(u.bufferView)&&u.bufferView>t&&u.bufferView--,c(u.arrayOffsetBufferView)&&u.arrayOffsetBufferView>t&&u.arrayOffsetBufferView--,c(u.stringOffsetBufferView)&&u.stringOffsetBufferView>t&&u.stringOffsetBufferView--}}}if(bs(e,"EXT_structural_metadata")){const o=e.extensions.EXT_structural_metadata.propertyTables;if(c(o)){const r=o.length;for(let s=0;s<r;++s){const l=o[s].properties;for(const u in l)if(l.hasOwnProperty(u)){const d=l[u];c(d.values)&&d.values>t&&d.values--,c(d.arrayOffsets)&&d.arrayOffsets>t&&d.arrayOffsets--,c(d.stringOffsets)&&d.stringOffsets>t&&d.stringOffsets--}}}}},Yd.image=function(e,t){e.images.splice(t,1),We.texture(e,function(i){c(i.source)&&i.source>t&&--i.source;const o=i.extensions;c(o)&&c(o.EXT_texture_webp)&&o.EXT_texture_webp.source>t?--i.extensions.EXT_texture_webp.source:c(o)&&c(o.KHR_texture_basisu)&&o.KHR_texture_basisu.source>t&&--i.extensions.KHR_texture_basisu.source})},Yd.mesh=function(e,t){e.meshes.splice(t,1),We.node(e,function(i){c(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})},Yd.node=function(e,t){e.nodes.splice(t,1),We.skin(e,function(i){c(i.skeleton)&&i.skeleton>t&&i.skeleton--,i.joints=i.joints.map(function(o){return o>t?o-1:o})}),We.animation(e,function(i){We.animationChannel(i,function(o){c(o.target)&&c(o.target.node)&&o.target.node>t&&o.target.node--})}),We.technique(e,function(i){We.techniqueUniform(i,function(o){c(o.node)&&o.node>t&&o.node--})}),We.node(e,function(i){c(i.children)&&(i.children=i.children.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o}))}),We.scene(e,function(i){i.nodes=i.nodes.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o})})},Yd.material=function(e,t){e.materials.splice(t,1),We.mesh(e,function(i){We.meshPrimitive(i,function(o){c(o.material)&&o.material>t&&o.material--})})},Yd.sampler=function(e,t){e.samplers.splice(t,1),We.texture(e,function(i){c(i.sampler)&&i.sampler>t&&--i.sampler})},Yd.texture=function(e,t){if(e.textures.splice(t,1),We.material(e,function(i){A8(i,function(o,r){r.index>t&&--r.index})}),bs(e,"EXT_feature_metadata")){We.mesh(e,function(r){We.meshPrimitive(r,function(s){const a=s.extensions;if(c(a)&&c(a.EXT_feature_metadata)){const u=a.EXT_feature_metadata.featureIdTextures;if(c(u)){const d=u.length;for(let h=0;h<d;++h){const _=u[h].featureIds.texture;_.index>t&&--_.index}}}})});const o=e.extensions.EXT_feature_metadata.featureTextures;for(const r in o)if(o.hasOwnProperty(r)){const a=o[r].properties;if(c(a))for(const l in a)if(a.hasOwnProperty(l)){const d=a[l].texture;d.index>t&&--d.index}}}if(bs(e,"EXT_mesh_features")&&We.mesh(e,function(i){We.meshPrimitive(i,function(o){const r=o.extensions;if(c(r)&&c(r.EXT_mesh_features)){const a=r.EXT_mesh_features.featureIds;if(c(a)){const l=a.length;for(let u=0;u<l;++u){const d=a[u];c(d.texture)&&d.texture.index>t&&--d.texture.index}}}})}),bs(e,"EXT_structural_metadata")){const o=e.extensions.EXT_structural_metadata.propertyTextures;if(c(o)){const r=o.length;for(let s=0;s<r;++s){const l=o[s].properties;for(const u in l)if(l.hasOwnProperty(u)){const d=l[u];d.index>t&&--d.index}}}}},Xd.accessor=function(e){const t={};return We.mesh(e,function(n){We.meshPrimitive(n,function(i){We.meshPrimitiveAttribute(i,function(r){t[r]=!0}),We.meshPrimitiveTarget(i,function(r){We.meshPrimitiveTargetAttribute(r,function(s){t[s]=!0})});const o=i.indices;c(o)&&(t[o]=!0)})}),We.skin(e,function(n){c(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),We.animation(e,function(n){We.animationSampler(n,function(i){c(i.input)&&(t[i.input]=!0),c(i.output)&&(t[i.output]=!0)})}),bs(e,"EXT_mesh_gpu_instancing")&&We.node(e,function(n){c(n.extensions)&&c(n.extensions.EXT_mesh_gpu_instancing)&&Object.keys(n.extensions.EXT_mesh_gpu_instancing.attributes).forEach(function(i){t[n.extensions.EXT_mesh_gpu_instancing.attributes[i]]=!0})}),bs(e,"CESIUM_primitive_outline")&&We.mesh(e,function(n){We.meshPrimitive(n,function(i){const o=i.extensions;if(c(o)&&c(o.CESIUM_primitive_outline)){const s=o.CESIUM_primitive_outline.indices;c(s)&&(t[s]=!0)}})}),t},Xd.buffer=function(e){const t={};return We.bufferView(e,function(n){c(n.buffer)&&(t[n.buffer]=!0),c(n.extensions)&&c(n.extensions.EXT_meshopt_compression)&&(t[n.extensions.EXT_meshopt_compression.buffer]=!0)}),t},Xd.bufferView=function(e){const t={};if(We.accessor(e,function(n){c(n.bufferView)&&(t[n.bufferView]=!0)}),We.shader(e,function(n){c(n.bufferView)&&(t[n.bufferView]=!0)}),We.image(e,function(n){c(n.bufferView)&&(t[n.bufferView]=!0)}),bs(e,"KHR_draco_mesh_compression")&&We.mesh(e,function(n){We.meshPrimitive(n,function(i){c(i.extensions)&&c(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),bs(e,"EXT_feature_metadata")){const i=e.extensions.EXT_feature_metadata.featureTables;for(const o in i)if(i.hasOwnProperty(o)){const s=i[o].properties;if(c(s))for(const a in s)if(s.hasOwnProperty(a)){const l=s[a];c(l.bufferView)&&(t[l.bufferView]=!0),c(l.arrayOffsetBufferView)&&(t[l.arrayOffsetBufferView]=!0),c(l.stringOffsetBufferView)&&(t[l.stringOffsetBufferView]=!0)}}}if(bs(e,"EXT_structural_metadata")){const i=e.extensions.EXT_structural_metadata.propertyTables;if(c(i)){const o=i.length;for(let r=0;r<o;++r){const a=i[r].properties;for(const l in a)if(a.hasOwnProperty(l)){const u=a[l];c(u.values)&&(t[u.values]=!0),c(u.arrayOffsets)&&(t[u.arrayOffsets]=!0),c(u.stringOffsets)&&(t[u.stringOffsets]=!0)}}}}return t},Xd.image=function(e){const t={};return We.texture(e,function(n){c(n.source)&&(t[n.source]=!0),c(n.extensions)&&c(n.extensions.EXT_texture_webp)?t[n.extensions.EXT_texture_webp.source]=!0:c(n.extensions)&&c(n.extensions.KHR_texture_basisu)&&(t[n.extensions.KHR_texture_basisu.source]=!0)}),t},Xd.mesh=function(e){const t={};return We.node(e,function(n){if(c(n.mesh&&c(e.meshes))){const i=e.meshes[n.mesh];c(i)&&c(i.primitives)&&i.primitives.length>0&&(t[n.mesh]=!0)}}),t},Xd.node=function(e){const t={};return We.skin(e,function(n){c(n.skeleton)&&(t[n.skeleton]=!0),We.skinJoint(n,function(i){t[i]=!0})}),We.animation(e,function(n){We.animationChannel(n,function(i){c(i.target)&&c(i.target.node)&&(t[i.target.node]=!0)})}),We.technique(e,function(n){We.techniqueUniform(n,function(i){c(i.node)&&(t[i.node]=!0)})}),We.node(e,function(n,i){C8(e,i,t)||(t[i]=!0)}),t},Xd.material=function(e){const t={};return We.mesh(e,function(n){We.meshPrimitive(n,function(i){c(i.material)&&(t[i.material]=!0)})}),t},Xd.texture=function(e){const t={};if(We.material(e,function(n){A8(n,function(i){t[i]=!0})}),bs(e,"EXT_feature_metadata")){We.mesh(e,function(o){We.meshPrimitive(o,function(r){const s=r.extensions;if(c(s)&&c(s.EXT_feature_metadata)){const l=s.EXT_feature_metadata.featureIdTextures;if(c(l)){const u=l.length;for(let d=0;d<u;++d)t[l[d].featureIds.texture.index]=!0}}})});const i=e.extensions.EXT_feature_metadata.featureTextures;for(const o in i)if(i.hasOwnProperty(o)){const s=i[o].properties;if(c(s))for(const a in s)s.hasOwnProperty(a)&&(t[s[a].texture.index]=!0)}}if(bs(e,"EXT_mesh_features")&&We.mesh(e,function(n){We.meshPrimitive(n,function(i){const o=i.extensions;if(c(o)&&c(o.EXT_mesh_features)){const s=o.EXT_mesh_features.featureIds;if(c(s)){const a=s.length;for(let l=0;l<a;++l){const u=s[l];c(u.texture)&&(t[u.texture.index]=!0)}}}})}),bs(e,"EXT_structural_metadata")){const i=e.extensions.EXT_structural_metadata.propertyTextures;if(c(i)){const o=i.length;for(let r=0;r<o;++r){const a=i[r].properties;for(const l in a)a.hasOwnProperty(l)&&(t[a[l].index]=!0)}}}return t},Xd.sampler=function(e){const t={};return We.texture(e,function(n){c(n.sampler)&&(t[n.sampler]=!0)}),t};function SS(e,t,n){const i=ee.createTypedArray(n,function sme(e,t){const n=h0(e,t),i=ee.getSizeInBytes(t.componentType),o=IA(t.type),r=t.count,s=new Array(o*r);if(!c(t.bufferView))return s.fill(0);const a=e.bufferViews[t.bufferView],l=e.buffers[a.buffer].extras._pipeline.source;let u=t.byteOffset+a.byteOffset+l.byteOffset;const d=new DataView(l.buffer),h=new Array(o),m=DR(t.componentType);for(let _=0;_<r;++_){m(d,u,o,i,h);for(let p=0;p<o;++p)s[_*o+p]=h[p];u+=n}return s}(e,t)),o=new Uint8Array(i.buffer);t.bufferView=function ome(e,t){const o={buffer:zu(e.buffers,{byteLength:t.length,extras:{_pipeline:{source:t}}}),byteOffset:0,byteLength:t.length};return zu(e.bufferViews,o)}(e,o),t.componentType=n,t.byteOffset=0}function OR(e,t){if(Array.isArray(e)){const n=e.length;for(let i=0;i<n;++i)OR(e[i],t)}else if(null!==e&&"object"==typeof e&&e.constructor===Object){const n=e.extensions;let i;c(n)&&(i=n[t],c(i)&&(delete n[t],0===Object.keys(n).length&&delete e.extensions));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&OR(e[o],t);return i}}const RR=function ume(e,t){return y8(e,t),"CESIUM_RTC"===t&&function dme(e){We.technique(e,function(t){We.techniqueUniform(t,function(n){"CESIUM_RTC_MODELVIEW"===n.semantic&&(n.semantic="MODELVIEW")})})}(e),OR(e,t)},vS={.8:function gme(e){c(e.asset)||(e.asset={});const t=e.asset;if(t.version="1.0","string"==typeof t.profile){const n=t.profile.split(" ");t.profile={api:n[0],version:n[1]}}else t.profile={};if(c(e.version)&&delete e.version,E8(e),function hme(e){const t=e.meshes;for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const o=t[n].primitives;if(c(o)){const r=o.length;for(let s=0;s<r;++s){const a=o[s],l=g(a.primitive,ie.TRIANGLES);a.mode=g(a.mode,l),delete a.primitive}}}}(e),function pme(e){const t=e.nodes,n=new f,i=new bt;for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const r=t[o];if(c(r.rotation)){const a=r.rotation;f.fromArray(a,0,n),bt.fromAxisAngle(n,a[3],i),r.rotation=[i.x,i.y,i.z,i.w]}const s=r.instanceSkin;c(s)&&(r.skeletons=s.skeletons,r.skin=s.skin,r.meshes=s.meshes,delete r.instanceSkin)}}(e),function mme(e){const t=e.animations,n=e.accessors,i=e.bufferViews,o=e.buffers,r={},s=new f,a=new bt;for(const l in t)if(Object.prototype.hasOwnProperty.call(t,l)){const u=t[l],d=u.channels,h=u.parameters,m=u.samplers;if(c(d)){const _=d.length;for(let p=0;p<_;++p){const y=d[p];if("rotation"===y.target.path){const b=h[m[y.sampler].output];if(c(r[b]))continue;r[b]=!0;const x=n[b],C=i[x.bufferView],v=o[C.buffer].extras._pipeline.source,I=v.byteOffset+C.byteOffset+x.byteOffset,P=x.componentType,N=x.count,R=IA(x.type),F=ee.createArrayBufferView(P,v.buffer,I,x.count*R);for(let S=0;S<N;S++){const D=S*R;f.unpack(F,D,s),bt.fromAxisAngle(s,F[D+3],a),bt.pack(a,F,D)}}}}}}(e),function _me(e){const t=e.techniques;for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const i=t[n],o=i.passes;if(c(o)){const r=g(i.pass,"defaultPass");if(Object.prototype.hasOwnProperty.call(o,r)){const s=o[r],a=s.instanceProgram;i.attributes=g(i.attributes,a.attributes),i.program=g(i.program,a.program),i.uniforms=g(i.uniforms,a.uniforms),i.states=g(i.states,s.states)}delete i.passes,delete i.pass}}}(e),c(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),c(e.lights)){const n=g(e.extensions,{});e.extensions=n;const i=g(n.KHR_materials_common,{});n.KHR_materials_common=i,i.lights=e.lights,delete e.lights,DA(e,"KHR_materials_common")}},"1.0":function kme(e){e.asset=g(e.asset,{}),e.asset.version="2.0",E8(e),function yme(e){const t=e.animations;for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const i=t[n],o=i.parameters;if(c(o)){const r=i.samplers;for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)){const a=r[s];a.input=o[a.input],a.output=o[a.output]}delete i.parameters}}}(e),function Mme(e){We.node(e,function(t,n){S8(t)&&v8(e,n)})}(e),function bme(e){let t;const n={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}};let i;const o={},r=e.nodes;for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(i=r[s].jointName,c(i)&&(o[i]=s));for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&c(n[s])){const a={};e[s]=w8(e[s],a),n[s]=a}for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(o[i]=n.nodes[o[i]]);c(e.scene)&&(e.scene=n.scenes[e.scene]),We.bufferView(e,function(s){c(s.buffer)&&(s.buffer=n.buffers[s.buffer])}),We.accessor(e,function(s){c(s.bufferView)&&(s.bufferView=n.bufferViews[s.bufferView])}),We.shader(e,function(s){const a=s.extensions;if(c(a)){const l=a.KHR_binary_glTF;c(l)&&(s.bufferView=n.bufferViews[l.bufferView],delete a.KHR_binary_glTF),0===Object.keys(a).length&&delete s.extensions}}),We.program(e,function(s){c(s.vertexShader)&&(s.vertexShader=n.shaders[s.vertexShader]),c(s.fragmentShader)&&(s.fragmentShader=n.shaders[s.fragmentShader])}),We.technique(e,function(s){c(s.program)&&(s.program=n.programs[s.program]),We.techniqueParameter(s,function(a){c(a.node)&&(a.node=n.nodes[a.node]);const l=a.value;"string"==typeof l&&(a.value={index:n.textures[l]})})}),We.mesh(e,function(s){We.meshPrimitive(s,function(a){c(a.indices)&&(a.indices=n.accessors[a.indices]),We.meshPrimitiveAttribute(a,function(l,u){a.attributes[u]=n.accessors[l]}),c(a.material)&&(a.material=n.materials[a.material])})}),We.node(e,function(s){let a=s.children;if(c(a)){const l=a.length;for(t=0;t<l;++t)a[t]=n.nodes[a[t]]}if(c(s.meshes)){const l=s.meshes,u=l.length;if(u>0)for(s.mesh=n.meshes[l[0]],t=1;t<u;++t){const h=zu(e.nodes,{mesh:n.meshes[l[t]]});c(a)||(a=[],s.children=a),a.push(h)}delete s.meshes}if(c(s.camera)&&(s.camera=n.cameras[s.camera]),c(s.skin)&&(s.skin=n.skins[s.skin]),c(s.skeletons)){const l=s.skeletons;l.length>0&&c(s.skin)&&(e.skins[s.skin].skeleton=n.nodes[l[0]]),delete s.skeletons}c(s.jointName)&&delete s.jointName}),We.skin(e,function(s){c(s.inverseBindMatrices)&&(s.inverseBindMatrices=n.accessors[s.inverseBindMatrices]);const a=s.jointNames;if(c(a)){const l=[],u=a.length;for(t=0;t<u;++t)l[t]=o[a[t]];s.joints=l,delete s.jointNames}}),We.scene(e,function(s){const a=s.nodes;if(c(a)){const l=a.length;for(t=0;t<l;++t)a[t]=n.nodes[a[t]]}}),We.animation(e,function(s){const a={};s.samplers=w8(s.samplers,a),We.animationSampler(s,function(l){l.input=n.accessors[l.input],l.output=n.accessors[l.output]}),We.animationChannel(s,function(l){l.sampler=a[l.sampler];const u=l.target;c(u)&&(u.node=n.nodes[u.id],delete u.id)})}),We.material(e,function(s){c(s.technique)&&(s.technique=n.techniques[s.technique]),We.materialValue(s,function(l,u){"string"==typeof l&&(s.values[u]={index:n.textures[l]})});const a=s.extensions;if(c(a)){const l=a.KHR_materials_common;c(l)&&c(l.values)&&We.materialValue(l,function(u,d){"string"==typeof u&&(l.values[d]={index:n.textures[u]})})}}),We.image(e,function(s){const a=s.extensions;if(c(a)){const l=a.KHR_binary_glTF;c(l)&&(s.bufferView=n.bufferViews[l.bufferView],s.mimeType=l.mimeType,delete a.KHR_binary_glTF),0===Object.keys(a).length&&delete s.extensions}}),We.texture(e,function(s){c(s.sampler)&&(s.sampler=n.samplers[s.sampler]),c(s.source)&&(s.source=n.images[s.source])})}(e),function Tme(e){We.animation(e,function(t){We.animationSampler(t,function(n){delete n.name})})}(e),function xme(e){const t=e.asset;delete t.profile,delete t.premultipliedAlpha}(e),function Eme(e){const t=e.extensionsUsed;if(e.extensionsRequired=g(e.extensionsRequired,[]),c(t)){const n=t.length;for(let i=0;i<n;++i){const o=t[i];c(Cme[o])&&e.extensionsRequired.push(o)}}}(e),function Rme(e){We.buffer(e,function(t){c(t.byteLength)||(t.byteLength=t.extras._pipeline.source.length)}),We.accessor(e,function(t){const n=t.bufferView;if(c(n)){const i=e.bufferViews[n],o=LR(e,t),r=t.byteOffset+t.count*o;i.byteLength=Math.max(g(i.byteLength,0),r)}})}(e),function Lme(e){let t,n,i;const o=e.bufferViews,r={};We.accessorContainingVertexAttributeData(e,function(a){const l=e.accessors[a];c(l.bufferView)&&(r[l.bufferView]=!0)});const s={};We.accessor(e,function(a){c(a.bufferView)&&(s[a.bufferView]=g(s[a.bufferView],[]),s[a.bufferView].push(a))});for(const a in s)if(Object.prototype.hasOwnProperty.call(s,a)){i=o[a];const l=s[a];l.sort(function(m,_){return m.byteOffset-_.byteOffset});let u=0,d=0;const h=l.length;for(t=0;t<h;++t){let m=l[t];const _=LR(e,m),p=m.byteOffset,y=m.count*_;delete m.byteStride;const b=t<h-1;if(_!==(b?LR(e,l[t+1]):void 0)){const C=Rt(i,!0);r[a]&&(C.byteStride=_),C.byteOffset+=u,C.byteLength=p+y-u;const w=zu(o,C);for(n=d;n<=t;++n)m=l[n],m.bufferView=w,m.byteOffset=m.byteOffset-u;u=b?l[t+1].byteOffset:void 0,d=t+1}}}!function eme(e,t){t=g(t,x8),x8.forEach(function(n){t.indexOf(n)>-1&&function nme(e,t){const i=e[tme[t]];if(c(i)){let o=0;const r=Xd[t](e),s=i.length;for(let a=0;a<s;++a)r[a]||(Yd[t](e,a-o),o++)}}(e,n)})}(e,["accessor","bufferView","buffer"])}(e),function Nme(e){We.accessorWithSemantic(e,"POSITION",function(t){const n=e.accessors[t];if(!c(n.min)||!c(n.max)){const i=PR(e,n);n.min=i.min,n.max=i.max}})}(e),function Fme(e){We.animation(e,function(t){We.animationSampler(t,function(n){const i=e.accessors[n.input];if(!c(i.min)||!c(i.max)){const o=PR(e,i);i.min=o.min,i.max=o.max}})})}(e),function Bme(e){We.accessor(e,function(t){if(c(t.min)||c(t.max)){const n=PR(e,t);c(t.min)&&(t.min=n.min),c(t.max)&&(t.max=n.max)}})}(e),function wme(e){We.buffer(e,function(t){delete t.type})}(e),function Sme(e){We.texture(e,function(t){delete t.format,delete t.internalFormat,delete t.target,delete t.type})}(e),function vme(e){We.mesh(e,function(t){We.meshPrimitive(t,function(n){We.meshPrimitiveAttribute(n,function(i,o){"TEXCOORD"===o?n.attributes.TEXCOORD_0=i:"COLOR"===o&&(n.attributes.COLOR_0=i)}),delete n.attributes.TEXCOORD,delete n.attributes.COLOR})}),We.technique(e,function(t){We.techniqueParameter(t,function(n){const i=n.semantic;c(i)&&("TEXCOORD"===i?n.semantic="TEXCOORD_0":"COLOR"===i&&(n.semantic="COLOR_0"))})})}(e),function Pme(e){const t={};We.mesh(e,function(n){We.meshPrimitive(n,function(i){We.meshPrimitiveAttribute(i,function(o,r){if("_"!==r.charAt(0)){const s=r.search(/_[0-9]+/g);let u,a=r,l="_0";s>=0&&(a=r.substring(0,s),l=r.substring(s));const d=Dme[a];c(d)?(u=d+l,t[r]=u):c(Ime[a])||(u=`_${r}`,t[r]=u)}});for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const r=t[o],s=i.attributes[o];c(s)&&(delete i.attributes[o],i.attributes[r]=s)}})}),We.technique(e,function(n){We.techniqueParameter(n,function(i){const o=t[i.semantic];c(o)&&(i.semantic=o)})})}(e),function cme(e){let t;We.accessorWithSemantic(e,"JOINTS_0",function(n){const i=e.accessors[n];t=i.componentType,t===ie.BYTE?SS(e,i,ee.UNSIGNED_BYTE):t!==ie.UNSIGNED_BYTE&&t!==ie.UNSIGNED_SHORT&&SS(e,i,ee.UNSIGNED_SHORT)}),We.accessorWithSemantic(e,"WEIGHTS_0",function(n){const i=e.accessors[n];t=i.componentType,t===ie.BYTE?SS(e,i,ee.UNSIGNED_BYTE):t===ie.SHORT&&SS(e,i,ee.UNSIGNED_SHORT)})}(e),function Ome(e){We.camera(e,function(t){const n=t.perspective;if(c(n)){const i=n.aspectRatio;c(i)&&0===i&&delete n.aspectRatio;const o=n.yfov;c(o)&&0===o&&(n.yfov=1)}})}(e),function Ype(e){const t={},n={};c(e.techniques)&&(We.technique(e,function(o,r){const s=o.states;if(c(s)){const a=n[r]={};if(T8(s,ie.BLEND)){a.alphaMode="BLEND";const l=s.functions;c(l)&&(c(l.blendEquationSeparate)||c(l.blendFuncSeparate))&&(t[r]={blendEquation:g(l.blendEquationSeparate,Gpe),blendFactors:qpe(l.blendFuncSeparate,jpe)})}T8(s,ie.CULL_FACE)||(a.doubleSided=!0),delete o.states}}),Object.keys(t).length>0&&(c(e.extensions)||(e.extensions={}),DA(e,"KHR_blend")),We.material(e,function(o){if(c(o.technique)){We.objectLegacy(n[o.technique],function(a,l){o[l]=a});const s=t[o.technique];c(s)&&(c(o.extensions)||(o.extensions={}),o.extensions.KHR_blend=s)}}))}(e),Qpe(e),function Ame(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];Array.isArray(n)&&0===n.length&&delete e[t]}We.node(e,function(t){c(t.children)&&0===t.children.length&&delete t.children})}(e)},"2.0":void 0};function E8(e){const t=e.materials;for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const i=t[n],o=i.instanceTechnique;c(o)&&(i.technique=o.technique,i.values=o.values,delete i.instanceTechnique)}}function w8(e,t){const n=[];for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=e[i];t[i]=n.length,n.push(o),c(o.name)||(o.name=i)}return n}const Cme={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0},Ime={POSITION:!0,NORMAL:!0,TANGENT:!0},Dme={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function LR(e,t){return c(t.byteStride)&&0!==t.byteStride?t.byteStride:h0(e,t)}function S8(e){return(!c(e.children)||0===e.children.length)&&(!c(e.meshes)||0===e.meshes.length)&&!c(e.camera)&&!c(e.skin)&&!c(e.skeletons)&&!c(e.jointName)&&(!c(e.translation)||f.fromArray(e.translation).equals(f.ZERO))&&(!c(e.scale)||f.fromArray(e.scale).equals(new f(1,1,1)))&&(!c(e.rotation)||de.fromArray(e.rotation).equals(new de(0,0,0,1)))&&(!c(e.matrix)||k.fromColumnMajorArray(e.matrix).equals(k.IDENTITY))&&!c(e.extensions)&&!c(e.extras)}function v8(e,t){We.scene(e,function(n){const i=n.nodes;if(c(i))for(let r=i.length;r>=0;--r)if(i[r]===t)return void i.splice(r,1)}),We.node(e,function(n,i){if(c(n.children)){const o=n.children.indexOf(t);o>-1&&(n.children.splice(o,1),S8(n)&&v8(e,i))}}),delete e.nodes[t]}const Ume=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],zme=["u_diffuse","u_diffuse_mat"];function NR(e){e.pbrMetallicRoughness=c(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function MR(e){return c(e.index)}function FR(e){return Array.isArray(e)&&4===e.length}function I8(e){const t=new Array(4);t[3]=e[3];for(let n=0;n<3;n++){const i=e[n];t[n]=i<=.04045?.07739938080495357*e[n]:Math.pow(.9478672985781991*(i+.055),2.4)}return t}function BR(e,t){c(t)&&(FR(t)?e.pbrMetallicRoughness.baseColorFactor=I8(t):MR(t)&&(e.pbrMetallicRoughness.baseColorTexture=t))}function D8(e,t){c(t)&&(FR(t)?e.emissiveFactor=t.slice(0,3):MR(t)&&(e.emissiveTexture=t))}const Gme=function fme(e,t){const n=(t=g(t,g.EMPTY_OBJECT)).targetVersion;let i=e.version;e.asset=g(e.asset,{version:"1.0"}),e.asset.version=g(e.asset.version,"1.0"),i=g(i,e.asset.version).toString(),Object.prototype.hasOwnProperty.call(vS,i)||(c(i)&&(i=i.substring(0,3)),Object.prototype.hasOwnProperty.call(vS,i)||(i="1.0"));let o=vS[i];for(;c(o)&&i!==n;)o(e,t),i=e.asset.version,o=vS[i];return t.keepLegacyExtensions||(function Vme(e,t){t=g(t,g.EMPTY_OBJECT);const n=g(t.baseColorTextureNames,Ume),i=g(t.baseColorFactorNames,zme);We.material(e,function(o){We.materialValue(o,function(r,s){-1!==n.indexOf(s)&&MR(r)?(NR(o),o.pbrMetallicRoughness.baseColorTexture=r):-1!==i.indexOf(s)&&FR(r)&&(NR(o),o.pbrMetallicRoughness.baseColorFactor=I8(r))})}),RR(e,"KHR_techniques_webgl"),RR(e,"KHR_blend")}(e,t),function Hme(e){We.material(e,function(t){const n=g(t.extensions,g.EMPTY_OBJECT).KHR_materials_common;if(!c(n))return;const i=g(n.values,{}),o=i.ambient,r=i.diffuse,s=i.emission,a=i.transparency,l=n.doubleSided,u=n.transparent;NR(t),"CONSTANT"===n.technique?(DA(e,"KHR_materials_unlit"),t.extensions=c(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={},BR(t,s),BR(t,o)):(BR(t,r),D8(t,o),D8(t,s)),c(l)&&(t.doubleSided=l),c(a)&&(c(t.pbrMetallicRoughness.baseColorFactor)?t.pbrMetallicRoughness.baseColorFactor[3]*=a:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,a]),c(u)&&(t.alphaMode=u?"BLEND":"OPAQUE")}),RR(e,"KHR_materials_common")}(e)),e},ri={POSITION:"POSITION",NORMAL:"NORMAL",TANGENT:"TANGENT",TEXCOORD:"TEXCOORD",COLOR:"COLOR",JOINTS:"JOINTS",WEIGHTS:"WEIGHTS",FEATURE_ID:"_FEATURE_ID",hasSetIndex:function(e){switch(A.typeOf.string("semantic",e),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;default:throw new E("semantic is not a valid value.")}},fromGltfSemantic:function(e){A.typeOf.string("gltfSemantic",e);let t=e;const i=/^(\w+)_\d+$/.exec(e);switch(null!==i&&(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}},fromPntsSemantic:function(e){switch(A.typeOf.string("pntsSemantic",e),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;default:throw new E("pntsSemantic is not a valid value.")}},getGlslType:function(e){switch(A.typeOf.string("semantic",e),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";default:throw new E("semantic is not a valid value.")}},getVariableName:function(e,t){A.typeOf.string("semantic",e);let n=function jme(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";default:throw new E("semantic is not a valid value.")}}(e);return c(t)&&(n+=`_${t}`),n}},ln=Object.freeze(ri);function xa(){}xa.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;c(n)&&c(n.message)&&(i+=`\n${n.message}`);const o=new Pe(i);return c(n)&&(o.stack=`Original stack:\n${n.stack}\nHandler stack:\n${o.stack}`),o},xa.getNodeTransform=function(e){return c(e.matrix)?e.matrix:k.fromTranslationQuaternionRotationScale(c(e.translation)?e.translation:f.ZERO,c(e.rotation)?e.rotation:bt.IDENTITY,c(e.scale)?e.scale:f.ONE)},xa.getAttributeBySemantic=function(e,t,n){const i=e.attributes,o=i.length;for(let r=0;r<o;++r){const s=i[r],a=!c(n)||s.setIndex===n;if(s.semantic===t&&a)return s}},xa.getAttributeByName=function(e,t){const n=e.attributes,i=n.length;for(let o=0;o<i;++o){const r=n[o];if(r.name===t)return r}},xa.getFeatureIdsByLabel=function(e,t){for(let n=0;n<e.length;n++){const i=e[n];if(i.positionalLabel===t||i.label===t)return i}},xa.hasQuantizedAttributes=function(e){if(!c(e))return!1;for(let t=0;t<e.length;t++)if(c(e[t].quantization))return!0;return!1},xa.getAttributeInfo=function(e){const t=e.semantic,n=e.setIndex;let i,o=!1;c(t)?(i=ln.getVariableName(t,n),o=!0):(i=e.name,i=i.replace(/^_/,""),i=i.toLowerCase());const r=/^color_\d+$/.test(i);let a=Wn.getGlslType(e.type);r&&(a="vec4");const l=c(e.quantization);let u;return l&&(u=r?"vec4":Wn.getGlslType(e.quantization.type)),{attribute:e,isQuantized:l,variableName:i,hasSemantic:o,glslType:a,quantizedGlslType:u}};const Wme=new f,qme=new f;xa.getPositionMinMax=function(e,t,n){const i=xa.getAttributeBySemantic(e,"POSITION");let o=i.max,r=i.min;return c(n)&&c(t)&&(r=f.add(r,t,qme),o=f.add(o,n,Wme)),{min:r,max:o}},xa.getAxisCorrectionMatrix=function(e,t,n){return n=k.clone(k.IDENTITY,n),e===Ms.Y?n=k.clone(Ms.Y_UP_TO_Z_UP,n):e===Ms.X&&(n=k.clone(Ms.X_UP_TO_Z_UP,n)),t===Ms.Z&&(n=k.multiplyTransformation(n,Ms.Z_UP_TO_X_UP,n)),n};const Yme=new oe;xa.getCullFace=function(e,t){if(!Tt.isTriangles(t))return ur.BACK;const n=k.getMatrix3(e,Yme);return oe.determinant(n)<0?ur.FRONT:ur.BACK},xa.sanitizeGlslIdentifier=function(e){let t=e.replaceAll(/[^A-Za-z0-9]+/g,"_");return t=t.replace(/^gl_/,""),/^\d/.test(t)&&(t=`_${t}`),t},xa.supportedExtensions={AGI_articulations:!0,CESIUM_primitive_outline:!0,CESIUM_RTC:!0,EXT_feature_metadata:!0,EXT_instance_features:!0,EXT_mesh_features:!0,EXT_mesh_gpu_instancing:!0,EXT_meshopt_compression:!0,EXT_structural_metadata:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_draco_mesh_compression:!0,KHR_techniques_webgl:!0,KHR_materials_common:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_materials_specular:!0,KHR_materials_anisotropy:!0,KHR_materials_clearcoat:!0,KHR_materials_unlit:!0,KHR_mesh_quantization:!0,KHR_texture_basisu:!0,KHR_texture_transform:!0,WEB3D_quantized_attributes:!0},xa.checkSupportedExtensions=function(e){const t=e.length;for(let n=0;n<t;n++){const i=e[n];if(!xa.supportedExtensions[i])throw new Pe(`Unsupported glTF Extension: ${i}`)}};const ti=xa;function Mp(e){const t=(e=g(e,g.EMPTY_OBJECT)).resourceCache,n=e.gltfResource,i=e.baseResource,o=e.typedArray,r=e.gltfJson,s=e.cacheKey;A.typeOf.func("options.resourceCache",t),A.typeOf.object("options.gltfResource",n),A.typeOf.object("options.baseResource",i),this._resourceCache=t,this._gltfResource=n,this._baseResource=i,this._typedArray=o,this._gltfJson=r,this._cacheKey=s,this._gltf=void 0,this._bufferLoaders=[],this._state=rn.UNLOADED,this._promise=void 0}function kR(){return(kR=(0,we.Z)(function*(e){let t;try{const n=yield e._fetchGltf();if(e.isDestroyed())return;t=new Uint8Array(n)}catch(n){if(e.isDestroyed())return;UR(e,n)}return O8(e,t)})).apply(this,arguments)}function UR(e,t){throw e.unload(),e._state=rn.FAILED,e.getError(`Failed to load glTF: ${e._gltfResource.url}`,t)}function zR(){return(zR=(0,we.Z)(function*(e,t){if(c(t.asset)&&"2.0"===t.asset.version&&!bs(t,"KHR_techniques_webgl")&&!bs(t,"KHR_materials_common"))return Promise.resolve();const n=[];We.buffer(t,function(i){if(!c(i.extras._pipeline.source)&&c(i.uri)){const o=e._baseResource.getDerivedResource({url:i.uri}),s=e._resourceCache.getExternalBufferLoader({resource:o});e._bufferLoaders.push(s),n.push(s.load().then(function(){s.isDestroyed()||(i.extras._pipeline.source=s.typedArray)}))}}),yield Promise.all(n),Gme(t)})).apply(this,arguments)}function P8(e,t){return VR.apply(this,arguments)}function VR(){return VR=(0,we.Z)(function*(e,t){try{IR(t),yield function $me(e){const t=[];return We.buffer(e,function(n){const i=n.uri;!c(n.extras._pipeline.source)&&c(i)&&$r(i)&&(delete n.uri,t.push(zt.fetchArrayBuffer(i).then(function(o){n.extras._pipeline.source=new Uint8Array(o)})))}),Promise.all(t)}(t),yield function Zme(e,t){return zR.apply(this,arguments)}(e,t),Ipe(t),yield function Kme(e,t){const n=[];return We.buffer(t,function(i,o){const r=i.extras._pipeline.source;if(c(r)&&!c(i.uri)){const a=e._resourceCache.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:o,typedArray:r});e._bufferLoaders.push(a),n.push(a.load())}}),Promise.all(n)}(e,t),Upe(t);const n=t.asset.version;if("1.0"!==n&&"2.0"!==n)throw new Pe(`Unsupported glTF version: ${n}`);const i=t.extensionsRequired;return c(i)&&ti.checkSupportedExtensions(i),e._gltf=t,e._state=rn.READY,e}catch(n){if(e.isDestroyed())return;UR(e,n)}}),VR.apply(this,arguments)}function O8(e,t){return HR.apply(this,arguments)}function HR(){return(HR=(0,we.Z)(function*(e,t){let n;try{n="glTF"===cS(t)?Bpe(t):Cc(t)}catch(i){if(e.isDestroyed())return;UR(e,i)}return P8(e,n)})).apply(this,arguments)}c(Object.create)&&((Mp.prototype=Object.create(Ja.prototype)).constructor=Mp),Object.defineProperties(Mp.prototype,{cacheKey:{get:function(){return this._cacheKey}},gltf:{get:function(){return this._gltf}}}),Mp.prototype.load=(0,we.Z)(function*(){return c(this._promise)?this._promise:(this._state=rn.LOADING,c(this._gltfJson)?(this._promise=P8(this,this._gltfJson),this._promise):c(this._typedArray)?(this._promise=O8(this,this._typedArray),this._promise):(this._promise=function Xme(e){return kR.apply(this,arguments)}(this),this._promise))}),Mp.prototype.unload=function(){const e=this._bufferLoaders,t=e.length;for(let n=0;n<t;++n)e[n]=!e[n].isDestroyed()&&this._resourceCache.unload(e[n]);this._bufferLoaders.length=0,this._gltf=void 0},Mp.prototype._fetchGltf=function(){return this._gltfResource.fetchArrayBuffer()};const R8=Mp,IS=Object.freeze({OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"}),ho={};function L8(){this.credits=[]}function Fp(){this.baseColorTexture=void 0,this.metallicRoughnessTexture=void 0,this.baseColorFactor=de.clone(Fp.DEFAULT_BASE_COLOR_FACTOR),this.metallicFactor=Fp.DEFAULT_METALLIC_FACTOR,this.roughnessFactor=Fp.DEFAULT_ROUGHNESS_FACTOR}function M_(){this.diffuseTexture=void 0,this.specularGlossinessTexture=void 0,this.diffuseFactor=de.clone(M_.DEFAULT_DIFFUSE_FACTOR),this.specularFactor=f.clone(M_.DEFAULT_SPECULAR_FACTOR),this.glossinessFactor=M_.DEFAULT_GLOSSINESS_FACTOR}function PA(){this.specularFactor=PA.DEFAULT_SPECULAR_FACTOR,this.specularTexture=void 0,this.specularColorFactor=f.clone(PA.DEFAULT_SPECULAR_COLOR_FACTOR),this.specularColorTexture=void 0}function OA(){this.anisotropyStrength=OA.DEFAULT_ANISOTROPY_STRENGTH,this.anisotropyRotation=OA.DEFAULT_ANISOTROPY_ROTATION,this.anisotropyTexture=void 0}function RA(){this.clearcoatFactor=RA.DEFAULT_CLEARCOAT_FACTOR,this.clearcoatTexture=void 0,this.clearcoatRoughnessFactor=RA.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,this.clearcoatRoughnessTexture=void 0,this.clearcoatNormalTexture=void 0}function GR(){this.metallicRoughness=new Fp,this.specularGlossiness=void 0,this.specular=void 0,this.anisotropy=void 0,this.clearcoat=void 0,this.emissiveTexture=void 0,this.normalTexture=void 0,this.occlusionTexture=void 0,this.emissiveFactor=f.clone(GR.DEFAULT_EMISSIVE_FACTOR),this.alphaMode=IS.OPAQUE,this.alphaCutoff=.5,this.doubleSided=!1,this.unlit=!1}Fp.DEFAULT_BASE_COLOR_FACTOR=de.ONE,Fp.DEFAULT_METALLIC_FACTOR=1,Fp.DEFAULT_ROUGHNESS_FACTOR=1,M_.DEFAULT_DIFFUSE_FACTOR=de.ONE,M_.DEFAULT_SPECULAR_FACTOR=f.ONE,M_.DEFAULT_GLOSSINESS_FACTOR=1,PA.DEFAULT_SPECULAR_FACTOR=1,PA.DEFAULT_SPECULAR_COLOR_FACTOR=f.ONE,OA.DEFAULT_ANISOTROPY_STRENGTH=0,OA.DEFAULT_ANISOTROPY_ROTATION=0,RA.DEFAULT_CLEARCOAT_FACTOR=0,RA.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR=0,GR.DEFAULT_EMISSIVE_FACTOR=f.ZERO,ho.Quantization=function Qme(){this.octEncoded=!1,this.octEncodedZXY=!1,this.normalizationRange=void 0,this.quantizedVolumeOffset=void 0,this.quantizedVolumeDimensions=void 0,this.quantizedVolumeStepSize=void 0,this.componentDatatype=void 0,this.type=void 0},ho.Attribute=function Jme(){this.name=void 0,this.semantic=void 0,this.setIndex=void 0,this.componentDatatype=void 0,this.type=void 0,this.normalized=!1,this.count=void 0,this.min=void 0,this.max=void 0,this.constant=void 0,this.quantization=void 0,this.typedArray=void 0,this.buffer=void 0,this.byteOffset=0,this.byteStride=void 0},ho.Indices=function e_e(){this.indexDatatype=void 0,this.count=void 0,this.buffer=void 0,this.typedArray=void 0},ho.FeatureIdAttribute=function t_e(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.setIndex=void 0,this.label=void 0,this.positionalLabel=void 0},ho.FeatureIdTexture=function i_e(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.textureReader=void 0,this.label=void 0,this.positionalLabel=void 0},ho.FeatureIdImplicitRange=function n_e(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.offset=0,this.repeat=void 0,this.label=void 0,this.positionalLabel=void 0},ho.MorphTarget=function o_e(){this.attributes=[]},ho.Primitive=function r_e(){this.attributes=[],this.morphTargets=[],this.indices=void 0,this.material=void 0,this.primitiveType=void 0,this.featureIds=[],this.propertyTextureIds=[],this.propertyAttributeIds=[],this.outlineCoordinates=void 0},ho.Instances=function s_e(){this.attributes=[],this.featureIds=[],this.transformInWorldSpace=!1},ho.Skin=function a_e(){this.index=void 0,this.joints=[],this.inverseBindMatrices=[]},ho.Node=function c_e(){this.name=void 0,this.index=void 0,this.children=[],this.primitives=[],this.instances=void 0,this.skin=void 0,this.matrix=void 0,this.translation=void 0,this.rotation=void 0,this.scale=void 0,this.morphWeights=[],this.articulationName=void 0},ho.Scene=function l_e(){this.nodes=[]},ho.AnimatedPropertyType=Object.freeze({TRANSLATION:"translation",ROTATION:"rotation",SCALE:"scale",WEIGHTS:"weights"}),ho.AnimationSampler=function d_e(){this.input=[],this.interpolation=void 0,this.output=[]},ho.AnimationTarget=function f_e(){this.node=void 0,this.path=void 0},ho.AnimationChannel=function h_e(){this.sampler=void 0,this.target=void 0},ho.Animation=function p_e(){this.name=void 0,this.samplers=[],this.channels=[]},ho.ArticulationStage=function m_e(){this.name=void 0,this.type=void 0,this.minimumValue=void 0,this.maximumValue=void 0,this.initialValue=void 0},ho.Articulation=function __e(){this.name=void 0,this.stages=[]},ho.Asset=L8,ho.Components=function g_e(){this.asset=new L8,this.scene=void 0,this.nodes=[],this.skins=[],this.animations=[],this.articulations=[],this.structuralMetadata=void 0,this.upAxis=void 0,this.forwardAxis=void 0,this.transform=k.clone(k.IDENTITY)},ho.TextureReader=function y_e(){this.texture=void 0,this.index=void 0,this.texCoord=0,this.transform=oe.clone(oe.IDENTITY),this.scale=1,this.channels=void 0},ho.MetallicRoughness=Fp,ho.SpecularGlossiness=M_,ho.Specular=PA,ho.Anisotropy=OA,ho.Clearcoat=RA,ho.Material=GR;const li=ho,DS={getImageIdFromTexture:function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,textureId:n,supportedImageFormats:i}=e;A.typeOf.object("options.gltf",t),A.typeOf.number("options.textureId",n),A.typeOf.object("options.supportedImageFormats",i);const o=t.textures[n],r=o.extensions;if(c(r)){if(i.webp&&c(r.EXT_texture_webp))return r.EXT_texture_webp.source;if(i.basis&&c(r.KHR_texture_basisu))return r.KHR_texture_basisu.source}return o.source},createSampler:function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,textureInfo:n,compressedTextureNoMipmap:i=!1}=e;A.typeOf.object("options.gltf",t),A.typeOf.object("options.textureInfo",n);let o=zi.REPEAT,r=zi.REPEAT,s=Kn.LINEAR,a=Jr.LINEAR;const d=t.textures[n.index].sampler;if(c(d)){const h=t.samplers[d];o=g(h.wrapS,o),r=g(h.wrapT,r),s=g(h.minFilter,s),a=g(h.magFilter,a)}return i&&s!==Kn.LINEAR&&s!==Kn.NEAREST&&(s=s===Kn.NEAREST_MIPMAP_NEAREST||s===Kn.NEAREST_MIPMAP_LINEAR?Kn.NEAREST:Kn.LINEAR),new vi({wrapS:o,wrapT:r,minificationFilter:s,magnificationFilter:a})}},b_e=new V(1,1);DS.createModelTextureReader=function(e){e=g(e,g.EMPTY_OBJECT);const{textureInfo:t,channels:n,texture:i}=e;A.typeOf.object("options.textureInfo",t);let r,o=g(t.texCoord,0);const s=t.extensions?.KHR_texture_transform;if(c(s)){o=g(s.texCoord,o);const l=c(s.offset)?V.unpack(s.offset):V.ZERO;let u=g(s.rotation,0);const d=c(s.scale)?V.unpack(s.scale):b_e;u=-u,r=new oe(Math.cos(u)*d.x,-Math.sin(u)*d.y,l.x,Math.sin(u)*d.x,Math.cos(u)*d.y,l.y,0,0,1)}const a=new li.TextureReader;return a.index=t.index,a.texture=i,a.texCoord=o,a.scale=t.scale,a.transform=r,a.channels=n,a};const F_=DS,jR=function T_e(e){const t=document.createElement("canvas");return t.width=O.nextPowerOfTwo(e.width),t.height=O.nextPowerOfTwo(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),t};function Bp(e){const t=(e=g(e,g.EMPTY_OBJECT)).resourceCache,n=e.gltf,i=e.textureInfo,o=e.gltfResource,r=e.baseResource,s=e.supportedImageFormats,a=e.cacheKey,l=g(e.asynchronous,!0);A.typeOf.func("options.resourceCache",t),A.typeOf.object("options.gltf",n),A.typeOf.object("options.textureInfo",i),A.typeOf.object("options.gltfResource",o),A.typeOf.object("options.baseResource",r),A.typeOf.object("options.supportedImageFormats",s);const d=F_.getImageIdFromTexture({gltf:n,textureId:i.index,supportedImageFormats:s});this._resourceCache=t,this._gltf=n,this._textureInfo=i,this._imageId=d,this._gltfResource=o,this._baseResource=r,this._cacheKey=a,this._asynchronous=l,this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._state=rn.UNLOADED,this._promise=void 0}c(Object.create)&&((Bp.prototype=Object.create(Ja.prototype)).constructor=Bp),Object.defineProperties(Bp.prototype,{cacheKey:{get:function(){return this._cacheKey}},texture:{get:function(){return this._texture}}});const A_e=new qR;function WR(){return(WR=(0,we.Z)(function*(e){const t=e._resourceCache;try{const n=t.getImageLoader({gltf:e._gltf,imageId:e._imageId,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._imageLoader=n,yield n.load(),e.isDestroyed()?void 0:(e._image=n.image,e._mipLevels=n.mipLevels,e._state=rn.LOADED,e)}catch(n){if(e.isDestroyed())return;throw e.unload(),e._state=rn.FAILED,e.getError("Failed to load texture",n)}})).apply(this,arguments)}function qR(){this.gltf=void 0,this.textureInfo=void 0,this.image=void 0,this.context=void 0,this.texture=void 0}function N8(e,t,n,i,o){const r=n.internalFormat;let s=!1;Ct.isCompressedFormat(r)&&!c(i)&&(s=!0);const a=F_.createSampler({gltf:e,textureInfo:t,compressedTextureNoMipmap:s}),l=a.minificationFilter,u=a.wrapS,d=a.wrapT,h=l===Kn.NEAREST_MIPMAP_NEAREST||l===Kn.NEAREST_MIPMAP_LINEAR||l===Kn.LINEAR_MIPMAP_NEAREST||l===Kn.LINEAR_MIPMAP_LINEAR,m=!c(r)&&h,_=m||u===zi.REPEAT||u===zi.MIRRORED_REPEAT||d===zi.REPEAT||d===zi.MIRRORED_REPEAT,p=!O.isPowerOfTwo(n.width)||!O.isPowerOfTwo(n.height),y=_&&p;let b;return c(r)?(!o.webgl2&&Ct.isCompressedFormat(r)&&p&&_&&console.warn("Compressed texture uses REPEAT or MIRRORED_REPEAT texture wrap mode and dimensions are not powers of two. The texture may be rendered incorrectly."),b=Mn.create({context:o,source:{arrayBufferView:n.bufferView,mipLevels:i},width:n.width,height:n.height,pixelFormat:n.internalFormat,sampler:a})):(y&&(n=jR(n)),b=Mn.create({context:o,source:n,sampler:a,flipY:!1,skipColorSpaceConversion:!0})),m&&b.generateMipmap(),b}Bp.prototype.load=(0,we.Z)(function*(){return c(this._promise)||(this._state=rn.LOADING,this._promise=function x_e(e){return WR.apply(this,arguments)}(this)),this._promise}),qR.prototype.set=function(e,t,n,i,o){this.gltf=e,this.textureInfo=t,this.image=n,this.mipLevels=i,this.context=o},qR.prototype.execute=function(){this.texture=N8(this.gltf,this.textureInfo,this.image,this.mipLevels,this.context)},Bp.prototype.process=function(e){if(A.typeOf.object("frameState",e),this._state===rn.READY)return!0;if(this._state!==rn.LOADED&&this._state!==rn.PROCESSING||c(this._texture)||!c(this._image))return!1;let t;if(this._state=rn.PROCESSING,this._asynchronous){const n=A_e;if(n.set(this._gltf,this._textureInfo,this._image,this._mipLevels,e.context),!e.jobScheduler.execute(n,Uu.TEXTURE))return;t=n.texture}else t=N8(this._gltf,this._textureInfo,this._image,this._mipLevels,e.context);return this.unload(),this._texture=t,this._state=rn.READY,this._resourceCache.statistics.addTextureLoader(this),!0},Bp.prototype.unload=function(){c(this._texture)&&this._texture.destroy(),c(this._imageLoader)&&!this._imageLoader.isDestroyed()&&this._resourceCache.unload(this._imageLoader),this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._gltf=void 0};const M8=Bp;function kp(e){const t=(e=g(e,g.EMPTY_OBJECT)).resourceCache,n=e.gltf,i=e.gltfResource,o=e.baseResource,r=e.bufferViewId,s=e.draco,a=e.attributeSemantic,l=e.accessorId,u=e.cacheKey,d=g(e.asynchronous,!0),h=g(e.loadBuffer,!1),m=g(e.loadTypedArray,!1);if(A.typeOf.func("options.resourceCache",t),A.typeOf.object("options.gltf",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o),!h&&!m)throw new E("At least one of loadBuffer and loadTypedArray must be true.");const _=c(r),p=F8(s,a),y=c(a),b=c(l);if(_===p)throw new E("One of options.bufferViewId and options.draco must be defined.");if(p&&!y)throw new E("When options.draco is defined options.attributeSemantic must also be defined.");if(p&&!b)throw new E("When options.draco is defined options.accessorId must also be defined.");p&&(A.typeOf.object("options.draco",s),A.typeOf.string("options.attributeSemantic",a),A.typeOf.number("options.accessorId",l)),this._resourceCache=t,this._gltfResource=i,this._baseResource=o,this._gltf=n,this._bufferViewId=r,this._draco=s,this._attributeSemantic=a,this._accessorId=l,this._cacheKey=u,this._asynchronous=d,this._loadBuffer=h,this._loadTypedArray=m,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._quantization=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=rn.UNLOADED,this._promise=void 0}function F8(e,t){return c(e)&&c(e.attributes)&&c(e.attributes[t])}function YR(){return(YR=(0,we.Z)(function*(e){e._state=rn.LOADING;const t=e._resourceCache;try{const n=t.getDracoLoader({gltf:e._gltf,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,yield n.load(),e.isDestroyed()?void 0:(e._state=rn.LOADED,e)}catch{if(e.isDestroyed())return;ZR(e)}})).apply(this,arguments)}function XR(){return(XR=(0,we.Z)(function*(e){e._state=rn.LOADING;const t=e._resourceCache;try{const n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,yield n.load(),e.isDestroyed()?void 0:(e._typedArray=n.typedArray,e._state=rn.PROCESSING,e)}catch(n){if(e.isDestroyed())return;ZR(e,n)}})).apply(this,arguments)}function ZR(e,t){throw e.unload(),e._state=rn.FAILED,e.getError("Failed to load vertex buffer",t)}function $R(){this.typedArray=void 0,this.context=void 0,this.buffer=void 0}function B8(e,t){const n=yn.createVertexBuffer({typedArray:e,context:t,usage:At.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}c(Object.create)&&((kp.prototype=Object.create(Ja.prototype)).constructor=kp),Object.defineProperties(kp.prototype,{cacheKey:{get:function(){return this._cacheKey}},buffer:{get:function(){return this._buffer}},typedArray:{get:function(){return this._typedArray}},quantization:{get:function(){return this._quantization}}}),kp.prototype.load=(0,we.Z)(function*(){return c(this._promise)?this._promise:F8(this._draco,this._attributeSemantic)?(this._promise=function E_e(e){return YR.apply(this,arguments)}(this),this._promise):(this._promise=function S_e(e){return XR.apply(this,arguments)}(this),this._promise)}),$R.prototype.set=function(e,t){this.typedArray=e,this.context=t},$R.prototype.execute=function(){this.buffer=B8(this.typedArray,this.context)};const v_e=new $R;kp.prototype.process=function(e){if(A.typeOf.object("frameState",e),this._state===rn.READY)return!0;if(this._state!==rn.LOADED&&this._state!==rn.PROCESSING)return!1;if(c(this._dracoLoader)){try{if(!this._dracoLoader.process(e))return!1}catch(i){ZR(this,i)}!function w_e(e){e._state=rn.PROCESSING;const o=e._dracoLoader.decodedData.vertexAttributes[e._attributeSemantic],a=e._gltf.accessors[e._accessorId].type,l=o.array,u=o.data.quantization;c(u)&&(e._quantization=function C_e(e,t,n,i){const r=(1<<e.quantizationBits)-1,s=1/r,a=new li.Quantization;if(a.componentDatatype=t,a.octEncoded=e.octEncoded,a.octEncodedZXY=!0,a.type=i,a.octEncoded)a.type=Wn.VEC2,a.normalizationRange=r;else{const l=Wn.getMathType(i);if(l===Number){const u=e.range;a.quantizedVolumeOffset=e.minValues[0],a.quantizedVolumeDimensions=u,a.normalizationRange=r,a.quantizedVolumeStepSize=u*s}else{a.quantizedVolumeOffset=l.unpack(e.minValues),a.normalizationRange=l.unpack(new Array(n).fill(r));const u=new Array(n).fill(e.range);a.quantizedVolumeDimensions=l.unpack(u);const d=u.map(function(h){return h*s});a.quantizedVolumeStepSize=l.unpack(d)}}return a}(u,o.data.componentDatatype,o.data.componentsPerAttribute,a)),e._typedArray=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)}(this)}let t;const n=this._typedArray;if(this._loadBuffer&&this._asynchronous){const i=v_e;if(i.set(n,e.context),!e.jobScheduler.execute(i,Uu.BUFFER))return!1;t=i.buffer}else this._loadBuffer&&(t=B8(n,e.context));return this.unload(),this._buffer=t,this._typedArray=this._loadTypedArray?n:void 0,this._state=rn.READY,this._resourceCache.statistics.addGeometryLoader(this),!0},kp.prototype.unload=function(){c(this._buffer)&&this._buffer.destroy();const e=this._resourceCache;c(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&e.unload(this._bufferViewLoader),c(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};const k8=kp;function LA(e){const t=(e=g(e,g.EMPTY_OBJECT)).id;A.typeOf.string("options.id",t);const n=g(e.properties,{}),i={};for(const o in n)if(n.hasOwnProperty(o)){const r=n[o];c(r.semantic)&&(i[r.semantic]=r)}this._id=t,this._name=e.name,this._description=e.description,this._properties=n,this._propertiesBySemantic=i,this._extras=Rt(e.extras,!0),this._extensions=Rt(e.extensions,!0)}LA.fromJson=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).id,n=e.class;A.typeOf.string("options.id",t),A.typeOf.object("options.class",n);const i={};for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const r=hR.fromJson({id:o,property:n.properties[o],enums:e.enums});i[o]=r}return new LA({id:t,name:n.name,description:n.description,properties:i,extras:n.extras,extensions:n.extensions})},Object.defineProperties(LA.prototype,{properties:{get:function(){return this._properties}},propertiesBySemantic:{get:function(){return this._propertiesBySemantic}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),LA.BATCH_TABLE_CLASS_NAME="_batchTable";const PS=LA;function OS(e){const t=(e=g(e,g.EMPTY_OBJECT)).value,n=e.name;A.typeOf.number("options.value",t),A.typeOf.string("options.name",n),this._value=t,this._name=n,this._description=e.description,this._extras=Rt(e.extras,!0),this._extensions=Rt(e.extensions,!0)}OS.fromJson=function(e){return A.typeOf.object("value",e),new OS({value:e.value,name:e.name,description:e.description,extras:e.extras,extensions:e.extensions})},Object.defineProperties(OS.prototype,{value:{get:function(){return this._value}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});const I_e=OS;function RS(e){const t=(e=g(e,g.EMPTY_OBJECT)).id,n=e.values;A.typeOf.string("options.id",t),A.defined("options.values",n);const i={},o={},r=n.length;for(let a=0;a<r;++a){const l=n[a];i[l.value]=l.name,o[l.name]=l.value}const s=g(e.valueType,vn.UINT16);this._values=n,this._namesByValue=i,this._valuesByName=o,this._valueType=s,this._id=t,this._name=e.name,this._description=e.description,this._extras=Rt(e.extras,!0),this._extensions=Rt(e.extensions,!0)}RS.fromJson=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).id,n=e.enum;return A.typeOf.string("options.id",t),A.typeOf.object("options.enum",n),new RS({id:t,values:n.values.map(function(o){return I_e.fromJson(o)}),valueType:vn[n.valueType],name:n.name,description:n.description,extras:n.extras,extensions:n.extensions})},Object.defineProperties(RS.prototype,{values:{get:function(){return this._values}},namesByValue:{get:function(){return this._namesByValue}},valuesByName:{get:function(){return this._valuesByName}},valueType:{get:function(){return this._valueType}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});const D_e=RS;function LS(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.classes,{}),n=g(e.enums,{});this._classes=t,this._enums=n,this._id=e.id,this._name=e.name,this._description=e.description,this._version=e.version,this._extras=Rt(e.extras,!0),this._extensions=Rt(e.extensions,!0)}LS.fromJson=function(e){A.typeOf.object("schema",e);const t={};if(c(e.enums))for(const i in e.enums)e.enums.hasOwnProperty(i)&&(t[i]=D_e.fromJson({id:i,enum:e.enums[i]}));const n={};if(c(e.classes))for(const i in e.classes)e.classes.hasOwnProperty(i)&&(n[i]=PS.fromJson({id:i,class:e.classes[i],enums:t}));return new LS({id:e.id,name:e.name,description:e.description,version:e.version,classes:n,enums:t,extras:e.extras,extensions:e.extensions})},Object.defineProperties(LS.prototype,{classes:{get:function(){return this._classes}},enums:{get:function(){return this._enums}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},version:{get:function(){return this._version}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});const NA=LS;function B_(e){const t=(e=g(e,g.EMPTY_OBJECT)).schema,n=e.resource,i=e.cacheKey;if(c(t)===c(n))throw new E("One of options.schema and options.resource must be defined.");this._schema=c(t)?NA.fromJson(t):void 0,this._resource=n,this._cacheKey=i,this._state=rn.UNLOADED,this._promise=void 0}function KR(){return(KR=(0,we.Z)(function*(e){const t=e._resource;e._state=rn.LOADING;try{const n=yield t.fetchJson();return e.isDestroyed()?void 0:(e._schema=NA.fromJson(n),e._state=rn.READY,e)}catch(n){if(e.isDestroyed())return;throw e._state=rn.FAILED,e.getError(`Failed to load schema: ${t.url}`,n)}})).apply(this,arguments)}c(Object.create)&&((B_.prototype=Object.create(Ja.prototype)).constructor=B_),Object.defineProperties(B_.prototype,{cacheKey:{get:function(){return this._cacheKey}},schema:{get:function(){return this._schema}}}),B_.prototype.load=(0,we.Z)(function*(){return c(this._promise)?this._promise:c(this._schema)?(this._promise=Promise.resolve(this),this._promise):(this._promise=function P_e(e){return KR.apply(this,arguments)}(this),this._promise)}),B_.prototype.unload=function(){this._schema=void 0};const U8=B_,Vu={};function p0(e){return l_(e.url)}function NS(e){let{byteOffset:t,byteLength:n}=e;if(vr(e,"EXT_meshopt_compression")){const i=e.extensions.EXT_meshopt_compression;t=g(i.byteOffset,0),n=i.byteLength}return`${t}-${t+n}`}function z8(e,t){return`${p0(e)}-buffer-id-${t}`}function MA(e,t,n,i){return c(e.uri)?p0(i.getDerivedResource({url:e.uri})):z8(n,t)}function QR(e,t,n,i){const r=e.bufferViews[t.bufferView],s=r.buffer;return`${MA(e.buffers[s],s,n,i)}-range-${NS(r)}`}function V8(e,t,n,i){const o=e.images[t],r=o.bufferView,s=o.uri;if(c(s))return p0(i.getDerivedResource({url:s}));const a=e.bufferViews[r],l=a.buffer;return`${MA(e.buffers[l],l,n,i)}-range-${NS(a)}`}Vu.getSchemaCacheKey=function(e){const{schema:t,resource:n}=e;if(c(t)===c(n))throw new E("One of options.schema and options.resource must be defined.");return c(t)?`embedded-schema:${JSON.stringify(t)}`:`external-schema:${p0(n)}`},Vu.getExternalBufferCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);const{resource:t}=e;return A.typeOf.object("options.resource",t),`external-buffer:${p0(t)}`},Vu.getEmbeddedBufferCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);const{parentResource:t,bufferId:n}=e;return A.typeOf.object("options.parentResource",t),A.typeOf.number("options.bufferId",n),`embedded-buffer:${z8(t,n)}`},Vu.getGltfCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);const{gltfResource:t}=e;return A.typeOf.object("options.gltfResource",t),`gltf:${p0(t)}`},Vu.getBufferViewCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}=e;A.typeOf.object("options.gltf",t),A.typeOf.number("options.bufferViewId",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o);const r=t.bufferViews[n];let s=r.buffer;const a=t.buffers[s];return vr(r,"EXT_meshopt_compression")&&(s=r.extensions.EXT_meshopt_compression.buffer),`buffer-view:${MA(a,s,i,o)}-range-${NS(r)}`},Vu.getDracoCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,draco:n,gltfResource:i,baseResource:o}=e;return A.typeOf.object("options.gltf",t),A.typeOf.object("options.draco",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o),`draco:${QR(t,n,i,o)}`},Vu.getVertexBufferCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:s,attributeSemantic:a,dequantize:l=!1,loadBuffer:u=!1,loadTypedArray:d=!1}=e;A.typeOf.object("options.gltf",t),A.typeOf.object("options.gltfResource",n),A.typeOf.object("options.baseResource",i),A.typeOf.object("options.frameState",o);const h=c(r),m=function L_e(e,t){return c(e)&&c(e.attributes)&&c(e.attributes[t])}(s,a),_=c(a);if(h===m)throw new E("One of options.bufferViewId and options.draco must be defined.");if(m&&!_)throw new E("When options.draco is defined options.attributeSemantic must also be defined.");if(m&&(A.typeOf.object("options.draco",s),A.typeOf.string("options.attributeSemantic",a)),!u&&!d)throw new E("At least one of loadBuffer and loadTypedArray must be true.");let p="";if(l&&(p+="-dequantize"),u&&(p+="-buffer",p+=`-context-${o.context.id}`),d&&(p+="-typed-array"),c(s))return`vertex-buffer:${QR(t,s,n,i)}-draco-${a}${p}`;const y=t.bufferViews[r],b=y.buffer;return`vertex-buffer:${MA(t.buffers[b],b,n,i)}-range-${NS(y)}${p}`},Vu.getIndexBufferCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:s,loadBuffer:a=!1,loadTypedArray:l=!1}=e;if(A.typeOf.object("options.gltf",t),A.typeOf.number("options.accessorId",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o),A.typeOf.object("options.frameState",r),!a&&!l)throw new E("At least one of loadBuffer and loadTypedArray must be true.");let u="";if(a&&(u+="-buffer",u+=`-context-${r.context.id}`),l&&(u+="-typed-array"),c(s))return`index-buffer:${QR(t,s,i,o)}-draco${u}`;const d=t.accessors[n],m=t.bufferViews[d.bufferView],_=m.buffer,y=MA(t.buffers[_],_,i,o),b=function O_e(e,t){const n=t.byteOffset+e.byteOffset,{componentType:i,type:o,count:r}=e;return`${n}-${i}-${o}-${r}`}(d,m);return`index-buffer:${y}-accessor-${b}${u}`},Vu.getImageCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,imageId:n,gltfResource:i,baseResource:o}=e;return A.typeOf.object("options.gltf",t),A.typeOf.number("options.imageId",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o),`image:${V8(t,n,i,o)}`},Vu.getTextureCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s}=e;A.typeOf.object("options.gltf",t),A.typeOf.object("options.textureInfo",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o),A.typeOf.object("options.supportedImageFormats",r),A.typeOf.object("options.frameState",s);const u=V8(t,F_.getImageIdFromTexture({gltf:t,textureId:n.index,supportedImageFormats:r}),i,o),d=function R_e(e,t){const n=F_.createSampler({gltf:e,textureInfo:t});return`${n.wrapS}-${n.wrapT}-${n.minificationFilter}-${n.magnificationFilter}`}(t,n);return`texture:${u}-sampler-${d}-context-${s.context.id}`};const Zd=Vu;function FA(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}}FA.prototype.clear=function(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}},FA.prototype.addGeometryLoader=function(e){A.typeOf.object("loader",e);const t=e.cacheKey;if(this._geometrySizes.hasOwnProperty(t))return;this._geometrySizes[t]=0;const n=e.buffer,i=e.typedArray;let o=0;c(n)&&(o+=n.sizeInBytes),c(i)&&(o+=i.byteLength),this.geometryByteLength+=o,this._geometrySizes[t]=o},FA.prototype.addTextureLoader=function(e){A.typeOf.object("loader",e);const t=e.cacheKey;if(this._textureSizes.hasOwnProperty(t))return;this._textureSizes[t]=0;const n=e.texture.sizeInBytes;this.texturesByteLength+=e.texture.sizeInBytes,this._textureSizes[t]=n},FA.prototype.removeLoader=function(e){A.typeOf.object("loader",e);const t=e.cacheKey,n=this._geometrySizes[t];delete this._geometrySizes[t],c(n)&&(this.geometryByteLength-=n);const i=this._textureSizes[t];delete this._textureSizes[t],c(i)&&(this.texturesByteLength-=i)};const N_e=FA;function Un(){}function M_e(e){this.referenceCount=1,this.resourceLoader=e,this._statisticsPromise=void 0}Un.cacheEntries={},Un.statistics=new N_e,Un.get=function(e){A.typeOf.string("cacheKey",e);const t=Un.cacheEntries[e];if(c(t))return++t.referenceCount,t.resourceLoader},Un.add=function(e){A.typeOf.object("resourceLoader",e);const t=e.cacheKey;if(A.typeOf.string("options.resourceLoader.cacheKey",t),c(Un.cacheEntries[t]))throw new E(`Resource with this cacheKey is already in the cache: ${t}`);return Un.cacheEntries[t]=new M_e(e),e},Un.unload=function(e){A.typeOf.object("resourceLoader",e);const t=e.cacheKey,n=Un.cacheEntries[t];if(!c(n))throw new E(`Resource is not in the cache: ${t}`);--n.referenceCount,0===n.referenceCount&&(Un.statistics.removeLoader(e),e.destroy(),delete Un.cacheEntries[t])},Un.getSchemaLoader=function(e){e=g(e,g.EMPTY_OBJECT);const{schema:t,resource:n}=e;if(c(t)===c(n))throw new E("One of options.schema and options.resource must be defined.");const i=Zd.getSchemaCacheKey({schema:t,resource:n});let o=Un.get(i);return c(o)?o:(o=new U8({schema:t,resource:n,cacheKey:i}),Un.add(o))},Un.getEmbeddedBufferLoader=function(e){e=g(e,g.EMPTY_OBJECT);const{parentResource:t,bufferId:n,typedArray:i}=e;A.typeOf.object("options.parentResource",t),A.typeOf.number("options.bufferId",n);const o=Zd.getEmbeddedBufferCacheKey({parentResource:t,bufferId:n});let r=Un.get(o);return c(r)?r:(A.typeOf.object("options.typedArray",i),r=new _R({typedArray:i,cacheKey:o}),Un.add(r))},Un.getExternalBufferLoader=function(e){e=g(e,g.EMPTY_OBJECT);const{resource:t}=e;A.typeOf.object("options.resource",t);const n=Zd.getExternalBufferCacheKey({resource:t});let i=Un.get(n);return c(i)?i:(i=new _R({resource:t,cacheKey:n}),Un.add(i))},Un.getGltfJsonLoader=function(e){e=g(e,g.EMPTY_OBJECT);const{gltfResource:t,baseResource:n,typedArray:i,gltfJson:o}=e;A.typeOf.object("options.gltfResource",t),A.typeOf.object("options.baseResource",n);const r=Zd.getGltfCacheKey({gltfResource:t});let s=Un.get(r);return c(s)?s:(s=new R8({resourceCache:Un,gltfResource:t,baseResource:n,typedArray:i,gltfJson:o,cacheKey:r}),Un.add(s))},Un.getBufferViewLoader=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}=e;A.typeOf.object("options.gltf",t),A.typeOf.number("options.bufferViewId",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o);const r=Zd.getBufferViewCacheKey({gltf:t,bufferViewId:n,gltfResource:i,baseResource:o});let s=Un.get(r);return c(s)?s:(s=new u8({resourceCache:Un,gltf:t,bufferViewId:n,gltfResource:i,baseResource:o,cacheKey:r}),Un.add(s))},Un.getDracoLoader=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,draco:n,gltfResource:i,baseResource:o}=e;A.typeOf.object("options.gltf",t),A.typeOf.object("options.draco",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o);const r=Zd.getDracoCacheKey({gltf:t,draco:n,gltfResource:i,baseResource:o});let s=Un.get(r);return c(s)?s:(s=new f8({resourceCache:Un,gltf:t,draco:n,gltfResource:i,baseResource:o,cacheKey:r}),Un.add(s))},Un.getVertexBufferLoader=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:s,attributeSemantic:a,accessorId:l,asynchronous:u=!0,dequantize:d=!1,loadBuffer:h=!1,loadTypedArray:m=!1}=e;if(A.typeOf.object("options.gltf",t),A.typeOf.object("options.gltfResource",n),A.typeOf.object("options.baseResource",i),A.typeOf.object("options.frameState",o),!h&&!m)throw new E("At least one of loadBuffer and loadTypedArray must be true.");const _=c(r),p=function F_e(e,t){return c(e)&&c(e.attributes)&&c(e.attributes[t])}(s,a),y=c(a),b=c(l);if(_===p)throw new E("One of options.bufferViewId and options.draco must be defined.");if(p&&!y)throw new E("When options.draco is defined options.attributeSemantic must also be defined.");if(p&&!b)throw new E("When options.draco is defined options.haAccessorId must also be defined.");p&&(A.typeOf.object("options.draco",s),A.typeOf.string("options.attributeSemantic",a),A.typeOf.number("options.accessorId",l));const x=Zd.getVertexBufferCacheKey({gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:s,attributeSemantic:a,dequantize:d,loadBuffer:h,loadTypedArray:m});let C=Un.get(x);return c(C)?C:(C=new k8({resourceCache:Un,gltf:t,gltfResource:n,baseResource:i,bufferViewId:r,draco:s,attributeSemantic:a,accessorId:l,cacheKey:x,asynchronous:u,dequantize:d,loadBuffer:h,loadTypedArray:m}),Un.add(C))},Un.getIndexBufferLoader=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:s,asynchronous:a=!0,loadBuffer:l=!1,loadTypedArray:u=!1}=e;if(A.typeOf.object("options.gltf",t),A.typeOf.number("options.accessorId",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o),A.typeOf.object("options.frameState",r),!l&&!u)throw new E("At least one of loadBuffer and loadTypedArray must be true.");const d=Zd.getIndexBufferCacheKey({gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:s,loadBuffer:l,loadTypedArray:u});let h=Un.get(d);return c(h)?h:(h=new g8({resourceCache:Un,gltf:t,accessorId:n,gltfResource:i,baseResource:o,draco:s,cacheKey:d,asynchronous:a,loadBuffer:l,loadTypedArray:u}),Un.add(h))},Un.getImageLoader=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,imageId:n,gltfResource:i,baseResource:o}=e;A.typeOf.object("options.gltf",t),A.typeOf.number("options.imageId",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o);const r=Zd.getImageCacheKey({gltf:t,imageId:n,gltfResource:i,baseResource:o});let s=Un.get(r);return c(s)?s:(s=new m8({resourceCache:Un,gltf:t,imageId:n,gltfResource:i,baseResource:o,cacheKey:r}),Un.add(s))},Un.getTextureLoader=function(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s,asynchronous:a=!0}=e;A.typeOf.object("options.gltf",t),A.typeOf.object("options.textureInfo",n),A.typeOf.object("options.gltfResource",i),A.typeOf.object("options.baseResource",o),A.typeOf.object("options.supportedImageFormats",r),A.typeOf.object("options.frameState",s);const l=Zd.getTextureCacheKey({gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s});let u=Un.get(l);return c(u)?u:(u=new M8({resourceCache:Un,gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,cacheKey:l,asynchronous:a}),Un.add(u))},Un.clearForSpecs=function(){const e=[k8,g8,f8,M8,m8,u8,_R,U8,R8];let t;const n=Un.cacheEntries,i=[];for(t in n)n.hasOwnProperty(t)&&i.push(n[t]);i.sort(function(r,s){return e.indexOf(r.resourceLoader.constructor)-e.indexOf(s.resourceLoader.constructor)});const o=i.length;for(let r=0;r<o;++r){const s=i[r];t=s.resourceLoader.cacheKey,c(n[t])&&(s.resourceLoader.destroy(),delete n[t])}Un.statistics.clear()};const Ir=Un;function Bs(e,t,n){A.typeOf.object("resource",e),A.typeOf.object("implicitTileset",t),A.typeOf.object("implicitCoordinates",n),this._resource=e,this._subtreeJson=void 0,this._bufferLoader=void 0,this._tileAvailability=void 0,this._contentAvailabilityBitstreams=[],this._childSubtreeAvailability=void 0,this._implicitCoordinates=n,this._subtreeLevels=t.subtreeLevels,this._subdivisionScheme=t.subdivisionScheme,this._branchingFactor=t.branchingFactor,this._metadata=void 0,this._tileMetadataTable=void 0,this._tilePropertyTableJson=void 0,this._contentMetadataTables=[],this._contentPropertyTableJsons=[],this._tileJumpBuffer=void 0,this._contentJumpBuffers=[],this._ready=!1}function H8(e,t){const n=e.properties;let i;for(const o in n)if(n.hasOwnProperty(o)){const r=n[o];i=t[g(r.values,r.bufferView)],i.isActive=!0,i.bufferHeader.isActive=!0;const a=g(r.stringOffsets,r.stringOffsetBufferView);c(a)&&(i=t[a],i.isActive=!0,i.bufferHeader.isActive=!0);const l=g(r.arrayOffsets,r.arrayOffsetBufferView);c(l)&&(i=t[l],i.isActive=!0,i.bufferHeader.isActive=!0)}}function H_e(e,t){return JR.apply(this,arguments)}function JR(){return(JR=(0,we.Z)(function*(e,t){const i=e._resource.getDerivedResource({url:t.uri}),o=Ir.getExternalBufferLoader({resource:i});e._bufferLoader=o;try{yield o.load()}catch(r){if(o.isDestroyed())return;throw r}return o.typedArray})).apply(this,arguments)}function eL(e,t,n,i){if(c(e.constant))return new QH({constant:!!e.constant,lengthBits:n,availableCount:e.availableCount});let o;return c(e.bitstream)?o=t[e.bitstream]:c(e.bufferView)&&(o=t[e.bufferView]),new QH({bitstream:o,lengthBits:n,availableCount:e.availableCount,computeAvailableCountEnabled:i})}function G8(e){let t=0;const n=e.lengthBits,i=e.availableCount;let o;o=i<256?new Uint8Array(n):i<65536?new Uint16Array(n):new Uint32Array(n);for(let r=0;r<e.lengthBits;r++)e.getBit(r)&&(o[r]=t,t++);return o}Object.defineProperties(Bs.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}},tileMetadataTable:{get:function(){return this._tileMetadataTable}},tilePropertyTableJson:{get:function(){return this._tilePropertyTableJson}},contentMetadataTables:{get:function(){return this._contentMetadataTables}},contentPropertyTableJsons:{get:function(){return this._contentPropertyTableJsons}},implicitCoordinates:{get:function(){return this._implicitCoordinates}}}),Bs.prototype.tileIsAvailableAtIndex=function(e){return this._tileAvailability.getBit(e)},Bs.prototype.tileIsAvailableAtCoordinates=function(e){const t=this.getTileIndex(e);return this.tileIsAvailableAtIndex(t)},Bs.prototype.contentIsAvailableAtIndex=function(e,t){if((t=g(t,0))<0||t>=this._contentAvailabilityBitstreams.length)throw new E("contentIndex out of bounds.");return this._contentAvailabilityBitstreams[t].getBit(e)},Bs.prototype.contentIsAvailableAtCoordinates=function(e,t){const n=this.getTileIndex(e);return this.contentIsAvailableAtIndex(n,t)},Bs.prototype.childSubtreeIsAvailableAtIndex=function(e){return this._childSubtreeAvailability.getBit(e)},Bs.prototype.childSubtreeIsAvailableAtCoordinates=function(e){const t=this.getChildSubtreeIndex(e);return this.childSubtreeIsAvailableAtIndex(t)},Bs.prototype.getLevelOffset=function(e){const t=this._branchingFactor;return(Math.pow(t,e)-1)/(t-1)},Bs.prototype.getParentMortonIndex=function(e){let t=2;return this._subdivisionScheme===es.OCTREE&&(t=3),e>>t},Bs.fromSubtreeJson=function(){var e=(0,we.Z)(function*(t,n,i,o,r){if(A.typeOf.object("resource",t),c(n)===c(i))throw new E("One of json and subtreeView must be defined.");A.typeOf.object("implicitTileset",o),A.typeOf.object("implicitCoordinates",r);const s=new Bs(t,o,r);let a;a=c(n)?{json:n,binary:void 0}:function B_e(e){const n=new DataView(e.buffer,e.byteOffset);let i=8;const o=n.getUint32(i,!0);i+=8;const r=n.getUint32(i,!0);i+=8;const s=Cc(e,i,o);i+=o;return{json:s,binary:e.subarray(i,i+r)}}(i);const l=a.json;let u;s._subtreeJson=l,vr(l,"3DTILES_metadata")?u=l.extensions["3DTILES_metadata"]:c(l.tileMetadata)&&(u=l.propertyTables[l.tileMetadata]);const d=[];if(c(l.contentMetadata)){const w=l.contentMetadata.length;for(let v=0;v<w;v++)d.push(l.propertyTables[l.contentMetadata[v]])}let h;const m=o.metadataSchema,_=l.subtreeMetadata;c(_)&&(h=new Rhe({subtreeMetadata:_,class:m.classes[_.class]})),s._metadata=h,s._tilePropertyTableJson=u,s._contentPropertyTableJsons=d,l.contentAvailabilityHeaders=[],vr(l,"3DTILES_multiple_contents")?l.contentAvailabilityHeaders=l.extensions["3DTILES_multiple_contents"].contentAvailability:Array.isArray(l.contentAvailability)?l.contentAvailabilityHeaders=l.contentAvailability:l.contentAvailabilityHeaders.push(g(l.contentAvailability,{constant:0}));const y=function k_e(e){e=c(e)?e:[];for(let t=0;t<e.length;t++){const n=e[t];n.isExternal=c(n.uri),n.isActive=!1}return e}(l.buffers),b=function U_e(e,t){e=c(e)?e:[];for(let n=0;n<e.length;n++){const i=e[n];i.bufferHeader=t[i.buffer],i.isActive=!1}return e}(l.bufferViews,y);(function z_e(e,t){let n;const i=e.tileAvailability;c(i.bitstream)?n=t[i.bitstream]:c(i.bufferView)&&(n=t[i.bufferView]),c(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0);const o=e.contentAvailabilityHeaders;for(let s=0;s<o.length;s++)n=void 0,c(o[s].bitstream)?n=t[o[s].bitstream]:c(o[s].bufferView)&&(n=t[o[s].bufferView]),c(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0);n=void 0;const r=e.childSubtreeAvailability;c(r.bitstream)?n=t[r.bitstream]:c(r.bufferView)&&(n=t[r.bufferView]),c(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0)})(l,b),c(u)&&H8(u,b);for(let w=0;w<d.length;w++)H8(d[w],b);const x=yield function V_e(e,t,n){const i=[];for(let o=0;o<t.length;o++){const r=t[o];if(r.isActive)if(r.isExternal){const s=H_e(e,r);i.push(s)}else i.push(Promise.resolve(n));else i.push(Promise.resolve(void 0))}return Promise.all(i).then(function(o){const r={};for(let s=0;s<o.length;s++){const a=o[s];c(a)&&(r[s]=a)}return r})}(s,y,a.binary),C=function G_e(e,t){const n={};for(let i=0;i<e.length;i++){const o=e[i];if(!o.isActive)continue;const r=o.byteOffset,l=t[o.buffer].subarray(r,r+o.byteLength);n[i]=l}return n}(b,x);return function j_e(e,t,n,i){const o=n.branchingFactor,r=n.subtreeLevels,s=(Math.pow(o,r)-1)/(o-1),a=Math.pow(o,r),l=vr(t,"3DTILES_metadata"),u=c(e._tilePropertyTableJson);let d=l||u;e._tileAvailability=eL(t.tileAvailability,i,s,d);d=d||e._contentPropertyTableJsons.length>0;for(let m=0;m<t.contentAvailabilityHeaders.length;m++){const _=eL(t.contentAvailabilityHeaders[m],i,s,d);e._contentAvailabilityBitstreams.push(_)}e._childSubtreeAvailability=eL(t.childSubtreeAvailability,i,a)}(s,l,o,C),c(u)&&(function W_e(e,t,n){const i=e._tilePropertyTableJson;e._tileMetadataTable=new vA({class:t.metadataSchema.classes[i.class],count:e._tileAvailability.availableCount,properties:i.properties,bufferViews:n})}(s,o,C),function Y_e(e){const t=G8(e._tileAvailability);e._tileJumpBuffer=t}(s)),function q_e(e,t,n){const i=e._contentPropertyTableJsons,o=e._contentAvailabilityBitstreams,r=t.metadataSchema,s=e._contentMetadataTables;for(let a=0;a<i.length;a++){const l=i[a],_=new vA({class:r.classes[l.class],count:o[a].availableCount,properties:l.properties,bufferViews:n});s.push(_)}}(s,o,C),function X_e(e){const t=e._contentJumpBuffers,n=e._contentAvailabilityBitstreams;for(let i=0;i<n.length;i++){const r=G8(n[i]);t.push(r)}}(s),s._ready=!0,s});return function(t,n,i,o,r){return e.apply(this,arguments)}}(),Bs.prototype.getTileIndex=function(e){const t=e.level-this._implicitCoordinates.level;if(t<0||this._subtreeLevels<=t)throw new Pe("level is out of bounds for this subtree");return e.getSubtreeCoordinates().getOffsetCoordinates(e).tileIndex},Bs.prototype.getChildSubtreeIndex=function(e){if(e.level-this._implicitCoordinates.level!==this._implicitCoordinates.subtreeLevels)throw new Pe("level is out of bounds for this subtree");return e.getParentSubtreeCoordinates().getOffsetCoordinates(e).mortonIndex},Bs.prototype.getTileMetadataView=function(e){const t=function Z_e(e,t){if(!c(e._tileMetadataTable))return;const n=e.getTileIndex(t);return e._tileAvailability.getBit(n)?e._tileJumpBuffer[n]:void 0}(this,e);if(!c(t))return;const n=this._tileMetadataTable;return new JH({class:n.class,metadataTable:n,entityId:t,propertyTableJson:this._tilePropertyTableJson})},Bs.prototype.getContentMetadataView=function(e,t){const n=function $_e(e,t,n){const i=e._contentMetadataTables;if(!c(i))return;if(!c(i[n]))return;const r=e._contentAvailabilityBitstreams[n],s=e.getTileIndex(t);return r.getBit(s)?e._contentJumpBuffers[n][s]:void 0}(this,e,t);if(!c(n))return;const i=this._contentMetadataTables[t];return new JH({class:i.class,metadataTable:i,entityId:n,contentIndex:t,propertyTableJson:this._contentPropertyTableJsons[t]})},Bs.prototype.isDestroyed=function(){return!1},Bs.prototype.destroy=function(){return c(this._bufferLoader)&&Ir.unload(this._bufferLoader),Xe(this)};const K_e=Bs,Q_e=Object.freeze({ID:"ID",NAME:"NAME",DESCRIPTION:"DESCRIPTION",TILESET_TILE_COUNT:"TILESET_TILE_COUNT",TILE_BOUNDING_BOX:"TILE_BOUNDING_BOX",TILE_BOUNDING_REGION:"TILE_BOUNDING_REGION",TILE_BOUNDING_SPHERE:"TILE_BOUNDING_SPHERE",TILE_MINIMUM_HEIGHT:"TILE_MINIMUM_HEIGHT",TILE_MAXIMUM_HEIGHT:"TILE_MAXIMUM_HEIGHT",TILE_HORIZON_OCCLUSION_POINT:"TILE_HORIZON_OCCLUSION_POINT",TILE_GEOMETRIC_ERROR:"TILE_GEOMETRIC_ERROR",CONTENT_BOUNDING_BOX:"CONTENT_BOUNDING_BOX",CONTENT_BOUNDING_REGION:"CONTENT_BOUNDING_REGION",CONTENT_BOUNDING_SPHERE:"CONTENT_BOUNDING_SPHERE",CONTENT_MINIMUM_HEIGHT:"CONTENT_MINIMUM_HEIGHT",CONTENT_MAXIMUM_HEIGHT:"CONTENT_MAXIMUM_HEIGHT",CONTENT_HORIZON_OCCLUSION_POINT:"CONTENT_HORIZON_OCCLUSION_POINT"}),Hu={parseAllBoundingVolumeSemantics:function(e){return A.typeOf.object("tileMetadata",e),{tile:{boundingVolume:Hu.parseBoundingVolumeSemantic("TILE",e),minimumHeight:Hu._parseMinimumHeight("TILE",e),maximumHeight:Hu._parseMaximumHeight("TILE",e)},content:{boundingVolume:Hu.parseBoundingVolumeSemantic("CONTENT",e),minimumHeight:Hu._parseMinimumHeight("CONTENT",e),maximumHeight:Hu._parseMaximumHeight("CONTENT",e)}}},parseBoundingVolumeSemantic:function(e,t){if(A.typeOf.string("prefix",e),"TILE"!==e&&"CONTENT"!==e)throw new E("prefix must be either 'TILE' or 'CONTENT'");A.typeOf.object("tileMetadata",t);const i=t.getPropertyBySemantic(`${e}_BOUNDING_BOX`);if(c(i))return{box:i};const r=t.getPropertyBySemantic(`${e}_BOUNDING_REGION`);if(c(r))return{region:r};const a=t.getPropertyBySemantic(`${e}_BOUNDING_SPHERE`);return c(a)?{sphere:a}:void 0},_parseMinimumHeight:function(e,t){if(A.typeOf.string("prefix",e),"TILE"!==e&&"CONTENT"!==e)throw new E("prefix must be either 'TILE' or 'CONTENT'");return A.typeOf.object("tileMetadata",t),t.getPropertyBySemantic(`${e}_MINIMUM_HEIGHT`)},_parseMaximumHeight:function(e,t){if(A.typeOf.string("prefix",e),"TILE"!==e&&"CONTENT"!==e)throw new E("prefix must be either 'TILE' or 'CONTENT'");return A.typeOf.object("tileMetadata",t),t.getPropertyBySemantic(`${e}_MAXIMUM_HEIGHT`)}},j8=Hu;function ec(e,t,n){A.defined("tile.implicitTileset",t.implicitTileset),A.defined("tile.implicitCoordinates",t.implicitCoordinates);const i=t.implicitTileset,o=t.implicitCoordinates;this._implicitTileset=i,this._implicitCoordinates=o,this._implicitSubtree=void 0,this._tileset=e,this._tile=t,this._resource=n,this._metadata=void 0,this.featurePropertiesDirty=!1,this._group=void 0;const r=o.getTemplateValues(),s=i.subtreeUriTemplate.getDerivedResource({templateValues:r});this._url=s.getUrlComponent(!0),this._ready=!1}function W8(e,t,n){const i=Q_e.TILE_GEOMETRIC_ERROR;return c(e)&&e.hasPropertyBySemantic(i)?e.getPropertyBySemantic(i):t.geometricError/Math.pow(2,n.level)}function q8(e,t,n,i,o,r){const s=e._implicitTileset;let a,l,u,d;if(a=g(r,!1)?n.implicitCoordinates:n.implicitCoordinates.getChildCoordinates(i),c(t.tilePropertyTableJson)){l=t.getTileMetadataView(a);const P=j8.parseAllBoundingVolumeSemantics(l);u=P.tile,d=P.content}const m=t.contentPropertyTableJsons.length;let _=!1;for(let P=0;P<m;P++)if(t.contentIsAvailableAtCoordinates(a,P)){_=!0;break}const p=function oge(e,t,n,i,o,r){let s;return s=!c(r)||!c(r.boundingVolume)||!MS(r.boundingVolume,r)&&MS(e.boundingVolume,r)?Y8(e,t,n,g(i,!1),o):r.boundingVolume,tL(s,r),s}(s,a,i,r,n,u),y=[];for(let P=0;P<s.contentCount;P++){if(!t.contentIsAvailableAtIndex(o,P))continue;const B={uri:s.contentUriTemplates[P].getDerivedResource({templateValues:a.getTemplateValues()}).url},F=rge(p,d);c(F)&&(B.boundingVolume=F),y.push(Pn(B,s.contentHeaders[P]))}const x={boundingVolume:p,geometricError:W8(l,s,a),refine:s.refine,contents:y},w=Rt(s.tileHeader,!0);delete w.boundingVolume,delete w.transform,delete w.metadata;const v=Pn(x,w,!0),I=K8(e,s.baseResource,v,n);return I.implicitCoordinates=a,I.implicitSubtree=t,I.metadata=l,I.hasImplicitContentMetadata=_,I}function MS(e,t){return c(e)&&c(t)&&(c(t.minimumHeight)||c(t.maximumHeight))&&(vr(e,"3DTILES_bounding_volume_S2")||c(e.region))}function tL(e,t){c(t)&&(vr(e,"3DTILES_bounding_volume_S2")?function ige(e,t,n){c(t)&&(e.minimumHeight=t),c(n)&&(e.maximumHeight=n)}(e.extensions["3DTILES_bounding_volume_S2"],t.minimumHeight,t.maximumHeight):c(e.region)&&function nge(e,t,n){c(t)&&(e[4]=t),c(n)&&(e[5]=n)}(e.region,t.minimumHeight,t.maximumHeight))}function rge(e,t){let n;return c(t)&&(n=t.boundingVolume),MS(n,t)?tL(n,t):MS(e,t)&&(n=Rt(e,!0),tL(n,t)),n}function Y8(e,t,n,i,o){const r=e.boundingVolume;return vr(r,"3DTILES_bounding_volume_S2")?X8(i,o,n,t.level,t.x,t.y,t.z):c(r.region)?{region:$8(r.region,t.level,t.x,t.y,t.z)}:{box:Z8(r.box,t.level,t.x,t.y,t.z)}}function X8(e,t,n,i,o,r,s){A.typeOf.bool("parentIsPlaceholderTile",e),A.typeOf.object("parentTile",t),A.typeOf.number("childIndex",n),A.typeOf.number("level",i),A.typeOf.number("x",o),A.typeOf.number("y",r),c(s)&&A.typeOf.number("z",s);const a=t._boundingVolume;if(e)return{extensions:{"3DTILES_bounding_volume_S2":{token:AS.getTokenFromId(a.s2Cell._cellId),minimumHeight:a.minimumHeight,maximumHeight:a.maximumHeight}}};const l=Number(t._boundingVolume.s2Cell._cellId>>BigInt(61)),u=l%2==0?jH.encode2D(i,o,r):jH.encode2D(i,r,o),d=AS.fromFacePositionLevel(l,BigInt(u),i);let h,m;if(c(s)){const _=(a.maximumHeight+a.minimumHeight)/2;h=n<4?a.minimumHeight:_,m=n<4?_:a.maximumHeight}else h=a.minimumHeight,m=a.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:AS.getTokenFromId(d._cellId),minimumHeight:h,maximumHeight:m}}}}Object.defineProperties(ec.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._url}},metadata:{get:function(){},set:function(){throw new E("Implicit3DTileContent cannot have metadata")}},batchTable:{get:function(){}},group:{get:function(){return this._group},set:function(e){this._group=e}}}),ec.fromSubtreeJson=function(){var e=(0,we.Z)(function*(t,n,i,o,r,s){if(A.defined("tile.implicitTileset",n.implicitTileset),A.defined("tile.implicitCoordinates",n.implicitCoordinates),c(o)===c(r))throw new E("One of json and arrayBuffer must be defined.");let a;s=g(s,0),c(r)&&(a=new Uint8Array(r,s));const l=n.implicitTileset,u=n.implicitCoordinates,d=yield K_e.fromSubtreeJson(i,o,a,l,u),h=new ec(t,n,i);return h._implicitSubtree=d,function J_e(e,t){const n=e._tile,o=function tge(e,t,n,i){const s=q8(e,t,n,i,0,!0),a=e._tileset.statistics;let l=[s],u=[];const d=e._implicitTileset;for(let h=1;h<d.subtreeLevels;h++){const m=t.getLevelOffset(h),_=d.branchingFactor*l.length;for(let p=0;p<_;p++){const y=m+p;if(!t.tileIsAvailableAtIndex(y)){u.push(void 0);continue}const x=l[t.getParentMortonIndex(p)],w=q8(e,t,x,p%d.branchingFactor,y);x.children.push(w),a.numberOfTilesTotal++,u.push(w)}l=u,u=[]}return{rootTile:s,bottomRow:l}}(e,t,n,e._implicitCoordinates.childIndex),r=e._tileset.statistics;n.children.push(o.rootTile),r.numberOfTilesTotal++;const s=function ege(e,t,n){const i=[],o=e._implicitTileset.branchingFactor;for(let r=0;r<n.length;r++){const s=n[r];if(c(s))for(let a=0;a<o;a++)t.childSubtreeIsAvailableAtIndex(r*o+a)&&i.push({tile:s,childIndex:a})}return i}(e,t,o.bottomRow);for(let a=0;a<s.length;a++){const l=s[a],u=l.tile,d=uge(e,u,l.childIndex);u.children.push(d),r.numberOfTilesTotal++}}(h,d),h._ready=!0,h});return function(t,n,i,o,r,s){return e.apply(this,arguments)}}();const sge=new f,age=new f,nL=new f,cge=new oe;function Z8(e,t,n,i,o){if(A.typeOf.object("rootBox",e),A.typeOf.number("level",t),A.typeOf.number("x",n),A.typeOf.number("y",i),c(o)&&A.typeOf.number("z",o),0===t)return e;const r=f.unpack(e,0,age),s=oe.unpack(e,3,cge),a=Math.pow(2,-t),l=(2*n+1)*a-1,u=(2*i+1)*a-1;let d=0;const h=f.fromElements(a,a,1,sge);c(o)&&(d=(2*o+1)*a-1,h.z=a);let m=f.fromElements(l,u,d,nL);m=oe.multiplyByVector(s,m,nL),m=f.add(m,r,nL);let _=oe.clone(s);_=oe.multiplyByScale(_,h,_);const p=new Array(12);return f.pack(m,p),oe.pack(_,p,3),p}const lge=new Te;function $8(e,t,n,i,o){if(A.typeOf.object("rootRegion",e),A.typeOf.number("level",t),A.typeOf.number("x",n),A.typeOf.number("y",i),c(o)&&A.typeOf.number("z",o),0===t)return e.slice();const r=Te.unpack(e,0,lge),s=e[4],a=e[5],l=Math.pow(2,-t),u=l*r.width,d=O.negativePiToPi(r.west+n*u),h=O.negativePiToPi(d+u),m=l*r.height,_=O.negativePiToPi(r.south+i*m),p=O.negativePiToPi(_+m);let y=s,b=a;if(c(o)){const x=l*(a-s);y+=o*x,b=y+x}return[d,_,h,p,y,b]}function uge(e,t,n){const i=e._implicitTileset,o=t.implicitCoordinates.getChildCoordinates(n),r=Y8(i,o,n,!1,t),s=W8(void 0,i,o),a=i.subtreeUriTemplate.getDerivedResource({templateValues:o.getTemplateValues()}).url,u=K8(e,i.baseResource,{boundingVolume:r,geometricError:s,refine:i.refine,contents:[{uri:a}]},t);return u.implicitTileset=i,u.implicitCoordinates=o,u}function K8(e,t,n,i){return new(0,e._tile.constructor)(e._tileset,t,n,i)}ec.prototype.hasProperty=function(e,t){return!1},ec.prototype.getFeature=function(e){},ec.prototype.applyDebugSettings=function(e,t){},ec.prototype.applyStyle=function(e){},ec.prototype.update=function(e,t){},ec.prototype.pick=function(e,t,n){},ec.prototype.isDestroyed=function(){return!1},ec.prototype.destroy=function(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),Xe(this)},ec._deriveBoundingBox=Z8,ec._deriveBoundingRegion=$8,ec._deriveBoundingVolumeS2=X8;const Q8=ec,k_=Object.freeze({NONE:0,REPEAT:1,MIRRORED_REPEAT:2});function il(e,t){e=g(e,0),this._near=e,t=g(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(il.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}}}),il.packedLength=2,il.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),t[n++]=e.near,t[n]=e.far,t},il.unpack=function(e,t,n){if(!c(e))throw new E("array is required");return t=g(t,0),c(n)||(n=new il),n.near=e[t++],n.far=e[t],n},il.equals=function(e,t){return e===t||c(e)&&c(t)&&e.near===t.near&&e.far===t.far},il.clone=function(e,t){if(c(e))return c(t)||(t=new il),t.near=e.near,t.far=e.far,t},il.prototype.clone=function(e){return il.clone(this,e)},il.prototype.equals=function(e){return il.equals(this,e)};const Qn=il;function m0(e,t){A.typeOf.object("normal",e),A.typeOf.number("distance",t),this._distance=t,this._normal=new J8(e,this),this.onChangeCallback=void 0,this.index=-1}function J8(e,t){this._clippingPlane=t,this._cartesian3=f.clone(e)}Object.defineProperties(m0.prototype,{distance:{get:function(){return this._distance},set:function(e){A.typeOf.number("value",e),c(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){A.typeOf.object("value",e),c(this.onChangeCallback)&&!f.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),f.clone(e,this._normal._cartesian3)}}}),m0.fromPlane=function(e,t){return A.typeOf.object("plane",e),c(t)?(t.normal=e.normal,t.distance=e.distance):t=new m0(e.normal,e.distance),t},m0.clone=function(e,t){return c(t)?(t.normal=e.normal,t.distance=e.distance,t):new m0(e.normal,e.distance)},Object.defineProperties(J8.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){A.typeOf.number("value",e),c(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){A.typeOf.number("value",e),c(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){A.typeOf.number("value",e),c(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}});const iL=m0;function Ca(e){e=g(e,g.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=g(e.enabled,!0),this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this.edgeColor=Z.clone(g(e.edgeColor,Z.WHITE)),this.edgeWidth=g(e.edgeWidth,0),this.planeAdded=new Ye,this.planeRemoved=new Ye,this._owner=void 0;const t=g(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?e5:t5,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;const n=e.planes;if(c(n)){const i=n.length;for(let o=0;o<i;++o)this.add(n[o])}}function e5(e){return e===On.OUTSIDE}function t5(e){return e===On.INSIDE}function n5(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||-1!==e._dirtyIndex&&e._dirtyIndex!==t,e._dirtyIndex=t}function i5(e,t){const n=e.length;for(let i=0;i<n;++i)if(qn.equals(e[i],t))return i;return-1}Object.defineProperties(Ca.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?e5:t5)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}}),Ca.prototype.add=function(e){const t=this._planes.length,n=this;e.onChangeCallback=function(i){n5(n,i)},e.index=t,n5(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)},Ca.prototype.get=function(e){return A.typeOf.number("index",e),this._planes[e]},Ca.prototype.contains=function(e){return-1!==i5(this._planes,e)},Ca.prototype.remove=function(e){const t=this._planes,n=i5(t,e);if(-1===n)return!1;e instanceof iL&&(e.onChangeCallback=void 0,e.index=-1);const i=t.length-1;for(let o=n;o<i;++o){const r=t[o+1];t[o]=r,r instanceof iL&&(r.index=o)}return this._multipleDirtyPlanes=!0,t.length=i,this.planeRemoved.raiseEvent(e,n),!0},Ca.prototype.removeAll=function(){const e=this._planes,t=e.length;for(let n=0;n<t;++n){const i=e[n];i instanceof iL&&(i.onChangeCallback=void 0,i.index=-1),this.planeRemoved.raiseEvent(i,n)}this._multipleDirtyPlanes=!0,this._planes=[]};const dge=new de,fge=new de;function o5(e,t,n){const i=e._uint8View,o=e._planes;let r=0;for(let s=t;s<n;++s){const a=o[s],l=wi.octEncodeToCartesian4(a.normal,fge);i[r]=l.x,i[r+1]=l.y,i[r+2]=l.z,i[r+3]=l.w;const u=de.packFloat(a.distance,dge);i[r+4]=u.x,i[r+5]=u.y,i[r+6]=u.z,i[r+7]=u.w,r+=8}}function r5(e,t,n){const i=e._float32View,o=e._planes;let r=0;for(let s=t;s<n;++s){const a=o[s],l=a.normal;i[r]=l.x,i[r+1]=l.y,i[r+2]=l.z,i[r+3]=a.distance,r+=4}}function s5(e,t){return t.x=Math.min(e,dn.maximumTextureSize),t.y=Math.ceil(e/t.x),t}const hge=new V;Ca.prototype.update=function(e){let t=this._clippingPlanesTexture;const n=e.context,i=Ca.useFloatTexture(n),o=i?this.length:2*this.length;if(c(t)){const s=t.width*t.height;(s<o||o<.25*s)&&(t.destroy(),t=void 0,this._clippingPlanesTexture=void 0)}if(0===this.length)return;if(!c(t)){const s=s5(o,hge);s.y*=2,i?(t=new Mn({context:n,width:s.x,height:s.y,pixelFormat:Ct.RGBA,pixelDatatype:yt.FLOAT,sampler:vi.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*4)):(t=new Mn({context:n,width:s.x,height:s.y,pixelFormat:Ct.RGBA,pixelDatatype:yt.UNSIGNED_BYTE,sampler:vi.NEAREST,flipY:!1}),this._uint8View=new Uint8Array(s.x*s.y*4)),this._clippingPlanesTexture=t,this._multipleDirtyPlanes=!0}const r=this._dirtyIndex;if(this._multipleDirtyPlanes||-1!==r){if(this._multipleDirtyPlanes)i?(r5(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._float32View}})):(o5(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._uint8View}}));else{let s=0,a=0;i?(a=Math.floor(r/t.width),s=Math.floor(r-a*t.width),r5(this,r,r+1),t.copyFrom({source:{width:1,height:1,arrayBufferView:this._float32View},xOffset:s,yOffset:a})):(a=Math.floor(2*r/t.width),s=Math.floor(2*r-a*t.width),o5(this,r,r+1),t.copyFrom({source:{width:2,height:1,arrayBufferView:this._uint8View},xOffset:s,yOffset:a}))}this._multipleDirtyPlanes=!1,this._dirtyIndex=-1}};const pge=new k,a5=new qn(f.UNIT_X,0);Ca.prototype.computeIntersectionWithBoundingVolume=function(e,t){const n=this._planes,i=n.length;let o=this.modelMatrix;c(t)&&(o=k.multiply(t,o,pge));let r=On.INSIDE;!this.unionClippingRegions&&i>0&&(r=On.OUTSIDE);for(let s=0;s<i;++s){qn.transform(n[s],o,a5);const l=e.intersectPlane(a5);if(l===On.INTERSECTING)r=l;else if(this._testIntersection(l))return l}return r},Ca.setOwner=function(e,t,n){if(e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),c(e))){if(c(e._owner))throw new E("ClippingPlaneCollection should only be assigned to one object");e._owner=t,t[n]=e}},Ca.useFloatTexture=function(e){return e.floatingPointTexture},Ca.getTextureResolution=function(e,t,n){const i=e.texture;if(c(i))return n.x=i.width,n.y=i.height,n;const r=s5(Ca.useFloatTexture(t)?e.length:2*e.length,n);return r.y*=2,r},Ca.prototype.isDestroyed=function(){return!1},Ca.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),Xe(this)};const Gu=Ca,ni=Object.freeze({NONE:0,GEODESIC:1,RHUMB:2}),$e=function mge(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.componentDatatype))throw new E("options.componentDatatype is required.");if(!c(e.componentsPerAttribute))throw new E("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new E("options.componentsPerAttribute must be between 1 and 4.");if(!c(e.values))throw new E("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=g(e.normalize,!1),this.values=e.values},zn=function _ge(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.geometry))throw new E("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=g(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0},Xn=Object.freeze({NONE:0,TOP:1,ALL:2}),c5=new f,l5=new f,u5=new f,yge=function gge(e,t,n,i,o){let r,s,a,l,u,d,h,m;if(A.defined("point",e),A.defined("p0",t),A.defined("p1",n),A.defined("p2",i),c(o)||(o=new f),c(t.z)){if(f.equalsEpsilon(e,t,O.EPSILON14))return f.clone(f.UNIT_X,o);if(f.equalsEpsilon(e,n,O.EPSILON14))return f.clone(f.UNIT_Y,o);if(f.equalsEpsilon(e,i,O.EPSILON14))return f.clone(f.UNIT_Z,o);r=f.subtract(n,t,c5),s=f.subtract(i,t,l5),a=f.subtract(e,t,u5),l=f.dot(r,r),u=f.dot(r,s),d=f.dot(r,a),h=f.dot(s,s),m=f.dot(s,a)}else{if(V.equalsEpsilon(e,t,O.EPSILON14))return f.clone(f.UNIT_X,o);if(V.equalsEpsilon(e,n,O.EPSILON14))return f.clone(f.UNIT_Y,o);if(V.equalsEpsilon(e,i,O.EPSILON14))return f.clone(f.UNIT_Z,o);r=V.subtract(n,t,c5),s=V.subtract(i,t,l5),a=V.subtract(e,t,u5),l=V.dot(r,r),u=V.dot(r,s),d=V.dot(r,a),h=V.dot(s,s),m=V.dot(s,a)}o.y=h*d-u*m,o.z=l*m-u*d;const _=l*h-u*u;if(0!==_)return o.y/=_,o.z/=_,o.x=1-o.y-o.z,o};function $d(){this.high=f.clone(f.ZERO),this.low=f.clone(f.ZERO)}$d.encode=function(e,t){let n;return A.typeOf.number("value",e),c(t)||(t={high:0,low:0}),e>=0?(n=65536*Math.floor(e/65536),t.high=n,t.low=e-n):(n=65536*Math.floor(-e/65536),t.high=-n,t.low=e+n),t};const ih={high:0,low:0};$d.fromCartesian=function(e,t){A.typeOf.object("cartesian",e),c(t)||(t=new $d);const n=t.high,i=t.low;return $d.encode(e.x,ih),n.x=ih.high,i.x=ih.low,$d.encode(e.y,ih),n.y=ih.high,i.y=ih.low,$d.encode(e.z,ih),n.z=ih.high,i.z=ih.low,t};const oL=new $d;$d.writeElements=function(e,t,n){A.defined("cartesianArray",t),A.typeOf.number("index",n),A.typeOf.number.greaterThanOrEquals("index",n,0),$d.fromCartesian(e,oL);const i=oL.high,o=oL.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};const Vi=$d,rL={calculateACMR:function(e){const t=(e=g(e,g.EMPTY_OBJECT)).indices;let n=e.maximumIndex;const i=g(e.cacheSize,24);if(!c(t))throw new E("indices is required.");const o=t.length;if(o<3||o%3!=0)throw new E("indices length must be a multiple of three.");if(n<=0)throw new E("maximumIndex must be greater than zero.");if(i<3)throw new E("cacheSize must be greater than two.");if(!c(n)){n=0;let a=0,l=t[a];for(;a<o;)l>n&&(n=l),++a,l=t[a]}const r=[];for(let a=0;a<n+1;a++)r[a]=0;let s=i+1;for(let a=0;a<o;++a)s-r[t[a]]>i&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)},tipsify:function(e){const t=(e=g(e,g.EMPTY_OBJECT)).indices,n=e.maximumIndex,i=g(e.cacheSize,24);let o;function s(S,D,L,M,U,z,G){let q,W=-1,j=-1,Q=0;for(;Q<L.length;){const Y=L[Q];M[Y].numLiveTriangles&&(q=0,U-M[Y].timeStamp+2*M[Y].numLiveTriangles<=D&&(q=U-M[Y].timeStamp),(q>j||-1===j)&&(j=q,W=Y)),++Q}return-1===W?function r(S,D,L,M){for(;D.length>=1;){const U=D[D.length-1];if(D.splice(D.length-1,1),S[U].numLiveTriangles>0)return U}for(;o<M;){if(S[o].numLiveTriangles>0)return++o,o-1;++o}return-1}(M,z,0,G):W}if(!c(t))throw new E("indices is required.");const a=t.length;if(a<3||a%3!=0)throw new E("indices length must be a multiple of three.");if(n<=0)throw new E("maximumIndex must be greater than zero.");if(i<3)throw new E("cacheSize must be greater than two.");let l=0,u=0,d=t[u];const h=a;if(c(n))l=n+1;else{for(;u<h;)d>l&&(l=d),++u,d=t[u];if(-1===l)return 0;++l}const m=[];let _;for(_=0;_<l;_++)m[_]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let p=0;for(;u<h;)m[t[u]].vertexTriangles.push(p),++m[t[u]].numLiveTriangles,m[t[u+1]].vertexTriangles.push(p),++m[t[u+1]].numLiveTriangles,m[t[u+2]].vertexTriangles.push(p),++m[t[u+2]].numLiveTriangles,++p,u+=3;let y=0,b=i+1;o=1;let x=[];const C=[];let w,v,I=0;const P=[],N=a/3,R=[];for(_=0;_<N;_++)R[_]=!1;let B,F;for(;-1!==y;){x=[],v=m[y],F=v.vertexTriangles.length;for(let S=0;S<F;++S)if(p=v.vertexTriangles[S],!R[p]){R[p]=!0,u=p+p+p;for(let D=0;D<3;++D)B=t[u],x.push(B),C.push(B),P[I]=B,++I,w=m[B],--w.numLiveTriangles,b-w.timeStamp>i&&(w.timeStamp=b,++b),++u}y=s(0,i,x,m,b,C,l)}return P}},bge=rL,tc={};function FS(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function d5(e){const t={};for(const n in e)if(e.hasOwnProperty(n)&&c(e[n])&&c(e[n].values)){const i=e[n];t[n]=new $e({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function Cge(e,t,n){for(const i in t)if(t.hasOwnProperty(i)&&c(t[i])&&c(t[i].values)){const o=t[i];for(let r=0;r<o.componentsPerAttribute;++r)e[i].values.push(o.values[n*o.componentsPerAttribute+r])}}tc.toWireframe=function(e){if(!c(e))throw new E("geometry is required.");const t=e.indices;if(c(t)){switch(e.primitiveType){case Tt.TRIANGLES:e.indices=function Tge(e){const t=e.length,i=Ot.createTypedArray(t,t/3*6);let o=0;for(let r=0;r<t;r+=3,o+=6)FS(i,o,e[r],e[r+1],e[r+2]);return i}(t);break;case Tt.TRIANGLE_STRIP:e.indices=function Age(e){const t=e.length;if(t>=3){const i=Ot.createTypedArray(t,6*(t-2));FS(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r<t;++r,o+=6)FS(i,o,e[r-1],e[r],e[r-2]);return i}return new Uint16Array}(t);break;case Tt.TRIANGLE_FAN:e.indices=function xge(e){if(e.length>0){const t=e.length-1,i=Ot.createTypedArray(t,6*(t-1)),o=e[0];let r=0;for(let s=1;s<t;++s,r+=6)FS(i,r,o,e[s],e[s+1]);return i}return new Uint16Array}(t);break;default:throw new E("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}e.primitiveType=Tt.LINES}return e},tc.createLineSegmentsForVectors=function(e,t,n){if(t=g(t,"normal"),!c(e))throw new E("geometry is required.");if(!c(e.attributes.position))throw new E("geometry.attributes.position is required.");if(!c(e.attributes[t]))throw new E(`geometry.attributes must have an attribute with the same name as the attributeName parameter, ${t}.`);n=g(n,1e4);const i=e.attributes.position.values,o=e.attributes[t].values,r=i.length,s=new Float64Array(2*r);let l,a=0;for(let d=0;d<r;d+=3)s[a++]=i[d],s[a++]=i[d+1],s[a++]=i[d+2],s[a++]=i[d]+o[d]*n,s[a++]=i[d+1]+o[d+1]*n,s[a++]=i[d+2]+o[d+2]*n;const u=e.boundingSphere;return c(u)&&(l=new Ae(u.center,u.radius+n)),new En({attributes:{position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:Tt.LINES,boundingSphere:l})},tc.createAttributeLocations=function(e){if(!c(e))throw new E("geometry is required.");const t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={};let r,o=0;const s=t.length;for(r=0;r<s;++r){const a=t[r];c(n[a])&&(i[a]=o++)}for(const a in n)n.hasOwnProperty(a)&&!c(i[a])&&(i[a]=o++);return i},tc.reorderForPreVertexCache=function(e){if(!c(e))throw new E("geometry is required.");const t=En.computeNumberOfVertices(e),n=e.indices;if(c(n)){const i=new Int32Array(t);for(let m=0;m<t;m++)i[m]=-1;const o=n,r=o.length,s=Ot.createTypedArray(t,r);let d,a=0,l=0,u=0;for(;a<r;)d=i[o[a]],-1!==d?s[l]=d:(d=o[a],i[d]=u,s[l]=u,++u),++a,++l;e.indices=s;const h=e.attributes;for(const m in h)if(h.hasOwnProperty(m)&&c(h[m])&&c(h[m].values)){const _=h[m],p=_.values;let y=0;const b=_.componentsPerAttribute,x=ee.createTypedArray(_.componentDatatype,u*b);for(;y<t;){const C=i[y];if(-1!==C)for(let w=0;w<b;w++)x[b*C+w]=p[b*y+w];++y}_.values=x}}return e},tc.reorderForPostVertexCache=function(e,t){if(!c(e))throw new E("geometry is required.");const n=e.indices;if(e.primitiveType===Tt.TRIANGLES&&c(n)){const i=n.length;let o=0;for(let r=0;r<i;r++)n[r]>o&&(o=n[r]);e.indices=bge.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e},tc.fitToUnsignedShortIndices=function(e){if(!c(e))throw new E("geometry is required.");if(c(e.indices)&&e.primitiveType!==Tt.TRIANGLES&&e.primitiveType!==Tt.LINES&&e.primitiveType!==Tt.POINTS)throw new E("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");const t=[],n=En.computeNumberOfVertices(e);if(c(e.indices)&&n>=O.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=d5(e.attributes);const a=e.indices,l=a.length;let u;e.primitiveType===Tt.TRIANGLES?u=3:e.primitiveType===Tt.LINES?u=2:e.primitiveType===Tt.POINTS&&(u=1);for(let d=0;d<l;d+=u){for(let h=0;h<u;++h){const m=a[d+h];let _=i[m];c(_)||(_=r++,i[m]=_,Cge(s,e.attributes,m)),o.push(_)}r+u>=O.SIXTY_FOUR_KILOBYTES&&(t.push(new En({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=d5(e.attributes))}0!==o.length&&t.push(new En({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};const f5=new f,Ege=new Ce;tc.projectTo2D=function(e,t,n,i,o){if(!c(e))throw new E("geometry is required.");if(!c(t))throw new E("attributeName is required.");if(!c(n))throw new E("attributeName3D is required.");if(!c(i))throw new E("attributeName2D is required.");if(!c(e.attributes[t]))throw new E(`geometry must have attribute matching the attributeName argument: ${t}.`);if(e.attributes[t].componentDatatype!==ee.DOUBLE)throw new E("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");const r=e.attributes[t],s=(o=c(o)?o:new Qr).ellipsoid,a=r.values,l=new Float64Array(a.length);let u=0;for(let d=0;d<a.length;d+=3){const h=f.fromArray(a,d,f5),m=s.cartesianToCartographic(h,Ege);if(!c(m))throw new E(`Could not project point (${h.x}, ${h.y}, ${h.z}) to 2D.`);const _=o.project(m,f5);l[u++]=_.x,l[u++]=_.y,l[u++]=_.z}return e.attributes[n]=r,e.attributes[i]=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:l}),delete e.attributes[t],e};const sL={high:0,low:0};tc.encodeAttribute=function(e,t,n,i){if(!c(e))throw new E("geometry is required.");if(!c(t))throw new E("attributeName is required.");if(!c(n))throw new E("attributeHighName is required.");if(!c(i))throw new E("attributeLowName is required.");if(!c(e.attributes[t]))throw new E(`geometry must have attribute matching the attributeName argument: ${t}.`);if(e.attributes[t].componentDatatype!==ee.DOUBLE)throw new E("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");const o=e.attributes[t],r=o.values,s=r.length,a=new Float32Array(s),l=new Float32Array(s);for(let d=0;d<s;++d)Vi.encode(r[d],sL),a[d]=sL.high,l[d]=sL.low;const u=o.componentsPerAttribute;return e.attributes[n]=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:u,values:a}),e.attributes[i]=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:u,values:l}),delete e.attributes[t],e};let ju=new f;function aL(e,t){if(c(t)){const n=t.values,i=n.length;for(let o=0;o<i;o+=3)f.unpack(n,o,ju),k.multiplyByPoint(e,ju,ju),f.pack(ju,n,o)}}function cL(e,t){if(c(t)){const n=t.values,i=n.length;for(let o=0;o<i;o+=3)f.unpack(n,o,ju),oe.multiplyByVector(e,ju,ju),ju=f.normalize(ju,ju),f.pack(ju,n,o)}}const BS=new k,kS=new oe;tc.transformToWorldCoordinates=function(e){if(!c(e))throw new E("instance is required.");const t=e.modelMatrix;if(k.equals(t,k.IDENTITY))return e;const n=e.geometry.attributes;aL(t,n.position),aL(t,n.prevPosition),aL(t,n.nextPosition),(c(n.normal)||c(n.tangent)||c(n.bitangent))&&(k.inverse(t,BS),k.transpose(BS,BS),k.getMatrix3(BS,kS),cL(kS,n.normal),cL(kS,n.tangent),cL(kS,n.bitangent));const i=e.geometry.boundingSphere;return c(i)&&(e.geometry.boundingSphere=Ae.transform(i,t,i)),e.modelMatrix=k.clone(k.IDENTITY),e};const Sge=new f;function lL(e,t){const n=e.length;let i,o,r,s;const a=e[0].modelMatrix,l=c(e[0][t].indices),u=e[0][t].primitiveType;for(o=1;o<n;++o){if(!k.equals(e[o].modelMatrix,a))throw new E("All instances must have the same modelMatrix.");if(c(e[o][t].indices)!==l)throw new E("All instance geometries must have an indices or not have one.");if(e[o][t].primitiveType!==u)throw new E("All instance geometries must have the same primitiveType.")}const d=function wge(e,t){const n=e.length,i={},o=e[0][t].attributes;let r;for(r in o)if(o.hasOwnProperty(r)&&c(o[r])&&c(o[r].values)){const s=o[r];let a=s.values.length,l=!0;for(let u=1;u<n;++u){const d=e[u][t].attributes[r];if(!c(d)||s.componentDatatype!==d.componentDatatype||s.componentsPerAttribute!==d.componentsPerAttribute||s.normalize!==d.normalize){l=!1;break}a+=d.values.length}l&&(i[r]=new $e({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:ee.createTypedArray(s.componentDatatype,a)}))}return i}(e,t);let h,m,_,p;for(i in d)if(d.hasOwnProperty(i))for(h=d[i].values,s=0,o=0;o<n;++o)for(m=e[o][t].attributes[i].values,_=m.length,r=0;r<_;++r)h[s++]=m[r];if(l){let C=0;for(o=0;o<n;++o)C+=e[o][t].indices.length;const w=En.computeNumberOfVertices(new En({attributes:d,primitiveType:Tt.POINTS})),v=Ot.createTypedArray(w,C);let I=0,P=0;for(o=0;o<n;++o){const N=e[o][t].indices,R=N.length;for(s=0;s<R;++s)v[I++]=P+N[s];P+=En.computeNumberOfVertices(e[o][t])}p=v}let x,y=new f,b=0;for(o=0;o<n;++o){if(x=e[o][t].boundingSphere,!c(x)){y=void 0;break}f.add(x.center,y,y)}if(c(y))for(f.divideByScalar(y,n,y),o=0;o<n;++o){x=e[o][t].boundingSphere;const C=f.magnitude(f.subtract(x.center,y,Sge))+x.radius;C>b&&(b=C)}return new En({attributes:d,indices:p,primitiveType:u,boundingSphere:c(y)?new Ae(y,b):void 0})}tc.combineInstances=function(e){if(!c(e)||e.length<1)throw new E("instances is required and must have length greater than zero.");const t=[],n=[],i=e.length;for(let r=0;r<i;++r){const s=e[r];c(s.geometry)?t.push(s):c(s.westHemisphereGeometry)&&c(s.eastHemisphereGeometry)&&n.push(s)}const o=[];return t.length>0&&o.push(lL(t,"geometry")),n.length>0&&(o.push(lL(n,"westHemisphereGeometry")),o.push(lL(n,"eastHemisphereGeometry"))),o};const Hl=new f,BA=new f,_0=new f,g0=new f;tc.computeNormal=function(e){if(!c(e))throw new E("geometry is required.");if(!c(e.attributes.position)||!c(e.attributes.position.values))throw new E("geometry.attributes.position.values is required.");if(!c(e.indices))throw new E("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new E("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==Tt.TRIANGLES)throw new E("geometry.primitiveType must be PrimitiveType.TRIANGLES.");const 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),l=new Array(r);let u;for(u=0;u<o;u++)s[u]={indexOffset:0,count:0,currentCount:0};let d=0;for(u=0;u<r;u+=3){const p=t[u],y=t[u+1],b=t[u+2],x=3*p,C=3*y,w=3*b;BA.x=i[x],BA.y=i[x+1],BA.z=i[x+2],_0.x=i[C],_0.y=i[C+1],_0.z=i[C+2],g0.x=i[w],g0.y=i[w+1],g0.z=i[w+2],s[p].count++,s[y].count++,s[b].count++,f.subtract(_0,BA,_0),f.subtract(g0,BA,g0),a[d]=f.cross(_0,g0,new f),d++}let m,h=0;for(u=0;u<o;u++)s[u].indexOffset+=h,h+=s[u].count;for(d=0,u=0;u<r;u+=3){m=s[t[u]];let p=m.indexOffset+m.currentCount;l[p]=d,m.currentCount++,m=s[t[u+1]],p=m.indexOffset+m.currentCount,l[p]=d,m.currentCount++,m=s[t[u+2]],p=m.indexOffset+m.currentCount,l[p]=d,m.currentCount++,d++}const _=new Float32Array(3*o);for(u=0;u<o;u++){const p=3*u;if(m=s[u],f.clone(f.ZERO,Hl),m.count>0){for(d=0;d<m.count;d++)f.add(Hl,a[l[m.indexOffset+d]],Hl);f.equalsEpsilon(f.ZERO,Hl,O.EPSILON10)&&f.clone(a[l[m.indexOffset]],Hl)}f.equalsEpsilon(f.ZERO,Hl,O.EPSILON10)&&(Hl.z=1),f.normalize(Hl,Hl),_[p]=Hl.x,_[p+1]=Hl.y,_[p+2]=Hl.z}return e.attributes.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:_}),e};const vge=new f,h5=new f,Ige=new f;tc.computeTangentAndBitangent=function(e){if(!c(e))throw new E("geometry is required.");const t=e.attributes,n=e.indices;if(!c(t.position)||!c(t.position.values))throw new E("geometry.attributes.position.values is required.");if(!c(t.normal)||!c(t.normal.values))throw new E("geometry.attributes.normal.values is required.");if(!c(t.st)||!c(t.st.values))throw new E("geometry.attributes.st.values is required.");if(!c(n))throw new E("geometry.indices is required.");if(n.length<2||n.length%3!=0)throw new E("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==Tt.TRIANGLES)throw new E("geometry.primitiveType must be PrimitiveType.TRIANGLES.");const i=e.attributes.position.values,o=e.attributes.normal.values,r=e.attributes.st.values,s=e.attributes.position.values.length/3,a=n.length,l=new Array(3*s);let u,d,h,m;for(u=0;u<l.length;u++)l[u]=0;for(u=0;u<a;u+=3){const y=n[u],b=n[u+1],x=n[u+2];d=3*y,h=3*b,m=3*x;const C=2*y,w=2*b,v=2*x,I=i[d],P=i[d+1],N=i[d+2],R=r[C],B=r[C+1],F=r[w+1]-B,S=r[v+1]-B,D=1/((r[w]-R)*S-(r[v]-R)*F),L=(S*(i[h]-I)-F*(i[m]-I))*D,M=(S*(i[h+1]-P)-F*(i[m+1]-P))*D,U=(S*(i[h+2]-N)-F*(i[m+2]-N))*D;l[d]+=L,l[d+1]+=M,l[d+2]+=U,l[h]+=L,l[h+1]+=M,l[h+2]+=U,l[m]+=L,l[m+1]+=M,l[m+2]+=U}const _=new Float32Array(3*s),p=new Float32Array(3*s);for(u=0;u<s;u++){d=3*u,h=d+1,m=d+2;const y=f.fromArray(o,d,vge),b=f.fromArray(l,d,Ige),x=f.dot(y,b);f.multiplyByScalar(y,x,h5),f.normalize(f.subtract(b,h5,b),b),_[d]=b.x,_[h]=b.y,_[m]=b.z,f.normalize(f.cross(y,b,b),b),p[d]=b.x,p[h]=b.y,p[m]=b.z}return e.attributes.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:_}),e.attributes.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:p}),e};const kA=new V,Wu=new f,p5=new f,m5=new f;let US=new V;function Up(e,t){Math.abs(e.y)<O.EPSILON6&&(e.y=t?-O.EPSILON6:O.EPSILON6)}tc.compressVertices=function(e){if(!c(e))throw new E("geometry is required.");const t=e.attributes.extrudeDirection;let n,i;if(c(t)){const P=t.values;i=P.length/3;const N=new Float32Array(2*i);let R=0;for(n=0;n<i;++n)f.fromArray(P,3*n,Wu),f.equals(Wu,f.ZERO)?R+=2:(US=wi.octEncodeInRange(Wu,65535,US),N[R++]=US.x,N[R++]=US.y);return e.attributes.compressedAttributes=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:N}),delete e.attributes.extrudeDirection,e}const o=e.attributes.normal,r=e.attributes.st,s=c(o),a=c(r);if(!s&&!a)return e;const l=e.attributes.tangent,u=e.attributes.bitangent,d=c(l),h=c(u);let m,_,p,y;s&&(m=o.values),a&&(_=r.values),d&&(p=l.values),h&&(y=u.values),i=(s?m.length:_.length)/(s?3:2);let C=i,w=a&&s?2:1;w+=d||h?1:0,C*=w;const v=new Float32Array(C);let I=0;for(n=0;n<i;++n){a&&(V.fromArray(_,2*n,kA),v[I++]=wi.compressTextureCoordinates(kA));const P=3*n;s&&c(p)&&c(y)?(f.fromArray(m,P,Wu),f.fromArray(p,P,p5),f.fromArray(y,P,m5),wi.octPack(Wu,p5,m5,kA),v[I++]=kA.x,v[I++]=kA.y):(s&&(f.fromArray(m,P,Wu),v[I++]=wi.octEncodeFloat(Wu)),d&&(f.fromArray(p,P,Wu),v[I++]=wi.octEncodeFloat(Wu)),h&&(f.fromArray(y,P,Wu),v[I++]=wi.octEncodeFloat(Wu)))}return e.attributes.compressedAttributes=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:w,values:v}),s&&delete e.attributes.normal,a&&delete e.attributes.st,h&&delete e.attributes.bitangent,d&&delete e.attributes.tangent,e};const _5=new f;function Gl(e,t,n,i){f.add(e,f.multiplyByScalar(f.subtract(t,e,_5),e.y/(e.y-t.y),_5),n),f.clone(n,i),Up(n,!0),Up(i,!1)}const U_=new f,z_=new f,V_=new f,H_=new f,uL={positions:new Array(7),indices:new Array(9)};function Bge(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;!function Fge(e,t,n){if(0!==e.y&&0!==t.y&&0!==n.y)return Up(e,e.y<0),Up(t,t.y<0),void Up(n,n.y<0);const i=Math.abs(e.y),o=Math.abs(t.y),r=Math.abs(n.y);let s;s=O.sign(i>o?i>r?e.y:n.y:o>r?t.y:n.y);const a=s<0;Up(e,a),Up(t,a),Up(n,a)}(e,t,n);const i=e.y<0,o=t.y<0,r=n.y<0;let s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;const a=uL.indices;1===s?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(Gl(e,t,U_,V_),Gl(e,n,z_,H_),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(Gl(t,n,U_,V_),Gl(t,e,z_,H_),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(Gl(n,e,U_,V_),Gl(n,t,z_,H_),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):2===s&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?o?r||(Gl(n,e,U_,V_),Gl(n,t,z_,H_),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(Gl(t,n,U_,V_),Gl(t,e,z_,H_),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(Gl(e,t,U_,V_),Gl(e,n,z_,H_),a[0]=1,a[1]=2,a[3]=1,a[6]=0));const l=uL.positions;return l[0]=e,l[1]=t,l[2]=n,l.length=3,(1===s||2===s)&&(l[3]=U_,l[4]=z_,l[5]=V_,l[6]=H_,l.length=7),uL}function g5(e,t){const n=e.attributes;if(0===n.position.values.length)return;for(const o in n)if(n.hasOwnProperty(o)&&c(n[o])&&c(n[o].values)){const r=n[o];r.values=ee.createTypedArray(r.componentDatatype,r.values)}const i=En.computeNumberOfVertices(e);return e.indices=Ot.createTypedArray(i,e.indices),t&&(e.boundingSphere=Ae.fromVertices(n.position.values)),e}function y0(e){const t=e.attributes,n={};for(const i in t)if(t.hasOwnProperty(i)&&c(t[i])&&c(t[i].values)){const o=t[i];n[i]=new $e({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new En({attributes:n,indices:[],primitiveType:e.primitiveType})}function dL(e,t,n){const i=c(e.geometry.boundingSphere);t=g5(t,i),n=g5(n,i),c(n)&&!c(t)?e.geometry=n:!c(n)&&c(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function fL(e,t){const n=new e,i=new e,o=new e;return function(r,s,a,l,u,d,h,m){const _=e.fromArray(u,r*t,n),p=e.fromArray(u,s*t,i),y=e.fromArray(u,a*t,o);e.multiplyByScalar(_,l.x,_),e.multiplyByScalar(p,l.y,p),e.multiplyByScalar(y,l.z,y);const b=e.add(_,p,_);e.add(b,y,b),m&&e.normalize(b,b),e.pack(b,d,h*t)}}const kge=fL(de,4),zS=fL(f,3),y5=fL(V,2),Uge=function(e,t,n,i,o,r,s){r[s]=o[e]*i.x+o[t]*i.y+o[n]*i.z>O.EPSILON6?1:0},UA=new f,hL=new f,pL=new f,zge=new f;function VS(e,t,n,i,o,r,s,a,l,u,d,h,m,_,p,y){if(!(c(r)||c(s)||c(a)||c(l)||c(u)||0!==_))return;const b=f.fromArray(o,3*e,UA),x=f.fromArray(o,3*t,hL),C=f.fromArray(o,3*n,pL),w=yge(i,b,x,C,zge);if(c(w)){if(c(r)&&zS(e,t,n,w,r,h.normal.values,y,!0),c(u)){const v=f.fromArray(u,3*e,UA),I=f.fromArray(u,3*t,hL),P=f.fromArray(u,3*n,pL);let N;f.multiplyByScalar(v,w.x,v),f.multiplyByScalar(I,w.y,I),f.multiplyByScalar(P,w.z,P),f.equals(v,f.ZERO)&&f.equals(I,f.ZERO)&&f.equals(P,f.ZERO)?(N=UA,N.x=0,N.y=0,N.z=0):(N=f.add(v,I,v),f.add(N,P,N),f.normalize(N,N)),f.pack(N,h.extrudeDirection.values,3*y)}if(c(d)&&Uge(e,t,n,w,d,h.applyOffset.values,y),c(s)&&zS(e,t,n,w,s,h.tangent.values,y,!0),c(a)&&zS(e,t,n,w,a,h.bitangent.values,y,!0),c(l)&&y5(e,t,n,w,l,h.st.values,y),_>0)for(let v=0;v<_;v++){const I=m[v];Vge(e,t,n,w,y,p[I],h[I])}}}function Vge(e,t,n,i,o,r,s){const l=r.values,u=s.values;switch(r.componentsPerAttribute){case 4:kge(e,t,n,i,l,u,o,!1);break;case 3:zS(e,t,n,i,l,u,o,!1);break;case 2:y5(e,t,n,i,l,u,o,!1);break;default:u[o]=l[e]*i.x+l[t]*i.y+l[n]*i.z}}function Kd(e,t,n,i,o,r){const s=e.position.values.length/3;if(-1!==o){const a=i[o],l=n[a];return-1===l?(n[a]=s,e.position.values.push(r.x,r.y,r.z),t.push(s),s):(t.push(l),l)}return e.position.values.push(r.x,r.y,r.z),t.push(s),s}const Hge={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function b5(e){const t=e.geometry,n=t.attributes,i=n.position.values,o=c(n.normal)?n.normal.values:void 0,r=c(n.bitangent)?n.bitangent.values:void 0,s=c(n.tangent)?n.tangent.values:void 0,a=c(n.st)?n.st.values:void 0,l=c(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=c(n.applyOffset)?n.applyOffset.values:void 0,d=t.indices,h=[];for(const N in n)n.hasOwnProperty(N)&&!Hge[N]&&c(n[N])&&h.push(N);const m=h.length,_=y0(t),p=y0(t);let y,b,x,C,w;const v=[];v.length=i.length/3;const I=[];for(I.length=i.length/3,w=0;w<v.length;++w)v[w]=-1,I[w]=-1;const P=d.length;for(w=0;w<P;w+=3){const N=d[w],R=d[w+1],B=d[w+2];let F=f.fromArray(i,3*N),S=f.fromArray(i,3*R),D=f.fromArray(i,3*B);const L=Bge(F,S,D);if(c(L)&&L.positions.length>3){const M=L.positions,U=L.indices,z=U.length;for(let G=0;G<z;++G){const W=U[G],q=M[W];q.y<0?(y=p.attributes,b=p.indices,x=v):(y=_.attributes,b=_.indices,x=I),C=Kd(y,b,x,d,W<3?w+W:-1,q),VS(N,R,B,q,i,o,s,r,a,l,u,y,h,m,n,C)}}else c(L)&&(F=L.positions[0],S=L.positions[1],D=L.positions[2]),F.y<0?(y=p.attributes,b=p.indices,x=v):(y=_.attributes,b=_.indices,x=I),C=Kd(y,b,x,d,w,F),VS(N,R,B,F,i,o,s,r,a,l,u,y,h,m,n,C),C=Kd(y,b,x,d,w+1,S),VS(N,R,B,S,i,o,s,r,a,l,u,y,h,m,n,C),C=Kd(y,b,x,d,w+2,D),VS(N,R,B,D,i,o,s,r,a,l,u,y,h,m,n,C)}dL(e,p,_)}const T5=qn.fromPointNormal(f.ZERO,f.UNIT_Y),Gge=new f,jge=new f;function b0(e,t,n,i,o,r,s){if(!c(s))return;const a=f.fromArray(i,3*e,UA);r.applyOffset.values[o]=f.equalsEpsilon(a,n,O.EPSILON10)?s[e]:s[t]}function A5(e){const t=e.geometry,n=t.attributes,i=n.position.values,o=c(n.applyOffset)?n.applyOffset.values:void 0,r=t.indices,s=y0(t),a=y0(t);let l;const u=r.length,d=[];d.length=i.length/3;const h=[];for(h.length=i.length/3,l=0;l<d.length;++l)d[l]=-1,h[l]=-1;for(l=0;l<u;l+=2){const m=r[l],_=r[l+1],p=f.fromArray(i,3*m,UA),y=f.fromArray(i,3*_,hL);let b;Math.abs(p.y)<O.EPSILON6&&(p.y=p.y<0?-O.EPSILON6:O.EPSILON6),Math.abs(y.y)<O.EPSILON6&&(y.y=y.y<0?-O.EPSILON6:O.EPSILON6);let x=s.attributes,C=s.indices,w=h,v=a.attributes,I=a.indices,P=d;const N=So.lineSegmentPlane(p,y,T5,pL);if(c(N)){const R=f.multiplyByScalar(f.UNIT_Y,5*O.EPSILON9,Gge);p.y<0&&(f.negate(R,R),x=a.attributes,C=a.indices,w=d,v=s.attributes,I=s.indices,P=h);const B=f.add(N,R,jge);b=Kd(x,C,w,r,l,p),b0(m,_,p,i,b,x,o),b=Kd(x,C,w,r,-1,B),b0(m,_,B,i,b,x,o),f.negate(R,R),f.add(N,R,B),b=Kd(v,I,P,r,-1,B),b0(m,_,B,i,b,v,o),b=Kd(v,I,P,r,l+1,y),b0(m,_,y,i,b,v,o)}else{let R,B,F;p.y<0?(R=a.attributes,B=a.indices,F=d):(R=s.attributes,B=s.indices,F=h),b=Kd(R,B,F,r,l,p),b0(m,_,p,i,b,R,o),b=Kd(R,B,F,r,l+1,y),b0(m,_,y,i,b,R,o)}}dL(e,a,s)}const x5=new V,Wge=new V,C5=new f,E5=new f,mL=new f,qge=new f,Yge=new f,Xge=new f,w5=new de;function S5(e){const t=e.attributes,n=t.position.values,i=t.prevPosition.values,o=t.nextPosition.values,r=n.length;for(let s=0;s<r;s+=3){const a=f.unpack(n,s,C5);if(a.x>0)continue;const l=f.unpack(i,s,E5);(a.y<0&&l.y>0||a.y>0&&l.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):f.pack(a,i,s));const u=f.unpack(o,s,mL);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(s+3<r?(o[s]=n[s+3],o[s+1]=n[s+4],o[s+2]=n[s+5]):f.pack(a,o,s))}}const Zge=5*O.EPSILON9,HS=O.EPSILON6;tc.splitLongitude=function(e){if(!c(e))throw new E("instance is required.");const t=e.geometry,n=t.boundingSphere;if(c(n)&&(n.center.x-n.radius>0||Ae.intersectPlane(n,qn.ORIGIN_ZX_PLANE)!==On.INTERSECTING))return e;if(t.geometryType!==a0.NONE)switch(t.geometryType){case a0.POLYLINES:!function $ge(e){const t=e.geometry,n=t.attributes,i=n.position.values,o=n.prevPosition.values,r=n.nextPosition.values,s=n.expandAndWidth.values,a=c(n.st)?n.st.values:void 0,l=c(n.color)?n.color.values:void 0,u=y0(t),d=y0(t);let h,m,_,p=!1;const y=i.length/3;for(h=0;h<y;h+=4){const b=h,x=h+2,C=f.fromArray(i,3*b,C5),w=f.fromArray(i,3*x,E5);if(Math.abs(C.y)<HS)for(C.y=HS*(w.y<0?-1:1),i[3*h+1]=C.y,i[3*(h+1)+1]=C.y,m=3*b;m<3*b+12;m+=3)o[m]=i[3*h],o[m+1]=i[3*h+1],o[m+2]=i[3*h+2];if(Math.abs(w.y)<HS)for(w.y=HS*(C.y<0?-1:1),i[3*(h+2)+1]=w.y,i[3*(h+3)+1]=w.y,m=3*b;m<3*b+12;m+=3)r[m]=i[3*(h+2)],r[m+1]=i[3*(h+2)+1],r[m+2]=i[3*(h+2)+2];let v=u.attributes,I=u.indices,P=d.attributes,N=d.indices;const R=So.lineSegmentPlane(C,w,T5,qge);if(c(R)){p=!0;const B=f.multiplyByScalar(f.UNIT_Y,Zge,Yge);C.y<0&&(f.negate(B,B),v=d.attributes,I=d.indices,P=u.attributes,N=u.indices);const F=f.add(R,B,Xge);v.position.values.push(C.x,C.y,C.z,C.x,C.y,C.z),v.position.values.push(F.x,F.y,F.z),v.position.values.push(F.x,F.y,F.z),v.prevPosition.values.push(o[3*b],o[3*b+1],o[3*b+2]),v.prevPosition.values.push(o[3*b+3],o[3*b+4],o[3*b+5]),v.prevPosition.values.push(C.x,C.y,C.z,C.x,C.y,C.z),v.nextPosition.values.push(F.x,F.y,F.z),v.nextPosition.values.push(F.x,F.y,F.z),v.nextPosition.values.push(F.x,F.y,F.z),v.nextPosition.values.push(F.x,F.y,F.z),f.negate(B,B),f.add(R,B,F),P.position.values.push(F.x,F.y,F.z),P.position.values.push(F.x,F.y,F.z),P.position.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.prevPosition.values.push(F.x,F.y,F.z),P.prevPosition.values.push(F.x,F.y,F.z),P.prevPosition.values.push(F.x,F.y,F.z),P.prevPosition.values.push(F.x,F.y,F.z),P.nextPosition.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.nextPosition.values.push(r[3*x],r[3*x+1],r[3*x+2]),P.nextPosition.values.push(r[3*x+3],r[3*x+4],r[3*x+5]);const S=V.fromArray(s,2*b,x5),D=Math.abs(S.y);v.expandAndWidth.values.push(-1,D,1,D),v.expandAndWidth.values.push(-1,-D,1,-D),P.expandAndWidth.values.push(-1,D,1,D),P.expandAndWidth.values.push(-1,-D,1,-D);let L=f.magnitudeSquared(f.subtract(R,C,mL));if(L/=f.magnitudeSquared(f.subtract(w,C,mL)),c(l)){const M=de.fromArray(l,4*b,w5),U=de.fromArray(l,4*x,w5),z=O.lerp(M.x,U.x,L),G=O.lerp(M.y,U.y,L),W=O.lerp(M.z,U.z,L),q=O.lerp(M.w,U.w,L);for(m=4*b;m<4*b+8;++m)v.color.values.push(l[m]);for(v.color.values.push(z,G,W,q),v.color.values.push(z,G,W,q),P.color.values.push(z,G,W,q),P.color.values.push(z,G,W,q),m=4*x;m<4*x+8;++m)P.color.values.push(l[m])}if(c(a)){const M=V.fromArray(a,2*b,x5),U=V.fromArray(a,2*(h+3),Wge),z=O.lerp(M.x,U.x,L);for(m=2*b;m<2*b+4;++m)v.st.values.push(a[m]);for(v.st.values.push(z,M.y),v.st.values.push(z,U.y),P.st.values.push(z,M.y),P.st.values.push(z,U.y),m=2*x;m<2*x+4;++m)P.st.values.push(a[m])}_=v.position.values.length/3-4,I.push(_,_+2,_+1),I.push(_+1,_+2,_+3),_=P.position.values.length/3-4,N.push(_,_+2,_+1),N.push(_+1,_+2,_+3)}else{let B,F;for(C.y<0?(B=d.attributes,F=d.indices):(B=u.attributes,F=u.indices),B.position.values.push(C.x,C.y,C.z),B.position.values.push(C.x,C.y,C.z),B.position.values.push(w.x,w.y,w.z),B.position.values.push(w.x,w.y,w.z),m=3*h;m<3*h+12;++m)B.prevPosition.values.push(o[m]),B.nextPosition.values.push(r[m]);for(m=2*h;m<2*h+8;++m)B.expandAndWidth.values.push(s[m]),c(a)&&B.st.values.push(a[m]);if(c(l))for(m=4*h;m<4*h+16;++m)B.color.values.push(l[m]);_=B.position.values.length/3-4,F.push(_,_+2,_+1),F.push(_+1,_+2,_+3)}}p&&(S5(d),S5(u)),dL(e,d,u)}(e);break;case a0.TRIANGLES:b5(e);break;case a0.LINES:A5(e)}else(function Mge(e){switch(e.primitiveType){case Tt.TRIANGLE_FAN:return function Pge(e){const t=En.computeNumberOfVertices(e);if(t<3)throw new E("The number of vertices must be at least three.");const n=Ot.createTypedArray(t,3*(t-2));n[0]=1,n[1]=0,n[2]=2;let i=3;for(let o=3;o<t;++o)n[i++]=o-1,n[i++]=0,n[i++]=o;return e.indices=n,e.primitiveType=Tt.TRIANGLES,e}(e);case Tt.TRIANGLE_STRIP:return function Oge(e){const t=En.computeNumberOfVertices(e);if(t<3)throw new E("The number of vertices must be at least 3.");const n=Ot.createTypedArray(t,3*(t-2));n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;o<t-1;o+=2)n[i++]=o,n[i++]=o-1,n[i++]=o+1,o+2<t&&(n[i++]=o,n[i++]=o+1,n[i++]=o+2);return e.indices=n,e.primitiveType=Tt.TRIANGLES,e}(e);case Tt.TRIANGLES:return function Dge(e){if(c(e.indices))return e;const t=En.computeNumberOfVertices(e);if(t<3)throw new E("The number of vertices must be at least three.");if(t%3!=0)throw new E("The number of vertices must be a multiple of three.");const n=Ot.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}(e);case Tt.LINE_STRIP:return function Lge(e){const t=En.computeNumberOfVertices(e);if(t<2)throw new E("The number of vertices must be at least two.");const n=Ot.createTypedArray(t,2*(t-1));n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return e.indices=n,e.primitiveType=Tt.LINES,e}(e);case Tt.LINE_LOOP:return function Nge(e){const t=En.computeNumberOfVertices(e);if(t<2)throw new E("The number of vertices must be at least two.");const n=Ot.createTypedArray(t,2*t);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=Tt.LINES,e}(e);case Tt.LINES:return function Rge(e){if(c(e.indices))return e;const t=En.computeNumberOfVertices(e);if(t<2)throw new E("The number of vertices must be at least two.");if(t%2!=0)throw new E("The number of vertices must be a multiple of 2.");const n=Ot.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}(e)}return e})(t),t.primitiveType===Tt.TRIANGLES?b5(e):t.primitiveType===Tt.LINES&&A5(e);return e};const ao=tc,v5=O.EPSILON10,Ea=function Kge(e,t,n,i){if(A.defined("equalsEpsilon",t),!c(e))return;n=g(n,!1);const o=c(i),r=e.length;if(r<2)return e;let s,l,u,a=e[0],d=0,h=-1;for(s=1;s<r;++s)l=e[s],t(a,l,v5)?(c(u)||(u=e.slice(0,s),d=s-1,h=0),o&&i.push(s)):(c(u)&&(u.push(l),d=s,o&&(h=i.length)),a=l);return n&&t(e[0],e[r-1],v5)&&(o&&(c(u)?i.splice(h,0,d):i.push(r-1)),c(u)?u.length-=1:u=e.slice(0,-1)),c(u)?u:e};function _L(e,t,n){if(0===e)return t*n;const i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,l=a*i,u=n;return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*l/1048576)*u-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*l/524288)*Math.sin(2*u)+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*l/8388608)*Math.sin(4*u)-(35*r/3072+175*s/12288+3675*a/262144+13475*l/1048576)*Math.sin(6*u)+(315*s/131072+2205*a/524288+43659*l/8388608)*Math.sin(8*u)-(693*a/1310720+6237*l/5242880)*Math.sin(10*u)+1001*l/8388608*Math.sin(12*u))}function T0(e,t){if(0===e)return Math.log(Math.tan(.5*(O.PI_OVER_TWO+t)));const n=e*Math.sin(t);return Math.log(Math.tan(.5*(O.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}const tye=new f,gL=new f;function I5(e,t,n,i){const o=f.normalize(i.cartographicToCartesian(t,gL),tye),r=f.normalize(i.cartographicToCartesian(n,gL),gL);A.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(f.angleBetween(o,r))-Math.PI),.0125);const s=i.maximumRadius,a=i.minimumRadius,l=s*s;e._ellipticitySquared=(l-a*a)/l,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=Ce.clone(t,e._start),e._start.height=0,e._end=Ce.clone(n,e._end),e._end.height=0,e._heading=function Jge(e,t,n,i,o){const r=T0(e._ellipticity,n),s=T0(e._ellipticity,o);return Math.atan2(O.negativePiToPi(i-t),s-r)}(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=function eye(e,t,n,i,o,r,s){const a=e._heading,l=r-i;let u=0;if(O.equalsEpsilon(Math.abs(a),O.PI_OVER_TWO,O.EPSILON8))if(t===n)u=t*Math.cos(o)*O.negativePiToPi(l);else{const d=Math.sin(o);u=t*Math.cos(o)*O.negativePiToPi(l)/Math.sqrt(1-e._ellipticitySquared*d*d)}else{const d=_L(e._ellipticity,t,o);u=(_L(e._ellipticity,t,s)-d)/Math.cos(a)}return Math.abs(u)}(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function D5(e,t,n,i,o,r){if(0===n)return Ce.clone(e,r);const s=o*o;let a,l,u;if(Math.abs(O.PI_OVER_TWO-Math.abs(t))>O.EPSILON8)if(l=function Qge(e,t,n){const i=e/n;if(0===t)return i;const o=i*i,r=o*i,s=r*i,l=t*t,u=l*l,d=u*l,h=d*l,m=h*l,_=m*l,p=Math.sin(2*i),y=Math.cos(2*i),b=Math.sin(4*i),x=Math.cos(4*i),C=Math.sin(6*i),w=Math.cos(6*i),v=Math.sin(8*i),I=Math.cos(8*i),P=Math.sin(10*i);return i+i*l/4+7*i*u/64+15*i*d/256+579*i*h/16384+1515*i*m/65536+16837*i*_/1048576+(3*i*u/16+45*i*d/256-i*(32*o-561)*h/4096-i*(232*o-1677)*m/16384+i*(399985-90560*o+512*s)*_/5242880)*y+(21*i*d/256+483*i*h/4096-i*(224*o-1969)*m/16384-i*(33152*o-112599)*_/1048576)*x+(151*i*h/4096+4681*i*m/65536+1479*i*_/16384-453*r*_/32768)*w+(1097*i*m/65536+42783*i*_/1048576)*I+8011*i*_/1048576*Math.cos(10*i)+(3*l/8+3*u/16+213*d/2048-3*o*d/64+255*h/4096-33*o*h/512+20861*m/524288-33*o*m/512+s*m/1024+28273*_/1048576-471*o*_/8192+9*s*_/4096)*p+(21*u/256+21*d/256+533*h/8192-21*o*h/512+197*m/4096-315*o*m/4096+584039*_/16777216-12517*o*_/131072+7*s*_/2048)*b+(151*d/6144+151*h/4096+5019*m/131072-453*o*m/16384+26965*_/786432-8607*o*_/131072)*C+(1097*h/131072+1097*m/65536+225797*_/10485760-1097*o*_/65536)*v+(8011*m/2621440+8011*_/1048576)*P+293393*_/251658240*Math.sin(12*i)}(_L(o,i,e.latitude)+n*Math.cos(t),o,i),Math.abs(t)<O.EPSILON10)a=O.negativePiToPi(e.longitude);else{const _=T0(o,e.latitude),p=T0(o,l);u=Math.tan(t)*(p-_),a=O.negativePiToPi(e.longitude+u)}else{let d;if(l=e.latitude,0===o)d=i*Math.cos(e.latitude);else{const h=Math.sin(e.latitude);d=i*Math.cos(e.latitude)/Math.sqrt(1-s*h*h)}u=n/d,a=O.negativePiToPi(t>0?e.longitude+u:e.longitude-u)}return c(r)?(r.longitude=a,r.latitude=l,r.height=0,r):new Ce(a,l,0)}function oh(e,t,n){const i=g(n,he.default);this._ellipsoid=i,this._start=new Ce,this._end=new Ce,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,c(e)&&c(t)&&I5(this,e,t,i)}Object.defineProperties(oh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return A.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return A.defined("distance",this._distance),this._heading}}}),oh.fromStartHeadingDistance=function(e,t,n,i,o){A.defined("start",e),A.defined("heading",t),A.defined("distance",n),A.typeOf.number.greaterThan("distance",n,0);const r=g(i,he.default),s=r.maximumRadius,a=r.minimumRadius,l=s*s,d=Math.sqrt((l-a*a)/l),h=D5(e,t=O.negativePiToPi(t),n,r.maximumRadius,d);return!c(o)||c(i)&&!i.equals(o.ellipsoid)?new oh(e,h,r):(o.setEndPoints(e,h),o)},oh.prototype.setEndPoints=function(e,t){A.defined("start",e),A.defined("end",t),I5(this,e,t,this._ellipsoid)},oh.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},oh.prototype.interpolateUsingSurfaceDistance=function(e,t){if(A.typeOf.number("distance",e),!c(this._distance)||0===this._distance)throw new E("EllipsoidRhumbLine must have distinct start and end set.");return D5(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},oh.prototype.findIntersectionWithLongitude=function(e,t){if(A.typeOf.number("intersectionLongitude",e),!c(this._distance)||0===this._distance)throw new E("EllipsoidRhumbLine must have distinct start and end set.");const n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=O.negativePiToPi(e),O.equalsEpsilon(Math.abs(e),Math.PI,O.EPSILON14)&&(e=O.sign(r.longitude)*Math.PI),c(t)||(t=new Ce),Math.abs(O.PI_OVER_TWO-o)<=O.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(O.equalsEpsilon(Math.abs(O.PI_OVER_TWO-o),O.PI_OVER_TWO,O.EPSILON8))return O.equalsEpsilon(e,r.longitude,O.EPSILON12)?void 0:(t.longitude=e,t.latitude=O.PI_OVER_TWO*O.sign(O.PI_OVER_TWO-i),t.height=0,t);const s=r.latitude,a=n*Math.sin(s),l=Math.tan(.5*(O.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),u=(1+a)/(1-a);let h,d=r.latitude;do{h=d;const m=n*Math.sin(h);d=2*Math.atan(l*Math.pow((1+m)/(1-m)/u,n/2))-O.PI_OVER_TWO}while(!O.equalsEpsilon(d,h,O.EPSILON12));return t.longitude=e,t.latitude=d,t.height=0,t},oh.prototype.findIntersectionWithLatitude=function(e,t){if(A.typeOf.number("intersectionLatitude",e),!c(this._distance)||0===this._distance)throw new E("EllipsoidRhumbLine must have distinct start and end set.");const n=this._ellipticity,i=this._heading,o=this._start;if(O.equalsEpsilon(Math.abs(i),O.PI_OVER_TWO,O.EPSILON8))return;const r=T0(n,o.latitude),s=T0(n,e),a=Math.tan(i)*(s-r),l=O.negativePiToPi(o.longitude+a);return c(t)?(t.longitude=l,t.latitude=e,t.height=0,t):new Ce(l,e,0)};const Qd=oh,co=function nye(e){e=g(e,g.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color},G_=function iye(e,t){this.positions=c(e)?e:[],this.holes=c(t)?t:[]};var oye=wt(6718);const rye=new f,sye=new f,zp={computeArea2D:function(e){A.defined("positions",e),A.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);const t=e.length;let n=0;for(let i=t-1,o=0;o<t;i=o++){const r=e[i],s=e[o];n+=r.x*s.y-s.x*r.y}return.5*n},computeWindingOrder2D:function(e){return zp.computeArea2D(e)>0?Bl.COUNTER_CLOCKWISE:Bl.CLOCKWISE},triangulate:function(e,t){A.defined("positions",e);const n=V.packArray(e);return oye(n,t,2)}},P5=new f,O5=new f,R5=new f,L5=new f,N5=new f,M5=new f,rh=new f,F5=new V,B5=new V,k5=new V,A0=new V;zp.computeSubdivision=function(e,t,n,i,o){o=g(o,O.RADIANS_PER_DEGREE);const r=c(i);A.typeOf.object("ellipsoid",e),A.defined("positions",t),A.defined("indices",n),A.typeOf.number.greaterThanOrEquals("indices.length",n.length,3),A.typeOf.number.equals("indices.length % 3","0",n.length%3,0),A.typeOf.number.greaterThan("granularity",o,0);const s=n.slice(0);let a;const l=t.length,u=new Array(3*l),d=new Array(2*l);let h=0,m=0;for(a=0;a<l;a++){const w=t[a];if(u[h++]=w.x,u[h++]=w.y,u[h++]=w.z,r){const v=i[a];d[m++]=v.x,d[m++]=v.y}}const _=[],p={},y=e.maximumRadius,b=O.chordLength(o,y),x=b*b;for(;s.length>0;){const w=s.pop(),v=s.pop(),I=s.pop(),P=f.fromArray(u,3*I,P5),N=f.fromArray(u,3*v,O5),R=f.fromArray(u,3*w,R5);let B,F,S;r&&(B=V.fromArray(d,2*I,F5),F=V.fromArray(d,2*v,B5),S=V.fromArray(d,2*w,k5));const D=f.multiplyByScalar(f.normalize(P,L5),y,L5),L=f.multiplyByScalar(f.normalize(N,N5),y,N5),M=f.multiplyByScalar(f.normalize(R,M5),y,M5),U=f.magnitudeSquared(f.subtract(D,L,rh)),z=f.magnitudeSquared(f.subtract(L,M,rh)),G=f.magnitudeSquared(f.subtract(M,D,rh)),W=Math.max(U,z,G);let q,j,Q;W>x?U===W?(q=`${Math.min(I,v)} ${Math.max(I,v)}`,a=p[q],c(a)||(j=f.add(P,N,rh),f.multiplyByScalar(j,.5,j),u.push(j.x,j.y,j.z),a=u.length/3-1,p[q]=a,r&&(Q=V.add(B,F,A0),V.multiplyByScalar(Q,.5,Q),d.push(Q.x,Q.y))),s.push(I,a,w),s.push(a,v,w)):z===W?(q=`${Math.min(v,w)} ${Math.max(v,w)}`,a=p[q],c(a)||(j=f.add(N,R,rh),f.multiplyByScalar(j,.5,j),u.push(j.x,j.y,j.z),a=u.length/3-1,p[q]=a,r&&(Q=V.add(F,S,A0),V.multiplyByScalar(Q,.5,Q),d.push(Q.x,Q.y))),s.push(v,a,I),s.push(a,w,I)):G===W&&(q=`${Math.min(w,I)} ${Math.max(w,I)}`,a=p[q],c(a)||(j=f.add(R,P,rh),f.multiplyByScalar(j,.5,j),u.push(j.x,j.y,j.z),a=u.length/3-1,p[q]=a,r&&(Q=V.add(S,B,A0),V.multiplyByScalar(Q,.5,Q),d.push(Q.x,Q.y))),s.push(w,a,v),s.push(a,I,v)):(_.push(I),_.push(v),_.push(w))}const C={attributes:{position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:Tt.TRIANGLES};return r&&(C.attributes.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:d})),new En(C)};const aye=new Ce,cye=new Ce,lye=new Ce,yL=new Ce;zp.computeRhumbLineSubdivision=function(e,t,n,i,o){o=g(o,O.RADIANS_PER_DEGREE);const r=c(i);A.typeOf.object("ellipsoid",e),A.defined("positions",t),A.defined("indices",n),A.typeOf.number.greaterThanOrEquals("indices.length",n.length,3),A.typeOf.number.equals("indices.length % 3","0",n.length%3,0),A.typeOf.number.greaterThan("granularity",o,0);const s=n.slice(0);let a;const l=t.length,u=new Array(3*l),d=new Array(2*l);let h=0,m=0;for(a=0;a<l;a++){const I=t[a];if(u[h++]=I.x,u[h++]=I.y,u[h++]=I.z,r){const P=i[a];d[m++]=P.x,d[m++]=P.y}}const _=[],p={},b=O.chordLength(o,e.maximumRadius),x=new Qd(void 0,void 0,e),C=new Qd(void 0,void 0,e),w=new Qd(void 0,void 0,e);for(;s.length>0;){const I=s.pop(),P=s.pop(),N=s.pop(),R=f.fromArray(u,3*N,P5),B=f.fromArray(u,3*P,O5),F=f.fromArray(u,3*I,R5);let S,D,L;r&&(S=V.fromArray(d,2*N,F5),D=V.fromArray(d,2*P,B5),L=V.fromArray(d,2*I,k5));const M=e.cartesianToCartographic(R,aye),U=e.cartesianToCartographic(B,cye),z=e.cartesianToCartographic(F,lye);x.setEndPoints(M,U);const G=x.surfaceDistance;C.setEndPoints(U,z);const W=C.surfaceDistance;w.setEndPoints(z,M);const q=w.surfaceDistance,j=Math.max(G,W,q);let Q,Y,ne,X,K;j>b?G===j?(Q=`${Math.min(N,P)} ${Math.max(N,P)}`,a=p[Q],c(a)||(Y=x.interpolateUsingFraction(.5,yL),ne=.5*(M.height+U.height),X=f.fromRadians(Y.longitude,Y.latitude,ne,e,rh),u.push(X.x,X.y,X.z),a=u.length/3-1,p[Q]=a,r&&(K=V.add(S,D,A0),V.multiplyByScalar(K,.5,K),d.push(K.x,K.y))),s.push(N,a,I),s.push(a,P,I)):W===j?(Q=`${Math.min(P,I)} ${Math.max(P,I)}`,a=p[Q],c(a)||(Y=C.interpolateUsingFraction(.5,yL),ne=.5*(U.height+z.height),X=f.fromRadians(Y.longitude,Y.latitude,ne,e,rh),u.push(X.x,X.y,X.z),a=u.length/3-1,p[Q]=a,r&&(K=V.add(D,L,A0),V.multiplyByScalar(K,.5,K),d.push(K.x,K.y))),s.push(P,a,N),s.push(a,I,N)):q===j&&(Q=`${Math.min(I,N)} ${Math.max(I,N)}`,a=p[Q],c(a)||(Y=w.interpolateUsingFraction(.5,yL),ne=.5*(z.height+M.height),X=f.fromRadians(Y.longitude,Y.latitude,ne,e,rh),u.push(X.x,X.y,X.z),a=u.length/3-1,p[Q]=a,r&&(K=V.add(L,S,A0),V.multiplyByScalar(K,.5,K),d.push(K.x,K.y))),s.push(I,a,P),s.push(a,N,P)):(_.push(N),_.push(P),_.push(I))}const v={attributes:{position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:Tt.TRIANGLES};return r&&(v.attributes.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:d})),new En(v)},zp.scaleToGeodeticHeight=function(e,t,n,i){n=g(n,he.default);let o=rye,r=sye;if(t=g(t,0),i=g(i,!0),c(e)){const s=e.length;for(let a=0;a<s;a+=3)f.fromArray(e,a,r),i&&(r=n.scaleToGeodeticSurface(r,r)),0!==t&&(o=n.geodeticSurfaceNormal(r,o),f.multiplyByScalar(o,t,o),f.add(r,o,r)),e[a]=r.x,e[a+1]=r.y,e[a+2]=r.z}return e};const po=zp;function Vp(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(Vp.prototype,{length:{get:function(){return this._length}}}),Vp.prototype.enqueue=function(e){this._array.push(e),this._length++},Vp.prototype.dequeue=function(){if(0===this._length)return;const e=this._array;let t=this._offset;const n=e[t];return e[t]=void 0,t++,t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n},Vp.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},Vp.prototype.contains=function(e){return-1!==this._array.indexOf(e)},Vp.prototype.clear=function(){this._array.length=this._offset=this._length=0},Vp.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};const bL=Vp,Fo={computeHierarchyPackedLength:function(e,t){let n=0;const i=[e];for(;i.length>0;){const o=i.pop();if(!c(o))continue;n+=2;const r=o.positions,s=o.holes;if(c(r)&&r.length>0&&(n+=r.length*t.packedLength),c(s)){const a=s.length;for(let l=0;l<a;++l)i.push(s[l])}}return n},packPolygonHierarchy:function(e,t,n,i){const o=[e];for(;o.length>0;){const r=o.pop();if(!c(r))continue;const s=r.positions,a=r.holes;if(t[n++]=c(s)?s.length:0,t[n++]=c(a)?a.length:0,c(s)){const l=s.length;for(let u=0;u<l;++u,n+=i.packedLength)i.pack(s[u],t,n)}if(c(a)){const l=a.length;for(let u=0;u<l;++u)o.push(a[u])}}return n},unpackPolygonHierarchy:function(e,t,n){const i=e[t++],o=e[t++],r=new Array(i),s=o>0?new Array(o):void 0;for(let a=0;a<i;++a,t+=n.packedLength)r[a]=n.unpack(e,t);for(let a=0;a<o;++a)s[a]=Fo.unpackPolygonHierarchy(e,t,n),t=s[a].startingIndex,delete s[a].startingIndex;return{positions:r,holes:s,startingIndex:t}}},j_=new V;function U5(e,t,n,i){return V.subtract(t,e,j_),V.multiplyByScalar(j_,n/i,j_),V.add(e,j_,j_),[j_.x,j_.y]}const Hp=new f;function uye(e,t,n,i){return f.subtract(t,e,Hp),f.multiplyByScalar(Hp,n/i,Hp),f.add(e,Hp,Hp),[Hp.x,Hp.y,Hp.z]}Fo.subdivideLineCount=function(e,t,n){const o=f.distance(e,t)/n,r=Math.max(0,Math.ceil(O.log2(o)));return Math.pow(2,r)};const GS=new Ce,jS=new Ce,dye=new Ce,fye=new f,WS=new Qd;Fo.subdivideRhumbLineCount=function(e,t,n,i){const o=e.cartesianToCartographic(t,GS),r=e.cartesianToCartographic(n,jS),a=new Qd(o,r,e).surfaceDistance/i,l=Math.max(0,Math.ceil(O.log2(a)));return Math.pow(2,l)},Fo.subdivideTexcoordLine=function(e,t,n,i,o,r){const s=Fo.subdivideLineCount(n,i,o),a=V.distance(e,t),l=a/s,u=r;u.length=2*s;let d=0;for(let h=0;h<s;h++){const m=U5(e,t,h*l,a);u[d++]=m[0],u[d++]=m[1]}return u},Fo.subdivideLine=function(e,t,n,i){const o=Fo.subdivideLineCount(e,t,n),r=f.distance(e,t),s=r/o;c(i)||(i=[]);const a=i;a.length=3*o;let l=0;for(let u=0;u<o;u++){const d=uye(e,t,u*s,r);a[l++]=d[0],a[l++]=d[1],a[l++]=d[2]}return a},Fo.subdivideTexcoordRhumbLine=function(e,t,n,i,o,r,s){const a=n.cartesianToCartographic(i,GS),l=n.cartesianToCartographic(o,jS);WS.setEndPoints(a,l);const d=Math.max(0,Math.ceil(O.log2(WS.surfaceDistance/r))),h=Math.pow(2,d),m=V.distance(e,t),_=m/h,p=s;p.length=2*h;let y=0;for(let b=0;b<h;b++){const x=U5(e,t,b*_,m);p[y++]=x[0],p[y++]=x[1]}return p},Fo.subdivideRhumbLine=function(e,t,n,i,o){const r=e.cartesianToCartographic(t,GS),s=e.cartesianToCartographic(n,jS),a=new Qd(r,s,e),u=Math.max(0,Math.ceil(O.log2(a.surfaceDistance/i))),d=Math.pow(2,u),h=a.surfaceDistance/d;c(o)||(o=[]);const m=o;m.length=3*d;let _=0;for(let p=0;p<d;p++){const y=a.interpolateUsingSurfaceDistance(p*h,dye),b=e.cartographicToCartesian(y,fye);m[_++]=b.x,m[_++]=b.y,m[_++]=b.z}return m};const hye=new f,pye=new f,mye=new f,_ye=new f;Fo.scaleToGeodeticHeightExtruded=function(e,t,n,i,o){i=g(i,he.default);const r=hye;let s=pye;const a=mye;let l=_ye;if(c(e)&&c(e.attributes)&&c(e.attributes.position)){const u=e.attributes.position.values,d=u.length/2;for(let h=0;h<d;h+=3)f.fromArray(u,h,a),i.geodeticSurfaceNormal(a,r),l=i.scaleToGeodeticSurface(a,l),s=f.multiplyByScalar(r,n,s),s=f.add(l,s,s),u[h+d]=s.x,u[h+1+d]=s.y,u[h+2+d]=s.z,o&&(l=f.clone(a,l)),s=f.multiplyByScalar(r,t,s),s=f.add(l,s,s),u[h]=s.x,u[h+1]=s.y,u[h+2]=s.z}return e},Fo.polygonOutlinesFromHierarchy=function(e,t,n){const i=[],o=new bL;let r,s,a;for(o.enqueue(e);0!==o.length;){const l=o.dequeue();let u=l.positions;if(t)for(a=u.length,r=0;r<a;r++)n.scaleToGeodeticSurface(u[r],u[r]);if(u=Ea(u,f.equalsEpsilon,!0),u.length<3)continue;const d=l.holes?l.holes.length:0;for(r=0;r<d;r++){const h=l.holes[r];let m=h.positions;if(t)for(a=m.length,s=0;s<a;++s)n.scaleToGeodeticSurface(m[s],m[s]);if(m=Ea(m,f.equalsEpsilon,!0),m.length<3)continue;i.push(m);let _=0;for(c(h.holes)&&(_=h.holes.length),s=0;s<_;s++)o.enqueue(h.holes[s])}i.push(u)}return i};const gye=new Ce;function bye(e,t,n,i){if(i===ni.RHUMB)return function yye(e,t,n){const i=n.cartesianToCartographic(e,GS),o=n.cartesianToCartographic(t,jS);if(Math.sign(i.latitude)===Math.sign(o.latitude))return;WS.setEndPoints(i,o);const r=WS.findIntersectionWithLatitude(0,gye);if(!c(r))return;let s=Math.min(i.longitude,o.longitude),a=Math.max(i.longitude,o.longitude);if(Math.abs(a-s)>O.PI){const l=s;s=a,a=l}return r.longitude<s||r.longitude>a?void 0:n.cartographicToCartesian(r)}(e,t,n);const o=So.lineSegmentPlane(e,t,qn.ORIGIN_XY_PLANE);return c(o)?n.scaleToGeodeticSurface(o,o):void 0}const Tye=new Ce;function Aye(e,t,n){const i=[];let o,r,s,a,l,u=0;for(;u<e.length;){o=e[u],r=e[(u+1)%e.length],s=O.sign(o.z),a=O.sign(r.z);const d=h=>t.cartesianToCartographic(h,Tye).longitude;if(0===s)i.push({position:u,type:s,visited:!1,next:a,theta:d(o)});else if(0!==a){if(l=bye(o,r,t,n),++u,!c(l))continue;e.splice(u,0,l),i.push({position:u,type:s,visited:!1,next:a,theta:d(l)})}++u}return i}function z5(e,t,n,i,o,r,s){const a=[];let l=r;const u=h=>m=>m.position===h,d=[];do{a.push(n[l]);const m=i.findIndex(u(l)),_=i[m];if(!c(_)){++l;continue}const{visited:p,type:y,next:b}=_;if(_.visited=!0,0===y){if(0===b){const v=i[m-(s?1:-1)];if(v?.position!==l+1){++l;continue}v.visited=!0}if(!p&&s&&b>0||r===l&&!s&&b<0){++l;continue}}if(!(s?y>=0:y<=0)){++l;continue}p||d.push(l);const w=i[m+(s?1:-1)];c(w)?l=w.position:++l}while(l<n.length&&l>=0&&l!==r&&a.length<n.length);e.splice(t,o,a);for(const h of d)t=z5(e,++t,n,i,0,h,!s);return t}Fo.splitPolygonsOnEquator=function(e,t,n,i){c(i)||(i=[]),i.splice(0,0,...e),i.length=e.length;let o=0;for(;o<i.length;){const r=i[o],s=r.slice();if(r.length<3){i[o]=s,++o;continue}const a=Aye(s,t,n);s.length===r.length||a.length<=1?(i[o]=s,++o):(a.sort((u,d)=>u.theta-d.theta),o=z5(i,o,s,a,1,0,s[0].z>=0))}return i},Fo.polygonsFromHierarchy=function(e,t,n,i,o,r){const s=[],a=[],l=new bL;l.enqueue(e);let u=c(r);for(;0!==l.length;){const d=l.dequeue();let h=d.positions;const m=d.holes;let _,p;if(i)for(p=h.length,_=0;_<p;_++)o.scaleToGeodeticSurface(h[_],h[_]);if(t||(h=Ea(h,f.equalsEpsilon,!0)),h.length<3)continue;let y=n(h);if(!c(y))continue;const b=[];let x=po.computeWindingOrder2D(y);if(x===Bl.CLOCKWISE&&(y.reverse(),h=h.slice().reverse()),u){u=!1;let P=[h];if(P=r(P,P),P.length>1){for(const N of P)l.enqueue(new G_(N,m));continue}}let C=h.slice();const w=c(m)?m.length:0,v=[];let I;for(_=0;_<w;_++){const P=m[_];let N=P.positions;if(i)for(p=N.length,I=0;I<p;++I)o.scaleToGeodeticSurface(N[I],N[I]);if(t||(N=Ea(N,f.equalsEpsilon,!0)),N.length<3)continue;const R=n(N);if(!c(R))continue;x=po.computeWindingOrder2D(R),x===Bl.CLOCKWISE&&(R.reverse(),N=N.slice().reverse()),v.push(N),b.push(C.length),C=C.concat(N),y=y.concat(R);let B=0;for(c(P.holes)&&(B=P.holes.length),I=0;I<B;I++)l.enqueue(P.holes[I])}s.push({outerRing:h,holes:v}),a.push({positions:C,positions2D:y,holes:b})}return{hierarchy:s,polygons:a}};const xye=new V,Cye=new f,Eye=new bt,wye=new oe;Fo.computeBoundingRectangle=function(e,t,n,i,o){const r=bt.fromAxisAngle(e,i,Eye),s=oe.fromQuaternion(r,wye);let a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY;const h=n.length;for(let m=0;m<h;++m){const _=f.clone(n[m],Cye);oe.multiplyByVector(s,_,_);const p=t(_,xye);c(p)&&(a=Math.min(a,p.x),l=Math.max(l,p.x),u=Math.min(u,p.y),d=Math.max(d,p.y))}return o.x=a,o.y=u,o.width=l-a,o.height=d-u,o},Fo.createGeometryFromPositions=function(e,t,n,i,o,r,s){let a=po.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);const l=t.positions,u=c(n),d=u?n.positions:void 0;if(o){const h=l.length,m=new Array(3*h);let _=0;for(let b=0;b<h;b++){const x=l[b];m[_++]=x.x,m[_++]=x.y,m[_++]=x.z}const p={attributes:{position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:m})},indices:a,primitiveType:Tt.TRIANGLES};u&&(p.attributes.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:V.packArray(d)}));const y=new En(p);return r.normal?ao.computeNormal(y):y}return s===ni.GEODESIC?po.computeSubdivision(e,l,a,d,i):s===ni.RHUMB?po.computeRhumbLineSubdivision(e,l,a,d,i):void 0};const V5=[],H5=[],Sye=new f,vye=new f;Fo.computeWallGeometry=function(e,t,n,i,o,r){let s,a,l,u,d,h,m,_,p,y=e.length,b=0,x=0;const C=c(t),w=C?t.positions:void 0;if(o)for(a=3*y*2,s=new Array(2*a),C&&(p=2*y*2,_=new Array(2*p)),l=0;l<y;l++)u=e[l],d=e[(l+1)%y],s[b]=s[b+a]=u.x,++b,s[b]=s[b+a]=u.y,++b,s[b]=s[b+a]=u.z,++b,s[b]=s[b+a]=d.x,++b,s[b]=s[b+a]=d.y,++b,s[b]=s[b+a]=d.z,++b,C&&(h=w[l],m=w[(l+1)%y],_[x]=_[x+p]=h.x,++x,_[x]=_[x+p]=h.y,++x,_[x]=_[x+p]=m.x,++x,_[x]=_[x+p]=m.y,++x);else{const R=O.chordLength(i,n.maximumRadius);let B=0;if(r===ni.GEODESIC)for(l=0;l<y;l++)B+=Fo.subdivideLineCount(e[l],e[(l+1)%y],R);else if(r===ni.RHUMB)for(l=0;l<y;l++)B+=Fo.subdivideRhumbLineCount(n,e[l],e[(l+1)%y],R);for(a=3*(B+y),s=new Array(2*a),C&&(p=2*(B+y),_=new Array(2*p)),l=0;l<y;l++){let F,S;u=e[l],d=e[(l+1)%y],C&&(h=w[l],m=w[(l+1)%y]),r===ni.GEODESIC?(F=Fo.subdivideLine(u,d,R,H5),C&&(S=Fo.subdivideTexcoordLine(h,m,u,d,R,V5))):r===ni.RHUMB&&(F=Fo.subdivideRhumbLine(n,u,d,R,H5),C&&(S=Fo.subdivideTexcoordRhumbLine(h,m,n,u,d,R,V5)));const D=F.length;for(let L=0;L<D;++L,++b)s[b]=F[L],s[b+a]=F[L];if(s[b]=d.x,s[b+a]=d.x,++b,s[b]=d.y,s[b+a]=d.y,++b,s[b]=d.z,s[b+a]=d.z,++b,C){const L=S.length;for(let M=0;M<L;++M,++x)_[x]=S[M],_[x+p]=S[M];_[x]=m.x,_[x+p]=m.x,++x,_[x]=m.y,_[x+p]=m.y,++x}}}y=s.length;const v=Ot.createTypedArray(y/3,y-6*e.length);let I=0;for(y/=6,l=0;l<y;l++){const R=l,B=R+1,F=R+y,S=F+1;u=f.fromArray(s,3*R,Sye),d=f.fromArray(s,3*B,vye),!f.equalsEpsilon(u,d,O.EPSILON10,O.EPSILON10)&&(v[I++]=R,v[I++]=F,v[I++]=B,v[I++]=B,v[I++]=F,v[I++]=S)}const P={attributes:new co({position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:s})}),indices:v,primitiveType:Tt.TRIANGLES};return C&&(P.attributes.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:_})),new En(P)};const si=Fo;function br(e,t){this.position=e,c(this.position)||(this.position=new V),this.tangentPlane=t,c(this.tangentPlane)||(this.tangentPlane=br.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(br.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(){const e=V.magnitude(this.position);return this.tangentPlane.plane.normal.z*(O.PI_OVER_TWO-2*Math.atan2(e,2*this.ellipsoid.maximumRadius))}},longitude:{get:function(){let e=O.PI_OVER_TWO+Math.atan2(this.y,this.x);return e>Math.PI&&(e-=O.TWO_PI),e}}});const x0=new Ce,Iye=new f;br.prototype.getLatitude=function(e){c(e)||(e=he.default),x0.latitude=this.conformalLatitude,x0.longitude=this.longitude,x0.height=0;const t=this.ellipsoid.cartographicToCartesian(x0,Iye);return e.cartesianToCartographic(t,x0),x0.latitude};const Dye=new ii,Pye=new f,Oye=new f;br.fromCartesian=function(e,t){A.defined("cartesian",e);const n=O.signNotZero(e.z);let i=br.NORTH_POLE_TANGENT_PLANE,o=br.SOUTH_POLE;n<0&&(i=br.SOUTH_POLE_TANGENT_PLANE,o=br.NORTH_POLE);const r=Dye;r.origin=i.ellipsoid.scaleToGeocentricSurface(e,r.origin),r.direction=f.subtract(r.origin,o,Pye),f.normalize(r.direction,r.direction);const s=So.rayPlane(r,i.plane,Oye),a=f.subtract(s,o,s),l=f.dot(i.xAxis,a),u=n*f.dot(i.yAxis,a);return c(t)?(t.position=new V(l,u),t.tangentPlane=i,t):new br(new V(l,u),i)},br.fromCartesianArray=function(e,t){A.defined("cartesians",e);const n=e.length;c(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=br.fromCartesian(e[i],t[i]);return t},br.clone=function(e,t){if(c(e))return c(t)?(t.position=e.position,t.tangentPlane=e.tangentPlane,t):new br(e.position,e.tangentPlane)},br.HALF_UNIT_SPHERE=Object.freeze(new he(.5,.5,.5)),br.NORTH_POLE=Object.freeze(new f(0,0,.5)),br.SOUTH_POLE=Object.freeze(new f(0,0,-.5)),br.NORTH_POLE_TANGENT_PLANE=Object.freeze(new el(br.NORTH_POLE,br.HALF_UNIT_SPHERE)),br.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new el(br.SOUTH_POLE,br.HALF_UNIT_SPHERE));const jl=br;function Ur(e){e=g(e,g.EMPTY_OBJECT),this.position=g(e.position,!1),this.normal=g(e.normal,!1),this.st=g(e.st,!1),this.bitangent=g(e.bitangent,!1),this.tangent=g(e.tangent,!1),this.color=g(e.color,!1)}Ur.POSITION_ONLY=Object.freeze(new Ur({position:!0})),Ur.POSITION_AND_NORMAL=Object.freeze(new Ur({position:!0,normal:!0})),Ur.POSITION_NORMAL_AND_ST=Object.freeze(new Ur({position:!0,normal:!0,st:!0})),Ur.POSITION_AND_ST=Object.freeze(new Ur({position:!0,st:!0})),Ur.POSITION_AND_COLOR=Object.freeze(new Ur({position:!0,color:!0})),Ur.ALL=Object.freeze(new Ur({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),Ur.DEFAULT=Ur.POSITION_NORMAL_AND_ST,Ur.packedLength=6,Ur.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),t[n++]=e.position?1:0,t[n++]=e.normal?1:0,t[n++]=e.st?1:0,t[n++]=e.tangent?1:0,t[n++]=e.bitangent?1:0,t[n]=e.color?1:0,t},Ur.unpack=function(e,t,n){if(!c(e))throw new E("array is required");return t=g(t,0),c(n)||(n=new Ur),n.position=1===e[t++],n.normal=1===e[t++],n.st=1===e[t++],n.tangent=1===e[t++],n.bitangent=1===e[t++],n.color=1===e[t],n},Ur.clone=function(e,t){if(c(e))return c(t)||(t=new Ur),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};const et=Ur,Rye=new Ce,G5=new Ce;function Lye(e,t,n,i){const r=i.cartesianToCartographic(e,Rye).height,s=i.cartesianToCartographic(t,G5);s.height=r,i.cartographicToCartesian(s,t);const a=i.cartesianToCartographic(n,G5);a.height=r-100,i.cartographicToCartesian(a,n)}const j5=new Vt,Nye=new f,Mye=new f,Fye=new f,Bye=new f,kye=new f,Uye=new f;let qS=new f,Jd=new f,C0=new f;const zye=new V,Vye=new V,Hye=new f,W5=new bt,Gye=new oe,jye=new oe;function TL(e){const t=e.vertexFormat,n=e.geometry,i=e.shadowVolume,o=n.attributes.position.values,r=c(n.attributes.st)?n.attributes.st.values:void 0;let s=o.length;const a=e.wall,l=e.top||a,u=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||i){const d=e.boundingRectangle,h=e.rotationAxis,m=e.projectTo2d,_=e.ellipsoid,p=e.stRotation,y=e.perPositionHeight,b=zye;b.x=d.x,b.y=d.y;const x=t.st?new Float32Array(s/3*2):void 0;let C;t.normal&&(C=y&&l&&!a?n.attributes.normal.values:new Float32Array(s));const w=t.tangent?new Float32Array(s):void 0,v=t.bitangent?new Float32Array(s):void 0,I=i?new Float32Array(s):void 0;let P=0,N=0,R=Mye,B=Fye,F=Bye,S=!0,D=Gye,L=jye;if(0!==p){let z=bt.fromAxisAngle(h,p,W5);D=oe.fromQuaternion(z,D),z=bt.fromAxisAngle(h,-p,W5),L=oe.fromQuaternion(z,L)}else D=oe.clone(oe.IDENTITY,D),L=oe.clone(oe.IDENTITY,L);let M=0,U=0;l&&u&&(M=s/2,U=s/3,s/=2);for(let z=0;z<s;z+=3){const G=f.fromArray(o,z,Hye);if(t.st&&!c(r)){let W=oe.multiplyByVector(D,G,Nye);W=_.scaleToGeodeticSurface(W,W);const q=m([W],Vye)[0];V.subtract(q,b,q);const j=O.clamp(q.x/d.width,0,1),Q=O.clamp(q.y/d.height,0,1);u&&(x[P+U]=j,x[P+1+U]=Q),l&&(x[P]=j,x[P+1]=Q),P+=2}if(t.normal||t.tangent||t.bitangent||i){const W=N+1,q=N+2;if(a){if(z+3<s){const j=f.fromArray(o,z+3,kye);if(S){const Q=f.fromArray(o,z+s,Uye);y&&Lye(G,j,Q,_),f.subtract(j,G,j),f.subtract(Q,G,Q),R=f.normalize(f.cross(Q,j,R),R),S=!1}f.equalsEpsilon(j,G,O.EPSILON10)&&(S=!0)}(t.tangent||t.bitangent)&&(F=_.geodeticSurfaceNormal(G,F),t.tangent&&(B=f.normalize(f.cross(F,R,B),B)))}else R=_.geodeticSurfaceNormal(G,R),(t.tangent||t.bitangent)&&(y&&(qS=f.fromArray(C,N,qS),Jd=f.cross(f.UNIT_Z,qS,Jd),Jd=f.normalize(oe.multiplyByVector(L,Jd,Jd),Jd),t.bitangent&&(C0=f.normalize(f.cross(qS,Jd,C0),C0))),B=f.cross(f.UNIT_Z,R,B),B=f.normalize(oe.multiplyByVector(L,B,B),B),t.bitangent&&(F=f.normalize(f.cross(R,B,F),F)));t.normal&&(e.wall?(C[N+M]=R.x,C[W+M]=R.y,C[q+M]=R.z):u&&(C[N+M]=-R.x,C[W+M]=-R.y,C[q+M]=-R.z),(l&&!y||a)&&(C[N]=R.x,C[W]=R.y,C[q]=R.z)),i&&(a&&(R=_.geodeticSurfaceNormal(G,R)),I[N+M]=-R.x,I[W+M]=-R.y,I[q+M]=-R.z),t.tangent&&(e.wall?(w[N+M]=B.x,w[W+M]=B.y,w[q+M]=B.z):u&&(w[N+M]=-B.x,w[W+M]=-B.y,w[q+M]=-B.z),l&&(y?(w[N]=Jd.x,w[W]=Jd.y,w[q]=Jd.z):(w[N]=B.x,w[W]=B.y,w[q]=B.z))),t.bitangent&&(u&&(v[N+M]=F.x,v[W+M]=F.y,v[q+M]=F.z),l&&(y?(v[N]=C0.x,v[W]=C0.y,v[q]=C0.z):(v[N]=F.x,v[W]=F.y,v[q]=F.z))),N+=3}}t.st&&!c(r)&&(n.attributes.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:x})),t.normal&&(n.attributes.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:C})),t.tangent&&(n.attributes.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:w})),t.bitangent&&(n.attributes.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:v})),i&&(n.attributes.extrudeDirection=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:I}))}if(e.extrude&&c(e.offsetAttribute)){const d=o.length/3;let h=new Uint8Array(d);e.offsetAttribute===Xn.TOP?l&&u||a?h=h.fill(1,0,d/2):l&&(h=h.fill(1)):h=h.fill(e.offsetAttribute===Xn.NONE?0:1),n.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return n}const q5=[];function Wye(e,t,n,i,o,r,s,a,l,u){const d={walls:[]};let h;if(s||a){const C=si.createGeometryFromPositions(e,t,n,i,r,l,u),w=C.attributes.position.values,v=C.indices;let I,P;if(s&&a){const N=w.concat(w);I=N.length/3,P=Ot.createTypedArray(I,2*v.length),P.set(v);const R=v.length,B=I/2;for(h=0;h<R;h+=3){const F=P[h]+B,S=P[h+1]+B;P[h+R]=P[h+2]+B,P[h+1+R]=S,P[h+2+R]=F}if(C.attributes.position.values=N,r&&l.normal){const F=C.attributes.normal.values;C.attributes.normal.values=new Float32Array(N.length),C.attributes.normal.values.set(F)}if(l.st&&c(n)){const F=C.attributes.st.values;C.attributes.st.values=new Float32Array(2*I),C.attributes.st.values=F.concat(F)}C.indices=P}else if(a){for(I=w.length/3,P=Ot.createTypedArray(I,v.length),h=0;h<v.length;h+=3)P[h]=v[h+2],P[h+1]=v[h+1],P[h+2]=v[h];C.indices=P}d.topAndBottom=new zn({geometry:C})}let m=o.outerRing;const _=el.fromPoints(m,e);let p=_.projectPointsOntoPlane(m,q5),y=po.computeWindingOrder2D(p);y===Bl.CLOCKWISE&&(m=m.slice().reverse());let b=si.computeWallGeometry(m,n,e,i,r,u);d.walls.push(new zn({geometry:b}));const x=o.holes;for(h=0;h<x.length;h++){let C=x[h];p=_.projectPointsOntoPlane(C,q5),y=po.computeWindingOrder2D(p),y===Bl.COUNTER_CLOCKWISE&&(C=C.slice().reverse()),b=si.computeWallGeometry(C,n,e,i,r,u),d.walls.push(new zn({geometry:b}))}return d}function Wl(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),c(e.perPositionHeight)&&e.perPositionHeight&&c(e.height))throw new E("Cannot use both options.perPositionHeight and options.height");if(c(e.arcType)&&e.arcType!==ni.GEODESIC&&e.arcType!==ni.RHUMB)throw new E("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");const t=e.polygonHierarchy,n=g(e.vertexFormat,et.DEFAULT),i=g(e.ellipsoid,he.default),o=g(e.granularity,O.RADIANS_PER_DEGREE),r=g(e.stRotation,0),s=e.textureCoordinates,a=g(e.perPositionHeight,!1),l=a&&c(e.extrudedHeight);let u=g(e.height,0),d=g(e.extrudedHeight,u);if(!l){const h=Math.max(u,d);d=Math.min(u,d),u=h}this._vertexFormat=et.clone(n),this._ellipsoid=he.clone(i),this._granularity=o,this._stRotation=r,this._height=u,this._extrudedHeight=d,this._closeTop=g(e.closeTop,!0),this._closeBottom=g(e.closeBottom,!0),this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=l,this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=g(e.arcType,ni.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=s,this.packedLength=si.computeHierarchyPackedLength(t,f)+he.packedLength+et.packedLength+(s?si.computeHierarchyPackedLength(s,V):1)+12}Wl.fromPositions=function(e){return e=g(e,g.EMPTY_OBJECT),A.defined("options.positions",e.positions),new Wl({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,textureCoordinates:e.textureCoordinates})},Wl.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),n=si.packPolygonHierarchy(e._polygonHierarchy,t,n,f),he.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=he.packedLength),n+=et.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._stRotation,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._closeTop?1:0,t[n++]=e._closeBottom?1:0,t[n++]=e._shadowVolume?1:0,t[n++]=g(e._offsetAttribute,-1),t[n++]=e._arcType,c(e._textureCoordinates)?n=si.packPolygonHierarchy(e._textureCoordinates,t,n,V):t[n++]=-1,t[n++]=e.packedLength,t};const qye=he.clone(he.UNIT_SPHERE),Yye=new et,Xye={polygonHierarchy:{}};Wl.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=si.unpackPolygonHierarchy(e,t,f);t=i.startingIndex,delete i.startingIndex;const o=he.unpack(e,t,qye),r=et.unpack(e,t+=he.packedLength,Yye);t+=et.packedLength;const s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=1===e[t++],h=1===e[t++],m=1===e[t++],_=1===e[t++],p=1===e[t++],y=e[t++],b=e[t++],x=-1===e[t]?void 0:si.unpackPolygonHierarchy(e,t,V);c(x)?(t=x.startingIndex,delete x.startingIndex):t++;const C=e[t++];return c(n)||(n=new Wl(Xye)),n._polygonHierarchy=i,n._ellipsoid=he.clone(o,n._ellipsoid),n._vertexFormat=et.clone(r,n._vertexFormat),n._height=s,n._extrudedHeight=a,n._granularity=l,n._stRotation=u,n._perPositionHeightExtrude=d,n._perPositionHeight=h,n._closeTop=m,n._closeBottom=_,n._shadowVolume=p,n._offsetAttribute=-1===y?void 0:y,n._arcType=b,n._textureCoordinates=x,n.packedLength=C,n};const Zye=new V,$ye=new V,Kye=new jl;function Y5(e,t,n,i,o,r){const s=e.longitude,a=s>=0?s:s+O.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);const l=e.getLatitude(n);let u=l;if(r.south=Math.min(r.south,l),r.north=Math.max(r.north,l),i!==ni.RHUMB){const m=V.subtract(t.position,e.position,Zye),_=V.dot(t.position,m)/V.dot(m,m);if(_>0&&_<1){const p=V.add(t.position,V.multiplyByScalar(m,-_,m),$ye),y=jl.clone(t,Kye);y.position=p;const b=y.getLatitude(n);r.south=Math.min(r.south,b),r.north=Math.max(r.north,b),Math.abs(l)>Math.abs(b)&&(u=b)}}let h=Math.sign(t.x*e.y-e.x*t.y);0!==h&&(h*=V.angleBetween(t.position,e.position)),u>=0&&(o.northAngle+=h),u<=0&&(o.southAngle+=h)}const X5=new jl,Qye=new jl,ql={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};Wl.computeRectangleFromPositions=function(e,t,n,i){if(A.defined("positions",e),c(i)||(i=new Te),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,ql.northAngle=0,ql.southAngle=0,ql.westOverIdl=Number.POSITIVE_INFINITY,ql.eastOverIdl=Number.NEGATIVE_INFINITY;const o=e.length;let r=jl.fromCartesian(e[0],Qye);for(let s=1;s<o;s++){const a=jl.fromCartesian(e[s],X5);Y5(a,r,t,n,ql,i),r=jl.clone(a,r)}return Y5(jl.fromCartesian(e[0],X5),r,t,n,ql,i),i.east-i.west>ql.eastOverIdl-ql.westOverIdl&&(i.west=ql.westOverIdl,i.east=ql.eastOverIdl,i.east>O.PI&&(i.east=i.east-O.TWO_PI),i.west>O.PI&&(i.west=i.west-O.TWO_PI)),O.equalsEpsilon(Math.abs(ql.northAngle),O.TWO_PI,O.EPSILON10)&&(i.north=O.PI_OVER_TWO,i.east=O.PI,i.west=-O.PI),O.equalsEpsilon(Math.abs(ql.southAngle),O.TWO_PI,O.EPSILON10)&&(i.south=-O.PI_OVER_TWO,i.east=O.PI,i.west=-O.PI),i};const Jye=new jl;function e0e(e,t,n){return e.height>=O.PI||e.width>=O.PI?jl.fromCartesian(t[0],Jye).tangentPlane:el.fromPoints(t,n)}const Z5=new Ce;function n0e(e,t,n){if(e.height>=O.PI||e.width>=O.PI)return(o,r)=>{if(e.south<0&&e.north>0){const s=n.cartesianToCartographic(o,Z5);return c(r)||(r=new V),r.x=s.longitude/O.PI,r.y=s.latitude/O.PI_OVER_TWO,r}return jl.fromCartesian(o,r)};const i=el.fromPoints(t,n);return(o,r)=>i.projectPointsOntoPlane(o,r)}Wl.createGeometry=function(e){const t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,l=e._closeBottom,u=e._arcType,d=e._textureCoordinates,h=c(d),m=r.positions;if(m.length<3)return;const _=e.rectangle,p=si.polygonsFromHierarchy(r,h,function t0e(e,t,n){return(i,o)=>{if(e.height>=O.PI||e.width>=O.PI){if(e.south<0&&e.north>0){c(o)||(o=[]);for(let s=0;s<i.length;++s){const a=n.cartesianToCartographic(i[s],Z5);o[s]=new V(a.longitude/O.PI,a.latitude/O.PI_OVER_TWO)}return o.length=i.length,o}return jl.fromCartesianArray(i,o)}return el.fromPoints(t,n).projectPointsOntoPlane(i,o)}}(_,m,n),!s,n,function i0e(e,t,n,i){return(o,r)=>!i&&(e.height>=O.PI_OVER_TWO||e.width>=2*O.PI_OVER_THREE)?si.splitPolygonsOnEquator(o,t,n,r):o}(_,n,u,s)),y=p.hierarchy,b=p.polygons,C=h?si.polygonsFromHierarchy(d,!0,function(M){return M},!1,n).polygons:void 0;if(0===y.length)return;const w=y[0].outerRing,v=function o0e(e,t,n,i){if(t.height>=O.PI||t.width>=O.PI)return Vt.fromRectangle(t,void 0,j5);const o=e,r=el.fromPoints(o,n);return si.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),o,i,j5)}(w,_,n,o),I=[],P=e._height,N=e._extrudedHeight,R=e._perPositionHeightExtrude||!O.equalsEpsilon(P,N,0,O.EPSILON2),B={perPositionHeight:s,vertexFormat:t,geometry:void 0,rotationAxis:e0e(_,w,n).plane.normal,projectTo2d:n0e(_,w,n),boundingRectangle:v,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u};let F;if(R)for(B.extrude=!0,B.top=a,B.bottom=l,B.shadowVolume=e._shadowVolume,B.offsetAttribute=e._offsetAttribute,F=0;F<b.length;F++){const M=Wye(n,b[F],h?C[F]:void 0,i,y[F],s,a,l,t,u);let U;a&&l?(U=M.topAndBottom,B.geometry=si.scaleToGeodeticHeightExtruded(U.geometry,P,N,n,s)):a?(U=M.topAndBottom,U.geometry.attributes.position.values=po.scaleToGeodeticHeight(U.geometry.attributes.position.values,P,n,!s),B.geometry=U.geometry):l&&(U=M.topAndBottom,U.geometry.attributes.position.values=po.scaleToGeodeticHeight(U.geometry.attributes.position.values,N,n,!0),B.geometry=U.geometry),(a||l)&&(B.wall=!1,U.geometry=TL(B),I.push(U));const z=M.walls;B.wall=!0;for(let G=0;G<z.length;G++){const W=z[G];B.geometry=si.scaleToGeodeticHeightExtruded(W.geometry,P,N,n,s),W.geometry=TL(B),I.push(W)}}else for(F=0;F<b.length;F++){const M=new zn({geometry:si.createGeometryFromPositions(n,b[F],h?C[F]:void 0,i,s,t,u)});if(M.geometry.attributes.position.values=po.scaleToGeodeticHeight(M.geometry.attributes.position.values,P,n,!s),B.geometry=M.geometry,M.geometry=TL(B),c(e._offsetAttribute)){const z=e._offsetAttribute===Xn.NONE?0:1,G=new Uint8Array(M.geometry.attributes.position.values.length/3).fill(z);M.geometry.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:G})}I.push(M)}const S=ao.combineInstances(I)[0];S.attributes.position.values=new Float64Array(S.attributes.position.values),S.indices=Ot.createTypedArray(S.attributes.position.values.length/3,S.indices);const D=S.attributes,L=Ae.fromVertices(D.position.values);return t.position||delete D.position,new En({attributes:D,indices:S.indices,primitiveType:S.primitiveType,boundingSphere:L,offsetAttribute:e._offsetAttribute})},Wl.createShadowVolume=function(e,t,n){const i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Wl({polygonHierarchy:e._polygonHierarchy,ellipsoid:o,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:r,height:s,vertexFormat:et.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(Wl.prototype,{rectangle:{get:function(){return c(this._rectangle)||(this._rectangle=Wl.computeRectangleFromPositions(this._polygonHierarchy.positions,this._ellipsoid,this._arcType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return c(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function r0e(e){const t=-e._stRotation;return 0===t?[0,0,0,1,1,0]:En._textureCoordinateRotationPoints(e._polygonHierarchy.positions,t,e._ellipsoid,e.rectangle)}(this)),this._textureCoordinateRotationPoints}}});const YS=Wl;function W_(e){A.typeOf.object("options",e),A.typeOf.object("options.positions",e.positions),A.typeOf.number.greaterThanOrEquals("options.positions.length",e.positions.length,3),this._ellipsoid=g(e.ellipsoid,he.default),this._positions=[...e.positions]}Object.defineProperties(W_.prototype,{length:{get:function(){return this._positions.length}},positions:{get:function(){return this._positions}},ellipsoid:{get:function(){return this._ellipsoid}}}),W_.clone=function(e,t){return A.typeOf.object("polygon",e),c(t)?(t._ellipsoid=e.ellipsoid,t._positions.length=0,t._positions.push(...e.positions),t):new W_({positions:e.positions,ellipsoid:e.ellipsoid})},W_.equals=function(e,t){return A.typeOf.object("left",e),A.typeOf.object("right",t),e.ellipsoid.equals(t.ellipsoid)&&e.positions===t.positions},W_.prototype.computeRectangle=function(e){return YS.computeRectangleFromPositions(this.positions,this.ellipsoid,void 0,e)};const s0e=new Te,$5=new f;W_.prototype.computeSphericalExtents=function(e){c(e)||(e=new Te);const t=this.computeRectangle(s0e);let n=Ce.toCartesian(Te.southwest(t),this.ellipsoid,$5),i=Math.sqrt(n.x*n.x+n.y*n.y),o=O.fastApproximateAtan2(i,n.z),r=O.fastApproximateAtan2(n.x,n.y);return e.south=o,e.west=r,n=Ce.toCartesian(Te.northeast(t),this.ellipsoid,$5),i=Math.sqrt(n.x*n.x+n.y*n.y),o=O.fastApproximateAtan2(i,n.z),r=O.fastApproximateAtan2(n.x,n.y),e.north=o,e.east=r,e};const K5=W_;function Dr(e){e=g(e,g.EMPTY_OBJECT),this._polygons=[],this._totalPositions=0,this.enabled=g(e.enabled,!0),this.inverse=g(e.inverse,!1),this.polygonAdded=new Ye,this.polygonRemoved=new Ye,this._owner=void 0,this._float32View=void 0,this._extentsFloat32View=void 0,this._extentsCount=0,this._polygonsTexture=void 0,this._extentsTexture=void 0,this._signedDistanceTexture=void 0,this._signedDistanceComputeCommand=void 0;const t=e.polygons;if(c(t)){const n=t.length;for(let i=0;i<n;++i)this._polygons.push(t[i])}}Object.defineProperties(Dr.prototype,{length:{get:function(){return this._polygons.length}},totalPositions:{get:function(){return this._totalPositions}},extentsTexture:{get:function(){return this._extentsTexture}},extentsCount:{get:function(){return this._extentsCount}},pixelsNeededForExtents:{get:function(){return this.length}},pixelsNeededForPolygonPositions:{get:function(){return this.totalPositions+this.length}},clippingTexture:{get:function(){return this._signedDistanceTexture}},owner:{get:function(){return this._owner}},clippingPolygonsState:{get:function(){return this.inverse?-this.extentsCount:this.extentsCount}}}),Dr.prototype.add=function(e){A.typeOf.object("polygon",e);const t=this._polygons.length;return this._polygons.push(e),this.polygonAdded.raiseEvent(e,t),e},Dr.prototype.get=function(e){return A.typeOf.number("index",e),this._polygons[e]},Dr.prototype.contains=function(e){return A.typeOf.object("polygon",e),this._polygons.some(t=>K5.equals(t,e))},Dr.prototype.remove=function(e){A.typeOf.object("polygon",e);const t=this._polygons,n=t.findIndex(i=>K5.equals(i,e));return-1!==n&&(t.splice(n,1),this.polygonRemoved.raiseEvent(e,n),!0)};const c0e=new Te;Dr.prototype.removeAll=function(){const e=this._polygons,t=e.length;for(let n=0;n<t;++n)this.polygonRemoved.raiseEvent(e[n],n);this._polygons=[]};const AL=new V;Dr.prototype.update=function(e){const t=e.context;if(!Dr.isSupported(e))throw new Pe("ClippingPolygonCollections are only supported for WebGL 2.");const n=this._polygons.reduce((s,a)=>s+a.length,0);if(n===this.totalPositions||(this._totalPositions=n,0===this.length))return;c(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0,this._signedDistanceComputeCommand=void 0);let i=this._polygonsTexture,o=this._extentsTexture,r=this._signedDistanceTexture;if(c(i)){const s=i.width*i.height;(s<this.pixelsNeededForPolygonPositions||this.pixelsNeededForPolygonPositions<.25*s)&&(i.destroy(),i=void 0,this._polygonsTexture=void 0)}if(!c(i)){const s=Dr.getTextureResolution(i,this.pixelsNeededForPolygonPositions,AL);i=new Mn({context:t,width:s.x,height:s.y,pixelFormat:Ct.RG,pixelDatatype:yt.FLOAT,sampler:vi.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*2),this._polygonsTexture=i}if(c(o)){const s=o.width*o.height;(s<this.pixelsNeededForExtents||this.pixelsNeededForExtents<.25*s)&&(o.destroy(),o=void 0,this._extentsTexture=void 0)}if(!c(o)){const s=Dr.getTextureResolution(o,this.pixelsNeededForExtents,AL);o=new Mn({context:t,width:s.x,height:s.y,pixelFormat:Ct.RGBA,pixelDatatype:yt.FLOAT,sampler:vi.NEAREST,flipY:!1}),this._extentsFloat32View=new Float32Array(s.x*s.y*4),this._extentsTexture=o}if(function u0e(e){const t=e._float32View,n=e._extentsFloat32View,i=e._polygons,{extentsList:o,extentsIndexByPolygon:r}=function l0e(e){const t=[],n=[],i=e.length;for(let r=0;r<i;++r){const a=e[r].computeSphericalExtents();let l=Math.max(2.5*a.height,.001),u=Math.max(2.5*a.width,.001),d=Te.clone(a);d.south-=l,d.west-=u,d.north+=l,d.east+=u,d.south=Math.max(d.south,-Math.PI),d.west=Math.max(d.west,-Math.PI),d.north=Math.min(d.north,Math.PI),d.east=Math.min(d.east,Math.PI);const h=[r];for(let m=0;m<t.length;++m){const _=t[m];if(c(_)&&c(Te.simpleIntersection(_,d))&&!Te.equals(_,d)){const p=n[m];h.push(...p),p.reduce((y,b)=>Te.union(e[b].computeSphericalExtents(c0e),y,y),a),t[m]=void 0,n[m]=void 0,l=Math.max(2.5*a.height,.001),u=Math.max(2.5*a.width,.001),d=Te.clone(a,d),d.south-=l,d.west-=u,d.north+=l,d.east+=u,d.south=Math.max(d.south,-Math.PI),d.west=Math.max(d.west,-Math.PI),d.north=Math.min(d.north,Math.PI),d.east=Math.min(d.east,Math.PI),m=-1}}t.push(d),n.push(h)}const o=new Map;return n.filter(c).forEach((r,s)=>r.forEach(a=>o.set(a,s))),{extentsList:t.filter(c),extentsIndexByPolygon:o}}(i);let s=0;for(const[l,u]of i.entries()){const d=u.length;t[s++]=d,t[s++]=r.get(l);for(let h=0;h<d;++h){const m=u.positions[h],_=Math.hypot(m.x,m.y),p=O.fastApproximateAtan2(_,m.z),y=O.fastApproximateAtan2(m.x,m.y);t[s++]=p,t[s++]=y}}let a=0;for(const l of o){const u=1/(l.east-l.west),d=1/(l.north-l.south);n[a++]=l.south,n[a++]=l.west,n[a++]=d,n[a++]=u}e._extentsCount=o.length}(this),o.copyFrom({source:{width:o.width,height:o.height,arrayBufferView:this._extentsFloat32View}}),i.copyFrom({source:{width:i.width,height:i.height,arrayBufferView:this._float32View}}),!c(r)){const s=Dr.getClippingDistanceTextureResolution(this,AL);r=new Mn({context:t,width:s.x,height:s.y,pixelFormat:t.webgl2?Ct.RED:Ct.LUMINANCE,pixelDatatype:yt.FLOAT,sampler:new vi({wrapS:zi.CLAMP_TO_EDGE,wrapT:zi.CLAMP_TO_EDGE,minificationFilter:Kn.LINEAR,magnificationFilter:Jr.LINEAR}),flipY:!1}),this._signedDistanceTexture=r}this._signedDistanceComputeCommand=function d0e(e){const t=e._polygonsTexture,n=e._extentsTexture;return new mA({fragmentShaderSource:"in vec2 v_textureCoordinates;\n\nuniform int u_polygonsLength;\nuniform int u_extentsLength;\nuniform highp sampler2D u_polygonTexture;\nuniform highp sampler2D u_extentsTexture;\n\nint getPolygonIndex(float dimension, vec2 coord) {\n vec2 uv = coord.xy * dimension;\n return int(floor(uv.y) * dimension + floor(uv.x));\n}\n\nvec2 getLookupUv(ivec2 dimensions, int i) {\n int pixY = i / dimensions.x;\n int pixX = i - (pixY * dimensions.x);\n float pixelWidth = 1.0 / float(dimensions.x);\n float pixelHeight = 1.0 / float(dimensions.y);\n float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel\n float v = (float(pixY) + 0.5) * pixelHeight;\n return vec2(u, v);\n}\n\nvec4 getExtents(int i) {\n return texture(u_extentsTexture, getLookupUv(textureSize(u_extentsTexture, 0), i));\n}\n\nivec2 getPositionsLengthAndExtentsIndex(int i) {\n vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);\n vec4 value = texture(u_polygonTexture, uv);\n return ivec2(int(value.x), int(value.y));\n}\n\nvec2 getPolygonPosition(int i) {\n vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);\n return texture(u_polygonTexture, uv).xy;\n}\n\nvec2 getCoordinates(vec2 textureCoordinates, vec4 extents) {\n float latitude = mix(extents.x, extents.x + 1.0 / extents.z, textureCoordinates.y);\n float longitude = mix(extents.y, extents.y + 1.0 / extents.w, textureCoordinates.x);\n return vec2(latitude, longitude);\n}\n\nvoid main() {\n int lastPolygonIndex = 0;\n out_FragColor = vec4(1.0);\n\n // Get the relevant region of the texture\n float dimension = float(u_extentsLength);\n if (u_extentsLength > 2) {\n dimension = ceil(log2(float(u_extentsLength)));\n }\n int regionIndex = getPolygonIndex(dimension, v_textureCoordinates);\n\n for (int polygonIndex = 0; polygonIndex < u_polygonsLength; polygonIndex++) {\n ivec2 positionsLengthAndExtents = getPositionsLengthAndExtentsIndex(lastPolygonIndex);\n int positionsLength = positionsLengthAndExtents.x;\n int polygonExtentsIndex = positionsLengthAndExtents.y;\n lastPolygonIndex += 1;\n\n // Only compute signed distance for the relevant part of the atlas\n if (polygonExtentsIndex == regionIndex) {\n float clipAmount = czm_infinity;\n vec4 extents = getExtents(polygonExtentsIndex);\n vec2 textureOffset = vec2(mod(float(polygonExtentsIndex), dimension), floor(float(polygonExtentsIndex) / dimension)) / dimension;\n vec2 p = getCoordinates((v_textureCoordinates - textureOffset) * dimension, extents);\n float s = 1.0;\n\n // Check each edge for absolute distance\n for (int i = 0, j = positionsLength - 1; i < positionsLength; j = i, i++) {\n vec2 a = getPolygonPosition(lastPolygonIndex + i);\n vec2 b = getPolygonPosition(lastPolygonIndex + j);\n \n vec2 ab = b - a;\n vec2 pa = p - a;\n float t = dot(pa, ab) / dot(ab, ab);\n t = clamp(t, 0.0, 1.0);\n\n vec2 pq = pa - t * ab;\n float d = length(pq);\n\n // Inside / outside computation to determine sign\n bvec3 cond = bvec3(p.y >= a.y, \n p.y < b.y, \n ab.x * pa.y > ab.y * pa.x);\n if (all(cond) || all(not(cond))) s = -s;\n if (abs(d) < abs(clipAmount)) {\n clipAmount = d;\n }\n }\n\n // Normalize the range to [0,1]\n vec4 result = (s * vec4(clipAmount * length(extents.zw))) / 2.0 + 0.5;\n // In the case where we've iterated through multiple polygons, take the minimum\n out_FragColor = min(out_FragColor, result);\n }\n\n lastPolygonIndex += positionsLength;\n }\n}",outputTexture:e._signedDistanceTexture,uniformMap:{u_polygonsLength:function(){return e.length},u_extentsLength:function(){return e.extentsCount},u_extentsTexture:function(){return n},u_polygonTexture:function(){return t}},persists:!1,owner:e,postExecute:()=>{e._signedDistanceComputeCommand=void 0}})}(this)},Dr.prototype.queueCommands=function(e){c(this._signedDistanceComputeCommand)&&e.commandList.push(this._signedDistanceComputeCommand)};const Q5=new Te,f0e=new Te;Dr.prototype.computeIntersectionWithBoundingVolume=function(e,t){const n=this._polygons,i=n.length;let o=On.OUTSIDE;this.inverse&&(o=On.INSIDE);for(let r=0;r<i;++r){const a=n[r].computeRectangle();let l=e.rectangle;if(!c(l)&&c(e.boundingVolume?.computeCorners)){const d=e.boundingVolume.computeCorners();l=Te.fromCartesianArray(d,t,Q5)}c(l)||(l=Te.fromBoundingSphere(e.boundingSphere,t,Q5));const u=Te.simpleIntersection(l,a,f0e);c(u)&&(o=On.INTERSECTING)}return o},Dr.setOwner=function(e,t,n){if(e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),c(e))){if(c(e._owner))throw new E("ClippingPolygonCollection should only be assigned to one object");e._owner=t,t[n]=e}},Dr.isSupported=function(e){return e?.context.webgl2},Dr.getTextureResolution=function(e,t,n){return c(e)?(n.x=e.width,n.y=e.height,n):(n.x=Math.min(t,dn.maximumTextureSize),n.y=Math.ceil(t/n.x),n.y*=2,n)},Dr.getClippingDistanceTextureResolution=function(e,t){const n=e.signedDistanceTexture;return c(n)?(t.x=n.width,t.y=n.height,t):(t.x=Math.min(dn.maximumTextureSize,4096),t.y=Math.min(dn.maximumTextureSize,4096),t)},Dr.getClippingExtentsTextureResolution=function(e,t){const n=e.extentsTexture;return c(n)?(t.x=n.width,t.y=n.height,t):Dr.getTextureResolution(n,e.pixelsNeededForExtents,t)},Dr.prototype.isDestroyed=function(){return!1},Dr.prototype.destroy=function(){return c(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0),this._polygonsTexture=this._polygonsTexture&&this._polygonsTexture.destroy(),this._extentsTexture=this._extentsTexture&&this._extentsTexture.destroy(),this._signedDistanceTexture=this._signedDistanceTexture&&this._signedDistanceTexture.destroy(),Xe(this)};const zA=Dr,VA={HIGHLIGHT:0,REPLACE:1,MIX:2,getColorBlend:function(e,t){return e===VA.HIGHLIGHT?0:e===VA.REPLACE?1:e===VA.MIX?O.clamp(t,O.EPSILON4,1):void 0}},XS=Object.freeze(VA),qu=Object.freeze({XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"}),E0=Object.freeze({STEP:0,LINEAR:1,CUBICSPLINE:2}),J5={};function HA(e){A.typeOf.number.greaterThan("options.count",e.count,0),A.typeOf.object("options.properties",e.properties),this._count=e.count,this._properties=Rt(e.properties,!0)}HA.prototype.hasProperty=function(e){return fi.hasProperty(e,this._properties,J5)},HA.prototype.getPropertyIds=function(e){return fi.getPropertyIds(this._properties,J5,e)},HA.prototype.getProperty=function(e,t){if(A.typeOf.number("index",e),A.typeOf.string("propertyId",t),e<0||e>=this._count)throw new E(`index must be in the range [0, ${this._count})`);const n=this._properties[t];if(c(n))return Rt(n[e],!0)},HA.prototype.setProperty=function(e,t,n){if(A.typeOf.number("index",e),A.typeOf.string("propertyId",t),e<0||e>=this._count)throw new E(`index must be in the range [0, ${this._count})`);let i=this._properties[t];c(i)||(i=new Array(this._count),this._properties[t]=i),i[e]=Rt(n,!0)};const xL=HA;function wa(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.number("options.count",e.count),this._name=e.name,this._id=e.id,this._count=e.count,this._extras=e.extras,this._extensions=e.extensions,this._metadataTable=e.metadataTable,this._jsonMetadataTable=e.jsonMetadataTable,this._batchTableHierarchy=e.batchTableHierarchy}Object.defineProperties(wa.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},count:{get:function(){return this._count}},class:{get:function(){if(c(this._metadataTable))return this._metadataTable.class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){let e=0;return c(this._metadataTable)&&(e+=this._metadataTable.byteLength),c(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e}}}),wa.prototype.hasProperty=function(e,t){return A.typeOf.number("index",e),A.typeOf.string("propertyId",t),!!(c(this._metadataTable)&&this._metadataTable.hasProperty(t)||c(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)||c(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(t))},wa.prototype.hasPropertyBySemantic=function(e,t){return A.typeOf.number("index",e),A.typeOf.string("semantic",t),!!c(this._metadataTable)&&this._metadataTable.hasPropertyBySemantic(t)},wa.prototype.propertyExists=function(e){return A.typeOf.string("propertyId",e),!!(c(this._metadataTable)&&this._metadataTable.hasProperty(e)||c(this._batchTableHierarchy)&&this._batchTableHierarchy.propertyExists(e)||c(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(e))},wa.prototype.propertyExistsBySemantic=function(e){return A.typeOf.string("semantic",e),!!c(this._metadataTable)&&this._metadataTable.hasPropertyBySemantic(e)};const CL=[];function EL(e,t){if(!c(e)||e<0||e>=t)throw new E(`featureId is required and must be between zero and featuresLength - 1 (${t}`-NaN)}wa.prototype.getPropertyIds=function(e,t){return(t=c(t)?t:[]).length=0,c(this._metadataTable)&&t.push.apply(t,this._metadataTable.getPropertyIds(CL)),c(this._batchTableHierarchy)&&t.push.apply(t,this._batchTableHierarchy.getPropertyIds(e,CL)),c(this._jsonMetadataTable)&&t.push.apply(t,this._jsonMetadataTable.getPropertyIds(CL)),t},wa.prototype.getProperty=function(e,t){let n;if(c(this._metadataTable)&&(n=this._metadataTable.getProperty(e,t),c(n))||c(this._batchTableHierarchy)&&(n=this._batchTableHierarchy.getProperty(e,t),c(n))||c(this._jsonMetadataTable)&&(n=this._jsonMetadataTable.getProperty(e,t),c(n)))return n},wa.prototype.setProperty=function(e,t,n){c(this._metadataTable)&&this._metadataTable.setProperty(e,t,n)||c(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n)||(c(this._jsonMetadataTable)||(this._jsonMetadataTable=new xL({count:this._count,properties:{}})),this._jsonMetadataTable.setProperty(e,t,n))},wa.prototype.getPropertyBySemantic=function(e,t){if(c(this._metadataTable))return this._metadataTable.getPropertyBySemantic(e,t)},wa.prototype.setPropertyBySemantic=function(e,t,n){return!!c(this._metadataTable)&&this._metadataTable.setPropertyBySemantic(e,t,n)},wa.prototype.getPropertyTypedArray=function(e){if(A.typeOf.string("propertyId",e),c(this._metadataTable))return this._metadataTable.getPropertyTypedArray(e)},wa.prototype.getPropertyTypedArrayBySemantic=function(e){if(A.typeOf.string("semantic",e),c(this._metadataTable))return this._metadataTable.getPropertyTypedArrayBySemantic(e)},wa.prototype.isClass=function(e,t){EL(e,this.count),A.typeOf.string("className",t);const n=this._batchTableHierarchy;return!!c(n)&&n.isClass(e,t)},wa.prototype.isExactClass=function(e,t){return EL(e,this.count),A.typeOf.string("className",t),this.getExactClassName(e)===t},wa.prototype.getExactClassName=function(e){EL(e,this.count);const t=this._batchTableHierarchy;if(c(t))return t.getClassName(e)};const w0=wa;function GA(e){const t=(e=g(e,g.EMPTY_OBJECT)).property,n=e.classProperty,i=e.textures;A.typeOf.object("options.property",t),A.typeOf.object("options.classProperty",n),A.typeOf.object("options.textures",i);const o=c(t.channels)?t.channels:[0],r=t,s=F_.createModelTextureReader({textureInfo:r,channels:m0e(o),texture:i[r.index]});this._min=t.min,this._max=t.max;let a=t.offset,l=t.scale;const u=n.hasValueTransform||c(a)||c(l);a=g(a,n.offset),l=g(l,n.scale),a=n.unpackVectorAndMatrixTypes(a),l=n.unpackVectorAndMatrixTypes(l),this._offset=a,this._scale=l,this._hasValueTransform=u,this._textureReader=s,this._classProperty=n,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(GA.prototype,{textureReader:{get:function(){return this._textureReader}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),GA.prototype.isGpuCompatible=function(){const e=this._classProperty,t=e.type,n=e.componentType;return e.isArray?!e.isVariableLengthArray&&e.arrayLength<=4&&t===Tn.SCALAR&&n===vn.UINT8:!(!Tn.isVectorType(t)&&t!==Tn.SCALAR)&&n===vn.UINT8};const h0e=[void 0,"float","vec2","vec3","vec4"],p0e=[void 0,"int","ivec2","ivec3","ivec4"];function m0e(e){return e.map(function(t){return"rgba".charAt(t)}).join("")}GA.prototype.getGlslType=function(){const e=this._classProperty;let t=Tn.getComponentCount(e.type);return e.isArray&&(t=e.arrayLength),e.normalized?h0e[t]:p0e[t]},GA.prototype.unpackInShader=function(e){return this._classProperty.normalized?e:`${this.getGlslType()}(255.0 * ${e})`};const _0e=GA;function wL(e){const t=(e=g(e,g.EMPTY_OBJECT)).propertyTexture,n=e.class,i=e.textures;A.typeOf.object("options.propertyTexture",t),A.typeOf.object("options.class",n),A.typeOf.object("options.textures",i);const o=t.extensions,r=t.extras,s={};if(c(t.properties))for(const a in t.properties)t.properties.hasOwnProperty(a)&&(s[a]=new _0e({property:t.properties[a],classProperty:n.properties[a],textures:i}));this._name=e.name,this._id=e.id,this._class=n,this._properties=s,this._extras=r,this._extensions=o}Object.defineProperties(wL.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),wL.prototype.getProperty=function(e){return A.typeOf.string("propertyId",e),this._properties[e]};const eG=wL;function tG(e){const t=(e=g(e,g.EMPTY_OBJECT)).property,n=e.classProperty;A.typeOf.object("options.property",t),A.typeOf.object("options.classProperty",n),this._attribute=t.attribute,this._classProperty=n,this._min=t.min,this._max=t.max;let i=t.offset,o=t.scale;const r=n.hasValueTransform||c(i)||c(o);i=g(i,n.offset),o=g(o,n.scale),i=n.unpackVectorAndMatrixTypes(i),o=n.unpackVectorAndMatrixTypes(o),this._offset=i,this._scale=o,this._hasValueTransform=r,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(tG.prototype,{attribute:{get:function(){return this._attribute}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});const g0e=tG;function SL(e){const t=(e=g(e,g.EMPTY_OBJECT)).propertyAttribute,n=e.class;A.typeOf.object("options.propertyAttribute",t),A.typeOf.object("options.class",n);const i={};if(c(t.properties))for(const o in t.properties)t.properties.hasOwnProperty(o)&&(i[o]=new g0e({property:t.properties[o],classProperty:n.properties[o]}));this._name=e.name,this._id=e.id,this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(SL.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),SL.prototype.getProperty=function(e){return A.typeOf.string("propertyId",e),this._properties[e]};const nG=SL;function jA(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.schema",e.schema),this._schema=e.schema;const t=e.propertyTables;this._propertyTableCount=c(t)?t.length:0,this._propertyTables=t,this._propertyTextures=e.propertyTextures,this._propertyAttributes=e.propertyAttributes,this._statistics=e.statistics,this._extras=e.extras,this._extensions=e.extensions}Object.defineProperties(jA.prototype,{schema:{get:function(){return this._schema}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},propertyTableCount:{get:function(){return this._propertyTableCount}},propertyTables:{get:function(){return this._propertyTables}},propertyTextures:{get:function(){return this._propertyTextures}},propertyAttributes:{get:function(){return this._propertyAttributes}},propertyTablesByteLength:{get:function(){if(!c(this._propertyTables))return 0;let e=0;const t=this._propertyTables.length;for(let n=0;n<t;n++)e+=this._propertyTables[n].byteLength;return e}}}),jA.prototype.getPropertyTable=function(e){return A.typeOf.number("propertyTableId",e),this._propertyTables[e]},jA.prototype.getPropertyTexture=function(e){return A.typeOf.number("propertyTextureId",e),this._propertyTextures[e]},jA.prototype.getPropertyAttribute=function(e){return A.typeOf.number("propertyAttributeId",e),this._propertyAttributes[e]};const q_=jA;function A0e(e){const t={class:e.class,properties:{}},n=e.properties;for(const i in n)if(n.hasOwnProperty(i)){const o=n[i],r={channels:x0e(o.channels),extras:o.extras,extensions:o.extensions};t.properties[i]=Pn(o.texture,r,!0)}return t}function x0e(e){const t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]="rgba".indexOf(e[i]);return n}function Gp(e){e=g(e,g.EMPTY_OBJECT);const{gltf:t,extension:n,extensionLegacy:i,gltfResource:o,baseResource:r,supportedImageFormats:s,frameState:a,cacheKey:l,asynchronous:u=!0}=e;if(A.typeOf.object("options.gltf",t),A.typeOf.object("options.gltfResource",o),A.typeOf.object("options.baseResource",r),A.typeOf.object("options.supportedImageFormats",s),A.typeOf.object("options.frameState",a),!c(e.extension)&&!c(e.extensionLegacy))throw new E("One of options.extension or options.extensionLegacy must be specified");this._gltfResource=o,this._baseResource=r,this._gltf=t,this._extension=n,this._extensionLegacy=i,this._supportedImageFormats=s,this._frameState=a,this._cacheKey=l,this._asynchronous=u,this._bufferViewLoaders=[],this._bufferViewIds=[],this._textureLoaders=[],this._textureIds=[],this._schemaLoader=void 0,this._structuralMetadata=void 0,this._state=rn.UNLOADED,this._promise=void 0}function vL(){return vL=(0,we.Z)(function*(e){try{const t=function D0e(e){return IL.apply(this,arguments)}(e),n=function N0e(e){let t;t=c(e._extension)?function P0e(e){const t={},n=e.propertyTextures;if(c(n))for(let i=0;i<n.length;i++){const r=n[i].properties;c(r)&&O0e(r,t)}return t}(e._extension):function R0e(e){const t={},n=e.featureTextures;if(c(n))for(const i in n)if(n.hasOwnProperty(i)){const r=n[i].properties;c(r)&&L0e(r,t)}return t}(e._extensionLegacy);const n=e._gltf,i=e._gltfResource,o=e._baseResource,r=e._supportedImageFormats,s=e._frameState,a=e._asynchronous,l=[];for(const u in t)if(t.hasOwnProperty(u)){const d=Ir.getTextureLoader({gltf:n,textureInfo:t[u],gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s,asynchronous:a});e._textureLoaders.push(d),e._textureIds.push(u),l.push(d.load())}return Promise.all(l)}(e),i=function M0e(e){return DL.apply(this,arguments)}(e);return yield Promise.all([t,n,i]),e.isDestroyed()?void 0:(e._gltf=void 0,e._state=rn.LOADED,e)}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=rn.FAILED,e.getError("Failed to load structural metadata",t)}}),vL.apply(this,arguments)}function w0e(e,t){for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],o=i.values,r=i.arrayOffsets,s=i.stringOffsets;c(o)&&(t[o]=!0),c(r)&&(t[r]=!0),c(s)&&(t[s]=!0)}}function S0e(e,t){for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],o=i.bufferView,r=i.arrayOffsetBufferView,s=i.stringOffsetBufferView;c(o)&&(t[o]=!0),c(r)&&(t[r]=!0),c(s)&&(t[s]=!0)}}function IL(){return(IL=(0,we.Z)(function*(e){let t;t=c(e._extension)?function v0e(e){const t=e.propertyTables,n={};if(c(t))for(let i=0;i<t.length;i++)w0e(t[i].properties,n);return n}(e._extension):function I0e(e){const t=e.featureTables,n={};if(c(t))for(const i in t)if(t.hasOwnProperty(i)){const r=t[i].properties;c(r)&&S0e(r,n)}return n}(e._extensionLegacy);const n=[];for(const i in t)if(t.hasOwnProperty(i)){const o=Ir.getBufferViewLoader({gltf:e._gltf,bufferViewId:parseInt(i),gltfResource:e._gltfResource,baseResource:e._baseResource});e._bufferViewLoaders.push(o),e._bufferViewIds.push(i),n.push(o.load())}return Promise.all(n)})).apply(this,arguments)}function O0e(e,t){for(const n in e)if(e.hasOwnProperty(n)){const i=e[n];t[i.index]=i}}function L0e(e,t){for(const n in e)if(e.hasOwnProperty(n)){const o=e[n].texture;t[o.index]=o}}function DL(){return(DL=(0,we.Z)(function*(e){const t=g(e._extension,e._extensionLegacy);let n;if(c(t.schemaUri)){const i=e._baseResource.getDerivedResource({url:t.schemaUri});n=Ir.getSchemaLoader({resource:i})}else n=Ir.getSchemaLoader({schema:t.schema});if(e._schemaLoader=n,yield n.load(),!n.isDestroyed())return n.schema})).apply(this,arguments)}function iG(e){const t=e._bufferViewLoaders,n=t.length;for(let i=0;i<n;++i)Ir.unload(t[i]);e._bufferViewLoaders.length=0,e._bufferViewIds.length=0}c(Object.create)&&((Gp.prototype=Object.create(Ja.prototype)).constructor=Gp),Object.defineProperties(Gp.prototype,{cacheKey:{get:function(){return this._cacheKey}},structuralMetadata:{get:function(){return this._structuralMetadata}}}),Gp.prototype.load=function(){return c(this._promise)||(this._state=rn.LOADING,this._promise=function E0e(e){return vL.apply(this,arguments)}(this)),this._promise},Gp.prototype.process=function(e){if(A.typeOf.object("frameState",e),this._state===rn.READY)return!0;if(this._state!==rn.LOADED)return!1;const t=this._textureLoaders,n=t.length;let i=!0;for(let a=0;a<n;++a){const u=t[a].process(e);i=i&&u}if(!i)return!1;const o=this._schemaLoader.schema,r={};for(let a=0;a<this._bufferViewIds.length;++a){const l=this._bufferViewIds[a],u=this._bufferViewLoaders[a];if(!u.isDestroyed()){const d=new Uint8Array(u.typedArray);r[l]=d}}const s={};for(let a=0;a<this._textureIds.length;++a){const l=this._textureIds[a],u=t[a];u.isDestroyed()||(s[l]=u.texture)}return this._structuralMetadata=c(this._extension)?function y0e(e){const t=(e=g(e,g.EMPTY_OBJECT)).extension,n=e.schema;A.typeOf.object("options.extension",t),A.typeOf.object("options.schema",n);const i=[];if(c(t.propertyTables))for(let s=0;s<t.propertyTables.length;s++){const a=t.propertyTables[s],u=new vA({count:a.count,properties:a.properties,class:n.classes[a.class],bufferViews:e.bufferViews});i.push(new w0({id:s,name:a.name,count:a.count,metadataTable:u,extras:a.extras,extensions:a.extensions}))}const o=[];if(c(t.propertyTextures))for(let s=0;s<t.propertyTextures.length;s++){const a=t.propertyTextures[s];o.push(new eG({id:s,name:a.name,propertyTexture:a,class:n.classes[a.class],textures:e.textures}))}const r=[];if(c(t.propertyAttributes))for(let s=0;s<t.propertyAttributes.length;s++){const a=t.propertyAttributes[s];r.push(new nG({id:s,name:a.name,class:n.classes[a.class],propertyAttribute:a}))}return new q_({schema:n,propertyTables:i,propertyTextures:o,propertyAttributes:r,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}({extension:this._extension,schema:o,bufferViews:r,textures:s}):function T0e(e){const t=(e=g(e,g.EMPTY_OBJECT)).extension,n=e.schema;let i;A.typeOf.object("options.extension",t),A.typeOf.object("options.schema",n);const o=[];let r;if(c(t.featureTables))for(r=Object.keys(t.featureTables).sort(),i=0;i<r.length;i++){const a=r[i],l=t.featureTables[a],d=new vA({count:l.count,properties:l.properties,class:n.classes[l.class],bufferViews:e.bufferViews});o.push(new w0({id:a,count:l.count,metadataTable:d,extras:l.extras,extensions:l.extensions}))}const s=[];if(c(t.featureTextures))for(r=Object.keys(t.featureTextures).sort(),i=0;i<r.length;i++){const a=r[i],l=t.featureTextures[a];s.push(new eG({id:a,propertyTexture:A0e(l),class:n.classes[l.class],textures:e.textures}))}return new q_({schema:n,propertyTables:o,propertyTextures:s,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}({extension:this._extensionLegacy,schema:o,bufferViews:r,textures:s}),iG(this),this._state=rn.READY,!0},Gp.prototype.unload=function(){iG(this),function F0e(e){const t=e._textureLoaders,n=t.length;for(let i=0;i<n;++i)Ir.unload(t[i]);e._textureLoaders.length=0,e._textureIds.length=0}(this),c(this._schemaLoader)&&Ir.unload(this._schemaLoader),this._schemaLoader=void 0,this._structuralMetadata=void 0};const B0e=Gp,S0={TRANSLATION:"TRANSLATION",ROTATION:"ROTATION",SCALE:"SCALE",FEATURE_ID:"_FEATURE_ID",fromGltfSemantic:function(e){A.typeOf.string("gltfSemantic",e);let t=e;const i=/^(\w+)_\d+$/.exec(e);switch(null!==i&&(t=i[1]),t){case"TRANSLATION":return S0.TRANSLATION;case"ROTATION":return S0.ROTATION;case"SCALE":return S0.SCALE;case"_FEATURE_ID":return S0.FEATURE_ID}}},Sa=Object.freeze(S0);function ZS(e){const t=(e=g(e,g.EMPTY_OBJECT)).triangleIndices,n=e.outlineIndices,i=e.originalVertexCount;A.typeOf.object("options.triangleIndices",t),A.typeOf.object("options.outlineIndices",n),A.typeOf.number("options.originalVertexCount",i),this._triangleIndices=t,this._originalVertexCount=i,this._edges=new sG(n,i),this._outlineCoordinatesTypedArray=void 0,this._extraVertices=[],function z0e(e){let t=e._triangleIndices;const n=e._edges,i=[],o=e._extraVertices,r=e._originalVertexCount,s={};for(let a=0;a<t.length;a+=3){let l=t[a],u=t[a+1],d=t[a+2];const h=!1,m=h||n.hasEdge(l,u),_=h||n.hasEdge(u,d),p=h||n.hasEdge(d,l);let y=oG(i,l,u,d,m,_,p);for(;c(y);){let b=s[y];if(!c(b)){b=r+o.length;let x=y;for(;x>=r;)x=o[x-r];o.push(x),s[y]=b}b>65534&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):b>255&&t instanceof Uint8Array&&(t=new Uint16Array(t)),y===l?(l=b,t[a]=b):y===u?(u=b,t[a+1]=b):(d=b,t[a+2]=b),y=oG(i,l,u,d,m,_,p)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}(this)}function oG(e,t,n,i,o,r,s){const a=s?1:0,l=o?1:0,d=PL(e,t,a,l,0);if(0===d)return t;const m=o?1:0,_=r?1:0,p=PL(e,n,0,m,_);if(0===p)return n;const y=s?1:0,x=r?1:0,C=PL(e,i,y,0,x);if(0===C)return i;const w=d&p&C;let v,I,P;if(1&w)v=0,I=1,P=2;else if(2&w)v=0,P=1,I=2;else if(4&w)I=0,v=1,P=2;else if(8&w)I=0,P=1,v=2;else if(16&w)P=0,v=1,I=2;else{if(!(32&w)){const F=OL(d),S=OL(p),D=OL(C);return F<S&&F<D?t:S<D?n:i}P=0,I=1,v=2}const N=3*t;e[N+v]=a,e[N+I]=l,e[N+P]=0;const R=3*n;e[R+v]=0,e[R+I]=m,e[R+P]=_;const B=3*i;e[B+v]=y,e[B+I]=0,e[B+P]=x}function PL(e,t,n,i,o){const r=3*t,s=e[r],a=e[r+1],l=e[r+2];return c(s)?(s===n&&a===i&&l===o)<<0|(s===n&&a===o&&l===i)<<1|(s===i&&a===n&&l===o)<<2|(s===i&&a===o&&l===n)<<3|(s===o&&a===n&&l===i)<<4|(s===o&&a===i&&l===n)<<5:63}function OL(e){return(1&e)+(e>>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}function rG(e){const t=new Uint8Array(e);return t[e-1]=192,8===e?t[e-1]=96:4===e?t[e-1]=48:2===e?t[e-1]=24:1===e&&(t[e-1]=12),t}function sG(e,t){this._originalVertexCount=t,this._edges=new Set;for(let n=0;n<e.length;n+=2){const i=e[n],o=e[n+1],r=Math.min(i,o),s=Math.max(i,o);this._edges.add(r*this._originalVertexCount+s)}}Object.defineProperties(ZS.prototype,{updatedTriangleIndices:{get:function(){return this._triangleIndices}},outlineCoordinates:{get:function(){return this._outlineCoordinatesTypedArray}}}),ZS.prototype.updateAttribute=function(e){const t=this._extraVertices,n=e.length,i=n/this._originalVertexCount,o=t.length,s=new(0,e.constructor)(e.length+o*i);s.set(e);for(let a=0;a<o;a++){const l=t[a]*i,u=n+a*i;for(let d=0;d<i;d++)s[u+d]=s[l+d]}return s},ZS.createTexture=function(e){let t=e.cache.modelOutliningCache;if(c(t)||(t=e.cache.modelOutliningCache={}),c(t.outlineTexture))return t.outlineTexture;const n=Math.min(4096,dn.maximumTextureSize);let i=n;const o=rG(i),r=[];for(;i>1;)i>>=1,r.push(rG(i));const s=new Mn({context:e,source:{arrayBufferView:o,mipLevels:r},width:n,height:1,pixelFormat:Ct.LUMINANCE,sampler:new vi({wrapS:zi.CLAMP_TO_EDGE,wrapT:zi.CLAMP_TO_EDGE,minificationFilter:Kn.LINEAR_MIPMAP_LINEAR,magnificationFilter:Jr.LINEAR})});return t.outlineTexture=s,s},sG.prototype.hasEdge=function(e,t){const n=Math.min(e,t),i=Math.max(e,t);return this._edges.has(n*this._originalVertexCount+i)};const aG=ZS;function cG(e){A.typeOf.object("attribute",e),this.attribute=e,this.loadBuffer=!1,this.loadTypedArray=!1}function $S(e){A.typeOf.object("primitive",e),this.primitive=e,this.attributePlans=[],this.indicesPlan=void 0,this.needsOutlines=!1,this.outlineIndices=void 0}$S.prototype.postProcess=function(e){this.needsOutlines&&(function H0e(e){const t=e.primitive,n=t.indices,o=new aG({triangleIndices:n.typedArray,outlineIndices:e.outlineIndices,originalVertexCount:t.attributes[0].count});n.typedArray=o.updatedTriangleIndices,n.indexDatatype=Ot.fromTypedArray(n.typedArray);const s=new cG(function G0e(e){const t=new li.Attribute;return t.name="_OUTLINE_COORDINATES",t.typedArray=e,t.componentDatatype=ee.FLOAT,t.type=Wn.VEC3,t.normalized=!1,t.count=e.length/3,t}(o.outlineCoordinates));s.loadBuffer=!0,s.loadTypedArray=!1,e.attributePlans.push(s),t.outlineCoordinates=s.attribute;const a=e.attributePlans,l=e.attributePlans.length;for(let u=0;u<l;u++){const d=a[u].attribute;d.typedArray=o.updateAttribute(d.typedArray)}}(this),function j0e(e,t){(function W0e(e,t){const n=e.length;for(let i=0;i<n;i++){const o=e[i],r=o.attribute;if(o.loadBuffer){const a=yn.createVertexBuffer({typedArray:r.typedArray,context:t,usage:At.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.buffer=a}o.loadTypedArray||(r.typedArray=void 0)}})(e.attributePlans,t),c(e.indicesPlan)&&function q0e(e,t){const n=e.indices;if(e.loadBuffer){const i=yn.createIndexBuffer({typedArray:n.typedArray,context:t,usage:At.STATIC_DRAW,indexDatatype:n.indexDatatype});n.buffer=i,i.vertexArrayDestroyable=!1}e.loadTypedArray||(n.typedArray=void 0)}(e.indicesPlan,t)}(this,e))},$S.AttributeLoadPlan=cG,$S.IndicesLoadPlan=function V0e(e){A.typeOf.object("indices",e),this.indices=e,this.loadBuffer=!1,this.loadTypedArray=!1};const RL=$S,X0e=function Y0e(e){e=g(e,g.EMPTY_OBJECT),this.webp=g(e.webp,!1),this.basis=g(e.basis,!1)},{Attribute:Z0e,Indices:$0e,FeatureIdAttribute:lG,FeatureIdTexture:uG,FeatureIdImplicitRange:dG,MorphTarget:K0e,Primitive:Q0e,Instances:J0e,Skin:ebe,Node:tbe,AnimatedPropertyType:nbe,AnimationSampler:ibe,AnimationTarget:obe,AnimationChannel:rbe,Animation:sbe,ArticulationStage:abe,Articulation:cbe,Asset:lbe,Scene:ube,Components:dbe,MetallicRoughness:fbe,SpecularGlossiness:hbe,Specular:pbe,Anisotropy:LL,Clearcoat:NL,Material:mbe}=li,xo={NOT_LOADED:0,LOADING:1,LOADED:2,PROCESSING:3,POST_PROCESSING:4,PROCESSED:5,READY:6,FAILED:7,UNLOADED:8};function Yu(e){e=g(e,g.EMPTY_OBJECT);const{gltfResource:t,typedArray:n,releaseGltfJson:i=!1,asynchronous:o=!0,incrementallyLoadTextures:r=!0,upAxis:s=Ms.Y,forwardAxis:a=Ms.Z,loadAttributesAsTypedArray:l=!1,loadAttributesFor2D:u=!1,enablePick:d=!1,loadIndicesForWireframe:h=!1,loadPrimitiveOutline:m=!0,loadForClassification:_=!1,renameBatchIdSemantic:p=!1}=e;A.typeOf.object("options.gltfResource",t);const{baseResource:y=t.clone()}=e;this._gltfJson=e.gltfJson,this._gltfResource=t,this._baseResource=y,this._typedArray=n,this._releaseGltfJson=i,this._asynchronous=o,this._incrementallyLoadTextures=r,this._upAxis=s,this._forwardAxis=a,this._loadAttributesAsTypedArray=l,this._loadAttributesFor2D=u,this._enablePick=d,this._loadIndicesForWireframe=h,this._loadPrimitiveOutline=m,this._loadForClassification=_,this._renameBatchIdSemantic=p,this._sortedPropertyTableIds=void 0,this._sortedFeatureTextureIds=void 0,this._gltfJsonLoader=void 0,this._state=xo.NOT_LOADED,this._textureState=xo.NOT_LOADED,this._promise=void 0,this._processError=void 0,this._textureErrors=[],this._primitiveLoadPlans=[],this._loaderPromises=[],this._textureLoaders=[],this._texturesPromises=[],this._textureCallbacks=[],this._bufferViewLoaders=[],this._geometryLoaders=[],this._geometryCallbacks=[],this._structuralMetadataLoader=void 0,this._loadResourcesPromise=void 0,this._resourcesLoaded=!1,this._texturesLoaded=!1,this._supportedImageFormats=void 0,this._postProcessBuffers=[],this._components=void 0}function ML(){return(ML=(0,we.Z)(function*(e){e._state=xo.LOADING,e._textureState=xo.LOADING;try{const t=Ir.getGltfJsonLoader({gltfResource:e._gltfResource,baseResource:e._baseResource,typedArray:e._typedArray,gltfJson:e._gltfJson});return e._gltfJsonLoader=t,yield t.load(),e.isDestroyed()||e.isUnloaded()||t.isDestroyed()?void 0:(e._state=xo.LOADED,e._textureState=xo.LOADED,e)}catch(t){if(e.isDestroyed())return;e._state=xo.FAILED,e._textureState=xo.FAILED,KS(e,t)}})).apply(this,arguments)}function FL(){return FL=(0,we.Z)(function*(e,t){Hn.supportsWebP.initialized||(yield Hn.supportsWebP.initialize()),e._supportedImageFormats=new X0e({webp:Hn.supportsWebP(),basis:t.context.supportsBasis});const n=function bTe(e,t){const n=e.gltfJson,i=g(n.extensions,g.EMPTY_OBJECT),o=i.EXT_structural_metadata,r=i.EXT_feature_metadata,s=i.CESIUM_RTC;if(c(r)){const b=r.featureTables,x=r.featureTextures,C=c(b)?b:[],w=c(x)?x:[];e._sortedPropertyTableIds=Object.keys(C).sort(),e._sortedFeatureTextureIds=Object.keys(w).sort()}const a=function oTe(e,t){const n=e.gltfJson.nodes;if(!c(n))return[];const i=n.map(function(o,r){const s=function iTe(e,t,n){const i=new tbe;i.name=t.name,i.matrix=ol(k,t.matrix),i.translation=ol(f,t.translation),i.rotation=ol(bt,t.rotation),i.scale=ol(f,t.scale);const o=g(t.extensions,g.EMPTY_OBJECT),s=o.AGI_articulations;if(c(o.EXT_mesh_gpu_instancing)){if(e._loadForClassification)throw new Pe("Models with the EXT_mesh_gpu_instancing extension cannot be used for classification.");i.instances=function eTe(e,t,n){const i=t.EXT_mesh_gpu_instancing,o=new J0e,r=i.attributes;if(c(r))for(const u in r)r.hasOwnProperty(u)&&o.attributes.push(Bbe(e,r[u],r,u,n));const s=g(i.extensions,g.EMPTY_OBJECT),a=t.EXT_instance_features,l=s.EXT_feature_metadata;return c(a)?function tTe(e,t){const n=t.featureIds;for(let i=0;i<n.length;i++){const o=n[i],r=`instanceFeatureId_${i}`;let s;s=c(o.attribute)?_G(o,r):yG(o,r),e.featureIds.push(s)}}(o,a):c(l)&&function nTe(e,t,n,i){const o=e.extensions.EXT_feature_metadata.featureTables,r=n.featureIdAttributes;if(c(r))for(let s=0;s<r.length;++s){const a=r[s],l=a.featureTable,u=i.indexOf(l),d=o[l].count,h=`instanceFeatureId_${s}`;let m;m=c(a.featureIds.attribute)?gG(a,u,d,h):bG(a,u,d,h),t.featureIds.push(m)}}(e.gltfJson,o,l,e._sortedPropertyTableIds),o}(e,o,n)}c(s)&&(i.articulationName=s.articulationName);const a=t.mesh;if(c(a)){const l=e.gltfJson.meshes[a],u=l.primitives;for(let m=0;m<u.length;++m)i.primitives.push(Xbe(e,u[m],c(i.instances),n));const d=g(t.weights,l.weights),h=i.primitives[0].morphTargets;i.morphWeights=c(d)?d.slice():new Array(h.length).fill(0)}return i}(e,o,t);return s.index=r,s});for(let o=0;o<i.length;++o){const r=n[o].children;if(c(r))for(let s=0;s<r.length;++s)i[o].children.push(i[r[s]])}return i}(e,t),l=function sTe(e,t){const n=e.gltfJson.skins;if(e._loadForClassification||!c(n))return[];const i=n.map(function(r,s){const a=function rTe(e,t,n){const i=new ebe,o=t.joints;i.joints=o.map(s=>n[s]);const r=t.inverseBindMatrices;return i.inverseBindMatrices=c(r)?QS(e,e.gltfJson.accessors[r]):new Array(o.length).fill(k.IDENTITY),i}(e,r,t);return a.index=s,a}),o=e.gltfJson.nodes;for(let r=0;r<t.length;++r){const s=o[r].skin;c(s)&&(t[r].skin=i[s])}return i}(e,a),u=function fTe(e,t){const n=e.gltfJson.animations;return e._loadForClassification||!c(n)?[]:n.map(function(o,r){const s=function dTe(e,t,n){const i=new sbe;i.name=t.name;const o=t.samplers.map(function(s,a){const l=function cTe(e,t){const n=new ibe,i=e.gltfJson.accessors;n.input=QS(e,i[t.input]);n.interpolation=g(E0[t.interpolation],E0.LINEAR);return n.output=QS(e,i[t.output],!0),n}(e,s);return l.index=a,l}),r=t.channels.map(function(s){return function uTe(e,t,n){const i=new rbe;return i.sampler=t[e.sampler],i.target=function lTe(e,t){const n=new obe,i=e.node;if(!c(i))return;n.node=t[i];const o=e.path.toUpperCase();return n.path=nbe[o],n}(e.target,n),i}(s,o,n)});return i.samplers=o,i.channels=r,i}(e,o,t);return s.index=r,s})}(e,a),d=function mTe(e){const n=g(e.extensions,g.EMPTY_OBJECT).AGI_articulations?.articulations;return c(n)?n.map(pTe):[]}(n),h=function gTe(e,t){const n=new ube,i=function _Te(e){let t;return c(e.scenes)&&c(e.scene)&&(t=e.scenes[e.scene].nodes),t=g(t,e.nodes),t=c(t)?t:[],t}(e);return n.nodes=i.map(function(o){return t[o]}),n}(n,a),m=new dbe,_=new lbe,p=n.asset.copyright;if(c(p)){const b=p.split(";").map(function(x){return new Yn(x.trim())});_.credits=b}if(m.asset=_,m.scene=h,m.nodes=a,m.skins=l,m.animations=u,m.articulations=d,m.upAxis=e._upAxis,m.forwardAxis=e._forwardAxis,c(s)){const b=f.fromArray(s.center,0,yTe);m.transform=k.fromTranslation(b,m.transform)}if(e._components=m,c(o)||c(r)){const b=function aTe(e,t,n,i){return UL.apply(this,arguments)}(e,o,r,t);e._loaderPromises.push(b)}const y=[];return y.push.apply(y,e._loaderPromises),e._incrementallyLoadTextures||y.push.apply(y,e._texturesPromises),Promise.all(y)}(e,t);return e._state=xo.PROCESSING,e._textureState=xo.PROCESSING,c(e._gltfJsonLoader)&&e._releaseGltfJson&&(Ir.unload(e._gltfJsonLoader),e._gltfJsonLoader=void 0),n}),FL.apply(this,arguments)}function KS(e,t){throw e.unload(),e.getError("Failed to load glTF",t)}function Tbe(e,t){const n=e._postProcessBuffers,i=t.primitive,o=i.outlineCoordinates;c(o)&&n.push(o.buffer);const r=i.attributes;for(let a=0;a<r.length;a++){const l=r[a];c(l.buffer)&&n.push(l.buffer)}const s=i.indices;c(s)&&c(s.buffer)&&n.push(s.buffer)}function fG(e,t,n){let i=t.byteOffset;const o=h0(e,t),r=t.count,s=IA(t.type),a=t.componentType,l=ee.getSizeInBytes(a),d=r*s;if(o===l*s)return n=new Uint8Array(n),ee.createArrayBufferView(a,n.buffer,n.byteOffset+i,d);const h=ee.createTypedArray(a,d),m=new DataView(n.buffer),_=new Array(s),p=DR(t.componentType);i=n.byteOffset+i;for(let y=0;y<r;++y){p(m,i,s,l,_);for(let b=0;b<s;++b)h[y*s+b]=_[b];i+=o}return h}function BL(){return(BL=(0,we.Z)(function*(e,t,n,i,o){const{gltfJson:r}=e;yield t.load(),e.isDestroyed()||function wbe(e,t,n,i){const o=e.type,r=e.count;if(o===Wn.SCALAR)for(let s=0;s<r;s++)n[s]=t[s];else if(o===Wn.VEC4&&i)for(let s=0;s<r;s++)n[s]=bt.unpack(t,4*s);else{const s=Wn.getMathType(o),a=Wn.getNumberOfComponents(o);for(let l=0;l<r;l++)n[l]=s.unpack(t,l*a)}}(n,fG(r,n,t.typedArray),o,i=g(i,!1))})).apply(this,arguments)}function QS(e,t,n){const i=new Array(t.count),o=t.bufferView;if(c(o)){const r=function Cbe(e,t){const n=Ir.getBufferViewLoader({gltf:e.gltfJson,bufferViewId:t,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoaders.push(n),n}(e,o),s=function Sbe(e,t,n,i,o){return BL.apply(this,arguments)}(e,r,t,n,i);return e._loaderPromises.push(s),i}return function Ebe(e,t){const n=e.type;if(n===Wn.SCALAR)return t.fill(0);const i=Wn.getMathType(n);return t.fill(i.clone(i.ZERO))}(t,i)}function ol(e,t){if(c(t))return e===Number?t[0]:e.unpack(t)}c(Object.create)&&((Yu.prototype=Object.create(Ja.prototype)).constructor=Yu),Object.defineProperties(Yu.prototype,{cacheKey:{get:function(){}},components:{get:function(){return this._components}},gltfJson:{get:function(){return c(this._gltfJsonLoader)?this._gltfJsonLoader.gltf:this._gltfJson}},incrementallyLoadTextures:{get:function(){return this._incrementallyLoadTextures}},texturesLoaded:{get:function(){return this._texturesLoaded}}}),Yu.prototype.load=(0,we.Z)(function*(){return c(this._promise)||(this._promise=function _be(e){return ML.apply(this,arguments)}(this)),this._promise}),Yu.prototype._process=function(e){return this._state===xo.READY||(this._state===xo.PROCESSING&&function ybe(e,t){let n=!0;const i=e._geometryLoaders;for(let r=0;r<i.length;++r){const s=i[r].process(t);s&&c(e._geometryCallbacks[r])&&(e._geometryCallbacks[r](),e._geometryCallbacks[r]=void 0),n=n&&s}const o=e._structuralMetadataLoader;if(c(o)){const r=o.process(t);r&&(e._components.structuralMetadata=o.structuralMetadata),n=n&&r}n&&(e._state=xo.POST_PROCESSING)}(this,e),this._resourcesLoaded&&this._state===xo.POST_PROCESSING&&(function bbe(e,t){const n=e._primitiveLoadPlans;for(let i=0;i<n.length;i++){const o=n[i];o.postProcess(t),o.needsOutlines&&Tbe(e,o)}}(this,e.context),this._state=xo.PROCESSED),!(!this._resourcesLoaded||this._state!==xo.PROCESSED||(TG(this),this._typedArray=void 0,this._state=xo.READY,0)))},Yu.prototype._processTextures=function(e){if(this._textureState===xo.READY)return!0;if(this._textureState!==xo.PROCESSING)return!1;let t=!0;const n=this._textureLoaders;for(let i=0;i<n.length;++i){const o=n[i].process(e);o&&c(this._textureCallbacks[i])&&(this._textureCallbacks[i](),this._textureCallbacks[i]=void 0),t=t&&o}return!!t&&(this._textureState=xo.READY,this._texturesLoaded=!0,!0)},Yu.prototype.process=function(e){if(A.typeOf.object("frameState",e),this._state===xo.LOADED&&!c(this._loadResourcesPromise)&&(this._loadResourcesPromise=function gbe(e,t){return FL.apply(this,arguments)}(this,e).then(()=>{this._resourcesLoaded=!0}).catch(o=>{this._processError=o})),c(this._processError)){this._state=xo.FAILED;const o=this._processError;this._processError=void 0,KS(this,o)}const t=this._textureErrors.pop();if(c(t)){const 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,KS(this,o)}let i=!1;try{i=this._processTextures(e)}catch(o){this._textureState=xo.FAILED,KS(this,o)}return this._incrementallyLoadTextures?n:n&&i};const Dbe={VEC2:new V(-1,-1),VEC3:new f(-1,-1,-1),VEC4:new de(-1,-1,-1,-1)};function Rbe(e,t,n,i,o){const r=e.accessors[t],s=Wn.getMathType(r.type),a=g(r.normalized,!1),l=new Z0e;l.name=n,l.semantic=i,l.setIndex=o,l.constant=function vbe(e){return e===Number?0:new e}(s),l.componentDatatype=r.componentType,l.normalized=a,l.count=r.count,l.type=r.type,l.min=ol(s,r.min),l.max=ol(s,r.max),l.byteOffset=r.byteOffset,l.byteStride=h0(e,r),vr(r,"WEB3D_quantized_attributes")&&function Obe(e,t,n){const i=e.decodeMatrix,o=ol(n,e.decodedMin),r=ol(n,e.decodedMax);c(o)&&c(r)&&(t.min=o,t.max=r);const s=new li.Quantization;s.componentDatatype=t.componentDatatype,s.type=t.type,4===i.length?(s.quantizedVolumeOffset=i[2],s.quantizedVolumeStepSize=i[0]):9===i.length?(s.quantizedVolumeOffset=new V(i[6],i[7]),s.quantizedVolumeStepSize=new V(i[0],i[4])):16===i.length?(s.quantizedVolumeOffset=new f(i[12],i[13],i[14]),s.quantizedVolumeStepSize=new f(i[0],i[5],i[10])):25===i.length&&(s.quantizedVolumeOffset=new de(i[20],i[21],i[22],i[23]),s.quantizedVolumeStepSize=new de(i[0],i[6],i[12],i[18])),t.quantization=s}(r.extensions.WEB3D_quantized_attributes,l,s);const u=l.semantic===ln.POSITION||l.semantic===ln.NORMAL||l.semantic===ln.TANGENT||l.semantic===ln.TEXCOORD;return e.extensionsRequired?.includes("KHR_mesh_quantization")&&a&&u&&function Pbe(e,t){const n=function Ibe(e){switch(e){case ee.BYTE:return 127;case ee.UNSIGNED_BYTE:return 255;case ee.SHORT:return 32767;case ee.UNSIGNED_SHORT:return 65535;default:return 1}}(e.componentDatatype),i=Dbe[e.type];let o=e.min;c(o)&&(o=t.divideByScalar(o,n,o),o=t.maximumByComponent(o,i,o));let r=e.max;c(r)&&(r=t.divideByScalar(r,n,r),r=t.maximumByComponent(r,i,r)),e.min=o,e.max=r}(l,s),l}function hG(e){const n=/^\w+_(\d+)$/.exec(e);if(null!==n)return parseInt(n[1])}const Lbe={gltfSemantic:void 0,renamedSemantic:void 0,modelSemantic:void 0};function kL(e,t,n){let i=n;e._renameBatchIdSemantic&&("_BATCHID"===n||"BATCHID"===n)&&(i="_FEATURE_ID_0");const o=t.fromGltfSemantic(i),r=Lbe;return r.gltfSemantic=n,r.renamedSemantic=i,r.modelSemantic=o,r}function Nbe(e){return e===ln.POSITION||e===ln.FEATURE_ID||e===ln.TEXCOORD}function pG(e,t,n,i,o,r,s){const a=e.gltfJson,l=a.accessors[t],u=l.bufferView,d=n.gltfSemantic,h=n.renamedSemantic,m=n.modelSemantic,_=c(m)?hG(h):void 0,y=Rbe(a,t,d,m,_);if(!c(i)&&!c(u))return y;const b=function Abe(e,t,n,i,o,r,s){const a=e.gltfJson;return Ir.getVertexBufferLoader({gltf:a,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:s,bufferViewId:a.accessors[t].bufferView,draco:i,attributeSemantic:n,accessorId:t,asynchronous:e._asynchronous,loadBuffer:o,loadTypedArray:r})}(e,t,d,i,o,r,s),x=e._geometryLoaders.length;e._geometryLoaders.push(b);const C=b.load();return e._loaderPromises.push(C),e._geometryCallbacks[x]=()=>{c(i)&&c(i.attributes)&&c(i.attributes[d])?function Mbe(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,e.quantization=t.quantization,n&&(e.buffer=t.buffer),i){const o=c(t.quantization)?t.quantization.componentDatatype:e.componentDatatype;e.typedArray=ee.createArrayBufferView(o,t.typedArray.buffer)}}(y,b,o,r):function Fbe(e,t,n,i,o,r){o&&(n.buffer=i.buffer),r&&(n.typedArray=fG(e,t,i.typedArray),o||(n.byteOffset=0,n.byteStride=void 0))}(a,l,y,b,o,r)},y}function mG(e,t,n,i,o,r,s){const a=n.modelSemantic,l=a===ln.POSITION,_=e._loadAttributesAsTypedArray,p=!_,y=_||l&&!o&&e._loadAttributesFor2D&&!s.scene3DOnly||l&&e._enablePick&&!s.context.webgl2||e._loadForClassification&&a===ln.FEATURE_ID,C=pG(e,t,n,i,!r&&p,!!r||y,s),w=new RL.AttributeLoadPlan(C);return w.loadBuffer=p,w.loadTypedArray=y,w}function Bbe(e,t,n,i,o){const r=e.gltfJson.accessors,s=c(n.ROTATION),a=c(n.TRANSLATION)&&c(r[n.TRANSLATION].min)&&c(r[n.TRANSLATION].max),l=kL(e,Sa,i),u=l.modelSemantic,m=e._loadAttributesAsTypedArray||s&&(u===Sa.TRANSLATION||u===Sa.ROTATION||u===Sa.SCALE)||!o.context.instancedArrays;return pG(e,t,l,void 0,!m,m||u===Sa.TRANSLATION&&(!a||e._loadAttributesFor2D&&!o.scene3DOnly||e._enablePick&&!o.context.webgl2),o)}function nc(e,t,n,i){const o=e.gltfJson,r=F_.getImageIdFromTexture({gltf:o,textureId:t.index,supportedImageFormats:e._supportedImageFormats});if(!c(r))return;const s=Ir.getTextureLoader({gltf:o,textureInfo:t,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:n,asynchronous:e._asynchronous}),a=F_.createModelTextureReader({textureInfo:t}),l=e._textureLoaders.length;e._textureLoaders.push(s);const u=s.load().catch(d=>{if(!e.isDestroyed()){if(!e._incrementallyLoadTextures)throw d;e._textureState=xo.FAILED,e._textureErrors.push(d)}});return e._texturesPromises.push(u),e._textureCallbacks[l]=()=>{a.texture=s.texture,c(i)&&(a.texture.sampler=i)},a}function _G(e,t){const n=new lG;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 gG(e,t,n,i){const o=new lG,r=e.featureIds;return o.featureCount=n,o.propertyTableId=t,o.setIndex=hG(r.attribute),o.positionalLabel=i,o}function yG(e,t){const n=new dG;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 bG(e,t,n,i){const o=new dG,r=e.featureIds;o.propertyTableId=t,o.featureCount=n,o.offset=g(r.constant,0);const s=g(r.divisor,0);return o.repeat=0===s?void 0:s,o.positionalLabel=i,o}function Wbe(e,t,n,i){const o=new uG;o.featureCount=t.featureCount,o.nullFeatureId=t.nullFeatureId,o.propertyTableId=t.propertyTable,o.label=t.label,o.positionalLabel=i;const r=t.texture;o.textureReader=nc(e,r,n,vi.NEAREST);const a=(c(r.channels)?r.channels:[0]).map(function(l){return"rgba".charAt(l)}).join("");return o.textureReader.channels=a,o}function qbe(e,t,n,i,o,r){const s=new uG,a=t.featureIds,l=a.texture;return s.featureCount=o,s.propertyTableId=n,s.textureReader=nc(e,l,i,vi.NEAREST),s.textureReader.channels=a.channels,s.positionalLabel=r,s}function Ybe(e,t,n,i,o){const r=new K0e;for(const l in t){if(!t.hasOwnProperty(l))continue;const h=mG(e,t[l],kL(e,ln,l),void 0,!1,n,o);r.attributes.push(h.attribute),i.attributePlans.push(h)}return r}function Xbe(e,t,n,i){const o=new Q0e,r=new RL(o);e._primitiveLoadPlans.push(r);const s=t.material;c(s)&&(o.material=function jbe(e,t,n){const i=new mbe,o=g(t.extensions,g.EMPTY_OBJECT),r=o.KHR_materials_pbrSpecularGlossiness,s=o.KHR_materials_specular,a=o.KHR_materials_anisotropy,l=o.KHR_materials_clearcoat,u=t.pbrMetallicRoughness;return i.unlit=c(o.KHR_materials_unlit),c(r)?i.specularGlossiness=function Ube(e,t,n){const{diffuseTexture:i,specularGlossinessTexture:o,diffuseFactor:r,specularFactor:s,glossinessFactor:a}=t,l=new hbe;return c(i)&&(l.diffuseTexture=nc(e,i,n)),c(o)&&(l.specularGlossinessTexture=nc(e,o,n)),l.diffuseFactor=ol(de,r),l.specularFactor=ol(f,s),l.glossinessFactor=a,l}(e,r,n):(c(u)&&(i.metallicRoughness=function zbe(e,t,n){const{baseColorTexture:i,metallicRoughnessTexture:o,baseColorFactor:r,metallicFactor:s,roughnessFactor:a}=t,l=new fbe;return c(i)&&(l.baseColorTexture=nc(e,i,n)),c(o)&&(l.metallicRoughnessTexture=nc(e,o,n)),l.baseColorFactor=ol(de,r),l.metallicFactor=s,l.roughnessFactor=a,l}(e,u,n)),c(s)&&!i.unlit&&(i.specular=function Vbe(e,t,n){const{specularFactor:i,specularTexture:o,specularColorFactor:r,specularColorTexture:s}=t,a=new pbe;return c(o)&&(a.specularTexture=nc(e,o,n)),c(s)&&(a.specularColorTexture=nc(e,s,n)),a.specularFactor=i,a.specularColorFactor=ol(f,r),a}(e,s,n)),c(a)&&!i.unlit&&(i.anisotropy=function Hbe(e,t,n){const{anisotropyStrength:i=LL.DEFAULT_ANISOTROPY_STRENGTH,anisotropyRotation:o=LL.DEFAULT_ANISOTROPY_ROTATION,anisotropyTexture:r}=t,s=new LL;return c(r)&&(s.anisotropyTexture=nc(e,r,n)),s.anisotropyStrength=i,s.anisotropyRotation=o,s}(e,a,n)),c(l)&&!i.unlit&&(i.clearcoat=function Gbe(e,t,n){const{clearcoatFactor:i=NL.DEFAULT_CLEARCOAT_FACTOR,clearcoatTexture:o,clearcoatRoughnessFactor:r=NL.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,clearcoatRoughnessTexture:s,clearcoatNormalTexture:a}=t,l=new NL;return c(o)&&(l.clearcoatTexture=nc(e,o,n)),c(s)&&(l.clearcoatRoughnessTexture=nc(e,s,n)),c(a)&&(l.clearcoatNormalTexture=nc(e,a,n)),l.clearcoatFactor=i,l.clearcoatRoughnessFactor=r,l}(e,l,n))),c(t.emissiveTexture)&&(i.emissiveTexture=nc(e,t.emissiveTexture,n)),c(t.normalTexture)&&!e._loadForClassification&&(i.normalTexture=nc(e,t.normalTexture,n)),c(t.occlusionTexture)&&(i.occlusionTexture=nc(e,t.occlusionTexture,n)),i.emissiveFactor=ol(f,t.emissiveFactor),i.alphaMode=t.alphaMode,i.alphaCutoff=t.alphaCutoff,i.doubleSided=t.doubleSided,i}(e,e.gltfJson.materials[s],i));const a=g(t.extensions,g.EMPTY_OBJECT);let l=!1;const u=a.CESIUM_primitive_outline;e._loadPrimitiveOutline&&c(u)&&(l=!0,r.needsOutlines=!0,r.outlineIndices=function Zbe(e,t){return QS(e,e.gltfJson.accessors[t.indices],!1)}(e,u));const d=e._loadForClassification,h=a.KHR_draco_mesh_compression;let m=!1;const _=t.attributes;if(c(_))for(const I in _){if(!_.hasOwnProperty(I))continue;const P=_[I],N=kL(e,ln,I),R=N.modelSemantic;if(d&&!Nbe(R))continue;R===ln.FEATURE_ID&&(m=!0);const B=mG(e,P,N,h,n,l,i);r.attributePlans.push(B),o.attributes.push(B.attribute)}const p=t.targets;if(c(p)&&!d)for(let I=0;I<p.length;++I)o.morphTargets.push(Ybe(e,p[I],l,r,i));const y=t.indices;if(c(y)){const I=function kbe(e,t,n,i,o,r){const s=e.gltfJson.accessors[t],a=s.bufferView;if(!c(n)&&!c(a))return;const l=new $0e;l.count=s.count;const u=e._loadAttributesAsTypedArray,_=!u,p=u||(e._loadIndicesForWireframe||e._enablePick)&&!r.context.webgl2||e._loadForClassification&&i,x=function xbe(e,t,n,i,o,r){return Ir.getIndexBufferLoader({gltf:e.gltfJson,accessorId:t,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:r,draco:n,asynchronous:e._asynchronous,loadBuffer:i,loadTypedArray:o})}(e,t,n,!o&&_,!!o||p,r),C=e._geometryLoaders.length;e._geometryLoaders.push(x);const w=x.load();e._loaderPromises.push(w),e._geometryCallbacks[C]=()=>{l.indexDatatype=x.indexDatatype,l.buffer=x.buffer,l.typedArray=x.typedArray};const v=new RL.IndicesLoadPlan(l);return v.loadBuffer=_,v.loadTypedArray=p,v}(e,y,h,m,l,i);c(I)&&(r.indicesPlan=I,o.indices=I.indices)}const b=a.EXT_structural_metadata,x=a.EXT_mesh_features,C=a.EXT_feature_metadata,w=c(C);c(x)?function $be(e,t,n,i){let o;o=c(n)&&c(n.featureIds)?n.featureIds:[];for(let r=0;r<o.length;r++){const s=o[r],a=`featureId_${r}`;let l;l=c(s.texture)?Wbe(e,s,i,a):c(s.attribute)?_G(s,a):yG(s,a),t.featureIds.push(l)}}(e,o,x,i):w&&function Kbe(e,t,n,i){const{featureTables:o}=e.gltfJson.extensions.EXT_feature_metadata;let r=0;const s=n.featureIdAttributes;if(c(s))for(let l=0;l<s.length;++l){const u=s[l],d=u.featureTable,h=e._sortedPropertyTableIds.indexOf(d),m=o[d].count,_=`featureId_${r}`;let p;r++,p=c(u.featureIds.attribute)?gG(u,h,m,_):bG(u,h,m,_),t.featureIds.push(p)}const a=n.featureIdTextures;if(c(a))for(let l=0;l<a.length;++l){const u=a[l],d=u.featureTable,h=e._sortedPropertyTableIds.indexOf(d),_=`featureId_${r}`;r++;const p=qbe(e,u,h,i,o[d].count,_);t.featureIds.push(p)}}(e,o,C,i),c(b)?function Qbe(e,t){c(t)&&(c(t.propertyTextures)&&(e.propertyTextureIds=t.propertyTextures),c(t.propertyAttributes)&&(e.propertyAttributeIds=t.propertyAttributes))}(o,b):w&&function Jbe(e,t,n){c(n.featureTextures)&&(t.propertyTextureIds=n.featureTextures.map(function(i){return e._sortedFeatureTextureIds.indexOf(i)}))}(e,o,C);const v=t.mode;if(d&&v!==Tt.TRIANGLES)throw new Pe("Only triangle meshes can be used for classification.");return o.primitiveType=v,o}function UL(){return(UL=(0,we.Z)(function*(e,t,n,i){const o=new B0e({gltf:e.gltfJson,extension:t,extensionLegacy:n,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:i,asynchronous:e._asynchronous});return e._structuralMetadataLoader=o,o.load()})).apply(this,arguments)}function hTe(e){const t=new abe;t.name=e.name;const n=e.type.toUpperCase();return t.type=qu[n],t.minimumValue=e.minimumValue,t.maximumValue=e.maximumValue,t.initialValue=e.initialValue,t}function pTe(e){const t=new cbe;return t.name=e.name,t.stages=e.stages.map(hTe),t}const yTe=new f;function TG(e){const t=e._bufferViewLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Ir.unload(t[n]);e._bufferViewLoaders.length=0}Yu.prototype.isUnloaded=function(){return this._state===xo.UNLOADED},Yu.prototype.unload=function(){c(this._gltfJsonLoader)&&!this._gltfJsonLoader.isDestroyed()&&Ir.unload(this._gltfJsonLoader),this._gltfJsonLoader=void 0,function TTe(e){const t=e._textureLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Ir.unload(t[n]);e._textureLoaders.length=0}(this),TG(this),function ATe(e){const t=e._geometryLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Ir.unload(t[n]);e._geometryLoaders.length=0}(this),function xTe(e){const t=e._postProcessBuffers;for(let n=0;n<t.length;n++){const i=t[n];i.isDestroyed()||i.destroy()}t.length=0}(this),function CTe(e){c(e._structuralMetadataLoader)&&!e._structuralMetadataLoader.isDestroyed()&&(e._structuralMetadataLoader.destroy(),e._structuralMetadataLoader=void 0)}(this),this._components=void 0,this._typedArray=void 0,this._state=xo.UNLOADED};const zL=Yu,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},tn=Object.freeze(Y_);function X_(e){return e===Y_.CLAMP_TO_GROUND||e===Y_.CLAMP_TO_3D_TILE||e===Y_.CLAMP_TO_TERRAIN}function VL(e){return e===Y_.RELATIVE_TO_GROUND||e===Y_.RELATIVE_TO_3D_TILE||e===Y_.RELATIVE_TO_TERRAIN}function HL(e,t,n){const i=e._gl;i.framebufferTexture2D(i.FRAMEBUFFER,t,n._target,n._texture,0)}function JS(e,t,n){const i=e._gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,t,i.RENDERBUFFER,n._getRenderbuffer())}function Xu(e){const t=(e=g(e,g.EMPTY_OBJECT)).context;A.defined("options.context",t);const n=t._gl,i=dn.maximumColorAttachments;if(this._gl=n,this._framebuffer=n.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=g(e.destroyAttachments,!0),c(e.colorTextures)&&c(e.colorRenderbuffers))throw new E("Cannot have both color texture and color renderbuffer attachments.");if(c(e.depthTexture)&&c(e.depthRenderbuffer))throw new E("Cannot have both a depth texture and depth renderbuffer attachment.");if(c(e.depthStencilTexture)&&c(e.depthStencilRenderbuffer))throw new E("Cannot have both a depth-stencil texture and depth-stencil renderbuffer attachment.");const o=c(e.depthTexture)||c(e.depthRenderbuffer),r=c(e.depthStencilTexture)||c(e.depthStencilRenderbuffer);if(o&&r)throw new E("Cannot have both a depth and depth-stencil attachment.");if(c(e.stencilRenderbuffer)&&r)throw new E("Cannot have both a stencil and depth-stencil attachment.");if(o&&c(e.stencilRenderbuffer))throw new E("Cannot have both a depth and stencil attachment.");let s,a,l,u,d;if(this._bind(),c(e.colorTextures)){const h=e.colorTextures;if(u=this._colorTextures.length=this._activeColorAttachments.length=h.length,u>i)throw new E("The number of color attachments exceeds the number supported.");for(l=0;l<u;++l){if(s=h[l],!Ct.isColorFormat(s.pixelFormat))throw new E("The color-texture pixel-format must be a color format.");if(s.pixelDatatype===yt.FLOAT&&!t.colorBufferFloat)throw new E("The color texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions. See Context.colorBufferFloat.");if(s.pixelDatatype===yt.HALF_FLOAT&&!t.colorBufferHalfFloat)throw new E("The color texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension. See Context.colorBufferHalfFloat.");d=this._gl.COLOR_ATTACHMENT0+l,HL(this,d,s),this._activeColorAttachments[l]=d,this._colorTextures[l]=s}}if(c(e.colorRenderbuffers)){const h=e.colorRenderbuffers;if(u=this._colorRenderbuffers.length=this._activeColorAttachments.length=h.length,u>i)throw new E("The number of color attachments exceeds the number supported.");for(l=0;l<u;++l)a=h[l],d=this._gl.COLOR_ATTACHMENT0+l,JS(this,d,a),this._activeColorAttachments[l]=d,this._colorRenderbuffers[l]=a}if(c(e.depthTexture)){if(s=e.depthTexture,s.pixelFormat!==Ct.DEPTH_COMPONENT)throw new E("The depth-texture pixel-format must be DEPTH_COMPONENT.");HL(this,this._gl.DEPTH_ATTACHMENT,s),this._depthTexture=s}if(c(e.depthRenderbuffer)&&(a=e.depthRenderbuffer,JS(this,this._gl.DEPTH_ATTACHMENT,a),this._depthRenderbuffer=a),c(e.stencilRenderbuffer)&&(a=e.stencilRenderbuffer,JS(this,this._gl.STENCIL_ATTACHMENT,a),this._stencilRenderbuffer=a),c(e.depthStencilTexture)){if(s=e.depthStencilTexture,s.pixelFormat!==Ct.DEPTH_STENCIL)throw new E("The depth-stencil pixel-format must be DEPTH_STENCIL.");HL(this,this._gl.DEPTH_STENCIL_ATTACHMENT,s),this._depthStencilTexture=s}c(e.depthStencilRenderbuffer)&&(a=e.depthStencilRenderbuffer,JS(this,this._gl.DEPTH_STENCIL_ATTACHMENT,a),this._depthStencilRenderbuffer=a),this._unBind()}Object.defineProperties(Xu.prototype,{status:{get:function(){this._bind();const e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),Xu.prototype._bind=function(){const e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},Xu.prototype._unBind=function(){const e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},Xu.prototype.bindDraw=function(){const e=this._gl;e.bindFramebuffer(e.DRAW_FRAMEBUFFER,this._framebuffer)},Xu.prototype.bindRead=function(){const e=this._gl;e.bindFramebuffer(e.READ_FRAMEBUFFER,this._framebuffer)},Xu.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},Xu.prototype.getColorTexture=function(e){if(!c(e)||e<0||e>=this._colorTextures.length)throw new E("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},Xu.prototype.getColorRenderbuffer=function(e){if(!c(e)||e<0||e>=this._colorRenderbuffers.length)throw new E("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},Xu.prototype.isDestroyed=function(){return!1},Xu.prototype.destroy=function(){if(this.destroyAttachments){let e=0;const t=this._colorTextures;let n=t.length;for(;e<n;++e){const o=t[e];c(o)&&o.destroy()}const i=this._colorRenderbuffers;for(n=i.length,e=0;e<n;++e){const o=i[e];c(o)&&o.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),Xe(this)};const sh=Xu;function v0(e){const t=(e=g(e,g.EMPTY_OBJECT)).context,n=e.width,i=e.height;A.defined("options.context",t),A.defined("options.width",n),A.defined("options.height",i),this._width=n,this._height=i;const o=e.colorRenderbuffers,r=e.colorTextures;if(c(o)!==c(r))throw new E("Both color renderbuffer and texture attachments must be provided.");const s=e.depthStencilRenderbuffer,a=e.depthStencilTexture;if(c(s)!==c(a))throw new E("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new sh({context:t,colorRenderbuffers:o,depthStencilRenderbuffer:s,destroyAttachments:e.destroyAttachments}),this._colorFramebuffer=new sh({context:t,colorTextures:r,depthStencilTexture:a,destroyAttachments:e.destroyAttachments})}v0.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer},v0.prototype.getColorFramebuffer=function(){return this._colorFramebuffer},v0.prototype.blitFramebuffers=function(e,t){this._renderFramebuffer.bindRead(),this._colorFramebuffer.bindDraw();const n=e._gl;let i=0;this._colorFramebuffer._colorTextures.length>0&&(i|=n.COLOR_BUFFER_BIT),c(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)},v0.prototype.isDestroyed=function(){return!1},v0.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),Xe(this)};const ETe=v0,Sc={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===Sc.RGBA4||e===Sc.RGBA8||e===Sc.RGBA16F||e===Sc.RGBA32F||e===Sc.RGB5_A1||e===Sc.RGB565||e===Sc.DEPTH_COMPONENT16||e===Sc.STENCIL_INDEX8||e===Sc.DEPTH_STENCIL||e===Sc.DEPTH24_STENCIL8},getColorFormat:function(e){return e===ie.FLOAT?Sc.RGBA32F:e===ie.HALF_FLOAT_OES?Sc.RGBA16F:Sc.RGBA8}},ah=Object.freeze(Sc);function WA(e){e=g(e,g.EMPTY_OBJECT),A.defined("options.context",e.context);const n=e.context._gl,i=dn.maximumRenderbufferSize,o=g(e.format,ah.RGBA4),r=c(e.width)?e.width:n.drawingBufferWidth,s=c(e.height)?e.height:n.drawingBufferHeight,a=g(e.numSamples,1);if(!ah.validate(o))throw new E("Invalid format.");if(A.typeOf.number.greaterThan("width",r,0),r>i)throw new E(`Width must be less than or equal to the maximum renderbuffer size (${i}). Check maximumRenderbufferSize.`);if(A.typeOf.number.greaterThan("height",s,0),s>i)throw new E(`Height must be less than or equal to the maximum renderbuffer size (${i}). Check maximumRenderbufferSize.`);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(WA.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),WA.prototype._getRenderbuffer=function(){return this._renderbuffer},WA.prototype.isDestroyed=function(){return!1},WA.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),Xe(this)};const Z_=WA;function ts(e){if(e=g(e,g.EMPTY_OBJECT),this._numSamples=g(e.numSamples,1),this._colorAttachmentsLength=g(e.colorAttachmentsLength,1),this._color=g(e.color,!0),this._depth=g(e.depth,!1),this._depthStencil=g(e.depthStencil,!1),this._supportsDepthTexture=g(e.supportsDepthTexture,!1),!this._color&&!this._depth&&!this._depthStencil)throw new E("Must enable at least one type of framebuffer attachment.");if(this._depth&&this._depthStencil)throw new E("Cannot have both a depth and depth-stencil attachment.");this._createColorAttachments=g(e.createColorAttachments,!0),this._createDepthAttachments=g(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(ts.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}}}),ts.prototype.isDirty=function(e,t,n,i,o){n=g(n,1);const r=this._width!==e||this._height!==t,s=this._numSamples!==n,a=c(i)&&this._pixelDatatype!==i||c(o)&&this._pixelFormat!==o,l=c(1===n?this._framebuffer:this._multisampleFramebuffer);return this._attachmentsDirty||r||s||a||!l||this._color&&!c(this._colorTextures[0])},ts.prototype.update=function(e,t,n,i,o,r){if(!c(t)||!c(n))throw new E("width and height must be defined.");if(i=e.msaa?g(i,1):1,o=g(o,this._color?g(this._pixelDatatype,yt.UNSIGNED_BYTE):void 0),r=g(r,this._color?g(this._pixelFormat,Ct.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;s<this._colorAttachmentsLength;++s)if(this._colorTextures[s]=new Mn({context:e,width:t,height:n,pixelFormat:r,pixelDatatype:o,sampler:vi.NEAREST}),this._numSamples>1){const a=ah.getColorFormat(o);this._colorRenderbuffers[s]=new Z_({context:e,width:t,height:n,format:a,numSamples:this._numSamples})}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new Mn({context:e,width:t,height:n,pixelFormat:Ct.DEPTH_STENCIL,pixelDatatype:yt.UNSIGNED_INT_24_8,sampler:vi.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new Z_({context:e,width:t,height:n,format:ah.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new Z_({context:e,width:t,height:n,format:ah.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new Mn({context:e,width:t,height:n,pixelFormat:Ct.DEPTH_COMPONENT,pixelDatatype:yt.UNSIGNED_INT,sampler:vi.NEAREST}):this._depthRenderbuffer=new Z_({context:e,width:t,height:n,format:ah.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new ETe({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 sh({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}},ts.prototype.getColorTexture=function(e){if((e=g(e,0))>=this._colorAttachmentsLength)throw new E("index must be smaller than total number of color attachments.");return this._colorTextures[e]},ts.prototype.setColorTexture=function(e,t){if(t=g(t,0),this._createColorAttachments)throw new E("createColorAttachments must be false if setColorTexture is called.");if(t>=this._colorAttachmentsLength)throw new E("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e},ts.prototype.getColorRenderbuffer=function(e){if((e=g(e,0))>=this._colorAttachmentsLength)throw new E("index must be smaller than total number of color attachments.");return this._colorRenderbuffers[e]},ts.prototype.setColorRenderbuffer=function(e,t){if(t=g(t,0),this._createColorAttachments)throw new E("createColorAttachments must be false if setColorRenderbuffer is called.");if(t>=this._colorAttachmentsLength)throw new E("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e},ts.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer},ts.prototype.setDepthRenderbuffer=function(e){if(this._createDepthAttachments)throw new E("createDepthAttachments must be false if setDepthRenderbuffer is called.");this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e},ts.prototype.getDepthTexture=function(){return this._depthTexture},ts.prototype.setDepthTexture=function(e){if(this._createDepthAttachments)throw new E("createDepthAttachments must be false if setDepthTexture is called.");this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e},ts.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer},ts.prototype.setDepthStencilRenderbuffer=function(e){if(this._createDepthAttachments)throw new E("createDepthAttachments must be false if setDepthStencilRenderbuffer is called.");this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e},ts.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture},ts.prototype.setDepthStencilTexture=function(e){if(this._createDepthAttachments)throw new E("createDepthAttachments must be false if setDepthStencilTexture is called.");this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e},ts.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)},ts.prototype.clear=function(e,t,n){const i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i},ts.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()},ts.prototype.destroy=function(){if(this._color){let e;const t=this._colorTextures.length;for(e=0;e<t;++e){const n=this._colorTextures[e];this._createColorAttachments&&c(n)&&!n.isDestroyed()&&(this._colorTextures[e].destroy(),this._colorTextures[e]=void 0),c(n)&&n.isDestroyed()&&(this._colorTextures[e]=void 0);const i=this._colorRenderbuffers[e];this._createColorAttachments&&c(i)&&!i.isDestroyed()&&(this._colorRenderbuffers[e].destroy(),this._colorRenderbuffers[e]=void 0),c(i)&&i.isDestroyed()&&(this._colorRenderbuffers[e]=void 0)}}this._depthStencil&&(this._createDepthAttachments&&(this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()),c(this._depthStencilTexture)&&this._depthStencilTexture.isDestroyed()&&(this._depthStencilTexture=void 0),c(this._depthStencilRenderbuffer)&&this._depthStencilRenderbuffer.isDestroyed()&&(this._depthStencilRenderbuffer=void 0)),this._depth&&(this._createDepthAttachments&&(this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy()),c(this._depthTexture)&&this._depthTexture.isDestroyed()&&(this._depthTexture=void 0),c(this._depthRenderbuffer)&&this._depthRenderbuffer.isDestroyed()&&(this._depthRenderbuffer=void 0)),this.destroyFramebuffer()};const $o=ts;function I0(){this._framebuffer=new $o({colorAttachmentsLength:2,depth:!0,supportsDepthTexture:!0}),this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}Object.defineProperties(I0.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}},colorGBuffer:{get:function(){return this._framebuffer.getColorTexture(0)}},depthGBuffer:{get:function(){return this._framebuffer.getColorTexture(1)}}});const GL=new V;function AG(e){return e.drawBuffers&&e.fragmentDepth}function DTe(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"EC");if(!c(n)){const i=t._attributeLocations,o=t.fragmentShaderSource.clone();o.sources.splice(0,0,"layout (location = 0) out vec4 out_FragData_0;\nlayout (location = 1) out vec4 out_FragData_1;"),o.sources=o.sources.map(function(r){return(r=St.replaceMain(r,"czm_point_cloud_post_process_main")).replaceAll(/out_FragColor/g,"out_FragData_0")}),o.sources.push("void main() \n{ \n czm_point_cloud_post_process_main(); \n#ifdef LOG_DEPTH\n czm_writeLogDepth();\n out_FragData_1 = czm_packDepth(gl_FragDepth); \n#else\n out_FragData_1 = czm_packDepth(gl_FragCoord.z);\n#endif\n}"),n=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:i})}return n}I0.isSupported=AG,I0.prototype.update=function(e,t,n,i){if(!AG(e.context))return;let o;this._strength=n.eyeDomeLightingStrength,this._radius=n.eyeDomeLightingRadius*e.pixelRatio,function ITe(e,t){e._framebuffer.update(t,t.drawingBufferWidth,t.drawingBufferHeight),function vTe(e,t){const n=new St({defines:["LOG_DEPTH_WRITE"],sources:["uniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthGBuffer;\nuniform vec2 u_distanceAndEdlStrength;\nin vec2 v_textureCoordinates;\n\nvec2 neighborContribution(float log2Depth, vec2 offset)\n{\n float dist = u_distanceAndEdlStrength.x;\n vec2 texCoordOrig = v_textureCoordinates + offset * dist;\n vec2 texCoord0 = v_textureCoordinates + offset * floor(dist);\n vec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);\n\n float depthOrLogDepth0 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord0));\n float depthOrLogDepth1 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord1));\n\n // ignore depth values that are the clear depth\n if (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {\n return vec2(0.0);\n }\n\n // interpolate the two adjacent depth values\n float depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);\n return vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\n\nvoid main()\n{\n float depthOrLogDepth = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, v_textureCoordinates));\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float log2Depth = log2(-eyeCoordinate.z);\n\n if (depthOrLogDepth == 0.0) // 0.0 is the clear value for the gbuffer\n {\n discard;\n }\n\n vec4 color = texture(u_pointCloud_colorGBuffer, v_textureCoordinates);\n\n // sample from neighbors left, right, down, up\n vec2 texelSize = 1.0 / czm_viewport.zw;\n\n vec2 responseAndCount = vec2(0.0);\n\n responseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));\n responseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));\n responseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));\n responseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));\n\n float response = responseAndCount.x / responseAndCount.y;\n float strength = u_distanceAndEdlStrength.y;\n float shade = exp(-response * 300.0 * strength);\n color.rgb *= shade;\n out_FragColor = vec4(color);\n\n // Input and output depth are the same.\n gl_FragDepth = depthOrLogDepth;\n}\n"]}),i={u_pointCloud_colorGBuffer:function(){return e.colorGBuffer},u_pointCloud_depthGBuffer:function(){return e.depthGBuffer},u_distanceAndEdlStrength:function(){return GL.x=e._radius,GL.y=e._strength,GL}},o=Lt.fromCache({blending:eo.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:xn.setCesium3DTileBit(),stencilMask:xn.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:i,renderState:o,pass:Ue.CESIUM_3D_TILE,owner:e}),e._clearCommand=new ar({framebuffer:e.framebuffer,color:new Z(0,0,0,0),depth:1,renderState:Lt.fromCache(),pass:Ue.CESIUM_3D_TILE,owner:e})}(e,t)}(this,e.context);const r=e.commandList,s=r.length;for(o=t;o<s;++o){const u=r[o];if(u.primitiveType!==Tt.POINTS||u.pass===Ue.TRANSLUCENT)continue;let d,h,m=u.derivedCommands.pointCloudProcessor;c(m)&&(d=m.command,h=m.originalShaderProgram),(!c(d)||u.dirty||h!==u.shaderProgram||d.framebuffer!==this.framebuffer)&&(d=$t.shallowClone(u,d),d.framebuffer=this.framebuffer,d.shaderProgram=DTe(e.context,u.shaderProgram),d.castShadows=!1,d.receiveShadows=!1,c(m)||(m={command:d,originalShaderProgram:u.shaderProgram},u.derivedCommands.pointCloudProcessor=m),m.originalShaderProgram=u.shaderProgram),r[o]=d}const a=this._clearCommand,l=this._drawCommand;l.boundingVolume=i,r.push(l),r.push(a)},I0.prototype.isDestroyed=function(){return!1},I0.prototype.destroy=function(){return function STe(e){e._framebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}(this),Xe(this)};const jL=I0;function xG(e){const t=g(e,{});this.attenuation=g(t.attenuation,!1),this.geometricErrorScale=g(t.geometricErrorScale,1),this.maximumAttenuation=t.maximumAttenuation,this.baseResolution=t.baseResolution,this.eyeDomeLighting=g(t.eyeDomeLighting,!0),this.eyeDomeLightingStrength=g(t.eyeDomeLightingStrength,1),this.eyeDomeLightingRadius=g(t.eyeDomeLightingRadius,1),this.backFaceCulling=g(t.backFaceCulling,!1),this.normalShading=g(t.normalShading,!0)}xG.isSupported=function(e){return jL.isSupported(e.context)};const ev=xG,tv={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3,getMorphTime:function(e){return e===tv.SCENE3D?1:e===tv.MORPHING?void 0:0}},ce=Object.freeze(tv),zr={},PTe=new de(0,0,0,1);let va=new de;const OTe=new Vt,WL=new V,qL=new V;zr.worldToWindowCoordinates=function(e,t,n){return zr.worldWithEyeOffsetToWindowCoordinates(e,t,f.ZERO,n)},zr.wgs84ToWindowCoordinates=function(e,t,n){return Ud("SceneTransforms.wgs84ToWindowCoordinates","SceneTransforms.wgs84ToWindowCoordinates has been deprecated. It will be removed in 1.21. Use SceneTransforms.worldToWindowCoordinates instead."),zr.worldToWindowCoordinates(e,t,n)};const CG=new de,EG=new f;function qA(e,t,n,i){const r=k.multiplyByVector(n.viewMatrix,de.fromElements(e.x,e.y,e.z,1,CG),CG),s=f.multiplyComponents(t,f.normalize(r,EG),EG);return r.x+=t.x+s.x,r.y+=t.y+s.y,r.z+=s.z,k.multiplyByVector(n.frustum.projectionMatrix,r,i)}const RTe=new Ce(Math.PI,O.PI_OVER_TWO),LTe=new f,NTe=new f;zr.worldWithEyeOffsetToWindowCoordinates=function(e,t,n,i){if(!c(e))throw new E("scene is required.");if(!c(t))throw new E("position is required.");const o=e.frameState,r=zr.computeActualEllipsoidPosition(o,t,PTe);if(!c(r))return;const s=e.canvas,a=OTe;a.x=0,a.y=0,a.width=s.clientWidth,a.height=s.clientHeight;const l=e.camera;let u=!1;if(o.mode===ce.SCENE2D){const m=e.mapProjection.project(RTe,LTe),_=f.clone(l.position,NTe),p=l.frustum.clone(),y=k.computeViewportTransformation(a,0,1,new k),b=l.frustum.projectionMatrix,x=l.positionWC.y,C=f.fromElements(O.sign(x)*m.x-x,0,-l.positionWC.x),w=In.pointToGLWindowCoordinates(b,y,C);if(0===x||w.x<=0||w.x>=s.clientWidth)u=!0;else{if(w.x>.5*s.clientWidth){a.width=w.x,l.frustum.right=m.x-x,va=qA(r,n,l,va),zr.clipToGLWindowCoordinates(a,va,WL),a.x+=w.x,l.position.x=-l.position.x;const v=l.frustum.right;l.frustum.right=-l.frustum.left,l.frustum.left=-v,va=qA(r,n,l,va),zr.clipToGLWindowCoordinates(a,va,qL)}else{a.x+=w.x,a.width-=w.x,l.frustum.left=-m.x-x,va=qA(r,n,l,va),zr.clipToGLWindowCoordinates(a,va,WL),a.x=a.x-a.width,l.position.x=-l.position.x;const v=l.frustum.left;l.frustum.left=-l.frustum.right,l.frustum.right=-v,va=qA(r,n,l,va),zr.clipToGLWindowCoordinates(a,va,qL)}f.clone(_,l.position),l.frustum=p.clone(),((i=V.clone(WL,i)).x<0||i.x>s.clientWidth)&&(i.x=qL.x)}}if(o.mode!==ce.SCENE2D||u){if(va=qA(r,n,l,va),va.z<0&&!(l.frustum instanceof $n)&&!(l.frustum instanceof Qa))return;i=zr.clipToGLWindowCoordinates(a,va,i)}return i.y=s.clientHeight-i.y,i},zr.worldToDrawingBufferCoordinates=function(e,t,n){if(n=zr.worldToWindowCoordinates(e,t,n),c(n))return zr.transformWindowToDrawingBuffer(e,n,n)},zr.wgs84ToDrawingBufferCoordinates=function(e,t,n){return Ud("SceneTransforms.wgs84ToDrawingBufferCoordinates","SceneTransforms.wgs84ToDrawingBufferCoordinates has been deprecated. It will be removed in 1.21. Use SceneTransforms.worldToDrawingBufferCoordinates instead."),zr.worldToDrawingBufferCoordinates(e,t,n)};const ch=new f,MTe=new Ce;zr.computeActualEllipsoidPosition=function(e,t,n){const i=e.mode;if(i===ce.SCENE3D)return f.clone(t,n);const o=e.mapProjection,r=o.ellipsoid.cartesianToCartographic(t,MTe);if(!c(r))return;if(o.project(r,ch),i===ce.COLUMBUS_VIEW)return f.fromElements(ch.z,ch.x,ch.y,n);if(i===ce.SCENE2D)return f.fromElements(0,ch.x,ch.y,n);const s=e.morphTime;return f.fromElements(O.lerp(ch.z,t.x,s),O.lerp(ch.x,t.y,s),O.lerp(ch.y,t.z,s),n)};const wG=new f,SG=new f,vG=new k;zr.clipToGLWindowCoordinates=function(e,t,n){return f.divideByScalar(t,t.w,wG),k.computeViewportTransformation(e,0,1,vG),k.multiplyByPoint(vG,wG,SG),V.fromCartesian3(SG,n)},zr.transformWindowToDrawingBuffer=function(e,t,n){const i=e.canvas;return V.fromElements(t.x*(e.drawingBufferWidth/i.clientWidth),t.y*(e.drawingBufferHeight/i.clientHeight),n)};const FTe=new de,IG=new de;zr.drawingBufferToWorldCoordinates=function(e,t,n,i){const r=e.context.uniformState,s=r.currentFrustum,a=s.x,l=s.y;e.frameState.useLogDepth&&(n=l*(1-a/(Math.pow(2,n*r.log2FarDepthFromNearPlusOne)-1+a))/(l-a));const u=e.view.passState.viewport,d=de.clone(de.UNIT_W,FTe);d.x=(t.x-u.x)/u.width*2-1,d.y=(t.y-u.y)/u.height*2-1,d.z=2*n-1,d.w=1;let h,m=e.camera.frustum;if(c(m.fovy))h=k.multiplyByVector(r.inverseViewProjection,d,IG),f.multiplyByScalar(h,1/h.w,h);else{const _=m.offCenterFrustum;c(_)&&(m=_),h=IG,h.x=.5*(d.x*(m.right-m.left)+m.left+m.right),h.y=.5*(d.y*(m.top-m.bottom)+m.bottom+m.top),h.z=.5*(d.z*(a-l)-a-l),h.w=1,h=k.multiplyByVector(r.inverseView,h,h)}return f.fromCartesian4(h,i)};const Pr=zr,rl={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3,NUMBER_OF_SHADOW_MODES:4,castShadows:function(e){return e===rl.ENABLED||e===rl.CAST_ONLY},receiveShadows:function(e){return e===rl.ENABLED||e===rl.RECEIVE_ONLY},fromCastReceive:function(e,t){return e&&t?rl.ENABLED:e?rl.CAST_ONLY:t?rl.RECEIVE_ONLY:rl.DISABLED}},Ko=Object.freeze(rl),$_=Object.freeze({LEFT:-1,NONE:0,RIGHT:1}),D0={};D0._deprecationWarning=Ud;const lh=Uint32Array.BYTES_PER_ELEMENT;D0.parse=function(e,t){const n=g(t,0);A.defined("arrayBuffer",e),t=n;const i=new Uint8Array(e),o=new DataView(e),r=o.getUint32(t+=lh,!0);if(1!==r)throw new Pe(`Only Batched 3D Model version 1 is supported. Version ${r} is not.`);const s=o.getUint32(t+=lh,!0);let h,m,a=o.getUint32(t+=lh,!0),l=o.getUint32(t+=lh,!0),u=o.getUint32(t+=lh,!0),d=o.getUint32(t+=lh,!0);t+=lh,u>=570425344?(t-=2*lh,h=a,u=l,d=0,a=0,l=0,D0._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.")):d>=570425344&&(t-=lh,h=u,u=a,d=l,a=0,l=0,D0._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.")),0===a?m={BATCH_LENGTH:g(h,0)}:(m=Cc(i,t,a),t+=a);const _=new Uint8Array(e,t,l);let p,y;t+=l,u>0&&(p=Cc(i,t,u),t+=u,d>0&&(y=new Uint8Array(e,t,d),y=new Uint8Array(y),t+=d));const b=n+s-t;if(0===b)throw new Pe("glTF byte length must be greater than 0.");let x;return t%4==0?x=new Uint8Array(e,t,b):(D0._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),x=new Uint8Array(i.subarray(t,t+b))),{batchLength:h,featureTableJson:m,featureTableBinary:_,batchTableJson:p,batchTableBinary:y,gltf:x}};const BTe=D0;function YA(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function DG(e,t,n,i,o,r){const s=e._cachedTypedArrays;let a=s[t];return c(a)||(a=ee.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+r,o*i),s[t]=a),a}YA.prototype.getGlobalProperty=function(e,t,n){const i=this.json[e];if(c(i))return c(i.byteOffset)?DG(this,e,t=g(t,ee.UNSIGNED_INT),n=g(n,1),1,i.byteOffset):i},YA.prototype.hasProperty=function(e){return c(this.json[e])},YA.prototype.getPropertyArray=function(e,t,n){const i=this.json[e];if(c(i))return c(i.byteOffset)?(c(i.componentType)&&(t=ee.fromName(i.componentType)),DG(this,e,t,n,this.featuresLength,i.byteOffset)):function kTe(e,t,n,i){const o=e._cachedTypedArrays;let r=o[t];return c(r)||(r=ee.createTypedArray(n,i),o[t]=r),r}(this,e,t,i)},YA.prototype.getProperty=function(e,t,n,i,o){if(!c(this.json[e]))return;const s=this.getPropertyArray(e,t,n);if(1===n)return s[i];for(let a=0;a<n;++a)o[a]=s[n*i+a];return o};const nv=YA;function XA(e){A.typeOf.number("options.count",e.count),A.typeOf.object("options.batchTable",e.batchTable);const t=e.count,n=e.batchTable,i=e.binaryBody,o=g(e.parseAsPropertyAttributes,!1),r=e.customAttributeOutput;if(o&&!c(r))throw new E("customAttributeOutput is required when parsing batch table as property attributes");const s=function UTe(e){const t=e.HIERARCHY,n=e.extras,i=e.extensions;let o,r;c(t)?(XA._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),o=t):c(i)&&(o=i["3DTILES_batch_table_hierarchy"]);const s={};for(const a in e){if(!e.hasOwnProperty(a)||"HIERARCHY"===a||"extensions"===a||"extras"===a)continue;const l=e[a];Array.isArray(l)?(r=c(r)?r:{},r[a]=l):s[a]=l}return{binaryProperties:s,jsonProperties:r,hierarchy:o,extras:n,extensions:i}}(n);let a,l;c(s.jsonProperties)&&(a=new xL({count:t,properties:s.jsonProperties})),c(s.hierarchy)&&(l=new SH({extension:s.hierarchy,binaryBody:i}));const u=PS.BATCH_TABLE_CLASS_NAME,d=s.binaryProperties;let h,m,_;if(o){const b=function VTe(e,t,n,i,o){const r={},s={};let a=0;for(const h in n){if(!n.hasOwnProperty(h))continue;const m=n[h];if(!c(i)&&!c(m.typedArray))throw new Pe(`Property ${h} requires a batch table binary.`);let _=ti.sanitizeGlslIdentifier(h);(""===_||r.hasOwnProperty(_))&&(_=`property_${a}`,a++);const p=PG(m);p.name=h,r[_]=p;let y=_.toUpperCase();y.startsWith("_")||(y=`_${y}`);let b=m.typedArray;c(b)||(b=S_(m).createArrayBufferView(i.buffer,i.byteOffset+m.byteOffset,e));const x=new li.Attribute;x.name=y,x.count=e,x.type=m.type;const C=ee.fromTypedArray(b);(C===ee.INT||C===ee.UNSIGNED_INT||C===ee.DOUBLE)&&(XA._oneTimeWarning("Cast pnts property to floats",`Point cloud property "${y}" 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.`),b=new Float32Array(b)),x.componentDatatype=ee.fromTypedArray(b),x.typedArray=b,o.push(x),s[_]={attribute:y}}const l={classes:{}};l.classes[t]={properties:r};const u=NA.fromJson(l);return{class:t,propertyAttributeJson:{properties:s},transcodedSchema:u,transcodedClass:u.classes[t]}}(t,u,d,i,r);_=b.transcodedSchema,m=[new nG({propertyAttribute:b.propertyAttributeJson,class:b.transcodedClass})]}else{const b=function zTe(e,t,n,i){const o={},r={},s={};let a=0;for(const h in n){if(!n.hasOwnProperty(h))continue;if(!c(i))throw new Pe(`Property ${h} requires a batch table binary.`);const m=n[h],_=S_(m);r[h]={bufferView:a},o[h]=PG(m),s[a]=_.createArrayBufferView(i.buffer,i.byteOffset+m.byteOffset,e),a++}const l={classes:{}};l.classes[t]={properties:o};const u=NA.fromJson(l);return{featureTableJson:{class:t,count:e,properties:r},bufferViewsTypedArrays:s,transcodedSchema:u,transcodedClass:u.classes[t]}}(t,u,d,i);_=b.transcodedSchema;const x=b.featureTableJson;h=new vA({count:x.count,properties:x.properties,class:b.transcodedClass,bufferViews:b.bufferViewsTypedArrays}),m=[]}const p=[];if(c(h)||c(a)||c(l)){const b=new w0({id:0,name:"Batch Table",count:t,metadataTable:h,jsonMetadataTable:a,batchTableHierarchy:l});p.push(b)}return new q_({schema:_,propertyTables:p,propertyAttributes:m,extensions:s.extensions,extras:s.extras})}function PG(e){const t=function HTe(e){switch(e){case"BYTE":return"INT8";case"UNSIGNED_BYTE":return"UINT8";case"SHORT":return"INT16";case"UNSIGNED_SHORT":return"UINT16";case"INT":return"INT32";case"UNSIGNED_INT":return"UINT32";case"FLOAT":return"FLOAT32";case"DOUBLE":return"FLOAT64"}}(e.componentType);return{type:e.type,componentType:t}}XA._deprecationWarning=Ud,XA._oneTimeWarning=_n;const YL=XA,GTe=li.FeatureIdAttribute;function jp(e){const t=(e=g(e,g.EMPTY_OBJECT)).b3dmResource;let n=e.baseResource;const i=e.arrayBuffer,o=g(e.byteOffset,0),r=g(e.releaseGltfJson,!1),s=g(e.asynchronous,!0),a=g(e.incrementallyLoadTextures,!0),l=g(e.upAxis,Ms.Y),u=g(e.forwardAxis,Ms.X),d=g(e.loadAttributesAsTypedArray,!1),h=g(e.loadAttributesFor2D,!1),m=g(e.enablePick,!1),_=g(e.loadIndicesForWireframe,!1),p=g(e.loadPrimitiveOutline,!0),y=g(e.loadForClassification,!1);A.typeOf.object("options.b3dmResource",t),A.typeOf.object("options.arrayBuffer",i),n=c(n)?n:t.clone(),this._b3dmResource=t,this._baseResource=n,this._arrayBuffer=i,this._byteOffset=o,this._releaseGltfJson=r,this._asynchronous=s,this._incrementallyLoadTextures=a,this._upAxis=l,this._forwardAxis=u,this._loadAttributesAsTypedArray=d,this._loadAttributesFor2D=h,this._enablePick=m,this._loadIndicesForWireframe=_,this._loadPrimitiveOutline=p,this._loadForClassification=y,this._state=0,this._promise=void 0,this._gltfLoader=void 0,this._batchLength=0,this._propertyTable=void 0,this._batchTable=void 0,this._components=void 0,this._transform=k.IDENTITY}function OG(e){const t=e.children.length;for(let i=0;i<t;i++)OG(e.children[i]);const n=e.primitives.length;for(let i=0;i<n;i++){const o=e.primitives[i],r=ti.getAttributeBySemantic(o,ln.FEATURE_ID);if(c(r)){r.setIndex=0;const s=new GTe;s.propertyTableId=0,s.setIndex=0,s.positionalLabel="featureId_0",o.featureIds.push(s)}}}c(Object.create)&&((jp.prototype=Object.create(Ja.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(c(this._promise))return this._promise;const e=BTe.parse(this._arrayBuffer,this._byteOffset);let t=e.batchLength;const o=e.batchTableJson,r=e.batchTableBinary,s=new nv(e.featureTableJson,e.featureTableBinary);t=s.getGlobalProperty("BATCH_LENGTH"),this._batchLength=t;const a=s.getGlobalProperty("RTC_CENTER",ee.FLOAT,3);c(a)&&(this._transform=k.fromTranslation(f.fromArray(a))),this._batchTable={json:o,binary:r};const l=new zL({typedArray:e.gltf,upAxis:this._upAxis,forwardAxis:this._forwardAxis,gltfResource:this._b3dmResource,baseResource:this._baseResource,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,loadAttributesFor2D:this._loadAttributesFor2D,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline,loadForClassification:this._loadForClassification,renameBatchIdSemantic:!0});this._gltfLoader=l,this._state=1;const u=this;return this._promise=l.load().then(function(){if(!u.isDestroyed())return u._state=2,u}).catch(function(d){if(!u.isDestroyed())return function jTe(e,t){e.unload(),e._state=4;return t=e.getError("Failed to load b3dm",t),Promise.reject(t)}(u,d)}),this._promise},jp.prototype.process=function(e){if(A.typeOf.object("frameState",e),3===this._state)return!0;if(2!==this._state||!this._gltfLoader.process(e))return!1;const n=this._gltfLoader.components;return n.transform=k.multiplyTransformation(this._transform,n.transform,n.transform),function WTe(e,t){const n=e._batchTable,i=e._batchLength;if(0===i)return;let o;if(c(n.json))o=YL({count:i,batchTable:n.json,binaryBody:n.binary});else{const a=new w0({name:PS.BATCH_TABLE_CLASS_NAME,count:i});o=new q_({schema:{},propertyTables:[a]})}const r=t.scene.nodes,s=r.length;for(let a=0;a<s;a++)OG(r[a]);t.structuralMetadata=o}(this,n),this._components=n,this._arrayBuffer=void 0,this._state=3,!0},jp.prototype.unload=function(){c(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),this._components=void 0,this._arrayBuffer=void 0};const qTe=jp;function Wp(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.geoJson",e.geoJson),this._geoJson=e.geoJson,this._components=void 0}function YTe(){this.lines=void 0,this.points=void 0,this.properties=void 0}function XTe(){this.features=[]}function XL(e){const t=e[0],n=e[1],i=g(e[2],0);return new f(t,n,i)}function ZL(e){const t=e.length,n=new Array(t);for(let o=0;o<t;o++)n[o]=XL(e[o]);return[n]}function RG(e){const t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=ZL(e[i])[0];return n}c(Object.create)&&((Wp.prototype=Object.create(Ja.prototype)).constructor=Wp),Object.defineProperties(Wp.prototype,{cacheKey:{get:function(){}},components:{get:function(){return this._components}}}),Wp.prototype.load=function(){return Promise.resolve(this)},Wp.prototype.process=function(e){return A.typeOf.object("frameState",e),c(this._components)||(this._components=function rAe(e,t){const n=new XTe,i=nAe[e.type];c(i)&&i(e,n);const o=n.features,r=o.length;if(0===r)throw new Pe("GeoJSON must have at least one feature");const s={};for(let B=0;B<r;B++){const S=g(o[B].properties,g.EMPTY_OBJECT);for(const D in S)S.hasOwnProperty(D)&&(c(s[D])||(s[D]=new Array(r)))}for(let B=0;B<r;B++){const F=o[B];for(const S in s)if(s.hasOwnProperty(S)){const D=g(F.properties[S],"");s[S][B]=D}}const a=new xL({count:r,properties:s}),u=[new w0({id:0,count:r,jsonMetadataTable:a})],d=NA.fromJson({}),h=new q_({schema:d,propertyTables:u}),m=new f(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),_=new f(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);let p=!1,y=!1;for(let B=0;B<r;B++){const F=o[B];if(c(F.lines)){p=!0;const S=F.lines.length;for(let D=0;D<S;D++){const L=F.lines[D],M=L.length;for(let U=0;U<M;U++)f.minimumByComponent(m,L[U],m),f.maximumByComponent(_,L[U],_)}}if(c(F.points)){y=!0;const S=F.points.length;for(let D=0;D<S;D++){const L=F.points[D];f.minimumByComponent(m,L,m),f.maximumByComponent(_,L,_)}}}const b=f.midpoint(m,_,new f),x=f.fromDegrees(b.x,b.y,b.z,he.WGS84,new f),C=In.eastNorthUpToFixedFrame(x,he.WGS84,new k),w=k.inverseTransformation(C,new k),v=[];p&&v.push(function iAe(e,t,n){let i=0,o=0;const r=e.length;for(let B=0;B<r;B++){const F=e[B];if(c(F.lines)){const S=F.lines.length;for(let D=0;D<S;D++){const L=F.lines[D];i+=L.length,o+=2*(L.length-1)}}}const s=new Float32Array(3*i),a=new Float32Array(i),l=Ot.createTypedArray(i,o),u=Ot.fromTypedArray(l),d=new f(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),h=new f(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);let m=0,_=0;for(let B=0;B<r;B++){const F=e[B];if(!c(F.lines))continue;const S=F.lines.length;for(let D=0;D<S;D++){const L=F.lines[D],M=L.length;for(let U=0;U<M;U++){const z=L[U],G=f.fromDegrees(z.x,z.y,z.z,he.WGS84,iv),W=k.multiplyByPoint(t,G,iv);f.minimumByComponent(d,W,d),f.maximumByComponent(h,W,h),f.pack(W,s,3*m),a[m]=B,U<M-1&&(l[2*_]=m,l[2*_+1]=m+1,_++),m++}}}const p=yn.createVertexBuffer({typedArray:s,context:n.context,usage:At.STATIC_DRAW});p.vertexArrayDestroyable=!1;const y=yn.createVertexBuffer({typedArray:a,context:n.context,usage:At.STATIC_DRAW});y.vertexArrayDestroyable=!1;const b=yn.createIndexBuffer({typedArray:l,context:n.context,usage:At.STATIC_DRAW,indexDatatype:u});b.vertexArrayDestroyable=!1;const x=new li.Attribute;x.semantic=ln.POSITION,x.componentDatatype=ee.FLOAT,x.type=Wn.VEC3,x.count=i,x.min=d,x.max=h,x.buffer=p;const C=new li.Attribute;C.semantic=ln.FEATURE_ID,C.setIndex=0,C.componentDatatype=ee.FLOAT,C.type=Wn.SCALAR,C.count=i,C.buffer=y;const w=[x,C],v=new li.Material;v.unlit=!0;const I=new li.Indices;I.indexDatatype=u,I.count=l.length,I.buffer=b;const P=new li.FeatureIdAttribute;P.featureCount=r,P.propertyTableId=0,P.setIndex=0,P.positionalLabel="featureId_0";const N=[P],R=new li.Primitive;return R.attributes=w,R.indices=I,R.featureIds=N,R.primitiveType=Tt.LINES,R.material=v,R}(o,w,t)),y&&v.push(function oAe(e,t,n){let i=0;const o=e.length;for(let w=0;w<o;w++){const v=e[w];c(v.points)&&(i+=v.points.length)}const r=new Float32Array(3*i),s=new Float32Array(i),a=new f(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),l=new f(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);let u=0;for(let w=0;w<o;w++){const v=e[w];if(!c(v.points))continue;const I=v.points.length;for(let P=0;P<I;P++){const N=v.points[P],R=f.fromDegrees(N.x,N.y,N.z,he.WGS84,iv),B=k.multiplyByPoint(t,R,iv);f.minimumByComponent(a,B,a),f.maximumByComponent(l,B,l),f.pack(B,r,3*u),s[u]=w,u++}}const d=yn.createVertexBuffer({typedArray:r,context:n.context,usage:At.STATIC_DRAW});d.vertexArrayDestroyable=!1;const h=yn.createVertexBuffer({typedArray:s,context:n.context,usage:At.STATIC_DRAW});h.vertexArrayDestroyable=!1;const m=new li.Attribute;m.semantic=ln.POSITION,m.componentDatatype=ee.FLOAT,m.type=Wn.VEC3,m.count=i,m.min=a,m.max=l,m.buffer=d;const _=new li.Attribute;_.semantic=ln.FEATURE_ID,_.setIndex=0,_.componentDatatype=ee.FLOAT,_.type=Wn.SCALAR,_.count=i,_.buffer=h;const p=[m,_],y=new li.Material;y.unlit=!0;const b=new li.FeatureIdAttribute;b.featureCount=o,b.propertyTableId=0,b.setIndex=0,b.positionalLabel="featureId_0";const x=[b],C=new li.Primitive;return C.attributes=p,C.featureIds=x,C.primitiveType=Tt.POINTS,C.material=y,C}(o,w,t));const I=new li.Node;I.index=0,I.primitives=v;const P=[I],N=new li.Scene;N.nodes=P;const R=new li.Components;return R.scene=N,R.nodes=P,R.transform=C,R.structuralMetadata=h,R}(this._geoJson,e),this._geoJson=void 0),!0};const JTe={LineString:ZL,MultiLineString:function ZTe(e){const t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=ZL(e[i])[0];return n},MultiPolygon:function $Te(e){const t=e.length,n=[];for(let i=0;i<t;i++)Array.prototype.push.apply(n,RG(e[i]));return n},Polygon:RG,MultiPoint:function QTe(e){const t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=XL(e[i]);return n},Point:function KTe(e){return[XL(e)]}},eAe={LineString:Tt.LINES,MultiLineString:Tt.LINES,MultiPolygon:Tt.LINES,Polygon:Tt.LINES,MultiPoint:Tt.POINTS,Point:Tt.POINTS};function LG(e,t){if(!c(e.geometry))return;const n=e.geometry.type,i=JTe[n],o=eAe[n],r=e.geometry.coordinates;if(!c(i)||!c(r))return;const s=new YTe;o===Tt.LINES?s.lines=i(r):o===Tt.POINTS&&(s.points=i(r)),s.properties=e.properties,t.features.push(s)}const nAe={FeatureCollection:function tAe(e,t){const n=e.features,i=n.length;for(let o=0;o<i;o++)LG(n[o],t)},Feature:LG},iv=new f;Wp.prototype.unload=function(){this._components=void 0};const sAe=Wp,ov={};ov._deprecationWarning=Ud;const qp=Uint32Array.BYTES_PER_ELEMENT;ov.parse=function(e,t){A.defined("arrayBuffer",e);const n=g(t,0);t=n;const i=new Uint8Array(e),o=new DataView(e),r=o.getUint32(t+=qp,!0);if(1!==r)throw new Pe(`Only Instanced 3D Model version 1 is supported. Version ${r} is not.`);const s=o.getUint32(t+=qp,!0),a=o.getUint32(t+=qp,!0);if(0===a)throw new Pe("featureTableJsonByteLength is zero, the feature table must be defined.");const l=o.getUint32(t+=qp,!0),u=o.getUint32(t+=qp,!0),d=o.getUint32(t+=qp,!0),h=o.getUint32(t+=qp,!0);if(1!==h&&0!==h)throw new Pe(`Only glTF format 0 (uri) or 1 (embedded) are supported. Format ${h} is not.`);const m=Cc(i,t+=qp,a);t+=a;const _=new Uint8Array(e,t,l);let p,y;t+=l,u>0&&(p=Cc(i,t,u),t+=u,d>0&&(y=new Uint8Array(e,t,d),y=new Uint8Array(y),t+=d));const b=n+s-t;if(0===b)throw new Pe("glTF byte length must be greater than 0.");let x;return t%4==0?x=new Uint8Array(e,t,b):(ov._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),x=new Uint8Array(i.subarray(t,t+b))),{gltfFormat:h,featureTableJson:m,featureTableBinary:_,batchTableJson:p,batchTableBinary:y,gltf:x}};const aAe=ov,rv=li.Attribute,cAe=li.FeatureIdAttribute,NG=li.Instances;function dh(e){const t=(e=g(e,g.EMPTY_OBJECT)).i3dmResource,n=e.arrayBuffer;let i=e.baseResource;const o=g(e.byteOffset,0),r=g(e.releaseGltfJson,!1),s=g(e.asynchronous,!0),a=g(e.incrementallyLoadTextures,!0),l=g(e.upAxis,Ms.Y),u=g(e.forwardAxis,Ms.X),d=g(e.loadAttributesAsTypedArray,!1),h=g(e.loadIndicesForWireframe,!1),m=g(e.loadPrimitiveOutline,!0),_=g(e.enablePick,!1);A.typeOf.object("options.i3dmResource",t),A.typeOf.object("options.arrayBuffer",n),i=c(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=l,this._forwardAxis=u,this._loadAttributesAsTypedArray=d,this._loadIndicesForWireframe=h,this._loadPrimitiveOutline=m,this._enablePick=_,this._state=0,this._promise=void 0,this._gltfLoader=void 0,this._buffers=[],this._components=void 0,this._transform=k.IDENTITY,this._batchTable=void 0,this._featureTable=void 0,this._instancesLength=0}c(Object.create)&&((dh.prototype=Object.create(Ja.prototype)).constructor=dh),Object.defineProperties(dh.prototype,{texturesLoaded:{get:function(){return this._gltfLoader?.texturesLoaded}},cacheKey:{get:function(){}},components:{get:function(){return this._components}}}),dh.prototype.load=function(){if(c(this._promise))return this._promise;const e=aAe.parse(this._arrayBuffer,this._byteOffset),i=e.batchTableJson,o=e.batchTableBinary,r=e.gltfFormat,s=new nv(e.featureTableJson,e.featureTableBinary);this._featureTable=s;const a=s.getGlobalProperty("INSTANCES_LENGTH");if(s.featuresLength=a,!c(a))throw new Pe("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=a;const l=s.getGlobalProperty("RTC_CENTER",ee.FLOAT,3);c(l)&&(this._transform=k.fromTranslation(f.fromArray(l))),this._batchTable={json:i,binary:o};const u={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(0===r){let h=Ky(e.gltf);h=h.replace(/[\s\0]+$/,"");const m=this._baseResource.getDerivedResource({url:h});u.gltfResource=m,u.baseResource=m}else u.gltfResource=this._i3dmResource,u.typedArray=e.gltf;const d=new zL(u);return this._gltfLoader=d,this._state=1,this._promise=d.load().then(()=>{if(!this.isDestroyed())return this._state=2,this}).catch(h=>{if(!this.isDestroyed())throw function lAe(e,t){e.unload(),e._state=5;return e.getError("Failed to load i3dm",t)}(this,h)}),this._promise},dh.prototype.process=function(e){if(A.typeOf.object("frameState",e),4===this._state)return!0;const t=this._gltfLoader;let n=!1;if(2===this._state&&(n=t.process(e)),!n)return!1;const i=t.components;return i.transform=k.multiplyTransformation(this._transform,i.transform,i.transform),function fAe(e,t,n){let i;const o=e._featureTable,r=e._instancesLength;if(0===r)return;const s=o.getGlobalProperty("RTC_CENTER",ee.FLOAT,3),a=o.getGlobalProperty("EAST_NORTH_UP"),l=o.hasProperty("NORMAL_UP")||o.hasProperty("NORMAL_UP_OCT32P")||a,u=o.hasProperty("SCALE")||o.hasProperty("SCALE_NON_UNIFORM"),d=function pAe(e,t){if(e.hasProperty("POSITION"))return e.getPropertyArray("POSITION",ee.FLOAT,3);if(e.hasProperty("POSITION_QUANTIZED")){const n=e.getPropertyArray("POSITION_QUANTIZED",ee.UNSIGNED_SHORT,3),i=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",ee.FLOAT,3);if(!c(i))throw new Pe("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");const o=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",ee.FLOAT,3);if(!c(o))throw new Pe("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const r=new Float32Array(n.length);for(let s=0;s<n.length/3;s++)for(let a=0;a<3;a++){const l=3*s+a;r[l]=n[l]/65535*o[a]+i[a]}return r}throw new Pe("Either POSITION or POSITION_QUANTIZED must be defined for each instance.")}(o);let h,m;l&&(h=new Float32Array(4*r)),u&&(m=new Float32Array(3*r));const _=new Float32Array(r),p=f.unpackArray(d);let y=new f;const b=new f,x=new f,C=new f,w=new oe,v=new bt,I=new Array(4),P=new f,N=new Array(3),R=new k;if(!c(s)||f.equals(f.unpack(s),f.ZERO)){const W=Ae.fromPoints(p);for(i=0;i<p.length;i++)f.subtract(p[i],W.center,sv),d[3*i+0]=sv.x,d[3*i+1]=sv.y,d[3*i+2]=sv.z;const q=k.fromTranslation(W.center,dAe);t.transform=k.multiplyTransformation(q,t.transform,t.transform)}for(i=0;i<r;i++){y=f.clone(p[i]),c(s)&&f.add(y,f.unpack(s),y),l&&(mAe(o,a,i,v,y,x,b,C,w,R),bt.pack(v,I,0),h[4*i+0]=I[0],h[4*i+1]=I[1],h[4*i+2]=I[2],h[4*i+3]=I[3]),u&&(_Ae(o,i,P),f.pack(P,N,0),m[3*i+0]=N[0],m[3*i+1]=N[1],m[3*i+2]=N[2]);let W=o.getProperty("BATCH_ID",ee.UNSIGNED_SHORT,1,i);c(W)||(W=i),_[i]=W}const B=new NG;B.transformInWorldSpace=!0;const F=e._buffers,S=new rv;if(S.name="Instance Translation",S.semantic=Sa.TRANSLATION,S.componentDatatype=ee.FLOAT,S.type=Wn.VEC3,S.count=r,S.typedArray=d,!l){const W=yn.createVertexBuffer({context:n.context,typedArray:d,usage:At.STATIC_DRAW});W.vertexArrayDestroyable=!1,F.push(W),S.buffer=W}if(B.attributes.push(S),l){const W=new rv;W.name="Instance Rotation",W.semantic=Sa.ROTATION,W.componentDatatype=ee.FLOAT,W.type=Wn.VEC4,W.count=r,W.typedArray=h,B.attributes.push(W)}if(u){const W=new rv;if(W.name="Instance Scale",W.semantic=Sa.SCALE,W.componentDatatype=ee.FLOAT,W.type=Wn.VEC3,W.count=r,l)W.typedArray=m;else{const q=yn.createVertexBuffer({context:n.context,typedArray:m,usage:At.STATIC_DRAW});q.vertexArrayDestroyable=!1,F.push(q),W.buffer=q}B.attributes.push(W)}const D=new rv;D.name="Instance Feature ID",D.setIndex=0,D.semantic=Sa.FEATURE_ID,D.componentDatatype=ee.FLOAT,D.type=Wn.SCALAR,D.count=r;const L=yn.createVertexBuffer({context:n.context,typedArray:_,usage:At.STATIC_DRAW});L.vertexArrayDestroyable=!1,F.push(L),D.buffer=L,B.attributes.push(D);const M=new cAe;M.propertyTableId=0,M.setIndex=0,M.positionalLabel="instanceFeatureId_0",B.featureIds.push(M);const U=t.nodes,z=U.length;let G=!1;for(i=0;i<z;i++){const W=U[i];W.primitives.length>0&&(W.instances=G?hAe(B):B,G=!0)}}(this,i,e),function uAe(e,t){const n=e._batchTable,i=e._instancesLength;if(0===i)return;let o;if(c(n.json))o=YL({count:i,batchTable:n.json,binaryBody:n.binary});else{const r=new w0({name:PS.BATCH_TABLE_CLASS_NAME,count:i});o=new q_({schema:{},propertyTables:[r]})}t.structuralMetadata=o}(this,i),this._components=i,this._arrayBuffer=void 0,this._state=4,!0};const sv=new f,$L=new Array(4),dAe=new k;function hAe(e){const t=new NG;t.transformInWorldSpace=e.transformInWorldSpace;const n=e.attributes,i=n.length;for(let o=0;o<i;o++){const r=Rt(n[o],!1);t.attributes.push(r)}return t.featureIds=e.featureIds,t}const MG=new Array(4);function mAe(e,t,n,i,o,r,s,a,l,u){const d=e.getProperty("NORMAL_UP",ee.FLOAT,3,n,$L),h=e.getProperty("NORMAL_RIGHT",ee.FLOAT,3,n,MG);let m=!1;if(c(d)){if(!c(h))throw new Pe("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");f.unpack(d,0,r),f.unpack(h,0,s),m=!0}else{const _=e.getProperty("NORMAL_UP_OCT32P",ee.UNSIGNED_SHORT,2,n,$L),p=e.getProperty("NORMAL_RIGHT_OCT32P",ee.UNSIGNED_SHORT,2,n,MG);if(c(_)){if(!c(p))throw new Pe("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");wi.octDecodeInRange(_[0],_[1],65535,r),wi.octDecodeInRange(p[0],p[1],65535,s),m=!0}else t?(In.eastNorthUpToFixedFrame(o,he.WGS84,u),k.getMatrix3(u,l)):oe.clone(oe.IDENTITY,l)}m&&(f.cross(s,r,a),f.normalize(a,a),oe.setColumn(l,0,s,l),oe.setColumn(l,1,r,l),oe.setColumn(l,2,a,l)),bt.fromRotationMatrix(l,i)}function _Ae(e,t,n){n=f.fromElements(1,1,1,n);const i=e.getProperty("SCALE",ee.FLOAT,1,t);c(i)&&f.multiplyByScalar(n,i,n);const o=e.getProperty("SCALE_NON_UNIFORM",ee.FLOAT,3,t,$L);c(o)&&(n.x*=o[0],n.y*=o[1],n.z*=o[2])}dh.prototype.isUnloaded=function(){return 6===this._state},dh.prototype.unload=function(){c(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),function gAe(e){const t=e._buffers,n=t.length;for(let i=0;i<n;i++){const o=t[i];o.isDestroyed()||o.destroy()}t.length=0}(this),this._components=void 0,this._arrayBuffer=void 0,this._state=6};const yAe=dh,P0=Object.freeze({STOPPED:0,ANIMATING:1});function O0(){this.times=void 0,this.points=void 0,E.throwInstantiationError()}O0.getPointType=function(e){if("number"==typeof e)return Number;if(e instanceof f)return f;if(e instanceof bt)return bt;throw new E("point must be a Cartesian3, Quaternion, or number.")},O0.prototype.evaluate=E.throwInstantiationError,O0.prototype.findTimeInterval=function(e,t){const n=this.times,i=n.length;if(A.typeOf.number("time",e),e<n[0]||e>n[i-1])throw new E("time is out of range.");if(e>=n[t=g(t,0)]){if(t+1<i&&e<n[t+1])return t;if(t+2<i&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o<i-1&&!(e>=n[o]&&e<n[o+1]);++o);else for(o=t-1;o>=0&&!(e>=n[o]&&e<n[o+1]);--o);return o===i-1&&(o=i-2),o},O0.prototype.wrapTime=function(e){A.typeOf.number("time",e);const t=this.times,n=t[t.length-1],i=t[0],o=n-i;let r;return e<i&&(r=Math.floor((i-e)/o)+1,e+=r*o),e>n&&(r=Math.floor((e-n)/o)+1,e-=r*o),e},O0.prototype.clampTime=function(e){A.typeOf.number("time",e);const t=this.times;return O.clamp(e,t[0],t[t.length-1])};const Vr=O0;function R0(e){this._value=e,this._valueType=Vr.getPointType(e)}Object.defineProperties(R0.prototype,{value:{get:function(){return this._value}}}),R0.prototype.findTimeInterval=function(e){throw new E("findTimeInterval cannot be called on a ConstantSpline.")},R0.prototype.wrapTime=function(e){return A.typeOf.number("time",e),0},R0.prototype.clampTime=function(e){return A.typeOf.number("time",e),0},R0.prototype.evaluate=function(e,t){A.typeOf.number("time",e);const n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};const bAe=R0;function L0(e){const t=(e=g(e,g.EMPTY_OBJECT)).points,n=e.times;if(!c(t)||!c(n))throw new E("points and times are required.");if(t.length<2)throw new E("points.length must be greater than or equal to 2.");if(n.length!==t.length)throw new E("times.length must be equal to points.length.");this._times=n,this._points=t,this._pointType=Vr.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(L0.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),L0.prototype.findTimeInterval=Vr.prototype.findTimeInterval,L0.prototype.wrapTime=Vr.prototype.wrapTime,L0.prototype.clampTime=Vr.prototype.clampTime,L0.prototype.evaluate=function(e,t){const 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]:(c(t)||(t=new f),f.lerp(n[o],n[o+1],r,t))};const KL=L0,FG={solve:function(e,t,n,i){if(!(c(e)&&e instanceof Array))throw new E("The array lower is required.");if(!(c(t)&&t instanceof Array))throw new E("The array diagonal is required.");if(!(c(n)&&n instanceof Array))throw new E("The array upper is required.");if(!(c(i)&&i instanceof Array))throw new E("The array right is required.");if(t.length!==i.length)throw new E("diagonal and right must have the same lengths.");if(e.length!==n.length)throw new E("lower and upper must have the same lengths.");if(e.length!==t.length-1)throw new E("lower and upper must be one less than the length of diagonal.");const o=new Array(n.length),r=new Array(i.length),s=new Array(i.length);let a,l;for(a=0;a<r.length;a++)r[a]=new f,s[a]=new f;for(o[0]=n[0]/t[0],r[0]=f.multiplyByScalar(i[0],1/t[0],r[0]),a=1;a<o.length;++a)l=1/(t[a]-o[a-1]*e[a-1]),o[a]=n[a]*l,r[a]=f.subtract(i[a],f.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=f.multiplyByScalar(r[a],l,r[a]);for(l=1/(t[a]-o[a-1]*e[a-1]),r[a]=f.subtract(i[a],f.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=f.multiplyByScalar(r[a],l,r[a]),s[s.length-1]=r[r.length-1],a=s.length-2;a>=0;--a)s[a]=f.subtract(r[a],f.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s}},BG=FG,kG=[],UG=[],zG=[],VG=[];function vc(e){const t=(e=g(e,g.EMPTY_OBJECT)).points,n=e.times,i=e.inTangents,o=e.outTangents;if(!(c(t)&&c(n)&&c(i)&&c(o)))throw new E("times, points, inTangents, and outTangents are required.");if(t.length<2)throw new E("points.length must be greater than or equal to 2.");if(n.length!==t.length)throw new E("times.length must be equal to points.length.");if(i.length!==o.length||i.length!==t.length-1)throw new E("inTangents and outTangents must have a length equal to points.length - 1.");if(this._times=n,this._points=t,this._pointType=Vr.getPointType(t[0]),this._pointType!==Vr.getPointType(i[0])||this._pointType!==Vr.getPointType(o[0]))throw new E("inTangents and outTangents must be of the same type as points.");this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(vc.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}}),vc.createC1=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).times,n=e.points,i=e.tangents;if(!c(n)||!c(t)||!c(i))throw new E("points, times and tangents are required.");if(n.length<2)throw new E("points.length must be greater than or equal to 2.");if(t.length!==n.length||t.length!==i.length)throw new E("times, points and tangents must have the same length.");const o=i.slice(0,i.length-1);return new vc({times:t,points:n,inTangents:i.slice(1,i.length),outTangents:o})},vc.createNaturalCubic=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).times,n=e.points;if(!c(n)||!c(t))throw new E("points and times are required.");if(n.length<2)throw new E("points.length must be greater than or equal to 2.");if(t.length!==n.length)throw new E("times.length must be equal to points.length.");if(n.length<3)return new KL({points:n,times:t});const i=function AAe(e){const t=kG,n=zG,i=UG,o=VG;let r;t.length=n.length=e.length-1,i.length=o.length=e.length,t[0]=n[0]=1,i[0]=2;let s=o[0];for(c(s)||(s=o[0]=new f),f.subtract(e[1],e[0],s),f.multiplyByScalar(s,3,s),r=1;r<t.length;++r)t[r]=n[r]=1,i[r]=4,s=o[r],c(s)||(s=o[r]=new f),f.subtract(e[r+1],e[r-1],s),f.multiplyByScalar(s,3,s);return i[r]=2,s=o[r],c(s)||(s=o[r]=new f),f.subtract(e[r],e[r-1],s),f.multiplyByScalar(s,3,s),BG.solve(t,i,n,o)}(n),o=i.slice(0,i.length-1);return new vc({times:t,points:n,inTangents:i.slice(1,i.length),outTangents:o})},vc.createClampedCubic=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).times,n=e.points,i=e.firstTangent,o=e.lastTangent;if(!(c(n)&&c(t)&&c(i)&&c(o)))throw new E("points, times, firstTangent and lastTangent are required.");if(n.length<2)throw new E("points.length must be greater than or equal to 2.");if(t.length!==n.length)throw new E("times.length must be equal to points.length.");const r=Vr.getPointType(n[0]);if(r!==Vr.getPointType(i)||r!==Vr.getPointType(o))throw new E("firstTangent and lastTangent must be of the same type as points.");if(n.length<3)return new KL({points:n,times:t});const s=function TAe(e,t,n){const i=kG,o=zG,r=UG,s=VG;let a;i.length=o.length=e.length-1,r.length=s.length=e.length,i[0]=r[0]=1,o[0]=0;let l=s[0];for(c(l)||(l=s[0]=new f),f.clone(t,l),a=1;a<i.length-1;++a)i[a]=o[a]=1,r[a]=4,l=s[a],c(l)||(l=s[a]=new f),f.subtract(e[a+1],e[a-1],l),f.multiplyByScalar(l,3,l);return i[a]=0,o[a]=1,r[a]=4,l=s[a],c(l)||(l=s[a]=new f),f.subtract(e[a+1],e[a-1],l),f.multiplyByScalar(l,3,l),r[a+1]=1,l=s[a+1],c(l)||(l=s[a+1]=new f),f.clone(n,l),BG.solve(i,r,o,s)}(n,i,o),a=s.slice(0,s.length-1);return new vc({times:t,points:n,inTangents:s.slice(1,s.length),outTangents:a})},vc.hermiteCoefficientMatrix=new k(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0),vc.prototype.findTimeInterval=Vr.prototype.findTimeInterval;const xAe=new de,N0=new f;vc.prototype.wrapTime=Vr.prototype.wrapTime,vc.prototype.clampTime=Vr.prototype.clampTime,vc.prototype.evaluate=function(e,t){const n=this.points,i=this.times,o=this.inTangents,r=this.outTangents;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);const s=this._lastTimeIndex,a=i[s+1]-i[s],l=(e-i[s])/a,u=xAe;u.z=l,u.y=l*l,u.x=u.y*l,u.w=1;const d=k.multiplyByVector(vc.hermiteCoefficientMatrix,u,u);d.z*=a,d.w*=a;const h=this._pointType;return h===Number?n[s]*d.x+n[s+1]*d.y+r[s]*d.z+o[s]*d.w:(c(t)||(t=new h),t=h.multiplyByScalar(n[s],d.x,t),h.multiplyByScalar(n[s+1],d.y,N0),h.add(t,N0,t),h.multiplyByScalar(r[s],d.z,N0),h.add(t,N0,t),h.multiplyByScalar(o[s],d.w,N0),h.add(t,N0,t))};const CAe=vc;function M0(e){const t=(e=g(e,g.EMPTY_OBJECT)).points,n=e.times;if(!c(t)||!c(n))throw new E("points and times are required.");if(t.length<2)throw new E("points.length must be greater than or equal to 2.");if(n.length!==t.length)throw new E("times.length must be equal to points.length.");this._times=n,this._points=t,this._pointType=Vr.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(M0.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),M0.prototype.findTimeInterval=Vr.prototype.findTimeInterval,M0.prototype.wrapTime=Vr.prototype.wrapTime,M0.prototype.clampTime=Vr.prototype.clampTime,M0.prototype.evaluate=function(e,t){const n=this.points;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);const i=this._lastTimeIndex,o=this._pointType;return o===Number?n[i]:(c(t)||(t=new o),o.clone(n[i],t))};const EAe=M0;function F0(e){const t=(e=g(e,g.EMPTY_OBJECT)).points,n=e.times;if(!c(t)||!c(n))throw new E("points and times are required.");if(t.length<2)throw new E("points.length must be greater than or equal to 2.");if(n.length!==t.length)throw new E("times.length must be equal to points.length.");this._times=n,this._points=t,this._evaluateFunction=function wAe(e){const t=e.points,n=e.times;return function(i,o){c(o)||(o=new bt);const r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex);return bt.fastSlerp(t[r],t[r+1],(i-n[r])/(n[r+1]-n[r]),o)}}(this),this._lastTimeIndex=0}Object.defineProperties(F0.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),F0.prototype.findTimeInterval=Vr.prototype.findTimeInterval,F0.prototype.wrapTime=Vr.prototype.wrapTime,F0.prototype.clampTime=Vr.prototype.clampTime,F0.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};const SAe=F0,B0=li.AnimatedPropertyType;function QL(e){const t=(e=g(e,g.EMPTY_OBJECT)).channel,n=e.runtimeAnimation,i=e.runtimeNode;A.typeOf.object("options.channel",t),A.typeOf.object("options.runtimeAnimation",n),A.typeOf.object("options.runtimeNode",i),this._channel=t,this._runtimeAnimation=n,this._runtimeNode=i,this._splines=[],this._path=void 0,function OAe(e){const t=e._channel,n=t.sampler,a=t.target.path,l=e._runtimeNode,d=function IAe(e,t,n,i,o){const r=[];if(i===B0.WEIGHTS){const a=t.length/o;let l,u;for(l=0;l<o;l++){const d=new Array(a);let h=l;if(n===E0.CUBICSPLINE)for(u=0;u<a;u+=3)d[u]=t[h],d[u+1]=t[h+o],d[u+2]=t[h+2*o],h+=3*o;else for(u=0;u<a;u++)d[u]=t[h],h+=o;r.push(HG(e,d,n,i))}}else r.push(HG(e,t,n,i));return r}(n.input,n.output,n.interpolation,a,c(l.morphWeights)?l.morphWeights.length:1);e._splines=d,e._path=a}(this)}function HG(e,t,n,i){if(1===e.length&&1===t.length)return new bAe(t[0]);switch(n){case E0.STEP:return new EAe({times:e,points:t});case E0.CUBICSPLINE:return function vAe(e,t){const n=[],i=[],o=[],r=t.length;for(let s=0;s<r;s+=3)i.push(t[s]),n.push(t[s+1]),o.push(t[s+2]);return i.splice(0,1),o.length=o.length-1,new CAe({times:e,points:n,inTangents:i,outTangents:o})}(e,t);case E0.LINEAR:return i===B0.ROTATION?new SAe({times:e,points:t}):new KL({times:e,points:t})}}Object.defineProperties(QL.prototype,{channel:{get:function(){return this._channel}},runtimeAnimation:{get:function(){return this._runtimeAnimation}},runtimeNode:{get:function(){return this._runtimeNode}},splines:{get:function(){return this._splines}}});const DAe=new f,PAe=new bt;QL.prototype.animate=function(e){const t=this._splines,n=this._path,i=this._runtimeAnimation.model,o=this._runtimeNode;if(n===B0.WEIGHTS){const r=o.morphWeights,s=r.length;for(let a=0;a<s;a++){const l=t[a],u=i.clampAnimations?l.clampTime(e):l.wrapTime(e);r[a]=l.evaluate(u)}}else{if(o.userAnimated)return;{const r=t[0],s=i.clampAnimations?r.clampTime(e):r.wrapTime(e);n===B0.TRANSLATION||n===B0.SCALE?o[n]=r.evaluate(s,DAe):n===B0.ROTATION&&(o[n]=r.evaluate(s,PAe))}}};const RAe=QL;function JL(e,t,n){this._animation=t,this._name=t.name,this._runtimeChannels=void 0,this._startTime=re.clone(n.startTime),this._delay=g(n.delay,0),this._stopTime=re.clone(n.stopTime),this.removeOnStop=g(n.removeOnStop,!1),this._multiplier=g(n.multiplier,1),this._reverse=g(n.reverse,!1),this._loop=g(n.loop,k_.NONE),this._animationTime=n.animationTime,this._prevAnimationDelta=void 0,this.start=new Ye,this.update=new Ye,this.stop=new Ye,this._state=P0.STOPPED,this._computedStartTime=void 0,this._duration=void 0;const i=this;this._raiseStartEvent=function(){i.start.raiseEvent(e,i)},this._updateEventTime=0,this._raiseUpdateEvent=function(){i.update.raiseEvent(e,i,i._updateEventTime)},this._raiseStopEvent=function(){i.stop.raiseEvent(e,i)},this._model=e,this._localStartTime=void 0,this._localStopTime=void 0,function LAe(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE;const i=e._model.sceneGraph,r=e._animation.channels,s=r.length,a=[];for(let l=0;l<s;l++){const u=r[l],d=u.target;if(!c(d))continue;const _=new RAe({channel:u,runtimeAnimation:e,runtimeNode:i._runtimeNodes[d.node.index]}),p=u.sampler.input;t=Math.min(t,p[0]),n=Math.max(n,p[p.length-1]),a.push(_)}e._runtimeChannels=a,e._localStartTime=t,e._localStopTime=n}(this)}Object.defineProperties(JL.prototype,{animation:{get:function(){return this._animation}},name:{get:function(){return this._name}},runtimeChannels:{get:function(){return this._runtimeChannels}},model:{get:function(){return this._model}},localStartTime:{get:function(){return this._localStartTime}},localStopTime:{get:function(){return this._localStopTime}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}},animationTime:{get:function(){return this._animationTime}}}),JL.prototype.animate=function(e){const t=this._runtimeChannels,n=t.length;for(let i=0;i<n;i++)t[i].animate(e)};const NAe=JL;function fh(e){this.animationAdded=new Ye,this.animationRemoved=new Ye,this.animateWhilePaused=!1,this._model=e,this._runtimeAnimations=[],this._previousTime=void 0}function eN(e,t,n){const i=e._model,o=new NAe(i,t,n);return e._runtimeAnimations.push(o),e.animationAdded.raiseEvent(i,o),o}Object.defineProperties(fh.prototype,{length:{get:function(){return this._runtimeAnimations.length}},model:{get:function(){return this._model}}}),fh.prototype.add=function(e){e=g(e,g.EMPTY_OBJECT);const t=this._model;if(!t.ready)throw new E("Animations are not loaded. Wait for Model.ready to be true.");const n=t.sceneGraph.components.animations;if(!c(e.name)&&!c(e.index))throw new E("Either options.name or options.index must be defined.");if(c(e.multiplier)&&e.multiplier<=0)throw new E("options.multiplier must be greater than zero.");if(c(e.index)&&(e.index>=n.length||e.index<0))throw new E("options.index must be a valid animation index.");let i=e.index;if(c(i))return eN(this,n[i],e);const o=n.length;for(let r=0;r<o;++r)if(n[r].name===e.name){i=r;break}if(!c(i))throw new E("options.name must be a valid animation name.");return eN(this,n[i],e)},fh.prototype.addAll=function(e){e=g(e,g.EMPTY_OBJECT);const t=this._model;if(!t.ready)throw new E("Animations are not loaded. Wait for Model.ready to be true.");if(c(e.multiplier)&&e.multiplier<=0)throw new E("options.multiplier must be greater than zero.");const n=t.sceneGraph.components.animations,i=[],o=n.length;for(let r=0;r<o;++r){const s=eN(this,n[r],e);i.push(s)}return i},fh.prototype.remove=function(e){if(!c(e))return!1;const t=this._runtimeAnimations,n=t.indexOf(e);return-1!==n&&(t.splice(n,1),this.animationRemoved.raiseEvent(this._model,e),!0)},fh.prototype.removeAll=function(){const e=this._model,t=this._runtimeAnimations,n=t.length;this._runtimeAnimations.length=0;for(let i=0;i<n;++i)this.animationRemoved.raiseEvent(e,t[i])},fh.prototype.contains=function(e){return!!c(e)&&-1!==this._runtimeAnimations.indexOf(e)},fh.prototype.get=function(e){if(!c(e))throw new E("index is required.");if(e>=this._runtimeAnimations.length||e<0)throw new E("index must be valid within the range of the collection");return this._runtimeAnimations[e]};const av=[];function MAe(e,t,n){return function(){e.animationRemoved.raiseEvent(t,n)}}fh.prototype.update=function(e){const t=this._runtimeAnimations;let n=t.length;if(0===n)return this._previousTime=void 0,!1;if(!this.animateWhilePaused&&re.equals(e.time,this._previousTime))return!1;this._previousTime=re.clone(e.time,this._previousTime);let i=!1;const o=e.time,r=this._model;for(let s=0;s<n;++s){const a=t[s];c(a._computedStartTime)||(a._computedStartTime=re.addSeconds(g(a.startTime,o),a.delay,new re)),c(a._duration)||(a._duration=a.localStopTime*(1/a.multiplier));const l=a._computedStartTime,u=a._duration,d=a.stopTime,h=re.lessThanOrEquals(l,o),m=c(d)&&re.greaterThan(o,d);let _=0;if(0!==u){const b=re.secondsDifference(m?d:o,l);_=c(a._animationTime)?a._animationTime(u,b):b/u}const p=a.loop===k_.REPEAT||a.loop===k_.MIRRORED_REPEAT,y=(h||p&&!c(a.startTime))&&(_<=1||p)&&!m;if((_!==a._prevAnimationDelta||y===(a._state===P0.STOPPED))&&(a._prevAnimationDelta=_,y||a._state===P0.ANIMATING)){if(y&&a._state===P0.STOPPED&&(a._state=P0.ANIMATING,a.start.numberOfListeners>0&&e.afterRender.push(a._raiseStartEvent)),a.loop===k_.REPEAT)_-=Math.floor(_);else if(a.loop===k_.MIRRORED_REPEAT){const x=Math.floor(_),C=_-x;_=x%2==1?1-C:C}a.reverse&&(_=1-_);let b=_*u*a.multiplier;b=O.clamp(b,a.localStartTime,a.localStopTime),a.animate(b),a.update.numberOfListeners>0&&(a._updateEventTime=b,e.afterRender.push(a._raiseUpdateEvent)),i=!0,y||(a._state=P0.STOPPED,a.stop.numberOfListeners>0&&e.afterRender.push(a._raiseStopEvent),a.removeOnStop&&av.push(a))}}n=av.length;for(let s=0;s<n;++s){const a=av[s];t.splice(t.indexOf(a),1),e.afterRender.push(MAe(this,r,a))}return av.length=0,i};const FAe=fh;function Q_(e){this._model=e.model,this._featureTable=e.featureTable,this._featureId=e.featureId,this._color=void 0}Object.defineProperties(Q_.prototype,{show:{get:function(){return this._featureTable.getShow(this._featureId)},set:function(e){this._featureTable.setShow(this._featureId,e)}},color:{get:function(){return c(this._color)||(this._color=new Z),this._featureTable.getColor(this._featureId,this._color)},set:function(e){this._featureTable.setColor(this._featureId,e)}},primitive:{get:function(){return this._model}},featureTable:{get:function(){return this._featureTable}},featureId:{get:function(){return this._featureId}}}),Q_.prototype.hasProperty=function(e){return this._featureTable.hasProperty(this._featureId,e)},Q_.prototype.getProperty=function(e){return this._featureTable.getProperty(this._featureId,e)},Q_.prototype.getPropertyInherited=function(e){return this._featureTable.hasPropertyBySemantic(this._featureId,e)?this._featureTable.getPropertyBySemantic(this._featureId,e):this._featureTable.getProperty(this._featureId,e)},Q_.prototype.getPropertyIds=function(e){return this._featureTable.getPropertyIds(e)},Q_.prototype.setProperty=function(e,t){return this._featureTable.setProperty(this._featureId,e,t)};const BAe=Q_,ZA={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2,getStyleCommandsNeeded:function(e,t){return 0===t?ZA.ALL_OPAQUE:t===e?ZA.ALL_TRANSLUCENT:ZA.OPAQUE_AND_TRANSLUCENT}},$A=Object.freeze(ZA),Yp={GLTF:"GLTF",TILE_GLTF:"TILE_GLTF",TILE_B3DM:"B3DM",TILE_I3DM:"I3DM",TILE_PNTS:"PNTS",TILE_GEOJSON:"TILE_GEOJSON",is3DTiles:function(e){switch(A.typeOf.string("modelType",e),e){case Yp.TILE_GLTF:case Yp.TILE_B3DM:case Yp.TILE_I3DM:case Yp.TILE_PNTS:case Yp.TILE_GEOJSON:return!0;case Yp.GLTF:return!1;default:throw new E("modelType is not a valid value.")}}},Ia=Object.freeze(Yp);function Tr(e){const t=e.model,n=e.propertyTable;A.typeOf.object("propertyTable",n),A.typeOf.object("model",t),this._propertyTable=n,this._model=t,this._features=void 0,this._featuresLength=0,this._batchTexture=void 0,this._styleCommandsNeededDirty=!1,this._styleCommandsNeeded=$A.ALL_OPAQUE,function kAe(e){const t=e._model,n=Ia.is3DTiles(t.type),i=e._propertyTable.count;if(0===i)return;let o;const r=new Array(i);if(n){const s=t.content;for(o=0;o<i;o++)r[o]=new v_(s,o)}else for(o=0;o<i;o++)r[o]=new BAe({model:t,featureId:o,featureTable:e});e._features=r,e._featuresLength=i,e._batchTexture=new Wd({featuresLength:i,owner:e,statistics:n?t.content.tileset.statistics:void 0})}(this)}Object.defineProperties(Tr.prototype,{batchTexture:{get:function(){return this._batchTexture}},featuresLength:{get:function(){return this._featuresLength}},batchTextureByteLength:{get:function(){return c(this._batchTexture)?this._batchTexture.byteLength:0}},styleCommandsNeededDirty:{get:function(){return this._styleCommandsNeededDirty}}}),Tr.prototype.update=function(e){this._styleCommandsNeededDirty=!1,this._batchTexture.update(void 0,e);const t=$A.getStyleCommandsNeeded(this._featuresLength,this._batchTexture.translucentFeaturesLength);this._styleCommandsNeeded!==t&&(this._styleCommandsNeededDirty=!0,this._styleCommandsNeeded=t)},Tr.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)},Tr.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)},Tr.prototype.getShow=function(e){return this._batchTexture.getShow(e)},Tr.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)},Tr.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)},Tr.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)},Tr.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)},Tr.prototype.getFeature=function(e){return this._features[e]},Tr.prototype.hasProperty=function(e,t){return this._propertyTable.hasProperty(e,t)},Tr.prototype.hasPropertyBySemantic=function(e,t){return this._propertyTable.hasPropertyBySemantic(e,t)},Tr.prototype.getProperty=function(e,t){return this._propertyTable.getProperty(e,t)},Tr.prototype.getPropertyBySemantic=function(e,t){return this._propertyTable.getPropertyBySemantic(e,t)},Tr.prototype.getPropertyIds=function(e){return this._propertyTable.getPropertyIds(e)},Tr.prototype.setProperty=function(e,t,n){return this._propertyTable.setProperty(e,t,n)},Tr.prototype.isClass=function(e,t){return this._propertyTable.isClass(e,t)},Tr.prototype.isExactClass=function(e,t){return this._propertyTable.isExactClass(e,t)},Tr.prototype.getExactClassName=function(e){return this._propertyTable.getExactClassName(e)};const UAe=new Z;Tr.prototype.applyStyle=function(e){if(!c(e))return this.setAllColor(Wd.DEFAULT_COLOR_VALUE),void this.setAllShow(Wd.DEFAULT_SHOW_VALUE);for(let t=0;t<this._featuresLength;t++){const n=this.getFeature(t),i=c(e.color)?g(e.color.evaluateColor(n,UAe),Wd.DEFAULT_COLOR_VALUE):Wd.DEFAULT_COLOR_VALUE,o=c(e.show)?g(e.show.evaluate(n),Wd.DEFAULT_SHOW_VALUE):Wd.DEFAULT_SHOW_VALUE;this.setColor(t,i),this.setShow(t,o)}},Tr.prototype.isDestroyed=function(){return!1},Tr.prototype.destroy=function(e){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),Xe(this)};const zAe=Tr;function tN(e){const t=(e=g(e,g.EMPTY_OBJECT)).command,n=e.primitiveRenderResources;A.typeOf.object("options.command",t),A.typeOf.object("options.primitiveRenderResources",n);const i=n.model;this._command=t,this._model=i,this._runtimePrimitive=n.runtimePrimitive,this._modelMatrix=t.modelMatrix,this._boundingVolume=t.boundingVolume,this._cullFace=t.renderState.cull.face;const o=i.classificationType;this._classificationType=o,this._classifiesTerrain=o!==Xo.CESIUM_3D_TILE,this._classifies3DTiles=o!==Xo.TERRAIN,this._useDebugWireframe=i._enableDebugWireframe&&i.debugWireframe,this._pickId=n.pickId,this._commandListTerrain=[],this._commandList3DTiles=[],this._commandListIgnoreShow=[],this._commandListDebugWireframe=[],this._commandListTerrainPicking=[],this._commandList3DTilesPicking=[],function qAe(e){const t=e._command,n=GG;if(e._useDebugWireframe){t.pass=Ue.OPAQUE,n.length=0,n.push(t),e._commandListDebugWireframe=KA(e,n,e._commandListDebugWireframe);const r=e._commandListDebugWireframe,s=r.length;for(let a=0;a<s;a++){const l=r[a];l.count*=2,l.offset*=2}return}const o=e.model.allowPicking;if(e._classifiesTerrain){const r=Ue.TERRAIN_CLASSIFICATION,s=nN(t,r),a=jG(t,r);n.length=0,n.push(s,a),e._commandListTerrain=KA(e,n,e._commandListTerrain),o&&(e._commandListTerrainPicking=WG(e,n,e._commandListTerrainPicking))}if(e._classifies3DTiles){const r=Ue.CESIUM_3D_TILE_CLASSIFICATION,s=nN(t,r),a=jG(t,r);n.length=0,n.push(s,a),e._commandList3DTiles=KA(e,n,e._commandList3DTiles),o&&(e._commandList3DTilesPicking=WG(e,n,e._commandList3DTilesPicking))}}(this)}const jAe={stencilTest:{enabled:!0,frontFunction:Fi.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:Fi.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:xn.CLASSIFICATION_MASK},stencilMask:xn.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:eo.PRE_MULTIPLIED_ALPHA_BLEND},WAe={stencilTest:{enabled:!0,frontFunction:Fi.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:Fi.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:xn.CLASSIFICATION_MASK},stencilMask:xn.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1},GG=[];function KA(e,t,n){const i=e._runtimePrimitive,o=i.batchLengths,r=i.batchOffsets,s=o.length,a=t.length;for(let l=0;l<s;l++){const u=o[l],d=r[l];for(let h=0;h<a;h++){const _=$t.shallowClone(t[h]);_.count=u,_.offset=d,n.push(_)}}return n}function nN(e,t){const n=$t.shallowClone(e);n.cull=!1,n.pass=t;const o=function GAe(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:e,frontOperation:{fail:Zt.KEEP,zFail:Zt.DECREMENT_WRAP,zPass:Zt.KEEP},backFunction:e,backOperation:{fail:Zt.KEEP,zFail:Zt.INCREMENT_WRAP,zPass:Zt.KEEP},reference:xn.CESIUM_3D_TILE_MASK,mask:xn.CESIUM_3D_TILE_MASK},stencilMask:xn.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:I_.LESS_OR_EQUAL},depthMask:!1}}(t===Ue.TERRAIN_CLASSIFICATION?Fi.ALWAYS:Fi.EQUAL);return n.renderState=Lt.fromCache(o),n}function jG(e,t){const n=$t.shallowClone(e);return n.cull=!1,n.pass=t,n.renderState=Lt.fromCache(jAe),n}const YAe=[];function WG(e,t,n){const i=Lt.fromCache(WAe),r=t[1],s=$t.shallowClone(t[0]);s.cull=!0,s.pickOnly=!0;const a=$t.shallowClone(r);a.cull=!0,a.pickOnly=!0,a.renderState=i,a.pickId=e._pickId;const l=YAe;return l.length=0,l.push(s,a),KA(e,l,n)}Object.defineProperties(tN.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},batchLengths:{get:function(){return this._runtimePrimitive.batchLengths}},batchOffsets:{get:function(){return this._runtimePrimitive.batchOffsets}},model:{get:function(){return this._model}},classificationType:{get:function(){return this._classificationType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=k.clone(e,this._modelMatrix),this._boundingVolume=Ae.transform(this._runtimePrimitive.boundingSphere,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace=e}}}),tN.prototype.pushCommands=function(e,t){const n=e.passes;if(n.render){if(this._useDebugWireframe)return void t.push.apply(t,this._commandListDebugWireframe);if(this._classifiesTerrain&&t.push.apply(t,this._commandListTerrain),this._classifies3DTiles&&t.push.apply(t,this._commandList3DTiles),e.invertClassification&&this._classifies3DTiles){if(0===this._commandListIgnoreShow.length){const r=nN(this._command,Ue.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),s=GG;s.length=0,s.push(r),this._commandListIgnoreShow=KA(this,s,this._commandListIgnoreShow)}t.push.apply(t,this._commandListIgnoreShow)}}return n.pick&&(this._classifiesTerrain&&t.push.apply(t,this._commandListTerrainPicking),this._classifies3DTiles&&t.push.apply(t,this._commandList3DTilesPicking)),t};const XAe=tN;function cv(e){const t=(e=g(e,g.EMPTY_OBJECT)).command,n=e.primitiveRenderResources;A.typeOf.object("options.command",t),A.typeOf.object("options.primitiveRenderResources",n);const i=n.model;this._model=i;const o=n.runtimePrimitive;this._runtimePrimitive=o;const r=t.pass===Ue.TRANSLUCENT,a=!o.primitive.material.doubleSided&&!r,l=n.hasSilhouette,u=!r&&!l,d=n.hasSkipLevelOfDetail&&!r,h=l;this._command=t,this._modelMatrix=k.clone(t.modelMatrix),this._boundingVolume=Ae.clone(t.boundingVolume),this._modelMatrix2D=new k,this._boundingVolume2D=new Ae,this._modelMatrix2DDirty=!1,this._backFaceCulling=t.renderState.cull.enabled,this._cullFace=t.renderState.cull.face,this._shadows=i.shadows,this._debugShowBoundingVolume=t.debugShowBoundingVolume,this._usesBackFaceCulling=a,this._needsTranslucentCommand=u,this._needsSkipLevelOfDetailCommands=d,this._needsSilhouetteCommands=h,this._originalCommand=void 0,this._translucentCommand=void 0,this._skipLodBackfaceCommand=void 0,this._skipLodStencilCommand=void 0,this._silhouetteModelCommand=void 0,this._silhouetteColorCommand=void 0,this._derivedCommands=[],this._has2DCommands=!1,function ZAe(e){const t=e._command;t.modelMatrix=e._modelMatrix,t.boundingVolume=e._boundingVolume;const n=e._model,i=e._usesBackFaceCulling,o=e._derivedCommands;e._originalCommand=new hh({command:t,updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0,is2D:!1}),o.push(e._originalCommand),e._needsTranslucentCommand&&(e._translucentCommand=new hh({command:nxe(t),updateShadows:!0,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!0}),o.push(e._translucentCommand)),e._needsSkipLevelOfDetailCommands&&(e._skipLodBackfaceCommand=new hh({command:cxe(t),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:i,updateDebugShowBoundingVolume:!1}),e._skipLodStencilCommand=new hh({command:lxe(t),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),o.push(e._skipLodBackfaceCommand),o.push(e._skipLodStencilCommand)),e._needsSilhouetteCommands&&(e._silhouetteModelCommand=new hh({command:ixe(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),e._silhouetteColorCommand=new hh({command:oxe(t,n),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),o.push(e._silhouetteModelCommand),o.push(e._silhouetteColorCommand))}(this)}function hh(e){this.command=e.command,this.updateShadows=e.updateShadows,this.updateBackFaceCulling=e.updateBackFaceCulling,this.updateCullFace=e.updateCullFace,this.updateDebugShowBoundingVolume=e.updateDebugShowBoundingVolume,this.is2D=g(e.is2D,!1),this.derivedCommand2D=void 0}function k0(e,t,n){e.push(t.command),n&&e.push(t.derivedCommand2D.command)}function qG(e,t){if(t.mode!==ce.SCENE2D||e.model._projectTo2D)return!1;const i=e.model.sceneGraph._boundingSphere2D,o=i.center.y-i.radius,r=i.center.y+i.radius,s=t.mapProjection.ellipsoid.maximumRadius*O.PI;return o<s&&r>s||o<-s&&r>-s}function U0(e,t){if(!c(t))return;const n=hh.clone(t),i=$t.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 nxe(e){const t=$t.shallowClone(e);t.pass=Ue.TRANSLUCENT;const n=Rt(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=eo.ALPHA_BLEND,t.renderState=Lt.fromCache(n),t}function ixe(e,t){const n=t._silhouetteId%255,i=$t.shallowClone(e),o=Rt(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=Lt.fromCache(o),i}function oxe(e,t){const n=t._silhouetteId%255,i=$t.shallowClone(e),o=Rt(e.renderState,!0);o.cull.enabled=!1,(e.pass===Ue.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=Ue.TRANSLUCENT,o.depthMask=!1,o.blending=eo.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}};const s=Rt(e.uniformMap);return s.model_silhouettePass=function(){return!0},i.renderState=Lt.fromCache(o),i.uniformMap=s,i.castShadows=!1,i.receiveShadows=!1,i}function cxe(e){const t=$t.shallowClone(e),n=Rt(e.renderState,!0);n.cull.enabled=!0,n.cull.face=ur.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5};const i=Rt(t.uniformMap),o=new V(5,5);return i.u_polygonOffset=function(){return o},t.renderState=Lt.fromCache(n),t.uniformMap=i,t.castShadows=!1,t.receiveShadows=!1,t}function lxe(e){const t=$t.shallowClone(e),n=Rt(e.renderState,!0),{stencilTest:i}=n;return i.enabled=!0,i.mask=xn.SKIP_LOD_MASK,i.reference=xn.CESIUM_3D_TILE_MASK,i.frontFunction=Fi.GREATER_OR_EQUAL,i.frontOperation.zPass=Zt.REPLACE,i.backFunction=Fi.GREATER_OR_EQUAL,i.backOperation.zPass=Zt.REPLACE,n.stencilMask=xn.CESIUM_3D_TILE_MASK|xn.SKIP_LOD_MASK,t.renderState=Lt.fromCache(n),t}hh.clone=function(e){return new hh({command:e.command,updateShadows:e.updateShadows,updateBackFaceCulling:e.updateBackFaceCulling,updateCullFace:e.updateCullFace,updateDebugShowBoundingVolume:e.updateDebugShowBoundingVolume,is2D:e.is2D,derivedCommand2D:e.derivedCommand2D})},Object.defineProperties(cv.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},model:{get:function(){return this._model}},primitiveType:{get:function(){return this._command.primitiveType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=k.clone(e,this._modelMatrix),this._modelMatrix2DDirty=!0,this._boundingVolume=Ae.transform(this.runtimePrimitive.boundingSphere,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},shadows:{get:function(){return this._shadows},set:function(e){this._shadows=e,function KAe(e){const t=e.shadows,n=Ko.castShadows(t),i=Ko.receiveShadows(t),o=e._derivedCommands;for(let r=0;r<o.length;++r){const s=o[r];if(s.updateShadows){const a=s.command;a.castShadows=n,a.receiveShadows=i}}}(this)}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,function QAe(e){const t=e.backFaceCulling,n=e._derivedCommands;for(let i=0;i<n.length;++i){const o=n[i];if(o.updateBackFaceCulling){const r=o.command,s=Rt(r.renderState,!0);s.cull.enabled=t,r.renderState=Lt.fromCache(s)}}}(this))}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,function JAe(e){const t=e.cullFace,n=e._derivedCommands;for(let i=0;i<n.length;++i){const o=n[i];if(o.updateCullFace){const r=o.command,s=Rt(r.renderState,!0);s.cull.face=t,r.renderState=Lt.fromCache(s)}}}(this))}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,function exe(e){const t=e.debugShowBoundingVolume,n=e._derivedCommands;for(let i=0;i<n.length;++i){const o=n[i];o.updateDebugShowBoundingVolume&&(o.command.debugShowBoundingVolume=t)}}(this))}}}),cv.prototype.pushCommands=function(e,t){const n=qG(this,e);n&&!this._has2DCommands&&(function txe(e){U0(e,e._originalCommand),U0(e,e._translucentCommand),U0(e,e._skipLodBackfaceCommand),U0(e,e._skipLodStencilCommand),U0(e,e._silhouetteModelCommand),U0(e,e._silhouetteColorCommand)}(this),this._has2DCommands=!0,this._modelMatrix2DDirty=!0),this._modelMatrix2DDirty&&(function $Ae(e,t){const n=e._modelMatrix;e._modelMatrix2D=k.clone(n,e._modelMatrix2D),e._modelMatrix2D[13]-=2*O.sign(n[13])*O.PI*t.mapProjection.ellipsoid.maximumRadius,e._boundingVolume2D=Ae.transform(e.runtimePrimitive.boundingSphere,e._modelMatrix2D,e._boundingVolume2D)}(this,e),this._modelMatrix2DDirty=!1);const i=this.model.styleCommandsNeeded;if(!this._needsTranslucentCommand||!c(i)||(i!==$A.ALL_OPAQUE&&k0(t,this._translucentCommand,n),i!==$A.ALL_TRANSLUCENT)){if(this._needsSkipLevelOfDetailCommands){const{tileset:o,tile:r}=this._model.content;if(o.hasMixedContent)return r._finalResolution||k0(o._backfaceCommands,this._skipLodBackfaceCommand,n),function rxe(e,t,n){const i=e._skipLodStencilCommand,o=i.command,r=t._selectionDepth,s=function sxe(e){return(e.renderState.stencilTest.reference&xn.SKIP_LOD_MASK)>>>xn.SKIP_LOD_BIT_SHIFT}(o);if(r!==s){const a=function axe(e){return xn.CESIUM_3D_TILE_MASK|e<<xn.SKIP_LOD_BIT_SHIFT}(r),l=Rt(o.renderState,!0);l.stencilTest.reference=a,o.renderState=Lt.fromCache(l),n&&(i.derivedCommand2D.renderState=l)}}(this,r,n),void k0(t,this._skipLodStencilCommand,n)}return this._needsSilhouetteCommands?void k0(t,this._silhouetteModelCommand,n):(k0(t,this._originalCommand,n),t)}},cv.prototype.pushSilhouetteCommands=function(e,t){const n=qG(this,e);return k0(t,this._silhouetteColorCommand,n),t};const uxe=cv,hxe=function dxe(e,t){const n=e.shaderBuilder;n.addVertexLines("precision highp float;\n\nczm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {\n czm_modelVertexOutput vsOutput;\n vsOutput.positionMC = positionMC;\n vsOutput.pointSize = 1.0;\n return vsOutput;\n}\n\nvoid main()\n{\n // Initialize the attributes struct with all\n // attributes except quantized ones.\n ProcessedAttributes attributes;\n initializeAttributes(attributes);\n\n // Dequantize the quantized ones and add them to the\n // attributes struct.\n #ifdef USE_DEQUANTIZATION\n dequantizationStage(attributes);\n #endif\n\n #ifdef HAS_MORPH_TARGETS\n morphTargetsStage(attributes);\n #endif\n\n #ifdef HAS_SKINNING\n skinningStage(attributes);\n #endif\n\n #ifdef HAS_PRIMITIVE_OUTLINE\n primitiveOutlineStage();\n #endif\n\n // Compute the bitangent according to the formula in the glTF spec.\n // Normal and tangents can be affected by morphing and skinning, so\n // the bitangent should not be computed until their values are finalized.\n #ifdef HAS_BITANGENTS\n attributes.bitangentMC = normalize(cross(attributes.normalMC, attributes.tangentMC) * attributes.tangentSignMC);\n #endif\n\n FeatureIds featureIds;\n featureIdStage(featureIds, attributes);\n\n #ifdef HAS_SELECTED_FEATURE_ID\n SelectedFeature feature;\n selectedFeatureIdStage(feature, featureIds);\n // Handle any show properties that come from the style.\n cpuStylingStage(attributes.positionMC, feature);\n #endif\n\n #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)\n // The scene mode 2D pipeline stage and instancing stage add a different\n // model view matrix to accurately project the model to 2D. However, the\n // output positions and normals should be transformed by the 3D matrices\n // to keep the data the same for the fragment shader.\n mat4 modelView = czm_modelView3D;\n mat3 normal = czm_normal3D;\n #else\n // These are used for individual model projection because they will\n // automatically change based on the scene mode.\n mat4 modelView = czm_modelView;\n mat3 normal = czm_normal;\n #endif\n\n // Update the position for this instance in place\n #ifdef HAS_INSTANCING\n\n // The legacy instance stage is used when rendering i3dm models that\n // encode instances transforms in world space, as opposed to glTF models\n // that use EXT_mesh_gpu_instancing, where instance transforms are encoded\n // in object space.\n #ifdef USE_LEGACY_INSTANCING\n mat4 instanceModelView;\n mat3 instanceModelViewInverseTranspose;\n\n legacyInstancingStage(attributes, instanceModelView, instanceModelViewInverseTranspose);\n\n modelView = instanceModelView;\n normal = instanceModelViewInverseTranspose;\n #else\n instancingStage(attributes);\n #endif\n\n #ifdef USE_PICKING\n v_pickColor = a_pickColor;\n #endif\n\n #endif\n\n Metadata metadata;\n MetadataClass metadataClass;\n MetadataStatistics metadataStatistics;\n metadataStage(metadata, metadataClass, metadataStatistics, attributes);\n\n #ifdef HAS_VERTICAL_EXAGGERATION\n verticalExaggerationStage(attributes);\n #endif\n\n #ifdef HAS_CUSTOM_VERTEX_SHADER\n czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);\n customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);\n #endif\n\n // Compute the final position in each coordinate system needed.\n // This returns the value that will be assigned to gl_Position.\n vec4 positionClip = geometryStage(attributes, modelView, normal);\n\n // This must go after the geometry stage as it needs v_positionWC\n #ifdef HAS_ATMOSPHERE\n atmosphereStage(attributes);\n #endif\n\n #ifdef ENABLE_CLIPPING_POLYGONS\n modelClippingPolygonsStage(attributes);\n #endif\n\n #ifdef HAS_SILHOUETTE\n silhouetteStage(attributes, positionClip);\n #endif\n\n #ifdef HAS_POINT_CLOUD_SHOW_STYLE\n float show = pointCloudShowStylingStage(attributes, metadata);\n #else\n float show = 1.0;\n #endif\n\n #ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING\n show *= pointCloudBackFaceCullingStage();\n #endif\n\n #ifdef HAS_POINT_CLOUD_COLOR_STYLE\n v_pointCloudColor = pointCloudColorStylingStage(attributes, metadata);\n #endif\n\n #ifdef PRIMITIVE_TYPE_POINTS\n #ifdef HAS_CUSTOM_VERTEX_SHADER\n gl_PointSize = vsOutput.pointSize;\n #elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)\n gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);\n #else\n gl_PointSize = 1.0;\n #endif\n\n gl_PointSize *= show;\n #endif\n\n gl_Position = show * positionClip;\n}\n"),n.addFragmentLines("\nprecision highp float;\nczm_modelMaterial defaultModelMaterial()\n{\n czm_modelMaterial material;\n material.diffuse = vec3(0.0);\n material.specular = vec3(1.0);\n material.roughness = 1.0;\n material.occlusion = 1.0;\n material.normalEC = vec3(0.0, 0.0, 1.0);\n material.emissive = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n\nvec4 handleAlpha(vec3 color, float alpha)\n{\n #ifdef ALPHA_MODE_MASK\n if (alpha < u_alphaCutoff) {\n discard;\n }\n #endif\n\n return vec4(color, alpha);\n}\n\nSelectedFeature selectedFeature;\n\nvoid main()\n{\n #ifdef HAS_MODEL_SPLITTER\n modelSplitterStage();\n #endif\n\n czm_modelMaterial material = defaultModelMaterial();\n\n ProcessedAttributes attributes;\n geometryStage(attributes);\n\n FeatureIds featureIds;\n featureIdStage(featureIds, attributes);\n\n Metadata metadata;\n MetadataClass metadataClass;\n MetadataStatistics metadataStatistics;\n metadataStage(metadata, metadataClass, metadataStatistics, attributes);\n\n #ifdef HAS_SELECTED_FEATURE_ID\n selectedFeatureIdStage(selectedFeature, featureIds);\n #endif\n\n #ifndef CUSTOM_SHADER_REPLACE_MATERIAL\n materialStage(material, attributes, selectedFeature);\n #endif\n\n #ifdef HAS_CUSTOM_FRAGMENT_SHADER\n customShaderStage(material, attributes, featureIds, metadata, metadataClass, metadataStatistics);\n #endif\n\n lightingStage(material, attributes);\n\n #ifdef HAS_SELECTED_FEATURE_ID\n cpuStylingStage(material, selectedFeature);\n #endif\n\n #ifdef HAS_MODEL_COLOR\n modelColorStage(material);\n #endif\n\n #ifdef HAS_PRIMITIVE_OUTLINE\n primitiveOutlineStage(material);\n #endif\n\n vec4 color = handleAlpha(material.diffuse, material.alpha);\n\n #ifdef HAS_CLIPPING_PLANES\n modelClippingPlanesStage(color);\n #endif\n\n #ifdef ENABLE_CLIPPING_POLYGONS\n modelClippingPolygonsStage();\n #endif\n\n #if defined(HAS_SILHOUETTE) && defined(HAS_NORMALS)\n silhouetteStage(color);\n #endif\n\n #ifdef HAS_ATMOSPHERE\n atmosphereStage(color, attributes);\n #endif\n\n out_FragColor = color;\n}\n");const i=function fxe(e){const t=e.wireframeIndexBuffer;if(c(t))return t;const n=e.indices;if(c(n)){if(!c(n.buffer))throw new E("Indices must be provided as a Buffer");return n.buffer}}(e),o=new gs({context:t.context,indexBuffer:i,attributes:e.attributes}),r=e.model;r._pipelineResources.push(o);const s=n.buildShaderProgram(t.context);r._pipelineResources.push(s);const a=e.alphaOptions.pass,l=r.sceneGraph,u=t.mode===ce.SCENE3D;let d,h;u||t.scene3DOnly||!r._projectTo2D?(d=k.multiplyTransformation(u?l._computedModelMatrix:l._computedModelMatrix2D,e.runtimeNode.computedTransform,new k),h=Ae.transform(e.boundingSphere,d,e.boundingSphere)):(d=k.multiplyTransformation(l._computedModelMatrix,e.runtimeNode.computedTransform,new k),h=e.runtimePrimitive.boundingSphere2D);let m=Rt(Lt.fromCache(e.renderStateOptions),!0);m.cull.face=ti.getCullFace(d,e.primitiveType),m=Lt.fromCache(m);const _=c(r.classificationType),p=!_&&Ko.castShadows(r.shadows),y=!_&&Ko.receiveShadows(r.shadows),x=new $t({boundingVolume:h,modelMatrix:d,uniformMap:e.uniformMap,renderState:m,vertexArray:o,shaderProgram:s,cull:r.cull,pass:a,count:e.count,owner:r,pickId:_?void 0:e.pickId,instanceCount:e.instanceCount,primitiveType:e.primitiveType,debugShowBoundingVolume:r.debugShowBoundingVolume,castShadows:p,receiveShadows:y});return _?new XAe({primitiveRenderResources:e,command:x}):new uxe({primitiveRenderResources:e,command:x})},J_={VERTEX:0,FRAGMENT:1,BOTH:2,includesVertexShader:function(e){return A.typeOf.number("destination",e),e===J_.VERTEX||e===J_.BOTH},includesFragmentShader:function(e){return A.typeOf.number("destination",e),e===J_.FRAGMENT||e===J_.BOTH}},Ee=Object.freeze(J_),YG={name:"TilesetPipelineStage",process:function(e,t,n){t.hasSkipLevelOfDetail(n)&&(e.shaderBuilder.addDefine("POLYGON_OFFSET",void 0,Ee.FRAGMENT),e.uniformMap=Pn({u_polygonOffset:function(){return V.ZERO}},e.uniformMap),e.hasSkipLevelOfDetail=!0);const i=e.renderStateOptions;i.stencilTest=xn.setCesium3DTileBit(),i.stencilMask=xn.CESIUM_3D_TILE_MASK}},pxe=YG,XG={name:"AtmospherePipelineStage",process:function(e,t,n){const i=e.shaderBuilder;i.addDefine("HAS_ATMOSPHERE",void 0,Ee.BOTH),i.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,Ee.BOTH),i.addVarying("vec3","v_atmosphereRayleighColor"),i.addVarying("vec3","v_atmosphereMieColor"),i.addVarying("float","v_atmosphereOpacity"),i.addVertexLines(["void atmosphereStage(ProcessedAttributes attributes) {\n vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_positionWC, czm_atmosphereDynamicLighting);\n\n czm_computeGroundAtmosphereScattering(\n // This assumes the geometry stage came before this.\n v_positionWC,\n lightDirection,\n v_atmosphereRayleighColor,\n v_atmosphereMieColor,\n v_atmosphereOpacity\n );\n}\n"]),i.addFragmentLines(["// robust iterative solution without trig functions\n// https://github.com/0xfaded/ellipse_demo/issues/1\n// https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse\n//\n// This version uses only a single iteration for best performance. For fog\n// rendering, the difference is negligible.\nvec2 nearestPointOnEllipseFast(vec2 pos, vec2 radii) {\n vec2 p = abs(pos);\n vec2 inverseRadii = 1.0 / radii;\n vec2 evoluteScale = (radii.x * radii.x - radii.y * radii.y) * vec2(1.0, -1.0) * inverseRadii;\n\n // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))\n // but store the cos and sin of t in a vec2 for efficiency.\n // Initial guess: t = cos(pi/4)\n vec2 tTrigs = vec2(0.70710678118);\n vec2 v = radii * tTrigs;\n\n // Find the evolute of the ellipse (center of curvature) at v.\n vec2 evolute = evoluteScale * tTrigs * tTrigs * tTrigs;\n // Find the (approximate) intersection of p - evolute with the ellipsoid.\n vec2 q = normalize(p - evolute) * length(v - evolute);\n // Update the estimate of t.\n tTrigs = (q + evolute) * inverseRadii;\n tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));\n v = radii * tTrigs;\n\n return v * sign(pos);\n}\n\nvec3 computeEllipsoidPositionWC(vec3 positionMC) {\n // Get the world-space position and project onto a meridian plane of\n // the ellipsoid\n vec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;\n\n vec2 positionEllipse = vec2(length(positionWC.xy), positionWC.z);\n vec2 nearestPoint = nearestPointOnEllipseFast(positionEllipse, czm_ellipsoidRadii.xz);\n\n // Reconstruct a 3D point in world space\n return vec3(nearestPoint.x * normalize(positionWC.xy), nearestPoint.y);\n}\n\nvoid applyFog(inout vec4 color, vec4 groundAtmosphereColor, vec3 lightDirection, float distanceToCamera) {\n\n vec3 fogColor = groundAtmosphereColor.rgb;\n\n // If there is dynamic lighting, apply that to the fog.\n const float NONE = 0.0;\n if (czm_atmosphereDynamicLighting != NONE) {\n float darken = clamp(dot(normalize(czm_viewerPositionWC), lightDirection), czm_fogMinimumBrightness, 1.0);\n fogColor *= darken;\n }\n\n // Tonemap if HDR rendering is disabled\n #ifndef HDR\n fogColor.rgb = czm_acesTonemapping(fogColor.rgb);\n fogColor.rgb = czm_inverseGamma(fogColor.rgb);\n #endif\n\n // Matches the constant in GlobeFS.glsl. This makes the fog falloff\n // more gradual.\n const float fogModifier = 0.15;\n vec3 withFog = czm_fog(distanceToCamera, color.rgb, fogColor, fogModifier);\n color = vec4(withFog, color.a);\n}\n\nvoid atmosphereStage(inout vec4 color, in ProcessedAttributes attributes) {\n vec3 rayleighColor;\n vec3 mieColor;\n float opacity;\n\n vec3 positionWC;\n vec3 lightDirection;\n\n // When the camera is in space, compute the position per-fragment for\n // more accurate ground atmosphere. All other cases will use\n //\n // The if condition will be added in https://github.com/CesiumGS/cesium/issues/11717\n if (false) {\n positionWC = computeEllipsoidPositionWC(attributes.positionMC);\n lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);\n\n // The fog color is derived from the ground atmosphere color\n czm_computeGroundAtmosphereScattering(\n positionWC,\n lightDirection,\n rayleighColor,\n mieColor,\n opacity\n );\n } else {\n positionWC = attributes.positionWC;\n lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);\n rayleighColor = v_atmosphereRayleighColor;\n mieColor = v_atmosphereMieColor;\n opacity = v_atmosphereOpacity;\n }\n\n //color correct rayleigh and mie colors\n const bool ignoreBlackPixels = true;\n rayleighColor = czm_applyHSBShift(rayleighColor, czm_atmosphereHsbShift, ignoreBlackPixels);\n mieColor = czm_applyHSBShift(mieColor, czm_atmosphereHsbShift, ignoreBlackPixels);\n\n vec4 groundAtmosphereColor = czm_computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);\n\n if (u_isInFog) {\n float distanceToCamera = length(attributes.positionEC);\n applyFog(color, groundAtmosphereColor, lightDirection, distanceToCamera);\n } else {\n // Ground atmosphere\n }\n}\n"]),i.addUniform("bool","u_isInFog",Ee.FRAGMENT),e.uniformMap.u_isInFog=function(){const o=f.distance(n.camera.positionWC,t.boundingSphere.center);return O.fog(o,n.fog.density)>O.EPSILON3}}},gxe=XG,ZG={name:"ImageBasedLightingPipelineStage",process:function(e,t,n){const i=t.imageBasedLighting,o=e.shaderBuilder;o.addDefine("USE_IBL_LIGHTING",void 0,Ee.FRAGMENT),o.addUniform("vec2","model_iblFactor",Ee.FRAGMENT),yA.isSupported(n.context)&&((i.useSphericalHarmonics||i.useSpecularEnvironmentMaps||i.enabled)&&o.addUniform("mat3","model_iblReferenceFrameMatrix",Ee.FRAGMENT),c(i.sphericalHarmonicCoefficients)?(o.addDefine("DIFFUSE_IBL",void 0,Ee.FRAGMENT),o.addDefine("CUSTOM_SPHERICAL_HARMONICS",void 0,Ee.FRAGMENT),o.addUniform("vec3","model_sphericalHarmonicCoefficients[9]",Ee.FRAGMENT)):i.useDefaultSphericalHarmonics&&o.addDefine("DIFFUSE_IBL",void 0,Ee.FRAGMENT),c(i.specularEnvironmentMapAtlas)&&i.specularEnvironmentMapAtlas.ready?(o.addDefine("SPECULAR_IBL",void 0,Ee.FRAGMENT),o.addDefine("CUSTOM_SPECULAR_IBL",void 0,Ee.FRAGMENT),o.addUniform("sampler2D","model_specularEnvironmentMaps",Ee.FRAGMENT),o.addUniform("vec2","model_specularEnvironmentMapsSize",Ee.FRAGMENT),o.addUniform("float","model_specularEnvironmentMapsMaximumLOD",Ee.FRAGMENT)):t.useDefaultSpecularMaps&&o.addDefine("SPECULAR_IBL",void 0,Ee.FRAGMENT)),c(i.luminanceAtZenith)&&(o.addDefine("USE_SUN_LUMINANCE",void 0,Ee.FRAGMENT),o.addUniform("float","model_luminanceAtZenith",Ee.FRAGMENT)),o.addFragmentLines('/**\n * Compute some metrics for a procedural sky lighting model\n *\n * @param {vec3} positionWC The position of the fragment in world coordinates.\n * @param {vec3} reflectionWC A unit vector in the direction of the reflection, in world coordinates.\n * @return {vec3} The dot products of the horizon and reflection directions with the nadir, and an atmosphere boundary distance.\n */\nvec3 getProceduralSkyMetrics(vec3 positionWC, vec3 reflectionWC)\n{\n // Figure out if the reflection vector hits the ellipsoid\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / length(positionWC));\n float reflectionDotNadir = dot(reflectionWC, normalize(positionWC));\n float atmosphereHeight = 0.05;\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n return vec3(horizonDotNadir, reflectionDotNadir, smoothstepHeight);\n}\n\n/**\n * Compute the diffuse irradiance for a procedural sky lighting model\n *\n * @param {vec3} skyMetrics The dot products of the horizon and reflection directions with the nadir, and an atmosphere boundary distance.\n * @return {vec3} The computed diffuse irradiance\n */\nvec3 getProceduralDiffuseIrradiance(vec3 skyMetrics)\n{\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9); \n float diffuseIrradianceFromEarth = (1.0 - skyMetrics.x) * (skyMetrics.y * 0.25 + 0.75) * skyMetrics.z; \n float diffuseIrradianceFromSky = (1.0 - skyMetrics.z) * (1.0 - (skyMetrics.y * 0.25 + 0.25));\n return blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n}\n\n/**\n * Compute the specular irradiance for a procedural sky lighting model\n *\n * @param {vec3} skyMetrics The dot products of the horizon and reflection directions with the nadir, and an atmosphere boundary distance.\n * @return {vec3} The computed specular irradiance\n */\nvec3 getProceduralSpecularIrradiance(vec3 reflectionWC, vec3 skyMetrics, float roughness)\n{\n // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that\'s a rotation about Z.\n reflectionWC.x = -reflectionWC.x;\n reflectionWC = -normalize(czm_temeToPseudoFixed * reflectionWC);\n reflectionWC.x = -reflectionWC.x;\n\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = czm_textureCube(czm_environmentMap, reflectionWC).rgb * inverseRoughness;\n\n // Compute colors at different angles relative to the horizon\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), skyMetrics.z);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, skyMetrics.y * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, skyMetrics.z);\n\n // Compute blend zones\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - skyMetrics.x);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(skyMetrics.x - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(skyMetrics.x + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(skyMetrics.x + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n\n // Blend colors\n float notDistantRough = (1.0 - skyMetrics.x * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, skyMetrics.y) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, skyMetrics.y) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, skyMetrics.y) * inverseRoughness);\n\n return specularIrradiance;\n}\n\n#ifdef USE_SUN_LUMINANCE\nfloat clampedDot(vec3 x, vec3 y)\n{\n return clamp(dot(x, y), 0.001, 1.0);\n}\n/**\n * Sun luminance following the "CIE Clear Sky Model"\n * See page 40 of https://3dvar.com/Green2003Spherical.pdf\n *\n * @param {vec3} positionWC The position of the fragment in world coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @return {float} The computed sun luminance.\n */\nfloat getSunLuminance(vec3 positionWC, vec3 normalEC, vec3 lightDirectionEC)\n{\n vec3 normalWC = normalize(czm_inverseViewRotation * normalEC);\n vec3 lightDirectionWC = normalize(czm_inverseViewRotation * lightDirectionEC);\n vec3 vWC = -normalize(positionWC);\n\n // Angle between sun and zenith.\n float LdotZenith = clampedDot(lightDirectionWC, vWC);\n float S = acos(LdotZenith);\n // Angle between zenith and current pixel\n float NdotZenith = clampedDot(normalWC, vWC);\n // Angle between sun and current pixel\n float NdotL = clampedDot(normalEC, lightDirectionEC);\n float gamma = acos(NdotL);\n\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * NdotL * NdotL) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * LdotZenith * LdotZenith) * (1.0 - exp(-0.32));\n return model_luminanceAtZenith * (numerator / denominator);\n}\n#endif\n\n/**\n * Compute the light contribution from a procedural sky model\n *\n * @param {vec3} positionEC The position of the fragment in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {czm_modelMaterial} The material properties.\n * @return {vec3} The computed HDR color\n */\n vec3 proceduralIBL(\n vec3 positionEC,\n vec3 normalEC,\n vec3 lightDirectionEC,\n czm_modelMaterial material\n) {\n vec3 viewDirectionEC = -normalize(positionEC);\n vec3 positionWC = vec3(czm_inverseView * vec4(positionEC, 1.0));\n vec3 reflectionWC = normalize(czm_inverseViewRotation * normalize(reflect(viewDirectionEC, normalEC)));\n vec3 skyMetrics = getProceduralSkyMetrics(positionWC, reflectionWC);\n\n float roughness = material.roughness;\n vec3 f0 = material.specular;\n\n vec3 specularIrradiance = getProceduralSpecularIrradiance(reflectionWC, skyMetrics, roughness);\n float NdotV = abs(dot(normalEC, viewDirectionEC)) + 0.001;\n vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 specularColor = czm_srgbToLinear(f0 * brdfLut.x + brdfLut.y);\n vec3 specularContribution = specularIrradiance * specularColor * model_iblFactor.y;\n #ifdef USE_SPECULAR\n specularContribution *= material.specularWeight;\n #endif\n\n vec3 diffuseIrradiance = getProceduralDiffuseIrradiance(skyMetrics);\n vec3 diffuseColor = material.diffuse;\n vec3 diffuseContribution = diffuseIrradiance * diffuseColor * model_iblFactor.x;\n\n vec3 iblColor = specularContribution + diffuseContribution;\n\n #ifdef USE_SUN_LUMINANCE\n iblColor *= getSunLuminance(positionWC, normalEC, lightDirectionEC);\n #endif\n\n return iblColor;\n}\n\n#ifdef DIFFUSE_IBL\nvec3 computeDiffuseIBL(vec3 cubeDir)\n{\n #ifdef CUSTOM_SPHERICAL_HARMONICS\n return czm_sphericalHarmonics(cubeDir, model_sphericalHarmonicCoefficients); \n #else\n return czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients); \n #endif\n}\n#endif\n\n#ifdef SPECULAR_IBL\nvec3 sampleSpecularEnvironment(vec3 cubeDir, float roughness)\n{\n #ifdef CUSTOM_SPECULAR_IBL\n float maxLod = model_specularEnvironmentMapsMaximumLOD;\n float lod = roughness * maxLod;\n return czm_sampleOctahedralProjection(model_specularEnvironmentMaps, model_specularEnvironmentMapsSize, cubeDir, lod, maxLod);\n #else\n float maxLod = czm_specularEnvironmentMapsMaximumLOD;\n float lod = roughness * maxLod;\n return czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir, lod, maxLod);\n #endif\n}\nvec3 computeSpecularIBL(vec3 cubeDir, float NdotV, float VdotH, vec3 f0, float roughness)\n{\n float reflectance = czm_maximumComponent(f0);\n vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 F = fresnelSchlick2(f0, f90, VdotH);\n\n vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 specularSample = sampleSpecularEnvironment(cubeDir, roughness);\n\n return specularSample * (F * brdfLut.x + brdfLut.y);\n}\n#endif\n\n#if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)\n/**\n * Compute the light contributions from environment maps and spherical harmonic coefficients\n *\n * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position\n * @param {vec3} normalEC The surface normal in eye coordinates\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {czm_modelMaterial} The material properties.\n * @return {vec3} The computed HDR color\n */\nvec3 textureIBL(\n vec3 viewDirectionEC,\n vec3 normalEC,\n vec3 lightDirectionEC,\n czm_modelMaterial material\n) {\n // Find the direction in which to sample the environment map\n vec3 cubeDir = normalize(model_iblReferenceFrameMatrix * normalize(reflect(-viewDirectionEC, normalEC)));\n\n #ifdef DIFFUSE_IBL\n vec3 diffuseContribution = computeDiffuseIBL(cubeDir) * material.diffuse;\n #else\n vec3 diffuseContribution = vec3(0.0); \n #endif\n\n float roughness = material.roughness;\n\n #ifdef USE_ANISOTROPY\n // Update environment map sampling direction to account for anisotropic distortion of specular reflection\n vec3 anisotropyDirection = material.anisotropicB;\n vec3 anisotropicTangent = cross(anisotropyDirection, viewDirectionEC);\n vec3 anisotropicNormal = cross(anisotropicTangent, anisotropyDirection);\n float bendFactor = 1.0 - material.anisotropyStrength * (1.0 - roughness);\n float bendFactorPow4 = bendFactor * bendFactor * bendFactor * bendFactor;\n vec3 bentNormal = normalize(mix(anisotropicNormal, normalEC, bendFactorPow4));\n cubeDir = normalize(model_iblReferenceFrameMatrix * normalize(reflect(-viewDirectionEC, bentNormal)));\n #endif\n\n #ifdef SPECULAR_IBL\n float NdotV = abs(dot(normalEC, viewDirectionEC)) + 0.001;\n vec3 halfwayDirectionEC = normalize(viewDirectionEC + lightDirectionEC);\n float VdotH = clamp(dot(viewDirectionEC, halfwayDirectionEC), 0.0, 1.0);\n vec3 f0 = material.specular;\n vec3 specularContribution = computeSpecularIBL(cubeDir, NdotV, VdotH, f0, roughness);\n #else\n vec3 specularContribution = vec3(0.0); \n #endif\n\n #ifdef USE_SPECULAR\n specularContribution *= material.specularWeight;\n #endif\n\n return diffuseContribution + specularContribution;\n}\n#endif\n'),e.uniformMap=Pn({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)}},bxe=ZG,Txe=O.EPSILON16;function iN(e){const t=(e=g(e,g.EMPTY_OBJECT)).stage,n=e.runtimeArticulation;A.typeOf.object("options.stage",t),A.typeOf.object("options.runtimeArticulation",n),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(iN.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){A.typeOf.number("value",e),e=O.clamp(e,this.minimumValue,this.maximumValue),O.equalsEpsilon(this._currentValue,e,Txe)||(this._currentValue=e,this.runtimeArticulation._dirty=!0)}}});const Axe=new f,oN=new oe;iN.prototype.applyStageToMatrix=function(e){A.typeOf.object("result",e);const n=this.currentValue,i=Axe;let o;switch(this.type){case qu.XROTATE:o=oe.fromRotationX(O.toRadians(n),oN),e=k.multiplyByMatrix3(e,o,e);break;case qu.YROTATE:o=oe.fromRotationY(O.toRadians(n),oN),e=k.multiplyByMatrix3(e,o,e);break;case qu.ZROTATE:o=oe.fromRotationZ(O.toRadians(n),oN),e=k.multiplyByMatrix3(e,o,e);break;case qu.XTRANSLATE:i.x=n,i.y=0,i.z=0,e=k.multiplyByTranslation(e,i,e);break;case qu.YTRANSLATE:i.x=0,i.y=n,i.z=0,e=k.multiplyByTranslation(e,i,e);break;case qu.ZTRANSLATE:i.x=0,i.y=0,i.z=n,e=k.multiplyByTranslation(e,i,e);break;case qu.XSCALE:i.x=n,i.y=1,i.z=1,e=k.multiplyByScale(e,i,e);break;case qu.YSCALE:i.x=1,i.y=n,i.z=1,e=k.multiplyByScale(e,i,e);break;case qu.ZSCALE:i.x=1,i.y=1,i.z=n,e=k.multiplyByScale(e,i,e);break;case qu.UNIFORMSCALE:e=k.multiplyByUniformScale(e,n,e)}return e};const xxe=iN;function lv(e){const t=(e=g(e,g.EMPTY_OBJECT)).articulation,n=e.sceneGraph;A.typeOf.object("options.articulation",t),A.typeOf.object("options.sceneGraph",n),this._articulation=t,this._sceneGraph=n,this._name=t.name,this._runtimeStages=[],this._runtimeStagesByName={},this._runtimeNodes=[],this._dirty=!0,function Cxe(e){const n=e.articulation.stages,i=n.length,o=e._runtimeStages,r=e._runtimeStagesByName;for(let s=0;s<i;s++){const a=n[s],l=new xxe({stage:a,runtimeArticulation:e});o.push(l),r[a.name]=l}}(this)}Object.defineProperties(lv.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}}}),lv.prototype.setArticulationStage=function(e,t){const n=this._runtimeStagesByName[e];c(n)&&(n.currentValue=t)};const Exe=new k,wxe=new k;lv.prototype.apply=function(){if(!this._dirty)return;this._dirty=!1;let t,e=k.clone(k.IDENTITY,Exe);const n=this._runtimeStages,i=n.length;for(t=0;t<i;t++)e=n[t].applyStageToMatrix(e);const o=this._runtimeNodes,r=o.length;for(t=0;t<r;t++){const s=o[t],a=k.multiplyTransformation(s.originalTransform,e,wxe);s.transform=a}};const Sxe=lv,z0={name:"ModelColorPipelineStage",COLOR_UNIFORM_NAME:"model_color",COLOR_BLEND_UNIFORM_NAME:"model_colorBlend",process:function(e,t,n){const i=e.shaderBuilder;i.addDefine("HAS_MODEL_COLOR",void 0,Ee.FRAGMENT),i.addFragmentLines("void modelColorStage(inout czm_modelMaterial material)\n{\n material.diffuse = mix(material.diffuse, model_color.rgb, model_colorBlend);\n float highlight = ceil(model_colorBlend);\n material.diffuse *= mix(model_color.rgb, vec3(1.0), highlight);\n material.alpha *= model_color.a;\n}\n");const o={},r=t.color;0===r.alpha&&!t.hasSilhouette(n)&&(e.renderStateOptions.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),r.alpha<1&&(e.alphaOptions.pass=Ue.TRANSLUCENT),i.addUniform("vec4",z0.COLOR_UNIFORM_NAME,Ee.FRAGMENT),o[z0.COLOR_UNIFORM_NAME]=function(){return t.color},i.addUniform("float",z0.COLOR_BLEND_UNIFORM_NAME,Ee.FRAGMENT),o[z0.COLOR_BLEND_UNIFORM_NAME]=function(){return XS.getColorBlend(t.colorBlendMode,t.colorBlendAmount)},e.uniformMap=Pn(o,e.uniformMap)}},rN=z0,$G={name:"ModelClippingPlanesPipelineStage"},Dxe=new V;$G.process=function(e,t,n){const i=t.clippingPlanes,o=n.context,r=e.shaderBuilder;r.addDefine("HAS_CLIPPING_PLANES",void 0,Ee.FRAGMENT),r.addDefine("CLIPPING_PLANES_LENGTH",i.length,Ee.FRAGMENT),i.unionClippingRegions&&r.addDefine("UNION_CLIPPING_REGIONS",void 0,Ee.FRAGMENT),Gu.useFloatTexture(o)&&r.addDefine("USE_CLIPPING_PLANES_FLOAT_TEXTURE",void 0,Ee.FRAGMENT);const s=Gu.getTextureResolution(i,o,Dxe);r.addDefine("CLIPPING_PLANES_TEXTURE_WIDTH",s.x,Ee.FRAGMENT),r.addDefine("CLIPPING_PLANES_TEXTURE_HEIGHT",s.y,Ee.FRAGMENT),r.addUniform("sampler2D","model_clippingPlanes",Ee.FRAGMENT),r.addUniform("vec4","model_clippingPlanesEdgeStyle",Ee.FRAGMENT),r.addUniform("mat4","model_clippingPlanesMatrix",Ee.FRAGMENT),r.addFragmentLines("#ifdef USE_CLIPPING_PLANES_FLOAT_TEXTURE\nvec4 getClippingPlane(\n highp sampler2D packedClippingPlanes,\n int clippingPlaneNumber,\n mat4 transform\n) {\n int pixY = clippingPlaneNumber / CLIPPING_PLANES_TEXTURE_WIDTH;\n int pixX = clippingPlaneNumber - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);\n float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);\n float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);\n float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel\n float v = (float(pixY) + 0.5) * pixelHeight;\n vec4 plane = texture(packedClippingPlanes, vec2(u, v));\n return czm_transformPlane(plane, transform);\n}\n#else\n// Handle uint8 clipping texture instead\nvec4 getClippingPlane(\n highp sampler2D packedClippingPlanes,\n int clippingPlaneNumber,\n mat4 transform\n) {\n int clippingPlaneStartIndex = clippingPlaneNumber * 2; // clipping planes are two pixels each\n int pixY = clippingPlaneStartIndex / CLIPPING_PLANES_TEXTURE_WIDTH;\n int pixX = clippingPlaneStartIndex - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);\n float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);\n float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);\n float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel\n float v = (float(pixY) + 0.5) * pixelHeight;\n vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;\n vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n vec4 plane;\n plane.xyz = czm_octDecode(oct, 65535.0);\n plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + pixelWidth, v)));\n return czm_transformPlane(plane, transform);\n}\n#endif\n\nfloat clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix) {\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float pixelWidth = czm_metersPerPixel(position);\n \n #ifdef UNION_CLIPPING_REGIONS\n float clipAmount; // For union planes, we want to get the min distance. So we set the initial value to the first plane distance in the loop below.\n #else\n float clipAmount = 0.0;\n bool clipped = true;\n #endif\n\n for (int i = 0; i < CLIPPING_PLANES_LENGTH; ++i) {\n vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n \n #ifdef UNION_CLIPPING_REGIONS\n clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));\n if (amount <= 0.0) {\n discard;\n }\n #else\n clipAmount = max(amount, clipAmount);\n clipped = clipped && (amount <= 0.0);\n #endif\n }\n\n #ifndef UNION_CLIPPING_REGIONS\n if (clipped) {\n discard;\n }\n #endif\n \n return clipAmount;\n}\n\nvoid modelClippingPlanesStage(inout vec4 color)\n{\n float clipDistance = clip(gl_FragCoord, model_clippingPlanes, model_clippingPlanesMatrix);\n vec4 clippingPlanesEdgeColor = vec4(1.0);\n clippingPlanesEdgeColor.rgb = model_clippingPlanesEdgeStyle.rgb;\n float clippingPlanesEdgeWidth = model_clippingPlanesEdgeStyle.a;\n \n if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) {\n color = clippingPlanesEdgeColor;\n }\n}\n"),e.uniformMap=Pn({model_clippingPlanes:function(){return i.texture},model_clippingPlanesEdgeStyle:function(){const l=Z.clone(i.edgeColor);return l.alpha=i.edgeWidth,l},model_clippingPlanesMatrix:function(){return t._clippingPlanesMatrix}},e.uniformMap)};const Pxe=$G,KG={name:"ModelClippingPolygonsPipelineStage",process:function(e,t,n){const i=t.clippingPolygons,o=e.shaderBuilder;o.addDefine("ENABLE_CLIPPING_POLYGONS",void 0,Ee.BOTH),i.inverse&&o.addDefine("CLIPPING_INVERSE",void 0,Ee.FRAGMENT),o.addDefine("CLIPPING_POLYGON_REGIONS_LENGTH",i.extentsCount,Ee.BOTH),o.addUniform("sampler2D","model_clippingDistance",Ee.FRAGMENT),o.addUniform("sampler2D","model_clippingExtents",Ee.VERTEX),o.addVarying("vec2","v_clippingPosition"),o.addVarying("int","v_regionIndex","flat"),o.addVertexLines("void modelClippingPolygonsStage(ProcessedAttributes attributes)\n{\n vec2 sphericalLatLong = czm_approximateSphericalCoordinates(v_positionWC);\n sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\n\n vec2 minDistance = vec2(czm_infinity);\n v_regionIndex = -1;\n v_clippingPosition = vec2(czm_infinity);\n\n for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {\n vec4 extents = czm_unpackClippingExtents(model_clippingExtents, regionIndex);\n vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;\n\n vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));\n vec2 distance = abs(rectUv - clamped) * extents.wz;\n \n if (minDistance.x > distance.x || minDistance.y > distance.y) {\n minDistance = distance;\n v_clippingPosition = rectUv;\n }\n\n float threshold = 0.01;\n if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {\n v_regionIndex = regionIndex;\n }\n }\n}\n"),o.addFragmentLines("void modelClippingPolygonsStage()\n{\n vec2 clippingPosition = v_clippingPosition;\n int regionIndex = v_regionIndex;\n czm_clipPolygons(model_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);\n}\n"),e.uniformMap=Pn({model_clippingDistance:function(){return i.clippingTexture},model_clippingExtents:function(){return i.extentsTexture}},e.uniformMap)}},Lxe=KG;function QG(e,t){A.typeOf.object("model",e),A.typeOf.object("runtimeNode",t),this._model=e,this._runtimeNode=t}Object.defineProperties(QG.prototype,{name:{get:function(){return this._runtimeNode._name}},id:{get:function(){return this._runtimeNode._id}},show:{get:function(){return this._runtimeNode.show},set:function(e){this._runtimeNode.show=e}},matrix:{get:function(){return this._runtimeNode.transform},set:function(e){c(e)?(this._runtimeNode.transform=e,this._runtimeNode.userAnimated=!0,this._model._userAnimationDirty=!0):(this._runtimeNode.transform=this.originalMatrix,this._runtimeNode.userAnimated=!1)}},originalMatrix:{get:function(){return this._runtimeNode.originalTransform}}});const Nxe=QG,Mxe=new f(1,1,1),Fxe=f.ZERO,Bxe=bt.IDENTITY;function JG(e,t,n){this.translation=f.clone(g(e,Fxe)),this.rotation=bt.clone(g(t,Bxe)),this.scale=f.clone(g(n,Mxe))}JG.prototype.equals=function(e){return this===e||c(e)&&f.equals(this.translation,e.translation)&&bt.equals(this.rotation,e.rotation)&&f.equals(this.scale,e.scale)};const sN=JG,uv=new k,Vxe=new k,Hxe=new k,e9={name:"InstancingPipelineStage",_getInstanceTransformsAsMatrices:r9,_transformsToTypedArray:aN,process:function(e,t,n){const i=t.instances,o=i.attributes[0].count,r=e.shaderBuilder;r.addDefine("HAS_INSTANCING"),r.addVertexLines("mat4 getInstancingTransform()\n{\n mat4 instancingTransform;\n\n #ifdef HAS_INSTANCE_MATRICES\n instancingTransform = mat4(\n a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0, // Column 1\n a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0, // Column 2\n a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0, // Column 3\n a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0 // Column 4\n );\n #else\n vec3 translation = vec3(0.0, 0.0, 0.0);\n vec3 scale = vec3(1.0, 1.0, 1.0);\n \n #ifdef HAS_INSTANCE_TRANSLATION\n translation = a_instanceTranslation;\n #endif\n #ifdef HAS_INSTANCE_SCALE\n scale = a_instanceScale;\n #endif\n\n instancingTransform = mat4(\n scale.x, 0.0, 0.0, 0.0,\n 0.0, scale.y, 0.0, 0.0,\n 0.0, 0.0, scale.z, 0.0,\n translation.x, translation.y, translation.z, 1.0\n ); \n #endif\n\n return instancingTransform;\n}\n\n#ifdef USE_2D_INSTANCING\nmat4 getInstancingTransform2D()\n{\n mat4 instancingTransform2D;\n\n #ifdef HAS_INSTANCE_MATRICES\n instancingTransform2D = mat4(\n a_instancingTransform2DRow0.x, a_instancingTransform2DRow1.x, a_instancingTransform2DRow2.x, 0.0, // Column 1\n a_instancingTransform2DRow0.y, a_instancingTransform2DRow1.y, a_instancingTransform2DRow2.y, 0.0, // Column 2\n a_instancingTransform2DRow0.z, a_instancingTransform2DRow1.z, a_instancingTransform2DRow2.z, 0.0, // Column 3\n a_instancingTransform2DRow0.w, a_instancingTransform2DRow1.w, a_instancingTransform2DRow2.w, 1.0 // Column 4\n );\n #else\n vec3 translation2D = vec3(0.0, 0.0, 0.0);\n vec3 scale = vec3(1.0, 1.0, 1.0);\n \n #ifdef HAS_INSTANCE_TRANSLATION\n translation2D = a_instanceTranslation2D;\n #endif\n #ifdef HAS_INSTANCE_SCALE\n scale = a_instanceScale;\n #endif\n\n instancingTransform2D = mat4(\n scale.x, 0.0, 0.0, 0.0,\n 0.0, scale.y, 0.0, 0.0,\n 0.0, 0.0, scale.z, 0.0,\n translation2D.x, translation2D.y, translation2D.z, 1.0\n ); \n #endif\n\n return instancingTransform2D;\n}\n#endif\n");const s=e.model,a=s.sceneGraph,l=e.runtimeNode,u=n.mode!==ce.SCENE3D&&!n.scene3DOnly&&s._projectTo2D,h=[];(function iCe(e,t,n,i,o,r){const s=ti.getAttributeBySemantic(n,Sa.ROTATION);c(s)?function oCe(e,t,n,i,o,r){const a=t.attributes[0].count,l=e.model,u=e.runtimeNode;e.shaderBuilder.addDefine("HAS_INSTANCE_MATRICES");let h,m=u.instancingTransformsBuffer;if(!c(m)){h=r9(t,a,e);const b=aN(h);m=cN(b,i),l._modelResources.push(m),r&&(u.transformsTypedArray=b),u.instancingTransformsBuffer=m}if(s9(e,m,n,"Transform"),!o)return;const _=Rt(i);_.mode=ce.COLUMBUS_VIEW,o9(e,_);let p=u.instancingTransformsBuffer2D;if(!c(p)){const b=function Xxe(e,t,n,i){const o=n9,r=i9;t9(t,o,r);const a=t.runtimeNode.instancingReferencePoint2D,l=e.length;for(let u=0;u<l;u++){const h=jxe(e[u],o,r,n,qxe),m=k.getTranslation(h,Yxe),_=f.subtract(m,a,m);i[u]=k.setTranslation(h,_,i[u])}return i}(h,e,_,h);p=cN(aN(b),i),l._modelResources.push(p),u.instancingTransformsBuffer2D=p}s9(e,p,n,"Transform2D")}(e,n,i,t,o,r):function rCe(e,t,n,i,o,r){const s=e.shaderBuilder,a=e.runtimeNode,l=ti.getAttributeBySemantic(t,Sa.TRANSLATION),u=ti.getAttributeBySemantic(t,Sa.SCALE);if(c(u)&&(s.addDefine("HAS_INSTANCE_SCALE"),lN(e,u.buffer,u.byteOffset,u.byteStride,n,"Scale")),!c(l))return;let d;c(l.typedArray)?d=function nCe(e,t,n){const i=new Array(t),o=e.typedArray,r=new f(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new f(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let l=0;l<t;l++){const u=new f(o[3*l],o[3*l+1],o[3*l+2]);i[l]=u,f.minimumByComponent(r,u,r),f.maximumByComponent(s,u,s)}const a=n.runtimeNode;return a.instancingTranslationMin=r,a.instancingTranslationMax=s,e.typedArray=void 0,i}(l,l.count,e):c(a.instancingTranslationMin)||(a.instancingTranslationMin=l.min,a.instancingTranslationMax=l.max),s.addDefine("HAS_INSTANCE_TRANSLATION");if(lN(e,l.buffer,l.byteOffset,l.byteStride,n,"Translation"),!o&&!r)return;const _=Rt(i);_.mode=ce.COLUMBUS_VIEW,o9(e,_);let p=a.instancingTranslationBuffer2D;if(!c(p)){const C=function Zxe(e,t,n,i){const o=n9,r=i9;t9(t,o,r);const a=t.runtimeNode.instancingReferencePoint2D,l=e.length;for(let u=0;u<l;u++){const d=e[u],h=Wxe(d,o,r,n,d);i[u]=f.subtract(h,a,i[u])}return i}(d,e,_,d),w=function Qxe(e){const n=e.length,i=new Float32Array(3*n);for(let o=0;o<n;o++){const r=e[o],s=3*o;i[s+0]=r[0],i[s+1]=r[4],i[s+2]=r[8]}return i}(C);r&&(a.transformsTypedArray=w),p=cN(w,i),e.model._modelResources.push(p),a.instancingTranslationBuffer2D=p}o&&lN(e,p,0,void 0,n,"Translation2D")}(e,n,i,t,o)})(e,n,i,h,u,s._enablePick&&!n.context.webgl2),function sCe(e,t,n,i){const o=n.attributes,r=e.shaderBuilder;for(let s=0;s<o.length;s++){const a=o[s];a.semantic===Sa.FEATURE_ID&&(a.setIndex>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:a.buffer,componentsPerAttribute:Wn.getNumberOfComponents(a.type),componentDatatype:a.componentDatatype,normalize:!1,offsetInBytes:a.byteOffset,strideInBytes:a.byteStride,instanceDivisor:1}),r.addAttribute("float",`a_instanceFeatureId_${a.setIndex}`))}}(e,0,i,h);const m={};if(i.transformInWorldSpace?(r.addDefine("USE_LEGACY_INSTANCING",void 0,Ee.VERTEX),r.addUniform("mat4","u_instance_modifiedModelView",Ee.VERTEX),r.addUniform("mat4","u_instance_nodeTransform",Ee.VERTEX),m.u_instance_modifiedModelView=function(){let _=k.multiplyTransformation(s.modelMatrix,a.components.transform,uv);return u?k.multiplyTransformation(n.context.uniformState.view3D,_,uv):(n.mode!==ce.SCENE3D&&(_=In.basisTo2D(n.mapProjection,_,uv)),k.multiplyTransformation(n.context.uniformState.view,_,uv))},m.u_instance_nodeTransform=function(){return k.multiplyTransformation(a.axisCorrectionMatrix,l.computedTransform,Vxe)},r.addVertexLines("void legacyInstancingStage(\n inout ProcessedAttributes attributes,\n out mat4 instanceModelView,\n out mat3 instanceModelViewInverseTranspose)\n{\n vec3 positionMC = attributes.positionMC;\n\n mat4 instancingTransform = getInstancingTransform();\n \n mat4 instanceModel = instancingTransform * u_instance_nodeTransform;\n instanceModelView = u_instance_modifiedModelView;\n instanceModelViewInverseTranspose = mat3(u_instance_modifiedModelView * instanceModel);\n\n attributes.positionMC = (instanceModel * vec4(positionMC, 1.0)).xyz;\n \n #ifdef USE_2D_INSTANCING\n mat4 instancingTransform2D = getInstancingTransform2D();\n attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;\n #endif\n}\n")):r.addVertexLines("void instancingStage(inout ProcessedAttributes attributes) \n{\n vec3 positionMC = attributes.positionMC;\n \n mat4 instancingTransform = getInstancingTransform();\n \n attributes.positionMC = (instancingTransform * vec4(positionMC, 1.0)).xyz;\n\n #ifdef HAS_NORMALS\n vec3 normalMC = attributes.normalMC;\n attributes.normalMC = (instancingTransform * vec4(normalMC, 0.0)).xyz;\n #endif\n\n #ifdef USE_2D_INSTANCING\n mat4 instancingTransform2D = getInstancingTransform2D();\n attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;\n #endif\n}\n"),u){r.addDefine("USE_2D_INSTANCING",void 0,Ee.VERTEX),r.addUniform("mat4","u_modelView2D",Ee.VERTEX);const _=n.context,p=k.fromTranslation(l.instancingReferencePoint2D,new k);m.u_modelView2D=function(){return k.multiplyTransformation(_.uniformState.view,p,Hxe)}}e.uniformMap=Pn(m,e.uniformMap),e.instanceCount=o,e.attributes.push.apply(e.attributes,h)}},QA=new k,Gxe=new f;function jxe(e,t,n,i,o){let r=k.multiplyTransformation(t,e,QA);return r=k.multiplyTransformation(r,n,QA),In.basisTo2D(i.mapProjection,r,o)}function Wxe(e,t,n,i,o){const r=k.fromTranslation(e,QA);let s=k.multiplyTransformation(t,r,QA);s=k.multiplyTransformation(s,n,QA);const a=k.getTranslation(s,Gxe);return Pr.computeActualEllipsoidPosition(i,a,o)}function t9(e,t,n){const i=e.model,o=i.sceneGraph;e.runtimeNode.node.instances.transformInWorldSpace?(t=k.multiplyTransformation(i.modelMatrix,o.components.transform,t),n=k.multiplyTransformation(o.axisCorrectionMatrix,e.runtimeNode.computedTransform,n)):(t=k.clone(o.computedModelMatrix,t),t=k.multiplyTransformation(t,e.runtimeNode.computedTransform,t),n=k.clone(k.IDENTITY,n))}const n9=new k,i9=new k,qxe=new k,Yxe=new f,$xe=new f,Kxe=new f;function o9(e,t){const n=e.runtimeNode,i=e.model.sceneGraph.computedModelMatrix,o=k.multiplyByPoint(i,n.instancingTranslationMin,$xe),r=Pr.computeActualEllipsoidPosition(t,o,o),s=k.multiplyByPoint(i,n.instancingTranslationMax,Kxe),a=Pr.computeActualEllipsoidPosition(t,s,s);n.instancingReferencePoint2D=f.lerp(r,a,.5,new f)}function aN(e){const n=e.length,i=new Float32Array(12*n);for(let o=0;o<n;o++){const r=e[o],s=12*o;i[s+0]=r[0],i[s+1]=r[4],i[s+2]=r[8],i[s+3]=r[12],i[s+4]=r[1],i[s+5]=r[5],i[s+6]=r[9],i[s+7]=r[13],i[s+8]=r[2],i[s+9]=r[6],i[s+10]=r[10],i[s+11]=r[14]}return i}const Jxe=new f,eCe=new bt,tCe=new f;function r9(e,t,n){const i=new Array(t),o=ti.getAttributeBySemantic(e,Sa.TRANSLATION),r=ti.getAttributeBySemantic(e,Sa.ROTATION),s=ti.getAttributeBySemantic(e,Sa.SCALE),a=new f(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),l=new f(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),u=c(o),d=c(r),h=c(s),m=u?o.typedArray:new Float32Array(3*t);let p,_=d?r.typedArray:new Float32Array(4*t);d&&r.normalized&&(_=wi.dequantize(_,r.componentDatatype,r.type,t)),h?p=s.typedArray:(p=new Float32Array(3*t),p.fill(1));for(let b=0;b<t;b++){const x=new f(m[3*b],m[3*b+1],m[3*b+2],Jxe);f.maximumByComponent(a,x,a),f.minimumByComponent(l,x,l);const C=new bt(_[4*b],_[4*b+1],_[4*b+2],d?_[4*b+3]:1,eCe),w=new f(p[3*b],p[3*b+1],p[3*b+2],tCe),v=k.fromTranslationQuaternionRotationScale(x,C,w,new k);i[b]=v}const y=n.runtimeNode;return y.instancingTranslationMin=l,y.instancingTranslationMax=a,u&&(o.typedArray=void 0),d&&(r.typedArray=void 0),h&&(s.typedArray=void 0),i}function cN(e,t){const n=yn.createVertexBuffer({context:t.context,typedArray:e,usage:At.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}function s9(e,t,n,i){const r=ee.getSizeInBytes(ee.FLOAT),s=12*r,a=[{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:ee.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:ee.FLOAT,normalize:!1,offsetInBytes:4*r,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:ee.FLOAT,normalize:!1,offsetInBytes:8*r,strideInBytes:s,instanceDivisor:1}],l=e.shaderBuilder;l.addAttribute("vec4",`a_instancing${i}Row0`),l.addAttribute("vec4",`a_instancing${i}Row1`),l.addAttribute("vec4",`a_instancing${i}Row2`),n.push.apply(n,a)}function lN(e,t,n,i,o,r){o.push({index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:3,componentDatatype:ee.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i,instanceDivisor:1}),e.shaderBuilder.addAttribute("vec3",`a_instance${r}`)}const aCe=e9,uN={};function a9(e,t,n,i){let o;i=k.multiplyTransformation(i,e.transform,new k),e.updateComputedTransform();const r=e.runtimePrimitives.length;for(o=0;o<r;o++){const l=e.runtimePrimitives[o].drawCommand;l.modelMatrix=k.multiplyTransformation(n,i,l.modelMatrix),l.cullFace=ti.getCullFace(l.modelMatrix,l.primitiveType)}const s=e.children.length;for(o=0;o<s;o++){const a=t._runtimeNodes[e.children[o]];a._transformToRoot=k.clone(i,a._transformToRoot),a9(a,t,n,i),a._transformDirty=!1}}uN.name="ModelMatrixUpdateStage",uN.update=function(e,t,n){const i=n.mode!==ce.SCENE3D;i&&t._model._projectTo2D||!e._transformDirty||(a9(e,t,i?t._computedModelMatrix2D:t._computedModelMatrix,e.transformToRoot),e._transformDirty=!1)};const cCe=uN,c9={name:"NodeStatisticsPipelineStage",_countInstancingAttributes:l9,_countGeneratedBuffers:u9};function l9(e,t){if(!c(t))return;const n=t.attributes,i=n.length;for(let o=0;o<i;o++){const r=n[o];c(r.buffer)&&e.addBuffer(r.buffer,!1)}}function u9(e,t){c(t.instancingTransformsBuffer)&&e.addBuffer(t.instancingTransformsBuffer,!1),c(t.instancingTransformsBuffer2D)&&e.addBuffer(t.instancingTransformsBuffer2D,!1),c(t.instancingTranslationBuffer2D)&&e.addBuffer(t.instancingTranslationBuffer2D,!1)}c9.process=function(e,t,n){const i=e.model.statistics,r=e.runtimeNode;l9(i,t.instances),u9(i,r)};const lCe=c9;function V0(e){const t=(e=g(e,g.EMPTY_OBJECT)).node,n=e.transform,i=e.transformToRoot,o=e.sceneGraph,r=e.children;A.typeOf.object("options.node",t),A.typeOf.object("options.transform",n),A.typeOf.object("options.transformToRoot",i),A.typeOf.object("options.sceneGraph",o),A.typeOf.object("options.children",r),this._node=t,this._name=t.name,this._id=t.index,this._sceneGraph=o,this._children=r,this._originalTransform=k.clone(n,this._originalTransform),this._transform=k.clone(n,this._transform),this._transformToRoot=k.clone(i,this._transformToRoot),this._computedTransform=new k,this._transformDirty=!1,this._transformParameters=void 0,this._morphWeights=[],this._runtimeSkin=void 0,this._computedJointMatrices=[],this.show=!0,this.userAnimated=!1,this.pipelineStages=[],this.runtimePrimitives=[],this.updateStages=[],this.instancingTranslationMin=void 0,this.instancingTranslationMax=void 0,this.instancingTransformsBuffer=void 0,this.instancingTransformsBuffer2D=void 0,this.instancingTranslationBuffer2D=void 0,this.instancingReferencePoint2D=void 0,function uCe(e){e._computedTransform=k.multiply(e.transformToRoot,e.transform,e._computedTransform);const o=e.node;c(o.matrix)||(e._transformParameters=new sN(o.translation,o.rotation,o.scale)),c(o.morphWeights)&&(e._morphWeights=o.morphWeights.slice());const r=o.articulationName;if(c(r)){const l=e.sceneGraph._runtimeArticulations[r];c(l)&&l.runtimeNodes.push(e)}}(this)}function dN(e,t){e._transformDirty=!0,e._transform=k.fromTranslationRotationScale(t,e._transform)}Object.defineProperties(V0.prototype,{node:{get:function(){return this._node}},sceneGraph:{get:function(){return this._sceneGraph}},children:{get:function(){return this._children}},transform:{get:function(){return this._transform},set:function(e){this._transformDirty=!0,this._transform=k.clone(e,this._transform)}},transformToRoot:{get:function(){return this._transformToRoot}},computedTransform:{get:function(){return this._computedTransform}},originalTransform:{get:function(){return this._originalTransform}},translation:{get:function(){return c(this._transformParameters)?this._transformParameters.translation:void 0},set:function(e){const t=this._transformParameters;if(!c(t))throw new E("The translation of a node cannot be set if it was defined using a matrix in the model.");f.equals(t.translation,e)||(t.translation=f.clone(e,t.translation),dN(this,t))}},rotation:{get:function(){return c(this._transformParameters)?this._transformParameters.rotation:void 0},set:function(e){const t=this._transformParameters;if(!c(t))throw new E("The rotation of a node cannot be set if it was defined using a matrix in the model.");bt.equals(t.rotation,e)||(t.rotation=bt.clone(e,t.rotation),dN(this,t))}},scale:{get:function(){return c(this._transformParameters)?this._transformParameters.scale:void 0},set:function(e){const t=this._transformParameters;if(!c(t))throw new E("The scale of a node cannot be set if it was defined using a matrix in the model.");f.equals(t.scale,e)||(t.scale=f.clone(e,t.scale),dN(this,t))}},morphWeights:{get:function(){return this._morphWeights},set:function(e){const t=e.length;if(this._morphWeights.length!==t)throw new E("value must have the same length as the original weights array.");for(let n=0;n<t;n++)this._morphWeights[n]=e[n]}},runtimeSkin:{get:function(){return this._runtimeSkin}},computedJointMatrices:{get:function(){return this._computedJointMatrices}}}),V0.prototype.getChild=function(e){if(A.typeOf.number("index",e),e<0||e>=this.children.length)throw new E("index must be greater than or equal to 0 and less than the number of children.");return this.sceneGraph._runtimeNodes[this.children[e]]},V0.prototype.configurePipeline=function(){const e=this.node,t=this.pipelineStages;t.length=0;const n=this.updateStages;n.length=0,c(e.instances)&&t.push(aCe),t.push(lCe),n.push(cCe)},V0.prototype.updateComputedTransform=function(){this._computedTransform=k.multiply(this._transformToRoot,this._transform,this._computedTransform)},V0.prototype.updateJointMatrices=function(){const e=this._runtimeSkin;if(!c(e))return;e.updateJointMatrices();const t=this._computedJointMatrices,n=e.jointMatrices,i=n.length;for(let o=0;o<i;o++){c(t[o])||(t[o]=new k);const r=k.multiplyTransformation(this.transformToRoot,this.transform,t[o]),s=k.inverseTransformation(r,t[o]);t[o]=k.multiplyTransformation(s,n[o],t[o])}};const dCe=V0,d9={name:"AlphaPipelineStage",process:function(e,t,n){const i=e.alphaOptions;i.pass=g(i.pass,e.model.opaquePass);const r=e.renderStateOptions;i.pass===Ue.TRANSLUCENT&&(r.cull.enabled=!1,r.depthMask=!1,r.blending=eo.ALPHA_BLEND);const s=e.shaderBuilder,a=e.uniformMap;c(i.alphaCutoff)&&(s.addDefine("ALPHA_MODE_MASK",void 0,Ee.FRAGMENT),s.addUniform("float","u_alphaCutoff",Ee.FRAGMENT),a.u_alphaCutoff=function(){return i.alphaCutoff})}},fCe=d9,f9={name:"BatchTexturePipelineStage",process:function(e,t,n){const i=e.shaderBuilder,o={},r=e.model,s=r.featureTables[r.featureTableId],a=s.featuresLength;i.addUniform("int","model_featuresLength"),o.model_featuresLength=function(){return a};const l=s.batchTexture;i.addUniform("sampler2D","model_batchTexture"),o.model_batchTexture=function(){return g(l.batchTexture,l.defaultTexture)},i.addUniform("vec4","model_textureStep"),o.model_textureStep=function(){return l.textureStep},l.textureDimensions.y>1&&(i.addDefine("MULTILINE_BATCH_TEXTURE"),i.addUniform("vec2","model_textureDimensions"),o.model_textureDimensions=function(){return l.textureDimensions}),e.uniformMap=Pn(o,e.uniformMap)}},hCe=f9,h9={name:"ClassificationPipelineStage",process:function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,Ee.BOTH);const o=e.runtimePrimitive;c(o.batchLengths)||function pCe(e,t){const n=ti.getAttributeBySemantic(e,ln.POSITION);if(!c(n))throw new Pe("Primitives must have a position attribute to be used for classification.");let i;const o=e.indices,r=c(o);r&&(i=o.typedArray,o.typedArray=void 0);const s=r?o.count:n.count,a=ti.getAttributeBySemantic(e,ln.FEATURE_ID,0);if(!c(a))return t.batchLengths=[s],void(t.batchOffsets=[0]);const l=a.typedArray;a.typedArray=void 0;const u=[],d=[0];let m=l[r?i[0]:0],_=0;for(let y=1;y<s;y++){const x=l[r?i[y]:y];if(x!==m){const w=y;u.push(y-_),d.push(w),_=w,m=x}}u.push(s-_),t.batchLengths=u,t.batchOffsets=d}(t,o)}},mCe=h9,p9={name:"CPUStylingPipelineStage",process:function(e,t,n){const i=e.model,o=e.shaderBuilder;o.addVertexLines("void filterByPassType(inout vec3 positionMC, vec4 featureColor)\n{\n bool styleTranslucent = (featureColor.a != 1.0);\n // Only render translucent features in the translucent pass (if the style or the original command has translucency).\n if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)\n {\n // If the model has a translucent silhouette, it needs to render during the silhouette color command,\n // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.\n #ifdef HAS_SILHOUETTE\n positionMC *= float(model_silhouettePass);\n #else\n positionMC *= 0.0;\n #endif\n }\n // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.\n else if (czm_pass != czm_passTranslucent && styleTranslucent)\n {\n positionMC *= 0.0;\n }\n}\n\nvoid cpuStylingStage(inout vec3 positionMC, inout SelectedFeature feature)\n{\n float show = ceil(feature.color.a);\n positionMC *= show;\n\n #if defined(HAS_SELECTED_FEATURE_ID_ATTRIBUTE) && !defined(HAS_CLASSIFICATION)\n filterByPassType(positionMC, feature.color);\n #endif\n}\n"),o.addFragmentLines("void filterByPassType(vec4 featureColor)\n{\n bool styleTranslucent = (featureColor.a != 1.0);\n // Only render translucent features in the translucent pass (if the style or the original command has translucency).\n if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)\n { \n // If the model has a translucent silhouette, it needs to render during the silhouette color command,\n // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.\n #ifdef HAS_SILHOUETTE\n if(!model_silhouettePass) {\n discard;\n }\n #else\n discard;\n #endif\n }\n // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.\n else if (czm_pass != czm_passTranslucent && styleTranslucent)\n {\n discard;\n }\n}\n\nvoid cpuStylingStage(inout czm_modelMaterial material, SelectedFeature feature)\n{\n vec4 featureColor = feature.color;\n if (featureColor.a == 0.0)\n {\n discard;\n }\n\n // If a feature ID vertex attribute is used, the pass type filter is applied in the vertex shader.\n // So, we only apply in in the fragment shader if the feature ID texture is used.\n #if defined(HAS_SELECTED_FEATURE_ID_TEXTURE) && !defined(HAS_CLASSIFICATION)\n filterByPassType(featureColor);\n #endif\n\n featureColor = czm_gammaCorrect(featureColor);\n\n // Classification models compute the diffuse differently.\n #ifdef HAS_CLASSIFICATION\n material.diffuse = featureColor.rgb * featureColor.a;\n #else\n float highlight = ceil(model_colorBlend);\n material.diffuse *= mix(featureColor.rgb, vec3(1.0), highlight);\n #endif\n \n material.alpha *= featureColor.a;\n}\n"),o.addDefine("USE_CPU_STYLING",void 0,Ee.BOTH),c(i.color)||(o.addUniform("float",rN.COLOR_BLEND_UNIFORM_NAME,Ee.FRAGMENT),e.uniformMap[rN.COLOR_BLEND_UNIFORM_NAME]=function(){return XS.getColorBlend(i.colorBlendMode,i.colorBlendAmount)}),o.addUniform("bool","model_commandTranslucent",Ee.BOTH),e.uniformMap.model_commandTranslucent=function(){return e.alphaOptions.pass===Ue.TRANSLUCENT}}},yCe=p9,fN=Object.freeze({MODIFY_MATERIAL:"MODIFY_MATERIAL",REPLACE_MATERIAL:"REPLACE_MATERIAL",getDefineName:function(e){return`CUSTOM_SHADER_${e}`}}),Mi={name:"FeatureIdPipelineStage",STRUCT_ID_FEATURE_IDS_VS:"FeatureIdsVS",STRUCT_ID_FEATURE_IDS_FS:"FeatureIdsFS",STRUCT_NAME_FEATURE_IDS:"FeatureIds",FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS:"initializeFeatureIdsVS",FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS:"initializeFeatureIdsFS",FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS:"initializeFeatureIdAliasesVS",FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS:"initializeFeatureIdAliasesFS",FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS:"void initializeFeatureIds(out FeatureIds featureIds, ProcessedAttributes attributes)",FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES:"void initializeFeatureIdAliases(inout FeatureIds featureIds)",FUNCTION_ID_SET_FEATURE_ID_VARYINGS:"setFeatureIdVaryings",FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS:"void setFeatureIdVaryings()"};function SCe(e,t,n){const i=e.shaderBuilder;i.addStructField(Mi.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(Mi.STRUCT_ID_FEATURE_IDS_FS,"int",n);const o=t.setIndex,r=n.replace(/_\d+$/,"_"),s=`a_${r}${o}`,a=`v_${r}${o}`,u=`featureIds.${n} = int(czm_round(${a}));`;i.addFunctionLines(Mi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[`featureIds.${n} = int(czm_round(${s}));`]),i.addFunctionLines(Mi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[u]),i.addVarying("float",a),i.addFunctionLines(Mi.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${a} = ${s};`])}function vCe(e,t,n){const i=e.shaderBuilder;i.addStructField(Mi.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(Mi.STRUCT_ID_FEATURE_IDS_FS,"int",n);const o=t.setIndex,r=n.replace(/_\d+$/,"_"),s=[`featureIds.${n} = int(czm_round(attributes.${r}${o}));`];i.addFunctionLines(Mi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,s),i.addFunctionLines(Mi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,s)}function _9(e,t,n,i,o,r){!function DCe(e,t,n,i,o){const r=e.model;let s,a;if(c(t.repeat)){const u=function PCe(e,t){const n=e.offset,i=e.repeat,o=new Float32Array(t);for(let r=0;r<t;r++)o[r]=n+Math.floor(r/i);return o}(t,n);s=yn.createVertexBuffer({context:o.context,typedArray:u,usage:At.STATIC_DRAW}),s.vertexArrayDestroyable=!1,r._pipelineResources.push(s),r.statistics.addBuffer(s,!1)}else a=[t.offset];const l={index:e.attributeIndex++,instanceDivisor:i,value:a,vertexBuffer:s,normalize:!1,componentsPerAttribute:1,componentDatatype:ee.FLOAT,strideInBytes:ee.getSizeInBytes(ee.FLOAT),offsetInBytes:0};e.attributes.push(l)}(e,t,i,o,r);const s=e.shaderBuilder,a=`a_implicit_${n}`;s.addAttribute("float",a);const l=`v_implicit_${n}`;s.addVarying("float",l),s.addStructField(Mi.STRUCT_ID_FEATURE_IDS_VS,"int",n),s.addStructField(Mi.STRUCT_ID_FEATURE_IDS_FS,"int",n),s.addFunctionLines(Mi.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${l} = ${a};`]),s.addFunctionLines(Mi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[`featureIds.${n} = int(czm_round(${a}));`]),s.addFunctionLines(Mi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[`featureIds.${n} = int(czm_round(${l}));`])}function ICe(e,t,n,i,o){const r=`u_featureIdTexture_${i}`,s=e.uniformMap,a=t.textureReader;s[r]=function(){return g(a.texture,o.context.defaultTexture)};const l=a.channels,u=e.shaderBuilder;u.addStructField(Mi.STRUCT_ID_FEATURE_IDS_FS,"int",n),u.addUniform("sampler2D",r,Ee.FRAGMENT);const h=`v_texCoord_${a.texCoord}`;let m=h;const _=a.transform;if(c(_)&&!oe.equals(_,oe.IDENTITY)){const b=`${r}Transform`;u.addUniform("mat3",b,Ee.FRAGMENT),s[b]=function(){return _},m=`vec2(${b} * vec3(${h}, 1.0))`}u.addFunctionLines(Mi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[`featureIds.${n} = czm_unpackUint(texture(${r}, ${m}).${l});`])}function g9(e,t,n,i){const o=e.shaderBuilder,r=Ee.includesVertexShader(i);r&&o.addStructField(Mi.STRUCT_ID_FEATURE_IDS_VS,"int",n),o.addStructField(Mi.STRUCT_ID_FEATURE_IDS_FS,"int",n);const s=[`featureIds.${n} = featureIds.${t};`];r&&o.addFunctionLines(Mi.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,s),o.addFunctionLines(Mi.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,s)}Mi.process=function(e,t,n){const i=e.shaderBuilder;!function CCe(e){e.addStruct(Mi.STRUCT_ID_FEATURE_IDS_VS,Mi.STRUCT_NAME_FEATURE_IDS,Ee.VERTEX),e.addStruct(Mi.STRUCT_ID_FEATURE_IDS_FS,Mi.STRUCT_NAME_FEATURE_IDS,Ee.FRAGMENT),e.addFunction(Mi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,Mi.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,Ee.VERTEX),e.addFunction(Mi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,Mi.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,Ee.FRAGMENT),e.addFunction(Mi.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,Mi.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,Ee.VERTEX),e.addFunction(Mi.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,Mi.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,Ee.FRAGMENT),e.addFunction(Mi.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,Mi.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,Ee.VERTEX)}(i);const o=e.runtimeNode.node.instances;c(o)&&function ECe(e,t,n){const i=t.featureIds,o=t.attributes[0].count;for(let r=0;r<i.length;r++){const s=i[r],a=s.positionalLabel;s instanceof li.FeatureIdAttribute?SCe(e,s,a):_9(e,s,a,o,1,n);const l=s.label;c(l)&&g9(e,a,l,Ee.BOTH)}}(e,o,n),function wCe(e,t,n){const i=t.featureIds,r=ti.getAttributeBySemantic(t,ln.POSITION).count;for(let s=0;s<i.length;s++){const a=i[s],l=a.positionalLabel;let u=Ee.BOTH;a instanceof li.FeatureIdAttribute?vCe(e,a,l):a instanceof li.FeatureIdImplicitRange?_9(e,a,l,r,void 0,n):(ICe(e,a,l,s,n),u=Ee.FRAGMENT);const d=a.label;c(d)&&g9(e,l,d,u)}}(e,t,n),i.addVertexLines("void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) \n{\n initializeFeatureIds(featureIds, attributes);\n initializeFeatureIdAliases(featureIds);\n setFeatureIdVaryings();\n}\n"),i.addFragmentLines("void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) {\n initializeFeatureIds(featureIds, attributes);\n initializeFeatureIdAliases(featureIds);\n}\n")};const hN=Mi,Ai={name:"MetadataPipelineStage",STRUCT_ID_METADATA_VS:"MetadataVS",STRUCT_ID_METADATA_FS:"MetadataFS",STRUCT_NAME_METADATA:"Metadata",STRUCT_ID_METADATA_CLASS_VS:"MetadataClassVS",STRUCT_ID_METADATA_CLASS_FS:"MetadataClassFS",STRUCT_NAME_METADATA_CLASS:"MetadataClass",STRUCT_ID_METADATA_STATISTICS_VS:"MetadataStatisticsVS",STRUCT_ID_METADATA_STATISTICS_FS:"MetadataStatisticsFS",STRUCT_NAME_METADATA_STATISTICS:"MetadataStatistics",FUNCTION_ID_INITIALIZE_METADATA_VS:"initializeMetadataVS",FUNCTION_ID_INITIALIZE_METADATA_FS:"initializeMetadataFS",FUNCTION_SIGNATURE_INITIALIZE_METADATA:"void initializeMetadata(out Metadata metadata, out MetadataClass metadataClass, out MetadataStatistics metadataStatistics, ProcessedAttributes attributes)",FUNCTION_ID_SET_METADATA_VARYINGS:"setMetadataVaryings",FUNCTION_SIGNATURE_SET_METADATA_VARYINGS:"void setMetadataVaryings()",METADATA_CLASS_FIELDS:[{specName:"noData",shaderName:"noData"},{specName:"default",shaderName:"defaultValue"},{specName:"min",shaderName:"minValue"},{specName:"max",shaderName:"maxValue"}],METADATA_STATISTICS_FIELDS:[{specName:"min",shaderName:"minValue"},{specName:"max",shaderName:"maxValue"},{specName:"mean",shaderName:"mean",type:"float"},{specName:"median",shaderName:"median"},{specName:"standardDeviation",shaderName:"standardDeviation",type:"float"},{specName:"variance",shaderName:"variance",type:"float"},{specName:"sum",shaderName:"sum"}],process:function(e,t,n){const{shaderBuilder:i,model:o}=e,{structuralMetadata:r={},content:s}=o,a=s?.tileset.metadataExtension?.statistics,l=function LCe(e,t,n){return c(e)?e.flatMap(i=>function NCe(e,t,n){const{getAttributeByName:i,getAttributeInfo:o,sanitizeGlslIdentifier:r}=ti,s=e.class.id,a=n?.classes[s],l=Object.entries(e.properties),u=new Array(l.length);for(let d=0;d<l.length;d++){const[h,m]=l[d],_=i(t,m.attribute),{glslType:p,variableName:y}=o(_);u[d]={metadataVariable:r(h),property:m,type:m.classProperty.type,glslType:p,variableName:y,propertyStatistics:a?.properties[h],shaderDestination:Ee.BOTH}}return u}(i,t,n)):[]}(r.propertyAttributes,t,a),u=function MCe(e,t){return c(e)?e.flatMap(n=>function FCe(e,t){const{sanitizeGlslIdentifier:n}=ti,i=e.class.id,o=t?.classes[i],r=Object.entries(e.properties).filter(([a,l])=>l.isGpuCompatible()),s=new Array(r.length);for(let a=0;a<r.length;a++){const[l,u]=r[a];s[a]={metadataVariable:n(l),property:u,type:u.classProperty.type,glslType:u.getGlslType(),propertyStatistics:o?.properties[l],shaderDestination:Ee.FRAGMENT}}return s}(n,t)):[]}(r.propertyTextures,a);(function BCe(e,t){const n=new Set,i=new Set;for(let a=0;a<t.length;a++){const{type:l,glslType:u,propertyStatistics:d}=t[a];n.add(u),c(d)&&l!==Tn.ENUM&&i.add(u)}const o=Ai.METADATA_CLASS_FIELDS;for(const a of n)s(`${a}MetadataClass`,a,o);const r=Ai.METADATA_STATISTICS_FIELDS;for(const a of i)s(`${a}MetadataStatistics`,a,r);function s(a,l,u){e.addStruct(a,a,Ee.BOTH);for(let d=0;d<u.length;d++){const{shaderName:h}=u[d],m="float"===u[d].type?UCe(l):l;e.addStructField(a,m,h)}}})(i,l.concat(u)),function zCe(e){e.addStruct(Ai.STRUCT_ID_METADATA_VS,Ai.STRUCT_NAME_METADATA,Ee.VERTEX),e.addStruct(Ai.STRUCT_ID_METADATA_FS,Ai.STRUCT_NAME_METADATA,Ee.FRAGMENT),e.addStruct(Ai.STRUCT_ID_METADATA_CLASS_VS,Ai.STRUCT_NAME_METADATA_CLASS,Ee.VERTEX),e.addStruct(Ai.STRUCT_ID_METADATA_CLASS_FS,Ai.STRUCT_NAME_METADATA_CLASS,Ee.FRAGMENT),e.addStruct(Ai.STRUCT_ID_METADATA_STATISTICS_VS,Ai.STRUCT_NAME_METADATA_STATISTICS,Ee.VERTEX),e.addStruct(Ai.STRUCT_ID_METADATA_STATISTICS_FS,Ai.STRUCT_NAME_METADATA_STATISTICS,Ee.FRAGMENT),e.addFunction(Ai.FUNCTION_ID_INITIALIZE_METADATA_VS,Ai.FUNCTION_SIGNATURE_INITIALIZE_METADATA,Ee.VERTEX),e.addFunction(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,Ai.FUNCTION_SIGNATURE_INITIALIZE_METADATA,Ee.FRAGMENT),e.addFunction(Ai.FUNCTION_ID_SET_METADATA_VARYINGS,Ai.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,Ee.VERTEX)}(i),i.addVertexLines("void metadataStage(\n out Metadata metadata,\n out MetadataClass metadataClass,\n out MetadataStatistics metadataStatistics,\n ProcessedAttributes attributes\n )\n{\n initializeMetadata(metadata, metadataClass, metadataStatistics, attributes);\n setMetadataVaryings();\n}\n"),i.addFragmentLines("void metadataStage(\n out Metadata metadata,\n out MetadataClass metadataClass,\n out MetadataStatistics metadataStatistics,\n ProcessedAttributes attributes\n )\n{\n initializeMetadata(metadata, metadataClass, metadataStatistics, attributes);\n}\n");for(let h=0;h<l.length;h++)VCe(e,l[h]);for(let h=0;h<u.length;h++)GCe(e,u[h])}},kCe={int:"float",ivec2:"vec2",ivec3:"vec3",ivec4:"vec4"};function UCe(e){const t=kCe[e];return c(t)?t:e}function VCe(e,t){(function HCe(e,t){const{shaderBuilder:n}=e,{metadataVariable:i,property:o,glslType:r}=t,s=A9({valueExpression:`attributes.${t.variableName}`,renderResources:e,glslType:r,metadataVariable:i,shaderDestination:Ee.BOTH,property:o});n.addStructField(Ai.STRUCT_ID_METADATA_VS,r,i),n.addStructField(Ai.STRUCT_ID_METADATA_FS,r,i);const a=`metadata.${i} = ${s};`;n.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_VS,[a]),n.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,[a])})(e,t),y9(e.shaderBuilder,t),b9(e.shaderBuilder,t)}function GCe(e,t){(function jCe(e,t){const{shaderBuilder:n,uniformMap:i}=e,{metadataVariable:o,glslType:r,property:s}=t,{texCoord:a,channels:l,index:u,texture:d,transform:h}=s.textureReader,m=`u_propertyTexture_${u}`;i.hasOwnProperty(m)||(n.addUniform("sampler2D",m,Ee.FRAGMENT),i[m]=()=>d),n.addStructField(Ai.STRUCT_ID_METADATA_FS,r,o);const _=`attributes.texCoord_${a}`;let p=_;if(c(h)&&!oe.equals(h,oe.IDENTITY)){const w=`${m}Transform`;n.addUniform("mat3",w,Ee.FRAGMENT),i[w]=function(){return h},p=`vec2(${w} * vec3(${_}, 1.0))`}const x=A9({valueExpression:s.unpackInShader(`texture(${m}, ${p}).${l}`),renderResources:e,glslType:r,metadataVariable:o,shaderDestination:Ee.FRAGMENT,property:s});n.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,[`metadata.${o} = ${x};`])})(e,t),y9(e.shaderBuilder,t),b9(e.shaderBuilder,t)}function y9(e,t){const{classProperty:n}=t.property,{metadataVariable:i,glslType:o,shaderDestination:r}=t,s=T9(Ai.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,o),a=`${o}MetadataClass`;e.addStructField(Ai.STRUCT_ID_METADATA_CLASS_FS,a,i),e.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,s),Ee.includesVertexShader(r)&&(e.addStructField(Ai.STRUCT_ID_METADATA_CLASS_VS,a,i),e.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_VS,s))}function b9(e,t){const{propertyStatistics:n}=t;if(!c(n))return;const{metadataVariable:i,type:o,glslType:r}=t;if(o===Tn.ENUM)return;const l=T9(Ai.METADATA_STATISTICS_FIELDS,n,`metadataStatistics.${i}`,r),u=`${r}MetadataStatistics`;e.addStructField(Ai.STRUCT_ID_METADATA_STATISTICS_FS,u,i),e.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,l),Ee.includesVertexShader(t.shaderDestination)&&(e.addStructField(Ai.STRUCT_ID_METADATA_STATISTICS_VS,u,i),e.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_VS,l))}function T9(e,t,n,i){return c(t)?e.map(function o(r){const s=t[r.specName];if(c(s))return`${n}.${r.shaderName} = ${i}(${s});`}).filter(c):[]}function A9(e){const{valueExpression:t,property:n}=e;if(!n.hasValueTransform)return t;const i=e.metadataVariable,o=`u_${i}_offset`,r=`u_${i}_scale`,{shaderBuilder:s,uniformMap:a}=e.renderResources,{glslType:l,shaderDestination:u}=e;s.addUniform(l,o,u),s.addUniform(l,r,u);const{offset:d,scale:h}=n;return a[o]=()=>d,a[r]=()=>h,`czm_valueTransform(${o}, ${r}, ${t})`}const eg=Ai,pN=Object.freeze({INHERIT:0,OPAQUE:1,TRANSLUCENT:2}),ks={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:_n,process:function(e,t,n){const{shaderBuilder:i,model:o,alphaOptions:r}=e,{customShader:s}=o,{lightingModel:a,translucencyMode:l}=s;c(a)&&(e.lightingOptions.lightingModel=a),l===pN.TRANSLUCENT?r.pass=Ue.TRANSLUCENT:l===pN.OPAQUE&&(r.pass=void 0);const u=function QCe(e,t){const n=function WCe(e){const t={};for(let n=0;n<e.length;n++){const i=ti.getAttributeInfo(e[n]);t[i.variableName]=i}return t}(t.attributes),i=function XCe(e,t){if(!c(e.vertexShaderText))return{enabled:!1};const n=e.usedVariablesVertex.attributeSet,i=C9(t,n,!1),o=E9(t,n,!1);let r;const s=[],a=[];for(const l in i)i.hasOwnProperty(l)&&(s.push([i[l].glslType,l]),r=`vsInput.attributes.${l} = attributes.${l};`,a.push(r));for(let l=0;l<o.length;l++){const u=o[l],d=x9(u);if(!c(d))return ks._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveVS",`Primitive is missing attribute ${u}, disabling custom vertex shader`),{enabled:!1};s.push(d.attributeField),r=`vsInput.attributes.${u} = ${d.value};`,a.push(r)}return{enabled:!0,attributeFields:s,initializationLines:a}}(e,n),o=function $Ce(e,t){if(!c(e.fragmentShaderText))return{enabled:!1};const n=e.usedVariablesFragment.attributeSet,i=C9(t,n,!0),o=E9(t,n,!0);let r;const s=[],a=[];for(const u in i)i.hasOwnProperty(u)&&(s.push([i[u].glslType,u]),r=`fsInput.attributes.${u} = attributes.${u};`,a.push(r));for(let u=0;u<o.length;u++){const d=o[u],h=x9(d);if(!c(h))return ks._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveFS",`Primitive is missing attribute ${d}, disabling custom fragment shader.`),{enabled:!1};s.push(h.attributeField),r=`fsInput.attributes.${d} = ${h.value};`,a.push(r)}const l=function ZCe(e){const t=[],n=[],i=e.usedVariablesFragment.attributeSet;return i.hasOwnProperty("positionWC")&&(t.push(["vec3","positionWC"]),n.push("fsInput.attributes.positionWC = attributes.positionWC;")),i.hasOwnProperty("positionEC")&&(t.push(["vec3","positionEC"]),n.push("fsInput.attributes.positionEC = attributes.positionEC;")),{attributeFields:t,initializationLines:n}}(e);return{enabled:!0,attributeFields:s.concat(l.attributeFields),initializationLines:l.initializationLines.concat(a)}}(e,n),s=e.usedVariablesFragment.attributeSet.hasOwnProperty("positionWC")&&o.enabled;return{vertexLines:i,fragmentLines:o,customShaderEnabled:i.enabled||o.enabled,shouldComputePositionWC:s}}(s,t);if(!u.customShaderEnabled)return;if(function nEe(e,t,n){const{vertexLines:i,fragmentLines:o}=n,r=tEe;i.enabled&&(function JCe(e,t){let n=ks.STRUCT_ID_ATTRIBUTES_VS;e.addStruct(n,ks.STRUCT_NAME_ATTRIBUTES,Ee.VERTEX);const{attributeFields:i,initializationLines:o}=t;for(let s=0;s<i.length;s++){const[a,l]=i[s];e.addStructField(n,a,l)}n=ks.STRUCT_ID_VERTEX_INPUT,e.addStruct(n,ks.STRUCT_NAME_VERTEX_INPUT,Ee.VERTEX),e.addStructField(n,ks.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,hN.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,eg.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,eg.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,eg.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");const r=ks.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS;e.addFunction(r,ks.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,Ee.VERTEX),e.addFunctionLines(r,o)}(e,i),r.length=0,r.push("#line 0",t.vertexShaderText,"void customShaderStage(\n inout czm_modelVertexOutput vsOutput, \n inout ProcessedAttributes attributes, \n FeatureIds featureIds,\n Metadata metadata,\n MetadataClass metadataClass,\n MetadataStatistics metadataStatistics\n) {\n // VertexInput and initializeInputStruct() are dynamically generated in JS, \n // see CustomShaderPipelineStage.js\n VertexInput vsInput;\n initializeInputStruct(vsInput, attributes);\n vsInput.featureIds = featureIds;\n vsInput.metadata = metadata;\n vsInput.metadataClass = metadataClass;\n vsInput.metadataStatistics = metadataStatistics;\n vertexMain(vsInput, vsOutput);\n attributes.positionMC = vsOutput.positionMC;\n}\n"),e.addVertexLines(r)),o.enabled&&(function eEe(e,t){let n=ks.STRUCT_ID_ATTRIBUTES_FS;e.addStruct(n,ks.STRUCT_NAME_ATTRIBUTES,Ee.FRAGMENT);const{attributeFields:i,initializationLines:o}=t;for(let s=0;s<i.length;s++){const[a,l]=i[s];e.addStructField(n,a,l)}n=ks.STRUCT_ID_FRAGMENT_INPUT,e.addStruct(n,ks.STRUCT_NAME_FRAGMENT_INPUT,Ee.FRAGMENT),e.addStructField(n,ks.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,hN.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,eg.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,eg.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,eg.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");const r=ks.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS;e.addFunction(r,ks.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,Ee.FRAGMENT),e.addFunctionLines(r,o)}(e,o),r.length=0,r.push("#line 0",t.fragmentShaderText,"void customShaderStage(\n inout czm_modelMaterial material,\n ProcessedAttributes attributes,\n FeatureIds featureIds,\n Metadata metadata,\n MetadataClass metadataClass,\n MetadataStatistics metadataStatistics\n) {\n // FragmentInput and initializeInputStruct() are dynamically generated in JS, \n // see CustomShaderPipelineStage.js\n FragmentInput fsInput;\n initializeInputStruct(fsInput, attributes);\n fsInput.featureIds = featureIds;\n fsInput.metadata = metadata;\n fsInput.metadataClass = metadataClass;\n fsInput.metadataStatistics = metadataStatistics;\n fragmentMain(fsInput, material);\n}\n"),e.addFragmentLines(r))}(i,s,u),u.shouldComputePositionWC&&i.addDefine("COMPUTE_POSITION_WC_CUSTOM_SHADER",void 0,Ee.BOTH),c(s.vertexShaderText)&&i.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,Ee.VERTEX),c(s.fragmentShaderText)){i.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,Ee.FRAGMENT);const m=fN.getDefineName(s.mode);i.addDefine(m,void 0,Ee.FRAGMENT)}const d=s.uniforms;for(const m in d)d.hasOwnProperty(m)&&i.addUniform(d[m].type,m);const h=s.varyings;for(const m in h)h.hasOwnProperty(m)&&i.addVarying(h[m],m);e.uniformMap=Pn(e.uniformMap,s.uniformMap)}},qCe={position:"vec3",normal:"vec3",tangent:"vec3",bitangent:"vec3",texCoord:"vec2",color:"vec4",joints:"ivec4",weights:"vec4"},YCe={position:"vec3(0.0)",normal:"vec3(0.0, 0.0, 1.0)",tangent:"vec3(1.0, 0.0, 0.0)",bitangent:"vec3(0.0, 1.0, 0.0)",texCoord:"vec2(0.0)",color:"vec4(1.0)",joints:"ivec4(0)",weights:"vec4(0.0)"};function x9(e){let t=e.replace(/_[0-9]+$/,"");t=t.replace(/(MC|EC)$/,"");const n=qCe[t],i=YCe[t];if(c(n))return{attributeField:[n,e],value:i}}const KCe={positionWC:!0,positionEC:!0};function C9(e,t,n){const i={};for(const o in e){if(!e.hasOwnProperty(o))continue;const r=e[o];let s=o;n&&"normalMC"===o?s="normalEC":n&&"tangentMC"===o&&(s="tangentEC",r.glslType="vec3"),t.hasOwnProperty(s)&&(i[s]=r)}return i}function E9(e,t,n){const i=[];for(const o in t){if(!t.hasOwnProperty(o)||KCe.hasOwnProperty(o))continue;let r=o;n&&"normalEC"===o?r="normalMC":n&&"tangentEC"===o&&(r="tangentMC"),e.hasOwnProperty(r)||i.push(o)}return i}const tEe=[],iEe=ks,JA={name:"DequantizationPipelineStage",FUNCTION_ID_DEQUANTIZATION_STAGE_VS:"dequantizationStage",FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS:"void dequantizationStage(inout ProcessedAttributes attributes)"};function oEe(e,t){const n=e.shaderBuilder,i=e.uniformMap,o=t.variableName,r=t.attribute.quantization;if(r.octEncoded){const s=`model_normalizationRange_${o}`;n.addUniform("float",s,Ee.VERTEX),i[s]=function(){return r.normalizationRange}}else{const s=`model_quantizedVolumeOffset_${o}`,a=`model_quantizedVolumeStepSize_${o}`,l=t.glslType;n.addUniform(l,s,Ee.VERTEX),n.addUniform(l,a,Ee.VERTEX);let u=r.quantizedVolumeOffset,d=r.quantizedVolumeStepSize;/^color_\d+$/.test(o)&&(u=w9(u,0),d=w9(d,1)),i[s]=function(){return u},i[a]=function(){return d}}}function w9(e,t){return e instanceof de?e:new de(e.x,e.y,e.z,t)}function rEe(e,t){const n=t.variableName,i=t.attribute.quantization;let o;o=i.octEncoded?function sEe(e,t){return`${`attributes.${e}`} = czm_octDecode(${`a_quantized_${e}`}, ${`model_normalizationRange_${e}`})${t.octEncodedZXY?".zxy":".xyz"};`}(n,i):function aEe(e){return`${`attributes.${e}`} = ${`model_quantizedVolumeOffset_${e}`} + ${`a_quantized_${e}`} * ${`model_quantizedVolumeStepSize_${e}`};`}(n),e.addFunctionLines(JA.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,[o])}JA.process=function(e,t,n){const i=e.shaderBuilder,r=c(e.model.classificationType);i.addDefine("USE_DEQUANTIZATION",void 0,Ee.VERTEX),i.addFunction(JA.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,JA.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS,Ee.VERTEX);const s=t.attributes;for(let a=0;a<s.length;a++){const l=s[a];if(!c(l.quantization))continue;if(r&&l.semantic!==ln.POSITION&&l.semantic!==ln.TEXCOORD)continue;const m=ti.getAttributeInfo(l);rEe(i,m),oEe(e,m)}};const cEe=JA,S9="vec2 computeSt(float featureId)\n{\n float stepX = model_textureStep.x;\n float centerX = model_textureStep.y;\n\n #ifdef MULTILINE_BATCH_TEXTURE\n float stepY = model_textureStep.z;\n float centerY = model_textureStep.w;\n\n float xId = mod(featureId, model_textureDimensions.x); \n float yId = floor(featureId / model_textureDimensions.x);\n \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY));\n #else\n return vec2(centerX + (featureId * stepX), 0.5);\n #endif\n}\n\nvoid selectedFeatureIdStage(out SelectedFeature feature, FeatureIds featureIds)\n{ \n int featureId = featureIds.SELECTED_FEATURE_ID;\n\n\n if (featureId < model_featuresLength)\n {\n vec2 featureSt = computeSt(float(featureId));\n\n feature.id = featureId;\n feature.st = featureSt;\n feature.color = texture(model_batchTexture, featureSt);\n }\n // Floating point comparisons can be unreliable in GLSL, so we\n // increment the feature ID to make sure it's always greater\n // then the model_featuresLength - a condition we check for in the\n // pick ID, to avoid sampling the pick texture if the feature ID is\n // greater than the number of features.\n else\n {\n feature.id = model_featuresLength + 1;\n feature.st = vec2(0.0);\n feature.color = vec4(1.0);\n }\n\n #ifdef HAS_NULL_FEATURE_ID\n if (featureId == model_nullFeatureId) {\n feature.id = featureId;\n feature.st = vec2(0.0);\n feature.color = vec4(1.0);\n }\n #endif\n}\n",ex={name:"SelectedFeatureIdPipelineStage",STRUCT_ID_SELECTED_FEATURE:"SelectedFeature",STRUCT_NAME_SELECTED_FEATURE:"SelectedFeature",FUNCTION_ID_FEATURE_VARYINGS_VS:"updateFeatureStructVS",FUNCTION_ID_FEATURE_VARYINGS_FS:"updateFeatureStructFS",FUNCTION_SIGNATURE_UPDATE_FEATURE:"void updateFeatureStruct(inout SelectedFeature feature)"};function v9(e){return e instanceof li.FeatureIdTexture?"HAS_SELECTED_FEATURE_ID_TEXTURE":"HAS_SELECTED_FEATURE_ID_ATTRIBUTE"}function I9(e){return e instanceof li.FeatureIdTexture?Ee.FRAGMENT:Ee.BOTH}ex.process=function(e,t,n){const i=e.shaderBuilder;e.hasPropertyTable=!0;const s=function dEe(e,t,n){let i,o;return c(t.instances)&&(o=ti.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),c(o))?(i=g(o.label,o.positionalLabel),{featureIds:o,variableName:i,shaderDestination:I9(o),featureIdDefine:v9(o)}):(o=ti.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),i=g(o.label,o.positionalLabel),{featureIds:o,variableName:i,shaderDestination:I9(o),featureIdDefine:v9(o)})}(e.model,e.runtimeNode.node,t),a=s.shaderDestination;i.addDefine("HAS_SELECTED_FEATURE_ID",void 0,a),i.addDefine("SELECTED_FEATURE_ID",s.variableName,a),i.addDefine(s.featureIdDefine,void 0,a),function fEe(e){e.addStructField(ex.STRUCT_ID_SELECTED_FEATURE,"int","id"),e.addStructField(ex.STRUCT_ID_SELECTED_FEATURE,"vec2","st"),e.addStructField(ex.STRUCT_ID_SELECTED_FEATURE,"vec4","color")}(i);const l=s.featureIds.nullFeatureId,u=e.uniformMap;c(l)&&(i.addDefine("HAS_NULL_FEATURE_ID",void 0,a),i.addUniform("int","model_nullFeatureId",a),u.model_nullFeatureId=function(){return l}),s.shaderDestination===Ee.BOTH&&i.addVertexLines(S9),i.addFragmentLines(S9)};const mN=ex,Ts={name:"GeometryPipelineStage",STRUCT_ID_PROCESSED_ATTRIBUTES_VS:"ProcessedAttributesVS",STRUCT_ID_PROCESSED_ATTRIBUTES_FS:"ProcessedAttributesFS",STRUCT_NAME_PROCESSED_ATTRIBUTES:"ProcessedAttributes",FUNCTION_ID_INITIALIZE_ATTRIBUTES:"initializeAttributes",FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES:"void initializeAttributes(out ProcessedAttributes attributes)",FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS:"setDynamicVaryingsVS",FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS:"setDynamicVaryingsFS",FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS:"void setDynamicVaryings(inout ProcessedAttributes attributes)"};function hEe(e,t,n,i,o,r){const s=e.shaderBuilder,a=ti.getAttributeInfo(t),l=o&&!r;i>1?function _Ee(e,t,n,i){const{quantization:o,normalized:r}=t,{type:s,componentDatatype:a}=c(o)?o:t,u=Wn.getNumberOfComponents(s)/i,h=u*ee.getSizeInBytes(a),m=t.byteStride;for(let _=0;_<i;_++)e.attributes.push({index:n+_,vertexBuffer:t.buffer,componentsPerAttribute:u,componentDatatype:a,offsetInBytes:t.byteOffset+_*h,strideInBytes:m,normalize:r})}(e,t,n,i):function mEe(e,t,n,i){const{quantization:o,semantic:r,setIndex:s}=t,{type:a,componentDatatype:l}=c(o)?o:t;r===ln.FEATURE_ID&&s>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=s+1);const u=r===ln.POSITION,d=u?0:n,h=Wn.getNumberOfComponents(a),m={index:d,value:c(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:h,componentDatatype:l,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};if(e.attributes.push(m),!u||!i)return;e.attributes.push({index:n,vertexBuffer:e.runtimePrimitive.positionBuffer2D,count:t.count,componentsPerAttribute:h,componentDatatype:ee.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized})}(e,t,n,l),function yEe(e,t,n){const o=t.variableName;let r,s;t.isQuantized?(r=`a_quantized_${o}`,s=t.quantizedGlslType):(r=`a_${o}`,s=t.glslType);const a=t.attribute.semantic===ln.POSITION;a?e.setPositionAttribute(s,r):e.addAttribute(s,r),a&&n&&e.addAttribute("vec3","a_position2D")}(s,a,l),function gEe(e,t){const n=t.variableName;let o,i=`v_${n}`;"normalMC"===n?(i="v_normalEC",o=t.glslType):"tangentMC"===n?(o="vec3",i="v_tangentEC"):o=t.glslType,e.addVarying(o,i)}(s,a),c(t.semantic)&&function pEe(e,t){const{semantic:n,setIndex:i}=t;switch(n){case ln.NORMAL:e.addDefine("HAS_NORMALS");break;case ln.TANGENT:e.addDefine("HAS_TANGENTS");break;case ln.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case ln.TEXCOORD:case ln.COLOR:e.addDefine(`HAS_${n}_${i}`)}}(s,t),function bEe(e,t,n){const i=Ts.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,o=Ts.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,{variableName:r,glslType:s}=t;"tangentMC"===r?(e.addStructField(i,"vec3","tangentMC"),e.addStructField(i,"float","tangentSignMC"),e.addStructField(o,"vec3","tangentEC")):"normalMC"===r?(e.addStructField(i,"vec3","normalMC"),e.addStructField(o,"vec3","normalEC")):(e.addStructField(i,s,r),e.addStructField(o,s,r)),"positionMC"===r&&n&&e.addStructField(i,"vec3","position2D")}(s,a,o),function TEe(e,t,n){const i=Ts.FUNCTION_ID_INITIALIZE_ATTRIBUTES,o=t.variableName;if("positionMC"===o&&n&&e.addFunctionLines(i,["attributes.position2D = a_position2D;"]),t.isQuantized)return;const s=[];"tangentMC"===o?(s.push("attributes.tangentMC = a_tangentMC.xyz;"),s.push("attributes.tangentSignMC = a_tangentMC.w;")):s.push(`attributes.${o} = a_${o};`),e.addFunctionLines(i,s)}(s,a,l),function AEe(e,t){const{semantic:n,setIndex:i}=t.attribute;if(c(n)&&!c(i))return;let o=Ts.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS;const r=t.variableName;let s=`v_${r} = attributes.${r};`;e.addFunctionLines(o,[s]),o=Ts.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,s=`attributes.${r} = v_${r};`,e.addFunctionLines(o,[s])}(s,a)}Ts.process=function(e,t,n){const{shaderBuilder:i,model:o}=e;i.addStruct(Ts.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"ProcessedAttributes",Ee.VERTEX),i.addStruct(Ts.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"ProcessedAttributes",Ee.FRAGMENT),i.addStruct(mN.STRUCT_ID_SELECTED_FEATURE,mN.STRUCT_NAME_SELECTED_FEATURE,Ee.BOTH),i.addFunction(Ts.FUNCTION_ID_INITIALIZE_ATTRIBUTES,Ts.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,Ee.VERTEX),i.addVarying("vec3","v_positionWC"),i.addVarying("vec3","v_positionEC"),i.addStructField(Ts.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionWC"),i.addStructField(Ts.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionEC"),i.addFunction(Ts.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,Ts.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,Ee.VERTEX),i.addFunction(Ts.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,Ts.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,Ee.FRAGMENT),o.type===Ia.TILE_PNTS&&i.addDefine("HAS_SRGB_COLOR",void 0,Ee.FRAGMENT);const r=n.mode!==ce.SCENE3D&&!n.scene3DOnly&&o._projectTo2D,s=c(e.runtimeNode.node.instances),a=r&&!s,l=t.attributes.length;for(let u=0;u<l;u++){const d=t.attributes[u],h=Wn.getAttributeLocationCount(d.type);if(!c(d.buffer)&&!c(d.constant))throw new E("Attributes must be provided as a Buffer or constant value");const m=d.semantic===ln.POSITION;let _;h>1?(_=e.attributeIndex,e.attributeIndex+=h):_=m&&!a?0:e.attributeIndex++,hEe(e,d,_,h,r,s)}(function xEe(e,t){let n=!1,i=!1;for(let o=0;o<t.length;o++){const r=t[o];r.semantic===ln.NORMAL?n=!0:r.semantic===ln.TANGENT&&(i=!0)}!n||!i||(e.addDefine("HAS_BITANGENTS"),e.addVarying("vec3","v_bitangentEC"),e.addStructField(Ts.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"vec3","bitangentMC"),e.addStructField(Ts.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","bitangentEC"))})(i,t.attributes),t.primitiveType===Tt.POINTS&&i.addDefine("PRIMITIVE_TYPE_POINTS"),i.addVertexLines("vec4 geometryStage(inout ProcessedAttributes attributes, mat4 modelView, mat3 normal)\n{\n vec4 computedPosition;\n\n // Compute positions in different coordinate systems\n vec3 positionMC = attributes.positionMC;\n v_positionMC = positionMC;\n v_positionEC = (modelView * vec4(positionMC, 1.0)).xyz;\n\n #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)\n vec3 position2D = attributes.position2D;\n vec3 positionEC = (u_modelView2D * vec4(position2D, 1.0)).xyz;\n computedPosition = czm_projection * vec4(positionEC, 1.0);\n #else\n computedPosition = czm_projection * vec4(v_positionEC, 1.0);\n #endif\n\n // Sometimes the custom shader and/or style needs this\n #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE) || defined(ENABLE_CLIPPING_POLYGONS)\n // Note that this is a 32-bit position which may result in jitter on small\n // scales.\n v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;\n #endif\n\n #ifdef HAS_NORMALS\n v_normalEC = normalize(normal * attributes.normalMC);\n #endif\n\n #ifdef HAS_TANGENTS\n v_tangentEC = normalize(normal * attributes.tangentMC);\n #endif\n\n #ifdef HAS_BITANGENTS\n v_bitangentEC = normalize(normal * attributes.bitangentMC);\n #endif\n\n // All other varyings need to be dynamically generated in\n // GeometryPipelineStage\n setDynamicVaryings(attributes);\n\n return computedPosition;\n}\n"),i.addFragmentLines("void geometryStage(out ProcessedAttributes attributes)\n{\n attributes.positionMC = v_positionMC;\n attributes.positionEC = v_positionEC;\n\n #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE)\n attributes.positionWC = v_positionWC;\n #endif\n\n #ifdef HAS_NORMALS\n // renormalize after interpolation\n attributes.normalEC = normalize(v_normalEC);\n #endif\n\n #ifdef HAS_TANGENTS\n attributes.tangentEC = normalize(v_tangentEC);\n #endif\n\n #ifdef HAS_BITANGENTS\n attributes.bitangentEC = normalize(v_bitangentEC);\n #endif\n\n // Everything else is dynamically generated in GeometryPipelineStage\n setDynamicVaryings(attributes);\n}\n")};const CEe=Ts,dv=Object.freeze({UNLIT:0,PBR:1}),D9={name:"LightingPipelineStage",process:function(e,t){const{model:n,lightingOptions:i,shaderBuilder:o}=e;c(n.lightColor)&&(o.addDefine("USE_CUSTOM_LIGHT_COLOR",void 0,Ee.FRAGMENT),o.addUniform("vec3","model_lightColorHdr",Ee.FRAGMENT),e.uniformMap.model_lightColorHdr=function(){return n.lightColor});const{lightingModel:r}=i;o.addDefine(r===dv.PBR?"LIGHTING_PBR":"LIGHTING_UNLIT",void 0,Ee.FRAGMENT),o.addFragmentLines("#ifdef USE_IBL_LIGHTING\nvec3 computeIBL(vec3 position, vec3 normal, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)\n{\n #if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)\n // Environment maps were provided, use them for IBL\n vec3 viewDirection = -normalize(position);\n vec3 iblColor = textureIBL(viewDirection, normal, lightDirection, material);\n #else\n // Use procedural IBL if there are no environment maps\n vec3 imageBasedLighting = proceduralIBL(position, normal, lightDirection, material);\n float maximumComponent = czm_maximumComponent(lightColorHdr);\n vec3 clampedLightColor = lightColorHdr / max(maximumComponent, 1.0);\n vec3 iblColor = clampedLightColor * imageBasedLighting;\n #endif\n return iblColor * material.occlusion;\n}\n#endif\n\n#ifdef USE_CLEARCOAT\nvec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)\n{\n vec3 viewDirection = -normalize(position);\n vec3 halfwayDirection = normalize(viewDirection + lightDirection);\n vec3 normal = material.clearcoatNormal;\n float NdotL = clamp(dot(normal, lightDirection), 0.001, 1.0);\n\n // clearcoatF0 = vec3(pow((ior - 1.0) / (ior + 1.0), 2.0)), but without KHR_materials_ior, ior is a constant 1.5.\n vec3 f0 = vec3(0.04);\n vec3 f90 = vec3(1.0);\n // Note: clearcoat Fresnel computed with dot(n, v) instead of dot(v, h).\n // This is to make it energy conserving with a simple layering function.\n float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);\n vec3 F = fresnelSchlick2(f0, f90, NdotV);\n\n // compute specular reflection from direct lighting\n float roughness = material.clearcoatRoughness;\n float directStrength = computeDirectSpecularStrength(normal, lightDirection, viewDirection, halfwayDirection, roughness);\n vec3 directReflection = F * directStrength * NdotL;\n vec3 color = lightColorHdr * directReflection;\n\n #ifdef SPECULAR_IBL\n // Find the direction in which to sample the environment map\n vec3 cubeDir = normalize(model_iblReferenceFrameMatrix * normalize(reflect(-viewDirection, normal)));\n vec3 iblColor = computeSpecularIBL(cubeDir, NdotV, NdotV, f0, roughness);\n color += iblColor * material.occlusion;\n #elif defined(USE_IBL_LIGHTING)\n vec3 positionWC = vec3(czm_inverseView * vec4(position, 1.0));\n vec3 reflectionWC = normalize(czm_inverseViewRotation * normalize(reflect(viewDirection, normal)));\n vec3 skyMetrics = getProceduralSkyMetrics(positionWC, reflectionWC);\n\n vec3 specularIrradiance = getProceduralSpecularIrradiance(reflectionWC, skyMetrics, roughness);\n vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 specularColor = czm_srgbToLinear(f0 * brdfLut.x + brdfLut.y);\n vec3 iblColor = specularIrradiance * specularColor * model_iblFactor.y;\n #ifdef USE_SUN_LUMINANCE\n iblColor *= getSunLuminance(positionWC, normal, lightDirection);\n #endif\n float maximumComponent = czm_maximumComponent(lightColorHdr);\n vec3 clampedLightColor = lightColorHdr / max(maximumComponent, 1.0);\n color += clampedLightColor* iblColor * material.occlusion;\n #endif\n\n float clearcoatFactor = material.clearcoatFactor;\n vec3 clearcoatColor = color * clearcoatFactor;\n\n // Dim base layer based on transmission loss through clearcoat\n return baseLayerColor * (1.0 - clearcoatFactor * F) + clearcoatColor;\n}\n#endif\n\n#if defined(LIGHTING_PBR) && defined(HAS_NORMALS)\nvec3 computePbrLighting(in czm_modelMaterial material, in vec3 position)\n{\n #ifdef USE_CUSTOM_LIGHT_COLOR\n vec3 lightColorHdr = model_lightColorHdr;\n #else\n vec3 lightColorHdr = czm_lightColorHdr;\n #endif\n\n vec3 viewDirection = -normalize(position);\n vec3 normal = material.normalEC;\n vec3 lightDirection = normalize(czm_lightDirectionEC);\n\n vec3 directLighting = czm_pbrLighting(viewDirection, normal, lightDirection, material);\n vec3 directColor = lightColorHdr * directLighting;\n\n // Accumulate colors from base layer\n vec3 color = directColor + material.emissive;\n #ifdef USE_IBL_LIGHTING\n color += computeIBL(position, normal, lightDirection, lightColorHdr, material);\n #endif\n\n #ifdef USE_CLEARCOAT\n color = addClearcoatReflection(color, position, lightDirection, lightColorHdr, material);\n #endif\n\n return color;\n}\n#endif\n\n/**\n * Compute the material color under the current lighting conditions.\n * All other material properties are passed through so further stages\n * have access to them.\n *\n * @param {czm_modelMaterial} material The material properties from {@MaterialStageFS}\n * @param {ProcessedAttributes} attributes\n */\nvoid lightingStage(inout czm_modelMaterial material, ProcessedAttributes attributes)\n{\n #ifdef LIGHTING_PBR\n #ifdef HAS_NORMALS\n vec3 color = computePbrLighting(material, attributes.positionEC);\n #else\n vec3 color = material.diffuse * material.occlusion + material.emissive;\n #endif\n // In HDR mode, the frame buffer is in linear color space. The\n // post-processing stages (see PostProcessStageCollection) will handle\n // tonemapping. However, if HDR is not enabled, we must tonemap else large\n // values may be clamped to 1.0\n #ifndef HDR\n color = czm_acesTonemapping(color);\n #endif\n #else // unlit\n vec3 color = material.diffuse;\n #endif\n\n #ifdef HAS_POINT_CLOUD_COLOR_STYLE\n // The colors resulting from point cloud styles are adjusted differently.\n color = czm_gammaCorrect(color);\n #elif !defined(HDR)\n // If HDR is not enabled, the frame buffer stores sRGB colors rather than\n // linear colors so the linear value must be converted.\n color = czm_linearToSrgb(color);\n #endif\n\n material.diffuse = color;\n}\n")}},wEe=D9,{Material:vEe,MetallicRoughness:_N,SpecularGlossiness:gN,Specular:P9,Clearcoat:O9}=li,R9={name:"MaterialPipelineStage",_processTexture:Ic,_processTextureTransform:L9};function L9(e,t,n,i,o){e.addDefine(`HAS_${o}_TEXTURE_TRANSFORM`,void 0,Ee.FRAGMENT);const s=`${i}Transform`;e.addUniform("mat3",s,Ee.FRAGMENT),t[s]=function(){return n.transform}}function Ic(e,t,n,i,o,r){e.addUniform("sampler2D",i,Ee.FRAGMENT),t[i]=function(){return g(n.texture,r)},e.addDefine(`HAS_${o}_TEXTURE`,void 0,Ee.FRAGMENT),e.addDefine(`TEXCOORD_${o}`,`v_texCoord_${n.texCoord}`,Ee.FRAGMENT);const d=n.transform;c(d)&&!oe.equals(d,oe.IDENTITY)&&L9(e,t,n,i,o);const{scale:h}=n;c(h)&&1!==h&&function IEe(e,t,n,i,o){e.addDefine(`HAS_${o}_TEXTURE_SCALE`,void 0,Ee.FRAGMENT);const s=`${i}Scale`;e.addUniform("float",s,Ee.FRAGMENT),t[s]=function(){return n.scale}}(e,t,n,i,o)}R9.process=function(e,t,n){const i=t.material,{model:o,uniformMap:r,shaderBuilder:s}=e,a=c(o.classificationType),l=a,{defaultTexture:u,defaultNormalTexture:d,defaultEmissiveTexture:h}=n.context;(function DEe(e,t,n,i,o,r,s){const{emissiveFactor:a,emissiveTexture:l,normalTexture:u,occlusionTexture:d}=e;c(a)&&!f.equals(a,vEe.DEFAULT_EMISSIVE_FACTOR)&&(n.addUniform("vec3","u_emissiveFactor",Ee.FRAGMENT),t.u_emissiveFactor=function(){return e.emissiveFactor},n.addDefine("HAS_EMISSIVE_FACTOR",void 0,Ee.FRAGMENT),c(l)&&!s&&Ic(n,t,l,"u_emissiveTexture","EMISSIVE",r)),c(u)&&!s&&Ic(n,t,u,"u_normalTexture","NORMAL",o),c(d)&&!s&&Ic(n,t,d,"u_occlusionTexture","OCCLUSION",i)})(i,r,s,u,d,h,l),c(i.specularGlossiness)?function PEe(e,t,n,i,o){const{diffuseTexture:r,diffuseFactor:s,specularGlossinessTexture:a,specularFactor:l,glossinessFactor:u}=e;n.addDefine("USE_SPECULAR_GLOSSINESS",void 0,Ee.FRAGMENT),c(r)&&!o&&Ic(n,t,r,"u_diffuseTexture","DIFFUSE",i),c(s)&&!de.equals(s,gN.DEFAULT_DIFFUSE_FACTOR)&&(n.addUniform("vec4","u_diffuseFactor",Ee.FRAGMENT),t.u_diffuseFactor=function(){return e.diffuseFactor},n.addDefine("HAS_DIFFUSE_FACTOR",void 0,Ee.FRAGMENT)),c(a)&&!o&&Ic(n,t,a,"u_specularGlossinessTexture","SPECULAR_GLOSSINESS",i),c(l)&&!f.equals(l,gN.DEFAULT_SPECULAR_FACTOR)&&(n.addUniform("vec3","u_legacySpecularFactor",Ee.FRAGMENT),t.u_legacySpecularFactor=function(){return e.specularFactor},n.addDefine("HAS_LEGACY_SPECULAR_FACTOR",void 0,Ee.FRAGMENT)),c(u)&&u!==gN.DEFAULT_GLOSSINESS_FACTOR&&(n.addUniform("float","u_glossinessFactor",Ee.FRAGMENT),t.u_glossinessFactor=function(){return e.glossinessFactor},n.addDefine("HAS_GLOSSINESS_FACTOR",void 0,Ee.FRAGMENT))}(i.specularGlossiness,r,s,u,l):(c(i.specular)&&ti.supportedExtensions.KHR_materials_specular&&function OEe(e,t,n,i,o){const{specularTexture:r,specularFactor:s,specularColorTexture:a,specularColorFactor:l}=e;n.addDefine("USE_SPECULAR",void 0,Ee.FRAGMENT),c(r)&&!o&&Ic(n,t,r,"u_specularTexture","SPECULAR",i),c(s)&&s!==P9.DEFAULT_SPECULAR_FACTOR&&(n.addUniform("float","u_specularFactor",Ee.FRAGMENT),t.u_specularFactor=function(){return e.specularFactor},n.addDefine("HAS_SPECULAR_FACTOR",void 0,Ee.FRAGMENT)),c(a)&&!o&&Ic(n,t,a,"u_specularColorTexture","SPECULAR_COLOR",i),c(l)&&!f.equals(l,P9.DEFAULT_SPECULAR_COLOR_FACTOR)&&(n.addUniform("vec3","u_specularColorFactor",Ee.FRAGMENT),t.u_specularColorFactor=function(){return e.specularColorFactor},n.addDefine("HAS_SPECULAR_COLOR_FACTOR",void 0,Ee.FRAGMENT))}(i.specular,r,s,u,l),c(i.anisotropy)&&ti.supportedExtensions.KHR_materials_anisotropy&&function LEe(e,t,n,i,o){const{anisotropyStrength:r,anisotropyRotation:s,anisotropyTexture:a}=e;n.addDefine("USE_ANISOTROPY",void 0,Ee.FRAGMENT),c(a)&&!o&&Ic(n,t,a,"u_anisotropyTexture","ANISOTROPY",i);const l=Math.cos(s),u=Math.sin(s);n.addUniform("vec3","u_anisotropy",Ee.FRAGMENT),t.u_anisotropy=function(){return f.fromElements(l,u,r,REe)}}(i.anisotropy,r,s,u,l),c(i.clearcoat)&&ti.supportedExtensions.KHR_materials_clearcoat&&function NEe(e,t,n,i,o){const{clearcoatFactor:r,clearcoatTexture:s,clearcoatRoughnessFactor:a,clearcoatRoughnessTexture:l,clearcoatNormalTexture:u}=e;n.addDefine("USE_CLEARCOAT",void 0,Ee.FRAGMENT),c(r)&&r!==O9.DEFAULT_CLEARCOAT_FACTOR&&(n.addUniform("float","u_clearcoatFactor",Ee.FRAGMENT),t.u_clearcoatFactor=function(){return e.clearcoatFactor},n.addDefine("HAS_CLEARCOAT_FACTOR",void 0,Ee.FRAGMENT)),c(s)&&!o&&Ic(n,t,s,"u_clearcoatTexture","CLEARCOAT",i),c(a)&&r!==O9.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_clearcoatRoughnessFactor",Ee.FRAGMENT),t.u_clearcoatRoughnessFactor=function(){return e.clearcoatRoughnessFactor},n.addDefine("HAS_CLEARCOAT_ROUGHNESS_FACTOR",void 0,Ee.FRAGMENT)),c(l)&&!o&&Ic(n,t,l,"u_clearcoatRoughnessTexture","CLEARCOAT_ROUGHNESS",i),c(u)&&!o&&Ic(n,t,u,"u_clearcoatNormalTexture","CLEARCOAT_NORMAL",i)}(i.clearcoat,r,s,u,l),function MEe(e,t,n,i,o){n.addDefine("USE_METALLIC_ROUGHNESS",void 0,Ee.FRAGMENT);const r=e.baseColorTexture;c(r)&&!o&&Ic(n,t,r,"u_baseColorTexture","BASE_COLOR",i);const s=e.baseColorFactor;c(s)&&!de.equals(s,_N.DEFAULT_BASE_COLOR_FACTOR)&&(n.addUniform("vec4","u_baseColorFactor",Ee.FRAGMENT),t.u_baseColorFactor=function(){return e.baseColorFactor},n.addDefine("HAS_BASE_COLOR_FACTOR",void 0,Ee.FRAGMENT));const a=e.metallicRoughnessTexture;c(a)&&!o&&Ic(n,t,a,"u_metallicRoughnessTexture","METALLIC_ROUGHNESS",i);const l=e.metallicFactor;c(l)&&l!==_N.DEFAULT_METALLIC_FACTOR&&(n.addUniform("float","u_metallicFactor",Ee.FRAGMENT),t.u_metallicFactor=function(){return e.metallicFactor},n.addDefine("HAS_METALLIC_FACTOR",void 0,Ee.FRAGMENT));const u=e.roughnessFactor;c(u)&&u!==_N.DEFAULT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_roughnessFactor",Ee.FRAGMENT),t.u_roughnessFactor=function(){return e.roughnessFactor},n.addDefine("HAS_ROUGHNESS_FACTOR",void 0,Ee.FRAGMENT))}(i.metallicRoughness,r,s,u,l));const m=ti.getAttributeBySemantic(t,ln.NORMAL);e.lightingOptions.lightingModel=i.unlit||!m||a?dv.UNLIT:dv.PBR,e.renderStateOptions.cull.enabled=o.backFaceCulling&&!i.doubleSided;const y=e.alphaOptions;i.alphaMode===IS.BLEND?y.pass=Ue.TRANSLUCENT:i.alphaMode===IS.MASK&&(y.alphaCutoff=i.alphaCutoff),s.addFragmentLines("// If the style color is white, it implies the feature has not been styled.\nbool isDefaultStyleColor(vec3 color)\n{\n return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));\n}\n\nvec3 blend(vec3 sourceColor, vec3 styleColor, float styleColorBlend)\n{\n vec3 blendColor = mix(sourceColor, styleColor, styleColorBlend);\n vec3 color = isDefaultStyleColor(styleColor.rgb) ? sourceColor : blendColor;\n return color;\n}\n\nvec2 computeTextureTransform(vec2 texCoord, mat3 textureTransform)\n{\n return vec2(textureTransform * vec3(texCoord, 1.0));\n}\n\n#ifdef HAS_NORMAL_TEXTURE\nvec2 getNormalTexCoords()\n{\n vec2 texCoord = TEXCOORD_NORMAL;\n #ifdef HAS_NORMAL_TEXTURE_TRANSFORM\n texCoord = vec2(u_normalTextureTransform * vec3(texCoord, 1.0));\n #endif\n return texCoord;\n}\n#endif\n\n#if defined(HAS_NORMAL_TEXTURE) || defined(HAS_CLEARCOAT_NORMAL_TEXTURE)\nvec3 computeTangent(in vec3 position, in vec2 normalTexCoords)\n{\n vec2 tex_dx = dFdx(normalTexCoords);\n vec2 tex_dy = dFdy(normalTexCoords);\n float determinant = tex_dx.x * tex_dy.y - tex_dy.x * tex_dx.y;\n vec3 tangent = tex_dy.t * dFdx(position) - tex_dx.t * dFdy(position);\n return tangent / determinant;\n}\n#endif\n\n#ifdef USE_ANISOTROPY\nstruct NormalInfo {\n vec3 tangent;\n vec3 bitangent;\n vec3 normal;\n vec3 geometryNormal;\n};\n\nNormalInfo getNormalInfo(ProcessedAttributes attributes)\n{\n vec3 geometryNormal = attributes.normalEC;\n #ifdef HAS_NORMAL_TEXTURE\n vec2 normalTexCoords = getNormalTexCoords();\n #endif\n\n #ifdef HAS_BITANGENTS\n vec3 tangent = attributes.tangentEC;\n vec3 bitangent = attributes.bitangentEC;\n #else // Assume HAS_NORMAL_TEXTURE\n vec3 tangent = computeTangent(attributes.positionEC, normalTexCoords);\n tangent = normalize(tangent - geometryNormal * dot(geometryNormal, tangent));\n vec3 bitangent = normalize(cross(geometryNormal, tangent));\n #endif\n\n #ifdef HAS_NORMAL_TEXTURE\n mat3 tbn = mat3(tangent, bitangent, geometryNormal);\n vec3 normalSample = texture(u_normalTexture, normalTexCoords).rgb;\n normalSample = 2.0 * normalSample - 1.0;\n #ifdef HAS_NORMAL_TEXTURE_SCALE\n normalSample.xy *= u_normalTextureScale;\n #endif\n vec3 normal = normalize(tbn * normalSample);\n #else\n vec3 normal = geometryNormal;\n #endif\n\n #ifdef HAS_DOUBLE_SIDED_MATERIAL\n if (czm_backFacing()) {\n tangent *= -1.0;\n bitangent *= -1.0;\n normal *= -1.0;\n geometryNormal *= -1.0;\n }\n #endif\n\n NormalInfo normalInfo;\n normalInfo.tangent = tangent;\n normalInfo.bitangent = bitangent;\n normalInfo.normal = normal;\n normalInfo.geometryNormal = geometryNormal;\n\n return normalInfo;\n}\n#endif\n\n#if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)\nvec3 getNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)\n{\n vec2 normalTexCoords = getNormalTexCoords();\n\n // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set\n #ifdef HAS_BITANGENTS\n vec3 t = attributes.tangentEC;\n vec3 b = attributes.bitangentEC;\n #else\n vec3 t = computeTangent(attributes.positionEC, normalTexCoords);\n t = normalize(t - geometryNormal * dot(geometryNormal, t));\n vec3 b = normalize(cross(geometryNormal, t));\n #endif\n\n mat3 tbn = mat3(t, b, geometryNormal);\n vec3 normalSample = texture(u_normalTexture, normalTexCoords).rgb;\n normalSample = 2.0 * normalSample - 1.0;\n #ifdef HAS_NORMAL_TEXTURE_SCALE\n normalSample.xy *= u_normalTextureScale;\n #endif\n return normalize(tbn * normalSample);\n}\n#endif\n\n#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE\nvec3 getClearcoatNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)\n{\n vec2 normalTexCoords = TEXCOORD_CLEARCOAT_NORMAL;\n #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_TRANSFORM\n normalTexCoords = vec2(u_clearcoatNormalTextureTransform * vec3(normalTexCoords, 1.0));\n #endif\n\n // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set\n #ifdef HAS_BITANGENTS\n vec3 t = attributes.tangentEC;\n vec3 b = attributes.bitangentEC;\n #else\n vec3 t = computeTangent(attributes.positionEC, normalTexCoords);\n t = normalize(t - geometryNormal * dot(geometryNormal, t));\n vec3 b = normalize(cross(geometryNormal, t));\n #endif\n\n mat3 tbn = mat3(t, b, geometryNormal);\n vec3 normalSample = texture(u_clearcoatNormalTexture, normalTexCoords).rgb;\n normalSample = 2.0 * normalSample - 1.0;\n #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_SCALE\n normalSample.xy *= u_clearcoatNormalTextureScale;\n #endif\n return normalize(tbn * normalSample);\n}\n#endif\n\n#ifdef HAS_NORMALS\nvec3 computeNormal(ProcessedAttributes attributes)\n{\n // Geometry normal. This is already normalized \n vec3 normal = attributes.normalEC;\n\n #if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)\n normal = getNormalFromTexture(attributes, normal);\n #endif\n\n #ifdef HAS_DOUBLE_SIDED_MATERIAL\n if (czm_backFacing()) {\n normal = -normal;\n }\n #endif\n\n return normal;\n}\n#endif\n\n#ifdef HAS_BASE_COLOR_TEXTURE\nvec4 getBaseColorFromTexture()\n{\n vec2 baseColorTexCoords = TEXCOORD_BASE_COLOR;\n #ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM\n baseColorTexCoords = computeTextureTransform(baseColorTexCoords, u_baseColorTextureTransform);\n #endif\n\n vec4 baseColorWithAlpha = czm_srgbToLinear(texture(u_baseColorTexture, baseColorTexCoords));\n\n #ifdef HAS_BASE_COLOR_FACTOR\n baseColorWithAlpha *= u_baseColorFactor;\n #endif\n\n return baseColorWithAlpha;\n}\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\nvec3 getEmissiveFromTexture()\n{\n vec2 emissiveTexCoords = TEXCOORD_EMISSIVE;\n #ifdef HAS_EMISSIVE_TEXTURE_TRANSFORM\n emissiveTexCoords = computeTextureTransform(emissiveTexCoords, u_emissiveTextureTransform);\n #endif\n\n vec3 emissive = czm_srgbToLinear(texture(u_emissiveTexture, emissiveTexCoords).rgb);\n #ifdef HAS_EMISSIVE_FACTOR\n emissive *= u_emissiveFactor;\n #endif\n\n return emissive;\n}\n#endif\n\n#if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)\nvoid setSpecularGlossiness(inout czm_modelMaterial material)\n{\n #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE\n vec2 specularGlossinessTexCoords = TEXCOORD_SPECULAR_GLOSSINESS;\n #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE_TRANSFORM\n specularGlossinessTexCoords = computeTextureTransform(specularGlossinessTexCoords, u_specularGlossinessTextureTransform);\n #endif\n\n vec4 specularGlossiness = czm_srgbToLinear(texture(u_specularGlossinessTexture, specularGlossinessTexCoords));\n vec3 specular = specularGlossiness.rgb;\n float glossiness = specularGlossiness.a;\n #ifdef HAS_LEGACY_SPECULAR_FACTOR\n specular *= u_legacySpecularFactor;\n #endif\n\n #ifdef HAS_GLOSSINESS_FACTOR\n glossiness *= u_glossinessFactor;\n #endif\n #else\n #ifdef HAS_LEGACY_SPECULAR_FACTOR\n vec3 specular = clamp(u_legacySpecularFactor, vec3(0.0), vec3(1.0));\n #else\n vec3 specular = vec3(1.0);\n #endif\n\n #ifdef HAS_GLOSSINESS_FACTOR\n float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);\n #else\n float glossiness = 1.0;\n #endif\n #endif\n\n #ifdef HAS_DIFFUSE_TEXTURE\n vec2 diffuseTexCoords = TEXCOORD_DIFFUSE;\n #ifdef HAS_DIFFUSE_TEXTURE_TRANSFORM\n diffuseTexCoords = computeTextureTransform(diffuseTexCoords, u_diffuseTextureTransform);\n #endif\n\n vec4 diffuse = czm_srgbToLinear(texture(u_diffuseTexture, diffuseTexCoords));\n #ifdef HAS_DIFFUSE_FACTOR\n diffuse *= u_diffuseFactor;\n #endif\n #elif defined(HAS_DIFFUSE_FACTOR)\n vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));\n #else\n vec4 diffuse = vec4(1.0);\n #endif\n\n material.diffuse = diffuse.rgb * (1.0 - czm_maximumComponent(specular));\n // the specular glossiness extension's alpha overrides anything set\n // by the base material.\n material.alpha = diffuse.a;\n\n material.specular = specular;\n\n // glossiness is the opposite of roughness, but easier for artists to use.\n float roughness = 1.0 - glossiness;\n material.roughness = roughness * roughness;\n}\n#elif defined(LIGHTING_PBR)\nfloat setMetallicRoughness(inout czm_modelMaterial material)\n{\n #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE\n vec2 metallicRoughnessTexCoords = TEXCOORD_METALLIC_ROUGHNESS;\n #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE_TRANSFORM\n metallicRoughnessTexCoords = computeTextureTransform(metallicRoughnessTexCoords, u_metallicRoughnessTextureTransform);\n #endif\n\n vec3 metallicRoughness = texture(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;\n float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n #ifdef HAS_METALLIC_FACTOR\n metalness = clamp(metalness * u_metallicFactor, 0.0, 1.0);\n #endif\n\n #ifdef HAS_ROUGHNESS_FACTOR\n roughness = clamp(roughness * u_roughnessFactor, 0.0, 1.0);\n #endif\n #else\n #ifdef HAS_METALLIC_FACTOR\n float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n #else\n float metalness = 1.0;\n #endif\n\n #ifdef HAS_ROUGHNESS_FACTOR\n float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n #else\n float roughness = 1.0;\n #endif\n #endif\n\n // dielectrics use f0 = 0.04, metals use albedo as f0\n const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);\n vec3 f0 = mix(REFLECTANCE_DIELECTRIC, material.baseColor.rgb, metalness);\n\n material.specular = f0;\n\n // diffuse only applies to dielectrics.\n material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness);\n\n // roughness is authored as perceptual roughness\n // square it to get material roughness\n material.roughness = roughness * roughness;\n\n return metalness;\n}\n#ifdef USE_SPECULAR\nvoid setSpecular(inout czm_modelMaterial material, in float metalness)\n{\n #ifdef HAS_SPECULAR_TEXTURE\n vec2 specularTexCoords = TEXCOORD_SPECULAR;\n #ifdef HAS_SPECULAR_TEXTURE_TRANSFORM\n specularTexCoords = computeTextureTransform(specularTexCoords, u_specularTextureTransform);\n #endif\n float specularWeight = texture(u_specularTexture, specularTexCoords).a;\n #ifdef HAS_SPECULAR_FACTOR\n specularWeight *= u_specularFactor;\n #endif\n #else\n #ifdef HAS_SPECULAR_FACTOR\n float specularWeight = u_specularFactor;\n #else\n float specularWeight = 1.0;\n #endif\n #endif\n\n #ifdef HAS_SPECULAR_COLOR_TEXTURE\n vec2 specularColorTexCoords = TEXCOORD_SPECULAR_COLOR;\n #ifdef HAS_SPECULAR_COLOR_TEXTURE_TRANSFORM\n specularColorTexCoords = computeTextureTransform(specularColorTexCoords, u_specularColorTextureTransform);\n #endif\n vec3 specularColorSample = texture(u_specularColorTexture, specularColorTexCoords).rgb;\n vec3 specularColorFactor = czm_srgbToLinear(specularColorSample);\n #ifdef HAS_SPECULAR_COLOR_FACTOR\n specularColorFactor *= u_specularColorFactor;\n #endif\n #else\n #ifdef HAS_SPECULAR_COLOR_FACTOR\n vec3 specularColorFactor = u_specularColorFactor;\n #else\n vec3 specularColorFactor = vec3(1.0);\n #endif\n #endif\n material.specularWeight = specularWeight;\n vec3 f0 = material.specular;\n vec3 dielectricSpecularF0 = min(f0 * specularColorFactor, vec3(1.0));\n material.specular = mix(dielectricSpecularF0, material.baseColor.rgb, metalness);\n}\n#endif\n#ifdef USE_ANISOTROPY\nvoid setAnisotropy(inout czm_modelMaterial material, in NormalInfo normalInfo)\n{\n mat2 rotation = mat2(u_anisotropy.xy, -u_anisotropy.y, u_anisotropy.x);\n float anisotropyStrength = u_anisotropy.z;\n\n vec2 direction = vec2(1.0, 0.0);\n #ifdef HAS_ANISOTROPY_TEXTURE\n vec2 anisotropyTexCoords = TEXCOORD_ANISOTROPY;\n #ifdef HAS_ANISOTROPY_TEXTURE_TRANSFORM\n anisotropyTexCoords = computeTextureTransform(anisotropyTexCoords, u_anisotropyTextureTransform);\n #endif\n vec3 anisotropySample = texture(u_anisotropyTexture, anisotropyTexCoords).rgb;\n direction = anisotropySample.rg * 2.0 - vec2(1.0);\n anisotropyStrength *= anisotropySample.b;\n #endif\n\n direction = rotation * direction;\n mat3 tbn = mat3(normalInfo.tangent, normalInfo.bitangent, normalInfo.normal);\n vec3 anisotropicT = tbn * normalize(vec3(direction, 0.0));\n vec3 anisotropicB = cross(normalInfo.geometryNormal, anisotropicT);\n\n material.anisotropicT = anisotropicT;\n material.anisotropicB = anisotropicB;\n material.anisotropyStrength = anisotropyStrength;\n}\n#endif\n#ifdef USE_CLEARCOAT\nvoid setClearcoat(inout czm_modelMaterial material, in ProcessedAttributes attributes)\n{\n #ifdef HAS_CLEARCOAT_TEXTURE\n vec2 clearcoatTexCoords = TEXCOORD_CLEARCOAT;\n #ifdef HAS_CLEARCOAT_TEXTURE_TRANSFORM\n clearcoatTexCoords = computeTextureTransform(clearcoatTexCoords, u_clearcoatTextureTransform);\n #endif\n float clearcoatFactor = texture(u_clearcoatTexture, clearcoatTexCoords).r;\n #ifdef HAS_CLEARCOAT_FACTOR\n clearcoatFactor *= u_clearcoatFactor;\n #endif\n #else\n #ifdef HAS_CLEARCOAT_FACTOR\n float clearcoatFactor = u_clearcoatFactor;\n #else\n // PERFORMANCE_IDEA: this case should turn the whole extension off\n float clearcoatFactor = 0.0;\n #endif\n #endif\n\n #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE\n vec2 clearcoatRoughnessTexCoords = TEXCOORD_CLEARCOAT_ROUGHNESS;\n #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE_TRANSFORM\n clearcoatRoughnessTexCoords = computeTextureTransform(clearcoatRoughnessTexCoords, u_clearcoatRoughnessTextureTransform);\n #endif\n float clearcoatRoughness = texture(u_clearcoatRoughnessTexture, clearcoatRoughnessTexCoords).g;\n #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR\n clearcoatRoughness *= u_clearcoatRoughnessFactor;\n #endif\n #else\n #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR\n float clearcoatRoughness = u_clearcoatRoughnessFactor;\n #else\n float clearcoatRoughness = 0.0;\n #endif\n #endif\n\n material.clearcoatFactor = clearcoatFactor;\n // roughness is authored as perceptual roughness\n // square it to get material roughness\n material.clearcoatRoughness = clearcoatRoughness * clearcoatRoughness;\n #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE\n material.clearcoatNormal = getClearcoatNormalFromTexture(attributes, attributes.normalEC);\n #else\n material.clearcoatNormal = attributes.normalEC;\n #endif\n}\n#endif\n#endif\n\nvoid materialStage(inout czm_modelMaterial material, ProcessedAttributes attributes, SelectedFeature feature)\n{\n #ifdef USE_ANISOTROPY\n NormalInfo normalInfo = getNormalInfo(attributes);\n material.normalEC = normalInfo.normal;\n #elif defined(HAS_NORMALS)\n material.normalEC = computeNormal(attributes);\n #endif\n\n vec4 baseColorWithAlpha = vec4(1.0);\n // Regardless of whether we use PBR, set a base color\n #ifdef HAS_BASE_COLOR_TEXTURE\n baseColorWithAlpha = getBaseColorFromTexture();\n #elif defined(HAS_BASE_COLOR_FACTOR)\n baseColorWithAlpha = u_baseColorFactor;\n #endif\n\n #ifdef HAS_POINT_CLOUD_COLOR_STYLE\n baseColorWithAlpha = v_pointCloudColor;\n #elif defined(HAS_COLOR_0)\n vec4 color = attributes.color_0;\n // .pnts files store colors in the sRGB color space\n #ifdef HAS_SRGB_COLOR\n color = czm_srgbToLinear(color);\n #endif\n baseColorWithAlpha *= color;\n #endif\n\n material.baseColor = baseColorWithAlpha;\n material.diffuse = baseColorWithAlpha.rgb;\n material.alpha = baseColorWithAlpha.a;\n\n #ifdef USE_CPU_STYLING\n material.diffuse = blend(material.diffuse, feature.color.rgb, model_colorBlend);\n #endif\n\n #ifdef HAS_OCCLUSION_TEXTURE\n vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;\n #ifdef HAS_OCCLUSION_TEXTURE_TRANSFORM\n occlusionTexCoords = computeTextureTransform(occlusionTexCoords, u_occlusionTextureTransform);\n #endif\n material.occlusion = texture(u_occlusionTexture, occlusionTexCoords).r;\n #endif\n\n #ifdef HAS_EMISSIVE_TEXTURE\n material.emissive = getEmissiveFromTexture();\n #elif defined(HAS_EMISSIVE_FACTOR)\n material.emissive = u_emissiveFactor;\n #endif\n\n #if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)\n setSpecularGlossiness(material);\n #elif defined(LIGHTING_PBR)\n float metalness = setMetallicRoughness(material);\n #ifdef USE_SPECULAR\n setSpecular(material, metalness);\n #endif\n #ifdef USE_ANISOTROPY\n setAnisotropy(material, normalInfo);\n #endif\n #ifdef USE_CLEARCOAT\n setClearcoat(material, attributes);\n #endif\n #endif\n}\n"),i.doubleSided&&s.addDefine("HAS_DOUBLE_SIDED_MATERIAL",void 0,Ee.BOTH)};const REe=new f,FEe=R9,Js={name:"MorphTargetsPipelineStage",FUNCTION_ID_GET_MORPHED_POSITION:"getMorphedPosition",FUNCTION_SIGNATURE_GET_MORPHED_POSITION:"vec3 getMorphedPosition(in vec3 position)",FUNCTION_ID_GET_MORPHED_NORMAL:"getMorphedNormal",FUNCTION_SIGNATURE_GET_MORPHED_NORMAL:"vec3 getMorphedNormal(in vec3 normal)",FUNCTION_ID_GET_MORPHED_TANGENT:"getMorphedTangent",FUNCTION_SIGNATURE_GET_MORPHED_TANGENT:"vec3 getMorphedTangent(in vec3 tangent)",process:function(e,t){const n=e.shaderBuilder;n.addDefine("HAS_MORPH_TARGETS",void 0,Ee.VERTEX),function GEe(e){e.addFunction(Js.FUNCTION_ID_GET_MORPHED_POSITION,Js.FUNCTION_SIGNATURE_GET_MORPHED_POSITION,Ee.VERTEX);e.addFunctionLines(Js.FUNCTION_ID_GET_MORPHED_POSITION,["vec3 morphedPosition = position;"]),e.addFunction(Js.FUNCTION_ID_GET_MORPHED_NORMAL,Js.FUNCTION_SIGNATURE_GET_MORPHED_NORMAL,Ee.VERTEX);e.addFunctionLines(Js.FUNCTION_ID_GET_MORPHED_NORMAL,["vec3 morphedNormal = normal;"]),e.addFunction(Js.FUNCTION_ID_GET_MORPHED_TANGENT,Js.FUNCTION_SIGNATURE_GET_MORPHED_TANGENT,Ee.VERTEX);e.addFunctionLines(Js.FUNCTION_ID_GET_MORPHED_TANGENT,["vec3 morphedTangent = tangent;"])}(n);const i=t.morphTargets.length;for(let a=0;a<i;a++){const l=t.morphTargets[a].attributes,u=l.length;for(let d=0;d<u;d++){const h=l[d],m=h.semantic;m!==ln.POSITION&&m!==ln.NORMAL&&m!==ln.TANGENT||(UEe(e,h,e.attributeIndex,a),e.attributeIndex++)}}!function jEe(e){e.addFunctionLines(Js.FUNCTION_ID_GET_MORPHED_POSITION,["return morphedPosition;"]);e.addFunctionLines(Js.FUNCTION_ID_GET_MORPHED_NORMAL,["return morphedNormal;"]);e.addFunctionLines(Js.FUNCTION_ID_GET_MORPHED_TANGENT,["return morphedTangent;"])}(n),n.addUniform("float",`u_morphWeights[${e.runtimeNode.morphWeights.length}]`,Ee.VERTEX),n.addVertexLines("void morphTargetsStage(inout ProcessedAttributes attributes) \n{\n vec3 positionMC = attributes.positionMC;\n attributes.positionMC = getMorphedPosition(positionMC);\n\n #ifdef HAS_NORMALS\n vec3 normalMC = attributes.normalMC;\n attributes.normalMC = getMorphedNormal(normalMC);\n #endif\n\n #ifdef HAS_TANGENTS\n vec3 tangentMC = attributes.tangentMC;\n attributes.tangentMC = getMorphedTangent(tangentMC);\n #endif\n}"),e.uniformMap=Pn({u_morphWeights:function(){return e.runtimeNode.morphWeights}},e.uniformMap)}},kEe={attributeString:void 0,functionId:void 0};function UEe(e,t,n,i){const o=e.shaderBuilder;!function zEe(e,t,n){const i={index:n,value:c(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,componentsPerAttribute:Wn.getNumberOfComponents(t.type),componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};e.attributes.push(i)}(e,t,n);const r=function VEe(e,t){switch(e.semantic){case ln.POSITION:t.attributeString="Position",t.functionId=Js.FUNCTION_ID_GET_MORPHED_POSITION;break;case ln.NORMAL:t.attributeString="Normal",t.functionId=Js.FUNCTION_ID_GET_MORPHED_NORMAL;break;case ln.TANGENT:t.attributeString="Tangent",t.functionId=Js.FUNCTION_ID_GET_MORPHED_TANGENT}return t}(t,kEe);!function HEe(e,t,n){const i=t.attributeString,r=`morphed${i} += u_morphWeights[${n}] * a_target${i}_${n};`;e.addAttribute("vec3",`a_target${i}_${n}`),e.addFunctionLines(t.functionId,[r])}(o,r,i)}const WEe=Js,N9={name:"PickingPipelineStage"};function M9(e,t){const n=e.model;if(c(n.pickObject))return n.pickObject;const i={model:n,node:e.runtimeNode,primitive:e.runtimePrimitive};let o;if(Ia.is3DTiles(n.type)){const r=n.content;o={content:r,primitive:r.tileset,detail:i}}else o={primitive:n,detail:i};return o.id=n.id,c(t)&&(o.instanceId=t),o}N9.process=function(e,t,n){const i=n.context,r=e.shaderBuilder,s=e.model,a=e.runtimeNode.node.instances;if(e.hasPropertyTable)!function qEe(e,t,n){const i=e.model;let o,r;const s=i.featureIdLabel,a=i.instanceFeatureIdLabel;c(i.featureTableId)?o=i.featureTableId:c(n)?(r=ti.getFeatureIdsByLabel(n.featureIds,a),o=r.propertyTableId):(r=ti.getFeatureIdsByLabel(t.featureIds,s),o=r.propertyTableId);const l=i.featureTables[o];e.shaderBuilder.addUniform("sampler2D","model_pickTexture",Ee.FRAGMENT);const d=l.batchTexture;e.uniformMap.model_pickTexture=function(){return g(d.pickTexture,d.defaultTexture)},e.pickId="((selectedFeature.id < int(model_featuresLength)) ? texture(model_pickTexture, selectedFeature.st) : vec4(0.0))"}(e,t,a);else if(c(a))!function YEe(e,t){const n=e.instanceCount,i=new Array(n),o=new Uint8Array(4*n),r=e.model,s=r._pipelineResources;for(let h=0;h<n;h++){const m=M9(e,h),_=t.createPickId(m);s.push(_),i[h]=_;const p=_.color;o[4*h+0]=Z.floatToByte(p.red),o[4*h+1]=Z.floatToByte(p.green),o[4*h+2]=Z.floatToByte(p.blue),o[4*h+3]=Z.floatToByte(p.alpha)}r._pickIds=i;const a=yn.createVertexBuffer({context:t,typedArray:o,usage:At.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.statistics.addBuffer(a,!1),s.push(a);const u={index:e.attributeIndex++,vertexBuffer:a,componentsPerAttribute:4,componentDatatype:ee.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1};e.attributes.push(u);const d=e.shaderBuilder;d.addDefine("USE_PICKING",void 0,Ee.BOTH),d.addAttribute("vec4","a_pickColor"),d.addVarying("vec4","v_pickColor"),e.pickId="v_pickColor"}(e,i);else{const l=M9(e),u=i.createPickId(l);s._pipelineResources.push(u),s._pickIds.push(u),r.addUniform("vec4","czm_pickColor",Ee.FRAGMENT),e.uniformMap.czm_pickColor=function(){return u.color},e.pickId="czm_pickColor"}};const XEe=N9,ea=Object.freeze({ADD:0,REPLACE:1}),$Ee=new de,F9={name:"PointCloudStylingPipelineStage",process:function(e,t,n){const i=e.shaderBuilder,o=e.model,r=o.style,s=o.structuralMetadata,a=c(s)?s.propertyAttributes:void 0,l=c(o.featureTableId)&&o.featureTables[o.featureTableId].featuresLength>0,u=!c(a)&&l;if(c(r)&&!u){const y=function ewe(e){const t=Rt(JEe);if(!c(e))return t;for(let n=0;n<e.length;n++){const o=e[n].properties;for(const r in o)o.hasOwnProperty(r)&&(t[r]=`metadata.${r}`)}return t}(a),b=function twe(e,t){const n=QEe,i={translucent:!1};return n.colorStyleFunction=e.getColorShaderFunction(`getColorFromStyle(${yN})`,t,i),n.showStyleFunction=e.getShowShaderFunction(`getShowFromStyle(${yN})`,t,i),n.pointSizeStyleFunction=e.getPointSizeShaderFunction(`getPointSizeFromStyle(${yN})`,t,i),n.styleTranslucent=c(n.colorStyleFunction)&&i.translucent,n}(r,y);!function nwe(e,t){const n=t.colorStyleFunction;c(n)&&(e.addDefine("HAS_POINT_CLOUD_COLOR_STYLE",void 0,Ee.BOTH),e.addVertexLines(n),e.addVarying("vec4","v_pointCloudColor"));const i=t.showStyleFunction;c(i)&&(e.addDefine("HAS_POINT_CLOUD_SHOW_STYLE",void 0,Ee.VERTEX),e.addVertexLines(i));const o=t.pointSizeStyleFunction;c(o)&&(e.addDefine("HAS_POINT_CLOUD_POINT_SIZE_STYLE",void 0,Ee.VERTEX),e.addVertexLines(o))}(i,b);const C=function iwe(e){const t=e.colorStyleFunction,n=e.showStyleFunction,i=e.pointSizeStyleFunction,o=[];return c(t)&&bN(t,o),c(n)&&bN(n,o),c(i)&&bN(i,o),o}(b).indexOf("normalMC")>=0,w=ti.getAttributeBySemantic(t,ln.NORMAL);if(C&&!w)throw new Pe("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,Ee.VERTEX),b.styleTranslucent&&(e.alphaOptions.pass=Ue.TRANSLUCENT)}const d=o.pointCloudShading;let h,m,_;d.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,Ee.VERTEX),d.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,Ee.VERTEX),Ia.is3DTiles(o.type)&&(m=!0,h=o.content,_=h.tile.refine===ea.ADD),i.addUniform("vec4","model_pointCloudParameters",Ee.VERTEX),i.addVertexLines("float getPointSizeFromAttenuation(vec3 positionEC) {\n // Variables are packed into a single vector to minimize gl.uniformXXX() calls\n float pointSize = model_pointCloudParameters.x;\n float geometricError = model_pointCloudParameters.y;\n float depthMultiplier = model_pointCloudParameters.z;\n\n float depth = -positionEC.z;\n return min((geometricError / depth) * depthMultiplier, pointSize);\n}\n\n#ifdef HAS_POINT_CLOUD_SHOW_STYLE\nfloat pointCloudShowStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {\n float tiles3d_tileset_time = model_pointCloudParameters.w;\n return float(getShowFromStyle(attributes, metadata, tiles3d_tileset_time));\n}\n#endif\n\n#ifdef HAS_POINT_CLOUD_COLOR_STYLE\nvec4 pointCloudColorStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {\n float tiles3d_tileset_time = model_pointCloudParameters.w;\n return getColorFromStyle(attributes, metadata, tiles3d_tileset_time);\n}\n#endif\n\n#ifdef HAS_POINT_CLOUD_POINT_SIZE_STYLE\nfloat pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {\n float tiles3d_tileset_time = model_pointCloudParameters.w;\n return float(getPointSizeFromStyle(attributes, metadata, tiles3d_tileset_time));\n}\n#elif defined(HAS_POINT_CLOUD_ATTENUATION)\nfloat pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {\n return getPointSizeFromAttenuation(v_positionEC);\n}\n#endif\n\n#ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING\nfloat pointCloudBackFaceCullingStage() {\n #if defined(HAS_NORMALS) && !defined(HAS_DOUBLE_SIDED_MATERIAL)\n // This needs to be computed in eye coordinates so we can't use attributes.normalMC\n return step(-v_normalEC.z, 0.0);\n #else\n return 1.0;\n #endif\n}\n#endif"),e.uniformMap.model_pointCloudParameters=function(){const y=$Ee;let b=1;m&&(b=_?5:h.tileset.memoryAdjustedScreenSpaceError),y.x=g(d.maximumAttenuation,b),y.x*=n.pixelRatio;const x=function KEe(e,t,n,i){if(c(i)){const d=i.tile.geometricError;if(d>0)return d}if(c(n.baseResolution))return n.baseResolution;const o=ti.getAttributeBySemantic(t,ln.POSITION),r=o.count,s=e.runtimeNode.transform;let a=f.subtract(o.max,o.min,B9);a=k.multiplyByPointAsVector(s,a,B9);return O.cbrt(a.x*a.y*a.z/r)}(e,t,d,h);let v;return y.y=x*d.geometricErrorScale,v=n.mode===ce.SCENE2D||n.camera.frustum instanceof $n?Number.POSITIVE_INFINITY:n.context.drawingBufferHeight/n.camera.frustum.sseDenominator,y.z=v,m&&(y.w=h.tileset.timeSinceLoad),y}}},B9=new f,QEe={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},JEe={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"},yN="ProcessedAttributes attributes, Metadata metadata, float tiles3d_tileset_time";function bN(e,t){const n=/attributes\.(\w+)/g;let i=n.exec(e);for(;null!==i;){const o=i[1];-1===t.indexOf(o)&&t.push(o),i=n.exec(e)}}const owe=F9,k9={name:"PrimitiveOutlinePipelineStage",process:function(e,t,n){const i=e.shaderBuilder,o=e.uniformMap;i.addDefine("HAS_PRIMITIVE_OUTLINE",void 0,Ee.BOTH),i.addAttribute("vec3","a_outlineCoordinates"),i.addVarying("vec3","v_outlineCoordinates");const r=t.outlineCoordinates,s={index:e.attributeIndex++,vertexBuffer:r.buffer,componentsPerAttribute:Wn.getNumberOfComponents(r.type),componentDatatype:r.componentDatatype,offsetInBytes:r.byteOffset,strideInBytes:r.byteStride,normalize:r.normalized};e.attributes.push(s),i.addUniform("sampler2D","model_outlineTexture",Ee.FRAGMENT);const a=aG.createTexture(n.context);o.model_outlineTexture=function(){return a};const l=e.model;i.addUniform("vec4","model_outlineColor",Ee.FRAGMENT),o.model_outlineColor=function(){return l.outlineColor},i.addUniform("bool","model_showOutline",Ee.FRAGMENT),o.model_showOutline=function(){return l.showOutline},i.addVertexLines("void primitiveOutlineStage() {\n v_outlineCoordinates = a_outlineCoordinates;\n}\n"),i.addFragmentLines("void primitiveOutlineStage(inout czm_modelMaterial material) {\n if (!model_showOutline) {\n return;\n }\n\n float outlineX = \n texture(model_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r;\n float outlineY = \n texture(model_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r;\n float outlineZ = \n texture(model_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r;\n float outlineness = max(outlineX, max(outlineY, outlineZ));\n\n material.diffuse = mix(material.diffuse, model_outlineColor.rgb, model_outlineColor.a * outlineness);\n}\n\n")}},awe=k9,U9={name:"PrimitiveStatisticsPipelineStage",_countGeometry:z9,_count2DPositions:V9,_countMorphTargetAttributes:H9,_countMaterialTextures:G9,_countFeatureIdTextures:j9,_countBinaryMetadata:W9};function z9(e,t){const n=c(t.indices)?t.indices.count:ti.getAttributeBySemantic(t,"POSITION").count,i=t.primitiveType;i===Tt.POINTS?e.pointsLength+=n:Tt.isTriangles(i)&&(e.trianglesLength+=function cwe(e,t){switch(e){case Tt.TRIANGLES:return t/3;case Tt.TRIANGLE_STRIP:case Tt.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}(i,n));const o=t.attributes,r=o.length;for(let l=0;l<r;l++){const u=o[l];if(c(u.buffer)){const d=c(u.typedArray);e.addBuffer(u.buffer,d)}}const s=t.outlineCoordinates;c(s)&&c(s.buffer)&&e.addBuffer(s.buffer,!1);const a=t.indices;if(c(a)&&c(a.buffer)){const l=c(a.typedArray);e.addBuffer(a.buffer,l)}}function V9(e,t){const n=t.positionBuffer2D;c(n)&&e.addBuffer(n,!0)}function H9(e,t){const n=t.morphTargets;if(!c(n))return;const o=n.length;for(let r=0;r<o;r++){const s=n[r].attributes,a=s.length;for(let l=0;l<a;l++){const u=s[l];c(u.buffer)&&e.addBuffer(u.buffer,!1)}}}function G9(e,t){const n=function lwe(e){const t=e.metallicRoughness,n=[e.emissiveTexture,e.normalTexture,e.occlusionTexture,t.baseColorTexture,t.metallicRoughnessTexture],i=e.specularGlossiness;return c(i)&&(n.push(i.diffuseTexture),n.push(i.specularGlossinessTexture)),n}(t),i=n.length;for(let o=0;o<i;o++){const r=n[o];c(r)&&c(r.texture)&&e.addTexture(r.texture)}}function j9(e,t){const n=t.length;for(let i=0;i<n;i++){const o=t[i];if(o instanceof li.FeatureIdTexture){const r=o.textureReader;c(r.texture)&&e.addTexture(r.texture)}}}function W9(e,t){const n=t.structuralMetadata;c(n)&&(function uwe(e,t){const n=t.propertyTextures;if(!c(n))return;const i=n.length;for(let o=0;o<i;o++){const s=n[o].properties;for(const a in s)if(s.hasOwnProperty(a)){const u=s[a].textureReader;c(u.texture)&&e.addTexture(u.texture)}}}(e,n),e.propertyTablesByteLength+=n.propertyTablesByteLength);const i=t.featureTables;if(!c(i))return;const o=i.length;for(let r=0;r<o;r++)e.addBatchTexture(i[r].batchTexture)}U9.process=function(e,t,n){const i=e.model,o=i.statistics;z9(o,t),V9(o,e.runtimePrimitive),H9(o,t),G9(o,t.material),j9(o,t.featureIds),W9(o,i)};const dwe=U9,fwe=new k,hwe=new k,q9={name:"SceneMode2DPipelineStage",process:function(e,t,n){const i=ti.getAttributeBySemantic(t,ln.POSITION),o=e.shaderBuilder,r=e.model,l=k.multiplyTransformation(r.sceneGraph.computedModelMatrix,e.runtimeNode.computedTransform,fwe),u=function _we(e,t,n){const i=k.multiplyByPoint(t,e.positionMin,pwe),o=Pr.computeActualEllipsoidPosition(n,i,i),r=k.multiplyByPoint(t,e.positionMax,mwe),s=Pr.computeActualEllipsoidPosition(n,r,r);return Ae.fromCornerPoints(o,s,new Ae)}(e,l,n),d=e.runtimePrimitive;if(d.boundingSphere2D=u,c(e.runtimeNode.node.instances))return;if(c(i.typedArray)){const y=function bwe(e,t,n,i){const o=Rt(i);o.mode=ce.COLUMBUS_VIEW;const s=function ywe(e,t,n,i){let o;o=c(e.quantization)?function gwe(e,t){const n=e.length,i=new Float32Array(n),o=t.quantizedVolumeOffset,r=t.quantizedVolumeStepSize;for(let s=0;s<n;s+=3){const a=f.fromArray(e,s,Y9),l=f.multiplyComponents(a,r,a),u=f.add(l,o,l);i[s]=u.x,i[s+1]=u.y,i[s+2]=u.z}return i}(e.typedArray,e.quantization):e.typedArray.slice();const r=e.byteOffset/Float32Array.BYTES_PER_ELEMENT,s=o.length,a=c(e.byteStride)?e.byteStride/Float32Array.BYTES_PER_ELEMENT:3;for(let l=r;l<s;l+=a){const u=f.fromArray(o,l,Y9);if(isNaN(u.x)||isNaN(u.y)||isNaN(u.z))continue;const d=k.multiplyByPoint(t,u,u),h=Pr.computeActualEllipsoidPosition(i,d,d),m=f.subtract(h,n,h);o[l]=m.x,o[l+1]=m.y,o[l+2]=m.z}return o}(e,t,n.center,o),a=yn.createVertexBuffer({context:i.context,typedArray:s,usage:At.STATIC_DRAW});return a.vertexArrayDestroyable=!1,a}(i,l,u,n);d.positionBuffer2D=y,r._modelResources.push(y),i.typedArray=void 0}o.addDefine("USE_2D_POSITIONS",void 0,Ee.VERTEX),o.addUniform("mat4","u_modelView2D",Ee.VERTEX);const m=k.fromTranslation(u.center,new k),_=n.context;e.uniformMap=Pn({u_modelView2D:function(){return k.multiplyTransformation(_.uniformState.view,m,hwe)}},e.uniformMap)}},pwe=new f,mwe=new f,Y9=new f,Twe=q9,tg={name:"SkinningPipelineStage",FUNCTION_ID_GET_SKINNING_MATRIX:"getSkinningMatrix",FUNCTION_SIGNATURE_GET_SKINNING_MATRIX:"mat4 getSkinningMatrix()",process:function(e,t){const n=e.shaderBuilder;n.addDefine("HAS_SKINNING",void 0,Ee.VERTEX),function Cwe(e,t){e.addFunction(tg.FUNCTION_ID_GET_SKINNING_MATRIX,tg.FUNCTION_SIGNATURE_GET_SKINNING_MATRIX,Ee.VERTEX);let i,o;e.addFunctionLines(tg.FUNCTION_ID_GET_SKINNING_MATRIX,["mat4 skinnedMatrix = mat4(0);"]);const r=["x","y","z","w"],s=function xwe(e){let t=-1;const n=e.attributes,i=n.length;for(let o=0;o<i;o++){const r=n[o];(r.semantic===ln.JOINTS||r.semantic===ln.WEIGHTS)&&(t=Math.max(t,r.setIndex))}return t}(t);for(i=0;i<=s;i++)for(o=0;o<=3;o++){const l=r[o];e.addFunctionLines(tg.FUNCTION_ID_GET_SKINNING_MATRIX,[`skinnedMatrix += a_weights_${i}.${l} * u_jointMatrices[int(a_joints_${i}.${l})];`])}e.addFunctionLines(tg.FUNCTION_ID_GET_SKINNING_MATRIX,["return skinnedMatrix;"])}(n,t);const i=e.runtimeNode;n.addUniform("mat4",`u_jointMatrices[${i.computedJointMatrices.length}]`,Ee.VERTEX),n.addVertexLines("void skinningStage(inout ProcessedAttributes attributes) \n{\n mat4 skinningMatrix = getSkinningMatrix();\n mat3 skinningMatrixMat3 = mat3(skinningMatrix);\n\n vec4 positionMC = vec4(attributes.positionMC, 1.0);\n attributes.positionMC = vec3(skinningMatrix * positionMC);\n\n #ifdef HAS_NORMALS\n vec3 normalMC = attributes.normalMC;\n attributes.normalMC = skinningMatrixMat3 * normalMC;\n #endif\n\n #ifdef HAS_TANGENTS\n vec3 tangentMC = attributes.tangentMC;\n attributes.tangentMC = skinningMatrixMat3 * tangentMC;\n #endif\n}"),e.uniformMap=Pn({u_jointMatrices:function(){return i.computedJointMatrices}},e.uniformMap)}},Ewe=tg,X9={name:"VerticalExaggerationPipelineStage"},Swe=new V;X9.process=function(e,t,n){const{shaderBuilder:i,uniformMap:o}=e;i.addVertexLines("void verticalExaggerationStage(\n inout ProcessedAttributes attributes\n) {\n // Compute the distance from the camera to the local center of curvature.\n vec4 vertexPositionENU = czm_modelToEnu * vec4(attributes.positionMC, 1.0);\n vec2 vertexAzimuth = normalize(vertexPositionENU.xy);\n // Curvature = 1 / radius of curvature.\n float azimuthalCurvature = dot(vertexAzimuth * vertexAzimuth, czm_eyeEllipsoidCurvature);\n float eyeToCenter = 1.0 / azimuthalCurvature + czm_eyeHeight;\n\n // Compute the approximate ellipsoid normal at the vertex position.\n // Uses a circular approximation for the Earth curvature along the geodesic.\n vec3 vertexPositionEC = (czm_modelView * vec4(attributes.positionMC, 1.0)).xyz;\n vec3 centerToVertex = eyeToCenter * czm_eyeEllipsoidNormalEC + vertexPositionEC;\n vec3 vertexNormal = normalize(centerToVertex);\n\n // Estimate the (sine of the) angle between the camera direction and the vertex normal\n float verticalDistance = dot(vertexPositionEC, czm_eyeEllipsoidNormalEC);\n float horizontalDistance = length(vertexPositionEC - verticalDistance * czm_eyeEllipsoidNormalEC);\n float sinTheta = horizontalDistance / (eyeToCenter + verticalDistance);\n bool isSmallAngle = clamp(sinTheta, 0.0, 0.05) == sinTheta;\n\n // Approximate the change in height above the ellipsoid, from camera to vertex position.\n float exactVersine = 1.0 - dot(czm_eyeEllipsoidNormalEC, vertexNormal);\n float smallAngleVersine = 0.5 * sinTheta * sinTheta;\n float versine = isSmallAngle ? smallAngleVersine : exactVersine;\n float dHeight = dot(vertexPositionEC, vertexNormal) - eyeToCenter * versine;\n float vertexHeight = czm_eyeHeight + dHeight;\n\n // Transform the approximate vertex normal to model coordinates.\n vec3 vertexNormalMC = (czm_inverseModelView * vec4(vertexNormal, 0.0)).xyz;\n vertexNormalMC = normalize(vertexNormalMC);\n\n // Compute the exaggeration and apply it along the approximate vertex normal.\n float stretch = u_verticalExaggerationAndRelativeHeight.x;\n float shift = u_verticalExaggerationAndRelativeHeight.y;\n float exaggeration = (vertexHeight - shift) * (stretch - 1.0);\n attributes.positionMC += exaggeration * vertexNormalMC;\n}\n"),i.addDefine("HAS_VERTICAL_EXAGGERATION",void 0,Ee.VERTEX),i.addUniform("vec2","u_verticalExaggerationAndRelativeHeight",Ee.VERTEX),o.u_verticalExaggerationAndRelativeHeight=function(){return V.fromElements(n.verticalExaggeration,n.verticalExaggerationRelativeHeight,Swe)}};const vwe=X9,TN={createWireframeIndices:function(e,t,n){const i=c(n);return e===Tt.TRIANGLES?i?function Dwe(e,t){const n=t.length,i=Ot.createTypedArray(e,2*n);let o=0;for(let r=0;r<n;r+=3){const s=t[r],a=t[r+1],l=t[r+2];i[o++]=s,i[o++]=a,i[o++]=a,i[o++]=l,i[o++]=l,i[o++]=s}return i}(t,n):function Iwe(e){const t=Ot.createTypedArray(e,2*e),n=e;let i=0;for(let o=0;o<n;o+=3)t[i++]=o,t[i++]=o+1,t[i++]=o+1,t[i++]=o+2,t[i++]=o+2,t[i++]=o;return t}(t):e===Tt.TRIANGLE_STRIP?i?function Owe(e,t){const i=t.length-2,r=Ot.createTypedArray(e,2+4*i);let s=0;r[s++]=t[0],r[s++]=t[1];for(let a=0;a<i;a++){const l=t[a],d=t[a+2];r[s++]=t[a+1],r[s++]=d,r[s++]=d,r[s++]=l}return r}(t,n):function Pwe(e){const t=e-2,i=Ot.createTypedArray(e,2+4*t);let o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=r;return i}(t):e===Tt.TRIANGLE_FAN?i?function Lwe(e,t){const i=t.length-2,r=Ot.createTypedArray(e,2+4*i);let s=0;const a=t[0];r[s++]=a,r[s++]=t[1];for(let l=0;l<i;l++){const d=t[l+2];r[s++]=t[l+1],r[s++]=d,r[s++]=d,r[s++]=a}return r}(t,n):function Rwe(e){const t=e-2,i=Ot.createTypedArray(e,2+4*t);let o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=0;return i}(t):void 0},getWireframeIndicesCount:function(e,t){return e===Tt.TRIANGLES?2*t:e===Tt.TRIANGLE_STRIP||e===Tt.TRIANGLE_FAN?2+4*(t-2):t}},Z9=TN,$9={name:"WireframePipelineStage",process:function(e,t,n){e.shaderBuilder.addDefine("HAS_WIREFRAME",void 0,Ee.FRAGMENT);const o=e.model,r=function Nwe(e,t,n){const o=ti.getAttributeBySemantic(e,ln.POSITION).count,r=n.context.webgl2;let s;if(c(t)){const d=t.buffer,h=t.count;c(d)&&r?(s=d.sizeInBytes===h?new Uint8Array(h):Ot.createTypedArray(o,h),d.getBufferData(s)):s=t.typedArray}const l=Z9.createWireframeIndices(e.primitiveType,o,s),u=Ot.fromSizeInBytes(l.BYTES_PER_ELEMENT);return yn.createIndexBuffer({context:n.context,typedArray:l,usage:At.STATIC_DRAW,indexDatatype:u})}(t,e.indices,n);o._pipelineResources.push(r),e.wireframeIndexBuffer=r,o.statistics.addBuffer(r,!1);const a=e.primitiveType,l=e.count;e.primitiveType=Tt.LINES,e.count=Z9.getWireframeIndicesCount(a,l)}},Mwe=$9;function K9(e){const t=(e=g(e,g.EMPTY_OBJECT)).primitive,n=e.node,i=e.model;A.typeOf.object("options.primitive",t),A.typeOf.object("options.node",n),A.typeOf.object("options.model",i),this.primitive=t,this.node=n,this.model=i,this.pipelineStages=[],this.drawCommand=void 0,this.boundingSphere=void 0,this.boundingSphere2D=void 0,this.positionBuffer2D=void 0,this.batchLengths=void 0,this.batchOffsets=void 0,this.updateStages=[]}K9.prototype.configurePipeline=function(e){const t=this.pipelineStages;t.length=0;const n=this.primitive,i=this.node,o=this.model,r=o.customShader,s=o.style,a=e.context.webgl2,u=e.mode!==ce.SCENE3D&&!e.scene3DOnly&&o._projectTo2D,d=1!==e.verticalExaggeration,h=c(n.morphTargets)&&n.morphTargets.length>0,m=c(i.skin),_=c(r),y=!(_&&c(r.fragmentShaderText))||r.mode!==fN.REPLACE_MATERIAL,b=ti.hasQuantizedAttributes(n.attributes),x=o.debugWireframe&&Tt.isTriangles(n.primitiveType)&&(o._enableDebugWireframe||a),C=o.pointCloudShading,w=c(C)&&C.attenuation,v=c(C)&&C.backFaceCulling,I=n.primitiveType===Tt.POINTS&&(c(s)||w||v),P=o._enableShowOutline&&c(n.outlineCoordinates),N=function Fwe(e,t,n){let i;return c(t.instances)&&(i=ti.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),c(i))?{hasFeatureIds:!0,hasPropertyTable:c(i.propertyTableId)}:(i=ti.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),c(i)?{hasFeatureIds:!0,hasPropertyTable:c(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}(o,i,n),R=c(o.classificationType);u&&t.push(Twe),t.push(CEe),x&&t.push(Mwe),R&&t.push(mCe),h&&t.push(WEe),m&&t.push(Ewe),I&&t.push(owe),b&&t.push(cEe),y&&t.push(FEe),t.push(hN),t.push(eg),N.hasPropertyTable&&(t.push(mN),t.push(hCe),t.push(yCe)),d&&t.push(vwe),_&&t.push(iEe),t.push(wEe),o.allowPicking&&t.push(XEe),P&&t.push(awe),t.push(fCe),t.push(dwe)};const Bwe=K9;function AN(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.skin",e.skin),A.typeOf.object("options.sceneGraph",e.sceneGraph),this._sceneGraph=e.sceneGraph,this._skin=e.skin,this._inverseBindMatrices=void 0,this._joints=[],this._jointMatrices=[],function kwe(e){const t=e.skin,n=t.inverseBindMatrices;e._inverseBindMatrices=n;const i=t.joints,o=i.length,r=e.sceneGraph._runtimeNodes,s=e.joints,a=e._jointMatrices;for(let l=0;l<o;l++){const d=r[i[l].index];s.push(d);const m=Q9(d,n[l],new k);a.push(m)}}(this)}function Q9(e,t,n){const i=k.multiplyTransformation(e.transformToRoot,e.transform,n);return k.multiplyTransformation(i,t,n)}Object.defineProperties(AN.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}}}),AN.prototype.updateJointMatrices=function(){const e=this._jointMatrices,t=e.length;for(let n=0;n<t;n++)e[n]=Q9(this.joints[n],this.inverseBindMatrices[n],e[n])};const Uwe=AN,Vwe=function zwe(){this.pass=void 0,this.alphaCutoff=void 0};function xN(e){this.name=e,this.fields=[]}xN.prototype.addField=function(e,t){this.fields.push(` ${e} ${t};`)},xN.prototype.generateGlslLines=function(){let e=this.fields;return 0===e.length&&(e=[" float _empty;"]),[].concat(`struct ${this.name}`,"{",e,"};")};const Hwe=xN;function CN(e){this.signature=e,this.body=[]}CN.prototype.addLines=function(e){if("string"!=typeof e&&!Array.isArray(e))throw new E(`Expected lines to be a string or an array of strings, actual value was ${e}`);const t=this.body;if(Array.isArray(e)){const n=e.length;for(let i=0;i<n;i++)t.push(` ${e[i]}`)}else t.push(` ${e}`)},CN.prototype.generateGlslLines=function(){return[].concat(this.signature,"{",this.body,"}")};const Gwe=CN;function ic(){this._positionAttributeLine=void 0,this._nextAttributeLocation=1,this._attributeLocations={},this._attributeLines=[],this._structs={},this._functions={},this._vertexShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]},this._fragmentShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]}}Object.defineProperties(ic.prototype,{attributeLocations:{get:function(){return this._attributeLocations}}}),ic.prototype.addDefine=function(e,t,n){A.typeOf.string("identifier",e),n=g(n,Ee.BOTH);let i=e;c(t)&&(i+=` ${t.toString()}`),Ee.includesVertexShader(n)&&this._vertexShaderParts.defineLines.push(i),Ee.includesFragmentShader(n)&&this._fragmentShaderParts.defineLines.push(i)},ic.prototype.addStruct=function(e,t,n){A.typeOf.string("structId",e),A.typeOf.string("structName",t),A.typeOf.number("destination",n),this._structs[e]=new Hwe(t),Ee.includesVertexShader(n)&&this._vertexShaderParts.structIds.push(e),Ee.includesFragmentShader(n)&&this._fragmentShaderParts.structIds.push(e)},ic.prototype.addStructField=function(e,t,n){A.typeOf.string("structId",e),A.typeOf.string("type",t),A.typeOf.string("identifier",n),this._structs[e].addField(t,n)},ic.prototype.addFunction=function(e,t,n){A.typeOf.string("functionName",e),A.typeOf.string("signature",t),A.typeOf.number("destination",n),this._functions[e]=new Gwe(t),Ee.includesVertexShader(n)&&this._vertexShaderParts.functionIds.push(e),Ee.includesFragmentShader(n)&&this._fragmentShaderParts.functionIds.push(e)},ic.prototype.addFunctionLines=function(e,t){if(A.typeOf.string("functionName",e),"string"!=typeof t&&!Array.isArray(t))throw new E(`Expected lines to be a string or an array of strings, actual value was ${t}`);this._functions[e].addLines(t)},ic.prototype.addUniform=function(e,t,n){A.typeOf.string("type",e),A.typeOf.string("identifier",t),n=g(n,Ee.BOTH);const i=`uniform ${e} ${t};`;Ee.includesVertexShader(n)&&this._vertexShaderParts.uniformLines.push(i),Ee.includesFragmentShader(n)&&this._fragmentShaderParts.uniformLines.push(i)},ic.prototype.setPositionAttribute=function(e,t){if(A.typeOf.string("type",e),A.typeOf.string("identifier",t),c(this._positionAttributeLine))throw new E("setPositionAttribute() must be called exactly once for the attribute used for gl_Position. For other attributes, use addAttribute()");return this._positionAttributeLine=`in ${e} ${t};`,this._attributeLocations[t]=0,0},ic.prototype.addAttribute=function(e,t){A.typeOf.string("type",e),A.typeOf.string("identifier",t),this._attributeLines.push(`in ${e} ${t};`);const i=this._nextAttributeLocation;return this._attributeLocations[t]=i,this._nextAttributeLocation+=function Wwe(e){switch(e){case"mat2":return 2;case"mat3":return 3;case"mat4":return 4;default:return 1}}(e),i},ic.prototype.addVarying=function(e,t,n){A.typeOf.string("type",e),A.typeOf.string("identifier",t),n=c(n)?`${n} `:"";const i=`${e} ${t};`;this._vertexShaderParts.varyingLines.push(`${n}out ${i}`),this._fragmentShaderParts.varyingLines.push(`${n}in ${i}`)},ic.prototype.addVertexLines=function(e){if("string"!=typeof e&&!Array.isArray(e))throw new E(`Expected lines to be a string or an array of strings, actual value was ${e}`);const t=this._vertexShaderParts.shaderLines;Array.isArray(e)?t.push.apply(t,e):t.push(e)},ic.prototype.addFragmentLines=function(e){if("string"!=typeof e&&!Array.isArray(e))throw new E(`Expected lines to be a string or an array of strings, actual value was ${e}`);const t=this._fragmentShaderParts.shaderLines;Array.isArray(e)?t.push.apply(t,e):t.push(e)},ic.prototype.buildShaderProgram=function(e){A.typeOf.object("context",e);const t=c(this._positionAttributeLine)?[this._positionAttributeLine]:[],n=function jwe(e){const t=[],n=[];let i,r,s,a,o=e._vertexShaderParts.structIds;for(i=0;i<o.length;i++)r=o[i],s=e._structs[r],a=s.generateGlslLines(),t.push.apply(t,a);for(o=e._fragmentShaderParts.structIds,i=0;i<o.length;i++)r=o[i],s=e._structs[r],a=s.generateGlslLines(),n.push.apply(n,a);return{vertexLines:t,fragmentLines:n}}(this),i=function qwe(e){const t=[],n=[];let i,r,s,a,o=e._vertexShaderParts.functionIds;for(i=0;i<o.length;i++)r=o[i],s=e._functions[r],a=s.generateGlslLines(),t.push.apply(t,a);for(o=e._fragmentShaderParts.functionIds,i=0;i<o.length;i++)r=o[i],s=e._functions[r],a=s.generateGlslLines(),n.push.apply(n,a);return{vertexLines:t,fragmentLines:n}}(this),o=t.concat(this._attributeLines,this._vertexShaderParts.uniformLines,this._vertexShaderParts.varyingLines,n.vertexLines,i.vertexLines,this._vertexShaderParts.shaderLines).join("\n"),r=new St({defines:this._vertexShaderParts.defineLines,sources:[o]}),s=this._fragmentShaderParts.uniformLines.concat(this._fragmentShaderParts.varyingLines,n.fragmentLines,i.fragmentLines,this._fragmentShaderParts.shaderLines).join("\n"),a=new St({defines:this._fragmentShaderParts.defineLines,sources:[s]});return di.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:this._attributeLocations})},ic.prototype.clone=function(){return Rt(this,!0)};const J9=ic,Xwe=function Ywe(e){A.typeOf.object("model",e),this.shaderBuilder=new J9,this.model=e,this.uniformMap={},this.alphaOptions=new Vwe,this.renderStateOptions=Lt.getState(Lt.fromCache({depthTest:{enabled:!0,func:I_.LESS_OR_EQUAL}})),this.hasSilhouette=!1,this.hasSkipLevelOfDetail=!1},fv={name:"ModelSilhouettePipelineStage",silhouettesLength:0,process:function(e,t,n){c(t._silhouetteId)||(t._silhouetteId=++fv.silhouettesLength);const i=e.shaderBuilder;i.addDefine("HAS_SILHOUETTE",void 0,Ee.BOTH),i.addVertexLines("void silhouetteStage(in ProcessedAttributes attributes, inout vec4 positionClip) {\n #ifdef HAS_NORMALS\n if(model_silhouettePass) {\n vec3 normal = normalize(czm_normal3D * attributes.normalMC);\n normal.x *= czm_projection[0][0];\n normal.y *= czm_projection[1][1];\n positionClip.xy += normal.xy * positionClip.w * model_silhouetteSize * czm_pixelRatio / czm_viewport.z;\n }\n #endif\n}\n"),i.addFragmentLines("void silhouetteStage(inout vec4 color) {\n if(model_silhouettePass) {\n color = czm_gammaCorrect(model_silhouetteColor);\n }\n}"),i.addUniform("vec4","model_silhouetteColor",Ee.FRAGMENT),i.addUniform("float","model_silhouetteSize",Ee.VERTEX),i.addUniform("bool","model_silhouettePass",Ee.BOTH),e.uniformMap=Pn({model_silhouetteColor:function(){return t.silhouetteColor},model_silhouetteSize:function(){return t.silhouetteSize},model_silhouettePass:function(){return!1}},e.uniformMap),e.hasSilhouette=!0}},Kwe=fv,hv={name:"ModelSplitterPipelineStage",SPLIT_DIRECTION_UNIFORM_NAME:"model_splitDirection",process:function(e,t,n){const i=e.shaderBuilder;i.addDefine("HAS_MODEL_SPLITTER",void 0,Ee.FRAGMENT),i.addFragmentLines("void modelSplitterStage()\n{\n // Don't split when rendering the shadow map, because it is rendered from\n // the perspective of a totally different camera.\n#ifndef SHADOW_MAP\n if (model_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;\n if (model_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;\n#endif\n}\n");const o={};i.addUniform("float",hv.SPLIT_DIRECTION_UNIFORM_NAME,Ee.FRAGMENT),o[hv.SPLIT_DIRECTION_UNIFORM_NAME]=function(){return t.splitDirection},e.uniformMap=Pn(o,e.uniformMap)}},Jwe=hv,tSe=function eSe(e,t){A.typeOf.object("modelRenderResources",e),A.typeOf.object("runtimeNode",t),this.model=e.model,this.shaderBuilder=e.shaderBuilder.clone(),this.uniformMap=Rt(e.uniformMap),this.alphaOptions=Rt(e.alphaOptions),this.renderStateOptions=Rt(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},iSe=function nSe(e){e=g(e,g.EMPTY_OBJECT),this.lightingModel=g(e.lightingModel,dv.UNLIT)},rSe=function oSe(e,t){A.typeOf.object("nodeRenderResources",e),A.typeOf.object("runtimePrimitive",t),this.model=e.model,this.runtimeNode=e.runtimeNode,this.attributes=e.attributes.slice(),this.attributeIndex=e.attributeIndex,this.featureIdVertexAttributeSetIndex=e.featureIdVertexAttributeSetIndex,this.uniformMap=Rt(e.uniformMap),this.alphaOptions=Rt(e.alphaOptions),this.renderStateOptions=Rt(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.shaderBuilder=e.shaderBuilder.clone(),this.instanceCount=e.instanceCount,this.runtimePrimitive=t;const n=t.primitive;this.count=c(n.indices)?n.indices.count:ti.getAttributeBySemantic(n,"POSITION").count,this.hasPropertyTable=!1,this.indices=n.indices,this.wireframeIndexBuffer=void 0,this.primitiveType=n.primitiveType;const i=ti.getPositionMinMax(n,this.runtimeNode.instancingTranslationMin,this.runtimeNode.instancingTranslationMax);this.positionMin=f.clone(i.min,new f),this.positionMax=f.clone(i.max,new f),this.boundingSphere=Ae.fromCornerPoints(this.positionMin,this.positionMax,new Ae),this.lightingOptions=new iSe,this.pickId=void 0};function sl(e){const t=(e=g(e,g.EMPTY_OBJECT)).modelComponents;A.typeOf.object("options.model",e.model),A.typeOf.object("options.modelComponents",t),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=k.clone(k.IDENTITY),this._computedModelMatrix2D=k.clone(k.IDENTITY),this._axisCorrectionMatrix=ti.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new k),this._runtimeArticulations={},function sSe(e){const t=e._components,n=t.scene;e6(e,e._model.modelMatrix);const r=t.articulations,s=r.length,a=e._runtimeArticulations;for(let C=0;C<s;C++){const v=new Sxe({articulation:r[C],sceneGraph:e});a[v.name]=v}const l=t.nodes;e._runtimeNodes=new Array(l.length);const h=n.nodes.length,m=k.IDENTITY;for(let C=0;C<h;C++){const v=t6(e,n.nodes[C],m);e._rootNodes.push(v)}const _=t.skins,p=e._runtimeSkins,y=_.length;for(let C=0;C<y;C++)p.push(new Uwe({skin:_[C],sceneGraph:e}));const b=e._skinnedNodes,x=b.length;for(let C=0;C<x;C++){const w=b[C],v=e._runtimeNodes[w];v._runtimeSkin=p[l[w].skin.index],v.updateJointMatrices()}e.applyArticulations()}(this)}function e6(e,t){const i=e._model;e._computedModelMatrix=k.multiplyTransformation(t,e._components.transform,e._computedModelMatrix),e._computedModelMatrix=k.multiplyTransformation(e._computedModelMatrix,e._axisCorrectionMatrix,e._computedModelMatrix),e._computedModelMatrix=k.multiplyByUniformScale(e._computedModelMatrix,i.computedScale,e._computedModelMatrix)}Object.defineProperties(sl.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}}});const aSe=new f;function t6(e,t,n){const i=[],o=ti.getNodeTransform(t),r=t.children.length;for(let d=0;d<r;d++){const _=t6(e,t.children[d],k.multiplyTransformation(n,o,new k));i.push(_)}const s=new dCe({node:t,transform:o,transformToRoot:n,children:i,sceneGraph:e}),a=t.primitives.length;for(let d=0;d<a;d++)s.runtimePrimitives.push(new Bwe({primitive:t.primitives[d],node:t,model:e._model}));const l=t.index;e._runtimeNodes[l]=s,c(t.skin)&&e._skinnedNodes.push(l);const u=t.name;if(c(u)){const d=e._model,h=new Nxe(d,s);d._nodesByName[u]=h}return l}const lSe=new f,uSe=new f,dSe=new f,fSe=new f;function n6(e,t,n,i,o){if(n&&!t.show)return;const r=t.children.length;for(let l=0;l<r;l++)n6(e,t.getChild(l),n,i,o);const s=t.runtimePrimitives,a=s.length;for(let l=0;l<a;l++)i(s[l],o)}function pv(e,t,n,i){const o=e._rootNodes,r=o.length;for(let s=0;s<r;s++)n6(e,e._runtimeNodes[o[s]],t,n,i)}sl.prototype.buildDrawCommands=function(e){const t=this._model,n=new Xwe(t);t.statistics.clear(),this.configurePipeline(e);const i=this.modelPipelineStages;let o,r,s;for(o=0;o<i.length;o++)i[o].process(n,t,e);const a=f.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,lSe),l=f.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,uSe);for(o=0;o<this._runtimeNodes.length;o++){const u=this._runtimeNodes[o];if(!c(u))continue;u.configurePipeline();const d=u.pipelineStages,h=new tSe(n,u);for(r=0;r<d.length;r++)d[r].process(h,u.node,e);const m=u.computedTransform;for(r=0;r<u.runtimePrimitives.length;r++){const _=u.runtimePrimitives[r];_.configurePipeline(e);const p=_.pipelineStages,y=new rSe(h,_);for(s=0;s<p.length;s++)p[s].process(y,_.primitive,e);_.boundingSphere=Ae.clone(y.boundingSphere,new Ae);const b=k.multiplyByPoint(m,y.positionMin,dSe),x=k.multiplyByPoint(m,y.positionMax,fSe);f.minimumByComponent(a,b,a),f.maximumByComponent(l,x,l);const C=hxe(y,e);_.drawCommand=C}}this._boundingSphere=Ae.fromCornerPoints(a,l,new Ae),this._boundingSphere=Ae.transformWithoutScale(this._boundingSphere,this._axisCorrectionMatrix,this._boundingSphere),this._boundingSphere=Ae.transform(this._boundingSphere,this._components.transform,this._boundingSphere),t._boundingSphere=Ae.transform(this._boundingSphere,t.modelMatrix,t._boundingSphere),t._initialRadius=t._boundingSphere.radius,t._boundingSphere.radius*=t._clampedScale},sl.prototype.configurePipeline=function(e){const t=this.modelPipelineStages;t.length=0;const n=this._model,i=e.fog.enabled&&e.fog.renderable;c(n.color)&&t.push(rN),!c(n.classificationType)&&(n.imageBasedLighting.enabled&&t.push(bxe),n.isClippingEnabled()&&t.push(Pxe),n.isClippingPolygonsEnabled()&&t.push(Lxe),n.hasSilhouette(e)&&t.push(Kwe),c(n.splitDirection)&&n.splitDirection!==$_.NONE&&t.push(Jwe),Ia.is3DTiles(n.type)&&t.push(pxe),i&&t.push(gxe))},sl.prototype.update=function(e,t){let n,i,o;for(n=0;n<this._runtimeNodes.length;n++){const r=this._runtimeNodes[n];if(c(r)){for(i=0;i<r.updateStages.length;i++)r.updateStages[i].update(r,this,e);for(t&&!(e.mode!==ce.SCENE3D&&this._model._projectTo2D)&&this.updateJointMatrices(),i=0;i<r.runtimePrimitives.length;i++){const a=r.runtimePrimitives[i];for(o=0;o<a.updateStages.length;o++)a.updateStages[o].update(a,this)}}}},sl.prototype.updateModelMatrix=function(e,t){e6(this,e),t.mode!==ce.SCENE3D&&function cSe(e,t){const n=e._computedModelMatrix,i=k.getTranslation(n,aSe);if(f.equals(i,f.ZERO)){const r=In.ellipsoidTo2DModelMatrix(t.mapProjection,e.boundingSphere.center,e._computedModelMatrix2D);e._computedModelMatrix2D=k.multiply(r,n,e._computedModelMatrix2D)}else e._computedModelMatrix2D=In.basisTo2D(t.mapProjection,n,e._computedModelMatrix2D);e._boundingSphere2D=Ae.transform(e._boundingSphere,e._computedModelMatrix2D,e._boundingSphere2D)}(this,t);const n=this._rootNodes;for(let i=0;i<n.length;i++)this._runtimeNodes[n[i]]._transformDirty=!0},sl.prototype.updateJointMatrices=function(){const e=this._skinnedNodes,t=e.length;for(let n=0;n<t;n++)this._runtimeNodes[e[n]].updateJointMatrices()};const hSe={backFaceCulling:void 0};function pSe(e,t){e.drawCommand.backFaceCulling=t.backFaceCulling}sl.prototype.updateBackFaceCulling=function(e){const t=hSe;t.backFaceCulling=e,pv(this,!1,pSe,t)};const mSe={shadowMode:void 0};function _Se(e,t){e.drawCommand.shadows=t.shadowMode}sl.prototype.updateShadows=function(e){const t=mSe;t.shadowMode=e,pv(this,!1,_Se,t)};const gSe={debugShowBoundingVolume:void 0};function ySe(e,t){e.drawCommand.debugShowBoundingVolume=t.debugShowBoundingVolume}sl.prototype.updateShowBoundingVolume=function(e){const t=gSe;t.debugShowBoundingVolume=e,pv(this,!1,ySe,t)};const i6=[],bSe={frameState:void 0,hasSilhouette:void 0};function TSe(e,t){const n=t.frameState,i=t.hasSilhouette,o=n.passes,r=i6,s=e.drawCommand;s.pushCommands(n,n.commandList),i&&!o.pick&&s.pushSilhouetteCommands(n,r)}sl.prototype.pushDrawCommands=function(e){const t=i6;t.length=0;const n=bSe;n.hasSilhouette=this._model.hasSilhouette(e),n.frameState=e,pv(this,!0,TSe,n),e.commandList.push.apply(e.commandList,t)},sl.prototype.setArticulationStage=function(e,t){const n=e.split(" ");if(2!==n.length)return;const o=n[1],r=this._runtimeArticulations[n[0]];c(r)&&r.setArticulationStage(o,t)},sl.prototype.applyArticulations=function(){const e=this._runtimeArticulations;for(const t in e)e.hasOwnProperty(t)&&e[t].apply()};const ASe=sl;function ng(){this._array=[],this._hash={}}Object.defineProperties(ng.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}}),ng.prototype.contains=function(e){if("string"!=typeof e&&"number"!=typeof e)throw new E("key is required to be a string or number.");return c(this._hash[e])},ng.prototype.set=function(e,t){if("string"!=typeof e&&"number"!=typeof e)throw new E("key is required to be a string or number.");t!==this._hash[e]&&(this.remove(e),this._hash[e]=t,this._array.push(t))},ng.prototype.get=function(e){if("string"!=typeof e&&"number"!=typeof e)throw new E("key is required to be a string or number.");return this._hash[e]},ng.prototype.remove=function(e){if(c(e)&&"string"!=typeof e&&"number"!=typeof e)throw new E("key is required to be a string or number.");const t=this._hash[e],n=c(t);if(n){const i=this._array;i.splice(i.indexOf(t),1),delete this._hash[e]}return n},ng.prototype.removeAll=function(){const e=this._array;e.length>0&&(this._hash={},e.length=0)};const mn=ng;function H0(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdSet={},this._batchTextureIdMap=new mn}Object.defineProperties(H0.prototype,{batchTexturesByteLength:{get:function(){const e=this._batchTextureIdMap.length,t=this._batchTextureIdMap.values;let n=0;for(let i=0;i<e;i++)n+=t[i].byteLength;return n}}}),H0.prototype.clear=function(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdSet={},this._batchTextureIdMap.removeAll()},H0.prototype.addBuffer=function(e,t){A.typeOf.object("buffer",e),A.typeOf.bool("hasCpuCopy",t),this._bufferIdSet.hasOwnProperty(e._id)||(this.geometryByteLength+=e.sizeInBytes*(t?2:1)),this._bufferIdSet[e._id]=!0},H0.prototype.addTexture=function(e){A.typeOf.object("texture",e),this._textureIdSet.hasOwnProperty(e._id)||(this.texturesByteLength+=e.sizeInBytes),this._textureIdSet[e._id]=!0},H0.prototype.addBatchTexture=function(e){A.typeOf.object("batchTexture",e),this._batchTextureIdMap.contains(e._id)||this._batchTextureIdMap.set(e._id,e)};const xSe=H0,o6={},ig=Uint32Array.BYTES_PER_ELEMENT;o6.parse=function(e,t){t=g(t,0),A.defined("arrayBuffer",e);const n=new Uint8Array(e),i=new DataView(e),o=i.getUint32(t+=ig,!0);if(1!==o)throw new Pe(`Only Point Cloud tile version 1 is supported. Version ${o} is not.`);t+=ig;const r=i.getUint32(t+=ig,!0);if(0===r)throw new Pe("Feature table must have a byte length greater than zero");const s=i.getUint32(t+=ig,!0),a=i.getUint32(t+=ig,!0),l=i.getUint32(t+=ig,!0),u=Cc(n,t+=ig,r);t+=r;const d=new Uint8Array(e,t,s);let h,m;t+=s,a>0&&(h=Cc(n,t,a),t+=a,l>0&&(m=new Uint8Array(e,t,l),t+=l));const _=new nv(u,d),p=_.getGlobalProperty("POINTS_LENGTH");if(_.featuresLength=p,!c(p))throw new Pe("Feature table global property: POINTS_LENGTH must be defined");let y=_.getGlobalProperty("RTC_CENTER",ee.FLOAT,3);c(y)&&(y=f.unpack(y));const b=function CSe(e,t){const n=e.json;let i,o,r;const s=c(n.extensions)?n.extensions["3DTILES_draco_point_compression"]:void 0,a=c(t)&&c(t.extensions)?t.extensions["3DTILES_draco_point_compression"]:void 0;let l,u,d,h,m,_;if(c(a)&&(r=a.properties),c(s)){o=s.properties;const p=s.byteOffset,y=s.byteLength;if(!c(o)||!c(p)||!c(y))throw new Pe("Draco properties, byteOffset, and byteLength must be defined");i=e.buffer.slice(p,p+y),l=c(o.POSITION),u=c(o.RGB)||c(o.RGBA),d=c(o.NORMAL),h=c(o.BATCH_ID),m=c(o.RGBA)}return c(i)&&(_={buffer:i,featureTableProperties:o,batchTableProperties:r,properties:Pn(o,r),dequantizeInShader:!0}),{draco:_,hasPositions:l,hasColors:u,isTranslucent:m,hasNormals:d,hasBatchIds:h}}(_,h);if(b.rtcCenter=y,b.pointsLength=p,!b.hasPositions){const x=function ESe(e){const t=e.json;let n;if(c(t.POSITION))return n=e.getPropertyArray("POSITION",ee.FLOAT,3),{name:ln.POSITION,semantic:ln.POSITION,typedArray:n,isQuantized:!1,componentDatatype:ee.FLOAT,type:Wn.VEC3};if(c(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",ee.UNSIGNED_SHORT,3);const i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",ee.FLOAT,3);if(!c(i))throw new Pe("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const o=65535,r=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",ee.FLOAT,3);if(!c(r))throw new Pe("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:ln.POSITION,semantic:ln.POSITION,typedArray:n,isQuantized:!0,componentDatatype:ee.FLOAT,type:Wn.VEC3,quantizedRange:o,quantizedVolumeOffset:f.unpack(r),quantizedVolumeScale:f.unpack(i),quantizedComponentDatatype:ee.UNSIGNED_SHORT,quantizedType:Wn.VEC3}}}(_);b.positions=x,b.hasPositions=b.hasPositions||c(x)}if(!b.hasPositions)throw new Pe("Either POSITION or POSITION_QUANTIZED must be defined.");if(!b.hasNormals){const x=function SSe(e){const t=e.json;let n;return c(t.NORMAL)?(n=e.getPropertyArray("NORMAL",ee.FLOAT,3),{name:ln.NORMAL,semantic:ln.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:ee.FLOAT,type:Wn.VEC3}):c(t.NORMAL_OCT16P)?(n=e.getPropertyArray("NORMAL_OCT16P",ee.UNSIGNED_BYTE,2),{name:ln.NORMAL,semantic:ln.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:255,quantizedType:Wn.VEC2,quantizedComponentDatatype:ee.UNSIGNED_BYTE,componentDatatype:ee.FLOAT,type:Wn.VEC3}):void 0}(_);b.normals=x,b.hasNormals=b.hasNormals||c(x)}if(!b.hasColors){const x=function wSe(e){const t=e.json;let n;if(c(t.RGBA))return n=e.getPropertyArray("RGBA",ee.UNSIGNED_BYTE,4),{name:ln.COLOR,semantic:ln.COLOR,setIndex:0,typedArray:n,componentDatatype:ee.UNSIGNED_BYTE,type:Wn.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(c(t.RGB))return n=e.getPropertyArray("RGB",ee.UNSIGNED_BYTE,3),{name:"COLOR",semantic:ln.COLOR,setIndex:0,typedArray:n,componentDatatype:ee.UNSIGNED_BYTE,type:Wn.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(c(t.RGB565))return n=e.getPropertyArray("RGB565",ee.UNSIGNED_SHORT,1),{name:"COLOR",semantic:ln.COLOR,setIndex:0,typedArray:n,componentDatatype:ee.FLOAT,type:Wn.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(c(t.CONSTANT_RGBA)){const i=e.getGlobalProperty("CONSTANT_RGBA",ee.UNSIGNED_BYTE,4),o=i[3],r=Z.fromBytes(i[0],i[1],i[2],o);return{name:ln.COLOR,semantic:ln.COLOR,setIndex:0,constantColor:r,componentDatatype:ee.FLOAT,type:Wn.VEC4,isQuantized:!1,isTranslucent:o<255}}}(_);b.colors=x,b.hasColors=b.hasColors||c(x),b.hasConstantColor=c(b.constantColor),b.isTranslucent=c(x)&&x.isTranslucent}if(!b.hasBatchIds){const x=function vSe(e){if(c(e.json.BATCH_ID)){const n=e.getPropertyArray("BATCH_ID",ee.UNSIGNED_SHORT,1);return{name:ln.FEATURE_ID,semantic:ln.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:ee.fromTypedArray(n),type:Wn.SCALAR}}}(_);b.batchIds=x,b.hasBatchIds=b.hasBatchIds||c(x)}if(b.hasBatchIds){const x=_.getGlobalProperty("BATCH_LENGTH");if(!c(x))throw new Pe("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");b.batchLength=x}return c(m)&&(m=new Uint8Array(m),b.batchTableJson=h,b.batchTableBinary=m),b};const r6=o6,ISe=li.Components,DSe=li.Scene,PSe=li.Node,OSe=li.Primitive,RSe=li.Attribute,s6=li.Quantization,LSe=li.FeatureIdAttribute,NSe=li.Material,MSe=li.MetallicRoughness;function Xp(e){const t=(e=g(e,g.EMPTY_OBJECT)).arrayBuffer,n=g(e.byteOffset,0);A.typeOf.object("options.arrayBuffer",t),this._arrayBuffer=t,this._byteOffset=n,this._loadAttributesFor2D=g(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=rn.UNLOADED,this._buffers=[],this._components=void 0,this._transform=k.IDENTITY}function kSe(e){switch(e){case 1:return"SCALAR";case 2:return"VEC2";case 3:return"VEC3";case 4:return"VEC4";default:throw new E("componentsPerAttribute must be a number from 1-4")}}function USe(e){switch(e){case ie.BYTE:return"BYTE";case ie.UNSIGNED_BYTE:return"UNSIGNED_BYTE";case ie.SHORT:return"SHORT";case ie.UNSIGNED_SHORT:return"UNSIGNED_SHORT";case ie.INT:return"INT";case ie.UNSIGNED_INT:return"UNSIGNED_INT";case ie.DOUBLE:return"DOUBLE";case ie.FLOAT:return"FLOAT";default:throw new E("value is not a valid WebGL constant")}}function tx(e,t,n){let o,i=t.typedArray;if(t.octEncoded&&(o=new s6,o.octEncoded=t.octEncoded,o.octEncodedZXY=t.octEncodedZXY,o.normalizationRange=t.quantizedRange,o.type=t.quantizedType,o.componentDatatype=t.quantizedComponentDatatype),t.isQuantized){o=new s6;const a=t.quantizedRange;o.normalizationRange=a,o.quantizedVolumeOffset=f.ZERO;const l=t.quantizedVolumeScale;o.quantizedVolumeDimensions=l,o.quantizedVolumeStepSize=f.divideByScalar(l,a,new f),o.componentDatatype=t.quantizedComponentDatatype,o.type=t.quantizedType}const r=new RSe;if(r.name=t.name,r.semantic=t.semantic,r.setIndex=t.setIndex,r.componentDatatype=t.componentDatatype,r.type=t.type,r.normalized=g(t.normalized,!1),r.min=t.min,r.max=t.max,r.quantization=o,t.isRGB565&&(i=wi.decodeRGB565(i)),c(t.constantColor)){const a=new Array(4);r.constant=Z.pack(t.constantColor,a)}else{const a=yn.createVertexBuffer({typedArray:i,context:n,usage:At.STATIC_DRAW});a.vertexArrayDestroyable=!1,e._buffers.push(a),r.buffer=a}return r.semantic===ln.POSITION&&e._loadAttributesFor2D&&(r.typedArray=i),r}let a6,mv;c(Object.create)&&((Xp.prototype=Object.create(Ja.prototype)).constructor=Xp),Object.defineProperties(Xp.prototype,{cacheKey:{get:function(){}},components:{get:function(){return this._components}},transform:{get:function(){return this._transform}}}),Xp.prototype.load=function(){if(c(this._promise))return this._promise;this._parsedContent=r6.parse(this._arrayBuffer,this._byteOffset),this._state=rn.PROCESSING,this._promise=Promise.resolve(this)},Xp.prototype.process=function(e){if(c(this._error)){const t=this._error;throw this._error=void 0,t}if(this._state===rn.READY)return!0;if(this._state===rn.PROCESSING){if(c(this._decodePromise))return!1;this._decodePromise=function FSe(e,t){const i=e._parsedContent.draco;let o;if(o=c(i)?yR.decodePointCloud(i,t):Promise.resolve(),c(o))return e._decodePromise=o,o.then(function(r){if(!e.isDestroyed())return c(r)&&function BSe(e,t,n){e._state=rn.READY;const i=e._parsedContent;let o;if(c(n.POSITION)){if(o={name:"POSITION",semantic:ln.POSITION,typedArray:n.POSITION.array,componentDatatype:ee.FLOAT,type:Wn.VEC3,isQuantized:!1},c(n.POSITION.data.quantization)){const a=n.POSITION.data.quantization,l=a.range,u=f.fromElements(l,l,l),d=f.unpack(a.minValues),h=(1<<a.quantizationBits)-1;o.isQuantized=!0,o.quantizedRange=h,o.quantizedVolumeOffset=d,o.quantizedVolumeScale=u,o.quantizedComponentDatatype=h<=255?ee.UNSIGNED_BYTE:ee.UNSIGNED_SHORT,o.quantizedType=Wn.VEC3}i.positions=o}if(c(n.NORMAL)&&(o={name:"NORMAL",semantic:ln.NORMAL,typedArray:n.NORMAL.array,componentDatatype:ee.FLOAT,type:Wn.VEC3,isQuantized:!1,octEncoded:!1,octEncodedZXY:!1},c(n.NORMAL.data.quantization)&&(o.quantizedRange=(1<<n.NORMAL.data.quantization.quantizationBits)-1,o.octEncoded=!0,o.octEncodedZXY=!0,o.quantizedComponentDatatype=ee.UNSIGNED_BYTE,o.quantizedType=Wn.VEC2),i.normals=o),c(n.RGBA)?i.colors={name:"COLOR",semantic:ln.COLOR,setIndex:0,typedArray:n.RGBA.array,componentDatatype:ee.UNSIGNED_BYTE,type:Wn.VEC4,normalized:!0,isTranslucent:!0}:c(n.RGB)&&(i.colors={name:"COLOR",semantic:ln.COLOR,setIndex:0,typedArray:n.RGB.array,componentDatatype:ee.UNSIGNED_BYTE,type:Wn.VEC3,normalized:!0,isTranslucent:!1}),c(n.BATCH_ID)){const a=n.BATCH_ID.array;i.batchIds={name:"_FEATURE_ID",semantic:ln.FEATURE_ID,setIndex:0,typedArray:a,componentDatatype:ee.fromTypedArray(a),type:Wn.SCALAR}}let r=i.batchTableJson;const s=t.batchTableProperties;for(const a in s)if(s.hasOwnProperty(a)){const l=n[a];c(r)||(r={}),i.hasDracoBatchTable=!0;const u=l.data;r[a]={byteOffset:u.byteOffset,type:kSe(u.componentsPerAttribute),componentType:USe(u.componentDatatype),typedArray:l.array}}i.batchTableJson=r}(e,i,r),function XSe(e,t){const n=e._parsedContent,i=new MSe;i.metallicFactor=0,i.roughnessFactor=.9;const o=new NSe;o.metallicRoughness=i;const r=n.colors;c(r)&&r.isTranslucent&&(o.alphaMode=IS.BLEND);const s=!c(n.normals);o.unlit=s;const a=new OSe;if(a.attributes=function qSe(e,t,n){const i=[];let o;const r=t.positions;return c(r)&&(function jSe(e){const t=e.typedArray,i=t.length/3,o=Math.min(i,20),r=function zSe(e){if(!c(mv)){a6=new Ny(0),mv=new Array(e);for(let t=0;t<e;++t)mv[t]=a6.random()}return mv}(20),s=Number.MAX_VALUE,a=-Number.MAX_VALUE;let d,h,m,l=f.fromElements(s,s,s,VSe),u=f.fromElements(a,a,a,HSe);if(e.isQuantized)l=f.ZERO,u=e.quantizedVolumeScale;else for(d=0;d<o;++d)h=Math.floor(r[d]*i),m=f.unpack(t,3*h,GSe),f.minimumByComponent(l,m,l),f.maximumByComponent(u,m,u);e.min=f.clone(l),e.max=f.clone(u)}(r),o=tx(e,r,n),o.count=t.pointsLength,i.push(o)),c(t.normals)&&(o=tx(e,t.normals,n),i.push(o)),c(t.colors)?(o=tx(e,t.colors,n),i.push(o)):(o=tx(e,WSe,n),i.push(o)),c(t.batchIds)&&(o=tx(e,t.batchIds,n),i.push(o)),i}(e,n,t),a.primitiveType=Tt.POINTS,a.material=o,c(n.batchIds)){const _=new LSe;_.propertyTableId=0,_.setIndex=0,_.positionalLabel="featureId_0",a.featureIds.push(_)}const l=new PSe;l.index=0,l.primitives=[a];const u=new DSe;u.nodes=[l],u.upAxis=Ms.Z,u.forwardAxis=Ms.X;const d=new ISe;d.scene=u,d.nodes=[l];const h=[];d.structuralMetadata=function YSe(e,t){const n=e.batchLength,i=e.pointsLength,o=e.batchTableBinary,r=!c(e.batchIds);if(c(o)||e.hasDracoBatchTable){const s=g(n,i);return YL({count:s,batchTable:e.batchTableJson,binaryBody:o,parseAsPropertyAttributes:r,customAttributeOutput:t})}return new q_({schema:{},propertyTables:[]})}(n,h),h.length>0&&function ZSe(e,t,n,i){const o=t.attributes,r=n.length;for(let s=0;s<r;s++){const a=n[s],l=yn.createVertexBuffer({typedArray:a.typedArray,context:i,usage:At.STATIC_DRAW});l.vertexArrayDestroyable=!1,e._buffers.push(l),a.buffer=l,a.typedArray=void 0,o.push(a)}t.propertyAttributeIds=[0]}(e,a,h,t),c(n.rtcCenter)&&(d.transform=k.multiplyByTranslation(d.transform,n.rtcCenter,d.transform));const m=n.positions;c(m)&&m.isQuantized&&(d.transform=k.multiplyByTranslation(d.transform,m.quantizedVolumeOffset,d.transform)),e._components=d,e._parsedContent=void 0,e._arrayBuffer=void 0}(e,t),e._state=rn.READY,e}).catch(function(r){e.unload(),e._state=rn.FAILED,e._error=e.getError("Failed to load Draco pnts",r)})}(this,e.context)}return!1};const VSe=new f,HSe=new f,GSe=new f,WSe={name:ln.COLOR,semantic:ln.COLOR,setIndex:0,constantColor:Z.DARKGRAY,componentDatatype:ee.FLOAT,type:Wn.VEC4,isQuantized:!1,isTranslucent:!1};Xp.prototype.unload=function(){const e=this._buffers;for(let t=0;t<e.length;t++)e[t].destroy();e.length=0,this._components=void 0,this._parsedContent=void 0,this._arrayBuffer=void 0};const $Se=Xp,KSe=new f,QSe=new f,JSe=new f,eve=new k,tve=new k,nve=new k,ive=new Ce,ove=new Ae;function EN(e,t,n,i,o,r,s,a,l,u){const d=n+t*i;if(u.x=e[d],u.y=e[d+1],u.z=e[d+2],c(o))if(o.octEncoded){if(u=wi.octDecodeInRange(u,o.normalizationRange,u),o.octEncodedZXY){const h=u.x;u.x=u.z,u.z=u.y,u.y=h}}else u=f.multiplyComponents(u,o.quantizedVolumeStepSize,u),u=f.add(u,o.quantizedVolumeOffset,u);return u=k.multiplyByPoint(r,u,u),1!==s&&Ec.getPosition(u,l,s,a,u),u}function no(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.loader",e.loader),A.typeOf.object("options.resource",e.resource),this._loader=e.loader,this._resource=e.resource,this.type=g(e.type,Ia.GLTF),this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this._modelMatrix=k.clone(this.modelMatrix),this._scale=g(e.scale,1),this._minimumPixelSize=g(e.minimumPixelSize,0),this._maximumScale=e.maximumScale,this._clampedScale=c(this._maximumScale)?Math.min(this._scale,this._maximumScale):this._scale,this._computedScale=this._clampedScale,this._updateModelMatrix=!1,this.referenceMatrix=void 0,this._iblReferenceFrameMatrix=oe.clone(oe.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 FAe(this),this._clampAnimations=g(e.clampAnimations,!0),this._userAnimationDirty=!1,this._id=e.id,this._idDirty=!1,this._color=Z.clone(e.color),this._colorBlendMode=g(e.colorBlendMode,XS.HIGHLIGHT),this._colorBlendAmount=g(e.colorBlendAmount,.5);const t=g(e.silhouetteColor,Z.RED);this._silhouetteColor=Z.clone(t),this._silhouetteSize=g(e.silhouetteSize,0),this._silhouetteDirty=!1,this._silhouetteId=void 0,this._cull=g(e.cull,!0),this._opaquePass=g(e.opaquePass,Ue.OPAQUE),this._allowPicking=g(e.allowPicking,!0),this._show=g(e.show,!0),this._style=void 0,this._styleDirty=!1,this._styleCommandsNeeded=void 0;let n=g(e.featureIdLabel,"featureId_0");"number"==typeof n&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=g(e.instanceFeatureIdLabel,"instanceFeatureId_0");"number"==typeof i&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i,this._featureTables=[],this._featureTableId=void 0,this._featureTableIdDirty=!0,this._pipelineResources=[],this._modelResources=[],this._pickIds=[],this._boundingSphere=new Ae,this._initialRadius=void 0,this._heightReference=g(e.heightReference,tn.NONE),this._heightDirty=this._heightReference!==tn.NONE,this._removeUpdateHeightCallback=void 0,this._verticalExaggerationOn=!1,this._clampedModelMatrix=void 0;const o=e.scene;c(o)&&c(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener(()=>{this._heightDirty=!0})),this._scene=o,this._distanceDisplayCondition=e.distanceDisplayCondition;const r=new ev(e.pointCloudShading);this._pointCloudShading=r,this._attenuation=r.attenuation,this._pointCloudBackFaceCulling=r.backFaceCulling;const s=e.clippingPlanes;c(s)&&void 0===s.owner?Gu.setOwner(s,this,"_clippingPlanes"):this._clippingPlanes=s,this._clippingPlanesState=0,this._clippingPlanesMatrix=k.clone(k.IDENTITY);const a=e.clippingPolygons;c(a)&&void 0===a.owner?zA.setOwner(a,this,"_clippingPolygons"):this._clippingPolygons=a,this._clippingPolygonsState=0,this._lightColor=f.clone(e.lightColor),this._imageBasedLighting=c(e.imageBasedLighting)?e.imageBasedLighting:new Q4,this._shouldDestroyImageBasedLighting=!c(e.imageBasedLighting),this._backFaceCulling=g(e.backFaceCulling,!0),this._backFaceCullingDirty=!1,this._shadows=g(e.shadows,Ko.ENABLED),this._shadowsDirty=!1,this._debugShowBoundingVolumeDirty=!1,this._debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this._enableDebugWireframe=g(e.enableDebugWireframe,!1),this._enableShowOutline=g(e.enableShowOutline,!0),this._debugWireframe=g(e.debugWireframe,!1),!0===this._debugWireframe&&!1===this._enableDebugWireframe&&this.type===Ia.GLTF&&_n("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltf, otherwise debugWireframe will be ignored.");let l=e.credit;"string"==typeof l&&(l=new Yn(l)),this._credits=[],this._credit=l,this._resourceCredits=[],this._gltfCredits=[],this._showCreditsOnScreen=g(e.showCreditsOnScreen,!1),this._showCreditsOnScreenDirty=!0,this._splitDirection=g(e.splitDirection,$_.NONE),this._enableShowOutline=g(e.enableShowOutline,!0),this.showOutline=g(e.showOutline,!0),this.outlineColor=g(e.outlineColor,Z.BLACK),this._classificationType=e.classificationType,this._statistics=new xSe,this._sceneMode=void 0,this._projectTo2D=g(e.projectTo2D,!1),this._enablePick=g(e.enablePick,!1),this._fogRenderable=void 0,this._skipLevelOfDetail=!1,this._ignoreCommands=g(e.ignoreCommands,!1),this._errorEvent=new Ye,this._readyEvent=new Ye,this._texturesReadyEvent=new Ye,this._sceneGraph=void 0,this._nodesByName={},this.pickObject=e.pickObject}function wN(e,t){e._errorEvent.numberOfListeners>0?e._errorEvent.raiseEvent(t):console.log(t)}function SN(e,t){if(!c(e)&&!c(t))return!1;if(c(e)!==c(t))return!0;const n=e.alpha,i=t.alpha;return Math.floor(n)!==Math.floor(i)||Math.ceil(n)!==Math.ceil(i)}Object.defineProperties(no.prototype,{ready:{get:function(){return this._ready}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},incrementallyLoadTextures:{get:function(){return g(this._loader.incrementallyLoadTextures,!1)}},texturesReadyEvent:{get:function(){return this._texturesReadyEvent}},loader:{get:function(){return this._loader}},statistics:{get:function(){return this._statistics}},activeAnimations:{get:function(){return this._activeAnimations}},clampAnimations:{get:function(){return this._clampAnimations},set:function(e){this._clampAnimations=e}},cull:{get:function(){return this._cull}},opaquePass:{get:function(){return this._opaquePass}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){A.defined("pointCloudShading",e),e!==this._pointCloudShading&&this.resetDrawCommands(),this._pointCloudShading=e}},customShader:{get:function(){return this._customShader},set:function(e){e!==this._customShader&&this.resetDrawCommands(),this._customShader=e}},sceneGraph:{get:function(){return this._sceneGraph}},content:{get:function(){return this._content}},heightReference:{get:function(){return this._heightReference},set:function(e){e!==this._heightReference&&(this._heightDirty=!0),this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far must be greater than near");this._distanceDisplayCondition=Qn.clone(e,this._distanceDisplayCondition)}},structuralMetadata:{get:function(){return this._sceneGraph.components.structuralMetadata}},featureTableId:{get:function(){return this._featureTableId},set:function(e){this._featureTableId=e}},featureTables:{get:function(){return this._featureTables},set:function(e){this._featureTables=e}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._idDirty=!0),this._id=e}},allowPicking:{get:function(){return this._allowPicking}},style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}},color:{get:function(){return this._color},set:function(e){SN(e,this._color)&&this.resetDrawCommands(),this._color=Z.clone(e,this._color)}},colorBlendMode:{get:function(){return this._colorBlendMode},set:function(e){this._colorBlendMode=e}},colorBlendAmount:{get:function(){return this._colorBlendAmount},set:function(e){this._colorBlendAmount=e}},silhouetteColor:{get:function(){return this._silhouetteColor},set:function(e){if(!Z.equals(e,this._silhouetteColor)){const t=SN(e,this._silhouetteColor);this._silhouetteDirty=this._silhouetteDirty||t}this._silhouetteColor=Z.clone(e,this._silhouetteColor)}},silhouetteSize:{get:function(){return this._silhouetteSize},set:function(e){if(e!==this._silhouetteSize){const t=this._silhouetteSize,n=e>0&&0===t||0===e&&t>0;this._silhouetteDirty=this._silhouetteDirty||n,this._backFaceCullingDirty=this._backFaceCullingDirty||n}this._silhouetteSize=e}},boundingSphere:{get:function(){if(!this._ready)throw new E("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");return l6(this,c(this._clampedModelMatrix)?this._clampedModelMatrix:this.modelMatrix),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,!0===this._debugWireframe&&!1===this._enableDebugWireframe&&this.type===Ia.GLTF&&_n("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){"number"==typeof e&&(e=`featureId_${e}`),A.typeOf.string("value",e),e!==this._featureIdLabel&&(this._featureTableIdDirty=!0),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){"number"==typeof e&&(e=`instanceFeatureId_${e}`),A.typeOf.string("value",e),e!==this._instanceFeatureIdLabel&&(this._featureTableIdDirty=!0),this._instanceFeatureIdLabel=e}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&(Gu.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){e!==this._clippingPolygons&&(zA.setOwner(e,this,"_clippingPolygons"),this.resetDrawCommands())}},lightColor:{get:function(){return this._lightColor},set:function(e){c(e)!==c(this._lightColor)&&this.resetDrawCommands(),this._lightColor=f.clone(e,this._lightColor)}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){A.typeOf.object("imageBasedLighting",this._imageBasedLighting),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}}}),no.prototype.getNode=function(e){if(!this._ready)throw new E("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");return A.typeOf.string("name",e),this._nodesByName[e]},no.prototype.setArticulationStage=function(e,t){if(A.typeOf.number("value",t),!this._ready)throw new E("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");this._sceneGraph.setArticulationStage(e,t)},no.prototype.applyArticulations=function(){if(!this._ready)throw new E("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");this._sceneGraph.applyArticulations()},no.prototype.makeStyleDirty=function(){this._styleDirty=!0},no.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};const cve=new k,lve=new oe,uve=new k;function c6(e){const t=e.featureTables[e.featureTableId];e._styleCommandsNeeded=$A.getStyleCommandsNeeded(t.featuresLength,t.batchTexture.translucentFeaturesLength)}no.prototype.update=function(e){let t=!1;try{t=function dve(e,t){return!(!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded)||(t.afterRender.push(()=>!0),e._loader.process(t))}(this,e)}catch(n){wN(this,this._loader.incrementallyLoadTextures||"TextureError"!==n.name?ti.getError("model",this._resource,n):n)}if(function fve(e,t){c(e._customShader)&&e._customShader.update(t)}(this,e),function hve(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;const n=this._loader.components;if(!c(n)){if(this._loader.isUnloaded())return;const r=ti.getError("model",this._resource,new Pe("Failed to load model."));wN(r),this._rejectLoad=this._rejectLoad&&this._rejectLoad(r)}const i=n.structuralMetadata;c(i)&&i.propertyTableCount>0&&function sve(e,t){const n=e._featureTables,i=t.propertyTables,o=i.length;for(let r=0;r<o;r++){const a=new zAe({model:e,propertyTable:i[r]});n.push(a)}}(this,i);const o=new ASe({model:this,modelComponents:n});this._sceneGraph=o,this._gltfCredits=o.components.asset.credits}if(this._resourcesLoaded&&e.mode!==ce.MORPHING){if(function pve(e){if(!e._featureTableIdDirty)return;e._featureTableIdDirty=!1;const t=e._sceneGraph.components,n=t.structuralMetadata;c(n)&&n.propertyTableCount>0&&(e.featureTableId=function ave(e,t){const n=t._featureIdLabel,i=t._instanceFeatureIdLabel;let o,r,s,a;for(o=0;o<e.nodes.length;o++)if(a=e.nodes[o],c(a.instances)&&(s=ti.getFeatureIdsByLabel(a.instances.featureIds,i),c(s)&&c(s.propertyTableId)))return s.propertyTableId;for(o=0;o<e.nodes.length;o++)for(a=e.nodes[o],r=0;r<a.primitives.length;r++){const u=ti.getFeatureIdsByLabel(a.primitives[r].featureIds,n);if(c(u))return u.propertyTableId}if(1===t._featureTables.length)return 0}(t,e),e._styleDirty=!0,e.resetDrawCommands())}(this),function mve(e){e._styleDirty&&(e.applyStyle(e._style),e._styleDirty=!1)}(this),function _ve(e,t){const n=e._featureTables,i=n.length;let o=!1;for(let r=0;r<i;r++)n[r].update(t),n[r].styleCommandsNeededDirty&&(o=!0);o&&c6(e)}(this,e),function gve(e){const t=e.pointCloudShading;t.attenuation!==e._attenuation&&(e.resetDrawCommands(),e._attenuation=t.attenuation),t.backFaceCulling!==e._pointCloudBackFaceCulling&&(e.resetDrawCommands(),e._pointCloudBackFaceCulling=t.backFaceCulling)}(this),function yve(e,t){e._silhouetteDirty&&(d6(t)&&e.resetDrawCommands(),e._silhouetteDirty=!1)}(this,e),function bve(e,t){const n=e.hasSkipLevelOfDetail(t);n!==e._skipLevelOfDetail&&(e.resetDrawCommands(),e._skipLevelOfDetail=n)}(this,e),function Tve(e,t){let n=0;e.isClippingEnabled()&&(e._clippingPlanes.owner===e&&e._clippingPlanes.update(t),n=e._clippingPlanes.clippingPlanesState),n!==e._clippingPlanesState&&(e.resetDrawCommands(),e._clippingPlanesState=n)}(this,e),function Ave(e,t){let n=0;e.isClippingPolygonsEnabled()&&(e._clippingPolygons.owner===e&&(e._clippingPolygons.update(t),e._clippingPolygons.queueCommands(t)),n=e._clippingPolygons.clippingPolygonsState),n!==e._clippingPolygonsState&&(e.resetDrawCommands(),e._clippingPolygonsState=n)}(this,e),function xve(e,t){t.mode!==e._sceneMode&&(e._projectTo2D?e.resetDrawCommands():e._updateModelMatrix=!0,e._sceneMode=t.mode)}(this,e),function Cve(e,t){const n=t.fog.enabled&&t.fog.renderable;n!==e._fogRenderable&&(e.resetDrawCommands(),e._fogRenderable=n)}(this,e),function Eve(e,t){const n=1!==t.verticalExaggeration;e._verticalExaggerationOn!==n&&(e.resetDrawCommands(),e._verticalExaggerationOn=n)}(this,e),this._defaultTexture=e.context.defaultTexture,function wve(e,t){e._drawCommandsBuilt||(e.destroyPipelineResources(),e._sceneGraph.buildDrawCommands(t),e._drawCommandsBuilt=!0)}(this,e),function Sve(e,t){if(!k.equals(e.modelMatrix,e._modelMatrix)){if(t.mode!==ce.SCENE3D&&e._projectTo2D)throw new E("Model.modelMatrix cannot be changed in 2D or Columbus View if projectTo2D is true.");e._updateModelMatrix=!0,e._modelMatrix=k.clone(e.modelMatrix,e._modelMatrix)}}(this,e),function vve(e){if(!e._updateModelMatrix&&!e._heightDirty&&0===e._minimumPixelSize)return;c(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);const t=e._scene;if(!c(t)||e.heightReference===tn.NONE){if(e.heightReference!==tn.NONE)throw new E("Height reference is not supported without a scene.");return void(e._clampedModelMatrix=void 0)}const n=g(t.ellipsoid,he.default),i=e.modelMatrix;Zp.x=i[12],Zp.y=i[13],Zp.z=i[14];const o=n.cartesianToCartographic(Zp);c(e._clampedModelMatrix)||(e._clampedModelMatrix=k.clone(i,new k)),e._removeUpdateHeightCallback=t.updateHeight(o,u6(e,n,o),e.heightReference);const r=t.getHeight(o,e.heightReference);if(c(r)){const s=u6(e,n,o);Ce.clone(o,vN),vN.height=r,s(vN)}e._heightDirty=!1,e._updateModelMatrix=!0}(this),function Ive(e,t){if(!e._updateModelMatrix&&0===e._minimumPixelSize)return;const n=c(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;l6(e,n),function Dve(e,t,n){let i=e.scale;if(0!==e.minimumPixelSize&&!e._projectTo2D){const o=n.context,r=Math.max(o.drawingBufferWidth,o.drawingBufferHeight);k.getTranslation(t,Zp),e._sceneMode!==ce.SCENE3D&&Pr.computeActualEllipsoidPosition(n,Zp,Zp);const s=e._boundingSphere.radius,a=function Fve(e,t,n){return IN.center=e,IN.radius=t,n.camera.getPixelSize(IN,n.context.drawingBufferWidth,n.context.drawingBufferHeight)}(Zp,s,n);Math.min(1/a*(2*s),r)<e.minimumPixelSize&&(i=e.minimumPixelSize*a/(2*e._initialRadius))}e._computedScale=c(e.maximumScale)?Math.min(e.maximumScale,i):i}(e,n,t)}(this,e),function Rve(e,t){const n=c(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix,i=g(e.referenceMatrix,n),o=t.context,r=e._imageBasedLighting;if(r.useSphericalHarmonicCoefficients||r.useSpecularEnvironmentMaps){let s=lve,a=cve;a=k.multiply(o.uniformState.view3D,i,a),s=k.getRotation(a,s),s=oe.transpose(s,s),e._iblReferenceFrameMatrix=oe.multiply(Ove,s,e._iblReferenceFrameMatrix)}if(e.isClippingEnabled()){let s=uve;s=k.multiply(o.uniformState.view3D,i,s),s=k.multiply(s,e._clippingPlanes.modelMatrix,s),e._clippingPlanesMatrix=k.inverseTranspose(s,e._clippingPlanesMatrix)}}(this,e),!this._ready)return void e.afterRender.push(()=>{this._ready=!0,this._readyEvent.raiseEvent(this)});this._loader.incrementallyLoadTextures&&!this._texturesLoaded&&this._loader.texturesLoaded&&(this.resetDrawCommands(),this._texturesLoaded=!0,this._texturesReadyEvent.raiseEvent(this)),function Pve(e){if(!e._idDirty)return;e._idDirty=!1;const t=e._id,n=e._pickIds,i=n.length;for(let o=0;o<i;++o)n[o].object.id=t}(this),function Lve(e,t){const n=e._sceneGraph;if(e._updateModelMatrix||0!==e._minimumPixelSize){const o=c(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;n.updateModelMatrix(o,t),e._updateModelMatrix=!1}e._backFaceCullingDirty&&(n.updateBackFaceCulling(e._backFaceCulling),e._backFaceCullingDirty=!1),e._shadowsDirty&&(n.updateShadows(e._shadows),e._shadowsDirty=!1),e._debugShowBoundingVolumeDirty&&(n.updateShowBoundingVolume(e._debugShowBoundingVolume),e._debugShowBoundingVolumeDirty=!1);let i=!1;c(e.classificationType)||(i=e._userAnimationDirty||e._activeAnimations.update(t)),n.update(t,i),e._userAnimationDirty=!1}(this,e),function Nve(e){if(!e._showCreditsOnScreenDirty)return;e._showCreditsOnScreenDirty=!1,e._credits.length=0;const t=e._showCreditsOnScreen;if(c(e._credit)){const s=Yn.clone(e._credit);s.showOnScreen=s.showOnScreen||t,e._credits.push(s)}const n=e._resourceCredits,i=n.length;for(let s=0;s<i;s++){const a=Yn.clone(n[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}const o=e._gltfCredits,r=o.length;for(let s=0;s<r;s++){const a=Yn.clone(o[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}}(this),function Mve(e,t){const n=function kve(e,t){const n=e.distanceDisplayCondition;if(!c(n))return!0;const i=n.near*n.near,o=n.far*n.far;let r;if(t.mode===ce.SCENE2D){const a=.5*(t.camera.frustum.right-t.camera.frustum.left);r=a*a}else{const s=k.getTranslation(e.modelMatrix,Bve);Pr.computeActualEllipsoidPosition(t,s,s),r=f.distanceSquared(s,t.camera.positionWC)}return r>=i&&r<=o}(e,t),i=e.isInvisible(),o=e.hasSilhouette(t),s=t.passes;e._show&&0!==e._computedScale&&n&&(!i||o)&&!e._ignoreCommands&&(s.render||s.pick&&e.allowPicking)&&(function Uve(e,t){const n=t.creditDisplay,i=e._credits,o=i.length;for(let r=0;r<o;r++)n.addCreditToNextFrame(i[r])}(e,t),e._sceneGraph.pushDrawCommands(t))}(this,e)}};const Zp=new f,vN=new Ce;function l6(e,t){e._clampedScale=c(e._maximumScale)?Math.min(e._scale,e._maximumScale):e._scale,e._boundingSphere.center=f.multiplyByScalar(e._sceneGraph.boundingSphere.center,e._clampedScale,e._boundingSphere.center),e._boundingSphere.radius=e._initialRadius*e._clampedScale,e._boundingSphere=Ae.transform(e._boundingSphere,t,e._boundingSphere)}const Ove=new oe(-1,0,0,0,0,1,0,-1,0),IN=new Ae,_v=new f;function u6(e,t,n){return function(i){VL(e.heightReference)&&(i.height+=n.height),t.cartographicToCartesian(i,_v);const o=e._clampedModelMatrix;k.clone(e.modelMatrix,o),o[12]=_v.x,o[13]=_v.y,o[14]=_v.z,e._heightDirty=!0}}const Bve=new f;function d6(e){return e.context.stencilBuffer}no.prototype.isTranslucent=function(){const e=this.color;return c(e)&&e.alpha>0&&e.alpha<1},no.prototype.isInvisible=function(){const e=this.color;return c(e)&&0===e.alpha},no.prototype.hasSilhouette=function(e){return d6(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!c(this._classificationType)},no.prototype.hasSkipLevelOfDetail=function(e){return!!Ia.is3DTiles(this.type)&&(e.context.stencilBuffer&&this._content.tileset.isSkippingLevelOfDetail)},no.prototype.isClippingEnabled=function(){const e=this._clippingPlanes;return c(e)&&e.enabled&&0!==e.length},no.prototype.pick=function(e,t,n,i,o){return function rve(e,t,n,i,o,r,s){if(A.typeOf.object("model",e),A.typeOf.object("ray",t),A.typeOf.object("frameState",n),!e._ready||n.mode===ce.MORPHING)return;let a=Number.MAX_VALUE;const l=e.sceneGraph,u=l._runtimeNodes;for(let d=0;d<u.length;d++){const h=u[d],m=h.node;let _=k.clone(h.computedTransform,eve),p=k.clone(l.computedModelMatrix,tve);const y=m.instances;c(y)&&y.transformInWorldSpace&&(p=k.multiplyTransformation(e.modelMatrix,l.components.transform,p),_=k.multiplyTransformation(l.axisCorrectionMatrix,h.computedTransform,_));let b=k.multiplyTransformation(p,_,nve);n.mode!==ce.SCENE3D&&(b=In.basisTo2D(n.mapProjection,b,b));const x=[];if(c(y)){const w=y.attributes[0].count,v=y.attributes[0].componentDatatype,I=12;let P=h.transformsTypedArray;if(!c(P)){const N=h.instancingTransformsBuffer;c(N)&&n.context.webgl2&&(P=ee.createTypedArray(v,w*I),N.getBufferData(P))}if(c(P))for(let N=0;N<w;N++){const R=N*I,B=new k(P[R],P[R+1],P[R+2],P[R+3],P[R+4],P[R+5],P[R+6],P[R+7],P[R+8],P[R+9],P[R+10],P[R+11],0,0,0,1);y.transformInWorldSpace?(k.multiplyTransformation(B,_,B),k.multiplyTransformation(p,B,B)):k.multiplyTransformation(B,b,B),x.push(B)}}0===x.length&&x.push(b);const C=h.runtimePrimitives.length;for(let w=0;w<C;w++){const v=h.runtimePrimitives[w],I=v.primitive;if(c(v.boundingSphere)&&!c(y)){const Y=Ae.transform(v.boundingSphere,b,ove),ne=So.raySphere(t,Y);if(!c(ne))continue}const P=ti.getAttributeBySemantic(I,ln.POSITION),N=P.byteOffset,R=P.byteStride,B=P.count;if(!c(I.indices))continue;let F=I.indices.typedArray;if(!c(F)){const Y=I.indices.buffer,ne=I.indices.count,X=I.indices.indexDatatype;c(Y)&&n.context.webgl2&&(X===Ot.UNSIGNED_BYTE?F=new Uint8Array(ne):X===Ot.UNSIGNED_SHORT?F=new Uint16Array(ne):X===Ot.UNSIGNED_INT&&(F=new Uint32Array(ne)),Y.getBufferData(F))}let S=P.typedArray,D=P.componentDatatype,L=P.type;const M=P.quantization;c(M)&&(D=P.quantization.componentDatatype,L=P.quantization.type);const U=Wn.getNumberOfComponents(L),z=ee.getSizeInBytes(D),G=!c(S)&&c(R)&&R!==U*z;let W=U,q=0;G&&(W=R/z,q=N/z);const j=B*W;if(!c(S)){const Y=P.buffer;c(Y)&&n.context.webgl2&&(S=ee.createTypedArray(D,j),Y.getBufferData(S,G?0:N,0,j)),M&&P.normalized&&(S=wi.dequantize(S,D,L,B))}if(!c(F)||!c(S))return;r=g(r,he.default),i=g(i,1),o=g(o,0);const Q=F.length;for(let Y=0;Y<Q;Y+=3){const ne=F[Y],X=F[Y+1],K=F[Y+2];for(const $ of x){const me=EN(S,ne,q,W,M,$,i,o,r,KSe),Se=EN(S,X,q,W,M,$,i,o,r,QSe),fe=EN(S,K,q,W,M,$,i,o,r,JSe),ye=So.rayTriangleParametric(t,me,Se,fe,g(e.backFaceCulling,!0));c(ye)&&ye<a&&ye>=0&&(a=ye)}}}}if(a!==Number.MAX_VALUE){if(s=ii.getPoint(t,a,s),n.mode!==ce.SCENE3D){f.fromElements(s.y,s.z,s.x,s);const d=n.mapProjection,h=d.ellipsoid,m=d.unproject(s,ive);h.cartographicToCartesian(m,s)}return s}}(this,e,t,n,i,o)},no.prototype.isClippingPolygonsEnabled=function(){const e=this._clippingPolygons;return c(e)&&e.enabled&&0!==e.length},no.prototype.isDestroyed=function(){return!1},no.prototype.destroy=function(){const e=this._loader;c(e)&&e.destroy();const t=this._featureTables;if(c(t)){const o=t.length;for(let r=0;r<o;r++)t[r].destroy()}this.destroyPipelineResources(),this.destroyModelResources(),c(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),c(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0);const n=this._clippingPlanes;c(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0;const i=this._clippingPolygons;c(i)&&!i.isDestroyed()&&i.owner===this&&i.destroy(),this._clippingPolygons=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0,Xe(this)},no.prototype.destroyPipelineResources=function(){const e=this._pipelineResources;for(let t=0;t<e.length;t++)e[t].destroy();this._pipelineResources.length=0,this._pickIds.length=0},no.prototype.destroyModelResources=function(){const e=this._modelResources;for(let t=0;t<e.length;t++)e[t].destroy();this._modelResources.length=0},no.fromGltfAsync=function(){var e=(0,we.Z)(function*(t){if(t=g(t,g.EMPTY_OBJECT),!c(t.url)&&!c(t.gltf))throw new E("options.url is required.");const n=g(t.url,t.gltf),i={releaseGltfJson:t.releaseGltfJson,asynchronous:t.asynchronous,incrementallyLoadTextures:t.incrementallyLoadTextures,upAxis:t.upAxis,forwardAxis:t.forwardAxis,loadAttributesFor2D:t.projectTo2D,enablePick:t.enablePick,loadIndicesForWireframe:t.enableDebugWireframe,loadPrimitiveOutline:t.enableShowOutline,loadForClassification:c(t.classificationType)},o=g(t.basePath,""),r=zt.createIfNeeded(o);c(n.asset)?(i.gltfJson=n,i.baseResource=r,i.gltfResource=r):n instanceof Uint8Array?(i.typedArray=n,i.baseResource=r,i.gltfResource=r):i.gltfResource=zt.createIfNeeded(n);const s=new zL(i),l=c(t.content)?Ia.TILE_GLTF:Ia.GLTF,u=i.gltfResource,d=nx(s,l,t);d.resource=u;try{yield s.load()}catch(p){throw s.destroy(),ti.getError("model",u,p)}const h=t.gltfCallback;c(h)&&(A.typeOf.func("options.gltfCallback",h),h(s.gltfJson));const m=new no(d),_=m._resource.credits;if(c(_)){const p=_.length;for(let y=0;y<p;y++)m._resourceCredits.push(Yn.clone(_[y]))}return m});return function(t){return e.apply(this,arguments)}}(),no.fromB3dm=function(){var e=(0,we.Z)(function*(t){const n={b3dmResource:t.resource,arrayBuffer:t.arrayBuffer,byteOffset:t.byteOffset,releaseGltfJson:t.releaseGltfJson,asynchronous:t.asynchronous,incrementallyLoadTextures:t.incrementallyLoadTextures,upAxis:t.upAxis,forwardAxis:t.forwardAxis,loadAttributesFor2D:t.projectTo2D,enablePick:t.enablePick,loadIndicesForWireframe:t.enableDebugWireframe,loadPrimitiveOutline:t.enableShowOutline,loadForClassification:c(t.classificationType)},i=new qTe(n);try{return yield i.load(),new no(nx(i,Ia.TILE_B3DM,t))}catch(o){throw i.destroy(),o}});return function(t){return e.apply(this,arguments)}}(),no.fromPnts=function(){var e=(0,we.Z)(function*(t){const i=new $Se({arrayBuffer:t.arrayBuffer,byteOffset:t.byteOffset,loadAttributesFor2D:t.projectTo2D});try{return yield i.load(),new no(nx(i,Ia.TILE_PNTS,t))}catch(o){throw i.destroy(),o}});return function(t){return e.apply(this,arguments)}}(),no.fromI3dm=function(){var e=(0,we.Z)(function*(t){const i=new yAe({i3dmResource:t.resource,arrayBuffer:t.arrayBuffer,byteOffset:t.byteOffset,releaseGltfJson:t.releaseGltfJson,asynchronous:t.asynchronous,incrementallyLoadTextures:t.incrementallyLoadTextures,upAxis:t.upAxis,forwardAxis:t.forwardAxis,loadAttributesFor2D:t.projectTo2D,enablePick:t.enablePick,loadIndicesForWireframe:t.enableDebugWireframe,loadPrimitiveOutline:t.enableShowOutline});try{return yield i.load(),new no(nx(i,Ia.TILE_I3DM,t))}catch(o){throw i.destroy(),o}});return function(t){return e.apply(this,arguments)}}(),no.fromGeoJson=function(){var e=(0,we.Z)(function*(t){return new no(nx(new sAe({geoJson:t.geoJson}),Ia.TILE_GEOJSON,t))});return function(t){return e.apply(this,arguments)}}();const zve=new Z;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}}no.prototype.applyColorAndShow=function(e){const t=Z.clone(this._color,zve),n=c(e)&&c(e.color),i=c(e)&&c(e.show);this._color=n?e.color.evaluateColor(void 0,this._color):Z.clone(Z.WHITE,this._color),this._show=!i||e.show.evaluate(void 0),SN(t,this._color)&&this.resetDrawCommands()},no.prototype.applyStyle=function(e){const t=this.type===Ia.TILE_PNTS,n=c(this.featureTableId)&&this.featureTables[this.featureTableId].featuresLength>0,i=c(this.structuralMetadata)?this.structuralMetadata.propertyAttributes:void 0,o=c(i)&&c(i[0]);!t||n&&!o?n?(this.featureTables[this.featureTableId].applyStyle(e),c6(this)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0):this.resetDrawCommands()};const G0=no;function ns(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}function ix(e,t,n,i){return Pn(i,{cull:!1,releaseGltfJson:!0,opaquePass:Ue.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})}Object.defineProperties(ns.prototype,{featuresLength:{get:function(){const e=this._model,t=e.featureTables,n=e.featureTableId;return c(t)&&c(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(){const 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(){const e=this._model,t=e.featureTables,n=e.featureTableId;if(c(t)&&c(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}}}),ns.prototype.getFeature=function(e){const t=this._model,n=t.featureTableId;if(!c(n))throw new E("No feature ID set is selected. Make sure Cesium3DTileset.featureIdLabel or Cesium3DTileset.instanceFeatureIdLabel is defined");const i=t.featureTables[n];if(!c(i))throw new E("No feature table found for the selected feature ID set");const o=i.featuresLength;if(!c(e)||e<0||e>=o)throw new E(`featureId is required and must be between 0 and featuresLength - 1 (${o-1}).`);return i.getFeature(e)},ns.prototype.hasProperty=function(e,t){const n=this._model,i=n.featureTableId;return!!c(i)&&n.featureTables[i].hasProperty(e,t)},ns.prototype.applyDebugSettings=function(e,t){t=e?t:Z.WHITE,0===this.featuresLength?this._model.color=t:c(this.batchTable)&&this.batchTable.setAllColor(t)},ns.prototype.applyStyle=function(e){this._model.style=e},ns.prototype.update=function(e,t){const 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;const o=e.clippingPlanes;n.referenceMatrix=e.clippingPlanesOriginMatrix,c(o)&&i.clippingPlanesDirty&&(n._clippingPlanes=o.enabled&&i._isClipped?o:void 0),c(o)&&c(n._clippingPlanes)&&n._clippingPlanes!==o&&(n._clippingPlanes=o,n._clippingPlanesState=0);const r=e.clippingPolygons;c(r)&&i.clippingPolygonsDirty&&(n._clippingPolygons=r.enabled&&i._isClippedByPolygon?r:void 0),c(r)&&c(n._clippingPolygons)&&n._clippingPolygons!==r&&(n._clippingPolygons=r,n._clippingPolygonsState=0),n.update(t),!this._ready&&n.ready&&(n.activeAnimations.addAll({loop:k_.REPEAT}),this._ready=!0)},ns.prototype.isDestroyed=function(){return!1},ns.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),Xe(this)},ns.fromGltf=function(){var e=(0,we.Z)(function*(t,n,i,o){const r=new ns(t,n,i),a=ix(t,n,r,{gltf:o,basePath:i});a.classificationType=t.vectorClassificationOnly?void 0:t.classificationType;const u=yield G0.fromGltfAsync(a);return r._model=u,r});return function(t,n,i,o){return e.apply(this,arguments)}}(),ns.fromB3dm=function(){var e=(0,we.Z)(function*(t,n,i,o,r){const s=new ns(t,n,i),l=ix(t,n,s,{arrayBuffer:o,byteOffset:r,resource:i});l.classificationType=t.vectorClassificationOnly?void 0:t.classificationType;const d=yield G0.fromB3dm(l);return s._model=d,s});return function(t,n,i,o,r){return e.apply(this,arguments)}}(),ns.fromI3dm=function(){var e=(0,we.Z)(function*(t,n,i,o,r){const s=new ns(t,n,i),l=ix(t,n,s,{arrayBuffer:o,byteOffset:r,resource:i}),u=yield G0.fromI3dm(l);return s._model=u,s});return function(t,n,i,o,r){return e.apply(this,arguments)}}(),ns.fromPnts=function(){var e=(0,we.Z)(function*(t,n,i,o,r){const s=new ns(t,n,i),l=ix(t,n,s,{arrayBuffer:o,byteOffset:r,resource:i}),u=yield G0.fromPnts(l);return s._model=u,s});return function(t,n,i,o,r){return e.apply(this,arguments)}}(),ns.fromGeoJson=function(){var e=(0,we.Z)(function*(t,n,i,o){const r=new ns(t,n,i),a=ix(t,n,r,{geoJson:o,resource:i}),l=yield G0.fromGeoJson(a);return r._model=l,r});return function(t,n,i,o){return e.apply(this,arguments)}}(),ns.prototype.pick=function(e,t,n){if(c(this._model)&&this._ready)return this._model.pick(e,t,t.verticalExaggeration,t.verticalExaggerationRelativeHeight,he.WGS84,n)};const j0=ns;function Yl(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(Yl.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}}}),Yl.fromJson=function(e,t,n,i){const o=new Yl(e,t,n);return o._tileset.loadTileset(o._resource,i,o._tile),o._ready=!0,o},Yl.prototype.hasProperty=function(e,t){return!1},Yl.prototype.getFeature=function(e){},Yl.prototype.applyDebugSettings=function(e,t){},Yl.prototype.applyStyle=function(e){},Yl.prototype.update=function(e,t){},Yl.prototype.pick=function(e,t,n){},Yl.prototype.isDestroyed=function(){return!1},Yl.prototype.destroy=function(){return Xe(this)};const Vve=Yl;function Xl(e,t,n,i){this.near=g(e,0),this.nearValue=g(t,0),this.far=g(n,1),this.farValue=g(i,0)}Xl.clone=function(e,t){if(c(e))return c(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new Xl(e.near,e.nearValue,e.far,e.farValue)},Xl.packedLength=4,Xl.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),t[n++]=e.near,t[n++]=e.nearValue,t[n++]=e.far,t[n]=e.farValue,t},Xl.unpack=function(e,t,n){if(!c(e))throw new E("array is required");return t=g(t,0),c(n)||(n=new Xl),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n},Xl.equals=function(e,t){return e===t||c(e)&&c(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue},Xl.prototype.clone=function(e){return Xl.clone(this,e)},Xl.prototype.equals=function(e){return Xl.equals(this,e)};const Bn=Xl;function As(e,t,n,i){if(A.defined("context",e),!t||0===t.length)throw new E("At least one attribute is required.");const o=As._verifyAttributes(t);n=g(n,0);const r=[],s={};let a,l;const u=o.length;for(let h=0;h<u;++h){const m=o[h];m.vertexBuffer?r.push(m):(l=m.usage,a=s[l],c(a)||(a=s[l]=[]),a.push(m))}function d(h,m){return ee.getSizeInBytes(m.componentDatatype)-ee.getSizeInBytes(h.componentDatatype)}for(l in this._allBuffers=[],s)if(s.hasOwnProperty(l)){a=s[l],a.sort(d);const h=As._vertexSizeInBytes(a),_={vertexSizeInBytes:h,vertexBuffer:void 0,usage:a[0].usage,needsCommit:!1,arrayBuffer:void 0,arrayViews:As._createArrayViews(a,h)};this._allBuffers.push(_)}this._size=0,this._instanced=g(i,!1),this._precreated=r,this._context=e,this.writers=void 0,this.va=void 0,this.resize(n)}As._verifyAttributes=function(e){const t=[];for(let i=0;i<e.length;++i){const o=e[i],r={index:g(o.index,i),enabled:g(o.enabled,!0),componentsPerAttribute:o.componentsPerAttribute,componentDatatype:g(o.componentDatatype,ee.FLOAT),normalize:g(o.normalize,!1),vertexBuffer:o.vertexBuffer,usage:g(o.usage,At.STATIC_DRAW)};if(t.push(r),1!==r.componentsPerAttribute&&2!==r.componentsPerAttribute&&3!==r.componentsPerAttribute&&4!==r.componentsPerAttribute)throw new E("attribute.componentsPerAttribute must be in the range [1, 4].");if(!ee.validate(r.componentDatatype))throw new E("Attribute must have a valid componentDatatype or not specify it.");if(!At.validate(r.usage))throw new E("Attribute must have a valid usage or not specify it.")}const n=new Array(t.length);for(let i=0;i<t.length;++i){const r=t[i].index;if(n[r])throw new E(`Index ${r} is used by more than one attribute.`);n[r]=!0}return t},As._vertexSizeInBytes=function(e){let t=0;const n=e.length;for(let s=0;s<n;++s){const a=e[s];t+=a.componentsPerAttribute*ee.getSizeInBytes(a.componentDatatype)}const i=n>0?ee.getSizeInBytes(e[0].componentDatatype):0,o=i>0?t%i:0;return t+=0===o?0:i-o,t},As._createArrayViews=function(e,t){const n=[];let i=0;const o=e.length;for(let r=0;r<o;++r){const s=e[r],a=s.componentDatatype;n.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:a,normalize:s.normalize,offsetInBytes:i,vertexSizeInComponentType:t/ee.getSizeInBytes(a),view:void 0}),i+=s.componentsPerAttribute*ee.getSizeInBytes(a)}return n},As.prototype.resize=function(e){this._size=e;const t=this._allBuffers;this.writers=[];for(let n=0,i=t.length;n<i;++n){const o=t[n];As._resize(o,this._size),As._appendWriters(this.writers,o)}DN(this)},As._resize=function(e,t){if(e.vertexSizeInBytes>0){const n=new ArrayBuffer(t*e.vertexSizeInBytes);if(c(e.arrayBuffer)){const r=new Uint8Array(n),s=new Uint8Array(e.arrayBuffer),a=s.length;for(let l=0;l<a;++l)r[l]=s[l]}const i=e.arrayViews,o=i.length;for(let r=0;r<o;++r){const s=i[r];s.view=ee.createArrayBufferView(s.componentDatatype,n,s.offsetInBytes)}e.arrayBuffer=n}};const Hve=[function(e,t,n){return function(i,o){t[i*n]=o,e.needsCommit=!0}},function(e,t,n){return function(i,o,r){const s=i*n;t[s]=o,t[s+1]=r,e.needsCommit=!0}},function(e,t,n){return function(i,o,r,s){const a=i*n;t[a]=o,t[a+1]=r,t[a+2]=s,e.needsCommit=!0}},function(e,t,n){return function(i,o,r,s,a){const l=i*n;t[l]=o,t[l+1]=r,t[l+2]=s,t[l+3]=a,e.needsCommit=!0}}];function Gve(e,t){if(t.needsCommit&&t.vertexSizeInBytes>0){t.needsCommit=!1;const n=t.vertexBuffer,i=e._size*t.vertexSizeInBytes,o=c(n);if(!o||n.sizeInBytes<i)return o&&n.destroy(),t.vertexBuffer=yn.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),t.vertexBuffer.vertexArrayDestroyable=!1,!0;t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}function jve(e,t,n){if(e.needsCommit&&e.vertexSizeInBytes>0){const i=e.vertexSizeInBytes*t;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,i,e.vertexSizeInBytes*n),i)}}function DN(e){const t=e.va;if(!c(t))return;const n=t.length;for(let i=0;i<n;++i)t[i].va.destroy();e.va=void 0}As._appendWriters=function(e,t){const n=t.arrayViews,i=n.length;for(let o=0;o<i;++o){const r=n[o];e[r.index]=Hve[r.componentsPerAttribute-1](t,r.view,r.vertexSizeInComponentType)}},As.prototype.commit=function(e){let t=!1;const n=this._allBuffers;let i,o,r;for(o=0,r=n.length;o<r;++o)i=n[o],t=Gve(this,i)||t;if(t||!c(this.va)){DN(this);const s=this.va=[],a=O.SIXTY_FOUR_KILOBYTES-4,l=c(e)&&!this._instanced?Math.ceil(this._size/a):1;for(let u=0;u<l;++u){let d=[];for(o=0,r=n.length;o<r;++o)i=n[o],As._appendAttributes(d,i,u*(i.vertexSizeInBytes*a),this._instanced);d=d.concat(this._precreated),s.push({va:new gs({context:this._context,attributes:d,indexBuffer:e}),indicesCount:1.5*(u!==l-1?a:this._size%a)})}}},As._appendAttributes=function(e,t,n,i){const o=t.arrayViews,r=o.length;for(let s=0;s<r;++s){const a=o[s];e.push({index:a.index,enabled:a.enabled,componentsPerAttribute:a.componentsPerAttribute,componentDatatype:a.componentDatatype,normalize:a.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:n+a.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:i?1:0})}},As.prototype.subCommit=function(e,t){if(e<0||e>=this._size)throw new E("offsetInVertices must be greater than or equal to zero and less than the vertex array size.");if(e+t>this._size)throw new E("offsetInVertices + lengthInVertices cannot exceed the vertex array size.");const n=this._allBuffers;for(let i=0,o=n.length;i<o;++i)jve(n[i],e,t)},As.prototype.endSubCommits=function(){const e=this._allBuffers;for(let t=0,n=e.length;t<n;++t)e[t].needsCommit=!1},As.prototype.isDestroyed=function(){return!1},As.prototype.destroy=function(){const e=this._allBuffers;for(let t=0,n=e.length;t<n;++t){const i=e[t];i.vertexBuffer=i.vertexBuffer&&i.vertexBuffer.destroy()}return DN(this),Xe(this)};const f6=As,Da=Object.freeze({CENTER:0,LEFT:1,RIGHT:-1}),lo=Object.freeze({CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1});function xi(e,t){if(e=g(e,g.EMPTY_OBJECT),c(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new E("disableDepthTestDistance must be greater than or equal to 0.0.");let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;if(c(n)){if(n.far<=n.near)throw new E("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=Bn.clone(n)}if(c(i)){if(i.far<=i.near)throw new E("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");i=Bn.clone(i)}if(c(o)){if(o.far<=o.near)throw new E("scaleByDistance.far must be greater than scaleByDistance.near.");o=Bn.clone(o)}if(c(r)){if(r.far<=r.near)throw new E("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");r=Qn.clone(r)}this._show=g(e.show,!0),this._position=f.clone(g(e.position,f.ZERO)),this._actualPosition=f.clone(this._position),this._pixelOffset=V.clone(g(e.pixelOffset,V.ZERO)),this._translate=new V(0,0),this._eyeOffset=f.clone(g(e.eyeOffset,f.ZERO)),this._heightReference=g(e.heightReference,tn.NONE),this._verticalOrigin=g(e.verticalOrigin,lo.CENTER),this._horizontalOrigin=g(e.horizontalOrigin,Da.CENTER),this._scale=g(e.scale,1),this._color=Z.clone(g(e.color,Z.WHITE)),this._rotation=g(e.rotation,0),this._alignedAxis=f.clone(g(e.alignedAxis,f.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._sizeInMeters=g(e.sizeInMeters,!1),this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=g(e.collection,t),this._pickId=void 0,this._pickPrimitive=g(e._pickPrimitive,this),this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=void 0,this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0;const s=e.image;let a=e.imageId;c(s)&&(c(a)||(a="string"==typeof s?s:c(s.src)?s.src:kr()),this._imageId=a,this._image=s),c(e.imageSubRegion)&&(this._imageId=a,this._imageSubRegion=e.imageSubRegion),c(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=ce.SCENE3D,this._clusterShow=!0,this._outlineColor=Z.clone(g(e.outlineColor,Z.BLACK)),this._outlineWidth=g(e.outlineWidth,0),this._updateClamping()}const h6=xi.SHOW_INDEX=0,gv=xi.POSITION_INDEX=1,p6=xi.PIXEL_OFFSET_INDEX=2,Yve=xi.EYE_OFFSET_INDEX=3,Xve=xi.HORIZONTAL_ORIGIN_INDEX=4,Zve=xi.VERTICAL_ORIGIN_INDEX=5,$ve=xi.SCALE_INDEX=6,yv=xi.IMAGE_INDEX_INDEX=7,m6=xi.COLOR_INDEX=8,Kve=xi.ROTATION_INDEX=9,Qve=xi.ALIGNED_AXIS_INDEX=10,Jve=xi.SCALE_BY_DISTANCE_INDEX=11,eIe=xi.TRANSLUCENCY_BY_DISTANCE_INDEX=12,tIe=xi.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,nIe=xi.DISTANCE_DISPLAY_CONDITION=14,iIe=xi.DISABLE_DEPTH_DISTANCE=15;xi.TEXTURE_COORDINATE_BOUNDS=16;const _6=xi.SDF_INDEX=17;function Do(e,t){const n=e._billboardCollection;c(n)&&(n._updateBillboard(e,t),e._dirty=!0)}xi.NUMBER_OF_PROPERTIES=18,Object.defineProperties(xi.prototype,{show:{get:function(){return this._show},set:function(e){A.typeOf.bool("value",e),this._show!==e&&(this._show=e,Do(this,h6))}},position:{get:function(){return this._position},set:function(e){A.typeOf.object("value",e);const t=this._position;f.equals(t,e)||(f.clone(e,t),f.clone(e,this._actualPosition),this._updateClamping(),Do(this,gv))}},heightReference:{get:function(){return this._heightReference},set:function(e){A.typeOf.number("value",e),e!==this._heightReference&&(this._heightReference=e,this._updateClamping(),Do(this,gv))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){A.typeOf.object("value",e);const t=this._pixelOffset;V.equals(t,e)||(V.clone(e,t),Do(this,p6))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(c(e)&&(A.typeOf.object("value",e),e.far<=e.near))throw new E("far distance must be greater than near distance.");const t=this._scaleByDistance;Bn.equals(t,e)||(this._scaleByDistance=Bn.clone(e,t),Do(this,Jve))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(c(e)&&(A.typeOf.object("value",e),e.far<=e.near))throw new E("far distance must be greater than near distance.");const t=this._translucencyByDistance;Bn.equals(t,e)||(this._translucencyByDistance=Bn.clone(e,t),Do(this,eIe))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(c(e)&&(A.typeOf.object("value",e),e.far<=e.near))throw new E("far distance must be greater than near distance.");const t=this._pixelOffsetScaleByDistance;Bn.equals(t,e)||(this._pixelOffsetScaleByDistance=Bn.clone(e,t),Do(this,tIe))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){A.typeOf.object("value",e);const t=this._eyeOffset;f.equals(t,e)||(f.clone(e,t),Do(this,Yve))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){A.typeOf.number("value",e),this._horizontalOrigin!==e&&(this._horizontalOrigin=e,Do(this,Xve))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){A.typeOf.number("value",e),this._verticalOrigin!==e&&(this._verticalOrigin=e,Do(this,Zve))}},scale:{get:function(){return this._scale},set:function(e){A.typeOf.number("value",e),this._scale!==e&&(this._scale=e,Do(this,$ve))}},color:{get:function(){return this._color},set:function(e){A.typeOf.object("value",e);const t=this._color;Z.equals(t,e)||(Z.clone(e,t),Do(this,m6))}},rotation:{get:function(){return this._rotation},set:function(e){A.typeOf.number("value",e),this._rotation!==e&&(this._rotation=e,Do(this,Kve))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){A.typeOf.object("value",e);const t=this._alignedAxis;f.equals(t,e)||(f.clone(e,t),Do(this,Qve))}},width:{get:function(){return g(this._width,this._imageWidth)},set:function(e){c(e)&&A.typeOf.number("value",e),this._width!==e&&(this._width=e,Do(this,yv))}},height:{get:function(){return g(this._height,this._imageHeight)},set:function(e){c(e)&&A.typeOf.number("value",e),this._height!==e&&(this._height=e,Do(this,yv))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){A.typeOf.bool("value",e),this._sizeInMeters!==e&&(this._sizeInMeters=e,Do(this,m6))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!Qn.equals(e,this._distanceDisplayCondition)){if(c(e)&&(A.typeOf.object("value",e),e.far<=e.near))throw new E("far distance must be greater than near distance.");this._distanceDisplayCondition=Qn.clone(e,this._distanceDisplayCondition),Do(this,nIe)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(c(e)&&(A.typeOf.number("value",e),e<0))throw new E("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Do(this,iIe))}},id:{get:function(){return this._id},set:function(e){this._id=e,c(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,c(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageId},set:function(e){c(e)?"string"==typeof e?this.setImage(e,e):e instanceof zt?this.setImage(e.url,e):c(e.src)?this.setImage(e.src,e):this.setImage(kr(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,Do(this,yv))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=f.clone(e,this._actualClampedPosition),Do(this,gv)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Do(this,h6))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!c(e))throw new E("value is required.");const t=this._outlineColor;Z.equals(t,e)||(Z.clone(e,t),Do(this,_6))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Do(this,_6))}}}),xi.prototype.getPickId=function(e){return c(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId},xi.prototype._updateClamping=function(){xi._updateClamping(this._billboardCollection,this)};const bv=new Ce;xi._updateClamping=function(e,t){const n=e._scene;if(!c(n)){if(t._heightReference!==tn.NONE)throw new E("Height reference is not supported without a scene.");return}const i=g(n.ellipsoid,he.default),o=n.frameState.mode,r=o!==t._mode;if(t._mode=o,(t._heightReference===tn.NONE||r)&&c(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference===tn.NONE||!c(t._position))return;c(t._removeCallbackFunc)&&t._removeCallbackFunc();const s=i.cartesianToCartographic(t._position);if(!c(s))return void(t._actualClampedPosition=void 0);function a(u){const d=i.cartographicToCartesian(u,t._clampedPosition);VL(t._heightReference)&&(t._mode===ce.SCENE3D?(u.height+=s.height,i.cartographicToCartesian(u,d)):d.x+=s.height),t._clampedPosition=d}t._removeCallbackFunc=n.updateHeight(s,a,t._heightReference),Ce.clone(s,bv);const l=n.getHeight(s,t._heightReference);c(l)&&(bv.height=l),a(bv)},xi.prototype._loadImage=function(){const e=this._billboardCollection._textureAtlas,t=this._imageId,n=this._image,i=this._imageSubRegion;let o;const r=this;function s(l){if(r._imageId!==t||r._image!==n||!Vt.equals(r._imageSubRegion,i))return;const u=e.textureCoordinates[l];r._imageWidth=e.texture.width*u.width,r._imageHeight=e.texture.height*u.height,r._imageIndex=l,r._ready=!0,r._image=void 0,r._imageIndexPromise=void 0,Do(r,yv);const d=r._billboardCollection._scene;c(d)&&d.frameState.afterRender.push(()=>!0)}if(c(n)&&(o=e.addImage(t,n)),c(i)&&(o=e.addSubRegion(t,i)),this._imageIndexPromise=o,!c(o))return;const a=e.getImageIndex(t);!c(a)||c(i)?o.then(s).catch(function(l){console.error(`Error loading image for billboard: ${l}`),r._imageIndexPromise=void 0}):s(a)},xi.prototype.setImage=function(e,t){if(!c(e))throw new E("id is required.");if(!c(t))throw new E("image is required.");this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,c(this._billboardCollection._textureAtlas)&&this._loadImage())},xi.prototype.setImageSubRegion=function(e,t){if(!c(e))throw new E("id is required.");if(!c(t))throw new E("subRegion is required.");this._imageId===e&&Vt.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=Vt.clone(t),c(this._billboardCollection._textureAtlas)&&this._loadImage())},xi.prototype._setTranslate=function(e){if(!c(e))throw new E("value is required.");const t=this._translate;V.equals(t,e)||(V.clone(e,t),Do(this,p6))},xi.prototype._getActualPosition=function(){return c(this._clampedPosition)?this._clampedPosition:this._actualPosition},xi.prototype._setActualPosition=function(e){c(this._clampedPosition)||f.clone(e,this._actualPosition),Do(this,gv)};const g6=new de;xi._computeActualPosition=function(e,t,n,i){return c(e._clampedPosition)?(n.mode!==e._mode&&e._updateClamping(),e._clampedPosition):n.mode===ce.SCENE3D?t:(k.multiplyByPoint(i,t,g6),Pr.computeActualEllipsoidPosition(n,g6))};const y6=new f;xi._computeScreenSpacePosition=function(e,t,n,i,o,r){const s=k.multiplyByPoint(e,t,y6),a=Pr.worldWithEyeOffsetToWindowCoordinates(o,s,n,r);if(c(a))return V.add(a,i,a),a};const Tv=new V(0,0);xi.prototype.computeScreenSpacePosition=function(e,t){const n=this._billboardCollection;if(c(t)||(t=new V),!c(n))throw new E("Billboard must be in a collection. Was it removed?");if(!c(e))throw new E("scene is required.");V.clone(this._pixelOffset,Tv),V.add(Tv,this._translate,Tv);let i=n.modelMatrix,o=this._position;if(c(this._clampedPosition)&&(o=this._clampedPosition,e.mode!==ce.SCENE3D)){const s=e.mapProjection,a=s.ellipsoid,l=s.unproject(o,bv);o=a.cartographicToCartesian(l,y6),i=k.IDENTITY}return xi._computeScreenSpacePosition(i,o,this._eyeOffset,Tv,e,t)},xi.getScreenSpaceBoundingBox=function(e,t,n){let i=e.width,o=e.height;const r=e.scale;i*=r,o*=r;let s=t.x;e.horizontalOrigin===Da.RIGHT?s-=i:e.horizontalOrigin===Da.CENTER&&(s-=.5*i);let a=t.y;return e.verticalOrigin===lo.BOTTOM||e.verticalOrigin===lo.BASELINE?a-=o:e.verticalOrigin===lo.CENTER&&(a-=.5*o),c(n)||(n=new Vt),n.x=s,n.y=a,n.width=i,n.height=o,n},xi.prototype.equals=function(e){return this===e||c(e)&&this._id===e._id&&f.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&&Vt.equals(this._imageSubRegion,e._imageSubRegion)&&Z.equals(this._color,e._color)&&V.equals(this._pixelOffset,e._pixelOffset)&&V.equals(this._translate,e._translate)&&f.equals(this._eyeOffset,e._eyeOffset)&&Bn.equals(this._scaleByDistance,e._scaleByDistance)&&Bn.equals(this._translucencyByDistance,e._translucencyByDistance)&&Bn.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Qn.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},xi.prototype._destroy=function(){c(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),c(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0};const Qo=xi,Ar=Object.freeze({OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2}),al=Object.freeze({FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25});function ph(e,t,n,i,o){this.bottomLeft=g(e,V.ZERO),this.topRight=g(t,V.ZERO),this.childNode1=n,this.childNode2=i,this.imageIndex=o}const oIe=new V(16,16);function $p(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.borderWidthInPixels,1),n=g(e.initialSize,oIe);if(!c(e.context))throw new E("context is required.");if(t<0)throw new E("borderWidthInPixels must be greater than or equal to zero.");if(n.x<1||n.y<1)throw new E("initialSize must be greater than zero.");this._context=e.context,this._pixelFormat=g(e.pixelFormat,Ct.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=kr(),this._idHash={},this._indexHash={},this._initialSize=n,this._root=void 0}function Av(e,t,n){if(c(t)){if(!c(t.childNode1)&&!c(t.childNode2)){if(c(t.imageIndex))return;const r=t.topRight.x-t.bottomLeft.x-n.width,s=t.topRight.y-t.bottomLeft.y-n.height;if(r<0||s<0)return;if(0===r&&0===s)return t;if(r>s){t.childNode1=new ph(new V(t.bottomLeft.x,t.bottomLeft.y),new V(t.bottomLeft.x+n.width,t.topRight.y));const a=t.bottomLeft.x+n.width+e._borderWidthInPixels;a<t.topRight.x&&(t.childNode2=new ph(new V(a,t.bottomLeft.y),new V(t.topRight.x,t.topRight.y)))}else{t.childNode1=new ph(new V(t.bottomLeft.x,t.bottomLeft.y),new V(t.topRight.x,t.bottomLeft.y+n.height));const a=t.bottomLeft.y+n.height+e._borderWidthInPixels;a<t.topRight.y&&(t.childNode2=new ph(new V(t.bottomLeft.x,a),new V(t.topRight.x,t.topRight.y)))}return Av(e,t.childNode1,n)}return Av(e,t.childNode1,n)||Av(e,t.childNode2,n)}}function b6(e,t,n){const i=Av(e,e._root,t);if(c(i)){i.imageIndex=n;const o=e._texture.width,r=e._texture.height;e._textureCoordinates[n]=new Vt(i.bottomLeft.x/o,i.bottomLeft.y/r,(i.topRight.x-i.bottomLeft.x)/o,(i.topRight.y-i.bottomLeft.y)/r),e._texture.copyFrom({source:t,xOffset:i.bottomLeft.x,yOffset:i.bottomLeft.y})}else(function rIe(e,t){const n=e._context,r=e._borderWidthInPixels;if(e.numberOfImages>0){const s=e._texture.width,a=e._texture.height,l=2*(s+t.width+r),u=2*(a+t.height+r),d=s/l,h=a/u,m=new ph(new V(s+r,r),new V(l,a)),_=new ph(new V,new V(l,a),e._root,m),p=new ph(new V(r,a+r),new V(l,u)),y=new ph(new V,new V(l,u),_,p);for(let C=0;C<e._textureCoordinates.length;C++){const w=e._textureCoordinates[C];c(w)&&(w.x*=d,w.y*=h,w.width*=d,w.height*=h)}const b=new Mn({context:e._context,width:l,height:u,pixelFormat:e._pixelFormat}),x=new sh({context:n,colorTextures:[e._texture],destroyAttachments:!1});x._bind(),b.copyFromFramebuffer(0,0,0,0,l,u),x._unBind(),x.destroy(),e._texture=e._texture&&e._texture.destroy(),e._texture=b,e._root=y}else{let s=2*(t.width+2*r),a=2*(t.height+2*r);s<e._initialSize.x&&(s=e._initialSize.x),a<e._initialSize.y&&(a=e._initialSize.y),e._texture=e._texture&&e._texture.destroy(),e._texture=new Mn({context:e._context,width:s,height:a,pixelFormat:e._pixelFormat}),e._root=new ph(new V(r,r),new V(s,a))}})(e,t),b6(e,t,n);e._guid=kr()}function T6(e,t){if(!c(e)||e.isDestroyed())return-1;const n=e.numberOfImages;return b6(e,t,n),n}Object.defineProperties($p.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},textureCoordinates:{get:function(){return this._textureCoordinates}},texture:{get:function(){return c(this._texture)||(this._texture=new Mn({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}}}),$p.prototype.getImageIndex=function(e){if(!c(e))throw new E("id is required.");return this._indexHash[e]},$p.prototype.addImageSync=function(e,t){if(!c(e))throw new E("id is required.");if(!c(t))throw new E("image is required.");let n=this._indexHash[e];return c(n)||(n=T6(this,t),this._idHash[e]=Promise.resolve(n),this._indexHash[e]=n),n},$p.prototype.addImage=function(e,t){if(!c(e))throw new E("id is required.");if(!c(t))throw new E("image is required.");let n=this._idHash[e];if(c(n))return n;if("function"==typeof t){if(t=t(e),!c(t))throw new E("image is required.")}else("string"==typeof t||t instanceof zt)&&(t=zt.createIfNeeded(t).fetchImage());const i=this;return n=Promise.resolve(t).then(function(o){const r=T6(i,o);return i._indexHash[e]=r,r}),this._idHash[e]=n,n},$p.prototype.addSubRegion=function(e,t){if(!c(e))throw new E("id is required.");if(!c(t))throw new E("subRegion is required.");const n=this._idHash[e];if(!c(n))throw new Pe(`image with id "${e}" not found in the atlas.`);const i=this;return Promise.resolve(n).then(function(o){if(-1===o)return-1;const r=i._texture.width,s=i._texture.height,a=i._textureCoordinates[o],m=i._textureCoordinates.push(new Vt(a.x+t.x/r,a.y+t.y/s,t.width/r,t.height/s))-1;return i._indexHash[e]=m,i._guid=kr(),m})},$p.prototype.isDestroyed=function(){return!1},$p.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),Xe(this)};const PN=$p,sIe=Qo.SHOW_INDEX,ox=Qo.POSITION_INDEX,A6=Qo.PIXEL_OFFSET_INDEX,x6=Qo.EYE_OFFSET_INDEX,aIe=Qo.HORIZONTAL_ORIGIN_INDEX,cIe=Qo.VERTICAL_ORIGIN_INDEX,lIe=Qo.SCALE_INDEX,rx=Qo.IMAGE_INDEX_INDEX,C6=Qo.COLOR_INDEX,uIe=Qo.ROTATION_INDEX,dIe=Qo.ALIGNED_AXIS_INDEX,E6=Qo.SCALE_BY_DISTANCE_INDEX,w6=Qo.TRANSLUCENCY_BY_DISTANCE_INDEX,S6=Qo.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,v6=Qo.DISTANCE_DISPLAY_CONDITION,fIe=Qo.DISABLE_DEPTH_DISTANCE,hIe=Qo.TEXTURE_COORDINATE_BOUNDS,I6=Qo.SDF_INDEX,ON=Qo.NUMBER_OF_PROPERTIES;let uo;const pIe={positionHighAndScale:0,positionLowAndRotation:1,compressedAttribute0:2,compressedAttribute1:3,compressedAttribute2:4,eyeOffset:5,scaleByDistance:6,pixelOffsetScaleByDistance:7,compressedAttribute3:8,textureCoordinateBoundsOrLabelTranslate:9,a_batchId:10,sdf:11},mIe={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12};function Zl(e){e=g(e,g.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(ON),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new Ae,this._baseVolumeWC=new Ae,this._baseVolume2D=new Ae,this._boundingVolume=new Ae,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=g(e.show,!0),this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this._modelMatrix=k.clone(k.IDENTITY),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowTextureAtlas=g(e.debugShowTextureAtlas,!1),this.blendOption=g(e.blendOption,Ar.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=ce.SCENE3D,this._buffersUsage=[At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW],this._highlightColor=Z.clone(Z.WHITE);const t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture},u_highlightColor:function(){return t._highlightColor}};const n=this._scene;c(n)&&c(n.terrainProviderChanged)&&(this._removeCallbackFunc=n.terrainProviderChanged.addEventListener(function(){const i=this._billboards,o=i.length;for(let r=0;r<o;++r)c(i[r])&&i[r]._updateClamping()},this))}function D6(e){const t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}function RN(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;const t=[],n=e._billboards,i=n.length;for(let o=0,r=0;o<i;++o){const s=n[o];c(s)&&(s._index=r++,t.push(s))}e._billboards=t}}let LN;function _Ie(e){let n=e.cache.billboardCollection_indexBufferBatched;if(c(n))return n;const o=new Uint16Array(98298);for(let r=0,s=0;r<98298;r+=6,s+=4)o[r]=s,o[r+1]=s+1,o[r+2]=s+2,o[r+3]=s+0,o[r+4]=s+2,o[r+5]=s+3;return n=yn.createIndexBuffer({context:e,typedArray:o,usage:At.STATIC_DRAW,indexDatatype:Ot.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=n,n}function gIe(e){let t=e.cache.billboardCollection_indexBufferInstanced;return c(t)||(t=yn.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:At.STATIC_DRAW,indexDatatype:Ot.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function yIe(e){let t=e.cache.billboardCollection_vertexBufferInstanced;return c(t)||(t=yn.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:At.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}Object.defineProperties(Zl.prototype,{length:{get:function(){return RN(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}}}),Zl.prototype.add=function(e){const t=new Qo(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t},Zl.prototype.remove=function(e){return!!this.contains(e)&&(this._billboards[e._index]=void 0,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},Zl.prototype.removeAll=function(){D6(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},Zl.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},Zl.prototype.contains=function(e){return c(e)&&e._billboardCollection===this},Zl.prototype.get=function(e){return A.typeOf.number("index",e),RN(this),this._billboards[e]},Zl.prototype.computeNewBuffersUsage=function(){const e=this._buffersUsage;let t=!1;const n=this._propertiesChanged;for(let i=0;i<ON;++i){const o=0===n[i]?At.STATIC_DRAW:At.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};const NN=new Vi;function P6(e,t,n,i,o){let r;const s=i[uo.positionHighAndScale],a=i[uo.positionLowAndRotation],l=o._getActualPosition();e._mode===ce.SCENE3D&&(Ae.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),Vi.fromCartesian(l,NN);const u=o.scale,d=o.rotation;0!==d&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);const h=NN.high,m=NN.low;e._instanced?(r=o._index,s(r,h.x,h.y,h.z,u),a(r,m.x,m.y,m.z,d)):(r=4*o._index,s(r+0,h.x,h.y,h.z,u),s(r+1,h.x,h.y,h.z,u),s(r+2,h.x,h.y,h.z,u),s(r+3,h.x,h.y,h.z,u),a(r+0,m.x,m.y,m.z,d),a(r+1,m.x,m.y,m.z,d),a(r+2,m.x,m.y,m.z,d),a(r+3,m.x,m.y,m.z,d))}const $l=new V,Kl=32768,W0=65536,MN=4096,ef=256,TIe=128,AIe=32,xIe=8,O6=4,CIe=1/256,R6=0,L6=2,N6=3,M6=1;function F6(e,t,n,i,o){let r;const s=i[uo.compressedAttribute0],a=o.pixelOffset,l=a.x,u=a.y,d=o._translate,h=d.x,m=d.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(l+h),Math.abs(-u+m));const _=o.horizontalOrigin;let p=o._verticalOrigin,y=o.show&&o.clusterShow;0===o.color.alpha&&(y=!1),p===lo.BASELINE&&(p=lo.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&_===Da.CENTER,e._allVerticalCenter=e._allVerticalCenter&&p===lo.CENTER;let b=0,x=0,C=0,w=0;const v=o._imageIndex;if(-1!==v){const G=n[v];if(!c(G))throw new E(`Invalid billboard image index: ${v}`);b=G.x,x=G.y,C=G.width,w=G.height}const I=b+C,P=x+w;let N=Math.floor(O.clamp(l,-Kl,Kl)+Kl)*TIe;N+=(_+1)*AIe,N+=(p+1)*xIe,N+=(y?1:0)*O6;let R=Math.floor(O.clamp(u,-Kl,Kl)+Kl)*ef,B=Math.floor(O.clamp(h,-Kl,Kl)+Kl)*ef;const F=(O.clamp(m,-Kl,Kl)+Kl)*CIe,S=Math.floor(F);R+=S,B+=Math.floor((F-S)*ef),$l.x=b,$l.y=x;const L=wi.compressTextureCoordinates($l);$l.x=I;const M=wi.compressTextureCoordinates($l);$l.y=P;const U=wi.compressTextureCoordinates($l);$l.x=b;const z=wi.compressTextureCoordinates($l);e._instanced?(r=o._index,s(r,N,R,B,L)):(r=4*o._index,s(r+0,N+R6,R,B,L),s(r+1,N+L6,R,B,M),s(r+2,N+N6,R,B,U),s(r+3,N+M6,R,B,z))}function B6(e,t,n,i,o){let r;const s=i[uo.compressedAttribute1],a=o.alignedAxis;f.equals(a,f.ZERO)||(e._shaderAlignedAxis=!0);let l=0,u=1,d=1,h=1;const m=o.translucencyByDistance;c(m)&&(l=m.near,u=m.nearValue,d=m.far,h=m.farValue,(1!==u||1!==h)&&(e._shaderTranslucencyByDistance=!0));let _=0;const p=o._imageIndex;if(-1!==p){const w=n[p];if(!c(w))throw new E(`Invalid billboard image index: ${p}`);_=w.width}const b=Math.round(g(o.width,e._textureAtlas.texture.width*_));e._maxSize=Math.max(e._maxSize,b);let x=O.clamp(b,0,W0),C=0;Math.abs(f.magnitudeSquared(a)-1)<O.EPSILON6&&(C=wi.octEncodeFloat(a)),u=O.clamp(u,0,1),u=1===u?255:255*u|0,x=x*ef+u,h=O.clamp(h,0,1),h=1===h?255:255*h|0,C=C*ef+h,e._instanced?(r=o._index,s(r,x,C,l,d)):(r=4*o._index,s(r+0,x,C,l,d),s(r+1,x,C,l,d),s(r+2,x,C,l,d),s(r+3,x,C,l,d))}function FN(e,t,n,i,o){let r;const s=i[uo.compressedAttribute2],a=o.color,l=c(e._batchTable)?Z.WHITE:o.getPickId(t.context).color,u=o.sizeInMeters?1:0,d=Math.abs(f.magnitudeSquared(o.alignedAxis)-1)<O.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&1===u;let h=0;const m=o._imageIndex;if(-1!==m){const N=n[m];if(!c(N))throw new E(`Invalid billboard image index: ${m}`);h=N.height}const p=Math.round(g(o.height,e._textureAtlas.texture.dimensions.y*h));e._maxSize=Math.max(e._maxSize,p);let y=g(o._labelHorizontalOrigin,-2);y+=2;const b=p*O6+y;let x=Z.floatToByte(a.red),C=Z.floatToByte(a.green),w=Z.floatToByte(a.blue);const v=x*W0+C*ef+w;x=Z.floatToByte(l.red),C=Z.floatToByte(l.green),w=Z.floatToByte(l.blue);const I=x*W0+C*ef+w;let P=Z.floatToByte(a.alpha)*W0+Z.floatToByte(l.alpha)*ef;P+=2*u+d,e._instanced?(r=o._index,s(r,v,I,P,b)):(r=4*o._index,s(r+0,v,I,P,b),s(r+1,v,I,P,b),s(r+2,v,I,P,b),s(r+3,v,I,P,b))}function BN(e,t,n,i,o){let r;const s=i[uo.eyeOffset],a=o.eyeOffset;let l=a.z;if(o._heightReference!==tn.NONE&&(l*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(a.x),Math.abs(a.y),Math.abs(l)),e._instanced){let u=0,d=0;const h=o._imageIndex;if(-1!==h){const _=n[h];if(!c(_))throw new E(`Invalid billboard image index: ${h}`);u=_.width,d=_.height}$l.x=u,$l.y=d;const m=wi.compressTextureCoordinates($l);r=o._index,s(r,a.x,a.y,l,m)}else r=4*o._index,s(r+0,a.x,a.y,l,0),s(r+1,a.x,a.y,l,0),s(r+2,a.x,a.y,l,0),s(r+3,a.x,a.y,l,0)}function k6(e,t,n,i,o){let r;const s=i[uo.scaleByDistance];let a=0,l=1,u=1,d=1;const h=o.scaleByDistance;c(h)&&(a=h.near,l=h.nearValue,u=h.far,d=h.farValue,(1!==l||1!==d)&&(e._shaderScaleByDistance=!0)),e._instanced?(r=o._index,s(r,a,l,u,d)):(r=4*o._index,s(r+0,a,l,u,d),s(r+1,a,l,u,d),s(r+2,a,l,u,d),s(r+3,a,l,u,d))}function U6(e,t,n,i,o){let r;const s=i[uo.pixelOffsetScaleByDistance];let a=0,l=1,u=1,d=1;const h=o.pixelOffsetScaleByDistance;c(h)&&(a=h.near,l=h.nearValue,u=h.far,d=h.farValue,(1!==l||1!==d)&&(e._shaderPixelOffsetScaleByDistance=!0)),e._instanced?(r=o._index,s(r,a,l,u,d)):(r=4*o._index,s(r+0,a,l,u,d),s(r+1,a,l,u,d),s(r+2,a,l,u,d),s(r+3,a,l,u,d))}function z6(e,t,n,i,o){let r;const s=i[uo.compressedAttribute3];let a=0,l=Number.MAX_VALUE;const u=o.distanceDisplayCondition;c(u)&&(a=u.near,l=u.far,a*=a,l*=l,e._shaderDistanceDisplayCondition=!0);let d=o.disableDepthTestDistance;const h=X_(o.heightReference)&&t.context.depthTexture;let m,_;if(c(d)||(d=h?5e3:0),d*=d,(h||d>0)&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1)),c(o._labelDimensions))_=o._labelDimensions.x,m=o._labelDimensions.y;else{let x=0,C=0;const w=o._imageIndex;if(-1!==w){const I=n[w];if(!c(I))throw new E(`Invalid billboard image index: ${w}`);x=I.height,C=I.width}m=Math.round(g(o.height,e._textureAtlas.texture.dimensions.y*x)),_=Math.round(g(o.width,e._textureAtlas.texture.width*C))}const p=Math.floor(O.clamp(_,0,MN)),y=Math.floor(O.clamp(m,0,MN)),b=p*MN+y;e._instanced?(r=o._index,s(r,a,l,d,b)):(r=4*o._index,s(r+0,a,l,d,b),s(r+1,a,l,d,b),s(r+2,a,l,d,b),s(r+3,a,l,d,b))}function V6(e,t,n,i,o){if(X_(o.heightReference)){const p=e._scene,y=t.context,b=t.globeTranslucencyState.translucent,x=c(p.globe)&&p.globe.depthTestAgainstTerrain;e._shaderClampToGround=y.depthTexture&&!b&&x}let r;const s=i[uo.textureCoordinateBoundsOrLabelTranslate];if(dn.maximumVertexTextureImageUnits>0){let p=0,y=0;return c(o._labelTranslate)&&(p=o._labelTranslate.x,y=o._labelTranslate.y),void(e._instanced?(r=o._index,s(r,p,y,0,0)):(r=4*o._index,s(r+0,p,y,0,0),s(r+1,p,y,0,0),s(r+2,p,y,0,0),s(r+3,p,y,0,0)))}let a=0,l=0,u=0,d=0;const h=o._imageIndex;if(-1!==h){const p=n[h];if(!c(p))throw new E(`Invalid billboard image index: ${h}`);a=p.x,l=p.y,u=p.width,d=p.height}const m=a+u,_=l+d;e._instanced?(r=o._index,s(r,a,l,m,_)):(r=4*o._index,s(r+0,a,l,m,_),s(r+1,a,l,m,_),s(r+2,a,l,m,_),s(r+3,a,l,m,_))}function H6(e,t,n,i,o){if(!e._sdf)return;let r;const s=i[uo.sdf],a=o.outlineColor,l=o.outlineWidth,u=Z.floatToByte(a.red),d=Z.floatToByte(a.green),h=Z.floatToByte(a.blue),m=u*W0+d*ef+h,_=l/al.RADIUS,p=Z.floatToByte(a.alpha)*W0+Z.floatToByte(_)*ef;e._instanced?(r=o._index,s(r,m,p)):(r=4*o._index,s(r+0,m+R6,p),s(r+1,m+L6,p),s(r+2,m+N6,p),s(r+3,m+M6,p))}function wIe(e,t,n,i,o){P6(e,0,0,i,o),F6(e,0,n,i,o),B6(e,0,n,i,o),FN(e,t,n,i,o),BN(e,0,n,i,o),k6(e,0,0,i,o),U6(e,0,0,i,o),z6(e,t,n,i,o),V6(e,t,n,i,o),function EIe(e,t,n,i,o){if(!c(e._batchTable))return;const r=i[uo.a_batchId],s=o._batchIndex;let a;e._instanced?(a=o._index,r(a,s)):(a=4*o._index,r(a+0,s),r(a+1,s),r(a+2,s),r(a+3,s))}(e,0,0,i,o),H6(e,0,0,i,o)}function kN(e,t,n,i,o,r){let s;i.mode===ce.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;const a=[];for(let l=0;l<n;++l){const u=t[l],h=Qo._computeActualPosition(u,u.position,i,o);c(h)&&(u._setActualPosition(h),r?a.push(h):Ae.expand(s,h,s))}r&&Ae.fromPoints(a,s)}const DIe=[];Zl.prototype.update=function(e){if(RN(this),!this.show)return;let t=this._billboards,n=t.length;const i=e.context;this._instanced=i.instancedArrays,uo=this._instanced?mIe:pIe,LN=this._instanced?gIe:_Ie;let o=this._textureAtlas;if(!c(o)){o=this._textureAtlas=new PN({context:i});for(let R=0;R<n;++R)t[R]._loadImage()}const r=o.textureCoordinates;if(0===r.length)return;(function SIe(e,t){const n=t.mode,i=e._billboards,o=e._billboardsToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==ce.SCENE3D&&!k.equals(r,e.modelMatrix)?(e._mode=n,k.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===ce.SCENE3D||n===ce.SCENE2D||n===ce.COLUMBUS_VIEW)&&kN(e,i,i.length,t,r,!0)):n===ce.MORPHING?kN(e,i,i.length,t,r,!0):(n===ce.SCENE2D||n===ce.COLUMBUS_VIEW)&&kN(e,o,e._billboardsToUpdateIndex,t,r,!1)})(this,e),t=this._billboards,n=t.length;const s=this._billboardsToUpdate,a=this._billboardsToUpdateIndex,l=this._propertiesChanged,u=o.guid,d=this._createVertexArray||this._textureAtlasGUID!==u;let h;this._textureAtlasGUID=u;const m=e.passes;if(d||!m.pick&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let R=0;R<ON;++R)l[R]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=function bIe(e,t,n,i,o,r){const s=[{index:uo.positionHighAndScale,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[ox]},{index:uo.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[ox]},{index:uo.compressedAttribute0,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[A6]},{index:uo.compressedAttribute1,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[w6]},{index:uo.compressedAttribute2,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[C6]},{index:uo.eyeOffset,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[x6]},{index:uo.scaleByDistance,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[E6]},{index:uo.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[S6]},{index:uo.compressedAttribute3,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[v6]},{index:uo.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[hIe]}];return i&&s.push({index:uo.direction,componentsPerAttribute:2,componentDatatype:ee.FLOAT,vertexBuffer:yIe(e)}),c(o)&&s.push({index:uo.a_batchId,componentsPerAttribute:1,componentDatatype:ee.FLOAT,bufferUsage:At.STATIC_DRAW}),r&&s.push({index:uo.sdf,componentsPerAttribute:2,componentDatatype:ee.FLOAT,usage:n[I6]}),new f6(e,s,i?t:4*t,i)}(i,n,this._buffersUsage,this._instanced,this._batchTable,this._sdf),h=this._vaf.writers;for(let R=0;R<n;++R){const B=this._billboards[R];B._dirty=!1,wIe(this,e,r,h,B)}this._vaf.commit(LN(i))}this._billboardsToUpdateIndex=0}else if(a>0){const R=DIe;R.length=0,(l[ox]||l[uIe]||l[lIe])&&R.push(P6),(l[rx]||l[A6]||l[aIe]||l[cIe]||l[sIe])&&(R.push(F6),this._instanced&&R.push(BN)),(l[rx]||l[dIe]||l[w6])&&(R.push(B6),R.push(FN)),(l[rx]||l[C6])&&R.push(FN),l[x6]&&R.push(BN),l[E6]&&R.push(k6),l[S6]&&R.push(U6),(l[v6]||l[fIe]||l[rx]||l[ox])&&R.push(z6),(l[rx]||l[ox])&&R.push(V6),l[I6]&&R.push(H6);const B=R.length;if(h=this._vaf.writers,a/n>.1){for(let F=0;F<a;++F){const S=s[F];S._dirty=!1;for(let D=0;D<B;++D)R[D](this,e,r,h,S)}this._vaf.commit(LN(i))}else{for(let F=0;F<a;++F){const S=s[F];S._dirty=!1;for(let D=0;D<B;++D)R[D](this,e,r,h,S);this._instanced?this._vaf.subCommit(S._index,1):this._vaf.subCommit(4*S._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(a>1.5*n&&(s.length=n),!c(this._vaf)||!c(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,Ae.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let p,y=k.IDENTITY;e.mode===ce.SCENE3D?(y=this.modelMatrix,p=Ae.clone(this._baseVolumeWC,this._boundingVolume)):p=Ae.clone(this._baseVolume2D,this._boundingVolume),function vIe(e,t,n){let i=1;(!e._allSizedInMeters||0!==e._maxPixelOffset)&&(i=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight));let o=i*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(o*=.5),n.radius+=o+(i*e._maxPixelOffset+e._maxEyeOffset)}(this,e,p);const b=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,b){this._rsOpaque=this._blendOption===Ar.OPAQUE||this._blendOption===Ar.OPAQUE_AND_TRANSLUCENT?Lt.fromCache({depthTest:{enabled:!0,func:ie.LESS},depthMask:!0}):void 0;const R=this._blendOption===Ar.TRANSLUCENT;this._rsTranslucent=this._blendOption===Ar.TRANSLUCENT||this._blendOption===Ar.OPAQUE_AND_TRANSLUCENT?Lt.fromCache({depthTest:{enabled:!0,func:R?ie.LEQUAL:ie.LESS},depthMask:R,blending:eo.ALPHA_BLEND}):void 0}let x,C,w,v,I;this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance;const P=dn.maximumVertexTextureImageUnits>0;if(b||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){x="#ifdef INSTANCED\nin vec2 direction;\n#endif\nin vec4 positionHighAndScale;\nin vec4 positionLowAndRotation;\nin vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)\nin vec4 compressedAttribute1; // aligned axis, translucency by distance, image width\nin vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free\nin vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)\nin vec4 scaleByDistance; // near, nearScale, far, farScale\nin vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale\nin vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions\nin vec2 sdf; // sdf outline color (rgb) and width (w)\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\nin vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates\n#endif\n#ifdef VECTOR_TILE\nin float a_batchId;\n#endif\n\nout vec2 v_textureCoordinates;\n#ifdef FRAGMENT_DEPTH_CHECK\nout vec4 v_textureCoordinateBounds;\nout vec4 v_originTextureCoordinateAndTranslate;\nout vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\nout mat2 v_rotationMatrix;\n#endif\n\nout vec4 v_pickColor;\nout vec4 v_color;\n#ifdef SDF\nout vec4 v_outlineColor;\nout float v_outlineWidth;\n#endif\n\nconst float UPPER_BOUND = 32768.0;\n\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\n\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\n\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n{\n // Note the halfSize cannot be computed in JavaScript because it is sent via\n // compressed vertex attributes that coerce it to an integer.\n vec2 halfSize = imageSize * scale * 0.5;\n halfSize *= ((direction * 2.0) - 1.0);\n\n vec2 originTranslate = origin * abs(halfSize);\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n if (validAlignedAxis || rotation != 0.0)\n {\n float angle = rotation;\n if (validAlignedAxis)\n {\n vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);\n angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n }\n\n float cosTheta = cos(angle);\n float sinTheta = sin(angle);\n rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\n halfSize = rotationMatrix * halfSize;\n }\n else\n {\n rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\n mpp = czm_metersPerPixel(positionEC);\n positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\n positionEC.xy += (translate + pixelOffset) * mpp;\n\n return positionEC;\n}\n\n#ifdef VERTEX_DEPTH_CHECK\nfloat getGlobeDepth(vec4 positionEC)\n{\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n\n float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n\n if (globeDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\nvoid main()\n{\n // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndScale.xyz;\n vec3 positionLow = positionLowAndRotation.xyz;\n float scale = positionHighAndScale.w;\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n float rotation = positionLowAndRotation.w;\n#else\n float rotation = 0.0;\n#endif\n\n float compressed = compressedAttribute0.x;\n\n vec2 pixelOffset;\n pixelOffset.x = floor(compressed * SHIFT_RIGHT7);\n compressed -= pixelOffset.x * SHIFT_LEFT7;\n pixelOffset.x -= UPPER_BOUND;\n\n vec2 origin;\n origin.x = floor(compressed * SHIFT_RIGHT5);\n compressed -= origin.x * SHIFT_LEFT5;\n\n origin.y = floor(compressed * SHIFT_RIGHT3);\n compressed -= origin.y * SHIFT_LEFT3;\n\n#ifdef FRAGMENT_DEPTH_CHECK\n vec2 depthOrigin = origin.xy;\n#endif\n origin -= vec2(1.0);\n\n float show = floor(compressed * SHIFT_RIGHT2);\n compressed -= show * SHIFT_LEFT2;\n\n#ifdef INSTANCED\n vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\n vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n#else\n vec2 direction;\n direction.x = floor(compressed * SHIFT_RIGHT1);\n direction.y = compressed - direction.x * SHIFT_LEFT1;\n\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\n\n float temp = compressedAttribute0.y * SHIFT_RIGHT8;\n pixelOffset.y = -(floor(temp) - UPPER_BOUND);\n\n vec2 translate;\n translate.y = (temp - floor(temp)) * SHIFT_LEFT16;\n\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n translate.x = floor(temp) - UPPER_BOUND;\n\n translate.y += (temp - floor(temp)) * SHIFT_LEFT8;\n translate.y -= UPPER_BOUND;\n\n temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\n\n vec2 imageSize = vec2(floor(temp), temp2);\n\n#ifdef FRAGMENT_DEPTH_CHECK\n float labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\n float applyTranslate = 0.0;\n if (labelHorizontalOrigin != 0.0) // is a billboard, so set apply translate to false\n {\n applyTranslate = 1.0;\n labelHorizontalOrigin -= 2.0;\n depthOrigin.x = labelHorizontalOrigin + 1.0;\n }\n\n depthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n#endif\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\n temp = compressedAttribute3.w;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 dimensions;\n dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n dimensions.x = floor(temp);\n#endif\n\n#ifdef ALIGNED_AXIS\n vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\n temp = compressedAttribute2.z * SHIFT_RIGHT5;\n bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\n vec3 alignedAxis = vec3(0.0);\n bool validAlignedAxis = false;\n#endif\n\n vec4 pickColor;\n vec4 color;\n\n temp = compressedAttribute2.y;\n temp = temp * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n\n temp = compressedAttribute2.x;\n temp = temp * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n temp = compressedAttribute2.z * SHIFT_RIGHT8;\n bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\n temp = floor(temp) * SHIFT_RIGHT8;\n\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor /= 255.0;\n\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n\n#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\n float eyeDepth = positionEC.z;\n#endif\n\n positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n positionEC.xyz *= show;\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\n scale *= distanceScale;\n translate *= distanceScale;\n // push vertex behind near plane for clipping\n if (scale == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\n float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\n pixelOffset *= pixelOffsetScale;\n#endif\n\n#ifdef DISTANCE_DISPLAY_CONDITION\n float nearSq = compressedAttribute3.x;\n float farSq = compressedAttribute3.y;\n if (lengthSq < nearSq || lengthSq > farSq)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n mat2 rotationMatrix;\n float mpp;\n\n#ifdef DISABLE_DEPTH_DISTANCE\n float disableDepthTestDistance = compressedAttribute3.z;\n#endif\n\n#ifdef VERTEX_DEPTH_CHECK\nif (lengthSq < disableDepthTestDistance) {\n float depthsilon = 10.0;\n\n vec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\n vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth1 = getGlobeDepth(pEC1);\n\n if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n {\n vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth2 = getGlobeDepth(pEC2);\n\n if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n {\n vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth3 = getGlobeDepth(pEC3);\n if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n {\n positionEC.xyz = vec3(0.0);\n }\n }\n }\n}\n#endif\n\n positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n gl_Position = czm_projection * positionEC;\n v_textureCoordinates = textureCoordinates;\n\n#ifdef LOG_DEPTH\n czm_vertexLogDepth();\n#endif\n\n#ifdef DISABLE_DEPTH_DISTANCE\n if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n {\n disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n }\n\n if (disableDepthTestDistance != 0.0)\n {\n // Don't try to \"multiply both sides\" by w. Greater/less-than comparisons won't work for negative values of w.\n float zclip = gl_Position.z / gl_Position.w;\n bool clipped = (zclip < -1.0 || zclip > 1.0);\n if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n {\n // Position z on the near plane.\n gl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0;\n#endif\n }\n }\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\n if (sizeInMeters) {\n translate /= mpp;\n dimensions /= mpp;\n imageSize /= mpp;\n }\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n v_rotationMatrix = rotationMatrix;\n#else\n v_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n#endif\n\n float enableDepthCheck = 0.0;\n if (lengthSq < disableDepthTestDistance)\n {\n enableDepthCheck = 1.0;\n }\n\n float dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\n float dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\n\n float iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\n float ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\n\n v_compressed.x = eyeDepth;\n v_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\n v_compressed.z = dw * SHIFT_LEFT12 + dh;\n v_compressed.w = iw * SHIFT_LEFT12 + ih;\n v_originTextureCoordinateAndTranslate.xy = depthOrigin;\n v_originTextureCoordinateAndTranslate.zw = translate;\n v_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n\n#endif\n\n#ifdef SDF\n vec4 outlineColor;\n float outlineWidth;\n\n temp = sdf.x;\n temp = temp * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n\n temp = sdf.y;\n temp = temp * SHIFT_RIGHT8;\n float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.a = floor(temp);\n outlineColor /= 255.0;\n\n v_outlineWidth = outlineWidth / 255.0;\n v_outlineColor = outlineColor;\n v_outlineColor.a *= translucency;\n#endif\n\n v_pickColor = pickColor;\n\n v_color = color;\n v_color.a *= translucency;\n\n}\n",C='uniform sampler2D u_atlas;\n\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\n\nin vec2 v_textureCoordinates;\nin vec4 v_pickColor;\nin vec4 v_color;\n\n#ifdef SDF\nin vec4 v_outlineColor;\nin float v_outlineWidth;\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\nin vec4 v_textureCoordinateBounds; // the min and max x and y values for the texture coordinates\nin vec4 v_originTextureCoordinateAndTranslate; // texture coordinate at the origin, billboard translate (used for label glyphs)\nin vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\nin mat2 v_rotationMatrix;\n\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT1 = 2.0;\n\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\n\nfloat getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize)\n{\n vec2 lookupVector = imageSize * (depthLookupST - adjustedST);\n lookupVector = v_rotationMatrix * lookupVector;\n vec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y)); // aligns label glyph with bounding rectangle. Will be zero for billboards because dimensions and imageSize will be equal\n\n vec2 translation = v_originTextureCoordinateAndTranslate.zw;\n\n if (applyTranslate)\n {\n // this is only needed for labels where the horizontal origin is not LEFT\n // it moves the label back to where the "origin" should be since all label glyphs are set to HorizontalOrigin.LEFT\n translation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0));\n }\n\n vec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;\n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));\n\n if (logDepthOrDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\n\n\n#ifdef SDF\n\n// Get the distance from the edge of a glyph at a given position sampling an SDF texture.\nfloat getDistance(vec2 position)\n{\n return texture(u_atlas, position).r;\n}\n\n// Samples the sdf texture at the given position and produces a color based on the fill color and the outline.\nvec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)\n{\n float distance = getDistance(position);\n\n if (outlineWidth > 0.0)\n {\n // Don\'t get the outline edge exceed the SDF_EDGE\n float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);\n float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\n vec4 sdfColor = mix(outlineColor, v_color, outlineFactor);\n float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);\n return vec4(sdfColor.rgb, sdfColor.a * alpha);\n }\n else\n {\n float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\n return vec4(v_color.rgb, v_color.a * alpha);\n }\n}\n#endif\n\nvoid main()\n{\n vec4 color = texture(u_atlas, v_textureCoordinates);\n\n#ifdef SDF\n float outlineWidth = v_outlineWidth;\n vec4 outlineColor = v_outlineColor;\n\n // Get the current distance\n float distance = getDistance(v_textureCoordinates);\n\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n float smoothing = fwidth(distance);\n // Get an offset that is approximately half the distance to the neighbor pixels\n // 0.354 is approximately half of 1/sqrt(2)\n vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));\n\n // Sample the center point\n vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n\n // Sample the 4 neighbors\n vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\n\n // Equally weight the center sample and the 4 neighboring samples\n color = (center + color1 + color2 + color3 + color4)/5.0;\n#else\n // If no derivatives available (IE 10?), just do a single sample\n float smoothing = 1.0/32.0;\n color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n#endif\n\n color = czm_gammaCorrect(color);\n#else\n color = czm_gammaCorrect(color);\n color *= czm_gammaCorrect(v_color);\n#endif\n\n// Fully transparent parts of the billboard are not pickable.\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\n if (color.a < 0.005) // matches 0/255 and 1/255\n {\n discard;\n }\n#else\n// The billboard is rendered twice. The opaque pass discards translucent fragments\n// and the translucent pass discards opaque fragments.\n#ifdef OPAQUE\n if (color.a < 0.995) // matches < 254/255\n {\n discard;\n }\n#else\n if (color.a >= 0.995) // matches 254/255 and 255/255\n {\n discard;\n }\n#endif\n#endif\n\n#ifdef VECTOR_TILE\n color *= u_highlightColor;\n#endif\n out_FragColor = color;\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth();\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\n float temp = v_compressed.y;\n\n temp = temp * SHIFT_RIGHT1;\n\n float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;\n bool enableDepthTest = temp2 != 0.0;\n bool applyTranslate = floor(temp) != 0.0;\n\n if (enableDepthTest) {\n temp = v_compressed.z;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 dimensions;\n dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n dimensions.x = floor(temp);\n\n temp = v_compressed.w;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 imageSize;\n imageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;\n imageSize.x = floor(temp);\n\n vec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;\n adjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);\n\n float epsilonEyeDepth = v_compressed.x + czm_epsilon1;\n float globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);\n\n // negative values go into the screen\n if (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)\n {\n float globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize); // top left corner\n if (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)\n {\n float globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize); // top right corner\n if (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)\n {\n discard;\n }\n }\n }\n }\n#endif\n\n}\n',I=[],c(this._batchTable)&&(I.push("VECTOR_TILE"),x=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(x),C=this._batchTable.getFragmentShaderCallback(!1,void 0)(C)),w=new St({defines:I,sources:[x]}),this._instanced&&w.defines.push("INSTANCED"),this._shaderRotation&&w.defines.push("ROTATION"),this._shaderAlignedAxis&&w.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&w.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&w.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&w.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&w.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&w.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&w.defines.push(P?"VERTEX_DEPTH_CHECK":"FRAGMENT_DEPTH_CHECK");const R=1-al.CUTOFF;this._sdf&&w.defines.push("SDF");const B=c(this._batchTable)?"VECTOR_TILE":"";this._blendOption===Ar.OPAQUE_AND_TRANSLUCENT&&(v=new St({defines:["OPAQUE",B],sources:[C]}),this._shaderClampToGround&&v.defines.push(P?"VERTEX_DEPTH_CHECK":"FRAGMENT_DEPTH_CHECK"),this._sdf&&(v.defines.push("SDF"),v.defines.push(`SDF_EDGE ${R}`)),this._sp=di.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:w,fragmentShaderSource:v,attributeLocations:uo}),v=new St({defines:["TRANSLUCENT",B],sources:[C]}),this._shaderClampToGround&&v.defines.push(P?"VERTEX_DEPTH_CHECK":"FRAGMENT_DEPTH_CHECK"),this._sdf&&(v.defines.push("SDF"),v.defines.push(`SDF_EDGE ${R}`)),this._spTranslucent=di.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:w,fragmentShaderSource:v,attributeLocations:uo})),this._blendOption===Ar.OPAQUE&&(v=new St({defines:[B],sources:[C]}),this._shaderClampToGround&&v.defines.push(P?"VERTEX_DEPTH_CHECK":"FRAGMENT_DEPTH_CHECK"),this._sdf&&(v.defines.push("SDF"),v.defines.push(`SDF_EDGE ${R}`)),this._sp=di.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:w,fragmentShaderSource:v,attributeLocations:uo})),this._blendOption===Ar.TRANSLUCENT&&(v=new St({defines:[B],sources:[C]}),this._shaderClampToGround&&v.defines.push(P?"VERTEX_DEPTH_CHECK":"FRAGMENT_DEPTH_CHECK"),this._sdf&&(v.defines.push("SDF"),v.defines.push(`SDF_EDGE ${R}`)),this._spTranslucent=di.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:w,fragmentShaderSource:v,attributeLocations:uo})),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}const N=e.commandList;if(m.render||m.pick){const R=this._colorCommands,B=this._blendOption===Ar.OPAQUE,F=this._blendOption===Ar.OPAQUE_AND_TRANSLUCENT,S=this._vaf.va,D=S.length;let M,L=this._uniforms;c(this._batchTable)?(L=this._batchTable.getUniformMapCallback()(L),M=this._batchTable.getPickId()):M="v_pickColor",R.length=D;const U=F?2*D:D;for(let z=0;z<U;++z){let G=R[z];c(G)||(G=R[z]=new $t);const W=B||F&&z%2==0;G.pass=W||!F?Ue.OPAQUE:Ue.TRANSLUCENT,G.owner=this;const q=F?Math.floor(z/2):z;G.boundingVolume=p,G.modelMatrix=y,G.count=S[q].indicesCount,G.shaderProgram=W?this._sp:this._spTranslucent,G.uniformMap=L,G.vertexArray=S[q].va,G.renderState=W?this._rsOpaque:this._rsTranslucent,G.debugShowBoundingVolume=this.debugShowBoundingVolume,G.pickId=M,this._instanced&&(G.count=6,G.instanceCount=n),N.push(G)}this.debugShowTextureAtlas&&(c(this.debugCommand)||(this.debugCommand=function IIe(e,t){const i=t.createViewportQuadCommand("uniform sampler2D billboard_texture; \nin vec2 v_textureCoordinates; \nvoid main() \n{ \n out_FragColor = texture(billboard_texture, v_textureCoordinates); \n} \n",{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}});return i.pass=Ue.OVERLAY,i}(this,e.context)),N.push(this.debugCommand))}},Zl.prototype.isDestroyed=function(){return!1},Zl.prototype.destroy=function(){return c(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),D6(this._billboards),Xe(this)};const sx=Zl,G6=function PIe(e,t,n,i,o){return function(){const r=document.createElement("canvas"),s=o+2*i;r.height=r.width=s;const a=r.getContext("2d");return a.clearRect(0,0,s,s),0!==i&&(a.beginPath(),a.arc(s/2,s/2,s/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=n,a.fill(),e<1&&(a.save(),a.globalCompositeOperation="destination-out",a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle="black",a.fill(),a.restore())),a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=t,a.fill(),r}};function Us(e,t,n,i,o){this._content=e,this._billboard=n,this._label=i,this._polyline=o,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),q0(this)}const OIe=new Ce;function q0(e){const t=e._billboard;if(c(e._billboardImage)&&e._billboardImage!==t.image)return void(t.image=e._billboardImage);if(c(e._billboardImage))return;const n=g(e._color,Us.defaultColor),i=g(e._pointOutlineColor,Us.defaultPointOutlineColor),o=g(e._pointOutlineWidth,Us.defaultPointOutlineWidth),r=g(e._pointSize,Us.defaultPointSize),a=e._billboardOutlineColor,l=e._billboardOutlineWidth,u=e._billboardSize;if(Z.equals(n,e._billboardColor)&&Z.equals(i,a)&&o===l&&r===u)return;e._billboardColor=Z.clone(n,e._billboardColor),e._billboardOutlineColor=Z.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=o,e._billboardSize=r;const d=n.alpha,h=n.toCssColorString(),m=i.toCssColorString(),_=JSON.stringify([h,r,m,o]);t.setImage(_,G6(d,h,m,o,r))}Object.defineProperties(Us.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=Z.clone(e,this._color),q0(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,q0(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=Z.clone(e,this._pointOutlineColor),q0(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,q0(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},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){c(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){const t=g(this._heightOffset,0),n=this._content.tileset.ellipsoid,i=n.cartesianToCartographic(this._billboard.position,OIe);i.height=i.height-t+e;const 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=Z.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){const t=this._billboardImage!==e;this._billboardImage=e,t&&q0(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(){const e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}}),Us.defaultColor=Z.WHITE,Us.defaultPointOutlineColor=Z.BLACK,Us.defaultPointOutlineWidth=0,Us.defaultPointSize=8,Us.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},Us.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)},Us.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},Us.prototype.getPropertyInherited=function(e){return v_.getPropertyInherited(this._content,this._batchId,e)},Us.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},Us.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},Us.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},Us.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};const ax=Us;let og;const j6=function LIe(e,t){if(!c(e))throw new E("text is required.");if(""===e)return;t=g(t,g.EMPTY_OBJECT);const n=g(t.font,"10px sans-serif"),i=g(t.stroke,!1),o=g(t.fill,!0),r=g(t.strokeWidth,1),s=g(t.backgroundColor,Z.TRANSPARENT),a=g(t.padding,0),l=2*a,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=n;const d=u.getContext("2d",{willReadFrequently:!0});c(og)||(c(d.imageSmoothingEnabled)?og="imageSmoothingEnabled":c(d.mozImageSmoothingEnabled)?og="mozImageSmoothingEnabled":c(d.webkitImageSmoothingEnabled)?og="webkitImageSmoothingEnabled":c(d.msImageSmoothingEnabled)&&(og="msImageSmoothingEnabled")),d.font=n,d.lineJoin="round",d.lineWidth=r,d[og]=!1,u.style.visibility="hidden",document.body.appendChild(u);const h=function RIe(e,t,n,i,o){const r=e.measureText(t);if(/\S/.test(t)){const a=document.defaultView.getComputedStyle(e.canvas).getPropertyValue("font-size").replace("px",""),l=document.createElement("canvas"),u=100,d=r.width+u|0,h=3*a,m=h/2;l.width=d,l.height=h;const _=l.getContext("2d");_.font=n,_.fillStyle="white",_.fillRect(0,0,l.width+1,l.height+1),i&&(_.strokeStyle="black",_.lineWidth=e.lineWidth,_.strokeText(t,u/2,m)),o&&(_.fillStyle="black",_.fillText(t,u/2,m));const p=_.getImageData(0,0,d,h).data,y=p.length,b=4*d;let x,C,w,v;for(x=0;x<y;++x)if(255!==p[x]){w=x/b|0;break}for(x=y-1;x>=0;--x)if(255!==p[x]){v=x/b|0;break}let I=-1;for(x=0;x<d&&-1===I;++x)for(C=0;C<h;++C){const P=4*x+C*b;if(255!==p[P]||255!==p[P+1]||255!==p[P+2]||255!==p[P+3]){I=x;break}}return{width:r.width,height:v-w,ascent:m-w,descent:v-m,minx:I-u/2}}return{width:r.width,height:0,ascent:0,descent:0,minx:0}}(d,e,n,i,o);u.dimensions=h,document.body.removeChild(u),u.style.visibility="";const m=-h.minx,_=Math.ceil(h.width)+m+l,p=h.height+l,b=p-(p-h.ascent+a)+l;if(u.width=_,u.height=p,d.font=n,d.lineJoin="round",d.lineWidth=r,d[og]=!1,s!==Z.TRANSPARENT&&(d.fillStyle=s.toCssColorString(),d.fillRect(0,0,u.width,u.height)),i){const x=g(t.strokeColor,Z.BLACK);d.strokeStyle=x.toCssColorString(),d.strokeText(e,m+a,b)}if(o){const x=g(t.fillColor,Z.WHITE);d.fillStyle=x.toCssColorString(),d.fillText(e,m+a,b)}return u};var NIe=wt(6646);const Ql=Object.freeze({FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2}),W6={};let q6=0;const MIe=256,FIe=new Z(.165,.165,.165,.8),BIe=new V(7,5),Hr=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function rg(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function cx(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function lx(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function Y6(e){let t=W6[e._font];if(!c(t)){const n=document.createElement("div");n.style.position="absolute",n.style.opacity=0,n.style.font=e._font,document.body.appendChild(n);let i=parseFloat(lx(n,"line-height"));isNaN(i)&&(i=void 0),t={family:lx(n,"font-family"),size:lx(n,"font-size").replace("px",""),style:lx(n,"font-style"),weight:lx(n,"font-weight"),lineHeight:i},document.body.removeChild(n),q6<MIe&&(W6[e._font]=t,q6++)}e._fontFamily=t.family,e._fontSize=t.size,e._fontStyle=t.style,e._fontWeight=t.weight,e._lineHeight=t.lineHeight}function mh(e,t){if(e=g(e,g.EMPTY_OBJECT),c(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new E("disableDepthTestDistance must be greater than 0.0.");let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;if(c(n)){if(n.far<=n.near)throw new E("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=Bn.clone(n)}if(c(i)){if(i.far<=i.near)throw new E("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");i=Bn.clone(i)}if(c(o)){if(o.far<=o.near)throw new E("scaleByDistance.far must be greater than scaleByDistance.near.");o=Bn.clone(o)}if(c(r)){if(r.far<=r.near)throw new E("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");r=Qn.clone(r)}this._renderedText=void 0,this._text=void 0,this._show=g(e.show,!0),this._font=g(e.font,"30px sans-serif"),this._fillColor=Z.clone(g(e.fillColor,Z.WHITE)),this._outlineColor=Z.clone(g(e.outlineColor,Z.BLACK)),this._outlineWidth=g(e.outlineWidth,1),this._showBackground=g(e.showBackground,!1),this._backgroundColor=Z.clone(g(e.backgroundColor,FIe)),this._backgroundPadding=V.clone(g(e.backgroundPadding,BIe)),this._style=g(e.style,Ql.FILL),this._verticalOrigin=g(e.verticalOrigin,lo.BASELINE),this._horizontalOrigin=g(e.horizontalOrigin,Da.LEFT),this._pixelOffset=V.clone(g(e.pixelOffset,V.ZERO)),this._eyeOffset=f.clone(g(e.eyeOffset,f.ZERO)),this._position=f.clone(g(e.position,f.ZERO)),this._scale=g(e.scale,1),this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._scaleByDistance=o,this._heightReference=g(e.heightReference,tn.NONE),this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=g(e.text,""),this._relativeSize=1,Y6(this),this._updateClamping()}function kIe(e,t){const n=/[a-zA-Z0-9]/,i=/[()[\]{}<>]/,o=[];let r="",s=Hr.LTR,a="";const l=e.length;for(let u=0;u<l;++u){const d=e.charAt(u);a=t.test(d)?Hr.RTL:n.test(d)?Hr.LTR:i.test(d)?Hr.BRACKETS:Hr.WEAK,0===u&&(s=a),s===a&&a!==Hr.BRACKETS?r+=d:(""!==r&&o.push({Type:s,Word:r}),s=a,r=d)}return o.push({Type:a,Word:r}),o}function UIe(e){return e.split("").reverse().join("")}function ux(e,t,n){return e.slice(0,t)+n+e.slice(t)}function zIe(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}Object.defineProperties(mh.prototype,{show:{get:function(){return this._show},set:function(e){if(!c(e))throw new E("value is required.");if(this._show!==e){this._show=e;const t=this._glyphs;for(let i=0,o=t.length;i<o;i++){const r=t[i].billboard;c(r)&&(r.show=e)}const n=this._backgroundBillboard;c(n)&&(n.show=e)}}},position:{get:function(){return this._position},set:function(e){if(!c(e))throw new E("value is required.");const t=this._position;if(!f.equals(t,e)){f.clone(e,t);const n=this._glyphs;for(let o=0,r=n.length;o<r;o++){const s=n[o].billboard;c(s)&&(s.position=e)}const i=this._backgroundBillboard;c(i)&&(i.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!c(e))throw new E("value is required.");if(e!==this._heightReference){this._heightReference=e;const t=this._glyphs;for(let i=0,o=t.length;i<o;i++){const r=t[i].billboard;c(r)&&(r.heightReference=e)}const n=this._backgroundBillboard;c(n)&&(n.heightReference=e),cx(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(!c(e))throw new E("value is required.");if(this._text!==e){this._text=e;const t=e.replace(/\u00ad/g,"");this._renderedText=mh.enableRightToLeftDetection?function GIe(e){const t=e.split("\n");let n="";for(let i=0;i<t.length;i++){const o=t[i],r=X6.test(o.charAt(0)),s=kIe(o,X6);let a=0,l="";for(let u=0;u<s.length;++u){const d=s[u],h=d.Type===Hr.BRACKETS?zIe(d.Word):UIe(d.Word);r?d.Type===Hr.RTL?(l=h+l,a=0):d.Type===Hr.LTR?(l=ux(l,a,d.Word),a+=d.Word.length):(d.Type===Hr.WEAK||d.Type===Hr.BRACKETS)&&(d.Type===Hr.WEAK&&s[u-1].Type===Hr.BRACKETS?l=h+l:s[u-1].Type===Hr.RTL?(l=h+l,a=0):s.length>u+1?s[u+1].Type===Hr.RTL?(l=h+l,a=0):(l=ux(l,a,d.Word),a+=d.Word.length):l=ux(l,0,h)):d.Type===Hr.RTL?l=ux(l,a,h):d.Type===Hr.LTR?(l+=d.Word,a=l.length):(d.Type===Hr.WEAK||d.Type===Hr.BRACKETS)&&(u>0&&s[u-1].Type===Hr.RTL?s.length>u+1?s[u+1].Type===Hr.RTL?l=ux(l,a,h):(l+=d.Word,a=l.length):l+=d.Word:(l+=d.Word,a=l.length))}n+=l,i<t.length-1&&(n+="\n")}return n}(t):t,rg(this)}}},font:{get:function(){return this._font},set:function(e){if(!c(e))throw new E("value is required.");this._font!==e&&(this._font=e,rg(this),Y6(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!c(e))throw new E("value is required.");const t=this._fillColor;Z.equals(t,e)||(Z.clone(e,t),rg(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!c(e))throw new E("value is required.");const t=this._outlineColor;Z.equals(t,e)||(Z.clone(e,t),rg(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!c(e))throw new E("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,rg(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!c(e))throw new E("value is required.");this._showBackground!==e&&(this._showBackground=e,rg(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!c(e))throw new E("value is required.");const t=this._backgroundColor;if(!Z.equals(t,e)){Z.clone(e,t);const n=this._backgroundBillboard;c(n)&&(n.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){if(!c(e))throw new E("value is required.");const t=this._backgroundPadding;V.equals(t,e)||(V.clone(e,t),cx(this))}},style:{get:function(){return this._style},set:function(e){if(!c(e))throw new E("value is required.");this._style!==e&&(this._style=e,rg(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!c(e))throw new E("value is required.");const t=this._pixelOffset;if(!V.equals(t,e)){V.clone(e,t);const n=this._glyphs;for(let o=0,r=n.length;o<r;o++){const s=n[o];c(s.billboard)&&(s.billboard.pixelOffset=e)}const i=this._backgroundBillboard;c(i)&&(i.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far distance must be greater than near distance.");const t=this._translucencyByDistance;if(!Bn.equals(t,e)){this._translucencyByDistance=Bn.clone(e,t);const n=this._glyphs;for(let o=0,r=n.length;o<r;o++){const s=n[o];c(s.billboard)&&(s.billboard.translucencyByDistance=e)}const i=this._backgroundBillboard;c(i)&&(i.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far distance must be greater than near distance.");const t=this._pixelOffsetScaleByDistance;if(!Bn.equals(t,e)){this._pixelOffsetScaleByDistance=Bn.clone(e,t);const n=this._glyphs;for(let o=0,r=n.length;o<r;o++){const s=n[o];c(s.billboard)&&(s.billboard.pixelOffsetScaleByDistance=e)}const i=this._backgroundBillboard;c(i)&&(i.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far distance must be greater than near distance.");const t=this._scaleByDistance;if(!Bn.equals(t,e)){this._scaleByDistance=Bn.clone(e,t);const n=this._glyphs;for(let o=0,r=n.length;o<r;o++){const s=n[o];c(s.billboard)&&(s.billboard.scaleByDistance=e)}const i=this._backgroundBillboard;c(i)&&(i.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!c(e))throw new E("value is required.");const t=this._eyeOffset;if(!f.equals(t,e)){f.clone(e,t);const n=this._glyphs;for(let o=0,r=n.length;o<r;o++){const s=n[o];c(s.billboard)&&(s.billboard.eyeOffset=e)}const i=this._backgroundBillboard;c(i)&&(i.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!c(e))throw new E("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,cx(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!c(e))throw new E("value is required.");if(this._verticalOrigin!==e){this._verticalOrigin=e;const t=this._glyphs;for(let i=0,o=t.length;i<o;i++){const r=t[i];c(r.billboard)&&(r.billboard.verticalOrigin=e)}const n=this._backgroundBillboard;c(n)&&(n.verticalOrigin=e),cx(this)}}},scale:{get:function(){return this._scale},set:function(e){if(!c(e))throw new E("value is required.");if(this._scale!==e){this._scale=e;const t=this._glyphs;for(let i=0,o=t.length;i<o;i++){const r=t[i];c(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}const n=this._backgroundBillboard;c(n)&&(n.scale=e*this._relativeSize),cx(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far must be greater than near");if(!Qn.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=Qn.clone(e,this._distanceDisplayCondition);const t=this._glyphs;for(let i=0,o=t.length;i<o;i++){const r=t[i];c(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}const n=this._backgroundBillboard;c(n)&&(n.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(c(e)&&e<0)throw new E("disableDepthTestDistance must be greater than 0.0.");this._disableDepthTestDistance=e;const t=this._glyphs;for(let i=0,o=t.length;i<o;i++){const r=t[i];c(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}const n=this._backgroundBillboard;c(n)&&(n.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;const t=this._glyphs;for(let i=0,o=t.length;i<o;i++){const r=t[i];c(r.billboard)&&(r.billboard.id=e)}const n=this._backgroundBillboard;c(n)&&(n.id=e)}}},pickId:{get:function(){if(0!==this._glyphs.length&&c(this._glyphs[0].billboard))return this._glyphs[0].billboard.pickId}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=f.clone(e,this._actualClampedPosition);const t=this._glyphs;for(let i=0,o=t.length;i<o;i++){const r=t[i];c(r.billboard)&&(r.billboard._clampedPosition=e)}const n=this._backgroundBillboard;c(n)&&(n._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;const t=this._glyphs;for(let i=0,o=t.length;i<o;i++){const r=t[i];c(r.billboard)&&(r.billboard.clusterShow=e)}const n=this._backgroundBillboard;c(n)&&(n.clusterShow=e)}}}}),mh.prototype._updateClamping=function(){Qo._updateClamping(this._labelCollection,this)},mh.prototype.computeScreenSpacePosition=function(e,t){if(!c(e))throw new E("scene is required.");c(t)||(t=new V);const i=this._labelCollection.modelMatrix,o=c(this._actualClampedPosition)?this._actualClampedPosition:this._position;return Qo._computeScreenSpacePosition(i,o,this._eyeOffset,this._pixelOffset,e,t)},mh.getScreenSpaceBoundingBox=function(e,t,n){let i=0,o=0,r=0,s=0;const a=e.totalScale,l=e._backgroundBillboard;if(c(l))i=t.x+l._translate.x,o=t.y-l._translate.y,r=l.width*a,s=l.height*a,e.verticalOrigin===lo.BOTTOM||e.verticalOrigin===lo.BASELINE?o-=s:e.verticalOrigin===lo.CENTER&&(o-=.5*s);else{i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;let u=0,d=0;const h=e._glyphs,m=h.length;for(let _=0;_<m;++_){const p=h[_],y=p.billboard;if(!c(y))continue;const b=t.x+y._translate.x;let x=t.y-y._translate.y;const C=p.dimensions.width*a,w=p.dimensions.height*a;e.verticalOrigin===lo.BOTTOM||e.verticalOrigin===lo.BASELINE?x-=w:e.verticalOrigin===lo.CENTER&&(x-=.5*w),e._verticalOrigin===lo.TOP?x+=al.PADDING*a:(e._verticalOrigin===lo.BOTTOM||e._verticalOrigin===lo.BASELINE)&&(x-=al.PADDING*a),i=Math.min(i,b),o=Math.min(o,x),u=Math.max(u,b+C),d=Math.max(d,x+w)}r=u-i,s=d-o}return c(n)||(n=new Vt),n.x=i,n.y=o,n.width=r,n.height=s,n},mh.prototype.equals=function(e){return this===e||c(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&f.equals(this._position,e._position)&&Z.equals(this._fillColor,e._fillColor)&&Z.equals(this._outlineColor,e._outlineColor)&&Z.equals(this._backgroundColor,e._backgroundColor)&&V.equals(this._backgroundPadding,e._backgroundPadding)&&V.equals(this._pixelOffset,e._pixelOffset)&&f.equals(this._eyeOffset,e._eyeOffset)&&Bn.equals(this._translucencyByDistance,e._translucencyByDistance)&&Bn.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Bn.equals(this._scaleByDistance,e._scaleByDistance)&&Qn.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id},mh.prototype.isDestroyed=function(){return!1},mh.enableRightToLeftDetection=!1;const X6=new RegExp("[\u05d0-\u05ea\u0600-\u06ff\u0750-\u077f\u08a0-\u08ff]"),UN=mh;var jIe=wt(6276);function WIe(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function qIe(e,t,n){this.labelCollection=e,this.index=t,this.dimensions=n}const Z6="ID_WHITE_PIXEL",zN=new V(4,4),XIe=new Vt(1,1,1,1),Jl={};function $Ie(e,t,n,i,o,r,s){return Jl.font=t,Jl.fillColor=n,Jl.strokeColor=i,Jl.strokeWidth=o,Jl.padding=al.PADDING,Jl.textBaseline=s===lo.CENTER?"middle":s===lo.TOP?"top":"bottom",Jl.fill=r===Ql.FILL||r===Ql.FILL_AND_OUTLINE,Jl.stroke=r===Ql.OUTLINE||r===Ql.FILL_AND_OUTLINE,Jl.backgroundColor=Z.BLACK,j6(e,Jl)}function VN(e,t){t.textureInfo=void 0,t.dimensions=void 0;const n=t.billboard;c(n)&&(n.show=!1,n.image=void 0,c(n._removeCallbackFunc)&&(n._removeCallbackFunc(),n._removeCallbackFunc=void 0),e._spareBillboards.push(n),t.billboard=void 0)}function KIe(e,t,n,i){i.index=e.addImageSync(t,n)}const QIe=new jIe;function JIe(e,t){const n=t._renderedText,i=QIe.splitGraphemes(n),o=i.length,r=t._glyphs,s=r.length;let a,l,u;if(t._relativeSize=t._fontSize/al.FONT_SIZE,o<s)for(l=o;l<s;++l)VN(e,r[l]);r.length=o;const d=t.show&&t._showBackground&&n.split("\n").join("").length>0;let h=t._backgroundBillboard;const m=e._backgroundBillboardCollection;d?(c(h)||(h=m.add({collection:e,image:Z6,imageSubRegion:XIe}),t._backgroundBillboard=h),h.color=t._backgroundColor,h.show=t._show,h.position=t._position,h.eyeOffset=t._eyeOffset,h.pixelOffset=t._pixelOffset,h.horizontalOrigin=Da.LEFT,h.verticalOrigin=t._verticalOrigin,h.heightReference=t._heightReference,h.scale=t.totalScale,h.pickPrimitive=t,h.id=t._id,h.translucencyByDistance=t._translucencyByDistance,h.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,h.scaleByDistance=t._scaleByDistance,h.distanceDisplayCondition=t._distanceDisplayCondition,h.disableDepthTestDistance=t._disableDepthTestDistance,h.clusterShow=t.clusterShow):c(h)&&(m.remove(h),t._backgroundBillboard=h=void 0);const _=e._glyphTextureCache;for(u=0;u<o;++u){const p=i[u],y=t._verticalOrigin,b=JSON.stringify([p,t._fontFamily,t._fontStyle,t._fontWeight,+y]);let x=_[b];if(!c(x)){const w=$Ie(p,`${t._fontStyle} ${t._fontWeight} ${al.FONT_SIZE}px ${t._fontFamily}`,Z.WHITE,Z.WHITE,0,Ql.FILL,y);if(x=new qIe(e,-1,w.dimensions),_[b]=x,w.width>0&&w.height>0){const v=NIe(w,{cutoff:al.CUTOFF,radius:al.RADIUS}),I=w.getContext("2d"),P=w.width,N=w.height,R=I.getImageData(0,0,P,N);for(let B=0;B<P;B++)for(let F=0;F<N;F++){const S=F*P+B,D=255*v[S],L=4*S;R.data[L+0]=D,R.data[L+1]=D,R.data[L+2]=D,R.data[L+3]=D}I.putImageData(R,0,0)," "!==p&&KIe(e._textureAtlas,b,w,x)}}if(a=r[u],c(a)?-1===x.index?VN(e,a):c(a.textureInfo)&&(a.textureInfo=void 0):(a=new WIe,r[u]=a),a.textureInfo=x,a.dimensions=x.dimensions,-1!==x.index){let C=a.billboard;const w=e._spareBillboards;c(C)||(w.length>0?C=w.pop():(C=e._billboardCollection.add({collection:e}),C._labelDimensions=new V,C._labelTranslate=new V),a.billboard=C),C.show=t._show,C.position=t._position,C.eyeOffset=t._eyeOffset,C.pixelOffset=t._pixelOffset,C.horizontalOrigin=Da.LEFT,C.verticalOrigin=t._verticalOrigin,C.heightReference=t._heightReference,C.scale=t.totalScale,C.pickPrimitive=t,C.id=t._id,C.image=b,C.translucencyByDistance=t._translucencyByDistance,C.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,C.scaleByDistance=t._scaleByDistance,C.distanceDisplayCondition=t._distanceDisplayCondition,C.disableDepthTestDistance=t._disableDepthTestDistance,C._batchIndex=t._batchIndex,C.outlineColor=t.outlineColor,t.style===Ql.FILL_AND_OUTLINE?(C.color=t._fillColor,C.outlineWidth=t.outlineWidth):t.style===Ql.FILL?(C.color=t._fillColor,C.outlineWidth=0):t.style===Ql.OUTLINE&&(C.color=Z.TRANSPARENT,C.outlineWidth=t.outlineWidth)}}t._repositionAllGlyphs=!0}function $6(e,t,n){return t===Da.CENTER?-e/2:t===Da.RIGHT?-(e+n.x):n.x}const Jo=new V,eDe=new V;function tDe(e){const t=e._glyphs,n=e._renderedText;let i,o,r=0,s=0;const a=[];let h,l=Number.NEGATIVE_INFINITY,u=0,d=1;const m=t.length,_=e._backgroundBillboard,p=V.clone(c(_)?e._backgroundPadding:V.ZERO,eDe);for(p.x/=e._relativeSize,p.y/=e._relativeSize,h=0;h<m;++h)"\n"===n.charAt(h)?(a.push(r),++d,r=0):(i=t[h],o=i.dimensions,u=Math.max(u,o.height-o.descent),l=Math.max(l,o.descent),r+=o.width-o.minx,h<m-1&&(r+=t[h+1].dimensions.minx),s=Math.max(s,r));a.push(r);const y=u+l,b=e.totalScale,x=e._horizontalOrigin,C=e._verticalOrigin;let w=0,v=a[w],I=$6(v,x,p);const P=(c(e._lineHeight)?e._lineHeight:1.2*e._fontSize)/e._relativeSize,N=P*(d-1);let R=s,B=y+N;c(_)&&(R+=2*p.x,B+=2*p.y,_._labelHorizontalOrigin=x),Jo.x=I*b,Jo.y=0;let F=!0,S=0;for(h=0;h<m;++h)"\n"===n.charAt(h)?(++w,S+=P,v=a[w],I=$6(v,x,p),Jo.x=I*b,F=!0):(i=t[h],o=i.dimensions,C===lo.TOP?(Jo.y=o.height-u-p.y,Jo.y+=al.PADDING):C===lo.CENTER?Jo.y=(N+o.height-u)/2:C===lo.BASELINE?(Jo.y=N,Jo.y-=al.PADDING):(Jo.y=N+l+p.y,Jo.y-=al.PADDING),Jo.y=(Jo.y-o.descent-S)*b,F&&(Jo.x-=al.PADDING*b,F=!1),c(i.billboard)&&(i.billboard._setTranslate(Jo),i.billboard._labelDimensions.x=R,i.billboard._labelDimensions.y=B,i.billboard._labelHorizontalOrigin=x),h<m-1&&(Jo.x+=(o.width-o.minx+t[h+1].dimensions.minx)*b));if(c(_)&&n.split("\n").join("").length>0&&(I=x===Da.CENTER?-s/2-p.x:x===Da.RIGHT?-(s+2*p.x):0,Jo.x=I*b,Jo.y=C===lo.TOP?y-u-l:C===lo.CENTER?(y-u)/2-l:C===lo.BASELINE?-p.y-l:0,Jo.y=Jo.y*b,_.width=R,_.height=B,_._setTranslate(Jo),_._labelTranslate=V.clone(Jo,_._labelTranslate)),X_(e.heightReference))for(h=0;h<m;++h){i=t[h];const D=i.billboard;c(D)&&(D._labelTranslate=V.clone(Jo,D._labelTranslate))}}function K6(e,t){const n=t._glyphs;for(let i=0,o=n.length;i<o;++i)VN(e,n[i]);c(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,c(t._removeCallbackFunc)&&t._removeCallbackFunc(),Xe(t)}function tf(e){e=g(e,g.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._backgroundTextureAtlas=void 0,this._backgroundBillboardCollection=new sx({scene:this._scene}),this._backgroundBillboardCollection.destroyTextureAtlas=!1,this._billboardCollection=new sx({scene:this._scene,batchTable:this._batchTable}),this._billboardCollection.destroyTextureAtlas=!1,this._billboardCollection._sdf=!0,this._spareBillboards=[],this._glyphTextureCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=Z.clone(Z.WHITE),this.show=g(e.show,!0),this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.blendOption=g(e.blendOption,Ar.OPAQUE_AND_TRANSLUCENT)}Object.defineProperties(tf.prototype,{length:{get:function(){return this._labels.length}}}),tf.prototype.add=function(e){const t=new UN(e,this);return this._labels.push(t),this._labelsToUpdate.push(t),t},tf.prototype.remove=function(e){if(c(e)&&e._labelCollection===this){const t=this._labels.indexOf(e);if(-1!==t)return this._labels.splice(t,1),K6(this,e),!0}return!1},tf.prototype.removeAll=function(){const e=this._labels;for(let t=0,n=e.length;t<n;++t)K6(this,e[t]);e.length=0},tf.prototype.contains=function(e){return c(e)&&e._labelCollection===this},tf.prototype.get=function(e){if(!c(e))throw new E("index is required.");return this._labels[e]},tf.prototype.update=function(e){if(!this.show)return;const t=this._billboardCollection,n=this._backgroundBillboardCollection;t.modelMatrix=this.modelMatrix,t.debugShowBoundingVolume=this.debugShowBoundingVolume,n.modelMatrix=this.modelMatrix,n.debugShowBoundingVolume=this.debugShowBoundingVolume;const i=e.context;c(this._textureAtlas)||(this._textureAtlas=new PN({context:i}),t.textureAtlas=this._textureAtlas),c(this._backgroundTextureAtlas)||(this._backgroundTextureAtlas=new PN({context:i,initialSize:zN}),n.textureAtlas=this._backgroundTextureAtlas,function ZIe(e){const t=document.createElement("canvas");t.width=zN.x,t.height=zN.y;const n=t.getContext("2d");n.fillStyle="#fff",n.fillRect(0,0,t.width,t.height),e.addImage(Z6,t)}(this._backgroundTextureAtlas));const o=this._labelsToUpdate.length;for(let s=0;s<o;++s){const a=this._labelsToUpdate[s];if(a.isDestroyed())continue;const l=a._glyphs.length;a._rebindAllGlyphs&&(JIe(this,a),a._rebindAllGlyphs=!1),a._repositionAllGlyphs&&(tDe(a),a._repositionAllGlyphs=!1),this._totalGlyphCount+=a._glyphs.length-l}const r=n.length>0?Ar.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)},tf.prototype.isDestroyed=function(){return!1},tf.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(),Xe(this)};const xv=tf,dx="void clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane,\n out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n\n // Distance that p0 is behind the near plane. Negative means p0 is\n // in front of the near plane.\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n\n // Camera looks down -Z.\n // When moving a point along +Z: LESS VISIBLE\n // * Points in front of the camera move closer to the camera.\n // * Points behind the camrea move farther away from the camera.\n // When moving a point along -Z: MORE VISIBLE\n // * Points in front of the camera move farther away from the camera.\n // * Points behind the camera move closer to the camera.\n\n // Positive denominator: -Z, becoming more visible\n // Negative denominator: +Z, becoming less visible\n // Nearly zero: parallel to near plane\n float denominator = -direction.z;\n\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n // p0 is behind the near plane and the line to p1 is nearly parallel to\n // the near plane, so cull the segment completely.\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n // p0 is behind the near plane, and the line to p1 is moving distinctly\n // toward or away from it.\n\n // t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction)\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n // Near plane intersection is not between the two points.\n // We already confirmed p0 is behind the naer plane, so now\n // we know the entire segment is behind it.\n culledByNearPlane = true;\n }\n else\n {\n // Segment crosses the near plane, update p0 to lie exactly on it.\n p0 = p0 + t * direction;\n\n // Numerical noise might put us a bit on the wrong side of the near plane.\n // Don't let that happen.\n p0.z = min(p0.z, -czm_currentFrustum.x);\n\n clipped = true;\n }\n }\n\n clippedPositionEC = vec4(p0, 1.0);\n positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n}\n\nvec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n{\n // expandDirection +1 is to the _left_ when looking from positionEC toward nextEC.\n\n#ifdef POLYLINE_DASH\n // Compute the window coordinates of the points.\n vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\n vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\n vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\n\n // Determine the relative screen space direction of the line.\n vec2 lineDir;\n if (usePrevious) {\n lineDir = normalize(positionWindow.xy - previousWindow.xy);\n }\n else {\n lineDir = normalize(nextWindow.xy - positionWindow.xy);\n }\n angle = atan(lineDir.x, lineDir.y) - 1.570796327; // precomputed atan(1,0)\n\n // Quantize the angle so it doesn't change rapidly between segments.\n angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n#endif\n\n vec4 clippedPrevWC, clippedPrevEC;\n bool prevSegmentClipped, prevSegmentCulled;\n clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\n\n vec4 clippedNextWC, clippedNextEC;\n bool nextSegmentClipped, nextSegmentCulled;\n clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\n\n bool segmentClipped, segmentCulled;\n vec4 clippedPositionWC, clippedPositionEC;\n clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\n\n if (segmentCulled)\n {\n return vec4(0.0, 0.0, 0.0, 1.0);\n }\n\n vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\n vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\n\n // If a segment was culled, we can't use the corresponding direction\n // computed above. We should never see both of these be true without\n // `segmentCulled` above also being true.\n if (prevSegmentCulled)\n {\n directionToPrevWC = -directionToNextWC;\n }\n else if (nextSegmentCulled)\n {\n directionToNextWC = -directionToPrevWC;\n }\n\n vec2 thisSegmentForwardWC, otherSegmentForwardWC;\n if (usePrevious)\n {\n thisSegmentForwardWC = -directionToPrevWC;\n otherSegmentForwardWC = directionToNextWC;\n }\n else\n {\n thisSegmentForwardWC = directionToNextWC;\n otherSegmentForwardWC = -directionToPrevWC;\n }\n\n vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\n\n vec2 leftWC = thisSegmentLeftWC;\n float expandWidth = width * 0.5;\n\n // When lines are split at the anti-meridian, the position may be at the\n // same location as the next or previous position, and we need to handle\n // that to avoid producing NaNs.\n if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n {\n vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\n\n vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\n float leftSumLength = length(leftSumWC);\n leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\n\n // The sine of the angle between the two vectors is given by the formula\n // |a x b| = |a||b|sin(theta)\n // which is\n // float sinAngle = length(cross(vec3(leftWC, 0.0), vec3(-thisSegmentForwardWC, 0.0)));\n // Because the z components of both vectors are zero, the x and y coordinate will be zero.\n // Therefore, the sine of the angle is just the z component of the cross product.\n vec2 u = -thisSegmentForwardWC;\n vec2 v = leftWC;\n float sinAngle = abs(u.x * v.y - u.y * v.x);\n expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n }\n\n vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;\n return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;\n}\n\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\n vec4 positionEC = czm_modelViewRelativeToEye * position;\n vec4 prevEC = czm_modelViewRelativeToEye * previous;\n vec4 nextEC = czm_modelViewRelativeToEye * next;\n return getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);\n}\n",Q6="#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\n\nin vec2 v_st;\n\nvoid main()\n{\n czm_materialInput materialInput;\n\n vec2 st = v_st;\n st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);\n\n materialInput.s = st.s;\n materialInput.st = st;\n materialInput.str = vec3(st, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#ifdef VECTOR_TILE\n out_FragColor *= u_highlightColor;\n#endif\n\n czm_writeLogDepth();\n}\n";function _h(e,t,n){if(!c(e))throw new E("context is required");if(!c(t))throw new E("attributes is required");if(!c(n))throw new E("numberOfInstances is required");if(this._attributes=t,this._numberOfInstances=n,0===t.length)return;const i=function iDe(e){let t=!1;const n=e.length;for(let i=0;i<n;++i)if(e[i].componentDatatype!==ee.UNSIGNED_BYTE){t=!0;break}return t?yt.FLOAT:yt.UNSIGNED_BYTE}(t),r=i===yt.FLOAT&&!e.floatingPointTexture,s=function oDe(e,t){const n=new Array(e.length);let i=0;const o=e.length;for(let r=0;r<o;++r){const a=e[r].componentDatatype;n[r]=i,a!==ee.UNSIGNED_BYTE&&t?i+=4:++i}return n}(t,r),a=function rDe(e,t,n){const i=e.length,o=e[i-1];return t[i-1].componentDatatype!==ee.UNSIGNED_BYTE&&n?o+4:o+1}(s,t,r),l=Math.floor(dn.maximumTextureSize/a),u=Math.min(n,l),d=a*u,h=Math.ceil(n/u),m=1/d,_=.5*m,p=1/h,y=.5*p;this._textureDimensions=new V(d,h),this._textureStep=new de(m,_,p,y),this._pixelDatatype=r?yt.UNSIGNED_BYTE:i,this._packFloats=r,this._offsets=s,this._stride=a,this._texture=void 0;const b=4*d*h;this._batchValues=i!==yt.FLOAT||r?new Uint8Array(b):new Float32Array(b),this._batchValuesDirty=!1}function J6(e,t){const n=e[t].componentsPerAttribute;return 2===n?V:3===n?f:4===n?de:Number}Object.defineProperties(_h.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}}});const fx=new de,ej=new de;_h.prototype.getBatchedAttribute=function(e,t,n){if(e<0||e>=this._numberOfInstances)throw new E("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new E("attributeIndex is out of range");const i=this._attributes,s=4*this._stride*e+4*this._offsets[t];let a;a=this._packFloats&&i[t].componentDatatype!==yt.UNSIGNED_BYTE?function sDe(e,t,n){let i=de.unpack(e,t,fx);const o=de.unpackFloat(i);i=de.unpack(e,t+4,fx);const r=de.unpackFloat(i);i=de.unpack(e,t+8,fx);const s=de.unpackFloat(i);i=de.unpack(e,t+12,fx);const a=de.unpackFloat(i);return de.fromElements(o,r,s,a,n)}(this._batchValues,s,ej):de.unpack(this._batchValues,s,ej);const l=J6(i,t);return c(l.fromCartesian4)?l.fromCartesian4(a,n):c(l.clone)?l.clone(a,n):a.x};const cDe=[void 0,void 0,new V,new f,new de],lDe=new de;function mDe(e,t){const i=e._attributes[t],o=i.componentsPerAttribute,r=i.functionName,s=function hDe(e){return 1===e?"float":`vec${e}`}(o),a=function pDe(e){return 1===e?".x":2===e?".xy":3===e?".xyz":""}(o);let u=`${s} ${r}(float batchId) \n{ \n vec2 st = computeSt(batchId); \n st.x += batchTextureStep.x * float(${e._offsets[t]}); \n`;return u+=e._packFloats&&i.componentDatatype!==yt.UNSIGNED_BYTE?"vec4 textureValue; \ntextureValue.x = czm_unpackFloat(texture(batchTexture, st)); \ntextureValue.y = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x, 0.0))); \ntextureValue.z = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0))); \ntextureValue.w = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0))); \n":" vec4 textureValue = texture(batchTexture, st); \n",u+=` ${s} value = textureValue${a}; \n`,e._pixelDatatype!==yt.UNSIGNED_BYTE||i.componentDatatype!==ee.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===yt.FLOAT&&i.componentDatatype===ee.UNSIGNED_BYTE&&i.normalize&&(u+="value /= 255.0; \n"):u+="value *= 255.0; \n",u+=" return value; \n} \n",u}_h.prototype.setBatchedAttribute=function(e,t,n){if(e<0||e>=this._numberOfInstances)throw new E("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new E("attributeIndex is out of range");if(!c(n))throw new E("value is required.");const i=this._attributes,r=this.getBatchedAttribute(e,t,cDe[i[t].componentsPerAttribute]),s=J6(this._attributes,t);if(c(s.equals)?s.equals(r,n):r===n)return;const l=lDe;l.x=c(n.x)?n.x:n,l.y=c(n.y)?n.y:0,l.z=c(n.z)?n.z:0,l.w=c(n.w)?n.w:0;const h=4*this._stride*e+4*this._offsets[t];this._packFloats&&i[t].componentDatatype!==yt.UNSIGNED_BYTE?function aDe(e,t,n){let i=de.packFloat(e.x,fx);de.pack(i,t,n),i=de.packFloat(e.y,i),de.pack(i,t,n+4),i=de.packFloat(e.z,i),de.pack(i,t,n+8),i=de.packFloat(e.w,i),de.pack(i,t,n+12)}(l,this._batchValues,h):de.pack(l,this._batchValues,h),this._batchValuesDirty=!0},_h.prototype.update=function(e){c(this._texture)&&!this._batchValuesDirty||0===this._attributes.length||(this._batchValuesDirty=!1,c(this._texture)||function uDe(e,t){const n=e._textureDimensions;e._texture=new Mn({context:t,pixelFormat:Ct.RGBA,pixelDatatype:e._pixelDatatype,width:n.x,height:n.y,sampler:vi.NEAREST,flipY:!1})}(this,e.context),function dDe(e){const t=e._textureDimensions;e._texture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}(this))},_h.prototype.getUniformMapCallback=function(){const e=this;return function(t){return 0===e._attributes.length?t:Pn(t,{batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}})}},_h.prototype.getVertexShaderCallback=function(){const e=this._attributes;if(0===e.length)return function(i){return i};let t="uniform highp sampler2D batchTexture; \n";t+=`${function fDe(e){const t=e._stride;return 1===e._textureDimensions.y?`uniform vec4 batchTextureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = batchTextureStep.x; \n float centerX = batchTextureStep.y; \n float numberOfAttributes = float(${t}); \n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n} \n`:`uniform vec4 batchTextureStep; \nuniform vec2 batchTextureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = batchTextureStep.x; \n float centerX = batchTextureStep.y; \n float stepY = batchTextureStep.z; \n float centerY = batchTextureStep.w; \n float numberOfAttributes = float(${t}); \n float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x); \n float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n`}(this)}\n`;const n=e.length;for(let i=0;i<n;++i)t+=mDe(this,i);return function(i){const o=i.indexOf("void main"),r=i.substring(0,o),s=i.substring(o);return`${r}\n${t}\n${s}`}},_h.prototype.isDestroyed=function(){return!1},_h.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),Xe(this)};const tj=_h;function nt(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=g(e.minificationFilter,Kn.LINEAR),this._magnificationFilter=g(e.magnificationFilter,Jr.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,function NDe(e,t){let n;e=g(e,g.EMPTY_OBJECT),t._strict=g(e.strict,!1),t._count=g(e.count,0),t._template=Rt(g(e.fabric,g.EMPTY_OBJECT)),t._template.uniforms=Rt(g(t._template.uniforms,g.EMPTY_OBJECT)),t._template.materials=Rt(g(t._template.materials,g.EMPTY_OBJECT)),t.type=c(t._template.type)?t._template.type:kr(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];const i=nt._materialCache.getMaterial(t.type);if(c(i)){const r=Rt(i.fabric,!0);t._template=Pn(t._template,r,!0),n=i.translucent}(function kDe(e){const t=e._template,n=t.uniforms,i=t.materials,o=t.components;if(c(o)&&c(t.source))throw new E("fabric: cannot have source and components in the same template.");HN(t,FDe,nj,!0),HN(o,BDe,nj,!0);const r=[];for(const s in i)i.hasOwnProperty(s)&&r.push(s);HN(n,r,MDe,!1)})(t),c(i)||nt._materialCache.addMaterial(t.type,t),function zDe(e){const t=e._template.components,n=e._template.source;if(c(n))e.shaderSource+=`${n}\n`;else{if(e.shaderSource+="czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n",e.shaderSource+="czm_material material = czm_getDefaultMaterial(materialInput);\n",c(t)){const i=Object.keys(e._template.materials).length>0;for(const o in t)if(t.hasOwnProperty(o))if("diffuse"===o||"emission"===o){const s=i&&UDe(t[o],e)?t[o]:`czm_gammaCorrect(${t[o]})`;e.shaderSource+=`material.${o} = ${s}; \n`}else e.shaderSource+="alpha"===o?`material.alpha = ${t.alpha}; \n`:`material.${o} = ${t[o]};\n`}e.shaderSource+="return material;\n}\n"}}(t),function jDe(e){const t=e._template.uniforms;for(const n in t)t.hasOwnProperty(n)&&oj(e,n)}(t),function qDe(e){const t=e._strict,n=e._template.materials;for(const i in n)if(n.hasOwnProperty(i)){const o=new nt({strict:t,fabric:n[i],count:e._count});e._count=o._count,e._uniforms=Pn(e._uniforms,o._uniforms,!0),e.materials[i]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);const r="czm_getMaterial",s=`${r}_${e._count++}`;if(hx(o,r,s),e.shaderSource=o.shaderSource+e.shaderSource,0===hx(e,i,`${s}(materialInput)`)&&t)throw new E(`strict: shader source does not use material '${i}'.`)}}(t),n=g(n,0===t._translucentFunctions.length||void 0),n=g(e.translucent,n),c(n)&&t._translucentFunctions.push("function"==typeof n?function(){return n(t)}:n)}(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),c(nt._uniformList[this.type])||(nt._uniformList[this.type]=Object.keys(this._uniforms))}function HN(e,t,n,i){if(c(e))for(const o in e)if(e.hasOwnProperty(o)){const r=-1!==t.indexOf(o);(i&&!r||!i&&r)&&n(o,t)}}function nj(e,t){let n=`fabric: property name '${e}' is not valid. It should be `;for(let i=0;i<t.length;i++){const o=`'${t[i]}'`;n+=i===t.length-1?`or ${o}.`:`${o}, `}throw new E(n)}function MDe(e,t){throw new E(`fabric: uniforms and materials cannot share the same property '${e}'`)}nt._uniformList={},nt.fromType=function(e,t){if(!c(nt._materialCache.getMaterial(e)))throw new E(`material with type '${e}' does not exist.`);const n=new nt({fabric:{type:e}});if(c(t))for(const i in t)t.hasOwnProperty(i)&&(n.uniforms[i]=t[i]);return n},nt.prototype.isTranslucent=function(){if(c(this.translucent))return"function"==typeof this.translucent?this.translucent():this.translucent;let e=!0;const t=this._translucentFunctions,n=t.length;for(let i=0;i<n;++i){const o=t[i];if(e="function"==typeof o?e&&o():e&&o,!e)break}return e},nt.prototype.update=function(e){let t,n;this._defaultTexture=e.defaultTexture;const i=this._loadedImages;let o=i.length;for(t=0;t<o;++t){const l=i[t];n=l.id;let d,u=l.image;Array.isArray(u)&&(d=u.slice(1,u.length).map(function(y){return y.bufferView}),u=u[0]);const h=new vi({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter});let m;m=c(u.internalFormat)?new Mn({context:e,pixelFormat:u.internalFormat,width:u.width,height:u.height,source:{arrayBufferView:u.bufferView,mipLevels:d},sampler:h}):new Mn({context:e,source:u,sampler:h});const _=this._textures[n];c(_)&&_!==this._defaultTexture&&_.destroy(),this._textures[n]=m;const p=`${n}Dimensions`;if(this.uniforms.hasOwnProperty(p)){const y=this.uniforms[p];y.x=m._width,y.y=m._height}}i.length=0;const r=this._loadedCubeMaps;for(o=r.length,t=0;t<o;++t){const l=r[t];n=l.id;const u=l.images,d=new C_({context:e,source:{positiveX:u[0],negativeX:u[1],positiveY:u[2],negativeY:u[3],positiveZ:u[4],negativeZ:u[5]},sampler:new vi({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})});this._textures[n]=d}r.length=0;const s=this._updateFunctions;for(o=s.length,t=0;t<o;++t)s[t](this,e);const a=this.materials;for(const l in a)a.hasOwnProperty(l)&&a[l].update(e)},nt.prototype.isDestroyed=function(){return!1},nt.prototype.destroy=function(){const e=this._textures;for(const n in e)if(e.hasOwnProperty(n)){const i=e[n];i!==this._defaultTexture&&i.destroy()}const t=this.materials;for(const n in t)t.hasOwnProperty(n)&&t[n].destroy();return Xe(this)};const FDe=["type","materials","uniforms","components","source"],BDe=["diffuse","specular","shininess","normal","emission","alpha"];function UDe(e,t){const n=t._template.materials;for(const i in n)if(n.hasOwnProperty(i)&&e.indexOf(i)>-1)return!0;return!1}const ij={mat2:Kr,mat3:oe,mat4:k},VDe=/\.ktx2$/i;function oj(e,t){const n=e._strict,i=e._template.uniforms,o=i[t],r=function WDe(e){let t=e.type;if(!c(t)){const n=typeof e;if("number"===n)t="float";else if("boolean"===n)t="bool";else if("string"===n||e instanceof zt||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===nt.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"===n)if(Array.isArray(e))(4===e.length||9===e.length||16===e.length)&&(t=`mat${Math.sqrt(e.length)}`);else{let i=0;for(const o in e)e.hasOwnProperty(o)&&(i+=1);i>=2&&i<=4?t=`vec${i}`:6===i&&(t="samplerCube")}}return t}(o);if(!c(r))throw new E(`fabric: uniform '${t}' has invalid type.`);let s;if("channels"===r){if(s=hx(e,t,o,!1),0===s&&n)throw new E(`strict: shader source does not use channels '${t}'.`)}else{if("sampler2D"===r){const u=`${t}Dimensions`;(function YDe(e,t,n){return hx(e,t,t,n)})(e,u)>0&&(i[u]={type:"ivec3",x:1,y:1},oj(e,u))}new RegExp(`uniform\\s+${r}\\s+${t}\\s*;`).test(e.shaderSource)||(e.shaderSource=`uniform ${r} ${t};`+e.shaderSource);const l=`${t}_${e._count++}`;if(s=hx(e,t,l),1===s&&n)throw new E(`strict: shader source does not use uniform '${t}'.`);if(e.uniforms[t]=o,"sampler2D"===r)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(function HDe(e){let t;return function(n,i){const o=n.uniforms,r=o[e],s=t!==r,a=!c(r)||r===nt.DefaultImageId;t=r;let u,d,l=n._textures[e];if(r instanceof HTMLVideoElement){if(r.readyState>=2){if(s&&c(l)&&(l!==i.defaultTexture&&l.destroy(),l=void 0),!c(l)||l===i.defaultTexture){const m=new vi({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});return l=new Mn({context:i,source:r,sampler:m}),void(n._textures[e]=l)}l.copyFrom({source:r})}else c(l)||(n._textures[e]=i.defaultTexture);return}if(r instanceof Mn&&r!==l){n._texturePaths[e]=void 0;const m=n._textures[e];return c(m)&&m!==n._defaultTexture&&m.destroy(),n._textures[e]=r,u=`${e}Dimensions`,void(o.hasOwnProperty(u)&&(d=o[u],d.x=r._width,d.y=r._height))}if(s&&c(l)&&a&&(l!==n._defaultTexture&&l.destroy(),l=void 0),c(l)||(n._texturePaths[e]=void 0,l=n._textures[e]=n._defaultTexture,u=`${e}Dimensions`,o.hasOwnProperty(u)&&(d=o[u],d.x=l._width,d.y=l._height)),a)return;const h=r instanceof zt;if(!c(n._texturePaths[e])||h&&r.url!==n._texturePaths[e].url||!h&&r!==n._texturePaths[e]){if("string"==typeof r||h){const m=h?r:zt.createIfNeeded(r);let _;_=VDe.test(m.url)?o0(m.url):m.fetchImage(),Promise.resolve(_).then(function(p){n._loadedImages.push({id:e,image:p})}).catch(function(){c(l)&&l!==n._defaultTexture&&l.destroy(),n._textures[e]=n._defaultTexture})}else(r instanceof HTMLCanvasElement||r instanceof HTMLImageElement)&&n._loadedImages.push({id:e,image:r});n._texturePaths[e]=r}}}(t));else if("samplerCube"===r)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(function GDe(e){return function(t,n){const i=t.uniforms[e];if(i instanceof C_){const r=t._textures[e];return r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=i)}if(c(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=n.defaultCubeMap),i===nt.DefaultCubeMapId)return;const o=i.positiveX+i.negativeX+i.positiveY+i.negativeY+i.positiveZ+i.negativeZ;if(o!==t._texturePaths[e]){const r=[zt.createIfNeeded(i.positiveX).fetchImage(),zt.createIfNeeded(i.negativeX).fetchImage(),zt.createIfNeeded(i.positiveY).fetchImage(),zt.createIfNeeded(i.negativeY).fetchImage(),zt.createIfNeeded(i.positiveZ).fetchImage(),zt.createIfNeeded(i.negativeZ).fetchImage()];Promise.all(r).then(function(s){t._loadedCubeMaps.push({id:e,images:s})}),t._texturePaths[e]=o}}}(t));else if(-1!==r.indexOf("mat")){const u=new ij[r];e._uniforms[l]=function(){return ij[r].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[l]=function(){return e.uniforms[t]}}}function hx(e,t,n,i){i=g(i,!0);let o=0;const a=new RegExp(`([\\w${i?".":""}])?`+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(a,function(l,u,d){return u||d?l:(o+=1,n)}),o}nt._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},nt.DefaultImageId="czm_defaultImage",nt.DefaultCubeMapId="czm_defaultCubeMap",nt._materialCache.addMaterial(nt.ColorType="Color",{fabric:{type:nt.ColorType,uniforms:{color:new Z(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),nt._materialCache.addMaterial(nt.ImageType="Image",{fabric:{type:nt.ImageType,uniforms:{image:nt.DefaultImageId,repeat:new V(1,1),color:new Z(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}}),nt._materialCache.addMaterial(nt.DiffuseMapType="DiffuseMap",{fabric:{type:nt.DiffuseMapType,uniforms:{image:nt.DefaultImageId,channels:"rgb",repeat:new V(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),nt._materialCache.addMaterial(nt.AlphaMapType="AlphaMap",{fabric:{type:nt.AlphaMapType,uniforms:{image:nt.DefaultImageId,channel:"a",repeat:new V(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),nt._materialCache.addMaterial(nt.SpecularMapType="SpecularMap",{fabric:{type:nt.SpecularMapType,uniforms:{image:nt.DefaultImageId,channel:"r",repeat:new V(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),nt._materialCache.addMaterial(nt.EmissionMapType="EmissionMap",{fabric:{type:nt.EmissionMapType,uniforms:{image:nt.DefaultImageId,channels:"rgb",repeat:new V(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),nt._materialCache.addMaterial(nt.BumpMapType="BumpMap",{fabric:{type:nt.BumpMapType,uniforms:{image:nt.DefaultImageId,channel:"r",strength:.8,repeat:new V(1,1)},source:"uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n vec2 centerPixel = fract(repeat * st);\n float centerBump = texture(image, centerPixel).channel;\n\n float imageWidth = float(imageDimensions.x);\n vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\n float rightBump = texture(image, rightPixel).channel;\n\n float imageHeight = float(imageDimensions.y);\n vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\n float topBump = texture(image, leftPixel).channel;\n\n vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\n vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n\n material.normal = normalEC;\n material.diffuse = vec3(0.01);\n\n return material;\n}\n"},translucent:!1}),nt._materialCache.addMaterial(nt.NormalMapType="NormalMap",{fabric:{type:nt.NormalMapType,uniforms:{image:nt.DefaultImageId,channels:"rgb",strength:.8,repeat:new V(1,1)},source:"uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec4 textureValue = texture(image, fract(repeat * materialInput.st));\n vec3 normalTangentSpace = textureValue.channels;\n normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;\n normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);\n normalTangentSpace = normalize(normalTangentSpace);\n vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n \n material.normal = normalEC;\n \n return material;\n}\n"},translucent:!1}),nt._materialCache.addMaterial(nt.GridType="Grid",{fabric:{type:nt.GridType,uniforms:{color:new Z(0,1,0,1),cellAlpha:.1,lineCount:new V(8,8),lineThickness:new V(1,1),lineOffset:new V(0,0)},source:'uniform vec4 color;\nuniform float cellAlpha;\nuniform vec2 lineCount;\nuniform vec2 lineThickness;\nuniform vec2 lineOffset;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\n float value;\n\n // Fuzz Factor - Controls blurriness of lines\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n const float fuzz = 1.2;\n vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;\n\n // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.\n vec2 dx = abs(dFdx(st));\n vec2 dy = abs(dFdy(st));\n vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\n value = min(\n smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n#else\n // If no derivatives available (IE 10?), revert to view-dependent fuzz\n const float fuzz = 0.05;\n\n vec2 range = 0.5 - (lineThickness * 0.05);\n value = min(\n 1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),\n 1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));\n#endif\n\n // Edges taken from RimLightingMaterial.glsl\n // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html\n float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));\n float sRim = smoothstep(0.8, 1.0, dRim);\n value *= (1.0 - sRim);\n\n vec4 halfColor;\n halfColor.rgb = color.rgb * 0.5;\n halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));\n halfColor = czm_gammaCorrect(halfColor);\n material.diffuse = halfColor.rgb;\n material.emission = halfColor.rgb;\n material.alpha = halfColor.a;\n\n return material;\n}\n'},translucent:function(e){const t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}}),nt._materialCache.addMaterial(nt.StripeType="Stripe",{fabric:{type:nt.StripeType,uniforms:{horizontal:!0,evenColor:new Z(1,1,1,.5),oddColor:new Z(0,0,1,.5),offset:0,repeat:5},source:"uniform vec4 evenColor;\nuniform vec4 oddColor;\nuniform float offset;\nuniform float repeat;\nuniform bool horizontal;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // Based on the Stripes Fragment Shader in the Orange Book (11.1.2)\n float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));\n float value = fract((coord - offset) * (repeat * 0.5));\n float dist = min(value, min(abs(value - 0.5), 1.0 - value));\n\n vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));\n vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);\n color = czm_gammaCorrect(color);\n\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}}),nt._materialCache.addMaterial(nt.CheckerboardType="Checkerboard",{fabric:{type:nt.CheckerboardType,uniforms:{lightColor:new Z(1,1,1,.5),darkColor:new Z(0,0,0,.5),repeat:new V(5,5)},source:"uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\n float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0\n\n // Find the distance from the closest separator (region between two colors)\n float scaledWidth = fract(repeat.s * st.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n float scaledHeight = fract(repeat.t * st.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n float value = min(scaledWidth, scaledHeight);\n\n vec4 currentColor = mix(lightColor, darkColor, b);\n vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);\n\n color = czm_gammaCorrect(color);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),nt._materialCache.addMaterial(nt.DotType="Dot",{fabric:{type:nt.DotType,uniforms:{lightColor:new Z(1,1,0,.75),darkColor:new Z(0,1,1,.75),repeat:new V(5,5)},source:"uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\n float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0\n\n vec4 color = mix(lightColor, darkColor, b);\n color = czm_gammaCorrect(color);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),nt._materialCache.addMaterial(nt.WaterType="Water",{fabric:{type:nt.WaterType,uniforms:{baseWaterColor:new Z(.2,.3,.6,1),blendColor:new Z(0,1,.699,1),specularMap:nt.DefaultImageId,normalMap:nt.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:"// Thanks for the contribution Jonas\n// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog\n\nuniform sampler2D specularMap;\nuniform sampler2D normalMap;\nuniform vec4 baseWaterColor;\nuniform vec4 blendColor;\nuniform float frequency;\nuniform float animationSpeed;\nuniform float amplitude;\nuniform float specularIntensity;\nuniform float fadeFactor;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float time = czm_frameNumber * animationSpeed;\n\n // fade is a function of the distance from the fragment and the frequency of the waves\n float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\n\n float specularMapValue = texture(specularMap, materialInput.st).r;\n\n // note: not using directional motion at this time, just set the angle to 0.0;\n vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\n vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\n\n // fade out the normal perturbation as we move further from the water surface\n normalTangentSpace.xy /= fade;\n\n // attempt to fade out the normal perturbation as we approach non water areas (low specular map value)\n normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\n\n normalTangentSpace = normalize(normalTangentSpace);\n\n // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane\n float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\n\n // fade out water effect as specular map value decreases\n material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\n\n // base color is a blend of the water and non-water color based on the value from the specular map\n // may need a uniform blend factor to better control this\n material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\n\n // diffuse highlights are based on how perturbed the normal is\n material.diffuse += (0.1 * tsPerturbationRatio);\n\n material.diffuse = material.diffuse;\n\n material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\n\n material.specular = specularIntensity;\n material.shininess = 10.0;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}}),nt._materialCache.addMaterial(nt.RimLightingType="RimLighting",{fabric:{type:nt.RimLightingType,uniforms:{color:new Z(1,0,0,.7),rimColor:new Z(1,1,1,.4),width:.3},source:"uniform vec4 color;\nuniform vec4 rimColor;\nuniform float width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html\n float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));\n float s = smoothstep(1.0 - width, 1.0, d);\n\n vec4 outColor = czm_gammaCorrect(color);\n vec4 outRimColor = czm_gammaCorrect(rimColor);\n\n material.diffuse = outColor.rgb;\n material.emission = outRimColor.rgb * s;\n material.alpha = mix(outColor.a, outRimColor.a, s);\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}}),nt._materialCache.addMaterial(nt.FadeType="Fade",{fabric:{type:nt.FadeType,uniforms:{fadeInColor:new Z(1,0,0,1),fadeOutColor:new Z(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new V(.5,.5)},source:"uniform vec4 fadeInColor;\nuniform vec4 fadeOutColor;\nuniform float maximumDistance;\nuniform bool repeat;\nuniform vec2 fadeDirection;\nuniform vec2 time;\n\nfloat getTime(float t, float coord)\n{\n float scalar = 1.0 / maximumDistance;\n float q = distance(t, coord) * scalar;\n if (repeat)\n {\n float r = distance(t, coord + 1.0) * scalar;\n float s = distance(t, coord - 1.0) * scalar;\n q = min(min(r, s), q);\n }\n return clamp(q, 0.0, 1.0);\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float s = getTime(time.x, st.s) * fadeDirection.s;\n float t = getTime(time.y, st.t) * fadeDirection.t;\n\n float u = length(vec2(s, t));\n vec4 color = mix(fadeInColor, fadeOutColor, u);\n\n color = czm_gammaCorrect(color);\n material.emission = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}}),nt._materialCache.addMaterial(nt.PolylineArrowType="PolylineArrow",{fabric:{type:nt.PolylineArrowType,uniforms:{color:new Z(1,1,1,1)},source:"uniform vec4 color;\n\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\n float slope = (p0.y - p1.y) / (p0.x - p1.x);\n return slope * (x - p0.x) + p0.y;\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;\n#else\n // If no derivatives available (IE 10?), 2.5% of the line will be the arrow head\n float base = 0.975;\n#endif\n\n vec2 center = vec2(1.0, 0.5);\n float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\n float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\n\n float halfWidth = 0.15;\n float s = step(0.5 - halfWidth, st.t);\n s *= 1.0 - step(0.5 + halfWidth, st.t);\n s *= 1.0 - step(base, st.s);\n\n float t = step(base, materialInput.st.s);\n t *= 1.0 - step(ptOnUpperLine, st.t);\n t *= step(ptOnLowerLine, st.t);\n\n // Find the distance from the closest separator (region between two colors)\n float dist;\n if (st.s < base)\n {\n float d1 = abs(st.t - (0.5 - halfWidth));\n float d2 = abs(st.t - (0.5 + halfWidth));\n dist = min(d1, d2);\n }\n else\n {\n float d1 = czm_infinity;\n if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n {\n d1 = abs(st.s - base);\n }\n float d2 = abs(st.t - ptOnUpperLine);\n float d3 = abs(st.t - ptOnLowerLine);\n dist = min(min(d1, d2), d3);\n }\n\n vec4 outsideColor = vec4(0.0);\n vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));\n vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);\n\n outColor = czm_gammaCorrect(outColor);\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n return material;\n}\n"},translucent:!0}),nt._materialCache.addMaterial(nt.PolylineDashType="PolylineDash",{fabric:{type:nt.PolylineDashType,uniforms:{color:new Z(1,0,1,1),gapColor:new Z(0,0,0,0),dashLength:16,dashPattern:255},source:"uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nin float v_polylineAngle;\n\nconst float maskLength = 16.0;\n\nmat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n\n // Get the relative position within the dash from 0 to 1\n float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\n // Figure out the mask index.\n float maskIndex = floor(dashPosition * maskLength);\n // Test the bit mask.\n float maskTest = floor(dashPattern / pow(2.0, maskIndex));\n vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n if (fragColor.a < 0.005) { // matches 0/255 and 1/255\n discard;\n }\n\n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n}\n"},translucent:!0}),nt._materialCache.addMaterial(nt.PolylineGlowType="PolylineGlow",{fabric:{type:nt.PolylineGlowType,uniforms:{color:new Z(0,.5,1,1),glowPower:.25,taperPower:1},source:"uniform vec4 color;\nuniform float glowPower;\nuniform float taperPower;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n\n if (taperPower <= 0.99999) {\n glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\n }\n\n vec4 fragColor;\n fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * color.a;\n fragColor = czm_gammaCorrect(fragColor);\n\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n\n return material;\n}\n"},translucent:!0}),nt._materialCache.addMaterial(nt.PolylineOutlineType="PolylineOutline",{fabric:{type:nt.PolylineOutlineType,uniforms:{color:new Z(1,1,1,1),outlineColor:new Z(1,0,0,1),outlineWidth:1},source:"uniform vec4 color;\nuniform vec4 outlineColor;\nuniform float outlineWidth;\n\nin float v_width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;\n float b = step(0.5 - halfInteriorWidth, st.t);\n b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n\n // Find the distance from the closest separator (region between two colors)\n float d1 = abs(st.t - (0.5 - halfInteriorWidth));\n float d2 = abs(st.t - (0.5 + halfInteriorWidth));\n float dist = min(d1, d2);\n\n vec4 currentColor = mix(outlineColor, color, b);\n vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\n outColor = czm_gammaCorrect(outColor);\n\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n\n return material;\n}\n"},translucent:function(e){const t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}}),nt._materialCache.addMaterial(nt.ElevationContourType="ElevationContour",{fabric:{type:nt.ElevationContourType,uniforms:{spacing:100,color:new Z(1,0,0,1),width:1},source:"uniform vec4 color;\nuniform float spacing;\nuniform float width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float distanceToContour = mod(materialInput.height, spacing);\n\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n float dxc = abs(dFdx(materialInput.height));\n float dyc = abs(dFdy(materialInput.height));\n float dF = max(dxc, dyc) * czm_pixelRatio * width;\n float alpha = (distanceToContour < dF) ? 1.0 : 0.0;\n#else\n // If no derivatives available (IE 10?), use pixel ratio\n float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;\n#endif\n\n vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n\n return material;\n}\n"},translucent:!1}),nt._materialCache.addMaterial(nt.ElevationRampType="ElevationRamp",{fabric:{type:nt.ElevationRampType,uniforms:{image:nt.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:"uniform sampler2D image;\nuniform float minimumHeight;\nuniform float maximumHeight;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);\n vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n"},translucent:!1}),nt._materialCache.addMaterial(nt.SlopeRampMaterialType="SlopeRamp",{fabric:{type:nt.SlopeRampMaterialType,uniforms:{image:nt.DefaultImageId},source:"uniform sampler2D image;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec4 rampColor = texture(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n"},translucent:!1}),nt._materialCache.addMaterial(nt.AspectRampMaterialType="AspectRamp",{fabric:{type:nt.AspectRampMaterialType,uniforms:{image:nt.DefaultImageId},source:"uniform sampler2D image;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n"},translucent:!1}),nt._materialCache.addMaterial(nt.ElevationBandType="ElevationBand",{fabric:{type:nt.ElevationBandType,uniforms:{heights:nt.DefaultImageId,colors:nt.DefaultImageId},source:"uniform sampler2D heights;\nuniform sampler2D colors;\n\n// This material expects heights to be sorted from lowest to highest.\n\nfloat getHeight(int idx, float invTexSize)\n{\n vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);\n#ifdef OES_texture_float\n return texture(heights, uv).x;\n#else\n return czm_unpackFloat(texture(heights, uv));\n#endif\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float height = materialInput.height;\n float invTexSize = 1.0 / float(heightsDimensions.x);\n\n float minHeight = getHeight(0, invTexSize);\n float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize);\n\n // early-out when outside the height range\n if (height < minHeight || height > maxHeight) {\n material.diffuse = vec3(0.0);\n material.alpha = 0.0;\n return material;\n }\n\n // Binary search to find heights above and below.\n int idxBelow = 0;\n int idxAbove = heightsDimensions.x;\n float heightBelow = minHeight;\n float heightAbove = maxHeight;\n\n // while loop not allowed, so use for loop with max iterations.\n // maxIterations of 16 supports a texture size up to 65536 (2^16).\n const int maxIterations = 16;\n for (int i = 0; i < maxIterations; i++) {\n if (idxBelow >= idxAbove - 1) {\n break;\n }\n\n int idxMid = (idxBelow + idxAbove) / 2;\n float heightTex = getHeight(idxMid, invTexSize);\n\n if (height > heightTex) {\n idxBelow = idxMid;\n heightBelow = heightTex;\n } else {\n idxAbove = idxMid;\n heightAbove = heightTex;\n }\n }\n\n float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);\n vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);\n vec4 color = texture(colors, colorUv);\n\n // undo preumultiplied alpha\n if (color.a > 0.0) \n {\n color.rgb /= color.a;\n }\n \n color.rgb = czm_gammaCorrect(color.rgb);\n\n material.diffuse = color.rgb;\n material.alpha = color.a;\n return material;\n}\n"},translucent:!0});const Pa=nt;function rj(e,t,n,i,o,r,s){const a=function ZDe(e,t){return e*t*(4+e*(4-3*t))/16}(e,n);return(1-a)*e*t*(i+a*o*(s+a*r*(2*s*s-1)))}const KDe=new f,GN=new f;function sj(e,t,n,i){const o=f.normalize(i.cartographicToCartesian(t,GN),KDe),r=f.normalize(i.cartographicToCartesian(n,GN),GN);A.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(f.angleBetween(o,r))-Math.PI),.0125),function $De(e,t,n,i,o,r,s){const a=(t-n)/t,l=r-i,u=Math.atan((1-a)*Math.tan(o)),d=Math.atan((1-a)*Math.tan(s)),h=Math.cos(u),m=Math.sin(u),_=Math.cos(d),p=Math.sin(d),y=h*_,b=h*p,x=m*p,C=m*_;let N,R,B,F,S,w=l,v=O.TWO_PI,I=Math.cos(w),P=Math.sin(w);do{I=Math.cos(w),P=Math.sin(w);const j=b-C*I;let Q;B=Math.sqrt(_*_*P*P+j*j),R=x+y*I,N=Math.atan2(B,R),0===B?(Q=0,F=1):(Q=y*P/B,F=1-Q*Q),v=w,S=R-2*x/F,isFinite(S)||(S=0),w=l+rj(a,Q,F,N,B,R,S)}while(Math.abs(w-v)>O.EPSILON12);const D=F*(t*t-n*n)/(n*n),M=D*(256+D*(D*(74-47*D)-128))/1024,U=S*S,G=n*(1+D*(4096+D*(D*(320-175*D)-768))/16384)*(N-M*B*(S+M*(R*(2*U-1)-M*S*(4*B*B-3)*(4*U-3)/6)/4)),W=Math.atan2(_*P,b-C*I),q=Math.atan2(h*P,b*I-C);e._distance=G,e._startHeading=W,e._endHeading=q,e._uSquared=D}(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=Ce.clone(t,e._start),e._end=Ce.clone(n,e._end),e._start.height=0,e._end.height=0,function XDe(e){const t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,r=Math.cos(e._startHeading),s=Math.sin(e._startHeading),a=(1-o)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+a*a),u=l*a,d=Math.atan2(a,r),h=l*s,m=h*h,_=1-m,p=Math.sqrt(_),y=t/4,b=y*y,x=b*y,C=b*b,w=1+y-3*b/4+5*x/4-175*C/64,v=1-y+15*b/8-35*x/8,I=1-3*y+35*b/4,P=1-5*y,N=w*d-v*Math.sin(2*d)*y/2-I*Math.sin(4*d)*b/16-P*Math.sin(6*d)*x/48-5*Math.sin(8*d)*C/512,R=e._constants;R.a=n,R.b=i,R.f=o,R.cosineHeading=r,R.sineHeading=s,R.tanU=a,R.cosineU=l,R.sineU=u,R.sigma=d,R.sineAlpha=h,R.sineSquaredAlpha=m,R.cosineSquaredAlpha=_,R.cosineAlpha=p,R.u2Over4=y,R.u4Over16=b,R.u6Over64=x,R.u8Over256=C,R.a0=w,R.a1=v,R.a2=I,R.a3=P,R.distanceRatio=N}(e)}function px(e,t,n){const i=g(n,he.default);this._ellipsoid=i,this._start=new Ce,this._end=new Ce,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,c(e)&&c(t)&&sj(this,e,t,i)}Object.defineProperties(px.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return A.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return A.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return A.defined("distance",this._distance),this._endHeading}}}),px.prototype.setEndPoints=function(e,t){A.defined("start",e),A.defined("end",t),sj(this,e,t,this._ellipsoid)},px.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},px.prototype.interpolateUsingSurfaceDistance=function(e,t){A.defined("distance",this._distance);const 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),l=Math.sin(4*i),u=Math.sin(6*i),d=Math.sin(8*i),h=i*i,_=n.u8Over256,p=n.u2Over4,y=n.u6Over64,b=n.u4Over16;let x=i*h*2*_*o/3+i*(1-p+7*b/4-15*y/4+579*_/64-(b-15*y/4+187*_/16)*o-(5*y/4-115*_/16)*r-29*_*s/16)+(p/2-b+71*y/32-85*_/16)*a+(5*b/16-5*y/4+383*_/96)*l-h*((y-11*_/2)*a+5*_*l/2)+(29*y/96-29*_/16)*u+539*_*d/1536;const C=Math.asin(Math.sin(x)*n.cosineAlpha),w=Math.atan(n.a/n.b*Math.tan(C));x-=n.sigma;const v=Math.cos(2*n.sigma+x),I=Math.sin(x),P=Math.cos(x),F=Math.atan2(I*n.sineHeading,n.cosineU*P-n.sineU*I*n.cosineHeading)-rj(n.f,n.sineAlpha,n.cosineSquaredAlpha,x,I,P,v);return c(t)?(t.longitude=this._start.longitude+F,t.latitude=w,t.height=0,t):new Ce(this._start.longitude+F,w,0)};const jN=px,oc={numberOfPoints:function(e,t,n){const i=f.distance(e,t);return Math.ceil(i/n)},numberOfPointsRhumbLine:function(e,t,n){const 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))))}},QDe=new Ce;oc.extractHeights=function(e,t){const n=e.length,i=new Array(n);for(let o=0;o<n;o++)i[o]=t.cartesianToCartographic(e[o],QDe).height;return i};const JDe=new k,e1e=new f,aj=new f,t1e=new qn(f.UNIT_X,0),cj=new f,n1e=new qn(f.UNIT_X,0),i1e=new f,o1e=new f,WN=[];function lj(e,t,n){const i=WN;let o;if(i.length=e,t===n){for(o=0;o<e;o++)i[o]=t;return i}const s=(n-t)/e;for(o=0;o<e;o++)i[o]=t+o*s;return i}const Cv=new Ce,Ev=new Ce,Kp=new f,qN=new f,r1e=new f,YN=new jN;let mx=new Qd;function s1e(e,t,n,i,o,r,s,a){const l=i.scaleToGeodeticSurface(e,qN),u=i.scaleToGeodeticSurface(t,r1e),d=oc.numberOfPoints(e,t,n),h=i.cartesianToCartographic(l,Cv),m=i.cartesianToCartographic(u,Ev),_=lj(d,o,r);YN.setEndPoints(h,m);const p=YN.surfaceDistance/d;let y=a;h.height=o;let b=i.cartographicToCartesian(h,Kp);f.pack(b,s,y),y+=3;for(let x=1;x<d;x++){const C=YN.interpolateUsingSurfaceDistance(x*p,Ev);C.height=_[x],b=i.cartographicToCartesian(C,Kp),f.pack(b,s,y),y+=3}return y}function a1e(e,t,n,i,o,r,s,a){const l=i.cartesianToCartographic(e,Cv),u=i.cartesianToCartographic(t,Ev),d=oc.numberOfPointsRhumbLine(l,u,n);l.height=0,u.height=0;const h=lj(d,o,r);mx.ellipsoid.equals(i)||(mx=new Qd(void 0,void 0,i)),mx.setEndPoints(l,u);const m=mx.surfaceDistance/d;let _=a;l.height=o;let p=i.cartographicToCartesian(l,Kp);f.pack(p,s,_),_+=3;for(let y=1;y<d;y++){const b=mx.interpolateUsingSurfaceDistance(y*m,Ev);b.height=h[y],p=i.cartographicToCartesian(b,Kp),f.pack(p,s,_),_+=3}return _}oc.wrapLongitude=function(e,t){const n=[],i=[];if(c(e)&&e.length>0){t=g(t,k.IDENTITY);const o=k.inverseTransformation(t,JDe),r=k.multiplyByPoint(o,f.ZERO,e1e),s=f.normalize(k.multiplyByPointAsVector(o,f.UNIT_Y,aj),aj),a=qn.fromPointNormal(r,s,t1e),l=f.normalize(k.multiplyByPointAsVector(o,f.UNIT_X,cj),cj),u=qn.fromPointNormal(r,l,n1e);let d=1;n.push(f.clone(e[0]));let h=n[0];const m=e.length;for(let _=1;_<m;++_){const p=e[_];if(qn.getPointDistance(u,h)<0||qn.getPointDistance(u,p)<0){const y=So.lineSegmentPlane(h,p,a,i1e);if(c(y)){const b=f.multiplyByScalar(s,5e-9,o1e);qn.getPointDistance(a,h)<0&&f.negate(b,b),n.push(f.add(y,b,new f)),i.push(d+1),f.negate(b,b),n.push(f.add(y,b,new f)),d=1}}n.push(f.clone(e[_])),d++,h=p}i.push(d)}return{positions:n,lengths:i}},oc.generateArc=function(e){c(e)||(e={});const t=e.positions;if(!c(t))throw new E("options.positions is required.");const n=t.length,i=g(e.ellipsoid,he.default);let o=g(e.height,0);const r=Array.isArray(o);if(n<1)return[];if(1===n){const y=i.scaleToGeodeticSurface(t[0],qN);if(o=r?o[0]:o,0!==o){const b=i.geodeticSurfaceNormal(y,Kp);f.multiplyByScalar(b,o,b),f.add(y,b,y)}return[y.x,y.y,y.z]}let s=e.minDistance;if(!c(s)){const y=g(e.granularity,O.RADIANS_PER_DEGREE);s=O.chordLength(y,i.maximumRadius)}let l,a=0;for(l=0;l<n-1;l++)a+=oc.numberOfPoints(t[l],t[l+1],s);const u=3*(a+1),d=new Array(u);let h=0;for(l=0;l<n-1;l++)h=s1e(t[l],t[l+1],s,i,r?o[l]:o,r?o[l+1]:o,d,h);WN.length=0;const _=i.cartesianToCartographic(t[n-1],Cv);_.height=r?o[n-1]:o;const p=i.cartographicToCartesian(_,Kp);return f.pack(p,d,u-3),d};const uj=new Ce,c1e=new Ce;oc.generateRhumbArc=function(e){c(e)||(e={});const t=e.positions;if(!c(t))throw new E("options.positions is required.");const n=t.length,i=g(e.ellipsoid,he.default);let o=g(e.height,0);const r=Array.isArray(o);if(n<1)return[];if(1===n){const x=i.scaleToGeodeticSurface(t[0],qN);if(o=r?o[0]:o,0!==o){const C=i.geodeticSurfaceNormal(x,Kp);f.multiplyByScalar(C,o,C),f.add(x,C,x)}return[x.x,x.y,x.z]}const s=g(e.granularity,O.RADIANS_PER_DEGREE);let l,d,a=0,u=i.cartesianToCartographic(t[0],uj);for(l=0;l<n-1;l++)d=i.cartesianToCartographic(t[l+1],c1e),a+=oc.numberOfPointsRhumbLine(u,d,s),u=Ce.clone(d,uj);const h=3*(a+1),m=new Array(h);let _=0;for(l=0;l<n-1;l++)_=a1e(t[l],t[l+1],s,i,r?o[l]:o,r?o[l+1]:o,m,_);WN.length=0;const y=i.cartesianToCartographic(t[n-1],Cv);y.height=r?o[n-1]:o;const b=i.cartographicToCartesian(y,Kp);return f.pack(b,m,h-3),m},oc.generateCartesianArc=function(e){const t=oc.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=f.unpack(t,3*o);return i},oc.generateCartesianRhumbArc=function(e){const t=oc.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=f.unpack(t,3*o);return i};const Gr=oc;function cl(e,t){e=g(e,g.EMPTY_OBJECT),this._show=g(e.show,!0),this._width=g(e.width,1),this._loop=g(e.loop,!1),this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,c(this._material)||(this._material=Pa.fromType(Pa.ColorType,{color:new Z(1,1,1,1)}));let i,n=e.positions;c(n)||(n=[]),this._positions=n,this._actualPositions=Ea(n,f.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(f.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id,c(t)&&(i=k.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=Gr.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(fj),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=Ae.fromPoints(this._actualPositions),this._boundingVolumeWC=Ae.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new Ae}const dj=cl.POSITION_INDEX=0,l1e=cl.SHOW_INDEX=1,u1e=cl.WIDTH_INDEX=2,d1e=cl.MATERIAL_INDEX=3,_x=cl.POSITION_SIZE_INDEX=4,f1e=cl.DISTANCE_DISPLAY_CONDITION=5,fj=cl.NUMBER_OF_PROPERTIES=6;function gh(e,t){++e._propertiesChanged[t];const n=e._polylineCollection;c(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(cl.prototype,{show:{get:function(){return this._show},set:function(e){if(!c(e))throw new E("value is required.");e!==this._show&&(this._show=e,gh(this,l1e))}},positions:{get:function(){return this._positions},set:function(e){if(!c(e))throw new E("value is required.");let t=Ea(e,f.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(f.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&gh(this,_x),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=Ae.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=Ae.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),gh(this,dj),this.update()}},material:{get:function(){return this._material},set:function(e){if(!c(e))throw new E("material is required.");this._material!==e&&(this._material=e,gh(this,d1e))}},width:{get:function(){return this._width},set:function(e){if(!c(e))throw new E("value is required.");e!==this._width&&(this._width=e,gh(this,u1e))}},loop:{get:function(){return this._loop},set:function(e){if(!c(e))throw new E("value is required.");if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!f.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(f.clone(t[0]))):t.length>2&&f.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,gh(this,_x)}}},id:{get:function(){return this._id},set:function(e){this._id=e,c(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!c(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far distance must be greater than near distance.");Qn.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Qn.clone(e,this._distanceDisplayCondition),gh(this,f1e))}}}),cl.prototype.update=function(){let e=k.IDENTITY;c(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);const t=this._segments.positions.length,n=this._segments.lengths,i=this._propertiesChanged[dj]>0||this._propertiesChanged[_x]>0;if((!k.equals(e,this._modelMatrix)||i)&&(this._segments=Gr.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=Ae.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=k.clone(e,this._modelMatrix),this._segments.positions.length!==t)gh(this,_x);else{const o=n.length;for(let r=0;r<o;++r)if(n[r]!==this._segments.lengths[r]){gh(this,_x);break}}},cl.prototype.getPickId=function(e){return c(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId},cl.prototype._clean=function(){this._dirty=!1;const e=this._propertiesChanged;for(let t=0;t<fj-1;++t)e[t]=0},cl.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};const Qp=cl,h1e=Qp.SHOW_INDEX,p1e=Qp.WIDTH_INDEX,XN=Qp.POSITION_INDEX,m1e=Qp.MATERIAL_INDEX,hj=Qp.POSITION_SIZE_INDEX,_1e=Qp.DISTANCE_DISPLAY_CONDITION,pj=Qp.NUMBER_OF_PROPERTIES,Dc={texCoordExpandAndBatchIndex:0,position3DHigh:1,position3DLow:2,position2DHigh:3,position2DLow:4,prevPosition3DHigh:5,prevPosition3DLow:6,prevPosition2DHigh:7,prevPosition2DLow:8,nextPosition3DHigh:9,nextPosition3DLow:10,nextPosition2DHigh:11,nextPosition2DLow:12};function Zu(e){e=g(e,g.EMPTY_OBJECT),this.show=g(e.show,!0),this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this._modelMatrix=k.clone(k.IDENTITY),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this._opaqueRS=void 0,this._translucentRS=void 0,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(pj),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:At.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=Z.clone(Z.WHITE);const t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}}}Object.defineProperties(Zu.prototype,{length:{get:function(){return ZN(this),this._polylines.length}}}),Zu.prototype.add=function(e){const t=new Qp(e,this);return t._index=this._polylines.length,this._polylines.push(t),this._createVertexArray=!0,this._createBatchTable=!0,t},Zu.prototype.remove=function(e){if(this.contains(e)){if(this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,c(e._bucket)){const t=e._bucket;t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()}return e._destroy(),!0}return!1},Zu.prototype.removeAll=function(){$N(this),xj(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0},Zu.prototype.contains=function(e){return c(e)&&e._polylineCollection===this},Zu.prototype.get=function(e){if(!c(e))throw new E("index is required.");return ZN(this),this._polylines[e]};const mj=new Vi,_j=new de,gj=new V;Zu.prototype.update=function(e){if(ZN(this),0===this._polylines.length||!this.show)return;!function C1e(e,t){const n=t.mode;(e._mode!==n||!k.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=n,e._modelMatrix=k.clone(e.modelMatrix),e._createVertexArray=!0)}(this,e);const t=e.context,n=e.mapProjection;let i,o=this._propertiesChanged;if(this._createBatchTable){if(0===dn.maximumVertexTextureImageUnits)throw new Pe("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");(function g1e(e,t){c(e._batchTable)&&e._batchTable.destroy(),e._batchTable=new tj(t,[{functionName:"batchTable_getWidthAndShow",componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:ee.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:ee.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:ee.FLOAT,componentsPerAttribute:2}],e._polylines.length)})(this,t),this._createBatchTable=!1}if(this._createVertexArray||function b1e(e){let t=!1;const i=e._positionBufferUsage;return e._propertiesChanged[XN]?(i.bufferUsage!==At.STREAM_DRAW&&(t=!0,i.bufferUsage=At.STREAM_DRAW),i.frameCount=100):i.bufferUsage!==At.STATIC_DRAW&&(0===i.frameCount?(t=!0,i.bufferUsage=At.STATIC_DRAW):i.frameCount--),t}(this))Tj(this,t,n);else if(this._polylinesUpdated){const l=this._polylinesToUpdate;if(this._mode!==ce.SCENE3D){const u=l.length;for(let d=0;d<u;++d)i=l[d],i.update()}if(o[hj]||o[m1e])Tj(this,t,n);else{const u=l.length,d=this._polylineBuckets;for(let h=0;h<u;++h){i=l[h],o=i._propertiesChanged;const m=i._bucket;let _=0;for(const p in d)if(d.hasOwnProperty(p)){if(d[p]===m){o[XN]&&m.writeUpdate(_,i,this._positionBuffer,n);break}_+=d[p].lengthOfPositions}if((o[h1e]||o[p1e])&&this._batchTable.setBatchedAttribute(i._index,0,new V(i._width,i._show)),this._batchTable.attributes.length>2){if(o[XN]||o[hj]){const p=e.mode===ce.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,y=Vi.fromCartesian(p.center,mj),b=de.fromElements(y.low.x,y.low.y,y.low.z,p.radius,_j);this._batchTable.setBatchedAttribute(i._index,2,y.high),this._batchTable.setBatchedAttribute(i._index,3,b)}if(o[_1e]){const p=gj;p.x=0,p.y=Number.MAX_VALUE;const y=i.distanceDisplayCondition;c(y)&&(p.x=y.near,p.y=y.far),this._batchTable.setBatchedAttribute(i._index,4,p)}}i._clean()}}l.length=0,this._polylinesUpdated=!1}o=this._propertiesChanged;for(let l=0;l<pj;++l)o[l]=0;let r=k.IDENTITY;e.mode===ce.SCENE3D&&(r=this.modelMatrix);const s=e.passes,a=0!==e.morphTime;(!c(this._opaqueRS)||this._opaqueRS.depthTest.enabled!==a)&&(this._opaqueRS=Lt.fromCache({depthMask:a,depthTest:{enabled:a}})),(!c(this._translucentRS)||this._translucentRS.depthTest.enabled!==a)&&(this._translucentRS=Lt.fromCache({blending:eo.ALPHA_BLEND,depthMask:!a,depthTest:{enabled:a}})),this._batchTable.update(e),(s.render||s.pick)&&function y1e(e,t,n,i){const o=t.context,r=t.commandList,s=n.length;let a=0,l=!0;const u=e._vertexArrays,d=e.debugShowBoundingVolume,m=e._batchTable.getUniformMapCallback(),_=u.length;for(let p=0;p<_;++p){const y=u[p],b=y.buckets,x=b.length;for(let C=0;C<x;++C){const w=b[C];let v=w.offset;const I=w.bucket.shaderProgram,P=w.bucket.polylines,N=P.length;let R,B,S,D,F=0;for(let L=0;L<N;++L){const M=P[L],U=A1e(M._material);if(U!==R){if(c(R)&&F>0){const q=B.isTranslucent();a>=s?(S=new $t({owner:e}),n.push(S)):S=n[a],++a,D=Pn(m(B._uniforms),e._uniformMap),S.boundingVolume=Ae.clone(gx,S.boundingVolume),S.modelMatrix=i,S.shaderProgram=I,S.vertexArray=y.va,S.renderState=q?e._translucentRS:e._opaqueRS,S.pass=q?Ue.TRANSLUCENT:Ue.OPAQUE,S.debugShowBoundingVolume=d,S.pickId="v_pickColor",S.uniformMap=D,S.count=F,S.offset=v,v+=F,F=0,l=!0,r.push(S)}B=M._material,B.update(o),R=U}const z=M._locatorBuckets,G=z.length;for(let q=0;q<G;++q){const j=z[q];j.locator===w&&(F+=j.count)}let W;t.mode===ce.SCENE3D?W=M._boundingVolumeWC:t.mode===ce.COLUMBUS_VIEW?W=M._boundingVolume2D:t.mode===ce.SCENE2D?c(M._boundingVolume2D)&&(W=Ae.clone(M._boundingVolume2D,yj),W.center.x=0):c(M._boundingVolumeWC)&&c(M._boundingVolume2D)&&(W=Ae.union(M._boundingVolumeWC,M._boundingVolume2D,yj)),l?(l=!1,Ae.clone(W,gx)):Ae.union(W,gx,gx)}c(R)&&F>0&&(a>=s?(S=new $t({owner:e}),n.push(S)):S=n[a],++a,D=Pn(m(B._uniforms),e._uniformMap),S.boundingVolume=Ae.clone(gx,S.boundingVolume),S.modelMatrix=i,S.shaderProgram=I,S.vertexArray=y.va,S.renderState=B.isTranslucent()?e._translucentRS:e._opaqueRS,S.pass=B.isTranslucent()?Ue.TRANSLUCENT:Ue.OPAQUE,S.debugShowBoundingVolume=d,S.pickId="v_pickColor",S.uniformMap=D,S.count=F,S.offset=v,l=!0,r.push(S)),R=void 0}}n.length=a}(this,e,this._colorCommands,r)};const gx=new Ae,yj=new Ae;Zu.prototype.isDestroyed=function(){return!1},Zu.prototype.destroy=function(){return Aj(this),$N(this),xj(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),Xe(this)};const bj=[0,0,0];function Tj(e,t,n){e._createVertexArray=!1,$N(e),Aj(e),function x1e(e){const t=e._mode,n=e._modelMatrix,i=e._polylineBuckets={},o=e._polylines,r=o.length;for(let s=0;s<r;++s){const a=o[s];if(a._actualPositions.length>1){a.update();const l=a.material;let u=i[l.type];c(u)||(u=i[l.type]=new nf(l,t,n)),u.addPolyline(a)}}}(e);const i=[[]];let o=i[0];const r=e._batchTable,s=e._useHighlightColor,a=[0];let l=0;const u=[[]];let d=0;const h=e._polylineBuckets;let m,_;for(m in h)h.hasOwnProperty(m)&&(_=h[m],_.updateShader(t,r,s),d+=_.lengthOfPositions);if(d>0){const p=e._mode,y=new Float32Array(6*d*3),b=new Float32Array(4*d);let x,C=0,w=0,v=0;for(m in h)if(h.hasOwnProperty(m)){_=h[m],_.write(y,b,C,w,v,r,t,n),p===ce.MORPHING&&(c(x)||(x=new Float32Array(6*d*3)),_.writeForMorph(x,C));const D=_.lengthOfPositions;C+=6*D*3,w+=4*D,v+=4*D,l=_.updateIndices(i,a,u,l)}const I=e._positionBufferUsage.bufferUsage,P=At.STATIC_DRAW;let N;e._positionBuffer=yn.createVertexBuffer({context:t,typedArray:y,usage:I}),c(x)&&(N=yn.createVertexBuffer({context:t,typedArray:x,usage:I})),e._texCoordExpandAndBatchIndexBuffer=yn.createVertexBuffer({context:t,typedArray:b,usage:P});const R=3*Float32Array.BYTES_PER_ELEMENT,B=4*Float32Array.BYTES_PER_ELEMENT;let F=0;const S=i.length;for(let D=0;D<S;++D)if(o=i[D],o.length>0){const L=new Uint16Array(o),M=yn.createIndexBuffer({context:t,typedArray:L,usage:At.STATIC_DRAW,indexDatatype:Ot.UNSIGNED_SHORT});F+=a[D];const U=6*(D*(R*O.SIXTY_FOUR_KILOBYTES)-F*R),z=R+U,G=R+z,W=R+G,q=R+W,j=R+q,Y=[{index:Dc.position3DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:U,strideInBytes:6*R},{index:Dc.position3DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:z,strideInBytes:6*R},{index:Dc.position2DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:U,strideInBytes:6*R},{index:Dc.position2DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:z,strideInBytes:6*R},{index:Dc.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:G,strideInBytes:6*R},{index:Dc.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:W,strideInBytes:6*R},{index:Dc.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:G,strideInBytes:6*R},{index:Dc.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:W,strideInBytes:6*R},{index:Dc.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:q,strideInBytes:6*R},{index:Dc.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:j,strideInBytes:6*R},{index:Dc.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:q,strideInBytes:6*R},{index:Dc.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:ee.FLOAT,offsetInBytes:j,strideInBytes:6*R},{index:Dc.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:ee.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:D*(B*O.SIXTY_FOUR_KILOBYTES)-F*B}];let ne,X,K,$;p===ce.SCENE3D?(X=e._positionBuffer,ne="vertexBuffer",K=bj,$="value"):p===ce.SCENE2D||p===ce.COLUMBUS_VIEW?(X=bj,ne="value",K=e._positionBuffer,$="vertexBuffer"):(X=N,ne="vertexBuffer",K=e._positionBuffer,$="vertexBuffer"),Y[0][ne]=X,Y[1][ne]=X,Y[2][$]=K,Y[3][$]=K,Y[4][ne]=X,Y[5][ne]=X,Y[6][$]=K,Y[7][$]=K,Y[8][ne]=X,Y[9][ne]=X,Y[10][$]=K,Y[11][$]=K;const me=new gs({context:t,attributes:Y,indexBuffer:M});e._vertexArrays.push({va:me,buckets:u[D]})}}}function T1e(e,t){return t instanceof Mn?t.id:t}const wv=[];function A1e(e){const t=Pa._uniformList[e.type],n=t.length;wv.length=2*n;let i=0;for(let o=0;o<n;++o){const r=t[o];wv[i]=r,wv[i+1]=e._uniforms[r](),i+=2}return`${e.type}:${JSON.stringify(wv,T1e)}`}function ZN(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;const t=[],n=[];let o,i=0;const r=e._polylines.length;for(let s=0;s<r;++s)o=e._polylines[s],o.isDestroyed||(o._index=i++,n.push(o),t.push(o));e._polylines=t,e._polylinesToUpdate=n}}function $N(e){const t=e._polylines,n=t.length;for(let i=0;i<n;++i)if(!t[i].isDestroyed){const o=t[i]._bucket;c(o)&&(o.shaderProgram=o.shaderProgram&&o.shaderProgram.destroy())}}function Aj(e){const t=e._vertexArrays.length;for(let n=0;n<t;++n)e._vertexArrays[n].va.destroy();e._vertexArrays.length=0}function xj(e){const t=e._polylines,n=t.length;for(let i=0;i<n;++i)t[i].isDestroyed||t[i]._destroy()}function KN(e,t,n){this.count=e,this.offset=t,this.bucket=n}function nf(e,t,n){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=n}function Cj(e){return f.dot(f.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(qn.ORIGIN_ZX_PLANE)===On.INTERSECTING}Zu.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),++this._propertiesChanged[t]},nf.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this},nf.prototype.updateShader=function(e,t,n){if(c(this.shaderProgram))return;const i=["DISTANCE_DISPLAY_CONDITION"];n&&i.push("VECTOR_TILE"),-1!==this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)&&i.push("POLYLINE_DASH"),Hn.isInternetExplorer()||i.push("CLIP_POLYLINE");const o=new St({defines:i,sources:["in vec4 v_pickColor;\n",this.material.shaderSource,Q6]}),r=t.getVertexShaderCallback()("in vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 position2DHigh;\nin vec3 position2DLow;\nin vec3 prevPosition3DHigh;\nin vec3 prevPosition3DLow;\nin vec3 prevPosition2DHigh;\nin vec3 prevPosition2DLow;\nin vec3 nextPosition3DHigh;\nin vec3 nextPosition3DLow;\nin vec3 nextPosition2DHigh;\nin vec3 nextPosition2DLow;\nin vec4 texCoordExpandAndBatchIndex;\n\nout vec2 v_st;\nout float v_width;\nout vec4 v_pickColor;\nout float v_polylineAngle;\n\nvoid main()\n{\n float texCoord = texCoordExpandAndBatchIndex.x;\n float expandDir = texCoordExpandAndBatchIndex.y;\n bool usePrev = texCoordExpandAndBatchIndex.z < 0.0;\n float batchTableIndex = texCoordExpandAndBatchIndex.w;\n\n vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);\n float width = widthAndShow.x + 0.5;\n float show = widthAndShow.y;\n\n if (width < 1.0)\n {\n show = 0.0;\n }\n\n vec4 pickColor = batchTable_getPickColor(batchTableIndex);\n\n vec4 p, prev, next;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);\n prev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);\n next = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\n prev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);\n next = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),\n czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),\n czm_morphTime);\n prev = czm_columbusViewMorph(\n czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),\n czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),\n czm_morphTime);\n next = czm_columbusViewMorph(\n czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),\n czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),\n czm_morphTime);\n }\n\n #ifdef DISTANCE_DISPLAY_CONDITION\n vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);\n vec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);\n vec3 centerLow = centerLowAndRadius.xyz;\n float radius = centerLowAndRadius.w;\n vec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);\n\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n vec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);\n lengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);\n }\n\n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;\n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;\n if (lengthSq < nearSq || lengthSq > farSq)\n {\n show = 0.0;\n }\n #endif\n\n float polylineAngle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\n gl_Position = czm_viewportOrthographic * positionWC * show;\n\n v_st.s = texCoord;\n v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\n\n v_width = width;\n v_pickColor = pickColor;\n v_polylineAngle = polylineAngle;\n}\n"),s=new St({defines:i,sources:[dx,r]});this.shaderProgram=di.fromCache({context:e,vertexShaderSource:s,fragmentShaderSource:o,attributeLocations:Dc})},nf.prototype.getPolylinePositionsLength=function(e){let t;if(this.mode===ce.SCENE3D||!Cj(e))return t=e._actualPositions.length,4*t-4;let n=0;const i=e._segments.lengths;t=i.length;for(let o=0;o<t;++o)n+=4*i[o]-4;return n};const is=new f,eu=new f,tu=new f,Sv=new f,E1e=new de,w1e=new V;nf.prototype.write=function(e,t,n,i,o,r,s,a){const l=this.mode,u=a.ellipsoid.maximumRadius*O.PI,d=this.polylines,h=d.length;for(let m=0;m<h;++m){const _=d[m],p=_.width,y=_.show&&p>0,b=_._index,x=this.getSegments(_,a),C=x.positions,w=x.lengths,v=C.length,I=_.getPickId(s).color;let R,P=0,N=0;for(let G=0;G<v;++G){0===G?_._loop?R=C[v-2]:(R=Sv,f.subtract(C[0],C[1],R),f.add(C[0],R,R)):R=C[G-1],f.clone(R,eu),f.clone(C[G],is),G===v-1?_._loop?R=C[1]:(R=Sv,f.subtract(C[v-1],C[v-2],R),f.add(C[v-1],R,R)):R=C[G+1],f.clone(R,tu);const W=w[P];G===N+W&&(N+=W,++P);const q=G-N==0,j=G===N+w[P]-1;l===ce.SCENE2D&&(eu.z=0,is.z=0,tu.z=0),(l===ce.SCENE2D||l===ce.MORPHING)&&(q||j)&&u-Math.abs(is.x)<1&&((is.x<0&&eu.x>0||is.x>0&&eu.x<0)&&f.clone(is,eu),(is.x<0&&tu.x>0||is.x>0&&tu.x<0)&&f.clone(is,tu));const Y=j?2:4;for(let ne=q?2:0;ne<Y;++ne){Vi.writeElements(is,e,n),Vi.writeElements(eu,e,n+6),Vi.writeElements(tu,e,n+12);const X=ne-2<0?-1:1;t[o]=G/(v-1),t[o+1]=ne%2*2-1,t[o+2]=X,t[o+3]=b,n+=18,o+=4}}const B=E1e;B.x=Z.floatToByte(I.red),B.y=Z.floatToByte(I.green),B.z=Z.floatToByte(I.blue),B.w=Z.floatToByte(I.alpha);const F=w1e;F.x=p,F.y=y?1:0;const S=l===ce.SCENE2D?_._boundingVolume2D:_._boundingVolumeWC,D=Vi.fromCartesian(S.center,mj),L=D.high,M=de.fromElements(D.low.x,D.low.y,D.low.z,S.radius,_j),U=gj;U.x=0,U.y=Number.MAX_VALUE;const z=_.distanceDisplayCondition;c(z)&&(U.x=z.near,U.y=z.far),r.setBatchedAttribute(b,0,F),r.setBatchedAttribute(b,1,B),r.attributes.length>2&&(r.setBatchedAttribute(b,2,L),r.setBatchedAttribute(b,3,M),r.setBatchedAttribute(b,4,U))}};const S1e=new f,v1e=new f,I1e=new f,Ej=new f;nf.prototype.writeForMorph=function(e,t){const n=this.modelMatrix,i=this.polylines,o=i.length;for(let r=0;r<o;++r){const s=i[r],a=s._segments.positions,l=s._segments.lengths,u=a.length;let d=0,h=0;for(let m=0;m<u;++m){let _;0===m?s._loop?_=a[u-2]:(_=Ej,f.subtract(a[0],a[1],_),f.add(a[0],_,_)):_=a[m-1],_=k.multiplyByPoint(n,_,v1e);const p=k.multiplyByPoint(n,a[m],S1e);let y;m===u-1?s._loop?y=a[1]:(y=Ej,f.subtract(a[u-1],a[u-2],y),f.add(a[u-1],y,y)):y=a[m+1],y=k.multiplyByPoint(n,y,I1e);const b=l[d];m===h+b&&(h+=b,++d);const v=m===h+l[d]-1?2:4;for(let I=m-h==0?2:0;I<v;++I)Vi.writeElements(p,e,t),Vi.writeElements(_,e,t+6),Vi.writeElements(y,e,t+12),t+=18}}};const D1e=new Array(1);nf.prototype.updateIndices=function(e,t,n,i){let o=n.length-1,r=new KN(0,i,this);n[o].push(r);let s=0,a=e[e.length-1],l=0;a.length>0&&(l=a[a.length-1]+1);const u=this.polylines,d=u.length;for(let h=0;h<d;++h){const m=u[h];let _;if(m._locatorBuckets=[],this.mode===ce.SCENE3D){_=D1e;const y=m._actualPositions.length;if(!(y>0))continue;_[0]=y}else _=m._segments.lengths;const p=_.length;if(p>0){let y=0;for(let b=0;b<p;++b){const x=_[b]-1;for(let C=0;C<x;++C)l+4>O.SIXTY_FOUR_KILOBYTES&&(m._locatorBuckets.push({locator:r,count:y}),y=0,t.push(4),a=[],e.push(a),l=0,r.count=s,s=0,i=0,r=new KN(0,0,this),n[++o]=[r]),a.push(l,l+2,l+1),a.push(l+1,l+2,l+3),y+=6,s+=6,i+=6,l+=4}m._locatorBuckets.push({locator:r,count:y}),l+4>O.SIXTY_FOUR_KILOBYTES&&(t.push(0),a=[],e.push(a),l=0,r.count=s,i=0,s=0,r=new KN(0,0,this),n[++o]=[r])}m._clean()}return r.count=s,i},nf.prototype.getPolylineStartIndex=function(e){const t=this.polylines;let n=0;const i=t.length;for(let o=0;o<i;++o){const r=t[o];if(r===e)break;n+=r._actualLength}return n};const Y0={positions:void 0,lengths:void 0},wj=new Array(1),P1e=new f,O1e=new Ce;let Sj;nf.prototype.getSegments=function(e,t){let n=e._actualPositions;if(this.mode===ce.SCENE3D)return wj[0]=n.length,Y0.positions=n,Y0.lengths=wj,Y0;Cj(e)&&(n=e._segments.positions);const i=t.ellipsoid,o=[],r=this.modelMatrix,s=n.length;let a,l=P1e;for(let u=0;u<s;++u)a=n[u],l=k.multiplyByPoint(r,a,l),o.push(t.project(i.cartesianToCartographic(l,O1e)));if(o.length>0){e._boundingVolume2D=Ae.fromPoints(o,e._boundingVolume2D);const u=e._boundingVolume2D.center;e._boundingVolume2D.center=new f(u.z,u.x,u.y)}return Y0.positions=o,Y0.lengths=e._segments.lengths,Y0},nf.prototype.writeUpdate=function(e,t,n,i){const o=this.mode,r=i.ellipsoid.maximumRadius*O.PI;let s=t._actualLength;if(s){e+=this.getPolylineStartIndex(t);let a=Sj;const l=6*s*3;!c(a)||a.length<l?a=Sj=new Float32Array(l):a.length>l&&(a=new Float32Array(a.buffer,0,l));const u=this.getSegments(t,i),d=u.positions,h=u.lengths;let y,m=0,_=0,p=0;s=d.length;for(let b=0;b<s;++b){0===b?t._loop?y=d[s-2]:(y=Sv,f.subtract(d[0],d[1],y),f.add(d[0],y,y)):y=d[b-1],f.clone(y,eu),f.clone(d[b],is),b===s-1?t._loop?y=d[1]:(y=Sv,f.subtract(d[s-1],d[s-2],y),f.add(d[s-1],y,y)):y=d[b+1],f.clone(y,tu);const x=h[_];b===p+x&&(p+=x,++_);const C=b-p==0,w=b===p+h[_]-1;o===ce.SCENE2D&&(eu.z=0,is.z=0,tu.z=0),(o===ce.SCENE2D||o===ce.MORPHING)&&(C||w)&&r-Math.abs(is.x)<1&&((is.x<0&&eu.x>0||is.x>0&&eu.x<0)&&f.clone(is,eu),(is.x<0&&tu.x>0||is.x>0&&tu.x<0)&&f.clone(is,tu));const I=w?2:4;for(let P=C?2:0;P<I;++P)Vi.writeElements(is,a,m),Vi.writeElements(eu,a,m+6),Vi.writeElements(tu,a,m+12),m+=18}n.copyFromArrayView(a,18*Float32Array.BYTES_PER_ELEMENT*e)}};const vv=Zu;function Jp(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._billboardCollection=new sx({batchTable:e.batchTable}),this._labelCollection=new xv({batchTable:e.batchTable}),this._polylineCollection=new vv,this._polylineCollection._useHighlightColor=!0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(Jp.prototype,{ready:{get:function(){return this._ready}},pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){return this._billboardCollection.textureAtlas.texture.sizeInBytes+this._labelCollection._textureAtlas.texture.sizeInBytes}}});const L1e=new ba("createVectorTilePoints",5),N1e=new f;Jp.prototype.createFeatures=function(e,t){const n=this._billboardCollection,i=this._labelCollection,o=this._polylineCollection,r=this._batchIds,s=r.length;for(let a=0;a<s;++a){const l=r[a],u=n.get(a),d=i.get(a),h=o.get(a);t[l]=new ax(e,l,u,d,h)}},Jp.prototype.applyDebugSettings=function(e,t){e?(Z.clone(t,this._billboardCollection._highlightColor),Z.clone(t,this._labelCollection._highlightColor),Z.clone(t,this._polylineCollection._highlightColor)):(Z.clone(Z.WHITE,this._billboardCollection._highlightColor),Z.clone(Z.WHITE,this._labelCollection._highlightColor),Z.clone(Z.WHITE,this._polylineCollection._highlightColor))};const B1e=new Z,k1e=new Z,U1e=new Z,z1e=new Z,V1e=new Z,H1e=new Z,yx=new Bn,bx=new Bn,QN=new Qn;Jp.prototype.applyStyle=function(e,t){if(!c(e))return void function F1e(e,t){const n=e._batchIds,i=n.length;for(let o=0;o<i;++o){const s=t[n[o]];s.show=!0,s.pointSize=ax.defaultPointSize,s.color=ax.defaultColor,s.pointOutlineColor=ax.defaultPointOutlineColor,s.pointOutlineWidth=ax.defaultPointOutlineWidth,s.labelColor=Z.WHITE,s.labelOutlineColor=Z.WHITE,s.labelOutlineWidth=1,s.font="30px sans-serif",s.labelStyle=Ql.FILL,s.labelText=void 0,s.backgroundColor=new Z(.165,.165,.165,.8),s.backgroundPadding=new V(7,5),s.backgroundEnabled=!1,s.scaleByDistance=void 0,s.translucencyByDistance=void 0,s.distanceDisplayCondition=void 0,s.heightOffset=0,s.anchorLineEnabled=!1,s.anchorLineColor=Z.WHITE,s.image=void 0,s.disableDepthTestDistance=0,s.horizontalOrigin=Da.CENTER,s.verticalOrigin=lo.CENTER,s.labelHorizontalOrigin=Da.RIGHT,s.labelVerticalOrigin=lo.BASELINE}}(this,t);const n=this._batchIds,i=n.length;for(let o=0;o<i;++o){const s=t[n[o]];if(c(e.show)&&(s.show=e.show.evaluate(s)),c(e.pointSize)&&(s.pointSize=e.pointSize.evaluate(s)),c(e.color)&&(s.color=e.color.evaluateColor(s,B1e)),c(e.pointOutlineColor)&&(s.pointOutlineColor=e.pointOutlineColor.evaluateColor(s,k1e)),c(e.pointOutlineWidth)&&(s.pointOutlineWidth=e.pointOutlineWidth.evaluate(s)),c(e.labelColor)&&(s.labelColor=e.labelColor.evaluateColor(s,U1e)),c(e.labelOutlineColor)&&(s.labelOutlineColor=e.labelOutlineColor.evaluateColor(s,z1e)),c(e.labelOutlineWidth)&&(s.labelOutlineWidth=e.labelOutlineWidth.evaluate(s)),c(e.font)&&(s.font=e.font.evaluate(s)),c(e.labelStyle)&&(s.labelStyle=e.labelStyle.evaluate(s)),s.labelText=c(e.labelText)?e.labelText.evaluate(s):void 0,c(e.backgroundColor)&&(s.backgroundColor=e.backgroundColor.evaluateColor(s,V1e)),c(e.backgroundPadding)&&(s.backgroundPadding=e.backgroundPadding.evaluate(s)),c(e.backgroundEnabled)&&(s.backgroundEnabled=e.backgroundEnabled.evaluate(s)),c(e.scaleByDistance)){const a=e.scaleByDistance.evaluate(s);c(a)?(yx.near=a.x,yx.nearValue=a.y,yx.far=a.z,yx.farValue=a.w,s.scaleByDistance=yx):s.scaleByDistance=void 0}else s.scaleByDistance=void 0;if(c(e.translucencyByDistance)){const a=e.translucencyByDistance.evaluate(s);c(a)?(bx.near=a.x,bx.nearValue=a.y,bx.far=a.z,bx.farValue=a.w,s.translucencyByDistance=bx):s.translucencyByDistance=void 0}else s.translucencyByDistance=void 0;if(c(e.distanceDisplayCondition)){const a=e.distanceDisplayCondition.evaluate(s);c(a)?(QN.near=a.x,QN.far=a.y,s.distanceDisplayCondition=QN):s.distanceDisplayCondition=void 0}else s.distanceDisplayCondition=void 0;c(e.heightOffset)&&(s.heightOffset=e.heightOffset.evaluate(s)),c(e.anchorLineEnabled)&&(s.anchorLineEnabled=e.anchorLineEnabled.evaluate(s)),c(e.anchorLineColor)&&(s.anchorLineColor=e.anchorLineColor.evaluateColor(s,H1e)),s.image=c(e.image)?e.image.evaluate(s):void 0,c(e.disableDepthTestDistance)&&(s.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(s)),c(e.horizontalOrigin)&&(s.horizontalOrigin=e.horizontalOrigin.evaluate(s)),c(e.verticalOrigin)&&(s.verticalOrigin=e.verticalOrigin.evaluate(s)),c(e.labelHorizontalOrigin)&&(s.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(s)),c(e.labelVerticalOrigin)&&(s.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(s))}},Jp.prototype.update=function(e){if(this._ready)this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e);else if(c(this._promise)||(this._promise=function M1e(e,t){let n=e._positions,i=e._packedBuffer;c(i)||(n=e._positions=n.slice(),e._batchIds=e._batchIds.slice(),i=e._packedBuffer=function R1e(e,t){const n=e._rectangle,i=e._minHeight,o=e._maxHeight,s=new Float64Array(2+Te.packedLength+he.packedLength);let a=0;return s[a++]=i,s[a++]=o,Te.pack(n,s,a),a+=Te.packedLength,he.pack(t,s,a),s}(e,t));const s=L1e.scheduleTask({positions:n.buffer,packedBuffer:i.buffer},[n.buffer,i.buffer]);if(c(s))return s.then(a=>{if(e.isDestroyed())return;e._positions=new Float64Array(a.positions);const l=e._billboardCollection,u=e._labelCollection,d=e._polylineCollection;n=e._positions;const h=e._batchIds,m=n.length/3;for(let _=0;_<m;++_){const p=h[_],y=f.unpack(n,3*_,N1e),b=l.add();b.position=y,b._batchIndex=p;const x=u.add();x.text=" ",x.position=y,x._batchIndex=p,d.add().positions=[f.clone(y),f.clone(y)]}e._positions=void 0,e._packedBuffer=void 0,e._ready=!0}).catch(a=>{e.isDestroyed()||(e._error=a)})}(this,e.mapProjection.ellipsoid)),c(this._error)){const t=this._error;throw this._error=void 0,t}},Jp.prototype.isDestroyed=function(){return!1},Jp.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),Xe(this)};const G1e=Jp;function yh(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=g(e.ellipsoid,he.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=g(e.center,f.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Xo.BOTH}Object.defineProperties(yh.prototype,{trianglesLength:{get:function(){return c(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return c(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});const q1e=new ba("createVectorTilePolygons",5),Y1e=new Z;yh.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},yh.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},yh.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},yh.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},yh.prototype.update=function(e){if(this._ready)this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e);else if(c(this._promise)||(this._promise=function X1e(e){if(c(e._primitive))return;let t=e._positions,n=e._counts,i=e._indexCounts,o=e._indices,r=e._transferrableBatchIds,s=e._batchTableColors,a=e._packedBuffer;if(!c(s)){t=e._positions=e._positions.slice(),n=e._counts=e._counts.slice(),i=e._indexCounts=e._indexCounts.slice(),o=e._indices=e._indices.slice(),e._center=e._ellipsoid.cartographicToCartesian(Te.center(e._rectangle)),r=e._transferrableBatchIds=new Uint32Array(e._batchIds),s=e._batchTableColors=new Uint32Array(r.length);const _=e._batchTable,p=s.length;for(let y=0;y<p;++y){const b=_.getColor(y,Y1e);s[y]=b.toRgba()}a=e._packedBuffer=function j1e(e){const t=new Float64Array(3+f.packedLength+he.packedLength+Te.packedLength);let n=0;return t[n++]=e._indices.BYTES_PER_ELEMENT,t[n++]=e._minimumHeight,t[n++]=e._maximumHeight,f.pack(e._center,t,n),n+=f.packedLength,he.pack(e._ellipsoid,t,n),n+=he.packedLength,Te.pack(e._rectangle,t,n),t}(e)}const l=[t.buffer,n.buffer,i.buffer,o.buffer,r.buffer,s.buffer,a.buffer],u={packedBuffer:a.buffer,positions:t.buffer,counts:n.buffer,indexCounts:i.buffer,indices:o.buffer,batchIds:r.buffer,batchTableColors:s.buffer};let d=e._polygonMinimumHeights,h=e._polygonMaximumHeights;c(d)&&c(h)&&(d=d.slice(),h=h.slice(),l.push(d.buffer,h.buffer),u.minimumHeights=d,u.maximumHeights=h);const m=q1e.scheduleTask(u,l);return c(m)?m.then(_=>{if(e.isDestroyed())return;e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;const p=new Float64Array(_.packedBuffer),y=p[0];(function W1e(e,t){let n=1;const i=t[n++],o=e._boundingVolumes=new Array(i);for(let a=0;a<i;++a)o[a]=Ao.unpack(t,n),n+=Ao.packedLength;const r=t[n++],s=e._batchedIndices=new Array(r);for(let a=0;a<r;++a){const l=Z.unpack(t,n);n+=Z.packedLength;const u=t[n++],d=t[n++],h=t[n++],m=new Array(h);for(let _=0;_<h;++_)m[_]=t[n++];s[a]=new dS({color:l,offset:u,count:d,batchIds:m})}})(e,p),e._indices=2===Ot.getSizeInBytes(y)?new Uint16Array(_.indices):new Uint32Array(_.indices),e._indexOffsets=new Uint32Array(_.indexOffsets),e._indexCounts=new Uint32Array(_.indexCounts),e._batchedPositions=new Float32Array(_.positions),e._vertexBatchIds=new Uint16Array(_.batchIds),function Z1e(e){c(e._primitive)||(e._primitive=new VH({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)}(e),e._ready=!0}).catch(_=>{e.isDestroyed()||(e._error=_)}):void 0}(this)),c(this._error)){const t=this._error;throw this._error=void 0,t}},yh.prototype.isDestroyed=function(){return!1},yh.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Xe(this)};const $1e=yh;function $u(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=g(e.ellipsoid,he.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=Z.clone(Z.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties($u.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});const J1e=new ba("createVectorTilePolylines",5),X0={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};const Tx=new k,vj=new f;$u.getPolylinePositions=function(e,t){const n=e._batchIds,i=e._decodedPositions,o=e._decodedPositionOffsets;if(!c(n)||!c(i))return;let r,s;const a=n.length;let l=0,u=0;for(r=0;r<a;++r)n[r]===t&&(l+=o[r+1]-o[r]);if(0===l)return;const d=new Float64Array(3*l);for(r=0;r<a;++r)if(n[r]===t){const h=o[r],m=o[r+1]-h;for(s=0;s<m;++s){const _=3*(h+s);d[u++]=i[_],d[u++]=i[_+1],d[u++]=i[_+2]}}return d},$u.prototype.getPositions=function(e){return $u.getPolylinePositions(this,e)},$u.prototype.createFeatures=function(e,t){const n=this._batchIds,i=n.length;for(let o=0;o<i;++o){const r=n[o];t[r]=new v_(e,r)}},$u.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};const cPe=new Z,lPe=Z.WHITE;$u.prototype.applyStyle=function(e,t){if(!c(e))return void function aPe(e,t){const n=e._batchIds,i=n.length;for(let o=0;o<i;++o){const s=t[n[o]];s.show=!0,s.color=Z.WHITE}}(this,t);const n=this._batchIds,i=n.length;for(let o=0;o<i;++o){const s=t[n[o]];s.color=c(e.color)?e.color.evaluateColor(s,cPe):lPe,s.show=!c(e.show)||e.show.evaluate(s)}},$u.prototype.update=function(e){const t=e.context;if(!this._ready){if(c(this._promise)||(this._promise=function ePe(e,t){if(c(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;c(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=function Q1e(e){const t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,a=new Float64Array(2+Te.packedLength+he.packedLength+f.packedLength);let l=0;return a[l++]=n,a[l++]=i,Te.pack(t,a,l),l+=Te.packedLength,he.pack(o,a,l),l+=he.packedLength,f.pack(r,a,l),a}(e));const u=J1e.scheduleTask({positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer]);return c(u)?u.then(function(d){e.isDestroyed()||(e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(d.decodedPositions),e._decodedPositionOffsets=new Uint32Array(d.decodedPositionOffsets)),e._currentPositions=new Float32Array(d.currentPositions),e._previousPositions=new Float32Array(d.previousPositions),e._nextPositions=new Float32Array(d.nextPositions),e._expandAndWidth=new Float32Array(d.expandAndWidth),e._vertexBatchIds=new Uint16Array(d.batchIds),e._indices=d.indexDatatype===Ot.UNSIGNED_SHORT?new Uint16Array(d.indices):new Uint32Array(d.indices),function tPe(e,t){if(!c(e._va)){const n=e._currentPositions,i=e._previousPositions,o=e._nextPositions,r=e._expandAndWidth,s=e._vertexBatchIds,a=e._indices;let l=i.byteLength+n.byteLength+o.byteLength;l+=r.byteLength+s.byteLength+a.byteLength,e._trianglesLength=a.length/3,e._geometryByteLength=l;const u=yn.createVertexBuffer({context:t,typedArray:i,usage:At.STATIC_DRAW}),d=yn.createVertexBuffer({context:t,typedArray:n,usage:At.STATIC_DRAW}),h=yn.createVertexBuffer({context:t,typedArray:o,usage:At.STATIC_DRAW}),m=yn.createVertexBuffer({context:t,typedArray:r,usage:At.STATIC_DRAW}),_=yn.createVertexBuffer({context:t,typedArray:s,usage:At.STATIC_DRAW}),p=yn.createIndexBuffer({context:t,typedArray:a,usage:At.STATIC_DRAW,indexDatatype:2===a.BYTES_PER_ELEMENT?Ot.UNSIGNED_SHORT:Ot.UNSIGNED_INT});e._va=new gs({context:t,attributes:[{index:X0.previousPosition,vertexBuffer:u,componentDatatype:ee.FLOAT,componentsPerAttribute:3},{index:X0.currentPosition,vertexBuffer:d,componentDatatype:ee.FLOAT,componentsPerAttribute:3},{index:X0.nextPosition,vertexBuffer:h,componentDatatype:ee.FLOAT,componentsPerAttribute:3},{index:X0.expandAndWidth,vertexBuffer:m,componentDatatype:ee.FLOAT,componentsPerAttribute:2},{index:X0.a_batchId,vertexBuffer:_,componentDatatype:ee.UNSIGNED_SHORT,componentsPerAttribute:1}],indexBuffer:p}),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}}(e,t),e._ready=!0)}).catch(d=>{e.isDestroyed()||(e._error=d)}):void 0}(this,t)),c(this._error)){const i=this._error;throw this._error=void 0,i}return}(function nPe(e,t){c(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){return k.clone(t.uniformState.view,Tx),k.multiplyByPoint(Tx,e._center,vj),k.setTranslation(Tx,vj,Tx),Tx},u_highlightColor:function(){return e._highlightColor}})})(this,t),function rPe(e,t){if(c(e._sp))return;const n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)("in vec4 currentPosition;\nin vec4 previousPosition;\nin vec4 nextPosition;\nin vec2 expandAndWidth;\nin float a_batchId;\n\nuniform mat4 u_modifiedModelView;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = u_modifiedModelView * currentPosition;\n vec4 prev = u_modifiedModelView * previousPosition;\n vec4 next = u_modifiedModelView * nextPosition;\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n}\n"),o=n.getFragmentShaderCallback(!1,void 0,!1)("uniform vec4 u_highlightColor; \nvoid main()\n{\n out_FragColor = u_highlightColor;\n}\n"),r=new St({defines:["VECTOR_TILE",Hn.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[dx,i]}),s=new St({defines:["VECTOR_TILE"],sources:[o]});e._sp=di.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:X0})}(this,t),function iPe(e){c(e._rs)||(e._rs=Lt.fromCache({blending:eo.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:{enabled:!0,factor:-5,units:-5}}))}(this);const n=e.passes;(n.render||n.pick)&&function sPe(e,t){if(!c(e._command)){const n=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new $t({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:n,boundingVolume:e._boundingVolume,pass:Ue.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}(this,e)},$u.prototype.isDestroyed=function(){return!1},$u.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),Xe(this)};const Ij=$u;function bh(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=g(e.ellipsoid,he.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,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._minimumMaximumVectorHeights=new V(vo._defaultMinTerrainHeight,vo._defaultMaxTerrainHeight),this._boundingVolume=Ao.fromRectangle(e.rectangle,vo._defaultMinTerrainHeight,vo._defaultMaxTerrainHeight,this._ellipsoid),this._classificationType=e.classificationType,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._startEllipsoidNormals=void 0,this._endEllipsoidNormals=void 0,this._startPositionAndHeights=void 0,this._startFaceNormalAndVertexCornerIds=void 0,this._endPositionAndHeights=void 0,this._endFaceNormalAndHalfWidths=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=Z.clone(Z.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(bh.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});const mPe=new ba("createVectorTileClampedPolylines"),em={startEllipsoidNormal:0,endEllipsoidNormal:1,startPositionAndHeight:2,endPositionAndHeight:3,startFaceNormalAndVertexCorner:4,endFaceNormalAndHalfWidth:5,a_batchId:6};const Ax=new k,Dj=new f;function Pj(e){return Lt.fromCache({cull:{enabled:!0,face:ur.FRONT},blending:eo.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Fi.EQUAL,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},backFunction:Fi.EQUAL,backOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},reference:xn.CESIUM_3D_TILE_MASK,mask:xn.CESIUM_3D_TILE_MASK}})}bh.prototype.getPositions=function(e){return Ij.getPolylinePositions(this,e)},bh.prototype.createFeatures=function(e,t){const n=this._batchIds,i=n.length;for(let o=0;o<i;++o){const r=n[o];t[r]=new v_(e,r)}},bh.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};const CPe=new Z,EPe=Z.WHITE;bh.prototype.applyStyle=function(e,t){if(!c(e))return void function xPe(e,t){const n=e._batchIds,i=n.length;for(let o=0;o<i;++o){const s=t[n[o]];s.show=!0,s.color=Z.WHITE}}(this,t);const n=this._batchIds,i=n.length;for(let o=0;o<i;++o){const s=t[n[o]];s.color=c(e.color)?e.color.evaluateColor(s,CPe):EPe,s.show=!c(e.show)||e.show.evaluate(s)}},bh.prototype.update=function(e){const t=e.context;if(!this._ready){if(c(this._promise)||(this._promise=function SPe(e){return vo.initialize().then(function(){!function hPe(e,t,n){const i=vo.getMinimumMaximumHeights(t,n),o=i.minimumTerrainHeight,r=i.maximumTerrainHeight,s=e._minimumMaximumVectorHeights;s.x=o,s.y=r,Ao.fromRectangle(e._rectangle,o,r,n,e._boundingVolume)}(e,e._rectangle,e._ellipsoid)}).catch(t=>{e.isDestroyed()||(e._error=t)})}(this).then(function _Pe(e,t){if(c(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;c(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=function pPe(e){const t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,a=new Float64Array(2+Te.packedLength+he.packedLength+f.packedLength);let l=0;return a[l++]=n,a[l++]=i,Te.pack(t,a,l),l+=Te.packedLength,he.pack(o,a,l),l+=he.packedLength,f.pack(r,a,l),a}(e));const u=mPe.scheduleTask({positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer]);return c(u)?u.then(function(d){e.isDestroyed()||(e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(d.decodedPositions),e._decodedPositionOffsets=new Uint32Array(d.decodedPositionOffsets)),e._startEllipsoidNormals=new Float32Array(d.startEllipsoidNormals),e._endEllipsoidNormals=new Float32Array(d.endEllipsoidNormals),e._startPositionAndHeights=new Float32Array(d.startPositionAndHeights),e._startFaceNormalAndVertexCornerIds=new Float32Array(d.startFaceNormalAndVertexCornerIds),e._endPositionAndHeights=new Float32Array(d.endPositionAndHeights),e._endFaceNormalAndHalfWidths=new Float32Array(d.endFaceNormalAndHalfWidths),e._vertexBatchIds=new Uint16Array(d.vertexBatchIds),e._indices=d.indexDatatype===Ot.UNSIGNED_SHORT?new Uint16Array(d.indices):new Uint32Array(d.indices),function gPe(e,t){if(!c(e._va)){const n=e._startEllipsoidNormals,i=e._endEllipsoidNormals,o=e._startPositionAndHeights,r=e._endPositionAndHeights,s=e._startFaceNormalAndVertexCornerIds,a=e._endFaceNormalAndHalfWidths,l=e._vertexBatchIds,u=e._indices;let d=n.byteLength+i.byteLength;d+=o.byteLength+r.byteLength,d+=s.byteLength+a.byteLength,d+=l.byteLength+u.byteLength,e._trianglesLength=u.length/3,e._geometryByteLength=d;const h=yn.createVertexBuffer({context:t,typedArray:n,usage:At.STATIC_DRAW}),m=yn.createVertexBuffer({context:t,typedArray:i,usage:At.STATIC_DRAW}),_=yn.createVertexBuffer({context:t,typedArray:o,usage:At.STATIC_DRAW}),p=yn.createVertexBuffer({context:t,typedArray:r,usage:At.STATIC_DRAW}),y=yn.createVertexBuffer({context:t,typedArray:s,usage:At.STATIC_DRAW}),b=yn.createVertexBuffer({context:t,typedArray:a,usage:At.STATIC_DRAW}),x=yn.createVertexBuffer({context:t,typedArray:l,usage:At.STATIC_DRAW}),C=yn.createIndexBuffer({context:t,typedArray:u,usage:At.STATIC_DRAW,indexDatatype:2===u.BYTES_PER_ELEMENT?Ot.UNSIGNED_SHORT:Ot.UNSIGNED_INT});e._va=new gs({context:t,attributes:[{index:em.startEllipsoidNormal,vertexBuffer:h,componentDatatype:ee.FLOAT,componentsPerAttribute:3},{index:em.endEllipsoidNormal,vertexBuffer:m,componentDatatype:ee.FLOAT,componentsPerAttribute:3},{index:em.startPositionAndHeight,vertexBuffer:_,componentDatatype:ee.FLOAT,componentsPerAttribute:4},{index:em.endPositionAndHeight,vertexBuffer:p,componentDatatype:ee.FLOAT,componentsPerAttribute:4},{index:em.startFaceNormalAndVertexCorner,vertexBuffer:y,componentDatatype:ee.FLOAT,componentsPerAttribute:4},{index:em.endFaceNormalAndHalfWidth,vertexBuffer:b,componentDatatype:ee.FLOAT,componentsPerAttribute:4},{index:em.a_batchId,vertexBuffer:x,componentDatatype:ee.UNSIGNED_SHORT,componentsPerAttribute:1}],indexBuffer:C}),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}}(e,t),e._ready=!0)}).catch(d=>{e.isDestroyed()||(e._error=d)}):void 0}(this,t))),c(this._error)){const i=this._error;throw this._error=void 0,i}return}(function yPe(e,t){c(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){return k.clone(t.uniformState.view,Ax),k.multiplyByPoint(Ax,e._center,Dj),k.setTranslation(Ax,Dj,Ax),Ax},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})})(this,t),function TPe(e,t){if(c(e._sp))return;const n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)('in vec3 startEllipsoidNormal;\nin vec3 endEllipsoidNormal;\nin vec4 startPositionAndHeight;\nin vec4 endPositionAndHeight;\nin vec4 startFaceNormalAndVertexCorner;\nin vec4 endFaceNormalAndHalfWidth;\nin float a_batchId;\n\nuniform mat4 u_modifiedModelView;\nuniform vec2 u_minimumMaximumVectorHeights;\n\nout vec4 v_startPlaneEC;\nout vec4 v_endPlaneEC;\nout vec4 v_rightPlaneEC;\nout float v_halfWidth;\nout vec3 v_volumeUpEC;\n\nvoid main()\n{\n // vertex corner IDs\n // 3-----------7\n // /| left /|\n // / | 1 / |\n // 2-----------6 5 end\n // | / | /\n // start |/ right |/\n // 0-----------4\n //\n float isEnd = floor(startFaceNormalAndVertexCorner.w * 0.251); // 0 for front, 1 for end\n float isTop = floor(startFaceNormalAndVertexCorner.w * mix(0.51, 0.19, isEnd)); // 0 for bottom, 1 for top\n\n vec3 forward = endPositionAndHeight.xyz - startPositionAndHeight.xyz;\n vec3 right = normalize(cross(forward, startEllipsoidNormal));\n\n vec4 position = vec4(startPositionAndHeight.xyz, 1.0);\n position.xyz += forward * isEnd;\n\n v_volumeUpEC = czm_normal * normalize(cross(right, forward));\n\n // Push for volume height\n float offset;\n vec3 ellipsoidNormal = mix(startEllipsoidNormal, endEllipsoidNormal, isEnd);\n\n // offset height to create volume\n offset = mix(startPositionAndHeight.w, endPositionAndHeight.w, isEnd);\n offset = mix(u_minimumMaximumVectorHeights.y, u_minimumMaximumVectorHeights.x, isTop) - offset;\n position.xyz += offset * ellipsoidNormal;\n\n // move from RTC to EC\n position = u_modifiedModelView * position;\n right = czm_normal * right;\n\n // Push for width in a direction that is in the start or end plane and in a plane with right\n // N = normalEC ("right-facing" direction for push)\n // R = right\n // p = angle between N and R\n // w = distance to push along R if R == N\n // d = distance to push along N\n //\n // N R\n // { p| } * cos(p) = dot(N, R) = w / d\n // d | |w * d = w / dot(N, R)\n // { | }\n // o---------- polyline segment ----\x3e\n //\n vec3 scratchNormal = mix(-startFaceNormalAndVertexCorner.xyz, endFaceNormalAndHalfWidth.xyz, isEnd);\n scratchNormal = cross(scratchNormal, mix(startEllipsoidNormal, endEllipsoidNormal, isEnd));\n vec3 miterPushNormal = czm_normal * normalize(scratchNormal);\n\n offset = 2.0 * endFaceNormalAndHalfWidth.w * max(0.0, czm_metersPerPixel(position)); // offset = widthEC\n offset = offset / dot(miterPushNormal, right);\n position.xyz += miterPushNormal * (offset * sign(0.5 - mod(startFaceNormalAndVertexCorner.w, 2.0)));\n\n gl_Position = czm_depthClamp(czm_projection * position);\n\n position = u_modifiedModelView * vec4(startPositionAndHeight.xyz, 1.0);\n vec3 startNormalEC = czm_normal * startFaceNormalAndVertexCorner.xyz;\n v_startPlaneEC = vec4(startNormalEC, -dot(startNormalEC, position.xyz));\n v_rightPlaneEC = vec4(right, -dot(right, position.xyz));\n\n position = u_modifiedModelView * vec4(endPositionAndHeight.xyz, 1.0);\n vec3 endNormalEC = czm_normal * endFaceNormalAndHalfWidth.xyz;\n v_endPlaneEC = vec4(endNormalEC, -dot(endNormalEC, position.xyz));\n v_halfWidth = endFaceNormalAndHalfWidth.w;\n}\n'),o=n.getFragmentShaderCallback(!1,void 0,!0)("in vec4 v_startPlaneEC;\nin vec4 v_endPlaneEC;\nin vec4 v_rightPlaneEC;\nin float v_halfWidth;\nin vec3 v_volumeUpEC;\n\nuniform vec4 u_highlightColor;\nvoid main()\n{\n float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));\n\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n out_FragColor = vec4(0.0, 0.0, 1.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float halfMaxWidth = v_halfWidth * czm_metersPerPixel(eyeCoordinate);\n\n // Expand halfMaxWidth if direction to camera is almost perpendicular with the volume's up direction\n halfMaxWidth += halfMaxWidth * (1.0 - dot(-normalize(eyeCoordinate.xyz), v_volumeUpEC));\n\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneEC, eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneEC, eyeCoordinate.xyz);\n\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n out_FragColor = vec4(logDepthOrDepth, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n out_FragColor = u_highlightColor;\n\n czm_writeDepthClamp();\n}\n"),r=new St({defines:["VECTOR_TILE",Hn.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[dx,i]}),s=new St({defines:["VECTOR_TILE"],sources:[o]});e._sp=di.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:em})}(this,t),function bPe(e){c(e._rs)||(e._rs=Pj(!1),e._rs3DTiles=Pj(!0))}(this);const n=e.passes;(n.render||n.pick)&&function APe(e,t){let n=e._command;if(!c(e._command)){const o=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new $t({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:o,boundingVolume:e._boundingVolume,pass:Ue.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});const r=$t.shallowClone(n,n.derivedCommands.tileset);r.renderState=e._rs3DTiles,r.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r}const i=e._classificationType;(i===Xo.TERRAIN||i===Xo.BOTH)&&t.commandList.push(n),(i===Xo.CESIUM_3D_TILE||i===Xo.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}(this,e)},bh.prototype.isDestroyed=function(){return!1},bh.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),Xe(this)};const vPe=bh,IPe=new Ce,DPe=new f;function Ku(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,function FPe(e,t,n){n=g(n,0);const i=new Uint8Array(t),o=new DataView(t),r=o.getUint32(n+=Qu,!0);if(1!==r)throw new Pe(`Only Vector tile version 1 is supported. Version ${r} is not.`);const s=o.getUint32(n+=Qu,!0);if(n+=Qu,0===s)return void(e._ready=!0);const a=o.getUint32(n,!0);if(n+=Qu,0===a)throw new Pe("Feature table must have a byte length greater than zero");const l=o.getUint32(n,!0),u=o.getUint32(n+=Qu,!0),d=o.getUint32(n+=Qu,!0),h=o.getUint32(n+=Qu,!0),m=o.getUint32(n+=Qu,!0),_=o.getUint32(n+=Qu,!0),p=o.getUint32(n+=Qu,!0),y=Cc(i,n+=Qu,a);n+=a;const b=new Uint8Array(t,n,l);let x,C;n+=l,u>0&&(x=Cc(i,n,u),n+=u,d>0&&(C=new Uint8Array(t,n,d),C=new Uint8Array(C),n+=d));const w=g(y.POLYGONS_LENGTH,0),v=g(y.POLYLINES_LENGTH,0),I=g(y.POINTS_LENGTH,0),P=w+v+I,N=new nR(e,P,x,C,function RPe(e){return function(t,n){c(e._polygons)&&e._polygons.updateCommands(t,n)}}(e));if(e._batchTable=N,0===P)return;const R=new nv(y,b),B=R.getGlobalProperty("REGION");if(!c(B))throw new Pe("Feature table global property: REGION must be defined");const F=Te.unpack(B),S=B[4],D=B[5],L=e._tile.computedTransform;let M=R.getGlobalProperty("RTC_CENTER",ee.FLOAT,3);c(M)?(M=f.unpack(M),k.multiplyByPoint(L,M,M)):(M=Te.center(F),M.height=O.lerp(S,D,.5),M=he.WGS84.cartographicToCartesian(M));const U=function LPe(e,t){let n,i,o,r;const s=g(e.POLYGONS_LENGTH,0),a=g(e.POLYLINES_LENGTH,0),l=g(e.POINTS_LENGTH,0);s>0&&c(e.POLYGON_BATCH_IDS)&&(n=new Uint16Array(t.buffer,t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset,s)),a>0&&c(e.POLYLINE_BATCH_IDS)&&(i=new Uint16Array(t.buffer,t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset,a)),l>0&&c(e.POINT_BATCH_IDS)&&(o=new Uint16Array(t.buffer,t.byteOffset+e.POINT_BATCH_IDS.byteOffset,l));const u=c(n)||c(i)||c(o),d=s>0&&!c(n)||a>0&&!c(i)||l>0&&!c(o);if(u&&d)throw new Pe("If one group of batch ids is defined, then all batch ids must be defined");if(!c(n)&&!c(i)&&!c(o)){let m=0;if(!c(n)&&s>0)for(n=new Uint16Array(s),r=0;r<s;++r)n[r]=m++;if(!c(i)&&a>0)for(i=new Uint16Array(a),r=0;r<a;++r)i[r]=m++;if(!c(o)&&l>0)for(o=new Uint16Array(l),r=0;r<l;++r)o[r]=m++}return{polygons:n,polylines:i,points:o}}(y,b);if(n+=(4-n%4)%4,w>0){R.featuresLength=w;const z=g(R.getPropertyArray("POLYGON_COUNTS",ee.UNSIGNED_INT,1),R.getPropertyArray("POLYGON_COUNT",ee.UNSIGNED_INT,1));if(!c(z))throw new Pe("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");const G=g(R.getPropertyArray("POLYGON_INDEX_COUNTS",ee.UNSIGNED_INT,1),R.getPropertyArray("POLYGON_INDEX_COUNT",ee.UNSIGNED_INT,1));if(!c(G))throw new Pe("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");const W=z.reduce(function(X,K){return X+2*K},0),q=G.reduce(function(X,K){return X+K},0),j=new Uint32Array(t,n,q);n+=h;const Q=new Uint16Array(t,n,W);let Y,ne;n+=m,c(y.POLYGON_MINIMUM_HEIGHTS)&&c(y.POLYGON_MAXIMUM_HEIGHTS)&&(Y=R.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",ee.FLOAT,1),ne=R.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",ee.FLOAT,1)),e._polygons=new $1e({positions:Q,counts:z,indexCounts:G,indices:j,minimumHeight:S,maximumHeight:D,polygonMinimumHeights:Y,polygonMaximumHeights:ne,center:M,rectangle:F,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:N,batchIds:U.polygons,modelMatrix:L})}if(v>0){R.featuresLength=v;const z=g(R.getPropertyArray("POLYLINE_COUNTS",ee.UNSIGNED_INT,1),R.getPropertyArray("POLYLINE_COUNT",ee.UNSIGNED_INT,1));if(!c(z))throw new Pe("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let G=R.getPropertyArray("POLYLINE_WIDTHS",ee.UNSIGNED_SHORT,1);if(!c(G)){G=new Uint16Array(v);for(let ne=0;ne<v;++ne)G[ne]=2}const W=z.reduce(function(ne,X){return ne+3*X},0),q=new Uint16Array(t,n,W);n+=_;const j=e._tileset,Q=j.examineVectorLinesFunction;c(Q)&&function BPe(e,t,n,i,o,r){const s=t.length;let a=0;for(let l=0;l<s;l++){const u=3*t[l],d=e.slice(a,a+u);a+=u,r(d,n[l],o,i)}}(function PPe(e,t,n,i,o){const r=e.length/3,s=e.subarray(0,r),a=e.subarray(r,2*r),l=e.subarray(2*r,3*r);wi.zigZagDeltaDecode(s,a,l);const u=new Float64Array(e.length);for(let d=0;d<r;++d){const m=a[d],_=l[d],p=O.lerp(t.west,t.east,s[d]/32767),y=O.lerp(t.south,t.north,m/32767),b=O.lerp(n,i,_/32767),x=Ce.fromRadians(p,y,b,IPe),C=o.cartographicToCartesian(x,DPe);f.pack(C,u,3*d)}return u}(new Uint16Array(q),F,S,D,he.WGS84),z,U.polylines,N,e.url,Q);let Y=NPe;c(j.classificationType)&&(Y=MPe),e._polylines=Y({positions:q,widths:G,counts:z,batchIds:U.polylines,minimumHeight:S,maximumHeight:D,center:M,rectangle:F,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:N,classificationType:j.classificationType,keepDecodedPositions:j.vectorKeepDecodedPositions})}if(I>0){const z=new Uint16Array(t,n,3*I);n+=p,e._points=new G1e({positions:z,batchIds:U.points,minimumHeight:S,maximumHeight:D,rectangle:F,batchTable:N})}}(this,i,o)}Object.defineProperties(Ku.prototype,{featuresLength:{get:function(){return c(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return c(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){let e=0;return c(this._polygons)&&(e+=this._polygons.trianglesLength),c(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){let e=0;return c(this._polygons)&&(e+=this._polygons.geometryByteLength),c(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return c(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return c(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}}});const Qu=Uint32Array.BYTES_PER_ELEMENT;function NPe(e){return new Ij(e)}function MPe(e){return new vPe(e)}function eM(e){const t=e.featuresLength;if(!c(e._features)&&t>0){const n=new Array(t);c(e._polygons)&&e._polygons.createFeatures(e,n),c(e._polylines)&&e._polylines.createFeatures(e,n),c(e._points)&&e._points.createFeatures(e,n),e._features=n}}Ku.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},Ku.prototype.getFeature=function(e){const t=this.featuresLength;if(!c(e)||e<0||e>=t)throw new E(`batchId is required and between zero and featuresLength - 1 (${t-1}).`);return c(this._features)||eM(this),this._features[e]},Ku.prototype.applyDebugSettings=function(e,t){c(this._polygons)&&this._polygons.applyDebugSettings(e,t),c(this._polylines)&&this._polylines.applyDebugSettings(e,t),c(this._points)&&this._points.applyDebugSettings(e,t)},Ku.prototype.applyStyle=function(e){c(this._features)||eM(this),c(this._polygons)&&this._polygons.applyStyle(e,this._features),c(this._polylines)&&this._polylines.applyStyle(e,this._features),c(this._points)&&this._points.applyStyle(e,this._features)},Ku.prototype.update=function(e,t){let n=!0;c(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),n=n&&this._polygons.ready),c(this._polylines)&&(this._polylines.update(t),n=n&&this._polylines.ready),c(this._points)&&(this._points.update(t),n=n&&this._points.ready),c(this._batchTable)&&n&&(c(this._features)||eM(this),this._batchTable.update(e,t),this._ready=!0)},Ku.prototype.pick=function(e,t,n){},Ku.prototype.getPolylinePositions=function(e){const t=this._polylines;if(c(t))return t.getPositions(e)},Ku.prototype.isDestroyed=function(){return!1},Ku.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(),Xe(this)};const kPe=Ku,Oj={b3dm:function(e,t,n,i,o){return j0.fromB3dm(e,t,n,i,o)},pnts:function(e,t,n,i,o){return j0.fromPnts(e,t,n,i,o)},i3dm:function(e,t,n,i,o){return j0.fromI3dm(e,t,n,i,o)},cmpt:function(e,t,n,i,o){return hde.fromTileType(e,t,n,i,o,Oj)},externalTileset:function(e,t,n,i){return Vve.fromJson(e,t,n,i)},geom:function(e,t,n,i,o){return new _he(e,t,n,i,o)},vctr:function(e,t,n,i,o){return new kPe(e,t,n,i,o)},subt:function(e,t,n,i,o){return Q8.fromSubtreeJson(e,t,n,void 0,i,o)},subtreeJson:function(e,t,n,i){return Q8.fromSubtreeJson(e,t,n,i)},glb:function(e,t,n,i,o){if(i.byteLength<12)throw new Pe("Invalid glb content");const a=new DataView(i,o).getUint32(8,!0),l=new Uint8Array(i,o,a);return j0.fromGltf(e,t,n,l)},gltf:function(e,t,n,i){return j0.fromGltf(e,t,n,i)},geoJson:function(e,t,n,i){return j0.fromGeoJson(e,t,n,i)}},Rj=Oj,Or=Object.freeze({UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5}),Ju={BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",COMPOSITE:"cmpt",POINT_CLOUD:"pnts",VECTOR:"vctr",GEOMETRY:"geom",GLTF:"gltf",GLTF_BINARY:"glb",IMPLICIT_SUBTREE:"subt",IMPLICIT_SUBTREE_JSON:"subtreeJson",EXTERNAL_TILESET:"externalTileset",MULTIPLE_CONTENT:"multipleContent",GEOJSON:"geoJson",VOXEL_BINARY:"voxl",VOXEL_JSON:"voxelJson",isBinaryFormat:function(e){switch(e){case Ju.BATCHED_3D_MODEL:case Ju.INSTANCED_3D_MODEL:case Ju.COMPOSITE:case Ju.POINT_CLOUD:case Ju.VECTOR:case Ju.GEOMETRY:case Ju.IMPLICIT_SUBTREE:case Ju.VOXEL_BINARY:case Ju.GLTF_BINARY:return!0;default:return!1}}},Pc=Object.freeze(Ju),Z0=Object.freeze({NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0}),xs={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},Th=new Array(xs.NUMBER_OF_PASSES);Th[xs.RENDER]=Object.freeze({pass:xs.RENDER,isRender:!0,requestTiles:!0,ignoreCommands:!1}),Th[xs.PICK]=Object.freeze({pass:xs.PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1}),Th[xs.SHADOW]=Object.freeze({pass:xs.SHADOW,isRender:!1,requestTiles:!0,ignoreCommands:!1}),Th[xs.PRELOAD]=Object.freeze({pass:xs.PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0}),Th[xs.PRELOAD_FLIGHT]=Object.freeze({pass:xs.PRELOAD_FLIGHT,isRender:!1,requestTiles:!0,ignoreCommands:!0}),Th[xs.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({pass:xs.REQUEST_RENDER_MODE_DEFER_CHECK,isRender:!1,requestTiles:!0,ignoreCommands:!0}),Th[xs.MOST_DETAILED_PRELOAD]=Object.freeze({pass:xs.MOST_DETAILED_PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0}),Th[xs.MOST_DETAILED_PICK]=Object.freeze({pass:xs.MOST_DETAILED_PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1}),xs.getPassOptions=function(e){return Th[e]};const zs=Object.freeze(xs);function of(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}Object.defineProperties(of.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!0}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(e){throw new E("Empty3DTileContent cannot have content metadata")}},batchTable:{get:function(){}},group:{get:function(){},set:function(e){throw new E("Empty3DTileContent cannot have group metadata")}}}),of.prototype.hasProperty=function(e,t){return!1},of.prototype.getFeature=function(e){},of.prototype.applyDebugSettings=function(e,t){},of.prototype.applyStyle=function(e){},of.prototype.update=function(e,t){},of.prototype.pick=function(e,t,n){},of.prototype.isDestroyed=function(){return!1},of.prototype.destroy=function(){return Xe(this)};const Lj=of;function Ah(e){const t=(e=g(e,g.EMPTY_OBJECT)).content,n=e.class;A.typeOf.object("options.content",t),A.typeOf.object("options.class",n),this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(Ah.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),Ah.prototype.hasProperty=function(e){return fi.hasProperty(e,this._properties,this._class)},Ah.prototype.hasPropertyBySemantic=function(e){return fi.hasPropertyBySemantic(e,this._properties,this._class)},Ah.prototype.getPropertyIds=function(e){return fi.getPropertyIds(this._properties,this._class,e)},Ah.prototype.getProperty=function(e){return fi.getProperty(e,this._properties,this._class)},Ah.prototype.setProperty=function(e,t){return fi.setProperty(e,t,this._properties,this._class)},Ah.prototype.getPropertyBySemantic=function(e){return fi.getPropertyBySemantic(e,this._properties,this._class)},Ah.prototype.setPropertyBySemantic=function(e,t){return fi.setPropertyBySemantic(e,t,this._properties,this._class)};const UPe=Ah;function tM(e,t){const n=vr(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!c(n))return;if(!c(e.schema))return void tM._oneTimeWarning("findContentMetadata-missing-root-schema","Could not find a metadata schema for content metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");const i=g(e.schema.classes,g.EMPTY_OBJECT);return c(n.class)?new UPe({content:n,class:i[n.class]}):void 0}tM._oneTimeWarning=_n;const Nj=tM,Mj=function zPe(e,t){const n=e.metadataExtension;if(!c(n))return;const i=n.groups,o=vr(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"].group:t.group;if("number"==typeof o)return i[o];const r=n.groupIds.findIndex(function(s){return s===o});return r>=0?i[r]:void 0};function xh(e){const t=(e=g(e,g.EMPTY_OBJECT)).tile,n=e.class;A.typeOf.object("options.tile",t),A.typeOf.object("options.class",n),this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(xh.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),xh.prototype.hasProperty=function(e){return fi.hasProperty(e,this._properties,this._class)},xh.prototype.hasPropertyBySemantic=function(e){return fi.hasPropertyBySemantic(e,this._properties,this._class)},xh.prototype.getPropertyIds=function(e){return fi.getPropertyIds(this._properties,this._class,e)},xh.prototype.getProperty=function(e){return fi.getProperty(e,this._properties,this._class)},xh.prototype.setProperty=function(e,t){return fi.setProperty(e,t,this._properties,this._class)},xh.prototype.getPropertyBySemantic=function(e){return fi.getPropertyBySemantic(e,this._properties,this._class)},xh.prototype.setPropertyBySemantic=function(e,t){return fi.setPropertyBySemantic(e,t,this._properties,this._class)};const VPe=xh;function nM(e,t){const n=vr(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!c(n))return;if(!c(e.schema))return void nM._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.");const i=g(e.schema.classes,g.EMPTY_OBJECT);return c(n.class)?new VPe({tile:n,class:i[n.class]}):void 0}nM._oneTimeWarning=_n;const HPe=nM,Fj=function GPe(e){const t=new Uint8Array(e);let n=cS(t);if("glTF"===n&&(n="glb"),Pc.isBinaryFormat(n))return{contentType:n,binaryPayload:t};const i=function jPe(e){let t;try{t=Cc(e)}catch{throw new Pe("Invalid tile content.")}return t}(t);if(c(i.root))return{contentType:Pc.EXTERNAL_TILESET,jsonPayload:i};if(c(i.asset))return{contentType:Pc.GLTF,jsonPayload:i};if(c(i.tileAvailability))return{contentType:Pc.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(c(i.type))return{contentType:Pc.GEOJSON,jsonPayload:i};if(c(i.voxelTable))return{contentType:Pc.VOXEL_JSON,jsonPayload:i};throw new Pe("Invalid tile content.")};function nu(e,t,n,i){this._tileset=e,this._tile=t,this._tilesetResource=n,this._contents=[],this._contentsCreated=!1;const o=c(i.contents)?i.contents:i.content;this._innerContentHeaders=o,this._requestsInFlight=0,this._cancelCount=0;const 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;s<r;s++){const a=n.getDerivedResource({url:o[s].uri}),l=kf.getServerKey(a.getUrlComponent());this._innerContentResources[s]=a,this._serverKeys[s]=l}}function iM(e,t){e._requestsInFlight+=t,e.tileset.statistics.numberOfPendingRequests+=t}function Bj(e,t){e._cancelCount++,e._tile._contentState=t;const n=e.tileset.statistics;n.numberOfPendingRequests-=e._requestsInFlight,n.numberOfAttemptedRequests+=e._requestsInFlight,e._requestsInFlight=0,e._arrayFetchPromises=new Array(e._innerContentHeaders.length)}function qPe(e,t,n,i){const o=e._innerContentResources[t].clone(),r=e.tile,l=new h_({throttle:!0,throttleByServer:!0,type:f_.TILES3D,priorityFunction:function(){return r._priority},serverKey:e._serverKeys[t]});o.request=l,e._requests[t]=l;const u=o.fetchArrayBuffer();if(c(u))return u.then(function(d){if(!(n<e._cancelCount))return o.request.cancelled||o.request.state===To.CANCELLED?void Bj(e,i):(iM(e,-1),d)}).catch(function(d){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===To.CANCELLED)return void Bj(e,i);iM(e,-1),kj(e,t,d)}})}function oM(){return oM=(0,we.Z)(function*(e){const t=e._cancelCount,n=yield Promise.all(e._arrayFetchPromises);if(t<e._cancelCount)return;const i=n.map((r,s)=>function XPe(e,t,n){return rM.apply(this,arguments)}(e,r,s)),o=yield Promise.all(i);return e._contentsCreated=!0,e._contents=o.filter(c),o}),oM.apply(this,arguments)}function rM(){return(rM=(0,we.Z)(function*(e,t,n){if(c(t))try{const i=Fj(t);if(i.contentType===Pc.EXTERNAL_TILESET)throw new Pe("External tilesets are disallowed inside multiple contents");e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===Pc.GEOMETRY||i.contentType===Pc.VECTOR;const o=e._tileset,r=e._innerContentResources[n],s=e._tile;let a;const l=Rj[i.contentType];a=c(i.binaryPayload)?yield Promise.resolve(l(o,s,r,i.binaryPayload.buffer,0)):yield Promise.resolve(l(o,s,r,i.jsonPayload));const u=e._innerContentHeaders[n];s.hasImplicitContentMetadata?a.metadata=s.implicitSubtree.getContentMetadataView(s.implicitCoordinates,n):s.hasImplicitContent||(a.metadata=Nj(o,u));const d=Mj(o,u);return c(d)&&(a.group=new TH({metadata:d})),a}catch(i){kj(e,n,i)}})).apply(this,arguments)}function kj(e,t,n){const i=e._tileset,o=e._innerContentResources[t].url,r=c(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}`))}Object.defineProperties(nu.prototype,{featurePropertiesDirty:{get:function(){const e=this._contents,t=e.length;for(let n=0;n<t;++n)if(e[n].featurePropertiesDirty)return!0;return!1},set:function(e){const t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].featurePropertiesDirty=e}},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(){return this._contents}},ready:{get:function(){return!!this._contentsCreated&&this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(){throw new E("Multiple3DTileContent cannot have metadata")}},batchTable:{get:function(){}},group:{get:function(){},set:function(){throw new E("Multiple3DTileContent cannot have group metadata")}},innerContentUrls:{get:function(){return this._innerContentHeaders.map(function(e){return e.uri})}}}),nu.prototype.requestInnerContents=function(){if(!function WPe(e){const t={};for(let n=0;n<e.length;n++){const i=e[n];c(t[i])?t[i]++:t[i]=1}for(const n in t)if(t.hasOwnProperty(n)&&!kf.serverHasOpenSlots(n,t[n]))return!1;return kf.heapHasOpenSlots(e.length)}(this._serverKeys))return void(this.tileset.statistics.numberOfAttemptedRequests+=this._serverKeys.length);const e=this._innerContentHeaders;iM(this,e.length);const t=this._cancelCount;for(let n=0;n<e.length;n++)this._arrayFetchPromises[n]=qPe(this,n,t,this._tile._contentState);return function YPe(e){return oM.apply(this,arguments)}(this)},nu.prototype.cancelRequests=function(){for(let e=0;e<this._requests.length;e++){const t=this._requests[e];c(t)&&t.cancel()}},nu.prototype.hasProperty=function(e,t){return!1},nu.prototype.getFeature=function(e){},nu.prototype.applyDebugSettings=function(e,t){const n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyDebugSettings(e,t)},nu.prototype.applyStyle=function(e){const t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].applyStyle(e)},nu.prototype.update=function(e,t){const n=this._contents,i=n.length;let o=!0;for(let r=0;r<i;++r)n[r].update(e,t),o=o&&n[r].ready;!this._ready&&o&&(this._ready=!0)},nu.prototype.pick=function(e,t,n){if(!this._ready)return;let i,o=Number.POSITIVE_INFINITY;const r=this._contents,s=r.length;for(let a=0;a<s;++a){const l=r[a].pick(e,t,n);if(!c(l))continue;const u=f.distance(e.origin,l);u<o&&(i=l,o=u)}return c(i)?n:void 0},nu.prototype.isDestroyed=function(){return!1},nu.prototype.destroy=function(){const e=this._contents,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return Xe(this)};const ZPe=nu,Uj=Math.cos,zj=Math.sin,$Pe=Math.sqrt,sM={computePosition:function(e,t,n,i,o,r,s){const a=t.radiiSquared,l=e.nwCorner,u=e.boundingRectangle;let d=l.latitude-e.granYCos*i+o*e.granXSin;const h=Uj(d),m=zj(d),_=a.z*m;let p=l.longitude+i*e.granYSin+o*e.granXCos;const y=h*Uj(p),b=h*zj(p),x=a.x*y,C=a.y*b,w=$Pe(x*y+C*b+_*m);if(r.x=x/w,r.y=C/w,r.z=_/w,n){const v=e.stNwCorner;c(v)?(d=v.latitude-e.stGranYCos*i+o*e.stGranXSin,p=v.longitude+i*e.stGranYSin+o*e.stGranXCos,s.x=(p-e.stWest)*e.lonScalar,s.y=(d-e.stSouth)*e.latScalar):(s.x=(p-u.west)*e.lonScalar,s.y=(d-u.south)*e.latScalar)}}},KPe=new Kr;let iu=new f;const QPe=new Ce;let Iv=new f;const xx=new Qr;function Vj(e,t,n,i,o,r,s){const a=Math.cos(t),l=i*a,u=n*a,d=Math.sin(t),h=i*d,m=n*d;xx._ellipsoid=he.default,iu=xx.project(e,iu),iu=f.subtract(iu,Iv,iu);const _=Kr.fromRotation(t,KPe);iu=Kr.multiplyByVector(_,iu,iu),iu=f.add(iu,Iv,iu);const p=(e=xx.unproject(iu,e)).latitude,y=p+(r-=1)*m,b=p-l*(s-=1),x=p-l*s+r*m,C=Math.max(p,y,b,x),w=Math.min(p,y,b,x),v=e.longitude,I=v+r*u,P=v+s*h,N=v+s*h+r*u;return{north:C,south:w,east:Math.max(v,I,P,N),west:Math.min(v,I,P,N),granYCos:l,granYSin:h,granXCos:u,granXSin:m,nwCorner:e}}sM.computeOptions=function(e,t,n,i,o,r,s){let _,a=e.east,l=e.west,u=e.north,d=e.south,h=!1,m=!1;u===O.PI_OVER_TWO&&(h=!0),d===-O.PI_OVER_TWO&&(m=!0);const p=u-d;_=l>a?O.TWO_PI-l+a:a-l;const y=Math.ceil(_/t)+1,b=Math.ceil(p/t)+1,x=_/(y-1),C=p/(b-1),w=Te.northwest(e,r),v=Te.center(e,QPe);(0!==n||0!==i)&&(v.longitude<w.longitude&&(v.longitude+=O.TWO_PI),xx._ellipsoid=he.default,Iv=xx.project(v,Iv));const I=C,P=x,B=Te.clone(e,o),F={granYCos:I,granYSin:0,granXCos:P,granXSin:0,nwCorner:w,boundingRectangle:B,width:y,height:b,northCap:h,southCap:m};if(0!==n){const S=Vj(w,n,x,C,0,y,b);if(u=S.north,d=S.south,a=S.east,l=S.west,u<-O.PI_OVER_TWO||u>O.PI_OVER_TWO||d<-O.PI_OVER_TWO||d>O.PI_OVER_TWO)throw new E("Rotated rectangle is invalid. It crosses over either the north or south pole.");F.granYCos=S.granYCos,F.granYSin=S.granYSin,F.granXCos=S.granXCos,F.granXSin=S.granXSin,B.north=u,B.south=d,B.east=a,B.west=l}if(0!==i){n-=i;const S=Te.northwest(B,s),D=Vj(S,n,x,C,0,y,b);F.stGranYCos=D.granYCos,F.stGranXCos=D.granXCos,F.stGranYSin=D.granYSin,F.stGranXSin=D.granXSin,F.stNwCorner=S,F.stWest=D.west,F.stSouth=D.south}return F};const rc=sM,JPe=new Ae,eOe=new Ae,tOe=new f,nOe=new Te;function Hj(e,t){const n=e._ellipsoid,i=t.height,o=t.width,r=t.northCap,s=t.southCap;let a=i,l=2,u=0,d=4;r&&(l-=1,a-=1,u+=1,d-=2),s&&(l-=1,a-=1,u+=1,d-=2),u+=l*o+2*a-d;const h=new Float64Array(3*u);let p,m=0,_=0;const y=tOe;if(r)rc.computePosition(t,n,!1,_,0,y),h[m++]=y.x,h[m++]=y.y,h[m++]=y.z;else for(p=0;p<o;p++)rc.computePosition(t,n,!1,_,p,y),h[m++]=y.x,h[m++]=y.y,h[m++]=y.z;for(p=o-1,_=1;_<i;_++)rc.computePosition(t,n,!1,_,p,y),h[m++]=y.x,h[m++]=y.y,h[m++]=y.z;if(_=i-1,!s)for(p=o-2;p>=0;p--)rc.computePosition(t,n,!1,_,p,y),h[m++]=y.x,h[m++]=y.y,h[m++]=y.z;for(p=0,_=i-2;_>0;_--)rc.computePosition(t,n,!1,_,p,y),h[m++]=y.x,h[m++]=y.y,h[m++]=y.z;const x=Ot.createTypedArray(h.length/3,h.length/3*2);let C=0;for(let v=0;v<h.length/3-1;v++)x[C++]=v,x[C++]=v+1;x[C++]=h.length/3-1,x[C++]=0;const w=new En({attributes:new co,primitiveType:Tt.LINES});return w.attributes.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:h}),w.indices=x,w}function $0(e){const t=(e=g(e,g.EMPTY_OBJECT)).rectangle,n=g(e.granularity,O.RADIANS_PER_DEGREE),i=g(e.ellipsoid,he.default),o=g(e.rotation,0);if(!c(t))throw new E("rectangle is required.");if(Te.validate(t),t.north<t.south)throw new E("options.rectangle.north must be greater than options.rectangle.south");const r=g(e.height,0),s=g(e.extrudedHeight,r);this._rectangle=Te.clone(t),this._granularity=n,this._ellipsoid=i,this._surfaceHeight=Math.max(r,s),this._rotation=o,this._extrudedHeight=Math.min(r,s),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}$0.packedLength=Te.packedLength+he.packedLength+5,$0.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),Te.pack(e._rectangle,t,n),he.pack(e._ellipsoid,t,n+=Te.packedLength),n+=he.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._extrudedHeight,t[n]=g(e._offsetAttribute,-1),t};const Gj=new Te,jj=he.clone(he.UNIT_SPHERE),K0={rectangle:Gj,ellipsoid:jj,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};$0.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);const i=Te.unpack(e,t,Gj),o=he.unpack(e,t+=Te.packedLength,jj);t+=he.packedLength;const r=e[t++],s=e[t++],a=e[t++],l=e[t++],u=e[t];return c(n)?(n._rectangle=Te.clone(i,n._rectangle),n._ellipsoid=he.clone(o,n._ellipsoid),n._surfaceHeight=s,n._rotation=a,n._extrudedHeight=l,n._offsetAttribute=-1===u?void 0:u,n):(K0.granularity=r,K0.height=s,K0.rotation=a,K0.extrudedHeight=l,K0.offsetAttribute=-1===u?void 0:u,new $0(K0))};const oOe=new Ce;$0.createGeometry=function(e){const t=e._rectangle,n=e._ellipsoid,i=rc.computeOptions(t,e._granularity,e._rotation,0,nOe,oOe);let o,r;if(O.equalsEpsilon(t.north,t.south,O.EPSILON10)||O.equalsEpsilon(t.east,t.west,O.EPSILON10))return;const s=e._surfaceHeight,a=e._extrudedHeight;let u;if(O.equalsEpsilon(s,a,0,O.EPSILON2)){if(o=Hj(e,i),o.attributes.position.values=po.scaleToGeodeticHeight(o.attributes.position.values,s,n,!1),c(e._offsetAttribute)){u=e._offsetAttribute===Xn.NONE?0:1;const h=new Uint8Array(o.attributes.position.values.length/3).fill(u);o.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}r=Ae.fromRectangle3D(t,n,s)}else{if(o=function iOe(e,t){const n=e._surfaceHeight,i=e._extrudedHeight,o=e._ellipsoid,r=Hj(e,t),s=t.height,a=t.width,l=po.scaleToGeodeticHeight(r.attributes.position.values,n,o,!1);let u=l.length;const d=new Float64Array(2*u);d.set(l);const h=po.scaleToGeodeticHeight(r.attributes.position.values,i,o);d.set(h,u),r.attributes.position.values=d;const m=t.northCap,_=t.southCap;let p=4;m&&(p-=1),_&&(p-=1);const b=Ot.createTypedArray(d.length/3,2*(d.length/3+p));u=d.length/6;let C,x=0;for(let w=0;w<u-1;w++)b[x++]=w,b[x++]=w+1,b[x++]=w+u,b[x++]=w+u+1;if(b[x++]=u-1,b[x++]=0,b[x++]=u+u-1,b[x++]=u,b[x++]=0,b[x++]=u,m)C=s-1;else{const w=a-1;b[x++]=w,b[x++]=w+u,C=a+s-2}if(b[x++]=C,b[x++]=C+u,!_){const w=a+C-1;b[x++]=w,b[x]=w+u}return r.indices=b,r}(e,i),c(e._offsetAttribute)){const m=o.attributes.position.values.length/3;let _=new Uint8Array(m);e._offsetAttribute===Xn.TOP?_=_.fill(1,0,m/2):(u=e._offsetAttribute===Xn.NONE?0:1,_=_.fill(u)),o.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}const d=Ae.fromRectangle3D(t,n,s,eOe),h=Ae.fromRectangle3D(t,n,a,JPe);r=Ae.union(d,h)}return new En({attributes:o.attributes,indices:o.indices,primitiveType:Tt.LINES,boundingSphere:r,offsetAttribute:e._offsetAttribute})};const Wj=$0,qj="in vec4 v_color;\n\nvoid main()\n{\n out_FragColor = czm_gammaCorrect(v_color);\n}\n";function Q0(e){e=g(e,g.EMPTY_OBJECT),this.material=e.material,this.translucent=g(e.translucent,!0),this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=g(e.closed,!1)}Object.defineProperties(Q0.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}}}),Q0.prototype.getFragmentShaderSource=function(){const e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),c(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join("\n")},Q0.prototype.isTranslucent=function(){return c(this.material)&&this.material.isTranslucent()||!c(this.material)&&this.translucent},Q0.prototype.getRenderState=function(){const e=this.isTranslucent(),t=Rt(this.renderState,!1);return e?(t.depthMask=!1,t.blending=eo.ALPHA_BLEND):t.depthMask=!0,t},Q0.getDefaultRenderState=function(e,t,n){let i={depthTest:{enabled:!0}};return e&&(i.depthMask=!1,i.blending=eo.ALPHA_BLEND),t&&(i.cull={enabled:!0,face:ur.BACK}),c(n)&&(i=Pn(n,i,!0)),i};const Oa=Q0;function Ch(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.translucent,!0),n=g(e.closed,!1),i=g(e.flat,!1),o=i?"in vec3 position3DHigh;\nin vec3 position3DLow;\nin vec4 color;\nin float batchId;\n\nout vec4 v_color;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_color = color;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n":"in vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 normal;\nin vec4 color;\nin float batchId;\n\nout vec3 v_positionEC;\nout vec3 v_normalEC;\nout vec4 v_color;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_color = color;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",r=i?qj:"in vec3 v_positionEC;\nin vec3 v_normalEC;\nin vec4 v_color;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n vec4 color = czm_gammaCorrect(v_color);\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\n",s=i?Ch.FLAT_VERTEX_FORMAT:Ch.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,o),this._fragmentShaderSource=g(e.fragmentShaderSource,r),this._renderState=Oa.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=s,this._flat=i,this._faceForward=g(e.faceForward,!n)}Object.defineProperties(Ch.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}}}),Ch.VERTEX_FORMAT=et.POSITION_AND_NORMAL,Ch.FLAT_VERTEX_FORMAT=et.POSITION_ONLY,Ch.prototype.getFragmentShaderSource=Oa.prototype.getFragmentShaderSource,Ch.prototype.isTranslucent=Oa.prototype.isTranslucent,Ch.prototype.getRenderState=Oa.prototype.getRenderState;const gi=Ch;function Cx(e,t,n){e=g(e,0),t=g(t,0),n=g(n,0),this.value=new Float32Array([e,t,n])}Object.defineProperties(Cx.prototype,{componentDatatype:{get:function(){return ee.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),Cx.fromCartesian3=function(e){return A.defined("offset",e),new Cx(e.x,e.y,e.z)},Cx.toValue=function(e,t){return A.defined("offset",e),c(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};const os=Cx;function aM(e,t){const n=e.attributes,i=n.position,o=i.values.length/i.componentsPerAttribute;n.batchId=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:1,values:new Float32Array(o)});const r=n.batchId.values;for(let s=0;s<o;++s)r[s]=t}function cM(e,t,n,i){let o,r,s;const a=i.length-1;if(a>=0){const u=i[a];o=u.offset+u.count,s=u.index,r=n[s].indices.length}else o=0,s=0,r=n[s].indices.length;const l=e.length;for(let u=0;u<l;++u){const h=e[u][t];if(!c(h))continue;const m=h.indices.length;o+m>r&&(o=0,r=n[++s].indices.length),i.push({index:s,offset:o,count:m}),o+=m}}const Eh={};function pOe(e,t){const n=e.attributes;for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];c(o)&&c(o.values)&&t.push(o.values.buffer)}c(e.indices)&&t.push(e.indices.buffer)}function gOe(e,t){const n=e.length,i=new Float64Array(1+19*n);let o=0;i[o++]=n;for(let r=0;r<n;r++){const s=e[r];if(k.pack(s.modelMatrix,i,o),o+=k.packedLength,c(s.attributes)&&c(s.attributes.offset)){const a=s.attributes.offset.value;i[o]=a[0],i[o+1]=a[1],i[o+2]=a[2]}o+=3}return t.push(i.buffer),i}function Yj(e){const t=e.length,i=new Float32Array(1+(Ae.packedLength+1)*t);let o=0;i[o++]=t;for(let r=0;r<t;++r)c(e[r])?(i[o++]=1,Ae.pack(e[r],i,o)):i[o++]=0,o+=Ae.packedLength;return i}function Xj(e){const t=new Array(e[0]);let n=0,i=1;for(;i<e.length;)1===e[i++]&&(t[n]=Ae.unpack(e,i)),++n,i+=Ae.packedLength;return t}Eh.combineGeometry=function(e){let t,n;const i=e.instances,o=i.length;let r,s,a=!1;o>0&&(t=function fOe(e){const t=e.instances,n=e.projection,i=e.elementIndexUintSupported,o=e.scene3DOnly,r=e.vertexCacheOptimize,s=e.compressVertices,a=e.modelMatrix;let l,u,d,h=t.length;for(l=0;l<h;++l)if(c(t[l].geometry)){d=t[l].geometry.primitiveType;break}for(l=1;l<h;++l)if(c(t[l].geometry)&&t[l].geometry.primitiveType!==d)throw new E("All instance geometries must have the same primitiveType.");if(function uOe(e,t,n){let i=!n;const o=e.length;let r;if(!i&&o>1){const s=e[0].modelMatrix;for(r=1;r<o;++r)if(!k.equals(s,e[r].modelMatrix)){i=!0;break}}if(i)for(r=0;r<o;++r)c(e[r].geometry)&&ao.transformToWorldCoordinates(e[r]);else k.multiplyTransformation(t,e[0].modelMatrix,t)}(t,a,o),!o)for(l=0;l<h;++l)c(t[l].geometry)&&ao.splitLongitude(t[l]);if(function dOe(e){const t=e.length;for(let n=0;n<t;++n){const i=e[n];c(i.geometry)?aM(i.geometry,n):c(i.westHemisphereGeometry)&&c(i.eastHemisphereGeometry)&&(aM(i.westHemisphereGeometry,n),aM(i.eastHemisphereGeometry,n))}}(t),r)for(l=0;l<h;++l){const _=t[l];c(_.geometry)?(ao.reorderForPostVertexCache(_.geometry),ao.reorderForPreVertexCache(_.geometry)):c(_.westHemisphereGeometry)&&c(_.eastHemisphereGeometry)&&(ao.reorderForPostVertexCache(_.westHemisphereGeometry),ao.reorderForPreVertexCache(_.westHemisphereGeometry),ao.reorderForPostVertexCache(_.eastHemisphereGeometry),ao.reorderForPreVertexCache(_.eastHemisphereGeometry))}let m=ao.combineInstances(t);for(h=m.length,l=0;l<h;++l){u=m[l];const _=u.attributes;if(o)for(const p in _)_.hasOwnProperty(p)&&_[p].componentDatatype===ee.DOUBLE&&ao.encodeAttribute(u,p,`${p}3DHigh`,`${p}3DLow`);else for(const p in _)if(_.hasOwnProperty(p)&&_[p].componentDatatype===ee.DOUBLE){const y=`${p}3D`,b=`${p}2D`;ao.projectTo2D(u,p,y,b,n),c(u.boundingSphere)&&"position"===p&&(u.boundingSphereCV=Ae.fromVertices(u.attributes.position2D.values)),ao.encodeAttribute(u,y,`${y}High`,`${y}Low`),ao.encodeAttribute(u,b,`${b}High`,`${b}Low`)}s&&ao.compressVertices(u)}if(!i){let _=[];for(h=m.length,l=0;l<h;++l)u=m[l],_=_.concat(ao.fitToUnsignedShortIndices(u));m=_}return m}(e),t.length>0&&(n=ao.createAttributeLocations(t[0]),e.createPickOffsets&&(r=function hOe(e,t){const n=[];return cM(e,"geometry",t,n),cM(e,"westHemisphereGeometry",t,n),cM(e,"eastHemisphereGeometry",t,n),n}(i,t))),c(i[0].attributes)&&c(i[0].attributes.offset)&&(s=new Array(o),a=!0));const l=new Array(o),u=new Array(o);for(let d=0;d<o;++d){const h=i[d],m=h.geometry;c(m)&&(l[d]=m.boundingSphere,u[d]=m.boundingSphereCV,a&&(s[d]=h.geometry.offsetAttribute));const _=h.eastHemisphereGeometry,p=h.westHemisphereGeometry;c(_)&&c(p)&&(c(_.boundingSphere)&&c(p.boundingSphere)&&(l[d]=Ae.union(_.boundingSphere,p.boundingSphere)),c(_.boundingSphereCV)&&c(p.boundingSphereCV)&&(u[d]=Ae.union(_.boundingSphereCV,p.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:n,pickOffsets:r,offsetInstanceExtend:s,boundingSpheres:l,boundingSpheresCV:u}},Eh.packCreateGeometryResults=function(e,t){const n=new Float64Array(function _Oe(e){let t=1;const n=e.length;for(let i=0;i<n;i++){const o=e[i];if(++t,!c(o))continue;const r=o.attributes;t+=7+2*Ae.packedLength+(c(o.indices)?o.indices.length:0);for(const s in r)r.hasOwnProperty(s)&&c(r[s])&&(t+=5+r[s].values.length)}return t}(e)),i=[],o={},r=e.length;let s=0;n[s++]=r;for(let a=0;a<r;a++){const l=e[a],u=c(l);if(n[s++]=u?1:0,!u)continue;n[s++]=l.primitiveType,n[s++]=l.geometryType,n[s++]=g(l.offsetAttribute,-1);const d=c(l.boundingSphere)?1:0;n[s++]=d,d&&Ae.pack(l.boundingSphere,n,s),s+=Ae.packedLength;const h=c(l.boundingSphereCV)?1:0;n[s++]=h,h&&Ae.pack(l.boundingSphereCV,n,s),s+=Ae.packedLength;const m=l.attributes,_=[];for(const y in m)m.hasOwnProperty(y)&&c(m[y])&&(_.push(y),c(o[y])||(o[y]=i.length,i.push(y)));n[s++]=_.length;for(let y=0;y<_.length;y++){const b=_[y],x=m[b];n[s++]=o[b],n[s++]=x.componentDatatype,n[s++]=x.componentsPerAttribute,n[s++]=x.normalize?1:0,n[s++]=x.values.length,n.set(x.values,s),s+=x.values.length}const p=c(l.indices)?l.indices.length:0;n[s++]=p,p>0&&(n.set(l.indices,s),s+=p)}return t.push(n.buffer),{stringTable:i,packedData:n}},Eh.unpackCreateGeometryResults=function(e){const t=e.stringTable,n=e.packedData;let i;const o=new Array(n[0]);let r=0,s=1;for(;s<n.length;){if(1!==n[s++]){o[r++]=void 0;continue}const l=n[s++],u=n[s++];let h,m,y,b,x,d=n[s++];-1===d&&(d=void 0),1===n[s++]&&(h=Ae.unpack(n,s)),s+=Ae.packedLength,1===n[s++]&&(m=Ae.unpack(n,s)),s+=Ae.packedLength;const C=new co,w=n[s++];for(i=0;i<w;i++){const I=t[n[s++]],P=n[s++];x=n[s++];const N=0!==n[s++];y=n[s++],b=ee.createTypedArray(P,y);for(let R=0;R<y;R++)b[R]=n[s++];C[I]=new $e({componentDatatype:P,componentsPerAttribute:x,normalize:N,values:b})}let v;if(y=n[s++],y>0)for(v=Ot.createTypedArray(b.length/x,y),i=0;i<y;i++)v[i]=n[s++];o[r++]=new En({primitiveType:l,geometryType:u,boundingSphere:h,boundingSphereCV:m,indices:v,attributes:C,offsetAttribute:d})}return o},Eh.packCombineGeometryParameters=function(e,t){const n=e.createGeometryResults,i=n.length;for(let o=0;o<i;o++)t.push(n[o].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:gOe(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof Qr,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},Eh.unpackCombineGeometryParameters=function(e){const t=function yOe(e){const t=e,n=new Array(t[0]);let i=0,o=1;for(;o<t.length;){const r=k.unpack(t,o);let s;o+=k.packedLength,c(t[o])&&(s={offset:new os(t[o],t[o+1],t[o+2])}),o+=3,n[i++]={modelMatrix:r,attributes:s}}return n}(e.packedInstances),n=e.createGeometryResults,i=n.length;let o=0;for(let a=0;a<i;a++){const l=Eh.unpackCreateGeometryResults(n[a]),u=l.length;for(let d=0;d<u;d++)t[o].geometry=l[d],++o}const r=he.clone(e.ellipsoid);return{instances:t,ellipsoid:r,projection:e.isGeographic?new Qr(r):new or(r),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:k.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},Eh.packCombineGeometryResults=function(e,t){c(e.geometries)&&function mOe(e,t){const n=e.length;for(let i=0;i<n;++i)pOe(e[i],t)}(e.geometries,t);const n=Yj(e.boundingSpheres),i=Yj(e.boundingSpheresCV);return t.push(n.buffer,i.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:n,boundingSpheresCV:i}},Eh.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:Xj(e.boundingSpheres),boundingSpheresCV:Xj(e.boundingSpheresCV)}};const lM=Eh,rs=Object.freeze({READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6});function dr(e){if(e=g(e,g.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this._modelMatrix=new k,this.show=g(e.show,!0),this._vertexCacheOptimize=g(e.vertexCacheOptimize,!1),this._interleave=g(e.interleave,!1),this._releaseGeometryInstances=g(e.releaseGeometryInstances,!0),this._allowPicking=g(e.allowPicking,!0),this._asynchronous=g(e.asynchronous,!0),this._compressVertices=g(e.compressVertices,!0),this.cull=g(e.cull,!0),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.rtcCenter=e.rtcCenter,c(this.rtcCenter)&&(!c(this.geometryInstances)||Array.isArray(this.geometryInstances)&&1!==this.geometryInstances.length))throw new E("Relative-to-center rendering only supports one geometry instance.");this.shadows=g(e.shadows,Ko.DISABLED),this._translucent=void 0,this._state=rs.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=new Map,this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0}Object.defineProperties(dr.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}}});const TOe=new V,AOe=new f,Zj=new de;function $j(e){const t=e.length;return 1===t?e[0]:2===t?V.unpack(e,0,TOe):3===t?f.unpack(e,0,AOe):4===t?de.unpack(e,0,Zj):void 0}function COe(e){let t;return t=Array.isArray(e.values)?e.values.slice(0):new e.values.constructor(e.values),new $e({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function EOe(e){const t=e.attributes,n=new co;for(const o in t)t.hasOwnProperty(o)&&c(t[o])&&(n[o]=COe(t[o]));let i;if(c(e.indices)){const o=e.indices;i=Array.isArray(o)?o.slice(0):new o.constructor(o)}return new En({attributes:n,indices:i,primitiveType:e.primitiveType,boundingSphere:Ae.clone(e.boundingSphere)})}function wOe(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:k.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}const SOe=/in\s+vec(?:3|4)\s+(.*)3DHigh;/g;function Kj(e){return`${St.replaceMain(e,"czm_non_pick_main")}\nout vec4 v_pickColor; \nvoid main() \n{ \n czm_non_pick_main(); \n v_pickColor = czm_batchTable_pickColor(batchId); \n}`}function Qj(e){return`in vec4 v_pickColor;\n${e}`}function Jj(e,t){if(!e.compressVertices)return t;const n=-1!==t.search(/in\s+vec3\s+normal;/g),i=-1!==t.search(/in\s+vec2\s+st;/g);if(!n&&!i)return t;const o=-1!==t.search(/in\s+vec3\s+tangent;/g),r=-1!==t.search(/in\s+vec3\s+bitangent;/g);let s=i&&n?2:1;s+=o||r?1:0;const l="compressedAttributes",u=`in ${s>1?`vec${s}`:"float"} ${l};`;let d="",h="";i&&(d+="vec2 st;\n",h+=` st = czm_decompressTextureCoordinates(${s>1?`${l}.x`:l});\n`),n&&o&&r?(d+="vec3 normal;\nvec3 tangent;\nvec3 bitangent;\n",h+=` czm_octDecode(${l}.${i?"yz":"xy"}, normal, tangent, bitangent);\n`):(n&&(d+="vec3 normal;\n",h+=` normal = czm_octDecode(${l}${s>1?"."+(i?"y":"x"):""});\n`),o&&(d+="vec3 tangent;\n",h+=` tangent = czm_octDecode(${l}.${i&&n?"z":"y"});\n`),r&&(d+="vec3 bitangent;\n",h+=` bitangent = czm_octDecode(${l}.${i&&n?"z":"y"});\n`));let m=t;return m=m.replace(/in\s+vec3\s+normal;/g,""),m=m.replace(/in\s+vec2\s+st;/g,""),m=m.replace(/in\s+vec3\s+tangent;/g,""),m=m.replace(/in\s+vec3\s+bitangent;/g,""),m=St.replaceMain(m,"czm_non_compressed_main"),[u,d,m,`void main() \n{ \n${h} czm_non_compressed_main(); \n}`].join("\n")}function eW(e,t){const n=e.vertexAttributes;for(const i in n)if(n.hasOwnProperty(i)&&!c(t[i]))throw new E(`Appearance/Geometry mismatch. The appearance requires vertex shader attribute input '${i}', which was not computed as part of the Geometry. Use the appearance's vertexFormat property when constructing the geometry.`)}function DOe(e,t){return function(){return e[t]}}dr._modifyShaderPosition=function(e,t,n){let i,o="",r="",s="";for(;null!==(i=SOe.exec(t));){const a=i[1],l=`vec4 czm_compute${a[0].toUpperCase()}${a.substr(1)}()`;"vec4 czm_computePosition()"!==l&&(o+=`${l};\n`),c(e.rtcCenter)?(o+="uniform mat4 u_modifiedModelView;\n",r+="in vec4 position;\n",s+=`${l}\n{\n return u_modifiedModelView * position;\n}\n\n`,t=(t=(t=(t=t.replace(/in\s+vec(?:3|4)\s+position3DHigh;/g,"")).replace(/in\s+vec(?:3|4)\s+position3DLow;/g,"")).replace(/czm_modelViewRelativeToEye\s+\*\s+/g,"")).replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):n?s+=`${l}\n{\n return czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);\n}\n\n`:(r+=`in vec3 ${a}2DHigh;\nin vec3 ${a}2DLow;\n`,s+=`${l}\n{\n vec4 p;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy),\n czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow),\n czm_morphTime);\n }\n return p;\n}\n\n`)}return[o,r,t,s].join("\n")},dr._appendShowToShader=function(e,t){return c(e._batchTableAttributeIndices.show)?`${St.replaceMain(t,"czm_non_show_main")}\nvoid main() \n{ \n czm_non_show_main(); \n gl_Position *= czm_batchTable_show(batchId); \n}`:t},dr._updateColorAttribute=function(e,t,n){if(!c(e._batchTableAttributeIndices.color)&&!c(e._batchTableAttributeIndices.depthFailColor)||-1===t.search(/in\s+vec4\s+color;/g))return t;if(n&&!c(e._batchTableAttributeIndices.depthFailColor))throw new E("A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute.");let i=t;return i=i.replace(/in\s+vec4\s+color;/g,""),i=i.replace(/(\b)color(\b)/g,n?"$1czm_batchTable_depthFailColor(batchId)$2":"$1czm_batchTable_color(batchId)$2"),i},dr._updatePickColorAttribute=function(e){let t=e.replace(/in\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2"),t},dr._appendOffsetToShader=function(e,t){if(!c(e._batchTableAttributeIndices.offset))return t;let n="in float batchId;\n";n+="in float applyOffset;";let i=t.replace(/in\s+float\s+batchId;/g,"in float batchId;\nin float applyOffset;"),o="vec4 $1 = czm_computePosition();\n";return o+=" if (czm_sceneMode == czm_sceneMode3D)\n",o+=" {\n",o+=" $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);",o+=" }\n",o+=" else\n",o+=" {\n",o+=" $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);",o+=" }\n",i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,"vec4 $1 = czm_computePosition();\n if (czm_sceneMode == czm_sceneMode3D)\n {\n $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0); }\n else\n {\n $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0); }\n"),i},dr._appendDistanceDisplayConditionToShader=function(e,t,n){if(!c(e._batchTableAttributeIndices.distanceDisplayCondition))return t;let o="void main() \n{ \n czm_non_distanceDisplayCondition_main(); \n vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);\n vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);\n vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);\n float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);\n";return o+=n?" vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n":" vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);\n vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);\n vec4 centerRTE;\n if (czm_morphTime == 1.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);\n }\n else\n {\n centerRTE = czm_columbusViewMorph(\n czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),\n czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),\n czm_morphTime);\n }\n",o+=" float radiusSq = boundingSphereRadius * boundingSphereRadius; \n float distanceSq; \n if (czm_sceneMode == czm_sceneMode2D) \n { \n distanceSq = czm_eyeHeight2D.y - radiusSq; \n } \n else \n { \n distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; \n } \n distanceSq = max(distanceSq, 0.0); \n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; \n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; \n float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; \n gl_Position *= show; \n}",`${St.replaceMain(t,"czm_non_distanceDisplayCondition_main")}\n${o}`};const uM=Math.max(Hn.hardwareConcurrency-1,1);let Dv;const POe=new ba("combineGeometry"),tW=new Vi,nW=new Ce,iW=new f,oW=new Ae,dM=new f,MOe=new f;function rW(e,t){if(!c(e._batchTableAttributeIndices.offset)||e._batchTableOffsetsUpdated||t.scene3DOnly)return;const i=e._batchTableOffsetAttribute2DIndex,o=t.mapProjection,r=o.ellipsoid,s=e._batchTable,a=e._instanceBoundingSpheres,l=a.length;for(let u=0;u<l;++u){let d=a[u];if(!c(d))continue;const h=s.getBatchedAttribute(u,e._batchTableAttributeIndices.offset);if(f.equals(h,f.ZERO)){s.setBatchedAttribute(u,i,f.ZERO);continue}const m=e.modelMatrix;c(m)&&(d=Ae.transform(d,m,oW));let _=d.center;_=r.scaleToGeodeticSurface(_,MOe);let p=r.cartesianToCartographic(_,nW);const y=o.project(p,iW),b=f.add(h,_,dM);p=r.cartesianToCartographic(b,p);const x=o.project(p,dM),C=f.subtract(x,y,dM),w=C.x;C.x=C.z,C.z=C.y,C.y=w,s.setBatchedAttribute(u,i,C)}e._batchTableOffsetsUpdated=!0}function BOe(e,t,n,i){let r,o=n.getRenderState();i?(r=Rt(o,!1),r.cull={enabled:!0,face:ur.BACK},e._frontFaceRS=Lt.fromCache(r),r.cull.face=ur.FRONT,e._backFaceRS=Lt.fromCache(r)):(e._frontFaceRS=Lt.fromCache(o),e._backFaceRS=e._frontFaceRS),r=Rt(o,!1),c(e._depthFailAppearance)&&(r.depthTest.enabled=!1),c(e._depthFailAppearance)&&(o=e._depthFailAppearance.getRenderState(),r=Rt(o,!1),r.depthTest.func=I_.GREATER,i?(r.cull={enabled:!0,face:ur.BACK},e._frontFaceDepthFailRS=Lt.fromCache(r),r.cull.face=ur.FRONT,e._backFaceDepthFailRS=Lt.fromCache(r)):(e._frontFaceDepthFailRS=Lt.fromCache(r),e._backFaceDepthFailRS=e._frontFaceRS))}function kOe(e,t,n){const i=t.context,o=e._attributeLocations;let r=e._batchTable.getVertexShaderCallback()(n.vertexShaderSource);r=dr._appendOffsetToShader(e,r),r=dr._appendShowToShader(e,r),r=dr._appendDistanceDisplayConditionToShader(e,r,t.scene3DOnly),r=Kj(r),r=dr._updateColorAttribute(e,r,!1),r=Jj(e,r),r=dr._modifyShaderPosition(e,r,t.scene3DOnly);let s=n.getFragmentShaderSource();s=Qj(s),e._sp=di.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o}),eW(e._sp,o),c(e._depthFailAppearance)&&(r=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),r=dr._appendShowToShader(e,r),r=dr._appendDistanceDisplayConditionToShader(e,r,t.scene3DOnly),r=Kj(r),r=dr._updateColorAttribute(e,r,!0),r=Jj(e,r),r=dr._modifyShaderPosition(e,r,t.scene3DOnly),r=function vOe(e){let t=St.replaceMain(e,"czm_non_depth_clamp_main");return t+="void main() {\n czm_non_depth_clamp_main();\n gl_Position = czm_depthClamp(gl_Position);}\n",t}(r),s=e._depthFailAppearance.getFragmentShaderSource(),s=Qj(s),s=function IOe(e){let t=St.replaceMain(e,"czm_non_depth_clamp_main");return t+="void main() {\n czm_non_depth_clamp_main();\n #if defined(LOG_DEPTH)\n czm_writeLogDepth();\n #else\n czm_writeDepthClamp();\n #endif\n}\n",t}(s),e._spDepthFail=di.replaceCache({context:i,shaderProgram:e._spDepthFail,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o}),eW(e._spDepthFail,o))}const Ex=new k,sW=new f;function aW(e,t,n,i){const o=c(n)?n._uniforms:void 0,r={},s=t.uniforms;if(c(s))for(const l in s)if(s.hasOwnProperty(l)){if(c(o)&&c(o[l]))throw new E(`Appearance and material have a uniform with the same name: ${l}`);r[l]=DOe(s,l)}let a=Pn(r,o);return a=e._batchTable.getUniformMapCallback()(a),c(e.rtcCenter)&&(a.u_modifiedModelView=function(){return k.multiply(i.context.uniformState.view,e._modelMatrix,Ex),k.multiplyByPoint(Ex,e.rtcCenter,sW),k.setTranslation(Ex,sW,Ex),Ex}),a}function UOe(e,t,n,i,o,r,s,a){const l=aW(e,t,n,a);let u;c(e._depthFailAppearance)&&(u=aW(e,e._depthFailAppearance,e._depthFailAppearance.material,a));const d=i?Ue.TRANSLUCENT:Ue.OPAQUE;let h=o?2:1;h*=c(e._depthFailAppearance)?2:1,r.length=e._va.length*h;const m=r.length;let _=0;for(let p=0;p<m;++p){let y;o&&(y=r[p],c(y)||(y=r[p]=new $t({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[_],y.renderState=e._backFaceRS,y.shaderProgram=e._sp,y.uniformMap=l,y.pass=d,++p),y=r[p],c(y)||(y=r[p]=new $t({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[_],y.renderState=e._frontFaceRS,y.shaderProgram=e._sp,y.uniformMap=l,y.pass=d,c(e._depthFailAppearance)&&(o&&(++p,y=r[p],c(y)||(y=r[p]=new $t({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[_],y.renderState=e._backFaceDepthFailRS,y.shaderProgram=e._spDepthFail,y.uniformMap=u,y.pass=d),++p,y=r[p],c(y)||(y=r[p]=new $t({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[_],y.renderState=e._frontFaceDepthFailRS,y.shaderProgram=e._spDepthFail,y.uniformMap=u,y.pass=d),++_}}function zOe(e,t,n,i,o,r,s,a){if(t.mode!==ce.SCENE3D&&!k.equals(o,k.IDENTITY))throw new E("Primitive.modelMatrix is only supported in 3D mode.");let l;dr._updateBoundingVolumes(e,t,o),t.mode===ce.SCENE3D?l=e._boundingSphereWC:t.mode===ce.COLUMBUS_VIEW?l=e._boundingSphereCV:t.mode===ce.SCENE2D&&c(e._boundingSphere2D)?l=e._boundingSphere2D:c(e._boundingSphereMorph)&&(l=e._boundingSphereMorph);const u=t.commandList,d=t.passes;if(d.render||d.pick){const h=e.allowPicking,m=Ko.castShadows(e.shadows),_=Ko.receiveShadows(e.shadows),p=n.length;let y=a?2:1;y*=c(e._depthFailAppearance)?2:1;for(let b=0;b<p;++b){const x=Math.floor(b/y),C=n[b];C.modelMatrix=o,C.boundingVolume=l[x],C.cull=r,C.debugShowBoundingVolume=s,C.castShadows=m,C.receiveShadows=_,C.pickId=h?"v_pickColor":void 0,u.push(C)}}}dr._updateBoundingVolumes=function(e,t,n,i){let o,r,s;if(i||!k.equals(n,e._modelMatrix))for(k.clone(n,e._modelMatrix),r=e._boundingSpheres.length,o=0;o<r;++o)s=e._boundingSpheres[o],c(s)&&(e._boundingSphereWC[o]=Ae.transform(s,n,e._boundingSphereWC[o]),t.scene3DOnly||(e._boundingSphere2D[o]=Ae.clone(e._boundingSphereCV[o],e._boundingSphere2D[o]),e._boundingSphere2D[o].center.x=0,e._boundingSphereMorph[o]=Ae.union(e._boundingSphereWC[o],e._boundingSphereCV[o])));const a=e.appearance.pixelSize;if(c(a))for(r=e._boundingSpheres.length,o=0;o<r;++o){s=e._boundingSpheres[o];const l=e._boundingSphereWC[o],d=t.camera.getPixelSize(s,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*a;l.radius=s.radius+d}},dr.prototype.update=function(e){if(!c(this.geometryInstances)&&0===this._va.length||c(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&0===this.geometryInstances.length||!c(this.appearance)||e.mode!==ce.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)return;if(c(this._error))throw this._error;if(c(this.rtcCenter)&&!e.scene3DOnly)throw new E("RTC rendering is only available for 3D only scenes.");if(this._state===rs.FAILED)return;const t=e.context;if(c(this._batchTable)||function xOe(e,t){const n=e.geometryInstances,i=Array.isArray(n)?n:[n],o=i.length;if(0===o)return;const r=function bOe(e){const t=e.length,n=[],i=e[0].attributes;let o;for(o in i)if(i.hasOwnProperty(o)&&c(i[o])){const r=i[o];let s=!0;for(let a=1;a<t;++a){const l=e[a].attributes[o];if(!c(l)||r.componentDatatype!==l.componentDatatype||r.componentsPerAttribute!==l.componentsPerAttribute||r.normalize!==l.normalize){s=!1;break}}s&&n.push(o)}return n}(i),s=r.length,a=[],l={},u={};let d,_,p,y,m=i[0].attributes;for(_=0;_<s;++_)p=r[_],y=m[p],l[p]=_,a.push({functionName:`czm_batchTable_${p}`,componentDatatype:y.componentDatatype,componentsPerAttribute:y.componentsPerAttribute,normalize:y.normalize});-1!==r.indexOf("distanceDisplayCondition")&&(a.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:ee.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:ee.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:ee.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:ee.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:ee.FLOAT,componentsPerAttribute:1}),u.center3DHigh=a.length-5,u.center3DLow=a.length-4,u.center2DHigh=a.length-3,u.center2DLow=a.length-2,u.radius=a.length-1),-1!==r.indexOf("offset")&&(a.push({functionName:"czm_batchTable_offset2D",componentDatatype:ee.FLOAT,componentsPerAttribute:3}),d=a.length-1),a.push({functionName:"czm_batchTable_pickColor",componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});const b=a.length,x=new tj(t,a,o);for(_=0;_<o;++_){const C=i[_];m=C.attributes;for(let N=0;N<s;++N){p=r[N],y=m[p];const R=$j(y.value);x.setBatchedAttribute(_,l[p],R)}const w={primitive:g(C.pickPrimitive,e)};c(C.id)&&(w.id=C.id);const v=t.createPickId(w);e._pickIds.push(v);const I=v.color,P=Zj;P.x=Z.floatToByte(I.red),P.y=Z.floatToByte(I.green),P.z=Z.floatToByte(I.blue),P.w=Z.floatToByte(I.alpha),x.setBatchedAttribute(_,b-1,P)}e._batchTable=x,e._batchTableAttributeIndices=l,e._batchTableBoundingSphereAttributeIndices=u,e._batchTableOffsetAttribute2DIndex=d}(this,t),this._batchTable.attributes.length>0){if(0===dn.maximumVertexTextureImageUnits)throw new Pe("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!==rs.COMPLETE&&this._state!==rs.COMBINED&&(this.asynchronous?function OOe(e,t){let n,i,o,r;const s=e._instanceIds;if(e._state===rs.READY){n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];const a=e._numberOfInstances=n.length,l=[];let d,u=[];for(o=0;o<a;++o){if(i=n[o].geometry,s.push(n[o].id),c(i._workerName)&&c(i._workerPath)||!c(i._workerName)&&!c(i._workerPath))throw new E("Must define either _workerName or _workerPath for asynchronous geometry.");u.push({moduleName:i._workerName,modulePath:i._workerPath,geometry:i})}if(!c(Dv))for(Dv=new Array(uM),o=0;o<uM;o++)Dv[o]=new ba("createGeometry");for(u=function cOe(e,t){if(!c(e))throw new E("array is required.");if(!c(t)||t<1)throw new E("numberOfArrays must be greater than 0.");const n=[],i=e.length;let o=0;for(;o<i;){const r=Math.ceil((i-o)/t--);n.push(e.slice(o,o+r)),o+=r}return n}(u,uM),o=0;o<u.length;o++){let h=0;const m=u[o],_=m.length;for(r=0;r<_;++r)d=m[r],i=d.geometry,c(i.constructor.pack)&&(d.offset=h,h+=g(i.constructor.packedLength,i.packedLength));let p;if(h>0){const y=new Float64Array(h);for(p=[y.buffer],r=0;r<_;++r)d=m[r],i=d.geometry,c(i.constructor.pack)&&(i.constructor.pack(i,y,d.offset),d.geometry=y)}l.push(Dv[o].scheduleTask({subTasks:u[o]},p))}e._state=rs.CREATING,Promise.all(l).then(function(h){e._createGeometryResults=h,e._state=rs.CREATED}).catch(function(h){wx(e,t,rs.FAILED,h)})}else if(e._state===rs.CREATED){const a=[];n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];const u=t.mapProjection,d=POe.scheduleTask(lM.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:n,ellipsoid:u.ellipsoid,projection:u,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:t.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},a),a);e._createGeometryResults=void 0,e._state=rs.COMBINING,Promise.resolve(d).then(function(h){const m=lM.unpackCombineGeometryResults(h);e._geometries=m.geometries,e._attributeLocations=m.attributeLocations,e.modelMatrix=k.clone(m.modelMatrix,e.modelMatrix),e._pickOffsets=m.pickOffsets,e._offsetInstanceExtend=m.offsetInstanceExtend,e._instanceBoundingSpheres=m.boundingSpheres,e._instanceBoundingSpheresCV=m.boundingSpheresCV,c(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=rs.COMBINED):wx(e,t,rs.FAILED,void 0)}).catch(function(h){wx(e,t,rs.FAILED,h)})}}(this,e):function ROe(e,t){const n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],i=e._numberOfInstances=n.length,o=new Array(i),r=e._instanceIds;let s,a,l=0;for(a=0;a<i;a++){s=n[a];const m=s.geometry;let _;_=c(m.attributes)&&c(m.primitiveType)?EOe(m):m.constructor.createGeometry(m),o[l++]=wOe(s,_),r.push(s.id)}o.length=l;const d=t.mapProjection,h=lM.combineGeometry({instances:o,ellipsoid:d.ellipsoid,projection:d,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:t.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=h.geometries,e._attributeLocations=h.attributeLocations,e.modelMatrix=k.clone(h.modelMatrix,e.modelMatrix),e._pickOffsets=h.pickOffsets,e._offsetInstanceExtend=h.offsetInstanceExtend,e._instanceBoundingSpheres=h.boundingSpheres,e._instanceBoundingSpheresCV=h.boundingSpheresCV,c(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=rs.COMBINED):wx(e,t,rs.FAILED,void 0)}(this,e)),this._state===rs.COMBINED&&(function NOe(e,t){if(!c(e._batchTableAttributeIndices.distanceDisplayCondition)||e._batchTableBoundingSpheresUpdated)return;const i=e._batchTableBoundingSphereAttributeIndices,o=i.center3DHigh,r=i.center3DLow,s=i.center2DHigh,a=i.center2DLow,l=i.radius,u=t.mapProjection,d=u.ellipsoid,h=e._batchTable,m=e._instanceBoundingSpheres,_=m.length;for(let p=0;p<_;++p){let y=m[p];if(!c(y))continue;const b=e.modelMatrix;c(b)&&(y=Ae.transform(y,b,oW));const x=y.center,C=y.radius;let w=Vi.fromCartesian(x,tW);if(h.setBatchedAttribute(p,o,w.high),h.setBatchedAttribute(p,r,w.low),!t.scene3DOnly){const v=d.cartesianToCartographic(x,nW),I=u.project(v,iW);w=Vi.fromCartesian(I,tW),h.setBatchedAttribute(p,s,w.high),h.setBatchedAttribute(p,a,w.low)}h.setBatchedAttribute(p,l,C)}e._batchTableBoundingSpheresUpdated=!0}(this,e),rW(this,e),function FOe(e,t){const n=e._attributeLocations,i=e._geometries,o=t.scene3DOnly,r=t.context,s=[],a=i.length;for(let l=0;l<a;++l){const u=i[l];if(s.push(gs.fromGeometry({context:r,geometry:u,attributeLocations:n,bufferUsage:At.STATIC_DRAW,interleave:e._interleave})),c(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,u);else if(e._boundingSpheres.push(Ae.clone(u.boundingSphere)),e._boundingSphereWC.push(new Ae),!o){const d=u.boundingSphereCV.center,h=d.x,m=d.y;d.x=d.z,d.y=h,d.z=m,e._boundingSphereCV.push(Ae.clone(u.boundingSphereCV)),e._boundingSphere2D.push(new Ae),e._boundingSphereMorph.push(new Ae)}}e._va=s,e._primitiveType=i[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,wx(e,t,rs.COMPLETE,void 0)}(this,e)),!this.show||this._state!==rs.COMPLETE)return;this._batchTableOffsetsUpdated||rW(this,e),this._recomputeBoundingSpheres&&function LOe(e,t){const n=e._batchTableAttributeIndices.offset;if(!e._recomputeBoundingSpheres||!c(n))return void(e._recomputeBoundingSpheres=!1);let i;const o=e._offsetInstanceExtend,r=e._instanceBoundingSpheres,s=r.length;let a=e._tempBoundingSpheres;if(!c(a)){for(a=new Array(s),i=0;i<s;i++)a[i]=new Ae;e._tempBoundingSpheres=a}for(i=0;i<s;++i){let y=a[i];const b=e._batchTable.getBatchedAttribute(i,n,new f);y=r[i].clone(y),cW(y,b,o[i])}const l=[],u=[],d=[];for(i=0;i<s;++i){const y=a[i];y.center.x-y.radius>0||Ae.intersectPlane(y,qn.ORIGIN_ZX_PLANE)!==On.INTERSECTING?l.push(y):(u.push(y),d.push(y))}let h=l[0],m=d[0],_=u[0];for(i=1;i<l.length;i++)h=Ae.union(h,l[i]);for(i=1;i<d.length;i++)m=Ae.union(m,d[i]);for(i=1;i<u.length;i++)_=Ae.union(_,u[i]);const p=[];for(c(h)&&p.push(h),c(m)&&p.push(m),c(_)&&p.push(_),i=0;i<p.length;i++){const y=p[i].clone(e._boundingSpheres[i]);e._boundingSpheres[i]=y,e._boundingSphereCV[i]=Ae.projectTo2D(y,t.mapProjection,e._boundingSphereCV[i])}dr._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}(this,e);const n=this.appearance,i=n.material;let 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);const s=this.depthFailAppearance,a=c(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);const l=this._appearance.isTranslucent();this._translucent!==l&&(this._translucent=l,o=!0),c(this._material)&&this._material.update(t);const u=n.closed&&l;o&&g(this._createRenderStatesFunction,BOe)(this,t,n,u),r&&g(this._createShaderProgramFunction,kOe)(this,e,n),(o||r)&&g(this._createCommandsFunction,UOe)(this,n,i,l,u,this._colorCommands,this._pickCommands,e),g(this._updateAndQueueCommandsFunction,zOe)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,u)};const VOe=new Ae,HOe=new Ae;function cW(e,t,n){if(n===Xn.TOP){const i=Ae.clone(e,VOe),o=Ae.clone(e,HOe);o.center=f.add(o.center,t,o.center),e=Ae.union(i,o,e)}else n===Xn.ALL&&(e.center=f.add(e.center,t,e.center));return e}function GOe(e,t,n){return function(){const i=e.getBatchedAttribute(t,n),o=e.attributes[n],s=ee.createTypedArray(o.componentDatatype,o.componentsPerAttribute);return c(i.constructor.pack)?i.constructor.pack(i,s,0):s[0]=i,s}}function jOe(e,t,n,i,o){return function(r){if(!c(r)||!c(r.length)||r.length<1||r.length>4)throw new E("value must be and array with length between 1 and 4.");const s=$j(r);e.setBatchedAttribute(t,n,s),"offset"===o&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}const WOe=new f;function wx(e,t,n,i){e._error=i,e._state=n,t.afterRender.push(function(){e._ready=e._state===rs.COMPLETE||e._state===rs.FAILED})}dr.prototype.getGeometryInstanceAttributes=function(e){if(!c(e))throw new E("id is required");if(!c(this._batchTable))throw new E("must call update before calling getGeometryInstanceAttributes");let t=this._perInstanceAttributeCache.get(e);if(c(t))return t;let n=-1;const i=this._lastPerInstanceAttributeIndex,o=this._instanceIds,r=o.length;for(let u=0;u<r;++u){const d=(i+u)%r;if(e===o[d]){n=d;break}}if(-1===n)return;const s=this._batchTable,a=this._batchTableAttributeIndices;t={};const l={};for(const u in a)if(a.hasOwnProperty(u)){const d=a[u];l[u]={get:GOe(s,n,d),set:jOe(s,n,d,this,u)}}return function qOe(e,t,n){t.boundingSphere={get:function(){let i=e._instanceBoundingSpheres[n];if(c(i)){i=i.clone();const o=e.modelMatrix,r=t.offset;c(r)&&cW(i,f.fromArray(r.get(),0,WOe),e._offsetInstanceExtend[n]),c(o)&&(i=Ae.transform(i,o))}return i}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[n]}}}(this,l,n),function YOe(e,t,n){t.pickId={get:function(){return e._pickIds[n]}}}(this,l,n),Object.defineProperties(t,l),this._lastPerInstanceAttributeIndex=n,this._perInstanceAttributeCache.set(e,t),t},dr.prototype.isDestroyed=function(){return!1},dr.prototype.destroy=function(){let e,t;this._sp=this._sp&&this._sp.destroy(),this._spDepthFail=this._spDepthFail&&this._spDepthFail.destroy();const n=this._va;for(e=n.length,t=0;t<e;++t)n[t].destroy();this._va=void 0;const i=this._pickIds;for(e=i.length,t=0;t<e;++t)i[t].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,Xe(this)};const Yi=dr;function J0(e){A.typeOf.object("options",e),A.typeOf.object("options.rectangle",e.rectangle),this.rectangle=Te.clone(e.rectangle),this.minimumHeight=g(e.minimumHeight,0),this.maximumHeight=g(e.maximumHeight,0),this.southwestCornerCartesian=new f,this.northeastCornerCartesian=new f,this.westNormal=new f,this.southNormal=new f,this.eastNormal=new f,this.northNormal=new f;const t=g(e.ellipsoid,he.WGS84);(function QOe(e,t,n){n.cartographicToCartesian(Te.southwest(t),e.southwestCornerCartesian),n.cartographicToCartesian(Te.northeast(t),e.northeastCornerCartesian),ou.longitude=t.west,ou.latitude=.5*(t.south+t.north),ou.height=0;const i=n.cartographicToCartesian(ou,$Oe),o=f.cross(i,f.UNIT_Z,XOe);f.normalize(o,e.westNormal),ou.longitude=t.east;const r=n.cartographicToCartesian(ou,KOe),s=f.cross(f.UNIT_Z,r,lW);f.normalize(s,e.eastNormal);let a=f.subtract(i,r,lW);0===f.magnitude(a)&&(a=f.clone(o,a));const l=f.normalize(a,ZOe),u=t.south;let d;if(u>0){ou.longitude=.5*(t.west+t.east),ou.latitude=u;const y=n.cartographicToCartesian(ou,eb.origin);f.clone(l,eb.direction);const b=qn.fromPointNormal(e.southwestCornerCartesian,e.westNormal,dW);So.rayPlane(eb,b,e.southwestCornerCartesian),d=n.geodeticSurfaceNormal(y,Pv)}else d=n.geodeticSurfaceNormalCartographic(Te.southeast(t),Pv);const h=f.cross(d,a,uW);f.normalize(h,e.southNormal);const m=t.north;let _;if(m<0){ou.longitude=.5*(t.west+t.east),ou.latitude=m;const y=n.cartographicToCartesian(ou,eb.origin);f.negate(l,eb.direction);const b=qn.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,dW);So.rayPlane(eb,b,e.northeastCornerCartesian),_=n.geodeticSurfaceNormal(y,Pv)}else _=n.geodeticSurfaceNormalCartographic(Te.northwest(t),Pv);const p=f.cross(a,_,uW);f.normalize(p,e.northNormal)})(this,e.rectangle,t),this._orientedBoundingBox=void 0,this._boundingSphere=void 0,g(e.computeBoundingVolumes,!0)&&this.computeBoundingVolumes(t)}Object.defineProperties(J0.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),J0.prototype.computeBoundingVolumes=function(e){this._orientedBoundingBox=Ao.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,e),this._boundingSphere=Ae.fromOrientedBoundingBox(this._orientedBoundingBox)};const lW=new f,Pv=new f,uW=new f,XOe=new f,ZOe=new f,$Oe=new f,KOe=new f,ou=new Ce,dW=new qn(f.UNIT_X,0),eb=new ii,JOe=new f,eRe=new f,tRe=new f(0,-1,0),nRe=new f(0,0,-1),fW=new f;J0.prototype.distanceToCamera=function(e){A.defined("frameState",e);const t=function iRe(e,t){const n=t.camera,i=n.positionWC,o=n.positionCartographic;let s,a,l,r=0;if(!Te.contains(e.rectangle,o)){let u=e.southwestCornerCartesian,d=e.northeastCornerCartesian,h=e.westNormal,m=e.southNormal,_=e.eastNormal,p=e.northNormal;t.mode!==ce.SCENE3D&&(u=t.mapProjection.project(Te.southwest(e.rectangle),JOe),u.z=u.y,u.y=u.x,u.x=0,d=t.mapProjection.project(Te.northeast(e.rectangle),eRe),d.z=d.y,d.y=d.x,d.x=0,h=tRe,_=f.UNIT_Y,m=nRe,p=f.UNIT_Z);const y=f.subtract(i,u,fW),b=f.dot(y,h),x=f.dot(y,m),C=f.subtract(i,d,fW),w=f.dot(C,_),v=f.dot(C,p);b>0?r+=b*b:w>0&&(r+=w*w),x>0?r+=x*x:v>0&&(r+=v*v)}if(t.mode===ce.SCENE3D?(s=o.height,a=e.minimumHeight,l=e.maximumHeight):(s=i.x,a=0,l=0),s>l){const u=s-l;r+=u*u}else if(s<a){const u=a-s;r+=u*u}return Math.sqrt(r)}(this,e);if(e.mode===ce.SCENE3D&&c(this._orientedBoundingBox)){const n=Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC));return Math.max(t,n)}return t},J0.prototype.intersectPlane=function(e){return A.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},J0.prototype.createDebugVolume=function(e){A.defined("color",e);const t=new k.clone(k.IDENTITY),n=new Wj({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),i=new zn({geometry:n,id:"outline",modelMatrix:t,attributes:{color:ei.fromColor(e)}});return new Yi({geometryInstances:i,appearance:new gi({translucent:!1,flat:!0}),asynchronous:!1})};const Sx=J0,vx={},oRe=new f,hW=new f,pW=new f,mW=new f,_W=new Ao;function gW(e,t,n,i,o){const r=f.subtract(e,t,oRe),s=f.dot(n,r),a=f.dot(i,r);return V.fromElements(s,a,o)}vx.validOutline=function(e){A.defined("positions",e);const n=Ao.fromPoints(e,_W).halfAxes,i=oe.getColumn(n,0,hW),o=oe.getColumn(n,1,pW),r=oe.getColumn(n,2,mW),s=f.magnitude(i),a=f.magnitude(o),l=f.magnitude(r);return!(0===s&&(0===a||0===l)||0===a&&0===l)},vx.computeProjectTo2DArguments=function(e,t,n,i){A.defined("positions",e),A.defined("centerResult",t),A.defined("planeAxis1Result",n),A.defined("planeAxis2Result",i);const o=Ao.fromPoints(e,_W),r=o.halfAxes,s=oe.getColumn(r,0,hW),a=oe.getColumn(r,1,pW),l=oe.getColumn(r,2,mW),u=f.magnitude(s),d=f.magnitude(a),h=f.magnitude(l),m=Math.min(u,d,h);if(0===u&&(0===d||0===h)||0===d&&0===h)return!1;let _,p;return(m===d||m===h)&&(_=s),m===u?_=a:m===h&&(p=a),(m===u||m===d)&&(p=l),f.normalize(_,n),f.normalize(p,i),f.clone(o.center,t),!0},vx.createProjectPointsTo2DFunction=function(e,t,n){return function(i){const o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=gW(i[r],e,t,n);return o}},vx.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return gW(i,e,t,n,o)}};const Ov=vx;function rRe(e){const t=e.length,n=new Float64Array(3*t),i=Ot.createTypedArray(t,2*t);let o=0,r=0;for(let a=0;a<t;a++){const l=e[a];n[o++]=l.x,n[o++]=l.y,n[o++]=l.z,i[r++]=a,i[r++]=(a+1)%t}const s=new co({position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:n})});return new En({attributes:s,indices:i,primitiveType:Tt.LINES})}function sg(e){const t=(e=g(e,g.EMPTY_OBJECT)).polygonHierarchy;A.defined("options.polygonHierarchy",t),this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=si.computeHierarchyPackedLength(t,f)+1}sg.fromPositions=function(e){return e=g(e,g.EMPTY_OBJECT),A.defined("options.positions",e.positions),new sg({polygonHierarchy:{positions:e.positions}})},sg.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n=si.packPolygonHierarchy(e._polygonHierarchy,t,n,f)]=e.packedLength,t};const sRe={polygonHierarchy:{}};sg.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=si.unpackPolygonHierarchy(e,t,f);t=i.startingIndex,delete i.startingIndex;const o=e[t];return c(n)||(n=new sg(sRe)),n._polygonHierarchy=i,n.packedLength=o,n},sg.createGeometry=function(e){const t=e._polygonHierarchy;let n=t.positions;if(n=Ea(n,f.equalsEpsilon,!0),n.length<3||!Ov.validOutline(n))return;const o=si.polygonOutlinesFromHierarchy(t,!1);if(0===o.length)return;const r=[];for(let l=0;l<o.length;l++){const u=new zn({geometry:rRe(o[l])});r.push(u)}const s=ao.combineInstances(r)[0],a=Ae.fromPoints(t.positions);return new En({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};const ag=sg;let Rv=new Ce;function Ix(e){A.typeOf.object("options",e),A.typeOf.string("options.token",e.token);const t=AS.fromToken(e.token),n=g(e.minimumHeight,0),i=g(e.maximumHeight,0),o=g(e.ellipsoid,he.WGS84);this.s2Cell=t,this.minimumHeight=n,this.maximumHeight=i,this.ellipsoid=o;const r=function mRe(e,t,n,i){const o=new Array(6),r=e.getCenter(),s=i.geodeticSurfaceNormal(r,aRe),a=i.cartesianToCartographic(r,cRe);a.height=n;const l=i.cartographicToCartesian(a,lRe),u=qn.fromPointNormal(l,s);o[0]=u;let h,d=0;const m=[];let _,p;for(h=0;h<4;h++){_=e.getVertex(h),m[h]=_,p=i.cartesianToCartographic(_,uRe),p.height=t;const b=qn.getPointDistance(u,i.cartographicToCartesian(p,dRe));b<d&&(d=b)}const y=qn.clone(u);for(y.normal=f.negate(y.normal,y.normal),y.distance=-1*y.distance+d,o[1]=y,h=0;h<4;h++){_=m[h];const b=m[(h+1)%4],x=i.geodeticSurfaceNormal(_,fRe),C=f.subtract(b,_,pRe);let w=f.cross(C,x,hRe);w=f.normalize(w,w),o[2+h]=qn.fromPointNormal(_,w)}return o}(t,n,i,o);this._boundingPlanes=r;const s=function bRe(e){const t=new Array(8);for(let n=0;n<4;n++)t[n]=yW(e[0],e[2+(n+3)%4],e[2+n%4]),t[n+4]=yW(e[1],e[2+(n+3)%4],e[2+n%4]);return t}(r);let a;for(this._vertices=s,this._edgeNormals=new Array(6),this._edgeNormals[0]=bM(r[0],s.slice(0,4)),a=0;a<4;a++)this._edgeNormals[0][a]=f.negate(this._edgeNormals[0][a],this._edgeNormals[0][a]);for(this._edgeNormals[1]=bM(r[1],s.slice(4,8)),a=0;a<4;a++)this._edgeNormals[2+a]=bM(r[2+a],[s[a%4],s[(a+1)%4],s[4+(a+1)%4],s[4+a]]);for(this._planeVertices=[this._vertices.slice(0,4),this._vertices.slice(4,8)],a=0;a<4;a++)this._planeVertices.push([this._vertices[a%4],this._vertices[(a+1)%4],this._vertices[4+(a+1)%4],this._vertices[4+a]]);const l=t.getCenter();Rv=o.cartesianToCartographic(l,Rv),Rv.height=(i+n)/2,this.center=o.cartographicToCartesian(Rv,l),this._boundingSphere=Ae.fromPoints(s)}const aRe=new f,cRe=new Ce,lRe=new f,uRe=new Ce,dRe=new f,fRe=new f,hRe=new f,pRe=new f;let cg=new f,lg=new f,ug=new f,fM=new f,hM=new f,pM=new f;const _Re=new f,gRe=new f,yRe=new f;let mM=new f,_M=new f,gM=new f,tm=new f;const rf=new oe;function yW(e,t,n){cg=e.normal,lg=t.normal,ug=n.normal,fM=f.multiplyByScalar(e.normal,-e.distance,fM),hM=f.multiplyByScalar(t.normal,-t.distance,hM),pM=f.multiplyByScalar(n.normal,-n.distance,pM),mM=f.multiplyByScalar(f.cross(lg,ug,_Re),f.dot(fM,cg),mM),_M=f.multiplyByScalar(f.cross(ug,cg,gRe),f.dot(hM,lg),_M),gM=f.multiplyByScalar(f.cross(cg,lg,yRe),f.dot(pM,ug),gM),rf[0]=cg.x,rf[1]=lg.x,rf[2]=ug.x,rf[3]=cg.y,rf[4]=lg.y,rf[5]=ug.y,rf[6]=cg.z,rf[7]=lg.z,rf[8]=ug.z;const i=oe.determinant(rf);return tm=f.add(mM,_M,tm),tm=f.add(tm,gM,tm),new f(tm.x/i,tm.y/i,tm.z/i)}let yM=new f,tb=new f;function bM(e,t){const n=[];for(let i=0;i<4;i++)yM=f.subtract(t[(i+1)%4],t[i],yM),tb=f.cross(e.normal,yM,tb),tb=f.normalize(tb,tb),n[i]=f.clone(tb);return n}Object.defineProperties(Ix.prototype,{boundingVolume:{get:function(){return this}},boundingSphere:{get:function(){return this._boundingSphere}}});const TM=new f;Ix.prototype.distanceToCamera=function(e){A.defined("frameState",e);const t=e.camera.positionWC,n=[],i=[];let o,r,s,a,l;for(qn.getPointDistance(this._boundingPlanes[0],t)>0?(n.push(0),i.push(this._planeVertices[0]),o=this._edgeNormals[0]):qn.getPointDistance(this._boundingPlanes[1],t)>0&&(n.push(1),i.push(this._planeVertices[1]),o=this._edgeNormals[1]),r=0;r<4;r++)s=2+r,qn.getPointDistance(this._boundingPlanes[s],t)>0&&(n.push(s),i.push(this._planeVertices[s]),o=this._edgeNormals[s]);if(0===n.length)return 0;if(1===n.length)return l=this._boundingPlanes[n[0]],a=AM(qn.projectPointOntoPlane(l,t,TM),i[0],0,o),f.distance(a,t);if(2===n.length){if(0===n[0]){const m=[this._vertices[4*n[0]+(n[1]-2)],this._vertices[4*n[0]+(n[1]-2+1)%4]];return a=bW(t,m[0],m[1]),f.distance(a,t)}let h,d=Number.MAX_VALUE;for(r=0;r<2;r++)l=this._boundingPlanes[n[r]],a=AM(qn.projectPointOntoPlane(l,t,TM),i[r],0,this._edgeNormals[n[r]]),h=f.distanceSquared(a,t),h<d&&(d=h);return Math.sqrt(d)}if(n.length>3)return a=AM(qn.projectPointOntoPlane(this._boundingPlanes[1],t,TM),this._planeVertices[1],0,this._edgeNormals[1]),f.distance(a,t);const u=2===n[1]&&5===n[2]?0:1;return f.distance(t,0===n[0]?this._vertices[(n[1]-2+u)%4]:this._vertices[4+(n[1]-2+u)%4])};const TRe=new f,ARe=new f;function bW(e,t,n){const i=f.subtract(n,t,TRe),o=f.subtract(e,t,ARe);let r=f.dot(i,o);if(r<=0)return t;const s=f.dot(i,i);return r>=s?n:(r/=s,new f((1-r)*t.x+r*n.x,(1-r)*t.y+r*n.y,(1-r)*t.z+r*n.z))}const xRe=new qn(f.UNIT_X,0);function AM(e,t,n,i){let r,s,a,o=Number.MAX_VALUE;for(let l=0;l<t.length;l++){const u=qn.fromPointNormal(t[l],i[l],xRe);qn.getPointDistance(u,e)<0||(a=bW(e,t[l],t[(l+1)%4]),r=f.distance(e,a),r<o&&(o=r,s=a))}return c(s)?s:e}Ix.prototype.intersectPlane=function(e){A.defined("plane",e);let t=0,n=0;for(let i=0;i<this._vertices.length;i++)f.dot(e.normal,this._vertices[i])+e.distance<0?n++:t++;return t===this._vertices.length?On.INSIDE:n===this._vertices.length?On.OUTSIDE:On.INTERSECTING},Ix.prototype.createDebugVolume=function(e){A.defined("color",e);const t=new k.clone(k.IDENTITY),n=new ag({polygonHierarchy:{positions:this._planeVertices[0]}}),i=ag.createGeometry(n),o=new zn({geometry:i,id:"outline",modelMatrix:t,attributes:{color:ei.fromColor(e)}}),r=new ag({polygonHierarchy:{positions:this._planeVertices[1]}}),s=ag.createGeometry(r),a=new zn({geometry:s,id:"outline",modelMatrix:t,attributes:{color:ei.fromColor(e)}}),l=[];for(let u=0;u<4;u++){const d=new ag({polygonHierarchy:{positions:this._planeVertices[2+u]}}),h=ag.createGeometry(d);l[u]=new zn({geometry:h,id:"outline",modelMatrix:t,attributes:{color:ei.fromColor(e)}})}return new Yi({geometryInstances:[l[0],l[1],l[2],l[3],a,o],appearance:new gi({translucent:!1,flat:!0}),asynchronous:!1})};const CRe=Ix,ERe=new f(1,1,1),Lv=Math.cos,Nv=Math.sin;function nb(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.radii,ERe),n=g(e.innerRadii,t),i=g(e.minimumClock,0),o=g(e.maximumClock,O.TWO_PI),r=g(e.minimumCone,0),s=g(e.maximumCone,O.PI),a=Math.round(g(e.stackPartitions,10)),l=Math.round(g(e.slicePartitions,8)),u=Math.round(g(e.subdivisions,128));if(a<1)throw new E("options.stackPartitions cannot be less than 1");if(l<0)throw new E("options.slicePartitions cannot be less than 0");if(u<0)throw new E("options.subdivisions must be greater than or equal to zero.");if(c(e.offsetAttribute)&&e.offsetAttribute===Xn.TOP)throw new E("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=f.clone(t),this._innerRadii=f.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=l,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}nb.packedLength=2*f.packedLength+8,nb.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),f.pack(e._radii,t,n),f.pack(e._innerRadii,t,n+=f.packedLength),n+=f.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n++]=e._subdivisions,t[n]=g(e._offsetAttribute,-1),t};const TW=new f,AW=new f,wh={radii:TW,innerRadii:AW,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};nb.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);const i=f.unpack(e,t,TW),o=f.unpack(e,t+=f.packedLength,AW);t+=f.packedLength;const r=e[t++],s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t++],m=e[t];return c(n)?(n._radii=f.clone(i,n._radii),n._innerRadii=f.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=s,n._minimumCone=a,n._maximumCone=l,n._stackPartitions=u,n._slicePartitions=d,n._subdivisions=h,n._offsetAttribute=-1===m?void 0:m,n):(wh.minimumClock=r,wh.maximumClock=s,wh.minimumCone=a,wh.maximumCone=l,wh.stackPartitions=u,wh.slicePartitions=d,wh.subdivisions=h,wh.offsetAttribute=-1===m?void 0:m,new nb(wh))},nb.createGeometry=function(e){const t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;const n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;const i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._subdivisions,l=he.fromCartesian3(t);let u=e._slicePartitions+1,d=e._stackPartitions+1;u=Math.round(u*Math.abs(o-i)/O.TWO_PI),d=Math.round(d*Math.abs(s-r)/O.PI),u<2&&(u=2),d<2&&(d=2);let h=0,m=1;const _=n.x!==t.x||n.y!==t.y||n.z!==t.z;let p=!1,y=!1;_&&(m=2,r>0&&(p=!0,h+=u),s<Math.PI&&(y=!0,h+=u));const b=a*m*(d+u),x=new Float64Array(3*b),w=Ot.createTypedArray(b,2*(b+h-(u+d)*m));let v,I,P,N,R=0;const B=new Array(d),F=new Array(d);for(v=0;v<d;v++)N=r+v*(s-r)/(d-1),B[v]=Nv(N),F[v]=Lv(N);const S=new Array(a),D=new Array(a);for(v=0;v<a;v++)P=i+v*(o-i)/(a-1),S[v]=Nv(P),D[v]=Lv(P);for(v=0;v<d;v++)for(I=0;I<a;I++)x[R++]=t.x*B[v]*D[I],x[R++]=t.y*B[v]*S[I],x[R++]=t.z*F[v];if(_)for(v=0;v<d;v++)for(I=0;I<a;I++)x[R++]=n.x*B[v]*D[I],x[R++]=n.y*B[v]*S[I],x[R++]=n.z*F[v];for(B.length=a,F.length=a,v=0;v<a;v++)N=r+v*(s-r)/(a-1),B[v]=Nv(N),F[v]=Lv(N);for(S.length=u,D.length=u,v=0;v<u;v++)P=i+v*(o-i)/(u-1),S[v]=Nv(P),D[v]=Lv(P);for(v=0;v<a;v++)for(I=0;I<u;I++)x[R++]=t.x*B[v]*D[I],x[R++]=t.y*B[v]*S[I],x[R++]=t.z*F[v];if(_)for(v=0;v<a;v++)for(I=0;I<u;I++)x[R++]=n.x*B[v]*D[I],x[R++]=n.y*B[v]*S[I],x[R++]=n.z*F[v];for(R=0,v=0;v<d*m;v++){const U=v*a;for(I=0;I<a-1;I++)w[R++]=U+I,w[R++]=U+I+1}let L=d*a*m;for(v=0;v<u;v++)for(I=0;I<a-1;I++)w[R++]=L+v+I*u,w[R++]=L+v+(I+1)*u;if(_)for(L=d*a*m+u*a,v=0;v<u;v++)for(I=0;I<a-1;I++)w[R++]=L+v+I*u,w[R++]=L+v+(I+1)*u;if(_){let U=d*a*m,z=U+a*u;if(p)for(v=0;v<u;v++)w[R++]=U+v,w[R++]=z+v;if(y)for(U+=a*u-u,z+=a*u-u,v=0;v<u;v++)w[R++]=U+v,w[R++]=z+v}const M=new co({position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:x})});if(c(e._offsetAttribute)){const z=e._offsetAttribute===Xn.NONE?0:1,G=new Uint8Array(x.length/3).fill(z);M.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:G})}return new En({attributes:M,indices:w,primitiveType:Tt.LINES,boundingSphere:Ae.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})};const nm=nb;function ib(e){const t=g(e.radius,1),i={radii:new f(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new nm(i),this._workerName="createSphereOutlineGeometry"}ib.packedLength=nm.packedLength,ib.pack=function(e,t,n){return A.typeOf.object("value",e),nm.pack(e._ellipsoidGeometry,t,n)};const wRe=new nm,dg={radius:void 0,radii:new f,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};ib.unpack=function(e,t,n){const i=nm.unpack(e,t,wRe);return dg.stackPartitions=i._stackPartitions,dg.slicePartitions=i._slicePartitions,dg.subdivisions=i._subdivisions,c(n)?(f.clone(i._radii,dg.radii),n._ellipsoidGeometry=new nm(dg),n):(dg.radius=i._radii.x,new ib(dg))},ib.createGeometry=function(e){return nm.createGeometry(e._ellipsoidGeometry)};const xM=ib;function ob(e,t){0===t&&(t=O.EPSILON7),this._boundingSphere=new Ae(e,t)}Object.defineProperties(ob.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}}),ob.prototype.distanceToCamera=function(e){A.defined("frameState",e);const t=this._boundingSphere;return Math.max(0,f.distance(t.center,e.camera.positionWC)-t.radius)},ob.prototype.intersectPlane=function(e){return A.defined("plane",e),Ae.intersectPlane(this._boundingSphere,e)},ob.prototype.update=function(e,t){f.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t},ob.prototype.createDebugVolume=function(e){A.defined("color",e);const t=new xM({radius:this.radius}),n=k.fromTranslation(this.center,new k.clone(k.IDENTITY)),i=new zn({geometry:t,id:"outline",modelMatrix:n,attributes:{color:ei.fromColor(e)}});return new Yi({geometryInstances:i,appearance:new gi({translucent:!1,flat:!0}),asynchronous:!1})};const Mv=ob,SRe=new f;function sf(e){const t=(e=g(e,g.EMPTY_OBJECT)).minimum,n=e.maximum;if(A.typeOf.object("min",t),A.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===Xn.TOP)throw new E("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=f.clone(t),this._max=f.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}sf.fromDimensions=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).dimensions;A.typeOf.object("dimensions",t),A.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),A.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),A.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);const n=f.multiplyByScalar(t,.5,new f);return new sf({minimum:f.negate(n,new f),maximum:n,offsetAttribute:e.offsetAttribute})},sf.fromAxisAlignedBoundingBox=function(e){return A.typeOf.object("boundindBox",e),new sf({minimum:e.minimum,maximum:e.maximum})},sf.packedLength=2*f.packedLength+1,sf.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),f.pack(e._min,t,n),f.pack(e._max,t,n+f.packedLength),t[n+2*f.packedLength]=g(e._offsetAttribute,-1),t};const xW=new f,CW=new f,EW={minimum:xW,maximum:CW,offsetAttribute:void 0};sf.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=f.unpack(e,t,xW),o=f.unpack(e,t+f.packedLength,CW),r=e[t+2*f.packedLength];return c(n)?(n._min=f.clone(i,n._min),n._max=f.clone(o,n._max),n._offsetAttribute=-1===r?void 0:r,n):(EW.offsetAttribute=-1===r?void 0:r,new sf(EW))},sf.createGeometry=function(e){const t=e._min,n=e._max;if(f.equals(t,n))return;const i=new co,o=new Uint16Array(24),r=new Float64Array(24);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=n.x,r[4]=t.y,r[5]=t.z,r[6]=n.x,r[7]=n.y,r[8]=t.z,r[9]=t.x,r[10]=n.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=n.z,r[15]=n.x,r[16]=t.y,r[17]=n.z,r[18]=n.x,r[19]=n.y,r[20]=n.z,r[21]=t.x,r[22]=n.y,r[23]=n.z,i.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:r}),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;const s=f.subtract(n,t,SRe),a=.5*f.magnitude(s);if(c(e._offsetAttribute)){const u=e._offsetAttribute===Xn.NONE?0:1,d=new Uint8Array(r.length/3).fill(u);i.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return new En({attributes:i,indices:o,primitiveType:Tt.LINES,boundingSphere:new Ae(f.ZERO,a),offsetAttribute:e._offsetAttribute})};const Fv=sf,vRe=new f,IRe=new f,DRe=new f,PRe=new f;function fg(e,t,n){n=f.cross(e,t,n);const i=f.magnitude(n);return f.multiplyByScalar(n,O.EPSILON7/i,n)}function CM(e,t){const n=f.normalize(e,PRe);return fg(e,f.equalsEpsilon(n,f.UNIT_X,O.EPSILON6)?f.UNIT_Y:f.UNIT_X,t)}function wW(e){let t=oe.getColumn(e,0,vRe),n=oe.getColumn(e,1,IRe),i=oe.getColumn(e,2,DRe);const o=f.equals(t,f.ZERO),r=f.equals(n,f.ZERO),s=f.equals(i,f.ZERO);return o||r||s?o&&r&&s?(e[0]=O.EPSILON7,e[4]=O.EPSILON7,e[8]=O.EPSILON7,e):(!o||r||s?o||!r||s?o||r||!s?o?r?s||(t=CM(i,t),n=fg(i,t,n)):(t=CM(n,t),i=fg(n,t,i)):(n=CM(t,n),i=fg(n,t,i)):i=fg(n,t,i):n=fg(t,i,n):t=fg(n,i,t),oe.setColumn(e,0,t,e),oe.setColumn(e,1,n,e),oe.setColumn(e,2,i,e),e):e}function rb(e,t){t=wW(t),this._orientedBoundingBox=new Ao(e,t),this._boundingSphere=Ae.fromOrientedBoundingBox(this._orientedBoundingBox)}Object.defineProperties(rb.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),rb.prototype.distanceToCamera=function(e){return A.defined("frameState",e),Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))},rb.prototype.intersectPlane=function(e){return A.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},rb.prototype.update=function(e,t){f.clone(e,this._orientedBoundingBox.center),t=wW(t),oe.clone(t,this._orientedBoundingBox.halfAxes),Ae.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)},rb.prototype.createDebugVolume=function(e){A.defined("color",e);const t=new Fv({minimum:new f(-1,-1,-1),maximum:new f(1,1,1)}),n=k.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),i=new zn({geometry:t,id:"outline",modelMatrix:n,attributes:{color:ei.fromColor(e)}});return new Yi({geometryInstances:i,appearance:new gi({translucent:!1,flat:!0}),asynchronous:!1})};const hg=rb;function Bo(e,t,n,i){this._tileset=e,this._header=n;const o=c(n.contents),r=o&&n.contents.length>1||vr(n,"3DTILES_multiple_contents"),s=o&&!r?n.contents[0]:n.content;this._contentHeader=s,this.transform=c(n.transform)?k.unpack(n.transform):k.clone(k.IDENTITY);const a=c(i)?i.computedTransform:e.modelMatrix,l=k.multiply(a,this.transform,new k),u=c(i)?i._initialTransform:k.IDENTITY;let d,h,m;this._initialTransform=k.multiply(u,this.transform,new k),this.computedTransform=l,this.metadata=HPe(e,n),this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._boundingVolume=this.createBoundingVolume(n.boundingVolume,l),this._boundingVolume2D=void 0,c(s)&&c(s.boundingVolume)&&(d=this.createBoundingVolume(s.boundingVolume,l)),this._contentBoundingVolume=d,this._contentBoundingVolume2D=void 0,c(n.viewerRequestVolume)&&(h=this.createBoundingVolume(n.viewerRequestVolume,l)),this._viewerRequestVolume=h,this.geometricError=n.geometricError,this._geometricError=n.geometricError,c(this._geometricError)||(this._geometricError=c(i)?i._geometricError:e._geometricError,Bo._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale(),c(n.refine)?(("replace"===n.refine||"add"===n.refine)&&Bo._deprecationWarning("lowercase-refine",`This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`),m="REPLACE"===n.refine.toUpperCase()?ea.REPLACE:ea.ADD):m=c(i)?i.refine:ea.REPLACE,this.refine=m,this.children=[],this.parent=i;let _,y,b,x,p=!1;if(t=zt.createIfNeeded(t),r)y=Or.UNLOADED,b=t.clone();else if(c(s)){let I=s.uri;c(s.url)&&(Bo._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),I=s.url),""===I?(Bo._deprecationWarning("contentUriEmpty","content.uri property is an empty string, which creates a circular dependency, making this tileset invalid. Omit the content property instead"),_=new Lj(e,this),p=!0,y=Or.READY):(y=Or.UNLOADED,b=t.getDerivedResource({url:I}),x=kf.getServerKey(b.getUrlComponent()))}else _=new Lj(e,this),p=!0,y=Or.READY;this._content=_,this._contentResource=b,this._contentState=y,this._expiredContent=void 0,this._serverKey=x,this.hasEmptyContent=p,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasImplicitContentMetadata=!1,this.hasMultipleContents=r,this.cacheNode=void 0;const C=n.expire;let w,v;c(C)&&(w=C.duration,c(C.date)&&(v=re.fromIso8601(C.date))),this.expireDuration=w,this.expireDate=v,this.lastStyleTime=0,this._optimChildrenWithinParent=Z0.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=Z.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 re,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Bo._deprecationWarning=Ud,Object.defineProperties(Bo.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return g(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 c(this._color)||(this._color=new Z),Z.clone(this._color)},set:function(e){this._color=Z.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||c(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===Or.READY}},contentUnloaded:{get:function(){return this._contentState===Or.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===Or.EXPIRED}},contentFailed:{get:function(){return this._contentState===Or.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});const im=new f,SW=new re;function MRe(e){return function(){return e._priority}}function EM(){return EM=(0,we.Z)(function*(e,t,n,i,o){const r=e._contentState;let s;e._contentState=Or.LOADING,++t.statistics.numberOfPendingRequests;try{s=yield o}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===To.CANCELLED)return e._contentState=r,void++t.statistics.numberOfAttemptedRequests;throw e._contentState=Or.FAILED,a}if(e.isDestroyed())--t.statistics.numberOfPendingRequests;else{if(n.cancelled||n.state===To.CANCELLED)return e._contentState=r,--t.statistics.numberOfPendingRequests,void++t.statistics.numberOfAttemptedRequests;try{const a=yield function URe(e,t){return wM.apply(this,arguments)}(e,s);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=a,e._contentState=Or.PROCESSING,a)}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=Or.FAILED,a}}}),EM.apply(this,arguments)}function wM(){return(wM=(0,we.Z)(function*(e,t){const n=Fj(t),i=e._tileset;let o;i._disableSkipLevelOfDetail=i._disableSkipLevelOfDetail||n.contentType===Pc.GEOMETRY||n.contentType===Pc.VECTOR,(n.contentType===Pc.IMPLICIT_SUBTREE||n.contentType===Pc.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0),n.contentType===Pc.EXTERNAL_TILESET&&(e.hasTilesetContent=!0);const r=Rj[n.contentType];if(e.isDestroyed())return;o=c(n.binaryPayload)?yield Promise.resolve(r(i,e,e._contentResource,n.binaryPayload.buffer,0)):yield Promise.resolve(r(i,e,e._contentResource,n.jsonPayload));const s=e._contentHeader;e.hasImplicitContentMetadata?o.metadata=e.implicitSubtree.getContentMetadataView(e.implicitCoordinates,0):e.hasImplicitContent||(o.metadata=Nj(i,s));const a=Mj(i,s);return c(a)&&(o.group=new TH({metadata:a})),o})).apply(this,arguments)}Bo.prototype.getScreenSpaceError=function(e,t,n){const i=this._tileset,o=g(n,1),r=c(this.parent)?this.parent.geometricError:i._scaledGeometricError,s=t?r:this.geometricError;if(0===s)return 0;const{camera:a,context:l}=e;let u=a.frustum;const d=l.drawingBufferWidth,h=l.drawingBufferHeight*o;let m;if(e.mode===ce.SCENE2D||u instanceof $n){const _=u.offCenterFrustum;c(_)&&(u=_),m=s/(Math.max(u.top-u.bottom,u.right-u.left)/Math.max(d,h))}else{const _=Math.max(this._distanceToCamera,O.EPSILON7);if(m=s*h/(_*u.sseDenominator),i.dynamicScreenSpaceError){const b=i.dynamicScreenSpaceErrorFactor;m-=O.fog(_,i._dynamicScreenSpaceErrorComputedDensity)*b}}return m/=e.pixelRatio,m},Bo.prototype.updateVisibility=function(e){const{parent:t,tileset:n}=this;if(this._updatedVisibilityFrame===n._updatedVisibilityFrame)return;const i=c(t)?t.computedTransform:n.modelMatrix,o=c(t)?t._visibilityPlaneMask:Fu.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!==Fu.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=function LRe(e,t){const n=t.parent,o=c(n)&&(!e.isSkippingLevelOfDetail||0===t._screenSpaceError||n.hasTilesetContent||n.hasImplicitContent)?n._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-o}(n,this),this._priorityProgressiveResolution=function RRe(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;const n=e.memoryAdjustedScreenSpaceError;let i=t._screenSpaceErrorProgressiveResolution>n;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;const o=t.parent,r=t._screenSpaceErrorProgressiveResolution<=n,s=c(o)&&o._screenSpaceErrorProgressiveResolution>n;return r&&s&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}(n,this),this.priorityDeferred=function ORe(e,t){const{tileset:n,boundingSphere:i}=e,{radius:o,center:r}=i,{camera:s}=t,a=f.multiplyByScalar(s.directionWC,e._centerZDepth,im),l=f.add(s.positionWC,a,im),u=f.subtract(l,r,im);if(f.magnitude(u)>o){const v=f.normalize(u,im),I=f.multiplyByScalar(v,o,im),P=f.add(r,I,im),N=f.subtract(P,s.positionWC,im),R=f.normalize(N,im);e._foveatedFactor=1-Math.abs(f.dot(s.directionWC,R))}else e._foveatedFactor=0;const m=e.refine===ea.REPLACE,_=n.isSkippingLevelOfDetail;if(m&&!_||!n.foveatedScreenSpaceError||1===n.foveatedConeSize||e._priorityProgressiveResolution&&m&&_||n._pass===zs.PRELOAD_FLIGHT||n._pass===zs.PRELOAD)return!1;const p=1-Math.cos(.5*s.frustum.fov),y=n.foveatedConeSize*p;if(e._foveatedFactor<=y)return!1;const x=O.clamp((e._foveatedFactor-y)/(p-y),0,1),C=n.foveatedInterpolationCallback(n.foveatedMinimumScreenSpaceErrorRelaxation,n.memoryAdjustedScreenSpaceError,x),w=0===e._screenSpaceError&&c(e.parent)?.5*e.parent._screenSpaceError:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-C<=w}(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame},Bo.prototype.updateExpiration=function(){if(c(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){const e=re.now(SW);re.lessThan(this.expireDate,e)&&(this._contentState=Or.EXPIRED,this._expiredContent=this._content)}},Bo.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?function FRe(e){let t=e._content;const n=e._tileset;if(!c(t)){const o=vr(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new ZPe(n,e,e._contentResource.clone(),o),e._content=t}const i=t.requestInnerContents();if(c(i))return e._contentState=Or.LOADING,i.then(o=>{if(!e.isDestroyed()&&c(o))return e._contentState=Or.PROCESSING,t}).catch(o=>{if(!e.isDestroyed())throw e._contentState=Or.FAILED,o})}(this):function kRe(e){const t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});const i=new h_({throttle:!0,throttleByServer:!0,type:f_.TILES3D,priorityFunction:MRe(e),serverKey:e._serverKey});e._request=i,t.request=i;const o=e._tileset,r=t.fetchArrayBuffer();if(c(r))return function BRe(e,t,n,i,o){return EM.apply(this,arguments)}(e,o,i,n,r);++o.statistics.numberOfAttemptedRequests}(this)},Bo.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()},Bo.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=Or.UNLOADED,this.lastStyleTime=0,this.clippingPlanesDirty=0===this._clippingPlanesState,this._clippingPlanesState=0,this.clippingPolygonsDirty=0===this._clippingPolygonsState,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())};const vW=new Ae;function SM(e,t){if(t.mode!==ce.SCENE3D&&!c(e._boundingVolume2D)){const i=Ae.projectTo2D(e._boundingVolume.boundingSphere,t.mapProjection,vW);e._boundingVolume2D=new Mv(i.center,i.radius)}return t.mode!==ce.SCENE3D?e._boundingVolume2D:e._boundingVolume}Bo.prototype.visibility=function(e,t){const n=e.cullingVolume,i=SM(this,e),o=this._tileset,r=o.clippingPlanes;if(c(r)&&r.enabled){const a=r.computeIntersectionWithBoundingVolume(i,o.clippingPlanesOriginMatrix);if(this._isClipped=a!==On.INSIDE,a===On.OUTSIDE)return Fu.MASK_OUTSIDE}const s=o.clippingPolygons;if(c(s)&&s.enabled){const a=s.computeIntersectionWithBoundingVolume(i);this._isClippedByPolygon=a!==On.OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)},Bo.prototype.contentVisibility=function(e){if(!c(this._contentBoundingVolume)||this._visibilityPlaneMask===Fu.MASK_INSIDE)return On.INSIDE;const t=e.cullingVolume,n=function zRe(e,t){if(t.mode!==ce.SCENE3D&&!c(e._contentBoundingVolume2D)){const i=Ae.projectTo2D(e._contentBoundingVolume.boundingSphere,t.mapProjection,vW);e._contentBoundingVolume2D=new Mv(i.center,i.radius)}return t.mode!==ce.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}(this,e),i=this._tileset,o=i.clippingPlanes;if(c(o)&&o.enabled){const s=o.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=s!==On.INSIDE,s===On.OUTSIDE)return On.OUTSIDE}const r=i.clippingPolygons;if(c(r)&&r.enabled){const s=r.computeIntersectionWithBoundingVolume(n);if(this._isClippedByPolygon=s!==On.OUTSIDE,s===On.INSIDE)return On.OUTSIDE}return t.computeVisibility(n)},Bo.prototype.distanceToTile=function(e){return SM(this,e).distanceToCamera(e)};const VRe=new f;Bo.prototype.distanceToTileCenter=function(e){const n=SM(this,e).boundingVolume,i=f.subtract(n.center,e.camera.positionWC,VRe);return f.dot(e.camera.directionWC,i)},Bo.prototype.insideViewerRequestVolume=function(e){const t=this._viewerRequestVolume;return!c(t)||0===t.distanceToCamera(e)};const IW=new oe,DW=new f,HRe=new oe,vM=new f,PW=new Te,OW=new Ao,IM=new k;Bo.prototype.createBoundingVolume=function(e,t,n){const i=this.metadata;let o;if(c(i)&&(o=j8.parseBoundingVolumeSemantic("TILE",i)),c(o)&&(e=o),!c(e))throw new Pe("boundingVolume must be defined");if(vr(e,"3DTILES_bounding_volume_S2"))return new CRe(e.extensions["3DTILES_bounding_volume_S2"]);const{box:r,region:s,sphere:a}=e;if(c(r)){const l=function GRe(e,t,n){let i=f.fromElements(e[0],e[1],e[2],vM),o=oe.fromArray(e,3,HRe);i=k.multiplyByPoint(t,i,i);const r=k.getMatrix3(t,IW);return o=oe.multiply(r,o,o),c(n)?(n.update(i,o),n):new hg(i,o)}(r,t,n);return 1!==this._verticalExaggeration&&RW(l,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),l}if(c(s)){const l=function WRe(e,t,n,i){if(!k.equalsEpsilon(t,n,O.EPSILON8))return function jRe(e,t,n,i){const o=Te.unpack(e,0,PW),a=Ao.fromRectangle(o,e[4],e[5],he.WGS84,OW);let l=a.center,u=a.halfAxes;t=k.multiplyTransformation(t,k.inverseTransformation(n,IM),IM),l=k.multiplyByPoint(t,l,l);const d=k.getMatrix3(t,IW);return u=oe.multiply(d,u,u),c(i)&&i instanceof hg?(i.update(l,u),i):new hg(l,u)}(e,t,n,i);const o=Te.unpack(e,0,PW);return c(i)?(i.rectangle=Te.clone(o,i.rectangle),i.minimumHeight=e[4],i.maximumHeight=e[5],i.computeBoundingVolumes(he.WGS84),i):new Sx({rectangle:o,minimumHeight:e[4],maximumHeight:e[5]})}(s,t,this._initialTransform,n);return 1===this._verticalExaggeration||(l instanceof hg?RW(l,this._verticalExaggeration,this._verticalExaggerationRelativeHeight):(l.minimumHeight=Ec.getHeight(l.minimumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),l.maximumHeight=Ec.getHeight(l.maximumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),l.computeBoundingVolumes(he.WGS84))),l}if(c(a)){const l=function qRe(e,t,n){let i=f.fromElements(e[0],e[1],e[2],vM),o=e[3];i=k.multiplyByPoint(t,i,i);const r=k.getScale(t,DW);return o*=f.maximumComponent(r),c(n)?(n.update(i,o),n):new Mv(i,o)}(a,t,n);if(1!==this._verticalExaggeration){const u=Ec.getPosition(l.center,he.WGS84,this._verticalExaggeration,this._verticalExaggerationRelativeHeight,vM);l.update(u,l.radius*this._verticalExaggeration)}return l}throw new Pe("boundingVolume must contain a sphere, region, or box")};const YRe=f.unpackArray(new Array(24).fill(0));function RW(e,t,n){const i=e.boundingVolume.computeCorners(YRe).map(r=>Ec.getPosition(r,he.WGS84,t,n,r)),o=Ao.fromPoints(i,OW);e.update(o.center,o.halfAxes)}Bo.prototype.updateTransform=function(e,t){e=g(e,k.IDENTITY);const n=k.multiplyTransformation(e,this.transform,IM),i=!k.equals(n,this.computedTransform),o=c(t)&&(this._verticalExaggeration!==t.verticalExaggeration||this._verticalExaggerationRelativeHeight!==t.verticalExaggerationRelativeHeight);if(!i&&!o)return;i&&k.clone(n,this.computedTransform),o&&(this._verticalExaggeration=t.verticalExaggeration,this._verticalExaggerationRelativeHeight=t.verticalExaggerationRelativeHeight);const r=this._header,s=this._contentHeader;this._boundingVolume=this.createBoundingVolume(r.boundingVolume,this.computedTransform,this._boundingVolume),c(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(s.boundingVolume,this.computedTransform,this._contentBoundingVolume)),c(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()},Bo.prototype.updateGeometricErrorScale=function(){const e=k.getScale(this.computedTransform,DW),t=f.maximumComponent(e);if(this.geometricError=this._geometricError*t,!c(this.parent)){const n=this._tileset;n._scaledGeometricError=n._geometricError*t}},Bo.prototype.update=function(e,t,n){const{commandList:i}=t,o=i.length;(function $Re(e,t){const n=t.clippingPlanes;let i=0;c(n)&&e._isClipped&&n.enabled&&(i=n.clippingPlanesState),i!==e._clippingPlanesState&&(e._clippingPlanesState=i,e.clippingPlanesDirty=!0)})(this,e),function KRe(e,t){const n=t.clippingPolygons;let i=0;c(n)&&e._isClippedByPolygon&&n.enabled&&(i=n.clippingPolygonsState),i!==e._clippingPolygonsState&&(e._clippingPolygonsState=i,e.clippingPolygonsDirty=!0)}(this,e),function XRe(e,t,n,i){if(!i.isRender)return;const o=c(e._contentHeader)&&c(e._contentHeader.boundingVolume),r=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!o;if(r){let l;l=e._finalResolution?e.hasRenderableContent?Z.WHITE:Z.DARKGRAY:Z.YELLOW,c(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(l)),e._debugBoundingVolume.update(n);const u=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");u.color=ei.toValue(l,u.color)}else!r&&c(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&o?(c(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(Z.BLUE)),e._debugContentBoundingVolume.update(n)):!t.debugShowContentBoundingVolume&&c(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&c(e._viewerRequestVolume)?(c(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(Z.YELLOW)),e._debugViewerRequestVolume.update(n)):!t.debugShowViewerRequestVolume&&c(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());const s=t.debugColorizeTiles&&!e._debugColorizeTiles||c(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=Z.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),a&&t.makeStyleDirty()}(this,e,t,n),function ZRe(e,t,n){const i=e._expiredContent;if(!e.hasMultipleContents&&c(i)){if(!e.contentReady){try{i.update(t,n)}catch{}return}e._expiredContent.destroy(),e._expiredContent=void 0}if(c(e.content))try{e.content.update(t,n)}catch(o){throw e._contentState=Or.FAILED,o}}(this,e,t);const r=i.length;this._commandsLength=r-o;for(let s=o;s<r;++s){const a=i[s];a.depthForTranslucentClassification=a.pass===Ue.TRANSLUCENT}this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1};const LW=[];function NW(e,t,n){const i=e*Math.pow(10,t);return parseInt(i)*Math.pow(10,n)}function Bv(e,t,n){return Math.max(O.normalize(e,t,n)-O.EPSILON7,0)}Bo.prototype.process=function(e,t){!this.contentExpired&&!this.contentReady&&this._content.ready&&(function NRe(e){if(!c(e.expireDuration))return;const t=re.now(SW);re.addSeconds(t,e.expireDuration,t),c(e.expireDate)?re.lessThan(e.expireDate,t)&&re.clone(t,e.expireDate):e.expireDate=re.clone(t)}(this),this._selectedFrame=0,this.lastStyleTime=0,re.now(this._loadTimestamp),this._contentState=Or.READY,!this.hasTilesetContent&&!this.hasImplicitContent&&(e._statistics.incrementLoadCounts(this.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(this)));const n=t.commandList;t.commandList=LW;try{this._content.update(e,t)}catch(i){throw this._contentState=Or.FAILED,i}LW.length=0,t.commandList=n},Bo.prototype.updatePriority=function(){const e=this.tileset,t=e.preferLeaves,n=e._minimumPriority,i=e._maximumPriority,m=Math.pow(10,8),y=Math.pow(10,9),x=Math.pow(10,10);let C=Bv(this._depth,n.depth,i.depth);C=t?1-C:C;const I=NW(e.isSkippingLevelOfDetail||this.refine!==ea.REPLACE?Bv(this._priorityReverseScreenSpaceError,n.reverseScreenSpaceError,i.reverseScreenSpaceError):Bv(this._priorityHolder._distanceToCamera,n.distance,i.distance),4,0),P=this._priorityProgressiveResolution?0:m,R=NW(Bv(this._priorityHolder._foveatedFactor,n.foveatedFactor,i.foveatedFactor),4,4);this._priority=C+I+P+R+(this.priorityDeferred?y:0)+(e._pass===zs.PRELOAD_FLIGHT?0:x)},Bo.prototype.isDestroyed=function(){return!1},Bo.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),Xe(this)};const pg=Bo;function Sh(e){const t=(e=g(e,g.EMPTY_OBJECT)).id,n=e.group,i=e.class;A.typeOf.object("options.group",n),A.typeOf.object("options.class",i);const o=c(n.properties)?n.properties:{};this._class=i,this._properties=o,this._id=t,this._extras=n.extras,this._extensions=n.extensions}Object.defineProperties(Sh.prototype,{class:{get:function(){return this._class}},id:{get:function(){return this._id}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),Sh.prototype.hasProperty=function(e){return fi.hasProperty(e,this._properties,this._class)},Sh.prototype.hasPropertyBySemantic=function(e){return fi.hasPropertyBySemantic(e,this._properties,this._class)},Sh.prototype.getPropertyIds=function(e){return fi.getPropertyIds(this._properties,this._class,e)},Sh.prototype.getProperty=function(e){return fi.getProperty(e,this._properties,this._class)},Sh.prototype.setProperty=function(e,t){return fi.setProperty(e,t,this._properties,this._class)},Sh.prototype.getPropertyBySemantic=function(e){return fi.getPropertyBySemantic(e,this._properties,this._class)},Sh.prototype.setPropertyBySemantic=function(e,t){return fi.setPropertyBySemantic(e,t,this._properties,this._class)};const MW=Sh;function vh(e){const t=(e=g(e,g.EMPTY_OBJECT)).tileset,n=e.class;A.typeOf.object("options.tileset",t),A.typeOf.object("options.class",n);const i=c(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(vh.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),vh.prototype.hasProperty=function(e){return fi.hasProperty(e,this._properties,this._class)},vh.prototype.hasPropertyBySemantic=function(e){return fi.hasPropertyBySemantic(e,this._properties,this._class)},vh.prototype.getPropertyIds=function(e){return fi.getPropertyIds(this._properties,this._class,e)},vh.prototype.getProperty=function(e){return fi.getProperty(e,this._properties,this._class)},vh.prototype.setProperty=function(e,t){return fi.setProperty(e,t,this._properties,this._class)},vh.prototype.getPropertyBySemantic=function(e){return fi.getPropertyBySemantic(e,this._properties,this._class)},vh.prototype.setPropertyBySemantic=function(e,t){return fi.setPropertyBySemantic(e,t,this._properties,this._class)};const QRe=vh;function FW(e){const t=(e=g(e,g.EMPTY_OBJECT)).metadataJson,n=e.schema;A.typeOf.object("options.metadataJson",t),A.typeOf.object("options.schema",n);const i=g(t.metadata,t.tileset);let o;c(i)&&(o=new QRe({tileset:i,class:n.classes[i.class]}));let r=[];const s=[],a=t.groups;if(Array.isArray(a)){const l=a.length;for(let u=0;u<l;u++){const d=a[u];s.push(new MW({group:d,class:n.classes[d.class]}))}}else if(c(a)){r=Object.keys(a).sort();const l=r.length;for(let u=0;u<l;u++){const d=r[u];a.hasOwnProperty(d)&&s.push(new MW({id:d,group:a[d],class:n.classes[a[d].class]}))}}this._schema=n,this._groups=s,this._groupIds=r,this._tileset=o,this._statistics=t.statistics,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(FW.prototype,{schema:{get:function(){return this._schema}},groups:{get:function(){return this._groups}},groupIds:{get:function(){return this._groupIds}},tileset:{get:function(){return this._tileset}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});const JRe=FW,BW={},eLe=new f;BW.checkChildrenWithinParent=function(e){A.typeOf.object("tile",e);const t=e.children,n=t.length,i=e.boundingVolume;if(i instanceof hg||i instanceof Sx){const o=i._orientedBoundingBox;e._optimChildrenWithinParent=Z0.USE_OPTIMIZATION;for(let r=0;r<n;++r){const a=t[r].boundingVolume;if(!(a instanceof hg||a instanceof Sx)){e._optimChildrenWithinParent=Z0.SKIP_OPTIMIZATION;break}const l=a._orientedBoundingBox,u=f.subtract(l.center,o.center,eLe),d=f.magnitude(u);if(f.divideByScalar(u,d,u),Math.abs(o.halfAxes[0]*u.x)+Math.abs(o.halfAxes[1]*u.y)+Math.abs(o.halfAxes[2]*u.z)+Math.abs(o.halfAxes[3]*u.x)+Math.abs(o.halfAxes[4]*u.y)+Math.abs(o.halfAxes[5]*u.z)+Math.abs(o.halfAxes[6]*u.x)+Math.abs(o.halfAxes[7]*u.y)+Math.abs(o.halfAxes[8]*u.z)<=Math.abs(l.halfAxes[0]*u.x)+Math.abs(l.halfAxes[1]*u.y)+Math.abs(l.halfAxes[2]*u.z)+Math.abs(l.halfAxes[3]*u.x)+Math.abs(l.halfAxes[4]*u.y)+Math.abs(l.halfAxes[5]*u.z)+Math.abs(l.halfAxes[6]*u.x)+Math.abs(l.halfAxes[7]*u.y)+Math.abs(l.halfAxes[8]*u.z)+d){e._optimChildrenWithinParent=Z0.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===Z0.USE_OPTIMIZATION};const tLe=BW;function Dx(){this.head=void 0,this.tail=void 0,this._length=0}function nLe(e,t,n){this.item=e,this.previous=t,this.next=n}function kW(e,t){c(t.previous)&&c(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):c(t.previous)?(t.previous.next=void 0,e.tail=t.previous):c(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}Object.defineProperties(Dx.prototype,{length:{get:function(){return this._length}}}),Dx.prototype.add=function(e){const t=new nLe(e,this.tail,void 0);return c(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t},Dx.prototype.remove=function(e){c(e)&&(kW(this,e),--this._length)},Dx.prototype.splice=function(e,t){if(e===t)return;kW(this,t);const n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e};const iLe=Dx;function mg(){this._list=new iLe,this._sentinel=this._list.add(),this._trimTiles=!1}mg.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)},mg.prototype.touch=function(e){const t=e.cacheNode;c(t)&&this._list.splice(this._sentinel,t)},mg.prototype.add=function(e){c(e.cacheNode)||(e.cacheNode=this._list.add(e))},mg.prototype.unloadTile=function(e,t,n){const i=t.cacheNode;c(i)&&(this._list.remove(i),t.cacheNode=void 0,n(e,t))},mg.prototype.unloadTiles=function(e,t){const n=this._trimTiles;this._trimTiles=!1;const o=this._sentinel;let r=this._list.head;for(;r!==o&&(e.totalMemoryUsageInBytes>e.cacheBytes||n);){const s=r.item;r=r.next,this.unloadTile(e,s,t)}},mg.prototype.trim=function(){this._trimTiles=!0};const oLe=mg;function kv(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 DM(e,t){let n;return n="_loadTimestamp"===t?re.toDate(e).getTime():e,n}kv.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=DM(e,n),this._referenceMaximum[n]=DM(t,n)};const PM=[new Z(.1,.1,.1,1),new Z(.153,.278,.878,1),new Z(.827,.231,.49,1),new Z(.827,.188,.22,1),new Z(1,.592,.259,1),new Z(1,.843,0,1)];kv.prototype.colorize=function(e,t){if(!c(this.tilePropertyName)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;const i=function rLe(e,t){const n=e.tilePropertyName;if(c(n)){const i=DM(t[n],n);return c(i)?(e._maximum=Math.max(i,e._maximum),e._minimum=Math.min(i,e._minimum),i):(e.tilePropertyName=void 0,i)}}(this,e),o=this._previousMinimum,r=this._previousMaximum;if(o===Number.MAX_VALUE||r===-Number.MAX_VALUE)return;const s=r-o+O.EPSILON7,d=O.clamp(i-o,0,s)/s*(PM.length-1),h=Math.floor(d),m=Math.ceil(d),_=d-h,p=PM[h],y=PM[m],b=Z.clone(Z.WHITE);b.red=O.lerp(p.red,y.red,_),b.green=O.lerp(p.green,y.green,_),b.blue=O.lerp(p.blue,y.blue,_),e._debugColor=b},kv.prototype.resetMinimumMaximum=function(){const e=this.tilePropertyName;if(c(e)){const t=this._referenceMinimum[e],n=this._referenceMaximum[e],i=c(t)&&c(n);this._previousMinimum=i?t:this._minimum,this._previousMaximum=i?n:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}};const sLe=kv;function sb(){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}function Uv(e,t,n,i){const o=t.innerContents,r=t.pointsLength,s=t.trianglesLength,a=t.featuresLength,l=t.geometryByteLength,u=t.texturesByteLength,d=t.batchTableByteLength;if(i?(e.numberOfFeaturesLoaded+=n?-a:a,e.numberOfPointsLoaded+=n?-r:r,e.geometryByteLength+=n?-l:l,e.texturesByteLength+=n?-u:u,e.batchTableByteLength+=n?-d:d):(e.numberOfFeaturesSelected+=n?-a:a,e.numberOfPointsSelected+=n?-r:r,e.numberOfTrianglesSelected+=n?-s:s),c(o)){const h=o.length;for(let m=0;m<h;++m)Uv(e,o[m],n,i)}}sb.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},sb.prototype.incrementSelectionCounts=function(e){Uv(this,e,!1,!1)},sb.prototype.incrementLoadCounts=function(e){Uv(this,e,!1,!0)},sb.prototype.decrementLoadCounts=function(e){Uv(this,e,!0,!0)},sb.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.selected=e.selected,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.batchTableByteLength=e.batchTableByteLength};const Px=sb;function Ox(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(Ox.prototype,{style:{get:function(){return this._style},set:function(e){e!==this._style&&(this._style=e,this._styleDirty=!0)}}}),Ox.prototype.makeDirty=function(){this._styleDirty=!0},Ox.prototype.resetDirty=function(){this._styleDirty=!1},Ox.prototype.applyStyle=function(e){if(!c(e.root)||c(this._style)&&!this._style._ready)return;const t=this._styleDirty;t&&++this._lastStyleTime;const n=this._lastStyleTime,i=e._statistics,o=t?e._selectedTiles:e._selectedTilesToStyle,r=o.length;for(let s=0;s<r;++s){const a=o[s];if(a.lastStyleTime!==n){const l=a.content;a.lastStyleTime=n,l.applyStyle(this._style),i.numberOfFeaturesStyled+=l.featuresLength,++i.numberOfTilesStyled}}};const aLe=Ox,dLe=function cLe(e,t,n){const i=vr(t,"3DTILES_implicit_tiling")?t.extensions["3DTILES_implicit_tiling"]:t.implicitTiling;A.typeOf.object("implicitTiling",i),this.baseResource=e,this.geometricError=t.geometricError,this.metadataSchema=n;const o=t.boundingVolume;if(!(c(o.box)||c(o.region)||vr(o,"3DTILES_bounding_volume_S2")||vr(o,"3DTILES_bounding_volume_cylinder")))throw new Pe("Only box, region, 3DTILES_bounding_volume_S2, and 3DTILES_bounding_volume_cylinder are supported for implicit tiling");this.boundingVolume=o,this.refine=t.refine,this.subtreeUriTemplate=new zt({url:i.subtrees.uri}),this.contentUriTemplates=[],this.contentHeaders=[];const r=function lLe(e){if(vr(e,"3DTILES_multiple_contents")){const t=e.extensions["3DTILES_multiple_contents"];return c(t.contents)?t.contents:t.content}return c(e.contents)?e.contents:c(e.content)?[e.content]:[]}(t);for(let s=0;s<r.length;s++){const a=r[s];this.contentHeaders.push(Rt(a,!0));const l=new zt({url:a.uri});this.contentUriTemplates.push(l)}this.contentCount=this.contentHeaders.length,this.tileHeader=function uLe(e){const t=Rt(e,!0);return c(t.extensions)&&(delete t.extensions["3DTILES_implicit_tiling"],delete t.extensions["3DTILES_multiple_contents"],0===Object.keys(t.extensions).length&&delete t.extensions),delete t.implicitTiling,delete t.contents,delete t.content,t}(t),this.subdivisionScheme=es[i.subdivisionScheme],this.branchingFactor=es.getBranchingFactor(this.subdivisionScheme),this.subtreeLevels=i.subtreeLevels,this.availableLevels=c(i.availableLevels)?i.availableLevels:i.maximumLevel+1},Rx={};function UW(e){return 1431655765&((e=858993459&((e=252645135&((e=16711935&(e^e<<8))^e<<4))^e<<2))^e<<1)}function OM(e){return 153391689&((e=51130563&((e=50393103&((e=50331903&(e^e<<16))^e<<8))^e<<4))^e<<2)}function zW(e){return 65535&((e=16711935&((e=252645135&((e=858993459&((e&=1431655765)^e>>1))^e>>2))^e>>4))^e>>8)}function RM(e){return 1023&((e=4278190335&((e=50393103&((e=51130563&((e&=153391689)^e>>2))^e>>4))^e>>8))^e>>16)}Rx.encode2D=function(e,t){if(A.typeOf.number("x",e),A.typeOf.number("y",t),e<0||e>65535||t<0||t>65535)throw new E("inputs must be 16-bit unsigned integers");return(UW(e)|UW(t)<<1)>>>0},Rx.decode2D=function(e,t){if(A.typeOf.number("mortonIndex",e),e<0||e>4294967295)throw new E("input must be a 32-bit unsigned integer");return c(t)||(t=new Array(2)),t[0]=zW(e),t[1]=zW(e>>1),t},Rx.encode3D=function(e,t,n){if(A.typeOf.number("x",e),A.typeOf.number("y",t),A.typeOf.number("z",n),e<0||e>1023||t<0||t>1023||n<0||n>1023)throw new E("inputs must be 10-bit unsigned integers");return OM(e)|OM(t)<<1|OM(n)<<2},Rx.decode3D=function(e,t){if(A.typeOf.number("mortonIndex",e),e<0||e>1073741823)throw new E("input must be a 30-bit unsigned integer");return c(t)||(t=new Array(3)),t[0]=RM(e),t[1]=RM(e>>1),t[2]=RM(e>>2),t};const zv=Rx;function Po(e){if(A.typeOf.string("options.subdivisionScheme",e.subdivisionScheme),A.typeOf.number("options.subtreeLevels",e.subtreeLevels),A.typeOf.number("options.level",e.level),A.typeOf.number("options.x",e.x),A.typeOf.number("options.y",e.y),e.subdivisionScheme===es.OCTREE&&A.typeOf.number("options.z",e.z),e.level<0)throw new E("level must be non-negative");if(e.x<0)throw new E("x must be non-negative");if(e.y<0)throw new E("y must be non-negative");if(e.subdivisionScheme===es.OCTREE&&e.z<0)throw new E("z must be non-negative");const t=1<<e.level;if(e.x>=t)throw new E("x is out of range");if(e.y>=t)throw new E("y is out of range");if(e.subdivisionScheme===es.OCTREE&&e.z>=t)throw new E("z is out of range");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===es.OCTREE&&(this.z=e.z)}function LM(e,t){if(e.subdivisionScheme!==t.subdivisionScheme)throw new E("coordinates must have same subdivisionScheme");if(e.subtreeLevels!==t.subtreeLevels)throw new E("coordinates must have same subtreeLevels")}Object.defineProperties(Po.prototype,{childIndex:{get:function(){let e=0;return e|=1&this.x,e|=(1&this.y)<<1,this.subdivisionScheme===es.OCTREE&&(e|=(1&this.z)<<2),e}},mortonIndex:{get:function(){return this.subdivisionScheme===es.OCTREE?zv.encode3D(this.x,this.y,this.z):zv.encode2D(this.x,this.y)}},tileIndex:{get:function(){return(this.subdivisionScheme===es.OCTREE?((1<<3*this.level)-1)/7:((1<<2*this.level)-1)/3)+this.mortonIndex}}}),Po.prototype.getDescendantCoordinates=function(e){A.typeOf.object("offsetCoordinates",e),LM(this,e);const t=this.level+e.level,n=(this.x<<e.level)+e.x,i=(this.y<<e.level)+e.y;return new Po(this.subdivisionScheme===es.OCTREE?{subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:(this.z<<e.level)+e.z}:{subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})},Po.prototype.getAncestorCoordinates=function(e){if(A.typeOf.number("offsetLevels",e),e<0)throw new E("offsetLevels must be non-negative");if(e>this.level)throw new E("ancestor cannot be above the tileset root");const t=1<<e,n=this.level-e,i=Math.floor(this.x/t),o=Math.floor(this.y/t);if(this.subdivisionScheme===es.OCTREE){const r=Math.floor(this.z/t);return new Po({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o,z:r})}return new Po({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o})},Po.prototype.getOffsetCoordinates=function(e){if(A.typeOf.object("descendantCoordinates",e),!this.isEqual(e)&&!this.isAncestor(e))throw new E("this is not an ancestor of descendant");LM(this,e);const t=e.level-this.level,n=1<<t,i=e.x%n,o=e.y%n;return new Po(this.subdivisionScheme===es.OCTREE?{subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o,z:e.z%n}:{subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o})},Po.prototype.getChildCoordinates=function(e){A.typeOf.number("childIndex",e);const t=es.getBranchingFactor(this.subdivisionScheme);if(e<0||t<=e)throw new E(`childIndex must be at least 0 and less than ${t}`);const n=this.level+1,i=2*this.x+e%2,o=2*this.y+Math.floor(e/2)%2;if(this.subdivisionScheme===es.OCTREE){const r=2*this.z+Math.floor(e/4)%2;return new Po({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o,z:r})}return new Po({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o})},Po.prototype.getSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels)},Po.prototype.getParentSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels+this.subtreeLevels)},Po.prototype.isAncestor=function(e){A.typeOf.object("descendantCoordinates",e),LM(this,e);const t=e.level-this.level;if(t<=0)return!1;const o=this.x===e.x>>t,r=this.y===e.y>>t;return this.subdivisionScheme===es.OCTREE?o&&r&&this.z===e.z>>t:o&&r},Po.prototype.isEqual=function(e){return A.typeOf.object("otherCoordinates",e),this.subdivisionScheme===e.subdivisionScheme&&this.subtreeLevels===e.subtreeLevels&&this.level===e.level&&this.x===e.x&&this.y===e.y&&(this.subdivisionScheme!==es.OCTREE||this.z===e.z)},Po.prototype.isImplicitTilesetRoot=function(){return 0===this.level},Po.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels==0},Po.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels==this.subtreeLevels-1},Po.prototype.getTemplateValues=function(){const e={level:this.level,x:this.x,y:this.y};return this.subdivisionScheme===es.OCTREE&&(e.z=this.z),e};const VW=[0,0,0];Po.fromMortonIndex=function(e,t,n,i){let o;return e===es.OCTREE?(o=zv.decode3D(i,VW),new Po({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1],z:o[2]})):(o=zv.decode2D(i,VW),new Po({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1]}))},Po.fromTileIndex=function(e,t,n){let i,o,r;return e===es.OCTREE?(i=Math.floor(O.log2(7*n+1)/3),o=((1<<3*i)-1)/7,r=n-o):(i=Math.floor(O.log2(3*n+1)/2),o=((1<<2*i)-1)/3,r=n-o),Po.fromMortonIndex(e,t,i,r)};const fLe=Po;function Ih(){}function HW(e,t){if(e.updateVisibility(t),!e.isVisible)return;const n=e.children.length>0;if((e.hasTilesetContent||e.hasImplicitContent)&&n){const r=e.children[0];return HW(r,t),void(e._visible=r._visible)}if(!function pLe(e,t){const{parent:n,tileset:i}=e;return!(!c(n)||n.hasTilesetContent||n.hasImplicitContent||n.refine!==ea.ADD)&&e.getScreenSpaceError(t,!0)<=i.memoryAdjustedScreenSpaceError}(e,t))return e.refine===ea.REPLACE&&e._optimChildrenWithinParent===Z0.USE_OPTIMIZATION&&n&&!function mLe(e,t){let n=!1;const i=e.children;for(let o=0;o<i.length;++o){const r=i[o];r.updateVisibility(t),n=n||r.isVisible}return n}(e,t)?(++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion,void(e._visible=!1)):void 0;e._visible=!1}Ih.selectTiles=function(e,t){E.throwInstantiationError()},Ih.sortChildrenByDistanceToCamera=function(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera},Ih.canTraverse=function(e){return 0!==e.children.length&&(e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:e._screenSpaceError>e.tileset.memoryAdjustedScreenSpaceError)},Ih.selectTile=function(e,t){if(e.contentVisibility(t)===On.OUTSIDE)return;e._wasSelectedLastFrame=!0;const{content:n,tileset:i}=e;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,e.lastStyleTime=0,i._selectedTilesToStyle.push(e)):e._selectedFrame<t.frameNumber-1&&(i._selectedTilesToStyle.push(e),e._wasSelectedLastFrame=!1),e._selectedFrame=t.frameNumber,i._selectedTiles.push(e)},Ih.visitTile=function(e,t){++e.tileset._statistics.visited,e._visitedFrame=t.frameNumber},Ih.touchTile=function(e,t){e._touchedFrame!==t.frameNumber&&(e.tileset._cache.touch(e),e._touchedFrame=t.frameNumber)},Ih.loadTile=function(e,t){const{tileset:n}=e;e._requestedFrame!==t.frameNumber&&(e.hasUnloadedRenderableContent||e.contentExpired)&&function hLe(e,t){const{tileset:n}=e;if(!n._cullRequestsWhileMoving)return!0;const{positionWCDeltaMagnitude:i,positionWCDeltaMagnitudeLastFrame:o}=t.camera,r=0!==i?i:o,s=Math.max(2*e.boundingSphere.radius,1);return n.cullRequestsWhileMovingMultiplier*r/s<1}(e,t)&&(e.priorityDeferred&&t.camera.timeSinceMoved<n.foveatedTimeDelay||(e._requestedFrame=t.frameNumber,n._requestedTiles.push(e)))},Ih.updateTile=function(e,t){HW(e,t),e.updateExpiration(),e._wasMinPriorityChild=!1,e._priorityHolder=e,function _Le(e){const t=e.tileset._minimumPriority,n=e.tileset._maximumPriority,i=e._priorityHolder;n.distance=Math.max(i._distanceToCamera,n.distance),t.distance=Math.min(i._distanceToCamera,t.distance),n.depth=Math.max(e._depth,n.depth),t.depth=Math.min(e._depth,t.depth),n.foveatedFactor=Math.max(i._foveatedFactor,n.foveatedFactor),t.foveatedFactor=Math.min(i._foveatedFactor,t.foveatedFactor),n.reverseScreenSpaceError=Math.max(e._priorityReverseScreenSpaceError,n.reverseScreenSpaceError),t.reverseScreenSpaceError=Math.min(e._priorityReverseScreenSpaceError,t.reverseScreenSpaceError)}(e),e._shouldSelect=!1,e._finalResolution=!0};const ll=Ih;function GW(){}const Lx={stack:new xp,stackMaximumLength:0};function gLe(e){return 0!==e.children.length&&(!e.hasTilesetContent&&!e.hasImplicitContent||!e.contentExpired)}function yLe(e,t,n){const{children:i}=e;for(let o=0;o<i.length;++o){const r=i[o];r.updateVisibility(n),r.isVisible&&t.push(r)}}function bLe(e,t){(t.hasUnloadedRenderableContent||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function TLe(e,t){e.contentAvailable&&e.contentVisibility(t)!==On.OUTSIDE&&e.tileset._selectedTiles.push(e)}GW.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e.hasMixedContent=!1;let n=!0;const i=e.root;if(i.updateVisibility(t),!i.isVisible)return n;const{touchTile:o,visitTile:r}=ll,s=Lx.stack;for(s.push(i);s.length>0;){Lx.stackMaximumLength=Math.max(Lx.stackMaximumLength,s.length);const a=s.pop(),l=a.refine===ea.ADD,u=a.refine===ea.REPLACE,d=gLe(a);d&&yLe(a,s,t),(l||u&&!d)&&(bLe(e,a),o(a,t),TLe(a,t),a.hasRenderableContent&&!a.contentAvailable&&(n=!1)),r(a,t)}return Lx.stack.trim(Lx.stackMaximumLength),n};const ALe=GW;function jW(){}const Nx={stack:new xp,stackMaximumLength:0},Mx={stack:new xp,stackMaximumLength:0};function NM(e,t){e.contentAvailable&&ll.selectTile(e,t)}function xLe(e,t,n){const i=e.refine===ea.REPLACE,{tileset:o,children:r}=e,{updateTile:s,loadTile:a,touchTile:l}=ll;for(let p=0;p<r.length;++p)s(r[p],n);r.sort(ll.sortChildrenByDistanceToCamera);const u=i&&e.hasRenderableContent;let d=!0,h=!1,m=-1,_=Number.MAX_VALUE;for(let p=0;p<r.length;++p){const y=r[p];if(y.isVisible?(t.push(y),y._foveatedFactor<_&&(m=p,_=y._foveatedFactor),h=!0):(u||o.loadSiblings)&&(y._foveatedFactor<_&&(m=p,_=y._foveatedFactor),a(y,n),l(y,n)),u){let b;b=!!y._inRequestVolume&&(y.hasRenderableContent?y.contentAvailable:ELe(y,n)),d=d&&b}}if(h||(d=!1),-1!==m&&i){const p=r[m];p._wasMinPriorityChild=!0;const y=(e._wasMinPriorityChild||e===o.root)&&_<=e._priorityHolder._foveatedFactor?e._priorityHolder:e;y._foveatedFactor=Math.min(p._foveatedFactor,y._foveatedFactor),y._distanceToCamera=Math.min(p._distanceToCamera,y._distanceToCamera);for(let b=0;b<r.length;++b)r[b]._priorityHolder=y}return d}function ELe(e,t){const{canTraverse:n,updateTile:i,loadTile:o,touchTile:r}=ll;let s=!0;const a=Mx.stack;for(a.push(e);a.length>0;){Mx.stackMaximumLength=Math.max(Mx.stackMaximumLength,a.length);const l=a.pop(),u=l.children,d=u.length,h=!l.hasRenderableContent&&n(l);if(!h&&!l.contentAvailable&&(s=!1),i(l,t),l.isVisible||(o(l,t),r(l,t)),h)for(let m=0;m<d;++m)a.push(u[m])}return e.hasEmptyContent||s}jW.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;const n=e.root;if(ll.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;(function CLe(e,t){const{tileset:n}=e,{canTraverse:i,loadTile:o,visitTile:r,touchTile:s}=ll,a=Nx.stack;for(a.push(e);a.length>0;){Nx.stackMaximumLength=Math.max(Nx.stackMaximumLength,a.length);const l=a.pop(),u=l.parent,d=!c(u)||u._refines;l._refines=!!i(l)&&xLe(l,a,t)&&d;const h=!l._refines&&d;l.hasRenderableContent?l.refine===ea.ADD?(NM(l,t),o(l,t)):l.refine===ea.REPLACE&&(o(l,t),h&&NM(l,t)):(n._emptyTiles.push(l),o(l,t),h&&NM(l,t)),r(l,t),s(l,t)}})(n,t),Nx.stack.trim(Nx.stackMaximumLength),Mx.stack.trim(Mx.stackMaximumLength);const i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};const wLe=jW;function WW(){}const Fx={stack:new xp,stackMaximumLength:0},Bx={stack:new xp,stackMaximumLength:0},Dh={stack:new xp,stackMaximumLength:0,ancestorStack:new xp,ancestorStackMaximumLength:0};function Vv(e,t){const n=e.contentAvailable?e:e._ancestorWithContentAvailable;c(n)?n._shouldSelect=!0:function vLe(e,t){const{updateTile:n,touchTile:i,selectTile:o}=ll,r=Bx.stack;for(r.push(e);r.length>0;){Bx.stackMaximumLength=Math.max(Bx.stackMaximumLength,r.length);const a=r.pop().children;for(let l=0;l<a.length;++l){const u=a[l];u.isVisible&&(u.contentAvailable?(n(u,t),i(u,t),o(u,t)):u._depth-e._depth<2&&r.push(u))}}}(e,t)}function ILe(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;const{parent:n}=e;c(n)&&(e._ancestorWithContent=n.hasUnloadedRenderableContent&&n._requestedFrame!==t.frameNumber?n._ancestorWithContent:n,e._ancestorWithContentAvailable=n.contentAvailable?n:n._ancestorWithContentAvailable)}function DLe(e,t){const n=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||c(n)&&t._screenSpaceError<n._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>n._depth+e.skipLevels)}function PLe(e,t,n){const{tileset:i,children:o}=e,{updateTile:r,loadTile:s,touchTile:a}=ll;for(let u=0;u<o.length;++u)r(o[u],n);o.sort(ll.sortChildrenByDistanceToCamera);let l=!1;for(let u=0;u<o.length;++u){const d=o[u];d.isVisible?(t.push(d),l=!0):i.loadSiblings&&(s(d,n),a(d,n))}return l}function OLe(e,t){const{tileset:n}=e;return!n.immediatelyLoadDesiredLevelOfDetail&&(!c(e._ancestorWithContent)||(0===e._screenSpaceError?e.parent._screenSpaceError>t:e._screenSpaceError>t))}WW.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;const n=e.root;if(ll.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;(function RLe(e,t){const{tileset:n}=e,i=n.immediatelyLoadDesiredLevelOfDetail?Number.MAX_VALUE:Math.max(n.baseScreenSpaceError,n.memoryAdjustedScreenSpaceError),{canTraverse:o,loadTile:r,visitTile:s,touchTile:a}=ll,l=Fx.stack;for(l.push(e);l.length>0;){Fx.stackMaximumLength=Math.max(Fx.stackMaximumLength,l.length);const u=l.pop();ILe(u,t);const d=u.parent,h=!c(d)||d._refines;u._refines=!!o(u)&&PLe(u,l,t)&&h;const m=!u._refines&&h;u.hasRenderableContent?u.refine===ea.ADD?(Vv(u,t),r(u,t)):u.refine===ea.REPLACE&&(OLe(u,i)?(r(u,t),m&&Vv(u,t)):m?(Vv(u,t),r(u,t)):DLe(n,u)&&r(u,t)):(n._emptyTiles.push(u),r(u,t),m&&Vv(u,t)),s(u,t),a(u,t)}})(n,t),function LLe(e,t){const{selectTile:n,canTraverse:i}=ll,{stack:o,ancestorStack:r}=Dh;let s;for(o.push(e);o.length>0||r.length>0;){if(Dh.stackMaximumLength=Math.max(Dh.stackMaximumLength,o.length),Dh.ancestorStackMaximumLength=Math.max(Dh.ancestorStackMaximumLength,r.length),r.length>0){const u=r.peek();if(u._stackLength===o.length){r.pop(),u!==s&&(u._finalResolution=!1),n(u,t);continue}}const a=o.pop();if(!c(a))continue;const l=i(a);if(a._shouldSelect)if(a.refine===ea.ADD)n(a,t);else{if(a._selectionDepth=r.length,a._selectionDepth>0&&(a.tileset.hasMixedContent=!0),s=a,!l){n(a,t);continue}r.push(a),a._stackLength=o.length}if(l){const u=a.children;for(let d=0;d<u.length;++d){const h=u[d];h.isVisible&&o.push(h)}}}}(n,t),Fx.stack.trim(Fx.stackMaximumLength),Bx.stack.trim(Bx.stackMaximumLength),Dh.stack.trim(Dh.stackMaximumLength),Dh.ancestorStack.trim(Dh.ancestorStackMaximumLength);const i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};const NLe=WW;function Uo(e){e=g(e,g.EMPTY_OBJECT),this._url=void 0,this._basePath=void 0,this._root=void 0,this._resource=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._scaledGeometricError=void 0,this._extensionsUsed=void 0,this._extensions=void 0,this._modelUpAxis=void 0,this._modelForwardAxis=void 0,this._cache=new oLe,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._showCreditsOnScreen=g(e.showCreditsOnScreen,!1),this._cullWithChildrenBounds=g(e.cullWithChildrenBounds,!0),this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new xp,this._maximumScreenSpaceError=g(e.maximumScreenSpaceError,16),this._memoryAdjustedScreenSpaceError=this._maximumScreenSpaceError,this._cacheBytes=g(e.cacheBytes,536870912),A.typeOf.number.greaterThanOrEquals("cacheBytes",this._cacheBytes,0);const t=g(e.maximumCacheOverflowBytes,536870912);A.typeOf.number.greaterThanOrEquals("maximumCacheOverflowBytes",t,0),this._maximumCacheOverflowBytes=t,this._styleEngine=new aLe,this._styleApplied=!1,this._modelMatrix=c(e.modelMatrix)?k.clone(e.modelMatrix):k.clone(k.IDENTITY),this._addHeightCallbacks=[],this._statistics=new Px,this._statisticsLast=new Px,this._statisticsPerPass=new Array(zs.NUMBER_OF_PASSES);for(let o=0;o<zs.NUMBER_OF_PASSES;++o)this._statisticsPerPass[o]=new Px;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new sLe(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=g(e.cullRequestsWhileMoving,!0),this._cullRequestsWhileMoving=!1,this.cullRequestsWhileMovingMultiplier=g(e.cullRequestsWhileMovingMultiplier,60),this.progressiveResolutionHeightFraction=O.clamp(g(e.progressiveResolutionHeightFraction,.3),0,.5),this.preferLeaves=g(e.preferLeaves,!1),this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._classificationType=e.classificationType,this._ellipsoid=g(e.ellipsoid,he.WGS84),this._initialClippingPlanesOriginMatrix=k.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this._vectorClassificationOnly=g(e.vectorClassificationOnly,!1),this._vectorKeepDecodedPositions=g(e.vectorKeepDecodedPositions,!1),this.preloadWhenHidden=g(e.preloadWhenHidden,!1),this.preloadFlightDestinations=g(e.preloadFlightDestinations,!0),this._pass=void 0,this.dynamicScreenSpaceError=g(e.dynamicScreenSpaceError,!0),this.foveatedScreenSpaceError=g(e.foveatedScreenSpaceError,!0),this._foveatedConeSize=g(e.foveatedConeSize,.1),this._foveatedMinimumScreenSpaceErrorRelaxation=g(e.foveatedMinimumScreenSpaceErrorRelaxation,0),this.foveatedInterpolationCallback=g(e.foveatedInterpolationCallback,O.lerp),this.foveatedTimeDelay=g(e.foveatedTimeDelay,.2),this.dynamicScreenSpaceErrorDensity=g(e.dynamicScreenSpaceErrorDensity,2e-4),this.dynamicScreenSpaceErrorFactor=g(e.dynamicScreenSpaceErrorFactor,24),this.dynamicScreenSpaceErrorHeightFalloff=g(e.dynamicScreenSpaceErrorHeightFalloff,.25),this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=g(e.shadows,Ko.ENABLED),this.show=g(e.show,!0),this.colorBlendMode=lS.HIGHLIGHT,this.colorBlendAmount=.5,this._pointCloudShading=new ev(e.pointCloudShading),this._pointCloudEyeDomeLighting=new jL,this.loadProgress=new Ye,this.allTilesLoaded=new Ye,this.initialTilesLoaded=new Ye,this.tileLoad=new Ye,this.tileUnload=new Ye,this.tileFailed=new Ye,this.tileVisible=new Ye,this.skipLevelOfDetail=g(e.skipLevelOfDetail,!1),this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=g(e.baseScreenSpaceError,1024),this.skipScreenSpaceErrorFactor=g(e.skipScreenSpaceErrorFactor,16),this.skipLevels=g(e.skipLevels,1),this.immediatelyLoadDesiredLevelOfDetail=g(e.immediatelyLoadDesiredLevelOfDetail,!1),this.loadSiblings=g(e.loadSiblings,!1),this._clippingPlanes=void 0,c(e.clippingPlanes)&&Gu.setOwner(e.clippingPlanes,this,"_clippingPlanes"),this._clippingPolygons=void 0,c(e.clippingPolygons)&&zA.setOwner(e.clippingPolygons,this,"_clippingPolygons"),c(e.imageBasedLighting)?(this._imageBasedLighting=e.imageBasedLighting,this._shouldDestroyImageBasedLighting=!1):(this._imageBasedLighting=new Q4,this._shouldDestroyImageBasedLighting=!0),this.lightColor=e.lightColor,this.backFaceCulling=g(e.backFaceCulling,!0),this._enableShowOutline=g(e.enableShowOutline,!0),this.showOutline=g(e.showOutline,!0),this.outlineColor=g(e.outlineColor,Z.BLACK),this.splitDirection=g(e.splitDirection,$_.NONE),this.enableCollision=g(e.enableCollision,!1),this._projectTo2D=g(e.projectTo2D,!1),this._enablePick=g(e.enablePick,!1),this.debugFreezeFrame=g(e.debugFreezeFrame,!1),this.debugColorizeTiles=g(e.debugColorizeTiles,!1),this._enableDebugWireframe=g(e.enableDebugWireframe,!1),this.debugWireframe=g(e.debugWireframe,!1),!0===this.debugWireframe&&!1===this._enableDebugWireframe&&_n("tileset-debug-wireframe-ignored","enableDebugWireframe must be set to true in the Cesium3DTileset constructor, otherwise debugWireframe will be ignored."),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowContentBoundingVolume=g(e.debugShowContentBoundingVolume,!1),this.debugShowViewerRequestVolume=g(e.debugShowViewerRequestVolume,!1),this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=g(e.debugShowGeometricError,!1),this.debugShowRenderingStatistics=g(e.debugShowRenderingStatistics,!1),this.debugShowMemoryUsage=g(e.debugShowMemoryUsage,!1),this.debugShowUrl=g(e.debugShowUrl,!1),this.examineVectorLinesFunction=void 0,this._metadataExtension=void 0,this._customShader=e.customShader;let n=g(e.featureIdLabel,"featureId_0");"number"==typeof n&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=g(e.instanceFeatureIdLabel,"instanceFeatureId_0");"number"==typeof i&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i}function qW(e,t,n,i){if(!c(n.implicitTiling)&&!vr(n,"3DTILES_implicit_tiling"))return new pg(e,t,n,i);const s=new dLe(t,n,e.schema),a=new fLe({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:0,x:0,y:0,z:0}),l=s.subtreeUriTemplate.getDerivedResource({templateValues:a.getTemplateValues()}).url,d=Rt(n,!0);d.contents=[{uri:l}],delete d.content,delete d.extensions;const h=new pg(e,t,d,i);return h.implicitTileset=s,h.implicitCoordinates=a,h}function MM(){return(MM=(0,we.Z)(function*(e,t){const n=vr(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t;let i;if(c(n.schemaUri))e=e.getDerivedResource({url:n.schemaUri}),i=Ir.getSchemaLoader({resource:e});else{if(!c(n.schema))return;i=Ir.getSchemaLoader({schema:n.schema})}yield i.load();const o=new JRe({schema:i.schema,metadataJson:n});return Ir.unload(i),o})).apply(this,arguments)}Object.defineProperties(Uo.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){return this._asset}},extensions:{get:function(){return this._extensions}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){Gu.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){zA.setOwner(e,this,"_clippingPolygons")}},properties:{get:function(){return this._properties}},tilesLoaded:{get:function(){return this._tilesLoaded}},resource:{get:function(){return this._resource}},basePath:{get:function(){return Ud("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},customShader:{get:function(){return this._customShader},set:function(e){this._customShader=e}},hasMixedContent:{get:function(){return this._hasMixedContent},set:function(e){A.typeOf.bool("value",e),this._hasMixedContent=e}},isSkippingLevelOfDetail:{get:function(){return this.skipLevelOfDetail&&!c(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive}},metadataExtension:{get:function(){return this._metadataExtension}},metadata:{get:function(){if(c(this._metadataExtension))return this._metadataExtension.tileset}},schema:{get:function(){if(c(this._metadataExtension))return this._metadataExtension.schema}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){A.typeOf.number.greaterThanOrEquals("maximumScreenSpaceError",e,0),this._maximumScreenSpaceError=e,this._memoryAdjustedScreenSpaceError=e}},cacheBytes:{get:function(){return this._cacheBytes},set:function(e){A.typeOf.number.greaterThanOrEquals("value",e,0),this._cacheBytes=e}},maximumCacheOverflowBytes:{get:function(){return this._maximumCacheOverflowBytes},set:function(e){A.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumCacheOverflowBytes=e}},memoryAdjustedScreenSpaceError:{get:function(){return this._memoryAdjustedScreenSpaceError}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){A.defined("pointCloudShading",e),this._pointCloudShading=e}},root:{get:function(){return this._root}},boundingSphere:{get:function(){return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=k.clone(e,this._modelMatrix)}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){const e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return c(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(k.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):k.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){A.typeOf.number.greaterThanOrEquals("foveatedConeSize",e,0),A.typeOf.number.lessThanOrEquals("foveatedConeSize",e,1),this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){A.typeOf.number.greaterThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,0),A.typeOf.number.lessThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,this.maximumScreenSpaceError),this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){return this._extras}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){A.typeOf.object("imageBasedLighting",this._imageBasedLighting),e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1)}},vectorClassificationOnly:{get:function(){return this._vectorClassificationOnly}},vectorKeepDecodedPositions:{get:function(){return this._vectorKeepDecodedPositions}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen=e,JW(this)}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){"number"==typeof e&&(e=`featureId_${e}`),A.typeOf.string("value",e),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){"number"==typeof e&&(e=`instanceFeatureId_${e}`),A.typeOf.string("value",e),this._instanceFeatureIdLabel=e}}}),Uo.fromIonAssetId=function(){var e=(0,we.Z)(function*(t,n){A.defined("assetId",t);const i=yield cA.fromAssetId(t);return Uo.fromUrl(i,n)});return function(t,n){return e.apply(this,arguments)}}(),Uo.fromUrl=function(){var e=(0,we.Z)(function*(t,n){A.defined("url",t),n=g(n,g.EMPTY_OBJECT);const i=zt.createIfNeeded(t);let o;"json"===i.extension?o=i.getBaseUri(!0):i.isDataUri&&(o="");const r=yield Uo.loadJson(i),s=yield function MLe(e,t){return MM.apply(this,arguments)}(i,r),a=new Uo(n);a._resource=i,a._url=i.url,a._basePath=o,a._metadataExtension=s,a._geometricError=r.geometricError,a._scaledGeometricError=r.geometricError,a._asset=r.asset,a._extras=r.extras,JW(a);const u=c(r.asset.gltfUpAxis)?Ms.fromName(r.asset.gltfUpAxis):Ms.Y,d=g(n.modelUpAxis,u),h=g(n.modelForwardAxis,Ms.X);a._properties=r.properties,a._extensionsUsed=r.extensionsUsed,a._extensions=r.extensions,a._modelUpAxis=d,a._modelForwardAxis=h,a._root=a.loadTileset(i,r);const _=a._root.createBoundingVolume(r.root.boundingVolume,k.IDENTITY).boundingSphere.center,p=a._ellipsoid.cartesianToCartographic(_);return c(p)&&p.height>vo._defaultMinTerrainHeight&&(a._initialClippingPlanesOriginMatrix=In.eastNorthUpToFixedFrame(_)),a._clippingPlanesOriginMatrix=k.clone(a._initialClippingPlanesOriginMatrix),a});return function(t,n){return e.apply(this,arguments)}}(),Uo.loadJson=function(e){return zt.createIfNeeded(e).fetchJson()},Uo.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()},Uo.prototype.loadTileset=function(e,t,n){const i=t.asset;if(!c(i))throw new Pe("Tileset must have an asset property.");if("0.0"!==i.version&&"1.0"!==i.version&&"1.1"!==i.version)throw new Pe("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");c(t.extensionsRequired)&&Uo.checkSupportedExtensions(t.extensionsRequired);const o=this._statistics,r=i.tilesetVersion;c(r)&&(this._basePath+=`?v=${r}`,(e=e.clone()).setQueryParameters({v:r}));const s=qW(this,e,t.root,n);c(n)&&(n.children.push(s),s._depth=n._depth+1);const a=[];for(a.push(s);a.length>0;){const l=a.pop();++o.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&l.refine===ea.ADD;const u=l._header.children;if(c(u))for(let d=0;d<u.length;++d){const m=qW(this,e,u[d],l);l.children.push(m),m._depth=l._depth+1,a.push(m)}this._cullWithChildrenBounds&&tLe.checkChildrenWithinParent(l)}return s};const YW=new f,FLe=new Ce,BLe=new k,kLe=new f,ULe=new f,zLe=new f,VLe=new f;function GLe(e,t){if(t.hasEmptyContent)return;const{statistics:n}=e,i=t.contentExpired,o=t.requestContent();c(o)&&(o.then(r=>{!c(r)||t.isDestroyed()||e.isDestroyed()||(e._processingQueue.push(t),++n.numberOfTilesProcessing)}).catch(r=>{ZW(r,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?function iNe(e,t){const n=t,i=KW;for(i.push(t);i.length>0;){const o=(t=i.pop()).children;for(let r=0;r<o.length;++r)i.push(o[r]);t!==n&&(oNe(e,t),--e._statistics.numberOfTilesTotal)}n.children=[]}(e,t):(n.decrementLoadCounts(t.content),--n.numberOfTilesWithContentReady)),e._requestedTilesInFlight.push(t))}function XW(e,t){return e._priority-t._priority}function ZW(e,t,n){if(t.isDestroyed())return;let i;n.isDestroyed()||(i=n._contentResource.url);const o=c(e.message)?e.message:e.toString();t.tileFailed.numberOfListeners>0?t.tileFailed.raiseEvent({url:i,message:o}):(console.log(`A 3D tile failed to load: ${i}`),console.log(`Error: ${o}`))}Uo.prototype.postPassesUpdate=function(e){c(this._root)&&(function jLe(e,t){const n=e._requestedTilesInFlight;let i=0;for(let o=0;o<n.length;++o){const r=n[o];r._contentState===Or.LOADING?t.frameNumber-r._touchedFrame>=1?(r.cancelRequests(),++i):i>0&&(n[o-i]=r):++i}n.length-=i}(this,e),function rNe(e,t){const n=e._statistics,i=e._statisticsLast,o=n.numberOfPendingRequests,r=n.numberOfTilesProcessing,s=i.numberOfPendingRequests,a=i.numberOfTilesProcessing;Px.clone(n,i);const l=o!==s||r!==a;l&&t.afterRender.push(function(){return e.loadProgress.raiseEvent(o,r),!0}),e._tilesLoaded=0===n.numberOfPendingRequests&&0===n.numberOfTilesProcessing&&0===n.numberOfAttemptedRequests,l&&e._tilesLoaded&&(t.afterRender.push(function(){return e.allTilesLoaded.raiseEvent(),!0}),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push(function(){return e.initialTilesLoaded.raiseEvent(),!0})))}(this,e),this._cache.unloadTiles(this,QW),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)},Uo.prototype.prePassesUpdate=function(e){if(!c(this._root))return;!function KLe(e,t){!function qLe(e){const t=e._processingQueue;let n=0;for(let i=0;i<t.length;++i){const o=t[i];o.isDestroyed()||o._contentState!==Or.PROCESSING?++n:n>0&&(t[i-n]=o)}t.length-=n}(e);const n=e._processingQueue,{cacheBytes:i,maximumCacheOverflowBytes:o,statistics:r}=e,s=i+o;let a=!1;for(let l=0;l<n.length;++l){if(e.totalMemoryUsageInBytes>s){a=!0;break}const u=n[l];try{u.process(e,t),u.contentReady&&(--r.numberOfTilesProcessing,e.tileLoad.raiseEvent(u))}catch(d){--r.numberOfTilesProcessing,ZW(d,e,u)}}e.totalMemoryUsageInBytes<i?function JLe(e){e._memoryAdjustedScreenSpaceError=Math.max(e.memoryAdjustedScreenSpaceError/1.02,e.maximumScreenSpaceError)}(e):a&&n.length>0&&function QLe(e){_n("increase-screenSpaceError","The tiles needed to meet maximumScreenSpaceError would use more memory than allocated for this tileset.\n The tileset will be rendered with a larger screen space error (see memoryAdjustedScreenSpaceError).\n Consider using larger values for cacheBytes and maximumCacheOverflowBytes."),e._memoryAdjustedScreenSpaceError*=1.02;const t=e._processingQueue;for(let n=0;n<t.length;++n)t[n].updatePriority();t.sort(XW)}(e)}(this,e);const t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,c(t)&&t.enabled&&t.update(e);const n=this._clippingPolygons;c(n)&&n.enabled&&n.update(e),c(this._loadTimestamp)||(this._loadTimestamp=re.clone(e.time)),this._timeSinceLoad=Math.max(1e3*re.secondsDifference(e.time,this._loadTimestamp),0),this.dynamicScreenSpaceError&&function HLe(e,t){let n,i,o,r,s;const a=t.camera,l=e._root,u=l.contentBoundingVolume;if(u instanceof Sx)n=f.normalize(a.positionWC,YW),i=a.directionWC,o=a.positionCartographic.height,r=u.minimumHeight,s=u.maximumHeight;else{const y=k.inverseTransformation(l.computedTransform,BLe),b=t.mapProjection.ellipsoid,x=u.boundingVolume,C=k.multiplyByPoint(y,x.center,kLe);if(f.magnitude(C)>b.minimumRadius){const w=Ce.fromCartesian(C,b,FLe);n=f.normalize(a.positionWC,YW),i=a.directionWC,o=a.positionCartographic.height,r=0,s=2*w.height}else{const w=k.multiplyByPoint(y,a.positionWC,ULe);if(n=f.UNIT_Z,i=k.multiplyByPointAsVector(y,a.directionWC,zLe),i=f.normalize(i,i),o=w.z,u instanceof hg){const v=oe.getColumn(x.halfAxes,2,VLe),I=f.magnitude(v);r=C.z-I,s=C.z+I}else if(u instanceof Mv){const v=x.radius;r=C.z-v,s=C.z+v}}}const h=r+(s-r)*e.dynamicScreenSpaceErrorHeightFalloff,_=O.clamp((o-h)/(s-h),0,1);let p=1-Math.abs(f.dot(i,n));p*=1-_,e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*p}(this,e),e.newFrame&&this._cache.reset()};const YLe=new Ce,XLe=new Ce,ZLe=new f;function $Le(e,t,n){if(!e.enableCollision||!e.show)return;const i=e._addHeightCallbacks,o=t.boundingSphere;for(const r of i){if(r.invoked||t._wasSelectedLastFrame)continue;const s=r.ellipsoid,a=Ce.clone(r.positionCartographic,YLe),l=Ce.fromCartesian(o.center,s,XLe);c(l)&&(a.height=l.height);const u=Ce.toCartesian(a,s,ZLe);f.distance(u,o.center)<=o.radius&&n.afterRender.push(()=>{c(r.callback)&&r.callback(a),r.invoked=!1})}}const Hv=new f,eNe={maximumFractionDigits:3};function $W(e){const t=e/1048576;return t<1?t.toLocaleString(void 0,eNe):Math.round(t).toLocaleString()}function FM(e){const{halfAxes:t,radius:n,center:i}=e.boundingVolume.boundingVolume;let o=f.clone(i,Hv);if(c(t))o.x+=.75*(t[0]+t[3]+t[6]),o.y+=.75*(t[1]+t[4]+t[7]),o.z+=.75*(t[2]+t[5]+t[8]);else if(c(n)){let r=f.normalize(i,Hv);r=f.multiplyByScalar(r,.75*n,Hv),o=f.add(r,i,Hv)}return o}function BM(e,t,n){let i="",o=0;if(t.debugShowGeometricError&&(i+=`\nGeometric error: ${e.geometricError}`,o++),t.debugShowRenderingStatistics&&(i+=`\nCommands: ${e.commandsLength}`,o++,e.content.pointsLength>0&&(i+=`\nPoints: ${e.content.pointsLength}`,o++),e.content.trianglesLength>0&&(i+=`\nTriangles: ${e.content.trianglesLength}`,o++),i+=`\nFeatures: ${e.content.featuresLength}`,o++),t.debugShowMemoryUsage&&(i+=`\nTexture Memory: ${$W(e.content.texturesByteLength)}`,i+=`\nGeometry Memory: ${$W(e.content.geometryByteLength)}`,o+=2),t.debugShowUrl)if(e.hasMultipleContents){i+="\nUrls:";const s=e.content.innerContentUrls;for(let a=0;a<s.length;a++)i+=`\n- ${s[a]}`;o+=s.length}else i+=`\nUrl: ${e._contentHeader.uri}`,o++;const r={text:i.substring(1),position:n,font:19-o+"px sans-serif",showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(r)}const KW=[];function QW(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function oNe(e,t){e._cache.unloadTile(e,t,QW),t.destroy()}function cNe(e,t,n,i){if(t.mode===ce.MORPHING||!c(e._root))return!1;const o=e._statistics;o.clear(),++e._updatedVisibilityFrame,function sNe(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}(e),function aNe(e,t){t.frameNumber===e._updatedModelMatrixFrame&&c(e._previousModelMatrix)||(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!k.equals(e.modelMatrix,e._previousModelMatrix),e._modelMatrixChanged&&(e._previousModelMatrix=k.clone(e.modelMatrix,e._previousModelMatrix)))}(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;const r=e.getTraversal(i).selectTiles(e,t);if(i.requestTiles&&function WLe(e){const t=e._requestedTiles;t.sort(XW);for(let n=0;n<t.length;++n)GLe(e,t[n])}(e),function nNe(e,t,n){e._styleEngine.applyStyle(e),e._styleApplied=!0;const{commandList:i,context:o}=t,r=i.length,s=e._selectedTiles,a=e.isSkippingLevelOfDetail&&e._hasMixedContent&&o.stencilBuffer&&s.length>0;e._backfaceCommands.length=0,a&&(c(e._stencilClearCommand)||(e._stencilClearCommand=new ar({stencil:0,pass:Ue.CESIUM_3D_TILE,renderState:Lt.fromCache({stencilMask:xn.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));const{statistics:l,tileVisible:u}=e,d=n.isRender,h=i.length;for(let p=0;p<s.length;++p){const y=s[p];d&&u.raiseEvent(y),$Le(e,y,t),y.update(e,t,n),l.incrementSelectionCounts(y.content),++l.selected}const m=e._emptyTiles;for(let p=0;p<m.length;++p)m[p].update(e,t,n);let _=i.length-h;if(e._backfaceCommands.trim(),a){const p=e._backfaceCommands.values,y=p.length;i.length+=y;for(let b=_-1;b>=0;--b)i[h+y+b]=i[h+b];for(let b=0;b<y;++b)i[h+b]=p[b]}_=i.length-r,l.numberOfCommands=_,d&&(e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&_>0&&e._pointCloudEyeDomeLighting.update(t,r,e.pointCloudShading,e.boundingSphere),e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(c(e._tileDebugLabels)||(e._tileDebugLabels=new xv),function tNe(e,t){const n=e._selectedTiles,i=n.length,o=e._emptyTiles,r=o.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(c(e.debugPickedTile)){const s=c(e.debugPickPosition)?e.debugPickPosition:FM(e.debugPickedTile);BM(e.debugPickedTile,e,s).pixelOffset=new V(15,-15)}}else{for(let s=0;s<i;++s){const a=n[s];BM(a,e,FM(a))}for(let s=0;s<r;++s){const a=o[s];(a.hasTilesetContent||a.hasImplicitContent)&&BM(a,e,FM(a))}}e._tileDebugLabels.update(t)}(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}(e,t,i),Px.clone(o,n),i.isRender){const s=e._credits;if(c(s)&&0!==o.selected)for(let a=0;a<s.length;++a)t.creditDisplay.addCreditToNextFrame(s[a])}return r}function JW(e){let t=e._credits;c(t)||(t=[]),t.length=0,c(e.resource.credits)&&e.resource.credits.forEach(i=>{t.push(Yn.clone(i))});const n=e.asset.extras;if(c(n)&&c(n.cesium)&&c(n.cesium.credits)){const i=n.cesium.credits;for(let o=0;o<i.length;++o)t.push(new Yn(i[o].html))}t.forEach(i=>i.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}Uo.prototype.trimLoadedTiles=function(){this._cache.trim()},Uo.prototype.getTraversal=function(e){const{pass:t}=e;return t===zs.MOST_DETAILED_PRELOAD||t===zs.MOST_DETAILED_PICK?ALe:this.isSkippingLevelOfDetail?NLe:wLe},Uo.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)},Uo.prototype.updateForPass=function(e,t){A.typeOf.object("frameState",e),A.typeOf.object("tilesetPassState",t);const n=t.pass;if(n===zs.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===zs.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===zs.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))return;const i=e.commandList,o=e.camera,r=e.cullingVolume;t.ready=!1;const s=zs.getPassOptions(n),a=s.ignoreCommands,l=g(t.commandList,i),u=l.length;e.commandList=l,e.camera=g(t.camera,o),e.cullingVolume=g(t.cullingVolume,r);const d=this._clippingPolygons;c(d)&&d.enabled&&d.queueCommands(e);const h=this._statisticsPerPass[n];(this.show||a)&&(this._pass=n,t.ready=cNe(this,e,h,s)),a&&(l.length=u),e.commandList=i,e.camera=o,e.cullingVolume=r},Uo.prototype.hasExtension=function(e){return!!c(this._extensionsUsed)&&this._extensionsUsed.indexOf(e)>-1},Uo.prototype.isDestroyed=function(){return!1},Uo.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(),c(this._root)){const e=KW;for(e.push(this._root);e.length>0;){const t=e.pop();t.destroy();const n=t.children;for(let i=0;i<n.length;++i)e.push(n[i])}}return this._root=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0,Xe(this)},Uo.supportedExtensions={"3DTILES_metadata":!0,"3DTILES_implicit_tiling":!0,"3DTILES_content_gltf":!0,"3DTILES_multiple_contents":!0,"3DTILES_bounding_volume_S2":!0,"3DTILES_batch_table_hierarchy":!0,"3DTILES_draco_point_compression":!0,MAXAR_content_geojson:!0},Uo.checkSupportedExtensions=function(e){for(let t=0;t<e.length;t++)if(!Uo.supportedExtensions[e[t]])throw new Pe(`Unsupported 3D Tiles Extension: ${e[t]}`)};const lNe=new ii,uNe=new f,dNe=new Ce;Uo.prototype.getHeight=function(e,t){A.typeOf.object("cartographic",e),A.typeOf.object("scene",t);let n=t.ellipsoid;c(n)||(n=he.WGS84);const i=lNe,o=n.cartographicToCartesian(e,i.direction);f.normalize(i.direction,i.direction),i.direction=f.normalize(o,i.direction),i.direction=f.negate(o,i.direction),i.origin=f.multiplyByScalar(i.direction,-2*n.maximumRadius,i.origin);const r=this.pick(i,t.frameState,uNe);if(c(r))return n.cartesianToCartographic(r,dNe)?.height},Uo.prototype.updateHeight=function(e,t,n){const i={positionCartographic:e,ellipsoid:n=g(n,he.WGS84),callback:t,invoked:!1};return this._addHeightCallbacks.push(i),()=>{const r=this._addHeightCallbacks,s=r.length;for(let a=0;a<s;++a)if(r[a]===i){r.splice(a,1);break}i.callback&&(i.callback=void 0)}};const fNe=new Vf,hNe=new f;Uo.prototype.pick=function(e,t,n){if(!t.context.webgl2&&!this._enablePick)return;const i=this._selectedTiles,o=i.length,r=[];for(let l=0;l<o;++l){const u=i[l],d=So.raySphere(e,u.contentBoundingVolume.boundingSphere,fNe);!c(d)||!c(u.content)||r.push(u)}const s=r.length;let a;r.sort((l,u)=>Ae.distanceSquaredTo(l.contentBoundingVolume.boundingSphere,e.origin)-Ae.distanceSquaredTo(u.contentBoundingVolume.boundingSphere,e.origin));for(let l=0;l<s;++l){const d=r[l].content.pick(e,t,hNe);if(c(d))return a=f.clone(d,n),a}};const _g=Uo;function ed(){}function kM(){return(kM=(0,we.Z)(function*(){if(yield ed._decodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}))return ed._decodeTaskProcessor;throw new Pe("I3S decoder could not be initialized.")})).apply(this,arguments)}ed._maxDecodingConcurrency=Math.max(Hn.hardwareConcurrency-1,1),ed._decodeTaskProcessor=new ba("decodeI3S",ed._maxDecodingConcurrency),ed._promise=void 0,ed.decode=function(){var e=(0,we.Z)(function*(t,n,i,o,r){return A.typeOf.string("url",t),A.defined("defaultGeometrySchema",n),A.defined("geometryData",i),c(ed._promise)||(ed._promise=function pNe(){return kM.apply(this,arguments)}()),ed._promise.then(function(s){const a=i._parent._data,l=i._parent._inverseRotationMatrix;let u=0,d=0,h=0;c(a.obb)?(u=a.obb.center[0],d=a.obb.center[1],h=a.obb.center[2]):c(a.mbs)&&(u=a.mbs[0],d=a.mbs[1],h=a.mbs[2]);const m=oe.fromRotationX(-O.PI_OVER_TWO),_=new oe;oe.multiply(m,l,_);const p=Ce.fromDegrees(u,d,h),y=he.WGS84.cartographicToCartesian(p),b={binaryData:i._data,featureData:c(o)&&c(o[0])?o[0].data:void 0,schema:n,bufferInfo:i._geometryBufferInfo,ellipsoidRadiiSquare:he.WGS84.radiiSquared,url:t,geoidDataList:i._dataProvider._geoidDataList,cartographicCenter:p,cartesianCenter:y,parentRotation:_,enableFeatures:i._dataProvider.showFeatures,splitGeometryByColorTransparency:i._dataProvider.adjustMaterialAlphaMode,symbologyData:r,calculateNormals:i._dataProvider.calculateNormals};return s.scheduleTask(b)})});return function(t,n,i,o,r){return e.apply(this,arguments)}}();const mNe=ed;function UM(e,t){this._parent=e,this._dataProvider=e._dataProvider,this._layer=e._layer,this._resource=c(this._parent._nodeIndex)?this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${t}`}):this._parent.resource.getDerivedResource({url:t})}Object.defineProperties(UM.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}}),UM.prototype.load=(0,we.Z)(function*(){return this._data=yield cb.loadJson(this._resource),this._data});const _Ne=UM;function Ph(e,t){this._storageInfo=t,this._parent=e,this._dataProvider=e._dataProvider,this._loadPromise=void 0;const n=`attributes/${t.key}/0`;this._resource=c(this._parent._nodeIndex)?this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${n}`}):this._parent.resource.getDerivedResource({url:n})}function Gv(e){return"UInt8"===e||"Int8"===e?1:"UInt16"===e||"Int16"===e?2:"UInt32"===e||"Int32"===e||"Oid32"===e||"Float32"===e?4:"UInt64"===e||"Int64"===e||"Float64"===e?8:0}function gNe(e){return"String"===e?1:Gv(e)}function zM(){return(zM=(0,we.Z)(function*(e){const t=yield e._dataProvider._loadBinary(e._resource),n=new DataView(t);e._data=t,e._validateHeader(n);const i=e._parseHeader(n),o=e._getBodyOffset(i);e._validateBody(n,o),e._parseBody(n,o)})).apply(this,arguments)}Object.defineProperties(Ph.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){if(c(this._values)){if(c(this._values.attributeValues))return this._values.attributeValues;if(c(this._values.objectIds))return this._values.objectIds}return[]}},name:{get:function(){return this._storageInfo.name}}}),Ph.prototype.load=function(){return c(this._loadPromise)||(this._loadPromise=function yNe(e){return zM.apply(this,arguments)}(this).catch(function(e){console.error(e)})),this._loadPromise},Ph.prototype._parseValue=function(e,t,n){let i;if("UInt8"===t)i=e.getUint8(n),n+=1;else if("Int8"===t)i=e.getInt8(n),n+=1;else if("UInt16"===t)i=e.getUint16(n,!0),n+=2;else if("Int16"===t)i=e.getInt16(n,!0),n+=2;else if("UInt32"===t)i=e.getUint32(n,!0),n+=4;else if("Oid32"===t)i=e.getUint32(n,!0),n+=4;else if("Int32"===t)i=e.getInt32(n,!0),n+=4;else if("UInt64"===t){const o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=o+Math.pow(2,32)*r,n+=8}else if("Int64"===t){const o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=r<Math.pow(2,31)?o+Math.pow(2,32)*r:o+Math.pow(2,32)*(r-Math.pow(2,32)),n+=8}else"Float32"===t?(i=e.getFloat32(n,!0),n+=4):"Float64"===t?(i=e.getFloat64(n,!0),n+=8):"String"===t&&(i=String.fromCharCode(e.getUint8(n)),n+=1);return{value:i,offset:n}},Ph.prototype._parseHeader=function(e){let t=0;this._header={};for(let n=0;n<this._storageInfo.header.length;n++){const i=this._storageInfo.header[n],o=this._parseValue(e,i.valueType,t);this._header[i.property]=o.value,t=o.offset}return t},Ph.prototype._parseBody=function(e,t){this._values={};for(let n=0;n<this._storageInfo.ordering.length;n++){const i=this._storageInfo.ordering[n],o="ObjectIds"===i?"objectIds":i,r=this._storageInfo[o];if(c(r)){this._values[o]=[];for(let s=0;s<this._header.count;++s)if("String"!==r.valueType){const a=this._parseValue(e,r.valueType,t);this._values[o].push(a.value),t=a.offset}else{const a=this._values.attributeByteCounts[s];let l="";for(let u=0;u<a;++u){const d=this._parseValue(e,r.valueType,t);0!==d.value.charCodeAt(0)&&(l+=d.value),t=d.offset}this._values[o].push(l)}}}},Ph.prototype._getBodyOffset=function(e){let t=0;return c(this._storageInfo.attributeValues)?t=Gv(this._storageInfo.attributeValues.valueType):c(this._storageInfo.objectIds)&&(t=Gv(this._storageInfo.objectIds.valueType)),t>0?Math.ceil(e/t)*t:e},Ph.prototype._validateHeader=function(e){let t=0;for(let n=0;n<this._storageInfo.header.length;n++)t+=gNe(this._storageInfo.header[n].valueType);if(e.byteLength<t)throw new Pe(`Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`)},Ph.prototype._validateBody=function(e,t){if(!c(this._header.count))throw new Pe(`Invalid attribute buffer (field: ${this.name}, count is missing)`);let n;for(let i=0;i<this._storageInfo.ordering.length&&t<e.byteLength;i++){const o=this._storageInfo.ordering[i],r="ObjectIds"===o?"objectIds":o,s=this._storageInfo[r];if(!c(s))throw new Pe(`Invalid attribute buffer (field: ${this.name}, ${r} is missing)`);if("String"!==s.valueType)"attributeByteCounts"===r&&(n=t),t+=Gv(s.valueType)*this._header.count;else{if(!c(n))throw new Pe(`Invalid attribute buffer (field: ${this.name}, attributeByteCounts is missing)`);for(let a=0;a<this._header.count&&t<e.byteLength;++a){const l=this._parseValue(e,this._storageInfo.attributeByteCounts.valueType,n);t+=l.value,n=l.offset}}}if(e.byteLength<t)throw new Pe(`Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`)};const bNe=Ph,eq=function TNe(e){return A.defined("value",e),e<=.04045?.07739938080495357*e:Math.pow(.9478672985781991*(e+.055),2.4)};function kx(e,t){const n=e._dataProvider,i=e._layer;let o;o=c(e._nodeIndex)?i.resource.getDerivedResource({url:`nodes/${e._data.mesh.geometry.resource}/${t}`}):e.resource.getDerivedResource({url:t}),this._parent=e,this._dataProvider=n,this._layer=i,this._resource=o,this._customAttributes=void 0}Object.defineProperties(kx.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}}),kx.prototype.load=function(){const e=this;return this._dataProvider._loadBinary(this._resource).then(function(t){return e._data=t,t})};const ANe=new f,xNe=new f,CNe=new f,ENe=new f,wNe=new f;function VM(e,t,n,i){const o=f.subtract(i,n,ANe),r=f.cross(o,f.subtract(e,n,xNe),ENe),s=f.cross(o,f.subtract(t,n,CNe),wNe);return f.dot(r,s)>=0}const SNe=new f,vNe=new f,INe=new f,DNe=new f,PNe=new f,ONe=new f,RNe=new f,LNe=new f,NNe=new f,MNe=new f;function tq(e){const t=[],n=e.length;for(let i=0;i<n;i++)t.push(i<3?eq(e[i]):e[i]);return t}kx.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(c(this._customAttributes)&&c(this._customAttributes.positions)){const i=new f(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,oe.multiplyByVector(this._customAttributes.parentRotation,i,i);let r,s,a,l,o=Number.MAX_VALUE;const u=this._customAttributes.positions,d=this._customAttributes.indices;let h;h=c(d)?d.length:u.length/3;for(let m=0;m<h;m++){let _,p,y;c(d)?(_=d[m],p=d[m+1],y=d[m+2]):(_=3*m,p=3*m+1,y=3*m+2);const b=f.fromElements(u[3*_],u[3*_+1],u[3*_+2],SNe),x=f.fromElements(u[3*p],u[3*p+1],u[3*p+2],vNe),C=new f(u[3*y],u[3*y+1],u[3*y+2],INe);if(!VM(i,b,x,C)||!VM(i,x,b,C)||!VM(i,C,b,x))continue;const w=f.subtract(x,b,DNe),v=f.subtract(C,b,PNe),I=f.cross(w,v,ONe);if(0===f.magnitude(I))continue;const P=f.normalize(I,RNe),N=f.subtract(i,b,LNe),R=Math.abs(f.dot(N,P));if(R<o){o=R,r=m;const B=f.magnitudeSquared(f.subtract(i,b,N)),F=f.magnitudeSquared(f.subtract(i,x,NNe)),S=f.magnitudeSquared(f.subtract(i,C,MNe));B<F&&B<S?(a=_,l=b,s=B):F<S?(a=p,l=x,s=F):(a=y,l=C,s=S)}}if(c(r))return{index:a,distanceSquared:s,distance:Math.sqrt(s),queriedPosition:i,closestPosition:f.clone(l)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}},kx.prototype._generateGltf=function(e,t,n,i,o,r,s,a){let d,l={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},u=!1,h="";if(c(this._parent._data.mesh)&&c(this._layer._data.materialDefinitions)){const w=this._parent._data.mesh.material.definition;if(w>=0&&w<this._layer._data.materialDefinitions.length){if(d=this._layer._data.materialDefinitions[w],l=d,c(l.pbrMetallicRoughness)&&c(l.pbrMetallicRoughness.baseColorTexture)){u=!0,l.pbrMetallicRoughness.baseColorTexture.index=0;let v="0";if(c(this._layer._data.textureSetDefinitions))for(let I=0;I<this._layer._data.textureSetDefinitions.length;I++){const P=this._layer._data.textureSetDefinitions[I];for(let N=0;N<P.formats.length;N++){const R=P.formats[N];if("jpg"===R.format){v=R.name;break}}}c(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(h=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${v}`}).url)}c(l.pbrMetallicRoughness)&&c(l.pbrMetallicRoughness.baseColorFactor)&&(l.pbrMetallicRoughness.baseColorFactor=tq(l.pbrMetallicRoughness.baseColorFactor)),c(l.emissiveFactor)&&(l.emissiveFactor=tq(l.emissiveFactor))}}else c(this._parent._data.textureData)&&(u=!0,h=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,l.pbrMetallicRoughness.baseColorTexture={index:0});c(l.alphaMode)&&(l.alphaMode=l.alphaMode.toUpperCase());let m=[],_=[],p=[];u&&(m=[{sampler:0,source:0}],_=[{uri:h}],p=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]);const y=[],b=n.length;for(let C=0;C<b;C++){const w=n[C].primitives,v=w.length;for(let I=0;I<v;I++){const P=w[I];if(c(P.material)){for(;P.material>=y.length;){const R=Rt(l,!0);y.push(R)}const N=y[P.material];c(P.extra)&&P.extra.isTransparent?c(N.alphaMode)||(N.alphaMode="BLEND"):"BLEND"===N.alphaMode&&(N.alphaMode="OPAQUE")}}}return{scene:0,scenes:[{nodes:e}],nodes:t,meshes:n,buffers:i,bufferViews:o,accessors:r,materials:y,textures:m,images:_,samplers:p,asset:{version:"2.0"},extensions:s,extensionsUsed:a}};const nq=kx;function Ra(e,t,n){let i,o,r,s;n?(i=0,o=e):(i=e._level+1,o=e._layer),"number"==typeof t?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}function iq(e,t){const n=new bNe(e,t);return e._fields[t.name]=n,n.load()}function HM(){return(HM=(0,we.Z)(function*(e){const t=e._layer._filters,n=[];for(let i=0;i<t.length;i++){const o=e.loadField(t[i].name);n.push(o)}return yield Promise.all(n),t})).apply(this,arguments)}function BNe(e,t,n){if(!c(n.values)||0===n.values.length)return!1;const i=c(t)?t.values:[];let 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}function oq(e,t){return GM.apply(this,arguments)}function GM(){return GM=(0,we.Z)(function*(e,t){const n=e._tile.content.batchTable;if(c(n)&&n.featuresLength>0){n.setAllShow(!0);const i=yield function FNe(e){return HM.apply(this,arguments)}(e);if(i.length>0)for(let o=0;o<n.featuresLength;o++)for(let r=0;r<i.length;r++){const s=i[r];if(!BNe(o,e._fields[s.name],s)){n.setShow(o,!1);break}}}t.show=!0}),GM.apply(this,arguments)}function jv(e,t,n,i){return i[e+t*n]}function UNe(e,t,n){const i=n.nativeExtent;let o=(e-i.west)/(i.east-i.west)*(n.width-1),r=(t-i.south)/(i.north-i.south)*(n.height-1);const s=Math.floor(o);let a=Math.floor(r);o-=s,r-=a;const l=s<n.width?s+1:s;let u=a<n.height?a+1:a;a=n.height-1-a,u=n.height-1-u;let p=function kNe(e,t,n,i,o,r){return(n*(1-e)+i*e)*(1-t)+(o*(1-e)+r*e)*t}(o,r,jv(s,a,n.width,n.buffer),jv(l,a,n.width,n.buffer),jv(s,u,n.width,n.buffer),jv(l,u,n.width,n.buffer));return p=p*n.scale+n.offset,p}Object.defineProperties(Ra.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}}}),Ra.prototype.load=(0,we.Z)(function*(){const e=this;function t(){if(!e._isRoot){const o=e._create3DTileDefinition();e._tile=new pg(e._layer._tileset,e._dataProvider.resource,o,e._parent._tile),e._tile._i3sNode=e}}if(!c(this._nodeIndex)){const o=yield cb.loadJson(this._resource);return e._data=o,void t()}const n=yield this._layer._getNodeInNodePages(this._nodeIndex);let i;e._data=n,e._isRoot?i="nodes/root/":c(n.mesh)&&(i=`../${n.mesh.geometry.resource}/`),c(i)&&(e._resource=e._parent.resource.getDerivedResource({url:i})),t()}),Ra.prototype.loadFields=function(){const e=this._layer._data.attributeStorageInfo,t=[];if(c(e))for(let n=0;n<e.length;n++){const i=e[n],o=this._fields[i.name];c(o)?t.push(o.load()):t.push(iq(this,i))}return Promise.all(t)},Ra.prototype.loadField=function(e){A.defined("name",e);const t=this._fields[e];if(c(t))return t.load();const n=this._layer._data.attributeStorageInfo;if(c(n))for(let i=0;i<n.length;i++){const o=n[i];if(o.name===e)return iq(this,o)}return Promise.resolve()},Ra.prototype.getFieldsForPickedPosition=function(e){const t=this.geometryData[0];if(!c(t.customAttributes.featureIndex))return{};const n=t.getClosestPointIndexOnTriangle(e.x,e.y,e.z);return-1===n.index||n.index>t.customAttributes.featureIndex.length?{}:this.getFieldsForFeature(t.customAttributes.featureIndex[n.index])},Ra.prototype.getFieldsForFeature=function(e){const t={};for(const n in this.fields)if(this.fields.hasOwnProperty(n)){const i=this.fields[n];e>=0&&e<i.values.length&&(t[i.name]=i.values[e])}return t},Ra.prototype._loadChildren=function(){const e=this;if(c(this._childrenReadyPromise))return this._childrenReadyPromise;const t=[];if(c(e._data.children))for(let n=0;n<e._data.children.length;n++){const i=e._data.children[n],o=new Ra(e,g(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},Ra.prototype._loadGeometryData=function(){const e=[];if(c(this._data.geometryData))for(let t=0;t<this._data.geometryData.length;t++){const n=new nq(this,this._data.geometryData[t].href);this._geometryData.push(n),e.push(n.load())}else if(c(this._data.mesh)){const t=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),i=new nq(this,`./geometries/${t.bufferIndex}/`);i._geometryDefinitions=t.definition,i._geometryBufferInfo=t.geometryBufferInfo,this._geometryData.push(i),e.push(i.load())}return Promise.all(e)},Ra.prototype._loadFeatureData=function(){const e=[];if(c(this._data.featureData))for(let t=0;t<this._data.featureData.length;t++){const n=new _Ne(this,this._data.featureData[t].href);this._featureData.push(n),e.push(n.load())}return Promise.all(e)},Ra.prototype._clearGeometryData=function(){this._geometryData=[]},Ra.prototype._create3DTileDefinition=function(){const e=this._data.obb,t=this._data.mbs;if(!c(e)&&!c(t))return void console.error("Failed to load I3S node. Bounding volume is required.");let n;if(n=c(e)?Ce.fromDegrees(e.center[0],e.center[1],e.center[2]):Ce.fromDegrees(t[0],t[1],t[2]),c(this._dataProvider._geoidDataList)&&c(n))for(let x=0;x<this._dataProvider._geoidDataList.length;x++){const C=this._dataProvider._geoidDataList[x],w=C.projection.project(n);if(w.x>C.nativeExtent.west&&w.x<C.nativeExtent.east&&w.y>C.nativeExtent.south&&w.y<C.nativeExtent.north){n.height+=UNe(w.x,w.y,C);break}}let o,i={},r=0;c(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=he.WGS84.cartographicToCartesian(n)):(i={sphere:[0,0,0,t[3]]},o=he.WGS84.cartographicToCartesian(n),r=this._data.mbs[3]),r*=2;let s=1/0;if(c(this._data.lodThreshold))"maxScreenThresholdSQ"===this._layer._data.nodePages.lodSelectionMetricType?s=r/Math.sqrt(this._data.lodThreshold/(.25*Math.PI)):"maxScreenThreshold"===this._layer._data.nodePages.lodSelectionMetricType?s=r/this._data.lodThreshold:console.error("Invalid lodSelectionMetricType in Layer");else if(c(this._data.lodSelection))for(let x=0;x<this._data.lodSelection.length;x++)"maxScreenThreshold"===this._data.lodSelection[x].metricType&&(s=r/this._data.lodSelection[x].maxError);s===1/0&&(s=1e5);const a=16*s,l=new Wy(0,0,0);let u=In.headingPitchRollQuaternion(o,l);c(this._data.obb)&&(u=new bt(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));const d=oe.fromQuaternion(u),h=oe.inverse(d,new oe),m=new k(d[0],d[1],d[2],0,d[3],d[4],d[5],0,d[6],d[7],d[8],0,o.x,o.y,o.z,1),_=k.inverse(m,new k),p=k.clone(m);c(this._parent._globalTransform)&&k.multiply(m,this._parent._inverseGlobalTransform,p),this._globalTransform=m,this._inverseGlobalTransform=_,this._inverseRotationMatrix=h;const y=[];for(let x=0;x<this._children.length;x++)y.push(this._children[x]._create3DTileDefinition());return{children:y,refine:"REPLACE",boundingVolume:i,transform:[p[0],p[4],p[8],p[12],p[1],p[5],p[9],p[13],p[2],p[6],p[10],p[14],p[3],p[7],p[11],p[15]],content:{uri:c(this._resource)?this._resource.url:void 0},geometricError:a}},Ra.prototype._loadSymbology=(0,we.Z)(function*(){!c(this._symbologyData)&&c(this._layer._symbology)&&(this._symbologyData=yield this._layer._symbology._getSymbology(this))}),Ra.prototype._createContentURL=(0,we.Z)(function*(){let e={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}};const t=[this._loadGeometryData()];if(this._dataProvider.legacyVersion16&&t.push(this._loadFeatureData()),yield Promise.all(t),c(this._geometryData)&&this._geometryData.length>0){this._dataProvider._applySymbology&&(yield this._loadSymbology());const o=this._geometryData[0].resource.url,r=this._layer._data.store.defaultGeometrySchema,s=this._geometryData[0],a=yield mNe.decode(o,r,s,this._featureData[0],this._symbologyData);if(!c(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}const n=this._dataProvider._binarizeGltf(e),i=new Blob([n],{type:"application/binary"});return URL.createObjectURL(i)}),Ra.prototype._filterFeatures=function(){const e=[];for(let n=0;n<this._children.length;n++){const i=this._children[n]._filterFeatures();e.push(i)}const t=this._tile?.content?._model;if(c(this._geometryData)&&this._geometryData.length>0&&c(t)&&t.ready){t.show=!1;const n=oq(this,t);e.push(n)}return Promise.all(e)},pg.prototype._hookedRequestContent=pg.prototype.requestContent,pg.prototype.requestContent=function(){if(!this.tileset._isI3STileSet)return this._hookedRequestContent();if(!this._isLoading){this._isLoading=!0;const e=this;return this._i3sNode._createContentURL().then(t=>{if(c(t))return e._contentResource=new zt({url:t}),e._hookedRequestContent();e._isLoading=!1}).then(t=>{const n=t?._model;return c(e._i3sNode._geometryData)&&e._i3sNode._geometryData.length>0&&c(n)&&(n.show=!1,n.readyEvent.addEventListener(()=>{oq(e._i3sNode,n)})),e._isLoading=!1,t})}},Object.defineProperties(pg.prototype,{i3sNode:{get:function(){return this._i3sNode}}});const rq=Ra;function Wv(e){this._layer=e,this._defaultSymbology=void 0,this._valueFields=[],this._uniqueValueHash=void 0,this._classBreaksHash=void 0,this._parseLayerSymbology()}function jM(e,t){const n=[];for(let i=0;i<e.length;i++){const o=Z.byteToFloat(e[i]);n.push(i<3?eq(o):o)}return 3===n.length&&(c(t)?n.push(1-t/100):n.push(1)),n}function ab(e,t){const n={edges:void 0,material:void 0};if(c(e)&&c(e.symbolLayers))for(let i=0;i<e.symbolLayers.length;i++){const o=e.symbolLayers[i];if("Fill"===o.type){const r=o.edges,s=o.outline;if(c(r)?(n.edges={},c(r.color)&&(n.edges.color=jM(r.color,r.transparency))):c(s)&&(n.edges={},c(s.color)&&(n.edges.color=jM(s.color,s.transparency))),!t){const a=o.material;c(a)&&(n.material={colorMixMode:a.colorMixMode},c(a.color)&&(n.material.color=jM(a.color,a.transparency)))}break}}return n}function sq(e,t,n,i){const o=t[n];if(i<o.length){const s=e[o[i]];return c(s)&&++n<t.length?sq(s,t,n,i):s}}Object.defineProperties(Wv.prototype,{defaultSymbology:{get:function(){return this._defaultSymbology}}}),Wv.prototype._parseLayerSymbology=function(){const e=this._layer.data.drawingInfo;if(c(e)&&c(e.renderer)){const t=this._layer.data.cachedDrawingInfo,n=c(t)&&!0===t.color,i=e.renderer;"simple"===i.type?this._defaultSymbology=ab(i.symbol,n):"uniqueValue"===i.type?(this._defaultSymbology=ab(i.defaultSymbol,n),this._valueFields.push(i.field1),c(i.field2)&&this._valueFields.push(i.field2),c(i.field3)&&this._valueFields.push(i.field3),this._uniqueValueHash=function zNe(e,t){if(c(e.uniqueValueGroups)){const n={};for(let i=0;i<e.uniqueValueGroups.length;i++){const o=e.uniqueValueGroups[i].classes;if(c(o))for(let r=0;r<o.length;r++){const s=ab(o[r].symbol,t),a=o[r].values;for(let l=0;l<a.length;l++){const u=a[l];let d=n;for(let h=0;h<u.length;h++){const m=u[h];h===u.length-1?d[m]=s:(c(d[m])||(d[m]={}),d=d[m])}}}}return n}if(c(e.uniqueValueInfos)){const n={};for(let i=0;i<e.uniqueValueInfos.length;i++){const o=e.uniqueValueInfos[i];n[o.value]=ab(o.symbol,t)}return n}}(i,n)):"classBreaks"===i.type&&(this._defaultSymbology=ab(i.defaultSymbol,n),this._valueFields.push(i.field),this._classBreaksHash=function VNe(e,t){if(c(e.classBreakInfos)){const n=[...e.classBreakInfos];n.sort(function(o,r){return g(o.classMaxValue,o.classMinValue)-g(r.classMaxValue,r.classMinValue)});const i={ranges:[],symbols:[]};c(e.minValue)&&(i.ranges.push(e.minValue),i.symbols.push(void 0));for(let o=0;o<n.length;o++){const r=n[o];c(r.classMinValue)&&(0===i.ranges.length||r.classMinValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMinValue),i.symbols.push(void 0)),c(r.classMaxValue)&&(0===i.ranges.length||r.classMaxValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMaxValue),i.symbols.push(ab(r.symbol,t)))}return i.symbols.push(void 0),i}}(i,n))}},Wv.prototype._getSymbology=function(){var e=(0,we.Z)(function*(t){const n={default:this._defaultSymbology};if(this._valueFields.length>0){const i=[];for(let s=0;s<this._valueFields.length;s++)i.push(t.loadField(this._valueFields[s]));yield Promise.all(i);const o=[];for(let s=0;s<this._valueFields.length;s++)o.push(t.fields[this._valueFields[s]].values);let r;if(c(this._uniqueValueHash)?r=s=>sq(this._uniqueValueHash,o,0,s):c(this._classBreaksHash)&&(r=s=>function GNe(e,t,n){const o=function HNe(e,t){let n=0,i=e.length;if(n<i)do{const o=n+i>>>1;e[o]<t?n=o+1:i=o}while(n<i);return n}(e.ranges,t[n]);return e.symbols[o]}(this._classBreaksHash,o[0],s)),c(r)){const s=o[0];for(let a=0;a<s.length;a++){const l=r(a);c(l)&&(n[a]=l)}}}return n});return function(t){return e.apply(this,arguments)}}();const jNe=Wv;function Oc(e,t,n){this._dataProvider=e,this._parent=n,!c(t.href)&&c(t.id)&&(t.href=`layers/${t.id}`);const i=this._parent.resource.getUrlComponent();let o="";o=i.match(/layers\/\d/)?`${i}`.replace(/\/+$/,""):`${i}`.replace(/\/?$/,"/").concat(`${t.href}`),this._version=t.store.version;const r=this._version.split(".");this._majorVersion=parseInt(r[0]),this._minorVersion=r.length>1?parseInt(r[1]):0,this._resource=new zt({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(Oc.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(c(this.version))return this.majorVersion<1||1===this.majorVersion&&this.minorVersion<=6}}}),Oc.prototype.load=function(){var e=(0,we.Z)(function*(t){if(4326!==this._data.spatialReference.wkid)throw new Pe(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(this._dataProvider.applySymbology&&(this._symbology=new jNe(this)),yield this._dataProvider.loadGeoidData(),yield this._loadRootNode(t),yield this._create3DTileset(t),this._rootNode._tile=this._tileset._root,this._tileset._root._i3sNode=this._rootNode,this.legacyVersion16)return this._rootNode._loadChildren()});return function(t){return e.apply(this,arguments)}}(),Oc.prototype._computeGeometryDefinitions=function(e){if(this._geometryDefinitions=[],c(this._data.geometryDefinitions))for(let t=0;t<this._data.geometryDefinitions.length;t++){const n=[],i=this._data.geometryDefinitions[t].geometryBuffers;for(let o=0;o<i.length;o++){const r=i[o],s=[];let a=!1;if(c(r.compressedAttributes)&&e){a=!0;const l=r.compressedAttributes.attributes;for(let u=0;u<l.length;u++)s.push(l[u])}else for(const l in r)"offset"!==l&&s.push(l);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)}},Oc.prototype._findBestGeometryBuffers=function(e,t){const n=this._geometryDefinitions[e];if(c(n))for(let i=0;i<n.length;++i){const o=n[i];let r=!1;const 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},Oc.prototype._loadRootNode=function(e){if(c(this._data.nodePages)){let t=0;c(this._data.nodePages.rootIndex)&&(t=this._data.nodePages.rootIndex),this._rootNode=new rq(this,t,!0)}else this._rootNode=new rq(this,this._data.store.rootNode,!0);return this._rootNode.load(e)},Oc.prototype._getNodeInNodePages=function(e){const 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]})},Oc._fetchJson=function(e){return e.fetchJson()},Oc.prototype._loadNodePage=function(e){const t=this;if(!c(this._nodePageFetches[e])){const n=this.resource.getDerivedResource({url:`nodepages/${e}/`}),i=Oc._fetchJson(n).then(function(o){return c(o.error)&&200!==o.error.code?Promise.reject(o.error):(t._nodePages[e]=o.nodes,o)});this._nodePageFetches[e]=i}return this._nodePageFetches[e]},Oc.prototype._computeExtent=function(){c(this._data.fullExtent)?this._extent=Te.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):c(this._data.store.extent)&&(this._extent=Te.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))},Oc.prototype._create3DTileset=function(){var e=(0,we.Z)(function*(t){const n={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},i=new Blob([JSON.stringify(n)],{type:"application/json"}),o=URL.createObjectURL(i),r=this._symbology?.defaultSymbology?.edges?.color;c(r)&&!c(t?.outlineColor)&&((t=c(t)?Rt(t):{}).outlineColor=Z.fromCartesian4(de.fromArray(r))),this._tileset=yield _g.fromUrl(o,t),this._tileset.show=this._parent.show,this._tileset._isI3STileSet=!0,this._tileset.tileUnload.addEventListener(function(s){s._i3sNode._clearGeometryData(),URL.revokeObjectURL(s._contentResource._url),s._contentResource=s._i3sNode.resource}),this._tileset.tileVisible.addEventListener(function(s){c(s._i3sNode)&&s._i3sNode._loadChildren()})});return function(t){return e.apply(this,arguments)}}(),Oc.prototype._updateVisibility=function(){c(this._tileset)&&(this._tileset.show=this._parent.show)},Oc.prototype.filterByAttributes=function(e){this._filters=c(e)?Rt(e,!0):[];const t=this._rootNode;return c(t)?t._filterFeatures():Promise.resolve()};const aq=Oc;function qv(e,t){this._dataProvider=e,this._resource=new zt({url:t}),this._resource.setQueryParameters(e.resource.queryParameters),this._resource.appendForwardSlash()}Object.defineProperties(qv.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},names:{get:function(){const e=[],t=this._data.summary;if(c(t))for(let n=0;n<t.length;++n)e.push(t[n].fieldName);return e}}}),qv.prototype.load=(0,we.Z)(function*(){return this._data=yield cb.loadJson(this._resource),this._data}),qv.prototype._getValues=function(e){const t=this._data.summary;if(c(t))for(let n=0;n<t.length;++n){const i=t[n];if(i.fieldName===e)return c(i.mostFrequentValues)?[...i.mostFrequentValues]:[]}};const WNe=qv;function Ux(e,t,n){this._dataProvider=e,this._parent=t,this._data=n,this._name=n.name,this._modelName=n.modelName,this._visibility=g(n.visibility,!0),this._resource=void 0,this._sublayers=[],this._i3sLayers=[]}Object.defineProperties(Ux.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(A.defined("value",e),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}}}),Ux._fromData=function(){var e=(0,we.Z)(function*(t,n,i,o){const r=new Ux(t,o,i);if("group"===r._data.layerType){const s=r._data.sublayers;if(c(s)){const a=[];for(let u=0;u<s.length;u++){const d=Ux._fromData(t,n,s[u],r);a.push(d)}const l=yield Promise.all(a);for(let u=0;u<l.length;u++){const d=l[u];r._sublayers.push(d),r._i3sLayers.push(...d._i3sLayers)}}}else if("3DObject"===r._data.layerType){const s=n.concat(`/sublayers/${r._data.id}`),a=new zt({url:s});a.setQueryParameters(t.resource.queryParameters),a.appendForwardSlash(),r._resource=a;const l=yield cb.loadJson(r._resource),u=new aq(t,l,r);r._i3sLayers.push(u)}else console.log(`${r._data.layerType} layer ${r._data.name} is skipped as not supported.`);return r});return function(t,n,i,o){return e.apply(this,arguments)}}();const qNe=Ux;var YNe=wt(268);function jr(e){e=g(e,g.EMPTY_OBJECT),this._name=e.name,this._show=g(e.show,!0),this._geoidTiledTerrainProvider=e.geoidTiledTerrainProvider,this._showFeatures=g(e.showFeatures,!1),this._adjustMaterialAlphaMode=g(e.adjustMaterialAlphaMode,!1),this._applySymbology=g(e.applySymbology,!1),this._calculateNormals=g(e.calculateNormals,!1),this._cesium3dTilesetOptions=g(e.cesium3dTilesetOptions,g.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=[]}function cq(e,t,n){return WM.apply(this,arguments)}function WM(){return(WM=(0,we.Z)(function*(e,t,n){if("Building"===t.layerType){c(n.showFeatures)||(e._showFeatures=!0),c(n.adjustMaterialAlphaMode)||(e._adjustMaterialAlphaMode=!0),c(n.applySymbology)||(e._applySymbology=!0),c(n.calculateNormals)||(e._calculateNormals=!0);const i=function XNe(e,t){const n=e.resource.getUrlComponent();let i="";return i=n.match(/layers\/\d/)?`${n}`.replace(/\/+$/,""):`${n}`.replace(/\/?$/,"/").concat(`layers/${t}`),i}(e,t.id);if(c(t.sublayers)){const o=[];for(let s=0;s<t.sublayers.length;s++){const a=qNe._fromData(e,i,t.sublayers[s],e);o.push(a)}const r=yield Promise.all(o);for(let s=0;s<r.length;s++){const a=r[s];e._sublayers.push(a),e._layers.push(...a._i3sLayers)}}if(c(t.statisticsHRef)){const o=i.concat(`/${t.statisticsHRef}`),r=new WNe(e,o);yield r.load(),e._attributeStatistics.push(r)}if(c(t.fullExtent)){const o=Te.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax);e._layersExtent.push(o)}}else if("3DObject"===t.layerType||"IntegratedMesh"===t.layerType){!c(n.calculateNormals)&&!c(t.textureSetDefinitions)&&(e._calculateNormals=!0);const i=new aq(e,t,e);e._layers.push(i),c(i._extent)&&e._layersExtent.push(i._extent)}else console.log(`${t.layerType} layer ${t.name} is skipped as not supported.`)})).apply(this,arguments)}Object.defineProperties(jr.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(e){if(A.defined("value",e),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}}}),jr.prototype.destroy=function(){for(let e=0;e<this._layers.length;e++)c(this._layers[e]._tileset)&&this._layers[e]._tileset.destroy();return Xe(this)},jr.prototype.isDestroyed=function(){return!1},jr.prototype.update=function(e){for(let t=0;t<this._layers.length;t++)c(this._layers[t]._tileset)&&this._layers[t]._tileset.update(e)},jr.prototype.prePassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)c(this._layers[t]._tileset)&&this._layers[t]._tileset.prePassesUpdate(e)},jr.prototype.postPassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)c(this._layers[t]._tileset)&&this._layers[t]._tileset.postPassesUpdate(e)},jr.prototype.updateForPass=function(e,t){for(let n=0;n<this._layers.length;n++)c(this._layers[n]._tileset)&&this._layers[n]._tileset.updateForPass(e,t)},jr.fromUrl=function(){var e=(0,we.Z)(function*(t,n){A.defined("url",t),n=g(n,g.EMPTY_OBJECT);const i=zt.createIfNeeded(t);i.setQueryParameters({f:"pjson"},!0);const o=yield jr.loadJson(i),r=new jr(n);if(r._resource=i,r._data=o,c(o.layers)){const a=[];for(let l=0;l<o.layers.length;l++){const u=cq(r,o.layers[l],n);a.push(u)}yield Promise.all(a)}else yield cq(r,o,n);r._computeExtent();const s=[];for(let a=0;a<r._layers.length;a++)s.push(r._layers[a].load(n.cesium3dTilesetOptions));return yield Promise.all(s),r});return function(t,n){return e.apply(this,arguments)}}(),jr._fetchJson=function(e){return e.fetchJson()},jr.loadJson=function(){var e=(0,we.Z)(function*(t){const n=yield jr._fetchJson(t);if(c(n.error)){if(console.error("Failed to fetch I3S ",t.url),c(n.error.message)&&console.error(n.error.message),c(n.error.details))for(let i=0;i<n.error.details.length;i++)console.log(n.error.details[i]);throw new Pe(n.error)}return n});return function(t){return e.apply(this,arguments)}}(),jr.prototype._loadBinary=function(){var e=(0,we.Z)(function*(t){const n=yield t.fetchArrayBuffer();if(n.byteLength>0&&new Uint8Array(n)[0]==="{".charCodeAt(0)&&(new TextDecoder).decode(n).includes("404"))throw new Pe(`Failed to load binary: ${t.url}`);return n});return function(t){return e.apply(this,arguments)}}(),jr.prototype._binarizeGltf=function(e){const 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]="g".charCodeAt(),o.magic[1]="l".charCodeAt(),o.magic[2]="T".charCodeAt(),o.magic[3]="F".charCodeAt(),o.version[0]=2,o.length[0]=i.byteLength,o.chunkLength[0]=n.byteLength,o.chunkType[0]=1313821514,o.chunkData.set(n),i};const ZNe=new V;function qM(){return(qM=(0,we.Z)(function*(e){const t=e._geoidTiledTerrainProvider;if(c(t))try{const n=yield function $Ne(e,t){const n=e.tilingScheme,i=[],o={},r=e._lodCount,s=Ce.fromRadians(t.west,t.north),a=Ce.fromRadians(t.east,t.south),l=n.positionToTileXY(s,r),u=n.positionToTileXY(a,r);for(let h=l.x;h<=u.x;h++)for(let m=l.y;m<=u.y;m++){const _=V.fromElements(h,m,ZNe),p=_.toString();if(!o.hasOwnProperty(p)){const y={x:_.x,y:_.y,level:r,tilingScheme:n,terrainProvider:e,positions:[]};o[p]=y,i.push(y)}}const d=[];for(let h=0;h<i.length;++h){const m=i[h],_=m.terrainProvider.requestTileGeometry(m.x,m.y,m.level);d.push(_)}return Promise.all(d).then(function(h){const m=[];for(let _=0;_<h.length;_++){const p={tilingScheme:n,x:i[_].x,y:i[_].y,level:i[_].level},y=h[_];let b="Geographic";n._projection instanceof or&&(b="WebMercator");const x={projectionType:b,projection:n._projection,nativeExtent:n.tileXYToNativeRectangle(p.x,p.y,p.level),height:y._height,width:y._width,scale:y._structure.heightScale,offset:y._structure.heightOffset};if(y._encoding===Ow.LERC){const C=YNe.decode(y._buffer);x.buffer=C.pixels[0]}else x.buffer=y._buffer;m.push(x)}return m})}(t,e._extent);e._geoidDataList=n}catch{console.log("Error retrieving Geoid Terrain tiles - no geoid conversion will be performed.")}})).apply(this,arguments)}jr.prototype.loadGeoidData=(0,we.Z)(function*(){return c(this._geoidDataPromise)||(this._geoidDataPromise=function KNe(e){return qM.apply(this,arguments)}(this)),this._geoidDataPromise}),jr.prototype._computeExtent=function(){let e;for(let t=0;t<this._layersExtent.length;t++){const n=this._layersExtent[t];c(e)?Te.union(e,n,e):e=Te.clone(n)}this._extent=e},jr.prototype.getAttributeNames=function(){const e=[];for(let t=0;t<this._attributeStatistics.length;++t)e.push(...this._attributeStatistics[t].names);return e},jr.prototype.getAttributeValues=function(e){A.defined("name",e);for(let t=0;t<this._attributeStatistics.length;++t){const n=this._attributeStatistics[t]._getValues(e);if(c(n))return n}return[]},jr.prototype.filterByAttributes=function(e){const t=[];for(let n=0;n<this._layers.length;n++){const i=this._layers[n].filterByAttributes(e);t.push(i)}return Promise.all(t)};const cb=jr;let YM;const lq="AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmRcs5cw5x8CvIyg2oiotXJmY_GjoEUuuKAUvdWxusIx25kUy2AttkOs0FgosGzFJSsjafpWC40GiE5hiD0FLNSh3kxIW6w-5qqUQCEAwGY1t4yH7Fj-PjrkjPfSpw0_r2xF3lKLd0_LSmPWXCkYhqV1O67tWLNImHyr7SurJ92sA5YIG1pMJKEQU3Qv5k18p0g.AT1_sGbfSYDL",lb={};lb.defaultAccessToken=lq,lb.defaultWorldImageryServer=new zt({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"}),lb.defaultWorldHillshadeServer=new zt({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"}),lb.defaultWorldOceanServer=new zt({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"}),lb.getDefaultTokenCredit=function(e){if(e===lq)return c(YM)||(YM=new Yn('<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>',!0)),YM};const Oh=lb;function XM(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.missingImageUrl))throw new E("options.missingImageUrl is required.");if(!c(e.pixelsToCheck))throw new E("options.pixelsToCheck is required.");this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;const t=zt.createIfNeeded(e.missingImageUrl),n=this;t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then(function i(r){c(r.blob)&&(n._missingImageByteLength=r.blob.size);let s=u_(r);if(e.disableCheckIfAllPixelsAreTransparent){let a=!0;const l=r.width,u=e.pixelsToCheck;for(let d=0,h=u.length;a&&d<h;++d){const m=u[d];s[4*m.x+m.y*l+3]>0&&(a=!1)}a&&(s=void 0)}n._missingImagePixels=s,n._isReady=!0}).catch(function o(){n._missingImagePixels=void 0,n._isReady=!0})}XM.prototype.isReady=function(){return this._isReady},XM.prototype.shouldDiscardImage=function(e){if(!this._isReady)throw new E("shouldDiscardImage must not be called before the discard policy is ready.");const t=this._pixelsToCheck,n=this._missingImagePixels;if(!c(n)||c(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;const i=u_(e),o=e.width;for(let r=0,s=t.length;r<s;++r){const a=t[r],l=4*a.x+a.y*o;for(let u=0;u<4;++u){const d=l+u;if(i[d]!==n[d])return!1}}return!0};const QNe=XM;function ZM(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}ZM.prototype.configureNameFromProperties=function(e){let n,t=10;for(const i in e)if(e.hasOwnProperty(i)&&e[i]){const o=i.toLowerCase();t>1&&"name"===o?(t=1,n=i):t>2&&"title"===o?(t=2,n=i):t>3&&/name/i.test(i)?(t=3,n=i):t>4&&/title/i.test(i)&&(t=4,n=i)}c(n)&&(this.name=e[n])},ZM.prototype.configureDescriptionFromProperties=function(e){this.description=function t(n){let i='<table class="cesium-infoBox-defaultTable">';for(const o in n)if(n.hasOwnProperty(o)){const r=n[o];c(r)&&(i+="object"==typeof r?`<tr><td>${o}</td><td>${t(r)}</td></tr>`:`<tr><td>${o}</td><td>${r}</td></tr>`)}return i+="</table>",i}(e)};const ub=ZM;function db(){E.throwInstantiationError()}Object.defineProperties(db.prototype,{rectangle:{get:E.throwInstantiationError},tileWidth:{get:E.throwInstantiationError},tileHeight:{get:E.throwInstantiationError},maximumLevel:{get:E.throwInstantiationError},minimumLevel:{get:E.throwInstantiationError},tilingScheme:{get:E.throwInstantiationError},tileDiscardPolicy:{get:E.throwInstantiationError},errorEvent:{get:E.throwInstantiationError},credit:{get:E.throwInstantiationError},proxy:{get:E.throwInstantiationError},hasAlphaChannel:{get:E.throwInstantiationError}}),db.prototype.getTileCredits=function(e,t,n){E.throwInstantiationError()},db.prototype.requestImage=function(e,t,n,i){E.throwInstantiationError()},db.prototype.pickFeatures=function(e,t,n,i,o){E.throwInstantiationError()};const JNe=/\.ktx2$/i;db.loadImage=function(e,t){A.defined("url",t);const n=zt.createIfNeeded(t);return JNe.test(n.url)?o0(n):c(e)&&c(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):n.fetchImage({preferImageBitmap:!0,flipY:!0})};const fb=db,hb=Object.freeze({SATELLITE:1,OCEANS:2,HILLSHADE:3});function uq(e){this.useTiles=g(e.usePreCachedTilesIfAvailable,!0);const t=e.ellipsoid;this.tilingScheme=g(e.tilingScheme,new Nd({ellipsoid:t})),this.rectangle=g(e.rectangle,this.tilingScheme.rectangle),this.ellipsoid=t;let n=e.credit;"string"==typeof n&&(n=new Yn(n)),this.credit=n,this.tileCredits=void 0,this.tileDiscardPolicy=e.tileDiscardPolicy,this.tileWidth=g(e.tileWidth,256),this.tileHeight=g(e.tileHeight,256),this.maximumLevel=e.maximumLevel}function $M(){return($M=(0,we.Z)(function*(e,t){const n=e.getDerivedResource({queryParameters:{f:"json"}});try{!function eMe(e,t){const n=e.tileInfo;if(c(n)){if(t.tileWidth=n.rows,t.tileHeight=n.cols,102100===n.spatialReference.wkid||102113===n.spatialReference.wkid)t.tilingScheme=new Md({ellipsoid:t.ellipsoid});else{if(4326!==e.tileInfo.spatialReference.wkid)throw new Pe(`Tile spatial reference WKID ${e.tileInfo.spatialReference.wkid} is not supported.`);t.tilingScheme=new Nd({ellipsoid:t.ellipsoid})}if(t.maximumLevel=e.tileInfo.lods.length-1,c(e.fullExtent)){if(c(e.fullExtent.spatialReference)&&c(e.fullExtent.spatialReference.wkid))if(102100===e.fullExtent.spatialReference.wkid||102113===e.fullExtent.spatialReference.wkid){const i=new or,o=e.fullExtent,r=i.unproject(new f(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 f(Math.min(o.xmax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(o.ymax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0));t.rectangle=new Te(r.longitude,r.latitude,s.longitude,s.latitude)}else{if(4326!==e.fullExtent.spatialReference.wkid)throw new Pe(`fullExtent.spatialReference WKID ${e.fullExtent.spatialReference.wkid} is not supported.`);t.rectangle=Te.fromDegrees(e.fullExtent.xmin,e.fullExtent.ymin,e.fullExtent.xmax,e.fullExtent.ymax)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}else t.useTiles=!1;c(e.copyrightText)&&e.copyrightText.length>0&&(c(t.credit)?t.tileCredits=[new Yn(e.copyrightText)]:t.credit=new Yn(e.copyrightText))}(yield n.fetchJson(),t)}catch(i){!function tMe(e,t){let n=`An error occurred while accessing ${e.url}`;throw c(t)&&c(t.message)&&(n+=`: ${t.message}`),new Pe(n)}(e,i)}})).apply(this,arguments)}function af(e){e=g(e,g.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=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=g(e.tilingScheme,new Nd({ellipsoid:e.ellipsoid})),this._useTiles=g(e.usePreCachedTilesIfAvailable,!0),this._rectangle=g(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,this._credit=e.credit,this._tileCredits=void 0;let t=e.credit;"string"==typeof t&&(t=new Yn(t)),this.enablePickFeatures=g(e.enablePickFeatures,!0),this._errorEvent=new Ye}function dq(e,t,n,i,o){let r;if(e._useTiles)r=e._resource.getDerivedResource({url:`tile/${i}/${n}/${t}`,request:o});else{const s=e._tilingScheme.tileXYToNativeRectangle(t,n,i),l={bbox:`${s.west},${s.south},${s.east},${s.north}`,size:`${e._tileWidth},${e._tileHeight}`,format:"png32",transparent:!0,f:"image"};e._tilingScheme.projection instanceof Qr?(l.bboxSR=4326,l.imageSR=4326):(l.bboxSR=3857,l.imageSR=3857),e.layers&&(l.layers=`show:${e.layers}`),r=e._resource.getDerivedResource({url:"export",request:o,queryParameters:l})}return r}uq.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&&!c(this.tileDiscardPolicy)&&(e._tileDiscardPolicy=new QNe({missingImageUrl:dq(e,0,0,this.maximumLevel).url,pixelsToCheck:[new V(0,0),new V(200,20),new V(20,200),new V(80,110),new V(160,130)],disableCheckIfAllPixelsAreTransparent:!0}))},af.fromBasemapType=function(){var e=(0,we.Z)(function*(t,n){let i,o,r;switch(A.defined("style",t),n=g(n,g.EMPTY_OBJECT),t){case hb.SATELLITE:{i=g(n.token,Oh.defaultAccessToken),o=zt.createIfNeeded(Oh.defaultWorldImageryServer),o.appendForwardSlash();const s=Oh.getDefaultTokenCredit(i);c(s)&&(r=Yn.clone(s))}break;case hb.OCEANS:{i=g(n.token,Oh.defaultAccessToken),o=zt.createIfNeeded(Oh.defaultWorldOceanServer),o.appendForwardSlash();const s=Oh.getDefaultTokenCredit(i);c(s)&&(r=Yn.clone(s))}break;case hb.HILLSHADE:{i=g(n.token,Oh.defaultAccessToken),o=zt.createIfNeeded(Oh.defaultWorldHillshadeServer),o.appendForwardSlash();const s=Oh.getDefaultTokenCredit(i);c(s)&&(r=Yn.clone(s))}break;default:throw new E(`Unsupported basemap type: ${t}`)}return af.fromUrl(o,{...n,token:i,credit:r,usePreCachedTilesIfAvailable:!0})});return function(t,n){return e.apply(this,arguments)}}(),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=function(){var e=(0,we.Z)(function*(t,n){A.defined("url",t),n=g(n,g.EMPTY_OBJECT);const i=zt.createIfNeeded(t);i.appendForwardSlash(),c(n.token)&&i.setQueryParameters({token:n.token});const o=new af(n);o._resource=i;const r=new uq(n);return g(n.usePreCachedTilesIfAvailable,!0)&&(yield function nMe(e,t){return $M.apply(this,arguments)}(i,r)),r.build(o),o});return function(t,n){return e.apply(this,arguments)}}(),af.prototype.getTileCredits=function(e,t,n){return this._tileCredits},af.prototype.requestImage=function(e,t,n,i){return fb.loadImage(this,dq(this,e,t,n,i))},af.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures)return;const r=this._tilingScheme.tileXYToNativeRectangle(e,t,n);let s,a,l;if(this._tilingScheme.projection instanceof Qr)s=O.toDegrees(i),a=O.toDegrees(o),l="4326";else{const m=this._tilingScheme.projection.project(new Ce(i,o,0));s=m.x,a=m.y,l="3857"}let u="visible";return c(this._layers)&&(u+=`:${this._layers}`),this._resource.getDerivedResource({url:"identify",queryParameters:{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:l,layers:u}}).fetchJson().then(function(m){const _=[],p=m.results;if(!c(p))return _;for(let y=0;y<p.length;++y){const b=p[y],x=new ub;if(x.data=b,x.name=b.value,x.properties=b.attributes,x.configureDescriptionFromProperties(b.attributes),"esriGeometryPoint"===b.geometryType&&b.geometry){const C=b.geometry.spatialReference&&b.geometry.spatialReference.wkid?b.geometry.spatialReference.wkid:4326;if(4326===C||4283===C)x.position=Ce.fromDegrees(b.geometry.x,b.geometry.y,b.geometry.z);else if(102100===C||900913===C||3857===C){const w=new or;x.position=w.unproject(new f(b.geometry.x,b.geometry.y,b.geometry.z))}}_.push(x)}return _})},af._metadataCache={};const Yv=af,fq=Object.freeze({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"});function zx(e){}let Xv;zx.prototype.isReady=function(){return!0},zx.prototype.shouldDiscardImage=function(e){return zx.EMPTY_IMAGE===e},Object.defineProperties(zx,{EMPTY_IMAGE:{get:function(){return c(Xv)||(Xv=new Image,Xv.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),Xv}}});const hq=zx;function pq(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}function KM(){return(KM=(0,we.Z)(function*(e,t,n){const i=e.url;let o=ss._metadataCache[i];c(o)||(o=e.fetchJsonp("jsonp"),ss._metadataCache[i]=o);try{return function iMe(e,t){if(1!==e.resourceSets.length)throw new Pe("metadata does not specify one resource in resourceSets");const 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}(yield o,t)}catch(r){!function oMe(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw c(t)&&c(t.message)&&(i+=`: ${t.message}`),Ka.reportError(void 0,n,c(n)?n._errorEvent:void 0,i,void 0,void 0,void 0,t),new Pe(i)}(e,r,n)}})).apply(this,arguments)}function ss(e){e=g(e,g.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=g(e.mapStyle,fq.AERIAL),this._mapLayer=e.mapLayer,this._culture=g(e.culture,""),this._key=e.key,this._tileDiscardPolicy=e.tileDiscardPolicy,c(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new hq),this._proxy=e.proxy,this._credit=new Yn(`<a href="https://www.microsoft.com/en-us/maps/product/enduserterms"><img src="${ss.logoUrl}" title="Bing Imagery"/></a>`),this._tilingScheme=new Md({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 Ye}pq.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){const o=t[n];if(o.credit instanceof Yn)break;o.credit=new Yn(o.attribution);const r=o.coverageAreas;for(let s=0,a=o.coverageAreas.length;s<a;++s){const l=r[s],u=l.bbox;l.bbox=new Te(O.toRadians(u[1]),O.toRadians(u[0]),O.toRadians(u[3]),O.toRadians(u[2]))}}},Object.defineProperties(ss.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 c(this.mapLayer)}}}),ss.fromUrl=function(){var e=(0,we.Z)(function*(t,n){n=g(n,g.EMPTY_OBJECT),A.defined("url",t),A.defined("options.key",n.key);let i=n.tileProtocol;c(i)?i.length>0&&":"===i[i.length-1]&&(i=i.substr(0,i.length-1)):i="http:"===document.location.protocol?"http":"https";const o=g(n.mapStyle,fq.AERIAL),r=zt.createIfNeeded(t);r.appendForwardSlash();const s={incl:"ImageryProviders",key:n.key,uriScheme:i};c(n.mapLayer)&&(s.mapLayer=n.mapLayer),c(n.culture)&&(s.culture=n.culture);const a=r.getDerivedResource({url:`REST/v1/Imagery/Metadata/${o}`,queryParameters:s}),l=new ss(n);l._resource=r;const u=new pq(n);return yield function rMe(e,t,n){return KM.apply(this,arguments)}(a,u),u.build(l),l});return function(t,n){return e.apply(this,arguments)}}();const sMe=new Te;ss.prototype.getTileCredits=function(e,t,n){const i=this._tilingScheme.tileXYToRectangle(e,t,n,sMe);return function lMe(e,t,n){++t;const i=[];for(let o=0,r=e.length;o<r;++o){const s=e[o],a=s.coverageAreas;let l=!1;for(let u=0,d=s.coverageAreas.length;!l&&u<d;++u){const h=a[u];if(t>=h.zoomMin&&t<=h.zoomMax){const m=Te.intersection(n,h.bbox,cMe);c(m)&&(l=!0)}}l&&i.push(s.credit)}return i}(this._attributionList,n,i)},ss.prototype.requestImage=function(e,t,n,i){const o=fb.loadImage(this,function aMe(e,t,n,i,o){const s=e._imageUrlSubdomains,a=(t+n+i)%s.length;return e._resource.getDerivedResource({url:e._imageUrlTemplate,request:o,templateValues:{quadkey:ss.tileXYToQuadKey(t,n,i),subdomain:s[a],culture:e._culture},queryParameters:{n:"z"}})}(this,e,t,n,i));if(c(o))return o.catch(function(r){return c(r.blob)&&0===r.blob.size?hq.EMPTY_IMAGE:Promise.reject(r)})},ss.prototype.pickFeatures=function(e,t,n,i,o){},ss.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){const r=1<<o;let s=0;e&r&&(s|=1),t&r&&(s|=2),i+=s}return i},ss.quadKeyToTileXY=function(e){let t=0,n=0;const i=e.length-1;for(let o=i;o>=0;--o){const r=1<<o,s=+e[i-o];1&s&&(t|=r),2&s&&(n|=r)}return{x:t,y:n,level:i}},ss._logoUrl=void 0,Object.defineProperties(ss,{logoUrl:{get:function(){return c(ss._logoUrl)||(ss._logoUrl=Jn("Assets/Images/bing_maps_credit.png")),ss._logoUrl},set:function(e){A.defined("value",e),ss._logoUrl=e}}});const cMe=new Te;ss._metadataCache={};const uMe=ss,mq=/{[^}]+}/g,_q={x:function pMe(e,t,n,i){return mb(e,"{x}",t)},y:function _Me(e,t,n,i){return mb(e,"{y}",n)},z:function bMe(e,t,n,i){return mb(e,"{z}",i)},s:function TMe(e,t,n,i){return e._subdomains[(t+n+i)%e._subdomains.length]},reverseX:function mMe(e,t,n,i){const o=e.tilingScheme.getNumberOfXTilesAtLevel(i)-t-1;return mb(e,"{reverseX}",o)},reverseY:function gMe(e,t,n,i){const o=e.tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;return mb(e,"{reverseY}",o)},reverseZ:function yMe(e,t,n,i){const o=e.maximumLevel;return mb(e,"{reverseZ}",c(o)&&i<o?o-i-1:i)},westDegrees:function AMe(e,t,n,i){return Kv(e,t,n,i),ul.west},southDegrees:function xMe(e,t,n,i){return Kv(e,t,n,i),ul.south},eastDegrees:function CMe(e,t,n,i){return Kv(e,t,n,i),ul.east},northDegrees:function EMe(e,t,n,i){return Kv(e,t,n,i),ul.north},westProjected:function wMe(e,t,n,i){return Qv(e,t,n,i),Hx.west},southProjected:function SMe(e,t,n,i){return Qv(e,t,n,i),Hx.south},eastProjected:function vMe(e,t,n,i){return Qv(e,t,n,i),Hx.east},northProjected:function IMe(e,t,n,i){return Qv(e,t,n,i),Hx.north},width:function DMe(e,t,n,i){return e.tileWidth},height:function PMe(e,t,n,i){return e.tileHeight}},dMe=Pn(_q,{i:function OMe(e,t,n,i,o,r,s){return Jv(e,t,n,i,o,r),pb.x},j:function RMe(e,t,n,i,o,r,s){return Jv(e,t,n,i,o,r),pb.y},reverseI:function LMe(e,t,n,i,o,r,s){return Jv(e,t,n,i,o,r),e.tileWidth-pb.x-1},reverseJ:function NMe(e,t,n,i,o,r,s){return Jv(e,t,n,i,o,r),e.tileHeight-pb.y-1},longitudeDegrees:function FMe(e,t,n,i,o,r,s){return O.toDegrees(o)},latitudeDegrees:function BMe(e,t,n,i,o,r,s){return O.toDegrees(r)},longitudeProjected:function kMe(e,t,n,i,o,r,s){return e2(e,0,0,0,o,r),_b.x},latitudeProjected:function UMe(e,t,n,i,o,r,s){return e2(e,0,0,0,o,r),_b.y},format:function VMe(e,t,n,i,o,r,s){return s}});function Vx(e){e=g(e,g.EMPTY_OBJECT),this._errorEvent=new Ye,A.defined("options.url",e.url);const t=zt.createIfNeeded(e.url),n=zt.createIfNeeded(e.pickFeaturesUrl);this._resource=t,this._urlSchemeZeroPadding=e.urlSchemeZeroPadding,this._getFeatureInfoFormats=e.getFeatureInfoFormats,this._pickFeaturesResource=n;let i=e.subdomains;i=Array.isArray(i)?i.slice():c(i)&&i.length>0?i.split(""):["a","b","c"],this._subdomains=i,this._tileWidth=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._minimumLevel=g(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._tilingScheme=g(e.tilingScheme,new Md({ellipsoid:e.ellipsoid})),this._rectangle=g(e.rectangle,this._tilingScheme.rectangle),this._rectangle=Te.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let o=e.credit;"string"==typeof o&&(o=new Yn(o)),this._credit=o,this._hasAlphaChannel=g(e.hasAlphaChannel,!0);const r=e.customTags,s=Pn(_q,r),a=Pn(dMe,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=g(e.enablePickFeatures,!0)}Object.defineProperties(Vx.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}}}),Vx.prototype.getTileCredits=function(e,t,n){},Vx.prototype.requestImage=function(e,t,n,i){return fb.loadImage(this,function fMe(e,t,n,i,o){Zv=!1,$v=!1;const r=e._resource,s=r.getUrlComponent(!0),a=e._tags,l={},u=s.match(mq);return c(u)&&u.forEach(function(d){const h=d.substring(1,d.length-1);c(a[h])&&(l[h]=a[h](e,t,n,i))}),r.getDerivedResource({request:o,templateValues:l})}(this,e,t,n,i))},Vx.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures||!c(this._pickFeaturesResource)||0===this._getFeatureInfoFormats.length)return;let r=0;const s=this;function a(u,d){return u.callback(d)}return function l(){if(r>=s._getFeatureInfoFormats.length)return Promise.resolve([]);const u=s._getFeatureInfoFormats[r],d=function hMe(e,t,n,i,o,r,s){Zv=!1,$v=!1,QM=!1,JM=!1;const a=e._pickFeaturesResource,l=a.getUrlComponent(!0),u=e._pickFeaturesTags,d={},h=l.match(mq);return c(h)&&h.forEach(function(m){const _=m.substring(1,m.length-1);c(u[_])&&(d[_]=u[_](e,t,n,i,o,r,s))}),a.getDerivedResource({templateValues:d})}(s,e,t,n,i,o,u.format);return++r,"json"===u.type?d.fetchJson().then(u.callback).catch(l):"xml"===u.type?d.fetchXML().then(u.callback).catch(l):"text"===u.type||"html"===u.type?d.fetchText().then(u.callback).catch(l):d.fetch({responseType:u.format}).then(a.bind(void 0,u)).catch(l)}()};let Zv=!1;const ul=new Te;let $v=!1;const Hx=new Te;let QM=!1;const pb=new V;let JM=!1;function mb(e,t,n){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){const i=e.urlSchemeZeroPadding[t];if("string"==typeof i){const o=i.length;o>1&&(n=n.length>=o?n:new Array(o-n.toString().length+1).join("0")+n)}}return n}function Kv(e,t,n,i){Zv||(e.tilingScheme.tileXYToRectangle(t,n,i,ul),ul.west=O.toDegrees(ul.west),ul.south=O.toDegrees(ul.south),ul.east=O.toDegrees(ul.east),ul.north=O.toDegrees(ul.north),Zv=!0)}function Qv(e,t,n,i){$v||(e.tilingScheme.tileXYToNativeRectangle(t,n,i,Hx),$v=!0)}const MMe=new Te,_b=new f;function Jv(e,t,n,i,o,r,s){if(QM)return;e2(e,0,0,0,o,r);const a=_b,l=e.tilingScheme.tileXYToNativeRectangle(t,n,i,MMe);pb.x=e.tileWidth*(a.x-l.west)/l.width|0,pb.y=e.tileHeight*(l.north-a.y)/l.height|0,QM=!0}const zMe=new Ce;function e2(e,t,n,i,o,r,s){if(!JM){if(e.tilingScheme.projection instanceof Qr)_b.x=O.toDegrees(o),_b.y=O.toDegrees(r);else{const a=zMe;a.longitude=o,a.latitude=r,e.tilingScheme.projection.project(a,_b)}JM=!0}}const om=Vx;function ru(e){om.call(this,e)}function gq(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 yq(e,t,n){const i=e.positionToTileXY(Te.southwest(t),n),o=e.positionToTileXY(Te.northeast(t),n);return(Math.abs(o.x-i.x)+1)*(Math.abs(o.y-i.y)+1)>4?0:n}ru._requestMetadata=function(){var e=(0,we.Z)(function*(t,n,i,o){try{const r=yield i.fetchXML();return ru._metadataSuccess(r,t,n,i,o)}catch(r){if(r instanceof $T)return ru._metadataFailure(t,n);throw r}});return function(t,n,i,o){return e.apply(this,arguments)}}(),ru.fromUrl=function(){var e=(0,we.Z)(function*(t,n){A.defined("url",t);const i=zt.createIfNeeded(t);i.appendForwardSlash();const o=i,r=i.getDerivedResource({url:"tilemapresource.xml"});n=g(n,g.EMPTY_OBJECT);const s=yield ru._requestMetadata(n,o,r);return new ru(s)});return function(t,n){return e.apply(this,arguments)}}(),c(Object.create)&&((ru.prototype=Object.create(om.prototype)).constructor=ru),ru._metadataSuccess=function(e,t,n,i,o){const r=/tileformat/i,s=/tileset/i,a=/tilesets/i,l=/boundingbox/i;let u,d,h;const m=[],_=e.childNodes[0].childNodes;for(let R=0;R<_.length;R++)if(r.test(_.item(R).nodeName))u=_.item(R);else if(a.test(_.item(R).nodeName)){h=_.item(R);const B=_.item(R).childNodes;for(let F=0;F<B.length;F++)s.test(B.item(F).nodeName)&&m.push(B.item(F))}else l.test(_.item(R).nodeName)&&(d=_.item(R));let p;if(!c(h)||!c(d))throw p=`Unable to find expected tilesets or bbox attributes in ${i.url}.`,c(o)&&Ka.reportError(void 0,o,o.errorEvent,p),new Pe(p);const y=g(t.fileExtension,u.getAttribute("extension")),b=g(t.tileWidth,parseInt(u.getAttribute("width"),10)),x=g(t.tileHeight,parseInt(u.getAttribute("height"),10));let C=g(t.minimumLevel,parseInt(m[0].getAttribute("order"),10));const w=g(t.maximumLevel,parseInt(m[m.length-1].getAttribute("order"),10)),v=h.getAttribute("profile");let I=t.tilingScheme;if(!c(I))if("geodetic"===v||"global-geodetic"===v)I=new Nd({ellipsoid:t.ellipsoid});else{if("mercator"!==v&&"global-mercator"!==v)throw p=`${i.url} specifies an unsupported profile attribute, ${v}.`,c(o)&&Ka.reportError(void 0,o,o.errorEvent,p),new Pe(p);I=new Md({ellipsoid:t.ellipsoid})}let P=Te.clone(t.rectangle);if(!c(P)){let R,B,F,S;if(g(t.flipXY,!1)?(F=new V(parseFloat(d.getAttribute("miny")),parseFloat(d.getAttribute("minx"))),S=new V(parseFloat(d.getAttribute("maxy")),parseFloat(d.getAttribute("maxx")))):(F=new V(parseFloat(d.getAttribute("minx")),parseFloat(d.getAttribute("miny"))),S=new V(parseFloat(d.getAttribute("maxx")),parseFloat(d.getAttribute("maxy")))),I.projection instanceof Qr||"geodetic"===v||"mercator"===v)R=Ce.fromDegrees(F.x,F.y),B=Ce.fromDegrees(S.x,S.y);else{const M=I.projection;R=M.unproject(F),B=M.unproject(S)}P=new Te(R.longitude,R.latitude,B.longitude,B.latitude)}return P=gq(P,I),C=yq(I,P,C),{url:n.getDerivedResource({url:`{z}/{x}/{reverseY}.${y}`}),tilingScheme:I,rectangle:P,tileWidth:b,tileHeight:x,minimumLevel:C,maximumLevel:w,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit}},ru._metadataFailure=function(e,t){const n=g(e.fileExtension,"png"),i=g(e.tileWidth,256),o=g(e.tileHeight,256),r=e.maximumLevel,s=c(e.tilingScheme)?e.tilingScheme:new Md({ellipsoid:e.ellipsoid});let a=g(e.rectangle,s.rectangle);a=gq(a,s);const l=yq(s,a,e.minimumLevel);return{url:t.getDerivedResource({url:`{z}/{x}/{reverseY}.${n}`}),tilingScheme:s,rectangle:a,tileWidth:i,tileHeight:o,minimumLevel:l,maximumLevel:r,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit}};const eI=ru;function bq(e){this.channel=e.channel,this.ellipsoid=e.ellipsoid,this.tilingScheme=void 0,this.version=void 0}function t2(){return(t2=(0,we.Z)(function*(e,t,n){try{!function HMe(e,t){let n,i;try{n=JSON.parse(e)}catch{n=JSON.parse(e.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}for(let o=0;o<n.layers.length;o++)if(n.layers[o].id===t.channel){i=n.layers[o];break}if(!c(i))throw new Pe(`Could not find layer with channel (id) of ${t.channel}.`);if(!c(i.version))throw new Pe(`Could not find a version in channel (id) ${t.channel}.`);if(t.version=i.version,c(n.projection)&&"flat"===n.projection)t.tilingScheme=new Nd({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Te(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:t.ellipsoid});else{if(c(n.projection)&&"mercator"!==n.projection)throw new Pe(`Unsupported projection ${n.projection}.`);t.tilingScheme=new Md({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:t.ellipsoid})}}(yield e.fetchText(),t)}catch(i){!function GMe(e,t,n){let i=`An error occurred while accessing ${t.url}.`;throw c(e)&&c(e.message)&&(i+=`: ${e.message}`),Ka.reportError(void 0,n,c(n)?n._errorEvent:void 0,i),new Pe(i)}(i,e,n)}})).apply(this,arguments)}function Rc(e){e=g(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 Yn(`<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="${Rc.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 Ye}bq.prototype.build=function(e){e._channel=this.channel,e._version=this.version,e._tilingScheme=this.tilingScheme},Object.defineProperties(Rc.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}}}),Rc.fromUrl=function(){var e=(0,we.Z)(function*(t,n,i){A.defined("url",t),A.defined("channel",n),i=g(i,{});const o=g(i.path,"/default_map"),r=zt.createIfNeeded(t).getDerivedResource({url:"/"===o[0]?o.substring(1):o});r.appendForwardSlash();const s=r.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),a=new bq(i);a.channel=n,yield function jMe(e,t,n){return t2.apply(this,arguments)}(s,a);const l=new Rc(i);return a.build(l),l._resource=r,l._url=t,l._path=o,l});return function(t,n,i){return e.apply(this,arguments)}}(),Rc.prototype.getTileCredits=function(e,t,n){},Rc.prototype.requestImage=function(e,t,n,i){const 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 fb.loadImage(this,o)},Rc.prototype.pickFeatures=function(e,t,n,i,o){},Rc._logoUrl=void 0,Object.defineProperties(Rc,{logoUrl:{get:function(){return c(Rc._logoUrl)||(Rc._logoUrl=Jn("Assets/Images/google_earth_credit.png")),Rc._logoUrl},set:function(e){A.defined("value",e),Rc._logoUrl=e}}});const WMe=Rc,qMe=/\/$/,Tq=new Yn('© <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 gb(e){const t=(e=g(e,g.EMPTY_OBJECT)).mapId;if(!c(t))throw new E("options.mapId is required.");const n=e.accessToken;if(!c(n))throw new E("options.accessToken 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;const i=zt.createIfNeeded(g(e.url,"https://{s}.tiles.mapbox.com/v4/"));this._mapId=t,this._accessToken=n;let o=g(e.format,"png");/\./.test(o)||(o=`.${o}`),this._format=o;let s,r=i.getUrlComponent();qMe.test(r)||(r+="/"),r+=`${t}/{z}/{x}/{y}${this._format}`,i.url=r,i.setQueryParameters({access_token:n}),c(e.credit)?(s=e.credit,"string"==typeof s&&(s=new Yn(s))):s=Tq,this._resource=i,this._imageryProvider=new om({url:i,credit:s,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(gb.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}}}),gb.prototype.getTileCredits=function(e,t,n){},gb.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)},gb.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)},gb._defaultCredit=Tq;const YMe=gb;function gg(e){e=g(e,g.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;const t=g(e.rectangle,Te.MAX_VALUE),n=new Nd({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 Ye;let i=e.credit;"string"==typeof i&&(i=new Yn(i)),this._credit=i,A.defined("options.url",e.url);const o=zt.createIfNeeded(e.url);this._resource=o,A.typeOf.number("options.tileWidth",e.tileWidth),A.typeOf.number("options.tileHeight",e.tileHeight),this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}function n2(e,t,n){return i2.apply(this,arguments)}function i2(){return(i2=(0,we.Z)(function*(e,t,n){try{return yield fb.loadImage(null,e)}catch(i){return function XMe(e,t,n,i){let o=`Failed to load image ${e.url}`;c(t)&&c(t.message)&&(o+=`: ${t.message}`);const r=Ka.reportError(i,n,c(n)?n._errorEvent:void 0,o,0,0,0,t);if(r.retry)return n2(e,n,r);throw c(n)&&(n._hasError=!0),new Pe(o)}(e,i,t,n)}})).apply(this,arguments)}Object.defineProperties(gg.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}}}),gg.fromUrl=function(){var e=(0,we.Z)(function*(t,n){A.defined("url",t);const i=zt.createIfNeeded(t),o=yield n2(i);n=g(n,g.EMPTY_OBJECT);const r=new gg({...n,url:t,tileWidth:o.width,tileHeight:o.height});return r._image=o,r});return function(t,n){return e.apply(this,arguments)}}(),gg.prototype.getTileCredits=function(e,t,n){},gg.prototype.requestImage=function(){var e=(0,we.Z)(function*(t,n,i,o){if(!this._hasError&&!c(this._image)){const r=yield n2(this._resource,this);return this._image=r,Ka.reportSuccess(this._errorEvent),r}return this._image});return function(t,n,i,o){return e.apply(this,arguments)}}(),gg.prototype.pickFeatures=function(e,t,n,i,o){};const ZMe=gg;function KMe(e){const t=[],n=e.features;for(let i=0;i<n.length;++i){const o=n[i],r=new ub;r.data=o,r.properties=o.properties,r.configureNameFromProperties(o.properties),r.configureDescriptionFromProperties(o.properties),c(o.geometry)&&"Point"===o.geometry.type&&(r.position=Ce.fromDegrees(o.geometry.coordinates[0],o.geometry.coordinates[1])),t.push(r)}return t}const o2="http://www.mapinfo.com/mxp";function t2e(e){const t=e.documentElement;if("MultiFeatureCollection"===t.localName&&t.namespaceURI===o2)return function n2e(e){const t=[],i=e.documentElement.getElementsByTagNameNS(o2,"Feature");for(let o=0;o<i.length;++o){const r=i[o],s={},a=r.getElementsByTagNameNS(o2,"Val");for(let u=0;u<a.length;++u){const d=a[u];if(d.hasAttribute("ref")){const h=d.getAttribute("ref"),m=d.textContent.trim();s[h]=m}}const l=new ub;l.data=r,l.properties=s,l.configureNameFromProperties(s),l.configureDescriptionFromProperties(s),t.push(l)}return t}(e);if("FeatureInfoResponse"===t.localName&&"http://www.esri.com/wms"===t.namespaceURI)return function i2e(e){const t=e.documentElement,n=[];let i;const o=t.getElementsByTagNameNS("*","FIELDS");if(o.length>0)for(let r=0;r<o.length;++r){const s=o[r];i={};const a=s.attributes;for(let l=0;l<a.length;++l){const u=a[l];i[u.name]=u.value}n.push(tI(s,i))}else{const r=t.getElementsByTagNameNS("*","FeatureInfo");for(let s=0;s<r.length;++s){const a=r[s];i={};const l=a.childNodes;for(let u=0;u<l.length;++u){const d=l[u];d.nodeType===Node.ELEMENT_NODE&&(i[d.localName]=d.textContent)}n.push(tI(a,i))}}return n}(e);if("FeatureCollection"===t.localName&&"http://www.opengis.net/wfs"===t.namespaceURI)return function o2e(e){const t=[],i=e.documentElement.getElementsByTagNameNS("http://www.opengis.net/gml","featureMember");for(let o=0;o<i.length;++o){const r=i[o],s={};r2(r,s),t.push(tI(r,s))}return t}(e);if("ServiceExceptionReport"===t.localName)throw new Pe((new XMLSerializer).serializeToString(t));return"msGMLOutput"===t.localName?function r2e(e){const t=[];let n;const i=e.documentElement.childNodes;for(let r=0;r<i.length;r++)if(i[r].nodeType===Node.ELEMENT_NODE){n=i[r];break}if(!c(n))throw new Pe("Unable to find first child of the feature info xml document");const o=n.childNodes;for(let r=0;r<o.length;++r){const s=o[r];if(s.nodeType===Node.ELEMENT_NODE){const a={};r2(s,a),t.push(tI(s,a))}}return t}(e):function s2e(e){const t=(new XMLSerializer).serializeToString(e),n=document.createElement("div"),i=document.createElement("pre");i.textContent=t,n.appendChild(i);const o=new ub;return o.data=e,o.description=n.innerHTML,[o]}(e)}function r2(e,t){let n=!0;for(let i=0;i<e.childNodes.length;++i){const o=e.childNodes[i];o.nodeType===Node.ELEMENT_NODE&&(n=!1),"Point"!==o.localName&&"LineString"!==o.localName&&"Polygon"!==o.localName&&"boundedBy"!==o.localName&&o.hasChildNodes()&&r2(o,t)&&(t[o.localName]=o.textContent)}return n}function tI(e,t){const n=new ub;return n.data=e,n.properties=t,n.configureNameFromProperties(t),n.configureDescriptionFromProperties(t),n}const a2e=/<body>\s*<\/body>/im,c2e=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,l2e=/<title>([\s\S]*)<\/title>/im;function Aq(e){if(a2e.test(e)||c2e.test(e))return;let t;const n=l2e.exec(e);n&&n.length>1&&(t=n[1]);const i=new ub;return i.name=t,i.description=e,i.data=e,[i]}const s2=function $Me(e,t,n){if(!c(e))throw new E("type is required.");if(this.type=e,!c(t))if("json"===e)t="application/json";else if("xml"===e)t="text/xml";else if("html"===e)t="text/html";else{if("text"!==e)throw new E('format is required when type is not "json", "xml", "html", or "text".');t="text/plain"}if(this.format=t,!c(n))if("json"===e)n=KMe;else if("xml"===e)n=t2e;else if("html"===e)n=Aq;else{if("text"!==e)throw new E('callback is required when type is not "json", "xml", "html", or "text".');n=Aq}this.callback=n};function Gx(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.clock",e.clock),A.typeOf.object("options.times",e.times),A.typeOf.func("options.requestImageFunction",e.requestImageFunction),A.typeOf.func("options.reloadFunction",e.reloadFunction),this._tileCache={},this._tilesRequestedForInterval=[];const 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)}function xq(e,t,n){return`${e}-${t}-${n}`}function Cq(e){const t=e._times;if(!c(t))return;const n=e._clock,i=n.currentTime,r=n.multiplier;if(!(n.canAnimate&&n.shouldAnimate||0===r))return;let s,a=t.indexOf(i);if(a<0)return;const l=t.get(a);return r>0?(s=re.secondsDifference(l.stop,i),++a):(s=re.secondsDifference(l.start,i),--a),s/=r,a>=0&&s<=5?t.get(a):void 0}function Eq(e,t,n){const i=e._times.indexOf(n.start),o=e._tileCache;let r=o[i];c(r)||(r=o[i]={});const s=t.key;if(c(r[s]))return!0;const a=function u2e(e){const t=e.split("-");if(3===t.length)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}(s),l=new h_({throttle:!1,throttleByServer:!0,type:f_.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(a.x,a.y,a.level,l,n);return!!c(u)&&(r[s]={promise:u,request:l},!0)}Object.defineProperties(Gx.prototype,{clock:{get:function(){return this._clock},set:function(e){if(!c(e))throw new E("value is required.");this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){if(!c(e))throw new E("value is required.");this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}}),Gx.prototype.getFromCache=function(e,t,n,i){const o=xq(e,t,n);let r;const s=this._tileCache[this._currentIntervalIndex];if(c(s)&&c(s[o])){const a=s[o];r=a.promise.catch(function(l){throw i.state=a.request.state,l}),delete s[o]}return r},Gx.prototype.checkApproachingInterval=function(e,t,n,i){const o=xq(e,t,n),r=this._tilesRequestedForInterval,s=Cq(this),a={key:o,priorityFunction:i.priorityFunction};(!c(s)||!Eq(this,a,s))&&r.push(a),r.length>=512&&r.splice(0,256)},Gx.prototype._clockOnTick=function(e){const i=this._times.indexOf(e.currentTime),o=this._currentIntervalIndex;if(i!==o){const s=this._tileCache[o];for(const a in s)s.hasOwnProperty(a)&&s[a].request.cancel();return delete this._tileCache[o],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,void this._reloadFunction()}const r=Cq(this);if(c(r)){const s=this._tilesRequestedForInterval;let a=!0;for(;a&&0!==s.length;){const l=s.pop();a=Eq(this,l,r),a||s.push(l)}}};const wq=Gx,d2e=[3034,3035,3042,3043,3044],f2e=[4471,4559];function td(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.url))throw new E("options.url is required.");if(!c(e.layers))throw new E("options.layers is required.");if(c(e.times)&&!c(e.clock))throw new E("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=g(e.getFeatureInfoUrl,e.url);const t=zt.createIfNeeded(e.url),n=zt.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(td.DefaultParameters,!0),n.setQueryParameters(td.GetFeatureInfoDefaultParameters,!0),c(e.parameters)&&t.setQueryParameters(vq(e.parameters)),c(e.getFeatureInfoParameters)&&n.setQueryParameters(vq(e.getFeatureInfoParameters));const i=this;this._reload=void 0,c(e.times)&&(this._timeDynamicImagery=new wq({clock:e.clock,times:e.times,requestImageFunction:function(s,a,l,u,d){return Sq(i,s,a,l,u,d)},reloadFunction:function(){c(i._reload)&&i._reload()}}));const 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=g(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof or?"EPSG:3857":"CRS:84");const s=o.crs.split(":");if("EPSG"===s[0]&&2===s.length){const a=Number(s[1]);(a>=4e3&&a<5e3&&!f2e.includes(a)||d2e.includes(a))&&(o.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else o.srs=g(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof or?"EPSG:3857":"EPSG:4326");t.setQueryParameters(o,!0),n.setQueryParameters(o,!0);const 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 om({url:t,pickFeaturesUrl:n,tilingScheme:g(e.tilingScheme,new Nd({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:g(e.getFeatureInfoFormats,td.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures})}function Sq(e,t,n,i,o,r){const s=c(r)?r.data:void 0,a=e._tileProvider;return c(s)&&a._resource.setQueryParameters(s),a.requestImage(t,n,i,o)}function vq(e){const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}Object.defineProperties(td.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}}}),td.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)},td.prototype.requestImage=function(e,t,n,i){let o;const r=this._timeDynamicImagery;let s;return c(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),c(o)||(o=Sq(this,e,t,n,i,s)),c(o)&&c(r)&&r.checkApproachingInterval(e,t,n,i),o},td.prototype.pickFeatures=function(e,t,n,i,o){const r=this._timeDynamicImagery;return function h2e(e,t,n,i,o,r,s){const a=c(s)?s.data:void 0,l=e._tileProvider;return c(a)&&l._pickFeaturesResource.setQueryParameters(a),l.pickFeatures(t,n,i,o,r)}(this,e,t,n,i,o,c(r)?r.currentInterval:void 0)},td.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),td.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),td.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new s2("json","application/json")),Object.freeze(new s2("xml","text/xml")),Object.freeze(new s2("text","text/html"))]);const Iq=td,p2e=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function jx(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.url))throw new E("options.url is required.");if(!c(e.layer))throw new E("options.layer is required.");if(!c(e.style))throw new E("options.style is required.");if(!c(e.tileMatrixSetID))throw new E("options.tileMatrixSetID is required.");if(c(e.times)&&!c(e.clock))throw new E("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;const t=zt.createIfNeeded(e.url),n=e.style,i=e.tileMatrixSetID,o=t.url,r=o.match(/{/g);!c(r)||1===r.length&&/{s}/.test(o)?(t.setQueryParameters(p2e),this._useKvp=!0):(t.setTemplateValues({style:n,Style:n,TileMatrixSet:i}),this._useKvp=!1),this._resource=t,this._layer=e.layer,this._style=n,this._tileMatrixSetID=i,this._tileMatrixLabels=e.tileMatrixLabels,this._format=g(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=c(e.tilingScheme)?e.tilingScheme:new Md({ellipsoid:e.ellipsoid}),this._tileWidth=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._minimumLevel=g(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=g(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;const s=this;this._reload=void 0,c(e.times)&&(this._timeDynamicImagery=new wq({clock:e.clock,times:e.times,requestImageFunction:function(h,m,_,p,y){return Dq(s,h,m,_,p,y)},reloadFunction:function(){c(s._reload)&&s._reload()}}));const a=this._tilingScheme.positionToTileXY(Te.southwest(this._rectangle),this._minimumLevel),l=this._tilingScheme.positionToTileXY(Te.northeast(this._rectangle),this._minimumLevel),u=(Math.abs(l.x-a.x)+1)*(Math.abs(l.y-a.y)+1);if(u>4)throw new E(`The imagery provider's rectangle and minimumLevel indicate that there are ${u} tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.`);this._errorEvent=new Ye;const d=e.credit;this._credit="string"==typeof d?new Yn(d):d,this._subdomains=e.subdomains,this._subdomains=Array.isArray(this._subdomains)?this._subdomains.slice():c(this._subdomains)&&this._subdomains.length>0?this._subdomains.split(""):["a","b","c"]}function Dq(e,t,n,i,o,r){const s=e._tileMatrixLabels,a=c(s)?s[i]:i.toString(),l=e._subdomains,u=e._dimensions,d=c(r)?r.data:void 0;let h,m;if(e._useKvp){let _={};_.tilematrix=a,_.layer=e._layer,_.style=e._style,_.tilerow=n,_.tilecol=t,_.tilematrixset=e._tileMatrixSetID,_.format=e._format,c(u)&&(_=Pn(_,u)),c(d)&&(_=Pn(_,d)),m={s:l[(t+n+i)%l.length]},h=e._resource.getDerivedResource({queryParameters:_,request:o}),h.setTemplateValues(m)}else m={TileMatrix:a,TileRow:n.toString(),TileCol:t.toString(),s:l[(t+n+i)%l.length]},h=e._resource.getDerivedResource({request:o}),h.setTemplateValues(m),c(u)&&h.setTemplateValues(u),c(d)&&h.setTemplateValues(d);return fb.loadImage(e,h)}Object.defineProperties(jx.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,c(this._reload)&&this._reload())}}}),jx.prototype.getTileCredits=function(e,t,n){},jx.prototype.requestImage=function(e,t,n,i){let o;const r=this._timeDynamicImagery;let s;return c(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),c(o)||(o=Dq(this,e,t,n,i,s)),c(o)&&c(r)&&r.checkApproachingInterval(e,t,n,i),o},jx.prototype.pickFeatures=function(e,t,n,i,o){};const Pq=jx,m2e={ARCGIS_MAPSERVER:Yv.fromUrl,BING:(e=(0,we.Z)(function*(t,n){return uMe.fromUrl(t,n)}),function(n,i){return e.apply(this,arguments)}),GOOGLE_EARTH:function(){var e=(0,we.Z)(function*(t,n){const i=n.channel;return delete n.channel,WMe.fromUrl(t,i,n)});return function(n,i){return e.apply(this,arguments)}}(),MAPBOX:(e,t)=>new YMe({url:e,...t}),SINGLE_TILE:ZMe.fromUrl,TMS:eI.fromUrl,URL_TEMPLATE:(e,t)=>new om({url:e,...t}),WMS:(e,t)=>new Iq({url:e,...t}),WMTS:(e,t)=>new Pq({url:e,...t})};var e;function cf(e){e=g(e,g.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 Ye}Object.defineProperties(cf.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(){}}}),cf.fromAssetId=function(){var e=(0,we.Z)(function*(t,n){A.typeOf.number("assetId",t),n=g(n,g.EMPTY_OBJECT);const i=cA._createEndpointResource(t,n),o=t.toString()+n.accessToken+n.server;let r=cf._endpointCache[o];c(r)||(r=i.fetchJson(),cf._endpointCache[o]=r);const s=yield r;if("IMAGERY"!==s.type)throw new Pe(`Cesium ion asset ${t} is not an imagery asset.`);let a;const l=s.externalType;if(c(l)){const d=m2e[l];if(!c(d))throw new Pe(`Unrecognized Cesium ion imagery type: ${l}`);const h={...s.options},m=h.url;delete h.url,a=yield d(m,h)}else a=yield eI.fromUrl(new cA(s,i));const u=new cf(n);return a.errorEvent.addEventListener(function(d){d.provider=u,u._errorEvent.raiseEvent(d)}),u._tileCredits=cA.getCreditsFromEndpoint(s,i),u._imageryProvider=a,u});return function(t,n){return e.apply(this,arguments)}}(),cf.prototype.getTileCredits=function(e,t,n){const i=this._imageryProvider.getTileCredits(e,t,n);return c(i)?this._tileCredits.concat(i):this._tileCredits},cf.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)},cf.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)},cf._endpointCache={};const nI=cf,iI=Object.freeze({AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4}),oI=function _2e(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.style,iI.AERIAL);return nI.fromAssetId(t)},Hi=Object.freeze({UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7});function yb(e,t,n,i,o){this.imageryLayer=e,this.x=t,this.y=n,this.level=i,this.request=void 0,0!==i&&(this.parent=e.getImageryFromCache(t/2|0,n/2|0,i-1)),this.state=Hi.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!c(o)&&e.ready&&(o=e.imageryProvider.tilingScheme.tileXYToRectangle(t,n,i)),this.rectangle=o}yb.createPlaceholder=function(e){const t=new yb(e,0,0,0);return t.addReference(),t.state=Hi.PLACEHOLDER,t},yb.prototype.addReference=function(){++this.referenceCount},yb.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.imageryLayer.removeImageryFromCache(this),c(this.parent)&&this.parent.releaseReference(),c(this.image)&&c(this.image.destroy)&&this.image.destroy(),c(this.texture)&&this.texture.destroy(),c(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),Xe(this),0):this.referenceCount},yb.prototype.processStateMachine=function(e,t,n){this.state===Hi.UNLOADED&&!n&&(this.state=Hi.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===Hi.RECEIVED&&(this.state=Hi.TRANSITIONING,this.imageryLayer._createTexture(e.context,this)),(this.state===Hi.TEXTURE_LOADED||this.state===Hi.READY&&t&&!this.texture)&&(this.state=Hi.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};const Oq=yb;function a2(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}a2.prototype.freeResources=function(){c(this.readyImagery)&&this.readyImagery.releaseReference(),c(this.loadingImagery)&&this.loadingImagery.releaseReference()},a2.prototype.processStateMachine=function(e,t,n){const i=this.loadingImagery,o=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===Hi.READY)return c(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this),!0;let s,r=i.parent;for(;c(r)&&(r.state!==Hi.READY||!this.useWebMercatorT&&!c(r.texture));)r.state!==Hi.FAILED&&r.state!==Hi.INVALID&&(s=s||r),r=r.parent;return this.readyImagery!==r&&(c(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=r,c(r)&&(r.addReference(),this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this))),!(i.state!==Hi.FAILED&&i.state!==Hi.INVALID||c(s)&&(s.processStateMachine(t,!this.useWebMercatorT,n),1))};const Rq=a2;function yi(e,t){this._imageryProvider=e,this._readyEvent=new Ye,this._errorEvent=new Ye,t=g(t,g.EMPTY_OBJECT),e=g(e,g.EMPTY_OBJECT),this.alpha=g(t.alpha,g(e._defaultAlpha,1)),this.nightAlpha=g(t.nightAlpha,g(e._defaultNightAlpha,1)),this.dayAlpha=g(t.dayAlpha,g(e._defaultDayAlpha,1)),this.brightness=g(t.brightness,g(e._defaultBrightness,yi.DEFAULT_BRIGHTNESS)),this.contrast=g(t.contrast,g(e._defaultContrast,yi.DEFAULT_CONTRAST)),this.hue=g(t.hue,g(e._defaultHue,yi.DEFAULT_HUE)),this.saturation=g(t.saturation,g(e._defaultSaturation,yi.DEFAULT_SATURATION)),this.gamma=g(t.gamma,g(e._defaultGamma,yi.DEFAULT_GAMMA)),this.splitDirection=g(t.splitDirection,yi.DEFAULT_SPLIT),this.minificationFilter=g(t.minificationFilter,g(e._defaultMinificationFilter,yi.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=g(t.magnificationFilter,g(e._defaultMagnificationFilter,yi.DEFAULT_MAGNIFICATION_FILTER)),this.show=g(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=g(t.rectangle,Te.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new Rq(Oq.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=g(t.colorToAlphaThreshold,yi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD)}Object.defineProperties(yi.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},ready:{get:function(){return c(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=$_.NONE,yi.DEFAULT_MINIFICATION_FILTER=Kn.LINEAR,yi.DEFAULT_MAGNIFICATION_FILTER=Jr.LINEAR,yi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004,yi.fromProviderAsync=function(e,t){A.typeOf.object("imageryProviderPromise",e);const n=new yi(void 0,t);return function C2e(e,t){l2.apply(this,arguments)}(n,Promise.resolve(e)),n},yi.fromWorldImagery=function(e){return e=g(e,g.EMPTY_OBJECT),yi.fromProviderAsync(oI({style:e.style}),e)},yi.prototype.isBaseLayer=function(){return this._isBaseLayer},yi.prototype.isDestroyed=function(){return!1},yi.prototype.destroy=function(){return Xe(this)};const Lq=new Te,Nq=new Te,c2=new Te,Mq=new Te;function Fq(e,t,n){return`${e}:${t}:${n}`}function Bq(e,t,n){return JSON.stringify([e,t,n])}yi.prototype.getImageryRectangle=function(){return Te.intersection(this._imageryProvider.rectangle,this._rectangle)},yi.prototype._createTileImagerySkeletons=function(e,t,n){const i=e.data;if(!c(t)||c(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||c(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;c(n)||(n=i.imagery.length);const o=this._imageryProvider;if(!this.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),i.imagery.splice(n,0,this._skeletonPlaceholder),!0;const r=o.tilingScheme.projection instanceof or&&e.rectangle.north<or.MaximumLatitude&&e.rectangle.south>-or.MaximumLatitude,s=Te.intersection(o.rectangle,this._rectangle,Lq);let a=Te.intersection(e.rectangle,s,Nq);if(!c(a)){if(!this.isBaseLayer())return!1;const L=s,M=e.rectangle;a=Nq,M.south>=L.north?a.north=a.south=L.north:M.north<=L.south?a.north=a.south=L.south:(a.south=Math.max(M.south,L.south),a.north=Math.min(M.north,L.north)),M.west>=L.east?a.west=a.east=L.east:M.east<=L.west?a.west=a.east=L.west:(a.west=Math.max(M.west,L.west),a.east=Math.min(M.east,L.east))}let l=0;a.south>0?l=a.south:a.north<0&&(l=a.north);let h=function A2e(e,t,n){const i=e._imageryProvider,o=i.tilingScheme,r=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof Qr?1:Math.cos(n),u=r.maximumRadius*o.rectangle.width*s/(i.tileWidth*o.getNumberOfXTilesAtLevel(0))/t,d=Math.log(u)/Math.log(2);return 0|Math.round(d)}(this,1*t.getLevelMaximumGeometricError(e.level),l);h=Math.max(0,h);const m=o.maximumLevel;if(h>m&&(h=m),c(o.minimumLevel)){const L=o.minimumLevel;h<L&&(h=L)}const _=o.tilingScheme,p=_.positionToTileXY(Te.northwest(a),h),y=_.positionToTileXY(Te.southeast(a),h);let b=e.rectangle.width/512,x=e.rectangle.height/512;const C=_.tileXYToRectangle(p.x,p.y,h);Math.abs(C.south-e.rectangle.north)<x&&p.y<y.y&&++p.y,Math.abs(C.east-e.rectangle.west)<b&&p.x<y.x&&++p.x;const w=_.tileXYToRectangle(y.x,y.y,h);Math.abs(w.north-e.rectangle.south)<x&&y.y>p.y&&--y.y,Math.abs(w.west-e.rectangle.east)<b&&y.x>p.x&&--y.x;const v=Te.clone(e.rectangle,Mq);let N,I=_.tileXYToRectangle(p.x,p.y,h),P=Te.intersection(I,s,c2);r?(_.rectangleToNativeRectangle(v,v),_.rectangleToNativeRectangle(I,I),_.rectangleToNativeRectangle(P,P),_.rectangleToNativeRectangle(s,s),N=_.tileXYToNativeRectangle.bind(_),b=v.width/512,x=v.height/512):N=_.tileXYToRectangle.bind(_);let R,S,B=0,F=1;!this.isBaseLayer()&&Math.abs(P.west-v.west)>=b&&(B=Math.min(1,(P.west-v.west)/v.width)),!this.isBaseLayer()&&Math.abs(P.north-v.north)>=x&&(F=Math.max(0,(P.north-v.south)/v.height));const D=F;for(let L=p.x;L<=y.x;L++)if(R=B,I=N(L,p.y,h),P=Te.simpleIntersection(I,s,c2),c(P)){B=Math.min(1,(P.east-v.west)/v.width),L===y.x&&(this.isBaseLayer()||Math.abs(P.east-v.east)<b)&&(B=1),F=D;for(let M=p.y;M<=y.y;M++){if(S=F,I=N(L,M,h),P=Te.simpleIntersection(I,s,c2),!c(P))continue;F=Math.max(0,(P.south-v.south)/v.height),M===y.y&&(this.isBaseLayer()||Math.abs(P.south-v.south)<x)&&(F=0);const U=new de(R,F,B,S),z=this.getImageryFromCache(L,M,h);i.imagery.splice(n,0,new Rq(z,U,r)),++n}}return!0},yi.prototype._calculateTextureTranslationAndScale=function(e,t){let n=t.readyImagery.rectangle,i=e.rectangle;if(t.useWebMercatorT){const l=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;n=l.rectangleToNativeRectangle(n,Lq),i=l.rectangleToNativeRectangle(i,Mq)}const o=i.width,r=i.height,s=o/n.width,a=r/n.height;return new de(s*(i.west-n.west)/o,a*(i.south-n.south)/r,s,a)},yi.prototype._requestImagery=function(e){const t=this._imageryProvider,n=this;function o(s){if(e.request.state===To.CANCELLED)return e.state=Hi.UNLOADED,void(e.request=void 0);e.state=Hi.FAILED,e.request=void 0,n._requestImageError=Ka.reportError(n._requestImageError,t,t.errorEvent,`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`,e.x,e.y,e.level,s),n._requestImageError.retry&&r()}function r(){const s=new h_({throttle:!1,throttleByServer:!0,type:f_.IMAGERY});e.request=s,e.state=Hi.TRANSITIONING;const a=t.requestImage(e.x,e.y,e.level,s);if(!c(a))return e.state=Hi.UNLOADED,void(e.request=void 0);c(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),a.then(function(l){!function i(s){if(!c(s))return o();e.image=s,e.state=Hi.RECEIVED,e.request=void 0,Ka.reportSuccess(n._requestImageError)}(l)}).catch(function(l){o(l)})}r()},yi.prototype._createTextureWebGL=function(e,t){const n=new vi({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),i=t.image;return c(i.internalFormat)?new Mn({context:e,pixelFormat:i.internalFormat,width:i.width,height:i.height,source:{arrayBufferView:i.bufferView},sampler:n}):new Mn({context:e,source:i,pixelFormat:this._imageryProvider.hasAlphaChannel?Ct.RGBA:Ct.RGB,sampler:n})},yi.prototype._createTexture=function(e,t){const n=this._imageryProvider,i=t.image;if(c(n.tileDiscardPolicy)){const r=n.tileDiscardPolicy;if(c(r)){if(!r.isReady())return void(t.state=Hi.RECEIVED);if(r.shouldDiscardImage(i))return void(t.state=Hi.INVALID)}}if(this.minificationFilter!==Kn.NEAREST&&this.minificationFilter!==Kn.LINEAR)throw new E("ImageryLayer minification filter must be NEAREST or LINEAR");const o=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof or?t.textureWebMercator=o:t.texture=o,t.image=void 0,t.state=Hi.TEXTURE_LOADED},yi.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter;const i=this.magnificationFilter;if(n===Kn.LINEAR&&i===Jr.LINEAR&&!Ct.isCompressedFormat(t.pixelFormat)&&O.isPowerOfTwo(t.width)&&O.isPowerOfTwo(t.height)){n=Kn.LINEAR_MIPMAP_LINEAR;const r=dn.maximumTextureFilterAnisotropy,s=Math.min(r,g(this._maximumAnisotropy,r)),a=Fq(n,i,s);let l=e.cache.imageryLayerMipmapSamplers;c(l)||(l={},e.cache.imageryLayerMipmapSamplers=l);let u=l[a];c(u)||(u=l[a]=new vi({wrapS:zi.CLAMP_TO_EDGE,wrapT:zi.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:s})),t.generateMipmap(s0.NICEST),t.sampler=u}else{const r=Fq(n,i,0);let s=e.cache.imageryLayerNonMipmapSamplers;c(s)||(s={},e.cache.imageryLayerNonMipmapSamplers=s);let a=s[r];c(a)||(a=s[r]=new vi({wrapS:zi.CLAMP_TO_EDGE,wrapT:zi.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=a}},yi.prototype._reprojectTexture=function(e,t,n){const i=t.textureWebMercator||t.texture,o=t.rectangle,r=e.context;if((n=g(n,!0))&&!(this._imageryProvider.tilingScheme.projection instanceof Qr)&&o.width/i.width>1e-5){const s=this;t.addReference();const a=new mA({persists:!0,owner:this,preExecute:function(l){!function T2e(e,t,n,i){let o=t.cache.imageryLayer_reproject;if(!c(o)){o=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){c(this.framebuffer)&&this.framebuffer.destroy(),c(this.vertexArray)&&this.vertexArray.destroy(),c(this.shaderProgram)&&this.shaderProgram.destroy()}};const b=new Float32Array(256);let x=0;for(let P=0;P<64;++P){const N=P/63;b[x++]=0,b[x++]=N,b[x++]=1,b[x++]=N}const C={position:0,webMercatorT:1},w=Gf.getRegularGridIndices(2,64),v=yn.createIndexBuffer({context:t,typedArray:w,usage:At.STATIC_DRAW,indexDatatype:Ot.UNSIGNED_SHORT});o.vertexArray=new gs({context:t,attributes:[{index:C.position,vertexBuffer:yn.createVertexBuffer({context:t,typedArray:b,usage:At.STATIC_DRAW}),componentsPerAttribute:2},{index:C.webMercatorT,vertexBuffer:yn.createVertexBuffer({context:t,sizeInBytes:512,usage:At.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:v});const I=new St({sources:["in vec4 position;\nin float webMercatorT;\n\nuniform vec2 u_textureDimensions;\n\nout vec2 v_textureCoordinates;\n\nvoid main()\n{\n v_textureCoordinates = vec2(position.x, webMercatorT);\n gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n"]});o.shaderProgram=di.fromCache({context:t,vertexShaderSource:I,fragmentShaderSource:"uniform sampler2D u_texture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n out_FragColor = texture(u_texture, v_textureCoordinates);\n}\n",attributeLocations:C}),o.sampler=new vi({wrapS:zi.CLAMP_TO_EDGE,wrapT:zi.CLAMP_TO_EDGE,minificationFilter:Kn.LINEAR,magnificationFilter:Jr.LINEAR})}n.sampler=o.sampler;const r=n.width,s=n.height;rI.textureDimensions.x=r,rI.textureDimensions.y=s,rI.texture=n;let a=Math.sin(i.south);const l=.5*Math.log((1+a)/(1-a));a=Math.sin(i.north);const d=1/(.5*Math.log((1+a)/(1-a))-l),h=new Mn({context:t,width:r,height:s,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});O.isPowerOfTwo(r)&&O.isPowerOfTwo(s)&&h.generateMipmap(s0.NICEST);const m=i.south,_=i.north,p=b2e;let y=0;for(let b=0;b<64;++b){const C=O.lerp(m,_,b/63);a=Math.sin(C);const v=(.5*Math.log((1+a)/(1-a))-l)*d;p[y++]=v,p[y++]=v}o.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(p),e.shaderProgram=o.shaderProgram,e.outputTexture=h,e.uniformMap=rI,e.vertexArray=o.vertexArray}(l,r,i,t.rectangle)},postExecute:function(l){t.texture=l,s._finalizeReprojectTexture(r,l),t.state=Hi.READY,t.releaseReference()},canceled:function(){t.state=Hi.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(a)}else n&&(t.texture=i),this._finalizeReprojectTexture(r,i),t.state=Hi.READY},yi.prototype.queueReprojectionCommands=function(e){const 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){c(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0},yi.prototype.getImageryFromCache=function(e,t,n,i){const o=Bq(e,t,n);let r=this._imageryCache[o];return c(r)||(r=new Oq(this,e,t,n,i),this._imageryCache[o]=r),r.addReference(),r},yi.prototype.removeImageryFromCache=function(e){const t=Bq(e.x,e.y,e.level);delete this._imageryCache[t]};const rI={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new V,texture:void 0},b2e=Hn.supportsTypedArrays()?new Float32Array(128):void 0;function l2(){return l2=(0,we.Z)(function*(e,t){let n;try{if(n=yield Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){!function x2e(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}(e._errorEvent,i)}}),l2.apply(this,arguments)}const Lc=yi,kq=function E2e(e){if(!c(e))throw new E("uri is required.");const t=new Zr(e);t.normalize();let n=t.path();const i=n.lastIndexOf("/");return-1!==i&&(n=n.substr(i+1)),n};function Wx(){this._cache={}}Wx.prototype.fromColor=function(e,t){if(!c(e))throw new E("color is required");if(!c(t))throw new E("size is required");return sI(void 0,void 0,e,t,this._cache)},Wx.prototype.fromUrl=function(e,t,n){if(!c(e))throw new E("url is required");if(!c(t))throw new E("color is required");if(!c(n))throw new E("size is required");return sI(e,void 0,t,n,this._cache)},Wx.prototype.fromMakiIconId=function(e,t,n){if(!c(e))throw new E("id is required");if(!c(t))throw new E("color is required");if(!c(n))throw new E("size is required");return sI(Jn(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)},Wx.prototype.fromText=function(e,t,n){if(!c(e))throw new E("text is required");if(!c(t))throw new E("color is required");if(!c(n))throw new E("size is required");return sI(void 0,e,t,n,this._cache)};const w2e=new Z;function Uq(e,t,n){const i=n/2.5;let o=i,r=i;t.width>t.height?r=i*(t.height/t.width):t.width<t.height&&(o=i*(t.width/t.height));const s=Math.round((n-o)/2),a=Math.round(7/24*n-r/2);e.globalCompositeOperation="destination-out",e.drawImage(t,s-1,a,o,r),e.drawImage(t,s,a-1,o,r),e.drawImage(t,s+1,a,o,r),e.drawImage(t,s,a+1,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=Z.BLACK.toCssColorString(),e.fillRect(s-1,a-1,o+2,r+2),e.globalCompositeOperation="destination-out",e.drawImage(t,s,a,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=Z.WHITE.toCssColorString(),e.fillRect(s-1,a-2,o+2,r+2)}const qx=new Array(4);function sI(e,t,n,i,o){qx[0]=e,qx[1]=t,qx[2]=n,qx[3]=i;const r=JSON.stringify(qx),s=o[r];if(c(s))return s;const a=document.createElement("canvas");a.width=i,a.height=i;const l=a.getContext("2d");if(function S2e(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,w2e).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()}(l,n,i),c(e)){const d=zt.createIfNeeded(e).fetchImage().then(function(h){return Uq(l,h,i),o[r]=a,a});return o[r]=d,d}if(c(t)){const u=j6(t,{font:`bold ${i}px sans-serif`});Uq(l,u,i)}return o[r]=a,a}const zq=Wx;function I2e(e){return e}function P2e(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(n){return Vq(e,n)})}:Vq(e,t)}function Vq(e,t){var n=t.id,i=t.bbox,o=null==t.properties?{}:t.properties,r=function O2e(e,t){var n=function D2e(e){if(null==e)return I2e;var t,n,i=e.scale[0],o=e.scale[1],r=e.translate[0],s=e.translate[1];return function(a,l){l||(t=n=0);var u=2,d=a.length,h=new Array(d);for(h[0]=(t+=a[0])*i+r,h[1]=(n+=a[1])*o+s;u<d;)h[u]=a[u],++u;return h}}(e.transform),i=e.arcs;function o(d,h){h.length&&h.pop();for(var m=i[d<0?~d:d],_=0,p=m.length;_<p;++_)h.push(n(m[_],_));d<0&&function v2e(e,t){for(var n,i=e.length,o=i-t;o<--i;)n=e[o],e[o++]=e[i],e[i]=n}(h,p)}function r(d){return n(d)}function s(d){for(var h=[],m=0,_=d.length;m<_;++m)o(d[m],h);return h.length<2&&h.push(h[0]),h}function a(d){for(var h=s(d);h.length<4;)h.push(h[0]);return h}function l(d){return d.map(a)}return function u(d){var m,h=d.type;switch(h){case"GeometryCollection":return{type:h,geometries:d.geometries.map(u)};case"Point":m=r(d.coordinates);break;case"MultiPoint":m=d.coordinates.map(r);break;case"LineString":m=s(d.arcs);break;case"MultiLineString":m=d.arcs.map(s);break;case"Polygon":m=l(d.arcs);break;case"MultiPolygon":m=d.arcs.map(l);break;default:return null}return{type:h,coordinates:m}}(t)}(e,t);return null==n&&null==i?{type:"Feature",properties:o,geometry:r}:null==i?{type:"Feature",id:n,properties:o,geometry:r}:{type:"Feature",id:n,bbox:i,properties:o,geometry:r}}function rm(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new Ye,this.setValue(e)}Object.defineProperties(rm.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}}),rm.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value},rm.prototype.setValue=function(e){const t=this._value;if(t!==e){const n=c(e),i=n&&"function"==typeof e.clone,o=n&&"function"==typeof e.equals;(!o||!e.equals(t))&&(this._hasClone=i,this._hasEquals=o,this._value=i?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}},rm.prototype.equals=function(e){return this===e||e instanceof rm&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))},rm.prototype.valueOf=function(){return this._value},rm.prototype.toString=function(){return String(this._value)};const Co=rm;function L2e(e){return new Co(e)}const _e=function N2e(e,t,n){return function R2e(e,t,n,i,o){return{configurable:i,get:function(){return this[t]},set:function(r){const s=this[t],a=this[n];c(a)&&(a(),this[n]=void 0),void 0!==r&&(!c(r)||!c(r.getValue))&&c(o)&&(r=o(r)),s!==r&&(this[t]=r,this._definitionChanged.raiseEvent(this,e,r,s)),c(r)&&c(r.definitionChanged)&&(this[n]=r.definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this,e,r,r)},this))}}}(e,`_${e.toString()}`,`_${e.toString()}Subscription`,g(t,!1),g(n,L2e))};function Yx(e){this._definitionChanged=new Ye,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=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._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Yx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),image:_e("image"),scale:_e("scale"),pixelOffset:_e("pixelOffset"),eyeOffset:_e("eyeOffset"),horizontalOrigin:_e("horizontalOrigin"),verticalOrigin:_e("verticalOrigin"),heightReference:_e("heightReference"),color:_e("color"),rotation:_e("rotation"),alignedAxis:_e("alignedAxis"),sizeInMeters:_e("sizeInMeters"),width:_e("width"),height:_e("height"),scaleByDistance:_e("scaleByDistance"),translucencyByDistance:_e("translucencyByDistance"),pixelOffsetScaleByDistance:_e("pixelOffsetScaleByDistance"),imageSubRegion:_e("imageSubRegion"),distanceDisplayCondition:_e("distanceDisplayCondition"),disableDepthTestDistance:_e("disableDepthTestDistance")}),Yx.prototype.clone=function(e){return c(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e):new Yx(this)},Yx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this._show,e.show),this.image=g(this._image,e.image),this.scale=g(this._scale,e.scale),this.pixelOffset=g(this._pixelOffset,e.pixelOffset),this.eyeOffset=g(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=g(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=g(this._verticalOrigin,e.verticalOrigin),this.heightReference=g(this._heightReference,e.heightReference),this.color=g(this._color,e.color),this.rotation=g(this._rotation,e.rotation),this.alignedAxis=g(this._alignedAxis,e.alignedAxis),this.sizeInMeters=g(this._sizeInMeters,e.sizeInMeters),this.width=g(this._width,e.width),this.height=g(this._height,e.height),this.scaleByDistance=g(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=g(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=g(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=g(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=g(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=g(this._disableDepthTestDistance,e.disableDepthTestDistance)};const u2=Yx;function bb(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new Ye,this.setCallback(e,t)}Object.defineProperties(bb.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}}),bb.prototype.getValue=function(e,t){return this._callback(e,t)},bb.prototype.setCallback=function(e,t){if(!c(e))throw new E("callback is required.");if(!c(t))throw new E("isConstant is required.");const n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)},bb.prototype.equals=function(e){return this===e||e instanceof bb&&this._callback===e._callback&&this._isConstant===e._isConstant};const d2=bb;function nd(){E.throwInstantiationError()}Object.defineProperties(nd.prototype,{isConstant:{get:E.throwInstantiationError},definitionChanged:{get:E.throwInstantiationError}}),nd.prototype.getValue=E.throwInstantiationError,nd.prototype.equals=E.throwInstantiationError,nd.equals=function(e,t){return e===t||c(e)&&e.equals(t)},nd.arrayEquals=function(e,t){if(e===t)return!0;if(!c(e)||!c(t)||e.length!==t.length)return!1;const n=e.length;for(let i=0;i<n;i++)if(!nd.equals(e[i],t[i]))return!1;return!0},nd.isConstant=function(e){return!c(e)||e.isConstant},nd.getValueOrUndefined=function(e,t,n){return c(e)?e.getValue(t,n):void 0},nd.getValueOrDefault=function(e,t,n,i){return c(e)?g(e.getValue(t,i),n):n},nd.getValueOrClonedDefault=function(e,t,n,i){let o;return c(e)&&(o=e.getValue(t,i)),c(o)||(o=n.clone(o)),o};const te=nd;function Tb(e){this._definitionChanged=new Ye,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(Tb.prototype,{isConstant:{get:function(){return te.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:_e("color")}),Tb.prototype.getType=function(e){return"Color"},Tb.prototype.getValue=function(e,t){return c(t)||(t={}),t.color=te.getValueOrClonedDefault(this._color,e,Z.WHITE,t.color),t},Tb.prototype.equals=function(e){return this===e||e instanceof Tb&&te.equals(this._color,e._color)};const kn=Tb,ta=Object.freeze({FIXED:0,INERTIAL:1});function Ab(){E.throwInstantiationError()}Object.defineProperties(Ab.prototype,{isConstant:{get:E.throwInstantiationError},definitionChanged:{get:E.throwInstantiationError},referenceFrame:{get:E.throwInstantiationError}}),Ab.prototype.getValue=E.throwInstantiationError,Ab.prototype.getValueInReferenceFrame=E.throwInstantiationError,Ab.prototype.equals=E.throwInstantiationError;const f2=new oe;Ab.convertToReferenceFrame=function(e,t,n,i,o){if(!c(t))return t;if(c(o)||(o=new f),n===i)return f.clone(t,o);let r=In.computeIcrfToFixedMatrix(e,f2);return c(r)||(r=In.computeTemeToPseudoFixedMatrix(e,f2)),n===ta.INERTIAL?oe.multiplyByVector(r,t,o):n===ta.FIXED?oe.multiplyByVector(oe.transpose(r,f2),t,o):void 0};const h2=Ab;function yg(e,t){this._definitionChanged=new Ye,this._value=f.clone(e),this._referenceFrame=g(t,ta.FIXED)}Object.defineProperties(yg.prototype,{isConstant:{get:function(){return!c(this._value)||this._referenceFrame===ta.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),yg.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ta.FIXED,t)},yg.prototype.setValue=function(e,t){let n=!1;f.equals(this._value,e)||(n=!0,this._value=f.clone(e)),c(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)},yg.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new E("time is required.");if(!c(t))throw new E("referenceFrame is required.");return h2.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)},yg.prototype.equals=function(e){return this===e||e instanceof yg&&f.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};const aI=yg;function cI(){E.throwInstantiationError()}Object.defineProperties(cI.prototype,{name:{get:E.throwInstantiationError},clock:{get:E.throwInstantiationError},entities:{get:E.throwInstantiationError},isLoading:{get:E.throwInstantiationError},changedEvent:{get:E.throwInstantiationError},errorEvent:{get:E.throwInstantiationError},loadingEvent:{get:E.throwInstantiationError},show:{get:E.throwInstantiationError},clustering:{get:E.throwInstantiationError}}),cI.prototype.update=function(e){E.throwInstantiationError()},cI.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};const bg=cI;function xr(e,t){if(e=g(e,g.EMPTY_OBJECT),c(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new E("disableDepthTestDistance must be greater than or equal to 0.0.");let n=e.translucencyByDistance,i=e.scaleByDistance,o=e.distanceDisplayCondition;if(c(n)){if(n.far<=n.near)throw new E("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=Bn.clone(n)}if(c(i)){if(i.far<=i.near)throw new E("scaleByDistance.far must be greater than scaleByDistance.near.");i=Bn.clone(i)}if(c(o)){if(o.far<=o.near)throw new E("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");o=Qn.clone(o)}this._show=g(e.show,!0),this._position=f.clone(g(e.position,f.ZERO)),this._actualPosition=f.clone(this._position),this._color=Z.clone(g(e.color,Z.WHITE)),this._outlineColor=Z.clone(g(e.outlineColor,Z.TRANSPARENT)),this._outlineWidth=g(e.outlineWidth,0),this._pixelSize=g(e.pixelSize,10),this._scaleByDistance=i,this._translucencyByDistance=n,this._distanceDisplayCondition=o,this._disableDepthTestDistance=g(e.disableDepthTestDistance,0),this._id=e.id,this._collection=g(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}const Hq=xr.SHOW_INDEX=0,Gq=xr.POSITION_INDEX=1,M2e=xr.COLOR_INDEX=2,F2e=xr.OUTLINE_COLOR_INDEX=3,B2e=xr.OUTLINE_WIDTH_INDEX=4,k2e=xr.PIXEL_SIZE_INDEX=5,U2e=xr.SCALE_BY_DISTANCE_INDEX=6,z2e=xr.TRANSLUCENCY_BY_DISTANCE_INDEX=7,V2e=xr.DISTANCE_DISPLAY_CONDITION_INDEX=8,H2e=xr.DISABLE_DEPTH_DISTANCE_INDEX=9;function su(e,t){const n=e._pointPrimitiveCollection;c(n)&&(n._updatePointPrimitive(e,t),e._dirty=!0)}xr.NUMBER_OF_PROPERTIES=10,Object.defineProperties(xr.prototype,{show:{get:function(){return this._show},set:function(e){if(!c(e))throw new E("value is required.");this._show!==e&&(this._show=e,su(this,Hq))}},position:{get:function(){return this._position},set:function(e){if(!c(e))throw new E("value is required.");const t=this._position;f.equals(t,e)||(f.clone(e,t),f.clone(e,this._actualPosition),su(this,Gq))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far distance must be greater than near distance.");const t=this._scaleByDistance;Bn.equals(t,e)||(this._scaleByDistance=Bn.clone(e,t),su(this,U2e))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far distance must be greater than near distance.");const t=this._translucencyByDistance;Bn.equals(t,e)||(this._translucencyByDistance=Bn.clone(e,t),su(this,z2e))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){if(!c(e))throw new E("value is required.");this._pixelSize!==e&&(this._pixelSize=e,su(this,k2e))}},color:{get:function(){return this._color},set:function(e){if(!c(e))throw new E("value is required.");const t=this._color;Z.equals(t,e)||(Z.clone(e,t),su(this,M2e))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!c(e))throw new E("value is required.");const t=this._outlineColor;Z.equals(t,e)||(Z.clone(e,t),su(this,F2e))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!c(e))throw new E("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,su(this,B2e))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new E("far must be greater than near");Qn.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=Qn.clone(e,this._distanceDisplayCondition),su(this,V2e))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(!c(e)||e<0)throw new E("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,su(this,H2e)}}},id:{get:function(){return this._id},set:function(e){this._id=e,c(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,su(this,Hq))}}}),xr.prototype.getPickId=function(e){return c(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},xr.prototype._getActualPosition=function(){return this._actualPosition},xr.prototype._setActualPosition=function(e){f.clone(e,this._actualPosition),su(this,Gq)};const jq=new de;xr._computeActualPosition=function(e,t,n){return t.mode===ce.SCENE3D?e:(k.multiplyByPoint(n,e,jq),Pr.computeActualEllipsoidPosition(t,jq))};const Wq=new de;xr._computeScreenSpacePosition=function(e,t,n,i){const o=k.multiplyByVector(e,de.fromElements(t.x,t.y,t.z,1,Wq),Wq);return Pr.worldToWindowCoordinates(n,o,i)},xr.prototype.computeScreenSpacePosition=function(e,t){const n=this._pointPrimitiveCollection;if(c(t)||(t=new V),!c(n))throw new E("PointPrimitive must be in a collection.");if(!c(e))throw new E("scene is required.");const o=xr._computeScreenSpacePosition(n.modelMatrix,this._actualPosition,e,t);if(c(o))return o.y=e.canvas.clientHeight-o.y,o},xr.getScreenSpaceBoundingBox=function(e,t,n){const i=e.pixelSize,o=.5*i,r=t.x-o,s=t.y-o,a=i,l=i;return c(n)||(n=new Vt),n.x=r,n.y=s,n.width=a,n.height=l,n},xr.prototype.equals=function(e){return this===e||c(e)&&this._id===e._id&&f.equals(this._position,e._position)&&Z.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&Z.equals(this._outlineColor,e._outlineColor)&&Bn.equals(this._scaleByDistance,e._scaleByDistance)&&Bn.equals(this._translucencyByDistance,e._translucencyByDistance)&&Qn.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},xr.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};const Nc=xr,lI="in vec4 v_color;\nin vec4 v_outlineColor;\nin float v_innerPercent;\nin float v_pixelDistance;\nin vec4 v_pickColor;\n\nvoid main()\n{\n // The distance in UV space from this fragment to the center of the point, at most 0.5.\n float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n // The max distance stops one pixel shy of the edge to leave space for anti-aliasing.\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);\n\n vec4 color = mix(v_outlineColor, v_color, innerAlpha);\n color.a *= wholeAlpha;\n\n// Fully transparent parts of the billboard are not pickable.\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\n if (color.a < 0.005) // matches 0/255 and 1/255\n {\n discard;\n }\n#else\n// The billboard is rendered twice. The opaque pass discards translucent fragments\n// and the translucent pass discards opaque fragments.\n#ifdef OPAQUE\n if (color.a < 0.995) // matches < 254/255\n {\n discard;\n }\n#else\n if (color.a >= 0.995) // matches 254/255 and 255/255\n {\n discard;\n }\n#endif\n#endif\n\n out_FragColor = czm_gammaCorrect(color);\n czm_writeLogDepth();\n}\n",j2e=Nc.SHOW_INDEX,p2=Nc.POSITION_INDEX,qq=Nc.COLOR_INDEX,W2e=Nc.OUTLINE_COLOR_INDEX,q2e=Nc.OUTLINE_WIDTH_INDEX,Y2e=Nc.PIXEL_SIZE_INDEX,Yq=Nc.SCALE_BY_DISTANCE_INDEX,Xq=Nc.TRANSLUCENCY_BY_DISTANCE_INDEX,Zq=Nc.DISTANCE_DISPLAY_CONDITION_INDEX,X2e=Nc.DISABLE_DEPTH_DISTANCE_INDEX,m2=Nc.NUMBER_OF_PROPERTIES,La={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepth:5};function au(e){e=g(e,g.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(m2),this._maxPixelSize=1,this._baseVolume=new Ae,this._baseVolumeWC=new Ae,this._baseVolume2D=new Ae,this._boundingVolume=new Ae,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=g(e.show,!0),this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this._modelMatrix=k.clone(k.IDENTITY),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.blendOption=g(e.blendOption,Ar.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=ce.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW,At.STATIC_DRAW];const t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}function $q(e){const t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}function _2(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;const t=[],n=e._pointPrimitives,i=n.length;for(let o=0,r=0;o<i;++o){const s=n[o];s&&(s._index=r++,t.push(s))}e._pointPrimitives=t}}Object.defineProperties(au.prototype,{length:{get:function(){return _2(this),this._pointPrimitives.length}}}),au.prototype.add=function(e){const t=new Nc(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t},au.prototype.remove=function(e){return!!this.contains(e)&&(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},au.prototype.removeAll=function(){$q(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},au.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},au.prototype.contains=function(e){return c(e)&&e._pointPrimitiveCollection===this},au.prototype.get=function(e){if(!c(e))throw new E("index is required.");return _2(this),this._pointPrimitives[e]},au.prototype.computeNewBuffersUsage=function(){const e=this._buffersUsage;let t=!1;const n=this._propertiesChanged;for(let i=0;i<m2;++i){const o=0===n[i]?At.STATIC_DRAW:At.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};const g2=new Vi;function Kq(e,t,n,i){const o=i._index,r=i._getActualPosition();e._mode===ce.SCENE3D&&(Ae.expand(e._baseVolume,r,e._baseVolume),e._boundingVolumeDirty=!0),Vi.fromCartesian(r,g2);const s=i.pixelSize,a=i.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,s+a);const u=g2.high;(0,n[La.positionHighAndSize])(o,u.x,u.y,u.z,s);const h=g2.low;(0,n[La.positionLowAndOutline])(o,h.x,h.y,h.z,a)}const uI=65536,Xx=256;function Qq(e,t,n,i){const o=i._index,r=i.color,s=i.getPickId(t).color,a=i.outlineColor;let l=Z.floatToByte(r.red),u=Z.floatToByte(r.green),d=Z.floatToByte(r.blue);const h=l*uI+u*Xx+d;l=Z.floatToByte(a.red),u=Z.floatToByte(a.green),d=Z.floatToByte(a.blue);const m=l*uI+u*Xx+d;l=Z.floatToByte(s.red),u=Z.floatToByte(s.green),d=Z.floatToByte(s.blue);const _=l*uI+u*Xx+d,p=Z.floatToByte(r.alpha)*uI+Z.floatToByte(a.alpha)*Xx+Z.floatToByte(s.alpha);(0,n[La.compressedAttribute0])(o,h,m,_,p)}function Jq(e,t,n,i){const o=i._index;let r=0,s=1,a=1,l=1;const u=i.translucencyByDistance;c(u)&&(r=u.near,s=u.nearValue,a=u.far,l=u.farValue,(1!==s||1!==l)&&(e._shaderTranslucencyByDistance=!0));let d=i.show&&i.clusterShow;0===i.color.alpha&&0===i.outlineColor.alpha&&(d=!1),s=O.clamp(s,0,1),s=1===s?255:255*s|0;const h=(d?1:0)*Xx+s;l=O.clamp(l,0,1),l=1===l?255:255*l|0,(0,n[La.compressedAttribute1])(o,h,l,r,a)}function e7(e,t,n,i){const o=i._index,r=n[La.scaleByDistance];let s=0,a=1,l=1,u=1;const d=i.scaleByDistance;c(d)&&(s=d.near,a=d.nearValue,l=d.far,u=d.farValue,(1!==a||1!==u)&&(e._shaderScaleByDistance=!0)),r(o,s,a,l,u)}function t7(e,t,n,i){const o=i._index,r=n[La.distanceDisplayConditionAndDisableDepth];let s=0,a=Number.MAX_VALUE;const l=i.distanceDisplayCondition;c(l)&&(s=l.near,a=l.far,s*=s,a*=a,e._shaderDistanceDisplayCondition=!0);let u=i.disableDepthTestDistance;u*=u,u>0&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1)),r(o,s,a,u)}function $2e(e,t,n,i){Kq(e,0,n,i),Qq(0,t,n,i),Jq(e,0,n,i),e7(e,0,n,i),t7(e,0,n,i)}function y2(e,t,n,i,o,r){let s;i.mode===ce.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;const a=[];for(let l=0;l<n;++l){const u=t[l],h=Nc._computeActualPosition(u.position,i,o);c(h)&&(u._setActualPosition(h),r?a.push(h):Ae.expand(s,h,s))}r&&Ae.fromPoints(a,s)}const J2e=[];au.prototype.update=function(e){if(_2(this),!this.show)return;this._maxTotalPointSize=dn.maximumAliasedPointSize,function K2e(e,t){const n=t.mode,i=e._pointPrimitives,o=e._pointPrimitivesToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==ce.SCENE3D&&!k.equals(r,e.modelMatrix)?(e._mode=n,k.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===ce.SCENE3D||n===ce.SCENE2D||n===ce.COLUMBUS_VIEW)&&y2(e,i,i.length,t,r,!0)):n===ce.MORPHING?y2(e,i,i.length,t,r,!0):(n===ce.SCENE2D||n===ce.COLUMBUS_VIEW)&&y2(e,o,e._pointPrimitivesToUpdateIndex,t,r,!1)}(this,e);const n=this._pointPrimitives.length,i=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,r=this._propertiesChanged;let a;const l=e.context,u=e.passes,d=u.pick;if(this._createVertexArray||!d&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let I=0;I<m2;++I)r[I]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=function Z2e(e,t,n){return new f6(e,[{index:La.positionHighAndSize,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[p2]},{index:La.positionLowAndShow,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[p2]},{index:La.compressedAttribute0,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[qq]},{index:La.compressedAttribute1,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[Xq]},{index:La.scaleByDistance,componentsPerAttribute:4,componentDatatype:ee.FLOAT,usage:n[Yq]},{index:La.distanceDisplayConditionAndDisableDepth,componentsPerAttribute:3,componentDatatype:ee.FLOAT,usage:n[Zq]}],t)}(l,n,this._buffersUsage),a=this._vaf.writers;for(let I=0;I<n;++I){const P=this._pointPrimitives[I];P._dirty=!1,$2e(this,l,a,P)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(o>0){const I=J2e;I.length=0,(r[p2]||r[q2e]||r[Y2e])&&I.push(Kq),(r[qq]||r[W2e])&&I.push(Qq),(r[j2e]||r[Xq])&&I.push(Jq),r[Yq]&&I.push(e7),(r[Zq]||r[X2e])&&I.push(t7);const P=I.length;if(a=this._vaf.writers,o/n>.1){for(let N=0;N<o;++N){const R=i[N];R._dirty=!1;for(let B=0;B<P;++B)I[B](this,l,a,R)}this._vaf.commit()}else{for(let N=0;N<o;++N){const R=i[N];R._dirty=!1;for(let B=0;B<P;++B)I[B](this,l,a,R);this._vaf.subCommit(R._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>1.5*n&&(i.length=n),!c(this._vaf)||!c(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,Ae.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let h,m=k.IDENTITY;e.mode===ce.SCENE3D?(m=this.modelMatrix,h=Ae.clone(this._baseVolumeWC,this._boundingVolume)):h=Ae.clone(this._baseVolume2D,this._boundingVolume),function Q2e(e,t,n){const o=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;n.radius+=o}(this,e,h);const _=this._blendOption!==this.blendOption;let p,y,b,x,C,w;this._blendOption=this.blendOption,_&&(this._rsOpaque=this._blendOption===Ar.OPAQUE||this._blendOption===Ar.OPAQUE_AND_TRANSLUCENT?Lt.fromCache({depthTest:{enabled:!0,func:ie.LEQUAL},depthMask:!0}):void 0,this._rsTranslucent=this._blendOption===Ar.TRANSLUCENT||this._blendOption===Ar.OPAQUE_AND_TRANSLUCENT?Lt.fromCache({depthTest:{enabled:!0,func:ie.LEQUAL},depthMask:!1,blending:eo.ALPHA_BLEND}):void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance,(_||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(p=new St({sources:['uniform float u_maxTotalPointSize;\n\nin vec4 positionHighAndSize;\nin vec4 positionLowAndOutline;\nin vec4 compressedAttribute0; // color, outlineColor, pick color\nin vec4 compressedAttribute1; // show, translucency by distance, some free space\nin vec4 scaleByDistance; // near, nearScale, far, farScale\nin vec3 distanceDisplayConditionAndDisableDepth; // near, far, disableDepthTestDistance\n\nout vec4 v_color;\nout vec4 v_outlineColor;\nout float v_innerPercent;\nout float v_pixelDistance;\nout vec4 v_pickColor;\n\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\n\nvoid main()\n{\n // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndSize.xyz;\n vec3 positionLow = positionLowAndOutline.xyz;\n float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\n float totalSize = positionHighAndSize.w + outlineWidthBothSides;\n float outlinePercent = outlineWidthBothSides / totalSize;\n // Scale in response to browser-zoom.\n totalSize *= czm_pixelRatio;\n\n float temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float show = floor(temp);\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 color;\n vec4 outlineColor;\n vec4 pickColor;\n\n // compressedAttribute0.z => pickColor.rgb\n\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n\n // compressedAttribute0.x => color.rgb\n\n temp = compressedAttribute0.x * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n // compressedAttribute0.y => outlineColor.rgb\n\n temp = compressedAttribute0.y * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n\n // compressedAttribute0.w => color.a, outlineColor.a, pickColor.a\n\n temp = compressedAttribute0.w * SHIFT_RIGHT8;\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor = pickColor / 255.0;\n\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor /= 255.0;\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\n if (totalSize > 0.0) {\n // Add padding for anti-aliasing on both sides.\n totalSize += 3.0;\n }\n\n // Clamp to max point size.\n totalSize = min(totalSize, u_maxTotalPointSize);\n // If size is too small, push vertex behind near plane for clipping.\n // Note that context.minimumAliasedPointSize "will be at most 1.0".\n if (totalSize < 1.0)\n {\n positionEC.xyz = vec3(0.0);\n totalSize = 1.0;\n }\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency < 0.004)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef DISTANCE_DISPLAY_CONDITION\n float nearSq = distanceDisplayConditionAndDisableDepth.x;\n float farSq = distanceDisplayConditionAndDisableDepth.y;\n if (lengthSq < nearSq || lengthSq > farSq) {\n // push vertex behind camera to force it to be clipped\n positionEC.xyz = vec3(0.0, 0.0, 1.0);\n }\n#endif\n\n gl_Position = czm_projection * positionEC;\n czm_vertexLogDepth();\n\n#ifdef DISABLE_DEPTH_DISTANCE\n float disableDepthTestDistance = distanceDisplayConditionAndDisableDepth.z;\n if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n {\n disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n }\n\n if (disableDepthTestDistance != 0.0)\n {\n // Don\'t try to "multiply both sides" by w. Greater/less-than comparisons won\'t work for negative values of w.\n float zclip = gl_Position.z / gl_Position.w;\n bool clipped = (zclip < -1.0 || zclip > 1.0);\n if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n {\n // Position z on the near plane.\n gl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\n czm_vertexLogDepth(vec4(czm_currentFrustum.x));\n#endif\n }\n }\n#endif\n\n v_color = color;\n v_color.a *= translucency * show;\n v_outlineColor = outlineColor;\n v_outlineColor.a *= translucency * show;\n\n v_innerPercent = 1.0 - outlinePercent;\n v_pixelDistance = 2.0 / totalSize;\n gl_PointSize = totalSize * show;\n gl_Position *= show;\n\n v_pickColor = pickColor;\n}\n']}),this._shaderScaleByDistance&&p.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&p.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&p.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&p.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===Ar.OPAQUE_AND_TRANSLUCENT&&(y=new St({defines:["OPAQUE"],sources:[lI]}),this._sp=di.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:p,fragmentShaderSource:y,attributeLocations:La}),y=new St({defines:["TRANSLUCENT"],sources:[lI]}),this._spTranslucent=di.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:p,fragmentShaderSource:y,attributeLocations:La})),this._blendOption===Ar.OPAQUE&&(y=new St({sources:[lI]}),this._sp=di.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:p,fragmentShaderSource:y,attributeLocations:La})),this._blendOption===Ar.TRANSLUCENT&&(y=new St({sources:[lI]}),this._spTranslucent=di.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:p,fragmentShaderSource:y,attributeLocations:La})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);const v=e.commandList;if(u.render||d){const I=this._colorCommands,P=this._blendOption===Ar.OPAQUE,N=this._blendOption===Ar.OPAQUE_AND_TRANSLUCENT;b=this._vaf.va,x=b.length,I.length=x;const R=N?2*x:x;for(w=0;w<R;++w){const B=P||N&&w%2==0;C=I[w],c(C)||(C=I[w]=new $t),C.primitiveType=Tt.POINTS,C.pass=B||!N?Ue.OPAQUE:Ue.TRANSLUCENT,C.owner=this;const F=N?Math.floor(w/2):w;C.boundingVolume=h,C.modelMatrix=m,C.shaderProgram=B?this._sp:this._spTranslucent,C.uniformMap=this._uniforms,C.vertexArray=b[F].va,C.renderState=B?this._rsOpaque:this._rsTranslucent,C.debugShowBoundingVolume=this.debugShowBoundingVolume,C.pickId="v_pickColor",v.push(C)}}},au.prototype.isDestroyed=function(){return!1},au.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),$q(this._pointPrimitives),Xe(this)};const n7=au,i7=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class T2{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,i]=new Uint8Array(t,0,2);if(219!==n)throw new Error("Data does not appear to be in a KDBush format.");const o=i>>4;if(1!==o)throw new Error(`Got v${o} data when expected v1.`);const r=i7[15&i];if(!r)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new T2(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;const r=i7.indexOf(this.ArrayType),s=2*t*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(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,8,t),this.coords=new this.ArrayType(this.data,8+a+l,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+s+a+l),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+l,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+r]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){const i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=n,i}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return A2(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().");const{ids:r,coords:s,nodeSize:a}=this,l=[0,r.length-1,0],u=[];for(;l.length;){const d=l.pop()||0,h=l.pop()||0,m=l.pop()||0;if(h-m<=a){for(let b=m;b<=h;b++){const x=s[2*b],C=s[2*b+1];x>=t&&x<=i&&C>=n&&C<=o&&u.push(r[b])}continue}const _=m+h>>1,p=s[2*_],y=s[2*_+1];p>=t&&p<=i&&y>=n&&y<=o&&u.push(r[_]),(0===d?t<=p:n<=y)&&(l.push(m),l.push(_-1),l.push(1-d)),(0===d?i>=p:o>=y)&&(l.push(_+1),l.push(h),l.push(1-d))}return u}within(t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:r,nodeSize:s}=this,a=[0,o.length-1,0],l=[],u=i*i;for(;a.length;){const d=a.pop()||0,h=a.pop()||0,m=a.pop()||0;if(h-m<=s){for(let b=m;b<=h;b++)r7(r[2*b],r[2*b+1],t,n)<=u&&l.push(o[b]);continue}const _=m+h>>1,p=r[2*_],y=r[2*_+1];r7(p,y,t,n)<=u&&l.push(o[_]),(0===d?t-i<=p:n-i<=y)&&(a.push(m),a.push(_-1),a.push(1-d)),(0===d?t+i>=p:n+i>=y)&&(a.push(_+1),a.push(h),a.push(1-d))}return l}}function A2(e,t,n,i,o,r){if(o-i<=n)return;const s=i+o>>1;o7(e,t,s,i,o,r),A2(e,t,n,i,s-1,1-r),A2(e,t,n,s+1,o,1-r)}function o7(e,t,n,i,o,r){for(;o>i;){if(o-i>600){const u=o-i+1,d=n-i+1,h=Math.log(u),m=.5*Math.exp(2*h/3),_=.5*Math.sqrt(h*m*(u-m)/u)*(d-u/2<0?-1:1);o7(e,t,n,Math.max(i,Math.floor(n-d*m/u+_)),Math.min(o,Math.floor(n+(u-d)*m/u+_)),r)}const s=t[2*n+r];let a=i,l=o;for($x(e,t,i,n),t[2*o+r]>s&&$x(e,t,i,o);a<l;){for($x(e,t,a,l),a++,l--;t[2*a+r]<s;)a++;for(;t[2*l+r]>s;)l--}t[2*i+r]===s?$x(e,t,i,l):(l++,$x(e,t,l,o)),l<=n&&(i=l+1),n<=l&&(o=l-1)}}function $x(e,t,n,i){x2(e,n,i),x2(t,2*n,2*i),x2(t,2*n+1,2*i+1)}function x2(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function r7(e,t,n,i){const o=e-n,r=t-i;return o*o+r*r}function id(e){e=g(e,g.EMPTY_OBJECT),this._enabled=g(e.enabled,!1),this._pixelRange=g(e.pixelRange,80),this._minimumClusterSize=g(e.minimumClusterSize,2),this._clusterBillboards=g(e.clusterBillboards,!0),this._clusterLabels=g(e.clusterLabels,!0),this._clusterPoints=g(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 Ye,this.show=g(e.show,!0)}function s7(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}const eFe=new Vt;function a7(e,t,n,i,o){if(c(e._labelCollection)&&i._clusterLabels?o=UN.getScreenSpaceBoundingBox(e,t,o):c(e._billboardCollection)&&i._clusterBillboards?o=Qo.getScreenSpaceBoundingBox(e,t,o):c(e._pointPrimitiveCollection)&&i._clusterPoints&&(o=Nc.getScreenSpaceBoundingBox(e,t,o)),s7(o,n),i._clusterLabels&&!c(e._labelCollection)&&c(e.id)&&l7(i,e.id.id)&&c(e.id._label)){const s=i._labelCollection.get(i._collectionIndicesByEntity[e.id.id].labelIndex),a=UN.getScreenSpaceBoundingBox(s,t,eFe);s7(a,n),o=Vt.union(o,a,o)}return o}function tFe(e,t){e.clusterShow=!0,!c(e._labelCollection)&&c(e.id)&&l7(t,e.id.id)&&c(e.id._label)&&(t._labelCollection.get(t._collectionIndicesByEntity[e.id.id].labelIndex).clusterShow=!0)}function c7(e,t,n,i){const 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 l7(e,t){return c(e)&&c(e._collectionIndicesByEntity[t])&&c(e._collectionIndicesByEntity[t].labelIndex)}function C2(e,t,n,i,o){if(!c(e))return;const r=e.length;for(let s=0;s<r;++s){const a=e.get(s);if(a.clusterShow=!1,!a.show||o._scene.mode===ce.SCENE3D&&!i.isPointVisible(a.position))continue;const l=o._clusterLabels&&c(a._labelCollection),u=o._clusterBillboards&&c(a.id._billboard),d=o._clusterPoints&&c(a.id._point);if(l&&(d||u))continue;const h=a.computeScreenSpacePosition(n);c(h)&&t.push({index:s,collection:e,clustered:!1,coord:h})}}const nFe=new Vt,iFe=new Vt,oFe=new Vt;function E2(e,t,n,i){return function(o){let r=this[e];c(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let a,l,s=this._collectionIndicesByEntity[o.id];if(c(s)||(s=this._collectionIndicesByEntity[o.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),c(r)&&c(s[i]))return r.get(s[i]);c(r)||(r=this[e]=new t({scene:this._scene}));const u=this[n];u.length>0?(a=u.shift(),l=r.get(a)):(l=r.add(),a=r.length-1),s[i]=a;const d=this;return Promise.resolve().then(function(){d._clusterDirty=!0}),l}}function w2(e,t){const n=e._collectionIndicesByEntity[t];!c(n.billboardIndex)&&!c(n.labelIndex)&&!c(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}function S2(e){if(!c(e))return;const t=e.length;for(let n=0;n<t;++n)e.get(n).clusterShow=!0}id.prototype._initialize=function(e){this._scene=e;const t=function rFe(e){return function(t){if(c(t)&&t<.05||!e.enabled)return;const n=e._scene,i=e._labelCollection,o=e._billboardCollection,r=e._pointCollection;if(!c(i)&&!c(o)&&!c(r)||!e._clusterBillboards&&!e._clusterLabels&&!e._clusterPoints)return;let s=e._clusterLabelCollection,a=e._clusterBillboardCollection,l=e._clusterPointCollection;c(s)?s.removeAll():s=e._clusterLabelCollection=new xv({scene:n}),c(a)?a.removeAll():a=e._clusterBillboardCollection=new sx({scene:n}),c(l)?l.removeAll():l=e._clusterPointCollection=new n7;const u=e._pixelRange,d=e._minimumClusterSize,h=e._previousClusters,m=[],_=e._previousHeight,p=n.camera.positionCartographic.height,x=new _O(n.ellipsoid,n.camera.positionWC),C=[];let w,v,I,P,N,R,B,F,S,D,L,M;if(e._clusterLabels&&C2(i,C,n,x,e),e._clusterBillboards&&C2(o,C,n,x,e),e._clusterPoints&&C2(r,C,n,x,e),C.length>0){const U=new T2(C.length,64,Uint32Array);for(let z=0;z<C.length;++z)U.add(C[z].coord.x,C[z].coord.y);if(U.finish(),p<_)for(I=h.length,w=0;w<I;++w){const z=h[w];if(!x.isPointVisible(z.position))continue;const G=Qo._computeScreenSpacePosition(k.IDENTITY,z.position,f.ZERO,V.ZERO,n);if(!c(G))continue;const W=1-p/_;let q=z.width=z.width*W,j=z.height=z.height*W;for(q=Math.max(q,z.minimumWidth),j=Math.max(j,z.minimumHeight),N=U.range(G.x-.5*q,G.y-.5*j,G.x+q,G.y+j),R=N.length,D=0,S=[],v=0;v<R;++v)B=N[v],F=C[B],F.clustered||(++D,L=F.collection,M=F.index,S.push(L.get(M).id));if(D>=d)for(c7(z.position,D,S,e),m.push(z),v=0;v<R;++v)C[N[v]].clustered=!0}for(I=C.length,w=0;w<I;++w){const z=C[w];if(z.clustered)continue;z.clustered=!0,L=z.collection,M=z.index;const G=L.get(M);P=a7(G,z.coord,u,e,nFe);const W=Vt.clone(P,iFe);N=U.range(P.x,P.y,P.x+P.width,P.y+P.height),R=N.length;const q=f.clone(G.position);for(D=1,S=[G.id],v=0;v<R;++v)if(B=N[v],F=C[B],!F.clustered){const j=F.collection.get(F.index),Q=a7(j,F.coord,u,e,oFe);f.add(j.position,q,q),Vt.union(W,Q,W),++D,S.push(j.id)}if(D>=d){const j=f.multiplyByScalar(q,1/D,q);for(c7(j,D,S,e),m.push({position:j,width:W.width,height:W.height,minimumWidth:P.width,minimumHeight:P.height}),v=0;v<R;++v)C[N[v]].clustered=!0}else tFe(G,e)}}0===s.length&&(s.destroy(),e._clusterLabelCollection=void 0),0===a.length&&(a.destroy(),e._clusterBillboardCollection=void 0),0===l.length&&(l.destroy(),e._clusterPointCollection=void 0),e._previousClusters=m,e._previousHeight=p}}(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(id.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),id.prototype.getLabel=E2("_labelCollection",xv,"_unusedLabelIndices","labelIndex"),id.prototype.removeLabel=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!c(this._labelCollection)||!c(t)||!c(t.labelIndex))return;const n=t.labelIndex;t.labelIndex=void 0,w2(this,e.id);const i=this._labelCollection.get(n);i.show=!1,i.text="",i.id=void 0,this._unusedLabelIndices.push(n),this._clusterDirty=!0},id.prototype.getBillboard=E2("_billboardCollection",sx,"_unusedBillboardIndices","billboardIndex"),id.prototype.removeBillboard=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!c(this._billboardCollection)||!c(t)||!c(t.billboardIndex))return;const n=t.billboardIndex;t.billboardIndex=void 0,w2(this,e.id);const i=this._billboardCollection.get(n);i.id=void 0,i.show=!1,i.image=void 0,this._unusedBillboardIndices.push(n),this._clusterDirty=!0},id.prototype.getPoint=E2("_pointCollection",n7,"_unusedPointIndices","pointIndex"),id.prototype.removePoint=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!c(this._pointCollection)||!c(t)||!c(t.pointIndex))return;const n=t.pointIndex;t.pointIndex=void 0,w2(this,e.id);const i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0},id.prototype.update=function(e){if(!this.show)return;let t;c(this._labelCollection)&&this._labelCollection.length>0&&0===this._labelCollection.get(0)._glyphs.length&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),c(this._billboardCollection)&&this._billboardCollection.length>0&&!c(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,function sFe(e){e.enabled||(c(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),c(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),c(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,S2(e._labelCollection),S2(e._billboardCollection),S2(e._pointCollection))}(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),c(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),c(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),c(this._clusterPointCollection)&&this._clusterPointCollection.update(e),c(this._labelCollection)&&this._labelCollection.update(e),c(this._billboardCollection)&&this._billboardCollection.update(e),c(this._pointCollection)&&this._pointCollection.update(e)},id.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(),c(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};const v2=id,od=function aFe(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.componentDatatype))throw new E("options.componentDatatype is required.");if(!c(e.componentsPerAttribute))throw new E("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new E("options.componentsPerAttribute must be between 1 and 4.");if(!c(e.value))throw new E("options.value is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=g(e.normalize,!1),this.value=e.value},I2=[Qr,or],cFe=I2.length,u7=Math.cos(O.toRadians(30)),d7=Math.cos(O.toRadians(150));function sm(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions;if(!c(t)||t.length<2)throw new E("At least two positions are required.");if(c(e.arcType)&&e.arcType!==ni.GEODESIC&&e.arcType!==ni.RHUMB)throw new E("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=g(e.width,1),this._positions=t,this.granularity=g(e.granularity,9999),this.loop=g(e.loop,!1),this.arcType=g(e.arcType,ni.GEODESIC),this._ellipsoid=he.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(sm.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+he.packedLength+1+1}}}),sm.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<cFe;i++)if(t instanceof I2[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};const lFe=new f,p7=new f,m7=new f;function D2(e,t,n,i,o){const r=sc(i,e,0,lFe),s=sc(i,e,n,p7),a=sc(i,t,0,m7),l=Rh(s,r,p7),u=Rh(a,r,m7);return f.cross(u,l,o),f.normalize(o,o)}const uFe=new Ce,dFe=new f,fFe=new f,hFe=new f;function P2(e,t,n,i,o,r,s,a,l,u,d){if(0===o)return;let h;r===ni.GEODESIC?h=new jN(e,t,s):r===ni.RHUMB&&(h=new Qd(e,t,s));const m=h.surfaceDistance;if(m<o)return;const _=D2(e,t,i,s,hFe),p=Math.ceil(m/o),y=m/p;let b=y;const x=p-1;let C=a.length;for(let w=0;w<x;w++){const v=h.interpolateUsingSurfaceDistance(b,uFe),I=sc(s,v,n,dFe),P=sc(s,v,i,fFe);f.pack(_,a,C),f.pack(I,l,C),f.pack(P,u,C),d.push(v.latitude),d.push(v.longitude),C+=3,b+=y}}const O2=new Ce;function sc(e,t,n,i){return Ce.clone(t,O2),O2.height=n,Ce.toCartesian(O2,e,i)}function Rh(e,t,n){return f.subtract(e,t,n),f.normalize(n,n),n}function _7(e,t,n,i){return i=Rh(e,t,i),i=f.cross(i,n,i),i=f.normalize(i,i),f.cross(n,i,i)}sm.pack=function(e,t,n){A.typeOf.object("value",e),A.defined("array",t);let i=g(n,0);const o=e._positions,r=o.length;t[i++]=r;for(let s=0;s<r;++s)f.pack(o[s],t,i),i+=3;return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,he.pack(e._ellipsoid,t,i),i+=he.packedLength,t[i++]=e._projectionIndex,t[i++]=e._scene3DOnly?1:0,t},sm.unpack=function(e,t,n){A.defined("array",e);let i=g(t,0);const o=e[i++],r=new Array(o);for(let m=0;m<o;m++)r[m]=f.unpack(e,i),i+=3;const s=e[i++],a=1===e[i++],l=e[i++],u=he.unpack(e,i);i+=he.packedLength;const d=e[i++],h=1===e[i++];return c(n)||(n=new sm({positions:r})),n._positions=r,n.granularity=s,n.loop=a,n.arcType=l,n._ellipsoid=u,n._projectionIndex=d,n._scene3DOnly=h,n};const pFe=new f,mFe=new f,_Fe=new f,g7=new f;function R2(e,t,n,i,o){const r=Rh(n,t,g7),s=_7(e,t,r,pFe),a=_7(i,t,r,mFe);if(O.equalsEpsilon(f.dot(s,a),-1,O.EPSILON5))return o=f.cross(r,s,o),f.normalize(o,o);o=f.add(a,s,o),o=f.normalize(o,o);const l=f.cross(r,o,_Fe);return f.dot(a,l)<0&&(o=f.negate(o,o)),o}const dI=qn.fromPointNormal(f.ZERO,f.UNIT_Y),bFe=new f,TFe=new f,AFe=new f,xFe=new f,CFe=new f,fI=new f,hI=new Ce,y7=new Ce,b7=new Ce;sm.createGeometry=function(e){const t=!e._scene3DOnly;let n=e.loop;const i=e._ellipsoid,o=e.granularity,r=e.arcType,s=new I2[e._projectionIndex](i),l=1e3;let u,d;const h=e._positions,m=h.length;let _,p,y,b;2===m&&(n=!1);const x=new Qd(void 0,void 0,i);let C,w,v;const I=[h[0]];for(d=0;d<m-1;d++)_=h[d],p=h[d+1],C=So.lineSegmentPlane(_,p,dI,fI),c(C)&&!f.equalsEpsilon(C,_,O.EPSILON7)&&!f.equalsEpsilon(C,p,O.EPSILON7)&&(e.arcType===ni.GEODESIC?I.push(f.clone(C)):e.arcType===ni.RHUMB&&(v=i.cartesianToCartographic(C,hI).longitude,y=i.cartesianToCartographic(_,hI),b=i.cartesianToCartographic(p,y7),x.setEndPoints(y,b),w=x.findIntersectionWithLongitude(v,b7),C=i.cartographicToCartesian(w,fI),c(C)&&!f.equalsEpsilon(C,_,O.EPSILON7)&&!f.equalsEpsilon(C,p,O.EPSILON7)&&I.push(f.clone(C)))),I.push(p);n&&(_=h[m-1],p=h[0],C=So.lineSegmentPlane(_,p,dI,fI),c(C)&&!f.equalsEpsilon(C,_,O.EPSILON7)&&!f.equalsEpsilon(C,p,O.EPSILON7)&&(e.arcType===ni.GEODESIC?I.push(f.clone(C)):e.arcType===ni.RHUMB&&(v=i.cartesianToCartographic(C,hI).longitude,y=i.cartesianToCartographic(_,hI),b=i.cartesianToCartographic(p,y7),x.setEndPoints(y,b),w=x.findIntersectionWithLongitude(v,b7),C=i.cartographicToCartesian(w,fI),c(C)&&!f.equalsEpsilon(C,_,O.EPSILON7)&&!f.equalsEpsilon(C,p,O.EPSILON7)&&I.push(f.clone(C)))));let P=I.length,N=new Array(P);for(d=0;d<P;d++){const Y=Ce.fromCartesian(I[d],i);Y.height=0,N[d]=Y}if(N=Ea(N,Ce.equalsEpsilon),P=N.length,P<2)return;const R=[],B=[],F=[],S=[];let D=bFe,L=TFe,M=AFe,U=xFe,z=CFe;const G=N[0],W=N[1];for(D=sc(i,N[P-1],0,D),U=sc(i,W,0,U),L=sc(i,G,0,L),M=sc(i,G,l,M),z=n?R2(D,L,M,U,z):D2(G,W,l,i,z),f.pack(z,B,0),f.pack(L,F,0),f.pack(M,S,0),R.push(G.latitude),R.push(G.longitude),P2(G,W,0,l,o,r,i,B,F,S,R),d=1;d<P-1;++d){D=f.clone(L,D),L=f.clone(U,L);const Y=N[d];sc(i,Y,l,M),sc(i,N[d+1],0,U),R2(D,L,M,U,z),u=B.length,f.pack(z,B,u),f.pack(L,F,u),f.pack(M,S,u),R.push(Y.latitude),R.push(Y.longitude),P2(N[d],N[d+1],0,l,o,r,i,B,F,S,R)}const j=N[P-1],Q=N[P-2];if(L=sc(i,j,0,L),M=sc(i,j,l,M),n){const Y=N[0];D=sc(i,Q,0,D),U=sc(i,Y,0,U),z=R2(D,L,M,U,z)}else z=D2(Q,j,l,i,z);if(u=B.length,f.pack(z,B,u),f.pack(L,F,u),f.pack(M,S,u),R.push(j.latitude),R.push(j.longitude),n){for(P2(j,G,0,l,o,r,i,B,F,S,R),u=B.length,d=0;d<3;++d)B[u+d]=B[d],F[u+d]=F[d],S[u+d]=S[d];R.push(G.latitude),R.push(G.longitude)}return function ZFe(e,t,n,i,o,r,s){let a,l;const u=t._ellipsoid,d=n.length/3-1,h=8*d,m=4*h,_=36*d,p=h>65535?new Uint32Array(_):new Uint16Array(_),y=new Float64Array(3*h),b=new Float32Array(m),x=new Float32Array(m),C=new Float32Array(m),w=new Float32Array(m),v=new Float32Array(m);let I,P,N,R;s&&(I=new Float32Array(m),P=new Float32Array(m),N=new Float32Array(m),R=new Float32Array(2*h));const B=r.length/2;let F=0;const S=w7;S.height=0;const D=S7;D.height=0;let L=v7,M=L2;if(s)for(l=0,a=1;a<B;a++)S.latitude=r[l],S.longitude=r[l+1],D.latitude=r[l+2],D.longitude=r[l+3],L=t.project(S,L),M=t.project(D,M),F+=f.distance(L,M),l+=2;const U=i.length/3;M=f.unpack(i,0,M);let G,z=0;for(l=3,a=1;a<U;a++)L=f.clone(M,L),M=f.unpack(i,l,M),z+=f.distance(L,M),l+=3;l=3;let W=0,q=0,j=0,Q=0,Y=!1,ne=f.unpack(n,0,D7),X=f.unpack(i,0,L2),K=f.unpack(o,0,P7);e&&T7(K,f.unpack(n,n.length-6,I7),ne,X)&&(K=f.negate(K,K));let $=0,me=0,Se=0;for(a=0;a<d;a++){const Ge=f.clone(ne,I7),je=f.clone(X,v7);let Qt,nn,Pt,ft,Ke=f.clone(K,OFe);if(Y&&(Ke=f.negate(Ke,Ke)),ne=f.unpack(n,l,D7),X=f.unpack(i,l,L2),K=f.unpack(o,l,P7),Y=T7(K,Ge,ne,X),S.latitude=r[W],S.longitude=r[W+1],D.latitude=r[W+2],D.longitude=r[W+3],s){const fo=PFe(S,D);Qt=t.project(S,kFe),nn=t.project(D,UFe);const qa=Rh(nn,Qt,R7);qa.y=Math.abs(qa.y),Pt=N2,ft=M2,0===fo||f.dot(qa,f.UNIT_Y)>u7?(Pt=Kx(t,S,Ke,Qt,N2),ft=Kx(t,D,K,nn,M2)):1===fo?(ft=Kx(t,D,K,nn,M2),Pt.x=0,Pt.y=O.sign(S.longitude-Math.abs(D.longitude)),Pt.z=0):(Pt=Kx(t,S,Ke,Qt,N2),ft.x=0,ft.y=O.sign(S.longitude-D.longitude),ft.z=0)}const gn=f.distance(je,X),Ft=Vi.fromCartesian(Ge,WFe),Ht=f.subtract(ne,Ge,zFe),Cn=f.normalize(Ht,O7);let pe=f.subtract(je,Ge,VFe);pe=f.normalize(pe,pe);let Ie=f.cross(Cn,pe,O7);Ie=f.normalize(Ie,Ie);let on=f.cross(pe,Ke,GFe);on=f.normalize(on,on);let Bt=f.subtract(X,ne,HFe);Bt=f.normalize(Bt,Bt);let Gi=f.cross(K,Bt,jFe);Gi=f.normalize(Gi,Gi);const qo=gn/z,ua=$/z;let da,Wa,Qe,ja=0,ut=0,lt=0;if(s){ja=f.distance(Qt,nn),da=Vi.fromCartesian(Qt,qFe),Wa=f.subtract(nn,Qt,R7),Qe=f.normalize(Wa,YFe);const fo=Qe.x;Qe.x=Qe.y,Qe.y=-fo,ut=ja/F,lt=me/F}for(G=0;G<8;G++){const fo=Q+4*G,qa=q+2*G,Ss=fo+3,Pu=G<4?1:-1,hr=2===G||3===G||6===G||7===G?1:-1;f.pack(Ft.high,b,fo),b[Ss]=Ht.x,f.pack(Ft.low,x,fo),x[Ss]=Ht.y,f.pack(on,C,fo),C[Ss]=Ht.z,f.pack(Gi,w,fo),w[Ss]=qo*Pu,f.pack(Ie,v,fo);let Xr=ua*hr;0===Xr&&hr<0&&(Xr=9),v[Ss]=Xr,s&&(I[fo]=da.high.x,I[fo+1]=da.high.y,I[fo+2]=da.low.x,I[fo+3]=da.low.y,N[fo]=-Pt.y,N[fo+1]=Pt.x,N[fo+2]=ft.y,N[fo+3]=-ft.x,P[fo]=Wa.x,P[fo+1]=Wa.y,P[fo+2]=Qe.x,P[fo+3]=Qe.y,R[qa]=ut*Pu,Xr=lt*hr,0===Xr&&hr<0&&(Xr=9),R[qa+1]=Xr)}const st=FFe,Gt=BFe,an=NFe,Vn=MFe,Yo=Te.fromCartographicArray(RFe,LFe),Sr=vo.getMinimumMaximumHeights(Yo,u),Zc=Sr.minimumTerrainHeight,$c=Sr.maximumTerrainHeight;Se+=Math.abs(Zc),Se+=Math.abs($c),E7(Ge,je,Zc,$c,st,an),E7(ne,X,Zc,$c,Gt,Vn);let Yr=f.multiplyByScalar(Ie,O.EPSILON5,L7);f.add(st,Yr,st),f.add(Gt,Yr,Gt),f.add(an,Yr,an),f.add(Vn,Yr,Vn),pI(st,Gt),pI(an,Vn),f.pack(st,y,j),f.pack(Gt,y,j+3),f.pack(Vn,y,j+6),f.pack(an,y,j+9),Yr=f.multiplyByScalar(Ie,-2*O.EPSILON5,L7),f.add(st,Yr,st),f.add(Gt,Yr,Gt),f.add(an,Yr,an),f.add(Vn,Yr,Vn),pI(st,Gt),pI(an,Vn),f.pack(st,y,j+12),f.pack(Gt,y,j+15),f.pack(Vn,y,j+18),f.pack(an,y,j+21),W+=2,l+=3,q+=16,j+=24,Q+=32,$+=gn,me+=ja}l=0;let fe=0;for(a=0;a<d;a++){for(G=0;G<M7;G++)p[l+G]=N7[G]+fe;fe+=8,l+=M7}const ye=XFe;Ae.fromVertices(n,f.ZERO,3,ye[0]),Ae.fromVertices(i,f.ZERO,3,ye[1]);const ve=Ae.fromBoundingSpheres(ye);ve.radius+=Se/(2*d);const Oe={position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:am(b),startLoAndForwardOffsetY:am(x),startNormalAndForwardOffsetZ:am(C),endNormalAndTextureCoordinateNormalizationX:am(w),rightNormalAndTextureCoordinateNormalizationY:am(v)};return s&&(Oe.startHiLo2D=am(I),Oe.offsetAndRight2D=am(P),Oe.startEndNormals2D=am(N),Oe.texcoordNormalization2D=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,normalize:!1,values:R})),new En({attributes:Oe,indices:p,boundingSphere:ve})}(n,s,F,S,B,R,t)};const EFe=new f,wFe=new oe,SFe=new bt;function T7(e,t,n,i){const o=Rh(n,t,EFe),r=f.dot(o,e);if(r>u7||r<d7){const s=Rh(i,n,g7),l=bt.fromAxisAngle(s,r<d7?O.PI_OVER_TWO:-O.PI_OVER_TWO,SFe),u=oe.fromQuaternion(l,wFe);return oe.multiplyByVector(u,e,e),!0}return!1}const A7=new Ce,vFe=new f,x7=new f;function Kx(e,t,n,i,o){const r=Ce.toCartesian(t,e._ellipsoid,vFe);let s=f.add(r,n,x7),a=!1;const l=e._ellipsoid;let u=l.cartesianToCartographic(s,A7);Math.abs(t.longitude-u.longitude)>O.PI_OVER_TWO&&(a=!0,s=f.subtract(r,n,x7),u=l.cartesianToCartographic(s,A7)),u.height=0;const d=e.project(u,o);return(o=f.subtract(d,i,o)).z=0,o=f.normalize(o,o),a&&f.negate(o,o),o}const IFe=new f,C7=new f;function E7(e,t,n,i,o,r){const s=f.subtract(t,e,IFe);f.normalize(s,s);let l=f.multiplyByScalar(s,n-0,C7);f.add(e,l,o),l=f.multiplyByScalar(s,i-1e3,C7),f.add(t,l,r)}const DFe=new f;function pI(e,t){const n=qn.getPointDistance(dI,e),i=qn.getPointDistance(dI,t);let o=DFe;O.equalsEpsilon(n,0,O.EPSILON2)?(o=Rh(t,e,o),f.multiplyByScalar(o,O.EPSILON2,o),f.add(e,o,e)):O.equalsEpsilon(i,0,O.EPSILON2)&&(o=Rh(e,t,o),f.multiplyByScalar(o,O.EPSILON2,o),f.add(t,o,t))}function PFe(e,t){const n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(O.equalsEpsilon(n,O.PI,O.EPSILON11)){const o=O.sign(t.longitude);return e.longitude=o*(n-O.EPSILON11),1}if(O.equalsEpsilon(i,O.PI,O.EPSILON11)){const o=O.sign(e.longitude);return t.longitude=o*(i-O.EPSILON11),2}return 0}const w7=new Ce,S7=new Ce,v7=new f,L2=new f,I7=new f,D7=new f,OFe=new f,P7=new f,RFe=[w7,S7],LFe=new Te,NFe=new f,MFe=new f,FFe=new f,BFe=new f,kFe=new f,UFe=new f,N2=new f,M2=new f,zFe=new f,VFe=new f,HFe=new f,O7=new f,GFe=new f,jFe=new f,WFe=new Vi,qFe=new Vi,R7=new f,YFe=new f,L7=new f,XFe=[new Ae,new Ae],N7=[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],M7=N7.length;function am(e){return new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}sm._projectNormal=Kx;const F7=sm;let F2=`${dx}\nin vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 prevPosition3DHigh;\nin vec3 prevPosition3DLow;\nin vec3 nextPosition3DHigh;\nin vec3 nextPosition3DLow;\nin vec2 expandAndWidth;\nin vec4 color;\nin float batchId;\n\nout vec4 v_color;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n v_color = color;\n}\n`;const eBe=qj;function Tg(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.translucent,!0),i=Tg.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,F2),this._fragmentShaderSource=g(e.fragmentShaderSource,eBe),this._renderState=Oa.getDefaultRenderState(t,!1,e.renderState),this._closed=!1,this._vertexFormat=i}Hn.isInternetExplorer()||(F2=`#define CLIP_POLYLINE \n${F2}`),Object.defineProperties(Tg.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}}}),Tg.VERTEX_FORMAT=et.POSITION_ONLY,Tg.prototype.getFragmentShaderSource=Oa.prototype.getFragmentShaderSource,Tg.prototype.isTranslucent=Oa.prototype.isTranslucent,Tg.prototype.getRenderState=Oa.prototype.getRenderState;const lf=Tg;let B2=`${dx}\nin vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 prevPosition3DHigh;\nin vec3 prevPosition3DLow;\nin vec3 nextPosition3DHigh;\nin vec3 nextPosition3DLow;\nin vec2 expandAndWidth;\nin vec2 st;\nin float batchId;\n\nout float v_width;\nout vec2 v_st;\nout float v_polylineAngle;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n v_width = width;\n v_st.s = st.s;\n v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);\n v_polylineAngle = angle;\n}\n`;const tBe=Q6;function Ag(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.translucent,!0),i=Ag.VERTEX_FORMAT;this.material=c(e.material)?e.material:Pa.fromType(Pa.ColorType),this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,B2),this._fragmentShaderSource=g(e.fragmentShaderSource,tBe),this._renderState=Oa.getDefaultRenderState(t,!1,e.renderState),this._closed=!1,this._vertexFormat=i}Hn.isInternetExplorer()||(B2=`#define CLIP_POLYLINE \n${B2}`),Object.defineProperties(Ag.prototype,{vertexShaderSource:{get:function(){let e=this._vertexShaderSource;return-1!==this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)&&(e=`#define POLYLINE_DASH\n${e}`),e}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),Ag.VERTEX_FORMAT=et.POSITION_AND_ST,Ag.prototype.getFragmentShaderSource=Oa.prototype.getFragmentShaderSource,Ag.prototype.isTranslucent=Oa.prototype.isTranslucent,Ag.prototype.getRenderState=Oa.prototype.getRenderState;const rd=Ag;function Lh(e){e=g(e,g.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;let t=e.appearance;c(t)||(t=new rd),this.appearance=t,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,Xo.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this._debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=B7(!1),this._renderState3DTiles=B7(!0),this._renderStateMorph=Lt.fromCache({cull:{enabled:!0,face:ur.FRONT},depthTest:{enabled:!0},blending:eo.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}function B7(e){return Lt.fromCache({cull:{enabled:!0},blending:eo.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Fi.EQUAL,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},backFunction:Fi.EQUAL,backOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},reference:xn.CESIUM_3D_TILE_MASK,mask:xn.CESIUM_3D_TILE_MASK}})}function k7(e,t,n,i,o,r,s){n.mode===ce.MORPHING?t=t.derivedCommands.colorMorph:n.mode!==ce.SCENE3D&&(t=t.derivedCommands.color2D),t.modelMatrix=i,t.boundingVolume=r,t.cull=o,t.debugShowBoundingVolume=s,n.commandList.push(t)}Object.defineProperties(Lh.prototype,{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}},ready:{get:function(){return this._ready}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}}),Lh.initializeTerrainHeights=function(){return vo.initialize()},Lh.prototype.update=function(e){if(!c(this._primitive)&&!c(this.geometryInstances))return;if(!vo.initialized){if(!this.asynchronous)throw new E("For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.");return void Lh.initializeTerrainHeights()}let t;const n=this,i=this._primitiveOptions;if(!c(this._primitive)){const o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],r=o.length,s=new Array(r);let a;for(t=0;t<r;++t)if(a=o[t].attributes,!c(a)||!c(a.color)){this._hasPerInstanceColors=!1;break}for(t=0;t<r;++t){const l=o[t];a={};const u=l.attributes;for(const d in u)u.hasOwnProperty(d)&&(a[d]=u[d]);c(a.width)||(a.width=new od({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,value:[l.geometry.width]})),l.geometry._scene3DOnly=e.scene3DOnly,F7.setProjectionAndEllipsoid(l.geometry,e.mapProjection),s[t]=new zn({geometry:l.geometry,attributes:a,id:l.id,pickPrimitive:n})}i.geometryInstances=s,i.appearance=this.appearance,i._createShaderProgramFunction=function(l,u,d){!function nBe(e,t,n){const i=t.context,o=e._primitive,r=o._attributeLocations;let s=o._batchTable.getVertexShaderCallback()('in vec3 position3DHigh;\nin vec3 position3DLow;\n\n// In 2D and in 3D, texture coordinate normalization component signs encodes:\n// * X sign - sidedness relative to right plane\n// * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume\n#ifndef COLUMBUS_VIEW_2D\nin vec4 startHiAndForwardOffsetX;\nin vec4 startLoAndForwardOffsetY;\nin vec4 startNormalAndForwardOffsetZ;\nin vec4 endNormalAndTextureCoordinateNormalizationX;\nin vec4 rightNormalAndTextureCoordinateNormalizationY;\n#else\nin vec4 startHiLo2D;\nin vec4 offsetAndRight2D;\nin vec4 startEndNormals2D;\nin vec2 texcoordNormalization2D;\n#endif\n\nin float batchId;\n\nout vec4 v_startPlaneNormalEcAndHalfWidth;\nout vec4 v_endPlaneNormalEcAndBatchId;\nout vec4 v_rightPlaneEC;\nout vec4 v_endEcAndStartEcX;\nout vec4 v_texcoordNormalizationAndStartEcYZ;\n\n// For materials\n#ifdef WIDTH_VARYING\nout float v_width;\n#endif\n#ifdef ANGLE_VARYING\nout float v_polylineAngle;\n#endif\n\n#ifdef PER_INSTANCE_COLOR\nout vec4 v_color;\n#endif\n\nvoid main()\n{\n#ifdef COLUMBUS_VIEW_2D\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;\n\n vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);\n vec3 ecEnd = forwardDirectionEC + ecStart;\n forwardDirectionEC = normalize(forwardDirectionEC);\n\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n\n v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);\n v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;\n\n#else // COLUMBUS_VIEW_2D\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\n vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\n vec3 ecEnd = ecStart + offset;\n\n vec3 forwardDirectionEC = normalize(offset);\n\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n\n v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n\n#endif // COLUMBUS_VIEW_2D\n\n v_endEcAndStartEcX.xyz = ecEnd;\n v_endEcAndStartEcX.w = ecStart.x;\n v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#endif // PER_INSTANCE_COLOR\n\n // Compute a normal along which to "push" the position out, extending the miter depending on view distance.\n // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.\n // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.\n vec4 positionRelativeToEye = czm_computePosition();\n\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition\n float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\n vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Extrude bottom vertices downward for far view distances, like for GroundPrimitives\n upOrDown = cross(forwardDirectionEC, normalEC);\n upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;\n upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\n upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;\n positionEC.xyz += upOrDown;\n\n v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\n\n // Determine distance along normalEC to push for a volume of appropriate width.\n // Make volumes about double pixel width for a conservative fit - in practice the\n // extra cost here is minimal compared to the loose volume heights.\n //\n // N = normalEC (guaranteed "right-facing")\n // R = rightEC\n // p = angle between N and R\n // w = distance to push along R if R == N\n // d = distance to push along N\n //\n // N R\n // { p| } * cos(p) = dot(N, R) = w / d\n // d | |w * d = w / dot(N, R)\n // { | }\n // o---------- polyline segment ----\x3e\n //\n float width = czm_batchTable_width(batchId);\n#ifdef WIDTH_VARYING\n v_width = width;\n#endif\n\n v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\n v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\n\n v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\n v_endPlaneNormalEcAndBatchId.w = batchId;\n\n width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R\n width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N\n\n // Determine if this vertex is on the "left" or "right"\n#ifdef COLUMBUS_VIEW_2D\n normalEC *= sign(texcoordNormalization2D.x);\n#else\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n#endif\n\n positionEC.xyz += width * normalEC;\n gl_Position = czm_depthClamp(czm_projection * positionEC);\n\n#ifdef ANGLE_VARYING\n // Approximate relative screen space direction of the line.\n vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));\n approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\n v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n');s=Yi._appendShowToShader(o,s),s=Yi._appendDistanceDisplayConditionToShader(o,s),s=Yi._modifyShaderPosition(e,s,t.scene3DOnly);let a=o._batchTable.getVertexShaderCallback()('in vec3 position3DHigh;\nin vec3 position3DLow;\n\nin vec4 startHiAndForwardOffsetX;\nin vec4 startLoAndForwardOffsetY;\nin vec4 startNormalAndForwardOffsetZ;\nin vec4 endNormalAndTextureCoordinateNormalizationX;\nin vec4 rightNormalAndTextureCoordinateNormalizationY;\nin vec4 startHiLo2D;\nin vec4 offsetAndRight2D;\nin vec4 startEndNormals2D;\nin vec2 texcoordNormalization2D;\n\nin float batchId;\n\nout vec3 v_forwardDirectionEC;\nout vec3 v_texcoordNormalizationAndHalfWidth;\nout float v_batchId;\n\n// For materials\n#ifdef WIDTH_VARYING\nout float v_width;\n#endif\n#ifdef ANGLE_VARYING\nout float v_polylineAngle;\n#endif\n\n#ifdef PER_INSTANCE_COLOR\nout vec4 v_color;\n#else\nout vec2 v_alignedPlaneDistances;\nout float v_texcoordT;\n#endif\n\n// Morphing planes using SLERP or NLERP doesn\'t seem to work, so instead draw the material directly on the shadow volume.\n// Morph views are from very far away and aren\'t meant to be used precisely, so this should be sufficient.\nvoid main()\n{\n v_batchId = batchId;\n\n // Start position\n vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));\n vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);\n vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\n vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\n vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\n vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\n\n // Start plane\n vec4 startPlane2D;\n vec4 startPlane3D;\n startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\n startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);\n startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);\n\n // Right plane\n vec4 rightPlane2D;\n vec4 rightPlane3D;\n rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\n rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);\n rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);\n\n // End position\n posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);\n posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);\n posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\n posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\n posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\n vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\n vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));\n vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));\n\n // End plane\n vec4 endPlane2D;\n vec4 endPlane3D;\n endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\n endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);\n endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);\n\n // Forward direction\n v_forwardDirectionEC = normalize(endEC - startEC);\n\n vec2 cleanTexcoordNormalization2D;\n cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);\n cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));\n vec2 cleanTexcoordNormalization3D;\n cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;\n cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));\n\n v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#else // PER_INSTANCE_COLOR\n // For computing texture coordinates\n\n v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);\n v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);\n#endif // PER_INSTANCE_COLOR\n\n#ifdef WIDTH_VARYING\n float width = czm_batchTable_width(batchId);\n float halfWidth = width * 0.5;\n v_width = width;\n v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#else\n float halfWidth = 0.5 * czm_batchTable_width(batchId);\n v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#endif\n\n // Compute a normal along which to "push" the position out, extending the miter depending on view distance.\n // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.\n // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.\n // Since this is morphing, compute both 3D and 2D positions and then blend.\n\n // ****** 3D ******\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition\n float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);\n vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Nudge the top vertex upwards to prevent flickering\n vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));\n geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);\n geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\n positionEc3D.xyz += geodeticSurfaceNormal;\n\n // Determine if this vertex is on the "left" or "right"\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n\n // A "perfect" implementation would push along normals according to the angle against forward.\n // In practice, just pushing the normal out by halfWidth is sufficient for morph views.\n positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)\n\n // ****** 2D ******\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition\n absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));\n absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));\n planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);\n upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Nudge the top vertex upwards to prevent flickering\n geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));\n geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);\n geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\n positionEc2D.xyz += geodeticSurfaceNormal;\n\n // Determine if this vertex is on the "left" or "right"\n normalEC *= sign(texcoordNormalization2D.x);\n#ifndef PER_INSTANCE_COLOR\n // Use vertex\'s sidedness to compute its texture coordinate.\n v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);\n#endif\n\n // A "perfect" implementation would push along normals according to the angle against forward.\n // In practice, just pushing the normal out by halfWidth is sufficient for morph views.\n positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)\n\n // Blend for actual position\n gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);\n\n#ifdef ANGLE_VARYING\n // Approximate relative screen space direction of the line.\n vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));\n approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\n v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n');a=Yi._appendShowToShader(o,a),a=Yi._appendDistanceDisplayConditionToShader(o,a),a=Yi._modifyShaderPosition(e,a,t.scene3DOnly);let l=o._batchTable.getVertexShaderCallback()('in vec4 v_startPlaneNormalEcAndHalfWidth;\nin vec4 v_endPlaneNormalEcAndBatchId;\nin vec4 v_rightPlaneEC; // Technically can compute distance for this here\nin vec4 v_endEcAndStartEcX;\nin vec4 v_texcoordNormalizationAndStartEcYZ;\n\n#ifdef PER_INSTANCE_COLOR\nin vec4 v_color;\n#endif\n\nvoid main(void)\n{\n float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));\n vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\n\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\n\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n // Check distance of the eye coordinate against start and end planes with normals in the right plane.\n // For computing unskewed lengthwise texture coordinate.\n // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.\n\n // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"\n vec3 alignedPlaneNormal;\n\n // start aligned plane\n alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\n alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\n\n // end aligned plane\n alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\n alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n\n#ifdef PER_INSTANCE_COLOR\n out_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\n // Clamp - distance to aligned planes may be negative due to mitering,\n // so fragment texture coordinate might be out-of-bounds.\n float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\n s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\n float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\n\n czm_materialInput materialInput;\n\n materialInput.s = s;\n materialInput.st = vec2(s, t);\n materialInput.str = vec3(s, t, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n\n // Premultiply alpha. Required for classification primitives on translucent globe.\n out_FragColor.rgb *= out_FragColor.a;\n\n czm_writeDepthClamp();\n}\n');const u=[`GLOBE_MINIMUM_ALTITUDE ${t.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`];let d="",h="";c(n.material)?(h=c(n.material)?n.material.shaderSource:"",-1!==h.search(/in\s+float\s+v_polylineAngle;/g)&&u.push("ANGLE_VARYING"),-1!==h.search(/in\s+float\s+v_width;/g)&&u.push("WIDTH_VARYING")):d="PER_INSTANCE_COLOR",u.push(d);const m=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",d]:[d],_=new St({defines:u,sources:[s]}),p=new St({defines:m,sources:[h,l]});e._sp=di.replaceCache({context:i,shaderProgram:o._sp,vertexShaderSource:_,fragmentShaderSource:p,attributeLocations:r});let y=i.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!c(y)){const x=new St({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[s]});y=i.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:i,shaderProgram:e._sp2D,vertexShaderSource:x,fragmentShaderSource:p,attributeLocations:r})}e._sp2D=y;let b=i.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!c(b)){const x=new St({defines:u.concat([`MAX_TERRAIN_HEIGHT ${vo._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[a]});l=o._batchTable.getVertexShaderCallback()("in vec3 v_forwardDirectionEC;\nin vec3 v_texcoordNormalizationAndHalfWidth;\nin float v_batchId;\n\n#ifdef PER_INSTANCE_COLOR\nin vec4 v_color;\n#else\nin vec2 v_alignedPlaneDistances;\nin float v_texcoordT;\n#endif\n\nfloat rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {\n // We don't expect the ray to ever be parallel to the plane\n return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);\n}\n\nvoid main(void)\n{\n vec4 eyeCoordinate = gl_FragCoord;\n eyeCoordinate /= eyeCoordinate.w;\n\n#ifdef PER_INSTANCE_COLOR\n out_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\n // Use distances for planes aligned with segment to prevent skew in dashing\n float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);\n float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);\n\n // Clamp - distance to aligned planes may be negative due to mitering\n distanceFromStart = max(0.0, distanceFromStart);\n distanceFromEnd = max(0.0, distanceFromEnd);\n\n float s = distanceFromStart / (distanceFromStart + distanceFromEnd);\n s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;\n\n czm_materialInput materialInput;\n\n materialInput.s = s;\n materialInput.st = vec2(s, v_texcoordT);\n materialInput.str = vec3(s, v_texcoordT, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n}\n");const C=new St({defines:m,sources:[h,l]});b=i.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:i,shaderProgram:e._spMorph,vertexShaderSource:x,fragmentShaderSource:C,attributeLocations:r})}e._spMorph=b}(n,u,d)},i._createCommandsFunction=function(l,u,d,h,m,_,p){!function iBe(e,t,n,i,o,r){const s=e._primitive,a=s._va.length;o.length=a,r.length=a;const u=t instanceof lf?{}:n._uniforms,d=s._batchTable.getUniformMapCallback()(u);for(let h=0;h<a;h++){const m=s._va[h];let _=o[h];c(_)||(_=o[h]=new $t({owner:e,primitiveType:s._primitiveType})),_.vertexArray=m,_.renderState=e._renderState,_.shaderProgram=e._sp,_.uniformMap=d,_.pass=Ue.TERRAIN_CLASSIFICATION,_.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";const p=$t.shallowClone(_,_.derivedCommands.tileset);p.renderState=e._renderState3DTiles,p.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,_.derivedCommands.tileset=p;const y=$t.shallowClone(_,_.derivedCommands.color2D);y.shaderProgram=e._sp2D,_.derivedCommands.color2D=y;const b=$t.shallowClone(p,p.derivedCommands.color2D);b.shaderProgram=e._sp2D,p.derivedCommands.color2D=b;const x=$t.shallowClone(_,_.derivedCommands.colorMorph);x.renderState=e._renderStateMorph,x.shaderProgram=e._spMorph,x.pickId="czm_batchTable_pickColor(v_batchId)",_.derivedCommands.colorMorph=x}}(n,u,d,0,_,p)},i._updateAndQueueCommandsFunction=function(l,u,d,h,m,_,p,y){!function oBe(e,t,n,i,o,r,s){const a=e._primitive;let l;Yi._updateBoundingVolumes(a,t,o),t.mode===ce.SCENE3D?l=a._boundingSphereWC:t.mode===ce.COLUMBUS_VIEW?l=a._boundingSphereCV:t.mode===ce.SCENE2D&&c(a._boundingSphere2D)?l=a._boundingSphere2D:c(a._boundingSphereMorph)&&(l=a._boundingSphereMorph);const d=e.classificationType,h=d!==Xo.CESIUM_3D_TILE,m=d!==Xo.TERRAIN&&!(t.mode===ce.MORPHING);let _;const p=t.passes;if(p.render||p.pick&&a.allowPicking){const y=n.length;for(let b=0;b<y;++b){const x=l[b];h&&(_=n[b],k7(0,_,t,o,r,x,s)),m&&(_=n[b].derivedCommands.tileset,k7(0,_,t,o,r,x,s))}}}(n,u,d,0,m,_,p)},this._primitive=new Yi(i)}if(this.appearance instanceof lf&&!this._hasPerInstanceColors)throw new E("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&c(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})},Lh.prototype.getGeometryInstanceAttributes=function(e){if(!c(this._primitive))throw new E("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},Lh.isSupported=function(e){return e.frameState.context.depthTexture},Lh.prototype.isDestroyed=function(){return!1},Lh.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,Xe(this)};const mI=Lh,U7="#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nin vec4 v_sphericalExtents;\n#else // SPHERICAL\nin vec2 v_inversePlaneExtents;\nin vec4 v_westPlane;\nin vec4 v_southPlane;\n#endif // SPHERICAL\nin vec3 v_uvMinAndSphericalLongitudeRotation;\nin vec3 v_uMaxAndInverseDistance;\nin vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n\n#ifdef PER_INSTANCE_COLOR\nin vec4 v_color;\n#endif\n\n#ifdef NORMAL_EC\nvec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\n return eyeCoordinate.xyz / eyeCoordinate.w;\n}\n\nvec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {\n vec2 glFragCoordXY = gl_FragCoord.xy;\n // Sample depths at both offset and negative offset\n float upOrRightLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\n float downOrLeftLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\n // Explicitly evaluate both paths\n // Necessary for multifrustum and for edges of the screen\n bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\n float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);\n float useDownOrLeft = float(useUpOrRight == 0.0);\n vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);\n vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);\n return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;\n}\n#endif // NORMAL_EC\n\nvoid main(void)\n{\n#ifdef REQUIRES_EC\n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n#endif\n\n#ifdef REQUIRES_WC\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n#endif\n\n#ifdef TEXTURE_COORDINATES\n vec2 uv;\n#ifdef SPHERICAL\n // Treat world coords as a sphere normal for spherical coordinates\n vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);\n sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;\n sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\n uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;\n uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;\n#else // SPHERICAL\n // Unpack planes and transform to eye space\n uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\n uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n#endif // SPHERICAL\n#endif // TEXTURE_COORDINATES\n\n#ifdef PICK\n#ifdef CULL_FRAGMENTS\n // When classifying translucent geometry, logDepthOrDepth == 0.0\n // indicates a region that should not be classified, possibly due to there\n // being opaque pixels there in another buffer.\n // Check for logDepthOrDepth != 0.0 to make sure this should be classified.\n if (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0 || logDepthOrDepth != 0.0) {\n out_FragColor.a = 1.0; // 0.0 alpha leads to discard from ShaderSource.createPickFragmentShaderSource\n czm_writeDepthClamp();\n }\n#else // CULL_FRAGMENTS\n out_FragColor.a = 1.0;\n#endif // CULL_FRAGMENTS\n#else // PICK\n\n#ifdef CULL_FRAGMENTS\n // When classifying translucent geometry, logDepthOrDepth == 0.0\n // indicates a region that should not be classified, possibly due to there\n // being opaque pixels there in another buffer.\n if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) {\n discard;\n }\n#endif\n\n#ifdef NORMAL_EC\n // Compute normal by sampling adjacent pixels in 2x2 block in screen space\n vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));\n vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));\n vec3 normalEC = normalize(cross(leftRight, downUp));\n#endif\n\n\n#ifdef PER_INSTANCE_COLOR\n\n vec4 color = czm_gammaCorrect(v_color);\n#ifdef FLAT\n out_FragColor = color;\n#else // FLAT\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = -eyeCoordinate.xyz;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n\n // Premultiply alpha. Required for classification primitives on translucent globe.\n out_FragColor.rgb *= out_FragColor.a;\n\n#else // PER_INSTANCE_COLOR\n\n // Material support.\n // USES_ is distinct from REQUIRES_, because some things are dependencies of each other or\n // dependencies for culling but might not actually be used by the material.\n\n czm_materialInput materialInput;\n\n#ifdef USES_NORMAL_EC\n materialInput.normalEC = normalEC;\n#endif\n\n#ifdef USES_POSITION_TO_EYE_EC\n materialInput.positionToEyeEC = -eyeCoordinate.xyz;\n#endif\n\n#ifdef USES_TANGENT_TO_EYE\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);\n#endif\n\n#ifdef USES_ST\n // Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired\n // texture coordinate system, which typically forms a tight oriented bounding box around the geometry.\n // Shader is provided a set of reference points for remapping.\n materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;\n materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;\n#endif\n\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else // FLAT\n out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n\n // Premultiply alpha. Required for classification primitives on translucent globe.\n out_FragColor.rgb *= out_FragColor.a;\n\n#endif // PER_INSTANCE_COLOR\n czm_writeDepthClamp();\n#endif // PICK\n}\n";function cu(e,t,n){A.typeOf.bool("extentsCulling",e),A.typeOf.bool("planarExtents",t),A.typeOf.object("appearance",n),this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};const i=new k2;i.requiresTextureCoordinates=e,i.requiresEC=!n.flat;const o=new k2;if(o.requiresTextureCoordinates=e,n instanceof gi)i.requiresNormalEC=!n.flat;else{const r=`${n.material.shaderSource}\n${n.fragmentShaderSource}`;i.normalEC=-1!==r.indexOf("materialInput.normalEC")||-1!==r.indexOf("czm_getDefaultMaterial"),i.positionToEyeEC=-1!==r.indexOf("materialInput.positionToEyeEC"),i.tangentToEyeMatrix=-1!==r.indexOf("materialInput.tangentToEyeMatrix"),i.st=-1!==r.indexOf("materialInput.st")}this._colorShaderDependencies=i,this._pickShaderDependencies=o,this._appearance=n,this._extentsCulling=e,this._planarExtents=t}cu.prototype.createFragmentShader=function(e){A.typeOf.bool("columbusView2D",e);const 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 gi&&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 gi||(o=t.material.shaderSource),new St({defines:i,sources:[o,U7]})},cu.prototype.createPickFragmentShader=function(e){A.typeOf.bool("columbusView2D",e);const 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 St({defines:n,sources:[U7],pickColorQualifier:"in"})},cu.prototype.createVertexShader=function(e,t,n,i){return A.defined("defines",e),A.typeOf.string("vertexShaderSource",t),A.typeOf.bool("columbusView2D",n),A.defined("mapProjection",i),G7(this._colorShaderDependencies,this._planarExtents,n,e,t,this._appearance,i,this._projectionExtentDefines)},cu.prototype.createPickVertexShader=function(e,t,n,i){return A.defined("defines",e),A.typeOf.string("vertexShaderSource",t),A.typeOf.bool("columbusView2D",n),A.defined("mapProjection",i),G7(this._pickShaderDependencies,this._planarExtents,n,e,t,void 0,i,this._projectionExtentDefines)};const z7=new f,V7=new Ce,H7={high:0,low:0};function G7(e,t,n,i,o,r,s,a){const l=i.slice();if(""===a.eastMostYhighDefine){const u=V7;u.longitude=O.PI,u.latitude=0,u.height=0;const d=s.project(u,z7);let h=Vi.encode(d.x,H7);a.eastMostYhighDefine=`EAST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.eastMostYlowDefine=`EAST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`;const m=V7;m.longitude=-O.PI,m.latitude=0,m.height=0;const _=s.project(m,z7);h=Vi.encode(_.x,H7),a.westMostYhighDefine=`WEST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.westMostYlowDefine=`WEST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`}return n&&(l.push(a.eastMostYhighDefine),l.push(a.eastMostYlowDefine),l.push(a.westMostYhighDefine),l.push(a.westMostYlowDefine)),c(r)&&r instanceof gi&&l.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(l.push("TEXTURE_COORDINATES"),t||n||l.push("SPHERICAL"),n&&l.push("COLUMBUS_VIEW_2D")),new St({defines:l,sources:[o]})}function k2(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}function j7(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)/V.distance(t,e)}Object.defineProperties(k2.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}}});const sBe=[new V,new V,new V,new V];function W7(e,t){const n=sBe,i=V.unpack(t,0,n[0]),o=V.unpack(t,2,n[1]),r=V.unpack(t,4,n[2]);e.uMaxVmax=new od({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,value:[o.x,o.y,r.x,r.y]});const s=1/j7(i,o,r),a=1/j7(i,r,o);e.uvMinAndExtents=new od({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,value:[i.x,i.y,s,a]})}const q7=new Ce,Y7=new f,aBe=new f,cBe=new f,_I={high:0,low:0};function X7(e,t,n){const i=q7;i.height=0,i.longitude=e.west,i.latitude=e.south;const o=t.project(i,Y7);i.latitude=e.north;const r=t.project(i,aBe);i.longitude=e.east,i.latitude=e.south;const s=t.project(i,cBe),a=[0,0,0,0],l=[0,0,0,0];let u=Vi.encode(o.x,_I);a[0]=u.high,l[0]=u.low,u=Vi.encode(o.y,_I),a[1]=u.high,l[1]=u.low,u=Vi.encode(r.y,_I),a[2]=u.high,l[2]=u.low,u=Vi.encode(s.x,_I),a[3]=u.high,l[3]=u.low,n.planes2D_HIGH=new od({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,value:a}),n.planes2D_LOW=new od({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,value:l})}const lBe=new k,uBe=new k,Z7=new f,dBe=new Ce,fBe=[new Ce,new Ce,new Ce,new Ce,new Ce,new Ce,new Ce,new Ce],pBe=new f,mBe=new f,_Be=new Vi;cu.getPlanarTextureCoordinateAttributes=function(e,t,n,i,o){A.typeOf.object("boundingRectangle",e),A.defined("textureCoordinateRotationPoints",t),A.typeOf.object("ellipsoid",n),A.typeOf.object("projection",i);const r=Y7,s=pBe,a=mBe;!function hBe(e,t,n,i,o,r){const s=Te.center(e,dBe);s.height=n;const a=Ce.toCartesian(s,t,Z7),l=In.eastNorthUpToFixedFrame(a,t,lBe),u=k.inverse(l,uBe),d=e.west,h=e.east,m=e.north,_=e.south,p=fBe;p[0].latitude=_,p[0].longitude=d,p[1].latitude=m,p[1].longitude=d,p[2].latitude=m,p[2].longitude=h,p[3].latitude=_,p[3].longitude=h;const y=.5*(d+h),b=.5*(m+_);p[4].latitude=_,p[4].longitude=y,p[5].latitude=m,p[5].longitude=y,p[6].latitude=b,p[6].longitude=d,p[7].latitude=b,p[7].longitude=h;let x=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,w=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY;for(let R=0;R<8;R++){p[R].height=n;const B=Ce.toCartesian(p[R],t,Z7);k.multiplyByPoint(u,B,B),B.z=0,x=Math.min(x,B.x),C=Math.max(C,B.x),w=Math.min(w,B.y),v=Math.max(v,B.y)}const I=i;I.x=x,I.y=w,I.z=0,k.multiplyByPoint(l,I,I);const P=o;P.x=C,P.y=w,P.z=0,k.multiplyByPoint(l,P,P),f.subtract(P,I,o);const N=r;N.x=x,N.y=v,N.z=0,k.multiplyByPoint(l,N,N),f.subtract(N,I,r)}(e,n,g(o,0),r,s,a);const l={};W7(l,t);const u=Vi.fromCartesian(r,_Be);return l.southWest_HIGH=new od({componentDatatype:ee.FLOAT,componentsPerAttribute:3,normalize:!1,value:f.pack(u.high,[0,0,0])}),l.southWest_LOW=new od({componentDatatype:ee.FLOAT,componentsPerAttribute:3,normalize:!1,value:f.pack(u.low,[0,0,0])}),l.eastward=new od({componentDatatype:ee.FLOAT,componentsPerAttribute:3,normalize:!1,value:f.pack(s,[0,0,0])}),l.northward=new od({componentDatatype:ee.FLOAT,componentsPerAttribute:3,normalize:!1,value:f.pack(a,[0,0,0])}),X7(e,i,l),l};const gBe=new f;function $7(e,t,n,i){const o=q7;o.latitude=e,o.longitude=t,o.height=0;const r=Ce.toCartesian(o,n,gBe),s=Math.sqrt(r.x*r.x+r.y*r.y),a=O.fastApproximateAtan2(s,r.z),l=O.fastApproximateAtan2(r.x,r.y);return i.x=a,i.y=l,i}const K7=new V;cu.getSphericalExtentGeometryInstanceAttributes=function(e,t,n,i){A.typeOf.object("boundingRectangle",e),A.defined("textureCoordinateRotationPoints",t),A.typeOf.object("ellipsoid",n),A.typeOf.object("projection",i);const o=$7(e.south,e.west,n,K7);let r=o.x,s=o.y;const a=$7(e.north,e.east,n,K7);let l=a.x,u=a.y,d=0;s>u&&(d=O.PI-s,s=-O.PI,u+=d),r-=O.EPSILON5,s-=O.EPSILON5,l+=O.EPSILON5,u+=O.EPSILON5;const _={sphericalExtents:new od({componentDatatype:ee.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,s,1/(l-r),1/(u-s)]}),longitudeRotation:new od({componentDatatype:ee.FLOAT,componentsPerAttribute:1,normalize:!1,value:[d]})};return W7(_,t),X7(e,i,_),_},cu.hasAttributesForTextureCoordinatePlanes=function(e){return c(e.southWest_HIGH)&&c(e.southWest_LOW)&&c(e.northward)&&c(e.eastward)&&c(e.planes2D_HIGH)&&c(e.planes2D_LOW)&&c(e.uMaxVmax)&&c(e.uvMinAndExtents)},cu.hasAttributesForSphericalExtents=function(e){return c(e.sphericalExtents)&&c(e.longitudeRotation)&&c(e.planes2D_HIGH)&&c(e.planes2D_LOW)&&c(e.uMaxVmax)&&c(e.uvMinAndExtents)},cu.shouldUseSphericalCoordinates=function(e){return A.typeOf.object("rectangle",e),function yBe(e){return Math.max(e.width,e.height)>cu.MAX_WIDTH_FOR_PLANAR_EXTENTS}(e)},cu.MAX_WIDTH_FOR_PLANAR_EXTENTS=O.toRadians(1);const xg=cu;function Cg(e){e=g(e,g.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,Xo.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=g(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:g(e.vertexCacheOptimize,!1),interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:g(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}function xb(e,t){const n=t?Fi.EQUAL:Fi.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:Zt.KEEP,zFail:Zt.DECREMENT_WRAP,zPass:Zt.KEEP},backFunction:n,backOperation:{fail:Zt.KEEP,zFail:Zt.INCREMENT_WRAP,zPass:Zt.KEEP},reference:xn.CESIUM_3D_TILE_MASK,mask:xn.CESIUM_3D_TILE_MASK},stencilMask:xn.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:I_.LESS_OR_EQUAL},depthMask:!1}}function U2(e){return{stencilTest:{enabled:e,frontFunction:Fi.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:Fi.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:xn.CLASSIFICATION_MASK},stencilMask:xn.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:eo.PRE_MULTIPLIED_ALPHA_BLEND}}Object.defineProperties(Cg.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}}}),Cg.isSupported=function(e){return e.context.stencilBuffer};const bBe={stencilTest:{enabled:!0,frontFunction:Fi.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:Fi.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:xn.CLASSIFICATION_MASK},stencilMask:xn.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function Q7(e,t){return Math.floor(e%t/2)}function z2(e,t,n,i,o,r){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,e.debugShowBoundingVolume=r,t.commandList.push(e)}function J7(e,t,n,i,o){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,t.commandList.push(e)}Cg.prototype.update=function(e){if(!c(this._primitive)&&!c(this.geometryInstances))return;let t=this.appearance;c(t)&&c(t.material)&&t.material.update(e.context);const n=this,i=this._primitiveOptions;if(!c(this._primitive)){const o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],r=o.length;let s,a,l,h,u=!1,d=!0,m=!1,_=!1;for(r>0&&(l=o[0].attributes,m=xg.hasAttributesForSphericalExtents(l),_=xg.hasAttributesForTextureCoordinatePlanes(l),h=l.color),s=0;s<r;s++){a=o[s];const y=a.attributes.color;if(c(y))u=!0;else if(u)throw new E("All GeometryInstances must have color attributes to use per-instance color.");d=d&&c(y)&&ei.equals(h,y)}if(!d&&!m&&!_)throw new E("All GeometryInstances must have the same color attribute except via GroundPrimitives");if(u&&!c(t)&&(t=new gi({flat:!0}),this.appearance=t),!u&&t instanceof gi)throw new E("PerInstanceColorAppearance requires color GeometryInstanceAttributes on all GeometryInstances");if(c(t.material)&&!m&&!_)throw new E("Materials on ClassificationPrimitives are not supported except via GroundPrimitives");this._usePickOffsets=!m&&!_,this._hasSphericalExtentsAttribute=m,this._hasPlanarExtentsAttributes=_,this._hasPerColorAttribute=u;const p=new Array(r);for(s=0;s<r;++s)a=o[s],p[s]=new zn({geometry:a.geometry,attributes:a.attributes,modelMatrix:a.modelMatrix,id:a.id,pickPrimitive:g(this._pickPrimitive,n)});i.appearance=t,i.geometryInstances=p,c(this._createBoundingVolumeFunction)&&(i._createBoundingVolumeFunction=function(y,b){n._createBoundingVolumeFunction(y,b)}),i._createRenderStatesFunction=function(y,b,x,C){!function TBe(e,t,n,i){if(c(e._rsStencilDepthPass))return;const o=!e.debugShowShadowVolume;e._rsStencilDepthPass=Lt.fromCache(xb(o,!1)),e._rsStencilDepthPass3DTiles=Lt.fromCache(xb(o,!0)),e._rsColorPass=Lt.fromCache(U2(o)),e._rsPickPass=Lt.fromCache(bBe)}(n)},i._createShaderProgramFunction=function(y,b,x){!function xBe(e,t){const n=t.context,i=e._primitive;let o='in vec3 position3DHigh;\nin vec3 position3DLow;\nin float batchId;\n\n#ifdef EXTRUDED_GEOMETRY\nin vec3 extrudeDirection;\n\nuniform float u_globeMinimumAltitude;\n#endif // EXTRUDED_GEOMETRY\n\n#ifdef PER_INSTANCE_COLOR\nout vec4 v_color;\n#endif // PER_INSTANCE_COLOR\n\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nout vec4 v_sphericalExtents;\n#else // SPHERICAL\nout vec2 v_inversePlaneExtents;\nout vec4 v_westPlane;\nout vec4 v_southPlane;\n#endif // SPHERICAL\nout vec3 v_uvMinAndSphericalLongitudeRotation;\nout vec3 v_uMaxAndInverseDistance;\nout vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n\nvoid main()\n{\n vec4 position = czm_computePosition();\n\n#ifdef EXTRUDED_GEOMETRY\n float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));\n delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;\n\n //extrudeDirection is zero for the top layer\n position = position + vec4(extrudeDirection * delta, 0.0);\n#endif\n\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\n v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);\n v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);\n#else // SPHERICAL\n#ifdef COLUMBUS_VIEW_2D\n vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);\n vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);\n\n // If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w):\n // - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts)\n // - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w)\n // - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow)\n vec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));\n bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;\n planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);\n planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);\n\n // - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0)\n // - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x)\n // - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow)\n idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;\n idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));\n planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);\n planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);\n\n vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;\n vec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;\n vec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;\n#else // COLUMBUS_VIEW_2D\n // 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction\n vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;\n vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;\n vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;\n#endif // COLUMBUS_VIEW_2D\n\n vec3 eastWard = southEastCorner - southWestCorner;\n float eastExtent = length(eastWard);\n eastWard /= eastExtent;\n\n vec3 northWard = northWestCorner - southWestCorner;\n float northExtent = length(northWard);\n northWard /= northExtent;\n\n v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\n v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\n v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n#endif // SPHERICAL\n vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);\n vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);\n\n v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);\n v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);\n v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;\n#endif // TEXTURE_COORDINATES\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#endif\n\n gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);\n}\n';o=e._primitive._batchTable.getVertexShaderCallback()(o),o=Yi._appendDistanceDisplayConditionToShader(i,o),o=Yi._modifyShaderPosition(e,o,t.scene3DOnly),o=Yi._updateColorAttribute(i,o);const r=e._hasPlanarExtentsAttributes,s=r||e._hasSphericalExtentsAttribute;e._extruded&&(o=function ABe(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/in\s+vec3\s+extrudeDirection;/g)){const n="compressedAttributes",i=`in vec2 ${n};`,o="vec3 extrudeDirection;\n",r=` extrudeDirection = czm_octDecode(${n}, 65535.0);\n`;let s=t;return s=s.replace(/in\s+vec3\s+extrudeDirection;/g,""),s=St.replaceMain(s,"czm_non_compressed_main"),[i,o,s,`void main() \n{ \n${r} czm_non_compressed_main(); \n}`].join("\n")}}(i,o));const a=e._extruded?"EXTRUDED_GEOMETRY":"";let l=new St({defines:[a],sources:[o]});const u=new St({sources:[iR]}),d=e._primitive._attributeLocations,h=new xg(s,r,e.appearance);if(e._spStencil=di.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:d}),e._primitive.allowPicking){let p=St.createPickVertexShaderSource(o);p=Yi._appendShowToShader(i,p),p=Yi._updatePickColorAttribute(p);const y=h.createPickFragmentShader(!1),b=h.createPickVertexShader([a],p,!1,t.mapProjection);if(e._spPick=di.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:b,fragmentShaderSource:y,attributeLocations:d}),s){let x=n.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!c(x)){const C=h.createPickFragmentShader(!0),w=h.createPickVertexShader([a],p,!0,t.mapProjection);x=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:w,fragmentShaderSource:C,attributeLocations:d})}e._spPick2D=x}}else e._spPick=di.fromCache({context:n,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:d});o=Yi._appendShowToShader(i,o),l=new St({defines:[a],sources:[o]}),e._sp=di.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:d});const m=h.createFragmentShader(!1),_=h.createVertexShader([a],o,!1,t.mapProjection);if(e._spColor=di.replaceCache({context:n,shaderProgram:e._spColor,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:d}),s){let p=n.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!c(p)){const y=h.createFragmentShader(!0),b=h.createVertexShader([a],o,!0,t.mapProjection);p=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:b,fragmentShaderSource:y,attributeLocations:d})}e._spColor2D=p}}(n,b)},i._createCommandsFunction=function(y,b,x,C,w,v,I){!function wBe(e,t,n,i,o,r,s){(function CBe(e,t){const n=e._primitive;let i=2*n._va.length;t.length=i;let o,r,s,a=0,l=n._batchTable.getUniformMapCallback()(e._uniformMap);const u=e._needs2DShader;for(o=0;o<i;o+=2){const _=n._va[a++];r=t[o],c(r)||(r=t[o]=new $t({owner:e,primitiveType:n._primitiveType})),r.vertexArray=_,r.renderState=e._rsStencilDepthPass,r.shaderProgram=e._sp,r.uniformMap=l,r.pass=Ue.TERRAIN_CLASSIFICATION,s=$t.shallowClone(r,r.derivedCommands.tileset),s.renderState=e._rsStencilDepthPass3DTiles,s.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,r=t[o+1],c(r)||(r=t[o+1]=new $t({owner:e,primitiveType:n._primitiveType})),r.vertexArray=_,r.renderState=e._rsColorPass,r.shaderProgram=e._spColor,r.pass=Ue.TERRAIN_CLASSIFICATION;const y=e.appearance.material;if(c(y)&&(l=Pn(l,y._uniforms)),r.uniformMap=l,s=$t.shallowClone(r,r.derivedCommands.tileset),s.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,u){let b=$t.shallowClone(r,r.derivedCommands.appearance2D);b.shaderProgram=e._spColor2D,r.derivedCommands.appearance2D=b,b=$t.shallowClone(s,s.derivedCommands.appearance2D),b.shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=b}}const d=e._commandsIgnoreShow,h=e._spStencil;let m=0;i=d.length=i/2;for(let _=0;_<i;++_){const p=d[_]=$t.shallowClone(t[m],d[_]);p.shaderProgram=h,p.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,m+=2}})(e,r),function EBe(e,t){const n=e._usePickOffsets,i=e._primitive;let r,a,o=2*i._va.length,s=0;n&&(r=i._pickOffsets,o=2*r.length),t.length=o;let l,u,d,h=0;const m=i._batchTable.getUniformMapCallback()(e._uniformMap),_=e._needs2DShader;for(l=0;l<o;l+=2){let p=i._va[h++];if(n&&(a=r[s++],p=i._va[a.index]),u=t[l],c(u)||(u=t[l]=new $t({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),u.vertexArray=p,u.renderState=e._rsStencilDepthPass,u.shaderProgram=e._sp,u.uniformMap=m,u.pass=Ue.TERRAIN_CLASSIFICATION,n&&(u.offset=a.offset,u.count=a.count),d=$t.shallowClone(u,u.derivedCommands.tileset),d.renderState=e._rsStencilDepthPass3DTiles,d.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,u.derivedCommands.tileset=d,u=t[l+1],c(u)||(u=t[l+1]=new $t({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),u.vertexArray=p,u.renderState=e._rsPickPass,u.shaderProgram=e._spPick,u.uniformMap=m,u.pass=Ue.TERRAIN_CLASSIFICATION,n&&(u.offset=a.offset,u.count=a.count),d=$t.shallowClone(u,u.derivedCommands.tileset),d.pass=Ue.CESIUM_3D_TILE_CLASSIFICATION,u.derivedCommands.tileset=d,_){let y=$t.shallowClone(u,u.derivedCommands.pick2D);y.shaderProgram=e._spPick2D,u.derivedCommands.pick2D=y,y=$t.shallowClone(d,d.derivedCommands.pick2D),y.shaderProgram=e._spPick2D,d.derivedCommands.pick2D=y}}}(e,s)}(n,0,0,0,0,v,I)},i._updateAndQueueCommandsFunction=c(this._updateAndQueueCommandsFunction)?function(y,b,x,C,w,v,I,P){n._updateAndQueueCommandsFunction(y,b,x,C,w,v,I,P)}:function(y,b,x,C,w,v,I,P){!function SBe(e,t,n,i,o,r,s,a){const l=e._primitive;let u;Yi._updateBoundingVolumes(l,t,o),t.mode===ce.SCENE3D?u=l._boundingSphereWC:t.mode===ce.COLUMBUS_VIEW?u=l._boundingSphereCV:t.mode===ce.SCENE2D&&c(l._boundingSphere2D)?u=l._boundingSphere2D:c(l._boundingSphereMorph)&&(u=l._boundingSphereMorph);const d=e.classificationType,h=d!==Xo.CESIUM_3D_TILE,m=d!==Xo.TERRAIN,_=t.passes;let p,y,b;if(_.render){const x=n.length;for(p=0;p<x;++p)y=u[Q7(p,x)],h&&(b=n[p],z2(b,t,o,r,y,s)),m&&(b=n[p].derivedCommands.tileset,z2(b,t,o,r,y,s));if(t.invertClassification){const C=e._commandsIgnoreShow,w=C.length;for(p=0;p<w;++p)y=u[p],b=C[p],z2(b,t,o,r,y,s)}}if(_.pick){const x=i.length,C=l._pickOffsets;for(p=0;p<x;++p)y=u[C[Q7(p,x)].index],h&&(b=i[p],J7(b,t,o,r,y)),m&&(b=i[p].derivedCommands.tileset,J7(b,t,o,r,y))}}(n,b,x,C,w,v,I)},this._primitive=new Yi(i)}if(this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=Lt.fromCache(xb(!1,!1)),this._rsStencilDepthPass3DTiles=Lt.fromCache(xb(!1,!0)),this._rsColorPass=Lt.fromCache(U2(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=Lt.fromCache(xb(!0,!1)),this._rsStencilDepthPass3DTiles=Lt.fromCache(xb(!0,!0)),this._rsColorPass=Lt.fromCache(U2(!0))),this._primitive.appearance!==t){if(!this._hasSphericalExtentsAttribute&&!this._hasPlanarExtentsAttributes&&c(t.material))throw new E("Materials on ClassificationPrimitives are not supported except via GroundPrimitive");if(!this._hasPerColorAttribute&&t instanceof gi)throw new E("PerInstanceColorAppearance requires color GeometryInstanceAttribute");this._primitive.appearance=t}this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{c(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})},Cg.prototype.getGeometryInstanceAttributes=function(e){if(!c(this._primitive))throw new E("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},Cg.prototype.isDestroyed=function(){return!1},Cg.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,Xe(this)};const eY=Cg,vBe={u_globeMinimumAltitude:function(){return 55e3}};function Mc(e){let t=(e=g(e,g.EMPTY_OBJECT)).appearance;const n=e.geometryInstances;if(!c(t)&&c(n)){const o=Array.isArray(n)?n:[n],r=o.length;for(let s=0;s<r;s++){const a=o[s].attributes;if(c(a)&&c(a.color)){t=new gi({flat:!0});break}}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,Xo.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=vo._defaultMaxTerrainHeight,this._minTerrainHeight=vo._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0,this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:g(e.vertexCacheOptimize,!1),interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:g(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:vBe}}function tY(e){return function(t,n){const i=n.maximumRadius,o=i/Math.cos(.5*t)-i;return e._maxHeight+o}}function nY(e){return function(t,n){return e._minHeight}}Object.defineProperties(Mc.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}}}),Mc.isSupported=eY.isSupported;const IBe=new f,DBe=new f,PBe=new f,OBe=new Ce,RBe=new Te;function gI(e,t){const n=e.mapProjection.ellipsoid;if(!c(t.attributes)||!c(t.attributes.position3DHigh))return c(t.rectangle)?t.rectangle:void 0;const i=t.attributes.position3DHigh.values,o=t.attributes.position3DLow.values,r=i.length;let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(let h=0;h<r;h+=3){const m=f.unpack(i,h,IBe),_=f.unpack(o,h,DBe),p=f.add(m,_,PBe),y=n.cartesianToCartographic(p,OBe),b=y.latitude,x=y.longitude;s=Math.min(s,b),a=Math.min(a,x),l=Math.max(l,b),u=Math.max(u,x)}const d=RBe;return d.north=l,d.south=s,d.east=u,d.west=a,d}function V2(e,t){return Math.floor(e%t/2)}function H2(e,t,n,i,o,r,s){const a=e._primitive;n.mode!==ce.SCENE3D&&t.shaderProgram===a._spColor&&a._needs2DShader&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=r,t.cull=o,t.debugShowBoundingVolume=s,n.commandList.push(t)}function iY(e,t,n,i,o,r){const s=e._primitive;n.mode!==ce.SCENE3D&&t.shaderProgram===s._spPick&&s._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=r,t.cull=o,n.commandList.push(t)}Mc.initializeTerrainHeights=function(){return vo.initialize()},Mc.prototype.update=function(e){if(!c(this._primitive)&&!c(this.geometryInstances))return;if(!vo.initialized){if(!this.asynchronous)throw new E("For synchronous GroundPrimitives, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void Mc.initializeTerrainHeights()}const t=this,n=this._classificationPrimitiveOptions;if(!c(this._primitive)){const i=e.mapProjection.ellipsoid;let o,r,s;const a=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],l=a.length,u=new Array(l);let d,h;for(d=0;d<l;++d){o=a[d],r=o.geometry;const y=gI(e,r);c(h)?c(y)&&Te.union(h,y,h):h=Te.clone(y);const b=o.id;if(c(b)&&c(y)){const x=vo.getBoundingSphere(y,i);this._boundingSpheresKeys.push(b),this._boundingSpheres.push(x)}if(s=r.constructor,!c(s)||!c(s.createShadowVolume))throw new E("Not all of the geometry instances have GroundPrimitive support.")}!function LBe(e,t,n){const i=vo.getMinimumMaximumHeights(t,n);e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}(this,h,i);const m=e.verticalExaggeration,_=e.verticalExaggerationRelativeHeight;this._minHeight=Ec.getHeight(this._minTerrainHeight,m,_),this._maxHeight=Ec.getHeight(this._maxTerrainHeight,m,_);const p=Mc._supportsMaterials(e.context);if(this._useFragmentCulling=p,p){let y,b=!0;for(d=0;d<l;++d)if(o=a[d],r=o.geometry,h=gI(e,r),xg.shouldUseSphericalCoordinates(h)){b=!1;break}for(d=0;d<l;++d){o=a[d],r=o.geometry,s=r.constructor;const x=gI(e,r),C=r.textureCoordinateRotationPoints;y=b?xg.getPlanarTextureCoordinateAttributes(x,C,i,e.mapProjection,this._maxHeight):xg.getSphericalExtentGeometryInstanceAttributes(x,C,i,e.mapProjection);const w=o.attributes;for(const v in w)w.hasOwnProperty(v)&&(y[v]=w[v]);u[d]=new zn({geometry:s.createShadowVolume(r,nY(this),tY(this)),attributes:y,id:o.id})}}else for(d=0;d<l;++d)o=a[d],r=o.geometry,s=r.constructor,u[d]=new zn({geometry:s.createShadowVolume(r,nY(this),tY(this)),attributes:o.attributes,id:o.id});n.geometryInstances=u,n.appearance=this.appearance,n._createBoundingVolumeFunction=function(y,b){!function NBe(e,t,n){const i=t.mapProjection.ellipsoid,o=gI(t,n),r=Ao.fromRectangle(o,e._minHeight,e._maxHeight,i);if(e._boundingVolumes.push(r),!t.scene3DOnly){const a=Ae.fromRectangleWithHeights2D(o,t.mapProjection,e._maxHeight,e._minHeight);f.fromElements(a.center.z,a.center.x,a.center.y,a.center),e._boundingVolumes2D.push(a)}}(t,y,b)},n._updateAndQueueCommandsFunction=function(y,b,x,C,w,v,I,P){!function MBe(e,t,n,i,o,r,s,a){let l;l=t.mode===ce.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;const u=e.classificationType,d=u!==Xo.CESIUM_3D_TILE,h=u!==Xo.TERRAIN,m=t.passes,_=e._primitive;let p,y,b;if(m.render){const x=n.length;for(p=0;p<x;++p)y=l[V2(p,x)],d&&(b=n[p],H2(e,b,t,o,r,y,s)),h&&(b=n[p].derivedCommands.tileset,H2(e,b,t,o,r,y,s));if(t.invertClassification){const C=_._commandsIgnoreShow,w=C.length;for(p=0;p<w;++p)y=l[p],b=C[p],H2(e,b,t,o,r,y,s)}}if(m.pick){const x=i.length;let C;for(e._useFragmentCulling||(C=_._primitive._pickOffsets),p=0;p<x;++p)y=l[V2(p,x)],e._useFragmentCulling||(y=l[C[V2(p,x)].index]),d&&(b=i[p],iY(e,b,t,o,r,y)),h&&(b=i[p].derivedCommands.tileset,iY(e,b,t,o,r,y))}}(t,b,x,C,w,v,I)},this._primitive=new eY(n)}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&c(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})},Mc.prototype.getBoundingSphere=function(e){const t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},Mc.prototype.getGeometryInstanceAttributes=function(e){if(!c(this._primitive))throw new E("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},Mc.prototype.isDestroyed=function(){return!1},Mc.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Xe(this)},Mc._supportsMaterials=function(e){return e.depthTexture},Mc.supportsMaterials=function(e){return A.typeOf.object("scene",e),Mc._supportsMaterials(e.frameState.context)};const Cb=Mc,FBe=new V(1,1),kBe=Z.WHITE;function Eb(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new Ye,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(Eb.prototype,{isConstant:{get:function(){return te.isConstant(this._image)&&te.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:_e("image"),repeat:_e("repeat"),color:_e("color"),transparent:_e("transparent")}),Eb.prototype.getType=function(e){return"Image"},Eb.prototype.getValue=function(e,t){return c(t)||(t={}),t.image=te.getValueOrUndefined(this._image,e),t.repeat=te.getValueOrClonedDefault(this._repeat,e,FBe,t.repeat),t.color=te.getValueOrClonedDefault(this._color,e,kBe,t.color),te.getValueOrDefault(this._transparent,e,!1)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t},Eb.prototype.equals=function(e){return this===e||e instanceof Eb&&te.equals(this._image,e._image)&&te.equals(this._repeat,e._repeat)&&te.equals(this._color,e._color)&&te.equals(this._transparent,e._transparent)};const UBe=Eb;function zBe(e){if(e instanceof Z)return new kn(e);if("string"==typeof e||e instanceof zt||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){const t=new UBe;return t.image=e,t}throw new E(`Unable to infer material type: ${e}`)}const dl=function VBe(e,t){return _e(e,t,zBe)};function Qx(e){this._definitionChanged=new Ye,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Qx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),dimensions:_e("dimensions"),heightReference:_e("heightReference"),fill:_e("fill"),material:dl("material"),outline:_e("outline"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition")}),Qx.prototype.clone=function(e){return c(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 Qx(this)},Qx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.dimensions=g(this.dimensions,e.dimensions),this.heightReference=g(this.heightReference,e.heightReference),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const HBe=Qx;function Jx(e){this._definitionChanged=new Ye,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(Jx.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),positions:_e("positions"),width:_e("width"),height:_e("height"),heightReference:_e("heightReference"),extrudedHeight:_e("extrudedHeight"),extrudedHeightReference:_e("extrudedHeightReference"),cornerType:_e("cornerType"),granularity:_e("granularity"),fill:_e("fill"),material:dl("material"),outline:_e("outline"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition"),classificationType:_e("classificationType"),zIndex:_e("zIndex")}),Jx.prototype.clone=function(e){return c(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 Jx(this)},Jx.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.width=g(this.width,e.width),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=g(this.cornerType,e.cornerType),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};const GBe=Jx;function jBe(e){return e}const Nh=function WBe(e,t){return _e(e,t,jBe)};function eC(e){this._definitionChanged=new Ye,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(eC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),length:_e("length"),topRadius:_e("topRadius"),bottomRadius:_e("bottomRadius"),heightReference:_e("heightReference"),fill:_e("fill"),material:dl("material"),outline:_e("outline"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),numberOfVerticalLines:_e("numberOfVerticalLines"),slices:_e("slices"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition")}),eC.prototype.clone=function(e){return c(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 eC(this)},eC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.length=g(this.length,e.length),this.topRadius=g(this.topRadius,e.topRadius),this.bottomRadius=g(this.bottomRadius,e.bottomRadius),this.heightReference=g(this.heightReference,e.heightReference),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=g(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=g(this.slices,e.slices),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const qBe=eC;function tC(e){this._definitionChanged=new Ye,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(tC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),semiMajorAxis:_e("semiMajorAxis"),semiMinorAxis:_e("semiMinorAxis"),height:_e("height"),heightReference:_e("heightReference"),extrudedHeight:_e("extrudedHeight"),extrudedHeightReference:_e("extrudedHeightReference"),rotation:_e("rotation"),stRotation:_e("stRotation"),granularity:_e("granularity"),fill:_e("fill"),material:dl("material"),outline:_e("outline"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),numberOfVerticalLines:_e("numberOfVerticalLines"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition"),classificationType:_e("classificationType"),zIndex:_e("zIndex")}),tC.prototype.clone=function(e){return c(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 tC(this)},tC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.semiMajorAxis=g(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=g(this.semiMinorAxis,e.semiMinorAxis),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=g(this.rotation,e.rotation),this.stRotation=g(this.stRotation,e.stRotation),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=g(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};const YBe=tC;function nC(e){this._definitionChanged=new Ye,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(nC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),radii:_e("radii"),innerRadii:_e("innerRadii"),minimumClock:_e("minimumClock"),maximumClock:_e("maximumClock"),minimumCone:_e("minimumCone"),maximumCone:_e("maximumCone"),heightReference:_e("heightReference"),fill:_e("fill"),material:dl("material"),outline:_e("outline"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),stackPartitions:_e("stackPartitions"),slicePartitions:_e("slicePartitions"),subdivisions:_e("subdivisions"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition")}),nC.prototype.clone=function(e){return c(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 nC(this)},nC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.radii=g(this.radii,e.radii),this.innerRadii=g(this.innerRadii,e.innerRadii),this.minimumClock=g(this.minimumClock,e.minimumClock),this.maximumClock=g(this.maximumClock,e.maximumClock),this.minimumCone=g(this.minimumCone,e.minimumCone),this.maximumCone=g(this.maximumCone,e.maximumCone),this.heightReference=g(this.heightReference,e.heightReference),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.stackPartitions=g(this.stackPartitions,e.stackPartitions),this.slicePartitions=g(this.slicePartitions,e.slicePartitions),this.subdivisions=g(this.subdivisions,e.subdivisions),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const XBe=nC;function iC(e){this._definitionChanged=new Ye,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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(iC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),text:_e("text"),font:_e("font"),style:_e("style"),scale:_e("scale"),showBackground:_e("showBackground"),backgroundColor:_e("backgroundColor"),backgroundPadding:_e("backgroundPadding"),pixelOffset:_e("pixelOffset"),eyeOffset:_e("eyeOffset"),horizontalOrigin:_e("horizontalOrigin"),verticalOrigin:_e("verticalOrigin"),heightReference:_e("heightReference"),fillColor:_e("fillColor"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),translucencyByDistance:_e("translucencyByDistance"),pixelOffsetScaleByDistance:_e("pixelOffsetScaleByDistance"),scaleByDistance:_e("scaleByDistance"),distanceDisplayCondition:_e("distanceDisplayCondition"),disableDepthTestDistance:_e("disableDepthTestDistance")}),iC.prototype.clone=function(e){return c(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 iC(this)},iC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.text=g(this.text,e.text),this.font=g(this.font,e.font),this.style=g(this.style,e.style),this.scale=g(this.scale,e.scale),this.showBackground=g(this.showBackground,e.showBackground),this.backgroundColor=g(this.backgroundColor,e.backgroundColor),this.backgroundPadding=g(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=g(this.pixelOffset,e.pixelOffset),this.eyeOffset=g(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=g(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=g(this.verticalOrigin,e.verticalOrigin),this.heightReference=g(this.heightReference,e.heightReference),this.fillColor=g(this.fillColor,e.fillColor),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=g(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=g(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=g(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=g(this.disableDepthTestDistance,e.disableDepthTestDistance)};const oY=iC,G2=new sN;function oC(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new Ye,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(oC.prototype,{isConstant:{get:function(){return te.isConstant(this._translation)&&te.isConstant(this._rotation)&&te.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:_e("translation"),rotation:_e("rotation"),scale:_e("scale")}),oC.prototype.getValue=function(e,t){return c(t)||(t=new sN),t.translation=te.getValueOrClonedDefault(this._translation,e,G2.translation,t.translation),t.rotation=te.getValueOrClonedDefault(this._rotation,e,G2.rotation,t.rotation),t.scale=te.getValueOrClonedDefault(this._scale,e,G2.scale,t.scale),t},oC.prototype.equals=function(e){return this===e||e instanceof oC&&te.equals(this._translation,e._translation)&&te.equals(this._rotation,e._rotation)&&te.equals(this._scale,e._scale)};const ZBe=oC;function Mh(e,t){this._propertyNames=[],this._definitionChanged=new Ye,c(e)&&this.merge(e,t)}function $Be(e){return new Co(e)}Object.defineProperties(Mh.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){const e=this._propertyNames;for(let t=0,n=e.length;t<n;t++)if(!te.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),Mh.prototype.hasProperty=function(e){return-1!==this._propertyNames.indexOf(e)},Mh.prototype.addProperty=function(e,t,n){const i=this._propertyNames;if(!c(e))throw new E("propertyName is required.");if(-1!==i.indexOf(e))throw new E(`${e} is already a registered property.`);i.push(e),Object.defineProperty(this,e,_e(e,!0,g(n,$Be))),c(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)},Mh.prototype.removeProperty=function(e){const n=this._propertyNames.indexOf(e);if(!c(e))throw new E("propertyName is required.");if(-1===n)throw new E(`${e} is not a registered property.`);this._propertyNames.splice(n,1),delete this[e],this._definitionChanged.raiseEvent(this)},Mh.prototype.getValue=function(e,t){if(!c(e))throw new E("time is required.");c(t)||(t={});const n=this._propertyNames;for(let i=0,o=n.length;i<o;i++){const r=n[i];t[r]=te.getValueOrUndefined(this[r],e,t[r])}return t},Mh.prototype.merge=function(e,t){if(!c(e))throw new E("source is required.");const n=this._propertyNames,i=c(e._propertyNames)?e._propertyNames:Object.keys(e);for(let o=0,r=i.length;o<r;o++){const s=i[o],a=this[s],l=e[s];void 0===a&&-1===n.indexOf(s)&&this.addProperty(s,void 0,t),void 0!==l&&(void 0!==a?c(a)&&c(a.merge)&&a.merge(l):this[s]=c(l)&&c(l.merge)&&c(l.clone)?l.clone():l)}},Mh.prototype.equals=function(e){return this===e||e instanceof Mh&&function KBe(e,t){const n=e._propertyNames,i=t._propertyNames,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;++r){const s=n[r];if(-1===i.indexOf(s)||!te.equals(e[s],t[s]))return!1}return!0}(this,e)};const rC=Mh;function rY(e){return new ZBe(e)}function sC(e){this._definitionChanged=new Ye,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._runAnimations=void 0,this._runAnimationsSubscription=void 0,this._clampAnimations=void 0,this._clampAnimationsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._articulations=void 0,this._articulationsSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this._customShader=void 0,this._customShaderSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(sC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),uri:_e("uri"),scale:_e("scale"),minimumPixelSize:_e("minimumPixelSize"),maximumScale:_e("maximumScale"),incrementallyLoadTextures:_e("incrementallyLoadTextures"),runAnimations:_e("runAnimations"),clampAnimations:_e("clampAnimations"),shadows:_e("shadows"),heightReference:_e("heightReference"),silhouetteColor:_e("silhouetteColor"),silhouetteSize:_e("silhouetteSize"),color:_e("color"),colorBlendMode:_e("colorBlendMode"),colorBlendAmount:_e("colorBlendAmount"),imageBasedLightingFactor:_e("imageBasedLightingFactor"),lightColor:_e("lightColor"),distanceDisplayCondition:_e("distanceDisplayCondition"),nodeTransformations:_e("nodeTransformations",void 0,function QBe(e){return new rC(e,rY)}),articulations:_e("articulations",void 0,function JBe(e){return new rC(e)}),clippingPlanes:_e("clippingPlanes"),customShader:_e("customShader")}),sC.prototype.clone=function(e){return c(e)?(e.show=this.show,e.uri=this.uri,e.scale=this.scale,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.heightReference=this._heightReference,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.lightColor=this.lightColor,e.distanceDisplayCondition=this.distanceDisplayCondition,e.nodeTransformations=this.nodeTransformations,e.articulations=this.articulations,e.clippingPlanes=this.clippingPlanes,e.customShader=this.customShader,e):new sC(this)},sC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.uri=g(this.uri,e.uri),this.scale=g(this.scale,e.scale),this.minimumPixelSize=g(this.minimumPixelSize,e.minimumPixelSize),this.maximumScale=g(this.maximumScale,e.maximumScale),this.incrementallyLoadTextures=g(this.incrementallyLoadTextures,e.incrementallyLoadTextures),this.runAnimations=g(this.runAnimations,e.runAnimations),this.clampAnimations=g(this.clampAnimations,e.clampAnimations),this.shadows=g(this.shadows,e.shadows),this.heightReference=g(this.heightReference,e.heightReference),this.silhouetteColor=g(this.silhouetteColor,e.silhouetteColor),this.silhouetteSize=g(this.silhouetteSize,e.silhouetteSize),this.color=g(this.color,e.color),this.colorBlendMode=g(this.colorBlendMode,e.colorBlendMode),this.colorBlendAmount=g(this.colorBlendAmount,e.colorBlendAmount),this.imageBasedLightingFactor=g(this.imageBasedLightingFactor,e.imageBasedLightingFactor),this.lightColor=g(this.lightColor,e.lightColor),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.clippingPlanes=g(this.clippingPlanes,e.clippingPlanes),this.customShader=g(this.customShader,e.customShader);const t=e.nodeTransformations;if(c(t)){const i=this.nodeTransformations;c(i)?i.merge(t):this.nodeTransformations=new rC(t,rY)}const n=e.articulations;if(c(n)){const i=this.articulations;c(i)?i.merge(n):this.articulations=new rC(n)}};const e3e=sC;function aC(e){this._definitionChanged=new Ye,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(aC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),uri:_e("uri"),maximumScreenSpaceError:_e("maximumScreenSpaceError")}),aC.prototype.clone=function(e){return c(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new aC(this)},aC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.uri=g(this.uri,e.uri),this.maximumScreenSpaceError=g(this.maximumScreenSpaceError,e.maximumScreenSpaceError)};const t3e=aC;function cC(e){this._definitionChanged=new Ye,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(cC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),leadTime:_e("leadTime"),trailTime:_e("trailTime"),width:_e("width"),resolution:_e("resolution"),material:dl("material"),distanceDisplayCondition:_e("distanceDisplayCondition")}),cC.prototype.clone=function(e){return c(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new cC(this)},cC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.leadTime=g(this.leadTime,e.leadTime),this.trailTime=g(this.trailTime,e.trailTime),this.width=g(this.width,e.width),this.resolution=g(this.resolution,e.resolution),this.material=g(this.material,e.material),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const sY=cC;function lC(e){this._definitionChanged=new Ye,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(lC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),plane:_e("plane"),dimensions:_e("dimensions"),fill:_e("fill"),material:dl("material"),outline:_e("outline"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition")}),lC.prototype.clone=function(e){return c(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,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 lC(this)},lC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.plane=g(this.plane,e.plane),this.dimensions=g(this.dimensions,e.dimensions),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const n3e=lC;function uC(e){this._definitionChanged=new Ye,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(uC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),pixelSize:_e("pixelSize"),heightReference:_e("heightReference"),color:_e("color"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),scaleByDistance:_e("scaleByDistance"),translucencyByDistance:_e("translucencyByDistance"),distanceDisplayCondition:_e("distanceDisplayCondition"),disableDepthTestDistance:_e("disableDepthTestDistance")}),uC.prototype.clone=function(e){return c(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new uC(this)},uC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.pixelSize=g(this.pixelSize,e.pixelSize),this.heightReference=g(this.heightReference,e.heightReference),this.color=g(this.color,e.color),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.scaleByDistance=g(this.scaleByDistance,e.scaleByDistance),this.translucencyByDistance=g(this._translucencyByDistance,e.translucencyByDistance),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=g(this.disableDepthTestDistance,e.disableDepthTestDistance)};const i3e=uC;function dC(e){this._definitionChanged=new Ye,this._show=void 0,this._showSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=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._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._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=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._textureCoordinates=void 0,this._textureCoordinatesSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(dC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),hierarchy:_e("hierarchy",void 0,function o3e(e){return Array.isArray(e)&&(e=new G_(e)),new Co(e)}),height:_e("height"),heightReference:_e("heightReference"),extrudedHeight:_e("extrudedHeight"),extrudedHeightReference:_e("extrudedHeightReference"),stRotation:_e("stRotation"),granularity:_e("granularity"),fill:_e("fill"),material:dl("material"),outline:_e("outline"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),perPositionHeight:_e("perPositionHeight"),closeTop:_e("closeTop"),closeBottom:_e("closeBottom"),arcType:_e("arcType"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition"),classificationType:_e("classificationType"),zIndex:_e("zIndex"),textureCoordinates:_e("textureCoordinates")}),dC.prototype.clone=function(e){return c(e)?(e.show=this.show,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,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.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.arcType=this.arcType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e.textureCoordinates=this.textureCoordinates,e):new dC(this)},dC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.hierarchy=g(this.hierarchy,e.hierarchy),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.stRotation=g(this.stRotation,e.stRotation),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.perPositionHeight=g(this.perPositionHeight,e.perPositionHeight),this.closeTop=g(this.closeTop,e.closeTop),this.closeBottom=g(this.closeBottom,e.closeBottom),this.arcType=g(this.arcType,e.arcType),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex),this.textureCoordinates=g(this.textureCoordinates,e.textureCoordinates)};const j2=dC;function fC(e){this._definitionChanged=new Ye,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._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(fC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),positions:_e("positions"),width:_e("width"),granularity:_e("granularity"),material:dl("material"),depthFailMaterial:dl("depthFailMaterial"),arcType:_e("arcType"),clampToGround:_e("clampToGround"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition"),classificationType:_e("classificationType"),zIndex:_e("zIndex")}),fC.prototype.clone=function(e){return c(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new fC(this)},fC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.width=g(this.width,e.width),this.granularity=g(this.granularity,e.granularity),this.material=g(this.material,e.material),this.depthFailMaterial=g(this.depthFailMaterial,e.depthFailMaterial),this.arcType=g(this.arcType,e.arcType),this.clampToGround=g(this.clampToGround,e.clampToGround),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};const wb=fC;function hC(e){this._definitionChanged=new Ye,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._shapeSubscription=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._distanceDisplayConditionSubsription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(hC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),positions:_e("positions"),shape:_e("shape"),cornerType:_e("cornerType"),granularity:_e("granularity"),fill:_e("fill"),material:dl("material"),outline:_e("outline"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition")}),hC.prototype.clone=function(e){return c(e)?(e.show=this.show,e.positions=this.positions,e.shape=this.shape,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):new hC(this)},hC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.shape=g(this.shape,e.shape),this.cornerType=g(this.cornerType,e.cornerType),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const r3e=hC;function pC(e){this._definitionChanged=new Ye,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=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._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(g(e,g.EMPTY_OBJECT))}Object.defineProperties(pC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),coordinates:_e("coordinates"),height:_e("height"),heightReference:_e("heightReference"),extrudedHeight:_e("extrudedHeight"),extrudedHeightReference:_e("extrudedHeightReference"),rotation:_e("rotation"),stRotation:_e("stRotation"),granularity:_e("granularity"),fill:_e("fill"),material:dl("material"),outline:_e("outline"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition"),classificationType:_e("classificationType"),zIndex:_e("zIndex")}),pC.prototype.clone=function(e){return c(e)?(e.show=this.show,e.coordinates=this.coordinates,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.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new pC(this)},pC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.coordinates=g(this.coordinates,e.coordinates),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=g(this.rotation,e.rotation),this.stRotation=g(this.stRotation,e.stRotation),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};const aY=pC;function mC(e){this._definitionChanged=new Ye,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=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.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(mC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:_e("show"),positions:_e("positions"),minimumHeights:_e("minimumHeights"),maximumHeights:_e("maximumHeights"),granularity:_e("granularity"),fill:_e("fill"),material:dl("material"),outline:_e("outline"),outlineColor:_e("outlineColor"),outlineWidth:_e("outlineWidth"),shadows:_e("shadows"),distanceDisplayCondition:_e("distanceDisplayCondition")}),mC.prototype.clone=function(e){return c(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,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):new mC(this)},mC.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.minimumHeights=g(this.minimumHeights,e.minimumHeights),this.maximumHeights=g(this.maximumHeights,e.maximumHeights),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};const cY=mC,s3e=new Ce,W2=[];function a3e(e){return new aI(e)}function Cs(e,t){return _e(e,void 0,function(n){return n instanceof t?n:new t(n)})}function lu(e){let t=(e=g(e,g.EMPTY_OBJECT)).id;c(t)||(t=kr()),this._availability=void 0,this._id=t,this._definitionChanged=new Ye,this._name=e.name,this._show=g(e.show,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","tileset","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall",...W2],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._tileset=void 0,this._tilesetSubscription=void 0,this._orientation=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function q2(e,t,n){const i=t.length;for(let o=0;o<i;o++){const r=t[o],s=r._show;(!n&&s)!==(n&&s)&&q2(r,r._children,n)}e._definitionChanged.raiseEvent(e,"isShowing",n,!n)}Object.defineProperties(lu.prototype,{availability:Nh("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:Nh("name"),show:{get:function(){return this._show},set:function(e){if(!c(e))throw new E("value is required.");if(e===this._show)return;const t=this.isShowing;this._show=e;const n=this.isShowing;t!==n&&q2(this,this._children,n),this._definitionChanged.raiseEvent(this,"show",e,!e)}},isShowing:{get:function(){return this._show&&(!c(this.entityCollection)||this.entityCollection.show)&&(!c(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){const t=this._parent;if(t===e)return;const n=this.isShowing;if(c(t)){const o=t._children.indexOf(this);t._children.splice(o,1)}this._parent=e,c(e)&&e._children.push(this);const i=this.isShowing;n!==i&&q2(this,this._children,i),this._definitionChanged.raiseEvent(this,"parent",e,t)}},propertyNames:{get:function(){return this._propertyNames}},billboard:Cs("billboard",u2),box:Cs("box",HBe),corridor:Cs("corridor",GBe),cylinder:Cs("cylinder",qBe),description:_e("description"),ellipse:Cs("ellipse",YBe),ellipsoid:Cs("ellipsoid",XBe),label:Cs("label",oY),model:Cs("model",e3e),tileset:Cs("tileset",t3e),orientation:_e("orientation"),path:Cs("path",sY),plane:Cs("plane",n3e),point:Cs("point",i3e),polygon:Cs("polygon",j2),polyline:Cs("polyline",wb),polylineVolume:Cs("polylineVolume",r3e),properties:Cs("properties",rC),position:function c3e(e){return _e(e,void 0,a3e)}("position"),rectangle:Cs("rectangle",aY),viewFrom:_e("viewFrom"),wall:Cs("wall",cY)}),lu.registerEntityType=function(e,t){Object.defineProperties(lu.prototype,{[e]:Cs(e,t)}),W2.includes(e)||W2.push(e)},lu.prototype.isAvailable=function(e){if(!c(e))throw new E("time is required.");const t=this._availability;return!c(t)||t.contains(e)},lu.prototype.addProperty=function(e){const t=this._propertyNames;if(!c(e))throw new E("propertyName is required.");if(-1!==t.indexOf(e))throw new E(`${e} is already a registered property.`);if(e in this)throw new E(`${e} is a reserved property name.`);t.push(e),Object.defineProperty(this,e,Nh(e,!0))},lu.prototype.removeProperty=function(e){const n=this._propertyNames.indexOf(e);if(!c(e))throw new E("propertyName is required.");if(-1===n)throw new E(`${e} is not a registered property.`);this._propertyNames.splice(n,1),delete this[e]},lu.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.name=g(this.name,e.name),this.availability=g(this.availability,e.availability);const t=this._propertyNames,n=c(e._propertyNames)?e._propertyNames:Object.keys(e),i=n.length;for(let o=0;o<i;o++){const r=n[o];if("parent"===r||"name"===r||"availability"===r||"children"===r)continue;const s=this[r],a=e[r];!c(s)&&-1===t.indexOf(r)&&this.addProperty(r),c(a)&&(c(s)?c(s.merge)&&s.merge(a):this[r]=c(a.merge)&&c(a.clone)?a.clone():a)}};const lY=new oe,uY=new f,dY=new bt;lu.prototype.computeModelMatrix=function(e,t){A.typeOf.object("time",e);const n=te.getValueOrUndefined(this._position,e,uY);if(!c(n))return;const i=te.getValueOrUndefined(this._orientation,e,dY);return c(i)?k.fromRotationTranslation(oe.fromQuaternion(i,lY),n,t):In.eastNorthUpToFixedFrame(n,void 0,t)},lu.prototype.computeModelMatrixForHeightReference=function(e,t,n,i,o){A.typeOf.object("time",e);const r=te.getValueOrDefault(t,e,tn.NONE);let s=te.getValueOrUndefined(this._position,e,uY);if(r===tn.NONE||!c(s)||f.equalsEpsilon(s,f.ZERO,O.EPSILON8))return this.computeModelMatrix(e,o);const a=i.cartesianToCartographic(s,s3e);X_(r)?a.height=n:a.height+=n,s=i.cartographicToCartesian(a,s);const l=te.getValueOrUndefined(this._orientation,e,dY);return c(l)?k.fromRotationTranslation(oe.fromQuaternion(l,lY),s,o):In.eastNorthUpToFixedFrame(s,void 0,o)},lu.supportsMaterialsforEntitiesOnTerrain=function(e){return Cb.supportsMaterials(e)},lu.supportsPolylinesOnTerrain=function(e){return mI.isSupported(e)};const Fc=lu,fY={id:void 0};function _C(e){if(e._firing)e._refire=!0;else if(0===e._suspendCount){const t=e._addedEntities,n=e._removedEntities,i=e._changedEntities;if(0!==i.length||0!==t.length||0!==n.length){e._firing=!0;do{e._refire=!1;const 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 Na(e){this._owner=e,this._entities=new mn,this._addedEntities=new mn,this._removedEntities=new mn,this._changedEntities=new mn,this._suspendCount=0,this._collectionChanged=new Ye,this._id=kr(),this._show=!0,this._firing=!1,this._refire=!1}Na.prototype.suspendEvents=function(){this._suspendCount++},Na.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new E("resumeEvents can not be called before suspendEvents.");this._suspendCount--,_C(this)},Object.defineProperties(Na.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(!c(e))throw new E("value is required.");if(e===this._show)return;let t;this.suspendEvents();const n=[],i=this._entities.values,o=i.length;for(t=0;t<o;t++)n.push(i[t].isShowing);for(this._show=e,t=0;t<o;t++){const r=n[t],s=i[t];r!==s.isShowing&&s.definitionChanged.raiseEvent(s,"isShowing",s.isShowing,r)}this.resumeEvents()}},owner:{get:function(){return this._owner}}}),Na.prototype.computeAvailability=function(){let e=It.MAXIMUM_VALUE,t=It.MINIMUM_VALUE;const n=this._entities.values;for(let i=0,o=n.length;i<o;i++){const s=n[i].availability;if(c(s)){const a=s.start,l=s.stop;re.lessThan(a,e)&&!a.equals(It.MINIMUM_VALUE)&&(e=a),re.greaterThan(l,t)&&!l.equals(It.MAXIMUM_VALUE)&&(t=l)}}return It.MAXIMUM_VALUE.equals(e)&&(e=It.MINIMUM_VALUE),It.MINIMUM_VALUE.equals(t)&&(t=It.MAXIMUM_VALUE),new _i({start:e,stop:t})},Na.prototype.add=function(e){if(!c(e))throw new E("entity is required.");e instanceof Fc||(e=new Fc(e));const t=e.id,n=this._entities;if(n.contains(t))throw new E(`An entity with id ${t} already exists in this collection.`);return e.entityCollection=this,n.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(Na.prototype._onEntityDefinitionChanged,this),_C(this),e},Na.prototype.remove=function(e){return!!c(e)&&this.removeById(e.id)},Na.prototype.contains=function(e){if(!c(e))throw new E("entity is required");return this._entities.get(e.id)===e},Na.prototype.removeById=function(e){if(!c(e))return!1;const n=this._entities.get(e);return!!this._entities.remove(e)&&(this._addedEntities.remove(e)||(this._removedEntities.set(e,n),this._changedEntities.remove(e)),this._entities.remove(e),n.definitionChanged.removeEventListener(Na.prototype._onEntityDefinitionChanged,this),_C(this),!0)},Na.prototype.removeAll=function(){const e=this._entities,t=e.length,n=e.values,i=this._addedEntities,o=this._removedEntities;for(let r=0;r<t;r++){const s=n[r],a=s.id,l=i.get(a);c(l)||(s.definitionChanged.removeEventListener(Na.prototype._onEntityDefinitionChanged,this),o.set(a,s))}e.removeAll(),i.removeAll(),this._changedEntities.removeAll(),_C(this)},Na.prototype.getById=function(e){if(!c(e))throw new E("id is required.");return this._entities.get(e)},Na.prototype.getOrCreateEntity=function(e){if(!c(e))throw new E("id is required.");let t=this._entities.get(e);return c(t)||(fY.id=e,t=new Fc(fY),this.add(t)),t},Na.prototype._onEntityDefinitionChanged=function(e){const t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),_C(this)};const Sb=Na;function yI(e){return f.fromDegrees(e[0],e[1],e[2])}const Y2={"urn:ogc:def:crs:OGC:1.3:CRS84":yI,"EPSG:4326":yI,"urn:ogc:def:crs:EPSG::4326":yI},hY={},pY={};let Z2,X2=48,$2=Z.ROYALBLUE,K2=Z.YELLOW,Q2=2,J2=Z.fromBytes(255,255,0,100),eF=!1;const l3e={small:24,medium:48,large:64},u3e=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function mY(e,t){let n="";for(const i in e)if(e.hasOwnProperty(i)){if(i===t||-1!==u3e.indexOf(i))continue;const o=e[i];c(o)&&(n+="object"==typeof o?`<tr><th>${i}</th><td>${mY(o)}</td></tr>`:`<tr><th>${i}</th><td>${o}</td></tr>`)}return n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function f3e(e,t){return new d2(function d3e(e,t,n){let i;return function(o,r){return c(i)||(i=e(t,n)),i}}(mY,e,t),!0)}function bI(e,t,n){let i=e.id;if(c(i)&&"Feature"===e.type){let s=2,a=i;for(;c(t.getById(a));)a=`${i}_${s}`,s++;i=a}else i=kr();const o=t.getOrCreateEntity(i),r=e.properties;if(c(r)){let s;o.properties=r;const a=r.title;if(c(a))o.name=a,s="title";else{let u=Number.MAX_VALUE;for(const d in r)if(r.hasOwnProperty(d)&&r[d]){const h=d.toLowerCase();if(u>1&&"title"===h){u=1,s=d;break}u>2&&"name"===h?(u=2,s=d):u>3&&/title/i.test(d)?(u=3,s=d):u>4&&/name/i.test(d)&&(u=4,s=d)}c(s)&&(o.name=r[s])}const l=r.description;null!==l&&(o.description=c(l)?new Co(l):n(r,s))}return o}function tF(e,t){const n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=t(e[i]);return n}const _Y={Feature:yY,FeatureCollection:function h3e(e,t,n,i,o){const r=t.features;for(let s=0,a=r.length;s<a;s++)yY(e,r[s],0,i,o)},GeometryCollection:bY,LineString:EY,MultiLineString:wY,MultiPoint:xY,MultiPolygon:IY,Point:AY,Polygon:vY,Topology:DY},gY={GeometryCollection:bY,LineString:EY,MultiLineString:wY,MultiPoint:xY,MultiPolygon:IY,Point:AY,Polygon:vY,Topology:DY};function yY(e,t,n,i,o){if(null===t.geometry)return void bI(t,e._entityCollection,o.describe);if(!c(t.geometry))throw new Pe("feature.geometry is required.");const r=t.geometry.type,s=gY[r];if(!c(s))throw new Pe(`Unknown geometry type: ${r}`);s(e,t,t.geometry,i,o)}function bY(e,t,n,i,o){const r=n.geometries;for(let s=0,a=r.length;s<a;s++){const l=r[s],u=l.type,d=gY[u];if(!c(d))throw new Pe(`Unknown geometry type: ${u}`);d(e,t,l,i,o)}}function TY(e,t,n,i,o){let r=o.markerSymbol,s=o.markerColor,a=o.markerSize;const l=t.properties;if(c(l)){const _=l["marker-color"];c(_)&&(s=Z.fromCssColorString(_)),a=g(l3e[l["marker-size"]],a);const p=l["marker-symbol"];c(p)&&(r=p)}let u;u=c(r)?1===r.length?e._pinBuilder.fromText(r.toUpperCase(),s,a):e._pinBuilder.fromMakiIconId(r,s,a):e._pinBuilder.fromColor(s,a);const d=new u2;d.verticalOrigin=new Co(lo.BOTTOM),2===i.length&&o.clampToGround&&(d.heightReference=tn.CLAMP_TO_GROUND);const h=bI(t,e._entityCollection,o.describe);h.billboard=d,h.position=new aI(n(i));const m=Promise.resolve(u).then(function(_){d.image=new Co(_)}).catch(function(){d.image=new Co(e._pinBuilder.fromColor(s,a))});e._promises.push(m)}function AY(e,t,n,i,o){TY(e,t,i,n.coordinates,o)}function xY(e,t,n,i,o){const r=n.coordinates;for(let s=0;s<r.length;s++)TY(e,t,i,r[s],o)}function CY(e,t,n,i,o){let r=o.strokeMaterialProperty,s=o.strokeWidthProperty;const a=t.properties;if(c(a)){const d=a["stroke-width"];let h;c(d)&&(s=new Co(d));const m=a.stroke;c(m)&&(h=Z.fromCssColorString(m));const _=a["stroke-opacity"];c(_)&&1!==_&&(c(h)||(h=r.color.getValue().clone()),h.alpha=_),c(h)&&(r=new kn(h))}const l=bI(t,e._entityCollection,o.describe),u=new wb;l.polyline=u,u.clampToGround=o.clampToGround,u.material=r,u.width=s,u.positions=new Co(tF(i,n)),u.arcType=ni.RHUMB}function EY(e,t,n,i,o){CY(e,t,i,n.coordinates,o)}function wY(e,t,n,i,o){const r=n.coordinates;for(let s=0;s<r.length;s++)CY(e,t,i,r[s],o)}function SY(e,t,n,i,o){if(0===i.length||0===i[0].length)return;let r=o.strokeMaterialProperty.color,s=o.fillMaterialProperty,a=o.strokeWidthProperty;const l=t.properties;if(c(l)){const _=l["stroke-width"];let p;c(_)&&(a=new Co(_));const y=l.stroke;c(y)&&(p=Z.fromCssColorString(y));let x,b=l["stroke-opacity"];c(b)&&1!==b&&(c(p)||(p=r.getValue().clone()),p.alpha=b),c(p)&&(r=new Co(p));const C=l.fill,w=s.color.getValue();c(C)&&(x=Z.fromCssColorString(C),x.alpha=w.alpha),b=l["fill-opacity"],c(b)&&b!==w.alpha&&(c(x)||(x=w.clone()),x.alpha=b),c(x)&&(s=new kn(x))}const u=new j2;u.outline=new Co(!0),u.outlineColor=r,u.outlineWidth=a,u.material=s,u.arcType=ni.RHUMB;const d=[];for(let _=1,p=i.length;_<p;_++)d.push(new G_(tF(i[_],n)));const h=i[0];u.hierarchy=new Co(new G_(tF(h,n),d)),h[0].length>2?u.perPositionHeight=new Co(!0):o.clampToGround||(u.height=0),bI(t,e._entityCollection,o.describe).polygon=u}function vY(e,t,n,i,o){SY(e,t,i,n.coordinates,o)}function IY(e,t,n,i,o){const r=n.coordinates;for(let s=0;s<r.length;s++)SY(e,t,i,r[s],o)}function DY(e,t,n,i,o){for(const r in n.objects)if(n.objects.hasOwnProperty(r)){const s=P2e(n,n.objects[r]);(0,_Y[s.type])(e,s,s,i,o)}}function cm(e){this._name=e,this._changed=new Ye,this._error=new Ye,this._isLoading=!1,this._loading=new Ye,this._entityCollection=new Sb(this),this._promises=[],this._pinBuilder=new zq,this._entityCluster=new v2,this._credit=void 0,this._resourceCredits=[]}function PY(e,t,n,i){if(!c(t))throw new E("data is required.");bg.setLoading(e,!0);let o=(n=g(n,g.EMPTY_OBJECT)).credit;"string"==typeof o&&(o=new Yn(o)),e._credit=o;let r=t,s=n.sourceUri;if("string"==typeof t||t instanceof zt){r=(t=zt.createIfNeeded(t)).fetchJson(),s=g(s,t.getUrlComponent());const a=e._resourceCredits,l=t.credits;if(c(l)){const u=l.length;for(let d=0;d<u;d++)a.push(l[d])}}return n={describe:g(n.describe,f3e),markerSize:g(n.markerSize,X2),markerSymbol:g(n.markerSymbol,Z2),markerColor:g(n.markerColor,$2),strokeWidthProperty:new Co(g(n.strokeWidth,Q2)),strokeMaterialProperty:new kn(g(n.stroke,K2)),fillMaterialProperty:new kn(g(n.fill,J2)),clampToGround:g(n.clampToGround,eF)},Promise.resolve(r).then(function(a){return function p3e(e,t,n,i,o){let r;c(i)&&(r=kq(i)),c(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));const s=_Y[t.type];if(!c(s))throw new Pe(`Unsupported GeoJSON object type: ${t.type}`);const a=t.crs;let l=null!==a?yI:null;if(c(a)){if(!c(a.properties))throw new Pe("crs.properties is undefined.");const u=a.properties;if("name"===a.type){if(l=Y2[u.name],!c(l))throw new Pe(`Unknown crs name: ${u.name}`)}else if("link"===a.type){let d=hY[u.href];if(c(d)||(d=pY[u.type]),!c(d))throw new Pe(`Unable to resolve crs link: ${JSON.stringify(u)}`);l=d(u)}else{if("EPSG"!==a.type)throw new Pe(`Unknown crs type: ${a.type}`);if(l=Y2[`EPSG:${u.code}`],!c(l))throw new Pe(`Unknown crs EPSG code: ${u.code}`)}}return Promise.resolve(l).then(function(u){return o&&e._entityCollection.removeAll(),null!==u&&s(e,t,t,u,n),Promise.all(e._promises).then(function(){return e._promises.length=0,bg.setLoading(e,!1),e})})}(e,a,n,s,i)}).catch(function(a){throw bg.setLoading(e,!1),e._error.raiseEvent(e,a),a})}cm.load=function(e,t){return(new cm).load(e,t)},Object.defineProperties(cm,{markerSize:{get:function(){return X2},set:function(e){X2=e}},markerSymbol:{get:function(){return Z2},set:function(e){Z2=e}},markerColor:{get:function(){return $2},set:function(e){$2=e}},stroke:{get:function(){return K2},set:function(e){K2=e}},strokeWidth:{get:function(){return Q2},set:function(e){Q2=e}},fill:{get:function(){return J2},set:function(e){J2=e}},clampToGround:{get:function(){return eF},set:function(e){eF=e}},crsNames:{get:function(){return Y2}},crsLinkHrefs:{get:function(){return hY}},crsLinkTypes:{get:function(){return pY}}}),Object.defineProperties(cm.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},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){if(!c(e))throw new E("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),cm.prototype.load=function(e,t){return PY(this,e,t,!0)},cm.prototype.process=function(e,t){return PY(this,e,t,!1)},cm.prototype.update=function(e){return!0};const OY=cm,lm=Object.freeze({UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2}),na=Object.freeze({TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2});let nF;nF=typeof performance<"u"&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()};const Cr=nF;function iF(e,t,n){this.heading=g(e,0),this.pitch=g(t,0),this.range=g(n,0)}iF.clone=function(e,t){if(c(e))return c(t)||(t=new iF),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};const gC=iF;function _3e(e){return void 0===e}function uu(e){return"boolean"==typeof e}function zo(e,t){for(var n=e.length-1;n>=0;n--)e[n]===t&&e.splice(n,1)}function Eg(e,t){for(var n=e.length-1;n>=0;n--)!0===t(e[n])&&e.splice(n,1)}function yC(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var vb=/[A-Za-z]/,Ma=/[\d]/,sd=/\s/,oF=/['"]/,b3e=/[\x00-\x1F\x7F]/,RY=/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,x3e=RY+/\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+/\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,LY=/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,NY=(new RegExp("[".concat(RY+LY,"]")),x3e+LY),wg=new RegExp("[".concat(NY,"]")),MY=function(){function e(t){void 0===t&&(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){return this.getAttrs()[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 r,n=this.getClass(),i=n?n.split(sd):[],o=t.split(sd);r=o.shift();)-1===i.indexOf(r)&&i.push(r);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var r,n=this.getClass(),i=n?n.split(sd):[],o=t.split(sd);i.length&&(r=o.shift());){var s=i.indexOf(r);-1!==s&&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-1!==(" "+this.getClass()+" ").indexOf(" "+t+" ")},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["<",t,n=n?" "+n:"",">",this.getInnerHtml(),"</",t,">"].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}(),S3e=function(){function e(t){void 0===t&&(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 MY({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<t.getAnchorText().length&&(n.title=t.getAnchorHref()),n},e.prototype.createCssClass=function(t){var n=this.className;if(n){for(var i=[n],o=t.getCssClassSuffixes(),r=0,s=o.length;r<s;r++)i.push(n+"-"+o[r]);return i.join(" ")}return""},e.prototype.processAnchorText=function(t){return this.doTruncate(t)},e.prototype.doTruncate=function(t){var n=this.truncate;if(!n||!n.length)return t;var i=n.length,o=n.location;return"smart"===o?function C3e(e,t,n){var i,o;null==n?(n="…",o=3,i=8):(o=n.length,i=n.length);var s=function(C){var w="";return C.scheme&&C.host&&(w+=C.scheme+"://"),C.host&&(w+=C.host),C.path&&(w+="/"+C.path),C.query&&(w+="?"+C.query),C.fragment&&(w+="#"+C.fragment),w},a=function(C,w){var v=w/2,I=Math.ceil(v),P=-1*Math.floor(v),N="";return P<0&&(N=C.substr(P)),C.substr(0,I)+n+N};if(e.length<=t)return e;var w,v,I,l=t-o,u=(w={},(I=(v=e).match(/^([a-z]+):\/\//i))&&(w.scheme=I[1],v=v.substr(I[0].length)),(I=v.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(w.host=I[1],v=v.substr(I[0].length)),(I=v.match(/^\/(.*?)(?=(\?|#|$))/i))&&(w.path=I[1],v=v.substr(I[0].length)),(I=v.match(/^\?(.*?)(?=(#|$))/i))&&(w.query=I[1],v=v.substr(I[0].length)),(I=v.match(/^#(.*?)$/i))&&(w.fragment=I[1]),w);if(u.query){var d=u.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);d&&(u.query=u.query.substr(0,d[1].length),e=s(u))}if(e.length<=t||(u.host&&(u.host=u.host.replace(/^www\./,""),e=s(u)),e.length<=t))return e;var h="";if(u.host&&(h+=u.host),h.length>=l)return u.host.length==t?(u.host.substr(0,t-o)+n).substr(0,l+i):a(h,l).substr(0,l+i);var m="";if(u.path&&(m+="/"+u.path),u.query&&(m+="?"+u.query),m){if((h+m).length>=l)return(h+m).length==t?(h+m).substr(0,t):(h+a(m,l-h.length)).substr(0,l+i);h+=m}if(u.fragment){var p="#"+u.fragment;if((h+p).length>=l)return(h+p).length==t?(h+p).substr(0,t):(h+a(p,l-h.length)).substr(0,l+i);h+=p}if(u.scheme&&u.host){var b=u.scheme+"://";if((h+b).length<l)return(b+h).substr(0,t)}if(h.length<=t)return h;var x="";return l>0&&(x=h.substr(-1*Math.floor(l/2))),(h.substr(0,Math.ceil(l/2))+n+x).substr(0,l+i)}(t,i):"middle"===o?function E3e(e,t,n){if(e.length<=t)return e;var i,o;null==n?(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)}(t,i):function w3e(e,t,n){return function y3e(e,t,n){var i;return e.length>t&&(null==n?(n="…",i=3):i=n.length,e=e.substring(0,t-i)+n),e}(e,t,n)}(t,i)},e}(),Wr=wt(3449),bC=function(){function e(t){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(t){this.offset=t},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.type]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),I3e=new RegExp("^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|verm\xf6gensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|verm\xf6gensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|\u043a\u0430\u0442\u043e\u043b\u0438\u043a|\u0627\u062a\u0635\u0627\u0644\u0627\u062a|\u0627\u0644\u0628\u062d\u0631\u064a\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0639\u0644\u064a\u0627\u0646|\u067e\u0627\u06a9\u0633\u062a\u0627\u0646|\u0643\u0627\u062b\u0648\u0644\u064a\u0643|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|\u043c\u043e\u0441\u043a\u0432\u0430|\u043e\u043d\u043b\u0430\u0439\u043d|\u0627\u0628\u0648\u0638\u0628\u064a|\u0627\u0631\u0627\u0645\u0643\u0648|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0641\u0644\u0633\u0637\u064a\u0646|\u0645\u0644\u064a\u0633\u064a\u0627|\u092d\u093e\u0930\u0924\u092e\u094d|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|\u05d9\u05e9\u05e8\u05d0\u05dc|\u0627\u06cc\u0631\u0627\u0646|\u0628\u0627\u0632\u0627\u0631|\u0628\u06be\u0627\u0631\u062a|\u0633\u0648\u062f\u0627\u0646|\u0633\u0648\u0631\u064a\u0629|\u0647\u0645\u0631\u0627\u0647|\u092d\u093e\u0930\u094b\u0924|\u0938\u0902\u0917\u0920\u0928|\u09ac\u09be\u0982\u09b2\u09be|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0d2d\u0d3e\u0d30\u0d24\u0d02|\u5609\u91cc\u5927\u9152\u5e97|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|\u0434\u0435\u0442\u0438|\u0441\u0430\u0439\u0442|\u0628\u0627\u0631\u062a|\u0628\u064a\u062a\u0643|\u0680\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0634\u0628\u0643\u0629|\u0639\u0631\u0627\u0642|\u0639\u0645\u0627\u0646|\u0645\u0648\u0642\u0639|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u09ad\u09be\u09f0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b2d\u0b3e\u0b30\u0b24|\u0cad\u0cbe\u0cb0\u0ca4|\u0dbd\u0d82\u0d9a\u0dcf|\u30a2\u30de\u30be\u30f3|\u30b0\u30fc\u30b0\u30eb|\u30af\u30e9\u30a6\u30c9|\u30dd\u30a4\u30f3\u30c8|\u7ec4\u7ec7\u673a\u6784|\u96fb\u8a0a\u76c8\u79d1|\u9999\u683c\u91cc\u62c9|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|\u0431\u0435\u043b|\u043a\u043e\u043c|\u049b\u0430\u0437|\u043c\u043a\u0434|\u043c\u043e\u043d|\u043e\u0440\u0433|\u0440\u0443\u0441|\u0441\u0440\u0431|\u0443\u043a\u0440|\u0570\u0561\u0575|\u05e7\u05d5\u05dd|\u0639\u0631\u0628|\u0642\u0637\u0631|\u0643\u0648\u0645|\u0645\u0635\u0631|\u0915\u0949\u092e|\u0928\u0947\u091f|\u0e04\u0e2d\u0e21|\u0e44\u0e17\u0e22|\u0ea5\u0eb2\u0ea7|\u30b9\u30c8\u30a2|\u30bb\u30fc\u30eb|\u307f\u3093\u306a|\u4e2d\u6587\u7f51|\u4e9a\u9a6c\u900a|\u5929\u4e3b\u6559|\u6211\u7231\u4f60|\u65b0\u52a0\u5761|\u6de1\u9a6c\u9521|\u8bfa\u57fa\u4e9a|\u98de\u5229\u6d66|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|\u03b5\u03bb|\u03b5\u03c5|\u0431\u0433|\u0435\u044e|\u0440\u0444|\u10d2\u10d4|\ub2f7\ub137|\ub2f7\ucef4|\uc0bc\uc131|\ud55c\uad6d|\u30b3\u30e0|\u4e16\u754c|\u4e2d\u4fe1|\u4e2d\u56fd|\u4e2d\u570b|\u4f01\u4e1a|\u4f5b\u5c71|\u4fe1\u606f|\u5065\u5eb7|\u516b\u5366|\u516c\u53f8|\u516c\u76ca|\u53f0\u6e7e|\u53f0\u7063|\u5546\u57ce|\u5546\u5e97|\u5546\u6807|\u5609\u91cc|\u5728\u7ebf|\u5927\u62ff|\u5a31\u4e50|\u5bb6\u96fb|\u5e7f\u4e1c|\u5fae\u535a|\u6148\u5584|\u624b\u673a|\u62db\u8058|\u653f\u52a1|\u653f\u5e9c|\u65b0\u95fb|\u65f6\u5c1a|\u66f8\u7c4d|\u673a\u6784|\u6e38\u620f|\u6fb3\u9580|\u70b9\u770b|\u79fb\u52a8|\u7f51\u5740|\u7f51\u5e97|\u7f51\u7ad9|\u7f51\u7edc|\u8054\u901a|\u8c37\u6b4c|\u8d2d\u7269|\u901a\u8ca9|\u96c6\u56e2|\u98df\u54c1|\u9910\u5385|\u9999\u6e2f)$"),D3e=/[\/?#]/,P3e=/[-+&@#/%=~_()|'$*\[\]{}\u2713]/,FY=/[?!:,.;^]/,BY=/https?:\/\//i,O3e=new RegExp("^"+BY.source,"i"),R3e=new RegExp(FY.source+"$"),L3e=/^(javascript|vbscript):/i,N3e=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,M3e=/^(?:\/\/)?([^/#?:]+)/;function rF(e){return vb.test(e)}function kY(e){return vb.test(e)||Ma.test(e)||"+"===e||"-"===e||"."===e}function um(e){return wg.test(e)}function sF(e){return"_"===e||um(e)}function UY(e){return wg.test(e)||P3e.test(e)||FY.test(e)}function aF(e){return D3e.test(e)}function zY(e){return I3e.test(e.toLowerCase())}var k3e=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,U3e=/[:/?#]/,V3e=/^(https?:\/\/)?(www\.)?/i,H3e=/^\/\//,G3e=function(e){function t(n){var i=e.call(this,n)||this;return i.type="url",i.url="",i.urlMatchType="scheme",i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.protocolPrepended=!1,i.urlMatchType=n.urlMatchType,i.url=n.url,i.protocolRelativeMatch=n.protocolRelativeMatch,i.stripPrefix=n.stripPrefix,i.stripTrailingSlash=n.stripTrailingSlash,i.decodePercentEncoding=n.decodePercentEncoding,i}return(0,Wr.ZT)(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var n=this.url;return!this.protocolRelativeMatch&&"scheme"!==this.urlMatchType&&!this.protocolPrepended&&(n=this.url="http://"+n,this.protocolPrepended=!0),n},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=function q3e(e){return e.replace(H3e,"")}(n)),this.stripPrefix.scheme&&(n=function j3e(e){return e.replace(O3e,"")}(n)),this.stripPrefix.www&&(n=function W3e(e){return e.replace(V3e,"$1")}(n)),this.stripTrailingSlash&&(n=function Y3e(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e}(n)),this.decodePercentEncoding&&(n=function X3e(e){var t=e.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(t)}catch{return t}}(n)),n},t}(bC),Z3e=/^mailto:/i,$3e=new RegExp("[".concat(NY,"!#$%&'*+/=?^_`{|}~-]"));function cF(e){return $3e.test(e)}var J3e=function(e){function t(n){var i=e.call(this,n)||this;return i.type="email",i.email="",i.email=n.email,i}return(0,Wr.ZT)(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(bC);function VY(e){return"_"===e||wg.test(e)}var tke=["twitter","facebook","instagram","tiktok"],nke=function(e){function t(n){var i=e.call(this,n)||this;return i.type="hashtag",i.serviceName="twitter",i.hashtag="",i.serviceName=n.serviceName,i.hashtag=n.hashtag,i}return(0,Wr.ZT)(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var n=this.serviceName,i=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+i;case"facebook":return"https://www.facebook.com/hashtag/"+i;case"instagram":return"https://instagram.com/explore/tags/"+i;case"tiktok":return"https://www.tiktok.com/tag/"+i;default:throw yC(n),new Error("Invalid hashtag service: ".concat(n))}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t}(bC),ike={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/},oke=/[-\w.]/;function HY(e){return oke.test(e)}var ske=["twitter","instagram","soundcloud","tiktok"],ake=function(e){function t(n){var i=e.call(this,n)||this;return i.type="mention",i.serviceName="twitter",i.mention="",i.mention=n.mention,i.serviceName=n.serviceName,i}return(0,Wr.ZT)(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t}(bC),cke=/[-. ]/,lke=/[-. ()]/,uke=/[,;]/,hke=new RegExp("^".concat(/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/.source,"|").concat(/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source,"$"));function GY(e){return cke.test(e)}function lF(e){return uke.test(e)}var mke=function(e){function t(n){var i=e.call(this,n)||this;return i.type="phone",i.number="",i.plusSign=!1,i.number=n.number,i.plusSign=n.plusSign,i}return(0,Wr.ZT)(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(bC);var gke=/[\(\{\[]/,jY=/[\)\}\]]/,WY={")":"(","}":"{","]":"["};function uF(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"scheme"}}function dF(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"tld"}}function fF(e,t){return{type:"phone",startIdx:e,state:t,acceptStateReached:!1}}var uf=function e(t){void 0===t&&(t={}),this.idx=void 0!==t.idx?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing},Eke=function(){function e(t){void 0===t&&(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=function Ske(e){return null==e&&(e=!0),uu(e)?{schemeMatches:e,tldMatches:e,ipV4Matches:e}:{schemeMatches:!uu(e.schemeMatches)||e.schemeMatches,tldMatches:!uu(e.tldMatches)||e.tldMatches,ipV4Matches:!uu(e.ipV4Matches)||e.ipV4Matches}}(t.urls),this.email=uu(t.email)?t.email:this.email,this.phone=uu(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=uu(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=function vke(e){return null==e&&(e=!0),uu(e)?{scheme:e,www:e}:{scheme:!uu(e.scheme)||e.scheme,www:!uu(e.www)||e.www}}(t.stripPrefix),this.stripTrailingSlash=uu(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=uu(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(!1!==n&&-1===ske.indexOf(n))throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(!1!==i&&-1===tke.indexOf(i))throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=function Ike(e){return"number"==typeof e?{length:e,location:"end"}:function g3e(e,t){for(var n in t)t.hasOwnProperty(n)&&_3e(e[n])&&(e[n]=t[n]);return e}(e||{},{length:Number.POSITIVE_INFINITY,location:"end"})}(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){return new e(n).link(t)},e.parse=function(t,n){return new e(n).parse(t)},e.prototype.parse=function(t){var n=this,i=["a","style","script"],o=0,r=[];return function Cke(e,t){for(var n=t.onOpenTag,i=t.onCloseTag,o=t.onText,r=t.onComment,s=t.onDoctype,a=new uf,l=0,u=e.length,d=0,h=0,m=a;l<u;){var _=e.charAt(l);switch(d){case 0:"<"===_&&j();break;case 1:"!"===(K=_)?d=13:"/"===K?(d=2,m=new uf((0,Wr.pi)((0,Wr.pi)({},m),{isClosing:!0}))):"<"===K?j():vb.test(K)?(d=3,m=new uf((0,Wr.pi)((0,Wr.pi)({},m),{isOpening:!0}))):(d=0,m=a);break;case 2:x(_);break;case 3:b(_);break;case 4:C(_);break;case 5:w(_);break;case 6:v(_);break;case 7:I(_);break;case 8:P(_);break;case 9:N(_);break;case 10:R(_);break;case 11:B(_);break;case 12:F(_);break;case 13:"--"===e.substr(l,2)?(l+=2,m=new uf((0,Wr.pi)((0,Wr.pi)({},m),{type:"comment"})),d=14):"DOCTYPE"===e.substr(l,7).toUpperCase()?(l+=7,m=new uf((0,Wr.pi)((0,Wr.pi)({},m),{type:"doctype"})),d=20):q();break;case 14:D(_);break;case 15:L(_);break;case 16:M(_);break;case 17:U(_);break;case 18:z(_);break;case 19:G(_);break;case 20:W(_);break;default:yC(d)}l++}var K;function b(K){sd.test(K)?(m=new uf((0,Wr.pi)((0,Wr.pi)({},m),{name:ne()})),d=4):"<"===K?j():"/"===K?(m=new uf((0,Wr.pi)((0,Wr.pi)({},m),{name:ne()})),d=12):">"===K?(m=new uf((0,Wr.pi)((0,Wr.pi)({},m),{name:ne()})),Q()):!vb.test(K)&&!Ma.test(K)&&":"!==K&&q()}function x(K){">"===K?q():vb.test(K)?d=3:q()}function C(K){sd.test(K)||("/"===K?d=12:">"===K?Q():"<"===K?j():"="===K||oF.test(K)||b3e.test(K)?q():d=5)}function w(K){sd.test(K)?d=6:"/"===K?d=12:"="===K?d=7:">"===K?Q():"<"===K?j():oF.test(K)&&q()}function v(K){sd.test(K)||("/"===K?d=12:"="===K?d=7:">"===K?Q():"<"===K?j():oF.test(K)?q():d=5)}function I(K){sd.test(K)||('"'===K?d=8:"'"===K?d=9:/[>=`]/.test(K)?q():"<"===K?j():d=10)}function P(K){'"'===K&&(d=11)}function N(K){"'"===K&&(d=11)}function R(K){sd.test(K)?d=4:">"===K?Q():"<"===K&&j()}function B(K){sd.test(K)?d=4:"/"===K?d=12:">"===K?Q():"<"===K?j():(d=4,function X(){l--}())}function F(K){">"===K?(m=new uf((0,Wr.pi)((0,Wr.pi)({},m),{isClosing:!0})),Q()):d=4}function D(K){"-"===K?d=15:">"===K?q():d=16}function L(K){"-"===K?d=18:">"===K?q():d=16}function M(K){"-"===K&&(d=17)}function U(K){d="-"===K?18:16}function z(K){">"===K?Q():"!"===K?d=19:"-"===K||(d=16)}function G(K){"-"===K?d=17:">"===K?Q():d=16}function W(K){">"===K?Q():"<"===K&&j()}function q(){d=0,m=a}function j(){d=1,m=new uf({idx:l})}function Q(){var K=e.slice(h,m.idx);K&&o(K,h),"comment"===m.type?r(m.idx):"doctype"===m.type?s(m.idx):(m.isOpening&&n(m.name,m.idx),m.isClosing&&i(m.name,m.idx)),q(),h=l+1}function ne(){return e.slice(m.idx+(m.isClosing?2:1),l).toLowerCase()}h<l&&function Y(){var K=e.slice(h,l);o(K,h),h=l+1}()}(t,{onOpenTag:function(s){i.indexOf(s)>=0&&o++},onText:function(s,a){if(0===o){var u=s.split(/( | |<|<|>|>|"|"|')/gi),d=a;u.forEach(function(h,m){if(m%2==0){var _=n.parseText(h,d);r.push.apply(r,_)}d+=h.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)},e.prototype.compactMatches=function(t){t.sort(function(l,u){return l.getOffset()-u.getOffset()});for(var n=0;n<t.length-1;){var i=t[n],o=i.getOffset(),r=i.getMatchedText().length,s=o+r;if(n+1<t.length){if(t[n+1].getOffset()===o){var a=t[n+1].getMatchedText().length>r?n:n+1;t.splice(a,1);continue}if(t[n+1].getOffset()<s){t.splice(n+1,1);continue}}n++}return t},e.prototype.removeUnwantedMatches=function(t){return this.hashtag||Eg(t,function(n){return"hashtag"===n.getType()}),this.email||Eg(t,function(n){return"email"===n.getType()}),this.phone||Eg(t,function(n){return"phone"===n.getType()}),this.mention||Eg(t,function(n){return"mention"===n.getType()}),this.urls.schemeMatches||Eg(t,function(n){return"url"===n.getType()&&"scheme"===n.getUrlMatchType()}),this.urls.tldMatches||Eg(t,function(n){return"url"===n.getType()&&"tld"===n.getUrlMatchType()}),this.urls.ipV4Matches||Eg(t,function(n){return"url"===n.getType()&&"ipV4"===n.getUrlMatchType()}),t},e.prototype.parseText=function(t,n){void 0===n&&(n=0),n=n||0;for(var i=function _ke(e,t){for(var n=t.tagBuilder,i=t.stripPrefix,o=t.stripTrailingSlash,r=t.decodePercentEncoding,s=t.hashtagServiceName,a=t.mentionServiceName,l=[],u=e.length,d=[],h=0;h<u;h++){var m=e.charAt(h);if(0===d.length)b(m);else for(var _=d.length-1;_>=0;_--){var p=d[_];switch(p.state){case 11:pe=p,"/"===m?pe.state=12:zo(d,pe);break;case 12:N(p,m);break;case 0:x(p,m);break;case 1:C(p,m);break;case 2:w(p,m);break;case 3:v(p,m);break;case 4:I(p,m);break;case 5:R(p,m);break;case 6:B(p,m);break;case 7:F(p,m);break;case 13:S(p,m);break;case 14:D(p,m);break;case 8:L(p,m);break;case 9:M(p,m);break;case 10:U(p,m);break;case 15:z(p,m);break;case 16:G(p,m);break;case 17:W(p,m);break;case 18:q(p,m);break;case 19:j(p,m);break;case 20:Q(p,m);break;case 21:Y(p,m);break;case 22:ne(p,m);break;case 23:X(p,m);break;case 24:K(p,m);break;case 25:$(p,m);break;case 26:me(p,m);break;case 27:Se(p,m);break;case 28:fe(p,m);break;case 29:ye(p,m);break;case 30:ve(p,m);break;case 31:Oe(p,m);break;case 32:je(p,m);break;case 33:Ke(p,m);break;case 34:Qt(p,m);break;case 35:nn(p,m);break;case 36:Pt(p,m);break;case 37:Ge(p,m);break;case 38:ft(p,m);break;case 39:gn(p,m);break;case 40:Ft(p,m);break;case 41:Ht(p,m);break;default:yC(p.state)}}}for(var pe,y=d.length-1;y>=0;y--)d.forEach(function(pe){return Cn(pe)});return l;function b(pe){if("#"===pe)d.push(function Ake(e,t){return{type:"hashtag",startIdx:e,state:t,acceptStateReached:!1}}(h,28));else if("@"===pe)d.push(function xke(e,t){return{type:"mention",startIdx:e,state:t,acceptStateReached:!1}}(h,30));else if("/"===pe)d.push(dF(h,11));else if("+"===pe)d.push(fF(h,37));else if("("===pe)d.push(fF(h,32));else{if(Ma.test(pe)&&(d.push(fF(h,38)),d.push(function bke(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"ipV4",octetsEncountered:1}}(h,13))),function K3e(e){return wg.test(e)}(pe)){var Ie="m"===pe.toLowerCase()?15:22;d.push(function Tke(e,t){return{type:"email",startIdx:e,state:t,acceptStateReached:!1}}(h,Ie))}rF(pe)&&d.push(uF(h,0)),wg.test(pe)&&d.push(dF(h,5))}}function x(pe,Ie){":"===Ie?pe.state=2:"-"===Ie?pe.state=1:kY(Ie)||zo(d,pe)}function C(pe,Ie){"-"===Ie||("/"===Ie?(zo(d,pe),d.push(dF(h,11))):kY(Ie)?pe.state=0:zo(d,pe))}function w(pe,Ie){"/"===Ie?pe.state=3:"."===Ie?zo(d,pe):um(Ie)?(pe.state=5,rF(Ie)&&d.push(uF(h,0))):zo(d,pe)}function v(pe,Ie){"/"===Ie?pe.state=4:UY(Ie)?(pe.state=10,pe.acceptStateReached=!0):Cn(pe)}function I(pe,Ie){"/"===Ie?pe.state=10:um(Ie)?(pe.state=5,pe.acceptStateReached=!0):zo(d,pe)}function N(pe,Ie){um(Ie)?pe.state=5:zo(d,pe)}function R(pe,Ie){"."===Ie?pe.state=7:"-"===Ie?pe.state=6:":"===Ie?pe.state=8:aF(Ie)?pe.state=10:sF(Ie)||Cn(pe)}function B(pe,Ie){"-"===Ie||("."===Ie?Cn(pe):um(Ie)?pe.state=5:Cn(pe))}function F(pe,Ie){"."===Ie?Cn(pe):um(Ie)?(pe.state=5,pe.acceptStateReached=!0):Cn(pe)}function S(pe,Ie){"."===Ie?pe.state=14:":"===Ie?pe.state=8:Ma.test(Ie)||(aF(Ie)?pe.state=10:wg.test(Ie)?zo(d,pe):Cn(pe))}function D(pe,Ie){Ma.test(Ie)?(pe.octetsEncountered++,4===pe.octetsEncountered&&(pe.acceptStateReached=!0),pe.state=13):Cn(pe)}function L(pe,Ie){Ma.test(Ie)?pe.state=9:Cn(pe)}function M(pe,Ie){Ma.test(Ie)||(aF(Ie)?pe.state=10:Cn(pe))}function U(pe,Ie){UY(Ie)||Cn(pe)}function z(pe,Ie){"a"===Ie.toLowerCase()?pe.state=16:ne(pe,Ie)}function G(pe,Ie){"i"===Ie.toLowerCase()?pe.state=17:ne(pe,Ie)}function W(pe,Ie){"l"===Ie.toLowerCase()?pe.state=18:ne(pe,Ie)}function q(pe,Ie){"t"===Ie.toLowerCase()?pe.state=19:ne(pe,Ie)}function j(pe,Ie){"o"===Ie.toLowerCase()?pe.state=20:ne(pe,Ie)}function Q(pe,Ie){":"===Ie.toLowerCase()?pe.state=21:ne(pe,Ie)}function Y(pe,Ie){cF(Ie)?pe.state=22:zo(d,pe)}function ne(pe,Ie){"."===Ie?pe.state=23:"@"===Ie?pe.state=24:cF(Ie)?pe.state=22:zo(d,pe)}function X(pe,Ie){"."===Ie||"@"===Ie?zo(d,pe):cF(Ie)?pe.state=22:zo(d,pe)}function K(pe,Ie){um(Ie)?pe.state=25:zo(d,pe)}function $(pe,Ie){"."===Ie?pe.state=27:"-"===Ie?pe.state=26:sF(Ie)||Cn(pe)}function me(pe,Ie){"-"===Ie||"."===Ie?Cn(pe):sF(Ie)?pe.state=25:Cn(pe)}function Se(pe,Ie){"."===Ie||"-"===Ie?Cn(pe):um(Ie)?(pe.state=25,pe.acceptStateReached=!0):Cn(pe)}function fe(pe,Ie){VY(Ie)?(pe.state=29,pe.acceptStateReached=!0):zo(d,pe)}function ye(pe,Ie){VY(Ie)||Cn(pe)}function ve(pe,Ie){HY(Ie)?(pe.state=31,pe.acceptStateReached=!0):zo(d,pe)}function Oe(pe,Ie){HY(Ie)||(wg.test(Ie)?zo(d,pe):Cn(pe))}function Ge(pe,Ie){Ma.test(Ie)?pe.state=38:(zo(d,pe),b(Ie))}function je(pe,Ie){Ma.test(Ie)?pe.state=33:zo(d,pe),b(Ie)}function Ke(pe,Ie){Ma.test(Ie)?pe.state=34:zo(d,pe)}function Qt(pe,Ie){Ma.test(Ie)?pe.state=35:zo(d,pe)}function nn(pe,Ie){")"===Ie?pe.state=36:zo(d,pe)}function Pt(pe,Ie){Ma.test(Ie)?pe.state=38:GY(Ie)?pe.state=39:zo(d,pe)}function ft(pe,Ie){pe.acceptStateReached=!0,lF(Ie)?pe.state=40:"#"===Ie?pe.state=41:Ma.test(Ie)||("("===Ie?pe.state=32:GY(Ie)?pe.state=39:(Cn(pe),rF(Ie)&&d.push(uF(h,0))))}function gn(pe,Ie){Ma.test(Ie)?pe.state=38:"("===Ie?pe.state=32:(Cn(pe),b(Ie))}function Ft(pe,Ie){lF(Ie)||("#"===Ie?pe.state=41:Ma.test(Ie)?pe.state=38:Cn(pe))}function Ht(pe,Ie){lF(Ie)?pe.state=40:Ma.test(Ie)?zo(d,pe):Cn(pe)}function Cn(pe){if(zo(d,pe),pe.acceptStateReached){var Ie=pe.startIdx,on=e.slice(pe.startIdx,h);if(on=function yke(e){for(var t={"(":0,"{":0,"[":0},n=0;n<e.length;n++){var i=e.charAt(n);gke.test(i)?t[i]++:jY.test(i)&&t[WY[i]]--}for(var r,o=e.length-1;o>=0;)if(r=e.charAt(o),jY.test(r)){var s=WY[r];if(!(t[s]<0))break;t[s]++,o--}else{if(!R3e.test(r))break;o--}return e.slice(0,o+1)}(on),"url"===pe.type){if("@"===e.charAt(pe.startIdx-1))return;var Gi=pe.matchType;if("scheme"===Gi){var qo=BY.exec(on);if(qo&&(Ie+=qo.index,on=on.slice(qo.index)),!function F3e(e){if(L3e.test(e))return!1;var t=e.match(N3e);if(!t)return!1;var i=t[2];return!!t[1]||!(-1===i.indexOf(".")||!vb.test(i))}(on))return}else if("tld"===Gi){if(!function B3e(e){var t=e.match(M3e);if(!t)return!1;var i=t[0].split(".");return!(i.length<2||!zY(i[i.length-1]))}(on))return}else if("ipV4"===Gi){if(!function z3e(e){var t=e.split(U3e,1)[0];return k3e.test(t)}(on))return}else yC(Gi);l.push(new G3e({tagBuilder:n,matchedText:on,offset:Ie,urlMatchType:Gi,url:on,protocolRelativeMatch:"//"===on.slice(0,2),stripPrefix:i,stripTrailingSlash:o,decodePercentEncoding:r}))}else if("email"===pe.type)(function Q3e(e){return zY(e.split(".").pop()||"")})(on)&&l.push(new J3e({tagBuilder:n,matchedText:on,offset:Ie,email:on.replace(Z3e,"")}));else if("hashtag"===pe.type)(function eke(e){return e.length<=140})(on)&&l.push(new nke({tagBuilder:n,matchedText:on,offset:Ie,serviceName:s,hashtag:on.slice(1)}));else if("mention"===pe.type)(function rke(e,t){return ike[t].test(e)})(on,a)&&l.push(new ake({tagBuilder:n,matchedText:on,offset:Ie,serviceName:a,mention:on.slice(1)}));else if("phone"===pe.type){if(function pke(e){return("+"===e.charAt(0)||lke.test(e))&&hke.test(e)}(on=on.replace(/ +$/g,""))){var ua=on.replace(/[^0-9,;#]/g,"");l.push(new mke({tagBuilder:n,matchedText:on,offset:Ie,number:ua,plusSign:"+"===on.charAt(0)}))}}else yC(pe)}}}(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),o=0,r=i.length;o<r;o++)i[o].setOffset(n+i[o].getOffset());return i},e.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"<").replace(/>/g,">"));for(var n=this.parse(t),i=[],o=0,r=0,s=n.length;r<s;r++){var a=n[r];i.push(t.substring(o,a.getOffset())),i.push(this.createMatchReturnVal(a)),o=a.getOffset()+a.getMatchedText().length}return i.push(t.substring(o)),i.join("")},e.prototype.createMatchReturnVal=function(t){var n;return this.replaceFn&&(n=this.replaceFn.call(this.context,t)),"string"==typeof n?n:!1===n?t.getMatchedText():n instanceof MY?n.toAnchorString():t.buildTag().toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new S3e({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version="4.0.0",e}();const Dke=Eke,TC=15,qY=573;function EI(e){return wI(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function wI(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?wI(n):n),[])}const QY=[0,1,2,3].concat(...EI([[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 er(){const e=this;function n(o,r){let s=0;do{s|=1&o,o>>>=1,s<<=1}while(--r>0);return s>>>1}e.build_tree=function(o){const r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems;let l,u,h,d=-1;for(o.heap_len=0,o.heap_max=qY,l=0;l<a;l++)0!==r[2*l]?(o.heap[++o.heap_len]=d=l,o.depth[l]=0):r[2*l+1]=0;for(;o.heap_len<2;)h=o.heap[++o.heap_len]=d<2?++d:0,r[2*h]=1,o.depth[h]=0,o.opt_len--,s&&(o.static_len-=s[2*h+1]);for(e.max_code=d,l=Math.floor(o.heap_len/2);l>=1;l--)o.pqdownheap(r,l);h=a;do{l=o.heap[1],o.heap[1]=o.heap[o.heap_len--],o.pqdownheap(r,1),u=o.heap[1],o.heap[--o.heap_max]=l,o.heap[--o.heap_max]=u,r[2*h]=r[2*l]+r[2*u],o.depth[h]=Math.max(o.depth[l],o.depth[u])+1,r[2*l+1]=r[2*u+1]=h,o.heap[1]=h++,o.pqdownheap(r,1)}while(o.heap_len>=2);o.heap[--o.heap_max]=o.heap[1],function t(o){const r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,u=e.stat_desc.max_length;let d,h,m,_,p,y,b=0;for(_=0;_<=TC;_++)o.bl_count[_]=0;for(r[2*o.heap[o.heap_max]+1]=0,d=o.heap_max+1;d<qY;d++)h=o.heap[d],_=r[2*r[2*h+1]+1]+1,_>u&&(_=u,b++),r[2*h+1]=_,!(h>e.max_code)&&(o.bl_count[_]++,p=0,h>=l&&(p=a[h-l]),y=r[2*h],o.opt_len+=y*(_+p),s&&(o.static_len+=y*(s[2*h+1]+p)));if(0!==b){do{for(_=u-1;0===o.bl_count[_];)_--;o.bl_count[_]--,o.bl_count[_+1]+=2,o.bl_count[u]--,b-=2}while(b>0);for(_=u;0!==_;_--)for(h=o.bl_count[_];0!==h;)m=o.heap[--d],!(m>e.max_code)&&(r[2*m+1]!=_&&(o.opt_len+=(_-r[2*m+1])*r[2*m],r[2*m+1]=_),h--)}}(o),function i(o,r,s){const a=[];let u,d,h,l=0;for(u=1;u<=TC;u++)a[u]=l=l+s[u-1]<<1;for(d=0;d<=r;d++)h=o[2*d+1],0!==h&&(o[2*d]=n(a[h]++,h))}(r,e.max_code,o.bl_count)}}function ia(e,t,n,i,o){const r=this;r.static_tree=e,r.extra_bits=t,r.extra_base=n,r.elems=i,r.max_length=o}er._length_code=[0,1,2,3,4,5,6,7].concat(...EI([[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]])),er.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],er.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],er.d_code=function(e){return e<256?QY[e]:QY[256+(e>>>7)]},er.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],er.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],er.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],er.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Bke=EI([[144,8],[112,9],[24,7],[8,8]]);ia.static_ltree=wI([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].map((e,t)=>[e,Bke[t]]));const Uke=EI([[30,5]]);function df(e,t,n,i,o){const r=this;r.good_length=e,r.max_lazy=t,r.nice_length=n,r.max_chain=i,r.func=o}ia.static_dtree=wI([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].map((e,t)=>[e,Uke[t]])),ia.static_l_desc=new ia(ia.static_ltree,er.extra_lbits,257,286,TC),ia.static_d_desc=new ia(ia.static_dtree,er.extra_dbits,0,30,TC),ia.static_bl_desc=new ia(null,er.extra_blbits,0,19,7);const ld=[new df(0,0,0,0,0),new df(4,4,8,4,1),new df(4,5,16,8,1),new df(4,6,32,32,1),new df(4,4,16,16,2),new df(8,16,32,32,2),new df(8,16,128,128,2),new df(8,32,128,256,2),new df(32,128,258,1024,2),new df(32,258,258,4096,2)],vI=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],fl=262;function eX(e,t,n,i){const o=e[2*t],r=e[2*n];return o<r||o==r&&i[t]<=i[n]}function Wke(){const e=this;let t,n,i,o,r,s,a,l,u,d,h,m,_,p,y,b,x,C,w,v,I,P,N,R,B,F,S,D,L,M,U,z,G;const W=new er,q=new er,j=new er;let Q,Y,ne,X,K,$;function Se(){let Qe;for(Qe=0;Qe<286;Qe++)U[2*Qe]=0;for(Qe=0;Qe<30;Qe++)z[2*Qe]=0;for(Qe=0;Qe<19;Qe++)G[2*Qe]=0;U[512]=1,e.opt_len=e.static_len=0,Y=ne=0}function ye(Qe,ut){let st,lt=-1,Gt=Qe[1],an=0,Vn=7,Yo=4;0===Gt&&(Vn=138,Yo=3),Qe[2*(ut+1)+1]=65535;for(let Sr=0;Sr<=ut;Sr++)st=Gt,Gt=Qe[2*(Sr+1)+1],!(++an<Vn&&st==Gt)&&(an<Yo?G[2*st]+=an:0!==st?(st!=lt&&G[2*st]++,G[32]++):an<=10?G[34]++:G[36]++,an=0,lt=st,0===Gt?(Vn=138,Yo=3):st==Gt?(Vn=6,Yo=3):(Vn=7,Yo=4))}function Oe(Qe){e.pending_buf[e.pending++]=Qe}function Ge(Qe){Oe(255&Qe),Oe(Qe>>>8&255)}function Ke(Qe,ut){let lt;const st=ut;$>16-st?(lt=Qe,K|=lt<<$&65535,Ge(K),K=lt>>>16-$,$+=st-16):(K|=Qe<<$&65535,$+=st)}function Qt(Qe,ut){const lt=2*Qe;Ke(65535&ut[lt],65535&ut[lt+1])}function nn(Qe,ut){let lt,Gt,st=-1,an=Qe[1],Vn=0,Yo=7,Sr=4;for(0===an&&(Yo=138,Sr=3),lt=0;lt<=ut;lt++)if(Gt=an,an=Qe[2*(lt+1)+1],!(++Vn<Yo&&Gt==an)){if(Vn<Sr)do{Qt(Gt,G)}while(0!=--Vn);else 0!==Gt?(Gt!=st&&(Qt(Gt,G),Vn--),Qt(16,G),Ke(Vn-3,2)):Vn<=10?(Qt(17,G),Ke(Vn-3,3)):(Qt(18,G),Ke(Vn-11,7));Vn=0,st=Gt,0===an?(Yo=138,Sr=3):Gt==an?(Yo=6,Sr=3):(Yo=7,Sr=4)}}function ft(){16==$?(Ge(K),K=0,$=0):$>=8&&(Oe(255&K),K>>>=8,$-=8)}function Ft(Qe,ut){let lt,st,Gt;if(e.dist_buf[Y]=Qe,e.lc_buf[Y]=255&ut,Y++,0===Qe?U[2*ut]++:(ne++,Qe--,U[2*(er._length_code[ut]+256+1)]++,z[2*er.d_code(Qe)]++),!(8191&Y)&&S>2){for(lt=8*Y,st=I-x,Gt=0;Gt<30;Gt++)lt+=z[2*Gt]*(5+er.extra_dbits[Gt]);if(lt>>>=3,ne<Math.floor(Y/2)&<<Math.floor(st/2))return!0}return Y==Q-1}function Ht(Qe,ut){let lt,st,an,Vn,Gt=0;if(0!==Y)do{lt=e.dist_buf[Gt],st=e.lc_buf[Gt],Gt++,0===lt?Qt(st,Qe):(an=er._length_code[st],Qt(an+256+1,Qe),Vn=er.extra_lbits[an],0!==Vn&&(st-=er.base_length[an],Ke(st,Vn)),lt--,an=er.d_code(lt),Qt(an,ut),Vn=er.extra_dbits[an],0!==Vn&&(lt-=er.base_dist[an],Ke(lt,Vn)))}while(Gt<Y);Qt(256,Qe),X=Qe[513]}function Cn(){$>8?Ge(K):$>0&&Oe(255&K),K=0,$=0}function Ie(Qe,ut,lt){Ke(0+(lt?1:0),3),function pe(Qe,ut,lt){Cn(),X=8,lt&&(Ge(ut),Ge(~ut)),e.pending_buf.set(l.subarray(Qe,Qe+ut),e.pending),e.pending+=ut}(Qe,ut,!0)}function Bt(Qe){(function on(Qe,ut,lt){let st,Gt,an=0;S>0?(W.build_tree(e),q.build_tree(e),an=function ve(){let Qe;for(ye(U,W.max_code),ye(z,q.max_code),j.build_tree(e),Qe=18;Qe>=3&&0===G[2*er.bl_order[Qe]+1];Qe--);return e.opt_len+=3*(Qe+1)+5+5+4,Qe}(),st=e.opt_len+3+7>>>3,Gt=e.static_len+3+7>>>3,Gt<=st&&(st=Gt)):st=Gt=ut+5,ut+4<=st&&-1!=Qe?Ie(Qe,ut,lt):Gt==st?(Ke(2+(lt?1:0),3),Ht(ia.static_ltree,ia.static_dtree)):(Ke(4+(lt?1:0),3),function Pt(Qe,ut,lt){let st;for(Ke(Qe-257,5),Ke(ut-1,5),Ke(lt-4,4),st=0;st<lt;st++)Ke(G[2*er.bl_order[st]+1],3);nn(U,Qe-1),nn(z,ut-1)}(W.max_code+1,q.max_code+1,an+1),Ht(U,z)),Se(),lt&&Cn()})(x>=0?x:-1,I-x,Qe),x=I,t.flush_pending()}function Gi(){let Qe,ut,lt,st;do{if(st=u-N-I,0===st&&0===I&&0===N)st=r;else if(-1==st)st--;else if(I>=r+r-fl){l.set(l.subarray(r,r+r),0),P-=r,I-=r,x-=r,Qe=_,lt=Qe;do{ut=65535&h[--lt],h[lt]=ut>=r?ut-r:0}while(0!=--Qe);Qe=r,lt=Qe;do{ut=65535&d[--lt],d[lt]=ut>=r?ut-r:0}while(0!=--Qe);st+=r}if(0===t.avail_in)return;Qe=t.read_buf(l,I+N,st),N+=Qe,N>=3&&(m=255&l[I],m=(m<<b^255&l[I+1])&y)}while(N<fl&&0!==t.avail_in)}function ua(Qe){let st,Gt,ut=B,lt=I,an=R;const Vn=I>r-fl?I-(r-fl):0;let Yo=M;const Sr=a,Zc=I+258;let $c=l[lt+an-1],Yr=l[lt+an];R>=L&&(ut>>=2),Yo>N&&(Yo=N);do{if(st=Qe,l[st+an]==Yr&&l[st+an-1]==$c&&l[st]==l[lt]&&l[++st]==l[lt+1]){lt+=2,st++;do{}while(l[++lt]==l[++st]&&l[++lt]==l[++st]&&l[++lt]==l[++st]&&l[++lt]==l[++st]&&l[++lt]==l[++st]&&l[++lt]==l[++st]&&l[++lt]==l[++st]&&l[++lt]==l[++st]&<<Zc);if(Gt=258-(Zc-lt),lt=Zc-258,Gt>an){if(P=Qe,an=Gt,Gt>=Yo)break;$c=l[lt+an-1],Yr=l[lt+an]}}}while((Qe=65535&d[Qe&Sr])>Vn&&0!=--ut);return an<=N?an:N}e.depth=[],e.bl_count=[],e.heap=[],U=[],z=[],G=[],e.pqdownheap=function(Qe,ut){const lt=e.heap,st=lt[ut];let Gt=ut<<1;for(;Gt<=e.heap_len&&(Gt<e.heap_len&&eX(Qe,lt[Gt+1],lt[Gt],e.depth)&&Gt++,!eX(Qe,st,lt[Gt],e.depth));)lt[ut]=lt[Gt],ut=Gt,Gt<<=1;lt[ut]=st},e.deflateInit=function(Qe,ut,lt,st,Gt,an){return st||(st=8),Gt||(Gt=8),an||(an=0),Qe.msg=null,-1==ut&&(ut=6),Gt<1||Gt>9||8!=st||lt<9||lt>15||ut<0||ut>9||an<0||an>2?-2:(Qe.dstate=e,s=lt,r=1<<s,a=r-1,p=Gt+7,_=1<<p,y=_-1,b=Math.floor((p+3-1)/3),l=new Uint8Array(2*r),d=[],h=[],Q=1<<Gt+6,e.pending_buf=new Uint8Array(4*Q),i=4*Q,e.dist_buf=new Uint16Array(Q),e.lc_buf=new Uint8Array(Q),S=ut,D=an,function Wa(Qe){return Qe.total_in=Qe.total_out=0,Qe.msg=null,e.pending=0,e.pending_out=0,n=113,o=0,function fe(){W.dyn_tree=U,W.stat_desc=ia.static_l_desc,q.dyn_tree=z,q.stat_desc=ia.static_d_desc,j.dyn_tree=G,j.stat_desc=ia.static_bl_desc,K=0,$=0,X=8,Se()}(),function me(){u=2*r,h[_-1]=0;for(let Qe=0;Qe<_-1;Qe++)h[Qe]=0;F=ld[S].max_lazy,L=ld[S].good_length,M=ld[S].nice_length,B=ld[S].max_chain,I=0,x=0,N=0,C=R=2,v=0,m=0}(),0}(Qe))},e.deflateEnd=function(){return 42!=n&&113!=n&&666!=n?-2:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,h=null,d=null,l=null,e.dstate=null,113==n?-3:0)},e.deflateParams=function(Qe,ut,lt){let st=0;return-1==ut&&(ut=6),ut<0||ut>9||lt<0||lt>2?-2:(ld[S].func!=ld[ut].func&&0!==Qe.total_in&&(st=Qe.deflate(1)),S!=ut&&(S=ut,F=ld[S].max_lazy,L=ld[S].good_length,M=ld[S].nice_length,B=ld[S].max_chain),D=lt,st)},e.deflateSetDictionary=function(Qe,ut,lt){let Gt,st=lt,an=0;if(!ut||42!=n)return-2;if(st<3)return 0;for(st>r-fl&&(st=r-fl,an=lt-st),l.set(ut.subarray(an,an+st),0),I=st,x=st,m=255&l[0],m=(m<<b^255&l[1])&y,Gt=0;Gt<=st-3;Gt++)m=(m<<b^255&l[Gt+2])&y,d[Gt&a]=h[m],h[m]=Gt;return 0},e.deflate=function(Qe,ut){let lt,st,Gt,an,Vn;if(ut>4||ut<0)return-2;if(!Qe.next_out||!Qe.next_in&&0!==Qe.avail_in||666==n&&4!=ut)return Qe.msg=vI[4],-2;if(0===Qe.avail_out)return Qe.msg=vI[7],-5;if(t=Qe,an=o,o=ut,42==n&&(st=8+(s-8<<4)<<8,Gt=(S-1&255)>>1,Gt>3&&(Gt=3),st|=Gt<<6,0!==I&&(st|=32),st+=31-st%31,n=113,function je(Qe){Oe(Qe>>8&255),Oe(255&Qe)}(st)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return o=-1,0}else if(0===t.avail_in&&ut<=an&&4!=ut)return t.msg=vI[7],-5;if(666==n&&0!==t.avail_in)return Qe.msg=vI[7],-5;if(0!==t.avail_in||0!==N||0!=ut&&666!=n){switch(Vn=-1,ld[S].func){case 0:Vn=function qo(Qe){let lt,ut=65535;for(ut>i-5&&(ut=i-5);;){if(N<=1){if(Gi(),0===N&&0==Qe)return 0;if(0===N)break}if(I+=N,N=0,lt=x+ut,(0===I||I>=lt)&&(N=I-lt,I=lt,Bt(!1),0===t.avail_out)||I-x>=r-fl&&(Bt(!1),0===t.avail_out))return 0}return Bt(4==Qe),0===t.avail_out?4==Qe?2:0:4==Qe?3:1}(ut);break;case 1:Vn=function ja(Qe){let lt,ut=0;for(;;){if(N<fl){if(Gi(),N<fl&&0==Qe)return 0;if(0===N)break}if(N>=3&&(m=(m<<b^255&l[I+2])&y,ut=65535&h[m],d[I&a]=h[m],h[m]=I),0!==ut&&(I-ut&65535)<=r-fl&&2!=D&&(C=ua(ut)),C>=3)if(lt=Ft(I-P,C-3),N-=C,C<=F&&N>=3){C--;do{I++,m=(m<<b^255&l[I+2])&y,ut=65535&h[m],d[I&a]=h[m],h[m]=I}while(0!=--C);I++}else I+=C,C=0,m=255&l[I],m=(m<<b^255&l[I+1])&y;else lt=Ft(0,255&l[I]),N--,I++;if(lt&&(Bt(!1),0===t.avail_out))return 0}return Bt(4==Qe),0===t.avail_out?4==Qe?2:0:4==Qe?3:1}(ut);break;case 2:Vn=function da(Qe){let lt,st,ut=0;for(;;){if(N<fl){if(Gi(),N<fl&&0==Qe)return 0;if(0===N)break}if(N>=3&&(m=(m<<b^255&l[I+2])&y,ut=65535&h[m],d[I&a]=h[m],h[m]=I),R=C,w=P,C=2,0!==ut&&R<F&&(I-ut&65535)<=r-fl&&(2!=D&&(C=ua(ut)),C<=5&&(1==D||3==C&&I-P>4096)&&(C=2)),R>=3&&C<=R){st=I+N-3,lt=Ft(I-1-w,R-3),N-=R-1,R-=2;do{++I<=st&&(m=(m<<b^255&l[I+2])&y,ut=65535&h[m],d[I&a]=h[m],h[m]=I)}while(0!=--R);if(v=0,C=2,I++,lt&&(Bt(!1),0===t.avail_out))return 0}else if(0!==v){if(lt=Ft(0,255&l[I-1]),lt&&Bt(!1),I++,N--,0===t.avail_out)return 0}else v=1,I++,N--}return 0!==v&&(lt=Ft(0,255&l[I-1]),v=0),Bt(4==Qe),0===t.avail_out?4==Qe?2:0:4==Qe?3:1}(ut)}if((2==Vn||3==Vn)&&(n=666),0==Vn||2==Vn)return 0===t.avail_out&&(o=-1),0;if(1==Vn){if(1==ut)!function gn(){Ke(2,3),Qt(256,ia.static_ltree),ft(),1+X+10-$<9&&(Ke(2,3),Qt(256,ia.static_ltree),ft()),X=7}();else if(Ie(0,0,!1),3==ut)for(lt=0;lt<_;lt++)h[lt]=0;if(t.flush_pending(),0===t.avail_out)return o=-1,0}}return 4!=ut?0:1}}function tX(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}tX.prototype={deflateInit(e,t){const n=this;return n.dstate=new Wke,t||(t=TC),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):-2},deflateEnd(){const e=this;if(!e.dstate)return-2;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):-2},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):-2},read_buf(e,t,n){const i=this;let o=i.avail_in;return o>n&&(o=n),0===o?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(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(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,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const Xi=0,Fh=1,kc=-2,tr=-3,nX=-4,Bh=-5,hl=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],iX=1440,eUe=[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],tUe=[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],nUe=[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],iUe=[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],oUe=[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],rUe=[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],dm=15;function TF(){let t,n,i,o,r,s;function a(u,d,h,m,_,p,y,b,x,C,w){let v,I,P,N,R,B,F,S,D,L,M,U,z,G,W;L=0,R=h;do{i[u[d+L]]++,L++,R--}while(0!==R);if(i[0]==h)return y[0]=-1,b[0]=0,Xi;for(S=b[0],B=1;B<=dm&&0===i[B];B++);for(F=B,S<B&&(S=B),R=dm;0!==R&&0===i[R];R--);for(P=R,S>R&&(S=R),b[0]=S,G=1<<B;B<R;B++,G<<=1)if((G-=i[B])<0)return tr;if((G-=i[R])<0)return tr;for(i[R]+=G,s[1]=B=0,L=1,z=2;0!=--R;)s[z]=B+=i[L],z++,L++;R=0,L=0;do{0!==(B=u[d+L])&&(w[s[B]++]=R),L++}while(++R<h);for(h=s[P],s[0]=R=0,L=0,N=-1,U=-S,r[0]=0,M=0,W=0;F<=P;F++)for(v=i[F];0!=v--;){for(;F>U+S;){if(N++,U+=S,W=P-U,W=W>S?S:W,(I=1<<(B=F-U))>v+1&&(I-=v+1,z=F,B<W))for(;++B<W&&!((I<<=1)<=i[++z]);)I-=i[z];if(W=1<<B,C[0]+W>iX)return tr;r[N]=M=C[0],C[0]+=W,0!==N?(s[N]=R,o[0]=B,o[1]=S,B=R>>>U-S,o[2]=M-r[N-1]-B,x.set(o,3*(r[N-1]+B))):y[0]=M}for(o[1]=F-U,L>=h?o[0]=192:w[L]<m?(o[0]=w[L]<256?0:96,o[2]=w[L++]):(o[0]=p[w[L]-m]+16+64,o[2]=_[w[L++]-m]),I=1<<F-U,B=R>>>U;B<W;B+=I)x.set(o,3*(M+B));for(B=1<<F-1;R&B;B>>>=1)R^=B;for(R^=B,D=(1<<U)-1;(R&D)!=s[N];)N--,U-=S,D=(1<<U)-1}return 0!==G&&1!=P?Bh:Xi}function l(u){let d;for(t||(t=[],n=[],i=new Int32Array(dm+1),o=[],r=new Int32Array(dm),s=new Int32Array(dm+1)),n.length<u&&(n=[]),d=0;d<u;d++)n[d]=0;for(d=0;d<dm+1;d++)i[d]=0;for(d=0;d<3;d++)o[d]=0;r.set(i.subarray(0,dm),0),s.set(i.subarray(0,dm+1),0)}this.inflate_trees_bits=function(u,d,h,m,_){let p;return l(19),t[0]=0,p=a(u,0,19,19,null,null,h,d,m,t,n),p==tr?_.msg="oversubscribed dynamic bit lengths tree":(p==Bh||0===d[0])&&(_.msg="incomplete dynamic bit lengths tree",p=tr),p},this.inflate_trees_dynamic=function(u,d,h,m,_,p,y,b,x){let C;return l(288),t[0]=0,C=a(h,0,u,257,nUe,iUe,p,m,b,t,n),C!=Xi||0===m[0]?(C==tr?x.msg="oversubscribed literal/length tree":C!=nX&&(x.msg="incomplete literal/length tree",C=tr),C):(l(288),C=a(h,u,d,0,oUe,rUe,y,_,b,t,n),C!=Xi||0===_[0]&&u>257?(C==tr?x.msg="oversubscribed distance tree":C==Bh?(x.msg="incomplete distance tree",C=tr):C!=nX&&(x.msg="empty distance tree with lengths",C=tr),C):Xi)}}TF.inflate_trees_fixed=function(e,t,n,i){return e[0]=9,t[0]=5,n[0]=eUe,i[0]=tUe,Xi};const RI=0,oX=1,rX=2,sX=3,aX=4,cX=5,lX=6,AF=7,uX=8,LI=9;function sUe(){const e=this;let t,i,h,_,n=0,o=0,r=0,s=0,a=0,l=0,u=0,d=0,m=0,p=0;function y(b,x,C,w,v,I,P,N){let R,B,F,S,D,L,M,U,z,G,W,q,j,Q,Y,ne;M=N.next_in_index,U=N.avail_in,D=P.bitb,L=P.bitk,z=P.write,G=z<P.read?P.read-z-1:P.end-z,W=hl[b],q=hl[x];do{for(;L<20;)U--,D|=(255&N.read_byte(M++))<<L,L+=8;if(R=D&W,B=C,F=w,ne=3*(F+R),0!==(S=B[ne]))for(;;){if(D>>=B[ne+1],L-=B[ne+1],16&S){for(S&=15,j=B[ne+2]+(D&hl[S]),D>>=S,L-=S;L<15;)U--,D|=(255&N.read_byte(M++))<<L,L+=8;for(R=D&q,B=v,F=I,ne=3*(F+R),S=B[ne];;){if(D>>=B[ne+1],L-=B[ne+1],16&S){for(S&=15;L<S;)U--,D|=(255&N.read_byte(M++))<<L,L+=8;if(Q=B[ne+2]+(D&hl[S]),D>>=S,L-=S,G-=j,z>=Q)Y=z-Q,z-Y>0&&2>z-Y?(P.win[z++]=P.win[Y++],P.win[z++]=P.win[Y++],j-=2):(P.win.set(P.win.subarray(Y,Y+2),z),z+=2,Y+=2,j-=2);else{Y=z-Q;do{Y+=P.end}while(Y<0);if(S=P.end-Y,j>S){if(j-=S,z-Y>0&&S>z-Y)do{P.win[z++]=P.win[Y++]}while(0!=--S);else P.win.set(P.win.subarray(Y,Y+S),z),z+=S,Y+=S,S=0;Y=0}}if(z-Y>0&&j>z-Y)do{P.win[z++]=P.win[Y++]}while(0!=--j);else P.win.set(P.win.subarray(Y,Y+j),z),z+=j,Y+=j,j=0;break}if(64&S)return N.msg="invalid distance code",j=N.avail_in-U,j=L>>3<j?L>>3:j,U+=j,M-=j,L-=j<<3,P.bitb=D,P.bitk=L,N.avail_in=U,N.total_in+=M-N.next_in_index,N.next_in_index=M,P.write=z,tr;R+=B[ne+2],R+=D&hl[S],ne=3*(F+R),S=B[ne]}break}if(64&S)return 32&S?(j=N.avail_in-U,j=L>>3<j?L>>3:j,U+=j,M-=j,L-=j<<3,P.bitb=D,P.bitk=L,N.avail_in=U,N.total_in+=M-N.next_in_index,N.next_in_index=M,P.write=z,Fh):(N.msg="invalid literal/length code",j=N.avail_in-U,j=L>>3<j?L>>3:j,U+=j,M-=j,L-=j<<3,P.bitb=D,P.bitk=L,N.avail_in=U,N.total_in+=M-N.next_in_index,N.next_in_index=M,P.write=z,tr);if(R+=B[ne+2],R+=D&hl[S],ne=3*(F+R),0===(S=B[ne])){D>>=B[ne+1],L-=B[ne+1],P.win[z++]=B[ne+2],G--;break}}else D>>=B[ne+1],L-=B[ne+1],P.win[z++]=B[ne+2],G--}while(G>=258&&U>=10);return j=N.avail_in-U,j=L>>3<j?L>>3:j,U+=j,M-=j,L-=j<<3,P.bitb=D,P.bitk=L,N.avail_in=U,N.total_in+=M-N.next_in_index,N.next_in_index=M,P.write=z,Xi}e.init=function(b,x,C,w,v,I){t=RI,u=b,d=x,h=C,m=w,_=v,p=I,i=null},e.proc=function(b,x,C){let w,v,I,B,F,S,D,P=0,N=0,R=0;for(R=x.next_in_index,B=x.avail_in,P=b.bitb,N=b.bitk,F=b.write,S=F<b.read?b.read-F-1:b.end-F;;)switch(t){case RI:if(S>=258&&B>=10&&(b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,C=y(u,d,h,m,_,p,b,x),R=x.next_in_index,B=x.avail_in,P=b.bitb,N=b.bitk,F=b.write,S=F<b.read?b.read-F-1:b.end-F,C!=Xi)){t=C==Fh?AF:LI;break}r=u,i=h,o=m,t=oX;case oX:for(w=r;N<w;){if(0===B)return b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);C=Xi,B--,P|=(255&x.read_byte(R++))<<N,N+=8}if(v=3*(o+(P&hl[w])),P>>>=i[v+1],N-=i[v+1],I=i[v],0===I){s=i[v+2],t=lX;break}if(16&I){a=15&I,n=i[v+2],t=rX;break}if(!(64&I)){r=I,o=v/3+i[v+2];break}if(32&I){t=AF;break}return t=LI,x.msg="invalid literal/length code",C=tr,b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);case rX:for(w=a;N<w;){if(0===B)return b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);C=Xi,B--,P|=(255&x.read_byte(R++))<<N,N+=8}n+=P&hl[w],P>>=w,N-=w,r=d,i=_,o=p,t=sX;case sX:for(w=r;N<w;){if(0===B)return b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);C=Xi,B--,P|=(255&x.read_byte(R++))<<N,N+=8}if(v=3*(o+(P&hl[w])),P>>=i[v+1],N-=i[v+1],I=i[v],16&I){a=15&I,l=i[v+2],t=aX;break}if(!(64&I)){r=I,o=v/3+i[v+2];break}return t=LI,x.msg="invalid distance code",C=tr,b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);case aX:for(w=a;N<w;){if(0===B)return b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);C=Xi,B--,P|=(255&x.read_byte(R++))<<N,N+=8}l+=P&hl[w],P>>=w,N-=w,t=cX;case cX:for(D=F-l;D<0;)D+=b.end;for(;0!==n;){if(0===S&&(F==b.end&&0!==b.read&&(F=0,S=F<b.read?b.read-F-1:b.end-F),0===S&&(b.write=F,C=b.inflate_flush(x,C),F=b.write,S=F<b.read?b.read-F-1:b.end-F,F==b.end&&0!==b.read&&(F=0,S=F<b.read?b.read-F-1:b.end-F),0===S)))return b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);b.win[F++]=b.win[D++],S--,D==b.end&&(D=0),n--}t=RI;break;case lX:if(0===S&&(F==b.end&&0!==b.read&&(F=0,S=F<b.read?b.read-F-1:b.end-F),0===S&&(b.write=F,C=b.inflate_flush(x,C),F=b.write,S=F<b.read?b.read-F-1:b.end-F,F==b.end&&0!==b.read&&(F=0,S=F<b.read?b.read-F-1:b.end-F),0===S)))return b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);C=Xi,b.win[F++]=s,S--,t=RI;break;case AF:if(N>7&&(N-=8,B++,R--),b.write=F,C=b.inflate_flush(x,C),F=b.write,S=F<b.read?b.read-F-1:b.end-F,b.read!=b.write)return b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);t=uX;case uX:return C=Fh,b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);case LI:return C=tr,b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C);default:return C=kc,b.bitb=P,b.bitk=N,x.avail_in=B,x.total_in+=R-x.next_in_index,x.next_in_index=R,b.write=F,b.inflate_flush(x,C)}},e.free=function(){}}const dX=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Pb=0,xF=1,fX=2,hX=3,pX=4,mX=5,NI=6,MI=7,_X=8,vg=9;function aUe(e,t){const n=this;let a,i=Pb,o=0,r=0,s=0;const l=[0],u=[0],d=new sUe;let h=0,m=new Int32Array(3*iX);const p=new TF;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(y,b){b&&(b[0]=0),i==NI&&d.free(y),i=Pb,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(y,b){let x,C,w;return C=y.next_out_index,w=n.read,x=(w<=n.write?n.write:n.end)-w,x>y.avail_out&&(x=y.avail_out),0!==x&&b==Bh&&(b=Xi),y.avail_out-=x,y.total_out+=x,y.next_out.set(n.win.subarray(w,w+x),C),C+=x,w+=x,w==n.end&&(w=0,n.write==n.end&&(n.write=0),x=n.write-w,x>y.avail_out&&(x=y.avail_out),0!==x&&b==Bh&&(b=Xi),y.avail_out-=x,y.total_out+=x,y.next_out.set(n.win.subarray(w,w+x),C),C+=x,w+=x),y.next_out_index=C,n.read=w,b},n.proc=function(y,b){let x,C,w,v,I,P,N,R;for(v=y.next_in_index,I=y.avail_in,C=n.bitb,w=n.bitk,P=n.write,N=P<n.read?n.read-P-1:n.end-P;;){let B,F,S,D,L,M,U,z;switch(i){case Pb:for(;w<3;){if(0===I)return n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);b=Xi,I--,C|=(255&y.read_byte(v++))<<w,w+=8}switch(x=7&C,h=1&x,x>>>1){case 0:C>>>=3,w-=3,x=7&w,C>>>=x,w-=x,i=xF;break;case 1:B=[],F=[],S=[[]],D=[[]],TF.inflate_trees_fixed(B,F,S,D),d.init(B[0],F[0],S[0],0,D[0],0),C>>>=3,w-=3,i=NI;break;case 2:C>>>=3,w-=3,i=hX;break;case 3:return C>>>=3,w-=3,i=vg,y.msg="invalid block type",b=tr,n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b)}break;case xF:for(;w<32;){if(0===I)return n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);b=Xi,I--,C|=(255&y.read_byte(v++))<<w,w+=8}if((~C>>>16&65535)!=(65535&C))return i=vg,y.msg="invalid stored block lengths",b=tr,n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);o=65535&C,C=w=0,i=0!==o?fX:0!==h?MI:Pb;break;case fX:if(0===I||0===N&&(P==n.end&&0!==n.read&&(P=0,N=P<n.read?n.read-P-1:n.end-P),0===N&&(n.write=P,b=n.inflate_flush(y,b),P=n.write,N=P<n.read?n.read-P-1:n.end-P,P==n.end&&0!==n.read&&(P=0,N=P<n.read?n.read-P-1:n.end-P),0===N)))return n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);if(b=Xi,x=o,x>I&&(x=I),x>N&&(x=N),n.win.set(y.read_buf(v,x),P),v+=x,I-=x,P+=x,N-=x,0!=(o-=x))break;i=0!==h?MI:Pb;break;case hX:for(;w<14;){if(0===I)return n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);b=Xi,I--,C|=(255&y.read_byte(v++))<<w,w+=8}if(r=x=16383&C,(31&x)>29||(x>>5&31)>29)return i=vg,y.msg="too many length or distance symbols",b=tr,n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);if(x=258+(31&x)+(x>>5&31),!a||a.length<x)a=[];else for(R=0;R<x;R++)a[R]=0;C>>>=14,w-=14,s=0,i=pX;case pX:for(;s<4+(r>>>10);){for(;w<3;){if(0===I)return n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);b=Xi,I--,C|=(255&y.read_byte(v++))<<w,w+=8}a[dX[s++]]=7&C,C>>>=3,w-=3}for(;s<19;)a[dX[s++]]=0;if(l[0]=7,x=p.inflate_trees_bits(a,l,u,m,y),x!=Xi)return(b=x)==tr&&(a=null,i=vg),n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);s=0,i=mX;case mX:for(;x=r,!(s>=258+(31&x)+(x>>5&31));){let G,W;for(x=l[0];w<x;){if(0===I)return n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);b=Xi,I--,C|=(255&y.read_byte(v++))<<w,w+=8}if(x=m[3*(u[0]+(C&hl[x]))+1],W=m[3*(u[0]+(C&hl[x]))+2],W<16)C>>>=x,w-=x,a[s++]=W;else{for(R=18==W?7:W-14,G=18==W?11:3;w<x+R;){if(0===I)return n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);b=Xi,I--,C|=(255&y.read_byte(v++))<<w,w+=8}if(C>>>=x,w-=x,G+=C&hl[R],C>>>=R,w-=R,R=s,x=r,R+G>258+(31&x)+(x>>5&31)||16==W&&R<1)return a=null,i=vg,y.msg="invalid bit length repeat",b=tr,n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);W=16==W?a[R-1]:0;do{a[R++]=W}while(0!=--G);s=R}}if(u[0]=-1,L=[],M=[],U=[],z=[],L[0]=9,M[0]=6,x=r,x=p.inflate_trees_dynamic(257+(31&x),1+(x>>5&31),a,L,M,U,z,m,y),x!=Xi)return x==tr&&(a=null,i=vg),b=x,n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);d.init(L[0],M[0],m,U[0],m,z[0]),i=NI;case NI:if(n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,(b=d.proc(n,y,b))!=Fh)return n.inflate_flush(y,b);if(b=Xi,d.free(y),v=y.next_in_index,I=y.avail_in,C=n.bitb,w=n.bitk,P=n.write,N=P<n.read?n.read-P-1:n.end-P,0===h){i=Pb;break}i=MI;case MI:if(n.write=P,b=n.inflate_flush(y,b),P=n.write,N=P<n.read?n.read-P-1:n.end-P,n.read!=n.write)return n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);i=_X;case _X:return b=Fh,n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);case vg:return b=tr,n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b);default:return b=kc,n.bitb=C,n.bitk=w,y.avail_in=I,y.total_in+=v-y.next_in_index,y.next_in_index=v,n.write=P,n.inflate_flush(y,b)}}},n.free=function(y){n.reset(y,null),n.win=null,m=null},n.set_dictionary=function(y,b,x){n.win.set(y.subarray(b,b+x),0),n.read=n.write=x},n.sync_point=function(){return i==xF?1:0}}const dUe=[0,0,255,255];function fUe(){const e=this;function t(n){return n&&n.istate?(n.total_in=n.total_out=0,n.msg=null,n.istate.mode=7,n.istate.blocks.reset(n,null),Xi):kc}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=function(n){return e.blocks&&e.blocks.free(n),e.blocks=null,Xi},e.inflateInit=function(n,i){return n.msg=null,e.blocks=null,i<8||i>15?(e.inflateEnd(n),kc):(e.wbits=i,n.istate.blocks=new aUe(n,1<<i),t(n),Xi)},e.inflate=function(n,i){let o,r;if(!n||!n.istate||!n.next_in)return kc;const s=n.istate;for(i=4==i?Bh:Xi,o=Bh;;)switch(s.mode){case 0:if(0===n.avail_in)return o;if(o=i,n.avail_in--,n.total_in++,8!=(15&(s.method=n.read_byte(n.next_in_index++)))){s.mode=13,n.msg="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.wbits){s.mode=13,n.msg="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===n.avail_in)return o;if(o=i,n.avail_in--,n.total_in++,r=255&n.read_byte(n.next_in_index++),((s.method<<8)+r)%31!=0){s.mode=13,n.msg="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===n.avail_in)return o;o=i,n.avail_in--,n.total_in++,s.need=(255&n.read_byte(n.next_in_index++))<<24&4278190080,s.mode=3;case 3:if(0===n.avail_in)return o;o=i,n.avail_in--,n.total_in++,s.need+=(255&n.read_byte(n.next_in_index++))<<16&16711680,s.mode=4;case 4:if(0===n.avail_in)return o;o=i,n.avail_in--,n.total_in++,s.need+=(255&n.read_byte(n.next_in_index++))<<8&65280,s.mode=5;case 5:return 0===n.avail_in?o:(o=i,n.avail_in--,n.total_in++,s.need+=255&n.read_byte(n.next_in_index++),s.mode=6,2);case 6:return s.mode=13,n.msg="need dictionary",s.marker=0,kc;case 7:if(o=s.blocks.proc(n,o),o==tr){s.mode=13,s.marker=0;break}if(o==Xi&&(o=i),o!=Fh)return o;o=i,s.blocks.reset(n,s.was),s.mode=12;case 12:return n.avail_in=0,Fh;case 13:return tr;default:return kc}},e.inflateSetDictionary=function(n,i,o){let r=0,s=o;if(!n||!n.istate||6!=n.istate.mode)return kc;const a=n.istate;return s>=1<<a.wbits&&(s=(1<<a.wbits)-1,r=o-s),a.blocks.set_dictionary(i,r,s),a.mode=7,Xi},e.inflateSync=function(n){let i,o,r,s,a;if(!n||!n.istate)return kc;const l=n.istate;if(13!=l.mode&&(l.mode=13,l.marker=0),0===(i=n.avail_in))return Bh;for(o=n.next_in_index,r=l.marker;0!==i&&r<4;)n.read_byte(o)==dUe[r]?r++:r=0!==n.read_byte(o)?0:4-r,o++,i--;return n.total_in+=o-n.next_in_index,n.next_in_index=o,n.avail_in=i,l.marker=r,4!=r?tr:(s=n.total_in,a=n.total_out,t(n),n.total_in=s,n.total_out=a,l.mode=7,Xi)},e.inflateSyncPoint=function(n){return n&&n.istate&&n.istate.blocks?n.istate.blocks.sync_point():kc}}function CX(){}CX.prototype={inflateInit(e){const t=this;return t.istate=new fUe,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):kc},inflateEnd(){const e=this;if(!e.istate)return kc;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):kc},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):kc},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const Ig=4294967295,hm=65535,wX=101075792,AUe=1,xUe=39169,CUe=10,EUe=1,wUe=21589,SUe=28789,vUe=25461,IUe=6534,ac=(new Date(2107,11,31),void new Date(1980,0,1)),pm="undefined",wC="function";class PX{constructor(t){return class extends TransformStream{constructor(n,i){const o=new t(i);super({transform(r,s){s.enqueue(o.append(r))},flush(r){const s=o.flush();s&&r.enqueue(s)}})}}}}let OX=2;try{typeof navigator!=pm&&navigator.hardwareConcurrency&&(OX=navigator.hardwareConcurrency)}catch{}const RUe={chunkSize:524288,maxWorkers:OX,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:ac,CompressionStreamNative:typeof CompressionStream!=pm&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=pm&&DecompressionStream},mm=Object.assign({},RUe);function RX(e){const{baseURL:t,chunkSize:n,maxWorkers:i,terminateWorkerTimeout:o,useCompressionStream:r,useWebWorkers:s,Deflate:a,Inflate:l,CompressionStream:u,DecompressionStream:d,workerScripts:h}=e;if(_m("baseURL",t),_m("chunkSize",n),_m("maxWorkers",i),_m("terminateWorkerTimeout",o),_m("useCompressionStream",r),_m("useWebWorkers",s),a&&(mm.CompressionStream=new PX(a)),l&&(mm.DecompressionStream=new PX(l)),_m("CompressionStream",u),_m("DecompressionStream",d),h!==ac){const{deflate:m,inflate:_}=h;if((m||_)&&(mm.workerScripts||(mm.workerScripts={})),m){if(!Array.isArray(m))throw new Error("workerScripts.deflate must be an array");mm.workerScripts.deflate=m}if(_){if(!Array.isArray(_))throw new Error("workerScripts.inflate must be an array");mm.workerScripts.inflate=_}}}function _m(e,t){t!==ac&&(mm[e]=t)}const LX=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)1&t?t=t>>>1^3988292384:t>>>=1;LX[e]=t}class kI{constructor(t){this.crc=t||-1}append(t){let n=0|this.crc;for(let i=0,o=0|t.length;i<o;i++)n=n>>>8^LX[255&(n^t[i])];this.crc=n}get(){return~this.crc}}class NX extends TransformStream{constructor(){let t;const n=new kI;super({transform(i,o){n.append(i),o.enqueue(i)},flush(){const i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,n.get()),t.value=i}}),t=this}}const cc={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=cc.getPartial(n);return 32===i?e.concat(t):cc._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;return 0===t?0:32*(t-1)+cc.getPartial(e[t-1])},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=cc.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>Math.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let s=0;s<e.length;s++)i.push(n|e[s]>>>t),n=e[s]<<32-t;const r=cc.getPartial(e.length?e[e.length-1]:0);return i.push(cc.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},UI={bytes:{fromBits(e){const n=cc.bitLength(e)/8,i=new Uint8Array(n);let o;for(let r=0;r<n;r++)3&r||(o=e[r/4]),i[r]=o>>>24,o<<=8;return i},toBits(e){const t=[];let n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],3==(3&n)&&(t.push(i),i=0);return 3&n&&t.push(cc.partial(8*(3&n),i)),t}}},MX_sha1=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=UI.utf8String.toBits(e));const n=t._buffer=cc.concat(t._buffer,e),i=t._length,o=t._length=i+cc.bitLength(e);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const r=new Uint32Array(n);let 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(){const e=this;let t=e._buffer;const n=e._h;t=cc.concat(t,[cc.partial(1,1)]);for(let i=t.length+2;15&i;i++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e<=19?t&n|~t&i:e<=39?t^n^i:e<=59?t&n|t&i|n&i:e<=79?t^n^i:void 0}_S(e,t){return t<<e|t>>>32-e}_block(e){const t=this,n=t._h,i=Array(80);for(let u=0;u<16;u++)i[u]=e[u];let o=n[0],r=n[1],s=n[2],a=n[3],l=n[4];for(let u=0;u<=79;u++){u>=16&&(i[u]=t._S(1,i[u-3]^i[u-8]^i[u-14]^i[u-16]));const d=t._S(5,o)+t._f(u,r,s,a)+l+i[u]+t._key[Math.floor(u/20)]|0;l=a,a=s,s=t._S(30,r),r=o,o=d}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]+l|0}},FX_aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],o=e.length;let r,s,a,l=1;if(4!==o&&6!==o&&8!==o)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),a=[]],r=o;r<4*o+28;r++){let u=s[r-1];(r%o==0||8===o&&r%o==4)&&(u=n[u>>>24]<<24^n[u>>16&255]<<16^n[u>>8&255]<<8^n[255&u],r%o==0&&(u=u<<8^u>>>24^l<<24,l=l<<1^283*(l>>7))),s[r]=s[r-o]^u}for(let u=0;r;u++,r--){const d=s[3&u?r:r-4];a[u]=r<=4||u<4?d:i[0][n[d>>>24]]^i[1][n[d>>16&255]]^i[2][n[d>>8&255]]^i[3][n[255&d]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],o=[],r=[];let s,a,l,u;for(let d=0;d<256;d++)r[(o[d]=d<<1^283*(d>>7))^d]=d;for(let d=s=0;!n[d];d^=a||1,s=r[s]||1){let h=s^s<<1^s<<2^s<<3^s<<4;h=h>>8^255&h^99,n[d]=h,i[h]=d,u=o[l=o[a=o[d]]];let m=16843009*u^65537*l^257*a^16843008*d,_=257*o[h]^16843008*h;for(let p=0;p<4;p++)e[p][d]=_=_<<24^_>>>8,t[p][h]=m=m<<24^m>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(4!==e.length)throw new Error("invalid aes block size");const n=this._key[t],i=n.length/4-2,o=[0,0,0,0],r=this._tables[t],s=r[0],a=r[1],l=r[2],u=r[3],d=r[4];let b,x,C,h=e[0]^n[0],m=e[t?3:1]^n[1],_=e[2]^n[2],p=e[t?1:3]^n[3],y=4;for(let w=0;w<i;w++)b=s[h>>>24]^a[m>>16&255]^l[_>>8&255]^u[255&p]^n[y],x=s[m>>>24]^a[_>>16&255]^l[p>>8&255]^u[255&h]^n[y+1],C=s[_>>>24]^a[p>>16&255]^l[h>>8&255]^u[255&m]^n[y+2],p=s[p>>>24]^a[h>>16&255]^l[m>>8&255]^u[255&_]^n[y+3],y+=4,h=b,m=x,_=C;for(let w=0;w<4;w++)o[t?3&-w:w]=d[h>>>24]<<24^d[m>>16&255]<<16^d[_>>8&255]<<8^d[255&p]^n[y++],b=h,h=m,m=_,_=p,p=b;return o}},FUe={getRandomValues(e){const t=new Uint32Array(e.buffer),n=i=>{let o=987654321;const r=4294967295;return function(){return o=36969*(65535&o)+(o>>16)&r,(((o<<16)+(i=18e3*(65535&i)+(i>>16)&r)&r)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let o,i=0;i<e.length;i+=4){const r=n(4294967296*(o||Math.random()));o=987654071*r(),t[i/4]=4294967296*r()|0}return e}},BX_ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const o=cc.bitLength(t);for(let r=0;r<i;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return cc.clamp(t,o)}},Pg={importKey:e=>new Pg.hmacSha1(UI.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,i<0||n<0)throw new Error("invalid params to pbkdf2");const o=1+(i>>5)<<2;let r,s,a,l,u;const d=new ArrayBuffer(o),h=new DataView(d);let m=0;const _=cc;for(t=UI.bytes.toBits(t),u=1;m<(o||1);u++){for(r=s=e.encrypt(_.concat(t,[u])),a=1;a<n;a++)for(s=e.encrypt(s),l=0;l<s.length;l++)r[l]^=s[l];for(a=0;m<(o||1)&&a<r.length;a++)h.setInt32(m,r[a]),m+=4}return d.slice(0,i/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=MX_sha1,i=[[],[]];t._baseHash=[new n,new n];const o=t._baseHash[0].blockSize/32;e.length>o&&(e=(new n).update(e).finalize());for(let r=0;r<o;r++)i[0][r]=909522486^e[r],i[1][r]=1549556828^e[r];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},BUe=typeof crypto!=pm&&typeof crypto.getRandomValues==wC,kX="Invalid password",UX="Invalid signature",EF="zipjs-abort-check-password";function zX(e){return BUe?crypto.getRandomValues(e):FUe.getRandomValues(e)}const kUe="raw",VX={name:"PBKDF2"},VUe=Object.assign({hash:{name:"HMAC"}},VX),wF=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},VX),HUe=["deriveBits"],SC=[8,12,16],vC=[16,24,32],GUe=[0,0,0,0],zI=typeof crypto!=pm,IC=zI&&crypto.subtle,HX=zI&&typeof IC!=pm,ff=UI.bytes,jUe=FX_aes,WUe=BX_ctrGladman,qUe=Pg.hmacSha1;let GX=zI&&HX&&typeof IC.importKey==wC,jX=zI&&HX&&typeof IC.deriveBits==wC;class YUe extends TransformStream{constructor({password:t,rawPassword:n,signed:i,encryptionStrength:o,checkPasswordOnly:r}){super({start(){Object.assign(this,{ready:new Promise(s=>this.resolveReady=s),password:YX(t,n),signed:i,strength:o-1,pending:new Uint8Array})},transform(s,a){var l=this;return(0,we.Z)(function*(){const u=l,{password:d,strength:h,resolveReady:m,ready:_}=u;d?(yield function ZUe(e,t,n,i){return SF.apply(this,arguments)}(u,h,d,fu(s,0,SC[h]+2)),s=fu(s,SC[h]+2),r?a.error(new Error(EF)):m()):yield _;const p=new Uint8Array(s.length-10-(s.length-10)%16);a.enqueue(WX(u,s,p,0,10,!0))})()},flush(s){var a=this;return(0,we.Z)(function*(){const{signed:l,ctr:u,hmac:d,pending:h,ready:m}=a;if(d&&u){yield m;const _=fu(h,0,h.length-10),p=fu(h,h.length-10);let y=new Uint8Array;if(_.length){const b=PC(ff,_);d.update(b);const x=u.update(b);y=DC(ff,x)}if(l){const b=fu(DC(ff,d.digest()),0,10);for(let x=0;x<10;x++)if(b[x]!=p[x])throw new Error(UX)}s.enqueue(y)}})()}})}}class XUe extends TransformStream{constructor({password:t,rawPassword:n,encryptionStrength:i}){let o;super({start(){Object.assign(this,{ready:new Promise(r=>this.resolveReady=r),password:YX(t,n),strength:i-1,pending:new Uint8Array})},transform(r,s){var a=this;return(0,we.Z)(function*(){const l=a,{password:u,strength:d,resolveReady:h,ready:m}=l;let _=new Uint8Array;u?(_=yield function $Ue(e,t,n){return vF.apply(this,arguments)}(l,d,u),h()):yield m;const p=new Uint8Array(_.length+r.length-r.length%16);p.set(_,0),s.enqueue(WX(l,r,p,_.length,0))})()},flush(r){var s=this;return(0,we.Z)(function*(){const{ctr:a,hmac:l,pending:u,ready:d}=s;if(l&&a){yield d;let h=new Uint8Array;if(u.length){const m=a.update(PC(ff,u));l.update(m),h=DC(ff,m)}o.signature=DC(ff,l.digest()).slice(0,10),r.enqueue(OF(h,o.signature))}})()}}),o=this}}function WX(e,t,n,i,o,r){const{ctr:s,hmac:a,pending:l}=e,u=t.length-o;let d;for(l.length&&(t=OF(l,t),n=function JUe(e,t){if(t&&t>e.length){const n=e;(e=new Uint8Array(t)).set(n,0)}return e}(n,u-u%16)),d=0;d<=u-16;d+=16){const h=PC(ff,fu(t,d,d+16));r&&a.update(h);const m=s.update(h);r||a.update(m),n.set(DC(ff,m),d+i)}return e.pending=fu(t,d),n}function SF(){return SF=(0,we.Z)(function*(e,t,n,i){const o=yield qX(e,t,n,fu(i,0,SC[t])),r=fu(i,SC[t]);if(o[0]!=r[0]||o[1]!=r[1])throw new Error(kX)}),SF.apply(this,arguments)}function vF(){return vF=(0,we.Z)(function*(e,t,n){const i=zX(new Uint8Array(SC[t]));return OF(i,yield qX(e,t,n,i))}),vF.apply(this,arguments)}function qX(e,t,n,i){return IF.apply(this,arguments)}function IF(){return IF=(0,we.Z)(function*(e,t,n,i){e.password=null;const o=yield function KUe(e,t,n,i,o){return DF.apply(this,arguments)}(kUe,n,VUe,!1,HUe),r=yield function QUe(e,t,n){return PF.apply(this,arguments)}(Object.assign({salt:i},wF),o,8*(2*vC[t]+2)),s=new Uint8Array(r),a=PC(ff,fu(s,0,vC[t])),l=PC(ff,fu(s,vC[t],2*vC[t])),u=fu(s,2*vC[t]);return Object.assign(e,{keys:{key:a,authentication:l,passwordVerification:u},ctr:new WUe(new jUe(a),Array.from(GUe)),hmac:new qUe(l)}),u}),IF.apply(this,arguments)}function DF(){return DF=(0,we.Z)(function*(e,t,n,i,o){if(!GX)return Pg.importKey(t);try{return yield IC.importKey(e,t,n,i,o)}catch{return GX=!1,Pg.importKey(t)}}),DF.apply(this,arguments)}function PF(){return PF=(0,we.Z)(function*(e,t,n){if(!jX)return Pg.pbkdf2(t,e.salt,wF.iterations,n);try{return yield IC.deriveBits(e,t,n)}catch{return jX=!1,Pg.pbkdf2(t,e.salt,wF.iterations,n)}}),PF.apply(this,arguments)}function YX(e,t){return t===ac?function MUe(e){if(typeof TextEncoder==pm){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new TextEncoder).encode(e)}(e):t}function OF(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 fu(e,t,n){return e.subarray(t,n)}function DC(e,t){return e.fromBits(t)}function PC(e,t){return e.toBits(t)}class eze extends TransformStream{constructor({password:t,passwordVerification:n,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),$X(this,t)},transform(o,r){const s=this;if(s.password){const a=XX(s,o.subarray(0,12));if(s.password=null,a[11]!=s.passwordVerification)throw new Error(kX);o=o.subarray(12)}i?r.error(new Error(EF)):r.enqueue(XX(s,o))}})}}class tze extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),$X(this,t)},transform(i,o){const r=this;let s,a;if(r.password){r.password=null;const l=zX(new Uint8Array(12));l[11]=r.passwordVerification,s=new Uint8Array(i.length+l.length),s.set(ZX(r,l),0),a=12}else s=new Uint8Array(i.length),a=0;s.set(ZX(r,i),a),o.enqueue(s)}})}}function XX(e,t){const n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=KX(e)^t[i],RF(e,n[i]);return n}function ZX(e,t){const n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=KX(e)^t[i],RF(e,t[i]);return n}function $X(e,t){const n=[305419896,591751049,878082192];Object.assign(e,{keys:n,crcKey0:new kI(n[0]),crcKey2:new kI(n[2])});for(let i=0;i<t.length;i++)RF(e,t.charCodeAt(i))}function RF(e,t){let[n,i,o]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),i=JX(Math.imul(JX(i+QX(n)),134775813)+1),e.crcKey2.append([i>>>24]),o=~e.crcKey2.get(),e.keys=[n,i,o]}function KX(e){const t=2|e.keys[2];return QX(Math.imul(t,1^t)>>>8)}function QX(e){return 255&e}function JX(e){return 4294967295&e}const eZ="deflate-raw";class nze extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:i,CompressionStreamNative:o}){super({});const{compressed:r,encrypted:s,useCompressionStream:a,zipCrypto:l,signed:u,level:d}=t,h=this;let m,_,p=tZ(super.readable);(!s||l)&&u&&(m=new NX,p=hf(p,m)),r&&(p=iZ(p,a,{level:d,chunkSize:n},o,i)),s&&(l?p=hf(p,new tze(t)):(_=new XUe(t),p=hf(p,_))),nZ(h,p,()=>{let y;s&&!l&&(y=_.signature),(!s||l)&&u&&(y=new DataView(m.value.buffer).getUint32(0)),h.signature=y})}}class ize extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:i,DecompressionStreamNative:o}){super({});const{zipCrypto:r,encrypted:s,signed:a,signature:l,compressed:u,useCompressionStream:d}=t;let h,m,_=tZ(super.readable);s&&(r?_=hf(_,new eze(t)):(m=new YUe(t),_=hf(_,m))),u&&(_=iZ(_,d,{chunkSize:n},o,i)),(!s||r)&&a&&(h=new NX,_=hf(_,h)),nZ(this,_,()=>{if((!s||r)&&a){const p=new DataView(h.value.buffer);if(l!=p.getUint32(0,!1))throw new Error(UX)}})}}function tZ(e){return hf(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function nZ(e,t,n){t=hf(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get:()=>t})}function iZ(e,t,n,i,o){try{e=hf(e,new(t&&i?i:o)(eZ,n))}catch{if(!t)return e;try{e=hf(e,new o(eZ,n))}catch{return e}}return e}function hf(e,t){return e.pipeThrough(t)}const rze="start",sze="pull",oZ="data",aze="ack",rZ="close",sZ="inflate";class lze extends TransformStream{constructor(t,n){super({});const i=this,{codecType:o}=t;let r;o.startsWith("deflate")?r=nze:o.startsWith(sZ)&&(r=ize);let s=0,a=0;const l=new r(t,n),u=super.readable,d=new TransformStream({transform(m,_){m&&m.length&&(a+=m.length,_.enqueue(m))},flush(){Object.assign(i,{inputSize:a})}}),h=new TransformStream({transform(m,_){m&&m.length&&(s+=m.length,_.enqueue(m))},flush(){const{signature:m}=l;Object.assign(i,{signature:m,outputSize:s,inputSize:a})}});Object.defineProperty(i,"readable",{get:()=>u.pipeThrough(d).pipeThrough(l).pipeThrough(h)})}}class uze extends TransformStream{constructor(t){let n;super({transform:function i(o,r){if(n){const 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},flush(o){n&&n.length&&o.enqueue(n)}})}}let aZ=typeof Worker!=pm;class LF{constructor(t,{readable:n,writable:i},{options:o,config:r,streamOptions:s,useWebWorkers:a,transferStreams:l,scripts:u},d){const{signal:h}=s;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new uze(r.chunkSize)).pipeThrough(new dze(n,s),{signal:h}),writable:i,options:Object.assign({},o),scripts:u,transferStreams:l,terminate:()=>new Promise(m=>{const{worker:_,busy:p}=t;_?(p?t.resolveTerminated=m:(_.terminate(),m()),t.interface=null):m()}),onTaskFinished(){const{resolveTerminated:m}=t;m&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),m()),t.busy=!1,d(t)}}),(a&&aZ?fze:cZ)(t,r)}}class dze extends TransformStream{constructor(t,{onstart:n,onprogress:i,size:o,onend:r}){let s=0;super({start:()=>(0,we.Z)(function*(){n&&(yield NF(n,o))})(),transform:(a,l)=>(0,we.Z)(function*(){s+=a.length,i&&(yield NF(i,s,o)),l.enqueue(a)})(),flush:()=>(0,we.Z)(function*(){t.size=s,r&&(yield NF(r,s))})()})}}function NF(e){return MF.apply(this,arguments)}function MF(){return MF=(0,we.Z)(function*(e,...t){try{yield e(...t)}catch{}}),MF.apply(this,arguments)}function cZ(e,t){return{run:()=>function hze(e,t){return FF.apply(this,arguments)}(e,t)}}function fze(e,t){const{baseURL:n,chunkSize:i}=t;if(!e.interface){let o;try{o=function _ze(e,t,n){const i={type:"module"};let o,r;typeof e==wC&&(e=e());try{o=new URL(e,t)}catch{o=e}if(lZ)try{r=new Worker(o)}catch{lZ=!1,r=new Worker(o,i)}else r=new Worker(o,i);return r.addEventListener("message",s=>function gze(e,t){return kF.apply(this,arguments)}(s,n)),r}(e.scripts[0],n,e)}catch{return aZ=!1,cZ(e,t)}Object.assign(e,{worker:o,interface:{run:()=>function pze(e,t){return BF.apply(this,arguments)}(e,{chunkSize:i})}})}return e.interface}function FF(){return FF=(0,we.Z)(function*({options:e,readable:t,writable:n,onTaskFinished:i},o){try{const r=new lze(e,o);yield t.pipeThrough(r).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:s,inputSize:a,outputSize:l}=r;return{signature:s,inputSize:a,outputSize:l}}finally{i()}}),FF.apply(this,arguments)}function BF(){return BF=(0,we.Z)(function*(e,t){let n,i;const o=new Promise((m,_)=>{n=m,i=_});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:o});const{readable:r,options:s,scripts:a}=e,{writable:l,closed:u}=function mze(e){let t;const n=new Promise(o=>t=o);return{writable:new WritableStream({write:o=>(0,we.Z)(function*(){const r=e.getWriter();yield r.ready,yield r.write(o),r.releaseLock()})(),close(){t()},abort:o=>e.getWriter().abort(o)}),closed:n}}(e.writable),d=VI({type:rze,scripts:a.slice(1),options:s,config:t,readable:r,writable:l},e);d||Object.assign(e,{reader:r.getReader(),writer:l.getWriter()});const h=yield o;return d||(yield l.getWriter().close()),yield u,h}),BF.apply(this,arguments)}let lZ=!0,uZ=!0;function VI(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:o}){try{let{value:r,readable:s,writable:a}=e;const l=[];if(r&&(e.value=r.byteLength<r.buffer.byteLength?r.buffer.slice(0,r.byteLength):r.buffer,l.push(e.value)),o&&uZ?(s&&l.push(s),a&&l.push(a)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{uZ=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(r){throw n&&n.releaseLock(),i(),r}}function kF(){return kF=(0,we.Z)(function*({data:e},t){const{type:n,value:i,messageId:o,result:r,error:s}=e,{reader:a,writer:l,resolveResult:u,rejectResult:d,onTaskFinished:h}=t;try{if(s){const{message:_,stack:p,code:y,name:b}=s,x=new Error(_);Object.assign(x,{stack:p,code:y,name:b}),m(x)}else{if(n==sze){const{value:_,done:p}=yield a.read();VI({type:oZ,value:_,done:p,messageId:o},t)}n==oZ&&(yield l.ready,yield l.write(new Uint8Array(i)),VI({type:aze,messageId:o},t)),n==rZ&&m(null,r)}}catch(_){VI({type:rZ,messageId:o},t),m(_)}function m(_,p){_?d(_):u(p),l&&l.releaseLock(),h()}}),kF.apply(this,arguments)}let ym=[];const UF=[];let dZ=0;function zF(){return zF=(0,we.Z)(function*(e,t){const{options:n,config:i}=t,{transferStreams:o,useWebWorkers:r,useCompressionStream:s,codecType:a,compressed:l,signed:u,encrypted:d}=n,{workerScripts:h,maxWorkers:m}=i;return t.transferStreams=o||o===ac,t.useWebWorkers=!!(l||u||d||t.transferStreams)&&(r||r===ac&&i.useWebWorkers),t.scripts=t.useWebWorkers&&h?h[a]:[],n.useCompressionStream=s||s===ac&&i.useCompressionStream,(yield function p(){return y.apply(this,arguments)}()).run();function y(){return(y=(0,we.Z)(function*(){const x=ym.find(C=>!C.busy);if(x)return VF(x),new LF(x,e,t,b);if(ym.length<m){const C={indexWorker:dZ};return dZ++,ym.push(C),new LF(C,e,t,b)}return new Promise(C=>UF.push({resolve:C,stream:e,workerOptions:t}))})).apply(this,arguments)}function b(x){if(UF.length){const[{resolve:C,stream:w,workerOptions:v}]=UF.splice(0,1);C(new LF(x,w,v,b))}else x.worker?(VF(x),function bze(e,t){const{config:n}=t,{terminateWorkerTimeout:i}=n;Number.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((0,we.Z)(function*(){ym=ym.filter(o=>o!=e);try{yield e.terminate()}catch{}}),i))}(x,t)):ym=ym.filter(C=>C!=x)}}),zF.apply(this,arguments)}function VF(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Ize=65536,jF="writable";class GI{constructor(){this.size=0}init(){this.initialized=!0}}class pZ extends GI{get readable(){const t=this,{chunkSize:n=Ize}=t,i=new ReadableStream({start(){this.chunkOffset=0},pull(o){var r=this;return(0,we.Z)(function*(){const{offset:s=0,size:a,diskNumberStart:l}=i,{chunkOffset:u}=r;o.enqueue(yield Fa(t,s+u,Math.min(n,a-u),l)),u+n>a?o.close():r.chunkOffset+=n})()}});return i}}class Dze extends GI{constructor(){super();const t=this,n=new WritableStream({write:i=>t.writeUint8Array(i)});Object.defineProperty(t,jF,{get:()=>n})}writeUint8Array(){}}class Pze extends Dze{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){const n=this;let i=0,o=n.pending;const r=n.pending.length;for(n.pending="",i=0;i<3*Math.floor((r+t.length)/3)-r;i++)o+=String.fromCharCode(t[i]);for(;i<t.length;i++)n.pending+=String.fromCharCode(t[i]);o.length>2?n.data+=btoa(o):n.pending=o}getData(){return this.data+btoa(this.pending)}}class mZ extends pZ{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}readUint8Array(t,n){var i=this;return(0,we.Z)(function*(){const o=i,r=t+n;let a=yield(t||r<o.size?o.blob.slice(t,r):o.blob).arrayBuffer();return a.byteLength>n&&(a=a.slice(t,r)),new Uint8Array(a)})()}}class Oze extends GI{constructor(t){super();const i=new TransformStream,o=[];t&&o.push(["Content-Type",t]),Object.defineProperty(this,jF,{get:()=>i.writable}),this.blob=new Response(i.readable,{headers:o}).blob()}getData(){return this.blob}}class Rze extends Oze{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||"utf-8"==t.toLowerCase()})}getData(){var t=()=>super.getData,n=this;return(0,we.Z)(function*(){const{encoding:i,utf8:o}=n,r=yield t().call(n);if(r.text&&o)return r.text();{const s=new FileReader;return new Promise((a,l)=>{Object.assign(s,{onload:({target:u})=>a(u.result),onerror:()=>l(s.error)}),s.readAsText(r,i)})}})()}}class Mze extends pZ{constructor(t){super(),this.readers=t}init(){var t=()=>super.init,n=this;return(0,we.Z)(function*(){const i=n,{readers:o}=i;i.lastDiskNumber=0,i.lastDiskOffset=0,yield Promise.all(o.map(function(){var r=(0,we.Z)(function*(s,a){yield s.init(),a!=o.length-1&&(i.lastDiskOffset+=s.size),i.size+=s.size});return function(s,a){return r.apply(this,arguments)}}())),t().call(n)})()}readUint8Array(t,n,i=0){var o=this;return(0,we.Z)(function*(){const r=o,{readers:s}=o;let a,l=i;-1==l&&(l=s.length-1);let u=t;for(;u>=s[l].size;)u-=s[l].size,l++;const d=s[l],h=d.size;if(u+n<=h)a=yield Fa(d,u,n);else{const m=h-u;a=new Uint8Array(n),a.set(yield Fa(d,u,m)),a.set(yield r.readUint8Array(t+m,n-m,i),m)}return r.lastDiskNumber=Math.max(l,r.lastDiskNumber),a})()}}class EZ extends GI{constructor(t,n=4294967295){super();const i=this;let o,r,s;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});const a=new WritableStream({write(m){var _=this;return(0,we.Z)(function*(){const{availableSize:p}=i;if(s)m.length>=p?(yield l(m.slice(0,p)),yield d(),i.diskOffset+=o.size,i.diskNumber++,s=null,yield _.write(m.slice(p))):yield l(m);else{const{value:y,done:b}=yield t.next();if(b&&!y)throw new Error("Writer iterator completed too soon");o=y,o.size=0,o.maxSize&&(i.maxSize=o.maxSize),i.availableSize=i.maxSize,yield jI(o),r=y.writable,s=r.getWriter(),yield _.write(m)}})()},close:()=>(0,we.Z)(function*(){yield s.ready,yield d()})()});function l(m){return u.apply(this,arguments)}function u(){return(u=(0,we.Z)(function*(m){const _=m.length;_&&(yield s.ready,yield s.write(m),o.size+=_,i.size+=_,i.availableSize-=_)})).apply(this,arguments)}function d(){return h.apply(this,arguments)}function h(){return(h=(0,we.Z)(function*(){r.size=o.size,yield s.close()})).apply(this,arguments)}Object.defineProperty(i,jF,{get:()=>a})}}function jI(e,t){return tB.apply(this,arguments)}function tB(){return tB=(0,we.Z)(function*(e,t){if(!e.init||e.initialized)return Promise.resolve();yield e.init(t)}),tB.apply(this,arguments)}function Bze(e){return Array.isArray(e)&&(e=new Mze(e)),e instanceof ReadableStream&&(e={readable:e}),e}function Fa(e,t,n,i){return e.readUint8Array(t,n,i)}function WI(e){function t(n){if(Object(n)!==n)return Promise.reject(new TypeError(n+" is not an object."));var i=n.done;return Promise.resolve(n.value).then(function(o){return{value:o,done:i}})}return(WI=function(i){this.s=i,this.n=i.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(i){var o=this.s.return;return void 0===o?Promise.resolve({value:i,done:!0}):t(o.apply(this.s,arguments))},throw:function(i){var o=this.s.return;return void 0===o?Promise.reject(i):t(o.apply(this.s,arguments))}},new WI(e)}function wZ(e,t){this.v=e,this.k=t}function Ba(e){return new wZ(e,0)}function OC(e){var t,n;function i(r,s){try{var a=e[r](s),l=a.value,u=l instanceof wZ;Promise.resolve(u?l.v:l).then(function(d){if(u){var h="return"===r?"return":"next";if(!l.k||d.done)return i(h,d);d=e[h](d).value}o(a.done?"return":"normal",d)},function(d){i("throw",d)})}catch(d){o("throw",d)}}function o(r,s){switch(r){case"return":t.resolve({value:s,done:!0});break;case"throw":t.reject(s);break;default:t.resolve({value:s,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(r,s){return new Promise(function(a,l){var u={key:r,arg:s,resolve:a,reject:l,next:null};n?n=n.next=u:(t=n=u,i(r,s))})},"function"!=typeof e.return&&(this.return=void 0)}OC.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},OC.prototype.next=function(e){return this._invoke("next",e)},OC.prototype.throw=function(e){return this._invoke("throw",e)},OC.prototype.return=function(e){return this._invoke("return",e)};const SZ="\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(""),Vze=256==SZ.length;function qI(e,t){return t&&"cp437"==t.trim().toLowerCase()?function Hze(e){if(Vze){let t="";for(let n=0;n<e.length;n++)t+=SZ[e[n]];return t}return(new TextDecoder).decode(e)}(e):new TextDecoder(t).decode(e)}const vZ="filename",IZ="rawFilename",DZ="comment",PZ="rawComment",OZ="uncompressedSize",RZ="compressedSize",nB="diskNumberStart",iB="lastModDate",oB="rawLastModDate",NZ="lastAccessDate",Gze="rawLastAccessDate",MZ="creationDate",jze="rawCreationDate",Wze=[vZ,IZ,RZ,OZ,iB,oB,DZ,PZ,NZ,MZ,"offset",nB,nB,"internalFileAttribute","externalFileAttribute","msDosCompatible","zip64","directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class FZ{constructor(t){Wze.forEach(n=>this[n]=t[n])}}const rB="File format is not recognized",$ze="Zip64 extra field not found",BZ="Compression method not supported",kZ="Split zip file",Jze=[[OZ,Ig],[RZ,Ig],["offset",Ig],[nB,hm]],eVe={[hm]:{getValue:qr,bytes:4},[Ig]:{getValue:YI,bytes:8}};class VZ{constructor(t,n={}){Object.assign(this,{reader:Bze(t),options:n,config:mm})}getEntriesGenerator(t={}){var n=this;return function zze(e){return function(){return new OC(e.apply(this,arguments))}}(function*(){const i=n;let{reader:o}=i;const{config:r}=i;if(yield Ba(jI(o)),(o.size===ac||!o.readUint8Array)&&(o=new mZ(yield Ba(new Response(o.readable).blob())),yield Ba(jI(o))),o.size<22)throw new Error(rB);o.chunkSize=function NUe(e){return Math.max(e.chunkSize,64)}(r);const s=yield Ba(function sVe(e,t,n,i,o){return cB.apply(this,arguments)}(o,101010256,o.size,22,16*hm));if(!s)throw 134695760==qr(Hs(yield Ba(Fa(o,0,4))))?new Error(kZ):new Error("End of central directory not found");const a=Hs(s);let l=qr(a,12),u=qr(a,16);const d=s.offset,h=Vs(a,20),m=d+22+h;let _=Vs(a,4);const p=o.lastDiskNumber||0;let y=Vs(a,6),b=Vs(a,8),x=0,C=0;if(u==Ig||l==Ig||b==hm||y==hm){const D=Hs(yield Ba(Fa(o,s.offset-20,20)));if(117853008==qr(D,0)){u=YI(D,8);let L=yield Ba(Fa(o,u,56,-1)),M=Hs(L);const U=s.offset-20-56;if(qr(M,0)!=wX&&u!=U){const z=u;u=U,x=u-z,L=yield Ba(Fa(o,u,56,-1)),M=Hs(L)}if(qr(M,0)!=wX)throw new Error("End of Zip64 central directory locator not found");_==hm&&(_=qr(M,16)),y==hm&&(y=qr(M,20)),b==hm&&(b=YI(M,32)),l==Ig&&(l=YI(M,40)),u-=l}}if(u>=o.size&&(x=o.size-u-l-22,u=o.size-l-22),p!=_)throw new Error(kZ);if(u<0)throw new Error(rB);let w=0,v=yield Ba(Fa(o,u,l,y)),I=Hs(v);if(l){const S=s.offset-l;if(33639248!=qr(I,w)&&u!=S){const D=u;u=S,x+=u-D,v=yield Ba(Fa(o,u,l,y)),I=Hs(v)}}const P=s.offset-u-(o.lastDiskOffset||0);if(l!=P&&P>=0&&(l=P,v=yield Ba(Fa(o,u,l,y)),I=Hs(v)),u<0||u>=o.size)throw new Error(rB);const N=Uc(i,t,"filenameEncoding"),R=Uc(i,t,"commentEncoding");for(let S=0;S<b;S++){const D=new tVe(o,r,i.options);if(33639248!=qr(I,w))throw new Error("Central directory header not found");HZ(D,I,w+6);const L=!!D.bitFlag.languageEncodingFlag,M=w+46,U=M+D.filenameLength,z=U+D.extraFieldLength,G=Vs(I,w+4),W=0==(0&G),q=v.subarray(M,U),j=Vs(I,w+32),Q=z+j,Y=v.subarray(z,Q),ne=L,X=L,K=W&&16==(16&Lb(I,w+38)),$=qr(I,w+42)+x;Object.assign(D,{versionMadeBy:G,msDosCompatible:W,compressedSize:0,uncompressedSize:0,commentLength:j,directory:K,offset:$,diskNumberStart:Vs(I,w+34),internalFileAttribute:Vs(I,w+36),externalFileAttribute:qr(I,w+38),rawFilename:q,filenameUTF8:ne,commentUTF8:X,rawExtraField:v.subarray(U,z)});const me=Uc(i,t,"decodeText")||qI,Se=ne?"utf-8":N||"cp437",fe=X?"utf-8":R||"cp437";let ye=me(q,Se);ye===ac&&(ye=qI(q,Se));let ve=me(Y,fe);ve===ac&&(ve=qI(Y,fe)),Object.assign(D,{rawComment:Y,filename:ye,comment:ve,directory:K||ye.endsWith("/")}),C=Math.max($,C),yield Ba(GZ(D,D,I,w+6));const Oe=new FZ(D);Oe.getData=(je,Ke)=>D.getData(je,Oe,Ke),w=Q;const{onprogress:Ge}=t;if(Ge)try{yield Ba(Ge(S+1,b,new FZ(D)))}catch{}yield Oe}const B=Uc(i,t,"extractPrependedData"),F=Uc(i,t,"extractAppendedData");return B&&(i.prependedData=C>0?yield Ba(Fa(o,0,C)):new Uint8Array),i.comment=h?yield Ba(Fa(o,d+22,h)):new Uint8Array,F&&(i.appendedData=m<o.size?yield Ba(Fa(o,m,o.size-m)):new Uint8Array),!0})()}getEntries(t={}){var n=this;return(0,we.Z)(function*(){const i=[];var s,o=!1,r=!1;try{for(var l,a=function Uze(e){var t,n,i,o=2;for(typeof Symbol<"u"&&(n=Symbol.asyncIterator,i=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(i&&null!=(t=e[i]))return new WI(t.call(e));n="@@asyncIterator",i="@@iterator"}throw new TypeError("Object is not async iterable")}(n.getEntriesGenerator(t));o=!(l=yield a.next()).done;o=!1)i.push(l.value)}catch(u){r=!0,s=u}finally{try{o&&null!=a.return&&(yield a.return())}finally{if(r)throw s}}return i})()}close(){return(0,we.Z)(function*(){})()}}class tVe{constructor(t,n,i){Object.assign(this,{reader:t,config:n,options:i})}getData(t,n,i={}){var o=this;return(0,we.Z)(function*(){const r=o,{reader:s,offset:a,diskNumberStart:l,extraFieldAES:u,compressionMethod:d,config:h,bitFlag:m,signature:_,rawLastModDate:p,uncompressedSize:y,compressedSize:b}=r,x=n.localDirectory={},w=Hs(yield Fa(s,a,30,l));let v=Uc(r,i,"password"),I=Uc(r,i,"rawPassword");if(v=v&&v.length&&v,I=I&&I.length&&I,u&&99!=u.originalCompressionMethod)throw new Error(BZ);if(0!=d&&8!=d)throw new Error(BZ);if(67324752!=qr(w,0))throw new Error("Local file header not found");HZ(x,w,4),x.rawExtraField=x.extraFieldLength?yield Fa(s,a+30+x.filenameLength,x.extraFieldLength,l):new Uint8Array,yield GZ(r,x,w,4,!0),Object.assign(n,{lastAccessDate:x.lastAccessDate,creationDate:x.creationDate});const P=r.encrypted&&x.encrypted,N=P&&!u;if(P){if(!N&&u.strength===ac)throw new Error("Encryption method not supported");if(!v&&!I)throw new Error("File contains encrypted entry")}const B=b,F=s.readable;Object.assign(F,{diskNumberStart:l,offset:a+30+x.filenameLength+x.extraFieldLength,size:B});const S=Uc(r,i,"signal"),D=Uc(r,i,"checkPasswordOnly");D&&(t=new WritableStream),t=function kze(e){e.writable===ac&&typeof e.next==wC&&(e=new EZ(e)),e instanceof WritableStream&&(e={writable:e});const{writable:t}=e;return t.size===ac&&(t.size=0),e instanceof EZ||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}(t),yield jI(t,y);const{writable:L}=t,{onstart:M,onprogress:U,onend:z}=i,G={options:{codecType:sZ,password:v,rawPassword:I,zipCrypto:N,encryptionStrength:u&&u.strength,signed:Uc(r,i,"checkSignature"),passwordVerification:N&&(m.dataDescriptor?p>>>8&255:_>>>24&255),signature:_,compressed:0!=d,encrypted:P,useWebWorkers:Uc(r,i,"useWebWorkers"),useCompressionStream:Uc(r,i,"useCompressionStream"),transferStreams:Uc(r,i,"transferStreams"),checkPasswordOnly:D},config:h,streamOptions:{signal:S,size:B,onstart:M,onprogress:U,onend:z}};let W=0;try{({outputSize:W}=yield function yze(e,t){return zF.apply(this,arguments)}({readable:F,writable:L},G))}catch(q){if(!D||q.message!=EF)throw q}finally{const q=Uc(r,i,"preventClose");L.size+=W,!q&&!L.locked&&(yield L.getWriter().close())}return D?ac:t.getData?t.getData():L})()}}function HZ(e,t,n){const i=e.rawBitFlag=Vs(t,n+2),o=1==(1&i),r=qr(t,n+6);Object.assign(e,{encrypted:o,version:Vs(t,n),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:2048==(2048&i)},rawLastModDate:r,lastModDate:aVe(r),filenameLength:Vs(t,n+22),extraFieldLength:Vs(t,n+24)})}function GZ(e,t,n,i,o){return sB.apply(this,arguments)}function sB(){return sB=(0,we.Z)(function*(e,t,n,i,o){const{rawExtraField:r}=t,s=t.extraField=new Map,a=Hs(new Uint8Array(r));let l=0;try{for(;l<r.length;){const x=Vs(a,l),C=Vs(a,l+2);s.set(x,{type:x,data:r.slice(l+4,l+4+C)}),l+=4+C}}catch{}const u=Vs(n,i+4);Object.assign(t,{signature:qr(n,i+10),uncompressedSize:qr(n,i+18),compressedSize:qr(n,i+14)});const d=s.get(AUe);d&&(function nVe(e,t){t.zip64=!0;const n=Hs(e.data),i=Jze.filter(([o,r])=>t[o]==r);for(let o=0,r=0;o<i.length;o++){const[s,a]=i[o];if(t[s]==a){const l=eVe[a];t[s]=e[s]=l.getValue(n,r),r+=l.bytes}else if(e[s])throw new Error($ze)}}(d,t),t.extraFieldZip64=d);const h=s.get(SUe);h&&(yield jZ(h,vZ,IZ,t,e),t.extraFieldUnicodePath=h);const m=s.get(vUe);m&&(yield jZ(m,DZ,PZ,t,e),t.extraFieldUnicodeComment=m);const _=s.get(xUe);_?(function iVe(e,t,n){const i=Hs(e.data),o=Lb(i,4);Object.assign(e,{vendorVersion:Lb(i,0),vendorId:Lb(i,2),strength:o,originalCompressionMethod:n,compressionMethod:Vs(i,5)}),t.compressionMethod=e.compressionMethod}(_,t,u),t.extraFieldAES=_):t.compressionMethod=u;const p=s.get(CUe);p&&(function oVe(e,t){const n=Hs(e.data);let o,i=4;try{for(;i<e.data.length&&!o;){const r=Vs(n,i),s=Vs(n,i+2);r==EUe&&(o=e.data.slice(i+4,i+4+s)),i+=4+s}}catch{}try{if(o&&24==o.length){const r=Hs(o),s=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),l=r.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:l});const u=lB(s),m={lastModDate:u,lastAccessDate:lB(a),creationDate:lB(l)};Object.assign(e,m),Object.assign(t,m)}}catch{}}(p,t),t.extraFieldNTFS=p);const y=s.get(wUe);y&&(function rVe(e,t,n){const i=Hs(e.data),o=Lb(i,0),r=[],s=[];n?(1==(1&o)&&(r.push(iB),s.push(oB)),2==(2&o)&&(r.push(NZ),s.push(Gze)),4==(4&o)&&(r.push(MZ),s.push(jze))):e.data.length>=5&&(r.push(iB),s.push(oB));let a=1;r.forEach((l,u)=>{if(e.data.length>=a+4){const d=qr(i,a);t[l]=e[l]=new Date(1e3*d),e[s[u]]=d}a+=4})}(y,t,o),t.extraFieldExtendedTimestamp=y);const b=s.get(IUe);b&&(t.extraFieldUSDZ=b)}),sB.apply(this,arguments)}function jZ(e,t,n,i,o){return aB.apply(this,arguments)}function aB(){return aB=(0,we.Z)(function*(e,t,n,i,o){const r=Hs(e.data),s=new kI;s.append(o[n]);const a=Hs(new Uint8Array(4));a.setUint32(0,s.get(),!0);const l=qr(r,1);Object.assign(e,{version:Lb(r,0),[t]:qI(e.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&l==qr(a,0)}),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}),aB.apply(this,arguments)}function cB(){return cB=(0,we.Z)(function*(e,t,n,i,o){const r=new Uint8Array(4);!function cVe(e,t,n){e.setUint32(t,n,!0)}(Hs(r),0,t);const a=i+o;return(yield l(i))||(yield l(Math.min(a,n)));function l(d){return u.apply(this,arguments)}function u(){return(u=(0,we.Z)(function*(d){const h=n-d,m=yield Fa(e,h,d);for(let _=m.length-i;_>=0;_--)if(m[_]==r[0]&&m[_+1]==r[1]&&m[_+2]==r[2]&&m[_+3]==r[3])return{offset:h+_,buffer:m.slice(_,_+i).buffer}})).apply(this,arguments)}}),cB.apply(this,arguments)}function Uc(e,t,n){return t[n]===ac?e.options[n]:t[n]}function aVe(e){const t=(4294901760&e)>>16,n=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch{}}function lB(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function Lb(e,t){return e.getUint8(t)}function Vs(e,t){return e.getUint16(t,!0)}function qr(e,t){return e.getUint32(t,!0)}function YI(e,t){return Number(e.getBigUint64(t,!0))}function Hs(e){return new DataView(e.buffer)}new Uint8Array([7,0,2,0,65,69,3,0,0]),RX({Deflate:function qke(e){const n=new tX,i=function Yke(e){return e+5*(Math.floor(e/16383)+1)}(e&&e.chunkSize?e.chunkSize:65536),r=new Uint8Array(i);let s=e?e.level:-1;typeof s>"u"&&(s=-1),n.deflateInit(s),n.next_out=r,this.append=function(a,l){let u,d,h=0,m=0,_=0;const p=[];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,u=n.deflate(0),0!=u)throw new Error("deflating: "+n.msg);n.next_out_index&&p.push(n.next_out_index==i?new Uint8Array(r):r.subarray(0,n.next_out_index)),_+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=h&&(l(n.next_in_index),h=n.next_in_index)}while(n.avail_in>0||0===n.avail_out);return p.length>1?(d=new Uint8Array(_),p.forEach(function(y){d.set(y,m),m+=y.length})):d=p[0]?new Uint8Array(p[0]):new Uint8Array,d}},this.flush=function(){let a,l,u=0,d=0;const h=[];do{if(n.next_out_index=0,n.avail_out=i,a=n.deflate(4),1!=a&&0!=a)throw new Error("deflating: "+n.msg);i-n.avail_out>0&&h.push(r.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||0===n.avail_out);return n.deflateEnd(),l=new Uint8Array(d),h.forEach(function(m){l.set(m,u),u+=m.length}),l}},Inflate:function hUe(e){const n=new CX,i=e&&e.chunkSize?Math.floor(2*e.chunkSize):131072,r=new Uint8Array(i);let s=!1;n.inflateInit(),n.next_out=r,this.append=function(a,l){const u=[];let d,h,m=0,_=0,p=0;if(0!==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,0===n.avail_in&&!s&&(n.next_in_index=0,s=!0),d=n.inflate(0),s&&d===Bh){if(0!==n.avail_in)throw new Error("inflating: bad input")}else if(d!==Xi&&d!==Fh)throw new Error("inflating: "+n.msg);if((s||d===Fh)&&n.avail_in===a.length)throw new Error("inflating: bad input");n.next_out_index&&u.push(n.next_out_index===i?new Uint8Array(r):r.subarray(0,n.next_out_index)),p+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=m&&(l(n.next_in_index),m=n.next_in_index)}while(n.avail_in>0||0===n.avail_out);return u.length>1?(h=new Uint8Array(p),u.forEach(function(y){h.set(y,_),_+=y.length})):h=u[0]?new Uint8Array(u[0]):new Uint8Array,h}},this.flush=function(){n.inflateEnd()}}});const Rr=function IVe(e){if("string"==typeof e){const t=document.getElementById(e);if(null===t)throw new E(`Element with id "${e}" does not exist in the document.`);e=t}return e};function bB(){this._removalFunctions=[]}bB.prototype.add=function(e,t,n){if(!c(e))throw new E("event is required");const i=e.addEventListener(t,n);this._removalFunctions.push(i);const o=this;return function(){i();const r=o._removalFunctions;r.splice(r.indexOf(i),1)}},bB.prototype.removeAll=function(){const e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};const kh=bB;function Og(){this._eventHelper=new kh,this._definitionChanged=new Ye,this._intervals=new Jc,this._intervals.changedEvent.addEventListener(Og.prototype._intervalsChanged,this)}Object.defineProperties(Og.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),Og.prototype.getValue=function(e,t){if(!c(e))throw new E("time is required");const n=this._intervals.findDataForIntervalContainingDate(e);if(c(n))return n.getValue(e,t)},Og.prototype.equals=function(e){return this===e||e instanceof Og&&this._intervals.equals(e._intervals,te.equals)},Og.prototype._intervalsChanged=function(){(function DVe(e,t,n,i){function o(){n.raiseEvent(e)}const r=[];t.removeAll();const s=i.length;for(let a=0;a<s;a++){const l=i.get(a);c(l.data)&&-1===r.indexOf(l.data)&&t.add(l.data.definitionChanged,o)}})(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)};const PVe=Og;function bm(e){this._referenceFrame=g(e,ta.FIXED),this._definitionChanged=new Ye,this._composite=new PVe,this._composite.definitionChanged.addEventListener(bm.prototype._raiseDefinitionChanged,this)}Object.defineProperties(bm.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),bm.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ta.FIXED,t)},bm.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new E("time is required.");if(!c(t))throw new E("referenceFrame is required.");const i=this._composite._intervals.findDataForIntervalContainingDate(e);if(c(i))return i.getValueInReferenceFrame(e,t,n)},bm.prototype.equals=function(e){return this===e||e instanceof bm&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,te.equals)},bm.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};const XZ=bm;function TB(e){let t=(e=g(e,g.EMPTY_OBJECT)).currentTime,n=e.startTime,i=e.stopTime;if(t=c(t)?re.clone(t):c(n)?re.clone(n):c(i)?re.addDays(i,-1,new re):re.now(),n=c(n)?re.clone(n):re.clone(t),i=c(i)?re.clone(i):re.addDays(n,1,new re),re.greaterThan(n,i))throw new E("startTime must come before stopTime.");this.startTime=n,this.stopTime=i,this.clockRange=g(e.clockRange,lm.UNBOUNDED),this.canAnimate=g(e.canAnimate,!0),this.onTick=new Ye,this.onStop=new Ye,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Cr(),this.currentTime=t,this.multiplier=g(e.multiplier,1),this.shouldAnimate=g(e.shouldAnimate,!1),this.clockStep=g(e.clockStep,na.SYSTEM_CLOCK_MULTIPLIER)}Object.defineProperties(TB.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){re.equals(this._currentTime,e)||(this._clockStep===na.SYSTEM_CLOCK&&(this._clockStep=na.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===na.SYSTEM_CLOCK&&(this._clockStep=na.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===na.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=re.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===na.SYSTEM_CLOCK&&(this._clockStep=na.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),TB.prototype.tick=function(){const e=Cr();let t=re.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){const n=this._clockStep;if(n===na.SYSTEM_CLOCK)t=re.now(t);else{const i=this._multiplier;t=re.addSeconds(t,n===na.TICK_DEPENDENT?i:i*((e-this._lastSystemTime)/1e3),t);const o=this.clockRange,r=this.startTime,s=this.stopTime;if(o===lm.CLAMPED)re.lessThan(t,r)?t=re.clone(r,t):re.greaterThan(t,s)&&(t=re.clone(s,t),this.onStop.raiseEvent(this));else if(o===lm.LOOP_STOP)for(re.lessThan(t,r)&&(t=re.clone(r,t));re.greaterThan(t,s);)t=re.addSeconds(r,re.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};const ZI=TB;function Rg(){this._definitionChanged=new Ye,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}Object.defineProperties(Rg.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:Nh("startTime"),stopTime:Nh("stopTime"),currentTime:Nh("currentTime"),clockRange:Nh("clockRange"),clockStep:Nh("clockStep"),multiplier:Nh("multiplier")}),Rg.prototype.clone=function(e){return c(e)||(e=new Rg),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e},Rg.prototype.equals=function(e){return this===e||c(e)&&re.equals(this.startTime,e.startTime)&&re.equals(this.stopTime,e.stopTime)&&re.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier},Rg.prototype.merge=function(e){if(!c(e))throw new E("source is required.");this.startTime=g(this.startTime,e.startTime),this.stopTime=g(this.stopTime,e.stopTime),this.currentTime=g(this.currentTime,e.currentTime),this.clockRange=g(this.clockRange,e.clockRange),this.clockStep=g(this.clockStep,e.clockStep),this.multiplier=g(this.multiplier,e.multiplier)},Rg.prototype.getValue=function(e){return c(e)||(e=new ZI),e.startTime=g(this.startTime,e.startTime),e.stopTime=g(this.stopTime,e.stopTime),e.currentTime=g(this.currentTime,e.currentTime),e.clockRange=g(this.clockRange,e.clockRange),e.multiplier=g(this.multiplier,e.multiplier),e.clockStep=g(this.clockStep,e.clockStep),e};const OVe=Rg,LVe=function RVe(e,t){this.position=e,this.headingPitchRoll=t},MVe=function NVe(e,t){this.position=e,this.headingPitchRange=t};function $I(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new Ye,this.tourEnd=new Ye,this.entryStart=new Ye,this.entryEnd=new Ye,this._activeEntries=[]}function ZZ(e){for(let t=e.pop();void 0!==t;t=e.pop())t.stop()}function $Z(e,t,n){const i=this.playlist[this.playlistIndex];if(i){const o=FVe.bind(this,e,t,n);if(this._activeEntries.push(i),this.entryStart.raiseEvent(i),i.blocking)i.play(o,e.scene.camera,t);else{const r=this;i.play(function(){r.entryEnd.raiseEvent(i);const s=r._activeEntries.indexOf(i);s>=0&&r._activeEntries.splice(s,1)}),o(e,t,n)}}else c(n)&&n(!1)}function FVe(e,t,n,i){const o=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(o,i),i)n(i);else{const r=this._activeEntries.indexOf(o);r>=0&&this._activeEntries.splice(r,1),this.playlistIndex++,$Z.call(this,e,t,n)}}$I.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},$I.prototype.play=function(e,t){this.tourStart.raiseEvent();const n=this;$Z.call(this,e,t,function(i){n.playlistIndex=0,i||ZZ(n._activeEntries),n.tourEnd.raiseEvent(i)})},$I.prototype.stop=function(){ZZ(this._activeEntries)};const BVe=$I;var Ii=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 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}}),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 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}}),Back:Object.freeze({In:function(e){var t=1.70158;return 1===e?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return 0===e?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Ii.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*Ii.Bounce.In(2*e):.5*Ii.Bounce.Out(2*e-1)+.5}}),generatePow:function(e){return void 0===e&&(e=4),e=(e=e<Number.EPSILON?Number.EPSILON:e)>1e4?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(2*t,e)/2:(1-Math.pow(2-2*t,e))/2+.5}}}}),Nb=function(){return performance.now()},KZ=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){void 0===t&&(t=Nb()),void 0===n&&(n=!1);var i=Object.keys(this._tweens);if(0===i.length)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var r=this._tweens[i[o]];r&&!1===r.update(t,!n)&&!n&&delete this._tweens[i[o]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),Lg={Linear:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=Lg.Utils.Linear;return t<0?r(e[0],e[1],i):t>1?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=Lg.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=Lg.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[n<o+1?n:o+1],e[n<o+2?n:o+2],i-o)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=Lg.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var i=t;i>1;i--)n*=i;return e[t]=n,n}}(),CatmullRom:function(e,t,n,i,o){var r=.5*(n-e),s=.5*(i-t),a=o*o;return(2*t-2*n+r+s)*(o*a)+(-3*t+3*n-2*r-s)*a+r*o+t}}},AB=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),xB=new KZ,QZ=function(){function e(t,n){void 0===n&&(n=xB),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=Ii.Linear.None,this._interpolationFunction=Lg.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=AB.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(void 0===n&&(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 void 0===t&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return void 0===t&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,n){if(void 0===t&&(t=Nb()),void 0===n&&(n=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var i in this._reversed=!1,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],l=Array.isArray(a),u=l?"array":typeof a,d=!l&&Array.isArray(i[s]);if("undefined"!==u&&"function"!==u){if(d){if(0===(h=i[s]).length)continue;for(var m=[a],_=0,p=h.length;_<p;_+=1){var y=this._handleRelativeValue(a,h[_]);if(isNaN(y)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}m.push(y)}d&&(i[s]=m)}if("object"!==u&&!l||!a||d)(typeof n[s]>"u"||r)&&(n[s]=a),l||(n[s]*=1),o[s]=d?i[s].slice().reverse():n[s]||0;else{n[s]=l?[]:{};var b=a;for(var x in b)n[s][x]=b[x];o[s]=l?[]:{};var h=i[s];if(!this._isDynamic){var C={};for(var x in h)C[x]=h[x];i[s]=h=C}this._setupProperties(b,n[s],h,o[s],r)}}}},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 void 0===t&&(t=Nb()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this)),this},e.prototype.resume=function(t){return void 0===t&&(t=Nb()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var t=0,n=this._chainedTweens.length;t<n;t++)this._chainedTweens[t].stop();return this},e.prototype.group=function(t){return void 0===t&&(t=xB),this._group=t,this},e.prototype.delay=function(t){return void 0===t&&(t=0),this._delayTime=t,this},e.prototype.repeat=function(t){return void 0===t&&(t=0),this._initialRepeat=t,this._repeat=t,this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},e.prototype.yoyo=function(t){return void 0===t&&(t=!1),this._yoyo=t,this},e.prototype.easing=function(t){return void 0===t&&(t=Ii.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return void 0===t&&(t=Lg.Linear),this._interpolationFunction=t,this},e.prototype.chain=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._chainedTweens=t,this},e.prototype.onStart=function(t){return this._onStartCallback=t,this},e.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},e.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},e.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},e.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},e.prototype.onStop=function(t){return this._onStopCallback=t,this},e.prototype.update=function(t,n){var i;if(void 0===t&&(t=Nb()),void 0===n&&(n=!0),this._isPaused)return!0;if(!this._goToEnd&&!this._isPlaying){if(t>this._startTime+this._duration)return!1;n&&this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),!1===this._onEveryStartCallbackFired&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var r=t-this._startTime,s=this._duration+(null!==(i=this._repeatDelayTime)&&void 0!==i?i:this._delayTime),l=this._calculateElapsedPortion(r,s,this._duration+this._repeat*s),u=this._easingFunction(l),d=this._calculateCompletionStatus(r,s);if("repeat"===d&&this._processRepetition(r,s),this._updateProperties(this._object,this._valuesStart,this._valuesEnd,u),"about-to-repeat"===d&&this._processRepetition(r,s),this._onUpdateCallback&&this._onUpdateCallback(this._object,l),"repeat"===d||"about-to-repeat"===d)this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1;else if("completed"===d){this._isPlaying=!1,this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var h=0,m=this._chainedTweens.length;h<m;h++)this._chainedTweens[h].start(this._startTime+this._duration,!1)}return"completed"!==d},e.prototype._calculateElapsedPortion=function(t,n,i){if(0===this._duration||t>i)return 1;var r=Math.min(t%n/this._duration,1);return 0===r&&0!==t&&t%this._duration==0?1:r},e.prototype._calculateCompletionStatus=function(t,n){return 0!==this._duration&&t<this._duration?"playing":this._repeat<=0?"completed":t===this._duration?"about-to-repeat":"repeat"},e.prototype._processRepetition=function(t,n){var i=Math.min(Math.trunc((t-this._duration)/n)+1,this._repeat);for(var o in isFinite(this._repeat)&&(this._repeat-=i),this._valuesStartRepeat){var r=this._valuesEnd[o];!this._yoyo&&"string"==typeof r&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(r)),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}this._yoyo&&(this._reversed=!this._reversed),this._startTime+=n*i},e.prototype._updateProperties=function(t,n,i,o){for(var r in i)if(void 0!==n[r]){var s=n[r]||0,a=i[r],l=Array.isArray(t[r]),u=Array.isArray(a);!l&&u?t[r]=this._interpolationFunction(a,o):"object"==typeof a&&a?this._updateProperties(t[r],s,a,o):"number"==typeof(a=this._handleRelativeValue(s,a))&&(t[r]=s+(a-s)*o)}},e.prototype._handleRelativeValue=function(t,n){return"string"!=typeof n?n:"+"===n.charAt(0)||"-"===n.charAt(0)?t+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(t){var n=this._valuesStartRepeat[t],i=this._valuesEnd[t];this._valuesStartRepeat[t]="string"==typeof i?this._valuesStartRepeat[t]+parseFloat(i):this._valuesEnd[t],this._valuesEnd[t]=n},e}(),mf=xB;mf.getAll.bind(mf),mf.removeAll.bind(mf),mf.add.bind(mf),mf.remove.bind(mf),mf.update.bind(mf);const Vc=Object.freeze({LINEAR_NONE:Ii.Linear.None,QUADRATIC_IN:Ii.Quadratic.In,QUADRATIC_OUT:Ii.Quadratic.Out,QUADRATIC_IN_OUT:Ii.Quadratic.InOut,CUBIC_IN:Ii.Cubic.In,CUBIC_OUT:Ii.Cubic.Out,CUBIC_IN_OUT:Ii.Cubic.InOut,QUARTIC_IN:Ii.Quartic.In,QUARTIC_OUT:Ii.Quartic.Out,QUARTIC_IN_OUT:Ii.Quartic.InOut,QUINTIC_IN:Ii.Quintic.In,QUINTIC_OUT:Ii.Quintic.Out,QUINTIC_IN_OUT:Ii.Quintic.InOut,SINUSOIDAL_IN:Ii.Sinusoidal.In,SINUSOIDAL_OUT:Ii.Sinusoidal.Out,SINUSOIDAL_IN_OUT:Ii.Sinusoidal.InOut,EXPONENTIAL_IN:Ii.Exponential.In,EXPONENTIAL_OUT:Ii.Exponential.Out,EXPONENTIAL_IN_OUT:Ii.Exponential.InOut,CIRCULAR_IN:Ii.Circular.In,CIRCULAR_OUT:Ii.Circular.Out,CIRCULAR_IN_OUT:Ii.Circular.InOut,ELASTIC_IN:Ii.Elastic.In,ELASTIC_OUT:Ii.Elastic.Out,ELASTIC_IN_OUT:Ii.Elastic.InOut,BACK_IN:Ii.Back.In,BACK_OUT:Ii.Back.Out,BACK_IN_OUT:Ii.Back.InOut,BOUNCE_IN:Ii.Bounce.In,BOUNCE_OUT:Ii.Bounce.Out,BOUNCE_IN_OUT:Ii.Bounce.InOut});function KI(e,t,n){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=n,this.flyToMode=t}KI.prototype.play=function(e,t,n){if(this.activeCamera=t,c(e)&&null!==e){const o=this;this.activeCallback=function(r){delete o.activeCallback,delete o.activeCamera,e(!c(r)&&r)}}const i=this.getCameraOptions(n);if(this.view.headingPitchRoll)t.flyTo(i);else if(this.view.headingPitchRange){const o=new Ae(this.view.position);t.flyToBoundingSphere(o,i)}},KI.prototype.stop=function(){c(this.activeCamera)&&this.activeCamera.cancelFlight(),c(this.activeCallback)&&this.activeCallback(!0)},KI.prototype.getCameraOptions=function(e){let t={duration:this.duration};return c(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=Vc.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),c(e)&&(t=Pn(t,e)),t};const qVe=KI;function CB(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}CB.prototype.play=function(e){const t=this;this.activeCallback=e,this.timeout=setTimeout(function(){delete t.activeCallback,e(!1)},1e3*this.duration)},CB.prototype.stop=function(){clearTimeout(this.timeout),c(this.activeCallback)&&this.activeCallback(!0)};const YVe=CB;function Uh(e,t){this._value=void 0,this._definitionChanged=new Ye,this._eventHelper=new kh,this._referenceFrame=g(t,ta.FIXED),this.setValue(e)}Object.defineProperties(Uh.prototype,{isConstant:{get:function(){const e=this._value;if(!c(e))return!0;const t=e.length;for(let n=0;n<t;n++)if(!te.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),Uh.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ta.FIXED,t)},Uh.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new E("time is required.");if(!c(t))throw new E("referenceFrame is required.");const i=this._value;if(!c(i))return;const o=i.length;c(n)||(n=new Array(o));let r=0,s=0;for(;r<o;){const l=i[r].getValueInReferenceFrame(e,t,n[r]);c(l)&&(n[s]=l,s++),r++}return n.length=s,n},Uh.prototype.setValue=function(e){const t=this._eventHelper;if(t.removeAll(),c(e)){this._value=e.slice();const n=e.length;for(let i=0;i<n;i++){const o=e[i];c(o)&&t.add(o.definitionChanged,Uh.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},Uh.prototype.equals=function(e){return this===e||e instanceof Uh&&this._referenceFrame===e._referenceFrame&&te.arrayEquals(this._value,e._value)},Uh.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};const XVe=Uh;function Ng(e){let t=e._targetProperty;if(!c(t)){let n=e._targetEntity;if(!c(n)){if(n=e._targetCollection.getById(e._targetId),!c(n))return void(e._targetEntity=e._targetProperty=void 0);n.definitionChanged.addEventListener(pl.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=n}const i=e._targetPropertyNames;t=e._targetEntity;for(let o=0,r=i.length;o<r&&c(t);++o)t=t[i[o]];e._targetProperty=t}return t}function pl(e,t,n){if(!c(e))throw new E("targetCollection is required.");if(!c(t)||""===t)throw new E("targetId is required.");if(!c(n)||0===n.length)throw new E("targetPropertyNames is required.");for(let i=0;i<n.length;i++){const o=n[i];if(!c(o)||""===o)throw new E("reference contains invalid properties.")}this._targetCollection=e,this._targetId=t,this._targetPropertyNames=n,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new Ye,e.collectionChanged.addEventListener(pl.prototype._onCollectionChanged,this)}Object.defineProperties(pl.prototype,{isConstant:{get:function(){return te.isConstant(Ng(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){const e=Ng(this);return c(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return Ng(this)}}}),pl.fromString=function(e,t){if(!c(e))throw new E("targetCollection is required.");if(!c(t))throw new E("referenceString is required.");let n;const i=[];let o=!0,r=!1,s="";for(let a=0;a<t.length;++a){const l=t.charAt(a);r?(s+=l,r=!1):"\\"===l?r=!0:o&&"#"===l?(n=s,o=!1,s=""):o||"."!==l?s+=l:(i.push(s),s="")}return i.push(s),new pl(e,n,i)},pl.prototype.getValue=function(e,t){const n=Ng(this);return c(n)?n.getValue(e,t):void 0},pl.prototype.getValueInReferenceFrame=function(e,t,n){const i=Ng(this);return c(i)?i.getValueInReferenceFrame(e,t,n):void 0},pl.prototype.getType=function(e){const t=Ng(this);return c(t)?t.getType(e):void 0},pl.prototype.equals=function(e){if(this===e)return!0;const t=this._targetPropertyNames,n=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==n.length)return!1;const i=this._targetPropertyNames.length;for(let o=0;o<i;o++)if(t[o]!==n[o])return!1;return!0},pl.prototype._onTargetEntityDefinitionChanged=function(e,t,n,i){c(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))},pl.prototype._onCollectionChanged=function(e,t,n){let i=this._targetEntity;c(i)&&-1!==n.indexOf(i)?(i.definitionChanged.removeEventListener(pl.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):c(i)||(i=Ng(this),c(i)&&this._definitionChanged.raiseEvent(this))};const JZ=pl,Mb=Object.freeze({NONE:0,HOLD:1,EXTRAPOLATE:2}),EB={type:"Linear",getRequiredDataPoints:function(e){return 2},interpolateOrderZero:function(e,t,n,i,o){if(2!==t.length)throw new E("The xTable provided to the linear interpolator must have exactly two elements.");if(i<=0)throw new E("There must be at least 1 dependent variable for each independent variable.");let r,s,a;c(o)||(o=new Array(i));const l=t[0],u=t[1];if(l===u)throw new E("Divide by zero error: xTable[0] and xTable[1] are equal");for(r=0;r<i;r++)s=n[r],a=n[r+i],o[r]=((a-s)*e+u*s-l*a)/(u-l);return o}},ZVe=EB,e$={packedLength:1,pack:function(e,t,n){t[n=g(n,0)]=e},unpack:function(e,t,n){return e[t=g(t,0)]}};function t$(e,t,n){let i;const o=e.length,r=n.length,s=o+r;if(e.length=s,o!==t){let a=o-1;for(i=s-1;i>=t;i--)e[i]=e[a--]}for(i=0;i<r;i++)e[t++]=n[i]}function n$(e,t){return e instanceof re?e:"string"==typeof e?re.fromIso8601(e):re.addSeconds(t,e,new re)}const wB=[],SB=[];function QI(e,t,n,i,o){let s,a,l,u,d,h,r=0;for(;r<i.length;){d=n$(i[r],e),l=Be(t,d,re.compare);let m=0,_=0;if(l<0){for(l=~l,u=l*o,a=void 0,h=t[l];r<i.length&&(d=n$(i[r],e),!(c(a)&&re.compare(a,d)>=0||c(h)&&re.compare(d,h)>=0));){for(wB[m++]=d,r+=1,s=0;s<o;s++)SB[_++]=i[r],r+=1;a=d}m>0&&(SB.length=_,t$(n,u,SB),wB.length=m,t$(t,l,wB))}else{for(s=0;s<o;s++)r++,n[l*o+s]=i[r];r++}}}function ud(e,t){A.defined("type",e);let n=e;n===Number&&(n=e$);let s,i=n.packedLength,o=g(n.packedInterpolationLength,i),r=0;if(c(t)){const a=t.length;s=new Array(a);for(let l=0;l<a;l++){let u=t[l];u===Number&&(u=e$);const d=u.packedLength;i+=d,o+=g(u.packedInterpolationLength,d),s[l]=u}r=a}this._type=e,this._innerType=n,this._interpolationDegree=1,this._interpolationAlgorithm=ZVe,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=i,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new Ye,this._derivativeTypes=t,this._innerDerivativeTypes=s,this._inputOrder=r,this._forwardExtrapolationType=Mb.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=Mb.NONE,this._backwardExtrapolationDuration=0}function i$(e,t,n){const i=e._packedLength;e._times.splice(t,n),e._values.splice(t*i,n*i),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}Object.defineProperties(ud.prototype,{isConstant:{get:function(){return 0===this._values.length}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}}),ud.prototype.getValue=function(e,t){A.defined("time",e);const n=this._times,i=n.length;if(0===i)return;let o;const r=this._innerType,s=this._values;let a=Be(n,e,re.compare);if(a<0){if(a=~a,0===a){if(o=this._backwardExtrapolationDuration,this._backwardExtrapolationType===Mb.NONE||0!==o&&re.secondsDifference(n[a],e)>o)return;if(this._backwardExtrapolationType===Mb.HOLD)return r.unpack(s,0,t)}if(a>=i){if(a=i-1,o=this._forwardExtrapolationDuration,this._forwardExtrapolationType===Mb.NONE||0!==o&&re.secondsDifference(e,n[a])>o)return;if(this._forwardExtrapolationType===Mb.HOLD)return a=i-1,r.unpack(s,a*r.packedLength,t)}const l=this._xTable,u=this._yTable,d=this._interpolationAlgorithm,h=this._packedInterpolationLength,m=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;const v=Math.min(d.getRequiredDataPoints(this._interpolationDegree,m),i);v!==this._numberOfPoints&&(this._numberOfPoints=v,l.length=v,u.length=v*h)}const _=this._numberOfPoints-1;if(_<1)return;let p=0,y=i-1;if(y-p+1>=_+1){let v=a-(_/2|0)-1;v<p&&(v=p);let I=v+_;I>y&&(I=y,v=I-_,v<p&&(v=p)),p=v,y=I}const x=y-p+1;for(let v=0;v<x;++v)l[v]=re.secondsDifference(n[p+v],n[y]);if(c(r.convertPackedArrayForInterpolation))r.convertPackedArrayForInterpolation(s,p,y,u);else{let v=0;const I=this._packedLength;let P=p*I;const N=(y+1)*I;for(;P<N;)u[v]=s[P],P++,v++}const C=re.secondsDifference(e,n[y]);let w;if(0!==m&&c(d.interpolate)){const v=Math.floor(h/(m+1));w=d.interpolate(C,l,u,v,m,m,this._interpolationResult)}else w=d.interpolateOrderZero(C,l,u,h,this._interpolationResult);return c(r.unpackInterpolationResult)?r.unpackInterpolationResult(w,s,p,y,t):r.unpack(w,0,t)}return r.unpack(s,a*this._packedLength,t)},ud.prototype.setInterpolationOptions=function(e){if(!c(e))return;let t=!1;const n=e.interpolationAlgorithm,i=e.interpolationDegree;c(n)&&this._interpolationAlgorithm!==n&&(this._interpolationAlgorithm=n,t=!0),c(i)&&this._interpolationDegree!==i&&(this._interpolationDegree=i,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))},ud.prototype.addSample=function(e,t,n){const i=this._innerDerivativeTypes,o=c(i);A.defined("time",e),A.defined("value",t),o&&A.defined("derivatives",n);const r=this._innerType,s=[];if(s.push(e),r.pack(t,s,s.length),o){const a=i.length;for(let l=0;l<a;l++)i[l].pack(n[l],s,s.length)}QI(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},ud.prototype.addSamples=function(e,t,n){const i=this._innerDerivativeTypes,o=c(i);if(A.defined("times",e),A.defined("values",t),e.length!==t.length)throw new E("times and values must be the same length.");if(o&&(!c(n)||n.length!==e.length))throw new E("times and derivativeValues must be the same length.");const r=this._innerType,s=e.length,a=[];for(let l=0;l<s;l++)if(a.push(e[l]),r.pack(t[l],a,a.length),o){const u=n[l],d=i.length;for(let h=0;h<d;h++)i[h].pack(u[h],a,a.length)}QI(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},ud.prototype.addSamplesPackedArray=function(e,t){A.defined("packedSamples",e),QI(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},ud.prototype.removeSample=function(e){A.defined("time",e);const t=Be(this._times,e,re.compare);return!(t<0||(i$(this,t,1),0))},ud.prototype.removeSamples=function(e){A.defined("timeInterval",e);const t=this._times;let n=Be(t,e.start,re.compare);n<0?n=~n:e.isStartIncluded||++n;let i=Be(t,e.stop,re.compare);i<0?i=~i:e.isStopIncluded&&++i,i$(this,n,i-n)},ud.prototype.equals=function(e){if(this===e)return!0;if(!c(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;const t=this._derivativeTypes,n=c(t),i=e._derivativeTypes;if(n!==c(i))return!1;let r,s;if(n){if(s=t.length,s!==i.length)return!1;for(r=0;r<s;r++)if(t[r]!==i[r])return!1}const a=this._times,l=e._times;if(s=a.length,s!==l.length)return!1;for(r=0;r<s;r++)if(!re.equals(a[r],l[r]))return!1;const u=this._values,d=e._values;for(s=u.length,r=0;r<s;r++)if(u[r]!==d[r])return!1;return!0},ud._mergeNewSamples=QI;const $Ve=ud;function hu(e,t){let n;if((t=g(t,0))>0){n=new Array(t);for(let i=0;i<t;i++)n[i]=f}this._numberOfDerivatives=t,this._property=new $Ve(f,n),this._definitionChanged=new Ye,this._referenceFrame=g(e,ta.FIXED),this._property._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)}Object.defineProperties(hu.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}}),hu.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ta.FIXED,t)},hu.prototype.getValueInReferenceFrame=function(e,t,n){if(A.defined("time",e),A.defined("referenceFrame",t),n=this._property.getValue(e,n),c(n))return h2.convertToReferenceFrame(e,n,this._referenceFrame,t,n)},hu.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)},hu.prototype.addSample=function(e,t,n){const i=this._numberOfDerivatives;if(i>0&&(!c(n)||n.length!==i))throw new E("derivatives length must be equal to the number of derivatives.");this._property.addSample(e,t,n)},hu.prototype.addSamples=function(e,t,n){this._property.addSamples(e,t,n)},hu.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},hu.prototype.removeSample=function(e){return this._property.removeSample(e)},hu.prototype.removeSamples=function(e){this._property.removeSamples(e)},hu.prototype.equals=function(e){return this===e||e instanceof hu&&te.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};const vB=hu;function Tm(e){this._definitionChanged=new Ye,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(Tm.prototype,{isConstant:{get:function(){return te.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return c(this._value)?this._value.referenceFrame:ta.FIXED}}}),Tm.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ta.FIXED,t)},Tm.prototype.setValue=function(e){this._value!==e&&(this._value=e,c(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),c(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},Tm.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new E("time is required.");if(!c(t))throw new E("referenceFrame is required.");if(c(this._value))return n=this._value.getValueInReferenceFrame(e,t,n),c(n)?he.default.scaleToGeodeticSurface(n,n):void 0},Tm.prototype.equals=function(e){return this===e||e instanceof Tm&&this._value===e._value},Tm.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};const IB=Tm;function Mg(){this._definitionChanged=new Ye,this._intervals=new Jc,this._intervals.changedEvent.addEventListener(Mg.prototype._intervalsChanged,this)}Object.defineProperties(Mg.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),Mg.prototype.getValue=function(e,t){if(!c(e))throw new E("time is required");const n=this._intervals.findDataForIntervalContainingDate(e);return c(n)&&"function"==typeof n.clone?n.clone(t):n},Mg.prototype.equals=function(e){return this===e||e instanceof Mg&&this._intervals.equals(e._intervals,te.equals)},Mg.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};const KVe=Mg,o$={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){let t=e.toLowerCase();return t=Ll(t),o$[t]}};let DB;typeof DOMParser<"u"&&(DB=new DOMParser);const QVe=new Dke({stripPrefix:!1,email:!1,replaceFn:function(e){return"scheme"===e.urlMatchType||"www"===e.urlMatchType}}),Am=32,r$=2414016,s$=1,a$=16093e3,c$=.1,l$=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],u$=["http://www.google.com/kml/ext/2.2"],Fe={kml:l$,gx:u$,atom:["http://www.w3.org/2005/Atom"],kmlgx:l$.concat(u$)},PB={Document:C$,Folder:function g4e(e,t,n,i){const o=iD(e,t,n),r=Rt(n);r.parentEntity=o.entity,C$(0,t,r,i)},Placemark:function y4e(e,t,n,i){const o=iD(e,t,n),r=o.entity,s=o.styleEntity;let a=!1;const l=t.childNodes;for(let u=0,d=l.length;u<d&&!a;u++){const h=l.item(u),m=x$[h.localName];c(m)&&(m(e,n.entityCollection,h,r,s,r.id),a=!0)}a||(r.merge(s),nD(e,r,s))},NetworkLink:function v4e(e,t,n,i){const r=iD(e,t,n).entity,s=n.sourceResource,a=n.uriResolver;let l=Di(t,"Link",Fe.kml);if(c(l)||(l=Di(t,"Url",Fe.kml)),c(l)){let d,h,u=Nn(l,"href",Fe.kml);if(c(u)){let m=u;if(u=RB(u,s,n.uriResolver),/^data:/.test(u.getUrlComponent()))/\.kmz/i.test(s.getUrlComponent())||(m=s.getDerivedResource({url:m}));else{if(m=u.clone(),d=Nn(l,"viewRefreshMode",Fe.kml),"onRegion"===d)return void _n("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");h=g(Nn(l,"viewBoundScale",Fe.kml),1);const b="onStop"===d?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",x=g(Nn(l,"viewFormat",Fe.kml),b),C=Nn(l,"httpQuery",Fe.kml);c(x)&&u.setQueryParameters(Ou(oD(x))),c(C)&&u.setQueryParameters(Ou(oD(C))),UB(u,e.camera,e.canvas,h,e._lastCameraView.bbox,e._ellipsoid)}const _={sourceUri:m,uriResolver:a,context:r.id,screenOverlayContainer:n.screenOverlayContainer},p=new Sb,y=VB(e,p,u,_).then(function(b){const x=e._entityCollection,C=p.values;x.suspendEvents();for(let I=0;I<C.length;I++){const P=C[I];c(P.parent)||(P.parent=r,HB(P)),x.add(P)}x.resumeEvents();const w=Nn(l,"refreshMode",Fe.kml);let v=g(oi(l,"refreshInterval",Fe.kml),0);if("onInterval"===w&&v>0||"onExpire"===w||"onStop"===d){const I=Di(b,"NetworkLinkControl",Fe.kml),P=c(I),N=re.now(),R={id:kr(),href:u,cookie:{},lastUpdated:N,updating:!1,entity:r,viewBoundScale:h,needsUpdate:!1,cameraUpdateTime:N};let B=0;if(P&&(R.cookie=Ou(g(Nn(I,"cookie",Fe.kml),"")),B=g(oi(I,"minRefreshPeriod",Fe.kml),0)),"onInterval"===w)P&&(v=Math.max(B,v)),R.refreshMode=Cm.INTERVAL,R.time=v;else if("onExpire"===w){let F;if(P&&(F=Nn(I,"expires",Fe.kml)),c(F))try{const S=re.fromIso8601(F),D=re.secondsDifference(S,N);D>0&&D<B&&re.addSeconds(N,B,S),R.refreshMode=Cm.EXPIRE,R.time=S}catch{_n("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else _n("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else c(e.camera)?(R.refreshMode=Cm.STOP,R.time=g(oi(l,"viewRefreshTime",Fe.kml),0)):_n("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires the `camera` property to be defined.");c(R.refreshMode)&&e._networkLinks.set(R.id,R)}}).catch(function(b){_n(`An error occured during loading ${u.url}`),e._error.raiseEvent(e,b)});i.addPromise(y)}}},GroundOverlay:function E4e(e,t,n,i){const r=iD(e,t,n).entity;let s,a=!1;const l=e._ellipsoid,u=eD(Di(t,"LatLonQuad",Fe.gx),l),d=oi(t,"drawOrder",Fe.kml);if(c(u))s=NB(),s.hierarchy=new G_(u),s.zIndex=d,r.polygon=s,a=!0;else{s=new aY,s.zIndex=d,r.rectangle=s;const p=Di(t,"LatLonBox",Fe.kml);if(c(p)){let y=oi(p,"west",Fe.kml),b=oi(p,"south",Fe.kml),x=oi(p,"east",Fe.kml),C=oi(p,"north",Fe.kml);c(y)&&(y=O.negativePiToPi(O.toRadians(y))),c(b)&&(b=O.clampToLatitudeRange(O.toRadians(b))),c(x)&&(x=O.negativePiToPi(O.toRadians(x))),c(C)&&(C=O.clampToLatitudeRange(O.toRadians(C))),s.coordinates=new Te(y,b,x,C);const w=oi(p,"rotation",Fe.kml);if(c(w)){const v=O.toRadians(w);s.rotation=v,s.stRotation=v}}}const h=Di(t,"Icon",Fe.kml),m=MB(h,e,n.sourceResource,n.uriResolver,!0);if(c(m)){a&&_n("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");const p=oi(h,"x",Fe.gx),y=oi(h,"y",Fe.gx),b=oi(h,"w",Fe.gx),x=oi(h,"h",Fe.gx);(c(p)||c(y)||c(b)||c(x))&&_n("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),s.material=m,s.material.color=Fg(t,"color",Fe.kml),s.material.transparent=!0}else s.material=Fg(t,"color",Fe.kml);let _=Nn(t,"altitudeMode",Fe.kml);c(_)?"absolute"===_?(s.height=oi(t,"altitude",Fe.kml),s.zIndex=void 0):"clampToGround"!==_&&_n("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${_}`):(_=Nn(t,"altitudeMode",Fe.gx),"relativeToSeaFloor"===_?(_n("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),s.height=oi(t,"altitude",Fe.kml),s.zIndex=void 0):"clampToSeaFloor"===_?_n("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):c(_)&&_n("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${_}`))},PhotoOverlay:S$,ScreenOverlay:function C4e(e,t,n,i){const o=n.screenOverlayContainer;if(!c(o))return;const r=n.sourceResource,s=n.uriResolver,l=MB(Di(t,"Icon",Fe.kml),e,r,s,!1);if(!c(l))return;const u=document.createElement("img");e._screenOverlays.push(u),u.src=l.url,u.onload=function(){const d=["position: absolute"],h=Di(t,"screenXY",Fe.kml),m=Di(t,"overlayXY",Fe.kml),_=Di(t,"size",Fe.kml);let p,y,b,x,C,w;c(_)&&(p=xm(_,"x"),y=xm(_,"y"),b=cs(_,"xunits"),x=cs(_,"yunits"),c(p)&&-1!==p&&0!==p&&("fraction"===b?C=`width: ${Math.floor(100*p)}%`:"pixels"===b&&(C=`width: ${p}px`),d.push(C)),c(y)&&-1!==y&&0!==y&&("fraction"===x?w=`height: ${Math.floor(100*y)}%`:"pixels"===x&&(w=`height: ${y}px`),d.push(w))),u.style=d.join(";");let v=0,I=u.height;c(m)&&(p=xm(m,"x"),y=xm(m,"y"),b=cs(m,"xunits"),x=cs(m,"yunits"),c(p)&&("fraction"===b?v=p*u.width:("pixels"===b||"insetPixels"===b)&&(v=p)),c(y)&&("fraction"===x?I=y*u.height:("pixels"===x||"insetPixels"===x)&&(I=y))),c(h)&&(p=xm(h,"x"),y=xm(h,"y"),b=cs(h,"xunits"),x=cs(h,"yunits"),c(p)&&("fraction"===b?C=`left: calc(${Math.floor(100*p)}% - ${v}px)`:"pixels"===b?C=`left: ${p-v}px`:"insetPixels"===b&&(C=`right: ${p-v}px`),d.push(C)),c(y)&&("fraction"===x?w=`bottom: calc(${Math.floor(100*y)}% - ${I}px)`:"pixels"===x?w=`bottom: ${y-I}px`:"insetPixels"===x&&(w=`top: ${y-I}px`),d.push(w))),u.style=d.join(";")},o.appendChild(u)},Tour:function T4e(e,t,n,i){const o=Nn(t,"name",Fe.kml),r=cs(t,"id"),s=new BVe(o,r),a=Di(t,"Playlist",Fe.gx);if(a){const l=e._ellipsoid,u=a.childNodes;for(let d=0;d<u.length;d++){const h=u[d];if(h.localName){const m=b4e[h.localName];m?m(s,h,l):console.log(`Unknown KML Tour playlist entry type ${h.localName}`)}}}e._kmlTours.push(s)}};function _f(e){this._dataSource=e,this._deferred=fa(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}function d$(e){const t={xsi:"http://www.w3.org/2001/XMLSchema-instance"};let n,i,o,r;for(const s in t)t.hasOwnProperty(s)&&(o=RegExp(`[< ]${s}:`),r=`xmlns:${s}=`,o.test(e)&&-1===e.indexOf(r)&&(c(n)||(n=e.substr(0,e.indexOf("<kml")+4),i=e.substr(n.length)),n+=` ${r}"${t[s]}"`));return c(n)&&(e=n+i),e}function f$(e){let t=e.indexOf("xmlns:");const n=e.indexOf(">",t);let i,o,r;for(;-1!==t&&t<n;)i=e.slice(t,e.indexOf('"',t)),o=t,t=e.indexOf(i,t+1),-1!==t?(r=e.indexOf('"',e.indexOf('"',t)+1),t=(e=e.slice(0,t-1)+e.slice(r+1,e.length)).indexOf("xmlns:",o-1)):t=e.indexOf("xmlns:",o+1);return e}function OB(e,t){const n=g(o$.detectFromFilename(e.filename),"application/octet-stream");return Promise.resolve(e.getData(new Pze(n))).then(function(i){t[e.filename]=i})}function ml(e,t,n,i){const o=i.keys,r=new Zr("."),s=e.querySelectorAll(t);for(let a=0;a<s.length;a++){const l=s[a],u=l.getAttribute(n);if(c(u)){const h=new Zr(u).absoluteTo(r).toString(),m=o.indexOf(h);if(-1!==m){const _=o[m];l.setAttribute(n,i[_]),"a"===t&&null===l.getAttribute("download")&&l.setAttribute("download",_)}}}}function _l(e,t,n,i){const o=e.querySelectorAll(t);for(let r=0;r<o.length;r++){const s=o[r],l=RB(s.getAttribute(n),i);c(l)&&s.setAttribute(n,l.url)}}function h$(e,t,n){let i=cs(e,"id");i=c(i)&&0!==i.length?i:kr(),c(n)&&(i=n+i);let o=t.getById(i);return c(o)&&(i=kr(),c(n)&&(i=n+i)),o=t.add(new Fc({id:i})),c(o.kml)||(o.addProperty("kml"),o.kml=new O4e),o}function RC(e,t){return"absolute"===e||"relativeToGround"===e||"relativeToSeaFloor"===t}function JI(e,t){if(!c(e))return f.fromDegrees(0,0,0,t);const n=e.match(/[^\s,\n]+/g);if(!c(n))return f.fromDegrees(0,0,0,t);let i=parseFloat(n[0]),o=parseFloat(n[1]),r=parseFloat(n[2]);return i=isNaN(i)?0:i,o=isNaN(o)?0:o,r=isNaN(r)?0:r,f.fromDegrees(i,o,r,t)}function eD(e,t){if(!c(e))return;const n=e.textContent.match(/[^\s\n]+/g);if(!c(n))return;const i=n.length,o=new Array(i);let r=0;for(let s=0;s<i;s++)o[r++]=JI(n[s],t);return o}function xm(e,t){if(!c(e))return;const n=e.getAttribute(t);if(null!==n){const i=parseFloat(n);return isNaN(i)?void 0:i}}function cs(e,t){if(!c(e))return;const n=e.getAttribute(t);return null!==n?n:void 0}function Di(e,t,n){if(!c(e))return;const i=e.childNodes,o=i.length;for(let r=0;r<o;r++){const s=i[r];if(s.localName===t&&-1!==n.indexOf(s.namespaceURI))return s}}function p$(e,t,n){if(!c(e))return;const i=[],o=e.getElementsByTagNameNS("*",t),r=o.length;for(let s=0;s<r;s++){const a=o[s];a.localName===t&&-1!==n.indexOf(a.namespaceURI)&&i.push(a)}return i}function dd(e,t,n){if(!c(e))return[];const i=[],o=e.childNodes,r=o.length;for(let s=0;s<r;s++){const a=o[s];a.localName===t&&-1!==n.indexOf(a.namespaceURI)&&i.push(a)}return i}function oi(e,t,n){const i=Di(e,t,n);if(c(i)){const o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function Nn(e,t,n){const i=Di(e,t,n);if(c(i))return i.textContent.trim()}function fd(e,t,n){const i=Di(e,t,n);if(c(i)){const o=i.textContent.trim();return"1"===o||/^true$/i.test(o)}}function RB(e,t,n){if(!c(e))return;let i;if(c(n)){let o=n[e=e.replace(/\\/g,"/")];if(c(o))i=new zt({url:o});else{const r=new Zr(t.getUrlComponent());o=n[new Zr(e).absoluteTo(r)],c(o)&&(i=new zt({url:o}))}}return c(i)||(i=t.getDerivedResource({url:e})),i}Object.defineProperties(_f.prototype,{dataSource:{get:function(){return this._dataSource}}}),_f.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0},_f.prototype.addPromise=function(e){this._promises.push(e)},_f.prototype.wait=function(){const e=this._deferred;return this._used||e.resolve(),Promise.all([e.promise,Promise.all(this._promises)])},_f.prototype.process=function(){const e=1===this._stack.length;return e&&(this._started=gl._getTimestamp()),this._process(e)},_f.prototype._giveUpTime=function(){if(this._timeoutSet)return;this._timeoutSet=!0,this._timeThreshold=50;const e=this;setTimeout(function(){e._timeoutSet=!1,e._started=gl._getTimestamp(),e._process(!0)},0)},_f.prototype._nextNode=function(){const e=this._stack,t=e[e.length-1],n=t.index,i=t.nodes;if(n!==i.length)return++t.index,i[n]},_f.prototype._pop=function(){const e=this._stack;return e.pop(),0!==e.length||(this._deferred.resolve(),!1)},_f.prototype._process=function(e){const t=this.dataSource,n=this._stack[this._stack.length-1].processingData;let i=this._nextNode();for(;c(i);){const o=PB[i.localName];if(c(o)&&(-1!==Fe.kml.indexOf(i.namespaceURI)||-1!==Fe.gx.indexOf(i.namespaceURI))&&(o(t,i,n,this),this._timeoutSet||gl._getTimestamp()>this._started+this._timeThreshold))return void this._giveUpTime();i=this._nextNode()}this._pop()&&e&&this._process(!0)};const Hc={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function LB(e,t){if(!c(e)||/^\s*$/gm.test(e))return;"#"===e[0]&&(e=e.substring(1));const n=parseInt(e.substring(0,2),16)/255,i=parseInt(e.substring(2,4),16)/255,o=parseInt(e.substring(4,6),16)/255,r=parseInt(e.substring(6,8),16)/255;return t?(r>0?(Hc.maximumRed=r,Hc.red=void 0):(Hc.maximumRed=void 0,Hc.red=0),o>0?(Hc.maximumGreen=o,Hc.green=void 0):(Hc.maximumGreen=void 0,Hc.green=0),i>0?(Hc.maximumBlue=i,Hc.blue=void 0):(Hc.maximumBlue=void 0,Hc.blue=0),Hc.alpha=n,Z.fromRandom(Hc)):new Z(r,o,i,n)}function Fg(e,t,n){const i=Nn(e,t,n);if(c(i))return LB(i,"random"===Nn(e,"colorMode",n))}function m$(){const e=new u2;return e.width=Am,e.height=Am,e.scaleByDistance=new Bn(r$,s$,a$,c$),e.pixelOffsetScaleByDistance=new Bn(r$,s$,a$,c$),e}function NB(){const e=new j2;return e.outline=!0,e.outlineColor=Z.WHITE,e}function _$(){const e=new oY;return e.translucencyByDistance=new Bn(3e6,1,5e6,0),e.pixelOffset=new V(17,0),e.horizontalOrigin=Da.LEFT,e.font="16px sans-serif",e.style=Ql.FILL_AND_OUTLINE,e}function MB(e,t,n,i,o){let r=Nn(e,"href",Fe.kml);if(!c(r)||0===r.length)return;if(0===r.indexOf("root://icons/palette-")){const a=r.charAt(21);let l=g(oi(e,"x",Fe.gx),0),u=g(oi(e,"y",Fe.gx),0);l=Math.min(l/32,7),u=7-Math.min(u/32,7),r=`https://maps.google.com/mapfiles/kml/pal${a}/icon${8*u+l}.png`}const s=RB(r,n,i);if(o){const a=Nn(e,"refreshMode",Fe.kml),l=Nn(e,"viewRefreshMode",Fe.kml);"onInterval"===a||"onExpire"===a?_n(`kml-refreshMode-${a}`,`KML - Unsupported Icon refreshMode: ${a}`):("onStop"===l||"onRegion"===l)&&_n(`kml-refreshMode-${l}`,`KML - Unsupported Icon viewRefreshMode: ${l}`);const u=g(Nn(e,"viewBoundScale",Fe.kml),1),d="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",h=g(Nn(e,"viewFormat",Fe.kml),d),m=Nn(e,"httpQuery",Fe.kml);return c(h)&&s.setQueryParameters(Ou(oD(h))),c(m)&&s.setQueryParameters(Ou(oD(m))),UB(s,t.camera,t.canvas,u,t._lastCameraView.bbox,t._ellipsoid),s}return s}function o4e(e,t,n,i,o){let r=oi(t,"scale",Fe.kml);const s=oi(t,"heading",Fe.kml),a=Fg(t,"color",Fe.kml),l=Di(t,"Icon",Fe.kml);let u=MB(l,e,i,o,!1);c(l)&&!c(u)&&(u=!1);const d=oi(l,"x",Fe.gx),h=oi(l,"y",Fe.gx),m=oi(l,"w",Fe.gx),_=oi(l,"h",Fe.gx),p=Di(t,"hotSpot",Fe.kml),y=xm(p,"x"),b=xm(p,"y"),x=cs(p,"xunits"),C=cs(p,"yunits");let v,I,w=n.billboard;c(w)||(w=m$(),n.billboard=w),w.image=u,w.scale=r,w.color=a,(c(d)||c(h)||c(m)||c(_))&&(w.imageSubRegion=new Vt(d,h,m,_)),c(s)&&0!==s&&(w.rotation=O.toRadians(-s),w.alignedAxis=f.UNIT_Z),r=g(r,1),c(y)&&("pixels"===x?v=-y*r:"insetPixels"===x?v=(y-Am)*r:"fraction"===x&&(v=-y*Am*r),v+=.5*Am*r),c(b)&&("pixels"===C?I=b*r:"insetPixels"===C?I=(-b+Am)*r:"fraction"===C&&(I=b*Am*r),I-=.5*Am*r),(c(v)||c(I))&&(w.pixelOffset=new V(v,I))}function tD(e,t,n,i,o){for(let r=0,s=t.childNodes.length;r<s;r++){const a=t.childNodes.item(r);if("IconStyle"===a.localName)o4e(e,a,n,i,o);else if("LabelStyle"===a.localName){let l=n.label;c(l)||(l=_$(),n.label=l),l.scale=g(oi(a,"scale",Fe.kml),l.scale),l.fillColor=g(Fg(a,"color",Fe.kml),l.fillColor),l.text=n.name}else if("LineStyle"===a.localName){let l=n.polyline;c(l)||(l=new wb,n.polyline=l),l.width=oi(a,"width",Fe.kml),l.material=Fg(a,"color",Fe.kml),c(Fg(a,"outerColor",Fe.gx))&&_n("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),c(oi(a,"outerWidth",Fe.gx))&&_n("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),c(oi(a,"physicalWidth",Fe.gx))&&_n("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),c(fd(a,"labelVisibility",Fe.gx))&&_n("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if("PolyStyle"===a.localName){let l=n.polygon;c(l)||(l=NB(),n.polygon=l),l.material=g(Fg(a,"color",Fe.kml),l.material),l.fill=g(fd(a,"fill",Fe.kml),l.fill),l.outline=g(fd(a,"outline",Fe.kml),l.outline)}else if("BalloonStyle"===a.localName){const l=g(LB(Nn(a,"bgColor",Fe.kml)),Z.WHITE),u=g(LB(Nn(a,"textColor",Fe.kml)),Z.BLACK),d=Nn(a,"text",Fe.kml);n.addProperty("balloonStyle"),n.balloonStyle={bgColor:l,textColor:u,text:d}}else if("ListStyle"===a.localName){const l=Nn(a,"listItemType",Fe.kml);("radioFolder"===l||"checkOffOnly"===l)&&_n(`kml-listStyle-${l}`,`KML - Unsupported ListStyle with listItemType: ${l}`)}}}function s4e(e,t,n){return t.fetchXML().then(function(i){return g$(e,i,n,t,!0)})}function g$(e,t,n,i,o,r){let s,a,l,u;const d=p$(t,"Style",Fe.kml);if(c(d)){const y=d.length;for(s=0;s<y;s++)u=d[s],a=cs(u,"id"),c(a)&&(a=`#${a}`,o&&c(i)&&(a=i.getUrlComponent()+a),c(n.getById(a))||(l=new Fc({id:a}),n.add(l),tD(e,u,l,i,r)))}const h=p$(t,"StyleMap",Fe.kml);if(c(h)){const y=h.length;for(s=0;s<y;s++){const b=h[s];if(a=cs(b,"id"),c(a)){const x=dd(b,"Pair",Fe.kml);for(let C=0;C<x.length;C++){const w=x[C],v=Nn(w,"key",Fe.kml);if("normal"===v){if(a=`#${a}`,o&&c(i)&&(a=i.getUrlComponent()+a),!c(n.getById(a))){l=n.getOrCreateEntity(a);let I=Nn(w,"styleUrl",Fe.kml);if(c(I)){"#"!==I[0]&&(I=`#${I}`),o&&c(i)&&(I=i.getUrlComponent()+I);const P=n.getById(I);c(P)&&l.merge(P)}else u=Di(w,"Style",Fe.kml),tD(e,u,l,i,r)}}else _n(`kml-styleMap-${v}`,`KML - Unsupported StyleMap key: ${v}`)}}}}const m=[],_=t.getElementsByTagName("styleUrl"),p=_.length;for(s=0;s<p;s++){const y=_[s].textContent;if("#"!==y[0]){const b=y.split("#");if(2===b.length){const C=i.getDerivedResource({url:b[0]});m.push(s4e(e,C,n))}}}return m}function FB(e,t,n){const i=new JZ(e,t.id,["position"]),o=new IB(t.position);t.polyline=c(n.polyline)?n.polyline.clone():new wb,t.polyline.positions=new XVe([i,o])}function y$(e,t){return!c(e)&&!c(t)||"clampToGround"===e?tn.CLAMP_TO_GROUND:"relativeToGround"===e?tn.RELATIVE_TO_GROUND:"absolute"===e?tn.NONE:"clampToSeaFloor"===t?(_n("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),tn.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(_n("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),tn.RELATIVE_TO_GROUND):(c(e)?_n("kml-altitudeMode-unknown",`KML - Unknown <kml:altitudeMode>:${e}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`):_n("kml-gx:altitudeMode-unknown",`KML - Unknown <gx:altitudeMode>:${t}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`),tn.CLAMP_TO_GROUND)}function a4e(e,t,n){return"relativeToSeaFloor"===n||"absolute"===t||"relativeToGround"===t?e:((c(t)&&"clampToGround"!==t||c(n)&&"clampToSeaFloor"!==n)&&_n("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g(t,n)}`),new IB(e))}function nD(e,t,n,i){let o=t.label;c(o)||(o=c(n.label)?n.label.clone():_$(),t.label=o),o.text=t.name;let r=t.billboard;c(r)||(r=c(n.billboard)?n.billboard.clone():m$(),t.billboard=r),c(r.image)?r.image.getValue()||(r.image=void 0):r.image=e._pinBuilder.fromColor(Z.YELLOW,64);let s=1;c(r.scale)&&(s=r.scale.getValue(),0!==s?o.pixelOffset=new V(16*s+1,0):(o.pixelOffset=void 0,o.horizontalOrigin=void 0)),c(i)&&e._clampToGround&&(r.heightReference=i,o.heightReference=i)}function b$(e,t){let n=e.path;c(n)||(n=new sY,n.leadTime=0,e.path=n);const i=t.polyline;c(i)&&(n.material=i.material,n.width=i.width)}function T$(e,t,n,i,o){const r=Di(n,"coordinates",Fe.kml),s=Nn(n,"altitudeMode",Fe.kml),a=Nn(n,"altitudeMode",Fe.gx),l=fd(n,"extrude",Fe.kml),u=fd(n,"tessellate",Fe.kml),d=RC(s,a),h=oi(n,"drawOrder",Fe.gx),m=e._ellipsoid,_=eD(r,m);let p=o.polyline;if(d&&l){const y=new cY;i.wall=y,y.positions=_;const b=o.polygon;c(b)&&(y.fill=b.fill,y.material=b.material),y.outline=!0,c(p)?(y.outlineColor=c(p.material)?p.material.color:Z.WHITE,y.outlineWidth=p.width):c(b)&&(y.outlineColor=c(b.material)?b.material.color:Z.WHITE)}else if(e._clampToGround&&!d&&u){const y=new wb;y.clampToGround=!0,i.polyline=y,y.positions=_,c(p)?(y.material=c(p.material)?p.material.color.getValue(It.MINIMUM_VALUE):Z.WHITE,y.width=g(p.width,1)):(y.material=Z.WHITE,y.width=1),y.zIndex=h}else c(h)&&_n("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!u&&_n("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),p=c(p)?p.clone():new wb,i.polyline=p,p.positions=function c4e(e,t,n,i){if(!c(e))return;if("relativeToSeaFloor"===n||"absolute"===t||"relativeToGround"===t)return e;(c(t)&&"clampToGround"!==t||c(n)&&"clampToSeaFloor"!==n)&&_n("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g(t,n)}`);const o=e.length;for(let r=0;r<o;r++){const s=e[r];i.scaleToGeodeticSurface(s,s)}return e}(_,s,a,m),(!u||d)&&(p.arcType=ni.NONE);return!0}function A$(e,t,n,i,o,r,s,a,l){const u=e[0],d=e[e.length-1],h=new vB;h.addSamples(e,t),n.intervals.addInterval(new _i({start:u,stop:d,isStartIncluded:l,isStopIncluded:l,data:a4e(h,s,a)})),i.addInterval(new _i({start:u,stop:d,isStartIncluded:l,isStopIncluded:l})),o.intervals.addInterval(new _i({start:u,stop:d,isStartIncluded:l,isStopIncluded:l,data:r}))}const x$={Point:function l4e(e,t,n,i,o){const r=Nn(n,"coordinates",Fe.kml),s=Nn(n,"altitudeMode",Fe.kml),a=Nn(n,"altitudeMode",Fe.gx),l=fd(n,"extrude",Fe.kml),d=JI(r,e._ellipsoid);return i.position=d,nD(e,i,o,y$(s,a)),l&&RC(s,a)&&FB(t,i,o),!0},LineString:T$,LinearRing:T$,Polygon:function u4e(e,t,n,i,o){const r=Di(n,"outerBoundaryIs",Fe.kml);let s=Di(r,"LinearRing",Fe.kml),a=Di(s,"coordinates",Fe.kml);const l=e._ellipsoid;let u=eD(a,l);const d=fd(n,"extrude",Fe.kml),_=RC(Nn(n,"altitudeMode",Fe.kml),Nn(n,"altitudeMode",Fe.gx)),p=c(o.polygon)?o.polygon.clone():NB(),y=o.polyline;if(c(y)&&(p.outlineColor=c(y.material)?y.material.color:Z.WHITE,p.outlineWidth=y.width),i.polygon=p,_?(p.perPositionHeight=!0,p.extrudedHeight=d?0:void 0):e._clampToGround||(p.height=0),c(u)){const b=new G_(u),x=dd(n,"innerBoundaryIs",Fe.kml);for(let C=0;C<x.length;C++){s=dd(x[C],"LinearRing",Fe.kml);for(let w=0;w<s.length;w++)a=Di(s[w],"coordinates",Fe.kml),u=eD(a,l),c(u)&&b.holes.push(new G_(u))}p.hierarchy=b}return!0},Track:function d4e(e,t,n,i,o){const r=Nn(n,"altitudeMode",Fe.kml),s=Nn(n,"altitudeMode",Fe.gx),a=dd(n,"coord",Fe.gx),l=dd(n,"angles",Fe.gx),u=dd(n,"when",Fe.kml),d=fd(n,"extrude",Fe.kml),h=RC(r,s),m=e._ellipsoid;l.length>0&&_n("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");const _=Math.min(a.length,u.length),p=[],y=[];for(let x=0;x<_;x++){const C=JI(a[x].textContent,m);p.push(C),y.push(re.fromIso8601(u[x].textContent))}const b=new vB;return b.addSamples(y,p),i.position=b,nD(e,i,o,y$(r,s)),b$(i,o),i.availability=new Jc,u.length>0&&i.availability.addInterval(new _i({start:y[0],stop:y[y.length-1]})),h&&d&&FB(t,i,o),!0},MultiTrack:function f4e(e,t,n,i,o){const r=fd(n,"interpolate",Fe.gx),s=dd(n,"Track",Fe.gx);let a,l,u,d=!1;const h=new KVe,m=new Jc,_=new XZ,p=e._ellipsoid;for(let y=0,b=s.length;y<b;y++){const x=s[y],C=dd(x,"when",Fe.kml),w=dd(x,"coord",Fe.gx),v=Nn(x,"altitudeMode",Fe.kml),I=Nn(x,"altitudeMode",Fe.gx),P=RC(v,I),N=fd(x,"extrude",Fe.kml),R=Math.min(w.length,C.length),B=[];a=[];for(let F=0;F<R;F++){const S=JI(w[F].textContent,p);B.push(S),a.push(re.fromIso8601(C[F].textContent))}r&&(c(l)&&A$([l,a[0]],[u,B[0]],_,m,h,!1,"absolute",void 0,!1),l=a[R-1],u=B[B.length-1]),A$(a,B,_,m,h,P&&N,v,I,!0),d=d||P&&N}return i.availability=m,i.position=_,nD(e,i,o),b$(i,o),d&&(FB(t,i,o),i.polyline.show=h),!0},MultiGeometry:function h4e(e,t,n,i,o,r){const s=n.childNodes;let a=!1;for(let l=0,u=s.length;l<u;l++){const d=s.item(l),h=x$[d.localName];if(c(h)){const m=h$(d,t,r);m.parent=i,m.name=i.name,m.availability=i.availability,m.description=i.description,m.kml=i.kml,h(e,t,d,m,o)&&(a=!0)}}return a},Model:function p4e(e,t,n,i,o){return _n("kml-unsupportedGeometry",`KML - Unsupported geometry: ${n.localName}`),!1}};let io;function iD(e,t,n){const o=n.parentEntity,r=n.sourceResource,s=n.uriResolver,a=h$(t,n.entityCollection,n.context),l=a.kml,u=function r4e(e,t,n,i,o){const r=new Fc;let s,a=-1;const l=t.childNodes,u=l.length;for(let h=0;h<u;h++){const m=l[h];("Style"===m.localName||"StyleMap"===m.localName)&&(a=h)}if(-1!==a){const h=l[a];if("Style"===h.localName)tD(e,h,r,i,o);else{const m=dd(h,"Pair",Fe.kml);for(let _=0;_<m.length;_++){const p=m[_],y=Nn(p,"key",Fe.kml);if("normal"===y){const b=Nn(p,"styleUrl",Fe.kml);c(b)?(s=n.getById(b),c(s)||(s=n.getById(`#${b}`)),c(s)&&r.merge(s)):tD(e,Di(p,"Style",Fe.kml),r,i,o)}else _n(`kml-styleMap-${y}`,`KML - Unsupported StyleMap key: ${y}`)}}}const d=Nn(t,"styleUrl",Fe.kml);if(c(d)){let h=d;if("#"!==d[0]&&-1!==d.indexOf("#")){const m=d.split("#");h=`${i.getDerivedResource({url:m[0]}).getUrlComponent()}#${m[1]}`}s=n.getById(h),c(s)||(s=n.getById(`#${h}`)),c(s)&&r.merge(s)}return r}(e,t,n.styleCollection,r,s),d=Nn(t,"name",Fe.kml);a.name=d,a.parent=o;let h=function i4e(e){const t=Di(e,"TimeSpan",Fe.kmlgx);if(!c(t))return;let n;const i=Di(t,"begin",Fe.kmlgx);let o=c(i)?re.fromIso8601(i.textContent):void 0;const r=Di(t,"end",Fe.kmlgx);let s=c(r)?re.fromIso8601(r.textContent):void 0;if(c(o)&&c(s)){if(re.lessThan(s,o)){const a=o;o=s,s=a}n=new Jc,n.addInterval(new _i({start:o,stop:s}))}else c(o)?(n=new Jc,n.addInterval(new _i({start:o,stop:It.MAXIMUM_VALUE}))):c(s)&&(n=new Jc,n.addInterval(new _i({start:It.MINIMUM_VALUE,stop:s})));return n}(t);c(h)||(h=function n4e(e){const t=Di(e,"TimeStamp",Fe.kmlgx),n=Nn(t,"when",Fe.kmlgx);if(!c(t)||!c(n)||0===n.length)return;const i=re.fromIso8601(n),o=new Jc;return o.addInterval(new _i({start:i,stop:It.MAXIMUM_VALUE})),o}(t)),a.availability=h,HB(a);const _=fd(t,"visibility",Fe.kml);a.show=function m(w){return!w||w.show&&m(w.parent)}(o)&&g(_,!0);const p=Di(t,"author",Fe.atom),y=l.author;y.name=Nn(p,"name",Fe.atom),y.uri=Nn(p,"uri",Fe.atom),y.email=Nn(p,"email",Fe.atom);const b=Di(t,"link",Fe.atom),x=l.link;x.href=cs(b,"href"),x.hreflang=cs(b,"hreflang"),x.rel=cs(b,"rel"),x.type=cs(b,"type"),x.title=cs(b,"title"),x.length=cs(b,"length"),l.address=Nn(t,"address",Fe.kml),l.phoneNumber=Nn(t,"phoneNumber",Fe.kml),l.snippet=Nn(t,"Snippet",Fe.kml),function m4e(e,t){const n=Di(e,"ExtendedData",Fe.kml);if(!c(n))return;c(Di(n,"SchemaData",Fe.kml))&&_n("kml-schemaData","KML - SchemaData is unsupported"),c(cs(n,"xmlns:prefix"))&&_n("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");const i={},o=dd(n,"Data",Fe.kml);if(c(o)){const r=o.length;for(let s=0;s<r;s++){const a=o[s],l=cs(a,"name");c(l)&&(i[l]={displayName:Nn(a,"displayName",Fe.kml),value:Nn(a,"value",Fe.kml)})}}t.kml.extendedData=i}(t,a),function _4e(e,t,n,i,o){let r,s,a;const l=t.kml,u=l.extendedData,d=Nn(e,"description",Fe.kml),h=g(t.balloonStyle,n.balloonStyle);let y,m=Z.WHITE,_=Z.BLACK,p=d;if(c(h)&&(m=g(h.bgColor,Z.WHITE),_=g(h.textColor,Z.BLACK),p=g(h.text,d)),c(p)){if(p=p.replace("$[name]",g(t.name,"")),p=p.replace("$[description]",g(d,"")),p=p.replace("$[address]",g(l.address,"")),p=p.replace("$[Snippet]",g(l.snippet,"")),p=p.replace("$[id]",t.id),p=p.replace("$[geDirections]",""),c(u)){const C=p.match(/\$\[.+?\]/g);if(null!==C)for(r=0;r<C.length;r++){const w=C[r];let v=w.substr(2,w.length-3);const I=/\/displayName$/.test(v);v=v.replace(/\/displayName$/,""),y=u[v],c(y)&&(y=I?y.displayName:y.value),c(y)&&(p=p.replace(w,g(y,"")))}}}else if(c(u)&&(a=Object.keys(u),a.length>0)){for(p='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',r=0;r<a.length;r++)s=a[r],y=u[s],p+=`<tr><th>${g(y.displayName,s)}</th><td>${g(y.value,"")}</td></tr>`;p+="</tbody></table>"}if(!c(p))return;p=QVe.link(p),io.innerHTML=p;const b=io.querySelectorAll("a");for(r=0;r<b.length;r++)b[r].setAttribute("target","_blank");c(i)&&i.keys.length>1&&(ml(io,"a","href",i),ml(io,"link","href",i),ml(io,"area","href",i),ml(io,"img","src",i),ml(io,"iframe","src",i),ml(io,"video","src",i),ml(io,"audio","src",i),ml(io,"source","src",i),ml(io,"track","src",i),ml(io,"input","src",i),ml(io,"embed","src",i),ml(io,"script","src",i),ml(io,"video","poster",i)),_l(io,"a","href",o),_l(io,"link","href",o),_l(io,"area","href",o),_l(io,"img","src",o),_l(io,"iframe","src",o),_l(io,"video","src",o),_l(io,"audio","src",o),_l(io,"source","src",o),_l(io,"track","src",o),_l(io,"input","src",o),_l(io,"embed","src",o),_l(io,"script","src",o),_l(io,"video","poster",o);let x='<div class="cesium-infoBox-description-lighter" style="';x+="overflow:auto;",x+="word-wrap:break-word;",x+=`background-color:${m.toCssColorString()};`,x+=`color:${_.toCssColorString()};`,x+='">',x+=`${io.innerHTML}</div>`,io.innerHTML="",t.description=x}(t,a,u,s,r);const C=e._ellipsoid;return w$(t,a,C),E$(t,a,C),c(Di(t,"Region",Fe.kml))&&_n("kml-region","KML - Placemark Regions are unsupported"),{entity:a,styleEntity:u}}function C$(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}typeof document<"u"&&(io=document.createElement("div"));const b4e={FlyTo:function x4e(e,t,n){const i=oi(t,"duration",Fe.gx),o=Nn(t,"flyToMode",Fe.gx),r={kml:{}};w$(t,r,n),E$(t,r,n);const a=new qVe(i,o,r.kml.lookAt||r.kml.camera);e.addPlaylistEntry(a)},Wait:function A4e(e,t){const n=oi(t,"duration",Fe.gx);e.addPlaylistEntry(new YVe(n))},SoundCue:BB,AnimatedUpdate:BB,TourControl:BB};function BB(e,t){_n(`KML Tour unsupported node ${t.localName}`)}function E$(e,t,n){const i=Di(e,"Camera",Fe.kml);if(c(i)){const o=g(oi(i,"longitude",Fe.kml),0),r=g(oi(i,"latitude",Fe.kml),0),s=g(oi(i,"altitude",Fe.kml),0),a=g(oi(i,"heading",Fe.kml),0),l=g(oi(i,"tilt",Fe.kml),0),u=g(oi(i,"roll",Fe.kml),0),d=f.fromDegrees(o,r,s,n),h=Wy.fromDegrees(a,l-90,u);t.kml.camera=new LVe(d,h)}}function w$(e,t,n){const i=Di(e,"LookAt",Fe.kml);if(c(i)){const o=g(oi(i,"longitude",Fe.kml),0),r=g(oi(i,"latitude",Fe.kml),0),s=g(oi(i,"altitude",Fe.kml),0);let a=oi(i,"heading",Fe.kml),l=oi(i,"tilt",Fe.kml);const u=g(oi(i,"range",Fe.kml),0);l=O.toRadians(g(l,0)),a=O.toRadians(g(a,0));const d=new gC(a,l-O.PI_OVER_TWO,u),h=f.fromDegrees(o,r,s,n);t.kml.lookAt=new MVe(h,d)}}function S$(e,t,n,i){e._unsupportedNode.raiseEvent(e,n.parentEntity,t,n.entityCollection,n.styleCollection,n.sourceResource,n.uriResolver),_n(`kml-unsupportedFeature-${t.nodeName}`,`KML - Unsupported feature: ${t.nodeName}`)}const Cm={INTERVAL:0,EXPIRE:1,STOP:2};function oD(e){if(!c(e)||0===e.length)return"";const t=e[0];return("&"===t||"?"===t)&&(e=e.substring(1)),e}const w4e=new Te,Fb=new Ce,kB=new V,S4e=new f;function UB(e,t,n,i,o,r){function s(u){return u<-O.PI_OVER_TWO?-O.PI_OVER_TWO:u>O.PI_OVER_TWO?O.PI_OVER_TWO:u}function a(u){return u>O.PI?u-O.TWO_PI:u<-O.PI?u+O.TWO_PI:u}let l=$s(e.queryParameters);if(l=l.replace(/%5B/g,"[").replace(/%5D/g,"]"),c(t)&&t._mode!==ce.MORPHING){let u,d;if(o=g(o,w4e),c(n)&&(kB.x=.5*n.clientWidth,kB.y=.5*n.clientHeight,u=t.pickEllipsoid(kB,r,S4e)),c(u)?d=r.cartesianToCartographic(u,Fb):(d=Te.center(o,Fb),u=r.cartographicToCartesian(d)),c(i)&&!O.equalsEpsilon(i,1,O.EPSILON9)){const x=o.width*i*.5,C=o.height*i*.5;o=new Te(a(d.longitude-x),s(d.latitude-C),a(d.longitude+x),s(d.latitude+C))}l=l.replace("[bboxWest]",O.toDegrees(o.west).toString()),l=l.replace("[bboxSouth]",O.toDegrees(o.south).toString()),l=l.replace("[bboxEast]",O.toDegrees(o.east).toString()),l=l.replace("[bboxNorth]",O.toDegrees(o.north).toString());const h=O.toDegrees(d.longitude).toString(),m=O.toDegrees(d.latitude).toString();l=l.replace("[lookatLon]",h),l=l.replace("[lookatLat]",m),l=l.replace("[lookatTilt]",O.toDegrees(t.pitch).toString()),l=l.replace("[lookatHeading]",O.toDegrees(t.heading).toString()),l=l.replace("[lookatRange]",f.distance(t.positionWC,u)),l=l.replace("[lookatTerrainLon]",h),l=l.replace("[lookatTerrainLat]",m),l=l.replace("[lookatTerrainAlt]",d.height.toString()),r.cartesianToCartographic(t.positionWC,Fb),l=l.replace("[cameraLon]",O.toDegrees(Fb.longitude).toString()),l=l.replace("[cameraLat]",O.toDegrees(Fb.latitude).toString()),l=l.replace("[cameraAlt]",O.toDegrees(Fb.height).toString());const _=t.frustum,p=_.aspectRatio;let y="",b="";if(c(p)){const x=O.toDegrees(_.fov);p>1?(y=x,b=x/p):(b=x,y=x*p)}l=l.replace("[horizFov]",y.toString()),l=l.replace("[vertFov]",b.toString())}else l=l.replace("[bboxWest]","-180"),l=l.replace("[bboxSouth]","-90"),l=l.replace("[bboxEast]","180"),l=l.replace("[bboxNorth]","90"),l=l.replace("[lookatLon]",""),l=l.replace("[lookatLat]",""),l=l.replace("[lookatRange]",""),l=l.replace("[lookatTilt]",""),l=l.replace("[lookatHeading]",""),l=l.replace("[lookatTerrainLon]",""),l=l.replace("[lookatTerrainLat]",""),l=l.replace("[lookatTerrainAlt]",""),l=l.replace("[cameraLon]",""),l=l.replace("[cameraLat]",""),l=l.replace("[cameraAlt]",""),l=l.replace("[horizFov]",""),l=l.replace("[vertFov]","");c(n)?(l=l.replace("[horizPixels]",n.clientWidth),l=l.replace("[vertPixels]",n.clientHeight)):(l=l.replace("[horizPixels]",""),l=l.replace("[vertPixels]","")),l=l.replace("[terrainEnabled]","1"),l=l.replace("[clientVersion]","1"),l=l.replace("[kmlVersion]","2.2"),l=l.replace("[clientName]","Cesium"),l=l.replace("[language]","English"),e.setQueryParameters(Ou(l))}function zB(e,t,n,i,o,r,s){t.removeAll();const a=n.documentElement;let u=Nn("Document"===a.localName?a:Di(a,"Document",Fe.kml),"name",Fe.kml);c(u)||(u=kq(i.getUrlComponent())),c(e._name)||(e._name=u);const d=new gl._DeferredLoading(e),h=new Sb(e);return Promise.all(g$(e,n,h,i,!1,o)).then(function(){let m=n.documentElement;if("kml"===m.localName){const p=m.childNodes;for(let y=0;y<p.length;y++){const b=p[y];if(c(PB[b.localName])){m=b;break}}}const _={parentEntity:void 0,entityCollection:t,styleCollection:h,sourceResource:i,uriResolver:o,context:s,screenOverlayContainer:r};return t.suspendEvents(),function I4e(e,t,n,i){const o=PB[t.localName];c(o)?o(e,t,n,i):S$(e,t,n)}(e,m,_,d),t.resumeEvents(),d.wait().then(function(){return n.documentElement})})}function VB(e,t,n,i){let o=(i=g(i,g.EMPTY_OBJECT)).sourceUri;const r=i.uriResolver,s=i.context;let a=i.screenOverlayContainer,l=n;if("string"==typeof n||n instanceof zt){l=(n=zt.createIfNeeded(n)).fetchBlob(),o=g(o,n.clone());const u=e._resourceCredits,d=n.credits;if(c(d)){const h=d.length;for(let m=0;m<h;m++)u.push(d[m])}}else o=g(o,zt.DEFAULT.clone());return o=zt.createIfNeeded(o),c(a)&&(a=Rr(a)),Promise.resolve(l).then(function(u){return u instanceof Blob?function JVe(e){const t=e.slice(0,Math.min(4,e.size)),n=fa(),i=new FileReader;return i.addEventListener("load",function(){n.resolve(1347093252===new DataView(i.result).getUint32(0,!1))}),i.addEventListener("error",function(){n.reject(i.error)}),i.readAsArrayBuffer(t),n.promise}(u).then(function(d){return d?function D4e(e,t,n,i,o){const r=Jn("ThirdParty/Workers/z-worker-pako.js");RX({workerScripts:{deflate:[r,"./pako_deflate.min.js"],inflate:[r,"./pako_inflate.min.js"]}});const s=new VZ(new mZ(n));return Promise.resolve(s.getEntries()).then(function(a){const l=[],u={};let d;for(let h=0;h<a.length;h++){const m=a[h];m.directory||(!/\.kml$/i.test(m.filename)||c(d)&&/\//i.test(m.filename)?l.push(OB(m,u)):(c(d)&&l.push(OB(d,u)),d=m))}return c(d)&&l.push(function t4e(e,t){return Promise.resolve(e.getData(new Rze)).then(function(n){n=f$(n=d$(n)),t.kml=DB.parseFromString(n,"application/xml")})}(d,u)),Promise.all(l).then(function(){if(s.close(),!c(u.kml))throw new Pe("KMZ file does not contain a KML document.");return u.keys=Object.keys(u),zB(e,t,u.kml,i,u,o)})})}(e,t,u,o,a):function e4e(e){const t=fa(),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}(u).then(function(h){let m,_;h=f$(h=d$(h));try{m=DB.parseFromString(h,"application/xml")}catch(p){_=p.toString()}if(c(_)||m.body||"parsererror"===m.documentElement.tagName){let p=c(_)?_:m.documentElement.firstChild.nodeValue;throw p||(p=m.body.innerText),new Pe(p)}return zB(e,t,m,o,r,a,s)})}):zB(e,t,u,o,r,a,s)}).catch(function(u){return e._error.raiseEvent(e,u),console.log(u),Promise.reject(u)})}function gl(e){const t=(e=g(e,g.EMPTY_OBJECT)).camera,n=e.canvas;this._changed=new Ye,this._error=new Ye,this._loading=new Ye,this._refresh=new Ye,this._unsupportedNode=new Ye,this._clock=void 0,this._entityCollection=new Sb(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new zq,this._networkLinks=new mn,this._entityCluster=new v2,this.canvas=n,this.camera=t,this._lastCameraView={position:c(t)?f.clone(t.positionWC):void 0,direction:c(t)?f.clone(t.directionWC):void 0,up:c(t)?f.clone(t.upWC):void 0,bbox:c(t)?t.computeViewRectangle():Te.clone(Te.MAX_VALUE)},this._ellipsoid=g(e.ellipsoid,he.default);let i=e.credit;"string"==typeof i&&(i=new Yn(i)),this._credit=i,this._resourceCredits=[],this._kmlTours=[],this._screenOverlays=[]}function HB(e){const t=e.parent;if(c(t)){const n=t.availability;if(c(n)){const i=e.availability;c(i)?i.intersect(n):e.availability=n}}}gl.load=function(e,t){return new gl(t=g(t,g.EMPTY_OBJECT)).load(e,t)},Object.defineProperties(gl.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}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!c(e))throw new E("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}},kmlTours:{get:function(){return this._kmlTours}}}),gl.prototype.load=function(e,t){if(!c(e))throw new E("data is required.");t=g(t,g.EMPTY_OBJECT),bg.setLoading(this,!0);const n=this._name;this._name=void 0,this._clampToGround=g(t.clampToGround,!1);const i=this;return VB(this,this._entityCollection,e,t).then(function(){let o;const r=i._entityCollection.computeAvailability();let s=r.start,a=r.stop;const l=re.equals(s,It.MINIMUM_VALUE),u=re.equals(a,It.MAXIMUM_VALUE);if(!l||!u){let h;l&&(h=new Date,h.setHours(0,0,0,0),s=re.fromDate(h)),u&&(h=new Date,h.setHours(24,0,0,0),a=re.fromDate(h)),o=new OVe,o.startTime=s,o.stopTime=a,o.currentTime=re.clone(s),o.clockRange=lm.LOOP_STOP,o.clockStep=na.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(re.secondsDifference(a,s)/60,1),31556900))}let d=!1;return o!==i._clock&&(i._clock=o,d=!0),n!==i._name&&(d=!0),d&&i._changed.raiseEvent(i),bg.setLoading(i,!1),i}).catch(function(o){return bg.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})},gl.prototype.destroy=function(){for(;this._screenOverlays.length>0;)this._screenOverlays.pop().remove()};const GB=new mn;function O4e(){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}gl.prototype.update=function(e){const t=this._networkLinks;if(0===t.length)return!0;const n=re.now(),i=this;function o(d){const h=d._children,m=h.length;for(let _=0;_<m;++_){const p=h[_];GB.set(p.id,p),o(p)}}GB.removeAll();let r=!1;const s=this._lastCameraView,a=this.camera;c(a)&&!(a.positionWC.equalsEpsilon(s.position,O.EPSILON7)&&a.directionWC.equalsEpsilon(s.direction,O.EPSILON7)&&a.upWC.equalsEpsilon(s.up,O.EPSILON7))&&(s.position=f.clone(a.positionWC),s.direction=f.clone(a.directionWC),s.up=f.clone(a.upWC),s.bbox=a.computeViewRectangle(),r=!0);const l=new mn;let u=!1;return t.values.forEach(function(d){const h=d.entity;if(!GB.contains(h.id)){if(!d.updating){let m=!1;if(d.refreshMode===Cm.INTERVAL?re.secondsDifference(n,d.lastUpdated)>d.time&&(m=!0):d.refreshMode===Cm.EXPIRE?re.greaterThan(n,d.time)&&(m=!0):d.refreshMode===Cm.STOP&&(r&&(d.needsUpdate=!0,d.cameraUpdateTime=n),d.needsUpdate&&re.secondsDifference(n,d.cameraUpdateTime)>=d.time&&(m=!0)),m){o(h),d.updating=!0;const _=new Sb,p=d.href.clone();p.setQueryParameters(d.cookie);const y=g(i._ellipsoid,he.default);UB(p,i.camera,i.canvas,d.viewBoundScale,s.bbox,y),VB(i,_,p,{context:h.id}).then(function P4e(e,t,n,i,o){return function(r){if(!i.contains(t.id))return;let s=!1;const a=Di(r,"NetworkLinkControl",Fe.kml);let u=0;if(c(a)){if(c(Di(a,"Update",Fe.kml)))return _n("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,void i.remove(t.id);t.cookie=Ou(g(Nn(a,"cookie",Fe.kml),"")),u=g(oi(a,"minRefreshPeriod",Fe.kml),0)}const d=re.now(),h=t.refreshMode;if(h===Cm.INTERVAL)c(a)&&(t.time=Math.max(u,t.time));else if(h===Cm.EXPIRE){let N;if(c(a)&&(N=Nn(a,"expires",Fe.kml)),c(N))try{const R=re.fromIso8601(N),B=re.secondsDifference(R,d);B>0&&B<u&&re.addSeconds(d,u,R),t.time=R}catch{_n("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),s=!0}else _n("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),s=!0}const m=t.entity,_=e._entityCollection,p=n.values;function y(N){_.remove(N);const R=N._children,B=R.length;for(let F=0;F<B;++F)y(R[F])}_.suspendEvents();const b=_.values.slice();let x;for(x=0;x<b.length;++x){const N=b[x];N.parent===m&&(N.parent=void 0,y(N))}for(_.resumeEvents(),_.suspendEvents(),x=0;x<p.length;x++){const N=p[x];c(N.parent)||(N.parent=m,HB(N)),_.add(N)}_.resumeEvents(),s?i.remove(t.id):t.lastUpdated=d;const C=_.computeAvailability(),w=C.start,v=C.stop,I=re.equals(w,It.MINIMUM_VALUE),P=re.equals(v,It.MAXIMUM_VALUE);if(!I||!P){const N=e._clock;(N.startTime!==w||N.stopTime!==v)&&(N.startTime=w,N.stopTime=v,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,o.getUrlComponent(!0))}}(i,d,_,l,p)).catch(function(b){const x=`NetworkLink ${d.href} refresh failed: ${b}`;console.log(x),i._error.raiseEvent(i,x)}),u=!0}}l.set(d.id,d)}}),u&&(this._networkLinks=l,this._changed.raiseEvent(this)),!0},gl._DeferredLoading=_f,gl._getTimestamp=Cr;const R4e=gl;function Bb(e,t){this._conditionsExpression=Rt(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,function N4e(e,t){const n=[],i=e._conditions;if(!c(i))return;const o=i.length;for(let r=0;r<o;++r){const s=i[r],a=String(s[0]),l=String(s[1]);n.push(new L4e(new d0(a,t),new d0(l,t)))}e._runtimeConditions=n}(this,t)}function L4e(e,t){this.condition=e,this.expression=t}Object.defineProperties(Bb.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}}),Bb.prototype.evaluate=function(e,t){const n=this._runtimeConditions;if(!c(n))return;const i=n.length;for(let o=0;o<i;++o){const r=n[o];if(r.condition.evaluate(e))return r.expression.evaluate(e,t)}},Bb.prototype.evaluateColor=function(e,t){const n=this._runtimeConditions;if(!c(n))return;const i=n.length;for(let o=0;o<i;++o){const r=n[o];if(r.condition.evaluate(e))return r.expression.evaluateColor(e,t)}},Bb.prototype.getShaderFunction=function(e,t,n,i){const o=this._runtimeConditions;if(!c(o)||0===o.length)return;let r="";const s=o.length;for(let a=0;a<s;++a){const l=o[a];r+=` ${0===a?"if":"else if"} (${l.condition.getShaderExpression(t,n)})\n {\n return ${l.expression.getShaderExpression(t,n)};\n }\n`}return r=`${i} ${e}\n{\n${r} return ${i}(1.0);\n}\n`,r},Bb.prototype.getVariables=function(){let e=[];const t=this._runtimeConditions;if(!c(t)||0===t.length)return e;const n=t.length;for(let i=0;i<n;++i){const 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};const M4e=Bb;function Em(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,function F4e(e,t){t=g(Rt(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;const n={};if(c(t.meta)){const i=t.defines,o=g(t.meta,g.EMPTY_OBJECT);for(const r in o)o.hasOwnProperty(r)&&(n[r]=new d0(o[r],i))}e._meta=n,e._ready=!0}(this,e)}function Vo(e,t){const n=g(e._style,g.EMPTY_OBJECT).defines;if(c(t))return"boolean"==typeof t||"number"==typeof t?new d0(String(t)):"string"==typeof t?new d0(t,n):c(t.conditions)?new M4e(t,n):t}function Ho(e){if(c(e))return c(e.expression)?e.expression:c(e.conditionsExpression)?Rt(e.conditionsExpression,!0):e}Object.defineProperties(Em.prototype,{style:{get:function(){return this._style}},show:{get:function(){return this._show},set:function(e){this._show=Vo(this,e),this._style.show=Ho(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=Vo(this,e),this._style.color=Ho(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=Vo(this,e),this._style.pointSize=Ho(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=Vo(this,e),this._style.pointOutlineColor=Ho(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=Vo(this,e),this._style.pointOutlineWidth=Ho(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=Vo(this,e),this._style.labelColor=Ho(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=Vo(this,e),this._style.labelOutlineColor=Ho(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=Vo(this,e),this._style.labelOutlineWidth=Ho(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=Vo(this,e),this._style.font=Ho(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=Vo(this,e),this._style.labelStyle=Ho(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=Vo(this,e),this._style.labelText=Ho(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=Vo(this,e),this._style.backgroundColor=Ho(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=Vo(this,e),this._style.backgroundPadding=Ho(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=Vo(this,e),this._style.backgroundEnabled=Ho(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=Vo(this,e),this._style.scaleByDistance=Ho(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=Vo(this,e),this._style.translucencyByDistance=Ho(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=Vo(this,e),this._style.distanceDisplayCondition=Ho(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=Vo(this,e),this._style.heightOffset=Ho(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=Vo(this,e),this._style.anchorLineEnabled=Ho(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=Vo(this,e),this._style.anchorLineColor=Ho(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=Vo(this,e),this._style.image=Ho(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=Vo(this,e),this._style.disableDepthTestDistance=Ho(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=Vo(this,e),this._style.horizontalOrigin=Ho(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=Vo(this,e),this._style.verticalOrigin=Ho(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=Vo(this,e),this._style.labelHorizontalOrigin=Ho(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=Vo(this,e),this._style.labelVerticalOrigin=Ho(this._labelVerticalOrigin)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}}),Em.fromUrl=function(e){if(!c(e))throw new E("url is required");return zt.createIfNeeded(e).fetchJson(e).then(function(n){return new Em(n)})},Em.prototype.getColorShaderFunction=function(e,t,n){return this._colorShaderFunctionReady?(n.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,this._colorShaderFunction=c(this.color)&&c(this.color.getShaderFunction)?this.color.getShaderFunction(e,t,n,"vec4"):void 0,this._colorShaderTranslucent=n.translucent,this._colorShaderFunction)},Em.prototype.getShowShaderFunction=function(e,t,n){return this._showShaderFunctionReady||(this._showShaderFunctionReady=!0,this._showShaderFunction=c(this.show)&&c(this.show.getShaderFunction)?this.show.getShaderFunction(e,t,n,"bool"):void 0),this._showShaderFunction},Em.prototype.getPointSizeShaderFunction=function(e,t,n){return this._pointSizeShaderFunctionReady||(this._pointSizeShaderFunctionReady=!0,this._pointSizeShaderFunction=c(this.pointSize)&&c(this.pointSize.getShaderFunction)?this.pointSize.getShaderFunction(e,t,n,"float"):void 0),this._pointSizeShaderFunction},Em.prototype.getVariables=function(){let e=[];return c(this.color)&&c(this.color.getVariables)&&e.push.apply(e,this.color.getVariables()),c(this.show)&&c(this.show.getVariables)&&e.push.apply(e,this.show.getVariables()),c(this.pointSize)&&c(this.pointSize.getVariables)&&e.push.apply(e,this.pointSize.getVariables()),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};const v$=Em,B4e="uniform vec4 u_initialColor;\n\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_DAY_NIGHT_ALPHA\nuniform float u_dayTextureNightAlpha[TEXTURE_UNITS];\nuniform float u_dayTextureDayAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform float u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_COLOR_TO_ALPHA\nuniform vec4 u_colorsToAlpha[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n#endif\n\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nuniform vec2 u_lightingFadeDistance;\n#endif\n\n#ifdef TILE_LIMIT_RECTANGLE\nuniform vec4 u_cartographicLimitRectangle;\n#endif\n\n#ifdef GROUND_ATMOSPHERE\nuniform vec2 u_nightFadeDistance;\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\nuniform highp sampler2D u_clippingPlanes;\nuniform mat4 u_clippingPlanesMatrix;\nuniform vec4 u_clippingPlanesEdgeStyle;\n#endif\n\n#ifdef ENABLE_CLIPPING_POLYGONS\nuniform highp sampler2D u_clippingDistance;\nin vec2 v_clippingPosition;\nflat in int v_regionIndex;\n#endif\n\n#if defined(GROUND_ATMOSPHERE) || defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nuniform float u_minimumBrightness;\n#endif\n\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift; // Hue, saturation, brightness\n#endif\n\n#ifdef HIGHLIGHT_FILL_TILE\nuniform vec4 u_fillHighlightColor;\n#endif\n\n#ifdef TRANSLUCENT\nuniform vec4 u_frontFaceAlphaByDistance;\nuniform vec4 u_backFaceAlphaByDistance;\nuniform vec4 u_translucencyRectangle;\n#endif\n\n#ifdef UNDERGROUND_COLOR\nuniform vec4 u_undergroundColor;\nuniform vec4 u_undergroundColorAlphaByDistance;\n#endif\n\n#ifdef ENABLE_VERTEX_LIGHTING\nuniform float u_lambertDiffuseMultiplier;\nuniform float u_vertexShadowDarkness;\n#endif\n\nin vec3 v_positionMC;\nin vec3 v_positionEC;\nin vec3 v_textureCoordinates;\nin vec3 v_normalMC;\nin vec3 v_normalEC;\n\n#ifdef APPLY_MATERIAL\nin float v_height;\nin float v_slope;\nin float v_aspect;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nin float v_distance;\n#endif\n\n#if defined(GROUND_ATMOSPHERE) || defined(FOG)\nin vec3 v_atmosphereRayleighColor;\nin vec3 v_atmosphereMieColor;\nin float v_atmosphereOpacity;\n#endif\n\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nfloat interpolateByDistance(vec4 nearFarScalar, float distance)\n{\n float startDistance = nearFarScalar.x;\n float startValue = nearFarScalar.y;\n float endDistance = nearFarScalar.z;\n float endValue = nearFarScalar.w;\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\n return mix(startValue, endValue, t);\n}\n#endif\n\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)\n{\n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\n#endif\n\n#ifdef TRANSLUCENT\nbool inTranslucencyRectangle()\n{\n return\n v_textureCoordinates.x > u_translucencyRectangle.x &&\n v_textureCoordinates.x < u_translucencyRectangle.z &&\n v_textureCoordinates.y > u_translucencyRectangle.y &&\n v_textureCoordinates.y < u_translucencyRectangle.w;\n}\n#endif\n\nvec4 sampleAndBlend(\n vec4 previousColor,\n sampler2D textureToSample,\n vec2 tileTextureCoordinates,\n vec4 textureCoordinateRectangle,\n vec4 textureCoordinateTranslationAndScale,\n float textureAlpha,\n float textureNightAlpha,\n float textureDayAlpha,\n float textureBrightness,\n float textureContrast,\n float textureHue,\n float textureSaturation,\n float textureOneOverGamma,\n float split,\n vec4 colorToAlpha,\n float nightBlend)\n{\n // This crazy step stuff sets the alpha to 0.0 if this following condition is true:\n // tileTextureCoordinates.s < textureCoordinateRectangle.s ||\n // tileTextureCoordinates.s > textureCoordinateRectangle.p ||\n // tileTextureCoordinates.t < textureCoordinateRectangle.t ||\n // tileTextureCoordinates.t > textureCoordinateRectangle.q\n // In other words, the alpha is zero if the fragment is outside the rectangle\n // covered by this texture. Would an actual 'if' yield better performance?\n vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n\n alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n\n#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)\n textureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);\n#endif\n\n vec2 translation = textureCoordinateTranslationAndScale.xy;\n vec2 scale = textureCoordinateTranslationAndScale.zw;\n vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n vec4 value = texture(textureToSample, textureCoordinates);\n vec3 color = value.rgb;\n float alpha = value.a;\n\n#ifdef APPLY_COLOR_TO_ALPHA\n vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);\n colorDiff.r = czm_maximumComponent(colorDiff);\n alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);\n#endif\n\n#if !defined(APPLY_GAMMA)\n vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));\n color = tempColor.rgb;\n alpha = tempColor.a;\n#else\n color = pow(color, vec3(textureOneOverGamma));\n#endif\n\n#ifdef APPLY_SPLIT\n float splitPosition = czm_splitPosition;\n // Split to the left\n if (split < 0.0 && gl_FragCoord.x > splitPosition) {\n alpha = 0.0;\n }\n // Split to the right\n else if (split > 0.0 && gl_FragCoord.x < splitPosition) {\n alpha = 0.0;\n }\n#endif\n\n#ifdef APPLY_BRIGHTNESS\n color = mix(vec3(0.0), color, textureBrightness);\n#endif\n\n#ifdef APPLY_CONTRAST\n color = mix(vec3(0.5), color, textureContrast);\n#endif\n\n#ifdef APPLY_HUE\n color = czm_hue(color, textureHue);\n#endif\n\n#ifdef APPLY_SATURATION\n color = czm_saturation(color, textureSaturation);\n#endif\n\n float sourceAlpha = alpha * textureAlpha;\n float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n outAlpha += sign(outAlpha) - 1.0;\n\n vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n\n // When rendering imagery for a tile in multiple passes,\n // some GPU/WebGL implementation combinations will not blend fragments in\n // additional passes correctly if their computation includes an unmasked\n // divide-by-zero operation,\n // even if it's not in the output or if the output has alpha zero.\n //\n // For example, without sanitization for outAlpha,\n // this renders without artifacts:\n // if (outAlpha == 0.0) { outColor = vec3(0.0); }\n //\n // but using czm_branchFreeTernary will cause portions of the tile that are\n // alpha-zero in the additional pass to render as black instead of blending\n // with the previous pass:\n // outColor = czm_branchFreeTernary(outAlpha == 0.0, vec3(0.0), outColor);\n //\n // So instead, sanitize against divide-by-zero,\n // store this state on the sign of outAlpha, and correct on return.\n\n return vec4(outColor, max(outAlpha, 0.0));\n}\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);\n\nconst float fExposure = 2.0;\n\nvec3 computeEllipsoidPosition()\n{\n float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);\n vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);\n xy *= czm_viewport.zw * mpp * 0.5;\n\n vec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));\n czm_ray ray = czm_ray(vec3(0.0), direction);\n\n vec3 ellipsoid_center = czm_view[3].xyz;\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n\n vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);\n return (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;\n}\n\nvoid main()\n{\n#ifdef TILE_LIMIT_RECTANGLE\n if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||\n v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)\n {\n discard;\n }\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\n float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n#endif\n\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)\n vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)); // normalized surface normal in model coordinates\n vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordinates\n#endif\n\n#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)\n float nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);\n#else\n float nightBlend = 0.0;\n#endif\n\n // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0\n // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the\n // fragments on the edges of tiles even though the vertex shader is outputting\n // coordinates strictly in the 0-1 range.\n vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);\n\n#ifdef SHOW_TILE_BOUNDARIES\n if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\n v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n {\n color = vec4(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\n float cameraDist;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;\n }\n else if (czm_sceneMode == czm_sceneModeColumbusView)\n {\n cameraDist = -czm_view[3].z;\n }\n else\n {\n cameraDist = length(czm_view[3]);\n }\n float fadeOutDist = u_lightingFadeDistance.x;\n float fadeInDist = u_lightingFadeDistance.y;\n if (czm_sceneMode != czm_sceneMode3D) {\n vec3 radii = czm_ellipsoidRadii;\n float maxRadii = max(radii.x, max(radii.y, radii.z));\n fadeOutDist -= maxRadii;\n fadeInDist -= maxRadii;\n }\n float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#else\n float fade = 0.0;\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\n vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\n vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\n waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\n\n float mask = texture(u_waterMask, waterMaskTextureCoordinates).r;\n\n if (mask > 0.0)\n {\n mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);\n\n vec2 ellipsoidTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC);\n vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC.zyx);\n\n vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\n\n color = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);\n }\n#endif\n\n#ifdef APPLY_MATERIAL\n czm_materialInput materialInput;\n materialInput.st = v_textureCoordinates.st;\n materialInput.normalEC = normalize(v_normalEC);\n materialInput.positionToEyeEC = -v_positionEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalize(v_normalEC));\n materialInput.slope = v_slope;\n materialInput.height = v_height;\n materialInput.aspect = v_aspect;\n czm_material material = czm_getMaterial(materialInput);\n vec4 materialColor = vec4(material.diffuse, material.alpha);\n color = alphaBlend(materialColor, color);\n#endif\n\n#ifdef ENABLE_VERTEX_LIGHTING\n float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * u_lambertDiffuseMultiplier + u_vertexShadowDarkness, 0.0, 1.0);\n vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);\n#elif defined(ENABLE_DAYNIGHT_SHADING)\n float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);\n diffuseIntensity = mix(1.0, diffuseIntensity, fade);\n vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);\n#else\n vec4 finalColor = color;\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\n vec4 clippingPlanesEdgeColor = vec4(1.0);\n clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;\n float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;\n\n if (clipDistance < clippingPlanesEdgeWidth)\n {\n finalColor = clippingPlanesEdgeColor;\n }\n#endif\n\n#ifdef ENABLE_CLIPPING_POLYGONS\n vec2 clippingPosition = v_clippingPosition;\n int regionIndex = v_regionIndex;\n clipPolygons(u_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex); \n#endif\n\n#ifdef HIGHLIGHT_FILL_TILE\n finalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);\n#endif\n\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\n vec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\n vec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n\n#if defined(GROUND_ATMOSPHERE) || defined(FOG)\n if (!czm_backFacing())\n {\n bool dynamicLighting = false;\n #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\n dynamicLighting = true;\n #endif\n\n vec3 rayleighColor;\n vec3 mieColor;\n float opacity;\n\n vec3 positionWC;\n vec3 lightDirection;\n\n // When the camera is far away (camera distance > nightFadeOutDistance), the scattering is computed in the fragment shader.\n // Otherwise, the scattering is computed in the vertex shader.\n #ifdef PER_FRAGMENT_GROUND_ATMOSPHERE\n positionWC = computeEllipsoidPosition();\n lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));\n computeAtmosphereScattering(\n positionWC,\n lightDirection,\n rayleighColor,\n mieColor,\n opacity\n );\n #else\n positionWC = v_positionMC;\n lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));\n rayleighColor = v_atmosphereRayleighColor;\n mieColor = v_atmosphereMieColor;\n opacity = v_atmosphereOpacity;\n #endif\n\n #ifdef COLOR_CORRECT\n const bool ignoreBlackPixels = true;\n rayleighColor = czm_applyHSBShift(rayleighColor, u_hsbShift, ignoreBlackPixels);\n mieColor = czm_applyHSBShift(mieColor, u_hsbShift, ignoreBlackPixels);\n #endif\n\n vec4 groundAtmosphereColor = computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);\n\n // Fog is applied to tiles selected for fog, close to the Earth.\n #ifdef FOG\n vec3 fogColor = groundAtmosphereColor.rgb;\n\n // If there is lighting, apply that to the fog.\n #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\n float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);\n fogColor *= darken;\n #endif\n\n #ifndef HDR\n fogColor.rgb = czm_acesTonemapping(fogColor.rgb);\n fogColor.rgb = czm_inverseGamma(fogColor.rgb);\n #endif\n\n const float modifier = 0.15;\n finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor.rgb, modifier), finalColor.a);\n\n #else\n // Apply ground atmosphere. This happens when the camera is far away from the earth.\n\n // The transmittance is based on optical depth i.e. the length of segment of the ray inside the atmosphere.\n // This value is larger near the \"circumference\", as it is further away from the camera. We use it to\n // brighten up that area of the ground atmosphere.\n const float transmittanceModifier = 0.5;\n float transmittance = transmittanceModifier + clamp(1.0 - groundAtmosphereColor.a, 0.0, 1.0);\n\n vec3 finalAtmosphereColor = finalColor.rgb + groundAtmosphereColor.rgb * transmittance;\n\n #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\n float fadeInDist = u_nightFadeDistance.x;\n float fadeOutDist = u_nightFadeDistance.y;\n\n float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.05, 1.0);\n float darken = clamp(dot(normalize(positionWC), atmosphereLightDirection), 0.0, 1.0);\n vec3 darkenendGroundAtmosphereColor = mix(groundAtmosphereColor.rgb, finalAtmosphereColor.rgb, darken);\n\n finalAtmosphereColor = mix(darkenendGroundAtmosphereColor, finalAtmosphereColor, sunlitAtmosphereIntensity);\n #endif\n\n #ifndef HDR\n finalAtmosphereColor.rgb = vec3(1.0) - exp(-fExposure * finalAtmosphereColor.rgb);\n #else\n finalAtmosphereColor.rgb = czm_saturation(finalAtmosphereColor.rgb, 1.6);\n #endif\n\n finalColor.rgb = mix(finalColor.rgb, finalAtmosphereColor.rgb, fade);\n #endif\n }\n#endif\n\n#ifdef UNDERGROUND_COLOR\n if (czm_backFacing())\n {\n float distanceFromEllipsoid = max(czm_eyeHeight, 0.0);\n float distance = max(v_distance - distanceFromEllipsoid, 0.0);\n float blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);\n vec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);\n finalColor = alphaBlend(undergroundColor, finalColor);\n }\n#endif\n\n#ifdef TRANSLUCENT\n if (inTranslucencyRectangle())\n {\n vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;\n finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);\n }\n#endif\n\n out_FragColor = finalColor;\n}\n\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n\nfloat waveFade(float edge0, float edge1, float x)\n{\n float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return pow(1.0 - y, 5.0);\n}\n\nfloat linearFade(float edge0, float edge1, float x)\n{\n return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\n\n// Based on water rendering by Jonas Wagner:\n// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog\n\n// low altitude wave settings\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\n\n// high altitude wave settings\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\n\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)\n{\n vec3 positionToEyeEC = -positionEyeCoordinates;\n float positionToEyeECLength = length(positionToEyeEC);\n\n // The double normalize below works around a bug in Firefox on Android devices.\n vec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));\n\n // Fade out the waves as the camera moves far from the surface.\n float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n\n#ifdef SHOW_OCEAN_WAVES\n // high altitude waves\n float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\n vec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\n vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\n\n // low altitude waves\n time = czm_frameNumber * oceanAnimationSpeedLowAltitude;\n noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\n vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\n\n // blend the 2 wave layers based on distance to surface\n float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\n float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\n vec3 normalTangentSpace =\n (highAltitudeFade * normalTangentSpaceHighAltitude) +\n (lowAltitudeFade * normalTangentSpaceLowAltitude);\n normalTangentSpace = normalize(normalTangentSpace);\n\n // fade out the normal perturbation as we move farther from the water surface\n normalTangentSpace.xy *= waveIntensity;\n normalTangentSpace = normalize(normalTangentSpace);\n#else\n vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\n\n vec3 normalEC = enuToEye * normalTangentSpace;\n\n const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\n\n // Use diffuse light to highlight the waves\n float diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;\n vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);\n\n#ifdef SHOW_OCEAN_WAVES\n // Where diffuse light is low or non-existent, use wave highlights based solely on\n // the wave bumpiness and no particular light direction.\n float tsPerturbationRatio = normalTangentSpace.z;\n vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\n vec3 nonDiffuseHighlight = vec3(0.0);\n#endif\n\n // Add specular highlights in 3D, and in all modes when zoomed in.\n float specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);\n float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\n float specular = specularIntensity * surfaceReflectance;\n\n#ifdef HDR\n specular *= 1.4;\n\n float e = 0.2;\n float d = 3.3;\n float c = 1.7;\n\n vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));\n#else\n vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;\n#endif\n\n return vec4(color, imageryColor.a);\n}\n\n#endif // #ifdef SHOW_REFLECTIVE_OCEAN\n",k4e="#ifdef QUANTIZATION_BITS12\nin vec4 compressed0;\nin float compressed1;\n#else\nin vec4 position3DAndHeight;\nin vec4 textureCoordAndEncodedNormals;\n#endif\n\n#ifdef GEODETIC_SURFACE_NORMALS\nin vec3 geodeticSurfaceNormal;\n#endif\n\n#ifdef EXAGGERATION\nuniform vec2 u_verticalExaggerationAndRelativeHeight;\n#endif\n\nuniform vec3 u_center3D;\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_tileRectangle;\n\n// Uniforms for 2D Mercator projection\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\n\nout vec3 v_positionMC;\nout vec3 v_positionEC;\n\nout vec3 v_textureCoordinates;\nout vec3 v_normalMC;\nout vec3 v_normalEC;\n\n#ifdef APPLY_MATERIAL\nout float v_slope;\nout float v_aspect;\nout float v_height;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nout float v_distance;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nout vec3 v_atmosphereRayleighColor;\nout vec3 v_atmosphereMieColor;\nout float v_atmosphereOpacity;\n#endif\n\n#ifdef ENABLE_CLIPPING_POLYGONS\nuniform highp sampler2D u_clippingExtents;\nout vec2 v_clippingPosition;\nflat out int v_regionIndex;\n#endif\n\n// These functions are generated at runtime.\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\n\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return u_modifiedModelViewProjection * vec4(position, 1.0);\n}\n\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\n // The width of a tile at level 11, in radians and assuming a single root tile, is\n // 2.0 * czm_pi / pow(2.0, 11.0)\n // We want to just linearly interpolate the 2D position from the texture coordinates\n // when we're at this level or higher. The constant below is the expression\n // above evaluated and then rounded up at the 4th significant digit.\n const float maxTileWidth = 0.003068;\n float positionFraction = textureCoordinates.y;\n float southLatitude = u_southAndNorthLatitude.x;\n float northLatitude = u_southAndNorthLatitude.y;\n if (northLatitude - southLatitude > maxTileWidth)\n {\n float southMercatorY = u_southMercatorYAndOneOverHeight.x;\n float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\n\n float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\n currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\n positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n }\n return positionFraction;\n}\n\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\n return textureCoordinates.y;\n}\n\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n return u_modifiedModelViewProjection * rtcPosition2D;\n}\n\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\n\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, height, textureCoordinates);\n}\n\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\n // We do not do RTC while morphing, so there is potential for jitter.\n // This is unlikely to be noticeable, though.\n vec3 position3DWC = position + u_center3D;\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\n return czm_modelViewProjection * morphPosition;\n}\n\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\n\nvoid main()\n{\n#ifdef QUANTIZATION_BITS12\n vec2 xy = czm_decompressTextureCoordinates(compressed0.x);\n vec2 zh = czm_decompressTextureCoordinates(compressed0.y);\n vec3 position = vec3(xy, zh.x);\n float height = zh.y;\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);\n\n height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\n position = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y) || defined(APPLY_MATERIAL)\n float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\n float encodedNormal = compressed1;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\n float encodedNormal = 0.0;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = compressed0.w;\n#else\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = 0.0;\n#endif\n\n#else\n // A single float per element\n vec3 position = position3DAndHeight.xyz;\n float height = position3DAndHeight.w;\n vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = textureCoordAndEncodedNormals.z;\n float encodedNormal = textureCoordAndEncodedNormals.w;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = textureCoordAndEncodedNormals.z;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = textureCoordAndEncodedNormals.z;\n float encodedNormal = 0.0;\n#else\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = 0.0;\n#endif\n\n#endif\n\n vec3 position3DWC = position + u_center3D;\n\n#ifdef GEODETIC_SURFACE_NORMALS\n vec3 ellipsoidNormal = geodeticSurfaceNormal;\n#else\n vec3 ellipsoidNormal = normalize(position3DWC);\n#endif\n\n#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)\n float exaggeration = u_verticalExaggerationAndRelativeHeight.x;\n float relativeHeight = u_verticalExaggerationAndRelativeHeight.y;\n float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;\n\n // stop from going through center of earth\n float minRadius = min(min(czm_ellipsoidRadii.x, czm_ellipsoidRadii.y), czm_ellipsoidRadii.z);\n newHeight = max(newHeight, -minRadius);\n\n vec3 offset = ellipsoidNormal * (newHeight - height);\n position += offset;\n position3DWC += offset;\n height = newHeight;\n#endif\n\n gl_Position = getPosition(position, height, textureCoordinates);\n\n v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\n v_positionMC = position3DWC; // position in model coordinates\n\n v_textureCoordinates = vec3(textureCoordinates, webMercatorT);\n\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\n vec3 normalMC = czm_octDecode(encodedNormal);\n\n#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)\n vec3 projection = dot(normalMC, ellipsoidNormal) * ellipsoidNormal;\n vec3 rejection = normalMC - projection;\n normalMC = normalize(projection + rejection * exaggeration);\n#endif\n\n v_normalMC = normalMC;\n v_normalEC = czm_normal3D * v_normalMC;\n#endif\n\n#ifdef ENABLE_CLIPPING_POLYGONS\n vec2 sphericalLatLong = czm_approximateSphericalCoordinates(position3DWC);\n sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\n \n vec2 minDistance = vec2(czm_infinity);\n v_clippingPosition = vec2(czm_infinity);\n v_regionIndex = -1;\n\n for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {\n vec4 extents = unpackClippingExtents(u_clippingExtents, regionIndex);\n vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;\n\n vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));\n vec2 distance = abs(rectUv - clamped) * extents.wz;\n\n float threshold = 0.01;\n if (minDistance.x > distance.x || minDistance.y > distance.y) {\n minDistance = distance;\n v_clippingPosition = rectUv;\n if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {\n v_regionIndex = regionIndex;\n }\n }\n }\n#endif\n\n#if defined(FOG) || (defined(GROUND_ATMOSPHERE) && !defined(PER_FRAGMENT_GROUND_ATMOSPHERE))\n\n bool dynamicLighting = false;\n\n #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\n dynamicLighting = true;\n #endif\n\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\n vec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\n vec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n\n vec3 lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(position3DWC));\n\n computeAtmosphereScattering(\n position3DWC,\n lightDirection,\n v_atmosphereRayleighColor,\n v_atmosphereMieColor,\n v_atmosphereOpacity\n );\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\n v_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);\n#endif\n\n#ifdef APPLY_MATERIAL\n float northPoleZ = czm_ellipsoidRadii.z;\n vec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);\n vec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));\n float dotProd = abs(dot(ellipsoidNormal, v_normalMC));\n v_slope = acos(dotProd);\n vec3 normalRejected = ellipsoidNormal * dotProd;\n vec3 normalProjected = v_normalMC - normalRejected;\n vec3 aspectVector = normalize(normalProjected);\n v_aspect = acos(dot(aspectVector, vectorEastMC));\n float determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);\n v_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);\n v_height = height;\n#endif\n}\n",rD="uniform vec3 u_radiiAndDynamicAtmosphereColor;\n\nuniform float u_atmosphereLightIntensity;\nuniform float u_atmosphereRayleighScaleHeight;\nuniform float u_atmosphereMieScaleHeight;\nuniform float u_atmosphereMieAnisotropy;\nuniform vec3 u_atmosphereRayleighCoefficient;\nuniform vec3 u_atmosphereMieCoefficient;\n\nconst float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.\nconst int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.\nconst int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.\n\n/**\n * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as\n * the transmittance value for the ray.\n *\n * @param {czm_ray} primaryRay The ray from the camera to the position.\n * @param {float} primaryRayLength The length of the primary ray.\n * @param {vec3} lightDirection The direction of the light to calculate the scattering from.\n * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.\n * @param {vec3} mieColor The variable the Mie scattering will be written to.\n * @param {float} opacity The variable the transmittance will be written to.\n * @glslFunction\n */\nvoid computeScattering(\n czm_ray primaryRay,\n float primaryRayLength,\n vec3 lightDirection,\n float atmosphereInnerRadius,\n out vec3 rayleighColor,\n out vec3 mieColor,\n out float opacity\n) {\n\n // Initialize the default scattering amounts to 0.\n rayleighColor = vec3(0.0);\n mieColor = vec3(0.0);\n opacity = 0.0;\n\n float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\n\n vec3 origin = vec3(0.0);\n\n // Calculate intersection from the camera to the outer ring of the atmosphere.\n czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);\n\n // Return empty colors if no intersection with the atmosphere geometry.\n if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {\n return;\n }\n\n // To deal with smaller values of PRIMARY_STEPS (e.g. 4)\n // we implement a split strategy: sky or horizon.\n // For performance reasons, instead of a if/else branch\n // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0\n float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);\n // Value close to 0.0: close to the horizon\n // Value close to 1.0: above in the sky\n float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));\n\n // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.\n float start_0 = primaryRayAtmosphereIntersect.start;\n primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);\n // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.\n primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));\n\n // For the number of ray steps, distinguish inside or outside atmosphere (outer space)\n // (1) from outer space we have to use more ray steps to get a realistic rendering\n // (2) within atmosphere we need fewer steps for faster rendering\n float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters\n float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));\n int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.\n int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.\n\n // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.\n float rayPositionLength = primaryRayAtmosphereIntersect.start;\n // (1) Outside the atmosphere: constant rayStepLength\n // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps\n float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;\n float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));\n float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));\n\n vec3 rayleighAccumulation = vec3(0.0);\n vec3 mieAccumulation = vec3(0.0);\n vec2 opticalDepth = vec2(0.0);\n vec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);\n\n // Sample positions on the primary ray.\n for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {\n\n // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (i >= PRIMARY_STEPS) {\n break;\n }\n\n // Calculate sample position along viewpoint ray.\n vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);\n\n // Calculate height of sample position above ellipsoid.\n float sampleHeight = length(samplePosition) - atmosphereInnerRadius;\n\n // Calculate and accumulate density of particles at the sample position.\n vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;\n opticalDepth += sampleDensity;\n\n // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.\n czm_ray lightRay = czm_ray(samplePosition, lightDirection);\n czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);\n\n float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);\n float lightPositionLength = 0.0;\n\n vec2 lightOpticalDepth = vec2(0.0);\n\n // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.\n for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {\n\n // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (j >= LIGHT_STEPS) {\n break;\n }\n\n // Calculate sample position along light ray.\n vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);\n\n // Calculate height of the light sample position above ellipsoid.\n float lightHeight = length(lightPosition) - atmosphereInnerRadius;\n\n // Calculate density of photons at the light sample position.\n lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;\n\n // Increment distance on light ray.\n lightPositionLength += lightStepLength;\n }\n\n // Compute attenuation via the primary ray and the light ray.\n vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));\n\n // Accumulate the scattering.\n rayleighAccumulation += sampleDensity.x * attenuation;\n mieAccumulation += sampleDensity.y * attenuation;\n\n // Increment distance on primary ray.\n rayPositionLength += (rayStepLength += rayStepLengthIncrease);\n }\n\n // Compute the scattering amount.\n rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;\n mieColor = u_atmosphereMieCoefficient * mieAccumulation;\n\n // Compute the transmittance i.e. how much light is passing through the atmosphere.\n opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));\n}\n\nvec4 computeAtmosphereColor(\n vec3 positionWC,\n vec3 lightDirection,\n vec3 rayleighColor,\n vec3 mieColor,\n float opacity\n) {\n // Setup the primary ray: from the camera position to the vertex position.\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n\n float cosAngle = dot(cameraToPositionWCDirection, lightDirection);\n float cosAngleSq = cosAngle * cosAngle;\n\n float G = u_atmosphereMieAnisotropy;\n float GSq = G * G;\n\n // The Rayleigh phase function.\n float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);\n // The Mie phase function.\n float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));\n\n // The final color is generated by combining the effects of the Rayleigh and Mie scattering.\n vec3 rayleigh = rayleighPhase * rayleighColor;\n vec3 mie = miePhase * mieColor;\n\n vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;\n\n return vec4(color, opacity);\n}\n",I$="void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {\n\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);\n \n float atmosphereInnerRadius = length(positionWC);\n\n computeScattering(\n primaryRay,\n length(cameraToPositionWC),\n lightDirection,\n atmosphereInnerRadius,\n rayleighColor,\n mieColor,\n opacity\n );\n}\n",U4e=new V,jB=function z4e(e,t){A.typeOf.object("clippingPlaneCollection",e),A.typeOf.object("context",t);const n=e.unionClippingRegions,i=e.length,o=Gu.useFloatTexture(t),r=Gu.getTextureResolution(e,t,U4e),s=r.x,a=r.y;let l=o?function G4e(e,t){const i=1/t;let o=`${1/e}`;-1===o.indexOf(".")&&(o+=".0");let r=`${i}`;return-1===r.indexOf(".")&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int pixY = clippingPlaneNumber / ${e};\n int pixX = clippingPlaneNumber - (pixY * ${e});\n float u = (float(pixX) + 0.5) * ${o};\n float v = (float(pixY) + 0.5) * ${r};\n vec4 plane = texture(packedClippingPlanes, vec2(u, v));\n return czm_transformPlane(plane, transform);\n}\n`}(s,a):function j4e(e,t){const i=1/t;let o=`${1/e}`;-1===o.indexOf(".")&&(o+=".0");let r=`${i}`;return-1===r.indexOf(".")&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int clippingPlaneStartIndex = clippingPlaneNumber * 2;\n int pixY = clippingPlaneStartIndex / ${e};\n int pixX = clippingPlaneStartIndex - (pixY * ${e});\n float u = (float(pixX) + 0.5) * ${o};\n float v = (float(pixY) + 0.5) * ${r};\n vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;\n vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n vec4 plane;\n plane.xyz = czm_octDecode(oct, 65535.0);\n plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + ${o}, v)));\n return czm_transformPlane(plane, transform);\n}\n`}(s,a);return l+="\n",l+=n?function V4e(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount;\n float pixelWidth = czm_metersPerPixel(position);\n bool breakAndDiscard = false;\n for (int i = 0; i < ${e}; ++i)\n {\n vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));\n if (amount <= 0.0)\n {\n breakAndDiscard = true;\n break;\n }\n }\n if (breakAndDiscard) {\n discard;\n }\n return clipAmount;\n}\n`}(i):function H4e(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n bool clipped = true;\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount = 0.0;\n float pixelWidth = czm_metersPerPixel(position);\n for (int i = 0; i < ${e}; ++i)\n {\n vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = max(amount, clipAmount);\n clipped = clipped && (amount <= 0.0);\n }\n if (clipped)\n {\n discard;\n }\n return clipAmount;\n}\n`}(i),l};function W4e(e,t,n,i,o,r){this.numberOfDayTextures=e,this.flags=t,this.material=n,this.shaderProgram=i,this.clippingShaderState=o,this.clippingPolygonShaderState=r}function WB(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}WB.prototype.getShaderProgram=function(e){const t=e.frameState,n=e.surfaceTile,i=e.numberOfDayTextures,o=e.applyBrightness,r=e.applyContrast,s=e.applyHue,a=e.applySaturation,l=e.applyGamma,u=e.applyAlpha,d=e.applyDayNightAlpha,h=e.applySplit,m=e.showReflectiveOcean,_=e.showOceanWaves,p=e.enableLighting,y=e.dynamicAtmosphereLighting,b=e.dynamicAtmosphereLightingFromSun,x=e.showGroundAtmosphere,C=e.perFragmentGroundAtmosphere,w=e.hasVertexNormals,v=e.useWebMercatorProjection,I=e.enableFog,P=e.enableClippingPlanes,N=e.clippingPlanes,R=e.enableClippingPolygons,B=e.clippingPolygons,S=e.hasImageryLayerCutout,D=e.colorCorrect,L=e.highlightFillTile,M=e.colorToAlpha,U=e.hasGeodeticSurfaceNormals,z=e.hasExaggeration,G=e.showUndergroundColor,W=e.translucent;let q=0,j="";const Y=n.renderedMesh.encoding;Y.quantization===tl.BITS12&&(q=1,j="QUANTIZATION_BITS12");let X=0,K="";e.clippedByBoundaries&&(X=1,K="TILE_LIMIT_RECTANGLE");let $=0,me="";S&&($=1,me="APPLY_IMAGERY_CUTOUT");const Se=t.mode,fe=Se|o<<2|r<<3|s<<4|a<<5|l<<6|u<<7|m<<8|_<<9|p<<10|y<<11|b<<12|x<<13|C<<14|w<<15|v<<16|I<<17|q<<18|h<<19|P<<20|R<<21|X<<22|$<<23|D<<24|L<<25|M<<26|U<<27|z<<28|G<<29|W<<30|d<<31;let ye=0;c(N)&&N.length>0&&(ye=P?N.clippingPlanesState:0);let ve=0;c(B)&&B.length>0&&(ve=R?B.clippingPolygonsState:0);let Oe=n.surfaceShader;if(c(Oe)&&Oe.numberOfDayTextures===i&&Oe.flags===fe&&Oe.material===this.material&&Oe.clippingShaderState===ye&&Oe.clippingPolygonShaderState===ve)return Oe.shaderProgram;let Ge=this._shadersByTexturesFlags[i];if(c(Ge)||(Ge=this._shadersByTexturesFlags[i]=[]),Oe=Ge[fe],!c(Oe)||Oe.material!==this.material||Oe.clippingShaderState!==ye||Oe.clippingPolygonShaderState!==ve){const je=this.baseVertexShaderSource.clone(),Ke=this.baseFragmentShaderSource.clone();0!==ye&&Ke.sources.unshift(jB(N,t.context)),0!==ve&&(Ke.sources.unshift(function Y4e(e){return e.webgl2?"void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {\n czm_clipPolygons(clippingDistance, regionsLength, clippingPosition, regionIndex);\n }":"void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {\n }"}(t.context)),je.sources.unshift(function X4e(e){return e.webgl2?"vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {\n return czm_unpackClippingExtents(extentsTexture, index);\n }":"vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {\n return vec4();\n }"}(t.context))),je.defines.push(j),Ke.defines.push(`TEXTURE_UNITS ${i}`,K,me),o&&Ke.defines.push("APPLY_BRIGHTNESS"),r&&Ke.defines.push("APPLY_CONTRAST"),s&&Ke.defines.push("APPLY_HUE"),a&&Ke.defines.push("APPLY_SATURATION"),l&&Ke.defines.push("APPLY_GAMMA"),u&&Ke.defines.push("APPLY_ALPHA"),d&&Ke.defines.push("APPLY_DAY_NIGHT_ALPHA"),m&&(Ke.defines.push("SHOW_REFLECTIVE_OCEAN"),je.defines.push("SHOW_REFLECTIVE_OCEAN")),_&&Ke.defines.push("SHOW_OCEAN_WAVES"),M&&Ke.defines.push("APPLY_COLOR_TO_ALPHA"),G&&(je.defines.push("UNDERGROUND_COLOR"),Ke.defines.push("UNDERGROUND_COLOR")),W&&(je.defines.push("TRANSLUCENT"),Ke.defines.push("TRANSLUCENT")),p&&(w?(je.defines.push("ENABLE_VERTEX_LIGHTING"),Ke.defines.push("ENABLE_VERTEX_LIGHTING")):(je.defines.push("ENABLE_DAYNIGHT_SHADING"),Ke.defines.push("ENABLE_DAYNIGHT_SHADING"))),y&&(je.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),Ke.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),b&&(je.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),Ke.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),x&&(je.defines.push("GROUND_ATMOSPHERE"),Ke.defines.push("GROUND_ATMOSPHERE"),C&&(je.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),Ke.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),je.defines.push("INCLUDE_WEB_MERCATOR_Y"),Ke.defines.push("INCLUDE_WEB_MERCATOR_Y"),I&&(je.defines.push("FOG"),Ke.defines.push("FOG")),h&&Ke.defines.push("APPLY_SPLIT"),P&&Ke.defines.push("ENABLE_CLIPPING_PLANES"),R&&(Ke.defines.push("ENABLE_CLIPPING_POLYGONS"),je.defines.push("ENABLE_CLIPPING_POLYGONS"),B.inverse&&Ke.defines.push("CLIPPING_INVERSE"),Ke.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${B.extentsCount}`),je.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${B.extentsCount}`)),D&&Ke.defines.push("COLOR_CORRECT"),L&&Ke.defines.push("HIGHLIGHT_FILL_TILE"),U&&je.defines.push("GEODETIC_SURFACE_NORMALS"),z&&je.defines.push("EXAGGERATION");let Qt=" vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)\n {\n vec4 color = initialColor;\n";S&&(Qt+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(let Pt=0;Pt<i;++Pt)Qt+=S?` cutoutAndColorResult = u_dayTextureCutoutRectangles[${Pt}];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = sampleAndBlend(\n`:" color = sampleAndBlend(\n",Qt+=` color,\n u_dayTextures[${Pt}],\n u_dayTextureUseWebMercatorT[${Pt}] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle[${Pt}],\n u_dayTextureTranslationAndScale[${Pt}],\n ${u?`u_dayTextureAlpha[${Pt}]`:"1.0"},\n ${d?`u_dayTextureNightAlpha[${Pt}]`:"1.0"},\n${d?`u_dayTextureDayAlpha[${Pt}]`:"1.0"},\n${o?`u_dayTextureBrightness[${Pt}]`:"0.0"},\n ${r?`u_dayTextureContrast[${Pt}]`:"0.0"},\n ${s?`u_dayTextureHue[${Pt}]`:"0.0"},\n ${a?`u_dayTextureSaturation[${Pt}]`:"0.0"},\n ${l?`u_dayTextureOneOverGamma[${Pt}]`:"0.0"},\n ${h?`u_dayTextureSplit[${Pt}]`:"0.0"},\n ${M?`u_colorsToAlpha[${Pt}]`:"vec4(0.0)"},\n nightBlend );\n`,S&&(Qt+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n");Qt+=" return color;\n }",Ke.sources.push(Qt),je.sources.push(function q4e(e){let o;switch(e){case ce.SCENE3D:o="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }";break;case ce.SCENE2D:case ce.COLUMBUS_VIEW:o="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }";break;case ce.MORPHING:o="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }"}return o}(Se)),je.sources.push(function Z4e(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}(v));const nn=di.fromCache({context:t.context,vertexShaderSource:je,fragmentShaderSource:Ke,attributeLocations:Y.getAttributeLocations()});Oe=Ge[fe]=new W4e(i,fe,this.material,nn,ye,ve)}return n.surfaceShader=Oe,Oe.shaderProgram},WB.prototype.destroy=function(){let e,t;const n=this._shadersByTexturesFlags;for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];if(!c(o))continue;for(e in o)o.hasOwnProperty(e)&&(t=o[e],c(t)&&t.shaderProgram.destroy())}return Xe(this)};const $4e=WB,Es=Object.freeze({NONE:-1,PARTIAL:0,FULL:1}),pu=Object.freeze({START:0,LOADING:1,DONE:2,FAILED:3}),Ro=Object.freeze({FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6});function Go(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new de(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new f,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=Ro.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new Ae,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}Object.defineProperties(Go.prototype,{eligibleForUnloading:{get:function(){const e=this.terrainState;let n=!(e===Ro.RECEIVING||e===Ro.TRANSFORMING);const i=this.imagery;for(let o=0,r=i.length;n&&o<r;++o){const s=i[o];n=!c(s.loadingImagery)||s.loadingImagery.state!==Hi.TRANSITIONING}return n}},renderedMesh:{get:function(){return c(this.vertexArray)?this.mesh:c(this.fill)?this.fill.mesh:void 0}}});const K4e=new Ce;function qB(e,t,n,i,o,r){let s=e.getExaggeratedPosition(i,o,r);if(c(t)&&t!==ce.SCENE3D){const l=n.ellipsoid.cartesianToCartographic(s,K4e);s=n.project(l,r),s=f.fromElements(s.z,s.x,s.y,r)}return s}const Q4e=new f,J4e=new f,eHe=new f;function D$(e,t,n,i){const o=e.renderedMesh,r=o.vertices,s=o.encoding,a=r.length/s.stride;let l=Qy.clone(s);l.hasGeodeticSurfaceNormals=t,l=Qy.clone(l);const u=l.stride,d=new Float32Array(a*u);t?s.addGeodeticSurfaceNormals(r,d,n):s.removeGeodeticSurfaceNormals(r,d),o.vertices=d,o.stride=u,o!==e.mesh?(Go._freeVertexArray(e.fill.vertexArray),e.fill.vertexArray=Go._createVertexArrayForMesh(i.context,o)):(Go._freeVertexArray(e.vertexArray),e.vertexArray=Go._createVertexArrayForMesh(i.context,o)),Go._freeVertexArray(e.wireframeVertexArray),e.wireframeVertexArray=void 0}Go.prototype.pick=function(e,t,n,i,o){const r=this.renderedMesh;if(!c(r))return;const s=r.vertices,a=r.indices,l=r.encoding,u=a.length;let d=Number.MAX_VALUE;for(let h=0;h<u;h+=3){const _=a[h+1],p=a[h+2],y=qB(l,t,n,s,a[h],Q4e),b=qB(l,t,n,s,_,J4e),x=qB(l,t,n,s,p,eHe),C=So.rayTriangleParametric(e,y,b,x,i);c(C)&&C<d&&C>=0&&(d=C)}return d!==Number.MAX_VALUE?ii.getPoint(e,d,o):void 0},Go.prototype.freeResources=function(){c(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=Ro.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();const e=this.imagery;for(let t=0,n=e.length;t<n;++t)e[t].freeResources();this.imagery.length=0,this.freeVertexArray()},Go.prototype.freeVertexArray=function(){Go._freeVertexArray(this.vertexArray),this.vertexArray=void 0,Go._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0},Go.initialize=function(e,t,n){let i=e.data;c(i)||(i=e.data=new Go),e.state===pu.START&&(function tHe(e,t,n){let i=t.getTileDataAvailable(e.x,e.y,e.level);if(!c(i)&&c(e.parent)){const o=e.parent,r=o.data;c(r)&&c(r.terrainData)&&(i=r.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}!1===i&&(e.data.terrainState=Ro.FAILED);for(let o=0,r=n.length;o<r;++o){const s=n.get(o);s.show&&s._createTileImagerySkeletons(e,t)}}(e,t,n),e.state=pu.LOADING)},Go.processStateMachine=function(e,t,n,i,o,r,s){Go.initialize(e,n,i);const a=e.data;if(e.state===pu.LOADING&&function nHe(e,t,n,i,o,r){const s=e.data,a=e.parent;if(s.terrainState===Ro.FAILED&&void 0!==a&&(void 0!==a.data&&void 0!==a.data.terrainData&&!1!==a.data.terrainData.canUpsample||Go.processStateMachine(a,t,n,i,o,r,!0)),s.terrainState===Ro.FAILED&&function iHe(e,t,n,i,o,r,s){const a=t.parent;if(!a)return void(t.state=pu.FAILED);const l=a.data.terrainData,u=a.x,d=a.y,h=a.level;if(!c(l))return;const m=l.upsample(i.tilingScheme,u,d,h,o,r,s);c(m)&&(e.terrainState=Ro.RECEIVING,Promise.resolve(m).then(function(_){c(_)&&(e.terrainData=_,e.terrainState=Ro.RECEIVED)}).catch(function(){e.terrainState=Ro.FAILED}))}(s,e,0,n,e.x,e.y,e.level),s.terrainState===Ro.UNLOADED&&function oHe(e,t,n,i,o){function a(){const l=new h_({throttle:!1,throttleByServer:!0,type:f_.TERRAIN});e.request=l;const u=t.requestTileGeometry(n,i,o,l);c(u)?(e.terrainState=Ro.RECEIVING,Promise.resolve(u).then(function(d){!function r(l){if(!c(l))return e.terrainState=Ro.UNLOADED,void(e.request=void 0);e.terrainData=l,e.terrainState=Ro.RECEIVED,e.request=void 0}(d)}).catch(function(d){!function s(l){if(e.request.state===To.CANCELLED)return e.terrainData=void 0,e.terrainState=Ro.UNLOADED,void(e.request=void 0);e.terrainState=Ro.FAILED,e.request=void 0,t._requestError=Ka.reportError(t._requestError,t,t.errorEvent,`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${o}. Error message: "${l}"`,n,i,o),t._requestError.retry&&a()}(d)})):(e.terrainState=Ro.UNLOADED,e.request=void 0)}a()}(s,n,e.x,e.y,e.level),s.terrainState===Ro.RECEIVED&&function sHe(e,t,n,i,o,r){const a=rHe;a.tilingScheme=n.tilingScheme,a.x=i,a.y=o,a.level=r,a.exaggeration=t.verticalExaggeration,a.exaggerationRelativeHeight=t.verticalExaggerationRelativeHeight,a.throttle=!0;const u=e.terrainData.createMesh(a);c(u)&&(e.terrainState=Ro.TRANSFORMING,Promise.resolve(u).then(function(d){e.mesh=d,e.terrainState=Ro.TRANSFORMED}).catch(function(){e.terrainState=Ro.FAILED}))}(s,t,n,e.x,e.y,e.level),s.terrainState===Ro.TRANSFORMED&&(function aHe(e,t,n,i,o,r,s){e.vertexArray=Go._createVertexArrayForMesh(t,e.mesh),e.terrainState=Ro.READY,e.fill=e.fill&&e.fill.destroy(s)}(s,t.context,0,0,0,0,r),s.updateExaggeration(e,t,o)),s.terrainState>=Ro.RECEIVED&&void 0===s.waterMaskTexture&&n.hasWaterMask)if(void 0!==s.terrainData.waterMask)!function lHe(e,t){const n=t.terrainData.waterMask,i=function cHe(e){let t=e.cache.tile_waterMaskData;if(!c(t)){const n=Mn.create({context:e,pixelFormat:Ct.LUMINANCE,pixelDatatype:yt.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1,t={allWaterTexture:n,sampler:new vi({wrapS:zi.CLAMP_TO_EDGE,wrapT:zi.CLAMP_TO_EDGE,minificationFilter:Kn.LINEAR,magnificationFilter:Jr.LINEAR}),destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}(e);let o;const r=n.length;if(1===r){if(0===n[0])return;o=i.allWaterTexture}else{const s=Math.sqrt(r);o=Mn.create({context:e,pixelFormat:Ct.LUMINANCE,pixelDatatype:yt.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:i.sampler,flipY:!1}),o.referenceCount=0}++o.referenceCount,t.waterMaskTexture=o,de.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}(t.context,s);else{const u=s._findAncestorTileWithTerrainData(e);c(u)&&c(u.data.waterMaskTexture)&&(s.waterMaskTexture=u.data.waterMaskTexture,++s.waterMaskTexture.referenceCount,s._computeWaterMaskTranslationAndScale(e,u,s.waterMaskTranslationAndScale))}}(e,t,n,i,o,r),s)return;const l=e.renderable;e.renderable=c(a.vertexArray);const u=a.terrainState===Ro.READY;e.upsampledFromParent=c(a.terrainData)&&a.terrainData.wasCreatedByUpsampling();const d=a.processImagery(e,n,t);if(u&&d){const h=e._loadedCallbacks,m={};for(const _ in h)h.hasOwnProperty(_)&&(h[_](e)||(m[_]=h[_]));e._loadedCallbacks=m,e.state=pu.DONE}l&&(e.renderable=!0)},Go.prototype.processImagery=function(e,t,n,i){let r=e.upsampledFromParent,s=!1,a=!0;const l=e.data.imagery;let u,d;for(u=0,d=l.length;u<d;++u){const h=l[u];if(!c(h.loadingImagery)){r=!1;continue}if(h.loadingImagery.state===Hi.PLACEHOLDER){const _=h.loadingImagery.imageryLayer;if(_.ready){h.freeResources(),l.splice(u,1),_._createTileImagerySkeletons(e,t,u),--u,d=l.length;continue}r=!1}const m=h.processStateMachine(e,n,i);a=a&&m,s=s||m||c(h.readyImagery),r=r&&c(h.loadingImagery)&&(h.loadingImagery.state===Hi.FAILED||h.loadingImagery.state===Hi.INVALID)}return e.upsampledFromParent=r,e.renderable=e.renderable&&(s||a),a},Go.prototype.addGeodeticSurfaceNormals=function(e,t){D$(this,!0,e,t)},Go.prototype.removeGeodeticSurfaceNormals=function(e){D$(this,!1,void 0,e)},Go.prototype.updateExaggeration=function(e,t,n){const i=this,o=i.renderedMesh;if(void 0===o)return;const r=t.verticalExaggeration,s=t.verticalExaggerationRelativeHeight,a=1!==r,l=o.encoding,u=l.exaggeration!==r;if((u||l.exaggerationRelativeHeight!==s)&&(u&&(a&&!l.hasGeodeticSurfaceNormals?i.addGeodeticSurfaceNormals(e.tilingScheme.ellipsoid,t):!a&&l.hasGeodeticSurfaceNormals&&i.removeGeodeticSurfaceNormals(t)),l.exaggeration=r,l.exaggerationRelativeHeight=s,void 0!==n)){n._tileToUpdateHeights.push(e);const h=e.customData,m=h.length;for(let _=0;_<m;_++)h[_].level=-1}};const rHe={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};Go._createVertexArrayForMesh=function(e,t){const i=yn.createVertexBuffer({context:e,typedArray:t.vertices,usage:At.STATIC_DRAW}),o=t.encoding.getAttributes(i),r=t.indices.indexBuffers||{};let s=r[e.id];if(!c(s)||s.isDestroyed()){const a=t.indices;s=yn.createIndexBuffer({context:e,typedArray:a,usage:At.STATIC_DRAW,indexDatatype:Ot.fromSizeInBytes(a.BYTES_PER_ELEMENT)}),s.vertexArrayDestroyable=!1,s.referenceCount=1,r[e.id]=s,t.indices.indexBuffers=r}else++s.referenceCount;return new gs({context:e,attributes:o,indexBuffer:s})},Go._freeVertexArray=function(e){if(c(e)){const t=e.indexBuffer;e.isDestroyed()||e.destroy(),c(t)&&!t.isDestroyed()&&c(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}},Go.prototype._findAncestorTileWithTerrainData=function(e){let t=e.parent;for(;c(t)&&(!c(t.data)||!c(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t},Go.prototype._computeWaterMaskTranslationAndScale=function(e,t,n){const i=t.rectangle,o=e.rectangle,r=o.width,s=o.height,a=r/i.width,l=s/i.height;return n.x=a*(o.west-i.west)/r,n.y=l*(o.south-i.south)/s,n.z=a,n.w=l,n};const Bg=Go,Rn={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},P$={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>=P$.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}},Ci=P$;function kb(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 de}kb.prototype.update=function(e,t,n){this.changedThisFrame&&(M$(e,t,this.tile,n),this.changedThisFrame=!1)},kb.prototype.destroy=function(e){this._destroyVertexArray(e),c(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)},kb.prototype._destroyVertexArray=function(e){c(this.vertexArray)&&(c(e)?e.push(this.vertexArray):Bg._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};const uHe=new bL;function ls(e,t,n,i,o,r,s,a,l){if(void 0===i)return;let u=i;for(;u&&(u._lastSelectionResultFrame!==o||Ci.wasKicked(u._lastSelectionResult)||Ci.originalResult(u._lastSelectionResult)===Ci.CULLED);){if(s)return;const d=u.parent;if(r>=Rn.NORTHWEST&&void 0!==d)switch(r){case Rn.NORTHWEST:u=u===d.northwestChild?d:void 0;break;case Rn.NORTHEAST:u=u===d.northeastChild?d:void 0;break;case Rn.SOUTHWEST:u=u===d.southwestChild?d:void 0;break;case Rn.SOUTHEAST:u=u===d.southeastChild?d:void 0}else u=d}if(void 0!==u){if(u._lastSelectionResult===Ci.RENDERED){if(c(u.data.vertexArray))return;return void function dHe(e,t,n,i,o,r,s,a){const l=i.data;if(void 0===l.fill)l.fill=new kb(i);else if(l.fill.visitedFrame===r)return;l.fill.enqueuedFrame!==r&&(l.fill.enqueuedFrame=r,l.fill.changedThisFrame=!1,s.enqueue(i)),function fHe(e,t,n,i,o,r){const s=i.data.fill;let a;const l=n.data.fill;let u,d,h,m,_,p;switch(c(l)?(l.visitedFrame=t.frameNumber,l.changedThisFrame&&(M$(e,t,n,r),l.changedThisFrame=!1),a=n.data.fill.mesh):a=n.data.mesh,o){case Rn.WEST:u=s.westMeshes,d=s.westTiles;break;case Rn.SOUTH:u=s.southMeshes,d=s.southTiles;break;case Rn.EAST:u=s.eastMeshes,d=s.eastTiles;break;case Rn.NORTH:u=s.northMeshes,d=s.northTiles;break;case Rn.NORTHWEST:return s.changedThisFrame=s.changedThisFrame||s.northwestMesh!==a,s.northwestMesh=a,void(s.northwestTile=n);case Rn.NORTHEAST:return s.changedThisFrame=s.changedThisFrame||s.northeastMesh!==a,s.northeastMesh=a,void(s.northeastTile=n);case Rn.SOUTHWEST:return s.changedThisFrame=s.changedThisFrame||s.southwestMesh!==a,s.southwestMesh=a,void(s.southwestTile=n);case Rn.SOUTHEAST:return s.changedThisFrame=s.changedThisFrame||s.southeastMesh!==a,s.southeastMesh=a,void(s.southeastTile=n)}if(n.level<=i.level)return s.changedThisFrame=s.changedThisFrame||u[0]!==a||1!==u.length,u[0]=a,d[0]=n,u.length=1,void(d.length=1);const y=n.rectangle;let b;const x=i.rectangle;switch(o){case Rn.WEST:for(b=(x.north-x.south)*O.EPSILON5,h=0;h<d.length&&(_=d[h],p=_.rectangle,!O.greaterThan(y.north,p.south,b));++h);for(m=h;m<d.length&&(_=d[m],p=_.rectangle,!O.greaterThanOrEquals(y.south,p.north,b));++m);break;case Rn.SOUTH:for(b=(x.east-x.west)*O.EPSILON5,h=0;h<d.length&&(_=d[h],p=_.rectangle,!O.lessThan(y.west,p.east,b));++h);for(m=h;m<d.length&&(_=d[m],p=_.rectangle,!O.lessThanOrEquals(y.east,p.west,b));++m);break;case Rn.EAST:for(b=(x.north-x.south)*O.EPSILON5,h=0;h<d.length&&(_=d[h],p=_.rectangle,!O.lessThan(y.south,p.north,b));++h);for(m=h;m<d.length&&(_=d[m],p=_.rectangle,!O.lessThanOrEquals(y.north,p.south,b));++m);break;case Rn.NORTH:for(b=(x.east-x.west)*O.EPSILON5,h=0;h<d.length&&(_=d[h],p=_.rectangle,!O.greaterThan(y.east,p.west,b));++h);for(m=h;m<d.length&&(_=d[m],p=_.rectangle,!O.greaterThanOrEquals(y.west,p.east,b));++m);}m-h==1?(s.changedThisFrame=s.changedThisFrame||u[h]!==a,u[h]=a,d[h]=n):(s.changedThisFrame=!0,u.splice(h,m-h,a),d.splice(h,m-h,n))}(e,t,n,i,o,a)}(e,t,n,u,r,o,a,l)}if(Ci.originalResult(i._lastSelectionResult)!==Ci.CULLED)switch(r){case Rn.WEST:ls(e,t,n,i.northwestChild,o,r,!0,a,l),ls(e,t,n,i.southwestChild,o,r,!0,a,l);break;case Rn.EAST:ls(e,t,n,i.southeastChild,o,r,!0,a,l),ls(e,t,n,i.northeastChild,o,r,!0,a,l);break;case Rn.SOUTH:ls(e,t,n,i.southwestChild,o,r,!0,a,l),ls(e,t,n,i.southeastChild,o,r,!0,a,l);break;case Rn.NORTH:ls(e,t,n,i.northeastChild,o,r,!0,a,l),ls(e,t,n,i.northwestChild,o,r,!0,a,l);break;case Rn.NORTHWEST:ls(e,t,n,i.northwestChild,o,r,!0,a,l);break;case Rn.NORTHEAST:ls(e,t,n,i.northeastChild,o,r,!0,a,l);break;case Rn.SOUTHWEST:ls(e,t,n,i.southwestChild,o,r,!0,a,l);break;case Rn.SOUTHEAST:ls(e,t,n,i.southeastChild,o,r,!0,a,l);break;default:throw new E("Invalid edge")}}}kb.updateFillTiles=function(e,t,n,i){const o=e._quadtree,r=o._levelZeroTiles,s=o._lastSelectionFrameNumber,a=uHe;a.clear();for(let u=0;u<t.length;++u)c(t[u].data.vertexArray)&&a.enqueue(t[u]);let l=a.dequeue();for(;void 0!==l;){const u=l.findTileToWest(r),d=l.findTileToSouth(r),h=l.findTileToEast(r),m=l.findTileToNorth(r);ls(e,n,l,u,s,Rn.EAST,!1,a,i),ls(e,n,l,d,s,Rn.NORTH,!1,a,i),ls(e,n,l,h,s,Rn.WEST,!1,a,i),ls(e,n,l,m,s,Rn.SOUTH,!1,a,i);const _=u.findTileToNorth(r),p=u.findTileToSouth(r),y=h.findTileToNorth(r),b=h.findTileToSouth(r);ls(e,n,l,_,s,Rn.SOUTHEAST,!1,a,i),ls(e,n,l,y,s,Rn.SOUTHWEST,!1,a,i),ls(e,n,l,p,s,Rn.NORTHEAST,!1,a,i),ls(e,n,l,b,s,Rn.NORTHWEST,!1,a,i),l=a.dequeue()}};const kg=new Ce,hHe=new Ce,Ub=new f,YB=new f,XB=new V,ZB=new V,yl=new V;function sD(){this.height=0,this.encodedNormal=new V}function aD(e,t,n,i,o,r,s,a,l){if(c(o))return o;let u;if(c(r)&&c(s))u=.5*(r.height+s.height);else if(c(r))u=r.height;else if(c(s))u=s.height;else if(c(a))u=a.height;else{const h=e.tile.data.tileBoundingRegion;let m=0,_=0;c(h)&&(m=h.minimumHeight,_=h.maximumHeight),u=.5*(m+_)}return F$(0,t,0,0,u,l),l}const pHe={minimumHeight:0,maximumHeight:0},mHe=new f,O$=new sD,R$=new sD,L$=new sD,N$=new sD,_He=typeof Uint8Array<"u"?new Uint8Array(81):void 0,gHe={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function M$(e,t,n,i){Bg.initialize(n,e.terrainProvider,e._imageryLayers);const o=n.data,r=o.fill,s=n.rectangle,a=t.verticalExaggeration,l=t.verticalExaggerationRelativeHeight,u=1!==a,d=n.tilingScheme.ellipsoid;let h=uD(r,d,0,1,r.northwestTile,r.northwestMesh,r.northTiles,r.northMeshes,r.westTiles,r.westMeshes,L$),m=uD(r,d,0,0,r.southwestTile,r.southwestMesh,r.westTiles,r.westMeshes,r.southTiles,r.southMeshes,O$),_=uD(r,d,1,0,r.southeastTile,r.southeastMesh,r.southTiles,r.southMeshes,r.eastTiles,r.eastMeshes,R$),p=uD(r,d,1,1,r.northeastTile,r.northeastMesh,r.eastTiles,r.eastMeshes,r.northTiles,r.northMeshes,N$);h=aD(r,d,0,0,h,m,p,_,L$),m=aD(r,d,0,0,m,h,_,p,O$),_=aD(r,d,0,0,_,m,p,h,R$),p=aD(r,d,0,0,p,_,h,m,N$);const y=m.height,b=_.height,x=h.height,C=p.height;let w=Math.min(y,b,x,C),v=Math.max(y,b,x,C);const I=.5*(w+v);let P,N;const R=e.getLevelMaximumGeometricError(n.level);let F=4*Math.acos((d.maximumRadius-R)/d.maximumRadius);if(F*=1.5,s.width>F&&v-w<=R){const L=new RO({width:9,height:9,buffer:_He,structure:{heightOffset:v}}),M=gHe;M.tilingScheme=n.tilingScheme,M.x=n.x,M.y=n.y,M.level=n.level,M.exaggeration=a,M.exaggerationRelativeHeight=l,r.mesh=L._createMeshSync(M)}else{const L=u,M=Te.center(s,hHe);M.height=I;const U=d.cartographicToCartesian(M,mHe),z=new Qy(U,void 0,void 0,void 0,void 0,!0,!0,L,a,l);let W,G=5;for(W=r.westMeshes,P=0,N=W.length;P<N;++P)G+=W[P].eastIndicesNorthToSouth.length;for(W=r.southMeshes,P=0,N=W.length;P<N;++P)G+=W[P].northIndicesWestToEast.length;for(W=r.eastMeshes,P=0,N=W.length;P<N;++P)G+=W[P].westIndicesSouthToNorth.length;for(W=r.northMeshes,P=0,N=W.length;P<N;++P)G+=W[P].southIndicesEastToWest.length;const q=pHe;q.minimumHeight=w,q.maximumHeight=v;const j=z.stride;let Q=new Float32Array(G*j),Y=0;const ne=Y;Y=cD(d,s,z,Q,Y,0,1,h.height,h.encodedNormal,1,q),Y=fD(r,d,z,Q,Y,r.westTiles,r.westMeshes,Rn.EAST,q);const X=Y;Y=cD(d,s,z,Q,Y,0,0,m.height,m.encodedNormal,0,q),Y=fD(r,d,z,Q,Y,r.southTiles,r.southMeshes,Rn.NORTH,q);const K=Y;Y=cD(d,s,z,Q,Y,1,0,_.height,_.encodedNormal,0,q),Y=fD(r,d,z,Q,Y,r.eastTiles,r.eastMeshes,Rn.WEST,q);const $=Y;Y=cD(d,s,z,Q,Y,1,1,p.height,p.encodedNormal,1,q),Y=fD(r,d,z,Q,Y,r.northTiles,r.northMeshes,Rn.SOUTH,q),w=q.minimumHeight,v=q.maximumHeight;const me=Ao.fromRectangle(s,w,v,n.tilingScheme.ellipsoid),Se=or.geodeticLatitudeToMercatorAngle(s.south),fe=1/(or.geodeticLatitudeToMercatorAngle(s.north)-Se),ye=(or.geodeticLatitudeToMercatorAngle(M.latitude)-Se)*fe,ve=d.geodeticSurfaceNormalCartographic(kg,YB),Oe=wi.octEncode(ve,XB),Ge=Y;z.encode(Q,Y*j,me.center,V.fromElements(.5,.5,yl),I,Oe,ye,ve),++Y;const je=Y,Qt=3*(je-1);let ft;if((Q.length-je*j)*Float32Array.BYTES_PER_ELEMENT>=Qt*(je<256?1:2)){const Ie=je*j*Float32Array.BYTES_PER_ELEMENT;ft=je<256?new Uint8Array(Q.buffer,Ie,Qt):new Uint16Array(Q.buffer,Ie,Qt)}else ft=je<256?new Uint8Array(Qt):new Uint16Array(Qt);Q=new Float32Array(Q.buffer,0,je*j);let gn=0;for(P=0;P<je-2;++P)ft[gn++]=Ge,ft[gn++]=P,ft[gn++]=P+1;ft[gn++]=Ge,ft[gn++]=P,ft[gn++]=0;const Ft=[];for(P=X;P>=ne;--P)Ft.push(P);const Ht=[];for(P=K;P>=X;--P)Ht.push(P);const Cn=[];for(P=$;P>=K;--P)Cn.push(P);const pe=[];for(pe.push(0),P=Ge-1;P>=$;--P)pe.push(P);r.mesh=new Vw(z.center,Q,ft,Qt,je,w,v,Ae.fromOrientedBoundingBox(me),function EHe(e,t,n,i,o,r){const s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,l=CHe;return f.fromRadians(n.west,n.south,o,a,l[0]),f.fromRadians(n.east,n.south,o,a,l[1]),f.fromRadians(n.west,n.north,o,a,l[2]),f.fromRadians(n.east,n.north,o,a,l[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,i,r)}(e,me.center,s,w,v),z.stride,me,z,Ft,Ht,Cn,pe)}const S=t.context;r._destroyVertexArray(i),r.vertexArray=Bg._createVertexArrayForMesh(S,r.mesh),o.processImagery(n,e.terrainProvider,t,!0);const D=r.waterMaskTexture;if(r.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){const L=o._findAncestorTileWithTerrainData(n);c(L)&&c(L.data.waterMaskTexture)&&(r.waterMaskTexture=L.data.waterMaskTexture,++r.waterMaskTexture.referenceCount,o._computeWaterMaskTranslationAndScale(n,L,r.waterMaskTranslationAndScale))}c(D)&&(--D.referenceCount,0===D.referenceCount&&D.destroy())}function cD(e,t,n,i,o,r,s,a,l,u,d){const h=kg;h.longitude=O.lerp(t.west,t.east,r),h.latitude=O.lerp(t.south,t.north,s),h.height=a;const m=e.cartographicToCartesian(h,Ub);let _;n.hasGeodeticSurfaceNormals&&(_=e.geodeticSurfaceNormal(m,YB));const p=ZB;return p.x=r,p.y=s,n.encode(i,o*n.stride,m,p,a,l,u,_),d.minimumHeight=Math.min(d.minimumHeight,a),d.maximumHeight=Math.max(d.maximumHeight,a),o+1}const lD=new Te;function LC(e,t,n,i){let o=e.rectangle;const r=t.rectangle;0===t.x&&1===n.x&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?(o=Te.clone(e.rectangle,lD),o.west-=O.TWO_PI,o.east-=O.TWO_PI):0===e.x&&0===n.x&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&(o=Te.clone(e.rectangle,lD),o.west+=O.TWO_PI,o.east+=O.TWO_PI);const s=o.east-o.west,a=(r.west-o.west)/s,u=o.north-o.south,d=(r.south-o.south)/u;let m=(n.x-a)/((r.east-o.west)/s-a),_=(n.y-d)/((r.north-o.south)/u-d);return Math.abs(m)<Math.EPSILON5?m=0:Math.abs(m-1)<Math.EPSILON5&&(m=1),Math.abs(_)<Math.EPSILON5?_=0:Math.abs(_-1)<Math.EPSILON5&&(_=1),i.x=m,i.y=_,i}const yHe=new V;function $B(e,t,n,i,o){const r=e.encoding,s=e.vertices;if(o.height=r.decodeHeight(s,t),r.hasVertexNormals)r.getOctEncodedNormal(s,t,o.encodedNormal);else{const a=o.encodedNormal;a.x=0,a.y=0}}const bHe=new V,THe=new f;function F$(e,t,n,i,o,r){r.height=o;const s=t.geodeticSurfaceNormalCartographic(kg,Ub);wi.octEncode(s,r.encodedNormal)}function uD(e,t,n,i,o,r,s,a,l,u,d){if(k$(e,t,a,s,!1,n,i,d)||k$(e,t,u,l,!0,n,i,d))return d;let m,_;return KB(o,r)?(m=0===n?0===i?r.eastIndicesNorthToSouth[0]:r.southIndicesEastToWest[0]:0===i?r.northIndicesWestToEast[0]:r.westIndicesSouthToNorth[0],$B(r,m,0,0,d),d):(_=0===n?0===i?dD(e.westMeshes,e.westTiles,Rn.EAST,e.southMeshes,e.southTiles,Rn.NORTH,n,i):dD(e.northMeshes,e.northTiles,Rn.SOUTH,e.westMeshes,e.westTiles,Rn.EAST,n,i):0===i?dD(e.southMeshes,e.southTiles,Rn.NORTH,e.eastMeshes,e.eastTiles,Rn.WEST,n,i):dD(e.eastMeshes,e.eastTiles,Rn.WEST,e.northMeshes,e.northTiles,Rn.SOUTH,n,i),c(_)?(F$(0,t,0,0,_,d),d):void 0)}function dD(e,t,n,i,o,r,s,a){const l=B$(e,t,!1,n),u=B$(i,o,!0,r);return c(l)&&c(u)?.5*(l+u):c(l)?l:u}function fD(e,t,n,i,o,r,s,a,l){for(let u=0;u<r.length;++u)o=xHe(e,t,n,i,o,r[u],s[u],a,l);return o}function xHe(e,t,n,i,o,r,s,a,l){let u=r.rectangle;a===Rn.EAST&&0===e.tile.x?(u=Te.clone(r.rectangle,lD),u.west-=O.TWO_PI,u.east-=O.TWO_PI):a===Rn.WEST&&0===r.x&&(u=Te.clone(r.rectangle,lD),u.west+=O.TWO_PI,u.east+=O.TWO_PI);const d=e.tile.rectangle;let h,m,_,p;switch(o>0&&(n.decodeTextureCoordinates(i,o-1,yl),h=yl.x,m=yl.y),a){case Rn.WEST:_=s.westIndicesSouthToNorth,p=!1;break;case Rn.NORTH:_=s.northIndicesWestToEast,p=!0;break;case Rn.EAST:_=s.eastIndicesNorthToSouth,p=!1;break;case Rn.SOUTH:_=s.southIndicesEastToWest,p=!0}const y=r,b=e.tile,x=s.encoding,C=s.vertices,w=n.stride;let v,I;x.hasWebMercatorT&&(v=or.geodeticLatitudeToMercatorAngle(d.south),I=1/(or.geodeticLatitudeToMercatorAngle(d.north)-v));for(let P=0;P<_.length;++P){const N=_[P],R=x.decodeTextureCoordinates(C,N,yl);LC(y,b,R,R);const B=R.x,F=R.y,S=p?B:F;if(S<0||S>1||Math.abs(B-h)<O.EPSILON5&&Math.abs(F-m)<O.EPSILON5)continue;const D=Math.abs(B)<O.EPSILON5||Math.abs(B-1)<O.EPSILON5,L=Math.abs(F)<O.EPSILON5||Math.abs(F-1)<O.EPSILON5;if(D&&L)continue;const M=x.decodePosition(C,N,Ub),U=x.decodeHeight(C,N);let z;x.hasVertexNormals?z=x.getOctEncodedNormal(C,N,XB):(z=XB,z.x=0,z.y=0);let W,G=F;if(x.hasWebMercatorT){const q=O.lerp(d.south,d.north,F);G=(or.geodeticLatitudeToMercatorAngle(q)-v)*I}n.hasGeodeticSurfaceNormals&&(W=t.geodeticSurfaceNormal(M,YB)),n.encode(i,o*w,M,R,U,z,G,W),l.minimumHeight=Math.min(l.minimumHeight,U),l.maximumHeight=Math.max(l.maximumHeight,U),++o}return o}function B$(e,t,n,i,o,r){let s,a,l;n?(s=0,a=e.length,l=1):(s=e.length-1,a=-1,l=-1);for(let u=s;u!==a;u+=l){const d=e[u];if(!KB(t[u],d))continue;let m;switch(i){case Rn.WEST:m=d.westIndicesSouthToNorth;break;case Rn.SOUTH:m=d.southIndicesEastToWest;break;case Rn.EAST:m=d.eastIndicesNorthToSouth;break;case Rn.NORTH:m=d.northIndicesWestToEast}const _=m[n?0:m.length-1];if(c(_))return d.encoding.decodeHeight(d.vertices,_)}}function KB(e,t){return c(t)&&(!c(e.data.fill)||!e.data.fill.changedThisFrame)}function k$(e,t,n,i,o,r,s,a){let l,u,d,h,m;const _=i[o?0:n.length-1],p=n[o?0:n.length-1];if(KB(_,p)&&(0===r?0===s?(l=o?p.northIndicesWestToEast:p.eastIndicesNorthToSouth,u=o,d=o):(l=o?p.eastIndicesNorthToSouth:p.southIndicesEastToWest,u=!o,d=!1):0===s?(l=o?p.westIndicesSouthToNorth:p.northIndicesWestToEast,u=!o,d=!0):(l=o?p.southIndicesEastToWest:p.westIndicesSouthToNorth,u=o,d=!o),l.length>0)){h=o?0:l.length-1,m=l[h],p.encoding.decodeTextureCoordinates(p.vertices,m,yl);const y=LC(_,e.tile,yl,yl);if(y.x===r&&y.y===s)return $B(p,m,0,0,a),!0;if(h=Be(l,u?r:s,function(b,x){p.encoding.decodeTextureCoordinates(p.vertices,b,yl);const C=LC(_,e.tile,yl,yl);return d?u?C.x-r:C.y-s:u?r-C.x:s-C.y}),!(h<0))return $B(p,l[h],0,0,a),!0;if(h=~h,h>0&&h<l.length)return function AHe(e,t,n,i,o,r,s,a,l,u){const d=i.encoding,h=i.vertices,m=LC(t,n,d.decodeTextureCoordinates(h,o,yl),yl),_=LC(t,n,d.decodeTextureCoordinates(h,r,ZB),ZB);let p;p=l?(s-m.x)/(_.x-m.x):(a-m.y)/(_.y-m.y);const y=d.decodeHeight(h,o),b=d.decodeHeight(h,r),x=n.rectangle;let C;if(kg.longitude=O.lerp(x.west,x.east,s),kg.latitude=O.lerp(x.south,x.north,a),u.height=kg.height=O.lerp(y,b,p),d.hasVertexNormals){const w=d.getOctEncodedNormal(h,o,yHe),v=d.getOctEncodedNormal(h,r,bHe),I=wi.octDecode(w.x,w.y,Ub),P=wi.octDecode(v.x,v.y,THe);C=f.lerp(I,P,p,Ub),f.normalize(C,C),wi.octEncode(C,u.encodedNormal)}else C=e.geodeticSurfaceNormalCartographic(kg,Ub),wi.octEncode(C,u.encodedNormal)}(t,_,e.tile,p,l[h-1],l[h],r,s,u,a),!0}return!1}const CHe=[new f,new f,new f,new f],U$=kb;function jo(e){if(!c(e))throw new E("options is required.");if(!c(e.terrainProvider))throw new E("options.terrainProvider is required.");if(!c(e.imageryLayers))throw new E("options.imageryLayers is required.");if(!c(e.surfaceShaderSet))throw new E("options.surfaceShaderSet is required.");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=Ko.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 Ye,this._removeLayerAddedListener=this._imageryLayers.layerAdded.addEventListener(jo.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener(jo.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener(jo.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener(jo.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new Ye,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 Z(0,0,.5,1),this._clippingPlanes=void 0,this._clippingPolygons=void 0,this.cartographicLimitRectangle=Te.clone(Te.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldVerticalExaggeration=void 0,this._oldVerticalExaggerationRelativeHeight=void 0}function wHe(e,t){let n=e.loadingImagery;c(n)||(n=e.readyImagery);let i=t.loadingImagery;return c(i)||(i=t.readyImagery),n.imageryLayer._layerIndex-i.imageryLayer._layerIndex}function z$(e,t){const n=t.globeTranslucencyState;n.translucent?n.pushDerivedCommands(e,e.renderState.blending.enabled,t):t.commandList.push(e)}Object.defineProperties(jo.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){if(!c(e))throw new E("value is required.");this._baseColor=e,this._firstPassInitialColor=de.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){if(!c(e))throw new E("value is required.");this._quadtree=e}},tilingScheme:{get:function(){if(c(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,c(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){Gu.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){zA.setOwner(e,this,"_clippingPolygons")}}}),jo.prototype.update=function(e){this._imageryLayers._update()},jo.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(i){i.data.imagery.sort(wHe)})),function SHe(e,t){const n=t.creditDisplay,i=e._terrainProvider;c(i)&&c(i.credit)&&n.addCreditToNextFrame(i.credit);const o=e._imageryLayers;for(let r=0,s=o.length;r<s;++r){const a=o.get(r);a.ready&&a.show&&c(a.imageryProvider.credit)&&n.addCreditToNextFrame(a.imageryProvider.credit)}}(this,e);const t=this._vertexArraysToDestroy,n=t.length;for(let i=0;i<n;++i)Bg._freeVertexArray(t[i]);t.length=0},jo.prototype.beginUpdate=function(e){const t=this._tilesToRenderByTextureCount;for(let o=0,r=t.length;o<r;++o){const s=t[o];c(s)&&(s.length=0)}const n=this._clippingPlanes;c(n)&&n.enabled&&n.update(e);const i=this._clippingPolygons;c(i)&&i.enabled&&(i.update(e),i.queueCommands(e)),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1},jo.prototype.endUpdate=function(e){if(!c(this._renderState)){this._renderState=Lt.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:I_.LESS}}),this._blendRenderState=Lt.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:I_.LESS_OR_EQUAL},blending:eo.ALPHA_BLEND});let s=Rt(this._renderState,!0);s.cull.enabled=!1,this._disableCullingRenderState=Lt.fromCache(s),s=Rt(this._blendRenderState,!0),s.cull.enabled=!1,this._disableCullingBlendRenderState=Lt.fromCache(s)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&U$.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);const 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)});const r=this._tilesToRenderByTextureCount;for(let s=0,a=r.length;s<a;++s){const l=r[s];if(c(l))for(let u=0,d=l.length;u<d;++u){const h=l[u],m=h.data.tileBoundingRegion;$He(this,h,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,m.minimumHeight)}}},jo.prototype.updateForPick=function(e){const t=this._drawCommands;for(let n=0,i=this._usedDrawCommands;n<i;++n)z$(t[n],e)},jo.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},jo.prototype.getLevelMaximumGeometricError=function(e){return c(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(e):0},jo.prototype.loadTile=function(e,t){let o,n=t.data,i=!0;c(n)&&(i=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===Ci.CULLED_BUT_NEEDED,o=n.terrainState),Bg.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)!==Es.NONE&&n.boundingVolumeSourceTile===t&&(i=!1,Bg.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i))};const vHe=new Ae,V$=new Te,IHe=new Te,DHe=new Ce;function hD(e,t){if(t.west<t.east)return t;const n=Te.clone(t,IHe);return Te.center(e,DHe).longitude>0?n.east=O.PI:n.west=-O.PI,n}function H$(e,t){if(t.cameraUnderground||t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;const n=e._clippingPlanes;if(c(n)&&n.enabled)return!0;const i=e._clippingPolygons;return!!(c(i)&&i.enabled||!Te.equals(e.cartographicLimitRectangle,Te.MAX_VALUE))}jo.prototype.computeTileVisibility=function(e,t,n){const i=this.computeDistanceToTile(e,t);e._distance=i;const o=H$(this,t);if(t.fog.enabled&&!o&&O.fog(i,t.fog.density)>=1)return Es.NONE;const r=e.data,s=r.tileBoundingRegion;if(void 0===r.boundingVolumeSourceTile)return Es.PARTIAL;const a=t.cullingVolume;let l=s.boundingVolume;c(l)||(l=s.boundingSphere),r.clippedByBoundaries=!1;const u=hD(e.rectangle,this.cartographicLimitRectangle),d=Te.simpleIntersection(u,e.rectangle,V$);if(!c(d))return Es.NONE;if(Te.equals(d,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==ce.SCENE3D&&(l=vHe,Ae.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,s.minimumHeight,s.maximumHeight,l),f.fromElements(l.center.z,l.center.x,l.center.y,l.center),t.mode===ce.MORPHING&&c(r.renderedMesh)&&(l=Ae.union(s.boundingSphere,l,l))),!c(l))return Es.PARTIAL;const h=this._clippingPlanes;if(c(h)&&h.enabled){const b=h.computeIntersectionWithBoundingVolume(l);if(e.isClipped=b!==On.INSIDE,b===On.OUTSIDE)return Es.NONE}const m=this._clippingPolygons;if(c(m)&&m.enabled){const b=m.computeIntersectionWithBoundingVolume(s);e.isClipped=b!==On.OUTSIDE}let _;const p=a.computeVisibility(l);if(p===On.OUTSIDE?_=Es.NONE:p===On.INTERSECTING?_=Es.PARTIAL:p===On.INSIDE&&(_=Es.FULL),_===Es.NONE)return _;if(t.mode===ce.SCENE3D&&!(t.mode===ce.SCENE3D&&t.camera.frustum instanceof $n)&&c(n)&&!o){const b=r.occludeePointInScaledSpace;return!c(b)||n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(b,s.minimumHeight)?_:Es.NONE}return _},jo.prototype.canRefine=function(e){return!!c(e.data.terrainData)||void 0!==this.terrainProvider.getTileDataAvailable(2*e.x,2*e.y,e.level+1)};const PHe=[],OHe=[];jo.prototype.canRenderWithoutLosingDetail=function(e,t){const n=e.data,i=PHe;i.length=this._imageryLayers.length;let s,a,l,o=!1,r=!1;for(c(n)&&(o=n.terrainState===Ro.READY,r=!0,s=n.imagery),a=0,l=i.length;a<l;++a)i[a]=r;if(c(s))for(a=0,l=s.length;a<l;++a){const h=s[a],m=h.loadingImagery,_=!c(m)||m.state===Hi.FAILED||m.state===Hi.INVALID,p=(h.loadingImagery||h.readyImagery).imageryLayer._layerIndex;i[p]=_&&i[p]}const u=this.quadtree._lastSelectionFrameNumber,d=OHe;for(d.length=0,d.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);d.length>0;){const h=d.pop(),m=h._lastSelectionResultFrame===u?h._lastSelectionResult:Ci.NONE;if(m===Ci.RENDERED){if(!c(h.data))continue;if(!o&&h.data.terrainState===Ro.READY)return!1;const p=h.data.imagery;for(a=0,l=p.length;a<l;++a){const y=p[a],b=y.loadingImagery;if(!(c(b)&&b.state!==Hi.FAILED&&b.state!==Hi.INVALID||i[(y.loadingImagery||y.readyImagery).imageryLayer._layerIndex]))return!1}}else m===Ci.REFINED&&d.push(h.southwestChild,h.southeastChild,h.northwestChild,h.northeastChild)}return!0};const RHe=new f;jo.prototype.computeTileLoadPriority=function(e,t){const n=e.data;if(void 0===n)return 0;const i=n.tileBoundingRegion.boundingVolume;if(void 0===i)return 0;const r=t.camera.directionWC,s=f.subtract(i.center,t.camera.positionWC,RHe),a=f.magnitude(s);return a<O.EPSILON5?0:(f.divideByScalar(s,a,s),(1-f.dot(s,r))*e._distance)};const G$=new k,pD=new k,LHe=new de,NHe=new de,MHe=new de,FHe=new f,j$=new f,BHe=new f,kHe=new f;jo.prototype.showTileThisFrame=function(e,t){let n=0;const i=e.data.imagery;for(let a=0,l=i.length;a<l;++a){const u=i[a];c(u.readyImagery)&&0!==u.readyImagery.imageryLayer.alpha&&++n}let o=this._tilesToRenderByTextureCount[n];c(o)||(o=[],this._tilesToRenderByTextureCount[n]=o),o.push(e),c(e.data.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;const s=this._debug;++s.tilesRendered,s.texturesRendered+=n};const UHe=[new f,new f,new f,new f];function W$(e,t,n,i,o,r){const s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,l=UHe;return f.fromRadians(n.west,n.south,o,a,l[0]),f.fromRadians(n.east,n.south,o,a,l[1]),f.fromRadians(n.west,n.north,o,a,l[2]),f.fromRadians(n.east,n.north,o,a,l[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,i,r)}jo.prototype.computeDistanceToTile=function(e,t){!function zHe(e,t,n){let i=e.data;void 0===i&&(i=e.data=new Bg);const o=e.tilingScheme.ellipsoid;void 0===i.tileBoundingRegion&&(i.tileBoundingRegion=new Sx({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:o,minimumHeight:0,maximumHeight:0}));const r=i.tileBoundingRegion,s=r.minimumHeight,a=r.maximumHeight;let l=!1,u=e;const d=i.mesh,h=i.terrainData;if(void 0!==d&&void 0!==d.minimumHeight&&void 0!==d.maximumHeight)r.minimumHeight=d.minimumHeight,r.maximumHeight=d.maximumHeight,l=!0;else if(void 0!==h&&void 0!==h._minimumHeight&&void 0!==h._maximumHeight)r.minimumHeight=h._minimumHeight,r.maximumHeight=h._maximumHeight;else{r.minimumHeight=Number.NaN,r.maximumHeight=Number.NaN;let m=e.parent;for(;void 0!==m;){const _=m.data;if(void 0!==_){const p=_.mesh,y=_.terrainData;if(void 0!==p&&void 0!==p.minimumHeight&&void 0!==p.maximumHeight){r.minimumHeight=p.minimumHeight,r.maximumHeight=p.maximumHeight;break}if(void 0!==y&&void 0!==y._minimumHeight&&void 0!==y._maximumHeight){r.minimumHeight=y._minimumHeight,r.maximumHeight=y._maximumHeight;break}}m=m.parent}u=m}if(void 0!==u){const m=n.verticalExaggeration,_=n.verticalExaggerationRelativeHeight;1!==m&&(l=!1,r.minimumHeight=Ec.getHeight(r.minimumHeight,m,_),r.maximumHeight=Ec.getHeight(r.maximumHeight,m,_)),l?i.boundingVolumeIsFromMesh||(r._orientedBoundingBox=Ao.clone(d.orientedBoundingBox,r._orientedBoundingBox),r._boundingSphere=Ae.clone(d.boundingSphere3D,r._boundingSphere),i.occludeePointInScaledSpace=f.clone(d.occludeePointInScaledSpace,i.occludeePointInScaledSpace),c(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=W$(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace))):(r.minimumHeight!==s||r.maximumHeight!==a||void 0===r._orientedBoundingBox||void 0===r._boundingSphere)&&(r.computeBoundingVolumes(o),i.occludeePointInScaledSpace=W$(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace)),i.boundingVolumeSourceTile=u,i.boundingVolumeIsFromMesh=l}else i.boundingVolumeSourceTile=void 0,i.boundingVolumeIsFromMesh=!1}(e,this,t);const n=e.data;if(void 0===n.boundingVolumeSourceTile)return 9999999999;const o=n.tileBoundingRegion,r=o.minimumHeight,s=o.maximumHeight;if(n.boundingVolumeSourceTile!==e){const l=t.camera.positionCartographic.height;Math.abs(l-r)>Math.abs(l-s)?(o.minimumHeight=r,o.maximumHeight=r):(o.minimumHeight=s,o.maximumHeight=s)}const a=o.distanceToCamera(t);return o.minimumHeight=r,o.maximumHeight=s,a},jo.prototype.isDestroyed=function(){return!1},jo.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(),Xe(this)},jo.prototype._onLayerAdded=function(e,t){if(!this.isDestroyed()&&e.show){const n=this._terrainProvider,i=this,o=this._imageryLayersUpdatedEvent,r=function(){e._imageryCache={},i._quadtree.forEachLoadedTile(function(s){if(c(s._loadedCallbacks[e._layerIndex]))return;let a;const l=s.data.imagery,u=l.length;let d=-1,h=0;for(a=0;a<u;++a){const _=l[a];if(g(_.readyImagery,_.loadingImagery).imageryLayer===e)-1===d&&(d=a),++h;else if(-1!==d)break}-1!==d&&e._createTileImagerySkeletons(s,n,d+h)&&(s._loadedCallbacks[e._layerIndex]=function VHe(e,t,n){return function(i){let o,r,s=-1;const a=i.data.imagery,l=a.length;let u;for(u=0;u<l;++u)if(o=a[u],r=g(o.readyImagery,o.loadingImagery),r.imageryLayer===t){s=u;break}if(-1!==s){const d=s+e;if(o=a[d],r=c(o)?g(o.readyImagery,o.loadingImagery):void 0,!c(r)||r.imageryLayer!==t)return!t._createTileImagerySkeletons(i,n,d);for(u=s;u<d;++u)a[u].freeResources();a.splice(s,e)}return!0}}(h,e,n),s.state=pu.LOADING)})};e.ready&&(e.imageryProvider._reload=r),this._quadtree.forEachLoadedTile(function(s){e._createTileImagerySkeletons(s,n)&&(s.state=pu.LOADING,0!==s.level&&(s._lastSelectionResultFrame!==i.quadtree._lastSelectionFrameNumber||s._lastSelectionResult!==Ci.RENDERED)&&(s.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}},jo.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile(function(n){const i=n.data.imagery;let o=-1,r=0;for(let s=0,a=i.length;s<a;++s){const l=i[s];let u=l.loadingImagery;if(c(u)||(u=l.readyImagery),u.imageryLayer===e)-1===o&&(o=s),l.freeResources(),++r;else if(-1!==o)break}-1!==o&&i.splice(o,r)}),c(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()},jo.prototype._onLayerMoved=function(e,t,n){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()},jo.prototype._onLayerShownOrHidden=function(e,t,n){n?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};const HHe=new k,GHe=new k;function q$(e,t){const 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(){const i=e.context.uniformState.view,o=k.multiplyByPoint(i,this.properties.rtc,j$);return k.setTranslation(i,o,G$),G$},u_modifiedModelViewProjection:function(){const i=e.context.uniformState.view,o=e.context.uniformState.projection,r=k.multiplyByPoint(i,this.properties.rtc,j$);return k.setTranslation(i,r,pD),k.multiply(o,pD,pD),pD},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(){const i=t._clippingPlanes;return c(i)&&c(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){const i=t._clippingPlanes,o=c(i)?k.multiply(e.context.uniformState.view,i.modelMatrix,HHe):k.IDENTITY;return k.inverseTranspose(o,GHe)},u_clippingPlanesEdgeStyle:function(){const i=this.properties.clippingPlanesEdgeColor;return i.alpha=this.properties.clippingPlanesEdgeWidth,i},u_clippingDistance:function(){const i=t._clippingPolygons.clippingTexture;return c(i)?i:e.context.defaultTexture},u_clippingExtents:function(){const i=t._clippingPolygons.extentsTexture;return c(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 de(0,0,.5,1),fillHighlightColor:new Z(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new V(65e5,9e6),nightFadeDistance:new V(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new f(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new f(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new f,center3D:void 0,rtc:new f,modifiedModelView:new k,tileRectangle:new de,verticalExaggerationAndRelativeHeight:new V(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new V,southMercatorYAndOneOverHeight:new V,waterMask:void 0,waterMaskTranslationAndScale:new de,minMaxHeight:new V,scaleAndBias:new k,clippingPlanesEdgeColor:Z.clone(Z.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new de,frontFaceAlphaByDistance:new de,backFaceAlphaByDistance:new de,localizedTranslucencyRectangle:new de,undergroundColor:Z.clone(Z.TRANSPARENT),undergroundColorAlphaByDistance:new de,lambertDiffuseMultiplier:0,vertexShadowDarkness:0}};return c(t.materialUniformMap)?Pn(n,t.materialUniformMap):n}function jHe(e,t,n){const i=n.data;let o,r;if(c(i.vertexArray)?(o=i.mesh,r=i.vertexArray):c(i.fill)&&c(i.fill.vertexArray)&&(o=i.fill.mesh,r=i.fill.vertexArray),c(o)&&c(r)){if(c(i.wireframeVertexArray)){if(i.wireframeVertexArray.mesh===o)return;i.wireframeVertexArray.destroy(),i.wireframeVertexArray=void 0}i.wireframeVertexArray=function WHe(e,t,n){const o={indices:n.indices,primitiveType:Tt.TRIANGLES};ao.toWireframe(o);const r=o.indices,s=yn.createIndexBuffer({context:e,typedArray:r,usage:At.STATIC_DRAW,indexDatatype:Ot.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new gs({context:e,attributes:t._attributes,indexBuffer:s})}(e,r,o),i.wireframeVertexArray.mesh=o}}let Y$,X$,mD;!function(){const e=new zn({geometry:Fv.fromDimensions({dimensions:new f(2,2,2)})}),t=new zn({geometry:new xM({radius:1})});let i,o,n=new k;function r(s){return new Yi({geometryInstances:s,appearance:new gi({translucent:!1,flat:!0}),asynchronous:!1})}Y$=function(s,a){return s===i||(mD(),i=s,n=k.fromRotationTranslation(s.halfAxes,s.center,n),e.modelMatrix=n,e.attributes.color=ei.fromColor(a),o=r(e)),o},X$=function(s,a){return s===i||(mD(),i=s,n=k.fromTranslation(s.center,n),n=k.multiplyByUniformScale(n,s.radius,n),t.modelMatrix=n,t.attributes.color=ei.fromColor(a),o=r(t)),o},mD=function(){c(o)&&(o.destroy(),o=void 0,i=void 0)}}();const qHe=new de(0,0,0,0),YHe={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},XHe=Z.TRANSPARENT,ZHe=new Bn;function $He(e,t,n){const i=t.data;c(i.vertexArray)||(void 0===i.fill&&(i.fill=new U$(t)),i.fill.update(e,n));const o=n.creditDisplay,r=i.terrainData;if(c(r)&&c(r.credits)){const pe=r.credits;for(let Ie=0,on=pe.length;Ie<on;++Ie)o.addCreditToNextFrame(pe[Ie])}let s=dn.maximumTextureImageUnits,a=i.waterMaskTexture,l=i.waterMaskTranslationAndScale;!c(a)&&c(i.fill)&&(a=i.fill.waterMaskTexture,l=i.fill.waterMaskTranslationAndScale);const u=n.cameraUnderground,d=n.globeTranslucencyState,h=d.translucent,m=d.frontFaceAlphaByDistance,_=d.backFaceAlphaByDistance,p=d.rectangle,y=g(e.undergroundColor,XHe),b=g(e.undergroundColorAlphaByDistance,ZHe),x=H$(e,n)&&n.mode===ce.SCENE3D&&y.alpha>0&&(b.nearValue>0||b.farValue>0),C=e.lambertDiffuseMultiplier,w=e.vertexShadowDarkness,v=e.hasWaterMask&&c(a),I=e.oceanNormalMap,P=v&&c(I),R=c(e.terrainProvider)&&e.terrainProvider.hasVertexNormals,B=n.fog.enabled&&n.fog.renderable&&!u,F=e.showGroundAtmosphere&&n.mode===ce.SCENE3D,S=Ko.castShadows(e.shadows)&&!h,D=Ko.receiveShadows(e.shadows)&&!h,L=e.hueShift,M=e.saturationShift,U=e.brightnessShift;let z=!(O.equalsEpsilon(L,0,O.EPSILON7)&&O.equalsEpsilon(M,0,O.EPSILON7)&&O.equalsEpsilon(U,0,O.EPSILON7)),G=!1;F&&(G=f.magnitude(n.camera.positionWC)>e.nightFadeOutDistance),v&&--s,P&&--s,c(n.shadowState)&&n.shadowState.shadowsEnabled&&--s,c(e.clippingPlanes)&&e.clippingPlanes.enabled&&--s,c(e.clippingPolygons)&&e.clippingPolygons.enabled&&(--s,--s),s-=d.numberOfTextureUniforms;const W=i.renderedMesh;let q=W.center;const j=W.encoding,Q=i.tileBoundingRegion,Y=n.verticalExaggeration,ne=n.verticalExaggerationRelativeHeight,X=1!==Y,K=j.hasGeodeticSurfaceNormals,$=LHe;let me=0,Se=0,fe=0,ye=0,ve=!1;if(n.mode!==ce.SCENE3D){const pe=n.mapProjection,Ie=pe.project(Te.southwest(t.rectangle),BHe),on=pe.project(Te.northeast(t.rectangle),kHe);if($.x=Ie.x,$.y=Ie.y,$.z=on.x,$.w=on.y,n.mode!==ce.MORPHING&&(q=FHe,q.x=0,q.y=.5*($.z+$.x),q.z=.5*($.w+$.y),$.x-=q.y,$.y-=q.z,$.z-=q.y,$.w-=q.z),n.mode===ce.SCENE2D&&j.quantization===tl.BITS12){const Bt=1/(Math.pow(2,12)-1)*.5,Gi=($.z-$.x)*Bt,qo=($.w-$.y)*Bt;$.x-=Gi,$.y-=qo,$.z+=Gi,$.w+=qo}pe instanceof or&&(me=t.rectangle.south,Se=t.rectangle.north,fe=or.geodeticLatitudeToMercatorAngle(me),ye=1/(or.geodeticLatitudeToMercatorAngle(Se)-fe),ve=!0)}const Oe=YHe;Oe.frameState=n,Oe.surfaceTile=i,Oe.showReflectiveOcean=v,Oe.showOceanWaves=P,Oe.enableLighting=e.enableLighting,Oe.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,Oe.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,Oe.showGroundAtmosphere=F,Oe.atmosphereLightIntensity=e.atmosphereLightIntensity,Oe.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,Oe.atmosphereMieCoefficient=e.atmosphereMieCoefficient,Oe.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,Oe.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,Oe.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,Oe.perFragmentGroundAtmosphere=G,Oe.hasVertexNormals=R,Oe.useWebMercatorProjection=ve,Oe.clippedByBoundaries=i.clippedByBoundaries,Oe.hasGeodeticSurfaceNormals=K,Oe.hasExaggeration=X;const Ge=i.imagery;let je=0;const Ke=Ge.length,Qt=e.showSkirts&&!u&&!h,nn=e.backFaceCulling&&!u&&!h,ft=nn?e._blendRenderState:e._disableCullingBlendRenderState;let gn=nn?e._renderState:e._disableCullingRenderState,Ft=e._firstPassInitialColor;const Ht=n.context;if(c(e._debug.boundingSphereTile)||mD(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;const pe=e._drawCommands.length;for(let Ie=0;Ie<pe;++Ie)e._uniformMaps[Ie]=q$(n,e)}do{let Ie,on,pe=0;if(e._drawCommands.length<=e._usedDrawCommands?(Ie=new $t,Ie.owner=t,Ie.cull=!1,Ie.boundingVolume=new Ae,Ie.orientedBoundingBox=void 0,on=q$(n,e),e._drawCommands.push(Ie),e._uniformMaps.push(on)):(Ie=e._drawCommands[e._usedDrawCommands],on=e._uniformMaps[e._usedDrawCommands]),Ie.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){const Kc=Q.boundingVolume,Rl=Q.boundingSphere;c(Kc)?Y$(Kc,Z.RED).update(n):c(Rl)&&X$(Rl,Z.RED).update(n)}const Bt=on.properties;de.clone(Ft,Bt.initialColor),Bt.oceanNormalMap=I,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;const Gi=u?_:m,qo=u?m:_;c(Gi)&&(de.fromElements(Gi.near,Gi.nearValue,Gi.far,Gi.farValue,Bt.frontFaceAlphaByDistance),de.fromElements(qo.near,qo.nearValue,qo.far,qo.farValue,Bt.backFaceAlphaByDistance)),de.fromElements(b.near,b.nearValue,b.far,b.farValue,Bt.undergroundColorAlphaByDistance),Z.clone(y,Bt.undergroundColor),Bt.lambertDiffuseMultiplier=C,Bt.vertexShadowDarkness=w;const ua=!c(i.vertexArray)&&c(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;ua&&Z.clone(e.fillHighlightColor,Bt.fillHighlightColor),Bt.verticalExaggerationAndRelativeHeight.x=Y,Bt.verticalExaggerationAndRelativeHeight.y=ne,Bt.center3D=W.center,f.clone(q,Bt.rtc),de.clone($,Bt.tileRectangle),Bt.southAndNorthLatitude.x=me,Bt.southAndNorthLatitude.y=Se,Bt.southMercatorYAndOneOverHeight.x=fe,Bt.southMercatorYAndOneOverHeight.y=ye;const ja=NHe,da=hD(t.rectangle,e.cartographicLimitRectangle),Wa=MHe,Qe=hD(t.rectangle,p);f.fromElements(L,M,U,Bt.hsbShift);const ut=t.rectangle,lt=1/ut.width,st=1/ut.height;ja.x=(da.west-ut.west)*lt,ja.y=(da.south-ut.south)*st,ja.z=(da.east-ut.west)*lt,ja.w=(da.north-ut.south)*st,de.clone(ja,Bt.localizedCartographicLimitRectangle),Wa.x=(Qe.west-ut.west)*lt,Wa.y=(Qe.south-ut.south)*st,Wa.z=(Qe.east-ut.west)*lt,Wa.w=(Qe.north-ut.south)*st,de.clone(Wa,Bt.localizedTranslucencyRectangle);const Gt=B&&O.fog(t._distance,n.fog.density)>O.EPSILON3;z=z&&(Gt||F);let an=!1,Vn=!1,Yo=!1,Sr=!1,Zc=!1,$c=!1,Yr=!1,fo=!1,qa=!1,Ss=!1;for(;pe<s&&je<Ke;){const Kc=Ge[je],Rl=Kc.readyImagery;if(++je,!c(Rl)||0===Rl.imageryLayer.alpha)continue;const mz=Kc.useWebMercatorT?Rl.textureWebMercator:Rl.texture;if(!c(mz))throw new E("readyImagery is not actually ready!");const hs=Rl.imageryLayer;c(Kc.textureTranslationAndScale)||(Kc.textureTranslationAndScale=hs._calculateTextureTranslationAndScale(t,Kc)),Bt.dayTextures[pe]=mz,Bt.dayTextureTranslationAndScale[pe]=Kc.textureTranslationAndScale,Bt.dayTextureTexCoordsRectangle[pe]=Kc.textureCoordinateRectangle,Bt.dayTextureUseWebMercatorT[pe]=Kc.useWebMercatorT,Bt.dayTextureAlpha[pe]=hs.alpha,$c=$c||1!==Bt.dayTextureAlpha[pe],Bt.dayTextureNightAlpha[pe]=hs.nightAlpha,Yr=Yr||1!==Bt.dayTextureNightAlpha[pe],Bt.dayTextureDayAlpha[pe]=hs.dayAlpha,Yr=Yr||1!==Bt.dayTextureDayAlpha[pe],Bt.dayTextureBrightness[pe]=hs.brightness,an=an||Bt.dayTextureBrightness[pe]!==Lc.DEFAULT_BRIGHTNESS,Bt.dayTextureContrast[pe]=hs.contrast,Vn=Vn||Bt.dayTextureContrast[pe]!==Lc.DEFAULT_CONTRAST,Bt.dayTextureHue[pe]=hs.hue,Yo=Yo||Bt.dayTextureHue[pe]!==Lc.DEFAULT_HUE,Bt.dayTextureSaturation[pe]=hs.saturation,Sr=Sr||Bt.dayTextureSaturation[pe]!==Lc.DEFAULT_SATURATION,Bt.dayTextureOneOverGamma[pe]=1/hs.gamma,Zc=Zc||Bt.dayTextureOneOverGamma[pe]!==1/Lc.DEFAULT_GAMMA,Bt.dayTextureSplit[pe]=hs.splitDirection,fo=fo||0!==Bt.dayTextureSplit[pe];let rp=Bt.dayTextureCutoutRectangles[pe];if(c(rp)||(rp=Bt.dayTextureCutoutRectangles[pe]=new de),de.clone(de.ZERO,rp),c(hs.cutoutRectangle)){const vs=hD(ut,hs.cutoutRectangle),Xs=Te.simpleIntersection(vs,ut,V$);qa=c(Xs)||qa,rp.x=(vs.west-ut.west)*lt,rp.y=(vs.south-ut.south)*st,rp.z=(vs.east-ut.west)*lt,rp.w=(vs.north-ut.south)*st}let sp=Bt.colorsToAlpha[pe];c(sp)||(sp=Bt.colorsToAlpha[pe]=new de);const _P=c(hs.colorToAlpha)&&hs.colorToAlphaThreshold>0;if(Ss=Ss||_P,_P){const vs=hs.colorToAlpha;sp.x=vs.red,sp.y=vs.green,sp.z=vs.blue,sp.w=hs.colorToAlphaThreshold}else sp.w=-1;if(c(Rl.credits)){const vs=Rl.credits;for(let Xs=0,YE=vs.length;Xs<YE;++Xs)o.addCreditToNextFrame(vs[Xs])}++pe}Bt.dayTextures.length=pe,Bt.waterMask=a,de.clone(l,Bt.waterMaskTranslationAndScale),Bt.minMaxHeight.x=j.minimumHeight,Bt.minMaxHeight.y=j.maximumHeight,k.clone(j.matrix,Bt.scaleAndBias);const Pu=e._clippingPlanes,hr=c(Pu)&&Pu.enabled&&t.isClipped;hr&&(Bt.clippingPlanesEdgeColor=Z.clone(Pu.edgeColor,Bt.clippingPlanesEdgeColor),Bt.clippingPlanesEdgeWidth=Pu.edgeWidth);const Xr=e._clippingPolygons,WE=c(Xr)&&Xr.enabled&&t.isClipped;Oe.numberOfDayTextures=pe,Oe.applyBrightness=an,Oe.applyContrast=Vn,Oe.applyHue=Yo,Oe.applySaturation=Sr,Oe.applyGamma=Zc,Oe.applyAlpha=$c,Oe.applyDayNightAlpha=Yr,Oe.applySplit=fo,Oe.enableFog=Gt,Oe.enableClippingPlanes=hr,Oe.clippingPlanes=Pu,Oe.enableClippingPolygons=WE,Oe.clippingPolygons=Xr,Oe.hasImageryLayerCutout=qa,Oe.colorCorrect=z,Oe.highlightFillTile=ua,Oe.colorToAlpha=Ss,Oe.showUndergroundColor=x,Oe.translucent=h;let Pl=i.renderedMesh.indices.length;Qt||(Pl=i.renderedMesh.indexCountWithoutSkirts),Ie.shaderProgram=e._surfaceShaderSet.getShaderProgram(Oe),Ie.castShadows=S,Ie.receiveShadows=D,Ie.renderState=gn,Ie.primitiveType=Tt.TRIANGLES,Ie.vertexArray=i.vertexArray||i.fill.vertexArray,Ie.count=Pl,Ie.uniformMap=on,Ie.pass=Ue.GLOBE,e._debug.wireframe&&(jHe(Ht,0,t),c(i.wireframeVertexArray)&&(Ie.vertexArray=i.wireframeVertexArray,Ie.primitiveType=Tt.LINES,Ie.count=2*Pl));let Ol=Ie.boundingVolume;const qE=Ie.orientedBoundingBox;n.mode!==ce.SCENE3D?(Ae.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,Q.minimumHeight,Q.maximumHeight,Ol),f.fromElements(Ol.center.z,Ol.center.x,Ol.center.y,Ol.center),n.mode===ce.MORPHING&&(Ol=Ae.union(Q.boundingSphere,Ol,Ol))):(Ie.boundingVolume=Ae.clone(Q.boundingSphere,Ol),Ie.orientedBoundingBox=Ao.clone(Q.boundingVolume,qE)),Ie.dirty=!0,h&&d.updateDerivedCommands(Ie,n),z$(Ie,n),gn=ft,Ft=qHe}while(je<Ke)}const KHe=jo;function Z$(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=Te.clone(Te.MAX_VALUE)}Object.defineProperties(Z$.prototype,{enabled:{get:function(){return this._enabled},set:function(e){A.typeOf.bool("enabled",e),this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){A.typeOf.number.greaterThanOrEquals("frontFaceAlpha",e,0),A.typeOf.number.lessThanOrEquals("frontFaceAlpha",e,1),this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){if(c(e)&&e.far<e.near)throw new E("far distance must be greater than near distance.");this._frontFaceAlphaByDistance=Bn.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){A.typeOf.number.greaterThanOrEquals("backFaceAlpha",e,0),A.typeOf.number.lessThanOrEquals("backFaceAlpha",e,1),this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){if(c(e)&&e.far<e.near)throw new E("far distance must be greater than near distance.");this._backFaceAlphaByDistance=Bn.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){c(e)||(e=Te.clone(Te.MAX_VALUE)),Te.clone(e,this._rectangle)}}});const QHe=Z$;function us(){this._layers=[],this.layerAdded=new Ye,this.layerRemoved=new Ye,this.layerMoved=new Ye,this.layerShownOrHidden=new Ye}function _D(e,t){if(!c(t))throw new E("layer is required.");const n=e.indexOf(t);if(-1===n)throw new E("layer is not in this collection.");return n}function $$(e,t,n){const i=e._layers;if((t=O.clamp(t,0,i.length-1))===(n=O.clamp(n,0,i.length-1)))return;const o=i[t];i[t]=i[n],i[n]=o,e._update(),e.layerMoved.raiseEvent(o,n,t)}Object.defineProperties(us.prototype,{length:{get:function(){return this._layers.length}}}),us.prototype.add=function(e,t){const n=c(t);if(!c(e))throw new E("layer is required.");if(n){if(t<0)throw new E("index must be greater than or equal to zero.");if(t>this._layers.length)throw new E("index must be less than or equal to the number of layers.")}n?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t);const i=e.readyEvent.addEventListener(()=>{this.layerShownOrHidden.raiseEvent(e,e._layerIndex,e.show),i()})},us.prototype.addImageryProvider=function(e,t){if(!c(e))throw new E("imageryProvider is required.");const n=new Lc(e);return this.add(n,t),n},us.prototype.remove=function(e,t){t=g(t,!0);const n=this._layers.indexOf(e);return-1!==n&&(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0)},us.prototype.removeAll=function(e){e=g(e,!0);const t=this._layers;for(let n=0,i=t.length;n<i;n++){const o=t[n];this.layerRemoved.raiseEvent(o,n),e&&o.destroy()}this._layers=[]},us.prototype.contains=function(e){return-1!==this.indexOf(e)},us.prototype.indexOf=function(e){return this._layers.indexOf(e)},us.prototype.get=function(e){if(!c(e))throw new E("index is required.","index");return this._layers[e]},us.prototype.raise=function(e){const t=_D(this._layers,e);$$(this,t,t+1)},us.prototype.lower=function(e){const t=_D(this._layers,e);$$(this,t,t-1)},us.prototype.raiseToTop=function(e){const t=_D(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))},us.prototype.lowerToBottom=function(e){const t=_D(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};const JHe=new Te;function K$(e,t,n,i){const o=e.globe._surface._tilesToRender;let r;for(let a=0;!c(r)&&a<o.length;++a){const l=o[a];Te.contains(l.rectangle,t)&&(r=l)}if(!c(r))return;const s=r.data.imagery;for(let a=s.length-1;a>=0;--a){const l=s[a],u=l.readyImagery;if(!c(u)||!u.imageryLayer.ready)continue;if(n&&!c(u.imageryLayer.imageryProvider.pickFeatures)||!Te.contains(u.rectangle,t))continue;const h=JHe,m=1/1024;h.west=O.lerp(r.rectangle.west,r.rectangle.east,l.textureCoordinateRectangle.x-m),h.east=O.lerp(r.rectangle.west,r.rectangle.east,l.textureCoordinateRectangle.z+m),h.south=O.lerp(r.rectangle.south,r.rectangle.north,l.textureCoordinateRectangle.y-m),h.north=O.lerp(r.rectangle.south,r.rectangle.north,l.textureCoordinateRectangle.w+m),Te.contains(h,t)&&i(u)}}us.prototype.pickImageryLayers=function(e,t){const n=t.globe.pick(e,t);if(!c(n))return;const i=t.ellipsoid.cartesianToCartographic(n),o=[];return K$(t,i,!1,function(r){o.push(r.imageryLayer)}),0!==o.length?o:void 0},us.prototype.pickImageryLayerFeatures=function(e,t){const n=t.globe.pick(e,t);if(!c(n))return;const i=t.ellipsoid.cartesianToCartographic(n),o=[],r=[];return K$(t,i,!0,function(s){if(!s.imageryLayer.ready)return;const l=s.imageryLayer.imageryProvider.pickFeatures(s.x,s.y,s.level,i.longitude,i.latitude);c(l)&&(o.push(l),r.push(s.imageryLayer))}),0!==o.length?Promise.all(o).then(function(s){const a=[];for(let l=0;l<s.length;++l){const u=s[l],d=r[l];if(c(u)&&u.length>0)for(let h=0;h<u.length;++h){const m=u[h];m.imageryLayer=d,c(m.position)||(m.position=i),a.push(m)}}return a}):void 0},us.prototype.queueReprojectionCommands=function(e){const t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)},us.prototype.cancelReprojections=function(){const e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()},us.prototype.isDestroyed=function(){return!1},us.prototype.destroy=function(){return this.removeAll(!0),Xe(this)},us.prototype._update=function(){let e=!0;const t=this._layers;let 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&&(c(i._show)&&(c(n)||(n=[]),n.push(i)),i._show=i.show);if(c(n))for(o=0,r=n.length;o<r;++o)i=n[o],this.layerShownOrHidden.raiseEvent(i,i._layerIndex,i.show)};const e8e=us;function Q$(e){this._ellipsoid=new _O(e.ellipsoid,f.ZERO)}Object.defineProperties(Q$.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});const t8e=Q$;function lc(e){if(!c(e))throw new E("options is required.");if(!c(e.x))throw new E("options.x is required.");if(!c(e.y))throw new E("options.y is required.");if(e.x<0||e.y<0)throw new E("options.x and options.y must be greater than or equal to zero.");if(!c(e.level))throw new E("options.level is required and must be greater than or equal to zero.");if(!c(e.tilingScheme))throw new E("options.tilingScheme is required.");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=Ci.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=pu.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}function gD(e){c(e)&&e.freeResources()}lc.createLevelZeroTiles=function(e){if(!c(e))throw new E("tilingScheme is required.");const t=e.getNumberOfXTilesAtLevel(0),n=e.getNumberOfYTilesAtLevel(0),i=new Array(t*n);let o=0;for(let r=0;r<n;++r)for(let s=0;s<t;++s)i[o++]=new lc({tilingScheme:e,x:s,y:r,level:0});return i},lc.prototype._updateCustomData=function(e,t,n){let o,r,s,i=this.customData;if(c(t)&&c(n)){for(i=i.filter(function(a){return-1===n.indexOf(a)}),this._customData=i,s=this._rectangle,o=0;o<t.length;++o)r=t[o],Te.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=e}else{const a=this._parent;if(c(a)&&this._frameUpdated!==a._frameUpdated){i.length=0,s=this._rectangle;const l=a.customData;for(o=0;o<l.length;++o)r=l[o],Te.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=a._frameUpdated}}},Object.defineProperties(lc.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 c(this._southwestChild)||(this._southwestChild=new lc({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return c(this._southeastChild)||(this._southeastChild=new lc({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return c(this._northwestChild)||(this._northwestChild=new lc({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return c(this._northeastChild)||(this._northeastChild=new lc({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<pu.DONE}},eligibleForUnloading:{get:function(){let e=!0;return c(this.data)&&(e=this.data.eligibleForUnloading,c(e)||(e=!0)),e}}}),lc.prototype.findLevelZeroTile=function(e,t,n){const 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]},lc.prototype.findTileToWest=function(e){const t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;const n=t.findTileToWest(e);return void 0!==n?t.southwestChild===this?n.southeastChild:n.northeastChild:void 0},lc.prototype.findTileToEast=function(e){const t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;const n=t.findTileToEast(e);return void 0!==n?t.southeastChild===this?n.southwestChild:n.northwestChild:void 0},lc.prototype.findTileToSouth=function(e){const t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;const n=t.findTileToSouth(e);return void 0!==n?t.southwestChild===this?n.northwestChild:n.northeastChild:void 0},lc.prototype.findTileToNorth=function(e){const t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;const n=t.findTileToNorth(e);return void 0!==n?t.northwestChild===this?n.southwestChild:n.southeastChild:void 0},lc.prototype.freeResources=function(){this.state=pu.START,this.renderable=!1,this.upsampledFromParent=!1,c(this.data)&&c(this.data.freeResources)&&this.data.freeResources(),gD(this._southwestChild),this._southwestChild=void 0,gD(this._southeastChild),this._southeastChild=void 0,gD(this._northwestChild),this._northwestChild=void 0,gD(this._northeastChild),this._northeastChild=void 0};const n8e=lc;function yD(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function J$(e,t){const 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}yD.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},yD.prototype.trimTiles=function(e){let t=this.tail,n=!0;for(;n&&c(this._lastBeforeStartOfFrame)&&this.count>e&&c(t);){n=t!==this._lastBeforeStartOfFrame;const i=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),J$(this,t)),t=i}},yD.prototype.markTileRendered=function(e){const t=this.head;if(t!==e)return++this.count,c(t)?((c(e.replacementPrevious)||c(e.replacementNext))&&J$(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,void(this.head=e)):(e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,void(this.tail=e));e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext)};const i8e=yD;function mu(e){if(!c(e)||!c(e.tileProvider))throw new E("options.tileProvider is required.");if(c(e.tileProvider.quadtree))throw new E("A QuadtreeTileProvider can only be used with a single QuadtreePrimitive");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};const n=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new i8e,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=g(e.maximumScreenSpaceError,2),this.tileCacheSize=g(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new t8e({ellipsoid:n}),this._tileLoadProgressEvent=new Ye,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}function eK(e){const 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}let NC;Object.defineProperties(mu.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}}),mu.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0},mu.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;c(t);)t.state!==pu.START&&e(t),t=t.replacementNext},mu.prototype.forEachRenderedTile=function(e){const t=this._tilesToRender;for(let n=0,i=t.length;n<i;++n)e(t[n])},mu.prototype.updateHeight=function(e,t){const n=this,i={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t,removeFunc:function(){const 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)}};return n._addHeightCallbacks.push(i),i.removeFunc},mu.prototype.update=function(e){c(this._tileProvider.update)&&this._tileProvider.update(e)},mu.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(function o8e(e){const t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,eK(e);const n=e._levelZeroTiles;if(c(n))for(let i=0;i<n.length;++i){const r=n[i].customData,s=r.length;for(let a=0;a<s;++a){const l=r[a];l.level=0,e._addHeightCallbacks.push(l)}n[i].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),eK(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())},mu.prototype.render=function(e){const t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),function c8e(e,t){const n=e._debug;if(n.suspendLodUpdate)return;let o;e._tilesToRender.length=0;const r=e._tileProvider;if(!c(e._levelZeroTiles)){if(!c(r.tilingScheme))return;{e._levelZeroTiles=n8e.createLevelZeroTiles(r.tilingScheme);const x=e._levelZeroTiles.length;if(MC.length<x)for(MC=new Array(x),o=0;o<x;++o)void 0===MC[o]&&(MC[o]=new FC)}}let s;e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;const a=e._levelZeroTiles,l=a.length>1?e._occluders:void 0;NC=t.camera.positionCartographic,a.sort(s8e);const u=e._addHeightCallbacks,d=e._removeHeightCallbacks,h=t.frameNumber;let m;if(u.length>0||d.length>0){for(o=0,m=a.length;o<m;++o)s=a[o],s._updateCustomData(h,u,d);u.length=0,d.length=0}const _=t.camera;e._cameraPositionCartographic=_.positionCartographic;const p=k.getTranslation(_.transform,a8e);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(p,e._cameraReferenceFrameOriginCartographic),o=0,m=a.length;o<m;++o)s=a[o],e._tileReplacementQueue.markTileRendered(s),s.renderable?ra(e,s,r,t,l,!1,MC[o]):(zh(e,e._tileLoadQueueHigh,s,t),++n.tilesWaitingForChildren);e._lastSelectionFrameNumber=h}(this,e),function y8e(e,t){const n=e._tileProvider,i=e._tilesToRender;for(let o=0,r=i.length;o<r;++o)n.showTileThisFrame(i[o],t)}(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)},mu.prototype.endFrame=function(e){!e.passes.render||e.mode===ce.MORPHING||(function p8e(e,t){const n=e._tileLoadQueueHigh,i=e._tileLoadQueueMedium,o=e._tileLoadQueueLow;if(0===n.length&&0===i.length&&0===o.length)return;e._tileReplacementQueue.trimTiles(e.tileCacheSize);const r=Cr()+e._loadQueueTimeSlice,s=e._tileProvider;let a=JB(e,t,s,r,n,!1);a=JB(e,t,s,r,i,a),JB(e,t,s,r,o,a)}(this,e),function g8e(e,t){if(!c(e.tileProvider.tilingScheme))return;const n=_8e;n.length=0;const i=e._tileToUpdateHeights,s=Cr()+e._updateHeightsTimeSlice,a=t.mode,l=t.mapProjection,u=e.tileProvider.tilingScheme.ellipsoid;let d;for(;i.length>0;){const h=i[0];if(!c(h.data)||!c(h.data.mesh)){const y=h._lastSelectionResultFrame===e._lastSelectionFrameNumber?h._lastSelectionResult:Ci.NONE;(y===Ci.RENDERED||y===Ci.CULLED_BUT_NEEDED)&&n.push(h),i.shift(),e._lastTileIndex=0;continue}const m=h.customData,_=m.length;let p=!1;for(d=e._lastTileIndex;d<_;++d){const y=m[d],b=h.data.terrainData,x=c(b)&&b.wasCreatedByUpsampling();if(h.level>y.level&&!x){if(c(y.positionOnEllipsoidSurface)||(y.positionOnEllipsoidSurface=f.fromRadians(y.positionCartographic.longitude,y.positionCartographic.latitude,0,u)),a===ce.SCENE3D){const w=u.geodeticSurfaceNormal(y.positionOnEllipsoidSurface,zb.direction),v=u.getSurfaceNormalIntersectionWithZAxis(y.positionOnEllipsoidSurface,11500,zb.origin);if(!c(v)){let I=0;c(h.data.tileBoundingRegion)&&(I=h.data.tileBoundingRegion.minimumHeight);const P=Math.min(I,-11500),N=f.multiplyByScalar(w,Math.abs(P)+1,wm);f.subtract(y.positionOnEllipsoidSurface,N,zb.origin)}}else Ce.clone(y.positionCartographic,e3),e3.height=-11500,l.project(e3,wm),f.fromElements(wm.z,wm.x,wm.y,wm),f.clone(wm,zb.origin),f.clone(f.UNIT_X,zb.direction);const C=h.data.pick(zb,a,l,!1,wm);c(C)&&(c(y.callback)&&y.callback(C),y.level=h.level)}if(Cr()>=s){p=!0;break}}if(p){e._lastTileIndex=d;break}e._lastTileIndex=0,i.shift()}for(d=0;d<n.length;d++)i.push(n[d])}(this,e),function r8e(e,t){const n=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;if(n!==e._lastTileLoadQueueLength||e._tilesInvalidated){const o=Ye.prototype.raiseEvent.bind(e._tileLoadProgressEvent,n);t.afterRender.push(()=>(o(),!0)),e._lastTileLoadQueueLength=n}const 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))}(this,e))},mu.prototype.isDestroyed=function(){return!1},mu.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};const tK=new Ce;function s8e(e,t){let n=Te.center(e.rectangle,tK);const i=n.longitude-NC.longitude,o=n.latitude-NC.latitude;n=Te.center(t.rectangle,tK);const r=n.longitude-NC.longitude,s=n.latitude-NC.latitude;return i*i+o*o-(r*r+s*s)}const a8e=new f;let MC=[];function zh(e,t,n,i){n.needsLoading&&(void 0!==e.tileProvider.computeTileLoadPriority&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function FC(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function nK(){this.southwest=new FC,this.southeast=new FC,this.northwest=new FC,this.northeast=new FC}nK.prototype.combine=function(e){const 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};const QB=new Array(31);for(let e=0;e<QB.length;++e)QB[e]=new nK;function ra(e,t,n,i,o,r,s){if(n.computeTileVisibility(t,i,o)!==Es.NONE)return function l8e(e,t,n,i,o){const r=e._debug;++r.tilesVisited,e._tileReplacementQueue.markTileRendered(n),n._updateCustomData(t.frameNumber),n.level>r.maxDepthVisited&&(r.maxDepthVisited=n.level);const s=function f8e(e,t,n){if(t.mode===ce.SCENE2D||t.camera.frustum instanceof $n||t.camera.frustum instanceof Qa)return function h8e(e,t,n){let o=t.camera.frustum;const r=o.offCenterFrustum;c(r)&&(o=r);const s=t.context,a=s.drawingBufferWidth,l=s.drawingBufferHeight;let h=e._tileProvider.getLevelMaximumGeometricError(n.level)/(Math.max(o.top-o.bottom,o.right-o.left)/Math.max(a,l));return t.fog.enabled&&t.mode!==ce.SCENE2D&&(h-=O.fog(n._distance,t.fog.density)*t.fog.sse),h/=t.pixelRatio,h}(e,t,n);const i=e._tileProvider.getLevelMaximumGeometricError(n.level),o=n._distance;let a=i*t.context.drawingBufferHeight/(o*t.camera.frustum.sseDenominator);return t.fog.enabled&&(a-=O.fog(o,t.fog.density)*t.fog.sse),a/=t.pixelRatio,a}(e,t,n)<e.maximumScreenSpaceError,a=n.southwestChild,l=n.southeastChild,u=n.northwestChild,d=n.northeastChild,m=n._lastSelectionResultFrame===e._lastSelectionFrameNumber?n._lastSelectionResult:Ci.NONE,_=e.tileProvider;if(s||i){const p=Ci.originalResult(m)===Ci.RENDERED,y=Ci.originalResult(m)===Ci.CULLED||m===Ci.NONE;let x=p||y||n.state===pu.DONE;if(x||c(_.canRenderWithoutLosingDetail)&&(x=_.canRenderWithoutLosingDetail(n)),x)return s&&zh(e,e._tileLoadQueueMedium,n,t),bD(e,n),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=m===Ci.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Ci.RENDERED,void(o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n));i=!0,s&&zh(e,e._tileLoadQueueHigh,n,t)}if(_.canRefine(n)){if(a.upsampledFromParent&&l.upsampledFromParent&&u.upsampledFromParent&&d.upsampledFromParent)return bD(e,n),zh(e,e._tileLoadQueueMedium,n,t),e._tileReplacementQueue.markTileRendered(a),e._tileReplacementQueue.markTileRendered(l),e._tileReplacementQueue.markTileRendered(u),e._tileReplacementQueue.markTileRendered(d),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=m===Ci.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Ci.RENDERED,void(o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n));n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Ci.REFINED;const y=e._tilesToRender.length,b=e._tileLoadQueueLow.length,x=e._tileLoadQueueMedium.length,C=e._tileLoadQueueHigh.length,w=e._tileToUpdateHeights.length;if(function u8e(e,t,n,i,o,r,s,a){const l=r.camera.positionCartographic,u=e._tileProvider,d=e._occluders,h=QB[t.level],m=h.southwest,_=h.southeast,p=h.northwest,y=h.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(ra(e,t,u,r,d,s,m),ra(e,n,u,r,d,s,_),ra(e,i,u,r,d,s,p),ra(e,o,u,r,d,s,y)):(ra(e,i,u,r,d,s,p),ra(e,t,u,r,d,s,m),ra(e,o,u,r,d,s,y),ra(e,n,u,r,d,s,_)):l.latitude<t.rectangle.north?(ra(e,n,u,r,d,s,_),ra(e,t,u,r,d,s,m),ra(e,o,u,r,d,s,y),ra(e,i,u,r,d,s,p)):(ra(e,o,u,r,d,s,y),ra(e,i,u,r,d,s,p),ra(e,n,u,r,d,s,_),ra(e,t,u,r,d,s,m)),h.combine(a)}(e,a,l,u,d,t,i,o),y!==e._tilesToRender.length){const P=o.notYetRenderableCount;let N=!1;if(!o.allAreRenderable&&!o.anyWereRenderedLastFrame){const R=e._tilesToRender;for(let F=y;F<R.length;++F){let S=R[F];for(;void 0!==S&&S._lastSelectionResult!==Ci.KICKED&&S!==n;)S._lastSelectionResult=Ci.kick(S._lastSelectionResult),S=S.parent}e._tilesToRender.length=y,e._tileToUpdateHeights.length=w,bD(e,n),n._lastSelectionResult=Ci.RENDERED;const B=m===Ci.RENDERED;!B&&P>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=b,e._tileLoadQueueMedium.length=x,e._tileLoadQueueHigh.length=C,zh(e,e._tileLoadQueueMedium,n,t),o.notYetRenderableCount=n.renderable?0:1,N=!0),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=B,B||e._tileToUpdateHeights.push(n),++r.tilesWaitingForChildren}e.preloadAncestors&&!N&&zh(e,e._tileLoadQueueLow,n,t)}}else n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Ci.RENDERED,bD(e,n),zh(e,e._tileLoadQueueHigh,n,t),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=m===Ci.RENDERED,o.notYetRenderableCount=n.renderable?0:1}(e,i,t,r,s);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),s.allAreRenderable=!0,s.anyWereRenderedLastFrame=!1,s.notYetRenderableCount=0,function d8e(e,t){const n=t.rectangle;return c(e._cameraPositionCartographic)&&Te.contains(n,e._cameraPositionCartographic)||c(e._cameraReferenceFrameOriginCartographic)&&Te.contains(n,e._cameraReferenceFrameOriginCartographic)}(e,t)){(!c(t.data)||!c(t.data.vertexArray))&&zh(e,e._tileLoadQueueMedium,t,i);const l=t._lastSelectionResultFrame===e._lastSelectionFrameNumber?t._lastSelectionResult:Ci.NONE;l!==Ci.CULLED_BUT_NEEDED&&l!==Ci.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=Ci.CULLED_BUT_NEEDED}else(e.preloadSiblings||0===t.level)&&zh(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=Ci.CULLED;t._lastSelectionResultFrame=i.frameNumber}function bD(e,t){e._tilesToRender.push(t)}function m8e(e,t){return e._loadPriority-t._loadPriority}function JB(e,t,n,i,o,r){void 0!==n.computeTileLoadPriority&&o.sort(m8e);for(let s=0,a=o.length;s<a&&(Cr()<i||!r);++s){const l=o[s];e._tileReplacementQueue.markTileRendered(l),n.loadTile(t,l),r=!0}return r}const zb=new ii,e3=new Ce,wm=new f,_8e=[],b8e=mu;function hd(e){e=g(e,he.default);const t=new Wf({ellipsoid:e}),n=new e8e;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new $4e,this._material=void 0,this._surface=new b8e({tileProvider:new KHe({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new Ye,this._undergroundColor=Z.clone(Z.BLACK),this._undergroundColorAlphaByDistance=new Bn(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new QHe,t3(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new zt({url:Jn("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=he.WGS84.equals(e),this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new f(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new f(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.lightingFadeOutDistance=O.PI_OVER_TWO*e.minimumRadius,this.lightingFadeInDistance=O.PI*e.minimumRadius,this.nightFadeOutDistance=O.PI_OVER_TWO*e.minimumRadius,this.nightFadeInDistance=5*O.PI_OVER_TWO*e.minimumRadius,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=Ko.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}function t3(e){const t=[],n=c(e._material)&&(c(e._material.shaderSource.match(/slope/))||c(e._material.shaderSource.match("normalEC"))),i=[rD,I$];!c(e._material)||n&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.materialUniformMap=void 0:(i.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms),i.push(B4e),e._surfaceShaderSet.baseVertexShaderSource=new St({sources:[rD,I$,k4e],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new St({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}Object.defineProperties(hd.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!c(this._surface)||0===this._surface._tileLoadQueueHigh.length&&0===this._surface._tileLoadQueueMedium.length&&0===this._surface._tileLoadQueueLow.length}},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){c(e)||(e=Te.clone(Te.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),c(this._material)&&t3(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,t3(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=Z.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){if(c(e)&&e.far<e.near)throw new E("far distance must be greater than near distance.");this._undergroundColorAlphaByDistance=Bn.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});const A8e=[],x8e={start:0,stop:0};hd.prototype.pickWorldCoordinates=function(e,t,n,i){if(!c(e))throw new E("ray is required");if(!c(t))throw new E("scene is required");n=g(n,!0);const o=t.mode,r=t.mapProjection,s=A8e;s.length=0;const a=this._surface._tilesToRender;let u,d,h,l=a.length;for(d=0;d<l;++d){u=a[d];const m=u.data;if(!c(m))continue;let _=m.pickBoundingSphere;if(o!==ce.SCENE3D)m.pickBoundingSphere=_=Ae.fromRectangleWithHeights2D(u.rectangle,r,m.tileBoundingRegion.minimumHeight,m.tileBoundingRegion.maximumHeight,_),f.fromElements(_.center.z,_.center.x,_.center.y,_.center);else{if(!c(m.renderedMesh))continue;Ae.clone(m.tileBoundingRegion.boundingSphere,_)}const p=So.raySphere(e,_,x8e);c(p)&&s.push(m)}for(s.sort(function T8e(e){return function(t,n){return Ae.distanceSquaredTo(t.pickBoundingSphere,e)-Ae.distanceSquaredTo(n.pickBoundingSphere,e)}}(e.origin)),l=s.length,d=0;d<l&&(h=s[d].pick(e,t.mode,t.mapProjection,n,i),!c(h));++d);return h};const C8e=new Ce;hd.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),c(n)&&t.mode!==ce.SCENE3D){n=f.fromElements(n.y,n.z,n.x,n);const i=t.mapProjection.unproject(n,C8e);n=this._ellipsoid.cartographicToCartesian(i,n)}return n};const E8e=new f,iK=new f,w8e=new Ce,S8e=new ii;function n3(e,t){return c(e)&&Te.contains(e.rectangle,t)?e:void 0}hd.prototype.getHeight=function(e){if(!c(e))throw new E("cartographic is required");const t=this._surface._levelZeroTiles;if(!c(t))return;let n,i;const o=t.length;for(i=0;i<o&&(n=t[i],!Te.contains(n.rectangle,e));++i);if(i>=o)return;let r=n;for(;c(n);)n=n3(n._southwestChild,e)||n3(n._southeastChild,e)||n3(n._northwestChild,e)||n._northeastChild,c(n)&&c(n.data)&&c(n.data.renderedMesh)&&(r=n);if(n=r,!c(n)||!c(n.data)||!c(n.data.renderedMesh))return;const s=this._surface._tileProvider.tilingScheme.projection,a=this._surface._tileProvider.tilingScheme.ellipsoid,l=f.fromRadians(e.longitude,e.latitude,0,a,E8e),u=S8e,d=a.geodeticSurfaceNormal(l,u.direction),h=a.getSurfaceNormalIntersectionWithZAxis(l,11500,u.origin);if(!c(h)){let _;c(n.data.tileBoundingRegion)&&(_=n.data.tileBoundingRegion.minimumHeight);const p=Math.min(g(_,0),-11500),y=f.multiplyByScalar(d,Math.abs(p)+1,iK);f.subtract(l,y,u.origin)}const m=n.data.pick(u,void 0,s,!1,iK);return c(m)?a.cartesianToCartographic(m,w8e).height:void 0},hd.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)},hd.prototype.beginFrame=function(e){const t=this._surface,n=t.tileProvider,i=this.terrainProvider,o=this.showWaterEffect&&c(i)&&i.hasWaterMask&&i.hasWaterMask;if(o&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;const a=this._oceanNormalMapResource,l=a.url;if(c(l)){const u=this;a.fetchImage().then(function(d){l===u._oceanNormalMapResource.url&&(u._oceanNormalMap=u._oceanNormalMap&&u._oceanNormalMap.destroy(),u._oceanNormalMap=new Mn({context:e.context,source:d}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}const s=e.mode;e.passes.render&&(this._zoomedOutOceanSpecularIntensity=this.showGroundAtmosphere?.4:.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===ce.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))},hd.prototype.render=function(e){this.show&&(c(this._material)&&this._material.update(e.context),this._surface.render(e))},hd.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)},hd.prototype.isDestroyed=function(){return!1},hd.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(),Xe(this)};const v8e=hd,D8e=function I8e(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i},oK={},rK=-.0529921,sK=-.1059842,aK=13.0120009,cK=13.3407154,lK=.9856003,uK=26.4057084,dK=13.064993,fK=.3287146,hK=1.7484877,pK=-.1589763,mK=.0036096,_K=.1643573,gK=12.9590088;let i3=new re;oK.ComputeMoon=function(e,t){c(e)||(e=re.now()),i3=re.addSeconds(e,32.184,i3);const n=re.totalDays(i3)-2451545,i=n/T.DAYS_PER_JULIAN_CENTURY,o=(125.045+rK*n)*O.RADIANS_PER_DEGREE,r=(250.089+sK*n)*O.RADIANS_PER_DEGREE,s=(260.008+aK*n)*O.RADIANS_PER_DEGREE,a=(176.625+cK*n)*O.RADIANS_PER_DEGREE,l=(357.529+lK*n)*O.RADIANS_PER_DEGREE,u=(311.589+uK*n)*O.RADIANS_PER_DEGREE,d=(134.963+dK*n)*O.RADIANS_PER_DEGREE,h=(276.617+fK*n)*O.RADIANS_PER_DEGREE,m=(34.226+hK*n)*O.RADIANS_PER_DEGREE,_=(15.134+pK*n)*O.RADIANS_PER_DEGREE,p=(119.743+mK*n)*O.RADIANS_PER_DEGREE,y=(239.961+_K*n)*O.RADIANS_PER_DEGREE,b=(25.053+gK*n)*O.RADIANS_PER_DEGREE,x=Math.sin(o),C=Math.sin(r),w=Math.sin(s),v=Math.sin(a),I=Math.sin(l),P=Math.sin(u),N=Math.sin(d),R=Math.sin(h),B=Math.sin(m),F=Math.sin(_),S=Math.sin(p),D=Math.sin(y),L=Math.sin(b),M=Math.cos(o),U=Math.cos(r),z=Math.cos(s),G=Math.cos(a),W=Math.cos(l),q=Math.cos(u),j=Math.cos(d),Q=Math.cos(h),Y=Math.cos(m),ne=Math.cos(_),X=Math.cos(p),K=Math.cos(y),$=Math.cos(b),me=(269.9949+.0031*i-3.8787*x-.1204*C+.07*w-.0172*v+.0072*P-.0052*F+.0043*L)*O.RADIANS_PER_DEGREE,Se=(66.5392+.013*i+1.5419*M+.0239*U-.0278*z+.0068*G-.0029*q+9e-4*j+8e-4*ne-9e-4*$)*O.RADIANS_PER_DEGREE,fe=(38.3213+13.17635815*n-14e-13*n*n+3.561*x+.1208*C-.0642*w+.0158*v+.0252*I-.0066*P-.0047*N-.0046*R+.0028*B+.0052*F+.004*S+.0019*D-.0044*L)*O.RADIANS_PER_DEGREE,ye=(13.17635815-2*n*14e-13+3.561*M*rK+.1208*U*sK-.0642*z*aK+.0158*G*cK+.0252*W*lK-.0066*q*uK-.0047*j*dK-.0046*Q*fK+.0028*Y*hK+.0052*ne*pK+.004*X*mK+.0019*K*_K-.0044*$*gK)/86400*O.RADIANS_PER_DEGREE;return c(t)||(t=new D8e),t.rightAscension=me,t.declination=Se,t.rotation=fe,t.rotationRate=ye,t};const R8e=oK;function yK(e){(!c(e)||"function"!=typeof e)&&(e=R8e.ComputeMoon),this._computeFunction=e}const L8e=new f,N8e=new f,M8e=new f,B8e=new oe,k8e=new bt;yK.prototype.evaluate=function(e,t){c(e)||(e=re.now());const n=this._computeFunction(e),i=function F8e(e,t,n){const i=L8e;i.x=Math.cos(e+O.PI_OVER_TWO),i.y=Math.sin(e+O.PI_OVER_TWO),i.z=0;const o=Math.cos(t),r=M8e;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);const s=f.cross(r,i,N8e);return c(n)||(n=new oe),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}(n.rightAscension,n.declination,t),o=O.zeroToTwoPi(n.rotation),r=bt.fromAxisAngle(f.UNIT_Z,o,k8e),s=oe.fromQuaternion(bt.conjugate(r,r),B8e);return oe.multiply(s,i,i)};const U8e=yK,o3={},V8e=32.184,H8e=2451545;function bK(e,t){t=re.addSeconds(e,V8e,t);const n=re.totalDays(t)-H8e;return t=re.addSeconds(t,function z8e(e){const t=6.239996+.0172019696544*e;return.001657*Math.sin(t+.01671*Math.sin(t))}(n),t),t}const TD=new re(2451545,0,tt.TAI),_u=O.RADIANS_PER_DEGREE,bl=O.RADIANS_PER_ARCSECOND,TK=new oe;function AK(e,t,n,i,o,r,s){if(n<0&&(n=-n,o+=O.PI),n<0||n>O.PI)throw new E("The inclination is out of range. Inclination must be greater than or equal to zero and less than or equal to Pi radians.");const a=e*(1-t),l=i-o,u=o,d=function W8e(e,t){if(t<0||t>=1)throw new E("eccentricity out of range.");const n=function Y8e(e,t){if(t<0||t>=1)throw new E("eccentricity out of range.");const n=Math.floor(e/O.TWO_PI);let r,i=(e-=n*O.TWO_PI)+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE;for(r=0;r<xK&&Math.abs(o-i)>q8e;++r)o=i,i=o-(o-t*Math.sin(o)-e)/(1-t*Math.cos(o));if(r>=xK)throw new E("Kepler equation did not converge");return o=i+n*O.TWO_PI,o}(e,t);return function X8e(e,t){if(t<0||t>=1)throw new E("eccentricity out of range.");const n=Math.floor(e/O.TWO_PI);e-=n*O.TWO_PI;const i=Math.cos(e)-t,o=Math.sin(e)*Math.sqrt(1-t*t);let r=Math.atan2(o,i);return r=O.zeroToTwoPi(r),e<0&&(r-=O.TWO_PI),r+=n*O.TWO_PI,r}(n,t)}(r-i,t);if("Hyperbolic"===function j8e(e,t){if(e<0)throw new E("eccentricity cannot be negative.");return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}(t,0)&&Math.abs(O.negativePiToPi(d))>=Math.acos(-1/t))throw new E("The true anomaly of the hyperbolic orbit lies outside of the bounds of the hyperbola.");!function Z8e(e,t,n,i){if(t<0||t>O.PI)throw new E("inclination out of range");const o=Math.cos(e),r=Math.sin(e),s=Math.cos(t),a=Math.sin(t),l=Math.cos(n),u=Math.sin(n);c(i)?(i[0]=l*o-u*r*s,i[1]=u*o+l*r*s,i[2]=r*a,i[3]=-l*r-u*o*s,i[4]=-u*r+l*o*s,i[5]=o*a,i[6]=u*a,i[7]=-l*a,i[8]=s):i=new oe(l*o-u*r*s,-l*r-u*o*s,u*a,u*o+l*r*s,-u*r+l*o*s,-l*a,r*a,o*a,s)}(l,n,u,TK);const m=a*(1+t),_=Math.cos(d),p=Math.sin(d),y=1+t*_;if(y<=O.Epsilon10)throw new E("elements cannot be converted to cartesian");const b=m/y;return c(s)?(s.x=b*_,s.y=b*p,s.z=0):s=new f(b*_,b*p,0),oe.multiplyByVector(TK,s,s)}const xK=50,q8e=O.EPSILON8,K8e=100.46645683*_u,Q8e=1295977422.83429*bl,Vb=new re(0,0,tt.TAI);function UK(e,t){bK(e,Vb);const i=(Vb.dayNumber-TD.dayNumber+(Vb.secondsOfDay-TD.secondsOfDay)/T.SECONDS_PER_DAY)/T.DAYS_PER_JULIAN_CENTURY,o=i*i,r=o*i,s=r*i;let a=383397.7725+.004*i,l=.055545526-16e-9*i;const u=5.15668983*_u;let d=-8e-5*i+.02966*o-42e-6*r-13e-8*s;const h=83.35324312*_u;let m=14643420.2669*i-38.2702*o-.045047*r+21301e-8*s;const _=125.04455501*_u;let p=-6967919.3631*i+6.3602*o+.007625*r-3586e-8*s;const y=218.31664563*_u;let b=1732559343.4847*i-6.391*o+.006588*r-3169e-8*s;const x=297.85019547*_u+bl*(1602961601.209*i-6.3706*o+.006593*r-3169e-8*s),w=134.96340251*_u+bl*(1717915923.2178*i+31.8792*o+.051635*r-2447e-7*s),v=357.52910918*_u+bl*(129596581.0481*i-.5532*o+136e-6*r-1149e-8*s),I=310.17137918*_u-bl*(6967051.436*i+6.2068*o+.007618*r-3219e-8*s),P=2*x,N=4*x,R=6*x,B=2*w,F=3*w,S=4*w,D=2*(93.27209062*_u+bl*(1739527262.8478*i-12.7512*o-.001037*r+417e-8*s));a+=3400.4*Math.cos(P)-635.6*Math.cos(P-w)-235.6*Math.cos(w)+218.1*Math.cos(P-v)+181*Math.cos(P+w),l+=.014216*Math.cos(P-w)+.008551*Math.cos(P-B)-.001383*Math.cos(w)+.001356*Math.cos(P+w)-.001147*Math.cos(N-F)-914e-6*Math.cos(N-B)+869e-6*Math.cos(P-v-w)-627e-6*Math.cos(P)-394e-6*Math.cos(N-S)+282e-6*Math.cos(P-v-B)-279e-6*Math.cos(x-w)-236e-6*Math.cos(B)+231e-6*Math.cos(N)+229e-6*Math.cos(R-S)-201e-6*Math.cos(B-D),d+=486.26*Math.cos(P-D)-40.13*Math.cos(P)+37.51*Math.cos(D)+25.73*Math.cos(B-D)+19.97*Math.cos(P-v-D),m+=-55609*Math.sin(P-w)-34711*Math.sin(P-B)-9792*Math.sin(w)+9385*Math.sin(N-F)+7505*Math.sin(N-B)+5318*Math.sin(P+w)+3484*Math.sin(N-S)-3417*Math.sin(P-v-w)-2530*Math.sin(R-S)-2376*Math.sin(P)-2075*Math.sin(P-F)-1883*Math.sin(B)-1736*Math.sin(R-5*w)+1626*Math.sin(v)-1370*Math.sin(R-F),p+=-5392*Math.sin(P-D)-540*Math.sin(v)-441*Math.sin(P)+423*Math.sin(D)-288*Math.sin(B-D),b+=-3332.9*Math.sin(P)+1197.4*Math.sin(P-w)-662.5*Math.sin(v)+396.3*Math.sin(w)-218*Math.sin(P-v);const L=2*I,M=3*I;d+=46.997*Math.cos(I)*i-.614*Math.cos(P-D+I)*i+.614*Math.cos(P-D-I)*i-.0297*Math.cos(L)*o-.0335*Math.cos(I)*o+.0012*Math.cos(P-D+L)*o-16e-5*Math.cos(I)*r+4e-5*Math.cos(M)*r+4e-5*Math.cos(L)*r;const U=2.116*Math.sin(I)*i-.111*Math.sin(P-D-I)*i-.0015*Math.sin(I)*o;return m+=U,b+=U,p+=-520.77*Math.sin(I)*i+13.66*Math.sin(P-D+I)*i+1.12*Math.sin(P-I)*i-1.06*Math.sin(D-I)*i+.66*Math.sin(L)*o+.371*Math.sin(I)*o-.035*Math.sin(P-D+L)*o-.015*Math.sin(P-D+I)*o+.0014*Math.sin(I)*r-.0011*Math.sin(M)*r-9e-4*Math.sin(L)*r,a*=1e3,AK(a,l,u+d*bl,h+m*bl,_+p*bl,y+b*bl,t)}const VK=new oe(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819);let BC=new f;o3.computeSunPositionInEarthInertialFrame=function(e,t){return c(e)||(e=re.now()),c(t)||(t=new f),BC=function O5e(e,t){bK(e,Vb);const i=(Vb.dayNumber-TD.dayNumber+(Vb.secondsOfDay-TD.secondsOfDay)/T.SECONDS_PER_DAY)/(10*T.DAYS_PER_JULIAN_CENTURY),o=.3595362*i,r=149598022260.7121+957426.3679999999*Math.cos(16002*o)+-2243968.05*Math.sin(16002*o)+-2273887.624*Math.cos(21863*o)+-688150.202*Math.sin(21863*o)+927506.794*Math.cos(32004*o)+1017265.516*Math.sin(32004*o)+-119678.29599999999*Math.cos(10931*o)+807828.498*Math.sin(10931*o)+478713.18399999995*Math.cos(14529*o)+209437.01799999998*Math.sin(14529*o)+-613351.267*Math.cos(16368*o)+359034.888*Math.sin(16368*o)+284235.953*Math.cos(15318*o)+-418874.03599999996*Math.sin(15318*o)+-164557.657*Math.cos(32794*o)+329115.314*Math.sin(32794*o),s=K8e+Q8e*i+-325e-7*Math.cos(10*o)+-105e-7*Math.sin(10*o)+-322e-7*Math.cos(16002*o)+-137e-7*Math.sin(16002*o)+-7899999999999999e-21*Math.cos(21863*o)+258e-7*Math.sin(21863*o)+23199999999999998e-21*Math.cos(10931*o)+35e-7*Math.sin(10931*o)+-5199999999999999e-21*Math.cos(1473*o)+-11599999999999999e-21*Math.sin(1473*o)+97e-7*Math.cos(32004*o)+-88e-7*Math.sin(32004*o)+55e-7*Math.cos(4387*o)+-112e-7*Math.sin(4387*o)+-41e-7*Math.cos(73*o)+-8e-6*Math.sin(73*o);return AK(r,.0167086342-.0004203654*i,469.97289*bl*i,102.93734808*_u+11612.3529*bl*i,174.87317577*_u-8679.27034*bl*i,s,t)}(e,BC),t=f.negate(BC,t),function L5e(e,t){t=UK(e,t),f.multiplyByScalar(t,-.01215058143522694,t)}(e,BC),f.subtract(t,BC,t),oe.multiplyByVector(VK,t,t),t},o3.computeMoonPositionInEarthInertialFrame=function(e,t){return c(e)||(e=re.now()),t=UK(e,t),oe.multiplyByVector(VK,t,t),t};const r3=o3,N5e=new f;function Tl(e){const t=(e=g(e,g.EMPTY_OBJECT)).minimum,n=e.maximum;if(A.typeOf.object("min",t),A.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===Xn.TOP)throw new E("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");const i=g(e.vertexFormat,et.DEFAULT);this._minimum=f.clone(t),this._maximum=f.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}Tl.fromDimensions=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).dimensions;A.typeOf.object("dimensions",t),A.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),A.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),A.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);const n=f.multiplyByScalar(t,.5,new f);return new Tl({minimum:f.negate(n,new f),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},Tl.fromAxisAlignedBoundingBox=function(e){return A.typeOf.object("boundingBox",e),new Tl({minimum:e.minimum,maximum:e.maximum})},Tl.packedLength=2*f.packedLength+et.packedLength+1,Tl.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),f.pack(e._minimum,t,n),f.pack(e._maximum,t,n+f.packedLength),et.pack(e._vertexFormat,t,n+2*f.packedLength),t[n+2*f.packedLength+et.packedLength]=g(e._offsetAttribute,-1),t};const HK=new f,GK=new f,jK=new et,WK={minimum:HK,maximum:GK,vertexFormat:jK,offsetAttribute:void 0};let s3;Tl.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=f.unpack(e,t,HK),o=f.unpack(e,t+f.packedLength,GK),r=et.unpack(e,t+2*f.packedLength,jK),s=e[t+2*f.packedLength+et.packedLength];return c(n)?(n._minimum=f.clone(i,n._minimum),n._maximum=f.clone(o,n._maximum),n._vertexFormat=et.clone(r,n._vertexFormat),n._offsetAttribute=-1===s?void 0:s,n):(WK.offsetAttribute=-1===s?void 0:s,new Tl(WK))},Tl.createGeometry=function(e){const t=e._minimum,n=e._maximum,i=e._vertexFormat;if(f.equals(t,n))return;const o=new co;let r,s;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(s=new Float64Array(72),s[0]=t.x,s[1]=t.y,s[2]=n.z,s[3]=n.x,s[4]=t.y,s[5]=n.z,s[6]=n.x,s[7]=n.y,s[8]=n.z,s[9]=t.x,s[10]=n.y,s[11]=n.z,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=n.x,s[16]=t.y,s[17]=t.z,s[18]=n.x,s[19]=n.y,s[20]=t.z,s[21]=t.x,s[22]=n.y,s[23]=t.z,s[24]=n.x,s[25]=t.y,s[26]=t.z,s[27]=n.x,s[28]=n.y,s[29]=t.z,s[30]=n.x,s[31]=n.y,s[32]=n.z,s[33]=n.x,s[34]=t.y,s[35]=n.z,s[36]=t.x,s[37]=t.y,s[38]=t.z,s[39]=t.x,s[40]=n.y,s[41]=t.z,s[42]=t.x,s[43]=n.y,s[44]=n.z,s[45]=t.x,s[46]=t.y,s[47]=n.z,s[48]=t.x,s[49]=n.y,s[50]=t.z,s[51]=n.x,s[52]=n.y,s[53]=t.z,s[54]=n.x,s[55]=n.y,s[56]=n.z,s[57]=t.x,s[58]=n.y,s[59]=n.z,s[60]=t.x,s[61]=t.y,s[62]=t.z,s[63]=n.x,s[64]=t.y,s[65]=t.z,s[66]=n.x,s[67]=t.y,s[68]=n.z,s[69]=t.x,s[70]=t.y,s[71]=n.z,o.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:s})),i.normal){const u=new Float32Array(72);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=1,u[9]=0,u[10]=0,u[11]=1,u[12]=0,u[13]=0,u[14]=-1,u[15]=0,u[16]=0,u[17]=-1,u[18]=0,u[19]=0,u[20]=-1,u[21]=0,u[22]=0,u[23]=-1,u[24]=1,u[25]=0,u[26]=0,u[27]=1,u[28]=0,u[29]=0,u[30]=1,u[31]=0,u[32]=0,u[33]=1,u[34]=0,u[35]=0,u[36]=-1,u[37]=0,u[38]=0,u[39]=-1,u[40]=0,u[41]=0,u[42]=-1,u[43]=0,u[44]=0,u[45]=-1,u[46]=0,u[47]=0,u[48]=0,u[49]=1,u[50]=0,u[51]=0,u[52]=1,u[53]=0,u[54]=0,u[55]=1,u[56]=0,u[57]=0,u[58]=1,u[59]=0,u[60]=0,u[61]=-1,u[62]=0,u[63]=0,u[64]=-1,u[65]=0,u[66]=0,u[67]=-1,u[68]=0,u[69]=0,u[70]=-1,u[71]=0,o.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:u})}if(i.st){const u=new Float32Array(48);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=1,u[5]=1,u[6]=0,u[7]=1,u[8]=1,u[9]=0,u[10]=0,u[11]=0,u[12]=0,u[13]=1,u[14]=1,u[15]=1,u[16]=0,u[17]=0,u[18]=1,u[19]=0,u[20]=1,u[21]=1,u[22]=0,u[23]=1,u[24]=1,u[25]=0,u[26]=0,u[27]=0,u[28]=0,u[29]=1,u[30]=1,u[31]=1,u[32]=1,u[33]=0,u[34]=0,u[35]=0,u[36]=0,u[37]=1,u[38]=1,u[39]=1,u[40]=0,u[41]=0,u[42]=1,u[43]=0,u[44]=1,u[45]=1,u[46]=0,u[47]=1,o.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:u})}if(i.tangent){const u=new Float32Array(72);u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u[6]=1,u[7]=0,u[8]=0,u[9]=1,u[10]=0,u[11]=0,u[12]=-1,u[13]=0,u[14]=0,u[15]=-1,u[16]=0,u[17]=0,u[18]=-1,u[19]=0,u[20]=0,u[21]=-1,u[22]=0,u[23]=0,u[24]=0,u[25]=1,u[26]=0,u[27]=0,u[28]=1,u[29]=0,u[30]=0,u[31]=1,u[32]=0,u[33]=0,u[34]=1,u[35]=0,u[36]=0,u[37]=-1,u[38]=0,u[39]=0,u[40]=-1,u[41]=0,u[42]=0,u[43]=-1,u[44]=0,u[45]=0,u[46]=-1,u[47]=0,u[48]=-1,u[49]=0,u[50]=0,u[51]=-1,u[52]=0,u[53]=0,u[54]=-1,u[55]=0,u[56]=0,u[57]=-1,u[58]=0,u[59]=0,u[60]=1,u[61]=0,u[62]=0,u[63]=1,u[64]=0,u[65]=0,u[66]=1,u[67]=0,u[68]=0,u[69]=1,u[70]=0,u[71]=0,o.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:u})}if(i.bitangent){const u=new Float32Array(72);u[0]=0,u[1]=1,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=1,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=1,u[14]=0,u[15]=0,u[16]=1,u[17]=0,u[18]=0,u[19]=1,u[20]=0,u[21]=0,u[22]=1,u[23]=0,u[24]=0,u[25]=0,u[26]=1,u[27]=0,u[28]=0,u[29]=1,u[30]=0,u[31]=0,u[32]=1,u[33]=0,u[34]=0,u[35]=1,u[36]=0,u[37]=0,u[38]=1,u[39]=0,u[40]=0,u[41]=1,u[42]=0,u[43]=0,u[44]=1,u[45]=0,u[46]=0,u[47]=1,u[48]=0,u[49]=0,u[50]=1,u[51]=0,u[52]=0,u[53]=1,u[54]=0,u[55]=0,u[56]=1,u[57]=0,u[58]=0,u[59]=1,u[60]=0,u[61]=0,u[62]=1,u[63]=0,u[64]=0,u[65]=1,u[66]=0,u[67]=0,u[68]=1,u[69]=0,u[70]=0,u[71]=1,o.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:u})}r=new Uint16Array(36),r[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else s=new Float64Array(24),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=n.x,s[4]=t.y,s[5]=t.z,s[6]=n.x,s[7]=n.y,s[8]=t.z,s[9]=t.x,s[10]=n.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=n.z,s[15]=n.x,s[16]=t.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=t.x,s[22]=n.y,s[23]=n.z,o.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:s}),r=new Uint16Array(36),r[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;const a=f.subtract(n,t,N5e),l=.5*f.magnitude(a);if(c(e._offsetAttribute)){const d=e._offsetAttribute===Xn.NONE?0:1,h=new Uint8Array(s.length/3).fill(d);o.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new En({attributes:o,indices:r,primitiveType:Tt.TRIANGLES,boundingSphere:new Ae(f.ZERO,l),offsetAttribute:e._offsetAttribute})},Tl.getUnitBox=function(){return c(s3)||(s3=Tl.createGeometry(Tl.fromDimensions({dimensions:new f(1,1,1),vertexFormat:et.POSITION_ONLY}))),s3};const Ug=Tl,qK="uniform vec3 u_radii;\nuniform vec3 u_oneOverEllipsoidRadiiSquared;\n\nin vec3 v_positionEC;\n\nvec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n{\n vec3 positionEC = czm_pointAlongRay(ray, intersection);\n vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;\n vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));\n vec3 sphericalNormal = normalize(positionMC / u_radii);\n vec3 normalMC = geodeticNormal * side; // normalized surface normal (always facing the viewer) in model coordinates\n vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordinates\n\n vec2 st = czm_ellipsoidTextureCoordinates(sphericalNormal);\n vec3 positionToEyeEC = -positionEC;\n\n czm_materialInput materialInput;\n materialInput.s = st.s;\n materialInput.st = st;\n materialInput.str = (positionMC + u_radii) / u_radii;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef ONLY_SUN_LIGHTING\n return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);\n#else\n return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n\nvoid main()\n{\n // PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii\n // in the vertex shader. Only when it is larger than some constant, march along the ray.\n // Otherwise perform one intersection test which will be the common case.\n\n // Test if the ray intersects a sphere with the ellipsoid's maximum radius.\n // For very oblate ellipsoids, using the ellipsoid's radii for an intersection test\n // may cause false negatives. This will discard fragments before marching the ray forward.\n float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;\n vec3 direction = normalize(v_positionEC);\n vec3 ellipsoidCenter = czm_modelView[3].xyz;\n\n float t1 = -1.0;\n float t2 = -1.0;\n\n float b = -2.0 * dot(direction, ellipsoidCenter);\n float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;\n\n float discriminant = b * b - 4.0 * c;\n if (discriminant >= 0.0) {\n t1 = (-b - sqrt(discriminant)) * 0.5;\n t2 = (-b + sqrt(discriminant)) * 0.5;\n }\n\n if (t1 < 0.0 && t2 < 0.0) {\n discard;\n }\n\n float t = min(t1, t2);\n if (t < 0.0) {\n t = 0.0;\n }\n\n // March ray forward to intersection with larger sphere and find\n czm_ray ray = czm_ray(t * direction, direction);\n\n vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);\n\n if (czm_isEmpty(intersection))\n {\n discard;\n }\n\n // If the viewer is outside, compute outsideFaceColor, with normals facing outward.\n vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\n\n // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.\n vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\n\n out_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\n out_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n\n#if (defined(WRITE_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))\n t = (intersection.start != 0.0) ? intersection.start : intersection.stop;\n vec3 positionEC = czm_pointAlongRay(ray, t);\n vec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n#ifdef LOG_DEPTH\n czm_writeLogDepth(1.0 + positionCC.w);\n#else\n float z = positionCC.z / positionCC.w;\n\n float n = czm_depthRange.near;\n float f = czm_depthRange.far;\n\n gl_FragDepth = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n}\n",YK="in vec3 position;\n\nuniform vec3 u_radii;\n\nout vec3 v_positionEC;\n\nvoid main()\n{\n // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.\n // Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry,\n // but doing it here allows us to change the radii without rewriting the vertex data, and\n // allows all ellipsoids to reuse the same vertex data.\n vec4 p = vec4(u_radii * position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n gl_Position = czm_modelViewProjection * p; // position in clip coordinates\n\n // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums\n // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the\n // ellipsoid (does not write depth) that was rendered in the farther frustum.\n //\n // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates\n // artifacts since some fragments can be alpha blended twice. This is solved by only rendering\n // the ellipsoid in the closest frustum to the viewer.\n gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\n\n czm_vertexLogDepth();\n}\n",a3={position:0};function AD(e){e=g(e,g.EMPTY_OBJECT),this.center=f.clone(g(e.center,f.ZERO)),this._center=new f,this.radii=f.clone(e.radii),this._radii=new f,this._oneOverEllipsoidRadiiSquared=new f,this._boundingSphere=new Ae,this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this._modelMatrix=new k,this._computedModelMatrix=new k,this.show=g(e.show,!0),this.material=g(e.material,Pa.fromType(Pa.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.onlySunLighting=g(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=g(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 $t({owner:g(e._owner,this)}),this._pickCommand=new $t({owner:g(e._owner,this),pickOnly:!0});const 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}}}AD.prototype.update=function(e){if(!this.show||e.mode!==ce.SCENE3D||!c(this.center)||!c(this.radii))return;if(!c(this.material))throw new E("this.material must be defined.");const t=e.context,n=this.material.isTranslucent(),i=this._translucent!==n;(!c(this._rs)||i)&&(this._translucent=n,this._rs=Lt.fromCache({cull:{enabled:!0,face:ur.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!n&&t.fragmentDepth,blending:n?eo.ALPHA_BLEND:void 0})),c(this._va)||(this._va=function M5e(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(c(t))return t;const n=Ug.createGeometry(Ug.fromDimensions({dimensions:new f(2,2,2),vertexFormat:et.POSITION_ONLY}));return t=gs.fromGeometry({context:e,geometry:n,attributeLocations:a3,bufferUsage:At.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}(t));let o=!1;const r=this.radii;if(!f.equals(this._radii,r)){f.clone(r,this._radii);const y=this._oneOverEllipsoidRadiiSquared;y.x=1/(r.x*r.x),y.y=1/(r.y*r.y),y.z=1/(r.z*r.z),o=!0}(!k.equals(this.modelMatrix,this._modelMatrix)||!f.equals(this.center,this._center))&&(k.clone(this.modelMatrix,this._modelMatrix),f.clone(this.center,this._center),k.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(f.clone(f.ZERO,this._boundingSphere.center),this._boundingSphere.radius=f.maximumComponent(r),Ae.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));const s=this._material!==this.material;this._material=this.material,this._material.update(t);const a=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;const l=e.useLogDepth,u=this._useLogDepth!==l;this._useLogDepth=l;const d=this._colorCommand;let h,m;(s||a||i||u)&&(h=new St({sources:[YK]}),m=new St({sources:[this.material.shaderSource,qK]}),this.onlySunLighting&&m.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&m.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),m.defines.push("LOG_DEPTH")),this._sp=di.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:m,attributeLocations:a3}),d.vertexArray=this._va,d.renderState=this._rs,d.shaderProgram=this._sp,d.uniformMap=Pn(this._uniforms,this.material._uniforms),d.executeInClosestFrustum=n);const _=e.commandList,p=e.passes;if(p.render&&(d.boundingVolume=this._boundingSphere,d.debugShowBoundingVolume=this.debugShowBoundingVolume,d.modelMatrix=this._computedModelMatrix,d.pass=n?Ue.TRANSLUCENT:Ue.OPAQUE,_.push(d)),p.pick){const y=this._pickCommand;(!c(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||!c(this._pickSP)||u)&&(h=new St({sources:[YK]}),m=new St({sources:[this.material.shaderSource,qK],pickColorQualifier:"uniform"}),this.onlySunLighting&&m.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&m.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),m.defines.push("LOG_DEPTH")),this._pickSP=di.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:m,attributeLocations:a3}),y.vertexArray=this._va,y.renderState=this._rs,y.shaderProgram=this._pickSP,y.uniformMap=Pn(Pn(this._uniforms,this._pickUniforms),this.material._uniforms),y.executeInClosestFrustum=n),y.boundingVolume=this._boundingSphere,y.modelMatrix=this._computedModelMatrix,y.pass=n?Ue.TRANSLUCENT:Ue.OPAQUE,_.push(y)}},AD.prototype.isDestroyed=function(){return!1},AD.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(),Xe(this)};const F5e=AD;function kC(e){let t=(e=g(e,g.EMPTY_OBJECT)).textureUrl;c(t)||(t=Jn("Assets/Textures/moonSmall.jpg")),this.show=g(e.show,!0),this.textureUrl=t,this._ellipsoid=g(e.ellipsoid,he.MOON),this.onlySunLighting=g(e.onlySunLighting,!0),this._ellipsoidPrimitive=new F5e({radii:this.ellipsoid.radii,material:Pa.fromType(Pa.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new U8e}Object.defineProperties(kC.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});const xD=new oe,B5e=new oe,k5e=new f,CD=[];kC.prototype.update=function(e){if(!this.show)return;const t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;const n=e.time;c(In.computeIcrfToFixedMatrix(n,xD))||In.computeTemeToPseudoFixedMatrix(n,xD);const i=this._axes.evaluate(n,B5e);oe.transpose(i,i),oe.multiply(xD,i,i);const o=r3.computeMoonPositionInEarthInertialFrame(n,k5e);oe.multiplyByVector(xD,o,o),k.fromRotationTranslation(i,o,t.modelMatrix);const r=e.commandList;return e.commandList=CD,CD.length=0,t.update(e),e.commandList=r,1===CD.length?CD[0]:void 0},kC.prototype.isDestroyed=function(){return!1},kC.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),Xe(this)};const U5e=kC,z5e=new f,V5e=new f,H5e=new f,G5e=new f,j5e=new f,W5e=new f(1,1,1),XK=Math.cos,ZK=Math.sin;function Vh(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.radii,W5e),n=g(e.innerRadii,t),i=g(e.minimumClock,0),o=g(e.maximumClock,O.TWO_PI),r=g(e.minimumCone,0),s=g(e.maximumCone,O.PI),a=Math.round(g(e.stackPartitions,64)),l=Math.round(g(e.slicePartitions,64)),u=g(e.vertexFormat,et.DEFAULT);if(l<3)throw new E("options.slicePartitions cannot be less than three.");if(a<3)throw new E("options.stackPartitions cannot be less than three.");this._radii=f.clone(t),this._innerRadii=f.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=l,this._vertexFormat=et.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}Vh.packedLength=2*f.packedLength+et.packedLength+7,Vh.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),f.pack(e._radii,t,n),f.pack(e._innerRadii,t,n+=f.packedLength),et.pack(e._vertexFormat,t,n+=f.packedLength),n+=et.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=g(e._offsetAttribute,-1),t};const $K=new f,KK=new f,QK=new et,Sm={radii:$K,innerRadii:KK,vertexFormat:QK,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};let c3;Vh.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);const i=f.unpack(e,t,$K),o=f.unpack(e,t+=f.packedLength,KK),r=et.unpack(e,t+=f.packedLength,QK);t+=et.packedLength;const s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t++],m=e[t];return c(n)?(n._radii=f.clone(i,n._radii),n._innerRadii=f.clone(o,n._innerRadii),n._vertexFormat=et.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=l,n._maximumCone=u,n._stackPartitions=d,n._slicePartitions=h,n._offsetAttribute=-1===m?void 0:m,n):(Sm.minimumClock=s,Sm.maximumClock=a,Sm.minimumCone=l,Sm.maximumCone=u,Sm.stackPartitions=d,Sm.slicePartitions=h,Sm.offsetAttribute=-1===m?void 0:m,new Vh(Sm))},Vh.createGeometry=function(e){const t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;const n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;const i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._vertexFormat;let l=e._slicePartitions+1,u=e._stackPartitions+1;l=Math.round(l*Math.abs(o-i)/O.TWO_PI),u=Math.round(u*Math.abs(s-r)/O.PI),l<2&&(l=2),u<2&&(u=2);let d,h,m=0;const _=[r],p=[i];for(d=0;d<u;d++)_.push(r+d*(s-r)/(u-1));for(_.push(s),h=0;h<l;h++)p.push(i+h*(o-i)/(l-1));p.push(o);const y=_.length,b=p.length;let x=0,C=1;const w=n.x!==t.x||n.y!==t.y||n.z!==t.z;let v=!1,I=!1,P=!1;w&&(C=2,r>0&&(v=!0,x+=l-1),s<Math.PI&&(I=!0,x+=l-1),(o-i)%O.TWO_PI?(P=!0,x+=2*(u-1)+1):x+=1);const N=b*y*C,R=new Float64Array(3*N),B=new Array(N).fill(!1),F=new Array(N).fill(!1),S=l*u*C,L=Ot.createTypedArray(S,6*(S+x+1-(l+u)*C)),M=a.normal?new Float32Array(3*N):void 0,U=a.tangent?new Float32Array(3*N):void 0,z=a.bitangent?new Float32Array(3*N):void 0,G=a.st?new Float32Array(2*N):void 0,W=new Array(y),q=new Array(y);for(d=0;d<y;d++)W[d]=ZK(_[d]),q[d]=XK(_[d]);const j=new Array(b),Q=new Array(b);for(h=0;h<b;h++)Q[h]=XK(p[h]),j[h]=ZK(p[h]);for(d=0;d<y;d++)for(h=0;h<b;h++)R[m++]=t.x*W[d]*Q[h],R[m++]=t.y*W[d]*j[h],R[m++]=t.z*q[d];let ne,X,K,$,Y=N/2;if(w)for(d=0;d<y;d++)for(h=0;h<b;h++)R[m++]=n.x*W[d]*Q[h],R[m++]=n.y*W[d]*j[h],R[m++]=n.z*q[d],B[Y]=!0,d>0&&d!==y-1&&0!==h&&h!==b-1&&(F[Y]=!0),Y++;for(m=0,d=1;d<y-2;d++)for(ne=d*b,X=(d+1)*b,h=1;h<b-2;h++)L[m++]=X+h,L[m++]=X+h+1,L[m++]=ne+h+1,L[m++]=X+h,L[m++]=ne+h+1,L[m++]=ne+h;if(w){const Qt=y*b;for(d=1;d<y-2;d++)for(ne=Qt+d*b,X=Qt+(d+1)*b,h=1;h<b-2;h++)L[m++]=X+h,L[m++]=ne+h,L[m++]=ne+h+1,L[m++]=X+h,L[m++]=ne+h+1,L[m++]=X+h+1}if(w){if(v)for($=y*b,d=1;d<b-2;d++)L[m++]=d,L[m++]=d+1,L[m++]=$+d+1,L[m++]=d,L[m++]=$+d+1,L[m++]=$+d;if(I)for(K=y*b-b,$=y*b*C-b,d=1;d<b-2;d++)L[m++]=K+d+1,L[m++]=K+d,L[m++]=$+d,L[m++]=K+d+1,L[m++]=$+d,L[m++]=$+d+1}if(P){for(d=1;d<y-2;d++)$=b*y+b*d,K=b*d,L[m++]=$,L[m++]=K+b,L[m++]=K,L[m++]=$,L[m++]=$+b,L[m++]=K+b;for(d=1;d<y-2;d++)$=b*y+b*(d+1)-1,K=b*(d+1)-1,L[m++]=K+b,L[m++]=$,L[m++]=K,L[m++]=K+b,L[m++]=$+b,L[m++]=$}const me=new co;a.position&&(me.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:R}));let Se=0,fe=0,ye=0,ve=0;const Oe=N/2;let Ge;const je=he.fromCartesian3(t),Ke=he.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(d=0;d<N;d++){Ge=B[d]?Ke:je;const Qt=f.fromArray(R,3*d,z5e),nn=Ge.geodeticSurfaceNormal(Qt,V5e);if(F[d]&&f.negate(nn,nn),a.st){const Pt=V.negate(nn,j5e);G[Se++]=Math.atan2(Pt.y,Pt.x)/O.TWO_PI+.5,G[Se++]=Math.asin(nn.z)/Math.PI+.5}if(a.normal&&(M[fe++]=nn.x,M[fe++]=nn.y,M[fe++]=nn.z),a.tangent||a.bitangent){const Pt=H5e;let gn,ft=0;if(B[d]&&(ft=Oe),gn=!v&&d>=ft&&d<ft+2*b?f.UNIT_X:f.UNIT_Z,f.cross(gn,nn,Pt),f.normalize(Pt,Pt),a.tangent&&(U[ye++]=Pt.x,U[ye++]=Pt.y,U[ye++]=Pt.z),a.bitangent){const Ft=f.cross(nn,Pt,G5e);f.normalize(Ft,Ft),z[ve++]=Ft.x,z[ve++]=Ft.y,z[ve++]=Ft.z}}}a.st&&(me.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:G})),a.normal&&(me.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:M})),a.tangent&&(me.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:U})),a.bitangent&&(me.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:z}))}if(c(e._offsetAttribute)){const nn=e._offsetAttribute===Xn.NONE?0:1,Pt=new Uint8Array(R.length/3).fill(nn);me.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:Pt})}return new En({attributes:me,indices:L,primitiveType:Tt.TRIANGLES,boundingSphere:Ae.fromEllipsoid(je),offsetAttribute:e._offsetAttribute})},Vh.getUnitEllipsoid=function(){return c(c3)||(c3=Vh.createGeometry(new Vh({radii:new f(1,1,1),vertexFormat:et.POSITION_ONLY}))),c3};const UC=Vh,l3=[],u3=[];function d3(e,t,n,i,o){if(i>=o)return;const r=Math.floor(.5*(i+o));d3(e,t,n,i,r),d3(e,t,n,r+1,o),function q5e(e,t,n,i,o,r){const s=o-i+1,a=r-o,l=l3,u=u3;let d,h;for(d=0;d<s;++d)l[d]=e[i+d];for(h=0;h<a;++h)u[h]=e[o+h+1];d=0,h=0;for(let m=i;m<=r;++m){const _=l[d],p=u[h];d<s&&(h>=a||t(_,p,n)<=0)?(e[m]=_,++d):h<a&&(e[m]=p,++h)}}(e,t,n,i,r,o)}const f3=function Y5e(e,t,n){if(!c(e))throw new E("array is required.");if(!c(t))throw new E("comparator is required.");const i=e.length,o=Math.ceil(.5*i);l3.length=o,u3.length=o,d3(e,t,n,0,i-1),l3.length=0,u3.length=0};function ka(e,t){if(!c(e))throw new E("occluderBoundingSphere is required.");if(!c(t))throw new E("camera position is required.");this._occluderPosition=f.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}const ED=new f;Object.defineProperties(ka.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){if(!c(e))throw new E("cameraPosition is required.");e=f.clone(e,this._cameraPosition);const t=f.subtract(this._occluderPosition,e,ED);let n=f.magnitudeSquared(t);const i=this._occluderRadius*this._occluderRadius;let o,r,s;n>i?(o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=f.multiplyByScalar(t,n,ED),s=f.add(e,f.multiplyByScalar(r,o*o*n,ED),ED)):o=Number.MAX_VALUE,this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}}),ka.fromBoundingSphere=function(e,t,n){if(!c(e))throw new E("occluderBoundingSphere is required.");if(!c(t))throw new E("camera position is required.");return c(n)?(f.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new ka(e,t)};const JK=new f;ka.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=f.subtract(e,this._occluderPosition,JK),n=this._occluderRadius;if(n=f.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=f.subtract(e,this._cameraPosition,t),n*n>f.magnitudeSquared(t)}return!1};const X5e=new f;ka.prototype.isBoundingSphereVisible=function(e){const t=f.clone(e.center,X5e),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=f.subtract(t,this._occluderPosition,JK),o=this._occluderRadius-n;if(o=f.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0&&(o=Math.sqrt(o)+this._horizonDistance,i=f.subtract(t,this._cameraPosition,i),o*o+n*n>f.magnitudeSquared(i));if(o>0){i=f.subtract(t,this._cameraPosition,i);const r=f.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>r*s||(o=Math.sqrt(o)+this._horizonDistance,o*o+a>r)}return!0}return!1};const Z5e=new f;ka.prototype.computeVisibility=function(e){if(!c(e))throw new E("occludeeBS is required.");const t=f.clone(e.center),n=e.radius;if(n>this._occluderRadius)return Es.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=f.subtract(t,this._occluderPosition,Z5e),o=this._occluderRadius-n;const r=f.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=f.subtract(t,this._cameraPosition,i);const s=f.magnitudeSquared(i);return o*o+n*n<s?Es.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,s<o*o+n*n?Es.FULL:Es.PARTIAL):(i=f.subtract(t,this._horizonPlanePosition,i),f.dot(i,this._horizonPlaneNormal)>-n?Es.PARTIAL:Es.FULL))}}return Es.NONE};const wD=new f;ka.computeOccludeePoint=function(e,t,n){if(!c(e))throw new E("occluderBoundingSphere is required.");if(!c(n))throw new E("positions is required.");if(0===n.length)throw new E("positions must contain at least one element");const i=f.clone(t),o=f.clone(e.center),r=e.radius,s=n.length;if(f.equals(o,t))throw new E("occludeePosition must be different than occluderBoundingSphere.center");const a=f.normalize(f.subtract(i,o,wD),wD),l=-f.dot(a,o),u=ka._anyRotationVector(o,a,l);let h,d=ka._horizonToPlaneNormalDotProduct(e,a,l,u,n[0]);if(d){for(let _=1;_<s;++_){if(h=ka._horizonToPlaneNormalDotProduct(e,a,l,u,n[_]),!h)return;h<d&&(d=h)}if(!(d<.0017453283658983088))return f.add(o,f.multiplyByScalar(a,r/d,wD),wD)}};const $5e=[];ka.computeOccludeePointFromRectangle=function(e,t){if(!c(e))throw new E("rectangle is required.");t=g(t,he.default);const n=Te.subsample(e,t,0,$5e),i=Ae.fromPoints(n),o=f.ZERO;if(!f.equals(o,i.center))return ka.computeOccludeePoint(new Ae(o,t.minimumRadius),i.center,n)};const K5e=new f;ka._anyRotationVector=function(e,t,n){const i=f.abs(t,K5e);let o=i.x>i.y?0:1;(0===o&&i.z>i.x||1===o&&i.z>i.y)&&(o=2);const r=new f;let s;0===o?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=f.UNIT_X):1===o?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=f.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=f.UNIT_Z);const a=(f.dot(t,i)+n)/-f.dot(t,s);return f.normalize(f.subtract(f.add(i,f.multiplyByScalar(s,a,r),i),e,i),i)};const Q5e=new f;ka._rotationVector=function(e,t,n,i,o){let r=f.subtract(i,e,Q5e);if(r=f.normalize(r,r),f.dot(t,r)<.9999999847691291){const s=f.cross(t,r,r);if(f.magnitude(s)>O.EPSILON13)return f.normalize(s,new f)}return o};const h3=new f,J5e=new f,SD=new f,eQ=new f;ka._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){const r=f.clone(o,h3),s=f.clone(e.center,J5e),a=e.radius;let l=f.subtract(s,r,SD);const u=f.magnitudeSquared(l),d=a*a;if(u<d)return!1;const h=u-d,m=Math.sqrt(h),b=m*(1/Math.sqrt(u))*m;l=f.normalize(l,l);const x=f.add(r,f.multiplyByScalar(l,b,eQ),eQ),C=Math.sqrt(h-b*b);let w=this._rotationVector(s,t,n,r,i),v=f.fromElements(w.x*w.x*l.x+(w.x*w.y-w.z)*l.y+(w.x*w.z+w.y)*l.z,(w.x*w.y+w.z)*l.x+w.y*w.y*l.y+(w.y*w.z-w.x)*l.z,(w.x*w.z-w.y)*l.x+(w.y*w.z+w.x)*l.y+w.z*w.z*l.z,h3);v=f.normalize(v,v);const I=f.multiplyByScalar(v,C,h3);w=f.normalize(f.subtract(f.add(x,I,SD),s,SD),SD);const P=f.dot(t,w);w=f.normalize(f.subtract(f.subtract(x,I,w),s,w),w);const N=f.dot(t,w);return P<N?P:N};const eGe=ka;function gf(e){e=g(e,g.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=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far,this._cullingVolume=new Fu,this._perspectiveMatrix=new k,this._infinitePerspective=new k}function p3(e){if(!(c(e.right)&&c(e.left)&&c(e.top)&&c(e.bottom)&&c(e.near)&&c(e.far)))throw new E("right, left, top, bottom, near, or far parameters are not set.");const t=e.top,n=e.bottom,i=e.right,o=e.left,r=e.near,s=e.far;if(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||s!==e._far){if(e.near<=0||e.near>e.far)throw new E("near must be greater than zero and less than far.");e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=s,e._perspectiveMatrix=k.computePerspectiveOffCenter(o,i,n,t,r,s,e._perspectiveMatrix),e._infinitePerspective=k.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective)}}Object.defineProperties(gf.prototype,{projectionMatrix:{get:function(){return p3(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return p3(this),this._infinitePerspective}}});const tGe=new f,nGe=new f,iGe=new f,oGe=new f;gf.prototype.computeCullingVolume=function(e,t,n){if(!c(e))throw new E("position is required.");if(!c(t))throw new E("direction is required.");if(!c(n))throw new E("up is required.");const i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,l=this.near,u=this.far,d=f.cross(t,n,tGe),h=nGe;f.multiplyByScalar(t,l,h),f.add(e,h,h);const m=iGe;f.multiplyByScalar(t,u,m),f.add(e,m,m);const _=oGe;f.multiplyByScalar(d,a,_),f.add(h,_,_),f.subtract(_,e,_),f.normalize(_,_),f.cross(_,n,_),f.normalize(_,_);let p=i[0];return c(p)||(p=i[0]=new de),p.x=_.x,p.y=_.y,p.z=_.z,p.w=-f.dot(_,e),f.multiplyByScalar(d,s,_),f.add(h,_,_),f.subtract(_,e,_),f.cross(n,_,_),f.normalize(_,_),p=i[1],c(p)||(p=i[1]=new de),p.x=_.x,p.y=_.y,p.z=_.z,p.w=-f.dot(_,e),f.multiplyByScalar(n,r,_),f.add(h,_,_),f.subtract(_,e,_),f.cross(d,_,_),f.normalize(_,_),p=i[2],c(p)||(p=i[2]=new de),p.x=_.x,p.y=_.y,p.z=_.z,p.w=-f.dot(_,e),f.multiplyByScalar(n,o,_),f.add(h,_,_),f.subtract(_,e,_),f.cross(_,d,_),f.normalize(_,_),p=i[3],c(p)||(p=i[3]=new de),p.x=_.x,p.y=_.y,p.z=_.z,p.w=-f.dot(_,e),p=i[4],c(p)||(p=i[4]=new de),p.x=t.x,p.y=t.y,p.z=t.z,p.w=-f.dot(t,h),f.negate(t,_),p=i[5],c(p)||(p=i[5]=new de),p.x=_.x,p.y=_.y,p.z=_.z,p.w=-f.dot(_,m),this._cullingVolume},gf.prototype.getPixelDimensions=function(e,t,n,i,o){if(p3(this),!c(e)||!c(t))throw new E("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new E("drawingBufferWidth must be greater than zero.");if(t<=0)throw new E("drawingBufferHeight must be greater than zero.");if(!c(n))throw new E("distance is required.");if(!c(i))throw new E("pixelRatio is required");if(i<=0)throw new E("pixelRatio must be greater than zero.");if(!c(o))throw new E("A result object is required.");const r=1/this.near;let s=this.top*r;const a=2*i*n*s/t;return s=this.right*r,o.x=2*i*n*s/e,o.y=a,o},gf.prototype.clone=function(e){return c(e)||(e=new gf),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},gf.prototype.equals=function(e){return c(e)&&e instanceof gf&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},gf.prototype.equalsEpsilon=function(e,t,n){return e===this||c(e)&&e instanceof gf&&O.equalsEpsilon(this.right,e.right,t,n)&&O.equalsEpsilon(this.left,e.left,t,n)&&O.equalsEpsilon(this.top,e.top,t,n)&&O.equalsEpsilon(this.bottom,e.bottom,t,n)&&O.equalsEpsilon(this.near,e.near,t,n)&&O.equalsEpsilon(this.far,e.far,t,n)};const zg=gf;function Gc(e){e=g(e,g.EMPTY_OBJECT),this._offCenterFrustum=new zg,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=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far,this.xOffset=g(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=g(e.yOffset,0),this._yOffset=this.yOffset}function pd(e){if(!(c(e.fov)&&c(e.aspectRatio)&&c(e.near)&&c(e.far)))throw new E("fov, aspectRatio, near, or far parameters are not set.");const 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 E("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new E("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new E("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:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),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}}Gc.packedLength=6,Gc.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(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},Gc.unpack=function(e,t,n){return A.defined("array",e),t=g(t,0),c(n)||(n=new Gc),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},Object.defineProperties(Gc.prototype,{projectionMatrix:{get:function(){return pd(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return pd(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return pd(this),this._fovy}},sseDenominator:{get:function(){return pd(this),this._sseDenominator}},offCenterFrustum:{get:function(){return pd(this),this._offCenterFrustum}}}),Gc.prototype.computeCullingVolume=function(e,t,n){return pd(this),this._offCenterFrustum.computeCullingVolume(e,t,n)},Gc.prototype.getPixelDimensions=function(e,t,n,i,o){return pd(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)},Gc.prototype.clone=function(e){return c(e)||(e=new Gc),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},Gc.prototype.equals=function(e){return!!(c(e)&&e instanceof Gc)&&(pd(this),pd(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},Gc.prototype.equalsEpsilon=function(e,t,n){return!!(c(e)&&e instanceof Gc)&&(pd(this),pd(e),O.equalsEpsilon(this.fov,e.fov,t,n)&&O.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};const Lo=Gc,tQ="in vec4 position;\nin vec2 textureCoordinates;\n\nout vec2 v_textureCoordinates;\n\nvoid main() \n{\n gl_Position = position;\n v_textureCoordinates = textureCoordinates;\n}\n";function vD(e){this._context=e}let zC;const rGe=new $t({primitiveType:Tt.TRIANGLES}),sGe=new ar({color:new Z(0,0,0,0)});vD.prototype.execute=function(e){if(A.defined("computeCommand",e),c(e.preExecute)&&e.preExecute(e),!c(e.fragmentShaderSource)&&!c(e.shaderProgram))throw new E("computeCommand.fragmentShaderSource or computeCommand.shaderProgram is required.");A.defined("computeCommand.outputTexture",e.outputTexture);const t=e.outputTexture,n=t.width,i=t.height,o=this._context,r=c(e.vertexArray)?e.vertexArray:o.getViewportQuadVertexArray(),s=c(e.shaderProgram)?e.shaderProgram:function cGe(e,t){return di.fromCache({context:e,vertexShaderSource:tQ,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}(o,e.fragmentShaderSource),a=function aGe(e,t){return new sh({context:e,colorTextures:[t],destroyAttachments:!1})}(o,t),l=function lGe(e,t){return(!c(zC)||zC.viewport.width!==e||zC.viewport.height!==t)&&(zC=Lt.fromCache({viewport:new Vt(0,0,e,t)})),zC}(n,i),u=e.uniformMap,d=sGe;d.framebuffer=a,d.renderState=l,d.execute(o);const h=rGe;h.vertexArray=r,h.renderState=l,h.shaderProgram=s,h.uniformMap=u,h.framebuffer=a,h.execute(o),a.destroy(),e.persists||(s.destroy(),c(e.vertexArray)&&r.destroy()),c(e.postExecute)&&e.postExecute(t)},vD.prototype.isDestroyed=function(){return!1},vD.prototype.destroy=function(){return Xe(this)};const uGe=vD,Vg=function dGe(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0};function md(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}function m3(e,t){const n=t.derivedKeywords,i=n.length;for(let o=0;o<i;++o)m3(e,e._shaders[n[o]+t.keyword]);delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}Object.defineProperties(md.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),md.prototype.replaceShaderProgram=function(e){return c(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)},md.prototype.getShaderProgram=function(e){let t=e.vertexShaderSource,n=e.fragmentShaderSource;const i=e.attributeLocations;"string"==typeof t&&(t=new St({sources:[t]})),"string"==typeof n&&(n=new St({sources:[n]}));const o=t.getCacheKey(),r=n.getCacheKey(),s=c(i)?function fGe(e){const t=Object.keys(e).sort();return JSON.stringify(e,t)}(i):"",a=`${o}:${r}:${s}`;let l;if(c(this._shaders[a]))l=this._shaders[a],delete this._shadersToRelease[a];else{const u=this._context,d=t.createCombinedVertexShader(u),h=n.createCombinedFragmentShader(u),m=new di({gl:u._gl,logShaderCompilation:u.logShaderCompilation,debugShaders:u.debugShaders,vertexShaderSource:t,vertexShaderText:d,fragmentShaderSource:n,fragmentShaderText:h,attributeLocations:i});l={cache:this,shaderProgram:m,keyword:a,derivedKeywords:[],count:0},m._cachedShader=l,this._shaders[a]=l,++this._numberOfShaders}return++l.count,l.shaderProgram},md.prototype.replaceDerivedShaderProgram=function(e,t,n){const i=e._cachedShader,r=this._shaders[t+i.keyword];if(c(r)){m3(this,r);const s=i.derivedKeywords.indexOf(t);s>-1&&i.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,n)},md.prototype.getDerivedShaderProgram=function(e,t){const o=this._shaders[t+e._cachedShader.keyword];if(c(o))return o.shaderProgram},md.prototype.createDerivedShaderProgram=function(e,t,n){const i=e._cachedShader,o=t+i.keyword;let r=n.vertexShaderSource,s=n.fragmentShaderSource;const a=n.attributeLocations;"string"==typeof r&&(r=new St({sources:[r]})),"string"==typeof s&&(s=new St({sources:[s]}));const l=this._context,u=r.createCombinedVertexShader(l),d=s.createCombinedFragmentShader(l),h=new di({gl:l._gl,logShaderCompilation:l.logShaderCompilation,debugShaders:l.debugShaders,vertexShaderSource:r,vertexShaderText:u,fragmentShaderSource:s,fragmentShaderText:d,attributeLocations:a}),m={cache:this,shaderProgram:h,keyword:o,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),h._cachedShader=m,this._shaders[o]=m,h},md.prototype.destroyReleasedShaderPrograms=function(){const e=this._shadersToRelease;for(const t in e)e.hasOwnProperty(t)&&(m3(this,e[t]),--this._numberOfShaders);this._shadersToRelease={}},md.prototype.releaseShaderProgram=function(e){if(c(e)){const t=e._cachedShader;t&&0==--t.count&&(this._shadersToRelease[t.keyword]=t)}},md.prototype.isDestroyed=function(){return!1},md.prototype.destroy=function(){const e=this._shaders;for(const t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return Xe(this)};const hGe=md;function Hg(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}Object.defineProperties(Hg.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}}),Hg.prototype.getTexture=function(e){const t=this._textures[e];if(c(t))return delete this._texturesToRelease[e],++t.count,t.texture},Hg.prototype.addTexture=function(e,t){const n={texture:t,count:1};t.finalDestroy=t.destroy;const i=this;t.destroy=function(){0==--n.count&&(i._texturesToRelease[e]=n)},this._textures[e]=n,++this._numberOfTextures},Hg.prototype.destroyReleasedTextures=function(){const e=this._texturesToRelease;for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];delete this._textures[t],n.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}},Hg.prototype.isDestroyed=function(){return!1},Hg.prototype.destroy=function(){const e=this._textures;for(const t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return Xe(this)};const pGe=Hg,ID=function mGe(e){e=g(e,g.EMPTY_OBJECT),this.color=Z.clone(g(e.color,Z.WHITE)),this.intensity=g(e.intensity,2)};function Hb(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new Vt,this._viewportCartesian4=new de,this._viewportDirty=!1,this._viewportOrthographicMatrix=k.clone(k.IDENTITY),this._viewportTransformation=k.clone(k.IDENTITY),this._model=k.clone(k.IDENTITY),this._view=k.clone(k.IDENTITY),this._inverseView=k.clone(k.IDENTITY),this._projection=k.clone(k.IDENTITY),this._infiniteProjection=k.clone(k.IDENTITY),this._entireFrustum=new V,this._currentFrustum=new V,this._frustumPlanes=new de,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=oe.clone(k.IDENTITY),this._view3DDirty=!0,this._view3D=new k,this._inverseView3DDirty=!0,this._inverseView3D=new k,this._inverseModelDirty=!0,this._inverseModel=new k,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new oe,this._viewRotation=new oe,this._inverseViewRotation=new oe,this._viewRotation3D=new oe,this._inverseViewRotation3D=new oe,this._inverseProjectionDirty=!0,this._inverseProjection=new k,this._modelViewDirty=!0,this._modelView=new k,this._modelView3DDirty=!0,this._modelView3D=new k,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new k,this._inverseModelViewDirty=!0,this._inverseModelView=new k,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new k,this._viewProjectionDirty=!0,this._viewProjection=new k,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new k,this._modelViewProjectionDirty=!0,this._modelViewProjection=new k,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new k,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new k,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new k,this._normalDirty=!0,this._normal=new oe,this._normal3DDirty=!0,this._normal3D=new oe,this._inverseNormalDirty=!0,this._inverseNormal=new oe,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new oe,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new Vi,this._cameraPosition=new f,this._sunPositionWC=new f,this._sunPositionColumbusView=new f,this._sunDirectionWC=new f,this._sunDirectionEC=new f,this._moonDirectionEC=new f,this._lightDirectionWC=new f,this._lightDirectionEC=new f,this._lightColor=new f,this._lightColorHdr=new f,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new f,this._cameraRight=new f,this._cameraUp=new f,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new V,this._eyeEllipsoidNormalEC=new f,this._eyeEllipsoidCurvature=new V,this._modelToEnu=new k,this._enuToModel=new k,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new Z,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new V,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._fogMinimumBrightness=void 0,this._atmosphereHsbShift=void 0,this._atmosphereLightIntensity=void 0,this._atmosphereRayleighCoefficient=new f,this._atmosphereRayleighScaleHeight=new f,this._atmosphereMieCoefficient=new f,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(Hb.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!Vt.equals(e,this._viewport)){Vt.clone(e,this._viewport);const 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 iQ(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return iQ(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){k.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,k.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){const e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,k.getMatrix3(this.inverseModel,e),oe.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return _3(this),this._view3D}},viewRotation:{get:function(){return _3(this),this._viewRotation}},viewRotation3D:{get:function(){return _3(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return sQ(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return sQ(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return function SGe(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode===ce.SCENE2D||e._mode===ce.MORPHING||e._orthographicIn3D?k.clone(k.ZERO,e._inverseProjection):k.inverse(e._projection,e._inverseProjection))}(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return function vGe(e){e._modelViewDirty&&(e._modelViewDirty=!1,k.multiplyTransformation(e._view,e._model,e._modelView))}(this),this._modelView}},modelView3D:{get:function(){return function IGe(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,k.multiplyTransformation(e.view3D,e._model,e._modelView3D))}(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return function NGe(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;const 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]}}(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return function DGe(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,k.inverse(e.modelView,e._inverseModelView))}(this),this._inverseModelView}},inverseModelView3D:{get:function(){return function PGe(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,k.inverse(e.modelView3D,e._inverseModelView3D))}(this),this._inverseModelView3D}},viewProjection:{get:function(){return function OGe(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,k.multiply(e._projection,e._view,e._viewProjection))}(this),this._viewProjection}},inverseViewProjection:{get:function(){return function RGe(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,k.inverse(e.viewProjection,e._inverseViewProjection))}(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return function LGe(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,k.multiply(e._projection,e.modelView,e._modelViewProjection))}(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return function MGe(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,k.inverse(e.modelViewProjection,e._inverseModelViewProjection))}(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return function FGe(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,k.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return function BGe(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,k.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}(this),this._modelViewInfiniteProjection}},normal:{get:function(){return function kGe(e){if(e._normalDirty){e._normalDirty=!1;const t=e._normal;k.getMatrix3(e.inverseModelView,t),oe.transpose(t,t)}}(this),this._normal}},normal3D:{get:function(){return function UGe(e){if(e._normal3DDirty){e._normal3DDirty=!1;const t=e._normal3D;k.getMatrix3(e.inverseModelView3D,t),oe.transpose(t,t)}}(this),this._normal3D}},inverseNormal:{get:function(){return function zGe(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;const t=e._inverseNormal;k.getMatrix3(e.modelView,t),oe.transpose(t,t)}}(this),this._inverseNormal}},inverseNormal3D:{get:function(){return function VGe(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;const t=e._inverseNormal3D;k.getMatrix3(e.modelView3D,t),oe.transpose(t,t)}}(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 rQ(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return rQ(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 g(this._ellipsoid,he.default)}}});const nQ=new f,TGe=new k;let VC=new oe;const xGe=new Ce;Hb.prototype.updateCamera=function(e){(function _Ge(e,t){k.clone(t,e._view),k.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})(this,e.viewMatrix),function gGe(e,t){k.clone(t,e._inverseView),k.getMatrix3(t,e._inverseViewRotation)}(this,e.inverseViewMatrix),function AGe(e,t){f.clone(t.positionWC,e._cameraPosition),f.clone(t.directionWC,e._cameraDirection),f.clone(t.rightWC,e._cameraRight),f.clone(t.upWC,e._cameraUp);const n=e._ellipsoid;let i;const o=t.positionCartographic;if(c(o)?(e._eyeHeight=o.height,e._eyeEllipsoidNormalEC=n.geodeticSurfaceNormalCartographic(o,e._eyeEllipsoidNormalEC),i=f.fromRadians(o.longitude,o.latitude,0,n,nQ)):(e._eyeHeight=-n.maximumRadius,f.magnitude(t.positionWC)>0&&(e._eyeEllipsoidNormalEC=f.normalize(t.positionWC,e._eyeEllipsoidNormalEC)),i=n.scaleToGeodeticSurface(t.positionWC,nQ)),e._encodedCameraPositionMCDirty=!0,!c(i))return;e._eyeEllipsoidNormalEC=oe.multiplyByVector(e._viewRotation,e._eyeEllipsoidNormalEC,e._eyeEllipsoidNormalEC);const r=In.eastNorthUpToFixedFrame(i,n,TGe);e._enuToModel=k.multiplyTransformation(e.inverseModel,r,e._enuToModel),e._modelToEnu=k.inverseTransformation(e._enuToModel,e._modelToEnu),O.equalsEpsilon(n._radii.x,n._radii.y,O.EPSILON15)&&(e._eyeEllipsoidCurvature=n.getLocalCurvature(i,e._eyeEllipsoidCurvature))}(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==ce.SCENE2D&&e.frustum instanceof $n},Hb.prototype.updateFrustum=function(e){(function yGe(e,t){k.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0})(this,e.projectionMatrix),c(e.infiniteProjectionMatrix)&&function bGe(e,t){k.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=O.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne;const t=e.offCenterFrustum;c(t)&&(e=t),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right},Hb.prototype.updatePass=function(e){this._pass=e};const EGe=[],wGe=new ID;function iQ(e){if(e._viewportDirty){const t=e._viewport;k.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),k.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}Hb.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;const t=e.camera;this.updateCamera(t),e.mode===ce.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),function CGe(e,t){c(In.computeIcrfToFixedMatrix(t.time,VC))||(VC=In.computeTemeToPseudoFixedMatrix(t.time,VC));let n=r3.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);oe.multiplyByVector(VC,n,n),f.normalize(n,e._sunDirectionWC),n=oe.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),f.normalize(n,n),n=r3.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),oe.multiplyByVector(VC,n,n),oe.multiplyByVector(e.viewRotation3D,n,n),f.normalize(n,n);const i=t.mapProjection,r=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,xGe);i.project(r,e._sunPositionColumbusView)}(this,e);const n=g(e.light,wGe);n instanceof ID?(this._lightDirectionWC=f.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=f.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=f.normalize(f.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=oe.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));const i=n.color;let o=f.fromElements(i.red,i.green,i.blue,this._lightColorHdr);o=f.multiplyByScalar(o,n.intensity,o);const r=f.maximumComponent(o);r>1?f.divideByScalar(o,r,this._lightColor):f.clone(o,this._lightColor);const s=e.brdfLutGenerator,a=c(s)?s.colorTexture:void 0;this._brdfLut=a,this._environmentMap=g(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=g(e.sphericalHarmonicCoefficients,EGe),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,c(this._specularEnvironmentMaps)&&V.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._fogMinimumBrightness=e.fog.minimumBrightness;const l=e.atmosphere;c(l)&&(this._atmosphereHsbShift=f.fromElements(l.hueShift,l.saturationShift,l.brightnessShift,this._atmosphereHsbShift),this._atmosphereLightIntensity=l.lightIntensity,this._atmosphereRayleighCoefficient=f.clone(l.rayleighCoefficient,this._atmosphereRayleighCoefficient),this._atmosphereRayleighScaleHeight=l.rayleighScaleHeight,this._atmosphereMieCoefficient=f.clone(l.mieCoefficient,this._atmosphereMieCoefficient),this._atmosphereMieScaleHeight=l.mieScaleHeight,this._atmosphereMieAnisotropy=l.mieAnisotropy,this._atmosphereDynamicLighting=l.dynamicLighting),this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=In.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;const u=t.frustum.fov,d=this._viewport;let h;h=c(u)?d.height>d.width?2*Math.tan(.5*u)/d.height:2*Math.tan(.5*u)/d.width:1/Math.max(d.width,d.height),this._geometricToleranceOverMeter=h*e.maximumScreenSpaceError,Z.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};const oQ=new f;function rQ(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,k.multiplyByPoint(e.inverseModel,e._cameraPosition,oQ),Vi.fromCartesian(oQ,e._encodedCameraPositionMC))}const HGe=new f,GGe=new f,jGe=new f,WGe=new f,qGe=new Ce,YGe=new f,XGe=new k;function _3(e){e._view3DDirty&&(e._mode===ce.SCENE3D?k.clone(e._view,e._view3D):function ZGe(e,t,n,i,o,r,s,a){const l=HGe;l.x=e.y,l.y=e.z,l.z=e.x;const u=GGe;u.x=n.y,u.y=n.z,u.z=n.x;const d=jGe;d.x=i.y,d.y=i.z,d.z=i.x;const h=WGe;h.x=t.y,h.y=t.z,h.z=t.x,r===ce.SCENE2D&&(l.z=.5*o);const m=s.unproject(l,qGe);m.longitude=O.clamp(m.longitude,-Math.PI,Math.PI),m.latitude=O.clamp(m.latitude,-O.PI_OVER_TWO,O.PI_OVER_TWO);const _=s.ellipsoid,p=_.cartographicToCartesian(m,YGe),y=In.eastNorthUpToFixedFrame(p,_,XGe);k.multiplyByPointAsVector(y,u,u),k.multiplyByPointAsVector(y,d,d),k.multiplyByPointAsVector(y,h,h),c(a)||(a=new k),a[0]=u.x,a[1]=d.x,a[2]=-h.x,a[3]=0,a[4]=u.y,a[5]=d.y,a[6]=-h.y,a[7]=0,a[8]=u.z,a[9]=d.z,a[10]=-h.z,a[11]=0,a[12]=-f.dot(u,p),a[13]=-f.dot(d,p),a[14]=f.dot(h,p),a[15]=1}(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),k.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function sQ(e){e._inverseView3DDirty&&(k.inverseTransformation(e.view3D,e._inverseView3D),k.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}const $Ge=Hb;function Al(e,t){A.defined("canvas",e);const{getWebGLStub:n,requestWebgl1:i,webgl:o={},allowTextureFilterAnisotropic:r=!0}=g(t,{});o.alpha=g(o.alpha,!1),o.stencil=g(o.stencil,!0),o.powerPreference=g(o.powerPreference,"high-performance");const s=c(n)?n(e,o):function KGe(e,t,n){if(typeof WebGLRenderingContext>"u")throw new Pe("The browser does not support WebGL. Visit http://get.webgl.org.");!n&&!(typeof WebGL2RenderingContext<"u")&&(n=!0);const r=e.getContext(n?"webgl":"webgl2",t);if(!c(r))throw new Pe("The browser supports WebGL, but initialization failed.");return r}(e,o,i),l=typeof WebGL2RenderingContext<"u"&&s instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=s,this._gl=s,this._webgl2=l,this._id=kr(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new hGe(this),this._textureCache=new pGe;const u=s;this._stencilBits=u.getParameter(u.STENCIL_BITS),dn._maximumCombinedTextureImageUnits=u.getParameter(u.MAX_COMBINED_TEXTURE_IMAGE_UNITS),dn._maximumCubeMapSize=u.getParameter(u.MAX_CUBE_MAP_TEXTURE_SIZE),dn._maximumFragmentUniformVectors=u.getParameter(u.MAX_FRAGMENT_UNIFORM_VECTORS),dn._maximumTextureImageUnits=u.getParameter(u.MAX_TEXTURE_IMAGE_UNITS),dn._maximumRenderbufferSize=u.getParameter(u.MAX_RENDERBUFFER_SIZE),dn._maximumTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),dn._maximumVaryingVectors=u.getParameter(u.MAX_VARYING_VECTORS),dn._maximumVertexAttributes=u.getParameter(u.MAX_VERTEX_ATTRIBS),dn._maximumVertexTextureImageUnits=u.getParameter(u.MAX_VERTEX_TEXTURE_IMAGE_UNITS),dn._maximumVertexUniformVectors=u.getParameter(u.MAX_VERTEX_UNIFORM_VECTORS),dn._maximumSamples=this._webgl2?u.getParameter(u.MAX_SAMPLES):0;const d=u.getParameter(u.ALIASED_LINE_WIDTH_RANGE);dn._minimumAliasedLineWidth=d[0],dn._maximumAliasedLineWidth=d[1];const h=u.getParameter(u.ALIASED_POINT_SIZE_RANGE);dn._minimumAliasedPointSize=h[0],dn._maximumAliasedPointSize=h[1];const m=u.getParameter(u.MAX_VIEWPORT_DIMS);dn._maximumViewportWidth=m[0],dn._maximumViewportHeight=m[1];const _=u.getShaderPrecisionFormat(u.FRAGMENT_SHADER,u.HIGH_FLOAT);dn._highpFloatSupported=0!==_.precision;const p=u.getShaderPrecisionFormat(u.FRAGMENT_SHADER,u.HIGH_INT);dn._highpIntSupported=0!==p.rangeMax,this._antialias=u.getContextAttributes().antialias,this._standardDerivatives=!!Er(u,["OES_standard_derivatives"]),this._blendMinmax=!!Er(u,["EXT_blend_minmax"]),this._elementIndexUint=!!Er(u,["OES_element_index_uint"]),this._depthTexture=!!Er(u,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!Er(u,["EXT_frag_depth"]),this._debugShaders=Er(u,["WEBGL_debug_shaders"]),this._textureFloat=!!Er(u,["OES_texture_float"]),this._textureHalfFloat=!!Er(u,["OES_texture_half_float"]),this._textureFloatLinear=!!Er(u,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!Er(u,["OES_texture_half_float_linear"]),this._colorBufferFloat=!!Er(u,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!Er(u,["EXT_float_blend"]),this._colorBufferHalfFloat=!!Er(u,["EXT_color_buffer_half_float"]),this._s3tc=!!Er(u,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!Er(u,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!Er(u,["WEBGL_compressed_texture_astc"]),this._etc=!!Er(u,["WEBG_compressed_texture_etc"]),this._etc1=!!Er(u,["WEBGL_compressed_texture_etc1"]),this._bc7=!!Er(u,["EXT_texture_compression_bptc"]),o0.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);const y=r?Er(u,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;let b,x,C,w,v,I,P,N,R,B;if(this._textureFilterAnisotropic=y,dn._maximumTextureFilterAnisotropy=c(y)?u.getParameter(y.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,l){const L=this;b=function(){return L._gl.createVertexArray()},x=function(M){L._gl.bindVertexArray(M)},C=function(M){L._gl.deleteVertexArray(M)},w=function(M,U,z,G,W){u.drawElementsInstanced(M,U,z,G,W)},v=function(M,U,z,G){u.drawArraysInstanced(M,U,z,G)},I=function(M,U){u.vertexAttribDivisor(M,U)},P=function(M){u.drawBuffers(M)}}else N=Er(u,["OES_vertex_array_object"]),c(N)&&(b=function(){return N.createVertexArrayOES()},x=function(L){N.bindVertexArrayOES(L)},C=function(L){N.deleteVertexArrayOES(L)}),R=Er(u,["ANGLE_instanced_arrays"]),c(R)&&(w=function(L,M,U,z,G){R.drawElementsInstancedANGLE(L,M,U,z,G)},v=function(L,M,U,z){R.drawArraysInstancedANGLE(L,M,U,z)},I=function(L,M){R.vertexAttribDivisorANGLE(L,M)}),B=Er(u,["WEBGL_draw_buffers"]),c(B)&&(P=function(L){B.drawBuffersWEBGL(L)});this.glCreateVertexArray=b,this.glBindVertexArray=x,this.glDeleteVertexArray=C,this.glDrawElementsInstanced=w,this.glDrawArraysInstanced=v,this.glVertexAttribDivisor=I,this.glDrawBuffers=P,this._vertexArrayObject=!!N,this._instancedArrays=!!R,this._drawBuffers=!!B,dn._maximumDrawBuffers=this.drawBuffers?u.getParameter(ie.MAX_DRAW_BUFFERS):1,dn._maximumColorAttachments=this.drawBuffers?u.getParameter(ie.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new Z(0,0,0,0),this._clearDepth=1,this._clearStencil=0;const F=new $Ge,S=new Vg(this),D=Lt.fromCache();this._defaultPassState=S,this._defaultRenderState=D,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=F,this._currentRenderState=D,this._currentPassState=S,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let L=0;L<dn._maximumVertexAttributes;L++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this.options={getWebGLStub:n,requestWebgl1:i,webgl:o,allowTextureFilterAnisotropic:r},this.cache={},Lt.apply(u,D,S)}function e9e(e,t,n){const i=e.getError();if(i!==e.NO_ERROR)throw new Pe(function JGe(e,t,n,i){let o=`${function QGe(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}(e,i)}: ${t.name}(`;for(let r=0;r<n.length;++r)0!==r&&(o+=", "),o+=n[r];return o+=");",o}(e,t,n,i))}function t9e(e,t,n){return{get:function(){return n(e,`get: ${t}`,e[t]),e[t]},set:function(i){e[t]=i,n(e,`set: ${t}`,i)}}}function Er(e,t){const n=t.length;for(let i=0;i<n;++i){const o=e.getExtension(t[i]);if(o)return o}}const i9e={};function aQ(e,t,n,i){const o=e._currentRenderState,r=e._currentPassState;e._currentRenderState=t,e._currentPassState=n,Lt.partialApply(e._gl,o,t,r,n,i)}let g3;function y3(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=g3;if(c(t))t._bind(),function o9e(e){if(e.validateFramebuffer){const t=e._gl,n=t.checkFramebufferStatus(t.FRAMEBUFFER);if(n!==t.FRAMEBUFFER_COMPLETE){let i;switch(n){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:i="Framebuffer is not complete. Incomplete attachment: at least one attachment point with a renderbuffer or texture attached has its attached object no longer in existence or has an attached image with a width or height of zero, or the color attachment point has a non-color-renderable image attached, or the depth attachment point has a non-depth-renderable image attached, or the stencil attachment point has a non-stencil-renderable image attached. Color-renderable formats include GL_RGBA4, GL_RGB5_A1, and GL_RGB565. GL_DEPTH_COMPONENT16 is the only depth-renderable format. GL_STENCIL_INDEX8 is the only stencil-renderable format.";break;case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:i="Framebuffer is not complete. Incomplete dimensions: not all attached images have the same width and height.";break;case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:i="Framebuffer is not complete. Missing attachment: no images are attached to the framebuffer.";break;case t.FRAMEBUFFER_UNSUPPORTED:i="Framebuffer is not complete. Unsupported: the combination of internal formats of the attached images violates an implementation-dependent set of restrictions."}throw new E(i)}}}(e),n=t._getActiveColorAttachments();else{const i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}Object.defineProperties(Al.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=function n9e(e,t){if(!c(t))return e;function n(o){return function(){const r=o.apply(e,arguments);return t(e,o,arguments),r}}const i={};for(const o in e){const r=e[o];r instanceof Function?i[o]=n(r):Object.defineProperty(i,o,t9e(e,o,t))}return i}(this._originalGLContext,e?e9e:void 0)}},defaultTexture:{get:function(){return void 0===this._defaultTexture&&(this._defaultTexture=new Mn({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultEmissiveTexture:{get:function(){return void 0===this._defaultEmissiveTexture&&(this._defaultEmissiveTexture=new Mn({context:this,pixelFormat:Ct.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0])},flipY:!1})),this._defaultEmissiveTexture}},defaultNormalTexture:{get:function(){return void 0===this._defaultNormalTexture&&(this._defaultNormalTexture=new Mn({context:this,pixelFormat:Ct.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([128,128,255])},flipY:!1})),this._defaultNormalTexture}},defaultCubeMap:{get:function(){if(void 0===this._defaultCubeMap){const e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new C_({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 i9e}}}),typeof WebGLRenderingContext<"u"&&(g3=[ie.BACK]);const r9e=new ar;Al.prototype.clear=function(e,t){e=g(e,r9e),t=g(t,this._defaultPassState);const n=this._gl;let i=0;const o=e.color,r=e.depth,s=e.stencil;c(o)&&(Z.equals(this._clearColor,o)||(Z.clone(o,this._clearColor),n.clearColor(o.red,o.green,o.blue,o.alpha)),i|=n.COLOR_BUFFER_BIT),c(r)&&(r!==this._clearDepth&&(this._clearDepth=r,n.clearDepth(r)),i|=n.DEPTH_BUFFER_BIT),c(s)&&(s!==this._clearStencil&&(this._clearStencil=s,n.clearStencil(s)),i|=n.STENCIL_BUFFER_BIT),aQ(this,g(e.renderState,this._defaultRenderState),t,!0),y3(this,g(e.framebuffer,t.framebuffer)),n.clear(i)},Al.prototype.draw=function(e,t,n,i){A.defined("drawCommand",e),A.defined("drawCommand.shaderProgram",e._shaderProgram),t=g(t,this._defaultPassState);const o=g(e._framebuffer,t.framebuffer),r=g(e._renderState,this._defaultRenderState);n=g(n,e._shaderProgram),i=g(i,e._uniformMap),function s9e(e,t,n,i,o){if(c(t)&&o.depthTest&&o.depthTest.enabled&&!t.hasDepthAttachment)throw new E("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");y3(e,t),aQ(e,o,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}(this,o,t,n,r),function a9e(e,t,n,i){const o=t._primitiveType,r=t._vertexArray;let s=t._offset,a=t._count;const l=t.instanceCount;if(!Tt.validate(o))throw new E("drawCommand.primitiveType is required and must be valid.");if(A.defined("drawCommand.vertexArray",r),A.typeOf.number.greaterThanOrEquals("drawCommand.offset",s,0),c(a)&&A.typeOf.number.greaterThanOrEquals("drawCommand.count",a,0),A.typeOf.number.greaterThanOrEquals("drawCommand.instanceCount",l,0),l>0&&!e.instancedArrays)throw new E("Instanced arrays extension is not supported");e._us.model=g(t._modelMatrix,k.IDENTITY),n._setUniforms(i,e._us,e.validateShaderProgram),r._bind();const u=r.indexBuffer;c(u)?(s*=u.bytesPerIndex,a=c(a)?Math.min(a,u.numberOfIndices):u.numberOfIndices,0===l?e._gl.drawElements(o,a,u.indexDatatype,s):e.glDrawElementsInstanced(o,a,u.indexDatatype,s,l)):(a=c(a)?Math.min(a,r.numberOfVertices):r.numberOfVertices,0===l?e._gl.drawArrays(o,s,a):e.glDrawArraysInstanced(o,s,a,l)),r._unBind()}(this,e,n,i)},Al.prototype.endFrame=function(){const e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null),this.drawBuffers&&this.glDrawBuffers(g3);const 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)},Al.prototype.readPixels=function(e){const t=this._gl;e=g(e,g.EMPTY_OBJECT);const n=Math.max(g(e.x,0),0),i=Math.max(g(e.y,0),0),o=g(e.width,t.drawingBufferWidth),r=g(e.height,t.drawingBufferHeight),s=e.framebuffer;A.typeOf.number.greaterThan("readState.width",o,0),A.typeOf.number.greaterThan("readState.height",r,0);let a=yt.UNSIGNED_BYTE;c(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype);const l=Ct.createTypedArray(Ct.RGBA,a,o,r);return y3(this,s),t.readPixels(n,i,o,r,Ct.RGBA,yt.toWebGLConstant(a,this),l),l};const cQ={position:0,textureCoordinates:1};function b3(e,t,n){this._pickObjects=e,this.key=t,this.color=n}Al.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!c(e)){const t=new En({attributes:{position:new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:Tt.TRIANGLES});e=gs.fromGeometry({context:this,geometry:t,attributeLocations:cQ,bufferUsage:At.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e},Al.prototype.createViewportQuadCommand=function(e,t){return t=g(t,g.EMPTY_OBJECT),new $t({vertexArray:this.getViewportQuadVertexArray(),primitiveType:Tt.TRIANGLES,renderState:t.renderState,shaderProgram:di.fromCache({context:this,vertexShaderSource:tQ,fragmentShaderSource:e,attributeLocations:cQ}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})},Al.prototype.getObjectByPickColor=function(e){return A.defined("pickColor",e),this._pickObjects[e.toRgba()]},Object.defineProperties(b3.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),b3.prototype.destroy=function(){delete this._pickObjects[this.key]},Al.prototype.createPickId=function(e){A.defined("object",e),++this._nextPickColor[0];const t=this._nextPickColor[0];if(0===t)throw new Pe("Out of unique Pick IDs.");return this._pickObjects[t]=e,new b3(this._pickObjects,t,Z.fromRgba(t))},Al.prototype.isDestroyed=function(){return!1},Al.prototype.destroy=function(){const e=this.cache;for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];c(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(),Xe(this)},Al._deprecationWarning=Ud;const c9e=Al,HC={NONE:0,SCENE_LIGHT:1,SUNLIGHT:2,fromGlobeFlags:function(e){return e.enableLighting&&e.dynamicAtmosphereLighting?e.dynamicAtmosphereLightingFromSun?HC.SUNLIGHT:HC.SCENE_LIGHT:HC.NONE}},lQ=Object.freeze(HC),u9e=function l9e(){this.lightIntensity=10,this.rayleighCoefficient=new f(55e-7,13e-6,284e-7),this.mieCoefficient=new f(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=lQ.NONE};function GC(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(GC.prototype,{colorTexture:{get:function(){return this._colorTexture}}}),GC.prototype.update=function(e){if(!c(this._colorTexture)){const t=e.context,n=new Mn({context:t,width:256,height:256,pixelFormat:Ct.RGBA,pixelDatatype:yt.UNSIGNED_BYTE,sampler:vi.NEAREST});this._colorTexture=n;const i=new sh({context:t,colorTextures:[n],destroyAttachments:!1});(function f9e(e,t,n){const i=t.createViewportQuadCommand("in vec2 v_textureCoordinates;\nconst float M_PI = 3.141592653589793;\n\nfloat vdcRadicalInverse(int i)\n{\n float r;\n float base = 2.0;\n float value = 0.0;\n float invBase = 1.0 / base;\n float invBi = invBase;\n for (int x = 0; x < 100; x++)\n {\n if (i <= 0)\n {\n break;\n }\n r = mod(float(i), base);\n value += r * invBi;\n invBi *= invBase;\n i = int(float(i) * invBase);\n }\n return value;\n}\n\nvec2 hammersley2D(int i, int N)\n{\n return vec2(float(i) / float(N), vdcRadicalInverse(i));\n}\n\nvec3 importanceSampleGGX(vec2 xi, float roughness, vec3 N)\n{\n float a = roughness * roughness;\n float phi = 2.0 * M_PI * xi.x;\n float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\n float sinTheta = sqrt(1.0 - cosTheta * cosTheta);\n vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\n vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\n vec3 tangentX = normalize(cross(upVector, N));\n vec3 tangentY = cross(N, tangentX);\n return tangentX * H.x + tangentY * H.y + N * H.z;\n}\n\nfloat G1_Smith(float NdotV, float k)\n{\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfloat G_Smith(float roughness, float NdotV, float NdotL)\n{\n float k = roughness * roughness / 2.0;\n return G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\n\nvec2 integrateBrdf(float roughness, float NdotV)\n{\n vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\n float A = 0.0;\n float B = 0.0;\n const int NumSamples = 1024;\n for (int i = 0; i < NumSamples; i++)\n {\n vec2 xi = hammersley2D(i, NumSamples);\n vec3 H = importanceSampleGGX(xi, roughness, vec3(0.0, 0.0, 1.0));\n vec3 L = 2.0 * dot(V, H) * H - V;\n float NdotL = clamp(L.z, 0.0, 1.0);\n float NdotH = clamp(H.z, 0.0, 1.0);\n float VdotH = clamp(dot(V, H), 0.0, 1.0);\n if (NdotL > 0.0)\n {\n float G = G_Smith(roughness, NdotV, NdotL);\n float G_Vis = G * VdotH / (NdotH * NdotV);\n float Fc = pow(1.0 - VdotH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n return vec2(A, B) / float(NumSamples);\n}\n\nvoid main()\n{\n out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n",{framebuffer:n,renderState:Lt.fromCache({viewport:new Vt(0,0,256,256)})});e._drawCommand=i})(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}},GC.prototype.isDestroyed=function(){return!1},GC.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),Xe(this)};const h9e=GC,uQ={},m9e=new f,dQ=new f;function fQ(e,t,n,i){if(c(i)&&n(.5)>i){const o=n(0),r=n(1),s=n(.5),a=s-o,l=s-r;return function(u){const d=n(u);return u<=.5?O.lerp(e,-O.PI_OVER_TWO,(d-o)/a):O.lerp(-O.PI_OVER_TWO,t,1-(d-r)/l)}}return function(o){return O.lerp(e,t,o)}}function T3(e,t,n,i,o){let r=o;const s=Math.max(n,i);if(!c(r)){const u=e.up,d=e.right,h=e.frustum,m=f.subtract(e.position,t,m9e),_=f.magnitude(f.multiplyByScalar(u,f.dot(m,u),dQ)),p=f.magnitude(f.multiplyByScalar(d,f.dot(m,d),dQ));r=Math.min(.2*function p9e(e,t,n){let i,o,r;if(e instanceof Lo){const 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)}return e instanceof zg?(i=e.near,o=e.top,r=e.right,Math.max(t*i/r,n*i/o)):Math.max(t,n)}(h,_,p),1e9)}if(s<r){const u=-Math.pow(1e6*(r-n),.125),d=Math.pow(1e6*(r-i),1/8);return function(h){return-Math.pow(h*(d-u)+u,8)/1e6+r}}return function(a){return O.lerp(n,i,a)}}function jC(e,t){return O.equalsEpsilon(e,O.TWO_PI,O.EPSILON11)&&(e=0),t>e+Math.PI?e+=O.TWO_PI:t<e-Math.PI&&(e-=O.TWO_PI),e}const hQ=new f;function _9e(e,t,n,i,o,r,s,a){const l=e.camera,u=f.clone(l.position,hQ),d=l.pitch,h=jC(l.heading,i),m=jC(l.roll,r),_=T3(l,n,u.z,n.z,s),p=fQ(d,o,_,a);return function y(b){const x=b.time/t;l.setView({orientation:{heading:O.lerp(h,i,x),pitch:p(x),roll:O.lerp(m,r,x)}}),V.lerp(u,n,x,l.position),l.position.z=_(x)}}const b9e=new Ce,T9e=new Ce;function A9e(e,t,n,i,o,r,s,a,l,u){const d=e.camera,m=e.mapProjection.ellipsoid,_=Ce.clone(d.positionCartographic,b9e),p=d.pitch,y=jC(d.heading,i),b=jC(d.roll,r),x=m.cartesianToCartographic(n,T9e);_.longitude=O.zeroToTwoPi(_.longitude),x.longitude=O.zeroToTwoPi(x.longitude);let C=!1;if(c(a)){const P=O.zeroToTwoPi(a),N=Math.min(_.longitude,x.longitude),R=Math.max(_.longitude,x.longitude),B=P>=N&&P<=R;if(c(l)){const F=Math.abs(_.longitude-x.longitude),S=O.TWO_PI-F;(B?F:S)<(B?S:F)*l&&!B&&(C=!0)}else B||(C=!0)}C?function g9e(e,t){e.longitude<t.longitude?e.longitude+=O.TWO_PI:t.longitude+=O.TWO_PI}(_,x):function y9e(e,t){const n=e.longitude-t.longitude;n<-O.PI?e.longitude+=O.TWO_PI:n>O.PI&&(t.longitude+=O.TWO_PI)}(_,x);const w=T3(d,n,_.height,x.height,s),v=fQ(p,o,w,u);return function I(){const P=_.longitude,N=x.longitude,R=_.latitude,B=x.latitude;return function(S){const D=S.time/t,L=f.fromRadians(O.lerp(P,N,D),O.lerp(R,B,D),w(D),m);d.setView({destination:L,orientation:{heading:O.lerp(y,i,D),pitch:v(D),roll:O.lerp(b,r,D)}})}}()}function x9e(e,t,n,i,o,r,s){const a=e.camera,l=f.clone(a.position,hQ),u=jC(a.heading,i),h=T3(a,n,a.frustum.right-a.frustum.left,n.z,s);return function m(_){const p=_.time/t;a.setView({orientation:{heading:O.lerp(u,i,p)}}),V.lerp(l,n,p,a.position);const y=h(p),b=a.frustum,x=b.top/b.right,C=.5*(y-(b.right-b.left));b.right+=C,b.left-=C,b.top=x*b.right,b.bottom=-b.top}}const pQ=new Ce,C9e=new f;function A3(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function mQ(e,t){return function n(){"function"==typeof t&&t(),e.enableInputs=!0}}uQ.createTween=function(e,t){let n=(t=g(t,g.EMPTY_OBJECT)).destination;if(!c(e))throw new E("scene is required.");if(!c(n))throw new E("destination is required.");const i=e.mode;if(i===ce.MORPHING)return A3();const o=g(t.convert,!0),r=e.mapProjection,s=r.ellipsoid,a=t.maximumHeight,l=t.flyOverLongitude,u=t.flyOverLongitudeWeight,d=t.pitchAdjustHeight;let h=t.easingFunction;o&&i!==ce.SCENE3D&&(s.cartesianToCartographic(n,pQ),n=r.project(pQ,C9e));const m=e.camera,_=t.endTransform;c(_)&&m._setTransform(_);let p=t.duration;c(p)||(p=Math.ceil(f.distance(m.position,n)/1e6)+2,p=Math.min(p,3));const y=g(t.heading,0),b=g(t.pitch,-O.PI_OVER_TWO),x=g(t.roll,0),C=e.screenSpaceCameraController;C.enableInputs=!1;const w=mQ(C,t.complete),v=mQ(C,t.cancel),I=m.frustum;let P=e.mode===ce.SCENE2D;if(P=P&&V.equalsEpsilon(m.position,n,O.EPSILON6),P=P&&O.equalsEpsilon(Math.max(I.right-I.left,I.top-I.bottom),n.z,O.EPSILON6),P=P||e.mode!==ce.SCENE2D&&f.equalsEpsilon(n,m.position,O.EPSILON10),P=P&&O.equalsEpsilon(O.negativePiToPi(y),O.negativePiToPi(m.heading),O.EPSILON10)&&O.equalsEpsilon(O.negativePiToPi(b),O.negativePiToPi(m.pitch),O.EPSILON10)&&O.equalsEpsilon(O.negativePiToPi(x),O.negativePiToPi(m.roll),O.EPSILON10),P)return A3(w,v);const N=new Array(4);if(N[ce.SCENE2D]=x9e,N[ce.SCENE3D]=A9e,N[ce.COLUMBUS_VIEW]=_9e,p<=0)return A3(function(){N[i](e,1,n,y,b,x,a,l,u,d)({time:1}),"function"==typeof w&&w()},v);const R=N[i](e,p,n,y,b,x,a,l,u,d);if(!c(h)){const B=m.positionCartographic.height;h=B>(i===ce.SCENE3D?s.cartesianToCartographic(n).height:n.z)&&B>11500?Vc.CUBIC_OUT:Vc.QUINTIC_IN_OUT}return{duration:p,easingFunction:h,startObject:{time:0},stopObject:{time:p},update:R,complete:w,cancel:v}};const E9e=uQ,vm=Object.freeze({ROTATE:0,INFINITE_SCROLL:1});function fn(e){if(!c(e))throw new E("scene is required.");this._scene=e,this._transform=k.clone(k.IDENTITY),this._invTransform=k.clone(k.IDENTITY),this._actualTransform=k.clone(k.IDENTITY),this._actualInvTransform=k.clone(k.IDENTITY),this._transformChanged=!1,this.position=new f,this._position=new f,this._positionWC=new f,this._positionCartographic=new Ce,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new f,this._direction=new f,this._directionWC=new f,this.up=new f,this._up=new f,this._upWC=new f,this.right=new f,this._right=new f,this._rightWC=new f,this.frustum=new Lo,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=O.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 Ye,this._moveEnd=new Ye,this._changed=new Ye,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 k,this._invViewMatrix=new k,_Q(this),this._mode=ce.SCENE3D,this._modeChanged=!0;const t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new Ce(Math.PI,O.PI_OVER_TWO)),this._max2Dfrustum=void 0,OQ(this,fn.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=f.magnitude(this.position);n+=n*fn.DEFAULT_VIEW_FACTOR,f.normalize(this.position,this.position),f.multiplyByScalar(this.position,n,this.position)}function _Q(e){k.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),k.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),k.inverseTransformation(e._viewMatrix,e._invViewMatrix)}fn.TRANSFORM_2D=new k(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),fn.TRANSFORM_2D_INVERSE=k.inverseTransformation(fn.TRANSFORM_2D,new k),fn.DEFAULT_VIEW_RECTANGLE=Te.fromDegrees(-95,-20,-70,90),fn.DEFAULT_VIEW_FACTOR=.5,fn.DEFAULT_OFFSET=new gC(0,-O.PI_OVER_FOUR,0),fn.prototype.canPreloadFlight=function(){return c(this._currentFlight)&&this._mode!==ce.SCENE2D},fn.prototype._updateCameraChanged=function(){const e=this;if(function w9e(e){if(c(e._oldPositionWC)){e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;const t=f.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=f.magnitude(t),e._oldPositionWC=f.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=Cr()):e.timeSinceMoved=Math.max(Cr()-e._lastMovedTimestamp,0)/1e3}else e._oldPositionWC=f.clone(e.positionWC,e._oldPositionWC)}(e),0===e._changed.numberOfListeners)return;const t=e.percentageChanged,n=e.heading;c(e._changedHeading)||(e._changedHeading=n);let i=Math.abs(e._changedHeading-n)%O.TWO_PI;i=i>O.PI?O.TWO_PI-i:i;const o=i/Math.PI;o>t&&(e._changedHeading=n);const r=e.roll;c(e._changedRoll)||(e._changedRoll=r);let s=Math.abs(e._changedRoll-r)%O.TWO_PI;s=s>O.PI?O.TWO_PI-s:s;const a=s/Math.PI;if(a>t&&(e._changedRoll=r),(a>t||o>t)&&e._changed.raiseEvent(Math.max(a,o)),e._mode===ce.SCENE2D){if(!c(e._changedFrustum))return e._changedPosition=f.clone(e.position,e._changedPosition),void(e._changedFrustum=e.frustum.clone());const m=e.position,_=e._changedPosition,p=e.frustum,y=e._changedFrustum,b=m.x+p.left,x=m.x+p.right,C=_.x+y.left,w=_.x+y.right,v=m.y+p.bottom,I=m.y+p.top,P=_.y+y.bottom,N=_.y+y.top,R=Math.max(b,C),B=Math.min(x,w),F=Math.max(v,P),S=Math.min(I,N);let D;if(R>=B||F>=I)D=1;else{let L=y;b<C&&x>w&&v<P&&I>N&&(L=p),D=1-(B-R)*(S-F)/((L.right-L.left)*(L.top-L.bottom))}return void(D>t&&(e._changed.raiseEvent(D),e._changedPosition=f.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum)))}if(!c(e._changedDirection))return e._changedPosition=f.clone(e.positionWC,e._changedPosition),void(e._changedDirection=f.clone(e.directionWC,e._changedDirection));const l=O.acosClamped(f.dot(e.directionWC,e._changedDirection));let u;u=c(e.frustum.fovy)?l/(.5*e.frustum.fovy):l;const h=f.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(u>t||h>t)&&(e._changed.raiseEvent(Math.max(u,h)),e._changedPosition=f.clone(e.positionWC,e._changedPosition),e._changedDirection=f.clone(e.directionWC,e._changedDirection))};const v9e=new Ce,I9e=new f,DD=new f,D9e=new de,P9e=new de,O9e=new de,R9e=new de,L9e=new de,x3=new f;function Ua(e){const t=e._mode;let n=!1,i=0;t===ce.SCENE2D&&(i=e.frustum.right-e.frustum.left,n=i!==e._positionCartographic.height);let o=e._position;const r=!f.equals(o,e.position)||n;r&&(o=f.clone(e.position,e._position));let s=e._direction;const a=!f.equals(s,e.direction);a&&(f.normalize(e.direction,e.direction),s=f.clone(e.direction,e._direction));let l=e._up;const u=!f.equals(l,e.up);u&&(f.normalize(e.up,e.up),l=f.clone(e.up,e._up));let d=e._right;const h=!f.equals(d,e.right);h&&(f.normalize(e.right,e.right),d=f.clone(e.right,e._right));const m=e._transformChanged||e._modeChanged;e._transformChanged=!1,m&&(k.inverseTransformation(e._transform,e._invTransform),e._mode===ce.COLUMBUS_VIEW||e._mode===ce.SCENE2D?k.equals(k.IDENTITY,e._transform)?k.clone(fn.TRANSFORM_2D,e._actualTransform):e._mode===ce.COLUMBUS_VIEW?function S9e(e){In.basisTo2D(e._projection,e._transform,e._actualTransform)}(e):function N9e(e){const t=e._projection,n=t.ellipsoid,i=k.getColumn(e._transform,3,D9e),o=n.cartesianToCartographic(i,v9e),r=t.project(o,I9e),s=P9e;s.x=r.z,s.y=r.x,s.z=r.y,s.w=1;const a=de.clone(de.UNIT_X,L9e),l=de.add(k.getColumn(e._transform,0,DD),i,DD);n.cartesianToCartographic(l,o),t.project(o,r);const u=O9e;u.x=r.z,u.y=r.x,u.z=r.y,u.w=0,f.subtract(u,s,u),u.x=0;const d=R9e;if(f.magnitudeSquared(u)>O.EPSILON10)f.cross(a,u,d);else{const h=de.add(k.getColumn(e._transform,1,DD),i,DD);n.cartesianToCartographic(h,o),t.project(o,r),d.x=r.z,d.y=r.x,d.z=r.y,d.w=0,f.subtract(d,s,d),d.x=0,f.magnitudeSquared(d)<O.EPSILON10&&(de.clone(de.UNIT_Y,u),de.clone(de.UNIT_Z,d))}f.cross(d,a,u),f.normalize(u,u),f.cross(a,u,d),f.normalize(d,d),k.setColumn(e._actualTransform,0,u,e._actualTransform),k.setColumn(e._actualTransform,1,d,e._actualTransform),k.setColumn(e._actualTransform,2,a,e._actualTransform),k.setColumn(e._actualTransform,3,s,e._actualTransform)}(e):k.clone(e._transform,e._actualTransform),k.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);const _=e._actualTransform;if(r||m)if(e._positionWC=k.multiplyByPoint(_,o,e._positionWC),t===ce.SCENE3D||t===ce.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{const p=x3;p.x=e._positionWC.y,p.y=e._positionWC.z,p.z=e._positionWC.x,t===ce.SCENE2D&&(p.z=i),e._projection.unproject(p,e._positionCartographic)}if(a||u||h){const p=f.dot(s,f.cross(l,d,x3));if(Math.abs(1-p)>O.EPSILON2){const y=1/f.magnitudeSquared(l),b=f.dot(l,s)*y,x=f.multiplyByScalar(s,b,x3);l=f.normalize(f.subtract(l,x,e._up),e._up),f.clone(l,e.up),d=f.cross(s,l,e._right),f.clone(d,e.right)}}(a||m)&&(e._directionWC=k.multiplyByPointAsVector(_,s,e._directionWC),f.normalize(e._directionWC,e._directionWC)),(u||m)&&(e._upWC=k.multiplyByPointAsVector(_,l,e._upWC),f.normalize(e._upWC,e._upWC)),(h||m)&&(e._rightWC=k.multiplyByPointAsVector(_,d,e._rightWC),f.normalize(e._rightWC,e._rightWC)),(r||a||u||h||m)&&_Q(e)}function gQ(e,t){let n;return n=O.equalsEpsilon(Math.abs(e.z),1,O.EPSILON3)?Math.atan2(t.y,t.x)-O.PI_OVER_TWO:Math.atan2(e.y,e.x)-O.PI_OVER_TWO,O.TWO_PI-O.zeroToTwoPi(n)}function yQ(e){return O.PI_OVER_TWO-O.acosClamped(e.z)}function bQ(e,t,n){let i=0;return O.equalsEpsilon(Math.abs(e.z),1,O.EPSILON3)||(i=Math.atan2(-n.z,t.z),i=O.zeroToTwoPi(i+O.TWO_PI)),i}const PD=new k,OD=new k;Object.defineProperties(fn.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return Ua(this),this._invTransform}},viewMatrix:{get:function(){return Ua(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return Ua(this),this._invViewMatrix}},positionCartographic:{get:function(){return Ua(this),this._positionCartographic}},positionWC:{get:function(){return Ua(this),this._positionWC}},directionWC:{get:function(){return Ua(this),this._directionWC}},upWC:{get:function(){return Ua(this),this._upWC}},rightWC:{get:function(){return Ua(this),this._rightWC}},heading:{get:function(){if(this._mode!==ce.MORPHING){const e=this._projection.ellipsoid,t=k.clone(this._transform,PD),n=In.eastNorthUpToFixedFrame(this.positionWC,e,OD);this._setTransform(n);const i=gQ(this.direction,this.up);return this._setTransform(t),i}}},pitch:{get:function(){if(this._mode!==ce.MORPHING){const e=this._projection.ellipsoid,t=k.clone(this._transform,PD),n=In.eastNorthUpToFixedFrame(this.positionWC,e,OD);this._setTransform(n);const i=yQ(this.direction);return this._setTransform(t),i}}},roll:{get:function(){if(this._mode!==ce.MORPHING){const e=this._projection.ellipsoid,t=k.clone(this._transform,PD),n=In.eastNorthUpToFixedFrame(this.positionWC,e,OD);this._setTransform(n);const i=bQ(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}}}),fn.prototype.update=function(e){if(!c(e))throw new E("mode is required.");if(e===ce.SCENE2D&&!(this.frustum instanceof Qa))throw new E("An OrthographicOffCenterFrustum is required in 2D.");if(!(e!==ce.SCENE3D&&e!==ce.COLUMBUS_VIEW||this.frustum instanceof Lo||this.frustum instanceof $n))throw new E("A PerspectiveFrustum or OrthographicFrustum is required in 3D and Columbus view");let t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==ce.MORPHING,t=this._mode===ce.SCENE2D),t){const n=this._max2Dfrustum=this.frustum.clone();if(!(n instanceof Qa))throw new E("The camera frustum is expected to be orthographic for 2D camera control.");const o=n.top/n.right;n.right=2*this._maxCoord.x,n.left=-n.right,n.top=o*n.right,n.bottom=-n.top}this._mode===ce.SCENE2D&&CQ(this,this.position)};const M9e=new f,F9e=new f,B9e=new f;fn.prototype._setTransform=function(e){const t=f.clone(this.positionWC,M9e),n=f.clone(this.upWC,F9e),i=f.clone(this.directionWC,B9e);k.clone(e,this._transform),this._transformChanged=!0,Ua(this);const o=this._actualInvTransform;k.multiplyByPoint(o,t,this.position),k.multiplyByPointAsVector(o,i,this.direction),k.multiplyByPointAsVector(o,n,this.up),f.cross(this.direction,this.up,this.right),Ua(this)};const k9e=new V,U9e=new ii,z9e=new f,V9e=new f;function TQ(e){if(!k.equals(k.IDENTITY,e.transform))return f.magnitude(e.position);const t=e._scene,n=t.globe,i=k9e;let o,r,s;if(i.x=t.drawingBufferWidth/2,i.y=t.drawingBufferHeight/2,c(n)){const a=e.getPickRay(i,U9e);o=n.pickWorldCoordinates(a,t,!0,z9e)}if(t.pickPositionSupported&&(r=t.pickPositionWorldCoordinates(i,V9e)),c(o)||c(r)){const a=c(r)?f.distance(r,e.positionWC):Number.POSITIVE_INFINITY,l=c(o)?f.distance(o,e.positionWC):Number.POSITIVE_INFINITY;s=Math.min(a,l)}else s=Math.max(e.positionCartographic.height,0);return s}fn.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof $n&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=TQ(this)))};const RD=new f,C3=new k,H9e=new k,E3=new bt,w3=new oe,AQ=new Ce,q9e=new f,Y9e=new f,X9e=new f;function xQ(e,t,n,i){const o=f.clone(n.direction,q9e),r=f.clone(n.up,Y9e);if(e._scene.mode===ce.SCENE3D){const l=In.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,PD),u=k.inverseTransformation(l,OD);k.multiplyByPointAsVector(u,o,o),k.multiplyByPointAsVector(u,r,r)}const s=f.cross(o,r,X9e);return i.heading=gQ(o,r),i.pitch=yQ(o),i.roll=bQ(o,r,s),i}const S3={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},Gb=new Wy;fn.prototype.setView=function(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.orientation,g.EMPTY_OBJECT);const n=this._mode;if(n===ce.MORPHING)return;c(e.endTransform)&&this._setTransform(e.endTransform);let i=g(e.convert,!0),o=g(e.destination,f.clone(this.positionWC,RD));if(c(o)&&c(o.west)){if(o=this.getRectangleCameraCoordinates(o,RD),isNaN(o.x)||isNaN(o.y))throw new E("destination has a NaN component");i=!1}c(t.direction)&&(t=xQ(this,o,t,S3.orientation)),Gb.heading=g(t.heading,0),Gb.pitch=g(t.pitch,-O.PI_OVER_TWO),Gb.roll=g(t.roll,0),n===ce.SCENE3D?function G9e(e,t,n){if(isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new E("position has a NaN component");const i=k.clone(e.transform,C3),o=In.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,H9e);e._setTransform(o),f.clone(f.ZERO,e.position),n.heading=n.heading-O.PI_OVER_TWO;const r=bt.fromHeadingPitchRoll(n,E3),s=oe.fromQuaternion(r,w3);oe.getColumn(s,0,e.direction),oe.getColumn(s,2,e.up),f.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}(this,o,Gb):n===ce.SCENE2D?function W9e(e,t,n,i){const o=k.clone(e.transform,C3);if(e._setTransform(k.IDENTITY),!f.equals(t,e.positionWC)){if(i){const l=e._projection,u=l.ellipsoid.cartesianToCartographic(t,AQ);t=l.project(u,RD)}V.clone(t,e.position);const r=.5*-t.z,s=-r,a=e.frustum;if(s>r){const l=a.top/a.right;a.right=s,a.left=r,a.top=a.right*l,a.bottom=-a.top}}if(e._scene.mapMode2D===vm.ROTATE){n.heading=n.heading-O.PI_OVER_TWO,n.pitch=-O.PI_OVER_TWO,n.roll=0;const r=bt.fromHeadingPitchRoll(n,E3),s=oe.fromQuaternion(r,w3);oe.getColumn(s,2,e.up),f.cross(e.direction,e.up,e.right)}e._setTransform(o)}(this,o,Gb,i):function j9e(e,t,n,i){const o=k.clone(e.transform,C3);if(e._setTransform(k.IDENTITY),!f.equals(t,e.positionWC)){if(i){const a=e._projection,l=a.ellipsoid.cartesianToCartographic(t,AQ);t=a.project(l,RD)}f.clone(t,e.position)}n.heading=n.heading-O.PI_OVER_TWO;const r=bt.fromHeadingPitchRoll(n,E3),s=oe.fromQuaternion(r,w3);oe.getColumn(s,0,e.direction),oe.getColumn(s,2,e.up),f.cross(e.direction,e.up,e.right),e._setTransform(o),e._adjustOrthographicFrustum(!0)}(this,o,Gb,i)};const Z9e=new f;function CQ(e,t){const i=e._maxCoord.x,o=e._maxCoord.y;let r,s;e._scene.mapMode2D===vm.ROTATE?(s=i,r=-s):(s=t.x-2*i,r=t.x+2*i),t.x>i&&(t.x=s),t.x<-i&&(t.x=r),t.y>o&&(t.y=o),t.y<-o&&(t.y=-o)}fn.prototype.flyHome=function(e){const t=this._mode;if(t===ce.MORPHING&&this._scene.completeMorph(),t===ce.SCENE2D)this.flyTo({destination:fn.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:k.IDENTITY});else if(t===ce.SCENE3D){const n=this.getRectangleCameraCoordinates(fn.DEFAULT_VIEW_RECTANGLE);let i=f.magnitude(n);i+=i*fn.DEFAULT_VIEW_FACTOR,f.normalize(n,n),f.multiplyByScalar(n,i,n),this.flyTo({destination:n,duration:e,endTransform:k.IDENTITY})}else if(t===ce.COLUMBUS_VIEW){const n=this._projection.ellipsoid.maximumRadius;let i=new f(0,-1,1);i=f.multiplyByScalar(f.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(f.normalize(i,Z9e).z),roll:0},endTransform:k.IDENTITY,convert:!1})}},fn.prototype.worldToCameraCoordinates=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new de),Ua(this),k.multiplyByVector(this._actualInvTransform,e,t)},fn.prototype.worldToCameraCoordinatesPoint=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new f),Ua(this),k.multiplyByPoint(this._actualInvTransform,e,t)},fn.prototype.worldToCameraCoordinatesVector=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new f),Ua(this),k.multiplyByPointAsVector(this._actualInvTransform,e,t)},fn.prototype.cameraToWorldCoordinates=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new de),Ua(this),k.multiplyByVector(this._actualTransform,e,t)},fn.prototype.cameraToWorldCoordinatesPoint=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new f),Ua(this),k.multiplyByPoint(this._actualTransform,e,t)},fn.prototype.cameraToWorldCoordinatesVector=function(e,t){if(!c(e))throw new E("cartesian is required.");return c(t)||(t=new f),Ua(this),k.multiplyByPointAsVector(this._actualTransform,e,t)};const EQ=new f;fn.prototype.move=function(e,t){if(!c(e))throw new E("direction is required.");const n=this.position;f.multiplyByScalar(e,t,EQ),f.add(n,EQ,n),this._mode===ce.SCENE2D&&CQ(this,n),this._adjustOrthographicFrustum(!0)},fn.prototype.moveForward=function(e){e=g(e,this.defaultMoveAmount),this._mode===ce.SCENE2D?LD(this,e):this.move(this.direction,e)},fn.prototype.moveBackward=function(e){e=g(e,this.defaultMoveAmount),this._mode===ce.SCENE2D?LD(this,-e):this.move(this.direction,-e)},fn.prototype.moveUp=function(e){e=g(e,this.defaultMoveAmount),this.move(this.up,e)},fn.prototype.moveDown=function(e){e=g(e,this.defaultMoveAmount),this.move(this.up,-e)},fn.prototype.moveRight=function(e){e=g(e,this.defaultMoveAmount),this.move(this.right,e)},fn.prototype.moveLeft=function(e){e=g(e,this.defaultMoveAmount),this.move(this.right,-e)},fn.prototype.lookLeft=function(e){e=g(e,this.defaultLookAmount),this._mode!==ce.SCENE2D&&this.look(this.up,-e)},fn.prototype.lookRight=function(e){e=g(e,this.defaultLookAmount),this._mode!==ce.SCENE2D&&this.look(this.up,e)},fn.prototype.lookUp=function(e){e=g(e,this.defaultLookAmount),this._mode!==ce.SCENE2D&&this.look(this.right,-e)},fn.prototype.lookDown=function(e){e=g(e,this.defaultLookAmount),this._mode!==ce.SCENE2D&&this.look(this.right,e)};const $9e=new bt,K9e=new oe;fn.prototype.look=function(e,t){if(!c(e))throw new E("axis is required.");const n=g(t,this.defaultLookAmount),i=bt.fromAxisAngle(e,-n,$9e),o=oe.fromQuaternion(i,K9e),r=this.direction,s=this.up,a=this.right;oe.multiplyByVector(o,r,r),oe.multiplyByVector(o,s,s),oe.multiplyByVector(o,a,a)},fn.prototype.twistLeft=function(e){e=g(e,this.defaultLookAmount),this.look(this.direction,e)},fn.prototype.twistRight=function(e){e=g(e,this.defaultLookAmount),this.look(this.direction,-e)};const Q9e=new bt,J9e=new oe;fn.prototype.rotate=function(e,t){if(!c(e))throw new E("axis is required.");const n=g(t,this.defaultRotateAmount),i=bt.fromAxisAngle(e,-n,Q9e),o=oe.fromQuaternion(i,J9e);oe.multiplyByVector(o,this.position,this.position),oe.multiplyByVector(o,this.direction,this.direction),oe.multiplyByVector(o,this.up,this.up),f.cross(this.direction,this.up,this.right),f.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)},fn.prototype.rotateDown=function(e){SQ(this,e=g(e,this.defaultRotateAmount))},fn.prototype.rotateUp=function(e){SQ(this,-(e=g(e,this.defaultRotateAmount)))};const e6e=new f,t6e=new f,n6e=new f,wQ=new f;function SQ(e,t){const n=e.position;if(c(e.constrainedAxis)&&!f.equalsEpsilon(e.position,f.ZERO,O.EPSILON2)){const i=f.normalize(n,e6e),o=f.equalsEpsilon(i,e.constrainedAxis,O.EPSILON2),r=f.equalsEpsilon(i,f.negate(e.constrainedAxis,wQ),O.EPSILON2);if(o||r)(o&&t<0||r&&t>0)&&e.rotate(e.right,t);else{const s=f.normalize(e.constrainedAxis,t6e);let a=f.dot(i,s),l=O.acosClamped(a);t>0&&t>l&&(t=l-O.EPSILON4),a=f.dot(i,f.negate(s,wQ)),l=O.acosClamped(a),t<0&&-t>l&&(t=-l+O.EPSILON4);const u=f.cross(s,i,n6e);e.rotate(u,t)}}else e.rotate(e.right,t)}function vQ(e,t){c(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function LD(e,t){const n=e.frustum;if(!(n instanceof Qa&&c(n.left)&&c(n.right)&&c(n.bottom)&&c(n.top)))throw new E("The camera frustum is expected to be orthographic for 2D camera control.");let i;if(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===vm.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===vm.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 IQ(e,t){e.move(e.direction,t)}fn.prototype.rotateRight=function(e){vQ(this,-(e=g(e,this.defaultRotateAmount)))},fn.prototype.rotateLeft=function(e){vQ(this,e=g(e,this.defaultRotateAmount))},fn.prototype.zoomIn=function(e){e=g(e,this.defaultZoomAmount),this._mode===ce.SCENE2D?LD(this,e):IQ(this,e)},fn.prototype.zoomOut=function(e){e=g(e,this.defaultZoomAmount),this._mode===ce.SCENE2D?LD(this,-e):IQ(this,-e)},fn.prototype.getMagnitude=function(){return this._mode===ce.SCENE3D?f.magnitude(this.position):this._mode===ce.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===ce.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};const i6e=new k;fn.prototype.lookAt=function(e,t){if(!c(e))throw new E("target is required");if(!c(t))throw new E("offset is required");if(this._mode===ce.MORPHING)throw new E("lookAt is not supported while morphing.");const i=g(this._scene.ellipsoid,he.default),o=In.eastNorthUpToFixedFrame(e,i,i6e);this.lookAtTransform(o,t)};const o6e=new f,r6e=new bt,s6e=new bt,a6e=new oe;function DQ(e,t,n){t=O.clamp(t,-O.PI_OVER_TWO,O.PI_OVER_TWO),e=O.zeroToTwoPi(e)-O.PI_OVER_TWO;const i=bt.fromAxisAngle(f.UNIT_Y,-t,r6e),o=bt.fromAxisAngle(f.UNIT_Z,-e,s6e),r=bt.multiply(o,i,o),s=oe.fromQuaternion(r,a6e),a=f.clone(f.UNIT_X,o6e);return oe.multiplyByVector(s,a,a),f.negate(a,a),f.multiplyByScalar(a,n,a),a}fn.prototype.lookAtTransform=function(e,t){if(!c(e))throw new E("transform is required");if(this._mode===ce.MORPHING)throw new E("lookAtTransform is not supported while morphing.");if(this._setTransform(e),!c(t))return;let n;if(n=c(t.heading)?DQ(t.heading,t.pitch,t.range):t,this._mode===ce.SCENE2D){V.clone(V.ZERO,this.position),f.negate(n,this.up),this.up.z=0,f.magnitudeSquared(this.up)<O.EPSILON10&&f.clone(f.UNIT_Y,this.up),f.normalize(this.up,this.up),this._setTransform(k.IDENTITY),f.negate(f.UNIT_Z,this.direction),f.cross(this.direction,this.up,this.right),f.normalize(this.right,this.right);const i=this.frustum,o=i.top/i.right;return i.right=.5*f.magnitude(n),i.left=-i.right,i.top=o*i.right,i.bottom=-i.top,void this._setTransform(e)}f.clone(n,this.position),f.negate(this.position,this.direction),f.normalize(this.direction,this.direction),f.cross(this.direction,f.UNIT_Z,this.right),f.magnitudeSquared(this.right)<O.EPSILON10&&f.clone(f.UNIT_X,this.right),f.normalize(this.right,this.right),f.cross(this.right,this.direction,this.up),f.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};const WC=new Ce,c6e=new Ce,l6e=new f,u6e=new f,d6e=new f,f6e=new f,h6e=new f,p6e=new f,m6e=new f,v3=new f,_6e={direction:new f,right:new f,up:new f};let PQ;function za(e,t,n,i){return Math.abs(f.dot(t,n))/i-f.dot(e,n)}function OQ(e,t,n,i){const o=e._projection.ellipsoid,r=i?e:_6e,s=t.north,a=t.south;let l=t.east;const u=t.west;u>l&&(l+=O.TWO_PI);const d=.5*(u+l);let h;if(a<-O.PI_OVER_TWO+O.RADIANS_PER_DEGREE&&s>O.PI_OVER_TWO-O.RADIANS_PER_DEGREE)h=0;else{const B=WC;B.longitude=d,B.latitude=s,B.height=0;const F=c6e;F.longitude=d,F.latitude=a,F.height=0;let S=PQ;(!c(S)||S.ellipsoid!==o)&&(PQ=S=new jN(void 0,void 0,o)),S.setEndPoints(B,F),h=S.interpolateUsingFraction(.5,WC).latitude}const m=WC;m.longitude=d,m.latitude=h,m.height=0;const _=o.cartographicToCartesian(m,m6e),p=WC;p.longitude=l,p.latitude=s;const y=o.cartographicToCartesian(p,l6e);p.longitude=u;const b=o.cartographicToCartesian(p,d6e);p.longitude=d;const x=o.cartographicToCartesian(p,h6e);p.latitude=a;const C=o.cartographicToCartesian(p,p6e);p.longitude=l;const w=o.cartographicToCartesian(p,f6e);p.longitude=u;const v=o.cartographicToCartesian(p,u6e);f.subtract(b,_,b),f.subtract(w,_,w),f.subtract(y,_,y),f.subtract(v,_,v),f.subtract(x,_,x),f.subtract(C,_,C);const I=o.geodeticSurfaceNormal(_,r.direction);f.negate(I,I);const P=f.cross(I,f.UNIT_Z,r.right);f.normalize(P,P);const N=f.cross(P,I,r.up);let R;if(e.frustum instanceof $n){const B=Math.max(f.distance(y,b),f.distance(w,v)),F=Math.max(f.distance(y,w),f.distance(b,v));let S,D;const L=e.frustum._offCenterFrustum,M=L.right/L.top,U=F*M;B>U?(S=B,D=S/M):(D=F,S=U),R=Math.max(S,D)}else{const B=Math.tan(.5*e.frustum.fovy),F=e.frustum.aspectRatio*B;if(R=Math.max(za(I,N,b,B),za(I,N,w,B),za(I,N,y,B),za(I,N,v,B),za(I,N,x,B),za(I,N,C,B),za(I,P,b,F),za(I,P,w,F),za(I,P,y,F),za(I,P,v,F),za(I,P,x,F),za(I,P,C,F)),a<0&&s>0){const S=WC;S.longitude=u,S.latitude=0,S.height=0;let D=o.cartographicToCartesian(S,v3);f.subtract(D,_,D),R=Math.max(R,za(I,N,D,B),za(I,P,D,F)),S.longitude=l,D=o.cartographicToCartesian(S,v3),f.subtract(D,_,D),R=Math.max(R,za(I,N,D,B),za(I,P,D,F))}}return f.add(_,f.multiplyByScalar(I,-R,v3),n)}const g6e=new Ce,y6e=new f,b6e=new f,A6e=new Ce,x6e=new f,C6e=new f;fn.prototype.getRectangleCameraCoordinates=function(e,t){if(!c(e))throw new E("rectangle is required");const n=this._mode;return c(t)||(t=new f),n===ce.SCENE3D?OQ(this,e,t):n===ce.COLUMBUS_VIEW?function T6e(e,t,n){const i=e._projection;t.west>t.east&&(t=Te.MAX_VALUE);const o=e._actualTransform,r=e._actualInvTransform,s=g6e;s.longitude=t.east,s.latitude=t.north;const a=i.project(s,y6e);k.multiplyByPoint(o,a,a),k.multiplyByPoint(r,a,a),s.longitude=t.west,s.latitude=t.south;const l=i.project(s,b6e);if(k.multiplyByPoint(o,l,l),k.multiplyByPoint(r,l,l),n.x=.5*(a.x-l.x)+l.x,n.y=.5*(a.y-l.y)+l.y,c(e.frustum.fovy)){const u=Math.tan(.5*e.frustum.fovy);n.z=.5*Math.max((a.x-l.x)/(e.frustum.aspectRatio*u),(a.y-l.y)/u)}else n.z=Math.max(a.x-l.x,a.y-l.y);return n}(this,e,t):n===ce.SCENE2D?function E6e(e,t,n){const i=e._projection;let o=t.east;t.west>t.east&&(e._scene.mapMode2D===vm.INFINITE_SCROLL?o+=O.TWO_PI:o=(t=Te.MAX_VALUE).east);let r=A6e;r.longitude=o,r.latitude=t.north;const s=i.project(r,x6e);r.longitude=t.west,r.latitude=t.south;const a=i.project(r,C6e),l=.5*Math.abs(s.x-a.x);let d,h,u=.5*Math.abs(s.y-a.y);const m=e.frustum.right/e.frustum.top,_=u*m;return l>_?(d=l,h=d/m):(h=u,d=_),u=Math.max(2*d,2*h),n.x=.5*(s.x-a.x)+a.x,n.y=.5*(s.y-a.y)+a.y,r=i.unproject(n,r),r.height=u,i.project(r,n)}(this,e,t):void 0};const w6e=new ii,v6e=new ii,D6e=new ii;fn.prototype.pickEllipsoid=function(e,t,n){if(!c(e))throw new E("windowPosition is required.");const i=this._scene.canvas;if(0!==i.clientWidth&&0!==i.clientHeight){if(c(n)||(n=new f),t=g(t,he.default),this._mode===ce.SCENE3D)n=function S6e(e,t,n,i){n=g(n,he.default);const o=e.getPickRay(t,w6e),r=So.rayEllipsoid(o,n);if(r)return ii.getPoint(o,r.start>0?r.start:r.stop,i)}(this,e,t,n);else if(this._mode===ce.SCENE2D)n=function I6e(e,t,n,i){let r=e.getPickRay(t,v6e).origin;r=f.fromElements(r.y,r.z,0,r);const s=n.unproject(r);if(!(s.latitude<-O.PI_OVER_TWO||s.latitude>O.PI_OVER_TWO))return n.ellipsoid.cartographicToCartesian(s,i)}(this,e,this._projection,n);else{if(this._mode!==ce.COLUMBUS_VIEW)return;n=function P6e(e,t,n,i){const o=e.getPickRay(t,D6e);ii.getPoint(o,-o.origin.x/o.direction.x,i);const s=n.unproject(new f(i.y,i.z,0));if(!(s.latitude<-O.PI_OVER_TWO||s.latitude>O.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI))return n.ellipsoid.cartographicToCartesian(s,i)}(this,e,this._projection,n)}return n}};const O6e=new f,R6e=new f,L6e=new f,ND=new f;fn.prototype.getPickRay=function(e,t){if(!c(e))throw new E("windowPosition is required.");c(t)||(t=new ii);const n=this._scene.canvas;if(n.clientWidth<=0||n.clientHeight<=0)return;const i=this.frustum;return c(i.aspectRatio)&&c(i.fov)&&c(i.near)?function N6e(e,t,n){const i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=Math.tan(.5*e.frustum.fovy),a=e.frustum.aspectRatio*s,l=e.frustum.near,u=2/o*t.x-1,d=2/r*(r-t.y)-1,h=e.positionWC;f.clone(h,n.origin);const m=f.multiplyByScalar(e.directionWC,l,O6e);f.add(h,m,m);const _=f.multiplyByScalar(e.rightWC,u*l*a,R6e),p=f.multiplyByScalar(e.upWC,d*l*s,L6e),y=f.add(m,_,n.direction);return f.add(y,p,y),f.subtract(y,h,y),f.normalize(y,y),n}(this,e,t):function M6e(e,t,n){const i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight;let s=e.frustum;const a=s.offCenterFrustum;c(a)&&(s=a);let l=2/o*t.x-1;l*=.5*(s.right-s.left);let u=2/r*(r-t.y)-1;u*=.5*(s.top-s.bottom);const d=n.origin;return f.clone(e.position,d),f.multiplyByScalar(e.right,l,ND),f.add(ND,d,d),f.multiplyByScalar(e.up,u,ND),f.add(ND,d,d),f.clone(e.directionWC,n.direction),(e._mode===ce.COLUMBUS_VIEW||e._mode===ce.SCENE2D)&&f.fromElements(n.origin.z,n.origin.x,n.origin.y,n.origin),n}(this,e,t)};const F6e=new f,B6e=new f;fn.prototype.distanceToBoundingSphere=function(e){if(!c(e))throw new E("boundingSphere is required.");const t=f.subtract(this.positionWC,e.center,F6e),n=f.multiplyByScalar(this.directionWC,f.dot(t,this.directionWC),B6e);return Math.max(0,f.magnitude(n)-e.radius)};const k6e=new V;fn.prototype.getPixelSize=function(e,t,n){if(!c(e))throw new E("boundingSphere is required.");if(!c(t))throw new E("drawingBufferWidth is required.");if(!c(n))throw new E("drawingBufferHeight is required.");const i=this.distanceToBoundingSphere(e),o=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,k6e);return Math.max(o.x,o.y)};const z6e=new f,RQ=new f,V6e=new f,H6e=new f;fn.prototype.createCorrectPositionTween=function(e){if(!c(e))throw new E("duration is required.");if(this._mode===ce.COLUMBUS_VIEW)return function G6e(e,t){let n=e.position;const i=e.direction,o=e.worldToCameraCoordinatesVector(f.UNIT_X,z6e),r=-f.dot(o,n)/f.dot(o,i),s=f.add(n,f.multiplyByScalar(i,r,RQ),RQ);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,V6e);const a=Math.tan(.5*e.frustum.fovy),l=e.frustum.aspectRatio*a,u=f.magnitude(f.subtract(n,s,H6e)),h=a*u,m=e._maxCoord.x,_=e._maxCoord.y,p=Math.max(l*u-m,m),y=Math.max(h-_,_);if((n.z<-p||n.z>p||n.y<-y||n.y>y)&&(s.y<-p||s.y>p||s.z<-y||s.z>y))return function U6e(e,t,n,i,o,r){const s=f.clone(t);return 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),{easingFunction:Vc.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:r,update:function a(l){const u=f.lerp(t,s,l.time,new f);e.worldToCameraCoordinatesPoint(u,e.position)}}}(e,n,s,p,y,t)}(this,e)};const j6e=new f,ws={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};function LQ(e,t,n){n=gC.clone(c(n)?n:fn.DEFAULT_OFFSET);const i=e._scene.screenSpaceCameraController.minimumZoomDistance,o=e._scene.screenSpaceCameraController.maximumZoomDistance,r=n.range;if(!c(r)||0===r){const s=t.radius;n.range=0===s?100:e.frustum instanceof $n||e._mode===ce.SCENE2D?function q6e(e,t){let n=e.frustum;const i=n.offCenterFrustum;let o,r;c(i)&&(n=i);const s=n.right/n.top,a=t*s;return t>a?(o=t,r=o/s):(r=t,o=a),1.5*Math.max(o,r)}(e,s):function W6e(e,t){const n=e.frustum,i=Math.tan(.5*n.fovy);return Math.max(t/(n.aspectRatio*i),t/i)}(e,s),n.range=O.clamp(n.range,i,o)}return n}fn.prototype.cancelFlight=function(){c(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)},fn.prototype.completeFlight=function(){if(c(this._currentFlight)){this._currentFlight.cancelTween();const e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}};e.destination=ws.destination,e.orientation.heading=ws.heading,e.orientation.pitch=ws.pitch,e.orientation.roll=ws.roll,this.setView(e),c(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}},fn.prototype.flyTo=function(e){let t=(e=g(e,g.EMPTY_OBJECT)).destination;if(!c(t))throw new E("destination is required.");if(this._mode===ce.MORPHING)return;this.cancelFlight();const i=t instanceof Te;i&&(t=this.getRectangleCameraCoordinates(t,j6e));let o=g(e.orientation,g.EMPTY_OBJECT);if(c(o.direction)&&(o=xQ(this,t,o,S3.orientation)),c(e.duration)&&e.duration<=0){const d=S3;return d.destination=e.destination,d.orientation.heading=o.heading,d.orientation.pitch=o.pitch,d.orientation.roll=o.roll,d.convert=e.convert,d.endTransform=e.endTransform,this.setView(d),void("function"==typeof e.complete&&e.complete())}const r=this;let s;ws.destination=t,ws.heading=o.heading,ws.pitch=o.pitch,ws.roll=o.roll,ws.duration=e.duration,ws.complete=function(){s===r._currentFlight&&(r._currentFlight=void 0),c(e.complete)&&e.complete()},ws.cancel=e.cancel,ws.endTransform=e.endTransform,ws.convert=!i&&e.convert,ws.maximumHeight=e.maximumHeight,ws.pitchAdjustHeight=e.pitchAdjustHeight,ws.flyOverLongitude=e.flyOverLongitude,ws.flyOverLongitudeWeight=e.flyOverLongitudeWeight,ws.easingFunction=e.easingFunction;const a=this._scene,l=E9e.createTween(a,ws);if(0===l.duration)return void("function"==typeof l.complete&&l.complete());s=a.tweens.add(l),this._currentFlight=s;let u=this._scene.preloadFlightCamera;this._mode!==ce.SCENE2D&&(c(u)||(u=fn.clone(this)),u.setView({destination:t,orientation:o}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))},fn.prototype.viewBoundingSphere=function(e,t){if(!c(e))throw new E("boundingSphere is required.");if(this._mode===ce.MORPHING)throw new E("viewBoundingSphere is not supported while morphing.");t=LQ(this,e,t),this.lookAt(e.center,t)};const X6e=new k,Z6e=new f,$6e=new f,K6e=new f,Q6e=new f,J6e=new de,eje=new bt,tje=new oe;fn.prototype.flyToBoundingSphere=function(e,t){if(!c(e))throw new E("boundingSphere is required.");t=g(t,g.EMPTY_OBJECT);const n=this._mode===ce.SCENE2D||this._mode===ce.COLUMBUS_VIEW;this._setTransform(k.IDENTITY);const i=LQ(this,e,t.offset);let o;o=n?f.multiplyByScalar(f.UNIT_Z,i.range,Z6e):DQ(i.heading,i.pitch,i.range);const s=g(this._scene.ellipsoid,he.default),a=In.eastNorthUpToFixedFrame(e.center,s,X6e);let l,u;if(k.multiplyByPoint(a,o,o),!n){if(l=f.subtract(e.center,o,$6e),f.normalize(l,l),u=k.multiplyByPointAsVector(a,f.UNIT_Z,K6e),1-Math.abs(f.dot(l,u))<O.EPSILON6){const h=bt.fromAxisAngle(l,i.heading,eje),m=oe.fromQuaternion(h,tje);f.fromCartesian4(k.getColumn(a,1,J6e),u),oe.multiplyByVector(m,u,u)}const d=f.cross(l,u,Q6e);f.cross(d,l,u),f.normalize(u,u)}this.flyTo({destination:o,orientation:{direction:l,up:u},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})};const NQ=new f,MQ=new f,I3=new f,FQ=new f,qC=[new f,new f,new f,new f],D3=new V,ije=new f,Im=[new Ce,new Ce,new Ce,new Ce];function MD(e,t,n,i,o,r){D3.x=e,D3.y=t;const s=i.pickEllipsoid(D3,o,ije);return c(s)?(Im[n]=o.cartesianToCartographic(s,Im[n]),1):(Im[n]=o.cartesianToCartographic(r[n],Im[n]),0)}fn.prototype.computeViewRectangle=function(e,t){e=g(e,he.default);const n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new Ae(f.ZERO,e.maximumRadius);if(n.computeVisibility(i)===On.OUTSIDE)return;const r=this._scene.canvas,s=r.clientWidth,a=r.clientHeight;let l=0;const u=function nje(e,t){const n=t.radii,o=f.multiplyComponents(t.oneOverRadii,e.positionWC,NQ),r=f.magnitude(o),s=f.normalize(o,MQ);let a,l;f.equalsEpsilon(s,f.UNIT_Z,O.EPSILON10)?(a=new f(0,1,0),l=new f(0,0,1)):(a=f.normalize(f.cross(f.UNIT_Z,s,I3),I3),l=f.normalize(f.cross(s,a,FQ),FQ));const u=Math.sqrt(f.magnitudeSquared(o)-1),d=f.multiplyByScalar(s,1/r,NQ),h=u/r,m=f.multiplyByScalar(a,h,MQ),_=f.multiplyByScalar(l,h,I3),p=f.add(d,_,qC[0]);f.subtract(p,m,p),f.multiplyComponents(n,p,p);const y=f.subtract(d,_,qC[1]);f.subtract(y,m,y),f.multiplyComponents(n,y,y);const b=f.subtract(d,_,qC[2]);f.add(b,m,b),f.multiplyComponents(n,b,b);const x=f.add(d,_,qC[3]);return f.add(x,m,x),f.multiplyComponents(n,x,x),qC}(this,e);if(l+=MD(0,0,0,this,e,u),l+=MD(0,a,1,this,e,u),l+=MD(s,a,2,this,e,u),l+=MD(s,0,3,this,e,u),l<2)return Te.MAX_VALUE;t=Te.fromCartographicArray(Im,t);let d=0,h=Im[3].longitude;for(let m=0;m<4;++m){const _=Im[m].longitude,p=Math.abs(_-h);d+=p>O.PI?O.TWO_PI-p:p,h=_}return O.equalsEpsilon(Math.abs(d),O.TWO_PI,O.EPSILON9)&&(t.west=-O.PI,t.east=O.PI,Im[0].latitude>=0?t.north=O.PI_OVER_TWO:t.south=-O.PI_OVER_TWO),t},fn.prototype.switchToPerspectiveFrustum=function(){if(this._mode===ce.SCENE2D||this.frustum instanceof Lo)return;const e=this._scene;this.frustum=new Lo,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=O.toRadians(60)},fn.prototype.switchToOrthographicFrustum=function(){if(this._mode===ce.SCENE2D||this.frustum instanceof $n)return;const e=TQ(this),t=this._scene;this.frustum=new $n,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e},fn.clone=function(e,t){return c(t)||(t=new fn(e._scene)),f.clone(e.position,t.position),f.clone(e.direction,t.direction),f.clone(e.up,t.up),f.clone(e.right,t.right),k.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};const nr=fn,Gg=function oje(e){A.typeOf.object("options",e),A.typeOf.number("options.pass",e.pass),this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1},rje=100,YC="#ffffff",FD="#48b";function kQ(e,t){this.credit=e,this.count=g(t,1)}const UQ="cesium-credit-delimiter";function zQ(e){const t=document.createElement("span");return t.textContent=e,t.className=UQ,t}function VQ(e,t){if(c(t)){const n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function HQ(e,t,n,i){const o=e.childNodes;let r=-1;t.sort(function(s,a){return a.count-s.count});for(let s=0;s<t.length;++s){const a=t[s].credit;if(c(a)){if(r=s,c(n)&&(r*=2,s>0)){const u=r-1;if(o.length<=u)e.appendChild(zQ(n));else{const d=o[u];d.className!==UQ&&e.replaceChild(zQ(n),d)}}const l=a.element;if(o.length<=r)e.appendChild(VQ(l,i));else{const u=o[r];u._creditId!==a._id&&e.replaceChild(VQ(l,i),u)}}}for(++r;r<o.length;)e.removeChild(o[r])}function ir(e,t,n){A.defined("container",e);const i=this;n=g(n,document.body);const o=document.createElement("div");o.className="cesium-credit-lightbox-overlay",n.appendChild(o);const r=document.createElement("div");function s(p){r.contains(p.target)||i.hideLightbox()}r.className="cesium-credit-lightbox",o.appendChild(r),o.addEventListener("click",s,!1);const a=document.createElement("div");a.className="cesium-credit-lightbox-title",a.textContent="Data provided by:",r.appendChild(a);const l=document.createElement("a");l.onclick=this.hideLightbox.bind(this),l.innerHTML="×",l.className="cesium-credit-lightbox-close",r.appendChild(l);const u=document.createElement("ul");r.appendChild(u);const d=document.createElement("div");d.className="cesium-credit-logoContainer",d.style.display="inline",e.appendChild(d);const h=document.createElement("div");h.className="cesium-credit-textContainer",h.style.display="inline",e.appendChild(h);const m=document.createElement("a");m.className="cesium-credit-expand-link",m.onclick=this.showLightbox.bind(this),m.textContent="Data attribution",e.appendChild(m),function lje(e){const t=`\n.cesium-credit-lightbox-overlay {\n display: none;\n z-index: 1;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(80, 80, 80, 0.8);\n}\n\n.cesium-credit-lightbox {\n background-color: #303336;\n color: ${YC};\n position: relative;\n min-height: ${rje}px;\n margin: auto;\n}\n.cesium-credit-lightbox > ul > li a,\n.cesium-credit-lightbox > ul > li a:visited,\n.cesium-credit-wrapper a,\n.cesium-credit-wrapper a:visited {\n color: ${YC};\n}\n.cesium-credit-lightbox > ul > li a:hover {\n color: ${FD};\n}\n.cesium-credit-lightbox.cesium-credit-lightbox-expanded {\n border: 1px solid #444;\n border-radius: 5px;\n max-width: 370px;\n}\n.cesium-credit-lightbox.cesium-credit-lightbox-mobile {\n height: 100%;\n width: 100%;\n}\n.cesium-credit-lightbox-title {\n padding: 20px 20px 0 20px;\n}\n.cesium-credit-lightbox-close {\n font-size: 18pt;\n cursor: pointer;\n position: absolute;\n top: 0;\n right: 6px;\n color: ${YC};\n}\n.cesium-credit-lightbox-close:hover {\n color: ${FD};\n}\n.cesium-credit-lightbox > ul {\n margin: 0;\n padding: 12px 20px 12px 40px;\n font-size: 13px;\n}\n.cesium-credit-lightbox > ul > li {\n padding-bottom: 6px;\n}\n.cesium-credit-lightbox > ul > li * {\n padding: 0;\n margin: 0;\n}\n\n.cesium-credit-expand-link {\n padding-left: 5px;\n cursor: pointer;\n text-decoration: underline;\n color: ${YC};\n}\n.cesium-credit-expand-link:hover {\n color: ${FD};\n}\n\n.cesium-credit-text {\n color: ${YC};\n}\n\n.cesium-credit-delimiter {\n padding: 0 5px;\n}\n\n.cesium-credit-textContainer *,\n.cesium-credit-logoContainer * {\n display: inline;\n}\n\n.cesium-credit-textContainer a:hover {\n color: ${FD}\n}\n\n.cesium-credit-textContainer .cesium-credit-wrapper:first-of-type {\n padding-left: 5px;\n}\n`,i=g(function n(r){if(r.shadowRoot)return r.shadowRoot;if(r.getRootNode){const s=r.getRootNode();if(s instanceof ShadowRoot)return s}}(e),document.head),o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}(e);const _=Yn.clone(ir.cesiumCredit);this._delimiter=g(t,"\u2022"),this._screenContainer=h,this._cesiumCreditContainer=d,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=r,this._creditList=u,this._lightbox=o,this._hideLightbox=s,this._expandLink=m,this._expanded=!1,this._staticCredits=[],this._cesiumCredit=_,this._previousCesiumCredit=void 0,this._currentCesiumCredit=_,this._creditDisplayElementPool=[],this._creditDisplayElementIndex=0,this._currentFrameCredits={screenCredits:new mn,lightboxCredits:new mn},this._defaultCredit=void 0,this.viewport=n,this.container=e}function GQ(e,t,n,i){i=g(i,1);let o=t.get(n.id);if(c(o))o.count<Number.MAX_VALUE&&(o.count+=i);else{const r=e._creditDisplayElementPool,s=e._creditDisplayElementPoolIndex;s<r.length?(o=r[s],o.credit=n,o.count=i):(o=new kQ(n,i),r.push(o)),++e._creditDisplayElementPoolIndex,t.set(n.id,o)}}let BD;function jQ(){if(!c(BD)){let e=Jn("Assets/Images/ion-credit.png");0!==e.indexOf("http://")&&0!==e.indexOf("https://")&&0!==e.indexOf("data:")&&(e=new Zr(e).path()),BD=new Yn(`<a href="https://cesium.com/" target="_blank"><img src="${e}" style="vertical-align: -7px" title="Cesium ion"/></a>`,!0)}return ir._cesiumCreditInitialized||(ir._cesiumCredit=BD,ir._cesiumCreditInitialized=!0),BD}ir.prototype.addCreditToNextFrame=function(e){if(A.defined("credit",e),e.isIon())return c(this._defaultCredit)||(this._defaultCredit=Yn.clone(jQ())),void(this._currentCesiumCredit=this._defaultCredit);let t;t=e.showOnScreen?this._currentFrameCredits.screenCredits:this._currentFrameCredits.lightboxCredits,GQ(this,t,e)},ir.prototype.addStaticCredit=function(e){A.defined("credit",e);const t=this._staticCredits;(function sje(e,t){const n=e.length;for(let i=0;i<n;i++)if(Yn.equals(e[i],t))return!0;return!1})(t,e)||t.push(e)},ir.prototype.removeStaticCredit=function(e){A.defined("credit",e);const t=this._staticCredits,n=t.indexOf(e);-1!==n&&t.splice(n,1)},ir.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0},ir.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1},ir.prototype.update=function(){this._expanded&&function cje(e){const t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<576?(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(.5*(i-t.clientHeight))}px`),e._lastViewportWidth=n),n>=576&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor(.5*(i-t.clientHeight))}px`,e._lastViewportHeight=i)}(this)},ir.prototype.beginFrame=function(){const e=this._currentFrameCredits;this._creditDisplayElementPoolIndex=0;const t=e.screenCredits,n=e.lightboxCredits;t.removeAll(),n.removeAll();const i=this._staticCredits;for(let o=0;o<i.length;++o){const r=i[o],s=r.showOnScreen?t:n;r.isIon()&&Yn.equals(ir.cesiumCredit,this._cesiumCredit)||GQ(this,s,r,Number.MAX_VALUE)}Yn.equals(ir.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=Yn.clone(ir.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit},ir.prototype.endFrame=function(){HQ(this._screenContainer,this._currentFrameCredits.screenCredits.values,this._delimiter,void 0);const t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",HQ(this._creditList,t,void 0,"li"),function aje(e){const t=e._previousCesiumCredit,n=e._currentCesiumCredit;Yn.equals(n,t)||(c(t)&&e._cesiumCreditContainer.removeChild(t.element),c(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}(this)},ir.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),Xe(this)},ir.prototype.isDestroyed=function(){return!1},ir._cesiumCredit=void 0,ir._cesiumCreditInitialized=!1,Object.defineProperties(ir,{cesiumCredit:{get:function(){return jQ(),ir._cesiumCredit},set:function(e){ir._cesiumCredit=e,ir._cesiumCreditInitialized=!0}}}),ir.CreditDisplayElement=kQ;const uje=ir;function jg(e){A.typeOf.object("options",e),A.typeOf.object("options.frustum",e.frustum),A.typeOf.object("options.origin",e.origin),A.typeOf.object("options.orientation",e.orientation);const t=e.frustum,n=e.orientation,i=e.origin,o=g(e.vertexFormat,et.DEFAULT),r=g(e._drawNearPlane,!0);let s,a;t instanceof Lo?(s=0,a=Lo.packedLength):t instanceof $n&&(s=1,a=$n.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=f.clone(i),this._orientation=bt.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+f.packedLength+bt.packedLength+et.packedLength}jg.pack=function(e,t,n){A.typeOf.object("value",e),A.defined("array",t),n=g(n,0);const i=e._frustumType,o=e._frustum;return t[n++]=i,0===i?(Lo.pack(o,t,n),n+=Lo.packedLength):($n.pack(o,t,n),n+=$n.packedLength),f.pack(e._origin,t,n),bt.pack(e._orientation,t,n+=f.packedLength),et.pack(e._vertexFormat,t,n+=bt.packedLength),t[n+=et.packedLength]=e._drawNearPlane?1:0,t};const fje=new Lo,hje=new $n,pje=new bt,mje=new f,_je=new et;function jb(e,t,n,i,o,r,s,a){const l=e/3*2;for(let u=0;u<4;++u)c(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.z),c(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),c(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e+=3;o[l]=0,o[l+1]=0,o[l+2]=1,o[l+3]=0,o[l+4]=1,o[l+5]=1,o[l+6]=0,o[l+7]=1}jg.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=e[t++];let o;0===i?(o=Lo.unpack(e,t,fje),t+=Lo.packedLength):(o=$n.unpack(e,t,hje),t+=$n.packedLength);const r=f.unpack(e,t,mje),s=bt.unpack(e,t+=f.packedLength,pje),a=et.unpack(e,t+=bt.packedLength,_je),l=1===e[t+=et.packedLength];return c(n)?(n._frustum=o.clone(i===n._frustumType?n._frustum:void 0),n._frustumType=i,n._origin=f.clone(r,n._origin),n._orientation=bt.clone(s,n._orientation),n._vertexFormat=et.clone(a,n._vertexFormat),n._drawNearPlane=l,n):new jg({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:l})};const gje=new oe,yje=new k,P3=new k,WQ=new f,qQ=new f,YQ=new f,bje=new f,Tje=new f,Aje=new f,Dm=new Array(3),XC=new Array(4);XC[0]=new de(-1,-1,1,1),XC[1]=new de(1,-1,1,1),XC[2]=new de(1,1,1,1),XC[3]=new de(-1,1,1,1);const XQ=new Array(4);for(let e=0;e<4;++e)XQ[e]=new de;jg._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){const l=oe.fromQuaternion(t,gje);let u=g(r,WQ),d=g(s,qQ),h=g(a,YQ);u=oe.getColumn(l,0,u),d=oe.getColumn(l,1,d),h=oe.getColumn(l,2,h),f.normalize(u,u),f.normalize(d,d),f.normalize(h,h),f.negate(u,u);const m=k.computeView(e,h,d,u,yje);let _,p;if(0===n){const b=k.multiply(i.projectionMatrix,m,P3);p=k.inverse(b,P3)}else _=k.inverseTransformation(m,P3);c(p)?(Dm[0]=i.near,Dm[1]=i.far):(Dm[0]=0,Dm[1]=i.near,Dm[2]=i.far);for(let b=0;b<2;++b)for(let x=0;x<4;++x){let C=de.clone(XC[x],XQ[x]);if(c(p)){C=k.multiplyByVector(p,C,C),f.multiplyByScalar(C,1/C.w,C),f.subtract(C,e,C),f.normalize(C,C);const v=f.dot(h,C);f.multiplyByScalar(C,Dm[b]/v,C),f.add(C,e,C)}else{const w=i.offCenterFrustum;c(w)&&(i=w);const v=Dm[b],I=Dm[b+1];C.x=.5*(C.x*(i.right-i.left)+i.left+i.right),C.y=.5*(C.y*(i.top-i.bottom)+i.bottom+i.top),C.z=.5*(C.z*(v-I)-v-I),C.w=1,k.multiplyByVector(_,C,C)}o[12*b+3*x]=C.x,o[12*b+3*x+1]=C.y,o[12*b+3*x+2]=C.z}},jg.createGeometry=function(e){const t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=e._vertexFormat,a=r?6:5;let l=new Float64Array(72);jg._computeNearFarPlanes(i,o,t,n,l);let u=24;l[u]=l[12],l[u+1]=l[13],l[u+2]=l[14],l[u+3]=l[0],l[u+4]=l[1],l[u+5]=l[2],l[u+6]=l[9],l[u+7]=l[10],l[u+8]=l[11],l[u+9]=l[21],l[u+10]=l[22],l[u+11]=l[23],u+=12,l[u]=l[15],l[u+1]=l[16],l[u+2]=l[17],l[u+3]=l[3],l[u+4]=l[4],l[u+5]=l[5],l[u+6]=l[0],l[u+7]=l[1],l[u+8]=l[2],l[u+9]=l[12],l[u+10]=l[13],l[u+11]=l[14],u+=12,l[u]=l[3],l[u+1]=l[4],l[u+2]=l[5],l[u+3]=l[15],l[u+4]=l[16],l[u+5]=l[17],l[u+6]=l[18],l[u+7]=l[19],l[u+8]=l[20],l[u+9]=l[6],l[u+10]=l[7],l[u+11]=l[8],u+=12,l[u]=l[6],l[u+1]=l[7],l[u+2]=l[8],l[u+3]=l[18],l[u+4]=l[19],l[u+5]=l[20],l[u+6]=l[21],l[u+7]=l[22],l[u+8]=l[23],l[u+9]=l[9],l[u+10]=l[10],l[u+11]=l[11],r||(l=l.subarray(12));const d=new co({position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:l})});if(c(s.normal)||c(s.tangent)||c(s.bitangent)||c(s.st)){const m=c(s.normal)?new Float32Array(12*a):void 0,_=c(s.tangent)?new Float32Array(12*a):void 0,p=c(s.bitangent)?new Float32Array(12*a):void 0,y=c(s.st)?new Float32Array(8*a):void 0,b=WQ,x=qQ,C=YQ,w=f.negate(b,bje),v=f.negate(x,Tje),I=f.negate(C,Aje);u=0,r&&(jb(u,m,_,p,y,I,b,x),u+=12),jb(u,m,_,p,y,C,w,x),u+=12,jb(u,m,_,p,y,w,I,x),u+=12,jb(u,m,_,p,y,v,I,w),u+=12,jb(u,m,_,p,y,b,C,x),u+=12,jb(u,m,_,p,y,x,C,w),c(m)&&(d.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:m})),c(_)&&(d.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:_})),c(p)&&(d.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:p})),c(y)&&(d.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:y}))}const h=new Uint16Array(6*a);for(let m=0;m<a;++m){const _=6*m,p=4*m;h[_]=p,h[_+1]=p+1,h[_+2]=p+2,h[_+3]=p,h[_+4]=p+2,h[_+5]=p+3}return new En({attributes:d,indices:h,primitiveType:Tt.TRIANGLES,boundingSphere:Ae.fromVertices(l)})};const ZQ=jg;function ZC(e){A.typeOf.object("options",e),A.typeOf.object("options.frustum",e.frustum),A.typeOf.object("options.origin",e.origin),A.typeOf.object("options.orientation",e.orientation);const t=e.frustum,n=e.orientation,i=e.origin,o=g(e._drawNearPlane,!0);let r,s;t instanceof Lo?(r=0,s=Lo.packedLength):t instanceof $n&&(r=1,s=$n.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=f.clone(i),this._orientation=bt.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+f.packedLength+bt.packedLength}ZC.pack=function(e,t,n){A.typeOf.object("value",e),A.defined("array",t),n=g(n,0);const i=e._frustumType,o=e._frustum;return t[n++]=i,0===i?(Lo.pack(o,t,n),n+=Lo.packedLength):($n.pack(o,t,n),n+=$n.packedLength),f.pack(e._origin,t,n),bt.pack(e._orientation,t,n+=f.packedLength),t[n+=bt.packedLength]=e._drawNearPlane?1:0,t};const Cje=new Lo,Eje=new $n,wje=new bt,Sje=new f;ZC.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=e[t++];let o;0===i?(o=Lo.unpack(e,t,Cje),t+=Lo.packedLength):(o=$n.unpack(e,t,Eje),t+=$n.packedLength);const r=f.unpack(e,t,Sje),s=bt.unpack(e,t+=f.packedLength,wje),a=1===e[t+=bt.packedLength];return c(n)?(n._frustum=o.clone(i===n._frustumType?n._frustum:void 0),n._frustumType=i,n._origin=f.clone(r,n._origin),n._orientation=bt.clone(s,n._orientation),n._drawNearPlane=a,n):new ZC({frustum:o,origin:r,orientation:s,_drawNearPlane:a})},ZC.createGeometry=function(e){const t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(24);ZQ._computeNearFarPlanes(i,o,t,n,s);const a=new co({position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:s})});let l,u;const d=r?2:1,h=new Uint16Array(8*(d+1));let m=r?0:1;for(;m<2;++m)l=r?8*m:0,u=4*m,h[l]=u,h[l+1]=u+1,h[l+2]=u+1,h[l+3]=u+2,h[l+4]=u+2,h[l+5]=u+3,h[l+6]=u+3,h[l+7]=u;for(m=0;m<2;++m)l=8*(d+m),u=4*m,h[l]=u,h[l+1]=u+4,h[l+2]=u+1,h[l+3]=u+5,h[l+4]=u+2,h[l+5]=u+6,h[l+6]=u+3,h[l+7]=u+7;return new En({attributes:a,indices:h,primitiveType:Tt.LINES,boundingSphere:Ae.fromVertices(s)})};const vje=ZC;function UD(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.camera))throw new E("options.camera is required.");this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=g(e.color,Z.CYAN),this._updateOnChange=g(e.updateOnChange,!0),this.show=g(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}const Ije=new f,Dje=new oe,Pje=new bt,Oje=new Lo,Rje=new zg,Lje=new $n,Nje=new Qa,Mje=new Z,Fje=[1,1e5];UD.prototype.update=function(e){if(!this.show)return;const t=this._planesPrimitives,n=this._outlinePrimitives;let 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(0===t.length){const r=this._camera,s=r.frustum;let a;a=s instanceof Lo?Oje:s instanceof zg?Rje:s instanceof $n?Lje:Nje,a=s.clone(a);let l,u=this._frustumSplits;!c(u)||u.length<=1?(u=Fje,u[0]=this._camera.frustum.near,u[1]=this._camera.frustum.far,l=1):l=u.length-1;const d=r.positionWC,h=r.directionWC,m=r.upWC;let _=r.rightWC;_=f.negate(_,Ije);const p=Dje;oe.setColumn(p,0,_,p),oe.setColumn(p,1,m,p),oe.setColumn(p,2,h,p);const y=bt.fromRotationMatrix(p,Pje);for(t.length=n.length=l,i=0;i<l;++i)a.near=u[i],a.far=u[i+1],t[i]=new Yi({geometryInstances:new zn({geometry:new ZQ({origin:d,orientation:y,frustum:a,_drawNearPlane:0===i}),attributes:{color:ei.fromColor(Z.fromAlpha(this._color,.1,Mje))},id:this.id,pickPrimitive:this}),appearance:new gi({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new Yi({geometryInstances:new zn({geometry:new vje({origin:d,orientation:y,frustum:a,_drawNearPlane:0===i}),attributes:{color:ei.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new gi({translucent:!1,flat:!0}),asynchronous:!1})}for(o=t.length,i=0;i<o;++i)n[i].update(e),t[i].update(e)},UD.prototype.isDestroyed=function(){return!1},UD.prototype.destroy=function(){const 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 Xe(this)};const $C=UD;function KC(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=g(e,0)}const QC=Hn.supportsTypedArrays()?new Float32Array(12):[],$Q=new f,KQ=new f,R3=new f,QQ=new f,zD=new f;KC.prototype.update=function(e){if(this._mode=e.mode,e.mode!==ce.SCENE3D)return;const t=e.context,n=e.mapProjection.ellipsoid.radii,i=new he(n.x+this._ellipsoidOffset,n.y+this._ellipsoidOffset,n.z+this._ellipsoidOffset),o=e.useLogDepth;if(c(this._command)||(this._rs=Lt.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new $t({renderState:this._rs,boundingVolume:new Ae(f.ZERO,i.maximumRadius),pass:Ue.OPAQUE,owner:this})),!c(this._sp)||this._useLogDepth!==o){this._useLogDepth=o;const s=new St({sources:["in vec4 position;\n\nout vec4 positionEC;\n\nvoid main()\n{\n positionEC = czm_modelView * position;\n gl_Position = czm_projection * positionEC;\n\n czm_vertexLogDepth();\n}\n"]}),a=new St({sources:["in vec4 positionEC;\n\nvoid main()\n{\n vec3 position;\n vec3 direction;\n if (czm_orthographicIn3D == 1.0)\n {\n vec2 uv = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw;\n vec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y); // left, bottom\n vec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x); // right, top\n position = vec3(mix(minPlane, maxPlane, uv), 0.0);\n direction = vec3(0.0, 0.0, -1.0);\n } \n else \n {\n position = vec3(0.0);\n direction = normalize(positionEC.xyz);\n }\n\n czm_ray ray = czm_ray(position, direction);\n\n vec3 ellipsoid_center = czm_view[3].xyz;\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n if (!czm_isEmpty(intersection))\n {\n out_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n }\n else\n {\n discard;\n }\n\n czm_writeLogDepth();\n}\n"]});o&&(a.defines.push("LOG_DEPTH"),s.defines.push("LOG_DEPTH")),this._sp=di.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}const r=function Uje(e,t){const n=e.radii,i=t.camera;let o,r,s;if(i.frustum instanceof $n)o=f.ZERO,r=i.rightWC,s=i.upWC;else{const m=f.multiplyComponents(e.oneOverRadii,i.positionWC,$Q),_=f.normalize(m,KQ),p=f.normalize(f.cross(f.UNIT_Z,m,R3),R3),y=f.normalize(f.cross(_,p,QQ),QQ),b=f.magnitude(m),x=Math.sqrt(b*b-1);o=f.multiplyByScalar(_,1/b,$Q);const C=x/b;r=f.multiplyByScalar(p,C,KQ),s=f.multiplyByScalar(y,C,R3)}const a=f.add(o,s,zD);f.subtract(a,r,a),f.multiplyComponents(n,a,a),f.pack(a,QC,0);const l=f.subtract(o,s,zD);f.subtract(l,r,l),f.multiplyComponents(n,l,l),f.pack(l,QC,3);const u=f.add(o,s,zD);f.add(u,r,u),f.multiplyComponents(n,u,u),f.pack(u,QC,6);const d=f.subtract(o,s,zD);return f.add(d,r,d),f.multiplyComponents(n,d,d),f.pack(d,QC,9),QC}(i,e);if(c(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(r);else{const s=new En({attributes:{position:new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:r})},indices:[0,1,2,2,1,3],primitiveType:Tt.TRIANGLES});this._va=gs.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:At.DYNAMIC_DRAW}),this._command.vertexArray=this._va}},KC.prototype.execute=function(e,t){this._mode===ce.SCENE3D&&this._command.execute(e,t)},KC.prototype.isDestroyed=function(){return!1},KC.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};const zje=KC;function JC(){}const Vje=/\bgl_FragDepth\b/,Hje=/\bdiscard\b/;JC.createDepthOnlyDerivedCommand=function(e,t,n,i){let o,r;return c(i)||(i={}),c(i.depthOnlyCommand)&&(o=i.depthOnlyCommand.shaderProgram,r=i.depthOnlyCommand.renderState),i.depthOnlyCommand=$t.shallowClone(t,i.depthOnlyCommand),c(o)&&i.shaderProgramId===t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=o,i.depthOnlyCommand.renderState=r):(i.depthOnlyCommand.shaderProgram=function Gje(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!c(n)){const i=t._attributeLocations;let r,o=t.fragmentShaderSource,s=!1;const a=o.sources;let l=a.length;for(r=0;r<l;++r)if(Vje.test(a[r])||Hje.test(a[r])){s=!0;break}let u=!1;const d=o.defines;for(l=d.length,r=0;r<l;++r)if("LOG_DEPTH"===d[r]){u=!0;break}let h;s||u?!s&&u&&(h="void main() \n{ \n out_FragColor = vec4(1.0); \n czm_writeLogDepth(); \n} \n",o=new St({defines:["LOG_DEPTH"],sources:[h]})):(h="void main() \n{ \n out_FragColor = vec4(1.0); \n} \n",o=new St({sources:[h]})),n=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:i})}return n}(n,t.shaderProgram),i.depthOnlyCommand.renderState=function jje(e,t){const n=e._depthOnlyRenderStateCache;let i=n[t.id];if(!c(i)){const o=Lt.getState(t);o.depthMask=!0,o.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i=Lt.fromCache(o),n[t.id]=i}return i}(e,t.renderState),i.shaderProgramId=t.shaderProgram.id),i};const Wje=/\s+czm_writeLogDepth\(/,qje=/\s+czm_vertexLogDepth\(/;JC.createLogDepthCommand=function(e,t,n){let i;return c(n)||(n={}),c(n.command)&&(i=n.command.shaderProgram),n.command=$t.shallowClone(e,n.command),c(i)&&n.shaderProgramId===e.shaderProgram.id?n.command.shaderProgram=i:(n.command.shaderProgram=function Yje(e,t){if(t.fragmentShaderSource.defines.indexOf("LOG_DEPTH_READ_ONLY")>=0)return t;let i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!c(i)){const o=t._attributeLocations,r=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();r.defines=c(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),s.defines=c(s.defines)?s.defines.slice(0):[],s.defines.push("LOG_DEPTH");let a,l,u=!1,d=r.sources,h=d.length;for(a=0;a<h;++a)if(qje.test(d[a])){u=!0;break}if(!u){for(a=0;a<h;++a)d[a]=St.replaceMain(d[a],"czm_log_depth_main");l="\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",d.push(l)}for(d=s.sources,h=d.length,u=!1,a=0;a<h;++a)Wje.test(d[a])&&(u=!0);-1!==s.defines.indexOf("LOG_DEPTH_WRITE")&&(u=!0);let m="";if(!u){for(a=0;a<h;a++)d[a]=St.replaceMain(d[a],"czm_log_depth_main");m+="\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}d.push(m),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o})}return i}(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id),n},JC.createPickDerivedCommand=function(e,t,n,i){let o,r;return c(i)||(i={}),c(i.pickCommand)&&(o=i.pickCommand.shaderProgram,r=i.pickCommand.renderState),i.pickCommand=$t.shallowClone(t,i.pickCommand),c(o)&&i.shaderProgramId===t.shaderProgram.id?(i.pickCommand.shaderProgram=o,i.pickCommand.renderState=r):(i.pickCommand.shaderProgram=function Xje(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!c(i)){const o=t._attributeLocations;let r=t.fragmentShaderSource;const s=r.sources,a=s.length,u=s.some(m=>m.includes("out_FragData"))?"out_FragData_0":"out_FragColor",d=`void main () \n{ \n czm_non_pick_main(); \n if (${u}.a == 0.0) { \n discard; \n } \n ${u} = ${n}; \n} `,h=new Array(a+1);for(let m=0;m<a;++m)h[m]=St.replaceMain(s[m],"czm_non_pick_main");h[a]=d,r=new St({sources:h,defines:r.defines}),i=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:o})}return i}(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=function Zje(e,t){const n=e.picking.pickRenderStateCache;let i=n[t.id];if(!c(i)){const o=Lt.getState(t);o.blending.enabled=!1,o.depthMask=!0,i=Lt.fromCache(o),n[t.id]=i}return i}(e,t.renderState),i.shaderProgramId=t.shaderProgram.id),i},JC.createHdrCommand=function(e,t,n){let i;return c(n)||(n={}),c(n.command)&&(i=n.command.shaderProgram),n.command=$t.shallowClone(e,n.command),c(i)&&n.shaderProgramId===e.shaderProgram.id?n.command.shaderProgram=i:(n.command.shaderProgram=function $je(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(!c(n)){const i=t._attributeLocations,o=t.vertexShaderSource.clone(),r=t.fragmentShaderSource.clone();o.defines=c(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),r.defines=c(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),n=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:i})}return n}(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id),n};const eE=JC;function VD(e){if(!c(e))throw new E("scene is required.");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;const t=this;function n(i){const o=i.alpha;if(!c(o))return t._alpha=void 0,t._beta=void 0,void(t._gamma=void 0);t._alpha=O.toRadians(o),t._beta=O.toRadians(i.beta),t._gamma=O.toRadians(i.gamma)}window.addEventListener("deviceorientation",n,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",n,!1)}}const Kje=new bt,JQ=new bt,Qje=new oe;VD.prototype.update=function(){c(this._alpha)&&(c(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma),function Jje(e,t,n,i){const o=e.direction,r=e.right,s=e.up,a=bt.fromAxisAngle(o,n,JQ),l=bt.fromAxisAngle(r,i,Kje),u=bt.multiply(l,a,l),d=bt.fromAxisAngle(s,t,JQ);bt.multiply(d,u,u);const h=oe.fromQuaternion(u,Qje);oe.multiplyByVector(h,r,r),oe.multiplyByVector(h,s,s),oe.multiplyByVector(h,o,o)}(this._scene.camera,-(this._lastAlpha-this._alpha),this._lastBeta-this._beta,this._lastGamma-this._gamma),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma)},VD.prototype.isDestroyed=function(){return!1},VD.prototype.destroy=function(){return this._removeListener(),Xe(this)};const eWe=VD;function eJ(){this.enabled=!0,this.renderable=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}const HD=[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],yf=[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<yf.length;++e)yf[e]*=1e6;const tJ=yf[1],L3=yf[yf.length-1];for(let e=0;e<yf.length;++e)yf[e]=(yf[e]-L3)/(tJ-L3);let Gs=0;const nWe=new f;eJ.prototype.update=function(e){if(!(e.fog.enabled=this.enabled))return;e.fog.renderable=this.renderable;const n=e.camera,i=n.positionCartographic;if(!c(i)||i.height>8e5||e.mode!==ce.SCENE3D)return e.fog.enabled=!1,void(e.fog.density=0);const o=i.height,r=function tWe(e){const t=HD,n=t.length;if(e<t[0])return Gs=0,Gs;if(e>t[n-1])return Gs=n-2,Gs;if(e>=t[Gs]){if(Gs+1<n&&e<t[Gs+1])return Gs;if(Gs+2<n&&e<t[Gs+2])return++Gs,Gs}else if(Gs-1>=0&&e>=t[Gs-1])return--Gs,Gs;let i;for(i=0;i<n-2&&!(e>=t[i]&&e<t[i+1]);++i);return Gs=i,Gs}(o),s=O.clamp((o-HD[r])/(HD[r+1]-HD[r]),0,1);let a=O.lerp(yf[r],yf[r+1],s);const l=1e6*this.density;a=a*(l-l/tJ*L3)*1e-6;const d=f.normalize(n.positionWC,nWe);a*=1-Math.abs(f.dot(n.directionWC,d)),e.fog.density=a,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness};const iWe=eJ,rWe=function oWe(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=ce.SCENE3D,this.morphTime=ce.getMorphTime(ce.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},js_OPAQUE_FRONT_FACE=0,js_OPAQUE_BACK_FACE=1,js_DEPTH_ONLY_FRONT_FACE=2,js_DEPTH_ONLY_BACK_FACE=3,js_DEPTH_ONLY_FRONT_AND_BACK_FACE=4,js_TRANSLUCENT_FRONT_FACE=5,js_TRANSLUCENT_BACK_FACE=6,js_TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST=7,js_TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST=8,js_PICK_FRONT_FACE=9,js_PICK_BACK_FACE=10,Wg=11,nJ=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function qg(){this._frontFaceAlphaByDistance=new Bn(0,1,0,1),this._backFaceAlphaByDistance=new Bn(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=Te.clone(Te.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(Wg),this._derivedBlendCommandTypes=new Array(Wg),this._derivedPickCommandTypes=new Array(Wg),this._derivedCommandTypesToUpdate=new Array(Wg),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}function iJ(e,t,n,i){return e?c(n)?(Bn.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 oJ(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function N3(e,t,n,i,o){let r=0;const a=e._backFaceTranslucent;if(!e._frontFaceTranslucent)return r;const l=t.cameraUnderground,u=e._requiresManualDepthTest,d=i?js_PICK_FRONT_FACE:u?js_TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:js_TRANSLUCENT_FRONT_FACE,h=i?js_PICK_BACK_FACE:u?js_TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:js_TRANSLUCENT_BACK_FACE;return t.mode===ce.SCENE2D?(o[r++]=js_DEPTH_ONLY_FRONT_FACE,o[r++]=d,r):(a?(n||(o[r++]=js_DEPTH_ONLY_FRONT_AND_BACK_FACE),l?(o[r++]=d,o[r++]=h):(o[r++]=h,o[r++]=d)):l?(n||(o[r++]=js_DEPTH_ONLY_BACK_FACE),o[r++]=js_OPAQUE_FRONT_FACE,o[r++]=h):(n||(o[r++]=js_DEPTH_ONLY_FRONT_FACE),o[r++]=js_OPAQUE_BACK_FACE,o[r++]=d),r)}function gu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function rJ(e,t){return e.indexOf(t)>-1}function fWe(e,t){gu(e.defines,"TRANSLUCENT"),gu(t.defines,"TRANSLUCENT")}function hWe(e,t){gu(e.defines,"GROUND_ATMOSPHERE"),gu(t.defines,"GROUND_ATMOSPHERE"),gu(e.defines,"FOG"),gu(t.defines,"FOG"),gu(e.defines,"TRANSLUCENT"),gu(t.defines,"TRANSLUCENT")}function M3(e,t){rJ(t.defines,"TILE_LIMIT_RECTANGLE")||rJ(t.defines,"ENABLE_CLIPPING_PLANES")||(t.sources=["void main() \n{ \n out_FragColor = vec4(1.0); \n} \n"])}function F3(e,t){const n=t.sources,i=n.length;for(let r=0;r<i;++r)n[r]=St.replaceMain(n[r],"czm_globe_translucency_main");n.push("\n\nuniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n#ifdef MANUAL_DEPTH_TEST \n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st)); \n if (logDepthOrDepth != 0.0) \n { \n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); \n float depthEC = eyeCoordinate.z / eyeCoordinate.w; \n if (v_positionEC.z < depthEC) \n { \n discard; \n } \n } \n#endif \n czm_globe_translucency_main(); \n vec4 classificationColor = texture(u_classificationTexture, st); \n if (classificationColor.a > 0.0) \n { \n // Reverse premultiplication process to get the correct composited result of the classification primitives \n classificationColor.rgb /= classificationColor.a; \n } \n out_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + out_FragColor * (1.0 - classificationColor.a); \n} \n")}function sJ(e,t){F3(0,t),gu(e.defines,"GROUND_ATMOSPHERE"),gu(t.defines,"GROUND_ATMOSPHERE"),gu(e.defines,"FOG"),gu(t.defines,"FOG")}function pWe(e,t){F3(0,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function mWe(e,t){sJ(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function aJ(e,t){t.sources=["uniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n vec4 pickColor = texture(u_classificationTexture, st); \n if (pickColor == vec4(0.0)) \n { \n discard; \n } \n out_FragColor = pickColor; \n} \n"]}function _We(e,t,n,i,o,r){if(!c(o))return t;if(!i&&c(n))return n;let s=e.shaderCache.getDerivedShaderProgram(t,r);if(!c(s)){const a=t._attributeLocations,l=t.vertexShaderSource.clone(),u=t.fragmentShaderSource.clone();l.defines=c(l.defines)?l.defines.slice(0):[],u.defines=c(u.defines)?u.defines.slice(0):[],o(l,u),s=e.shaderCache.createDerivedShaderProgram(t,r,{vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a})}return s}function gWe(e){e.cull.face=ur.BACK,e.cull.enabled=!0}function yWe(e){e.cull.face=ur.FRONT,e.cull.enabled=!0}function bWe(e){e.cull.face=ur.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function TWe(e){e.cull.face=ur.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function AWe(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function cJ(e){e.cull.face=ur.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=eo.ALPHA_BLEND}function lJ(e){e.cull.face=ur.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=eo.ALPHA_BLEND}function xWe(e){e.cull.face=ur.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function CWe(e){e.cull.face=ur.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function EWe(e,t,n,i,o){if(!c(i))return e;if(!n&&c(t))return t;let r=o[e.id];if(!c(r)){const s=Lt.getState(e);i(s),r=Lt.fromCache(s),o[e.id]=r}return r}function Wb(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function wWe(e,t,n,i,o){return c(o)?!i&&c(n)?n:Pn(t,o(e),!1):t}function _d(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}Object.defineProperties(qg.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}}}),qg.prototype.update=function(e){const t=e.globe;if(!c(t)||!t.show)return this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,void(this._useDepthPlane=!1);this._frontFaceAlphaByDistance=iJ(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=iJ(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=oJ(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=oJ(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=function lWe(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==ce.SCENE2D&&t.context.depthTexture}(this,e,t),this._sunVisibleThroughGlobe=function sWe(e,t){return e._frontFaceTranslucent&&(t.cameraUnderground||e._backFaceTranslucent)}(this,e),this._environmentVisible=function aWe(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}(this,e),this._useDepthPlane=function cWe(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}(this,e),this._numberOfTextureUniforms=function uWe(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}(this),this._rectangle=Te.clone(t.translucency.rectangle,this._rectangle),function dWe(e,t){e._derivedCommandsLength=N3(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=N3(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=N3(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<Wg;++n)(i&1<<n)>0&&(e._derivedCommandTypesToUpdate[o++]=n);e._derivedCommandsToUpdateLength=o;const r=i!==e._derivedCommandKey;e._derivedCommandKey=i,e._derivedCommandsDirty=r,!c(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=function SWe(){return[new _d({pass:Ue.GLOBE,pickOnly:!1,getShaderProgramFunction:fWe,getRenderStateFunction:gWe,getUniformMapFunction:void 0}),new _d({pass:Ue.GLOBE,pickOnly:!1,getShaderProgramFunction:hWe,getRenderStateFunction:yWe,getUniformMapFunction:void 0}),new _d({pass:Ue.GLOBE,pickOnly:!1,getShaderProgramFunction:M3,getRenderStateFunction:bWe,getUniformMapFunction:void 0}),new _d({pass:Ue.GLOBE,pickOnly:!1,getShaderProgramFunction:M3,getRenderStateFunction:TWe,getUniformMapFunction:void 0}),new _d({pass:Ue.GLOBE,pickOnly:!1,getShaderProgramFunction:M3,getRenderStateFunction:AWe,getUniformMapFunction:void 0}),new _d({pass:Ue.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:F3,getRenderStateFunction:cJ,getUniformMapFunction:Wb}),new _d({pass:Ue.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:sJ,getRenderStateFunction:lJ,getUniformMapFunction:Wb}),new _d({pass:Ue.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:pWe,getRenderStateFunction:cJ,getUniformMapFunction:Wb}),new _d({pass:Ue.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:mWe,getRenderStateFunction:lJ,getUniformMapFunction:Wb}),new _d({pass:Ue.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:aJ,getRenderStateFunction:xWe,getUniformMapFunction:Wb}),new _d({pass:Ue.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:aJ,getRenderStateFunction:CWe,getUniformMapFunction:Wb})]}())}(this,e)};const uJ=new Array(Wg),dJ=new Array(Wg);function fJ(e,t,n,i,o,r,s){for(let a=0;a<t;++a){const l=e[a],u=l.derivedCommands.type;(!c(s)||s.indexOf(u)>-1)&&n(l,i,o,r)}}function hJ(e,t,n,i,o,r){for(let s=0;s<t;++s)n(e[s],i,o,r)}qg.prototype.updateDerivedCommands=function(e,t){const n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(0!==i){for(let o=0;o<i;++o)dJ[o]=this._derivedCommandPacks[n[o]],uJ[o]=nJ[n[o]];!function vWe(e,t,n,i,o,r,s){let a=t.derivedCommands.globeTranslucency;const l=e._derivedCommandsDirty;if(t.dirty||!c(a)||l){t.dirty=!1,c(a)||(a={},t.derivedCommands.globeTranslucency=a);const u=s.frameNumber,d=g(a.uniformMapDirtyFrame,0),h=g(a.shaderProgramDirtyFrame,0),m=g(a.renderStateDirtyFrame,0),_=a.uniformMap!==t.uniformMap,p=a.shaderProgramId!==t.shaderProgram.id,y=a.renderStateId!==t.renderState.id;_&&(a.uniformMapDirtyFrame=u),p&&(a.shaderProgramDirtyFrame=u),y&&(a.renderStateDirtyFrame=u),a.uniformMap=t.uniformMap,a.shaderProgramId=t.shaderProgram.id,a.renderStateId=t.renderState.id;for(let b=0;b<n;++b){const x=r[b],C=i[b],w=o[b];let I,P,N,v=a[w];c(v)?(I=v.uniformMap,P=v.shaderProgram,N=v.renderState):(I=void 0,P=void 0,N=void 0),v=$t.shallowClone(t,v),a[w]=v;const R=g(v.derivedCommands.uniformMapDirtyFrame,0),B=g(v.derivedCommands.shaderProgramDirtyFrame,0),F=g(v.derivedCommands.renderStateDirtyFrame,0),S=_||R<d,D=p||B<h,L=y||F<m;S&&(v.derivedCommands.uniformMapDirtyFrame=u),D&&(v.derivedCommands.shaderProgramDirtyFrame=u),L&&(v.derivedCommands.renderStateDirtyFrame=u),v.derivedCommands.type=C,v.pass=x.pass,v.pickOnly=x.pickOnly,v.uniformMap=wWe(e,t.uniformMap,I,S,x.getUniformMapFunction),v.shaderProgram=_We(s.context,t.shaderProgram,P,D,x.getShaderProgramFunction,w),v.renderState=EWe(t.renderState,N,L,x.getRenderStateFunction,x.renderStateCache)}}}(this,e,i,n,uJ,dJ,t)}},qg.prototype.pushDerivedCommands=function(e,t,n){const 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),0===r)return void n.commandList.push(e);const s=e.derivedCommands.globeTranslucency;for(let a=0;a<r;++a)n.commandList.push(s[nJ[o[a]]])};const IWe=[js_OPAQUE_FRONT_FACE,js_OPAQUE_BACK_FACE],DWe=[js_DEPTH_ONLY_FRONT_FACE,js_DEPTH_ONLY_BACK_FACE,js_DEPTH_ONLY_FRONT_AND_BACK_FACE];qg.prototype.executeGlobeCommands=function(e,t,n,i,o){const r=i.context,s=e.commands[Ue.GLOBE],a=e.indices[Ue.GLOBE];0!==a&&(this._globeTranslucencyFramebuffer=n,n.clearClassification(r,o),fJ(s,a,t,i,r,o,IWe))},qg.prototype.executeGlobeClassificationCommands=function(e,t,n,i,o){const r=i.context,s=e.commands[Ue.GLOBE],a=e.indices[Ue.GLOBE],l=e.commands[Ue.TERRAIN_CLASSIFICATION],u=e.indices[Ue.TERRAIN_CLASSIFICATION];if(0===a||0===u)return;const d=this._frontFaceTranslucent,h=this._backFaceTranslucent;if((!d||!h)&&hJ(l,u,t,i,r,o),!d&&!h)return;this._globeTranslucencyFramebuffer=n;const m=r.uniformState.globeDepthTexture,_=o.framebuffer;if(o.framebuffer=n.classificationFramebuffer,fJ(s,a,t,i,r,o,DWe),r.depthTexture){const p=n.packDepth(r,o);r.uniformState.globeDepthTexture=p}hJ(l,u,t,i,r,o),r.uniformState.globeDepthTexture=m,o.framebuffer=_};const PWe=qg,Yg="uniform sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n out_FragColor = texture(colorTexture, v_textureCoordinates);\n}\n";function bf(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new $o({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new $o({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 ar({color:new Z(0,0,0,0),owner:this}),this._clearCommand=new ar({color:new Z(0,0,0,0),depth:1,stencil:0});const e=this;this._uniformMap={colorTexture:function(){return e._fbo.getColorTexture()},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._fboClassified.getColorTexture()}}}Object.defineProperties(bf.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}}),bf.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};const OWe={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Fi.EQUAL,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},backFunction:Fi.NEVER,reference:0,mask:xn.CLASSIFICATION_MASK},blending:eo.ALPHA_BLEND},RWe={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Fi.NOT_EQUAL,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},backFunction:Fi.NEVER,reference:0,mask:xn.CLASSIFICATION_MASK},blending:eo.ALPHA_BLEND},LWe={depthMask:!0,depthTest:{enabled:!0},stencilTest:xn.setCesium3DTileBit(),stencilMask:xn.CESIUM_3D_TILE_MASK,blending:eo.ALPHA_BLEND};bf.prototype.update=function(e,t,n){const i=this._fbo.getColorTexture(),o=this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;const r=this._numSamples!==t,s=e.drawingBufferWidth,a=e.drawingBufferHeight,l=!c(i)||i.width!==s||i.height!==a;if((l||o||r)&&(this._numSamples=t,this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),c(this._previousFramebuffer)||(this._depthStencilTexture=new Mn({context:e,width:s,height:a,pixelFormat:Ct.DEPTH_STENCIL,pixelDatatype:yt.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new Z_({context:e,width:s,height:a,format:ah.DEPTH24_STENCIL8,numSamples:t})))),!c(this._fbo.framebuffer)||l||o||r){let u,d;this._fbo.destroy(),this._fboClassified.destroy(),c(this._previousFramebuffer)?(u=n.getDepthStencilTexture(),d=n.getDepthStencilRenderbuffer()):(u=this._depthStencilTexture,d=this._depthStencilRenderbuffer),this._fbo.setDepthStencilTexture(u),c(d)&&this._fbo.setDepthStencilRenderbuffer(d),this._fbo.update(e,s,a,t),c(this._previousFramebuffer)||(this._fboClassified.setDepthStencilTexture(u),this._fboClassified.update(e,s,a))}if(c(this._rsUnclassified)||(this._rsUnclassified=Lt.fromCache(OWe),this._rsClassified=Lt.fromCache(RWe),this._rsDefault=Lt.fromCache(LWe)),!c(this._unclassifiedCommand)||o||r){c(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());const u=c(this._previousFramebuffer)?"uniform sampler2D colorTexture;\nin vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n#ifdef UNCLASSIFIED\n out_FragColor = color * czm_invertClassificationColor;\n#else\n out_FragColor = color;\n#endif\n}\n":"uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform sampler2D classifiedTexture;\nin vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n bool isClassified = all(equal(texture(classifiedTexture, v_textureCoordinates), vec4(0.0)));\n#ifdef UNCLASSIFIED\n vec4 highlightColor = czm_invertClassificationColor;\n if (isClassified)\n {\n discard;\n }\n#else\n vec4 highlightColor = vec4(1.0);\n if (!isClassified)\n {\n discard;\n }\n#endif\n out_FragColor = color * highlightColor;\n gl_FragDepth = texture(depthTexture, v_textureCoordinates).r;\n}\n",d=new St({defines:["UNCLASSIFIED"],sources:[u]}),h=new St({sources:[u]});this._unclassifiedCommand=e.createViewportQuadCommand(d,{renderState:c(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(h,{renderState:c(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),c(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),c(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(Yg,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}},bf.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)},bf.prototype.clear=function(e,t){c(this._previousFramebuffer)?this._fbo.clear(e,this._clearColorCommand,t):(this._fbo.clear(e,this._clearCommand,t),this._fboClassified.clear(e,this._clearCommand,t))},bf.prototype.executeClassified=function(e,t){if(!c(this._previousFramebuffer)){const 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)},bf.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)},bf.prototype.isDestroyed=function(){return!1},bf.prototype.destroy=function(){return this._fbo.destroy(),this._fboClassified.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),c(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),Xe(this)};const pJ=bf;function GD(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}function Pm(e){if(c(e)&&e.length!==Uu.NUMBER_OF_JOB_TYPES)throw new E("A budget must be specified for each job type; budgets.length should equal JobType.NUMBER_OF_JOB_TYPES.");const t=new Array(Uu.NUMBER_OF_JOB_TYPES);t[Uu.TEXTURE]=new GD(c(e)?e[Uu.TEXTURE]:10),t[Uu.PROGRAM]=new GD(c(e)?e[Uu.PROGRAM]:10),t[Uu.BUFFER]=new GD(c(e)?e[Uu.BUFFER]:30);const n=t.length;let i,o=0;for(i=0;i<n;++i)o+=t[i].total;const 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}Object.defineProperties(GD.prototype,{total:{get:function(){return this._total}}}),Pm.getTimestamp=Cr,Object.defineProperties(Pm.prototype,{totalBudget:{get:function(){return this._totalBudget}}}),Pm.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget},Pm.prototype.resetBudgets=function(){const e=this._budgets,t=e.length;for(let n=0;n<t;++n){const i=e[n];i.starvedLastFrame=i.starvedThisFrame,i.starvedThisFrame=!1,i.usedThisFrame=0,i.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0},Pm.prototype.execute=function(e,t){const 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){const l=n.length;let u;for(u=0;u<l&&(r=n[u],!(r.usedThisFrame+r.stolenFromMeThisFrame<r.total)||r.starvedLastFrame);++u);if(u===l&&o)return!1;o&&(i.starvedThisFrame=!0)}const s=Pm.getTimestamp();e.execute();const a=Pm.getTimestamp()-s;return this._totalUsedThisFrame+=a,r?r.stolenFromMeThisFrame+=a:i.usedThisFrame+=a,this._executedThisFrame[t]=!0,!0};const FWe=Pm;function jD(e){e=g(e,g.EMPTY_OBJECT);const t=Rr(e.container);if(!c(t))throw new E("container is required");this._container=t;const n=document.createElement("div");n.className="cesium-performanceDisplay";const i=document.createElement("div");i.className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),i.appendChild(this._fpsText);const 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=Cr(),this._lastMsSampleTime=Cr(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;const r=document.createElement("div");r.className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),r.appendChild(this._throttledText),n.appendChild(r)}Object.defineProperties(jD.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(this._throttledText.nodeValue=e?"(throttled)":"",this._throttled=e)}}}),jD.prototype.update=function(e){const t=Cr(),n=g(e,!0);this._fpsFrameCount++;const i=t-this._lastFpsSampleTime;if(i>1e3){let r="N/A";n&&(r=1e3*this._fpsFrameCount/i|0),this._fpsText.nodeValue=`${r} FPS`,this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;const 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}},jD.prototype.destroy=function(){return Xe(this)};const BWe=jD;function WD(e){e=g(e,!0),this.value=WD.toValue(e)}Object.defineProperties(WD.prototype,{componentDatatype:{get:function(){return ee.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}}),WD.toValue=function(e,t){if(!c(e))throw new E("show is required.");return c(t)?(t[0]=e,t):new Uint8Array([e])};const Pi=WD;function Xg(){this._framebuffer=new $o,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(Xg.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}}),Xg.prototype.update=function(e,t){(function kWe(e,t,n){e._framebuffer.update(t,n.width,n.height)})(this,e,t),function UWe(e,t,n){c(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand("uniform highp sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 globeDepthPacked = texture(czm_globeDepthTexture, v_textureCoordinates);\n float globeDepth = czm_unpackDepth(globeDepthPacked);\n float depth = texture(colorTexture, v_textureCoordinates).r;\n out_FragColor = czm_branchFreeTernary(globeDepth <= 0.0 || globeDepth >= 1.0 || depth < globeDepth && depth > 0.0 && depth < 1.0,\n czm_packDepth(depth), globeDepthPacked);\n}\n",{renderState:Lt.fromCache(),uniformMap:{colorTexture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=n,e._copyDepthCommand.framebuffer=e.framebuffer}(this,e,t)};const zWe=new de,VWe=new de(1,1/255,1/65025,1/16581375);Xg.prototype.getDepth=function(e,t,n){if(!c(this.framebuffer))return;const i=e.readPixels({x:t,y:n,width:1,height:1,framebuffer:this.framebuffer}),o=de.unpack(i,0,zWe);return de.divideByScalar(o,255,o),de.dot(o,VWe)},Xg.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},Xg.prototype.isDestroyed=function(){return!1},Xg.prototype.destroy=function(){return this._framebuffer.destroy(),c(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=c(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),Xe(this)};const HWe=Xg;function Ws(e){e=g(e,g.EMPTY_OBJECT),this._primitives=[],this._guid=kr(),this._primitiveAdded=new Ye,this._primitiveRemoved=new Ye,this._zIndex=void 0,this.show=g(e.show,!0),this.destroyPrimitives=g(e.destroyPrimitives,!0)}function qD(e,t){if(!e.contains(t))throw new E("primitive is not in this collection.");return e._primitives.indexOf(t)}Object.defineProperties(Ws.prototype,{length:{get:function(){return this._primitives.length}},primitiveAdded:{get:function(){return this._primitiveAdded}},primitiveRemoved:{get:function(){return this._primitiveRemoved}}}),Ws.prototype.add=function(e,t){const n=c(t);if(!c(e))throw new E("primitive is required.");if(n){if(t<0)throw new E("index must be greater than or equal to zero.");if(t>this._primitives.length)throw new E("index must be less than or equal to the number of primitives.")}const i=e._external=e._external||{};return(i._composites=i._composites||{})[this._guid]={collection:this},n?this._primitives.splice(t,0,e):this._primitives.push(e),this._primitiveAdded.raiseEvent(e),e},Ws.prototype.remove=function(e){if(this.contains(e)){const t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),this._primitiveRemoved.raiseEvent(e),!0}return!1},Ws.prototype.removeAndDestroy=function(e){const t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},Ws.prototype.removeAll=function(){const e=this._primitives,t=e.length;for(let n=0;n<t;++n)delete e[n]._external._composites[this._guid],this.destroyPrimitives&&e[n].destroy(),this._primitiveRemoved.raiseEvent(e[n]);this._primitives=[]},Ws.prototype.contains=function(e){return!!(c(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])},Ws.prototype.raise=function(e){if(c(e)){const t=qD(this,e),n=this._primitives;if(t!==n.length-1){const i=n[t];n[t]=n[t+1],n[t+1]=i}}},Ws.prototype.raiseToTop=function(e){if(c(e)){const t=qD(this,e),n=this._primitives;t!==n.length-1&&(n.splice(t,1),n.push(e))}},Ws.prototype.lower=function(e){if(c(e)){const t=qD(this,e),n=this._primitives;if(0!==t){const i=n[t];n[t]=n[t-1],n[t-1]=i}}},Ws.prototype.lowerToBottom=function(e){if(c(e)){const t=qD(this,e),n=this._primitives;0!==t&&(n.splice(t,1),n.unshift(e))}},Ws.prototype.get=function(e){if(!c(e))throw new E("index is required.");return this._primitives[e]},Ws.prototype.update=function(e){if(!this.show)return;const t=this._primitives;for(let n=0;n<t.length;++n)t[n].update(e)},Ws.prototype.prePassesUpdate=function(e){const t=this._primitives;for(let n=0;n<t.length;++n){const i=t[n];c(i.prePassesUpdate)&&i.prePassesUpdate(e)}},Ws.prototype.updateForPass=function(e,t){const n=this._primitives;for(let i=0;i<n.length;++i){const o=n[i];c(o.updateForPass)&&o.updateForPass(e,t)}},Ws.prototype.postPassesUpdate=function(e){const t=this._primitives;for(let n=0;n<t.length;++n){const i=t[n];c(i.postPassesUpdate)&&i.postPassesUpdate(e)}},Ws.prototype.isDestroyed=function(){return!1},Ws.prototype.destroy=function(){return this.removeAll(),Xe(this)};const Zg=Ws,jWe=function GWe(e,t){this.near=g(e,0),this.far=g(t,0);const n=Ue.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},B3="uniform highp sampler2D u_depthTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n out_FragColor = czm_packDepth(texture(u_depthTexture, v_textureCoordinates).r);\n}\n";function Tf(){this._picking=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new $o({depthStencil:!0,supportsDepthTexture:!0}),this._outputFramebuffer=new $o({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new $o,this._tempCopyDepthFramebuffer=new $o,this._updateDepthFramebuffer=new $o({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 Vt,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}function mJ(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;const r=!Vt.equals(e._viewport,o.viewport);let s=r!==e._useScissorTest;e._useScissorTest=r,Vt.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=Vt.clone(o.viewport,e._scissorRectangle),s=!0),(!c(e._rs)||!Vt.equals(e._viewport,e._rs.viewport)||s)&&(e._rs=Lt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=Lt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:eo.ALPHA_BLEND}),e._rsUpdate=Lt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Fi.EQUAL,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},backFunction:Fi.NEVER,reference:xn.CESIUM_3D_TILE_MASK,mask:xn.CESIUM_3D_TILE_MASK}})),c(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(B3,{uniformMap:{u_depthTexture:function(){return e.colorFramebufferManager.getDepthStencilTexture()}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer.framebuffer,e._copyDepthCommand.renderState=e._rs,c(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(Yg,{uniformMap:{colorTexture:function(){return e.colorFramebufferManager.getColorTexture()}},owner:e})),e._copyColorCommand.renderState=e._rs,c(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(B3,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer.framebuffer,e._tempCopyDepthCommand.renderState=e._rs,c(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(Yg,{uniformMap:{colorTexture:function(){return e._tempCopyDepthFramebuffer.getColorTexture()}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer.framebuffer,e._updateDepthCommand.renderState=e._rsUpdate,c(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new ar({color:new Z(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}Object.defineProperties(Tf.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}}}),Tf.prototype.update=function(e,t,n,i,o,r){const s=n.width,a=n.height,l=o?e.halfFloatingPointTexture?yt.HALF_FLOAT:yt.FLOAT:yt.UNSIGNED_BYTE;this._numSamples=i,this.picking?this._pickColorFramebuffer.update(e,s,a):this._outputFramebuffer.update(e,s,a,i,l),this._copyDepthFramebuffer.update(e,s,a),mJ(this,e,s,a,t),e.uniformState.globeDepthTexture=void 0,this._useHdr=o,this._clearGlobeDepth=r},Tf.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)},Tf.prototype.executeCopyDepth=function(e,t){c(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())},Tf.prototype.executeUpdateDepth=function(e,t,n,i){const o=c(i)?i:t.framebuffer.depthStencilTexture;if(n||o!==this.colorFramebufferManager.getDepthStencilTexture()){if(c(this._updateDepthCommand)){if(!c(this._updateDepthFramebuffer.framebuffer)||this._updateDepthFramebuffer.getDepthStencilTexture()!==o||this._updateDepthFramebuffer.getColorTexture()!==this._copyDepthFramebuffer.getColorTexture()){const r=this._copyDepthFramebuffer.getColorTexture().width,s=this._copyDepthFramebuffer.getColorTexture().height;this._tempCopyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.update(e,r,s);const a=this._copyDepthFramebuffer.getColorTexture();this._updateDepthFramebuffer.setColorTexture(a,0),this._updateDepthFramebuffer.setDepthStencilTexture(o),this._updateDepthFramebuffer.update(e,r,s),mJ(this,e,r,s,t)}this._tempCopyDepthTexture=o,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)}}else c(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)},Tf.prototype.executeCopyColor=function(e,t){c(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},Tf.prototype.clear=function(e,t,n){const i=this._clearGlobeColorCommand;c(i)&&(Z.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))},Tf.prototype.isDestroyed=function(){return!1},Tf.prototype.destroy=function(){return function WWe(e){e._pickColorFramebuffer.destroy(),e._outputFramebuffer.destroy(),e._copyDepthFramebuffer.destroy(),e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer.destroy()}(this),c(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),c(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),c(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),c(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),Xe(this)};const qWe=Tf;function $g(){this._framebuffer=new $o({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new $o,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new Vt,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties($g.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()}}}),$g.prototype.updateAndClear=function(e,t,n,i){const o=t.width,r=t.height;(function XWe(e,t,n,i,o){e._framebuffer.update(t,n,i,1,o?t.halfFloatingPointTexture?yt.HALF_FLOAT:yt.FLOAT:yt.UNSIGNED_BYTE),e._packedDepthFramebuffer.update(t,n,i)})(this,n,o,r,e),function ZWe(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;const r=!Vt.equals(e._viewport,o.viewport);let s=r!==e._useScissorTest;e._useScissorTest=r,Vt.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=Vt.clone(o.viewport,e._scissorRectangle),s=!0),(!c(e._renderState)||!Vt.equals(e._viewport,e._renderState.viewport)||s)&&(e._renderState=Lt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),c(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(B3,{uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),c(e._clearCommand)||(e._clearCommand=new ar({color:new Z(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}(this,n,o,r,i),this._useHdr=e},$g.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)},$g.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture},$g.prototype.isDestroyed=function(){return!1},$g.prototype.destroy=function(){return function YWe(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}(this),Xe(this)};const $We=$g,_J="#ifdef MRT\nlayout (location = 0) out vec4 out_FragData_0;\nlayout (location = 1) out vec4 out_FragData_1;\n#else\nlayout (location = 0) out vec4 out_FragColor;\n#endif\n\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n if (texture(u_depthTexture, v_textureCoordinates).r < 1.0)\n {\n#ifdef MRT\n out_FragData_0 = u_bgColor;\n out_FragData_1 = vec4(u_bgColor.a);\n#else\n out_FragColor = u_bgColor;\n#endif\n return;\n }\n \n discard;\n}\n";function Hh(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;const 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 $o({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new $o({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new $o({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new $o({createColorAttachments:!1}),this._opaqueClearCommand=new ar({color:new Z(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new ar({color:new Z(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new ar({color:new Z(0,0,0,0),owner:this}),this._alphaClearCommand=new ar({color:new Z(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 Vt,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function gJ(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function k3(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function yJ(e){gJ(e),k3(e)}Hh.prototype.update=function(e,t,n,i,o){if(!this.isSupported())return;this._opaqueFBO=n,this._opaqueTexture=n.getColorTexture(0),this._depthStencilTexture=n.getDepthStencilTexture();const{width:r,height:s}=this._opaqueTexture,a=this._accumulationTexture,l=!c(a)||a.width!==r||a.height!==s||i!==this._useHDR,u=this._numSamples!==o;if((l||u)&&(this._numSamples=o,function QWe(e,t,n,i){gJ(e),e._accumulationTexture=new Mn({context:t,width:n,height:i,pixelFormat:Ct.RGBA,pixelDatatype:yt.FLOAT});const o=new Float32Array(n*i*4);e._revealageTexture=new Mn({context:t,pixelFormat:Ct.RGBA,pixelDatatype:yt.FLOAT,source:{arrayBufferView:o,width:n,height:i},flipY:!1})}(this,e,r,s)),(!c(this._translucentFBO.framebuffer)||l||u)&&!function JWe(e,t){k3(e);const n=ie.FRAMEBUFFER_COMPLETE;let i=!0;const{width:o,height:r}=e._accumulationTexture;return 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)&&(k3(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),(e._translucentFBO.status!==n||e._alphaFBO.status!==n||e._adjustTranslucentFBO.status!==n||e._adjustAlphaFBO.status!==n)&&(yJ(e),e._translucentMultipassSupport=!1,i=!1)),i}(this,e))return;this._useHDR=i;const d=this;let h,m;c(this._compositeCommand)||(h=new St({sources:["/**\n * Compositing for Weighted Blended Order-Independent Transparency. See:\n * - http://jcgt.org/published/0002/02/09/\n * - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html\n */\n\nuniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 opaque = texture(u_opaque, v_textureCoordinates);\n vec4 accum = texture(u_accumulation, v_textureCoordinates);\n float r = texture(u_revealage, v_textureCoordinates).r;\n\n#ifdef MRT\n vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\n vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\n\n out_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n\n if (opaque != czm_backgroundColor)\n {\n out_FragColor.a = 1.0;\n }\n}\n"]}),this._translucentMRTSupport&&h.defines.push("MRT"),m={u_opaque:function(){return d._opaqueTexture},u_accumulation:function(){return d._accumulationTexture},u_revealage:function(){return d._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this})),c(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(h=new St({defines:["MRT"],sources:[_J]}),m={u_bgColor:function(){return d._translucentMRTClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this})):this._translucentMultipassSupport&&(h=new St({sources:[_J]}),m={u_bgColor:function(){return d._translucentMultipassClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this}),m={u_bgColor:function(){return d._alphaClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this}))),this._viewport.width=r,this._viewport.height=s;const _=!Vt.equals(this._viewport,t.viewport);let p=_!==this._useScissorTest;this._useScissorTest=_,Vt.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=Vt.clone(t.viewport,this._scissorRectangle),p=!0),(!c(this._rs)||!Vt.equals(this._viewport,this._rs.viewport)||p)&&(this._rs=Lt.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),c(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),c(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)};const eqe={enabled:!0,color:new Z(0,0,0,0),equationRgb:zl.ADD,equationAlpha:zl.ADD,functionSourceRgb:lr.ONE,functionDestinationRgb:lr.ONE,functionSourceAlpha:lr.ZERO,functionDestinationAlpha:lr.ONE_MINUS_SOURCE_ALPHA},tqe={enabled:!0,color:new Z(0,0,0,0),equationRgb:zl.ADD,equationAlpha:zl.ADD,functionSourceRgb:lr.ONE,functionDestinationRgb:lr.ONE,functionSourceAlpha:lr.ONE,functionDestinationAlpha:lr.ONE},nqe={enabled:!0,color:new Z(0,0,0,0),equationRgb:zl.ADD,equationAlpha:zl.ADD,functionSourceRgb:lr.ZERO,functionDestinationRgb:lr.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:lr.ZERO,functionDestinationAlpha:lr.ONE_MINUS_SOURCE_ALPHA};function U3(e,t,n,i){let o=n[i.id];if(!c(o)){const r=Lt.getState(i);r.depthMask=!1,r.blending=t,o=Lt.fromCache(r),n[i.id]=o}return o}function z3(e,t,n,i){const{shaderCache:o}=e,r=o.getDerivedShaderProgram(t,n);if(c(r))return r;const s=t._attributeLocations,a=t.fragmentShaderSource.clone();a.sources=a.sources.map(function(d){return St.replaceMain(d,"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;\nbool czm_discard = false;\n");const l=[...i.matchAll(/out_FragData_(\d+)/g)];let u="";for(let d=0;d<l.length;d++){const h=l[d];u=`layout (location = ${h[1]}) out vec4 ${h[0]};\n${u}`}return a.sources.push(u),a.sources.push(`void main()\n{\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n${i}}\n`),o.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:s})}Hh.prototype.createDerivedCommands=function(e,t,n){if(c(n)||(n={}),this._translucentMRTSupport){let a,l;return c(n.translucentCommand)&&(a=n.translucentCommand.shaderProgram,l=n.translucentCommand.renderState),n.translucentCommand=$t.shallowClone(e,n.translucentCommand),c(a)&&n.shaderProgramId===e.shaderProgram.id?(n.translucentCommand.shaderProgram=a,n.translucentCommand.renderState=l):(n.translucentCommand.shaderProgram=function lqe(e,t){return z3(e,t,"translucentMRT"," vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;\n float ai = czm_out_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n out_FragData_0 = vec4(Ci * wzi, ai);\n out_FragData_1 = vec4(ai * wzi);\n")}(t,e.shaderProgram),n.translucentCommand.renderState=function iqe(e,t,n){return U3(0,eqe,e._translucentRenderStateCache,n)}(this,0,e.renderState),n.shaderProgramId=e.shaderProgram.id),n}let i,o,r,s;return c(n.translucentCommand)&&(i=n.translucentCommand.shaderProgram,o=n.translucentCommand.renderState,r=n.alphaCommand.shaderProgram,s=n.alphaCommand.renderState),n.translucentCommand=$t.shallowClone(e,n.translucentCommand),n.alphaCommand=$t.shallowClone(e,n.alphaCommand),c(i)&&n.shaderProgramId===e.shaderProgram.id?(n.translucentCommand.shaderProgram=i,n.translucentCommand.renderState=o,n.alphaCommand.shaderProgram=r,n.alphaCommand.renderState=s):(n.translucentCommand.shaderProgram=function uqe(e,t){return z3(e,t,"translucentMultipass"," vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;\n float ai = czm_out_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n out_FragColor = vec4(Ci, ai) * wzi;\n")}(t,e.shaderProgram),n.translucentCommand.renderState=function oqe(e,t,n){return U3(0,tqe,e._translucentRenderStateCache,n)}(this,0,e.renderState),n.alphaCommand.shaderProgram=function dqe(e,t){return z3(e,t,"alphaMultipass"," float ai = czm_out_FragColor.a;\n out_FragColor = vec4(ai);\n")}(t,e.shaderProgram),n.alphaCommand.renderState=function rqe(e,t,n){return U3(0,nqe,e._alphaRenderStateCache,n)}(this,0,e.renderState),n.shaderProgramId=e.shaderProgram.id),n},Hh.prototype.executeCommands=function(e,t,n,i,o){this._translucentMRTSupport?function hqe(e,t,n,i,o,r){const{context:s,frameState:a}=t,{useLogDepth:l,shadowState:u}=a,d=t._hdr,h=i.framebuffer,m=u.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i);const _=e._opaqueFBO.framebuffer;let p,y;i.framebuffer=e._translucentFBO.framebuffer;for(let b=0;b<o.length;++b)p=o[b],p=l?p.derivedCommands.logDepth.command:p,p=d?p.derivedCommands.hdr.command:p,y=m&&p.receiveShadows?p.derivedCommands.oit.shadows.translucentCommand:p.derivedCommands.oit.translucentCommand,n(y,t,s,i,_);c(r)&&(p=r.unclassifiedCommand,y=m&&p.receiveShadows?p.derivedCommands.oit.shadows.translucentCommand:p.derivedCommands.oit.translucentCommand,n(y,t,s,i,_)),i.framebuffer=h}(this,e,t,n,i,o):function fqe(e,t,n,i,o,r){let s,a,l;const{context:u,frameState:d}=t,{useLogDepth:h,shadowState:m}=d,_=t._hdr,p=i.framebuffer,y=m.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(u,i),i.framebuffer=e._adjustAlphaFBO.framebuffer,e._adjustAlphaCommand.execute(u,i);const b=e._opaqueFBO.framebuffer;for(i.framebuffer=e._translucentFBO.framebuffer,l=0;l<o.length;++l)s=o[l],s=h?s.derivedCommands.logDepth.command:s,s=_?s.derivedCommands.hdr.command:s,a=y&&s.receiveShadows?s.derivedCommands.oit.shadows.translucentCommand:s.derivedCommands.oit.translucentCommand,n(a,t,u,i,b);for(c(r)&&(s=r.unclassifiedCommand,a=y&&s.receiveShadows?s.derivedCommands.oit.shadows.translucentCommand:s.derivedCommands.oit.translucentCommand,n(a,t,u,i,b)),i.framebuffer=e._alphaFBO.framebuffer,l=0;l<o.length;++l)s=o[l],s=h?s.derivedCommands.logDepth.command:s,s=_?s.derivedCommands.hdr.command:s,a=y&&s.receiveShadows?s.derivedCommands.oit.shadows.alphaCommand:s.derivedCommands.oit.alphaCommand,n(a,t,u,i,b);c(r)&&(s=r.unclassifiedCommand,a=y&&s.receiveShadows?s.derivedCommands.oit.shadows.alphaCommand:s.derivedCommands.oit.alphaCommand,n(a,t,u,i,b)),i.framebuffer=p}(this,e,t,n,i,o)},Hh.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},Hh.prototype.clear=function(e,t,n){const i=t.framebuffer;t.framebuffer=this._opaqueFBO.framebuffer,Z.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},Hh.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},Hh.prototype.isDestroyed=function(){return!1},Hh.prototype.destroy=function(){return yJ(this),c(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),c(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),c(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),Xe(this)};const pqe=Hh;function tE(){this._framebuffer=new $o({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(tE.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}}),tE.prototype.update=function(e,t,n){const i=n.width,o=n.height;this._framebuffer.isDirty(i,o)&&function _qe(e,t){e._framebuffer.update(t,t.drawingBufferWidth,t.drawingBufferHeight);const o=new Vg(t);o.blendingEnabled=!1,o.scissorTest={enabled:!0,rectangle:new Vt},o.viewport=new Vt,e._passState=o}(this,e);const s=this._passState;return s.framebuffer=this.framebuffer,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},tE.prototype.isDestroyed=function(){return!1},tE.prototype.destroy=function(){return function mqe(e){e._framebuffer.destroy()}(this),Xe(this)};const gqe=tE;function qb(e){const t=new Vg(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new Vt},t.viewport=new Vt,this._context=e,this._fb=new $o({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}qb.prototype.begin=function(e,t){const n=this._context,{width:i,height:o}=t;return Vt.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};const nE=new Z;qb.prototype.end=function(e){const t=g(e.width,1),n=g(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(.5*t),l=Math.floor(.5*n);let u=0,d=0,h=0,m=-1;for(let _=0;_<s;++_){if(-a<=u&&u<=a&&-l<=d&&d<=l){const p=4*((l-d)*t+u+a);nE.red=Z.byteToFloat(o[p]),nE.green=Z.byteToFloat(o[p+1]),nE.blue=Z.byteToFloat(o[p+2]),nE.alpha=Z.byteToFloat(o[p+3]);const y=i.getObjectByPickColor(nE);if(c(y))return y}if(u===d||u<0&&-u===d||u>0&&u===1-d){const p=h;h=-m,m=p}u+=h,d+=m}},qb.prototype.readVoxelInfo=function(e){const t=g(e.width,1),n=g(e.height,1),o=this._context.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.floor(.5*t),a=4*(Math.floor(.5*n)*t+r);return o.slice(a,a+4)},qb.prototype.isDestroyed=function(){return!1},qb.prototype.destroy=function(){return this._fb.destroy(),Xe(this)};const yqe=qb;function Gh(){this._numSamples=1,this._colorFramebuffer=new $o({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new $o({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new Z(0,0,0,0),this._clearCommand=new ar({color:new Z(0,0,0,0),depth:1,owner:this})}Object.defineProperties(Gh.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}}),Gh.prototype.update=function(e,t,n,i){const o=t.width,r=t.height,s=n?e.halfFloatingPointTexture?yt.HALF_FLOAT:yt.FLOAT:yt.UNSIGNED_BYTE;this._numSamples=i,this._colorFramebuffer.update(e,o,r,i,s),this._idFramebuffer.update(e,o,r)},Gh.prototype.clear=function(e,t,n){Z.clone(n,this._clearCommand.color),Z.clone(this._idClearColor,this._clearCommand.color),this._colorFramebuffer.clear(e,this._clearCommand,t),this._idFramebuffer.clear(e,this._clearCommand,t)},Gh.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer},Gh.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer},Gh.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)},Gh.prototype.isDestroyed=function(){return!1},Gh.prototype.destroy=function(){return function bqe(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}(this),Xe(this)};const bJ=Gh;function Kg(){}Kg.getShadowCastShaderKeyword=function(e,t,n,i){return`castShadow ${e} ${t} ${n} ${i}`},Kg.createShadowCastVertexShader=function(e,t,n){const i=e.defines.slice(0),o=e.sources.slice(0);i.push("SHADOW_MAP"),n&&i.push("GENERATE_POSITION");const r=St.findPositionVarying(e),s=c(r);if(t&&!s){const a=o.length;for(let u=0;u<a;++u)o[u]=St.replaceMain(o[u],"czm_shadow_cast_main");o.push("out vec3 v_positionEC; \nvoid main() \n{ \n czm_shadow_cast_main(); \n v_positionEC = (czm_inverseProjection * gl_Position).xyz; \n}")}return new St({defines:i,sources:o})},Kg.createShadowCastFragmentShader=function(e,t,n,i){const o=e.defines.slice(0),r=e.sources.slice(0);o.push("SHADOW_MAP");let s=St.findPositionVarying(e);const a=c(s);a||(s="v_positionEC");const l=r.length;for(let d=0;d<l;++d)r[d]=St.replaceMain(r[d],"czm_shadow_cast_main");let u="";return t&&(a||(u+="in vec3 v_positionEC; \n"),u+="uniform vec4 shadowMap_lightPositionEC; \n"),u+=i?"void main() \n{ \n":"void main() \n{ \n czm_shadow_cast_main(); \n if (out_FragColor.a == 0.0) \n { \n discard; \n } \n",u+=t?` float distance = length(${s}); \n if (distance >= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n out_FragColor = czm_packDepth(distance); \n`:n?" out_FragColor = vec4(1.0); \n":" out_FragColor = czm_packDepth(gl_FragCoord.z); \n",u+="} \n",r.push(u),new St({defines:o,sources:r})},Kg.getShadowReceiveShaderKeyword=function(e,t,n,i){return`receiveShadow ${e._usesDepthTexture}${e._polygonOffsetSupported}${e._isPointLight}${e._isSpotLight}${e._numberOfCascades>1}${e.debugCascadeColors}${e.softShadows}${t}${n}${i}`},Kg.createShadowReceiveVertexShader=function(e,t,n){const i=e.defines.slice(0),o=e.sources.slice(0);return i.push("SHADOW_MAP"),t&&i.push(n?"GENERATE_POSITION_AND_NORMAL":"GENERATE_POSITION"),new St({defines:i,sources:o})},Kg.createShadowReceiveFragmentShader=function(e,t,n,i,o){const r=St.findNormalVarying(e),s=!i&&c(r)||i&&o,a=St.findPositionVarying(e),l=c(a),u=t._usesDepthTexture,d=t._polygonOffsetSupported,h=t._isPointLight,m=t._isSpotLight,_=t._numberOfCascades>1,p=t.debugCascadeColors,y=t.softShadows,b=h?t._pointBias:i?t._terrainBias:t._primitiveBias,x=e.defines.slice(0),C=e.sources.slice(0),w=C.length;for(let P=0;P<w;++P)C[P]=St.replaceMain(C[P],"czm_shadow_receive_main");h?x.push("USE_CUBE_MAP_SHADOW"):u&&x.push("USE_SHADOW_DEPTH_TEXTURE"),y&&!h&&x.push("USE_SOFT_SHADOWS"),_&&n&&i&&x.push(s?"ENABLE_VERTEX_LIGHTING":"ENABLE_DAYNIGHT_SHADING"),n&&b.normalShading&&s&&(x.push("USE_NORMAL_SHADING"),b.normalShadingSmooth>0&&x.push("USE_NORMAL_SHADING_SMOOTH"));let I,v="";return v+=h?"uniform samplerCube shadowMap_textureCube; \n":"uniform sampler2D shadowMap_texture; \n",I=l?` return vec4(${a}, 1.0); \n`:"#ifndef LOG_DEPTH \n return czm_windowToEyeCoordinates(gl_FragCoord); \n#else \n return vec4(v_logPositionEC, 1.0); \n#endif \n",v+=`uniform mat4 shadowMap_matrix; \nuniform vec3 shadowMap_lightDirectionEC; \nuniform vec4 shadowMap_lightPositionEC; \nuniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; \nuniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth; \n#ifdef LOG_DEPTH \nin vec3 v_logPositionEC; \n#endif \nvec4 getPositionEC() \n{ \n${I}} \nvec3 getNormalEC() \n{ \n${s?` return normalize(${r}); \n`:" return vec3(1.0); \n"}} \nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL) \n{ \n${b.normalOffset&&s?" float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x; \n float normalOffsetScale = 1.0 - nDotL; \n vec3 offset = normalOffset * normalOffsetScale * normalEC; \n positionEC.xyz += offset; \n":""}} \n`,v+="void main() \n{ \n czm_shadow_receive_main(); \n vec4 positionEC = getPositionEC(); \n vec3 normalEC = getNormalEC(); \n float depth = -positionEC.z; \n",v+=" czm_shadowParameters shadowParameters; \n shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; \n shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; \n shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; \n shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; \n",i?v+=" shadowParameters.depthBias *= max(depth * 0.01, 1.0); \n":d||(v+=" shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); \n"),v+=h?" vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz; \n float distance = length(directionEC); \n directionEC = normalize(directionEC); \n float radius = shadowMap_lightPositionEC.w; \n // Stop early if the fragment is beyond the point light radius \n if (distance > radius) \n { \n return; \n } \n vec3 directionWC = czm_inverseViewRotation * directionEC; \n shadowParameters.depth = distance / radius; \n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n shadowParameters.texCoords = directionWC; \n float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters); \n":m?" vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); \n float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n vec4 shadowPosition = shadowMap_matrix * positionEC; \n // Spot light uses a perspective projection, so perform the perspective divide \n shadowPosition /= shadowPosition.w; \n // Stop early if the fragment is not in the shadow bounds \n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n { \n return; \n } \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n":_?" float maxDepth = shadowMap_cascadeSplits[1].w; \n // Stop early if the eye depth exceeds the last cascade \n if (depth > maxDepth) \n { \n return; \n } \n // Get the cascade based on the eye-space depth \n vec4 weights = czm_cascadeWeights(depth); \n // Apply normal offset \n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n // Transform position into the cascade \n vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC; \n // Get visibility \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n // Fade out shadows that are far away \n float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z; \n float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0); \n visibility = mix(visibility, 1.0, fade); \n"+(p?" // Draw cascade colors for debugging \n out_FragColor *= czm_cascadeColor(weights); \n":""):" float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n vec4 shadowPosition = shadowMap_matrix * positionEC; \n // Stop early if the fragment is not in the shadow bounds \n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n { \n return; \n } \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n",v+=" out_FragColor.rgb *= visibility; \n} \n",C.push(v),new St({defines:x,sources:C})};const Yb=Kg;function Af(e){const t=(e=g(e,g.EMPTY_OBJECT)).context;if(!c(t))throw new E("context is required.");if(!c(e.lightCamera))throw new E("lightCamera is required.");if(c(e.numberOfCascades)&&1!==e.numberOfCascades&&4!==e.numberOfCascades)throw new E("Only one or four cascades are supported.");this._enabled=g(e.enabled,!0),this._softShadows=g(e.softShadows,!1),this._normalOffset=g(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=g(e.fromLightSource,!0),this.darkness=g(e.darkness,.3),this._darkness=this.darkness,this.fadingEnabled=g(e.fadingEnabled,!0),this.maximumDistance=g(e.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let i,n=!0;(Hn.isInternetExplorer()||Hn.isEdge()||(Hn.isChrome()||Hn.isFirefox())&&Hn.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 k,this._shadowMapTexture=void 0,this._lightDirectionEC=new f,this._lightPositionEC=new de,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new YD,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new Ae,this._isPointLight=g(e.isPointLight,!1),this._pointLightRadius=g(e.pointLightRadius,100),this._cascadesEnabled=!this._isPointLight&&g(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?g(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new V,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new Qa:c(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new de,new de],this._cascadeMatrices=[new k,new k,new k,new k],this._cascadeDistances=new de,i=this._isPointLight?6:this._cascadesEnabled?this._numberOfCascades:1,this._passes=new Array(i);for(let o=0;o<i;++o)this._passes[o]=new Tqe(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,H3(this),this._clearCommand=new ar({depth:1,color:new Z}),this._clearPassState=new Vg(t),this._size=g(e.size,2048),this.size=this._size}function Tqe(e){this.camera=new YD,this.passState=new Vg(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function V3(e,t){return Lt.fromCache({cull:{enabled:!0,face:ur.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 H3(e){const t=!e._usesDepthTexture;e._primitiveRenderState=V3(t,e._primitiveBias),e._terrainRenderState=V3(t,e._terrainBias),e._pointRenderState=V3(t,e._pointBias)}function G3(e){const t=e._passes.length;for(let n=0;n<t;++n){const i=e._passes[n],o=i.framebuffer;c(o)&&!o.isDestroyed()&&o.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function TJ(e,t){e._isPointLight?function Cqe(e,t){const n=new Z_({context:t,width:e._textureSize.x,height:e._textureSize.y,format:ah.DEPTH_COMPONENT16}),i=new C_({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ct.RGBA,pixelDatatype:yt.UNSIGNED_BYTE,sampler:vi.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){const s=new sh({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}(e,t):e._usesDepthTexture?function xqe(e,t){const n=new Mn({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ct.DEPTH_STENCIL,pixelDatatype:yt.UNSIGNED_INT_24_8,sampler:vi.NEAREST}),i=new sh({context:t,depthStencilTexture:n,destroyAttachments:!1}),o=e._passes.length;for(let r=0;r<o;++r){const s=e._passes[r];s.framebuffer=i,s.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}(e,t):function Aqe(e,t){const n=new Z_({context:t,width:e._textureSize.x,height:e._textureSize.y,format:ah.DEPTH_COMPONENT16}),i=new Mn({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ct.RGBA,pixelDatatype:yt.UNSIGNED_BYTE,sampler:vi.NEAREST}),o=new sh({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),r=e._passes.length;for(let s=0;s<r;++s){const a=e._passes[s];a.framebuffer=o,a.passState.framebuffer=o}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}(e,t)}function AJ(e,t,n){n=g(n,0),(e._isPointLight||0===n)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}Af.MAXIMUM_DISTANCE=2e4,Af.prototype.debugCreateRenderStates=function(){H3(this)},Object.defineProperties(Af.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){!function Sqe(e,t){e._size=t;const n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){o.x=t=dn.maximumCubeMapSize>=t?t:dn.maximumCubeMapSize,o.y=t;const r=new Vt(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 1===i?(o.x=t=dn.maximumTextureSize>=t?t:dn.maximumTextureSize,o.y=t,n[0].passState.viewport=new Vt(0,0,t,t)):4===i&&(o.x=2*(t=dn.maximumTextureSize>=2*t?t:dn.maximumTextureSize/2),o.y=2*t,n[0].passState.viewport=new Vt(0,0,t,t),n[1].passState.viewport=new Vt(t,0,t,t),n[2].passState.viewport=new Vt(0,t,t,t),n[3].passState.viewport=new Vt(t,t,t,t));e._clearPassState.viewport=new Vt(0,0,o.x,o.y);for(let r=0;r<i;++r){const s=n[r],a=s.passState.viewport;s.textureOffsets=new k(a.width/o.x,0,0,a.x/o.x,0,a.height/o.y,0,a.y/o.y,0,0,1,0,0,0,0,1)}}(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}}});const vqe=new Vt;const xf=new Array(8);xf[0]=new de(-1,-1,-1,1),xf[1]=new de(1,-1,-1,1),xf[2]=new de(1,1,-1,1),xf[3]=new de(-1,1,-1,1),xf[4]=new de(-1,-1,1,1),xf[5]=new de(1,-1,1,1),xf[6]=new de(1,1,1,1),xf[7]=new de(-1,1,1,1);const Om=new k,j3=new Array(8);for(let e=0;e<8;++e)j3[e]=new de;const Oqe=[Z.RED,Z.GREEN,Z.BLUE,Z.MAGENTA],Rqe=new f;function Lqe(e,t){!function Dqe(e,t){const n=t.context,i=t.context.drawingBufferWidth,r=.3*Math.min(i,t.context.drawingBufferHeight),s=vqe;s.x=i-r,s.y=0,s.width=r,s.height=r;let a=e._debugShadowViewCommand;c(a)||(a=function Iqe(e,t){let n;n=e._isPointLight?"uniform samplerCube shadowMap_textureCube; \nin vec2 v_textureCoordinates; \nvoid main() \n{ \n vec2 uv = v_textureCoordinates; \n vec3 dir; \n \n if (uv.y < 0.5) \n { \n if (uv.x < 0.333) \n { \n dir.x = -1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = -1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else \n { \n dir.z = -1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 1.0; \n } \n } \n else \n { \n if (uv.x < 0.333) \n { \n dir.x = 1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = 1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else \n { \n dir.z = 1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 3.0; \n } \n } \n \n float shadow = czm_unpackDepth(czm_textureCube(shadowMap_textureCube, dir)); \n out_FragColor = vec4(vec3(shadow), 1.0); \n} \n":`uniform sampler2D shadowMap_texture; \nin vec2 v_textureCoordinates; \nvoid main() \n{ \n${e._usesDepthTexture?" float shadow = texture(shadowMap_texture, v_textureCoordinates).r; \n":" float shadow = czm_unpackDepth(texture(shadowMap_texture, v_textureCoordinates)); \n"} out_FragColor = vec4(vec3(shadow), 1.0); \n} \n`;const i=t.createViewportQuadCommand(n,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return i.pass=Ue.OVERLAY,i}(e,n),e._debugShadowViewCommand=a),(!c(a.renderState)||!Vt.equals(a.renderState.viewport,s))&&(a.renderState=Lt.fromCache({viewport:Vt.clone(s)})),t.commandList.push(e._debugShadowViewCommand)}(e,t);const n=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(n&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new $C({camera:e._sceneCamera,color:Z.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){n&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new $C({camera:e._shadowMapCamera,color:Z.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 $C({camera:e._passes[i].camera,color:Oqe[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!c(e._debugLightFrustum)||e._needsUpdate){const i=e._shadowMapCamera.positionWC,o=bt.IDENTITY,r=2*e._pointLightRadius,s=f.fromElements(r,r,r,Rqe),a=k.fromTranslationQuaternionRotationScale(i,o,s,Om);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=function Pqe(e,t){const n=new zn({geometry:new Fv({minimum:new f(-.5,-.5,-.5),maximum:new f(.5,.5,.5)}),attributes:{color:ei.fromColor(t)}}),i=new zn({geometry:new xM({radius:.5}),attributes:{color:ei.fromColor(t)}});return new Yi({geometryInstances:[n,i],appearance:new gi({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}(a,Z.YELLOW)}e._debugLightFrustum.update(t)}else(!c(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new $C({camera:e._shadowMapCamera,color:Z.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function YD(){this.viewMatrix=new k,this.inverseViewMatrix=new k,this.frustum=void 0,this.positionCartographic=new Ce,this.positionWC=new f,this.directionWC=f.clone(f.UNIT_Z),this.upWC=f.clone(f.UNIT_Y),this.rightWC=f.clone(f.UNIT_X),this.viewProjectionMatrix=new k}YD.prototype.clone=function(e){k.clone(e.viewMatrix,this.viewMatrix),k.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),Ce.clone(e.positionCartographic,this.positionCartographic),f.clone(e.positionWC,this.positionWC),f.clone(e.directionWC,this.directionWC),f.clone(e.upWC,this.upWC),f.clone(e.rightWC,this.rightWC)};const Nqe=new k(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);YD.prototype.getViewProjection=function(){return k.multiply(this.frustum.projectionMatrix,this.viewMatrix,this.viewProjectionMatrix),k.multiply(Nqe,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};const Mqe=new Array(5),Fqe=new Lo,Bqe=new Array(4),xJ=new f,CJ=new f,Uqe=new k,zqe=new f,Vqe=new f,EJ=new f,Gqe=[new f(-1,0,0),new f(0,-1,0),new f(0,0,-1),new f(1,0,0),new f(0,1,0),new f(0,0,1)],jqe=[new f(0,-1,0),new f(0,0,-1),new f(0,-1,0),new f(0,-1,0),new f(0,0,1),new f(0,-1,0)],Wqe=[new f(0,0,1),new f(1,0,0),new f(-1,0,0),new f(0,0,-1),new f(1,0,0),new f(1,0,0)],Yqe=new f,Xqe=new f,wJ=new Ae,SJ=wJ.center;Af.prototype.update=function(e){if(function $qe(e,t){const n=t.camera,i=e._lightCamera,o=e._sceneCamera,r=e._shadowMapCamera;e._cascadesEnabled?f.clone(i.directionWC,r.directionWC):e._isPointLight?f.clone(i.positionWC,r.positionWC):r.clone(i);const s=e._lightDirectionEC;let a,l;k.multiplyByPointAsVector(n.viewMatrix,r.directionWC,s),f.normalize(s,s),f.negate(s,s),k.multiplyByPoint(n.viewMatrix,r.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius,e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),l=Math.min(t.shadowState.farPlane,e.maximumDistance),l=Math.max(l,a+1)):(a=n.frustum.near,l=e.maximumDistance),e._sceneCamera=nr.clone(n,o),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=l,e._distance=l-a,function Zqe(e,t){const n=e._sceneCamera,i=e._shadowMapCamera,o=wJ;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance)return e._outOfView=!0,void(e._needsUpdate=!1);const r=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,Yqe),s=f.negate(i.directionWC,Xqe),a=f.dot(r,s);if(e.fadingEnabled){const l=O.clamp(a/.1,0,1);e._darkness=O.lerp(1,e.darkness,l)}else e._darkness=e.darkness;if(a<0)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)o.center=i.positionWC,o.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(o)===On.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),Ae.clone(o,e._boundingSphere);else{const r=i.frustum.far/2,s=f.add(i.positionWC,f.multiplyByScalar(i.directionWC,r,SJ),SJ);o.center=s,o.radius=r,e._outOfView=t.cullingVolume.computeVisibility(o)===On.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),Ae.clone(o,e._boundingSphere)}}(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}(this,e),this._needsUpdate)if(function wqe(e,t){(!c(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(G3(e),TJ(e,t),function Eqe(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==ie.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,H3(e),G3(e),TJ(e,t))}(e,t),AJ(e,t))}(this,e.context),this._isPointLight&&function qqe(e,t){const n=new Lo;n.fov=O.PI_OVER_TWO,n.near=1,n.far=e._pointLightRadius,n.aspectRatio=1;for(let i=0;i<6;++i){const o=e._passes[i].camera;o.positionWC=e._shadowMapCamera.positionWC,o.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(o.positionWC,o.positionCartographic),o.directionWC=Gqe[i],o.upWC=jqe[i],o.rightWC=Wqe[i],k.computeView(o.positionWC,o.directionWC,o.upWC,o.rightWC,o.viewMatrix),k.inverse(o.viewMatrix,o.inverseViewMatrix),o.frustum=n}}(this,e),this._cascadesEnabled&&(function Hqe(e,t){const n=e._shadowMapCamera,i=e._sceneCamera,o=k.multiply(i.frustum.projectionMatrix,i.viewMatrix,Om),r=k.inverse(o,Om),s=n.directionWC;let a=i.directionWC;f.equalsEpsilon(s,a,O.EPSILON10)&&(a=i.upWC);const l=f.cross(s,a,zqe);a=f.cross(l,s,Vqe),f.normalize(a,a),f.normalize(l,l);const u=f.fromElements(0,0,0,EJ);let d=k.computeView(u,s,a,l,Uqe);const h=k.multiply(d,r,Om),m=f.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,xJ),_=f.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,CJ);for(let v=0;v<8;++v){const I=de.clone(xf[v],j3[v]);k.multiplyByVector(h,I,I),f.divideByScalar(I,I.w,I),f.minimumByComponent(I,m,m),f.maximumByComponent(I,_,_)}_.z+=1e3,m.z-=10;const p=EJ;p.x=-.5*(m.x+_.x),p.y=-.5*(m.y+_.y),p.z=-_.z;const y=k.fromTranslation(p,Om);d=k.multiply(y,d,d);const b=.5*(_.x-m.x),x=.5*(_.y-m.y),C=_.z-m.z,w=n.frustum;w.left=-b,w.right=b,w.bottom=-x,w.top=x,w.near=.01,w.far=C,k.clone(d,n.viewMatrix),k.inverse(d,n.inverseViewMatrix),k.getTranslation(n.inverseViewMatrix,n.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),f.clone(s,n.directionWC),f.clone(a,n.upWC),f.clone(l,n.rightWC)}(this,e),this._numberOfCascades>1&&function kqe(e,t){const n=e._shadowMapCamera,i=e._sceneCamera,o=i.frustum.near,r=i.frustum.far,s=e._numberOfCascades;let a;const l=r-o,u=r/o;let d=.9,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,d=.9);const m=Bqe,_=Mqe;for(_[0]=o,_[s]=r,a=0;a<s;++a){const F=(a+1)/s,S=o*Math.pow(u,F),L=O.lerp(o+l*F,S,d);_[a+1]=L,m[a]=L-_[a]}if(h){for(a=0;a<s;++a)m[a]=Math.min(m[a],e._maximumCascadeDistances[a]);let F=_[0];for(a=0;a<s-1;++a)F+=m[a],_[a+1]=F}de.unpack(_,0,e._cascadeSplits[0]),de.unpack(_,1,e._cascadeSplits[1]),de.unpack(m,0,e._cascadeDistances);const p=n.frustum,y=p.left,b=p.right,x=p.bottom,C=p.top,w=p.near,v=p.far,I=n.positionWC,P=n.directionWC,N=n.upWC,R=i.frustum.clone(Fqe),B=n.getViewProjection();for(a=0;a<s;++a){R.near=_[a],R.far=_[a+1];const F=k.multiply(R.projectionMatrix,i.viewMatrix,Om),S=k.inverse(F,Om),D=k.multiply(B,S,Om),L=f.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,xJ),M=f.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,CJ);for(let q=0;q<8;++q){const j=de.clone(xf[q],j3[q]);k.multiplyByVector(D,j,j),f.divideByScalar(j,j.w,j),f.minimumByComponent(j,L,L),f.maximumByComponent(j,M,M)}L.x=Math.max(L.x,0),L.y=Math.max(L.y,0),L.z=0,M.x=Math.min(M.x,1),M.y=Math.min(M.y,1),M.z=Math.min(M.z,1);const U=e._passes[a],z=U.camera;z.clone(n);const G=z.frustum;G.left=y+L.x*(b-y),G.right=y+M.x*(b-y),G.bottom=x+L.y*(C-x),G.top=x+M.y*(C-x),G.near=w+L.z*(v-w),G.far=w+M.z*(v-w),U.cullingVolume=z.frustum.computeCullingVolume(I,P,N);const W=e._cascadeMatrices[a];k.multiply(z.getViewProjection(),i.inverseViewMatrix,W),k.multiply(U.textureOffsets,W,W)}}(this,e)),this._isPointLight)this._shadowMapCullingVolume=Fu.fromBoundingSphere(this._boundingSphere);else{const t=this._shadowMapCamera;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(t.positionWC,t.directionWC,t.upWC),1===this._passes.length&&this._passes[0].camera.clone(t)}if(1===this._passes.length){const t=this._sceneCamera.inverseViewMatrix;k.multiply(this._shadowMapCamera.getViewProjection(),t,this._shadowMapMatrix)}this.debugShow&&Lqe(this,e)},Af.prototype.updatePass=function(e,t){AJ(this,e,t)};const Kqe=new V;function vJ(e,t,n){const 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(){const r=Kqe;return r.x=1/e._textureSize.x,r.y=1/e._textureSize.y,de.fromElements(r.x,r.y,i.depthBias,i.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return de.fromElements(i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new de,combinedUniforms2:new de};return Pn(t,o,!1)}function Qqe(e,t,n,i,o,r){let s,a,l;if(c(r)&&(s=r.shaderProgram,a=r.renderState,l=r.uniformMap),(r=$t.shallowClone(n,r)).castShadows=!0,r.receiveShadows=!1,!c(s)||o!==n.shaderProgram.id||t){const u=n.shaderProgram,d=n.pass===Ue.GLOBE,h=n.pass!==Ue.TRANSLUCENT,m=e._isPointLight,_=e._usesDepthTexture,p=Yb.getShadowCastShaderKeyword(m,d,_,h);if(s=i.shaderCache.getDerivedShaderProgram(u,p),!c(s)){const x=u.fragmentShaderSource,C=Yb.createShadowCastVertexShader(u.vertexShaderSource,m,d),w=Yb.createShadowCastFragmentShader(x,m,_,h);s=i.shaderCache.createDerivedShaderProgram(u,p,{vertexShaderSource:C,fragmentShaderSource:w,attributeLocations:u._attributeLocations})}a=e._primitiveRenderState,m?a=e._pointRenderState:d&&(a=e._terrainRenderState),n.renderState.cull.enabled||(a=Rt(a,!1),a.cull=Rt(a.cull,!1),a.cull.enabled=!1,a=Lt.fromCache(a)),l=vJ(e,n.uniformMap,d)}return r.shaderProgram=s,r.renderState=a,r.uniformMap=l,r}Af.createReceiveDerivedCommand=function(e,t,n,i,o){c(o)||(o={});const s=t.shaderProgram,a=s.vertexShaderSource,l=s.fragmentShaderSource,u=t.pass===Ue.GLOBE;let d=!1;if(u&&(d=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&e.length>0){let h,m;c(o.receiveCommand)&&(h=o.receiveCommand.shaderProgram,m=o.receiveCommand.uniformMap),o.receiveCommand=$t.shallowClone(t,o.receiveCommand),o.castShadows=!1,o.receiveShadows=!0;const _=o.receiveShaderCastShadows!==t.castShadows,p=o.receiveShaderProgramId!==t.shaderProgram.id;if(!c(h)||p||n||_){const y=Yb.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,d);if(h=i.shaderCache.getDerivedShaderProgram(s,y),!c(h)){const b=Yb.createShadowReceiveVertexShader(a,u,d),x=Yb.createShadowReceiveFragmentShader(l,e[0],t.castShadows,u,d);h=i.shaderCache.createDerivedShaderProgram(s,y,{vertexShaderSource:b,fragmentShaderSource:x,attributeLocations:s._attributeLocations})}m=vJ(e[0],t.uniformMap,u)}o.receiveCommand.shaderProgram=h,o.receiveCommand.uniformMap=m,o.receiveShaderProgramId=t.shaderProgram.id,o.receiveShaderCastShadows=t.castShadows}return o},Af.createCastDerivedCommand=function(e,t,n,i,o){if(c(o)||(o={}),t.castShadows){let r=o.castCommands;c(r)||(r=o.castCommands=[]);const s=o.castShaderProgramId,a=e.length;r.length=a;for(let l=0;l<a;++l)r[l]=Qqe(e[l],n,t,i,s,r[l]);o.castShaderProgramId=t.shaderProgram.id}return o},Af.prototype.isDestroyed=function(){return!1},Af.prototype.destroy=function(){G3(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 Xe(this)};const XD=Af,W3="uniform sampler2D colorTexture;\n\n#ifdef DEBUG_SHOW_DEPTH\nuniform sampler2D u_packedTranslucentDepth;\n#endif\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n#ifdef DEBUG_SHOW_DEPTH\n if (v_textureCoordinates.x < 0.5)\n {\n out_FragColor.rgb = vec3(czm_unpackDepth(texture(u_packedTranslucentDepth, v_textureCoordinates)));\n out_FragColor.a = 1.0;\n }\n#else\n vec4 color = texture(colorTexture, v_textureCoordinates);\n\n#ifdef PICK\n if (color == vec4(0.0))\n {\n discard;\n }\n#else\n // Reverse premultiplication process to get the correct composited result of the classification primitives\n color.rgb /= color.a;\n#endif\n out_FragColor = color;\n#endif\n}\n";function Rm(e){this._drawClassificationFBO=new $o({createDepthAttachments:!1}),this._accumulationFBO=new $o({createDepthAttachments:!1}),this._packFBO=new $o,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 ar({color:new Z(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new ar({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new Vt,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}function IJ(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function DJ(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}Object.defineProperties(Rm.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}}),Rm.prototype.executeTranslucentCommands=function(e,t,n,i,o){const r=i.length;let s,a;const l=e.frameState.useLogDepth,u=e.context,d=n.framebuffer;for(a=0;a<r;++a)if(s=i[a],s=l?s.derivedCommands.logDepth.command:s,s.depthForTranslucentClassification){this._hasTranslucentDepth=!0;break}if(this._hasTranslucentDepth){for(function i7e(e,t,n,i){if(!e.isSupported())return;e._opaqueDepthStencilTexture=i;const o=e._opaqueDepthStencilTexture.width,r=e._opaqueDepthStencilTexture.height;let s,a;if(e._drawClassificationFBO.isDirty(o,r)&&(function t7e(e,t,n,i){IJ(e),e._translucentDepthStencilTexture=new Mn({context:t,width:n,height:i,pixelFormat:Ct.DEPTH_STENCIL,pixelDatatype:yt.UNSIGNED_INT_24_8,sampler:vi.NEAREST})}(e,t,o,r),function n7e(e,t,n,i){DJ(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)}(e,t,o,r)),c(e._packDepthCommand)||(s=new St({sources:["uniform sampler2D u_opaqueDepthTexture;\nuniform sampler2D u_translucentDepthTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n float opaqueDepth = texture(u_opaqueDepthTexture, v_textureCoordinates).r;\n float translucentDepth = texture(u_translucentDepthTexture, v_textureCoordinates).r;\n translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);\n out_FragColor = czm_packDepth(translucentDepth);\n}\n"]}),a={u_opaqueDepthTexture:function(){return e._opaqueDepthStencilTexture},u_translucentDepthTexture:function(){return e._translucentDepthStencilTexture}},e._packDepthCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),!c(e._compositeCommand)){s=new St({sources:[W3]}),a={colorTexture:function(){return e._textureToComposite}},e._compositeCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e});const d=e._compositeCommand,h=d.shaderProgram,m=t.shaderCache.createDerivedShaderProgram(h,"pick",{vertexShaderSource:h.vertexShaderSource,fragmentShaderSource:new St({sources:s.sources,defines:["PICK"]}),attributeLocations:h._attributeLocations}),_=$t.shallowClone(d);_.shaderProgram=m,d.derivedCommands.pick=_}c(e._copyCommand)||(s=new St({sources:[W3]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),c(e._accumulateCommand)||(s=new St({sources:[W3]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._accumulateCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),e._viewport.width=o,e._viewport.height=r;const l=!Vt.equals(e._viewport,n.viewport);let u=l!==e._useScissorTest;e._useScissorTest=l,Vt.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=Vt.clone(n.viewport,e._scissorRectangle),u=!0),(!c(e._rsDepth)||!Vt.equals(e._viewport,e._rsDepth.viewport)||u)&&(e._rsDepth=Lt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),c(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),(!c(e._rsAccumulate)||!Vt.equals(e._viewport,e._rsAccumulate.viewport)||u)&&(e._rsAccumulate=Lt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Fi.EQUAL,reference:xn.CESIUM_3D_TILE_MASK}})),c(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!c(e._rsComp)||!Vt.equals(e._viewport,e._rsComp.viewport)||u)&&(e._rsComp=Lt.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:eo.ALPHA_BLEND})),c(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}(this,u,n,o),n.framebuffer=this._drawClassificationFBO.framebuffer,this._clearDepthStencilCommand.execute(u,n),a=0;a<r;++a)s=i[a],s=l?s.derivedCommands.logDepth.command:s,s.depthForTranslucentClassification&&t(s.derivedCommands.depth.depthOnlyCommand,e,u,n);this._frustumsDrawn+=this._hasTranslucentDepth?1:0,this._hasTranslucentDepth&&(n.framebuffer=this._packFBO.framebuffer,this._packDepthCommand.execute(u,n)),n.framebuffer=d}},Rm.prototype.executeClassificationCommands=function(e,t,n,i){if(!this._hasTranslucentDepth)return;const o=e.context,r=o.uniformState,s=n.framebuffer;2===this._frustumsDrawn&&(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(Ue.CESIUM_3D_TILE_CLASSIFICATION);const a=r.globeDepthTexture;r.globeDepthTexture=this._packFBO.getColorTexture();const l=i.commands[Ue.CESIUM_3D_TILE_CLASSIFICATION],u=i.indices[Ue.CESIUM_3D_TILE_CLASSIFICATION];for(let d=0;d<u;++d)t(l[d],e,o,n);r.globeDepthTexture=a,n.framebuffer=s,1!==this._frustumsDrawn&&(n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=s)},Rm.prototype.execute=function(e,t){this._hasTranslucentDepth&&(this._textureToComposite=1===this._frustumsDrawn?this._drawClassificationFBO.getColorTexture():this._accumulationFBO.getColorTexture(),(e.frameState.passes.pick?this._compositeCommand.derivedCommands.pick:this._compositeCommand).execute(e.context,t),function o7e(e,t,n){if(!e._hasTranslucentDepth)return;const 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}(this,e,t))},Rm.prototype.isSupported=function(){return this._supported},Rm.prototype.isDestroyed=function(){return!1},Rm.prototype.destroy=function(){return IJ(this),DJ(this),c(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),c(this._packDepthCommand)&&(this._packDepthCommand.shaderProgram=this._packDepthCommand.shaderProgram&&this._packDepthCommand.shaderProgram.destroy()),Xe(this)};const r7e=Rm;function s7e(){this.command=void 0,this.near=void 0,this.far=void 0}function ZD(e,t,n){const i=e.context;let o,r;i.depthTexture&&(o=new qWe),e._useOIT&&i.depthTexture&&(r=new pqe(i));const s=new Vg(i);s.viewport=Vt.clone(n),this.camera=t,this._cameraClone=nr.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=s,this.pickFramebuffer=new yqe(i),this.pickDepthFramebuffer=new gqe,this.sceneFramebuffer=new bJ,this.globeDepth=o,this.globeTranslucencyFramebuffer=new $We,this.oit=r,this.translucentTileClassification=new r7e(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}const PJ=new f,OJ=new f;function u7e(e,t,n,i,o){t.debugShowFrustums&&(n.debugOverlappingFrustums=0);const r=e.frustumCommandsList,s=r.length;for(let a=0;a<s;++a){const l=r[a],u=l.near;if(i>l.far)continue;if(o<u)break;const h=n.pass,m=l.indices[h]++;if(l.commands[h][m]=n,t.debugShowFrustums&&(n.debugOverlappingFrustums|=1<<a),n.executeInClosestFrustum)break}if(t.debugShowFrustums){const a=e.debugFrustumStatistics.commandsInFrustums;a[n.debugOverlappingFrustums]=c(a[n.debugOverlappingFrustums])?a[n.debugOverlappingFrustums]+1:1,++e.debugFrustumStatistics.totalCommands}t.updateDerivedCommands(n)}ZD.prototype.checkForCameraUpdates=function(e){const t=this.camera,n=this._cameraClone;return function c7e(e,t,n){const i=1/Math.max(1,function a7e(e,t){const 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)}(e.position,t.position));return f.multiplyByScalar(e.position,i,PJ),f.multiplyByScalar(t.position,i,OJ),f.equalsEpsilon(PJ,OJ,n)&&f.equalsEpsilon(e.direction,t.direction,n)&&f.equalsEpsilon(e.up,t.up,n)&&f.equalsEpsilon(e.right,t.right,n)&&k.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}(t,n,O.EPSILON15)?(this._cameraStartFired&&Cr()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=Cr(),nr.clone(t,n),!0)};const RJ=new Fu,d7e=new Vf;ZD.prototype.createPotentiallyVisibleSet=function(e){const 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:{}});const l=this.frustumCommandsList,u=l.length,d=Ue.NUMBER_OF_PASSES;for(let D=0;D<u;++D)for(let L=0;L<d;++L)l[D].indices[L]=0;r.length=0,s.length=0;const h=this._commandExtents,m=h.length;let _=0,p=+Number.MAX_VALUE,y=-Number.MAX_VALUE;const b=t.shadowState.shadowsEnabled;let x=+Number.MAX_VALUE,C=-Number.MAX_VALUE,w=Number.MAX_VALUE;const v=t.mode===ce.SCENE3D?t.occluder:void 0;let I=t.cullingVolume;const P=RJ.planes;for(let D=0;D<5;++D)P[D]=I.planes[D];I=RJ;const N=a.length;for(let D=0;D<N;++D){const L=a[D],M=L.pass;if(M===Ue.COMPUTE)r.push(L);else if(M===Ue.OVERLAY)s.push(L);else{let U,z;const G=L.boundingVolume;if(c(G)){if(!e.isVisible(L,I,v))continue;const q=G.computePlaneDistances(o,i,d7e);U=q.start,z=q.stop,p=Math.min(p,U),y=Math.max(y,z),b&&L.receiveShadows&&U<XD.MAXIMUM_DISTANCE&&!(M===Ue.GLOBE&&U<-100&&z>100)&&(M!==Ue.GLOBE&&U<100&&(w=Math.min(w,z-U)),x=Math.min(x,U),C=Math.max(C,z))}else L instanceof ar?(U=n.frustum.near,z=n.frustum.far):(U=n.frustum.near,z=n.frustum.far,p=Math.min(p,U),y=Math.max(y,z));let W=h[_];c(W)||(W=h[_]=new s7e),W.command=L,W.near=U,W.far=z,_++}}let R,B;for(b&&(x=Math.min(Math.max(x,n.frustum.near),n.frustum.far),C=Math.max(Math.min(C,n.frustum.far),x)),b&&(t.shadowState.nearPlane=x,t.shadowState.farPlane=C,t.shadowState.closestObjectSize=w),function l7e(e,t,n,i){const o=t.frameState,r=o.camera,s=o.useLogDepth?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,a=t.mode===ce.SCENE2D,l=t.nearToFarDistance2D;let u;i*=1+O.EPSILON2,n=Math.min(Math.max(n,r.frustum.near),r.frustum.far),i=Math.max(Math.min(i,r.frustum.far),n),a?(i=Math.min(i,r.position.z+t.nearToFarDistance2D),n=Math.min(n,i),u=Math.ceil(Math.max(1,i-n)/t.nearToFarDistance2D)):u=Math.ceil(Math.log(i/n)/Math.log(s));const d=e.frustumCommandsList;d.length=u;for(let h=0;h<u;++h){let m,_;a?(m=Math.min(i-l,n+h*l),_=Math.min(i,m+l)):(m=Math.max(n,Math.pow(s,h)*n),_=Math.min(i,s*m));let p=d[h];c(p)?(p.near=m,p.far=_):p=d[h]=new jWe(m,_)}}(this,e,p,y),R=0;R<_;R++)B=h[R],u7e(this,e,B.command,B.near,B.far);if(_<m)for(R=_;R<m&&(B=h[R],c(B.command));R++)B.command=void 0;const F=l.length,S=t.frustumSplits;S.length=F+1;for(let D=0;D<F;++D)S[D]=l[D].near,D===F-1&&(S[D+1]=l[D].far)},ZD.prototype.destroy=function(){let e;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();const t=this.pickDepths,n=t.length;for(e=0;e<n;++e)t[e].destroy()};const LJ=ZD,NJ=.1,f7e=new Gg({pass:zs.MOST_DETAILED_PRELOAD}),h7e=new Gg({pass:zs.MOST_DETAILED_PICK}),$D=new Gg({pass:zs.PICK});function qs(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;const t=new Vt(0,0,1,1),n=new nr(e);n.frustum=new $n({width:NJ,aspectRatio:1,near:.1}),this._pickOffscreenView=new LJ(e,n,t)}qs.prototype.update=function(){this._pickPositionCacheDirty=!0},qs.prototype.getPickDepth=function(e,t){const n=e.view.pickDepths;let i=n[t];return c(i)||(i=new HWe,n[t]=i),i};const p7e=new Qa,m7e=new f,KD=new f,_7e=new V,g7e=new k,b7e=new zg,T7e=new V;function q3(e,t,n,i,o){const r=e.camera.frustum;return r instanceof $n||r instanceof Qa?function y7e(e,t,n,i,o){const r=e.camera;let s=r.frustum;const a=s.offCenterFrustum;c(a)&&(s=a);let l=2*(t.x-o.x)/o.width-1;l*=.5*(s.right-s.left);let u=2*(o.height-t.y-o.y)/o.height-1;u*=.5*(s.top-s.bottom);const d=k.clone(r.transform,g7e);r._setTransform(k.IDENTITY);const h=f.clone(r.position,m7e);f.multiplyByScalar(r.right,l,KD),f.add(KD,h,h),f.multiplyByScalar(r.up,u,KD),f.add(KD,h,h),r._setTransform(d),e.mode===ce.SCENE2D&&f.fromElements(h.z,h.x,h.y,h);const m=s.getPixelDimensions(o.width,o.height,1,1,_7e),_=p7e;return _.right=.5*m.x,_.left=-_.right,_.top=.5*m.y,_.bottom=-_.top,_.near=s.near,_.far=s.far,_.computeCullingVolume(h,r.directionWC,r.upWC)}(e,t,0,0,o):function A7e(e,t,n,i,o){const r=e.camera,s=r.frustum,a=s.near,l=Math.tan(.5*s.fovy),m=(2*(t.x-o.x)/o.width-1)*a*(s.aspectRatio*l),_=(2*(o.height-t.y-o.y)/o.height-1)*a*l,p=s.getPixelDimensions(o.width,o.height,1,1,T7e),y=p.x*n*.5,b=p.y*i*.5,x=b7e;return x.top=_+b,x.bottom=_-b,x.right=m+y,x.left=m-y,x.near=a,x.far=s.far,x.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}(e,t,n,i,o)}let gd=3,jh=3,Va=new Vt(0,0,gd,jh);const Y3=new V,QD=new Z(0,0,0,0);qs.prototype.pick=function(e,t,n,i){A.defined("windowPosition",t),gd=g(n,3),jh=g(i,gd);const{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:l}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let u=s.passState;u.viewport=Vt.clone(a,u.viewport);const d=Pr.transformWindowToDrawingBuffer(e,t,Y3);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=q3(e,d,gd,jh,a),r.invertClassification=!1,r.passes.pick=!0,r.tilesetPassState=$D,o.uniformState.update(r),e.updateEnvironment(),Va.x=d.x-.5*(gd-1),Va.y=e.drawingBufferHeight-d.y-.5*(jh-1),Va.width=gd,Va.height=jh,u=l.begin(Va,a),e.updateAndExecuteCommands(u,QD),e.resolveFramebuffers(u);const h=l.end(Va);return o.endFrame(),h},qs.prototype.pickVoxelCoordinate=function(e,t,n,i){A.defined("windowPosition",t),gd=g(n,3),jh=g(i,gd);const{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:l}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let u=s.passState;u.viewport=Vt.clone(a,u.viewport);const d=Pr.transformWindowToDrawingBuffer(e,t,Y3);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=q3(e,d,gd,jh,a),r.invertClassification=!1,r.passes.pickVoxel=!0,r.tilesetPassState=$D,o.uniformState.update(r),e.updateEnvironment(),Va.x=d.x-.5*(gd-1),Va.y=e.drawingBufferHeight-d.y-.5*(jh-1),Va.width=gd,Va.height=jh,u=l.begin(Va,a),e.updateAndExecuteCommands(u,QD),e.resolveFramebuffers(u);const h=l.readVoxelInfo(Va);return o.endFrame(),h};const C7e=new Lo,E7e=new zg,w7e=new $n,S7e=new Qa;qs.prototype.pickPositionWorldCoordinates=function(e,t,n){if(!e.useDepthPicking)return;if(A.defined("windowPosition",t),!e.context.depthTexture)throw new E("Picking from the depth buffer is not supported. Check pickPositionSupported.");const i=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(i))return f.clone(this._pickPositionCache[i],n);const{context:o,frameState:r,camera:s,defaultView:a}=e,{uniformState:l}=o;e.view=a;const u=Pr.transformWindowToDrawingBuffer(e,t,Y3);let d;e.pickTranslucentDepth?function x7e(e,t){const{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 l=n.passState;l.viewport=Vt.clone(s,l.viewport),e.clearPasses(o.passes),o.passes.pick=!0,o.passes.depth=!0,o.cullingVolume=q3(e,t,1,1,s),o.tilesetPassState=$D,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,l=a.update(i,t,s),e.updateAndExecuteCommands(l,QD),e.resolveFramebuffers(l),i.endFrame()}(e,u):(e.updateFrameState(),l.update(r),e.updateEnvironment()),u.y=e.drawingBufferHeight-u.y,d=c(s.frustum.fov)?s.frustum.clone(C7e):c(s.frustum.infiniteProjectionMatrix)?s.frustum.clone(E7e):c(s.frustum.width)?s.frustum.clone(w7e):s.frustum.clone(S7e);const h=a.frustumCommandsList,m=h.length;for(let _=0;_<m;++_){const y=this.getPickDepth(e,_).getDepth(o,u.x,u.y);if(c(y)&&y>0&&y<1){const b=h[_];let x;return e.mode===ce.SCENE2D?(x=s.position.z,s.position.z=x-b.near+1,d.far=Math.max(1,b.far-b.near),d.near=1,l.update(r),l.updateFrustum(d)):(d.near=b.near*(0!==_?e.opaqueFrustumNearOffset:1),d.far=b.far,l.updateFrustum(d)),n=Pr.drawingBufferToWorldCoordinates(e,u,y,n),e.mode===ce.SCENE2D&&(s.position.z=x,l.update(r)),this._pickPositionCache[i]=f.clone(n),n}}this._pickPositionCache[i]=void 0};const v7e=new Ce;function MJ(e,t){let n,i;const o=[],r=[],s=[],a=[];c(e)||(e=Number.MAX_VALUE);let l=t();for(;c(l);){const u=l.object,h=l.exclude;if(c(l.position)&&!c(u)){o.push(l);break}if(!c(u)||!c(u.primitive)||!h&&(o.push(l),0>=--e))break;const m=u.primitive;let _=!1;"function"==typeof m.getGeometryInstanceAttributes&&c(u.id)&&(i=m.getGeometryInstanceAttributes(u.id),c(i)&&c(i.show)&&(_=!0,i.show=Pi.toValue(!1,i.show),s.push(i))),u instanceof v_&&(_=!0,u.show=!1,a.push(u)),_||(m.show=!1,r.push(m)),l=t()}for(n=0;n<r.length;++n)r[n].show=!0;for(n=0;n<s.length;++n)i=s[n],i.show=Pi.toValue(!0,i.show);for(n=0;n<a.length;++n)a[n].show=!0;return o}qs.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),c(n)&&e.mode!==ce.SCENE3D){f.fromElements(n.y,n.z,n.x,n);const i=e.mapProjection,o=i.ellipsoid,r=i.unproject(n,v7e);o.cartographicToCartesian(r,n)}return n},qs.prototype.drillPick=function(e,t,n,i,o){const r=this;return MJ(n,function(){const l=r.pick(e,t,i,o);if(c(l))return{object:l,position:void 0,exclude:!1}}).map(function(l){return l.object})};const FJ=new f,I7e=new f;function D7e(e,t,n){this.ray=e,this.width=t,this.tilesets=n,this.ready=!1;const i=this;this.promise=new Promise(o=>{i._completePick=()=>{o()}})}function BJ(e,t,n,i){const o=t.direction,r=f.mostOrthogonalAxis(o,FJ),s=f.cross(o,r,FJ),a=f.cross(o,s,I7e);return i.position=t.origin,i.direction=o,i.up=a,i.right=s,i.frustum.width=g(n,NJ),i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function P7e(e,t,n){const i=t.frameState,{ray:o,width:r,tilesets:s}=n,a=e._pickOffscreenView.camera,l=BJ(0,o,r,a),u=f7e;u.camera=a,u.cullingVolume=l;let d=!0;const h=s.length;for(let m=0;m<h;++m){const _=s[m];_.show&&t.primitives.contains(_)&&(_.updateForPass(i,u),d=d&&u.ready)}return d&&n._completePick(),d}function kJ(e,t,n){for(let i=0;i<e.length;++i){const o=e.get(i);o.show&&(c(o.isCesium3DTileset)?(!c(t)||-1===t.indexOf(o))&&n.push(o):o instanceof Zg&&kJ(o,t,n))}}function JD(e,t,n,i,o,r){const s=[];if(kJ(t.primitives,i,s),0===s.length)return Promise.resolve(r());const a=new D7e(n,o,s);return e._mostDetailedRayPicks.push(a),a.promise.then(function(){return r()})}function O7e(e,t){return!(!c(e)||!c(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function UJ(e,t,n,i,o,r,s,a){return MJ(i,function(){return function R7e(e,t,n,i,o,r,s){const{context:a,frameState:l}=t,u=a.uniformState,d=e._pickOffscreenView;t.view=d,BJ(0,n,o,d.camera),Va=Vt.clone(d.viewport,Va);const h=d.pickFramebuffer.begin(Va,d.viewport);let m;t.jobScheduler.disableThisFrame(),t.updateFrameState(),l.invertClassification=!1,l.passes.pick=!0,l.passes.offscreen=!0,l.tilesetPassState=s?h7e:$D,u.update(l),t.updateEnvironment(),t.updateAndExecuteCommands(h,QD),t.resolveFramebuffers(h);const _=d.pickFramebuffer.end(Va);if(t.context.depthTexture){const p=d.frustumCommandsList.length;for(let y=0;y<p;++y){const x=e.getPickDepth(t,y).getDepth(a,0,0);if(c(x)&&x>0&&x<1){const C=d.frustumCommandsList[y],w=C.near*(0!==y?t.opaqueFrustumNearOffset:1);m=ii.getPoint(n,w+x*(C.far-w));break}}}if(t.view=t.defaultView,a.endFrame(),c(_)||c(m))return{object:_,position:m,exclude:!c(m)&&r||O7e(_,i)}}(e,t,n,o,r,s,a)})}function Xb(e,t,n,i,o,r,s){const a=UJ(e,t,n,1,i,o,r,s);if(a.length>0)return a[0]}function zJ(e,t,n,i,o,r,s,a){return UJ(e,t,n,i,o,r,s,a)}function e1(e,t){return new Promise((n,i)=>{t.then(function(o){const r=e.postRender.addEventListener(function(){r(),n(o)});e.requestRender()}).catch(function(o){i(o)})})}qs.prototype.updateMostDetailedRayPicks=function(e){const t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)P7e(this,e,t[n])&&t.splice(n--,1)},qs.prototype.pickFromRay=function(e,t,n,i){if(A.defined("ray",t),e.mode!==ce.SCENE3D)throw new E("Ray intersections are only supported in 3D mode.");return Xb(this,e,t,n,i,!1,!1)},qs.prototype.drillPickFromRay=function(e,t,n,i,o){if(A.defined("ray",t),e.mode!==ce.SCENE3D)throw new E("Ray intersections are only supported in 3D mode.");return zJ(this,e,t,n,i,o,!1,!1)},qs.prototype.pickFromRayMostDetailed=function(e,t,n,i){if(A.defined("ray",t),e.mode!==ce.SCENE3D)throw new E("Ray intersections are only supported in 3D mode.");const o=this;return t=ii.clone(t),n=c(n)?n.slice():n,e1(e,JD(o,e,t,n,i,function(){return Xb(o,e,t,n,i,!1,!0)}))},qs.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,o){if(A.defined("ray",t),e.mode!==ce.SCENE3D)throw new E("Ray intersections are only supported in 3D mode.");const r=this;return t=ii.clone(t),i=c(i)?i.slice():i,e1(e,JD(r,e,t,i,o,function(){return zJ(r,e,t,n,i,o,!1,!0)}))};const L7e=new f,N7e=new f,M7e=new ii,VJ=new Ce;function X3(e,t){const n=e.ellipsoid,i=vo._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,N7e),r=Ce.toCartesian(t,n,L7e),s=M7e;s.origin=r,s.direction=o;const a=new ii;return ii.getPoint(s,i,a.origin),f.negate(o,a.direction),a}function HJ(e,t){return X3(e,Ce.fromCartesian(t,e.ellipsoid,VJ))}function GJ(e,t){return Ce.fromCartesian(t,e.ellipsoid,VJ).height}function F7e(e,t,n,i,o){const r=X3(t,n);return JD(e,t,r,i,o,function(){const s=Xb(e,t,r,i,o,!0,!0);if(c(s))return GJ(t,s.position)})}function B7e(e,t,n,i,o,r){const s=HJ(t,n);return JD(e,t,s,i,o,function(){const a=Xb(e,t,s,i,o,!0,!0);if(c(a))return f.clone(a.position,r)})}qs.prototype.sampleHeight=function(e,t,n,i){if(A.defined("position",t),e.mode!==ce.SCENE3D)throw new E("sampleHeight is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new E("sampleHeight requires depth texture support. Check sampleHeightSupported.");const r=Xb(this,e,X3(e,t),n,i,!0,!1);if(c(r))return GJ(e,r.position)},qs.prototype.clampToHeight=function(e,t,n,i,o){if(A.defined("cartesian",t),e.mode!==ce.SCENE3D)throw new E("clampToHeight is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new E("clampToHeight requires depth texture support. Check clampToHeightSupported.");const s=Xb(this,e,HJ(e,t),n,i,!0,!1);if(c(s))return f.clone(s.position,o)},qs.prototype.sampleHeightMostDetailed=function(e,t,n,i){if(A.defined("positions",t),e.mode!==ce.SCENE3D)throw new E("sampleHeightMostDetailed is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new E("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");n=c(n)?n.slice():n;const o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=F7e(this,e,t[s],n,i);return e1(e,Promise.all(r).then(function(s){const a=s.length;for(let l=0;l<a;++l)t[l].height=s[l];return t}))},qs.prototype.clampToHeightMostDetailed=function(e,t,n,i){if(A.defined("cartesians",t),e.mode!==ce.SCENE3D)throw new E("clampToHeightMostDetailed is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new E("clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.");n=c(n)?n.slice():n;const o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=B7e(this,e,t[s],n,i,t[s]);return e1(e,Promise.all(r).then(function(s){const a=s.length;for(let l=0;l<a;++l)t[l]=s[l];return t}))},qs.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};const k7e=qs,Z3="#define SAMPLES 8\n\nuniform float delta;\nuniform float sigma;\nuniform float direction; // 0.0 for x direction, 1.0 for y direction\n\nuniform sampler2D colorTexture;\n\n#ifdef USE_STEP_SIZE\nuniform float stepSize;\n#else\nuniform vec2 step;\n#endif\n\nin vec2 v_textureCoordinates;\n\n// Incremental Computation of the Gaussian:\n// https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html\n\nvoid main()\n{\n vec2 st = v_textureCoordinates;\n vec2 dir = vec2(1.0 - direction, direction);\n\n#ifdef USE_STEP_SIZE\n vec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));\n#else\n vec2 step = step;\n#endif\n\n vec3 g;\n g.x = 1.0 / (sqrt(czm_twoPi) * sigma);\n g.y = exp((-0.5 * delta * delta) / (sigma * sigma));\n g.z = g.y * g.y;\n\n vec4 result = texture(colorTexture, st) * g.x;\n for (int i = 1; i < SAMPLES; ++i)\n {\n g.xy *= g.yz;\n\n vec2 offset = float(i) * dir * step;\n result += texture(colorTexture, st - offset) * g.x;\n result += texture(colorTexture, st + offset) * g.x;\n }\n\n out_FragColor = result;\n}\n";function Qg(){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 $o,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new V,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}function jJ(e){const t=e._framebuffers;if(!c(t))return;const 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 WJ(e){const t=e._commands;if(!c(t))return;const n=t.length;for(let i=0;i<n;++i)t[i].shaderProgram.destroy();e._commands=void 0}function oYe(e,t){let n;if(0===t)n={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{const 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 rYe(e,t){let n="uniform sampler2D colorTexture; \nin vec2 v_textureCoordinates; \nfloat sampleTexture(vec2 offset) { \n";return n+=0===e?" vec4 color = texture(colorTexture, v_textureCoordinates + offset); \n return czm_luminance(color.rgb); \n":" return texture(colorTexture, v_textureCoordinates + offset).r; \n",n+="}\n\n",n+="uniform vec2 colorTextureDimensions; \nuniform vec2 minMaxLuminance; \nuniform sampler2D previousLuminance; \nvoid main() { \n float color = 0.0; \n float xStep = 1.0 / colorTextureDimensions.x; \n float yStep = 1.0 / colorTextureDimensions.y; \n int count = 0; \n for (int i = 0; i < 3; ++i) { \n for (int j = 0; j < 3; ++j) { \n vec2 offset; \n offset.x = -xStep + float(i) * xStep; \n offset.y = -yStep + float(j) * yStep; \n if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { \n continue; \n } \n color += sampleTexture(offset); \n ++count; \n } \n } \n if (count > 0) { \n color /= float(count); \n } \n",e===t-1&&(n+=" float previous = texture(previousLuminance, vec2(0.5)).r; \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n color = previous + (color - previous) / (60.0 * 1.5); \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n"),n+=" out_FragColor = vec4(color); \n} \n",n}Object.defineProperties(Qg.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){const e=this._framebuffers;if(c(e))return e[e.length-1].getColorTexture(0)}}}),Qg.prototype.clear=function(e){const t=this._framebuffers;if(!c(t))return;let n=this._clearCommand;c(n)||(n=this._clearCommand=new ar({color:new Z(0,0,0,0),framebuffer:void 0}));const i=t.length;for(let o=0;o<i;++o)t[o].clear(e,n)},Qg.prototype.update=function(e){const t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,function iYe(e,t){jJ(e);let n=e._width,i=e._height;const o=t.halfFloatingPointTexture?yt.HALF_FLOAT:yt.FLOAT,r=Math.ceil(Math.log(Math.max(n,i))/Math.log(3)),s=new Array(r);for(let l=0;l<r;++l)n=Math.max(Math.ceil(n/3),1),i=Math.max(Math.ceil(i/3),1),s[l]=new $o,s[l].update(t,n,i,1,o);const a=s[r-1].getColorTexture(0);e._previousLuminance.update(t,a.width,a.height,1,o),e._framebuffers=s}(this,e),function sYe(e,t){WJ(e);const n=e._framebuffers,i=n.length,o=new Array(i);for(let r=0;r<i;++r)o[r]=t.createViewportQuadCommand(rYe(r,i),{framebuffer:n[r].framebuffer,uniformMap:oYe(e,r)});e._commands=o}(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;const 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},Qg.prototype.execute=function(e,t){this._colorTexture=t;const n=this._commands;if(!c(n))return;const i=n.length;for(let o=0;o<i;++o)n[o].execute(e)},Qg.prototype.isDestroyed=function(){return!1},Qg.prototype.destroy=function(){return jJ(this),WJ(this),Xe(this)};const aYe=Qg;function ey(e){const t=(e=g(e,g.EMPTY_OBJECT)).fragmentShader,n=g(e.textureScale,1),i=g(e.pixelFormat,Ct.RGBA);if(A.typeOf.string("options.fragmentShader",t),A.typeOf.number.greaterThan("options.textureScale",n,0),A.typeOf.number.lessThanOrEquals("options.textureScale",n,1),!Ct.isColorFormat(i))throw new E("options.pixelFormat must be a color format.");this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=n,this._forcePowerOfTwo=g(e.forcePowerOfTwo,!1),this._sampleMode=g(e.sampleMode,0),this._pixelFormat=i,this._pixelDatatype=g(e.pixelDatatype,yt.UNSIGNED_BYTE),this._clearColor=g(e.clearColor,Z.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;const o=new Vg;o.scissorTest={enabled:!0,rectangle:c(e.scissorRectangle)?Vt.clone(e.scissorRectangle):new Vt},this._passState=o,this._ready=!1;let r=e.name;c(r)||(r=kr()),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(ey.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(c(this._textureCache)){const e=this._textureCache.getFramebuffer(this._name);if(c(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}}});const cYe=/uniform\s+sampler2D\s+depthTexture/g;function lYe(e,t,n){const i=t[n];return("string"==typeof i||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof HTMLVideoElement||i instanceof ImageData)&&e._dirtyUniforms.push(n),{get:function(){return t[n]},set:function(o){const r=t[n];t[n]=o;const s=e._actualUniforms,a=s[n];c(a)&&a!==r&&a instanceof Mn&&!c(e._textureCache.getStageByName(n))&&(e._texturesToRelease.push(a),delete s[n],delete s[`${n}Dimensions`]),r instanceof Mn&&e._texturesToRelease.push(r),"string"==typeof o||o instanceof HTMLCanvasElement||o instanceof HTMLImageElement||o instanceof HTMLVideoElement||o instanceof ImageData?e._dirtyUniforms.push(n):s[n]=o}}}function uYe(e,t){return function(){const n=e._actualUniforms[t];return"function"==typeof n?n():n}}function dYe(e,t){return function(){const n=e[t]();if(c(n))return n.dimensions}}function mYe(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function _Ye(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function qJ(e){c(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();const t=e._textureCache;if(!c(t))return;const n=e._uniforms,i=e._actualUniforms;for(const o in i)i.hasOwnProperty(o)&&i[o]instanceof Mn&&(c(t.getStageByName(n[o]))||i[o].destroy(),e._dirtyUniforms.push(o))}ey.prototype._isSupported=function(e){return!cYe.test(this._fragmentShader)||e.depthTexture},ey.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&qJ(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=function yYe(e){let t=c(e._selected)?e._selected.length:0;const n=c(e._parentSelected)?e._parentSelected:0;let i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,e._combinedSelected=c(e._selected)&&c(e._parentSelected)?e._selected.concat(e._parentSelected):c(e._parentSelected)?e._parentSelected:e._selected,!i&&c(e._combinedSelected)){if(!c(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}(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=c(this._selected)?this._selected.length:0,this._parentSelectedLength=c(this._parentSelected)?this._parentSelected.length:0,function bYe(e,t){if(!e._selectedDirty)return;e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;const n=e._combinedSelected;if(!c(n))return;let i,o,r=0;const s=n.length;for(i=0;i<s;++i)o=n[i],c(o.pickIds)?r+=o.pickIds.length:c(o.pickId)&&++r;if(0===s||0===r){const d=new Uint8Array(4);return d[0]=255,d[1]=255,d[2]=255,d[3]=255,void(e._selectedIdTexture=new Mn({context:t,pixelFormat:Ct.RGBA,pixelDatatype:yt.UNSIGNED_BYTE,source:{arrayBufferView:d,width:1,height:1},sampler:vi.NEAREST}))}let a,l=0;const u=new Uint8Array(4*r);for(i=0;i<s;++i)if(o=n[i],c(o.pickIds)){const d=o.pickIds,h=d.length;for(let m=0;m<h;++m)a=d[m].color,u[l]=Z.floatToByte(a.red),u[l+1]=Z.floatToByte(a.green),u[l+2]=Z.floatToByte(a.blue),u[l+3]=Z.floatToByte(a.alpha),l+=4}else c(o.pickId)&&(a=o.pickId.color,u[l]=Z.floatToByte(a.red),u[l+1]=Z.floatToByte(a.green),u[l+2]=Z.floatToByte(a.blue),u[l+3]=Z.floatToByte(a.alpha),l+=4);e._selectedIdTexture=new Mn({context:t,pixelFormat:Ct.RGBA,pixelDatatype:yt.UNSIGNED_BYTE,source:{arrayBufferView:u,width:r,height:1},sampler:vi.NEAREST})}(this,e),function fYe(e){if(c(e._uniformMap))return;const t={},n={},i=e._uniforms,o=e._actualUniforms;for(const r in i)if(i.hasOwnProperty(r)){"function"!=typeof i[r]?(t[r]=uYe(e,r),n[r]=lYe(e,i,r)):(t[r]=i[r],n[r]=i[r]),o[r]=i[r];const s=t[r]();("string"==typeof s||s instanceof Mn||s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement)&&(t[`${r}Dimensions`]=dYe(t,r))}e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=Pn(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}})}(this),function gYe(e,t){let n,i,o;const r=e._texturesToRelease;let s=r.length;for(n=0;n<s;++n)i=r[n],i=i&&i.destroy();r.length=0;const a=e._texturesToCreate;for(s=a.length,n=0;n<s;++n){const h=a[n];o=h.name,e._actualUniforms[o]=new Mn({context:t,source:h.source})}a.length=0;const l=e._dirtyUniforms;if(0===l.length&&!c(e._texturePromise))return void(e._ready=!0);if(0===l.length||c(e._texturePromise))return;s=l.length;const u=e._uniforms,d=[];for(n=0;n<s;++n){o=l[n];const h=u[o],m=e._textureCache.getStageByName(h);if(c(m))e._actualUniforms[o]=_Ye(e,h);else if("string"==typeof h){const _=new zt({url:h});d.push(_.fetchImage().then(mYe(e,o)))}else e._texturesToCreate.push({name:o,source:h})}l.length=0,d.length>0?(e._ready=!1,e._texturePromise=Promise.all(d).then(function(){e._ready=!0,e._texturePromise=void 0})):e._ready=!0}(this,e),function hYe(e,t){if(c(e._command)&&!e._logDepthChanged&&!e._selectedDirty)return;let n=e._fragmentShader;if(c(e._selectedIdTexture)){const o=e._selectedIdTexture.width;n=n.replace(/in\s+vec2\s+v_textureCoordinates;/g,""),n=`#define CZM_SELECTED_FEATURE \nuniform sampler2D czm_idTexture; \nuniform sampler2D czm_selectedIdTexture; \nuniform float czm_selectedIdTextureStep; \nin vec2 v_textureCoordinates; \nbool czm_selected(vec2 offset) \n{ \n bool selected = false;\n vec4 id = texture(czm_idTexture, v_textureCoordinates + offset); \n for (int i = 0; i < ${o}; ++i) \n { \n vec4 selectedId = texture(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5)); \n if (all(equal(id, selectedId))) \n { \n return true; \n } \n } \n return false; \n} \n\nbool czm_selected() \n{ \n return czm_selected(vec2(0.0)); \n} \n\n${n}`}const i=new St({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}(this,e),function pYe(e){let n,i;1===e._sampleMode?(n=Kn.LINEAR,i=Jr.LINEAR):(n=Kn.NEAREST,i=Jr.NEAREST);const o=e._sampler;(!c(o)||o.minificationFilter!==n||o.magnificationFilter!==i)&&(e._sampler=new vi({wrapS:zi.CLAMP_TO_EDGE,wrapT:zi.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}(this),this._selectedDirty=!1,!this._ready))return;const n=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=n,!c(n))return;const i=n.getColorTexture(0);let o;(i.width!==e.drawingBufferWidth||i.height!==e.drawingBufferHeight)&&(o=this._renderState,(!c(o)||i.width!==o.viewport.width||i.height!==o.viewport.height)&&(this._renderState=Lt.fromCache({viewport:new Vt(0,0,i.width,i.height)}))),this._command.renderState=o},ey.prototype.execute=function(e,t,n,i){if(!(c(this._command)&&c(this._command.framebuffer)&&this._ready&&this._enabled))return;this._colorTexture=t,this._depthTexture=n,this._idTexture=i,vi.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler);const o=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;c(o)&&(o.context=e),this._command.execute(e,o)},ey.prototype.isDestroyed=function(){return!1},ey.prototype.destroy=function(){return qJ(this),Xe(this)};const Wo=ey;function ty(e){e=g(e,g.EMPTY_OBJECT),A.defined("options.stages",e.stages),A.typeOf.number.greaterThan("options.stages.length",e.stages.length,0),this._stages=e.stages,this._inputPreviousStageTexture=g(e.inputPreviousStageTexture,!0);let t=e.name;c(t)||(t=kr()),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(ty.prototype,{ready:{get:function(){const 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){const 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}}}),ty.prototype._isSupported=function(e){const t=this._stages,n=t.length;for(let i=0;i<n;++i)if(!t[i]._isSupported(e))return!1;return!0},ty.prototype.get=function(e){return A.typeOf.number.greaterThanOrEquals("index",e,0),A.typeOf.number.lessThan("index",e,this.length),this._stages[e]},ty.prototype.update=function(e,t){this._selectedDirty=function TYe(e){let t=c(e._selected)?e._selected.length:0;const n=c(e._parentSelected)?e._parentSelected:0;let i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,e._combinedSelected=c(e._selected)&&c(e._parentSelected)?e._selected.concat(e._parentSelected):c(e._parentSelected)?e._parentSelected:e._selected,!i&&c(e._combinedSelected)){if(!c(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}(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=c(this._selected)?this._selected.length:0,this._parentSelectedLength=c(this._parentSelected)?this._parentSelected.length:0;const n=this._stages,i=n.length;for(let o=0;o<i;++o){const r=n[o];this._selectedDirty&&(r.parentSelected=this._combinedSelected),r.update(e,t)}},ty.prototype.isDestroyed=function(){return!1},ty.prototype.destroy=function(){const e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return Xe(this)};const Cf=ty,wr={};function t1(e){const o=`#define USE_STEP_SIZE\n${Z3}`,r=new Wo({name:`${e}_x_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:1}),s=new Wo({name:`${e}_y_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:1}),a={};return Object.defineProperties(a,{delta:{get:function(){return r.uniforms.delta},set:function(l){r.uniforms.delta=s.uniforms.delta=l}},sigma:{get:function(){return r.uniforms.sigma},set:function(l){r.uniforms.sigma=s.uniforms.sigma=l}},stepSize:{get:function(){return r.uniforms.stepSize},set:function(l){r.uniforms.stepSize=s.uniforms.stepSize=l}}}),new Cf({name:e,stages:[r,s],uniforms:a})}wr.createBlurStage=function(){return t1("czm_blur")},wr.createDepthOfFieldStage=function(){const e=t1("czm_depth_of_field_blur"),t=new Wo({name:"czm_depth_of_field_composite",fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\nuniform float focalDistance;\n\nin vec2 v_textureCoordinates;\n\nvec4 toEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera = posInCamera / posInCamera.w;\n return posInCamera;\n}\n\nfloat computeDepthBlur(float depth)\n{\n float f;\n if (depth < focalDistance)\n {\n f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);\n }\n else\n {\n f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);\n f = pow(f, 0.1);\n }\n f *= f;\n f = clamp(f, 0.0, 1.0);\n return pow(f, 0.5);\n}\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 posInCamera = toEye(v_textureCoordinates, depth);\n float d = computeDepthBlur(-posInCamera.z);\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), d);\n}\n",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 Cf({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})},wr.isDepthOfFieldSupported=function(e){return e.context.depthTexture},wr.createEdgeDetectionStage=function(){const e=kr();return new Wo({name:`czm_edge_detection_${e}`,fragmentShader:"uniform sampler2D depthTexture;\nuniform float length;\nuniform vec4 color;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n float directions[3];\n directions[0] = -1.0;\n directions[1] = 0.0;\n directions[2] = 1.0;\n\n float scalars[3];\n scalars[0] = 3.0;\n scalars[1] = 10.0;\n scalars[2] = 3.0;\n\n float padx = czm_pixelRatio / czm_viewport.z;\n float pady = czm_pixelRatio / czm_viewport.w;\n\n#ifdef CZM_SELECTED_FEATURE\n bool selected = false;\n for (int i = 0; i < 3; ++i)\n {\n float dir = directions[i];\n selected = selected || czm_selected(vec2(-padx, dir * pady));\n selected = selected || czm_selected(vec2(padx, dir * pady));\n selected = selected || czm_selected(vec2(dir * padx, -pady));\n selected = selected || czm_selected(vec2(dir * padx, pady));\n if (selected)\n {\n break;\n }\n }\n if (!selected)\n {\n out_FragColor = vec4(color.rgb, 0.0);\n return;\n }\n#endif\n\n float horizEdge = 0.0;\n float vertEdge = 0.0;\n\n for (int i = 0; i < 3; ++i)\n {\n float dir = directions[i];\n float scale = scalars[i];\n\n horizEdge -= texture(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;\n horizEdge += texture(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;\n\n vertEdge -= texture(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;\n vertEdge += texture(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;\n }\n\n float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);\n out_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);\n}\n",uniforms:{length:.25,color:Z.clone(Z.BLACK)}})},wr.isEdgeDetectionSupported=function(e){return e.context.depthTexture},wr.createSilhouetteStage=function(e){const t=function AYe(e){if(!c(e))return wr.createEdgeDetectionStage();const t=new Cf({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),n={};let i="",o="";for(let a=0;a<e.length;++a)i+=`uniform sampler2D edgeTexture${a}; \n`,o+=` vec4 edge${a} = texture(edgeTexture${a}, v_textureCoordinates); \n if (edge${a}.a > 0.0) \n { \n color = edge${a}; \n break; \n } \n`,n[`edgeTexture${a}`]=e[a].name;const s=new Wo({name:"czm_edge_detection_combine",fragmentShader:`${i}in vec2 v_textureCoordinates; \nvoid main() { \n vec4 color = vec4(0.0); \n for (int i = 0; i < ${e.length}; i++) \n { \n${o} } \n out_FragColor = color; \n} \n`,uniforms:n});return new Cf({name:"czm_edge_detection_composite",stages:[t,s]})}(e),n=new Wo({name:"czm_silhouette_color_edges",fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D silhouetteTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 silhouetteColor = texture(silhouetteTexture, v_textureCoordinates);\n vec4 color = texture(colorTexture, v_textureCoordinates);\n out_FragColor = mix(color, silhouetteColor, silhouetteColor.a);\n}\n",uniforms:{silhouetteTexture:t.name}});return new Cf({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})},wr.isSilhouetteSupported=function(e){return e.context.depthTexture},wr.createBloomStage=function(){const e=new Wo({name:"czm_bloom_contrast_bias",fragmentShader:"uniform sampler2D colorTexture;\nuniform float contrast;\nuniform float brightness;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 sceneColor = texture(colorTexture, v_textureCoordinates).xyz;\n sceneColor = czm_RGBToHSB(sceneColor);\n sceneColor.z += brightness;\n sceneColor = czm_HSBToRGB(sceneColor);\n\n float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));\n sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);\n out_FragColor = vec4(sceneColor, 1.0);\n}\n",uniforms:{contrast:128,brightness:-.3}}),t=t1("czm_bloom_blur"),n=new Cf({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new Wo({name:"czm_bloom_generate_composite",fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D bloomTexture;\nuniform bool glowOnly;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 color = texture(colorTexture, v_textureCoordinates);\n\n#ifdef CZM_SELECTED_FEATURE\n if (czm_selected()) {\n out_FragColor = color;\n return;\n }\n#endif\n\n vec4 bloom = texture(bloomTexture, v_textureCoordinates);\n out_FragColor = glowOnly ? bloom : bloom + color;\n}\n",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 Cf({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})},wr.createAmbientOcclusionStage=function(){const e=new Wo({name:"czm_ambient_occlusion_generate",fragmentShader:"uniform sampler2D randomTexture;\nuniform sampler2D depthTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\n\nin vec2 v_textureCoordinates;\n\nvec4 clipToEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\n posEC = posEC / posEC.w;\n return posEC;\n}\n\n//Reconstruct Normal Without Edge Removation\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\n vec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\n vec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\n vec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\n vec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\n\n vec3 up = posInCamera.xyz - posInCameraUp.xyz;\n vec3 down = posInCameraDown.xyz - posInCamera.xyz;\n vec3 left = posInCamera.xyz - posInCameraLeft.xyz;\n vec3 right = posInCameraRight.xyz - posInCamera.xyz;\n\n vec3 DX = length(left) < length(right) ? left : right;\n vec3 DY = length(up) < length(down) ? up : down;\n\n return normalize(cross(DY, DX));\n}\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 posInCamera = clipToEye(v_textureCoordinates, depth);\n\n if (posInCamera.z > frustumLength)\n {\n out_FragColor = vec4(1.0);\n return;\n }\n\n vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\n float depthU = czm_readDepth(depthTexture, v_textureCoordinates - vec2(0.0, pixelSize.y));\n float depthD = czm_readDepth(depthTexture, v_textureCoordinates + vec2(0.0, pixelSize.y));\n float depthL = czm_readDepth(depthTexture, v_textureCoordinates - vec2(pixelSize.x, 0.0));\n float depthR = czm_readDepth(depthTexture, v_textureCoordinates + vec2(pixelSize.x, 0.0));\n vec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\n\n float ao = 0.0;\n vec2 sampleDirection = vec2(1.0, 0.0);\n float gapAngle = 90.0 * czm_radiansPerDegree;\n\n // RandomNoise\n float randomVal = texture(randomTexture, v_textureCoordinates / pixelSize / 255.0).x;\n\n //Loop for each direction\n for (int i = 0; i < 4; i++)\n {\n float newGapAngle = gapAngle * (float(i) + randomVal);\n float cosVal = cos(newGapAngle);\n float sinVal = sin(newGapAngle);\n\n //Rotate Sampling Direction\n vec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\n float localAO = 0.0;\n float localStepSize = stepSize;\n\n //Loop for each step\n for (int j = 0; j < 6; j++)\n {\n vec2 newCoords = v_textureCoordinates + rotatedSampleDirection * localStepSize * pixelSize;\n\n //Exception Handling\n if(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n {\n break;\n }\n\n float stepDepthInfo = czm_readDepth(depthTexture, newCoords);\n vec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\n vec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\n float len = length(diffVec);\n\n if (len > lengthCap)\n {\n break;\n }\n\n float dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\n float weight = len / lengthCap;\n weight = 1.0 - weight * weight;\n\n if (dotVal < bias)\n {\n dotVal = 0.0;\n }\n\n localAO = max(localAO, dotVal * weight);\n localStepSize += stepSize;\n }\n ao += localAO;\n }\n\n ao /= 4.0;\n ao = 1.0 - clamp(ao, 0.0, 1.0);\n ao = pow(ao, intensity);\n out_FragColor = vec4(vec3(ao), 1.0);\n}\n",uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=t1("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;const n=new Cf({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),i=new Wo({name:"czm_ambient_occlusion_composite",fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D ambientOcclusionTexture;\nuniform bool ambientOcclusionOnly;\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 color = texture(colorTexture, v_textureCoordinates);\n vec4 ao = texture(ambientOcclusionTexture, v_textureCoordinates);\n out_FragColor = ambientOcclusionOnly ? ao : ao * color;\n}\n",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 Cf({name:"czm_ambient_occlusion",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})},wr.isAmbientOcclusionSupported=function(e){return e.context.depthTexture},wr.createFXAAStage=function(){return new Wo({name:"czm_FXAA",fragmentShader:"#define FXAA_QUALITY_PRESET 39 \n/**\n * @license\n * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of NVIDIA CORPORATION nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples\n// Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h\n\n// Steps used to integrate into Cesium:\n// * The following defines are set:\n// #define FXAA_PC 1\n// #define FXAA_WEBGL_1 1\n// #define FXAA_GREEN_AS_LUMA 1\n// #define FXAA_EARLY_EXIT 1\n// #define FXAA_GLSL_120 1\n// * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed.\n// * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace\n// /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/.\n// * There are no implicit conversions from ivec* to vec* so replace:\n// #define FxaaInt2 ivec2\n// with\n// #define FxaaInt2 vec2\n// * The texture2DLod function is only available in vertex shaders so replace:\n// #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)\n// #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)\n// with\n// #define FxaaTexTop(t, p) texture(t, p)\n// #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))\n// * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.\n// * The following parameters to FxaaPixelShader are unused and can be removed:\n// fxaaConsolePosPos\n// fxaaConsoleRcpFrameOpt\n// fxaaConsoleRcpFrameOpt2\n// fxaaConsole360RcpFrameOpt2\n// fxaaConsoleEdgeSharpness\n// fxaaConsoleEdgeThreshold\n// fxaaConsoleEdgeThresholdMi\n// fxaaConsole360ConstDir\n\n//\n// Choose the quality preset.\n// This needs to be compiled into the shader as it effects code.\n// Best option to include multiple presets is to\n// in each shader define the preset, then include this file.\n//\n// OPTIONS\n// -----------------------------------------------------------------------\n// 10 to 15 - default medium dither (10=fastest, 15=highest quality)\n// 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)\n// 39 - no dither, very expensive\n//\n// NOTES\n// -----------------------------------------------------------------------\n// 12 = slightly faster then FXAA 3.9 and higher edge quality (default)\n// 13 = about same speed as FXAA 3.9 and better than 12\n// 23 = closest to FXAA 3.9 visually and performance wise\n// _ = the lowest digit is directly related to performance\n// _ = the highest digit is directly related to style\n//\n//#define FXAA_QUALITY_PRESET 12\n\n\n#if (FXAA_QUALITY_PRESET == 10)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 3.0\n #define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 3.0\n #define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 4.0\n #define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 4.0\n #define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 4.0\n #define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 2.0\n #define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 3.0\n #define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n #define FXAA_QUALITY_PS 9\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 4.0\n #define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n #define FXAA_QUALITY_PS 10\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 4.0\n #define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n #define FXAA_QUALITY_PS 11\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 4.0\n #define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.0\n #define FXAA_QUALITY_P2 1.0\n #define FXAA_QUALITY_P3 1.0\n #define FXAA_QUALITY_P4 1.0\n #define FXAA_QUALITY_P5 1.5\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture(t, p)\n#define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))\n\nFxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\n\nFxaaFloat4 FxaaPixelShader(\n //\n // Use noperspective interpolation here (turn off perspective interpolation).\n // {xy} = center of pixel\n FxaaFloat2 pos,\n //\n // Input color texture.\n // {rgb_} = color in linear or perceptual color space\n // if (FXAA_GREEN_AS_LUMA == 0)\n // {___a} = luma in perceptual color space (not linear)\n FxaaTex tex,\n //\n // Only used on FXAA Quality.\n // This must be from a constant/uniform.\n // {x_} = 1.0/screenWidthInPixels\n // {_y} = 1.0/screenHeightInPixels\n FxaaFloat2 fxaaQualityRcpFrame,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_SUBPIX define.\n // It is here now to allow easier tuning.\n // Choose the amount of sub-pixel aliasing removal.\n // This can effect sharpness.\n // 1.00 - upper limit (softer)\n // 0.75 - default amount of filtering\n // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)\n // 0.25 - almost off\n // 0.00 - completely off\n FxaaFloat fxaaQualitySubpix,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.\n // It is here now to allow easier tuning.\n // The minimum amount of local contrast required to apply algorithm.\n // 0.333 - too little (faster)\n // 0.250 - low quality\n // 0.166 - default\n // 0.125 - high quality\n // 0.063 - overkill (slower)\n FxaaFloat fxaaQualityEdgeThreshold,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.\n // It is here now to allow easier tuning.\n // Trims the algorithm from processing darks.\n // 0.0833 - upper limit (default, the start of visible unfiltered edges)\n // 0.0625 - high quality (faster)\n // 0.0312 - visible limit (slower)\n // Special notes when using FXAA_GREEN_AS_LUMA,\n // Likely want to set this to zero.\n // As colors that are mostly not-green\n // will appear very dark in the green channel!\n // Tune by looking at mostly non-green content,\n // then start at zero and increase until aliasing is a problem.\n FxaaFloat fxaaQualityEdgeThresholdMin\n) {\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posM;\n posM.x = pos.x;\n posM.y = pos.y;\n FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n #define lumaM rgbyM.y\n FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\n/*--------------------------------------------------------------------------*/\n FxaaFloat maxSM = max(lumaS, lumaM);\n FxaaFloat minSM = min(lumaS, lumaM);\n FxaaFloat maxESM = max(lumaE, maxSM);\n FxaaFloat minESM = min(lumaE, minSM);\n FxaaFloat maxWN = max(lumaN, lumaW);\n FxaaFloat minWN = min(lumaN, lumaW);\n FxaaFloat rangeMax = max(maxWN, maxESM);\n FxaaFloat rangeMin = min(minWN, minESM);\n FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\n FxaaFloat range = rangeMax - rangeMin;\n FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\n FxaaBool earlyExit = range < rangeMaxClamped;\n/*--------------------------------------------------------------------------*/\n if(earlyExit)\n return rgbyM;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNS = lumaN + lumaS;\n FxaaFloat lumaWE = lumaW + lumaE;\n FxaaFloat subpixRcpRange = 1.0/range;\n FxaaFloat subpixNSWE = lumaNS + lumaWE;\n FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\n FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNESE = lumaNE + lumaSE;\n FxaaFloat lumaNWNE = lumaNW + lumaNE;\n FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\n FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNWSW = lumaNW + lumaSW;\n FxaaFloat lumaSWSE = lumaSW + lumaSE;\n FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\n FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\n FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\n FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\n FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\n FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\n/*--------------------------------------------------------------------------*/\n FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\n FxaaFloat lengthSign = fxaaQualityRcpFrame.x;\n FxaaBool horzSpan = edgeHorz >= edgeVert;\n FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\n/*--------------------------------------------------------------------------*/\n if(!horzSpan) lumaN = lumaW;\n if(!horzSpan) lumaS = lumaE;\n if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\n FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\n/*--------------------------------------------------------------------------*/\n FxaaFloat gradientN = lumaN - lumaM;\n FxaaFloat gradientS = lumaS - lumaM;\n FxaaFloat lumaNN = lumaN + lumaM;\n FxaaFloat lumaSS = lumaS + lumaM;\n FxaaBool pairN = abs(gradientN) >= abs(gradientS);\n FxaaFloat gradient = max(abs(gradientN), abs(gradientS));\n if(pairN) lengthSign = -lengthSign;\n FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posB;\n posB.x = posM.x;\n posB.y = posM.y;\n FxaaFloat2 offNP;\n offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\n offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\n if(!horzSpan) posB.x += lengthSign * 0.5;\n if( horzSpan) posB.y += lengthSign * 0.5;\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posN;\n posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\n posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\n FxaaFloat2 posP;\n posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\n posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\n FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\n FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));\n FxaaFloat subpixE = subpixC * subpixC;\n FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));\n/*--------------------------------------------------------------------------*/\n if(!pairN) lumaNN = lumaSS;\n FxaaFloat gradientScaled = gradient * 1.0/4.0;\n FxaaFloat lumaMM = lumaM - lumaNN * 0.5;\n FxaaFloat subpixF = subpixD * subpixE;\n FxaaBool lumaMLTZero = lumaMM < 0.0;\n/*--------------------------------------------------------------------------*/\n lumaEndN -= lumaNN * 0.5;\n lumaEndP -= lumaNN * 0.5;\n FxaaBool doneN = abs(lumaEndN) >= gradientScaled;\n FxaaBool doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\n FxaaBool doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\n/*--------------------------------------------------------------------------*/\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 3)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 4)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 5)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 6)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 7)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 8)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 9)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 10)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 11)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 12)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n/*--------------------------------------------------------------------------*/\n FxaaFloat dstN = posM.x - posN.x;\n FxaaFloat dstP = posP.x - posM.x;\n if(!horzSpan) dstN = posM.y - posN.y;\n if(!horzSpan) dstP = posP.y - posM.y;\n/*--------------------------------------------------------------------------*/\n FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\n FxaaFloat spanLength = (dstP + dstN);\n FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\n FxaaFloat spanLengthRcp = 1.0/spanLength;\n/*--------------------------------------------------------------------------*/\n FxaaBool directionN = dstN < dstP;\n FxaaFloat dst = min(dstN, dstP);\n FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\n FxaaFloat subpixG = subpixF * subpixF;\n FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\n FxaaFloat subpixH = subpixG * fxaaQualitySubpix;\n/*--------------------------------------------------------------------------*/\n FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\n FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\n if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\n if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\n return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);\n}\n\nin vec2 v_textureCoordinates;\n\nuniform sampler2D colorTexture;\n\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\n\nvoid main()\n{\n vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\n vec4 color = FxaaPixelShader(\n v_textureCoordinates,\n colorTexture,\n fxaaQualityRcpFrame,\n fxaaQualitySubpix,\n fxaaQualityEdgeThreshold,\n fxaaQualityEdgeThresholdMin);\n float alpha = texture(colorTexture, v_textureCoordinates).a;\n out_FragColor = vec4(color.rgb, alpha);\n}\n",sampleMode:1})},wr.createAcesTonemappingStage=function(e){let t=e?"#define AUTO_EXPOSURE\n":"";return t+="uniform sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\nvoid main()\n{\n vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n\n#ifdef AUTO_EXPOSURE\n color /= texture(autoExposure, vec2(0.5)).r;\n#endif\n color = czm_acesTonemapping(color);\n color = czm_inverseGamma(color);\n\n out_FragColor = vec4(color, fragmentColor.a);\n}\n",new Wo({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0}})},wr.createFilmicTonemappingStage=function(e){let t=e?"#define AUTO_EXPOSURE\n":"";return t+="uniform sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See slides 142 and 143:\n// http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting\n\nvoid main()\n{\n vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n\n#ifdef AUTO_EXPOSURE\n float exposure = texture(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n\n\tconst float A = 0.22; // shoulder strength\n\tconst float B = 0.30; // linear strength\n\tconst float C = 0.10; // linear angle\n\tconst float D = 0.20; // toe strength\n\tconst float E = 0.01; // toe numerator\n\tconst float F = 0.30; // toe denominator\n\n\tconst float white = 11.2; // linear white point value\n\n\tvec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;\n\tfloat w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;\n\n\tc = czm_inverseGamma(c / w);\n\tout_FragColor = vec4(c, fragmentColor.a);\n}\n",new Wo({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0}})},wr.createReinhardTonemappingStage=function(e){let t=e?"#define AUTO_EXPOSURE\n":"";return t+="uniform sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See equation 3:\n// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf\n\nvoid main()\n{\n vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\n float exposure = texture(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n color = color / (1.0 + color);\n color = czm_inverseGamma(color);\n out_FragColor = vec4(color, fragmentColor.a);\n}\n",new Wo({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0}})},wr.createModifiedReinhardTonemappingStage=function(e){let t=e?"#define AUTO_EXPOSURE\n":"";return t+="uniform sampler2D colorTexture;\nuniform vec3 white;\n\nin vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See equation 4:\n// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf\n\nvoid main()\n{\n vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\n float exposure = texture(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n color = (color * (1.0 + color / white)) / (1.0 + color);\n color = czm_inverseGamma(color);\n out_FragColor = vec4(color, fragmentColor.a);\n}\n",new Wo({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:Z.WHITE,autoExposure:void 0}})},wr.createAutoExposureStage=function(){return new aYe},wr.createBlackAndWhiteStage=function(){return new Wo({name:"czm_black_and_white",fragmentShader:"uniform sampler2D colorTexture;\nuniform float gradations;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;\n#ifdef CZM_SELECTED_FEATURE\n if (czm_selected()) {\n out_FragColor = vec4(rgb, 1.0);\n return;\n }\n#endif\n float luminance = czm_luminance(rgb);\n float darkness = luminance * gradations;\n darkness = (darkness - fract(darkness)) / gradations;\n out_FragColor = vec4(vec3(darkness), 1.0);\n}\n",uniforms:{gradations:5}})},wr.createBrightnessStage=function(){return new Wo({name:"czm_brightness",fragmentShader:"uniform sampler2D colorTexture;\nuniform float brightness;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;\n vec3 target = vec3(0.0);\n out_FragColor = vec4(mix(target, rgb, brightness), 1.0);\n}\n",uniforms:{brightness:.5}})},wr.createNightVisionStage=function(){return new Wo({name:"czm_night_vision",fragmentShader:"uniform sampler2D colorTexture;\n\nin vec2 v_textureCoordinates;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\n vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;\n vec3 green = vec3(0.0, 1.0, 0.0);\n out_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n}\n"})},wr.createDepthViewStage=function(){return new Wo({name:"czm_depth_view",fragmentShader:"uniform sampler2D depthTexture;\n\nin vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n out_FragColor = vec4(vec3(depth), 1.0);\n}\n"})},wr.createLensFlareStage=function(){return new Wo({name:"czm_lens_flare",fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D dirtTexture;\nuniform sampler2D starTexture;\nuniform vec2 dirtTextureDimensions;\nuniform float distortion;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform float dirtAmount;\nuniform float earthRadius;\nuniform float intensity;\n\nin vec2 v_textureCoordinates;\n\n// whether it is in space or not\n// 6500000.0 is empirical value\n#define DISTANCE_TO_SPACE 6500000.0\n\n// return ndc from world coordinate biased earthRadius\nvec4 getNDCFromWC(vec3 WC, float earthRadius)\n{\n vec4 positionEC = czm_view * vec4(WC, 1.0);\n positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n}\n\n// Check if current pixel is included Earth\n// if then mask it gradually\nfloat isInEarth(vec2 texcoord, vec2 sceneSize)\n{\n vec2 NDC = texcoord * 2.0 - 1.0;\n vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);\n vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);\n NDC.xy -= earthPosSC.xy;\n\n float X = abs(NDC.x) * sceneSize.x;\n float Y = abs(NDC.y) * sceneSize.y;\n\n return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));\n}\n\n// For Chromatic effect\nvec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)\n{\n vec2 sceneSize = czm_viewport.zw;\n vec3 color;\n if(isSpace)\n {\n color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture(tex, texcoord + direction * distortion.r).r;\n color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture(tex, texcoord + direction * distortion.g).g;\n color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture(tex, texcoord + direction * distortion.b).b;\n }\n else\n {\n color.r = texture(tex, texcoord + direction * distortion.r).r;\n color.g = texture(tex, texcoord + direction * distortion.g).g;\n color.b = texture(tex, texcoord + direction * distortion.b).b;\n }\n return vec4(clamp(color, 0.0, 1.0), 0.0);\n}\n\nvoid main(void)\n{\n vec4 originalColor = texture(colorTexture, v_textureCoordinates);\n vec3 rgb = originalColor.rgb;\n bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;\n\n // Sun position\n vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);\n vec4 sunPositionEC = czm_view * sunPos;\n vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);\n sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);\n\n // If sun is not in the screen space, use original color.\n if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))\n {\n // Lens flare is disabled when not in space until #5932 is fixed.\n // https://github.com/CesiumGS/cesium/issues/5932\n out_FragColor = originalColor;\n return;\n }\n\n vec2 texcoord = vec2(1.0) - v_textureCoordinates;\n vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\n vec2 invPixelSize = 1.0 / pixelSize;\n vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);\n\n // ghost vector to image centre:\n vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;\n vec3 direction = normalize(vec3(ghostVec, 0.0));\n\n // sample ghosts:\n vec4 result = vec4(0.0);\n vec4 ghost = vec4(0.0);\n for (int i = 0; i < 4; ++i)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n // Only bright spots from the centre of the source image\n ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);\n }\n result += ghost;\n\n // sample halo\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weightForHalo = pow(1.0 - weightForHalo, 5.0);\n\n result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;\n\n // dirt on lens\n vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;\n if (dirtTexCoords.x > 1.0)\n {\n dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);\n }\n if (dirtTexCoords.y > 1.0)\n {\n dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);\n }\n result += dirtAmount * texture(dirtTexture, dirtTexCoords);\n\n // Rotating starburst texture's coordinate\n // dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0))\n float camrot = czm_view[0].z + czm_view[1].y;\n float cosValue = cos(camrot);\n float sinValue = sin(camrot);\n mat3 rotation = mat3(\n cosValue, -sinValue, 0.0,\n sinValue, cosValue, 0.0,\n 0.0, 0.0, 1.0\n );\n\n vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);\n vec3 st2 = vec3((rotation * st1).xy, 1.0);\n vec3 st3 = st2 * 0.5 + vec3(0.5);\n vec2 lensStarTexcoord = st3.xy;\n float weightForLensFlare = length(vec3(sunPos.xy, 0.0));\n float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);\n\n if (!isSpace)\n {\n result *= oneMinusWeightForLensFlare * intensity * 0.2;\n }\n else\n {\n result *= oneMinusWeightForLensFlare * intensity;\n result *= texture(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;\n }\n\n result += texture(colorTexture, v_textureCoordinates);\n\n out_FragColor = result;\n}\n",uniforms:{dirtTexture:Jn("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:Jn("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:he.WGS84.maximumRadius}})};const Lm=wr;function Wh(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function iE(e){for(;c(e.length);)e=e.get(e.length-1);return e.name}function $3(e,t,n,i,o){if(!i.enabled||!i._isSupported(t))return o;const r=n[i.name]={};c(o)&&(r[iE(e.getStageByName(o))]=!0);const s=i.uniforms;if(c(s)){const a=Object.getOwnPropertyNames(s),l=a.length;for(let u=0;u<l;++u){const d=s[a[u]];if("string"==typeof d){const h=e.getStageByName(d);c(h)&&(r[iE(h)]=!0)}}}return i.name}function oE(e,t,n,i,o){if(c(i.enabled)&&!i.enabled||c(i._isSupported)&&!i._isSupported(t))return o;const r=o,s=!c(i.inputPreviousStageTexture)||i.inputPreviousStageTexture;let a=o;const l=i.length;for(let h=0;h<l;++h){const m=i.get(h);a=c(m.length)?oE(e,t,n,m,o):$3(e,t,n,m,o),s&&(o=a)}let u,d;if(s)for(u=1;u<l;++u)d=iE(i.get(u)),c(n[d])||(n[d]={}),n[d][r]=!0;else for(u=1;u<l;++u){d=iE(i.get(u));const h=n[d];for(let m=0;m<u;++m)h[iE(i.get(m))]=!0}return a}function EYe(e,t,n){const o=e._collection.getStageByName(t),r=o._textureScale,s=o._forcePowerOfTwo,a=o._pixelFormat,l=o._pixelDatatype,u=o._clearColor;let d,h;const m=e._framebuffers,_=m.length;for(d=0;d<_;++d){if(h=m[d],r!==h.textureScale||s!==h.forcePowerOfTwo||a!==h.pixelFormat||l!==h.pixelDatatype||!Z.equals(u,h.clearColor))continue;const p=h.stages,y=p.length;let b=!1;for(let x=0;x<y;++x)if(n[p[x]]){b=!0;break}if(!b)break}return c(h)&&d<_?(h.stages.push(t),h):(h={textureScale:r,forcePowerOfTwo:s,pixelFormat:a,pixelDatatype:l,clearColor:u,stages:[t],buffer:new $o({pixelFormat:a,pixelDatatype:l}),clear:void 0},m.push(h),h)}function K3(e){const t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}Wh.prototype.updateDependencies=function(){this._updateDependencies=!0},Wh.prototype.update=function(e){const t=this._collection,n=this._updateDependencies,i=c(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),o=c(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),r=c(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),s=c(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),a=!c(t._activeStages)||t._activeStages.length>0||i||o||r||s;if((n||!a&&this._framebuffers.length>0)&&(K3(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!a)return;0===this._framebuffers.length&&function wYe(e,t){const n=function CYe(e,t){const n={};if(c(e.ambientOcclusion)){const o=e.bloom,r=e._tonemapping,s=e.fxaa;let a=oE(e,t,n,e.ambientOcclusion,void 0);a=oE(e,t,n,o,a),a=$3(e,t,n,r,a),a=oE(e,t,n,e,a),$3(e,t,n,s,a)}else oE(e,t,n,e,void 0);return n}(e._collection,t);for(const i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=EYe(e,i,n[i]))}(this,e);const l=e.drawingBufferWidth,u=e.drawingBufferHeight;!n&&this._width===l&&this._height===u||(this._width=l,this._height=u,this._updateDependencies=!1,K3(this),function SYe(e,t){const n=e._width,i=e._height,o=e._framebuffers,r=o.length;for(let s=0;s<r;++s){const a=o[s],l=a.textureScale;let u=Math.ceil(n*l),d=Math.ceil(i*l),h=Math.min(u,d);a.forcePowerOfTwo&&(O.isPowerOfTwo(h)||(h=O.nextPowerOfTwo(h)),u=h,d=h),a.buffer.update(t,u,d),a.clear=new ar({color:a.clearColor,framebuffer:a.buffer.framebuffer})}}(this,e))},Wh.prototype.clear=function(e){const t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)},Wh.prototype.getStageByName=function(e){return this._collection.getStageByName(e)},Wh.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)},Wh.prototype.getFramebuffer=function(e){const t=this._stageNameToFramebuffer[e];if(c(t))return t.buffer.framebuffer},Wh.prototype.isDestroyed=function(){return!1},Wh.prototype.destroy=function(){return K3(this),Xe(this)};const YJ=Wh,rE={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===rE.REINHARD||e===rE.MODIFIED_REINHARD||e===rE.FILMIC||e===rE.ACES}},sE=Object.freeze(rE),Q3=[];function uc(){const e=Lm.createFXAAStage(),t=Lm.createAmbientOcclusionStage(),n=Lm.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=Lm.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=sE.ACES;const i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;const o=new YJ(this),r={},s=Q3;for(s.push(e,t,n,i);s.length>0;){const l=s.pop();r[l.name]=l,l._textureCache=o;const u=l.length;if(c(u))for(let d=0;d<u;++d)s.push(l.get(d))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;const 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}function J3(e){if(!e._stagesRemoved)return;e._stagesRemoved=!1;const t=[],n=e._stages,i=n.length;for(let o=0,r=0;o<i;++o){const s=n[o];s&&(s._index=r++,t.push(s))}e._stages=t}function ny(e){for(;c(e.length);)e=e.get(e.length-1);return e.outputTexture}function Ef(e,t,n,i,o){if(c(e.execute))return void e.execute(t,n,i,o);const r=e.length;let s;if(e.inputPreviousStageTexture)for(Ef(e.get(0),t,n,i,o),s=1;s<r;++s)Ef(e.get(s),t,ny(e.get(s-1)),i,o);else for(s=0;s<r;++s)Ef(e.get(s),t,n,i,o)}Object.defineProperties(uc.prototype,{ready:{get:function(){let e=!1;const t=this._stages;for(let a=t.length-1;a>=0;--a){const l=t[a];e=e||l.ready&&l.enabled}const 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 J3(this),this._stages.length}},outputTexture:{get:function(){const e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);const t=this._stages;for(let s=t.length-1;s>=0;--s){const a=t[s];if(c(a)&&a.ready&&a.enabled)return this.getOutputTexture(a.name)}const i=this._tonemapping;if(i.enabled&&i.ready)return this.getOutputTexture(i.name);const o=this._bloom;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);const r=this._ao;return r.enabled&&r.ready?this.getOutputTexture(r.name):void 0}},hasSelected:{get:function(){const e=this._stages.slice();for(;e.length>0;){const t=e.pop();if(!c(t))continue;if(c(t.selected))return!0;const n=t.length;if(c(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;if(!sE.validate(e))throw new E("tonemapper was set to an invalid value.");c(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());const t=this._autoExposureEnabled;let n;switch(e){case sE.REINHARD:n=Lm.createReinhardTonemappingStage(t);break;case sE.MODIFIED_REINHARD:n=Lm.createModifiedReinhardTonemappingStage(t);break;case sE.FILMIC:n=Lm.createFilmicTonemappingStage(t);break;default:n=Lm.createAcesTonemappingStage(t)}if(t){const i=this._autoExposure;n.uniforms.autoExposure=function(){return i.outputTexture}}this._tonemapper=e,this._tonemapping=n,c(this._stageNames)&&(this._stageNames[n.name]=n,n._textureCache=this._textureCache),this._textureCacheDirty=!0}}}),uc.prototype.add=function(e){A.typeOf.object("stage",e);const t=this._stageNames,n=Q3;for(n.push(e);n.length>0;){const o=n.pop();if(c(t[o.name]))throw new E(`${o.name} has already been added to the collection or does not have a unique name.`);t[o.name]=o,o._textureCache=this._textureCache;const r=o.length;if(c(r))for(let s=0;s<r;++s)n.push(o.get(s))}const i=this._stages;return e._index=i.length,i.push(e),this._textureCacheDirty=!0,e},uc.prototype.remove=function(e){if(!this.contains(e))return!1;const t=this._stageNames,n=Q3;for(n.push(e);n.length>0;){const i=n.pop();delete t[i.name];const o=i.length;if(c(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},uc.prototype.contains=function(e){return c(e)&&c(e._index)&&e._textureCache===this._textureCache},uc.prototype.get=function(e){J3(this);const t=this._stages,n=t.length;return A.typeOf.number.greaterThanOrEquals("stages length",n,0),A.typeOf.number.greaterThanOrEquals("index",e,0),A.typeOf.number.lessThan("index",e,n),t[e]},uc.prototype.removeAll=function(){const e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0},uc.prototype.getStageByName=function(e){return this._stageNames[e]},uc.prototype.update=function(e,t,n){J3(this);const i=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=i;const r=this._stages;let a,l,s=o.length=r.length,u=0;for(a=0;a<s;++a)l=r[a],l.ready&&l.enabled&&l._isSupported(e)&&(o[u++]=l);o.length=u;let d=u!==i.length;if(!d)for(a=0;a<u;++a)if(o[a]!==i[a]){d=!0;break}const h=this._ao,m=this._bloom,_=this._autoExposure,p=this._tonemapping,y=this._fxaa;p.enabled=n;const b=h.enabled&&h._isSupported(e),x=m.enabled&&m._isSupported(e),C=p.enabled&&p._isSupported(e),w=y.enabled&&y._isSupported(e);if((d||this._textureCacheDirty||b!==this._aoEnabled||x!==this._bloomEnabled||C!==this._tonemappingEnabled||w!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=b,this._bloomEnabled=x,this._tonemappingEnabled=C,this._fxaaEnabled=w,this._textureCacheDirty=!1),c(this._randomTexture)&&!b&&(this._randomTexture.destroy(),this._randomTexture=void 0),!c(this._randomTexture)&&b){s=196608;const v=new Uint8Array(s);for(a=0;a<s;a+=3)v[a]=Math.floor(255*Math.random());this._randomTexture=new Mn({context:e,pixelFormat:Ct.RGB,pixelDatatype:yt.UNSIGNED_BYTE,source:{arrayBufferView:v,width:256,height:256},sampler:new vi({wrapS:zi.REPEAT,wrapT:zi.REPEAT,minificationFilter:Kn.NEAREST,magnificationFilter:Jr.NEAREST})})}for(this._textureCache.update(e),y.update(e,t),h.update(e,t),m.update(e,t),p.update(e,t),this._autoExposureEnabled&&_.update(e,t),s=r.length,a=0;a<s;++a)r[a].update(e,t);for(u=0,a=0;a<s;++a)l=r[a],l.ready&&l.enabled&&l._isSupported(e)&&u++;d=u!==o.length,d&&this.update(e,t,n)},uc.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)},uc.prototype.getOutputTexture=function(e){const t=this.getStageByName(e);if(c(t))return ny(t)},uc.prototype.execute=function(e,t,n,i){const o=this._activeStages,r=o.length,s=this._fxaa,a=this._ao,l=this._bloom,u=this._autoExposure,d=this._tonemapping,h=a.enabled&&a._isSupported(e),m=l.enabled&&l._isSupported(e),_=this._autoExposureEnabled,p=d.enabled&&d._isSupported(e),y=s.enabled&&s._isSupported(e);if(!(y||h||m||p||0!==r))return;let b=t;h&&a.ready&&(Ef(a,e,b,n,i),b=ny(a)),m&&l.ready&&(Ef(l,e,b,n,i),b=ny(l)),_&&u.ready&&Ef(u,e,b,n,i),p&&d.ready&&(Ef(d,e,b,n,i),b=ny(d));let x=b;if(r>0){Ef(o[0],e,b,n,i);for(let C=1;C<r;++C)Ef(o[C],e,ny(o[C-1]),n,i);x=ny(o[r-1])}y&&s.ready&&Ef(s,e,x,n,i)},uc.prototype.copy=function(e,t){if(!c(this._copyColorCommand)){const n=this;this._copyColorCommand=e.createViewportQuadCommand(Yg,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)},uc.prototype.isDestroyed=function(){return!1},uc.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(),Xe(this)};const vYe=uc,yu=Object.freeze({SHIFT:0,CTRL:1,ALT:2}),bi=Object.freeze({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});function Nm(e,t,n){const i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;const o=i.getBoundingClientRect();return n.x=t.clientX-o.left,n.y=t.clientY-o.top,n}function ek(e,t){let n=e;return c(t)&&(n+=`+${t}`),n}function iy(e){return e.shiftKey?yu.SHIFT:e.ctrlKey?yu.CTRL:e.altKey?yu.ALT:void 0}const ds={LEFT:0,MIDDLE:1,RIGHT:2};function xl(e,t,n,i){function o(r){i(e,r)}Hn.isInternetExplorer()?n.addEventListener(t,o,!1):n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}const XJ={position:new V};function tk(e){e._lastSeenTouchEvent=Cr()}function nk(e){return Cr()-e._lastSeenTouchEvent>yd.mouseEmulationIgnoreMilliseconds}function ik(e,t,n){const i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function ZJ(e,t){if(!nk(e))return;const n=t.button;let i;if(e._buttonDown[n]=!0,n===ds.LEFT)i=bi.LEFT_DOWN;else if(n===ds.MIDDLE)i=bi.MIDDLE_DOWN;else{if(n!==ds.RIGHT)return;i=bi.RIGHT_DOWN}const o=Nm(e,t,e._primaryPosition);V.clone(o,e._primaryStartPosition),V.clone(o,e._primaryPreviousPosition);const r=iy(t),s=e.getInputAction(i,r);c(s)&&(V.clone(o,XJ.position),s(XJ),t.preventDefault())}const $J={position:new V},KJ={position:new V};function ok(e,t,n,i){const o=iy(i),r=e.getInputAction(t,o),s=e.getInputAction(n,o);if(c(r)||c(s)){const a=Nm(e,i,e._primaryPosition);c(r)&&(V.clone(a,$J.position),r($J)),c(s)&&ik(e._primaryStartPosition,a,e._clickPixelTolerance)&&(V.clone(a,KJ.position),s(KJ))}}function QJ(e,t){if(!nk(e))return;const n=t.button;n!==ds.LEFT&&n!==ds.MIDDLE&&n!==ds.RIGHT||(e._buttonDown[ds.LEFT]&&(ok(e,bi.LEFT_UP,bi.LEFT_CLICK,t),e._buttonDown[ds.LEFT]=!1),e._buttonDown[ds.MIDDLE]&&(ok(e,bi.MIDDLE_UP,bi.MIDDLE_CLICK,t),e._buttonDown[ds.MIDDLE]=!1),e._buttonDown[ds.RIGHT]&&(ok(e,bi.RIGHT_UP,bi.RIGHT_CLICK,t),e._buttonDown[ds.RIGHT]=!1))}const rk={startPosition:new V,endPosition:new V};function JJ(e,t){if(!nk(e))return;const n=iy(t),i=Nm(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(bi.MOUSE_MOVE,n);c(r)&&(V.clone(o,rk.startPosition),V.clone(i,rk.endPosition),r(rk)),V.clone(i,o),(e._buttonDown[ds.LEFT]||e._buttonDown[ds.MIDDLE]||e._buttonDown[ds.RIGHT])&&t.preventDefault()}const eee={position:new V};function PYe(e,t){let i;if(t.button!==ds.LEFT)return;i=bi.LEFT_DOUBLE_CLICK;const o=iy(t),r=e.getInputAction(i,o);c(r)&&(Nm(e,t,eee.position),r(eee))}function OYe(e,t){let n;if(c(t.deltaY)){const r=t.deltaMode;n=r===t.DOM_DELTA_PIXEL?-t.deltaY:r===t.DOM_DELTA_LINE?40*-t.deltaY:120*-t.deltaY}else n=t.detail>0?-120*t.detail:t.wheelDelta;if(!c(n))return;const i=iy(t),o=e.getInputAction(bi.WHEEL,i);c(o)&&(o(n),t.preventDefault())}function RYe(e,t){tk(e);const n=t.changedTouches;let i;const o=n.length;let r,s;const a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.set(s,Nm(e,r,new V));n1(e,t);const l=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,l.set(s,V.clone(a.get(s)))}function tee(e,t){tk(e);const n=t.changedTouches;let i;const o=n.length;let r,s;const a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.remove(s);n1(e,t);const l=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,l.remove(s)}const nee={position:new V},sk={position1:new V,position2:new V},iee={position:new V},oee={position:new V},ree={position:new V};function n1(e,t){const n=iy(t),i=e._positions,o=i.length;let r,s;const a=e._isPinching;if(1!==o&&e._buttonDown[ds.LEFT]&&(e._buttonDown[ds.LEFT]=!1,c(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(bi.LEFT_UP,n),c(r)&&(V.clone(e._primaryPosition,iee.position),r(iee)),0===o&&!e._isTouchHolding&&(s=e.getInputAction(bi.LEFT_CLICK,n),c(s))&&ik(e._primaryStartPosition,e._previousPositions.values[0],e._clickPixelTolerance)&&(V.clone(e._primaryPosition,oee.position),s(oee)),e._isTouchHolding=!1),0===o&&a&&(e._isPinching=!1,r=e.getInputAction(bi.PINCH_END,n),c(r)&&r()),1===o&&!a){const l=i.values[0];V.clone(l,e._primaryPosition),V.clone(l,e._primaryStartPosition),V.clone(l,e._primaryPreviousPosition),e._buttonDown[ds.LEFT]=!0,r=e.getInputAction(bi.LEFT_DOWN,n),c(r)&&(V.clone(l,nee.position),r(nee)),e._touchHoldTimer=setTimeout(function(){!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(bi.RIGHT_CLICK,n),c(s))&&ik(e._primaryStartPosition,e._previousPositions.values[0],e._holdPixelTolerance)&&(V.clone(e._primaryPosition,ree.position),s(ree))},yd.touchHoldDelayMilliseconds),t.preventDefault()}2===o&&!a&&(e._isPinching=!0,r=e.getInputAction(bi.PINCH_START,n),c(r)&&(V.clone(i.values[0],sk.position1),V.clone(i.values[1],sk.position2),r(sk),t.preventDefault()))}function LYe(e,t){tk(e);const n=t.changedTouches;let i;const o=n.length;let r,s;const a=e._positions;for(i=0;i<o;++i){r=n[i],s=r.identifier;const u=a.get(s);c(u)&&Nm(e,r,u)}see(e,t);const l=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,V.clone(a.get(s),l.get(s))}const ak={startPosition:new V,endPosition:new V},aE={distance:{startPosition:new V,endPosition:new V},angleAndHeight:{startPosition:new V,endPosition:new V}};function see(e,t){const n=iy(t),i=e._positions,o=e._previousPositions,r=i.length;let s;if(1===r&&e._buttonDown[ds.LEFT]){const a=i.values[0];V.clone(a,e._primaryPosition);const l=e._primaryPreviousPosition;s=e.getInputAction(bi.MOUSE_MOVE,n),c(s)&&(V.clone(l,ak.startPosition),V.clone(a,ak.endPosition),s(ak)),V.clone(a,l),t.preventDefault()}else if(2===r&&e._isPinching&&(s=e.getInputAction(bi.PINCH_MOVE,n),c(s))){const a=i.values[0],l=i.values[1],u=o.values[0],d=o.values[1],h=l.x-a.x,m=l.y-a.y,_=.25*Math.sqrt(h*h+m*m),p=d.x-u.x,y=d.y-u.y,b=.25*Math.sqrt(p*p+y*y),x=.125*(l.y+a.y),C=.125*(d.y+u.y),w=Math.atan2(m,h),v=Math.atan2(y,p);V.fromElements(0,b,aE.distance.startPosition),V.fromElements(0,_,aE.distance.endPosition),V.fromElements(v,C,aE.angleAndHeight.startPosition),V.fromElements(w,x,aE.angleAndHeight.endPosition),s(aE)}}function NYe(e,t){if(t.target.setPointerCapture(t.pointerId),"touch"===t.pointerType){const n=e._positions,i=t.pointerId;n.set(i,Nm(e,t,new V)),n1(e,t),e._previousPositions.set(i,V.clone(n.get(i)))}else ZJ(e,t)}function aee(e,t){if("touch"===t.pointerType){const i=t.pointerId;e._positions.remove(i),n1(e,t),e._previousPositions.remove(i)}else QJ(e,t)}function MYe(e,t){if("touch"===t.pointerType){const n=e._positions,i=t.pointerId,o=n.get(i);if(!c(o))return;Nm(e,t,o),see(e,t);const r=e._previousPositions;V.clone(n.get(i),r.get(i))}else JJ(e,t)}function yd(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-yd.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new V,this._primaryPosition=new V,this._primaryPreviousPosition=new V,this._positions=new mn,this._previousPositions=new mn,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=g(e,document),function IYe(e){const t=e._element,n=c(t.disableRootEvents)?t:document;let i;Hn.supportsPointerEvents()?(xl(e,"pointerdown",t,NYe),xl(e,"pointerup",t,aee),xl(e,"pointermove",t,MYe),xl(e,"pointercancel",t,aee)):(xl(e,"mousedown",t,ZJ),xl(e,"mouseup",n,QJ),xl(e,"mousemove",n,JJ),xl(e,"touchstart",t,RYe),xl(e,"touchend",n,tee),xl(e,"touchmove",n,LYe),xl(e,"touchcancel",n,tee)),xl(e,"dblclick",t,PYe),i="onwheel"in t?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",xl(e,i,t,OYe)}(this)}yd.prototype.setInputAction=function(e,t,n){if(!c(e))throw new E("action is required.");if(!c(t))throw new E("type is required.");const i=ek(t,n);this._inputEvents[i]=e},yd.prototype.getInputAction=function(e,t){if(!c(e))throw new E("type is required.");const n=ek(e,t);return this._inputEvents[n]},yd.prototype.removeInputAction=function(e,t){if(!c(e))throw new E("type is required.");const n=ek(e,t);delete this._inputEvents[n]},yd.prototype.isDestroyed=function(){return!1},yd.prototype.destroy=function(){return function DYe(e){const t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}(this),Xe(this)},yd.mouseEmulationIgnoreMilliseconds=800,yd.touchHoldDelayMilliseconds=1500;const ck=yd;function oy(e){A.typeOf.object("scene",e),this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}oy.prototype.completeMorph=function(){c(this._completeMorph)&&this._completeMorph()},oy.prototype.morphTo2D=function(e,t){c(this._completeMorph)&&this._completeMorph();const n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof $n,this._previousMode!==ce.SCENE2D&&this._previousMode!==ce.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,ce.SCENE2D,!0),n._mode=ce.MORPHING,n.camera._setTransform(k.IDENTITY),this._previousMode===ce.COLUMBUS_VIEW?function pXe(e,t){t*=.5;const n=e._scene,i=n.camera,o=f.clone(i.position,rXe),r=f.clone(i.direction,sXe),s=f.clone(i.up,aXe),a=f.negate(f.UNIT_Z,cXe),l=f.clone(f.UNIT_Y,lXe),u=fk;if(t>0)f.clone(f.ZERO,fk),u.z=5*n.ellipsoid.maximumRadius;else{f.clone(o,fk);const b=dXe;k.multiplyByPoint(nr.TRANSFORM_2D,o,b.origin),k.multiplyByPointAsVector(nr.TRANSFORM_2D,r,b.direction);const x=n.globe;if(c(x)){const C=x.pickWorldCoordinates(b,n,!0,fXe);c(C)&&(k.multiplyByPoint(nr.TRANSFORM_2D_INVERSE,C,u),u.z+=f.distance(o,u))}}const d=uXe;d.right=.5*u.z,d.left=-d.right,d.top=d.right*(n.drawingBufferHeight/n.drawingBufferWidth),d.bottom=-d.top;const h=hXe;h.position=u,h.direction=a,h.up=l,h.frustum=d;const m=Aee(h);function p(b,x){b.position.z=x}cE(e,m);const y=n.tweens.add({duration:t,easingFunction:Vc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function _(b){bu(o,u,b.time,i.position),bu(r,a,b.time,i.direction),bu(s,l,b.time,i.up),f.cross(i.direction,i.up,i.right),f.normalize(i.right,i.right),i._adjustOrthographicFrustum(!0)},complete:function(){mee(e,t,h,p,m)}});e._currentTweens.push(y)}(this,e):function AXe(e,t,n){const i=e._scene,o=i.camera,r=mXe;if((t*=.5)>0)f.clone(f.ZERO,r.position),r.position.z=5*n.maximumRadius,f.negate(f.UNIT_Z,r.direction),f.clone(f.UNIT_Y,r.up);else{n.cartesianToCartographic(o.positionWC,_ee),i.mapProjection.project(_ee,r.position),f.negate(f.UNIT_Z,r.direction),f.clone(f.UNIT_Y,r.up);const h=yXe;f.clone(r.position2D,h.origin);const m=f.clone(o.directionWC,h.direction),_=n.scaleToGeodeticSurface(o.positionWC,TXe),p=In.eastNorthUpToFixedFrame(_,n,bXe);k.inverseTransformation(p,p),k.multiplyByPointAsVector(p,m,m),k.multiplyByPointAsVector(nr.TRANSFORM_2D,m,m);const y=i.globe;if(c(y)){const b=y.pickWorldCoordinates(h,i,!0,gXe);if(c(b)){const x=f.distance(r.position2D,b);b.x+=x,f.clone(b,r.position2D)}}}function s(h,m){h.position.x=m}k.multiplyByPoint(nr.TRANSFORM_2D,r.position,r.position2D),k.multiplyByPointAsVector(nr.TRANSFORM_2D,r.direction,r.direction2D),k.multiplyByPointAsVector(nr.TRANSFORM_2D,r.up,r.up2D);const a=r.frustum;a.right=.5*r.position.z,a.left=-a.right,a.top=a.right*(i.drawingBufferHeight/i.drawingBufferWidth),a.bottom=-a.top;const l=_Xe;k.multiplyByPoint(nr.TRANSFORM_2D_INVERSE,r.position2D,l.position),f.clone(r.direction,l.direction),f.clone(r.up,l.up),l.frustum=a;const u=Aee(l);cE(e,u),yee(e,t,r,function d(){mee(e,t,r,s,u)})}(this,e,t),0===e&&c(this._completeMorph)&&this._completeMorph())};const FYe=new f,BYe=new f,kYe=new f,UYe=new f,zYe=new f,VYe=new f,HYe=new f,GYe=new Ce,jYe=new k,WYe=new Lo,qYe=new $n,YYe={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};oy.prototype.morphToColumbusView=function(e,t){c(this._completeMorph)&&this._completeMorph();const n=this._scene;if(this._previousMode=n.mode,this._previousMode===ce.COLUMBUS_VIEW||this._previousMode===ce.MORPHING)return;this._scene.morphStart.raiseEvent(this,this._previousMode,ce.COLUMBUS_VIEW,!0),n.camera._setTransform(k.IDENTITY);let i=FYe;const o=BYe,r=kYe;if(e>0)i.x=0,i.y=-1,i.z=1,i=f.multiplyByScalar(f.normalize(i,i),5*t.maximumRadius,i),f.negate(f.normalize(i,o),o),f.cross(f.UNIT_X,o,r);else{const u=n.camera;if(this._previousMode===ce.SCENE2D)f.clone(u.position,i),i.z=u.frustum.right-u.frustum.left,f.negate(f.UNIT_Z,o),f.clone(f.UNIT_Y,r);else{f.clone(u.positionWC,i),f.clone(u.directionWC,o),f.clone(u.upWC,r);const d=t.scaleToGeodeticSurface(i,HYe),h=In.eastNorthUpToFixedFrame(d,t,jYe);k.inverseTransformation(h,h),n.mapProjection.project(t.cartesianToCartographic(i,GYe),i),k.multiplyByPointAsVector(h,o,o),k.multiplyByPointAsVector(h,r,r)}}let s;this._morphToOrthographic?(s=qYe,s.width=n.camera.frustum.right-n.camera.frustum.left,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(s=WYe,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,s.fov=O.toRadians(60));const a=YYe;a.position=i,a.direction=o,a.up=r,a.frustum=s;const l=function CXe(e){return function(t){const n=t._scene;n._mode=ce.COLUMBUS_VIEW,n.morphTime=ce.getMorphTime(ce.COLUMBUS_VIEW),i1(t);const i=n.camera;(t._previousModeMode!==ce.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,f.clone(e.position,i.position),f.clone(e.direction,i.direction),f.clone(e.up,i.up),f.cross(i.direction,i.up,i.right),f.normalize(i.right,i.right));const o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);const r=c(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,ce.COLUMBUS_VIEW,r)}}(a);cE(this,l),this._previousMode===ce.SCENE2D?function xXe(e,t,n,i){t*=.5;const o=e._scene,r=o.camera,s=f.clone(n.position,dk),a=f.clone(n.direction,hee),l=f.clone(n.up,pee);function u(){r.frustum=n.frustum.clone();const d=f.clone(r.position,uee),h=f.clone(r.direction,dee),m=f.clone(r.up,fee);d.z=s.z;const p=o.tweens.add({duration:t,easingFunction:Vc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function _(y){bu(d,s,y.time,r.position),bu(h,a,y.time,r.direction),bu(m,l,y.time,r.up),f.cross(r.direction,r.up,r.right),f.normalize(r.right,r.right)},complete:function(){i(e)}});e._currentTweens.push(p)}o._mode=ce.MORPHING,e._morphToOrthographic?u():gee(e,0,n,u)}(this,e,a,l):(a.position2D=k.multiplyByPoint(nr.TRANSFORM_2D,i,UYe),a.direction2D=k.multiplyByPointAsVector(nr.TRANSFORM_2D,o,zYe),a.up2D=k.multiplyByPointAsVector(nr.TRANSFORM_2D,r,VYe),n._mode=ce.MORPHING,yee(this,e,a,l)),0===e&&c(this._completeMorph)&&this._completeMorph()};const lk={position:new f,direction:new f,up:new f,frustum:void 0},cee=new Lo;function cE(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new ck(e._scene.canvas);const n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,bi.LEFT_DOWN),e._morphHandler.setInputAction(n,bi.MIDDLE_DOWN),e._morphHandler.setInputAction(n,bi.RIGHT_DOWN),e._morphHandler.setInputAction(n,bi.WHEEL)}}function i1(e){const 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()}oy.prototype.morphTo3D=function(e,t){c(this._completeMorph)&&this._completeMorph();const n=this._scene;if(this._previousMode=n.mode,this._previousMode!==ce.SCENE3D&&this._previousMode!==ce.MORPHING){if(this._scene.morphStart.raiseEvent(this,this._previousMode,ce.SCENE3D,!0),n._mode=ce.MORPHING,n.camera._setTransform(k.IDENTITY),this._previousMode===ce.SCENE2D)!function oXe(e,t,n){const i=e._scene,o=i.camera;let r,s;(t/=3)>0?(r=lk,f.fromDegrees(0,0,5*n.maximumRadius,n,r.position),f.negate(r.position,r.direction),f.normalize(r.direction,r.direction),f.clone(f.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=lee(e,n)),e._morphToOrthographic?(s=iXe,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.width=o.frustum.right-o.frustum.left):(s=cee,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.fov=O.toRadians(60)),r.frustum=s;const a=Tee(r);let l;cE(e,a),l=e._morphToOrthographic?function(){uk(e,t,r,a)}:function(){gee(e,t,r,function(){uk(e,t,r,a)})},t>0?(i._mode=ce.SCENE2D,o.flyTo({duration:t,destination:f.fromDegrees(0,0,5*n.maximumRadius,n,dk),complete:function(){i._mode=ce.MORPHING,l()}})):l()}(this,e,t);else{let i,o;e>0?(i=lk,f.fromDegrees(0,0,5*t.maximumRadius,t,i.position),f.negate(i.position,i.direction),f.normalize(i.direction,i.direction),f.clone(f.UNIT_Z,i.up)):i=lee(this,t);const r=n.camera;r.frustum instanceof $n?o=r.frustum.clone():(o=cee,o.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,o.fov=O.toRadians(60)),i.frustum=o;const s=Tee(i);cE(this,s),uk(this,e,i,s)}0===e&&c(this._completeMorph)&&this._completeMorph()}},oy.prototype.isDestroyed=function(){return!1},oy.prototype.destroy=function(){return i1(this),Xe(this)};const XYe=new Ce,ZYe=new f,$Ye=new k;function lee(e,t){const n=e._scene,i=n.camera,o=lk,r=o.position,s=o.direction,a=o.up,l=n.mapProjection.unproject(i.position,XYe);t.cartographicToCartesian(l,r);const u=t.scaleToGeodeticSurface(r,ZYe),d=In.eastNorthUpToFixedFrame(u,t,$Ye);return k.multiplyByPointAsVector(d,i.direction,s),k.multiplyByPointAsVector(d,i.up,a),o}const KYe=new f,QYe=new f,JYe=new f,eXe=new f,tXe=new f,nXe=new f;function uk(e,t,n,i){t*=.5;const o=e._scene,r=o.camera,s=f.clone(r.position,KYe),a=f.clone(r.direction,QYe),l=f.clone(r.up,JYe),u=k.multiplyByPoint(nr.TRANSFORM_2D_INVERSE,n.position,eXe),d=k.multiplyByPointAsVector(nr.TRANSFORM_2D_INVERSE,n.direction,tXe),h=k.multiplyByPointAsVector(nr.TRANSFORM_2D_INVERSE,n.up,nXe),_=o.tweens.add({duration:t,easingFunction:Vc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function m(p){bu(s,u,p.time,r.position),bu(a,d,p.time,r.direction),bu(l,h,p.time,r.up),f.cross(r.direction,r.up,r.right),f.normalize(r.right,r.right)},complete:function(){bee(e,o,0,1,t,i)}});e._currentTweens.push(_)}const iXe=new $n,uee=new f,dee=new f,fee=new f,dk=new f,hee=new f,pee=new f;function bu(e,t,n,i){return f.lerp(e,t,n,i)}function mee(e,t,n,i,o){const r=e._scene,s=r.camera;if(s.frustum instanceof $n)return;const a=s.frustum.fov,l=.5*O.RADIANS_PER_DEGREE,u=n.position.z*Math.tan(.5*a);s.frustum.far=u/Math.tan(.5*l)+1e7;const h=r.tweens.add({duration:t,easingFunction:Vc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function d(m){s.frustum.fov=O.lerp(a,l,m.time);const _=u/Math.tan(.5*s.frustum.fov);i(s,_)},complete:function(){s.frustum=n.frustum.clone(),o(e)}});e._currentTweens.push(h)}const rXe=new f,sXe=new f,aXe=new f,fk=new f,cXe=new f,lXe=new f,uXe=new Qa,dXe=new ii,fXe=new f,hXe={position:void 0,direction:void 0,up:void 0,frustum:void 0},_ee=new Ce,mXe={position:new f,direction:new f,up:new f,position2D:new f,direction2D:new f,up2D:new f,frustum:new Qa},_Xe={position:new f,direction:new f,up:new f,frustum:void 0},gXe=new f,yXe=new ii,bXe=new k,TXe=new f;function gee(e,t,n,i){const o=e._scene,r=o.camera,s=r.frustum.right-r.frustum.left;r.frustum=n.frustum.clone();const a=r.frustum.fov,l=.5*O.RADIANS_PER_DEGREE,u=s*Math.tan(.5*a);r.frustum.far=u/Math.tan(.5*l)+1e7,r.frustum.fov=l;const h=o.tweens.add({duration:t,easingFunction:Vc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function d(m){r.frustum.fov=O.lerp(l,a,m.time),r.position.z=u/Math.tan(.5*r.frustum.fov)},complete:function(){i(e)}});e._currentTweens.push(h)}function yee(e,t,n,i){const o=e._scene,r=o.camera,s=f.clone(r.position,uee),a=f.clone(r.direction,dee),l=f.clone(r.up,fee),u=f.clone(n.position2D,dk),d=f.clone(n.direction2D,hee),h=f.clone(n.up2D,pee),_=o.tweens.add({duration:t,easingFunction:Vc.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function m(p){bu(s,u,p.time,r.position),bu(a,d,p.time,r.direction),bu(l,h,p.time,r.up),f.cross(r.direction,r.up,r.right),f.normalize(r.right,r.right),r._adjustOrthographicFrustum(!0)},complete:function(){bee(e,o,1,0,t,i)}});e._currentTweens.push(_)}function bee(e,t,n,i,o,r){const s={object:t,property:"morphTime",startValue:n,stopValue:i,duration:o,easingFunction:Vc.QUARTIC_OUT};c(r)&&(s.complete=function(){r(e)});const a=t.tweens.addProperty(s);e._currentTweens.push(a)}function Tee(e){return function(t){const n=t._scene;n._mode=ce.SCENE3D,n.morphTime=ce.getMorphTime(ce.SCENE3D),i1(t);const i=n.camera;(t._previousMode!==ce.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,f.clone(e.position,i.position),f.clone(e.direction,i.direction),f.clone(e.up,i.up),f.cross(i.direction,i.up,i.right),f.normalize(i.right,i.right),i.frustum=e.frustum.clone());const o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);const r=c(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,ce.SCENE3D,r)}}function Aee(e){return function(t){const n=t._scene;n._mode=ce.SCENE2D,n.morphTime=ce.getMorphTime(ce.SCENE2D),i1(t);const i=n.camera;f.clone(e.position,i.position),i.position.z=2*n.ellipsoid.maximumRadius,f.clone(e.direction,i.direction),f.clone(e.up,i.up),f.cross(i.direction,i.up,i.right),f.normalize(i.right,i.right),i.frustum=e.frustum.clone();const o=c(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,ce.SCENE2D,o)}}const EXe=oy,Ki=Object.freeze({LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4});function Ha(e,t){let n=e;return c(t)&&(n+=`+${t}`),n}function xee(e,t,n){const i=Ha(Ki.PINCH,t),o=e._update,r=e._isDown,s=e._eventStartPosition,a=e._pressTime,l=e._releaseTime;o[i]=!0,r[i]=!1,s[i]=new V;let u=e._movement[i];c(u)||(u=e._movement[i]={}),u.distance={startPosition:new V,endPosition:new V},u.angleAndHeight={startPosition:new V,endPosition:new V},u.prevAngle=0,e._eventHandler.setInputAction(function(d){e._buttonsDown++,r[i]=!0,a[i]=new Date,V.lerp(d.position1,d.position2,.5,s[i])},bi.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[i]=!1,l[i]=new Date},bi.PINCH_END,t),e._eventHandler.setInputAction(function(d){if(r[i]){o[i]?(function wXe(e,t){V.clone(e.distance.startPosition,t.distance.startPosition),V.clone(e.distance.endPosition,t.distance.endPosition),V.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),V.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}(d,u),o[i]=!1,u.prevAngle=u.angleAndHeight.startPosition.x):(V.clone(d.distance.endPosition,u.distance.endPosition),V.clone(d.angleAndHeight.endPosition,u.angleAndHeight.endPosition));let h=u.angleAndHeight.endPosition.x;const m=u.prevAngle,_=2*Math.PI;for(;h>=m+Math.PI;)h-=_;for(;h<m-Math.PI;)h+=_;u.angleAndHeight.endPosition.x=-h*n.clientWidth/12,u.angleAndHeight.startPosition.x=-m*n.clientWidth/12}},bi.PINCH_MOVE,t)}function Cee(e,t){const n=Ha(Ki.WHEEL,t),i=e._pressTime,o=e._releaseTime,r=e._update;r[n]=!0;let s=e._movement[n];c(s)||(s=e._movement[n]={});let a=e._lastMovement[n];c(a)||(a=e._lastMovement[n]={startPosition:new V,endPosition:new V,valid:!1}),s.startPosition=new V,V.clone(V.ZERO,s.startPosition),s.endPosition=new V,e._eventHandler.setInputAction(function(l){const u=7.5*O.toRadians(l);i[n]=o[n]=new Date,s.endPosition.x=0,s.endPosition.y=u,V.clone(s.endPosition,a.endPosition),a.valid=!0,r[n]=!1},bi.WHEEL,t)}function Zb(e,t,n){const i=Ha(n,t),o=e._isDown,r=e._eventStartPosition,s=e._pressTime,a=e._releaseTime;o[i]=!1,r[i]=new V;let u,d,l=e._lastMovement[i];c(l)||(l=e._lastMovement[i]={startPosition:new V,endPosition:new V,valid:!1}),n===Ki.LEFT_DRAG?(u=bi.LEFT_DOWN,d=bi.LEFT_UP):n===Ki.RIGHT_DRAG?(u=bi.RIGHT_DOWN,d=bi.RIGHT_UP):n===Ki.MIDDLE_DRAG&&(u=bi.MIDDLE_DOWN,d=bi.MIDDLE_UP),e._eventHandler.setInputAction(function(h){e._buttonsDown++,l.valid=!1,o[i]=!0,s[i]=new Date,V.clone(h.position,r[i])},u,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[i]=!1,a[i]=new Date},d,t)}function Eee(e,t){V.clone(e.startPosition,t.startPosition),V.clone(e.endPosition,t.endPosition)}function wee(e,t){const n=e._update,i=e._movement,o=e._lastMovement,r=e._isDown;for(const s in Ki)if(Ki.hasOwnProperty(s)){const a=Ki[s];if(c(a)){const l=Ha(a,t);n[l]=!0,c(e._lastMovement[l])||(e._lastMovement[l]={startPosition:new V,endPosition:new V,valid:!1}),c(e._movement[l])||(e._movement[l]={startPosition:new V,endPosition:new V})}}e._eventHandler.setInputAction(function(s){for(const a in Ki)if(Ki.hasOwnProperty(a)){const l=Ki[a];if(c(l)){const u=Ha(l,t);r[u]&&(n[u]?(Eee(i[u],o[u]),o[u].valid=!0,Eee(s,i[u]),n[u]=!1):V.clone(s.endPosition,i[u].endPosition))}}V.clone(s.endPosition,e._currentMousePosition)},bi.MOUSE_MOVE,t)}function Tu(e){if(!c(e))throw new E("canvas is required.");this._eventHandler=new ck(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new V,Cee(this,void 0),xee(this,void 0,e),Zb(this,void 0,Ki.LEFT_DRAG),Zb(this,void 0,Ki.RIGHT_DRAG),Zb(this,void 0,Ki.MIDDLE_DRAG),wee(this,void 0);for(const t in yu)if(yu.hasOwnProperty(t)){const n=yu[t];c(n)&&(Cee(this,n),xee(this,n,e),Zb(this,n,Ki.LEFT_DRAG),Zb(this,n,Ki.RIGHT_DRAG),Zb(this,n,Ki.MIDDLE_DRAG),wee(this,n))}}Object.defineProperties(Tu.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){const e=!(this._update[Ha(Ki.WHEEL)]&&this._update[Ha(Ki.WHEEL,yu.SHIFT)]&&this._update[Ha(Ki.WHEEL,yu.CTRL)]&&this._update[Ha(Ki.WHEEL,yu.ALT)]);return this._buttonsDown>0||e}}}),Tu.prototype.isMoving=function(e,t){if(!c(e))throw new E("type is required.");const n=Ha(e,t);return!this._update[n]},Tu.prototype.getMovement=function(e,t){if(!c(e))throw new E("type is required.");const n=Ha(e,t);return this._movement[n]},Tu.prototype.getLastMovement=function(e,t){if(!c(e))throw new E("type is required.");const n=Ha(e,t),i=this._lastMovement[n];if(i.valid)return i},Tu.prototype.isButtonDown=function(e,t){if(!c(e))throw new E("type is required.");const n=Ha(e,t);return this._isDown[n]},Tu.prototype.getStartMousePosition=function(e,t){if(!c(e))throw new E("type is required.");if(e===Ki.WHEEL)return this._currentMousePosition;const n=Ha(e,t);return this._eventStartPosition[n]},Tu.prototype.getButtonPressTime=function(e,t){if(!c(e))throw new E("type is required.");const n=Ha(e,t);return this._pressTime[n]},Tu.prototype.getButtonReleaseTime=function(e,t){if(!c(e))throw new E("type is required.");const n=Ha(e,t);return this._releaseTime[n]},Tu.prototype.reset=function(){for(const e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},Tu.prototype.isDestroyed=function(){return!1},Tu.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),Xe(this)};const SXe=Tu;function o1(e,t,n,i,o,r,s,a,l,u){this._tweens=e,this._tweenjs=t,this._startObject=Rt(n),this._stopObject=Rt(i),this._duration=o,this._delay=r,this._easingFunction=s,this._update=a,this._complete=l,this.cancel=u,this.needsStart=!0}function bd(){this._tweens=[]}Object.defineProperties(o1.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}}}),o1.prototype.cancelTween=function(){this._tweens.remove(this)},Object.defineProperties(bd.prototype,{length:{get:function(){return this._tweens.length}}}),bd.prototype.add=function(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.startObject)||!c(e.stopObject))throw new E("options.startObject and options.stopObject are required.");if(!c(e.duration)||e.duration<0)throw new E("options.duration is required and must be positive.");if(0===e.duration)return c(e.complete)&&e.complete(),new o1(this);const t=e.duration/T.SECONDS_PER_MILLISECOND,n=g(e.delay,0),i=n/T.SECONDS_PER_MILLISECOND,o=g(e.easingFunction,Vc.LINEAR_NONE),r=e.startObject,s=new QZ(r);s.to(Rt(e.stopObject),t),s.delay(i),s.easing(o),c(e.update)&&s.onUpdate(function(){e.update(r)}),s.onComplete(g(e.complete,null)),s.repeat(g(e._repeat,0));const a=new o1(this,s,e.startObject,e.stopObject,e.duration,n,o,e.update,e.complete,e.cancel);return this._tweens.push(a),a},bd.prototype.addProperty=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).object,n=e.property,i=e.startValue,o=e.stopValue;if(!c(t)||!c(e.property))throw new E("options.object and options.property are required.");if(!c(t[n]))throw new E("options.object must have the specified property.");if(!c(i)||!c(o))throw new E("options.startValue and options.stopValue are required.");return this.add({startObject:{value:i},stopObject:{value:o},duration:g(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function r(s){t[n]=s.value},complete:e.complete,cancel:e.cancel,_repeat:e._repeat})},bd.prototype.addAlpha=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).material;if(!c(t))throw new E("options.material is required.");const n=[];for(const o in t.uniforms)t.uniforms.hasOwnProperty(o)&&c(t.uniforms[o])&&c(t.uniforms[o].alpha)&&n.push(o);if(0===n.length)throw new E("material has no properties with alpha components.");return this.add({startObject:{alpha:g(e.startValue,0)},stopObject:{alpha:g(e.stopValue,1)},duration:g(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function i(o){const r=n.length;for(let s=0;s<r;++s)t.uniforms[n[s]].alpha=o.alpha},complete:e.complete,cancel:e.cancel})},bd.prototype.addOffsetIncrement=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).material;if(!c(t))throw new E("material is required.");if(!c(t.uniforms.offset))throw new E("material.uniforms must have an offset property.");const n=t.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})},bd.prototype.remove=function(e){if(!c(e))return!1;const t=this._tweens.indexOf(e);return-1!==t&&(e.tweenjs.stop(),c(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0)},bd.prototype.removeAll=function(){const e=this._tweens;for(let t=0;t<e.length;++t){const n=e[t];n.tweenjs.stop(),c(n.cancel)&&n.cancel()}e.length=0},bd.prototype.contains=function(e){return c(e)&&-1!==this._tweens.indexOf(e)},bd.prototype.get=function(e){if(!c(e))throw new E("index is required.");return this._tweens[e]},bd.prototype.update=function(e){const t=this._tweens;let n=0;for(e=c(e)?e/T.SECONDS_PER_MILLISECOND:Cr();n<t.length;){const i=t[n],o=i.tweenjs;i.needsStart?(i.needsStart=!1,o.start(e)):o.update(e)?n++:(o.stop(),t.splice(n,1))}};const See=bd;function lE(e){if(!c(e))throw new E("scene is required.");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=Ki.LEFT_DRAG,this.zoomEventTypes=[Ki.RIGHT_DRAG,Ki.WHEEL,Ki.PINCH],this.rotateEventTypes=Ki.LEFT_DRAG,this.tiltEventTypes=[Ki.MIDDLE_DRAG,Ki.PINCH,{eventType:Ki.LEFT_DRAG,modifier:yu.CTRL},{eventType:Ki.RIGHT_DRAG,modifier:yu.CTRL}],this.lookEventTypes={eventType:Ki.LEFT_DRAG,modifier:yu.SHIFT};const t=g(e.ellipsoid,he.default);this.minimumPickingTerrainHeight=he.WGS84.equals(t)?15e4:.025*t.minimumRadius,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumPickingTerrainDistanceWithInertia=he.WGS84.equals(t)?4e3:63e-5*t.minimumRadius,this.minimumCollisionTerrainHeight=he.WGS84.equals(t)?15e3:.0025*t.minimumRadius,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=he.WGS84.equals(t)?75e5:1.175*t.minimumRadius,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._scene=e,this._globe=void 0,this._ellipsoid=t,this._lastGlobeHeight=0,this._aggregator=new SXe(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 See,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new V(-1,-1),this._tiltCenter=new f,this._rotateMousePosition=new V(-1,-1),this._rotateStartPosition=new f,this._strafeStartPosition=new f,this._strafeMousePosition=new V,this._strafeEndMousePosition=new V,this._zoomMouseStart=new V(-1,-1),this._zoomWorldPosition=new f,this._useZoomWorldPosition=!1,this._panLastMousePosition=new V,this._panLastWorldPosition=new f,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,this._maxCoord=e.mapProjection.project(new Ce(Math.PI,O.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=2e-4,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}const DXe=.4;function PXe(e,t,n,i,o,r,s){let a=r[s];c(a)||(a=r[s]={startPosition:new V,endPosition:new V,motion:new V,inertiaEnabled:!0});const l=e.getButtonPressTime(t,n),u=e.getButtonReleaseTime(t,n),d=l&&u&&(u.getTime()-l.getTime())/1e3,m=u&&((new Date).getTime()-u.getTime())/1e3;if(l&&u&&d<DXe){const _=function vXe(e,t){return e<0?0:Math.exp(-25*(1-t)*e)}(m,i),p=e.getLastMovement(t,n);if(!c(p)||function IXe(e){return V.equalsEpsilon(e.startPosition,e.endPosition,O.EPSILON14)}(p)||!a.inertiaEnabled||(a.motion.x=.5*(p.endPosition.x-p.startPosition.x),a.motion.y=.5*(p.endPosition.y-p.startPosition.y),a.startPosition=V.clone(p.startPosition,a.startPosition),a.endPosition=V.multiplyByScalar(a.motion,_,a.endPosition),a.endPosition=V.add(a.startPosition,a.endPosition,a.endPosition),isNaN(a.endPosition.x)||isNaN(a.endPosition.y)||V.distance(a.startPosition,a.endPosition)<.5))return;e.isButtonDown(t,n)||o(r,e.getStartMousePosition(t,n),a)}}function OXe(e,t){if(c(t)){let n=e[t];c(n)&&(n.inertiaEnabled=!0);const i=e._inertiaDisablers[t];if(c(i)){const o=i.length;for(let r=0;r<o;++r)n=e[i[r]],c(n)&&(n.inertiaEnabled=!1)}}}const vee=[];function dc(e,t,n,i,o,r){if(!c(n))return;const s=e._aggregator;Array.isArray(n)||(vee[0]=n,n=vee);const a=n.length;for(let l=0;l<a;++l){const u=n[l],d=c(u.eventType)?u.eventType:u,h=u.modifier,m=s.isMoving(d,h)&&s.getMovement(d,h),_=s.getStartMousePosition(d,h);e.enableInputs&&t&&(m?(i(e,_,m),OXe(e,r)):o<1&&PXe(s,d,h,o,i,e,r))}}const r1=new ii,RXe=new f,LXe=new V,NXe=new f,MXe=new V,FXe=new f,BXe=new f,kXe=new f,UXe=new f,Iee=new f,zXe=new f,VXe=new f,HXe=new f,GXe=new f,jXe=new f,WXe=new f,qXe=new f,YXe=new f,XXe=new f,ZXe=new f,ry=new f,Dee=new f,Pee=new f,hk={orientation:new Wy};function pk(e,t,n,i,o,r){let s=1;c(r)&&(s=O.clamp(Math.abs(r),.25,1));const a=n.endPosition.y-n.startPosition.y,u=a>0?e.minimumZoomDistance*s:0,d=e.maximumZoomDistance;let m=i*(o-u);m=O.clamp(m,e._minimumZoomRate,e._maximumZoomRate);let _=a/e._scene.canvas.clientHeight;_=Math.min(_,e.maximumMovementRatio);let p=m*_;if(e.enableCollisionDetection||0===e.minimumZoomDistance||!c(e._globe)){if(p>0&&Math.abs(o-u)<1||p<0&&Math.abs(o-d)<1)return;o-p<u?p=o-u-1:o-p>d&&(p=o-d)}const y=e._scene,b=y.camera,x=y.mode,C=hk.orientation;if(C.heading=b.heading,C.pitch=b.pitch,C.roll=b.roll,b.frustum instanceof $n)return void(Math.abs(p)>0&&(b.zoomIn(p),b._adjustOrthographicFrustum(!0)));const w=g(n.inertiaEnabled,V.equals(t,e._zoomMouseStart));let P,v=e._zoomingOnVector,I=e._rotatingZoom;if(w||(e._zoomMouseStart=V.clone(t,e._zoomMouseStart),c(e._globe)&&x===ce.SCENE2D?(P=b.getPickRay(t,r1).origin,P=f.fromElements(P.y,P.z,P.x)):c(e._globe)&&(P=qh(e,t,RXe)),c(P)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=f.clone(P,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,v=e._zoomingOnVector=!1,I=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),!e._useZoomWorldPosition)return void b.zoomIn(p);let N=x===ce.COLUMBUS_VIEW;if(b.positionCartographic.height<2e6&&(I=!0),!w||I){if(x===ce.SCENE2D){const R=e._zoomWorldPosition,B=b.position;if(!f.equals(R,B)&&b.positionCartographic.height<2*e._maxCoord.x){const F=b.position.x,S=f.subtract(R,B,NXe);f.normalize(S,S);const D=f.distance(R,B)*p/(.5*b.getMagnitude());b.move(S,.5*D),(b.position.x<0&&F>0||b.position.x>0&&F<0)&&(P=b.getPickRay(t,r1).origin,P=f.fromElements(P.y,P.z,P.x),e._zoomWorldPosition=f.clone(P,e._zoomWorldPosition))}}else if(x===ce.SCENE3D){const R=f.normalize(b.position,Iee);if(e._cameraUnderground||e._zoomingUnderground||b.positionCartographic.height<3e3&&Math.abs(f.dot(b.direction,R))<.6)N=!0;else{const B=y.canvas,F=MXe;F.x=B.clientWidth/2,F.y=B.clientHeight/2;const S=qh(e,F,FXe);if(c(S))if(b.positionCartographic.height<1e6){if(!(f.dot(b.direction,R)>=-.5)){const D=VXe;f.clone(b.position,D);const L=e._zoomWorldPosition;let M=zXe;if(M=f.normalize(L,M),f.dot(M,R)<0)return;const U=ZXe,z=jXe;f.clone(b.direction,z),f.add(D,f.multiplyByScalar(z,1e3,ry),U);const G=WXe,W=qXe;f.subtract(L,D,G),f.normalize(G,W);const q=f.dot(R,W);if(q>=0)return void(e._zoomMouseStart.x=-1);const j=Math.acos(-q),Q=f.magnitude(D),Y=f.magnitude(L),ne=Q-p,X=f.magnitude(G),me=Math.asin(O.clamp(X/Y*Math.sin(j),-1,1))-Math.asin(O.clamp(ne/Y*Math.sin(j),-1,1))+j,Se=HXe;f.normalize(D,Se);let fe=GXe;fe=f.cross(W,Se,fe),fe=f.normalize(fe,fe),f.normalize(f.cross(Se,fe,ry),z),f.multiplyByScalar(f.normalize(U,ry),f.magnitude(U)-p,U),f.normalize(D,D),f.multiplyByScalar(D,ne,D);const ye=YXe;f.multiplyByScalar(f.add(f.multiplyByScalar(Se,Math.cos(me)-1,Dee),f.multiplyByScalar(z,Math.sin(me),Pee),ry),ne,ye),f.add(D,ye,D),f.normalize(U,Se),f.normalize(f.cross(Se,fe,ry),z);const ve=XXe;return f.multiplyByScalar(f.add(f.multiplyByScalar(Se,Math.cos(me)-1,Dee),f.multiplyByScalar(z,Math.sin(me),Pee),ry),f.magnitude(U),ve),f.add(U,ve,U),f.clone(D,b.position),f.normalize(f.subtract(U,D,ry),b.direction),f.clone(b.direction,b.direction),f.cross(b.direction,b.up,b.right),f.cross(b.right,b.direction,b.up),void b.setView(hk)}N=!0}else{const D=f.normalize(S,BXe),L=f.normalize(e._zoomWorldPosition,kXe),M=f.dot(L,D);if(M>0&&M<1){const U=O.acosClamped(M),z=f.cross(L,D,UXe),G=Math.abs(U)>O.toRadians(20)?.75*b.positionCartographic.height:b.positionCartographic.height-p;b.rotate(z,U*(p/G))}}else N=!0}}e._rotatingZoom=!N}if(!w&&N||v){let R;const B=Pr.worldToWindowCoordinates(y,e._zoomWorldPosition,LXe);R=x!==ce.COLUMBUS_VIEW&&V.equals(t,e._zoomMouseStart)&&c(B)?b.getPickRay(B,r1):b.getPickRay(t,r1);const F=R.direction;(x===ce.COLUMBUS_VIEW||x===ce.SCENE2D)&&f.fromElements(F.y,F.z,F.x,F),b.move(F,p),e._zoomingOnVector=!0}else b.zoomIn(p);e._cameraUnderground||b.setView(hk)}const $Xe=new ii,KXe=new ii,QXe=new f;function JXe(e,t,n){const o=e._scene.camera;let r=o.getPickRay(n.startPosition,$Xe).origin,s=o.getPickRay(n.endPosition,KXe).origin;r=f.fromElements(r.y,r.z,r.x,r),s=f.fromElements(s.y,s.z,s.x,s);const a=f.subtract(r,s,QXe),l=f.magnitude(a);l>0&&(f.normalize(a,a),o.move(a,l))}function Oee(e,t,n){c(n.distance)&&(n=n.distance),pk(e,t,n,e._zoomFactor,e._scene.camera.getMagnitude())}const eZe=new V,tZe=new V;function Ree(e,t,n){if(c(n.angleAndHeight))return void function nZe(e,t,n){let i=e._rotateFactor*e._rotateRateRangeAdjustment;i>e._maximumRotateRate&&(i=e._maximumRotateRate),i<e._minimumRotateRate&&(i=e._minimumRotateRate);const o=e._scene,r=o.camera;let a=(n.endPosition.x-n.startPosition.x)/o.canvas.clientWidth;a=Math.min(a,e.maximumMovementRatio);const l=i*a*Math.PI*4;r.twistRight(l)}(e,0,n.angleAndHeight);const i=e._scene,o=i.camera,r=i.canvas,s=r.clientWidth,a=r.clientHeight;let l=eZe;l.x=2/s*n.startPosition.x-1,l.y=2/a*(a-n.startPosition.y)-1,l=V.normalize(l,l);let u=tZe;u.x=2/s*n.endPosition.x-1,u.y=2/a*(a-n.endPosition.y)-1,u=V.normalize(u,u);let d=O.acosClamped(l.x);l.y<0&&(d=O.TWO_PI-d);let h=O.acosClamped(u.x);u.y<0&&(h=O.TWO_PI-h),o.twistRight(h-d)}const Lee=new ii,oZe=new f,rZe=new f;function qh(e,t,n){const i=e._scene,o=e._globe,r=i.camera;let s;if(i.pickPositionSupported&&(s=i.pickPositionWorldCoordinates(t,oZe)),!c(o))return f.clone(s,n);const a=!e._cameraUnderground,l=r.getPickRay(t,Lee),u=o.pickWorldCoordinates(l,i,a,rZe),d=c(s)?f.distance(s,r.positionWC):Number.POSITIVE_INFINITY,h=c(u)?f.distance(u,r.positionWC):Number.POSITIVE_INFINITY;return f.clone(d<h?s:u,n)}const sZe=new Ce;function s1(e){const n=e._scene,i=n.camera;let r=0;if(n.mode===ce.SCENE3D){const l=e._ellipsoid.cartesianToCartographic(i.position,sZe);c(l)&&(r=l.height)}else r=i.position.z;const s=g(e._scene.globeHeight,0);return Math.abs(s-r)}const aZe=new f;function Nee(e,t){const n=t.origin,i=t.direction,o=s1(e),r=f.normalize(n,aZe);let s=Math.abs(f.dot(r,i));return s=2*Math.max(s,.5),o*s}function Mee(e,t,n,i){let o=f.distance(t.origin,n);const r=s1(e);return o>O.clamp(5*r,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance)&&(o=Math.min(o,r/5),o=Math.max(o,100)),ii.getPoint(t,o,i)}function Fee(e,t,n,i){let o;return c(n)?(o=f.distance(t.origin,n),o>e._maximumUndergroundPickDistance&&(o=s1(e))):o=s1(e),ii.getPoint(t,o,i)}const cZe=new V;function Bee(e,t){const n=t.endPosition,i=V.subtract(t.endPosition,t.startPosition,cZe),o=e._strafeEndMousePosition;V.add(o,i,o),t.endPosition=o,yk(e,t,e._strafeStartPosition),t.endPosition=n}const kee=new ii,lZe=new ii,mk=new f,uZe=new f,dZe=new f,fZe=new f,hZe=new qn(f.UNIT_X,0),pZe=new V,mZe=new V;function _Ze(e,t,n){if(f.equals(t,e._translateMousePosition)||(e._looking=!1),f.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking)return void El(e,0,n);if(e._strafing)return void Bee(e,n);const o=e._scene.camera,r=e._cameraUnderground,s=V.clone(n.startPosition,pZe),a=V.clone(n.endPosition,mZe);let l=o.getPickRay(s,kee);const u=f.clone(f.ZERO,fZe),d=f.UNIT_X;let h;if(o.position.z<e._minimumPickingTerrainHeight&&(h=qh(e,s,mk),c(h)&&(u.x=h.x)),r||u.x>o.position.z&&c(h)){let w=h;return r&&(w=Fee(e,l,h,mk)),V.clone(t,e._strafeMousePosition),V.clone(t,e._strafeEndMousePosition),f.clone(w,e._strafeStartPosition),e._strafing=!0,void yk(e,n,e._strafeStartPosition)}const m=qn.fromPointNormal(u,d,hZe);l=o.getPickRay(s,kee);const _=So.rayPlane(l,m,mk),p=o.getPickRay(a,lZe),y=So.rayPlane(p,m,uZe);if(!c(_)||!c(y))return e._looking=!0,El(e,0,n),void V.clone(t,e._translateMousePosition);const b=f.subtract(_,y,dZe),x=b.x;b.x=b.y,b.y=b.z,b.z=x;const C=f.magnitude(b);C>O.EPSILON6&&(f.normalize(b,b),o.move(b,C))}const Uee=new V,a1=new ii,c1=new f,gZe=new f,zee=new k,yZe=new k,bZe=new f,TZe=new qn(f.UNIT_X,0),_k=new f,gk=new Ce,Vee=new k,AZe=new bt,xZe=new oe,l1=new f;function CZe(e,t,n){if(c(n.angleAndHeight)&&(n=n.angleAndHeight),V.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking)return void El(e,0,n);const o=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(o.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,function EZe(e,t,n){const i=e._scene,o=i.camera,r=i.canvas,s=Uee;s.x=r.clientWidth/2,s.y=r.clientHeight/2;const a=o.getPickRay(s,a1),l=f.UNIT_X,u=a.origin,d=a.direction;let h;const m=f.dot(l,d);if(Math.abs(m)>O.EPSILON6&&(h=-f.dot(l,u)/m),!c(h)||h<=0)return e._looking=!0,El(e,0,n),void V.clone(t,e._tiltCenterMousePosition);const _=f.multiplyByScalar(d,h,c1);f.add(u,_,_);const p=i.mapProjection,y=p.ellipsoid;f.fromElements(_.y,_.z,_.x,_);const b=p.unproject(_,gk);y.cartographicToCartesian(b,_);const x=In.eastNorthUpToFixedFrame(_,y,zee),C=e._globe,w=e._ellipsoid;e._globe=void 0,e._ellipsoid=he.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;const v=k.clone(o.transform,Vee);o._setTransform(x),Cl(e,0,n,f.UNIT_Z),o._setTransform(v),e._globe=C,e._ellipsoid=w;const I=w.maximumRadius;e._rotateFactor=1/I,e._rotateRateRangeAdjustment=I}(e,t,n)):function wZe(e,t,n){const i=e._scene,o=i.camera,r=e._cameraUnderground;let s,a;const l=f.UNIT_X;if(V.equals(t,e._tiltCenterMousePosition))s=f.clone(e._tiltCenter,c1);else{if(o.position.z<e._minimumPickingTerrainHeight&&(s=qh(e,t,c1)),!c(s)){a=o.getPickRay(t,a1);const S=a.origin,D=a.direction;let L;const M=f.dot(l,D);if(Math.abs(M)>O.EPSILON6&&(L=-f.dot(l,S)/M),!c(L)||L<=0)return e._looking=!0,El(e,0,n),void V.clone(t,e._tiltCenterMousePosition);s=f.multiplyByScalar(D,L,c1),f.add(S,s,s)}r&&(c(a)||(a=o.getPickRay(t,a1)),Mee(e,a,s,s)),V.clone(t,e._tiltCenterMousePosition),f.clone(s,e._tiltCenter)}const d=Uee;d.x=i.canvas.clientWidth/2,d.y=e._tiltCenterMousePosition.y,a=o.getPickRay(d,a1);const h=f.clone(f.ZERO,bZe);h.x=s.x;const m=qn.fromPointNormal(h,l,TZe),_=So.rayPlane(a,m,gZe),p=o._projection,y=p.ellipsoid;f.fromElements(s.y,s.z,s.x,s);let b=p.unproject(s,gk);y.cartographicToCartesian(b,s);const x=In.eastNorthUpToFixedFrame(s,y,zee);let C;c(_)?(f.fromElements(_.y,_.z,_.x,_),b=p.unproject(_,gk),y.cartographicToCartesian(b,_),C=In.eastNorthUpToFixedFrame(_,y,yZe)):C=x;const w=e._globe,v=e._ellipsoid;e._globe=void 0,e._ellipsoid=he.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let I=f.UNIT_Z;const P=k.clone(o.transform,Vee);o._setTransform(x);const N=f.cross(f.UNIT_Z,f.normalize(o.position,_k),_k),R=f.dot(o.right,N);if(Cl(e,0,n,I,!1,!0),o._setTransform(C),R<0){const S=n.startPosition.y-n.endPosition.y;(r&&S<0||!r&&S>0)&&(I=void 0);const D=o.constrainedAxis;o.constrainedAxis=void 0,Cl(e,0,n,I,!0,!1),o.constrainedAxis=D}else Cl(e,0,n,I,!0,!1);if(c(o.constrainedAxis)){const S=f.cross(o.direction,o.constrainedAxis,l1);f.equalsEpsilon(S,f.ZERO,O.EPSILON6)||(f.dot(S,o.right)<0&&f.negate(S,S),f.cross(S,o.direction,o.up),f.cross(o.direction,o.up,o.right),f.normalize(o.up,o.up),f.normalize(o.right,o.right))}o._setTransform(P),e._globe=w,e._ellipsoid=v;const B=v.maximumRadius;e._rotateFactor=1/B,e._rotateRateRangeAdjustment=B;const F=f.clone(o.positionWC,_k);if(e.enableCollisionDetection&&wk(e,!0),!f.equals(o.positionWC,F)){o._setTransform(C),o.worldToCameraCoordinatesPoint(F,F);const S=f.magnitudeSquared(F);f.magnitudeSquared(o.position)>S&&(f.normalize(o.position,o.position),f.multiplyByScalar(o.position,Math.sqrt(S),o.position));const D=f.angleBetween(F,o.position),L=f.cross(F,o.position,F);f.normalize(L,L);const M=bt.fromAxisAngle(L,D,AZe),U=oe.fromQuaternion(M,xZe);oe.multiplyByVector(U,o.direction,o.direction),oe.multiplyByVector(U,o.up,o.up),f.cross(o.direction,o.up,o.right),f.cross(o.right,o.direction,o.up),o._setTransform(P)}}(e,t,n)}const Hee=new V,Gee=new ii,jee=new f;function SZe(e,t,n){c(n.distance)&&(n=n.distance);const i=e._scene,o=i.camera,r=i.canvas,s=e._cameraUnderground;let a;s?a=t:(a=Hee,a.x=r.clientWidth/2,a.y=r.clientHeight/2);const l=o.getPickRay(a,Gee),u=l.origin,d=l.direction;let m,_;if(o.position.z<e._minimumPickingTerrainHeight&&(m=qh(e,a,jee)),c(m)&&(_=f.distance(u,m)),s){const p=Nee(e,l);_=c(_)?Math.min(_,p):p}if(!c(_)){const p=f.UNIT_X;_=-f.dot(p,u)/f.dot(p,d)}pk(e,t,n,e._zoomFactor,_)}const IZe=new ii,DZe=new qn(f.UNIT_X,0),PZe=new f,OZe=new f;function yk(e,t,n){const i=e._scene,o=i.camera,r=o.getPickRay(t.endPosition,IZe);let s=f.clone(o.direction,OZe);i.mode===ce.COLUMBUS_VIEW&&f.fromElements(s.z,s.x,s.y,s);const a=qn.fromPointNormal(n,s,DZe),l=So.rayPlane(r,a,PZe);c(l)&&(s=f.subtract(n,l,s),i.mode===ce.COLUMBUS_VIEW&&f.fromElements(s.y,s.z,s.x,s),f.add(o.position,s,o.position))}const Wee=new f,qee=new Ce,bk=new f,Tk=new he,RZe=new f,LZe=new f,NZe=new f;function MZe(e,t,n){const o=e._scene.camera,r=e._cameraUnderground;let a,l,s=e._ellipsoid;if(!k.equals(o.transform,k.IDENTITY))return void Cl(e,0,n);const u=s.geodeticSurfaceNormal(o.position,RZe);if(V.equals(t,e._rotateMousePosition)){if(e._looking)El(e,0,n,u);else if(e._rotating)Cl(e,0,n);else if(e._strafing)Bee(e,n);else{if(f.magnitude(o.position)<f.magnitude(e._rotateStartPosition))return;a=f.magnitude(e._rotateStartPosition),l=bk,l.x=l.y=l.z=a,s=he.fromCartesian3(l,Tk),xk(e,0,n,s)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;const d=s.cartesianToCartographic(o.positionWC,qee).height;if(c(e._globe)&&d<e._minimumPickingTerrainHeight){const m=qh(e,n.startPosition,NZe);if(c(m)){let _=!1;const p=o.getPickRay(n.startPosition,Lee);if(r)_=!0,Fee(e,p,m,m);else{const y=s.geodeticSurfaceNormal(m,LZe);_=Math.abs(f.dot(p.direction,y))<.05||f.magnitude(o.position)<f.magnitude(m)}_?(V.clone(t,e._strafeEndMousePosition),f.clone(m,e._strafeStartPosition),e._strafing=!0,yk(e,n,e._strafeStartPosition)):(a=f.magnitude(m),l=bk,l.x=l.y=l.z=a,s=he.fromCartesian3(l,Tk),xk(e,0,n,s),f.clone(m,e._rotateStartPosition))}else e._looking=!0,El(e,0,n,u)}else c(o.pickEllipsoid(n.startPosition,e._ellipsoid,Wee))?(xk(e,0,n,e._ellipsoid),f.clone(Wee,e._rotateStartPosition)):d>e._minimumTrackBallHeight?(e._rotating=!0,Cl(e,0,n)):(e._looking=!0,El(e,0,n,u));V.clone(t,e._rotateMousePosition)}function Cl(e,t,n,i,o,r){o=g(o,!1),r=g(r,!1);const s=e._scene,a=s.camera,l=s.canvas,u=a.constrainedAxis;c(i)&&(a.constrainedAxis=i);const d=f.magnitude(a.position);let h=e._rotateFactor*(d-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=e._minimumRotateRate);let m=(n.startPosition.x-n.endPosition.x)/l.clientWidth,_=(n.startPosition.y-n.endPosition.y)/l.clientHeight;m=Math.min(m,e.maximumMovementRatio),_=Math.min(_,e.maximumMovementRatio);const p=h*m*Math.PI*2,y=h*_*Math.PI;o||a.rotateRight(p),r||a.rotateUp(y),a.constrainedAxis=u}const Ak=de.clone(de.UNIT_W),Yee=de.clone(de.UNIT_W),u1=new f,$b=new f,d1=new f,Xee=new f,FZe=new V,BZe=new V,kZe=new V,UZe=new V,zZe=new ii;function xk(e,t,n,i){const o=e._scene,r=o.camera,s=V.clone(n.startPosition,FZe),a=V.clone(n.endPosition,BZe),l=i.cartesianToCartographic(r.positionWC,qee).height;let u,d;if(!n.inertiaEnabled&&l<e._minimumPickingTerrainHeight&&(u=f.clone(e._panLastWorldPosition,Ak),!c(e._globe)&&!V.equalsEpsilon(s,e._panLastMousePosition)&&(u=qh(e,s,Ak)),!c(e._globe)&&c(u))){const h=f.subtract(u,r.positionWC,$b),m=f.multiplyByScalar(r.directionWC,f.dot(r.directionWC,h),$b),_=f.magnitude(m),p=r.frustum.getPixelDimensions(o.drawingBufferWidth,o.drawingBufferHeight,_,o.pixelRatio,UZe),y=V.subtract(a,s,kZe),b=f.multiplyByScalar(r.rightWC,y.x*p.x,$b),x=f.normalize(r.positionWC,Iee),C=r.getPickRay(a,zZe).direction,w=f.subtract(C,f.projectVector(C,r.rightWC,d1),d1),v=f.angleBetween(w,r.directionWC);let I=1;c(r.frustum.fov)&&(I=Math.max(Math.tan(v),.1));let P=Math.abs(f.dot(r.directionWC,x));const N=-y.y*p.y*2/Math.sqrt(I)*(1-P),R=f.multiplyByScalar(C,N,d1);P=Math.abs(f.dot(r.upWC,x));const B=f.multiplyByScalar(r.upWC,-y.y*(1-P)*p.y,Xee);d=f.add(u,b,Yee),d=f.add(d,R,d),d=f.add(d,B,d),f.clone(d,e._panLastWorldPosition),V.clone(a,e._panLastMousePosition)}if((!c(u)||!c(d))&&(u=r.pickEllipsoid(s,i,Ak),d=r.pickEllipsoid(a,i,Yee)),!c(u)||!c(d))return e._rotating=!0,void Cl(e,0,n);if(u=r.worldToCameraCoordinates(u,u),d=r.worldToCameraCoordinates(d,d),c(r.constrainedAxis)){const h=r.constrainedAxis,m=f.mostOrthogonalAxis(h,u1);f.cross(m,h,m),f.normalize(m,m);const _=f.cross(h,m,$b),p=f.magnitude(u),y=f.dot(h,u),b=Math.acos(y/p),x=f.multiplyByScalar(h,y,d1);f.subtract(u,x,x),f.normalize(x,x);const C=f.magnitude(d),w=f.dot(h,d),v=Math.acos(w/C),I=f.multiplyByScalar(h,w,Xee);f.subtract(d,I,I),f.normalize(I,I);let P=Math.acos(f.dot(x,m));f.dot(x,_)<0&&(P=O.TWO_PI-P);let N=Math.acos(f.dot(I,m));f.dot(I,_)<0&&(N=O.TWO_PI-N);const R=P-N;let B;B=f.equalsEpsilon(h,r.position,O.EPSILON2)?r.right:f.cross(h,r.position,u1);const F=f.cross(h,B,u1),S=f.dot(F,f.subtract(u,h,$b)),D=f.dot(F,f.subtract(d,h,$b));let L;L=S>0&&D>0?v-b:S>0&&D<=0?f.dot(r.position,h)>0?-b-v:b+v:b-v,r.rotateRight(R),r.rotateUp(L)}else{f.normalize(u,u),f.normalize(d,d);const h=f.dot(u,d),m=f.cross(u,d,u1);if(h<1&&!f.equalsEpsilon(m,f.ZERO,O.EPSILON14)){const _=Math.acos(h);r.rotate(m,_)}}}const VZe=new f,HZe=new Ce;let Zee=0;function $ee(e,t,n){c(n.distance)&&(n=n.distance);const i=n.inertiaEnabled,o=e._ellipsoid,r=e._scene,s=r.camera,a=r.canvas,l=e._cameraUnderground;let u;l?u=t:(u=Hee,u.x=a.clientWidth/2,u.y=a.clientHeight/2);const d=s.getPickRay(u,Gee);let h;const m=o.cartesianToCartographic(s.position,HZe).height,_=Math.abs(Zee)<e.minimumPickingTerrainDistanceWithInertia;let y;if((i?_:m<e._minimumPickingTerrainHeight)&&(h=qh(e,u,jee)),c(h)&&(y=f.distance(d.origin,h),Zee=y),l){const x=Nee(e,d);y=c(y)?Math.min(y,x):x}c(y)||(y=m);const b=f.normalize(s.position,VZe);pk(e,t,n,e._zoomFactor,y,f.dot(b,s.direction))}const Kee=new V,f1=new ii,uE=new f,GZe=new f,Qee=new k,jZe=new k,Jee=new k,WZe=new bt,qZe=new oe,Ck=new Ce,Ek=new f;function YZe(e,t,n){const o=e._scene.camera;if(!k.equals(o.transform,k.IDENTITY))return;if(c(n.angleAndHeight)&&(n=n.angleAndHeight),V.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){const a=e._ellipsoid.geodeticSurfaceNormal(o.position,Ek);return void El(e,0,n,a)}const s=e._ellipsoid.cartesianToCartographic(o.position,Ck);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,function ZZe(e,t,n){const i=e._ellipsoid,o=e._scene,r=o.camera,s=.25*e.minimumZoomDistance,a=i.cartesianToCartographic(r.positionWC,XZe).height;if(a-s-1<O.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;const l=o.canvas,u=Kee;u.x=l.clientWidth/2,u.y=l.clientHeight/2;const d=r.getPickRay(u,f1);let h;const m=So.rayEllipsoid(d,i);if(c(m))h=ii.getPoint(d,m.start,uE);else{if(!(a>e._minimumTrackBallHeight)){e._looking=!0;const C=e._ellipsoid.geodeticSurfaceNormal(r.position,Ek);return El(e,0,n,C),void V.clone(t,e._tiltCenterMousePosition)}{const C=So.grazingAltitudeLocation(d,i);if(!c(C))return;const w=i.cartesianToCartographic(C,Ck);w.height=0,h=i.cartographicToCartesian(w,uE)}}const _=In.eastNorthUpToFixedFrame(h,i,Qee),p=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=he.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;const b=k.clone(r.transform,Jee);r._setTransform(_),Cl(e,0,n,f.UNIT_Z),r._setTransform(b),e._globe=p,e._ellipsoid=y;const x=y.maximumRadius;e._rotateFactor=1/x,e._rotateRateRangeAdjustment=x}(e,t,n)):function $Ze(e,t,n){const i=e._ellipsoid,o=e._scene,r=o.camera,s=e._cameraUnderground;let a,l,u;if(V.equals(t,e._tiltCenterMousePosition))a=f.clone(e._tiltCenter,uE);else{if(a=qh(e,t,uE),!c(a)){if(l=r.getPickRay(t,f1),u=So.rayEllipsoid(l,i),!c(u)){if(i.cartesianToCartographic(r.position,Ck).height<=e._minimumTrackBallHeight){e._looking=!0;const D=e._ellipsoid.geodeticSurfaceNormal(r.position,Ek);El(e,0,n,D),V.clone(t,e._tiltCenterMousePosition)}return}a=ii.getPoint(l,u.start,uE)}s&&(c(l)||(l=r.getPickRay(t,f1)),Mee(e,l,a,a)),V.clone(t,e._tiltCenterMousePosition),f.clone(a,e._tiltCenter)}const h=Kee;h.x=o.canvas.clientWidth/2,h.y=e._tiltCenterMousePosition.y,l=r.getPickRay(h,f1);const m=f.magnitude(a),_=f.fromElements(m,m,m,bk),p=he.fromCartesian3(_,Tk);if(u=So.rayEllipsoid(l,p),!c(u))return;const y=f.magnitude(l.origin)>m?u.start:u.stop,b=ii.getPoint(l,y,GZe),x=In.eastNorthUpToFixedFrame(a,i,Qee),C=In.eastNorthUpToFixedFrame(b,p,jZe),w=e._globe,v=e._ellipsoid;e._globe=void 0,e._ellipsoid=he.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let I=f.UNIT_Z;const P=k.clone(r.transform,Jee);r._setTransform(C);const N=f.cross(b,r.positionWC,l1);if(f.dot(r.rightWC,N)<0){const S=n.startPosition.y-n.endPosition.y;(s&&S<0||!s&&S>0)&&(I=void 0);const D=r.constrainedAxis;r.constrainedAxis=void 0,Cl(e,0,n,I,!0,!1),r.constrainedAxis=D}else Cl(e,0,n,I,!0,!1);if(r._setTransform(x),Cl(e,0,n,I,!1,!0),c(r.constrainedAxis)){const S=f.cross(r.direction,r.constrainedAxis,l1);f.equalsEpsilon(S,f.ZERO,O.EPSILON6)||(f.dot(S,r.right)<0&&f.negate(S,S),f.cross(S,r.direction,r.up),f.cross(r.direction,r.up,r.right),f.normalize(r.up,r.up),f.normalize(r.right,r.right))}r._setTransform(P),e._globe=w,e._ellipsoid=v;const B=v.maximumRadius;e._rotateFactor=1/B,e._rotateRateRangeAdjustment=B;const F=f.clone(r.positionWC,l1);if(e.enableCollisionDetection&&wk(e,!0),!f.equals(r.positionWC,F)){r._setTransform(C),r.worldToCameraCoordinatesPoint(F,F);const S=f.magnitudeSquared(F);f.magnitudeSquared(r.position)>S&&(f.normalize(r.position,r.position),f.multiplyByScalar(r.position,Math.sqrt(S),r.position));const D=f.angleBetween(F,r.position),L=f.cross(F,r.position,F);f.normalize(L,L);const M=bt.fromAxisAngle(L,D,WZe),U=oe.fromQuaternion(M,qZe);oe.multiplyByVector(U,r.direction,r.direction),oe.multiplyByVector(U,r.up,r.up),f.cross(r.direction,r.up,r.right),f.cross(r.right,r.direction,r.up),r._setTransform(P)}}(e,t,n)}const XZe=new Ce,KZe=new V,QZe=new V,ete=new ii,tte=new ii,JZe=new f,e$e=new f;function El(e,t,n,i){const r=e._scene.camera,s=KZe;s.x=n.startPosition.x,s.y=0;const a=QZe;a.x=n.endPosition.x,a.y=0;let h,m,l=r.getPickRay(s,ete),u=r.getPickRay(a,tte),d=0;r.frustum instanceof $n?(h=l.origin,m=u.origin,f.add(r.direction,h,h),f.add(r.direction,m,m),f.subtract(h,r.position,h),f.subtract(m,r.position,m),f.normalize(h,h),f.normalize(m,m)):(h=l.direction,m=u.direction);let _=f.dot(h,m);_<1&&(d=Math.acos(_)),d=n.startPosition.x>n.endPosition.x?-d:d;const p=e._horizontalRotationAxis;if(c(i)?r.look(i,-d):c(p)?r.look(p,-d):r.lookLeft(d),s.x=0,s.y=n.startPosition.y,a.x=0,a.y=n.endPosition.y,l=r.getPickRay(s,ete),u=r.getPickRay(a,tte),d=0,r.frustum instanceof $n?(h=l.origin,m=u.origin,f.add(r.direction,h,h),f.add(r.direction,m,m),f.subtract(h,r.position,h),f.subtract(m,r.position,m),f.normalize(h,h),f.normalize(m,m)):(h=l.direction,m=u.direction),_=f.dot(h,m),_<1&&(d=Math.acos(_)),d=n.startPosition.y>n.endPosition.y?-d:d,i=g(i,p),c(i)){const y=r.direction,b=f.negate(i,JZe),x=f.equalsEpsilon(y,i,O.EPSILON2),C=f.equalsEpsilon(y,b,O.EPSILON2);if(x||C)(x&&d<0||C&&d>0)&&r.look(r.right,-d);else{_=f.dot(y,i);let w=O.acosClamped(_);d>0&&d>w&&(d=w-O.EPSILON4),_=f.dot(y,b),w=O.acosClamped(_),d<0&&-d>w&&(d=-w+O.EPSILON4);const v=f.cross(i,y,e$e);r.look(v,d)}}else r.lookUp(d)}const n$e=new k,i$e=new Ce;function wk(e,t){e._adjustedHeightForTerrain=!0;const n=e._scene,i=n.mode;if(i===ce.SCENE2D||i===ce.MORPHING)return;const o=n.camera,r=g(n.ellipsoid,he.WGS84),s=n.mapProjection;let a,l;k.equals(o.transform,k.IDENTITY)||(a=k.clone(o.transform,n$e),l=f.magnitude(o.position),o._setTransform(k.IDENTITY));const u=i$e;i===ce.SCENE3D?r.cartesianToCartographic(o.position,u):s.unproject(o.position,u);let d=!1;if(u.height<e._minimumCollisionTerrainHeight){const h=e._scene.globeHeight;if(c(h)){const m=h+e.minimumZoomDistance,_=h-e._lastGlobeHeight,p=_/e._lastGlobeHeight;u.height<m&&(t||Math.abs(p)<=.1)&&(u.height=m,i===ce.SCENE3D?r.cartographicToCartesian(u,o.position):s.project(u,o.position),d=!0),t||Math.abs(p)<=.1?e._lastGlobeHeight=h:e._lastGlobeHeight+=.1*_}}c(a)&&(o._setTransform(a),d&&(f.normalize(o.position,o.position),f.negate(o.position,o.direction),f.multiplyByScalar(o.position,Math.max(l,e.minimumZoomDistance),o.position),f.normalize(o.direction,o.direction),f.cross(o.direction,o.up,o.right),f.cross(o.right,o.direction,o.up)))}lE.prototype.onMap=function(){const e=this._scene,n=e.camera;return e.mode!==ce.COLUMBUS_VIEW||Math.abs(n.position.x)-this._maxCoord.x<0&&Math.abs(n.position.y)-this._maxCoord.y<0};const o$e=new f,r$e=new f;lE.prototype.update=function(){const e=this._scene,{camera:t,globe:n,mode:i}=e;k.equals(t.transform,k.IDENTITY)?(this._globe=n,this._ellipsoid=g(e.ellipsoid,he.default)):(this._globe=void 0,this._ellipsoid=he.UNIT_SPHERE);const{verticalExaggeration:o,verticalExaggerationRelativeHeight:r}=e;this._minimumCollisionTerrainHeight=Ec.getHeight(this.minimumCollisionTerrainHeight,o,r),this._minimumPickingTerrainHeight=Ec.getHeight(this.minimumPickingTerrainHeight,o,r),this._minimumTrackBallHeight=Ec.getHeight(this.minimumTrackBallHeight,o,r),this._cameraUnderground=e.cameraUnderground&&c(this._globe);const s=this._ellipsoid.maximumRadius;this._rotateFactor=1/s,this._rotateRateRangeAdjustment=s,this._adjustedHeightForTerrain=!1;const a=f.clone(t.positionWC,o$e),l=f.clone(t.directionWC,r$e);i===ce.SCENE2D?function iZe(e){const t=e._scene.mapMode2D===vm.ROTATE;k.equals(k.IDENTITY,e._scene.camera.transform)?(dc(e,e.enableTranslate,e.translateEventTypes,JXe,e.inertiaTranslate,"_lastInertiaTranslateMovement"),dc(e,e.enableZoom,e.zoomEventTypes,Oee,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&dc(e,e.enableRotate,e.tiltEventTypes,Ree,e.inertiaSpin,"_lastInertiaTiltMovement")):(dc(e,e.enableZoom,e.zoomEventTypes,Oee,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&dc(e,e.enableRotate,e.translateEventTypes,Ree,e.inertiaSpin,"_lastInertiaSpinMovement"))}(this):i===ce.COLUMBUS_VIEW?(this._horizontalRotationAxis=f.UNIT_Z,function vZe(e){const n=e._scene.camera;if(k.equals(k.IDENTITY,n.transform)){const i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),dc(e,e.enableTilt,e.tiltEventTypes,CZe,e.inertiaSpin,"_lastInertiaTiltMovement"),dc(e,e.enableTranslate,e.translateEventTypes,_Ze,e.inertiaTranslate,"_lastInertiaTranslateMovement"),dc(e,e.enableZoom,e.zoomEventTypes,SZe,e.inertiaZoom,"_lastInertiaZoomMovement"),dc(e,e.enableLook,e.lookEventTypes,El),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){const o=n.createCorrectPositionTween(e.bounceAnimationTime);c(o)&&(e._tween=i.add(o))}i.update()}else dc(e,e.enableRotate,e.rotateEventTypes,Cl,e.inertiaSpin,"_lastInertiaSpinMovement"),dc(e,e.enableZoom,e.zoomEventTypes,$ee,e.inertiaZoom,"_lastInertiaZoomMovement")}(this)):i===ce.SCENE3D&&(this._horizontalRotationAxis=void 0,function t$e(e){dc(e,e.enableRotate,e.rotateEventTypes,MZe,e.inertiaSpin,"_lastInertiaSpinMovement"),dc(e,e.enableZoom,e.zoomEventTypes,$ee,e.inertiaZoom,"_lastInertiaZoomMovement"),dc(e,e.enableTilt,e.tiltEventTypes,YZe,e.inertiaSpin,"_lastInertiaTiltMovement"),dc(e,e.enableLook,e.lookEventTypes,El)}(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain&&wk(this,!f.equals(a,t.positionWC)||!f.equals(l,t.directionWC)),this._aggregator.reset()},lE.prototype.isDestroyed=function(){return!1},lE.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),Xe(this)};const s$e=lE;function Yh(){this._sceneFramebuffer=new bJ;const e=.125,t=new Array(6);t[0]=new Wo({fragmentShader:Yg,textureScale:e,forcePowerOfTwo:!0,sampleMode:1});const n=t[1]=new Wo({fragmentShader:'uniform sampler2D colorTexture;\n\nuniform float avgLuminance;\nuniform float threshold;\nuniform float offset;\n\nin vec2 v_textureCoordinates;\n\nfloat key(float avg)\n{\n float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\n return max(0.0, guess) + 0.1;\n}\n\n// See section 9. "The bright-pass filter" of Realtime HDR Rendering\n// http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf\n\nvoid main()\n{\n vec4 color = texture(colorTexture, v_textureCoordinates);\n vec3 xyz = czm_RGBToXYZ(color.rgb);\n float luminance = xyz.r;\n\n float scaledLum = key(avgLuminance) * luminance / avgLuminance;\n float brightLum = max(scaledLum - threshold, 0.0);\n float brightness = brightLum / (offset + brightLum);\n\n xyz.r = brightness;\n out_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n',uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new V,t[2]=new Wo({fragmentShader:Z3,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 Wo({fragmentShader:Z3,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 Wo({fragmentShader:Yg,sampleMode:1}),this._uCenter=new V,this._uRadius=void 0,t[5]=new Wo({fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D colorTexture2;\n\nuniform vec2 center;\nuniform float radius;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color0 = texture(colorTexture, v_textureCoordinates);\n vec4 color1 = texture(colorTexture2, v_textureCoordinates);\n\n float x = length(gl_FragCoord.xy - center) / radius;\n float t = smoothstep(0.5, 0.8, x);\n out_FragColor = mix(color0 + color1, color1, t);\n}\n",uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new Cf({stages:t});const o=new YJ(this),r=t.length;for(let s=0;s<r;++s)t[s]._textureCache=o;this._textureCache=o,this.length=t.length}Yh.prototype.get=function(e){return this._stages.get(e)},Yh.prototype.getStageByName=function(e){const t=this._stages.length;for(let n=0;n<t;++n){const i=this._stages.get(n);if(i.name===e)return i}};const l$e=new de,nte=new V,u$e=new V,ite=new k;Yh.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)},Yh.prototype.update=function(e){const t=e.context,n=e.viewport,i=this._sceneFramebuffer;i.update(t,n);const o=i.framebuffer;return this._textureCache.update(t),this._stages.update(t,!1),function d$e(e,t,n){const i=t.uniformState,o=i.sunPositionWC,r=i.view,s=i.viewProjection,a=i.projection;let l=k.computeViewportTransformation(n,0,1,ite);const u=k.multiplyByPoint(r,o,l$e);let d=In.pointToGLWindowCoordinates(s,l,o,nte);u.x+=O.SOLAR_RADIUS;const h=In.pointToGLWindowCoordinates(a,l,u,u),m=30*V.magnitude(V.subtract(h,d,h))*2,_=u$e;_.x=m,_.y=m,e._uCenter=V.clone(d,e._uCenter),e._uRadius=.15*Math.max(_.x,_.y);const p=t.drawingBufferWidth,y=t.drawingBufferHeight,b=e._stages,x=b.get(0),C=x.outputTexture.width,w=x.outputTexture.height,v=new Vt;v.width=C,v.height=w,l=k.computeViewportTransformation(v,0,1,ite),d=In.pointToGLWindowCoordinates(s,l,o,nte),_.x*=C/p,_.y*=w/y;const I=x.scissorRectangle;I.x=Math.max(d.x-.5*_.x,0),I.y=Math.max(d.y-.5*_.y,0),I.width=Math.min(_.x,p),I.height=Math.min(_.y,y);for(let P=1;P<4;++P)Vt.clone(I,b.get(P).scissorRectangle)}(this,t,n),o},Yh.prototype.execute=function(e){const 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)},Yh.prototype.copy=function(e,t){if(!c(this._copyColorCommand)){const n=this;this._copyColorCommand=e.createViewportQuadCommand(Yg,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)},Yh.prototype.isDestroyed=function(){return!1},Yh.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),Xe(this)};const f$e=Yh;function ote(){this._cachedShowFrustumsShaders={}}const dE=new Z,_$e=new $t;ote.prototype.executeDebugShowFrustumsCommand=function(e,t,n){const i=t.shaderProgram.id;let o=this._cachedShowFrustumsShaders[i];c(o)||(o=function p$e(e,t){const n=e.context,i=t,o=i.fragmentShaderSource.clone(),r=[];o.sources=o.sources.map(function(d){d=St.replaceMain(d,"czm_Debug_main");const h=/out_FragData_(\d+)/g;let m;for(;null!==(m=h.exec(d));)-1===r.indexOf(m[1])&&r.push(m[1]);return d});const s=r.length;let l,a="";if(a+="uniform vec3 debugShowCommandsColor;\n",a+="uniform vec3 debugShowFrustumsColor;\n",a+="void main() \n{ \n czm_Debug_main(); \n",s>0)for(l=0;l<s;++l)a+=` out_FragData_${r[l]}.rgb *= debugShowCommandsColor;\n`,a+=` out_FragData_${r[l]}.rgb *= debugShowFrustumsColor;\n`;else a+=" out_FragColor.rgb *= debugShowCommandsColor;\n",a+=" out_FragColor.rgb *= debugShowFrustumsColor;\n";a+="}",o.sources.push(a);const u=function h$e(e){const t={},n=e.vertexAttributes;for(const i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}(i);return di.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:o,attributeLocations:u})}(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=o);const r=$t.shallowClone(t,_$e);r.shaderProgram=o,r.uniformMap=function m$e(e,t){let n;return n=c(t.uniformMap)?t.uniformMap:{},c(n.debugShowCommandsColor)||c(n.debugShowFrustumsColor)||(n.debugShowCommandsColor=function(){return e.debugShowCommands?(c(t._debugColor)||(t._debugColor=Z.fromRandom()),t._debugColor):Z.WHITE},n.debugShowFrustumsColor=function(){return e.debugShowFrustums?(dE.red=1&t.debugOverlappingFrustums?1:0,dE.green=2&t.debugOverlappingFrustums?1:0,dE.blue=4&t.debugOverlappingFrustums?1:0,dE.alpha=1,dE):Z.WHITE}),n}(e,t),r.execute(e.context,n)};const g$e=ote;function sy(e,t,n){this._primitive=e,this._tileIndex=t,this._sampleIndex=n,this._metadata={},this._orientedBoundingBox=new Ao}sy.fromKeyframeNode=function(e,t,n,i){A.typeOf.object("primitive",e),A.typeOf.number("tileIndex",t),A.typeOf.number("sampleIndex",n),A.typeOf.object("keyframeNode",i);const o=new sy(e,t,n),{spatialNode:r,metadata:s}=i;return o._metadata=function y$e(e,t,n){if(!c(t))return;const{names:i,types:o}=e.provider,r={};for(let s=0;s<i.length;s++){const a=i[s],l=Tn.getComponentCount(o[s]),u=t[s].slice(n*l,(n+1)*l);r[a]=u}return r}(e,s,n),o._orientedBoundingBox=function T$e(e,t,n,i){const o=t.dimensions,r=o.x*o.y,s=Math.floor(n/r),a=n-s*r,l=Math.floor(a/o.x),d=f.fromElements(a-l*o.x,l,s,rte),h=f.divideComponents(f.subtract(d,e._paddingBefore,rte),e.dimensions,b$e);return e._shape.computeOrientedBoundingBoxForSample(t,e.dimensions,h,i)}(e,r,n,o._orientedBoundingBox),o};const rte=new f,b$e=new f;Object.defineProperties(sy.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()}}}),sy.prototype.hasProperty=function(e){return c(this._metadata[e])},sy.prototype.getNames=function(){return Object.keys(this._metadata)},sy.prototype.getProperty=function(e){return this._metadata[e]};const A$e=sy,ste='// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT,\n// RayShapeIntersection\n\nvec4 intersectLongitude(in Ray ray, in float angle, in bool positiveNormal) {\n float normalSign = positiveNormal ? 1.0 : -1.0;\n vec2 planeNormal = vec2(-sin(angle), cos(angle)) * normalSign;\n\n vec2 position = ray.pos.xy;\n vec2 direction = ray.dir.xy;\n float approachRate = dot(direction, planeNormal);\n float distance = -dot(position, planeNormal);\n\n float t = (approachRate == 0.0)\n ? NO_HIT\n : distance / approachRate;\n\n return vec4(planeNormal, 0.0, t);\n}\n\nRayShapeIntersection intersectHalfSpace(in Ray ray, in float angle, in bool positiveNormal)\n{\n vec4 intersection = intersectLongitude(ray, angle, positiveNormal);\n vec4 farSide = vec4(normalize(ray.dir), INF_HIT);\n\n bool hitFront = (intersection.w > 0.0) == (dot(ray.pos.xy, intersection.xy) > 0.0);\n if (!hitFront) {\n return RayShapeIntersection(intersection, farSide);\n } else {\n return RayShapeIntersection(-1.0 * farSide, intersection);\n }\n}\n\nvoid intersectFlippedWedge(in Ray ray, in vec2 minMaxAngle, out RayShapeIntersection intersections[2])\n{\n intersections[0] = intersectHalfSpace(ray, minMaxAngle.x, false);\n intersections[1] = intersectHalfSpace(ray, minMaxAngle.y, true);\n}\n\nbool hitPositiveHalfPlane(in Ray ray, in vec4 intersection, in bool positiveNormal) {\n float normalSign = positiveNormal ? 1.0 : -1.0;\n vec2 planeDirection = vec2(intersection.y, -intersection.x) * normalSign;\n vec2 hit = ray.pos.xy + intersection.w * ray.dir.xy;\n return dot(hit, planeDirection) > 0.0;\n}\n\nvoid intersectHalfPlane(in Ray ray, in float angle, out RayShapeIntersection intersections[2]) {\n vec4 intersection = intersectLongitude(ray, angle, true);\n vec4 farSide = vec4(normalize(ray.dir), INF_HIT);\n\n if (hitPositiveHalfPlane(ray, intersection, true)) {\n intersections[0].entry = -1.0 * farSide;\n intersections[0].exit = vec4(-1.0 * intersection.xy, 0.0, intersection.w);\n intersections[1].entry = intersection;\n intersections[1].exit = farSide;\n } else {\n vec4 miss = vec4(normalize(ray.dir), NO_HIT);\n intersections[0].entry = -1.0 * farSide;\n intersections[0].exit = farSide;\n intersections[1].entry = miss;\n intersections[1].exit = miss;\n }\n}\n\nRayShapeIntersection intersectRegularWedge(in Ray ray, in vec2 minMaxAngle)\n{\n // Note: works for maxAngle > minAngle + pi, where the "regular wedge"\n // is actually a negative volume.\n // Compute intersections with the two planes.\n // Normals will point toward the "outside" (negative space)\n vec4 intersect1 = intersectLongitude(ray, minMaxAngle.x, false);\n vec4 intersect2 = intersectLongitude(ray, minMaxAngle.y, true);\n\n // Choose intersection with smallest T as the "first", the other as "last"\n // Note: first or last could be in the "shadow" wedge, beyond the tip\n bool inOrder = intersect1.w <= intersect2.w;\n vec4 first = inOrder ? intersect1 : intersect2;\n vec4 last = inOrder ? intersect2 : intersect1;\n\n bool firstIsAhead = first.w >= 0.0;\n bool startedInsideFirst = dot(ray.pos.xy, first.xy) < 0.0;\n bool exitFromInside = firstIsAhead == startedInsideFirst;\n bool lastIsAhead = last.w > 0.0;\n bool startedOutsideLast = dot(ray.pos.xy, last.xy) >= 0.0;\n bool enterFromOutside = lastIsAhead == startedOutsideLast;\n\n vec4 farSide = vec4(normalize(ray.dir), INF_HIT);\n vec4 miss = vec4(normalize(ray.dir), NO_HIT);\n\n if (exitFromInside && enterFromOutside) {\n // Ray crosses both faces of negative wedge, exiting then entering the positive shape\n return RayShapeIntersection(first, last);\n } else if (!exitFromInside && enterFromOutside) {\n // Ray starts inside wedge. last is in shadow wedge, and first is actually the entry\n return RayShapeIntersection(-1.0 * farSide, first);\n } else if (exitFromInside && !enterFromOutside) {\n // First intersection was in the shadow wedge, so last is actually the exit\n return RayShapeIntersection(last, farSide);\n } else { // !exitFromInside && !enterFromOutside\n // Both intersections were in the shadow wedge\n return RayShapeIntersection(miss, miss);\n }\n}\n',Sk="// Main intersection function for Voxel scenes.\n// See IntersectBox.glsl, IntersectCylinder.glsl, or IntersectEllipsoid.glsl\n// for the definition of intersectShape. The appropriate function is selected\n// based on the VoxelPrimitive shape type, and added to the shader in\n// Scene/VoxelRenderResources.js.\n// See also IntersectClippingPlane.glsl and IntersectDepth.glsl.\n// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT,\n// getFirstIntersection, initializeIntersections, nextIntersection.\n\n/* Intersection defines (set in Scene/VoxelRenderResources.js)\n#define INTERSECTION_COUNT ###\n*/\n\nRayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, out Intersections ix) {\n // Do a ray-shape intersection to find the exact starting and ending points.\n intersectShape(ray, ix);\n\n // Exit early if the positive shape was completely missed or behind the ray.\n RayShapeIntersection intersection = getFirstIntersection(ix);\n if (intersection.entry.w == NO_HIT) {\n // Positive shape was completely missed - so exit early.\n return intersection;\n }\n\n // Clipping planes\n #if defined(CLIPPING_PLANES)\n intersectClippingPlanes(ray, ix);\n #endif\n\n // Depth\n #if defined(DEPTH_TEST)\n intersectDepth(screenCoord, ray, ix);\n #endif\n\n // Find the first intersection that's in front of the ray\n #if (INTERSECTION_COUNT > 1)\n initializeIntersections(ix);\n for (int i = 0; i < INTERSECTION_COUNT; ++i) {\n intersection = nextIntersection(ix);\n if (intersection.exit.w > 0.0) {\n // Set start to 0.0 when ray is inside the shape.\n intersection.entry.w = max(intersection.entry.w, 0.0);\n break;\n }\n }\n #else\n // Set start to 0.0 when ray is inside the shape.\n intersection.entry.w = max(intersection.entry.w, 0.0);\n #endif\n\n return intersection;\n}\n",B$e=function F$e(e){const t=new J9;this.shaderBuilder=t;const n=e._customShader,i=Pn(e._uniformMap,n.uniformMap);e._uniformMap=i;const o=n.uniforms;for(const m in o)o.hasOwnProperty(m)&&t.addUniform(o[m].type,m,Ee.FRAGMENT);t.addUniform("sampler2D","u_megatextureTextures[METADATA_COUNT]",Ee.FRAGMENT),this.uniformMap=i;const r=e._clippingPlanes,s=c(r)&&r.enabled?r.length:0;this.clippingPlanes=r,this.clippingPlanesLength=s,t.addVertexLines(["in vec2 position;\n\nuniform vec4 u_ndcSpaceAxisAlignedBoundingBox;\n\nvoid main() {\n vec2 aabbMin = u_ndcSpaceAxisAlignedBoundingBox.xy;\n vec2 aabbMax = u_ndcSpaceAxisAlignedBoundingBox.zw;\n vec2 translation = 0.5 * (aabbMax + aabbMin);\n vec2 scale = 0.5 * (aabbMax - aabbMin);\n gl_Position = vec4(position * scale + translation, 0.0, 1.0);\n}\n"]),t.addFragmentLines([n.fragmentShaderText,"#line 0","// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js\n#define OCTREE_FLAG_INTERNAL 0\n#define OCTREE_FLAG_LEAF 1\n#define OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 2\n\n#define OCTREE_MAX_LEVELS 32 // Harcoded value because GLSL doesn't like variable length loops\n\nuniform sampler2D u_octreeInternalNodeTexture;\nuniform vec2 u_octreeInternalNodeTexelSizeUv;\nuniform int u_octreeInternalNodeTilesPerRow;\n#if (SAMPLE_COUNT > 1)\nuniform sampler2D u_octreeLeafNodeTexture;\nuniform vec2 u_octreeLeafNodeTexelSizeUv;\nuniform int u_octreeLeafNodeTilesPerRow;\n#endif\n\nstruct OctreeNodeData {\n int data;\n int flag;\n};\n\nstruct TraversalData {\n ivec4 octreeCoords;\n int parentOctreeIndex;\n};\n\nstruct SampleData {\n int megatextureIndex;\n ivec4 tileCoords;\n vec3 tileUv;\n #if (SAMPLE_COUNT > 1)\n float weight;\n #endif\n};\n\n// Integer mod: For WebGL1 only\nint intMod(in int a, in int b) {\n return a - (b * (a / b));\n}\nint normU8_toInt(in float value) {\n return int(value * 255.0);\n}\nint normU8x2_toInt(in vec2 value) {\n return int(value.x * 255.0) + 256 * int(value.y * 255.0);\n}\nfloat normU8x2_toFloat(in vec2 value) {\n return float(normU8x2_toInt(value)) / 65535.0;\n}\n\nOctreeNodeData getOctreeNodeData(in vec2 octreeUv) {\n vec4 texData = texture(u_octreeInternalNodeTexture, octreeUv);\n\n OctreeNodeData data;\n data.data = normU8x2_toInt(texData.xy);\n data.flag = normU8x2_toInt(texData.zw);\n return data;\n}\n\nOctreeNodeData getOctreeChildData(in int parentOctreeIndex, in ivec3 childCoord) {\n int childIndex = childCoord.z * 4 + childCoord.y * 2 + childCoord.x;\n int octreeCoordX = intMod(parentOctreeIndex, u_octreeInternalNodeTilesPerRow) * 9 + 1 + childIndex;\n int octreeCoordY = parentOctreeIndex / u_octreeInternalNodeTilesPerRow;\n vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);\n return getOctreeNodeData(octreeUv);\n}\n\nint getOctreeParentIndex(in int octreeIndex) {\n int octreeCoordX = intMod(octreeIndex, u_octreeInternalNodeTilesPerRow) * 9;\n int octreeCoordY = octreeIndex / u_octreeInternalNodeTilesPerRow;\n vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);\n vec4 parentData = texture(u_octreeInternalNodeTexture, octreeUv);\n int parentOctreeIndex = normU8x2_toInt(parentData.xy);\n return parentOctreeIndex;\n}\n\n/**\n* Convert a position in the uv-space of the tileset bounding shape\n* into the uv-space of a tile within the tileset\n*/\nvec3 getTileUv(in vec3 shapePosition, in ivec4 octreeCoords) {\n\t// PERFORMANCE_IDEA: use bit-shifting (only in WebGL2)\n float dimAtLevel = exp2(float(octreeCoords.w));\n return shapePosition * dimAtLevel - vec3(octreeCoords.xyz);\n}\n\nvec3 getClampedTileUv(in vec3 shapePosition, in ivec4 octreeCoords) {\n vec3 tileUv = getTileUv(shapePosition, octreeCoords);\n return clamp(tileUv, vec3(0.0), vec3(1.0));\n}\n\nvoid getOctreeLeafSampleData(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleData) {\n sampleData.megatextureIndex = data.data;\n sampleData.tileCoords = (data.flag == OCTREE_FLAG_PACKED_LEAF_FROM_PARENT)\n ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)\n : octreeCoords;\n}\n\n#if (SAMPLE_COUNT > 1)\nvoid getOctreeLeafSampleDatas(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleDatas[SAMPLE_COUNT]) {\n int leafIndex = data.data;\n int leafNodeTexelCount = 2;\n // Adding 0.5 moves to the center of the texel\n float leafCoordXStart = float(intMod(leafIndex, u_octreeLeafNodeTilesPerRow) * leafNodeTexelCount) + 0.5;\n float leafCoordY = float(leafIndex / u_octreeLeafNodeTilesPerRow) + 0.5;\n\n // Get an interpolation weight and a flag to determine whether to read the parent texture\n vec2 leafUv0 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 0.0, leafCoordY);\n vec4 leafData0 = texture(u_octreeLeafNodeTexture, leafUv0);\n float lerp = normU8x2_toFloat(leafData0.xy);\n sampleDatas[0].weight = 1.0 - lerp;\n sampleDatas[1].weight = lerp;\n // TODO: this looks wrong? Should be comparing to OCTREE_FLAG_PACKED_LEAF_FROM_PARENT\n sampleDatas[0].tileCoords = (normU8_toInt(leafData0.z) == 1)\n ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)\n : octreeCoords;\n sampleDatas[1].tileCoords = (normU8_toInt(leafData0.w) == 1)\n ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)\n : octreeCoords;\n\n // Get megatexture indices for both samples\n vec2 leafUv1 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 1.0, leafCoordY);\n vec4 leafData1 = texture(u_octreeLeafNodeTexture, leafUv1);\n sampleDatas[0].megatextureIndex = normU8x2_toInt(leafData1.xy);\n sampleDatas[1].megatextureIndex = normU8x2_toInt(leafData1.zw);\n}\n#endif\n\nOctreeNodeData traverseOctreeDownwards(in vec3 shapePosition, inout TraversalData traversalData) {\n float sizeAtLevel = exp2(-1.0 * float(traversalData.octreeCoords.w));\n vec3 start = vec3(traversalData.octreeCoords.xyz) * sizeAtLevel;\n vec3 end = start + vec3(sizeAtLevel);\n OctreeNodeData childData;\n\n for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {\n // Find out which octree child contains the position\n // 0 if before center, 1 if after\n vec3 center = 0.5 * (start + end);\n vec3 childCoord = step(center, shapePosition);\n\n // Get octree coords for the next level down\n ivec4 octreeCoords = traversalData.octreeCoords;\n traversalData.octreeCoords = ivec4(octreeCoords.xyz * 2 + ivec3(childCoord), octreeCoords.w + 1);\n\n childData = getOctreeChildData(traversalData.parentOctreeIndex, ivec3(childCoord));\n\n if (childData.flag != OCTREE_FLAG_INTERNAL) {\n // leaf tile - stop traversing\n break;\n }\n\n // interior tile - keep going deeper\n start = mix(start, center, childCoord);\n end = mix(center, end, childCoord);\n traversalData.parentOctreeIndex = childData.data;\n }\n\n return childData;\n}\n\n/**\n* Transform a given position to an octree tile coordinate and a position within that tile,\n* and find the corresponding megatexture index and texture coordinates\n*/\nvoid traverseOctreeFromBeginning(in vec3 shapePosition, out TraversalData traversalData, out SampleData sampleDatas[SAMPLE_COUNT]) {\n traversalData.octreeCoords = ivec4(0);\n traversalData.parentOctreeIndex = 0;\n\n OctreeNodeData nodeData = getOctreeNodeData(vec2(0.0));\n if (nodeData.flag != OCTREE_FLAG_LEAF) {\n nodeData = traverseOctreeDownwards(shapePosition, traversalData);\n }\n\n #if (SAMPLE_COUNT == 1)\n getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);\n sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);\n #else\n getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);\n sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);\n sampleDatas[1].tileUv = getClampedTileUv(shapePosition, sampleDatas[1].tileCoords);\n #endif\n}\n\nbool inRange(in vec3 v, in vec3 minVal, in vec3 maxVal) {\n return clamp(v, minVal, maxVal) == v;\n}\n\nbool insideTile(in vec3 shapePosition, in ivec4 octreeCoords) {\n vec3 tileUv = getTileUv(shapePosition, octreeCoords);\n\tbool inside = inRange(tileUv, vec3(0.0), vec3(1.0));\n\t// Assume (!) the position is always inside the root tile.\n\treturn inside || octreeCoords.w == 0;\n}\n\nvoid traverseOctreeFromExisting(in vec3 shapePosition, inout TraversalData traversalData, inout SampleData sampleDatas[SAMPLE_COUNT]) {\n if (insideTile(shapePosition, traversalData.octreeCoords)) {\n for (int i = 0; i < SAMPLE_COUNT; i++) {\n sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);\n }\n return;\n }\n\n // Go up tree until we find a parent tile containing shapePosition\n for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {\n traversalData.octreeCoords.xyz /= 2;\n traversalData.octreeCoords.w -= 1;\n\n if (insideTile(shapePosition, traversalData.octreeCoords)) {\n break;\n }\n\n traversalData.parentOctreeIndex = getOctreeParentIndex(traversalData.parentOctreeIndex);\n }\n\n // Go down tree\n OctreeNodeData nodeData = traverseOctreeDownwards(shapePosition, traversalData);\n\n #if (SAMPLE_COUNT == 1)\n getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);\n sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);\n #else\n getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);\n sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);\n sampleDatas[1].tileUv = getClampedTileUv(shapePosition, sampleDatas[1].tileCoords);\n #endif\n}\n","struct Ray {\n vec3 pos;\n vec3 dir;\n vec3 rawDir;\n};\n\n#if defined(JITTER)\n/**\n * Generate a pseudo-random value for a given 2D screen coordinate.\n * Similar to https://www.shadertoy.com/view/4djSRW with a modified hashscale.\n */\nfloat hash(vec2 p)\n{\n vec3 p3 = fract(vec3(p.xyx) * 50.0);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n}\n#endif\n\nfloat minComponent(in vec3 v) {\n return min(min(v.x, v.y), v.z);\n}\n\nfloat maxComponent(in vec3 v) {\n return max(max(v.x, v.y), v.z);\n}\n\nstruct PointJacobianT {\n vec3 point;\n mat3 jacobianT;\n};\n","/* Intersection defines\n#define INTERSECTION_COUNT ###\n*/\n\n#define NO_HIT (-czm_infinity)\n#define INF_HIT (czm_infinity * 0.5)\n\nstruct RayShapeIntersection {\n vec4 entry;\n vec4 exit;\n};\n\nvec4 intersectionMin(in vec4 intersect0, in vec4 intersect1)\n{\n if (intersect0.w == NO_HIT) {\n return intersect1;\n } else if (intersect1.w == NO_HIT) {\n return intersect0;\n }\n return (intersect0.w <= intersect1.w) ? intersect0 : intersect1;\n}\n\nvec4 intersectionMax(in vec4 intersect0, in vec4 intersect1)\n{\n return (intersect0.w >= intersect1.w) ? intersect0 : intersect1;\n}\n\nRayShapeIntersection intersectIntersections(in Ray ray, in RayShapeIntersection intersect0, in RayShapeIntersection intersect1)\n{\n bool missed = (intersect0.entry.w == NO_HIT) ||\n (intersect1.entry.w == NO_HIT) ||\n (intersect0.exit.w < intersect1.entry.w) ||\n (intersect0.entry.w > intersect1.exit.w);\n if (missed) {\n vec4 miss = vec4(normalize(ray.dir), NO_HIT);\n return RayShapeIntersection(miss, miss);\n }\n\n vec4 entry = intersectionMax(intersect0.entry, intersect1.entry);\n vec4 exit = intersectionMin(intersect0.exit, intersect1.exit);\n\n return RayShapeIntersection(entry, exit);\n}\n\nstruct Intersections {\n // Don't access these member variables directly - call the functions instead.\n\n // Store an array of ray-surface intersections. Each intersection is composed of:\n // .xyz for the surface normal at the intersection point\n // .w for the T value\n // The scale of the normal encodes the shape intersection type:\n // length(intersection.xyz) = 1: positive shape entry\n // length(intersection.xyz) = 2: positive shape exit\n // length(intersection.xyz) = 3: negative shape entry\n // length(intersection.xyz) = 4: negative shape exit\n // INTERSECTION_COUNT is the number of ray-*shape* (volume) intersections,\n // so we need twice as many to track ray-*surface* intersections\n vec4 intersections[INTERSECTION_COUNT * 2];\n\n #if (INTERSECTION_COUNT > 1)\n // Maintain state for future nextIntersection calls\n int index;\n int surroundCount;\n bool surroundIsPositive;\n #endif\n};\n\nRayShapeIntersection getFirstIntersection(in Intersections ix) \n{\n return RayShapeIntersection(ix.intersections[0], ix.intersections[1]);\n}\n\nvec4 encodeIntersectionType(vec4 intersection, int index, bool entry)\n{\n float scale = float(index > 0) * 2.0 + float(!entry) + 1.0;\n return vec4(intersection.xyz * scale, intersection.w);\n}\n\n// Use defines instead of real functions because WebGL1 cannot access array with non-constant index.\n#define setIntersection(/*inout Intersections*/ ix, /*int*/ index, /*float*/ t, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = vec4(0.0, float(!positive) * 2.0 + float(!enter) + 1.0, 0.0, (t))\n#define setIntersectionPair(/*inout Intersections*/ ix, /*int*/ index, /*vec2*/ entryExit) (ix).intersections[(index) * 2 + 0] = vec4(0.0, float((index) > 0) * 2.0 + 1.0, 0.0, (entryExit).x); (ix).intersections[(index) * 2 + 1] = vec4(0.0, float((index) > 0) * 2.0 + 2.0, 0.0, (entryExit).y)\n#define setSurfaceIntersection(/*inout Intersections*/ ix, /*int*/ index, /*vec4*/ intersection, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = encodeIntersectionType((intersection), int(!positive), (enter))\n#define setShapeIntersection(/*inout Intersections*/ ix, /*int*/ index, /*RayShapeIntersection*/ intersection) (ix).intersections[(index) * 2 + 0] = encodeIntersectionType((intersection).entry, (index), true); (ix).intersections[(index) * 2 + 1] = encodeIntersectionType((intersection).exit, (index), false)\n\n#if (INTERSECTION_COUNT > 1)\nvoid initializeIntersections(inout Intersections ix) {\n // Sort the intersections from min T to max T with bubble sort.\n // Note: If this sorting function changes, some of the intersection test may\n // need to be updated. Search for \"bubble sort\" to find those areas.\n const int sortPasses = INTERSECTION_COUNT * 2 - 1;\n for (int n = sortPasses; n > 0; --n) {\n for (int i = 0; i < sortPasses; ++i) {\n // The loop should be: for (i = 0; i < n; ++i) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (i >= n) { break; }\n\n vec4 intersect0 = ix.intersections[i + 0];\n vec4 intersect1 = ix.intersections[i + 1];\n\n bool inOrder = intersect0.w <= intersect1.w;\n\n ix.intersections[i + 0] = inOrder ? intersect0 : intersect1;\n ix.intersections[i + 1] = inOrder ? intersect1 : intersect0;\n }\n }\n\n // Prepare initial state for nextIntersection\n ix.index = 0;\n ix.surroundCount = 0;\n ix.surroundIsPositive = false;\n}\n#endif\n\n#if (INTERSECTION_COUNT > 1)\nRayShapeIntersection nextIntersection(inout Intersections ix) {\n vec4 surfaceIntersection = vec4(0.0, 0.0, 0.0, NO_HIT);\n RayShapeIntersection shapeIntersection = RayShapeIntersection(surfaceIntersection, surfaceIntersection);\n\n const int passCount = INTERSECTION_COUNT * 2;\n\n if (ix.index == passCount) {\n return shapeIntersection;\n }\n\n for (int i = 0; i < passCount; ++i) {\n // The loop should be: for (i = ix.index; i < passCount; ++i) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to continue instead.\n if (i < ix.index) {\n continue;\n }\n\n ix.index = i + 1;\n\n surfaceIntersection = ix.intersections[i];\n int intersectionType = int(length(surfaceIntersection.xyz) - 0.5);\n bool currShapeIsPositive = intersectionType < 2;\n bool enter = intMod(intersectionType, 2) == 0;\n\n ix.surroundCount += enter ? +1 : -1;\n ix.surroundIsPositive = currShapeIsPositive ? enter : ix.surroundIsPositive;\n\n // entering positive or exiting negative\n if (ix.surroundCount == 1 && ix.surroundIsPositive && enter == currShapeIsPositive) {\n shapeIntersection.entry = surfaceIntersection;\n }\n\n // exiting positive or entering negative after being inside positive\n bool exitPositive = !enter && currShapeIsPositive && ix.surroundCount == 0;\n bool enterNegativeFromPositive = enter && !currShapeIsPositive && ix.surroundCount == 2 && ix.surroundIsPositive;\n if (exitPositive || enterNegativeFromPositive) {\n shapeIntersection.exit = surfaceIntersection;\n\n // entry and exit have been found, so the loop can stop\n if (exitPositive) {\n // After exiting positive shape there is nothing left to intersect, so jump to the end index.\n ix.index = passCount;\n }\n break;\n }\n }\n\n return shapeIntersection;\n}\n#endif\n\n// NOTE: initializeIntersections, nextIntersection aren't even declared unless INTERSECTION_COUNT > 1\n","// See Octree.glsl for the definitions of SampleData and intMod\n\n/* Megatexture defines (set in Scene/VoxelRenderResources.js)\n#define SAMPLE_COUNT ###\n#define NEAREST_SAMPLING\n#define PADDING\n*/\n\nuniform ivec2 u_megatextureSliceDimensions; // number of slices per tile, in two dimensions\nuniform ivec2 u_megatextureTileDimensions; // number of tiles per megatexture, in two dimensions\nuniform vec2 u_megatextureVoxelSizeUv;\nuniform vec2 u_megatextureSliceSizeUv;\nuniform vec2 u_megatextureTileSizeUv;\n\nuniform ivec3 u_dimensions; // does not include padding\n#if defined(PADDING)\n uniform ivec3 u_paddingBefore;\n uniform ivec3 u_paddingAfter;\n#endif\n\n// Integer min, max, clamp: For WebGL1 only\nint intMin(int a, int b) {\n return a <= b ? a : b;\n}\nint intMax(int a, int b) {\n return a >= b ? a : b;\n}\nint intClamp(int v, int minVal, int maxVal) {\n return intMin(intMax(v, minVal), maxVal);\n}\n\nvec2 index1DTo2DTexcoord(int index, ivec2 dimensions, vec2 uvScale)\n{\n int indexX = intMod(index, dimensions.x);\n int indexY = index / dimensions.x;\n return vec2(indexX, indexY) * uvScale;\n}\n\n/*\n How is 3D data stored in a 2D megatexture?\n\n In this example there is only one loaded tile and it has 2x2x2 voxels (8 voxels total).\n The data is sliced by Z. The data at Z = 0 is placed in texels (0,0), (0,1), (1,0), (1,1) and\n the data at Z = 1 is placed in texels (2,0), (2,1), (3,0), (3,1).\n Note that there could be empty space in the megatexture because it's a power of two.\n\n 0 1 2 3\n +---+---+---+---+\n | | | | | 3\n +---+---+---+---+\n | | | | | 2\n +-------+-------+\n |010|110|011|111| 1\n |--- ---|--- ---|\n |000|100|001|101| 0\n +-------+-------+\n\n When doing linear interpolation the megatexture needs to be sampled twice: once for\n the Z slice above the voxel coordinate and once for the slice below. The two slices\n are interpolated with fract(coord.z - 0.5). For example, a Z coordinate of 1.0 is\n halfway between two Z slices so the interpolation factor is 0.5. Below is a side view\n of the 3D voxel grid with voxel coordinates on the left side.\n\n 2 +---+\n |001|\n 1 +-z-+\n |000|\n 0 +---+\n\n When doing nearest neighbor the megatexture only needs to be sampled once at the closest Z slice.\n*/\n\nProperties getPropertiesFromMegatexture(in SampleData sampleData) {\n int tileIndex = sampleData.megatextureIndex;\n vec3 voxelCoord = sampleData.tileUv * vec3(u_dimensions);\n ivec3 voxelDimensions = u_dimensions;\n\n #if defined(PADDING)\n voxelDimensions += u_paddingBefore + u_paddingAfter;\n voxelCoord += vec3(u_paddingBefore);\n #endif\n\n #if defined(NEAREST_SAMPLING)\n // Round to the center of the nearest voxel\n voxelCoord = floor(voxelCoord) + vec3(0.5);\n #endif\n\n // Tile location\n vec2 tileUvOffset = index1DTo2DTexcoord(tileIndex, u_megatextureTileDimensions, u_megatextureTileSizeUv);\n\n // Slice location\n float slice = voxelCoord.z - 0.5;\n int sliceIndex = int(floor(slice));\n int sliceIndex0 = intClamp(sliceIndex, 0, voxelDimensions.z - 1);\n vec2 sliceUvOffset0 = index1DTo2DTexcoord(sliceIndex0, u_megatextureSliceDimensions, u_megatextureSliceSizeUv);\n\n // Voxel location\n vec2 voxelUvOffset = clamp(voxelCoord.xy, vec2(0.5), vec2(voxelDimensions.xy) - vec2(0.5)) * u_megatextureVoxelSizeUv;\n\n // Final location in the megatexture\n vec2 uv0 = tileUvOffset + sliceUvOffset0 + voxelUvOffset;\n\n #if defined(NEAREST_SAMPLING)\n return getPropertiesFromMegatextureAtUv(uv0);\n #else\n float sliceLerp = fract(slice);\n int sliceIndex1 = intMin(sliceIndex + 1, voxelDimensions.z - 1);\n vec2 sliceUvOffset1 = index1DTo2DTexcoord(sliceIndex1, u_megatextureSliceDimensions, u_megatextureSliceSizeUv);\n vec2 uv1 = tileUvOffset + sliceUvOffset1 + voxelUvOffset;\n Properties properties0 = getPropertiesFromMegatextureAtUv(uv0);\n Properties properties1 = getPropertiesFromMegatextureAtUv(uv1);\n return mixProperties(properties0, properties1, sliceLerp);\n #endif\n}\n\n// Convert an array of sample datas to a final weighted properties.\nProperties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_COUNT]) {\n #if (SAMPLE_COUNT == 1)\n return getPropertiesFromMegatexture(sampleDatas[0]);\n #else\n // When more than one sample is taken the accumulator needs to start at 0\n Properties properties = clearProperties();\n for (int i = 0; i < SAMPLE_COUNT; ++i) {\n float weight = sampleDatas[i].weight;\n\n // Avoid reading the megatexture when the weight is 0 as it can be costly.\n if (weight > 0.0) {\n Properties tempProperties = getPropertiesFromMegatexture(sampleDatas[i]);\n tempProperties = scaleProperties(tempProperties, weight);\n properties = sumProperties(properties, tempProperties);\n }\n }\n return properties;\n #endif\n}\n"]),s>0&&(t.addDefine("CLIPPING_PLANES",void 0,Ee.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",s,Ee.FRAGMENT),r.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,Ee.FRAGMENT),t.addFragmentLines(["// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT,\n// NO_HIT, setShapeIntersection\n\n/* Clipping plane defines (set in Scene/VoxelRenderResources.js)\n#define CLIPPING_PLANES_UNION\n#define CLIPPING_PLANES_COUNT\n#define CLIPPING_PLANES_INTERSECTION_INDEX\n*/\n\nuniform sampler2D u_clippingPlanesTexture;\nuniform mat4 u_clippingPlanesMatrix;\n\n// Plane is in Hessian Normal Form\nvec4 intersectPlane(in Ray ray, in vec4 plane) {\n vec3 n = plane.xyz; // normal\n float w = plane.w; // -dot(pointOnPlane, normal)\n\n float a = dot(ray.pos, n);\n float b = dot(ray.dir, n);\n float t = -(w + a) / b;\n\n return vec4(n, t);\n}\n\nvoid intersectClippingPlanes(in Ray ray, inout Intersections ix) {\n vec4 backSide = vec4(-ray.dir, -INF_HIT);\n vec4 farSide = vec4(ray.dir, +INF_HIT);\n RayShapeIntersection clippingVolume;\n\n #if (CLIPPING_PLANES_COUNT == 1)\n // Union and intersection are the same when there's one clipping plane, and the code\n // is more simplified.\n vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, 0, u_clippingPlanesMatrix);\n vec4 intersection = intersectPlane(ray, planeUv);\n bool reflects = dot(ray.dir, intersection.xyz) < 0.0;\n clippingVolume.entry = reflects ? backSide : intersection;\n clippingVolume.exit = reflects ? intersection : farSide;\n setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);\n #elif defined(CLIPPING_PLANES_UNION)\n vec4 firstTransmission = vec4(ray.dir, +INF_HIT);\n vec4 lastReflection = vec4(-ray.dir, -INF_HIT);\n for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {\n vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i, u_clippingPlanesMatrix);\n vec4 intersection = intersectPlane(ray, planeUv);\n if (dot(ray.dir, planeUv.xyz) > 0.0) {\n firstTransmission = intersection.w <= firstTransmission.w ? intersection : firstTransmission;\n } else {\n lastReflection = intersection.w >= lastReflection.w ? intersection : lastReflection;\n }\n }\n clippingVolume.entry = backSide;\n clippingVolume.exit = lastReflection;\n setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 0, clippingVolume);\n clippingVolume.entry = firstTransmission;\n clippingVolume.exit = farSide;\n setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 1, clippingVolume);\n #else // intersection\n vec4 lastTransmission = vec4(ray.dir, -INF_HIT);\n vec4 firstReflection = vec4(-ray.dir, +INF_HIT);\n for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {\n vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i, u_clippingPlanesMatrix);\n vec4 intersection = intersectPlane(ray, planeUv);\n if (dot(ray.dir, planeUv.xyz) > 0.0) {\n lastTransmission = intersection.w > lastTransmission.w ? intersection : lastTransmission;\n } else {\n firstReflection = intersection.w < firstReflection.w ? intersection: firstReflection;\n }\n }\n if (lastTransmission.w < firstReflection.w) {\n clippingVolume.entry = lastTransmission;\n clippingVolume.exit = firstReflection;\n } else {\n clippingVolume.entry = vec4(-ray.dir, NO_HIT);\n clippingVolume.exit = vec4(ray.dir, NO_HIT);\n }\n setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);\n #endif\n}\n"])),e._depthTest&&(t.addDefine("DEPTH_TEST",void 0,Ee.FRAGMENT),t.addFragmentLines(["// See IntersectionUtils.glsl for the definitions of Ray, Intersections,\n// setIntersectionPair, INF_HIT, NO_HIT\n\n/* intersectDepth defines (set in Scene/VoxelRenderResources.js)\n#define DEPTH_INTERSECTION_INDEX ###\n*/\n\nuniform mat4 u_transformPositionViewToUv;\n\nvoid intersectDepth(in vec2 screenCoord, in Ray ray, inout Intersections ix) {\n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));\n if (logDepthOrDepth != 0.0) {\n // Calculate how far the ray must travel before it hits the depth buffer.\n vec4 eyeCoordinateDepth = czm_screenToEyeCoordinates(screenCoord, logDepthOrDepth);\n eyeCoordinateDepth /= eyeCoordinateDepth.w;\n vec3 depthPositionUv = vec3(u_transformPositionViewToUv * eyeCoordinateDepth);\n float t = dot(depthPositionUv - ray.pos, ray.dir);\n setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(t, +INF_HIT));\n } else {\n // There's no depth at this location.\n setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(NO_HIT));\n }\n}\n"]));const a=e._provider.shape;"BOX"===a?t.addFragmentLines(["/* Box defines (set in Scene/VoxelBoxShape.js)\n#define BOX_HAS_SHAPE_BOUNDS\n*/\n\n#if defined(BOX_HAS_SHAPE_BOUNDS)\n uniform vec3 u_boxUvToShapeUvScale;\n uniform vec3 u_boxUvToShapeUvTranslate;\n#endif\n\nPointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {\n // For BOX, UV space = shape space, so we can use positionUv as-is,\n // and the Jacobian is the identity matrix, except that a step of 1\n // only spans half the shape space [-1, 1], so the identity is scaled.\n return PointJacobianT(positionUv, mat3(0.5));\n}\n\nvec3 convertShapeToShapeUvSpace(in vec3 positionShape) {\n#if defined(BOX_HAS_SHAPE_BOUNDS)\n return positionShape * u_boxUvToShapeUvScale + u_boxUvToShapeUvTranslate;\n#else\n return positionShape;\n#endif\n}\n\nPointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) {\n PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv);\n pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point);\n return pointJacobian;\n}\n\nvec3 convertShapeUvToUvSpace(in vec3 shapeUv) {\n#if defined(BOX_HAS_SHAPE_BOUNDS)\n return (shapeUv - u_boxUvToShapeUvTranslate) / u_boxUvToShapeUvScale;\n#else\n return shapeUv;\n#endif\n}\n\nvec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {\n#if defined(BOX_HAS_SHAPE_BOUNDS)\n return shapeUv / u_boxUvToShapeUvScale;\n#else\n return shapeUv;\n#endif\n}","// See IntersectionUtils.glsl for the definitions of Ray, RayShapeIntersection,\n// NO_HIT, Intersections\n\n/* Box defines (set in Scene/VoxelBoxShape.js)\n#define BOX_INTERSECTION_INDEX ### // always 0\n*/\n\nuniform vec3 u_renderMinBounds;\nuniform vec3 u_renderMaxBounds;\n\nRayShapeIntersection intersectBox(in Ray ray, in vec3 minBound, in vec3 maxBound)\n{\n // Consider the box as the intersection of the space between 3 pairs of parallel planes\n // Compute the distance along the ray to each plane\n vec3 t0 = (minBound - ray.pos) / ray.dir;\n vec3 t1 = (maxBound - ray.pos) / ray.dir;\n\n // Identify candidate entries/exits based on distance from ray.pos\n vec3 entries = min(t0, t1);\n vec3 exits = max(t0, t1);\n\n vec3 directions = sign(ray.dir);\n\n // The actual intersection points are the furthest entry and the closest exit\n float lastEntry = maxComponent(entries);\n bvec3 isLastEntry = equal(entries, vec3(lastEntry));\n vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;\n vec4 entry = vec4(entryNormal, lastEntry);\n\n float firstExit = minComponent(exits);\n bvec3 isFirstExit = equal(exits, vec3(firstExit));\n vec3 exitNormal = vec3(isLastEntry) * directions;\n vec4 exit = vec4(exitNormal, firstExit);\n\n if (entry.w > exit.w) {\n entry.w = NO_HIT;\n exit.w = NO_HIT;\n }\n\n return RayShapeIntersection(entry, exit);\n}\n\nvoid intersectShape(in Ray ray, inout Intersections ix)\n{\n RayShapeIntersection intersection = intersectBox(ray, u_renderMinBounds, u_renderMaxBounds);\n setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection);\n}\n",Sk]):"CYLINDER"===a?t.addFragmentLines(["/* Cylinder defines (set in Scene/VoxelCylinderShape.js)\n#define CYLINDER_HAS_SHAPE_BOUNDS_RADIUS\n#define CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY\n#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED\n*/\n\n#if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)\n uniform vec2 u_cylinderUvToShapeUvRadius; // x = scale, y = offset\n#endif\n#if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)\n uniform vec2 u_cylinderUvToShapeUvHeight; // x = scale, y = offset\n#endif\n#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)\n uniform vec2 u_cylinderUvToShapeUvAngle; // x = scale, y = offset\n#endif\n#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY)\n uniform vec2 u_cylinderShapeUvAngleMinMax;\n#endif\n#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED)\n uniform float u_cylinderShapeUvAngleRangeZeroMid;\n#endif\n\nPointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {\n // Convert from Cartesian UV space [0, 1] to Cartesian local space [-1, 1]\n vec3 position = positionUv * 2.0 - 1.0;\n\n float radius = length(position.xy); // [0, 1]\n vec3 radial = normalize(vec3(position.xy, 0.0));\n\n // Shape space height is defined within [0, 1]\n float height = positionUv.z; // [0, 1]\n vec3 z = vec3(0.0, 0.0, 1.0);\n\n float angle = atan(position.y, position.x);\n vec3 east = normalize(vec3(-position.y, position.x, 0.0));\n\n vec3 point = vec3(radius, height, angle);\n mat3 jacobianT = mat3(radial, z, east / length(position.xy));\n return PointJacobianT(point, jacobianT);\n}\n\nvec3 convertShapeToShapeUvSpace(in vec3 positionShape) {\n float radius = positionShape.x;\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)\n radius = radius * u_cylinderUvToShapeUvRadius.x + u_cylinderUvToShapeUvRadius.y;\n #endif\n\n float height = positionShape.y;\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)\n height = height * u_cylinderUvToShapeUvHeight.x + u_cylinderUvToShapeUvHeight.y;\n #endif\n\n float angle = (positionShape.z + czm_pi) / czm_twoPi;\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED)\n // Comparing against u_cylinderShapeUvAngleMinMax has precision problems. u_cylinderShapeUvAngleRangeZeroMid is more conservative.\n angle += float(angle < u_cylinderShapeUvAngleRangeZeroMid);\n #endif\n\n // Avoid flickering from reading voxels from both sides of the -pi/+pi discontinuity.\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY)\n angle = angle > u_cylinderShapeUvAngleRangeZeroMid ? u_cylinderShapeUvAngleMinMax.x : angle;\n #elif defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY)\n angle = angle < u_cylinderShapeUvAngleRangeZeroMid ? u_cylinderShapeUvAngleMinMax.y : angle;\n #endif\n\n angle = angle * u_cylinderUvToShapeUvAngle.x + u_cylinderUvToShapeUvAngle.y;\n #endif\n\n return vec3(radius, height, angle);\n}\n\nPointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) {\n PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv);\n pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point);\n return pointJacobian;\n}\n\nvec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {\n float radius = shapeUv.x;\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)\n radius /= u_cylinderUvToShapeUvRadius.x;\n #endif\n\n float height = shapeUv.y;\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)\n height /= u_cylinderUvToShapeUvHeight.x;\n #endif\n\n float angle = shapeUv.z * czm_twoPi;\n #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)\n angle /= u_cylinderUvToShapeUvAngle.x;\n #endif\n\n return vec3(radius, height, angle);\n}\n",ste,"// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, Intersections,\n// RayShapeIntersection, setSurfaceIntersection, setShapeIntersection,\n// intersectIntersections\n// See IntersectLongitude.glsl for the definitions of intersectHalfPlane,\n// intersectFlippedWedge, intersectRegularWedge\n\n/* Cylinder defines (set in Scene/VoxelCylinderShape.js)\n#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN\n#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT\n#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE\n#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF\n#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF\n#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO\n\n#define CYLINDER_INTERSECTION_INDEX_RADIUS_MAX\n#define CYLINDER_INTERSECTION_INDEX_RADIUS_MIN\n#define CYLINDER_INTERSECTION_INDEX_ANGLE\n*/\n\n// Cylinder uniforms\nuniform vec2 u_cylinderRenderRadiusMinMax;\nuniform vec2 u_cylinderRenderHeightMinMax;\n#if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE)\n uniform vec2 u_cylinderRenderAngleMinMax;\n#endif\n\n/**\n * Find the intersection of a ray with the volume defined by two planes of constant z\n */\nRayShapeIntersection intersectHeightBounds(in Ray ray, in vec2 minMaxHeight, in bool convex)\n{\n float zPosition = ray.pos.z;\n float zDirection = ray.dir.z;\n\n float tmin = (minMaxHeight.x - zPosition) / zDirection;\n float tmax = (minMaxHeight.y - zPosition) / zDirection;\n\n // Normals point outside the volume\n float signFlip = convex ? 1.0 : -1.0;\n vec4 intersectMin = vec4(0.0, 0.0, -1.0 * signFlip, tmin);\n vec4 intersectMax = vec4(0.0, 0.0, 1.0 * signFlip, tmax);\n\n bool topEntry = zDirection < 0.0;\n vec4 entry = topEntry ? intersectMax : intersectMin;\n vec4 exit = topEntry ? intersectMin : intersectMax;\n\n return RayShapeIntersection(entry, exit);\n}\n\n/**\n * Find the intersection of a ray with a right cylindrical surface of a given radius\n * about the z-axis.\n */\nRayShapeIntersection intersectCylinder(in Ray ray, in float radius, in bool convex)\n{\n vec2 position = ray.pos.xy;\n vec2 direction = ray.dir.xy;\n\n float a = dot(direction, direction);\n float b = dot(position, direction);\n float c = dot(position, position) - radius * radius;\n float determinant = b * b - a * c;\n\n if (determinant < 0.0) {\n vec4 miss = vec4(normalize(ray.dir), NO_HIT);\n return RayShapeIntersection(miss, miss);\n }\n\n determinant = sqrt(determinant);\n float t1 = (-b - determinant) / a;\n float t2 = (-b + determinant) / a;\n float signFlip = convex ? 1.0 : -1.0;\n vec4 intersect1 = vec4(normalize(position + t1 * direction) * signFlip, 0.0, t1);\n vec4 intersect2 = vec4(normalize(position + t2 * direction) * signFlip, 0.0, t2);\n\n return RayShapeIntersection(intersect1, intersect2);\n}\n\n/**\n * Find the intersection of a ray with a right cylindrical solid of given\n * radius and height bounds. NOTE: The shape is assumed to be convex.\n */\nRayShapeIntersection intersectBoundedCylinder(in Ray ray, in float radius, in vec2 minMaxHeight)\n{\n RayShapeIntersection cylinderIntersection = intersectCylinder(ray, radius, true);\n RayShapeIntersection heightBoundsIntersection = intersectHeightBounds(ray, minMaxHeight, true);\n return intersectIntersections(ray, cylinderIntersection, heightBoundsIntersection);\n}\n\nvoid intersectShape(Ray ray, inout Intersections ix)\n{\n // Position is converted from [0,1] to [-1,+1] because shape intersections assume unit space is [-1,+1].\n // Direction is scaled as well to be in sync with position.\n ray.pos = ray.pos * 2.0 - 1.0;\n ray.dir *= 2.0;\n\n RayShapeIntersection outerIntersect = intersectBoundedCylinder(ray, u_cylinderRenderRadiusMinMax.y, u_cylinderRenderHeightMinMax);\n\n setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MAX, outerIntersect);\n\n if (outerIntersect.entry.w == NO_HIT) {\n return;\n }\n\n #if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT)\n // When the cylinder is perfectly thin it's necessary to sandwich the\n // inner cylinder intersection inside the outer cylinder intersection.\n\n // Without this special case,\n // [outerMin, outerMax, innerMin, innerMax] will bubble sort to\n // [outerMin, innerMin, outerMax, innerMax] which will cause the back\n // side of the cylinder to be invisible because it will think the ray\n // is still inside the inner (negative) cylinder after exiting the\n // outer (positive) cylinder.\n\n // With this special case,\n // [outerMin, innerMin, innerMax, outerMax] will bubble sort to\n // [outerMin, innerMin, innerMax, outerMax] which will work correctly.\n\n // Note: If initializeIntersections() changes its sorting function\n // from bubble sort to something else, this code may need to change.\n RayShapeIntersection innerIntersect = intersectCylinder(ray, 1.0, false);\n setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter\n setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter\n setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit\n setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit\n #elif defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN)\n RayShapeIntersection innerIntersect = intersectCylinder(ray, u_cylinderRenderRadiusMinMax.x, false);\n setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MIN, innerIntersect);\n #endif\n\n #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF)\n RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_cylinderRenderAngleMinMax);\n setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE, wedgeIntersect);\n #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF)\n RayShapeIntersection wedgeIntersects[2];\n intersectFlippedWedge(ray, u_cylinderRenderAngleMinMax, wedgeIntersects);\n setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);\n setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);\n #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO)\n RayShapeIntersection wedgeIntersects[2];\n intersectHalfPlane(ray, u_cylinderRenderAngleMinMax.x, wedgeIntersects);\n setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);\n setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);\n #endif\n}\n",Sk]):"ELLIPSOID"===a&&(t.addDefine("SHAPE_ELLIPSOID",void 0,Ee.FRAGMENT),t.addFragmentLines(["/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY\n#define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE\n#define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED\n#define ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE\n*/\n\nuniform vec3 u_ellipsoidRadiiUv; // [0,1]\nuniform vec2 u_evoluteScale; // (radiiUv.x ^ 2 - radiiUv.z ^ 2) * vec2(1.0, -1.0) / radiiUv;\nuniform vec3 u_ellipsoidInverseRadiiSquaredUv;\n#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY) || defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED)\n uniform vec3 u_ellipsoidShapeUvLongitudeMinMaxMid;\n#endif\n#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)\n uniform vec2 u_ellipsoidUvToShapeUvLongitude; // x = scale, y = offset\n#endif\n#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)\n uniform vec2 u_ellipsoidUvToShapeUvLatitude; // x = scale, y = offset\n#endif\nuniform float u_ellipsoidInverseHeightDifferenceUv;\n\n// robust iterative solution without trig functions\n// https://github.com/0xfaded/ellipse_demo/issues/1\n// https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse\n// Extended to return radius of curvature along with the point\nvec3 nearestPointAndRadiusOnEllipse(vec2 pos, vec2 radii) {\n vec2 p = abs(pos);\n vec2 inverseRadii = 1.0 / radii;\n\n // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))\n // but store the cos and sin of t in a vec2 for efficiency.\n // Initial guess: t = pi/4\n vec2 tTrigs = vec2(0.7071067811865476);\n // Initial guess of point on ellipsoid\n vec2 v = radii * tTrigs;\n // Center of curvature of the ellipse at v\n vec2 evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;\n\n const int iterations = 3;\n for (int i = 0; i < iterations; ++i) {\n // Find the (approximate) intersection of p - evolute with the ellipsoid.\n vec2 q = normalize(p - evolute) * length(v - evolute);\n // Update the estimate of t.\n tTrigs = (q + evolute) * inverseRadii;\n tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));\n v = radii * tTrigs;\n evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;\n }\n\n return vec3(v * sign(pos), length(v - evolute));\n}\n\nPointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {\n // Convert from UV space [0, 1] to local space [-1, 1]\n vec3 position = positionUv * 2.0 - 1.0;\n // Undo the scaling from ellipsoid to sphere\n position = position * u_ellipsoidRadiiUv;\n\n float longitude = atan(position.y, position.x);\n vec3 east = normalize(vec3(-position.y, position.x, 0.0));\n\n // Convert the 3D position to a 2D position relative to the ellipse (radii.x, radii.z)\n // (assume radii.y == radii.x) and find the nearest point on the ellipse and its normal\n float distanceFromZAxis = length(position.xy);\n vec2 posEllipse = vec2(distanceFromZAxis, position.z);\n vec3 surfacePointAndRadius = nearestPointAndRadiusOnEllipse(posEllipse, u_ellipsoidRadiiUv.xz);\n vec2 surfacePoint = surfacePointAndRadius.xy;\n\n vec2 normal2d = normalize(surfacePoint * u_ellipsoidInverseRadiiSquaredUv.xz);\n float latitude = atan(normal2d.y, normal2d.x);\n vec3 north = vec3(-normal2d.y * normalize(position.xy), abs(normal2d.x));\n\n float heightSign = length(posEllipse) < length(surfacePoint) ? -1.0 : 1.0;\n float height = heightSign * length(posEllipse - surfacePoint);\n vec3 up = normalize(cross(east, north));\n\n vec3 point = vec3(longitude, latitude, height);\n mat3 jacobianT = mat3(east / distanceFromZAxis, north / (surfacePointAndRadius.z + height), up);\n return PointJacobianT(point, jacobianT);\n}\n\nvec3 convertShapeToShapeUvSpace(in vec3 positionShape) {\n // Longitude: shift & scale to [0, 1]\n float longitude = (positionShape.x + czm_pi) / czm_twoPi;\n\n // Correct the angle when max < min\n // Technically this should compare against min longitude - but it has precision problems so compare against the middle of empty space.\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED)\n longitude += float(longitude < u_ellipsoidShapeUvLongitudeMinMaxMid.z);\n #endif\n\n // Avoid flickering from reading voxels from both sides of the -pi/+pi discontinuity.\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY)\n longitude = longitude > u_ellipsoidShapeUvLongitudeMinMaxMid.z ? u_ellipsoidShapeUvLongitudeMinMaxMid.x : longitude;\n #endif\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY)\n longitude = longitude < u_ellipsoidShapeUvLongitudeMinMaxMid.z ? u_ellipsoidShapeUvLongitudeMinMaxMid.y : longitude;\n #endif\n\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)\n longitude = longitude * u_ellipsoidUvToShapeUvLongitude.x + u_ellipsoidUvToShapeUvLongitude.y;\n #endif\n\n // Latitude: shift and scale to [0, 1]\n float latitude = (positionShape.y + czm_piOverTwo) / czm_pi;\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)\n latitude = latitude * u_ellipsoidUvToShapeUvLatitude.x + u_ellipsoidUvToShapeUvLatitude.y;\n #endif\n\n // Height: scale to the range [0, 1]\n float height = 1.0 + positionShape.z * u_ellipsoidInverseHeightDifferenceUv;\n\n return vec3(longitude, latitude, height);\n}\n\nPointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) {\n PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv);\n pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point);\n return pointJacobian;\n}\n\nvec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {\n // Convert from [0, 1] to radians [-pi, pi]\n float longitude = shapeUv.x * czm_twoPi;\n #if defined (ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)\n longitude /= u_ellipsoidUvToShapeUvLongitude.x;\n #endif\n\n // Convert from [0, 1] to radians [-pi/2, pi/2]\n float latitude = shapeUv.y * czm_pi;\n #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)\n latitude /= u_ellipsoidUvToShapeUvLatitude.x;\n #endif\n \n float height = shapeUv.z / u_ellipsoidInverseHeightDifferenceUv;\n\n return vec3(longitude, latitude, height);\n}\n",ste,"// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, Intersections,\n// RayShapeIntersection, setSurfaceIntersection, setShapeIntersection\n// See IntersectLongitude.glsl for the definitions of intersectHalfPlane,\n// intersectFlippedWedge, intersectRegularWedge\n\n/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF\n#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF\n#define ELLIPSOID_INTERSECTION_INDEX_LONGITUDE\n#define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX\n#define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN\n#define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX\n#define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN\n*/\n\n#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE)\n uniform vec2 u_ellipsoidRenderLongitudeMinMax;\n#endif\nuniform float u_eccentricitySquared;\nuniform vec2 u_ellipsoidRenderLatitudeSinMinMax;\nuniform vec2 u_clipMinMaxHeight;\n\nRayShapeIntersection intersectZPlane(in Ray ray, in float z) {\n float t = -ray.pos.z / ray.dir.z;\n\n bool startsOutside = sign(ray.pos.z) == sign(z);\n bool entry = (t >= 0.0) != startsOutside;\n\n vec4 intersect = vec4(0.0, 0.0, z, t);\n vec4 farSide = vec4(normalize(ray.dir), INF_HIT);\n\n if (entry) {\n return RayShapeIntersection(intersect, farSide);\n } else {\n return RayShapeIntersection(-1.0 * farSide, intersect);\n }\n}\n\nRayShapeIntersection intersectHeight(in Ray ray, in float relativeHeight, in bool convex)\n{\n // Scale the ray by the ellipsoid axes to make it a unit sphere\n // Note: approximating ellipsoid + height as an ellipsoid\n vec3 radiiCorrection = u_ellipsoidRadiiUv / (u_ellipsoidRadiiUv + relativeHeight);\n vec3 position = ray.pos * radiiCorrection;\n vec3 direction = ray.dir * radiiCorrection;\n\n float a = dot(direction, direction); // ~ 1.0 (or maybe 4.0 if ray is scaled)\n float b = dot(direction, position); // roughly inside [-1.0, 1.0] when zoomed in\n float c = dot(position, position) - 1.0; // ~ 0.0 when zoomed in.\n float determinant = b * b - a * c; // ~ b * b when zoomed in\n\n if (determinant < 0.0) {\n vec4 miss = vec4(normalize(direction), NO_HIT);\n return RayShapeIntersection(miss, miss);\n }\n\n determinant = sqrt(determinant);\n\n // Compute larger root using standard formula\n float signB = b < 0.0 ? -1.0 : 1.0;\n // The other root may suffer from subtractive cancellation in the standard formula.\n // Compute it from the first root instead.\n float t1 = (-b - signB * determinant) / a;\n float t2 = c / (a * t1);\n float tmin = min(t1, t2);\n float tmax = max(t1, t2);\n\n float directionScale = convex ? 1.0 : -1.0;\n vec3 d1 = directionScale * normalize(position + tmin * direction);\n vec3 d2 = directionScale * normalize(position + tmax * direction);\n\n return RayShapeIntersection(vec4(d1, tmin), vec4(d2, tmax));\n}\n\n/**\n * Given a circular cone around the z-axis, with apex at the origin,\n * find the parametric distance(s) along a ray where that ray intersects\n * the cone.\n * The cone opening angle is described by the squared cosine of\n * its half-angle (the angle between the Z-axis and the surface)\n */\nvec2 intersectDoubleEndedCone(in Ray ray, in float cosSqrHalfAngle)\n{\n vec3 o = ray.pos;\n vec3 d = ray.dir;\n float sinSqrHalfAngle = 1.0 - cosSqrHalfAngle;\n\n float aSin = d.z * d.z * sinSqrHalfAngle;\n float aCos = -dot(d.xy, d.xy) * cosSqrHalfAngle;\n float a = aSin + aCos;\n\n float bSin = d.z * o.z * sinSqrHalfAngle;\n float bCos = -dot(o.xy, d.xy) * cosSqrHalfAngle;\n float b = bSin + bCos;\n\n float cSin = o.z * o.z * sinSqrHalfAngle;\n float cCos = -dot(o.xy, o.xy) * cosSqrHalfAngle;\n float c = cSin + cCos;\n // determinant = b * b - a * c. But bSin * bSin = aSin * cSin.\n // Avoid subtractive cancellation by expanding to eliminate these terms\n float determinant = 2.0 * bSin * bCos + bCos * bCos - aSin * cCos - aCos * cSin - aCos * cCos;\n\n if (determinant < 0.0) {\n return vec2(NO_HIT);\n } else if (a == 0.0) {\n // Ray is parallel to cone surface\n return (b == 0.0)\n ? vec2(NO_HIT) // Ray is on cone surface\n : vec2(-0.5 * c / b, NO_HIT);\n }\n\n determinant = sqrt(determinant);\n\n // Compute larger root using standard formula\n float signB = b < 0.0 ? -1.0 : 1.0;\n float t1 = (-b - signB * determinant) / a;\n // The other root may suffer from subtractive cancellation in the standard formula.\n // Compute it from the first root instead.\n float t2 = c / (a * t1);\n float tmin = min(t1, t2);\n float tmax = max(t1, t2);\n return vec2(tmin, tmax);\n}\n\n/**\n * Given a point on a conical surface, find the surface normal at that point.\n */\nvec3 getConeNormal(in vec3 p, in bool convex) {\n // Start with radial component pointing toward z-axis\n vec2 radial = -abs(p.z) * normalize(p.xy);\n // Z component points toward opening of cone\n float zSign = (p.z < 0.0) ? -1.0 : 1.0;\n float z = length(p.xy) * zSign;\n // Flip normal if shape is convex\n float flip = (convex) ? -1.0 : 1.0;\n return normalize(vec3(radial, z) * flip);\n}\n\n/**\n * Compute the shift between the ellipsoid origin and the apex of a cone of latitude\n */\nfloat getLatitudeConeShift(in float sinLatitude) {\n // Find prime vertical radius of curvature: \n // the distance along the ellipsoid normal to the intersection with the z-axis\n float x2 = u_eccentricitySquared * sinLatitude * sinLatitude;\n float primeVerticalRadius = inversesqrt(1.0 - x2);\n\n // Compute a shift from the origin to the intersection of the cone with the z-axis\n return primeVerticalRadius * u_eccentricitySquared * sinLatitude;\n}\n\nvoid intersectFlippedCone(in Ray ray, in float cosHalfAngle, out RayShapeIntersection intersections[2]) {\n // Undo the scaling from ellipsoid to sphere\n ray.pos = ray.pos * u_ellipsoidRadiiUv;\n ray.dir = ray.dir * u_ellipsoidRadiiUv;\n // Shift the ray to account for the latitude cone not being centered at the Earth center\n ray.pos.z += getLatitudeConeShift(cosHalfAngle);\n\n float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;\n vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);\n\n vec4 miss = vec4(normalize(ray.dir), NO_HIT);\n vec4 farSide = vec4(normalize(ray.dir), INF_HIT);\n\n // Initialize output with no intersections\n intersections[0].entry = -1.0 * farSide;\n intersections[0].exit = farSide;\n intersections[1].entry = miss;\n intersections[1].exit = miss;\n\n if (intersect.x == NO_HIT) {\n return;\n }\n\n // Find the points of intersection\n float tmin = intersect.x;\n float tmax = intersect.y;\n vec3 p0 = ray.pos + tmin * ray.dir;\n vec3 p1 = ray.pos + tmax * ray.dir;\n\n vec4 intersect0 = vec4(getConeNormal(p0, true), tmin);\n vec4 intersect1 = vec4(getConeNormal(p1, true), tmax);\n\n bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);\n bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);\n\n if (p0InShadowCone && p1InShadowCone) {\n // no valid intersections\n } else if (p0InShadowCone) {\n intersections[0].exit = intersect1;\n } else if (p1InShadowCone) {\n intersections[0].entry = intersect0;\n } else {\n intersections[0].exit = intersect0;\n intersections[1].entry = intersect1;\n intersections[1].exit = farSide;\n }\n}\n\nRayShapeIntersection intersectRegularCone(in Ray ray, in float cosHalfAngle, in bool convex) {\n // Undo the scaling from ellipsoid to sphere\n ray.pos = ray.pos * u_ellipsoidRadiiUv;\n ray.dir = ray.dir * u_ellipsoidRadiiUv;\n // Shift the ray to account for the latitude cone not being centered at the Earth center\n ray.pos.z += getLatitudeConeShift(cosHalfAngle);\n\n float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;\n vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);\n\n vec4 miss = vec4(normalize(ray.dir), NO_HIT);\n vec4 farSide = vec4(normalize(ray.dir), INF_HIT);\n\n if (intersect.x == NO_HIT) {\n return RayShapeIntersection(miss, miss);\n }\n\n // Find the points of intersection\n float tmin = intersect.x;\n float tmax = intersect.y;\n vec3 p0 = ray.pos + tmin * ray.dir;\n vec3 p1 = ray.pos + tmax * ray.dir;\n\n vec4 intersect0 = vec4(getConeNormal(p0, convex), tmin);\n vec4 intersect1 = vec4(getConeNormal(p1, convex), tmax);\n\n bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);\n bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);\n\n if (p0InShadowCone && p1InShadowCone) {\n return RayShapeIntersection(miss, miss);\n } else if (p0InShadowCone) {\n return RayShapeIntersection(intersect1, farSide);\n } else if (p1InShadowCone) {\n return RayShapeIntersection(-1.0 * farSide, intersect0);\n } else {\n return RayShapeIntersection(intersect0, intersect1);\n }\n}\n\nvoid intersectShape(in Ray ray, inout Intersections ix) {\n // Position is converted from [0,1] to [-1,+1] because shape intersections assume unit space is [-1,+1].\n // Direction is scaled as well to be in sync with position.\n ray.pos = ray.pos * 2.0 - 1.0;\n ray.dir *= 2.0;\n\n // Outer ellipsoid\n RayShapeIntersection outerIntersect = intersectHeight(ray, u_clipMinMaxHeight.y, true);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX, outerIntersect);\n\n // Exit early if the outer ellipsoid was missed.\n if (outerIntersect.entry.w == NO_HIT) {\n return;\n }\n\n // Inner ellipsoid\n RayShapeIntersection innerIntersect = intersectHeight(ray, u_clipMinMaxHeight.x, false);\n\n if (innerIntersect.entry.w == NO_HIT) {\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN, innerIntersect);\n } else {\n // When the ellipsoid is large and thin it's possible for floating point math\n // to cause the ray to intersect the inner ellipsoid before the outer ellipsoid. \n // To prevent this from happening, clamp innerIntersect to outerIntersect and\n // sandwich the inner ellipsoid intersection inside the outer ellipsoid intersection.\n\n // Without this special case,\n // [outerMin, outerMax, innerMin, innerMax] will bubble sort to\n // [outerMin, innerMin, outerMax, innerMax] which will cause the back\n // side of the ellipsoid to be invisible because it will think the ray\n // is still inside the inner (negative) ellipsoid after exiting the\n // outer (positive) ellipsoid.\n\n // With this special case,\n // [outerMin, innerMin, innerMax, outerMax] will bubble sort to\n // [outerMin, innerMin, innerMax, outerMax] which will work correctly.\n\n // Note: If initializeIntersections() changes its sorting function\n // from bubble sort to something else, this code may need to change.\n innerIntersect.entry.w = max(innerIntersect.entry.w, outerIntersect.entry.w);\n innerIntersect.exit.w = min(innerIntersect.exit.w, outerIntersect.exit.w);\n setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter\n setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter\n setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit\n setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit\n }\n\n // Bottom cone\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF)\n RayShapeIntersection bottomConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, false);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF)\n RayShapeIntersection bottomConeIntersection = intersectZPlane(ray, -1.0);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF)\n RayShapeIntersection bottomConeIntersections[2];\n intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, bottomConeIntersections);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 0, bottomConeIntersections[0]);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 1, bottomConeIntersections[1]);\n #endif\n\n // Top cone\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF)\n RayShapeIntersection topConeIntersections[2];\n intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, topConeIntersections);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 0, topConeIntersections[0]);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 1, topConeIntersections[1]);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF)\n RayShapeIntersection topConeIntersection = intersectZPlane(ray, 1.0);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF)\n RayShapeIntersection topConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, false);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);\n #endif\n\n // Wedge\n #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO)\n RayShapeIntersection wedgeIntersects[2];\n intersectHalfPlane(ray, u_ellipsoidRenderLongitudeMinMax.x, wedgeIntersects);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF)\n RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_ellipsoidRenderLongitudeMinMax);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE, wedgeIntersect);\n #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF)\n RayShapeIntersection wedgeIntersects[2];\n intersectFlippedWedge(ray, u_ellipsoidRenderLongitudeMinMax, wedgeIntersects);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);\n setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);\n #endif\n}\n",Sk])),t.addFragmentLines(["// See Intersection.glsl for the definition of intersectScene\n// See IntersectionUtils.glsl for the definition of nextIntersection\n// See convertUvToBox.glsl, convertUvToCylinder.glsl, or convertUvToEllipsoid.glsl\n// for the definition of convertUvToShapeUvSpace. The appropriate function is \n// selected based on the VoxelPrimitive shape type, and added to the shader in\n// Scene/VoxelRenderResources.js.\n// See Octree.glsl for the definitions of TraversalData, SampleData,\n// traverseOctreeFromBeginning, and traverseOctreeFromExisting\n// See Megatexture.glsl for the definition of accumulatePropertiesFromMegatexture\n\n#define STEP_COUNT_MAX 1000 // Harcoded value because GLSL doesn't like variable length loops\n#if defined(PICKING_VOXEL)\n #define ALPHA_ACCUM_MAX 0.1\n#else\n #define ALPHA_ACCUM_MAX 0.98 // Must be > 0.0 and <= 1.0\n#endif\n\nuniform mat3 u_transformDirectionViewToLocal;\nuniform vec3 u_cameraPositionUv;\nuniform float u_stepSize;\n\n#if defined(PICKING)\n uniform vec4 u_pickColor;\n#endif\n\nvec3 getSampleSize(in int level) {\n vec3 sampleCount = exp2(float(level)) * vec3(u_dimensions);\n vec3 sampleSizeUv = 1.0 / sampleCount;\n return scaleShapeUvToShapeSpace(sampleSizeUv);\n}\n\n#define MINIMUM_STEP_SCALAR (0.02)\n#define SHIFT_FRACTION (0.001)\n\n/**\n * Given a coordinate within a tile, and sample spacings along a ray through\n * the coordinate, find the distance to the points where the ray entered and\n * exited the voxel cell, along with the surface normals at those points.\n * The surface normals are returned in shape space coordinates.\n */\nRayShapeIntersection getVoxelIntersection(in vec3 tileUv, in vec3 sampleSizeAlongRay) {\n vec3 voxelCoord = tileUv * vec3(u_dimensions);\n vec3 directions = sign(sampleSizeAlongRay);\n vec3 positiveDirections = max(directions, 0.0);\n vec3 entryCoord = mix(ceil(voxelCoord), floor(voxelCoord), positiveDirections);\n vec3 exitCoord = entryCoord + directions;\n\n vec3 distanceFromEntry = -abs((entryCoord - voxelCoord) * sampleSizeAlongRay);\n float lastEntry = maxComponent(distanceFromEntry);\n bvec3 isLastEntry = equal(distanceFromEntry, vec3(lastEntry));\n vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;\n vec4 entry = vec4(entryNormal, lastEntry);\n\n vec3 distanceToExit = abs((exitCoord - voxelCoord) * sampleSizeAlongRay);\n float firstExit = minComponent(distanceToExit);\n bvec3 isFirstExit = equal(distanceToExit, vec3(firstExit));\n vec3 exitNormal = vec3(isFirstExit) * directions;\n vec4 exit = vec4(exitNormal, firstExit);\n\n return RayShapeIntersection(entry, exit);\n}\n\nvec4 getStepSize(in SampleData sampleData, in Ray viewRay, in RayShapeIntersection shapeIntersection, in mat3 jacobianT, in float currentT) {\n // The Jacobian is computed in a space where the shape spans [-1, 1].\n // But the ray is marched in a space where the shape fills [0, 1].\n // So we need to scale the Jacobian by 2.\n vec3 gradient = 2.0 * viewRay.rawDir * jacobianT;\n vec3 sampleSizeAlongRay = getSampleSize(sampleData.tileCoords.w) / gradient;\n\n RayShapeIntersection voxelIntersection = getVoxelIntersection(sampleData.tileUv, sampleSizeAlongRay);\n\n // Transform normal from shape space to Cartesian space\n vec3 voxelNormal = normalize(jacobianT * voxelIntersection.entry.xyz);\n // Compare with the shape intersection, to choose the appropriate normal\n vec4 voxelEntry = vec4(voxelNormal, currentT + voxelIntersection.entry.w);\n vec4 entry = intersectionMax(shapeIntersection.entry, voxelEntry);\n\n float fixedStep = minComponent(abs(sampleSizeAlongRay)) * u_stepSize;\n float shift = fixedStep * SHIFT_FRACTION;\n float dt = voxelIntersection.exit.w + shift;\n if ((currentT + dt) > shapeIntersection.exit.w) {\n // Stop at end of shape\n dt = shapeIntersection.exit.w - currentT + shift;\n }\n float stepSize = clamp(dt, fixedStep * MINIMUM_STEP_SCALAR, fixedStep + shift);\n\n return vec4(entry.xyz, stepSize);\n}\n\nvec2 packIntToVec2(int value) {\n float shifted = float(value) / 255.0;\n float lowBits = fract(shifted);\n float highBits = floor(shifted) / 255.0;\n return vec2(highBits, lowBits);\n}\n\nvec2 packFloatToVec2(float value) {\n float lowBits = fract(value);\n float highBits = floor(value) / 255.0;\n return vec2(highBits, lowBits);\n}\n\nint getSampleIndex(in vec3 tileUv) {\n ivec3 voxelDimensions = u_dimensions;\n vec3 sampleCoordinate = tileUv * vec3(voxelDimensions);\n // tileUv = 1.0 is a valid coordinate but sampleIndex = voxelDimensions is not.\n // (tileUv = 1.0 corresponds to the last sample, at index = voxelDimensions - 1).\n // Clamp to [0, voxelDimensions - 0.5) to avoid numerical error before flooring\n vec3 maxCoordinate = vec3(voxelDimensions) - vec3(0.5);\n sampleCoordinate = clamp(sampleCoordinate, vec3(0.0), maxCoordinate);\n ivec3 sampleIndex = ivec3(floor(sampleCoordinate));\n #if defined(PADDING)\n voxelDimensions += u_paddingBefore + u_paddingAfter;\n sampleIndex += u_paddingBefore;\n #endif\n // Convert to a 1D index for lookup in a 1D data array\n return sampleIndex.x + voxelDimensions.x * (sampleIndex.y + voxelDimensions.y * sampleIndex.z);\n}\n\nvoid main()\n{\n vec4 fragCoord = gl_FragCoord;\n vec2 screenCoord = (fragCoord.xy - czm_viewport.xy) / czm_viewport.zw; // [0,1]\n vec3 eyeDirection = normalize(czm_windowToEyeCoordinates(fragCoord).xyz);\n vec3 viewDirWorld = normalize(czm_inverseViewRotation * eyeDirection); // normalize again just in case\n vec3 viewDirUv = normalize(u_transformDirectionViewToLocal * eyeDirection); // normalize again just in case\n vec3 viewPosUv = u_cameraPositionUv;\n #if defined(SHAPE_ELLIPSOID)\n // viewDirUv has been scaled to a space where the ellipsoid is a sphere.\n // Undo this scaling to get the raw direction.\n vec3 rawDir = viewDirUv * u_ellipsoidRadiiUv;\n Ray viewRayUv = Ray(viewPosUv, viewDirUv, rawDir);\n #else\n Ray viewRayUv = Ray(viewPosUv, viewDirUv, viewDirUv);\n #endif\n\n Intersections ix;\n RayShapeIntersection shapeIntersection = intersectScene(screenCoord, viewRayUv, ix);\n\n // Exit early if the scene was completely missed.\n if (shapeIntersection.entry.w == NO_HIT) {\n discard;\n }\n\n float currentT = shapeIntersection.entry.w;\n float endT = shapeIntersection.exit.w;\n vec3 positionUv = viewPosUv + currentT * viewDirUv;\n PointJacobianT pointJacobian = convertUvToShapeUvSpaceDerivative(positionUv);\n\n // Traverse the tree from the start position\n TraversalData traversalData;\n SampleData sampleDatas[SAMPLE_COUNT];\n traverseOctreeFromBeginning(pointJacobian.point, traversalData, sampleDatas);\n vec4 step = getStepSize(sampleDatas[0], viewRayUv, shapeIntersection, pointJacobian.jacobianT, currentT);\n\n #if defined(JITTER)\n float noise = hash(screenCoord); // [0,1]\n currentT += noise * step.w;\n positionUv += noise * step.w * viewDirUv;\n #endif\n\n FragmentInput fragmentInput;\n #if defined(STATISTICS)\n setStatistics(fragmentInput.metadata.statistics);\n #endif\n\n vec4 colorAccum = vec4(0.0);\n\n for (int stepCount = 0; stepCount < STEP_COUNT_MAX; ++stepCount) {\n // Read properties from the megatexture based on the traversal state\n Properties properties = accumulatePropertiesFromMegatexture(sampleDatas);\n\n // Prepare the custom shader inputs\n copyPropertiesToMetadata(properties, fragmentInput.metadata);\n fragmentInput.voxel.positionUv = positionUv;\n fragmentInput.voxel.positionShapeUv = pointJacobian.point;\n fragmentInput.voxel.positionUvLocal = sampleDatas[0].tileUv;\n fragmentInput.voxel.viewDirUv = viewDirUv;\n fragmentInput.voxel.viewDirWorld = viewDirWorld;\n fragmentInput.voxel.surfaceNormal = step.xyz;\n fragmentInput.voxel.travelDistance = step.w;\n fragmentInput.voxel.stepCount = stepCount;\n fragmentInput.voxel.tileIndex = sampleDatas[0].megatextureIndex;\n fragmentInput.voxel.sampleIndex = getSampleIndex(sampleDatas[0].tileUv);\n\n // Run the custom shader\n czm_modelMaterial materialOutput;\n fragmentMain(fragmentInput, materialOutput);\n\n // Sanitize the custom shader output\n vec4 color = vec4(materialOutput.diffuse, materialOutput.alpha);\n color.rgb = max(color.rgb, vec3(0.0));\n color.a = clamp(color.a, 0.0, 1.0);\n\n // Pre-multiplied alpha blend\n colorAccum += (1.0 - colorAccum.a) * vec4(color.rgb * color.a, color.a);\n\n // Stop traversing if the alpha has been fully saturated\n if (colorAccum.a > ALPHA_ACCUM_MAX) {\n colorAccum.a = ALPHA_ACCUM_MAX;\n break;\n }\n\n if (step.w == 0.0) {\n // Shape is infinitely thin. The ray may have hit the edge of a\n // foreground voxel. Step ahead slightly to check for more voxels\n step.w == 0.00001;\n }\n\n // Keep raymarching\n currentT += step.w;\n positionUv = viewPosUv + currentT * viewDirUv;\n\n // Check if there's more intersections.\n if (currentT > endT) {\n #if (INTERSECTION_COUNT == 1)\n break;\n #else\n shapeIntersection = nextIntersection(ix);\n if (shapeIntersection.entry.w == NO_HIT) {\n break;\n } else {\n // Found another intersection. Resume raymarching there\n currentT = shapeIntersection.entry.w;\n endT = shapeIntersection.exit.w;\n positionUv = viewPosUv + currentT * viewDirUv;\n }\n #endif\n }\n\n // Traverse the tree from the current ray position.\n // This is similar to traverseOctreeFromBeginning but is faster when the ray is in the same tile as the previous step.\n pointJacobian = convertUvToShapeUvSpaceDerivative(positionUv);\n traverseOctreeFromExisting(pointJacobian.point, traversalData, sampleDatas);\n step = getStepSize(sampleDatas[0], viewRayUv, shapeIntersection, pointJacobian.jacobianT, currentT);\n }\n\n // Convert the alpha from [0,ALPHA_ACCUM_MAX] to [0,1]\n colorAccum.a /= ALPHA_ACCUM_MAX;\n\n #if defined(PICKING)\n // If alpha is 0.0 there is nothing to pick\n if (colorAccum.a == 0.0) {\n discard;\n }\n out_FragColor = u_pickColor;\n #elif defined(PICKING_VOXEL)\n // If alpha is 0.0 there is nothing to pick\n if (colorAccum.a == 0.0) {\n discard;\n }\n vec2 megatextureId = packIntToVec2(sampleDatas[0].megatextureIndex);\n vec2 sampleIndex = packIntToVec2(getSampleIndex(sampleDatas[0].tileUv));\n out_FragColor = vec4(megatextureId, sampleIndex);\n #else\n out_FragColor = colorAccum;\n #endif\n}\n"]);const l=e._shape,u=l.shaderDefines;for(const m in u)if(u.hasOwnProperty(m)){let _=u[m];c(_)&&(_=!0===_?void 0:_,t.addDefine(m,_,Ee.FRAGMENT))}let d=l.shaderMaximumIntersectionsLength;s>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",d,Ee.FRAGMENT),d+=1===s?1:r.unionClippingRegions?2:1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",d,Ee.FRAGMENT),d+=1),t.addDefine("INTERSECTION_COUNT",d,Ee.FRAGMENT),(!f.equals(e.paddingBefore,f.ZERO)||!f.equals(e.paddingAfter,f.ZERO))&&t.addDefine("PADDING",void 0,Ee.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,Ee.FRAGMENT),e._jitter&&t.addDefine("JITTER",void 0,Ee.FRAGMENT),e._nearestSampling&&t.addDefine("NEAREST_SAMPLING",void 0,Ee.FRAGMENT),t.addDefine("SAMPLE_COUNT",`${e._traversal._sampleCount}`,Ee.FRAGMENT)};function h1(e){return e===Tn.SCALAR?"float":e===Tn.VEC2?"vec2":e===Tn.VEC3?"vec3":e===Tn.VEC4?"vec4":void 0}function U$e(e){return e===Tn.SCALAR?".r":e===Tn.VEC2?".ra":e===Tn.VEC3?".rgb":e===Tn.VEC4?"":void 0}function z$e(e){return e===Tn.SCALAR?"vec3":e===Tn.VEC2?"mat2":e===Tn.VEC3?"mat3":e===Tn.VEC4?"mat4":void 0}function ate(e){let t=e.toString();return-1===t.indexOf(".")&&(t=`${e}.0`),t}function V$e(e,t){return e===Tn.SCALAR?"":`[${t}]`}const j$e=function G$e(e,t){const n=new B$e(e);!function k$e(e,t){const{shaderBuilder:n}=e,{names:i,types:o,minimumValues:s,maximumValues:a}=t._provider,l=o.length,u=c(s)&&c(a);n.addDefine("METADATA_COUNT",l,Ee.FRAGMENT),u&&n.addDefine("STATISTICS",void 0,Ee.FRAGMENT);for(let R=0;R<l;R++){const B=i[R],F=o[R],S=`PropertyStatistics_${B}`;n.addStruct(S,`PropertyStatistics_${B}`,Ee.FRAGMENT);const L=h1(F);n.addStructField(S,L,"min"),n.addStructField(S,L,"max")}const d="Statistics",h="Statistics",m="statistics";n.addStruct(d,h,Ee.FRAGMENT);for(let R=0;R<l;R++){const B=i[R];n.addStructField(d,`PropertyStatistics_${B}`,B)}const _="Metadata",p="Metadata",y="metadata";n.addStruct(_,p,Ee.FRAGMENT),n.addStructField(_,h,m);for(let R=0;R<l;R++){const B=i[R],S=h1(o[R]);n.addStructField(_,S,B)}for(let R=0;R<l;R++){const B=i[R],S=z$e(o[R]),D=`VoxelProperty_${B}`;n.addStruct(D,`VoxelProperty_${B}`,Ee.FRAGMENT),n.addStructField(D,S,"partialDerivativeLocal"),n.addStructField(D,S,"partialDerivativeWorld"),n.addStructField(D,S,"partialDerivativeView"),n.addStructField(D,S,"partialDerivativeValid")}const b="Voxel",x="Voxel";n.addStruct(b,x,Ee.FRAGMENT);for(let R=0;R<l;R++){const B=i[R];n.addStructField(b,`VoxelProperty_${B}`,B)}n.addStructField(b,"vec3","positionEC"),n.addStructField(b,"vec3","positionUv"),n.addStructField(b,"vec3","positionShapeUv"),n.addStructField(b,"vec3","positionUvLocal"),n.addStructField(b,"vec3","viewDirUv"),n.addStructField(b,"vec3","viewDirWorld"),n.addStructField(b,"vec3","surfaceNormal"),n.addStructField(b,"float","travelDistance"),n.addStructField(b,"int","stepCount"),n.addStructField(b,"int","tileIndex"),n.addStructField(b,"int","sampleIndex");const w="FragmentInput";n.addStruct(w,"FragmentInput",Ee.FRAGMENT),n.addStructField(w,p,y),n.addStructField(w,x,"voxel");const I="Properties",P="Properties",N="properties";n.addStruct(I,P,Ee.FRAGMENT);for(let R=0;R<l;R++){const B=i[R],S=h1(o[R]);n.addStructField(I,S,B)}{const R="clearProperties";n.addFunction(R,`${P} clearProperties()`,Ee.FRAGMENT),n.addFunctionLines(R,[`${P} ${N};`]);for(let B=0;B<l;B++){const F=i[B],L=h1(o[B]);n.addFunctionLines(R,[`${N}.${F} = ${L}(0.0);`])}n.addFunctionLines(R,[`return ${N};`])}{const R="sumProperties";n.addFunction(R,`${P} sumProperties(${P} propertiesA, ${P} propertiesB)`,Ee.FRAGMENT),n.addFunctionLines(R,[`${P} ${N};`]);for(let B=0;B<l;B++){const F=i[B];n.addFunctionLines(R,[`${N}.${F} = propertiesA.${F} + propertiesB.${F};`])}n.addFunctionLines(R,[`return ${N};`])}{const R="scaleProperties";n.addFunction(R,`${P} scaleProperties(${P} ${N}, float scale)`,Ee.FRAGMENT),n.addFunctionLines(R,[`${P} scaledProperties = ${N};`]);for(let B=0;B<l;B++)n.addFunctionLines(R,[`scaledProperties.${i[B]} *= scale;`]);n.addFunctionLines(R,["return scaledProperties;"])}{const R="mixProperties";n.addFunction(R,`${P} mixProperties(${P} propertiesA, ${P} propertiesB, float mixFactor)`,Ee.FRAGMENT),n.addFunctionLines(R,[`${P} ${N};`]);for(let B=0;B<l;B++){const F=i[B];n.addFunctionLines(R,[`${N}.${F} = mix(propertiesA.${F}, propertiesB.${F}, mixFactor);`])}n.addFunctionLines(R,[`return ${N};`])}{const R="copyPropertiesToMetadata";n.addFunction(R,`void copyPropertiesToMetadata(in ${P} ${N}, inout ${p} ${y})`,Ee.FRAGMENT);for(let B=0;B<l;B++){const F=i[B];n.addFunctionLines(R,[`${y}.${F} = ${N}.${F};`])}}if(u){const R="setStatistics";n.addFunction(R,`void setStatistics(inout ${h} ${m})`,Ee.FRAGMENT);for(let B=0;B<l;B++){const F=i[B],S=o[B],D=Tn.getComponentCount(S);for(let L=0;L<D;L++){const M=V$e(S,L),z=a[B][L];n.addFunctionLines(R,[`${m}.${F}.min${M} = ${ate(s[B][L])};`,`${m}.${F}.max${M} = ${ate(z)};`])}}}{const R="getPropertiesFromMegatextureAtUv";n.addFunction(R,`${P} getPropertiesFromMegatextureAtUv(vec2 texcoord)`,Ee.FRAGMENT),n.addFunctionLines(R,[`${P} ${N};`]);for(let B=0;B<l;B++){const F=i[B],L=U$e(o[B]);n.addFunctionLines(R,[`properties.${F} = texture(u_megatextureTextures[${B}], texcoord)${L};`])}n.addFunctionLines(R,[`return ${N};`])}}(n,e);const{shaderBuilder:i,clippingPlanes:o,clippingPlanesLength:r}=n;if(r>0){const x="getClippingPlane",C=jB(o,t),w=0,v=C.indexOf(")")+1,I=C.indexOf("{",v)+1,P=C.indexOf("}",I),N=C.slice(w,v),R=C.slice(I,P);i.addFunction(x,N,Ee.FRAGMENT),i.addFunctionLines(x,[R])}const s=i.clone();s.addDefine("PICKING",void 0,Ee.FRAGMENT);const a=i.clone();a.addDefine("PICKING_VOXEL",void 0,Ee.FRAGMENT);const l=i.buildShaderProgram(t),u=s.buildShaderProgram(t),d=a.buildShaderProgram(t),h=Lt.fromCache({cull:{enabled:!0,face:ur.BACK},depthTest:{enabled:!1},depthMask:!1,blending:eo.PRE_MULTIPLIED_ALPHA_BLEND}),m=t.getViewportQuadVertexArray(),_=e._depthTest,p=new $t({vertexArray:m,primitiveType:Tt.TRIANGLES,renderState:h,shaderProgram:l,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:Ue.VOXELS,executeInClosestFrustum:!0,owner:this,cull:_,occlude:_}),y=$t.shallowClone(p,new $t);y.shaderProgram=u,y.pickOnly=!0;const b=$t.shallowClone(p,new $t);if(b.shaderProgram=d,b.pickOnly=!0,c(e._drawCommand)){const x=e._drawCommand;x.shaderProgram=x.shaderProgram&&x.shaderProgram.destroy()}if(c(e._drawCommandPick)){const x=e._drawCommandPick;x.shaderProgram=x.shaderProgram&&x.shaderProgram.destroy()}if(c(e._drawCommandPickVoxel)){const x=e._drawCommandPickVoxel;x.shaderProgram=x.shaderProgram&&x.shaderProgram.destroy()}e._drawCommand=p,e._drawCommandPick=y,e._drawCommandPickVoxel=b};function jc(){this.orientedBoundingBox=new Ao,this.boundingSphere=new Ae,this.boundTransform=new k,this.shapeTransform=new k,this._minBounds=f.clone(jc.DefaultMinBounds,new f),this._maxBounds=f.clone(jc.DefaultMaxBounds,new f),this.shaderUniforms={renderMinBounds:new f,renderMaxBounds:new f,boxUvToShapeUvScale:new f,boxUvToShapeUvTranslate:new f},this.shaderDefines={BOX_INTERSECTION_INDEX:void 0,BOX_HAS_SHAPE_BOUNDS:void 0},this.shaderMaximumIntersectionsLength=0}const W$e=new f,vk=new f,q$e=new oe,Y$e=new f,X$e=new f,Z$e=new f,$$e=new f,cte=k.fromRotationTranslation(oe.fromUniformScale(.5,new oe),new f(.5,.5,.5),new k);jc.prototype.update=function(e,t,n,i,o){i=g(i,jc.DefaultMinBounds),o=g(o,jc.DefaultMaxBounds),A.typeOf.object("modelMatrix",e),A.typeOf.object("minBounds",t),A.typeOf.object("maxBounds",n);const r=jc.DefaultMinBounds,s=jc.DefaultMaxBounds;t=this._minBounds=f.clamp(t,r,s,this._minBounds),n=this._maxBounds=f.clamp(n,r,s,this._maxBounds),i=f.clamp(i,r,s,Y$e),o=f.clamp(o,r,s,X$e);const a=f.clamp(t,i,o,Z$e),l=f.clamp(n,i,o,$$e),u=k.getScale(e,vk);if(a.x>l.x||a.y>l.y||a.z>l.z||(a.x===l.x)+(a.y===l.y)+(a.z===l.z)>=2||i.x>o.x||i.y>o.y||i.z>o.z||0===u.x||0===u.y||0===u.z)return!1;this.shapeTransform=k.clone(e,this.shapeTransform),this.orientedBoundingBox=Dk(a,l,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=k.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=Ae.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);const{shaderUniforms:d,shaderDefines:h}=this;for(const p in h)h.hasOwnProperty(p)&&(h[p]=void 0);const m=!f.equals(t,r)||!f.equals(n,s);let _=0;if(h.BOX_INTERSECTION_INDEX=_,_+=1,d.renderMinBounds=k.multiplyByPoint(cte,a,d.renderMinBounds),d.renderMaxBounds=k.multiplyByPoint(cte,l,d.renderMaxBounds),m){h.BOX_HAS_SHAPE_BOUNDS=!0;const p=t;d.boxUvToShapeUvScale=f.fromElements(2/(p.x===n.x?1:n.x-p.x),2/(p.y===n.y?1:n.y-p.y),2/(p.z===n.z?1:n.z-p.z),d.boxUvToShapeUvScale),d.boxUvToShapeUvTranslate=f.fromElements(-d.boxUvToShapeUvScale.x*(.5*p.x+.5),-d.boxUvToShapeUvScale.y*(.5*p.y+.5),-d.boxUvToShapeUvScale.z*(.5*p.z+.5),d.boxUvToShapeUvTranslate)}return this.shaderMaximumIntersectionsLength=_,!0};const p1=new f,Ik=new f;jc.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){A.typeOf.number("tileLevel",e),A.typeOf.number("tileX",t),A.typeOf.number("tileY",n),A.typeOf.number("tileZ",i),A.typeOf.object("result",o);const r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e);return Dk(f.fromElements(O.lerp(r.x,s.x,a*t),O.lerp(r.y,s.y,a*n),O.lerp(r.z,s.z,a*i),p1),f.fromElements(O.lerp(r.x,s.x,a*(t+1)),O.lerp(r.y,s.y,a*(n+1)),O.lerp(r.z,s.z,a*(i+1)),Ik),this.shapeTransform,o)};const lte=new f;function Dk(e,t,n,i){const r=jc.DefaultMaxBounds;if(f.equals(e,jc.DefaultMinBounds)&&f.equals(t,r))i.center=k.getTranslation(n,i.center),i.halfAxes=k.getMatrix3(n,i.halfAxes);else{let a=k.getScale(n,vk);const l=f.midpoint(e,t,W$e);i.center=k.multiplyByPoint(n,l,i.center),a=f.fromElements(.5*a.x*(t.x-e.x),.5*a.y*(t.y-e.y),.5*a.z*(t.z-e.z),vk);const u=k.getRotation(n,q$e);i.halfAxes=oe.setScale(u,a,i.halfAxes)}return i}jc.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){A.typeOf.object("spatialNode",e),A.typeOf.object("tileDimensions",t),A.typeOf.object("tileUv",n),A.typeOf.object("result",i);const o=1/Math.pow(2,e.level),r=f.divideComponents(f.ONE,t,lte),s=f.multiplyByScalar(r,o,lte),a=f.multiplyByScalar(f.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,p1),o,p1),l=f.add(a,s,Ik),u=this._minBounds,d=this._maxBounds;return Dk(f.fromElements(O.lerp(u.x,d.x,a.x),O.lerp(u.y,d.y,a.y),O.lerp(u.z,d.z,a.z),p1),f.fromElements(O.lerp(u.x,d.x,l.x),O.lerp(u.y,d.y,l.y),O.lerp(u.z,d.z,l.z),Ik),this.shapeTransform,i)},jc.DefaultMinBounds=Object.freeze(new f(-1,-1,-1)),jc.DefaultMaxBounds=Object.freeze(new f(1,1,1));const Pk=jc;function Lr(){this.orientedBoundingBox=new Ao,this.boundingSphere=new Ae,this.boundTransform=new k,this.shapeTransform=new k,this._minimumRadius=Lr.DefaultMinBounds.x,this._maximumRadius=Lr.DefaultMaxBounds.x,this._minimumHeight=Lr.DefaultMinBounds.y,this._maximumHeight=Lr.DefaultMaxBounds.y,this._minimumAngle=Lr.DefaultMinBounds.z,this._maximumAngle=Lr.DefaultMaxBounds.z,this.shaderUniforms={cylinderRenderHeightMinMax:new V,cylinderRenderRadiusMinMax:new V,cylinderRenderAngleMinMax:new V,cylinderUvToShapeUvRadius:new V,cylinderUvToShapeUvHeight:new V,cylinderUvToShapeUvAngle:new V,cylinderShapeUvAngleMinMax:new V,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}const ute=new f;Lr.prototype.update=function(e,t,n,i,o){i=g(i,Lr.DefaultMinBounds),o=g(o,Lr.DefaultMaxBounds),A.typeOf.object("modelMatrix",e),A.typeOf.object("minBounds",t),A.typeOf.object("maxBounds",n);const r=Lr.DefaultMinBounds.x,s=Lr.DefaultMaxBounds.x,a=Lr.DefaultMinBounds.y,l=Lr.DefaultMaxBounds.y,u=Lr.DefaultMinBounds.z,d=Lr.DefaultMaxBounds.z,h=d-u,m=.5*h,_=O.EPSILON10,p=O.EPSILON3,y=O.EPSILON10,b=O.clamp(t.x,r,s),x=O.clamp(n.x,r,s),C=O.clamp(i.x,r,s),w=O.clamp(o.x,r,s),v=Math.max(b,C),I=Math.min(x,w),P=O.clamp(t.y,a,l),N=O.clamp(n.y,a,l),R=O.clamp(i.y,a,l),B=O.clamp(o.y,a,l),F=Math.max(P,R),S=Math.min(N,B),D=O.negativePiToPi(t.z),L=O.negativePiToPi(n.z),M=O.negativePiToPi(i.z),U=O.negativePiToPi(o.z),z=Math.max(D,M),G=Math.min(L,U),W=k.getScale(e,ute);if(0===I||v>I||F>S||O.equalsEpsilon(W.x,0,void 0,_)||O.equalsEpsilon(W.y,0,void 0,_)||O.equalsEpsilon(W.z,0,void 0,_))return!1;this._minimumRadius=b,this._maximumRadius=x,this._minimumHeight=P,this._maximumHeight=N,this._minimumAngle=D,this._maximumAngle=L,this.shapeTransform=k.clone(e,this.shapeTransform),this.orientedBoundingBox=Rk(v,I,F,S,z,G,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=k.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=Ae.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);const Q=b===r&&x===s,Y=P===a&&N===l,ne=L<D,X=L-D+ne*h,Se=X>m+y&&X<h-y||X<m-y||X>=m-y&&X<=m+y,fe=O.equalsEpsilon(D,u,void 0,p),ye=O.equalsEpsilon(L,d,void 0,p),ve=v===r,Ge=G-z+(G<z)*h,je=Ge>=m-y&&Ge<h-y,Ke=Ge>y&&Ge<m-y,Qt=Ge<=y,nn=je||Ke||Qt,{shaderUniforms:Pt,shaderDefines:ft}=this;for(const Ft in ft)ft.hasOwnProperty(Ft)&&(ft[Ft]=void 0);let gn=0;if(ft.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=gn,gn+=1,ve||(ft.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,ft.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=gn,gn+=1),Pt.cylinderRenderRadiusMinMax=V.fromElements(v,I,Pt.cylinderRenderRadiusMinMax),v===I&&(ft.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0),!Q){ft.CYLINDER_HAS_SHAPE_BOUNDS_RADIUS=!0;const Ft=x-b;let Ht=0,Cn=1;0!==Ft&&(Ht=1/Ft,Cn=-b/Ft),Pt.cylinderUvToShapeUvRadius=V.fromElements(Ht,Cn,Pt.cylinderUvToShapeUvRadius)}if(!Y){ft.CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT=!0;const Ft=N-P;let Ht=0,Cn=1;0!==Ft&&(Ht=2/Ft,Cn=-(P+1)/Ft),Pt.cylinderUvToShapeUvHeight=V.fromElements(Ht,Cn,Pt.cylinderUvToShapeUvHeight)}if(Pt.cylinderRenderHeightMinMax=V.fromElements(F,S,Pt.cylinderRenderHeightMinMax),ne&&(ft.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED=!0),nn&&(ft.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,ft.CYLINDER_INTERSECTION_INDEX_ANGLE=gn,je?(ft.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF=!0,gn+=1):Ke?(ft.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF=!0,gn+=2):Qt&&(ft.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0,gn+=2),Pt.cylinderRenderAngleMinMax=V.fromElements(z,G,Pt.cylinderRenderAngleMinMax)),Se){ft.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0,fe&&(ft.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY=!0),ye&&(ft.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY=!0);const Ht=(L-u)/h,Cn=1-X/h;Pt.cylinderShapeUvAngleMinMax=V.fromElements((D-u)/h,Ht,Pt.cylinderShapeUvAngleMinMax),Pt.cylinderShapeUvAngleRangeZeroMid=(Ht+.5*Cn)%1,Pt.cylinderUvToShapeUvAngle=X<=y?V.fromElements(0,1,Pt.cylinderUvToShapeUvAngle):V.fromElements(h/X,-(D-u)/X,Pt.cylinderUvToShapeUvAngle)}return this.shaderMaximumIntersectionsLength=gn,!0},Lr.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){A.typeOf.number("tileLevel",e),A.typeOf.number("tileX",t),A.typeOf.number("tileY",n),A.typeOf.number("tileZ",i),A.typeOf.object("result",o);const r=this._minimumRadius,s=this._maximumRadius,a=this._minimumHeight,l=this._maximumHeight,u=this._minimumAngle,d=this._maximumAngle,h=1/Math.pow(2,e);return Rk(O.lerp(r,s,t*h),O.lerp(r,s,(t+1)*h),O.lerp(a,l,n*h),O.lerp(a,l,(n+1)*h),O.lerp(u,d,i*h),O.lerp(u,d,(i+1)*h),this.shapeTransform,o)};const dte=new f,fte=new f,K$e=new f;Lr.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){A.typeOf.object("spatialNode",e),A.typeOf.object("tileDimensions",t),A.typeOf.object("tileUv",n),A.typeOf.object("result",i);const o=1/Math.pow(2,e.level),r=f.divideComponents(f.ONE,t,dte),s=f.multiplyByScalar(r,o,dte),a=f.multiplyByScalar(f.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,fte),o,fte),l=f.add(a,s,K$e),u=this._minimumRadius,d=this._maximumRadius,h=this._minimumHeight,m=this._maximumHeight,_=this._minimumAngle,p=this._maximumAngle;return Rk(O.lerp(u,d,a.x),O.lerp(u,d,l.x),O.lerp(h,m,a.y),O.lerp(h,m,l.y),O.lerp(_,p,a.z),O.lerp(_,p,l.z),this.shapeTransform,i)},Lr.DefaultMinBounds=Object.freeze(new f(0,-1,-O.PI)),Lr.DefaultMaxBounds=Object.freeze(new f(1,1,+O.PI));const J$e=new Array(5),eKe=new f,tKe=new oe,nKe=new k,iKe=new k,oKe=new k,Ok=new k,rKe=new f,sKe=new f,aKe=new f,hte=new Array(8);for(let e=0;e<8;e++)hte[e]=new f;function pte(e,t,n){return Math.abs(de.dot(e,t))<n}function Rk(e,t,n,i,o,r,s,a){const l=Lr.DefaultMinBounds,u=Lr.DefaultMaxBounds;if(e===l.x&&t===u.x&&n===l.y&&i===u.y&&o===l.z&&r===u.z)return a.center=k.getTranslation(s,a.center),a.halfAxes=k.getMatrix3(s,a.halfAxes),a;r<o&&(r+=O.TWO_PI);const x=r-o,C=o+.5*x,w=J$e;let v=0;w[v++]=o,w[v++]=r,w[v++]=C,x>O.PI&&(w[v++]=C-O.PI_OVER_TWO,w[v++]=C+O.PI_OVER_TWO);let I=1,P=1,N=-1,R=-1;for(let ne=0;ne<v;++ne){const X=w[ne]-C,K=Math.cos(X),$=Math.sin(X),me=K*e,Se=$*e,fe=K*t,ye=$*t;I=Math.min(I,me),P=Math.min(P,Se),I=Math.min(I,fe),P=Math.min(P,ye),N=Math.max(N,me),R=Math.max(R,Se),N=Math.max(N,fe),R=Math.max(R,ye)}const B=N-I,F=R-P,S=i-n,U=f.fromElements(.5*(I+N),.5*(P+R),.5*(n+i),eKe),z=oe.fromRotationZ(C,tKe),G=f.fromElements(B,F,S,ute),W=k.fromScale(G,oKe),q=k.fromRotation(z,iKe),j=k.fromTranslation(U,nKe),Q=k.multiplyTransformation(q,k.multiplyTransformation(j,W,Ok),Ok),Y=k.multiplyTransformation(s,Q,Ok);return function cKe(e){const t=k.getColumn(e,0,rKe),n=k.getColumn(e,1,sKe),i=k.getColumn(e,2,aKe),o=O.EPSILON4;return pte(t,n,o)&&pte(n,i,o)}(Y)?Ao.fromTransformation(Y,a):function lKe(e,t){const n=hte;f.fromElements(-.5,-.5,-.5,n[0]),f.fromElements(-.5,-.5,.5,n[1]),f.fromElements(-.5,.5,-.5,n[2]),f.fromElements(-.5,.5,.5,n[3]),f.fromElements(.5,-.5,-.5,n[4]),f.fromElements(.5,-.5,.5,n[5]),f.fromElements(.5,.5,-.5,n[6]),f.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)k.multiplyByPoint(e,n[i],n[i]);return Ao.fromPoints(n,t)}(Y,a)}const Lk=Lr;function Xh(){this.orientedBoundingBox=new Ao,this.boundingSphere=new Ae,this.boundTransform=new k,this.shapeTransform=new k,this._rectangle=new Te,this._minimumHeight=Xh.DefaultMinBounds.z,this._maximumHeight=Xh.DefaultMaxBounds.z,this._ellipsoid=new he,this._translation=new f,this._rotation=new oe,this.shaderUniforms={ellipsoidRadiiUv:new f,eccentricitySquared:0,evoluteScale:new V,ellipsoidInverseRadiiSquaredUv:new f,ellipsoidRenderLongitudeMinMax:new V,ellipsoidShapeUvLongitudeMinMaxMid:new f,ellipsoidUvToShapeUvLongitude:new V,ellipsoidUvToShapeUvLatitude:new V,ellipsoidRenderLatitudeSinMinMax:new V,ellipsoidInverseHeightDifferenceUv:0,clipMinMaxHeight:new V},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}const uKe=new f,dKe=new f,fKe=new f,hKe=new f,pKe=new f,mKe=new f,_Ke=new f,gKe=new f,yKe=new oe,mte=new f,_te=new f,bKe=new Te;Xh.prototype.update=function(e,t,n,i,o){const{DefaultMinBounds:r,DefaultMaxBounds:s}=Xh;i=g(i,r),o=g(o,s),A.typeOf.object("modelMatrix",e),A.typeOf.object("minBounds",t),A.typeOf.object("maxBounds",n);const a=O.EPSILON10,l=O.EPSILON3,u=O.EPSILON10,d=O.EPSILON10,h=O.EPSILON3,m=k.getScale(e,gKe),_=f.clone(r,uKe);_.z=-f.minimumComponent(m);const p=f.clamp(t,_,s,dKe),y=f.clamp(n,_,s,fKe),b=f.clamp(i,_,s,hKe),x=f.clamp(o,_,s,pKe),C=f.maximumByComponent(p,b,mKe),w=f.minimumByComponent(y,x,_Ke),v=f.add(m,f.fromElements(y.z,y.z,y.z,mte),mte),I=f.maximumComponent(v),P=f.add(m,f.fromElements(w.z,w.z,w.z,_te),_te);if(C.y>w.y||C.y===s.y||w.y===r.y||C.z>w.z||O.equalsEpsilon(P,f.ZERO,void 0,a))return!1;this._rectangle=Te.fromRadians(p.x,p.y,y.x,y.y),this._translation=k.getTranslation(e,this._translation),this._rotation=k.getRotation(e,this._rotation),this._ellipsoid=he.fromCartesian3(m,this._ellipsoid),this._minimumHeight=p.z,this._maximumHeight=y.z;const N=Te.fromRadians(C.x,C.y,w.x,w.y,bKe);this.orientedBoundingBox=Nk(N,C.z,w.z,this._ellipsoid,this._translation,this._rotation,this.orientedBoundingBox),this.shapeTransform=k.fromRotationTranslation(oe.setScale(this._rotation,v,yKe),this._translation,this.shapeTransform),this.boundTransform=k.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=Ae.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);const R=s.x-r.x,B=.5*R,S=w.x-C.x+(w.x<C.x)*R,D=S<=u,L=S>=B-u&&S<R-u,M=S>u&&S<B-u,U=D||L||M,G=y.x-p.x+(y.x<p.x)*R,Q=G>B+u&&G<R-u||G>=B-u&&G<=B+u||G<B-u,Y=w.y<-h,ne=w.y>=-h&&w.y<=+h,X=w.y>+h&&w.y<s.y-d,K=Y||ne||X,$=C.y>r.y+d&&C.y<-h,me=C.y>=-h&&C.y<=+h,Se=C.y>+h,fe=$||me||Se,ye=K||fe,ve=y.y-p.y,gn=y.y<-h||y.y>=-h&&y.y<=+h||y.y>+h&&y.y<s.y-d||p.y>r.y+d&&p.y<-h||p.y>=-h&&p.y<=+h||p.y>+h,{shaderUniforms:Ft,shaderDefines:Ht}=this;for(const Gi in Ht)Ht.hasOwnProperty(Gi)&&(Ht[Gi]=void 0);Ft.ellipsoidRadiiUv=f.divideByScalar(v,I,Ft.ellipsoidRadiiUv);const{x:Cn,z:pe}=Ft.ellipsoidRadiiUv,Ie=pe/Cn;Ft.eccentricitySquared=1-Ie*Ie,Ft.evoluteScale=V.fromElements((Cn*Cn-pe*pe)/Cn,(pe*pe-Cn*Cn)/pe,Ft.evoluteScale),Ft.ellipsoidInverseRadiiSquaredUv=f.divideComponents(f.ONE,f.multiplyComponents(Ft.ellipsoidRadiiUv,Ft.ellipsoidRadiiUv,Ft.ellipsoidInverseRadiiSquaredUv),Ft.ellipsoidInverseRadiiSquaredUv);let on=0;if(Ht.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=on,on+=1,Ht.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=on,on+=1,Ft.clipMinMaxHeight=V.fromElements((C.z-y.z)/I,(w.z-y.z)/I,Ft.clipMinMaxHeight),Ft.ellipsoidInverseHeightDifferenceUv=1/((y.z-p.z)/I),p.z===y.z&&(Ft.ellipsoidInverseHeightDifferenceUv=0),U&&(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,Ht.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=on,L?(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,on+=1):M?(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,on+=2):D&&(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,on+=2),Ft.ellipsoidRenderLongitudeMinMax=V.fromElements(C.x,w.x,Ft.ellipsoidRenderLongitudeMinMax)),Q&&(Ht.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0,y.x<p.x&&(Ht.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED=!0),Ft.ellipsoidUvToShapeUvLongitude=G<=u?V.fromElements(0,1,Ft.ellipsoidUvToShapeUvLongitude):V.fromElements(R/G,-(p.x-r.x)/G,Ft.ellipsoidUvToShapeUvLongitude)),U){const Gi=O.equalsEpsilon(C.x,r.x,void 0,l),qo=O.equalsEpsilon(w.x,s.x,void 0,l);Gi&&(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY=!0),qo&&(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY=!0),Ft.ellipsoidShapeUvLongitudeMinMaxMid=f.fromElements((p.x-r.x)/R,(y.x-r.x)/R,((w.x-r.x)/R+.5*(1-S/R))%1,Ft.ellipsoidShapeUvLongitudeMinMaxMid)}return ye&&(fe&&(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,Ht.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=on,$?(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,on+=1):me?(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,on+=1):Se&&(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,on+=2)),K&&(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,Ht.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=on,Y?(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,on+=2):ne?(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,on+=1):X&&(Ht.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,on+=1)),Ft.ellipsoidRenderLatitudeSinMinMax=V.fromElements(Math.sin(C.y),Math.sin(w.y),Ft.ellipsoidRenderLatitudeSinMinMax)),gn&&(Ht.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,Ft.ellipsoidUvToShapeUvLatitude=ve<d?V.fromElements(0,1,Ft.ellipsoidUvToShapeUvLatitude):V.fromElements((s.y-r.y)/ve,(r.y-p.y)/ve,Ft.ellipsoidUvToShapeUvLatitude)),this.shaderMaximumIntersectionsLength=on,!0};const gte=new Te;Xh.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){A.typeOf.number("tileLevel",e),A.typeOf.number("tileX",t),A.typeOf.number("tileY",n),A.typeOf.number("tileZ",i),A.typeOf.object("result",o);const r=1/Math.pow(2,e),d=i*r,h=(i+1)*r;return Nk(Te.subsection(this._rectangle,t*r,n*r,(t+1)*r,(n+1)*r,gte),O.lerp(this._minimumHeight,this._maximumHeight,d),O.lerp(this._minimumHeight,this._maximumHeight,h),this._ellipsoid,this._translation,this._rotation,o)};const yte=new f,bte=new f,TKe=new f;function Nk(e,t,n,i,o,r,s){return(s=Ao.fromRectangle(e,t,n,i,s)).center=f.add(s.center,o,s.center),s.halfAxes=oe.multiply(s.halfAxes,r,s.halfAxes),s}Xh.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){A.typeOf.object("spatialNode",e),A.typeOf.object("tileDimensions",t),A.typeOf.object("tileUv",n),A.typeOf.object("result",i);const o=1/Math.pow(2,e.level),r=f.divideComponents(f.ONE,t,yte),s=f.multiplyByScalar(r,o,yte),a=f.multiplyByScalar(f.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,bte),o,bte),l=f.add(a,s,TKe);return Nk(Te.subsection(this._rectangle,a.x,a.y,l.x,l.y,gte),O.lerp(this._minimumHeight,this._maximumHeight,a.z),O.lerp(this._minimumHeight,this._maximumHeight,l.z),this._ellipsoid,this._translation,this._rotation,i)},Xh.DefaultMinBounds=Object.freeze(new f(-O.PI,-O.PI_OVER_TWO,-he.WGS84.minimumRadius)),Xh.DefaultMaxBounds=Object.freeze(new f(O.PI,O.PI_OVER_TWO,10*he.WGS84.maximumRadius));const Mk=Xh,wl={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER",getMinBounds:function(e){switch(e){case wl.BOX:return Pk.DefaultMinBounds;case wl.ELLIPSOID:return Mk.DefaultMinBounds;case wl.CYLINDER:return Lk.DefaultMinBounds;default:throw new E(`Invalid shape type ${e}`)}},getMaxBounds:function(e){switch(e){case wl.BOX:return Pk.DefaultMaxBounds;case wl.ELLIPSOID:return Mk.DefaultMaxBounds;case wl.CYLINDER:return Lk.DefaultMaxBounds;default:throw new E(`Invalid shape type ${e}`)}},getShapeConstructor:function(e){switch(e){case wl.BOX:return Pk;case wl.ELLIPSOID:return Mk;case wl.CYLINDER:return Lk;default:throw new E(`Invalid shape type ${e}`)}}},Mm=Object.freeze(wl);function Td(e){A.typeOf.object("options",e),A.defined("options.comparator",e.comparator),c(e.maximumLength)&&A.typeOf.number.greaterThanOrEquals("options.maximumLength",e.maximumLength,0),this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=c(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}function m1(e,t,n){const i=e._array,o=i[t];i[t]=i[n],i[n]=o}function fE(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function Fk(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function Tte(e,t){if(0===t)return;const n=Math.floor(O.log2(t+1))%2==0,i=Math.floor((t-1)/2),o=fE(e,t,i);for(o!==n&&(m1(e,t,i),t=i);t>=3;){const r=Math.floor((t-3)/4);if(fE(e,t,r)!==o)break;m1(e,t,r),t=r}}function Ate(e,t){const n=e._length,i=Math.floor(O.log2(t+1))%2==0;let o;for(;(o=2*t+1)<n;){let r=o;const s=o+1;if(s<n){fE(e,s,r)===i&&(r=s);const a=2*o+1,l=Math.max(Math.min(n-a,4),0);for(let u=0;u<l;u++){const d=a+u;fE(e,d,r)===i&&(r=d)}}if(fE(e,r,t)===i&&(m1(e,r,t),r!==o&&r!==s)){const a=Math.floor((r-1)/2);Fk(e,r,a)===i&&m1(e,r,a)}t=r}}Object.defineProperties(Td.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(c(e)){for(A.typeOf.number.greaterThanOrEquals("maximumLength",e,0);this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}}),Td.prototype.clone=function(){const n=this._array,i=this._length,o=new Td({comparator:this._comparator,maximumLength:this._maximumLength});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o},Td.prototype.reset=function(){this._length=0;const e=this._maximumLength;if(c(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0},Td.prototype.resort=function(){const e=this._length;for(let t=0;t<e;t++)Tte(this,t)},Td.prototype.insert=function(e){let t;const n=this._maximumLength;if(c(n)){if(0===n)return;if(this._length===n){if(this._comparator(e,this._array[0])<=0)return e;t=this.removeMinimum()}}const i=this._length;return this._array[i]=e,this._length++,Tte(this,i),t},Td.prototype.removeMinimum=function(){const e=this._length;if(0===e)return;this._length--;const t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],Ate(this,0)),this._array[e-1]=void 0,t},Td.prototype.removeMaximum=function(){const e=this._length;if(0===e)return;let t;if(this._length--,e<=2)t=this._array[e-1];else{const n=Fk(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&Ate(this,n)}return this._array[e-1]=void 0,t},Td.prototype.getMinimum=function(){if(0!==this._length)return this._array[0]},Td.prototype.getMaximum=function(){const e=this._length;if(0!==e)return e<=2?this._array[e-1]:this._array[Fk(this,1,2)?1:2]};const AKe=Td,xte=Object.freeze({UNLOADED:0,RECEIVING:1,RECEIVED:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function _1(e,t){this.spatialNode=e,this.keyframe=t,this.state=xte.UNLOADED,this.metadata=[],this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}_1.priorityComparator=function(e,t){return e.priority-t.priority},_1.searchComparator=function(e,t){return e.keyframe-t.keyframe},_1.LoadState=xte;const mo=_1;function Fm(e,t,n,i,o){if(i===vn.UNSIGNED_SHORT&&(i=vn.FLOAT32),i===vn.FLOAT32&&!e.floatingPointTexture)throw new Pe("Floating point texture not supported");let s,a;i===vn.FLOAT32||i===vn.FLOAT64?s=yt.FLOAT:i===vn.UINT8&&(s=yt.UNSIGNED_BYTE),1===n?a=e.webgl2?Ct.RED:Ct.LUMINANCE:2===n?a=e.webgl2?Ct.RG:Ct.LUMINANCE_ALPHA:3===n?a=Ct.RGB:4===n&&(a=Ct.RGBA),o=Math.min(g(o,134217728),536870912);const d=dn.maximumTextureSize,h=vn.getSizeInBytes(i),m=Math.floor(o/(n*h)),_=Math.min(d,O.previousPowerOfTwo(Math.floor(Math.sqrt(m)))),p=Math.ceil(Math.sqrt(t.x)),y=Math.ceil(t.z/p),b=p*t.x,x=y*t.y,C=Math.floor(_/b),w=Math.floor(_/x);if(0===C||0===w)throw new Pe("Tileset is too large to fit into megatexture");this.channelCount=n,this.componentType=i,this.voxelCountPerTile=f.clone(t,new f),this.maximumTileCount=C*w,this.regionCountPerMegatexture=new V(C,w),this.voxelCountPerRegion=new V(b,x),this.sliceCountPerRegion=new V(p,y),this.voxelSizeUv=new V(1/_,1/_),this.sliceSizeUv=new V(t.x/_,t.y/_),this.regionSizeUv=new V(b/_,x/_),this.texture=new Mn({context:e,pixelFormat:a,pixelDatatype:s,flipY:!1,width:_,height:_,sampler:new vi({wrapS:zi.CLAMP_TO_EDGE,wrapT:zi.CLAMP_TO_EDGE,minificationFilter:Kn.LINEAR,magnificationFilter:Jr.LINEAR})});const v=vn.toComponentDatatype(i);this.tileVoxelDataTemp=ee.createTypedArray(v,b*x*n),this.nodes=new Array(this.maximumTileCount);for(let I=0;I<this.maximumTileCount;I++)this.nodes[I]=new xKe(I);for(let I=0;I<this.maximumTileCount;I++){const P=this.nodes[I];P.previousNode=I>0?this.nodes[I-1]:void 0,P.nextNode=I<this.maximumTileCount-1?this.nodes[I+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0}function xKe(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}Fm.prototype.add=function(e){if(this.isFull())throw new E("Trying to add when there are no empty spots");const t=this.emptyList;this.emptyList=this.emptyList.nextNode,c(this.emptyList)&&(this.emptyList.previousNode=void 0),t.nextNode=this.occupiedList,c(t.nextNode)&&(t.nextNode.previousNode=t),this.occupiedList=t;const n=t.index;return this.writeDataToTexture(n,e),this.occupiedCount++,n},Fm.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new E("Megatexture index out of bounds");const t=this.nodes[e];c(t.previousNode)&&(t.previousNode.nextNode=t.nextNode),c(t.nextNode)&&(t.nextNode.previousNode=t.previousNode),t.nextNode=this.emptyList,c(t.nextNode)&&(t.nextNode.previousNode=t),t.previousNode=void 0,this.emptyList=t,this.occupiedCount--},Fm.prototype.isFull=function(){return void 0===this.emptyList},Fm.getApproximateTextureMemoryByteLength=function(e,t,n,i){i===vn.UNSIGNED_SHORT&&(i=vn.FLOAT32);const o=vn.getSizeInBytes(i),r=e*t.x*t.y*t.z,s=Math.ceil(Math.sqrt(t.x)),a=Math.ceil(t.z/s),l=s*t.x,u=a*t.y;let d=O.previousPowerOfTwo(Math.floor(Math.sqrt(r)));for(;!(Math.floor(d/l)*Math.floor(d/u)>=e);)d*=2;return d*d*n*o},Fm.prototype.writeDataToTexture=function(e,t){const 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 y=0;y<i.z;y++){const b=y%o.x*i.x,x=Math.floor(y/o.x)*i.y;for(let C=0;C<i.y;C++)for(let w=0;w<i.x;w++){const v=y*i.y*i.x+C*i.x+w,I=(x+C)*r.x+(b+w);for(let P=0;P<s;P++)a[I*s+P]=n[v*s+P]}}const l=this.regionCountPerMegatexture,u=r.x,d=r.y,h=e%l.x*r.x,m=Math.floor(e/l.x)*r.y;this.texture.copyFrom({source:{arrayBufferView:a,width:u,height:d},xOffset:h,yOffset:m})},Fm.prototype.isDestroyed=function(){return!1},Fm.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),Xe(this)};const Cte=Fm;function Au(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=f.clone(s),this.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new Ao,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(r)}const CKe=new f;Au.prototype.computeBoundingVolumes=function(e){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);const t=oe.getScale(this.orientedBoundingBox.halfAxes,CKe),n=2*f.maximumComponent(t);this.approximateVoxelSize=n/f.minimumComponent(this.dimensions)},Au.prototype.constructChildNodes=function(e){const{level:t,x:n,y:i,z:o}=this,r=2*n,s=2*i,a=2*o,l=s+1,u=r+1,d=a+1,h=t+1;this.children=[[h,r,s,a],[h,u,s,a],[h,r,l,a],[h,u,l,a],[h,r,s,d],[h,u,s,d],[h,r,l,d],[h,u,l,d]].map(([_,p,y,b])=>new Au(_,p,y,b,this,e,this.dimensions))},Au.prototype.visibility=function(e,t){return e.cullingVolume.computeVisibilityWithPlaneMask(this.orientedBoundingBox,t)},Au.prototype.computeScreenSpaceError=function(e,t){let i=Math.sqrt(this.orientedBoundingBox.distanceSquaredTo(e));i=Math.max(i,O.EPSILON7),this.screenSpaceError=t*(this.approximateVoxelSize/i)};const Ete={keyframe:0};function hE(e,t){return Ete.keyframe=e,Be(t,Ete,mo.searchComparator)}function EKe(e,t){const n=hE(e,t);return n<0?O.clamp(~n-1,0,t.length-1):n}function wte(e,t){return e*Math.exp(4*e)+t*(t>=0?1:-200)}Au.prototype.computeSurroundingRenderableKeyframeNodes=function(e){let t=this;const n=t.level,i=Math.floor(e),o=Math.ceil(e);let r,s,a=+Number.MAX_VALUE,l=+Number.MAX_VALUE;for(;c(t);){const{renderableKeyframeNodes:h}=t;if(h.length>=1){const m=EKe(i,h),_=h[m],y=h[o===i||i<_.keyframe?m:Math.min(m+1,h.length-1)],b=i-_.keyframe,x=wte(n-t.level,b);x<a&&(a=x,r=_);const C=y.keyframe-o,w=wte(n-t.level,C);if(w<l&&(l=w,s=y),0===b&&0===C)break}t=t.parent}if(this.renderableKeyframeNodePrevious=r,this.renderableKeyframeNodeNext=s,!c(r)||!c(s))return;const u=r.keyframe,d=s.keyframe;this.renderableKeyframeNodeLerp=u===d?0:O.clamp((e-u)/(d-u),0,1)},Au.prototype.isVisited=function(e){return this.visitedFrameNumber===e},Au.prototype.createKeyframeNode=function(e){let t=hE(e,this.keyframeNodes);if(t<0){t=~t;const n=new mo(this,e);this.keyframeNodes.splice(t,0,n)}},Au.prototype.destroyKeyframeNode=function(e,t){const n=e.keyframe,i=hE(n,this.keyframeNodes);if(i<0)throw new E("Keyframe node does not exist.");if(this.keyframeNodes.splice(i,1),-1!==e.megatextureIndex){for(let r=0;r<t.length;r++)t[r].remove(e.megatextureIndex);const o=hE(n,this.renderableKeyframeNodes);if(o<0)throw new E("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(o,1)}e.spatialNode=void 0,e.state=mo.LoadState.UNLOADED,e.metadata={},e.megatextureIndex=-1,e.priority=-Number.MAX_VALUE,e.highPriorityFrameNumber=-1},Au.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.state!==mo.LoadState.RECEIVED||-1!==e.megatextureIndex||e.metadata.length!==t.length)throw new E("Keyframe node cannot be added to megatexture");for(let o=0;o<t.length;o++)e.megatextureIndex=t[o].add(e.metadata[o]);e.state=mo.LoadState.LOADED;const n=this.renderableKeyframeNodes;let i=hE(e.keyframe,n);if(i>=0)throw new E("Keyframe already renderable");i=~i,n.splice(i,0,e)},Au.prototype.isRenderable=function(e){const t=this.renderableKeyframeNodePrevious,n=this.renderableKeyframeNodeNext,i=this.level;return c(t)&&c(n)&&(t.spatialNode.level===i||n.spatialNode.level===i)&&this.visitedFrameNumber===e};const wKe=Au;function Zh(e,t,n,i,o,r,s){this._primitive=e,this.megatextures=new Array(i.length);for(let p=0;p<i.length;p++){const b=Tn.getComponentCount(i[p]);this.megatextures[p]=new Cte(t,n,b,o[p],s)}const a=this.megatextures[0].maximumTileCount;this._simultaneousRequestCount=0,this._debugPrint=!1,this._frameNumber=0,this.rootNode=new wKe(0,0,0,0,void 0,e._shape,n),this._priorityQueue=new AKe({maximumLength:a,comparator:mo.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);const u=this._binaryTreeKeyframeWeighting;u[0]=0,u[r-1]=0,Bk(u,1,r-2,0);const h=2048,m=Math.floor(h/9),_=Math.ceil(a/m);this.internalNodeTexture=new Mn({context:t,pixelFormat:Ct.RGBA,pixelDatatype:yt.UNSIGNED_BYTE,flipY:!1,width:h,height:_,sampler:new vi({minificationFilter:Kn.NEAREST,magnificationFilter:Jr.NEAREST})}),this.internalNodeTilesPerRow=m,this.internalNodeTexelSizeUv=new V(1/h,1/_),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new V}function Bk(e,t,n,i){if(t>n)return;const o=Math.floor((t+n)/2);e[o]=i,Bk(e,t,o-1,i+1),Bk(e,o+1,n,i+1)}function Ste(e,t){if(t.computeBoundingVolumes(e._primitive._shape),c(t.children))for(let n=0;n<8;n++)Ste(e,t.children[n])}function SKe(e,t){if(e._simultaneousRequestCount>=Zh.simultaneousRequestCountMaximum)return;const n=e._primitive._provider,{keyframe:r,spatialNode:s}=t,a=n.requestData({tileLevel:s.level,tileX:s.x,tileY:s.y,tileZ:s.z,keyframe:r});c(a)?(e._simultaneousRequestCount++,t.state=mo.LoadState.RECEIVING,a.then(function i(l){e._simultaneousRequestCount--;const u=n.types.length;if(c(l))if(l===mo.LoadState.FAILED)t.state=mo.LoadState.FAILED;else if(Array.isArray(l)&&l.length===u){const d=e.megatextures;for(let h=0;h<u;h++){const{voxelCountPerTile:m,channelCount:_}=d[h],{x:p,y,z:b}=m,C=l[h];if(C.length!==p*y*b*_){t.state=mo.LoadState.FAILED;break}t.metadata[h]=C,t.state=mo.LoadState.RECEIVED}}else t.state=mo.LoadState.FAILED;else t.state=mo.LoadState.UNAVAILABLE}).catch(function o(){e._simultaneousRequestCount--,t.state=mo.LoadState.FAILED})):t.state=mo.LoadState.FAILED}function DKe(e,t,n,i){const 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 O.lerp(a,s,.15+.85*s)}Zh.prototype.findKeyframeNode=function(e){return this._keyframeNodesInMegatexture.find(function(t){return t.megatextureIndex===e})},Zh.simultaneousRequestCountMaximum=50,Zh.prototype.update=function(e,t,n,i){const r=e.context,s=this.megatextures[0].maximumTileCount,a=this._keyframeCount,l=this._primitive._levelBlendFactor,h=(l>0?2:1)*(a>1?2:1);this._sampleCount=h;const m=h>=2;if(m&&!c(this.leafNodeTexture)){const C=Math.floor(512),w=Math.ceil(s/C);this.leafNodeTexture=new Mn({context:r,pixelFormat:Ct.RGBA,pixelDatatype:yt.UNSIGNED_BYTE,flipY:!1,width:1024,height:w,sampler:new vi({minificationFilter:Kn.NEAREST,magnificationFilter:Jr.NEAREST})}),this.leafNodeTexelSizeUv=V.fromElements(1/1024,1/w,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=C}else!m&&c(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=O.clamp(t,0,a-1),n&&Ste(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;const _=Cr();!function IKe(e,t){const n=e._frameNumber,i=e._primitive,o=i._shape,r=i.screenSpaceError,s=e._priorityQueue,a=e._keyframeCount,l=O.clamp(Math.floor(e._keyframeLocation),0,a-2),u=l+1,{camera:d,context:h,pixelRatio:m}=t,{positionWC:_,frustum:p}=d,b=h.drawingBufferHeight/m/p.sseDenominator;s.reset(),function x(F,S){if(F.computeScreenSpaceError(_,b),(S=F.visibility(t,S))===Fu.MASK_OUTSIDE)return;if(F.visitedFrameNumber=n,1===a)F.createKeyframeNode(0);else if(F.keyframeNodes.length!==a)for(let z=0;z<a;z++)F.createKeyframeNode(z);const{screenSpaceError:D,keyframeNodes:L}=F,M=function vKe(e){return e/(1+e)}(D);let U=!1;for(let z=0;z<L.length;z++){const G=L[z];G.priority=10*M+DKe(l,G.keyframe,u,e),G.state!==mo.LoadState.UNAVAILABLE&&G.state!==mo.LoadState.FAILED&&G.priority!==-Number.MAX_VALUE&&s.insert(G),G.state===mo.LoadState.LOADED&&(U=!0)}if(D<r||!U)F.children=void 0;else{c(F.children)||F.constructChildNodes(o);for(let z=0;z<8;z++)x(F.children[z],S)}}(e.rootNode,Fu.MASK_INDETERMINATE);const C=e._highPriorityKeyframeNodes;let v,w=0;for(;s.length>0;)v=s.removeMaximum(),v.highPriorityFrameNumber=n,C[w]=v,w++;const I=e._keyframeNodesInMegatexture,P=e.megatextures[0],N=P.occupiedCount;I.length=N,I.sort(function(F,S){return F.highPriorityFrameNumber===S.highPriorityFrameNumber?S.priority-F.priority:S.highPriorityFrameNumber-F.highPriorityFrameNumber});let R=0,B=0;for(let F=0;F<w;F++)if(v=C[F],v.state!==mo.LoadState.LOADED&&void 0!==v.spatialNode&&(v.state===mo.LoadState.UNLOADED&&SKe(e,v),v.state===mo.LoadState.RECEIVED)){let S=0;if(P.isFull()){S=N-1-R,R++;const D=I[S];D.spatialNode.destroyKeyframeNode(D,e.megatextures)}else S=N+B,B++;v.spatialNode.addKeyframeNodeToMegatextures(v,e.megatextures),I[S]=v}}(this,e);const p=Cr();!function OKe(e,t,n){const i=e._primitive._screenSpaceError,o=e._keyframeLocation,r=e._frameNumber,s=t>=2;let a=0,l=0;const u=[],d=[];const m=e.rootNode;m.computeSurroundingRenderableKeyframeNodes(o),m.isRenderable(r)&&function h(_,p,y,b,x){let C=!1;if(c(_.children))for(let w=0;w<8;w++){const v=_.children[w];v.computeSurroundingRenderableKeyframeNodes(o),v.isRenderable(r)&&(C=!0)}if(C){u[x]=g1.INTERNAL<<16|p,u[y]=b,a++,x=9*(b=p)+1;for(let w=0;w<8;w++)h(_.children[w],p=a,y=9*p+0,b,x+w)}else{if(s){const w=5*l,v=_.renderableKeyframeNodePrevious,I=_.level-v.spatialNode.level,P=v.spatialNode.parent,N=c(P)?P.renderableKeyframeNodePrevious:v,R=function RKe(e,t,n){if(void 0===e.parent)return 0;const i=e.screenSpaceError;return O.clamp(((t-i)/(e.parent.screenSpaceError-i)+n-1)/n,0,1)}(_,i,n),B=I,F=1,S=v.megatextureIndex,D=N.megatextureIndex;d[w+0]=R,d[w+1]=B,d[w+2]=F,d[w+3]=S,d[w+4]=D,u[x]=g1.LEAF<<16|l}else{const w=_.renderableKeyframeNodePrevious;u[x]=(_.level-w.spatialNode.level==0?g1.LEAF:g1.PACKED_LEAF_FROM_PARENT)<<16|w.megatextureIndex}l++}}(m,0,0,0,0),function LKe(e,t,n,i){const o=Ct.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)),l=new Uint8Array(s*a*o);for(let h=0;h<e.length;h++){const m=e[h],_=h*o;for(let p=0;p<o;p++)l[_+p]=m>>>8*p&255}i.copyFrom({source:{arrayBufferView:l,width:s,height:a},xOffset:0,yOffset:0})}(u,9,e.internalNodeTilesPerRow,e.internalNodeTexture),s&&function NKe(e,t,n,i){const o=Ct.componentsLength(i.pixelFormat),s=Math.ceil(e.length/5),a=Math.max(1,t*Math.min(s,n)),l=Math.max(1,Math.ceil(s/n)),u=new Uint8Array(a*l*o);for(let m=0;m<s;m++){const p=e[5*m+1],y=e[5*m+2],b=e[5*m+3],x=e[5*m+4],C=O.clamp(Math.floor(65536*e[5*m+0]),0,65535);u[8*m+0]=C>>>0&255,u[8*m+1]=C>>>8&255,u[8*m+2]=255&p,u[8*m+3]=255&y,u[8*m+4]=b>>>0&255,u[8*m+5]=b>>>8&255,u[8*m+6]=x>>>0&255,u[8*m+7]=x>>>8&255}i.copyFrom({source:{arrayBufferView:u,width:a,height:l},xOffset:0,yOffset:0})}(d,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}(this,h,l);const y=Cr();this._debugPrint&&function PKe(e,t,n,i){const o=e._keyframeCount,r=e.rootNode,s=Object.keys(mo.LoadState).length,a=new Array(s),l=new Array(s);let u=0;for(let x=0;x<s;x++){const C=new Array(o);a[x]=C;for(let w=0;w<o;w++)C[w]=0;l[x]=0}!function d(x){const C=x.keyframeNodes;for(let w=0;w<C.length;w++){const v=C[w],P=v.state;a[P][v.keyframe]+=1,l[P]+=1,u++}if(c(x.children))for(let w=0;w<8;w++)d(x.children[w])}(r);const h=`KEYFRAMES: ${a[mo.LoadState.LOADED]}`,m=`UNLOADED: ${l[mo.LoadState.UNLOADED]} | RECEIVING: ${l[mo.LoadState.RECEIVING]} | RECEIVED: ${l[mo.LoadState.RECEIVED]} | LOADED: ${l[mo.LoadState.LOADED]} | FAILED: ${l[mo.LoadState.FAILED]} | UNAVAILABLE: ${l[mo.LoadState.UNAVAILABLE]} | TOTAL: ${u}`,_=Math.round(100*t)/100,p=Math.round(100*n)/100,y=Math.round(100*i)/100;console.log(`${h} || ${m} || ${`LOAD: ${_} | OCT: ${p} | ALL: ${y}`}`)}(this,p-_,y-p,y-_)},Zh.prototype.isRenderable=function(e){return e.isRenderable(this._frameNumber)},Zh.prototype.isDestroyed=function(){return!1},Zh.prototype.destroy=function(){const 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(),Xe(this)};const g1={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};Zh.getApproximateTextureMemoryByteLength=function(e,t,n,i){let o=0;const r=n.length;for(let s=0;s<r;s++){const l=i[s],u=Tn.getComponentCount(n[s]);o+=Cte.getApproximateTextureMemoryByteLength(e,t,u,l)}return o};const vte=Zh,kk=Object.freeze({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"});function Kb(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}function kKe(e,t,n){const{id:i,textureUniform:o,image:r}=t,s=n.webgl2?y1(o,r,n):function UKe(e,t,n){const{typedArray:i,sampler:o}=e,r=Ite(o),s=o.wrapS===zi.REPEAT||o.wrapS===zi.MIRRORED_REPEAT||o.wrapT===zi.REPEAT||o.wrapT===zi.MIRRORED_REPEAT,{width:a,height:l}=c(i)?e:t,u=[a,l].every(O.isPowerOfTwo);if(!r&&!s||u)return y1(e,t,n);if(!c(i))return y1(e,jR(t),n);if(e.pixelDatatype===yt.UNSIGNED_BYTE){const h=function MKe(e,t,n){const 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}(i,a,l);return y1({sampler:o},jR(h),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."),Dte(e,n)}(o,r,n),a=e._textures[i];c(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function y1(e,t,n){const{typedArray:i,sampler:o}=e,r=c(i)?Dte(e,n):new Mn({context:n,source:t,sampler:o});return Ite(o)&&r.generateMipmap(),r}function Ite(e){return[Kn.NEAREST_MIPMAP_NEAREST,Kn.NEAREST_MIPMAP_LINEAR,Kn.LINEAR_MIPMAP_NEAREST,Kn.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function Dte(e,t){const{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:s,sampler:a}=e;return new Mn({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:o,height:r},sampler:a,flipY:!1})}Kb.prototype.getTexture=function(e){return this._textures[e]},Kb.prototype.loadTexture2D=function(e,t){c(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):function BKe(e,t,n){n.resource.fetchImage().then(function(i){e._loadedImages.push({id:t,image:i,textureUniform:n})}).catch(function(){const i=e._textures[t];c(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture})}(this,e,t)},Kb.prototype.update=function(e){if(e.frameNumber===this._lastUpdatedFrame)return;this._lastUpdatedFrame=e.frameNumber;const t=e.context;this._defaultTexture=t.defaultTexture;const n=this._loadedImages;for(let i=0;i<n.length;i++)kKe(this,n[i],t);n.length=0},Kb.prototype.isDestroyed=function(){return!1},Kb.prototype.destroy=function(){const e=this._textures;for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];n!==this._defaultTexture&&n.destroy()}return Xe(this)};const zKe=Kb;function pE(e){e=g(e,g.EMPTY_OBJECT),this.mode=g(e.mode,fN.MODIFY_MATERIAL),this.lightingModel=e.lightingModel,this.uniforms=g(e.uniforms,g.EMPTY_OBJECT),this.varyings=g(e.varyings,g.EMPTY_OBJECT),this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.translucencyMode=g(e.translucencyMode,pN.INHERIT),this._textureManager=new zKe,this._defaultTexture=void 0,this.uniformMap=function VKe(e){const t=e.uniforms,n={};for(const i in t)if(t.hasOwnProperty(i)){const o=t[i],r=o.type;if(r===kk.SAMPLER_CUBE)throw new E("CustomShader does not support samplerCube uniforms");r===kk.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=HKe(e,i)):n[i]=GKe(e,i)}return n}(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},function jKe(e){const t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.metadata.(\w+)/g;let o;const r=e.vertexShaderText;c(r)&&(o=e.usedVariablesVertex.attributeSet,ay(r,t,o),o=e.usedVariablesVertex.featureIdSet,ay(r,n,o),o=e.usedVariablesVertex.metadataSet,ay(r,i,o));const s=e.fragmentShaderText;c(s)&&(o=e.usedVariablesFragment.attributeSet,ay(s,t,o),o=e.usedVariablesFragment.featureIdSet,ay(s,n,o),o=e.usedVariablesFragment.metadataSet,ay(s,i,o),ay(s,/material\.(\w+)/g,e.usedVariablesFragment.materialSet))}(this),function WKe(e){const t=e.usedVariablesVertex.attributeSet;Ga(t,"position","positionMC","vertex"),Ga(t,"normal","normalMC","vertex"),Ga(t,"tangent","tangentMC","vertex"),Ga(t,"bitangent","bitangentMC","vertex"),Ga(t,"positionWC","positionMC","vertex"),Ga(t,"positionEC","positionMC","vertex"),Ga(t,"normalEC","normalMC","vertex"),Ga(t,"tangentEC","tangentMC","vertex"),Ga(t,"bitangentEC","bitangentMC","vertex");const n=e.usedVariablesFragment.attributeSet;Ga(n,"position","positionEC","fragment"),Ga(n,"normal","normalEC","fragment"),Ga(n,"tangent","tangentEC","fragment"),Ga(n,"bitangent","bitangentEC","fragment"),Ga(n,"normalMC","normalEC","fragment"),Ga(n,"tangentMC","tangentEC","fragment"),Ga(n,"bitangentMC","bitangentEC","fragment")}(this)}function HKe(e,t){return function(){return g(e._textureManager.getTexture(t),e._defaultTexture)}}function GKe(e,t){return function(){return e.uniforms[t].value}}function ay(e,t,n){let i;for(;null!==(i=t.exec(e));)n[i[1]]=!0}function Pte(e){return/^.*MC$/.test(e)?`${e} (model coordinates)`:/^.*WC$/.test(e)?`${e} (Cartesian world coordinates)`:/^.*EC$/.test(e)?`${e} (eye coordinates)`:e}function Ga(e,t,n,i){if(e.hasOwnProperty(t)){const o=`${Pte(t)} is not available in the ${i} shader. Did you mean ${Pte(n)} instead?`;throw new E(o)}}pE.prototype.setUniform=function(e,t){if(A.typeOf.string("uniformName",e),A.defined("value",t),!c(this.uniforms[e]))throw new E(`Uniform ${e} must be declared in the CustomShader constructor.`);const n=this.uniforms[e];n.type===kk.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):n.value=c(t.clone)?t.clone(n.value):t},pE.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)},pE.prototype.isDestroyed=function(){return!1},pE.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),Xe(this)};const qKe=pE;function wf(e){e=g(e,g.EMPTY_OBJECT),this._ready=!1,this._provider=g(e.provider,wf.DefaultProvider),this._traversal=void 0,this._shape=void 0,this._shapeVisible=!1,this._paddingBefore=new f,this._paddingAfter=new f,this._minBounds=new f,this._minBoundsOld=new f,this._maxBounds=new f,this._maxBoundsOld=new f,this._exaggeratedMinBounds=new f,this._exaggeratedMinBoundsOld=new f,this._exaggeratedMaxBounds=new f,this._exaggeratedMaxBoundsOld=new f,this._minClippingBounds=new f,this._minClippingBoundsOld=new f,this._maxClippingBounds=new f,this._maxClippingBoundsOld=new f,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this._exaggeratedModelMatrix=k.clone(this._modelMatrix),this._compoundModelMatrix=new k,this._compoundModelMatrixOld=new k,this._customShader=g(e.customShader,wf.DefaultCustomShader),this._customShaderCompilationEvent=new Ye,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=e.clock,this._transformPositionWorldToUv=new k,this._transformPositionUvToWorld=new k,this._transformDirectionWorldToLocal=new oe,this._transformNormalLocalToWorld=new oe,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 vv,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1,this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new V,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new V,megatextureTextures:[],megatextureSliceDimensions:new V,megatextureTileDimensions:new V,megatextureVoxelSizeUv:new V,megatextureSliceSizeUv:new V,megatextureTileSizeUv:new V,dimensions:new f,paddingBefore:new f,paddingAfter:new f,transformPositionViewToUv:new k,transformPositionUvToView:new k,transformDirectionViewToLocal:new oe,transformNormalLocalToWorld:new oe,cameraPositionUv:new f,ndcSpaceAxisAlignedBoundingBox:new de,clippingPlanesTexture:void 0,clippingPlanesMatrix:new k,stepSize:0,pickColor:new Z},this._shapeDefinesOld={},this._uniformMap={};const t=this._uniforms,n=this._uniformMap;for(const o in t)t.hasOwnProperty(o)&&(n[`u_${o}`]=function(){return t[o]});!function YKe(e,t){const{shape:n,minBounds:i=Mm.getMinBounds(n),maxBounds:o=Mm.getMaxBounds(n)}=t;e.minBounds=i,e.maxBounds=o,e.minClippingBounds=Mm.getMinBounds(n),e.maxClippingBounds=Mm.getMaxBounds(n),e._exaggeratedMinBounds=f.clone(e._minBounds,e._exaggeratedMinBounds),e._exaggeratedMaxBounds=f.clone(e._maxBounds,e._exaggeratedMaxBounds),e._exaggeratedModelMatrix=k.clone(e._modelMatrix,e._exaggeratedModelMatrix),Ote(e,t);const r=Mm.getShapeConstructor(n);e._shape=new r,e._shapeVisible=Rte(e,e._shape)}(this,this._provider)}Object.defineProperties(wf.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){A.typeOf.object("modelMatrix",e),this._modelMatrix=k.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){A.typeOf.bool("show",e),this._disableRender=!e}},disableUpdate:{get:function(){return this._disableUpdate},set:function(e){A.typeOf.bool("disableUpdate",e),this._disableUpdate=e}},debugDraw:{get:function(){return this._debugDraw},set:function(e){A.typeOf.bool("debugDraw",e),this._debugDraw=e}},depthTest:{get:function(){return this._depthTest},set:function(e){A.typeOf.bool("depthTest",e),this._depthTest!==e&&(this._depthTest=e,this._shaderDirty=!0)}},jitter:{get:function(){return this._jitter},set:function(e){A.typeOf.bool("jitter",e),this._jitter!==e&&(this._jitter=e,this._shaderDirty=!0)}},nearestSampling:{get:function(){return this._nearestSampling},set:function(e){A.typeOf.bool("nearestSampling",e),this._nearestSampling!==e&&(this._nearestSampling=e,this._shaderDirty=!0)}},levelBlendFactor:{get:function(){return this._levelBlendFactor},set:function(e){A.typeOf.number("levelBlendFactor",e),this._levelBlendFactor=O.clamp(e,0,1)}},screenSpaceError:{get:function(){return this._screenSpaceError},set:function(e){A.typeOf.number("screenSpaceError",e),this._screenSpaceError=e}},stepSize:{get:function(){return this._stepSizeMultiplier},set:function(e){A.typeOf.number("stepSize",e),this._stepSizeMultiplier=e}},minBounds:{get:function(){return this._minBounds},set:function(e){A.defined("minBounds",e),this._minBounds=f.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){A.defined("maxBounds",e),this._maxBounds=f.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){A.defined("minClippingBounds",e),this._minClippingBounds=f.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){A.defined("maxClippingBounds",e),this._maxClippingBounds=f.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){Gu.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(this._customShader!==e){const t=this._uniformMap,i=this._customShader.uniformMap;for(const o in i)i.hasOwnProperty(o)&&delete t[o];this._customShader=c(e)?e:wf.DefaultCustomShader,this._shaderDirty=!0}}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}}});const XKe=new f,ZKe=new de,$Ke=new de,KKe=new f,QKe=new f,JKe=new oe,eQe=new oe,tQe=new k,nQe=new k,iQe=new k,oQe=k.fromRotationTranslation(oe.fromUniformScale(.5,new oe),new f(.5,.5,.5),new k),rQe=k.fromRotationTranslation(oe.fromUniformScale(2,new oe),new f(-1,-1,-1),new k);wf.prototype.update=function(e){const t=this._provider;this._customShader.update(e);const n=e.context;if(!this._ready)return function dQe(e,t,n){const i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=Z.clone(e._pickId.color,i.pickColor);const{shaderDefines:o,shaderUniforms:r}=e._shape;e._shapeDefinesOld=Rt(o,!0);const s=e._uniformMap;for(const a in r)if(r.hasOwnProperty(a)){const l=`u_${a}`;c(s[l])&&_n(`VoxelPrimitive: Uniform name "${l}" is already defined`),s[l]=function(){return r[a]}}i.dimensions=f.clone(t.dimensions,i.dimensions),e._paddingBefore=f.clone(g(t.paddingBefore,f.ZERO),e._paddingBefore),i.paddingBefore=f.clone(e._paddingBefore,i.paddingBefore),e._paddingAfter=f.clone(g(t.paddingAfter,f.ZERO),e._paddingBefore),i.paddingAfter=f.clone(e._paddingAfter,i.paddingAfter),e._traversal=function fQe(e,t,n){const i=f.clone(t.dimensions,XKe);f.add(i,e._paddingBefore,i),f.add(i,e._paddingAfter,i);const o=t.maximumTileCount,r=c(o)?vte.getApproximateTextureMemoryByteLength(o,i,t.types,t.componentTypes):void 0,s=g(t.keyframeCount,1);return new vte(e,n,i,t.types,t.componentTypes,s,r)}(e,t,n),function hQe(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=V.clone(e.internalNodeTexelSizeUv,t.octreeInternalNodeTexelSizeUv),t.octreeInternalNodeTilesPerRow=e.internalNodeTilesPerRow;const 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=V.clone(i.sliceCountPerRegion,t.megatextureSliceDimensions),t.megatextureTileDimensions=V.clone(i.regionCountPerMegatexture,t.megatextureTileDimensions),t.megatextureVoxelSizeUv=V.clone(i.voxelSizeUv,t.megatextureVoxelSizeUv),t.megatextureSliceSizeUv=V.clone(i.sliceSizeUv,t.megatextureSliceSizeUv),t.megatextureTileSizeUv=V.clone(i.regionSizeUv,t.megatextureTileSizeUv)}(e._traversal,i)}(this,t,n),void e.afterRender.push(()=>(this._ready=!0,!0));!function lQe(e,t){if(e._exaggeratedMinBounds=f.clone(e._minBounds,e._exaggeratedMinBounds),e._exaggeratedMaxBounds=f.clone(e._maxBounds,e._exaggeratedMaxBounds),e.shape===Mm.ELLIPSOID){const 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===Mm.BOX){const n=f.fromElements(1,1,t.verticalExaggeration,sQe);e._exaggeratedModelMatrix=k.multiplyByScale(e._modelMatrix,n,e._exaggeratedModelMatrix),e._exaggeratedModelMatrix=k.multiplyByTranslation(e._exaggeratedModelMatrix,function uQe(e,t){const{shapeTransform:n=k.IDENTITY,globalTransform:i=k.IDENTITY}=e._provider,o=k.getTranslation(n,Uk),r=k.multiplyByPoint(e._modelMatrix,o,Uk),s=k.multiplyByPoint(i,r,Uk),l=he.WGS84.cartesianToCartographic(s,aQe);let u=0;c(l)&&(u=l.height);const d=Ec.getHeight(u,t.verticalExaggeration,t.verticalExaggerationRelativeHeight);return f.fromElements(0,0,(d-u)/t.verticalExaggeration,cQe)}(e,t),e._exaggeratedModelMatrix)}}(this,e);const i=Ote(this,t),o=this._shape;if(i&&(this._shapeVisible=Rte(this,o),function pQe(e,t){const n=t.shaderDefines,i=Object.keys(n).some(o=>n[o]!==e._shapeDefinesOld[o]);return i&&(e._shapeDefinesOld=Rt(n,!0)),i}(this,o)&&(this._shaderDirty=!0)),!this._shapeVisible)return;const r=function mQe(e,t){if(!c(e)||!c(t))return 0;let i,n=t.currentTime,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));const r=re.secondsDifference(i.stop,i.start);return o+re.secondsDifference(n,i.start)/r}(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&&function CQe(e,t){const n=e._traversal,i=e._debugPolylines;function o(l,u,d,h){i.add({positions:[l,u],width:h,material:Pa.fromType("Color",{color:d})})}function r(l,u,d){const h=l.computeCorners();o(h[0],h[1],u,d),o(h[2],h[3],u,d),o(h[4],h[5],u,d),o(h[6],h[7],u,d),o(h[0],h[2],u,d),o(h[4],h[6],u,d),o(h[1],h[3],u,d),o(h[5],h[7],u,d),o(h[0],h[4],u,d),o(h[2],h[6],u,d),o(h[1],h[5],u,d),o(h[3],h[7],u,d)}i.removeAll(),r(e._shape.orientedBoundingBox,Z.WHITE,5),function s(l){if(!n.isRenderable(l))return;const u=l.level,h=Math.max(1,5/Math.pow(2,u));if(r(l.orientedBoundingBox,[Z.RED,Z.LIME,Z.BLUE][u%3],h),c(l.children))for(let p=0;p<8;p++)s(l.children[p])}(n.rootNode);o(f.ZERO,TQe,Z.RED,10),o(f.ZERO,AQe,Z.LIME,10),o(f.ZERO,xQe,Z.BLUE,10),i.update(t)}(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),function _Qe(e,t){const n=e.clippingPlanes;if(!c(n))return!1;n.update(t);const{clippingPlanesState:i,enabled:o}=n;if(o){const r=e._uniforms;r.clippingPlanesTexture=n.texture,r.clippingPlanesMatrix=k.transpose(k.multiplyTransformation(k.inverse(n.modelMatrix,r.clippingPlanesMatrix),e._transformPositionUvToWorld,r.clippingPlanesMatrix),r.clippingPlanesMatrix)}return(e._clippingPlanesState!==i||e._clippingPlanesEnabled!==o)&&(e._clippingPlanesState=i,e._clippingPlanesEnabled=o,!0)}(this,e)&&(this._shaderDirty=!0);const d=this._uniforms;c(s.leafNodeTexture)&&(d.octreeLeafNodeTexture=s.leafNodeTexture,d.octreeLeafNodeTexelSizeUv=V.clone(s.leafNodeTexelSizeUv,d.octreeLeafNodeTexelSizeUv),d.octreeLeafNodeTilesPerRow=s.leafNodeTilesPerRow),this._shaderDirty&&(j$e(this,n),this._shaderDirty=!1);const _=function bQe(e,t,n){const i=k.fromRotationTranslation(e.halfAxes,e.center,nQe),o=k.multiply(t,i,iQe);let u,r=+Number.MAX_VALUE,s=-Number.MAX_VALUE,a=+Number.MAX_VALUE,l=-Number.MAX_VALUE;const d=yQe,h=Lte.length;for(u=0;u<h;u++)k.multiplyByVector(o,Lte[u],d[u]);for(u=0;u<h;u++){const m=d[u];if(m.z>=-m.w){const _=m.x/m.w,p=m.y/m.w;r=Math.min(r,_),s=Math.max(s,_),a=Math.min(a,p),l=Math.max(l,p)}else for(let _=0;_<3;_++){const y=d[gQe[3*u+_]];if(y.z>=-y.w){const b=m.z+m.w,w=de.lerp(m,y,b/(b-(y.z+y.w)),ZKe),v=w.x/w.w,I=w.y/w.w;r=Math.min(r,v),s=Math.max(s,v),a=Math.min(a,I),l=Math.max(l,I)}}}return r=O.clamp(r,-1,1),a=O.clamp(a,-1,1),s=O.clamp(s,-1,1),l=O.clamp(l,-1,1),n=de.fromElements(r,a,s,l,n)}(o.orientedBoundingBox,n.uniformState.viewProjection,$Ke);if(1===_.x||1===_.y||-1===_.z||-1===_.w)return;d.ndcSpaceAxisAlignedBoundingBox=de.clone(_,d.ndcSpaceAxisAlignedBoundingBox),d.transformPositionViewToUv=k.multiplyTransformation(this._transformPositionWorldToUv,n.uniformState.inverseView,d.transformPositionViewToUv),d.transformPositionUvToView=k.multiplyTransformation(n.uniformState.view,this._transformPositionUvToWorld,d.transformPositionUvToView),d.transformDirectionViewToLocal=oe.multiply(this._transformDirectionWorldToLocal,n.uniformState.inverseViewRotation,d.transformDirectionViewToLocal),d.transformNormalLocalToWorld=oe.clone(this._transformNormalLocalToWorld,d.transformNormalLocalToWorld),d.cameraPositionUv=k.multiplyByPoint(this._transformPositionWorldToUv,e.camera.positionWC,d.cameraPositionUv),d.stepSize=this._stepSizeMultiplier;const w=e.passes.pick?this._drawCommandPick:e.passes.pickVoxel?this._drawCommandPickVoxel:this._drawCommand;w.boundingVolume=o.boundingSphere,e.commandList.push(w)};const sQe=new f,Uk=new f,aQe=new Ce,cQe=new f;function Ote(e,t){const n=g(t.shapeTransform,k.IDENTITY),i=g(t.globalTransform,k.IDENTITY);return k.multiplyTransformation(i,e._exaggeratedModelMatrix,e._compoundModelMatrix),k.multiplyTransformation(e._compoundModelMatrix,n,e._compoundModelMatrix),cy(e,"_compoundModelMatrix","_compoundModelMatrixOld")+cy(e,"_minBounds","_minBoundsOld")+cy(e,"_maxBounds","_maxBoundsOld")+cy(e,"_exaggeratedMinBounds","_exaggeratedMinBoundsOld")+cy(e,"_exaggeratedMaxBounds","_exaggeratedMaxBoundsOld")+cy(e,"_minClippingBounds","_minClippingBoundsOld")+cy(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function cy(e,t,n){const i=e[t],o=e[n],r=!i.equals(o);return r&&i.clone(o),r?1:0}function Rte(e,t,n){if(!t.update(e._compoundModelMatrix,e._exaggeratedMinBounds,e._exaggeratedMaxBounds,e.minClippingBounds,e.maxClippingBounds))return!1;const o=t.shapeTransform,r=k.inverse(o,tQe),s=k.getRotation(o,JKe),a=k.getScale(o,KKe),l=f.maximumComponent(a),u=f.divideByScalar(a,l,QKe),d=oe.multiplyByScale(s,u,eQe);return e._transformPositionWorldToUv=k.multiplyTransformation(oQe,r,e._transformPositionWorldToUv),e._transformPositionUvToWorld=k.multiplyTransformation(o,rQe,e._transformPositionUvToWorld),e._transformDirectionWorldToLocal=k.getMatrix3(r,e._transformDirectionWorldToLocal),e._transformNormalLocalToWorld=oe.inverseTranspose(d,e._transformNormalLocalToWorld),!0}wf.prototype.isDestroyed=function(){return!1},wf.prototype.destroy=function(){const e=this._drawCommand;c(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());const t=this._drawCommandPick;return c(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(),Xe(this)};const Lte=new Array(new de(-1,-1,-1,1),new de(1,-1,-1,1),new de(-1,1,-1,1),new de(1,1,-1,1),new de(-1,-1,1,1),new de(1,-1,1,1),new de(-1,1,1,1),new de(1,1,1,1)),gQe=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),yQe=new Array(new de,new de,new de,new de,new de,new de,new de,new de),zk=3e7,TQe=new f(zk,0,0),AQe=new f(0,zk,0),xQe=new f(0,0,zk);function Nte(){this.ready=!0,this.shape=Mm.BOX,this.dimensions=new f(1,1,1),this.names=["data"],this.types=[Tn.SCALAR],this.componentTypes=[vn.FLOAT32],this.maximumTileCount=1}wf.DefaultCustomShader=new qKe({fragmentShaderText:"void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)\n{\n material.diffuse = vec3(1.0);\n material.alpha = 1.0;\n}"}),Nte.prototype.requestData=function(e){if(!((c(e)?g(e.tileLevel,0):0)>=1))return Promise.resolve([new Float32Array(1)])},wf.DefaultProvider=new Nte;const Vk=wf,b1=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function hi(e){const t=(e=g(e,g.EMPTY_OBJECT)).canvas;let n=e.creditContainer,i=e.creditViewport;const o=Rt(e.contextOptions);if(!c(t))throw new E("options and options.canvas are required.");const r=c(n),s=new c9e(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)),c(i)||(i=t.parentNode),this._id=kr(),this._jobScheduler=new FWe,this._frameState=new rWe(s,new uje(n,"\u2022",i),this._jobScheduler),this._frameState.scene3DOnly=g(e.scene3DOnly,!1),this._removeCreditContainer=!r,this._creditContainer=n,this._canvas=t,this._context=s,this._computeEngine=new uGe(s),this._ellipsoid=g(e.ellipsoid,he.default),this._globe=void 0,this._globeTranslucencyState=new PWe,this._primitives=new Zg,this._groundPrimitives=new Zg,this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=hi.defaultLogDepthBuffer&&s.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new See,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=g(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new zje(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new ar({color:new Z,stencil:0,owner:this}),this._depthClearCommand=new ar({depth:1,owner:this}),this._stencilClearCommand=new ar({stencil:0}),this._classificationStencilClearCommand=new ar({stencil:0,renderState:Lt.fromCache({stencilMask:xn.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new EXe(this),this._preUpdate=new Ye,this._postUpdate=new Ye,this._renderError=new Ye,this._preRender=new Ye,this._postRender=new Ye,this._minimumDisableDepthTestDistance=0,this._debugInspector=new g$e,this._msaaSamples=g(e.msaaSamples,1),this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new Ye,this.morphComplete=new Ye,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=Z.clone(Z.BLACK),this._mode=ce.SCENE3D,this._mapProjection=c(e.mapProjection)?e.mapProjection:new Qr(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 u9e,this.fog=new iWe,this.fog.enabled=he.WGS84.equals(this._ellipsoid),he.WGS84.equals(this._ellipsoid)||(nr.DEFAULT_VIEW_RECTANGLE=Te.fromDegrees(-45,-45,45,45)),this._shadowMapCamera=new nr(this),this.shadowMap=new XD({context:s,lightCamera:this._shadowMapCamera,enabled:g(e.shadows,!1)}),this.invertClassification=!1,this.invertClassificationColor=Z.clone(Z.WHITE),this._actualInvertClassificationColor=Z.clone(this._invertClassificationColor),this._invertClassification=new pJ,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new vYe,this._brdfLutGenerator=new h9e,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new s$e(this),this._cameraUnderground=!1,this._mapMode2D=g(e.mapMode2D,vm.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=g(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=g(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=kf.requestCompletedEvent.addEventListener(b1(this)),this._removeTaskProcessorListenerCallback=ba.taskCompletedEvent.addEventListener(b1(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;const a=new Vt(0,0,s.drawingBufferWidth,s.drawingBufferHeight),l=new nr(this);this._logDepthBuffer&&(l.frustum.near=.1,l.frustum.far=1e10),this.preloadFlightCamera=new nr(this),this.preloadFlightCullingVolume=void 0,this._picking=new k7e(this),this._defaultView=new LJ(this,l,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 ID,Bte(this,0,re.now()),this.updateFrameState(),this.initializeFrame()}function Mte(e,t,n){const i=e._frameState,o=e._context,r=e._view.oit,s=i.shadowState.lightShadowMaps,a=i.shadowState.lightShadowsEnabled;let l=t.derivedCommands;c(t.pickId)&&(l.picking=eE.createPickDerivedCommand(e,t,o,l.picking)),t.pickOnly||(l.depth=eE.createDepthOnlyDerivedCommand(e,t,o,l.depth)),l.originalCommand=t,e._hdr&&(l.hdr=eE.createHdrCommand(t,o,l.hdr),l=(t=l.hdr.command).derivedCommands),a&&t.receiveShadows&&(l.shadows=XD.createReceiveDerivedCommand(s,t,n,o,l.shadows)),t.pass===Ue.TRANSLUCENT&&c(r)&&r.isSupported()&&(a&&t.receiveShadows?(l.oit=c(l.oit)?l.oit:{},l.oit.shadows=r.createDerivedCommands(l.shadows.receiveCommand,o,l.oit.shadows)):l.oit=r.createDerivedCommands(t,o,l.oit))}hi.defaultLogDepthBuffer=!0,Object.defineProperties(hi.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 dn.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return dn.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 yA.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,function EQe(e,t){for(let i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;const n=[];c(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(b1(e))),n.push(t.terrainProviderChanged.addEventListener(b1(e)))),e._removeGlobeCallbacks=n}(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(c(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(c(this.globe))return this.globe.terrainProvider},set:function(e){this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),c(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(c(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){if(this.scene3DOnly&&e!==ce.SCENE3D)throw new E("Only SceneMode.SCENE3D is valid when scene3DOnly is true.");if(e===ce.SCENE2D)this.morphTo2D(0);else if(e===ce.SCENE3D)this.morphTo3D(0);else{if(e!==ce.COLUMBUS_VIEW)throw new E("value must be a valid SceneMode enumeration.");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){if(this.camera.frustum instanceof $n)throw new E("VR is unsupported with an orthographic projection.");this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new nr(this),c(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new eWe(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){if(!c(e)||e<0)throw new E("minimumDisableDepthTestDistance must be greater than or equal to 0.0.");this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){this._logDepthBuffer!==(e=this._context.fragmentDepth&&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){const t=this._context,n=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=n!==this._hdr,this._hdr=n}},highDynamicRangeSupported:{get:function(){const 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,dn.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}}}),hi.prototype.getCompressedTextureFormatSupported=function(e){const t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc"===e||"etc"===e)&&t.etc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1||("WEBGL_compressed_texture_astc"===e||"astc"===e)&&t.astc||("EXT_texture_compression_bptc"===e||"bc7"===e)&&t.bc7},hi.prototype.updateDerivedCommands=function(e){if(!c(e.derivedCommands))return;const t=this._frameState,n=this._context;let i=!1;const o=t.shadowState.lastDirtyTime;e.lastDirtyTime!==o&&(e.lastDirtyTime=o,e.dirty=!0,i=!0);const r=t.useLogDepth,s=this._hdr,a=e.derivedCommands,l=c(a.logDepth),u=c(a.hdr),d=c(a.originalCommand),h=r&&!l,_=!(r&&s||d);e.dirty=e.dirty||h||s&&!u||_,e.dirty&&(e.dirty=!1,t.shadowState.shadowsEnabled&&e.castShadows&&(a.shadows=XD.createCastDerivedCommand(t.shadowState.shadowMaps,e,i,n,a.shadows)),(l||h)&&(a.logDepth=eE.createLogDepthCommand(e,n,a.logDepth),Mte(this,a.logDepth.command,i)),(d||_)&&Mte(this,e,i))};const wQe=new Gg({pass:zs.RENDER}),Hk=new Gg({pass:zs.PRELOAD}),Gk=new Gg({pass:zs.PRELOAD_FLIGHT}),SQe=new Gg({pass:zs.REQUEST_RENDER_MODE_DEFER_CHECK}),Fte=new Ae;let jk;function Bte(e,t,n){const i=e._frameState;i.frameNumber=t,i.time=re.clone(n,i.time)}hi.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1},hi.prototype.updateFrameState=function(){const 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=function vQe(e){const t=e.globe;if(e._mode===ce.SCENE3D&&c(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent)return Fte.radius=e.ellipsoid.minimumRadius+e.frameState.minimumTerrainHeight,jk=eGe.fromBoundingSphere(Fte,e.camera.positionWC,jk),jk}(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof $n||this.camera.frustum instanceof Qa),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState;const{globe:n}=this;c(n)&&n._terrainExaggerationChanged&&(this.verticalExaggeration=n._terrainExaggeration,this.verticalExaggerationRelativeHeight=n._terrainExaggerationRelativeHeight,n._terrainExaggerationChanged=!1),t.verticalExaggeration=this.verticalExaggeration,t.verticalExaggerationRelativeHeight=this.verticalExaggerationRelativeHeight,c(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=Z.clone(this.invertClassificationColor,this._actualInvertClassificationColor),pJ.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,t.maximumScreenSpaceError=c(this.globe)?this.globe.maximumScreenSpaceError:2,this.clearPasses(t.passes),t.tilesetPassState=void 0},hi.prototype.isVisible=function(e,t,n){return c(e)&&(!c(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==On.OUTSIDE&&(!c(n)||!e.occlude||!e.boundingVolume.isOccluded(n)))};let T1=new k(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function aa(e,t,n,i,o){const r=t._frameState;if(c(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof ar)return void e.execute(n,i);e.debugShowBoundingVolume&&c(e.boundingVolume)&&function IQe(e,t,n,i){const o=t._frameState,r=o.context,s=e.boundingVolume;c(t._debugVolume)&&t._debugVolume.destroy();let a,l=f.clone(s.center);if(o.mode!==ce.SCENE3D){l=k.multiplyByPoint(T1,l,l);const m=o.mapProjection,_=m.unproject(l);l=m.ellipsoid.cartographicToCartesian(_)}if(c(s.radius)){const m=s.radius;a=ao.toWireframe(UC.createGeometry(new UC({radii:new f(m,m,m),vertexFormat:gi.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Yi({geometryInstances:new zn({geometry:a,modelMatrix:k.fromTranslation(l),attributes:{color:new ei(1,0,0,1)}}),appearance:new gi({flat:!0,translucent:!1}),asynchronous:!1})}else{const m=s.halfAxes;a=ao.toWireframe(Ug.createGeometry(Ug.fromDimensions({dimensions:new f(2,2,2),vertexFormat:gi.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Yi({geometryInstances:new zn({geometry:a,modelMatrix:k.fromRotationTranslation(m,l,new k),attributes:{color:new ei(1,0,0,1)}}),appearance:new gi({flat:!0,translucent:!1}),asynchronous:!1})}const u=o.commandList,d=o.commandList=[];let h;t._debugVolume.update(o),e=d[0],o.useLogDepth&&(e=eE.createLogDepthCommand(e,r).command),c(i)&&(h=n.framebuffer,n.framebuffer=i),e.execute(r,n),c(h)&&(n.framebuffer=h),o.commandList=u}(e,t,i,o),r.useLogDepth&&c(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);const s=r.passes;if(!s.pick&&!s.pickVoxel&&!s.depth&&t._hdr&&c(e.derivedCommands)&&c(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),s.pick||s.depth){if(s.pick&&!s.depth&&c(e.derivedCommands.picking))return void(e=e.derivedCommands.picking.pickCommand).execute(n,i);if(c(e.derivedCommands.depth))return void(e=e.derivedCommands.depth.depthOnlyCommand).execute(n,i)}t.debugShowCommands||t.debugShowFrustums?t._debugInspector.executeDebugShowFrustumsCommand(t,e,i):r.shadowState.lightShadowsEnabled&&e.receiveShadows&&c(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(n,i):e.execute(n,i)}function mE(e,t,n,i){const o=t._frameState;let r=e.derivedCommands;c(r)&&(o.useLogDepth&&c(r.logDepth)&&(e=r.logDepth.command),r=e.derivedCommands,c(r.picking)?(e=r.picking.pickCommand).execute(n,i):c(r.depth)&&(e=r.depth.depthOnlyCommand).execute(n,i))}function kte(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}function DQe(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+O.EPSILON12}function PQe(e,t,n,i,o){const r=e.context;f3(i,kte,e.camera.positionWC),c(o)&&t(o.unclassifiedCommand,e,r,n);const s=i.length;for(let a=0;a<s;++a)t(i[a],e,r,n)}function OQe(e,t,n,i,o){const r=e.context;f3(i,DQe,e.camera.positionWC),c(o)&&t(o.unclassifiedCommand,e,r,n);const s=i.length;for(let a=0;a<s;++a)t(i[a],e,r,n)}function RQe(e,t,n,i){const o=e.context;f3(i,kte,e.camera.positionWC);const r=i.length;for(let s=0;s<r;++s)t(i[s],e,o,n)}T1=k.inverseTransformation(T1,T1);const LQe=new Lo,NQe=new zg,MQe=new $n,FQe=new Qa;function Wk(e,t){const{camera:n,context:i,frameState:o}=e,{uniformState:r}=i;let s;r.updateCamera(n),s=c(n.frustum.fov)?n.frustum.clone(LQe):c(n.frustum.infiniteProjectionMatrix)?n.frustum.clone(NQe):c(n.frustum.width)?n.frustum.clone(MQe):n.frustum.clone(FQe),s.near=n.frustum.near,s.far=n.frustum.far,r.updateFrustum(s),r.updatePass(Ue.ENVIRONMENT);const a=o.passes,l=a.pick||a.pickVoxel,u=e._environmentState,d=e._view,h=u.renderTranslucentDepthForPick,m=u.useWebVR;if(!l){const D=u.skyBoxCommand;if(c(D)&&aa(D,e,i,t),u.isSkyAtmosphereVisible&&aa(u.skyAtmosphereCommand,e,i,t),u.isSunVisible&&(u.sunDrawCommand.execute(i,t),e.sunBloom&&!m)){let L;L=u.useGlobeDepthFramebuffer?d.globeDepth.framebuffer:u.usePostProcess?d.sceneFramebuffer.framebuffer:u.originalFramebuffer,e._sunPostProcess.execute(i),e._sunPostProcess.copy(i,L),t.framebuffer=L}u.isMoonVisible&&u.moonCommand.execute(i,t)}let _;u.useOIT?(c(e._executeOITFunction)||(e._executeOITFunction=function(D,L,M,U,z){d.globeDepth.prepareColorTextures(i),d.oit.executeCommands(D,L,M,U,z)}),_=e._executeOITFunction):_=a.render?PQe:OQe;const p=d.frustumCommandsList,y=p.length,b=u.clearGlobeDepth,x=u.useDepthPlane,C=e._globeTranslucencyState,w=C.translucent,v=e._view.globeTranslucencyFramebuffer,I=e._depthClearCommand,P=e._stencilClearCommand,N=e._classificationStencilClearCommand,R=e._depthPlane,B=u.usePostProcessSelected,F=n.position.z;let S;for(let D=0;D<y;++D){const L=y-D-1,M=p[L];e.mode===ce.SCENE2D?(n.position.z=F-M.near+1,s.far=Math.max(1,M.far-M.near),s.near=1,r.update(o),r.updateFrustum(s)):(s.near=0!==L?M.near*e.opaqueFrustumNearOffset:M.near,s.far=M.far,r.updateFrustum(s)),I.execute(i,t),i.stencilBuffer&&P.execute(i,t),r.updatePass(Ue.GLOBE);let U=M.commands[Ue.GLOBE],z=M.indices[Ue.GLOBE];if(w)C.executeGlobeCommands(M,aa,v,e,t);else for(S=0;S<z;++S)aa(U[S],e,i,t);const G=d.globeDepth;if(c(G)&&u.useGlobeDepthFramebuffer&&G.executeCopyDepth(i,t),!u.renderTranslucentDepthForPick)if(r.updatePass(Ue.TERRAIN_CLASSIFICATION),U=M.commands[Ue.TERRAIN_CLASSIFICATION],z=M.indices[Ue.TERRAIN_CLASSIFICATION],w)C.executeGlobeClassificationCommands(M,aa,v,e,t);else for(S=0;S<z;++S)aa(U[S],e,i,t);if(b&&(I.execute(i,t),x&&R.execute(i,t)),!u.useInvertClassification||l||u.renderTranslucentDepthForPick){for(r.updatePass(Ue.CESIUM_3D_TILE),U=M.commands[Ue.CESIUM_3D_TILE],z=M.indices[Ue.CESIUM_3D_TILE],S=0;S<z;++S)aa(U[S],e,i,t);if(z>0&&(c(G)&&u.useGlobeDepthFramebuffer&&(G.prepareColorTextures(i,b),G.executeUpdateDepth(i,t,b,G.depthStencilTexture)),!u.renderTranslucentDepthForPick))for(r.updatePass(Ue.CESIUM_3D_TILE_CLASSIFICATION),U=M.commands[Ue.CESIUM_3D_TILE_CLASSIFICATION],z=M.indices[Ue.CESIUM_3D_TILE_CLASSIFICATION],S=0;S<z;++S)aa(U[S],e,i,t)}else{e._invertClassification.clear(i,t);const Q=t.framebuffer;for(t.framebuffer=e._invertClassification._fbo.framebuffer,r.updatePass(Ue.CESIUM_3D_TILE),U=M.commands[Ue.CESIUM_3D_TILE],z=M.indices[Ue.CESIUM_3D_TILE],S=0;S<z;++S)aa(U[S],e,i,t);for(c(G)&&u.useGlobeDepthFramebuffer&&(e._invertClassification.prepareTextures(i),G.executeUpdateDepth(i,t,b,e._invertClassification._fbo.getDepthStencilTexture())),r.updatePass(Ue.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),U=M.commands[Ue.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],z=M.indices[Ue.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],S=0;S<z;++S)aa(U[S],e,i,t);for(t.framebuffer=Q,e._invertClassification.executeClassified(i,t),1===o.invertClassificationColor.alpha&&e._invertClassification.executeUnclassified(i,t),z>0&&i.stencilBuffer&&N.execute(i,t),r.updatePass(Ue.CESIUM_3D_TILE_CLASSIFICATION),U=M.commands[Ue.CESIUM_3D_TILE_CLASSIFICATION],z=M.indices[Ue.CESIUM_3D_TILE_CLASSIFICATION],S=0;S<z;++S)aa(U[S],e,i,t)}for(z>0&&i.stencilBuffer&&P.execute(i,t),r.updatePass(Ue.VOXELS),U=M.commands[Ue.VOXELS],z=M.indices[Ue.VOXELS],U.length=z,RQe(e,aa,t,U),r.updatePass(Ue.OPAQUE),U=M.commands[Ue.OPAQUE],z=M.indices[Ue.OPAQUE],S=0;S<z;++S)aa(U[S],e,i,t);let W;if(0!==L&&e.mode!==ce.SCENE2D&&(s.near=M.near,r.updateFrustum(s)),!l&&u.useInvertClassification&&o.invertClassificationColor.alpha<1&&(W=e._invertClassification),r.updatePass(Ue.TRANSLUCENT),U=M.commands[Ue.TRANSLUCENT],U.length=M.indices[Ue.TRANSLUCENT],_(e,aa,t,U,W),M.indices[Ue.CESIUM_3D_TILE_CLASSIFICATION]>0&&d.translucentTileClassification.isSupported()&&(d.translucentTileClassification.executeTranslucentCommands(e,aa,t,U,G.depthStencilTexture),d.translucentTileClassification.executeClassificationCommands(e,aa,t,M)),i.depthTexture&&e.useDepthPicking&&(u.useGlobeDepthFramebuffer||h)){const Q=G.depthStencilTexture,Y=e._picking.getPickDepth(e,L);Y.update(i,Q),Y.executeCopyDepth(i,t)}if(l||!B)continue;const j=t.framebuffer;if(t.framebuffer=d.sceneFramebuffer.getIdFramebuffer(),s.near=0!==L?M.near*e.opaqueFrustumNearOffset:M.near,s.far=M.far,r.updateFrustum(s),r.updatePass(Ue.GLOBE),U=M.commands[Ue.GLOBE],z=M.indices[Ue.GLOBE],w)C.executeGlobeCommands(M,mE,v,e,t);else for(S=0;S<z;++S)mE(U[S],e,i,t);for(b&&(I.framebuffer=t.framebuffer,I.execute(i,t),I.framebuffer=void 0),b&&x&&R.execute(i,t),r.updatePass(Ue.CESIUM_3D_TILE),U=M.commands[Ue.CESIUM_3D_TILE],z=M.indices[Ue.CESIUM_3D_TILE],S=0;S<z;++S)mE(U[S],e,i,t);for(r.updatePass(Ue.OPAQUE),U=M.commands[Ue.OPAQUE],z=M.indices[Ue.OPAQUE],S=0;S<z;++S)mE(U[S],e,i,t);for(r.updatePass(Ue.TRANSLUCENT),U=M.commands[Ue.TRANSLUCENT],z=M.indices[Ue.TRANSLUCENT],S=0;S<z;++S)mE(U[S],e,i,t);t.framebuffer=j}}function Ute(e){e.context.uniformState.updatePass(Ue.COMPUTE);const n=e._environmentState.sunComputeCommand;c(n)&&n.execute(e._computeEngine);const i=e._computeCommandList,o=i.length;for(let r=0;r<o;++r)i[r].execute(e._computeEngine)}function kQe(e,t,n){const i=n.shadowMapCullingVolume,o=n.isPointLight,r=n.passes,s=r.length,a=t.length;for(let l=0;l<a;++l){const u=t[l];if(e.updateDerivedCommands(u),u.castShadows&&(u.pass===Ue.GLOBE||u.pass===Ue.CESIUM_3D_TILE||u.pass===Ue.OPAQUE||u.pass===Ue.TRANSLUCENT)&&e.isVisible(u,i))if(o)for(let d=0;d<s;++d)r[d].commandList.push(u);else if(1===s)r[0].commandList.push(u);else{let d=!1;for(let h=s-1;h>=0;--h)if(e.isVisible(u,r[h].cullingVolume))r[h].commandList.push(u),d=!0;else if(d)break}}}function zte(e){const t=e.frameState,n=t.shadowState.shadowMaps,i=n.length;if(!t.shadowState.shadowsEnabled)return;const o=e.context,r=o.uniformState;for(let s=0;s<i;++s){const a=n[s];if(a.outOfView)continue;const l=a.passes,u=l.length;for(let h=0;h<u;++h)l[h].commandList.length=0;kQe(e,e.frameState.commandList,a);for(let h=0;h<u;++h){const m=a.passes[h];r.updateCamera(m.camera),a.updatePass(o,h);const _=m.commandList.length;for(let p=0;p<_;++p){const y=m.commandList[p];r.updatePass(y.pass),aa(y.derivedCommands.shadows.castCommands[s],e,o,m.passState)}}}}const UQe=new f;hi.prototype.updateAndExecuteCommands=function(e,t){const i=this._frameState.mode;this._environmentState.useWebVR?function zQe(e,t,n){const i=e._view,o=i.camera,s=e._environmentState.renderTranslucentDepthForPick;qk(e,t,n),Hte(e),i.createPotentiallyVisibleSet(e),Ute(e),s||zte(e);const a=t.viewport;a.x=0,a.y=0,a.width=.5*a.width;const l=nr.clone(o,e._cameraVR);l.frustum=o.frustum;const u=o.frustum.near,d=u*g(e.focalLength,5),h=g(e.eyeSeparation,d/30),m=f.multiplyByScalar(l.right,.5*h,UQe);o.frustum.aspectRatio=a.width/a.height;const _=.5*h*u/d;f.add(l.position,m,o.position),o.frustum.xOffset=_,Wk(e,t),a.x=a.width,f.subtract(l.position,m,o.position),o.frustum.xOffset=-_,Wk(e,t),nr.clone(l,o)}(this,e,t):i!==ce.SCENE2D||this._mapMode2D===vm.ROTATE?Bm(!0,this,e,t):(qk(this,e,t),function ZQe(e,t){const n=e.context,i=e.frameState,o=e.camera,r=t.viewport,s=Vt.clone(r,XQe);t.viewport=s;const l=HQe;e.mapProjection.project(VQe,l);const d=f.clone(o.position,GQe),h=k.clone(o.transform,WQe),m=o.frustum.clone();o._setTransform(k.IDENTITY);const _=k.computeViewportTransformation(s,0,1,jQe),p=o.frustum.projectionMatrix,y=o.positionWC.y,b=f.fromElements(O.sign(y)*l.x-y,0,-o.positionWC.x,qQe),x=In.pointToGLWindowCoordinates(p,_,b,YQe);x.x=Math.floor(x.x);const C=s.x,w=s.width;if(0===y||x.x<=C||x.x>=C+w)Bm(!0,e,t);else if(Math.abs(C+.5*w-x.x)<1)s.width=x.x-s.x,o.position.x*=O.sign(o.position.x),o.frustum.right=0,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Bm(!0,e,t),s.x=x.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),Bm(!1,e,t);else if(x.x>C+.5*w){s.width=x.x-C;const v=o.frustum.right;o.frustum.right=l.x-y,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Bm(!0,e,t),s.x=x.x,s.width=C+w-x.x,o.position.x=-o.position.x,o.frustum.left=-o.frustum.right,o.frustum.right=v-2*o.frustum.right,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Bm(!1,e,t)}else{s.x=x.x,s.width=C+w-x.x;const v=o.frustum.left;o.frustum.left=-l.x-y,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Bm(!0,e,t),s.x=C,s.width=x.x-C,o.position.x=-o.position.x,o.frustum.right=-o.frustum.left,o.frustum.left=v-2*o.frustum.left,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Bm(!1,e,t)}o._setTransform(h),f.clone(d,o.position),o.frustum=m.clone(),t.viewport=r}(this,e))};const VQe=new Ce(Math.PI,O.PI_OVER_TWO),HQe=new f,GQe=new f,jQe=new k,WQe=new k,qQe=new f,YQe=new f,XQe=new Vt;function Bm(e,t,n,i){const r=t._view,s=t._environmentState.renderTranslucentDepthForPick;e||(t.frameState.commandList.length=0),Hte(t),r.createPotentiallyVisibleSet(t),e&&(c(i)&&qk(t,n,i),Ute(t),s||zte(t)),Wk(t,n)}const Vte=new Fu;function Hte(e){const t=e._frameState;e._groundPrimitives.update(t),e._primitives.update(t),function $Qe(e){const t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e._debugFrustumPlanes=e.debugShowFrustumPlanes?new $C({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),c(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}(e),function KQe(e){const t=e._frameState,n=t.shadowMaps,i=n.length,o=i>0&&!t.passes.pick&&!t.passes.pickVoxel&&e.mode===ce.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){const 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)}}}(e),e._globe&&e._globe.render(t)}function qk(e,t,n){const i=e._context,o=e._frameState,r=e._environmentState,s=e._view,a=e._frameState.passes,l=a.pick||a.pickVoxel;c(s.globeDepth)&&(s.globeDepth.picking=l);const u=r.useWebVR;r.originalFramebuffer=t.framebuffer,c(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!u?e._sunPostProcess=new f$e:c(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!c(e.sun)&&c(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);const d=e._clearColorCommand;Z.clone(n,d.color),d.execute(i,t);const h=r.useGlobeDepthFramebuffer=c(s.globeDepth);h&&(s.globeDepth.update(i,t,s.viewport,e.msaaSamples,e._hdr,r.clearGlobeDepth),s.globeDepth.clear(i,t,n));const m=s.oit,_=r.useOIT=!l&&c(m)&&m.isSupported();_&&(m.update(i,t,s.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),m.clear(i,t,n),r.useOIT=m.isSupported());const p=e.postProcessStages;let y=r.usePostProcess=!l&&(e._hdr||p.length>0||p.ambientOcclusion.enabled||p.fxaa.enabled||p.bloom.enabled);if(r.usePostProcessSelected=!1,y&&(s.sceneFramebuffer.update(i,s.viewport,e._hdr,e.msaaSamples),s.sceneFramebuffer.clear(i,t,n),p.update(i,o.useLogDepth,e._hdr),p.clear(i),y=r.usePostProcess=p.ready,r.usePostProcessSelected=y&&p.hasSelected),r.isSunVisible&&e.sunBloom&&!u?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(i,t,n)):h?t.framebuffer=s.globeDepth.framebuffer:y&&(t.framebuffer=s.sceneFramebuffer.framebuffer),c(t.framebuffer)&&d.execute(i,t),r.useInvertClassification=!l&&c(t.framebuffer)&&e.invertClassification){let x;if(1===e.frameState.invertClassificationColor.alpha&&r.useGlobeDepthFramebuffer&&(x=s.globeDepth.framebuffer),c(x)||i.depthTexture){if(e._invertClassification.previousFramebuffer=x,e._invertClassification.update(i,e.msaaSamples,s.globeDepth.colorFramebufferManager),e._invertClassification.clear(i,t),e.frameState.invertClassificationColor.alpha<1&&_){const C=e._invertClassification.unclassifiedCommand,w=C.derivedCommands;w.oit=m.createDerivedCommands(C,i,w.oit)}}else r.useInvertClassification=!1}e._globeTranslucencyState.translucent&&s.globeTranslucencyFramebuffer.updateAndClear(e._hdr,s.viewport,i,t)}hi.prototype.updateEnvironment=function(){const e=this._frameState,t=this._view,n=this._environmentState,o=e.passes.offscreen,r=this.atmosphere,s=this.skyAtmosphere,a=this.globe,l=this._globeTranslucencyState;if(!e.passes.render||this._mode!==ce.SCENE2D&&t.camera.frustum instanceof $n||!l.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{c(s)?(c(a)?(s.setDynamicLighting(lQ.fromGlobeFlags(a)),n.isReadyForAtmosphere=n.isReadyForAtmosphere||!a.show||a._surface._tilesToRender.length>0):(s.setDynamicLighting(r.dynamicLighting),n.isReadyForAtmosphere=!0),n.skyAtmosphereCommand=s.update(e,a),c(n.skyAtmosphereCommand)&&this.updateDerivedCommands(n.skyAtmosphereCommand)):n.skyAtmosphereCommand=void 0,n.skyBoxCommand=c(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;const b=c(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;n.sunDrawCommand=c(b)?b.drawCommand:void 0,n.sunComputeCommand=c(b)?b.computeCommand:void 0,n.moonCommand=c(this.moon)?this.moon.update(e):void 0}const u=n.clearGlobeDepth=c(a)&&a.show&&(!a.depthTestAgainstTerrain||this.mode===ce.SCENE2D);(n.useDepthPlane=u&&this.mode===ce.SCENE3D&&l.useDepthPlane)&&this._depthPlane.update(e),n.renderTranslucentDepthForPick=!1,n.useWebVR=this._useWebVR&&this.mode!==ce.SCENE2D&&!o;const h=e.mode!==ce.SCENE3D||l.sunVisibleThroughGlobe?void 0:e.occluder;let m=e.cullingVolume;const _=Vte.planes;for(let b=0;b<5;++b)_[b]=m.planes[b];m=Vte,n.isSkyAtmosphereVisible=c(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(n.sunDrawCommand,m,h),n.isMoonVisible=this.isVisible(n.moonCommand,m,h);const p=this.specularEnvironmentMaps;let y=this._specularEnvironmentMapAtlas;!c(p)||c(y)&&y.url===p?!c(p)&&c(y)&&(y.destroy(),this._specularEnvironmentMapAtlas=void 0):(y=y&&y.destroy(),this._specularEnvironmentMapAtlas=new yA(p)),c(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e)},hi.prototype.resolveFramebuffers=function(e){const t=this._context,n=this._environmentState,i=this._view,o=i.globeDepth;c(o)&&o.prepareColorTextures(t);const r=n.useOIT,s=n.useGlobeDepthFramebuffer,a=n.usePostProcess,l=n.originalFramebuffer,u=s?o.colorFramebufferManager:void 0,d=i.sceneFramebuffer._colorFramebuffer,h=i.sceneFramebuffer.idFramebuffer;r&&(e.framebuffer=a?d.framebuffer:l,i.oit.execute(t,e));const m=i.translucentTileClassification;if(m.hasTranslucentDepth&&m.isSupported()&&m.execute(this,e),a){i.sceneFramebuffer.prepareColorTextures(t);let _=d;s&&!r&&(_=u);const p=this.postProcessStages,y=_.getColorTexture(0),b=h.getColorTexture(0),x=g(u,d).getDepthStencilTexture();p.execute(t,y,x,b),p.copy(t,l)}!r&&!a&&s&&(e.framebuffer=l,o.executeCopyColor(t,e))},hi.prototype.getHeight=function(e,t){if(!c(e))return;const n=t===tn.CLAMP_TO_TERRAIN||t===tn.RELATIVE_TO_TERRAIN,i=t===tn.CLAMP_TO_3D_TILE||t===tn.RELATIVE_TO_3D_TILE;if(!c(e))return;let o=Number.NEGATIVE_INFINITY;if(!n){const s=this.primitives.length;for(let a=0;a<s;++a){const l=this.primitives.get(a);if(!l.isCesium3DTileset||!l.show||!l.enableCollision)continue;const u=l.getHeight(e,this);c(u)&&u>o&&(o=u)}}const r=this._globe;if(!i&&c(r)&&r.show){const s=r.getHeight(e);s>o&&(o=s)}return o>Number.NEGATIVE_INFINITY?o:void 0};const Yk=new Ce;function nJe(e){e._jobScheduler.resetBudgets();const t=e._frameState;e.primitives.prePassesUpdate(t),c(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function iJe(e){e.primitives.postPassesUpdate(e._frameState),kf.update()}hi.prototype.updateHeight=function(e,t,n){A.typeOf.func("callback",t);const i=()=>{Ce.clone(e,Yk);const _=this.getHeight(e,n);c(_)&&(Yk.height=_,t(Yk))},o=n===tn.CLAMP_TO_TERRAIN||n===tn.RELATIVE_TO_TERRAIN;let s;n!==tn.CLAMP_TO_3D_TILE&&n!==tn.RELATIVE_TO_3D_TILE&&c(this.globe)&&(s=this.globe._surface.updateHeight(e,i));let a={};const l=this._ellipsoid,u=_=>{if(o||_.isDestroyed()||!_.isCesium3DTileset)return;const p=_.updateHeight(e,i,l);a[_.id]=p};if(!o){const _=this.primitives.length;for(let p=0;p<_;++p)u(this.primitives.get(p))}const d=this.primitives.primitiveAdded.addEventListener(u),h=this.primitives.primitiveRemoved.addEventListener(_=>{_.isDestroyed()||!_.isCesium3DTileset||(c(a[_.id])&&a[_.id](),delete a[_.id])});return()=>{s=s&&s(),Object.values(a).forEach(_=>_()),a={},d(),h()}},hi.prototype.initializeFrame=function(){120==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeightDirty&&(c(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),this._globeHeight=function JQe(e){if(e.mode!==ce.MORPHING)return e.getHeight(e.camera.positionCartographic)}(this),this._globeHeightDirty=!1,this._removeUpdateHeightCallback=this.updateHeight(this.camera.positionCartographic,t=>{this.isDestroyed()||(this._globeHeight=t.height)})),this._cameraUnderground=function eJe(e){const n=e._mode,i=e._screenSpaceCameraController,o=e.camera.positionCartographic;if(!c(o))return!1;if(!i.onMap()&&o.height<0)return!0;if(n===ce.SCENE2D||n===ce.MORPHING)return!1;const r=e._globeHeight;return c(r)&&o.height<r}(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),c(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};const oJe=new Z;function rJe(e){const 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=wQe;let r=g(e.backgroundColor,Z.BLACK);e._hdr&&(r=Z.clone(r,oJe),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);const s=e.shadowMap;c(s)&&s.enabled&&(!c(e.light)||e.light instanceof ID?f.negate(i.sunDirectionWC,e._shadowMapCamera.direction):f.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(s)),e._computeCommandList.length=0,e._overlayCommandList.length=0;const a=o.viewport;a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight;const l=o.passState;l.framebuffer=void 0,l.blendingEnabled=void 0,l.scissorTest=void 0,l.viewport=Vt.clone(a,l.viewport),c(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(l,r),e.resolveFramebuffers(l),l.framebuffer=void 0,function BQe(e,t){e.context.uniformState.updatePass(Ue.OVERLAY);const i=e.context,o=e._overlayCommandList,r=o.length;for(let s=0;s<r;++s)o[s].execute(i,t)}(e,l),c(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function ly(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function sJe(e){return e._picking.updateMostDetailedRayPicks(e)}function aJe(e){const t=e._frameState;Hk.camera=t.camera,Hk.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Hk)}function cJe(e){const t=e._frameState;t.camera.canPreloadFlight()&&(Gk.camera=e.preloadFlightCamera,Gk.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,Gk))}function lJe(e){e.primitives.updateForPass(e._frameState,SQe)}hi.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);const t=this._frameState;t.newFrame=!1,c(e)||(e=re.now());const n=this._view.checkForCameraUpdates(this);n&&(this._globeHeightDirty=!0);let i=!this.requestRenderMode||this._renderRequested||n||this._logDepthBufferDirty||this._hdrDirty||this.mode===ce.MORPHING;if(!i&&c(this.maximumRenderTimeChange)&&c(this._lastRenderTime)){const o=Math.abs(re.secondsDifference(this._lastRenderTime,e));i=i||o>this.maximumRenderTimeChange}i&&(this._lastRenderTime=re.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1,Bte(this,O.incrementWrap(t.frameNumber,15e6,1),e),t.newFrame=!0),ly(this,nJe),this.primitives.show&&(ly(this,sJe),ly(this,aJe),ly(this,cJe),i||ly(this,lJe)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),ly(this,rJe)),function tJe(e,t){if(e.debugShowFramesPerSecond){if(!c(e._performanceDisplay)){const n=document.createElement("div");n.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(n);const o=new BWe({container:n});e._performanceDisplay=o,e._performanceContainer=n}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)}else c(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}(this,i),ly(this,iJe),function QQe(e){const t=e._frameState.afterRender;for(let n=0,i=t.length;n<i;++n)t[n]()&&e.requestRender();t.length=0}(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())},hi.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},hi.prototype.requestRender=function(){this._renderRequested=!0},hi.prototype.clampLineWidth=function(e){return Math.max(dn.minimumAliasedLineWidth,Math.min(e,dn.maximumAliasedLineWidth))},hi.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n)},hi.prototype.pickVoxel=function(e,t,n){const i=this.pick(e,t,n);if(!c(i))return;const o=i.primitive;if(!(o instanceof Vk))return;const r=this._picking.pickVoxelCoordinate(this,e,t,n),s=255*r[0]+r[1],a=o._traversal.findKeyframeNode(s);return c(a)?A$e.fromKeyframeNode(o,s,255*r[2]+r[3],a):void 0},hi.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)},hi.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)},hi.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)},hi.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)},hi.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)},hi.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)},hi.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)},hi.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)},hi.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)},hi.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)},hi.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)},hi.prototype.cartesianToCanvasCoordinates=function(e,t){return Pr.worldToWindowCoordinates(this,e,t)},hi.prototype.completeMorph=function(){this._transitioner.completeMorph()},hi.prototype.morphTo2D=function(e){e=g(e,2),this._transitioner.morphTo2D(e,this._ellipsoid)},hi.prototype.morphToColumbusView=function(e){e=g(e,2),this._transitioner.morphToColumbusView(e,this._ellipsoid)},hi.prototype.morphTo3D=function(e){e=g(e,2),this._transitioner.morphTo3D(e,this._ellipsoid)},hi.prototype.setTerrain=function(e){return A.typeOf.object("terrain",e),function uJe(e,t){e._removeTerrainProviderReadyListener=e._removeTerrainProviderReadyListener&&e._removeTerrainProviderReadyListener(),t.ready?c(e.globe)&&(e.globe.terrainProvider=t.provider):(e.globe.terrainProvider=void 0,e._removeTerrainProviderReadyListener=t.readyEvent.addEventListener(n=>{c(e)&&c(e.globe)&&(e.globe.terrainProvider=n),e._removeTerrainProviderReadyListener()}))}(this,e),e},hi.prototype.isDestroyed=function(){return!1},hi.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(),c(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,c(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),Xe(this)};const dJe=hi,Gte="float interpolateByDistance(vec4 nearFarScalar, float distance)\n{\n float startDistance = nearFarScalar.x;\n float startValue = nearFarScalar.y;\n float endDistance = nearFarScalar.z;\n float endValue = nearFarScalar.w;\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\n return mix(startValue, endValue, t);\n}\n\nvoid computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)\n{\n float ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;\n\n // Adjustment to the atmosphere radius applied based on the camera height.\n float distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;\n float distanceAdjustMax = czm_ellipsoidRadii.x;\n float distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;\n float distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);\n\n // Since atmosphere scattering assumes the atmosphere is a spherical shell, we compute an inner radius of the atmosphere best fit\n // for the position on the ellipsoid.\n float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;\n float atmosphereInnerRadius = (length(czm_viewerPositionWC) - czm_eyeHeight) - radiusAdjust;\n\n // Setup the primary ray: from the camera position to the vertex position.\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);\n\n underTranslucentGlobe = 0.0;\n\n // Brighten the sky atmosphere under the Earth's atmosphere when translucency is enabled.\n #if defined(GLOBE_TRANSLUCENT)\n\n // Check for intersection with the inner radius of the atmopshere.\n czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);\n if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {\n\n // Compute position on globe.\n vec3 direction = normalize(positionWC);\n czm_ray ellipsoidRay = czm_ray(positionWC, -direction);\n czm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);\n vec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);\n\n // Control the color using the camera angle.\n float angle = dot(normalize(czm_viewerPositionWC), normalize(onEarth));\n\n // Control the opacity using the distance from Earth.\n opacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionWC - onEarth));\n vec3 horizonColor = vec3(0.1, 0.2, 0.3);\n vec3 nearColor = vec3(0.0);\n\n rayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);\n\n // Set the traslucent flag to avoid alpha adjustment in computeFinalColor funciton.\n underTranslucentGlobe = 1.0;\n return;\n }\n #endif\n\n computeScattering(\n primaryRay,\n length(cameraToPositionWC),\n lightDirection,\n atmosphereInnerRadius,\n rayleighColor,\n mieColor,\n opacity\n );\n\n // Alter the opacity based on how close the viewer is to the ground.\n // (0.0 = At edge of atmosphere, 1.0 = On ground)\n float cameraHeight = czm_eyeHeight + atmosphereInnerRadius;\n float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\n opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);\n\n // Alter alpha based on time of day (0.0 = night , 1.0 = day)\n float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;\n opacity *= pow(nightAlpha, 0.5);\n}\n";function Qb(e){e=g(e,he.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;const n=f.multiplyByScalar(e.radii,1.025,new f);this._scaleMatrix=k.fromScale(n),this._modelMatrix=new k,this._command=new $t({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new f(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new f(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 f;const i=new f;i.x=1.025*e.maximumRadius,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;const 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(Qb.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),Qb.prototype.setDynamicLighting=function(e){this._radiiAndDynamicAtmosphereColor.z=e};const Xk=new k;Qb.prototype.update=function(e,t){if(!this.show)return;const n=e.mode;if(n!==ce.SCENE3D&&n!==ce.MORPHING||!e.passes.render)return;const i=k.fromRotationTranslation(e.context.uniformState.inverseViewRotation,f.ZERO,Xk),o=k.multiplyTransformation(i,Ms.Y_UP_TO_Z_UP,Xk),r=k.multiply(this._scaleMatrix,o,Xk);k.clone(r,this._modelMatrix);const s=e.context,a=function pJe(e){return!(O.equalsEpsilon(e.hueShift,0,O.EPSILON7)&&O.equalsEpsilon(e.saturationShift,0,O.EPSILON7)&&O.equalsEpsilon(e.brightnessShift,0,O.EPSILON7))}(this),l=e.globeTranslucencyState.translucent,u=this.perFragmentAtmosphere||l||!c(t)||!t.show,d=this._command;if(!c(d.vertexArray)){const m=UC.createGeometry(new UC({radii:new f(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:et.POSITION_ONLY}));d.vertexArray=gs.fromGeometry({context:s,geometry:m,attributeLocations:ao.createAttributeLocations(m),bufferUsage:At.STATIC_DRAW}),d.renderState=Lt.fromCache({cull:{enabled:!0,face:ur.FRONT},blending:eo.ALPHA_BLEND,depthMask:!1})}const h=a|u<<2|l<<3;if(h!==this._flags){this._flags=h;const m=[];a&&m.push("COLOR_CORRECT"),u&&m.push("PER_FRAGMENT_ATMOSPHERE"),l&&m.push("GLOBE_TRANSLUCENT");const _=new St({defines:m,sources:[rD,Gte,"in vec4 position;\n\nout vec3 v_outerPositionWC;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\nout vec3 v_mieColor;\nout vec3 v_rayleighColor;\nout float v_opacity;\nout float v_translucent;\n#endif\n\nvoid main(void)\n{\n vec4 positionWC = czm_model * position;\n float lightEnum = u_radiiAndDynamicAtmosphereColor.z;\n vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC.xyz, lightEnum);\n\n #ifndef PER_FRAGMENT_ATMOSPHERE\n computeAtmosphereScattering(\n positionWC.xyz,\n lightDirection,\n v_rayleighColor,\n v_mieColor,\n v_opacity,\n v_translucent\n );\n #endif\n\n v_outerPositionWC = positionWC.xyz;\n gl_Position = czm_modelViewProjection * position;\n}\n"]}),p=new St({defines:m,sources:[rD,Gte,"in vec3 v_outerPositionWC;\n\nuniform vec3 u_hsbShift;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\nin vec3 v_mieColor;\nin vec3 v_rayleighColor;\nin float v_opacity;\nin float v_translucent;\n#endif\n\nvoid main (void)\n{\n float lightEnum = u_radiiAndDynamicAtmosphereColor.z;\n vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_outerPositionWC, lightEnum);\n\n vec3 mieColor;\n vec3 rayleighColor;\n float opacity;\n float translucent;\n\n #ifdef PER_FRAGMENT_ATMOSPHERE\n computeAtmosphereScattering(\n v_outerPositionWC,\n lightDirection,\n rayleighColor,\n mieColor,\n opacity,\n translucent\n );\n #else\n mieColor = v_mieColor;\n rayleighColor = v_rayleighColor;\n opacity = v_opacity;\n translucent = v_translucent;\n #endif\n\n vec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);\n\n #ifndef HDR\n color.rgb = czm_acesTonemapping(color.rgb);\n color.rgb = czm_inverseGamma(color.rgb);\n #endif\n\n #ifdef COLOR_CORRECT\n const bool ignoreBlackPixels = true;\n color.rgb = czm_applyHSBShift(color.rgb, u_hsbShift, ignoreBlackPixels);\n #endif\n\n // For the parts of the sky atmosphere that are not behind a translucent globe,\n // we mix in the default opacity so that the sky atmosphere still appears at distance.\n // This is needed because the opacity in the sky atmosphere is initially adjusted based\n // on the camera height.\n if (translucent == 0.0) {\n color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);\n }\n\n out_FragColor = color;\n}\n"]});this._spSkyAtmosphere=di.fromCache({context:s,vertexShaderSource:_,fragmentShaderSource:p}),d.shaderProgram=this._spSkyAtmosphere}return d},Qb.prototype.isDestroyed=function(){return!1},Qb.prototype.destroy=function(){const e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),Xe(this)};const mJe=Qb;function Jb(e){this.sources=e.sources,this._sources=void 0,this.show=g(e.show,!0),this._command=new $t({modelMatrix:k.clone(k.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}function eT(e){return Jn(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}Jb.prototype.update=function(e,t){const n=this;if(!this.show||e.mode!==ce.SCENE3D&&e.mode!==ce.MORPHING||!e.passes.render)return;const i=e.context;if(this._sources!==this.sources){this._sources=this.sources;const r=this.sources;if(!(c(r.positiveX)&&c(r.negativeX)&&c(r.positiveY)&&c(r.negativeY)&&c(r.positiveZ)&&c(r.negativeZ)))throw new E("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof r.positiveX!=typeof r.negativeX||typeof r.positiveX!=typeof r.positiveY||typeof r.positiveX!=typeof r.negativeY||typeof r.positiveX!=typeof r.positiveZ||typeof r.positiveX!=typeof r.negativeZ)throw new E("this.sources properties must all be the same type.");"string"==typeof r.positiveX?function _Je(e,t,n){if(A.defined("context",e),!(c(t)&&c(t.positiveX)&&c(t.negativeX)&&c(t.positiveY)&&c(t.negativeY)&&c(t.positiveZ)&&c(t.negativeZ)))throw new E("urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");const i={flipY:!0,skipColorSpaceConversion:n,preferImageBitmap:!0},o=[zt.createIfNeeded(t.positiveX).fetchImage(i),zt.createIfNeeded(t.negativeX).fetchImage(i),zt.createIfNeeded(t.positiveY).fetchImage(i),zt.createIfNeeded(t.negativeY).fetchImage(i),zt.createIfNeeded(t.positiveZ).fetchImage(i),zt.createIfNeeded(t.negativeZ).fetchImage(i)];return Promise.all(o).then(function(r){return new C_({context:e,source:{positiveX:r[0],negativeX:r[1],positiveY:r[2],negativeY:r[3],positiveZ:r[4],negativeZ:r[5]}})})}(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 C_({context:i,source:r}))}const o=this._command;if(!c(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return n._cubeMap}};const r=Ug.createGeometry(Ug.fromDimensions({dimensions:new f(2,2,2),vertexFormat:et.POSITION_ONLY})),s=this._attributeLocations=ao.createAttributeLocations(r);o.vertexArray=gs.fromGeometry({context:i,geometry:r,attributeLocations:s,bufferUsage:At.STATIC_DRAW}),o.renderState=Lt.fromCache({blending:eo.ALPHA_BLEND})}if(!c(o.shaderProgram)||this._useHdr!==t){const r=new St({defines:[t?"HDR":""],sources:["uniform samplerCube u_cubeMap;\n\nin vec3 v_texCoord;\n\nvoid main()\n{\n vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));\n out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n}\n"]});o.shaderProgram=di.fromCache({context:i,vertexShaderSource:"in vec3 position;\n\nout vec3 v_texCoord;\n\nvoid main()\n{\n vec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position.xyz;\n}\n",fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._useHdr=t}return c(this._cubeMap)?o:void 0},Jb.prototype.isDestroyed=function(){return!1},Jb.prototype.destroy=function(){const 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(),Xe(this)},Jb.createEarthSkyBox=function(){return new Jb({sources:{positiveX:eT("px"),negativeX:eT("mx"),positiveY:eT("py"),negativeY:eT("my"),positiveZ:eT("pz"),negativeZ:eT("mz")}})};const TJe=Jb;function _E(){this.show=!0,this._drawCommand=new $t({primitiveType:Tt.TRIANGLES,boundingVolume:new Ae,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new Ae,this._boundingVolume2D=new Ae,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;const e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(_E.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});const EJe=new V,wJe=new V,SJe=new de,gE=new de;_E.prototype.update=function(e,t,n){if(!this.show)return;const i=e.mode;if(i===ce.SCENE2D||i===ce.MORPHING||!e.passes.render)return;const o=e.context,r=t.viewport.width,s=t.viewport.height;if(!c(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 v=Math.max(r,s);v=Math.pow(2,Math.ceil(Math.log(v)/Math.log(2))-2),v=Math.max(1,v),this._texture=new Mn({context:o,width:v,height:v,pixelFormat:Ct.RGBA,pixelDatatype:n?o.halfFloatingPointTexture?yt.HALF_FLOAT:yt.FLOAT:yt.UNSIGNED_BYTE}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;const P=this;this._commands.computeCommand=new mA({fragmentShaderSource:"uniform float u_radiusTS;\n\nin vec2 v_textureCoordinates;\n\nvec2 rotate(vec2 p, vec2 direction)\n{\n return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\n\nvec4 addBurst(vec2 position, vec2 direction, float lengthScalar)\n{\n vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\n float radius = length(rotatedPosition) * lengthScalar;\n float burst = 1.0 - smoothstep(0.0, 0.55, radius);\n return vec4(burst);\n}\n\nvoid main()\n{\n float lengthScalar = 2.0 / sqrt(2.0);\n vec2 position = v_textureCoordinates - vec2(0.5);\n float radius = length(position) * lengthScalar;\n float surface = step(radius, u_radiusTS);\n vec4 color = vec4(vec2(1.0), surface + 0.2, surface);\n\n float glow = 1.0 - smoothstep(0.0, 0.55, radius);\n color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\n\n vec4 burst = vec4(0.0);\n\n // The following loop has been manually unrolled for speed, to\n // avoid sin() and cos().\n //\n //for (float i = 0.4; i < 3.2; i += 1.047) {\n // vec2 direction = vec2(sin(i), cos(i));\n // burst += 0.4 * addBurst(position, direction, lengthScalar);\n //\n // direction = vec2(sin(i - 0.08), cos(i - 0.08));\n // burst += 0.3 * addBurst(position, direction, lengthScalar);\n //}\n\n burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar); // angle == 0.4\n burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar); // angle == 0.4 + 1.047\n burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar); // angle == 0.4 + 1.047 * 2.0\n\n burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar); // angle == 0.4 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar); // angle == 0.4 + 1.047 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar); // angle == 0.4 + 1.047 * 2.0 - 0.08\n\n // End of manual loop unrolling.\n\n color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\n\n out_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n",outputTexture:this._texture,uniformMap:{u_radiusTS:function(){return P._radiusTS}},persists:!1,owner:this,postExecute:function(){P._commands.computeCommand=void 0}})}const a=this._drawCommand;if(!c(a.vertexArray)){const v={direction:0},I=new Uint8Array(8);I[0]=0,I[1]=0,I[2]=255,I[3]=0,I[4]=255,I[5]=255,I[6]=0,I[7]=255;const P=yn.createVertexBuffer({context:o,typedArray:I,usage:At.STATIC_DRAW}),N=[{index:v.direction,vertexBuffer:P,componentsPerAttribute:2,normalize:!0,componentDatatype:ee.UNSIGNED_BYTE}],R=yn.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:At.STATIC_DRAW,indexDatatype:Ot.UNSIGNED_SHORT});a.vertexArray=new gs({context:o,attributes:N,indexBuffer:R}),a.shaderProgram=di.fromCache({context:o,vertexShaderSource:"in vec2 direction;\n\nuniform float u_size;\n\nout vec2 v_textureCoordinates;\n\nvoid main() \n{\n vec4 position;\n if (czm_morphTime == 1.0)\n {\n position = vec4(czm_sunPositionWC, 1.0);\n }\n else\n {\n position = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n }\n \n vec4 positionEC = czm_view * position;\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n vec2 halfSize = vec2(u_size * 0.5);\n halfSize *= ((direction * 2.0) - 1.0);\n \n gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\n \n v_textureCoordinates = direction;\n}\n",fragmentShaderSource:"uniform sampler2D u_texture;\n\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color = texture(u_texture, v_textureCoordinates);\n out_FragColor = czm_gammaCorrect(color);\n}\n",attributeLocations:v}),a.renderState=Lt.fromCache({blending:eo.ALPHA_BLEND}),a.uniformMap=this._uniformMap}const l=o.uniformState.sunPositionWC,u=o.uniformState.sunPositionColumbusView,d=this._boundingVolume,h=this._boundingVolume2D;f.clone(l,d.center),h.center.x=u.z,h.center.y=u.x,h.center.z=u.y,d.radius=O.SOLAR_RADIUS+O.SOLAR_RADIUS*this._glowLengthTS,h.radius=d.radius,i===ce.SCENE3D?Ae.clone(d,a.boundingVolume):i===ce.COLUMBUS_VIEW&&Ae.clone(h,a.boundingVolume);const m=Pr.computeActualEllipsoidPosition(e,l,gE),_=f.magnitude(f.subtract(m,e.camera.position,gE)),p=o.uniformState.projection,y=SJe;y.x=0,y.y=0,y.z=-_,y.w=1;const b=k.multiplyByVector(p,y,gE),x=Pr.clipToGLWindowCoordinates(t.viewport,b,EJe);y.x=O.SOLAR_RADIUS;const C=k.multiplyByVector(p,y,gE),w=Pr.clipToGLWindowCoordinates(t.viewport,C,wJe);return this._size=V.magnitude(V.subtract(w,x,gE)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands},_E.prototype.isDestroyed=function(){return!1},_E.prototype.destroy=function(){const 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(),Xe(this)};const vJe=_E;function jte(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,c(e._scene)&&(e._scene.pixelRatio=t),t}function Wte(e){const t=e._canvas;let n=t.clientWidth,i=t.clientHeight;const o=jte(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=o,i*=o,t.width=n,t.height=i,e._canRender=0!==n&&0!==i,e._lastDevicePixelRatio=window.devicePixelRatio}function qte(e){const t=e._canvas,n=t.width,i=t.height;if(0!==n&&0!==i){const o=e._scene.camera.frustum;c(o.aspectRatio)?o.aspectRatio=n/i:(o.top=o.right*(i/n),o.bottom=-o.top)}}function uy(e,t){if(!c(e))throw new E("container is required.");e=Rr(e),t=g(t,g.EMPTY_OBJECT);const n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);const i=document.createElement("canvas"),o=Hn.supportsImageRenderingPixelated();function r(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=Hn.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1},g(t.blurActiveElementOnCanvasFocus,!0)&&(i.addEventListener("mousedown",r),i.addEventListener("pointerdown",r)),n.appendChild(i);const a=document.createElement("div");a.className="cesium-widget-credits";const l=c(t.creditContainer)?Rr(t.creditContainer):n;l.appendChild(a);const u=c(t.creditViewport)?Rr(t.creditViewport):n,d=g(t.showRenderLoopErrors,!0),h=g(t.useBrowserRecommendedResolution,!0);this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=u,this._creditContainer=l,this._innerCreditContainer=a,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=d,this._resolutionScale=1,this._useBrowserRecommendedResolution=h,this._forceResize=!1,this._clock=c(t.clock)?t.clock:new ZI,Wte(this);try{const m=g(t.ellipsoid,he.default),_=new dJe({canvas:i,contextOptions:t.contextOptions,creditContainer:a,creditViewport:u,ellipsoid:m,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:g(t.scene3DOnly,!1),shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=_,_.camera.constrainedAxis=f.UNIT_Z,jte(this),qte(this);let p=t.globe;c(p)||(p=new v8e(m)),!1!==p&&(_.globe=p,_.globe.shadows=g(t.terrainShadows,Ko.RECEIVE_ONLY));let y=t.skyBox;!c(y)&&he.WGS84.equals(m)&&(y=TJe.createEarthSkyBox()),!1!==y&&(_.skyBox=y,_.sun=new vJe,he.WGS84.equals(m)&&(_.moon=new U5e));let b=t.skyAtmosphere;!c(b)&&he.WGS84.equals(m)&&(b=new mJe(m),b.show=!1!==t.globe&&p.show),!1!==b&&(_.skyAtmosphere=b);let x=t.baseLayer;if(!1!==t.globe&&!1!==x&&(c(x)||(x=Lc.fromWorldImagery()),_.imageryLayers.add(x)),c(t.terrainProvider)&&!1!==t.globe&&(_.terrainProvider=t.terrainProvider),c(t.terrain)&&!1!==t.globe){if(c(t.terrainProvider))throw new E("Specify either options.terrainProvider or options.terrain.");_.setTerrain(t.terrain)}this._screenSpaceEventHandler=new ck(i),c(t.sceneMode)&&(t.sceneMode===ce.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===ce.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=g(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;const C=this;this._onRenderError=function(w,v){C._useDefaultRenderLoop=!1,C._renderLoopRunning=!1,C._showRenderLoopErrors&&C.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,v)},_.renderError.addEventListener(this._onRenderError)}catch(m){throw d&&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:',m),m}}Object.defineProperties(uy.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){if(e<=0)throw new E("targetFrameRate must be greater than 0, or undefined.");this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&function IJe(e){e._renderLoopRunning=!0;let t=0;requestAnimationFrame(function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{const o=e._targetFrameRate;if(c(o)){const r=1e3/o,s=i-t;s>r&&(e.resize(),e.render(),t=i-s%r),requestAnimationFrame(n)}else e.resize(),e.render(),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})}(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){if(e<=0)throw new E("resolutionScale must be greater than 0.");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)}}}),uy.prototype.showErrorPanel=function(e,t,n){const i=this._element,o=document.createElement("div");o.className="cesium-widget-errorPanel";const r=document.createElement("div");r.className="cesium-widget-errorPanel-content",o.appendChild(r);const s=document.createElement("div");s.className="cesium-widget-errorPanel-header",s.appendChild(document.createTextNode(e)),r.appendChild(s);const a=document.createElement("div");function l(){a.style.maxHeight=`${Math.max(Math.round(.9*i.clientHeight-100),30)}px`}a.className="cesium-widget-errorPanel-scroll",r.appendChild(a),l(),c(window.addEventListener)&&window.addEventListener("resize",l,!1);const u=c(t),d=c(n);if(u||d){const _=document.createElement("div");if(_.className="cesium-widget-errorPanel-message",a.appendChild(_),d){let p=FO(n);u||("string"==typeof n&&(n=new Error(n)),t=FO({name:n.name,message:n.message}),p=n.stack),typeof console<"u"&&console.error(`${e}\n${t}\n${p}`);const y=document.createElement("div");y.className="cesium-widget-errorPanel-message-details collapsed";const b=document.createElement("span");b.className="cesium-widget-errorPanel-more-details",b.appendChild(document.createTextNode("See more...")),y.appendChild(b),y.onclick=function(x){y.removeChild(b),y.appendChild(document.createTextNode(p)),y.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",y.onclick=void 0},a.appendChild(y)}_.innerHTML=`<p>${t}</p>`}const h=document.createElement("div");h.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(h);const m=document.createElement("button");m.setAttribute("type","button"),m.className="cesium-button",m.appendChild(document.createTextNode("OK")),m.onclick=function(){c(l)&&c(window.removeEventListener)&&window.removeEventListener("resize",l,!1),i.removeChild(o)},h.appendChild(m),i.appendChild(o)},uy.prototype.isDestroyed=function(){return!1},uy.prototype.destroy=function(){c(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Xe(this)},uy.prototype.resize=function(){const e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,Wte(this),qte(this),this._scene.requestRender())},uy.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();const e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};const DJe=uy;function fc(){this._dataSources=[],this._dataSourceAdded=new Ye,this._dataSourceRemoved=new Ye,this._dataSourceMoved=new Ye}function A1(e,t){if(!c(t))throw new E("dataSource is required.");const n=e.indexOf(t);if(-1===n)throw new E("dataSource is not in this collection.");return n}function Yte(e,t,n){const i=e._dataSources,o=i.length-1;if((t=O.clamp(t,0,o))===(n=O.clamp(n,0,o)))return;const r=i[t];i[t]=i[n],i[n]=r,e.dataSourceMoved.raiseEvent(r,n,t)}Object.defineProperties(fc.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}}),fc.prototype.add=function(e){if(!c(e))throw new E("dataSource is required.");const t=this,n=this._dataSources;return Promise.resolve(e).then(function(i){return n===t._dataSources&&(t._dataSources.push(i),t._dataSourceAdded.raiseEvent(t,i)),i})},fc.prototype.remove=function(e,t){t=g(t,!1);const n=this._dataSources.indexOf(e);return-1!==n&&(this._dataSources.splice(n,1),this._dataSourceRemoved.raiseEvent(this,e),t&&"function"==typeof e.destroy&&e.destroy(),!0)},fc.prototype.removeAll=function(e){e=g(e,!1);const t=this._dataSources;for(let n=0,i=t.length;n<i;++n){const o=t[n];this._dataSourceRemoved.raiseEvent(this,o),e&&"function"==typeof o.destroy&&o.destroy()}this._dataSources=[]},fc.prototype.contains=function(e){return-1!==this.indexOf(e)},fc.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},fc.prototype.get=function(e){if(!c(e))throw new E("index is required.");return this._dataSources[e]},fc.prototype.getByName=function(e){if(!c(e))throw new E("name is required.");return this._dataSources.filter(function(t){return t.name===e})},fc.prototype.raise=function(e){const t=A1(this._dataSources,e);Yte(this,t,t+1)},fc.prototype.lower=function(e){const t=A1(this._dataSources,e);Yte(this,t,t-1)},fc.prototype.raiseToTop=function(e){const t=A1(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))},fc.prototype.lowerToBottom=function(e){const t=A1(this._dataSources,e);0!==t&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))},fc.prototype.isDestroyed=function(){return!1},fc.prototype.destroy=function(){return this.removeAll(!0),Xe(this)};const PJe=fc;function Sf(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}Object.defineProperties(Sf.prototype,{length:{get:function(){return this._length}}}),Sf.prototype.add=function(e,t){A.defined("primitive",e),c(t)&&A.typeOf.number("zIndex",t),t=g(t,0);let n=this._collections[t];if(!c(n)){n=new Zg({destroyPrimitives:!1}),n._zIndex=t,this._collections[t]=n;const i=this._collectionsArray;let o=0;for(;o<i.length&&i[o]._zIndex<t;)o++;i.splice(o,0,n)}return n.add(e),this._length++,e._zIndex=t,e},Sf.prototype.set=function(e,t){return A.defined("primitive",e),A.typeOf.number("zIndex",t),t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e},Sf.prototype.remove=function(e,t){if(this.contains(e)){const n=e._zIndex,i=this._collections[n];let o;return o=t?i.remove(e):i.removeAndDestroy(e),o&&this._length--,0===i.length&&(this._collectionsArray.splice(this._collectionsArray.indexOf(i),1),this._collections[n]=void 0,i.destroy()),o}return!1},Sf.prototype.removeAll=function(){const e=this._collectionsArray;for(let t=0;t<e.length;t++){const n=e[t];n.destroyPrimitives=!0,n.destroy()}this._collections={},this._collectionsArray=[],this._length=0},Sf.prototype.contains=function(e){if(!c(e))return!1;const t=this._collections[e._zIndex];return c(t)&&t.contains(e)},Sf.prototype.update=function(e){if(!this.show)return;const t=this._collectionsArray;for(let n=0;n<t.length;n++)t[n].update(e)},Sf.prototype.isDestroyed=function(){return!1},Sf.prototype.destroy=function(){return this.removeAll(),Xe(this)};const OJe=Sf,en=Object.freeze({DONE:0,PENDING:1,FAILED:2}),RJe=Z.WHITE,LJe=f.ZERO,NJe=tn.NONE,MJe=V.ZERO,kJe=f.ZERO,UJe=Da.CENTER,zJe=lo.CENTER,HJe=new f,GJe=new Z,jJe=new f,WJe=new V,qJe=new Bn,YJe=new Bn,XJe=new Bn,ZJe=new Vt,$Je=new Qn;function Xte(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function km(e,t){if(!c(e))throw new E("entityCluster is required.");if(!c(t))throw new E("entityCollection is required.");t.collectionChanged.addEventListener(km.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new mn,this._onCollectionChanged(t,t.values,[],[])}function Zk(e,t,n){c(e)&&(e.billboard=void 0,n.removeBillboard(t))}km.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){const r=t[i],s=r.entity,a=s._billboard;let l,h,u=r.billboard,d=s.isShowing&&s.isAvailable(e)&&te.getValueOrDefault(a._show,e,!0);if(d&&(h=te.getValueOrUndefined(s._position,e,HJe),l=te.getValueOrUndefined(a._image,e),d=c(h)&&c(l)),!d){Zk(r,s,n);continue}te.isConstant(s._position)||(n._clusterDirty=!0),c(u)||(u=n.getBillboard(s),u.id=s,u.image=void 0,r.billboard=u),u.show=d,(!c(u.image)||r.textureValue!==l)&&(u.image=l,r.textureValue=l),u.position=h,u.color=te.getValueOrDefault(a._color,e,RJe,GJe),u.eyeOffset=te.getValueOrDefault(a._eyeOffset,e,LJe,jJe),u.heightReference=te.getValueOrDefault(a._heightReference,e,NJe),u.pixelOffset=te.getValueOrDefault(a._pixelOffset,e,MJe,WJe),u.scale=te.getValueOrDefault(a._scale,e,1),u.rotation=te.getValueOrDefault(a._rotation,e,0),u.alignedAxis=te.getValueOrDefault(a._alignedAxis,e,kJe),u.horizontalOrigin=te.getValueOrDefault(a._horizontalOrigin,e,UJe),u.verticalOrigin=te.getValueOrDefault(a._verticalOrigin,e,zJe),u.width=te.getValueOrUndefined(a._width,e),u.height=te.getValueOrUndefined(a._height,e),u.scaleByDistance=te.getValueOrUndefined(a._scaleByDistance,e,qJe),u.translucencyByDistance=te.getValueOrUndefined(a._translucencyByDistance,e,YJe),u.pixelOffsetScaleByDistance=te.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,XJe),u.sizeInMeters=te.getValueOrDefault(a._sizeInMeters,e,!1),u.distanceDisplayCondition=te.getValueOrUndefined(a._distanceDisplayCondition,e,$Je),u.disableDepthTestDistance=te.getValueOrUndefined(a._disableDepthTestDistance,e);const m=te.getValueOrUndefined(a._imageSubRegion,e,ZJe);c(m)&&u.setImageSubRegion(u._imageId,m)}return!0},km.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new E("entity is required.");if(!c(t))throw new E("result is required.");const n=this._items.get(e.id);if(!c(n)||!c(n.billboard))return en.FAILED;const i=n.billboard;if(i.heightReference===tn.NONE)t.center=f.clone(i.position,t.center);else{if(!c(i._clampedPosition))return en.PENDING;t.center=f.clone(i._clampedPosition,t.center)}return t.radius=0,en.DONE},km.prototype.isDestroyed=function(){return!1},km.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(km.prototype._onCollectionChanged,this);const e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return Xe(this)},km.prototype._onCollectionChanged=function(e,t,n,i){let o,r;const s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],c(r._billboard)&&c(r._position)&&s.set(r.id,new Xte(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._billboard)&&c(r._position)?s.contains(r.id)||s.set(r.id,new Xte(r)):(Zk(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],Zk(s.get(r.id),r,a),s.remove(r.id)};const KJe=km;function $k(e){this._name=e,this._clock=void 0,this._changed=new Ye,this._error=new Ye,this._isLoading=!1,this._loading=new Ye,this._entityCollection=new Sb(this),this._entityCluster=new v2}Object.defineProperties($k.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){bg.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){if(!c(e))throw new E("value must be defined.");this._entityCluster=e}}}),$k.prototype.update=function(e){return!0};const QJe=$k;function dy(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.translucent,!0),n=g(e.closed,!1),i=g(e.materialSupport,dy.MaterialSupport.TEXTURED);this.material=c(e.material)?e.material:Pa.fromType(Pa.ColorType),this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,i.vertexShaderSource),this._fragmentShaderSource=g(e.fragmentShaderSource,i.fragmentShaderSource),this._renderState=Oa.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._materialSupport=i,this._vertexFormat=i.vertexFormat,this._flat=g(e.flat,!1),this._faceForward=g(e.faceForward,!n)}Object.defineProperties(dy.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}}}),dy.prototype.getFragmentShaderSource=Oa.prototype.getFragmentShaderSource,dy.prototype.isTranslucent=Oa.prototype.isTranslucent,dy.prototype.getRenderState=Oa.prototype.getRenderState,dy.MaterialSupport={BASIC:Object.freeze({vertexFormat:et.POSITION_AND_NORMAL,vertexShaderSource:"in vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 normal;\nin float batchId;\n\nout vec3 v_positionEC;\nout vec3 v_normalEC;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",fragmentShaderSource:"in vec3 v_positionEC;\nin vec3 v_normalEC;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n"}),TEXTURED:Object.freeze({vertexFormat:et.POSITION_NORMAL_AND_ST,vertexShaderSource:"in vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 normal;\nin vec2 st;\nin float batchId;\n\nout vec3 v_positionEC;\nout vec3 v_normalEC;\nout vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",fragmentShaderSource:"in vec3 v_positionEC;\nin vec3 v_normalEC;\nin vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n"}),ALL:Object.freeze({vertexFormat:et.ALL,vertexShaderSource:"in vec3 position3DHigh;\nin vec3 position3DLow;\nin vec3 normal;\nin vec3 tangent;\nin vec3 bitangent;\nin vec2 st;\nin float batchId;\n\nout vec3 v_positionEC;\nout vec3 v_normalEC;\nout vec3 v_tangentEC;\nout vec3 v_bitangentEC;\nout vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_tangentEC = czm_normal * tangent; // tangent in eye coordinates\n v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",fragmentShaderSource:"in vec3 v_positionEC;\nin vec3 v_normalEC;\nin vec3 v_tangentEC;\nin vec3 v_bitangentEC;\nin vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = tangentToEyeMatrix;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n"})};const ca=dy;function tT(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new mn}tT.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))},tT.prototype.remove=function(e){const t=e.id,n=this._dynamicUpdaters.get(t);c(n)&&(this._dynamicUpdaters.remove(t),n.destroy())},tT.prototype.update=function(e){const t=this._dynamicUpdaters.values;for(let n=0,i=t.length;n<i;n++)t[n].update(e);return!0},tT.prototype.removeAllPrimitives=function(){const e=this._dynamicUpdaters.values;for(let t=0,n=e.length;t<n;t++)e[t].destroy();this._dynamicUpdaters.removeAll()},tT.prototype.getBoundingSphere=function(e,t){return e=this._dynamicUpdaters.get(e.id),c(e)&&c(e.getBoundingSphere)?e.getBoundingSphere(t):en.FAILED};const Zte=tT;function yE(e,t){if(e=g(e,0),(t=g(t,Number.MAX_VALUE))<=e)throw new E("far distance must be greater than near distance.");this.value=new Float32Array([e,t])}Object.defineProperties(yE.prototype,{componentDatatype:{get:function(){return ee.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}}),yE.fromDistanceDisplayCondition=function(e){if(!c(e))throw new E("distanceDisplayCondition is required.");if(e.far<=e.near)throw new E("distanceDisplayCondition.far distance must be greater than distanceDisplayCondition.near distance.");return new yE(e.near,e.far)},yE.toValue=function(e,t){if(!c(e))throw new E("distanceDisplayCondition is required.");return c(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};const _o=yE;function nT(){E.throwInstantiationError()}Object.defineProperties(nT.prototype,{isConstant:{get:E.throwInstantiationError},definitionChanged:{get:E.throwInstantiationError}}),nT.prototype.getType=E.throwInstantiationError,nT.prototype.getValue=E.throwInstantiationError,nT.prototype.equals=E.throwInstantiationError,nT.getValue=function(e,t,n){let i;return c(t)&&(i=t.getType(e),c(i))?((!c(n)||n.type!==i)&&(n=Pa.fromType(i)),t.getValue(e,n.uniforms),n):((!c(n)||n.type!==Pa.ColorType)&&(n=Pa.fromType(Pa.ColorType)),Z.clone(Z.WHITE,n.uniforms.color),n)};const hc=nT;function fy(e,t,n){A.defined("geometryUpdater",e),A.defined("primitives",t),A.defined("orderedGroundPrimitives",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}fy.prototype._isHidden=function(e,t,n){return!e.isShowing||!e.isAvailable(n)||!te.getValueOrDefault(t.show,n,!0)},fy.prototype._setOptions=E.throwInstantiationError,fy.prototype.update=function(e){A.defined("time",e);const 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;const r=this._entity,s=r[this._geometryUpdater._geometryPropertyName];if(this._setOptions(r,s,e),this._isHidden(r,s,e))return;const a=this._geometryUpdater.shadowsProperty.getValue(e),l=this._options;if(!c(s.fill)||s.fill.getValue(e)){const u=t.fillMaterialProperty,d=u instanceof kn;let h;const m=t._getIsClosed(l);if(d)h=new gi({closed:m,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{const _=hc.getValue(e,u,this._material);this._material=_,h=new ca({material:_,translucent:_.isTranslucent(),closed:m})}if(n)l.vertexFormat=gi.VERTEX_FORMAT,this._primitive=o.add(new Cb({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:h,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),te.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{l.vertexFormat=h.vertexFormat;const _=this._geometryUpdater.createFillGeometryInstance(e);d&&(h.translucent=255!==_.attributes.color.value[3]),this._primitive=i.add(new Yi({geometryInstances:_,appearance:h,asynchronous:!1,shadows:a}))}}if(!n&&c(s.outline)&&s.outline.getValue(e)){const u=this._geometryUpdater.createOutlineGeometryInstance(e),d=te.getValueOrDefault(s.outlineWidth,e,1);this._outlinePrimitive=i.add(new Yi({geometryInstances:u,appearance:new gi({flat:!0,translucent:255!==u.attributes.color.value[3],renderState:{lineWidth:t._scene.clampLineWidth(d)}}),asynchronous:!1,shadows:a}))}},fy.prototype.getBoundingSphere=function(e){if(!c(e))throw new E("result is required.");const t=this._entity,n=this._primitive,i=this._outlinePrimitive;let o;return c(n)&&n.show&&n.ready&&(o=n.getGeometryInstanceAttributes(t),c(o)&&c(o.boundingSphere))||c(i)&&i.show&&i.ready&&(o=i.getGeometryInstanceAttributes(t),c(o)&&c(o.boundingSphere))?(Ae.clone(o.boundingSphere,e),en.DONE):c(n)&&!n.ready||c(i)&&!i.ready?en.PENDING:en.FAILED},fy.prototype.isDestroyed=function(){return!1},fy.prototype.destroy=function(){const e=this._primitives;this._geometryUpdater._onTerrain?this._orderedGroundPrimitives.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),Xe(this)};const go=fy,ret=new kn(Z.WHITE),set=new Co(!0),aet=new Co(!0),cet=new Co(!1),uet=new Co(Z.BLACK),det=new Co(Ko.DISABLED),fet=new Co(new Qn),het=new Co(Xo.BOTH);function pc(e){A.defined("options.entity",e.entity),A.defined("options.scene",e.scene),A.defined("options.geometryOptions",e.geometryOptions),A.defined("options.geometryPropertyName",e.geometryPropertyName),A.defined("options.observedPropertyNames",e.observedPropertyNames);const t=e.entity,n=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new Ye,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=n,this._id=`${n}-${t.id}`,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=Fc.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(pc.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!c(this._entity.availability)&&te.isConstant(this._showProperty)&&te.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!c(this._entity.availability)&&te.isConstant(this._showProperty)&&te.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),pc.prototype.isOutlineVisible=function(e){const n=this._outlineEnabled&&this._entity.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e);return g(n,!1)},pc.prototype.isFilled=function(e){const n=this._fillEnabled&&this._entity.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e);return g(n,!1)},pc.prototype.createFillGeometryInstance=E.throwInstantiationError,pc.prototype.createOutlineGeometryInstance=E.throwInstantiationError,pc.prototype.isDestroyed=function(){return!1},pc.prototype.destroy=function(){Xe(this)},pc.prototype._isHidden=function(e,t){const n=t.show;return c(n)&&n.isConstant&&!n.getValue(It.MINIMUM_VALUE)},pc.prototype._isOnTerrain=function(e,t){return!1},pc.prototype._getIsClosed=function(e){return!0},pc.prototype._isDynamic=E.throwInstantiationError,pc.prototype._setStaticOptions=E.throwInstantiationError,pc.prototype._onEntityPropertyChanged=function(e,t,n,i){if(-1===this._observedPropertyNames.indexOf(t))return;const o=this._entity[this._geometryPropertyName];if(!c(o))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));const r=o.fill,s=!c(r)||!r.isConstant||r.getValue(It.MINIMUM_VALUE),a=o.outline;let l=c(a);if(l&&a.isConstant&&(l=a.getValue(It.MINIMUM_VALUE)),!s&&!l)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));const u=o.show;if(this._isHidden(e,o))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));this._materialProperty=g(o.material,ret),this._fillProperty=g(r,aet),this._showProperty=g(u,set),this._showOutlineProperty=g(o.outline,cet),this._outlineColorProperty=l?g(o.outlineColor,uet):void 0,this._shadowsProperty=g(o.shadows,det),this._distanceDisplayConditionProperty=g(o.distanceDisplayCondition,fet),this._classificationTypeProperty=g(o.classificationType,het),this._fillEnabled=s;const d=this._isOnTerrain(e,o)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof kn);if(l&&d&&(_n(_n.geometryOutlines),l=!1),this._onTerrain=d,this._outlineEnabled=l,this._isDynamic(e,o))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,o),this._isClosed=this._getIsClosed(this._options);const h=o.outlineWidth;this._outlineWidth=c(h)?h.getValue(It.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}},pc.prototype.createDynamicUpdater=function(e,t){if(A.defined("primitives",e),A.defined("groundPrimitives",t),!this._dynamic)throw new E("This instance does not represent dynamic geometry.");return new this.constructor.DynamicGeometryUpdater(this,e,t)};const No=pc,$te=new f;function iT(e,t,n,i){A.defined("scene",e),A.defined("positionProperty",t),this._scene=e,this._heightReference=n,this._extrudedHeightReference=i,this._positionProperty=t,this._position=new f,this._cartographicPosition=new Ce,this._normal=new f,this._definitionChanged=new Ye,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;const o=this;if(c(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener(function(){o._updateClamping()}),this._removeModeListener=e.morphComplete.addEventListener(function(){o._updateClamping()})),t.isConstant){const r=t.getValue(It.MINIMUM_VALUE,$te);if(!c(r)||f.equals(r,f.ZERO)||!c(e.globe))return;this._position=f.clone(r,this._position),this._updateClamping(),this._normal=e.ellipsoid.geodeticSurfaceNormal(r,this._normal)}}Object.defineProperties(iT.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),iT.prototype._updateClamping=function(){c(this._removeCallbackFunc)&&this._removeCallbackFunc();const e=this._scene,t=this._position;if(f.equals(t,f.ZERO))return void(this._terrainHeight=0);const i=e.ellipsoid.cartesianToCartographic(t,this._cartographicPosition),o=e.getHeight(i,this._heightReference);this._terrainHeight=c(o)?o:0,this._removeCallbackFunc=e.updateHeight(i,s=>{this._terrainHeight=s.height,this.definitionChanged.raiseEvent()},this._heightReference)},iT.prototype.getValue=function(e,t){const n=te.getValueOrDefault(this._heightReference,e,tn.NONE),i=te.getValueOrDefault(this._extrudedHeightReference,e,tn.NONE);if(n===tn.NONE&&!VL(i))return this._position=f.clone(f.ZERO,this._position),f.clone(f.ZERO,t);if(this._positionProperty.isConstant)return f.multiplyByScalar(this._normal,this._terrainHeight,t);const o=this._scene,r=this._positionProperty.getValue(e,$te);if(!c(r)||f.equals(r,f.ZERO)||!c(o.globe))return f.clone(f.ZERO,t);if(f.equalsEpsilon(this._position,r,O.EPSILON10))return f.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=f.clone(r,this._position),this._updateClamping();const s=o.ellipsoid.geodeticSurfaceNormal(r,this._normal);return f.multiplyByScalar(s,this._terrainHeight,t)},iT.prototype.isDestroyed=function(){return!1},iT.prototype.destroy=function(){return c(this._removeEventListener)&&this._removeEventListener(),c(this._removeModeListener)&&this._removeModeListener(),c(this._removeCallbackFunc)&&this._removeCallbackFunc(),Xe(this)};const Kte=iT,Kk=function pet(e,t,n,i){if(No.prototype._onEntityPropertyChanged.call(this,e,t,n,i),-1===this._observedPropertyNames.indexOf(t))return;const o=this._entity[this._geometryPropertyName];if(!c(o))return;c(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);const r=o.heightReference;if(c(r)){const s=new d2(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new Kte(this._scene,s,r)}},Qte=f.ZERO,Jte=new f,met=new f,ene=new Z;function _et(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function Sl(e,t){No.call(this,{entity:e,scene:t,geometryOptions:new _et(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function oT(e,t,n){go.call(this,e,t,n)}c(Object.create)&&((Sl.prototype=Object.create(No.prototype)).constructor=Sl),Object.defineProperties(Sl.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),Sl.prototype.createFillGeometryInstance=function(e){if(A.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i=new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),s={show:i,distanceDisplayCondition:_o.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};if(this._materialProperty instanceof kn){let a;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,ene)),c(a)||(a=Z.WHITE),s.color=ei.fromColor(a)}return c(this._options.offsetAttribute)&&(s.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,Qte,Jte))),new zn({id:t,geometry:Ug.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.ellipsoid),attributes:s})},Sl.prototype.createOutlineGeometryInstance=function(e){if(A.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,Z.BLACK,ene),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ei.fromColor(i),distanceDisplayCondition:_o.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,Qte,Jte))),new zn({id:t,geometry:Fv.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.ellipsoid),attributes:r})},Sl.prototype._computeCenter=function(e,t){return te.getValueOrUndefined(this._entity.position,e,t)},Sl.prototype._isHidden=function(e,t){return!c(t.dimensions)||!c(e.position)||No.prototype._isHidden.call(this,e,t)},Sl.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&te.isConstant(e.orientation)&&t.dimensions.isConstant&&te.isConstant(t.outlineWidth))},Sl.prototype._setStaticOptions=function(e,t){const n=te.getValueOrDefault(t.heightReference,It.MINIMUM_VALUE,tn.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof kn?gi.VERTEX_FORMAT:ca.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(It.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==tn.NONE?Xn.ALL:void 0},Sl.prototype._onEntityPropertyChanged=Kk,Sl.DynamicGeometryUpdater=oT,c(Object.create)&&((oT.prototype=Object.create(go.prototype)).constructor=oT),oT.prototype._isHidden=function(e,t,n){const i=te.getValueOrUndefined(e.position,n,met),o=this._options.dimensions;return!c(i)||!c(o)||go.prototype._isHidden.call(this,e,t,n)},oT.prototype._setOptions=function(e,t,n){const i=te.getValueOrDefault(t.heightReference,n,tn.NONE),o=this._options;o.dimensions=te.getValueOrUndefined(t.dimensions,n,o.dimensions),o.offsetAttribute=i!==tn.NONE?Xn.ALL:void 0};const get=Sl,Nr=Object.freeze({ROUNDED:0,MITERED:1,BEVELED:2}),Ys=[new f,new f],yet=new f,bet=new f,Tet=new f,Aet=new f,xet=new f,Cet=new f,Eet=new f,wet=new f,vet=new f,rT=new f,x1=new f,bE={};let Qk=new Ce;function Jk(e,t,n,i){const s=f.angleBetween(e[0],e[1]),a=Math.ceil(s/i),l=new Array(a);let u;if(t===n){for(u=0;u<a;u++)l[u]=t;return l.push(n),l}const h=(n-t)/a;for(u=1;u<a;u++)l[u]=t+u*h;return l[0]=t,l.push(n),l}const C1=new f,E1=new f,Pet=new f(-1,0,0);let hy=new k;const Oet=new k;let eU=new oe;const Ret=oe.IDENTITY.clone(),Let=new f,Net=new de,tne=new f;function $h(e,t,n,i,o,r,s,a){let l=Let,u=Net;hy=In.eastNorthUpToFixedFrame(e,o,hy),l=k.multiplyByPointAsVector(hy,Pet,l),l=f.normalize(l,l);const d=function Det(e,t,n,i){const o=new el(n,i),r=o.projectPointOntoPlane(f.add(n,e,C1),C1),s=o.projectPointOntoPlane(f.add(n,t,E1),E1),a=V.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}(l,t,e,o);eU=oe.fromRotationZ(d,eU),tne.z=r,hy=k.multiplyTransformation(hy,k.fromRotationTranslation(eU,tne,Oet),hy);const h=Ret;h[0]=s;for(let m=0;m<a;m++)for(let _=0;_<n.length;_+=3)u=f.fromArray(n,_,u),u=oe.multiplyByVector(h,u,u),u=k.multiplyByPoint(hy,u,u),i.push(u.x,u.y,u.z);return i}const Met=new f;function tU(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3)i=$h(f.fromArray(e,a,Met),t,n,i,o,r[a/3],s,1);return i}function nne(e,t){const n=e.length,i=new Array(3*n);let o=0;const r=t.x+t.width/2,s=t.y+t.height/2;for(let a=0;a<n;a++)i[o++]=e[a].x-r,i[o++]=0,i[o++]=e[a].y-s;return i}const ine=new bt,one=new f,rne=new oe;function sne(e,t,n,i,o,r,s,a,l,u){const d=f.angleBetween(f.subtract(t,e,rT),f.subtract(n,e,x1)),h=i===Nr.BEVELED?0:Math.ceil(d/O.toRadians(5));let m,_,p;if(m=oe.fromQuaternion(bt.fromAxisAngle(o?f.negate(e,rT):e,d/(h+1),ine),rne),t=f.clone(t,one),h>0){const y=u?2:1;for(let b=0;b<h;b++)t=oe.multiplyByVector(m,t,t),_=f.subtract(t,e,rT),_=f.normalize(_,_),o||(_=f.negate(_,_)),p=r.scaleToGeodeticSurface(t,x1),s=$h(p,_,a,s,r,l,1,y)}else _=f.subtract(t,e,rT),_=f.normalize(_,_),o||(_=f.negate(_,_)),p=r.scaleToGeodeticSurface(t,x1),s=$h(p,_,a,s,r,l,1,1),n=f.clone(n,one),_=f.subtract(n,e,rT),_=f.normalize(_,_),o||(_=f.negate(_,_)),p=r.scaleToGeodeticSurface(n,x1),s=$h(p,_,a,s,r,l,1,1);return s}bE.removeDuplicatesFromShape=function(e){const t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){const s=e[o];V.equals(e[i],s)||n.push(s)}return n},bE.angleIsGreaterThanPi=function(e,t,n,i){const o=new el(n,i),r=o.projectPointOntoPlane(f.add(n,e,C1),C1),s=o.projectPointOntoPlane(f.add(n,t,E1),E1);return s.x*r.y-s.y*r.x>=0};const Bet=new f,ket=new f;bE.computePositions=function(e,t,n,i,o){const r=i._ellipsoid,s=function Iet(e,t){const n=new Array(e.length);for(let i=0;i<e.length;i++){const o=e[i];Qk=t.cartesianToCartographic(o,Qk),n[i]=Qk.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}(e,r),a=i._granularity,l=i._cornerType,u=o?function Fet(e,t){const n=e.length,i=new Array(6*n);let o=0;const r=t.x+t.width/2,s=t.y+t.height/2;let a=e[0];i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s;for(let l=1;l<n;l++){a=e[l];const u=a.x-r,d=a.y-s;i[o++]=u,i[o++]=0,i[o++]=d,i[o++]=u,i[o++]=0,i[o++]=d}return a=e[0],i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s,i}(t,n):nne(t,n),d=o?nne(t,n):void 0,h=n.height/2,m=n.width/2;let _=e.length,p=[],y=o?[]:void 0,b=yet,x=bet,C=Tet,w=Aet,v=xet,I=Cet,P=Eet,N=wet,R=vet,B=e[0],F=e[1];w=r.geodeticSurfaceNormal(B,w),b=f.subtract(F,B,b),b=f.normalize(b,b),N=f.cross(w,b,N),N=f.normalize(N,N);let L,M,S=s[0],D=s[1];o&&(y=$h(B,N,d,y,r,S+h,1,1)),R=f.clone(B,R),B=F,x=f.negate(b,x);for(let G=1;G<_-1;G++){const W=o?2:1;if(F=e[G+1],B.equals(F)){_n("Positions are too close and are considered equivalent with rounding error.");continue}b=f.subtract(F,B,b),b=f.normalize(b,b),C=f.add(b,x,C),C=f.normalize(C,C),w=r.geodeticSurfaceNormal(B,w);const q=f.multiplyByScalar(w,f.dot(b,w),Bet);f.subtract(b,q,q),f.normalize(q,q);const j=f.multiplyByScalar(w,f.dot(x,w),ket);if(f.subtract(x,j,j),f.normalize(j,j),O.equalsEpsilon(Math.abs(f.dot(q,j)),1,O.EPSILON7))p=$h(R,N,u,p,r,S+h,1,1),R=B;else{C=f.cross(C,w,C),C=f.cross(w,C,C),C=f.normalize(C,C);const Y=1/Math.max(.25,f.magnitude(f.cross(C,x,rT))),ne=bE.angleIsGreaterThanPi(b,x,B,r);ne?(v=f.add(B,f.multiplyByScalar(C,Y*m,C),v),I=f.add(v,f.multiplyByScalar(N,m,I),I),Ys[0]=f.clone(R,Ys[0]),Ys[1]=f.clone(I,Ys[1]),L=Jk(Ys,S+h,D+h,a),M=Gr.generateArc({positions:Ys,granularity:a,ellipsoid:r}),p=tU(M,N,u,p,r,L,1),N=f.cross(w,b,N),N=f.normalize(N,N),P=f.add(v,f.multiplyByScalar(N,m,P),P),l===Nr.ROUNDED||l===Nr.BEVELED?sne(v,I,P,l,ne,r,p,u,D+h,o):(C=f.negate(C,C),p=$h(B,C,u,p,r,D+h,Y,W)),R=f.clone(P,R)):(v=f.add(B,f.multiplyByScalar(C,Y*m,C),v),I=f.add(v,f.multiplyByScalar(N,-m,I),I),Ys[0]=f.clone(R,Ys[0]),Ys[1]=f.clone(I,Ys[1]),L=Jk(Ys,S+h,D+h,a),M=Gr.generateArc({positions:Ys,granularity:a,ellipsoid:r}),p=tU(M,N,u,p,r,L,1),N=f.cross(w,b,N),N=f.normalize(N,N),P=f.add(v,f.multiplyByScalar(N,-m,P),P),l===Nr.ROUNDED||l===Nr.BEVELED?sne(v,I,P,l,ne,r,p,u,D+h,o):p=$h(B,C,u,p,r,D+h,Y,W),R=f.clone(P,R)),x=f.negate(b,x)}S=D,D=s[G+1],B=F}Ys[0]=f.clone(R,Ys[0]),Ys[1]=f.clone(B,Ys[1]),L=Jk(Ys,S+h,D+h,a),M=Gr.generateArc({positions:Ys,granularity:a,ellipsoid:r}),p=tU(M,N,u,p,r,L,1),o&&(y=$h(B,N,d,y,r,D+h,1,1)),_=p.length;const z=new Float64Array(o?_+y.length:_);return z.set(p),o&&z.set(y,_),z};const TE=bE,nU={},sT=new f,ane=new f,Uet=new f,cne=new f,mc=[new f,new f],lne=new f,une=new f,dne=new f,zet=new f,Vet=new f,Het=new f,Get=new f,jet=new f,Wet=new f,qet=new f,fne=new bt,hne=new oe;function w1(e,t,n,i,o){const r=f.angleBetween(f.subtract(t,e,sT),f.subtract(n,e,ane)),s=i===Nr.BEVELED?1:Math.ceil(r/O.toRadians(5))+1,a=3*s,l=new Array(a);let u;l[a-3]=n.x,l[a-2]=n.y,l[a-1]=n.z,u=oe.fromQuaternion(bt.fromAxisAngle(o?f.negate(e,sT):e,r/s,fne),hne);let d=0;t=f.clone(t,sT);for(let h=0;h<s;h++)t=oe.multiplyByVector(u,t,t),l[d++]=t.x,l[d++]=t.y,l[d++]=t.z;return l}function pne(e,t,n,i){let o=sT;return i||(t=f.negate(t,t)),o=f.add(e,t,o),[o.x,o.y,o.z,n.x,n.y,n.z]}function iU(e,t,n,i){const o=new Array(e.length),r=new Array(e.length),s=f.multiplyByScalar(t,n,sT),a=f.negate(s,ane);let l=0,u=e.length-1;for(let d=0;d<e.length;d+=3){const h=f.fromArray(e,d,Uet),m=f.add(h,a,cne);o[l++]=m.x,o[l++]=m.y,o[l++]=m.z;const _=f.add(h,s,cne);r[u--]=_.z,r[u--]=_.y,r[u--]=_.x}return i.push(o,r),i}nU.addAttribute=function(e,t,n,i){const o=t.x,r=t.y,s=t.z;c(n)&&(e[n]=o,e[n+1]=r,e[n+2]=s),c(i)&&(e[i]=s,e[i-1]=r,e[i-2]=o)};const Xet=new f,Zet=new f;nU.computePositions=function(e){const t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes;let a=lne,l=une,u=dne,d=zet,h=Vet,m=Het,_=Get,p=jet,y=Wet,b=qet,x=[];const C=s?[]:void 0,w=s?[]:void 0;let P,v=n[0],I=n[1];l=f.normalize(f.subtract(I,v,l),l),a=i.geodeticSurfaceNormal(v,a),d=f.normalize(f.cross(a,l,d),d),s&&(C.push(d.x,d.y,d.z),w.push(a.x,a.y,a.z)),_=f.clone(v,_),v=I,u=f.negate(l,u);const N=[];let R;const B=n.length;for(R=1;R<B-1;R++){a=i.geodeticSurfaceNormal(v,a),I=n[R+1],l=f.normalize(f.subtract(I,v,l),l),h=f.normalize(f.add(l,u,h),h);const S=f.multiplyByScalar(a,f.dot(l,a),Xet);f.subtract(l,S,S),f.normalize(S,S);const D=f.multiplyByScalar(a,f.dot(u,a),Zet);if(f.subtract(u,D,D),f.normalize(D,D),!O.equalsEpsilon(Math.abs(f.dot(S,D)),1,O.EPSILON7)){h=f.cross(h,a,h),h=f.cross(a,h,h),h=f.normalize(h,h);const M=o/Math.max(.25,f.magnitude(f.cross(h,u,sT))),U=TE.angleIsGreaterThanPi(l,u,v,i);h=f.multiplyByScalar(h,M,h),U?(p=f.add(v,h,p),b=f.add(p,f.multiplyByScalar(d,o,b),b),y=f.add(p,f.multiplyByScalar(d,2*o,y),y),mc[0]=f.clone(_,mc[0]),mc[1]=f.clone(b,mc[1]),P=Gr.generateArc({positions:mc,granularity:t,ellipsoid:i}),x=iU(P,d,o,x),s&&(C.push(d.x,d.y,d.z),w.push(a.x,a.y,a.z)),m=f.clone(y,m),d=f.normalize(f.cross(a,l,d),d),y=f.add(p,f.multiplyByScalar(d,2*o,y),y),_=f.add(p,f.multiplyByScalar(d,o,_),_),N.push(r===Nr.ROUNDED||r===Nr.BEVELED?{leftPositions:w1(p,m,y,r,U)}:{leftPositions:pne(v,f.negate(h,h),y,U)})):(y=f.add(v,h,y),b=f.add(y,f.negate(f.multiplyByScalar(d,o,b),b),b),p=f.add(y,f.negate(f.multiplyByScalar(d,2*o,p),p),p),mc[0]=f.clone(_,mc[0]),mc[1]=f.clone(b,mc[1]),P=Gr.generateArc({positions:mc,granularity:t,ellipsoid:i}),x=iU(P,d,o,x),s&&(C.push(d.x,d.y,d.z),w.push(a.x,a.y,a.z)),m=f.clone(p,m),d=f.normalize(f.cross(a,l,d),d),p=f.add(y,f.negate(f.multiplyByScalar(d,2*o,p),p),p),_=f.add(y,f.negate(f.multiplyByScalar(d,o,_),_),_),N.push(r===Nr.ROUNDED||r===Nr.BEVELED?{rightPositions:w1(y,m,p,r,U)}:{rightPositions:pne(v,h,p,U)})),u=f.negate(l,u)}v=I}let F;return a=i.geodeticSurfaceNormal(v,a),mc[0]=f.clone(_,mc[0]),mc[1]=f.clone(v,mc[1]),P=Gr.generateArc({positions:mc,granularity:t,ellipsoid:i}),x=iU(P,d,o,x),s&&(C.push(d.x,d.y,d.z),w.push(a.x,a.y,a.z)),r===Nr.ROUNDED&&(F=function Yet(e){let t=lne,n=une,i=dne,o=e[1];n=f.fromArray(e[1],o.length-3,n),i=f.fromArray(e[0],0,i),t=f.midpoint(n,i,t);const r=w1(t,n,i,Nr.ROUNDED,!1),s=e.length-1,a=e[s-1];return o=e[s],n=f.fromArray(a,a.length-3,n),i=f.fromArray(o,0,i),t=f.midpoint(n,i,t),[r,w1(t,n,i,Nr.ROUNDED,!1)]}(x)),{positions:x,corners:N,lefts:C,normals:w,endPositions:F}};const oo=nU,mne=new f,_ne=new f,S1=new f,v1=new f,$et=new f,gne=new f,Um=new f,aT=new f;function yne(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function Ad(e,t,n,i,o,r){const s=e.normals,a=e.tangents,l=e.bitangents,u=f.normalize(f.cross(n,t,Um),Um);r.normal&&oo.addAttribute(s,t,i,o),r.tangent&&oo.addAttribute(a,u,i,o),r.bitangent&&oo.addAttribute(l,n,i,o)}function bne(e,t,n){const i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,l=new co;let u,m,p,d=0,h=0,_=0;for(m=0;m<i.length;m+=2)p=i[m].length-3,d+=p,_+=2*p,h+=i[m+1].length-3;for(d+=3,h+=3,m=0;m<o.length;m++){u=o[m];const $=o[m].leftPositions;c($)?(p=$.length,d+=p,_+=p):(p=o[m].rightPositions.length,h+=p,_+=p)}const y=c(r);let b;y&&(b=r[0].length-3,d+=b,h+=b,b/=3,_+=6*b);const x=d+h,C=new Float64Array(x),P={normals:t.normal?new Float32Array(x):void 0,tangents:t.tangent?new Float32Array(x):void 0,bitangents:t.bitangent?new Float32Array(x):void 0};let B,F,S,D,U,z,N=0,R=x-1,L=mne,M=_ne;const G=b/2,W=Ot.createTypedArray(x/3,_);let q=0;if(y){z=S1,U=v1;const $=r[0];for(L=f.fromArray(a,0,L),M=f.fromArray(s,0,M),m=0;m<G;m++)z=f.fromArray($,3*(G-1-m),z),U=f.fromArray($,3*(G+m),U),oo.addAttribute(C,U,N),oo.addAttribute(C,z,void 0,R),Ad(P,L,M,N,R,t),F=N/3,D=F+1,B=(R-2)/3,S=B-1,W[q++]=B,W[q++]=F,W[q++]=S,W[q++]=S,W[q++]=F,W[q++]=D,N+=3,R-=3}let X,K,j=0,Q=0,Y=i[j++],ne=i[j++];for(C.set(Y,N),C.set(ne,R-ne.length+1),M=f.fromArray(s,Q,M),p=ne.length-3,m=0;m<p;m+=3)X=n.geodeticSurfaceNormal(f.fromArray(Y,m,Um),Um),K=n.geodeticSurfaceNormal(f.fromArray(ne,p-m,aT),aT),L=f.normalize(f.add(X,K,L),L),Ad(P,L,M,N,R,t),F=N/3,D=F+1,B=(R-2)/3,S=B-1,W[q++]=B,W[q++]=F,W[q++]=S,W[q++]=S,W[q++]=F,W[q++]=D,N+=3,R-=3;for(X=n.geodeticSurfaceNormal(f.fromArray(Y,p,Um),Um),K=n.geodeticSurfaceNormal(f.fromArray(ne,p,aT),aT),L=f.normalize(f.add(X,K,L),L),Q+=3,m=0;m<o.length;m++){let $;u=o[m];const me=u.leftPositions,Se=u.rightPositions;let fe,ye,ve=gne,Oe=S1,Ge=v1;if(L=f.fromArray(a,Q,L),c(me)){for(Ad(P,L,M,void 0,R,t),R-=3,fe=D,ye=S,$=0;$<me.length/3;$++)ve=f.fromArray(me,3*$,ve),W[q++]=fe,W[q++]=ye-$-1,W[q++]=ye-$,oo.addAttribute(C,ve,void 0,R),Oe=f.fromArray(C,3*(ye-$-1),Oe),Ge=f.fromArray(C,3*fe,Ge),M=f.normalize(f.subtract(Oe,Ge,M),M),Ad(P,L,M,void 0,R,t),R-=3;ve=f.fromArray(C,3*fe,ve),Oe=f.subtract(f.fromArray(C,3*ye,Oe),ve,Oe),Ge=f.subtract(f.fromArray(C,3*(ye-$),Ge),ve,Ge),M=f.normalize(f.add(Oe,Ge,M),M),Ad(P,L,M,N,void 0,t),N+=3}else{for(Ad(P,L,M,N,void 0,t),N+=3,fe=S,ye=D,$=0;$<Se.length/3;$++)ve=f.fromArray(Se,3*$,ve),W[q++]=fe,W[q++]=ye+$,W[q++]=ye+$+1,oo.addAttribute(C,ve,N),Oe=f.fromArray(C,3*fe,Oe),Ge=f.fromArray(C,3*(ye+$),Ge),M=f.normalize(f.subtract(Oe,Ge,M),M),Ad(P,L,M,N,void 0,t),N+=3;ve=f.fromArray(C,3*fe,ve),Oe=f.subtract(f.fromArray(C,3*(ye+$),Oe),ve,Oe),Ge=f.subtract(f.fromArray(C,3*ye,Ge),ve,Ge),M=f.normalize(f.negate(f.add(Ge,Oe,M),M),M),Ad(P,L,M,void 0,R,t),R-=3}for(Y=i[j++],ne=i[j++],Y.splice(0,3),ne.splice(ne.length-3,3),C.set(Y,N),C.set(ne,R-ne.length+1),p=ne.length-3,Q+=3,M=f.fromArray(s,Q,M),$=0;$<ne.length;$+=3)X=n.geodeticSurfaceNormal(f.fromArray(Y,$,Um),Um),K=n.geodeticSurfaceNormal(f.fromArray(ne,p-$,aT),aT),L=f.normalize(f.add(X,K,L),L),Ad(P,L,M,N,R,t),D=N/3,F=D-1,S=(R-2)/3,B=S+1,W[q++]=B,W[q++]=F,W[q++]=S,W[q++]=S,W[q++]=F,W[q++]=D,N+=3,R-=3;N-=3,R+=3}if(L=f.fromArray(a,a.length-3,L),Ad(P,L,M,N,R,t),y){N+=3,R-=3,z=S1,U=v1;const $=r[1];for(m=0;m<G;m++)z=f.fromArray($,3*(b-m-1),z),U=f.fromArray($,3*m,U),oo.addAttribute(C,z,void 0,R),oo.addAttribute(C,U,N),Ad(P,L,M,N,R,t),D=N/3,F=D-1,S=(R-2)/3,B=S+1,W[q++]=B,W[q++]=F,W[q++]=S,W[q++]=S,W[q++]=F,W[q++]=D,N+=3,R-=3}if(l.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:C}),t.st){const $=new Float32Array(x/3*2);let me,Se,fe=0;if(y){d/=3,h/=3;const ye=Math.PI/(b+1);let ve;Se=1/(d-b+1),me=1/(h-b+1);const Oe=b/2;for(m=Oe+1;m<b+1;m++)ve=O.PI_OVER_TWO+ye*m,$[fe++]=me*(1+Math.cos(ve)),$[fe++]=.5*(1+Math.sin(ve));for(m=1;m<h-b+1;m++)$[fe++]=m*me,$[fe++]=0;for(m=b;m>Oe;m--)ve=O.PI_OVER_TWO-m*ye,$[fe++]=1-me*(1+Math.cos(ve)),$[fe++]=.5*(1+Math.sin(ve));for(m=Oe;m>0;m--)ve=O.PI_OVER_TWO-ye*m,$[fe++]=1-Se*(1+Math.cos(ve)),$[fe++]=.5*(1+Math.sin(ve));for(m=d-b;m>0;m--)$[fe++]=m*Se,$[fe++]=1;for(m=1;m<Oe+1;m++)ve=O.PI_OVER_TWO+ye*m,$[fe++]=Se*(1+Math.cos(ve)),$[fe++]=.5*(1+Math.sin(ve))}else{for(d/=3,h/=3,Se=1/(d-1),me=1/(h-1),m=0;m<h;m++)$[fe++]=m*me,$[fe++]=0;for(m=d;m>0;m--)$[fe++]=(m-1)*Se,$[fe++]=1}l.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:$})}return t.normal&&(l.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:P.normals})),t.tangent&&(l.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:P.tangents})),t.bitangent&&(l.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:P.bitangents})),{attributes:l,indices:W}}function oU(e,t,n){n[t++]=e[0],n[t++]=e[1],n[t++]=e[2];for(let i=3;i<e.length;i+=3){const o=e[i],r=e[i+1],s=e[i+2];n[t++]=o,n[t++]=r,n[t++]=s,n[t++]=o,n[t++]=r,n[t++]=s}return n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n}const Tne=new f,AE=new f,xu=new Ce;function Ane(e,t,n,i,o,r){const s=f.subtract(t,e,Tne);f.normalize(s,s);const a=n.geodeticSurfaceNormal(e,AE),l=f.cross(s,a,Tne);f.multiplyByScalar(l,i,l);let u=o.latitude,d=o.longitude,h=r.latitude,m=r.longitude;f.add(e,l,AE),n.cartesianToCartographic(AE,xu);let _=xu.latitude,p=xu.longitude;u=Math.min(u,_),d=Math.min(d,p),h=Math.max(h,_),m=Math.max(m,p),f.subtract(e,l,AE),n.cartesianToCartographic(AE,xu),_=xu.latitude,p=xu.longitude,u=Math.min(u,_),d=Math.min(d,p),h=Math.max(h,_),m=Math.max(m,p),o.latitude=u,o.longitude=d,r.latitude=h,r.longitude=m}const Cu=new f,xE=new f,Wc=new Ce,qc=new Ce;function xne(e,t,n,i,o){e=yne(e,t);const r=Ea(e,f.equalsEpsilon),s=r.length;if(s<2||n<=0)return new Te;const a=.5*n;let l,u;if(Wc.latitude=Number.POSITIVE_INFINITY,Wc.longitude=Number.POSITIVE_INFINITY,qc.latitude=Number.NEGATIVE_INFINITY,qc.longitude=Number.NEGATIVE_INFINITY,i===Nr.ROUNDED){const m=r[0];f.subtract(m,r[1],Cu),f.normalize(Cu,Cu),f.multiplyByScalar(Cu,a,Cu),f.add(m,Cu,xE),t.cartesianToCartographic(xE,xu),l=xu.latitude,u=xu.longitude,Wc.latitude=Math.min(Wc.latitude,l),Wc.longitude=Math.min(Wc.longitude,u),qc.latitude=Math.max(qc.latitude,l),qc.longitude=Math.max(qc.longitude,u)}for(let m=0;m<s-1;++m)Ane(r[m],r[m+1],t,a,Wc,qc);const d=r[s-1];f.subtract(d,r[s-2],Cu),f.normalize(Cu,Cu),f.multiplyByScalar(Cu,a,Cu),f.add(d,Cu,xE),Ane(d,xE,t,a,Wc,qc),i===Nr.ROUNDED&&(t.cartesianToCartographic(xE,xu),l=xu.latitude,u=xu.longitude,Wc.latitude=Math.min(Wc.latitude,l),Wc.longitude=Math.min(Wc.longitude,u),qc.latitude=Math.max(qc.latitude,l),qc.longitude=Math.max(qc.longitude,u));const h=c(o)?o:new Te;return h.north=qc.latitude,h.south=Wc.latitude,h.east=qc.longitude,h.west=Wc.longitude,h}function Kh(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions,n=e.width;A.defined("options.positions",t),A.defined("options.width",n);const i=g(e.height,0),o=g(e.extrudedHeight,i);this._positions=t,this._ellipsoid=he.clone(g(e.ellipsoid,he.default)),this._vertexFormat=et.clone(g(e.vertexFormat,et.DEFAULT)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=g(e.cornerType,Nr.ROUNDED),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*f.packedLength+he.packedLength+et.packedLength+7}Kh.pack=function(e,t,n){A.defined("value",e),A.defined("array",t),n=g(n,0);const i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=f.packedLength)f.pack(i[r],t,n);return he.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=he.packedLength),n+=et.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=g(e._offsetAttribute,-1),t};const Cne=he.clone(he.UNIT_SPHERE),Ene=new et,Qh={positions:void 0,ellipsoid:Cne,vertexFormat:Ene,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Kh.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=f.packedLength)o[p]=f.unpack(e,t);const r=he.unpack(e,t,Cne),s=et.unpack(e,t+=he.packedLength,Ene);t+=et.packedLength;const a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t++],m=1===e[t++],_=e[t];return c(n)?(n._positions=o,n._ellipsoid=he.clone(r,n._ellipsoid),n._vertexFormat=et.clone(s,n._vertexFormat),n._width=a,n._height=l,n._extrudedHeight=u,n._cornerType=d,n._granularity=h,n._shadowVolume=m,n._offsetAttribute=-1===_?void 0:_,n):(Qh.positions=o,Qh.width=a,Qh.height=l,Qh.extrudedHeight=u,Qh.cornerType=d,Qh.granularity=h,Qh.shadowVolume=m,Qh.offsetAttribute=-1===_?void 0:_,new Kh(Qh))},Kh.computeRectangle=function(e,t){const n=(e=g(e,g.EMPTY_OBJECT)).positions,i=e.width;return A.defined("options.positions",n),A.defined("options.width",i),xne(n,g(e.ellipsoid,he.default),i,g(e.cornerType,Nr.ROUNDED),t)},Kh.createGeometry=function(e){let t=e._positions;const n=e._width,i=e._ellipsoid;t=yne(t,i);const o=Ea(t,f.equalsEpsilon);if(o.length<2||n<=0)return;const r=e._height,s=e._extrudedHeight,a=!O.equalsEpsilon(r,s,0,O.EPSILON2),l=e._vertexFormat,u={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0};let d;if(a)u.height=r,u.extrudedHeight=s,u.shadowVolume=e._shadowVolume,u.offsetAttribute=e._offsetAttribute,d=function Qet(e,t){const n=new et({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,r=bne(oo.computePositions(e),n,i),s=e.height,a=e.extrudedHeight;let l=r.attributes;const u=r.indices;let d=l.position.values,h=d.length;const m=new Float64Array(6*h);let _=new Float64Array(h);_.set(d);let y,p=new Float64Array(4*h);d=po.scaleToGeodeticHeight(d,s,i),p=oU(d,0,p),_=po.scaleToGeodeticHeight(_,a,i),p=oU(_,2*h,p),m.set(d),m.set(_,h),m.set(p,2*h),l.position.values=m,l=function Ket(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;const n=e.position.values;let i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);const r=e.position.values.length/18,s=3*r,a=2*r,l=2*s;let u;if(t.normal||t.bitangent||t.tangent){const d=t.normal?new Float32Array(6*s):void 0,h=t.tangent?new Float32Array(6*s):void 0,m=t.bitangent?new Float32Array(6*s):void 0;let _=mne,p=_ne,y=S1,b=v1,x=$et,C=gne,w=l;for(u=0;u<s;u+=3){const v=w+l;_=f.fromArray(n,u,_),p=f.fromArray(n,u+s,p),y=f.fromArray(n,(u+3)%s,y),p=f.subtract(p,_,p),y=f.subtract(y,_,y),b=f.normalize(f.cross(p,y,b),b),t.normal&&(oo.addAttribute(d,b,v),oo.addAttribute(d,b,v+3),oo.addAttribute(d,b,w),oo.addAttribute(d,b,w+3)),(t.tangent||t.bitangent)&&(C=f.fromArray(i,u,C),t.bitangent&&(oo.addAttribute(m,C,v),oo.addAttribute(m,C,v+3),oo.addAttribute(m,C,w),oo.addAttribute(m,C,w+3)),t.tangent&&(x=f.normalize(f.cross(C,b,x),x),oo.addAttribute(h,x,v),oo.addAttribute(h,x,v+3),oo.addAttribute(h,x,w),oo.addAttribute(h,x,w+3))),w+=6}if(t.normal){for(d.set(i),u=0;u<s;u+=3)d[u+s]=-i[u],d[u+s+1]=-i[u+1],d[u+s+2]=-i[u+2];e.normal.values=d}else e.normal=void 0;if(t.bitangent?(m.set(o),m.set(o,s),e.bitangent.values=m):e.bitangent=void 0,t.tangent){const v=e.tangent.values;h.set(v),h.set(v,s),e.tangent.values=h}}if(t.st){const d=e.st.values,h=new Float32Array(6*a);h.set(d),h.set(d,a);let m=2*a;for(let _=0;_<2;_++){for(h[m++]=d[0],h[m++]=d[1],u=2;u<a;u+=2){const p=d[u],y=d[u+1];h[m++]=p,h[m++]=y,h[m++]=p,h[m++]=y}h[m++]=d[0],h[m++]=d[1]}e.st.values=h}return e}(l,t);const b=h/3;if(e.shadowVolume){const B=l.normal.values;h=B.length;let F=new Float32Array(6*h);for(y=0;y<h;y++)B[y]=-B[y];F.set(B,h),F=oU(B,4*h,F),l.extrudeDirection=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:F}),t.normal||(l.normal=void 0)}if(c(e.offsetAttribute)){let B=new Uint8Array(6*b);B=e.offsetAttribute===Xn.TOP?B.fill(1,0,b).fill(1,2*b,4*b):B.fill(e.offsetAttribute===Xn.NONE?0:1),l.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}const x=u.length,C=b+b,w=Ot.createTypedArray(m.length/3,2*x+3*C);w.set(u);let I,P,N,R,v=x;for(y=0;y<x;y+=3){const B=u[y],F=u[y+1];w[v++]=u[y+2]+b,w[v++]=F+b,w[v++]=B+b}for(y=0;y<C;y+=2)I=y+C,P=I+C,N=I+1,R=P+1,w[v++]=I,w[v++]=P,w[v++]=N,w[v++]=N,w[v++]=P,w[v++]=R;return{attributes:l,indices:w}}(u,l);else if(d=bne(oo.computePositions(u),l,i),d.attributes.position.values=po.scaleToGeodeticHeight(d.attributes.position.values,r,i),c(e._offsetAttribute)){const p=e._offsetAttribute===Xn.NONE?0:1,b=new Uint8Array(d.attributes.position.values.length/3).fill(p);d.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}const h=d.attributes,m=Ae.fromVertices(h.position.values,void 0,3);return l.position||(d.attributes.position.values=void 0),new En({attributes:h,indices:d.indices,primitiveType:Tt.TRIANGLES,boundingSphere:m,offsetAttribute:e._offsetAttribute})},Kh.createShadowVolume=function(e,t,n){const i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Kh({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:et.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(Kh.prototype,{rectangle:{get:function(){return c(this._rectangle)||(this._rectangle=xne(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});const rU=Kh,wne=new f,Sne=new f,Jet=new f;function vne(e,t){const n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new co;let a,d,m,l=0,u=0,h=0;for(d=0;d<i.length;d+=2)m=i[d].length-3,l+=m,h+=m/3*4,u+=i[d+1].length-3;for(l+=3,u+=3,d=0;d<o.length;d++){a=o[d];const U=o[d].leftPositions;c(U)?(m=U.length,l+=m,h+=m/3*2):(m=o[d].rightPositions.length,u+=m,h+=m/3*2)}const _=c(r);let p;_&&(p=r[0].length-3,l+=p,u+=p,p/=3,h+=4*p);const y=l+u,b=new Float64Array(y);let w,v,I,P,N,R,x=0,C=y-1;const B=p/2,F=Ot.createTypedArray(y/3,h+4);let S=0;if(F[S++]=x/3,F[S++]=(C-2)/3,_){n.push(x/3),R=wne,N=Sne;const U=r[0];for(d=0;d<B;d++)R=f.fromArray(U,3*(B-1-d),R),N=f.fromArray(U,3*(B+d),N),oo.addAttribute(b,N,x),oo.addAttribute(b,R,void 0,C),v=x/3,P=v+1,w=(C-2)/3,I=w-1,F[S++]=w,F[S++]=I,F[S++]=v,F[S++]=P,x+=3,C-=3}let D=0,L=i[D++],M=i[D++];for(b.set(L,x),b.set(M,C-M.length+1),m=M.length-3,n.push(x/3,(C-2)/3),d=0;d<m;d+=3)v=x/3,P=v+1,w=(C-2)/3,I=w-1,F[S++]=w,F[S++]=I,F[S++]=v,F[S++]=P,x+=3,C-=3;for(d=0;d<o.length;d++){let U;a=o[d];const z=a.leftPositions,G=a.rightPositions;let W,q=Jet;if(c(z)){for(C-=3,W=I,n.push(P),U=0;U<z.length/3;U++)q=f.fromArray(z,3*U,q),F[S++]=W-U-1,F[S++]=W-U,oo.addAttribute(b,q,void 0,C),C-=3;n.push(W-Math.floor(z.length/6)),t===Nr.BEVELED&&n.push((C-2)/3+1),x+=3}else{for(x+=3,W=P,n.push(I),U=0;U<G.length/3;U++)q=f.fromArray(G,3*U,q),F[S++]=W+U,F[S++]=W+U+1,oo.addAttribute(b,q,x),x+=3;n.push(W+Math.floor(G.length/6)),t===Nr.BEVELED&&n.push(x/3-1),C-=3}for(L=i[D++],M=i[D++],L.splice(0,3),M.splice(M.length-3,3),b.set(L,x),b.set(M,C-M.length+1),m=M.length-3,U=0;U<M.length;U+=3)P=x/3,v=P-1,I=(C-2)/3,w=I+1,F[S++]=w,F[S++]=I,F[S++]=v,F[S++]=P,x+=3,C-=3;x-=3,C+=3,n.push(x/3,(C-2)/3)}if(_){x+=3,C-=3,R=wne,N=Sne;const U=r[1];for(d=0;d<B;d++)R=f.fromArray(U,3*(p-d-1),R),N=f.fromArray(U,3*d,N),oo.addAttribute(b,R,void 0,C),oo.addAttribute(b,N,x),P=x/3,v=P-1,I=(C-2)/3,w=I+1,F[S++]=w,F[S++]=I,F[S++]=v,F[S++]=P,x+=3,C-=3;n.push(x/3)}else n.push(x/3,(C-2)/3);return F[S++]=x/3,F[S++]=(C-2)/3,s.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:b}),{attributes:s,indices:F,wallIndices:n}}function CE(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions,n=e.width;A.typeOf.object("options.positions",t),A.typeOf.number("options.width",n);const i=g(e.height,0),o=g(e.extrudedHeight,i);this._positions=t,this._ellipsoid=he.clone(g(e.ellipsoid,he.default)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=g(e.cornerType,Nr.ROUNDED),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*f.packedLength+he.packedLength+6}CE.pack=function(e,t,n){A.typeOf.object("value",e),A.typeOf.object("array",t),n=g(n,0);const i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=f.packedLength)f.pack(i[r],t,n);return he.pack(e._ellipsoid,t,n),n+=he.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=g(e._offsetAttribute,-1),t};const Ine=he.clone(he.UNIT_SPHERE),zm={positions:void 0,ellipsoid:Ine,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};CE.unpack=function(e,t,n){A.typeOf.object("array",e),t=g(t,0);const i=e[t++],o=new Array(i);for(let m=0;m<i;++m,t+=f.packedLength)o[m]=f.unpack(e,t);const r=he.unpack(e,t,Ine);t+=he.packedLength;const s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t];return c(n)?(n._positions=o,n._ellipsoid=he.clone(r,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=l,n._cornerType=u,n._granularity=d,n._offsetAttribute=-1===h?void 0:h,n):(zm.positions=o,zm.width=s,zm.height=a,zm.extrudedHeight=l,zm.cornerType=u,zm.granularity=d,zm.offsetAttribute=-1===h?void 0:h,new CE(zm))},CE.createGeometry=function(e){let t=e._positions;const n=e._width,i=e._ellipsoid;t=function ett(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}(t,i);const o=Ea(t,f.equalsEpsilon);if(o.length<2||n<=0)return;const r=e._height,s=e._extrudedHeight,a=!O.equalsEpsilon(r,s,0,O.EPSILON2),l={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};let u;if(a)l.height=r,l.extrudedHeight=s,l.offsetAttribute=e._offsetAttribute,u=function ttt(e){const t=e.ellipsoid,i=vne(oo.computePositions(e),e.cornerType),o=i.wallIndices,r=e.height,s=e.extrudedHeight,a=i.attributes,l=i.indices;let u=a.position.values,d=u.length,h=new Float64Array(d);h.set(u);const m=new Float64Array(2*d);if(u=po.scaleToGeodeticHeight(u,r,t),h=po.scaleToGeodeticHeight(h,s,t),m.set(u),m.set(h,d),a.position.values=m,d/=3,c(e.offsetAttribute)){let w=new Uint8Array(2*d);w=e.offsetAttribute===Xn.TOP?w.fill(1,0,d):w.fill(e.offsetAttribute===Xn.NONE?0:1),a.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:w})}let _;const p=l.length,y=Ot.createTypedArray(m.length/3,2*(p+o.length));y.set(l);let x,C,b=p;for(_=0;_<p;_+=2){const v=l[_+1];y[b++]=l[_]+d,y[b++]=v+d}for(_=0;_<o.length;_++)x=o[_],C=x+d,y[b++]=x,y[b++]=C;return{attributes:a,indices:y}}(l);else if(u=vne(oo.computePositions(l),l.cornerType),u.attributes.position.values=po.scaleToGeodeticHeight(u.attributes.position.values,r,i),c(e._offsetAttribute)){const p=e._offsetAttribute===Xn.NONE?0:1,y=new Uint8Array(u.attributes.position.values.length/3).fill(p);u.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}const d=u.attributes,h=Ae.fromVertices(d.position.values,void 0,3);return new En({attributes:d,indices:u.indices,primitiveType:Tt.LINES,boundingSphere:h,offsetAttribute:e._offsetAttribute})};const ntt=CE,itt=new Co(0);function _c(e){No.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}c(Object.create)&&((_c.prototype=Object.create(No.prototype)).constructor=_c),Object.defineProperties(_c.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),_c.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!c(t.height)&&!c(t.extrudedHeight)&&Cb.isSupported(this._scene)},_c.prototype._getIsClosed=function(e){const t=e.height,n=e.extrudedHeight;return 0===t||c(n)&&n!==t},_c.prototype._computeCenter=E.throwInstantiationError,_c.prototype._onEntityPropertyChanged=function(e,t,n,i){if(No.prototype._onEntityPropertyChanged.call(this,e,t,n,i),-1===this._observedPropertyNames.indexOf(t))return;const o=this._entity[this._geometryPropertyName];if(!c(o))return;c(o.zIndex)&&(c(o.height)||c(o.extrudedHeight))&&_n(_n.geometryZIndex),this._zIndex=g(o.zIndex,itt),c(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);const r=o.heightReference,s=o.extrudedHeightReference;if(c(r)||c(s)){const a=new d2(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new Kte(this._scene,a,r,s)}},_c.prototype.destroy=function(){c(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),No.prototype.destroy.call(this)},_c.getGeometryHeight=function(e,t){if(A.defined("heightReference",t),c(e))return X_(t)?0:e;t!==tn.NONE&&_n(_n.geometryHeightReference)},_c.getGeometryExtrudedHeight=function(e,t){if(A.defined("extrudedHeightReference",t),c(e))return X_(t)?_c.CLAMP_TO_GROUND:e;t!==tn.NONE&&_n(_n.geometryExtrudedHeightReference)},_c.CLAMP_TO_GROUND="clamp",_c.computeGeometryOffsetAttribute=function(e,t,n,i){(!c(e)||!c(t))&&(t=tn.NONE),(!c(n)||!c(i))&&(i=tn.NONE);let o=0;return t!==tn.NONE&&o++,i===tn.RELATIVE_TO_GROUND&&o++,2===o?Xn.ALL:1===o?Xn.TOP:void 0};const ui=_c,Dne=new Z,Pne=f.ZERO,One=new f,Rne=new Te;function ott(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function xd(e,t){ui.call(this,{entity:e,scene:t,geometryOptions:new ott(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function cT(e,t,n){go.call(this,e,t,n)}c(Object.create)&&((xd.prototype=Object.create(ui.prototype)).constructor=xd),xd.prototype.createFillGeometryInstance=function(e){if(A.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i={show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:_o.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof kn){let o;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,Dne)),c(o)||(o=Z.WHITE),i.color=ei.fromColor(o)}return c(this._options.offsetAttribute)&&(i.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,Pne,One))),new zn({id:t,geometry:new rU(this._options),attributes:i})},xd.prototype.createOutlineGeometryInstance=function(e){if(A.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,Z.BLACK,Dne),o={show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ei.fromColor(i),distanceDisplayCondition:_o.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return c(this._options.offsetAttribute)&&(o.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,Pne,One))),new zn({id:t,geometry:new ntt(this._options),attributes:o})},xd.prototype._computeCenter=function(e,t){const n=te.getValueOrUndefined(this._entity.corridor.positions,e);if(c(n)&&0!==n.length)return f.clone(n[Math.floor(n.length/2)],t)},xd.prototype._isHidden=function(e,t){return!c(t.positions)||!c(t.width)||No.prototype._isHidden.call(this,e,t)},xd.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!te.isConstant(t.height)||!te.isConstant(t.extrudedHeight)||!te.isConstant(t.granularity)||!te.isConstant(t.width)||!te.isConstant(t.outlineWidth)||!te.isConstant(t.cornerType)||!te.isConstant(t.zIndex)||this._onTerrain&&!te.isConstant(this._materialProperty)&&!(this._materialProperty instanceof kn)},xd.prototype._setStaticOptions=function(e,t){let n=te.getValueOrUndefined(t.height,It.MINIMUM_VALUE);const i=te.getValueOrDefault(t.heightReference,It.MINIMUM_VALUE,tn.NONE);let o=te.getValueOrUndefined(t.extrudedHeight,It.MINIMUM_VALUE);const r=te.getValueOrDefault(t.extrudedHeightReference,It.MINIMUM_VALUE,tn.NONE);c(o)&&!c(n)&&(n=0);const s=this._options;s.vertexFormat=this._materialProperty instanceof kn?gi.VERTEX_FORMAT:ca.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(It.MINIMUM_VALUE,s.positions),s.width=t.width.getValue(It.MINIMUM_VALUE),s.granularity=te.getValueOrUndefined(t.granularity,It.MINIMUM_VALUE),s.cornerType=te.getValueOrUndefined(t.cornerType,It.MINIMUM_VALUE),s.offsetAttribute=ui.computeGeometryOffsetAttribute(n,i,o,r),s.height=ui.getGeometryHeight(n,i),o=ui.getGeometryExtrudedHeight(o,r),o===ui.CLAMP_TO_GROUND&&(o=vo.getMinimumMaximumHeights(rU.computeRectangle(s,Rne)).minimumTerrainHeight),s.extrudedHeight=o},xd.DynamicGeometryUpdater=cT,c(Object.create)&&((cT.prototype=Object.create(go.prototype)).constructor=cT),cT.prototype._isHidden=function(e,t,n){const i=this._options;return!c(i.positions)||!c(i.width)||go.prototype._isHidden.call(this,e,t,n)},cT.prototype._setOptions=function(e,t,n){const i=this._options;let o=te.getValueOrUndefined(t.height,n);const r=te.getValueOrDefault(t.heightReference,n,tn.NONE);let s=te.getValueOrUndefined(t.extrudedHeight,n);const a=te.getValueOrDefault(t.extrudedHeightReference,n,tn.NONE);c(s)&&!c(o)&&(o=0),i.positions=te.getValueOrUndefined(t.positions,n),i.width=te.getValueOrUndefined(t.width,n),i.granularity=te.getValueOrUndefined(t.granularity,n),i.cornerType=te.getValueOrUndefined(t.cornerType,n),i.offsetAttribute=ui.computeGeometryOffsetAttribute(o,r,s,a),i.height=ui.getGeometryHeight(o,r),s=ui.getGeometryExtrudedHeight(s,a),s===ui.CLAMP_TO_GROUND&&(s=vo.getMinimumMaximumHeights(rU.computeRectangle(i,Rne)).minimumTerrainHeight),i.extrudedHeight=s};const rtt=xd,Lne={computePositions:function(e,t,n,i,o){const r=.5*e,s=-r,a=i+i,u=new Float64Array(3*(o?2*a:a));let d,h=0,m=0;const _=o?3*a:0,p=o?3*(a+i):3*i;for(d=0;d<i;d++){const y=d/i*O.TWO_PI,b=Math.cos(y),x=Math.sin(y),C=b*n,w=x*n,v=b*t,I=x*t;u[m+_]=C,u[m+_+1]=w,u[m+_+2]=s,u[m+p]=v,u[m+p+1]=I,u[m+p+2]=r,m+=3,o&&(u[h++]=C,u[h++]=w,u[h++]=s,u[h++]=v,u[h++]=I,u[h++]=r)}return u}},Nne=Lne,sU=new V,stt=new f,att=new f,ctt=new f,ltt=new f;function Jh(e){const t=(e=g(e,g.EMPTY_OBJECT)).length,n=e.topRadius,i=e.bottomRadius,o=g(e.vertexFormat,et.DEFAULT),r=g(e.slices,128);if(!c(t))throw new E("options.length must be defined.");if(!c(n))throw new E("options.topRadius must be defined.");if(!c(i))throw new E("options.bottomRadius must be defined.");if(r<3)throw new E("options.slices must be greater than or equal to 3.");if(c(e.offsetAttribute)&&e.offsetAttribute===Xn.TOP)throw new E("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=et.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}Jh.packedLength=et.packedLength+5,Jh.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),et.pack(e._vertexFormat,t,n),n+=et.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=g(e._offsetAttribute,-1),t};const Mne=new et,lT={vertexFormat:Mne,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};let aU;Jh.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);const i=et.unpack(e,t,Mne);t+=et.packedLength;const o=e[t++],r=e[t++],s=e[t++],a=e[t++],l=e[t];return c(n)?(n._vertexFormat=et.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=-1===l?void 0:l,n):(lT.length=o,lT.topRadius=r,lT.bottomRadius=s,lT.slices=a,lT.offsetAttribute=-1===l?void 0:l,new Jh(lT))},Jh.createGeometry=function(e){let t=e._length;const n=e._topRadius,i=e._bottomRadius,o=e._vertexFormat,r=e._slices;if(t<=0||n<0||i<0||0===n&&0===i)return;const s=r+r,a=r+s,l=s+s,u=Nne.computePositions(t,n,i,r,!0),d=o.st?new Float32Array(2*l):void 0,h=o.normal?new Float32Array(3*l):void 0,m=o.tangent?new Float32Array(3*l):void 0,_=o.bitangent?new Float32Array(3*l):void 0;let p;const y=o.normal||o.tangent||o.bitangent;if(y){const N=o.tangent||o.bitangent;let R=0,B=0,F=0;const S=Math.atan2(i-n,t),D=stt;D.z=Math.sin(S);const L=Math.cos(S);let M=ctt,U=att;for(p=0;p<r;p++){const z=p/r*O.TWO_PI,G=L*Math.cos(z),W=L*Math.sin(z);y&&(D.x=G,D.y=W,N&&(M=f.normalize(f.cross(f.UNIT_Z,D,M),M)),o.normal&&(h[R++]=D.x,h[R++]=D.y,h[R++]=D.z,h[R++]=D.x,h[R++]=D.y,h[R++]=D.z),o.tangent&&(m[B++]=M.x,m[B++]=M.y,m[B++]=M.z,m[B++]=M.x,m[B++]=M.y,m[B++]=M.z),o.bitangent&&(U=f.normalize(f.cross(D,M,U),U),_[F++]=U.x,_[F++]=U.y,_[F++]=U.z,_[F++]=U.x,_[F++]=U.y,_[F++]=U.z))}for(p=0;p<r;p++)o.normal&&(h[R++]=0,h[R++]=0,h[R++]=-1),o.tangent&&(m[B++]=1,m[B++]=0,m[B++]=0),o.bitangent&&(_[F++]=0,_[F++]=-1,_[F++]=0);for(p=0;p<r;p++)o.normal&&(h[R++]=0,h[R++]=0,h[R++]=1),o.tangent&&(m[B++]=1,m[B++]=0,m[B++]=0),o.bitangent&&(_[F++]=0,_[F++]=1,_[F++]=0)}const x=Ot.createTypedArray(l,12*r-12);let C=0,w=0;for(p=0;p<r-1;p++)x[C++]=w,x[C++]=w+2,x[C++]=w+3,x[C++]=w,x[C++]=w+3,x[C++]=w+1,w+=2;for(x[C++]=s-2,x[C++]=0,x[C++]=1,x[C++]=s-2,x[C++]=1,x[C++]=s-1,p=1;p<r-1;p++)x[C++]=s+p+1,x[C++]=s+p,x[C++]=s;for(p=1;p<r-1;p++)x[C++]=a,x[C++]=a+p,x[C++]=a+p+1;let v=0;if(o.st){const N=Math.max(n,i);for(p=0;p<l;p++){const R=f.fromArray(u,3*p,ltt);d[v++]=(R.x+N)/(2*N),d[v++]=(R.y+N)/(2*N)}}const I=new co;o.position&&(I.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:u})),o.normal&&(I.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:h})),o.tangent&&(I.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:m})),o.bitangent&&(I.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:_})),o.st&&(I.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:d})),sU.x=.5*t,sU.y=Math.max(i,n);const P=new Ae(f.ZERO,V.magnitude(sU));if(c(e._offsetAttribute)){t=u.length;const N=e._offsetAttribute===Xn.NONE?0:1,R=new Uint8Array(t/3).fill(N);I.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:R})}return new En({attributes:I,indices:x,primitiveType:Tt.TRIANGLES,boundingSphere:P,offsetAttribute:e._offsetAttribute})},Jh.getUnitCylinder=function(){return c(aU)||(aU=Jh.createGeometry(new Jh({topRadius:1,bottomRadius:1,length:1,vertexFormat:et.POSITION_ONLY}))),aU};const utt=Jh,cU=new V;function uT(e){const t=(e=g(e,g.EMPTY_OBJECT)).length,n=e.topRadius,i=e.bottomRadius,o=g(e.slices,128),r=Math.max(g(e.numberOfVerticalLines,16),0);if(A.typeOf.number("options.positions",t),A.typeOf.number("options.topRadius",n),A.typeOf.number("options.bottomRadius",i),A.typeOf.number.greaterThanOrEquals("options.slices",o,3),c(e.offsetAttribute)&&e.offsetAttribute===Xn.TOP)throw new E("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}uT.packedLength=6,uT.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=g(e._offsetAttribute,-1),t};const py={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};uT.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=e[t++],o=e[t++],r=e[t++],s=e[t++],a=e[t++],l=e[t];return c(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=-1===l?void 0:l,n):(py.length=i,py.topRadius=o,py.bottomRadius=r,py.slices=s,py.numberOfVerticalLines=a,py.offsetAttribute=-1===l?void 0:l,new uT(py))},uT.createGeometry=function(e){let t=e._length;const n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||0===n&&0===i)return;const s=2*o,a=Nne.computePositions(t,n,i,o,!1);let u,l=2*o;if(r>0){const y=Math.min(r,o);u=Math.round(o/y),l+=y}const d=Ot.createTypedArray(s,2*l);let m,h=0;for(m=0;m<o-1;m++)d[h++]=m,d[h++]=m+1,d[h++]=m+o,d[h++]=m+1+o;if(d[h++]=o-1,d[h++]=0,d[h++]=o+o-1,d[h++]=o,r>0)for(m=0;m<o;m+=u)d[h++]=m,d[h++]=m+o;const _=new co;_.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:a}),cU.x=.5*t,cU.y=Math.max(i,n);const p=new Ae(f.ZERO,V.magnitude(cU));if(c(e._offsetAttribute)){t=a.length;const y=e._offsetAttribute===Xn.NONE?0:1,b=new Uint8Array(t/3).fill(y);_.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}return new En({attributes:_,indices:d,primitiveType:Tt.LINES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};const dtt=uT,Fne=f.ZERO,Bne=new f,ftt=new f,kne=new Z;function htt(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function vl(e,t){No.call(this,{entity:e,scene:t,geometryOptions:new htt(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function dT(e,t,n){go.call(this,e,t,n)}c(Object.create)&&((vl.prototype=Object.create(No.prototype)).constructor=vl),Object.defineProperties(vl.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),vl.prototype.createFillGeometryInstance=function(e){if(A.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i=new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),s={show:i,distanceDisplayCondition:_o.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};if(this._materialProperty instanceof kn){let a;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,kne)),c(a)||(a=Z.WHITE),s.color=ei.fromColor(a)}return c(this._options.offsetAttribute)&&(s.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,Fne,Bne))),new zn({id:t,geometry:new utt(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.ellipsoid),attributes:s})},vl.prototype.createOutlineGeometryInstance=function(e){if(A.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,Z.BLACK,kne),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ei.fromColor(i),distanceDisplayCondition:_o.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,Fne,Bne))),new zn({id:t,geometry:new dtt(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.ellipsoid),attributes:r})},vl.prototype._computeCenter=function(e,t){return te.getValueOrUndefined(this._entity.position,e,t)},vl.prototype._isHidden=function(e,t){return!c(e.position)||!c(t.length)||!c(t.topRadius)||!c(t.bottomRadius)||No.prototype._isHidden.call(this,e,t)},vl.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&te.isConstant(e.orientation)&&t.length.isConstant&&t.topRadius.isConstant&&t.bottomRadius.isConstant&&te.isConstant(t.slices)&&te.isConstant(t.outlineWidth)&&te.isConstant(t.numberOfVerticalLines))},vl.prototype._setStaticOptions=function(e,t){const n=te.getValueOrDefault(t.heightReference,It.MINIMUM_VALUE,tn.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof kn?gi.VERTEX_FORMAT:ca.MaterialSupport.TEXTURED.vertexFormat,i.length=t.length.getValue(It.MINIMUM_VALUE),i.topRadius=t.topRadius.getValue(It.MINIMUM_VALUE),i.bottomRadius=t.bottomRadius.getValue(It.MINIMUM_VALUE),i.slices=te.getValueOrUndefined(t.slices,It.MINIMUM_VALUE),i.numberOfVerticalLines=te.getValueOrUndefined(t.numberOfVerticalLines,It.MINIMUM_VALUE),i.offsetAttribute=n!==tn.NONE?Xn.ALL:void 0},vl.prototype._onEntityPropertyChanged=Kk,vl.DynamicGeometryUpdater=dT,c(Object.create)&&((dT.prototype=Object.create(go.prototype)).constructor=dT),dT.prototype._isHidden=function(e,t,n){const i=this._options,o=te.getValueOrUndefined(e.position,n,ftt);return!c(o)||!c(i.length)||!c(i.topRadius)||!c(i.bottomRadius)||go.prototype._isHidden.call(this,e,t,n)},dT.prototype._setOptions=function(e,t,n){const i=te.getValueOrDefault(t.heightReference,n,tn.NONE),o=this._options;o.length=te.getValueOrUndefined(t.length,n),o.topRadius=te.getValueOrUndefined(t.topRadius,n),o.bottomRadius=te.getValueOrUndefined(t.bottomRadius,n),o.slices=te.getValueOrUndefined(t.slices,n),o.numberOfVerticalLines=te.getValueOrUndefined(t.numberOfVerticalLines,n),o.offsetAttribute=i!==tn.NONE?Xn.ALL:void 0};const ptt=vl,lU={},I1=new f,Une=new f,zne=new bt,Vne=new oe;function fT(e,t,n,i,o,r,s,a,l,u){const d=e+t;f.multiplyByScalar(i,Math.cos(d),I1),f.multiplyByScalar(n,Math.sin(d),Une),f.add(I1,Une,I1);let h=Math.cos(e);h*=h;let m=Math.sin(e);m*=m;const p=r/Math.sqrt(s*h+o*m)/a;return bt.fromAxisAngle(I1,p,zne),oe.fromQuaternion(zne,Vne),oe.multiplyByVector(Vne,l,u),f.normalize(u,u),f.multiplyByScalar(u,a,u),u}const Hne=new f,Gne=new f,uU=new f,mtt=new f;lU.raisePositionsToHeight=function(e,t,n){const i=t.ellipsoid,o=t.height,r=t.extrudedHeight,a=new Float64Array(3*(n?e.length/3*2:e.length/3)),l=e.length,u=n?l:0;for(let d=0;d<l;d+=3){const h=d+1,m=d+2,_=f.fromArray(e,d,Hne);i.scaleToGeodeticSurface(_,_);const p=f.clone(_,Gne),y=i.geodeticSurfaceNormal(_,mtt),b=f.multiplyByScalar(y,o,uU);f.add(_,b,_),n&&(f.multiplyByScalar(y,r,b),f.add(p,b,p),a[d+u]=p.x,a[h+u]=p.y,a[m+u]=p.z),a[d]=_.x,a[h]=_.y,a[m]=_.z}return a};const _tt=new f,gtt=new f,ytt=new f;lU.computeEllipsePositions=function(e,t,n){const i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,s=e.center,a=8*e.granularity,l=i*i,u=o*o,d=o*i,h=f.magnitude(s),m=f.normalize(s,_tt);let _=f.cross(f.UNIT_Z,s,gtt);_=f.normalize(_,_);const p=f.cross(m,_,ytt);let y=1+Math.ceil(O.PI_OVER_TWO/a);const b=O.PI_OVER_TWO/(y-1);let x=O.PI_OVER_TWO-y*b;x<0&&(y-=Math.ceil(Math.abs(x)/b));const w=t?new Array(y*(y+2)*2*3):void 0;let v=0,I=Hne,P=Gne;const N=4*y*3;let R=N-1,B=0;const F=n?new Array(N):void 0;let S,D,L,M,U;for(x=O.PI_OVER_TWO,I=fT(x,r,p,_,l,d,u,h,m,I),t&&(w[v++]=I.x,w[v++]=I.y,w[v++]=I.z),n&&(F[R--]=I.z,F[R--]=I.y,F[R--]=I.x),x=O.PI_OVER_TWO-b,S=1;S<y+1;++S){if(I=fT(x,r,p,_,l,d,u,h,m,I),P=fT(Math.PI-x,r,p,_,l,d,u,h,m,P),t){for(w[v++]=I.x,w[v++]=I.y,w[v++]=I.z,L=2*S+2,D=1;D<L-1;++D)M=D/(L-1),U=f.lerp(I,P,M,uU),w[v++]=U.x,w[v++]=U.y,w[v++]=U.z;w[v++]=P.x,w[v++]=P.y,w[v++]=P.z}n&&(F[R--]=I.z,F[R--]=I.y,F[R--]=I.x,F[B++]=P.x,F[B++]=P.y,F[B++]=P.z),x=O.PI_OVER_TWO-(S+1)*b}for(S=y;S>1;--S){if(x=O.PI_OVER_TWO-(S-1)*b,I=fT(-x,r,p,_,l,d,u,h,m,I),P=fT(x+Math.PI,r,p,_,l,d,u,h,m,P),t){for(w[v++]=I.x,w[v++]=I.y,w[v++]=I.z,L=2*(S-1)+2,D=1;D<L-1;++D)M=D/(L-1),U=f.lerp(I,P,M,uU),w[v++]=U.x,w[v++]=U.y,w[v++]=U.z;w[v++]=P.x,w[v++]=P.y,w[v++]=P.z}n&&(F[R--]=I.z,F[R--]=I.y,F[R--]=I.x,F[B++]=P.x,F[B++]=P.y,F[B++]=P.z)}x=O.PI_OVER_TWO,I=fT(-x,r,p,_,l,d,u,h,m,I);const z={};return t&&(w[v++]=I.x,w[v++]=I.y,w[v++]=I.z,z.positions=w,z.numPts=y),n&&(F[R--]=I.z,F[R--]=I.y,F[R--]=I.x,z.outerPositions=F),z};const ep=lU,hT=new f,dU=new f,fU=new f,jne=new f,fs=new V,Wne=new oe,btt=new oe,hU=new bt,qne=new f,Yne=new f,Xne=new f,D1=new Ce,Zne=new f,$ne=new V,Kne=new V;function Qne(e,t,n){const i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,l=t.stRotation,u=n?e.length/3*2:e.length/3,d=t.shadowVolume,h=i.st?new Float32Array(2*u):void 0,m=i.normal?new Float32Array(3*u):void 0,_=i.tangent?new Float32Array(3*u):void 0,p=i.bitangent?new Float32Array(3*u):void 0,y=d?new Float32Array(3*u):void 0;let b=0,x=qne,C=Yne,w=Xne;const v=new Qr(a),I=v.project(a.cartesianToCartographic(o,D1),Zne),P=a.scaleToGeodeticSurface(o,hT);a.geodeticSurfaceNormal(P,P);let N=Wne,R=btt;if(0!==l){let U=bt.fromAxisAngle(P,l,hU);N=oe.fromQuaternion(U,N),U=bt.fromAxisAngle(P,-l,hU),R=oe.fromQuaternion(U,R)}else N=oe.clone(oe.IDENTITY,N),R=oe.clone(oe.IDENTITY,R);const B=V.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,$ne),F=V.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Kne);let S=e.length;const D=n?S:0,L=D/3*2;for(let U=0;U<S;U+=3){const z=U+1,G=U+2,W=f.fromArray(e,U,hT);if(i.st){const q=oe.multiplyByVector(N,W,dU),j=v.project(a.cartesianToCartographic(q,D1),fU);f.subtract(j,I,j),fs.x=(j.x+r)/(2*r),fs.y=(j.y+s)/(2*s),B.x=Math.min(fs.x,B.x),B.y=Math.min(fs.y,B.y),F.x=Math.max(fs.x,F.x),F.y=Math.max(fs.y,F.y),n&&(h[b+L]=fs.x,h[b+1+L]=fs.y),h[b++]=fs.x,h[b++]=fs.y}(i.normal||i.tangent||i.bitangent||d)&&(x=a.geodeticSurfaceNormal(W,x),d&&(y[U+D]=-x.x,y[z+D]=-x.y,y[G+D]=-x.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(C=f.normalize(f.cross(f.UNIT_Z,x,C),C),oe.multiplyByVector(R,C,C)),i.normal&&(m[U]=x.x,m[z]=x.y,m[G]=x.z,n&&(m[U+D]=-x.x,m[z+D]=-x.y,m[G+D]=-x.z)),i.tangent&&(_[U]=C.x,_[z]=C.y,_[G]=C.z,n&&(_[U+D]=-C.x,_[z+D]=-C.y,_[G+D]=-C.z)),i.bitangent&&(w=f.normalize(f.cross(x,C,w),w),p[U]=w.x,p[z]=w.y,p[G]=w.z,n&&(p[U+D]=w.x,p[z+D]=w.y,p[G+D]=w.z))))}if(i.st){S=h.length;for(let U=0;U<S;U+=2)h[U]=(h[U]-B.x)/(F.x-B.x),h[U+1]=(h[U+1]-B.y)/(F.y-B.y)}const M=new co;if(i.position){const U=ep.raisePositionsToHeight(e,t,n);M.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:U})}if(i.st&&(M.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:h})),i.normal&&(M.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:m})),i.tangent&&(M.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:_})),i.bitangent&&(M.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:p})),d&&(M.extrudeDirection=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:y})),n&&c(t.offsetAttribute)){let U=new Uint8Array(u);U=t.offsetAttribute===Xn.TOP?U.fill(1,0,u/2):U.fill(t.offsetAttribute===Xn.NONE?0:1),M.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:U})}return M}function Jne(e){const t=new Array(e*(e+1)*12-6);let i,o,r,s,a,n=0;for(i=0,r=1,s=0;s<3;s++)t[n++]=r++,t[n++]=i,t[n++]=r;for(s=2;s<e+1;++s){for(r=s*(s+1)-1,i=(s-1)*s-1,t[n++]=r++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=r++,t[n++]=i,t[n++]=r}for(o=2*e,++r,++i,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;for(t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i++,t[n++]=i,++i,s=e-1;s>1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=i++,t[n++]=i++,t[n++]=r++}for(s=0;s<3;s++)t[n++]=i++,t[n++]=i,t[n++]=r;return t}let my=new f;const P1=new Ae,O1=new Ae;function eie(e,t,n,i,o,r,s){const l=ep.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,u=l.length/3,d=new Array(u);for(let m=0;m<u;++m)d[m]=f.fromArray(l,3*m);const h=Te.fromCartesianArray(d,r,s);return h.width>O.PI&&(h.north=h.north>0?O.PI_OVER_TWO-O.EPSILON7:h.north,h.south=h.south<0?O.EPSILON7-O.PI_OVER_TWO:h.south,h.east=O.PI,h.west=-O.PI),h}function vf(e){const t=(e=g(e,g.EMPTY_OBJECT)).center,n=g(e.ellipsoid,he.default),i=e.semiMajorAxis,o=e.semiMinorAxis,r=g(e.granularity,O.RADIANS_PER_DEGREE),s=g(e.vertexFormat,et.DEFAULT);if(A.defined("options.center",t),A.typeOf.number("options.semiMajorAxis",i),A.typeOf.number("options.semiMinorAxis",o),i<o)throw new E("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new E("granularity must be greater than zero.");const a=g(e.height,0),l=g(e.extrudedHeight,a);this._center=f.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=he.clone(n),this._rotation=g(e.rotation,0),this._stRotation=g(e.stRotation,0),this._height=Math.max(l,a),this._granularity=r,this._vertexFormat=et.clone(s),this._extrudedHeight=Math.min(l,a),this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}vf.packedLength=f.packedLength+he.packedLength+et.packedLength+9,vf.pack=function(e,t,n){return A.defined("value",e),A.defined("array",t),n=g(n,0),f.pack(e._center,t,n),he.pack(e._ellipsoid,t,n+=f.packedLength),et.pack(e._vertexFormat,t,n+=he.packedLength),n+=et.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]=g(e._offsetAttribute,-1),t};const tie=new f,nie=new he,iie=new et,If={center:tie,ellipsoid:nie,vertexFormat:iie,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};vf.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=f.unpack(e,t,tie),o=he.unpack(e,t+=f.packedLength,nie),r=et.unpack(e,t+=he.packedLength,iie);t+=et.packedLength;const s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t++],m=e[t++],_=1===e[t++],p=e[t];return c(n)?(n._center=f.clone(i,n._center),n._ellipsoid=he.clone(o,n._ellipsoid),n._vertexFormat=et.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=l,n._stRotation=u,n._height=d,n._granularity=h,n._extrudedHeight=m,n._shadowVolume=_,n._offsetAttribute=-1===p?void 0:p,n):(If.height=d,If.extrudedHeight=m,If.granularity=h,If.stRotation=u,If.rotation=l,If.semiMajorAxis=s,If.semiMinorAxis=a,If.shadowVolume=_,If.offsetAttribute=-1===p?void 0:p,new vf(If))},vf.computeRectangle=function(e,t){const n=(e=g(e,g.EMPTY_OBJECT)).center,i=g(e.ellipsoid,he.default),o=e.semiMajorAxis,r=e.semiMinorAxis,s=g(e.granularity,O.RADIANS_PER_DEGREE),a=g(e.rotation,0);if(A.defined("options.center",n),A.typeOf.number("options.semiMajorAxis",o),A.typeOf.number("options.semiMinorAxis",r),o<r)throw new E("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(s<=0)throw new E("granularity must be greater than zero.");return eie(n,o,r,a,s,i,t)},vf.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;const t=e._height,n=e._extrudedHeight,i=!O.equalsEpsilon(t,n,0,O.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);const 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};let r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=function Ctt(e){const t=e.center,n=e.ellipsoid,i=e.semiMajorAxis;let o=f.multiplyByScalar(n.geodeticSurfaceNormal(t,hT),e.height,hT);P1.center=f.add(t,o,P1.center),P1.radius=i,o=f.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),O1.center=f.add(t,o,O1.center),O1.radius=i;const r=ep.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,l=r.outerPositions,u=Ae.union(P1,O1),d=Qne(s,e,!0);let h=Jne(a);const m=h.length;h.length=2*m;const _=s.length/3;for(let v=0;v<m;v+=3)h[v+m]=h[v+2]+_,h[v+1+m]=h[v+1]+_,h[v+2+m]=h[v]+_;const p=Ot.createTypedArray(2*_/3,h),y=new En({attributes:d,indices:p,primitiveType:Tt.TRIANGLES}),b=function Att(e,t){const n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,s=t.ellipsoid,a=t.height,l=t.extrudedHeight,u=t.stRotation,d=e.length/3*2,h=new Float64Array(3*d),m=n.st?new Float32Array(2*d):void 0,_=n.normal?new Float32Array(3*d):void 0,p=n.tangent?new Float32Array(3*d):void 0,y=n.bitangent?new Float32Array(3*d):void 0,b=t.shadowVolume,x=b?new Float32Array(3*d):void 0;let C=0,w=qne,v=Yne,I=Xne;const P=new Qr(s),N=P.project(s.cartesianToCartographic(i,D1),Zne),R=s.scaleToGeodeticSurface(i,hT);s.geodeticSurfaceNormal(R,R);const B=bt.fromAxisAngle(R,u,hU),F=oe.fromQuaternion(B,Wne),S=V.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,$ne),D=V.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Kne);let L=e.length;const M=L/3*2;for(let z=0;z<L;z+=3){const G=z+1,W=z+2;let j,q=f.fromArray(e,z,hT);if(n.st){const Y=oe.multiplyByVector(F,q,dU),ne=P.project(s.cartesianToCartographic(Y,D1),fU);f.subtract(ne,N,ne),fs.x=(ne.x+o)/(2*o),fs.y=(ne.y+r)/(2*r),S.x=Math.min(fs.x,S.x),S.y=Math.min(fs.y,S.y),D.x=Math.max(fs.x,D.x),D.y=Math.max(fs.y,D.y),m[C+M]=fs.x,m[C+1+M]=fs.y,m[C++]=fs.x,m[C++]=fs.y}q=s.scaleToGeodeticSurface(q,q),j=f.clone(q,dU),w=s.geodeticSurfaceNormal(q,w),b&&(x[z+L]=-w.x,x[G+L]=-w.y,x[W+L]=-w.z);let Q=f.multiplyByScalar(w,a,jne);if(q=f.add(q,Q,q),Q=f.multiplyByScalar(w,l,Q),j=f.add(j,Q,j),n.position&&(h[z+L]=j.x,h[G+L]=j.y,h[W+L]=j.z,h[z]=q.x,h[G]=q.y,h[W]=q.z),n.normal||n.tangent||n.bitangent){I=f.clone(w,I);const Y=f.fromArray(e,(z+3)%L,jne);f.subtract(Y,q,Y);const ne=f.subtract(j,q,fU);w=f.normalize(f.cross(ne,Y,w),w),n.normal&&(_[z]=w.x,_[G]=w.y,_[W]=w.z,_[z+L]=w.x,_[G+L]=w.y,_[W+L]=w.z),n.tangent&&(v=f.normalize(f.cross(I,w,v),v),p[z]=v.x,p[G]=v.y,p[W]=v.z,p[z+L]=v.x,p[z+1+L]=v.y,p[z+2+L]=v.z),n.bitangent&&(y[z]=I.x,y[G]=I.y,y[W]=I.z,y[z+L]=I.x,y[G+L]=I.y,y[W+L]=I.z)}}if(n.st){L=m.length;for(let z=0;z<L;z+=2)m[z]=(m[z]-S.x)/(D.x-S.x),m[z+1]=(m[z+1]-S.y)/(D.y-S.y)}const U=new co;if(n.position&&(U.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:h})),n.st&&(U.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:m})),n.normal&&(U.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:_})),n.tangent&&(U.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:p})),n.bitangent&&(U.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:y})),b&&(U.extrudeDirection=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:x})),c(t.offsetAttribute)){let z=new Uint8Array(d);z=t.offsetAttribute===Xn.TOP?z.fill(1,0,d/2):z.fill(t.offsetAttribute===Xn.NONE?0:1),U.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return U}(l,e);h=function xtt(e){const t=e.length/3,n=Ot.createTypedArray(t,6*t);let i=0;for(let o=0;o<t;o++){const s=o+t,a=(o+1)%t,l=a+t;n[i++]=o,n[i++]=s,n[i++]=a,n[i++]=a,n[i++]=s,n[i++]=l}return n}(l);const x=Ot.createTypedArray(2*l.length/3,h),C=new En({attributes:b,indices:x,primitiveType:Tt.TRIANGLES}),w=ao.combineInstances([new zn({geometry:y}),new zn({geometry:C})]);return{boundingSphere:u,attributes:w[0].attributes,indices:w[0].indices}}(o);else if(r=function Ttt(e){const t=e.center;my=f.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,my),e.height,my),my=f.add(t,my,my);const n=new Ae(my,e.semiMajorAxis),i=ep.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=Qne(o,e,!1);let a=Jne(r);return a=Ot.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}(o),c(e._offsetAttribute)){const a=e._offsetAttribute===Xn.NONE?0:1,l=new Uint8Array(r.attributes.position.values.length/3).fill(a);r.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:l})}return new En({attributes:r.attributes,indices:r.indices,primitiveType:Tt.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})},vf.createShadowVolume=function(e,t,n){const i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new vf({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:et.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(vf.prototype,{rectangle:{get:function(){return c(this._rectangle)||(this._rectangle=eie(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return c(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function Ett(e){const t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];const i=ep.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 l=0;l<o;++l)r[l]=f.fromArray(i,3*l);return En._textureCoordinateRotationPoints(r,t,e._ellipsoid,e.rectangle)}(this)),this._textureCoordinateRotationPoints}}});const pU=vf,oie=new f;let _y=new f;const R1=new Ae,L1=new Ae;function pT(e){const t=(e=g(e,g.EMPTY_OBJECT)).center,n=g(e.ellipsoid,he.default),i=e.semiMajorAxis,o=e.semiMinorAxis,r=g(e.granularity,O.RADIANS_PER_DEGREE);if(!c(t))throw new E("center is required.");if(!c(i))throw new E("semiMajorAxis is required.");if(!c(o))throw new E("semiMinorAxis is required.");if(i<o)throw new E("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new E("granularity must be greater than zero.");const s=g(e.height,0),a=g(e.extrudedHeight,s);this._center=f.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=he.clone(n),this._rotation=g(e.rotation,0),this._height=Math.max(a,s),this._granularity=r,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(g(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}pT.packedLength=f.packedLength+he.packedLength+8,pT.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");return n=g(n,0),f.pack(e._center,t,n),he.pack(e._ellipsoid,t,n+=f.packedLength),n+=he.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=g(e._offsetAttribute,-1),t};const rie=new f,sie=new he,tp={center:rie,ellipsoid:sie,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};pT.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);const i=f.unpack(e,t,rie),o=he.unpack(e,t+=f.packedLength,sie);t+=he.packedLength;const r=e[t++],s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=e[t++],m=e[t];return c(n)?(n._center=f.clone(i,n._center),n._ellipsoid=he.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=s,n._rotation=a,n._height=l,n._granularity=u,n._extrudedHeight=d,n._numberOfVerticalLines=h,n._offsetAttribute=-1===m?void 0:m,n):(tp.height=l,tp.extrudedHeight=d,tp.granularity=u,tp.rotation=a,tp.semiMajorAxis=r,tp.semiMinorAxis=s,tp.numberOfVerticalLines=h,tp.offsetAttribute=-1===m?void 0:m,new pT(tp))},pT.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;const t=e._height,n=e._extrudedHeight,i=!O.equalsEpsilon(t,n,0,O.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);const o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines};let r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=function Stt(e){const t=e.center,n=e.ellipsoid,i=e.semiMajorAxis;let o=f.multiplyByScalar(n.geodeticSurfaceNormal(t,oie),e.height,oie);R1.center=f.add(t,o,R1.center),R1.radius=i,o=f.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),L1.center=f.add(t,o,L1.center),L1.radius=i;let r=ep.computeEllipsePositions(e,!1,!0).outerPositions;const s=new co({position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:ep.raisePositionsToHeight(r,e,!0)})});r=s.position.values;const a=Ae.union(R1,L1);let l=r.length/3;if(c(e.offsetAttribute)){let p=new Uint8Array(l);p=e.offsetAttribute===Xn.TOP?p.fill(1,0,l/2):p.fill(e.offsetAttribute===Xn.NONE?0:1),s.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}let u=g(e.numberOfVerticalLines,16);u=O.clamp(u,0,l/2);const d=Ot.createTypedArray(l,2*l+2*u);l/=2;let m,_,h=0;for(m=0;m<l;++m)d[h++]=m,d[h++]=(m+1)%l,d[h++]=m+l,d[h++]=(m+1)%l+l;if(u>0){const p=Math.min(u,l);_=Math.round(l/p);const y=Math.min(_*u,l);for(m=0;m<y;m+=_)d[h++]=m,d[h++]=m+l}return{boundingSphere:a,attributes:s,indices:d}}(o);else if(r=function wtt(e){const t=e.center;_y=f.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,_y),e.height,_y),_y=f.add(t,_y,_y);const n=new Ae(_y,e.semiMajorAxis),i=ep.computeEllipsePositions(e,!1,!0).outerPositions,o=new co({position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:ep.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Ot.createTypedArray(r,2*r);let a=0;for(let l=0;l<r;++l)s[a++]=l,s[a++]=(l+1)%r;return{boundingSphere:n,attributes:o,indices:s}}(o),c(e._offsetAttribute)){const a=e._offsetAttribute===Xn.NONE?0:1,l=new Uint8Array(r.attributes.position.values.length/3).fill(a);r.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:l})}return new En({attributes:r.attributes,indices:r.indices,primitiveType:Tt.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};const vtt=pT,aie=new Z,cie=f.ZERO,lie=new f,uie=new Te;function Itt(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function Cd(e,t){ui.call(this,{entity:e,scene:t,geometryOptions:new Itt(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function mT(e,t,n){go.call(this,e,t,n)}c(Object.create)&&((Cd.prototype=Object.create(ui.prototype)).constructor=Cd),Cd.prototype.createFillGeometryInstance=function(e){if(A.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i={show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:_o.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof kn){let o;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,aie)),c(o)||(o=Z.WHITE),i.color=ei.fromColor(o)}return c(this._options.offsetAttribute)&&(i.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,cie,lie))),new zn({id:t,geometry:new pU(this._options),attributes:i})},Cd.prototype.createOutlineGeometryInstance=function(e){if(A.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,Z.BLACK,aie),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ei.fromColor(i),distanceDisplayCondition:_o.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,cie,lie))),new zn({id:t,geometry:new vtt(this._options),attributes:r})},Cd.prototype._computeCenter=function(e,t){return te.getValueOrUndefined(this._entity.position,e,t)},Cd.prototype._isHidden=function(e,t){return!c(e.position)||!c(t.semiMajorAxis)||!c(t.semiMinorAxis)||No.prototype._isHidden.call(this,e,t)},Cd.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!te.isConstant(t.rotation)||!te.isConstant(t.height)||!te.isConstant(t.extrudedHeight)||!te.isConstant(t.granularity)||!te.isConstant(t.stRotation)||!te.isConstant(t.outlineWidth)||!te.isConstant(t.numberOfVerticalLines)||!te.isConstant(t.zIndex)||this._onTerrain&&!te.isConstant(this._materialProperty)&&!(this._materialProperty instanceof kn)},Cd.prototype._setStaticOptions=function(e,t){let n=te.getValueOrUndefined(t.height,It.MINIMUM_VALUE);const i=te.getValueOrDefault(t.heightReference,It.MINIMUM_VALUE,tn.NONE);let o=te.getValueOrUndefined(t.extrudedHeight,It.MINIMUM_VALUE);const r=te.getValueOrDefault(t.extrudedHeightReference,It.MINIMUM_VALUE,tn.NONE);c(o)&&!c(n)&&(n=0);const s=this._options;s.vertexFormat=this._materialProperty instanceof kn?gi.VERTEX_FORMAT:ca.MaterialSupport.TEXTURED.vertexFormat,s.center=e.position.getValue(It.MINIMUM_VALUE,s.center),s.semiMajorAxis=t.semiMajorAxis.getValue(It.MINIMUM_VALUE,s.semiMajorAxis),s.semiMinorAxis=t.semiMinorAxis.getValue(It.MINIMUM_VALUE,s.semiMinorAxis),s.rotation=te.getValueOrUndefined(t.rotation,It.MINIMUM_VALUE),s.granularity=te.getValueOrUndefined(t.granularity,It.MINIMUM_VALUE),s.stRotation=te.getValueOrUndefined(t.stRotation,It.MINIMUM_VALUE),s.numberOfVerticalLines=te.getValueOrUndefined(t.numberOfVerticalLines,It.MINIMUM_VALUE),s.offsetAttribute=ui.computeGeometryOffsetAttribute(n,i,o,r),s.height=ui.getGeometryHeight(n,i),o=ui.getGeometryExtrudedHeight(o,r),o===ui.CLAMP_TO_GROUND&&(o=vo.getMinimumMaximumHeights(pU.computeRectangle(s,uie)).minimumTerrainHeight),s.extrudedHeight=o},Cd.DynamicGeometryUpdater=mT,c(Object.create)&&((mT.prototype=Object.create(go.prototype)).constructor=mT),mT.prototype._isHidden=function(e,t,n){const i=this._options;return!c(i.center)||!c(i.semiMajorAxis)||!c(i.semiMinorAxis)||go.prototype._isHidden.call(this,e,t,n)},mT.prototype._setOptions=function(e,t,n){const i=this._options;let o=te.getValueOrUndefined(t.height,n);const r=te.getValueOrDefault(t.heightReference,n,tn.NONE);let s=te.getValueOrUndefined(t.extrudedHeight,n);const a=te.getValueOrDefault(t.extrudedHeightReference,n,tn.NONE);c(s)&&!c(o)&&(o=0),i.center=te.getValueOrUndefined(e.position,n,i.center),i.semiMajorAxis=te.getValueOrUndefined(t.semiMajorAxis,n),i.semiMinorAxis=te.getValueOrUndefined(t.semiMinorAxis,n),i.rotation=te.getValueOrUndefined(t.rotation,n),i.granularity=te.getValueOrUndefined(t.granularity,n),i.stRotation=te.getValueOrUndefined(t.stRotation,n),i.numberOfVerticalLines=te.getValueOrUndefined(t.numberOfVerticalLines,n),i.offsetAttribute=ui.computeGeometryOffsetAttribute(o,r,s,a),i.height=ui.getGeometryHeight(o,r),s=ui.getGeometryExtrudedHeight(s,a),s===ui.CLAMP_TO_GROUND&&(s=vo.getMinimumMaximumHeights(pU.computeRectangle(i,uie)).minimumTerrainHeight),i.extrudedHeight=s};const Dtt=Cd,Ptt=new kn(Z.WHITE),mU=f.ZERO,_U=new f,Ott=new f,Rtt=new f,gU=new Z,Ltt=new f(1,1,1);function Ntt(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function Il(e,t){No.call(this,{entity:e,scene:t,geometryOptions:new Ntt(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function EE(e,t,n){go.call(this,e,t,n),this._scene=e._scene,this._modelMatrix=new k,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new f,this._material={}}c(Object.create)&&((Il.prototype=Object.create(No.prototype)).constructor=Il),Object.defineProperties(Il.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),Il.prototype.createFillGeometryInstance=function(e,t,n){A.defined("time",e);const i=this._entity,o=i.isAvailable(e);let r;const s=new Pi(o&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),u={show:s,distanceDisplayCondition:_o.fromDistanceDisplayCondition(a),color:void 0,offset:void 0};if(this._materialProperty instanceof kn){let d;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||o)&&(d=this._materialProperty.color.getValue(e,gU)),c(d)||(d=Z.WHITE),r=ei.fromColor(d),u.color=r}return c(this._options.offsetAttribute)&&(u.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,mU,_U))),new zn({id:i,geometry:new UC(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.ellipsoid,n),attributes:u})},Il.prototype.createOutlineGeometryInstance=function(e,t,n){A.defined("time",e);const i=this._entity,o=i.isAvailable(e),r=te.getValueOrDefault(this._outlineColorProperty,e,Z.BLACK,gU),s=this._distanceDisplayConditionProperty.getValue(e),a={show:new Pi(o&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ei.fromColor(r),distanceDisplayCondition:_o.fromDistanceDisplayCondition(s),offset:void 0};return c(this._options.offsetAttribute)&&(a.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,mU,_U))),new zn({id:i,geometry:new nm(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.ellipsoid,n),attributes:a})},Il.prototype._computeCenter=function(e,t){return te.getValueOrUndefined(this._entity.position,e,t)},Il.prototype._isHidden=function(e,t){return!c(e.position)||!c(t.radii)||No.prototype._isHidden.call(this,e,t)},Il.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&te.isConstant(e.orientation)&&t.radii.isConstant&&te.isConstant(t.innerRadii)&&te.isConstant(t.stackPartitions)&&te.isConstant(t.slicePartitions)&&te.isConstant(t.outlineWidth)&&te.isConstant(t.minimumClock)&&te.isConstant(t.maximumClock)&&te.isConstant(t.minimumCone)&&te.isConstant(t.maximumCone)&&te.isConstant(t.subdivisions))},Il.prototype._setStaticOptions=function(e,t){const n=te.getValueOrDefault(t.heightReference,It.MINIMUM_VALUE,tn.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof kn?gi.VERTEX_FORMAT:ca.MaterialSupport.TEXTURED.vertexFormat,i.radii=t.radii.getValue(It.MINIMUM_VALUE,i.radii),i.innerRadii=te.getValueOrUndefined(t.innerRadii,i.radii),i.minimumClock=te.getValueOrUndefined(t.minimumClock,It.MINIMUM_VALUE),i.maximumClock=te.getValueOrUndefined(t.maximumClock,It.MINIMUM_VALUE),i.minimumCone=te.getValueOrUndefined(t.minimumCone,It.MINIMUM_VALUE),i.maximumCone=te.getValueOrUndefined(t.maximumCone,It.MINIMUM_VALUE),i.stackPartitions=te.getValueOrUndefined(t.stackPartitions,It.MINIMUM_VALUE),i.slicePartitions=te.getValueOrUndefined(t.slicePartitions,It.MINIMUM_VALUE),i.subdivisions=te.getValueOrUndefined(t.subdivisions,It.MINIMUM_VALUE),i.offsetAttribute=n!==tn.NONE?Xn.ALL:void 0},Il.prototype._onEntityPropertyChanged=Kk,Il.DynamicGeometryUpdater=EE,c(Object.create)&&((EE.prototype=Object.create(go.prototype)).constructor=EE),EE.prototype.update=function(e){A.defined("time",e);const t=this._entity,n=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!te.getValueOrDefault(n.show,e,!0))return c(this._primitive)&&(this._primitive.show=!1),void(c(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));const i=te.getValueOrUndefined(n.radii,e,Ott);let o=c(i)?t.computeModelMatrixForHeightReference(e,n.heightReference,.5*i.z,this._scene.ellipsoid,this._modelMatrix):void 0;if(!c(o)||!c(i))return c(this._primitive)&&(this._primitive.show=!1),void(c(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));const r=te.getValueOrDefault(n.fill,e,!0),s=te.getValueOrDefault(n.outline,e,!1),a=te.getValueOrClonedDefault(n.outlineColor,e,Z.BLACK,gU),l=hc.getValue(e,g(n.material,Ptt),this._material),u=te.getValueOrUndefined(n.innerRadii,e,Rtt),d=te.getValueOrUndefined(n.minimumClock,e),h=te.getValueOrUndefined(n.maximumClock,e),m=te.getValueOrUndefined(n.minimumCone,e),_=te.getValueOrUndefined(n.maximumCone,e),p=te.getValueOrUndefined(n.stackPartitions,e),y=te.getValueOrUndefined(n.slicePartitions,e),b=te.getValueOrUndefined(n.subdivisions,e),x=te.getValueOrDefault(n.outlineWidth,e,1),C=te.getValueOrDefault(n.heightReference,e,tn.NONE),w=C!==tn.NONE?Xn.ALL:void 0,v=this._scene.mode,I=v===ce.SCENE3D&&C===tn.NONE,P=this._options,N=this._geometryUpdater.shadowsProperty.getValue(e),B=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),F=te.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,mU,_U);if(!I||this._lastSceneMode!==v||!c(this._primitive)||P.stackPartitions!==p||P.slicePartitions!==y||c(u)&&!f.equals(P.innerRadii!==u)||P.minimumClock!==d||P.maximumClock!==h||P.minimumCone!==m||P.maximumCone!==_||P.subdivisions!==b||this._lastOutlineWidth!==x||P.offsetAttribute!==w){const D=this._primitives;D.removeAndDestroy(this._primitive),D.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=v,this._lastOutlineWidth=x,P.stackPartitions=p,P.slicePartitions=y,P.subdivisions=b,P.offsetAttribute=w,P.radii=f.clone(I?Ltt:i,P.radii),P.innerRadii=c(u)?I?f.fromElements(u.x/i.x,u.y/i.y,u.z/i.z,P.innerRadii):f.clone(u,P.innerRadii):void 0,P.minimumClock=d,P.maximumClock=h,P.minimumCone=m,P.maximumCone=_;const L=new ca({material:l,translucent:l.isTranslucent(),closed:!0});P.vertexFormat=L.vertexFormat;const M=this._geometryUpdater.createFillGeometryInstance(e,I,this._modelMatrix);this._primitive=D.add(new Yi({geometryInstances:M,appearance:L,asynchronous:!1,shadows:N}));const U=this._geometryUpdater.createOutlineGeometryInstance(e,I,this._modelMatrix);this._outlinePrimitive=D.add(new Yi({geometryInstances:U,appearance:new gi({flat:!0,translucent:255!==U.attributes.color.value[3],renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(x)}}),asynchronous:!1,shadows:N})),this._lastShow=r,this._lastOutlineShow=s,this._lastOutlineColor=Z.clone(a,this._lastOutlineColor),this._lastDistanceDisplayCondition=B,this._lastOffset=f.clone(F,this._lastOffset)}else if(this._primitive.ready){const D=this._primitive,L=this._outlinePrimitive;D.show=!0,L.show=!0,D.appearance.material=l;let M=this._attributes;c(M)||(M=D.getGeometryInstanceAttributes(t),this._attributes=M),r!==this._lastShow&&(M.show=Pi.toValue(r,M.show),this._lastShow=r);let U=this._outlineAttributes;c(U)||(U=L.getGeometryInstanceAttributes(t),this._outlineAttributes=U),s!==this._lastOutlineShow&&(U.show=Pi.toValue(s,U.show),this._lastOutlineShow=s),Z.equals(a,this._lastOutlineColor)||(U.color=ei.toValue(a,U.color),Z.clone(a,this._lastOutlineColor)),Qn.equals(B,this._lastDistanceDisplayCondition)||(M.distanceDisplayCondition=_o.toValue(B,M.distanceDisplayCondition),U.distanceDisplayCondition=_o.toValue(B,U.distanceDisplayCondition),Qn.clone(B,this._lastDistanceDisplayCondition)),f.equals(F,this._lastOffset)||(M.offset=os.toValue(F,M.offset),U.offset=os.toValue(F,M.offset),f.clone(F,this._lastOffset))}I&&(i.x=Math.max(i.x,.001),i.y=Math.max(i.y,.001),i.z=Math.max(i.z,.001),o=k.multiplyByScale(o,i,o),this._primitive.modelMatrix=o,this._outlinePrimitive.modelMatrix=o)};const Mtt=Il;function _T(e){e=g(e,g.EMPTY_OBJECT);const t=g(e.vertexFormat,et.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}_T.packedLength=et.packedLength,_T.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),et.pack(e._vertexFormat,t,n),t};const die=new et,Ftt={vertexFormat:die};_T.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=et.unpack(e,t,die);return c(n)?(n._vertexFormat=et.clone(i,n._vertexFormat),n):new _T(Ftt)};const N1=new f(-.5,-.5,0),M1=new f(.5,.5,0);_T.createGeometry=function(e){const t=e._vertexFormat,n=new co;let i,o;if(t.position){if(o=new Float64Array(12),o[0]=N1.x,o[1]=N1.y,o[2]=0,o[3]=M1.x,o[4]=N1.y,o[5]=0,o[6]=M1.x,o[7]=M1.y,o[8]=0,o[9]=N1.x,o[10]=M1.y,o[11]=0,n.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:o}),t.normal){const r=new Float32Array(12);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=1,r[9]=0,r[10]=0,r[11]=1,n.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:r})}if(t.st){const r=new Float32Array(8);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=1,r[5]=1,r[6]=0,r[7]=1,n.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:r})}if(t.tangent){const r=new Float32Array(12);r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r[6]=1,r[7]=0,r[8]=0,r[9]=1,r[10]=0,r[11]=0,n.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:r})}if(t.bitangent){const r=new Float32Array(12);r[0]=0,r[1]=1,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=1,r[8]=0,r[9]=0,r[10]=1,r[11]=0,n.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:r})}i=new Uint16Array(6),i[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3}return new En({attributes:n,indices:i,primitiveType:Tt.TRIANGLES,boundingSphere:new Ae(f.ZERO,Math.sqrt(2))})};const Btt=_T;function gT(){this._workerName="createPlaneOutlineGeometry"}gT.packedLength=0,gT.pack=function(e,t){return A.defined("value",e),A.defined("array",t),t},gT.unpack=function(e,t,n){return A.defined("array",e),c(n)?n:new gT};const Vm=new f(-.5,-.5,0),F1=new f(.5,.5,0);gT.createGeometry=function(){const e=new co,t=new Uint16Array(8),n=new Float64Array(12);return n[0]=Vm.x,n[1]=Vm.y,n[2]=Vm.z,n[3]=F1.x,n[4]=Vm.y,n[5]=Vm.z,n[6]=F1.x,n[7]=F1.y,n[8]=Vm.z,n[9]=Vm.x,n[10]=F1.y,n[11]=Vm.z,e.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:n}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new En({attributes:e,indices:t,primitiveType:Tt.LINES,boundingSphere:new Ae(f.ZERO,Math.sqrt(2))})};const ktt=gT,Utt=new f,fie=new Z;function ztt(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function Eu(e,t){No.call(this,{entity:e,scene:t,geometryOptions:new ztt(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}function yT(e,t,n){go.call(this,e,t,n)}c(Object.create)&&((Eu.prototype=Object.create(No.prototype)).constructor=Eu),Eu.prototype.createFillGeometryInstance=function(e){if(A.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e);let i,o;const r=new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=_o.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof kn){let _;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(_=this._materialProperty.color.getValue(e,fie)),c(_)||(_=Z.WHITE),o=ei.fromColor(_),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};const l=t.plane,u=this._options;let d=t.computeModelMatrix(e);const h=te.getValueOrDefault(l.plane,e,u.plane),m=te.getValueOrUndefined(l.dimensions,e,u.dimensions);return u.plane=h,u.dimensions=m,d=yU(h,m,d,d),new zn({id:t,geometry:new Btt(this._options),modelMatrix:d,attributes:i})},Eu.prototype.createOutlineGeometryInstance=function(e){if(A.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,Z.BLACK,fie),o=this._distanceDisplayConditionProperty.getValue(e),r=t.plane,s=this._options;let a=t.computeModelMatrix(e);const l=te.getValueOrDefault(r.plane,e,s.plane),u=te.getValueOrUndefined(r.dimensions,e,s.dimensions);return s.plane=l,s.dimensions=u,a=yU(l,u,a,a),new zn({id:t,geometry:new ktt,modelMatrix:a,attributes:{show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ei.fromColor(i),distanceDisplayCondition:_o.fromDistanceDisplayCondition(o)}})},Eu.prototype._isHidden=function(e,t){return!c(t.plane)||!c(t.dimensions)||!c(e.position)||No.prototype._isHidden.call(this,e,t)},Eu.prototype._getIsClosed=function(e){return!1},Eu.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&te.isConstant(e.orientation)&&t.plane.isConstant&&t.dimensions.isConstant&&te.isConstant(t.outlineWidth))},Eu.prototype._setStaticOptions=function(e,t){const i=this._options;i.vertexFormat=this._materialProperty instanceof kn?gi.VERTEX_FORMAT:ca.MaterialSupport.TEXTURED.vertexFormat,i.plane=t.plane.getValue(It.MINIMUM_VALUE,i.plane),i.dimensions=t.dimensions.getValue(It.MINIMUM_VALUE,i.dimensions)},Eu.DynamicGeometryUpdater=yT,c(Object.create)&&((yT.prototype=Object.create(go.prototype)).constructor=yT),yT.prototype._isHidden=function(e,t,n){const i=this._options,o=te.getValueOrUndefined(e.position,n,Utt);return!c(o)||!c(i.plane)||!c(i.dimensions)||go.prototype._isHidden.call(this,e,t,n)},yT.prototype._setOptions=function(e,t,n){const i=this._options;i.plane=te.getValueOrDefault(t.plane,n,i.plane),i.dimensions=te.getValueOrUndefined(t.dimensions,n,i.dimensions)};const Vtt=new f,Htt=new f,Gtt=new f,jtt=new f,Wtt=new oe,qtt=new oe,Ytt=new k;function yU(e,t,n,i){const o=e.normal,s=f.multiplyByScalar(o,-e.distance,Gtt);let a=f.clone(f.UNIT_Z,Htt);O.equalsEpsilon(Math.abs(f.dot(a,o)),1,O.EPSILON8)&&(a=f.clone(f.UNIT_Y,a));const l=f.cross(a,o,Vtt);a=f.cross(o,l,a),f.normalize(l,l),f.normalize(a,a);const u=Wtt;oe.setColumn(u,0,l,u),oe.setColumn(u,1,a,u),oe.setColumn(u,2,o,u);const d=f.fromElements(t.x,t.y,1,jtt),h=oe.multiplyByScale(u,d,qtt),m=k.fromRotationTranslation(h,s,Ytt);return k.multiplyTransformation(n,m,i)}Eu.createPrimitiveMatrix=yU;const Xtt=Eu,Ztt=new f,$tt=new Vt,Ktt=new V,Qtt=new V,Jtt=new f,ent=new f,tnt=new f,wE=new f,nnt=new f,int=new f,hie=new bt,ont=new oe,rnt=new oe,snt=new f;function ant(e,t,n,i,o,r,s,a,l){const u=e.positions;let d=po.triangulate(e.positions2D,e.holes);d.length<3&&(d=[0,1,2]);const h=Ot.createTypedArray(u.length,d.length);h.set(d);let m=ont;if(0!==i){let S=bt.fromAxisAngle(s,i,hie);if(m=oe.fromQuaternion(S,m),t.tangent||t.bitangent){S=bt.fromAxisAngle(s,-i,hie);const D=oe.fromQuaternion(S,rnt);a=f.normalize(oe.multiplyByVector(D,a,a),a),t.bitangent&&(l=f.normalize(f.cross(s,a,l),l))}}else m=oe.clone(oe.IDENTITY,m);const _=Qtt;t.st&&(_.x=n.x,_.y=n.y);const p=u.length,y=3*p,b=new Float64Array(y),x=t.normal?new Float32Array(y):void 0,C=t.tangent?new Float32Array(y):void 0,w=t.bitangent?new Float32Array(y):void 0,v=t.st?new Float32Array(2*p):void 0;let I=0,P=0,N=0,R=0,B=0;for(let S=0;S<p;S++){const D=u[S];if(b[I++]=D.x,b[I++]=D.y,b[I++]=D.z,t.st)if(c(o)&&o.positions.length===p)v[B++]=o.positions[S].x,v[B++]=o.positions[S].y;else{const M=r(oe.multiplyByVector(m,D,Ztt),Ktt);V.subtract(M,_,M);const U=O.clamp(M.x/n.width,0,1),z=O.clamp(M.y/n.height,0,1);v[B++]=U,v[B++]=z}t.normal&&(x[P++]=s.x,x[P++]=s.y,x[P++]=s.z),t.tangent&&(C[R++]=a.x,C[R++]=a.y,C[R++]=a.z),t.bitangent&&(w[N++]=l.x,w[N++]=l.y,w[N++]=l.z)}const F=new co;return t.position&&(F.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:b})),t.normal&&(F.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:x})),t.tangent&&(F.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:C})),t.bitangent&&(F.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:w})),t.st&&(F.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:v})),new En({attributes:F,indices:h,primitiveType:Tt.TRIANGLES})}function gy(e){const t=(e=g(e,g.EMPTY_OBJECT)).polygonHierarchy,n=e.textureCoordinates;A.defined("options.polygonHierarchy",t);const i=g(e.vertexFormat,et.DEFAULT);this._vertexFormat=et.clone(i),this._polygonHierarchy=t,this._stRotation=g(e.stRotation,0),this._ellipsoid=he.clone(g(e.ellipsoid,he.default)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=si.computeHierarchyPackedLength(t,f)+et.packedLength+he.packedLength+(c(n)?si.computeHierarchyPackedLength(n,V):1)+2}gy.fromPositions=function(e){return e=g(e,g.EMPTY_OBJECT),A.defined("options.positions",e.positions),new gy({polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates})},gy.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),n=si.packPolygonHierarchy(e._polygonHierarchy,t,n,f),he.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=he.packedLength),n+=et.packedLength,t[n++]=e._stRotation,c(e._textureCoordinates)?n=si.packPolygonHierarchy(e._textureCoordinates,t,n,V):t[n++]=-1,t[n++]=e.packedLength,t};const cnt=he.clone(he.UNIT_SPHERE),lnt=new et,unt={polygonHierarchy:{}};gy.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=si.unpackPolygonHierarchy(e,t,f);t=i.startingIndex,delete i.startingIndex;const o=he.unpack(e,t,cnt),r=et.unpack(e,t+=he.packedLength,lnt);t+=et.packedLength;const s=e[t++],a=-1===e[t]?void 0:si.unpackPolygonHierarchy(e,t,V);c(a)?(t=a.startingIndex,delete a.startingIndex):t++;const l=e[t++];return c(n)||(n=new gy(unt)),n._polygonHierarchy=i,n._ellipsoid=he.clone(o,n._ellipsoid),n._vertexFormat=et.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=l,n},gy.createGeometry=function(e){const t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=c(o);let s=n.positions;if(s=Ea(s,f.equalsEpsilon,!0),s.length<3)return;let a=Jtt,l=ent,u=tnt,d=nnt;const h=int;if(!Ov.computeProjectTo2DArguments(s,wE,d,h))return;if(a=f.cross(d,h,a),a=f.normalize(a,a),!f.equalsEpsilon(wE,f.ZERO,O.EPSILON6)){const B=e._ellipsoid.geodeticSurfaceNormal(wE,snt);f.dot(a,B)<0&&(a=f.negate(a,a),d=f.negate(d,d))}const _=Ov.createProjectPointsTo2DFunction(wE,d,h),p=Ov.createProjectPointTo2DFunction(wE,d,h);t.tangent&&(l=f.clone(d,l)),t.bitangent&&(u=f.clone(h,u));const y=si.polygonsFromHierarchy(n,r,_,!1),b=y.hierarchy,x=y.polygons,w=r?si.polygonsFromHierarchy(o,!0,function(B){return B},!1).polygons:void 0;if(0===b.length)return;s=b[0].outerRing;const v=Ae.fromPoints(s),I=si.computeBoundingRectangle(a,p,s,i,$tt),P=[];for(let B=0;B<x.length;B++){const F=new zn({geometry:ant(x[B],t,I,i,r?w[B]:void 0,p,a,l,u)});P.push(F)}const N=ao.combineInstances(P)[0];N.attributes.position.values=new Float64Array(N.attributes.position.values),N.indices=Ot.createTypedArray(N.attributes.position.values.length/3,N.indices);const R=N.attributes;return t.position||delete R.position,new En({attributes:R,indices:N.indices,primitiveType:N.primitiveType,boundingSphere:v})};const dnt=gy,pie=[],B1=[];function fnt(e,t,n,i,o){const s=el.fromPoints(t,e).projectPointsOntoPlane(t,pie);po.computeWindingOrder2D(s)===Bl.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let l,u,d=t.length,h=0;if(i)for(l=new Float64Array(2*d*3),u=0;u<d;u++){const p=t[u],y=t[(u+1)%d];l[h++]=p.x,l[h++]=p.y,l[h++]=p.z,l[h++]=y.x,l[h++]=y.y,l[h++]=y.z}else{let p=0;if(o===ni.GEODESIC)for(u=0;u<d;u++)p+=si.subdivideLineCount(t[u],t[(u+1)%d],n);else if(o===ni.RHUMB)for(u=0;u<d;u++)p+=si.subdivideRhumbLineCount(e,t[u],t[(u+1)%d],n);for(l=new Float64Array(3*p),u=0;u<d;u++){let y;o===ni.GEODESIC?y=si.subdivideLine(t[u],t[(u+1)%d],n,B1):o===ni.RHUMB&&(y=si.subdivideRhumbLine(e,t[u],t[(u+1)%d],n,B1));const b=y.length;for(let x=0;x<b;++x)l[h++]=y[x]}}d=l.length/3;const _=Ot.createTypedArray(d,2*d);for(h=0,u=0;u<d-1;u++)_[h++]=u,_[h++]=u+1;return _[h++]=d-1,_[h++]=0,new zn({geometry:new En({attributes:new co({position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:l})}),indices:_,primitiveType:Tt.LINES})})}function hnt(e,t,n,i,o){const s=el.fromPoints(t,e).projectPointsOntoPlane(t,pie);po.computeWindingOrder2D(s)===Bl.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let l,u,d=t.length;const h=new Array(d);let m=0;if(i)for(l=new Float64Array(2*d*3*2),u=0;u<d;++u){h[u]=m/3;const b=t[u],x=t[(u+1)%d];l[m++]=b.x,l[m++]=b.y,l[m++]=b.z,l[m++]=x.x,l[m++]=x.y,l[m++]=x.z}else{let b=0;if(o===ni.GEODESIC)for(u=0;u<d;u++)b+=si.subdivideLineCount(t[u],t[(u+1)%d],n);else if(o===ni.RHUMB)for(u=0;u<d;u++)b+=si.subdivideRhumbLineCount(e,t[u],t[(u+1)%d],n);for(l=new Float64Array(3*b*2),u=0;u<d;++u){let x;h[u]=m/3,o===ni.GEODESIC?x=si.subdivideLine(t[u],t[(u+1)%d],n,B1):o===ni.RHUMB&&(x=si.subdivideRhumbLine(e,t[u],t[(u+1)%d],n,B1));const C=x.length;for(let w=0;w<C;++w)l[m++]=x[w]}}d=l.length/6;const _=h.length,y=Ot.createTypedArray(d+_,2*(2*d+_));for(m=0,u=0;u<d;++u)y[m++]=u,y[m++]=(u+1)%d,y[m++]=u+d,y[m++]=(u+1)%d+d;for(u=0;u<_;u++){const b=h[u];y[m++]=b,y[m++]=b+d}return new zn({geometry:new En({attributes:new co({position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:l})}),indices:y,primitiveType:Tt.LINES})})}function yy(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&c(e.height))throw new E("Cannot use both options.perPositionHeight and options.height");if(c(e.arcType)&&e.arcType!==ni.GEODESIC&&e.arcType!==ni.RHUMB)throw new E("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");const t=e.polygonHierarchy,n=g(e.ellipsoid,he.default),i=g(e.granularity,O.RADIANS_PER_DEGREE),o=g(e.perPositionHeight,!1),r=o&&c(e.extrudedHeight),s=g(e.arcType,ni.GEODESIC);let a=g(e.height,0),l=g(e.extrudedHeight,a);if(!r){const u=Math.max(a,l);l=Math.min(a,l),a=u}this._ellipsoid=he.clone(n),this._granularity=i,this._height=a,this._extrudedHeight=l,this._arcType=s,this._polygonHierarchy=t,this._perPositionHeight=o,this._perPositionHeightExtrude=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=si.computeHierarchyPackedLength(t,f)+he.packedLength+8}yy.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),n=si.packPolygonHierarchy(e._polygonHierarchy,t,n,f),he.pack(e._ellipsoid,t,n),n+=he.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._arcType,t[n++]=g(e._offsetAttribute,-1),t[n]=e.packedLength,t};const pnt=he.clone(he.UNIT_SPHERE),mnt={polygonHierarchy:{}};yy.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=si.unpackPolygonHierarchy(e,t,f);t=i.startingIndex,delete i.startingIndex;const o=he.unpack(e,t,pnt);t+=he.packedLength;const r=e[t++],s=e[t++],a=e[t++],l=1===e[t++],u=1===e[t++],d=e[t++],h=e[t++],m=e[t];return c(n)||(n=new yy(mnt)),n._polygonHierarchy=i,n._ellipsoid=he.clone(o,n._ellipsoid),n._height=r,n._extrudedHeight=s,n._granularity=a,n._perPositionHeight=u,n._perPositionHeightExtrude=l,n._arcType=d,n._offsetAttribute=-1===h?void 0:h,n.packedLength=m,n},yy.fromPositions=function(e){return e=g(e,g.EMPTY_OBJECT),A.defined("options.positions",e.positions),new yy({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})},yy.createGeometry=function(e){const t=e._ellipsoid,n=e._granularity,o=e._perPositionHeight,r=e._arcType,s=si.polygonOutlinesFromHierarchy(e._polygonHierarchy,!o,t);if(0===s.length)return;let a;const l=[],u=O.chordLength(n,t.maximumRadius),d=e._height,h=e._extrudedHeight;let _,p;if(e._perPositionHeightExtrude||!O.equalsEpsilon(d,h,0,O.EPSILON2))for(p=0;p<s.length;p++){if(a=hnt(t,s[p],u,o,r),a.geometry=si.scaleToGeodeticHeightExtruded(a.geometry,d,h,t,o),c(e._offsetAttribute)){const x=a.geometry.attributes.position.values.length/3;let C=new Uint8Array(x);e._offsetAttribute===Xn.TOP?C=C.fill(1,0,x/2):(_=e._offsetAttribute===Xn.NONE?0:1,C=C.fill(_)),a.geometry.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}l.push(a)}else for(p=0;p<s.length;p++){if(a=fnt(t,s[p],u,o,r),a.geometry.attributes.position.values=po.scaleToGeodeticHeight(a.geometry.attributes.position.values,d,t,!o),c(e._offsetAttribute)){_=e._offsetAttribute===Xn.NONE?0:1;const C=new Uint8Array(a.geometry.attributes.position.values.length/3).fill(_);a.geometry.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}l.push(a)}const y=ao.combineInstances(l)[0],b=Ae.fromVertices(y.attributes.position.values);return new En({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:b,offsetAttribute:e._offsetAttribute})};const _nt=yy,mie="Entity polygons cannot have both height and perPositionHeight. height will be ignored",_ie="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",gie=new Z,yie=f.ZERO,bie=new f,Tie=new Te,gnt=[],ynt=new V;function bnt(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.textureCoordinates=void 0}function Dl(e,t){ui.call(this,{entity:e,scene:t,geometryOptions:new bnt(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function bT(e,t,n){go.call(this,e,t,n)}c(Object.create)&&((Dl.prototype=Object.create(ui.prototype)).constructor=Dl),Dl.prototype.createFillGeometryInstance=function(e){if(A.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i=this._options,o={show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:_o.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof kn){let s;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,gie)),c(s)||(s=Z.WHITE),o.color=ei.fromColor(s)}let r;return c(i.offsetAttribute)&&(o.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,yie,bie))),r=i.perPositionHeight&&!c(i.extrudedHeight)?new dnt(i):new YS(i),new zn({id:t,geometry:r,attributes:o})},Dl.prototype.createOutlineGeometryInstance=function(e){if(A.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=this._options,o=te.getValueOrDefault(this._outlineColorProperty,e,Z.BLACK,gie),r=this._distanceDisplayConditionProperty.getValue(e),s={show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ei.fromColor(o),distanceDisplayCondition:_o.fromDistanceDisplayCondition(r),offset:void 0};let a;return c(i.offsetAttribute)&&(s.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,yie,bie))),a=i.perPositionHeight&&!c(i.extrudedHeight)?new ag(i):new _nt(i),new zn({id:t,geometry:a,attributes:s})},Dl.prototype._computeCenter=function(e,t){const n=te.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(!c(n))return;const i=n.positions;if(0===i.length)return;const r=el.fromPoints(i,this._scene.ellipsoid),s=r.projectPointsOntoPlane(i,gnt),a=s.length;let l=0,u=a-1,d=new V;for(let m=0;m<a;u=m++){const _=s[m],p=s[u],y=_.x*p.y-p.x*_.y;let b=V.add(_,p,ynt);b=V.multiplyByScalar(b,y,b),d=V.add(d,b,d),l+=y}return d=V.multiplyByScalar(d,1/(3*l),d),r.projectPointOntoEllipsoid(d,t)},Dl.prototype._isHidden=function(e,t){return!c(t.hierarchy)||No.prototype._isHidden.call(this,e,t)},Dl.prototype._isOnTerrain=function(e,t){const n=ui.prototype._isOnTerrain.call(this,e,t),i=t.perPositionHeight,o=c(i)&&(!i.isConstant||i.getValue(It.MINIMUM_VALUE));return n&&!o},Dl.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!te.isConstant(t.height)||!te.isConstant(t.extrudedHeight)||!te.isConstant(t.granularity)||!te.isConstant(t.stRotation)||!te.isConstant(t.textureCoordinates)||!te.isConstant(t.outlineWidth)||!te.isConstant(t.perPositionHeight)||!te.isConstant(t.closeTop)||!te.isConstant(t.closeBottom)||!te.isConstant(t.zIndex)||!te.isConstant(t.arcType)||this._onTerrain&&!te.isConstant(this._materialProperty)&&!(this._materialProperty instanceof kn)},Dl.prototype._setStaticOptions=function(e,t){const i=this._options;i.vertexFormat=this._materialProperty instanceof kn?gi.VERTEX_FORMAT:ca.MaterialSupport.TEXTURED.vertexFormat;const o=t.hierarchy.getValue(It.MINIMUM_VALUE);let r=te.getValueOrUndefined(t.height,It.MINIMUM_VALUE);const s=te.getValueOrDefault(t.heightReference,It.MINIMUM_VALUE,tn.NONE);let a=te.getValueOrUndefined(t.extrudedHeight,It.MINIMUM_VALUE);const l=te.getValueOrDefault(t.extrudedHeightReference,It.MINIMUM_VALUE,tn.NONE),u=te.getValueOrDefault(t.perPositionHeight,It.MINIMUM_VALUE,!1);let d;if(r=ui.getGeometryHeight(r,s),u?(c(r)&&(r=void 0,_n(mie)),s!==tn.NONE&&u&&(r=void 0,_n(_ie))):(c(a)&&!c(r)&&(r=0),d=ui.computeGeometryOffsetAttribute(r,s,a,l)),i.polygonHierarchy=o,i.granularity=te.getValueOrUndefined(t.granularity,It.MINIMUM_VALUE),i.stRotation=te.getValueOrUndefined(t.stRotation,It.MINIMUM_VALUE),i.perPositionHeight=u,i.closeTop=te.getValueOrDefault(t.closeTop,It.MINIMUM_VALUE,!0),i.closeBottom=te.getValueOrDefault(t.closeBottom,It.MINIMUM_VALUE,!0),i.offsetAttribute=d,i.height=r,i.arcType=te.getValueOrDefault(t.arcType,It.MINIMUM_VALUE,ni.GEODESIC),i.textureCoordinates=te.getValueOrUndefined(t.textureCoordinates,It.MINIMUM_VALUE),a=ui.getGeometryExtrudedHeight(a,l),a===ui.CLAMP_TO_GROUND){const h=YS.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,Tie);a=vo.getMinimumMaximumHeights(h).minimumTerrainHeight}i.extrudedHeight=a},Dl.prototype._getIsClosed=function(e){const t=e.height,n=e.extrudedHeight,i=c(n)&&n!==t;return!e.perPositionHeight&&(!i&&0===t||i&&e.closeTop&&e.closeBottom)},Dl.DynamicGeometryUpdater=bT,c(Object.create)&&((bT.prototype=Object.create(go.prototype)).constructor=bT),bT.prototype._isHidden=function(e,t,n){return!c(this._options.polygonHierarchy)||go.prototype._isHidden.call(this,e,t,n)},bT.prototype._setOptions=function(e,t,n){const i=this._options;i.polygonHierarchy=te.getValueOrUndefined(t.hierarchy,n);let o=te.getValueOrUndefined(t.height,n);const r=te.getValueOrDefault(t.heightReference,n,tn.NONE),s=te.getValueOrDefault(t.extrudedHeightReference,n,tn.NONE);let a=te.getValueOrUndefined(t.extrudedHeight,n);const l=te.getValueOrUndefined(t.perPositionHeight,n);let u;if(o=ui.getGeometryHeight(o,s),l?(c(o)&&(o=void 0,_n(mie)),r!==tn.NONE&&l&&(o=void 0,_n(_ie))):(c(a)&&!c(o)&&(o=0),u=ui.computeGeometryOffsetAttribute(o,r,a,s)),i.granularity=te.getValueOrUndefined(t.granularity,n),i.stRotation=te.getValueOrUndefined(t.stRotation,n),i.textureCoordinates=te.getValueOrUndefined(t.textureCoordinates,n),i.perPositionHeight=te.getValueOrUndefined(t.perPositionHeight,n),i.closeTop=te.getValueOrDefault(t.closeTop,n,!0),i.closeBottom=te.getValueOrDefault(t.closeBottom,n,!0),i.offsetAttribute=u,i.height=o,i.arcType=te.getValueOrDefault(t.arcType,n,ni.GEODESIC),a=ui.getGeometryExtrudedHeight(a,s),a===ui.CLAMP_TO_GROUND){const d=YS.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,Tie);a=vo.getMinimumMaximumHeights(d).minimumTerrainHeight}i.extrudedHeight=a};const Tnt=Dl;function SE(e){const t=(e=g(e,g.EMPTY_OBJECT)).polylinePositions,n=e.shapePositions;if(!c(t))throw new E("options.polylinePositions is required.");if(!c(n))throw new E("options.shapePositions is required.");this._positions=t,this._shape=n,this._ellipsoid=he.clone(g(e.ellipsoid,he.default)),this._cornerType=g(e.cornerType,Nr.ROUNDED),this._vertexFormat=et.clone(g(e.vertexFormat,et.DEFAULT)),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let i=1+t.length*f.packedLength;i+=1+n.length*V.packedLength,this.packedLength=i+he.packedLength+et.packedLength+2}SE.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");let i;n=g(n,0);const o=e._positions;let r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=f.packedLength)f.pack(o[i],t,n);const s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=V.packedLength)V.pack(s[i],t,n);return he.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=he.packedLength),n+=et.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};const Aie=he.clone(he.UNIT_SPHERE),xie=new et,vE={polylinePositions:void 0,shapePositions:void 0,ellipsoid:Aie,vertexFormat:xie,cornerType:void 0,granularity:void 0};SE.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);let i,o=e[t++];const r=new Array(o);for(i=0;i<o;++i,t+=f.packedLength)r[i]=f.unpack(e,t);o=e[t++];const s=new Array(o);for(i=0;i<o;++i,t+=V.packedLength)s[i]=V.unpack(e,t);const a=he.unpack(e,t,Aie),l=et.unpack(e,t+=he.packedLength,xie);t+=et.packedLength;const u=e[t++],d=e[t];return c(n)?(n._positions=r,n._shape=s,n._ellipsoid=he.clone(a,n._ellipsoid),n._vertexFormat=et.clone(l,n._vertexFormat),n._cornerType=u,n._granularity=d,n):(vE.polylinePositions=r,vE.shapePositions=s,vE.cornerType=u,vE.granularity=d,new SE(vE))};const xnt=new Vt;SE.createGeometry=function(e){const n=Ea(e._positions,f.equalsEpsilon);let i=e._shape;if(i=TE.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;po.computeWindingOrder2D(i)===Bl.CLOCKWISE&&i.reverse();const o=Vt.fromPoints(i,xnt);return function Ant(e,t,n,i){const o=new co;i.position&&(o.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:e}));const r=t.length,s=e.length/3,a=(s-2*r)/(2*r),l=po.triangulate(t),d=Ot.createTypedArray(s,(a-1)*r*6+2*l.length);let h,m,_,p,y,b;const x=2*r;let C=0;for(h=0;h<a-1;h++){for(m=0;m<r-1;m++)_=2*m+h*r*2,b=_+x,p=_+1,y=p+x,d[C++]=p,d[C++]=_,d[C++]=y,d[C++]=y,d[C++]=_,d[C++]=b;_=2*r-2+h*r*2,p=_+1,y=p+x,b=_+x,d[C++]=p,d[C++]=_,d[C++]=y,d[C++]=y,d[C++]=_,d[C++]=b}if(i.st||i.tangent||i.bitangent){const I=new Float32Array(2*s),P=1/(a-1),N=1/n.height,R=n.height/2;let B,F,S=0;for(h=0;h<a;h++){for(B=h*P,F=N*(t[0].y+R),I[S++]=B,I[S++]=F,m=1;m<r;m++)F=N*(t[m].y+R),I[S++]=B,I[S++]=F,I[S++]=B,I[S++]=F;F=N*(t[0].y+R),I[S++]=B,I[S++]=F}for(m=0;m<r;m++)B=0,F=N*(t[m].y+R),I[S++]=B,I[S++]=F;for(m=0;m<r;m++)B=(a-1)*P,F=N*(t[m].y+R),I[S++]=B,I[S++]=F;o.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:new Float32Array(I)})}const w=s-2*r;for(h=0;h<l.length;h+=3){const I=l[h]+w,P=l[h+1]+w,N=l[h+2]+w;d[C++]=I,d[C++]=P,d[C++]=N,d[C++]=N+r,d[C++]=P+r,d[C++]=I+r}let v=new En({attributes:o,indices:d,boundingSphere:Ae.fromVertices(e),primitiveType:Tt.TRIANGLES});if(i.normal&&(v=ao.computeNormal(v)),i.tangent||i.bitangent){try{v=ao.computeTangentAndBitangent(v)}catch{_n("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}i.tangent||(v.attributes.tangent=void 0),i.bitangent||(v.attributes.bitangent=void 0),i.st||(v.attributes.st=void 0)}return v}(TE.computePositions(n,i,o,e,!0),i,o,e._vertexFormat)};const Cnt=SE;function IE(e){const t=(e=g(e,g.EMPTY_OBJECT)).polylinePositions,n=e.shapePositions;if(!c(t))throw new E("options.polylinePositions is required.");if(!c(n))throw new E("options.shapePositions is required.");this._positions=t,this._shape=n,this._ellipsoid=he.clone(g(e.ellipsoid,he.default)),this._cornerType=g(e.cornerType,Nr.ROUNDED),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let i=1+t.length*f.packedLength;i+=1+n.length*V.packedLength,this.packedLength=i+he.packedLength+2}IE.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");let i;n=g(n,0);const o=e._positions;let r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=f.packedLength)f.pack(o[i],t,n);const s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=V.packedLength)V.pack(s[i],t,n);return he.pack(e._ellipsoid,t,n),n+=he.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};const Cie=he.clone(he.UNIT_SPHERE),DE={polylinePositions:void 0,shapePositions:void 0,ellipsoid:Cie,height:void 0,cornerType:void 0,granularity:void 0};IE.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);let i,o=e[t++];const r=new Array(o);for(i=0;i<o;++i,t+=f.packedLength)r[i]=f.unpack(e,t);o=e[t++];const s=new Array(o);for(i=0;i<o;++i,t+=V.packedLength)s[i]=V.unpack(e,t);const a=he.unpack(e,t,Cie);t+=he.packedLength;const l=e[t++],u=e[t];return c(n)?(n._positions=r,n._shape=s,n._ellipsoid=he.clone(a,n._ellipsoid),n._cornerType=l,n._granularity=u,n):(DE.polylinePositions=r,DE.shapePositions=s,DE.cornerType=l,DE.granularity=u,new IE(DE))};const wnt=new Vt;IE.createGeometry=function(e){const n=Ea(e._positions,f.equalsEpsilon);let i=e._shape;if(i=TE.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;po.computeWindingOrder2D(i)===Bl.CLOCKWISE&&i.reverse();const o=Vt.fromPoints(i,wnt);return function Ent(e,t){const n=new co;n.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:e});const i=t.length,o=n.position.values.length/3,s=e.length/3/i,a=Ot.createTypedArray(o,2*i*(s+1));let l,u,d=0;l=0;let h=l*i;for(u=0;u<i-1;u++)a[d++]=u+h,a[d++]=u+h+1;for(a[d++]=i-1+h,a[d++]=h,l=s-1,h=l*i,u=0;u<i-1;u++)a[d++]=u+h,a[d++]=u+h+1;for(a[d++]=i-1+h,a[d++]=h,l=0;l<s-1;l++){const _=i*l,p=_+i;for(u=0;u<i;u++)a[d++]=u+_,a[d++]=u+p}return new En({attributes:n,indices:Ot.createTypedArray(o,a),boundingSphere:Ae.fromVertices(e),primitiveType:Tt.LINES})}(TE.computePositions(n,i,o,e,!1),i)};const Snt=IE,Eie=new Z;function vnt(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0}function Df(e,t){No.call(this,{entity:e,scene:t,geometryOptions:new vnt(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function TT(e,t,n){go.call(this,e,t,n)}c(Object.create)&&((Df.prototype=Object.create(No.prototype)).constructor=Df),Df.prototype.createFillGeometryInstance=function(e){if(A.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e);let i,o;const r=new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=_o.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof kn){let l;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(l=this._materialProperty.color.getValue(e,Eie)),c(l)||(l=Z.WHITE),o=ei.fromColor(l),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new zn({id:t,geometry:new Cnt(this._options),attributes:i})},Df.prototype.createOutlineGeometryInstance=function(e){if(A.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,Z.BLACK,Eie),o=this._distanceDisplayConditionProperty.getValue(e);return new zn({id:t,geometry:new Snt(this._options),attributes:{show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ei.fromColor(i),distanceDisplayCondition:_o.fromDistanceDisplayCondition(o)}})},Df.prototype._isHidden=function(e,t){return!c(t.positions)||!c(t.shape)||No.prototype._isHidden.call(this,e,t)},Df.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&t.shape.isConstant&&te.isConstant(t.granularity)&&te.isConstant(t.outlineWidth)&&te.isConstant(t.cornerType))},Df.prototype._setStaticOptions=function(e,t){const n=t.granularity,i=t.cornerType,o=this._options;o.vertexFormat=this._materialProperty instanceof kn?gi.VERTEX_FORMAT:ca.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(It.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(It.MINIMUM_VALUE,o.shape),o.granularity=c(n)?n.getValue(It.MINIMUM_VALUE):void 0,o.cornerType=c(i)?i.getValue(It.MINIMUM_VALUE):void 0},Df.DynamicGeometryUpdater=TT,c(Object.create)&&((TT.prototype=Object.create(go.prototype)).constructor=TT),TT.prototype._isHidden=function(e,t,n){const i=this._options;return!c(i.polylinePositions)||!c(i.shapePositions)||go.prototype._isHidden.call(this,e,t,n)},TT.prototype._setOptions=function(e,t,n){const i=this._options;i.polylinePositions=te.getValueOrUndefined(t.positions,n,i.polylinePositions),i.shapePositions=te.getValueOrUndefined(t.shape,n),i.granularity=te.getValueOrUndefined(t.granularity,n),i.cornerType=te.getValueOrUndefined(t.cornerType,n)};const Int=Df,bU=new f,wie=new f,Sie=new f,vie=new f,Iie=new Te,Dnt=new V,Pnt=new Ae,Ont=new Ae;function Die(e,t){const n=new En({attributes:new co,primitiveType:Tt.TRIANGLES});return n.attributes.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}const TU=new f,Pie=new f;function Oie(e,t){const n=e._vertexFormat,i=e._ellipsoid,o=t.height,r=t.width,s=t.northCap,a=t.southCap;let l=0,u=o,d=o,h=0;s&&(l=1,d-=1,h+=1),a&&(u-=1,d-=1,h+=1),h+=r*d;const m=n.position?new Float64Array(3*h):void 0,_=n.st?new Float32Array(2*h):void 0;let p=0,y=0;const b=bU,x=Dnt;let C=Number.MAX_VALUE,w=Number.MAX_VALUE,v=-Number.MAX_VALUE,I=-Number.MAX_VALUE;for(let D=l;D<u;++D)for(let L=0;L<r;++L)rc.computePosition(t,i,n.st,D,L,b,x),m[p++]=b.x,m[p++]=b.y,m[p++]=b.z,n.st&&(_[y++]=x.x,_[y++]=x.y,C=Math.min(C,x.x),w=Math.min(w,x.y),v=Math.max(v,x.x),I=Math.max(I,x.y));if(s&&(rc.computePosition(t,i,n.st,0,0,b,x),m[p++]=b.x,m[p++]=b.y,m[p++]=b.z,n.st&&(_[y++]=x.x,_[y++]=x.y,C=x.x,w=x.y,v=x.x,I=x.y)),a&&(rc.computePosition(t,i,n.st,o-1,0,b,x),m[p++]=b.x,m[p++]=b.y,m[p]=b.z,n.st&&(_[y++]=x.x,_[y]=x.y,C=Math.min(C,x.x),w=Math.min(w,x.y),v=Math.max(v,x.x),I=Math.max(I,x.y))),n.st&&(C<0||w<0||v>1||I>1))for(let D=0;D<_.length;D+=2)_[D]=(_[D]-C)/(v-C),_[D+1]=(_[D+1]-w)/(I-w);const P=function Rnt(e,t,n,i){const o=e.length,r=t.normal?new Float32Array(o):void 0,s=t.tangent?new Float32Array(o):void 0,a=t.bitangent?new Float32Array(o):void 0;let l=0;const u=vie,d=Sie;let h=wie;if(t.normal||t.tangent||t.bitangent)for(let m=0;m<o;m+=3){const _=f.fromArray(e,m,bU),p=l+1,y=l+2;h=n.geodeticSurfaceNormal(_,h),(t.tangent||t.bitangent)&&(f.cross(f.UNIT_Z,h,d),oe.multiplyByVector(i,d,d),f.normalize(d,d),t.bitangent&&f.normalize(f.cross(h,d,u),u)),t.normal&&(r[l]=h.x,r[p]=h.y,r[y]=h.z),t.tangent&&(s[l]=d.x,s[p]=d.y,s[y]=d.z),t.bitangent&&(a[l]=u.x,a[p]=u.y,a[y]=u.z),l+=3}return Die(t,{positions:e,normals:r,tangents:s,bitangents:a})}(m,n,i,t.tangentRotationMatrix);let N=6*(r-1)*(d-1);s&&(N+=3*(r-1)),a&&(N+=3*(r-1));const R=Ot.createTypedArray(h,N);let S,B=0,F=0;for(S=0;S<d-1;++S){for(let D=0;D<r-1;++D){const M=B+r,U=M+1,z=B+1;R[F++]=B,R[F++]=M,R[F++]=z,R[F++]=z,R[F++]=M,R[F++]=U,++B}++B}if(s||a){let D=h-1;const L=h-1;let M,U;if(s&&a&&(D=h-2),B=0,s)for(S=0;S<r-1;S++)M=B,U=M+1,R[F++]=D,R[F++]=M,R[F++]=U,++B;if(a)for(B=(d-1)*r,S=0;S<r-1;S++)M=B,U=M+1,R[F++]=M,R[F++]=L,R[F++]=U,++B}return P.indices=R,n.st&&(P.attributes.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:_})),P}function AT(e,t,n,i,o){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n+2],e[t++]=o[n],e[t++]=o[n+1],e[t]=o[n+2],e}function xT(e,t,n,i){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n],e[t]=i[n+1],e}const AU=new et;const Mnt=[new f,new f,new f,new f],Rie=new Ce,Fnt=new Ce;function xU(e,t,n,i,o){if(0===n)return Te.clone(e,o);const r=rc.computeOptions(e,t,n,0,Iie,Rie),s=r.height,a=r.width,l=Mnt;return rc.computePosition(r,i,!1,0,0,l[0]),rc.computePosition(r,i,!1,0,a-1,l[1]),rc.computePosition(r,i,!1,s-1,0,l[2]),rc.computePosition(r,i,!1,s-1,a-1,l[3]),Te.fromCartesianArray(l,i,o)}function Pf(e){const t=(e=g(e,g.EMPTY_OBJECT)).rectangle;if(A.typeOf.object("rectangle",t),Te.validate(t),t.north<t.south)throw new E("options.rectangle.north must be greater than or equal to options.rectangle.south");const n=g(e.height,0),i=g(e.extrudedHeight,n);this._rectangle=Te.clone(t),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._ellipsoid=he.clone(g(e.ellipsoid,he.default)),this._surfaceHeight=Math.max(n,i),this._rotation=g(e.rotation,0),this._stRotation=g(e.stRotation,0),this._vertexFormat=et.clone(g(e.vertexFormat,et.DEFAULT)),this._extrudedHeight=Math.min(n,i),this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Pf.packedLength=Te.packedLength+he.packedLength+et.packedLength+7,Pf.pack=function(e,t,n){return A.typeOf.object("value",e),A.defined("array",t),n=g(n,0),Te.pack(e._rectangle,t,n),he.pack(e._ellipsoid,t,n+=Te.packedLength),et.pack(e._vertexFormat,t,n+=he.packedLength),n+=et.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=g(e._offsetAttribute,-1),t};const Lie=new Te,Nie=he.clone(he.UNIT_SPHERE),Hm={rectangle:Lie,ellipsoid:Nie,vertexFormat:AU,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Pf.unpack=function(e,t,n){A.defined("array",e),t=g(t,0);const i=Te.unpack(e,t,Lie),o=he.unpack(e,t+=Te.packedLength,Nie),r=et.unpack(e,t+=he.packedLength,AU);t+=et.packedLength;const s=e[t++],a=e[t++],l=e[t++],u=e[t++],d=e[t++],h=1===e[t++],m=e[t];return c(n)?(n._rectangle=Te.clone(i,n._rectangle),n._ellipsoid=he.clone(o,n._ellipsoid),n._vertexFormat=et.clone(r,n._vertexFormat),n._granularity=s,n._surfaceHeight=a,n._rotation=l,n._stRotation=u,n._extrudedHeight=d,n._shadowVolume=h,n._offsetAttribute=-1===m?void 0:m,n):(Hm.granularity=s,Hm.height=a,Hm.rotation=l,Hm.stRotation=u,Hm.extrudedHeight=d,Hm.shadowVolume=h,Hm.offsetAttribute=-1===m?void 0:m,new Pf(Hm))},Pf.computeRectangle=function(e,t){const n=(e=g(e,g.EMPTY_OBJECT)).rectangle;if(A.typeOf.object("rectangle",n),Te.validate(n),n.north<n.south)throw new E("options.rectangle.north must be greater than or equal to options.rectangle.south");const i=g(e.granularity,O.RADIANS_PER_DEGREE),o=g(e.ellipsoid,he.default);return xU(n,i,g(e.rotation,0),o,t)};const Bnt=new oe,Mie=new bt,knt=new Ce;Pf.createGeometry=function(e){if(O.equalsEpsilon(e._rectangle.north,e._rectangle.south,O.EPSILON10)||O.equalsEpsilon(e._rectangle.east,e._rectangle.west,O.EPSILON10))return;let t=e._rectangle;const n=e._ellipsoid,i=e._rotation,o=e._stRotation,r=e._vertexFormat,s=rc.computeOptions(t,e._granularity,i,o,Iie,Rie,Fnt),a=Bnt;if(0!==o||0!==i){const _=Te.center(t,knt),p=n.geodeticSurfaceNormalCartographic(_,TU);bt.fromAxisAngle(p,-o,Mie),oe.fromQuaternion(Mie,a)}else oe.clone(oe.IDENTITY,a);const l=e._surfaceHeight,u=e._extrudedHeight,d=!O.equalsEpsilon(l,u,0,O.EPSILON2);let h,m;if(s.lonScalar=1/e._rectangle.width,s.latScalar=1/e._rectangle.height,s.tangentRotationMatrix=a,t=e._rectangle,d){h=function Nnt(e,t){const n=e._shadowVolume,i=e._offsetAttribute,o=e._vertexFormat,r=e._extrudedHeight,s=e._surfaceHeight,a=e._ellipsoid,l=t.height,u=t.width;let d;if(n){const ft=et.clone(o,AU);ft.normal=!0,e._vertexFormat=ft}const h=Oie(e,t);n&&(e._vertexFormat=o);let m=po.scaleToGeodeticHeight(h.attributes.position.values,s,a,!1);m=new Float64Array(m);let _=m.length;const p=2*_,y=new Float64Array(p);y.set(m);const b=po.scaleToGeodeticHeight(h.attributes.position.values,r,a);y.set(b,_),h.attributes.position.values=y;const x=o.normal?new Float32Array(p):void 0,C=o.tangent?new Float32Array(p):void 0,w=o.bitangent?new Float32Array(p):void 0,v=o.st?new Float32Array(p/3*2):void 0;let I,P,N;if(o.normal){for(P=h.attributes.normal.values,x.set(P),d=0;d<_;d++)P[d]=-P[d];x.set(P,_),h.attributes.normal.values=x}if(n){P=h.attributes.normal.values,o.normal||(h.attributes.normal=void 0);const ft=new Float32Array(p);for(d=0;d<_;d++)P[d]=-P[d];ft.set(P,_),h.attributes.extrudeDirection=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:ft})}const R=c(i);if(R){const ft=_/3*2;let gn=new Uint8Array(ft);i===Xn.TOP?gn=gn.fill(1,0,ft/2):(N=i===Xn.NONE?0:1,gn=gn.fill(N)),h.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:gn})}if(o.tangent){const ft=h.attributes.tangent.values;for(C.set(ft),d=0;d<_;d++)ft[d]=-ft[d];C.set(ft,_),h.attributes.tangent.values=C}if(o.bitangent){const ft=h.attributes.bitangent.values;w.set(ft),w.set(ft,_),h.attributes.bitangent.values=w}o.st&&(I=h.attributes.st.values,v.set(I),v.set(I,_/3*2),h.attributes.st.values=v);const B=h.indices,F=B.length,S=_/3,D=Ot.createTypedArray(p/3,2*F);for(D.set(B),d=0;d<F;d+=3)D[d+F]=B[d+2]+S,D[d+1+F]=B[d+1]+S,D[d+2+F]=B[d]+S;h.indices=D;const L=t.northCap,M=t.southCap;let U=l,z=2,G=0,W=4,q=4;L&&(z-=1,U-=1,G+=1,W-=2,q-=1),M&&(z-=1,U-=1,G+=1,W-=2,q-=1),G+=z*u+2*U-W;const j=2*(G+q);let Q=new Float64Array(3*j);const Y=n?new Float32Array(3*j):void 0;let ne=R?new Uint8Array(j):void 0,X=o.st?new Float32Array(2*j):void 0;const K=i===Xn.TOP;R&&!K&&(N=i===Xn.ALL?1:0,ne=ne.fill(N));let $=0,me=0,Se=0,fe=0;const ye=u*U;let ve;for(d=0;d<ye;d+=u)ve=3*d,Q=AT(Q,$,ve,m,b),$+=6,o.st&&(X=xT(X,me,2*d,I),me+=4),n&&(Se+=3,Y[Se++]=P[ve],Y[Se++]=P[ve+1],Y[Se++]=P[ve+2]),K&&(ne[fe++]=1,fe+=1);if(M){const ft=L?ye+1:ye;for(ve=3*ft,d=0;d<2;d++)Q=AT(Q,$,ve,m,b),$+=6,o.st&&(X=xT(X,me,2*ft,I),me+=4),n&&(Se+=3,Y[Se++]=P[ve],Y[Se++]=P[ve+1],Y[Se++]=P[ve+2]),K&&(ne[fe++]=1,fe+=1)}else for(d=ye-u;d<ye;d++)ve=3*d,Q=AT(Q,$,ve,m,b),$+=6,o.st&&(X=xT(X,me,2*d,I),me+=4),n&&(Se+=3,Y[Se++]=P[ve],Y[Se++]=P[ve+1],Y[Se++]=P[ve+2]),K&&(ne[fe++]=1,fe+=1);for(d=ye-1;d>0;d-=u)ve=3*d,Q=AT(Q,$,ve,m,b),$+=6,o.st&&(X=xT(X,me,2*d,I),me+=4),n&&(Se+=3,Y[Se++]=P[ve],Y[Se++]=P[ve+1],Y[Se++]=P[ve+2]),K&&(ne[fe++]=1,fe+=1);if(L){const ft=ye;for(ve=3*ft,d=0;d<2;d++)Q=AT(Q,$,ve,m,b),$+=6,o.st&&(X=xT(X,me,2*ft,I),me+=4),n&&(Se+=3,Y[Se++]=P[ve],Y[Se++]=P[ve+1],Y[Se++]=P[ve+2]),K&&(ne[fe++]=1,fe+=1)}else for(d=u-1;d>=0;d--)ve=3*d,Q=AT(Q,$,ve,m,b),$+=6,o.st&&(X=xT(X,me,2*d,I),me+=4),n&&(Se+=3,Y[Se++]=P[ve],Y[Se++]=P[ve+1],Y[Se++]=P[ve+2]),K&&(ne[fe++]=1,fe+=1);let Oe=function Lnt(e,t,n){const i=e.length,o=t.normal?new Float32Array(i):void 0,r=t.tangent?new Float32Array(i):void 0,s=t.bitangent?new Float32Array(i):void 0;let a=0,l=0,u=0,d=!0,h=vie,m=Sie,_=wie;if(t.normal||t.tangent||t.bitangent)for(let p=0;p<i;p+=6){const y=f.fromArray(e,p,bU),b=f.fromArray(e,(p+6)%i,TU);if(d){const x=f.fromArray(e,(p+3)%i,Pie);f.subtract(b,y,b),f.subtract(x,y,x),_=f.normalize(f.cross(x,b,_),_),d=!1}f.equalsEpsilon(b,y,O.EPSILON10)&&(d=!0),(t.tangent||t.bitangent)&&(h=n.geodeticSurfaceNormal(y,h),t.tangent&&(m=f.normalize(f.cross(h,_,m),m))),t.normal&&(o[a++]=_.x,o[a++]=_.y,o[a++]=_.z,o[a++]=_.x,o[a++]=_.y,o[a++]=_.z),t.tangent&&(r[l++]=m.x,r[l++]=m.y,r[l++]=m.z,r[l++]=m.x,r[l++]=m.y,r[l++]=m.z),t.bitangent&&(s[u++]=h.x,s[u++]=h.y,s[u++]=h.z,s[u++]=h.x,s[u++]=h.y,s[u++]=h.z)}return Die(t,{positions:e,normals:o,tangents:r,bitangents:s})}(Q,o,a);o.st&&(Oe.attributes.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:X})),n&&(Oe.attributes.extrudeDirection=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:Y})),R&&(Oe.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:ne}));const Ge=Ot.createTypedArray(j,6*G);let je,Ke,Qt,nn;_=Q.length/3;let Pt=0;for(d=0;d<_-1;d+=2){je=d,nn=(je+2)%_;const ft=f.fromArray(Q,3*je,TU),gn=f.fromArray(Q,3*nn,Pie);f.equalsEpsilon(ft,gn,O.EPSILON10)||(Ke=(je+1)%_,Qt=(Ke+2)%_,Ge[Pt++]=je,Ge[Pt++]=Ke,Ge[Pt++]=nn,Ge[Pt++]=nn,Ge[Pt++]=Ke,Ge[Pt++]=Qt)}return Oe.indices=Ge,Oe=ao.combineInstances([new zn({geometry:h}),new zn({geometry:Oe})]),Oe[0]}(e,s);const _=Ae.fromRectangle3D(t,n,l,Ont),p=Ae.fromRectangle3D(t,n,u,Pnt);m=Ae.union(_,p)}else{if(h=Oie(e,s),h.attributes.position.values=po.scaleToGeodeticHeight(h.attributes.position.values,l,n,!1),c(e._offsetAttribute)){const p=e._offsetAttribute===Xn.NONE?0:1,y=new Uint8Array(h.attributes.position.values.length/3).fill(p);h.attributes.applyOffset=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}m=Ae.fromRectangle3D(t,n,l)}return r.position||delete h.attributes.position,new En({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:m,offsetAttribute:e._offsetAttribute})},Pf.createShadowVolume=function(e,t,n){const i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Pf({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:o,stRotation:e._stRotation,granularity:i,extrudedHeight:s,height:r,vertexFormat:et.POSITION_ONLY,shadowVolume:!0})};const Fie=new Te,Unt=[new V,new V,new V],znt=new Kr,Vnt=new Ce;Object.defineProperties(Pf.prototype,{rectangle:{get:function(){return c(this._rotatedRectangle)||(this._rotatedRectangle=xU(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return c(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function Hnt(e){if(0===e._stRotation)return[0,0,0,1,1,0];const r=xU(Te.clone(e._rectangle,Fie),e._granularity,e._rotation-e._stRotation,e._ellipsoid,Fie),s=Unt;s[0].x=r.west,s[0].y=r.south,s[1].x=r.west,s[1].y=r.north,s[2].x=r.east,s[2].y=r.south;const a=e.rectangle,l=Kr.fromRotation(e._stRotation,znt),u=Te.center(a,Vnt);for(let p=0;p<3;++p){const y=s[p];y.x-=u.longitude,y.y-=u.latitude,Kr.multiplyByVector(l,y,y),y.x+=u.longitude,y.y+=u.latitude,y.x=(y.x-a.west)/a.width,y.y=(y.y-a.south)/a.height}const d=s[0],h=s[1],m=s[2],_=new Array(6);return V.pack(d,_),V.pack(h,_,2),V.pack(m,_,4),_}(this)),this._textureCoordinateRotationPoints}}});const CU=Pf,Bie=new Z,kie=f.ZERO,Uie=new f,zie=new Te,Gnt=new Te,jnt=new Ce;function Wnt(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function Ed(e,t){ui.call(this,{entity:e,scene:t,geometryOptions:new Wnt(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function CT(e,t,n){go.call(this,e,t,n)}c(Object.create)&&((Ed.prototype=Object.create(ui.prototype)).constructor=Ed),Ed.prototype.createFillGeometryInstance=function(e){if(A.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i={show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:_o.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof kn){let o;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,Bie)),c(o)||(o=Z.WHITE),i.color=ei.fromColor(o)}return c(this._options.offsetAttribute)&&(i.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,kie,Uie))),new zn({id:t,geometry:new CU(this._options),attributes:i})},Ed.prototype.createOutlineGeometryInstance=function(e){if(A.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,Z.BLACK,Bie),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ei.fromColor(i),distanceDisplayCondition:_o.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=os.fromCartesian3(te.getValueOrDefault(this._terrainOffsetProperty,e,kie,Uie))),new zn({id:t,geometry:new Wj(this._options),attributes:r})},Ed.prototype._computeCenter=function(e,t){const n=te.getValueOrUndefined(this._entity.rectangle.coordinates,e,Gnt);if(!c(n))return;const i=Te.center(n,jnt);return Ce.toCartesian(i,he.default,t)},Ed.prototype._isHidden=function(e,t){return!c(t.coordinates)||No.prototype._isHidden.call(this,e,t)},Ed.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!te.isConstant(t.height)||!te.isConstant(t.extrudedHeight)||!te.isConstant(t.granularity)||!te.isConstant(t.stRotation)||!te.isConstant(t.rotation)||!te.isConstant(t.outlineWidth)||!te.isConstant(t.zIndex)||this._onTerrain&&!te.isConstant(this._materialProperty)&&!(this._materialProperty instanceof kn)},Ed.prototype._setStaticOptions=function(e,t){const n=this._materialProperty instanceof kn;let i=te.getValueOrUndefined(t.height,It.MINIMUM_VALUE);const o=te.getValueOrDefault(t.heightReference,It.MINIMUM_VALUE,tn.NONE);let r=te.getValueOrUndefined(t.extrudedHeight,It.MINIMUM_VALUE);const s=te.getValueOrDefault(t.extrudedHeightReference,It.MINIMUM_VALUE,tn.NONE);c(r)&&!c(i)&&(i=0);const a=this._options;a.vertexFormat=n?gi.VERTEX_FORMAT:ca.MaterialSupport.TEXTURED.vertexFormat,a.rectangle=t.coordinates.getValue(It.MINIMUM_VALUE,a.rectangle),a.granularity=te.getValueOrUndefined(t.granularity,It.MINIMUM_VALUE),a.stRotation=te.getValueOrUndefined(t.stRotation,It.MINIMUM_VALUE),a.rotation=te.getValueOrUndefined(t.rotation,It.MINIMUM_VALUE),a.offsetAttribute=ui.computeGeometryOffsetAttribute(i,o,r,s),a.height=ui.getGeometryHeight(i,o),r=ui.getGeometryExtrudedHeight(r,s),r===ui.CLAMP_TO_GROUND&&(r=vo.getMinimumMaximumHeights(CU.computeRectangle(a,zie)).minimumTerrainHeight),a.extrudedHeight=r},Ed.DynamicGeometryUpdater=CT,c(Object.create)&&((CT.prototype=Object.create(go.prototype)).constructor=CT),CT.prototype._isHidden=function(e,t,n){return!c(this._options.rectangle)||go.prototype._isHidden.call(this,e,t,n)},CT.prototype._setOptions=function(e,t,n){const i=this._options;let o=te.getValueOrUndefined(t.height,n);const r=te.getValueOrDefault(t.heightReference,n,tn.NONE);let s=te.getValueOrUndefined(t.extrudedHeight,n);const a=te.getValueOrDefault(t.extrudedHeightReference,n,tn.NONE);c(s)&&!c(o)&&(o=0),i.rectangle=te.getValueOrUndefined(t.coordinates,n,i.rectangle),i.granularity=te.getValueOrUndefined(t.granularity,n),i.stRotation=te.getValueOrUndefined(t.stRotation,n),i.rotation=te.getValueOrUndefined(t.rotation,n),i.offsetAttribute=ui.computeGeometryOffsetAttribute(o,r,s,a),i.height=ui.getGeometryHeight(o,r),s=ui.getGeometryExtrudedHeight(s,a),s===ui.CLAMP_TO_GROUND&&(s=vo.getMinimumMaximumHeights(CU.computeRectangle(i,zie)).minimumTerrainHeight),i.extrudedHeight=s};const qnt=Ed,Vie={};function Ynt(e,t){return O.equalsEpsilon(e.latitude,t.latitude,O.EPSILON10)&&O.equalsEpsilon(e.longitude,t.longitude,O.EPSILON10)}const Xnt=new Ce,Znt=new Ce,Knt=new Array(2),Qnt=new Array(2),Jnt={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};Vie.computePositions=function(e,t,n,i,o,r){const s=function $nt(e,t,n,i){const o=(t=Ea(t,f.equalsEpsilon)).length;if(o<2)return;const r=c(i),s=c(n),a=new Array(o),l=new Array(o),u=new Array(o),d=t[0];a[0]=d;const h=e.cartesianToCartographic(d,Xnt);s&&(h.height=n[0]),l[0]=h.height,u[0]=r?i[0]:0;let p=l[0]===u[0],y=1;for(let b=1;b<o;++b){const x=t[b],C=e.cartesianToCartographic(x,Znt);s&&(C.height=n[b]),p=p&&0===C.height,Ynt(h,C)?h.height<C.height&&(l[y-1]=C.height):(a[y]=x,l[y]=C.height,u[y]=r?i[b]:0,p=p&&l[y]===u[y],Ce.clone(C,h),++y)}return p||y<2?void 0:(a.length=y,l.length=y,u.length=y,{positions:a,topHeights:l,bottomHeights:u})}(e,t,n,i);if(!c(s))return;n=s.topHeights,i=s.bottomHeights;const a=(t=s.positions).length,l=a-2;let u,d;const h=O.chordLength(o,e.maximumRadius),m=Jnt;if(m.minDistance=h,m.ellipsoid=e,r){let p,_=0;for(p=0;p<a-1;p++)_+=Gr.numberOfPoints(t[p],t[p+1],h)+1;u=new Float64Array(3*_),d=new Float64Array(3*_);const y=Knt,b=Qnt;m.positions=y,m.height=b;let x=0;for(p=0;p<a-1;p++){y[0]=t[p],y[1]=t[p+1],b[0]=n[p],b[1]=n[p+1];const C=Gr.generateArc(m);u.set(C,x),b[0]=i[p],b[1]=i[p+1],d.set(Gr.generateArc(m),x),x+=C.length}}else m.positions=t,m.height=n,u=new Float64Array(Gr.generateArc(m)),m.height=i,d=new Float64Array(Gr.generateArc(m));return{bottomPositions:d,topPositions:u,numCorners:l}};const Hie=Vie,EU=new f,k1=new f,eit=new f,Gie=new f,tit=new f,nit=new f,iit=new f;function by(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions,n=e.maximumHeights,i=e.minimumHeights;if(!c(t))throw new E("options.positions is required.");if(c(n)&&n.length!==t.length)throw new E("options.positions and options.maximumHeights must have the same length.");if(c(i)&&i.length!==t.length)throw new E("options.positions and options.minimumHeights must have the same length.");const o=g(e.vertexFormat,et.DEFAULT),r=g(e.granularity,O.RADIANS_PER_DEGREE),s=g(e.ellipsoid,he.default);this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=et.clone(o),this._granularity=r,this._ellipsoid=he.clone(s),this._workerName="createWallGeometry";let a=1+t.length*f.packedLength+2;c(i)&&(a+=i.length),c(n)&&(a+=n.length),this.packedLength=a+he.packedLength+et.packedLength+1}by.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");let i;n=g(n,0);const o=e._positions;let r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=f.packedLength)f.pack(o[i],t,n);const s=e._minimumHeights;if(r=c(s)?s.length:0,t[n++]=r,c(s))for(i=0;i<r;++i)t[n++]=s[i];const a=e._maximumHeights;if(r=c(a)?a.length:0,t[n++]=r,c(a))for(i=0;i<r;++i)t[n++]=a[i];return he.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=he.packedLength),t[n+=et.packedLength]=e._granularity,t};const jie=he.clone(he.UNIT_SPHERE),Wie=new et,PE={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:jie,vertexFormat:Wie,granularity:void 0};by.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);let i,o=e[t++];const r=new Array(o);for(i=0;i<o;++i,t+=f.packedLength)r[i]=f.unpack(e,t);let s,a;if(o=e[t++],o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];if(o=e[t++],o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];const l=he.unpack(e,t,jie),u=et.unpack(e,t+=he.packedLength,Wie),d=e[t+=et.packedLength];return c(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=he.clone(l,n._ellipsoid),n._vertexFormat=et.clone(u,n._vertexFormat),n._granularity=d,n):(PE.positions=r,PE.minimumHeights=s,PE.maximumHeights=a,PE.granularity=d,new by(PE))},by.fromConstantHeights=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions;if(!c(t))throw new E("options.positions is required.");let n,i;const o=e.minimumHeight,r=e.maximumHeight,s=c(o),a=c(r);if(s||a){const u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let d=0;d<u;++d)s&&(n[d]=o),a&&(i[d]=r)}return new by({positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},by.createGeometry=function(e){const o=e._vertexFormat,s=e._ellipsoid,a=Hie.computePositions(s,e._positions,e._maximumHeights,e._minimumHeights,e._granularity,!0);if(!c(a))return;const l=a.bottomPositions,u=a.topPositions,d=a.numCorners;let h=u.length,m=2*h;const _=o.position?new Float64Array(m):void 0,p=o.normal?new Float32Array(m):void 0,y=o.tangent?new Float32Array(m):void 0,b=o.bitangent?new Float32Array(m):void 0,x=o.st?new Float32Array(m/3*2):void 0;let C=0,w=0,v=0,I=0,P=0,N=iit,R=nit,B=tit,F=!0;h/=3;let S,D=0;const L=1/(h-d-1);for(S=0;S<h;++S){const W=3*S,q=f.fromArray(u,W,EU),j=f.fromArray(l,W,k1);if(o.position&&(_[C++]=j.x,_[C++]=j.y,_[C++]=j.z,_[C++]=q.x,_[C++]=q.y,_[C++]=q.z),o.st&&(x[P++]=D,x[P++]=0,x[P++]=D,x[P++]=1),o.normal||o.tangent||o.bitangent){let Q=f.clone(f.ZERO,Gie);const Y=f.subtract(q,s.geodeticSurfaceNormal(q,k1),k1);if(S+1<h&&(Q=f.fromArray(u,W+3,Gie)),F){const ne=f.subtract(Q,q,eit),X=f.subtract(Y,q,EU);N=f.normalize(f.cross(X,ne,N),N),F=!1}f.equalsEpsilon(q,Q,O.EPSILON10)?F=!0:(D+=L,o.tangent&&(R=f.normalize(f.subtract(Q,q,R),R)),o.bitangent&&(B=f.normalize(f.cross(N,R,B),B))),o.normal&&(p[w++]=N.x,p[w++]=N.y,p[w++]=N.z,p[w++]=N.x,p[w++]=N.y,p[w++]=N.z),o.tangent&&(y[I++]=R.x,y[I++]=R.y,y[I++]=R.z,y[I++]=R.x,y[I++]=R.y,y[I++]=R.z),o.bitangent&&(b[v++]=B.x,b[v++]=B.y,b[v++]=B.z,b[v++]=B.x,b[v++]=B.y,b[v++]=B.z)}}const M=new co;o.position&&(M.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:_})),o.normal&&(M.normal=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:p})),o.tangent&&(M.tangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:y})),o.bitangent&&(M.bitangent=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:3,values:b})),o.st&&(M.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:x}));const U=m/3;m-=6*(d+1);const z=Ot.createTypedArray(U,m);let G=0;for(S=0;S<U-2;S+=2){const W=S,q=S+2,j=f.fromArray(_,3*W,EU),Q=f.fromArray(_,3*q,k1);if(f.equalsEpsilon(j,Q,O.EPSILON10))continue;const ne=S+3;z[G++]=S+1,z[G++]=W,z[G++]=ne,z[G++]=ne,z[G++]=W,z[G++]=q}return new En({attributes:M,indices:z,primitiveType:Tt.TRIANGLES,boundingSphere:new Ae.fromVertices(_)})};const oit=by,qie=new f,Yie=new f;function Ty(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions,n=e.maximumHeights,i=e.minimumHeights;if(!c(t))throw new E("options.positions is required.");if(c(n)&&n.length!==t.length)throw new E("options.positions and options.maximumHeights must have the same length.");if(c(i)&&i.length!==t.length)throw new E("options.positions and options.minimumHeights must have the same length.");const o=g(e.granularity,O.RADIANS_PER_DEGREE),r=g(e.ellipsoid,he.default);this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._granularity=o,this._ellipsoid=he.clone(r),this._workerName="createWallOutlineGeometry";let s=1+t.length*f.packedLength+2;c(i)&&(s+=i.length),c(n)&&(s+=n.length),this.packedLength=s+he.packedLength+1}Ty.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");let i;n=g(n,0);const o=e._positions;let r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=f.packedLength)f.pack(o[i],t,n);const s=e._minimumHeights;if(r=c(s)?s.length:0,t[n++]=r,c(s))for(i=0;i<r;++i)t[n++]=s[i];const a=e._maximumHeights;if(r=c(a)?a.length:0,t[n++]=r,c(a))for(i=0;i<r;++i)t[n++]=a[i];return he.pack(e._ellipsoid,t,n),t[n+=he.packedLength]=e._granularity,t};const Xie=he.clone(he.UNIT_SPHERE),OE={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:Xie,granularity:void 0};Ty.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);let i,o=e[t++];const r=new Array(o);for(i=0;i<o;++i,t+=f.packedLength)r[i]=f.unpack(e,t);let s,a;if(o=e[t++],o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];if(o=e[t++],o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];const l=he.unpack(e,t,Xie),u=e[t+=he.packedLength];return c(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=he.clone(l,n._ellipsoid),n._granularity=u,n):(OE.positions=r,OE.minimumHeights=s,OE.maximumHeights=a,OE.granularity=u,new Ty(OE))},Ty.fromConstantHeights=function(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions;if(!c(t))throw new E("options.positions is required.");let n,i;const o=e.minimumHeight,r=e.maximumHeight,s=c(o),a=c(r);if(s||a){const u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let d=0;d<u;++d)s&&(n[d]=o),a&&(i[d]=r)}return new Ty({positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid})},Ty.createGeometry=function(e){const s=Hie.computePositions(e._ellipsoid,e._positions,e._maximumHeights,e._minimumHeights,e._granularity,!1);if(!c(s))return;const a=s.bottomPositions,l=s.topPositions;let u=l.length,d=2*u;const h=new Float64Array(d);let _,m=0;for(u/=3,_=0;_<u;++_){const C=3*_,w=f.fromArray(l,C,qie),v=f.fromArray(a,C,Yie);h[m++]=v.x,h[m++]=v.y,h[m++]=v.z,h[m++]=w.x,h[m++]=w.y,h[m++]=w.z}const p=new co({position:new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:h})}),y=d/3;d=2*y-4+y;const b=Ot.createTypedArray(y,d);let x=0;for(_=0;_<y-2;_+=2){const C=_,w=_+2,v=f.fromArray(h,3*C,qie),I=f.fromArray(h,3*w,Yie);if(f.equalsEpsilon(v,I,O.EPSILON10))continue;const P=_+1,N=_+3;b[x++]=P,b[x++]=C,b[x++]=P,b[x++]=N,b[x++]=C,b[x++]=w}return b[x++]=y-2,b[x++]=y-1,new En({attributes:p,indices:b,primitiveType:Tt.LINES,boundingSphere:new Ae.fromVertices(h)})};const rit=Ty,Zie=new Z;function sit(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0}function wd(e,t){No.call(this,{entity:e,scene:t,geometryOptions:new sit(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function ET(e,t,n){go.call(this,e,t,n)}c(Object.create)&&((wd.prototype=Object.create(No.prototype)).constructor=wd),wd.prototype.createFillGeometryInstance=function(e){if(A.defined("time",e),!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e);let i,o;const r=new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=_o.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof kn){let l;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(l=this._materialProperty.color.getValue(e,Zie)),c(l)||(l=Z.WHITE),o=ei.fromColor(l),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new zn({id:t,geometry:new oit(this._options),attributes:i})},wd.prototype.createOutlineGeometryInstance=function(e){if(A.defined("time",e),!this._outlineEnabled)throw new E("This instance does not represent an outlined geometry.");const t=this._entity,n=t.isAvailable(e),i=te.getValueOrDefault(this._outlineColorProperty,e,Z.BLACK,Zie),o=this._distanceDisplayConditionProperty.getValue(e);return new zn({id:t,geometry:new rit(this._options),attributes:{show:new Pi(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ei.fromColor(i),distanceDisplayCondition:_o.fromDistanceDisplayCondition(o)}})},wd.prototype._isHidden=function(e,t){return!c(t.positions)||No.prototype._isHidden.call(this,e,t)},wd.prototype._getIsClosed=function(e){return!1},wd.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&te.isConstant(t.minimumHeights)&&te.isConstant(t.maximumHeights)&&te.isConstant(t.outlineWidth)&&te.isConstant(t.granularity))},wd.prototype._setStaticOptions=function(e,t){const n=t.minimumHeights,i=t.maximumHeights,o=t.granularity,s=this._options;s.vertexFormat=this._materialProperty instanceof kn?gi.VERTEX_FORMAT:ca.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(It.MINIMUM_VALUE,s.positions),s.minimumHeights=c(n)?n.getValue(It.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=c(i)?i.getValue(It.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=c(o)?o.getValue(It.MINIMUM_VALUE):void 0},wd.DynamicGeometryUpdater=ET,c(Object.create)&&((ET.prototype=Object.create(go.prototype)).constructor=ET),ET.prototype._isHidden=function(e,t,n){return!c(this._options.positions)||go.prototype._isHidden.call(this,e,t,n)},ET.prototype._setOptions=function(e,t,n){const i=this._options;i.positions=te.getValueOrUndefined(t.positions,n,i.positions),i.minimumHeights=te.getValueOrUndefined(t.minimumHeights,n,i.minimumHeights),i.maximumHeights=te.getValueOrUndefined(t.maximumHeights,n,i.maximumHeights),i.granularity=te.getValueOrUndefined(t.granularity,n)};const Ay=[get,ptt,rtt,Dtt,Mtt,Xtt,Tnt,Int,qnt,wd];function xy(e,t){this.entity=e,this.scene=t;const n=new Array(Ay.length),i=new Ye,o=new kh;for(let r=0;r<n.length;r++){const s=new Ay[r](e,t);o.add(s.geometryChanged,a=>{i.raiseEvent(a)}),n[r]=s}this.updaters=n,this.geometryChanged=i,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(xy.prototype._onEntityPropertyChanged,this)}xy.prototype._onEntityPropertyChanged=function(e,t,n,i){const o=this.updaters;for(let r=0;r<o.length;r++)o[r]._onEntityPropertyChanged(e,t,n,i)},xy.prototype.forEach=function(e){const t=this.updaters;for(let n=0;n<t.length;n++)e(t[n])},xy.prototype.destroy=function(){this.eventHelper.removeAll();const e=this.updaters;for(let t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),Xe(this)},xy.registerUpdater=function(e){Ay.includes(e)||Ay.push(e)},xy.unregisterUpdater=function(e){if(Ay.includes(e)){const t=Ay.indexOf(e);Ay.splice(t,1)}};const wU=xy,$ie=new Z,ait=new Qn,cit=new Qn,lit=f.ZERO,uit=new f;function Sd(e,t,n,i,o,r,s){let a;this.translucent=t,this.appearanceType=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.depthFailMaterial=void 0,this.closed=r,this.shadows=s,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new mn,this.updaters=new mn,this.updatersWithAttributes=new mn,this.attributes=new mn,this.subscriptions=new mn,this.showsUpdated=new mn,this.itemsToRemove=[],this.invalidated=!1,c(o)&&(a=o.definitionChanged.addEventListener(Sd.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=a}function wT(e,t,n,i,o){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}function Kie(e,t){for(let i=e.length-1;i>=0;i--){const o=e[i];if(o.remove(t))return 0===o.updaters.length&&(e.splice(i,1),o.destroy()),!0}return!1}function Qie(e,t,n){let i=!1;const o=t.length;for(let r=0;r<o;++r){const s=t[r],a=s.itemsToRemove,l=a.length;if(l>0)for(r=0;r<l;r++){const u=a[r];s.remove(u),e.add(n,u),i=!0}}return i}function U1(e,t,n,i){let r,o=t.length;for(r=o-1;r>=0;r--){const s=t[r];if(s.invalidated){t.splice(r,1);const a=s.updaters.values,l=a.length;for(let u=0;u<l;u++)e.add(n,a[u]);s.destroy()}}for(o=t.length,r=0;r<o;++r)i=t[r].update(n)&&i;return i}function Jie(e,t,n){const i=e.length;for(let o=0;o<i;o++){const r=e[o];if(r.contains(t))return r.getBoundingSphere(t,n)}return en.FAILED}function eoe(e){const t=e.length;for(let n=0;n<t;n++)e[n].destroy();e.length=0}Sd.prototype.onMaterialChanged=function(){this.invalidated=!0},Sd.prototype.isMaterial=function(e){const t=this.depthFailMaterialProperty,n=e.depthFailMaterialProperty;return n===t||!!c(t)&&t.equals(n)},Sd.prototype.add=function(e,t){const n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&te.isConstant(e.distanceDisplayConditionProperty)&&te.isConstant(e.terrainOffsetProperty)){const i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))}else this.updatersWithAttributes.set(n,e)},Sd.prototype.remove=function(e){const t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);const n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},Sd.prototype.update=function(e){let t=!0,n=0,i=this.primitive;const o=this.primitives;let r;if(this.createPrimitive){const s=this.geometry.values;if(s.length>0){let l;c(i)&&(c(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),c(this.depthFailAppearanceType)&&(c(this.depthFailMaterialProperty)&&(this.depthFailMaterial=hc.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),l=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),i=new Yi({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed}),depthFailAppearance:l,shadows:this.shadows}),o.add(i),t=!1}else{c(i)&&(o.remove(i),i=void 0);const l=this.oldPrimitive;c(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(c(i)&&i.ready){i.show=!0,c(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),c(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof kn)&&(this.depthFailMaterial=hc.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);const s=this.updatersWithAttributes.values,a=s.length,l=this.waitingOnCreate;for(r=0;r<a;r++){const u=s[r],d=this.geometry.get(u.id);let h=this.attributes.get(d.id.id);if(c(h)||(h=i.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),!u.fillMaterialProperty.isConstant||l){const x=te.getValueOrDefault(u.fillMaterialProperty.color,e,Z.WHITE,$ie);Z.equals(h._lastColor,x)||(h._lastColor=Z.clone(x,h._lastColor),h.color=ei.toValue(x,h.color),(this.translucent&&255===h.color[3]||!this.translucent&&255!==h.color[3])&&(this.itemsToRemove[n++]=u))}if(c(this.depthFailAppearanceType)&&u.depthFailMaterialProperty instanceof kn&&(!u.depthFailMaterialProperty.isConstant||l)){const x=te.getValueOrDefault(u.depthFailMaterialProperty.color,e,Z.WHITE,$ie);Z.equals(h._lastDepthFailColor,x)||(h._lastDepthFailColor=Z.clone(x,h._lastDepthFailColor),h.depthFailColor=ei.toValue(x,h.depthFailColor))}const m=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e));m!==(1===h.show[0])&&(h.show=Pi.toValue(m,h.show));const p=u.distanceDisplayConditionProperty;if(!te.isConstant(p)){const b=te.getValueOrDefault(p,e,cit,ait);Qn.equals(b,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Qn.clone(b,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=_o.toValue(b,h.distanceDisplayCondition))}const y=u.terrainOffsetProperty;if(!te.isConstant(y)){const b=te.getValueOrDefault(y,e,lit,uit);f.equals(b,h._lastOffset)||(h._lastOffset=f.clone(b,h._lastOffset),h.offset=os.toValue(b,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else c(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t},Sd.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=this.geometry.get(o.id);let s=this.attributes.get(r.id.id);c(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));const a=o.entity.isShowing;a!==(1===s.show[0])&&(s.show=Pi.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},Sd.prototype.contains=function(e){return this.updaters.contains(e.id)},Sd.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return en.PENDING;const i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&0===i.show[0]?en.FAILED:(i.boundingSphere.clone(t),en.DONE)},Sd.prototype.destroy=function(){const e=this.primitive,t=this.primitives;c(e)&&t.remove(e);const n=this.oldPrimitive;c(n)&&t.remove(n),c(this.removeMaterialSubscription)&&this.removeMaterialSubscription()},wT.prototype.add=function(e,t){let n,i;const o=t.createFillGeometryInstance(e);255===o.attributes.color.value[3]?(n=this._solidItems,i=!1):(n=this._translucentItems,i=!0);const r=n.length;for(let a=0;a<r;a++){const l=n[a];if(l.isMaterial(t))return void l.add(t,o)}const s=new Sd(this._primitives,i,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);s.add(t,o),n.push(s)},wT.prototype.remove=function(e){Kie(this._solidItems,e)||Kie(this._translucentItems,e)},wT.prototype.update=function(e){let t=U1(this,this._solidItems,e,!0);t=U1(this,this._translucentItems,e,t)&&t;const n=Qie(this,this._solidItems,e),i=Qie(this,this._translucentItems,e);return(n||i)&&(t=U1(this,this._solidItems,e,t)&&t,t=U1(this,this._translucentItems,e,t)&&t),t},wT.prototype.getBoundingSphere=function(e,t){const n=Jie(this._solidItems,e,t);return n===en.FAILED?Jie(this._translucentItems,e,t):n},wT.prototype.removeAllPrimitives=function(){eoe(this._solidItems),eoe(this._translucentItems)};const Cy=wT,dit=new Qn,fit=new Qn,hit=f.ZERO,pit=new f;function vd(e,t,n,i,o,r,s){this.primitives=e,this.appearanceType=t,this.materialProperty=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.closed=r,this.shadows=s,this.updaters=new mn,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new mn,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new mn,this.attributes=new mn,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(vd.prototype.onMaterialChanged,this),this.subscriptions=new mn,this.showsUpdated=new mn}vd.prototype.onMaterialChanged=function(){this.invalidated=!0},vd.prototype.isMaterial=function(e){const t=this.materialProperty,n=e.fillMaterialProperty,i=this.depthFailMaterialProperty,o=e.depthFailMaterialProperty;if(n===t&&o===i)return!0;let r=c(t)&&t.equals(n);return r=(!c(i)&&!c(o)||c(i)&&i.equals(o))&&r,r},vd.prototype.add=function(e,t){const n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,t.createFillGeometryInstance(e)),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&te.isConstant(t.distanceDisplayConditionProperty)&&te.isConstant(t.terrainOffsetProperty)){const i=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener(function(o,r,s,a){"isShowing"===r&&i.showsUpdated.set(t.id,t)}))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},vd.prototype.remove=function(e){const t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);const n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};const mit=new Z;function ST(e,t,n,i,o){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}vd.prototype.update=function(e){let t=!0,n=this.primitive;const i=this.primitives,o=this.geometry.values;let r;if(this.createPrimitive){if(o.length>0){let a;c(n)&&(c(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=hc.getValue(e,this.materialProperty,this.material),c(this.depthFailMaterialProperty)&&(this.depthFailMaterial=hc.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),n=new Yi({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{c(n)&&(i.remove(n),n=void 0);const a=this.oldPrimitive;c(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(c(n)&&n.ready){n.show=!0,c(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=hc.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,c(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof kn)&&(this.depthFailMaterial=hc.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);const s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){const l=s[r],u=l.entity,d=this.geometry.get(l.id);let h=this.attributes.get(d.id.id);if(c(h)||(h=n.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),c(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof kn&&!l.depthFailMaterialProperty.isConstant){const x=te.getValueOrDefault(l.depthFailMaterialProperty.color,e,Z.WHITE,mit);Z.equals(h._lastDepthFailColor,x)||(h._lastDepthFailColor=Z.clone(x,h._lastDepthFailColor),h.depthFailColor=ei.toValue(x,h.depthFailColor))}const m=u.isShowing&&(l.hasConstantFill||l.isFilled(e));m!==(1===h.show[0])&&(h.show=Pi.toValue(m,h.show));const p=l.distanceDisplayConditionProperty;if(!te.isConstant(p)){const b=te.getValueOrDefault(p,e,fit,dit);Qn.equals(b,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Qn.clone(b,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=_o.toValue(b,h.distanceDisplayCondition))}const y=l.terrainOffsetProperty;if(!te.isConstant(y)){const b=te.getValueOrDefault(y,e,hit,pit);f.equals(b,h._lastOffset)||(h._lastOffset=f.clone(b,h._lastOffset),h.offset=os.toValue(b,h.offset))}}this.updateShows(n)}else c(n)&&!n.ready&&(t=!1);return t},vd.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=o.entity,s=this.geometry.get(o.id);let a=this.attributes.get(s.id.id);c(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));const l=r.isShowing;l!==(1===a.show[0])&&(a.show=Pi.toValue(l,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},vd.prototype.contains=function(e){return this.updaters.contains(e.id)},vd.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return en.PENDING;const i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&0===i.show[0]?en.FAILED:(i.boundingSphere.clone(t),en.DONE)},vd.prototype.destroy=function(){const e=this.primitive,t=this.primitives;c(e)&&t.remove(e);const n=this.oldPrimitive;c(n)&&t.remove(n),this.removeMaterialSubscription()},ST.prototype.add=function(e,t){const n=this._items,i=n.length;for(let r=0;r<i;r++){const s=n[r];if(s.isMaterial(t))return void s.add(e,t)}const o=new vd(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);o.add(e,t),n.push(o)},ST.prototype.remove=function(e){const t=this._items;for(let i=t.length-1;i>=0;i--){const o=t[i];if(o.remove(e)){0===o.updaters.length&&(t.splice(i,1),o.destroy());break}}},ST.prototype.update=function(e){let t;const n=this._items;for(t=n.length-1;t>=0;t--){const r=n[t];if(r.invalidated){n.splice(t,1);const s=r.updaters.values,a=s.length;for(let l=0;l<a;l++)this.add(e,s[l]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o},ST.prototype.getBoundingSphere=function(e,t){const n=this._items,i=n.length;for(let o=0;o<i;o++){const r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return en.FAILED},ST.prototype.removeAllPrimitives=function(){const e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};const Ey=ST;var _it=wt(3727);function z1(){this._tree=new _it}function wy(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}function git(e,t){return e.id===t.id}wy.fromRectangleAndId=function(e,t,n){return n.minX=t.west,n.minY=t.south,n.maxX=t.east,n.maxY=t.north,n.id=e,n},z1.prototype.insert=function(e,t){A.typeOf.string("id",e),A.typeOf.object("rectangle",t);const n=wy.fromRectangleAndId(e,t,new wy);this._tree.insert(n)};const yit=new wy;z1.prototype.remove=function(e,t){A.typeOf.string("id",e),A.typeOf.object("rectangle",t);const n=wy.fromRectangleAndId(e,t,yit);this._tree.remove(n,git)};const bit=new wy;z1.prototype.collides=function(e){A.typeOf.object("rectangle",e);const t=wy.fromRectangleAndId("",e,bit);return this._tree.collides(t)};const toe=z1,Tit=new Z,Ait=new Qn,xit=new Qn;function np(e,t,n,i){this.primitives=e,this.zIndex=i,this.classificationType=t,this.color=n,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new mn,this.updaters=new mn,this.updatersWithAttributes=new mn,this.attributes=new mn,this.subscriptions=new mn,this.showsUpdated=new mn,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new toe}function vT(e,t){this._batches=[],this._primitives=e,this._classificationType=t}np.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},np.prototype.add=function(e,t){const n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),this.rectangleCollisionCheck.insert(n,t.geometry.rectangle),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&te.isConstant(e.distanceDisplayConditionProperty)){const i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))}else this.updatersWithAttributes.set(n,e)},np.prototype.remove=function(e){const t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);const i=this.subscriptions.get(t);return c(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},np.prototype.update=function(e){let t=!0,i=this.primitive;const o=this.primitives;let r;if(this.createPrimitive){const s=this.geometry.values;if(s.length>0)c(i)&&(c(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new Cb({show:!1,asynchronous:!0,geometryInstances:s.slice(),classificationType:this.classificationType}),o.add(i,this.zIndex),t=!1;else{c(i)&&(o.remove(i),i=void 0);const l=this.oldPrimitive;c(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(c(i)&&i.ready){i.show=!0,c(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);const s=this.updatersWithAttributes.values,a=s.length,l=this.waitingOnCreate;for(r=0;r<a;r++){const u=s[r],d=this.geometry.get(u.id);let h=this.attributes.get(d.id.id);if(c(h)||(h=i.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),!u.fillMaterialProperty.isConstant||l){const b=te.getValueOrDefault(u.fillMaterialProperty.color,e,Z.WHITE,Tit);Z.equals(h._lastColor,b)||(h._lastColor=Z.clone(b,h._lastColor),h.color=ei.toValue(b,h.color))}const m=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e));m!==(1===h.show[0])&&(h.show=Pi.toValue(m,h.show));const p=u.distanceDisplayConditionProperty;if(!te.isConstant(p)){const y=te.getValueOrDefault(p,e,xit,Ait);Qn.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Qn.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=_o.toValue(y,h.distanceDisplayCondition))}}this.updateShows(i),this.waitingOnCreate=!1}else c(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=0,t},np.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=this.geometry.get(o.id);let s=this.attributes.get(r.id.id);c(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));const a=o.entity.isShowing;a!==(1===s.show[0])&&(s.show=Pi.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},np.prototype.contains=function(e){return this.updaters.contains(e.id)},np.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return en.PENDING;const i=n.getBoundingSphere(e.entity);return c(i)?(i.clone(t),en.DONE):en.FAILED},np.prototype.removeAllPrimitives=function(){const e=this.primitives,t=this.primitive;c(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());const n=this.oldPrimitive;c(n)&&(e.remove(n),this.oldPrimitive=void 0)},vT.prototype.add=function(e,t){const n=t.createFillGeometryInstance(e),i=this._batches,o=te.getValueOrDefault(t.zIndex,0);let r;const s=i.length;for(let a=0;a<s;++a){const l=i[a];if(l.zIndex===o&&!l.overlapping(n.geometry.rectangle)){r=l;break}}return c(r)||(r=new np(this._primitives,this._classificationType,n.attributes.color.value,o),i.push(r)),r.add(t,n),r},vT.prototype.remove=function(e){const t=this._batches,n=t.length;for(let i=0;i<n;++i)if(t[i].remove(e))return},vT.prototype.update=function(e){let t,n,i=!0;const o=this._batches,r=o.length;for(t=0;t<r;++t)i=o[t].update(e)&&i;for(t=0;t<r;++t){const s=o[t],a=s.itemsToRemove,l=a.length;for(let u=0;u<l;u++){n=a[u],s.remove(n);const d=this.add(e,n);s.isDirty=!0,d.isDirty=!0}}for(t=r-1;t>=0;--t){const s=o[t];s.isDirty&&(i=o[t].update(e)&&i,s.isDirty=!1),0===s.geometry.length&&o.splice(t,1)}return i},vT.prototype.getBoundingSphere=function(e,t){const n=this._batches,i=n.length;for(let o=0;o<i;++o){const r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return en.FAILED},vT.prototype.removeAllPrimitives=function(){const e=this._batches,t=e.length;for(let n=0;n<t;++n)e[n].removeAllPrimitives()};const noe=vT,Cit=new Qn,Eit=new Qn;function wu(e,t,n,i,o,r){this.primitives=e,this.classificationType=t,this.appearanceType=n,this.materialProperty=i,this.updaters=new mn,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new mn,this.material=void 0,this.updatersWithAttributes=new mn,this.attributes=new mn,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(wu.prototype.onMaterialChanged,this),this.subscriptions=new mn,this.showsUpdated=new mn,this.usingSphericalTextureCoordinates=o,this.zIndex=r,this.rectangleCollisionCheck=new toe}function IT(e,t,n){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=n}wu.prototype.onMaterialChanged=function(){this.invalidated=!0},wu.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},wu.prototype.isMaterial=function(e){const t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof kn&&t instanceof kn||c(t)&&t.equals(n)},wu.prototype.add=function(e,t,n){const i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),this.rectangleCollisionCheck.insert(i,n.geometry.rectangle),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&te.isConstant(t.distanceDisplayConditionProperty)){const o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,l){"isShowing"===s&&o.showsUpdated.set(t.id,t)}))}else this.updatersWithAttributes.set(i,t);this.createPrimitive=!0},wu.prototype.remove=function(e){const t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);const i=this.subscriptions.get(t);return c(i)&&(i(),this.subscriptions.remove(t)),!0}return!1},wu.prototype.update=function(e){let t=!0,n=this.primitive;const i=this.primitives,o=this.geometry.values;let r;if(this.createPrimitive){if(o.length>0)c(n)&&(c(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=hc.getValue(e,this.materialProperty,this.material),n=new Cb({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{c(n)&&(i.remove(n),n=void 0);const a=this.oldPrimitive;c(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(c(n)&&n.ready){n.show=!0,c(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=hc.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;const s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){const l=s[r],u=l.entity,d=this.geometry.get(l.id);let h=this.attributes.get(d.id.id);c(h)||(h=n.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h));const m=u.isShowing&&(l.hasConstantFill||l.isFilled(e));m!==(1===h.show[0])&&(h.show=Pi.toValue(m,h.show));const p=l.distanceDisplayConditionProperty;if(!te.isConstant(p)){const y=te.getValueOrDefault(p,e,Eit,Cit);Qn.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Qn.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=_o.toValue(y,h.distanceDisplayCondition))}}this.updateShows(n)}else c(n)&&!n.ready&&(t=!1);return t},wu.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=o.entity,s=this.geometry.get(o.id);let a=this.attributes.get(s.id.id);c(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));const l=r.isShowing;l!==(1===a.show[0])&&(a.show=Pi.toValue(l,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},wu.prototype.contains=function(e){return this.updaters.contains(e.id)},wu.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return en.PENDING;const i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&0===i.show[0]?en.FAILED:(i.boundingSphere.clone(t),en.DONE)},wu.prototype.destroy=function(){const e=this.primitive,t=this.primitives;c(e)&&t.remove(e);const n=this.oldPrimitive;c(n)&&t.remove(n),this.removeMaterialSubscription()},IT.prototype.add=function(e,t){const n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=xg.shouldUseSphericalCoordinates(o.geometry.rectangle),s=te.getValueOrDefault(t.zIndex,0);for(let l=0;l<i;++l){const u=n[l];if(u.isMaterial(t)&&u.usingSphericalTextureCoordinates===r&&u.zIndex===s&&!u.overlapping(o.geometry.rectangle))return void u.add(e,t,o)}const a=new wu(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,r,s);a.add(e,t,o),n.push(a)},IT.prototype.remove=function(e){const t=this._items;for(let i=t.length-1;i>=0;i--){const o=t[i];if(o.remove(e)){0===o.updaters.length&&(t.splice(i,1),o.destroy());break}}},IT.prototype.update=function(e){let t;const n=this._items;for(t=n.length-1;t>=0;t--){const r=n[t];if(r.invalidated){n.splice(t,1);const s=r.updaters.values,a=s.length;for(let l=0;l<a;l++)this.add(e,s[l]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o},IT.prototype.getBoundingSphere=function(e,t){const n=this._items,i=n.length;for(let o=0;o<i;o++){const r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return en.FAILED},IT.prototype.removeAllPrimitives=function(){const e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};const wit=IT,Sit=new Z,vit=new Qn,Iit=new Qn,Dit=f.ZERO,Pit=new f;function ip(e,t,n,i){this.translucent=t,this.width=n,this.shadows=i,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new mn,this.updaters=new mn,this.updatersWithAttributes=new mn,this.attributes=new mn,this.itemsToRemove=[],this.subscriptions=new mn,this.showsUpdated=new mn}function DT(e,t,n){this._primitives=e,this._scene=t,this._shadows=n,this._solidBatches=new mn,this._translucentBatches=new mn}ip.prototype.add=function(e,t){const n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant&&te.isConstant(e.distanceDisplayConditionProperty)&&te.isConstant(e.terrainOffsetProperty)){const i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))}else this.updatersWithAttributes.set(n,e)},ip.prototype.remove=function(e){const t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);const n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},ip.prototype.update=function(e){let t=!0,n=0,i=this.primitive;const o=this.primitives;let r;if(this.createPrimitive){const s=this.geometry.values;if(s.length>0)c(i)&&(c(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new Yi({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new gi({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),o.add(i),t=!1;else{c(i)&&(o.remove(i),i=void 0);const l=this.oldPrimitive;c(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(c(i)&&i.ready){i.show=!0,c(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);const s=this.updatersWithAttributes.values,a=s.length,l=this.waitingOnCreate;for(r=0;r<a;r++){const u=s[r],d=this.geometry.get(u.id);let h=this.attributes.get(d.id.id);if(c(h)||(h=i.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),!u.outlineColorProperty.isConstant||l){const x=te.getValueOrDefault(u.outlineColorProperty,e,Z.WHITE,Sit);Z.equals(h._lastColor,x)||(h._lastColor=Z.clone(x,h._lastColor),h.color=ei.toValue(x,h.color),(this.translucent&&255===h.color[3]||!this.translucent&&255!==h.color[3])&&(this.itemsToRemove[n++]=u))}const m=u.entity.isShowing&&(u.hasConstantOutline||u.isOutlineVisible(e));m!==(1===h.show[0])&&(h.show=Pi.toValue(m,h.show));const p=u.distanceDisplayConditionProperty;if(!te.isConstant(p)){const b=te.getValueOrDefault(p,e,Iit,vit);Qn.equals(b,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Qn.clone(b,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=_o.toValue(b,h.distanceDisplayCondition))}const y=u.terrainOffsetProperty;if(!te.isConstant(y)){const b=te.getValueOrDefault(y,e,Dit,Pit);f.equals(b,h._lastOffset)||(h._lastOffset=f.clone(b,h._lastOffset),h.offset=os.toValue(b,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else c(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t},ip.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=this.geometry.get(o.id);let s=this.attributes.get(r.id.id);c(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));const a=o.entity.isShowing;a!==(1===s.show[0])&&(s.show=Pi.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},ip.prototype.contains=function(e){return this.updaters.contains(e.id)},ip.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return en.PENDING;const i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&0===i.show[0]?en.FAILED:(i.boundingSphere.clone(t),en.DONE)},ip.prototype.removeAllPrimitives=function(){const e=this.primitives,t=this.primitive;c(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());const n=this.oldPrimitive;c(n)&&(e.remove(n),this.oldPrimitive=void 0)},DT.prototype.add=function(e,t){const n=t.createOutlineGeometryInstance(e),i=this._scene.clampLineWidth(t.outlineWidth);let o,r;255===n.attributes.color.value[3]?(o=this._solidBatches,r=o.get(i),c(r)||(r=new ip(this._primitives,!1,i,this._shadows),o.set(i,r)),r.add(t,n)):(o=this._translucentBatches,r=o.get(i),c(r)||(r=new ip(this._primitives,!0,i,this._shadows),o.set(i,r)),r.add(t,n))},DT.prototype.remove=function(e){let t;const n=this._solidBatches.values,i=n.length;for(t=0;t<i;t++)if(n[t].remove(e))return;const o=this._translucentBatches.values,r=o.length;for(t=0;t<r;t++)if(o[t].remove(e))return},DT.prototype.update=function(e){let t,n,i,o;const r=this._solidBatches.values,s=r.length,a=this._translucentBatches.values,l=a.length;let u,d=!0,h=!1;do{for(h=!1,n=0;n<s;n++){o=r[n],d=o.update(e),u=o.itemsToRemove;const m=u.length;if(m>0)for(h=!0,t=0;t<m;t++)i=u[t],o.remove(i),this.add(e,i)}for(n=0;n<l;n++){o=a[n],d=o.update(e),u=o.itemsToRemove;const m=u.length;if(m>0)for(h=!0,t=0;t<m;t++)i=u[t],o.remove(i),this.add(e,i)}}while(h);return d},DT.prototype.getBoundingSphere=function(e,t){let n;const i=this._solidBatches.values,o=i.length;for(n=0;n<o;n++){const a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}const r=this._translucentBatches.values,s=r.length;for(n=0;n<s;n++){const a=r[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return en.FAILED},DT.prototype.removeAllPrimitives=function(){let e;const t=this._solidBatches.values,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();const i=this._translucentBatches.values,o=i.length;for(e=0;e<o;e++)i[e].removeAllPrimitives()};const ioe=DT,Oit=[];function Yc(e,t,n,i){A.defined("scene",e),A.defined("entityCollection",t),n=g(n,e.primitives),i=g(i,e.groundPrimitives),this._scene=e,this._primitives=n,this._groundPrimitives=i,this._entityCollection=void 0,this._addedObjects=new mn,this._removedObjects=new mn,this._changedObjects=new mn;const o=Ko.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(2*o),this._closedColorBatches=new Array(2*o),this._closedMaterialBatches=new Array(2*o),this._openColorBatches=new Array(2*o),this._openMaterialBatches=new Array(2*o);const r=Fc.supportsMaterialsforEntitiesOnTerrain(e);let s;for(this._supportsMaterialsforEntitiesOnTerrain=r,s=0;s<o;++s)this._outlineBatches[s]=new ioe(n,e,s,!1),this._outlineBatches[o+s]=new ioe(n,e,s,!0),this._closedColorBatches[s]=new Cy(n,gi,void 0,!0,s,!0),this._closedColorBatches[o+s]=new Cy(n,gi,void 0,!0,s,!1),this._closedMaterialBatches[s]=new Ey(n,ca,void 0,!0,s,!0),this._closedMaterialBatches[o+s]=new Ey(n,ca,void 0,!0,s,!1),this._openColorBatches[s]=new Cy(n,gi,void 0,!1,s,!0),this._openColorBatches[o+s]=new Cy(n,gi,void 0,!1,s,!1),this._openMaterialBatches[s]=new Ey(n,ca,void 0,!1,s,!0),this._openMaterialBatches[o+s]=new Ey(n,ca,void 0,!1,s,!1);const a=Xo.NUMBER_OF_CLASSIFICATION_TYPES,l=new Array(a),u=[];if(r)for(s=0;s<a;++s)u.push(new wit(i,s,ca)),l[s]=new noe(i,s);else for(s=0;s<a;++s)l[s]=new noe(i,s);this._groundColorBatches=l,this._groundMaterialBatches=u,this._dynamicBatch=new Zte(n,i),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new mn,this._updaterSets=new mn,this._entityCollection=t,t.collectionChanged.addEventListener(Yc.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,Oit)}Yc.registerUpdater=function(e){wU.registerUpdater(e)},Yc.unregisterUpdater=function(e){wU.unregisterUpdater(e)},Yc.prototype.update=function(e){A.defined("time",e);const t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.values;let a,l,u,d;const h=this;for(a=s.length-1;a>-1;a--)l=s[a],u=l.id,d=this._updaterSets.get(u),d.entity===l?d.forEach(function(y){h._removeUpdater(y),h._insertUpdaterIntoBatch(e,y)}):(o.push(l),n.push(l));for(a=o.length-1;a>-1;a--)l=o[a],u=l.id,d=this._updaterSets.get(u),d.forEach(this._removeUpdater.bind(this)),d.destroy(),this._updaterSets.remove(u),this._subscriptions.get(u)(),this._subscriptions.remove(u);for(a=n.length-1;a>-1;a--)l=n[a],u=l.id,d=new wU(l,this._scene),this._updaterSets.set(u,d),d.forEach(function(y){h._insertUpdaterIntoBatch(e,y)}),this._subscriptions.set(u,d.geometryChanged.addEventListener(Yc._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let m=!0;const _=this._batches,p=_.length;for(a=0;a<p;a++)m=_[a].update(e)&&m;return m};const Rit=[],Lit=new Ae;Yc.prototype.getBoundingSphere=function(e,t){A.defined("entity",e),A.defined("result",t);const n=Rit,i=Lit;let o=0,r=en.DONE;const s=this._batches,a=s.length,u=this._updaterSets.get(e.id).updaters;for(let d=0;d<u.length;d++){const h=u[d];for(let m=0;m<a;m++){if(r=s[m].getBoundingSphere(h,i),r===en.PENDING)return en.PENDING;r===en.DONE&&(n[o]=Ae.clone(i,n[o]),o++)}}return 0===o?en.FAILED:(n.length=o,Ae.fromBoundingSpheres(n,t),en.DONE)},Yc.prototype.isDestroyed=function(){return!1},Yc.prototype.destroy=function(){let e;this._entityCollection.collectionChanged.removeEventListener(Yc.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();const t=this._batches;let n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();const i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();this._subscriptions.removeAll();const o=this._updaterSets.values;for(n=o.length,e=0;e<n;e++)o[e].destroy();return this._updaterSets.removeAll(),Xe(this)},Yc.prototype._removeUpdater=function(e){const t=this._batches,n=t.length;for(let i=0;i<n;i++)t[i].remove(e)},Yc.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic)return void this._dynamicBatch.add(e,t);let n;(t.outlineEnabled||t.fillEnabled)&&(n=t.shadowsProperty.getValue(e));const i=Ko.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(c(t.terrainOffsetProperty)?this._outlineBatches[i+n].add(e,t):this._outlineBatches[n].add(e,t)),t.fillEnabled)if(t.onTerrain){const o=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof kn?this._groundColorBatches[o].add(e,t):this._groundMaterialBatches[o].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof kn?c(t.terrainOffsetProperty)?this._closedColorBatches[i+n].add(e,t):this._closedColorBatches[n].add(e,t):c(t.terrainOffsetProperty)?this._closedMaterialBatches[i+n].add(e,t):this._closedMaterialBatches[n].add(e,t):t.fillMaterialProperty instanceof kn?c(t.terrainOffsetProperty)?this._openColorBatches[i+n].add(e,t):this._openColorBatches[n].add(e,t):c(t.terrainOffsetProperty)?this._openMaterialBatches[i+n].add(e,t):this._openMaterialBatches[n].add(e,t)},Yc._onGeometryChanged=function(e){const n=this._changedObjects,i=e.entity,o=i.id;!c(this._removedObjects.get(o))&&!c(n.get(o))&&n.set(o,i)},Yc.prototype._onCollectionChanged=function(e,t,n){const i=this._addedObjects,o=this._removedObjects,r=this._changedObjects;let s,a,l;for(s=n.length-1;s>-1;s--)l=n[s],a=l.id,i.remove(a)||(o.set(a,l),r.remove(a));for(s=t.length-1;s>-1;s--)l=t[s],a=l.id,o.remove(a)?r.set(a,l):i.set(a,l)};const Nit=Yc,Bit=Ql.FILL,kit=Z.WHITE,Uit=Z.BLACK,Hit=new Z(.165,.165,.165,.8),Git=new V(7,5),jit=V.ZERO,Wit=f.ZERO,qit=tn.NONE,Yit=Da.CENTER,Xit=lo.CENTER,Zit=new f,$it=new Z,Kit=new Z,Qit=new Z,Jit=new V,eot=new f,tot=new V,not=new Bn,iot=new Bn,oot=new Bn,rot=new Qn;function ooe(e){this.entity=e,this.label=void 0,this.index=void 0}function Gm(e,t){if(!c(e))throw new E("entityCluster is required.");if(!c(t))throw new E("entityCollection is required.");t.collectionChanged.addEventListener(Gm.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new mn,this._onCollectionChanged(t,t.values,[],[])}function SU(e,t,n){c(e)&&(e.label=void 0,n.removeLabel(t))}Gm.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){const r=t[i],s=r.entity,a=s._label;let l,h,u=r.label,d=s.isShowing&&s.isAvailable(e)&&te.getValueOrDefault(a._show,e,!0);if(d&&(h=te.getValueOrUndefined(s._position,e,Zit),l=te.getValueOrUndefined(a._text,e),d=c(h)&&c(l)),!d){SU(r,s,n);continue}te.isConstant(s._position)||(n._clusterDirty=!0);let m=!1;const _=te.getValueOrDefault(a._heightReference,e,qit);c(u)||(u=n.getLabel(s),u.id=s,r.label=u,m=f.equals(u.position,h)&&u.heightReference===_),u.show=!0,u.position=h,u.text=l,u.scale=te.getValueOrDefault(a._scale,e,1),u.font=te.getValueOrDefault(a._font,e,"30px sans-serif"),u.style=te.getValueOrDefault(a._style,e,Bit),u.fillColor=te.getValueOrDefault(a._fillColor,e,kit,$it),u.outlineColor=te.getValueOrDefault(a._outlineColor,e,Uit,Kit),u.outlineWidth=te.getValueOrDefault(a._outlineWidth,e,1),u.showBackground=te.getValueOrDefault(a._showBackground,e,!1),u.backgroundColor=te.getValueOrDefault(a._backgroundColor,e,Hit,Qit),u.backgroundPadding=te.getValueOrDefault(a._backgroundPadding,e,Git,Jit),u.pixelOffset=te.getValueOrDefault(a._pixelOffset,e,jit,tot),u.eyeOffset=te.getValueOrDefault(a._eyeOffset,e,Wit,eot),u.heightReference=_,u.horizontalOrigin=te.getValueOrDefault(a._horizontalOrigin,e,Yit),u.verticalOrigin=te.getValueOrDefault(a._verticalOrigin,e,Xit),u.translucencyByDistance=te.getValueOrUndefined(a._translucencyByDistance,e,not),u.pixelOffsetScaleByDistance=te.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,iot),u.scaleByDistance=te.getValueOrUndefined(a._scaleByDistance,e,oot),u.distanceDisplayCondition=te.getValueOrUndefined(a._distanceDisplayCondition,e,rot),u.disableDepthTestDistance=te.getValueOrUndefined(a._disableDepthTestDistance,e),m&&u._updateClamping()}return!0},Gm.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new E("entity is required.");if(!c(t))throw new E("result is required.");const n=this._items.get(e.id);if(!c(n)||!c(n.label))return en.FAILED;const i=n.label;return t.center=f.clone(g(i._clampedPosition,i.position),t.center),t.radius=0,en.DONE},Gm.prototype.isDestroyed=function(){return!1},Gm.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Gm.prototype._onCollectionChanged,this);const e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return Xe(this)},Gm.prototype._onCollectionChanged=function(e,t,n,i){let o,r;const s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],c(r._label)&&c(r._position)&&s.set(r.id,new ooe(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._label)&&c(r._position)?s.contains(r.id)||s.set(r.id,new ooe(r)):(SU(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],SU(s.get(r.id),r,a),s.remove(r.id)};const sot=Gm,dot=Ko.ENABLED,fot=tn.NONE,hot=Z.RED,mot=Z.WHITE,_ot=XS.HIGHLIGHT,yot=new V(1,1),bot=new k,Tot=new k,roe=new Z,soe=new Array(4),Aot=new f;function jm(e,t){A.typeOf.object("scene",e),A.typeOf.object("entityCollection",t),t.collectionChanged.addEventListener(jm.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new mn,this._onCollectionChanged(t,t.values,[],[])}function xot(e,t,n,i){return vU.apply(this,arguments)}function vU(){return vU=(0,we.Z)(function*(e,t,n,i){const o=e._primitives,r=e._modelHash;try{const s=yield G0.fromGltfAsync({url:n,incrementallyLoadTextures:i,scene:e._scene});if(e.isDestroyed()||!c(r[t.id]))return;s.id=t,o.add(s),r[t.id].modelPrimitive=s,s.errorEvent.addEventListener(a=>{c(r[t.id])&&(console.log(a),"TextureError"!==a.name&&s.incrementallyLoadTextures&&(r[t.id].loadFailed=!0))})}catch(s){if(e.isDestroyed()||!c(r[t.id]))return;console.log(s),r[t.id].loadFailed=!0}}),vU.apply(this,arguments)}jm.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._entitiesToVisualize.values,n=this._modelHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){const s=t[o],a=s._model;let l,h,u=n[s.id],d=s.isShowing&&s.isAvailable(e)&&te.getValueOrDefault(a._show,e,!0);if(d&&(h=s.computeModelMatrix(e,bot),l=zt.createIfNeeded(te.getValueOrUndefined(a._uri,e)),d=c(h)&&c(l)),!d){c(u)&&u.modelPrimitive&&(u.modelPrimitive.show=!1);continue}c(u)&&l.url===u.url||(c(u?.modelPrimitive)&&(i.removeAndDestroy(u.modelPrimitive),delete n[s.id]),u={modelPrimitive:void 0,url:l.url,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFailed:!1,modelUpdated:!1},n[s.id]=u,xot(this,s,l,te.getValueOrDefault(a._incrementallyLoadTextures,e,!0)));const m=u.modelPrimitive;if(!c(m))continue;m.show=!0,m.scale=te.getValueOrDefault(a._scale,e,1),m.minimumPixelSize=te.getValueOrDefault(a._minimumPixelSize,e,0),m.maximumScale=te.getValueOrUndefined(a._maximumScale,e),m.modelMatrix=k.clone(h,m.modelMatrix),m.shadows=te.getValueOrDefault(a._shadows,e,dot),m.heightReference=te.getValueOrDefault(a._heightReference,e,fot),m.distanceDisplayCondition=te.getValueOrUndefined(a._distanceDisplayCondition,e),m.silhouetteColor=te.getValueOrDefault(a._silhouetteColor,e,hot,roe),m.silhouetteSize=te.getValueOrDefault(a._silhouetteSize,e,0),m.color=te.getValueOrDefault(a._color,e,mot,roe),m.colorBlendMode=te.getValueOrDefault(a._colorBlendMode,e,_ot),m.colorBlendAmount=te.getValueOrDefault(a._colorBlendAmount,e,.5),m.clippingPlanes=te.getValueOrUndefined(a._clippingPlanes,e),m.clampAnimations=te.getValueOrDefault(a._clampAnimations,e,!0),m.imageBasedLighting.imageBasedLightingFactor=te.getValueOrDefault(a._imageBasedLightingFactor,e,yot);let _=te.getValueOrUndefined(a._lightColor,e);if(c(_)&&(Z.pack(_,soe,0),_=f.unpack(soe,0,Aot)),m.lightColor=_,m.customShader=te.getValueOrUndefined(a._customShader,e),n[s.id].modelUpdated=!0,m.ready){const p=te.getValueOrDefault(a._runAnimations,e,!0);u.animationsRunning!==p&&(p?m.activeAnimations.addAll({loop:k_.REPEAT}):m.activeAnimations.removeAll(),u.animationsRunning=p);const y=te.getValueOrUndefined(a._nodeTransformations,e,u.nodeTransformationsScratch);if(c(y)){const C=Object.keys(y);for(let w=0,v=C.length;w<v;++w){const I=C[w],P=y[I];if(!c(P))continue;const N=m.getNode(I);if(!c(N))continue;const R=k.fromTranslationRotationScale(P,Tot);N.matrix=k.multiply(N.originalMatrix,R,R)}}let b=!1;const x=te.getValueOrUndefined(a._articulations,e,u.articulationsScratch);if(c(x)){const C=Object.keys(x);for(let w=0,v=C.length;w<v;++w){const I=C[w],P=x[I];c(P)&&(b=!0,m.setArticulationStage(I,P))}}b&&m.applyArticulations()}}return!0},jm.prototype.isDestroyed=function(){return!1},jm.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(jm.prototype._onCollectionChanged,this);const e=this._entitiesToVisualize.values,t=this._modelHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)IU(0,e[i],t,n);return Xe(this)};const V1=new f,Cot=new Ce;function IU(e,t,n,i){const o=n[t.id];c(o)&&(i.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function Eot(e,t){const n=t[e.id];c(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}jm.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new E("entity is required.");if(!c(t))throw new E("result is required.");const n=this._modelHash[e.id];if(!c(n)||n.loadFailed)return en.FAILED;const i=n.modelPrimitive;if(!(c(i)&&i.show&&i.ready&&n.modelUpdated))return en.PENDING;const o=this._scene,r=g(o.ellipsoid,he.default);if(i.heightReference!==tn.NONE){const a=i.modelMatrix;V1.x=a[12],V1.y=a[13],V1.z=a[14];const l=r.cartesianToCartographic(V1,Cot),u=o.getHeight(l,i.heightReference);return c(u)&&(X_(i.heightReference)?l.height=u:l.height+=u),Ae.clone(i.boundingSphere,t),t.center=r.cartographicToCartesian(l),en.DONE}return Ae.clone(i.boundingSphere,t),en.DONE},jm.prototype._onCollectionChanged=function(e,t,n,i){let o,r;const s=this._entitiesToVisualize,a=this._modelHash,l=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],c(r._model)&&c(r._position)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],c(r._model)&&c(r._position)?(Eot(r,a),s.set(r.id,r)):(IU(0,r,a,l),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],IU(0,r,a,l),s.remove(r.id)};const wot=jm,Sot=new k;function Wm(e,t){if(!c(e))throw new E("scene is required.");if(!c(t))throw new E("entityCollection is required.");t.collectionChanged.addEventListener(Wm.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new mn,this._onCollectionChanged(t,t.values,[],[])}function DU(e,t,n,i){const o=n[t.id];c(o)&&(c(o.tilesetPrimitive)&&i.removeAndDestroy(o.tilesetPrimitive),delete n[t.id])}function vot(e,t,n,i){return PU.apply(this,arguments)}function PU(){return PU=(0,we.Z)(function*(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{const o=yield _g.fromUrl(e);if(o.id=n,i.add(o),!c(t[n.id]))return;t[n.id].tilesetPrimitive=o}catch(o){console.error(o),t[n.id].loadFail=!0}}),PU.apply(this,arguments)}Wm.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._entitiesToVisualize.values,n=this._tilesetHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){const s=t[o],a=s._tileset;let l;const u=n[s.id],d=s.isShowing&&s.isAvailable(e)&&te.getValueOrDefault(a._show,e,!0);let h;d&&(h=s.computeModelMatrix(e,Sot),l=zt.createIfNeeded(te.getValueOrUndefined(a._uri,e)));const m=c(u)?u.tilesetPrimitive:void 0;d?((!c(u)||l.url!==u.url)&&(c(m)&&i.removeAndDestroy(m),delete n[s.id],vot(l,n,s,i)),c(m)&&(m.show=!0,c(h)&&(m.modelMatrix=h),m.maximumScreenSpaceError=te.getValueOrDefault(a.maximumScreenSpaceError,e,m.maximumScreenSpaceError))):c(m)&&(m.show=!1)}return!0},Wm.prototype.isDestroyed=function(){return!1},Wm.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Wm.prototype._onCollectionChanged,this);const e=this._entitiesToVisualize.values,t=this._tilesetHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)DU(0,e[i],t,n);return Xe(this)},Wm.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new E("entity is required.");if(!c(t))throw new E("result is required.");const n=this._tilesetHash[e.id];if(!c(n)||n.loadFail)return en.FAILED;const i=n.tilesetPrimitive;return c(i)?i.show?(Ae.clone(i.boundingSphere,t),en.DONE):en.FAILED:en.PENDING},Wm.prototype._onCollectionChanged=function(e,t,n,i){let o,r;const s=this._entitiesToVisualize,a=this._tilesetHash,l=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],c(r._tileset)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],c(r._tileset)?s.set(r.id,r):(DU(0,r,a,l),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],DU(0,r,a,l),s.remove(r.id)};const Iot=Wm;function qm(e){this._definitionChanged=new Ye,this._intervals=new Jc,this._intervals.changedEvent.addEventListener(qm.prototype._intervalsChanged,this),this._referenceFrame=g(e,ta.FIXED)}Object.defineProperties(qm.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),qm.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ta.FIXED,t)},qm.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new E("time is required.");if(!c(t))throw new E("referenceFrame is required.");const i=this._intervals.findDataForIntervalContainingDate(e);if(c(i))return h2.convertToReferenceFrame(e,i,this._referenceFrame,t,n)},qm.prototype.equals=function(e){return this===e||e instanceof qm&&this._intervals.equals(e._intervals,te.equals)&&this._referenceFrame===e._referenceFrame},qm.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};const Dot=qm,aoe=new _i,OU=new _i,RU=new _i;function coe(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function loe(e,t,n,i,o,r,s,a){for(;e instanceof JZ;)e=e.resolvedProperty;return s=e instanceof vB?function Rot(e,t,n,i,o,r,s,a,l){let d,u=a;d=e.getValueInReferenceFrame(t,r,l[u]),c(d)&&(l[u++]=d);let h=!c(o)||re.lessThanOrEquals(o,t)||re.greaterThanOrEquals(o,n),m=0;const _=i.length;let p=i[m];const y=n;let x,C,w,b=!1;for(;m<_;){if(!h&&re.greaterThanOrEquals(p,o)&&(d=e.getValueInReferenceFrame(o,r,l[u]),c(d)&&(l[u++]=d),h=!0),re.greaterThan(p,t)&&re.lessThan(p,y)&&!p.equals(o)&&(d=e.getValueInReferenceFrame(p,r,l[u]),c(d)&&(l[u++]=d)),m<_-1){if(s>0&&!b){const I=re.secondsDifference(i[m+1],p);b=I>s,b&&(x=Math.ceil(I/s),C=0,w=I/Math.max(x,2),x=Math.max(x-1,1))}if(b&&C<x){p=re.addSeconds(p,w,new re),C++;continue}}b=!1,m++,p=i[m]}return d=e.getValueInReferenceFrame(n,r,l[u]),c(d)&&(l[u++]=d),u}(e,t,n,e._property._times,i,o,r,s,a):e instanceof XZ?function Fot(e,t,n,i,o,r,s,a){OU.start=t,OU.stop=n;let l=s;const u=e.intervals;for(let d=0;d<u.length;d++){const h=u.get(d);if(!_i.intersect(h,OU,aoe).isEmpty){const m=h.start,_=h.stop;let p=t;re.greaterThan(m,p)&&(p=m);let y=n;re.lessThan(_,y)&&(y=_),l=loe(h.data,p,y,i,o,r,l,a)}}return l}(e,t,n,i,o,r,s,a):e instanceof Dot?function Not(e,t,n,i,o,r,s,a){RU.start=t,RU.stop=n;let l=s;const u=e.intervals;for(let d=0;d<u.length;d++){const h=u.get(d);if(!_i.intersect(h,RU,aoe).isEmpty){let m=h.start;h.isStartIncluded||(m=h.isStopIncluded?h.stop:re.addSeconds(h.start,re.secondsDifference(h.stop,h.start)/2,new re));const _=e.getValueInReferenceFrame(m,o,a[l]);c(_)&&(a[l]=_,l++)}}return l}(e,t,n,0,o,0,s,a):e instanceof aI||e instanceof IB&&te.isConstant(e)?function Mot(e,t,n,i,o,r,s,a){const l=e.getValueInReferenceFrame(t,o,a[s]);return c(l)&&(a[s++]=l),s}(e,t,0,0,o,0,s,a):function Lot(e,t,n,i,o,r,s,a){let l,u=0,d=s,h=t;const m=Math.max(r,60);let _=!c(i)||re.lessThanOrEquals(i,t)||re.greaterThanOrEquals(i,n);for(;re.lessThan(h,n);)!_&&re.greaterThanOrEquals(h,i)&&(_=!0,l=e.getValueInReferenceFrame(i,o,a[d]),c(l)&&(a[d]=l,d++)),l=e.getValueInReferenceFrame(h,o,a[d]),c(l)&&(a[d]=l,d++),u++,h=re.addSeconds(t,m*u,new re);return l=e.getValueInReferenceFrame(n,o,a[d]),c(l)&&(a[d]=l,d++),d}(e,t,n,i,o,r,s,a),s}function uoe(e,t,n,i,o,r,s){c(s)||(s=[]);const a=loe(e,t,n,i,o,r,0,s);return s.length=a,s}const doe=new oe;function RE(e,t){this._unusedIndexes=[],this._polylineCollection=new vv,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}function Ym(e,t){if(!c(e))throw new E("scene is required.");if(!c(t))throw new E("entityCollection is required.");t.collectionChanged.addEventListener(Ym.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new mn,this._onCollectionChanged(t,t.values,[],[])}RE.prototype.update=function(e){if(this._referenceFrame===ta.INERTIAL){let t=In.computeIcrfToFixedMatrix(e,doe);c(t)||(t=In.computeTemeToPseudoFixedMatrix(e,doe)),k.fromRotationTranslation(t,f.ZERO,this._polylineCollection.modelMatrix)}},RE.prototype.updateObject=function(e,t){const n=t.entity,i=n._path,o=n._position;let r,s;const a=i._show;let l=t.polyline,u=n.isShowing&&n.isAvailable(e)&&(!c(a)||a.getValue(e));if(u){const h=te.getValueOrUndefined(i._leadTime,e),m=te.getValueOrUndefined(i._trailTime,e),_=n._availability,p=c(_),y=c(h),b=c(m);if(u=p||y&&b,u){if(b&&(r=re.addSeconds(e,-m,new re)),y&&(s=re.addSeconds(e,h,new re)),p){const x=_.start,C=_.stop;(!b||re.greaterThan(x,r))&&(r=x),(!y||re.lessThan(C,s))&&(s=C)}u=re.lessThan(r,s)}}if(!u)return void(c(l)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,l.show=!1,t.index=void 0));if(!c(l)){const h=this._unusedIndexes;if(h.length>0){const _=h.pop();l=this._polylineCollection.get(_),t.index=_}else t.index=this._polylineCollection.length,l=this._polylineCollection.add();l.id=n,t.polyline=l}const d=te.getValueOrDefault(i._resolution,e,60);l.show=!0,l.positions=uoe(o,r,s,e,this._referenceFrame,d,l.positions.slice()),l.material=hc.getValue(e,i._material,l.material),l.width=te.getValueOrDefault(i._width,e,1),l.distanceDisplayCondition=te.getValueOrUndefined(i._distanceDisplayCondition,e,l.distanceDisplayCondition)},RE.prototype.removeObject=function(e){const t=e.polyline;c(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},RE.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),Xe(this)},Ym.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._updaters;for(const i in t)t.hasOwnProperty(i)&&t[i].update(e);const n=this._items.values;if(0===n.length&&c(this._updaters)&&Object.keys(this._updaters).length>0){for(const i in t)t.hasOwnProperty(i)&&t[i].destroy();this._updaters={}}for(let i=0,o=n.length;i<o;i++){const r=n[i],l=r.updater;let u=ta.FIXED;this._scene.mode===ce.SCENE3D&&(u=r.entity._position.referenceFrame);let d=this._updaters[u];l===d&&c(d)?d.updateObject(e,r):(c(l)&&l.removeObject(r),c(d)||(d=new RE(this._scene,u),d.update(e),this._updaters[u]=d),r.updater=d,c(d)&&d.updateObject(e,r))}return!0},Ym.prototype.isDestroyed=function(){return!1},Ym.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Ym.prototype._onCollectionChanged,this);const e=this._updaters;for(const t in e)e.hasOwnProperty(t)&&e[t].destroy();return Xe(this)},Ym.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s;const a=this._items;for(o=t.length-1;o>-1;o--)r=t[o],c(r._path)&&c(r._position)&&a.set(r.id,new coe(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._path)&&c(r._position)?a.contains(r.id)||a.set(r.id,new coe(r)):(s=a.get(r.id),c(s)&&(c(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),c(s)&&(c(s.updater)&&s.updater.removeObject(s),a.remove(r.id))},Ym._subSample=uoe;const Bot=Ym,foe=Z.WHITE,hoe=Z.BLACK,goe=new Z,kot=new f,yoe=new Z,boe=new Bn,Toe=new Bn,Aoe=new Qn;function xoe(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 Xm(e,t){if(!c(e))throw new E("entityCluster is required.");if(!c(t))throw new E("entityCollection is required.");t.collectionChanged.addEventListener(Xm.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new mn,this._onCollectionChanged(t,t.values,[],[])}function LE(e,t,n){if(c(e)){if(c(e.pointPrimitive))return e.pointPrimitive=void 0,void n.removePoint(t);c(e.billboard)&&(e.billboard=void 0,n.removeBillboard(t))}}Xm.prototype.update=function(e){if(!c(e))throw new E("time is required.");const t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){const r=t[i],s=r.entity,a=s._point;let l=r.pointPrimitive,u=r.billboard;const d=te.getValueOrDefault(a._heightReference,e,tn.NONE);let m,h=s.isShowing&&s.isAvailable(e)&&te.getValueOrDefault(a._show,e,!0);if(h&&(m=te.getValueOrUndefined(s._position,e,kot),h=c(m)),!h){LE(r,s,n);continue}te.isConstant(s._position)||(n._clusterDirty=!0);let _=!1,p=!1;if(d===tn.NONE||c(u)?d===tn.NONE&&!c(l)&&(c(u)&&(LE(r,s,n),u=void 0),l=n.getPoint(s),l.id=s,r.pointPrimitive=l):(c(l)&&(LE(r,s,n),l=void 0),u=n.getBillboard(s),u.id=s,u.image=void 0,r.billboard=u,_=!0,p=f.equals(u.position,m)&&u.heightReference===d),c(l))l.show=!0,l.position=m,l.scaleByDistance=te.getValueOrUndefined(a._scaleByDistance,e,boe),l.translucencyByDistance=te.getValueOrUndefined(a._translucencyByDistance,e,Toe),l.color=te.getValueOrDefault(a._color,e,foe,goe),l.outlineColor=te.getValueOrDefault(a._outlineColor,e,hoe,yoe),l.outlineWidth=te.getValueOrDefault(a._outlineWidth,e,0),l.pixelSize=te.getValueOrDefault(a._pixelSize,e,1),l.distanceDisplayCondition=te.getValueOrUndefined(a._distanceDisplayCondition,e,Aoe),l.disableDepthTestDistance=te.getValueOrDefault(a._disableDepthTestDistance,e,0);else if(c(u)){u.show=!0,u.position=m,u.scaleByDistance=te.getValueOrUndefined(a._scaleByDistance,e,boe),u.translucencyByDistance=te.getValueOrUndefined(a._translucencyByDistance,e,Toe),u.distanceDisplayCondition=te.getValueOrUndefined(a._distanceDisplayCondition,e,Aoe),u.disableDepthTestDistance=te.getValueOrDefault(a._disableDepthTestDistance,e,0),u.heightReference=d;const y=te.getValueOrDefault(a._color,e,foe,goe),b=te.getValueOrDefault(a._outlineColor,e,hoe,yoe),x=Math.round(te.getValueOrDefault(a._outlineWidth,e,0));let C=Math.max(1,Math.round(te.getValueOrDefault(a._pixelSize,e,1)));if(x>0?(u.scale=1,_=_||x!==r.outlineWidth||C!==r.pixelSize||!Z.equals(y,r.color)||!Z.equals(b,r.outlineColor)):(u.scale=C/50,C=50,_=_||x!==r.outlineWidth||!Z.equals(y,r.color)||!Z.equals(b,r.outlineColor)),_){r.color=Z.clone(y,r.color),r.outlineColor=Z.clone(b,r.outlineColor),r.pixelSize=C,r.outlineWidth=x;const w=y.alpha,v=y.toCssColorString(),I=b.toCssColorString(),P=JSON.stringify([v,C,I,x]);u.setImage(P,G6(w,v,I,x,C))}p&&u._updateClamping()}}return!0},Xm.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new E("entity is required.");if(!c(t))throw new E("result is required.");const n=this._items.get(e.id);if(!c(n)||!c(n.pointPrimitive)&&!c(n.billboard))return en.FAILED;if(c(n.pointPrimitive))t.center=f.clone(n.pointPrimitive.position,t.center);else{const i=n.billboard;if(!c(i._clampedPosition))return en.PENDING;t.center=f.clone(i._clampedPosition,t.center)}return t.radius=0,en.DONE},Xm.prototype.isDestroyed=function(){return!1},Xm.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Xm.prototype._onCollectionChanged,this);const e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return Xe(this)},Xm.prototype._onCollectionChanged=function(e,t,n,i){let o,r;const s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],c(r._point)&&c(r._position)&&s.set(r.id,new xoe(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._point)&&c(r._position)?s.contains(r.id)||s.set(r.id,new xoe(r)):(LE(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],LE(s.get(r.id),r,a),s.remove(r.id)};const Uot=Xm,Coe=[];function zot(e,t,n,i,o){const r=Coe;let s;r.length=o;const a=n.red,l=n.green,u=n.blue,d=n.alpha,h=i.red,m=i.green,_=i.blue,p=i.alpha;if(Z.equals(n,i)){for(s=0;s<o;s++)r[s]=Z.clone(n);return r}const y=(h-a)/o,b=(m-l)/o,x=(_-u)/o,C=(p-d)/o;for(s=0;s<o;s++)r[s]=new Z(a+s*y,l+s*b,u+s*x,d+s*C);return r}function NE(e){const t=(e=g(e,g.EMPTY_OBJECT)).positions,n=e.colors,i=g(e.width,1),o=g(e.colorsPerVertex,!1);if(!c(t)||t.length<2)throw new E("At least two positions are required.");if("number"!=typeof i)throw new E("width must be a number");if(c(n)&&(o&&n.length<t.length||!o&&n.length<t.length-1))throw new E("colors has an invalid length.");this._positions=t,this._colors=n,this._width=i,this._colorsPerVertex=o,this._vertexFormat=et.clone(g(e.vertexFormat,et.DEFAULT)),this._arcType=g(e.arcType,ni.GEODESIC),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._ellipsoid=he.clone(g(e.ellipsoid,he.default)),this._workerName="createPolylineGeometry";let r=1+t.length*f.packedLength;r+=c(n)?1+n.length*Z.packedLength:1,this.packedLength=r+he.packedLength+et.packedLength+4}NE.pack=function(e,t,n){if(!c(e))throw new E("value is required");if(!c(t))throw new E("array is required");let i;n=g(n,0);const o=e._positions;let r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=f.packedLength)f.pack(o[i],t,n);const s=e._colors;for(r=c(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=Z.packedLength)Z.pack(s[i],t,n);return he.pack(e._ellipsoid,t,n),et.pack(e._vertexFormat,t,n+=he.packedLength),n+=et.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};const Eoe=he.clone(he.UNIT_SPHERE),woe=new et,Sy={positions:void 0,colors:void 0,ellipsoid:Eoe,vertexFormat:woe,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};NE.unpack=function(e,t,n){if(!c(e))throw new E("array is required");t=g(t,0);let i,o=e[t++];const r=new Array(o);for(i=0;i<o;++i,t+=f.packedLength)r[i]=f.unpack(e,t);o=e[t++];const s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=Z.packedLength)s[i]=Z.unpack(e,t);const a=he.unpack(e,t,Eoe),l=et.unpack(e,t+=he.packedLength,woe);t+=et.packedLength;const u=e[t++],d=1===e[t++],h=e[t++],m=e[t];return c(n)?(n._positions=r,n._colors=s,n._ellipsoid=he.clone(a,n._ellipsoid),n._vertexFormat=et.clone(l,n._vertexFormat),n._width=u,n._colorsPerVertex=d,n._arcType=h,n._granularity=m,n):(Sy.positions=r,Sy.colors=s,Sy.width=u,Sy.colorsPerVertex=d,Sy.arcType=h,Sy.granularity=m,new NE(Sy))};const Soe=new f,voe=new f,Ioe=new f,Doe=new f;NE.createGeometry=function(e){const t=e._width,n=e._vertexFormat;let i=e._colors;const o=e._colorsPerVertex,r=e._arcType,s=e._granularity,a=e._ellipsoid;let l,u,d;const h=[];let m=Ea(e._positions,f.equalsEpsilon,!1,h);if(c(i)&&h.length>0){let U=0,z=h[0];i=i.filter(function(G,W){let q=!1;return q=o?W===z||0===W&&1===z:W+1===z,!q||(U++,z=h[U],!1)})}let _=m.length;if(_<2||t<=0)return;if(r===ni.GEODESIC||r===ni.RHUMB){let U,z;r===ni.GEODESIC?(U=O.chordLength(s,a.maximumRadius),z=Gr.numberOfPoints):(U=s,z=Gr.numberOfPointsRhumbLine);const G=Gr.extractHeights(m,a);if(c(i)){let W=1;for(l=0;l<_-1;++l)W+=z(m[l],m[l+1],U);const q=new Array(W);let j=0;for(l=0;l<_-1;++l){const ne=i[l],X=z(m[l],m[l+1],U);if(o&&l<W){const $=zot(0,0,ne,i[l+1],X),me=$.length;for(u=0;u<me;++u)q[j++]=$[u]}else for(u=0;u<X;++u)q[j++]=Z.clone(ne)}q[j]=Z.clone(i[i.length-1]),i=q,Coe.length=0}m=r===ni.GEODESIC?Gr.generateCartesianArc({positions:m,minDistance:U,ellipsoid:a,height:G}):Gr.generateCartesianRhumbArc({positions:m,granularity:U,ellipsoid:a,height:G})}_=m.length;const p=4*_-4,y=new Float64Array(3*p),b=new Float64Array(3*p),x=new Float64Array(3*p),C=new Float32Array(2*p),w=n.st?new Float32Array(2*p):void 0,v=c(i)?new Uint8Array(4*p):void 0;let B,I=0,P=0,N=0,R=0;for(u=0;u<_;++u){let U,z;0===u?(B=Soe,f.subtract(m[0],m[1],B),f.add(m[0],B,B)):B=m[u-1],f.clone(B,Ioe),f.clone(m[u],voe),u===_-1?(B=Soe,f.subtract(m[_-1],m[_-2],B),f.add(m[_-1],B,B)):B=m[u+1],f.clone(B,Doe),c(v)&&(U=0===u||o?i[u]:i[u-1],u!==_-1&&(z=i[u]));const W=u===_-1?2:4;for(d=0===u?2:0;d<W;++d){f.pack(voe,y,I),f.pack(Ioe,b,I),f.pack(Doe,x,I),I+=3;const q=d-2<0?-1:1;if(C[P++]=d%2*2-1,C[P++]=q*t,n.st&&(w[N++]=u/(_-1),w[N++]=Math.max(C[P-2],0)),c(v)){const j=d<2?U:z;v[R++]=Z.floatToByte(j.red),v[R++]=Z.floatToByte(j.green),v[R++]=Z.floatToByte(j.blue),v[R++]=Z.floatToByte(j.alpha)}}}const F=new co;F.position=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:y}),F.prevPosition=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:b}),F.nextPosition=new $e({componentDatatype:ee.DOUBLE,componentsPerAttribute:3,values:x}),F.expandAndWidth=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:C}),n.st&&(F.st=new $e({componentDatatype:ee.FLOAT,componentsPerAttribute:2,values:w})),c(v)&&(F.color=new $e({componentDatatype:ee.UNSIGNED_BYTE,componentsPerAttribute:4,values:v,normalize:!0}));const S=Ot.createTypedArray(p,6*_-6);let D=0,L=0;const M=_-1;for(u=0;u<M;++u)S[L++]=D,S[L++]=D+2,S[L++]=D+1,S[L++]=D+1,S[L++]=D+2,S[L++]=D+3,D+=4;return new En({attributes:F,indices:S,primitiveType:Tt.TRIANGLES,boundingSphere:Ae.fromPoints(m),geometryType:a0.POLYLINES})};const Vot=NE,Hot=new Co(0),H1={},Poe=new Z,Got=new kn(Z.WHITE),jot=new Co(!0),Wot=new Co(Ko.DISABLED),qot=new Co(new Qn),Yot=new Co(Xo.BOTH);function Xot(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function Zot(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function Id(e,t){if(!c(e))throw new E("entity is required");if(!c(t))throw new E("scene is required");this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(Id.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new Ye,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new Xot,this._groundGeometryOptions=new Zot,this._id=`polyline-${e.id}`,this._clampToGround=!1,this._supportsPolylinesOnTerrain=Fc.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(Id.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!c(this._entity.availability)&&te.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}}),Id.prototype.isOutlineVisible=function(e){return!1},Id.prototype.isFilled=function(e){const n=this._fillEnabled&&this._entity.isAvailable(e)&&this._showProperty.getValue(e);return g(n,!1)},Id.prototype.createFillGeometryInstance=function(e){if(!c(e))throw new E("time is required.");if(!this._fillEnabled)throw new E("This instance does not represent a filled geometry.");const t=this._entity,n=t.isAvailable(e),i=new Pi(n&&t.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),s={show:i,distanceDisplayCondition:_o.fromDistanceDisplayCondition(o)};let a;return this._materialProperty instanceof kn&&(c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,Poe)),c(a)||(a=Z.WHITE),s.color=ei.fromColor(a)),this.clampToGround?new zn({id:t,geometry:new F7(this._groundGeometryOptions),attributes:s}):(c(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof kn&&(c(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(a=this._depthFailMaterialProperty.color.getValue(e,Poe)),c(a)||(a=Z.WHITE),s.depthFailColor=ei.fromColor(a)),new zn({id:t,geometry:new Vot(this._geometryOptions),attributes:s}))},Id.prototype.createOutlineGeometryInstance=function(e){throw new E("This instance does not represent an outlined geometry.")},Id.prototype.isDestroyed=function(){return!1},Id.prototype.destroy=function(){this._entitySubscription(),Xe(this)},Id.prototype._onEntityPropertyChanged=function(e,t,n,i){if("availability"!==t&&"polyline"!==t)return;const o=this._entity.polyline;if(!c(o))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));const r=o.positions,s=o.show;if(c(s)&&s.isConstant&&!s.getValue(It.MINIMUM_VALUE)||!c(r))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));const a=o.zIndex,l=g(o.material,Got),u=l instanceof kn;this._materialProperty=l,this._depthFailMaterialProperty=o.depthFailMaterial,this._showProperty=g(s,jot),this._shadowsProperty=g(o.shadows,Wot),this._distanceDisplayConditionProperty=g(o.distanceDisplayCondition,qot),this._classificationTypeProperty=g(o.classificationType,Yot),this._fillEnabled=!0,this._zIndex=g(a,Hot);const d=o.width,h=o.arcType,m=o.clampToGround,_=o.granularity;if(r.isConstant&&te.isConstant(d)&&te.isConstant(h)&&te.isConstant(_)&&te.isConstant(m)&&te.isConstant(a)){const p=this._geometryOptions,y=r.getValue(It.MINIMUM_VALUE,p.positions);if(!c(y)||y.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));let b;b=u&&(!c(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof kn)?lf.VERTEX_FORMAT:rd.VERTEX_FORMAT,p.vertexFormat=b,p.positions=y,p.width=c(d)?d.getValue(It.MINIMUM_VALUE):void 0,p.arcType=c(h)?h.getValue(It.MINIMUM_VALUE):void 0,p.granularity=c(_)?_.getValue(It.MINIMUM_VALUE):void 0;const x=this._groundGeometryOptions;x.positions=y,x.width=p.width,x.arcType=p.arcType,x.granularity=p.granularity,this._clampToGround=!!c(m)&&m.getValue(It.MINIMUM_VALUE),!this._clampToGround&&c(a)&&_n("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))},Id.prototype.createDynamicUpdater=function(e,t){if(A.defined("primitives",e),A.defined("groundPrimitives",t),!this._dynamic)throw new E("This instance does not represent dynamic geometry.");return new ME(e,t,this)};const PT={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function ME(e,t,n){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=n,this._positions=[]}function Ooe(e){if(c(e._line))return e._line;const t=e._primitives,n=e._geometryUpdater._scene.id+t._guid;let i=H1[n];!c(i)||i.isDestroyed()?(i=new vv,H1[n]=i,t.add(i)):t.contains(i)||t.add(i);const o=i.add();return o.id=e._geometryUpdater._entity,e._line=o,o}ME.prototype.update=function(e){const t=this._geometryUpdater,n=t._entity,i=n.polyline;let r=te.getValueOrUndefined(i.positions,e,this._positions);t._clampToGround=te.getValueOrDefault(i._clampToGround,e,!1),t._groundGeometryOptions.positions=r,t._groundGeometryOptions.width=te.getValueOrDefault(i._width,e,1),t._groundGeometryOptions.arcType=te.getValueOrDefault(i._arcType,e,ni.GEODESIC),t._groundGeometryOptions.granularity=te.getValueOrDefault(i._granularity,e,9999);const s=this._groundPrimitives;if(c(this._groundPolylinePrimitive)&&(s.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!n.isShowing||!n.isAvailable(e)||!te.getValueOrDefault(i._show,e,!0)||!c(r)||r.length<2)return;const h=t.fillMaterialProperty;let m;if(h instanceof kn)m=new lf;else{const _=hc.getValue(e,h,this._material);m=new rd({material:_,translucent:_.isTranslucent()}),this._material=_}return this._groundPolylinePrimitive=s.add(new mI({geometryInstances:t.createFillGeometryInstance(e),appearance:m,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),te.getValueOrUndefined(t.zIndex,e)),void(c(this._line)&&(this._line.show=!1))}const a=Ooe(this);if(!n.isShowing||!n.isAvailable(e)||!te.getValueOrDefault(i._show,e,!0))return void(a.show=!1);if(!c(r)||r.length<2)return void(a.show=!1);let l=ni.GEODESIC;l=te.getValueOrDefault(i._arcType,e,l);const d=t._scene.ellipsoid;l!==ni.NONE&&c(t._scene.globe)&&(PT.ellipsoid=d,PT.positions=r,PT.granularity=te.getValueOrUndefined(i._granularity,e),PT.height=Gr.extractHeights(r,d),r=l===ni.GEODESIC?Gr.generateCartesianArc(PT):Gr.generateCartesianRhumbArc(PT)),a.show=!0,a.positions=r.slice(),a.material=hc.getValue(e,t.fillMaterialProperty,a.material),a.width=te.getValueOrDefault(i._width,e,1),a.distanceDisplayCondition=te.getValueOrUndefined(i._distanceDisplayCondition,e,a.distanceDisplayCondition)},ME.prototype.getBoundingSphere=function(e){if(A.defined("result",e),this._geometryUpdater.clampToGround){const t=this._groundPolylinePrimitive;if(c(t)&&t.show&&t.ready){const n=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(c(n)&&c(n.boundingSphere))return Ae.clone(n.boundingSphere,e),en.DONE}return c(t)&&!t.ready?en.PENDING:en.DONE}{const t=Ooe(this);if(t.show&&t.positions.length>0)return Ae.fromPoints(t.positions,e),en.DONE}return en.FAILED},ME.prototype.isDestroyed=function(){return!1},ME.prototype.destroy=function(){const t=this._geometryUpdater._scene.id+this._primitives._guid,n=H1[t];c(n)&&(n.remove(this._line),0===n.length&&(this._primitives.removeAndDestroy(n),delete H1[t])),c(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),Xe(this)};const $ot=Id,Kot=new Z,Qot=new Qn,Jot=new Qn;function Dd(e,t,n,i,o){let r;r=n instanceof kn?lf:rd,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=r,this.materialProperty=n,this.updaters=new mn,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new mn,this.material=void 0,this.updatersWithAttributes=new mn,this.attributes=new mn,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Dd.prototype.onMaterialChanged,this),this.subscriptions=new mn,this.showsUpdated=new mn,this.zIndex=i,this._asynchronous=o}function OT(e,t,n){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=g(n,!0)}Dd.prototype.onMaterialChanged=function(){this.invalidated=!0},Dd.prototype.isMaterial=function(e){const t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof kn&&t instanceof kn||c(t)&&t.equals(n)},Dd.prototype.add=function(e,t,n){const i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&te.isConstant(t.distanceDisplayConditionProperty)){const o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,l){"isShowing"===s&&o.showsUpdated.set(t.id,t)}))}else this.updatersWithAttributes.set(i,t);this.createPrimitive=!0},Dd.prototype.remove=function(e){const t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);const n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t)),!0}return!1},Dd.prototype.update=function(e){let t=!0,n=this.primitive;const i=this.orderedGroundPrimitives,o=this.geometry.values;let r;if(this.createPrimitive){if(o.length>0)c(n)&&(c(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),n=new mI({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===rd&&(this.material=hc.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),i.add(n,this.zIndex),t=!1;else{c(n)&&(i.remove(n),n=void 0);const a=this.oldPrimitive;c(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(c(n)&&n.ready){n.show=!0,c(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===rd&&(this.material=hc.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);const s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){const l=s[r],u=l.entity,d=this.geometry.get(l.id);let h=this.attributes.get(d.id.id);if(c(h)||(h=n.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),!l.fillMaterialProperty.isConstant){const b=te.getValueOrDefault(l.fillMaterialProperty.color,e,Z.WHITE,Kot);Z.equals(h._lastColor,b)||(h._lastColor=Z.clone(b,h._lastColor),h.color=ei.toValue(b,h.color))}const m=u.isShowing&&(l.hasConstantFill||l.isFilled(e));m!==(1===h.show[0])&&(h.show=Pi.toValue(m,h.show));const p=l.distanceDisplayConditionProperty;if(!te.isConstant(p)){const y=te.getValueOrDefault(p,e,Jot,Qot);Qn.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Qn.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=_o.toValue(y,h.distanceDisplayCondition))}}this.updateShows(n)}else c(n)&&!n.ready&&(t=!1);return t},Dd.prototype.updateShows=function(e){const t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){const o=t[i],r=o.entity,s=this.geometry.get(o.id);let a=this.attributes.get(s.id.id);c(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));const l=r.isShowing;l!==(1===a.show[0])&&(a.show=Pi.toValue(l,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},Dd.prototype.contains=function(e){return this.updaters.contains(e.id)},Dd.prototype.getBoundingSphere=function(e,t){const n=this.primitive;if(!n.ready)return en.PENDING;const i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&0===i.show[0]?en.FAILED:(i.boundingSphere.clone(t),en.DONE)},Dd.prototype.destroy=function(){const e=this.primitive,t=this.orderedGroundPrimitives;c(e)&&t.remove(e);const n=this.oldPrimitive;c(n)&&t.remove(n),this.removeMaterialSubscription()},OT.prototype.add=function(e,t){const n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=te.getValueOrDefault(t.zIndex,0);for(let a=0;a<i;++a){const l=n[a];if(l.isMaterial(t)&&l.zIndex===r)return void l.add(e,t,o)}const s=new Dd(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,r,this._asynchronous);s.add(e,t,o),n.push(s)},OT.prototype.remove=function(e){const t=this._items;for(let i=t.length-1;i>=0;i--){const o=t[i];if(o.remove(e)){0===o.updaters.length&&(t.splice(i,1),o.destroy());break}}},OT.prototype.update=function(e){let t;const n=this._items;for(t=n.length-1;t>=0;t--){const r=n[t];if(r.invalidated){n.splice(t,1);const s=r.updaters.values,a=s.length;for(let l=0;l<a;l++)this.add(e,s[l]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o},OT.prototype.getBoundingSphere=function(e,t){const n=this._items,i=n.length;for(let o=0;o<i;o++){const r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return en.FAILED},OT.prototype.removeAllPrimitives=function(){const e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};const ert=OT,trt=[];function Roe(e,t){const n=e._batches,i=n.length;for(let o=0;o<i;o++)n[o].remove(t)}function Loe(e,t,n){if(n.isDynamic)return void e._dynamicBatch.add(t,n);if(n.clampToGround&&n.fillEnabled){const s=n.classificationTypeProperty.getValue(t);return void e._groundBatches[s].add(t,n)}let i;n.fillEnabled&&(i=n.shadowsProperty.getValue(t));let r,o=0;c(n.depthFailMaterialProperty)&&(o=n.depthFailMaterialProperty instanceof kn?1:2),c(i)&&(r=i+o*Ko.NUMBER_OF_SHADOW_MODES),n.fillEnabled&&(n.fillMaterialProperty instanceof kn?e._colorBatches[r].add(t,n):e._materialBatches[r].add(t,n))}function Of(e,t,n,i){let o;A.defined("scene",e),A.defined("entityCollection",t),i=g(i,e.groundPrimitives),n=g(n,e.primitives),this._scene=e,this._primitives=n,this._entityCollection=void 0,this._addedObjects=new mn,this._removedObjects=new mn,this._changedObjects=new mn;const r=Ko.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(3*r),this._materialBatches=new Array(3*r),o=0;o<r;++o)this._colorBatches[o]=new Cy(n,lf,void 0,!1,o),this._materialBatches[o]=new Ey(n,rd,void 0,!1,o),this._colorBatches[o+r]=new Cy(n,lf,lf,!1,o),this._materialBatches[o+r]=new Ey(n,rd,lf,!1,o),this._colorBatches[o+2*r]=new Cy(n,lf,rd,!1,o),this._materialBatches[o+2*r]=new Ey(n,rd,rd,!1,o);this._dynamicBatch=new Zte(n,i);const s=Xo.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(s),o=0;o<s;++o)this._groundBatches[o]=new ert(i,o);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new mn,this._updaters=new mn,this._entityCollection=t,t.collectionChanged.addEventListener(Of.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,trt)}Of.prototype.update=function(e){A.defined("time",e);const t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.values;let a,l,u,d;for(a=s.length-1;a>-1;a--)l=s[a],u=l.id,d=this._updaters.get(u),d.entity===l?(Roe(this,d),Loe(this,e,d)):(o.push(l),n.push(l));for(a=o.length-1;a>-1;a--)l=o[a],u=l.id,d=this._updaters.get(u),Roe(this,d),d.destroy(),this._updaters.remove(u),this._subscriptions.get(u)(),this._subscriptions.remove(u);for(a=n.length-1;a>-1;a--)l=n[a],u=l.id,d=new $ot(l,this._scene),this._updaters.set(u,d),Loe(this,e,d),this._subscriptions.set(u,d.geometryChanged.addEventListener(Of._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let h=!0;const m=this._batches,_=m.length;for(a=0;a<_;a++)h=m[a].update(e)&&h;return h};const nrt=[],irt=new Ae;Of.prototype.getBoundingSphere=function(e,t){A.defined("entity",e),A.defined("result",t);const n=nrt,i=irt;let o=0,r=en.DONE;const s=this._batches,a=s.length,l=this._updaters.get(e.id);for(let u=0;u<a;u++){if(r=s[u].getBoundingSphere(l,i),r===en.PENDING)return en.PENDING;r===en.DONE&&(n[o]=Ae.clone(i,n[o]),o++)}return 0===o?en.FAILED:(n.length=o,Ae.fromBoundingSpheres(n,t),en.DONE)},Of.prototype.isDestroyed=function(){return!1},Of.prototype.destroy=function(){let e;this._entityCollection.collectionChanged.removeEventListener(Of.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();const t=this._batches;let n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();const i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();return this._subscriptions.removeAll(),Xe(this)},Of._onGeometryChanged=function(e){const n=this._changedObjects,i=e.entity,o=i.id;!c(this._removedObjects.get(o))&&!c(n.get(o))&&n.set(o,i)},Of.prototype._onCollectionChanged=function(e,t,n){const i=this._addedObjects,o=this._removedObjects,r=this._changedObjects;let s,a,l;for(s=n.length-1;s>-1;s--)l=n[s],a=l.id,i.remove(a)||(o.set(a,l),r.remove(a));for(s=t.length-1;s>-1;s--)l=t[s],a=l.id,o.remove(a)?r.set(a,l):i.set(a,l)};const ort=Of;function Xc(e){A.typeOf.object("options",e),A.typeOf.object("options.scene",e.scene),A.typeOf.object("options.dataSourceCollection",e.dataSourceCollection),Cb.initializeTerrainHeights(),mI.initializeTerrainHeights();const t=e.scene,n=e.dataSourceCollection;this._eventHelper=new kh,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=g(e.visualizersCallback,Xc.defaultVisualizersCallback);let i=!1;const o=new Zg,r=new Zg;n.length>0&&(t.primitives.add(o),t.groundPrimitives.add(r),i=!0),this._primitives=o,this._groundPrimitives=r;for(let u=0,d=n.length;u<d;u++)this._onDataSourceAdded(n,n.get(u));const s=new QJe;let a,l;if(this._onDataSourceAdded(void 0,s),this._defaultDataSource=s,!i){const u=this,d=function(){t.primitives.add(o),t.groundPrimitives.add(r),a(),l(),u._removeDefaultDataSourceListener=void 0,u._removeDataSourceCollectionListener=void 0};a=s.entities.collectionChanged.addEventListener(d),l=n.dataSourceAdded.addEventListener(d)}this._removeDefaultDataSourceListener=a,this._removeDataSourceCollectionListener=l,this._ready=!1}const RT=[];Xc.registerVisualizer=function(e){RT.includes(e)||RT.push(e)},Xc.unregisterVisualizer=function(e){if(RT.includes(e)){const t=RT.indexOf(e);RT.splice(t,1)}},Xc.defaultVisualizersCallback=function(e,t,n){const i=n.entities;return[new KJe(t,i),new Nit(e,i,n._primitives,n._groundPrimitives),new sot(t,i),new wot(e,i),new Iot(e,i),new Uot(t,i),new Bot(e,i),new ort(e,i,n._primitives,n._groundPrimitives),...RT.map(o=>new o(e,i))]},Object.defineProperties(Xc.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}}}),Xc.prototype.isDestroyed=function(){return!1},Xc.prototype.destroy=function(){this._eventHelper.removeAll();const e=this._dataSourceCollection;for(let t=0,n=e.length;t<n;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),c(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),Xe(this)},Xc.prototype.update=function(e){if(A.defined("time",e),!vo.initialized)return this._ready=!1,!1;let n,i,o,r,t=!0;const s=this._dataSourceCollection,a=s.length;for(n=0;n<a;n++){const l=s.get(n);for(c(l.update)&&(t=l.update(e)&&t),o=l._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t}for(o=this._defaultDataSource._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t;return!this._ready&&t&&this._scene.requestRender(),this._ready=t,t},Xc.prototype._postRender=function(){const e=this._scene.frameState,t=this._dataSourceCollection,n=t.length;for(let i=0;i<n;i++){const o=t.get(i),r=o.credit;c(r)&&e.creditDisplay.addCreditToNextFrame(r);const s=o._resourceCredits;if(c(s)){const a=s.length;for(let l=0;l<a;l++)e.creditDisplay.addCreditToNextFrame(s[l])}}};const rrt=[],srt=new Ae;Xc.prototype.getBoundingSphere=function(e,t,n){if(A.defined("entity",e),A.typeOf.bool("allowPartial",t),A.defined("result",n),!this._ready)return en.PENDING;let i,o,r=this._defaultDataSource;if(!r.entities.contains(e)){r=void 0;const m=this._dataSourceCollection;for(o=m.length,i=0;i<o;i++){const _=m.get(i);if(_.entities.contains(e)){r=_;break}}}if(!c(r))return en.FAILED;const s=rrt,a=srt;let l=0,u=en.DONE;const d=r._visualizers,h=d.length;for(i=0;i<h;i++)if(c(d[i].getBoundingSphere)){if(u=d[i].getBoundingSphere(e,a),!t&&u===en.PENDING)return en.PENDING;u===en.DONE&&(s[l]=Ae.clone(a,s[l]),l++)}return 0===l?en.FAILED:(s.length=l,Ae.fromBoundingSpheres(s,n),en.DONE)},Xc.prototype._onDataSourceAdded=function(e,t){const n=this._scene,o=this._groundPrimitives,r=this._primitives.add(new Zg),s=o.add(new OJe);t._primitives=r,t._groundPrimitives=s;const a=t.clustering;a._initialize(n),r.add(a),t._visualizers=this._visualizersCallback(n,a,t)},Xc.prototype._onDataSourceRemoved=function(e,t){const n=this._primitives,i=this._groundPrimitives,o=t._primitives,r=t._groundPrimitives;o.remove(t.clustering);const a=t._visualizers,l=a.length;for(let u=0;u<l;u++)a[u].destroy();n.remove(o),i.remove(r),t._visualizers=void 0},Xc.prototype._onDataSourceMoved=function(e,t,n){const i=this._primitives,o=this._groundPrimitives,r=e._primitives,s=e._groundPrimitives;t===n+1?(i.raise(r),o.raise(s)):t===n-1?(i.lower(r),o.lower(s)):0===t?(i.lowerToBottom(r),o.lowerToBottom(s),i.raise(r),o.raise(s)):(i.raiseToTop(r),o.raiseToTop(s))};const art=Xc;function LU(){return LU=(0,we.Z)(function*(e,t,n,i){return c(i)||(i=!1),A.typeOf.object("terrainProvider",e),A.typeOf.number("level",t),A.typeOf.bool("rejectOnTileFail",i),A.defined("positions",n),function drt(e,t,n,i){const o=e.tilingScheme;let r;const s=[],a={};for(r=0;r<n.length;++r){const u=o.positionToTileXY(n[r],t);if(!c(u))continue;const d=u.toString();if(!a.hasOwnProperty(d)){const h={x:u.x,y:u.y,level:t,tilingScheme:o,terrainProvider:e,positions:[]};a[d]=h,s.push(h)}a[d].positions.push(n[r])}const l=[];return NU(s,l,i).then(function(){return Promise.all(l).then(function(){return n})})}(e,t,n,i)}),LU.apply(this,arguments)}function NU(e,t,n){return e.length?function lrt(e,t,n){const i=e[0],o=i.terrainProvider.requestTileGeometry(i.x,i.y,i.level);if(!o)return!1;let r;return r=n?o.then(Moe(i)):o.then(Moe(i)).catch(function frt(e){const t=e.positions;return function(){for(let n=0;n<t.length;++n)t[n].height=void 0}}(i)),e.shift(),t.push(r),!0}(e,t,n)?NU(e,t,n):function urt(e){return new Promise(function(t){setTimeout(t,e)})}(100).then(()=>NU(e,t,n)):Promise.resolve()}function Noe(e,t,n){const i=t.interpolateHeight(n,e.longitude,e.latitude);return void 0!==i&&(e.height=i,!0)}function Moe(e){const 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)if(!Noe(t[r],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)Noe(t[r],i,n)}):Promise.resolve()}}const hrt=function crt(e,t,n,i){return LU.apply(this,arguments)},MU=new V;function Foe(e,t,n){return FU.apply(this,arguments)}function FU(){return FU=(0,we.Z)(function*(e,t,n){if(c(n)||(n=!1),!c(e))throw new E("terrainProvider is required.");if(!c(t))throw new E("positions is required.");const i=[],o=[],r=e.availability;if(!c(r))throw new E("sampleTerrainMostDetailed requires a terrain provider that has tile availability.");const s=[];for(let l=0;l<t.length;++l){const u=t[l],d=r.computeMaximumLevelAtPosition(u);if(o[l]=d,0===d){e.tilingScheme.positionToTileXY(u,1,MU);const m=e.loadTileDataAvailability(MU.x,MU.y,1);c(m)&&s.push(m)}let h=i[d];c(h)||(i[d]=h=[]),h.push(u)}yield Promise.all(s),yield Promise.all(i.map(function(l,u){if(c(l))return hrt(e,u,l,n)}));const a=[];for(let l=0;l<t.length;++l){const u=t[l];r.computeMaximumLevelAtPosition(u)!==o[l]&&a.push(u)}return a.length>0&&(yield Foe(e,a,n)),t}),FU.apply(this,arguments)}const Boe=Foe;function BU(e,t){return kU.apply(this,arguments)}function kU(){return kU=(0,we.Z)(function*(e,t){const n=t.terrainProvider,i=t.mapProjection,o=i.ellipsoid;let r;const s=t.camera.getRectangleCameraCoordinates(e);if(r=t.mode===ce.SCENE3D?o.cartesianToCartographic(s):i.unproject(s),!c(n))return r;if(!c(n.availability)||t.mode===ce.SCENE2D)return r;const l=[Te.center(e),Te.southeast(e),Te.southwest(e),Te.northeast(e),Te.northwest(e)],u=yield BU._sampleTerrainMostDetailed(n,l);let d=!1;const h=u.reduce(function(_,p){return c(p.height)?(d=!0,Math.max(p.height,_)):_},-Number.MAX_VALUE),m=r;return d&&(m.height+=h),m}),kU.apply(this,arguments)}BU._sampleTerrainMostDetailed=Boe;const koe=BU,Uoe_modifyFragmentShader=function(t){return(t=St.replaceMain(t,"czm_splitter_main"))+"uniform float czm_splitDirection; \nvoid main() \n{ \n#ifndef SHADOW_MAP\n if (czm_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard; \n if (czm_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard; \n#endif\n czm_splitter_main(); \n} \n"},Uoe_addUniforms=function(t,n){n.czm_splitDirection=function(){return t.splitDirection}},vy_NEEDS_DECODE=0,vy_DECODING=1,vy_READY=2,vy_FAILED=3;function FE(e){A.typeOf.object("options",e),A.typeOf.object("options.arrayBuffer",e.arrayBuffer),this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=Z.clone(Z.DARKGRAY),this._highlightColor=Z.clone(Z.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=vy_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=g(e.opaquePass,Ue.OPAQUE),this._cull=g(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=k.clone(k.IDENTITY),this._modelMatrix=k.clone(k.IDENTITY),this.time=0,this.shadows=Ko.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=g(e.splitDirection,$_.NONE),this._splittingEnabled=!1,this._error=void 0,function _rt(e,t){const n=r6.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&&c(n.batchTableBinary)&&(n.styleableProperties=nR.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),c(n.draco)){const a=n.draco;e._decodingState=vy_NEEDS_DECODE,a.dequantizeInShader=e._dequantizeInShader}const i=n.positions;c(i)&&(e._isQuantized=i.isQuantized,e._quantizedVolumeScale=i.quantizedVolumeScale,e._quantizedVolumeOffset=i.quantizedVolumeOffset,e._quantizedRange=i.quantizedRange);const o=n.normals;c(o)&&(e._isOctEncoded16P=o.octEncoded);const r=n.colors;c(r)&&(c(r.constantColor)&&(e._constantColor=Z.clone(r.constantColor,e._constantColor),e._hasColors=!1),e._isRGB565=r.isRGB565);const s=n.batchIds;c(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}(this,e)}Object.defineProperties(FE.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},color:{get:function(){return Z.clone(this._highlightColor)},set:function(e){this._highlightColor=Z.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(c(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=Ae.clone(e,this._boundingSphere)}}});const grt=new f,yrt=new f,brt=new f;let zoe,G1;function Voe(e,t){const n=ee.fromTypedArray(e);return n===ee.INT||n===ee.UNSIGNED_INT||n===ee.DOUBLE?(_n("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}const xrt=new de,Crt=new de,Ert=new Z,zU=new k,Srt=new k;function VU(e,t){const n=/czm_3dtiles_property_(\d+)/g;let i=n.exec(e);for(;null!==i;){const o=parseInt(i[1]);-1===t.indexOf(o)&&t.push(o),i=n.exec(e)}}function HU(e,t){e=e.slice(e.indexOf("\n"));const n=/czm_3dtiles_builtin_property_(\w+)/g;let i=n.exec(e);for(;null!==i;){const o=i[1];-1===t.indexOf(o)&&t.push(o),i=n.exec(e)}}function GU(e,t){const n=e.numberOfAttributes;for(let i=0;i<n;++i){const o=e.getAttribute(i);if(o.index===t)return o}}const Drt={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 Prt(e,t,n){let i,o,r;const s=t.context,a=c(n),l=e._isQuantized,u=e._isQuantizedDraco,d=e._isOctEncoded16P,h=e._isOctEncodedDraco,m=e._isRGB565,_=e._isTranslucent,p=e._hasColors,y=e._hasNormals,b=e._hasBatchIds,x=e._backFaceCulling,C=e._normalShading,w=e._drawCommand.vertexArray,v=e.clippingPlanes,I=e._attenuation;let P,N,R,B=_;const F=Rt(Drt),S={},D=e._styleableShaderAttributes;for(o in D)D.hasOwnProperty(o)&&(r=D[o],F[o]=`czm_3dtiles_property_${r.location}`,S[r.location]=r);if(a){const fe={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)";P=n.getColorShaderFunction(`getColorFromStyle${ye}`,F,fe),N=n.getShowShaderFunction(`getShowFromStyle${ye}`,F,fe),R=n.getPointSizeShaderFunction(`getPointSizeFromStyle${ye}`,F,fe),c(P)&&fe.translucent&&(B=!0)}e._styleTranslucent=B;const L=c(P),M=c(N),U=c(R),z=e.isClipped,G=[],W=[];L&&(VU(P,G),HU(P,W)),M&&(VU(N,G),HU(N,W)),U&&(VU(R,G),HU(R,W));const q=W.indexOf("COLOR")>=0,j=W.indexOf("NORMAL")>=0;if(j&&!y)throw new Pe("Style references the NORMAL semantic but the point cloud does not have normals");for(o in D)if(D.hasOwnProperty(o)){r=D[o];const fe=G.indexOf(r.location)>=0;GU(w,r.location).enabled=fe}const Q=p&&(!L||q);p&&(GU(w,1).enabled=Q);const Y=y&&(C||x||j);y&&(GU(w,2).enabled=Y);const ne={a_position:0};Q&&(ne.a_color=1),Y&&(ne.a_normal=2),b&&(ne.a_batchId=3);let X="";const K=G.length;for(i=0;i<K;++i){const fe=G[i];r=S[fe];const ye=r.componentCount,ve=`czm_3dtiles_property_${fe}`;let Oe;Oe=1===ye?"float":`vec${ye}`,X+=`in ${Oe} ${ve}; \n`,ne[ve]=r.location}!function Irt(e,t){const n=t.context,i=e._isQuantized,o=e._isQuantizedDraco,r=e._isOctEncodedDraco;let s={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){const a=xrt;if(a.x=e._attenuation?e.maximumAttenuation:e._pointSize,a.x*=t.pixelRatio,a.y=e.time,e._attenuation){let u;u=t.mode===ce.SCENE2D||t.camera.frustum instanceof $n?Number.POSITIVE_INFINITY:n.drawingBufferHeight/t.camera.frustum.sseDenominator,a.z=e.geometricError*e.geometricErrorScale,a.w=u}return a},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){return e.isClipped?e.clippingPlanes.texture:n.defaultTexture},u_clippingPlanesEdgeStyle:function(){const a=e.clippingPlanes;if(!c(a))return Z.TRANSPARENT;const l=Z.clone(a.edgeColor,Ert);return l.alpha=a.edgeWidth,l},u_clippingPlanesMatrix:function(){const a=e.clippingPlanes;if(!c(a))return k.IDENTITY;const l=g(e.clippingPlanesOriginMatrix,e._modelMatrix);k.multiply(n.uniformState.view3D,l,zU);const u=k.multiply(zU,a.modelMatrix,zU);return k.inverseTranspose(u,Srt)}};Uoe_addUniforms(e,s),(i||o||r)&&(s=Pn(s,{u_quantizedVolumeScaleAndOctEncodedRange:function(){const a=Crt;if(c(e._quantizedVolumeScale)){const l=f.clone(e._quantizedVolumeScale,a);f.divideByScalar(l,e._quantizedRange,a)}return a.w=e._octEncodedRange,a}})),c(e._uniformMapLoaded)&&(s=e._uniformMapLoaded(s)),e._drawCommand.uniformMap=s}(e,t);let $="in vec3 a_position; \nout vec4 v_color; \nuniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; \nuniform vec4 u_constantColor; \nuniform vec4 u_highlightColor; \n";$+="float u_pointSize; \nfloat tiles3d_tileset_time; \n",I&&($+="float u_geometricError; \nfloat u_depthMultiplier; \n"),$+=X,Q&&($+=_?"in vec4 a_color; \n":m?"in float a_color; \nconst float SHIFT_RIGHT_11 = 1.0 / 2048.0; \nconst float SHIFT_RIGHT_5 = 1.0 / 32.0; \nconst float SHIFT_LEFT_11 = 2048.0; \nconst float SHIFT_LEFT_5 = 32.0; \nconst float NORMALIZE_6 = 1.0 / 64.0; \nconst float NORMALIZE_5 = 1.0 / 32.0; \n":"in vec3 a_color; \n"),Y&&($+=d||h?"in vec2 a_normal; \n":"in vec3 a_normal; \n"),b&&($+="in float a_batchId; \n"),(l||u||h)&&($+="uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; \n"),L&&($+=P),M&&($+=N),U&&($+=R),$+="void main() \n{ \n u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; \n tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; \n",I&&($+=" u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; \n u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; \n"),$+=Q?_?" vec4 color = a_color; \n":m?" float compressed = a_color; \n float r = floor(compressed * SHIFT_RIGHT_11); \n compressed -= r * SHIFT_LEFT_11; \n float g = floor(compressed * SHIFT_RIGHT_5); \n compressed -= g * SHIFT_LEFT_5; \n float b = compressed; \n vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5); \n vec4 color = vec4(rgb, 1.0); \n":" vec4 color = vec4(a_color, 1.0); \n":" vec4 color = u_constantColor; \n",$+=l||u?" vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; \n":" vec3 position = a_position; \n",$+=" vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); \n",Y?($+=d?" vec3 normal = czm_octDecode(a_normal); \n":h?" vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; \n":" vec3 normal = a_normal; \n",$+=" vec3 normalEC = czm_normal * normal; \n"):$+=" vec3 normal = vec3(1.0); \n",L&&($+=" color = getColorFromStyle(position, position_absolute, color, normal); \n"),M&&($+=" float show = float(getShowFromStyle(position, position_absolute, color, normal)); \n"),$+=U?" gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; \n":I?" vec4 positionEC = czm_modelView * vec4(position, 1.0); \n float depth = -positionEC.z; \n gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); \n":" gl_PointSize = u_pointSize; \n",$+=" color = color * u_highlightColor; \n",Y&&C&&($+=" float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); \n diffuseStrength = max(diffuseStrength, 0.4); \n color.xyz *= diffuseStrength * czm_lightColor; \n"),$+=" v_color = color; \n gl_Position = czm_modelViewProjection * vec4(position, 1.0); \n",Y&&x&&($+=" float visible = step(-normalEC.z, 0.0); \n gl_Position *= visible; \n gl_PointSize *= visible; \n"),M&&($+=" gl_Position.w *= float(show); \n gl_PointSize *= float(show); \n"),$+="} \n";let me="in vec4 v_color; \n";z&&(me+="uniform highp sampler2D u_clippingPlanes; \nuniform mat4 u_clippingPlanesMatrix; \nuniform vec4 u_clippingPlanesEdgeStyle; \n",me+="\n",me+=jB(v,s),me+="\n"),me+="void main() \n{ \n out_FragColor = czm_gammaCorrect(v_color); \n",z&&(me+=function prt(e,t,n){return A.typeOf.string("samplerUniformName",e),A.typeOf.string("matrixUniformName",t),A.typeOf.string("styleUniformName",n),` float clipDistance = clip(gl_FragCoord, ${e}, ${t}); \n vec4 clippingPlanesEdgeColor = vec4(1.0); \n clippingPlanesEdgeColor.rgb = ${n}.rgb; \n float clippingPlanesEdgeWidth = ${n}.a; \n if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n { \n out_FragColor = clippingPlanesEdgeColor;\n } \n`}("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),me+="} \n",e.splitDirection!==$_.NONE&&(me=Uoe_modifyFragmentShader(me)),c(e._vertexShaderLoaded)&&($=e._vertexShaderLoaded($)),c(e._fragmentShaderLoaded)&&(me=e._fragmentShaderLoaded(me));const Se=e._drawCommand;c(Se.shaderProgram)&&Se.shaderProgram.destroy(),Se.shaderProgram=di.fromCache({context:s,vertexShaderSource:$,fragmentShaderSource:me,attributeLocations:ne});try{Se.shaderProgram._bind()}catch{throw new Pe("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}const Rrt=new de,Lrt=new f;FE.prototype.update=function(e){const t=e.context;if(c(this._error)){const u=this._error;throw this._error=void 0,u}if(function Ort(e,t){if(e._decodingState===vy_READY)return!1;if(e._decodingState===vy_NEEDS_DECODE){const n=e._parsedContent,i=n.draco,o=yR.decodePointCloud(i,t);c(o)&&(e._decodingState=vy_DECODING,o.then(function(r){e._decodingState=vy_READY;const s=c(r.POSITION)?r.POSITION.array:void 0,a=c(r.RGB)?r.RGB.array:void 0,l=c(r.RGBA)?r.RGBA.array:void 0,u=c(r.NORMAL)?r.NORMAL.array:void 0,d=c(r.BATCH_ID)?r.BATCH_ID.array:void 0,h=c(s)&&c(r.POSITION.data.quantization),m=c(u)&&c(r.NORMAL.data.quantization);if(h){const b=r.POSITION.data.quantization,x=b.range;e._quantizedVolumeScale=f.fromElements(x,x,x),e._quantizedVolumeOffset=f.unpack(b.minValues),e._quantizedRange=(1<<b.quantizationBits)-1,e._isQuantizedDraco=!0}m&&(e._octEncodedRange=(1<<r.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);let _=n.styleableProperties;const p=i.batchTableProperties;for(const b in p)if(p.hasOwnProperty(b)){const x=r[b];c(_)||(_={}),_[b]={typedArray:x.array,componentCount:x.data.componentsPerAttribute}}c(s)&&(n.positions={typedArray:s});const y=g(l,a);c(y)&&(n.colors={typedArray:y}),c(u)&&(n.normals={typedArray:u}),c(d)&&(n.batchIds={typedArray:d}),n.styleableProperties=_}).catch(function(r){e._decodingState=vy_FAILED,e._error=r}))}return!0}(this,t))return;let i=!1,o=!k.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,o=!0),c(this._drawCommand)||(function vrt(e,t){const n=t.context,i=e._parsedContent,o=e._pointsLength,r=i.positions,s=i.colors,a=i.normals,l=i.batchIds,u=i.styleableProperties,d=c(u),h=e._isQuantized,m=e._isQuantizedDraco,_=e._isOctEncoded16P,p=e._isOctEncodedDraco,y=e._quantizedRange,b=e._octEncodedRange,x=e._isRGB565,C=e._isTranslucent,w=e._hasColors,v=e._hasNormals,I=e._hasBatchIds;let P,N;const R=[],B={};if(e._styleableShaderAttributes=B,d){let W=4;for(const q in u)if(u.hasOwnProperty(q)){const j=u[q],Q=Voe(j.typedArray,q);P=j.componentCount,N=ee.fromTypedArray(Q);const Y=yn.createVertexBuffer({context:n,typedArray:Q,usage:At.STATIC_DRAW});e._geometryByteLength+=Y.sizeInBytes,R.push({index:W,vertexBuffer:Y,componentsPerAttribute:P,componentDatatype:N,normalize:!1,offsetInBytes:0,strideInBytes:0}),B[q]={location:W,componentCount:P},++W}}const F=yn.createVertexBuffer({context:n,typedArray:r.typedArray,usage:At.STATIC_DRAW});let S,D,L;e._geometryByteLength+=F.sizeInBytes,w&&(S=yn.createVertexBuffer({context:n,typedArray:s.typedArray,usage:At.STATIC_DRAW}),e._geometryByteLength+=S.sizeInBytes),v&&(D=yn.createVertexBuffer({context:n,typedArray:a.typedArray,usage:At.STATIC_DRAW}),e._geometryByteLength+=D.sizeInBytes),I&&(l.typedArray=Voe(l.typedArray,"batchIds"),L=yn.createVertexBuffer({context:n,typedArray:l.typedArray,usage:At.STATIC_DRAW}),e._geometryByteLength+=L.sizeInBytes);let M=[];N=h?ee.UNSIGNED_SHORT:m?y<=255?ee.UNSIGNED_BYTE:ee.UNSIGNED_SHORT:ee.FLOAT,M.push({index:0,vertexBuffer:F,componentsPerAttribute:3,componentDatatype:N,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(e._boundingSphere=h||m?Ae.fromCornerPoints(f.ZERO,e._quantizedVolumeScale):function Art(e){const n=e.length/3,i=Math.min(n,20),o=function Trt(e){if(!c(G1)){zoe=new Ny(0),G1=new Array(e);for(let t=0;t<e;++t)G1[t]=zoe.random()}return G1}(20),r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=f.fromElements(r,r,r,grt),l=f.fromElements(s,s,s,yrt);for(let d=0;d<i;++d){const h=Math.floor(o[d]*n),m=f.unpack(e,3*h,brt);f.minimumByComponent(a,m,a),f.maximumByComponent(l,m,l)}const u=Ae.fromCornerPoints(a,l);return u.radius+=O.EPSILON2,u}(r.typedArray)),w&&M.push(x?{index:1,vertexBuffer:S,componentsPerAttribute:1,componentDatatype:ee.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0}:{index:1,vertexBuffer:S,componentsPerAttribute:C?4:3,componentDatatype:ee.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0}),v&&(_?(P=2,N=ee.UNSIGNED_BYTE):p?(P=2,N=b<=255?ee.UNSIGNED_BYTE:ee.UNSIGNED_SHORT):(P=3,N=ee.FLOAT),M.push({index:2,vertexBuffer:D,componentsPerAttribute:P,componentDatatype:N,normalize:!1,offsetInBytes:0,strideInBytes:0})),I&&M.push({index:3,vertexBuffer:L,componentsPerAttribute:1,componentDatatype:ee.fromTypedArray(l.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),d&&(M=M.concat(R));const U=new gs({context:n,attributes:M}),z={depthTest:{enabled:!0}},G={depthTest:{enabled:!0},depthMask:!1,blending:eo.ALPHA_BLEND};e._opaquePass===Ue.CESIUM_3D_TILE&&(z.stencilTest=xn.setCesium3DTileBit(),z.stencilMask=xn.CESIUM_3D_TILE_MASK,G.stencilTest=xn.setCesium3DTileBit(),G.stencilMask=xn.CESIUM_3D_TILE_MASK),e._opaqueRenderState=Lt.fromCache(z),e._translucentRenderState=Lt.fromCache(G),e._drawCommand=new $t({boundingVolume:new Ae,cull:e._cull,modelMatrix:new k,primitiveType:Tt.POINTS,vertexArray:U,count:o,shaderProgram:void 0,uniformMap:void 0,renderState:C?e._translucentRenderState:e._opaqueRenderState,pass:C?Ue.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}(this,e),o=!0,i=!0,this._ready=!0,this._parsedContent=void 0),o){k.clone(this.modelMatrix,this._modelMatrix);const u=this._drawCommand.modelMatrix;if(k.clone(this._modelMatrix,u),c(this._rtcCenter)&&k.multiplyByTranslation(u,this._rtcCenter,u),c(this._quantizedVolumeOffset)&&k.multiplyByTranslation(u,this._quantizedVolumeOffset,u),e.mode!==ce.SCENE3D){const h=e.mapProjection,m=k.getColumn(u,3,Rrt);de.equals(m,de.UNIT_W)||In.basisTo2D(h,u,u)}const d=this._drawCommand.boundingVolume;if(Ae.clone(this._boundingSphere,d),this._cull){const h=d.center;k.multiplyByPoint(u,h,h);const m=k.getScale(u,Lrt);d.radius*=f.maximumComponent(m)}}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);const r=this.splitDirection!==$_.NONE;this._splittingEnabled!==r&&(this._splittingEnabled=r,i=!0),i&&Prt(this,e,this._style),this._drawCommand.castShadows=Ko.castShadows(this.shadows),this._drawCommand.receiveShadows=Ko.receiveShadows(this.shadows);const s=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=s?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=s?Ue.TRANSLUCENT:this._opaquePass;const l=e.passes;(l.render||l.pick)&&e.commandList.push(this._drawCommand)},FE.prototype.isDestroyed=function(){return!1},FE.prototype.destroy=function(){const e=this._drawCommand;return c(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),Xe(this)};const Nrt=FE;function Iy(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.clock",e.clock),A.typeOf.object("options.intervals",e.intervals),this.show=g(e.show,!0),this.modelMatrix=k.clone(g(e.modelMatrix,k.IDENTITY)),this.shadows=g(e.shadows,Ko.ENABLED),this.maximumMemoryUsage=g(e.maximumMemoryUsage,256),this.shading=new ev(e.shading),this.style=e.style,this.frameFailed=new Ye,this.frameChanged=new Ye,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new jL,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}function Mrt(e){return`uniform vec4 czm_pickColor;\n${e}`}function Frt(e){return function(t){return Pn(t,{czm_pickColor:function(){return e._pickId.color}})}}function Brt(){return"czm_pickColor"}Object.defineProperties(Iy.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){Gu.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(c(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}}),Iy.prototype.makeStyleDirty=function(){this._styleDirty=!0},Iy.prototype._getAverageLoadTime=function(){return 0===this._runningLength?.05:this._runningAverage};const krt=new re;function jU(e){const t=e._clock;return t.canAnimate&&t.shouldAnimate?t.multiplier:0}function Dy(e,t){return e._intervals.indexOf(t.start)}function joe(e,t){return function(n){const i=c(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}`))}}const Wrt=new k,Xrt=new ev;function Woe(e,t,n,i){const o=g(e.shading,Xrt),r=t.pointCloud,s=g(t.transform,k.IDENTITY);r.modelMatrix=k.multiplyTransformation(e.modelMatrix,s,Wrt),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=function qrt(e,t){const n=e.shading;return c(n)&&c(n.baseResolution)?n.baseResolution:c(t.boundingSphere)?O.cbrt(t.boundingSphere.volume()/t.pointsLength):0}(e,r),r.geometricErrorScale=o.geometricErrorScale,r.maximumAttenuation=function Yrt(e){const t=e.shading;return c(t)&&c(t.maximumAttenuation)?t.maximumAttenuation:10}(e);try{r.update(i)}catch(a){joe(e,t.uri)(a)}t.touchedFrameNumber=i.frameNumber}function WU(e,t,n,i){const o=function Hrt(e,t,n){const i=Dy(e,t),o=e._frames;let r=o[i];if(!c(r)){const s=t.data.transform,a=c(s)?k.fromArray(s):void 0,l=t.data.uri;r={pointCloud:void 0,transform:a,timestamp:Cr(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:l},o[i]=r,zt.fetchArrayBuffer({url:l}).then(function(u){r.pointCloud=new Nrt({arrayBuffer:u,cull:!0,fragmentShaderLoaded:Mrt,uniformMapLoaded:Frt(e),pickIdLoaded:Brt})}).catch(joe(e,l))}return r}(e,t,i);!function jrt(e,t,n,i){t.touchedFrameNumber<i.frameNumber-1&&(t.sequential=!1);const o=t.pointCloud;if(c(o)&&!t.ready){const r=i.commandList,s=r.length;Woe(e,t,n,i),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,r.length=s,t.sequential)&&function Grt(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}(e,(Cr()-t.timestamp)/1e3)}t.touchedFrameNumber=i.frameNumber}(e,o,n,i)}function qoe(e,t){const n=e._frames,i=n.length;for(let o=0;o<i;++o){const r=n[o];if(c(r)&&(!c(t)||t(r))){const s=r.pointCloud;r.ready&&(e._totalMemoryUsageInBytes-=s.geometryByteLength),c(s)&&s.destroy(),r===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),n[o]=void 0}}}function Yoe(e,t,n,i,o){return!!c(n)&&(!!n.ready||(WU(e,t,i,o),n.ready))}const LT={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};Iy.prototype.update=function(e){if(e.mode===ce.MORPHING||!this.show)return;c(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),c(this._loadTimestamp)||(this._loadTimestamp=re.clone(e.time));const t=Math.max(1e3*re.secondsDifference(e.time,this._loadTimestamp),0),n=this._clippingPlanes;let i=0,o=!1;const r=c(n)&&n.enabled;r&&(n.update(e),i=n.clippingPlanesState),this._clippingPlanesState!==i&&(this._clippingPlanesState=i,o=!0);const s=this._styleDirty;this._styleDirty=!1,(o||s)&&function Qrt(e,t,n){const i=e._frames,o=i.length;for(let r=0;r<o;++r){const s=i[r];c(s)&&c(s.pointCloud)&&(s.pointCloud.clippingPlanesDirty=t,s.pointCloud.styleDirty=n)}}(this,o,s),LT.timeSinceLoad=t,LT.isClipped=r;const a=this.shading,l=this._pointCloudEyeDomeLighting,u=e.commandList,d=u.length;let h=this._previousInterval,m=this._nextInterval;const _=function zrt(e){const t=e._intervals,o=t.indexOf(e._clock.currentTime);return t.get(o)}(this);if(!c(_))return;let p=!1;const y=jU(this),b=0===y;y!==this._clockMultiplier&&(p=!0,this._clockMultiplier=y),(!c(h)||b)&&(h=_),(!c(m)||p||function Vrt(e,t,n){const i=jU(e),o=Dy(e,t),r=Dy(e,n);return i>=0?o>=r:o<=r}(this,_,m))&&(m=function Urt(e,t){const n=e._intervals,i=e._clock,o=jU(e);if(0===o)return;const r=e._getAverageLoadTime(),s=re.addSeconds(i.currentTime,r*o,krt);let a=n.indexOf(s);return a===Dy(e,t)&&(o>=0?++a:--a),n.get(a)}(this,_)),h=function Krt(e,t,n,i,o){let r,s,a;const l=e._intervals,u=e._frames,d=Dy(e,n),h=Dy(e,t);if(d>=h){for(r=d;r>=h;--r)if(s=l.get(r),a=u[r],Yoe(e,s,a,i,o))return s}else for(r=d;r<=h;++r)if(s=l.get(r),a=u[r],Yoe(e,s,a,i,o))return s;return t}(this,h,_,LT,e);let x=function $rt(e,t){const n=Dy(e,t),i=e._frames[n];if(c(i)&&i.ready)return i}(this,h);c(x)||(WU(this,h,LT,e),x=this._lastRenderedFrame),c(x)&&Woe(this,x,LT,e),c(m)&&WU(this,m,LT,e);const C=this;c(x)&&!c(this._lastRenderedFrame)&&e.afterRender.push(function(){return!0}),c(x)&&x!==this._lastRenderedFrame&&C.frameChanged.numberOfListeners>0&&e.afterRender.push(function(){return C.frameChanged.raiseEvent(C),!0}),this._previousInterval=h,this._nextInterval=m,this._lastRenderedFrame=x,this._totalMemoryUsageInBytes>1024*this.maximumMemoryUsage*1024&&qoe(this,function Zrt(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}(e));const P=u.length-d;c(a)&&a.attenuation&&a.eyeDomeLighting&&P>0&&l.update(e,d,a,this.boundingSphere)},Iy.prototype.isDestroyed=function(){return!1},Iy.prototype.destroy=function(){return qoe(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),Xe(this)};const Xoe=Iy,Zoe=new oe,$oe=new oe,Koe=new oe,Jrt=new k,W1=new f,Qoe=new f,qU=new f,YU=new f,Joe=new f,ere=new f,NT=new re;function BE(e,t,n){A.defined("entity",e),A.defined("scene",t),this.entity=e,this.scene=t,this.ellipsoid=g(n,he.default),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new f,this._defaultOffset3D=void 0,this._offset3D=new f}Object.defineProperties(BE,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=f.clone(e,new f)}}}),BE.defaultOffset3D=new f(-14e3,3500,3500);const q1=new gC,nst=new f;BE.prototype.update=function(e,t){A.defined("time",e);const n=this.scene,i=this.ellipsoid,o=n.mode;if(o===ce.MORPHING)return;const r=this.entity,s=r.position;if(!c(s))return;const a=r!==this._lastEntity,l=o!==this._mode,u=n.camera;let d=a||l,h=!0;if(a){const m=r.viewFrom,_=c(m);if(!_&&c(t)){q1.pitch=-O.PI_OVER_FOUR,q1.range=0;const p=s.getValue(e,nst);if(c(p)){const y=2-1/Math.max(1,f.magnitude(p)/i.maximumRadius);q1.pitch*=y}u.viewBoundingSphere(t,q1),this.boundingSphere=t,d=!1,h=!1}else(!_||!c(m.getValue(e,this._offset3D)))&&f.clone(BE._defaultOffset3D,this._offset3D)}else!l&&this._mode!==ce.SCENE2D&&f.clone(u.position,this._offset3D);this._lastEntity=r,this._mode=o,function tst(e,t,n,i,o,r,s){const a=e.scene.mode;let l=o.getValue(r,e._lastCartesian);if(c(l)){let h,m,_,p,y,b,u=!1,d=!1;if(a===ce.SCENE3D){re.addSeconds(r,.001,NT);let C=o.getValue(NT,W1);if(c(C)||(re.addSeconds(r,-.001,NT),C=o.getValue(NT,W1),d=!0),c(C)){let I,w=In.computeFixedToIcrfMatrix(r,Zoe),v=In.computeFixedToIcrfMatrix(NT,$oe);c(w)&&c(v)?I=oe.transpose(w,Koe):(I=In.computeTemeToPseudoFixedMatrix(r,Koe),w=oe.transpose(I,Zoe),v=In.computeTemeToPseudoFixedMatrix(NT,$oe),oe.transpose(v,v));const P=oe.multiplyByVector(w,l,Joe),N=oe.multiplyByVector(v,C,ere);f.subtract(P,N,YU);const R=1e3*f.magnitude(YU),B=O.GRAVITATIONALPARAMETER,F=-B/(R*R-2*B/f.magnitude(P));F<0||F>1.25*s.maximumRadius?(h=Qoe,f.normalize(l,h),f.negate(h,h),_=f.clone(f.UNIT_Z,qU),m=f.cross(_,h,W1),f.magnitude(m)>O.EPSILON7&&(f.normalize(h,h),f.normalize(m,m),_=f.cross(h,m,qU),f.normalize(_,_),u=!0)):f.equalsEpsilon(l,C,O.EPSILON7)||(_=Qoe,f.normalize(P,_),f.normalize(N,N),m=f.cross(_,N,qU),d&&(m=f.multiplyByScalar(m,-1,m)),f.equalsEpsilon(m,f.ZERO,O.EPSILON7)||(h=f.cross(m,_,W1),oe.multiplyByVector(I,h,h),oe.multiplyByVector(I,m,m),oe.multiplyByVector(I,_,_),f.normalize(h,h),f.normalize(m,m),f.normalize(_,_),u=!0))}}c(e.boundingSphere)&&(l=e.boundingSphere.center),i&&(p=f.clone(t.position,YU),y=f.clone(t.direction,Joe),b=f.clone(t.up,ere));const x=Jrt;u?(x[0]=h.x,x[1]=h.y,x[2]=h.z,x[3]=0,x[4]=m.x,x[5]=m.y,x[6]=m.z,x[7]=0,x[8]=_.x,x[9]=_.y,x[10]=_.z,x[11]=0,x[12]=l.x,x[13]=l.y,x[14]=l.z,x[15]=0):In.eastNorthUpToFixedFrame(l,s,x),t._setTransform(x),i&&(f.clone(p,t.position),f.clone(y,t.direction),f.clone(b,t.up),f.cross(y,b,t.right))}if(n){const u=a===ce.SCENE2D||f.equals(e._offset3D,f.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,u)}}(this,u,d,h,s,e,i)};const ist=BE;var kE;typeof ko<"u"&&(kE=ko),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,a){function l(S,D){return(null===S||typeof S in y)&&S===D}function u(S,D){var L;return function(){L||(L=p.a.setTimeout(function(){L=e,S()},D))}}function d(S,D){var L;return function(){clearTimeout(L),L=p.a.setTimeout(S,D)}}function h(S,D){D&&"change"!==D?"beforeChange"===D?this.pc(S):this.gb(S,D):this.qc(S)}function m(S,D){null!==D&&D.s&&D.s()}function _(S,D){var L=this.qd,M=L[v];M.ra||(this.Qb&&this.mb[D]?(L.uc(D,S,this.mb[D]),this.mb[D]=null,--this.Qb):M.I[D]||L.uc(D,S,M.J?{da:S}:L.$c(S)),S.Ja&&S.gd())}var S,D,L,M,U,z,p=typeof s<"u"?s:{};p.b=function(S,D){for(var L=S.split("."),M=p,U=0;U<L.length-1;U++)M=M[L[U]];M[L[L.length-1]]=D},p.L=function(S,D,L){S[D]=L},p.version="3.5.1",p.b("version",p.version),p.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},p.a=function(){function S(X,K){for(var $ in X)U.call(X,$)&&K($,X[$])}function D(X,K){if(K)for(var $ in K)U.call(K,$)&&(X[$]=K[$]);return X}function L(X,K){return X.__proto__=K,X}function M(X,K,$,me){var Se=X[K].match(Y)||[];p.a.D($.match(Y),function(fe){p.a.Na(Se,fe,me)}),X[K]=Se.join(" ")}var U=Object.prototype.hasOwnProperty,z={__proto__:[]}instanceof Array,G="function"==typeof Symbol,W={},q={};W[i&&/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],W.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),S(W,function(X,K){if(K.length)for(var $=0,me=K.length;$<me;$++)q[K[$]]=X});var ne,j={propertychange:!0},Q=n&&function(){for(var X=3,K=n.createElement("div"),$=K.getElementsByTagName("i");K.innerHTML="\x3c!--[if gt IE "+ ++X+"]><i></i><![endif]--\x3e",$[0];);return 4<X?X:e}(),Y=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(X,K,$){for(var me=0,Se=X.length;me<Se;me++)K.call($,X[me],me,X)},A:"function"==typeof Array.prototype.indexOf?function(X,K){return Array.prototype.indexOf.call(X,K)}:function(X,K){for(var $=0,me=X.length;$<me;$++)if(X[$]===K)return $;return-1},Lb:function(X,K,$){for(var me=0,Se=X.length;me<Se;me++)if(K.call($,X[me],me,X))return X[me];return e},Pa:function(X,K){var $=p.a.A(X,K);0<$?X.splice($,1):0===$&&X.shift()},wc:function(X){var K=[];return X&&p.a.D(X,function($){0>p.a.A(K,$)&&K.push($)}),K},Mb:function(X,K,$){var me=[];if(X)for(var Se=0,fe=X.length;Se<fe;Se++)me.push(K.call($,X[Se],Se));return me},jb:function(X,K,$){var me=[];if(X)for(var Se=0,fe=X.length;Se<fe;Se++)K.call($,X[Se],Se)&&me.push(X[Se]);return me},Nb:function(X,K){if(K instanceof Array)X.push.apply(X,K);else for(var $=0,me=K.length;$<me;$++)X.push(K[$]);return X},Na:function(X,K,$){var me=p.a.A(p.a.bc(X),K);0>me?$&&X.push(K):$||X.splice(me,1)},Ba:z,extend:D,setPrototypeOf:L,Ab:z?L:D,P:S,Ga:function(X,K,$){if(!X)return X;var Se,me={};for(Se in X)U.call(X,Se)&&(me[Se]=K.call($,X[Se],Se,X));return me},Tb:function(X){for(;X.firstChild;)p.removeNode(X.firstChild)},Yb:function(X){for(var K=((X=p.a.la(X))[0]&&X[0].ownerDocument||n).createElement("div"),$=0,me=X.length;$<me;$++)K.appendChild(p.oa(X[$]));return K},Ca:function(X,K){for(var $=0,me=X.length,Se=[];$<me;$++){var fe=X[$].cloneNode(!0);Se.push(K?p.oa(fe):fe)}return Se},va:function(X,K){if(p.a.Tb(X),K)for(var $=0,me=K.length;$<me;$++)X.appendChild(K[$])},Xc:function(X,K){var $=X.nodeType?[X]:X;if(0<$.length){for(var me=$[0],Se=me.parentNode,fe=0,ye=K.length;fe<ye;fe++)Se.insertBefore(K[fe],me);for(fe=0,ye=$.length;fe<ye;fe++)p.removeNode($[fe])}},Ua:function(X,K){if(X.length){for(K=8===K.nodeType&&K.parentNode||K;X.length&&X[0].parentNode!==K;)X.splice(0,1);for(;1<X.length&&X[X.length-1].parentNode!==K;)X.length--;if(1<X.length){var $=X[0],me=X[X.length-1];for(X.length=0;$!==me;)X.push($),$=$.nextSibling;X.push(me)}}return X},Zc:function(X,K){7>Q?X.setAttribute("selected",K):X.selected=K},Db:function(X){return null===X||X===e?"":X.trim?X.trim():X.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(X,K){return!(K.length>(X=X||"").length)&&X.substring(0,K.length)===K},vd:function(X,K){if(X===K)return!0;if(11===X.nodeType)return!1;if(K.contains)return K.contains(1!==X.nodeType?X.parentNode:X);if(K.compareDocumentPosition)return 16==(16&K.compareDocumentPosition(X));for(;X&&X!=K;)X=X.parentNode;return!!X},Sb:function(X){return p.a.vd(X,X.ownerDocument.documentElement)},kd:function(X){return!!p.a.Lb(X,p.a.Sb)},R:function(X){return X&&X.tagName&&X.tagName.toLowerCase()},Ac:function(X){return p.onError?function(){try{return X.apply(this,arguments)}catch(K){throw p.onError&&p.onError(K),K}}:X},setTimeout:function(X,K){return setTimeout(p.a.Ac(X),K)},Gc:function(X){setTimeout(function(){throw p.onError&&p.onError(X),X},0)},B:function(X,K,$){var me=p.a.Ac($);if($=j[K],p.options.useOnlyNativeEvents||$||!o)if($||"function"!=typeof X.addEventListener){if(!(typeof X.attachEvent<"u"))throw Error("Browser doesn't support addEventListener or attachEvent");var Se=function(ye){me.call(X,ye)},fe="on"+K;X.attachEvent(fe,Se),p.a.K.za(X,function(){X.detachEvent(fe,Se)})}else X.addEventListener(K,me,!1);else ne||(ne="function"==typeof o(X).on?"on":"bind"),o(X)[ne](K,me)},Fb:function(X,K){if(!X||!X.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var $;if($=!("input"!==p.a.R(X)||!X.type||"click"!=K.toLowerCase()||"checkbox"!=($=X.type)&&"radio"!=$),p.options.useOnlyNativeEvents||!o||$)if("function"==typeof n.createEvent){if("function"!=typeof X.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");($=n.createEvent(q[K]||"HTMLEvents")).initEvent(K,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,X),X.dispatchEvent($)}else if($&&X.click)X.click();else{if(!(typeof X.fireEvent<"u"))throw Error("Browser doesn't support triggering events");X.fireEvent("on"+K)}else o(X).trigger(K)},f:function(X){return p.O(X)?X():X},bc:function(X){return p.O(X)?X.v():X},Eb:function(X,K,$){var me;K&&("object"==typeof X.classList?(me=X.classList[$?"add":"remove"],p.a.D(K.match(Y),function(Se){me.call(X.classList,Se)})):"string"==typeof X.className.baseVal?M(X.className,"baseVal",K,$):M(X,"className",K,$))},Bb:function(X,K){var $=p.a.f(K);(null===$||$===e)&&($="");var me=p.h.firstChild(X);!me||3!=me.nodeType||p.h.nextSibling(me)?p.h.va(X,[X.ownerDocument.createTextNode($)]):me.data=$,p.a.Ad(X)},Yc:function(X,K){if(X.name=K,7>=Q)try{var $=X.name.replace(/[&<>'"]/g,function(me){return"&#"+me.charCodeAt(0)+";"});X.mergeAttributes(n.createElement("<input name='"+$+"'/>"),!1)}catch{}},Ad:function(X){9<=Q&&(X=1==X.nodeType?X:X.parentNode).style&&(X.style.zoom=X.style.zoom)},wd:function(X){if(Q){var K=X.style.width;X.style.width=0,X.style.width=K}},Pd:function(X,K){X=p.a.f(X),K=p.a.f(K);for(var $=[],me=X;me<=K;me++)$.push(me);return $},la:function(X){for(var K=[],$=0,me=X.length;$<me;$++)K.push(X[$]);return K},Da:function(X){return G?Symbol(X):X},Zd:6===Q,$d:7===Q,W:Q,Lc:function(X,K){for(var $=p.a.la(X.getElementsByTagName("input")).concat(p.a.la(X.getElementsByTagName("textarea"))),me="string"==typeof K?function(ye){return ye.name===K}:function(ye){return K.test(ye.name)},Se=[],fe=$.length-1;0<=fe;fe--)me($[fe])&&Se.push($[fe]);return Se},Nd:function(X){return"string"==typeof X&&(X=p.a.Db(X))?r&&r.parse?r.parse(X):new Function("return "+X)():null},hc:function(X,K,$){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(p.a.f(X),K,$)},Od:function(X,K,$){var me=($=$||{}).params||{},Se=$.includeFields||this.Jc,fe=X;if("object"==typeof X&&"form"===p.a.R(X)){fe=X.action;for(var ye=Se.length-1;0<=ye;ye--)for(var ve=p.a.Lc(X,Se[ye]),Oe=ve.length-1;0<=Oe;Oe--)me[ve[Oe].name]=ve[Oe].value}K=p.a.f(K);var Ge=n.createElement("form");for(var je in Ge.style.display="none",Ge.action=fe,Ge.method="post",K)(X=n.createElement("input")).type="hidden",X.name=je,X.value=p.a.hc(p.a.f(K[je])),Ge.appendChild(X);S(me,function(Ke,Qt){var nn=n.createElement("input");nn.type="hidden",nn.name=Ke,nn.value=Qt,Ge.appendChild(nn)}),n.body.appendChild(Ge),$.submitter?$.submitter(Ge):Ge.submit(),setTimeout(function(){Ge.parentNode.removeChild(Ge)},0)}}}(),p.b("utils",p.a),p.b("utils.arrayForEach",p.a.D),p.b("utils.arrayFirst",p.a.Lb),p.b("utils.arrayFilter",p.a.jb),p.b("utils.arrayGetDistinctValues",p.a.wc),p.b("utils.arrayIndexOf",p.a.A),p.b("utils.arrayMap",p.a.Mb),p.b("utils.arrayPushAll",p.a.Nb),p.b("utils.arrayRemoveItem",p.a.Pa),p.b("utils.cloneNodes",p.a.Ca),p.b("utils.createSymbolOrString",p.a.Da),p.b("utils.extend",p.a.extend),p.b("utils.fieldsIncludedWithJsonPost",p.a.Jc),p.b("utils.getFormFields",p.a.Lc),p.b("utils.objectMap",p.a.Ga),p.b("utils.peekObservable",p.a.bc),p.b("utils.postJson",p.a.Od),p.b("utils.parseJson",p.a.Nd),p.b("utils.registerEventHandler",p.a.B),p.b("utils.stringifyJson",p.a.hc),p.b("utils.range",p.a.Pd),p.b("utils.toggleDomNodeCssClass",p.a.Eb),p.b("utils.triggerEvent",p.a.Fb),p.b("utils.unwrapObservable",p.a.f),p.b("utils.objectForEach",p.a.P),p.b("utils.addOrRemoveItem",p.a.Na),p.b("utils.setTextContent",p.a.Bb),p.b("unwrap",p.a.f),Function.prototype.bind||(Function.prototype.bind=function(S){var D=this;if(1===arguments.length)return function(){return D.apply(S,arguments)};var L=Array.prototype.slice.call(arguments,1);return function(){var M=L.slice(0);return M.push.apply(M,arguments),D.apply(S,M)}}),p.a.g=new function(){var M,U,S=0,D="__ko__"+(new Date).getTime(),L={};return p.a.W?(M=function(z,G){var W=z[D];if(!W||"null"===W||!L[W]){if(!G)return e;W=z[D]="ko"+S++,L[W]={}}return L[W]},U=function(z){var G=z[D];return!!G&&(delete L[G],z[D]=null,!0)}):(M=function(z,G){var W=z[D];return!W&&G&&(W=z[D]={}),W},U=function(z){return!!z[D]&&(delete z[D],!0)}),{get:function(z,G){var W=M(z,!1);return W&&W[G]},set:function(z,G,W){(z=M(z,W!==e))&&(z[G]=W)},Ub:function(z,G,W){return(z=M(z,!0))[G]||(z[G]=W)},clear:U,Z:function(){return S+++D}}},p.b("utils.domData",p.a.g),p.b("utils.domData.clear",p.a.g.clear),p.a.K=new function(){function S(G,W){var q=p.a.g.get(G,M);return q===e&&W&&p.a.g.set(G,M,q=[]),q}function D(G){if(W=S(G,!1))for(var W=W.slice(0),q=0;q<W.length;q++)W[q](G);p.a.g.clear(G),p.a.K.cleanExternalData(G),z[G.nodeType]&&L(G.childNodes,!0)}function L(G,W){for(var j,q=[],Q=0;Q<G.length;Q++)if((!W||8===G[Q].nodeType)&&(D(q[q.length]=j=G[Q]),G[Q]!==j))for(;Q--&&-1==p.a.A(q,G[Q]););}var M=p.a.g.Z(),U={1:!0,8:!0,9:!0},z={1:!0,9:!0};return{za:function(G,W){if("function"!=typeof W)throw Error("Callback must be a function");S(G,!0).push(W)},yb:function(G,W){var q=S(G,!1);q&&(p.a.Pa(q,W),0==q.length&&p.a.g.set(G,M,e))},oa:function(G){return p.u.G(function(){U[G.nodeType]&&(D(G),z[G.nodeType]&&L(G.getElementsByTagName("*")))}),G},removeNode:function(G){p.oa(G),G.parentNode&&G.parentNode.removeChild(G)},cleanExternalData:function(G){o&&"function"==typeof o.cleanData&&o.cleanData([G])}}},p.oa=p.a.K.oa,p.removeNode=p.a.K.removeNode,p.b("cleanNode",p.oa),p.b("removeNode",p.removeNode),p.b("utils.domNodeDisposal",p.a.K),p.b("utils.domNodeDisposal.addDisposeCallback",p.a.K.za),p.b("utils.domNodeDisposal.removeDisposeCallback",p.a.K.yb),S=[0,"",""],U={thead:D=[1,"<table>","</table>"],tbody:D,tfoot:D,tr:[2,"<table><tbody>","</tbody></table>"],td:L=[3,"<table><tbody><tr>","</tr></tbody></table>"],th:L,option:M=[1,"<select multiple='multiple'>","</select>"],optgroup:M},z=8>=p.a.W,p.a.ua=function(G,W){var q;if(o){if(o.parseHTML)q=o.parseHTML(G,W)||[];else if((q=o.clean([G],W))&&q[0]){for(var j=q[0];j.parentNode&&11!==j.parentNode.nodeType;)j=j.parentNode;j.parentNode&&j.parentNode.removeChild(j)}}else{(q=W)||(q=n),j=q.parentWindow||q.defaultView||t;var ne,Q=p.a.Db(G).toLowerCase(),Y=q.createElement("div");for(ne=(Q=Q.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&U[Q[1]]||S,Q=ne[0],ne="ignored<div>"+ne[1]+G+ne[2]+"</div>","function"==typeof j.innerShiv?Y.appendChild(j.innerShiv(ne)):(z&&q.body.appendChild(Y),Y.innerHTML=ne,z&&Y.parentNode.removeChild(Y));Q--;)Y=Y.lastChild;q=p.a.la(Y.lastChild.childNodes)}return q},p.a.Md=function(G,W){var q=p.a.ua(G,W);return q.length&&q[0].parentElement||p.a.Yb(q)},p.a.fc=function(G,W){if(p.a.Tb(G),null!==(W=p.a.f(W))&&W!==e)if("string"!=typeof W&&(W=W.toString()),o)o(G).html(W);else for(var q=p.a.ua(W,G.ownerDocument),j=0;j<q.length;j++)G.appendChild(q[j])},p.b("utils.parseHtmlFragment",p.a.ua),p.b("utils.setHtml",p.a.fc),p.aa=function(){function S(L,M){if(L)if(8==L.nodeType)null!=(U=p.aa.Uc(L.nodeValue))&&M.push({ud:L,Kd:U});else if(1==L.nodeType)for(var U=0,z=L.childNodes,G=z.length;U<G;U++)S(z[U],M)}var D={};return{Xb:function(L){if("function"!=typeof L)throw Error("You can only pass a function to ko.memoization.memoize()");var M=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return D[M]=L,"\x3c!--[ko_memo:"+M+"]--\x3e"},bd:function(L,M){var U=D[L];if(U===e)throw Error("Couldn't find any memo with ID "+L+". Perhaps it's already been unmemoized.");try{return U.apply(null,M||[]),!0}finally{delete D[L]}},cd:function(L,M){var U=[];S(L,U);for(var z=0,G=U.length;z<G;z++){var W=U[z].ud,q=[W];M&&p.a.Nb(q,M),p.aa.bd(U[z].Kd,q),W.nodeValue="",W.parentNode&&W.parentNode.removeChild(W)}},Uc:function(L){return(L=L.match(/^\[ko_memo\:(.*?)\]$/))?L[1]:null}}}(),p.b("memoization",p.aa),p.b("memoization.memoize",p.aa.Xb),p.b("memoization.unmemoize",p.aa.bd),p.b("memoization.parseMemoText",p.aa.Uc),p.b("memoization.unmemoizeDomNodeAndDescendants",p.aa.cd),p.na=function(){function S(){if(U)for(var j,W=U,q=0;G<U;)if(j=M[G++]){if(G>W){if(5e3<=++q){G=U,p.a.Gc(Error("'Too much recursion' after processing "+q+" task groups."));break}W=U}try{j()}catch(Q){p.a.Gc(Q)}}}function D(){S(),G=U=M.length=0}var L,W,q,M=[],U=0,z=1,G=0;return t.MutationObserver?(W=D,q=n.createElement("div"),new MutationObserver(W).observe(q,{attributes:!0}),L=function(){q.classList.toggle("foo")}):L=n&&"onreadystatechange"in n.createElement("script")?function(W){var q=n.createElement("script");q.onreadystatechange=function(){q.onreadystatechange=null,n.documentElement.removeChild(q),q=null,W()},n.documentElement.appendChild(q)}:function(W){setTimeout(W,0)},{scheduler:L,zb:function(W){return U||p.na.scheduler(D),M[U++]=W,z++},cancel:function(W){(W-=z-U)>=G&&W<U&&(M[W]=null)},resetForTesting:function(){var W=U-G;return G=U=M.length=0,W},Sd:S}}(),p.b("tasks",p.na),p.b("tasks.schedule",p.na.zb),p.b("tasks.runEarly",p.na.Sd),p.Ta={throttle:function(S,D){S.throttleEvaluation=D;var L=null;return p.$({read:S,write:function(M){clearTimeout(L),L=p.a.setTimeout(function(){S(M)},D)}})},rateLimit:function(S,D){var L,M,U;"number"==typeof D?L=D:(L=D.timeout,M=D.method),S.Hb=!1,U="function"==typeof M?M:"notifyWhenChangesStop"==M?d:u,S.ub(function(z){return U(z,L,D)})},deferred:function(S,D){if(!0!==D)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");S.Hb||(S.Hb=!0,S.ub(function(L){var M,U=!1;return function(){if(!U){p.na.cancel(M),M=p.na.zb(L);try{U=!0,S.notifySubscribers(e,"dirty")}finally{U=!1}}}}))},notify:function(S,D){S.equalityComparer="always"==D?null:l}};var y={undefined:1,boolean:1,number:1,string:1};p.b("extenders",p.Ta),p.ic=function(S,D,L){this.da=S,this.lc=D,this.mc=L,this.Ib=!1,this.fb=this.Jb=null,p.L(this,"dispose",this.s),p.L(this,"disposeWhenNodeIsRemoved",this.l)},p.ic.prototype.s=function(){this.Ib||(this.fb&&p.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},p.ic.prototype.l=function(S){this.Jb=S,p.a.K.za(S,this.fb=this.s.bind(this))},p.T=function(){p.a.Ab(this,b),b.qb(this)};var b={qb:function(S){S.U={change:[]},S.sc=1},subscribe:function(S,D,L){var M=this;L=L||"change";var U=new p.ic(M,D?S.bind(D):S,function(){p.a.Pa(M.U[L],U),M.hb&&M.hb(L)});return M.Qa&&M.Qa(L),M.U[L]||(M.U[L]=[]),M.U[L].push(U),U},notifySubscribers:function(S,D){if("change"===(D=D||"change")&&this.Gb(),this.Wa(D)){var L="change"===D&&this.ed||this.U[D].slice(0);try{p.u.xc();for(var U,M=0;U=L[M];++M)U.Ib||U.lc(S)}finally{p.u.end()}}},ob:function(){return this.sc},Dd:function(S){return this.ob()!==S},Gb:function(){++this.sc},ub:function(S){var M,U,z,G,W,D=this,L=p.O(D);D.gb||(D.gb=D.notifySubscribers,D.notifySubscribers=h);var q=S(function(){D.Ja=!1,L&&G===D&&(G=D.nc?D.nc():D());var j=U||W&&D.sb(z,G);W=U=M=!1,j&&D.gb(z=G)});D.qc=function(j,Q){Q&&D.Ja||(W=!Q),D.ed=D.U.change.slice(0),D.Ja=M=!0,G=j,q()},D.pc=function(j){M||(z=j,D.gb(j,"beforeChange"))},D.rc=function(){W=!0},D.gd=function(){D.sb(z,D.v(!0))&&(U=!0)}},Wa:function(S){return this.U[S]&&this.U[S].length},Bd:function(S){if(S)return this.U[S]&&this.U[S].length||0;var D=0;return p.a.P(this.U,function(L,M){"dirty"!==L&&(D+=M.length)}),D},sb:function(S,D){return!this.equalityComparer||!this.equalityComparer(S,D)},toString:function(){return"[object Object]"},extend:function(S){var D=this;return S&&p.a.P(S,function(L,M){var U=p.Ta[L];"function"==typeof U&&(D=U(D,M)||D)}),D}};p.L(b,"init",b.qb),p.L(b,"subscribe",b.subscribe),p.L(b,"extend",b.extend),p.L(b,"getSubscriptionsCount",b.Bd),p.a.Ba&&p.a.setPrototypeOf(b,Function.prototype),p.T.fn=b,p.Qc=function(S){return null!=S&&"function"==typeof S.subscribe&&"function"==typeof S.notifySubscribers},p.b("subscribable",p.T),p.b("isSubscribable",p.Qc),p.S=p.u=function(){function S(z){L.push(M),M=z}function D(){M=L.pop()}var M,L=[],U=0;return{xc:S,end:D,cc:function(z){if(M){if(!p.Qc(z))throw Error("Only subscribable things can act as dependencies");M.od.call(M.pd,z,z.fd||(z.fd=++U))}},G:function(z,G,W){try{return S(),z.apply(G,W||[])}finally{D()}},qa:function(){if(M)return M.o.qa()},Va:function(){if(M)return M.o.Va()},Ya:function(){if(M)return M.Ya},o:function(){if(M)return M.o}}}(),p.b("computedContext",p.S),p.b("computedContext.getDependenciesCount",p.S.qa),p.b("computedContext.getDependencies",p.S.Va),p.b("computedContext.isInitial",p.S.Ya),p.b("computedContext.registerDependency",p.S.cc),p.b("ignoreDependencies",p.Yd=p.u.G);var x=p.a.Da("_latestValue");p.ta=function(S){function D(){return 0<arguments.length?(D.sb(D[x],arguments[0])&&(D.ya(),D[x]=arguments[0],D.xa()),this):(p.u.cc(D),D[x])}return D[x]=S,p.a.Ba||p.a.extend(D,p.T.fn),p.T.fn.qb(D),p.a.Ab(D,C),p.options.deferUpdates&&p.Ta.deferred(D,!0),D};var C={equalityComparer:l,v:function(){return this[x]},xa:function(){this.notifySubscribers(this[x],"spectate"),this.notifySubscribers(this[x])},ya:function(){this.notifySubscribers(this[x],"beforeChange")}};p.a.Ba&&p.a.setPrototypeOf(C,p.T.fn);var w=p.ta.Ma="__ko_proto__";C[w]=p.ta,p.O=function(S){if((S="function"==typeof S&&S[w])&&S!==C[w]&&S!==p.o.fn[w])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!S},p.Za=function(S){return"function"==typeof S&&(S[w]===C[w]||S[w]===p.o.fn[w]&&S.Nc)},p.b("observable",p.ta),p.b("isObservable",p.O),p.b("isWriteableObservable",p.Za),p.b("isWritableObservable",p.Za),p.b("observable.fn",C),p.L(C,"peek",C.v),p.L(C,"valueHasMutated",C.xa),p.L(C,"valueWillMutate",C.ya),p.Ha=function(S){if("object"!=typeof(S=S||[])||!("length"in S))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return S=p.ta(S),p.a.Ab(S,p.Ha.fn),S.extend({trackArrayChanges:!0})},p.Ha.fn={remove:function(S){for(var D=this.v(),L=[],M="function"!=typeof S||p.O(S)?function(G){return G===S}:S,U=0;U<D.length;U++){var z=D[U];if(M(z)){if(0===L.length&&this.ya(),D[U]!==z)throw Error("Array modified during remove; cannot remove item");L.push(z),D.splice(U,1),U--}}return L.length&&this.xa(),L},removeAll:function(S){if(S===e){var D=this.v(),L=D.slice(0);return this.ya(),D.splice(0,D.length),this.xa(),L}return S?this.remove(function(M){return 0<=p.a.A(S,M)}):[]},destroy:function(S){var D=this.v(),L="function"!=typeof S||p.O(S)?function(z){return z===S}:S;this.ya();for(var M=D.length-1;0<=M;M--){var U=D[M];L(U)&&(U._destroy=!0)}this.xa()},destroyAll:function(S){return S===e?this.destroy(function(){return!0}):S?this.destroy(function(D){return 0<=p.a.A(S,D)}):[]},indexOf:function(S){var D=this();return p.a.A(D,S)},replace:function(S,D){var L=this.indexOf(S);0<=L&&(this.ya(),this.v()[L]=D,this.xa())},sorted:function(S){var D=this().slice(0);return S?D.sort(S):D.sort()},reversed:function(){return this().slice(0).reverse()}},p.a.Ba&&p.a.setPrototypeOf(p.Ha.fn,p.ta.fn),p.a.D("pop push reverse shift sort splice unshift".split(" "),function(S){p.Ha.fn[S]=function(){var D=this.v();this.ya(),this.zc(D,S,arguments);var L=D[S].apply(D,arguments);return this.xa(),L===D?this:L}}),p.a.D(["slice"],function(S){p.Ha.fn[S]=function(){var D=this();return D[S].apply(D,arguments)}}),p.Pc=function(S){return p.O(S)&&"function"==typeof S.remove&&"function"==typeof S.push},p.b("observableArray",p.Ha),p.b("isObservableArray",p.Pc),p.Ta.trackArrayChanges=function(S,D){if(S.Ob={},D&&"object"==typeof D&&p.a.extend(S.Ob,D),S.Ob.sparse=!0,!S.zc){var z,G,q,M=!1,U=null,W=0,j=S.Qa,Q=S.hb;S.Qa=function(Y){j&&j.call(S,Y),"arrayChange"===Y&&function L(){function Y(){if(W){var X,ne=[].concat(S.v()||[]);S.Wa("arrayChange")&&((!U||1<W)&&(U=p.a.Pb(q,ne,S.Ob)),X=U),q=ne,U=null,W=0,X&&X.length&&S.notifySubscribers(X,"arrayChange")}}M?Y():(M=!0,G=S.subscribe(function(){++W},null,"spectate"),q=[].concat(S.v()||[]),U=null,z=S.subscribe(Y))}()},S.hb=function(Y){Q&&Q.call(S,Y),"arrayChange"!==Y||S.Wa("arrayChange")||(z&&z.s(),G&&G.s(),G=z=null,M=!1,q=e)},S.zc=function(Y,ne,X){function K(Ge,je,Ke){return $[$.length]={status:Ge,value:je,index:Ke}}if(M&&!W){var $=[],me=Y.length,Se=X.length,fe=0;switch(ne){case"push":fe=me;case"unshift":for(ne=0;ne<Se;ne++)K("added",X[ne],fe+ne);break;case"pop":fe=me-1;case"shift":me&&K("deleted",Y[fe],fe);break;case"splice":ne=Math.min(Math.max(0,0>X[0]?me+X[0]:X[0]),me),me=1===Se?me:Math.min(ne+(X[1]||0),me),Se=ne+Se-2,fe=Math.max(me,Se);for(var ye=[],ve=[],Oe=2;ne<fe;++ne,++Oe)ne<me&&ve.push(K("deleted",Y[ne],ne)),ne<Se&&ye.push(K("added",X[Oe],ne));p.a.Kc(ve,ye);break;default:return}U=$}}}};var v=p.a.Da("_state");p.o=p.$=function(S,D,L){function M(){if(0<arguments.length){if("function"!=typeof U)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 U.apply(z.nb,arguments),this}return z.ra||p.u.cc(M),(z.ka||z.J&&M.Xa())&&M.ha(),z.X}if("object"==typeof S?L=S:(L=L||{},S&&(L.read=S)),"function"!=typeof L.read)throw Error("Pass a function that returns the value of the ko.computed");var U=L.write,z={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:L.read,nb:D||L.owner,l:L.disposeWhenNodeIsRemoved||L.l||null,Sa:L.disposeWhen||L.Sa,Rb:null,I:{},V:0,Ic:null};return M[v]=z,M.Nc="function"==typeof U,p.a.Ba||p.a.extend(M,p.T.fn),p.T.fn.qb(M),p.a.Ab(M,I),L.pure?(z.wb=!0,z.J=!0,p.a.extend(M,P)):L.deferEvaluation&&p.a.extend(M,N),p.options.deferUpdates&&p.Ta.deferred(M,!0),z.l&&(z.jc=!0,z.l.nodeType||(z.l=null)),z.J||L.deferEvaluation||M.ha(),z.l&&M.ja()&&p.a.K.za(z.l,z.Rb=function(){M.s()}),M};var I={equalityComparer:l,qa:function(){return this[v].V},Va:function(){var S=[];return p.a.P(this[v].I,function(D,L){S[L.Ka]=L.da}),S},Vb:function(S){if(!this[v].V)return!1;var D=this.Va();return-1!==p.a.A(D,S)||!!p.a.Lb(D,function(L){return L.Vb&&L.Vb(S)})},uc:function(S,D,L){if(this[v].wb&&D===this)throw Error("A 'pure' computed must not be called recursively");this[v].I[S]=L,L.Ka=this[v].V++,L.La=D.ob()},Xa:function(){var S,D,L=this[v].I;for(S in L)if(Object.prototype.hasOwnProperty.call(L,S)&&(D=L[S],this.Ia&&D.da.Ja||D.da.Dd(D.La)))return!0},Jd:function(){this.Ia&&!this[v].rb&&this.Ia(!1)},ja:function(){var S=this[v];return S.ka||0<S.V},Rd:function(){this.Ja?this[v].ka&&(this[v].sa=!0):this.Hc()},$c:function(S){if(S.Hb){var D=S.subscribe(this.Jd,this,"dirty"),L=S.subscribe(this.Rd,this);return{da:S,s:function(){D.s(),L.s()}}}return S.subscribe(this.Hc,this)},Hc:function(){var S=this,D=S.throttleEvaluation;D&&0<=D?(clearTimeout(this[v].Ic),this[v].Ic=p.a.setTimeout(function(){S.ha(!0)},D)):S.Ia?S.Ia(!0):S.ha(!0)},ha:function(S){var D=this[v],L=D.Sa,M=!1;if(!D.rb&&!D.ra){if(D.l&&!p.a.Sb(D.l)||L&&L()){if(!D.jc)return void this.s()}else D.jc=!1;D.rb=!0;try{M=this.zd(S)}finally{D.rb=!1}return M}},zd:function(S){var D=this[v],M=!1,L=D.wb?e:!D.V;p.u.xc({pd:M={qd:this,mb:D.I,Qb:D.V},od:_,o:this,Ya:L}),D.I={},D.V=0;var U=this.yd(D,M);return D.V?M=this.sb(D.X,U):(this.s(),M=!0),M&&(D.J?this.Gb():this.notifySubscribers(D.X,"beforeChange"),D.X=U,this.notifySubscribers(D.X,"spectate"),!D.J&&S&&this.notifySubscribers(D.X),this.rc&&this.rc()),L&&this.notifySubscribers(D.X,"awake"),M},yd:function(S,D){try{var L=S.Wc;return S.nb?L.call(S.nb):L()}finally{p.u.end(),D.Qb&&!S.J&&p.a.P(D.mb,m),S.sa=S.ka=!1}},v:function(S){var D=this[v];return(D.ka&&(S||!D.V)||D.J&&this.Xa())&&this.ha(),D.X},ub:function(S){p.T.fn.ub.call(this,S),this.nc=function(){return this[v].J||(this[v].sa?this.ha():this[v].ka=!1),this[v].X},this.Ia=function(D){this.pc(this[v].X),this[v].ka=!0,D&&(this[v].sa=!0),this.qc(this,!D)}},s:function(){var S=this[v];!S.J&&S.I&&p.a.P(S.I,function(D,L){L.s&&L.s()}),S.l&&S.Rb&&p.a.K.yb(S.l,S.Rb),S.I=e,S.V=0,S.ra=!0,S.sa=!1,S.ka=!1,S.J=!1,S.l=e,S.Sa=e,S.Wc=e,this.Nc||(S.nb=e)}},P={Qa:function(S){var D=this,L=D[v];if(!L.ra&&L.J&&"change"==S){if(L.J=!1,L.sa||D.Xa())L.I=null,L.V=0,D.ha()&&D.Gb();else{var M=[];p.a.P(L.I,function(U,z){M[z.Ka]=U}),p.a.D(M,function(U,z){var G=L.I[U],W=D.$c(G.da);W.Ka=z,W.La=G.La,L.I[U]=W}),D.Xa()&&D.ha()&&D.Gb()}L.ra||D.notifySubscribers(L.X,"awake")}},hb:function(S){var D=this[v];D.ra||"change"!=S||this.Wa("change")||(p.a.P(D.I,function(L,M){M.s&&(D.I[L]={da:M.da,Ka:M.Ka,La:M.La},M.s())}),D.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var S=this[v];return S.J&&(S.sa||this.Xa())&&this.ha(),p.T.fn.ob.call(this)}},N={Qa:function(S){"change"!=S&&"beforeChange"!=S||this.v()}};p.a.Ba&&p.a.setPrototypeOf(I,p.T.fn);var R=p.ta.Ma;I[R]=p.o,p.Oc=function(S){return"function"==typeof S&&S[R]===I[R]},p.Fd=function(S){return p.Oc(S)&&S[v]&&S[v].wb},p.b("computed",p.o),p.b("dependentObservable",p.o),p.b("isComputed",p.Oc),p.b("isPureComputed",p.Fd),p.b("computed.fn",I),p.L(I,"peek",I.v),p.L(I,"dispose",I.s),p.L(I,"isActive",I.ja),p.L(I,"getDependenciesCount",I.qa),p.L(I,"getDependencies",I.Va),p.xb=function(S,D){return"function"==typeof S?p.o(S,D,{pure:!0}):((S=p.a.extend({},S)).pure=!0,p.o(S,D))},p.b("pureComputed",p.xb),function(){function S(M,U,z){if(z=z||new L,"object"!=typeof(M=U(M))||null===M||M===e||M instanceof RegExp||M instanceof Date||M instanceof String||M instanceof Number||M instanceof Boolean)return M;var G=M instanceof Array?[]:{};return z.save(M,G),function D(M,U){if(M instanceof Array){for(var z=0;z<M.length;z++)U(z);"function"==typeof M.toJSON&&U("toJSON")}else for(z in M)U(z)}(M,function(W){var q=U(M[W]);switch(typeof q){case"boolean":case"number":case"string":case"function":G[W]=q;break;case"object":case"undefined":var j=z.get(q);G[W]=j!==e?j:S(q,U,z)}}),G}function L(){this.keys=[],this.values=[]}p.ad=function(M){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return S(M,function(U){for(var z=0;p.O(U)&&10>z;z++)U=U();return U})},p.toJSON=function(M,U,z){return M=p.ad(M),p.a.hc(M,U,z)},L.prototype={constructor:L,save:function(M,U){var z=p.a.A(this.keys,M);0<=z?this.values[z]=U:(this.keys.push(M),this.values.push(U))},get:function(M){return 0<=(M=p.a.A(this.keys,M))?this.values[M]:e}}}(),p.b("toJS",p.ad),p.b("toJSON",p.toJSON),p.Wd=function(S,D,L){function M(U){var z=p.xb(S,L).extend({ma:"always"}),G=z.subscribe(function(W){W&&(G.s(),U(W))});return z.notifySubscribers(z.v()),G}return"function"!=typeof Promise||D?M(D.bind(L)):new Promise(M)},p.b("when",p.Wd),p.w={M:function(S){switch(p.a.R(S)){case"option":return!0===S.__ko__hasDomDataOptionValue__?p.a.g.get(S,p.c.options.$b):7>=p.a.W?S.getAttributeNode("value")&&S.getAttributeNode("value").specified?S.value:S.text:S.value;case"select":return 0<=S.selectedIndex?p.w.M(S.options[S.selectedIndex]):e;default:return S.value}},cb:function(S,D,L){switch(p.a.R(S)){case"option":"string"==typeof D?(p.a.g.set(S,p.c.options.$b,e),"__ko__hasDomDataOptionValue__"in S&&delete S.__ko__hasDomDataOptionValue__,S.value=D):(p.a.g.set(S,p.c.options.$b,D),S.__ko__hasDomDataOptionValue__=!0,S.value="number"==typeof D?D:"");break;case"select":(""===D||null===D)&&(D=e);for(var G,M=-1,U=0,z=S.options.length;U<z;++U)if((G=p.w.M(S.options[U]))==D||""===G&&D===e){M=U;break}(L||0<=M||D===e&&1<S.size)&&(S.selectedIndex=M,6===p.a.W&&p.a.setTimeout(function(){S.selectedIndex=M},0));break;default:(null===D||D===e)&&(D=""),S.value=D}}},p.b("selectExtensions",p.w),p.b("selectExtensions.readValue",p.w.M),p.b("selectExtensions.writeValue",p.w.cb),p.m=function(){function S(W){123===(W=p.a.Db(W)).charCodeAt(0)&&(W=W.slice(1,-1));var Q,q=[],j=(W+="\n,").match(M),Y=[],ne=0;if(1<j.length){for(var K,X=0;K=j[X];++X){var $=K.charCodeAt(0);if(44===$){if(0>=ne){q.push(Q&&Y.length?{key:Q,value:Y.join("")}:{unknown:Q||Y.join("")}),Q=ne=0,Y=[];continue}}else if(58===$){if(!ne&&!Q&&1===Y.length){Q=Y.pop();continue}}else{if(47===$&&1<K.length&&(47===K.charCodeAt(1)||42===K.charCodeAt(1)))continue;47===$&&X&&1<K.length?($=j[X-1].match(U))&&!z[$[0]]&&(j=(W=W.substr(W.indexOf(K)+1)).match(M),X=-1,K="/"):40===$||123===$||91===$?++ne:41===$||125===$||93===$?--ne:Q||Y.length||34!==$&&39!==$||(K=K.slice(1,-1))}Y.push(K)}if(0<ne)throw Error("Unbalanced parentheses, braces, or brackets")}return q}var D=["true","false","null","undefined"],L=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,M=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),U=/[\])"'A-Za-z0-9_$]+$/,z={in:1,return:1,typeof:1},G={};return{Ra:[],wa:G,ac:S,vb:function(W,q){function j($,me){var Se;if(!X){var fe=p.getBindingHandler($);if(fe&&fe.preprocess&&!(me=fe.preprocess(me,$,j)))return;(fe=G[$])&&(0<=p.a.A(D,Se=me)?Se=!1:(fe=Se.match(L),Se=null!==fe&&(fe[1]?"Object("+fe[1]+")"+fe[2]:Se)),fe=Se),fe&&Y.push("'"+("string"==typeof G[$]?G[$]:$)+"':function(_z){"+Se+"=_z}")}ne&&(me="function(){return "+me+" }"),Q.push("'"+$+"':"+me)}var Q=[],Y=[],ne=(q=q||{}).valueAccessors,X=q.bindingParams,K="string"==typeof W?S(W):W;return p.a.D(K,function($){j($.key||$.unknown,$.value)}),Y.length&&j("_ko_property_writers","{"+Y.join(",")+" }"),Q.join(",")},Id:function(W,q){for(var j=0;j<W.length;j++)if(W[j].key==q)return!0;return!1},eb:function(W,q,j,Q,Y){W&&p.O(W)?!p.Za(W)||Y&&W.v()===Q||W(Q):(W=q.get("_ko_property_writers"))&&W[j]&&W[j](Q)}}}(),p.b("expressionRewriting",p.m),p.b("expressionRewriting.bindingRewriteValidators",p.m.Ra),p.b("expressionRewriting.parseObjectLiteral",p.m.ac),p.b("expressionRewriting.preProcessBindings",p.m.vb),p.b("expressionRewriting._twoWayBindings",p.m.wa),p.b("jsonExpressionRewriting",p.m),p.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",p.m.vb),function(){function S(j){return 8==j.nodeType&&z.test(U?j.text:j.nodeValue)}function D(j){return 8==j.nodeType&&G.test(U?j.text:j.nodeValue)}function L(j,Q){for(var Y=j,ne=1,X=[];Y=Y.nextSibling;){if(D(Y)&&(p.a.g.set(Y,q,!0),0==--ne))return X;X.push(Y),S(Y)&&ne++}if(!Q)throw Error("Cannot find closing comment tag to match: "+j.nodeValue);return null}function M(j,Q){var Y=L(j,Q);return Y?0<Y.length?Y[Y.length-1].nextSibling:j.nextSibling:null}var U=n&&"\x3c!--test--\x3e"===n.createComment("test").text,z=U?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,G=U?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,W={ul:!0,ol:!0},q="__ko_matchedEndComment__";p.h={ea:{},childNodes:function(j){return S(j)?L(j):j.childNodes},Ea:function(j){if(S(j))for(var Q=0,Y=(j=p.h.childNodes(j)).length;Q<Y;Q++)p.removeNode(j[Q]);else p.a.Tb(j)},va:function(j,Q){if(S(j)){p.h.Ea(j);for(var Y=j.nextSibling,ne=0,X=Q.length;ne<X;ne++)Y.parentNode.insertBefore(Q[ne],Y)}else p.a.va(j,Q)},Vc:function(j,Q){var Y;S(j)?(Y=j.nextSibling,j=j.parentNode):Y=j.firstChild,Y?Q!==Y&&j.insertBefore(Q,Y):j.appendChild(Q)},Wb:function(j,Q,Y){Y?(Y=Y.nextSibling,S(j)&&(j=j.parentNode),Y?Q!==Y&&j.insertBefore(Q,Y):j.appendChild(Q)):p.h.Vc(j,Q)},firstChild:function(j){if(S(j))return!j.nextSibling||D(j.nextSibling)?null:j.nextSibling;if(j.firstChild&&D(j.firstChild))throw Error("Found invalid end comment, as the first child of "+j);return j.firstChild},nextSibling:function(j){if(S(j)&&(j=M(j)),j.nextSibling&&D(j.nextSibling)){var Q=j.nextSibling;if(D(Q)&&!p.a.g.get(Q,q))throw Error("Found end comment without a matching opening comment, as child of "+j);return null}return j.nextSibling},Cd:S,Vd:function(j){return(j=(U?j.text:j.nodeValue).match(z))?j[1]:null},Sc:function(j){if(W[p.a.R(j)]){var Q=j.firstChild;if(Q)do{if(1===Q.nodeType){var Y,ne=null;if(Y=Q.firstChild)do{if(ne)ne.push(Y);else if(S(Y)){var X=M(Y,!0);X?Y=X:ne=[Y]}else D(Y)&&(ne=[Y])}while(Y=Y.nextSibling);if(Y=ne)for(ne=Q.nextSibling,X=0;X<Y.length;X++)ne?j.insertBefore(Y[X],ne):j.appendChild(Y[X])}}while(Q=Q.nextSibling)}}}}(),p.b("virtualElements",p.h),p.b("virtualElements.allowedBindings",p.h.ea),p.b("virtualElements.emptyNode",p.h.Ea),p.b("virtualElements.insertAfter",p.h.Wb),p.b("virtualElements.prepend",p.h.Vc),p.b("virtualElements.setDomNodeChildren",p.h.va),p.ga=function(){this.nd={}},p.a.extend(p.ga.prototype,{nodeHasBindings:function(S){switch(S.nodeType){case 1:return null!=S.getAttribute("data-bind")||p.j.getComponentNameForNode(S);case 8:return p.h.Cd(S);default:return!1}},getBindings:function(S,D){var L=(L=this.getBindingsString(S,D))?this.parseBindingsString(L,D,S):null;return p.j.tc(L,S,D,!1)},getBindingAccessors:function(S,D){var L=(L=this.getBindingsString(S,D))?this.parseBindingsString(L,D,S,{valueAccessors:!0}):null;return p.j.tc(L,S,D,!0)},getBindingsString:function(S){switch(S.nodeType){case 1:return S.getAttribute("data-bind");case 8:return p.h.Vd(S);default:return null}},parseBindingsString:function(S,D,L,M){try{var G,U=this.nd,z=S+(M&&M.valueAccessors||"");if(!(G=U[z])){var W,q="with($context){with($data||{}){return{"+p.m.vb(S,M)+"}}}";W=new Function("$context","$element",q),G=U[z]=W}return G(D,L)}catch(j){throw j.message="Unable to parse bindings.\nBindings value: "+S+"\nMessage: "+j.message,j}}}),p.ga.instance=new p.ga,p.b("bindingProvider",p.ga),function(){function S(fe){var ye=(fe=p.a.g.get(fe,Se))&&fe.N;ye&&(fe.N=null,ye.Tc())}function D(fe,ye,ve){this.node=fe,this.yc=ye,this.kb=[],this.H=!1,ye.N||p.a.K.za(fe,S),ve&&ve.N&&(ve.N.kb.push(fe),this.Kb=ve)}function L(fe){return function(){return fe}}function M(fe){return fe()}function U(fe){return p.a.Ga(p.u.G(fe),function(ye,ve){return function(){return fe()[ve]}})}function G(fe,ye){return U(this.getBindings.bind(this,fe,ye))}function W(fe,ye){var ve=p.h.firstChild(ye);if(ve){var Oe,Ge=p.ga.instance,je=Ge.preprocessNode;if(je){for(;Oe=ve;)ve=p.h.nextSibling(Oe),je.call(Ge,Oe);ve=p.h.firstChild(ye)}for(;Oe=ve;)ve=p.h.nextSibling(Oe),q(fe,Oe)}p.i.ma(ye,p.i.H)}function q(fe,ye){var ve=fe,Oe=1===ye.nodeType;Oe&&p.h.Sc(ye),(Oe||p.ga.instance.nodeHasBindings(ye))&&(ve=Q(ye,null,fe).bindingContextForDescendants),ve&&!$[p.a.R(ye)]&&W(ve,ye)}function Q(fe,ye,ve){var je,Oe=p.a.g.Ub(fe,Se,{}),Ge=Oe.hd;if(!ye){if(Ge)throw Error("You cannot apply bindings multiple times to the same element.");Oe.hd=!0}if(Ge||(Oe.context=ve),Oe.Zb||(Oe.Zb={}),ye&&"function"!=typeof ye)je=ye;else{var Ke=p.ga.instance,Qt=Ke.getBindingAccessors||G,nn=p.$(function(){return(je=ye?ye(ve,fe):Qt.call(Ke,fe,ve))&&(ve[ne]&&ve[ne](),ve[K]&&ve[K]()),je},null,{l:fe});je&&nn.ja()||(nn=null)}var ft,Pt=ve;if(je){var gn=function(){return p.a.Ga(nn?nn():je,M)},Ft=nn?function(Ht){return function(){return M(nn()[Ht])}}:function(Ht){return je[Ht]};gn.get=function(Ht){return je[Ht]&&M(Ft(Ht))},gn.has=function(Ht){return Ht in je},p.i.H in je&&p.i.subscribe(fe,p.i.H,function(){var Ht=(0,je[p.i.H])();if(Ht){var Cn=p.h.childNodes(fe);Cn.length&&Ht(Cn,p.Ec(Cn[0]))}}),p.i.pa in je&&(Pt=p.i.Cb(fe,ve),p.i.subscribe(fe,p.i.pa,function(){var Ht=(0,je[p.i.pa])();Ht&&p.h.firstChild(fe)&&Ht(fe)})),Oe=function j(fe){var ye=[],ve={},Oe=[];return p.a.P(fe,function Ge(je){if(!ve[je]){var Ke=p.getBindingHandler(je);Ke&&(Ke.after&&(Oe.push(je),p.a.D(Ke.after,function(Qt){if(fe[Qt]){if(-1!==p.a.A(Oe,Qt))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+Oe.join(", "));Ge(Qt)}}),Oe.length--),ye.push({key:je,Mc:Ke})),ve[je]=!0}}),ye}(je),p.a.D(Oe,function(Ht){var Cn=Ht.Mc.init,pe=Ht.Mc.update,Ie=Ht.key;if(8===fe.nodeType&&!p.h.ea[Ie])throw Error("The binding '"+Ie+"' cannot be used with virtual elements");try{"function"==typeof Cn&&p.u.G(function(){var on=Cn(fe,Ft(Ie),gn,Pt.$data,Pt);if(on&&on.controlsDescendantBindings){if(ft!==e)throw Error("Multiple bindings ("+ft+" and "+Ie+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");ft=Ie}}),"function"==typeof pe&&p.$(function(){pe(fe,Ft(Ie),gn,Pt.$data,Pt)},null,{l:fe})}catch(on){throw on.message='Unable to process binding "'+Ie+": "+je[Ie]+'"\nMessage: '+on.message,on}})}return{shouldBindDescendants:Oe=ft===e,bindingContextForDescendants:Oe&&Pt}}function Y(fe,ye){return fe&&fe instanceof p.fa?fe:new p.fa(fe,e,e,ye)}var ne=p.a.Da("_subscribable"),X=p.a.Da("_ancestorBindingInfo"),K=p.a.Da("_dataDependency");p.c={};var $={script:!0,textarea:!0,template:!0};p.getBindingHandler=function(fe){return p.c[fe]};var me={};p.fa=function(fe,ye,ve,Oe,Ge){function je(){var Ft=Pt?nn():nn,Ht=p.a.f(Ft);return ye?(p.a.extend(Ke,ye),X in ye&&(Ke[X]=ye[X])):(Ke.$parents=[],Ke.$root=Ht,Ke.ko=p),Ke[ne]=ft,Qt?Ht=Ke.$data:(Ke.$rawData=Ft,Ke.$data=Ht),ve&&(Ke[ve]=Ht),Oe&&Oe(Ke,ye,Ht),ye&&ye[ne]&&!p.S.o().Vb(ye[ne])&&ye[ne](),gn&&(Ke[K]=gn),Ke.$data}var ft,Ke=this,Qt=fe===me,nn=Qt?e:fe,Pt="function"==typeof nn&&!p.O(nn),gn=Ge&&Ge.dataDependency;Ge&&Ge.exportDependencies?je():((ft=p.xb(je)).v(),ft.ja()?ft.equalityComparer=null:Ke[ne]=e)},p.fa.prototype.createChildContext=function(fe,ye,ve,Oe){if(!Oe&&ye&&"object"==typeof ye&&(ye=(Oe=ye).as,ve=Oe.extend),ye&&Oe&&Oe.noChildContext){var Ge="function"==typeof fe&&!p.O(fe);return new p.fa(me,this,null,function(je){ve&&ve(je),je[ye]=Ge?fe():fe},Oe)}return new p.fa(fe,this,ye,function(je,Ke){je.$parentContext=Ke,je.$parent=Ke.$data,je.$parents=(Ke.$parents||[]).slice(0),je.$parents.unshift(je.$parent),ve&&ve(je)},Oe)},p.fa.prototype.extend=function(fe,ye){return new p.fa(me,this,null,function(ve){p.a.extend(ve,"function"==typeof fe?fe(ve):fe)},ye)};var Se=p.a.g.Z();D.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},D.prototype.sd=function(fe){p.a.Pa(this.kb,fe),!this.kb.length&&this.H&&this.Cc()},D.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,p.a.K.yb(this.node,S),p.i.ma(this.node,p.i.pa),this.Tc())},p.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(fe,ye,ve,Oe,Ge){var je=p.a.g.Ub(fe,Se,{});return je.Fa||(je.Fa=new p.T),Ge&&Ge.notifyImmediately&&je.Zb[ye]&&p.u.G(ve,Oe,[fe]),je.Fa.subscribe(ve,Oe,ye)},ma:function(fe,ye){var ve=p.a.g.get(fe,Se);if(ve&&(ve.Zb[ye]=!0,ve.Fa&&ve.Fa.notifySubscribers(fe,ye),ye==p.i.H))if(ve.N)ve.N.Cc();else if(ve.N===e&&ve.Fa&&ve.Fa.Wa(p.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(fe,ye){var ve=p.a.g.Ub(fe,Se,{});return ve.N||(ve.N=new D(fe,ve,ye[X])),ye[X]==ve?ye:ye.extend(function(Oe){Oe[X]=ve})}},p.Td=function(fe){return(fe=p.a.g.get(fe,Se))&&fe.context},p.ib=function(fe,ye,ve){return 1===fe.nodeType&&p.h.Sc(fe),Q(fe,ye,Y(ve))},p.ld=function(fe,ye,ve){return ve=Y(ve),p.ib(fe,function z(fe,ye,ve){return"function"==typeof fe?U(fe.bind(null,ye,ve)):p.a.Ga(fe,L)}(ye,ve,fe),ve)},p.Oa=function(fe,ye){1!==ye.nodeType&&8!==ye.nodeType||W(Y(fe),ye)},p.vc=function(fe,ye,ve){if(!o&&t.jQuery&&(o=t.jQuery),2>arguments.length){if(!(ye=n.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!ye||1!==ye.nodeType&&8!==ye.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");q(Y(fe,ve),ye)},p.Dc=function(fe){return!fe||1!==fe.nodeType&&8!==fe.nodeType?e:p.Td(fe)},p.Ec=function(fe){return(fe=p.Dc(fe))?fe.$data:e},p.b("bindingHandlers",p.c),p.b("bindingEvent",p.i),p.b("bindingEvent.subscribe",p.i.subscribe),p.b("bindingEvent.startPossiblyAsyncContentBinding",p.i.Cb),p.b("applyBindings",p.vc),p.b("applyBindingsToDescendants",p.Oa),p.b("applyBindingAccessorsToNode",p.ib),p.b("applyBindingsToNode",p.ld),p.b("contextFor",p.Dc),p.b("dataFor",p.Ec)}(),function(S){function D(G,W){var j,q=Object.prototype.hasOwnProperty.call(U,G)?U[G]:S;q?q.subscribe(W):((q=U[G]=new p.T).subscribe(W),function L(G,W){M("getConfig",[G],function(q){q?M("loadComponent",[G,q],function(j){W(j,q)}):W(null,null)})}(G,function(Q,Y){var ne=!(!Y||!Y.synchronous);z[G]={definition:Q,Gd:ne},delete U[G],j||ne?q.notifySubscribers(Q):p.na.zb(function(){q.notifySubscribers(Q)})}),j=!0)}function M(G,W,q,j){j||(j=p.j.loaders.slice(0));var Q=j.shift();if(Q){var Y=Q[G];if(Y){var ne=!1;if(Y.apply(Q,W.concat(function(X){ne?q(null):null!==X?q(X):M(G,W,q,j)}))!==S&&(ne=!0,!Q.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else M(G,W,q,j)}else q(null)}var U={},z={};p.j={get:function(G,W){var q=Object.prototype.hasOwnProperty.call(z,G)?z[G]:S;q?q.Gd?p.u.G(function(){W(q.definition)}):p.na.zb(function(){W(q.definition)}):D(G,W)},Bc:function(G){delete z[G]},oc:M},p.j.loaders=[],p.b("components",p.j),p.b("components.get",p.j.get),p.b("components.clearCachedDefinition",p.j.Bc)}(),function(){function D(q,j,Q){if("function"==typeof j)Q(function(ne){return new j(ne)});else if("function"==typeof j[W])Q(j[W]);else if("instance"in j){var Y=j.instance;Q(function(){return Y})}else"viewModel"in j?D(q,j.viewModel,Q):q("Unknown viewModel value: "+j)}function L(q){switch(p.a.R(q)){case"script":return p.a.ua(q.text);case"textarea":return p.a.ua(q.value);case"template":if(M(q.content))return p.a.Ca(q.content.childNodes)}return p.a.Ca(q.childNodes)}function M(q){return t.DocumentFragment?q instanceof DocumentFragment:q&&11===q.nodeType}function U(q,j,Q){"string"==typeof j.require?t.require?(0,t.require)([j.require],function(Y){Y&&"object"==typeof Y&&Y.Xd&&Y.default&&(Y=Y.default),Q(Y)}):q("Uses require, but no AMD loader is present"):Q(j)}function z(q){return function(j){throw Error("Component '"+q+"': "+j)}}var G={};p.j.register=function(q,j){if(!j)throw Error("Invalid configuration for "+q);if(p.j.tb(q))throw Error("Component "+q+" is already registered");G[q]=j},p.j.tb=function(q){return Object.prototype.hasOwnProperty.call(G,q)},p.j.unregister=function(q){delete G[q],p.j.Bc(q)},p.j.Fc={getConfig:function(q,j){j(p.j.tb(q)?G[q]:null)},loadComponent:function(q,j,Q){var Y=z(q);U(Y,j,function(ne){!function S(q,j,Q,Y){function ne(){0==--K&&Y(X)}var X={},K=2,$=Q.template;Q=Q.viewModel,$?U(j,$,function(me){p.j.oc("loadTemplate",[q,me],function(Se){X.template=Se,ne()})}):ne(),Q?U(j,Q,function(me){p.j.oc("loadViewModel",[q,me],function(Se){X[W]=Se,ne()})}):ne()}(q,Y,ne,Q)})},loadTemplate:function(q,j,Q){if(q=z(q),"string"==typeof j)Q(p.a.ua(j));else if(j instanceof Array)Q(j);else if(M(j))Q(p.a.la(j.childNodes));else if(j.element)if(j=j.element,t.HTMLElement?j instanceof HTMLElement:j&&j.tagName&&1===j.nodeType)Q(L(j));else if("string"==typeof j){var Y=n.getElementById(j);Y?Q(L(Y)):q("Cannot find element with ID "+j)}else q("Unknown element type: "+j);else q("Unknown template value: "+j)},loadViewModel:function(q,j,Q){D(z(q),j,Q)}};var W="createViewModel";p.b("components.register",p.j.register),p.b("components.isRegistered",p.j.tb),p.b("components.unregister",p.j.unregister),p.b("components.defaultLoader",p.j.Fc),p.j.loaders.push(p.j.Fc),p.j.dd=G}(),function(){function S(L,M){if(U=L.getAttribute("params")){var U=D.parseBindingsString(U,M,L,{valueAccessors:!0,bindingParams:!0}),z=(U=p.a.Ga(U,function(W){return p.o(W,null,{l:L})}),p.a.Ga(U,function(W){var q=W.v();return W.ja()?p.o({read:function(){return p.a.f(W())},write:p.Za(q)&&function(j){W()(j)},l:L}):q}));return Object.prototype.hasOwnProperty.call(z,"$raw")||(z.$raw=U),z}return{$raw:{}}}p.j.getComponentNameForNode=function(L){var M=p.a.R(L);if(p.j.tb(M)&&(-1!=M.indexOf("-")||""+L=="[object HTMLUnknownElement]"||8>=p.a.W&&L.tagName===M))return M},p.j.tc=function(L,M,U,z){if(1===M.nodeType){var G=p.j.getComponentNameForNode(M);if(G){if((L=L||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var W={name:G,params:S(M,U)};L.component=z?function(){return W}:W}}return L};var D=new p.ga;9>p.a.W&&(p.j.register=function(L){return function(M){return L.apply(this,arguments)}}(p.j.register),n.createDocumentFragment=function(L){return function(){var z,M=L(),U=p.j.dd;for(z in U);return M}}(n.createDocumentFragment))}(),function(){var L=0;p.c.component={init:function(M,U,z,G,W){function q(){var X=j&&j.dispose;"function"==typeof X&&X.call(j),Y&&Y.s(),Q=j=Y=null}var j,Q,Y,ne=p.a.la(p.h.childNodes(M));return p.h.Ea(M),p.a.K.za(M,q),p.o(function(){var K,$,X=p.a.f(U());if("string"==typeof X?K=X:(K=p.a.f(X.name),$=p.a.f(X.params)),!K)throw Error("No component name specified");var me=p.i.Cb(M,W),Se=Q=++L;p.j.get(K,function(fe){if(Q===Se){if(q(),!fe)throw Error("Unknown component '"+K+"'");!function S(M,U,z){if(!(U=U.template))throw Error("Component '"+M+"' has no template");M=p.a.Ca(U),p.h.va(z,M)}(K,fe,M);var ye=function D(M,U,z){var G=M.createViewModel;return G?G.call(M,U,z):U}(fe,$,{element:M,templateNodes:ne});fe=me.createChildContext(ye,{extend:function(ve){ve.$component=ye,ve.$componentTemplateNodes=ne}}),ye&&ye.koDescendantsComplete&&(Y=p.i.subscribe(M,p.i.pa,ye.koDescendantsComplete,ye)),j=ye,p.Oa(fe,M)}})},null,{l:M}),{controlsDescendantBindings:!0}}},p.h.ea.component=!0}();var B={class:"className",for:"htmlFor"};p.c.attr={update:function(S,D){var L=p.a.f(D())||{};p.a.P(L,function(M,U){U=p.a.f(U);var z=M.indexOf(":"),G=(z="lookupNamespaceURI"in S&&0<z&&S.lookupNamespaceURI(M.substr(0,z)),!1===U||null===U||U===e);G?z?S.removeAttributeNS(z,M):S.removeAttribute(M):U=U.toString(),8>=p.a.W&&M in B?(M=B[M],G?S.removeAttribute(M):S[M]=U):G||(z?S.setAttributeNS(z,M,U):S.setAttribute(M,U)),"name"===M&&p.a.Yc(S,G?"":U)})}},p.c.checked={after:["value","attr"],init:function(S,D,L){function M(){var X=S.checked,K=z();if(!p.S.Ya()&&(X||!W&&!p.S.qa())){var $=p.u.G(D);if(j){var me=Q?$.v():$,Se=ne;ne=K,Se!==K?X&&(p.a.Na(me,K,!0),p.a.Na(me,Se,!1)):p.a.Na(me,K,X),Q&&p.Za($)&&$(me)}else G&&(K===e?K=X:X||(K=e)),p.m.eb($,L,"checked",K,!0)}}var z=p.xb(function(){return L.has("checkedValue")?p.a.f(L.get("checkedValue")):Y?L.has("value")?p.a.f(L.get("value")):S.value:void 0}),G="checkbox"==S.type,W="radio"==S.type;if(G||W){var q=D(),j=G&&p.a.f(q)instanceof Array,Q=!(j&&q.push&&q.splice),Y=W||j,ne=j?z():e;W&&!S.name&&p.c.uniqueName.init(S,function(){return!0}),p.o(M,null,{l:S}),p.a.B(S,"click",M),p.o(function U(){var X=p.a.f(D()),K=z();j?(S.checked=0<=p.a.A(X,K),ne=K):S.checked=G&&K===e?!!X:z()===X},null,{l:S}),q=e}}},p.m.wa.checked=!0,p.c.checkedValue={update:function(S,D){S.value=p.a.f(D())}},p.c.class={update:function(S,D){var L=p.a.Db(p.a.f(D()));p.a.Eb(S,S.__ko__cssValue,!1),S.__ko__cssValue=L,p.a.Eb(S,L,!0)}},p.c.css={update:function(S,D){var L=p.a.f(D());null!==L&&"object"==typeof L?p.a.P(L,function(M,U){U=p.a.f(U),p.a.Eb(S,M,U)}):p.c.class.update(S,D)}},p.c.enable={update:function(S,D){var L=p.a.f(D());L&&S.disabled?S.removeAttribute("disabled"):L||S.disabled||(S.disabled=!0)}},p.c.disable={update:function(S,D){p.c.enable.update(S,function(){return!p.a.f(D())})}},p.c.event={init:function(S,D,L,M,U){var z=D()||{};p.a.P(z,function(G){"string"==typeof G&&p.a.B(S,G,function(W){var q,j=D()[G];if(j){try{var Q=p.a.la(arguments);Q.unshift(M=U.$data),q=j.apply(M,Q)}finally{!0!==q&&(W.preventDefault?W.preventDefault():W.returnValue=!1)}!1===L.get(G+"Bubble")&&(W.cancelBubble=!0,W.stopPropagation&&W.stopPropagation())}})})}},p.c.foreach={Rc:function(S){return function(){var D=S(),L=p.a.bc(D);return L&&"number"!=typeof L.length?(p.a.f(D),{foreach:L.data,as:L.as,noChildContext:L.noChildContext,includeDestroyed:L.includeDestroyed,afterAdd:L.afterAdd,beforeRemove:L.beforeRemove,afterRender:L.afterRender,beforeMove:L.beforeMove,afterMove:L.afterMove,templateEngine:p.ba.Ma}):{foreach:D,templateEngine:p.ba.Ma}}},init:function(S,D){return p.c.template.init(S,p.c.foreach.Rc(D))},update:function(S,D,L,M,U){return p.c.template.update(S,p.c.foreach.Rc(D),L,M,U)}},p.m.Ra.foreach=!1,p.h.ea.foreach=!0,p.c.hasfocus={init:function(S,D,L){function M(G){S.__ko_hasfocusUpdating=!0;var W=S.ownerDocument;if("activeElement"in W){var q;try{q=W.activeElement}catch{q=W.body}G=q===S}W=D(),p.m.eb(W,L,"hasfocus",G,!0),S.__ko_hasfocusLastValue=G,S.__ko_hasfocusUpdating=!1}var U=M.bind(null,!0),z=M.bind(null,!1);p.a.B(S,"focus",U),p.a.B(S,"focusin",U),p.a.B(S,"blur",z),p.a.B(S,"focusout",z),S.__ko_hasfocusLastValue=!1},update:function(S,D){var L=!!p.a.f(D());S.__ko_hasfocusUpdating||S.__ko_hasfocusLastValue===L||(L?S.focus():S.blur(),!L&&S.__ko_hasfocusLastValue&&S.ownerDocument.body.focus(),p.u.G(p.a.Fb,null,[S,L?"focusin":"focusout"]))}},p.m.wa.hasfocus=!0,p.c.hasFocus=p.c.hasfocus,p.m.wa.hasFocus="hasfocus",p.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(S,D){p.a.fc(S,D())}},function(){function S(D,L,M){p.c[D]={init:function(U,z,G,W,q){var j,Q,ne,X,K,Y={};if(L){W=G.get("as");var $=G.get("noChildContext");Y={as:W,noChildContext:$,exportDependencies:K=!(W&&$)}}return X=(ne="render"==G.get("completeOn"))||G.has(p.i.pa),p.o(function(){var ye,me=p.a.f(z()),Se=!M!=!me,fe=!Q;(K||Se!==j)&&(X&&(q=p.i.Cb(U,q)),Se&&((!L||K)&&(Y.dataDependency=p.S.o()),ye=L?q.createChildContext("function"==typeof me?me:z,Y):p.S.qa()?q.extend(null,Y):q),fe&&p.S.qa()&&(Q=p.a.Ca(p.h.childNodes(U),!0)),Se?(fe||p.h.va(U,p.a.Ca(Q)),p.Oa(ye,U)):(p.h.Ea(U),ne||p.i.ma(U,p.i.H)),j=Se)},null,{l:U}),{controlsDescendantBindings:!0}}},p.m.Ra[D]=!1,p.h.ea[D]=!0}S("if"),S("ifnot",!1,!0),S("with",!0)}(),p.c.let={init:function(S,D,L,M,U){return D=U.extend(D),p.Oa(D,S),{controlsDescendantBindings:!0}}},p.h.ea.let=!0;var F={};p.c.options={init:function(S){if("select"!==p.a.R(S))throw Error("options binding applies only to SELECT elements");for(;0<S.length;)S.remove(0);return{controlsDescendantBindings:!0}},update:function(S,D,L){function M(){return p.a.jb(S.options,function($){return $.selected})}function U($,me,Se){var fe=typeof me;return"function"==fe?me($):"string"==fe?$[me]:Se}function z($,me){if(X&&j)p.i.ma(S,p.i.H);else if(ne.length){var Se=0<=p.a.A(ne,p.w.M(me[0]));p.a.Zc(me[0],Se),X&&!Se&&p.u.G(p.a.Fb,null,[S,"change"])}}var G=S.multiple,W=0!=S.length&&G?S.scrollTop:null,q=p.a.f(D()),j=L.get("valueAllowUnset")&&L.has("value"),Q=L.get("optionsIncludeDestroyed");D={};var Y,ne=[];j||(G?ne=p.a.Mb(M(),p.w.M):0<=S.selectedIndex&&ne.push(p.w.M(S.options[S.selectedIndex]))),q&&(typeof q.length>"u"&&(q=[q]),Y=p.a.jb(q,function($){return Q||$===e||null===$||!p.a.f($._destroy)}),L.has("optionsCaption")&&null!==(q=p.a.f(L.get("optionsCaption")))&&q!==e&&Y.unshift(F));var X=!1;D.beforeRemove=function($){S.removeChild($)},q=z,L.has("optionsAfterRender")&&"function"==typeof L.get("optionsAfterRender")&&(q=function($,me){z(0,me),p.u.G(L.get("optionsAfterRender"),null,[me[0],$!==F?$:e])}),p.a.ec(S,Y,function($,me,Se){return Se.length&&(ne=!j&&Se[0].selected?[p.w.M(Se[0])]:[],X=!0),me=S.ownerDocument.createElement("option"),$===F?(p.a.Bb(me,L.get("optionsCaption")),p.w.cb(me,e)):(Se=U($,L.get("optionsValue"),$),p.w.cb(me,p.a.f(Se)),$=U($,L.get("optionsText"),Se),p.a.Bb(me,$)),[me]},D,q),j||(G?ne.length&&M().length<ne.length:ne.length&&0<=S.selectedIndex?p.w.M(S.options[S.selectedIndex])!==ne[0]:ne.length||0<=S.selectedIndex)&&p.u.G(p.a.Fb,null,[S,"change"]),(j||p.S.Ya())&&p.i.ma(S,p.i.H),p.a.wd(S),W&&20<Math.abs(W-S.scrollTop)&&(S.scrollTop=W)}},p.c.options.$b=p.a.g.Z(),p.c.selectedOptions={init:function(S,D,L){function M(){var G=D(),W=[];p.a.D(S.getElementsByTagName("option"),function(q){q.selected&&W.push(p.w.M(q))}),p.m.eb(G,L,"selectedOptions",W)}function U(){var G=p.a.f(D()),W=S.scrollTop;G&&"number"==typeof G.length&&p.a.D(S.getElementsByTagName("option"),function(q){var j=0<=p.a.A(G,p.w.M(q));q.selected!=j&&p.a.Zc(q,j)}),S.scrollTop=W}if("select"!=p.a.R(S))throw Error("selectedOptions binding applies only to SELECT elements");var z;p.i.subscribe(S,p.i.H,function(){z?M():(p.a.B(S,"change",M),z=p.o(U,null,{l:S}))},null,{notifyImmediately:!0})},update:function(){}},p.m.wa.selectedOptions=!0,p.c.style={update:function(S,D){var L=p.a.f(D()||{});p.a.P(L,function(M,U){if((null===(U=p.a.f(U))||U===e||!1===U)&&(U=""),o)o(S).css(M,U);else if(/^--/.test(M))S.style.setProperty(M,U);else{M=M.replace(/-(\w)/g,function(G,W){return W.toUpperCase()});var z=S.style[M];S.style[M]=U,U===z||S.style[M]!=z||isNaN(U)||(S.style[M]=U+"px")}})}},p.c.submit={init:function(S,D,L,M,U){if("function"!=typeof D())throw Error("The value for a submit binding must be a function");p.a.B(S,"submit",function(z){var G,W=D();try{G=W.call(U.$data,S)}finally{!0!==G&&(z.preventDefault?z.preventDefault():z.returnValue=!1)}})}},p.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(S,D){p.a.Bb(S,D())}},p.h.ea.text=!0,function(){if(t&&t.navigator){var L,M,U,z,G,S=function(Y){if(Y)return parseFloat(Y[1])},D=t.navigator.userAgent;(L=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(G=S(D.match(/Edge\/([^ ]+)$/)))||S(D.match(/Chrome\/([^ ]+)/))||(M=S(D.match(/Version\/([^ ]+) Safari/)))||(U=S(D.match(/Firefox\/([^ ]+)/)))||(z=p.a.W||S(D.match(/MSIE ([^ ]+)/)))||(z=S(D.match(/rv:([^ )]+)/)))}if(8<=z&&10>z)var W=p.a.g.Z(),q=p.a.g.Z(),j=function(Y){var ne=this.activeElement;(ne=ne&&p.a.g.get(ne,q))&&ne(Y)},Q=function(Y,ne){var X=Y.ownerDocument;p.a.g.get(X,W)||(p.a.g.set(X,W,!0),p.a.B(X,"selectionchange",j)),p.a.g.set(Y,q,ne)};p.c.textInput={init:function(Y,ne,X){function K(je,Ke){p.a.B(Y,je,Ke)}function me(){ye||(ve=Y.value,ye=p.a.setTimeout(Se,4))}function Se(){clearTimeout(ye),ve=ye=e;var je=Y.value;fe!==je&&(fe=je,p.m.eb(ne(),X,"textInput",je))}var ye,ve,fe=Y.value,Oe=9==p.a.W?me:Se,Ge=!1;z&&K("keypress",Se),11>z&&K("propertychange",function(je){Ge||"value"!==je.propertyName||Oe(je)}),8==z&&(K("keyup",Se),K("keydown",Se)),Q&&(Q(Y,Oe),K("dragend",me)),(!z||9<=z)&&K("input",Oe),5>M&&"textarea"===p.a.R(Y)?(K("keydown",me),K("paste",me),K("cut",me)):11>L?K("keydown",me):4>U?(K("DOMAutoComplete",Se),K("dragdrop",Se),K("drop",Se)):G&&"number"===Y.type&&K("keydown",me),K("change",Se),K("blur",Se),p.o(function $(){var je=p.a.f(ne());(null===je||je===e)&&(je=""),ve!==e&&je===ve?p.a.setTimeout($,4):Y.value!==je&&(Ge=!0,Y.value=je,Ge=!1,fe=Y.value)},null,{l:Y})}},p.m.wa.textInput=!0,p.c.textinput={preprocess:function(Y,ne,X){X("textInput",Y)}}}(),p.c.uniqueName={init:function(S,D){if(D()){var L="ko_unique_"+ ++p.c.uniqueName.rd;p.a.Yc(S,L)}}},p.c.uniqueName.rd=0,p.c.using={init:function(S,D,L,M,U){var z;return L.has("as")&&(z={as:L.get("as"),noChildContext:L.get("noChildContext")}),D=U.createChildContext(D,z),p.Oa(D,S),{controlsDescendantBindings:!0}}},p.h.ea.using=!0,p.c.value={init:function(S,D,L){var M=p.a.R(S),U="input"==M;if(!U||"checkbox"!=S.type&&"radio"!=S.type){var z=[],G=L.get("valueUpdate"),W=!1,q=null;G&&(z="string"==typeof G?[G]:p.a.wc(G),p.a.Pa(z,"change"));var Q,Y,j=function(){q=null,W=!1;var ne=D(),X=p.w.M(S);p.m.eb(ne,L,"value",X)};!p.a.W||!U||"text"!=S.type||"off"==S.autocomplete||S.form&&"off"==S.form.autocomplete||-1!=p.a.A(z,"propertychange")||(p.a.B(S,"propertychange",function(){W=!0}),p.a.B(S,"focus",function(){W=!1}),p.a.B(S,"blur",function(){W&&j()})),p.a.D(z,function(ne){var X=j;p.a.Ud(ne,"after")&&(X=function(){q=p.w.M(S),p.a.setTimeout(j,0)},ne=ne.substring(5)),p.a.B(S,ne,X)}),Q=U&&"file"==S.type?function(){var ne=p.a.f(D());null===ne||ne===e||""===ne?S.value="":p.u.G(j)}:function(){var ne=p.a.f(D()),X=p.w.M(S);null!==q&&ne===q?p.a.setTimeout(Q,0):(ne!==X||X===e)&&("select"===M?(X=L.get("valueAllowUnset"),p.w.cb(S,ne,X),X||ne===p.w.M(S)||p.u.G(j)):p.w.cb(S,ne))},"select"===M?p.i.subscribe(S,p.i.H,function(){Y?L.get("valueAllowUnset")?Q():j():(p.a.B(S,"change",j),Y=p.o(Q,null,{l:S}))},null,{notifyImmediately:!0}):(p.a.B(S,"change",j),p.o(Q,null,{l:S}))}else p.ib(S,{checkedValue:D})},update:function(){}},p.m.wa.value=!0,p.c.visible={update:function(S,D){var L=p.a.f(D()),M="none"!=S.style.display;L&&!M?S.style.display="":!L&&M&&(S.style.display="none")}},p.c.hidden={update:function(S,D){p.c.visible.update(S,function(){return!p.a.f(D())})}},function(S){p.c[S]={init:function(D,L,M,U,z){return p.c.event.init.call(this,D,function(){var G={};return G[S]=L(),G},M,U,z)}}}("click"),p.ca=function(){},p.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},p.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},p.ca.prototype.makeTemplateSource=function(S,D){if("string"==typeof S){var L=(D=D||n).getElementById(S);if(!L)throw Error("Cannot find template with ID "+S);return new p.C.F(L)}if(1==S.nodeType||8==S.nodeType)return new p.C.ia(S);throw Error("Unknown template type: "+S)},p.ca.prototype.renderTemplate=function(S,D,L,M){return S=this.makeTemplateSource(S,M),this.renderTemplateSource(S,D,L,M)},p.ca.prototype.isTemplateRewritten=function(S,D){return!1===this.allowTemplateRewriting||this.makeTemplateSource(S,D).data("isRewritten")},p.ca.prototype.rewriteTemplate=function(S,D,L){D=D((S=this.makeTemplateSource(S,L)).text()),S.text(D),S.data("isRewritten",!0)},p.b("templateEngine",p.ca),p.kc=function(){function S(M,U,z,G){M=p.m.ac(M);for(var W=p.m.Ra,q=0;q<M.length;q++){var j=M[q].key;if(Object.prototype.hasOwnProperty.call(W,j)){var Q=W[j];if("function"==typeof Q){if(j=Q(M[q].value))throw Error(j)}else if(!Q)throw Error("This template engine does not support the '"+j+"' binding within its templates")}}return z="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+p.m.vb(M,{valueAccessors:!0})+" } })()},'"+z.toLowerCase()+"')",G.createJavaScriptEvaluatorBlock(z)+U}var D=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,L=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(M,U,z){U.isTemplateRewritten(M,z)||U.rewriteTemplate(M,function(G){return p.kc.Ld(G,U)},z)},Ld:function(M,U){return M.replace(D,function(z,G,W,q,j){return S(j,G,W,U)}).replace(L,function(z,G){return S(G,"\x3c!-- ko --\x3e","#comment",U)})},md:function(M,U){return p.aa.Xb(function(z,G){var W=z.nextSibling;W&&W.nodeName.toLowerCase()===U&&p.ib(W,M,G)})}}}(),p.b("__tr_ambtns",p.kc.md),function(){p.C={},p.C.F=function(L){if(this.F=L){var M=p.a.R(L);this.ab="script"===M?1:"textarea"===M?2:"template"==M&&L.content&&11===L.content.nodeType?3:4}},p.C.F.prototype.text=function(){var L=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[L];var M=arguments[0];"innerHTML"===L?p.a.fc(this.F,M):this.F[L]=M};var S=p.a.g.Z()+"_";p.C.F.prototype.data=function(L){if(1===arguments.length)return p.a.g.get(this.F,S+L);p.a.g.set(this.F,S+L,arguments[1])};var D=p.a.g.Z();p.C.F.prototype.nodes=function(){var L=this.F;if(0==arguments.length){var M=p.a.g.get(L,D)||{},U=M.lb||(3===this.ab?L.content:4===this.ab?L:e);if(!U||M.jd){var z=this.text();z&&z!==M.bb&&(U=p.a.Md(z,L.ownerDocument),p.a.g.set(L,D,{lb:U,bb:z,jd:!0}))}return U}M=arguments[0],this.ab!==e&&this.text(""),p.a.g.set(L,D,{lb:M})},p.C.ia=function(L){this.F=L},p.C.ia.prototype=new p.C.F,p.C.ia.prototype.constructor=p.C.ia,p.C.ia.prototype.text=function(){if(0==arguments.length){var L=p.a.g.get(this.F,D)||{};return L.bb===e&&L.lb&&(L.bb=L.lb.innerHTML),L.bb}p.a.g.set(this.F,D,{bb:arguments[0]})},p.b("templateSources",p.C),p.b("templateSources.domElement",p.C.F),p.b("templateSources.anonymousTemplate",p.C.ia)}(),function(){function S(q,j,Q){var Y;for(j=p.h.nextSibling(j);q&&(Y=q)!==j;)Q(Y,q=p.h.nextSibling(Y))}function D(q,j){if(q.length){var Q=q[0],Y=q[q.length-1],ne=Q.parentNode,X=p.ga.instance,K=X.preprocessNode;if(K){if(S(Q,Y,function($,me){var Se=$.previousSibling,fe=K.call(X,$);fe&&($===Q&&(Q=fe[0]||me),$===Y&&(Y=fe[fe.length-1]||Se))}),q.length=0,!Q)return;Q===Y?q.push(Q):(q.push(Q,Y),p.a.Ua(q,ne))}S(Q,Y,function($){1!==$.nodeType&&8!==$.nodeType||p.vc(j,$)}),S(Q,Y,function($){1!==$.nodeType&&8!==$.nodeType||p.aa.cd($,[j])}),p.a.Ua(q,ne)}}function L(q){return q.nodeType?q:0<q.length?q[0]:null}function M(q,j,Q,Y,ne){ne=ne||{};var X=(q&&L(q)||Q||{}).ownerDocument,K=ne.templateEngine||z;if(p.kc.xd(Q,K,X),"number"!=typeof(Q=K.renderTemplate(Q,Y,ne,X)).length||0<Q.length&&"number"!=typeof Q[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(X=!1,j){case"replaceChildren":p.h.va(q,Q),X=!0;break;case"replaceNode":p.a.Xc(q,Q),X=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+j)}return X&&(D(Q,Y),ne.afterRender&&p.u.G(ne.afterRender,null,[Q,Y[ne.as||"$data"]]),"replaceChildren"==j&&p.i.ma(q,p.i.H)),Q}function U(q,j,Q){return p.O(q)?q():"function"==typeof q?q(j,Q):q}var z;p.gc=function(q){if(q!=e&&!(q instanceof p.ca))throw Error("templateEngine must inherit from ko.templateEngine");z=q},p.dc=function(q,j,Q,Y,ne){if(((Q=Q||{}).templateEngine||z)==e)throw Error("Set a template engine before calling renderTemplate");if(ne=ne||"replaceChildren",Y){var X=L(Y);return p.$(function(){var $=j&&j instanceof p.fa?j:new p.fa(j,null,null,null,{exportDependencies:!0}),K=U(q,$.$data,$);$=M(Y,ne,K,$,Q),"replaceNode"==ne&&(X=L(Y=$))},null,{Sa:function(){return!X||!p.a.Sb(X)},l:X&&"replaceNode"==ne?X.parentNode:X})}return p.aa.Xb(function(K){p.dc(q,j,Q,K,"replaceNode")})},p.Qd=function(q,j,Q,Y,ne){function X(ve,Oe){p.u.G(p.a.ec,null,[Y,ve,$,Q,K,Oe]),p.i.ma(Y,p.i.H)}function K(ve,Oe){D(Oe,me),Q.afterRender&&Q.afterRender(Oe,ve),me=null}function $(ve,Oe){me=ne.createChildContext(ve,{as:Se,noChildContext:Q.noChildContext,extend:function(je){je.$index=Oe,Se&&(je[Se+"Index"]=Oe)}});var Ge=U(q,ve,me);return M(Y,"ignoreTargetNode",Ge,me,Q)}var me,Se=Q.as,fe=!1===Q.includeDestroyed||p.options.foreachHidesDestroyed&&!Q.includeDestroyed;if(fe||Q.beforeRemove||!p.Pc(j))return p.$(function(){var ve=p.a.f(j)||[];typeof ve.length>"u"&&(ve=[ve]),fe&&(ve=p.a.jb(ve,function(Oe){return Oe===e||null===Oe||!p.a.f(Oe._destroy)})),X(ve)},null,{l:Y});X(j.v());var ye=j.subscribe(function(ve){X(j(),ve)},null,"arrayChange");return ye.l(Y),ye};var G=p.a.g.Z(),W=p.a.g.Z();p.c.template={init:function(q,j){var Q=p.a.f(j());if("string"==typeof Q||"name"in Q)p.h.Ea(q);else if("nodes"in Q){if(p.O(Q=Q.nodes||[]))throw Error('The "nodes" option must be a plain, non-observable array.');var Y=Q[0]&&Q[0].parentNode;Y&&p.a.g.get(Y,W)||(Y=p.a.Yb(Q),p.a.g.set(Y,W,!0)),new p.C.ia(q).nodes(Y)}else{if(!(0<(Q=p.h.childNodes(q)).length))throw Error("Anonymous template defined, but no template content was provided");Y=p.a.Yb(Q),new p.C.ia(q).nodes(Y)}return{controlsDescendantBindings:!0}},update:function(q,j,Q,Y,ne){var X=j();Q=!0,Y=null,"string"==typeof(j=p.a.f(X))?j={}:(X="name"in j?j.name:q,"if"in j&&(Q=p.a.f(j.if)),Q&&"ifnot"in j&&(Q=!p.a.f(j.ifnot)),Q&&!X&&(Q=!1)),"foreach"in j?Y=p.Qd(X,Q&&j.foreach||[],j,q,ne):Q?(Q=ne,"data"in j&&(Q=ne.createChildContext(j.data,{as:j.as,noChildContext:j.noChildContext,exportDependencies:!0})),Y=p.dc(X,Q,j,q)):p.h.Ea(q),ne=Y,(j=p.a.g.get(q,G))&&"function"==typeof j.s&&j.s(),p.a.g.set(q,G,!ne||ne.ja&&!ne.ja()?e:ne)}},p.m.Ra.template=function(q){return 1==(q=p.m.ac(q)).length&&q[0].unknown||p.m.Id(q,"name")?null:"This template engine does not support anonymous templates nested within its templates"},p.h.ea.template=!0}(),p.b("setTemplateEngine",p.gc),p.b("renderTemplate",p.dc),p.a.Kc=function(S,D,L){var M,U,z,G,W;if(S.length&&D.length)for(M=U=0;(!L||M<L)&&(G=S[U]);++U){for(z=0;W=D[z];++z)if(G.value===W.value){G.moved=W.index,W.moved=G.index,D.splice(z,1),M=z=0;break}M+=z}},p.a.Pb=function(){function S(D,L,M,U,z){var j,Y,$,me,Se,G=Math.min,W=Math.max,q=[],Q=D.length,ne=L.length,X=ne-Q||1,K=Q+ne+1;for(j=0;j<=Q;j++)for(me=$,q.push($=[]),Se=G(ne,j+X),Y=W(0,j-1);Y<=Se;Y++)$[Y]=Y?j?D[j-1]===L[Y-1]?me[Y-1]:G(me[Y]||K,$[Y-1]||K)+1:Y+1:j+1;for(G=[],W=[],X=[],j=Q,Y=ne;j||Y;)ne=q[j][Y]-1,Y&&ne===q[j][Y-1]?W.push(G[G.length]={status:M,value:L[--Y],index:Y}):j&&ne===q[j-1][Y]?X.push(G[G.length]={status:U,value:D[--j],index:j}):(--Y,--j,z.sparse||G.push({status:"retained",value:L[Y]}));return p.a.Kc(X,W,!z.dontLimitMoves&&10*Q),G.reverse()}return function(D,L,M){return M="boolean"==typeof M?{dontLimitMoves:M}:M||{},(D=D||[]).length<(L=L||[]).length?S(D,L,"added","deleted",M):S(L,D,"deleted","added",M)}}(),p.b("utils.compareArrays",p.a.Pb),function(){function S(M,U,z,G,W){var q=[],j=p.$(function(){var Q=U(z,W,p.a.Ua(q,M))||[];0<q.length&&(p.a.Xc(q,Q),G&&p.u.G(G,null,[z,Q,W])),q.length=0,p.a.Nb(q,Q)},null,{l:M,Sa:function(){return!p.a.kd(q)}});return{Y:q,$:j.ja()?j:e}}var D=p.a.g.Z(),L=p.a.g.Z();p.a.ec=function(M,U,z,G,W,q){function j(Ht){Ge={Aa:Ht,pb:p.ta(me++)},K.push(Ge),X||Oe.push(Ge)}function Q(Ht){me!==(Ge=ne[Ht]).pb.v()&&ve.push(Ge),Ge.pb(me++),p.a.Ua(Ge.Y,M),K.push(Ge)}function Y(Ht,Cn){if(Ht)for(var pe=0,Ie=Cn.length;pe<Ie;pe++)p.a.D(Cn[pe].Y,function(on){Ht(on,pe,Cn[pe].Aa)})}typeof(U=U||[]).length>"u"&&(U=[U]),G=G||{};var Ge,ft,gn,Ft,ne=p.a.g.get(M,D),X=!ne,K=[],$=0,me=0,Se=[],fe=[],ye=[],ve=[],Oe=[],je=0;if(X)p.a.D(U,j);else{if(!q||ne&&ne._countWaitingForRemove){var Ke=p.a.Mb(ne,function(Ht){return Ht.Aa});q=p.a.Pb(Ke,U,{dontLimitMoves:G.dontLimitMoves,sparse:!0})}var Qt,nn,Pt;for(Ke=0;Qt=q[Ke];Ke++)switch(nn=Qt.moved,Pt=Qt.index,Qt.status){case"deleted":for(;$<Pt;)Q($++);nn===e&&((Ge=ne[$]).$&&(Ge.$.s(),Ge.$=e),p.a.Ua(Ge.Y,M).length&&(G.beforeRemove&&(K.push(Ge),je++,Ge.Aa===L?Ge=null:ye.push(Ge)),Ge&&Se.push.apply(Se,Ge.Y))),$++;break;case"added":for(;me<Pt;)Q($++);nn!==e?(fe.push(K.length),Q(nn)):j(Qt.value)}for(;me<U.length;)Q($++);K._countWaitingForRemove=je}p.a.g.set(M,D,K),Y(G.beforeMove,ve),p.a.D(Se,G.beforeRemove?p.oa:p.removeNode);try{Ft=M.ownerDocument.activeElement}catch{}if(fe.length)for(;(Ke=fe.shift())!=e;){for(Ge=K[Ke],ft=e;Ke;)if((gn=K[--Ke].Y)&&gn.length){ft=gn[gn.length-1];break}for(U=0;$=Ge.Y[U];ft=$,U++)p.h.Wb(M,$,ft)}for(Ke=0;Ge=K[Ke];Ke++){for(Ge.Y||p.a.extend(Ge,S(M,z,Ge.Aa,W,Ge.pb)),U=0;$=Ge.Y[U];ft=$,U++)p.h.Wb(M,$,ft);!Ge.Ed&&W&&(W(Ge.Aa,Ge.Y,Ge.pb),Ge.Ed=!0,ft=Ge.Y[Ge.Y.length-1])}for(Ft&&M.ownerDocument.activeElement!=Ft&&Ft.focus(),Y(G.beforeRemove,ye),Ke=0;Ke<ye.length;++Ke)ye[Ke].Aa=L;Y(G.afterMove,ve),Y(G.afterAdd,Oe)}}(),p.b("utils.setDomNodeChildrenFromArrayMapping",p.a.ec),p.ba=function(){this.allowTemplateRewriting=!1},p.ba.prototype=new p.ca,p.ba.prototype.constructor=p.ba,p.ba.prototype.renderTemplateSource=function(S,D,L,M){return(D=9>p.a.W||!S.nodes?null:S.nodes())?p.a.la(D.cloneNode(!0).childNodes):(S=S.text(),p.a.ua(S,M))},p.ba.Ma=new p.ba,p.gc(p.ba.Ma),p.b("nativeTemplateEngine",p.ba),function(){p.$a=function(){var D=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(L,M,U,z){if(z=z||n,U=U||{},2>D)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var G=L.data("precompiled");return G||(G=L.text()||"",G=o.template(null,"{{ko_with $item.koBindingContext}}"+G+"{{/ko_with}}"),L.data("precompiled",G)),L=[M.$data],M=o.extend({koBindingContext:M},U.templateOptions),(M=o.tmpl(G,L,M)).appendTo(z.createElement("div")),o.fragments={},M},this.createJavaScriptEvaluatorBlock=function(L){return"{{ko_code ((function() { return "+L+" })()) }}"},this.addTemplate=function(L,M){n.write("<script type='text/html' id='"+L+"'>"+M+"<\/script>")},0<D&&(o.tmpl.tag.ko_code={open:"__.push($1 || '');"},o.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},p.$a.prototype=new p.ca,p.$a.prototype.constructor=p.$a;var S=new p.$a;0<S.Hd&&p.gc(S),p.b("jqueryTmplTemplateEngine",p.$a)}()}(t.ko={})}();var ost=ko;typeof window<"u"?(ko=window.ko,typeof kE<"u"?window.ko=kE:delete window.ko):(ko=global.ko,typeof kE<"u"?global.ko=kE:delete global.ko);const XU=ost;var ZU="__knockoutObservables",$U="__knockoutSubscribable";function tre(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=nre(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach(function(o){if(o!==ZU&&o!==$U&&!(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&&function sst(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=function ast(e,t,n){var i=function cst(e,t){var n=t[$U];if(!n){n=new e.subscribable,Object.defineProperty(t,$U,{value:n});var i={};(function lst(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!0!==n.pause&&t.notifySubscribers(this),r}})})(t,n,i),function ust(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}})})}(e,t,n,i)}return n}(e,n);return i.subscribe(t)}(e,t,i))})}(n,a)}}),e}function nre(e,t){var n=e[ZU];return!n&&t&&(n={},Object.defineProperty(e,ZU,{value:n})),n}function rst(e,t,n){var o={owner:e,deferEvaluation:!0};if("function"==typeof n)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("function"!=typeof n.get)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]=this.computed(o),tre.call(this,e,[t]),e}function ire(e,t){if(!e)return null;var n=nre(e,!1);return n&&n[t]||null}function dst(e,t){var n=ire(e,t);n&&n.valueHasMutated()}const hst_attachToKo=function fst(e){e.track=tre,e.getObservable=ire,e.valueHasMutated=dst,e.defineProperty=rst},ore="http://www.w3.org/2000/svg",rre="cesium-svgPath-svg";hst_attachToKo(XU),function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){const i=document.createElementNS(ore,"svg:svg");i.setAttribute("class",rre);const o=document.createElementNS(ore,"path");return i.appendChild(o),e.virtualElements.setDomNodeChildren(t,[i]),e.computed({read:function(){const r=e.unwrap(n());o.setAttribute("d",e.unwrap(r.path));const 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",`${rre} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}(XU);const vt=XU,Su=function mst(e,t,n,i,o){return n.call(i,e[t]),vt.getObservable(e,t).subscribe(n,i,o)},Py="http://www.w3.org/2000/svg",sre="http://www.w3.org/1999/xlink";let Y1;const UE=Z.fromCssColorString("rgba(247,250,255,0.384)"),X1=Z.fromCssColorString("rgba(143,191,255,0.216)"),KU=Z.fromCssColorString("rgba(153,197,255,0.098)"),Z1=Z.fromCssColorString("rgba(255,255,255,0.086)"),_st=Z.fromCssColorString("rgba(255,255,255,0.267)"),gst=Z.fromCssColorString("rgba(255,255,255,0)"),are=Z.fromCssColorString("rgba(66,67,68,0.3)"),cre=Z.fromCssColorString("rgba(0,0,0,0.5)");function Zm(e){return Z.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}const zE={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 Pd(e){const t=document.createElementNS(Py,e.tagName);for(const n in e)if(e.hasOwnProperty(n)&&"tagName"!==n)if("children"===n){const i=e.children.length;for(let o=0;o<i;++o)t.appendChild(Pd(e.children[o]))}else 0===n.indexOf("xlink:")?t.setAttributeNS(sre,n.substring(6),e[n]):"textContent"===n?t.textContent=e[n]:t.setAttribute(n,e[n]);return t}function QU(e,t,n){const i=document.createElementNS(Py,"text");i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("class","cesium-animation-svgText");const o=document.createElementNS(Py,"tspan");return o.textContent=n,i.appendChild(o),i}const $1=new Z;function Mr(e,t){const n=t.alpha,i=1-n;return $1.red=e.red*i+t.red*n,$1.green=e.green*i+t.green*n,$1.blue=e.blue*i+t.blue*n,$1.toCssColorString()}function JU(e,t,n){const i=zE[n];return Pd({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:""}]})}function op(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;const n=this;this._clickFunction=function(){const i=n._viewModel.command;i.canExecute&&i()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[Su(t,"toggled",this.setToggled,this),Su(t,"tooltip",this.setTooltip,this),Su(t.command,"canExecute",this.setEnabled,this)]}function MT(e,t){if(!c(e))throw new E("container is required.");if(!c(t))throw new E("viewModel is required.");e=Rr(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;const 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]);const 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];const r=document.createElementNS(Py,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",sre);const s=document.createElementNS(Py,"g");this._topG=s,this._realtimeSVG=new op(function bst(e,t,n){const i=zE[n],o=zE.animation_pathWingButton;return Pd({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:""}]})}(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new op(JU(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new op(JU(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new op(JU(84,99,"animation_pathPause"),t.pauseViewModel);const a=document.createElementNS(Py,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);const l=Pd({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=l;const u=zE.animation_pathSwooshFX,d=zE.animation_pathPointer,h=Pd({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:u.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:u.d},{tagName:u.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:u.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=h,this._shuttleRingPointer=Pd({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:d.tagName,d:d.d});const m=Pd({tagName:"g",transform:"translate(100,100)"});this._knobOuter=Pd({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});const p=Pd({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:61});this._knobDate=QU(0,-24,""),this._knobTime=QU(0,-7,""),this._knobStatus=QU(0,-41,"");const y=Pd({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:61}),b=document.createElementNS(Py,"g");b.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(o),s.appendChild(b),s.appendChild(m),s.appendChild(a),b.appendChild(l),b.appendChild(h),b.appendChild(this._shuttleRingPointer),m.appendChild(this._knobOuter),m.appendChild(p),m.appendChild(this._knobDate),m.appendChild(this._knobTime),m.appendChild(this._knobStatus),m.appendChild(y),r.appendChild(s),e.appendChild(r);const x=this;function C(N){!function Tst(e,t){const n=e._viewModel,i=n.shuttleRingDragging;if(!i||Y1===e)if("mousedown"===t.type||i&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||i&&"touchmove"===t.type&&1===t.touches.length){const o=e._centerX,r=e._centerY,a=e._svgNode.getBoundingClientRect();let l,u;if("touchstart"===t.type||"touchmove"===t.type?(l=t.touches[0].clientX,u=t.touches[0].clientY):(l=t.clientX,u=t.clientY),!i&&(l>a.right||l<a.left||u<a.top||u>a.bottom))return;const d=e._shuttleRingPointer.getBoundingClientRect();let _=180*Math.atan2(u-r-a.top,l-o-a.left)/Math.PI+90;_>180&&(_-=360);const p=n.shuttleRingAngle;i||l<d.right&&l>d.left&&u>d.top&&u<d.bottom?(Y1=e,n.shuttleRingDragging=!0,n.shuttleRingAngle=_):_<p?n.slower():_>p&&n.faster(),t.preventDefault()}else e===Y1&&(Y1=void 0),n.shuttleRingDragging=!1}(x,N)}this._mouseCallback=C,l.addEventListener("mousedown",C,!0),l.addEventListener("touchstart",C,!0),h.addEventListener("mousedown",C,!0),h.addEventListener("touchstart",C,!0),n.addEventListener("mousemove",C,!0),n.addEventListener("touchmove",C,!0),n.addEventListener("mouseup",C,!0),n.addEventListener("touchend",C,!0),n.addEventListener("touchcancel",C,!0),this._shuttleRingPointer.addEventListener("mousedown",C,!0),this._shuttleRingPointer.addEventListener("touchstart",C,!0),this._knobOuter.addEventListener("mousedown",C,!0),this._knobOuter.addEventListener("touchstart",C,!0);const w=this._knobTime.childNodes[0],v=this._knobDate.childNodes[0],I=this._knobStatus.childNodes[0];let P;this._subscriptions=[Su(t.pauseViewModel,"toggled",function(N){P!==N&&(P=N,x._shuttleRingPointer.setAttribute("class",P?"cesium-animation-shuttleRingPausePointer":"cesium-animation-shuttleRingPointer"))}),Su(t,"shuttleRingAngle",function(N){!function yst(e,t,n){e.setAttribute("transform",`translate(100,100) rotate(${n})`),t.setAttribute("transform",`rotate(${n})`)}(x._shuttleRingPointer,x._knobOuter,N)}),Su(t,"dateLabel",function(N){v.textContent!==N&&(v.textContent=N)}),Su(t,"timeLabel",function(N){w.textContent!==N&&(w.textContent=N)}),Su(t,"multiplierLabel",function(N){I.textContent!==N&&(I.textContent=N)})],this.applyThemeChanges(),this.resize()}op.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);const e=this._subscriptions;for(let t=0,n=e.length;t<n;t++)e[t].dispose();Xe(this)},op.prototype.isDestroyed=function(){return!1},op.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e)return void this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");if(this._toggled)return void this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");this.svgElement.setAttribute("class","cesium-animation-rectButton")}},op.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&this.svgElement.setAttribute("class",e?"cesium-animation-rectButton cesium-animation-buttonToggled":"cesium-animation-rectButton"))},op.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(MT.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),MT.prototype.isDestroyed=function(){return!1},MT.prototype.destroy=function(){c(this._observer)&&(this._observer.disconnect(),this._observer=void 0);const 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();const n=this._subscriptions;for(let i=0,o=n.length;i<o;i++)n[i].dispose();return Xe(this)},MT.prototype.resize=function(){const e=this._container.clientWidth,t=this._container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;const n=this._svgNode,i=200,o=132;let r=e,s=t;0===e&&0===t?(r=i,s=o):0===e?(s=t,r=i*(t/o)):0===t&&(r=e,s=o*(e/i));const a=r/i,l=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},${l})`),this._centerX=Math.max(1,100*a),this._centerY=Math.max(1,100*l),this._lastHeight=e,this._lastWidth=t},MT.prototype.applyThemeChanges=function(){const e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(c(this._observer))return;const d=this;return d._observer=new MutationObserver(function(){e.body.contains(d._container)&&(d._observer.disconnect(),d._observer=void 0,d.applyThemeChanges())}),void d._observer.observe(e,{childList:!0,subtree:!0})}const t=Zm(this._themeNormal),n=Zm(this._themeHover),i=Zm(this._themeSelect),o=Zm(this._themeDisabled),r=Zm(this._themeKnob),s=Zm(this._themePointer),a=Zm(this._themeSwoosh),l=Zm(this._themeSwooshHover),u=Pd({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Mr(t,UE)},{tagName:"stop",offset:"12%","stop-color":Mr(t,X1)},{tagName:"stop",offset:"46%","stop-color":Mr(t,KU)},{tagName:"stop",offset:"81%","stop-color":Mr(t,Z1)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Mr(n,UE)},{tagName:"stop",offset:"12%","stop-color":Mr(n,X1)},{tagName:"stop",offset:"46%","stop-color":Mr(n,KU)},{tagName:"stop",offset:"81%","stop-color":Mr(n,Z1)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Mr(i,UE)},{tagName:"stop",offset:"12%","stop-color":Mr(i,X1)},{tagName:"stop",offset:"46%","stop-color":Mr(i,KU)},{tagName:"stop",offset:"81%","stop-color":Mr(i,Z1)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Mr(o,_st)},{tagName:"stop",offset:"75%","stop-color":Mr(o,gst)}]},{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":l.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":l.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":Mr(s,cre)},{tagName:"stop",offset:"100%","stop-color":Mr(s,cre)}]},{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":Mr(r,UE)},{tagName:"stop",offset:"60%","stop-color":Mr(r,are)},{tagName:"stop",offset:"85%","stop-color":Mr(r,X1)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":Mr(r,are)},{tagName:"stop",offset:"60%","stop-color":Mr(r,UE)},{tagName:"stop",offset:"85%","stop-color":Mr(r,Z1)}]}]});c(this._defsElement)?this._svgNode.replaceChild(u,this._defsElement):this._svgNode.appendChild(u),this._defsElement=u};const Ast=MT,Fr=function xst(e,t){if(!c(e))throw new E("func is required.");t=g(t,!0);const n=new Ye,i=new Ye;function o(){if(!o.canExecute)throw new E("Cannot execute command, canExecute is false.");const r={args:arguments,cancel:!1};let s;return n.raiseEvent(r),r.cancel||(s=e.apply(null,arguments),i.raiseEvent(s)),s}return o.canExecute=t,vt.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o};function lre(e,t){if(!c(e))throw new E("command is required.");this._command=e,t=g(t,g.EMPTY_OBJECT),this.toggled=g(t.toggled,!1),this.tooltip=g(t.tooltip,""),vt.track(this,["toggled","tooltip"])}Object.defineProperties(lre.prototype,{command:{get:function(){return this._command}}});const K1=lre,Cst=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ure(e,t){return e-t}function ez(e,t){const n=Be(t,e,ure);return n<0?~n:n}function vu(e){if(!c(e))throw new E("clockViewModel is required.");const t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=vu.defaultDateFormatter,this._timeFormatter=vu.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,vt.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(vu.defaultTicks),this.timeLabel=void 0,vt.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,vt.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,vt.defineProperty(this,"multiplierLabel",function(){const s=t._clockViewModel;if(s.clockStep===na.SYSTEM_CLOCK)return"Today";const a=s.multiplier;return a%1==0?`${a.toFixed(0)}x`:`${a.toFixed(3).replace(/0{0,3}$/,"")}x`}),this.shuttleRingAngle=void 0,vt.defineProperty(this,"shuttleRingAngle",{get:function(){return function wst(e,t,n){if(n.clockStep===na.SYSTEM_CLOCK)return 15;if(Math.abs(e)<=1)return 15*e;const i=t[t.length-1];e>i?e=i:e<-i&&(e=-i);let s,l;return e>0?(s=Math.log(i),l=(s-0)/90,(Math.log(e)-0)/l+15):(s=Math.log(-t[0]),l=(s-0)/90,-((Math.log(Math.abs(e))-0)/l+15))}(e.multiplier,t._allShuttleRingTicks,e)},set:function(s){s=Math.max(Math.min(s,105),-105);const a=t._allShuttleRingTicks,l=t._clockViewModel;if(l.clockStep=na.SYSTEM_CLOCK_MULTIPLIER,105===Math.abs(s))return void(l.multiplier=s>0?a[a.length-1]:a[0]);let u=function Est(e,t){if(Math.abs(e)<=15)return e/15;let o,s;return e>0?(o=Math.log(t[t.length-1]),s=(o-0)/90,Math.exp(0+s*(e-15))):(o=Math.log(-t[0]),s=(o-0)/90,-Math.exp(0+s*(Math.abs(e)-15)))}(s,a);if(t.snapToTicks)u=a[ez(u,a)];else if(0!==u){const d=Math.abs(u);if(d>100){const h=d.toFixed(0).length-2,m=Math.pow(10,h);u=Math.round(u/m)*m|0}else d>15?u=Math.round(u):d>1?u=+u.toFixed(1):d>0&&(u=+u.toFixed(2))}l.multiplier=u}}),this._canAnimate=void 0,vt.defineProperty(this,"_canAnimate",function(){const s=t._clockViewModel,a=s.clockRange;if(t.shuttleRingDragging||a===lm.UNBOUNDED)return!0;const l=s.multiplier,u=s.currentTime,d=s.startTime;let h=!1;if(a===lm.LOOP_STOP)h=re.greaterThan(u,d)||u.equals(d)&&l>0;else{const m=s.stopTime;h=re.greaterThan(u,d)&&re.lessThan(u,m)||u.equals(d)&&l>0||u.equals(m)&&l<0}return h||(s.shouldAnimate=!1),h}),this._isSystemTimeAvailable=void 0,vt.defineProperty(this,"_isSystemTimeAvailable",function(){const s=t._clockViewModel;if(s.clockRange===lm.UNBOUNDED)return!0;const l=s.systemTime;return re.greaterThanOrEquals(l,s.startTime)&&re.lessThanOrEquals(l,s.stopTime)}),this._isAnimating=void 0,vt.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});const n=Fr(function(){const s=t._clockViewModel;s.shouldAnimate?s.shouldAnimate=!1:t._canAnimate&&(s.shouldAnimate=!0)});this._pauseViewModel=new K1(n,{toggled:vt.computed(function(){return!t._isAnimating}),tooltip:"Pause"});const i=Fr(function(){const s=t._clockViewModel,a=s.multiplier;a>0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playReverseViewModel=new K1(i,{toggled:vt.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});const o=Fr(function(){const s=t._clockViewModel,a=s.multiplier;a<0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playForwardViewModel=new K1(o,{toggled:vt.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==na.SYSTEM_CLOCK}),tooltip:"Play Forward"});const r=Fr(function(){t._clockViewModel.clockStep=na.SYSTEM_CLOCK},vt.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new K1(r,{toggled:vt.computed(function(){return e.clockStep===na.SYSTEM_CLOCK}),tooltip:vt.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=Fr(function(){const s=t._clockViewModel,a=t._allShuttleRingTicks,u=ez(s.multiplier,a)-1;u>=0&&(s.multiplier=a[u])}),this._faster=Fr(function(){const s=t._clockViewModel,a=t._allShuttleRingTicks,u=ez(s.multiplier,a)+1;u<a.length&&(s.multiplier=a[u])})}vu.defaultDateFormatter=function(e,t){const n=re.toGregorianDate(e);return`${Cst[n.month-1]} ${n.day} ${n.year}`},vu.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],vu.defaultTimeFormatter=function(e,t){const n=re.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`},vu.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},vu.prototype.setShuttleRingTicks=function(e){if(!c(e))throw new E("positiveTicks is required.");let t,n,i;const 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(ure);const s=[];for(n=r.length,t=n-1;t>=0;--t)i=r[t],0!==i&&s.push(-i);Array.prototype.push.apply(s,r),this._allShuttleRingTicks=s},Object.defineProperties(vu.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){if("function"!=typeof e)throw new E("dateFormatter must be a function");this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){if("function"!=typeof e)throw new E("timeFormatter must be a function");this._timeFormatter=e}}}),vu._maxShuttleRingAngle=105,vu._realtimeShuttleRingAngle=15;const Sst=vu,dre=function Dst(e){return e=g(e,g.EMPTY_OBJECT),dA.fromIonAssetId(1,{requestVertexNormals:g(e.requestVertexNormals,!1),requestWaterMask:g(e.requestWaterMask,!1),ellipsoid:he.WGS84})};function BT(e){A.typeOf.object("terrainProviderPromise",e),this._ready=!1,this._provider=void 0,this._errorEvent=new Ye,this._readyEvent=new Ye,function Ost(e,t){tz.apply(this,arguments)}(this,e)}function tz(){return tz=(0,we.Z)(function*(e,t){let n;try{n=yield Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){!function Pst(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}(e._errorEvent,i)}}),tz.apply(this,arguments)}Object.defineProperties(BT.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}}}),BT.fromWorldTerrain=function(e){return new BT(dre(e))},BT.fromWorldBathymetry=function(e){return new BT(function vst(e){return e=g(e,g.EMPTY_OBJECT),dA.fromIonAssetId(2426648,{requestVertexNormals:g(e.requestVertexNormals,!1)})}(e))};const Rst=BT;function fre(e){const t=(e=g(e,g.EMPTY_OBJECT)).globe,n=g(e.imageryProviderViewModels,[]),i=g(e.terrainProviderViewModels,[]);if(!c(t))throw new E("globe is required");this._globe=t,this.imageryProviderViewModels=n.slice(0),this.terrainProviderViewModels=i.slice(0),this.dropDownVisible=!1,vt.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);const o=vt.getObservable(this,"imageryProviderViewModels"),r=vt.pureComputed(function(){const h=o(),m={};let _;for(_=0;_<h.length;_++){const b=h[_],x=b.category;c(m[x])?m[x].push(b):m[x]=[b]}const p=Object.keys(m),y=[];for(_=0;_<p.length;_++){const b=p[_];y.push({name:b,providers:m[b]})}return y});this._imageryProviders=r;const s=vt.getObservable(this,"terrainProviderViewModels"),a=vt.pureComputed(function(){const h=s(),m={};let _;for(_=0;_<h.length;_++){const b=h[_],x=b.category;c(m[x])?m[x].push(b):m[x]=[b]}const p=Object.keys(m),y=[];for(_=0;_<p.length;_++){const b=p[_];y.push({name:b,providers:m[b]})}return y});this._terrainProviders=a,this.buttonTooltip=void 0,vt.defineProperty(this,"buttonTooltip",function(){const h=this.selectedImagery,m=this.selectedTerrain,_=c(h)?h.name:void 0,p=c(m)?m.name:void 0;return c(_)&&c(p)?`${_}\n${p}`:c(_)?_:p}),this.buttonImageUrl=void 0,vt.defineProperty(this,"buttonImageUrl",function(){const h=this.selectedImagery;if(c(h))return h.iconUrl}),this.selectedImagery=void 0;const l=vt.observable();this._currentImageryLayers=[],vt.defineProperty(this,"selectedImagery",{get:function(){return l()},set:function(h){if(l()===h)return void(this.dropDownVisible=!1);let m;const _=this._currentImageryLayers,p=_.length,y=this._globe.imageryLayers;let b=!1;for(m=0;m<p;m++){const x=y.length;for(let C=0;C<x;C++){const w=y.get(C);if(w===_[m]){y.remove(w),b=!0;break}}}if(c(h)){const x=h.creationCommand();if(Array.isArray(x)){const C=x.length;for(this._currentImageryLayers=[],m=C-1;m>=0;m--){const w=Lc.fromProviderAsync(x[m]);y.add(w,0),this._currentImageryLayers.push(w)}}else{this._currentImageryLayers=[];const C=Lc.fromProviderAsync(x);if(C.name=h.name,b)y.add(C,0);else{const w=y.get(0);c(w)&&y.remove(w),y.add(C,0)}this._currentImageryLayers.push(C)}}l(h),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;const u=vt.observable();vt.defineProperty(this,"selectedTerrain",{get:function(){return u()},set:function(h){if(u()===h)return void(this.dropDownVisible=!1);let m;if(c(h)&&(m=h.creationCommand()),c(m)&&!c(m.then))this._globe.depthTestAgainstTerrain=!(m instanceof Wf),this._globe.terrainProvider=m;else if(c(m)){let _=!1;const p=this._globe.terrainProviderChanged.addEventListener(()=>{_=!0,p()}),b=new Rst(m).readyEvent.addEventListener(x=>{_||(this._globe.depthTestAgainstTerrain=!(x instanceof Wf),this._globe.terrainProvider=x,b())})}u(h),this.dropDownVisible=!1}});const d=this;this._toggleDropDown=Fr(function(){d.dropDownVisible=!d.dropDownVisible}),this.selectedImagery=g(e.selectedImageryProviderViewModel,n[0]),this.selectedTerrain=e.selectedTerrainProviderViewModel}Object.defineProperties(fre.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});const Lst=fre;function Q1(e,t){if(!c(e))throw new E("container is required.");e=Rr(e);const n=new Lst(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);const 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);const r=document.createElement("div");r.className="cesium-baseLayerPicker-dropDown",r.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(r);const s=document.createElement("div");s.className="cesium-baseLayerPicker-sectionTitle",s.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),s.innerHTML="Imagery",r.appendChild(s);const a=document.createElement("div");a.className="cesium-baseLayerPicker-section",a.setAttribute("data-bind","foreach: _imageryProviders"),r.appendChild(a);const l=document.createElement("div");l.className="cesium-baseLayerPicker-category",a.appendChild(l);const u=document.createElement("div");u.className="cesium-baseLayerPicker-categoryTitle",u.setAttribute("data-bind","text: name"),l.appendChild(u);const d=document.createElement("div");d.className="cesium-baseLayerPicker-choices",d.setAttribute("data-bind","foreach: providers"),l.appendChild(d);const h=document.createElement("div");h.className="cesium-baseLayerPicker-item",h.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),d.appendChild(h);const m=document.createElement("img");m.className="cesium-baseLayerPicker-itemIcon",m.setAttribute("data-bind","attr: { src: iconUrl }"),m.setAttribute("draggable","false"),h.appendChild(m);const _=document.createElement("div");_.className="cesium-baseLayerPicker-itemLabel",_.setAttribute("data-bind","text: name"),h.appendChild(_);const p=document.createElement("div");p.className="cesium-baseLayerPicker-sectionTitle",p.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),p.innerHTML="Terrain",r.appendChild(p);const y=document.createElement("div");y.className="cesium-baseLayerPicker-section",y.setAttribute("data-bind","foreach: _terrainProviders"),r.appendChild(y);const b=document.createElement("div");b.className="cesium-baseLayerPicker-category",y.appendChild(b);const x=document.createElement("div");x.className="cesium-baseLayerPicker-categoryTitle",x.setAttribute("data-bind","text: name"),b.appendChild(x);const C=document.createElement("div");C.className="cesium-baseLayerPicker-choices",C.setAttribute("data-bind","foreach: providers"),b.appendChild(C);const w=document.createElement("div");w.className="cesium-baseLayerPicker-item",w.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),C.appendChild(w);const v=document.createElement("img");v.className="cesium-baseLayerPicker-itemIcon",v.setAttribute("data-bind","attr: { src: iconUrl }"),v.setAttribute("draggable","false"),w.appendChild(v);const I=document.createElement("div");I.className="cesium-baseLayerPicker-itemLabel",I.setAttribute("data-bind","text: name"),w.appendChild(I),vt.applyBindings(n,i),vt.applyBindings(n,r),this._viewModel=n,this._container=e,this._element=i,this._dropPanel=r,this._closeDropDown=function(P){i.contains(P.target)||r.contains(P.target)||(n.dropDownVisible=!1)},Hn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Q1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Q1.prototype.isDestroyed=function(){return!1},Q1.prototype.destroy=function(){return Hn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),vt.cleanNode(this._element),vt.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),Xe(this)};const Nst=Q1,Mst=new Yn("MapQuest, Open Street Map and contributors, CC-BY-SA");function J1(e){e=g(e,g.EMPTY_OBJECT);const t=zt.createIfNeeded(g(e.url,"https://tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+=`{z}/{x}/{y}${e.retinaTiles?"@2x":""}.${g(e.fileExtension,"png")}`;const n=new Md({ellipsoid:e.ellipsoid}),r=g(e.minimumLevel,0),s=e.maximumLevel,a=g(e.rectangle,n.rectangle),l=n.positionToTileXY(Te.southwest(a),r),u=n.positionToTileXY(Te.northeast(a),r),d=(Math.abs(u.x-l.x)+1)*(Math.abs(u.y-l.y)+1);if(d>4)throw new E(`The rectangle and minimumLevel indicate that there are ${d} tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.`);let h=g(e.credit,Mst);"string"==typeof h&&(h=new Yn(h)),om.call(this,{url:t,credit:h,tilingScheme:n,tileWidth:256,tileHeight:256,minimumLevel:r,maximumLevel:s,rectangle:a})}c(Object.create)&&((J1.prototype=Object.create(om.prototype)).constructor=J1);const VE=J1;function hre(e){if(!c(e.name))throw new E("options.name is required.");if(!c(e.tooltip))throw new E("options.tooltip is required.");if(!c(e.iconUrl))throw new E("options.iconUrl is required.");if("function"!=typeof e.creationFunction)throw new E("options.creationFunction is required.");let t=e.creationFunction;c(t.canExecute)||(t=Fr(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=g(e.category,""),vt.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(hre.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});const la=hre;function HE(e){c(e)||(e=new ZI),this._clock=e,this._eventHelper=new kh,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=vt.observable(re.now()),this.systemTime.equalityComparer=re.equals,this.startTime=vt.observable(e.startTime),this.startTime.equalityComparer=re.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=vt.observable(e.stopTime),this.stopTime.equalityComparer=re.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=vt.observable(e.currentTime),this.currentTime.equalityComparer=re.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=vt.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=vt.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=vt.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=vt.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=vt.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),vt.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(HE.prototype,{clock:{get:function(){return this._clock}}}),HE.prototype.synchronize=function(){const e=this._clock;this.systemTime=re.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},HE.prototype.isDestroyed=function(){return!1},HE.prototype.destroy=function(){this._eventHelper.removeAll(),Xe(this)};const zst=HE;function eP(e,t){c(t)||(t=document.body),t=Rr(t);const n=this,i=vt.observable(Os.fullscreen),o=vt.observable(Os.enabled),r=t.ownerDocument;this.isFullscreen=void 0,vt.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,vt.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(s){o(s&&Os.enabled)}}),this.tooltip=void 0,vt.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Fr(function(){Os.fullscreen?Os.exitFullscreen():Os.requestFullscreen(n._fullscreenElement)},vt.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=g(Rr(e),r.body),this._callback=function(){i(Os.fullscreen)},r.addEventListener(Os.changeEventName,this._callback)}Object.defineProperties(eP.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){if(!(e instanceof Element))throw new E("value must be a valid Element.");this._fullscreenElement=e}},command:{get:function(){return this._command}}}),eP.prototype.isDestroyed=function(){return!1},eP.prototype.destroy=function(){document.removeEventListener(Os.changeEventName,this._callback),Xe(this)};const Vst=eP;function tP(e,t){if(!c(e))throw new E("container is required.");e=Rr(e);const n=new Vst(t,e);n._exitFullScreenPath="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",n._enterFullScreenPath="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";const 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),vt.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(tP.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),tP.prototype.isDestroyed=function(){return!1},tP.prototype.destroy=function(){return this._viewModel.destroy(),vt.cleanNode(this._element),this._container.removeChild(this._element),Xe(this)};const jst=tP,nz=Object.freeze({SEARCH:0,AUTOCOMPLETE:1});function iz(e){A.defined("url",e),this._url=zt.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(iz.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}}),iz.prototype.geocode=function(){var e=(0,we.Z)(function*(t,n){return A.typeOf.string("query",t),this._url.getDerivedResource({url:n===nz.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:t}}).fetchJson().then(function(o){return o.features.map(function(r){let s;const a=r.bbox;return s=c(a)?Te.fromDegrees(a[0],a[1],a[2],a[3]):f.fromDegrees(r.geometry.coordinates[0],r.geometry.coordinates[1]),{displayName:r.properties.label,destination:s,attributions:o.attributions}})})});return function(t,n){return e.apply(this,arguments)}}();const Wst=iz;function oz(e){e=g(e,g.EMPTY_OBJECT),A.typeOf.object("options.scene",e.scene);const t=g(e.accessToken,A_.defaultAccessToken),n=zt.createIfNeeded(g(e.server,A_.defaultServer));n.appendForwardSlash();const i=A_.getDefaultTokenCredit(t);c(i)&&e.scene.frameState.creditDisplay.addStaticCredit(Yn.clone(i));const o=n.getDerivedResource({url:"v1/geocode"});c(t)&&o.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=n,this._pelias=new Wst(o)}Object.defineProperties(oz.prototype,{credit:{get:function(){}}}),oz.prototype.geocode=function(){var e=(0,we.Z)(function*(t,n){return this._pelias.geocode(t,n)});return function(t,n){return e.apply(this,arguments)}}();const qst=oz;function nP(){E.throwInstantiationError()}Object.defineProperties(nP.prototype,{credit:{get:E.throwInstantiationError}}),nP.getCreditsFromResult=function(e){if(c(e.attributions))return e.attributions.map(Yn.getIonCredit)},nP.prototype.geocode=E.throwInstantiationError;const pre=nP;function Iu(e){if(!c(e)||!c(e.scene))throw new E("options.scene is required.");this._geocoderServices=c(e.geocoderServices)?e.geocoderServices:[new qst({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 Ye,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=gre,this._handleArrowUp=_re;const t=this;this._suggestionsVisible=vt.pureComputed(function(){const o=vt.getObservable(t,"_suggestions")().length>0,r=vt.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=Fr(function(i){return i=g(i,nz.SEARCH),t._focusTextbox=!1,c(t._selectedSuggestion)?(t.activateSuggestion(t._selectedSuggestion),!1):(t.hideSuggestions(),t.isSearchInProgress?void function Qst(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}(t):function $st(e,t,n){return sz.apply(this,arguments)}(t,t._geocoderServices,i))}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(i,o){return("ArrowDown"===o.key||"Down"===o.key||40===o.keyCode||"ArrowUp"===o.key||"Up"===o.key||38===o.keyCode)&&o.preventDefault(),!0},this.handleKeyUp=function(i,o){const r="ArrowDown"===o.key||"Down"===o.key||40===o.keyCode,a="Enter"===o.key||13===o.keyCode;return"ArrowUp"===o.key||"Up"===o.key||38===o.keyCode?_re(t):r?gre(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;const o=i.destination;Tre(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=g(e.autocomplete,!0),this.destinationFound=g(e.destinationFound,Iu.flyToDestination),this._focusTextbox=!1,vt.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);const n=vt.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){Iu._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,vt.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,vt.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){if("string"!=typeof i)throw new E("value must be a valid string.");this._searchText=i}}),this.flightDuration=void 0,vt.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){if(c(i)&&i<0)throw new E("value must be positive.");this._flightDuration=i}})}function _re(e){if(0===e._suggestions.length)return;const t=e._suggestions.indexOf(e._selectedSuggestion);if(-1===t||0===t)return void(e._selectedSuggestion=void 0);const n=t-1;e._selectedSuggestion=e._suggestions[n],Iu._adjustSuggestionsScroll(e,n)}function gre(e){if(0===e._suggestions.length)return;const t=e._suggestions.length,i=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t;e._selectedSuggestion=e._suggestions[i],Iu._adjustSuggestionsScroll(e,i)}function Zst(e,t,n){return rz.apply(this,arguments)}function rz(){return rz=(0,we.Z)(function*(e,t,n){try{return{state:"fulfilled",value:yield e.geocode(t,n),credits:e.credit}}catch(i){return{state:"rejected",reason:i}}}),rz.apply(this,arguments)}function sz(){return sz=(0,we.Z)(function*(e,t,n){const i=e._searchText;if(bre(i))return void e.showSuggestions();let o,r;for(e._isSearchInProgress=!0,e._wasGeocodeCancelled=!1,o=0;o<t.length;o++){if(e._wasGeocodeCancelled)return;if(r=yield Zst(t[o],i,n),c(r)&&"fulfilled"===r.state&&r.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,cz(e);const s=r.value;if("fulfilled"===r.state&&c(s)&&s.length>0){e._searchText=s[0].displayName,e.destinationFound(e,s[0].destination);const a=yre(e,pre.getCreditsFromResult(s[0]));c(a)||az(e,t[o].credit)}else e._searchText=`${i} (not found)`}),sz.apply(this,arguments)}function az(e,t){c(t)&&!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function yre(e,t){return c(t)&&t.forEach(n=>az(e,n)),t}function cz(e){!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function bre(e){return/^\s*$/.test(e)}function Tre(e){vt.getObservable(e,"_suggestions").removeAll()}function lz(){return lz=(0,we.Z)(function*(e){if(!e.autoComplete)return;const t=e._searchText;if(Tre(e),cz(e),!bre(t))for(const n of e._geocoderServices){const i=yield n.geocode(t,nz.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(i),i.length>0){let o=!0;i.forEach(r=>{const s=pre.getCreditsFromResult(r);o=o&&!c(s),yre(e,s)}),o&&az(e,n.credit)}if(e._suggestions.length>=5)return}}),lz.apply(this,arguments)}Object.defineProperties(Iu.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}}}),Iu.prototype.destroy=function(){this._suggestionSubscription.dispose()},Iu.flyToDestination=function Xst(e,t){const n=e._scene,i=n.ellipsoid,o=n.camera,r=n.terrainProvider;let a,s=t;return t instanceof Te?O.equalsEpsilon(t.south,t.north,O.EPSILON7)&&O.equalsEpsilon(t.east,t.west,O.EPSILON7)?t=Te.center(t):a=koe(t,n):t=i.cartesianToCartographic(t),c(a)||(a=function Yst(e,t){const n=c(t)?t.availability:void 0;return c(n)?Boe(t,[e]).then(function(i){return(e=i[0]).height+=1e3,e}):(e.height+=1e3,Promise.resolve(e))}(t,r)),a.then(function(l){s=i.cartographicToCartesian(l)}).finally(function(){o.flyTo({destination:s,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:k.IDENTITY})})},Iu._updateSearchSuggestions=function Jst(e){return lz.apply(this,arguments)},Iu._adjustSuggestionsScroll=function Kst(e,t){const n=Rr(e._viewContainer),i=n.getElementsByClassName("search-results")[0],r=n.getElementsByTagName("li")[t];if(0===t)return void(i.scrollTop=0);const s=r.offsetTop;s+r.clientHeight>i.clientHeight?i.scrollTop=s+r.clientHeight:s<i.scrollTop&&(i.scrollTop=s)},Iu.prototype.isDestroyed=function(){return!1},Iu.prototype.destroy=function(){return cz(this),Xe(this)};const eat=Iu;function iP(e){if(!c(e)||!c(e.container))throw new E("options.container is required.");if(!c(e.scene))throw new E("options.scene is required.");const t=Rr(e.container),n=new eat(e);n._startSearchPath="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",n._stopSearchPath="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";const i=document.createElement("form");i.setAttribute("data-bind","submit: search");const 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;const 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);const s=document.createElement("div");s.className="search-results",s.setAttribute("data-bind","visible: _suggestionsVisible");const a=document.createElement("ul");a.setAttribute("data-bind","foreach: _suggestions");const l=document.createElement("li");a.appendChild(l),l.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),s.appendChild(a),t.appendChild(s),vt.applyBindings(n,i),vt.applyBindings(n,s),this._container=t,this._searchSuggestionsContainer=s,this._viewModel=n,this._form=i,this._onInputBegin=function(u){let d=u.target;"function"==typeof u.composedPath&&(d=u.composedPath()[0]),t.contains(d)||(n._focusTextbox=!1,n.hideSuggestions())},this._onInputEnd=function(u){n._focusTextbox=!0,n.showSuggestions()},Hn.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(iP.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}}),iP.prototype.isDestroyed=function(){return!1},iP.prototype.destroy=function(){const e=this._container;return Hn.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(),vt.cleanNode(this._form),vt.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),Xe(this)};const iat=iP;function Are(e,t){if(!c(e))throw new E("scene is required.");this._scene=e,this._duration=t;const n=this;this._command=Fr(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",vt.track(this,["tooltip"])}Object.defineProperties(Are.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){if(c(e)&&e<0)throw new E("value must be positive.");this._duration=e}}});const oat=Are;function oP(e,t,n){if(!c(e))throw new E("container is required.");e=Rr(e);const i=new oat(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";const 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),vt.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(oP.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),oP.prototype.isDestroyed=function(){return!1},oP.prototype.destroy=function(){return vt.cleanNode(this._element),this._container.removeChild(this._element),Xe(this)};const rat=oP;function uz(){this._cameraClicked=new Ye,this._closeClicked=new Ye,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",vt.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,vt.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?"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":"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"}}),vt.defineProperty(this,"_bodyless",{get:function(){return!c(this.description)||0===this.description.length}})}uz.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(uz.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});const cat=uz;function rP(e){A.defined("container",e),e=Rr(e);const t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);const n=document.createElement("div");n.className="cesium-infoBox-title",n.setAttribute("data-bind","text: titleText"),t.appendChild(n);const 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);const 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);const 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);const s=new cat;vt.applyBindings(s,t),this._container=e,this._element=t,this._frame=r,this._viewModel=s,this._descriptionSubscription=void 0;const a=this;r.addEventListener("load",function(){const l=r.contentDocument,u=l.createElement("link");u.href=Jn("Widgets/InfoBox/InfoBoxDescription.css"),u.rel="stylesheet",u.type="text/css";const d=l.createElement("div");d.className="cesium-infoBox-description",l.head.appendChild(u),l.body.appendChild(d),a._descriptionSubscription=Su(s,"description",function(h){r.style.height="5px",d.innerHTML=h;let m=null;const _=d.firstElementChild;if(null!==_&&1===d.childNodes.length){const y=window.getComputedStyle(_);if(null!==y){const x=Z.fromCssColorString(y["background-color"]);c(x)&&0!==x.alpha&&(m=y["background-color"])}}t.style["background-color"]=m;const p=d.getBoundingClientRect().height;r.style.height=`${p}px`})}),r.setAttribute("src","about:blank")}Object.defineProperties(rP.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),rP.prototype.isDestroyed=function(){return!1},rP.prototype.destroy=function(){const e=this._container;return vt.cleanNode(this._element),e.removeChild(this._element),c(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),Xe(this)};const lat=rP;function xre(){this.showInstructions=!1;const e=this;this._command=Fr(function(){e.showInstructions=!e.showInstructions}),this._showClick=Fr(function(){e._touch=!1}),this._showTouch=Fr(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",vt.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(xre.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});const uat=xre;function sP(e){if(!c(e)||!c(e.container))throw new E("options.container is required.");const t=Rr(e.container),n=new uat,i=g(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";const o=document.createElement("span");o.className="cesium-navigationHelpButton-wrapper",t.appendChild(o);const 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);const s=document.createElement("div");s.className="cesium-navigation-help",s.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),o.appendChild(s);const 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}');const l=document.createElement("img");l.src=Jn("Widgets/Images/NavigationHelp/Mouse.svg"),l.className="cesium-navigation-button-icon",l.style.width="25px",l.style.height="25px",a.appendChild(l),a.appendChild(document.createTextNode("Mouse"));const u=document.createElement("button");u.type="button",u.className="cesium-navigation-button cesium-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');const d=document.createElement("img");d.src=Jn("Widgets/Images/NavigationHelp/Touch.svg"),d.className="cesium-navigation-button-icon",d.style.width="25px",d.style.height="25px",u.appendChild(d),u.appendChild(document.createTextNode("Touch")),s.appendChild(a),s.appendChild(u);const h=document.createElement("div");h.className="cesium-click-navigation-help cesium-navigation-help-instructions",h.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),h.innerHTML=` <table> <tr> <td><img src="${Jn("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="${Jn("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="${Jn("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(h);const m=document.createElement("div");m.className="cesium-touch-navigation-help cesium-navigation-help-instructions",m.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),m.innerHTML=` <table> <tr> <td><img src="${Jn("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="${Jn("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="${Jn("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="${Jn("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(m),vt.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(_){o.contains(_.target)||(n.showInstructions=!1)},Hn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(sP.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),sP.prototype.isDestroyed=function(){return!1},sP.prototype.destroy=function(){return Hn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),vt.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Xe(this)};const dat=sP;function aP(e){if(!c(e))throw new E("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof $n,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,vt.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);const t=this;vt.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=Fr(function(){t.sceneMode===ce.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new kh,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===ce.SCENE2D||t._scene.camera.frustum instanceof $n}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=c(e.camera._currentFlight)}),this._switchToPerspective=Fr(function(){t.sceneMode!==ce.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=Fr(function(){t.sceneMode!==ce.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=ce}Object.defineProperties(aP.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}}}),aP.prototype.isDestroyed=function(){return!1},aP.prototype.destroy=function(){this._eventHelper.removeAll(),Xe(this)};const fat=aP;function cP(e,t){if(!c(e))throw new E("container is required.");if(!c(t))throw new E("scene is required.");e=Rr(e);const n=new fat(t);n._perspectivePath="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",n._orthographicPath="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";const i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);const 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='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',i.appendChild(o);const 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);const 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),vt.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},Hn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(cP.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),cP.prototype.isDestroyed=function(){return!1},cP.prototype.destroy=function(){return this._viewModel.destroy(),Hn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),vt.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Xe(this)};const mat=cP;function lP(e,t){if(!c(e))throw new E("scene is required.");this._scene=e;const n=this;this._eventHelper=new kh,this._eventHelper.add(e.morphStart,function(o,r,s,a){n.sceneMode=s,n.dropDownVisible=!1}),this._duration=g(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",vt.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,vt.defineProperty(this,"selectedTooltip",function(){const o=n.sceneMode;return o===ce.SCENE2D?n.tooltip2D:o===ce.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=Fr(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=Fr(function(){e.morphTo2D(n._duration)}),this._morphTo3D=Fr(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=Fr(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=ce}Object.defineProperties(lP.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new E("duration value must be positive.");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}}}),lP.prototype.isDestroyed=function(){return!1},lP.prototype.destroy=function(){this._eventHelper.removeAll(),Xe(this)};const _at=lP;function uP(e,t,n){if(!c(e))throw new E("container is required.");if(!c(t))throw new E("scene is required.");e=Rr(e);const i=new _at(t,n);i._globePath="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",i._flatMapPath="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",i._columbusViewPath="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";const o=document.createElement("span");o.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(o);const 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='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',o.appendChild(r);const 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);const 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);const l=document.createElement("button");l.type="button",l.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",l.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(l),vt.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(u){o.contains(u.target)||(i.dropDownVisible=!1)},Hn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(uP.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),uP.prototype.isDestroyed=function(){return!1},uP.prototype.destroy=function(){return this._viewModel.destroy(),Hn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),vt.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Xe(this)};const Tat=uP,Aat=new V,dP="-1000px";function GE(e,t,n){if(!c(e))throw new E("scene is required.");if(!c(t))throw new E("selectionIndicatorElement is required.");if(!c(n))throw new E("container is required.");this._scene=e,this._screenPositionX=dP,this._screenPositionY=dP,this._tweens=e.tweens,this._container=g(n,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,vt.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,vt.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&c(this.position)}}),vt.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return Pr.worldToWindowCoordinates(e,i,o)}}GE.prototype.update=function(){if(this.showSelection&&c(this.position)){const e=this.computeScreenSpacePosition(this.position,Aat);if(c(e)){const t=this._container,n=t.parentNode.clientWidth,i=t.parentNode.clientHeight,o=this._selectionIndicatorElement.clientWidth,r=.5*o;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`}else this._screenPositionX=dP,this._screenPositionY=dP}},GE.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Vc.EXPONENTIAL_OUT})},GE.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Vc.EXPONENTIAL_OUT})},Object.defineProperties(GE.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});const xat=GE;function fP(e,t){if(!c(e))throw new E("container is required.");e=Rr(e),this._container=e;const 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;const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");const s=document.createElementNS(i,"g");s.setAttribute("transform","translate(80,80)"),r.appendChild(s);const a=document.createElementNS(i,"path");a.setAttribute("data-bind","attr: { transform: _transform }"),a.setAttribute("d","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"),s.appendChild(a),n.appendChild(r);const l=new xat(t,this._element,this._container);this._viewModel=l,vt.applyBindings(this._viewModel,this._element)}Object.defineProperties(fP.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),fP.prototype.isDestroyed=function(){return!1},fP.prototype.destroy=function(){const e=this._container;return vt.cleanNode(this._element),e.removeChild(this._element),Xe(this)};const Cat=fP;function Oy(e,t,n){this._color=e,this._height=t,this._base=g(n,0)}Oy.prototype.getHeight=function(){return this._height},Oy.prototype.getBase=function(){return this._base},Oy.prototype.getStartTime=function(){return this._start},Oy.prototype.getStopTime=function(){return this._stop},Oy.prototype.setRange=function(e,t){this._start=e,this._stop=t},Oy.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){const n=re.secondsDifference(this._start,e.epochJulian);let i=Math.round(e.timeBarWidth*e.getAlpha(n));const o=re.secondsDifference(this._stop,e.epochJulian);let 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};const Eat=Oy;function Cre(e,t,n,i){this.interval=e,this.height=t,this.color=n||new Z(.5,.5,.5,1),this.backgroundColor=i||new Z(0,0,0,0)}Cre.prototype.render=function(e,t){const n=this.interval.start,i=this.interval.stop,o=t.startJulian,r=re.addSeconds(t.startJulian,t.duration,new re);if(re.lessThan(n,o)&&re.greaterThan(i,r))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(re.lessThanOrEquals(n,r)&&re.greaterThanOrEquals(i,o)){let s,a,l;for(s=0;s<t.timeBarWidth;++s){const u=re.addSeconds(t.startJulian,s/t.timeBarWidth*t.duration,new re);!c(a)&&re.greaterThanOrEquals(u,n)?a=s:!c(l)&&re.greaterThanOrEquals(u,i)&&(l=s)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),c(a)&&(c(l)||(l=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(a,t.y,Math.max(l-a,1),this.height))}};const wat=Cre;let dz=1e12;const Du_none=0,Du_scrub=1,Du_slide=2,Du_zoom=3,Du_touchOnly=4,gc_none=0,gc_scrub=1,gc_slideZoom=2,gc_singleTap=3,gc_ignore=4,Km=[.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],Sat=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function yc(e,t){if(!c(e))throw new E("container is required.");if(!c(t))throw new E("clock is required.");const n=(e=Rr(e)).ownerDocument;this.container=e;const 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=Du_none,this._touchMode=gc_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=function vat(e){return function(t){e._mouseMode!==Du_touchOnly&&(0===t.button?(e._mouseMode=Du_scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,e._mouseMode=2===t.button?Du_zoom:Du_slide)),t.preventDefault()}}(this),this._onMouseUp=function Iat(e){return function(t){e._mouseMode=Du_none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}(this),this._onMouseMove=function Dat(e){return function(t){let n;if(e._mouseMode===Du_scrub){t.preventDefault();const 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===Du_slide){if(n=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==n){const i=n*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(re.addSeconds(e._startJulian,i,new re),re.addSeconds(e._endJulian,i,new re))}}else e._mouseMode===Du_zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==n&&e.zoomFrom(Math.pow(1.01,n)))}}(this),this._onMouseWheel=function Pat(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;dz=Math.max(Math.min(Math.abs(n),dz),1),n/=dz,e.zoomFrom(Math.pow(1.05,-n))}}(this),this._onTouchStart=function Oat(e){return function(t){const n=t.touches.length;let i,o;const r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=Du_touchOnly,1===n?(i=re.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=gc_scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===n?"-16px 0":"0 0")):(e._touchMode=gc_singleTap,e._touchState.centerX=t.touches[0].clientX-r)):2===n?(e._touchMode=gc_slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=gc_ignore}}(this),this._onTouchMove=function Lat(e){return function(t){let n,i,o,r,s,a,l=1;const u=e._topDiv.getBoundingClientRect().left;e._touchMode===gc_singleTap&&(e._touchMode=gc_slideZoom),e._mouseMode=Du_touchOnly,e._touchMode===gc_scrub?(t.preventDefault(),1===t.changedTouches.length&&(i=t.changedTouches[0].clientX-u,i>=0&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===gc_slideZoom&&(o=t.touches.length,2===o?(r=.5*(t.touches[0].clientX+t.touches[1].clientX)-u,s=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===o&&(r=t.touches[0].clientX-u,s=0),c(r)&&(s>0&&e._touchState.spanX>0?(l=e._touchState.spanX/s,a=re.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*l)/e._topDiv.clientWidth,new re)):(n=e._touchState.centerX-r,a=re.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new re)),e.zoomTo(a,re.addSeconds(a,e._timeBarSecondsSpan*l,new re)),e._touchState.centerX=r,e._touchState.spanX=s))}}(this),this._onTouchEnd=function Rat(e){return function(t){const n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===gc_singleTap?(e._touchMode=gc_scrub,e._onTouchMove(t)):e._touchMode===gc_scrub&&e._onTouchMove(t),e._mouseMode=Du_touchOnly,1!==n?e._touchMode=n>0?gc_ignore:gc_none:e._touchMode===gc_slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}(this);const 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()}function fz(e){return e<10?`0${e.toString()}`:e.toString()}yc.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)},yc.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)},yc.prototype.isDestroyed=function(){return!1},yc.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);const e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);const 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),Xe(this)},yc.prototype.addHighlightRange=function(e,t,n){const i=new Eat(e,t,n);return this._highlightRanges.push(i),this.resize(),i},yc.prototype.addTrack=function(e,t,n,i){const o=new wat(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o},yc.prototype.zoomTo=function(e,t){if(!c(e))throw new E("startTime is required.");if(!c(t))throw new E("stopTime is required");if(re.lessThanOrEquals(t,e))throw new E("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=re.secondsDifference(t,e),this._clock&&this._clock.clockRange!==lm.UNBOUNDED){const i=this._clock.startTime,o=this._clock.stopTime,r=re.secondsDifference(o,i),s=re.secondsDifference(i,this._startJulian),a=re.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):s>0?(this._endJulian=re.addSeconds(this._endJulian,s,new re),this._startJulian=i,this._timeBarSecondsSpan=re.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=re.addSeconds(this._startJulian,a,new re),this._endJulian=o,this._timeBarSecondsSpan=re.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();const 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)},yc.prototype.zoomFrom=function(e){let t=re.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;const n=this._timeBarSecondsSpan-t;this.zoomTo(re.addSeconds(this._startJulian,t-t*e,new re),re.addSeconds(this._endJulian,n*e-n,new re))},yc.prototype.makeLabel=function(e){const t=re.toGregorianDate(e),n=t.millisecond;let i=" UTC";if(n>0&&this._timeBarSecondsSpan<3600){for(i=Math.floor(n).toString();i.length<3;)i=`0${i}`;i=`.${i}`}return`${Sat[t.month-1]} ${t.day} ${t.year} ${fz(t.hour)}:${fz(t.minute)}:${fz(t.second)}${i}`},yc.prototype.smallestTicInPixels=7,yc.prototype._makeTics=function(){const e=this._timeBarEle,t=re.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),i=n-8;let o;const r=this;this._needleEle.style.left=`${n.toString()}px`;let s="";const a=.01,l=31536e6,u=1e-10;let d=0,h=this._timeBarSecondsSpan;h<a?(h=a,this._timeBarSecondsSpan=a,this._endJulian=re.addSeconds(this._startJulian,a,new re)):h>l&&(h=l,this._timeBarSecondsSpan=l,this._endJulian=re.addSeconds(this._startJulian,l,new re));let m=this._timeBarEle.clientWidth;m<10&&(m=10);const _=this._startJulian,p=Math.min(h/m*1e-5,.4);let y;const b=re.toGregorianDate(_);y=re.fromDate(h>31536e4?new Date(Date.UTC(100*Math.floor(b.year/100),0)):h>31536e3?new Date(Date.UTC(10*Math.floor(b.year/10),0)):h>86400?new Date(Date.UTC(b.year,0)):new Date(Date.UTC(b.year,b.month,b.day)));const x=re.secondsDifference(this._startJulian,re.addSeconds(y,p,new re));let C=x+h;function w(j){return Math.floor(x/j)*j}function v(j,Q){return Math.ceil(j/Q+.5)*Q}function I(j){return(j-x)/h}function P(j,Q){return j-Q*Math.round(j/Q)}this._epochJulian=y,this._rulerEle.innerHTML=this.makeLabel(re.addSeconds(this._endJulian,-a,new re));let N=this._rulerEle.offsetWidth+20;N<30&&(N=180);const R=d;d-=u;const B={startTime:x,startJulian:_,epochJulian:y,duration:h,timeBarWidth:m,getAlpha:I};this._highlightRanges.forEach(function(j){s+=j.render(B)});let F=0,S=0,D=0,L=N/m;L>1&&(L=1),L*=this._timeBarSecondsSpan;let M=-1,U=-1;const z=Km.length;let G;for(G=0;G<z;++G){const j=Km[G];if(++M,F=j,j>L&&j>d)break;U<0&&m*(j/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(U=M)}if(M>0){for(;M>0;)if(--M,Math.abs(P(F,Km[M]))<1e-5){Km[M]>=d&&(S=Km[M]);break}if(U>=0)for(;U<M;){if(Math.abs(P(S,Km[U]))<1e-5&&Km[U]>=d){D=Km[U];break}++U}}d=R,d>u&&D<1e-5&&Math.abs(d-F)>u&&(D=d,d<=F+u&&(S=0));let q,W=-999999;if(m*(D/this._timeBarSecondsSpan)>=3)for(o=w(D);o<=C;o=v(o,D))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(m*I(o)).toString()}px;"></span>`;if(m*(S/this._timeBarSecondsSpan)>=3)for(o=w(S);o<=C;o=v(o,S))s+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(m*I(o)).toString()}px;"></span>`;if(m*(F/this._timeBarSecondsSpan)>=2){this._mainTicSpan=F,C+=F,o=w(F);const j=re.computeTaiMinusUtc(y);for(;o<=C;){let Q=re.addSeconds(_,o-x,new re);if(F>2.1){const K=re.computeTaiMinusUtc(Q);Math.abs(K-j)>.1&&(o+=K-j,Q=re.addSeconds(_,o-x,new re))}const Y=Math.round(m*I(o)),ne=this.makeLabel(Q);this._rulerEle.innerHTML=ne,q=this._rulerEle.offsetWidth,q<10&&(q=N);const X=Y-(q/2-1);X>W?(W=X+q+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${Y.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${X.toString()}px;">${ne}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${Y.toString()}px;"></span>`,o=v(o,F)}}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),B.y=0,this._trackList.forEach(function(j){j.render(r._context,B),B.y+=j.height})},yc.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;const e=this._scrubElement;if(c(this._scrubElement)){const t=re.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`)}c(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(re.addSeconds(this._startJulian,this._timelineDrag,new re),re.addSeconds(this._endJulian,this._timelineDrag,new re)))},yc.prototype._setTimeBarTime=function(e,t){e=Math.round(e),this._scrubJulian=re.addSeconds(this._startJulian,t,new re),this._scrubElement&&(this._scrubElement.style.left=`${(e-8).toString()}px`,this._needleEle.style.left=`${e.toString()}px`);const 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)},yc.prototype.resize=function(){const 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};const Nat=yc;var Mat=wt(8097);function Ere(){const e=window.screen;c(e)&&(c(e.unlockOrientation)?e.unlockOrientation():c(e.mozUnlockOrientation)?e.mozUnlockOrientation():c(e.msUnlockOrientation)?e.msUnlockOrientation():c(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function hP(e,t){if(!c(e))throw new E("scene is required.");const n=this,i=vt.observable(Os.enabled),o=vt.observable(!1);this.isVRMode=void 0,vt.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,vt.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&Os.enabled)}}),this.tooltip=void 0,vt.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});const r=vt.observable(!1);this._isOrthographic=void 0,vt.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new kh,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof $n)}),this._locked=!1,this._noSleep=new Mat,this._command=Fr(function(){!function Bat(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(Ere(),e._locked=!1),e._noSleep.disable(),Os.exitFullscreen(),n(!1)):(Os.fullscreen||Os.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=function Fat(e){let t=!1;const n=window.screen;return c(n)&&(c(n.lockOrientation)?t=n.lockOrientation(e):c(n.mozLockOrientation)?t=n.mozLockOrientation(e):c(n.msLockOrientation)?t=n.msLockOrientation(e):c(n.orientation&&n.orientation.lock)&&(t=n.orientation.lock(e))),t}("landscape")),t.useWebVR=!0,n(!0)))}(n,e,o,r)},vt.getObservable(this,"isVREnabled")),this._vrElement=g(Rr(t),document.body),this._callback=function(){!Os.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(Ere(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(Os.changeEventName,this._callback)}Object.defineProperties(hP.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){if(!(e instanceof Element))throw new E("value must be a valid Element.");this._vrElement=e}},command:{get:function(){return this._command}}}),hP.prototype.isDestroyed=function(){return!1},hP.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Os.changeEventName,this._callback),Xe(this)};const kat=hP;function pP(e,t,n){if(!c(e))throw new E("container is required.");if(!c(t))throw new E("scene is required.");e=Rr(e);const i=new kat(t,n);i._exitVRPath="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",i._enterVRPath="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";const 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),vt.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(pP.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),pP.prototype.isDestroyed=function(){return!1},pP.prototype.destroy=function(){return this._viewModel.destroy(),vt.cleanNode(this._element),this._container.removeChild(this._element),Xe(this)};const Vat=pP,Qm=new Ae;function wre(e){const t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function Hat(e){const t=e.getPropertyIds();let n="";return t.forEach(function(i){const o=e.getProperty(i);c(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 Gat(e){let t;const n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){const 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))}const o=n.length;for(t=0;t<o;t++){const r=n[t];if(c(r)&&""!==r)return r}return"Unnamed Feature"}function Sre(e,t){const n=e.scene.pick(t.position);if(c(n)){const i=g(n.id,n.primitive.id);if(i instanceof Fc)return i;if(n instanceof v_)return new Fc({name:Gat(n),description:Hat(n),feature:n})}if(c(e.scene.globe))return function qat(e,t){const n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!c(o))return;const r=new Fc({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!c(s)||0===s.length)return void(e.selectedEntity=Ire());const a=s[0],l=new Fc({id:a.name,description:a.description});if(c(a.position)){const u=e.scene.ellipsoid.cartographicToCartesian(a.position,Wat);l.position=new aI(u)}e.selectedEntity=l},function(){e.selectedEntity===r&&(e.selectedEntity=Ire())}),r}(e,t.position)}const jat=new re;function vre(e,t,n){if(c(n)){const i=n.clock;if(c(i)&&(i.getValue(t),c(e))){const o=i.startTime;let r=i.stopTime;re.equals(o,r)&&(r=re.addSeconds(o,O.EPSILON2,jat)),e.updateFromClock(),e.zoomTo(o,r)}}}const Wat=new f;function Ire(){return new Fc({id:"None",description:"No features found."})}function Oi(e,t){if(!c(e))throw new E("container is required.");e=Rr(e),t=g(t,g.EMPTY_OBJECT);const n=!(c(t.globe)&&!1===t.globe||c(t.baseLayerPicker)&&!1===t.baseLayerPicker);if(!n&&c(t.selectedImageryProviderViewModel))throw new E("options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.baseLayer instead or set options.baseLayerPicker to true.");if(!n&&c(t.selectedTerrainProviderViewModel))throw new E("options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.terrainProvider instead or set options.baseLayerPicker to true.");const i=this,o=document.createElement("div");o.className="cesium-viewer",e.appendChild(o);const r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",o.appendChild(r);const s=document.createElement("div");s.className="cesium-viewer-bottom",o.appendChild(s);const a=g(t.scene3DOnly,!1);let l,u,d=!1;c(t.clockViewModel)?(u=t.clockViewModel,l=u.clock):(l=new ZI,u=new zst(l),d=!0),c(t.shouldAnimate)&&(l.shouldAnimate=t.shouldAnimate);const h=new DJe(r,{baseLayer:!(n&&c(t.selectedImageryProviderViewModel)||c(t.baseLayer)||c(t.imageryProvider))&&void 0,clock:l,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:c(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});let m=t.dataSources,_=!1;c(m)||(m=new PJe,_=!0);const p=h.scene,y=new art({scene:p,dataSourceCollection:m}),b=new kh;let x,C;if(b.add(l.onTick,Oi.prototype._onTick,this),b.add(p.morphStart,Oi.prototype._clearTrackedObject,this),!c(t.selectionIndicator)||!1!==t.selectionIndicator){const Y=document.createElement("div");Y.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(Y),x=new Cat(Y,p)}if(!c(t.infoBox)||!1!==t.infoBox){const Y=document.createElement("div");Y.className="cesium-viewer-infoBoxContainer",o.appendChild(Y),C=new lat(Y);const ne=C.viewModel;b.add(ne.cameraClicked,Oi.prototype._onInfoBoxCameraClicked,this),b.add(ne.closeClicked,Oi.prototype._onInfoBoxClockClicked,this)}const w=document.createElement("div");let v,I,P,N,R,B,F,S,D,L,M,U,z,G,W;if(w.className="cesium-viewer-toolbar",o.appendChild(w),!c(t.geocoder)||!1!==t.geocoder){const Y=document.createElement("div");let ne;Y.className="cesium-viewer-geocoderContainer",w.appendChild(Y),c(t.geocoder)&&"boolean"!=typeof t.geocoder&&(ne=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),v=new iat({container:Y,geocoderServices:ne,scene:p}),b.add(v.viewModel.search.beforeExecute,Oi.prototype._clearObjects,this)}if((!c(t.homeButton)||!1!==t.homeButton)&&(I=new rat(w,p),c(v)&&b.add(I.viewModel.command.afterExecute,function(){const Y=v.viewModel;Y.searchText="",Y.isSearchInProgress&&Y.search()}),b.add(I.viewModel.command.beforeExecute,Oi.prototype._clearTrackedObject,this)),!0===t.sceneModePicker&&a)throw new E("options.sceneModePicker is not available when options.scene3DOnly is set to true.");if(!a&&(!c(t.sceneModePicker)||!1!==t.sceneModePicker)&&(P=new Tat(w,p)),t.projectionPicker&&(N=new mat(w,p)),n){const Y=g(t.imageryProviderViewModels,function Fst(){const e=[],t=devicePixelRatio>=2;return e.push(new la({name:"Bing Maps Aerial",iconUrl:Jn("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return oI({style:iI.AERIAL})}})),e.push(new la({name:"Bing Maps Aerial with Labels",iconUrl:Jn("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return oI({style:iI.AERIAL_WITH_LABELS})}})),e.push(new la({name:"Bing Maps Roads",iconUrl:Jn("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return oI({style:iI.ROAD})}})),e.push(new la({name:"ArcGIS World Imagery",iconUrl:Jn("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 \nhttps://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9",category:"Other",creationFunction:function(){return Yv.fromBasemapType(hb.SATELLITE,{enablePickFeatures:!1})}})),e.push(new la({name:"ArcGIS World Hillshade",iconUrl:Jn("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 \nhttps://www.arcgis.com/home/item.html?id=1b243539f4514b6ba35e7d995890db1d",category:"Other",creationFunction:function(){return Yv.fromBasemapType(hb.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new la({name:"Esri World Ocean",iconUrl:Jn("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 \nhttps://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500",category:"Other",creationFunction:function(){return Yv.fromBasemapType(hb.OCEANS,{enablePickFeatures:!1})}})),e.push(new la({name:"Open\xadStreet\xadMap",iconUrl:Jn("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",category:"Other",creationFunction:function(){return new VE({url:"https://tile.openstreetmap.org/"})}})),e.push(new la({name:"Stadia x Stamen Watercolor",iconUrl:Jn("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.\nhttps://docs.stadiamaps.com/map-styles/stamen-watercolor/",category:"Other",creationFunction:function(){return new VE({url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/",fileExtension:"jpg",credit:'© <a href="https://stamen.com/" target="_blank">Stamen Design</a>\n © <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>\n © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>\n © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>'})}})),e.push(new la({name:"Stadia x Stamen Toner",iconUrl:Jn("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.\nhttps://docs.stadiamaps.com/map-styles/stamen-toner/",category:"Other",creationFunction:function(){return new VE({url:"https://tiles.stadiamaps.com/tiles/stamen_toner/",retinaTiles:t,credit:'© <a href="https://stamen.com/" target="_blank">Stamen Design</a>\n © <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>\n © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>\n © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>'})}})),e.push(new la({name:"Stadia Alidade Smooth",iconUrl:Jn("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.\nhttps://docs.stadiamaps.com/map-styles/alidade-smooth/",category:"Other",creationFunction:function(){return new VE({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth/",retinaTiles:t,credit:'© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>\n © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>\n © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>'})}})),e.push(new la({name:"Stadia Alidade Smooth Dark",iconUrl:Jn("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.\nhttps://docs.stadiamaps.com/map-styles/alidade-smooth-dark/",category:"Other",creationFunction:function(){return new VE({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/",retinaTiles:t,credit:'© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>\n © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>\n © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>'})}})),e.push(new la({name:"Sentinel-2",iconUrl:Jn("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 nI.fromAssetId(3954)}})),e.push(new la({name:"Blue Marble",iconUrl:Jn("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return nI.fromAssetId(3845)}})),e.push(new la({name:"Earth at night",iconUrl:Jn("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 nI.fromAssetId(3812)}})),e.push(new la({name:"Natural Earth\xa0II",iconUrl:Jn("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",category:"Cesium ion",creationFunction:function(){return eI.fromUrl(Jn("Assets/Textures/NaturalEarthII"))}})),e}()),ne=g(t.terrainProviderViewModels,function kst(){const e=[];return e.push(new la({name:"WGS84 Ellipsoid",iconUrl:Jn("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new Wf({ellipsoid:he.WGS84})}})),e.push(new la({name:"Cesium World Terrain",iconUrl:Jn("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 dre({requestWaterMask:!0,requestVertexNormals:!0})}})),e}());R=new Nst(w,{globe:p.globe,imageryProviderViewModels:Y,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:ne,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),B=w.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}if(c(t.baseLayer)&&!1!==t.baseLayer&&(n&&(R.viewModel.selectedImagery=void 0),p.imageryLayers.removeAll(),p.imageryLayers.add(t.baseLayer)),c(t.terrainProvider)&&(n&&(R.viewModel.selectedTerrain=void 0),p.terrainProvider=t.terrainProvider),c(t.terrain)){if(c(t.terrainProvider))throw new E("Specify either options.terrainProvider or options.terrain.");n&&(p.globe.depthTestAgainstTerrain=!0),p.setTerrain(t.terrain)}if(!c(t.navigationHelpButton)||!1!==t.navigationHelpButton){let Y=!0;try{if(c(window.localStorage)){const ne=window.localStorage.getItem("cesium-hasSeenNavHelp");c(ne)&&ne?Y=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}F=new dat({container:w,instructionsInitiallyVisible:g(t.navigationInstructionsInitiallyVisible,Y)})}if(!c(t.animation)||!1!==t.animation){const Y=document.createElement("div");Y.className="cesium-viewer-animationContainer",o.appendChild(Y),S=new Ast(Y,new Sst(u))}if(!c(t.timeline)||!1!==t.timeline){const Y=document.createElement("div");Y.className="cesium-viewer-timelineContainer",o.appendChild(Y),D=new Nat(Y,l),D.addEventListener("settime",wre,!1),D.zoomTo(l.startTime,l.stopTime)}if((!c(t.fullscreenButton)||!1!==t.fullscreenButton)&&(U=document.createElement("div"),U.className="cesium-viewer-fullscreenContainer",o.appendChild(U),L=new jst(U,t.fullscreenElement),M=Su(L.viewModel,"isFullscreenEnabled",function(Y){U.style.display=Y?"block":"none",c(D)&&(D.container.style.right=`${U.clientWidth}px`,D.resize())})),t.vrButton){const Y=document.createElement("div");Y.className="cesium-viewer-vrContainer",o.appendChild(Y),z=new Vat(Y,p,t.fullScreenElement),G=Su(z.viewModel,"isVREnabled",function(ne){Y.style.display=ne?"block":"none",c(L)&&(Y.style.right=`${U.clientWidth}px`),c(D)&&(D.container.style.right=`${Y.clientWidth}px`,D.resize())}),W=Su(z.viewModel,"isVRMode",function(ne){!function Yat(e,t){const n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,l=e._timeline,u=e._fullscreenButton,d=e._infoBox,h=e._selectionIndicator,m=t?"hidden":"visible";if(c(n)&&(n.container.style.visibility=m),c(i)&&(i.container.style.visibility=m),c(o)&&(o.container.style.visibility=m),c(r)&&(r.container.style.visibility=m),c(s)&&(s.container.style.visibility=m),c(a)&&(a.container.style.visibility=m),c(l)&&(l.container.style.visibility=m),c(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=m),c(d)&&(d.container.style.visibility=m),c(h)&&(h.container.style.visibility=m),e._container){const _=t||!c(u)?0:u.container.clientWidth;e._vrButton.container.style.right=`${_}px`,e.forceResize()}}(i,ne)})}this._baseLayerPickerDropDown=B,this._fullscreenSubscription=M,this._vrSubscription=G,this._vrModeSubscription=W,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=g(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=s,this._element=o,this._cesiumWidget=h,this._selectionIndicator=x,this._infoBox=C,this._dataSourceCollection=m,this._destroyDataSourceCollection=_,this._dataSourceDisplay=y,this._clockViewModel=u,this._destroyClockViewModel=d,this._toolbar=w,this._homeButton=I,this._sceneModePicker=P,this._projectionPicker=N,this._baseLayerPicker=R,this._navigationHelpButton=F,this._animation=S,this._timeline=D,this._fullscreenButton=L,this._vrButton=z,this._geocoder=v,this._eventHelper=b,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=c(C)||c(x),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 Ye,this._trackedEntityChanged=new Ye,vt.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),b.add(m.dataSourceAdded,Oi.prototype._onDataSourceAdded,this),b.add(m.dataSourceRemoved,Oi.prototype._onDataSourceRemoved,this),b.add(p.postUpdate,Oi.prototype.resize,this),b.add(p.postRender,Oi.prototype._postRender,this);const q=m.length;for(let Y=0;Y<q;Y++)this._dataSourceAdded(m,m.get(Y));this._dataSourceAdded(void 0,y.defaultDataSource),b.add(m.dataSourceAdded,Oi.prototype._dataSourceAdded,this),b.add(m.dataSourceRemoved,Oi.prototype._dataSourceRemoved,this),h.screenSpaceEventHandler.setInputAction(function Q(Y){i.selectedEntity=Sre(i,Y)},bi.LEFT_CLICK),h.screenSpaceEventHandler.setInputAction(function j(Y){const ne=Sre(i,Y);c(ne)?te.getValueOrUndefined(ne.position,i.clock.currentTime)?i.trackedEntity=ne:i.zoomTo(ne):c(i.trackedEntity)&&(i.trackedEntity=void 0)},bi.LEFT_DOUBLE_CLICK)}function Dre(e,t,n,i){if(!c(t))throw new E("zoomTarget is required.");hz(e);const 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 Lc){let s;return s=c(r.imageryProvider)?Promise.resolve(r.getImageryRectangle()):new Promise(a=>{const l=r.readyEvent.addEventListener(()=>{l(),a(r.getImageryRectangle())})}),void s.then(function(a){return koe(a,e.scene)}).then(function(a){e._zoomPromise===o&&(e._zoomTarget=a)})}if(r instanceof _g||r instanceof Xoe||r instanceof Vk)return void(e._zoomTarget=r);if(r.isLoading&&c(r.loadingEvent)){const s=r.loadingEvent.addEventListener(function(){s(),e._zoomPromise===o&&(e._zoomTarget=r.entities.values.slice(0))});return}if(Array.isArray(r))return void(e._zoomTarget=r.slice(0));r=g(r.values,r),c(r.entities)&&(r=r.entities.values),e._zoomTarget=Array.isArray(r)?r.slice(0):[r]}}),e.scene.requestRender(),o}function jE(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function hz(e){c(e._zoomPromise)&&(jE(e),e._completeZoom(!1))}Object.defineProperties(Oi.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,hz(this);const t=this.scene,n=t.mode;c(e)&&c(e.position)?this._needTrackedEntityUpdate=!0:(this._needTrackedEntityUpdate=!1,(n===ce.COLUMBUS_VIEW||n===ce.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===ce.COLUMBUS_VIEW||n===ce.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(k.IDENTITY)),this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;const t=c(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;c(e)?c(t)&&t.animateAppear():c(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,vre(this._timeline,this.clock,e))}}}),Oi.prototype.extend=function(e,t){if(!c(e))throw new E("mixin is required.");e(this,t)},Oi.prototype.resize=function(){const e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=c(this._animation),r=c(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;const s=i-125,a=this._baseLayerPickerDropDown;c(a)&&(a.style.maxHeight=`${s}px`),c(this._geocoder)&&(this._geocoder.searchSuggestionsContainer.style.maxHeight=`${s}px`),c(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);const l=this._timeline;let u,d=0,h=5,m=3,_=0;if(o&&"hidden"!==window.getComputedStyle(this._animation.container).visibility){const p=this._lastWidth;u=this._animation.container,n>900?(d=169,p<=900&&(u.style.width="169px",u.style.height="112px",this._animation.resize())):n>=600?(d=136,(p<600||p>900)&&(u.style.width="136px",u.style.height="90px",this._animation.resize())):(d=106,(p>600||0===p)&&(u.style.width="106px",u.style.height="70px",this._animation.resize())),h=d+5}if(r&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){const p=this._fullscreenButton,y=this._vrButton,b=l.container,x=b.style;m=b.clientHeight+3,x.left=`${d}px`;let C=0;c(p)&&(C+=p.container.clientWidth),c(y)&&(C+=y.container.clientWidth),x.right=`${C}px`,l.resize()}!r&&c(this._fullscreenButton)&&(_=this._fullscreenButton.container.clientWidth),this._bottomContainer.style.left=`${h}px`,this._bottomContainer.style.bottom=`${m}px`,this._bottomContainer.style.right=`${_}px`,this._lastWidth=n,this._lastHeight=i},Oi.prototype.forceResize=function(){this._lastWidth=0,this.resize()},Oi.prototype.render=function(){this._cesiumWidget.render()},Oi.prototype.isDestroyed=function(){return!1},Oi.prototype.destroy=function(){let e;c(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(bi.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(bi.LEFT_DOUBLE_CLICK));const 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(),c(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),c(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),c(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),c(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),c(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),c(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),c(this._timeline)&&(this._timeline.removeEventListener("settime",wre,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),c(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),c(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),c(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),c(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()),Xe(this)},Oi.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Oi.prototype._onEntityCollectionChanged,this)},Oi.prototype._dataSourceRemoved=function(e,t){const n=t.entities;n.collectionChanged.removeEventListener(Oi.prototype._onEntityCollectionChanged,this),c(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),c(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)},Oi.prototype._onTick=function(e){const t=e.currentTime,n=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=n);const i=this._entityView;c(i)&&this._dataSourceDisplay.getBoundingSphere(this._trackedEntity,!1,Qm)===en.DONE&&i.update(t,Qm);let o,r=!1;const s=this.selectedEntity,a=c(s)&&this._enableInfoOrSelection;a&&s.isShowing&&s.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(s,!0,Qm)!==en.FAILED?o=Qm.center:c(s.position)&&(o=s.position.getValue(t,o)),r=c(o));const l=c(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;c(l)&&(l.position=f.clone(o,l.position),l.showSelection=a&&r,l.update());const u=c(this._infoBox)?this._infoBox.viewModel:void 0;c(u)&&(u.showInfo=a,u.enableCamera=r,u.isCameraTracking=this.trackedEntity===this.selectedEntity,a?(u.titleText=g(s.name,s.id),u.description=te.getValueOrDefault(s.description,t,"")):(u.titleText="",u.description=""))},Oi.prototype._onEntityCollectionChanged=function(e,t,n){const i=n.length;for(let o=0;o<i;o++){const r=n[o];this.trackedEntity===r&&(this.trackedEntity=void 0),this.selectedEntity===r&&(this.selectedEntity=void 0)}},Oi.prototype._onInfoBoxCameraClicked=function(e){e.isCameraTracking&&this.trackedEntity===this.selectedEntity?this.trackedEntity=void 0:c(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)},Oi.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},Oi.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},Oi.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},Oi.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&vre(this.timeline,this.clock,e)},Oi.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);const n=t.entities.id,i=this._eventHelper.add(t.changedEvent,Oi.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i},Oi.prototype._onDataSourceRemoved=function(e,t){const n=this.clockTrackedDataSource===t,i=t.entities.id;if(this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0,n){const o=e.length;this.clockTrackedDataSource=this._automaticallyTrackDataSourceClocks&&o>0?e.get(o-1):void 0}},Oi.prototype.zoomTo=function(e,t){return Dre(this,e,{offset:t},!1)},Oi.prototype.flyTo=function(e,t){return Dre(this,e,t,!0)},Oi.prototype._postRender=function(){(function Xat(e){const t=e._zoomTarget;if(!c(t)||e.scene.mode===ce.MORPHING)return;const n=e.scene,i=n.camera,o=g(e._zoomOptions,{});let r;function s(d){c(o.offset)||(o.offset=new gC(0,-.5,d.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(d,o.offset),i.lookAtTransform(k.IDENTITY),e._completeZoom(!0)),jE(e)}if(t instanceof Xoe){if(c(t.boundingSphere))return void s(t.boundingSphere);const d=t.frameChanged.addEventListener(function(h){s(h.boundingSphere),d()});return}if(t instanceof _g||t instanceof Vk)return void s(t.boundingSphere);if(t instanceof Ce)return 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)),void jE(e);const a=t,l=[];for(let d=0,h=a.length;d<h;d++){const m=e._dataSourceDisplay.getBoundingSphere(a[d],!1,Qm);if(m===en.PENDING)return;m!==en.FAILED&&l.push(Ae.clone(Qm))}if(0===l.length)return void hz(e);e.trackedEntity=void 0;const u=Ae.fromBoundingSpheres(l);e._zoomIsFlight?(jE(e),i.flyToBoundingSphere(u,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:o.offset})):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(k.IDENTITY),jE(e),e._completeZoom(!0))})(this),function Zat(e){if(!e._needTrackedEntityUpdate)return;const t=e._trackedEntity,n=e.clock.currentTime,i=te.getValueOrUndefined(t.position,n);if(!c(i))return;const o=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,Qm);if(r===en.PENDING)return;const s=o.mode;(s===ce.COLUMBUS_VIEW||s===ce.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(s===ce.COLUMBUS_VIEW||s===ce.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);const a=r!==en.FAILED?Qm:void 0;e._entityView=new ist(t,o,o.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}(this)};const $at=Oi;var qe=wt(3714);let mP=(()=>{class e{constructor(){this.baseLayerImageryGroup=new Map,this.standardLayerImageryGroup=new Map,this.overlayLayerImageryGroup=new Map,this.baseLayerDataSourceGroup=new Map,this.standardLayerDataSourceGroup=new Map,this.overlayLayerDataSourceGroup=new Map,this.dataSourceOpacity=new Map,this.terrainLayerGroup=new Map,this.tilesetLayerGroup=new Map,this.cesiumCurrentTime=re.now(),this.cesiumTimeInterval=new Jc,this.viewerOptions={timeline:!1,animation:!1,sceneModePicker:!1,homeButton:!1,baseLayerPicker:!1,geocoder:!1,navigationHelpButton:!1,navigationInstructionsInitiallyVisible:!1,fullscreenButton:!1,scene3DOnly:!0,skyAtmosphere:!1,infoBox:!1,selectionIndicator:!1,baseLayer:!1},this.EPSG="EPSG:3857"}setControls(n){typeof n.ionAccessToken<"u"&&this.addIonAccessToken(n.ionAccessToken),typeof n.GoogleMapsApiKey<"u"&&this.addGoogleMapsApiKey(n.GoogleMapsApiKey),typeof n.timeline<"u"&&(this.viewerOptions.timeline=n.timeline),typeof n.animation<"u"&&(this.viewerOptions.animation=n.animation),typeof n.sceneModePicker<"u"&&(this.viewerOptions.sceneModePicker=n.sceneModePicker),typeof n.homeButton<"u"&&(this.viewerOptions.homeButton=n.homeButton),typeof n.baseLayerPicker<"u"&&(this.viewerOptions.baseLayerPicker=n.baseLayerPicker),typeof n.navigationHelpButton<"u"&&(this.viewerOptions.navigationHelpButton=n.navigationHelpButton),typeof n.navigationInstructionsInitiallyVisible<"u"&&(this.viewerOptions.navigationInstructionsInitiallyVisible=n.navigationInstructionsInitiallyVisible),typeof n.fullscreenButton<"u"&&(this.viewerOptions.fullscreenButton=n.fullscreenButton),typeof n.scene3DOnly<"u"&&(this.viewerOptions.scene3DOnly=n.scene3DOnly),typeof n.infoBox<"u"&&(this.viewerOptions.infoBox=n.infoBox),typeof n.selectionIndicator<"u"&&(this.viewerOptions.selectionIndicator=n.selectionIndicator)}createMap(n){this.viewer=new $at(n,this.viewerOptions),this.viewer.imageryLayers.removeAll();const i=this.viewer.scene;i.fog.enabled=!1,i.globe.showGroundAtmosphere=!1,this.viewer.clock.currentTime=this.cesiumCurrentTime,this.viewer.infoBox.container.getElementsByTagName("iframe")[0].remove();const o=document.createElement("div");return o.className="cesium-infoBox-content",o.id="cesiumInfoBoxContent",this.viewer.infoBox.container.children[0].append(o),this.viewer.scene.primitives.destroyPrimitives=!1,{viewer:this.viewer}}setZoom(n,i){const r=55908226/Math.pow(2,n-=this.viewer.canvas.width/1e3),s=this.viewer.camera.positionCartographic;this.viewer.camera.setView({destination:f.fromRadians(s.longitude,s.latitude,r)})}getZoom(){let n;return this.viewer?(n=Math.round(Math.log10(55908226/this.viewer.camera.positionCartographic.height)/.3),n<0&&(n=0)):n=2,n+=this.viewer.canvas.width/1e3,n}setCenter(n){this.viewer.camera.setView({destination:f.fromDegrees(n.lon,n.lat,this.viewer.camera.positionCartographic.height)})}getCenter(){const n=this.viewer.camera.positionCartographic;return{lat:n.latitude*(180/Math.PI),lon:n.longitude*(180/Math.PI)}}setExtent(n,i,o){const r=Te.fromDegrees(n[0],n[1],n[2],n[3]);this.viewer.camera.setView({destination:r})}getCurrentExtent(n){let i;const o=this.viewer.camera.computeViewRectangle();return o&&(i=[o.west*(180/Math.PI),o.south*(180/Math.PI),o.east*(180/Math.PI),o.north*(180/Math.PI)]),i}setViewAngle(n,i){const o=Object.assign({destination:this.viewer.camera.position,orientation:{heading:this.viewer.camera.heading,pitch:O.toRadians(n-90),roll:this.viewer.camera.roll}},i||{});this.viewer.camera.flyTo(o)}setNadirViewAngle(n){0!==this.getViewAngle()?n?this.setViewAngle(0,n):this.setViewAngle(0):n.complete&&"function"==typeof n.complete&&n.complete()}getViewAngle(){return O.toDegrees(this.viewer.camera.pitch)+90}setRotation(n,i){const o=Object.assign({destination:this.viewer.camera.position,orientation:{heading:O.toRadians(360-n),pitch:this.viewer.camera.pitch,roll:this.viewer.camera.roll}},i||{});this.viewer.camera.flyTo(o)}getRotation(){return 360-O.toDegrees(this.viewer.camera.heading)}getAll2DLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?o=this.baseLayerImageryGroup.size+this.baseLayerDataSourceGroup.size:"layers"===i?o=this.standardLayerImageryGroup.size+this.standardLayerDataSourceGroup.size:"overlays"===i&&(o=this.overlayLayerImageryGroup.size+this.overlayLayerDataSourceGroup.size),o}get2DImageryLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?o=this.baseLayerImageryGroup.size:"layers"===i?o=this.standardLayerImageryGroup.size:"overlays"===i&&(o=this.overlayLayerImageryGroup.size),o}getDataSourceLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?o=this.baseLayerDataSourceGroup.size:"layers"===i?o=this.standardLayerDataSourceGroup.size:"overlays"===i&&(o=this.overlayLayerDataSourceGroup.size),o}getVisible2DLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?(this.baseLayerImageryGroup.forEach(r=>{r.show&&o++}),this.baseLayerDataSourceGroup.forEach(r=>{r.show&&o++})):"layers"===i?(this.standardLayerImageryGroup.forEach(r=>{r.show&&o++}),this.standardLayerDataSourceGroup.forEach(r=>{r.show&&o++})):"overlays"===i&&(this.overlayLayerImageryGroup.forEach(r=>{r.show&&o++}),this.overlayLayerDataSourceGroup.forEach(r=>{r.show&&o++})),o}get3DLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?o=this.terrainLayerGroup.size:"layers"===i&&(o=this.tilesetLayerGroup.size),o}getVisible3DLayersSize(n){const i=n.toLowerCase();let o=0;return"baselayers"===i?this.terrainLayerGroup.forEach(r=>{r&&o++}):"layers"===i&&this.tilesetLayerGroup.forEach(r=>{r.show&&o++}),o}set2DUkisLayers(n,i){const o=i.toLowerCase(),r=[];this.remove2DLayers(o),n.forEach(s=>{const a=s.type;if("geojson"===a||"kml"===a){const l=this.create_dataSource_layer(s);typeof l<"u"&&("baselayers"===o?this.baseLayerDataSourceGroup.set(s.id,l):"layers"===o?this.standardLayerDataSourceGroup.set(s.id,l):"overlays"===o&&this.overlayLayerDataSourceGroup.set(s.id,l),this.viewer.dataSources.add(l))}else{const l=this.create_2D_layer(s);if(typeof l<"u"){r.push(l);let u=n.indexOf(s);u>this.viewer.imageryLayers.length&&(u=this.viewer.imageryLayers.length),"baselayers"===o?this.baseLayerImageryGroup.set(s.id,l):"layers"===o?(u+=this.get2DImageryLayersSize("baselayers"),this.standardLayerImageryGroup.set(s.id,l)):"overlays"===o&&(u+=this.get2DImageryLayersSize("baselayers")+this.get2DImageryLayersSize("layers"),this.overlayLayerImageryGroup.set(s.id,l)),this.viewer.imageryLayers.add(l,u)}}})}set3DUkisLayers(n,i){const o=i.toLowerCase();this.remove3DLayers(o),n.forEach(r=>{this.create_3D_layer(r)})}create_2D_layer(n){let i;switch(n.type){case xt.Aq:i=this.create_xyz_layer(n);break;case xt.MR:i=this.create_wms_layer(n);break;case xt.$6:i=this.create_wmts_layer(n);break;case xt.CY:if(n instanceof xt.YY){i=this.create_xyz_layer(n);break}if(n instanceof xt.DJ){i=this.create_tms_layer(n);break}console.log("Not supportet layer type: "+n.type+" layer: "+n.name);break;default:console.log("Not supportet layer type: "+n.type+" layer: "+n.name)}return i}create_3D_layer(n){n.custom_layer instanceof dA||n.custom_layer instanceof Wf?this.setTerrain(n):n.custom_layer instanceof _g||n.custom_layer instanceof cb?this.create_3Dtileset_layer(n):console.log("Not supportet layer type: "+n.name)}create_xyz_layer(n){let i=20,o=!1;return n.maxZoom&&(i=n.maxZoom),n.popup&&(o=!0),new Lc(new om({url:n.url,subdomains:n.subdomains,credit:n.attribution,maximumLevel:i,enablePickFeatures:o}),{show:n.visible,alpha:n.opacity})}create_wms_layer(n){let i="image/png",o=20;n.maxZoom&&(o=n.maxZoom),n.params.FORMAT&&(i=n.params.FORMAT);let r={};return n.bbox&&(r.rectangle=Te.fromDegrees(n.bbox[0],n.bbox[1],n.bbox[2],n.bbox[3])),r={url:n.url,credit:n.attribution,layers:n.params.LAYERS,parameters:{transparent:n.params.TRANSPARENT,format:i,tiled:n.params.TILED},maximumLevel:o,srs:this.EPSG,tilingScheme:new Md},n.params.TIME&&(r.clock=this.viewer.clock,r.times=this.cesiumTimeInterval),r.enablePickFeatures=!!n.popup,new Lc(new Iq(r),{show:n.visible,alpha:n.opacity})}create_wmts_layer(n){const o=n.params.matrixSetOptions;let r={};return r=o.matrixIds?{url:n.url,credit:n.attribution,layer:n.params.layer,style:n.params.style,format:n.params.format,tileMatrixSetID:o.matrixSet,tileMatrixLabels:o.matrixIds,maximumLevel:o.matrixIds.length-1}:{url:n.url,credit:n.attribution,layer:n.params.layer,style:n.params.style,format:n.params.format,tileMatrixSetID:this.EPSG,tileMatrixLabels:Array(17).fill(null).map((a,l)=>this.EPSG+":"+l),maximumLevel:16},n.bbox&&(r.rectangle=Te.fromDegrees(n.bbox[0],n.bbox[1],n.bbox[2],n.bbox[3])),new Lc(new Pq(r),{show:n.visible,alpha:n.opacity})}create_tms_layer(n){const i={url:n.url,fileExtension:"png",maximumLevel:n.maxZoom,minimumLevel:n.minZoom};n.attribution&&(i.credit=new Yn(n.attribution));const o=new eI(i);return new Lc(o,{show:n.visible,alpha:n.opacity})}create_dataSource_layer(n){let i;return"geojson"===n.type?i=this.create_geojson_layer(n):"kml"===n.type&&(i=this.create_kml_layer(n)),i}create_geojson_layer(n){const i=new OY;let o=Z.fromCssColorString("#FFFFFF99"),r=Z.fromCssColorString("#3399CC"),s=1,a=!1;if(n.options&&n.options.style){const u=n.options.style(n.data)[0];u&&(o=Z.fromCssColorString(u.fill_.color_)||o,r=Z.fromCssColorString(u.stroke_.color_)||r,s=u.stroke_.width_||s),n.options.clampToGround&&(a=n.options.clampToGround)}const l={fill:o.withAlpha(n.opacity*o.alpha),stroke:r.withAlpha(n.opacity*r.alpha),strokeWidth:s,clampToGround:a};return n.attribution&&(l.credit=new Yn(n.attribution)),i.load(n.data,l),i.show=n.visible,i.name=n.name,this.dataSourceOpacity.set(n.id,n.opacity),i}create_kml_layer(n){const i=new R4e,o={};return n.attribution&&(o.credit=new Yn(n.attribution)),i.load(n.data,o),i.show=n.visible,i.name=n.id,i}getLayerById(n,i){const o=i.toLowerCase();let r;return"baselayers"===o?this.baseLayerImageryGroup.has(n)?r=this.baseLayerImageryGroup.get(n):this.baseLayerDataSourceGroup.has(n)&&(r=this.baseLayerDataSourceGroup.get(n)):"layers"===o?this.standardLayerImageryGroup.has(n)?r=this.standardLayerImageryGroup.get(n):this.standardLayerDataSourceGroup.has(n)&&(r=this.standardLayerDataSourceGroup.get(n)):"overlays"===o&&(this.overlayLayerImageryGroup.has(n)?r=this.overlayLayerImageryGroup.get(n):this.overlayLayerDataSourceGroup.has(n)&&(r=this.overlayLayerDataSourceGroup.get(n))),r}removeAll2DLayers(){let n=Array.from(this.baseLayerImageryGroup.keys());this.remove2DLayer(n,"baselayers"),n=Array.from(this.standardLayerImageryGroup.keys()),this.remove2DLayer(n,"layers"),n=Array.from(this.overlayLayerImageryGroup.keys()),this.remove2DLayer(n,"overlays"),n=Array.from(this.baseLayerDataSourceGroup.keys()),this.remove2DLayer(n,"baselayers"),n=Array.from(this.standardLayerDataSourceGroup.keys()),this.remove2DLayer(n,"layers"),n=Array.from(this.overlayLayerDataSourceGroup.keys()),this.remove2DLayer(n,"overlays")}remove2DLayers(n){const i=n.toLowerCase();if("baselayers"===i){let o=Array.from(this.baseLayerImageryGroup.keys());this.remove2DLayer(o,"baselayers"),o=Array.from(this.baseLayerDataSourceGroup.keys()),this.remove2DLayer(o,"baselayers")}else if("layers"===i){let o=Array.from(this.standardLayerImageryGroup.keys());this.remove2DLayer(o,"layers"),o=Array.from(this.standardLayerDataSourceGroup.keys()),this.remove2DLayer(o,"layers")}else if("overlays"===i){let o=Array.from(this.overlayLayerImageryGroup.keys());this.remove2DLayer(o,"overlays"),o=Array.from(this.overlayLayerDataSourceGroup.keys()),this.remove2DLayer(o,"overlays")}}remove2DLayer(n,i){const o=i.toLowerCase();"baselayers"===o?n.forEach(r=>{this.baseLayerImageryGroup.has(r)?(this.viewer.imageryLayers.remove(this.baseLayerImageryGroup.get(r)),this.baseLayerImageryGroup.delete(r)):this.baseLayerDataSourceGroup.has(r)&&(this.viewer.dataSources.remove(this.baseLayerDataSourceGroup.get(r)),this.baseLayerDataSourceGroup.delete(r),this.dataSourceOpacity.has(r)&&this.dataSourceOpacity.delete(r))}):"layers"===o?n.forEach(r=>{this.standardLayerImageryGroup.has(r)?(this.viewer.imageryLayers.remove(this.standardLayerImageryGroup.get(r)),this.standardLayerImageryGroup.delete(r)):this.standardLayerDataSourceGroup.has(r)&&(this.viewer.dataSources.remove(this.standardLayerDataSourceGroup.get(r)),this.standardLayerDataSourceGroup.delete(r),this.dataSourceOpacity.has(r)&&this.dataSourceOpacity.delete(r))}):"overlays"===o&&n.forEach(r=>{this.overlayLayerImageryGroup.has(r)?(this.viewer.imageryLayers.remove(this.overlayLayerImageryGroup.get(r)),this.overlayLayerImageryGroup.delete(r)):this.overlayLayerDataSourceGroup.has(r)&&(this.viewer.dataSources.remove(this.overlayLayerDataSourceGroup.get(r)),this.overlayLayerDataSourceGroup.delete(r),this.dataSourceOpacity.has(r)&&this.dataSourceOpacity.delete(r))})}removeAll3DLayers(){let n=Array.from(this.terrainLayerGroup.keys());this.remove3DLayer(n,"baselayers"),n=Array.from(this.tilesetLayerGroup.keys()),this.remove3DLayer(n,"layers")}remove3DLayers(n){const i=n.toLowerCase();if("baselayers"===i){const o=Array.from(this.terrainLayerGroup.keys());this.remove3DLayer(o,"baselayers")}else if("layers"===i){const o=Array.from(this.tilesetLayerGroup.keys());this.remove3DLayer(o,"layers"),this.tilesetLayerGroup.clear()}}remove3DLayer(n,i){const o=i.toLowerCase();"baselayers"===o?n.forEach(r=>{this.terrainLayerGroup.has(r)&&(this.removeTerrain(),this.terrainLayerGroup.delete(r))}):"layers"===o&&n.forEach(r=>{this.tilesetLayerGroup.has(r)&&(this.viewer.scene.primitives.remove(this.tilesetLayerGroup.get(r)),this.tilesetLayerGroup.delete(r))})}update2DLayerOpacity(n,i){const o=i.toLowerCase();if("baselayers"===o){for(const r of n)if(this.baseLayerImageryGroup.has(r.id)){const s=this.baseLayerImageryGroup.get(r.id);s&&s.alpha!==r.opacity&&(s.alpha=r.opacity)}else if(this.baseLayerDataSourceGroup.has(r.id)&&this.dataSourceOpacity.get(r.id)!=r.opacity){const s=this.baseLayerDataSourceGroup.get(r.id);this.viewer.dataSources.remove(s);const a=this.create_dataSource_layer(r);this.viewer.dataSources.add(a),this.baseLayerDataSourceGroup.set(r.id,a),this.dataSourceOpacity.set(r.id,r.opacity)}}else if("layers"===o){for(const r of n)if(this.standardLayerImageryGroup.has(r.id)){const s=this.standardLayerImageryGroup.get(r.id);s&&s.alpha!==r.opacity&&(s.alpha=r.opacity)}else if(this.standardLayerDataSourceGroup.has(r.id)&&this.dataSourceOpacity.get(r.id)!=r.opacity){const s=this.standardLayerDataSourceGroup.get(r.id);this.viewer.dataSources.remove(s);const a=this.create_dataSource_layer(r);this.viewer.dataSources.add(a),this.standardLayerDataSourceGroup.set(r.id,a),this.dataSourceOpacity.set(r.id,r.opacity)}}else if("overlays"===o)for(const r of n)if(this.overlayLayerImageryGroup.has(r.id)){const s=this.overlayLayerImageryGroup.get(r.id);s&&s.alpha!==r.opacity&&(s.alpha=r.opacity)}else if(this.overlayLayerDataSourceGroup.has(r.id)&&this.dataSourceOpacity.get(r.id)!=r.opacity){const s=this.overlayLayerDataSourceGroup.get(r.id);this.viewer.dataSources.remove(s);const a=this.create_dataSource_layer(r);this.viewer.dataSources.add(a),this.overlayLayerDataSourceGroup.set(r.id,a),this.dataSourceOpacity.set(r.id,r.opacity)}}update2DLayerVisibility(n,i){const o=i.toLowerCase();for(const r of n)if("geojson"===r.type||"kml"===r.type){if("baselayers"===o){const s=this.baseLayerDataSourceGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}else if("layers"===o){const s=this.standardLayerDataSourceGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}else if("overlays"===o){const s=this.overlayLayerDataSourceGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}}else if("baselayers"===o){if(this.baseLayerImageryGroup.has(r.id)){const s=this.baseLayerImageryGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}}else if("layers"===o){if(this.standardLayerImageryGroup.has(r.id)){const s=this.standardLayerImageryGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}}else if("overlays"===o&&this.overlayLayerImageryGroup.has(r.id)){const s=this.overlayLayerImageryGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}}update2DLayerZIndex(n,i){const o=i.toLowerCase(),r=this.viewer.imageryLayers;if("baselayers"===o){for(const s of n)if(this.baseLayerImageryGroup.has(s.id)){const a=this.baseLayerImageryGroup.get(s.id);if(a){const l=r.indexOf(a),u=n.indexOf(s);if(l!==u){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)r.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)r.lower(a)}}}}else if("layers"===o){for(const s of n)if(this.standardLayerImageryGroup.has(s.id)){const a=this.standardLayerImageryGroup.get(s.id);if(a){const l=r.indexOf(a),u=n.indexOf(s)+this.get2DImageryLayersSize("baselayers");if(l!==u){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)r.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)r.lower(a)}}}}else if("overlays"===o)for(const s of n)if(this.overlayLayerImageryGroup.has(s.id)){const a=this.overlayLayerImageryGroup.get(s.id);if(a){const l=r.indexOf(a),u=n.indexOf(s)+this.get2DImageryLayersSize("baselayers")+this.get2DImageryLayersSize("layers");if(l!==u){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)r.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)r.lower(a)}}}}updateDataSourceZIndex(n,i){const o=this.viewer.dataSources;if(o.length>1){const r=i.toLowerCase();if("baselayers"===r){for(const s of n)if(this.baseLayerDataSourceGroup.has(s.id)){const a=this.baseLayerDataSourceGroup.get(s.id);if(a){const l=o.indexOf(a),u=n.indexOf(s);if(l!==u&&l>=0){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)o.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)o.lower(a)}}}}else if("layers"===r){for(const s of n)if(this.standardLayerDataSourceGroup.has(s.id)){const a=this.standardLayerDataSourceGroup.get(s.id);if(a){const l=o.indexOf(a),u=n.indexOf(s)+this.getDataSourceLayersSize("baselayers");if(l!==u&&l>=0){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)o.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)o.lower(a)}}}}else if("overlays"===r)for(const s of n)if(this.overlayLayerDataSourceGroup.has(s.id)){const a=this.overlayLayerDataSourceGroup.get(s.id);if(a){const l=o.indexOf(a),u=n.indexOf(s)+this.getDataSourceLayersSize("baselayers")+this.getDataSourceLayersSize("layers");if(l!==u&&l>=0){const d=l-u;if(d<0)for(let h=0;h<Math.abs(d);h++)o.raise(a);else if(d>0)for(let h=0;h<Math.abs(d);h++)o.lower(a)}}}}}setTerrain(n){n.visible&&(this.viewer.terrainProvider=n.custom_layer),this.terrainLayerGroup.set(n.id,n.visible)}setDefaultTerrain(){this.viewer.terrainProvider=new Wf}removeTerrain(){this.viewer.terrainProvider=new Wf({})}create_3Dtileset_layer(n){try{const i=this.viewer.scene.primitives.add(n.custom_layer);null==i.style&&(i.style=new v$({show:"true",color:"color('lightgrey',"+n.opacity+")"})),i.credit=new Yn(n.attribution),this.tilesetLayerGroup.set(n.id,i)}catch(i){console.log(`There was an error creating the 3D Data Provider: ${i}`)}}dataCallback(n,i){let o;return o=re.toIso8601(0===i?n.stop:n.start),{Time:o}}update3DLayerVisibility(n,i){const o=i.toLowerCase();for(const r of n)if("baselayers"===o){const s=r;(s.custom_layer instanceof dA||s.custom_layer instanceof Wf)&&r.visible&&(this.removeTerrain(),this.setTerrain(s))}else if("layers"===o&&this.tilesetLayerGroup.has(r.id)){const s=this.tilesetLayerGroup.get(r.id);s&&s.show!==r.visible&&(s.show=r.visible)}}update3DLayerOpacity(n,i){const o=i.toLowerCase();for(const r of n)if("baselayers"!==o&&"layers"===o&&r.custom_layer instanceof _g&&this.tilesetLayerGroup.has(r.id)){const a=this.tilesetLayerGroup.get(r.id);a&&(a.style=new v$({show:"true",color:"color('lightgrey',"+r.opacity+")"}))}}initTime(n){this.cesiumCurrentTime=re.fromIso8601(n)}updateTime(n){const i=re.fromIso8601(n);re.equals(i,this.cesiumCurrentTime)||(this.cesiumCurrentTime=i,this.viewer.clock.currentTime=i)}setTimeInterval(n){this.cesiumTimeInterval=Jc.fromIso8601DateArray({iso8601Dates:n,leadingInterval:!0,trailingInterval:!0,isStopIncluded:!1,dataCallback:this.dataCallback})}addIonAccessToken(n){A_.defaultAccessToken=n}addGoogleMapsApiKey(n){}destroyLayerGrpoups(){this.baseLayerImageryGroup.clear(),this.standardLayerImageryGroup.clear(),this.overlayLayerImageryGroup.clear(),this.baseLayerDataSourceGroup.clear(),this.standardLayerDataSourceGroup.clear(),this.overlayLayerDataSourceGroup.clear(),this.dataSourceOpacity.clear(),this.terrainLayerGroup.clear(),this.tilesetLayerGroup.clear()}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=qe.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Qat=wt(5992),Jat=wt(6021);const ect=["cesiumMapDiv"],tct=["cesiumCreditDiv"];let nct=(()=>{class e{constructor(n){this.mapSvc=n,this.subs=[],this.mapCreated=new Qat.x,this.initState=!0}ngOnInit(){this.twoDlayersSvc||console.error("provide a LayersService as Input to ukis-map-cesium"),this.mapStateSvc||console.error("provide a MapStateService as Input to ukis-map-cesium"),this.mapSvc.removeAll2DLayers(),this.startTime&&this.mapSvc.initTime(this.startTime)}ngAfterViewInit(){this.initMap(),this.subscribeToLayers();const n=this.mapStateSvc.getMapState().getValue();this.setMapState(n),this.mapSvc.setViewAngle(n.viewAngle),this.mapSvc.setRotation(n.rotation),this.subscribeToMapEvents(),this.subscribeToMapState()}ngOnDestroy(){const n=this.calcMapStateFromCamera("user");this.mapStateSvc.setMapState(n),this.subs.forEach(i=>i.unsubscribe()),this.viewer?.scene?.primitives&&(this.viewer.imageryLayers.removeAll(),this.viewer.dataSources.removeAll(),this.viewer.scene.primitives.removeAll(),this.viewer.scene.primitives.destroy()),this.mapSvc.destroyLayerGrpoups()}initMap(){this.timeInterval&&this.mapSvc.setTimeInterval(this.timeInterval),this.mapSvc.setControls(this.controls);const n=this.mapSvc.createMap(this.mapDivView.nativeElement);this.viewer=n.viewer,this.mapCreated.next(!0)}subscribeToLayers(){if(this.twoDlayersSvc){const n=this.twoDlayersSvc.getBaseLayers().subscribe(r=>this.addUpdateBaseLayers(r));this.subs.push(n);const i=this.twoDlayersSvc.getLayers().subscribe(r=>this.addUpdate2DLayers(r,"layers"));this.subs.push(i);const o=this.twoDlayersSvc.getOverlays().subscribe(r=>this.addUpdate2DLayers(r,"overlays"));this.subs.push(o)}if(this.threeDlayersSvc){const n=this.threeDlayersSvc.getBaseLayers().subscribe(o=>this.addUpdateTerrainLayers(o));this.subs.push(n);const i=this.threeDlayersSvc.getLayers().subscribe(o=>this.addUpdate3DLayers(o,"layers"));this.subs.push(i)}}subscribeToMapState(){if(this.mapStateSvc){const n=this.mapStateSvc.getMapState().pipe((0,Jat.T)(1)).subscribe(i=>this.setMapState(i));this.subs.push(n)}}setMapState(n){const i=this.mapStateSvc.getLastAction().getValue();"user"===n.options.notifier?"setExtent"===i?this.mapSvc.setExtent(n.extent,!0):"setState"===i?(this.mapSvc.setZoom(n.zoom),this.mapSvc.setCenter(n.center),this.mapSvc.setRotation(n.rotation),this.mapSvc.setViewAngle(n.viewAngle)):"setRotation"===i?this.mapSvc.setRotation(n.rotation):"setAngle"===i&&this.mapSvc.setViewAngle(n.viewAngle):"map"===n.options.notifier&&this.mapSvc.updateTime(n.time)}calcMapStateFromCamera(n){const i=this.mapStateSvc.getMapState().getValue().time,o=this.mapSvc.getZoom(),r=this.mapSvc.getCenter(),s=this.mapSvc.getCurrentExtent(),a=this.mapSvc.getViewAngle(),l=this.mapSvc.getRotation();return new un.U5(o,r,{notifier:n},s,i,a,l)}subscribeToMapEvents(){this.viewer.camera.changed.addEventListener(n=>{const i=this.calcMapStateFromCamera("map");this.mapStateSvc.setMapState(i)}),this.viewer.selectedEntityChanged.addEventListener(()=>{const n=this.viewer.selectedEntity,i=this.viewer.infoBox.container.getElementsByClassName("cesium-infoBox-title")[0];if(i.innerHTML="Layer Attributes",n&&(n.entityCollection?.owner instanceof OY?(i.innerHTML=n.entityCollection.owner.name,n.name=n.entityCollection.owner.name):n.name="Layer Attributes",n.description)){const o=n.description.getValue(this.mapSvc.cesiumCurrentTime);this.viewer.infoBox.container.getElementsByClassName("cesium-infoBox-content")[0].innerHTML=o,n.name="Layer Attributes"}})}addUpdateBaseLayers(n){n.length>0&&(n.length!==this.mapSvc.getAll2DLayersSize("baselayers")?this.add2DBaseLayers(n):this.update2DBaseLayers(n))}add2DBaseLayers(n){if(n.length>0){const i=n.filter(o=>!0===o.visible);0===i.length?n[0].visible=!0:i.length>1&&(n.forEach(o=>o.visible=!1),n[0].visible=!0),this.mapSvc.set2DUkisLayers(n,"baselayers")}}update2DBaseLayers(n){this.mapSvc.update2DLayerVisibility(n,"baselayers")}addUpdateTerrainLayers(n){n.length>0&&this.mapSvc.update3DLayerVisibility(n,"baselayers")}addTerrainLayers(n){if(n.length>0){const i=n.filter(o=>!0===o.visible);0===i.length?n[0].visible=!0:i.length>1&&(n.forEach(o=>o.visible=!1),n[0].visible=!0),this.mapSvc.set3DUkisLayers(n,"baselayers")}}addUpdate2DLayers(n,i){n.length!==this.mapSvc.getAll2DLayersSize(i)?this.addLayers(n,i):this.updateLayers(n,i)}addLayers(n,i){this.mapSvc.set2DUkisLayers(n,i)}updateLayers(n,i){this.mapSvc.update2DLayerVisibility(n,i),this.mapSvc.update2DLayerOpacity(n,i),this.mapSvc.update2DLayerZIndex(n,i),this.mapSvc.updateDataSourceZIndex(n,i)}addUpdate3DLayers(n,i){n.length!==this.mapSvc.get3DLayersSize(i)?this.add3DLayers(n,i):this.update3DLayers(n,i)}add3DLayers(n,i){this.mapSvc.set3DUkisLayers(n,i)}update3DLayers(n,i){this.mapSvc.update3DLayerVisibility(n,i),this.mapSvc.update3DLayerOpacity(n,i)}static#e=this.\u0275fac=function(i){return new(i||e)(qe.Y36(mP))};static#t=this.\u0275cmp=qe.Xpm({type:e,selectors:[["ukis-map-cesium"]],viewQuery:function(i,o){if(1&i&&(qe.Gf(ect,5),qe.Gf(tct,5)),2&i){let r;qe.iGM(r=qe.CRH())&&(o.mapDivView=r.first),qe.iGM(r=qe.CRH())&&(o.creditDivView=r.first)}},inputs:{twoDlayersSvc:"twoDlayersSvc",threeDlayersSvc:"threeDlayersSvc",mapStateSvc:["mapState","mapStateSvc"],controls:"controls",timeInterval:"timeInterval",startTime:"startTime"},decls:4,vars:0,consts:[[1,"map","cesiumMap"],["cesiumMapDiv",""],[1,"cesiumCredits"],["cesiumCreditDiv",""]],template:function(i,o){1&i&&qe._UZ(0,"div",0,1)(2,"div",2,3)},styles:[":root{--ukis-crosshair-color: #ff0004;--ukis-popup-bg-color: rgb(238, 238, 238);--ukis-drop-shadow: drop-shadow(0 1px 4px rgba(0, 0, 0, .2))}.cesium-viewer .cesium-viewer-cesiumWidgetContainer{height:100%}.cesiumMap{width:100%;height:100%;position:relative}.cesium-viewer-bottom .cesium-credit-logoContainer{display:none!important}.cesium-credit-lightbox ul{padding-left:20px}.cesium-infoBox{top:0;left:0;margin:.5rem;background-color:var(--ukis-popup-bg-color);filter:var(--ukis-drop-shadow);border:none;border-radius:0;box-shadow:none;z-index:1000000}.cesium-infoBox .cesium-infoBox-title{background-color:var(--ukis-popup-bg-color);border-bottom-left-radius:0;color:var(--clr-global-font-color);height:30px;font-weight:600;padding-top:.5rem}.cesium-infoBox button.cesium-infoBox-camera{display:none}.cesium-infoBox button.cesium-infoBox-close{color:var(--clr-global-font-color)}.cesium-infoBox-content{padding:.75rem;color:var(--clr-global-font-color)}.cesium-infoBox-defaultTable{background-color:var(--ukis-popup-bg-color);color:var(--clr-global-font-color)}.cesium-infoBox-defaultTable tr td:first-child{font-weight:600}.cesium-selection-wrapper svg{fill:var(--ukis-popup-bg-color);stroke:#0072a3;stroke-width:1.1px}\n"],encapsulation:2})}return e})(),ict=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=qe.oAB({type:e});static#n=this.\u0275inj=qe.cJS({providers:[mP],imports:[Zn.ez]})}return e})();var pz=wt(9631),Pre=wt(400),oct=wt(9032),rct=wt(5784),sct=wt(2334),act=wt(3254),cct=wt(5900),lct=wt(2227);function uct(e,t){if(1&e&&(qe.ynx(0),qe._UZ(1,"ukis-map-ol",15),qe.BQk()),2&e){const n=qe.oxw();qe.xp6(1),qe.Q6J("layersSvc",n.twoDlayerSvc)("mapState",n.mapStateSvc)}}function dct(e,t){if(1&e&&(qe.ynx(0),qe._UZ(1,"ukis-map-cesium",16),qe.BQk()),2&e){const n=qe.oxw();qe.xp6(1),qe.Q6J("twoDlayersSvc",n.twoDlayerSvc)("threeDlayersSvc",n.threeDlayerSvc)("mapState",n.mapStateSvc)("controls",n.controls)}}function fct(e,t){if(1&e&&(qe.TgZ(0,"clr-vertical-nav-group",17),qe._UZ(1,"clr-icon",18),qe._uU(2," 3D Tilelayers "),qe.TgZ(3,"clr-vertical-nav-group-children",7),qe._UZ(4,"ukis-layer-control",19),qe.qZA()()),2&e){const n=qe.oxw();qe.Q6J("clrVerticalNavGroupExpanded",!0),qe.xp6(4),qe.Q6J("layersSvc",n.threeDlayerSvc)("layersSort",!1)("mapStateSvc",n.mapStateSvc)}}function hct(e,t){if(1&e&&(qe.TgZ(0,"clr-vertical-nav-group",5),qe._UZ(1,"clr-icon",20),qe._uU(2," 3D Terrain "),qe.TgZ(3,"clr-vertical-nav-group-children",7),qe._UZ(4,"ukis-base-layer-control",10),qe.qZA()()),2&e){const n=qe.oxw();qe.Q6J("clrVerticalNavGroupExpanded",!0),qe.xp6(4),qe.Q6J("layersSvc",n.threeDlayerSvc)("mapStateSvc",n.mapStateSvc)}}function pct(e,t){if(1&e){const n=qe.EpF();qe.TgZ(0,"a",21),qe.NdJ("click",function(){qe.CHM(n);const o=qe.oxw();return qe.KtG(o.changeMapDimension())}),qe._UZ(1,"clr-icon",22),qe._uU(2," 3D View "),qe.qZA()}}function mct(e,t){if(1&e){const n=qe.EpF();qe.TgZ(0,"a",21),qe.NdJ("click",function(){qe.CHM(n);const o=qe.oxw();return qe.KtG(o.changeMapDimension())}),qe._UZ(1,"clr-icon",23),qe._uU(2," 2D View "),qe.qZA()}}let _ct=(()=>{class e{constructor(n,i,o,r,s){this.twoDlayerSvc=n,this.threeDlayerSvc=i,this.mapOlSvc=o,this.mapStateSvc=r,this.mapCesiumSvc=s,this.class="content-container",this.startState={zoom:3,center:{lat:40,lon:13},rotation:0,viewAngle:0},this.is2dMap=!1,this.controls={infoBox:!0,selectionIndicator:!0}}ngOnInit(){this.addBaselayers(),this.addLayers(),this.addOverlays(),this.addTilelayer(),this.addTerrainlayer(),this.mapStateSvc.setMapState(this.startState)}ngOnDestroy(){}addBaselayers(){[new Jt.gY({visible:!0}),new Jt.Kl({visible:!1}),new Jt.um({visible:!1})].map(i=>this.twoDlayerSvc.addLayer(i,"Baselayers"))}addLayers(){[new xt.RC({type:"wmts",url:"https://tiles.geoservice.dlr.de/service/wmts",name:"TDM90 DEM",id:"TDM90_DEM",params:{layer:"TDM90_DEM",style:"default",matrixSetOptions:{matrixSet:"EPSG:3857",tileMatrixPrefix:"EPSG:3857"},format:"image/png"},visible:!1,description:"TDM90_DEM maxZoom: 8",attribution:' | TDM90 Data \xa9: <a href="http://www.dlr.de" target="_blank">DLR</a> licensed for <a rel="license" target="_blank" href="https://geoservice.dlr.de/resources/licenses/tdm90/License_for_the_Utilization_of_90m_DEM_for_Scientific_Use.pdf">scientific use</a>',legendImg:"https://tiles.geoservice.dlr.de/service/wmts?layer=TDM90_DEM&style=default&tilematrixset=EPSG%3A3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=EPSG%3A3857%3A4&TileCol=8&TileRow=5",cssClass:"custom-layer"}),new xt.YY({type:"wms",url:"https://geoservice.dlr.de/eoc/land/wms",name:"GUF Mosaic",id:"GUF28_DLR_v1_Mosaic",params:{LAYERS:"GUF28_DLR_v1_Mosaic",STYLES:"guf_8bit",TRANSPARENT:!0},tileSize:512,visible:!1,description:"GUF28_DLR_v1_Mosaic",attribution:' | GUF\xae: <a href="https://www.dlr.de/eoc/en/desktopdefault.aspx/tabid-9628/16557_read-40454/">DLR License</a>',legendImg:""}),new xt.TI({type:"wms",id:"metopGome2Ozone",name:"MetOp GOME-2 L2C Daily O3 Combined",visible:!0,opacity:.8,description:"MetOp GOME-2 Total Column Ozone (O3) Composite Layer",legendImg:"https://geoservice.dlr.de/eoc/atmosphere/wms?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=METOP_GOME-2_L2C_P1D_COMB_O3",url:"https://geoservice.dlr.de/eoc/atmosphere/wms",params:{LAYERS:"METOP_GOME-2_L2C_P1D_COMB_O3",FORMAT:"image/vnd.jpeg-png",VERSION:"1.1.1",TRANSPARENT:!0},expanded:!1,popup:!0,time:(new Date).toISOString()}),new xt.TI({type:"wms",id:"gsp_yearly",name:"Global SnowPack Yearly",visible:!1,opacity:1,description:"This product shows the snow cover duration for a hydrological year. Its beginning differs from the calendar year, since some of the precipitation that falls in late autumn and winter falls as snow and only drains away when the snow melts in the following spring or summer.",legendImg:"https://geoservice.dlr.de/eoc/land/wms?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=GSP_SCD_P1Y",url:"https://geoservice.dlr.de/eoc/land/wms",params:{LAYERS:"GSP_SCD_P1Y",TRANSPARENT:!0},expanded:!1,popup:!0})].map(i=>this.twoDlayerSvc.addLayer(i,"Layers"))}addOverlays(){[new Jt.fc({visible:!0,displayName:"Litelables"}),new xt.YY({type:"wms",url:"https://geoservice.dlr.de/eoc/land/wms",name:"WSF Evolution",id:"WSF_Evolution",params:{LAYERS:"WSF_Evolution",STYLES:"wsfevolution",TRANSPARENT:!0},tileSize:512,visible:!1,description:"World Settlement Footprint Evolution",attribution:'DLR/EOC: <a href="https://www.dlr.de/eoc/</a>',legendImg:"https://geoservice.dlr.de/eoc/land/wms?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=WSF_Evolution"}),new xt.DJ({id:"kml_test",name:"KML Vector Layer",attribution:"\xa9 DLR KML",type:"kml",data:"assets/kml/TimeZones.kml",visible:!1}),new xt.DJ({id:"geojson_test",name:"GeoJSON Vector Layer (default)",attribution:"\xa9 DLR GeoJSON",type:"geojson",data:Pre,visible:!1,popup:!0}),new xt.DJ({id:"geojson_test2",name:"GeoJSON Vector Layer (styled)",attribution:"\xa9 DLR GeoJSON",type:"geojson",data:Pre,visible:!1,popup:!0,options:{style:i=>{let o=[],r=new oct.ZP({stroke:new rct.Z({color:"#FF7400",width:1}),fill:new sct.Z({color:"#FF740099"})});return o.push(r),o},clampToGround:!1}})].map(i=>this.twoDlayerSvc.addLayer(i,"Overlays"))}addTilelayer(){var n=this;return(0,we.Z)(function*(){[new xt.AO({name:"Hamburg 3D",displayName:"Hamburg 3D (LoD2 Tileset)",id:"hamburg_3d",custom_layer:yield _g.fromUrl("https://daten-hamburg.de/gdi3d/datasource-data/LoD2/tileset.json",{show:!1}),visible:!1,description:"3D Model of Hamburg",type:"custom",opacity:1,attribution:"\xa9 Hamburg Masterportal"}),new xt.AO({name:"Frankfurt 3D",displayName:"Frankfurt 3D (Esri i3s)",id:"i3s_3d",custom_layer:yield cb.fromUrl("https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0",{show:!1}),visible:!1,description:"Esri Portal 3D Model",type:"custom",opacity:1,attribution:"\xa9 Esri"})].map(s=>n.threeDlayerSvc.addLayer(s,"Layers"))})()}addTerrainlayer(){var n=this;return(0,we.Z)(function*(){[new xt.AO({name:"Hamburg Terrain",displayName:"Hamburg Terrain",id:"hamburg_terrain",custom_layer:yield dA.fromUrl("https://daten-hamburg.de/gdi3d/datasource-data/Gelaende/",{credit:new Yn("\xa9 MasterPortal Hamburg")}),visible:!1,attribution:"\xa9 MasterPortal Hamburg",description:"Gel\xe4ndemodell Hamburg",type:"custom"}),new xt.AO({name:"Ellipsoid",displayName:"Ellipsoid",id:"ellipsoid",custom_layer:new Wf({}),visible:!0,attribution:"",description:"",type:"custom"})].map(s=>n.threeDlayerSvc.addLayer(s,"Baselayers"))})()}changeMapDimension(){this.is2dMap?this.is2dMap=!1:this.mapCesiumSvc.setNadirViewAngle({complete:()=>{this.is2dMap=!0}})}setViewAngle(){this.mapStateSvc.setViewAngle(45)}resetViewAngle(){this.mapStateSvc.setViewAngle(0)}setRotation(){this.mapStateSvc.setRotation(10)}resetRotation(){this.mapStateSvc.setRotation(0)}static#e=this.\u0275fac=function(i){return new(i||e)(qe.Y36("twoDlayerSvc"),qe.Y36("threeDlayerSvc"),qe.Y36(pz.BR),qe.Y36(un.I3),qe.Y36(mP))};static#t=this.\u0275cmp=qe.Xpm({type:e,selectors:[["app-route-example-cesium"]],hostVars:2,hostBindings:function(i,o){2&i&&qe.Tol(o.class)},features:[qe._Bn([un.I3,pz.BR,mP,{provide:"twoDlayerSvc",useClass:xt.KD},{provide:"threeDlayerSvc",useClass:xt.KD}])],decls:35,vars:20,consts:[[1,"content-area","map-view"],[4,"ngIf"],[1,"right",3,"clrVerticalNavCollapsible","clr-nav-level"],["class","layers three-d-layer-control",3,"clrVerticalNavGroupExpanded",4,"ngIf"],["class","layers",3,"clrVerticalNavGroupExpanded",4,"ngIf"],[1,"layers",3,"clrVerticalNavGroupExpanded"],["shape","world","title","Overlays","clrVerticalNavIcon",""],[1,"padding","title-ellipsis"],[3,"layersSvc","mapStateSvc","layersSort","layerfilter"],["shape","layers","clrVerticalNavIcon","","title","layers"],[3,"layersSvc","mapStateSvc"],["shape","world","title","Baselayers","clrVerticalNavIcon",""],["shape","cog","title","Actions","clrVerticalNavIcon",""],[1,"btn","btn-primary",3,"click"],["clrVerticalNavLink","","class","iconButton",3,"click",4,"ngIf"],[3,"layersSvc","mapState"],[3,"twoDlayersSvc","threeDlayersSvc","mapState","controls"],[1,"layers","three-d-layer-control",3,"clrVerticalNavGroupExpanded"],["shape","block","clrVerticalNavIcon","","title","tilelayers"],[3,"layersSvc","layersSort","mapStateSvc"],["shape","world","title","terain","clrVerticalNavIcon",""],["clrVerticalNavLink","",1,"iconButton",3,"click"],["shape","block","title","3D View","clrVerticalNavIcon",""],["shape","map","title","2D View","clrVerticalNavIcon",""]],template:function(i,o){1&i&&(qe.TgZ(0,"main",0),qe.YNc(1,uct,2,2,"ng-container",1),qe.YNc(2,dct,2,4,"ng-container",1),qe.qZA(),qe.TgZ(3,"clr-vertical-nav",2),qe.YNc(4,fct,5,4,"clr-vertical-nav-group",3),qe.YNc(5,hct,5,3,"clr-vertical-nav-group",4),qe.TgZ(6,"clr-vertical-nav-group",5),qe._UZ(7,"clr-icon",6),qe._uU(8," Overlays "),qe.TgZ(9,"clr-vertical-nav-group-children",7),qe._UZ(10,"ukis-layer-control",8),qe.qZA()(),qe.TgZ(11,"clr-vertical-nav-group",5),qe._UZ(12,"clr-icon",9),qe._uU(13," Layers "),qe.TgZ(14,"clr-vertical-nav-group-children",7),qe._UZ(15,"ukis-layer-control",10),qe.qZA()(),qe.TgZ(16,"clr-vertical-nav-group",5),qe._UZ(17,"clr-icon",11),qe._uU(18," Baselayers "),qe.TgZ(19,"clr-vertical-nav-group-children",7),qe._UZ(20,"ukis-base-layer-control",10),qe.qZA()(),qe.TgZ(21,"clr-vertical-nav-group",5),qe._UZ(22,"clr-icon",12),qe._uU(23," Actions "),qe.TgZ(24,"clr-vertical-nav-group-children",7)(25,"button",13),qe.NdJ("click",function(){return o.setViewAngle()}),qe._uU(26,"set ViewAngle"),qe.qZA(),qe.TgZ(27,"button",13),qe.NdJ("click",function(){return o.resetViewAngle()}),qe._uU(28,"reset ViewAngle"),qe.qZA(),qe.TgZ(29,"button",13),qe.NdJ("click",function(){return o.setRotation()}),qe._uU(30,"set Rotation"),qe.qZA(),qe.TgZ(31,"button",13),qe.NdJ("click",function(){return o.resetRotation()}),qe._uU(32,"reset Rotation"),qe.qZA()()(),qe.YNc(33,pct,3,0,"a",14),qe.YNc(34,mct,3,0,"a",14),qe.qZA()),2&i&&(qe.xp6(1),qe.Q6J("ngIf",o.is2dMap),qe.xp6(1),qe.Q6J("ngIf",!o.is2dMap),qe.xp6(1),qe.Q6J("clrVerticalNavCollapsible",!0)("clr-nav-level",2),qe.xp6(1),qe.Q6J("ngIf",!o.is2dMap),qe.xp6(1),qe.Q6J("ngIf",!o.is2dMap),qe.xp6(1),qe.Q6J("clrVerticalNavGroupExpanded",!0),qe.xp6(4),qe.Q6J("layersSvc",o.twoDlayerSvc)("mapStateSvc",o.mapStateSvc)("layersSort",!1)("layerfilter","Overlays"),qe.xp6(1),qe.Q6J("clrVerticalNavGroupExpanded",!0),qe.xp6(4),qe.Q6J("layersSvc",o.twoDlayerSvc)("mapStateSvc",o.mapStateSvc),qe.xp6(1),qe.Q6J("clrVerticalNavGroupExpanded",!0),qe.xp6(4),qe.Q6J("layersSvc",o.twoDlayerSvc)("mapStateSvc",o.mapStateSvc),qe.xp6(1),qe.Q6J("clrVerticalNavGroupExpanded",!0),qe.xp6(12),qe.Q6J("ngIf",o.is2dMap),qe.xp6(1),qe.Q6J("ngIf",!o.is2dMap))},dependencies:[Zn.O5,pn.qvL,pn.saT,pn.fzC,pn.zYX,pn.A0B,pn.d6G,pn.ogR,nct,act.E,cct.l,lct.j],styles:['.cesium-svgPath-svg{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.cesium-button{display:inline-block;position:relative;background:#303336;border:1px solid #444;color:#edffff;fill:#edffff;border-radius:4px;padding:5px 12px;margin:2px 3px;cursor:pointer;overflow:hidden;-webkit-user-select:none;user-select:none}.cesium-button:focus{color:#fff;fill:#fff;border-color:#ea4;outline:none}.cesium-button:hover{color:#fff;fill:#fff;background:#48b;border-color:#aef;box-shadow:0 0 8px #fff}.cesium-button:active{color:#000;fill:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-button:disabled,.cesium-button-disabled,.cesium-button-disabled:focus,.cesium-button-disabled:hover,.cesium-button-disabled:active{background:#303336;border-color:#444;color:#646464;fill:#646464;box-shadow:none;cursor:default}.cesium-button option{background-color:#000;color:#eee}.cesium-button option:disabled{color:#777}.cesium-button input,.cesium-button label{cursor:pointer}.cesium-button input{vertical-align:sub}.cesium-toolbar-button{box-sizing:border-box;width:32px;height:32px;border-radius:14%;padding:0;vertical-align:middle;z-index:0}.cesium-performanceDisplay-defaultContainer{position:absolute;top:50px;right:10px;text-align:right}.cesium-performanceDisplay{background-color:#282828b3;padding:7px;border-radius:5px;border:1px solid #444;font:700 12px sans-serif}.cesium-performanceDisplay-fps{color:#e52}.cesium-performanceDisplay-throttled{color:#a42}.cesium-performanceDisplay-ms{color:#de3}.cesium-animation-theme{visibility:hidden;display:block;position:absolute;z-index:-100}.cesium-animation-themeNormal{color:#222}.cesium-animation-themeHover{color:#4488b0}.cesium-animation-themeSelect{color:#242}.cesium-animation-themeDisabled{color:#333}.cesium-animation-themeKnob{color:#222}.cesium-animation-themePointer{color:#2e2}.cesium-animation-themeSwoosh{color:#8ac}.cesium-animation-themeSwooshHover{color:#aef}.cesium-animation-svgText{fill:#edffff;font-family:Sans-Serif;font-size:15px;text-anchor:middle}.cesium-animation-blank{fill:#000;fill-opacity:.01;stroke:none}.cesium-animation-rectButton{cursor:pointer;-webkit-user-select:none;user-select:none}.cesium-animation-rectButton .cesium-animation-buttonGlow{fill:#fff;stroke:none;display:none}.cesium-animation-rectButton:hover .cesium-animation-buttonGlow{display:block}.cesium-animation-rectButton .cesium-animation-buttonPath{fill:#edffff}.cesium-animation-rectButton .cesium-animation-buttonMain{stroke:#444;stroke-width:1.2}.cesium-animation-rectButton:hover .cesium-animation-buttonMain{stroke:#aef}.cesium-animation-rectButton:active .cesium-animation-buttonMain{fill:#abd6ff}.cesium-animation-buttonDisabled{-webkit-user-select:none;user-select:none}.cesium-animation-buttonDisabled .cesium-animation-buttonMain{stroke:#555}.cesium-animation-buttonDisabled .cesium-animation-buttonPath{fill:#818181}.cesium-animation-buttonDisabled .cesium-animation-buttonGlow{display:none}.cesium-animation-buttonToggled .cesium-animation-buttonGlow{display:block;fill:#2e2}.cesium-animation-buttonToggled .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-buttonToggled:hover .cesium-animation-buttonGlow{fill:#fff}.cesium-animation-buttonToggled:hover .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-shuttleRingG,.cesium-animation-shuttleRingPointer,.cesium-animation-shuttleRingPausePointer{cursor:pointer}.cesium-animation-shuttleRingBack{fill:#181818;fill-opacity:.8;stroke:#333;stroke-width:1.2}.cesium-animation-shuttleRingSwoosh line{stroke:#8ac;stroke-width:3;stroke-opacity:.2;stroke-linecap:round}.cesium-animation-knobOuter{cursor:pointer;stroke:#444;stroke-width:1.2}.cesium-animation-knobInner{cursor:pointer}.cesium-baseLayerPicker-selected{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.cesium-baseLayerPicker-dropDown{display:block;position:absolute;box-sizing:content-box;top:auto;right:0;width:320px;max-height:500px;margin-top:5px;background-color:#262626bf;border:1px solid #444;padding:6px;overflow:auto;border-radius:10px;-webkit-user-select:none;user-select:none;transform:translateY(-20%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-baseLayerPicker-dropDown-visible{transform:translate(0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-baseLayerPicker-sectionTitle{display:block;font-family:sans-serif;font-size:16pt;text-align:left;color:#edffff;margin-bottom:4px}.cesium-baseLayerPicker-choices{margin-bottom:5px}.cesium-baseLayerPicker-categoryTitle{color:#edffff;font-size:11pt}.cesium-baseLayerPicker-choices{display:block;border:1px solid #888;border-radius:5px;padding:5px 0}.cesium-baseLayerPicker-item{display:inline-block;vertical-align:top;margin:2px 5px;width:64px;text-align:center;cursor:pointer}.cesium-baseLayerPicker-itemLabel{display:block;font-family:sans-serif;font-size:8pt;text-align:center;vertical-align:middle;color:#edffff;cursor:pointer;word-wrap:break-word}.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemLabel,.cesium-baseLayerPicker-item:focus .cesium-baseLayerPicker-itemLabel{text-decoration:underline}.cesium-baseLayerPicker-itemIcon{display:inline-block;position:relative;width:inherit;height:auto;background-size:100% 100%;border:solid 1px #444;border-radius:9px;color:#edffff;margin:0;padding:0;cursor:pointer;box-sizing:border-box}.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemIcon{border-color:#fff;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemLabel{color:#bdecf8}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemIcon{border:double 4px rgb(189,236,248)}.cesium-widget{font-family:sans-serif;font-size:16px;overflow:hidden;display:block;position:relative;top:0;left:0;width:100%;height:100%}.cesium-widget,.cesium-widget canvas{width:100%;height:100%;touch-action:none}.cesium-widget-credits{display:block;position:absolute;bottom:0;left:0;color:#fff;font-size:10px;text-shadow:0px 0px 2px #000000;padding-right:5px}.cesium-widget-errorPanel{position:absolute;inset:0;text-align:center;background:rgba(0,0,0,.7);z-index:99999}.cesium-widget-errorPanel:before{display:inline-block;vertical-align:middle;height:100%;content:""}.cesium-widget-errorPanel-content{width:75%;max-width:500px;display:inline-block;text-align:left;vertical-align:middle;border:1px solid #510c00;border-radius:7px;background-color:#f0d9d5;font-size:14px;color:#510c00}.cesium-widget-errorPanel-content.expanded{max-width:75%}.cesium-widget-errorPanel-header{font-size:18px;font-family:Open Sans,Verdana,Geneva,sans-serif;background:#d69d93;border-bottom:2px solid #510c00;border-radius:3px 3px 0 0;padding:15px}.cesium-widget-errorPanel-scroll{overflow:auto;font-family:Open Sans,Verdana,Geneva,sans-serif;white-space:pre-wrap;padding:0 15px;margin:10px 0 20px}.cesium-widget-errorPanel-buttonPanel{padding:0 15px;margin:10px 0 20px;text-align:right}.cesium-widget-errorPanel-buttonPanel button{border-color:#510c00;background:#d69d93;color:#202020;margin:0}.cesium-widget-errorPanel-buttonPanel button:focus{border-color:#510c00;background:#f0d9d5;color:#510c00}.cesium-widget-errorPanel-buttonPanel button:hover{border-color:#510c00;background:#f0d9d5;color:#510c00}.cesium-widget-errorPanel-buttonPanel button:active{border-color:#510c00;background:#b17b72;color:#510c00}.cesium-widget-errorPanel-more-details{text-decoration:underline;cursor:pointer}.cesium-widget-errorPanel-more-details:hover{color:#2b0700}.cesium-cesiumInspector{border-radius:5px;transition:width ease-in-out .25s;background:rgba(48,51,54,.8);border:1px solid #444;color:#edffff;display:inline-block;position:relative;padding:4px 12px;-webkit-user-select:none;user-select:none;overflow:hidden}.cesium-cesiumInspector-button{text-align:center;font-size:11pt}.cesium-cesiumInspector-visible .cesium-cesiumInspector-button{border-bottom:1px solid #aaa;padding-bottom:3px}.cesium-cesiumInspector input:enabled,.cesium-cesiumInspector-button{cursor:pointer}.cesium-cesiumInspector-visible{width:185px;height:auto}.cesium-cesiumInspector-hidden{width:122px;height:17px}.cesium-cesiumInspector-sectionContent{max-height:600px}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionContent{max-height:0;padding:0!important;overflow:hidden}.cesium-cesiumInspector-dropDown{margin:5px 0;font-family:sans-serif;font-size:10pt;width:185px}.cesium-cesiumInspector-frustumStatistics{padding:5px;background-color:#505050bf}.cesium-cesiumInspector-pickButton{background-color:#0000004d;border:1px solid #444;color:#edffff;border-radius:5px;padding:3px 7px;cursor:pointer;-webkit-user-select:none;user-select:none;margin:0 auto}.cesium-cesiumInspector-pickButton:focus{outline:none}.cesium-cesiumInspector-pickButton:active,.cesium-cesiumInspector-pickButtonHighlight{color:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-cesiumInspector-center{text-align:center}.cesium-cesiumInspector-sectionHeader{font-weight:700;font-size:10pt;margin:0;cursor:pointer}.cesium-cesiumInspector-pickSection{border:1px solid #aaa;border-radius:5px;padding:3px;margin-bottom:5px}.cesium-cesiumInspector-sectionContent{margin-bottom:10px;transition:max-height .25s}.cesium-cesiumInspector-tileText{padding-bottom:10px;border-bottom:1px solid #aaa}.cesium-cesiumInspector-relativeText{padding-top:10px}.cesium-cesiumInspector-sectionHeader:before{margin-right:5px;content:"-";width:1ch;display:inline-block}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionHeader:before{content:"+"}ul.cesium-cesiumInspector-statistics{margin:0;padding-top:3px;padding-bottom:3px}ul.cesium-cesiumInspector-statistics+ul.cesium-cesiumInspector-statistics{border-top:1px solid #aaa}.cesium-cesiumInspector-slider{margin-top:5px}.cesium-cesiumInspector-slider input[type=number]{text-align:left;background-color:#222;outline:none;border:1px solid #444;color:#edffff;width:100px;border-radius:3px;padding:1px;margin-left:10px;cursor:auto}.cesium-cesiumInspector-slider input[type=number]::-webkit-outer-spin-button,.cesium-cesiumInspector-slider input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.cesium-cesiumInspector-slider input[type=range]{margin-left:5px;vertical-align:middle}.cesium-cesiumInspector-hide .cesium-cesiumInspector-styleEditor{display:none}.cesium-cesiumInspector-styleEditor{padding:10px;border-radius:5px;background:rgba(48,51,54,.8);border:1px solid #444}.cesium-cesiumInspector-styleEditor textarea{width:100%;height:300px;background:transparent;color:#edffff;border:none;padding:0;white-space:pre;overflow-wrap:normal;overflow-x:auto}.cesium-3DTilesInspector{width:300px;pointer-events:all}.cesium-3DTilesInspector-statistics{font-size:11px}.cesium-3DTilesInspector-disabledElementsInfo{margin:5px 0 0;padding:0 0 0 20px;color:#eed202}.cesium-3DTilesInspector div,.cesium-3DTilesInspector input[type=range]{width:100%;box-sizing:border-box}.cesium-cesiumInspector-error{color:#ff9e9e;overflow:auto}.cesium-3DTilesInspector .cesium-cesiumInspector-section{margin-top:3px}.cesium-3DTilesInspector .cesium-cesiumInspector-sectionHeader+.cesium-cesiumInspector-show{border-top:1px solid white}input.cesium-cesiumInspector-url{overflow:hidden;white-space:nowrap;overflow-x:scroll;background-color:transparent;color:#fff;outline:none;border:none;height:1em;width:100%}.cesium-cesiumInspector .field-group{display:table}.cesium-cesiumInspector .field-group>label{display:table-cell;font-weight:700}.cesium-cesiumInspector .field-group>.field{display:table-cell;width:100%}.cesium-VoxelInspector{width:300px;pointer-events:all}.cesium-VoxelInspector div,.cesium-VoxelInspector input[type=range]{width:100%;box-sizing:border-box}.cesium-VoxelInspector .cesium-cesiumInspector-section{margin-top:3px}.cesium-VoxelInspector .cesium-cesiumInspector-sectionHeader+.cesium-cesiumInspector-show{border-top:1px solid white}.cesium-button.cesium-fullscreenButton,.cesium-button.cesium-vrButton{display:block;width:100%;height:100%;margin:0;border-radius:0}.cesium-viewer-geocoderContainer .cesium-geocoder-input{border:solid 1px #444;background-color:#282828b3;color:#fff;display:inline-block;vertical-align:middle;width:0;height:32px;margin:0;padding:0 32px 0 0;border-radius:0;box-sizing:border-box;transition:width ease-in-out .25s,background-color .2s ease-in-out;-webkit-appearance:none}.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input{border-color:#aef;box-shadow:0 0 8px #fff}.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus{border-color:#ea4;background-color:#0f0f0fe6;box-shadow:none;outline:none}.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input,.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus,.cesium-viewer-geocoderContainer .cesium-geocoder-input-wide{padding-left:4px;width:250px}.cesium-viewer-geocoderContainer .search-results{position:absolute;background-color:#000;color:#eee;overflow-y:auto;opacity:.8;width:100%}.cesium-viewer-geocoderContainer .search-results ul{list-style-type:none;margin:0;padding:0}.cesium-viewer-geocoderContainer .search-results ul li{font-size:14px;padding:3px 10px}.cesium-viewer-geocoderContainer .search-results ul li:hover{cursor:pointer}.cesium-viewer-geocoderContainer .search-results ul li.active{background:#48b}.cesium-geocoder-searchButton{background-color:#303336;display:inline-block;position:absolute;cursor:pointer;width:32px;top:1px;right:1px;height:30px;vertical-align:middle;fill:#edffff}.cesium-geocoder-searchButton:hover{background-color:#48b}.cesium-infoBox{display:block;position:absolute;top:50px;right:0;width:40%;max-width:480px;background:rgba(38,38,38,.95);color:#edffff;border:1px solid #444;border-right:none;border-top-left-radius:7px;border-bottom-left-radius:7px;box-shadow:0 0 10px 1px #000;transform:translate(100%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-infoBox-visible{transform:translate(0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-infoBox-title{display:block;height:20px;padding:5px 30px 5px 25px;background:rgba(84,84,84,1);border-top-left-radius:7px;text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:content-box}.cesium-infoBox-bodyless .cesium-infoBox-title{border-bottom-left-radius:7px}button.cesium-infoBox-camera{display:block;position:absolute;top:4px;left:4px;width:22px;height:22px;background:transparent;border-color:transparent;border-radius:3px;padding:0 5px;margin:0}button.cesium-infoBox-close{display:block;position:absolute;top:5px;right:5px;height:20px;background:transparent;border:none;border-radius:2px;font-weight:700;font-size:16px;padding:0 5px;margin:0;color:#edffff}button.cesium-infoBox-close:focus{background:rgba(238,136,0,.44);outline:none}button.cesium-infoBox-close:hover{background:#888;color:#000}button.cesium-infoBox-close:active{background:#a00;color:#000}.cesium-infoBox-bodyless .cesium-infoBox-iframe{display:none}.cesium-infoBox-iframe{border:none;width:100%;width:calc(100% - 2px)}span.cesium-sceneModePicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-sceneModePicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-sceneModePicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none{display:none}.cesium-sceneModePicker-slide-svg{transition:left 2s;top:0;left:0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D{margin:0 0 3px}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-icon2D{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-iconColumbusView{left:200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon3D{left:-200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon2D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-icon3D{left:-100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-iconColumbusView{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}span.cesium-projectionPicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-projectionPicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-projectionPicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-projectionPicker-wrapper .cesium-projectionPicker-none{display:none}.cesium-projectionPicker-wrapper .cesium-projectionPicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective,.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic{margin:0 0 3px}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective .cesium-projectionPicker-iconOrthographic{left:100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic .cesium-projectionPicker-iconPerspective{left:-100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-performance-watchdog-message-area{position:relative;background-color:#ff0;color:#000;padding:10px}.cesium-performance-watchdog-message{margin-right:30px}.cesium-performance-watchdog-message-dismiss{position:absolute;right:0;margin:0 10px 0 0}.cesium-navigationHelpButton-wrapper{position:relative;display:inline-block}.cesium-navigation-help{visibility:hidden;position:absolute;top:38px;right:2px;width:250px;border-radius:10px;transform:scale(.01);transform-origin:234px -10px;transition:visibility 0s .25s,transform .25s ease-in}.cesium-navigation-help-visible{visibility:visible;transform:scale(1);transition:transform .25s ease-out}.cesium-navigation-help-instructions{border:1px solid #444;background-color:#262626bf;padding-bottom:5px;border-radius:0 0 10px 10px}.cesium-click-navigation-help{display:none}.cesium-touch-navigation-help{display:none;padding-top:5px}.cesium-click-navigation-help-visible,.cesium-touch-navigation-help-visible{display:block}.cesium-navigation-help-pan{color:#6cf;font-weight:700}.cesium-navigation-help-zoom{color:#65fd00;font-weight:700}.cesium-navigation-help-rotate{color:#ffd800;font-weight:700}.cesium-navigation-help-tilt{color:#d800d8;font-weight:700}.cesium-navigation-help-details{color:#fff}.cesium-navigation-button{color:#fff;background-color:transparent;border-bottom:none;border-top:1px solid #444;border-right:1px solid #444;margin:0;width:50%;cursor:pointer}.cesium-navigation-button-icon{vertical-align:middle;padding:5px 1px}.cesium-navigation-button:focus{outline:none}.cesium-navigation-button-left{border-radius:10px 0 0;border-left:1px solid #444}.cesium-navigation-button-right{border-radius:0 10px 0 0;border-left:none}.cesium-navigation-button-selected{background-color:#262626bf}.cesium-navigation-button-unselected{background-color:#000000bf}.cesium-navigation-button-unselected:hover{background-color:#4c4c4cbf}.cesium-selection-wrapper{position:absolute;width:160px;height:160px;pointer-events:none;visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in}.cesium-selection-wrapper-visible{visibility:visible;opacity:1;transition:opacity .2s ease-out}.cesium-selection-wrapper svg{fill:#2e2;stroke:#000;stroke-width:1.1px}.cesium-timeline-main{position:relative;left:0;bottom:0;overflow:hidden;border:solid 1px #888;-webkit-user-select:none;user-select:none}.cesium-timeline-trackContainer{width:100%;overflow:auto;border-top:solid 1px #888;position:relative;top:0;left:0}.cesium-timeline-tracks{position:absolute;top:0;left:0;width:100%}.cesium-timeline-needle{position:absolute;left:0;top:1.7em;bottom:0;width:1px;background:#f00}.cesium-timeline-bar{position:relative;left:0;top:0;overflow:hidden;cursor:pointer;width:100%;height:1.7em;background:linear-gradient(to bottom,rgba(116,117,119,.8) 0%,rgba(58,68,82,.8) 11%,rgba(46,50,56,.8) 46%,rgba(53,53,53,.8) 81%,rgba(53,53,53,.8) 100%)}.cesium-timeline-ruler{visibility:hidden;white-space:nowrap;font-size:80%;z-index:-200}.cesium-timeline-highlight{position:absolute;bottom:0;left:0;background:#08f}.cesium-timeline-ticLabel{position:absolute;top:0;left:0;white-space:nowrap;font-size:80%;color:#eee}.cesium-timeline-ticMain{position:absolute;bottom:0;left:0;width:1px;height:50%;background:#eee}.cesium-timeline-ticSub{position:absolute;bottom:0;left:0;width:1px;height:33%;background:#aaa}.cesium-timeline-ticTiny{position:absolute;bottom:0;left:0;width:1px;height:25%;background:#888}.cesium-timeline-icon16{display:block;position:absolute;width:16px;height:16px;background-image:url(TimelineIcons.16c81c09c14707a4.png);background-repeat:no-repeat}.cesium-viewer{font-family:sans-serif;font-size:16px;overflow:hidden;display:block;position:relative;top:0;left:0;width:100%;height:100%}.cesium-viewer-cesiumWidgetContainer{width:100%;height:100%}.cesium-viewer-bottom{display:block;position:absolute;bottom:0;left:0;padding-right:5px}.cesium-viewer .cesium-widget-credits{display:inline;position:static;bottom:auto;left:auto;padding-right:0;color:#fff;font-size:10px;text-shadow:0 0 2px #000000}.cesium-viewer-timelineContainer{position:absolute;bottom:0;left:169px;right:29px;height:27px;padding:0;margin:0;overflow:hidden;font-size:14px}.cesium-viewer-animationContainer{position:absolute;bottom:0;left:0;padding:0;width:169px;height:112px}.cesium-viewer-fullscreenContainer,.cesium-viewer-vrContainer{position:absolute;bottom:0;right:0;padding:0;width:29px;height:29px;overflow:hidden}.cesium-viewer-toolbar{display:block;position:absolute;top:5px;right:5px}.cesium-viewer-cesiumInspectorContainer{display:block;position:absolute;top:50px;right:10px}.cesium-viewer-geocoderContainer{position:relative;display:inline-block;margin:0 3px}.cesium-viewer-cesium3DTilesInspectorContainer,.cesium-viewer-voxelInspectorContainer{display:block;position:absolute;top:50px;right:10px;max-height:calc(100% - 120px);box-sizing:border-box;overflow-y:auto;overflow-x:hidden}.cesium-viewer-i3s-explorer ul{list-style-type:none}.cesium-viewer-i3s-explorer .layersList{padding:0}.cesium-viewer-i3s-explorer input{margin:0 3px 0 0}.cesium-viewer-i3s-explorer .expandItem{cursor:pointer;-webkit-user-select:none;user-select:none;width:20px}.cesium-viewer-i3s-explorer .nested,.cesium-viewer-i3s-explorer #bsl-wrapper{display:none}.cesium-viewer-i3s-explorer .active{display:block}.cesium-viewer-i3s-explorer .li-wrapper{display:flex;flex-direction:row;align-content:center}ukis-map-ol,ukis-map-cesium{height:100%}\n'],encapsulation:2})}return e})();var gct=wt(2233),yct=wt(9498),Ore=wt(1794);const bct=[{path:"",component:_ct}];let Rre=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=qe.oAB({type:e});static#n=this.\u0275inj=qe.cJS({imports:[Ore.Bz.forChild(bct),Ore.Bz]})}return e})(),Tct=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=qe.oAB({type:e});static#n=this.\u0275inj=qe.cJS({imports:[Zn.ez,Rre,yct.q,pn.K6A,ict,gct.cE,pz.oC]})}return e})()}}]); \ No newline at end of file diff --git a/3rdpartylicenses.txt b/3rdpartylicenses.txt index 7c41942e3..522b695f4 100644 --- a/3rdpartylicenses.txt +++ b/3rdpartylicenses.txt @@ -72,7 +72,7 @@ MIT @cesium/engine Apache-2.0 -Copyright 2011-2022 CesiumJS Contributors +Copyright 2011-2024 CesiumJS Contributors Apache License Version 2.0, January 2004 @@ -1408,6 +1408,35 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI @zip.js/zip.js BSD-3-Clause +BSD 3-Clause License + +Copyright (c) 2023, Gildas Lormeau + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY 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. + amdefine BSD-3-Clause AND MIT @@ -1471,28 +1500,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -assert -MIT -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - - autolinker MIT The MIT License (MIT) @@ -1518,257 +1525,9 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -available-typed-arrays -MIT -MIT License - -Copyright (c) 2020 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -base64-js -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jameson Little - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - bitmap-sdf MIT -browserify-zlib -MIT -The MIT License (MIT) - -Copyright (c) 2014-2015 Devon Govett <devongovett@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -This project contains parts of Node.js. -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - - -buffer -MIT -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh, and other contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -builtin-status-codes -MIT -The MIT License (MIT) - -Copyright (c) Ben Drucker <bvdrucker@gmail.com> (bendrucker.me) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -call-bind -MIT -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -define-data-property -MIT -MIT License - -Copyright (c) 2023 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -define-properties -MIT -The MIT License (MIT) - -Copyright (C) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - demo-maps Apache-2.0 @@ -2363,371 +2122,11 @@ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -events -MIT +grapheme-splitter MIT +The MIT License (MIT) -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - - -for-each -MIT -The MIT License (MIT) - -Copyright (c) 2012 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -function-bind -MIT -Copyright (c) 2013 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - - -get-intrinsic -MIT -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -gopd -MIT -MIT License - -Copyright (c) 2022 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -grapheme-splitter -MIT -The MIT License (MIT) - -Copyright (c) 2015 Orlin Georgiev - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -has-property-descriptors -MIT -MIT License - -Copyright (c) 2022 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -has-proto -MIT -MIT License - -Copyright (c) 2022 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -has-symbols -MIT -MIT License - -Copyright (c) 2016 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -has-tostringtag -MIT -MIT License - -Copyright (c) 2021 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -hasown -MIT -MIT License - -Copyright (c) Jordan Harband and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -https-browserify -MIT -This software is released under the MIT license: - -Copyright (c) James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -ieee754 -BSD-3-Clause -Copyright 2008 Fair Oaks Labs, Inc. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 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. - - -inherits -ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - - -is-arguments -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -is-callable -MIT -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband +Copyright (c) 2015 Orlin Georgiev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2749,78 +2148,19 @@ SOFTWARE. -is-generator-function -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -is-nan -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -is-typed-array -MIT -The MIT License (MIT) +ieee754 +BSD-3-Clause +Copyright 2008 Fair Oaks Labs, Inc. -Copyright (c) 2015 Jordan Harband +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 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. jsep @@ -3100,7 +2440,7 @@ meshoptimizer MIT MIT License -Copyright (c) 2016-2023 Arseny Kapoulkine +Copyright (c) 2016-2024 Arseny Kapoulkine Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -3169,103 +2509,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -object-inspect -MIT -MIT License - -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -object-is -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -object-keys -MIT -The MIT License (MIT) - -Copyright (C) 2013 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -object.assign -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ogc-schemas BSD-2-Clause @@ -3324,31 +2567,6 @@ 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. -pako -(MIT AND Zlib) -(The MIT License) - -Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - path-browserify MIT MIT License @@ -3425,73 +2643,16 @@ Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - _THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE._ - - -punycode -MIT -Copyright Mathias Bynens <https://mathiasbynens.be/> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -qs -BSD-3-Clause -BSD 3-Clause License - -Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY 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. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + _THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE._ ramda @@ -3544,57 +2705,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -readable-stream -MIT -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - - rxjs Apache-2.0 Apache License @@ -3801,184 +2911,6 @@ Apache-2.0 -safe-buffer -MIT -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -set-function-length -MIT -MIT License - -Copyright (c) Jordan Harband and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -side-channel -MIT -MIT License - -Copyright (c) 2019 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -stream-browserify -MIT -MIT License - -Copyright (c) James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -stream-http -MIT -The MIT License - -Copyright (c) 2015 John Hiesey - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -string_decoder -MIT -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - - - three MIT The MIT License @@ -4060,110 +2992,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -url -MIT -The MIT License (MIT) - -Copyright 2014 Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -util -MIT -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - - -util-deprecate -MIT -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - w3c-schemas BSD-2-Clause -which-typed-array -MIT -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - wkt-parser MIT ## Proj4js -- Javascript reprojection library. @@ -4210,30 +3041,6 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -xtend -MIT -The MIT License (MIT) -Copyright (c) 2012-2014 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - zone.js MIT The MIT License diff --git a/498.8d8704bd8d0cc999.js b/498.8d8704bd8d0cc999.js deleted file mode 100644 index 6a5d3e791..000000000 --- a/498.8d8704bd8d0cc999.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdemo_maps=self.webpackChunkdemo_maps||[]).push([[498],{3772:(J,ee,U)=>{var D="function"==typeof Map&&Map.prototype,S=Object.getOwnPropertyDescriptor&&D?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,_=D&&S&&"function"==typeof S.get?S.get:null,O=D&&Map.prototype.forEach,Q="function"==typeof Set&&Set.prototype,L=Object.getOwnPropertyDescriptor&&Q?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Y=Q&&L&&"function"==typeof L.get?L.get:null,k=Q&&Set.prototype.forEach,K="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,re="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,g=Boolean.prototype.valueOf,m=Object.prototype.toString,t=Function.prototype.toString,o=String.prototype.match,i=String.prototype.slice,f=String.prototype.replace,u=String.prototype.toUpperCase,e=String.prototype.toLowerCase,s=RegExp.prototype.test,r=Array.prototype.concat,c=Array.prototype.join,x=Array.prototype.slice,F=Math.floor,$="function"==typeof BigInt?BigInt.prototype.valueOf:null,y=Object.getOwnPropertySymbols,V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,q="function"==typeof Symbol&&"object"==typeof Symbol.iterator,R="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol,1)?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,G=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function W(n,a){if(n===1/0||n===-1/0||n!=n||n&&n>-1e3&&n<1e3||s.call(/e/,a))return a;var P=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof n){var z=n<0?-F(-n):F(n);if(z!==n){var j=String(z),A=i.call(a,j.length+1);return f.call(j,P,"$&_")+"."+f.call(f.call(A,/([0-9]{3})/g,"$&_"),/_$/,"")}}return f.call(a,P,"$&_")}var l=U(4654),d=l.custom,v=H(d)?d:null;function E(n,a,P){var z="double"===(P.quoteStyle||a)?'"':"'";return z+n+z}function h(n){return f.call(String(n),/"/g,""")}function w(n){return!("[object Array]"!==ie(n)||R&&"object"==typeof n&&R in n)}function T(n){return!("[object RegExp]"!==ie(n)||R&&"object"==typeof n&&R in n)}function H(n){if(q)return n&&"object"==typeof n&&n instanceof Symbol;if("symbol"==typeof n)return!0;if(!n||"object"!=typeof n||!V)return!1;try{return V.call(n),!0}catch{}return!1}J.exports=function n(a,P,z,j){var A=P||{};if(X(A,"quoteStyle")&&"single"!==A.quoteStyle&&"double"!==A.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(X(A,"maxStringLength")&&("number"==typeof A.maxStringLength?A.maxStringLength<0&&A.maxStringLength!==1/0:null!==A.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ue=!X(A,"customInspect")||A.customInspect;if("boolean"!=typeof ue&&"symbol"!==ue)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(X(A,"indent")&&null!==A.indent&&"\t"!==A.indent&&!(parseInt(A.indent,10)===A.indent&&A.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(X(A,"numericSeparator")&&"boolean"!=typeof A.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var he=A.numericSeparator;if(typeof a>"u")return"undefined";if(null===a)return"null";if("boolean"==typeof a)return a?"true":"false";if("string"==typeof a)return Ie(a,A);if("number"==typeof a){if(0===a)return 1/0/a>0?"0":"-0";var oe=String(a);return he?W(a,oe):oe}if("bigint"==typeof a){var le=String(a)+"n";return he?W(a,le):le}var Ce=typeof A.depth>"u"?5:A.depth;if(typeof z>"u"&&(z=0),z>=Ce&&Ce>0&&"object"==typeof a)return w(a)?"[Array]":"[Object]";var pe=function Ke(n,a){var P;if("\t"===n.indent)P="\t";else{if(!("number"==typeof n.indent&&n.indent>0))return null;P=c.call(Array(n.indent+1)," ")}return{base:P,prev:c.call(Array(a+1),P)}}(A,z);if(typeof j>"u")j=[];else if(ce(j,a)>=0)return"[Circular]";function se(ye,we,Ze){if(we&&(j=x.call(j)).push(we),Ze){var _e={depth:A.depth};return X(A,"quoteStyle")&&(_e.quoteStyle=A.quoteStyle),n(ye,_e,z+1,j)}return n(ye,A,z+1,j)}if("function"==typeof a&&!T(a)){var Re=function me(n){if(n.name)return n.name;var a=o.call(t.call(n),/^function\s*([\w$]+)/);return a?a[1]:null}(a),Pe=ge(a,se);return"[Function"+(Re?": "+Re:" (anonymous)")+"]"+(Pe.length>0?" { "+c.call(Pe,", ")+" }":"")}if(H(a)){var $e=q?f.call(String(a),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(a);return"object"!=typeof a||q?$e:de($e)}if(function Qe(n){return!(!n||"object"!=typeof n)&&(typeof HTMLElement<"u"&&n instanceof HTMLElement||"string"==typeof n.nodeName&&"function"==typeof n.getAttribute)}(a)){for(var ve="<"+e.call(String(a.nodeName)),Ae=a.attributes||[],Se=0;Se<Ae.length;Se++)ve+=" "+Ae[Se].name+"="+E(h(Ae[Se].value),"double",A);return ve+=">",a.childNodes&&a.childNodes.length&&(ve+="..."),ve+"</"+e.call(String(a.nodeName))+">"}if(w(a)){if(0===a.length)return"[]";var Fe=ge(a,se);return pe&&!function Ge(n){for(var a=0;a<n.length;a++)if(ce(n[a],"\n")>=0)return!1;return!0}(Fe)?"["+be(Fe,pe)+"]":"[ "+c.call(Fe,", ")+" ]"}if(function N(n){return!("[object Error]"!==ie(n)||R&&"object"==typeof n&&R in n)}(a)){var Ee=ge(a,se);return"cause"in Error.prototype||!("cause"in a)||C.call(a,"cause")?0===Ee.length?"["+String(a)+"]":"{ ["+String(a)+"] "+c.call(Ee,", ")+" }":"{ ["+String(a)+"] "+c.call(r.call("[cause]: "+se(a.cause),Ee),", ")+" }"}if("object"==typeof a&&ue){if(v&&"function"==typeof a[v]&&l)return l(a,{depth:Ce-z});if("symbol"!==ue&&"function"==typeof a.inspect)return a.inspect()}if(function xe(n){if(!_||!n||"object"!=typeof n)return!1;try{_.call(n);try{Y.call(n)}catch{return!0}return n instanceof Map}catch{}return!1}(a)){var Le=[];return O&&O.call(a,function(ye,we){Le.push(se(we,a,!0)+" => "+se(ye,a))}),De("Map",_.call(a),Le,pe)}if(function He(n){if(!Y||!n||"object"!=typeof n)return!1;try{Y.call(n);try{_.call(n)}catch{return!0}return n instanceof Set}catch{}return!1}(a)){var qe=[];return k&&k.call(a,function(ye){qe.push(se(ye,a))}),De("Set",Y.call(a),qe,pe)}if(function ze(n){if(!K||!n||"object"!=typeof n)return!1;try{K.call(n,K);try{re.call(n,re)}catch{return!0}return n instanceof WeakMap}catch{}return!1}(a))return Oe("WeakMap");if(function Ue(n){if(!re||!n||"object"!=typeof n)return!1;try{re.call(n,re);try{K.call(n,K)}catch{return!0}return n instanceof WeakSet}catch{}return!1}(a))return Oe("WeakSet");if(function ke(n){if(!p||!n||"object"!=typeof n)return!1;try{return p.call(n),!0}catch{}return!1}(a))return Oe("WeakRef");if(function Z(n){return!("[object Number]"!==ie(n)||R&&"object"==typeof n&&R in n)}(a))return de(se(Number(a)));if(function ne(n){if(!n||"object"!=typeof n||!$)return!1;try{return $.call(n),!0}catch{}return!1}(a))return de(se($.call(a)));if(function I(n){return!("[object Boolean]"!==ie(n)||R&&"object"==typeof n&&R in n)}(a))return de(g.call(a));if(function te(n){return!("[object String]"!==ie(n)||R&&"object"==typeof n&&R in n)}(a))return de(se(String(a)));if(typeof window<"u"&&a===window)return"{ [object Window] }";if(a===global)return"{ [object globalThis] }";if(!function M(n){return!("[object Date]"!==ie(n)||R&&"object"==typeof n&&R in n)}(a)&&!T(a)){var Me=ge(a,se),We=G?G(a)===Object.prototype:a instanceof Object||a.constructor===Object,Ne=a instanceof Object?"":"null prototype",Be=!We&&R&&Object(a)===a&&R in a?i.call(ie(a),8,-1):Ne?"Object":"",Te=(We||"function"!=typeof a.constructor?"":a.constructor.name?a.constructor.name+" ":"")+(Be||Ne?"["+c.call(r.call([],Be||[],Ne||[]),": ")+"] ":"");return 0===Me.length?Te+"{}":pe?Te+"{"+be(Me,pe)+"}":Te+"{ "+c.call(Me,", ")+" }"}return String(a)};var fe=Object.prototype.hasOwnProperty||function(n){return n in this};function X(n,a){return fe.call(n,a)}function ie(n){return m.call(n)}function ce(n,a){if(n.indexOf)return n.indexOf(a);for(var P=0,z=n.length;P<z;P++)if(n[P]===a)return P;return-1}function Ie(n,a){if(n.length>a.maxStringLength){var P=n.length-a.maxStringLength,z="... "+P+" more character"+(P>1?"s":"");return Ie(i.call(n,0,a.maxStringLength),a)+z}return E(f.call(f.call(n,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ve),"single",a)}function Ve(n){var a=n.charCodeAt(0),P={8:"b",9:"t",10:"n",12:"f",13:"r"}[a];return P?"\\"+P:"\\x"+(a<16?"0":"")+u.call(a.toString(16))}function de(n){return"Object("+n+")"}function Oe(n){return n+" { ? }"}function De(n,a,P,z){return n+" ("+a+") {"+(z?be(P,z):c.call(P,", "))+"}"}function be(n,a){if(0===n.length)return"";var P="\n"+a.prev+a.base;return P+c.call(n,","+P)+"\n"+a.prev}function ge(n,a){var P=w(n),z=[];if(P){z.length=n.length;for(var j=0;j<n.length;j++)z[j]=X(n,j)?a(n[j],n):""}var ue,A="function"==typeof y?y(n):[];if(q){ue={};for(var he=0;he<A.length;he++)ue["$"+A[he]]=A[he]}for(var oe in n)X(n,oe)&&(P&&String(Number(oe))===oe&&oe<n.length||q&&ue["$"+oe]instanceof Symbol||(s.call(/[^\w$]/,oe)?z.push(a(oe,n)+": "+a(n[oe],n)):z.push(oe+": "+a(n[oe],n))));if("function"==typeof y)for(var le=0;le<A.length;le++)C.call(n,A[le])&&z.push("["+a(A[le])+"]: "+a(n[A[le]],n));return z}},1362:(J,ee,U)=>{"use strict";var D=U(2903),S=U(4082),_=U(3772),O=D("%TypeError%"),Q=D("%WeakMap%",!0),L=D("%Map%",!0),Y=S("WeakMap.prototype.get",!0),k=S("WeakMap.prototype.set",!0),ae=S("WeakMap.prototype.has",!0),K=S("Map.prototype.get",!0),B=S("Map.prototype.set",!0),re=S("Map.prototype.has",!0),b=function(t,o){for(var f,i=t;null!==(f=i.next);i=f)if(f.key===o)return i.next=f.next,f.next=t.next,t.next=f,f};J.exports=function(){var o,i,f,u={assert:function(e){if(!u.has(e))throw new O("Side channel does not contain "+_(e))},get:function(e){if(Q&&e&&("object"==typeof e||"function"==typeof e)){if(o)return Y(o,e)}else if(L){if(i)return K(i,e)}else if(f)return function(t,o){var i=b(t,o);return i&&i.value}(f,e)},has:function(e){if(Q&&e&&("object"==typeof e||"function"==typeof e)){if(o)return ae(o,e)}else if(L){if(i)return re(i,e)}else if(f)return function(t,o){return!!b(t,o)}(f,e);return!1},set:function(e,s){Q&&e&&("object"==typeof e||"function"==typeof e)?(o||(o=new Q),k(o,e,s)):L?(i||(i=new L),B(i,e,s)):(f||(f={key:{},next:null}),function(t,o,i){var f=b(t,o);f?f.value=i:t.next={key:o,next:t.next,value:i}}(f,e,s))}};return u}},9410:function(J,ee,U){var D;J=U.nmd(J),function(S){"object"==typeof global&&global;var L,Y=2147483647,k=36,K=26,B=38,re=700,m=/^xn--/,t=/[^\x20-\x7E]/,o=/[\x2E\u3002\uFF0E\uFF61]/g,i={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=k-1,u=Math.floor,e=String.fromCharCode;function r(l){throw new RangeError(i[l])}function c(l,d){for(var v=l.length,E=[];v--;)E[v]=d(l[v]);return E}function x(l,d){var v=l.split("@"),E="";return v.length>1&&(E=v[0]+"@",l=v[1]),E+c((l=l.replace(o,".")).split("."),d).join(".")}function F(l){for(var h,w,d=[],v=0,E=l.length;v<E;)(h=l.charCodeAt(v++))>=55296&&h<=56319&&v<E?56320==(64512&(w=l.charCodeAt(v++)))?d.push(((1023&h)<<10)+(1023&w)+65536):(d.push(h),v--):d.push(h);return d}function $(l){return c(l,function(d){var v="";return d>65535&&(v+=e((d-=65536)>>>10&1023|55296),d=56320|1023&d),v+e(d)}).join("")}function y(l){return l-48<10?l-22:l-65<26?l-65:l-97<26?l-97:k}function V(l,d){return l+22+75*(l<26)-((0!=d)<<5)}function q(l,d,v){var E=0;for(l=v?u(l/re):l>>1,l+=u(l/d);l>f*K>>1;E+=k)l=u(l/f);return u(E+(f+1)*l/(l+B))}function R(l){var E,T,N,te,Z,I,H,ne,fe,X,d=[],v=l.length,h=0,w=128,M=72;for((T=l.lastIndexOf("-"))<0&&(T=0),N=0;N<T;++N)l.charCodeAt(N)>=128&&r("not-basic"),d.push(l.charCodeAt(N));for(te=T>0?T+1:0;te<v;){for(Z=h,I=1,H=k;te>=v&&r("invalid-input"),((ne=y(l.charCodeAt(te++)))>=k||ne>u((Y-h)/I))&&r("overflow"),h+=ne*I,!(ne<(fe=H<=M?1:H>=M+K?K:H-M));H+=k)I>u(Y/(X=k-fe))&&r("overflow"),I*=X;M=q(h-Z,E=d.length+1,0==Z),u(h/E)>Y-w&&r("overflow"),w+=u(h/E),h%=E,d.splice(h++,0,w)}return $(d)}function C(l){var d,v,E,h,w,M,T,N,te,Z,I,ne,fe,X,ie,H=[];for(ne=(l=F(l)).length,d=128,v=0,w=72,M=0;M<ne;++M)(I=l[M])<128&&H.push(e(I));for(E=h=H.length,h&&H.push("-");E<ne;){for(T=Y,M=0;M<ne;++M)(I=l[M])>=d&&I<T&&(T=I);for(T-d>u((Y-v)/(fe=E+1))&&r("overflow"),v+=(T-d)*fe,d=T,M=0;M<ne;++M)if((I=l[M])<d&&++v>Y&&r("overflow"),I==d){for(N=v,te=k;!(N<(Z=te<=w?1:te>=w+K?K:te-w));te+=k)H.push(e(V(Z+(ie=N-Z)%(X=k-Z),0))),N=u(ie/X);H.push(e(V(N,0))),w=q(v,fe,E==h),v=0,++E}++v,++d}return H.join("")}L={version:"1.4.1",ucs2:{decode:F,encode:$},decode:R,encode:C,toASCII:function W(l){return x(l,function(d){return t.test(d)?"xn--"+C(d):d})},toUnicode:function G(l){return x(l,function(d){return m.test(d)?R(d.slice(4).toLowerCase()):d})}},void 0!==(D=function(){return L}.call(ee,U,ee,J))&&(J.exports=D)}()},603:J=>{"use strict";var ee=String.prototype.replace,U=/%20/g;J.exports={default:"RFC3986",formatters:{RFC1738:function(S){return ee.call(S,U,"+")},RFC3986:function(S){return String(S)}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},2242:(J,ee,U)=>{"use strict";var D=U(8038),S=U(2888),_=U(603);J.exports={formats:_,parse:S,stringify:D}},2888:(J,ee,U)=>{"use strict";var D=U(2677),S=Object.prototype.hasOwnProperty,_=Array.isArray,O={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:D.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},L=function(b,p){return b&&"string"==typeof b&&p.comma&&b.indexOf(",")>-1?b.split(","):b},B=function(p,g,m,t){if(p){var o=m.allowDots?p.replace(/\.([^.[]+)/g,"[$1]"):p,f=/(\[[^[\]]*])/g,u=m.depth>0&&/(\[[^[\]]*])/.exec(o),e=u?o.slice(0,u.index):o,s=[];if(e){if(!m.plainObjects&&S.call(Object.prototype,e)&&!m.allowPrototypes)return;s.push(e)}for(var r=0;m.depth>0&&null!==(u=f.exec(o))&&r<m.depth;){if(r+=1,!m.plainObjects&&S.call(Object.prototype,u[1].slice(1,-1))&&!m.allowPrototypes)return;s.push(u[1])}return u&&s.push("["+o.slice(u.index)+"]"),function(b,p,g,m){for(var t=m?p:L(p,g),o=b.length-1;o>=0;--o){var i,f=b[o];if("[]"===f&&g.parseArrays)i=[].concat(t);else{i=g.plainObjects?Object.create(null):{};var u="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,e=parseInt(u,10);g.parseArrays||""!==u?!isNaN(e)&&f!==u&&String(e)===u&&e>=0&&g.parseArrays&&e<=g.arrayLimit?(i=[])[e]=t:"__proto__"!==u&&(i[u]=t):i={0:t}}t=i}return t}(s,g,m,t)}};J.exports=function(b,p){var g=function(p){if(!p)return O;if(null!=p.decoder&&"function"!=typeof p.decoder)throw new TypeError("Decoder has to be a function.");if(typeof p.charset<"u"&&"utf-8"!==p.charset&&"iso-8859-1"!==p.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:typeof p.allowDots>"u"?O.allowDots:!!p.allowDots,allowPrototypes:"boolean"==typeof p.allowPrototypes?p.allowPrototypes:O.allowPrototypes,allowSparse:"boolean"==typeof p.allowSparse?p.allowSparse:O.allowSparse,arrayLimit:"number"==typeof p.arrayLimit?p.arrayLimit:O.arrayLimit,charset:typeof p.charset>"u"?O.charset:p.charset,charsetSentinel:"boolean"==typeof p.charsetSentinel?p.charsetSentinel:O.charsetSentinel,comma:"boolean"==typeof p.comma?p.comma:O.comma,decoder:"function"==typeof p.decoder?p.decoder:O.decoder,delimiter:"string"==typeof p.delimiter||D.isRegExp(p.delimiter)?p.delimiter:O.delimiter,depth:"number"==typeof p.depth||!1===p.depth?+p.depth:O.depth,ignoreQueryPrefix:!0===p.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof p.interpretNumericEntities?p.interpretNumericEntities:O.interpretNumericEntities,parameterLimit:"number"==typeof p.parameterLimit?p.parameterLimit:O.parameterLimit,parseArrays:!1!==p.parseArrays,plainObjects:"boolean"==typeof p.plainObjects?p.plainObjects:O.plainObjects,strictNullHandling:"boolean"==typeof p.strictNullHandling?p.strictNullHandling:O.strictNullHandling}}(p);if(""===b||null===b||typeof b>"u")return g.plainObjects?Object.create(null):{};for(var m="string"==typeof b?function(p,g){var u,m={__proto__:null},i=(g.ignoreQueryPrefix?p.replace(/^\?/,""):p).split(g.delimiter,g.parameterLimit===1/0?void 0:g.parameterLimit),f=-1,e=g.charset;if(g.charsetSentinel)for(u=0;u<i.length;++u)0===i[u].indexOf("utf8=")&&("utf8=%E2%9C%93"===i[u]?e="utf-8":"utf8=%26%2310003%3B"===i[u]&&(e="iso-8859-1"),f=u,u=i.length);for(u=0;u<i.length;++u)if(u!==f){var x,F,s=i[u],r=s.indexOf("]="),c=-1===r?s.indexOf("="):r+1;-1===c?(x=g.decoder(s,O.decoder,e,"key"),F=g.strictNullHandling?null:""):(x=g.decoder(s.slice(0,c),O.decoder,e,"key"),F=D.maybeMap(L(s.slice(c+1),g),function($){return g.decoder($,O.decoder,e,"value")})),F&&g.interpretNumericEntities&&"iso-8859-1"===e&&(F=F.replace(/&#(\d+);/g,function(p,g){return String.fromCharCode(parseInt(g,10))})),s.indexOf("[]=")>-1&&(F=_(F)?[F]:F),m[x]=S.call(m,x)?D.combine(m[x],F):F}return m}(b,g):b,t=g.plainObjects?Object.create(null):{},o=Object.keys(m),i=0;i<o.length;++i){var f=o[i],u=B(f,m[f],g,"string"==typeof b);t=D.merge(t,u,g)}return!0===g.allowSparse?t:D.compact(t)}},8038:(J,ee,U)=>{"use strict";var D=U(1362),S=U(2677),_=U(603),O=Object.prototype.hasOwnProperty,Q={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,o){return t+"["+o+"]"},repeat:function(t){return t}},L=Array.isArray,Y=Array.prototype.push,k=function(m,t){Y.apply(m,L(t)?t:[t])},ae=Date.prototype.toISOString,K=_.default,B={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:S.encode,encodeValuesOnly:!1,format:K,formatter:_.formatters[K],indices:!1,serializeDate:function(t){return ae.call(t)},skipNulls:!1,strictNullHandling:!1},b={},p=function m(t,o,i,f,u,e,s,r,c,x,F,$,y,V,q,R){for(var C=t,G=R,W=0,l=!1;void 0!==(G=G.get(b))&&!l;){var d=G.get(t);if(W+=1,typeof d<"u"){if(d===W)throw new RangeError("Cyclic object value");l=!0}typeof G.get(b)>"u"&&(W=0)}if("function"==typeof r?C=r(o,C):C instanceof Date?C=F(C):"comma"===i&&L(C)&&(C=S.maybeMap(C,function(H){return H instanceof Date?F(H):H})),null===C){if(u)return s&&!V?s(o,B.encoder,q,"key",$):o;C=""}if(function(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"symbol"==typeof t||"bigint"==typeof t}(C)||S.isBuffer(C))return s?[y(V?o:s(o,B.encoder,q,"key",$))+"="+y(s(C,B.encoder,q,"value",$))]:[y(o)+"="+y(String(C))];var h,E=[];if(typeof C>"u")return E;if("comma"===i&&L(C))V&&s&&(C=S.maybeMap(C,s)),h=[{value:C.length>0?C.join(",")||null:void 0}];else if(L(r))h=r;else{var w=Object.keys(C);h=c?w.sort(c):w}for(var M=f&&L(C)&&1===C.length?o+"[]":o,T=0;T<h.length;++T){var N=h[T],te="object"==typeof N&&typeof N.value<"u"?N.value:C[N];if(!e||null!==te){var Z=L(C)?"function"==typeof i?i(M,N):M:M+(x?"."+N:"["+N+"]");R.set(t,W);var I=D();I.set(b,R),k(E,m(te,Z,i,f,u,e,"comma"===i&&V&&L(C)?null:s,r,c,x,F,$,y,V,q,I))}}return E};J.exports=function(m,t){var f,o=m,i=function(t){if(!t)return B;if(null!==t.encoder&&typeof t.encoder<"u"&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var o=t.charset||B.charset;if(typeof t.charset<"u"&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=_.default;if(typeof t.format<"u"){if(!O.call(_.formatters,t.format))throw new TypeError("Unknown format option provided.");i=t.format}var f=_.formatters[i],u=B.filter;return("function"==typeof t.filter||L(t.filter))&&(u=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:B.addQueryPrefix,allowDots:typeof t.allowDots>"u"?B.allowDots:!!t.allowDots,charset:o,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:B.charsetSentinel,delimiter:typeof t.delimiter>"u"?B.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:B.encode,encoder:"function"==typeof t.encoder?t.encoder:B.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:B.encodeValuesOnly,filter:u,format:i,formatter:f,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:B.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:B.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:B.strictNullHandling}}(t);"function"==typeof i.filter?o=(0,i.filter)("",o):L(i.filter)&&(f=i.filter);var e=[];if("object"!=typeof o||null===o)return"";var r=Q[t&&t.arrayFormat in Q?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices"];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c="comma"===r&&t&&t.commaRoundTrip;f||(f=Object.keys(o)),i.sort&&f.sort(i.sort);for(var x=D(),F=0;F<f.length;++F){var $=f[F];i.skipNulls&&null===o[$]||k(e,p(o[$],$,r,c,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,x))}var y=e.join(i.delimiter),V=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&(V+="iso-8859-1"===i.charset?"utf8=%26%2310003%3B&":"utf8=%E2%9C%93&"),y.length>0?V+y:""}},2677:(J,ee,U)=>{"use strict";var D=U(603),S=Object.prototype.hasOwnProperty,_=Array.isArray,O=function(){for(var m=[],t=0;t<256;++t)m.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return m}(),L=function(t,o){for(var i=o&&o.plainObjects?Object.create(null):{},f=0;f<t.length;++f)typeof t[f]<"u"&&(i[f]=t[f]);return i};J.exports={arrayToObject:L,assign:function(t,o){return Object.keys(o).reduce(function(i,f){return i[f]=o[f],i},t)},combine:function(t,o){return[].concat(t,o)},compact:function(t){for(var o=[{obj:{o:t},prop:"o"}],i=[],f=0;f<o.length;++f)for(var u=o[f],e=u.obj[u.prop],s=Object.keys(e),r=0;r<s.length;++r){var c=s[r],x=e[c];"object"==typeof x&&null!==x&&-1===i.indexOf(x)&&(o.push({obj:e,prop:c}),i.push(x))}return function(t){for(;t.length>1;){var o=t.pop(),i=o.obj[o.prop];if(_(i)){for(var f=[],u=0;u<i.length;++u)typeof i[u]<"u"&&f.push(i[u]);o.obj[o.prop]=f}}}(o),t},decode:function(m,t,o){var i=m.replace(/\+/g," ");if("iso-8859-1"===o)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},encode:function(t,o,i,f,u){if(0===t.length)return t;var e=t;if("symbol"==typeof t?e=Symbol.prototype.toString.call(t):"string"!=typeof t&&(e=String(t)),"iso-8859-1"===i)return escape(e).replace(/%u[0-9a-f]{4}/gi,function(x){return"%26%23"+parseInt(x.slice(2),16)+"%3B"});for(var s="",r=0;r<e.length;++r){var c=e.charCodeAt(r);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||u===D.RFC1738&&(40===c||41===c)?s+=e.charAt(r):c<128?s+=O[c]:c<2048?s+=O[192|c>>6]+O[128|63&c]:c<55296||c>=57344?s+=O[224|c>>12]+O[128|c>>6&63]+O[128|63&c]:(c=65536+((1023&c)<<10|1023&e.charCodeAt(r+=1)),s+=O[240|c>>18]+O[128|c>>12&63]+O[128|c>>6&63]+O[128|63&c])}return s},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,o){if(_(t)){for(var i=[],f=0;f<t.length;f+=1)i.push(o(t[f]));return i}return o(t)},merge:function m(t,o,i){if(!o)return t;if("object"!=typeof o){if(_(t))t.push(o);else{if(!t||"object"!=typeof t)return[t,o];(i&&(i.plainObjects||i.allowPrototypes)||!S.call(Object.prototype,o))&&(t[o]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(o);var f=t;return _(t)&&!_(o)&&(f=L(t,i)),_(t)&&_(o)?(o.forEach(function(u,e){if(S.call(t,e)){var s=t[e];s&&"object"==typeof s&&u&&"object"==typeof u?t[e]=m(s,u,i):t.push(u)}else t[e]=u}),t):Object.keys(o).reduce(function(u,e){var s=o[e];return u[e]=S.call(u,e)?m(u[e],s,i):s,u},f)}}},7498:(J,ee,U)=>{"use strict";var D=U(9410);function S(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var _=/^([a-z0-9.+-]+:)/i,O=/:[0-9]*$/,Q=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Y=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),k=["'"].concat(Y),ae=["%","/","?",";","#"].concat(k),K=["/","?","#"],re=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},t=U(2242);function o(e,s,r){if(e&&"object"==typeof e&&e instanceof S)return e;var c=new S;return c.parse(e,s,r),c}S.prototype.parse=function(e,s,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var c=e.indexOf("?"),x=-1!==c&&c<e.indexOf("#")?"?":"#",F=e.split(x);F[0]=F[0].replace(/\\/g,"/");var y=e=F.join(x);if(y=y.trim(),!r&&1===e.split("#").length){var V=Q.exec(y);if(V)return this.path=y,this.href=y,this.pathname=V[1],V[2]?(this.search=V[2],this.query=s?t.parse(this.search.substr(1)):this.search.substr(1)):s&&(this.search="",this.query={}),this}var q=_.exec(y);if(q){var R=(q=q[0]).toLowerCase();this.protocol=R,y=y.substr(q.length)}if(r||q||y.match(/^\/\/[^@/]+@[^@/]+/)){var C="//"===y.substr(0,2);C&&(!q||!g[q])&&(y=y.substr(2),this.slashes=!0)}if(!g[q]&&(C||q&&!m[q])){for(var G=-1,W=0;W<K.length;W++)-1!==(l=y.indexOf(K[W]))&&(-1===G||l<G)&&(G=l);var d,v;for(-1!==(v=-1===G?y.lastIndexOf("@"):y.lastIndexOf("@",G))&&(d=y.slice(0,v),y=y.slice(v+1),this.auth=decodeURIComponent(d)),G=-1,W=0;W<ae.length;W++){var l;-1!==(l=y.indexOf(ae[W]))&&(-1===G||l<G)&&(G=l)}-1===G&&(G=y.length),this.host=y.slice(0,G),y=y.slice(G),this.parseHost(),this.hostname=this.hostname||"";var E="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!E)for(var h=this.hostname.split(/\./),w=(W=0,h.length);W<w;W++){var M=h[W];if(M&&!M.match(re)){for(var T="",N=0,te=M.length;N<te;N++)M.charCodeAt(N)>127?T+="x":T+=M[N];if(!T.match(re)){var Z=h.slice(0,W),I=h.slice(W+1),H=M.match(b);H&&(Z.push(H[1]),I.unshift(H[2])),I.length&&(y="/"+I.join(".")+y),this.hostname=Z.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),E||(this.hostname=D.toASCII(this.hostname)),this.host=(this.hostname||"")+(this.port?":"+this.port:""),this.href+=this.host,E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!p[R])for(W=0,w=k.length;W<w;W++){var X=k[W];if(-1!==y.indexOf(X)){var ie=encodeURIComponent(X);ie===X&&(ie=escape(X)),y=y.split(X).join(ie)}}var me=y.indexOf("#");-1!==me&&(this.hash=y.substr(me),y=y.slice(0,me));var ce=y.indexOf("?");return-1!==ce?(this.search=y.substr(ce),this.query=y.substr(ce+1),s&&(this.query=t.parse(this.query)),y=y.slice(0,ce)):s&&(this.search="",this.query={}),y&&(this.pathname=y),m[R]&&this.hostname&&!this.pathname&&(this.pathname="/"),(this.pathname||this.search)&&(this.path=(this.pathname||"")+(this.search||"")),this.href=this.format(),this},S.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var s=this.protocol||"",r=this.pathname||"",c=this.hash||"",x=!1,F="";this.host?x=e+this.host:this.hostname&&(x=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(F=t.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var $=this.search||F&&"?"+F||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||m[s])&&!1!==x?(x="//"+(x||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):x||(x=""),c&&"#"!==c.charAt(0)&&(c="#"+c),$&&"?"!==$.charAt(0)&&($="?"+$),s+x+(r=r.replace(/[?#]/g,function(y){return encodeURIComponent(y)}))+($=$.replace("#","%23"))+c},S.prototype.resolve=function(e){return this.resolveObject(o(e,!1,!0)).format()},S.prototype.resolveObject=function(e){if("string"==typeof e){var s=new S;s.parse(e,!1,!0),e=s}for(var r=new S,c=Object.keys(this),x=0;x<c.length;x++){var F=c[x];r[F]=this[F]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var $=Object.keys(e),y=0;y<$.length;y++){var V=$[y];"protocol"!==V&&(r[V]=e[V])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var q=Object.keys(e),R=0;R<q.length;R++){var C=q[R];r[C]=e[C]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var w=(e.pathname||"").split("/");w.length&&!(e.host=w.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==w[0]&&w.unshift(""),w.length<2&&w.unshift(""),r.pathname=w.join("/")}return r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,(r.pathname||r.search)&&(r.path=(r.pathname||"")+(r.search||"")),r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var l=r.pathname&&"/"===r.pathname.charAt(0),d=e.host||e.pathname&&"/"===e.pathname.charAt(0),v=d||l||r.host&&e.pathname,E=v,h=r.pathname&&r.pathname.split("/")||[],M=(w=e.pathname&&e.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(M&&(r.hostname="",r.port=null,r.host&&(""===h[0]?h[0]=r.host:h.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===w[0]?w[0]=e.host:w.unshift(e.host)),e.host=null),v=v&&(""===w[0]||""===h[0])),d)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,h=w;else if(w.length)h||(h=[]),h.pop(),h=h.concat(w),r.search=e.search,r.query=e.query;else if(null!=e.search)return M&&(r.host=h.shift(),r.hostname=r.host,(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname)),r.search=e.search,r.query=e.query,(null!==r.pathname||null!==r.search)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!h.length)return r.pathname=null,r.path=r.search?"/"+r.search:null,r.href=r.format(),r;for(var N=h.slice(-1)[0],te=(r.host||e.host||h.length>1)&&("."===N||".."===N)||""===N,Z=0,I=h.length;I>=0;I--)"."===(N=h[I])?h.splice(I,1):".."===N?(h.splice(I,1),Z++):Z&&(h.splice(I,1),Z--);if(!v&&!E)for(;Z--;Z)h.unshift("..");v&&""!==h[0]&&(!h[0]||"/"!==h[0].charAt(0))&&h.unshift(""),te&&"/"!==h.join("/").substr(-1)&&h.push("");var T,H=""===h[0]||h[0]&&"/"===h[0].charAt(0);return M&&(r.hostname=H?"":h.length?h.shift():"",r.host=r.hostname,(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname)),(v=v||r.host&&h.length)&&!H&&h.unshift(""),h.length>0?r.pathname=h.join("/"):(r.pathname=null,r.path=null),(null!==r.pathname||null!==r.search)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},S.prototype.parseHost=function(){var e=this.host,s=O.exec(e);s&&(":"!==(s=s[0])&&(this.port=s.substr(1)),e=e.substr(0,e.length-s.length)),e&&(this.hostname=e)},ee.parse=o,ee.resolve=function f(e,s){return o(e,!1,!0).resolve(s)},ee.resolveObject=function u(e,s){return e?o(e,!1,!0).resolveObject(s):s},ee.format=function i(e){return"string"==typeof e&&(e=o(e)),e instanceof S?e.format():S.prototype.format.call(e)},ee.Url=S},4654:()=>{}}]); \ No newline at end of file diff --git a/733.fed1fe1ddbd0e2f8.js b/733.fed1fe1ddbd0e2f8.js deleted file mode 100644 index 22a32599a..000000000 --- a/733.fed1fe1ddbd0e2f8.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdemo_maps=self.webpackChunkdemo_maps||[]).push([[733],{4733:(l,f,u)=>{var o=u(9979),h=u(7498),e=l.exports;for(var r in o)o.hasOwnProperty(r)&&(e[r]=o[r]);function c(t){if("string"==typeof t&&(t=h.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}e.request=function(t,n){return t=c(t),o.request.call(this,t,n)},e.get=function(t,n){return t=c(t),o.get.call(this,t,n)}}}]); \ No newline at end of file diff --git a/82.b35fbd97192e321c.js b/82.b35fbd97192e321c.js deleted file mode 100644 index 7c1c8ed87..000000000 --- a/82.b35fbd97192e321c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdemo_maps=self.webpackChunkdemo_maps||[]).push([[82],{4082:(y,b,t)=>{var r=t(2903),e=t(2344),i=e(r("String.prototype.indexOf"));y.exports=function(p,l){var u=r(p,!!l);return"function"==typeof u&&i(p,".prototype.")>-1?e(u):u}},2344:(y,b,t)=>{var r=t(9709),e=t(2903),i=t(4030),c=e("%TypeError%"),p=e("%Function.prototype.apply%"),l=e("%Function.prototype.call%"),u=e("%Reflect.apply%",!0)||r.call(l,p),o=e("%Object.defineProperty%",!0),n=e("%Math.max%");if(o)try{o({},"a",{value:1})}catch{o=null}y.exports=function(g){if("function"!=typeof g)throw new c("a function is required");var m=u(r,l,arguments);return i(m,1+n(0,g.length-(arguments.length-1)),!0)};var f=function(){return u(r,p,arguments)};o?o(y.exports,"apply",{value:f}):y.exports.apply=f},3039:(y,b,t)=>{var r=t(4843)(),e=t(2903),i=r&&e("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch{i=!1}var c=e("%SyntaxError%"),p=e("%TypeError%"),l=t(3668);y.exports=function(o,n,f){if(!o||"object"!=typeof o&&"function"!=typeof o)throw new p("`obj` must be an object or a function`");if("string"!=typeof n&&"symbol"!=typeof n)throw new p("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new p("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new p("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new p("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new p("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,g=arguments.length>4?arguments[4]:null,m=arguments.length>5?arguments[5]:null,A=arguments.length>6&&arguments[6],E=!!l&&l(o,n);if(i)i(o,n,{configurable:null===m&&E?E.configurable:!m,enumerable:null===a&&E?E.enumerable:!a,value:f,writable:null===g&&E?E.writable:!g});else{if(!A&&(a||g||m))throw new c("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");o[n]=f}}},5137:y=>{var t=Object.prototype.toString,r=Math.max,i=function(u,o){for(var n=[],f=0;f<u.length;f+=1)n[f]=u[f];for(var a=0;a<o.length;a+=1)n[a+u.length]=o[a];return n};y.exports=function(u){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var f,n=function(u,o){for(var n=[],f=1,a=0;f<u.length;f+=1,a+=1)n[a]=u[f];return n}(arguments),g=r(0,o.length-n.length),m=[],A=0;A<g;A++)m[A]="$"+A;if(f=Function("binder","return function ("+function(l,u){for(var o="",n=0;n<l.length;n+=1)o+=l[n],n+1<l.length&&(o+=",");return o}(m)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof f){var F=o.apply(this,i(n,arguments));return Object(F)===F?F:this}return o.apply(u,i(n,arguments))}),o.prototype){var E=function(){};E.prototype=o.prototype,f.prototype=new E,E.prototype=null}return f}},9709:(y,b,t)=>{var r=t(5137);y.exports=Function.prototype.bind||r},2903:(y,b,t)=>{var r,e=SyntaxError,i=Function,c=TypeError,p=function(S){try{return i('"use strict"; return ('+S+").constructor;")()}catch{}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch{l=null}var u=function(){throw new c},o=l?function(){try{return u}catch{try{return l(arguments,"callee").get}catch{return u}}}():u,n=t(2024)(),f=t(536)(),a=Object.getPrototypeOf||(f?function(S){return S.__proto__}:null),g={},m=typeof Uint8Array>"u"||!a?r:a(Uint8Array),A={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":n&&a?a([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":g,"%AsyncGenerator%":g,"%AsyncGeneratorFunction%":g,"%AsyncIteratorPrototype%":g,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":g,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":n&&a?a(a([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!n||!a?r:a((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!n||!a?r:a((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":n&&a?a(""[Symbol.iterator]()):r,"%Symbol%":n?Symbol:r,"%SyntaxError%":e,"%ThrowTypeError%":o,"%TypedArray%":m,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(a)try{null.error}catch(S){var E=a(a(S));A["%Error.prototype%"]=E}var F=function S(s){var d;if("%AsyncFunction%"===s)d=p("async function () {}");else if("%GeneratorFunction%"===s)d=p("function* () {}");else if("%AsyncGeneratorFunction%"===s)d=p("async function* () {}");else if("%AsyncGenerator%"===s){var v=S("%AsyncGeneratorFunction%");v&&(d=v.prototype)}else if("%AsyncIteratorPrototype%"===s){var h=S("%AsyncGenerator%");h&&a&&(d=a(h.prototype))}return A[s]=d,d},k={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=t(9709),U=t(888),M=O.call(Function.call,Array.prototype.concat),W=O.call(Function.apply,Array.prototype.splice),C=O.call(Function.call,String.prototype.replace),j=O.call(Function.call,String.prototype.slice),_=O.call(Function.call,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,J=/\\(\\)?/g,z=function(s,d){var h,v=s;if(U(k,v)&&(v="%"+(h=k[v])[0]+"%"),U(A,v)){var w=A[v];if(w===g&&(w=F(v)),typeof w>"u"&&!d)throw new c("intrinsic "+s+" exists, but is not available. Please file an issue!");return{alias:h,name:v,value:w}}throw new e("intrinsic "+s+" does not exist!")};y.exports=function(s,d){if("string"!=typeof s||0===s.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof d)throw new c('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/,s))throw new e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var v=function(s){var d=j(s,0,1),v=j(s,-1);if("%"===d&&"%"!==v)throw new e("invalid intrinsic syntax, expected closing `%`");if("%"===v&&"%"!==d)throw new e("invalid intrinsic syntax, expected opening `%`");var h=[];return C(s,L,function(w,x,P,B){h[h.length]=P?C(B,J,"$1"):x||w}),h}(s),h=v.length>0?v[0]:"",w=z("%"+h+"%",d),x=w.name,P=w.value,B=!1,N=w.alias;N&&(h=N[0],W(v,M([0,1],N)));for(var $=1,R=!0;$<v.length;$+=1){var I=v[$],T=j(I,0,1),G=j(I,-1);if(('"'===T||"'"===T||"`"===T||'"'===G||"'"===G||"`"===G)&&T!==G)throw new e("property names with quotes must have matching quotes");if(("constructor"===I||!R)&&(B=!0),U(A,x="%"+(h+="."+I)+"%"))P=A[x];else if(null!=P){if(!(I in P)){if(!d)throw new c("base intrinsic for "+s+" exists, but the property is not available.");return}if(l&&$+1>=v.length){var D=l(P,I);P=(R=!!D)&&"get"in D&&!("originalValue"in D.get)?D.get:P[I]}else R=U(P,I),P=P[I];R&&!B&&(A[x]=P)}}return P}},3668:(y,b,t)=>{var e=t(2903)("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}y.exports=e},4843:(y,b,t)=>{var e=t(2903)("%Object.defineProperty%",!0),i=function(){if(e)try{return e({},"a",{value:1}),!0}catch{return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==e([],"length",{value:1}).length}catch{return!0}},y.exports=i},536:y=>{var b={foo:{}},t=Object;y.exports=function(){return{__proto__:b}.foo===b.foo&&!({__proto__:null}instanceof t)}},2024:(y,b,t)=>{var r=typeof Symbol<"u"&&Symbol,e=t(294);y.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&e()}},294:y=>{y.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},r=Symbol("test"),e=Object(r);if("string"==typeof r||"[object Symbol]"!==Object.prototype.toString.call(r)||"[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(r in t[r]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var c=Object.getOwnPropertySymbols(t);if(1!==c.length||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var p=Object.getOwnPropertyDescriptor(t,r);if(42!==p.value||!0!==p.enumerable)return!1}return!0}},888:(y,b,t)=>{var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,i=t(9709);y.exports=i.call(r,e)},4030:(y,b,t)=>{var r=t(2903),e=t(3039),i=t(4843)(),c=t(3668),p=r("%TypeError%"),l=r("%Math.floor%");y.exports=function(o,n){if("function"!=typeof o)throw new p("`fn` is not a function");if("number"!=typeof n||n<0||n>4294967295||l(n)!==n)throw new p("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],a=!0,g=!0;if("length"in o&&c){var m=c(o,"length");m&&!m.configurable&&(a=!1),m&&!m.writable&&(g=!1)}return(a||g||!f)&&(i?e(o,"length",n,!0,!0):e(o,"length",n)),o}}}]); \ No newline at end of file diff --git a/93.828861184fae9558.js b/93.828861184fae9558.js deleted file mode 100644 index 7ef925b85..000000000 --- a/93.828861184fae9558.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdemo_maps=self.webpackChunkdemo_maps||[]).push([[93],{5974:(V,E)=>{"use strict";E.byteLength=function f(w){var k=l(w),C=k[1];return 3*(k[0]+C)/4-C},E.toByteArray=function P(w){var k,p,x=l(w),C=x[0],m=x[1],a=new j(function v(w,k,x){return 3*(k+x)/4-x}(0,C,m)),u=0,s=m>0?C-4:C;for(p=0;p<s;p+=4)k=A[w.charCodeAt(p)]<<18|A[w.charCodeAt(p+1)]<<12|A[w.charCodeAt(p+2)]<<6|A[w.charCodeAt(p+3)],a[u++]=k>>16&255,a[u++]=k>>8&255,a[u++]=255&k;return 2===m&&(k=A[w.charCodeAt(p)]<<2|A[w.charCodeAt(p+1)]>>4,a[u++]=255&k),1===m&&(k=A[w.charCodeAt(p)]<<10|A[w.charCodeAt(p+1)]<<4|A[w.charCodeAt(p+2)]>>2,a[u++]=k>>8&255,a[u++]=255&k),a},E.fromByteArray=function F(w){for(var k,x=w.length,C=x%3,m=[],a=16383,u=0,s=x-C;u<s;u+=a)m.push(D(w,u,u+a>s?s:u+a));return 1===C?m.push(b[(k=w[x-1])>>2]+b[k<<4&63]+"=="):2===C&&m.push(b[(k=(w[x-2]<<8)+w[x-1])>>10]+b[k>>4&63]+b[k<<2&63]+"="),m.join("")};for(var b=[],A=[],j=typeof Uint8Array<"u"?Uint8Array:Array,U="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=0;O<64;++O)b[O]=U[O],A[U.charCodeAt(O)]=O;function l(w){var k=w.length;if(k%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var x=w.indexOf("=");return-1===x&&(x=k),[x,x===k?0:4-x%4]}function g(w){return b[w>>18&63]+b[w>>12&63]+b[w>>6&63]+b[63&w]}function D(w,k,x){for(var m=[],a=k;a<x;a+=3)m.push(g((w[a]<<16&16711680)+(w[a+1]<<8&65280)+(255&w[a+2])));return m.join("")}A["-".charCodeAt(0)]=62,A["_".charCodeAt(0)]=63},4387:(V,E,b)=>{"use strict";var A=b(5974),j=b(3694),U="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;E.Buffer=f,E.SlowBuffer=function a(n){return+n!=n&&(n=0),f.alloc(+n)},E.INSPECT_MAX_BYTES=50;var O=2147483647;function l(n){if(n>O)throw new RangeError('The value "'+n+'" is invalid for option "size"');var e=new Uint8Array(n);return Object.setPrototypeOf(e,f.prototype),e}function f(n,e,r){if("number"==typeof n){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return D(n)}return v(n,e,r)}function v(n,e,r){if("string"==typeof n)return function F(n,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|u(n,e),t=l(r),d=t.write(n,e);return d!==r&&(t=t.slice(0,d)),t}(n,e);if(ArrayBuffer.isView(n))return function k(n){if(i(n,Uint8Array)){var e=new Uint8Array(n);return x(e.buffer,e.byteOffset,e.byteLength)}return w(n)}(n);if(null==n)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(i(n,ArrayBuffer)||n&&i(n.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(i(n,SharedArrayBuffer)||n&&i(n.buffer,SharedArrayBuffer)))return x(n,e,r);if("number"==typeof n)throw new TypeError('The "value" argument must not be of type number. Received type number');var t=n.valueOf&&n.valueOf();if(null!=t&&t!==n)return f.from(t,e,r);var d=function C(n){if(f.isBuffer(n)){var e=0|m(n.length),r=l(e);return 0===r.length||n.copy(r,0,0,e),r}return void 0!==n.length?"number"!=typeof n.length||o(n.length)?l(0):w(n):"Buffer"===n.type&&Array.isArray(n.data)?w(n.data):void 0}(n);if(d)return d;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof n[Symbol.toPrimitive])return f.from(n[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}function P(n){if("number"!=typeof n)throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function D(n){return P(n),l(n<0?0:0|m(n))}function w(n){for(var e=n.length<0?0:0|m(n.length),r=l(e),t=0;t<e;t+=1)r[t]=255&n[t];return r}function x(n,e,r){if(e<0||n.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(n.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var t;return t=void 0===e&&void 0===r?new Uint8Array(n):void 0===r?new Uint8Array(n,e):new Uint8Array(n,e,r),Object.setPrototypeOf(t,f.prototype),t}function m(n){if(n>=O)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O.toString(16)+" bytes");return 0|n}function u(n,e){if(f.isBuffer(n))return n.length;if(ArrayBuffer.isView(n)||i(n,ArrayBuffer))return n.byteLength;if("string"!=typeof n)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof n);var r=n.length,t=arguments.length>2&&!0===arguments[2];if(!t&&0===r)return 0;for(var d=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return c(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(n).length;default:if(d)return t?-1:c(n).length;e=(""+e).toLowerCase(),d=!0}}function s(n,e,r){var t=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(e>>>=0))return"";for(n||(n="utf8");;)switch(n){case"hex":return ie(this,e,r);case"utf8":case"utf-8":return oe(this,e,r);case"ascii":return ce(this,e,r);case"latin1":case"binary":return le(this,e,r);case"base64":return fe(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,e,r);default:if(t)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),t=!0}}function p(n,e,r){var t=n[e];n[e]=n[r],n[r]=t}function S(n,e,r,t,d){if(0===n.length)return-1;if("string"==typeof r?(t=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),o(r=+r)&&(r=d?0:n.length-1),r<0&&(r=n.length+r),r>=n.length){if(d)return-1;r=n.length-1}else if(r<0){if(!d)return-1;r=0}if("string"==typeof e&&(e=f.from(e,t)),f.isBuffer(e))return 0===e.length?-1:M(n,e,r,t,d);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?d?Uint8Array.prototype.indexOf.call(n,e,r):Uint8Array.prototype.lastIndexOf.call(n,e,r):M(n,[e],r,t,d);throw new TypeError("val must be string, number or Buffer")}function M(n,e,r,t,d){var ee,L=1,N=n.length,J=e.length;if(void 0!==t&&("ucs2"===(t=String(t).toLowerCase())||"ucs-2"===t||"utf16le"===t||"utf-16le"===t)){if(n.length<2||e.length<2)return-1;L=2,N/=2,J/=2,r/=2}function Q(de,pe){return 1===L?de[pe]:de.readUInt16BE(pe*L)}if(d){var te=-1;for(ee=r;ee<N;ee++)if(Q(n,ee)===Q(e,-1===te?0:ee-te)){if(-1===te&&(te=ee),ee-te+1===J)return te*L}else-1!==te&&(ee-=ee-te),te=-1}else for(r+J>N&&(r=N-J),ee=r;ee>=0;ee--){for(var re=!0,he=0;he<J;he++)if(Q(n,ee+he)!==Q(e,he)){re=!1;break}if(re)return ee}return-1}function G(n,e,r,t){r=Number(r)||0;var d=n.length-r;t?(t=Number(t))>d&&(t=d):t=d;var L=e.length;t>L/2&&(t=L/2);for(var N=0;N<t;++N){var J=parseInt(e.substr(2*N,2),16);if(o(J))return N;n[r+N]=J}return N}function H(n,e,r,t){return K(c(e,n.length-r),n,r,t)}function $(n,e,r,t){return K(function h(n){for(var e=[],r=0;r<n.length;++r)e.push(255&n.charCodeAt(r));return e}(e),n,r,t)}function z(n,e,r,t){return K(W(e),n,r,t)}function ne(n,e,r,t){return K(function R(n,e){for(var r,t,L=[],N=0;N<n.length&&!((e-=2)<0);++N)t=(r=n.charCodeAt(N))>>8,L.push(r%256),L.push(t);return L}(e,n.length-r),n,r,t)}function fe(n,e,r){return A.fromByteArray(0===e&&r===n.length?n:n.slice(e,r))}function oe(n,e,r){r=Math.min(n.length,r);for(var t=[],d=e;d<r;){var Q,ee,te,re,L=n[d],N=null,J=L>239?4:L>223?3:L>191?2:1;if(d+J<=r)switch(J){case 1:L<128&&(N=L);break;case 2:128==(192&(Q=n[d+1]))&&(re=(31&L)<<6|63&Q)>127&&(N=re);break;case 3:ee=n[d+2],128==(192&(Q=n[d+1]))&&128==(192&ee)&&(re=(15&L)<<12|(63&Q)<<6|63&ee)>2047&&(re<55296||re>57343)&&(N=re);break;case 4:ee=n[d+2],te=n[d+3],128==(192&(Q=n[d+1]))&&128==(192&ee)&&128==(192&te)&&(re=(15&L)<<18|(63&Q)<<12|(63&ee)<<6|63&te)>65535&&re<1114112&&(N=re)}null===N?(N=65533,J=1):N>65535&&(t.push((N-=65536)>>>10&1023|55296),N=56320|1023&N),t.push(N),d+=J}return function se(n){var e=n.length;if(e<=ae)return String.fromCharCode.apply(String,n);for(var r="",t=0;t<e;)r+=String.fromCharCode.apply(String,n.slice(t,t+=ae));return r}(t)}E.kMaxLength=O,!(f.TYPED_ARRAY_SUPPORT=function T(){try{var n=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(n,e),42===n.foo()}catch{return!1}}())&&typeof console<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(n,e,r){return v(n,e,r)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(n,e,r){return function g(n,e,r){return P(n),n<=0?l(n):void 0!==e?"string"==typeof r?l(n).fill(e,r):l(n).fill(e):l(n)}(n,e,r)},f.allocUnsafe=function(n){return D(n)},f.allocUnsafeSlow=function(n){return D(n)},f.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==f.prototype},f.compare=function(e,r){if(i(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),i(r,Uint8Array)&&(r=f.from(r,r.offset,r.byteLength)),!f.isBuffer(e)||!f.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var t=e.length,d=r.length,L=0,N=Math.min(t,d);L<N;++L)if(e[L]!==r[L]){t=e[L],d=r[L];break}return t<d?-1:d<t?1:0},f.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);var t;if(void 0===r)for(r=0,t=0;t<e.length;++t)r+=e[t].length;var d=f.allocUnsafe(r),L=0;for(t=0;t<e.length;++t){var N=e[t];if(i(N,Uint8Array))L+N.length>d.length?f.from(N).copy(d,L):Uint8Array.prototype.set.call(d,N,L);else{if(!f.isBuffer(N))throw new TypeError('"list" argument must be an Array of Buffers');N.copy(d,L)}L+=N.length}return d},f.byteLength=u,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)p(this,r,r+1);return this},f.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)p(this,r,r+3),p(this,r+1,r+2);return this},f.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)p(this,r,r+7),p(this,r+1,r+6),p(this,r+2,r+5),p(this,r+3,r+4);return this},f.prototype.toLocaleString=f.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?oe(this,0,e):s.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",r=E.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},U&&(f.prototype[U]=f.prototype.inspect),f.prototype.compare=function(e,r,t,d,L){if(i(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===t&&(t=e?e.length:0),void 0===d&&(d=0),void 0===L&&(L=this.length),r<0||t>e.length||d<0||L>this.length)throw new RangeError("out of range index");if(d>=L&&r>=t)return 0;if(d>=L)return-1;if(r>=t)return 1;if(this===e)return 0;for(var N=(L>>>=0)-(d>>>=0),J=(t>>>=0)-(r>>>=0),Q=Math.min(N,J),ee=this.slice(d,L),te=e.slice(r,t),re=0;re<Q;++re)if(ee[re]!==te[re]){N=ee[re],J=te[re];break}return N<J?-1:J<N?1:0},f.prototype.includes=function(e,r,t){return-1!==this.indexOf(e,r,t)},f.prototype.indexOf=function(e,r,t){return S(this,e,r,t,!0)},f.prototype.lastIndexOf=function(e,r,t){return S(this,e,r,t,!1)},f.prototype.write=function(e,r,t,d){if(void 0===r)d="utf8",t=this.length,r=0;else if(void 0===t&&"string"==typeof r)d=r,t=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(t)?(t>>>=0,void 0===d&&(d="utf8")):(d=t,t=void 0)}var L=this.length-r;if((void 0===t||t>L)&&(t=L),e.length>0&&(t<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");d||(d="utf8");for(var N=!1;;)switch(d){case"hex":return G(this,e,r,t);case"utf8":case"utf-8":return H(this,e,r,t);case"ascii":case"latin1":case"binary":return $(this,e,r,t);case"base64":return z(this,e,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,e,r,t);default:if(N)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),N=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ae=4096;function ce(n,e,r){var t="";r=Math.min(n.length,r);for(var d=e;d<r;++d)t+=String.fromCharCode(127&n[d]);return t}function le(n,e,r){var t="";r=Math.min(n.length,r);for(var d=e;d<r;++d)t+=String.fromCharCode(n[d]);return t}function ie(n,e,r){var t=n.length;(!e||e<0)&&(e=0),(!r||r<0||r>t)&&(r=t);for(var d="",L=e;L<r;++L)d+=B[n[L]];return d}function ue(n,e,r){for(var t=n.slice(e,r),d="",L=0;L<t.length-1;L+=2)d+=String.fromCharCode(t[L]+256*t[L+1]);return d}function Z(n,e,r){if(n%1!=0||n<0)throw new RangeError("offset is not uint");if(n+e>r)throw new RangeError("Trying to access beyond buffer length")}function y(n,e,r,t,d,L){if(!f.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>d||e<L)throw new RangeError('"value" argument is out of bounds');if(r+t>n.length)throw new RangeError("Index out of range")}function _(n,e,r,t,d,L){if(r+t>n.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(n,e,r,t,d){return e=+e,r>>>=0,d||_(n,0,r,4),j.write(n,e,r,t,23,4),r+4}function Y(n,e,r,t,d){return e=+e,r>>>=0,d||_(n,0,r,8),j.write(n,e,r,t,52,8),r+8}f.prototype.slice=function(e,r){var t=this.length;(e=~~e)<0?(e+=t)<0&&(e=0):e>t&&(e=t),(r=void 0===r?t:~~r)<0?(r+=t)<0&&(r=0):r>t&&(r=t),r<e&&(r=e);var d=this.subarray(e,r);return Object.setPrototypeOf(d,f.prototype),d},f.prototype.readUintLE=f.prototype.readUIntLE=function(e,r,t){e>>>=0,r>>>=0,t||Z(e,r,this.length);for(var d=this[e],L=1,N=0;++N<r&&(L*=256);)d+=this[e+N]*L;return d},f.prototype.readUintBE=f.prototype.readUIntBE=function(e,r,t){e>>>=0,r>>>=0,t||Z(e,r,this.length);for(var d=this[e+--r],L=1;r>0&&(L*=256);)d+=this[e+--r]*L;return d},f.prototype.readUint8=f.prototype.readUInt8=function(e,r){return e>>>=0,r||Z(e,1,this.length),this[e]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(e,r){return e>>>=0,r||Z(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(e,r){return e>>>=0,r||Z(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(e,r){return e>>>=0,r||Z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(e,r){return e>>>=0,r||Z(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,r,t){e>>>=0,r>>>=0,t||Z(e,r,this.length);for(var d=this[e],L=1,N=0;++N<r&&(L*=256);)d+=this[e+N]*L;return d>=(L*=128)&&(d-=Math.pow(2,8*r)),d},f.prototype.readIntBE=function(e,r,t){e>>>=0,r>>>=0,t||Z(e,r,this.length);for(var d=r,L=1,N=this[e+--d];d>0&&(L*=256);)N+=this[e+--d]*L;return N>=(L*=128)&&(N-=Math.pow(2,8*r)),N},f.prototype.readInt8=function(e,r){return e>>>=0,r||Z(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,r){e>>>=0,r||Z(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt16BE=function(e,r){e>>>=0,r||Z(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt32LE=function(e,r){return e>>>=0,r||Z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,r){return e>>>=0,r||Z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,r){return e>>>=0,r||Z(e,4,this.length),j.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,r){return e>>>=0,r||Z(e,4,this.length),j.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,r){return e>>>=0,r||Z(e,8,this.length),j.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,r){return e>>>=0,r||Z(e,8,this.length),j.read(this,e,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(e,r,t,d){e=+e,r>>>=0,t>>>=0,d||y(this,e,r,t,Math.pow(2,8*t)-1,0);var N=1,J=0;for(this[r]=255&e;++J<t&&(N*=256);)this[r+J]=e/N&255;return r+t},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(e,r,t,d){e=+e,r>>>=0,t>>>=0,d||y(this,e,r,t,Math.pow(2,8*t)-1,0);var N=t-1,J=1;for(this[r+N]=255&e;--N>=0&&(J*=256);)this[r+N]=e/J&255;return r+t},f.prototype.writeUint8=f.prototype.writeUInt8=function(e,r,t){return e=+e,r>>>=0,t||y(this,e,r,1,255,0),this[r]=255&e,r+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(e,r,t){return e=+e,r>>>=0,t||y(this,e,r,2,65535,0),this[r]=255&e,this[r+1]=e>>>8,r+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(e,r,t){return e=+e,r>>>=0,t||y(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=255&e,r+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(e,r,t){return e=+e,r>>>=0,t||y(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e,r+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(e,r,t){return e=+e,r>>>=0,t||y(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e,r+4},f.prototype.writeIntLE=function(e,r,t,d){if(e=+e,r>>>=0,!d){var L=Math.pow(2,8*t-1);y(this,e,r,t,L-1,-L)}var N=0,J=1,Q=0;for(this[r]=255&e;++N<t&&(J*=256);)e<0&&0===Q&&0!==this[r+N-1]&&(Q=1),this[r+N]=(e/J>>0)-Q&255;return r+t},f.prototype.writeIntBE=function(e,r,t,d){if(e=+e,r>>>=0,!d){var L=Math.pow(2,8*t-1);y(this,e,r,t,L-1,-L)}var N=t-1,J=1,Q=0;for(this[r+N]=255&e;--N>=0&&(J*=256);)e<0&&0===Q&&0!==this[r+N+1]&&(Q=1),this[r+N]=(e/J>>0)-Q&255;return r+t},f.prototype.writeInt8=function(e,r,t){return e=+e,r>>>=0,t||y(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=255&e,r+1},f.prototype.writeInt16LE=function(e,r,t){return e=+e,r>>>=0,t||y(this,e,r,2,32767,-32768),this[r]=255&e,this[r+1]=e>>>8,r+2},f.prototype.writeInt16BE=function(e,r,t){return e=+e,r>>>=0,t||y(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=255&e,r+2},f.prototype.writeInt32LE=function(e,r,t){return e=+e,r>>>=0,t||y(this,e,r,4,2147483647,-2147483648),this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4},f.prototype.writeInt32BE=function(e,r,t){return e=+e,r>>>=0,t||y(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e,r+4},f.prototype.writeFloatLE=function(e,r,t){return I(this,e,r,!0,t)},f.prototype.writeFloatBE=function(e,r,t){return I(this,e,r,!1,t)},f.prototype.writeDoubleLE=function(e,r,t){return Y(this,e,r,!0,t)},f.prototype.writeDoubleBE=function(e,r,t){return Y(this,e,r,!1,t)},f.prototype.copy=function(e,r,t,d){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");if(t||(t=0),!d&&0!==d&&(d=this.length),r>=e.length&&(r=e.length),r||(r=0),d>0&&d<t&&(d=t),d===t||0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),e.length-r<d-t&&(d=e.length-r+t);var L=d-t;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(r,t,d):Uint8Array.prototype.set.call(e,this.subarray(t,d),r),L},f.prototype.fill=function(e,r,t,d){if("string"==typeof e){if("string"==typeof r?(d=r,r=0,t=this.length):"string"==typeof t&&(d=t,t=this.length),void 0!==d&&"string"!=typeof d)throw new TypeError("encoding must be a string");if("string"==typeof d&&!f.isEncoding(d))throw new TypeError("Unknown encoding: "+d);if(1===e.length){var L=e.charCodeAt(0);("utf8"===d&&L<128||"latin1"===d)&&(e=L)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(r<0||this.length<r||this.length<t)throw new RangeError("Out of range index");if(t<=r)return this;var N;if(r>>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(N=r;N<t;++N)this[N]=e;else{var J=f.isBuffer(e)?e:f.from(e,d),Q=J.length;if(0===Q)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(N=0;N<t-r;++N)this[N+r]=J[N%Q]}return this};var q=/[^+/0-9A-Za-z-_]/g;function c(n,e){e=e||1/0;for(var r,t=n.length,d=null,L=[],N=0;N<t;++N){if((r=n.charCodeAt(N))>55295&&r<57344){if(!d){if(r>56319){(e-=3)>-1&&L.push(239,191,189);continue}if(N+1===t){(e-=3)>-1&&L.push(239,191,189);continue}d=r;continue}if(r<56320){(e-=3)>-1&&L.push(239,191,189),d=r;continue}r=65536+(d-55296<<10|r-56320)}else d&&(e-=3)>-1&&L.push(239,191,189);if(d=null,r<128){if((e-=1)<0)break;L.push(r)}else if(r<2048){if((e-=2)<0)break;L.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;L.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;L.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return L}function W(n){return A.toByteArray(function X(n){if((n=(n=n.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}(n))}function K(n,e,r,t){for(var d=0;d<t&&!(d+r>=e.length||d>=n.length);++d)e[d+r]=n[d];return d}function i(n,e){return n instanceof e||null!=n&&null!=n.constructor&&null!=n.constructor.name&&n.constructor.name===e.name}function o(n){return n!=n}var B=function(){for(var n="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var t=16*r,d=0;d<16;++d)e[t+d]=n[r]+n[d];return e}()},991:V=>{"use strict";var A,E="object"==typeof Reflect?Reflect:null,b=E&&"function"==typeof E.apply?E.apply:function(s,p,S){return Function.prototype.apply.call(s,p,S)};A=E&&"function"==typeof E.ownKeys?E.ownKeys:Object.getOwnPropertySymbols?function(s){return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s))}:function(s){return Object.getOwnPropertyNames(s)};var U=Number.isNaN||function(s){return s!=s};function O(){O.init.call(this)}V.exports=O,V.exports.once=function C(u,s){return new Promise(function(p,S){function M(H){u.removeListener(s,G),S(H)}function G(){"function"==typeof u.removeListener&&u.removeListener("error",M),p([].slice.call(arguments))}a(u,s,G,{once:!0}),"error"!==s&&function m(u,s,p){"function"==typeof u.on&&a(u,"error",s,p)}(u,M,{once:!0})})},O.EventEmitter=O,O.prototype._events=void 0,O.prototype._eventsCount=0,O.prototype._maxListeners=void 0;var T=10;function l(u){if("function"!=typeof u)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof u)}function f(u){return void 0===u._maxListeners?O.defaultMaxListeners:u._maxListeners}function v(u,s,p,S){var M,G,H;if(l(p),void 0===(G=u._events)?(G=u._events=Object.create(null),u._eventsCount=0):(void 0!==G.newListener&&(u.emit("newListener",s,p.listener?p.listener:p),G=u._events),H=G[s]),void 0===H)H=G[s]=p,++u._eventsCount;else if("function"==typeof H?H=G[s]=S?[p,H]:[H,p]:S?H.unshift(p):H.push(p),(M=f(u))>0&&H.length>M&&!H.warned){H.warned=!0;var $=new Error("Possible EventEmitter memory leak detected. "+H.length+" "+String(s)+" listeners added. Use emitter.setMaxListeners() to increase limit");$.name="MaxListenersExceededWarning",$.emitter=u,$.type=s,$.count=H.length,function j(u){console&&console.warn&&console.warn(u)}($)}return u}function P(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(u,s,p){var S={fired:!1,wrapFn:void 0,target:u,type:s,listener:p},M=P.bind(S);return M.listener=p,S.wrapFn=M,M}function D(u,s,p){var S=u._events;if(void 0===S)return[];var M=S[s];return void 0===M?[]:"function"==typeof M?p?[M.listener||M]:[M]:p?function x(u){for(var s=new Array(u.length),p=0;p<s.length;++p)s[p]=u[p].listener||u[p];return s}(M):w(M,M.length)}function F(u){var s=this._events;if(void 0!==s){var p=s[u];if("function"==typeof p)return 1;if(void 0!==p)return p.length}return 0}function w(u,s){for(var p=new Array(s),S=0;S<s;++S)p[S]=u[S];return p}function a(u,s,p,S){if("function"==typeof u.on)S.once?u.once(s,p):u.on(s,p);else{if("function"!=typeof u.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof u);u.addEventListener(s,function M(G){S.once&&u.removeEventListener(s,M),p(G)})}}Object.defineProperty(O,"defaultMaxListeners",{enumerable:!0,get:function(){return T},set:function(u){if("number"!=typeof u||u<0||U(u))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+u+".");T=u}}),O.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},O.prototype.setMaxListeners=function(s){if("number"!=typeof s||s<0||U(s))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+s+".");return this._maxListeners=s,this},O.prototype.getMaxListeners=function(){return f(this)},O.prototype.emit=function(s){for(var p=[],S=1;S<arguments.length;S++)p.push(arguments[S]);var M="error"===s,G=this._events;if(void 0!==G)M=M&&void 0===G.error;else if(!M)return!1;if(M){var H;if(p.length>0&&(H=p[0]),H instanceof Error)throw H;var $=new Error("Unhandled error."+(H?" ("+H.message+")":""));throw $.context=H,$}var z=G[s];if(void 0===z)return!1;if("function"==typeof z)b(z,this,p);else{var ne=z.length,fe=w(z,ne);for(S=0;S<ne;++S)b(fe[S],this,p)}return!0},O.prototype.on=O.prototype.addListener=function(s,p){return v(this,s,p,!1)},O.prototype.prependListener=function(s,p){return v(this,s,p,!0)},O.prototype.once=function(s,p){return l(p),this.on(s,g(this,s,p)),this},O.prototype.prependOnceListener=function(s,p){return l(p),this.prependListener(s,g(this,s,p)),this},O.prototype.off=O.prototype.removeListener=function(s,p){var S,M,G,H,$;if(l(p),void 0===(M=this._events))return this;if(void 0===(S=M[s]))return this;if(S===p||S.listener===p)0==--this._eventsCount?this._events=Object.create(null):(delete M[s],M.removeListener&&this.emit("removeListener",s,S.listener||p));else if("function"!=typeof S){for(G=-1,H=S.length-1;H>=0;H--)if(S[H]===p||S[H].listener===p){$=S[H].listener,G=H;break}if(G<0)return this;0===G?S.shift():function k(u,s){for(;s+1<u.length;s++)u[s]=u[s+1];u.pop()}(S,G),1===S.length&&(M[s]=S[0]),void 0!==M.removeListener&&this.emit("removeListener",s,$||p)}return this},O.prototype.removeAllListeners=function(s){var p,S,M;if(void 0===(S=this._events))return this;if(void 0===S.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==S[s]&&(0==--this._eventsCount?this._events=Object.create(null):delete S[s]),this;if(0===arguments.length){var H,G=Object.keys(S);for(M=0;M<G.length;++M)"removeListener"!==(H=G[M])&&this.removeAllListeners(H);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(p=S[s]))this.removeListener(s,p);else if(void 0!==p)for(M=p.length-1;M>=0;M--)this.removeListener(s,p[M]);return this},O.prototype.listeners=function(s){return D(this,s,!0)},O.prototype.rawListeners=function(s){return D(this,s,!1)},O.listenerCount=function(u,s){return"function"==typeof u.listenerCount?u.listenerCount(s):F.call(u,s)},O.prototype.listenerCount=F,O.prototype.eventNames=function(){return this._eventsCount>0?A(this._events):[]}},9058:(V,E,b)=>{"use strict";var A=b(3838),j=Object.prototype.toString,U=Object.prototype.hasOwnProperty;V.exports=function(P,g,D){if(!A(g))throw new TypeError("iterator must be a function");var F;arguments.length>=3&&(F=D),"[object Array]"===j.call(P)?function(P,g,D){for(var F=0,w=P.length;F<w;F++)U.call(P,F)&&(null==D?g(P[F],F,P):g.call(D,P[F],F,P))}(P,g,F):"string"==typeof P?function(P,g,D){for(var F=0,w=P.length;F<w;F++)null==D?g(P.charAt(F),F,P):g.call(D,P.charAt(F),F,P)}(P,g,F):function(P,g,D){for(var F in P)U.call(P,F)&&(null==D?g(P[F],F,P):g.call(D,P[F],F,P))}(P,g,F)}},6634:(V,E,b)=>{"use strict";var A=b(294);V.exports=function(){return A()&&!!Symbol.toStringTag}},9117:V=>{V.exports="function"==typeof Object.create?function(b,A){A&&(b.super_=A,b.prototype=Object.create(A.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}))}:function(b,A){if(A){b.super_=A;var j=function(){};j.prototype=A.prototype,b.prototype=new j,b.prototype.constructor=b}}},8295:(V,E,b)=>{"use strict";var A=b(6634)(),U=b(4082)("Object.prototype.toString"),O=function(v){return!(A&&v&&"object"==typeof v&&Symbol.toStringTag in v)&&"[object Arguments]"===U(v)},T=function(v){return!!O(v)||null!==v&&"object"==typeof v&&"number"==typeof v.length&&v.length>=0&&"[object Array]"!==U(v)&&"[object Function]"===U(v.callee)},l=function(){return O(arguments)}();O.isLegacyArguments=T,V.exports=l?O:T},3838:V=>{"use strict";var A,j,E=Function.prototype.toString,b="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof b&&"function"==typeof Object.defineProperty)try{A=Object.defineProperty({},"length",{get:function(){throw j}}),j={},b(function(){throw 42},null,A)}catch(m){m!==j&&(b=null)}else b=null;var U=/^\s*class\b/,O=function(a){try{var u=E.call(a);return U.test(u)}catch{return!1}},T=function(a){try{return!O(a)&&(E.call(a),!0)}catch{return!1}},l=Object.prototype.toString,w="function"==typeof Symbol&&!!Symbol.toStringTag,k=!(0 in[,]),x=function(){return!1};if("object"==typeof document){var C=document.all;l.call(C)===l.call(document.all)&&(x=function(a){if((k||!a)&&(typeof a>"u"||"object"==typeof a))try{var u=l.call(a);return("[object HTMLAllCollection]"===u||"[object HTML document.all class]"===u||"[object HTMLCollection]"===u||"[object Object]"===u)&&null==a("")}catch{}return!1})}V.exports=b?function(a){if(x(a))return!0;if(!a||"function"!=typeof a&&"object"!=typeof a)return!1;try{b(a,null,A)}catch(u){if(u!==j)return!1}return!O(a)&&T(a)}:function(a){if(x(a))return!0;if(!a||"function"!=typeof a&&"object"!=typeof a)return!1;if(w)return T(a);if(O(a))return!1;var u=l.call(a);return!("[object Function]"!==u&&"[object GeneratorFunction]"!==u&&!/^\[object HTML/.test(u))&&T(a)}},107:(V,E,b)=>{"use strict";var f,A=Object.prototype.toString,j=Function.prototype.toString,U=/^\s*(?:function)?\*/,O=b(6634)(),T=Object.getPrototypeOf;V.exports=function(P){if("function"!=typeof P)return!1;if(U.test(j.call(P)))return!0;if(!O)return"[object GeneratorFunction]"===A.call(P);if(!T)return!1;if(typeof f>"u"){var D=function(){if(!O)return!1;try{return Function("return function*() {}")()}catch{}}();f=!!D&&T(D)}return T(P)===f}},9569:(V,E,b)=>{"use strict";var A=b(4207);V.exports=function(U){return!!A(U)}},7513:V=>{"use strict";var b={};function A(l,f,v){v||(v=Error);var g=function(D){function F(w,k,x){return D.call(this,function P(D,F,w){return"string"==typeof f?f:f(D,F,w)}(w,k,x))||this}return function E(l,f){l.prototype=Object.create(f.prototype),l.prototype.constructor=l,l.__proto__=f}(F,D),F}(v);g.prototype.name=v.name,g.prototype.code=l,b[l]=g}function j(l,f){if(Array.isArray(l)){var v=l.length;return l=l.map(function(P){return String(P)}),v>2?"one of ".concat(f," ").concat(l.slice(0,v-1).join(", "),", or ")+l[v-1]:2===v?"one of ".concat(f," ").concat(l[0]," or ").concat(l[1]):"of ".concat(f," ").concat(l[0])}return"of ".concat(f," ").concat(String(l))}A("ERR_INVALID_OPT_VALUE",function(l,f){return'The value "'+f+'" is invalid for option "'+l+'"'},TypeError),A("ERR_INVALID_ARG_TYPE",function(l,f,v){var P,g;if("string"==typeof f&&function U(l,f,v){return l.substr(!v||v<0?0:+v,f.length)===f}(f,"not ")?(P="must not be",f=f.replace(/^not /,"")):P="must be",function O(l,f,v){return(void 0===v||v>l.length)&&(v=l.length),l.substring(v-f.length,v)===f}(l," argument"))g="The ".concat(l," ").concat(P," ").concat(j(f,"type"));else{var D=function T(l,f,v){return"number"!=typeof v&&(v=0),!(v+f.length>l.length)&&-1!==l.indexOf(f,v)}(l,".")?"property":"argument";g='The "'.concat(l,'" ').concat(D," ").concat(P," ").concat(j(f,"type"))}return g+". Received type ".concat(typeof v)},TypeError),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),A("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),A("ERR_STREAM_PREMATURE_CLOSE","Premature close"),A("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),A("ERR_STREAM_WRITE_AFTER_END","write after end"),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),V.exports.q=b},6615:(V,E,b)=>{"use strict";var A=Object.keys||function(g){var D=[];for(var F in g)D.push(F);return D};V.exports=f;var j=b(3679),U=b(6246);b(9117)(f,j);for(var O=A(U.prototype),T=0;T<O.length;T++){var l=O[T];f.prototype[l]||(f.prototype[l]=U.prototype[l])}function f(g){if(!(this instanceof f))return new f(g);j.call(this,g),U.call(this,g),this.allowHalfOpen=!0,g&&(!1===g.readable&&(this.readable=!1),!1===g.writable&&(this.writable=!1),!1===g.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",v)))}function v(){this._writableState.ended||process.nextTick(P,this)}function P(g){g.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(D){void 0===this._readableState||void 0===this._writableState||(this._readableState.destroyed=D,this._writableState.destroyed=D)}})},7881:(V,E,b)=>{"use strict";V.exports=j;var A=b(6085);function j(U){if(!(this instanceof j))return new j(U);A.call(this,U)}b(9117)(j,A),j.prototype._transform=function(U,O,T){T(null,U)}},3679:(V,E,b)=>{"use strict";var A;V.exports=z,z.ReadableState=$,b(991);var g,U=function(o,B){return o.listeners(B).length},O=b(9202),T=b(4387).Buffer,l=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},P=b(413);g=P&&P.debuglog?P.debuglog("stream"):function(){};var s,p,S,D=b(2820),F=b(2682),k=b(278).getHighWaterMark,x=b(7513).q,C=x.ERR_INVALID_ARG_TYPE,m=x.ERR_STREAM_PUSH_AFTER_EOF,a=x.ERR_METHOD_NOT_IMPLEMENTED,u=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;b(9117)(z,O);var M=F.errorOrDestroy,G=["error","close","destroy","pause","resume"];function $(i,o,B){A=A||b(6615),"boolean"!=typeof B&&(B=o instanceof A),this.objectMode=!!(i=i||{}).objectMode,B&&(this.objectMode=this.objectMode||!!i.readableObjectMode),this.highWaterMark=k(this,i,"readableHighWaterMark",B),this.buffer=new D,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==i.emitClose,this.autoDestroy=!!i.autoDestroy,this.destroyed=!1,this.defaultEncoding=i.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,i.encoding&&(s||(s=b(7341).s),this.decoder=new s(i.encoding),this.encoding=i.encoding)}function z(i){if(A=A||b(6615),!(this instanceof z))return new z(i);this._readableState=new $(i,this,this instanceof A),this.readable=!0,i&&("function"==typeof i.read&&(this._read=i.read),"function"==typeof i.destroy&&(this._destroy=i.destroy)),O.call(this)}function ne(i,o,B,n,e){g("readableAddChunk",o);var t,r=i._readableState;if(null===o)r.reading=!1,function le(i,o){if(g("onEofChunk"),!o.ended){if(o.decoder){var B=o.decoder.end();B&&B.length&&(o.buffer.push(B),o.length+=o.objectMode?1:B.length)}o.ended=!0,o.sync?ie(i):(o.needReadable=!1,o.emittedReadable||(o.emittedReadable=!0,ue(i)))}}(i,r);else if(e||(t=function oe(i,o){var B;return!function v(i){return T.isBuffer(i)||i instanceof l}(o)&&"string"!=typeof o&&void 0!==o&&!i.objectMode&&(B=new C("chunk",["string","Buffer","Uint8Array"],o)),B}(r,o)),t)M(i,t);else if(r.objectMode||o&&o.length>0)if("string"!=typeof o&&!r.objectMode&&Object.getPrototypeOf(o)!==T.prototype&&(o=function f(i){return T.from(i)}(o)),n)r.endEmitted?M(i,new u):fe(i,r,o,!0);else if(r.ended)M(i,new m);else{if(r.destroyed)return!1;r.reading=!1,r.decoder&&!B?(o=r.decoder.write(o),r.objectMode||0!==o.length?fe(i,r,o,!1):Z(i,r)):fe(i,r,o,!1)}else n||(r.reading=!1,Z(i,r));return!r.ended&&(r.length<r.highWaterMark||0===r.length)}function fe(i,o,B,n){o.flowing&&0===o.length&&!o.sync?(o.awaitDrain=0,i.emit("data",B)):(o.length+=o.objectMode?1:B.length,n?o.buffer.unshift(B):o.buffer.push(B),o.needReadable&&ie(i)),Z(i,o)}Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(o){this._readableState&&(this._readableState.destroyed=o)}}),z.prototype.destroy=F.destroy,z.prototype._undestroy=F.undestroy,z.prototype._destroy=function(i,o){o(i)},z.prototype.push=function(i,o){var n,B=this._readableState;return B.objectMode?n=!0:"string"==typeof i&&((o=o||B.defaultEncoding)!==B.encoding&&(i=T.from(i,o),o=""),n=!0),ne(this,i,o,!1,n)},z.prototype.unshift=function(i){return ne(this,i,null,!0,!1)},z.prototype.isPaused=function(){return!1===this._readableState.flowing},z.prototype.setEncoding=function(i){s||(s=b(7341).s);var o=new s(i);this._readableState.decoder=o,this._readableState.encoding=this._readableState.decoder.encoding;for(var B=this._readableState.buffer.head,n="";null!==B;)n+=o.write(B.data),B=B.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var ae=1073741824;function ce(i,o){return i<=0||0===o.length&&o.ended?0:o.objectMode?1:i!=i?o.flowing&&o.length?o.buffer.head.data.length:o.length:(i>o.highWaterMark&&(o.highWaterMark=function se(i){return i>=ae?i=ae:(i--,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i++),i}(i)),i<=o.length?i:o.ended?o.length:(o.needReadable=!0,0))}function ie(i){var o=i._readableState;g("emitReadable",o.needReadable,o.emittedReadable),o.needReadable=!1,o.emittedReadable||(g("emitReadable",o.flowing),o.emittedReadable=!0,process.nextTick(ue,i))}function ue(i){var o=i._readableState;g("emitReadable_",o.destroyed,o.length,o.ended),!o.destroyed&&(o.length||o.ended)&&(i.emit("readable"),o.emittedReadable=!1),o.needReadable=!o.flowing&&!o.ended&&o.length<=o.highWaterMark,c(i)}function Z(i,o){o.readingMore||(o.readingMore=!0,process.nextTick(y,i,o))}function y(i,o){for(;!o.reading&&!o.ended&&(o.length<o.highWaterMark||o.flowing&&0===o.length);){var B=o.length;if(g("maybeReadMore read 0"),i.read(0),B===o.length)break}o.readingMore=!1}function I(i){var o=i._readableState;o.readableListening=i.listenerCount("readable")>0,o.resumeScheduled&&!o.paused?o.flowing=!0:i.listenerCount("data")>0&&i.resume()}function Y(i){g("readable nexttick read 0"),i.read(0)}function X(i,o){g("resume",o.reading),o.reading||i.read(0),o.resumeScheduled=!1,i.emit("resume"),c(i),o.flowing&&!o.reading&&i.read(0)}function c(i){var o=i._readableState;for(g("flow",o.flowing);o.flowing&&null!==i.read(););}function h(i,o){return 0===o.length?null:(o.objectMode?B=o.buffer.shift():!i||i>=o.length?(B=o.decoder?o.buffer.join(""):1===o.buffer.length?o.buffer.first():o.buffer.concat(o.length),o.buffer.clear()):B=o.buffer.consume(i,o.decoder),B);var B}function R(i){var o=i._readableState;g("endReadable",o.endEmitted),o.endEmitted||(o.ended=!0,process.nextTick(W,o,i))}function W(i,o){if(g("endReadableNT",i.endEmitted,i.length),!i.endEmitted&&0===i.length&&(i.endEmitted=!0,o.readable=!1,o.emit("end"),i.autoDestroy)){var B=o._writableState;(!B||B.autoDestroy&&B.finished)&&o.destroy()}}function K(i,o){for(var B=0,n=i.length;B<n;B++)if(i[B]===o)return B;return-1}z.prototype.read=function(i){g("read",i),i=parseInt(i,10);var o=this._readableState,B=i;if(0!==i&&(o.emittedReadable=!1),0===i&&o.needReadable&&((0!==o.highWaterMark?o.length>=o.highWaterMark:o.length>0)||o.ended))return g("read: emitReadable",o.length,o.ended),0===o.length&&o.ended?R(this):ie(this),null;if(0===(i=ce(i,o))&&o.ended)return 0===o.length&&R(this),null;var e,n=o.needReadable;return g("need readable",n),(0===o.length||o.length-i<o.highWaterMark)&&g("length less than watermark",n=!0),o.ended||o.reading?g("reading or ended",n=!1):n&&(g("do read"),o.reading=!0,o.sync=!0,0===o.length&&(o.needReadable=!0),this._read(o.highWaterMark),o.sync=!1,o.reading||(i=ce(B,o))),null===(e=i>0?h(i,o):null)?(o.needReadable=o.length<=o.highWaterMark,i=0):(o.length-=i,o.awaitDrain=0),0===o.length&&(o.ended||(o.needReadable=!0),B!==i&&o.ended&&R(this)),null!==e&&this.emit("data",e),e},z.prototype._read=function(i){M(this,new a("_read()"))},z.prototype.pipe=function(i,o){var B=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=i;break;case 1:n.pipes=[n.pipes,i];break;default:n.pipes.push(i)}n.pipesCount+=1,g("pipe count=%d opts=%j",n.pipesCount,o);var r=o&&!1===o.end||i===process.stdout||i===process.stderr?he:d;function d(){g("onend"),i.end()}n.endEmitted?process.nextTick(r):B.once("end",r),i.on("unpipe",function t(de,pe){g("onunpipe"),de===B&&pe&&!1===pe.hasUnpiped&&(pe.hasUnpiped=!0,function J(){g("cleanup"),i.removeListener("close",te),i.removeListener("finish",re),i.removeListener("drain",L),i.removeListener("error",ee),i.removeListener("unpipe",t),B.removeListener("end",d),B.removeListener("end",he),B.removeListener("data",Q),N=!0,n.awaitDrain&&(!i._writableState||i._writableState.needDrain)&&L()}())});var L=function _(i){return function(){var B=i._readableState;g("pipeOnDrain",B.awaitDrain),B.awaitDrain&&B.awaitDrain--,0===B.awaitDrain&&U(i,"data")&&(B.flowing=!0,c(i))}}(B);i.on("drain",L);var N=!1;function Q(de){g("ondata");var pe=i.write(de);g("dest.write",pe),!1===pe&&((1===n.pipesCount&&n.pipes===i||n.pipesCount>1&&-1!==K(n.pipes,i))&&!N&&(g("false write response, pause",n.awaitDrain),n.awaitDrain++),B.pause())}function ee(de){g("onerror",de),he(),i.removeListener("error",ee),0===U(i,"error")&&M(i,de)}function te(){i.removeListener("finish",re),he()}function re(){g("onfinish"),i.removeListener("close",te),he()}function he(){g("unpipe"),B.unpipe(i)}return B.on("data",Q),function H(i,o,B){if("function"==typeof i.prependListener)return i.prependListener(o,B);i._events&&i._events[o]?Array.isArray(i._events[o])?i._events[o].unshift(B):i._events[o]=[B,i._events[o]]:i.on(o,B)}(i,"error",ee),i.once("close",te),i.once("finish",re),i.emit("pipe",B),n.flowing||(g("pipe resume"),B.resume()),i},z.prototype.unpipe=function(i){var o=this._readableState,B={hasUnpiped:!1};if(0===o.pipesCount)return this;if(1===o.pipesCount)return i&&i!==o.pipes||(i||(i=o.pipes),o.pipes=null,o.pipesCount=0,o.flowing=!1,i&&i.emit("unpipe",this,B)),this;if(!i){var n=o.pipes,e=o.pipesCount;o.pipes=null,o.pipesCount=0,o.flowing=!1;for(var r=0;r<e;r++)n[r].emit("unpipe",this,{hasUnpiped:!1});return this}var t=K(o.pipes,i);return-1===t||(o.pipes.splice(t,1),o.pipesCount-=1,1===o.pipesCount&&(o.pipes=o.pipes[0]),i.emit("unpipe",this,B)),this},z.prototype.addListener=z.prototype.on=function(i,o){var B=O.prototype.on.call(this,i,o),n=this._readableState;return"data"===i?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===i&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,g("on readable",n.length,n.reading),n.length?ie(this):n.reading||process.nextTick(Y,this)),B},z.prototype.removeListener=function(i,o){var B=O.prototype.removeListener.call(this,i,o);return"readable"===i&&process.nextTick(I,this),B},z.prototype.removeAllListeners=function(i){var o=O.prototype.removeAllListeners.apply(this,arguments);return("readable"===i||void 0===i)&&process.nextTick(I,this),o},z.prototype.resume=function(){var i=this._readableState;return i.flowing||(g("resume"),i.flowing=!i.readableListening,function q(i,o){o.resumeScheduled||(o.resumeScheduled=!0,process.nextTick(X,i,o))}(this,i)),i.paused=!1,this},z.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},z.prototype.wrap=function(i){var o=this,B=this._readableState,n=!1;for(var e in i.on("end",function(){if(g("wrapped end"),B.decoder&&!B.ended){var t=B.decoder.end();t&&t.length&&o.push(t)}o.push(null)}),i.on("data",function(t){g("wrapped data"),B.decoder&&(t=B.decoder.write(t)),B.objectMode&&null==t||!(B.objectMode||t&&t.length)||o.push(t)||(n=!0,i.pause())}),i)void 0===this[e]&&"function"==typeof i[e]&&(this[e]=function(d){return function(){return i[d].apply(i,arguments)}}(e));for(var r=0;r<G.length;r++)i.on(G[r],this.emit.bind(this,G[r]));return this._read=function(t){g("wrapped _read",t),n&&(n=!1,i.resume())},this},"function"==typeof Symbol&&(z.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=b(8602)),p(this)}),Object.defineProperty(z.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(z.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(z.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(o){this._readableState&&(this._readableState.flowing=o)}}),z._fromList=h,Object.defineProperty(z.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(z.from=function(i,o){return void 0===S&&(S=b(98)),S(z,i,o)})},6085:(V,E,b)=>{"use strict";V.exports=v;var A=b(7513).q,j=A.ERR_METHOD_NOT_IMPLEMENTED,U=A.ERR_MULTIPLE_CALLBACK,O=A.ERR_TRANSFORM_ALREADY_TRANSFORMING,T=A.ERR_TRANSFORM_WITH_LENGTH_0,l=b(6615);function f(D,F){var w=this._transformState;w.transforming=!1;var k=w.writecb;if(null===k)return this.emit("error",new U);w.writechunk=null,w.writecb=null,null!=F&&this.push(F),k(D);var x=this._readableState;x.reading=!1,(x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}function v(D){if(!(this instanceof v))return new v(D);l.call(this,D),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,D&&("function"==typeof D.transform&&(this._transform=D.transform),"function"==typeof D.flush&&(this._flush=D.flush)),this.on("prefinish",P)}function P(){var D=this;"function"!=typeof this._flush||this._readableState.destroyed?g(this,null,null):this._flush(function(F,w){g(D,F,w)})}function g(D,F,w){if(F)return D.emit("error",F);if(null!=w&&D.push(w),D._writableState.length)throw new T;if(D._transformState.transforming)throw new O;return D.push(null)}b(9117)(v,l),v.prototype.push=function(D,F){return this._transformState.needTransform=!1,l.prototype.push.call(this,D,F)},v.prototype._transform=function(D,F,w){w(new j("_transform()"))},v.prototype._write=function(D,F,w){var k=this._transformState;if(k.writecb=w,k.writechunk=D,k.writeencoding=F,!k.transforming){var x=this._readableState;(k.needTransform||x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}},v.prototype._read=function(D){var F=this._transformState;null===F.writechunk||F.transforming?F.needTransform=!0:(F.transforming=!0,this._transform(F.writechunk,F.writeencoding,F.afterTransform))},v.prototype._destroy=function(D,F){l.prototype._destroy.call(this,D,function(w){F(w)})}},6246:(V,E,b)=>{"use strict";function j(c){var h=this;this.next=null,this.entry=null,this.finish=function(){!function X(c,h,R){var W=c.entry;for(c.entry=null;W;){var K=W.callback;h.pendingcb--,K(R),W=W.next}h.corkedRequestsFree.next=c}(h,c)}}var U;V.exports=$,$.WritableState=G;var H,O={deprecate:b(4691)},T=b(9202),l=b(4387).Buffer,f=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},g=b(2682),F=b(278).getHighWaterMark,w=b(7513).q,k=w.ERR_INVALID_ARG_TYPE,x=w.ERR_METHOD_NOT_IMPLEMENTED,C=w.ERR_MULTIPLE_CALLBACK,m=w.ERR_STREAM_CANNOT_PIPE,a=w.ERR_STREAM_DESTROYED,u=w.ERR_STREAM_NULL_VALUES,s=w.ERR_STREAM_WRITE_AFTER_END,p=w.ERR_UNKNOWN_ENCODING,S=g.errorOrDestroy;function M(){}function G(c,h,R){U=U||b(6615),"boolean"!=typeof R&&(R=h instanceof U),this.objectMode=!!(c=c||{}).objectMode,R&&(this.objectMode=this.objectMode||!!c.writableObjectMode),this.highWaterMark=F(this,c,"writableHighWaterMark",R),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===c.decodeStrings),this.defaultEncoding=c.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){!function le(c,h){var R=c._writableState,W=R.sync,K=R.writecb;if("function"!=typeof K)throw new C;if(function ce(c){c.writing=!1,c.writecb=null,c.length-=c.writelen,c.writelen=0}(R),h)!function se(c,h,R,W,K){--h.pendingcb,R?(process.nextTick(K,W),process.nextTick(Y,c,h),c._writableState.errorEmitted=!0,S(c,W)):(K(W),c._writableState.errorEmitted=!0,S(c,W),Y(c,h))}(c,R,W,h,K);else{var i=y(R)||c.destroyed;!i&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&Z(c,R),W?process.nextTick(ie,c,R,i,K):ie(c,R,i,K)}}(h,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==c.emitClose,this.autoDestroy=!!c.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new j(this)}function $(c){var h=this instanceof(U=U||b(6615));if(!h&&!H.call($,this))return new $(c);this._writableState=new G(c,this,h),this.writable=!0,c&&("function"==typeof c.write&&(this._write=c.write),"function"==typeof c.writev&&(this._writev=c.writev),"function"==typeof c.destroy&&(this._destroy=c.destroy),"function"==typeof c.final&&(this._final=c.final)),T.call(this)}function ae(c,h,R,W,K,i,o){h.writelen=W,h.writecb=o,h.writing=!0,h.sync=!0,h.destroyed?h.onwrite(new a("write")):R?c._writev(K,h.onwrite):c._write(K,i,h.onwrite),h.sync=!1}function ie(c,h,R,W){R||function ue(c,h){0===h.length&&h.needDrain&&(h.needDrain=!1,c.emit("drain"))}(c,h),h.pendingcb--,W(),Y(c,h)}function Z(c,h){h.bufferProcessing=!0;var R=h.bufferedRequest;if(c._writev&&R&&R.next){var K=new Array(h.bufferedRequestCount),i=h.corkedRequestsFree;i.entry=R;for(var o=0,B=!0;R;)K[o]=R,R.isBuf||(B=!1),R=R.next,o+=1;K.allBuffers=B,ae(c,h,!0,h.length,K,"",i.finish),h.pendingcb++,h.lastBufferedRequest=null,i.next?(h.corkedRequestsFree=i.next,i.next=null):h.corkedRequestsFree=new j(h),h.bufferedRequestCount=0}else{for(;R;){var n=R.chunk;if(ae(c,h,!1,h.objectMode?1:n.length,n,R.encoding,R.callback),R=R.next,h.bufferedRequestCount--,h.writing)break}null===R&&(h.lastBufferedRequest=null)}h.bufferedRequest=R,h.bufferProcessing=!1}function y(c){return c.ending&&0===c.length&&null===c.bufferedRequest&&!c.finished&&!c.writing}function _(c,h){c._final(function(R){h.pendingcb--,R&&S(c,R),h.prefinished=!0,c.emit("prefinish"),Y(c,h)})}function Y(c,h){var R=y(h);if(R&&(function I(c,h){!h.prefinished&&!h.finalCalled&&("function"!=typeof c._final||h.destroyed?(h.prefinished=!0,c.emit("prefinish")):(h.pendingcb++,h.finalCalled=!0,process.nextTick(_,c,h)))}(c,h),0===h.pendingcb&&(h.finished=!0,c.emit("finish"),h.autoDestroy))){var W=c._readableState;(!W||W.autoDestroy&&W.endEmitted)&&c.destroy()}return R}b(9117)($,T),G.prototype.getBuffer=function(){for(var h=this.bufferedRequest,R=[];h;)R.push(h),h=h.next;return R},function(){try{Object.defineProperty(G.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(H=Function.prototype[Symbol.hasInstance],Object.defineProperty($,Symbol.hasInstance,{value:function(h){return!!H.call(this,h)||this===$&&h&&h._writableState instanceof G}})):H=function(h){return h instanceof this},$.prototype.pipe=function(){S(this,new m)},$.prototype.write=function(c,h,R){var W=this._writableState,K=!1,i=!W.objectMode&&function P(c){return l.isBuffer(c)||c instanceof f}(c);return i&&!l.isBuffer(c)&&(c=function v(c){return l.from(c)}(c)),"function"==typeof h&&(R=h,h=null),i?h="buffer":h||(h=W.defaultEncoding),"function"!=typeof R&&(R=M),W.ending?function z(c,h){var R=new s;S(c,R),process.nextTick(h,R)}(this,R):(i||function ne(c,h,R,W){var K;return null===R?K=new u:"string"!=typeof R&&!h.objectMode&&(K=new k("chunk",["string","Buffer"],R)),!K||(S(c,K),process.nextTick(W,K),!1)}(this,W,c,R))&&(W.pendingcb++,K=function oe(c,h,R,W,K,i){if(!R){var o=function fe(c,h,R){return!c.objectMode&&!1!==c.decodeStrings&&"string"==typeof h&&(h=l.from(h,R)),h}(h,W,K);W!==o&&(R=!0,K="buffer",W=o)}var B=h.objectMode?1:W.length;h.length+=B;var n=h.length<h.highWaterMark;if(n||(h.needDrain=!0),h.writing||h.corked){var e=h.lastBufferedRequest;h.lastBufferedRequest={chunk:W,encoding:K,isBuf:R,callback:i,next:null},e?e.next=h.lastBufferedRequest:h.bufferedRequest=h.lastBufferedRequest,h.bufferedRequestCount+=1}else ae(c,h,!1,B,W,K,i);return n}(this,W,i,c,h,R)),K},$.prototype.cork=function(){this._writableState.corked++},$.prototype.uncork=function(){var c=this._writableState;c.corked&&(c.corked--,!c.writing&&!c.corked&&!c.bufferProcessing&&c.bufferedRequest&&Z(this,c))},$.prototype.setDefaultEncoding=function(h){if("string"==typeof h&&(h=h.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((h+"").toLowerCase())>-1))throw new p(h);return this._writableState.defaultEncoding=h,this},Object.defineProperty($.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty($.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),$.prototype._write=function(c,h,R){R(new x("_write()"))},$.prototype._writev=null,$.prototype.end=function(c,h,R){var W=this._writableState;return"function"==typeof c?(R=c,c=null,h=null):"function"==typeof h&&(R=h,h=null),null!=c&&this.write(c,h),W.corked&&(W.corked=1,this.uncork()),W.ending||function q(c,h,R){h.ending=!0,Y(c,h),R&&(h.finished?process.nextTick(R):c.once("finish",R)),h.ended=!0,c.writable=!1}(this,W,R),this},Object.defineProperty($.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(h){this._writableState&&(this._writableState.destroyed=h)}}),$.prototype.destroy=g.destroy,$.prototype._undestroy=g.undestroy,$.prototype._destroy=function(c,h){h(c)}},8602:(V,E,b)=>{"use strict";var A;function j(s,p,S){return p=function U(s){var p=function O(s,p){if("object"!=typeof s||null===s)return s;var S=s[Symbol.toPrimitive];if(void 0!==S){var M=S.call(s,p||"default");if("object"!=typeof M)return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===p?String:Number)(s)}(s,"string");return"symbol"==typeof p?p:String(p)}(p),p in s?Object.defineProperty(s,p,{value:S,enumerable:!0,configurable:!0,writable:!0}):s[p]=S,s}var T=b(7297),l=Symbol("lastResolve"),f=Symbol("lastReject"),v=Symbol("error"),P=Symbol("ended"),g=Symbol("lastPromise"),D=Symbol("handlePromise"),F=Symbol("stream");function w(s,p){return{value:s,done:p}}function k(s){var p=s[l];if(null!==p){var S=s[F].read();null!==S&&(s[g]=null,s[l]=null,s[f]=null,p(w(S,!1)))}}function x(s){process.nextTick(k,s)}var m=Object.getPrototypeOf(function(){}),a=Object.setPrototypeOf((j(A={get stream(){return this[F]},next:function(){var p=this,S=this[v];if(null!==S)return Promise.reject(S);if(this[P])return Promise.resolve(w(void 0,!0));if(this[F].destroyed)return new Promise(function($,z){process.nextTick(function(){p[v]?z(p[v]):$(w(void 0,!0))})});var G,M=this[g];if(M)G=new Promise(function C(s,p){return function(S,M){s.then(function(){p[P]?S(w(void 0,!0)):p[D](S,M)},M)}}(M,this));else{var H=this[F].read();if(null!==H)return Promise.resolve(w(H,!1));G=new Promise(this[D])}return this[g]=G,G}},Symbol.asyncIterator,function(){return this}),j(A,"return",function(){var p=this;return new Promise(function(S,M){p[F].destroy(null,function(G){G?M(G):S(w(void 0,!0))})})}),A),m);V.exports=function(p){var S,M=Object.create(a,(j(S={},F,{value:p,writable:!0}),j(S,l,{value:null,writable:!0}),j(S,f,{value:null,writable:!0}),j(S,v,{value:null,writable:!0}),j(S,P,{value:p._readableState.endEmitted,writable:!0}),j(S,D,{value:function(H,$){var z=M[F].read();z?(M[g]=null,M[l]=null,M[f]=null,H(w(z,!1))):(M[l]=H,M[f]=$)},writable:!0}),S));return M[g]=null,T(p,function(G){if(G&&"ERR_STREAM_PREMATURE_CLOSE"!==G.code){var H=M[f];return null!==H&&(M[g]=null,M[l]=null,M[f]=null,H(G)),void(M[v]=G)}var $=M[l];null!==$&&(M[g]=null,M[l]=null,M[f]=null,$(w(void 0,!0))),M[P]=!0}),p.on("readable",x.bind(null,M)),M}},2820:(V,E,b)=>{"use strict";function A(x,C){var m=Object.keys(x);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(x);C&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(x,u).enumerable})),m.push.apply(m,a)}return m}function j(x){for(var C=1;C<arguments.length;C++){var m=null!=arguments[C]?arguments[C]:{};C%2?A(Object(m),!0).forEach(function(a){U(x,a,m[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(m)):A(Object(m)).forEach(function(a){Object.defineProperty(x,a,Object.getOwnPropertyDescriptor(m,a))})}return x}function U(x,C,m){return(C=f(C))in x?Object.defineProperty(x,C,{value:m,enumerable:!0,configurable:!0,writable:!0}):x[C]=m,x}function T(x,C){for(var m=0;m<C.length;m++){var a=C[m];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(x,f(a.key),a)}}function f(x){var C=function v(x,C){if("object"!=typeof x||null===x)return x;var m=x[Symbol.toPrimitive];if(void 0!==m){var a=m.call(x,C||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===C?String:Number)(x)}(x,"string");return"symbol"==typeof C?C:String(C)}var g=b(4387).Buffer,F=b(413).inspect,w=F&&F.custom||"inspect";function k(x,C,m){g.prototype.copy.call(x,C,m)}V.exports=function(){function x(){(function O(x,C){if(!(x instanceof C))throw new TypeError("Cannot call a class as a function")})(this,x),this.head=null,this.tail=null,this.length=0}return function l(x,C,m){C&&T(x.prototype,C),m&&T(x,m),Object.defineProperty(x,"prototype",{writable:!1})}(x,[{key:"push",value:function(m){var a={data:m,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length}},{key:"unshift",value:function(m){var a={data:m,next:this.head};0===this.length&&(this.tail=a),this.head=a,++this.length}},{key:"shift",value:function(){if(0!==this.length){var m=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(0===this.length)return"";for(var a=this.head,u=""+a.data;a=a.next;)u+=m+a.data;return u}},{key:"concat",value:function(m){if(0===this.length)return g.alloc(0);for(var a=g.allocUnsafe(m>>>0),u=this.head,s=0;u;)k(u.data,a,s),s+=u.data.length,u=u.next;return a}},{key:"consume",value:function(m,a){var u;return m<this.head.data.length?(u=this.head.data.slice(0,m),this.head.data=this.head.data.slice(m)):u=m===this.head.data.length?this.shift():a?this._getString(m):this._getBuffer(m),u}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(m){var a=this.head,u=1,s=a.data;for(m-=s.length;a=a.next;){var p=a.data,S=m>p.length?p.length:m;if(s+=S===p.length?p:p.slice(0,m),0==(m-=S)){S===p.length?(++u,this.head=a.next?a.next:this.tail=null):(this.head=a,a.data=p.slice(S));break}++u}return this.length-=u,s}},{key:"_getBuffer",value:function(m){var a=g.allocUnsafe(m),u=this.head,s=1;for(u.data.copy(a),m-=u.data.length;u=u.next;){var p=u.data,S=m>p.length?p.length:m;if(p.copy(a,a.length-m,0,S),0==(m-=S)){S===p.length?(++s,this.head=u.next?u.next:this.tail=null):(this.head=u,u.data=p.slice(S));break}++s}return this.length-=s,a}},{key:w,value:function(m,a){return F(this,j(j({},a),{},{depth:0,customInspect:!1}))}}]),x}()},2682:V=>{"use strict";function b(T,l){U(T,l),A(T)}function A(T){T._writableState&&!T._writableState.emitClose||T._readableState&&!T._readableState.emitClose||T.emit("close")}function U(T,l){T.emit("error",l)}V.exports={destroy:function E(T,l){var f=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(l?l(T):T&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(U,this,T)):process.nextTick(U,this,T)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(T||null,function(g){!l&&g?f._writableState?f._writableState.errorEmitted?process.nextTick(A,f):(f._writableState.errorEmitted=!0,process.nextTick(b,f,g)):process.nextTick(b,f,g):l?(process.nextTick(A,f),l(g)):process.nextTick(A,f)}),this)},undestroy:function j(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function O(T,l){var f=T._readableState,v=T._writableState;f&&f.autoDestroy||v&&v.autoDestroy?T.destroy(l):T.emit("error",l)}}},7297:(V,E,b)=>{"use strict";var A=b(7513).q.ERR_STREAM_PREMATURE_CLOSE;function U(){}V.exports=function T(l,f,v){if("function"==typeof f)return T(l,null,f);f||(f={}),v=function j(l){var f=!1;return function(){if(!f){f=!0;for(var v=arguments.length,P=new Array(v),g=0;g<v;g++)P[g]=arguments[g];l.apply(this,P)}}}(v||U);var P=f.readable||!1!==f.readable&&l.readable,g=f.writable||!1!==f.writable&&l.writable,D=function(){l.writable||w()},F=l._writableState&&l._writableState.finished,w=function(){g=!1,F=!0,P||v.call(l)},k=l._readableState&&l._readableState.endEmitted,x=function(){P=!1,k=!0,g||v.call(l)},C=function(s){v.call(l,s)},m=function(){var s;return P&&!k?((!l._readableState||!l._readableState.ended)&&(s=new A),v.call(l,s)):g&&!F?((!l._writableState||!l._writableState.ended)&&(s=new A),v.call(l,s)):void 0},a=function(){l.req.on("finish",w)};return function O(l){return l.setHeader&&"function"==typeof l.abort}(l)?(l.on("complete",w),l.on("abort",m),l.req?a():l.on("request",a)):g&&!l._writableState&&(l.on("end",D),l.on("close",D)),l.on("end",x),l.on("finish",w),!1!==f.error&&l.on("error",C),l.on("close",m),function(){l.removeListener("complete",w),l.removeListener("abort",m),l.removeListener("request",a),l.req&&l.req.removeListener("finish",w),l.removeListener("end",D),l.removeListener("close",D),l.removeListener("finish",w),l.removeListener("end",x),l.removeListener("error",C),l.removeListener("close",m)}}},98:V=>{V.exports=function(){throw new Error("Readable.from is not available in the browser")}},792:(V,E,b)=>{"use strict";var A,U=b(7513).q,O=U.ERR_MISSING_ARGS,T=U.ERR_STREAM_DESTROYED;function l(w){if(w)throw w}function P(w){w()}function g(w,k){return w.pipe(k)}V.exports=function F(){for(var w=arguments.length,k=new Array(w),x=0;x<w;x++)k[x]=arguments[x];var C=function D(w){return w.length&&"function"==typeof w[w.length-1]?w.pop():l}(k);if(Array.isArray(k[0])&&(k=k[0]),k.length<2)throw new O("streams");var m,a=k.map(function(u,s){var p=s<k.length-1;return function v(w,k,x,C){C=function j(w){var k=!1;return function(){k||(k=!0,w.apply(void 0,arguments))}}(C);var m=!1;w.on("close",function(){m=!0}),void 0===A&&(A=b(7297)),A(w,{readable:k,writable:x},function(u){if(u)return C(u);m=!0,C()});var a=!1;return function(u){if(!m&&!a){if(a=!0,function f(w){return w.setHeader&&"function"==typeof w.abort}(w))return w.abort();if("function"==typeof w.destroy)return w.destroy();C(u||new T("pipe"))}}}(u,p,s>0,function(M){m||(m=M),M&&a.forEach(P),!p&&(a.forEach(P),C(m))})});return k.reduce(g)}},278:(V,E,b)=>{"use strict";var A=b(7513).q.ERR_INVALID_OPT_VALUE;V.exports={getHighWaterMark:function U(O,T,l,f){var v=function j(O,T,l){return null!=O.highWaterMark?O.highWaterMark:T?O[l]:null}(T,f,l);if(null!=v){if(!isFinite(v)||Math.floor(v)!==v||v<0)throw new A(f?l:"highWaterMark",v);return Math.floor(v)}return O.objectMode?16:16384}}},9202:(V,E,b)=>{V.exports=b(991).EventEmitter},512:(V,E,b)=>{var A=b(4387),j=A.Buffer;function U(T,l){for(var f in T)l[f]=T[f]}function O(T,l,f){return j(T,l,f)}j.from&&j.alloc&&j.allocUnsafe&&j.allocUnsafeSlow?V.exports=A:(U(A,E),E.Buffer=O),O.prototype=Object.create(j.prototype),U(j,O),O.from=function(T,l,f){if("number"==typeof T)throw new TypeError("Argument must not be a number");return j(T,l,f)},O.alloc=function(T,l,f){if("number"!=typeof T)throw new TypeError("Argument must be a number");var v=j(T);return void 0!==l?"string"==typeof f?v.fill(l,f):v.fill(l):v.fill(0),v},O.allocUnsafe=function(T){if("number"!=typeof T)throw new TypeError("Argument must be a number");return j(T)},O.allocUnsafeSlow=function(T){if("number"!=typeof T)throw new TypeError("Argument must be a number");return A.SlowBuffer(T)}},7341:(V,E,b)=>{"use strict";var A=b(512).Buffer,j=A.isEncoding||function(a){switch((a=""+a)&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T(a){var u;switch(this.encoding=function O(a){var u=function U(a){if(!a)return"utf8";for(var u;;)switch(a){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return a;default:if(u)return;a=(""+a).toLowerCase(),u=!0}}(a);if("string"!=typeof u&&(A.isEncoding===j||!j(a)))throw new Error("Unknown encoding: "+a);return u||a}(a),this.encoding){case"utf16le":this.text=F,this.end=w,u=4;break;case"utf8":this.fillLast=P,u=4;break;case"base64":this.text=k,this.end=x,u=3;break;default:return this.write=C,void(this.end=m)}this.lastNeed=0,this.lastTotal=0,this.lastChar=A.allocUnsafe(u)}function l(a){return a<=127?0:a>>5==6?2:a>>4==14?3:a>>3==30?4:a>>6==2?-1:-2}function P(a){var u=this.lastTotal-this.lastNeed,s=function v(a,u,s){if(128!=(192&u[0]))return a.lastNeed=0,"\ufffd";if(a.lastNeed>1&&u.length>1){if(128!=(192&u[1]))return a.lastNeed=1,"\ufffd";if(a.lastNeed>2&&u.length>2&&128!=(192&u[2]))return a.lastNeed=2,"\ufffd"}}(this,a);return void 0!==s?s:this.lastNeed<=a.length?(a.copy(this.lastChar,u,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(a.copy(this.lastChar,u,0,a.length),void(this.lastNeed-=a.length))}function F(a,u){if((a.length-u)%2==0){var s=a.toString("utf16le",u);if(s){var p=s.charCodeAt(s.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",u,a.length-1)}function w(a){var u=a&&a.length?this.write(a):"";return this.lastNeed?u+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):u}function k(a,u){var s=(a.length-u)%3;return 0===s?a.toString("base64",u):(this.lastNeed=3-s,this.lastTotal=3,1===s?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",u,a.length-s))}function x(a){var u=a&&a.length?this.write(a):"";return this.lastNeed?u+this.lastChar.toString("base64",0,3-this.lastNeed):u}function C(a){return a.toString(this.encoding)}function m(a){return a&&a.length?this.write(a):""}E.s=T,T.prototype.write=function(a){if(0===a.length)return"";var u,s;if(this.lastNeed){if(void 0===(u=this.fillLast(a)))return"";s=this.lastNeed,this.lastNeed=0}else s=0;return s<a.length?u?u+this.text(a,s):this.text(a,s):u||""},T.prototype.end=function D(a){var u=a&&a.length?this.write(a):"";return this.lastNeed?u+"\ufffd":u},T.prototype.text=function g(a,u){var s=function f(a,u,s){var p=u.length-1;if(p<s)return 0;var S=l(u[p]);return S>=0?(S>0&&(a.lastNeed=S-1),S):--p<s||-2===S?0:(S=l(u[p]))>=0?(S>0&&(a.lastNeed=S-2),S):--p<s||-2===S?0:(S=l(u[p]))>=0?(S>0&&(2===S?S=0:a.lastNeed=S-3),S):0}(this,a,u);if(!this.lastNeed)return a.toString("utf8",u);this.lastTotal=s;var p=a.length-(s-this.lastNeed);return a.copy(this.lastChar,0,p),a.toString("utf8",u,p)},T.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length),this.lastNeed-=a.length}},4691:V=>{function b(A){try{if(!global.localStorage)return!1}catch{return!1}var j=global.localStorage[A];return null!=j&&"true"===String(j).toLowerCase()}V.exports=function E(A,j){if(b("noDeprecation"))return A;var U=!1;return function O(){if(!U){if(b("throwDeprecation"))throw new Error(j);b("traceDeprecation")?console.trace(j):console.warn(j),U=!0}return A.apply(this,arguments)}}},1206:V=>{V.exports=function(b){return b&&"object"==typeof b&&"function"==typeof b.copy&&"function"==typeof b.fill&&"function"==typeof b.readUInt8}},9161:(V,E,b)=>{"use strict";var A=b(8295),j=b(107),U=b(4207),O=b(9569);function T(t){return t.call.bind(t)}var l=typeof BigInt<"u",f=typeof Symbol<"u",v=T(Object.prototype.toString),P=T(Number.prototype.valueOf),g=T(String.prototype.valueOf),D=T(Boolean.prototype.valueOf);if(l)var F=T(BigInt.prototype.valueOf);if(f)var w=T(Symbol.prototype.valueOf);function k(t,d){if("object"!=typeof t)return!1;try{return d(t),!0}catch{return!1}}function ne(t){return"[object Map]"===v(t)}function oe(t){return"[object Set]"===v(t)}function se(t){return"[object WeakMap]"===v(t)}function le(t){return"[object WeakSet]"===v(t)}function ue(t){return"[object ArrayBuffer]"===v(t)}function Z(t){return!(typeof ArrayBuffer>"u")&&(ue.working?ue(t):t instanceof ArrayBuffer)}function y(t){return"[object DataView]"===v(t)}function _(t){return!(typeof DataView>"u")&&(y.working?y(t):t instanceof DataView)}E.isArgumentsObject=A,E.isGeneratorFunction=j,E.isTypedArray=O,E.isPromise=function x(t){return typeof Promise<"u"&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},E.isArrayBufferView=function C(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(t):O(t)||_(t)},E.isUint8Array=function m(t){return"Uint8Array"===U(t)},E.isUint8ClampedArray=function a(t){return"Uint8ClampedArray"===U(t)},E.isUint16Array=function u(t){return"Uint16Array"===U(t)},E.isUint32Array=function s(t){return"Uint32Array"===U(t)},E.isInt8Array=function p(t){return"Int8Array"===U(t)},E.isInt16Array=function S(t){return"Int16Array"===U(t)},E.isInt32Array=function M(t){return"Int32Array"===U(t)},E.isFloat32Array=function G(t){return"Float32Array"===U(t)},E.isFloat64Array=function H(t){return"Float64Array"===U(t)},E.isBigInt64Array=function $(t){return"BigInt64Array"===U(t)},E.isBigUint64Array=function z(t){return"BigUint64Array"===U(t)},ne.working=typeof Map<"u"&&ne(new Map),E.isMap=function fe(t){return!(typeof Map>"u")&&(ne.working?ne(t):t instanceof Map)},oe.working=typeof Set<"u"&&oe(new Set),E.isSet=function ae(t){return!(typeof Set>"u")&&(oe.working?oe(t):t instanceof Set)},se.working=typeof WeakMap<"u"&&se(new WeakMap),E.isWeakMap=function ce(t){return!(typeof WeakMap>"u")&&(se.working?se(t):t instanceof WeakMap)},le.working=typeof WeakSet<"u"&&le(new WeakSet),E.isWeakSet=function ie(t){return le(t)},ue.working=typeof ArrayBuffer<"u"&&ue(new ArrayBuffer),E.isArrayBuffer=Z,y.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&y(new DataView(new ArrayBuffer(1),0,1)),E.isDataView=_;var I=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Y(t){return"[object SharedArrayBuffer]"===v(t)}function q(t){return!(typeof I>"u")&&(typeof Y.working>"u"&&(Y.working=Y(new I)),Y.working?Y(t):t instanceof I)}function K(t){return k(t,P)}function i(t){return k(t,g)}function o(t){return k(t,D)}function B(t){return l&&k(t,F)}function n(t){return f&&k(t,w)}E.isSharedArrayBuffer=q,E.isAsyncFunction=function X(t){return"[object AsyncFunction]"===v(t)},E.isMapIterator=function c(t){return"[object Map Iterator]"===v(t)},E.isSetIterator=function h(t){return"[object Set Iterator]"===v(t)},E.isGeneratorObject=function R(t){return"[object Generator]"===v(t)},E.isWebAssemblyCompiledModule=function W(t){return"[object WebAssembly.Module]"===v(t)},E.isNumberObject=K,E.isStringObject=i,E.isBooleanObject=o,E.isBigIntObject=B,E.isSymbolObject=n,E.isBoxedPrimitive=function e(t){return K(t)||i(t)||o(t)||B(t)||n(t)},E.isAnyArrayBuffer=function r(t){return typeof Uint8Array<"u"&&(Z(t)||q(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(E,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})},413:(V,E,b)=>{var A=Object.getOwnPropertyDescriptors||function(_){for(var I=Object.keys(_),Y={},q=0;q<I.length;q++)Y[I[q]]=Object.getOwnPropertyDescriptor(_,I[q]);return Y},j=/%[sdj%]/g;E.format=function(y){if(!p(y)){for(var _=[],I=0;I<arguments.length;I++)_.push(l(arguments[I]));return _.join(" ")}I=1;for(var Y=arguments,q=Y.length,X=String(y).replace(j,function(h){if("%%"===h)return"%";if(I>=q)return h;switch(h){case"%s":return String(Y[I++]);case"%d":return Number(Y[I++]);case"%j":try{return JSON.stringify(Y[I++])}catch{return"[Circular]"}default:return h}}),c=Y[I];I<q;c=Y[++I])a(c)||!H(c)?X+=" "+c:X+=" "+l(c);return X},E.deprecate=function(y,_){if(typeof process<"u"&&!0===process.noDeprecation)return y;if(typeof process>"u")return function(){return E.deprecate(y,_).apply(this,arguments)};var I=!1;return function Y(){if(!I){if(process.throwDeprecation)throw new Error(_);process.traceDeprecation?console.trace(_):console.error(_),I=!0}return y.apply(this,arguments)}};var U={},O=/^$/;if(process.env.NODE_DEBUG){var T=process.env.NODE_DEBUG;T=T.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),O=new RegExp("^"+T+"$","i")}function l(y,_){var I={seen:[],stylize:v};return arguments.length>=3&&(I.depth=arguments[2]),arguments.length>=4&&(I.colors=arguments[3]),m(_)?I.showHidden=_:_&&E._extend(I,_),M(I.showHidden)&&(I.showHidden=!1),M(I.depth)&&(I.depth=2),M(I.colors)&&(I.colors=!1),M(I.customInspect)&&(I.customInspect=!0),I.colors&&(I.stylize=f),g(I,y,I.depth)}function f(y,_){var I=l.styles[_];return I?"\x1b["+l.colors[I][0]+"m"+y+"\x1b["+l.colors[I][1]+"m":y}function v(y,_){return y}function g(y,_,I){if(y.customInspect&&_&&ne(_.inspect)&&_.inspect!==E.inspect&&(!_.constructor||_.constructor.prototype!==_)){var Y=_.inspect(I,y);return p(Y)||(Y=g(y,Y,I)),Y}var q=function D(y,_){if(M(_))return y.stylize("undefined","undefined");if(p(_)){var I="'"+JSON.stringify(_).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return y.stylize(I,"string")}return s(_)?y.stylize(""+_,"number"):m(_)?y.stylize(""+_,"boolean"):a(_)?y.stylize("null","null"):void 0}(y,_);if(q)return q;var X=Object.keys(_),c=function P(y){var _={};return y.forEach(function(I,Y){_[I]=!0}),_}(X);if(y.showHidden&&(X=Object.getOwnPropertyNames(_)),z(_)&&(X.indexOf("message")>=0||X.indexOf("description")>=0))return F(_);if(0===X.length){if(ne(_))return y.stylize("[Function"+(_.name?": "+_.name:"")+"]","special");if(G(_))return y.stylize(RegExp.prototype.toString.call(_),"regexp");if($(_))return y.stylize(Date.prototype.toString.call(_),"date");if(z(_))return F(_)}var o,R="",W=!1,K=["{","}"];return C(_)&&(W=!0,K=["[","]"]),ne(_)&&(R=" [Function"+(_.name?": "+_.name:"")+"]"),G(_)&&(R=" "+RegExp.prototype.toString.call(_)),$(_)&&(R=" "+Date.prototype.toUTCString.call(_)),z(_)&&(R=" "+F(_)),0!==X.length||W&&0!=_.length?I<0?G(_)?y.stylize(RegExp.prototype.toString.call(_),"regexp"):y.stylize("[Object]","special"):(y.seen.push(_),o=W?function w(y,_,I,Y,q){for(var X=[],c=0,h=_.length;c<h;++c)le(_,String(c))?X.push(k(y,_,I,Y,String(c),!0)):X.push("");return q.forEach(function(R){R.match(/^\d+$/)||X.push(k(y,_,I,Y,R,!0))}),X}(y,_,I,c,X):X.map(function(B){return k(y,_,I,c,B,W)}),y.seen.pop(),function x(y,_,I){var q=y.reduce(function(X,c){return c.indexOf("\n"),X+c.replace(/\u001b\[\d\d?m/g,"").length+1},0);return q>60?I[0]+(""===_?"":_+"\n ")+" "+y.join(",\n ")+" "+I[1]:I[0]+_+" "+y.join(", ")+" "+I[1]}(o,R,K)):K[0]+R+K[1]}function F(y){return"["+Error.prototype.toString.call(y)+"]"}function k(y,_,I,Y,q,X){var c,h,R;if((R=Object.getOwnPropertyDescriptor(_,q)||{value:_[q]}).get?h=y.stylize(R.set?"[Getter/Setter]":"[Getter]","special"):R.set&&(h=y.stylize("[Setter]","special")),le(Y,q)||(c="["+q+"]"),h||(y.seen.indexOf(R.value)<0?(h=a(I)?g(y,R.value,null):g(y,R.value,I-1)).indexOf("\n")>-1&&(h=X?h.split("\n").map(function(W){return" "+W}).join("\n").slice(2):"\n"+h.split("\n").map(function(W){return" "+W}).join("\n")):h=y.stylize("[Circular]","special")),M(c)){if(X&&q.match(/^\d+$/))return h;(c=JSON.stringify(""+q)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(c=c.slice(1,-1),c=y.stylize(c,"name")):(c=c.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),c=y.stylize(c,"string"))}return c+": "+h}function C(y){return Array.isArray(y)}function m(y){return"boolean"==typeof y}function a(y){return null===y}function s(y){return"number"==typeof y}function p(y){return"string"==typeof y}function M(y){return void 0===y}function G(y){return H(y)&&"[object RegExp]"===oe(y)}function H(y){return"object"==typeof y&&null!==y}function $(y){return H(y)&&"[object Date]"===oe(y)}function z(y){return H(y)&&("[object Error]"===oe(y)||y instanceof Error)}function ne(y){return"function"==typeof y}function oe(y){return Object.prototype.toString.call(y)}function ae(y){return y<10?"0"+y.toString(10):y.toString(10)}E.debuglog=function(y){if(y=y.toUpperCase(),!U[y])if(O.test(y)){var _=process.pid;U[y]=function(){var I=E.format.apply(E,arguments);console.error("%s %d: %s",y,_,I)}}else U[y]=function(){};return U[y]},E.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.types=b(9161),E.isArray=C,E.isBoolean=m,E.isNull=a,E.isNullOrUndefined=function u(y){return null==y},E.isNumber=s,E.isString=p,E.isSymbol=function S(y){return"symbol"==typeof y},E.isUndefined=M,E.isRegExp=G,E.types.isRegExp=G,E.isObject=H,E.isDate=$,E.types.isDate=$,E.isError=z,E.types.isNativeError=z,E.isFunction=ne,E.isPrimitive=function fe(y){return null===y||"boolean"==typeof y||"number"==typeof y||"string"==typeof y||"symbol"==typeof y||typeof y>"u"},E.isBuffer=b(1206);var se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function le(y,_){return Object.prototype.hasOwnProperty.call(y,_)}E.log=function(){console.log("%s - %s",function ce(){var y=new Date,_=[ae(y.getHours()),ae(y.getMinutes()),ae(y.getSeconds())].join(":");return[y.getDate(),se[y.getMonth()],_].join(" ")}(),E.format.apply(E,arguments))},E.inherits=b(9117),E._extend=function(y,_){if(!_||!H(_))return y;for(var I=Object.keys(_),Y=I.length;Y--;)y[I[Y]]=_[I[Y]];return y};var ie=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function ue(y,_){if(!y){var I=new Error("Promise was rejected with a falsy value");I.reason=y,y=I}return _(y)}E.promisify=function(_){if("function"!=typeof _)throw new TypeError('The "original" argument must be of type Function');if(ie&&_[ie]){var I;if("function"!=typeof(I=_[ie]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(I,ie,{value:I,enumerable:!1,writable:!1,configurable:!0}),I}function I(){for(var Y,q,X=new Promise(function(R,W){Y=R,q=W}),c=[],h=0;h<arguments.length;h++)c.push(arguments[h]);c.push(function(R,W){R?q(R):Y(W)});try{_.apply(this,c)}catch(R){q(R)}return X}return Object.setPrototypeOf(I,Object.getPrototypeOf(_)),ie&&Object.defineProperty(I,ie,{value:I,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(I,A(_))},E.promisify.custom=ie,E.callbackify=function Z(y){if("function"!=typeof y)throw new TypeError('The "original" argument must be of type Function');function _(){for(var I=[],Y=0;Y<arguments.length;Y++)I.push(arguments[Y]);var q=I.pop();if("function"!=typeof q)throw new TypeError("The last argument must be of type Function");var X=this,c=function(){return q.apply(X,arguments)};y.apply(this,I).then(function(h){process.nextTick(c.bind(null,null,h))},function(h){process.nextTick(ue.bind(null,h,c))})}return Object.setPrototypeOf(_,Object.getPrototypeOf(y)),Object.defineProperties(_,A(y)),_}},4207:(V,E,b)=>{"use strict";var A=b(9058),j=b(6937),U=b(2344),O=b(4082),T=b(3668),l=O("Object.prototype.toString"),f=b(6634)(),v=typeof globalThis>"u"?global:globalThis,P=j(),g=O("String.prototype.slice"),D=Object.getPrototypeOf,F=O("Array.prototype.indexOf",!0)||function(m,a){for(var u=0;u<m.length;u+=1)if(m[u]===a)return u;return-1},w={__proto__:null};A(P,f&&T&&D?function(C){var m=new v[C];if(Symbol.toStringTag in m){var a=D(m),u=T(a,Symbol.toStringTag);if(!u){var s=D(a);u=T(s,Symbol.toStringTag)}w["$"+C]=U(u.get)}}:function(C){var m=new v[C],a=m.slice||m.set;a&&(w["$"+C]=U(a))}),V.exports=function(m){if(!m||"object"!=typeof m)return!1;if(!f){var a=g(l(m),8,-1);return F(P,a)>-1?a:"Object"===a&&function(m){var a=!1;return A(w,function(u,s){if(!a)try{u(m),a=g(s,1)}catch{}}),a}(m)}return T?function(m){var a=!1;return A(w,function(u,s){if(!a)try{"$"+u(m)===s&&(a=g(s,1))}catch{}}),a}(m):null}},6937:V=>{"use strict";var E=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],b=typeof globalThis>"u"?global:globalThis;V.exports=function(){for(var j=[],U=0;U<E.length;U++)"function"==typeof b[E[U]]&&(j[j.length]=E[U]);return j}}}]); \ No newline at end of file diff --git a/979.b4b04f45c994ed41.js b/979.b4b04f45c994ed41.js deleted file mode 100644 index 84d129339..000000000 --- a/979.b4b04f45c994ed41.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdemo_maps=self.webpackChunkdemo_maps||[]).push([[979],{752:g=>{g.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},6202:(g,u,a)=>{(u=g.exports=a(3679)).Stream=u,u.Readable=u,u.Writable=a(6246),u.Duplex=a(6615),u.Transform=a(6085),u.PassThrough=a(7881),u.finished=a(7297),u.pipeline=a(792)},9979:(g,u,a)=>{var c=a(3646),y=a(1033),p=a(5953),h=a(752),v=a(7498),f=u;f.request=function(o,s){o="string"==typeof o?v.parse(o):p(o);var d=-1===global.location.protocol.search(/^https?:$/)?"http:":"",r=o.protocol||d,e=o.hostname||o.host,t=o.port,i=o.path||"/";e&&-1!==e.indexOf(":")&&(e="["+e+"]"),o.url=(e?r+"//"+e:"")+(t?":"+t:"")+i,o.method=(o.method||"GET").toUpperCase(),o.headers=o.headers||{};var m=new c(o);return s&&m.on("response",s),m},f.get=function(s,d){var r=f.request(s,d);return r.end(),r},f.ClientRequest=c,f.IncomingMessage=y.IncomingMessage,f.Agent=function(){},f.Agent.defaultMaxSockets=4,f.globalAgent=new f.Agent,f.STATUS_CODES=h,f.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},5062:(g,u)=>{var a;function c(){if(void 0!==a)return a;if(global.XMLHttpRequest){a=new global.XMLHttpRequest;try{a.open("GET",global.XDomainRequest?"/":"https://example.com")}catch{a=null}}else a=null;return a}function y(h){var v=c();if(!v)return!1;try{return v.responseType=h,v.responseType===h}catch{}return!1}function p(h){return"function"==typeof h}u.fetch=p(global.fetch)&&p(global.ReadableStream),u.writableStream=p(global.WritableStream),u.abortController=p(global.AbortController),u.arraybuffer=u.fetch||y("arraybuffer"),u.msstream=!u.fetch&&y("ms-stream"),u.mozchunkedarraybuffer=!u.fetch&&y("moz-chunked-arraybuffer"),u.overrideMimeType=u.fetch||!!c()&&p(c().overrideMimeType),a=null},3646:(g,u,a)=>{var c=a(5062),y=a(9117),p=a(1033),h=a(6202),v=p.IncomingMessage,f=p.readyStates,s=g.exports=function(e){var t=this;h.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+Buffer.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(T){t.setHeader(T,e.headers[T])});var i,m=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!c.abortController)m=!1,i=!0;else if("prefer-streaming"===e.mode)i=!1;else if("allow-wrong-content-type"===e.mode)i=!c.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");i=!0}t._mode=function o(e,t){return c.fetch&&t?"fetch":c.mozchunkedarraybuffer?"moz-chunked-arraybuffer":c.msstream?"ms-stream":c.arraybuffer&&e?"arraybuffer":"text"}(i,m),t._fetchTimer=null,t._socketTimeout=null,t._socketTimer=null,t.on("finish",function(){t._onFinish()})};y(s,h.Writable),s.prototype.setHeader=function(e,t){var m=e.toLowerCase();-1===r.indexOf(m)&&(this._headers[m]={name:e,value:t})},s.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},s.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},s.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var i=e._headers,m=null;"GET"!==t.method&&"HEAD"!==t.method&&(m=new Blob(e._body,{type:(i["content-type"]||{}).value||""}));var T=[];if(Object.keys(i).forEach(function(l){var R=i[l].name,_=i[l].value;Array.isArray(_)?_.forEach(function(E){T.push([R,E])}):T.push([R,_])}),"fetch"===e._mode){var C=null;if(c.abortController){var b=new AbortController;C=b.signal,e._fetchAbortController=b,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=global.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}global.fetch(e._opts.url,{method:e._opts.method,headers:T,body:m||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:C}).then(function(l){e._fetchResponse=l,e._resetTimers(!1),e._connect()},function(l){e._resetTimers(!0),e._destroyed||e.emit("error",l)})}else{var n=e._xhr=new global.XMLHttpRequest;try{n.open(e._opts.method,e._opts.url,!0)}catch(l){return void process.nextTick(function(){e.emit("error",l)})}"responseType"in n&&(n.responseType=e._mode),"withCredentials"in n&&(n.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(n.timeout=t.requestTimeout,n.ontimeout=function(){e.emit("requestTimeout")}),T.forEach(function(l){n.setRequestHeader(l[0],l[1])}),e._response=null,n.onreadystatechange=function(){switch(n.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(n.onprogress=function(){e._onXHRProgress()}),n.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{n.send(m)}catch(l){return void process.nextTick(function(){e.emit("error",l)})}}}},s.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function d(e){try{var t=e.status;return null!==t&&0!==t}catch{return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},s.prototype._connect=function(){var e=this;e._destroyed||(e._response=new v(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},s.prototype._write=function(e,t,i){this._body.push(e),i()},s.prototype._resetTimers=function(e){var t=this;global.clearTimeout(t._socketTimer),t._socketTimer=null,e?(global.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=global.setTimeout(function(){t.emit("timeout")},t._socketTimeout))},s.prototype.abort=s.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},s.prototype.end=function(e,t,i){"function"==typeof e&&(i=e,e=void 0),h.Writable.prototype.end.call(this,e,t,i)},s.prototype.setTimeout=function(e,t){var i=this;t&&i.once("timeout",t),i._socketTimeout=e,i._resetTimers(!1)},s.prototype.flushHeaders=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var r=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},1033:(g,u,a)=>{var c=a(5062),y=a(9117),p=a(6202),h=u.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},v=u.IncomingMessage=function(f,o,s,d){var r=this;if(p.Readable.call(r),r._mode=s,r.headers={},r.rawHeaders=[],r.trailers={},r.rawTrailers=[],r.on("end",function(){process.nextTick(function(){r.emit("close")})}),"fetch"===s){let b=function(){t.read().then(function(n){if(!r._destroyed){if(d(n.done),n.done)return void r.push(null);r.push(Buffer.from(n.value)),b()}}).catch(function(n){d(!0),r._destroyed||r.emit("error",n)})};if(r._fetchResponse=o,r.url=o.url,r.statusCode=o.status,r.statusMessage=o.statusText,o.headers.forEach(function(n,l){r.headers[l.toLowerCase()]=n,r.rawHeaders.push(l,n)}),c.writableStream){var e=new WritableStream({write:function(n){return d(!1),new Promise(function(l,R){r._destroyed?R():r.push(Buffer.from(n))?l():r._resumeFetch=l})},close:function(){d(!0),r._destroyed||r.push(null)},abort:function(n){d(!0),r._destroyed||r.emit("error",n)}});try{return void o.body.pipeTo(e).catch(function(n){d(!0),r._destroyed||r.emit("error",n)})}catch{}}var t=o.body.getReader();b()}else if(r._xhr=f,r._pos=0,r.url=f.responseURL,r.statusCode=f.status,r.statusMessage=f.statusText,f.getAllResponseHeaders().split(/\r?\n/).forEach(function(b){var n=b.match(/^([^:]+):\s*(.*)/);if(n){var l=n[1].toLowerCase();"set-cookie"===l?(void 0===r.headers[l]&&(r.headers[l]=[]),r.headers[l].push(n[2])):void 0!==r.headers[l]?r.headers[l]+=", "+n[2]:r.headers[l]=n[2],r.rawHeaders.push(n[1],n[2])}}),r._charset="x-user-defined",!c.overrideMimeType){var m=r.rawHeaders["mime-type"];if(m){var T=m.match(/;\s*charset=([^;])(;|$)/);T&&(r._charset=T[1].toLowerCase())}r._charset||(r._charset="utf-8")}};y(v,p.Readable),v.prototype._read=function(){var o=this._resumeFetch;o&&(this._resumeFetch=null,o())},v.prototype._onXHRProgress=function(f){var o=this,s=o._xhr,d=null;switch(o._mode){case"text":if((d=s.responseText).length>o._pos){var r=d.substr(o._pos);if("x-user-defined"===o._charset){for(var e=Buffer.alloc(r.length),t=0;t<r.length;t++)e[t]=255&r.charCodeAt(t);o.push(e)}else o.push(r,o._charset);o._pos=d.length}break;case"arraybuffer":if(s.readyState!==h.DONE||!s.response)break;d=s.response,o.push(Buffer.from(new Uint8Array(d)));break;case"moz-chunked-arraybuffer":if(d=s.response,s.readyState!==h.LOADING||!d)break;o.push(Buffer.from(new Uint8Array(d)));break;case"ms-stream":if(d=s.response,s.readyState!==h.LOADING)break;var i=new global.MSStreamReader;i.onprogress=function(){i.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(i.result.slice(o._pos)))),o._pos=i.result.byteLength)},i.onload=function(){f(!0),o.push(null)},i.readAsArrayBuffer(d)}o._xhr.readyState===h.DONE&&"ms-stream"!==o._mode&&(f(!0),o.push(null))}},5953:g=>{g.exports=function a(){for(var c={},y=0;y<arguments.length;y++){var p=arguments[y];for(var h in p)u.call(p,h)&&(c[h]=p[h])}return c};var u=Object.prototype.hasOwnProperty}}]); \ No newline at end of file diff --git a/assets/cesium/Assets/approximateTerrainHeights.json b/assets/cesium/Assets/approximateTerrainHeights.json index 92e52a3b7..259b1cbb5 100644 --- a/assets/cesium/Assets/approximateTerrainHeights.json +++ b/assets/cesium/Assets/approximateTerrainHeights.json @@ -1 +1 @@ -{"6-0-0":[10.66,26.9],"6-0-1":[6.74,20.61],"6-0-2":[4.04,14.2],"6-0-3":[2.99,8.89],"6-0-4":[0.89,6.8],"6-0-5":[0.83,4.22],"6-0-6":[1.01,996.64],"6-0-7":[1.65,1473.8],"6-0-8":[4.23,1405.42],"6-0-9":[3.78,9.42],"6-0-10":[0.33,10.41],"6-0-11":[0.37,9.42],"6-0-12":[-1.21,10.72],"6-0-13":[-24.75,1797.13],"6-0-14":[-25.53,3.24],"6-0-15":[-12.72,0.06],"6-0-16":[-21.01,-5.62],"6-0-17":[-25.65,-10.79],"6-0-18":[-25.81,-11.56],"6-0-19":[-23.99,-9.29],"6-0-20":[-21.03,-8.01],"6-0-21":[-17.26,28.36],"6-0-22":[-10.44,-0.18],"6-0-23":[-6.09,1.27],"6-0-24":[0.2,8.96],"6-0-25":[4.5,13.87],"6-0-26":[6.42,18.94],"6-0-27":[9.26,23.03],"6-0-28":[10.92,27.13],"6-0-29":[12.68,32.43],"6-0-30":[15.67,36.44],"6-0-31":[17.17,41.7],"6-0-32":[18.65,43.91],"6-0-33":[19.85,48.69],"6-0-34":[21.11,56.5],"6-0-35":[26.26,79],"6-0-36":[33,95.12],"6-0-37":[17.36,1242.86],"6-0-38":[17.56,1197.83],"6-0-39":[46.88,149.88],"6-0-40":[49.39,105.09],"6-0-41":[41.61,101.97],"6-0-42":[20.68,550.11],"6-0-43":[17.2,92.57],"6-0-44":[16.92,77.99],"6-0-45":[18.56,46.63],"6-0-46":[12.38,43.07],"6-0-47":[3.4,29.35],"6-0-48":[-19.81,6.49],"6-0-49":[-39.19,-4.52],"6-0-50":[-57.57,-19.1],"6-0-51":[-76.36,-29.46],"6-0-52":[-88.35,-37.9],"6-0-53":[-97.62,-44.45],"6-0-54":[-101.65,-48.19],"6-0-55":[-119.7,-51.12],"6-0-56":[-126.97,-57.56],"6-0-57":[-126.3,-60.82],"6-0-58":[-126.26,-59.93],"6-0-59":[-119.1,-54.84],"6-0-60":[-110.88,-48.64],"6-0-61":[-96.62,258.8],"6-0-62":[-90.74,2997.38],"6-0-63":[-31.67,3098.17],"6-1-0":[10.71,26.95],"6-1-1":[7.14,20.8],"5-0-0":[6.74,26.95],"6-1-2":[3.89,15.04],"6-1-3":[3.37,8.36],"5-0-1":[2.99,15.04],"6-1-4":[-0.61,6.83],"6-1-5":[-0.55,4.83],"5-0-2":[-0.61,6.83],"6-1-6":[-0.38,343.9],"6-1-7":[0.43,308.3],"5-0-3":[-0.38,1473.8],"6-1-8":[1.88,906.96],"6-1-9":[4.01,286.65],"5-0-4":[1.88,1405.42],"6-1-10":[3.66,14],"6-1-11":[1.5,14.18],"5-0-5":[0.33,14.18],"6-1-12":[2.47,10.46],"6-1-13":[-22.06,1734.24],"5-0-6":[-24.75,1797.13],"6-1-14":[-20.71,6.52],"6-1-15":[-11.23,1.31],"5-0-7":[-25.53,6.52],"6-1-16":[-20.51,-4.75],"6-1-17":[-25.7,-10],"5-0-8":[-25.7,-4.75],"6-1-18":[-26.19,-12.15],"6-1-19":[-25.87,-9.22],"5-0-9":[-26.19,-9.22],"6-1-20":[-22.92,-7.87],"6-1-21":[-16.03,0.26],"5-0-10":[-22.92,28.36],"6-1-22":[-9.59,9.27],"6-1-23":[-2.9,6.54],"5-0-11":[-10.44,9.27],"6-1-24":[0.86,11.17],"6-1-25":[4.31,18.66],"5-0-12":[0.2,18.66],"6-1-26":[6.61,18.19],"6-1-27":[8.7,22.85],"5-0-13":[6.42,23.03],"6-1-28":[9.96,23.64],"6-1-29":[9.97,31.23],"5-0-14":[9.96,32.43],"6-1-30":[13.01,34.4],"6-1-31":[16.28,38.74],"5-0-15":[13.01,41.7],"6-1-32":[16.81,39.97],"6-1-33":[17.68,44.11],"5-0-16":[16.81,48.69],"6-1-34":[18.54,49.53],"6-1-35":[22.64,65.95],"5-0-17":[18.54,79],"6-1-36":[28.21,188.59],"6-1-37":[34.36,262.29],"5-0-18":[17.36,1242.86],"6-1-38":[45.21,1074.21],"6-1-39":[25.48,561.48],"5-0-19":[17.56,1197.83],"6-1-40":[23.5,105.17],"6-1-41":[23.63,99.7],"5-0-20":[23.5,105.17],"6-1-42":[19.32,82.54],"6-1-43":[18.61,61.85],"5-0-21":[17.2,550.11],"6-1-44":[20.07,55.81],"6-1-45":[18.77,46.46],"5-0-22":[16.92,77.99],"6-1-46":[8.68,36.12],"6-1-47":[-36.78,306.25],"5-0-23":[-36.78,306.25],"6-1-48":[-22.66,5.19],"6-1-49":[-42.82,-11.13],"5-0-24":[-42.82,6.49],"6-1-50":[-57.85,-19.1],"6-1-51":[-75.69,-29.65],"5-0-25":[-76.36,-19.1],"6-1-52":[-86.83,-37.51],"6-1-53":[-96.13,-43.07],"5-0-26":[-97.62,-37.51],"6-1-54":[-101.17,-47.18],"6-1-55":[-120.92,-50.74],"5-0-27":[-120.92,-47.18],"6-1-56":[-127.84,-59.08],"6-1-57":[-130.41,-62.14],"5-0-28":[-130.41,-57.56],"6-1-58":[-130.18,-59.59],"6-1-59":[-119.25,-55.12],"5-0-29":[-130.18,-54.84],"6-1-60":[-110.99,-49.4],"6-1-61":[-97.87,-11.15],"5-0-30":[-110.99,258.8],"6-1-62":[-91.52,3443.81],"6-1-63":[-29.54,3102.34],"5-0-31":[-91.52,3443.81],"6-2-0":[10.72,26.98],"6-2-1":[7.83,20.82],"6-2-2":[3.58,15.73],"6-2-3":[2.54,7.2],"6-2-4":[-0.61,5.79],"6-2-5":[-0.51,5.62],"6-2-6":[-0.51,2.52],"6-2-7":[0.49,3.57],"6-2-8":[1.45,1107.58],"6-2-9":[4.33,935.49],"6-2-10":[6.38,447.82],"6-2-11":[2.78,22.33],"6-2-12":[4.36,15.33],"6-2-13":[-21.97,1546.34],"6-2-14":[-15.6,10.11],"6-2-15":[-8.94,3.51],"6-2-16":[-19.28,-3.75],"6-2-17":[-25.1,-8.48],"6-2-18":[-26.22,-11.53],"6-2-19":[-26.62,-11.45],"6-2-20":[-24.22,-7.64],"6-2-21":[-15.31,-2.94],"6-2-22":[-9.58,22.84],"6-2-23":[0.06,13.16],"6-2-24":[3.65,16.58],"6-2-25":[5.95,18.75],"6-2-26":[7.56,18.27],"6-2-27":[8.72,22.69],"6-2-28":[9.83,22.16],"6-2-29":[9.86,26.06],"6-2-30":[12.2,32.28],"6-2-31":[13.89,34.73],"6-2-32":[14.45,36.73],"6-2-33":[14.44,38.35],"6-2-34":[17.75,45.33],"6-2-35":[20.66,56.51],"6-2-36":[14.56,1897.33],"6-2-37":[21.73,602.11],"6-2-38":[6.52,258.3],"6-2-39":[23.9,87.93],"6-2-40":[24.73,68.5],"6-2-41":[28.76,71.42],"6-2-42":[24.12,69.11],"6-2-43":[21.79,60.23],"6-2-44":[16.26,53.69],"6-2-45":[9.6,38.48],"6-2-46":[4.35,25.76],"6-2-47":[-8.34,16.06],"6-2-48":[-23.66,-1.78],"6-2-49":[-43.1,-12.47],"6-2-50":[-57.44,-20.26],"6-2-51":[-75.02,-28.99],"6-2-52":[-85.43,-36.15],"6-2-53":[-94.37,-42.32],"6-2-54":[-100.35,-45.74],"6-2-55":[-118.16,-50.3],"6-2-56":[-127.84,-57.37],"6-2-57":[-132.46,-63.72],"6-2-58":[-131.21,-59.33],"6-2-59":[-117.94,-55.1],"6-2-60":[-110.83,-49.58],"6-2-61":[-98.68,-43.95],"6-2-62":[-90.63,3904.3],"6-2-63":[-29.54,3104.92],"6-3-0":[10.72,27.03],"6-3-1":[7.91,20.82],"5-1-0":[7.83,27.03],"6-3-2":[3.44,16.58],"6-3-3":[2.11,6.48],"5-1-1":[2.11,16.58],"4-0-0":[2.11,27.03],"6-3-4":[-0.03,6.76],"6-3-5":[-0.56,6.63],"5-1-2":[-0.61,6.76],"6-3-6":[-1.04,3.03],"6-3-7":[0.58,2.79],"5-1-3":[-1.04,3.57],"4-0-1":[-1.04,1473.8],"6-3-8":[1.26,912.84],"6-3-9":[4.33,618.8],"5-1-4":[1.26,1107.58],"6-3-10":[6.38,21.82],"6-3-11":[-9.62,311.37],"5-1-5":[-9.62,447.82],"4-0-2":[-9.62,1405.42],"6-3-12":[5.53,24.46],"6-3-13":[-16.08,1745.85],"5-1-6":[-21.97,1745.85],"6-3-14":[-2.94,13.6],"6-3-15":[-7.31,5.28],"5-1-7":[-15.6,13.6],"4-0-3":[-25.53,1797.13],"6-3-16":[-15.66,-3.16],"6-3-17":[-22.96,-8.29],"5-1-8":[-25.1,-3.16],"6-3-18":[-26.21,-10.93],"6-3-19":[-27.23,-12.17],"5-1-9":[-27.23,-10.93],"4-0-4":[-27.23,-3.16],"6-3-20":[-24.81,-7.64],"6-3-21":[-14.34,0.47],"5-1-10":[-24.81,0.47],"6-3-22":[-3.34,23.06],"6-3-23":[2.58,22.37],"5-1-11":[-9.58,23.06],"4-0-5":[-24.81,28.36],"6-3-24":[6.28,19.36],"6-3-25":[8.08,21.32],"5-1-12":[3.65,21.32],"6-3-26":[1.66,34.68],"6-3-27":[8.88,23.51],"5-1-13":[1.66,34.68],"4-0-6":[0.2,34.68],"6-3-28":[10.27,25.7],"6-3-29":[10.85,24.86],"5-1-14":[9.83,26.06],"6-3-30":[11.93,28.27],"6-3-31":[13.63,30.64],"5-1-15":[11.93,34.73],"4-0-7":[9.83,41.7],"6-3-32":[14.74,33.87],"6-3-33":[11.58,35.79],"5-1-16":[11.58,38.35],"6-3-34":[16.56,41.34],"6-3-35":[18.05,51.07],"5-1-17":[16.56,56.51],"4-0-8":[11.58,79],"6-3-36":[19.63,771.39],"6-3-37":[21.73,997.06],"5-1-18":[14.56,1897.33],"6-3-38":[22.85,125.79],"6-3-39":[22.68,58.96],"5-1-19":[6.52,258.3],"4-0-9":[6.52,1897.33],"6-3-40":[21.12,59.21],"6-3-41":[21.12,57.29],"5-1-20":[21.12,71.42],"6-3-42":[19,55.57],"6-3-43":[19,45.14],"5-1-21":[19,69.11],"4-0-10":[17.2,550.11],"6-3-44":[12.68,42.37],"6-3-45":[7.26,30.69],"5-1-22":[7.26,53.69],"6-3-46":[1.07,18.1],"6-3-47":[-14.03,6.67],"5-1-23":[-14.03,25.76],"4-0-11":[-36.78,306.25],"6-3-48":[-25.52,-4.53],"6-3-49":[-40.76,-13.01],"5-1-24":[-43.1,-1.78],"6-3-50":[-55.85,-20.05],"6-3-51":[-71.88,-27.95],"5-1-25":[-75.02,-20.05],"4-0-12":[-76.36,6.49],"6-3-52":[-83.23,-35.08],"6-3-53":[-91.13,-41.07],"5-1-26":[-94.37,-35.08],"6-3-54":[-99.02,-44.5],"6-3-55":[-114.54,-49.53],"5-1-27":[-118.16,-44.5],"4-0-13":[-120.92,-35.08],"6-3-56":[-126.73,-56.74],"6-3-57":[-132.79,-63.72],"5-1-28":[-132.79,-56.74],"6-3-58":[-132.21,-59.46],"6-3-59":[-117.45,-55.06],"5-1-29":[-132.21,-55.06],"4-0-14":[-132.79,-54.84],"6-3-60":[-110.9,-50.05],"6-3-61":[-98.89,-43.58],"5-1-30":[-110.9,-43.58],"6-3-62":[-87.67,3970.41],"6-3-63":[-29.54,3106.07],"5-1-31":[-90.63,3970.41],"4-0-15":[-110.99,3970.41],"6-4-0":[10.72,27.07],"6-4-1":[8.58,20.88],"6-4-2":[3.21,17.11],"6-4-3":[2.1,7.09],"6-4-4":[1.19,8.01],"6-4-5":[-0.22,6.22],"6-4-6":[-1.08,2.41],"6-4-7":[0.39,611.05],"6-4-8":[1.07,1101.35],"6-4-9":[4.69,428.48],"6-4-10":[9.22,653.36],"6-4-11":[10.76,27.57],"6-4-12":[-14.99,1825.97],"6-4-13":[-15.6,2084.32],"6-4-14":[3.47,18.16],"6-4-15":[-5.56,6.15],"6-4-16":[-15.54,-2.51],"6-4-17":[-23.21,-7.81],"6-4-18":[-26.71,-10.93],"6-4-19":[-28,-11.62],"6-4-20":[-24.27,-7.94],"6-4-21":[-14.62,0.97],"6-4-22":[-0.2,17.55],"6-4-23":[2.53,28.15],"6-4-24":[7.62,19.59],"6-4-25":[8.14,21.94],"6-4-26":[9.01,22.24],"6-4-27":[10.38,25.71],"6-4-28":[11.65,27.19],"6-4-29":[12.01,27.84],"6-4-30":[12.52,28.27],"6-4-31":[13.6,29.58],"6-4-32":[14.29,32.89],"6-4-33":[15.45,34.86],"6-4-34":[16.24,35.6],"6-4-35":[15.79,39.9],"6-4-36":[15.18,43.72],"6-4-37":[15.33,45.71],"6-4-38":[15.37,48.56],"6-4-39":[15.29,45.88],"6-4-40":[15.09,44.41],"6-4-41":[14.97,42.29],"6-4-42":[13.73,42.26],"6-4-43":[12.06,37.32],"6-4-44":[10.39,32.28],"6-4-45":[5.84,25.33],"6-4-46":[-0.37,17.65],"6-4-47":[-16.61,1.08],"6-4-48":[-26.32,-7.42],"6-4-49":[-40.76,-13.57],"6-4-50":[-53.73,-20.05],"6-4-51":[-70.17,-26.95],"6-4-52":[-80.79,-33.29],"6-4-53":[-89,-39.39],"6-4-54":[-97.35,-43.1],"6-4-55":[-113.49,-49.01],"6-4-56":[-126.75,-56.1],"6-4-57":[-131.59,-62.78],"6-4-58":[-131.91,-58.9],"6-4-59":[-117.3,-55.06],"6-4-60":[-111.07,-49.97],"6-4-61":[-98.75,-43.61],"6-4-62":[-87.85,3807.76],"6-4-63":[-29.54,3106.13],"6-5-0":[10.78,27.12],"6-5-1":[8.58,21.1],"5-2-0":[8.58,27.12],"6-5-2":[3.17,17.66],"6-5-3":[0.92,7.26],"5-2-1":[0.92,17.66],"6-5-4":[-0.48,8],"6-5-5":[-2.17,1.64],"5-2-2":[-2.17,8.01],"6-5-6":[-0.74,0.57],"6-5-7":[-0.44,977.81],"5-2-3":[-1.08,977.81],"6-5-8":[1.07,1285.63],"6-5-9":[5.92,689.98],"5-2-4":[1.07,1285.63],"6-5-10":[9.22,574.41],"6-5-11":[12.46,29.76],"5-2-5":[9.22,653.36],"6-5-12":[-36.25,2863.96],"6-5-13":[-3.12,25.08],"5-2-6":[-36.25,2863.96],"6-5-14":[3.54,19.59],"6-5-15":[-6.33,5.94],"5-2-7":[-6.33,19.59],"6-5-16":[-17.4,-2.51],"6-5-17":[-24.54,-7.99],"5-2-8":[-24.54,-2.51],"6-5-18":[-27.22,-11.55],"6-5-19":[-27.57,-11.81],"5-2-9":[-28,-10.93],"6-5-20":[-24.98,-7.94],"6-5-21":[-15.88,-0.19],"5-2-10":[-24.98,0.97],"6-5-22":[-3.57,8.23],"6-5-23":[3.2,68.18],"5-2-11":[-3.57,68.18],"6-5-24":[7.47,18.67],"6-5-25":[7.19,18.1],"5-2-12":[7.19,21.94],"6-5-26":[7.38,20.47],"6-5-27":[8.56,27.76],"5-2-13":[7.38,27.76],"6-5-28":[11.8,30.78],"6-5-29":[12.82,30.66],"5-2-14":[11.65,30.78],"6-5-30":[13.61,32.3],"6-5-31":[13.86,32.65],"5-2-15":[12.52,32.65],"6-5-32":[14.35,32.3],"6-5-33":[15.09,34.31],"5-2-16":[14.29,34.86],"6-5-34":[14.43,33.96],"6-5-35":[14.39,37.54],"5-2-17":[14.39,39.9],"6-5-36":[12.64,37.44],"6-5-37":[11.66,31.1],"5-2-18":[11.66,45.71],"6-5-38":[11.75,38.62],"6-5-39":[12.15,31.7],"5-2-19":[11.75,48.56],"6-5-40":[10.41,30.13],"6-5-41":[10.41,29.27],"5-2-20":[10.41,44.41],"6-5-42":[10.26,28.59],"6-5-43":[8.59,25.16],"5-2-21":[8.59,42.26],"6-5-44":[6.7,23.39],"6-5-45":[4.27,19.09],"5-2-22":[4.27,32.28],"6-5-46":[-1.36,10.74],"6-5-47":[-17.27,-0.35],"5-2-23":[-17.27,17.65],"6-5-48":[-26.4,-8.28],"6-5-49":[-40.48,-13.41],"5-2-24":[-40.76,-7.42],"6-5-50":[-51.99,-19.83],"6-5-51":[-66.22,-25.93],"5-2-25":[-70.17,-19.83],"6-5-52":[-77.24,-31.84],"6-5-53":[-85.9,-37.71],"5-2-26":[-89,-31.84],"6-5-54":[-96.28,-42.09],"6-5-55":[-112.03,-48.58],"5-2-27":[-113.49,-42.09],"6-5-56":[-123.43,-55.02],"6-5-57":[-130.93,-62.4],"5-2-28":[-131.59,-55.02],"6-5-58":[-131.32,-59.02],"6-5-59":[-121.42,-54.72],"5-2-29":[-131.91,-54.72],"6-5-60":[-111.23,146.66],"6-5-61":[-98.4,-43.74],"5-2-30":[-111.23,146.66],"6-5-62":[-87.94,3579.75],"6-5-63":[-29.55,3100.28],"5-2-31":[-87.94,3807.76],"6-6-0":[10.89,27.18],"6-6-1":[8.99,21.34],"6-6-2":[3.2,17.98],"6-6-3":[0.5,6.62],"6-6-4":[-2.95,6.62],"6-6-5":[-3.68,0.42],"6-6-6":[-2.02,37.03],"6-6-7":[-1.02,1376.89],"6-6-8":[3.71,982.62],"6-6-9":[7.43,985.82],"6-6-10":[11.94,1234.98],"6-6-11":[13.11,705.14],"6-6-12":[-89.41,2536.32],"6-6-13":[3.4,22.83],"6-6-14":[2.65,19.52],"6-6-15":[-7.99,5.64],"6-6-16":[-18.67,-3.61],"6-6-17":[-26.52,-9.15],"6-6-18":[-29.62,-12.33],"6-6-19":[-29.54,-12.54],"6-6-20":[-27.32,-8.27],"6-6-21":[-18.45,-1.95],"6-6-22":[-6.48,7.14],"6-6-23":[3.01,190.01],"6-6-24":[6.51,138.47],"6-6-25":[5.69,15.96],"6-6-26":[5.4,16.51],"6-6-27":[6.05,22.74],"6-6-28":[9.02,28.21],"6-6-29":[-17.46,51.55],"6-6-30":[13.15,50.16],"6-6-31":[15.34,33.27],"6-6-32":[14.32,31.91],"6-6-33":[13.67,32.66],"6-6-34":[12.2,30.79],"6-6-35":[8.78,41.94],"6-6-36":[9.46,29.88],"6-6-37":[9.15,25.29],"6-6-38":[9.38,32.55],"6-6-39":[9.54,25.04],"6-6-40":[7.99,24.13],"6-6-41":[6.63,21.25],"6-6-42":[6.03,21.21],"6-6-43":[5.82,20.07],"6-6-44":[4.24,16.55],"6-6-45":[2.14,12.64],"6-6-46":[-4.05,7.66],"6-6-47":[-16.62,-0.23],"6-6-48":[-26.47,-8.01],"6-6-49":[-39.59,-13.39],"6-6-50":[-50.27,-19.08],"6-6-51":[-63.69,-24.71],"6-6-52":[-73.99,-30.15],"6-6-53":[-84.19,-35.56],"6-6-54":[-95.47,-40.93],"6-6-55":[-110.06,-48.04],"6-6-56":[-123.5,-54.77],"6-6-57":[-129.75,-61.69],"6-6-58":[-129.75,-62.06],"6-6-59":[-121.74,-53.84],"6-6-60":[-109.45,382.35],"6-6-61":[-98.13,-36.44],"6-6-62":[-87.49,3110.85],"6-6-63":[-29.55,3090.17],"6-7-0":[11.05,27.23],"6-7-1":[8.99,21.62],"5-3-0":[8.99,27.23],"6-7-2":[3.11,18.02],"6-7-3":[-1.88,4.75],"5-3-1":[-1.88,18.02],"4-1-0":[-1.88,27.23],"6-7-4":[-2.23,3.16],"6-7-5":[-10.48,-0.69],"5-3-2":[-10.48,6.62],"6-7-6":[-6.6,40.51],"6-7-7":[4.26,1489.28],"5-3-3":[-6.6,1489.28],"4-1-1":[-10.48,1489.28],"3-0-0":[-10.48,1489.28],"6-7-8":[5.88,1063.92],"6-7-9":[20.7,1104.57],"5-3-4":[3.71,1104.57],"6-7-10":[14.91,1599.96],"6-7-11":[-8.97,1740.57],"5-3-5":[-8.97,1740.57],"4-1-2":[-8.97,1740.57],"6-7-12":[-61.85,2512.65],"6-7-13":[5.57,22.76],"5-3-6":[-89.41,2536.32],"6-7-14":[0.64,18.21],"6-7-15":[-12.27,3.05],"5-3-7":[-12.27,19.52],"4-1-3":[-89.41,2863.96],"3-0-1":[-89.41,2863.96],"6-7-16":[-22.25,-4.09],"6-7-17":[-29.14,-10.07],"5-3-8":[-29.14,-3.61],"6-7-18":[-31.98,-13.47],"6-7-19":[-31.86,-13.83],"5-3-9":[-31.98,-12.33],"4-1-4":[-31.98,-2.51],"6-7-20":[-30.11,-10],"6-7-21":[-23.56,-3.54],"5-3-10":[-30.11,-1.95],"6-7-22":[-13.91,4.69],"6-7-23":[0.99,14.6],"5-3-11":[-13.91,190.01],"4-1-5":[-30.11,190.01],"3-0-2":[-31.98,190.01],"6-7-24":[3.42,1613.09],"6-7-25":[5.02,15.52],"5-3-12":[3.42,1613.09],"6-7-26":[3.25,11],"6-7-27":[3.44,17.46],"5-3-13":[3.25,22.74],"4-1-6":[3.25,1613.09],"6-7-28":[7.09,27.01],"6-7-29":[10.93,32.99],"5-3-14":[-17.46,51.55],"6-7-30":[11.96,44.95],"6-7-31":[15.14,36.64],"5-3-15":[11.96,50.16],"4-1-7":[-17.46,51.55],"3-0-3":[-17.46,1613.09],"6-7-32":[14.44,33.46],"6-7-33":[12.08,29.13],"5-3-16":[12.08,33.46],"6-7-34":[9.43,27.02],"6-7-35":[7.86,36.94],"5-3-17":[7.86,41.94],"4-1-8":[7.86,41.94],"6-7-36":[7.22,22.36],"6-7-37":[6.79,18.93],"5-3-18":[6.79,29.88],"6-7-38":[1.56,124.3],"6-7-39":[2.32,568.37],"5-3-19":[1.56,568.37],"4-1-9":[1.56,568.37],"3-0-4":[1.56,1897.33],"6-7-40":[4.25,19.09],"6-7-41":[3.01,14.77],"5-3-20":[3.01,24.13],"6-7-42":[2.34,12.33],"6-7-43":[2.29,11.63],"5-3-21":[2.29,21.21],"4-1-10":[2.29,44.41],"6-7-44":[1.26,10.73],"6-7-45":[0.76,8.15],"5-3-22":[0.76,16.55],"6-7-46":[-6.78,4.11],"6-7-47":[-16.16,-2.7],"5-3-23":[-16.62,7.66],"4-1-11":[-17.27,32.28],"3-0-5":[-36.78,550.11],"6-7-48":[-26.58,-6.48],"6-7-49":[-40.15,-13.72],"5-3-24":[-40.15,-6.48],"6-7-50":[-47.56,-19.18],"6-7-51":[-60.03,-23.45],"5-3-25":[-63.69,-19.08],"4-1-12":[-70.17,-6.48],"6-7-52":[-69.12,-28.3],"6-7-53":[-81.45,-33.85],"5-3-26":[-84.19,-28.3],"6-7-54":[-93.97,-39.48],"6-7-55":[-109.85,-47.07],"5-3-27":[-110.06,-39.48],"4-1-13":[-113.49,-28.3],"3-0-6":[-120.92,6.49],"6-7-56":[-122.72,-54.61],"6-7-57":[-128.44,-60.84],"5-3-28":[-129.75,-54.61],"6-7-58":[-128.99,-62.74],"6-7-59":[-122.71,340.29],"5-3-29":[-129.75,340.29],"4-1-14":[-131.91,340.29],"6-7-60":[-107.62,329.56],"6-7-61":[-97.3,5.39],"5-3-30":[-109.45,382.35],"6-7-62":[-86.37,3872.33],"6-7-63":[-29.55,3078.77],"5-3-31":[-87.49,3872.33],"4-1-15":[-111.23,3872.33],"3-0-7":[-132.79,3970.41],"6-8-0":[11.25,27.28],"6-8-1":[8.74,21.81],"6-8-2":[2.69,17.9],"6-8-3":[-2.96,4.36],"6-8-4":[-4.02,0.26],"6-8-5":[-11.5,-1.15],"6-8-6":[-10.53,46.22],"6-8-7":[12.55,2230.09],"6-8-8":[36.02,2322.75],"6-8-9":[40.43,1231.31],"6-8-10":[15.75,1286.11],"6-8-11":[-30.38,2365.52],"6-8-12":[7.93,340.69],"6-8-13":[5.51,23.37],"6-8-14":[-1.67,15.39],"6-8-15":[-16.52,0.65],"6-8-16":[-24.69,-6.49],"6-8-17":[-32.29,-11.47],"6-8-18":[-35.39,-14.68],"6-8-19":[-34.56,-15.15],"6-8-20":[-31.71,-12.28],"6-8-21":[-26.05,-7.16],"6-8-22":[-18.78,1],"6-8-23":[-3.52,7.31],"6-8-24":[-3.45,4224.76],"6-8-25":[1,4199.19],"6-8-26":[0.32,10.2],"6-8-27":[0.52,13.28],"6-8-28":[4.26,20.81],"6-8-29":[8.36,29.82],"6-8-30":[12.88,34],"6-8-31":[-1.72,39.3],"6-8-32":[14.17,33.54],"6-8-33":[6.64,33.65],"6-8-34":[6.42,29.43],"6-8-35":[5.61,18.21],"6-8-36":[5.17,15.57],"6-8-37":[5.39,18.43],"6-8-38":[3.83,14.4],"6-8-39":[3.25,45.92],"6-8-40":[1.53,11.5],"6-8-41":[0.06,8],"6-8-42":[-0.02,5.43],"6-8-43":[0.21,5.22],"6-8-44":[-2.28,4.54],"6-8-45":[-2.62,2.59],"6-8-46":[-8.98,1.16],"6-8-47":[-17.03,-3.98],"6-8-48":[-25.84,-6.48],"6-8-49":[-38.78,-13.07],"6-8-50":[-45.69,-18.94],"6-8-51":[-56.6,-22.56],"6-8-52":[-66.31,-26.79],"6-8-53":[-78.98,-32.27],"6-8-54":[-91.83,-38.18],"6-8-55":[-109.23,-46.25],"6-8-56":[-120.92,-53.72],"6-8-57":[-127.6,-60.42],"6-8-58":[-128.14,-62.51],"6-8-59":[-122.71,772.25],"6-8-60":[-106.38,254.93],"6-8-61":[-97.02,77.33],"6-8-62":[-84.41,3797.09],"6-8-63":[-29.55,3066.33],"6-9-0":[11.45,27.35],"6-9-1":[8.74,22.1],"5-4-0":[8.74,27.35],"6-9-2":[2.31,17.45],"6-9-3":[-4.87,3.84],"5-4-1":[-4.87,17.9],"6-9-4":[-6.12,-0.5],"6-9-5":[-15.2,-2.83],"5-4-2":[-15.2,0.26],"6-9-6":[-15.2,52.5],"6-9-7":[4.19,2249.45],"5-4-3":[-15.2,2249.45],"6-9-8":[56.64,1957.92],"6-9-9":[69.73,3549.52],"5-4-4":[36.02,3549.52],"6-9-10":[-8.73,3498.22],"6-9-11":[-44.9,2301.61],"5-4-5":[-44.9,3498.22],"6-9-12":[6.61,28.12],"6-9-13":[5.07,22.28],"5-4-6":[5.07,340.69],"6-9-14":[-6.22,10.49],"6-9-15":[-22.36,-1.66],"5-4-7":[-22.36,15.39],"6-9-16":[-30.48,-8.53],"6-9-17":[-38.55,-13.07],"5-4-8":[-38.55,-6.49],"6-9-18":[-40.53,-16.27],"6-9-19":[-40.96,-16.03],"5-4-9":[-40.96,-14.68],"6-9-20":[-37.32,-13.34],"6-9-21":[-28.36,-9.72],"5-4-10":[-37.32,-7.16],"6-9-22":[-23.57,-3.51],"6-9-23":[-16.83,1.38],"5-4-11":[-23.57,7.31],"6-9-24":[-11.52,8.24],"6-9-25":[-7.91,8.27],"5-4-12":[-11.52,4224.76],"6-9-26":[-7.04,2.76],"6-9-27":[-5.19,7.73],"5-4-13":[-7.04,13.28],"6-9-28":[1.39,14.78],"6-9-29":[5.73,25.09],"5-4-14":[1.39,29.82],"6-9-30":[10.36,28.45],"6-9-31":[12.39,30.86],"5-4-15":[-1.72,39.3],"6-9-32":[13.54,31.34],"6-9-33":[10.49,28.46],"5-4-16":[6.64,33.65],"6-9-34":[7.62,22.63],"6-9-35":[4.58,15.89],"5-4-17":[4.58,29.43],"6-9-36":[2.95,11.11],"6-9-37":[-14.06,364.92],"5-4-18":[-14.06,364.92],"6-9-38":[1.83,11.45],"6-9-39":[-0.79,7.86],"5-4-19":[-0.79,45.92],"6-9-40":[-2.81,87.14],"6-9-41":[-2.9,2.06],"5-4-20":[-2.9,87.14],"6-9-42":[-3.32,0.4],"6-9-43":[-4.29,0.66],"5-4-21":[-4.29,5.43],"6-9-44":[-7.14,0.22],"6-9-45":[-8.9,-1.28],"5-4-22":[-8.9,4.54],"6-9-46":[-12.57,-1.34],"6-9-47":[-20.7,-5.15],"5-4-23":[-20.7,1.16],"6-9-48":[-26.09,-8.73],"6-9-49":[-37.6,-13.13],"5-4-24":[-38.78,-6.48],"6-9-50":[-45.9,-17.8],"6-9-51":[-53.38,-22.53],"5-4-25":[-56.6,-17.8],"6-9-52":[-62.81,-25.9],"6-9-53":[-76.09,-30.77],"5-4-26":[-78.98,-25.9],"6-9-54":[-90.63,-37.36],"6-9-55":[-107.41,-45.63],"5-4-27":[-109.23,-37.36],"6-9-56":[-119.96,-53.04],"6-9-57":[-125.63,-58.67],"5-4-28":[-127.6,-53.04],"6-9-58":[-126.31,-58.13],"6-9-59":[-119.94,1007.23],"5-4-29":[-128.14,1007.23],"6-9-60":[-106.59,462.57],"6-9-61":[-96,462.57],"5-4-30":[-106.59,462.57],"6-9-62":[-84.94,2783.57],"6-9-63":[-29.55,3039.73],"5-4-31":[-84.94,3797.09],"6-10-0":[11.66,27.39],"6-10-1":[8.8,22.47],"6-10-2":[2.11,17.55],"6-10-3":[-5.07,2.92],"6-10-4":[-6.14,-2.32],"6-10-5":[-16.63,-2.83],"6-10-6":[-16.98,31.96],"6-10-7":[-2.48,2250.87],"6-10-8":[75.19,1714.22],"6-10-9":[30.42,6207.28],"6-10-10":[-317.19,2318.12],"6-10-11":[5.09,380.19],"6-10-12":[6.09,24.81],"6-10-13":[0.81,18.21],"6-10-14":[-11.19,6.41],"6-10-15":[-27.78,-4.11],"6-10-16":[-35.96,-11.54],"6-10-17":[-43.9,-15.64],"6-10-18":[-45.01,-19.38],"6-10-19":[-44.42,-18.81],"6-10-20":[-43.08,-14.67],"6-10-21":[-34.29,-11.93],"6-10-22":[-28.41,-8.91],"6-10-23":[-23.59,-5.93],"6-10-24":[-20.03,-3.95],"6-10-25":[-15.21,-3.18],"6-10-26":[-11.97,-2.83],"6-10-27":[-7.59,2.35],"6-10-28":[-2.35,10.55],"6-10-29":[2.75,19.96],"6-10-30":[6.93,24.2],"6-10-31":[9.9,28.1],"6-10-32":[11.26,27.88],"6-10-33":[8.09,27.31],"6-10-34":[4.97,20.7],"6-10-35":[0.28,29.22],"6-10-36":[0.02,34.33],"6-10-37":[-7.05,982.44],"6-10-38":[-47,1738.21],"6-10-39":[-8.61,368.88],"6-10-40":[-9.1,399.3],"6-10-41":[-6.13,-0.9],"6-10-42":[-5.03,-1.07],"6-10-43":[-7.02,-1.37],"6-10-44":[-10.1,-2.29],"6-10-45":[-14.95,-3.92],"6-10-46":[-16.66,-4.4],"6-10-47":[-23.64,-6.94],"6-10-48":[-27.68,-10.44],"6-10-49":[-35.5,-13.58],"6-10-50":[-42.84,-16.97],"6-10-51":[-51.64,-20.99],"6-10-52":[-60.08,-24.38],"6-10-53":[-74.73,-29.94],"6-10-54":[-88.65,-36.56],"6-10-55":[-106.09,-44.4],"6-10-56":[-116.67,-51.74],"6-10-57":[-123.8,-57.34],"6-10-58":[-124.5,-55.65],"6-10-59":[-112.82,883.88],"6-10-60":[-105.11,570.37],"6-10-61":[-5.84,549.47],"6-10-62":[-84.94,2425.34],"6-10-63":[-29.55,3008.67],"6-11-0":[11.74,27.45],"6-11-1":[8.8,23.16],"5-5-0":[8.8,27.45],"6-11-2":[1.89,18.15],"6-11-3":[-6.35,2.66],"5-5-1":[-6.35,18.15],"4-2-0":[-6.35,27.45],"6-11-4":[-8.07,-2.32],"6-11-5":[-16.52,-3.47],"5-5-2":[-16.63,-2.32],"6-11-6":[-17.37,5.59],"6-11-7":[-2.46,2337.17],"5-5-3":[-17.37,2337.17],"4-2-1":[-17.37,2337.17],"6-11-8":[96.66,1624.53],"6-11-9":[111.02,4180.16],"5-5-4":[30.42,6207.28],"6-11-10":[-100.65,4014.2],"6-11-11":[5.56,27.09],"5-5-5":[-317.19,4014.2],"4-2-2":[-317.19,6207.28],"6-11-12":[4.91,20.02],"6-11-13":[-4.06,12.89],"5-5-6":[-4.06,24.81],"6-11-14":[-18.2,1.04],"6-11-15":[-33.3,-7.02],"5-5-7":[-33.3,6.41],"4-2-3":[-33.3,340.69],"6-11-16":[-42.2,-14.25],"6-11-17":[-50.16,-18.62],"5-5-8":[-50.16,-11.54],"6-11-18":[-52.64,-21.88],"6-11-19":[-51.01,-21.95],"5-5-9":[-52.64,-18.81],"4-2-4":[-52.64,-6.49],"6-11-20":[-49.53,-17.94],"6-11-21":[-42.64,-14.48],"5-5-10":[-49.53,-11.93],"6-11-22":[-34.91,-12.52],"6-11-23":[-31.5,-10.6],"5-5-11":[-34.91,-5.93],"4-2-5":[-49.53,7.31],"6-11-24":[-29.55,-8.2],"6-11-25":[-23.86,-6.38],"5-5-12":[-29.55,-3.18],"6-11-26":[-19.87,-4.46],"6-11-27":[-13.37,-1.47],"5-5-13":[-19.87,2.35],"4-2-6":[-29.55,4224.76],"6-11-28":[-8.39,3.39],"6-11-29":[-0.38,13.1],"5-5-14":[-8.39,19.96],"6-11-30":[3.79,18.24],"6-11-31":[7.04,23.18],"5-5-15":[3.79,28.1],"4-2-7":[-8.39,39.3],"6-11-32":[8.41,23.23],"6-11-33":[6.61,21.8],"5-5-16":[6.61,27.88],"6-11-34":[1.94,15.53],"6-11-35":[-0.83,8.74],"5-5-17":[-0.83,29.22],"4-2-8":[-0.83,33.65],"6-11-36":[-5.27,4.25],"6-11-37":[-19.17,108.86],"5-5-18":[-19.17,982.44],"6-11-38":[-10.07,418.12],"6-11-39":[-13.37,-1.41],"5-5-19":[-47,1738.21],"4-2-9":[-47,1738.21],"6-11-40":[-14.02,394.12],"6-11-41":[-9.37,-2.74],"5-5-20":[-14.02,399.3],"6-11-42":[-11.22,-2.09],"6-11-43":[-11.68,-2.6],"5-5-21":[-11.68,-1.07],"4-2-10":[-14.02,399.3],"6-11-44":[-14.51,-3.6],"6-11-45":[-18.66,-5.6],"5-5-22":[-18.66,-2.29],"6-11-46":[-22.45,-7.76],"6-11-47":[-26.05,-8.93],"5-5-23":[-26.05,-4.4],"4-2-11":[-26.05,4.54],"6-11-48":[-29.53,-11.9],"6-11-49":[-34.85,-13.59],"5-5-24":[-35.5,-10.44],"6-11-50":[-40.97,-16.5],"6-11-51":[-48.53,-20.15],"5-5-25":[-51.64,-16.5],"4-2-12":[-56.6,-6.48],"6-11-52":[-58.21,-23.76],"6-11-53":[-72.99,-29.48],"5-5-26":[-74.73,-23.76],"6-11-54":[-86.21,-36.12],"6-11-55":[-103.18,-43.08],"5-5-27":[-106.09,-36.12],"4-2-13":[-109.23,-23.76],"6-11-56":[-113.79,-50.3],"6-11-57":[-120.63,-55.96],"5-5-28":[-123.8,-50.3],"6-11-58":[-122.11,-30.17],"6-11-59":[-109.73,896.34],"5-5-29":[-124.5,896.34],"4-2-14":[-128.14,1007.23],"6-11-60":[-50.89,667.99],"6-11-61":[119.31,564.8],"5-5-30":[-105.11,667.99],"6-11-62":[-24.93,3379.23],"6-11-63":[-29.55,2977.45],"5-5-31":[-84.94,3379.23],"4-2-15":[-106.59,3797.09],"6-12-0":[11.81,27.54],"6-12-1":[9.27,23.85],"6-12-2":[1.81,18.51],"6-12-3":[-7.36,2.56],"6-12-4":[-10.2,-3.36],"6-12-5":[-14.2,-3.64],"6-12-6":[-17.25,-1.46],"6-12-7":[-2.4,2626.58],"6-12-8":[127.44,1971.14],"6-12-9":[267.44,4964.36],"6-12-10":[-3.84,5003.13],"6-12-11":[5.53,17.77],"6-12-12":[1.22,17.44],"6-12-13":[-9.28,8.08],"6-12-14":[-24.33,-2.54],"6-12-15":[-38.37,-10.05],"6-12-16":[-46.59,-16.83],"6-12-17":[-57.08,-21.69],"6-12-18":[-58.76,-25],"6-12-19":[-58.51,-24.8],"6-12-20":[-55.3,-22.36],"6-12-21":[-47.72,-17.53],"6-12-22":[-42.01,-15.94],"6-12-23":[-37.95,-14.94],"6-12-24":[-36.96,-12.18],"6-12-25":[-32.38,-10.05],"6-12-26":[-27.79,-7.26],"6-12-27":[-19.35,-4.41],"6-12-28":[-13.92,-0.37],"6-12-29":[-6.27,6.6],"6-12-30":[-0.21,13.43],"6-12-31":[3.37,18.86],"6-12-32":[5.2,19.08],"6-12-33":[3.85,16.44],"6-12-34":[1,12.4],"6-12-35":[-5.91,3.06],"6-12-36":[-9.39,-0.47],"6-12-37":[-17.5,26.39],"6-12-38":[-14.85,15.85],"6-12-39":[-17.05,13.14],"6-12-40":[-17.31,-5.04],"6-12-41":[-154.99,367.1],"6-12-42":[-15.2,-4.66],"6-12-43":[-16.85,-5.49],"6-12-44":[-17.72,-5.68],"6-12-45":[-20.88,-7.48],"6-12-46":[-23.23,-9.37],"6-12-47":[-28.2,-11.32],"6-12-48":[-31.15,-13.01],"6-12-49":[-35.22,-15.16],"6-12-50":[-39.72,-16.79],"6-12-51":[-47.41,-19.15],"6-12-52":[-57.34,-23.29],"6-12-53":[-72.24,-28.77],"6-12-54":[-84.64,-35.59],"6-12-55":[-100.6,-41.81],"6-12-56":[-110.81,-48.6],"6-12-57":[-116.73,-54.27],"6-12-58":[-118.77,732.21],"6-12-59":[-106.63,1118.71],"6-12-60":[70.79,697.82],"6-12-61":[154.07,547.44],"6-12-62":[132.66,3177.52],"6-12-63":[-29.55,2958.4],"6-13-0":[11.89,27.69],"6-13-1":[9.27,24.72],"5-6-0":[9.27,27.69],"6-13-2":[1.77,18.69],"6-13-3":[-8.12,2.29],"5-6-1":[-8.12,18.69],"6-13-4":[-12.79,-3.7],"6-13-5":[-16.12,-5.11],"5-6-2":[-16.12,-3.36],"6-13-6":[-16.46,-1.51],"6-13-7":[-4.5,2443.65],"5-6-3":[-17.25,2626.58],"6-13-8":[159.96,1955.52],"6-13-9":[264.67,3305.19],"5-6-4":[127.44,4964.36],"6-13-10":[-0.63,5501.18],"6-13-11":[3.4,16.19],"5-6-5":[-3.84,5501.18],"6-13-12":[-4.33,12.53],"6-13-13":[-18.11,1.23],"5-6-6":[-18.11,17.44],"6-13-14":[-32.01,-5.03],"6-13-15":[-45.8,-13.68],"5-6-7":[-45.8,-2.54],"6-13-16":[-52.61,-19.6],"6-13-17":[-65.07,-24.29],"5-6-8":[-65.07,-16.83],"6-13-18":[-66.2,-29.09],"6-13-19":[-65.62,-28.05],"5-6-9":[-66.2,-24.8],"6-13-20":[-61.26,-25.11],"6-13-21":[-55.52,-21.57],"5-6-10":[-61.26,-17.53],"6-13-22":[-51.8,-19.25],"6-13-23":[-47.07,-19.08],"5-6-11":[-51.8,-14.94],"6-13-24":[-46.24,-17.09],"6-13-25":[-43.41,-14.52],"5-6-12":[-46.24,-10.05],"6-13-26":[-38.71,-10.51],"6-13-27":[-27.96,-7.34],"5-6-13":[-38.71,-4.41],"6-13-28":[-23.22,-4.17],"6-13-29":[-16.97,-0.2],"5-6-14":[-23.22,6.6],"6-13-30":[-9.11,5.15],"6-13-31":[-0.62,10.05],"5-6-15":[-9.11,18.86],"6-13-32":[1.62,10.97],"6-13-33":[1.64,9.15],"5-6-16":[1.62,19.08],"6-13-34":[-12.01,574],"6-13-35":[-8.4,3.2],"5-6-17":[-12.01,574],"6-13-36":[-12.41,-2.96],"6-13-37":[-12.61,18.94],"5-6-18":[-17.5,26.39],"6-13-38":[-17.05,15.14],"6-13-39":[-23.08,21.33],"5-6-19":[-23.08,21.33],"6-13-40":[-20.89,-7.97],"6-13-41":[-20.89,-4.36],"5-6-20":[-154.99,367.1],"6-13-42":[-17.41,-4.92],"6-13-43":[-19.71,-8.03],"5-6-21":[-19.71,-4.66],"6-13-44":[-19.71,-8.36],"6-13-45":[-23.09,-9.22],"5-6-22":[-23.09,-5.68],"6-13-46":[-26.22,-10.62],"6-13-47":[-29.93,-11.92],"5-6-23":[-29.93,-9.37],"6-13-48":[-33.2,-14.27],"6-13-49":[-36.69,-15.88],"5-6-24":[-36.69,-13.01],"6-13-50":[-37.72,-16.79],"6-13-51":[-46.58,-18.04],"5-6-25":[-47.41,-16.79],"6-13-52":[-56.13,-21.69],"6-13-53":[-71.1,-28.36],"5-6-26":[-72.24,-21.69],"6-13-54":[-82.17,-35.16],"6-13-55":[-96.84,-41.49],"5-6-27":[-100.6,-35.16],"6-13-56":[-107.17,-47.12],"6-13-57":[-113.4,-52.39],"5-6-28":[-116.73,-47.12],"6-13-58":[-113.8,799.79],"6-13-59":[542.77,1415.24],"5-6-29":[-118.77,1415.24],"6-13-60":[220.94,696.8],"6-13-61":[196.25,578.81],"5-6-30":[70.79,697.82],"6-13-62":[157.82,2807.42],"6-13-63":[-29.55,2933.27],"5-6-31":[-29.55,3177.52],"6-14-0":[11.98,27.81],"6-14-1":[9.31,25.28],"6-14-2":[1.78,18.69],"6-14-3":[-8.42,2.84],"6-14-4":[-14.71,-4.24],"6-14-5":[-17.71,-6.65],"6-14-6":[-16.95,-3.21],"6-14-7":[-6.95,1629.08],"6-14-8":[241.64,2195.84],"6-14-9":[291.07,2352.25],"6-14-10":[-17.81,5990.12],"6-14-11":[-1.23,1250.79],"6-14-12":[-8.91,5.47],"6-14-13":[-24.35,-2.9],"6-14-14":[-37.36,-9.51],"6-14-15":[-50.8,-17],"6-14-16":[-57.16,-23.13],"6-14-17":[-69.06,-26.79],"6-14-18":[-71.13,-32.26],"6-14-19":[-70.57,-30.63],"6-14-20":[-66.49,-28.02],"6-14-21":[-61.06,-25.99],"6-14-22":[-58.98,-23.49],"6-14-23":[-55.47,-22.95],"6-14-24":[-54.23,-21.9],"6-14-25":[-50.55,-19.65],"6-14-26":[-46.21,-14.46],"6-14-27":[-36.47,-11.82],"6-14-28":[-32.84,-8.88],"6-14-29":[-24.98,-4.86],"6-14-30":[-17.66,-0.54],"6-14-31":[-8.29,3.14],"6-14-32":[-4.33,4.38],"6-14-33":[-3.04,4.04],"6-14-34":[-30.12,444.87],"6-14-35":[-45.64,1253.85],"6-14-36":[-15.82,-4.2],"6-14-37":[-18.57,11.81],"6-14-38":[-20.38,12.56],"6-14-39":[-34.53,29.28],"6-14-40":[-23.61,-9.96],"6-14-41":[-23.65,-8.25],"6-14-42":[-22.26,-7.63],"6-14-43":[-21.36,-8.79],"6-14-44":[-21.36,-9.44],"6-14-45":[-23.95,-9.8],"6-14-46":[-26.93,-11.59],"6-14-47":[-30.83,-13.34],"6-14-48":[-34.25,-14.96],"6-14-49":[-36.46,-16.64],"6-14-50":[-38.97,-17.15],"6-14-51":[-43.17,-17.84],"6-14-52":[-55.2,-20.47],"6-14-53":[-70.32,-27.45],"6-14-54":[-81.47,-34.2],"6-14-55":[-94.24,-40.37],"6-14-56":[-103.99,-46.19],"6-14-57":[-110.48,-50.32],"6-14-58":[-111.11,1501.65],"6-14-59":[649.8,1730.64],"6-14-60":[290.61,752.21],"6-14-61":[298.29,587.99],"6-14-62":[230.04,3232.04],"6-14-63":[-29.54,2914.46],"6-15-0":[12.07,27.95],"6-15-1":[9.31,25.8],"5-7-0":[9.31,27.95],"6-15-2":[2,18.62],"6-15-3":[-9.36,3.57],"5-7-1":[-9.36,18.69],"4-3-0":[-9.36,27.95],"6-15-4":[-15.66,-4.24],"6-15-5":[-19.9,-7.76],"5-7-2":[-19.9,-4.24],"6-15-6":[-18.71,-3.02],"6-15-7":[-10.73,1677.33],"5-7-3":[-18.71,1677.33],"4-3-1":[-19.9,2626.58],"3-1-0":[-19.9,2626.58],"6-15-8":[6.28,2201.64],"6-15-9":[372.06,2244.89],"5-7-4":[6.28,2352.25],"6-15-10":[-3.5,3286.53],"6-15-11":[-24.01,4338.49],"5-7-5":[-24.01,5990.12],"4-3-2":[-24.01,5990.12],"6-15-12":[-16,0.26],"6-15-13":[-30.5,-5.77],"5-7-6":[-30.5,5.47],"6-15-14":[-41.91,-12.56],"6-15-15":[-54.89,-19.83],"5-7-7":[-54.89,-9.51],"4-3-3":[-54.89,17.44],"3-1-1":[-317.19,6207.28],"2-0-0":[-317.19,6207.28],"6-15-16":[-61.53,-25.72],"6-15-17":[-71.96,-29.35],"5-7-8":[-71.96,-23.13],"6-15-18":[-74.97,-34.5],"6-15-19":[-75.35,-33.7],"5-7-9":[-75.35,-30.63],"4-3-4":[-75.35,-16.83],"6-15-20":[-73.32,-31.19],"6-15-21":[-69.11,-29.89],"5-7-10":[-73.32,-25.99],"6-15-22":[-67.31,-28.48],"6-15-23":[-66.05,-27.68],"5-7-11":[-67.31,-22.95],"4-3-5":[-73.32,-14.94],"3-1-2":[-75.35,7.31],"6-15-24":[-64.91,-26.11],"6-15-25":[-62.05,-23.7],"5-7-12":[-64.91,-19.65],"6-15-26":[-58.25,-19.12],"6-15-27":[-49.51,-17.07],"5-7-13":[-58.25,-11.82],"4-3-6":[-64.91,-4.41],"6-15-28":[-44.78,-13.51],"6-15-29":[-35.93,-9.36],"5-7-14":[-44.78,-4.86],"6-15-30":[-28.32,-5.14],"6-15-31":[-19.14,-2.71],"5-7-15":[-28.32,3.14],"4-3-7":[-44.78,18.86],"3-1-3":[-64.91,4224.76],"2-0-1":[-75.35,4224.76],"6-15-32":[-13.73,-1.71],"6-15-33":[-10.63,-1.49],"5-7-16":[-13.73,4.38],"6-15-34":[-10.78,-2.12],"6-15-35":[-13.93,-2.93],"5-7-17":[-45.64,1253.85],"4-3-8":[-45.64,1253.85],"6-15-36":[-18.78,-4.46],"6-15-37":[-22.12,-7.9],"5-7-18":[-22.12,11.81],"6-15-38":[-22.48,7.98],"6-15-39":[-23.83,16.82],"5-7-19":[-34.53,29.28],"4-3-9":[-34.53,29.28],"3-1-4":[-47,1738.21],"6-15-40":[-25.6,210.54],"6-15-41":[-26.63,-11.38],"5-7-20":[-26.63,210.54],"6-15-42":[-26.15,-10.1],"6-15-43":[-23.47,-10.22],"5-7-21":[-26.15,-7.63],"4-3-10":[-154.99,367.1],"6-15-44":[-23.37,-10.28],"6-15-45":[-24.8,-10.38],"5-7-22":[-24.8,-9.44],"6-15-46":[-27.57,-12.05],"6-15-47":[-31.68,-13.68],"5-7-23":[-31.68,-11.59],"4-3-11":[-31.68,-5.68],"3-1-5":[-154.99,399.3],"2-0-2":[-154.99,1897.33],"6-15-48":[-33.83,-15.28],"6-15-49":[-36.24,-16.57],"5-7-24":[-36.46,-14.96],"6-15-50":[-40.85,-17.93],"6-15-51":[-40.81,-17.17],"5-7-25":[-43.17,-17.15],"4-3-12":[-47.41,-13.01],"6-15-52":[-53.46,-20.29],"6-15-53":[-68.22,-26.61],"5-7-26":[-70.32,-20.29],"6-15-54":[-79.48,-33.55],"6-15-55":[-91.99,-40.09],"5-7-27":[-94.24,-33.55],"4-3-13":[-100.6,-20.29],"3-1-6":[-109.23,-6.48],"6-15-56":[-99.15,-44.2],"6-15-57":[-105.53,-47.94],"5-7-28":[-110.48,-44.2],"6-15-58":[-105.53,1582.81],"6-15-59":[752.2,3280.76],"5-7-29":[-111.11,3280.76],"4-3-14":[-118.77,3280.76],"6-15-60":[370.12,1055.95],"6-15-61":[342.75,583.66],"5-7-30":[290.61,1055.95],"6-15-62":[359.13,3299.77],"6-15-63":[-29.54,2899.4],"5-7-31":[-29.54,3299.77],"4-3-15":[-29.55,3299.77],"3-1-7":[-128.14,3797.09],"2-0-3":[-132.79,3970.41],"6-16-0":[12.18,28.06],"6-16-1":[9.42,26.44],"6-16-2":[2.35,18.81],"6-16-3":[-9.47,3.62],"6-16-4":[-15.5,-4.65],"6-16-5":[-19.9,-6.14],"6-16-6":[-18.71,-2.92],"6-16-7":[-13.51,358.63],"6-16-8":[4.93,2700.74],"6-16-9":[524.03,2379.96],"6-16-10":[138.16,2349.52],"6-16-11":[-19.04,3089.83],"6-16-12":[-32.37,1191.79],"6-16-13":[-32.78,1099.24],"6-16-14":[-42.73,-15.25],"6-16-15":[-55.78,-21.82],"6-16-16":[-62.13,-27.45],"6-16-17":[-73.82,-31.05],"6-16-18":[-77.86,-35.86],"6-16-19":[-79.19,-36.66],"6-16-20":[-78.8,-34.53],"6-16-21":[-75.08,-33.65],"6-16-22":[-74.19,-33.08],"6-16-23":[-73.6,-32.44],"6-16-24":[-71.56,-31.17],"6-16-25":[-70.97,-29.12],"6-16-26":[-66.99,-25.12],"6-16-27":[-59.8,-22.61],"6-16-28":[-53.63,-18.47],"6-16-29":[-44.99,-14.42],"6-16-30":[-35.2,-9.88],"6-16-31":[-25.62,-7.01],"6-16-32":[-19.94,-5.38],"6-16-33":[-16.2,-5.07],"6-16-34":[-15.92,-4.9],"6-16-35":[-16.42,-5.38],"6-16-36":[-19.23,-6.96],"6-16-37":[-22.12,-9.38],"6-16-38":[-22.83,-10.64],"6-16-39":[-23.64,-10.88],"6-16-40":[-25.6,395.5],"6-16-41":[-27.18,-12.58],"6-16-42":[-27.19,-11.89],"6-16-43":[-25.25,-11.48],"6-16-44":[-23.89,-10.73],"6-16-45":[-25.51,-11.64],"6-16-46":[-27.55,-12.42],"6-16-47":[-30.38,-13.83],"6-16-48":[-32.72,-14.63],"6-16-49":[-36.23,-15.29],"6-16-50":[-40.57,-17.57],"6-16-51":[-40.62,-17.17],"6-16-52":[-52.6,-20.03],"6-16-53":[-67.1,-26.24],"6-16-54":[-78.95,-32.27],"6-16-55":[-88.41,-38.74],"6-16-56":[-94.87,-42.36],"6-16-57":[-102.31,-45.37],"6-16-58":[-102.31,2780.28],"6-16-59":[1055.94,3057.06],"6-16-60":[561.63,1251.61],"6-16-61":[360.22,729.54],"6-16-62":[569.39,3324.73],"6-16-63":[-29.54,2887.59],"6-17-0":[12.28,28.2],"6-17-1":[9.42,27.09],"5-8-0":[9.42,28.2],"6-17-2":[2.44,19.47],"6-17-3":[-9.26,3.4],"5-8-1":[-9.47,19.47],"6-17-4":[-12.46,-4.27],"6-17-5":[-17.6,-3.54],"5-8-2":[-19.9,-3.54],"6-17-6":[-16.97,-3.57],"6-17-7":[-17.03,450.81],"5-8-3":[-18.71,450.81],"6-17-8":[-1,2409.04],"6-17-9":[729.41,2941.77],"5-8-4":[-1,2941.77],"6-17-10":[639.5,2300.19],"6-17-11":[-7.73,3041.41],"5-8-5":[-19.04,3089.83],"6-17-12":[-40.41,2709.89],"6-17-13":[-36.12,1110.77],"5-8-6":[-40.41,2709.89],"6-17-14":[-44.38,-16.38],"6-17-15":[-55.37,-22.03],"5-8-7":[-55.78,-15.25],"6-17-16":[-62.03,-26.24],"6-17-17":[-74.43,-30.62],"5-8-8":[-74.43,-26.24],"6-17-18":[-79.53,-36.84],"6-17-19":[-81.78,-38.94],"5-8-9":[-81.78,-35.86],"6-17-20":[-81.39,-38.14],"6-17-21":[-82.89,-37.3],"5-8-10":[-82.89,-33.65],"6-17-22":[-83.1,-37.32],"6-17-23":[-82.35,-36.18],"5-8-11":[-83.1,-32.44],"6-17-24":[-81.19,-36.06],"6-17-25":[-80.32,-33.99],"5-8-12":[-81.19,-29.12],"6-17-26":[-77.62,-31.19],"6-17-27":[-70.94,-27.45],"5-8-13":[-77.62,-22.61],"6-17-28":[-64.31,-23.68],"6-17-29":[-54,-18.06],"5-8-14":[-64.31,-14.42],"6-17-30":[-43.73,-13.82],"6-17-31":[-34.31,-10.34],"5-8-15":[-43.73,-7.01],"6-17-32":[-28.04,-8.32],"6-17-33":[-22.53,-7.81],"5-8-16":[-28.04,-5.07],"6-17-34":[-20.71,-7.81],"6-17-35":[-20.22,-8],"5-8-17":[-20.71,-4.9],"6-17-36":[-18.91,-8.25],"6-17-37":[-21.69,-9.44],"5-8-18":[-22.12,-6.96],"6-17-38":[-22.79,-10.07],"6-17-39":[-23.64,-11.06],"5-8-19":[-23.64,-10.07],"6-17-40":[-25.6,315.4],"6-17-41":[-27.15,-11.32],"5-8-20":[-27.18,395.5],"6-17-42":[-27.2,-12.55],"6-17-43":[-25.3,-11.22],"5-8-21":[-27.2,-11.22],"6-17-44":[-23.39,-10.83],"6-17-45":[-25.69,-11.63],"5-8-22":[-25.69,-10.73],"6-17-46":[-27.32,-12.29],"6-17-47":[-29.02,-13.43],"5-8-23":[-30.38,-12.29],"6-17-48":[-30.31,-14],"6-17-49":[-34.83,-14.43],"5-8-24":[-36.23,-14],"6-17-50":[-36.28,-15.71],"6-17-51":[-39.91,-16.54],"5-8-25":[-40.62,-15.71],"6-17-52":[-49.95,-19.22],"6-17-53":[-64.39,-24.43],"5-8-26":[-67.1,-19.22],"6-17-54":[-75.83,-31.35],"6-17-55":[-84.15,-37.16],"5-8-27":[-88.41,-31.35],"6-17-56":[-89.73,-39.94],"6-17-57":[-97.13,-43.44],"5-8-28":[-102.31,-39.94],"6-17-58":[-96.35,2730.02],"6-17-59":[1251.6,2341.32],"5-8-29":[-102.31,3057.06],"6-17-60":[646.73,1350.33],"6-17-61":[434.89,803.49],"5-8-30":[360.22,1350.33],"6-17-62":[729.53,3573.17],"6-17-63":[-29.54,2879.05],"5-8-31":[-29.54,3573.17],"6-18-0":[12.4,28.31],"6-18-1":[10.07,27.6],"6-18-2":[2.4,20.08],"6-18-3":[-8.33,2.75],"6-18-4":[-10.4,-2.36],"6-18-5":[-18.83,-3.43],"6-18-6":[-22.53,142.08],"6-18-7":[-18.17,429.97],"6-18-8":[-0.16,2151.79],"6-18-9":[348.42,2614.23],"6-18-10":[9.51,2710.75],"6-18-11":[294.75,2698.9],"6-18-12":[-24.66,2746.59],"6-18-13":[-259.61,2747.57],"6-18-14":[-46.28,1843.49],"6-18-15":[-53.35,-22.18],"6-18-16":[-60.66,-26.44],"6-18-17":[-73.74,-29.66],"6-18-18":[-79.72,-35.92],"6-18-19":[-82.56,-39.87],"6-18-20":[-83.14,-40.29],"6-18-21":[-87.25,-40.68],"6-18-22":[-88.44,-41.38],"6-18-23":[-87.74,-40.45],"6-18-24":[-87.08,-40.24],"6-18-25":[-86.36,-38.8],"6-18-26":[-83.25,-35.89],"6-18-27":[-78.02,-32.16],"6-18-28":[-71.88,-27.65],"6-18-29":[-60.18,-22.1],"6-18-30":[-49.79,-17.75],"6-18-31":[-40.43,-14.23],"6-18-32":[-34.17,-11.43],"6-18-33":[-27.72,-10.12],"6-18-34":[-24.22,-9.98],"6-18-35":[-22.71,-9.16],"6-18-36":[-19.05,-9.09],"6-18-37":[-20.03,-8.96],"6-18-38":[-21.83,-9.07],"6-18-39":[-23.26,-10.05],"6-18-40":[-22.96,30.18],"6-18-41":[-25.64,-10.66],"6-18-42":[-26.07,-11.58],"6-18-43":[-24.63,-10.9],"6-18-44":[-23.29,-10.9],"6-18-45":[-24.95,-11.37],"6-18-46":[-26.58,-12.17],"6-18-47":[-27.96,-12.57],"6-18-48":[-28.66,-12.73],"6-18-49":[-31.29,-12.64],"6-18-50":[-33.1,-13.52],"6-18-51":[-38.3,-14.77],"6-18-52":[-46.75,-18.61],"6-18-53":[-62.71,-23.22],"6-18-54":[-73.11,-30.4],"6-18-55":[-79.89,-35.13],"6-18-56":[-85.72,-38.01],"6-18-57":[-91.81,-40.53],"6-18-58":[-89.38,2750.5],"6-18-59":[1350.32,2817.84],"6-18-60":[749.4,1490.05],"6-18-61":[552.13,901.46],"6-18-62":[803.48,3682.63],"6-18-63":[-29.54,2878.07],"6-19-0":[12.49,28.44],"6-19-1":[10.07,28.63],"5-9-0":[10.07,28.63],"6-19-2":[2.33,20.54],"6-19-3":[-8.14,2.42],"5-9-1":[-8.33,20.54],"4-4-0":[-9.47,28.63],"6-19-4":[-13.58,-2.05],"6-19-5":[-21.21,283.5],"5-9-2":[-21.21,283.5],"6-19-6":[-26.63,317.55],"6-19-7":[-24.44,581.34],"5-9-3":[-26.63,581.34],"4-4-1":[-26.63,581.34],"6-19-8":[-7.43,973.14],"6-19-9":[6.63,2480.85],"5-9-4":[-7.43,2614.23],"6-19-10":[-1.43,2228.73],"6-19-11":[399.03,2929.86],"5-9-5":[-1.43,2929.86],"4-4-2":[-19.04,3089.83],"6-19-12":[587.41,2399.44],"6-19-13":[-30.31,3974.94],"5-9-6":[-259.61,3974.94],"6-19-14":[-46.53,2829.29],"6-19-15":[-55.15,2131.34],"5-9-7":[-55.15,2829.29],"4-4-3":[-259.61,3974.94],"6-19-16":[-60.39,1592.47],"6-19-17":[-71.31,1595.59],"5-9-8":[-73.74,1595.59],"6-19-18":[-78.96,251.63],"6-19-19":[-83.12,-38.05],"5-9-9":[-83.12,251.63],"4-4-4":[-83.12,1595.59],"6-19-20":[-84.9,-41.29],"6-19-21":[-89.63,-42.03],"5-9-10":[-89.63,-40.29],"6-19-22":[-92.74,-43.78],"6-19-23":[-93.19,-43.92],"5-9-11":[-93.19,-40.45],"4-4-5":[-93.19,-32.44],"6-19-24":[-93.06,-43.61],"6-19-25":[-92.29,-42.14],"5-9-12":[-93.06,-38.8],"6-19-26":[-89.24,-39.76],"6-19-27":[-85.23,-36.36],"5-9-13":[-89.24,-32.16],"4-4-6":[-93.06,-22.61],"6-19-28":[-78.96,-31.27],"6-19-29":[-67.42,-25.3],"5-9-14":[-78.96,-22.1],"6-19-30":[-57.07,-21.14],"6-19-31":[-48.07,-17.54],"5-9-15":[-57.07,-14.23],"4-4-7":[-78.96,-7.01],"6-19-32":[-41.41,-14.6],"6-19-33":[-33.3,-12.43],"5-9-16":[-41.41,-10.12],"6-19-34":[-28.55,-11.75],"6-19-35":[-23.48,-9.55],"5-9-17":[-28.55,-9.16],"4-4-8":[-41.41,-4.9],"6-19-36":[-19.4,-8.58],"6-19-37":[-18.07,-7.73],"5-9-18":[-20.03,-7.73],"6-19-38":[-19.41,-7.69],"6-19-39":[-21.4,-8.18],"5-9-19":[-23.26,-7.69],"4-4-9":[-23.64,-6.96],"6-19-40":[-21.19,0.38],"6-19-41":[-23.26,-9.49],"5-9-20":[-25.64,30.18],"6-19-42":[-23.81,-10.86],"6-19-43":[-23.19,-10.71],"5-9-21":[-26.07,-10.71],"4-4-10":[-27.2,395.5],"6-19-44":[-23.63,-10.75],"6-19-45":[-24.65,-11.33],"5-9-22":[-24.95,-10.75],"6-19-46":[-24.92,-11.97],"6-19-47":[-25.67,-11.81],"5-9-23":[-27.96,-11.81],"4-4-11":[-30.38,-10.73],"6-19-48":[-25.62,-11.54],"6-19-49":[-26.6,-11.36],"5-9-24":[-31.29,-11.36],"6-19-50":[-29.05,-11.87],"6-19-51":[-37.03,-13.23],"5-9-25":[-38.3,-11.87],"4-4-12":[-40.62,-11.36],"6-19-52":[-44.46,-17.75],"6-19-53":[-60.61,-22.7],"5-9-26":[-62.71,-17.75],"6-19-54":[-69.03,-29.59],"6-19-55":[-75.62,-33.5],"5-9-27":[-79.89,-29.59],"4-4-13":[-88.41,-17.75],"6-19-56":[-80.8,-36.68],"6-19-57":[-87.74,-39.43],"5-9-28":[-91.81,-36.68],"6-19-58":[-80.06,2986.57],"6-19-59":[1490.04,3530.83],"5-9-29":[-89.38,3530.83],"4-4-14":[-102.31,3530.83],"6-19-60":[865.9,1514.1],"6-19-61":[606.22,956.54],"5-9-30":[552.13,1514.1],"6-19-62":[901.45,3114.64],"6-19-63":[-29.54,2878.57],"5-9-31":[-29.54,3682.63],"4-4-15":[-29.54,3682.63],"6-20-0":[12.6,28.55],"6-20-1":[10.43,29.48],"6-20-2":[2.27,20.82],"6-20-3":[-7.48,2.38],"6-20-4":[-13.58,105.36],"6-20-5":[-22.77,360.51],"6-20-6":[-29.85,693.54],"6-20-7":[-27.48,842.66],"6-20-8":[101.52,662.44],"6-20-9":[38.73,1501.83],"6-20-10":[-7.86,1335.36],"6-20-11":[265.12,2410.7],"6-20-12":[394.15,2580.47],"6-20-13":[176.29,3118.01],"6-20-14":[-26.42,3265.41],"6-20-15":[-24.65,4373.52],"6-20-16":[-14.17,3180.62],"6-20-17":[-27.55,4292.74],"6-20-18":[-76.12,2093.71],"6-20-19":[-82.77,1757.21],"6-20-20":[-84.77,-39.45],"6-20-21":[-90.02,-41.79],"6-20-22":[-93.63,-44.7],"6-20-23":[-95.18,-46.27],"6-20-24":[-95.41,-46.25],"6-20-25":[-94.65,-44.61],"6-20-26":[-91.54,-43],"6-20-27":[-87.87,-39.48],"6-20-28":[-81.88,-34.42],"6-20-29":[-70.45,-28.53],"6-20-30":[-61.33,-24.48],"6-20-31":[-52.2,-20.85],"6-20-32":[-45.21,-17.01],"6-20-33":[-35.82,-14.29],"6-20-34":[-30,-12.23],"6-20-35":[-24.98,-9.38],"6-20-36":[-19.21,-7.52],"6-20-37":[-16.88,-6.21],"6-20-38":[-16.13,-6.04],"6-20-39":[-17.89,-6.16],"6-20-40":[-18.62,-6.82],"6-20-41":[-21.61,-7.83],"6-20-42":[-22.22,-9.86],"6-20-43":[-23.83,-10.66],"6-20-44":[-24.73,-11.26],"6-20-45":[-25.79,-11.42],"6-20-46":[-25.8,-11.97],"6-20-47":[-24.13,-11.21],"6-20-48":[-23.48,-10.65],"6-20-49":[-23.65,-10.31],"6-20-50":[-26.04,-10.7],"6-20-51":[-35.46,-11.92],"6-20-52":[-44.23,-15.93],"6-20-53":[-59.19,-21.91],"6-20-54":[-66.26,-28.4],"6-20-55":[-73.37,-32.29],"6-20-56":[-79.03,-35.55],"6-20-57":[-84.12,-37.56],"6-20-58":[-79.02,1956.61],"6-20-59":[1514.09,2297.87],"6-20-60":[953.69,1535.12],"6-20-61":[812.01,1063],"6-20-62":[956.53,2865.19],"6-20-63":[-29.59,2878.57],"6-21-0":[12.69,28.95],"6-21-1":[10.43,30.37],"5-10-0":[10.43,30.37],"6-21-2":[2.27,21.72],"6-21-3":[-4.05,2.72],"5-10-1":[-7.48,21.72],"6-21-4":[-14.88,306.82],"6-21-5":[-25.82,454.87],"5-10-2":[-25.82,454.87],"6-21-6":[-33.35,413.74],"6-21-7":[-35.21,781.37],"5-10-3":[-35.21,842.66],"6-21-8":[126.37,696.58],"6-21-9":[137.72,880.39],"5-10-4":[38.73,1501.83],"6-21-10":[-10.46,833.93],"6-21-11":[299.05,1099.39],"5-10-5":[-10.46,2410.7],"6-21-12":[314.78,3253.8],"6-21-13":[300.79,3939.1],"5-10-6":[176.29,3939.1],"6-21-14":[196.37,2946.16],"6-21-15":[15.24,2851.96],"5-10-7":[-26.42,4373.52],"6-21-16":[351.22,2953.97],"6-21-17":[661.98,3100.13],"5-10-8":[-27.55,4292.74],"6-21-18":[-17.49,4387.58],"6-21-19":[-41.7,4242],"5-10-9":[-82.77,4387.58],"6-21-20":[-83.6,610.58],"6-21-21":[-89.13,1248.21],"5-10-10":[-90.02,1248.21],"6-21-22":[-93.13,-43.26],"6-21-23":[-95.04,-45.42],"5-10-11":[-95.18,-43.26],"6-21-24":[-95.32,-46.3],"6-21-25":[-94.74,-45.23],"5-10-12":[-95.41,-44.61],"6-21-26":[-91.98,-43.77],"6-21-27":[-87.81,-40.96],"5-10-13":[-91.98,-39.48],"6-21-28":[-82.67,-36.11],"6-21-29":[-71.2,-30.73],"5-10-14":[-82.67,-28.53],"6-21-30":[-63.31,-26.83],"6-21-31":[-54.81,-22.8],"5-10-15":[-63.31,-20.85],"6-21-32":[-47.82,-18.67],"6-21-33":[-38.41,-15.13],"5-10-16":[-47.82,-14.29],"6-21-34":[-32.21,-12.89],"6-21-35":[-25.63,-9.33],"5-10-17":[-32.21,-9.33],"6-21-36":[-19.3,-6.07],"6-21-37":[-14.54,-4.67],"5-10-18":[-19.3,-4.67],"6-21-38":[-12.06,-4.21],"6-21-39":[-13.18,-4.21],"5-10-19":[-17.89,-4.21],"6-21-40":[-15.05,-5.08],"6-21-41":[-19.58,-6.52],"5-10-20":[-21.61,-5.08],"6-21-42":[-21.17,-9.26],"6-21-43":[-22.89,-10.44],"5-10-21":[-23.83,-9.26],"6-21-44":[-24.5,-11.31],"6-21-45":[-26.05,-12.01],"5-10-22":[-26.05,-11.26],"6-21-46":[-26.03,-11.96],"6-21-47":[-24,-10.76],"5-10-23":[-26.03,-10.76],"6-21-48":[-22.24,-10.03],"6-21-49":[-21.6,-9.78],"5-10-24":[-23.65,-9.78],"6-21-50":[-23.2,-10.14],"6-21-51":[-31.43,-11.33],"5-10-25":[-35.46,-10.14],"6-21-52":[-42.02,-14.72],"6-21-53":[-56.28,-21.16],"5-10-26":[-59.19,-14.72],"6-21-54":[-63.59,-26.87],"6-21-55":[-71.43,-31.11],"5-10-27":[-73.37,-26.87],"6-21-56":[-74.31,-34.39],"6-21-57":[-79.17,-34.74],"5-10-28":[-84.12,-34.39],"6-21-58":[-75.47,1699.95],"6-21-59":[1495.5,2538.05],"5-10-29":[-79.02,2538.05],"6-21-60":[1062.99,1626.41],"6-21-61":[869.71,1241.73],"5-10-30":[812.01,1626.41],"6-21-62":[1025.91,2638.67],"6-21-63":[-29.63,2874.63],"5-10-31":[-29.63,2878.57],"6-22-0":[12.8,29.12],"6-22-1":[11.43,30.77],"6-22-2":[2.33,22.89],"6-22-3":[-2.3,5.53],"6-22-4":[-15.36,459.75],"6-22-5":[-28.86,707.55],"6-22-6":[-33.69,562.23],"6-22-7":[-36.83,561.11],"6-22-8":[106.74,731.19],"6-22-9":[124.49,633.28],"6-22-10":[-20.19,980.63],"6-22-11":[221.72,953.84],"6-22-12":[291.67,1945.45],"6-22-13":[407.7,3751.07],"6-22-14":[373.13,3467.23],"6-22-15":[143.66,2981.68],"6-22-16":[498.91,2953.81],"6-22-17":[1005.33,3455.03],"6-22-18":[-109.13,3616.13],"6-22-19":[-115.5,3677.07],"6-22-20":[-106.82,3055.54],"6-22-21":[-87.07,2579.5],"6-22-22":[-90.86,227.36],"6-22-23":[-93.31,-36.74],"6-22-24":[-93.47,-43.31],"6-22-25":[-92.56,-42.61],"6-22-26":[-90.46,-41.08],"6-22-27":[-87.11,-38.63],"6-22-28":[-81.94,-34.92],"6-22-29":[-71.11,-31.11],"6-22-30":[-63.37,-27.03],"6-22-31":[-54.82,-23.61],"6-22-32":[-48,-19.66],"6-22-33":[-38.67,-15.78],"6-22-34":[-32.33,-12.28],"6-22-35":[-25.13,-8],"6-22-36":[-18.53,-4.62],"6-22-37":[-11.89,-3.04],"6-22-38":[-9.24,-2.78],"6-22-39":[-10.03,-2.97],"6-22-40":[-12.55,-3.88],"6-22-41":[-18.46,-5.52],"6-22-42":[-20.42,-8.14],"6-22-43":[-22.66,-9.88],"6-22-44":[-24.44,-11.12],"6-22-45":[-25.51,-11.47],"6-22-46":[-25.48,-11.33],"6-22-47":[-23.5,-10.26],"6-22-48":[-21.38,-9.66],"6-22-49":[-20.27,-9.52],"6-22-50":[-22.59,-10.1],"6-22-51":[-29.7,-11.32],"6-22-52":[-41.54,-14.53],"6-22-53":[-53.67,-21.14],"6-22-54":[-61.27,-25.86],"6-22-55":[-68.78,-29.95],"6-22-56":[-72.33,-32.84],"6-22-57":[-76.5,-32.9],"6-22-58":[-76.53,3383.56],"6-22-59":[1286.48,3626.49],"6-22-60":[1241.72,1694.94],"6-22-61":[987.52,1432.98],"6-22-62":[1168.67,2576.08],"6-22-63":[-29.54,2863.29],"6-23-0":[12.92,29.14],"6-23-1":[11.53,30.89],"5-11-0":[11.43,30.89],"6-23-2":[2.57,24.53],"6-23-3":[-2.86,9.47],"5-11-1":[-2.86,24.53],"4-5-0":[-7.48,30.89],"6-23-4":[-17.92,409.2],"6-23-5":[-35.37,754.53],"5-11-2":[-35.37,754.53],"6-23-6":[-35.77,628.59],"6-23-7":[-51.79,437.77],"5-11-3":[-51.79,628.59],"4-5-1":[-51.79,842.66],"3-2-0":[-51.79,842.66],"6-23-8":[212,620.34],"6-23-9":[126.79,595],"5-11-4":[106.74,731.19],"6-23-10":[-25.96,952.89],"6-23-11":[181.68,969.04],"5-11-5":[-25.96,980.63],"4-5-2":[-25.96,2410.7],"6-23-12":[362.56,1217.71],"6-23-13":[599.34,3152.73],"5-11-6":[291.67,3751.07],"6-23-14":[584.02,3396.83],"6-23-15":[496.5,3385.15],"5-11-7":[143.66,3467.23],"4-5-3":[-26.42,4373.52],"3-2-1":[-259.61,4373.52],"6-23-16":[739.26,3846.98],"6-23-17":[1261.06,3659.45],"5-11-8":[498.91,3846.98],"6-23-18":[342.66,3960.27],"6-23-19":[53.25,2781.72],"5-11-9":[-115.5,3960.27],"4-5-4":[-115.5,4387.58],"6-23-20":[-43.42,2074.25],"6-23-21":[-53.91,2324.4],"5-11-10":[-106.82,3055.54],"6-23-22":[-86.07,1902.28],"6-23-23":[-86.2,-37.16],"5-11-11":[-93.31,1902.28],"4-5-5":[-106.82,3055.54],"3-2-2":[-115.5,4387.58],"6-23-24":[-86.54,-38.53],"6-23-25":[-85.65,238.06],"5-11-12":[-93.47,238.06],"6-23-26":[-84.32,-36.65],"6-23-27":[-80.64,-34.81],"5-11-13":[-90.46,-34.81],"4-5-6":[-95.41,238.06],"6-23-28":[-76.59,-32.08],"6-23-29":[-68.37,-29.04],"5-11-14":[-81.94,-29.04],"6-23-30":[-61.8,-25.29],"6-23-31":[-52.78,-21.98],"5-11-15":[-63.37,-21.98],"4-5-7":[-82.67,-20.85],"3-2-3":[-95.41,238.06],"6-23-32":[-46.8,-18.42],"6-23-33":[-38.04,-15],"5-11-16":[-48,-15],"6-23-34":[-31.41,-10.65],"6-23-35":[-23.03,-6.84],"5-11-17":[-32.33,-6.84],"4-5-8":[-48,-6.84],"6-23-36":[-15.57,-3.94],"6-23-37":[-8.42,-2.35],"5-11-18":[-18.53,-2.35],"6-23-38":[-5.83,-1.99],"6-23-39":[-7.6,-2.19],"5-11-19":[-10.03,-1.99],"4-5-9":[-19.3,-1.99],"3-2-4":[-48,-1.99],"6-23-40":[-10.38,-3.43],"6-23-41":[-16.03,-5],"5-11-20":[-18.46,-3.43],"6-23-42":[-19.19,-6.88],"6-23-43":[-22.06,-9.07],"5-11-21":[-22.66,-6.88],"4-5-10":[-23.83,-3.43],"6-23-44":[-22.86,-10.1],"6-23-45":[-23.63,-10.53],"5-11-22":[-25.51,-10.1],"6-23-46":[-23.44,-10.4],"6-23-47":[-22.17,-9.8],"5-11-23":[-25.48,-9.8],"4-5-11":[-26.05,-9.8],"3-2-5":[-30.38,395.5],"6-23-48":[-20.39,-9.35],"6-23-49":[-21.17,-9.35],"5-11-24":[-21.38,-9.35],"6-23-50":[-23.21,-10.18],"6-23-51":[-30.13,-11.53],"5-11-25":[-30.13,-10.1],"4-5-12":[-35.46,-9.35],"6-23-52":[-43.45,-14.72],"6-23-53":[-51.53,-21.48],"5-11-26":[-53.67,-14.53],"6-23-54":[-58.95,-25.37],"6-23-55":[-65.3,-28.82],"5-11-27":[-68.78,-25.37],"4-5-13":[-73.37,-14.53],"3-2-6":[-88.41,-9.35],"6-23-56":[-69.37,-31.18],"6-23-57":[-72.56,-32.31],"5-11-28":[-76.5,-31.18],"6-23-58":[-73.42,2010.01],"6-23-59":[1105.43,2194.6],"5-11-29":[-76.53,3626.49],"4-5-14":[-84.12,3626.49],"6-23-60":[1418.33,1763.02],"6-23-61":[1252.11,1638.58],"5-11-30":[987.52,1763.02],"6-23-62":[1432.97,2755.16],"6-23-63":[-29.54,2834.96],"5-11-31":[-29.54,2863.29],"4-5-15":[-29.63,2878.57],"3-2-7":[-102.31,3682.63],"6-24-0":[13.08,29.1],"6-24-1":[12.77,30.89],"6-24-2":[3.36,25.8],"6-24-3":[-3.5,11.12],"6-24-4":[-19.26,404.18],"6-24-5":[-38.9,404.18],"6-24-6":[-40.02,637.43],"6-24-7":[-57.55,369.52],"6-24-8":[70.59,618.66],"6-24-9":[123.35,643.83],"6-24-10":[-27.38,442.7],"6-24-11":[174.59,841.05],"6-24-12":[373.57,849.8],"6-24-13":[495.56,1071.09],"6-24-14":[572.57,2114.96],"6-24-15":[720.4,3889.28],"6-24-16":[1325.33,4191.26],"6-24-17":[1258.65,4109.88],"6-24-18":[857.52,3690.6],"6-24-19":[364.31,3824.21],"6-24-20":[-26.57,3235.29],"6-24-21":[-39.57,2589.58],"6-24-22":[-71.54,1702.94],"6-24-23":[-79.57,2045.21],"6-24-24":[-78.3,-33.29],"6-24-25":[-77.08,268.06],"6-24-26":[-75.28,-31.52],"6-24-27":[-72.83,-29.62],"6-24-28":[-69.63,-28.02],"6-24-29":[-63.34,-25.65],"6-24-30":[-58.09,-23.11],"6-24-31":[-49.64,-20.2],"6-24-32":[-43.76,-17.27],"6-24-33":[-35.9,-13.42],"6-24-34":[-29.87,-9.91],"6-24-35":[-20.23,-6.43],"6-24-36":[-13.61,-3.86],"6-24-37":[-7.43,-2.32],"6-24-38":[-4.95,-1.94],"6-24-39":[-7.06,-2.13],"6-24-40":[-9.67,-3.32],"6-24-41":[-13.81,-4.7],"6-24-42":[-17.75,-6.09],"6-24-43":[-20.18,-8.32],"6-24-44":[-21.4,-9.34],"6-24-45":[-21.96,-9.83],"6-24-46":[-21.96,-10],"6-24-47":[-20.69,-9.66],"6-24-48":[-19.53,-9.43],"6-24-49":[-21.86,-9.46],"6-24-50":[-23.63,-10.52],"6-24-51":[-30.13,-11.8],"6-24-52":[-42.54,-14.64],"6-24-53":[-50.73,-20.34],"6-24-54":[-56.68,-24.59],"6-24-55":[-62.37,-27.15],"6-24-56":[-67.75,-29.51],"6-24-57":[-69.33,-30.92],"6-24-58":[-67.75,2438.84],"6-24-59":[821.95,3441.15],"6-24-60":[1593.3,1871.81],"6-24-61":[1391.7,1816.7],"6-24-62":[1638.57,2575.14],"6-24-63":[-29.54,2813.19],"6-25-0":[13.28,29.06],"6-25-1":[12.99,30.67],"5-12-0":[12.77,30.89],"6-25-2":[4.33,27.3],"6-25-3":[-3.6,11.88],"5-12-1":[-3.6,27.3],"6-25-4":[-18.48,293.97],"6-25-5":[-39.75,334.46],"5-12-2":[-39.75,404.18],"6-25-6":[-44.82,387.52],"6-25-7":[-63.28,308.5],"5-12-3":[-63.28,637.43],"6-25-8":[-63.06,598.61],"6-25-9":[119.88,600.19],"5-12-4":[-63.06,643.83],"6-25-10":[-28.15,610.76],"6-25-11":[175.34,613.75],"5-12-5":[-28.15,841.05],"6-25-12":[357,741.32],"6-25-13":[154.24,852.58],"5-12-6":[154.24,1071.09],"6-25-14":[529.75,2093.28],"6-25-15":[667.15,3842.68],"5-12-7":[529.75,3889.28],"6-25-16":[1046.96,4204.45],"6-25-17":[1396.76,3751.43],"5-12-8":[1046.96,4204.45],"6-25-18":[1174.25,4348.39],"6-25-19":[1345.74,3458.34],"5-12-9":[364.31,4348.39],"6-25-20":[852.06,3295.69],"6-25-21":[84.61,3091.23],"5-12-10":[-39.57,3295.69],"6-25-22":[-38.22,3268.31],"6-25-23":[-66.41,2081.23],"5-12-11":[-79.57,3268.31],"6-25-24":[-67.95,-28.52],"6-25-25":[-66.59,-26.44],"5-12-12":[-78.3,268.06],"6-25-26":[-65.05,-25.22],"6-25-27":[-63.06,-24.16],"5-12-13":[-75.28,-24.16],"6-25-28":[-59.26,-15.52],"6-25-29":[-54.35,-22.31],"5-12-14":[-69.63,-15.52],"6-25-30":[-50.44,-20.5],"6-25-31":[-45,-18.74],"5-12-15":[-58.09,-18.74],"6-25-32":[-39.97,-16.22],"6-25-33":[-33.52,-12.95],"5-12-16":[-43.76,-12.95],"6-25-34":[-26.73,-9.78],"6-25-35":[-19.19,-6.51],"5-12-17":[-29.87,-6.43],"6-25-36":[-14.52,-4.01],"6-25-37":[-8.87,-2.5],"5-12-18":[-14.52,-2.32],"6-25-38":[-6.34,-2.18],"6-25-39":[-6.84,-2.3],"5-12-19":[-7.06,-1.94],"6-25-40":[-9.41,-3.32],"6-25-41":[-32.1,501.96],"5-12-20":[-32.1,501.96],"6-25-42":[-16.08,-5.36],"6-25-43":[-18.48,-7.5],"5-12-21":[-20.18,-5.36],"6-25-44":[-19.58,-8.5],"6-25-45":[-20.51,-9.34],"5-12-22":[-21.96,-8.5],"6-25-46":[-20.66,-9.34],"6-25-47":[-19.83,-8.98],"5-12-23":[-21.96,-8.98],"6-25-48":[-19.6,-9.09],"6-25-49":[-22.09,-9.67],"5-12-24":[-22.09,-9.09],"6-25-50":[-24.31,-10.8],"6-25-51":[-29.53,-11.99],"5-12-25":[-30.13,-10.52],"6-25-52":[-38.65,-14.61],"6-25-53":[-48.88,-19.4],"5-12-26":[-50.73,-14.61],"6-25-54":[-53.27,-23.18],"6-25-55":[-58.77,-25.88],"5-12-27":[-62.37,-23.18],"6-25-56":[-65.35,-28.74],"6-25-57":[-65.63,-29.51],"5-12-28":[-69.33,-28.74],"6-25-58":[-63.65,821.96],"6-25-59":[726.87,1676.69],"5-12-29":[-67.75,3441.15],"6-25-60":[1630.88,1996.28],"6-25-61":[1569.89,1996.28],"5-12-30":[1391.7,1996.28],"6-25-62":[1816.69,2606.34],"6-25-63":[-29.54,2795.26],"5-12-31":[-29.54,2813.19],"6-26-0":[13.54,29.14],"6-26-1":[13.94,30.48],"6-26-2":[5.28,27.87],"6-26-3":[-3.32,281.71],"6-26-4":[-18.48,308.77],"6-26-5":[-40.42,381.74],"6-26-6":[-46.86,317.75],"6-26-7":[-64.69,215.89],"6-26-8":[-2.27,571.32],"6-26-9":[116.78,565.77],"6-26-10":[-32.41,599.94],"6-26-11":[208.28,611.84],"6-26-12":[299.93,731.39],"6-26-13":[318.89,749.4],"6-26-14":[470.62,993.24],"6-26-15":[555.47,1446.2],"6-26-16":[932.52,3114.6],"6-26-17":[1209.86,4338.56],"6-26-18":[1296.53,4383.25],"6-26-19":[1070.65,3998.98],"6-26-20":[855.68,3617.02],"6-26-21":[658.3,2970.04],"6-26-22":[417.64,3258.01],"6-26-23":[-28.6,3307.88],"6-26-24":[-62.73,2734.41],"6-26-25":[-59.49,2861.69],"6-26-26":[-52.9,-18.54],"6-26-27":[-50.46,-18.19],"6-26-28":[-48.34,-18.13],"6-26-29":[-46.35,-18.06],"6-26-30":[-44.41,-17.73],"6-26-31":[-40.44,-17.02],"6-26-32":[-37.32,-15.49],"6-26-33":[-31.86,-12.9],"6-26-34":[-26.47,-10],"6-26-35":[-21.25,-7.31],"6-26-36":[-17.78,-4.66],"6-26-37":[-11.76,-3.18],"6-26-38":[-7.87,-2.8],"6-26-39":[-6.79,-2.9],"6-26-40":[-7.79,-2.88],"6-26-41":[-10.71,8.49],"6-26-42":[-14.63,-4.56],"6-26-43":[-16.88,-6.59],"6-26-44":[-18.57,-7.39],"6-26-45":[-19.41,-7.99],"6-26-46":[-19.51,-8.34],"6-26-47":[-18.58,-8.35],"6-26-48":[-19.11,-8.37],"6-26-49":[-22.08,-9.26],"6-26-50":[-24.14,-10.47],"6-26-51":[-29.38,-11.82],"6-26-52":[-38.33,-14.03],"6-26-53":[-46.19,-17.49],"6-26-54":[-51.2,-21.67],"6-26-55":[-57.5,-24.38],"6-26-56":[-63.64,-27.72],"6-26-57":[-62.82,189.45],"6-26-58":[-60.91,881.64],"6-26-59":[740.64,1748.55],"6-26-60":[1676.68,2076.65],"6-26-61":[1756.34,2181.07],"6-26-62":[1948.76,2606.49],"6-26-63":[-29.54,2777.84],"6-27-0":[13.6,29.49],"6-27-1":[13.94,31.09],"5-13-0":[13.54,31.09],"6-27-2":[6.45,27.9],"6-27-3":[-0.42,320.5],"5-13-1":[-3.32,320.5],"4-6-0":[-3.6,320.5],"6-27-4":[-16.49,372.69],"6-27-5":[-40.21,294.13],"5-13-2":[-40.42,381.74],"6-27-6":[-53.85,132.2],"6-27-7":[-71.25,117.7],"5-13-3":[-71.25,317.75],"4-6-1":[-71.25,637.43],"6-27-8":[-10.85,325.53],"6-27-9":[25.92,428.65],"5-13-4":[-10.85,571.32],"6-27-10":[-36.63,567.14],"6-27-11":[275.4,510.84],"5-13-5":[-36.63,611.84],"4-6-2":[-63.06,841.05],"6-27-12":[177.93,779.83],"6-27-13":[230.46,797.9],"5-13-6":[177.93,797.9],"6-27-14":[353.23,843.62],"6-27-15":[486.44,1208.11],"5-13-7":[353.23,1446.2],"4-6-3":[154.24,3889.28],"6-27-16":[469.53,2194.75],"6-27-17":[827.22,1798.51],"5-13-8":[469.53,4338.56],"6-27-18":[821.28,2635.83],"6-27-19":[656.62,2159.53],"5-13-9":[656.62,4383.25],"4-6-4":[364.31,4383.25],"6-27-20":[633.52,1925.95],"6-27-21":[300.28,2697.84],"5-13-10":[300.28,3617.02],"6-27-22":[335.31,2999.92],"6-27-23":[921.89,3424.3],"5-13-11":[-28.6,3424.3],"4-6-5":[-79.57,3617.02],"6-27-24":[401.21,3479.94],"6-27-25":[-46.8,4234.29],"5-13-12":[-62.73,4234.29],"6-27-26":[-39.05,-13],"6-27-27":[-35.28,-12.54],"5-13-13":[-52.9,-12.54],"4-6-6":[-78.3,4234.29],"6-27-28":[-35.2,-12.85],"6-27-29":[-35.34,-13.41],"5-13-14":[-48.34,-12.85],"6-27-30":[-35.17,-14.09],"6-27-31":[-34.89,-14.93],"5-13-15":[-44.41,-14.09],"4-6-7":[-69.63,-12.85],"6-27-32":[-33.67,-14.66],"6-27-33":[-30.24,-13.29],"5-13-16":[-37.32,-12.9],"6-27-34":[-28.13,-11.02],"6-27-35":[-24.66,-9.21],"5-13-17":[-28.13,-7.31],"4-6-8":[-43.76,-6.43],"6-27-36":[-20.45,-6.32],"6-27-37":[-14.71,-4.11],"5-13-18":[-20.45,-3.18],"6-27-38":[-10.7,-3.46],"6-27-39":[-7.82,-2.95],"5-13-19":[-10.7,-2.8],"4-6-9":[-20.45,-1.94],"6-27-40":[-6.36,-2.12],"6-27-41":[-8.91,-2.07],"5-13-20":[-10.71,8.49],"6-27-42":[-12.62,-3.64],"6-27-43":[-14.88,-5.64],"5-13-21":[-16.88,-3.64],"4-6-10":[-32.1,501.96],"6-27-44":[-15.67,-6.12],"6-27-45":[-17.16,-6.68],"5-13-22":[-19.41,-6.12],"6-27-46":[-17.14,-7.46],"6-27-47":[-16.64,-6.9],"5-13-23":[-19.51,-6.9],"4-6-11":[-21.96,-6.12],"6-27-48":[-18.13,-7.16],"6-27-49":[-20.76,-8.23],"5-13-24":[-22.08,-7.16],"6-27-50":[-23.03,-9.75],"6-27-51":[-27.57,-10.56],"5-13-25":[-29.38,-9.75],"4-6-12":[-30.13,-7.16],"6-27-52":[-33.04,-12.47],"6-27-53":[-43.05,-16],"5-13-26":[-46.19,-12.47],"6-27-54":[-47.85,-20.49],"6-27-55":[-55.33,-23.04],"5-13-27":[-57.5,-20.49],"4-6-13":[-62.37,-12.47],"6-27-56":[-59.57,-26.31],"6-27-57":[-57.3,647.09],"5-13-28":[-63.64,647.09],"6-27-58":[-55.25,899.06],"6-27-59":[799.61,1803.34],"5-13-29":[-60.91,1803.34],"4-6-14":[-69.33,3441.15],"6-27-60":[1748.54,2159.56],"6-27-61":[1868.06,2197.16],"5-13-30":[1676.68,2197.16],"6-27-62":[2095.95,2581.41],"6-27-63":[-29.54,2769.5],"5-13-31":[-29.54,2777.84],"4-6-15":[-29.54,2813.19],"6-28-0":[13.6,29.98],"6-28-1":[13.97,31.76],"6-28-2":[7.61,27.9],"6-28-3":[-0.98,311.23],"6-28-4":[-14.04,373.55],"6-28-5":[-35.5,302.69],"6-28-6":[-52.23,269.04],"6-28-7":[-71.46,37.53],"6-28-8":[-13.78,273.39],"6-28-9":[-36.74,404.25],"6-28-10":[-38.45,438.24],"6-28-11":[60.84,436.49],"6-28-12":[151.71,375.47],"6-28-13":[182.44,807.5],"6-28-14":[219.33,785.89],"6-28-15":[355.34,755.87],"6-28-16":[348.26,1090.39],"6-28-17":[415.18,1115.44],"6-28-18":[336.8,1003.31],"6-28-19":[247.09,1013.68],"6-28-20":[245.51,909.81],"6-28-21":[22.35,784.58],"6-28-22":[2.36,3697.19],"6-28-23":[-6.03,3685.36],"6-28-24":[-7.33,3903.97],"6-28-25":[-32.6,5379.65],"6-28-26":[-33.85,1685.03],"6-28-27":[-25.73,-8.02],"6-28-28":[-27.14,-9.26],"6-28-29":[-28.13,-9.53],"6-28-30":[-29.73,-10.39],"6-28-31":[-30.49,-11.78],"6-28-32":[-30.3,-13.08],"6-28-33":[-29.11,-13.91],"6-28-34":[-28.13,-12.68],"6-28-35":[-25.46,-10.25],"6-28-36":[-21.32,-7.52],"6-28-37":[-14.78,-5.33],"6-28-38":[-12.03,-4.05],"6-28-39":[-8.07,-2.41],"6-28-40":[-6.04,-1.06],"6-28-41":[-7.12,-1.06],"6-28-42":[-10.83,-2.79],"6-28-43":[-12.78,-4.7],"6-28-44":[-13.74,-5.3],"6-28-45":[-14.99,-5.28],"6-28-46":[-15.4,-5.56],"6-28-47":[-15.79,-5.29],"6-28-48":[-15.93,-5.65],"6-28-49":[-19.25,-6.88],"6-28-50":[-20.66,-7.71],"6-28-51":[-24.63,-9.26],"6-28-52":[-31.19,-11.53],"6-28-53":[-40.85,-14.84],"6-28-54":[-45.75,-18.97],"6-28-55":[-52.39,-21.7],"6-28-56":[-55.08,-24.38],"6-28-57":[-50.79,721.39],"6-28-58":[-51.45,799.62],"6-28-59":[687.23,1812.13],"6-28-60":[1803.33,2299.62],"6-28-61":[1923.59,2175.98],"6-28-62":[1878.69,2429.87],"6-28-63":[-29.54,2761.57],"6-29-0":[13.6,30.78],"6-29-1":[13.97,32.5],"5-14-0":[13.6,32.5],"6-29-2":[8.58,28.94],"6-29-3":[-0.22,604.78],"5-14-1":[-0.98,604.78],"6-29-4":[-10.79,424.86],"6-29-5":[-29.34,367.02],"5-14-2":[-35.5,424.86],"6-29-6":[-48.96,423.04],"6-29-7":[-71.03,188.06],"5-14-3":[-71.46,423.04],"6-29-8":[-71.03,258.97],"6-29-9":[-40.7,265.48],"5-14-4":[-71.03,404.25],"6-29-10":[-45.67,362.54],"6-29-11":[35.43,333.9],"5-14-5":[-45.67,438.24],"6-29-12":[69.29,353.36],"6-29-13":[176.64,297.08],"5-14-6":[69.29,807.5],"6-29-14":[185.4,507.51],"6-29-15":[216.94,624.77],"5-14-7":[185.4,785.89],"6-29-16":[248.19,602.11],"6-29-17":[227.87,668.28],"5-14-8":[227.87,1115.44],"6-29-18":[151.81,558.27],"6-29-19":[87.66,500.16],"5-14-9":[87.66,1013.68],"6-29-20":[11.41,489.46],"6-29-21":[-74.48,534.68],"5-14-10":[-74.48,909.81],"6-29-22":[-59.51,197.1],"6-29-23":[-60.32,1437.08],"5-14-11":[-60.32,3697.19],"6-29-24":[-52.89,3376.08],"6-29-25":[-16.39,5601.19],"5-14-12":[-52.89,5601.19],"6-29-26":[-23.21,3710.87],"6-29-27":[-17.72,-5.43],"5-14-13":[-33.85,3710.87],"6-29-28":[-18.29,-5.37],"6-29-29":[-20.02,-5.8],"5-14-14":[-28.13,-5.37],"6-29-30":[-22.85,-7.34],"6-29-31":[-25.68,-8.54],"5-14-15":[-30.49,-7.34],"6-29-32":[-27.33,-11.17],"6-29-33":[-28.21,-12.92],"5-14-16":[-30.3,-11.17],"6-29-34":[-27.93,-12.74],"6-29-35":[-25.57,-10.37],"5-14-17":[-28.13,-10.25],"6-29-36":[-21.38,-7.55],"6-29-37":[-14.75,-5.87],"5-14-18":[-21.38,-5.33],"6-29-38":[-12.1,-3.7],"6-29-39":[-7.93,-1.6],"5-14-19":[-12.1,-1.6],"6-29-40":[-4.73,-0.26],"6-29-41":[-5.16,-0.14],"5-14-20":[-7.12,-0.14],"6-29-42":[-8.49,-1.41],"6-29-43":[-11.27,-3.5],"5-14-21":[-12.78,-1.41],"6-29-44":[-11.15,-3.82],"6-29-45":[-11.69,-3.55],"5-14-22":[-14.99,-3.55],"6-29-46":[-12.81,-3.56],"6-29-47":[-11.24,-3.95],"5-14-23":[-15.79,-3.56],"6-29-48":[-12.87,-3.81],"6-29-49":[-15.22,-6.07],"5-14-24":[-19.25,-3.81],"6-29-50":[-18.28,-7.31],"6-29-51":[-22.81,-8.44],"5-14-25":[-24.63,-7.31],"6-29-52":[-28.28,-10.9],"6-29-53":[-37.41,-12.86],"5-14-26":[-40.85,-10.9],"6-29-54":[-42.1,-16.84],"6-29-55":[-48.36,-19.69],"5-14-27":[-52.39,-16.84],"6-29-56":[-54.2,-22.1],"6-29-57":[-47.44,695.16],"5-14-28":[-55.08,721.39],"6-29-58":[-44.62,1067.53],"6-29-59":[697.67,1825.18],"5-14-29":[-51.45,1825.18],"6-29-60":[1812.12,2484.31],"6-29-61":[1887.54,2200.25],"5-14-30":[1803.33,2484.31],"6-29-62":[1867.75,2364.99],"6-29-63":[-29.54,2744.46],"5-14-31":[-29.54,2761.57],"6-30-0":[13.6,31.47],"6-30-1":[14.83,32.77],"6-30-2":[9.25,30.01],"6-30-3":[1.4,1609.72],"6-30-4":[-8.83,717.95],"6-30-5":[-23.57,477.26],"6-30-6":[-38.7,559.29],"6-30-7":[-70.31,433.78],"6-30-8":[-70.31,458.53],"6-30-9":[-96.36,174.74],"6-30-10":[-99.28,106.11],"6-30-11":[-98.53,228.76],"6-30-12":[-14.62,294.27],"6-30-13":[195.65,456.57],"6-30-14":[57.99,564.92],"6-30-15":[181.53,584.49],"6-30-16":[173.46,471.28],"6-30-17":[26.59,446.09],"6-30-18":[123.08,490.81],"6-30-19":[2.26,806.41],"6-30-20":[-9.4,204.36],"6-30-21":[-55.44,125.4],"6-30-22":[-65.74,-25.61],"6-30-23":[-65.69,-25.42],"6-30-24":[-54.87,-14.04],"6-30-25":[-36.51,2490.71],"6-30-26":[-21.02,2540.82],"6-30-27":[-19.24,-2.77],"6-30-28":[-11.27,-1.84],"6-30-29":[-14.57,-2.28],"6-30-30":[-17.25,-4.28],"6-30-31":[-22.13,-5.31],"6-30-32":[-25.32,-8.63],"6-30-33":[-27.51,-11.24],"6-30-34":[-27.51,-12.14],"6-30-35":[-24.98,-9.83],"6-30-36":[-20.94,-7.4],"6-30-37":[-14.81,-5.53],"6-30-38":[-11.87,-2.8],"6-30-39":[-6.86,-0.38],"6-30-40":[-3,1.26],"6-30-41":[-2.62,1.53],"6-30-42":[-6.47,0.16],"6-30-43":[-9.48,-1.41],"6-30-44":[-9.48,-2.83],"6-30-45":[-7.66,-2.16],"6-30-46":[-9.07,-1.93],"6-30-47":[-9.84,-2.8],"6-30-48":[-11.72,-2.88],"6-30-49":[-14.44,-4.07],"6-30-50":[-16.72,-6.13],"6-30-51":[-22.37,-7.94],"6-30-52":[-24.41,-9.85],"6-30-53":[-33.43,-11.71],"6-30-54":[-38.58,-14.81],"6-30-55":[-43.96,-16.85],"6-30-56":[-52.81,-19.97],"6-30-57":[-46.56,310.04],"6-30-58":[-43.55,1562.01],"6-30-59":[790.59,1824.22],"6-30-60":[1816.77,2275.03],"6-30-61":[1789.45,2180.52],"6-30-62":[1867.26,2328.81],"6-30-63":[-29.54,2744.46],"6-31-0":[13.6,32.23],"6-31-1":[15.06,32.84],"5-15-0":[13.6,32.84],"6-31-2":[10.78,881.84],"6-31-3":[4.92,2250.64],"5-15-1":[1.4,2250.64],"4-7-0":[-0.98,2250.64],"6-31-4":[-5.46,1374.08],"6-31-5":[-22.85,583.45],"5-15-2":[-23.57,1374.08],"6-31-6":[-45.86,413.34],"6-31-7":[-57.79,429.71],"5-15-3":[-70.31,559.29],"4-7-1":[-71.46,1374.08],"3-3-0":[-71.46,2250.64],"6-31-8":[-36.15,577.62],"6-31-9":[-96.7,282.12],"5-15-4":[-96.7,577.62],"6-31-10":[-99.12,-46.98],"6-31-11":[-98.49,190.58],"5-15-5":[-99.28,228.76],"4-7-2":[-99.28,577.62],"6-31-12":[-15.94,324],"6-31-13":[204.84,447.15],"5-15-6":[-15.94,456.57],"6-31-14":[150.72,671.12],"6-31-15":[147.71,604.9],"5-15-7":[57.99,671.12],"4-7-3":[-15.94,807.5],"3-3-1":[-99.28,3889.28],"2-1-0":[-259.61,4373.52],"6-31-16":[142.69,422.75],"6-31-17":[82.02,300.32],"5-15-8":[26.59,471.28],"6-31-18":[37.49,509.53],"6-31-19":[3.75,590.45],"5-15-9":[2.26,806.41],"4-7-4":[2.26,1115.44],"6-31-20":[-28.13,146.09],"6-31-21":[-51.46,78.7],"5-15-10":[-55.44,204.36],"6-31-22":[-60.53,-24.95],"6-31-23":[-60.55,-17],"5-15-11":[-65.74,-17],"4-7-5":[-74.48,3697.19],"3-3-2":[-79.57,4383.25],"6-31-24":[-51.3,129.8],"6-31-25":[-28.09,2495.76],"5-15-12":[-54.87,2495.76],"6-31-26":[-31.81,4217.93],"6-31-27":[-39.22,1667.28],"5-15-13":[-39.22,4217.93],"4-7-6":[-54.87,5601.19],"6-31-28":[-3.69,3.56],"6-31-29":[-7.94,1.79],"5-15-14":[-14.57,3.56],"6-31-30":[-10.64,-0.95],"6-31-31":[-23.38,1700.45],"5-15-15":[-23.38,1700.45],"4-7-7":[-30.49,1700.45],"3-3-3":[-78.3,5601.19],"2-1-1":[-115.5,5601.19],"1-0-0":[-317.19,6207.28],"6-31-32":[-321.59,1684.42],"6-31-33":[-25.17,-8.12],"5-15-16":[-321.59,1684.42],"6-31-34":[-25.23,-10.22],"6-31-35":[-23.47,-8.63],"5-15-17":[-27.51,-8.63],"4-7-8":[-321.59,1684.42],"6-31-36":[-19.5,-5.98],"6-31-37":[-14.17,-4.58],"5-15-18":[-20.94,-4.58],"6-31-38":[-10.89,-1.76],"6-31-39":[-4.99,1.04],"5-15-19":[-11.87,1.04],"4-7-9":[-21.38,1.04],"3-3-4":[-321.59,1684.42],"6-31-40":[-0.46,3.59],"6-31-41":[0.15,3.57],"5-15-20":[-3,3.59],"6-31-42":[-1.87,3.33],"6-31-43":[-5.77,-0.19],"5-15-21":[-9.48,3.33],"4-7-10":[-12.78,3.59],"6-31-44":[-6.17,-2.1],"6-31-45":[-5.45,-1.19],"5-15-22":[-9.48,-1.19],"6-31-46":[-4.53,-0.73],"6-31-47":[-5.48,-0.93],"5-15-23":[-9.84,-0.73],"4-7-11":[-15.79,-0.73],"3-3-5":[-32.1,501.96],"2-1-2":[-321.59,1684.42],"6-31-48":[-7.3,-1.03],"6-31-49":[-11.96,-1.38],"5-15-24":[-14.44,-1.03],"6-31-50":[-15.08,-4.16],"6-31-51":[-19.15,-5.73],"5-15-25":[-22.37,-4.16],"4-7-12":[-24.63,-1.03],"6-31-52":[-21.76,-8.28],"6-31-53":[-29.28,-9.98],"5-15-26":[-33.43,-8.28],"6-31-54":[-34.04,-12.93],"6-31-55":[-39.77,-14.37],"5-15-27":[-43.96,-12.93],"4-7-13":[-52.39,-8.28],"3-3-6":[-62.37,-1.03],"6-31-56":[-43.43,1365.62],"6-31-57":[-44.81,282.19],"5-15-28":[-52.81,1365.62],"6-31-58":[-39.76,1267.01],"6-31-59":[957.9,1887.87],"5-15-29":[-43.55,1887.87],"4-7-14":[-55.08,1887.87],"6-31-60":[1730.62,2175.26],"6-31-61":[1639.46,1987.13],"5-15-30":[1639.46,2275.03],"6-31-62":[1752.65,2714.87],"6-31-63":[-29.54,2744.46],"5-15-31":[-29.54,2744.46],"4-7-15":[-29.54,2761.57],"3-3-7":[-69.33,3441.15],"2-1-3":[-102.31,3682.63],"1-0-1":[-321.59,3970.41],"6-32-0":[13.6,32.71],"6-32-1":[15.63,32.84],"6-32-2":[12.53,1148.73],"6-32-3":[3.54,1723.08],"6-32-4":[-3.48,1337.96],"6-32-5":[-22.64,684.11],"6-32-6":[-45.53,367.14],"6-32-7":[-63.11,395.57],"6-32-8":[-72.93,546.23],"6-32-9":[-93.99,248.1],"6-32-10":[-96.39,-44.47],"6-32-11":[-97.86,87.35],"6-32-12":[-57.46,240.44],"6-32-13":[116.07,415.1],"6-32-14":[116.17,599.34],"6-32-15":[138.68,568.7],"6-32-16":[-2.59,551.43],"6-32-17":[75.12,291.63],"6-32-18":[-24.24,294.32],"6-32-19":[4.68,321.49],"6-32-20":[-31.39,211.56],"6-32-21":[-63.34,90.38],"6-32-22":[-63.11,-25.22],"6-32-23":[-57.23,-7.65],"6-32-24":[-31.37,200.24],"6-32-25":[-33.45,1010.31],"6-32-26":[-35.51,3009.32],"6-32-27":[-28.36,2376.93],"6-32-28":[-3.22,10.91],"6-32-29":[-1.77,10.51],"6-32-30":[-4.68,6.74],"6-32-31":[-7.35,73.07],"6-32-32":[-18.67,716.38],"6-32-33":[-20.88,-4.49],"6-32-34":[-21.38,-6.53],"6-32-35":[-20.18,-6.02],"6-32-36":[-17.05,-4.75],"6-32-37":[-11.75,-2.76],"6-32-38":[-9,-0.28],"6-32-39":[-2.87,3.56],"6-32-40":[0.59,5.45],"6-32-41":[1.56,6.31],"6-32-42":[-0.2,5.55],"6-32-43":[-3.93,1.13],"6-32-44":[-5.26,-0.57],"6-32-45":[-4.78,-0.14],"6-32-46":[-2.44,1.43],"6-32-47":[-2.43,2.72],"6-32-48":[-2.64,1.56],"6-32-49":[-7.99,-0.1],"6-32-50":[-11.84,-1.81],"6-32-51":[-16.4,-4.23],"6-32-52":[-18.97,-6.57],"6-32-53":[-25.69,-8.31],"6-32-54":[-28.75,-11.31],"6-32-55":[-35.05,-12.68],"6-32-56":[-41.26,-14.17],"6-32-57":[-36.6,248.01],"6-32-58":[-36.6,1290.61],"6-32-59":[1072.47,2685.38],"6-32-60":[1460.89,2381.84],"6-32-61":[1444.34,1985.53],"6-32-62":[1435.21,2244.93],"6-32-63":[-29.54,2744.46],"6-33-0":[13.6,33.18],"6-33-1":[15.63,33.39],"5-16-0":[13.6,33.39],"6-33-2":[13.83,1617.96],"6-33-3":[3.54,1701.03],"5-16-1":[3.54,1723.08],"6-33-4":[-1.3,1540.67],"6-33-5":[-21.29,1009.47],"5-16-2":[-22.64,1540.67],"6-33-6":[-36.75,819.86],"6-33-7":[-62.77,557.56],"5-16-3":[-63.11,819.86],"6-33-8":[-72.83,444.35],"6-33-9":[-88.51,366.68],"5-16-4":[-93.99,546.23],"6-33-10":[-95.62,-42.25],"6-33-11":[-97.09,-45.96],"5-16-5":[-97.86,87.35],"6-33-12":[-96.12,205.42],"6-33-13":[26.23,323.91],"5-16-6":[-96.12,415.1],"6-33-14":[40.15,604.67],"6-33-15":[99.8,613.05],"5-16-7":[40.15,613.05],"6-33-16":[103.99,486.54],"6-33-17":[42.02,356.67],"5-16-8":[-2.59,551.43],"6-33-18":[73.98,611.43],"6-33-19":[-2.39,1256.4],"5-16-9":[-24.24,1256.4],"6-33-20":[-18.21,703.65],"6-33-21":[-62.86,133.72],"5-16-10":[-63.34,703.65],"6-33-22":[-63.05,-24.55],"6-33-23":[-54.77,-15.6],"5-16-11":[-63.11,-7.65],"6-33-24":[-55.01,38.89],"6-33-25":[-31.18,-5.73],"5-16-12":[-55.01,1010.31],"6-33-26":[-16.7,2458.87],"6-33-27":[-29.38,2108.97],"5-16-13":[-35.51,3009.32],"6-33-28":[-12.99,2165.37],"6-33-29":[3.88,21.34],"5-16-14":[-12.99,2165.37],"6-33-30":[-9.95,580.04],"6-33-31":[-3.66,9.28],"5-16-15":[-9.95,580.04],"6-33-32":[-8.84,4.83],"6-33-33":[-12.48,2.13],"5-16-16":[-20.88,716.38],"6-33-34":[-13.36,-2.74],"6-33-35":[-13.27,-2.88],"5-16-17":[-21.38,-2.74],"6-33-36":[-11.47,-2.69],"6-33-37":[-8.95,-0.74],"5-16-18":[-17.05,-0.74],"6-33-38":[-5.14,2.74],"6-33-39":[-0.29,8.08],"5-16-19":[-9,8.08],"6-33-40":[1.94,9.43],"6-33-41":[2.8,10.75],"5-16-20":[0.59,10.75],"6-33-42":[0.89,8.51],"6-33-43":[-0.58,5.53],"5-16-21":[-3.93,8.51],"6-33-44":[-2.13,3.55],"6-33-45":[-1.46,3.29],"5-16-22":[-5.26,3.55],"6-33-46":[-0.15,6.87],"6-33-47":[1.07,7.73],"5-16-23":[-2.44,7.73],"6-33-48":[-0.11,7.04],"6-33-49":[-2.91,4.01],"5-16-24":[-7.99,7.04],"6-33-50":[-7.73,0.65],"6-33-51":[-12.58,-2.01],"5-16-25":[-16.4,0.65],"6-33-52":[-14.99,-3.66],"6-33-53":[-21.95,-5.75],"5-16-26":[-25.69,-3.66],"6-33-54":[-24.52,-9.25],"6-33-55":[-29.3,-10.49],"5-16-27":[-35.05,-9.25],"6-33-56":[-30.53,-11.38],"6-33-57":[-34.54,-11.65],"5-16-28":[-41.26,248.01],"6-33-58":[-34.69,1304.63],"6-33-59":[163.09,4721.94],"5-16-29":[-36.6,4721.94],"6-33-60":[441.12,2555.4],"6-33-61":[1232.67,1732.44],"5-16-30":[441.12,2555.4],"6-33-62":[1251.83,2245.57],"6-33-63":[-29.54,2744.47],"5-16-31":[-29.54,2744.47],"6-34-0":[13.6,33.57],"6-34-1":[16.2,34.27],"6-34-2":[15.09,1823.83],"6-34-3":[5.88,1627.27],"6-34-4":[0.78,1272.1],"6-34-5":[-16.01,1913.68],"6-34-6":[-22.87,1056.55],"6-34-7":[-53.19,570.75],"6-34-8":[-67.08,613.97],"6-34-9":[-84.49,433.17],"6-34-10":[-91.94,-38.64],"6-34-11":[-96.06,-44.35],"6-34-12":[-95.88,171.79],"6-34-13":[-46,145.12],"6-34-14":[-3.04,594.92],"6-34-15":[117.38,614.36],"6-34-16":[124.05,432.14],"6-34-17":[17.53,436.84],"6-34-18":[94.64,1652.42],"6-34-19":[35.46,2004.7],"6-34-20":[-31.34,358.2],"6-34-21":[-56.91,76.45],"6-34-22":[-52.24,86.32],"6-34-23":[-53.41,678.56],"6-34-24":[-46.91,565.42],"6-34-25":[-34.3,19.57],"6-34-26":[-32.9,735.54],"6-34-27":[-24.67,729.46],"6-34-28":[-18.58,3818.31],"6-34-29":[-17.79,1199.76],"6-34-30":[0.98,213.98],"6-34-31":[2.04,21.13],"6-34-32":[2.12,20.08],"6-34-33":[-5.46,10.12],"6-34-34":[-5.77,0.8],"6-34-35":[-6.05,2.96],"6-34-36":[-5.94,2.96],"6-34-37":[-5.13,6.17],"6-34-38":[-1.3,9.8],"6-34-39":[1.64,14.13],"6-34-40":[4.23,15.17],"6-34-41":[4.47,14.04],"6-34-42":[3.4,12.02],"6-34-43":[3.4,11.01],"6-34-44":[1.55,10.91],"6-34-45":[1.48,9.3],"6-34-46":[1.54,11.81],"6-34-47":[3.72,12.77],"6-34-48":[2.17,11.75],"6-34-49":[0.41,7.88],"6-34-50":[-3.25,5.77],"6-34-51":[-6.93,1.5],"6-34-52":[-11.33,-1.44],"6-34-53":[-18.26,-3.74],"6-34-54":[-20.79,-6.34],"6-34-55":[-25.29,-7.54],"6-34-56":[-27.01,-9.25],"6-34-57":[-33.98,-10.94],"6-34-58":[-34.8,1241.13],"6-34-59":[-52.36,1732.84],"6-34-60":[-52.36,2250.43],"6-34-61":[873,1480.75],"6-34-62":[1247.41,2251.13],"6-34-63":[-29.54,2745.47],"6-35-0":[13.6,34.16],"6-35-1":[16.51,35.76],"5-17-0":[13.6,35.76],"6-35-2":[16.38,1923.59],"6-35-3":[9.49,2313.91],"5-17-1":[5.88,2313.91],"4-8-0":[3.54,2313.91],"6-35-4":[3.3,2252.73],"6-35-5":[-8.04,1712.44],"5-17-2":[-16.01,2252.73],"6-35-6":[-16.63,1559.44],"6-35-7":[-53.78,272.32],"5-17-3":[-53.78,1559.44],"4-8-1":[-63.11,2252.73],"6-35-8":[-65.49,185.61],"6-35-9":[-76.1,184.52],"5-17-4":[-84.49,613.97],"6-35-10":[-88.72,293.27],"6-35-11":[-92.71,81.87],"5-17-5":[-96.06,293.27],"4-8-2":[-97.86,613.97],"6-35-12":[-92.66,123.7],"6-35-13":[-45.82,181.36],"5-17-6":[-95.88,181.36],"6-35-14":[-26.92,536.17],"6-35-15":[122.02,651.7],"5-17-7":[-26.92,651.7],"4-8-3":[-96.12,651.7],"6-35-16":[27.96,701.76],"6-35-17":[-8.6,951.43],"5-17-8":[-8.6,951.43],"6-35-18":[-44.79,1713.99],"6-35-19":[-37.13,1476.72],"5-17-9":[-44.79,2004.7],"4-8-4":[-44.79,2004.7],"6-35-20":[-74.33,139.84],"6-35-21":[-74.18,28.94],"5-17-10":[-74.33,358.2],"6-35-22":[-68.27,63.37],"6-35-23":[-53.75,293.76],"5-17-11":[-68.27,678.56],"4-8-5":[-74.33,703.65],"6-35-24":[-62.66,1104.62],"6-35-25":[-46.42,14.26],"5-17-12":[-62.66,1104.62],"6-35-26":[-24.54,8.26],"6-35-27":[-12.35,357.63],"5-17-13":[-32.9,735.54],"4-8-6":[-62.66,3009.32],"6-35-28":[-9.05,1960.73],"6-35-29":[-38,1563.96],"5-17-14":[-38,3818.31],"6-35-30":[10.56,29.2],"6-35-31":[-34,2816.32],"5-17-15":[-34,2816.32],"4-8-7":[-38,3818.31],"6-35-32":[-39.36,6286.78],"6-35-33":[-56.73,4458.62],"5-17-16":[-56.73,6286.78],"6-35-34":[-63.32,4118.74],"6-35-35":[-8.38,458.91],"5-17-17":[-63.32,4118.74],"4-8-8":[-63.32,6286.78],"6-35-36":[-1.45,18],"6-35-37":[2.19,21.77],"5-17-18":[-5.94,21.77],"6-35-38":[3.78,22.14],"6-35-39":[5.81,20.12],"5-17-19":[-1.3,22.14],"4-8-9":[-17.05,22.14],"6-35-40":[6.54,19.83],"6-35-41":[-22.92,470.08],"5-17-20":[-22.92,470.08],"6-35-42":[5.5,19.63],"6-35-43":[-88.44,1091.31],"5-17-21":[-88.44,1091.31],"4-8-10":[-88.44,1091.31],"6-35-44":[-23.76,1289.29],"6-35-45":[4.72,16.91],"5-17-22":[-23.76,1289.29],"6-35-46":[4.86,18.8],"6-35-47":[6.11,18.78],"5-17-23":[1.54,18.8],"4-8-11":[-23.76,1289.29],"6-35-48":[4.51,19.18],"6-35-49":[3.21,14.36],"5-17-24":[0.41,19.18],"6-35-50":[1.45,11.01],"6-35-51":[-2.17,8.59],"5-17-25":[-6.93,11.01],"4-8-12":[-16.4,19.18],"6-35-52":[-5.6,3.45],"6-35-53":[-12,-1.41],"5-17-26":[-18.26,3.45],"6-35-54":[-13.82,-3.08],"6-35-55":[-20.59,-4.15],"5-17-27":[-25.29,-3.08],"4-8-13":[-35.05,3.45],"6-35-56":[-21.6,-7],"6-35-57":[-30.21,327.46],"5-17-28":[-33.98,327.46],"6-35-58":[-30.73,1088.67],"6-35-59":[-49.4,1067.5],"5-17-29":[-52.36,1732.84],"4-8-14":[-52.36,4721.94],"6-35-60":[-49.4,1223.59],"6-35-61":[548.47,1388.03],"5-17-30":[-52.36,2250.43],"6-35-62":[1139.79,2260.72],"6-35-63":[-29.54,2745.47],"5-17-31":[-29.54,2745.47],"4-8-15":[-52.36,2745.47],"6-36-0":[13.6,34.61],"6-36-1":[16.93,36.8],"6-36-2":[17.48,2230.75],"6-36-3":[8.2,2258.08],"6-36-4":[6.48,1817.36],"6-36-5":[1.34,2118.71],"6-36-6":[-14.9,1862.67],"6-36-7":[-49.69,611.89],"6-36-8":[-62.21,282.83],"6-36-9":[-68.81,575.77],"6-36-10":[-79.91,428.02],"6-36-11":[-45.31,430.05],"6-36-12":[-47.68,408.97],"6-36-13":[-44.52,406.33],"6-36-14":[126.58,610.85],"6-36-15":[16.43,575.3],"6-36-16":[12.09,700.02],"6-36-17":[-45.25,927.51],"6-36-18":[-64.5,1201.61],"6-36-19":[-85.54,191.41],"6-36-20":[-89.06,-36.24],"6-36-21":[-93.16,-34.13],"6-36-22":[-90.89,29.15],"6-36-23":[-82.17,55.76],"6-36-24":[-67.36,1947.58],"6-36-25":[-49.86,2231.33],"6-36-26":[-37.01,0.98],"6-36-27":[-29.93,-2.92],"6-36-28":[-18.96,1449.86],"6-36-29":[-29.88,4212.67],"6-36-30":[-37.47,5414.88],"6-36-31":[-328.06,5809.48],"6-36-32":[167.64,5906.18],"6-36-33":[112.46,4149.93],"6-36-34":[77.11,5607.45],"6-36-35":[-116.39,6754.44],"6-36-36":[-49.49,5914.69],"6-36-37":[-7.04,824.13],"6-36-38":[10.05,32.11],"6-36-39":[9.18,30.01],"6-36-40":[9.06,28.91],"6-36-41":[9.77,29.26],"6-36-42":[8.85,27.55],"6-36-43":[7.85,26.75],"6-36-44":[8.15,25.78],"6-36-45":[8.09,22.48],"6-36-46":[8.44,23.14],"6-36-47":[9.17,22.91],"6-36-48":[7.17,22.45],"6-36-49":[4.69,22.45],"6-36-50":[4.05,19.43],"6-36-51":[1.95,10.14],"6-36-52":[-2.07,8.34],"6-36-53":[-5.89,2.43],"6-36-54":[-7.67,1],"6-36-55":[-16.43,-0.39],"6-36-56":[-17.96,4.83],"6-36-57":[-24.97,322.6],"6-36-58":[-25.5,1069.77],"6-36-59":[-46.79,1055.47],"6-36-60":[-49.8,832.48],"6-36-61":[240.99,1288.62],"6-36-62":[1054.14,2281.25],"6-36-63":[-29.54,2745.47],"6-37-0":[13.6,35.4],"6-37-1":[17.14,38.45],"5-18-0":[13.6,38.45],"6-37-2":[18.24,2437.47],"6-37-3":[7.27,2148.92],"5-18-1":[7.27,2437.47],"6-37-4":[7.89,1260.24],"6-37-5":[4.77,32.77],"5-18-2":[1.34,2118.71],"6-37-6":[-1.92,1808.19],"6-37-7":[-40.5,1101.49],"5-18-3":[-49.69,1862.67],"6-37-8":[-50.59,282.61],"6-37-9":[-60.82,642.27],"5-18-4":[-68.81,642.27],"6-37-10":[-29.59,648.16],"6-37-11":[-23.76,410.19],"5-18-5":[-79.91,648.16],"6-37-12":[-40.73,516.43],"6-37-13":[163.41,654.15],"5-18-6":[-47.68,654.15],"6-37-14":[225.34,700.01],"6-37-15":[-96.6,889.43],"5-18-7":[-96.6,889.43],"6-37-16":[-33.29,1597.57],"6-37-17":[-113.29,1241.62],"5-18-8":[-113.29,1597.57],"6-37-18":[-86.48,7.41],"6-37-19":[-97.81,-12.11],"5-18-9":[-97.81,1201.61],"6-37-20":[-102.6,-42.73],"6-37-21":[-100.62,-43.8],"5-18-10":[-102.6,-34.13],"6-37-22":[-95.92,-41.08],"6-37-23":[-92.86,26.27],"5-18-11":[-95.92,55.76],"6-37-24":[-83.2,1217.95],"6-37-25":[-62.64,2330.69],"5-18-12":[-83.2,2330.69],"6-37-26":[-56.44,-14.96],"6-37-27":[-48.4,871.95],"5-18-13":[-56.44,871.95],"6-37-28":[-49.02,5700.22],"6-37-29":[-23.52,3844.52],"5-18-14":[-49.02,5700.22],"6-37-30":[169,5315.89],"6-37-31":[170.25,3836.77],"5-18-15":[-328.06,5809.48],"6-37-32":[117.06,443.38],"6-37-33":[81.67,324.59],"5-18-16":[81.67,5906.18],"6-37-34":[90.99,2362.22],"6-37-35":[136.3,5683.59],"5-18-17":[-116.39,6754.44],"6-37-36":[213.99,5564.58],"6-37-37":[-123.53,5547.75],"5-18-18":[-123.53,5914.69],"6-37-38":[11.41,41.12],"6-37-39":[13.52,40.44],"5-18-19":[9.18,41.12],"6-37-40":[13.77,39.3],"6-37-41":[13.66,37.5],"5-18-20":[9.06,39.3],"6-37-42":[12.71,34.42],"6-37-43":[9.07,32.14],"5-18-21":[7.85,34.42],"6-37-44":[8.29,34.46],"6-37-45":[-18.71,1376.54],"5-18-22":[-18.71,1376.54],"6-37-46":[-29.59,1061.25],"6-37-47":[-7.31,1414.25],"5-18-23":[-29.59,1414.25],"6-37-48":[-36.85,4026.29],"6-37-49":[-269.44,3587.09],"5-18-24":[-269.44,4026.29],"6-37-50":[-96.77,2789.91],"6-37-51":[-222.29,1172.63],"5-18-25":[-222.29,2789.91],"6-37-52":[1.79,13.51],"6-37-53":[0.72,11.28],"5-18-26":[-5.89,13.51],"6-37-54":[-0.4,8.59],"6-37-55":[-7.66,4.36],"5-18-27":[-16.43,8.59],"6-37-56":[-8.53,510.52],"6-37-57":[-19.03,669.28],"5-18-28":[-24.97,669.28],"6-37-58":[-21.41,1660.76],"6-37-59":[-46.84,796.88],"5-18-29":[-46.84,1660.76],"6-37-60":[-52.31,243.32],"6-37-61":[219.34,1153.83],"5-18-30":[-52.31,1288.62],"6-37-62":[921.3,2321.18],"6-37-63":[-29.54,2745.47],"5-18-31":[-29.54,2745.47],"6-38-0":[13.6,36.29],"6-38-1":[17.42,39.8],"6-38-2":[18.96,2116.63],"6-38-3":[6.6,2052.81],"6-38-4":[10,1115.32],"6-38-5":[12.54,35.55],"6-38-6":[0.83,1713.29],"6-38-7":[-34.12,1625.19],"6-38-8":[-39.93,332.82],"6-38-9":[-52.52,633.8],"6-38-10":[-48.57,658.27],"6-38-11":[-23.61,464.64],"6-38-12":[271.57,704.35],"6-38-13":[334.3,1114.61],"6-38-14":[-30.94,1053.24],"6-38-15":[-69.08,1266.55],"6-38-16":[-76.04,1888.88],"6-38-17":[-77.04,507.57],"6-38-18":[-86.89,-36.02],"6-38-19":[-98.41,-42.87],"6-38-20":[-103.24,-47.88],"6-38-21":[-104.42,-47.93],"6-38-22":[-104.14,-46.84],"6-38-23":[-103.56,-41.22],"6-38-24":[-101.46,1152.74],"6-38-25":[-85.84,3067.99],"6-38-26":[-70.73,-20.78],"6-38-27":[-65.4,833.1],"6-38-28":[-114.23,4925.73],"6-38-29":[10.54,5356.84],"6-38-30":[61.91,3882.23],"6-38-31":[106.5,839.2],"6-38-32":[68.16,474.29],"6-38-33":[63.39,249.13],"6-38-34":[103.34,384.58],"6-38-35":[184.94,644.83],"6-38-36":[252.99,6360.34],"6-38-37":[-22.39,6449.41],"6-38-38":[-1.33,5847.77],"6-38-39":[12.47,42.32],"6-38-40":[-9.89,2677.33],"6-38-41":[-3.78,2243.25],"6-38-42":[5.25,5156.32],"6-38-43":[2.3,5062.63],"6-38-44":[-10.81,5023.3],"6-38-45":[10.45,4724.4],"6-38-46":[-49.62,3766.16],"6-38-47":[-60.04,2585.5],"6-38-48":[-22.3,3553.09],"6-38-49":[7.67,3257.62],"6-38-50":[-72.84,2695.15],"6-38-51":[-106.71,1949.61],"6-38-52":[4.99,21.78],"6-38-53":[5.46,21.13],"6-38-54":[2.62,15.36],"6-38-55":[0.1,12.23],"6-38-56":[-3.35,2784.58],"6-38-57":[-15.5,1731.59],"6-38-58":[-15.5,1790.22],"6-38-59":[-44.23,1401.52],"6-38-60":[-50.33,332.2],"6-38-61":[241.75,1029.44],"6-38-62":[742.55,2346.02],"6-38-63":[-29.54,2745.47],"6-39-0":[13.6,37.58],"6-39-1":[17.68,41.29],"5-19-0":[13.6,41.29],"6-39-2":[16.51,1723.34],"6-39-3":[6.84,1651.25],"5-19-1":[6.6,2116.63],"4-9-0":[6.6,2437.47],"6-39-4":[11.11,1535.69],"6-39-5":[13.7,38.14],"5-19-2":[10,1535.69],"6-39-6":[2.98,1492.45],"6-39-7":[-1.86,1664.51],"5-19-3":[-34.12,1713.29],"4-9-1":[-49.69,2118.71],"3-4-0":[-63.11,2437.47],"6-39-8":[-16.42,932.96],"6-39-9":[-42.68,781.05],"5-19-4":[-52.52,932.96],"6-39-10":[-44.28,360.51],"6-39-11":[-41.88,596.29],"5-19-5":[-48.57,658.27],"4-9-2":[-79.91,932.96],"6-39-12":[51.44,869.29],"6-39-13":[188,1077.82],"5-19-6":[51.44,1114.61],"6-39-14":[-31.13,916.29],"6-39-15":[-25.79,1579.36],"5-19-7":[-69.08,1579.36],"4-9-3":[-96.6,1579.36],"3-4-1":[-97.86,1579.36],"6-39-16":[-56.2,1114.21],"6-39-17":[-75.76,23.87],"5-19-8":[-77.04,1888.88],"6-39-18":[-85.75,-37.02],"6-39-19":[-95.04,-41.17],"5-19-9":[-98.41,-36.02],"4-9-4":[-113.29,1888.88],"6-39-20":[-101.46,-44.35],"6-39-21":[-103.88,-46.85],"5-19-10":[-104.42,-44.35],"6-39-22":[-105.29,-49.02],"6-39-23":[-104.93,-50.05],"5-19-11":[-105.29,-41.22],"4-9-5":[-105.29,55.76],"3-4-2":[-113.29,2004.7],"6-39-24":[-129.9,-42.27],"6-39-25":[-132.42,1440.94],"5-19-12":[-132.42,3067.99],"6-39-26":[-85.88,-29.52],"6-39-27":[-89.53,1217.96],"5-19-13":[-89.53,1217.96],"4-9-6":[-132.42,3067.99],"6-39-28":[-34.01,3550.67],"6-39-29":[-4.7,404.14],"5-19-14":[-114.23,5356.84],"6-39-30":[19.1,759.95],"6-39-31":[49.74,984.95],"5-19-15":[19.1,3882.23],"4-9-7":[-328.06,5809.48],"3-4-3":[-328.06,5809.48],"6-39-32":[-0.58,880.62],"6-39-33":[34.67,244.67],"5-19-16":[-0.58,880.62],"6-39-34":[68,300.39],"6-39-35":[108.3,433.23],"5-19-17":[68,644.83],"4-9-8":[-116.39,6754.44],"6-39-36":[155.88,5347.83],"6-39-37":[202.17,6455.95],"5-19-18":[-22.39,6455.95],"6-39-38":[2.92,6600.28],"6-39-39":[3.78,6222.25],"5-19-19":[-1.33,6600.28],"4-9-9":[-123.53,6600.28],"3-4-4":[-123.53,6754.44],"6-39-40":[25.81,6775.96],"6-39-41":[366.3,6919.9],"5-19-20":[-9.89,6919.9],"6-39-42":[645.96,6300.89],"6-39-43":[493.64,6969.13],"5-19-21":[2.3,6969.13],"4-9-10":[-9.89,6969.13],"6-39-44":[407.92,5888.33],"6-39-45":[231.75,3998.13],"5-19-22":[-10.81,5888.33],"6-39-46":[248.58,2022.28],"6-39-47":[173.83,1957.39],"5-19-23":[-60.04,3766.16],"4-9-11":[-60.04,5888.33],"3-4-5":[-88.44,6969.13],"6-39-48":[-0.14,1353.11],"6-39-49":[-111.83,1097.15],"5-19-24":[-111.83,3553.09],"6-39-50":[-1.5,605.9],"6-39-51":[-63.31,2581.84],"5-19-25":[-106.71,2695.15],"4-9-12":[-269.44,4026.29],"6-39-52":[7.24,30.32],"6-39-53":[8.16,28.42],"5-19-26":[4.99,30.32],"6-39-54":[5.99,24.52],"6-39-55":[4.94,1701.66],"5-19-27":[0.1,1701.66],"4-9-13":[-16.43,1701.66],"3-4-6":[-269.44,4026.29],"6-39-56":[2.04,2876.77],"6-39-57":[-5.16,2323.88],"5-19-28":[-15.5,2876.77],"6-39-58":[-5.16,2011.29],"6-39-59":[-38.71,1401.52],"5-19-29":[-44.23,2011.29],"4-9-14":[-46.84,2876.77],"6-39-60":[-48.69,398.96],"6-39-61":[152.3,947.43],"5-19-30":[-50.33,1029.44],"6-39-62":[609.13,2348.16],"6-39-63":[-29.54,2745.47],"5-19-31":[-29.54,2745.47],"4-9-15":[-52.31,2745.47],"3-4-7":[-52.36,4721.94],"6-40-0":[13.58,38.54],"6-40-1":[18.42,42.48],"6-40-2":[14.03,1837.18],"6-40-3":[9.2,1301.31],"6-40-4":[16.61,1474.89],"6-40-5":[15.16,294.75],"6-40-6":[5.31,35.39],"6-40-7":[0.08,1690.53],"6-40-8":[-12.78,2057.19],"6-40-9":[-31.21,1148.56],"6-40-10":[-39,1032.11],"6-40-11":[-38.87,935.94],"6-40-12":[283.81,898.04],"6-40-13":[24.76,1031.68],"6-40-14":[-26.02,1255.33],"6-40-15":[-50.51,787.13],"6-40-16":[-51.94,269.07],"6-40-17":[-74.05,-24.93],"6-40-18":[-82.04,-34.93],"6-40-19":[-88.7,-36.77],"6-40-20":[-92.93,48.35],"6-40-21":[-98.06,-42.9],"6-40-22":[-101.84,-47.14],"6-40-23":[-104.68,-50.45],"6-40-24":[-138.65,-50.2],"6-40-25":[-141.12,1288.29],"6-40-26":[-90.28,-35.91],"6-40-27":[-82.71,92.4],"6-40-28":[-60.97,2718.19],"6-40-29":[-37.5,2385.74],"6-40-30":[52.53,2826.62],"6-40-31":[41.04,2785.87],"6-40-32":[-10.01,1058.3],"6-40-33":[7.09,158.16],"6-40-34":[23.99,203.5],"6-40-35":[68.74,470.48],"6-40-36":[117.6,267.64],"6-40-37":[126.79,5469.94],"6-40-38":[191.91,5778.21],"6-40-39":[986.52,6050.05],"6-40-40":[396.34,6388.87],"6-40-41":[262.61,6039.42],"6-40-42":[156.73,4549.07],"6-40-43":[232.7,2816.12],"6-40-44":[196.61,812.73],"6-40-45":[94.32,598.59],"6-40-46":[-102.43,1675.56],"6-40-47":[0.8,1125.83],"6-40-48":[-8.45,672.86],"6-40-49":[1.67,282.56],"6-40-50":[9.92,25.99],"6-40-51":[-12.01,1141.97],"6-40-52":[12.59,33.62],"6-40-53":[14.04,33.98],"6-40-54":[10.79,32.1],"6-40-55":[7.94,2110.84],"6-40-56":[7.14,2245.41],"6-40-57":[1.76,2040.57],"6-40-58":[-14.94,2090.43],"6-40-59":[-38.71,870.91],"6-40-60":[-48.69,230.81],"6-40-61":[-53.09,864.87],"6-40-62":[549.51,2344.27],"6-40-63":[-29.59,2745.47],"6-41-0":[13.58,39.48],"6-41-1":[19.11,44.26],"5-20-0":[13.58,44.26],"6-41-2":[13.19,951.78],"6-41-3":[11.37,1019.58],"5-20-1":[9.2,1837.18],"6-41-4":[17.37,1639.31],"6-41-5":[16.47,47.31],"5-20-2":[15.16,1639.31],"6-41-6":[12.24,47.31],"6-41-7":[6.36,1076.43],"5-20-3":[0.08,1690.53],"6-41-8":[-2.21,1785.63],"6-41-9":[-5.15,768.08],"5-20-4":[-31.21,2057.19],"6-41-10":[-18.25,1491.48],"6-41-11":[-32.03,1587.28],"5-20-5":[-39,1587.28],"6-41-12":[-13.09,864.36],"6-41-13":[25.94,1005.83],"5-20-6":[-13.09,1031.68],"6-41-14":[-40.09,588],"6-41-15":[-62.23,347.02],"5-20-7":[-62.23,1255.33],"6-41-16":[-51.62,265.73],"6-41-17":[-68.99,-25.54],"5-20-8":[-74.05,269.07],"6-41-18":[-71.61,-29.96],"6-41-19":[-78.01,-32.58],"5-20-9":[-88.7,-29.96],"6-41-20":[-85.81,18.12],"6-41-21":[-94.07,-39.59],"5-20-10":[-98.06,48.35],"6-41-22":[-102.75,-46.49],"6-41-23":[-105.57,-50.83],"5-20-11":[-105.57,-46.49],"6-41-24":[-129.54,-50.47],"6-41-25":[-129.48,1103.9],"5-20-12":[-141.12,1288.29],"6-41-26":[-90.4,869.54],"6-41-27":[-83.95,203.34],"5-20-13":[-90.4,869.54],"6-41-28":[-92.41,2565.59],"6-41-29":[-92.52,2449.21],"5-20-14":[-92.52,2718.19],"6-41-30":[126.29,2659.72],"6-41-31":[-0.89,2129.57],"5-20-15":[-0.89,2826.62],"6-41-32":[-35.4,103.23],"6-41-33":[-58.32,106.3],"5-20-16":[-58.32,1058.3],"6-41-34":[-8.15,187.29],"6-41-35":[3.69,1127.71],"5-20-17":[-8.15,1127.71],"6-41-36":[121.95,684.67],"6-41-37":[141.32,910.63],"5-20-18":[117.6,5469.94],"6-41-38":[214.18,4327.46],"6-41-39":[236.72,4098.61],"5-20-19":[191.91,6050.05],"6-41-40":[173.14,2622.25],"6-41-41":[94.42,1259.46],"5-20-20":[94.42,6388.87],"6-41-42":[68.09,1956.16],"6-41-43":[84.73,1847.62],"5-20-21":[68.09,4549.07],"6-41-44":[37.81,370.32],"6-41-45":[-42.53,1242.87],"5-20-22":[-42.53,1242.87],"6-41-46":[-22.19,172.48],"6-41-47":[-31.67,129.69],"5-20-23":[-102.43,1675.56],"6-41-48":[11.07,24.28],"6-41-49":[10.94,26.76],"5-20-24":[-8.45,672.86],"6-41-50":[10.24,27.93],"6-41-51":[-32.01,987.97],"5-20-25":[-32.01,1141.97],"6-41-52":[13.89,37.69],"6-41-53":[15.64,37.01],"5-20-26":[12.59,37.69],"6-41-54":[14.31,2255.29],"6-41-55":[8.72,2099.32],"5-20-27":[7.94,2255.29],"6-41-56":[6.99,2890.49],"6-41-57":[-1.96,2528.76],"5-20-28":[-1.96,2890.49],"6-41-58":[-28.3,1987.4],"6-41-59":[-36.07,-12.83],"5-20-29":[-38.71,2090.43],"6-41-60":[-47.6,-17.93],"6-41-61":[-51.95,806.53],"5-20-30":[-53.09,864.87],"6-41-62":[471.29,2332.43],"6-41-63":[-29.59,2745.47],"5-20-31":[-29.59,2745.47],"6-42-0":[13.6,39.87],"6-42-1":[20.07,45.77],"6-42-2":[13.39,636.09],"6-42-3":[13.39,1412.39],"6-42-4":[19.15,1850.85],"6-42-5":[16.99,99.21],"6-42-6":[19.11,50.32],"6-42-7":[14.3,47.47],"6-42-8":[7.19,1284.77],"6-42-9":[7.19,31.28],"6-42-10":[-1.45,19.12],"6-42-11":[-15.72,1027.48],"6-42-12":[-15.45,846.11],"6-42-13":[-12.9,704.1],"6-42-14":[-35.16,560.68],"6-42-15":[-28.74,626.18],"6-42-16":[-51.65,12.82],"6-42-17":[-59.93,-22.72],"6-42-18":[-63.96,-25.31],"6-42-19":[-70.71,-27.67],"6-42-20":[-79.19,-32.63],"6-42-21":[-92.99,-37.86],"6-42-22":[-102.26,-44.04],"6-42-23":[-104.51,-48.01],"6-42-24":[-109.89,-46.13],"6-42-25":[-127.72,350.69],"6-42-26":[-127.8,1415.28],"6-42-27":[-108.65,1174.77],"6-42-28":[-95.38,906.03],"6-42-29":[-54.23,2236.77],"6-42-30":[-7.39,2551.06],"6-42-31":[-5.06,1982.48],"6-42-32":[-47.66,394.84],"6-42-33":[-73.31,139.4],"6-42-34":[-32.27,379.21],"6-42-35":[37.28,586.16],"6-42-36":[152.35,742.16],"6-42-37":[128.07,1176.05],"6-42-38":[126.79,1325.79],"6-42-39":[110.1,644.34],"6-42-40":[97.77,249.8],"6-42-41":[34.67,233.97],"6-42-42":[2.15,142.11],"6-42-43":[-47.95,159.46],"6-42-44":[8.07,171.01],"6-42-45":[-24.24,773.01],"6-42-46":[11.51,27.54],"6-42-47":[5.16,24.63],"6-42-48":[5.16,23.27],"6-42-49":[8.2,25.72],"6-42-50":[-14.47,710.18],"6-42-51":[7.63,36.26],"6-42-52":[18.27,39.83],"6-42-53":[15.15,41.77],"6-42-54":[17.24,2109.78],"6-42-55":[9.82,2069.8],"6-42-56":[4.32,269.27],"6-42-57":[-10.08,1250.11],"6-42-58":[-23.74,1211.47],"6-42-59":[-36.14,-12.1],"6-42-60":[-49.12,-17.94],"6-42-61":[-51.95,889.65],"6-42-62":[706.64,2326.44],"6-42-63":[-29.54,2745.48],"6-43-0":[13.6,39.93],"6-43-1":[20.42,46.12],"5-21-0":[13.6,46.12],"6-43-2":[15.74,633.11],"6-43-3":[17.13,1941.41],"5-21-1":[13.39,1941.41],"4-10-0":[9.2,1941.41],"6-43-4":[99.2,2238.22],"6-43-5":[18.2,1021.33],"5-21-2":[16.99,2238.22],"6-43-6":[19.11,56.07],"6-43-7":[20.15,55.35],"5-21-3":[14.3,56.07],"4-10-1":[0.08,2238.22],"6-43-8":[17.02,49.44],"6-43-9":[9.89,42.39],"5-21-4":[7.19,1284.77],"6-43-10":[5.25,33.28],"6-43-11":[0.68,23.83],"5-21-5":[-15.72,1027.48],"4-10-2":[-39,2057.19],"6-43-12":[-8.86,1193.16],"6-43-13":[-13.28,895.93],"5-21-6":[-15.45,1193.16],"6-43-14":[-20.12,804.73],"6-43-15":[-48.44,566.65],"5-21-7":[-48.44,804.73],"4-10-3":[-62.23,1255.33],"6-43-16":[-45.14,-4.42],"6-43-17":[-49.88,-13.27],"5-21-8":[-59.93,12.82],"6-43-18":[-53.59,-19.77],"6-43-19":[-63.3,-23.07],"5-21-9":[-70.71,-19.77],"4-10-4":[-88.7,269.07],"6-43-20":[-73.49,-28.47],"6-43-21":[-87.06,-33.6],"5-21-10":[-92.99,-28.47],"6-43-22":[-94.59,-38.95],"6-43-23":[-97.23,-43.01],"5-21-11":[-104.51,-38.95],"4-10-5":[-105.57,48.35],"6-43-24":[-97.15,-43.83],"6-43-25":[-102.43,-45.56],"5-21-12":[-127.72,350.69],"6-43-26":[-113.66,-45.85],"6-43-27":[-108.06,-44.72],"5-21-13":[-127.8,1415.28],"4-10-6":[-141.12,1415.28],"6-43-28":[-95.84,-31.87],"6-43-29":[-77.21,502.55],"5-21-14":[-95.84,2236.77],"6-43-30":[-149.21,1207.52],"6-43-31":[87.42,1109.8],"5-21-15":[-149.21,2551.06],"4-10-7":[-149.21,2826.62],"6-43-32":[-59.96,483.8],"6-43-33":[-57.01,412.4],"5-21-16":[-73.31,483.8],"6-43-34":[2.73,657.03],"6-43-35":[87.58,621.44],"5-21-17":[-32.27,657.03],"4-10-8":[-73.31,1127.71],"6-43-36":[215.28,689.04],"6-43-37":[74.01,949.21],"5-21-18":[74.01,1176.05],"6-43-38":[58.91,1245.78],"6-43-39":[66.15,856.34],"5-21-19":[58.91,1325.79],"4-10-9":[58.91,6050.05],"6-43-40":[22.81,738.99],"6-43-41":[-2.88,703.38],"5-21-20":[-2.88,738.99],"6-43-42":[24.1,362.62],"6-43-43":[-5.9,395.29],"5-21-21":[-47.95,395.29],"4-10-10":[-47.95,6388.87],"6-43-44":[-44.85,228.24],"6-43-45":[-41.29,445.18],"5-21-22":[-44.85,773.01],"6-43-46":[2.65,26.5],"6-43-47":[0.53,19.67],"5-21-23":[0.53,27.54],"4-10-11":[-102.43,1675.56],"6-43-48":[0.24,14.06],"6-43-49":[3.69,25.65],"5-21-24":[0.24,25.72],"6-43-50":[3.62,714.59],"6-43-51":[5.69,38.8],"5-21-25":[-14.47,714.59],"4-10-12":[-32.01,1141.97],"6-43-52":[18.27,41.03],"6-43-53":[15.15,44.21],"5-21-26":[15.15,44.21],"6-43-54":[19.28,1728.16],"6-43-55":[9.82,37.01],"5-21-27":[9.82,2109.78],"4-10-13":[7.94,2255.29],"6-43-56":[1.8,22.37],"6-43-57":[-9.86,6.91],"5-21-28":[-10.08,1250.11],"6-43-58":[-23.43,-4.86],"6-43-59":[-35.85,-11.97],"5-21-29":[-36.14,1211.47],"4-10-14":[-38.71,2890.49],"6-43-60":[-50.63,-17.94],"6-43-61":[-51.01,1371.37],"5-21-30":[-51.95,1371.37],"6-43-62":[889.64,2317.26],"6-43-63":[-29.54,2745.48],"5-21-31":[-29.54,2745.48],"4-10-15":[-53.09,2745.48],"6-44-0":[13.6,39.84],"6-44-1":[20.3,45.86],"6-44-2":[17.47,772.13],"6-44-3":[19.23,2089.38],"6-44-4":[1020.94,2319.04],"6-44-5":[23.12,1708.39],"6-44-6":[23.37,1880.96],"6-44-7":[23.02,1854.07],"6-44-8":[21.54,1029.06],"6-44-9":[17.35,54.28],"6-44-10":[12.02,44.62],"6-44-11":[7.84,35.64],"6-44-12":[1.92,148.72],"6-44-13":[-20.3,486.61],"6-44-14":[-16.93,577.05],"6-44-15":[-12.05,408.54],"6-44-16":[-25.93,8.57],"6-44-17":[-39.16,-6.77],"6-44-18":[-44.89,-11.09],"6-44-19":[-56.94,-15.52],"6-44-20":[-66.17,-21.28],"6-44-21":[-77.89,-27.12],"6-44-22":[-85.04,-32.05],"6-44-23":[-89.27,-36.06],"6-44-24":[-91.01,-38.75],"6-44-25":[-96.71,-40.68],"6-44-26":[-98.96,-43.31],"6-44-27":[-95.93,-44.41],"6-44-28":[-95.18,-38.68],"6-44-29":[-81.6,14.37],"6-44-30":[-61.24,1030.82],"6-44-31":[94.48,889.3],"6-44-32":[-68.02,823.15],"6-44-33":[-38.49,487.97],"6-44-34":[67.74,694.41],"6-44-35":[161.68,753.33],"6-44-36":[228.41,612.29],"6-44-37":[103.13,914.71],"6-44-38":[86.09,880.42],"6-44-39":[114.58,752.75],"6-44-40":[106.53,799.57],"6-44-41":[70.48,899.62],"6-44-42":[35.31,584.15],"6-44-43":[1.97,482.27],"6-44-44":[-15.03,526.4],"6-44-45":[1.5,25.03],"6-44-46":[-0.35,22.2],"6-44-47":[-1.19,4.24],"6-44-48":[-2.11,6.22],"6-44-49":[-0.03,20.82],"6-44-50":[4.52,23.4],"6-44-51":[4.37,37.14],"6-44-52":[17.75,41.14],"6-44-53":[20.43,1523.88],"6-44-54":[16.01,578.59],"6-44-55":[7.53,38.03],"6-44-56":[-1.38,22.22],"6-44-57":[-9.33,2.32],"6-44-58":[-22.52,-3.02],"6-44-59":[-35.85,-11.88],"6-44-60":[-51.01,204.79],"6-44-61":[-50.72,1540.95],"6-44-62":[1083.33,2298.91],"6-44-63":[-29.54,2745.48],"6-45-0":[13.6,39.31],"6-45-1":[20,45.87],"5-22-0":[13.6,45.87],"6-45-2":[18.2,829.3],"6-45-3":[45.54,2185.38],"5-22-1":[17.47,2185.38],"6-45-4":[1552.61,2333.41],"6-45-5":[1247.03,2344.97],"5-22-2":[23.12,2344.97],"6-45-6":[26.83,2399.4],"6-45-7":[22.92,1842.92],"5-22-3":[22.92,2399.4],"6-45-8":[27.1,2229.6],"6-45-9":[22.31,1280.25],"5-22-4":[17.35,2229.6],"6-45-10":[19.37,59.8],"6-45-11":[16.17,52.29],"5-22-5":[7.84,59.8],"6-45-12":[14.52,48.25],"6-45-13":[12.67,43.66],"5-22-6":[-20.3,486.61],"6-45-14":[-9.6,301],"6-45-15":[-18.2,337.49],"5-22-7":[-18.2,577.05],"6-45-16":[-9.43,30.39],"6-45-17":[-20.11,6.02],"5-22-8":[-39.16,30.39],"6-45-18":[-27.17,-1.97],"6-45-19":[-40.58,-6.64],"5-22-9":[-56.94,-1.97],"6-45-20":[-50.81,-12.66],"6-45-21":[-62.29,-18.14],"5-22-10":[-77.89,-12.66],"6-45-22":[-68.68,-23.39],"6-45-23":[-75.93,-27.38],"5-22-11":[-89.27,-23.39],"6-45-24":[-80.15,-31.4],"6-45-25":[-85.3,-34.94],"5-22-12":[-96.71,-31.4],"6-45-26":[-89.68,-37.87],"6-45-27":[-90.85,-41.31],"5-22-13":[-98.96,-37.87],"6-45-28":[-90.85,-40.13],"6-45-29":[-87.64,-32.13],"5-22-14":[-95.18,14.37],"6-45-30":[-71.92,795.54],"6-45-31":[-78.81,615.02],"5-22-15":[-78.81,1030.82],"6-45-32":[-60.65,667.42],"6-45-33":[-29.07,524.34],"5-22-16":[-68.02,823.15],"6-45-34":[114.46,806.95],"6-45-35":[140.16,772.15],"5-22-17":[67.74,806.95],"6-45-36":[148.33,508.2],"6-45-37":[188.03,1020.26],"5-22-18":[103.13,1020.26],"6-45-38":[279.54,1043.99],"6-45-39":[226.83,630.24],"5-22-19":[86.09,1043.99],"6-45-40":[218.51,1344.63],"6-45-41":[192.34,1399.29],"5-22-20":[70.48,1399.29],"6-45-42":[-18.16,1093.19],"6-45-43":[-20.19,529.24],"5-22-21":[-20.19,1093.19],"6-45-44":[-0.71,38.77],"6-45-45":[-4.23,9.67],"5-22-22":[-15.03,526.4],"6-45-46":[-4.6,2.28],"6-45-47":[-5.77,-0.34],"5-22-23":[-5.77,22.2],"6-45-48":[-6.99,-0.02],"6-45-49":[-2.71,15],"5-22-24":[-6.99,20.82],"6-45-50":[5.01,17.57],"6-45-51":[6.24,35.37],"5-22-25":[4.37,37.14],"6-45-52":[17.75,40.41],"6-45-53":[20.22,47.29],"5-22-26":[17.75,1523.88],"6-45-54":[13.66,45.08],"6-45-55":[7.53,29.37],"5-22-27":[7.53,578.59],"6-45-56":[-1.7,15.36],"6-45-57":[-5.7,-0.8],"5-22-28":[-9.33,22.22],"6-45-58":[-21.59,-2.49],"6-45-59":[-34.95,-11.26],"5-22-29":[-35.85,-2.49],"6-45-60":[-51.02,354.31],"6-45-61":[-49.77,1979.94],"5-22-30":[-51.02,1979.94],"6-45-62":[1259.39,2275.47],"6-45-63":[-29.54,2745.48],"5-22-31":[-29.54,2745.48],"6-46-0":[13.6,38.72],"6-46-1":[19.71,46.42],"6-46-2":[19.83,660.34],"6-46-3":[405.24,2285.51],"6-46-4":[1894.84,2457.14],"6-46-5":[1860.54,2475.02],"6-46-6":[29.19,2542.84],"6-46-7":[26.42,1831.68],"6-46-8":[29.81,2027.72],"6-46-9":[29.48,2175.1],"6-46-10":[26.25,1494.43],"6-46-11":[24.84,68.28],"6-46-12":[21.59,63.25],"6-46-13":[21.59,55.81],"6-46-14":[17.39,52.22],"6-46-15":[15.17,53.92],"6-46-16":[5.41,41.06],"6-46-17":[-3.66,21.16],"6-46-18":[-11.78,10.12],"6-46-19":[-24.71,1.96],"6-46-20":[-35.15,-2.52],"6-46-21":[-46.25,-7.81],"6-46-22":[-53.6,-12.92],"6-46-23":[-62.78,-17.62],"6-46-24":[-68.86,-22.4],"6-46-25":[-75.75,-26.93],"6-46-26":[-82.25,-30.53],"6-46-27":[-86.6,-34.57],"6-46-28":[-87.21,-38.79],"6-46-29":[-85.59,-35.95],"6-46-30":[-76.08,-28.51],"6-46-31":[-60.98,35.72],"6-46-32":[-80.07,69.74],"6-46-33":[-95.49,521.39],"6-46-34":[51.02,882.74],"6-46-35":[105.36,737.91],"6-46-36":[127.52,1154.07],"6-46-37":[227.19,1475.44],"6-46-38":[312.64,1034.42],"6-46-39":[301.73,1075.16],"6-46-40":[-51.68,1855.39],"6-46-41":[-37.26,1825.17],"6-46-42":[-24.64,1827.75],"6-46-43":[-6.23,13.98],"6-46-44":[-9.69,10.93],"6-46-45":[-8.47,-0.7],"6-46-46":[-8.58,-1.87],"6-46-47":[-7.32,-2.14],"6-46-48":[-8.38,-2.22],"6-46-49":[-4.74,9.5],"6-46-50":[1.02,14.82],"6-46-51":[8.24,36.85],"6-46-52":[18.32,40.45],"6-46-53":[18.15,42.54],"6-46-54":[13.5,40.62],"6-46-55":[8,27.69],"6-46-56":[-0.82,15.99],"6-46-57":[-4.02,0.15],"6-46-58":[-20.54,-1.51],"6-46-59":[-34.25,437.71],"6-46-60":[-50.27,631.96],"6-46-61":[-48.16,1965.25],"6-46-62":[1373.28,2268.09],"6-46-63":[-29.54,2745.48],"6-47-0":[13.6,37.99],"6-47-1":[19.55,47.53],"5-23-0":[13.6,47.53],"6-47-2":[20.29,700.91],"6-47-3":[443.21,2373.94],"5-23-1":[19.83,2373.94],"4-11-0":[13.6,2373.94],"6-47-4":[2285.5,2625.24],"6-47-5":[2286.78,2882.05],"5-23-2":[1860.54,2882.05],"6-47-6":[1707.24,2840.8],"6-47-7":[1101.27,2476.32],"5-23-3":[26.42,2840.8],"4-11-1":[22.92,2882.05],"3-5-0":[0.08,2882.05],"6-47-8":[1301.32,2769.8],"6-47-9":[1356.57,2769.95],"5-23-4":[29.48,2769.95],"6-47-10":[33.06,2452.69],"6-47-11":[31.62,81.26],"5-23-5":[24.84,2452.69],"4-11-2":[7.84,2769.95],"6-47-12":[29.54,78.26],"6-47-13":[24.7,72.82],"5-23-6":[21.59,78.26],"6-47-14":[23.65,69.47],"6-47-15":[21.38,70.1],"5-23-7":[15.17,70.1],"4-11-3":[-20.3,577.05],"3-5-1":[-62.23,2769.95],"2-2-0":[-97.86,2882.05],"6-47-16":[13.6,55.71],"6-47-17":[5.96,40.64],"5-23-8":[-3.66,55.71],"6-47-18":[1.95,29.54],"6-47-19":[-2.64,22.06],"5-23-9":[-24.71,29.54],"4-11-4":[-56.94,55.71],"6-47-20":[-11.83,15.19],"6-47-21":[-23.15,4.78],"5-23-10":[-46.25,15.19],"6-47-22":[-31.32,-2.17],"6-47-23":[-42.51,-7.52],"5-23-11":[-62.78,-2.17],"4-11-5":[-89.27,15.19],"3-5-2":[-105.57,269.07],"6-47-24":[-50.68,-13.69],"6-47-25":[-59.08,-19.14],"5-23-12":[-75.75,-13.69],"6-47-26":[-65.46,-24.58],"6-47-27":[-76.9,-25.66],"5-23-13":[-86.6,-24.58],"4-11-6":[-98.96,-13.69],"6-47-28":[-76.9,-30.33],"6-47-29":[-77.77,-32.04],"5-23-14":[-87.21,-30.33],"6-47-30":[-72.57,-28.65],"6-47-31":[-64.4,-23.15],"5-23-15":[-76.08,35.72],"4-11-7":[-95.18,1030.82],"3-5-3":[-149.21,2826.62],"2-2-1":[-328.06,5809.48],"6-47-32":[-64.98,198.92],"6-47-33":[-52.12,442.32],"5-23-16":[-95.49,521.39],"6-47-34":[64.01,663.07],"6-47-35":[165.38,868.81],"5-23-17":[51.02,882.74],"4-11-8":[-95.49,882.74],"6-47-36":[242.55,1657.87],"6-47-37":[397.4,1576.13],"5-23-18":[127.52,1657.87],"6-47-38":[443.95,1269.93],"6-47-39":[482.05,2353.32],"5-23-19":[301.73,2353.32],"4-11-9":[86.09,2353.32],"3-5-4":[-95.49,6050.05],"6-47-40":[-47.11,2413.32],"6-47-41":[-19.83,2.39],"5-23-20":[-51.68,2413.32],"6-47-42":[-16.52,2.77],"6-47-43":[-15,-2.9],"5-23-21":[-24.64,1827.75],"4-11-10":[-51.68,2413.32],"6-47-44":[-12.7,-3.31],"6-47-45":[-12.43,-4],"5-23-22":[-12.7,10.93],"6-47-46":[-12.93,-3],"6-47-47":[-9.68,-2.76],"5-23-23":[-12.93,-1.87],"4-11-11":[-15.03,526.4],"3-5-5":[-102.43,6388.87],"2-2-2":[-123.53,6969.13],"6-47-48":[-7.97,-2.42],"6-47-49":[-5.09,12.36],"5-23-24":[-8.38,12.36],"6-47-50":[0.94,19.2],"6-47-51":[9.93,36.67],"5-23-25":[0.94,36.85],"4-11-12":[-8.38,37.14],"6-47-52":[18.32,42.39],"6-47-53":[18.15,853.58],"5-23-26":[18.15,853.58],"6-47-54":[14.52,46.03],"6-47-55":[8,29.24],"5-23-27":[8,46.03],"4-11-13":[7.53,1523.88],"3-5-6":[-32.01,2255.29],"6-47-56":[0.14,16.45],"6-47-57":[-4.25,0.82],"5-23-28":[-4.25,16.45],"6-47-58":[-18.57,-1.51],"6-47-59":[-29.56,457.63],"5-23-29":[-34.25,457.63],"4-11-14":[-35.85,457.63],"6-47-60":[-47.37,731.02],"6-47-61":[-47.53,1373.29],"5-23-30":[-50.27,1965.25],"6-47-62":[1353.9,2263.16],"6-47-63":[-29.54,2745.98],"5-23-31":[-29.54,2745.98],"4-11-15":[-51.02,2745.98],"3-5-7":[-53.09,2890.49],"2-2-3":[-269.44,4721.94],"6-48-0":[13.6,37.61],"6-48-1":[19.52,48.06],"6-48-2":[23.04,949.4],"6-48-3":[418.15,2469.75],"6-48-4":[2373.93,2812.59],"6-48-5":[2625.23,3024.06],"6-48-6":[2476.31,3047.68],"6-48-7":[2357.41,2826.07],"6-48-8":[1710.88,2785.17],"6-48-9":[45.47,2833.9],"6-48-10":[-226.59,2803.26],"6-48-11":[39.09,92.57],"6-48-12":[36.79,90.15],"6-48-13":[33.05,85.22],"6-48-14":[32.05,78.86],"6-48-15":[27.85,72.39],"6-48-16":[21.23,65.89],"6-48-17":[15.6,54.55],"6-48-18":[11.42,45.38],"6-48-19":[8.36,39.31],"6-48-20":[2.88,32.2],"6-48-21":[-3.8,23.36],"6-48-22":[-13.7,10.3],"6-48-23":[-26.69,-1.49],"6-48-24":[-36.66,-9.03],"6-48-25":[-48.75,-14.66],"6-48-26":[-52.31,-19.6],"6-48-27":[-60.66,-21.73],"6-48-28":[-65.09,-22.59],"6-48-29":[-65.14,-24.57],"6-48-30":[-64.07,-23.02],"6-48-31":[-58.56,-22.33],"6-48-32":[-70.5,80.25],"6-48-33":[-60.53,366.28],"6-48-34":[46.82,588.21],"6-48-35":[175.94,1298.57],"6-48-36":[374.95,1756.49],"6-48-37":[264.86,1788.77],"6-48-38":[158.3,2047.81],"6-48-39":[-0.94,2789.25],"6-48-40":[-170.49,2060.99],"6-48-41":[-22.35,-6.95],"6-48-42":[-21.25,-7.27],"6-48-43":[-16.43,-5.74],"6-48-44":[-15.08,-5.85],"6-48-45":[-14.74,-5.73],"6-48-46":[-15.44,-5.21],"6-48-47":[-14.07,-3.49],"6-48-48":[-9.34,-1.35],"6-48-49":[-3.65,16.97],"6-48-50":[3.91,17.53],"6-48-51":[9.5,35.69],"6-48-52":[17.4,41.28],"6-48-53":[19.29,277.84],"6-48-54":[14.49,46.03],"6-48-55":[8.34,28.56],"6-48-56":[0.81,16.97],"6-48-57":[-6.67,1.37],"6-48-58":[-16.22,-2.35],"6-48-59":[-31.72,213.73],"6-48-60":[-45.8,701.38],"6-48-61":[-47.53,1548.87],"6-48-62":[1362.57,2265.71],"6-48-63":[-29.54,2746.48],"6-49-0":[13.6,37.46],"6-49-1":[19.53,48.73],"5-24-0":[13.6,48.73],"6-49-2":[24.05,1459.96],"6-49-3":[919.34,2462.17],"5-24-1":[23.04,2469.75],"6-49-4":[2354.99,2812.59],"6-49-5":[2629.11,3141.21],"5-24-2":[2354.99,3141.21],"6-49-6":[2784.52,3182.09],"6-49-7":[2634.56,3042.62],"5-24-3":[2357.41,3182.09],"6-49-8":[44.4,2652.87],"6-49-9":[44.54,2012.55],"5-24-4":[44.4,2833.9],"6-49-10":[46.28,334.77],"6-49-11":[44.97,101.28],"5-24-5":[-226.59,2803.26],"6-49-12":[43.91,102],"6-49-13":[40.13,98.24],"5-24-6":[33.05,102],"6-49-14":[36.75,93.09],"6-49-15":[33.71,86.06],"5-24-7":[27.85,93.09],"6-49-16":[28.95,81.48],"6-49-17":[23.81,73.88],"5-24-8":[15.6,81.48],"6-49-18":[21.4,66.2],"6-49-19":[17.36,60.53],"5-24-9":[8.36,66.2],"6-49-20":[13.7,55.5],"6-49-21":[5.84,39.04],"5-24-10":[-3.8,55.5],"6-49-22":[-1.5,22.35],"6-49-23":[-16.89,4.59],"5-24-11":[-26.69,22.35],"6-49-24":[-26.78,-4.39],"6-49-25":[-37.71,-9.55],"5-24-12":[-48.75,-4.39],"6-49-26":[-42.33,-13.76],"6-49-27":[-43.85,-16.48],"5-24-13":[-60.66,-13.76],"6-49-28":[-45.31,-15.23],"6-49-29":[-49.21,-15.42],"5-24-14":[-65.14,-15.23],"6-49-30":[-47.15,-16.29],"6-49-31":[-46.81,-15.86],"5-24-15":[-64.07,-15.86],"6-49-32":[-46.81,79.72],"6-49-33":[-74.23,1125.05],"5-24-16":[-74.23,1125.05],"6-49-34":[53.15,966.21],"6-49-35":[149.22,1272.47],"5-24-17":[46.82,1298.57],"6-49-36":[99.05,2017.31],"6-49-37":[0.38,1423.16],"5-24-18":[0.38,2017.31],"6-49-38":[-51.4,1567.33],"6-49-39":[-41.56,2863.35],"5-24-19":[-51.4,2863.35],"6-49-40":[-24.02,694.74],"6-49-41":[-23.57,-9.82],"5-24-20":[-170.49,2060.99],"6-49-42":[-21.49,-7.66],"6-49-43":[-17.46,-7.18],"5-24-21":[-21.49,-5.74],"6-49-44":[-15.24,-6.72],"6-49-45":[-14.63,-6.41],"5-24-22":[-15.24,-5.73],"6-49-46":[-15.67,-6.33],"6-49-47":[-14.71,-4.79],"5-24-23":[-15.67,-3.49],"6-49-48":[-10.04,-0.71],"6-49-49":[-1.58,15],"5-24-24":[-10.04,16.97],"6-49-50":[3.4,15.14],"6-49-51":[6.24,37.34],"5-24-25":[3.4,37.34],"6-49-52":[17.4,40.03],"6-49-53":[19.24,44.9],"5-24-26":[17.4,277.84],"6-49-54":[14.63,42.23],"6-49-55":[8.34,28.46],"5-24-27":[8.34,46.03],"6-49-56":[1.36,16.69],"6-49-57":[-9.07,1.88],"5-24-28":[-9.07,16.97],"6-49-58":[-13.8,-3.51],"6-49-59":[-31.95,-7.78],"5-24-29":[-31.95,213.73],"6-49-60":[-42.5,467.1],"6-49-61":[-22.1,1679.35],"5-24-30":[-47.53,1679.35],"6-49-62":[1548.86,2265.71],"6-49-63":[-29.54,2746.48],"5-24-31":[-29.54,2746.48],"6-50-0":[13.6,37.63],"6-50-1":[19.61,49.96],"6-50-2":[24.84,1457.67],"6-50-3":[1097.61,2355],"6-50-4":[2249.23,2629.12],"6-50-5":[2558.1,3200.74],"6-50-6":[3042.61,3253.39],"6-50-7":[2639.66,3209.33],"6-50-8":[45.07,3108.37],"6-50-9":[45.74,106.81],"6-50-10":[49.27,105.78],"6-50-11":[49.5,111.91],"6-50-12":[49.85,112.69],"6-50-13":[46.54,108.32],"6-50-14":[43.24,103.27],"6-50-15":[40.73,96.8],"6-50-16":[37.48,93],"6-50-17":[33.1,87.83],"6-50-18":[30.85,80.4],"6-50-19":[27.75,76.44],"6-50-20":[20.59,68.85],"6-50-21":[12.03,47.85],"6-50-22":[3.31,31.01],"6-50-23":[-8.2,12.45],"6-50-24":[-17.97,2.19],"6-50-25":[-27.35,-2.98],"6-50-26":[-32.47,-5.75],"6-50-27":[-35.27,-10.36],"6-50-28":[-34.69,-9.18],"6-50-29":[-34.54,-8.11],"6-50-30":[-34.03,-8.32],"6-50-31":[-34.84,-8.32],"6-50-32":[-34.84,-10.92],"6-50-33":[-44.76,1106.52],"6-50-34":[4.53,1190.32],"6-50-35":[-49.15,1083.8],"6-50-36":[-42.94,626.82],"6-50-37":[-28.08,986.18],"6-50-38":[-23.73,124.34],"6-50-39":[-23.06,-5.86],"6-50-40":[-23.22,-8.26],"6-50-41":[-22.24,-6.03],"6-50-42":[-20.02,-1.95],"6-50-43":[-15.06,-2.36],"6-50-44":[-14.73,-4.64],"6-50-45":[-13.41,-4.06],"6-50-46":[-13.54,-3.83],"6-50-47":[-13.35,-3.1],"6-50-48":[-9.2,0.55],"6-50-49":[-0.72,12.98],"6-50-50":[2.9,23.35],"6-50-51":[-44.49,2738.7],"6-50-52":[19.49,41.64],"6-50-53":[20.4,44],"6-50-54":[14.13,41.06],"6-50-55":[7.93,28.3],"6-50-56":[1.73,16.49],"6-50-57":[-9.57,2.54],"6-50-58":[-12.44,-2.31],"6-50-59":[-30.93,-7.27],"6-50-60":[-38.74,776.2],"6-50-61":[467.09,1715.15],"6-50-62":[1679.34,2262.46],"6-50-63":[-29.54,2746.48],"6-51-0":[13.6,37.87],"6-51-1":[19.71,51.91],"5-25-0":[13.6,51.91],"6-51-2":[25.09,1225.55],"6-51-3":[563.18,2251.74],"5-25-1":[24.84,2355],"4-12-0":[13.6,2469.75],"6-51-4":[2064.18,2558.11],"6-51-5":[2479.15,3116.18],"5-25-2":[2064.18,3200.74],"6-51-6":[2863.3,3190.72],"6-51-7":[842.84,3318.44],"5-25-3":[842.84,3318.44],"4-12-1":[842.84,3318.44],"6-51-8":[51.79,2952.11],"6-51-9":[51.81,111.55],"5-25-4":[45.07,3108.37],"6-51-10":[52.28,118.01],"6-51-11":[54.03,122.71],"5-25-5":[49.27,122.71],"4-12-2":[-226.59,3108.37],"6-51-12":[56.06,122.31],"6-51-13":[52.06,118.71],"5-25-6":[46.54,122.31],"6-51-14":[49.47,113.3],"6-51-15":[47.29,108.7],"5-25-7":[40.73,113.3],"4-12-3":[27.85,122.31],"6-51-16":[45.13,107.59],"6-51-17":[41.29,102.26],"5-25-8":[33.1,107.59],"6-51-18":[39.59,98.78],"6-51-19":[34.86,94.27],"5-25-9":[27.75,98.78],"4-12-4":[8.36,107.59],"6-51-20":[25.6,77.17],"6-51-21":[16.22,56.25],"5-25-10":[12.03,77.17],"6-51-22":[7.85,41.92],"6-51-23":[2.04,22.97],"5-25-11":[-8.2,41.92],"4-12-5":[-26.69,77.17],"6-51-24":[-2.99,19.11],"6-51-25":[-9.54,11.37],"5-25-12":[-27.35,19.11],"6-51-26":[-18.24,4.22],"6-51-27":[-22.86,-3.86],"5-25-13":[-35.27,4.22],"4-12-6":[-60.66,19.11],"6-51-28":[-21.86,-3.45],"6-51-29":[-16.16,0.32],"5-25-14":[-34.69,0.32],"6-51-30":[-15.02,0.32],"6-51-31":[-23.52,-1.06],"5-25-15":[-34.84,0.32],"4-12-7":[-65.14,0.32],"6-51-32":[-24.99,-5.27],"6-51-33":[-25.2,315.67],"5-25-16":[-44.76,1106.52],"6-51-34":[-43.64,1194.05],"6-51-35":[-34.81,1027.17],"5-25-17":[-49.15,1194.05],"4-12-8":[-74.23,1298.57],"6-51-36":[-25.89,-9.5],"6-51-37":[-26.03,-8.12],"5-25-18":[-42.94,986.18],"6-51-38":[-21.09,-6.58],"6-51-39":[-20.12,-3.54],"5-25-19":[-23.73,124.34],"4-12-9":[-51.4,2863.35],"6-51-40":[-17.91,-6.14],"6-51-41":[-15.72,-2.7],"5-25-20":[-23.22,-2.7],"6-51-42":[-11.25,4.88],"6-51-43":[-8.51,4.82],"5-25-21":[-20.02,4.88],"4-12-10":[-170.49,2060.99],"6-51-44":[-8.8,-0.42],"6-51-45":[-8.93,-0.49],"5-25-22":[-14.73,-0.42],"6-51-46":[-7.5,-0.3],"6-51-47":[-7.21,0.52],"5-25-23":[-13.54,0.52],"4-12-11":[-15.67,0.52],"6-51-48":[-5.84,5.1],"6-51-49":[0.54,16.37],"5-25-24":[-9.2,16.37],"6-51-50":[6.57,28.17],"6-51-51":[0.07,2916.19],"5-25-25":[-44.49,2916.19],"4-12-12":[-44.49,2916.19],"6-51-52":[19.49,44.42],"6-51-53":[20.67,45.57],"5-25-26":[19.49,45.57],"6-51-54":[13.2,41.85],"6-51-55":[7.93,27.24],"5-25-27":[7.93,41.85],"4-12-13":[7.93,277.84],"6-51-56":[1.43,15.82],"6-51-57":[-8.96,2.59],"5-25-28":[-9.57,16.49],"6-51-58":[-10.69,-0.69],"6-51-59":[-26.21,682.83],"5-25-29":[-30.93,682.83],"4-12-14":[-31.95,682.83],"6-51-60":[-38.69,818.98],"6-51-61":[776.19,1785.3],"5-25-30":[-38.74,1785.3],"6-51-62":[1715.14,2257.85],"6-51-63":[-29.54,2746.48],"5-25-31":[-29.54,2746.48],"4-12-15":[-47.53,2746.48],"6-52-0":[13.6,38],"6-52-1":[19.75,52.83],"6-52-2":[26.3,1141.68],"6-52-3":[39.31,2076.74],"6-52-4":[1811.24,2521.51],"6-52-5":[2242.7,2887.36],"6-52-6":[2056.01,3023.83],"6-52-7":[55.87,3002.57],"6-52-8":[54.97,1206.68],"6-52-9":[54.3,120.01],"6-52-10":[55.78,125.87],"6-52-11":[59.31,126.28],"6-52-12":[59.58,122.56],"6-52-13":[56.65,121.98],"6-52-14":[54.49,120.69],"6-52-15":[53.73,118.59],"6-52-16":[51.45,117.92],"6-52-17":[49.39,956.08],"6-52-18":[47.13,292.1],"6-52-19":[38.59,98.45],"6-52-20":[29.29,80.32],"6-52-21":[22.35,62.32],"6-52-22":[12.18,49.65],"6-52-23":[9.78,32.21],"6-52-24":[6.18,30.74],"6-52-25":[2.46,27.03],"6-52-26":[-6.88,18.42],"6-52-27":[-11.61,3.79],"6-52-28":[-11.61,1.81],"6-52-29":[-6.04,9.77],"6-52-30":[-1.63,10.1],"6-52-31":[-11.81,9.72],"6-52-32":[-15.72,1.12],"6-52-33":[-24.61,236.48],"6-52-34":[-22.93,-6.99],"6-52-35":[-23.03,-9.64],"6-52-36":[-21.93,-7.29],"6-52-37":[-18.49,-6.71],"6-52-38":[-16.29,-5.18],"6-52-39":[-15.68,-4.33],"6-52-40":[-15.61,-5.17],"6-52-41":[-11.29,0.3],"6-52-42":[-4.72,5.27],"6-52-43":[-1.14,6.16],"6-52-44":[-1.59,8.81],"6-52-45":[-1.75,7.35],"6-52-46":[-1.79,8.03],"6-52-47":[-1.07,9.11],"6-52-48":[0.32,11.62],"6-52-49":[3.14,20.83],"6-52-50":[10.63,31.49],"6-52-51":[8.47,44.15],"6-52-52":[20.98,48.11],"6-52-53":[20.05,47.57],"6-52-54":[12.4,39.99],"6-52-55":[6.84,24.84],"6-52-56":[1.3,15.07],"6-52-57":[-6.52,2.36],"6-52-58":[-10.53,-0.06],"6-52-59":[-21.87,1124.55],"6-52-60":[-37.76,910.74],"6-52-61":[818.39,1887.29],"6-52-62":[1785.29,2271.2],"6-52-63":[-29.54,2746.48],"6-53-0":[13.6,38.04],"6-53-1":[19.67,53.58],"5-26-0":[13.6,53.58],"6-53-2":[26.45,988.3],"6-53-3":[357.17,1866.38],"5-26-1":[26.3,2076.74],"6-53-4":[1590.54,2511.91],"6-53-5":[1504.88,2633.93],"5-26-2":[1504.88,2887.36],"6-53-6":[50.54,2633.93],"6-53-7":[54.99,3982.86],"5-26-3":[50.54,3982.86],"6-53-8":[57.33,121.21],"6-53-9":[57.33,128.08],"5-26-4":[54.3,1206.68],"6-53-10":[60.52,129.5],"6-53-11":[60.77,127.45],"5-26-5":[55.78,129.5],"6-53-12":[59.99,122.28],"6-53-13":[59.83,127.23],"5-26-6":[56.65,127.23],"6-53-14":[60.04,129.8],"6-53-15":[59.64,129.69],"5-26-7":[53.73,129.8],"6-53-16":[58.28,129.28],"6-53-17":[56.51,123.07],"5-26-8":[49.39,956.08],"6-53-18":[49.22,2346.09],"6-53-19":[40.38,100.63],"5-26-9":[38.59,2346.09],"6-53-20":[31.82,83.95],"6-53-21":[25.24,69.72],"5-26-10":[22.35,83.95],"6-53-22":[17.36,52.25],"6-53-23":[15.16,40.62],"5-26-11":[9.78,52.25],"6-53-24":[15.01,37.08],"6-53-25":[10.17,36.9],"5-26-12":[2.46,37.08],"6-53-26":[3.36,31.78],"6-53-27":[0.38,19.03],"5-26-13":[-11.61,31.78],"6-53-28":[0.23,13.16],"6-53-29":[1.8,18.26],"5-26-14":[-11.61,18.26],"6-53-30":[5.2,18.06],"6-53-31":[0.58,16.65],"5-26-15":[-11.81,18.06],"6-53-32":[-9.18,11.61],"6-53-33":[-14,-1.77],"5-26-16":[-24.61,236.48],"6-53-34":[-21.18,-5.37],"6-53-35":[-21.12,-7.87],"5-26-17":[-23.03,-5.37],"6-53-36":[-19.03,-7.1],"6-53-37":[-14.64,-6.55],"5-26-18":[-21.93,-6.55],"6-53-38":[-14.32,-5.31],"6-53-39":[-22.84,584.18],"5-26-19":[-22.84,584.18],"6-53-40":[-12.77,-3.59],"6-53-41":[-8.93,2.46],"5-26-20":[-15.61,2.46],"6-53-42":[0.26,10.35],"6-53-43":[2.82,13.56],"5-26-21":[-4.72,13.56],"6-53-44":[2.99,18.1],"6-53-45":[3.74,19.28],"5-26-22":[-1.75,19.28],"6-53-46":[4.18,19.28],"6-53-47":[4.92,20.12],"5-26-23":[-1.79,20.12],"6-53-48":[4.93,21.48],"6-53-49":[6.89,25.29],"5-26-24":[0.32,25.29],"6-53-50":[10.63,32.32],"6-53-51":[8.47,44.34],"5-26-25":[8.47,44.34],"6-53-52":[22.07,48.37],"6-53-53":[20.05,48.14],"5-26-26":[20.05,48.37],"6-53-54":[11.81,40.04],"6-53-55":[6.84,22.99],"5-26-27":[6.84,40.04],"6-53-56":[1.22,13.57],"6-53-57":[-4.92,1.98],"5-26-28":[-6.52,15.07],"6-53-58":[-10.25,-0.09],"6-53-59":[-16.53,1294.14],"5-26-29":[-21.87,1294.14],"6-53-60":[-35.54,1634.18],"6-53-61":[910.73,1960.78],"5-26-30":[-37.76,1960.78],"6-53-62":[1887.28,2301.31],"6-53-63":[-29.54,2746.48],"5-26-31":[-29.54,2746.48],"6-54-0":[13.6,38.03],"6-54-1":[19.6,54.55],"6-54-2":[26.58,989.93],"6-54-3":[31.94,1631.63],"6-54-4":[1236.12,2416.2],"6-54-5":[47.32,2217.34],"6-54-6":[48.05,2458.39],"6-54-7":[54.4,2560.61],"6-54-8":[59.36,127.95],"6-54-9":[61.22,130.4],"6-54-10":[62.35,130.18],"6-54-11":[60.84,126.55],"6-54-12":[60.65,122.78],"6-54-13":[60.63,127.15],"6-54-14":[62.98,131.06],"6-54-15":[64.62,132.17],"6-54-16":[60.84,129.76],"6-54-17":[57.33,122.83],"6-54-18":[41.12,1086.32],"6-54-19":[38.34,100.89],"6-54-20":[31.04,82.99],"6-54-21":[26.81,66.49],"6-54-22":[21.12,53.95],"6-54-23":[17.1,42.86],"6-54-24":[18.44,45.39],"6-54-25":[15.88,1434.62],"6-54-26":[10.32,41.69],"6-54-27":[7.13,30.03],"6-54-28":[6.53,22.91],"6-54-29":[6.71,23.82],"6-54-30":[8.3,22.61],"6-54-31":[6.31,20.6],"6-54-32":[-2.33,18.27],"6-54-33":[-10.41,1.49],"6-54-34":[-15.53,-1.98],"6-54-35":[-16.6,-5.32],"6-54-36":[-16.29,-6.18],"6-54-37":[-15.52,-6.1],"6-54-38":[-15.32,-6.3],"6-54-39":[-13.65,-5.14],"6-54-40":[-12.51,-0.74],"6-54-41":[-6.03,5.66],"6-54-42":[1.39,12.5],"6-54-43":[4.87,19.2],"6-54-44":[7.12,24.93],"6-54-45":[8.92,26.98],"6-54-46":[9.52,27.23],"6-54-47":[9.52,28],"6-54-48":[10.95,28.86],"6-54-49":[10.95,32.39],"6-54-50":[15.14,35.56],"6-54-51":[2.7,43.39],"6-54-52":[3.95,1349.09],"6-54-53":[10.78,1035.34],"6-54-54":[10.99,38.39],"6-54-55":[6.04,21.85],"6-54-56":[1.32,12.69],"6-54-57":[-4.19,2.98],"6-54-58":[-8.55,102.38],"6-54-59":[-11.49,1507.45],"6-54-60":[282.95,1787.39],"6-54-61":[1151.7,2012.99],"6-54-62":[1960.77,2336.23],"6-54-63":[-29.54,2746.48],"6-55-0":[13.6,37.95],"6-55-1":[19.57,55.69],"5-27-0":[13.6,55.69],"6-55-2":[26.3,766.89],"6-55-3":[31.3,1410.95],"5-27-1":[26.3,1631.63],"4-13-0":[13.6,2076.74],"6-55-4":[33.45,2030.68],"6-55-5":[42.85,2071.97],"5-27-2":[33.45,2416.2],"6-55-6":[49.24,2327.64],"6-55-7":[55.03,1988.61],"5-27-3":[48.05,2560.61],"4-13-1":[33.45,3982.86],"3-6-0":[13.6,3982.86],"6-55-8":[59.61,1471.32],"6-55-9":[64.12,194.14],"5-27-4":[59.36,1471.32],"6-55-10":[60.83,129.91],"6-55-11":[60.83,126.1],"5-27-5":[60.83,130.18],"4-13-2":[54.3,1471.32],"6-55-12":[59.88,126.1],"6-55-13":[60,126.13],"5-27-6":[59.88,127.15],"6-55-14":[62.57,129.01],"6-55-15":[62.57,131.88],"5-27-7":[62.57,132.17],"4-13-3":[53.73,132.17],"3-6-1":[-226.59,3108.37],"6-55-16":[59.45,129.91],"6-55-17":[53.56,120.26],"5-27-8":[53.56,129.91],"6-55-18":[41.9,1131.62],"6-55-19":[36.6,100.95],"5-27-9":[36.6,1131.62],"4-13-4":[36.6,2346.09],"6-55-20":[30.32,76.17],"6-55-21":[26.98,63.94],"5-27-10":[26.81,82.99],"6-55-22":[22.3,55.85],"6-55-23":[20.15,50.59],"5-27-11":[17.1,55.85],"4-13-5":[9.78,83.95],"3-6-2":[-26.69,2346.09],"6-55-24":[19.98,51.75],"6-55-25":[2.58,2003.8],"5-27-12":[2.58,2003.8],"6-55-26":[-31.78,2815.55],"6-55-27":[12.13,37.39],"5-27-13":[-31.78,2815.55],"4-13-6":[-31.78,2815.55],"6-55-28":[11.03,31.14],"6-55-29":[11.25,32.89],"5-27-14":[6.53,32.89],"6-55-30":[10.59,30.93],"6-55-31":[9.61,23.87],"5-27-15":[6.31,30.93],"4-13-7":[-11.81,32.89],"3-6-3":[-65.14,2815.55],"6-55-32":[1.48,20.71],"6-55-33":[-3.02,8.19],"5-27-16":[-10.41,20.71],"6-55-34":[-9.54,4],"6-55-35":[-12.07,-1.23],"5-27-17":[-16.6,4],"4-13-8":[-24.61,236.48],"6-55-36":[-12.66,-2.77],"6-55-37":[-14.13,-3.24],"5-27-18":[-16.29,-2.77],"6-55-38":[-14.42,-3.25],"6-55-39":[-12.99,-2.51],"5-27-19":[-15.32,-2.51],"4-13-9":[-22.84,584.18],"3-6-4":[-74.23,2863.35],"6-55-40":[-10.22,3.34],"6-55-41":[-0.75,11.75],"5-27-20":[-12.51,11.75],"6-55-42":[3.17,18.07],"6-55-43":[7.05,25.53],"5-27-21":[1.39,25.53],"4-13-10":[-15.61,25.53],"6-55-44":[9.9,32.41],"6-55-45":[13.07,35.35],"5-27-22":[7.12,35.35],"6-55-46":[13.58,36.95],"6-55-47":[13.63,36.98],"5-27-23":[9.52,36.98],"4-13-11":[-1.79,36.98],"3-6-5":[-170.49,2060.99],"6-55-48":[14.16,36.96],"6-55-49":[14.19,37.24],"5-27-24":[10.95,37.24],"6-55-50":[16.34,39.76],"6-55-51":[3.61,42.27],"5-27-25":[2.7,43.39],"4-13-12":[0.32,44.34],"6-55-52":[3.95,37.89],"6-55-53":[9.63,38.97],"5-27-26":[3.95,1349.09],"6-55-54":[10.3,35.96],"6-55-55":[6.04,20.47],"5-27-27":[6.04,38.39],"4-13-13":[3.95,1349.09],"3-6-6":[-44.49,2916.19],"6-55-56":[1.74,12.02],"6-55-57":[-4.2,3.22],"5-27-28":[-4.2,12.69],"6-55-58":[-6.28,557.2],"6-55-59":[102.37,1604.48],"5-27-29":[-11.49,1604.48],"4-13-14":[-21.87,1604.48],"6-55-60":[378.53,1737.31],"6-55-61":[1187.19,2103.65],"5-27-30":[282.95,2103.65],"6-55-62":[2012.98,2360.08],"6-55-63":[-29.54,2746.48],"5-27-31":[-29.54,2746.48],"4-13-15":[-37.76,2746.48],"3-6-7":[-47.53,2746.48],"6-56-0":[13.6,37.87],"6-56-1":[19.57,55.73],"6-56-2":[25.75,654.04],"6-56-3":[28.03,1529.13],"6-56-4":[28.03,995.54],"6-56-5":[38.36,1653.87],"6-56-6":[49.95,1002],"6-56-7":[55.4,671.1],"6-56-8":[61.97,1784.7],"6-56-9":[62.67,1475.57],"6-56-10":[60.06,128.25],"6-56-11":[60.24,126.29],"6-56-12":[59.56,126.29],"6-56-13":[59.86,126.21],"6-56-14":[61.49,126.55],"6-56-15":[60.3,127.18],"6-56-16":[56.77,126.5],"6-56-17":[50.99,117.02],"6-56-18":[43.52,106.96],"6-56-19":[36.6,92.67],"6-56-20":[32.36,81.82],"6-56-21":[27.93,72.03],"6-56-22":[25.77,65.54],"6-56-23":[23.87,64.24],"6-56-24":[23.73,52.11],"6-56-25":[24.85,53.98],"6-56-26":[18.69,52.63],"6-56-27":[15.51,44.22],"6-56-28":[15.28,40.2],"6-56-29":[15.58,37.67],"6-56-30":[12.32,36.23],"6-56-31":[11.02,26.97],"6-56-32":[4.25,25.11],"6-56-33":[2.15,15.56],"6-56-34":[-2.11,11.93],"6-56-35":[-5.35,8.47],"6-56-36":[-7.16,4.11],"6-56-37":[-7.33,0.85],"6-56-38":[-8.48,0.68],"6-56-39":[-8.31,1.89],"6-56-40":[-4.64,8.4],"6-56-41":[2.15,16.04],"6-56-42":[6.23,22.14],"6-56-43":[9.62,30.63],"6-56-44":[15.59,36.65],"6-56-45":[16.37,40.5],"6-56-46":[18.42,43.37],"6-56-47":[18.42,44.13],"6-56-48":[18.16,43.98],"6-56-49":[18.16,41.79],"6-56-50":[20.3,41.65],"6-56-51":[20.3,42.33],"6-56-52":[17.44,40.96],"6-56-53":[15.9,41.96],"6-56-54":[9.77,33.92],"6-56-55":[6.16,19.63],"6-56-56":[1.72,12.29],"6-56-57":[-2.06,3.98],"6-56-58":[-5.82,819.33],"6-56-59":[421.04,1695.38],"6-56-60":[516.59,1629.01],"6-56-61":[1285.43,2172.84],"6-56-62":[2103.64,2379.92],"6-56-63":[-29.54,2746.48],"6-57-0":[13.6,37.8],"6-57-1":[19.62,55.09],"5-28-0":[13.6,55.73],"6-57-2":[25.6,59.23],"6-57-3":[28.3,1436.69],"5-28-1":[25.6,1529.13],"6-57-4":[28.3,681.94],"6-57-5":[38.01,949.92],"5-28-2":[28.03,1653.87],"6-57-6":[51.09,115.49],"6-57-7":[57.7,126.66],"5-28-3":[49.95,1002],"6-57-8":[62.46,1937.43],"6-57-9":[60.84,2123.62],"5-28-4":[60.84,2123.62],"6-57-10":[59.7,124.91],"6-57-11":[58.97,123.99],"5-28-5":[58.97,128.25],"6-57-12":[58.91,123.99],"6-57-13":[57.13,122.5],"5-28-6":[57.13,126.29],"6-57-14":[58.08,124.14],"6-57-15":[58.53,123],"5-28-7":[58.08,127.18],"6-57-16":[54.18,119.6],"6-57-17":[49.49,110.36],"5-28-8":[49.49,126.5],"6-57-18":[43.12,101.63],"6-57-19":[40.71,95.46],"5-28-9":[36.6,106.96],"6-57-20":[36.01,1880.85],"6-57-21":[32.18,2439.69],"5-28-10":[27.93,2439.69],"6-57-22":[30.53,1522.97],"6-57-23":[25.18,68.01],"5-28-11":[23.87,1522.97],"6-57-24":[-14.49,116.51],"6-57-25":[25.65,60.59],"5-28-12":[-14.49,116.51],"6-57-26":[1.56,171.48],"6-57-27":[18.28,57.96],"5-28-13":[1.56,171.48],"6-57-28":[17.32,53.31],"6-57-29":[17.61,43.04],"5-28-14":[15.28,53.31],"6-57-30":[14.23,37.19],"6-57-31":[11.87,33.41],"5-28-15":[11.02,37.19],"6-57-32":[8.76,34.41],"6-57-33":[6.71,26.59],"5-28-16":[2.15,34.41],"6-57-34":[4.93,24.73],"6-57-35":[2.81,19.54],"5-28-17":[-5.35,24.73],"6-57-36":[0.84,14.19],"6-57-37":[0.34,10.34],"5-28-18":[-7.33,14.19],"6-57-38":[-0.06,10.45],"6-57-39":[-0.17,10.33],"5-28-19":[-8.48,10.45],"6-57-40":[1.37,15.84],"6-57-41":[5.03,21.64],"5-28-20":[-4.64,21.64],"6-57-42":[8.34,26.94],"6-57-43":[11.9,34.46],"5-28-21":[6.23,34.46],"6-57-44":[15.59,40.42],"6-57-45":[18.81,45.89],"5-28-22":[15.59,45.89],"6-57-46":[20.61,49.37],"6-57-47":[22.02,50.19],"5-28-23":[18.42,50.19],"6-57-48":[21.38,50.16],"6-57-49":[20.47,48.13],"5-28-24":[18.16,50.16],"6-57-50":[20.4,45.48],"6-57-51":[20.34,44.16],"5-28-25":[20.3,45.48],"6-57-52":[19.71,42.18],"6-57-53":[15.9,42.48],"5-28-26":[15.9,42.48],"6-57-54":[9.16,31.18],"6-57-55":[6.21,18.19],"5-28-27":[6.16,33.92],"6-57-56":[2.3,13.36],"6-57-57":[0.42,11.7],"5-28-28":[-2.06,13.36],"6-57-58":[-1.9,1093.26],"6-57-59":[819.32,1811.71],"5-28-29":[-5.82,1811.71],"6-57-60":[814.02,1663.61],"6-57-61":[1522.35,2225.4],"5-28-30":[516.59,2225.4],"6-57-62":[2172.83,2420.8],"6-57-63":[-29.54,2746.48],"5-28-31":[-29.54,2746.48],"6-58-0":[13.6,37.78],"6-58-1":[19.71,53.62],"6-58-2":[25.56,61.94],"6-58-3":[29.9,345.15],"6-58-4":[30,79.45],"6-58-5":[38.66,105.36],"6-58-6":[50.37,116.37],"6-58-7":[58.46,124.92],"6-58-8":[60.43,1885.38],"6-58-9":[60.01,2140.58],"6-58-10":[58.42,121.69],"6-58-11":[57.73,123.87],"6-58-12":[56.63,123.87],"6-58-13":[57.04,123.14],"6-58-14":[55.87,119.28],"6-58-15":[55.11,118.34],"6-58-16":[50.41,118.05],"6-58-17":[47.21,106.08],"6-58-18":[45.73,104.94],"6-58-19":[42.88,99.37],"6-58-20":[28.43,1402.2],"6-58-21":[13.23,3730.85],"6-58-22":[29.84,1980.83],"6-58-23":[-10.67,745.87],"6-58-24":[-18.64,535.71],"6-58-25":[-14.6,356.34],"6-58-26":[-1.62,135.29],"6-58-27":[-20.7,301.55],"6-58-28":[0.18,458.6],"6-58-29":[18.93,63.46],"6-58-30":[15.77,41.91],"6-58-31":[13.35,38.21],"6-58-32":[13.47,38.21],"6-58-33":[12.71,33.98],"6-58-34":[-2.23,864.67],"6-58-35":[7.45,27.57],"6-58-36":[5.05,20.06],"6-58-37":[4.98,16.73],"6-58-38":[4.46,16.62],"6-58-39":[4.41,17.65],"6-58-40":[5.55,22.04],"6-58-41":[8.28,26.07],"6-58-42":[11.11,30.34],"6-58-43":[13.85,35.77],"6-58-44":[17.65,40.21],"6-58-45":[20.04,47.1],"6-58-46":[23.2,50.18],"6-58-47":[24.78,52.72],"6-58-48":[24.35,54.26],"6-58-49":[24.35,51.82],"6-58-50":[22.38,49.92],"6-58-51":[21.5,46.02],"6-58-52":[18.45,42.72],"6-58-53":[13.3,41.86],"6-58-54":[9.11,28.68],"6-58-55":[6.73,17.29],"6-58-56":[3.08,13.48],"6-58-57":[2.25,357.87],"6-58-58":[2.48,1674.63],"6-58-59":[1093.25,1949.57],"6-58-60":[1289.31,1790.34],"6-58-61":[1663.6,2289.94],"6-58-62":[2225.39,2460.86],"6-58-63":[-29.54,2746.48],"6-59-0":[13.6,37.79],"6-59-1":[19.8,52.18],"5-29-0":[13.6,53.62],"6-59-2":[25.75,63.75],"6-59-3":[30.49,64.24],"5-29-1":[25.56,345.15],"4-14-0":[13.6,1529.13],"6-59-4":[30.51,84.68],"6-59-5":[41.87,100.49],"5-29-2":[30,105.36],"6-59-6":[50.16,115.8],"6-59-7":[56.81,119.95],"5-29-3":[50.16,124.92],"4-14-1":[28.03,1653.87],"6-59-8":[57.71,1189.75],"6-59-9":[59.83,125.87],"5-29-4":[57.71,2140.58],"6-59-10":[55.41,120.74],"6-59-11":[54.59,121.48],"5-29-5":[54.59,123.87],"4-14-2":[54.59,2140.58],"6-59-12":[54.73,121.88],"6-59-13":[57.85,123],"5-29-6":[54.73,123.87],"6-59-14":[52.82,118.25],"6-59-15":[49.92,112.43],"5-29-7":[49.92,119.28],"4-14-3":[49.92,127.18],"6-59-16":[47.92,112.43],"6-59-17":[45.53,102.32],"5-29-8":[45.53,118.05],"6-59-18":[43.5,103.1],"6-59-19":[40.18,98.54],"5-29-9":[40.18,104.94],"4-14-4":[36.6,126.5],"6-59-20":[40.18,88.87],"6-59-21":[34.44,731.97],"5-29-10":[13.23,3730.85],"6-59-22":[-35.01,609.23],"6-59-23":[182.63,951.26],"5-29-11":[-35.01,1980.83],"4-14-5":[-35.01,3730.85],"6-59-24":[63.41,838.62],"6-59-25":[2.52,699.41],"5-29-12":[-18.64,838.62],"6-59-26":[4.84,480.98],"6-59-27":[22.18,1567.34],"5-29-13":[-20.7,1567.34],"4-14-6":[-20.7,1567.34],"6-59-28":[-24.77,1463.87],"6-59-29":[1.22,935.28],"5-29-14":[-24.77,1463.87],"6-59-30":[17.76,49.38],"6-59-31":[15.91,40.51],"5-29-15":[13.35,49.38],"4-14-7":[-24.77,1463.87],"6-59-32":[17.61,40.61],"6-59-33":[15.36,39.26],"5-29-16":[12.71,40.61],"6-59-34":[13.68,36.87],"6-59-35":[10.36,29.33],"5-29-17":[-2.23,864.67],"4-14-8":[-5.35,864.67],"6-59-36":[8.78,22.54],"6-59-37":[8.23,21.11],"5-29-18":[4.98,22.54],"6-59-38":[8.08,23.26],"6-59-39":[8.16,24.61],"5-29-19":[4.41,24.61],"4-14-9":[-8.48,24.61],"6-59-40":[9.22,25.8],"6-59-41":[11.68,28.54],"5-29-20":[5.55,28.54],"6-59-42":[13.34,31.4],"6-59-43":[15.33,35.12],"5-29-21":[11.11,35.77],"4-14-10":[-4.64,35.77],"6-59-44":[17.37,39.98],"6-59-45":[15,2060.11],"5-29-22":[15,2060.11],"6-59-46":[22.8,50.12],"6-59-47":[24.47,52.47],"5-29-23":[22.8,52.72],"4-14-11":[15,2060.11],"6-59-48":[25.92,55.19],"6-59-49":[25.17,55.91],"5-29-24":[24.35,55.91],"6-59-50":[23.47,53.48],"6-59-51":[21.5,49.06],"5-29-25":[21.5,53.48],"4-14-12":[18.16,55.91],"6-59-52":[18.45,44.55],"6-59-53":[13.3,39.12],"5-29-26":[13.3,44.55],"6-59-54":[8.95,26.98],"6-59-55":[6.73,17.28],"5-29-27":[6.73,28.68],"4-14-13":[6.16,44.55],"6-59-56":[4.68,14.62],"6-59-57":[4.84,608.1],"5-29-28":[2.25,608.1],"6-59-58":[10.52,2647.27],"6-59-59":[1580.6,2213.91],"5-29-29":[2.48,2647.27],"4-14-14":[-5.82,2647.27],"6-59-60":[1486.82,1899.59],"6-59-61":[1790.33,2337.34],"5-29-30":[1289.31,2337.34],"6-59-62":[2289.93,2494.91],"6-59-63":[-29.54,2746.48],"5-29-31":[-29.54,2746.48],"4-14-15":[-29.54,2746.48],"6-60-0":[13.6,37.78],"6-60-1":[19.82,52.11],"6-60-2":[26.07,63.8],"6-60-3":[31.53,68.91],"6-60-4":[32.12,88.61],"6-60-5":[43.35,100.59],"6-60-6":[50.16,660.73],"6-60-7":[54.73,115.86],"6-60-8":[55.53,123.35],"6-60-9":[56.93,123.85],"6-60-10":[54.77,119.67],"6-60-11":[36.3,467.08],"6-60-12":[54.66,847.15],"6-60-13":[31.72,1061.19],"6-60-14":[50.82,118.9],"6-60-15":[46.84,106.06],"6-60-16":[46.52,848.03],"6-60-17":[45.68,934.31],"6-60-18":[43.52,948.19],"6-60-19":[36.29,97.22],"6-60-20":[36.5,3428.78],"6-60-21":[36.12,3435.16],"6-60-22":[183.32,753.26],"6-60-23":[203.99,625.45],"6-60-24":[208.98,621.86],"6-60-25":[126.64,616.33],"6-60-26":[54.15,571.22],"6-60-27":[72.56,986.01],"6-60-28":[266.59,1965.58],"6-60-29":[-0.28,1465.14],"6-60-30":[10.1,448.45],"6-60-31":[17.88,41.59],"6-60-32":[19,40.1],"6-60-33":[17.4,38.62],"6-60-34":[14.28,36.87],"6-60-35":[11.08,29.16],"6-60-36":[9.95,23.09],"6-60-37":[10.09,23.78],"6-60-38":[10.53,25.27],"6-60-39":[11.82,25.49],"6-60-40":[12.34,27.11],"6-60-41":[13.01,29.48],"6-60-42":[14.24,30.5],"6-60-43":[15.07,32.66],"6-60-44":[15.81,38.1],"6-60-45":[18.29,45.5],"6-60-46":[6.47,931.45],"6-60-47":[23.42,51.85],"6-60-48":[24.91,56.45],"6-60-49":[26.78,56.31],"6-60-50":[24.85,54.12],"6-60-51":[23.88,51.29],"6-60-52":[18.84,47.16],"6-60-53":[13.07,37.45],"6-60-54":[8.97,27.21],"6-60-55":[7.29,18.18],"6-60-56":[6.69,18.97],"6-60-57":[8.72,1445.48],"6-60-58":[608.09,2647.27],"6-60-59":[1819.4,2378.63],"6-60-60":[1773.2,2084.27],"6-60-61":[1899.58,2371.33],"6-60-62":[2337.33,2524.96],"6-60-63":[-29.54,2746.49],"6-61-0":[13.6,37.76],"6-61-1":[19.78,52.5],"5-30-0":[13.6,52.5],"6-61-2":[26.07,61.81],"6-61-3":[29.91,75.45],"5-30-1":[26.07,75.45],"6-61-4":[34.23,88.45],"6-61-5":[43.49,100.68],"5-30-2":[32.12,100.68],"6-61-6":[49.89,2067.72],"6-61-7":[51.02,110.49],"5-30-3":[49.89,2067.72],"6-61-8":[51.94,113.62],"6-61-9":[52.94,792.85],"5-30-4":[51.94,792.85],"6-61-10":[54.18,472.86],"6-61-11":[40.34,998.82],"5-30-5":[36.3,998.82],"6-61-12":[47.75,911.33],"6-61-13":[45.76,978.67],"5-30-6":[31.72,1061.19],"6-61-14":[51.83,275.17],"6-61-15":[44.76,105.85],"5-30-7":[44.76,275.17],"6-61-16":[42.99,2441.8],"6-61-17":[63.03,2479.29],"5-30-8":[42.99,2479.29],"6-61-18":[21.6,1153.69],"6-61-19":[35.43,1045.54],"5-30-9":[21.6,1153.69],"6-61-20":[43.2,3969.25],"6-61-21":[321.36,3240.15],"5-30-10":[36.12,3969.25],"6-61-22":[327.42,538.03],"6-61-23":[228.84,581.24],"5-30-11":[183.32,753.26],"6-61-24":[207.9,518.07],"6-61-25":[135.48,456.49],"5-30-12":[126.64,621.86],"6-61-26":[189.7,487.98],"6-61-27":[282.45,725.34],"5-30-13":[54.15,986.01],"6-61-28":[245.42,1263.81],"6-61-29":[98.59,1793.46],"5-30-14":[-0.28,1965.58],"6-61-30":[9.64,563.59],"6-61-31":[17.84,40.64],"5-30-15":[9.64,563.59],"6-61-32":[18.11,39.27],"6-61-33":[16.27,37.52],"5-30-16":[16.27,40.1],"6-61-34":[14.28,34.25],"6-61-35":[11.71,28.84],"5-30-17":[11.08,36.87],"6-61-36":[11.3,28.82],"6-61-37":[-99.67,814.4],"5-30-18":[-99.67,814.4],"6-61-38":[11.9,26.07],"6-61-39":[12.45,26.9],"5-30-19":[10.53,26.9],"6-61-40":[12.64,30.04],"6-61-41":[13.85,32.62],"5-30-20":[12.34,32.62],"6-61-42":[14.87,32.51],"6-61-43":[15.14,33.46],"5-30-21":[14.24,33.46],"6-61-44":[15.81,36.25],"6-61-45":[17.74,44.2],"5-30-22":[15.81,45.5],"6-61-46":[21.26,47.29],"6-61-47":[22.24,50.55],"5-30-23":[6.47,931.45],"6-61-48":[24.62,53.23],"6-61-49":[25.06,55.27],"5-30-24":[24.62,56.45],"6-61-50":[26.01,56.2],"6-61-51":[23.88,54.1],"5-30-25":[23.88,56.2],"6-61-52":[17.85,50.82],"6-61-53":[13.07,35.17],"5-30-26":[13.07,50.82],"6-61-54":[9.42,26.81],"6-61-55":[7.57,20.65],"5-30-27":[7.29,27.21],"6-61-56":[7.48,20.76],"6-61-57":[10.04,2119.03],"5-30-28":[6.69,2119.03],"6-61-58":[1445.47,2720.05],"6-61-59":[2045.49,2519.15],"5-30-29":[608.09,2720.05],"6-61-60":[1905.59,2242.55],"6-61-61":[1958.12,2404.88],"5-30-30":[1773.2,2404.88],"6-61-62":[2371.32,2555.1],"6-61-63":[-29.54,2747.47],"5-30-31":[-29.54,2747.47],"6-62-0":[13.6,37.73],"6-62-1":[19.73,53.01],"6-62-2":[26.54,59.25],"6-62-3":[28.63,75.62],"6-62-4":[36.2,85.28],"6-62-5":[42.31,99.8],"6-62-6":[49.28,108.11],"6-62-7":[49.78,103.88],"6-62-8":[50.57,107.83],"6-62-9":[49.7,111.74],"6-62-10":[49.66,298.22],"6-62-11":[49.96,1388.09],"6-62-12":[41.71,1035.94],"6-62-13":[45.89,1109.06],"6-62-14":[20.27,639.9],"6-62-15":[44.39,219.03],"6-62-16":[32.45,2687.22],"6-62-17":[297.06,2577.79],"6-62-18":[44.23,3501.33],"6-62-19":[32.49,2419.81],"6-62-20":[632.45,3718.38],"6-62-21":[368.61,1721.06],"6-62-22":[218.45,696.4],"6-62-23":[131.07,471.46],"6-62-24":[138.86,407.06],"6-62-25":[256.95,487.53],"6-62-26":[239.52,1006.14],"6-62-27":[249.3,631.61],"6-62-28":[194.06,789.75],"6-62-29":[15.13,766.66],"6-62-30":[-46.15,332.62],"6-62-31":[17.31,38.68],"6-62-32":[17.52,38.48],"6-62-33":[15.74,36.14],"6-62-34":[14.55,33.16],"6-62-35":[12.03,28.93],"6-62-36":[12.1,28.82],"6-62-37":[12.83,26.82],"6-62-38":[12.65,28.5],"6-62-39":[13.05,31.28],"6-62-40":[13.65,34.28],"6-62-41":[15.43,36.13],"6-62-42":[16.17,36.67],"6-62-43":[16.17,37.77],"6-62-44":[16.2,37.77],"6-62-45":[16.2,40.32],"6-62-46":[17.78,44.64],"6-62-47":[19.75,49.26],"6-62-48":[22.32,50.13],"6-62-49":[23.73,54.94],"6-62-50":[26.51,56.37],"6-62-51":[24.74,55.65],"6-62-52":[17.74,50.79],"6-62-53":[13.06,33.87],"6-62-54":[10.42,25.96],"6-62-55":[9.91,22.36],"6-62-56":[8.78,20.96],"6-62-57":[10.28,2479.23],"6-62-58":[1813.36,2850.41],"6-62-59":[2242.54,2618.27],"6-62-60":[1991.4,2314.66],"6-62-61":[1993.14,2457.95],"6-62-62":[2404.87,2581.14],"6-62-63":[-29.54,2749.47],"6-63-0":[13.6,37.73],"6-63-1":[19.72,53.59],"5-31-0":[13.6,53.59],"6-63-2":[26.54,62.24],"6-63-3":[28.85,73.73],"5-31-1":[26.54,75.62],"4-15-0":[13.6,75.62],"6-63-4":[35.88,86.28],"6-63-5":[42.26,98.34],"5-31-2":[35.88,99.8],"6-63-6":[48.49,104.24],"6-63-7":[48.27,101.1],"5-31-3":[48.27,108.11],"4-15-1":[32.12,2067.72],"3-7-0":[13.6,2067.72],"6-63-8":[48.82,103.66],"6-63-9":[48.93,103.55],"5-31-4":[48.82,111.74],"6-63-10":[46.96,500.18],"6-63-11":[46.68,821.88],"5-31-5":[46.68,1388.09],"4-15-2":[36.3,1388.09],"6-63-12":[-1.23,942.82],"6-63-13":[5.01,686.85],"5-31-6":[-1.23,1109.06],"6-63-14":[29.66,466.81],"6-63-15":[17.32,332.21],"5-31-7":[17.32,639.9],"4-15-3":[-1.23,1109.06],"3-7-1":[-1.23,2140.58],"2-3-0":[-226.59,3982.86],"6-63-16":[16.62,3299.64],"6-63-17":[40.73,2357.66],"5-31-8":[16.62,3299.64],"6-63-18":[40.99,2423.37],"6-63-19":[45.96,1802.73],"5-31-9":[32.49,3501.33],"4-15-4":[16.62,3501.33],"6-63-20":[585.28,2177.76],"6-63-21":[198.79,856.94],"5-31-10":[198.79,3718.38],"6-63-22":[154.1,519.6],"6-63-23":[95.92,407.48],"5-31-11":[95.92,696.4],"4-15-5":[36.12,3969.25],"3-7-2":[-35.01,3969.25],"6-63-24":[189.24,556.84],"6-63-25":[243.53,577.03],"5-31-12":[138.86,577.03],"6-63-26":[242.09,1303.84],"6-63-27":[216.62,572.26],"5-31-13":[216.62,1303.84],"4-15-6":[54.15,1303.84],"6-63-28":[63.8,555.42],"6-63-29":[21.37,874.92],"5-31-14":[15.13,874.92],"6-63-30":[-6.39,370.77],"6-63-31":[16.48,36.2],"5-31-15":[-46.15,370.77],"4-15-7":[-46.15,1965.58],"3-7-3":[-46.15,1965.58],"2-3-1":[-65.14,3969.25],"1-1-0":[-328.06,5809.48],"6-63-32":[17.15,36.78],"6-63-33":[16.29,37.08],"5-31-16":[15.74,38.48],"6-63-34":[12.34,34.98],"6-63-35":[10.7,28.64],"5-31-17":[10.7,34.98],"4-15-8":[10.7,40.1],"6-63-36":[11.05,26.16],"6-63-37":[12.72,29.22],"5-31-18":[11.05,29.22],"6-63-38":[13.43,32.73],"6-63-39":[14.75,35.32],"5-31-19":[12.65,35.32],"4-15-9":[-99.67,814.4],"3-7-4":[-99.67,864.67],"6-63-40":[15.89,39.67],"6-63-41":[17.66,41.82],"5-31-20":[13.65,41.82],"6-63-42":[18.18,43.48],"6-63-43":[17.22,42.55],"5-31-21":[16.17,43.48],"4-15-10":[12.34,43.48],"6-63-44":[15.94,39.03],"6-63-45":[15.92,35.62],"5-31-22":[15.92,40.32],"6-63-46":[17.78,43.75],"6-63-47":[19.65,46.9],"5-31-23":[17.78,49.26],"4-15-11":[6.47,931.45],"3-7-5":[-4.64,2060.11],"2-3-2":[-170.49,2863.35],"6-63-48":[22.32,46.83],"6-63-49":[23.17,52.87],"5-31-24":[22.32,54.94],"6-63-50":[25.95,55.44],"6-63-51":[24.74,55.59],"5-31-25":[24.74,56.37],"4-15-12":[22.32,56.45],"6-63-52":[17.56,49.36],"6-63-53":[13.06,33.43],"5-31-26":[13.06,50.79],"6-63-54":[11.45,27.14],"6-63-55":[10.4,26.46],"5-31-27":[9.91,27.14],"4-15-13":[7.29,50.82],"3-7-6":[6.16,56.45],"6-63-56":[8.78,27.93],"6-63-57":[10.28,2064.74],"5-31-28":[8.78,2479.23],"6-63-58":[6.29,2924.47],"6-63-59":[-4.17,2804.3],"5-31-29":[-4.17,2924.47],"4-15-14":[-4.17,2924.47],"6-63-60":[-10.23,2430.85],"6-63-61":[-15.15,2498.87],"5-31-30":[-15.15,2498.87],"6-63-62":[-22.79,2597.05],"6-63-63":[-29.54,2749.47],"5-31-31":[-29.54,2749.47],"4-15-15":[-29.54,2749.47],"3-7-7":[-29.54,2924.47],"2-3-3":[-47.53,2924.47],"1-1-1":[-269.44,6969.13],"0-0-0":[-328.06,6969.13],"6-64-0":[13.6,37.78],"6-64-1":[19.72,53.59],"6-64-2":[26.6,62.89],"6-64-3":[31.41,76.27],"6-64-4":[36.86,86.28],"6-64-5":[42.7,96.99],"6-64-6":[47,101.29],"6-64-7":[46.73,97.64],"6-64-8":[45.83,101.59],"6-64-9":[45.04,100.52],"6-64-10":[45.18,100.56],"6-64-11":[44.21,95.58],"6-64-12":[41.57,93.35],"6-64-13":[34.37,320.14],"6-64-14":[39.88,478.36],"6-64-15":[62.72,1880.44],"6-64-16":[53.23,3439.27],"6-64-17":[36.39,2431.2],"6-64-18":[43.43,942.66],"6-64-19":[44.68,1847.74],"6-64-20":[490.98,1993.84],"6-64-21":[201.86,739.39],"6-64-22":[138.19,750.53],"6-64-23":[240.33,1166.19],"6-64-24":[334.09,962.42],"6-64-25":[276.69,863.32],"6-64-26":[184.15,556.46],"6-64-27":[168.62,439.96],"6-64-28":[61.71,880.1],"6-64-29":[-17.91,1022.44],"6-64-30":[14.82,41.3],"6-64-31":[15.22,34.38],"6-64-32":[16.21,36.77],"6-64-33":[11.49,36.62],"6-64-34":[9.51,33.23],"6-64-35":[9.43,23.73],"6-64-36":[10.62,24.95],"6-64-37":[12.53,29.78],"6-64-38":[14.73,33.26],"6-64-39":[16.29,40.92],"6-64-40":[19.97,44.49],"6-64-41":[19.97,48.03],"6-64-42":[20.9,49.27],"6-64-43":[20.23,48.27],"6-64-44":[16.76,40.95],"6-64-45":[16.76,37.18],"6-64-46":[18.63,43.85],"6-64-47":[20.07,44.45],"6-64-48":[21.17,45.85],"6-64-49":[22.33,51.91],"6-64-50":[24.99,54.93],"6-64-51":[23.66,55.36],"6-64-52":[17.25,48.1],"6-64-53":[13.73,33.44],"6-64-54":[13.39,34.01],"6-64-55":[11.02,33.97],"6-64-56":[10.25,28.87],"6-64-57":[11.81,2706.61],"6-64-58":[6.29,2970.03],"6-64-59":[-4.17,2947.12],"6-64-60":[-10.23,2543.75],"6-64-61":[-15.15,2526.16],"6-64-62":[-22.79,2618.03],"6-64-63":[-29.54,2752.45],"6-65-0":[13.6,37.81],"6-65-1":[19.76,53.09],"5-32-0":[13.6,53.59],"6-65-2":[26.31,62.46],"6-65-3":[31.01,77.1],"5-32-1":[26.31,77.1],"6-65-4":[38.18,84.8],"6-65-5":[42.64,95.66],"5-32-2":[36.86,96.99],"6-65-6":[44.99,96.88],"6-65-7":[43.49,94.7],"5-32-3":[43.49,101.29],"6-65-8":[42.8,94.18],"6-65-9":[35.63,935.72],"5-32-4":[35.63,935.72],"6-65-10":[20.82,1428.23],"6-65-11":[40.95,136.3],"5-32-5":[20.82,1428.23],"6-65-12":[36.37,88.77],"6-65-13":[-46.66,286.33],"5-32-6":[-46.66,320.14],"6-65-14":[-132.68,643.32],"6-65-15":[137.99,2274.24],"5-32-7":[-132.68,2274.24],"6-65-16":[38.05,2373.31],"6-65-17":[38.96,1377.73],"5-32-8":[36.39,3439.27],"6-65-18":[41.7,1623.57],"6-65-19":[89.48,2161.99],"5-32-9":[41.7,2161.99],"6-65-20":[100.21,941.46],"6-65-21":[185.69,739.39],"5-32-10":[100.21,1993.84],"6-65-22":[257.46,1758.12],"6-65-23":[380.48,2914.18],"5-32-11":[138.19,2914.18],"6-65-24":[426.07,1308.02],"6-65-25":[280.09,733.03],"5-32-12":[276.69,1308.02],"6-65-26":[222.19,683.02],"6-65-27":[143.28,527.99],"5-32-13":[143.28,683.02],"6-65-28":[62.64,650.86],"6-65-29":[-15.66,1095.61],"5-32-14":[-17.91,1095.61],"6-65-30":[-13.75,66.62],"6-65-31":[14.48,33.9],"5-32-15":[-13.75,66.62],"6-65-32":[-19.14,391.88],"6-65-33":[8.66,29.85],"5-32-16":[-19.14,391.88],"6-65-34":[8.35,21.97],"6-65-35":[8.94,22.61],"5-32-17":[8.35,33.23],"6-65-36":[10.62,25.98],"6-65-37":[12.58,30.79],"5-32-18":[10.62,30.79],"6-65-38":[14.93,37.7],"6-65-39":[17.15,49.91],"5-32-19":[14.73,49.91],"6-65-40":[20.87,54.91],"6-65-41":[22.64,56],"5-32-20":[19.97,56],"6-65-42":[22.51,51.03],"6-65-43":[20.23,46.2],"5-32-21":[20.23,51.03],"6-65-44":[17.99,42.51],"6-65-45":[17.84,41.99],"5-32-22":[16.76,42.51],"6-65-46":[18.63,42.48],"6-65-47":[19.73,46.07],"5-32-23":[18.63,46.07],"6-65-48":[21.17,46.4],"6-65-49":[22.33,50.98],"5-32-24":[21.17,51.91],"6-65-50":[24.64,53.8],"6-65-51":[11.85,778.86],"5-32-25":[11.85,778.86],"6-65-52":[17.24,47.71],"6-65-53":[14.74,34.75],"5-32-26":[13.73,48.1],"6-65-54":[14.81,35.37],"6-65-55":[11.99,34.42],"5-32-27":[11.02,35.37],"6-65-56":[10.65,29.79],"6-65-57":[13.9,3054.91],"5-32-28":[10.25,3054.91],"6-65-58":[2706.6,3100.96],"6-65-59":[2543.75,3103.71],"5-32-29":[-4.17,3103.71],"6-65-60":[2255.43,2692.57],"6-65-61":[2248.98,2548.45],"5-32-30":[-15.15,2692.57],"6-65-62":[2526.15,2639.22],"6-65-63":[-29.54,2753.44],"5-32-31":[-29.54,2753.44],"6-66-0":[13.6,37.83],"6-66-1":[19.78,52.14],"6-66-2":[25.64,63.1],"6-66-3":[31.05,77.42],"6-66-4":[38.55,84.66],"6-66-5":[41.57,92.58],"6-66-6":[43.18,93.1],"6-66-7":[40.62,90.09],"6-66-8":[40.54,87.08],"6-66-9":[20.94,2049.01],"6-66-10":[19.29,2462.53],"6-66-11":[4.23,1233.38],"6-66-12":[30.98,117],"6-66-13":[-180.54,876.36],"6-66-14":[90.73,1537.53],"6-66-15":[147.78,4840.9],"6-66-16":[39.23,4069.35],"6-66-17":[43.9,838.48],"6-66-18":[39.99,1553.78],"6-66-19":[-16.37,2250.36],"6-66-20":[30.28,336.76],"6-66-21":[186.56,611.03],"6-66-22":[377.14,1857.82],"6-66-23":[773.49,2746.4],"6-66-24":[408.81,1769.87],"6-66-25":[324.43,1672.93],"6-66-26":[317.13,774.79],"6-66-27":[281.36,874.43],"6-66-28":[46.87,1294.91],"6-66-29":[5.32,816.36],"6-66-30":[-26.99,431.08],"6-66-31":[-28.03,2007.45],"6-66-32":[7.57,607.86],"6-66-33":[6.06,24.36],"6-66-34":[7.09,17.3],"6-66-35":[8.79,26.37],"6-66-36":[11.61,28.98],"6-66-37":[13.1,31.91],"6-66-38":[15.69,39.68],"6-66-39":[19.55,50.83],"6-66-40":[22.63,56.5],"6-66-41":[24.02,57.13],"6-66-42":[22.8,49.96],"6-66-43":[22.8,49.11],"6-66-44":[20.77,46.17],"6-66-45":[20.77,46.35],"6-66-46":[21.39,48.2],"6-66-47":[21.39,49.68],"6-66-48":[23.35,51.88],"6-66-49":[23.35,52.26],"6-66-50":[25.43,54.25],"6-66-51":[21.38,55.21],"6-66-52":[17.56,44.14],"6-66-53":[17.56,39.22],"6-66-54":[17.07,39.22],"6-66-55":[14.68,33.84],"6-66-56":[12.76,30.48],"6-66-57":[13.3,3138.57],"6-66-58":[3003.04,3267.05],"6-66-59":[2692.56,3207.22],"6-66-60":[2381.28,2800.27],"6-66-61":[2355.2,2565.62],"6-66-62":[2548.44,2666.15],"6-66-63":[-29.54,2755.44],"6-67-0":[13.6,37.79],"6-67-1":[19.71,51.23],"5-33-0":[13.6,52.14],"6-67-2":[25.62,63.16],"6-67-3":[30.33,786.22],"5-33-1":[25.62,786.22],"4-16-0":[13.6,786.22],"6-67-4":[37.26,946.45],"6-67-5":[39.53,88.35],"5-33-2":[37.26,946.45],"6-67-6":[40.82,88.5],"6-67-7":[39.27,85.5],"5-33-3":[39.27,93.1],"4-16-1":[36.86,946.45],"6-67-8":[31.58,197.75],"6-67-9":[20.72,2315.19],"5-33-4":[20.72,2315.19],"6-67-10":[28.83,2472.36],"6-67-11":[32.5,847.8],"5-33-5":[4.23,2472.36],"4-16-2":[4.23,2472.36],"6-67-12":[-50.52,217.69],"6-67-13":[33.14,1186.21],"5-33-6":[-180.54,1186.21],"6-67-14":[128.81,1069.93],"6-67-15":[40.08,4029.26],"5-33-7":[40.08,4840.9],"4-16-3":[-180.54,4840.9],"6-67-16":[38.15,2694.01],"6-67-17":[43.45,2374.38],"5-33-8":[38.15,4069.35],"6-67-18":[34.1,1143.75],"6-67-19":[27.14,1413.3],"5-33-9":[-16.37,2250.36],"4-16-4":[-16.37,4069.35],"6-67-20":[23.52,728.47],"6-67-21":[219.62,762.97],"5-33-10":[23.52,762.97],"6-67-22":[420.92,1483.6],"6-67-23":[607.73,1924.9],"5-33-11":[377.14,2746.4],"4-16-5":[23.52,2914.18],"6-67-24":[396.41,1977.29],"6-67-25":[374.52,2023.83],"5-33-12":[324.43,2023.83],"6-67-26":[327.64,714.89],"6-67-27":[323.67,784.44],"5-33-13":[281.36,874.43],"4-16-6":[143.28,2023.83],"6-67-28":[100.15,1784.96],"6-67-29":[31.38,3028.39],"5-33-14":[5.32,3028.39],"6-67-30":[-10.88,4049.43],"6-67-31":[-22.22,1231.48],"5-33-15":[-28.03,4049.43],"4-16-7":[-28.03,4049.43],"6-67-32":[-63.62,953.44],"6-67-33":[-6.6,932.44],"5-33-16":[-63.62,953.44],"6-67-34":[7.15,22.92],"6-67-35":[9.03,31.46],"5-33-17":[7.09,31.46],"4-16-8":[-63.62,953.44],"6-67-36":[13.46,35.43],"6-67-37":[14.74,42.09],"5-33-18":[11.61,42.09],"6-67-38":[16.09,47],"6-67-39":[20.85,47.74],"5-33-19":[15.69,50.83],"4-16-9":[10.62,50.83],"6-67-40":[22.3,48.5],"6-67-41":[23.96,51.6],"5-33-20":[22.3,57.13],"6-67-42":[24.8,52.66],"6-67-43":[23.02,51.42],"5-33-21":[22.8,52.66],"4-16-10":[19.97,57.13],"6-67-44":[22.69,50.41],"6-67-45":[22.33,50.5],"5-33-22":[20.77,50.5],"6-67-46":[22.35,53.75],"6-67-47":[24.22,55.21],"5-33-23":[21.39,55.21],"4-16-11":[16.76,55.21],"6-67-48":[24.66,54.21],"6-67-49":[23.85,53.66],"5-33-24":[23.35,54.21],"6-67-50":[25.43,58.28],"6-67-51":[21.38,55.28],"5-33-25":[21.38,58.28],"4-16-12":[11.85,778.86],"6-67-52":[18.43,43.35],"6-67-53":[18.43,44.37],"5-33-26":[17.56,44.37],"6-67-54":[17.07,44.32],"6-67-55":[14.72,36.1],"5-33-27":[14.68,44.32],"4-16-13":[11.02,48.1],"6-67-56":[12.67,32.07],"6-67-57":[11.97,3175.51],"5-33-28":[11.97,3175.51],"6-67-58":[3138.56,3414.15],"6-67-59":[2800.26,3300.16],"5-33-29":[2692.56,3414.15],"4-16-14":[-4.17,3414.15],"6-67-60":[2458.67,2920.73],"6-67-61":[2439.79,2579.65],"5-33-30":[2355.2,2920.73],"6-67-62":[2565.61,2681.47],"6-67-63":[-29.54,2759.37],"5-33-31":[-29.54,2759.37],"4-16-15":[-29.54,2920.73],"6-68-0":[13.6,37.69],"6-68-1":[19.57,50.91],"6-68-2":[25.25,62.3],"6-68-3":[29.49,1385.65],"6-68-4":[33.18,1035.73],"6-68-5":[38.99,85.09],"6-68-6":[39.15,85.09],"6-68-7":[15.05,1058.54],"6-68-8":[9.73,1750.98],"6-68-9":[19.45,1810.17],"6-68-10":[36.63,1715.33],"6-68-11":[31.96,400.65],"6-68-12":[-23.11,248.2],"6-68-13":[-7.79,988.47],"6-68-14":[94.57,1845.84],"6-68-15":[33.77,3777.17],"6-68-16":[31.24,2893.68],"6-68-17":[26.5,2503.27],"6-68-18":[-23.32,2005.15],"6-68-19":[31.76,209.56],"6-68-20":[27.57,965.23],"6-68-21":[218.9,1068.73],"6-68-22":[308.04,1178.67],"6-68-23":[533.61,1310.69],"6-68-24":[378.5,1156.09],"6-68-25":[344.83,602.11],"6-68-26":[267.07,715.39],"6-68-27":[261.24,609.87],"6-68-28":[128.64,1857.59],"6-68-29":[216.86,2461.39],"6-68-30":[390.81,1585.63],"6-68-31":[140.91,1076.94],"6-68-32":[52.66,1044.68],"6-68-33":[-17.85,885.8],"6-68-34":[-25.08,923.81],"6-68-35":[-3.35,613.65],"6-68-36":[-2.05,2521.11],"6-68-37":[-19.61,2407.1],"6-68-38":[-21.61,2094.46],"6-68-39":[-59.49,1680.35],"6-68-40":[23.13,60.77],"6-68-41":[24.24,62.61],"6-68-42":[25.75,60.9],"6-68-43":[25.75,56.47],"6-68-44":[24.76,52.16],"6-68-45":[24.76,57.31],"6-68-46":[26.02,57.32],"6-68-47":[26.76,56.45],"6-68-48":[26.26,55.86],"6-68-49":[26.26,59.36],"6-68-50":[26.82,62.99],"6-68-51":[23.62,56.76],"6-68-52":[20.02,46.58],"6-68-53":[20.02,47.69],"6-68-54":[18.37,47.1],"6-68-55":[15.04,38.61],"6-68-56":[12.83,47.95],"6-68-57":[11.4,3169.81],"6-68-58":[3108.39,3460.36],"6-68-59":[2920.72,3384.4],"6-68-60":[2494.45,3077.24],"6-68-61":[2482.53,2588.56],"6-68-62":[2579.64,2693.73],"6-68-63":[-29.54,2763.36],"6-69-0":[13.6,37.44],"6-69-1":[19.4,50.44],"5-34-0":[13.6,50.91],"6-69-2":[25.03,60.03],"6-69-3":[29.14,1634.3],"5-34-1":[25.03,1634.3],"6-69-4":[31.42,1233.17],"6-69-5":[35.11,82.7],"5-34-2":[31.42,1233.17],"6-69-6":[35.26,81.82],"6-69-7":[6.63,1592.64],"5-34-3":[6.63,1592.64],"6-69-8":[4.87,1958.98],"6-69-9":[47.04,1310.43],"5-34-4":[4.87,1958.98],"6-69-10":[25.33,797.68],"6-69-11":[26.18,411.97],"5-34-5":[25.33,1715.33],"6-69-12":[19.39,280.51],"6-69-13":[17.14,1624.81],"5-34-6":[-23.11,1624.81],"6-69-14":[154.38,1918.97],"6-69-15":[39.77,2548.59],"5-34-7":[33.77,3777.17],"6-69-16":[16.47,1992.85],"6-69-17":[37.95,2820.36],"5-34-8":[16.47,2893.68],"6-69-18":[29.13,3340.97],"6-69-19":[28.62,288.67],"5-34-9":[-23.32,3340.97],"6-69-20":[9.01,392.95],"6-69-21":[69.58,877.11],"5-34-10":[9.01,1068.73],"6-69-22":[310.38,889.96],"6-69-23":[406.17,1202.42],"5-34-11":[308.04,1310.69],"6-69-24":[27.24,3331.17],"6-69-25":[184,850],"5-34-12":[27.24,3331.17],"6-69-26":[148.07,439.62],"6-69-27":[260.59,551.37],"5-34-13":[148.07,715.39],"6-69-28":[213.54,1124.79],"6-69-29":[275.12,1747.94],"5-34-14":[128.64,2461.39],"6-69-30":[354.28,1070.44],"6-69-31":[276.49,830.16],"5-34-15":[140.91,1585.63],"6-69-32":[252.96,879.81],"6-69-33":[167.87,929.4],"5-34-16":[-17.85,1044.68],"6-69-34":[256.14,1488.2],"6-69-35":[12.55,2127.16],"5-34-17":[-25.08,2127.16],"6-69-36":[166.21,2639.31],"6-69-37":[859.22,2023.5],"5-34-18":[-19.61,2639.31],"6-69-38":[730.14,1749.24],"6-69-39":[10.84,2585.59],"5-34-19":[-59.49,2585.59],"6-69-40":[-162.31,2386.26],"6-69-41":[-159.88,2015.68],"5-34-20":[-162.31,2386.26],"6-69-42":[18.98,704.83],"6-69-43":[26.09,62.3],"5-34-21":[18.98,704.83],"6-69-44":[25.43,58.48],"6-69-45":[25.82,55.17],"5-34-22":[24.76,58.48],"6-69-46":[26.02,58.49],"6-69-47":[27.55,60.1],"5-34-23":[26.02,60.1],"6-69-48":[27.02,60.61],"6-69-49":[27.99,64.2],"5-34-24":[26.26,64.2],"6-69-50":[29.22,67.45],"6-69-51":[23.62,62.15],"5-34-25":[23.62,67.45],"6-69-52":[21.62,53.1],"6-69-53":[22.44,49.65],"5-34-26":[20.02,53.1],"6-69-54":[19.27,47.76],"6-69-55":[15.24,39.44],"5-34-27":[15.04,47.76],"6-69-56":[14.46,300.15],"6-69-57":[14.89,3108.4],"5-34-28":[11.4,3169.81],"6-69-58":[3052.07,3514.26],"6-69-59":[3077.23,3446.22],"5-34-29":[2920.72,3514.26],"6-69-60":[2544.2,3147.37],"6-69-61":[2511.13,2608.3],"5-34-30":[2482.53,3147.37],"6-69-62":[2588.55,2704.02],"6-69-63":[-29.54,2767.34],"5-34-31":[-29.54,2767.34],"6-70-0":[13.6,37.16],"6-70-1":[19.22,49.87],"6-70-2":[24.52,56.84],"6-70-3":[28.6,1635.74],"6-70-4":[29.16,1193.37],"6-70-5":[30.17,441.82],"6-70-6":[29.72,72.1],"6-70-7":[12.72,2122.75],"6-70-8":[199.39,2096.53],"6-70-9":[20.3,735.36],"6-70-10":[18.93,350.95],"6-70-11":[-25.11,119.82],"6-70-12":[22.14,358.72],"6-70-13":[35.6,462.61],"6-70-14":[142.49,2057.45],"6-70-15":[100,1043.38],"6-70-16":[27.8,2489.77],"6-70-17":[24.67,2049.01],"6-70-18":[22.69,753.24],"6-70-19":[22.41,59.3],"6-70-20":[23.96,142.33],"6-70-21":[-25.04,490.94],"6-70-22":[198.02,1063.16],"6-70-23":[343.56,1540.59],"6-70-24":[27.16,3468.04],"6-70-25":[108.1,1729.27],"6-70-26":[121.91,428.48],"6-70-27":[274.16,1624.07],"6-70-28":[322.1,1063.08],"6-70-29":[354.64,767.3],"6-70-30":[305.29,833.8],"6-70-31":[254.18,533.95],"6-70-32":[223.98,448.91],"6-70-33":[192.31,886.28],"6-70-34":[403.12,1242.7],"6-70-35":[605.84,1757.04],"6-70-36":[1116.78,1831.76],"6-70-37":[1104.79,1687.18],"6-70-38":[1028.6,2162.84],"6-70-39":[1184.99,2171.43],"6-70-40":[1018.03,2505.72],"6-70-41":[47.81,2222.4],"6-70-42":[7.61,1720.53],"6-70-43":[18.25,2268.67],"6-70-44":[2.17,2017.39],"6-70-45":[26.72,58.31],"6-70-46":[27.58,59.46],"6-70-47":[29.09,64.51],"6-70-48":[29.91,64.57],"6-70-49":[29.84,67.11],"6-70-50":[31.81,70.73],"6-70-51":[27.49,66.41],"6-70-52":[24.04,57.39],"6-70-53":[24.04,50.76],"6-70-54":[19.07,48.88],"6-70-55":[15.38,38.05],"6-70-56":[14,268.92],"6-70-57":[15.56,3052.08],"6-70-58":[2944.42,3536.78],"6-70-59":[3147.36,3480.29],"6-70-60":[2608.29,3239.33],"6-70-61":[2539.62,2709.23],"6-70-62":[2602.1,2724.91],"6-70-63":[-29.54,2768.65],"6-71-0":[13.6,36.76],"6-71-1":[19.1,48.94],"5-35-0":[13.6,49.87],"6-71-2":[24.15,54.01],"6-71-3":[27.72,709.89],"5-35-1":[24.15,1635.74],"4-17-0":[13.6,1635.74],"6-71-4":[28.01,684.19],"6-71-5":[27.24,62.75],"5-35-2":[27.24,1193.37],"6-71-6":[19.67,948.29],"6-71-7":[4.84,1854.14],"5-35-3":[4.84,2122.75],"4-17-1":[4.84,2122.75],"3-8-0":[4.84,2122.75],"6-71-8":[19.05,851.76],"6-71-9":[17.77,511.56],"5-35-4":[17.77,2096.53],"6-71-10":[17.31,158.69],"6-71-11":[17.94,214.15],"5-35-5":[-25.11,350.95],"4-17-2":[-25.11,2096.53],"6-71-12":[11.89,342.67],"6-71-13":[80.4,644.43],"5-35-6":[11.89,644.43],"6-71-14":[118.41,2648.45],"6-71-15":[68.74,1842.42],"5-35-7":[68.74,2648.45],"4-17-3":[-23.11,3777.17],"3-8-1":[-180.54,4840.9],"6-71-16":[65.18,2700.03],"6-71-17":[23.06,2930.53],"5-35-8":[23.06,2930.53],"6-71-18":[13.5,2524.92],"6-71-19":[8.99,1090.39],"5-35-9":[8.99,2524.92],"4-17-4":[-23.32,3340.97],"6-71-20":[18.37,903.81],"6-71-21":[-31.98,311.99],"5-35-10":[-31.98,903.81],"6-71-22":[94.19,388.14],"6-71-23":[273.49,1038.12],"5-35-11":[94.19,1540.59],"4-17-5":[-31.98,1540.59],"3-8-2":[-31.98,4069.35],"6-71-24":[452.55,932.86],"6-71-25":[308.29,1368.77],"5-35-12":[27.16,3468.04],"6-71-26":[326.68,1327.69],"6-71-27":[373.83,1212.84],"5-35-13":[121.91,1624.07],"4-17-6":[27.16,3468.04],"6-71-28":[371.4,934.47],"6-71-29":[382.62,935.02],"5-35-14":[322.1,1063.08],"6-71-30":[291.34,761.73],"6-71-31":[282.28,549.06],"5-35-15":[254.18,833.8],"4-17-7":[128.64,2461.39],"3-8-3":[-28.03,4049.43],"6-71-32":[271.34,592.5],"6-71-33":[253.5,758.09],"5-35-16":[192.31,886.28],"6-71-34":[404.13,1099.25],"6-71-35":[753.17,1385.35],"5-35-17":[403.12,1757.04],"4-17-8":[-25.08,2127.16],"6-71-36":[1050.78,1507.74],"6-71-37":[1011.55,1380.25],"5-35-18":[1011.55,1831.76],"6-71-38":[960.55,1371.66],"6-71-39":[940.67,1497.56],"5-35-19":[940.67,2171.43],"4-17-9":[-59.49,2639.31],"3-8-4":[-63.62,2639.31],"6-71-40":[991.87,1399.38],"6-71-41":[722.23,1582.99],"5-35-20":[47.81,2505.72],"6-71-42":[427.66,1667.49],"6-71-43":[142.44,2341.81],"5-35-21":[7.61,2341.81],"4-17-10":[-162.31,2505.72],"6-71-44":[-5.94,1732.68],"6-71-45":[27.22,59.84],"5-35-22":[-5.94,2017.39],"6-71-46":[29.17,63.24],"6-71-47":[30.14,66.91],"5-35-23":[27.58,66.91],"4-17-11":[-5.94,2017.39],"3-8-5":[-162.31,2505.72],"6-71-48":[31.75,66.91],"6-71-49":[32.11,69.56],"5-35-24":[29.84,69.56],"6-71-50":[33.7,73.57],"6-71-51":[28.8,72.3],"5-35-25":[27.49,73.57],"4-17-12":[23.62,73.57],"6-71-52":[25.57,60.85],"6-71-53":[24.42,53.17],"5-35-26":[24.04,60.85],"6-71-54":[19.18,48.85],"6-71-55":[15.38,38.12],"5-35-27":[15.38,48.88],"4-17-13":[15.04,60.85],"3-8-6":[11.02,778.86],"6-71-56":[14.98,187.97],"6-71-57":[15.79,2944.43],"5-35-28":[14,3052.08],"6-71-58":[2840.08,3600.93],"6-71-59":[3239.32,3598.47],"5-35-29":[2840.08,3600.93],"4-17-14":[11.4,3600.93],"6-71-60":[2709.22,3295.33],"6-71-61":[2568.24,2810.96],"5-35-30":[2539.62,3295.33],"6-71-62":[2621.33,2751.92],"6-71-63":[-29.54,2771.32],"5-35-31":[-29.54,2771.32],"4-17-15":[-29.54,3295.33],"3-8-7":[-29.54,3600.93],"6-72-0":[13.6,36.49],"6-72-1":[19.01,48.14],"6-72-2":[23.6,52.85],"6-72-3":[25.14,753.17],"6-72-4":[25.05,528.08],"6-72-5":[22.7,56.98],"6-72-6":[22.55,1086.58],"6-72-7":[21.13,1167.12],"6-72-8":[17.66,435.24],"6-72-9":[17.52,286.65],"6-72-10":[15.17,241.92],"6-72-11":[12.2,275.13],"6-72-12":[29.06,318.56],"6-72-13":[28.38,382.74],"6-72-14":[135.43,1998.12],"6-72-15":[147.15,2540.92],"6-72-16":[49.82,2847.57],"6-72-17":[30.85,2950.99],"6-72-18":[21.06,2427.62],"6-72-19":[7.76,2464.23],"6-72-20":[7.73,425.6],"6-72-21":[-11.66,284.94],"6-72-22":[88.27,639.17],"6-72-23":[289.98,1107.43],"6-72-24":[470.56,1912.86],"6-72-25":[498.02,1340.77],"6-72-26":[593.56,1710.7],"6-72-27":[454.32,3017.52],"6-72-28":[444.14,1371.36],"6-72-29":[477.29,1047.83],"6-72-30":[352.38,768.89],"6-72-31":[319.72,630.52],"6-72-32":[322.07,733.63],"6-72-33":[332.54,807.65],"6-72-34":[430.54,1119.46],"6-72-35":[723.96,1534.31],"6-72-36":[1022.28,1643.41],"6-72-37":[961.73,1249.5],"6-72-38":[916.89,1116.92],"6-72-39":[892.54,1255.26],"6-72-40":[958.51,1498.79],"6-72-41":[975.82,1901.6],"6-72-42":[928.72,1783.15],"6-72-43":[77.74,2501.84],"6-72-44":[12.69,1649.02],"6-72-45":[28,66.27],"6-72-46":[29.82,70.25],"6-72-47":[32.16,68.24],"6-72-48":[32.45,66.93],"6-72-49":[32.5,71.41],"6-72-50":[34.78,76.35],"6-72-51":[30.32,73.61],"6-72-52":[26.6,61.36],"6-72-53":[24.54,54.43],"6-72-54":[19.54,49.25],"6-72-55":[15.45,38.72],"6-72-56":[15.31,41.8],"6-72-57":[21.91,3236.81],"6-72-58":[2872.27,3666.27],"6-72-59":[3295.32,3666.27],"6-72-60":[2810.95,3378.93],"6-72-61":[2625.94,2968.07],"6-72-62":[2649.64,2779.15],"6-72-63":[-29.54,2774.31],"6-73-0":[13.6,36.21],"6-73-1":[18.97,47.61],"5-36-0":[13.6,48.14],"6-73-2":[22.99,49.57],"6-73-3":[23.45,674.04],"5-36-1":[22.99,753.17],"6-73-4":[23.04,204.98],"6-73-5":[22,51.05],"5-36-2":[22,528.08],"6-73-6":[18.61,696.6],"6-73-7":[22.39,1083.56],"5-36-3":[18.61,1167.12],"6-73-8":[17.69,559.12],"6-73-9":[46.96,398.6],"5-36-4":[17.52,559.12],"6-73-10":[10.3,258.06],"6-73-11":[18.42,338.7],"5-36-5":[10.3,338.7],"6-73-12":[21.07,371.65],"6-73-13":[119.02,309.64],"5-36-6":[21.07,382.74],"6-73-14":[82.56,1369.76],"6-73-15":[13.61,2520.59],"5-36-7":[13.61,2540.92],"6-73-16":[28.54,1559.76],"6-73-17":[28.77,1798.35],"5-36-8":[28.54,2950.99],"6-73-18":[23.18,2185.74],"6-73-19":[-52.99,2137.5],"5-36-9":[-52.99,2464.23],"6-73-20":[1.3,266.06],"6-73-21":[-117.56,282.94],"5-36-10":[-117.56,425.6],"6-73-22":[27.75,574.35],"6-73-23":[275.3,1131.98],"5-36-11":[27.75,1131.98],"6-73-24":[280.09,1082.02],"6-73-25":[366.24,841.26],"5-36-12":[280.09,1912.86],"6-73-26":[428.45,2020.89],"6-73-27":[423.73,1156.65],"5-36-13":[423.73,3017.52],"6-73-28":[386.96,960.04],"6-73-29":[394.88,977.62],"5-36-14":[386.96,1371.36],"6-73-30":[497.33,946.04],"6-73-31":[366.87,1103.17],"5-36-15":[319.72,1103.17],"6-73-32":[379.78,1540.39],"6-73-33":[413.29,1685.26],"5-36-16":[322.07,1685.26],"6-73-34":[504.55,1701.66],"6-73-35":[515.18,1902.71],"5-36-17":[430.54,1902.71],"6-73-36":[935.23,1683.01],"6-73-37":[473.44,1546.43],"5-36-18":[473.44,1683.01],"6-73-38":[414.32,1440.16],"6-73-39":[758.78,1496.99],"5-36-19":[414.32,1496.99],"6-73-40":[770.57,2110.34],"6-73-41":[993.88,1898.28],"5-36-20":[770.57,2110.34],"6-73-42":[1210.08,3126.88],"6-73-43":[4.71,2790.11],"5-36-21":[4.71,3126.88],"6-73-44":[11.68,321.06],"6-73-45":[28.82,68.52],"5-36-22":[11.68,1649.02],"6-73-46":[33.04,71.86],"6-73-47":[33.1,68.84],"5-36-23":[29.82,71.86],"6-73-48":[32.88,69.45],"6-73-49":[33.33,74.64],"5-36-24":[32.45,74.64],"6-73-50":[35.38,76.55],"6-73-51":[30.59,74.13],"5-36-25":[30.32,76.55],"6-73-52":[27.68,63.59],"6-73-53":[24.54,58.28],"5-36-26":[24.54,63.59],"6-73-54":[20.07,51.54],"6-73-55":[15.99,40.58],"5-36-27":[15.45,51.54],"6-73-56":[15.99,41.88],"6-73-57":[19.59,3236.81],"5-36-28":[15.31,3236.81],"6-73-58":[2976.86,3671.29],"6-73-59":[3378.92,3685.99],"5-36-29":[2872.27,3685.99],"6-73-60":[2968.06,3441.2],"6-73-61":[2691.68,3024.01],"5-36-30":[2625.94,3441.2],"6-73-62":[2691.68,2818.12],"6-73-63":[-29.54,2780.49],"5-36-31":[-29.54,2818.12],"6-74-0":[13.6,36.07],"6-74-1":[18.96,46.86],"6-74-2":[22.03,47],"6-74-3":[20.96,289.51],"6-74-4":[19.84,46.66],"6-74-5":[17.55,45.75],"6-74-6":[11.97,739.68],"6-74-7":[14.65,736.85],"6-74-8":[-6.7,3219.23],"6-74-9":[-7.7,401.9],"6-74-10":[-74.06,523.35],"6-74-11":[30.86,314.28],"6-74-12":[121.32,307.64],"6-74-13":[94.68,347.09],"6-74-14":[53.31,387.19],"6-74-15":[16.89,488.72],"6-74-16":[26.92,429.54],"6-74-17":[0.6,2570.69],"6-74-18":[-38.2,3075.92],"6-74-19":[2.74,3021.97],"6-74-20":[2.74,110.17],"6-74-21":[-52.61,355.67],"6-74-22":[11.08,602.67],"6-74-23":[11.91,551.02],"6-74-24":[164.06,713.34],"6-74-25":[187.45,639.47],"6-74-26":[300.4,1130.48],"6-74-27":[439.11,1410.14],"6-74-28":[346.35,1323.82],"6-74-29":[356.78,738.69],"6-74-30":[452.9,1580.59],"6-74-31":[534,5024.49],"6-74-32":[645.87,4495.21],"6-74-33":[625.99,3461],"6-74-34":[590.29,2489.57],"6-74-35":[742.27,1708.52],"6-74-36":[432.19,1881.89],"6-74-37":[298.55,1739.34],"6-74-38":[466.8,1752.71],"6-74-39":[255.5,1623.82],"6-74-40":[350.82,2352.72],"6-74-41":[677.23,2369.87],"6-74-42":[12.4,3510.35],"6-74-43":[4.61,2075.35],"6-74-44":[25.51,57.03],"6-74-45":[28.71,66.1],"6-74-46":[31.87,69.33],"6-74-47":[32.66,69.51],"6-74-48":[33.21,80.25],"6-74-49":[35.21,80.16],"6-74-50":[35.5,79.81],"6-74-51":[31.79,73.11],"6-74-52":[29.44,68],"6-74-53":[26.69,59.41],"6-74-54":[20.92,53.21],"6-74-55":[18.14,42.59],"6-74-56":[17.26,359.2],"6-74-57":[18.72,2976.87],"6-74-58":[2510.84,3667.35],"6-74-59":[3441.19,3732.45],"6-74-60":[3024,3510.17],"6-74-61":[2783.25,3119.66],"6-74-62":[2780.48,2893.13],"6-74-63":[-29.54,2805.44],"6-75-0":[13.6,35.99],"6-75-1":[18.94,45.05],"5-37-0":[13.6,46.86],"6-75-2":[21.42,45.15],"6-75-3":[20.74,291.18],"5-37-1":[20.74,291.18],"4-18-0":[13.6,753.17],"6-75-4":[17.8,41.45],"6-75-5":[17.26,39.32],"5-37-2":[17.26,46.66],"6-75-6":[15.55,177.14],"6-75-7":[15.55,1181.22],"5-37-3":[11.97,1181.22],"4-18-1":[11.97,1181.22],"6-75-8":[16.77,712.47],"6-75-9":[-32.14,4110.39],"5-37-4":[-32.14,4110.39],"6-75-10":[-19.3,318.43],"6-75-11":[30.72,357.76],"5-37-5":[-74.06,523.35],"4-18-2":[-74.06,4110.39],"6-75-12":[140.07,313.84],"6-75-13":[123.47,252.12],"5-37-6":[94.68,347.09],"6-75-14":[-181.36,293.98],"6-75-15":[-133.08,195.69],"5-37-7":[-181.36,488.72],"4-18-3":[-181.36,2540.92],"6-75-16":[12.44,673.31],"6-75-17":[25.7,2438.12],"5-37-8":[0.6,2570.69],"6-75-18":[22.51,3012.55],"6-75-19":[6.7,2342.54],"5-37-9":[-38.2,3075.92],"4-18-4":[-52.99,3075.92],"6-75-20":[8.83,223.67],"6-75-21":[-4.5,1970.91],"5-37-10":[-52.61,1970.91],"6-75-22":[11.16,2002.31],"6-75-23":[78.71,726.15],"5-37-11":[11.08,2002.31],"4-18-5":[-117.56,2002.31],"6-75-24":[172.21,1207.85],"6-75-25":[212.55,942.11],"5-37-12":[164.06,1207.85],"6-75-26":[305.98,740.02],"6-75-27":[352.02,1457.61],"5-37-13":[300.4,1457.61],"4-18-6":[164.06,3017.52],"6-75-28":[354.16,988.64],"6-75-29":[356.57,725.3],"5-37-14":[346.35,1323.82],"6-75-30":[389.82,3166.22],"6-75-31":[594.3,2060.9],"5-37-15":[389.82,5024.49],"4-18-7":[319.72,5024.49],"6-75-32":[1072.57,1787.81],"6-75-33":[1016.16,1756.25],"5-37-16":[625.99,4495.21],"6-75-34":[735.53,2443.31],"6-75-35":[493.17,2943.5],"5-37-17":[493.17,2943.5],"4-18-8":[322.07,4495.21],"6-75-36":[446.63,1864.36],"6-75-37":[93.22,1716.39],"5-37-18":[93.22,1881.89],"6-75-38":[74.67,2583.3],"6-75-39":[57.48,2427.44],"5-37-19":[57.48,2583.3],"4-18-9":[57.48,2583.3],"6-75-40":[-242.83,1442.62],"6-75-41":[-31.19,1914.13],"5-37-20":[-242.83,2369.87],"6-75-42":[2.04,1636.59],"6-75-43":[21.63,58.03],"5-37-21":[2.04,3510.35],"4-18-10":[-242.83,3510.35],"6-75-44":[25.62,61.17],"6-75-45":[29.14,66.22],"5-37-22":[25.51,66.22],"6-75-46":[31.94,69.34],"6-75-47":[33.03,82.96],"5-37-23":[31.87,82.96],"4-18-11":[11.68,1649.02],"6-75-48":[35.18,89.62],"6-75-49":[39.2,86.77],"5-37-24":[33.21,89.62],"6-75-50":[36.6,80.48],"6-75-51":[34.25,78.22],"5-37-25":[31.79,80.48],"4-18-12":[30.32,89.62],"6-75-52":[30.27,72.13],"6-75-53":[26.69,63.45],"5-37-26":[26.69,72.13],"6-75-54":[20.79,54.64],"6-75-55":[18.14,45.98],"5-37-27":[18.14,54.64],"4-18-13":[15.45,72.13],"6-75-56":[18.66,861.26],"6-75-57":[359.19,2787.68],"5-37-28":[17.26,2976.87],"6-75-58":[2576.62,3670.33],"6-75-59":[3510.16,3745.57],"5-37-29":[2510.84,3745.57],"4-18-14":[15.31,3745.57],"6-75-60":[3119.65,3590.97],"6-75-61":[2882.5,3236.16],"5-37-30":[2783.25,3590.97],"6-75-62":[2805.43,2971.57],"6-75-63":[-29.54,2839.82],"5-37-31":[-29.54,2971.57],"4-18-15":[-29.54,3590.97],"6-76-0":[13.6,35.96],"6-76-1":[18.88,43.71],"6-76-2":[20.05,43.82],"6-76-3":[17.55,47.61],"6-76-4":[15.48,38.46],"6-76-5":[14.03,35.52],"6-76-6":[13.19,32.09],"6-76-7":[13.64,1139.05],"6-76-8":[15.76,538.64],"6-76-9":[14.86,306.08],"6-76-10":[21.95,316.75],"6-76-11":[80.98,357.69],"6-76-12":[126.53,332.1],"6-76-13":[34.69,291.25],"6-76-14":[4.45,251.97],"6-76-15":[11.09,721.64],"6-76-16":[16.18,1541.99],"6-76-17":[17.64,2603.85],"6-76-18":[19.98,3897.68],"6-76-19":[14.59,3093.99],"6-76-20":[-398.55,2689.12],"6-76-21":[-349.48,2516.84],"6-76-22":[7.34,2262.38],"6-76-23":[-21.6,1972.68],"6-76-24":[-6.69,2173.07],"6-76-25":[324.79,1591.14],"6-76-26":[356.19,1104.11],"6-76-27":[401.98,2729.65],"6-76-28":[392.01,3267.45],"6-76-29":[375.1,3342.07],"6-76-30":[309.01,2770.25],"6-76-31":[236.85,4305.91],"6-76-32":[545.42,3396.04],"6-76-33":[671.25,3634.02],"6-76-34":[206.1,2462.72],"6-76-35":[230.19,2952.42],"6-76-36":[-18.37,1938.4],"6-76-37":[7.99,2969.88],"6-76-38":[-27.14,1841.51],"6-76-39":[-30.93,319.69],"6-76-40":[-13.74,244.16],"6-76-41":[8.65,35.45],"6-76-42":[14.14,44.71],"6-76-43":[19.2,58.81],"6-76-44":[24.23,61.33],"6-76-45":[27.4,65.6],"6-76-46":[32.33,76.23],"6-76-47":[35.63,92.82],"6-76-48":[41.49,92.94],"6-76-49":[40.23,88.72],"6-76-50":[39.23,85.78],"6-76-51":[36.06,83.62],"6-76-52":[32.25,75.93],"6-76-53":[27.56,65.48],"6-76-54":[22.21,58.44],"6-76-55":[22.21,48.62],"6-76-56":[20.39,1400],"6-76-57":[861.25,2930.46],"6-76-58":[2787.67,3670.26],"6-76-59":[3590.96,3781.61],"6-76-60":[2776.72,3628.25],"6-76-61":[2954.99,3346.55],"6-76-62":[2839.81,3092.47],"6-76-63":[-29.54,2876.01],"6-77-0":[13.6,35.87],"6-77-1":[18.74,42.43],"5-38-0":[13.6,43.71],"6-77-2":[19.64,42.43],"6-77-3":[17.24,120.99],"5-38-1":[17.24,120.99],"6-77-4":[12.81,34.8],"6-77-5":[12.61,29.58],"5-38-2":[12.61,38.46],"6-77-6":[10.81,27.52],"6-77-7":[10.81,395.4],"5-38-3":[10.81,1139.05],"6-77-8":[13.48,352.95],"6-77-9":[13.48,366.87],"5-38-4":[13.48,538.64],"6-77-10":[35.39,327.96],"6-77-11":[93.37,306.61],"5-38-5":[21.95,357.69],"6-77-12":[105.39,311.33],"6-77-13":[-117.36,300.03],"5-38-6":[-117.36,332.1],"6-77-14":[44.47,375.52],"6-77-15":[2.57,323.22],"5-38-7":[2.57,721.64],"6-77-16":[12.38,1062.09],"6-77-17":[17.22,3382.16],"5-38-8":[12.38,3382.16],"6-77-18":[227.32,3297.16],"6-77-19":[120.11,2377.57],"5-38-9":[14.59,3897.68],"6-77-20":[501.73,1781.74],"6-77-21":[534.04,1378.43],"5-38-10":[-398.55,2689.12],"6-77-22":[6.85,2032.54],"6-77-23":[-26.43,2355.84],"5-38-11":[-26.43,2355.84],"6-77-24":[-82.73,2168.09],"6-77-25":[-31.31,2735.56],"5-38-12":[-82.73,2735.56],"6-77-26":[-27.84,3016.69],"6-77-27":[581.81,4526.44],"5-38-13":[-27.84,4526.44],"6-77-28":[713.31,4259.18],"6-77-29":[510.69,4177.49],"5-38-14":[375.1,4259.18],"6-77-30":[298.72,2764.05],"6-77-31":[167.98,3442.17],"5-38-15":[167.98,4305.91],"6-77-32":[136.09,5158.31],"6-77-33":[-45.68,5869.55],"5-38-16":[-45.68,5869.55],"6-77-34":[-49.58,2618.18],"6-77-35":[-48.06,1490.1],"5-38-17":[-49.58,2952.42],"6-77-36":[-18.95,1408.41],"6-77-37":[-43.82,2305.1],"5-38-18":[-43.82,2969.88],"6-77-38":[-55.16,506.56],"6-77-39":[-23.77,1.33],"5-38-19":[-55.16,1841.51],"6-77-40":[-2.89,15.32],"6-77-41":[4.2,25.41],"5-38-20":[-13.74,244.16],"6-77-42":[9.2,34.13],"6-77-43":[15.55,46.33],"5-38-21":[9.2,58.81],"6-77-44":[24.23,56.57],"6-77-45":[27.4,71.28],"5-38-22":[24.23,71.28],"6-77-46":[32.88,83.08],"6-77-47":[39.51,93.26],"5-38-23":[32.33,93.26],"6-77-48":[38.04,1277.56],"6-77-49":[42.15,90.89],"5-38-24":[38.04,1277.56],"6-77-50":[42.47,93.63],"6-77-51":[38.18,92.27],"5-38-25":[36.06,93.63],"6-77-52":[33.28,80.44],"6-77-53":[29.46,68.79],"5-38-26":[27.56,80.44],"6-77-54":[25.28,62.82],"6-77-55":[22.68,52.06],"5-38-27":[22.21,62.82],"6-77-56":[18.95,1400],"6-77-57":[751.85,3035.01],"5-38-28":[18.95,3035.01],"6-77-58":[2930.45,3670.15],"6-77-59":[3628.25,3814.29],"5-38-29":[2787.67,3814.29],"6-77-60":[3346.54,3652.21],"6-77-61":[3073.2,3460.18],"5-38-30":[2776.72,3652.21],"6-77-62":[2876,3182.27],"6-77-63":[-29.54,2907.97],"5-38-31":[-29.54,3182.27],"6-78-0":[13.6,35.71],"6-78-1":[18.5,41.37],"6-78-2":[18.62,41.37],"6-78-3":[14.08,41.71],"6-78-4":[10.33,32.25],"6-78-5":[8.69,25.05],"6-78-6":[8.19,22.55],"6-78-7":[9.2,327.91],"6-78-8":[11.6,314.82],"6-78-9":[12.9,268.49],"6-78-10":[44.72,286.2],"6-78-11":[79.76,279.53],"6-78-12":[76.55,258.22],"6-78-13":[77.59,248.68],"6-78-14":[14.28,340.26],"6-78-15":[2.68,680.41],"6-78-16":[13.14,3881.85],"6-78-17":[13.73,3918.41],"6-78-18":[321,3209.2],"6-78-19":[147.38,1446.37],"6-78-20":[267.19,949.71],"6-78-21":[374.43,1047.17],"6-78-22":[737.12,1974.55],"6-78-23":[99.43,2149.19],"6-78-24":[-38.59,2651.93],"6-78-25":[-18.11,2755.96],"6-78-26":[-202.91,3297.68],"6-78-27":[-172.94,3970.6],"6-78-28":[208.62,3839.48],"6-78-29":[250.57,4373.18],"6-78-30":[130.76,1692.99],"6-78-31":[-26.1,881.98],"6-78-32":[-77.85,278.94],"6-78-33":[-77.15,504.42],"6-78-34":[-74.93,56.49],"6-78-35":[-67.51,634.05],"6-78-36":[-58.21,1404.07],"6-78-37":[-82.52,980.89],"6-78-38":[-39.1,-9.7],"6-78-39":[-22.61,25.58],"6-78-40":[-3.87,7.79],"6-78-41":[3.4,20.43],"6-78-42":[8.86,32.47],"6-78-43":[15.8,49.23],"6-78-44":[24.72,59.67],"6-78-45":[29.26,78.45],"6-78-46":[35.64,87.67],"6-78-47":[42.4,92.7],"6-78-48":[42.73,92.7],"6-78-49":[43.34,91.97],"6-78-50":[45.44,100.71],"6-78-51":[40.21,95.44],"6-78-52":[34.91,81.61],"6-78-53":[31.4,70.9],"6-78-54":[26.8,64.39],"6-78-55":[25.07,54.85],"6-78-56":[20.74,1829.25],"6-78-57":[790.9,3049.46],"6-78-58":[3035,3654.4],"6-78-59":[3633.12,3814.29],"6-78-60":[3460.17,3676.48],"6-78-61":[3182.26,3515.55],"6-78-62":[2907.96,3278.24],"6-78-63":[-29.54,2956.72],"6-79-0":[13.6,35.35],"6-79-1":[18.17,40.15],"5-39-0":[13.6,41.37],"6-79-2":[18.31,40.92],"6-79-3":[14.08,38.78],"5-39-1":[14.08,41.71],"4-19-0":[13.6,120.99],"6-79-4":[8.85,27.87],"6-79-5":[7.69,19.46],"5-39-2":[7.69,32.25],"6-79-6":[6.77,17.55],"6-79-7":[7.34,252.89],"5-39-3":[6.77,327.91],"4-19-1":[6.77,1139.05],"3-9-0":[6.77,1181.22],"6-79-8":[10.65,224],"6-79-9":[12.58,273.71],"5-39-4":[10.65,314.82],"6-79-10":[36.18,309.09],"6-79-11":[67.88,297.07],"5-39-5":[36.18,309.09],"4-19-2":[10.65,538.64],"6-79-12":[65.82,294.44],"6-79-13":[86.91,291.7],"5-39-6":[65.82,294.44],"6-79-14":[-19.35,260.4],"6-79-15":[-9.6,476.12],"5-39-7":[-19.35,680.41],"4-19-3":[-117.36,721.64],"3-9-1":[-181.36,4110.39],"2-4-0":[-181.36,4840.9],"6-79-16":[37.86,5616.16],"6-79-17":[25.49,5133.37],"5-39-8":[13.14,5616.16],"6-79-18":[263.18,4058.15],"6-79-19":[31.48,3448.78],"5-39-9":[31.48,4058.15],"4-19-4":[12.38,5616.16],"6-79-20":[2.31,377.37],"6-79-21":[110.72,790.42],"5-39-10":[2.31,1047.17],"6-79-22":[400.54,1407.05],"6-79-23":[692.97,1499.62],"5-39-11":[99.43,2149.19],"4-19-5":[-398.55,2689.12],"3-9-2":[-398.55,5616.16],"6-79-24":[612.19,1721.97],"6-79-25":[-26.78,2990.34],"5-39-12":[-38.59,2990.34],"6-79-26":[-70.23,3647.39],"6-79-27":[-179.38,3223.81],"5-39-13":[-202.91,3970.6],"4-19-6":[-202.91,4526.44],"6-79-28":[-41.82,3002.22],"6-79-29":[152.09,1451.56],"5-39-14":[-41.82,4373.18],"6-79-30":[61.26,913.05],"6-79-31":[-86.74,587.03],"5-39-15":[-86.74,1692.99],"4-19-7":[-86.74,4373.18],"3-9-3":[-202.91,5024.49],"2-4-1":[-398.55,5616.16],"6-79-32":[-87.58,65.61],"6-79-33":[-86.64,-37.76],"5-39-16":[-87.58,504.42],"6-79-34":[-81.84,-34.75],"6-79-35":[-71.3,-26.58],"5-39-17":[-81.84,634.05],"4-19-8":[-87.58,5869.55],"6-79-36":[-59.05,2336.88],"6-79-37":[-52.97,605.98],"5-39-18":[-82.52,2336.88],"6-79-38":[-43.74,926.36],"6-79-39":[-68.11,1064.17],"5-39-19":[-68.11,1064.17],"4-19-9":[-82.52,2969.88],"3-9-4":[-87.58,5869.55],"6-79-40":[-18.99,1347.93],"6-79-41":[-12.01,199.04],"5-39-20":[-18.99,1347.93],"6-79-42":[8.42,42.61],"6-79-43":[17.67,65.21],"5-39-21":[8.42,65.21],"4-19-10":[-18.99,1347.93],"6-79-44":[24.72,70.25],"6-79-45":[31.3,83.27],"5-39-22":[24.72,83.27],"6-79-46":[39.48,87.78],"6-79-47":[43.03,91.28],"5-39-23":[35.64,92.7],"4-19-11":[24.23,93.26],"3-9-5":[-242.83,3510.35],"2-4-2":[-242.83,5869.55],"6-79-48":[42.49,94.03],"6-79-49":[43.22,91.87],"5-39-24":[42.49,94.03],"6-79-50":[45.58,101.84],"6-79-51":[40.61,94.5],"5-39-25":[40.21,101.84],"4-19-12":[36.06,1277.56],"6-79-52":[35.82,81.74],"6-79-53":[31.85,70.92],"5-39-26":[31.4,81.74],"6-79-54":[28.07,64.4],"6-79-55":[25.07,56.23],"5-39-27":[25.07,64.4],"4-19-13":[22.21,81.74],"3-9-6":[15.45,1277.56],"6-79-56":[24.51,2238.4],"6-79-57":[1829.24,3044.79],"5-39-28":[20.74,3049.46],"6-79-58":[3023.55,3633.13],"6-79-59":[3590.92,3703.54],"5-39-29":[3023.55,3814.29],"4-19-14":[18.95,3814.29],"6-79-60":[3515.54,3739.77],"6-79-61":[3278.23,3596.54],"5-39-30":[3182.26,3739.77],"6-79-62":[2956.71,3326.45],"6-79-63":[-29.54,2985.88],"5-39-31":[-29.54,3326.45],"4-19-15":[-29.54,3739.77],"3-9-7":[-29.54,3814.29],"2-4-3":[-29.54,3814.29],"6-80-0":[13.6,34.92],"6-80-1":[17.78,39.27],"6-80-2":[16.68,40.65],"6-80-3":[11.49,517.11],"6-80-4":[7.13,26.45],"6-80-5":[4.68,16.89],"6-80-6":[4.58,15.08],"6-80-7":[4.73,237.51],"6-80-8":[7.54,245.48],"6-80-9":[34.12,285.08],"6-80-10":[9.18,302.02],"6-80-11":[61.24,248.97],"6-80-12":[48.7,347.27],"6-80-13":[6.35,372.83],"6-80-14":[-41.25,355.61],"6-80-15":[-76.27,115.89],"6-80-16":[-56.46,4485.88],"6-80-17":[-15.96,4116.85],"6-80-18":[161.31,4577.24],"6-80-19":[32.18,3588.07],"6-80-20":[-43.59,2783.91],"6-80-21":[-86.23,444.94],"6-80-22":[151.78,925.69],"6-80-23":[340.2,1343.13],"6-80-24":[285.31,1028.07],"6-80-25":[400.89,1455.51],"6-80-26":[79.57,2444.71],"6-80-27":[-65.02,2493.24],"6-80-28":[-50.69,2422.23],"6-80-29":[62.25,1006.97],"6-80-30":[-93.25,501.55],"6-80-31":[-99.6,235.87],"6-80-32":[-97.89,-42.83],"6-80-33":[-90.45,-40.91],"6-80-34":[-87.49,-33.55],"6-80-35":[-79.14,8.71],"6-80-36":[-62.55,621.18],"6-80-37":[-52.79,1207.88],"6-80-38":[-3.35,2631.65],"6-80-39":[-45.58,2635.66],"6-80-40":[-13.4,1977.92],"6-80-41":[3.13,244.27],"6-80-42":[12.3,42.61],"6-80-43":[19.05,65.05],"6-80-44":[27.43,70.26],"6-80-45":[35.59,85.76],"6-80-46":[41.63,87.78],"6-80-47":[42.87,92.37],"6-80-48":[44.13,94.46],"6-80-49":[43.94,91.87],"6-80-50":[45.05,99.84],"6-80-51":[40.48,92.21],"6-80-52":[35.29,81.74],"6-80-53":[31.46,70.92],"6-80-54":[28.44,63.71],"6-80-55":[27.25,572.15],"6-80-56":[26.34,2427.48],"6-80-57":[2238.39,3127.78],"6-80-58":[3023.7,3590.93],"6-80-59":[3513.32,3615.32],"6-80-60":[3595.11,3741.77],"6-80-61":[3326.44,3655.25],"6-80-62":[2985.87,3360.65],"6-80-63":[-29.54,3013.02],"6-81-0":[13.6,34.28],"6-81-1":[17.42,38.06],"5-40-0":[13.6,39.27],"6-81-2":[16.06,37.38],"6-81-3":[11.14,453.1],"5-40-1":[11.14,517.11],"6-81-4":[5.36,22.49],"6-81-5":[2.51,12.86],"5-40-2":[2.51,26.45],"6-81-6":[2.24,9.59],"6-81-7":[2.54,195.71],"5-40-3":[2.24,237.51],"6-81-8":[7.96,467.27],"6-81-9":[65.32,477.07],"5-40-4":[7.54,477.07],"6-81-10":[7.84,275.89],"6-81-11":[59.53,298.46],"5-40-5":[7.84,302.02],"6-81-12":[19.86,367.95],"6-81-13":[0.32,377.5],"5-40-6":[0.32,377.5],"6-81-14":[-51.54,65.52],"6-81-15":[-57.25,5.04],"5-40-7":[-76.27,355.61],"6-81-16":[-43.48,748.23],"6-81-17":[-65.9,4455.71],"5-40-8":[-65.9,4485.88],"6-81-18":[-73,4802.09],"6-81-19":[473.29,3898.23],"5-40-9":[-73,4802.09],"6-81-20":[-93.21,4173.89],"6-81-21":[-121.55,2032.48],"5-40-10":[-121.55,4173.89],"6-81-22":[-85.21,483.61],"6-81-23":[-57.81,539.09],"5-40-11":[-85.21,1343.13],"6-81-24":[77.98,467.81],"6-81-25":[176.55,1015.61],"5-40-12":[77.98,1455.51],"6-81-26":[-51.14,2138.39],"6-81-27":[-58.49,2078.28],"5-40-13":[-65.02,2493.24],"6-81-28":[-83.94,1996.26],"6-81-29":[-102.99,846.67],"5-40-14":[-102.99,2422.23],"6-81-30":[-103.29,410.82],"6-81-31":[-103.34,-46.62],"5-40-15":[-103.34,501.55],"6-81-32":[-99.7,-45.29],"6-81-33":[-91.37,-41.35],"5-40-16":[-99.7,-40.91],"6-81-34":[-87.05,-35.59],"6-81-35":[-80.36,-28.86],"5-40-17":[-87.49,8.71],"6-81-36":[-95.35,2866.35],"6-81-37":[-44.05,2817.4],"5-40-18":[-95.35,2866.35],"6-81-38":[-37.94,1755.56],"6-81-39":[-49.87,1687.3],"5-40-19":[-49.87,2635.66],"6-81-40":[-10.79,75],"6-81-41":[1.07,25.08],"5-40-20":[-13.4,1977.92],"6-81-42":[8.34,34.81],"6-81-43":[16.88,54.43],"5-40-21":[8.34,65.05],"6-81-44":[27.43,70.86],"6-81-45":[35.92,83.88],"5-40-22":[27.43,85.76],"6-81-46":[39.83,85.23],"6-81-47":[42.1,89.88],"5-40-23":[39.83,92.37],"6-81-48":[10.5,895.68],"6-81-49":[44.14,90.78],"5-40-24":[10.5,895.68],"6-81-50":[42.93,94.4],"6-81-51":[38.91,91.87],"5-40-25":[38.91,99.84],"6-81-52":[33.96,80.53],"6-81-53":[30.7,68.94],"5-40-26":[30.7,81.74],"6-81-54":[28.32,62.75],"6-81-55":[29.72,1099.75],"5-40-27":[27.25,1099.75],"6-81-56":[30.45,2482.8],"6-81-57":[2427.47,3161.72],"5-40-28":[26.34,3161.72],"6-81-58":[3127.77,3513.33],"6-81-59":[3362.15,3613.49],"5-40-29":[3023.7,3615.32],"6-81-60":[3596.57,3745.47],"6-81-61":[3360.64,3699.75],"5-40-30":[3326.44,3745.47],"6-81-62":[3013.01,3382.27],"6-81-63":[-29.54,3034.71],"5-40-31":[-29.54,3382.27],"6-82-0":[13.6,33.76],"6-82-1":[17,37.12],"6-82-2":[15.53,35.52],"6-82-3":[8.15,574.46],"6-82-4":[4.35,19.3],"6-82-5":[1.27,79.61],"6-82-6":[0.56,585.93],"6-82-7":[0.54,166.68],"6-82-8":[5.53,263.89],"6-82-9":[23.58,441.34],"6-82-10":[5.37,321.16],"6-82-11":[52.24,337.16],"6-82-12":[32.72,384.64],"6-82-13":[-1.79,320.68],"6-82-14":[-63.46,173.57],"6-82-15":[-85.87,-10.01],"6-82-16":[-173.82,522.27],"6-82-17":[-63.16,294.16],"6-82-18":[-61.41,3417.02],"6-82-19":[-32.51,5595.76],"6-82-20":[768.45,4411.42],"6-82-21":[-91.09,4366.48],"6-82-22":[-64.72,1761.32],"6-82-23":[-110.57,170.47],"6-82-24":[-44.95,274.33],"6-82-25":[68.28,1114.62],"6-82-26":[-145.36,1466.69],"6-82-27":[-88.55,1380.57],"6-82-28":[-104.68,723.52],"6-82-29":[-111.56,-41.96],"6-82-30":[-110.83,-50.61],"6-82-31":[-104.52,-49.03],"6-82-32":[-100.44,-45.11],"6-82-33":[-93.4,-10.81],"6-82-34":[-83.72,5.08],"6-82-35":[-74.96,-0.2],"6-82-36":[-62.66,-19.8],"6-82-37":[-49.14,-15.48],"6-82-38":[-35.86,-11.67],"6-82-39":[-24.06,-4.21],"6-82-40":[-11.33,1.34],"6-82-41":[0.88,15.42],"6-82-42":[7.73,31.56],"6-82-43":[16.23,52.89],"6-82-44":[26.35,70.9],"6-82-45":[33.59,79.74],"6-82-46":[36.43,83.44],"6-82-47":[40.09,89.7],"6-82-48":[31.65,1115.13],"6-82-49":[43.67,90.18],"6-82-50":[42.26,91.9],"6-82-51":[37.84,90.05],"6-82-52":[33.96,77.84],"6-82-53":[30.52,67.42],"6-82-54":[28.32,61.42],"6-82-55":[29.72,1774.62],"6-82-56":[1099.74,2729.04],"6-82-57":[2482.79,3157.08],"6-82-58":[3040.04,3362.16],"6-82-59":[3161.66,3614.29],"6-82-60":[3541.01,3772.23],"6-82-61":[3382.26,3728.18],"6-82-62":[3034.7,3397.85],"6-82-63":[-29.54,3048.46],"6-83-0":[13.6,33.14],"6-83-1":[16.83,36.08],"5-41-0":[13.6,37.12],"6-83-2":[15.31,35.22],"6-83-3":[8.15,497.91],"5-41-1":[8.15,574.46],"4-20-0":[8.15,574.46],"6-83-4":[2.83,16.01],"6-83-5":[1.2,1212.81],"5-41-2":[1.2,1212.81],"6-83-6":[-2.49,1230.82],"6-83-7":[-3.49,212.13],"5-41-3":[-3.49,1230.82],"4-20-1":[-3.49,1230.82],"6-83-8":[21.02,244.39],"6-83-9":[32.38,331.03],"5-41-4":[5.53,441.34],"6-83-10":[0.65,350.47],"6-83-11":[53.02,469.81],"5-41-5":[0.65,469.81],"4-20-2":[0.65,477.07],"6-83-12":[50.86,476.59],"6-83-13":[40.69,627.4],"5-41-6":[-1.79,627.4],"6-83-14":[-46.59,323.7],"6-83-15":[-87.65,232.09],"5-41-7":[-87.65,323.7],"4-20-3":[-87.65,627.4],"6-83-16":[-161.11,321.64],"6-83-17":[-92.99,1858.17],"5-41-8":[-173.82,1858.17],"6-83-18":[-78.58,3878.24],"6-83-19":[299.23,3814.01],"5-41-9":[-78.58,5595.76],"4-20-4":[-173.82,5595.76],"6-83-20":[674.01,4034.31],"6-83-21":[627.23,3448.75],"5-41-10":[-91.09,4411.42],"6-83-22":[-84.08,2931.28],"6-83-23":[-93.5,1395.64],"5-41-11":[-110.57,2931.28],"4-20-5":[-121.55,4411.42],"6-83-24":[-29.8,300.19],"6-83-25":[-71.95,1727.17],"5-41-12":[-71.95,1727.17],"6-83-26":[-76.15,1060.42],"6-83-27":[-94.46,1466.16],"5-41-13":[-145.36,1466.69],"4-20-6":[-145.36,2493.24],"6-83-28":[-107.49,-44.27],"6-83-29":[-112.89,-51.27],"5-41-14":[-112.89,723.52],"6-83-30":[-112.22,-52.38],"6-83-31":[-111.92,-50.21],"5-41-15":[-112.22,-49.03],"4-20-7":[-112.89,2422.23],"6-83-32":[-107.44,-46.38],"6-83-33":[-100.55,862.8],"5-41-16":[-107.44,862.8],"6-83-34":[-86.9,-10.47],"6-83-35":[-74.63,-31.32],"5-41-17":[-86.9,5.08],"4-20-8":[-107.44,862.8],"6-83-36":[-65.81,-24.56],"6-83-37":[-50.21,-9.89],"5-41-18":[-65.81,-9.89],"6-83-38":[-36.27,-11.19],"6-83-39":[-27.02,3059.56],"5-41-19":[-36.27,3059.56],"4-20-9":[-95.35,3059.56],"6-83-40":[-8.14,2.28],"6-83-41":[0.88,16.25],"5-41-20":[-11.33,16.25],"6-83-42":[7.73,33.52],"6-83-43":[16.98,55.76],"5-41-21":[7.73,55.76],"4-20-10":[-13.4,1977.92],"6-83-44":[26.42,65.98],"6-83-45":[28.62,71.78],"5-41-22":[26.35,79.74],"6-83-46":[31.75,77.92],"6-83-47":[36.38,85.71],"5-41-23":[31.75,89.7],"4-20-11":[26.35,92.37],"6-83-48":[41.07,88.96],"6-83-49":[41.42,88.26],"5-41-24":[31.65,1115.13],"6-83-50":[40.86,86.86],"6-83-51":[37.02,83.45],"5-41-25":[37.02,91.9],"4-20-12":[10.5,1115.13],"6-83-52":[33.5,75.38],"6-83-53":[30.59,67.43],"5-41-26":[30.52,77.84],"6-83-54":[28.68,62.32],"6-83-55":[29.58,2242.91],"5-41-27":[28.32,2242.91],"4-20-13":[27.25,2242.91],"6-83-56":[568.49,2841.08],"6-83-57":[2729.03,3100.22],"5-41-28":[568.49,3157.08],"6-83-58":[2651.98,3161.67],"6-83-59":[2944.39,3541.02],"5-41-29":[2651.98,3614.29],"4-20-14":[26.34,3615.32],"6-83-60":[3405.03,3807.22],"6-83-61":[3397.84,3762.75],"5-41-30":[3382.26,3807.22],"6-83-62":[3048.45,3423.55],"6-83-63":[-29.54,3056.25],"5-41-31":[-29.54,3423.55],"4-20-15":[-29.54,3807.22],"6-84-0":[13.6,32.73],"6-84-1":[15.68,35.52],"6-84-2":[14.45,462.92],"6-84-3":[6.06,600.63],"6-84-4":[1.87,99.91],"6-84-5":[-4.13,1436.73],"6-84-6":[-6.38,243.89],"6-84-7":[-6.07,220.04],"6-84-8":[14.07,1250.98],"6-84-9":[44.8,1096.24],"6-84-10":[-0.2,1512.31],"6-84-11":[81.33,975.89],"6-84-12":[69.62,1624.4],"6-84-13":[-109.79,1020.66],"6-84-14":[69.5,630.85],"6-84-15":[-35.73,381.12],"6-84-16":[-25.96,265.27],"6-84-17":[-108.09,292.44],"6-84-18":[2.44,3050.69],"6-84-19":[657.64,3289.8],"6-84-20":[218.2,3513.08],"6-84-21":[84.19,4466.14],"6-84-22":[-257.75,3206.24],"6-84-23":[-71.96,2955.44],"6-84-24":[-79.76,1006.29],"6-84-25":[-89.61,187.1],"6-84-26":[-101.44,-35.61],"6-84-27":[-105.8,-39.16],"6-84-28":[-108.15,-47.23],"6-84-29":[-116.74,-51.27],"6-84-30":[-120.83,-54.73],"6-84-31":[-121.14,-53.64],"6-84-32":[-120.53,-50.27],"6-84-33":[-111.77,-41.47],"6-84-34":[-97.72,-15.91],"6-84-35":[-82.46,-11.7],"6-84-36":[-73.49,-25.08],"6-84-37":[-58.26,-16.99],"6-84-38":[-39.63,-4.4],"6-84-39":[-29.1,810.67],"6-84-40":[-9.76,2.28],"6-84-41":[0.83,15.41],"6-84-42":[7.34,34.61],"6-84-43":[17.48,52.91],"6-84-44":[21.66,56.56],"6-84-45":[24.5,63.5],"6-84-46":[28.48,71.79],"6-84-47":[33.69,82.14],"6-84-48":[37.05,84.5],"6-84-49":[39.19,84.88],"6-84-50":[37.64,82.95],"6-84-51":[36.03,81.01],"6-84-52":[33.47,74.05],"6-84-53":[30.96,66.44],"6-84-54":[28.91,62.37],"6-84-55":[28.43,1169.19],"6-84-56":[306.84,2834.46],"6-84-57":[2494.94,2971.6],"6-84-58":[2350.48,2944.4],"6-84-59":[2693.02,3405.04],"6-84-60":[3368.56,3828.34],"6-84-61":[3423.54,3798.94],"6-84-62":[3056.21,3451.5],"6-84-63":[-29.54,3061.98],"6-85-0":[13.6,32.27],"6-85-1":[15.62,35.54],"5-42-0":[13.6,35.54],"6-85-2":[13.83,255.88],"6-85-3":[6.06,601.05],"5-42-1":[6.06,601.05],"6-85-4":[1.27,851.35],"6-85-5":[-6.92,1078],"5-42-2":[-6.92,1436.73],"6-85-6":[-11.51,152.24],"6-85-7":[-9.86,400.74],"5-42-3":[-11.51,400.74],"6-85-8":[20.67,1773.8],"6-85-9":[-5.63,1487.95],"5-42-4":[-5.63,1773.8],"6-85-10":[-53.11,1559.37],"6-85-11":[-77.24,864.4],"5-42-5":[-77.24,1559.37],"6-85-12":[-233.11,1394.5],"6-85-13":[29.59,600.13],"5-42-6":[-233.11,1624.4],"6-85-14":[24.54,429.21],"6-85-15":[-30.91,315.69],"5-42-7":[-35.73,630.85],"6-85-16":[-30.47,243.14],"6-85-17":[32.63,430.08],"5-42-8":[-108.09,430.08],"6-85-18":[50.89,3092.4],"6-85-19":[225.19,3228.78],"5-42-9":[2.44,3289.8],"6-85-20":[429.56,2831.82],"6-85-21":[250.94,3905.23],"5-42-10":[84.19,4466.14],"6-85-22":[-102.11,3453.88],"6-85-23":[-86,2164.41],"5-42-11":[-257.75,3453.88],"6-85-24":[-99.8,1992.49],"6-85-25":[-110.95,-39.87],"5-42-12":[-110.95,1992.49],"6-85-26":[-117.41,-43.92],"6-85-27":[-127.52,-50.66],"5-42-13":[-127.52,-35.61],"6-85-28":[-132,-54.32],"6-85-29":[-131.84,-55.09],"5-42-14":[-132,-47.23],"6-85-30":[-135.58,-59.06],"6-85-31":[-136.23,-60.26],"5-42-15":[-136.23,-53.64],"6-85-32":[-135.19,-55.88],"6-85-33":[-126.29,-49.83],"5-42-16":[-135.19,-41.47],"6-85-34":[-114.17,-41.73],"6-85-35":[-93.31,-35.72],"5-42-17":[-114.17,-11.7],"6-85-36":[-76.7,-25.51],"6-85-37":[-60.92,12.57],"5-42-18":[-76.7,12.57],"6-85-38":[-42.13,-11.51],"6-85-39":[-26.51,-4.38],"5-42-19":[-42.13,810.67],"6-85-40":[-10.15,1.03],"6-85-41":[0.61,18.41],"5-42-20":[-10.15,18.41],"6-85-42":[7.34,33.4],"6-85-43":[14.16,42.27],"5-42-21":[7.34,52.91],"6-85-44":[20.8,47.97],"6-85-45":[23.87,56.43],"5-42-22":[20.8,63.5],"6-85-46":[27.26,65.1],"6-85-47":[30.36,73.18],"5-42-23":[27.26,82.14],"6-85-48":[33.17,77.75],"6-85-49":[36.61,78.57],"5-42-24":[33.17,84.88],"6-85-50":[36.35,77.83],"6-85-51":[34.92,75.64],"5-42-25":[34.92,82.95],"6-85-52":[32.62,71.77],"6-85-53":[30.3,66.45],"5-42-26":[30.3,74.05],"6-85-54":[27.35,61.96],"6-85-55":[26.88,470.02],"5-42-27":[26.88,1169.19],"6-85-56":[29.8,2724.67],"6-85-57":[1711.99,2726.3],"5-42-28":[29.8,2971.6],"6-85-58":[1711.99,2693.03],"6-85-59":[2435.24,3395.87],"5-42-29":[1711.99,3405.04],"6-85-60":[3366.59,3894.08],"6-85-61":[3451.49,3860.75],"5-42-30":[3366.59,3894.08],"6-85-62":[3061.9,3477.38],"6-85-63":[-29.54,3064.64],"5-42-31":[-29.54,3477.38],"6-86-0":[13.59,31.92],"6-86-1":[14.49,35.54],"6-86-2":[11.81,372.35],"6-86-3":[3.34,515.4],"6-86-4":[1.06,851.78],"6-86-5":[-8.29,891.68],"6-86-6":[-14.79,-3.6],"6-86-7":[-14.04,414.42],"6-86-8":[-7.9,1361.22],"6-86-9":[-6.91,250.25],"6-86-10":[-12.46,219.71],"6-86-11":[30.07,213.66],"6-86-12":[40.86,217.01],"6-86-13":[-251.81,281.46],"6-86-14":[1.35,248.91],"6-86-15":[3.27,244.16],"6-86-16":[-29.82,713.35],"6-86-17":[-65.15,925.05],"6-86-18":[118.27,769.1],"6-86-19":[259.05,3625.13],"6-86-20":[437.51,4120.59],"6-86-21":[417.86,2348.74],"6-86-22":[-70.2,2575.17],"6-86-23":[-95.29,426.39],"6-86-24":[-105.6,-40.84],"6-86-25":[-120.89,-49.19],"6-86-26":[-133.2,-54.84],"6-86-27":[-143.88,-59.25],"6-86-28":[-150.34,-63.76],"6-86-29":[-151.57,-65.77],"6-86-30":[-150.84,-65.78],"6-86-31":[-149.1,-67.58],"6-86-32":[-147.35,-64],"6-86-33":[-138.48,-57.09],"6-86-34":[-126.92,-47.83],"6-86-35":[-107,-36.76],"6-86-36":[-89.42,-30.07],"6-86-37":[-64.88,-21.06],"6-86-38":[-48.23,209.37],"6-86-39":[-26.28,376.48],"6-86-40":[-11.57,0.81],"6-86-41":[0.26,18.37],"6-86-42":[7.71,27.18],"6-86-43":[12.56,39.03],"6-86-44":[18.37,47.62],"6-86-45":[23.48,52.93],"6-86-46":[25.88,59.58],"6-86-47":[28.88,66.34],"6-86-48":[31.73,72.21],"6-86-49":[35.04,79.61],"6-86-50":[34.66,75.08],"6-86-51":[34.42,72.8],"6-86-52":[31.27,70.56],"6-86-53":[28.81,64.55],"6-86-54":[26.88,60.6],"6-86-55":[24.41,59.6],"6-86-56":[27.96,2407.49],"6-86-57":[1004.17,2407.49],"6-86-58":[953.72,2435.25],"6-86-59":[2297.21,3458.7],"6-86-60":[3395.86,3925.85],"6-86-61":[3477.37,3915.12],"6-86-62":[3064.43,3500.58],"6-86-63":[-29.54,3065.4],"6-87-0":[13.59,31.44],"6-87-1":[14.36,35.37],"5-43-0":[13.59,35.54],"6-87-2":[10.38,28.84],"6-87-3":[2.68,330.3],"5-43-1":[2.68,515.4],"4-21-0":[2.68,601.05],"6-87-4":[-2.16,1077],"6-87-5":[-10.36,397.96],"5-43-2":[-10.36,1077],"6-87-6":[-15.86,38],"6-87-7":[-16.5,1223.93],"5-43-3":[-16.5,1223.93],"4-21-1":[-16.5,1436.73],"3-10-0":[-16.5,1436.73],"6-87-8":[-9.11,1275.39],"6-87-9":[-9.42,200.27],"5-43-4":[-9.42,1361.22],"6-87-10":[-16.29,154.26],"6-87-11":[12.98,142.53],"5-43-5":[-16.29,219.71],"4-21-2":[-77.24,1773.8],"6-87-12":[33.77,210.72],"6-87-13":[8.93,447.9],"5-43-6":[-251.81,447.9],"6-87-14":[78.72,1084.54],"6-87-15":[-9.6,566.99],"5-43-7":[-9.6,1084.54],"4-21-3":[-251.81,1624.4],"3-10-1":[-251.81,1773.8],"6-87-16":[64.29,821.12],"6-87-17":[59.56,2139.17],"5-43-8":[-65.15,2139.17],"6-87-18":[168.8,4103.6],"6-87-19":[306.05,4599.84],"5-43-9":[118.27,4599.84],"4-21-4":[-108.09,4599.84],"6-87-20":[773.43,4772.12],"6-87-21":[-3.55,3524.89],"5-43-10":[-3.55,4772.12],"6-87-22":[-79.15,2437.68],"6-87-23":[-101.84,529.04],"5-43-11":[-101.84,2575.17],"4-21-5":[-257.75,4772.12],"3-10-2":[-257.75,5595.76],"6-87-24":[-118.44,-45.37],"6-87-25":[-141.93,-54.11],"5-43-12":[-141.93,-40.84],"6-87-26":[-150.7,-61.38],"6-87-27":[-163.78,-68.36],"5-43-13":[-163.78,-54.84],"4-21-6":[-163.78,1992.49],"6-87-28":[-170.56,-73.16],"6-87-29":[-174.45,-76.65],"5-43-14":[-174.45,-63.76],"6-87-30":[-173.2,-74.88],"6-87-31":[-167.31,-74.44],"5-43-15":[-173.2,-65.78],"4-21-7":[-174.45,-47.23],"3-10-3":[-174.45,2493.24],"6-87-32":[-162.11,-70.63],"6-87-33":[-151.07,-64.32],"5-43-16":[-162.11,-57.09],"6-87-34":[-139.14,-55.61],"6-87-35":[-119.37,-45.34],"5-43-17":[-139.14,-36.76],"4-21-8":[-162.11,-11.7],"6-87-36":[-99.82,-34.09],"6-87-37":[-73.91,-24.11],"5-43-18":[-99.82,-21.06],"6-87-38":[-54.69,-13.14],"6-87-39":[-30.91,-5.98],"5-43-19":[-54.69,376.48],"4-21-9":[-99.82,810.67],"3-10-4":[-162.11,3059.56],"6-87-40":[-16.87,0.27],"6-87-41":[-1.52,14.6],"5-43-20":[-16.87,18.37],"6-87-42":[5.69,23.57],"6-87-43":[10.55,36.11],"5-43-21":[5.69,39.03],"4-21-10":[-16.87,52.91],"6-87-44":[18.37,45.54],"6-87-45":[20.45,51.47],"5-43-22":[18.37,52.93],"6-87-46":[25.88,56.59],"6-87-47":[28.04,63.44],"5-43-23":[25.88,66.34],"4-21-11":[18.37,82.14],"3-10-5":[-16.87,1977.92],"6-87-48":[31.01,78.85],"6-87-49":[35.15,81.15],"5-43-24":[31.01,81.15],"6-87-50":[34.57,74.84],"6-87-51":[33.74,72.48],"5-43-25":[33.74,75.08],"4-21-12":[31.01,84.88],"6-87-52":[30.61,72.75],"6-87-53":[28.03,63.27],"5-43-26":[28.03,72.75],"6-87-54":[25.92,57.16],"6-87-55":[24.41,55.46],"5-43-27":[24.41,60.6],"4-21-13":[24.41,1169.19],"3-10-6":[10.5,2242.91],"6-87-56":[25.66,1925.54],"6-87-57":[136.32,1897.68],"5-43-28":[25.66,2407.49],"6-87-58":[355.79,2297.22],"6-87-59":[2244.47,3491.07],"5-43-29":[355.79,3491.07],"4-21-14":[25.66,3491.07],"6-87-60":[3458.69,3965.2],"6-87-61":[3500.57,3965.2],"5-43-30":[3395.86,3965.2],"6-87-62":[3065.04,3512.38],"6-87-63":[-29.54,3065.32],"5-43-31":[-29.54,3512.38],"4-21-15":[-29.54,3965.2],"3-10-7":[-29.54,3965.2],"6-88-0":[13.58,31.01],"6-88-1":[13.27,34.8],"6-88-2":[9.6,27.7],"6-88-3":[1.29,19.28],"6-88-4":[-5.14,793.47],"6-88-5":[-12.58,3.96],"6-88-6":[-14.53,64.34],"6-88-7":[-18.34,249.41],"6-88-8":[-13.24,223.3],"6-88-9":[3.21,226.52],"6-88-10":[-20.98,136.47],"6-88-11":[2.46,131.78],"6-88-12":[34.5,332.5],"6-88-13":[145.85,893.06],"6-88-14":[222.12,731.79],"6-88-15":[55.49,447.99],"6-88-16":[49.18,2106.12],"6-88-17":[156.79,5451.96],"6-88-18":[244.11,5411.27],"6-88-19":[361.44,5666.76],"6-88-20":[181.3,4714.77],"6-88-21":[-15.14,3432.07],"6-88-22":[-77.27,1024.24],"6-88-23":[-103.33,403.18],"6-88-24":[-126.49,569.02],"6-88-25":[-152.38,-59.6],"6-88-26":[-167.17,-70.97],"6-88-27":[-179.31,-76.12],"6-88-28":[-187.08,-81.89],"6-88-29":[-189.2,-85.59],"6-88-30":[-189.78,-83.95],"6-88-31":[-187.17,-81.05],"6-88-32":[-180.89,-76.23],"6-88-33":[-170.46,-69.57],"6-88-34":[-155.68,-60.53],"6-88-35":[-133.85,-49.91],"6-88-36":[-111.17,-38.44],"6-88-37":[-86,-27.34],"6-88-38":[-66.93,-16.67],"6-88-39":[-40.72,-8.66],"6-88-40":[-24.16,-1.51],"6-88-41":[-5.67,10.45],"6-88-42":[1.91,19.79],"6-88-43":[7.53,31.3],"6-88-44":[12.64,39.85],"6-88-45":[17.05,49.39],"6-88-46":[21.65,55.46],"6-88-47":[26.11,62.12],"6-88-48":[30.67,79.28],"6-88-49":[-55.82,1713.79],"6-88-50":[33.89,78.24],"6-88-51":[33.4,70.95],"6-88-52":[29.73,72.08],"6-88-53":[27.21,63.18],"6-88-54":[24.13,56.07],"6-88-55":[22.3,50.78],"6-88-56":[16.28,1116.82],"6-88-57":[13.9,1564.5],"6-88-58":[355.79,2295.88],"6-88-59":[2244.13,3490.99],"6-88-60":[3476.04,3997.79],"6-88-61":[3512.37,4001.34],"6-88-62":[3064.8,3523.63],"6-88-63":[-29.54,3065.05],"6-89-0":[13.6,30.41],"6-89-1":[13.24,33.54],"5-44-0":[13.24,34.8],"6-89-2":[9.34,26.43],"6-89-3":[1.06,16.79],"5-44-1":[1.06,27.7],"6-89-4":[-9.36,2.28],"6-89-5":[-14.35,7.89],"5-44-2":[-14.35,793.47],"6-89-6":[-19.83,60.3],"6-89-7":[-28.71,104.27],"5-44-3":[-28.71,249.41],"6-89-8":[-30.59,100.53],"6-89-9":[14.74,139.63],"5-44-4":[-30.59,226.52],"6-89-10":[-23.64,118.52],"6-89-11":[12.07,117.67],"5-44-5":[-23.64,136.47],"6-89-12":[-17.42,204.12],"6-89-13":[-52.7,749.66],"5-44-6":[-52.7,893.06],"6-89-14":[235.46,1122.49],"6-89-15":[163.09,1082.6],"5-44-7":[55.49,1122.49],"6-89-16":[148.14,4445.78],"6-89-17":[252.71,5979.55],"5-44-8":[49.18,5979.55],"6-89-18":[784.14,7425.22],"6-89-20":[59.84,2777.08],"6-89-19":[190.61,7670.17],"5-44-9":[190.61,7670.17],"6-89-21":[3.23,1028.73],"5-44-10":[-15.14,4714.77],"6-89-22":[-10.18,913.48],"6-89-23":[-89.16,1654.1],"5-44-11":[-103.33,1654.1],"6-89-24":[-133.04,1010.35],"6-89-25":[-155.77,598.43],"5-44-12":[-155.77,1010.35],"6-89-26":[-173.23,-75.99],"6-89-27":[-184.16,-67.66],"5-44-13":[-184.16,-67.66],"6-89-28":[-193.17,-72.32],"6-89-29":[-194.63,-67.67],"5-44-14":[-194.63,-67.67],"6-89-30":[-195.24,-67.2],"6-89-31":[-194.81,-43.56],"5-44-15":[-195.24,-43.56],"6-89-32":[-191.21,-78.05],"6-89-33":[-180.97,-40.52],"5-44-16":[-191.21,-40.52],"6-89-34":[-165.05,-37.6],"6-89-35":[-149.67,-56.07],"5-44-17":[-165.05,-37.6],"6-89-36":[-128.73,-45.3],"6-89-37":[-102.87,-34.29],"5-44-18":[-128.73,-27.34],"6-89-38":[-81.85,-22.52],"6-89-39":[-54.75,-12.77],"5-44-19":[-81.85,-8.66],"6-89-40":[-37.19,-4.34],"6-89-41":[-16.37,3.13],"5-44-20":[-37.19,10.45],"6-89-42":[-2.98,13.04],"6-89-43":[4.23,24.34],"5-44-21":[-2.98,31.3],"6-89-44":[9.98,32.16],"6-89-45":[13.89,42.42],"5-44-22":[9.98,49.39],"6-89-46":[21.65,50.58],"6-89-47":[23.2,61.35],"5-44-23":[21.65,62.12],"6-89-48":[28.47,76.1],"6-89-49":[32.48,302.78],"5-44-24":[-55.82,1713.79],"6-89-50":[6.34,315.35],"6-89-51":[32.78,72.05],"5-44-25":[6.34,315.35],"6-89-52":[28.91,68.61],"6-89-53":[26.94,58.88],"5-44-26":[26.94,72.08],"6-89-54":[21.2,53.9],"6-89-55":[21.2,49.06],"5-44-27":[21.2,56.07],"6-89-56":[16.07,392.26],"6-89-57":[13.9,1769.28],"5-44-28":[13.9,1769.28],"6-89-58":[1383.42,2436.17],"6-89-59":[2295.87,3484.93],"5-44-29":[355.79,3490.99],"6-89-60":[3476.04,4020.7],"6-89-61":[3523.62,4020.7],"5-44-30":[3476.04,4020.7],"6-89-62":[3063.59,3529.73],"6-89-63":[-29.54,3064.81],"5-44-31":[-29.54,3529.73],"6-90-0":[13.56,29.93],"6-90-1":[12.18,32.39],"6-90-2":[9.21,25.5],"6-90-3":[0.25,16.06],"6-90-4":[-11.93,1.31],"6-90-5":[-15.18,-4.47],"6-90-6":[-19.83,102.14],"6-90-7":[-28.89,97.21],"6-90-8":[-30.59,91.65],"6-90-9":[11.33,169.41],"6-90-10":[-26.48,102.52],"6-90-11":[16.21,130.71],"6-90-12":[-4.57,132.71],"6-90-13":[-44.99,965.27],"6-90-14":[341.61,1507.27],"6-90-15":[71.29,1151.88],"6-90-16":[241.76,4807.35],"6-90-17":[805.57,6513.21],"6-90-18":[1232.72,7543.41],"6-90-20":[101.67,5343.32],"6-90-21":[81.23,447.8],"6-90-22":[129.06,998],"6-90-19":[396.49,8087.96],"6-90-23":[-71.01,1264.93],"6-90-24":[-72.08,1499.22],"6-90-25":[-97.09,1527.78],"6-90-26":[-172.11,969.76],"6-90-27":[-189.5,1943.78],"6-90-28":[-199.61,132.05],"6-90-29":[-204.11,-76.78],"6-90-30":[-205.07,-73.55],"6-90-31":[-204.43,-69.28],"6-90-32":[-200.91,-74.1],"6-90-33":[-190.7,-82.52],"6-90-34":[-178.25,-74.83],"6-90-35":[-156.76,-64.37],"6-90-36":[-137.02,-52.73],"6-90-37":[-110.72,-40.93],"6-90-38":[-90.74,-28.8],"6-90-39":[-64.94,-19.04],"6-90-40":[-47.65,-9.27],"6-90-41":[-26.36,-1.84],"6-90-42":[-11.95,7.04],"6-90-43":[1.09,18.97],"6-90-44":[6.57,26.74],"6-90-45":[11.56,36.44],"6-90-46":[16.22,45.25],"6-90-47":[21.29,56.94],"6-90-48":[26.15,64.98],"6-90-49":[29.48,73.84],"6-90-50":[27.75,2779.41],"6-90-51":[30.57,74.05],"6-90-52":[29.34,65.8],"6-90-53":[23.63,58.34],"6-90-54":[20.44,50.44],"6-90-55":[17.32,44.95],"6-90-56":[15.75,1525.64],"6-90-57":[392.25,2210.25],"6-90-58":[1769.27,2619.19],"6-90-59":[2436.16,3487.6],"6-90-60":[3484.48,4037.87],"6-90-61":[3527.59,4030.9],"6-90-62":[3063.36,3530.31],"6-90-63":[-29.54,3064.82],"6-91-0":[13.58,29.33],"6-91-1":[12.18,31.01],"5-45-0":[12.18,32.39],"6-91-2":[8.56,24.24],"6-91-3":[-0.35,15.89],"5-45-1":[-0.35,25.5],"4-22-0":[-0.35,34.8],"6-91-4":[-13.02,0.37],"6-91-5":[-17.46,-5.58],"5-45-2":[-17.46,1.31],"6-91-6":[-20,102],"6-91-7":[-29.05,103.01],"5-45-3":[-29.05,103.01],"4-22-1":[-29.05,793.47],"6-91-8":[-29.05,81.75],"6-91-9":[-9.54,122.72],"5-45-4":[-30.59,169.41],"6-91-10":[-28.84,110.81],"6-91-11":[16.8,118.68],"5-45-5":[-28.84,130.71],"4-22-2":[-30.59,226.52],"6-91-12":[41.21,133.68],"6-91-13":[17.89,487.76],"5-45-6":[-44.99,965.27],"6-91-14":[131.95,1504.92],"6-91-15":[271.47,1384.81],"5-45-7":[71.29,1507.27],"4-22-3":[-52.7,1507.27],"6-91-16":[329.52,4930.95],"6-91-17":[1039.82,5827.63],"5-45-8":[241.76,6513.21],"6-91-18":[1051.98,6379.76],"6-91-19":[2249.39,8560.58],"5-45-9":[396.49,8560.58],"4-22-4":[49.18,8560.58],"6-91-20":[176.06,6725.08],"6-91-21":[96.74,4563.58],"5-45-10":[81.23,6725.08],"6-91-22":[31.65,732.76],"6-91-23":[133.09,994.23],"5-45-11":[-71.01,1264.93],"4-22-5":[-103.33,6725.08],"6-91-24":[88.59,1273.26],"6-91-25":[133.67,698.38],"5-45-12":[-97.09,1527.78],"6-91-26":[29.03,1069.77],"6-91-27":[-98.98,2543.22],"5-45-13":[-189.5,2543.22],"4-22-6":[-189.5,2543.22],"6-91-28":[-197.25,2590.24],"6-91-29":[-213.05,1544.94],"5-45-14":[-213.05,2590.24],"6-91-30":[-213.9,-102.05],"6-91-31":[-208.09,-100.58],"5-45-15":[-213.9,-69.28],"4-22-7":[-213.9,2590.24],"6-91-32":[-205.64,-96.41],"6-91-33":[-194.02,-89.47],"5-45-16":[-205.64,-74.1],"6-91-34":[-182.42,-79.86],"6-91-35":[-161.36,-69.08],"5-45-17":[-182.42,-64.37],"4-22-8":[-205.64,-37.6],"6-91-36":[-142.2,-57.49],"6-91-37":[-116.73,-45.58],"5-45-18":[-142.2,-40.93],"6-91-38":[-98.13,-34.54],"6-91-39":[-76.39,-24.5],"5-45-19":[-98.13,-19.04],"4-22-9":[-142.2,-8.66],"6-91-40":[-59.57,-14.97],"6-91-41":[-39.69,-6.64],"5-45-20":[-59.57,-1.84],"6-91-42":[-24.55,1.1],"6-91-43":[-6.24,12.33],"5-45-21":[-24.55,18.97],"4-22-10":[-59.57,31.3],"6-91-44":[3.69,23.13],"6-91-45":[-0.46,882.59],"5-45-22":[-0.46,882.59],"6-91-46":[14.12,40.84],"6-91-47":[18.73,51.83],"5-45-23":[14.12,56.94],"4-22-11":[-0.46,882.59],"6-91-48":[26.15,57.63],"6-91-49":[26.58,64.22],"5-45-24":[26.15,73.84],"6-91-50":[28.51,71.32],"6-91-51":[27.46,68.43],"5-45-25":[27.46,2779.41],"4-22-12":[-55.82,2779.41],"6-91-52":[27.54,61.22],"6-91-53":[23.63,57.26],"5-45-26":[23.63,65.8],"6-91-54":[18.37,46.65],"6-91-55":[17.3,38.66],"5-45-27":[17.3,50.44],"4-22-13":[17.3,72.08],"6-91-56":[15.75,1873.55],"6-91-57":[1472.92,2662.65],"5-45-28":[15.75,2662.65],"6-91-58":[2210.24,2841.83],"6-91-59":[2619.18,3506.71],"5-45-29":[1769.27,3506.71],"4-22-14":[13.9,3506.71],"6-91-60":[3487.59,4042.04],"6-91-61":[3516.4,4030.73],"5-45-30":[3484.48,4042.04],"6-91-62":[3063.05,3527.6],"6-91-63":[-29.54,3066.42],"5-45-31":[-29.54,3530.31],"4-22-15":[-29.54,4042.04],"6-92-0":[13.55,28.88],"6-92-1":[11.24,30.24],"6-92-2":[7.88,23.28],"6-92-3":[-1.45,283.89],"6-92-4":[-12.53,-0.34],"6-92-5":[-17.94,255.31],"6-92-6":[-21.31,243.75],"6-92-7":[-24.37,117.76],"6-92-8":[-24.37,64.43],"6-92-9":[-19.87,203.65],"6-92-10":[-30.16,114.52],"6-92-11":[9.32,125.15],"6-92-12":[63.09,235.48],"6-92-13":[48.15,478.3],"6-92-14":[109.62,1419.87],"6-92-15":[276.31,4532.62],"6-92-16":[432.35,6633.62],"6-92-17":[908.55,7087.4],"6-92-18":[1029.39,4976.93],"6-92-19":[1276.56,7022.3],"6-92-20":[2453.79,7194.47],"6-92-21":[35.37,7787.57],"6-92-22":[-15.2,295.99],"6-92-23":[-6.93,1069.67],"6-92-24":[29.9,1095.71],"6-92-25":[-88.56,1197.87],"6-92-26":[-182.75,1006.73],"6-92-27":[-197.07,1132.42],"6-92-28":[-198.18,434.8],"6-92-29":[-212.75,2430.45],"6-92-30":[-213.9,-101.01],"6-92-31":[-207.87,-100.16],"6-92-32":[-205.79,-94.42],"6-92-33":[-195,-88.59],"6-92-34":[-182.48,-79.41],"6-92-35":[-161.34,-70.63],"6-92-36":[-142.37,-59.67],"6-92-37":[-120.53,-49.07],"6-92-38":[-104.92,-39.42],"6-92-39":[-84.27,-29.78],"6-92-40":[-67.56,-20.85],"6-92-41":[-47.53,-12.67],"6-92-42":[-33.56,-4.07],"6-92-43":[-15.92,6.04],"6-92-44":[-3.11,19.27],"6-92-45":[3.14,28.24],"6-92-46":[9.41,36.29],"6-92-47":[15.61,46.42],"6-92-48":[19.59,52.39],"6-92-49":[23.34,58.26],"6-92-50":[24.55,61.51],"6-92-51":[20.83,56.57],"6-92-52":[20.97,56.29],"6-92-53":[20.93,53.7],"6-92-54":[15.67,43.92],"6-92-55":[14.25,36.25],"6-92-56":[15.39,2339.17],"6-92-57":[1873.54,2935.32],"6-92-58":[2662.64,3173.47],"6-92-59":[2841.82,3593.63],"6-92-60":[3506.7,4042.04],"6-92-61":[3499.19,4001.04],"6-92-62":[3062.85,3516.41],"6-92-63":[-29.54,3066.46],"6-93-0":[13.56,28.31],"6-93-1":[11.24,29.45],"5-46-0":[11.24,30.24],"6-93-2":[7.36,22.43],"6-93-3":[-1.93,13.28],"5-46-1":[-1.93,283.89],"6-93-4":[-12.52,9.42],"6-93-5":[-19.04,346.14],"5-46-2":[-19.04,346.14],"6-93-6":[-25.93,405.51],"6-93-7":[-28.7,174.16],"5-46-3":[-28.7,405.51],"6-93-8":[-19.06,149.97],"6-93-9":[-3.71,236.06],"5-46-4":[-24.37,236.06],"6-93-10":[-30.26,155.46],"6-93-11":[10.19,162.81],"5-46-5":[-30.26,162.81],"6-93-12":[-1.52,446.71],"6-93-13":[73.33,2380.4],"5-46-6":[-1.52,2380.4],"6-93-14":[23.35,2712],"6-93-15":[124.82,3961.77],"5-46-7":[23.35,4532.62],"6-93-16":[105.62,5107.74],"6-93-17":[837.93,3794.4],"5-46-8":[105.62,7087.4],"6-93-18":[954.9,6062.91],"6-93-19":[1693.3,6911.73],"5-46-9":[954.9,7022.3],"6-93-20":[4293.12,6600.18],"6-93-21":[81.18,8103.55],"5-46-10":[35.37,8103.55],"6-93-22":[-46.13,2512.35],"6-93-23":[-31.32,1178.46],"5-46-11":[-46.13,2512.35],"6-93-24":[-19.46,1262.43],"6-93-25":[-161.45,1608.79],"5-46-12":[-161.45,1608.79],"6-93-26":[-181.92,-37.98],"6-93-27":[-194.57,-86.28],"5-46-13":[-197.07,1132.42],"6-93-28":[-196.82,-88.67],"6-93-29":[-203.21,351.9],"5-46-14":[-212.75,2430.45],"6-93-30":[-206.92,-92.98],"6-93-31":[-203.79,-91.46],"5-46-15":[-213.9,-91.46],"6-93-32":[-197.97,-88.46],"6-93-33":[-185.94,-84.21],"5-46-16":[-205.79,-84.21],"6-93-34":[-175.59,-76.82],"6-93-35":[-155.42,-69.13],"5-46-17":[-182.48,-69.13],"6-93-36":[-142.66,-61.65],"6-93-37":[-126.46,-53.23],"5-46-18":[-142.66,-49.07],"6-93-38":[-113.57,-44.2],"6-93-39":[-92.35,-34.33],"5-46-19":[-113.57,-29.78],"6-93-40":[-75.45,-25.32],"6-93-41":[-57.43,-17.51],"5-46-20":[-75.45,-12.67],"6-93-42":[-43.87,-9.49],"6-93-43":[-26.53,-2.26],"5-46-21":[-43.87,6.04],"6-93-44":[-14.66,3.69],"6-93-45":[-1.24,17.7],"5-46-22":[-14.66,28.24],"6-93-46":[5.93,28.99],"6-93-47":[11.24,38.3],"5-46-23":[5.93,46.42],"6-93-48":[19.38,44.79],"6-93-49":[19.38,49.77],"5-46-24":[19.38,58.26],"6-93-50":[20.9,50.43],"6-93-51":[20.83,47.65],"5-46-25":[20.83,61.51],"6-93-52":[18.26,48.46],"6-93-53":[18.26,48.79],"5-46-26":[18.26,56.29],"6-93-54":[14.04,41],"6-93-55":[13.54,635.17],"5-46-27":[13.54,635.17],"6-93-56":[15.52,2519.02],"6-93-57":[2339.16,3197.54],"5-46-28":[15.39,3197.54],"6-93-58":[2935.31,3364.13],"6-93-59":[3109.51,3621.13],"5-46-29":[2662.64,3621.13],"6-93-60":[3593.62,4025.51],"6-93-61":[3480.01,3923.74],"5-46-30":[3480.01,4042.04],"6-93-62":[3063.46,3499.2],"6-93-63":[-29.54,3067.15],"5-46-31":[-29.54,3516.41],"6-94-0":[13.47,27.85],"6-94-1":[10.93,28.85],"6-94-2":[6.21,22.12],"6-94-3":[-2.74,11.48],"6-94-4":[-13.52,-1.43],"6-94-5":[-19.79,311.63],"6-94-6":[-11.52,248.42],"6-94-7":[-28.7,355.11],"6-94-8":[-17.9,176.8],"6-94-9":[-7.94,232.96],"6-94-10":[-30.83,204.28],"6-94-11":[21.88,252.1],"6-94-12":[-18.21,544.69],"6-94-13":[103.65,2652.03],"6-94-14":[329.84,4375.85],"6-94-15":[163.35,3786.97],"6-94-16":[217.97,5220.28],"6-94-17":[745.63,3644.02],"6-94-18":[804.64,6686.7],"6-94-19":[4212.17,6437.5],"6-94-20":[4352.91,6733.83],"6-94-21":[458.23,8019.76],"6-94-22":[-62.15,8777.15],"6-94-23":[-49.51,1317.62],"6-94-24":[-131.49,1124.07],"6-94-25":[-161,1331.06],"6-94-26":[-174.06,-73.06],"6-94-27":[-177.34,-76.23],"6-94-28":[-181.5,-77.26],"6-94-29":[-187.4,-77.29],"6-94-30":[-187.32,-78.62],"6-94-31":[-187.52,-78.17],"6-94-32":[-182.92,-76.46],"6-94-33":[-176.4,-74.65],"6-94-34":[-168.43,-71.13],"6-94-35":[-151.14,-67.72],"6-94-36":[-139.6,-60.57],"6-94-37":[-126.46,-54.12],"6-94-38":[-114.22,-45.3],"6-94-39":[-93.08,-37.72],"6-94-40":[-77.95,-29.61],"6-94-41":[-61.78,-22.17],"6-94-42":[-50.7,-14.14],"6-94-43":[-33.49,-7.53],"6-94-44":[-21.33,-1.23],"6-94-45":[-8.99,10.6],"6-94-46":[0.56,21.41],"6-94-47":[7.51,31.9],"6-94-48":[11.75,38.12],"6-94-49":[15.47,42.62],"6-94-50":[16.83,42.88],"6-94-51":[15.6,40.98],"6-94-52":[12.93,36.12],"6-94-53":[11.48,39.7],"6-94-54":[10.61,32.65],"6-94-55":[10.62,1029.1],"6-94-56":[635.16,2637.61],"6-94-57":[2519.01,3300.48],"6-94-58":[3197.53,3450.97],"6-94-59":[3321.28,3672.41],"6-94-60":[3621.12,3954.97],"6-94-61":[3420.25,3850.88],"6-94-62":[3064.94,3480.02],"6-94-63":[-29.54,3067.91],"6-95-0":[13.31,27.3],"6-95-1":[10.93,27.94],"5-47-0":[10.93,28.85],"6-95-2":[6.2,21.84],"6-95-3":[-3.28,10.22],"5-47-1":[-3.28,22.12],"4-23-0":[-3.28,283.89],"6-95-4":[-13.57,46.56],"6-95-5":[-14.69,348.59],"5-47-2":[-19.79,348.59],"6-95-6":[-9.39,401.33],"6-95-7":[-9.94,941.07],"5-47-3":[-28.7,941.07],"4-23-1":[-28.7,941.07],"3-11-0":[-29.05,941.07],"6-95-8":[-21.59,733.23],"6-95-9":[-13.86,628.73],"5-47-4":[-21.59,733.23],"6-95-10":[-32.57,242.85],"6-95-11":[53.1,262.78],"5-47-5":[-32.57,262.78],"4-23-2":[-32.57,733.23],"6-95-12":[74.14,2173.74],"6-95-13":[176.51,3529.7],"5-47-6":[-18.21,3529.7],"6-95-14":[474.07,4279.84],"6-95-15":[301.44,3328.41],"5-47-7":[163.35,4375.85],"4-23-3":[-18.21,4532.62],"3-11-1":[-52.7,4532.62],"2-5-0":[-251.81,4532.62],"6-95-16":[-260.5,4987.09],"6-95-17":[619.6,2654.79],"5-47-8":[-260.5,5220.28],"6-95-18":[731.86,6201.27],"6-95-19":[4444.41,6890.4],"5-47-9":[731.86,6890.4],"4-23-4":[-260.5,7087.4],"6-95-20":[4425.14,6254.63],"6-95-21":[988.33,7070.27],"5-47-10":[458.23,8019.76],"6-95-22":[-69.58,8478.4],"6-95-23":[-139.77,533.63],"5-47-11":[-139.77,8777.15],"4-23-5":[-139.77,8777.15],"3-11-2":[-260.5,8777.15],"6-95-24":[-131.42,26.16],"6-95-25":[-146.13,-61.4],"5-47-12":[-161,1331.06],"6-95-26":[-150.96,-63.4],"6-95-27":[-152.36,-64.19],"5-47-13":[-177.34,-63.4],"4-23-6":[-197.07,1608.79],"6-95-28":[-152.61,-62.12],"6-95-29":[-153.05,-59.77],"5-47-14":[-187.4,-59.77],"6-95-30":[-153.22,-59.81],"6-95-31":[-153.97,-60.33],"5-47-15":[-187.52,-59.81],"4-23-7":[-213.9,2430.45],"3-11-3":[-213.9,2590.24],"2-5-1":[-260.5,8777.15],"1-2-0":[-398.55,8777.15],"6-95-32":[-153.84,-61.96],"6-95-33":[-150.16,-62.76],"5-47-16":[-182.92,-61.96],"6-95-34":[-147.07,-63.18],"6-95-35":[-139.29,-62.21],"5-47-17":[-168.43,-62.21],"4-23-8":[-205.79,-61.96],"6-95-36":[-135.36,-58.3],"6-95-37":[-121.04,-51.25],"5-47-18":[-139.6,-51.25],"6-95-38":[-111.37,-44.8],"6-95-39":[-96.39,-38.31],"5-47-19":[-114.22,-37.72],"4-23-9":[-142.66,-29.78],"3-11-4":[-205.79,-8.66],"6-95-40":[-87.28,-30.97],"6-95-41":[-73.3,-25.9],"5-47-20":[-87.28,-22.17],"6-95-42":[-61.25,-17.39],"6-95-43":[-45.22,-11.38],"5-47-21":[-61.25,-7.53],"4-23-10":[-87.28,6.04],"6-95-44":[-34.87,-6.02],"6-95-45":[-20.9,0.57],"5-47-22":[-34.87,10.6],"6-95-46":[-8.31,12.66],"6-95-47":[2.81,22.59],"5-47-23":[-8.31,31.9],"4-23-11":[-34.87,46.42],"3-11-5":[-87.28,882.59],"2-5-2":[-205.79,3059.56],"6-95-48":[11.13,29.29],"6-95-49":[11.13,33.22],"5-47-24":[11.13,42.62],"6-95-50":[13.37,33.58],"6-95-51":[13.37,32.64],"5-47-25":[13.37,42.88],"4-23-12":[11.13,61.51],"6-95-52":[10.23,30.49],"6-95-53":[10.23,23.8],"5-47-26":[10.23,39.7],"6-95-54":[6.78,21.99],"6-95-55":[6.78,1290.06],"5-47-27":[6.78,1290.06],"4-23-13":[6.78,1290.06],"3-11-6":[-55.82,2779.41],"6-95-56":[1007.52,2688.65],"6-95-57":[2637.6,3479.02],"5-47-28":[635.16,3479.02],"6-95-58":[3300.47,3627.63],"6-95-59":[3450.96,3738.39],"5-47-29":[3197.53,3738.39],"4-23-14":[15.39,3738.39],"6-95-60":[3672.4,3883.62],"6-95-61":[3372.97,3781.94],"5-47-30":[3372.97,3954.97],"6-95-62":[3066.6,3420.26],"6-95-63":[-29.54,3069.78],"5-47-31":[-29.54,3480.02],"4-23-15":[-29.54,4042.04],"3-11-7":[-29.54,4042.04],"2-5-3":[-55.82,4042.04],"1-2-1":[-242.83,5869.55],"6-96-0":[13.05,27.12],"6-96-1":[10.66,27.25],"6-96-2":[6.32,21.6],"6-96-3":[-3.81,327.9],"6-96-4":[-13.97,41.97],"6-96-5":[-14.52,491.93],"6-96-6":[-12.84,766.61],"6-96-7":[15.52,1577.7],"6-96-8":[23.06,974.81],"6-96-9":[0.51,751.03],"6-96-10":[-32.17,917.02],"6-96-11":[22.51,457.27],"6-96-12":[87.23,1266.17],"6-96-13":[216.38,3266],"6-96-14":[707.82,4151.48],"6-96-15":[820.5,4116.23],"6-96-16":[-31.39,3824.31],"6-96-17":[290.2,2504.01],"6-96-18":[1263.81,5909.96],"6-96-19":[3248.18,6767.17],"6-96-20":[4109.93,6522.84],"6-96-21":[2989.51,7463.69],"6-96-22":[-83.69,7512.84],"6-96-23":[-109,1663.78],"6-96-24":[-122.52,1062.24],"6-96-25":[-126.56,-53.86],"6-96-26":[-128.85,-59.44],"6-96-27":[-129.38,407.51],"6-96-28":[-128.18,114.95],"6-96-29":[-123.94,-53.59],"6-96-30":[-121.58,-48.89],"6-96-31":[-126.69,-47.66],"6-96-32":[-127.67,-47.94],"6-96-33":[-128.62,-48.79],"6-96-34":[-129.46,-51.46],"6-96-35":[-129.43,-54.63],"6-96-36":[-128.76,-55.19],"6-96-37":[-118.48,-52.16],"6-96-38":[-109.45,-47.88],"6-96-39":[-96.5,-43.64],"6-96-40":[-90.53,-37.51],"6-96-41":[-79.29,-30.63],"6-96-42":[-69.21,-23.04],"6-96-43":[-55.83,-17.8],"6-96-44":[-44.21,-11.23],"6-96-45":[-29.81,-4.63],"6-96-46":[-17.32,4.18],"6-96-47":[-2.33,15.19],"6-96-48":[3,21.54],"6-96-49":[6.76,26.13],"6-96-50":[9.32,27.61],"6-96-51":[9.2,26.58],"6-96-52":[7.16,26.06],"6-96-53":[2.39,19.5],"6-96-54":[2.39,14.94],"6-96-55":[3.38,1584.77],"6-96-56":[1290.05,2802.12],"6-96-57":[2688.64,3518.93],"6-96-58":[3479.01,3704.38],"6-96-59":[3627.62,3756.39],"6-96-60":[3652.33,3799.9],"6-96-61":[3341.14,3696.84],"6-96-62":[3068.58,3372.98],"6-96-63":[-29.54,3073.17],"6-97-0":[12.85,27.04],"6-97-1":[10.66,26.67],"5-48-0":[10.66,27.25],"6-97-2":[5.88,21.3],"6-97-3":[-5.43,785.33],"5-48-1":[-5.43,785.33],"6-97-4":[-15.46,476.72],"6-97-5":[-7.89,604.4],"5-48-2":[-15.46,604.4],"6-97-6":[-13.92,806.23],"6-97-7":[44.76,1618.98],"5-48-3":[-13.92,1618.98],"6-97-8":[91.31,1177.41],"6-97-9":[10.89,764.98],"5-48-4":[0.51,1177.41],"6-97-10":[-24.59,1092.04],"6-97-11":[-3.1,823.06],"5-48-5":[-32.17,1092.04],"6-97-12":[74.37,2561.56],"6-97-13":[260.85,2677.49],"5-48-6":[74.37,3266],"6-97-14":[697.66,2882.06],"6-97-15":[906.92,4155.27],"5-48-7":[697.66,4155.27],"6-97-16":[219.52,4825.04],"6-97-17":[271.2,4733.64],"5-48-8":[-31.39,4825.04],"6-97-18":[2241.79,5772.12],"6-97-19":[2644.39,6131.65],"5-48-9":[1263.81,6767.17],"6-97-20":[3253.98,6237.58],"6-97-21":[107.58,7221.31],"5-48-10":[107.58,7463.69],"6-97-22":[-53.33,5335.5],"6-97-23":[-92.67,2777.96],"5-48-11":[-109,7512.84],"6-97-24":[-99.38,3021.9],"6-97-25":[-120.76,1489.97],"5-48-12":[-126.56,3021.9],"6-97-26":[-124.46,365.67],"6-97-27":[-120.57,671.16],"5-48-13":[-129.38,671.16],"6-97-28":[-127.91,253.16],"6-97-29":[-120.45,634.69],"5-48-14":[-128.18,634.69],"6-97-30":[-106.53,2140.29],"6-97-31":[-94.44,-30.37],"5-48-15":[-126.69,2140.29],"6-97-32":[-93.37,-30.41],"6-97-33":[-100.58,-33.35],"5-48-16":[-128.62,-30.41],"6-97-34":[-105.96,-38.16],"6-97-35":[-109.16,-42.72],"5-48-17":[-129.46,-38.16],"6-97-36":[-110.94,-44.59],"6-97-37":[-107.55,-47.06],"5-48-18":[-128.76,-44.59],"6-97-38":[-103.96,-48.28],"6-97-39":[-97.49,-45.28],"5-48-19":[-109.45,-43.64],"6-97-40":[-91.36,-40.59],"6-97-41":[-84.52,-34.82],"5-48-20":[-91.36,-30.63],"6-97-42":[-74.46,-27.37],"6-97-43":[-60.54,-22.77],"5-48-21":[-74.46,-17.8],"6-97-44":[-55.82,-16.33],"6-97-45":[-41.68,-9.34],"5-48-22":[-55.82,-4.63],"6-97-46":[-29.34,-2.32],"6-97-47":[-13.57,4.79],"5-48-23":[-29.34,15.19],"6-97-48":[-3.72,11.69],"6-97-49":[2.56,17.71],"5-48-24":[-3.72,26.13],"6-97-50":[5.93,18.3],"6-97-51":[6.01,18.13],"5-48-25":[5.93,27.61],"6-97-52":[3.78,17.87],"6-97-53":[-1.51,12.15],"5-48-26":[-1.51,26.06],"6-97-54":[-2.2,7.25],"6-97-55":[-0.05,1584.77],"5-48-27":[-2.2,1584.77],"6-97-56":[1497.42,2824.51],"6-97-57":[2802.11,3500.23],"5-48-28":[1290.05,3518.93],"6-97-58":[3409.99,3719.54],"6-97-59":[3704.37,3755.97],"5-48-29":[3409.99,3756.39],"6-97-60":[3612.81,3775.22],"6-97-61":[3317.34,3652.34],"5-48-30":[3317.34,3799.9],"6-97-62":[3069.22,3341.15],"6-97-63":[-29.54,3074.67],"5-48-31":[-29.54,3372.98],"6-98-0":[12.57,27.03],"6-98-1":[10.26,26.35],"6-98-2":[4.57,21],"6-98-3":[-6.42,915.41],"6-98-4":[-16.48,237.04],"6-98-5":[-7.98,810.48],"6-98-6":[-11.47,688.57],"6-98-7":[12.53,1569.96],"6-98-8":[124.42,1090.5],"6-98-9":[50.44,887.64],"6-98-10":[-27,775.1],"6-98-11":[69.08,615.55],"6-98-12":[151.22,2887.36],"6-98-13":[660.12,2999.01],"6-98-14":[1179.37,3482.56],"6-98-15":[1006.26,3928.85],"6-98-16":[422.97,2953.75],"6-98-17":[1074.68,5415.08],"6-98-18":[2272.72,5725.81],"6-98-19":[2617.61,5462.57],"6-98-20":[3023.42,5731.48],"6-98-21":[133.36,6535.05],"6-98-22":[23.08,5106.11],"6-98-23":[12.3,3346.34],"6-98-24":[-17.38,2464.8],"6-98-25":[-86.67,2574.03],"6-98-26":[-135.7,1748.97],"6-98-27":[-96.39,1498.37],"6-98-28":[-92.56,1085.71],"6-98-29":[-80.53,550.46],"6-98-30":[-71.73,3433.72],"6-98-31":[-71.07,1843.03],"6-98-32":[-66.71,243],"6-98-33":[-76.31,-20.39],"6-98-34":[-86.19,-23.44],"6-98-35":[-91.28,-29.19],"6-98-36":[-94.14,-13.36],"6-98-37":[-101.07,-41.41],"6-98-38":[-100.77,-44.67],"6-98-39":[-96.25,-45.32],"6-98-40":[-93.34,-42.41],"6-98-41":[-85,-35.94],"6-98-42":[-76.44,-31.6],"6-98-43":[-68.5,-27.91],"6-98-44":[-62.86,-21.68],"6-98-45":[-50.56,-14.99],"6-98-46":[-38.51,-7.65],"6-98-47":[-23.36,-2.19],"6-98-48":[-12.63,4.07],"6-98-49":[-1.83,10.05],"6-98-50":[0.77,11.74],"6-98-51":[1.97,12.17],"6-98-52":[-0.24,11.35],"6-98-53":[-6.56,6.36],"6-98-54":[-6.92,6.59],"6-98-55":[-6.32,1715.72],"6-98-56":[1527.57,2802.84],"6-98-57":[2705.17,3410],"6-98-58":[3387.34,3708.3],"6-98-59":[3611.48,3736.73],"6-98-60":[3543.29,3737.71],"6-98-61":[3284.66,3612.82],"6-98-62":[3070.76,3317.35],"6-98-63":[-29.54,3075.47],"6-99-0":[12.31,27.01],"6-99-1":[10.26,25.84],"5-49-0":[10.26,27.03],"6-99-2":[4.57,20.48],"6-99-3":[-6.18,969.4],"5-49-1":[-6.42,969.4],"4-24-0":[-6.42,969.4],"6-99-4":[-16.18,517.22],"6-99-5":[-8.15,590],"5-49-2":[-16.48,810.48],"6-99-6":[-11.65,855.64],"6-99-7":[102.24,1354.63],"5-49-3":[-11.65,1569.96],"4-24-1":[-16.48,1618.98],"6-99-8":[120.14,1086.98],"6-99-9":[86.63,868.73],"5-49-4":[50.44,1090.5],"6-99-10":[-31.02,599.89],"6-99-11":[80.02,729.83],"5-49-5":[-31.02,775.1],"4-24-2":[-32.17,1177.41],"6-99-12":[187.08,2274.47],"6-99-13":[527.52,3424.72],"5-49-6":[151.22,3424.72],"6-99-14":[1035.39,3181.14],"6-99-15":[1160.58,3821.64],"5-49-7":[1006.26,3928.85],"4-24-3":[74.37,4155.27],"6-99-16":[637.58,3902.64],"6-99-17":[836.31,3828.18],"5-49-8":[422.97,5415.08],"6-99-18":[1288.02,5499.12],"6-99-19":[2175.47,6216.6],"5-49-9":[1288.02,6216.6],"4-24-4":[-31.39,6767.17],"6-99-20":[2779.55,6063.79],"6-99-21":[1586.78,6434.65],"5-49-10":[133.36,6535.05],"6-99-22":[657.1,5432.09],"6-99-23":[300.67,3530.75],"5-49-11":[12.3,5432.09],"4-24-5":[-109,7512.84],"6-99-24":[129.64,2554.75],"6-99-25":[-17.17,2536.99],"5-49-12":[-86.67,2574.03],"6-99-26":[-78.1,2080.04],"6-99-27":[-90.57,2009.72],"5-49-13":[-135.7,2080.04],"4-24-6":[-135.7,3021.9],"6-99-28":[-65.06,1760.05],"6-99-29":[-72.95,1543.06],"5-49-14":[-92.56,1760.05],"6-99-30":[-57.01,2251.47],"6-99-31":[-38.89,2884.86],"5-49-15":[-71.73,3433.72],"4-24-7":[-128.18,3433.72],"6-99-32":[-81.91,3098.13],"6-99-33":[-45.75,302.5],"5-49-16":[-81.91,3098.13],"6-99-34":[-54.35,-15.47],"6-99-35":[-71.17,-18.5],"5-49-17":[-91.28,-15.47],"4-24-8":[-129.46,3098.13],"6-99-36":[-82.83,-25.9],"6-99-37":[-88.25,-33.31],"5-49-18":[-101.07,-13.36],"6-99-38":[-94.27,-41.22],"6-99-39":[-95.18,-42.76],"5-49-19":[-100.77,-41.22],"4-24-9":[-128.76,-13.36],"6-99-40":[-92.2,-40.17],"6-99-41":[-83.68,-35.94],"5-49-20":[-93.34,-35.94],"6-99-42":[-78.69,-34.93],"6-99-43":[-74.99,-31.99],"5-49-21":[-78.69,-27.91],"4-24-10":[-93.34,-17.8],"6-99-44":[-72.56,-26.45],"6-99-45":[-59.76,-19.83],"5-49-22":[-72.56,-14.99],"6-99-46":[-48.96,-13.12],"6-99-47":[-34.76,-6.95],"5-49-23":[-48.96,-2.19],"4-24-11":[-72.56,15.19],"6-99-48":[-22.48,-1.82],"6-99-49":[-11.77,0.78],"5-49-24":[-22.48,10.05],"6-99-50":[-6.68,3.52],"6-99-51":[-3.06,3.63],"5-49-25":[-6.68,12.17],"4-24-12":[-22.48,27.61],"6-99-52":[-6.11,2.94],"6-99-53":[-14.49,-0.23],"5-49-26":[-14.49,11.35],"6-99-54":[-16.12,2.4],"6-99-55":[-5.53,1741.17],"5-49-27":[-16.12,1741.17],"4-24-13":[-16.12,1741.17],"6-99-56":[1318.62,2705.18],"6-99-57":[2640.6,3387.35],"5-49-28":[1318.62,3410],"6-99-58":[3292.46,3611.49],"6-99-59":[3525.75,3694.95],"5-49-29":[3292.46,3736.73],"4-24-14":[1290.05,3756.39],"6-99-60":[3433.71,3696.05],"6-99-61":[3240.36,3543.3],"5-49-30":[3240.36,3737.71],"6-99-62":[3070.72,3284.67],"6-99-63":[-29.54,3075.96],"5-49-31":[-29.54,3317.35],"4-24-15":[-29.54,3799.9],"6-100-0":[12.14,26.99],"6-100-1":[10.27,25.24],"6-100-2":[3.43,20.53],"6-100-3":[-0.76,788.17],"6-100-4":[-13.05,864.96],"6-100-5":[-6.27,624.53],"6-100-6":[-13.4,737.36],"6-100-7":[45.51,676.85],"6-100-8":[147.98,958.88],"6-100-9":[114.45,855.83],"6-100-10":[-24.8,555.66],"6-100-11":[130.97,852.88],"6-100-12":[253.49,918],"6-100-13":[346.44,3194.59],"6-100-14":[732.53,2295.19],"6-100-15":[986.95,3379.04],"6-100-16":[844.64,3558.09],"6-100-17":[745.38,1902.58],"6-100-18":[1168.55,5176.87],"6-100-19":[1398.27,4952.19],"6-100-20":[475.77,6100.38],"6-100-21":[222.1,7111.28],"6-100-22":[347.18,4334.26],"6-100-23":[41.06,3117.27],"6-100-24":[36.19,3084.02],"6-100-25":[52.6,2792.64],"6-100-26":[-35.3,1323.34],"6-100-27":[-72.12,1726.89],"6-100-28":[-49.94,1062.2],"6-100-29":[-35.14,1503.56],"6-100-30":[-117.38,2181.1],"6-100-31":[-68.74,1252.6],"6-100-32":[-20.47,3783.24],"6-100-33":[-69.41,3170.1],"6-100-34":[-37.01,1.6],"6-100-35":[-51.44,-9.86],"6-100-36":[-64.35,-13.79],"6-100-37":[-82.44,-27.14],"6-100-38":[-86.64,-34.46],"6-100-39":[-87.84,-34.63],"6-100-40":[-85.52,-36.5],"6-100-41":[-80.19,-37.62],"6-100-42":[-78.68,-37.25],"6-100-43":[-81.4,-35.65],"6-100-44":[-80.06,-30.59],"6-100-45":[-66.32,-24.76],"6-100-46":[-55.39,-18.12],"6-100-47":[-41.05,-11.56],"6-100-48":[-30.56,-6.29],"6-100-49":[-19.26,-3.51],"6-100-50":[-13.29,-1.45],"6-100-51":[-9.52,-0.85],"6-100-52":[-12.52,-1.6],"6-100-53":[-17.41,-3.38],"6-100-54":[-19.91,-2],"6-100-55":[-15.87,1791.71],"6-100-56":[1558.66,2640.61],"6-100-57":[2600.88,3292.47],"6-100-58":[3117.94,3525.76],"6-100-59":[3441.92,3605.31],"6-100-60":[3363.73,3601.4],"6-100-61":[3196.66,3433.72],"6-100-62":[3070.69,3240.37],"6-100-63":[-29.54,3075.89],"6-101-0":[12.06,26.97],"6-101-1":[10.27,24.01],"5-50-0":[10.27,26.99],"6-101-2":[1.88,20.61],"6-101-3":[-0.04,776.54],"5-50-1":[-0.76,788.17],"6-101-4":[-9.34,841.94],"6-101-5":[-23.59,832.71],"5-50-2":[-23.59,864.96],"6-101-6":[-24.81,718.4],"6-101-7":[121.13,1011.68],"5-50-3":[-24.81,1011.68],"6-101-8":[224.5,929.44],"6-101-9":[162.57,836.04],"5-50-4":[114.45,958.88],"6-101-10":[-27.02,706.58],"6-101-11":[88.71,984.1],"5-50-5":[-27.02,984.1],"6-101-12":[253.55,1472.91],"6-101-13":[369.08,2280.07],"5-50-6":[253.49,3194.59],"6-101-14":[518.21,1985.15],"6-101-15":[932.38,2132.01],"5-50-7":[518.21,3379.04],"6-101-16":[778.87,2678.17],"6-101-17":[651.88,2311.12],"5-50-8":[651.88,3558.09],"6-101-18":[992.38,3502.2],"6-101-19":[629.17,4106.19],"5-50-9":[629.17,5176.87],"6-101-20":[194.36,4524.83],"6-101-21":[96.37,1942.57],"5-50-10":[96.37,7111.28],"6-101-22":[245.14,2858.21],"6-101-23":[21.03,2530.43],"5-50-11":[21.03,4334.26],"6-101-24":[-94.3,2937.63],"6-101-25":[-56.68,2686.47],"5-50-12":[-94.3,3084.02],"6-101-26":[-2.53,1984.96],"6-101-27":[-62.53,1793.02],"5-50-13":[-72.12,1984.96],"6-101-28":[-88.98,988.31],"6-101-29":[-13.69,296.81],"5-50-14":[-88.98,1503.56],"6-101-30":[-7.26,564.09],"6-101-31":[-34.24,1041.7],"5-50-15":[-117.38,2181.1],"6-101-32":[-50.63,1126.85],"6-101-33":[-55.36,2229.43],"5-50-16":[-69.41,3783.24],"6-101-34":[-36.88,2218.28],"6-101-35":[-23.97,362.89],"5-50-17":[-51.44,2218.28],"6-101-36":[-50.01,-8.05],"6-101-37":[-67.22,-17.95],"5-50-18":[-82.44,-8.05],"6-101-38":[-72.92,-27.95],"6-101-39":[-72.68,-32.21],"5-50-19":[-87.84,-27.95],"6-101-40":[-76.24,-33.32],"6-101-41":[-78.06,-36.98],"5-50-20":[-85.52,-33.32],"6-101-42":[-80.1,-38.14],"6-101-43":[-82.02,-39.33],"5-50-21":[-82.02,-35.65],"6-101-44":[-82.43,-34.06],"6-101-45":[-71.27,-28.18],"5-50-22":[-82.43,-24.76],"6-101-46":[-62.71,-21.81],"6-101-47":[-49.64,-15.77],"5-50-23":[-62.71,-11.56],"6-101-48":[-39.39,-10.57],"6-101-49":[-28.16,-7.19],"5-50-24":[-39.39,-3.51],"6-101-50":[-21.77,-4.94],"6-101-51":[-17.14,-4.86],"5-50-25":[-21.77,-0.85],"6-101-52":[-18.23,-5.13],"6-101-53":[-25.73,-6.91],"5-50-26":[-25.73,-1.6],"6-101-54":[-26.47,-8.94],"6-101-55":[-27.05,1793.86],"5-50-27":[-27.05,1793.86],"6-101-56":[1569.31,2600.89],"6-101-57":[2518.51,3117.95],"5-50-28":[1558.66,3292.47],"6-101-58":[2973.88,3441.93],"6-101-59":[3288.11,3528.69],"5-50-29":[2973.88,3605.31],"6-101-60":[3280.25,3498.6],"6-101-61":[3169.63,3363.74],"5-50-30":[3169.63,3601.4],"6-101-62":[3069.83,3196.67],"6-101-63":[-29.54,3075.29],"5-50-31":[-29.54,3240.37],"6-102-0":[12.03,26.96],"6-102-1":[10.02,23.17],"6-102-2":[1.63,20.52],"6-102-3":[-0.71,3.6],"6-102-4":[-9.34,927.44],"6-102-5":[-21.44,1119.08],"6-102-6":[-21.06,734.39],"6-102-7":[132.34,887.81],"6-102-8":[166.72,947.89],"6-102-9":[178.95,743.5],"6-102-10":[-23.46,607.14],"6-102-11":[188.2,1969.85],"6-102-12":[317.03,2509.72],"6-102-13":[401.97,1987.12],"6-102-14":[522.51,2758.43],"6-102-15":[862.62,2221.84],"6-102-16":[705.9,1397.18],"6-102-17":[902.24,2304.17],"6-102-18":[874.91,1918.57],"6-102-19":[285.5,3718.19],"6-102-20":[36.4,3019.64],"6-102-21":[48.41,2199.58],"6-102-22":[81.86,2506.96],"6-102-23":[-4.49,1720.45],"6-102-24":[-110.94,1495.1],"6-102-25":[-45.58,1791.56],"6-102-26":[-43.69,2581.3],"6-102-27":[-24.82,2426.49],"6-102-28":[-33.45,1298.21],"6-102-29":[2.64,41.22],"6-102-30":[-11.18,1014.85],"6-102-31":[-30.38,1601.85],"6-102-32":[-4.18,1034.19],"6-102-33":[5.39,373.32],"6-102-34":[-27.49,3442.9],"6-102-35":[-16.46,32.46],"6-102-36":[-35.92,-0.17],"6-102-37":[-55.89,-9.77],"6-102-38":[-63.68,-20.55],"6-102-39":[-67.07,-25.59],"6-102-40":[-74.45,-31.39],"6-102-41":[-78.87,-34.22],"6-102-42":[-80.62,-38.59],"6-102-43":[-81.5,-37.5],"6-102-44":[-81.55,-36.82],"6-102-45":[-75.32,-31.36],"6-102-46":[-66.17,-25.52],"6-102-47":[-55.15,-19.95],"6-102-48":[-45.84,-14.58],"6-102-49":[-34.14,-11.03],"6-102-50":[-27.4,-8.6],"6-102-51":[-22.98,-8.32],"6-102-52":[-24.4,-8.55],"6-102-53":[-30.23,-9.28],"6-102-54":[-36.54,-12.51],"6-102-55":[-33.13,1569.32],"6-102-56":[1087.42,2518.52],"6-102-57":[2491.99,2973.89],"6-102-58":[2898.38,3288.12],"6-102-59":[3218.55,3458.77],"6-102-60":[3217.24,3410.38],"6-102-61":[3122.29,3280.26],"6-102-62":[3068.02,3169.64],"6-102-63":[-29.54,3074.68],"6-103-0":[11.81,26.94],"6-103-1":[10.02,22.97],"5-51-0":[10.02,26.96],"6-103-2":[1.76,20.03],"6-103-3":[-4.68,2.37],"5-51-1":[-4.68,20.52],"4-25-0":[-4.68,788.17],"6-103-4":[-7.07,732.27],"6-103-5":[-18.39,1038.7],"5-51-2":[-21.44,1119.08],"6-103-6":[-8.22,689.79],"6-103-7":[42.21,820.66],"5-51-3":[-21.06,887.81],"4-25-1":[-24.81,1119.08],"3-12-0":[-24.81,1618.98],"6-103-8":[142.66,871.07],"6-103-9":[190.73,581.35],"5-51-4":[142.66,947.89],"6-103-10":[-22.83,599.15],"6-103-11":[157.28,2526.11],"5-51-5":[-23.46,2526.11],"4-25-2":[-27.02,2526.11],"6-103-12":[409.57,2781.93],"6-103-13":[538.79,2000.38],"5-51-6":[317.03,2781.93],"6-103-14":[796.86,2483.46],"6-103-15":[786,1631.54],"5-51-7":[522.51,2758.43],"4-25-3":[253.49,3379.04],"3-12-1":[-32.17,4155.27],"6-103-16":[657.03,1440.56],"6-103-17":[814.48,2312.81],"5-51-8":[657.03,2312.81],"6-103-18":[461.77,2785.32],"6-103-19":[90.97,2608.85],"5-51-9":[90.97,3718.19],"4-25-4":[90.97,5176.87],"6-103-20":[-14.6,3075.61],"6-103-21":[-41.04,2284.9],"5-51-10":[-41.04,3075.61],"6-103-22":[6.19,2090.39],"6-103-23":[-33.9,1930.57],"5-51-11":[-33.9,2506.96],"4-25-5":[-41.04,7111.28],"3-12-2":[-109,7512.84],"6-103-24":[-68.73,1683.1],"6-103-25":[-50.32,1775.49],"5-51-12":[-110.94,1791.56],"6-103-26":[-15.99,22.84],"6-103-27":[-1.31,35.12],"5-51-13":[-43.69,2581.3],"4-25-6":[-110.94,3084.02],"6-103-28":[7.05,50.12],"6-103-29":[13.68,63.16],"5-51-14":[-33.45,1298.21],"6-103-30":[17.55,93.68],"6-103-31":[-60.48,1707.53],"5-51-15":[-60.48,1707.53],"4-25-7":[-117.38,2181.1],"3-12-3":[-135.7,3433.72],"6-103-32":[-5.21,1767.47],"6-103-33":[16.48,98.63],"5-51-16":[-5.21,1767.47],"6-103-34":[-32.43,3363.43],"6-103-35":[-8.1,36.62],"5-51-17":[-32.43,3442.9],"4-25-8":[-69.41,3783.24],"6-103-36":[-20.48,14.72],"6-103-37":[-39.42,-2.58],"5-51-18":[-55.89,14.72],"6-103-38":[-48.07,-12.98],"6-103-39":[-62.92,-19.51],"5-51-19":[-67.07,-12.98],"4-25-9":[-87.84,14.72],"3-12-4":[-129.46,3783.24],"6-103-40":[-67.31,-22.53],"6-103-41":[-76.31,-23.36],"5-51-20":[-78.87,-22.53],"6-103-42":[-79.55,-31.81],"6-103-43":[-79.53,-36.31],"5-51-21":[-81.5,-31.81],"4-25-10":[-85.52,-22.53],"6-103-44":[-81.64,-36.17],"6-103-45":[-78.43,-33.2],"5-51-22":[-81.64,-31.36],"6-103-46":[-69.24,-28.58],"6-103-47":[-59.94,-23.25],"5-51-23":[-69.24,-19.95],"4-25-11":[-82.43,-11.56],"3-12-5":[-93.34,15.19],"6-103-48":[-51.3,-17.94],"6-103-49":[-40.42,-14.13],"5-51-24":[-51.3,-11.03],"6-103-50":[-34.48,-12.04],"6-103-51":[-30.95,-11.71],"5-51-25":[-34.48,-8.32],"4-25-12":[-51.3,-0.85],"6-103-52":[-31.64,-11.83],"6-103-53":[-39.3,-12.7],"5-51-26":[-39.3,-8.55],"6-103-54":[-43.14,-15.55],"6-103-55":[-38.79,1241.72],"5-51-27":[-43.14,1569.32],"4-25-13":[-43.14,1793.86],"3-12-6":[-51.3,1793.86],"6-103-56":[767.03,2536.98],"6-103-57":[2496.32,2925.63],"5-51-28":[767.03,2973.89],"6-103-58":[2895.28,3218.56],"6-103-59":[3190.5,3373.24],"5-51-29":[2895.28,3458.77],"4-25-14":[767.03,3605.31],"6-103-60":[3144.58,3368.42],"6-103-61":[3056.95,3217.25],"5-51-30":[3056.95,3410.38],"6-103-62":[3059.08,3122.3],"6-103-63":[-29.54,3072.12],"5-51-31":[-29.54,3169.64],"4-25-15":[-29.54,3601.4],"3-12-7":[-29.54,3799.9],"6-104-0":[11.39,26.93],"6-104-1":[9.9,23.02],"6-104-2":[2.36,20.31],"6-104-3":[-6,3.25],"6-104-4":[-6,82.84],"6-104-5":[-17.31,495.96],"6-104-6":[-8.77,399.1],"6-104-7":[13.61,491.06],"6-104-8":[115.43,750.89],"6-104-9":[116.1,561.53],"6-104-10":[-21.96,1677.59],"6-104-11":[150.22,2530.45],"6-104-12":[479.34,2992.37],"6-104-13":[504.85,1634.35],"6-104-14":[575.67,1654.73],"6-104-15":[617.47,1754.54],"6-104-16":[880.33,1742.15],"6-104-17":[128.34,2838.35],"6-104-18":[-3.88,3047.6],"6-104-19":[5.77,1847.96],"6-104-20":[-14.28,1280.51],"6-104-21":[-154.55,1772.77],"6-104-22":[-30.87,2103.76],"6-104-23":[-95.56,1877.29],"6-104-24":[-70.08,953.51],"6-104-25":[-6.17,27.99],"6-104-26":[3.36,44.5],"6-104-27":[10.3,55.83],"6-104-28":[17.56,73.24],"6-104-29":[25.67,79.68],"6-104-30":[10.65,2422.76],"6-104-31":[29.67,2305.23],"6-104-32":[6.49,2345.05],"6-104-33":[23.54,1325.52],"6-104-34":[-20.93,3699.18],"6-104-35":[4.34,1042.4],"6-104-36":[-2.59,22.64],"6-104-37":[-24.91,7.42],"6-104-38":[-38.06,-5.3],"6-104-39":[-58.73,307.87],"6-104-40":[-68.83,370.75],"6-104-41":[-63.64,291.1],"6-104-42":[-75.39,303.79],"6-104-43":[-77.46,189.43],"6-104-44":[-81.92,202.32],"6-104-45":[-78.44,-34.62],"6-104-46":[-69.89,-30.52],"6-104-47":[-61.52,-25.77],"6-104-48":[-54.23,-20.78],"6-104-49":[-44.26,-17.39],"6-104-50":[-39.25,-15.56],"6-104-51":[-36.43,-15.24],"6-104-52":[-37.17,-15.45],"6-104-53":[-45.54,-15.94],"6-104-54":[-46.98,-19.12],"6-104-55":[-44.18,1300.89],"6-104-56":[486.82,2508.46],"6-104-57":[2399.34,2971.73],"6-104-58":[2925.62,3190.51],"6-104-59":[3187.99,3320.02],"6-104-60":[3081.53,3317.03],"6-104-61":[2940.53,3144.59],"6-104-62":[3024.22,3080.43],"6-104-63":[-29.54,3069.68],"6-105-0":[11.09,26.9],"6-105-1":[9.45,22.95],"5-52-0":[9.45,26.93],"6-105-2":[2.76,20.29],"6-105-3":[-5.31,3.8],"5-52-1":[-6,20.31],"6-105-4":[-5.65,-0.65],"6-105-5":[-15.13,237.7],"5-52-2":[-17.31,495.96],"6-105-6":[-2.03,277.08],"6-105-7":[17.85,385.91],"5-52-3":[-8.77,491.06],"6-105-8":[110.65,448.35],"6-105-9":[56.9,380.42],"5-52-4":[56.9,750.89],"6-105-10":[-16.13,1615.07],"6-105-11":[217.51,2962.65],"5-52-5":[-21.96,2962.65],"6-105-12":[454.52,2450.24],"6-105-13":[406.43,1532.32],"5-52-6":[406.43,2992.37],"6-105-14":[432.23,1232.86],"6-105-15":[549.84,1464.19],"5-52-7":[432.23,1754.54],"6-105-16":[730.4,2060.03],"6-105-17":[-64.08,2407.63],"5-52-8":[-64.08,2838.35],"6-105-18":[-63.81,805.59],"6-105-19":[-16.17,1519.8],"5-52-9":[-63.81,3047.6],"6-105-20":[-33.57,1755.88],"6-105-21":[-69.59,1735.53],"5-52-10":[-154.55,1772.77],"6-105-22":[4.65,2160.72],"6-105-23":[-47.98,1800.52],"5-52-11":[-95.56,2160.72],"6-105-24":[1.5,35.14],"6-105-25":[6.58,52.59],"5-52-12":[-70.08,953.51],"6-105-26":[13.99,67.42],"6-105-27":[22.24,82.34],"5-52-13":[3.36,82.34],"6-105-28":[30.08,2125.15],"6-105-29":[13.27,4108.68],"5-52-14":[13.27,4108.68],"6-105-30":[17.77,2687.61],"6-105-31":[15.58,2267.3],"5-52-15":[10.65,2687.61],"6-105-32":[-40.37,1916.44],"6-105-33":[6.53,1738.04],"5-52-16":[-40.37,2345.05],"6-105-34":[14.43,3755.88],"6-105-35":[-28.54,2972.87],"5-52-17":[-28.54,3755.88],"6-105-36":[3.7,35.22],"6-105-37":[-12.09,21.02],"5-52-18":[-24.91,35.22],"6-105-38":[-24.32,2.72],"6-105-39":[-35.25,1205.98],"5-52-19":[-58.73,1205.98],"6-105-40":[29.13,1196.06],"6-105-41":[167.75,715.25],"5-52-20":[-68.83,1196.06],"6-105-42":[-14.21,662],"6-105-43":[-99.76,566.35],"5-52-21":[-99.76,662],"6-105-44":[-78.53,969.34],"6-105-45":[-78.21,-34.74],"5-52-22":[-81.92,969.34],"6-105-46":[-69.94,-30.98],"6-105-47":[-61.91,-27.2],"5-52-23":[-69.94,-25.77],"6-105-48":[-54.84,-22.89],"6-105-49":[-47.73,-19.91],"5-52-24":[-54.84,-17.39],"6-105-50":[-42.44,-18.56],"6-105-51":[-41.44,-18.27],"5-52-25":[-42.44,-15.24],"6-105-52":[-43.24,-18.39],"6-105-53":[-52.02,-19.12],"5-52-26":[-52.02,-15.45],"6-105-54":[-54.04,-21.06],"6-105-55":[-53.1,680.38],"5-52-27":[-54.04,1300.89],"6-105-56":[536.8,2408.3],"6-105-57":[2392.94,3030.32],"5-52-28":[486.82,3030.32],"6-105-58":[2971.72,3188.16],"6-105-59":[3108.98,3235.61],"5-52-29":[2925.62,3320.02],"6-105-60":[3012.27,3197.29],"6-105-61":[2926.36,3081.54],"5-52-30":[2926.36,3317.03],"6-105-62":[2976.46,3060.18],"6-105-63":[-29.54,3063.52],"5-52-31":[-29.54,3080.43],"6-106-0":[10.64,26.89],"6-106-1":[8.53,22.53],"6-106-2":[2.49,19.46],"6-106-3":[-5.7,3.75],"6-106-4":[-6.56,0.13],"6-106-5":[-15.63,39.75],"6-106-6":[-15.63,346.26],"6-106-7":[14.94,411.14],"6-106-8":[91.15,443.53],"6-106-9":[32.4,383.49],"6-106-10":[-14.77,717.41],"6-106-11":[169.48,2548.26],"6-106-12":[315.35,2226.52],"6-106-13":[309.69,1486.61],"6-106-14":[471.52,1598.44],"6-106-15":[383.84,1743.81],"6-106-16":[236.1,1936.12],"6-106-17":[-59.35,1887.25],"6-106-18":[-120.47,785.42],"6-106-19":[-39.04,1101.77],"6-106-20":[-105.16,584.53],"6-106-21":[-78.25,1795.67],"6-106-22":[-35.2,1934.56],"6-106-23":[-36.2,3691.21],"6-106-24":[-4.52,1951.28],"6-106-25":[17.56,2501.63],"6-106-26":[-6.79,2962.21],"6-106-27":[26.54,2343.09],"6-106-28":[24.22,1769.36],"6-106-29":[30.27,536.54],"6-106-30":[32.1,935.33],"6-106-31":[37.62,2935.4],"6-106-32":[39.93,3132.81],"6-106-33":[-11.89,3490.23],"6-106-34":[19.97,1959.49],"6-106-35":[5.42,2405.04],"6-106-36":[10.5,52.7],"6-106-37":[1.57,42.5],"6-106-38":[-1.29,35.06],"6-106-39":[-31.05,1152.3],"6-106-40":[340.66,1241.42],"6-106-41":[303.97,737.39],"6-106-42":[254.05,673.8],"6-106-43":[-1.49,507.31],"6-106-44":[-78.18,1063.1],"6-106-45":[-78.01,-33.81],"6-106-46":[-69.49,-30.79],"6-106-47":[-61.11,-27.35],"6-106-48":[-54.99,-24.24],"6-106-49":[-48.72,-21.27],"6-106-50":[-45.04,-20.59],"6-106-51":[-45.09,-20.39],"6-106-52":[-47.54,-20.76],"6-106-53":[-57.28,-21.9],"6-106-54":[-61.21,-25.94],"6-106-55":[-59.83,845.24],"6-106-56":[519.85,2462.74],"6-106-57":[2401.53,3046.36],"6-106-58":[3030.31,3177.4],"6-106-59":[2994.82,3172.35],"6-106-60":[2931.11,3109.06],"6-106-61":[2879.88,3012.28],"6-106-62":[2930.22,3048.31],"6-106-63":[-29.59,3060.25],"6-107-0":[10.15,26.87],"6-107-1":[8.13,21.47],"5-53-0":[8.13,26.89],"6-107-2":[2.41,16.79],"6-107-3":[-5.35,4.39],"5-53-1":[-5.7,19.46],"4-26-0":[-6,26.93],"6-107-4":[-5.79,0.24],"6-107-5":[-13.91,13.68],"5-53-2":[-15.63,39.75],"6-107-6":[-13.91,479.01],"6-107-7":[3.58,427.06],"5-53-3":[-15.63,479.01],"4-26-1":[-17.31,495.96],"6-107-8":[3.9,342.41],"6-107-9":[56.97,417.22],"5-53-4":[3.9,443.53],"6-107-10":[-10.31,1200.19],"6-107-11":[142.11,2000.95],"5-53-5":[-14.77,2548.26],"4-26-2":[-21.96,2962.65],"6-107-12":[249.54,1644.22],"6-107-13":[260.32,1523.39],"5-53-6":[249.54,2226.52],"6-107-14":[165.96,1600.44],"6-107-15":[117.12,1541.69],"5-53-7":[117.12,1743.81],"4-26-3":[117.12,2992.37],"6-107-16":[42.3,816.14],"6-107-17":[-150.51,1174.47],"5-53-8":[-150.51,1936.12],"6-107-18":[-29.13,918.27],"6-107-19":[3.79,96.9],"5-53-9":[-120.47,1101.77],"4-26-4":[-150.51,3047.6],"6-107-20":[-52.47,121.19],"6-107-21":[-35.84,1218.7],"5-53-10":[-105.16,1795.67],"6-107-22":[0.69,450.06],"6-107-23":[-53.71,3956.01],"5-53-11":[-53.71,3956.01],"4-26-5":[-154.55,3956.01],"6-107-24":[11.3,1042.66],"6-107-25":[-10.65,2731.61],"5-53-12":[-10.65,2731.61],"6-107-26":[-0.27,2712.33],"6-107-27":[-54.19,2627.63],"5-53-13":[-54.19,2962.21],"4-26-6":[-70.08,2962.21],"6-107-28":[-134.19,2528.23],"6-107-29":[21.9,2469.27],"5-53-14":[-134.19,2528.23],"6-107-30":[58.38,136.19],"6-107-31":[24.07,2286.44],"5-53-15":[24.07,2935.4],"4-26-7":[-134.19,4108.68],"6-107-32":[0.84,2955.49],"6-107-33":[28.66,2702.65],"5-53-16":[-11.89,3490.23],"6-107-34":[15.94,1676.82],"6-107-35":[5.35,2244.61],"5-53-17":[5.35,2405.04],"4-26-8":[-40.37,3755.88],"6-107-36":[21.36,72.31],"6-107-37":[-21.63,280.29],"5-53-18":[-21.63,280.29],"6-107-38":[-20.07,284.71],"6-107-39":[-14.22,553.65],"5-53-19":[-31.05,1152.3],"4-26-9":[-58.73,1205.98],"6-107-40":[235.6,710.82],"6-107-41":[292.36,692.66],"5-53-20":[235.6,1241.42],"6-107-42":[104.9,561.35],"6-107-43":[-30.26,610.87],"5-53-21":[-30.26,673.8],"4-26-10":[-99.76,1241.42],"6-107-44":[-76.09,322.34],"6-107-45":[-73.83,-32.37],"5-53-22":[-78.18,1063.1],"6-107-46":[-67.41,-29.79],"6-107-47":[-60.78,-27.09],"5-53-23":[-69.49,-27.09],"4-26-11":[-81.92,1063.1],"6-107-48":[-54.95,-24.93],"6-107-49":[-49.55,-22.67],"5-53-24":[-54.99,-21.27],"6-107-50":[-47.09,-22.05],"6-107-51":[-49,-22.03],"5-53-25":[-49,-20.39],"4-26-12":[-54.99,-15.24],"6-107-52":[-52.14,-22.78],"6-107-53":[-62.69,-24.36],"5-53-26":[-62.69,-20.76],"6-107-54":[-67.4,-28.92],"6-107-55":[-64.36,1172.91],"5-53-27":[-67.4,1172.91],"4-26-13":[-67.4,1300.89],"6-107-56":[845.23,2590.73],"6-107-57":[2462.73,3089.34],"5-53-28":[519.85,3089.34],"6-107-58":[3046.35,3196.31],"6-107-59":[2917.96,3163.37],"5-53-29":[2917.96,3196.31],"4-26-14":[486.82,3320.02],"6-107-60":[2826.82,2994.83],"6-107-61":[2826.82,2932.32],"5-53-30":[2826.82,3109.06],"6-107-62":[2871.64,3035.5],"6-107-63":[-29.58,3058.07],"5-53-31":[-29.59,3060.25],"4-26-15":[-29.59,3317.03],"6-108-0":[10.04,26.86],"6-108-1":[7.6,20.19],"6-108-2":[2.41,15.36],"6-108-3":[-5.02,4.8],"6-108-4":[-5,0.2],"6-108-5":[-10.53,23.3],"6-108-6":[-6.11,487.14],"6-108-7":[-1.85,1127.4],"6-108-8":[-14.61,1401.18],"6-108-9":[9.01,816.9],"6-108-10":[0.99,804.47],"6-108-11":[261.28,1845.92],"6-108-12":[224.24,1706.86],"6-108-13":[169.56,1269.14],"6-108-14":[159.24,878.23],"6-108-15":[100.27,339.07],"6-108-16":[60.86,1264.57],"6-108-17":[-268.7,1987.41],"6-108-18":[-101.36,1234.98],"6-108-19":[-7.79,581.2],"6-108-20":[16.92,1941.55],"6-108-21":[18.57,59.8],"6-108-22":[22.07,60.97],"6-108-23":[8,553.56],"6-108-24":[22.25,69.87],"6-108-25":[31.05,86.5],"6-108-26":[38.77,279.06],"6-108-27":[15.22,1607.31],"6-108-28":[-24.5,2547.07],"6-108-29":[21.53,3011.04],"6-108-30":[36.96,1410.92],"6-108-31":[-6.95,2053.63],"6-108-32":[33.67,1465.3],"6-108-33":[35.26,2752.59],"6-108-34":[-4.86,1869.57],"6-108-35":[7.81,2985.2],"6-108-36":[18.74,169.89],"6-108-37":[-47.89,844.91],"6-108-38":[-13.38,967.01],"6-108-39":[127.51,455.4],"6-108-40":[265.28,557.1],"6-108-41":[312.18,555.5],"6-108-42":[124.91,497.24],"6-108-43":[-59.03,276.5],"6-108-44":[-71.44,115.27],"6-108-45":[-69.83,-30.39],"6-108-46":[-64.74,-28.34],"6-108-47":[-58.68,-26.12],"6-108-48":[-54.09,-24.3],"6-108-49":[-49.45,-23.51],"6-108-50":[-48.53,-23.46],"6-108-51":[-51.56,-23.6],"6-108-52":[-55.45,-24.6],"6-108-53":[-65.39,-26.41],"6-108-54":[-71.76,-31.34],"6-108-55":[-65.99,1359.83],"6-108-56":[1164.44,2630.58],"6-108-57":[2590.72,3151.32],"6-108-58":[3089.33,3203.64],"6-108-59":[2882.88,3159.64],"6-108-60":[2697.34,2917.97],"6-108-61":[2697.34,2871.65],"6-108-62":[2844.51,3023.22],"6-108-63":[-29.54,3057.86],"6-109-0":[10.07,26.84],"6-109-1":[7.6,19.56],"5-54-0":[7.6,26.86],"6-109-2":[1.94,15.3],"6-109-3":[-4.59,4.34],"5-54-1":[-5.02,15.36],"6-109-4":[-4.59,1.33],"6-109-5":[-11.15,-0.27],"5-54-2":[-11.15,23.3],"6-109-6":[-13.23,1068.55],"6-109-7":[49.78,2201.02],"5-54-3":[-13.23,2201.02],"6-109-8":[105.58,2117.99],"6-109-9":[2.06,1848.18],"5-54-4":[-14.61,2117.99],"6-109-10":[2.81,676.85],"6-109-11":[199.21,2240.33],"5-54-5":[0.99,2240.33],"6-109-12":[203.07,2048.94],"6-109-13":[137.94,905.39],"5-54-6":[137.94,2048.94],"6-109-14":[100.62,1057.62],"6-109-15":[12.1,1445.43],"5-54-7":[12.1,1445.43],"6-109-16":[169.25,1718.97],"6-109-17":[-9.27,2763.77],"5-54-8":[-268.7,2763.77],"6-109-18":[-16.31,1727.04],"6-109-19":[-43.56,1925.58],"5-54-9":[-101.36,1925.58],"6-109-20":[-39.24,1453.61],"6-109-21":[16.04,722.76],"5-54-10":[-39.24,1941.55],"6-109-22":[13.17,672.79],"6-109-23":[24.41,69.74],"5-54-11":[8,672.79],"6-109-24":[29.92,74.99],"6-109-25":[35.9,87.33],"5-54-12":[22.25,87.33],"6-109-26":[42.78,100.04],"6-109-27":[47.35,114.52],"5-54-13":[15.22,1607.31],"6-109-28":[47.35,127.22],"6-109-29":[45.25,289.5],"5-54-14":[-24.5,3011.04],"6-109-30":[39.86,726.39],"6-109-31":[-77.81,1820.67],"5-54-15":[-77.81,2053.63],"6-109-32":[-16.98,2152.95],"6-109-33":[17.04,2555.71],"5-54-16":[-16.98,2752.59],"6-109-34":[33.44,1415.76],"6-109-35":[30.37,2395.35],"5-54-17":[-4.86,2985.2],"6-109-36":[4.41,198.32],"6-109-37":[-3.57,755.14],"5-54-18":[-47.89,844.91],"6-109-38":[123.22,1012.77],"6-109-39":[240.33,556.98],"5-54-19":[-13.38,1012.77],"6-109-40":[305.48,1049.45],"6-109-41":[288.49,1051.49],"5-54-20":[265.28,1051.49],"6-109-42":[117.95,457.28],"6-109-43":[-68.16,175.13],"5-54-21":[-68.16,497.24],"6-109-44":[-66.21,-23.79],"6-109-45":[-63.97,-28.21],"5-54-22":[-71.44,115.27],"6-109-46":[-60.3,-26.68],"6-109-47":[-55.65,-25.02],"5-54-23":[-64.74,-25.02],"6-109-48":[-52.05,-23.14],"6-109-49":[-47.99,-22.51],"5-54-24":[-54.09,-22.51],"6-109-50":[-47.82,-22.39],"6-109-51":[-52.39,-23.56],"5-54-25":[-52.39,-22.39],"6-109-52":[-58.59,-25.84],"6-109-53":[-69.44,-28.36],"5-54-26":[-69.44,-24.6],"6-109-54":[-76.93,-32.97],"6-109-55":[-75.43,1185.13],"5-54-27":[-76.93,1359.83],"6-109-56":[945.1,2622.61],"6-109-57":[2578.38,3171.09],"5-54-28":[945.1,3171.09],"6-109-58":[3008.62,3189.23],"6-109-59":[2819.28,3116.04],"5-54-29":[2819.28,3203.64],"6-109-60":[2623.1,2882.89],"6-109-61":[2629.61,2844.52],"5-54-30":[2623.1,2917.97],"6-109-62":[2805.68,3011.97],"6-109-63":[-29.54,3059.53],"5-54-31":[-29.54,3059.53],"6-110-0":[10.54,26.83],"6-110-1":[6.87,20.99],"6-110-2":[1.92,15.13],"6-110-3":[-4.55,2.92],"6-110-4":[-4.02,4.86],"6-110-5":[-10.86,-0.21],"6-110-6":[-13.9,856.13],"6-110-7":[47.14,1828.99],"6-110-8":[120.23,1922.66],"6-110-9":[31.37,2002.65],"6-110-10":[5.26,531.48],"6-110-11":[163.23,2290.58],"6-110-12":[207.26,2374.21],"6-110-13":[182.49,1509.02],"6-110-14":[66.2,1216.44],"6-110-15":[10.1,1386.01],"6-110-16":[4.32,1509.87],"6-110-17":[10.26,1774.19],"6-110-18":[-48.7,999.37],"6-110-19":[-18.69,1373.1],"6-110-20":[-17.54,1801.42],"6-110-21":[-19.03,1948.19],"6-110-22":[24,290.95],"6-110-23":[28.82,74.19],"6-110-24":[34.84,77.85],"6-110-25":[38.27,88.57],"6-110-26":[43.53,99.45],"6-110-27":[49.52,113.8],"6-110-28":[55.44,127.03],"6-110-29":[62.11,137.95],"6-110-30":[67.63,149.08],"6-110-31":[62.22,363.49],"6-110-32":[-56.46,1519.04],"6-110-33":[-10.59,3088.67],"6-110-34":[26.67,862.43],"6-110-35":[40.62,116.33],"6-110-36":[-0.62,359.52],"6-110-37":[-20.35,453.11],"6-110-38":[138.03,558.61],"6-110-39":[237.65,915.42],"6-110-40":[389.72,1429.68],"6-110-41":[289.78,1437.62],"6-110-42":[27.63,482.51],"6-110-43":[-47.6,188.18],"6-110-44":[-60.49,-16.06],"6-110-45":[-58.01,-25.18],"6-110-46":[-56.42,-23.9],"6-110-47":[-52.82,-22.85],"6-110-48":[-49.85,-21.48],"6-110-49":[-46.08,-21.12],"6-110-50":[-46.52,-21.31],"6-110-51":[-52.46,-23.05],"6-110-52":[-59.62,-26.04],"6-110-53":[-71.74,-29.78],"6-110-54":[-80.19,-34.71],"6-110-55":[-74.89,1382.72],"6-110-56":[948.42,2601.74],"6-110-57":[2573.54,3136.57],"6-110-58":[2893.92,3137.89],"6-110-59":[2675.26,3008.63],"6-110-60":[2578.01,2819.29],"6-110-61":[2594.09,2805.69],"6-110-62":[2759.42,2999.73],"6-110-63":[-29.54,3062.38],"6-111-0":[11.53,28.02],"6-111-1":[6.59,23.68],"5-55-0":[6.59,28.02],"6-111-2":[2.12,13.54],"6-111-3":[-4.24,2.58],"5-55-1":[-4.55,15.13],"4-27-0":[-5.02,28.02],"6-111-4":[-1.34,4.98],"6-111-5":[-6.9,-0.37],"5-55-2":[-10.86,4.98],"6-111-6":[-9.76,462.09],"6-111-7":[19.54,1221.31],"5-55-3":[-13.9,1828.99],"4-27-1":[-13.9,2201.02],"3-13-0":[-17.31,2201.02],"6-111-8":[105.45,1652.58],"6-111-9":[35.47,2070.51],"5-55-4":[31.37,2070.51],"6-111-10":[7.84,825.86],"6-111-11":[208.63,1856.83],"5-55-5":[5.26,2290.58],"4-27-2":[-14.61,2290.58],"6-111-12":[30.93,2358.55],"6-111-13":[242.51,2286.52],"5-55-6":[30.93,2374.21],"6-111-14":[42.21,2263.84],"6-111-15":[-27.41,1447.73],"5-55-7":[-27.41,2263.84],"4-27-3":[-27.41,2374.21],"3-13-1":[-27.41,2992.37],"2-6-0":[-32.17,4155.27],"6-111-16":[-79.7,1878.55],"6-111-17":[23.24,62.05],"5-55-8":[-79.7,1878.55],"6-111-18":[25.69,66.77],"6-111-19":[-16.84,1986.11],"5-55-9":[-48.7,1986.11],"4-27-4":[-268.7,2763.77],"6-111-20":[-0.37,1882.11],"6-111-21":[27.45,74.09],"5-55-10":[-19.03,1948.19],"6-111-22":[33.04,75.05],"6-111-23":[33.91,80.5],"5-55-11":[24,290.95],"4-27-5":[-39.24,1948.19],"3-13-2":[-268.7,3956.01],"6-111-24":[37.06,83.13],"6-111-25":[39.61,93.95],"5-55-12":[34.84,93.95],"6-111-26":[44.33,102.28],"6-111-27":[49.63,114.34],"5-55-13":[43.53,114.34],"4-27-6":[15.22,1607.31],"6-111-28":[55.18,125.8],"6-111-29":[59.47,301.73],"5-55-14":[55.18,301.73],"6-111-30":[66.39,148.84],"6-111-31":[69.38,149.75],"5-55-15":[62.22,363.49],"4-27-7":[-77.81,3011.04],"3-13-3":[-134.19,4108.68],"2-6-1":[-268.7,7512.84],"6-111-32":[15.14,3028.24],"6-111-33":[-92.74,2016.59],"5-55-16":[-92.74,3088.67],"6-111-34":[38.32,670.15],"6-111-35":[39.61,131.25],"5-55-17":[26.67,862.43],"4-27-8":[-92.74,3088.67],"6-111-36":[-50.67,610.22],"6-111-37":[37.9,457.36],"5-55-18":[-50.67,610.22],"6-111-38":[212.43,466.21],"6-111-39":[278.13,1152.22],"5-55-19":[138.03,1152.22],"4-27-9":[-50.67,1152.22],"3-13-4":[-92.74,3755.88],"6-111-40":[234.53,1528.53],"6-111-41":[101.81,1002.66],"5-55-20":[101.81,1528.53],"6-111-42":[72.04,400.15],"6-111-43":[-50.51,399.93],"5-55-21":[-50.51,482.51],"4-27-10":[-68.16,1528.53],"6-111-44":[-51.73,212.32],"6-111-45":[-50.87,-20.77],"5-55-22":[-60.49,212.32],"6-111-46":[-49.69,-20.97],"6-111-47":[-47.09,-20.45],"5-55-23":[-56.42,-20.45],"4-27-11":[-71.44,212.32],"3-13-5":[-99.76,1528.53],"2-6-2":[-129.46,3783.24],"6-111-48":[-45.23,-19.5],"6-111-49":[-42.63,-19.5],"5-55-24":[-49.85,-19.5],"6-111-50":[-45.55,-20.17],"6-111-51":[-51.95,-22.67],"5-55-25":[-52.46,-20.17],"4-27-12":[-54.09,-19.5],"6-111-52":[-60.12,-25.88],"6-111-53":[-74.09,-30.6],"5-55-26":[-74.09,-25.88],"6-111-54":[-82.21,-35.97],"6-111-55":[-78.66,1711.28],"5-55-27":[-82.21,1711.28],"4-27-13":[-82.21,1711.28],"3-13-6":[-82.21,1711.28],"6-111-56":[1382.71,2605.54],"6-111-57":[2513.78,2976.73],"5-55-28":[948.42,3136.57],"6-111-58":[2794.54,2992.85],"6-111-59":[2564.77,2893.93],"5-55-29":[2564.77,3137.89],"4-27-14":[945.1,3203.64],"6-111-60":[2500.69,2687.3],"6-111-61":[2526.81,2763.19],"5-55-30":[2500.69,2819.29],"6-111-62":[2709.28,2987.5],"6-111-63":[-29.54,3065.26],"5-55-31":[-29.54,3065.26],"4-27-15":[-29.54,3065.26],"3-13-7":[-29.59,3320.02],"2-6-3":[-82.21,3799.9],"6-112-0":[12.7,28.89],"6-112-1":[6.42,25.49],"6-112-2":[2.23,12.87],"6-112-3":[-4.13,4.1],"6-112-4":[-0.69,55.51],"6-112-5":[-5.99,225.27],"6-112-6":[-8.16,496.12],"6-112-7":[13.72,1767.28],"6-112-8":[107.91,1681.65],"6-112-9":[91.8,1766.67],"6-112-10":[12.16,1755.07],"6-112-11":[24.97,1915.02],"6-112-12":[3.84,2099.48],"6-112-13":[23.28,2155.76],"6-112-14":[6.54,1965.97],"6-112-15":[15.76,2024.26],"6-112-16":[12.72,1410.98],"6-112-17":[25.6,66.52],"6-112-18":[-24.3,3037.73],"6-112-19":[-29.59,3225.44],"6-112-20":[16.39,1148.96],"6-112-21":[35.65,80.83],"6-112-22":[36.81,83.26],"6-112-23":[36.79,87.96],"6-112-24":[39.76,92.17],"6-112-25":[41.96,97.91],"6-112-26":[46.97,104.85],"6-112-27":[51.71,114.88],"6-112-28":[56.92,128.34],"6-112-29":[57.72,134.69],"6-112-30":[65.91,141.57],"6-112-31":[67.63,143.17],"6-112-32":[6.63,1532.53],"6-112-33":[44.6,4900.75],"6-112-34":[45.11,141.56],"6-112-35":[56.19,138.86],"6-112-36":[28.28,417.68],"6-112-37":[-0.95,370.77],"6-112-38":[108.64,478.74],"6-112-39":[201.08,643.8],"6-112-40":[73.33,1103.75],"6-112-41":[-45.74,301.67],"6-112-42":[-38.95,426.73],"6-112-43":[-35.05,487.73],"6-112-44":[-41.29,417.28],"6-112-45":[-43.35,-6.75],"6-112-46":[-43.03,-16.66],"6-112-47":[-41.89,-17.81],"6-112-48":[-40.82,-17.53],"6-112-49":[-40.23,-17.58],"6-112-50":[-44.52,-18.84],"6-112-51":[-52.08,-21.66],"6-112-52":[-60.31,-25.8],"6-112-53":[-75.15,-30.77],"6-112-54":[-83.59,-37.04],"6-112-55":[-84.73,1701.91],"6-112-56":[1598.15,2525.84],"6-112-57":[2453.63,2840.96],"6-112-58":[2629.4,2867.37],"6-112-59":[2498.34,2794.55],"6-112-60":[2390.04,2564.78],"6-112-61":[2390.04,2709.29],"6-112-62":[2666.35,2977.76],"6-112-63":[-29.54,3068.14],"6-113-0":[13.21,29.53],"6-113-1":[6.55,26.2],"5-56-0":[6.42,29.53],"6-113-2":[2.65,15.62],"6-113-3":[-3.24,6.86],"5-56-1":[-4.13,15.62],"6-113-4":[0.26,195.82],"6-113-5":[-4.34,347.8],"5-56-2":[-5.99,347.8],"6-113-6":[-5.98,370.97],"6-113-7":[44.86,2177.91],"5-56-3":[-8.16,2177.91],"6-113-8":[234.82,2476.55],"6-113-9":[401.32,2650.27],"5-56-4":[91.8,2650.27],"6-113-10":[23.8,2153.15],"6-113-11":[-0.3,1760.98],"5-56-5":[-0.3,2153.15],"6-113-12":[-14.43,1103.01],"6-113-13":[1.7,1633.71],"5-56-6":[-14.43,2155.76],"6-113-14":[6.02,2108.2],"6-113-15":[5.38,1700.99],"5-56-7":[5.38,2108.2],"6-113-16":[25.39,1549.63],"6-113-17":[-8.62,1641.19],"5-56-8":[-8.62,1641.19],"6-113-18":[-22.8,2604.93],"6-113-19":[-48.47,3800.26],"5-56-9":[-48.47,3800.26],"6-113-20":[33.11,892.01],"6-113-21":[38.38,417.51],"5-56-10":[16.39,1148.96],"6-113-22":[40.6,91.39],"6-113-23":[42.43,95.06],"5-56-11":[36.79,95.06],"6-113-24":[44.58,97.8],"6-113-25":[46.59,101.92],"5-56-12":[39.76,101.92],"6-113-26":[49.34,105.97],"6-113-27":[48.14,115.83],"5-56-13":[46.97,115.83],"6-113-28":[47.63,237.05],"6-113-29":[57.2,131.84],"5-56-14":[47.63,237.05],"6-113-30":[64.56,137.12],"6-113-31":[68.18,144.76],"5-56-15":[64.56,144.76],"6-113-32":[42.04,2301.21],"6-113-33":[54.12,5227.39],"5-56-16":[6.63,5227.39],"6-113-34":[38.04,203.53],"6-113-35":[58.85,141.09],"5-56-17":[38.04,203.53],"6-113-36":[54.67,131.12],"6-113-37":[-15.46,223.46],"5-56-18":[-15.46,417.68],"6-113-38":[7.1,475.97],"6-113-39":[134.5,657.09],"5-56-19":[7.1,657.09],"6-113-40":[48.52,421.94],"6-113-41":[-34.6,242.02],"5-56-20":[-45.74,1103.75],"6-113-42":[-55.11,1079.1],"6-113-43":[-15.57,1164.85],"5-56-21":[-55.11,1164.85],"6-113-44":[-38.17,716.99],"6-113-45":[-33.33,267.94],"5-56-22":[-43.35,716.99],"6-113-46":[-34.86,-12.78],"6-113-47":[-35.43,-15.73],"5-56-23":[-43.03,-12.78],"6-113-48":[-35.41,-16.8],"6-113-49":[-37.65,-17.05],"5-56-24":[-40.82,-16.8],"6-113-50":[-42.35,-18.33],"6-113-51":[-51.23,-20.46],"5-56-25":[-52.08,-18.33],"6-113-52":[-59.96,-25.01],"6-113-53":[-76.66,-30.45],"5-56-26":[-76.66,-25.01],"6-113-54":[-85.09,-37.69],"6-113-55":[-88.87,1616.15],"5-56-27":[-88.87,1701.91],"6-113-56":[1284.64,2522.11],"6-113-57":[2297.97,2629.41],"5-56-28":[1284.64,2840.96],"6-113-58":[2577.31,2726.71],"6-113-59":[2407.17,2693.87],"5-56-29":[2407.17,2867.37],"6-113-60":[2235.7,2498.35],"6-113-61":[2303.19,2666.36],"5-56-30":[2235.7,2709.29],"6-113-62":[2636.28,2970.03],"6-113-63":[-29.54,3070.04],"5-56-31":[-29.54,3070.04],"6-114-0":[13.2,29.62],"6-114-1":[8.14,26.14],"6-114-2":[3.61,17.19],"6-114-3":[0.69,7.07],"6-114-4":[0.49,25.1],"6-114-5":[-2,264.4],"6-114-6":[-2.41,486.19],"6-114-7":[19.72,1696.85],"6-114-8":[77.22,2512.73],"6-114-9":[497.57,2822.43],"6-114-10":[9.71,2513.43],"6-114-11":[10.97,1227.42],"6-114-12":[11.66,627.07],"6-114-13":[3.09,1624.43],"6-114-14":[7.46,1440.11],"6-114-15":[-16.78,1737.87],"6-114-16":[-15.87,2312.97],"6-114-17":[-84.13,2061.69],"6-114-18":[-17.62,1666.14],"6-114-19":[-16.18,124.82],"6-114-20":[11.53,77.38],"6-114-21":[17.61,96.43],"6-114-22":[9.96,768.11],"6-114-23":[28.86,604.84],"6-114-24":[41.43,100.45],"6-114-25":[48.83,105.19],"6-114-26":[50.73,109.47],"6-114-27":[34.45,109.76],"6-114-28":[34.45,123],"6-114-29":[59.18,129.68],"6-114-30":[63.45,136.26],"6-114-31":[66.37,144.7],"6-114-32":[64.3,1467.8],"6-114-33":[33.02,4032.23],"6-114-34":[24.72,3694.06],"6-114-35":[31.23,439.48],"6-114-36":[-3.39,882.4],"6-114-37":[7.79,520.58],"6-114-38":[-0.72,739.41],"6-114-39":[40.06,660.81],"6-114-40":[66.17,435.75],"6-114-41":[40.88,374.96],"6-114-42":[42.73,458.66],"6-114-43":[12.46,485.33],"6-114-44":[-17.44,336.86],"6-114-45":[-41.04,1170.09],"6-114-46":[-31.63,-2.93],"6-114-47":[-33.62,-14.07],"6-114-48":[-34.78,-15.38],"6-114-49":[-37.5,-16.54],"6-114-50":[-40.37,-17.47],"6-114-51":[-49.64,-19.17],"6-114-52":[-59.34,-23.21],"6-114-53":[-75.38,-29.25],"6-114-54":[-88.58,-36.54],"6-114-55":[-89.56,1284.65],"6-114-56":[522.14,2298.07],"6-114-57":[2001.43,2577.32],"6-114-58":[2428.59,2638.08],"6-114-59":[2355.27,2612.99],"6-114-60":[2205.2,2407.18],"6-114-61":[2221.1,2636.29],"6-114-62":[2602.74,2964.79],"6-114-63":[-29.54,3070.97],"6-115-0":[12.07,29.55],"6-115-1":[8.62,24.47],"5-57-0":[8.14,29.62],"6-115-2":[2.39,17.3],"6-115-3":[1.82,6.24],"5-57-1":[0.69,17.3],"4-28-0":[-4.13,29.62],"6-115-4":[0.8,5.87],"6-115-5":[-0.82,73.43],"5-57-2":[-2,264.4],"6-115-6":[-0.82,115.08],"6-115-7":[1.77,672.76],"5-57-3":[-2.41,1696.85],"4-28-1":[-8.16,2177.91],"6-115-8":[49.51,2830.65],"6-115-9":[503.96,2291.47],"5-57-4":[49.51,2830.65],"6-115-10":[9.12,2265.18],"6-115-11":[12.44,34.94],"5-57-5":[9.12,2513.43],"4-28-2":[-0.3,2830.65],"6-115-12":[15.26,35.92],"6-115-13":[10.83,820.94],"5-57-6":[3.09,1624.43],"6-115-14":[14.24,1183.3],"6-115-15":[9.98,553.47],"5-57-7":[-16.78,1737.87],"4-28-3":[-16.78,2155.76],"6-115-16":[9.03,1740.56],"6-115-17":[8.77,43.6],"5-57-8":[-84.13,2312.97],"6-115-18":[14.8,45.02],"6-115-19":[16.45,54.08],"5-57-9":[-17.62,1666.14],"4-28-4":[-84.13,3800.26],"6-115-20":[24.53,58.31],"6-115-21":[25.92,65.71],"5-57-10":[11.53,96.43],"6-115-22":[27.14,79.03],"6-115-23":[25.23,82.85],"5-57-11":[9.96,768.11],"4-28-5":[9.96,1148.96],"6-115-24":[19.75,904.42],"6-115-25":[34.27,1005.01],"5-57-12":[19.75,1005.01],"6-115-26":[39.75,844.84],"6-115-27":[31.11,457.05],"5-57-13":[31.11,844.84],"4-28-6":[19.75,1005.01],"6-115-28":[39.7,118.49],"6-115-29":[57.52,126.91],"5-57-14":[34.45,129.68],"6-115-30":[61.37,131.2],"6-115-31":[64.24,143.3],"5-57-15":[61.37,144.7],"4-28-7":[34.45,237.05],"6-115-32":[67.54,296.18],"6-115-33":[36.6,3477.99],"5-57-16":[33.02,4032.23],"6-115-34":[32.51,4553.66],"6-115-35":[36.3,265.77],"5-57-17":[24.72,4553.66],"4-28-8":[6.63,5227.39],"6-115-36":[59.75,573.48],"6-115-37":[29.75,1449.42],"5-57-18":[-3.39,1449.42],"6-115-38":[28.52,1670.14],"6-115-39":[244.17,1064.78],"5-57-19":[-0.72,1670.14],"4-28-9":[-15.46,1670.14],"6-115-40":[176.38,727.4],"6-115-41":[119.67,517.69],"5-57-20":[40.88,727.4],"6-115-42":[67.33,518.96],"6-115-43":[59.37,560.11],"5-57-21":[12.46,560.11],"4-28-10":[-55.11,1164.85],"6-115-44":[34.38,521.33],"6-115-45":[-56.77,1522.55],"5-57-22":[-56.77,1522.55],"6-115-46":[-46.81,1610.49],"6-115-47":[-195.28,1424.55],"5-57-23":[-195.28,1610.49],"4-28-11":[-195.28,1610.49],"6-115-48":[-32.35,-13.51],"6-115-49":[-36.1,-15.23],"5-57-24":[-37.5,-13.51],"6-115-50":[-39.15,-17.16],"6-115-51":[-46.49,-18.91],"5-57-25":[-49.64,-17.16],"4-28-12":[-52.08,-13.51],"6-115-52":[-56.64,-22.55],"6-115-53":[-73,-28.38],"5-57-26":[-75.38,-22.55],"6-115-54":[-88.66,-36.23],"6-115-55":[-97.84,759.79],"5-57-27":[-97.84,1284.65],"4-28-13":[-97.84,1701.91],"6-115-56":[-97.84,2001.44],"6-115-57":[1792.1,2428.6],"5-57-28":[-97.84,2577.32],"6-115-58":[2305.92,2560],"6-115-59":[2344.15,2552.69],"5-57-29":[2305.92,2638.08],"4-28-14":[-97.84,2867.37],"6-115-60":[2100.93,2355.28],"6-115-61":[2117.14,2602.75],"5-57-30":[2100.93,2636.29],"6-115-62":[2569.81,2959.59],"6-115-63":[-29.54,3076],"5-57-31":[-29.54,3076],"4-28-15":[-29.54,3076],"6-116-0":[10.66,29.12],"6-116-1":[7.22,22.06],"6-116-2":[2.25,16.65],"6-116-3":[1.8,6.88],"6-116-4":[1.2,361.97],"6-116-5":[-0.57,89.29],"6-116-6":[-0.78,341.42],"6-116-7":[1.77,925.79],"6-116-8":[39.12,2260.37],"6-116-9":[440.9,2390.56],"6-116-10":[-3.36,1856.79],"6-116-11":[13.8,37.51],"6-116-12":[16.01,37.9],"6-116-13":[16.01,37.4],"6-116-14":[18.59,40.87],"6-116-15":[10.25,1590.34],"6-116-16":[-1.61,1786.57],"6-116-17":[8.34,43.6],"6-116-18":[15.48,44.53],"6-116-19":[15.73,47.62],"6-116-20":[16.81,51.48],"6-116-21":[19.43,63.16],"6-116-22":[23.95,70.37],"6-116-23":[29.01,74.37],"6-116-24":[26.61,82.69],"6-116-25":[30.18,93.33],"6-116-26":[30.98,99.51],"6-116-27":[30.96,99.08],"6-116-28":[45.57,117.31],"6-116-29":[55.18,122.74],"6-116-30":[58.42,127.66],"6-116-31":[60.62,135.09],"6-116-32":[62.05,783.66],"6-116-33":[65.85,1907.63],"6-116-34":[31.24,4188.78],"6-116-35":[53.93,4099.51],"6-116-36":[62.28,139.92],"6-116-37":[59.3,129.47],"6-116-38":[36.96,1285.71],"6-116-39":[26.9,1325.23],"6-116-40":[126.78,1296.76],"6-116-41":[189.96,988.43],"6-116-42":[97.05,430.67],"6-116-43":[131.13,1421.13],"6-116-44":[85.41,2241.03],"6-116-45":[-70.56,1999.21],"6-116-46":[-19.93,1568.36],"6-116-47":[-160.77,1420.87],"6-116-48":[-29.69,-12.33],"6-116-49":[-36.45,-13.09],"6-116-50":[-40.73,-17.24],"6-116-51":[-47.3,-19.53],"6-116-52":[-54.93,-22.38],"6-116-53":[-72.48,-27.53],"6-116-54":[-87.53,-35.51],"6-116-55":[-101.33,-44.71],"6-116-56":[-102.54,1792.11],"6-116-57":[1600.89,2338.91],"6-116-58":[2295.63,2481.09],"6-116-59":[2291.17,2481.96],"6-116-60":[1899.8,2344.16],"6-116-61":[1943.7,2569.82],"6-116-62":[2529.66,2955.42],"6-116-63":[-29.54,3081.95],"6-117-0":[9.48,28.14],"6-117-1":[6.76,18.88],"5-58-0":[6.76,29.12],"6-117-2":[2.28,14.99],"6-117-3":[1.62,7.39],"5-58-1":[1.62,16.65],"6-117-4":[1.48,155.99],"6-117-5":[0.48,58.1],"5-58-2":[-0.57,361.97],"6-117-6":[0.39,341.42],"6-117-7":[3.51,692.04],"5-58-3":[-0.78,925.79],"6-117-8":[22.34,2175.65],"6-117-9":[114.09,2203.44],"5-58-4":[22.34,2390.56],"6-117-10":[5.55,2094.72],"6-117-11":[-0.47,1541.51],"5-58-5":[-3.36,2094.72],"6-117-12":[17.95,39.7],"6-117-13":[17.96,40.77],"5-58-6":[16.01,40.77],"6-117-14":[18.87,43.2],"6-117-15":[-7.87,1533.21],"5-58-7":[-7.87,1590.34],"6-117-16":[-7.88,45.41],"6-117-17":[12.99,36.86],"5-58-8":[-7.88,1786.57],"6-117-18":[10.18,34.61],"6-117-19":[10.18,33.01],"5-58-9":[10.18,47.62],"6-117-20":[12.59,37.84],"6-117-21":[14.56,46.1],"5-58-10":[12.59,63.16],"6-117-22":[19.38,56.88],"6-117-23":[25.61,72.87],"5-58-11":[19.38,74.37],"6-117-24":[31.14,82.56],"6-117-25":[36.51,88.5],"5-58-12":[26.61,93.33],"6-117-26":[38.76,89.46],"6-117-27":[39.86,92.44],"5-58-13":[30.96,99.51],"6-117-28":[41.99,110.83],"6-117-29":[35.45,503.73],"5-58-14":[35.45,503.73],"6-117-30":[53.07,118.8],"6-117-31":[54.68,129.03],"5-58-15":[53.07,135.09],"6-117-32":[53.24,964.38],"6-117-33":[57.1,2427.64],"5-58-16":[53.24,2427.64],"6-117-34":[58.87,2022.98],"6-117-35":[-78.97,3071.93],"5-58-17":[-78.97,4188.78],"6-117-36":[62.08,143.56],"6-117-37":[61.21,128.82],"5-58-18":[59.3,143.56],"6-117-38":[57.56,126.23],"6-117-39":[30.2,869.8],"5-58-19":[26.9,1325.23],"6-117-40":[0.01,1008.41],"6-117-41":[75.28,1199.98],"5-58-20":[0.01,1296.76],"6-117-42":[145.68,1550.43],"6-117-43":[-25.52,1629.02],"5-58-21":[-25.52,1629.02],"6-117-44":[-80.43,1622.97],"6-117-45":[-23.03,1262.52],"5-58-22":[-80.43,2241.03],"6-117-46":[-14.62,1.67],"6-117-47":[-24.71,-5.89],"5-58-23":[-160.77,1568.36],"6-117-48":[-29.37,-11.35],"6-117-49":[-35.65,-13.2],"5-58-24":[-36.45,-11.35],"6-117-50":[-40.45,-17.24],"6-117-51":[-48.21,-20.04],"5-58-25":[-48.21,-17.24],"6-117-52":[-53.69,-23.2],"6-117-53":[-71.28,-27.26],"5-58-26":[-72.48,-22.38],"6-117-54":[-86.62,-34.15],"6-117-55":[-101.99,-43.8],"5-58-27":[-101.99,-34.15],"6-117-56":[-106.25,1600.9],"6-117-57":[1442.23,2342.57],"5-58-28":[-106.25,2342.57],"6-117-58":[2216.37,2456.95],"6-117-59":[2218.72,2466.51],"5-58-29":[2216.37,2481.96],"6-117-60":[1411.35,2291.18],"6-117-61":[1690.08,2529.67],"5-58-30":[1411.35,2569.82],"6-117-62":[2447.36,2953.28],"6-117-63":[-29.54,3084.91],"5-58-31":[-29.54,3084.91],"6-118-0":[8.81,27.71],"6-118-1":[6.64,17.18],"6-118-2":[1.82,14.17],"6-118-3":[1.29,7.13],"6-118-4":[1.8,112.12],"6-118-5":[0.82,6.14],"6-118-6":[0.71,75.94],"6-118-7":[3.53,559.13],"6-118-8":[15.46,1102.21],"6-118-9":[92.72,1636.07],"6-118-10":[2.35,1813.48],"6-118-11":[1.21,1062.27],"6-118-12":[17.21,43.51],"6-118-13":[19.63,45.98],"6-118-14":[0.73,1460.13],"6-118-15":[-7.91,1395.62],"6-118-16":[-7.92,30.44],"6-118-17":[6.23,30.2],"6-118-18":[4.7,24.25],"6-118-19":[4.92,23.71],"6-118-20":[6.29,28.34],"6-118-21":[10.46,37.16],"6-118-22":[12.98,50.32],"6-118-23":[19.09,62.28],"6-118-24":[25.96,72.19],"6-118-25":[29.55,81.26],"6-118-26":[33.77,84.41],"6-118-27":[35.3,83.99],"6-118-28":[39.24,102.12],"6-118-29":[44.51,337.7],"6-118-30":[50.71,111.44],"6-118-31":[54.6,118.9],"6-118-32":[58.04,435.72],"6-118-33":[2.74,2388.16],"6-118-34":[53.28,143.46],"6-118-35":[58.58,1094.58],"6-118-36":[60.49,866.24],"6-118-37":[60.7,127.95],"6-118-38":[55.23,126.07],"6-118-39":[48.72,114.91],"6-118-40":[16.01,468.23],"6-118-41":[-7.43,1263.13],"6-118-42":[3.55,1616.85],"6-118-43":[-3.46,1396.93],"6-118-44":[7.57,40.32],"6-118-45":[0.66,22.42],"6-118-46":[-11.28,6.94],"6-118-47":[-22.43,-3.98],"6-118-48":[-29.37,-9.38],"6-118-49":[-35.15,-14.48],"6-118-50":[-40.65,-17.23],"6-118-51":[-48.88,-20.43],"6-118-52":[-56.68,-24.15],"6-118-53":[-69.25,-27.35],"6-118-54":[-85.12,-33.76],"6-118-55":[-101.8,-42.74],"6-118-56":[-107,1522.76],"6-118-57":[1441.77,2294.89],"6-118-58":[1910.74,2319.46],"6-118-59":[1821.95,2399.61],"6-118-60":[803.63,2218.73],"6-118-61":[1627.45,2447.37],"6-118-62":[2363.53,2959.26],"6-118-63":[-29.54,3089.37],"6-119-0":[8.67,27.14],"6-119-1":[6.4,16.74],"5-59-0":[6.4,27.71],"6-119-2":[1.77,13.16],"6-119-3":[1.21,7.08],"5-59-1":[1.21,14.17],"4-29-0":[1.21,29.12],"6-119-4":[2.01,7.08],"6-119-5":[0.49,6.94],"5-59-2":[0.49,112.12],"6-119-6":[1.29,81.65],"6-119-7":[3.24,433.72],"5-59-3":[0.71,559.13],"4-29-1":[-0.78,925.79],"3-14-0":[-8.16,2177.91],"6-119-8":[15.62,1098.37],"6-119-9":[80.42,1766.68],"5-59-4":[15.46,1766.68],"6-119-10":[-12.75,1878.57],"6-119-11":[15.7,935.54],"5-59-5":[-12.75,1878.57],"4-29-2":[-12.75,2390.56],"6-119-12":[13.95,2005.12],"6-119-13":[17.08,2477.12],"5-59-6":[13.95,2477.12],"6-119-14":[1.03,1817.92],"6-119-15":[3.25,33.35],"5-59-7":[-7.91,1817.92],"4-29-3":[-7.91,2477.12],"3-14-1":[-16.78,2830.65],"6-119-16":[4.27,23.39],"6-119-17":[1.7,17.38],"5-59-8":[-7.92,30.44],"6-119-18":[0.23,11.21],"6-119-19":[1.53,11.2],"5-59-9":[0.23,24.25],"4-29-4":[-7.92,1786.57],"6-119-20":[4.13,19.59],"6-119-21":[6.49,25.03],"5-59-10":[4.13,37.16],"6-119-22":[9,34.94],"6-119-23":[13.7,51.55],"5-59-11":[9,62.28],"4-29-5":[4.13,74.37],"3-14-2":[-84.13,3800.26],"6-119-24":[20.27,58.63],"6-119-25":[26.32,64.62],"5-59-12":[20.27,81.26],"6-119-26":[29.21,76.13],"6-119-27":[31.51,78.92],"5-59-13":[29.21,84.41],"4-29-6":[20.27,99.51],"6-119-28":[34.89,91.62],"6-119-29":[42.31,102.14],"5-59-14":[34.89,337.7],"6-119-30":[49.88,110.56],"6-119-31":[51.58,118.67],"5-59-15":[49.88,118.9],"4-29-7":[34.89,503.73],"3-14-3":[19.75,1005.01],"6-119-32":[55.15,126.21],"6-119-33":[55.72,960.88],"5-59-16":[2.74,2388.16],"6-119-34":[6.18,2782.57],"6-119-35":[49.89,1115.42],"5-59-17":[6.18,2782.57],"4-29-8":[-78.97,4188.78],"6-119-36":[63.79,138.91],"6-119-37":[60.58,131.76],"5-59-18":[60.49,866.24],"6-119-38":[55.49,123.47],"6-119-39":[49.44,110.92],"5-59-19":[48.72,126.07],"4-29-9":[26.9,1325.23],"3-14-4":[-78.97,5227.39],"6-119-40":[40.76,99.59],"6-119-41":[33.8,84.71],"5-59-20":[-7.43,1263.13],"6-119-42":[26.01,74.04],"6-119-43":[18.31,59.16],"5-59-21":[-3.46,1616.85],"4-29-10":[-25.52,1629.02],"6-119-44":[11.24,40.96],"6-119-45":[3.47,25.39],"5-59-22":[0.66,40.96],"6-119-46":[-5.63,10.69],"6-119-47":[-18.52,-2.2],"5-59-23":[-22.43,10.69],"4-29-11":[-160.77,2241.03],"3-14-5":[-195.28,2241.03],"6-119-48":[-27.89,-8.1],"6-119-49":[-34.87,-13.33],"5-59-24":[-35.15,-8.1],"6-119-50":[-42.15,-16.71],"6-119-51":[-55.48,-20.53],"5-59-25":[-55.48,-16.71],"4-29-12":[-55.48,-8.1],"6-119-52":[-67.25,-24.47],"6-119-53":[-69.99,-28.77],"5-59-26":[-69.99,-24.15],"6-119-54":[-84.63,-34.47],"6-119-55":[-101.06,-42.64],"5-59-27":[-101.8,-33.76],"4-29-13":[-101.99,-22.38],"3-14-6":[-101.99,1701.91],"6-119-56":[-106.67,1594.21],"6-119-57":[1522.75,2260.16],"5-59-28":[-107,2294.89],"6-119-58":[1520.8,2260.16],"6-119-59":[1378.35,2352.82],"5-59-29":[1378.35,2399.61],"4-29-14":[-107,2481.96],"6-119-60":[115.06,3169.82],"6-119-61":[1392.87,2470.74],"5-59-30":[115.06,3169.82],"6-119-62":[2356.79,2967.24],"6-119-63":[-29.54,3091.37],"5-59-31":[-29.54,3091.37],"4-29-15":[-29.54,3169.82],"3-14-7":[-107,3169.82],"6-120-0":[8.69,26.75],"6-120-1":[5.52,17.4],"6-120-2":[1.82,12.04],"6-120-3":[0.59,7.08],"6-120-4":[2.09,7.08],"6-120-5":[0.74,5.17],"6-120-6":[1.05,56.9],"6-120-7":[2.85,903.95],"6-120-8":[56.39,1454.04],"6-120-9":[12.61,1757.61],"6-120-10":[12.59,947.68],"6-120-11":[15.29,2605.13],"6-120-12":[7.08,3631.59],"6-120-13":[-0.7,3468.03],"6-120-14":[1.4,40.12],"6-120-15":[4.12,24.95],"6-120-16":[-0.27,17.95],"6-120-17":[-4.97,7.43],"6-120-18":[-6.56,3],"6-120-19":[-3.98,7.47],"6-120-20":[-0.58,12.98],"6-120-21":[2.19,17.28],"6-120-22":[4.58,25.53],"6-120-23":[8.89,39.89],"6-120-24":[15.15,49.5],"6-120-25":[21.3,58.42],"6-120-26":[25.24,62.27],"6-120-27":[28.53,69.78],"6-120-28":[32.36,84.63],"6-120-29":[37.3,831.89],"6-120-30":[42.45,102.95],"6-120-31":[46.51,110.31],"6-120-32":[48.73,118.16],"6-120-33":[52.39,128.82],"6-120-34":[36.32,1251.14],"6-120-35":[16.84,2387.59],"6-120-36":[45.89,264.39],"6-120-37":[59.17,130.22],"6-120-38":[55.65,121.69],"6-120-39":[49.17,115.94],"6-120-40":[42.96,105.9],"6-120-41":[35.4,90.52],"6-120-42":[28.58,74.62],"6-120-43":[8.57,495.66],"6-120-44":[12.8,48.16],"6-120-45":[5.96,25.68],"6-120-46":[-2.48,12.37],"6-120-47":[-16.47,-0.49],"6-120-48":[-25.27,-6.4],"6-120-49":[-33.37,-10.64],"6-120-50":[-42.5,-14.52],"6-120-51":[-55.8,383.74],"6-120-52":[-67.98,-26.3],"6-120-53":[-72.63,-30.51],"6-120-54":[-84.73,-34.99],"6-120-55":[-104.1,-43.28],"6-120-56":[-112.02,1627.11],"6-120-57":[475.75,2656.26],"6-120-58":[867.53,2268.9],"6-120-59":[1045.7,2732.99],"6-120-60":[-105.78,3191.81],"6-120-61":[347.55,2726.57],"6-120-62":[2344.78,2977.2],"6-120-63":[-29.54,3090.38],"6-121-0":[8.97,26.75],"6-121-1":[5.52,18.2],"5-60-0":[5.52,26.75],"6-121-2":[1.99,11],"6-121-3":[0.42,4.82],"5-60-1":[0.42,12.04],"6-121-4":[2.25,7.43],"6-121-5":[0.71,4.93],"5-60-2":[0.71,7.43],"6-121-6":[1.29,271.44],"6-121-7":[2.85,1052.69],"5-60-3":[1.05,1052.69],"6-121-8":[37.86,1653.57],"6-121-9":[11.56,1415.31],"5-60-4":[11.56,1757.61],"6-121-10":[10.82,1872.79],"6-121-11":[9.11,3277.23],"5-60-5":[9.11,3277.23],"6-121-12":[-5.06,4774.23],"6-121-13":[-5.97,28.14],"5-60-6":[-5.97,4774.23],"6-121-14":[3.79,18.42],"6-121-15":[-1.09,16.76],"5-60-7":[-1.09,40.12],"6-121-16":[-7.93,7.27],"6-121-17":[-11.57,-0.26],"5-60-8":[-11.57,17.95],"6-121-18":[-11.9,-2.7],"6-121-19":[-13.5,-0.57],"5-60-9":[-13.5,7.47],"6-121-20":[-13.4,2.2],"6-121-21":[-4.89,8.56],"5-60-10":[-13.4,17.28],"6-121-22":[1.31,15.96],"6-121-23":[6.08,30.18],"5-60-11":[1.31,39.89],"6-121-24":[11.75,45.27],"6-121-25":[17.54,49.7],"5-60-12":[11.75,58.42],"6-121-26":[24.65,60.14],"6-121-27":[25.47,66.56],"5-60-13":[24.65,69.78],"6-121-28":[28.73,75.09],"6-121-29":[32.36,84.91],"5-60-14":[28.73,831.89],"6-121-30":[37.91,673.97],"6-121-31":[41.13,96.35],"5-60-15":[37.91,673.97],"6-121-32":[43.4,101.5],"6-121-33":[46.93,118.89],"5-60-16":[43.4,128.82],"6-121-34":[49.6,839.37],"6-121-35":[9.56,1980.07],"5-60-17":[9.56,2387.59],"6-121-36":[44.87,241.22],"6-121-37":[58.56,129.2],"5-60-18":[44.87,264.39],"6-121-38":[56.18,122.21],"6-121-39":[50.7,116.7],"5-60-19":[49.17,122.21],"6-121-40":[45.59,106.12],"6-121-41":[37.73,94.44],"5-60-20":[35.4,106.12],"6-121-42":[32.38,82.35],"6-121-43":[24.79,66.27],"5-60-21":[8.57,495.66],"6-121-44":[14.55,55.75],"6-121-45":[6.51,35.28],"5-60-22":[5.96,55.75],"6-121-46":[-0.5,21.22],"6-121-47":[-12.26,3.98],"5-60-23":[-16.47,21.22],"6-121-48":[-19.81,-3.49],"6-121-49":[-29.02,-8.06],"5-60-24":[-33.37,-3.49],"6-121-50":[-41.05,-10.84],"6-121-51":[-63.16,-19.98],"5-60-25":[-63.16,383.74],"6-121-52":[-72.98,-28.17],"6-121-53":[-77.22,-33.82],"5-60-26":[-77.22,-26.3],"6-121-54":[-88.46,-36.59],"6-121-55":[-106.46,1402.86],"5-60-27":[-106.46,1402.86],"6-121-56":[-114.63,475.76],"6-121-57":[-117.59,2620.78],"5-60-28":[-117.59,2656.26],"6-121-58":[-116.47,3433.82],"6-121-59":[-115.52,3317.92],"5-60-29":[-116.47,3433.82],"6-121-60":[-115.69,2320.2],"6-121-61":[-91.83,4077.78],"5-60-30":[-115.69,4077.78],"6-121-62":[1924.9,2984.14],"6-121-63":[-29.54,3088.17],"5-60-31":[-29.54,3090.38],"6-122-0":[9.42,26.76],"6-122-1":[5.65,18.59],"6-122-2":[2.49,11.4],"6-122-3":[0.26,4.81],"6-122-4":[1.95,7.47],"6-122-5":[0.77,4.8],"6-122-6":[1.14,7.62],"6-122-7":[3.84,1528.57],"6-122-8":[108.15,1757.51],"6-122-9":[10.94,1582.28],"6-122-10":[6.8,1233.67],"6-122-11":[7.89,932.54],"6-122-12":[-3.4,850.98],"6-122-13":[1.64,20.11],"6-122-14":[0.48,16.34],"6-122-15":[-7.21,6.88],"6-122-16":[-12.07,-0.71],"6-122-17":[-17.59,-4.25],"6-122-18":[-18.55,-5.37],"6-122-19":[-18.72,-6.19],"6-122-20":[-17.57,-2.87],"6-122-21":[-10.75,2.46],"6-122-22":[-3.63,10.62],"6-122-23":[1.49,22.49],"6-122-24":[7.72,36.85],"6-122-25":[14.12,46.47],"6-122-26":[19.28,54.72],"6-122-27":[23.59,60.99],"6-122-28":[26.75,65.91],"6-122-29":[28.53,72.29],"6-122-30":[31.65,81.32],"6-122-31":[36.02,86.88],"6-122-32":[39.15,92.44],"6-122-33":[41.65,106.03],"6-122-34":[46.65,119.42],"6-122-35":[48.07,866.32],"6-122-36":[45.55,126.93],"6-122-37":[53.7,127.16],"6-122-38":[52.98,340.77],"6-122-39":[35.29,1689.03],"6-122-40":[46.98,106.61],"6-122-41":[40,96.95],"6-122-42":[33.4,82.62],"6-122-43":[27.67,66.13],"6-122-44":[18.65,57.54],"6-122-45":[14.32,44.27],"6-122-46":[3,29.21],"6-122-47":[-11.15,13.47],"6-122-48":[-19.42,-2.93],"6-122-49":[-27.38,-6.28],"6-122-50":[-46.34,517.88],"6-122-51":[-65.39,-20.43],"6-122-52":[-77.62,-31.58],"6-122-53":[-81.78,-37.06],"6-122-54":[-91.49,-38.57],"6-122-55":[-105.7,-45.16],"6-122-56":[-117.38,-51.89],"6-122-57":[-60.46,3075.8],"6-122-58":[-117.89,3148.6],"6-122-59":[-115.52,2551.83],"6-122-60":[-111.82,209.78],"6-122-61":[-93.22,3800.64],"6-122-62":[1431.84,3358.99],"6-122-63":[-29.54,3084.48],"6-123-0":[9.85,26.78],"6-123-1":[5.73,18.86],"5-61-0":[5.65,26.78],"6-123-2":[2.93,12],"6-123-3":[0.14,5.41],"5-61-1":[0.14,12],"4-30-0":[0.14,26.78],"6-123-4":[0.92,8.02],"6-123-5":[1.11,5.42],"5-61-2":[0.77,8.02],"6-123-6":[1.15,7.19],"6-123-7":[3.59,1680.33],"5-61-3":[1.14,1680.33],"4-30-1":[0.71,1680.33],"6-123-8":[102.27,1646.59],"6-123-9":[12.03,1328.47],"5-61-4":[10.94,1757.51],"6-123-10":[4.75,1210.93],"6-123-11":[5.38,20.59],"5-61-5":[4.75,1233.67],"4-30-2":[4.75,3277.23],"6-123-12":[-6.75,744.81],"6-123-13":[-5.24,18.85],"5-61-6":[-6.75,850.98],"6-123-14":[-6.42,11.45],"6-123-15":[-19.48,0.49],"5-61-7":[-19.48,16.34],"4-30-3":[-19.48,4774.23],"6-123-16":[-20.74,-3.9],"6-123-17":[-25.13,-6.72],"5-61-8":[-25.13,-0.71],"6-123-18":[-25.13,-8.71],"6-123-19":[-20.44,-8.81],"5-61-9":[-25.13,-5.37],"4-30-4":[-25.13,17.95],"6-123-20":[-19,-6.48],"6-123-21":[-14.63,-2.18],"5-61-10":[-19,2.46],"6-123-22":[-8.94,1.5],"6-123-23":[-0.85,14.41],"5-61-11":[-8.94,22.49],"4-30-5":[-19,39.89],"6-123-24":[5.5,29.61],"6-123-25":[10.76,38.58],"5-61-12":[5.5,46.47],"6-123-26":[16.15,50.77],"6-123-27":[19.03,52.37],"5-61-13":[16.15,60.99],"4-30-6":[5.5,69.78],"6-123-28":[20.24,74.26],"6-123-29":[19.92,68.93],"5-61-14":[19.92,74.26],"6-123-30":[27.6,72.06],"6-123-31":[30.84,78.32],"5-61-15":[27.6,86.88],"4-30-7":[19.92,831.89],"6-123-32":[9.9,105.9],"6-123-33":[38.55,93.32],"5-61-16":[9.9,106.03],"6-123-34":[42.04,104.47],"6-123-35":[26.89,608.86],"5-61-17":[26.89,866.32],"4-30-8":[9.56,2387.59],"6-123-36":[44.53,1017.74],"6-123-37":[-166.26,1941.75],"5-61-18":[-166.26,1941.75],"6-123-38":[49.91,717.25],"6-123-39":[18.08,1664.47],"5-61-19":[18.08,1689.03],"4-30-9":[-166.26,1941.75],"6-123-40":[48.47,309.11],"6-123-41":[41.3,105.67],"5-61-20":[40,309.11],"6-123-42":[34.67,357.87],"6-123-43":[28.79,77.86],"5-61-21":[27.67,357.87],"4-30-10":[8.57,495.66],"6-123-44":[23.62,65.38],"6-123-45":[14.32,51.14],"5-61-22":[14.32,65.38],"6-123-46":[6.73,41.96],"6-123-47":[-345.62,2939.6],"5-61-23":[-345.62,2939.6],"4-30-11":[-345.62,2939.6],"6-123-48":[-74.06,2088.42],"6-123-49":[-22.42,566.58],"5-61-24":[-74.06,2088.42],"6-123-50":[-82.31,649.83],"6-123-51":[-70.1,-20.38],"5-61-25":[-82.31,649.83],"4-30-12":[-82.31,2088.42],"6-123-52":[-83.38,-32.37],"6-123-53":[-91.85,-39.81],"5-61-26":[-91.85,-31.58],"6-123-54":[-95.58,-41.02],"6-123-55":[-108.17,-46.75],"5-61-27":[-108.17,-38.57],"4-30-13":[-108.17,1402.86],"6-123-56":[-118.68,-52.76],"6-123-57":[-116.81,3530.38],"5-61-28":[-118.68,3530.38],"6-123-58":[-117.58,2686.35],"6-123-59":[-114.23,3368.3],"5-61-29":[-117.89,3368.3],"4-30-14":[-118.68,3530.38],"6-123-60":[-105.65,-47.93],"6-123-61":[-94.72,4324.92],"5-61-30":[-111.82,4324.92],"6-123-62":[1173.34,3260.29],"6-123-63":[-29.54,3084.24],"5-61-31":[-29.54,3358.99],"4-30-15":[-115.69,4324.92],"6-124-0":[10.16,26.79],"6-124-1":[6.14,19.04],"6-124-2":[3.03,12.26],"6-124-3":[0.14,5.75],"6-124-4":[0.89,8.06],"6-124-5":[1.26,5.67],"6-124-6":[1.39,7.36],"6-124-7":[3.52,1617.82],"6-124-8":[8.51,1409.69],"6-124-9":[10.13,2305.88],"6-124-10":[0.45,2164.88],"6-124-11":[2.56,14.63],"6-124-12":[-3.24,14.32],"6-124-13":[-10.59,10.54],"6-124-14":[-10.36,8.76],"6-124-15":[-21.04,0],"6-124-16":[-24.64,-2.76],"6-124-17":[-31.2,-3.85],"6-124-18":[-30.75,-6.47],"6-124-19":[-26.11,-2.49],"6-124-20":[-24.31,-7.51],"6-124-21":[-15.23,-4.76],"6-124-22":[-13.59,-0.84],"6-124-23":[-4.55,9.7],"6-124-24":[2.35,21.54],"6-124-25":[7.35,32.3],"6-124-26":[12.55,38.19],"6-124-27":[15.94,48.53],"6-124-28":[21.55,62.2],"6-124-29":[18.5,57.21],"6-124-30":[24.34,61.69],"6-124-31":[27.97,68.96],"6-124-32":[29.89,114.26],"6-124-33":[33.15,84.09],"6-124-34":[36.93,96.35],"6-124-35":[42.03,117.27],"6-124-36":[44.94,447.27],"6-124-37":[62.06,132.91],"6-124-38":[41.71,1137.87],"6-124-39":[34.07,895.97],"6-124-40":[47.96,131.97],"6-124-41":[46.43,105.92],"6-124-42":[39.86,96.09],"6-124-43":[32.69,85.75],"6-124-44":[26.31,75.44],"6-124-45":[20.78,56.69],"6-124-46":[8.98,1441.5],"6-124-47":[-4.07,3719.73],"6-124-48":[-31.98,2290.2],"6-124-49":[-23.42,-3.78],"6-124-50":[-84.41,535.73],"6-124-51":[-73.94,-20.62],"6-124-52":[-86.86,-35.05],"6-124-53":[-95.4,-42.17],"6-124-54":[-98.04,-43.58],"6-124-55":[-110.57,-48.45],"6-124-56":[-118.68,-54.08],"6-124-57":[-117.84,3544.4],"6-124-58":[-118.43,1962.19],"6-124-59":[-115.85,2252.06],"6-124-60":[-105.91,-48.57],"6-124-61":[-95.38,3812.59],"6-124-62":[594.22,3705.94],"6-124-63":[-29.54,3085.39],"6-125-0":[10.35,26.81],"6-125-1":[6.14,19.41],"5-62-0":[6.14,26.81],"6-125-2":[3.26,12.44],"6-125-3":[0.9,6.39],"5-62-1":[0.14,12.44],"6-125-4":[1.27,6.49],"6-125-5":[1.13,5.32],"5-62-2":[0.89,8.06],"6-125-6":[1.29,6.47],"6-125-7":[3.14,1111.24],"5-62-3":[1.29,1617.82],"6-125-8":[7.11,1048.77],"6-125-9":[6.89,1518.99],"5-62-4":[6.89,2305.88],"6-125-10":[-2.91,1665.46],"6-125-11":[0,6.86],"5-62-5":[-2.91,2164.88],"6-125-12":[-2.34,8.77],"6-125-13":[-14.46,953.56],"5-62-6":[-14.46,953.56],"6-125-14":[-5.06,5.28],"6-125-15":[-17.98,-2.39],"5-62-7":[-21.04,8.76],"6-125-16":[-24.4,-7.68],"6-125-17":[-28.6,-10.11],"5-62-8":[-31.2,-2.76],"6-125-18":[-28.6,-11],"6-125-19":[-25.62,-2.41],"5-62-9":[-30.75,-2.41],"6-125-20":[-22.75,-4.66],"6-125-21":[-15.81,-6.04],"5-62-10":[-24.31,-4.66],"6-125-22":[-14.02,-3.42],"6-125-23":[-6.77,4.64],"5-62-11":[-14.02,9.7],"6-125-24":[1.21,15.8],"6-125-25":[6.11,24.94],"5-62-12":[1.21,32.3],"6-125-26":[10.22,30.26],"6-125-27":[13.87,41.98],"5-62-13":[10.22,48.53],"6-125-28":[18.08,48.13],"6-125-29":[17.79,54.5],"5-62-14":[17.79,62.2],"6-125-30":[22.38,56.85],"6-125-31":[16.56,59.8],"5-62-15":[16.56,68.96],"6-125-32":[25.85,66.31],"6-125-33":[27.99,72.87],"5-62-16":[25.85,114.26],"6-125-34":[33,81.65],"6-125-35":[38.91,103.05],"5-62-17":[33,117.27],"6-125-36":[47.5,124.13],"6-125-37":[57.22,130.49],"5-62-18":[44.94,447.27],"6-125-38":[61.15,131.46],"6-125-39":[52.54,288.83],"5-62-19":[34.07,1137.87],"6-125-40":[48.88,107.87],"6-125-41":[48.01,104.69],"5-62-20":[46.43,131.97],"6-125-42":[42.87,97.22],"6-125-43":[37.6,89.45],"5-62-21":[32.69,97.22],"6-125-44":[6.97,816.34],"6-125-45":[-0.97,2517.08],"5-62-22":[-0.97,2517.08],"6-125-46":[-17.88,2863.4],"6-125-47":[-35.65,2605.15],"5-62-23":[-35.65,3719.73],"6-125-48":[-10.05,11.03],"6-125-49":[-27.68,-4.71],"5-62-24":[-31.98,2290.2],"6-125-50":[-48.98,-11.91],"6-125-51":[-75.78,-21.91],"5-62-25":[-84.41,535.73],"6-125-52":[-88.21,-37.16],"6-125-53":[-96.9,-44.36],"5-62-26":[-96.9,-35.05],"6-125-54":[-99.71,-46.22],"6-125-55":[-113.95,-50.03],"5-62-27":[-113.95,-43.58],"6-125-56":[-118.23,-55.58],"6-125-57":[-119.6,-57.02],"5-62-28":[-119.6,3544.4],"6-125-58":[-119.13,-57.36],"6-125-59":[-115.13,-52.66],"5-62-29":[-119.13,2252.06],"6-125-60":[-106.04,-48.63],"6-125-61":[-95.54,2586.73],"5-62-30":[-106.04,3812.59],"6-125-62":[617.47,3991.97],"6-125-63":[-29.54,3087.55],"5-62-31":[-29.54,3991.97],"6-126-0":[10.48,26.83],"6-126-1":[6.39,19.79],"6-126-2":[3.59,12.74],"6-126-3":[1.34,7.32],"6-126-4":[1.23,5.6],"6-126-5":[1.15,4.51],"6-126-6":[1.24,5.95],"6-126-7":[2.53,1644.02],"6-126-8":[4.57,1334.46],"6-126-9":[2.53,1348.08],"6-126-10":[-4.55,360.68],"6-126-11":[-0.22,3.75],"6-126-12":[-4.16,11.04],"6-126-13":[-20.67,663.5],"6-126-14":[-17.18,1.9],"6-126-15":[-17.03,-2.13],"6-126-16":[-23.5,-6.98],"6-126-17":[-25.32,-10.8],"6-126-18":[-24.77,-10.53],"6-126-19":[-22.17,-7.92],"6-126-20":[-19.02,-6.36],"6-126-21":[-15.67,-4.68],"6-126-22":[-13.71,-4.14],"6-126-23":[-8.08,4.18],"6-126-24":[0.43,12.94],"6-126-25":[5.52,20.01],"6-126-26":[9,27.01],"6-126-27":[12.09,34.89],"6-126-28":[14.82,40.97],"6-126-29":[17.43,44.78],"6-126-30":[17.98,49.65],"6-126-31":[20.75,52.08],"6-126-32":[19.19,56],"6-126-33":[25.26,66],"6-126-34":[28.98,76.55],"6-126-35":[34.87,95.02],"6-126-36":[41.34,297.72],"6-126-37":[52.33,122.31],"6-126-38":[55.22,587.24],"6-126-39":[52.13,124.15],"6-126-40":[49.8,107.99],"6-126-41":[47.34,102.99],"6-126-42":[43.4,96.7],"6-126-43":[39.32,87],"6-126-44":[-5.9,921.24],"6-126-45":[-23.78,2784.98],"6-126-46":[-12.29,1743.24],"6-126-47":[4.88,29.21],"6-126-48":[-9.96,11.4],"6-126-49":[-34.93,-4.57],"6-126-50":[-54.64,-14.05],"6-126-51":[-75.71,-26.38],"6-126-52":[-89.11,-37.37],"6-126-53":[-98.36,-44.98],"6-126-54":[-101.06,-48.44],"6-126-55":[-115.57,-50.65],"6-126-56":[-120.87,-56.97],"6-126-57":[-122.6,-57.42],"6-126-58":[-120.57,-57.41],"6-126-59":[-115.91,-52.64],"6-126-60":[-106.89,-48.23],"6-126-61":[-95.56,3164.9],"6-126-62":[1096.86,4009.42],"6-126-63":[-29.54,3089.77],"6-127-0":[10.58,26.87],"6-127-1":[6.39,20.25],"5-63-0":[6.39,26.87],"6-127-2":[3.82,13.4],"6-127-3":[2.41,8.63],"5-63-1":[1.34,13.4],"4-31-0":[0.14,26.87],"6-127-4":[1.13,6.79],"6-127-5":[1.13,4.39],"5-63-2":[1.13,6.79],"6-127-6":[1.24,612.64],"6-127-7":[2.31,1712.25],"5-63-3":[1.24,1712.25],"4-31-1":[0.89,1712.25],"3-15-0":[0.14,1712.25],"6-127-8":[4.5,1465.56],"6-127-9":[3.01,918.23],"5-63-4":[2.53,1465.56],"6-127-10":[-3.08,11.47],"6-127-11":[-0.12,3.44],"5-63-5":[-4.55,360.68],"4-31-2":[-4.55,2305.88],"6-127-12":[-1.99,11.61],"6-127-13":[-24.8,1210.91],"5-63-6":[-24.8,1210.91],"6-127-14":[-25.57,1.39],"6-127-15":[-13.94,-1.38],"5-63-7":[-25.57,1.9],"4-31-3":[-25.57,1210.91],"3-15-1":[-25.57,4774.23],"2-7-0":[-25.57,4774.23],"6-127-16":[-21,-6.43],"6-127-17":[-25.9,-10.68],"5-63-8":[-25.9,-6.43],"6-127-18":[-26.05,-10.54],"6-127-19":[-22.59,-7.92],"5-63-9":[-26.05,-7.92],"4-31-4":[-31.2,-2.41],"6-127-20":[-19,-7.92],"6-127-21":[-16.82,-4.7],"5-63-10":[-19.02,-4.68],"6-127-22":[-10.69,-3.04],"6-127-23":[-8.26,1.26],"5-63-11":[-13.71,4.18],"4-31-5":[-24.31,9.7],"3-15-2":[-31.2,39.89],"6-127-24":[0.43,9.72],"6-127-25":[4.5,17.61],"5-63-12":[0.43,20.01],"6-127-26":[6.9,22.78],"6-127-27":[8.89,29.21],"5-63-13":[6.9,34.89],"4-31-6":[0.43,48.53],"6-127-28":[12.01,35],"6-127-29":[14.22,37.73],"5-63-14":[12.01,44.78],"6-127-30":[15.67,40.09],"6-127-31":[19.02,46.55],"5-63-15":[15.67,52.08],"4-31-7":[12.01,68.96],"3-15-3":[0.43,831.89],"2-7-1":[-84.13,3800.26],"1-3-0":[-268.7,7512.84],"6-127-32":[20.92,50.53],"6-127-33":[22.89,57.98],"5-63-16":[19.19,66],"6-127-34":[25.27,69.75],"6-127-35":[27.53,86.05],"5-63-17":[25.27,95.02],"4-31-8":[19.19,117.27],"6-127-36":[39.54,104.68],"6-127-37":[22.06,1069.23],"5-63-18":[22.06,1069.23],"6-127-38":[20.15,1371.15],"6-127-39":[49.74,108.66],"5-63-19":[20.15,1371.15],"4-31-9":[20.15,1371.15],"3-15-4":[-166.26,2387.59],"6-127-40":[48.93,103.15],"6-127-41":[47.07,98.56],"5-63-20":[47.07,107.99],"6-127-42":[43.96,94.48],"6-127-43":[38.98,91.71],"5-63-21":[38.98,96.7],"4-31-10":[32.69,131.97],"6-127-44":[20.8,83.16],"6-127-45":[-12.67,1759.88],"5-63-22":[-23.78,2784.98],"6-127-46":[11.75,42.6],"6-127-47":[3.24,30.55],"5-63-23":[-12.29,1743.24],"4-31-11":[-35.65,3719.73],"3-15-5":[-345.62,3719.73],"2-7-2":[-345.62,5227.39],"6-127-48":[-9.45,37.42],"6-127-49":[-38.82,351.39],"5-63-24":[-38.82,351.39],"6-127-50":[-56.24,-17.74],"6-127-51":[-75.79,-28.67],"5-63-25":[-75.79,-14.05],"4-31-12":[-84.41,2290.2],"6-127-52":[-88.85,-37.45],"6-127-53":[-98.42,-44.71],"5-63-26":[-98.42,-37.37],"6-127-54":[-101.55,-48.81],"6-127-55":[-117.07,-50.94],"5-63-27":[-117.07,-48.44],"4-31-13":[-117.07,-35.05],"3-15-6":[-117.07,2290.2],"6-127-56":[-123.45,-57.63],"6-127-57":[-123.93,-60.36],"5-63-28":[-123.93,-56.97],"6-127-58":[-123.3,-58.62],"6-127-59":[-117.49,-53.65],"5-63-29":[-123.3,-52.64],"4-31-14":[-123.93,3544.4],"6-127-60":[-109.53,-48.22],"6-127-61":[-95.58,1201.67],"5-63-30":[-109.53,3164.9],"6-127-62":[-43.08,3227.47],"6-127-63":[-31.68,3092.98],"5-63-31":[-43.08,4009.42],"4-31-15":[-109.53,4009.42],"3-15-7":[-123.93,4324.92],"2-7-3":[-123.93,4324.92],"1-3-1":[-345.62,5227.39],"0-1-0":[-398.55,8777.15]} \ No newline at end of file +{"6-0-0":[-60.9,1359.39],"6-0-1":[-734.16,2871.77],"6-0-2":[-860.34,14.2],"6-0-3":[-820.07,8.89],"6-0-4":[-822.21,6.8],"6-0-5":[-1287.68,4.22],"6-0-6":[-3806.44,996.64],"6-0-7":[-4083.09,1473.8],"6-0-8":[-4254.47,1405.42],"6-0-9":[-4909.7,9.42],"6-0-10":[-5356.65,10.41],"6-0-11":[-5779.14,9.42],"6-0-12":[-5680.2,10.72],"6-0-13":[-5633.18,1797.13],"6-0-14":[-5473.11,3.24],"6-0-15":[-5073.82,0.06],"6-0-16":[-3112.78,-5.62],"6-0-17":[-4278.61,-10.79],"6-0-18":[-5776.01,-11.56],"6-0-19":[-8664.64,-9.29],"6-0-20":[-10108.73,43.72],"6-0-21":[-6315.74,480.3],"6-0-22":[-3138.45,-0.18],"6-0-23":[-3177.81,259.94],"6-0-24":[-4361.69,195.8],"6-0-25":[-4176.86,1120.83],"6-0-26":[-3604,1188.85],"6-0-27":[-4874.82,377.59],"6-0-28":[-5555.91,212.64],"6-0-29":[-6808.91,32.43],"6-0-30":[-6537.63,36.44],"6-0-31":[-5876.58,41.7],"6-0-32":[-6002.84,43.91],"6-0-33":[-6383.26,48.69],"6-0-34":[-6458.42,56.5],"6-0-35":[-6608.86,79],"6-0-36":[-6499.38,95.12],"6-0-37":[-6382.42,1242.86],"6-0-38":[-5476.07,1197.83],"6-0-39":[-6577.17,149.88],"6-0-40":[-5871.43,105.09],"6-0-41":[-5691.18,101.97],"6-0-42":[-6084.14,550.11],"6-0-43":[-6456.25,92.57],"6-0-44":[-5403.21,77.99],"6-0-45":[-7722.74,46.63],"6-0-46":[-8051.96,43.07],"6-0-47":[-7228.07,29.35],"6-0-48":[-6696.32,6.49],"6-0-49":[-7347.5,-4.52],"6-0-50":[-5663.37,1731.13],"6-0-51":[-4025.96,-29.46],"6-0-52":[-4181.98,-37.9],"6-0-53":[-3554.43,-44.45],"6-0-54":[-175.4,-32.99],"6-0-55":[-119.7,1412.43],"6-0-56":[-126.97,1474.79],"6-0-57":[-126.3,982.63],"6-0-58":[-1295.62,-59.46],"6-0-59":[-1696.92,-54.84],"6-0-60":[-2540.06,-48.64],"6-0-61":[-2969.81,258.8],"6-0-62":[-3982.53,2997.38],"6-0-63":[-4339.64,3098.17],"6-1-0":[-62.92,1400.78],"6-1-1":[-811.24,3723.38],"5-0-0":[-811.24,3723.38],"6-1-2":[-822.56,15.04],"6-1-3":[-767.63,8.36],"5-0-1":[-860.34,15.04],"6-1-4":[-730.48,6.83],"6-1-5":[-3128.49,4.83],"5-0-2":[-3128.49,6.83],"6-1-6":[-4134.79,343.9],"6-1-7":[-4441.09,308.3],"5-0-3":[-4441.09,1473.8],"6-1-8":[-4533.36,906.96],"6-1-9":[-4556.62,286.65],"5-0-4":[-4909.7,1405.42],"6-1-10":[-5768.3,14],"6-1-11":[-5899.35,14.18],"5-0-5":[-5899.35,14.18],"6-1-12":[-5651.2,10.46],"6-1-13":[-6362.61,1734.24],"5-0-6":[-6362.61,1797.13],"6-1-14":[-5667.12,6.52],"6-1-15":[-5396,1.31],"5-0-7":[-5667.12,6.52],"6-1-16":[-3687.33,294.62],"6-1-17":[-5765.96,-10],"5-0-8":[-5765.96,294.62],"6-1-18":[-5729.6,-12.15],"6-1-19":[-6079.81,-9.22],"5-0-9":[-8664.64,-9.22],"6-1-20":[-10076.36,-7.87],"6-1-21":[-9964.92,0.26],"5-0-10":[-10108.73,480.3],"6-1-22":[-9820.47,9.27],"6-1-23":[-10731.15,6.54],"5-0-11":[-10731.15,259.94],"6-1-24":[-8128.35,538.48],"6-1-25":[-3473,974.2],"5-0-12":[-8128.35,1120.83],"6-1-26":[-5852,229.74],"6-1-27":[-5790.22,521.25],"5-0-13":[-5852,1188.85],"6-1-28":[-5704.51,327.62],"6-1-29":[-6687.63,31.23],"5-0-14":[-6808.91,327.62],"6-1-30":[-6552.55,34.4],"6-1-31":[-6370.48,38.74],"5-0-15":[-6552.55,41.7],"6-1-32":[-5715.64,39.97],"6-1-33":[-5857.02,44.11],"5-0-16":[-6383.26,48.69],"6-1-34":[-6145.81,49.53],"6-1-35":[-6715.64,65.95],"5-0-17":[-6715.64,79],"6-1-36":[-5845.01,188.59],"6-1-37":[-5976.36,262.29],"5-0-18":[-6499.38,1242.86],"6-1-38":[-5615.55,1074.21],"6-1-39":[-5961.75,561.48],"5-0-19":[-6577.17,1197.83],"6-1-40":[-5749.3,105.17],"6-1-41":[-5646.26,99.7],"5-0-20":[-5871.43,105.17],"6-1-42":[-6209.24,82.54],"6-1-43":[-6165.22,61.85],"5-0-21":[-6456.25,550.11],"6-1-44":[-6248.43,55.81],"6-1-45":[-7562.16,46.46],"5-0-22":[-7722.74,77.99],"6-1-46":[-6645.44,36.12],"6-1-47":[-7451.64,306.25],"5-0-23":[-8051.96,306.25],"6-1-48":[-6155.38,5.19],"6-1-49":[-7337.43,-11.13],"5-0-24":[-7347.5,6.49],"6-1-50":[-7328.11,1663.23],"6-1-51":[-4298.74,-29.65],"5-0-25":[-7328.11,1731.13],"6-1-52":[-3730.44,-37.51],"6-1-53":[-191.66,-43.07],"5-0-26":[-4181.98,-37.51],"6-1-54":[-117.87,309.64],"6-1-55":[-120.92,886.84],"5-0-27":[-175.4,1412.43],"6-1-56":[-127.84,338.3],"6-1-57":[-130.41,309.89],"5-0-28":[-130.41,1474.79],"6-1-58":[-2110.87,-59.59],"6-1-59":[-2239.39,-55.12],"5-0-29":[-2239.39,-54.84],"6-1-60":[-3264.35,-49.4],"6-1-61":[-3093.55,-11.15],"5-0-30":[-3264.35,258.8],"6-1-62":[-4063.46,3443.81],"6-1-63":[-4241.6,3102.34],"5-0-31":[-4339.64,3443.81],"6-2-0":[-65.96,1535.56],"6-2-1":[-726.95,3893.49],"6-2-2":[-822.56,15.73],"6-2-3":[-756.52,7.2],"6-2-4":[-976.58,5.79],"6-2-5":[-3873.63,5.62],"6-2-6":[-4273.11,2.52],"6-2-7":[-4730.1,3.57],"6-2-8":[-4275.1,1107.58],"6-2-9":[-4203.77,935.49],"6-2-10":[-5335.51,447.82],"6-2-11":[-5754.56,22.33],"6-2-12":[-5580.99,15.33],"6-2-13":[-6324.53,1546.34],"6-2-14":[-5877.47,10.11],"6-2-15":[-5605.22,3.51],"6-2-16":[-5451.88,-3.75],"6-2-17":[-5191.5,-8.48],"6-2-18":[-5888.86,-11.53],"6-2-19":[-6170.07,-11.45],"6-2-20":[-6231.35,-7.64],"6-2-21":[-6591.66,-2.94],"6-2-22":[-6564.98,22.84],"6-2-23":[-9845.18,13.16],"6-2-24":[-9880.17,66.19],"6-2-25":[-9681.78,234.26],"6-2-26":[-9135.58,489.1],"6-2-27":[-5127.54,1851.33],"6-2-28":[-5847.04,276.4],"6-2-29":[-6984.98,26.06],"6-2-30":[-6587.38,259.45],"6-2-31":[-6810.43,34.73],"6-2-32":[-5944.71,36.73],"6-2-33":[-6196.39,38.35],"6-2-34":[-6274.62,45.33],"6-2-35":[-6655.12,56.51],"6-2-36":[-6233.79,1897.33],"6-2-37":[-6086.2,602.11],"6-2-38":[-5770.59,258.3],"6-2-39":[-5644.12,87.93],"6-2-40":[-5280.45,68.5],"6-2-41":[-5640.3,90.18],"6-2-42":[-5794.61,69.11],"6-2-43":[-6212.25,60.23],"6-2-44":[-6473.07,53.69],"6-2-45":[-6649.88,38.48],"6-2-46":[-6137.71,25.76],"6-2-47":[-7286.95,16.06],"6-2-48":[-6428.91,-1.78],"6-2-49":[-7302.54,-12.47],"6-2-50":[-7770.99,1478.35],"6-2-51":[-3880.57,-28.99],"6-2-52":[-3448.8,-36.15],"6-2-53":[-178.92,439.82],"6-2-54":[-123.47,902.48],"6-2-55":[-118.16,1085.57],"6-2-56":[-127.84,-21.84],"6-2-57":[-132.46,-19.72],"6-2-58":[-2110.87,-59.33],"6-2-59":[-2528.11,-55.1],"6-2-60":[-3347.91,-49.58],"6-2-61":[-3384.08,-43.95],"6-2-62":[-3950.67,3904.3],"6-2-63":[-4226.49,3104.92],"6-3-0":[-67.96,1730.59],"6-3-1":[-816.29,4033.51],"5-1-0":[-816.29,4033.51],"6-3-2":[-811.11,16.58],"6-3-3":[-756.52,6.48],"5-1-1":[-822.56,16.58],"4-0-0":[-860.34,4033.51],"6-3-4":[-1287.47,6.76],"6-3-5":[-4053.9,6.63],"5-1-2":[-4053.9,6.76],"6-3-6":[-4347.97,3.03],"6-3-7":[-4616.06,2.79],"5-1-3":[-4730.1,3.57],"4-0-1":[-4730.1,1473.8],"6-3-8":[-4631.95,912.84],"6-3-9":[-3872.37,618.8],"5-1-4":[-4631.95,1107.58],"6-3-10":[-5400.71,21.82],"6-3-11":[-5589.06,311.37],"5-1-5":[-5754.56,447.82],"4-0-2":[-5899.35,1405.42],"6-3-12":[-5676.31,24.46],"6-3-13":[-5899.59,1745.85],"5-1-6":[-6324.53,1745.85],"6-3-14":[-5693.6,13.6],"6-3-15":[-6424.28,5.28],"5-1-7":[-6424.28,13.6],"4-0-3":[-6424.28,1797.13],"6-3-16":[-5503.34,-3.16],"6-3-17":[-5293.32,-8.29],"5-1-8":[-5503.34,-3.16],"6-3-18":[-5706.05,-10.93],"6-3-19":[-5968.6,-12.17],"5-1-9":[-6170.07,-10.93],"4-0-4":[-8664.64,294.62],"6-3-20":[-6353.54,-7.64],"6-3-21":[-6004.34,0.47],"5-1-10":[-6591.66,0.47],"6-3-22":[-6626.4,23.06],"6-3-23":[-7232.28,22.37],"5-1-11":[-9845.18,23.06],"4-0-5":[-10731.15,480.3],"6-3-24":[-6517.94,19.36],"6-3-25":[-5787.28,113.77],"5-1-12":[-9880.17,234.26],"6-3-26":[-5603.42,996.87],"6-3-27":[-5500.68,711.38],"5-1-13":[-9135.58,1851.33],"4-0-6":[-9880.17,1851.33],"6-3-28":[-6128.57,217.04],"6-3-29":[-5976.44,24.86],"5-1-14":[-6984.98,276.4],"6-3-30":[-6431.75,177.46],"6-3-31":[-7363.73,30.64],"5-1-15":[-7363.73,259.45],"4-0-7":[-7363.73,327.62],"6-3-32":[-5957,33.87],"6-3-33":[-6180.13,35.79],"5-1-16":[-6196.39,38.35],"6-3-34":[-6378.4,41.34],"6-3-35":[-5963.3,51.07],"5-1-17":[-6655.12,56.51],"4-0-8":[-6715.64,79],"6-3-36":[-6145.95,771.39],"6-3-37":[-6134.23,997.06],"5-1-18":[-6233.79,1897.33],"6-3-38":[-5498.8,125.79],"6-3-39":[-5122.04,58.96],"5-1-19":[-5770.59,258.3],"4-0-9":[-6577.17,1897.33],"6-3-40":[-5350.19,59.21],"6-3-41":[-5359.87,68.85],"5-1-20":[-5640.3,90.18],"6-3-42":[-5855.5,55.57],"6-3-43":[-6391.29,45.14],"5-1-21":[-6391.29,69.11],"4-0-10":[-6456.25,550.11],"6-3-44":[-6435.56,42.37],"6-3-45":[-6707.23,30.69],"5-1-22":[-6707.23,53.69],"6-3-46":[-6686.73,18.1],"6-3-47":[-7092.52,6.67],"5-1-23":[-7286.95,25.76],"4-0-11":[-8051.96,306.25],"6-3-48":[-6953.08,-4.53],"6-3-49":[-5732.35,-13.01],"5-1-24":[-7302.54,-1.78],"6-3-50":[-7284.14,1619.84],"6-3-51":[-3483.9,-27.95],"5-1-25":[-7770.99,1619.84],"4-0-12":[-7770.99,1731.13],"6-3-52":[-2236.21,269.38],"6-3-53":[-158.69,-15.42],"5-1-26":[-3448.8,439.82],"6-3-54":[-99.02,616.8],"6-3-55":[-114.54,911.84],"5-1-27":[-123.47,1085.57],"4-0-13":[-4181.98,1412.43],"6-3-56":[-126.73,-22.99],"6-3-57":[-132.79,-17.75],"5-1-28":[-132.79,-17.75],"6-3-58":[-1869.44,-59.46],"6-3-59":[-2920.48,-55.06],"5-1-29":[-2920.48,-55.06],"4-0-14":[-2920.48,1474.79],"6-3-60":[-3346.96,-50.05],"6-3-61":[-3572.53,-43.58],"5-1-30":[-3572.53,-43.58],"6-3-62":[-3949.75,3970.41],"6-3-63":[-4299.54,3106.07],"5-1-31":[-4299.54,3970.41],"4-0-15":[-4339.64,3970.41],"6-4-0":[-67.96,1783.47],"6-4-1":[-1161.5,3926.7],"6-4-2":[-828.82,17.11],"6-4-3":[-704.94,7.09],"6-4-4":[-1407.45,8.01],"6-4-5":[-4181.68,6.22],"6-4-6":[-4383.79,2.41],"6-4-7":[-4623.83,611.05],"6-4-8":[-4397.23,1101.35],"6-4-9":[-3605.91,428.48],"6-4-10":[-5268.98,653.36],"6-4-11":[-5379.79,27.57],"6-4-12":[-5644.48,1825.97],"6-4-13":[-5659.92,2084.32],"6-4-14":[-5581.4,18.16],"6-4-15":[-6069.3,6.15],"6-4-16":[-5732.91,-2.51],"6-4-17":[-5561.06,-7.81],"6-4-18":[-5467.07,-10.93],"6-4-19":[-6445.04,-11.62],"6-4-20":[-6164.47,-7.94],"6-4-21":[-5852.56,0.97],"6-4-22":[-6692.69,17.55],"6-4-23":[-6202.21,28.15],"6-4-24":[-6698.19,19.59],"6-4-25":[-9080.84,56.94],"6-4-26":[-6082.57,22.24],"6-4-27":[-5919.39,25.71],"6-4-28":[-5822.56,27.19],"6-4-29":[-6220.26,27.84],"6-4-30":[-6622.88,28.27],"6-4-31":[-8273.64,29.58],"6-4-32":[-6224.53,32.89],"6-4-33":[-6221.95,34.86],"6-4-34":[-5718.7,35.6],"6-4-35":[-5595.88,39.9],"6-4-36":[-5808.46,43.72],"6-4-37":[-5899.51,45.71],"6-4-38":[-6912.49,48.56],"6-4-39":[-6145.04,45.88],"6-4-40":[-5619.26,863.24],"6-4-41":[-5186.7,42.29],"6-4-42":[-6049.87,42.26],"6-4-43":[-6355.98,37.32],"6-4-44":[-6622.78,32.28],"6-4-45":[-6960.65,25.33],"6-4-46":[-6793.71,17.65],"6-4-47":[-6566.43,1.08],"6-4-48":[-6377.69,-7.42],"6-4-49":[-5865.62,-13.57],"6-4-50":[-7273.09,1965.32],"6-4-51":[-5208.92,1802.98],"6-4-52":[-514.98,6.05],"6-4-53":[-481.77,671.37],"6-4-54":[-97.35,455.48],"6-4-55":[-113.49,1067.35],"6-4-56":[-126.75,528.03],"6-4-57":[-131.59,-27.82],"6-4-58":[-546.1,-58.9],"6-4-59":[-2622.06,-55.06],"6-4-60":[-3507.79,-49.97],"6-4-61":[-3821.97,-43.61],"6-4-62":[-3936.9,3807.76],"6-4-63":[-4312.53,3106.13],"6-5-0":[-65.96,1809.17],"6-5-1":[-1123.74,3611.78],"5-2-0":[-1161.5,3926.7],"6-5-2":[-783.29,17.66],"6-5-3":[-769.58,7.26],"5-2-1":[-828.82,17.66],"6-5-4":[-2373.31,8],"6-5-5":[-4237.37,1.64],"5-2-2":[-4237.37,8.01],"6-5-6":[-4523.95,0.57],"6-5-7":[-4449.41,977.81],"5-2-3":[-4623.83,977.81],"6-5-8":[-4776.71,1285.63],"6-5-9":[-3809.51,689.98],"5-2-4":[-4776.71,1285.63],"6-5-10":[-5160.02,574.41],"6-5-11":[-5484.51,29.76],"5-2-5":[-5484.51,653.36],"6-5-12":[-5463.02,2863.96],"6-5-13":[-5510.9,25.08],"5-2-6":[-5659.92,2863.96],"6-5-14":[-5633.47,19.59],"6-5-15":[-6371.35,5.94],"5-2-7":[-6371.35,19.59],"6-5-16":[-5828.33,-2.51],"6-5-17":[-6421.22,-7.99],"5-2-8":[-6421.22,-2.51],"6-5-18":[-5982.99,-11.55],"6-5-19":[-6565.05,-11.81],"5-2-9":[-6565.05,-10.93],"6-5-20":[-6784.16,-7.94],"6-5-21":[-6028.23,-0.19],"5-2-10":[-6784.16,0.97],"6-5-22":[-6399.53,8.23],"6-5-23":[-6135.89,68.18],"5-2-11":[-6692.69,68.18],"6-5-24":[-6055.38,18.67],"6-5-25":[-5836.09,998.66],"5-2-12":[-9080.84,998.66],"6-5-26":[-6060.91,20.47],"6-5-27":[-5996.07,196.74],"5-2-13":[-6082.57,196.74],"6-5-28":[-5155.46,84.53],"6-5-29":[-6004.46,30.66],"5-2-14":[-6220.26,84.53],"6-5-30":[-5896.13,32.3],"6-5-31":[-6776.17,32.65],"5-2-15":[-8273.64,32.65],"6-5-32":[-5810.52,32.3],"6-5-33":[-5562.23,34.31],"5-2-16":[-6224.53,34.86],"6-5-34":[-5388.87,33.96],"6-5-35":[-5395.61,37.54],"5-2-17":[-5718.7,39.9],"6-5-36":[-5752.23,37.44],"6-5-37":[-5924.58,31.1],"5-2-18":[-5924.58,45.71],"6-5-38":[-6440.59,38.62],"6-5-39":[-5463.5,31.7],"5-2-19":[-6912.49,48.56],"6-5-40":[-5484.19,50.2],"6-5-41":[-5747.8,29.27],"5-2-20":[-5747.8,863.24],"6-5-42":[-5919.79,28.59],"6-5-43":[-6218.64,25.16],"5-2-21":[-6355.98,42.26],"6-5-44":[-7345.46,23.39],"6-5-45":[-6835.24,19.09],"5-2-22":[-7345.46,32.28],"6-5-46":[-6802.21,10.74],"6-5-47":[-5979.18,-0.35],"5-2-23":[-6802.21,17.65],"6-5-48":[-5777.25,-8.28],"6-5-49":[-5982.59,-13.41],"5-2-24":[-6377.69,-7.42],"6-5-50":[-7131.76,-19.83],"6-5-51":[-4248.36,2750.95],"5-2-25":[-7273.09,2750.95],"6-5-52":[-82.49,0.95],"6-5-53":[-85.9,583.42],"5-2-26":[-514.98,671.37],"6-5-54":[-96.28,649.97],"6-5-55":[-112.03,1302.63],"5-2-27":[-113.49,1302.63],"6-5-56":[-123.43,899.72],"6-5-57":[-130.93,-28.8],"5-2-28":[-131.59,899.72],"6-5-58":[-2065.53,-59.02],"6-5-59":[-2302.29,-54.72],"5-2-29":[-2622.06,-54.72],"6-5-60":[-3827.92,146.66],"6-5-61":[-3883.39,-43.74],"5-2-30":[-3883.39,146.66],"6-5-62":[-4110.64,3579.75],"6-5-63":[-4229.45,3100.28],"5-2-31":[-4312.53,3807.76],"6-6-0":[-94.11,1778.04],"6-6-1":[-1591.32,2998.88],"6-6-2":[-746.81,17.98],"6-6-3":[-770.17,6.62],"6-6-4":[-3154.74,6.62],"6-6-5":[-4196.81,0.42],"6-6-6":[-4609.89,37.03],"6-6-7":[-4642.27,1376.89],"6-6-8":[-4626.96,982.62],"6-6-9":[-4855.42,985.82],"6-6-10":[-5061.5,1234.98],"6-6-11":[-4882.7,705.14],"6-6-12":[-5664.91,2536.32],"6-6-13":[-5500.81,22.83],"6-6-14":[-5641.77,19.52],"6-6-15":[-6089.63,5.64],"6-6-16":[-6504.35,-3.61],"6-6-17":[-6018.21,-9.15],"6-6-18":[-5722.93,-12.33],"6-6-19":[-6011.9,-12.54],"6-6-20":[-6422.91,-8.27],"6-6-21":[-6422.91,-1.95],"6-6-22":[-6254.61,7.14],"6-6-23":[-5852.12,190.01],"6-6-24":[-5518.96,138.47],"6-6-25":[-5674.11,119.03],"6-6-26":[-6452.43,16.51],"6-6-27":[-5818.55,191.73],"6-6-28":[-5208.22,135.96],"6-6-29":[-6149.2,51.55],"6-6-30":[-6208.7,50.16],"6-6-31":[-5562.63,33.27],"6-6-32":[-5937.47,31.91],"6-6-33":[-5302.58,272.18],"6-6-34":[-5325.41,52.97],"6-6-35":[-5599.08,41.94],"6-6-36":[-6146.87,29.88],"6-6-37":[-6482.14,25.29],"6-6-38":[-6038.67,32.55],"6-6-39":[-5338.91,25.04],"6-6-40":[-5281.24,46.05],"6-6-41":[-5779.94,21.25],"6-6-42":[-6126.98,21.21],"6-6-43":[-6173.19,20.07],"6-6-44":[-6250.7,16.55],"6-6-45":[-7523.68,12.64],"6-6-46":[-6434.49,7.66],"6-6-47":[-5854.24,-0.23],"6-6-48":[-5883.17,-8.01],"6-6-49":[-5303.84,-13.39],"6-6-50":[-6978.57,-19.08],"6-6-51":[-6793.58,2398.31],"6-6-52":[-80.36,612.17],"6-6-53":[-89.66,1323.98],"6-6-54":[-95.47,955.8],"6-6-55":[-110.06,986.95],"6-6-56":[-123.5,1457.88],"6-6-57":[-267.02,37.04],"6-6-58":[-2483.25,-62.06],"6-6-59":[-2735.7,-53.84],"6-6-60":[-3837.89,382.35],"6-6-61":[-3859.19,-36.44],"6-6-62":[-4111.64,3110.85],"6-6-63":[-4265.4,3090.17],"6-7-0":[-114.12,1993.53],"6-7-1":[-1659.34,3802.26],"5-3-0":[-1659.34,3802.26],"6-7-2":[-726.96,18.02],"6-7-3":[-856.88,4.75],"5-3-1":[-856.88,18.02],"4-1-0":[-1659.34,3926.7],"6-7-4":[-3515.76,174.18],"6-7-5":[-4316.77,-0.69],"5-3-2":[-4316.77,174.18],"6-7-6":[-4525.93,40.51],"6-7-7":[-4826.23,1489.28],"5-3-3":[-4826.23,1489.28],"4-1-1":[-4826.23,1489.28],"3-0-0":[-4826.23,4033.51],"6-7-8":[-4705.16,1063.92],"6-7-9":[-4508.79,1104.57],"5-3-4":[-4855.42,1104.57],"6-7-10":[-4405.97,1599.96],"6-7-11":[-4732.4,1740.57],"5-3-5":[-5061.5,1740.57],"4-1-2":[-5484.51,1740.57],"6-7-12":[-5035.8,2512.65],"6-7-13":[-6007.55,22.76],"5-3-6":[-6007.55,2536.32],"6-7-14":[-5655.69,18.21],"6-7-15":[-5490.55,3.05],"5-3-7":[-6089.63,19.52],"4-1-3":[-6371.35,2863.96],"3-0-1":[-6424.28,2863.96],"6-7-16":[-5742.76,-4.09],"6-7-17":[-5608.7,-10.07],"5-3-8":[-6504.35,-3.61],"6-7-18":[-5790.02,-13.47],"6-7-19":[-5942.52,-13.83],"5-3-9":[-6011.9,-12.33],"4-1-4":[-6565.05,-2.51],"6-7-20":[-6122.28,-10],"6-7-21":[-5983.9,-3.54],"5-3-10":[-6422.91,-1.95],"6-7-22":[-5652.19,4.69],"6-7-23":[-5471.5,14.6],"5-3-11":[-6254.61,190.01],"4-1-5":[-6784.16,190.01],"3-0-2":[-10731.15,480.3],"6-7-24":[-5211.11,1613.09],"6-7-25":[-10751.44,366.35],"5-3-12":[-10751.44,1613.09],"6-7-26":[-5776.41,11],"6-7-27":[-6202.43,17.46],"5-3-13":[-6452.43,191.73],"4-1-6":[-10751.44,1613.09],"6-7-28":[-6652.2,1903.24],"6-7-29":[-6197.55,32.99],"5-3-14":[-6652.2,1903.24],"6-7-30":[-5754.01,44.95],"6-7-31":[-5455.55,41.99],"5-3-15":[-6208.7,50.16],"4-1-7":[-8273.64,1903.24],"3-0-3":[-10751.44,1903.24],"6-7-32":[-5343.6,107.13],"6-7-33":[-4698.31,110.78],"5-3-16":[-5937.47,272.18],"6-7-34":[-5062.03,27.02],"6-7-35":[-5630.37,36.94],"5-3-17":[-5630.37,52.97],"4-1-8":[-6224.53,272.18],"6-7-36":[-6164.69,22.36],"6-7-37":[-5971.41,18.93],"5-3-18":[-6482.14,29.88],"6-7-38":[-5951.46,124.3],"6-7-39":[-4961.01,1612.94],"5-3-19":[-6038.67,1612.94],"4-1-9":[-6912.49,1612.94],"3-0-4":[-6912.49,1897.33],"6-7-40":[-6841.68,19.09],"6-7-41":[-6117.84,14.77],"5-3-20":[-6841.68,46.05],"6-7-42":[-6969.86,12.33],"6-7-43":[-6304.07,11.63],"5-3-21":[-6969.86,21.21],"4-1-10":[-6969.86,863.24],"6-7-44":[-6236.81,10.73],"6-7-45":[-6777.07,8.15],"5-3-22":[-7523.68,16.55],"6-7-46":[-5942.92,4.11],"6-7-47":[-6327.91,-2.7],"5-3-23":[-6434.49,7.66],"4-1-11":[-7523.68,32.28],"3-0-5":[-8051.96,863.24],"6-7-48":[-5660.04,-6.48],"6-7-49":[-5377.17,-13.72],"5-3-24":[-5883.17,-6.48],"6-7-50":[-6003.68,-19.18],"6-7-51":[-7476.07,2467.65],"5-3-25":[-7476.07,2467.65],"4-1-12":[-7476.07,2750.95],"6-7-52":[-294.64,1671.56],"6-7-53":[-81.45,1454.97],"5-3-26":[-294.64,1671.56],"6-7-54":[-93.97,1100.59],"6-7-55":[-109.85,1114.85],"5-3-27":[-110.06,1114.85],"4-1-13":[-514.98,1671.56],"3-0-6":[-7770.99,2750.95],"6-7-56":[-122.72,1462.27],"6-7-57":[-2671.74,44.62],"5-3-28":[-2671.74,1462.27],"6-7-58":[-3895.05,-62.74],"6-7-59":[-3863.74,340.29],"5-3-29":[-3895.05,340.29],"4-1-14":[-3895.05,1462.27],"6-7-60":[-3837.37,329.56],"6-7-61":[-3854.32,5.39],"5-3-30":[-3859.19,382.35],"6-7-62":[-3894.65,3872.33],"6-7-63":[-4253.4,3078.77],"5-3-31":[-4265.4,3872.33],"4-1-15":[-4312.53,3872.33],"3-0-7":[-4339.64,3970.41],"6-8-0":[-133.19,2418.18],"6-8-1":[-1497.67,3630.69],"6-8-2":[-725.49,17.9],"6-8-3":[-860.75,4.36],"6-8-4":[-3573.59,698.67],"6-8-5":[-4331.48,-1.15],"6-8-6":[-4503.3,46.22],"6-8-7":[-4850,2230.09],"6-8-8":[-4712.88,2322.75],"6-8-9":[-4566.51,1231.31],"6-8-10":[-4355.63,1286.11],"6-8-11":[-4501.55,2365.52],"6-8-12":[-4660.11,340.69],"6-8-13":[-5966.24,23.37],"6-8-14":[-5682.56,15.39],"6-8-15":[-5231.54,0.65],"6-8-16":[-5608.95,-6.49],"6-8-17":[-5431.41,-11.47],"6-8-18":[-5762.65,-14.68],"6-8-19":[-5770,-15.15],"6-8-20":[-6098.74,-12.28],"6-8-21":[-5777.78,-7.16],"6-8-22":[-5728.06,1],"6-8-23":[-5391.55,7.31],"6-8-24":[-5807.69,4224.76],"6-8-25":[-5219.34,4199.19],"6-8-26":[-9303.29,93.4],"6-8-27":[-5769.45,13.28],"6-8-28":[-6531.38,20.81],"6-8-29":[-6133.11,227.93],"6-8-30":[-5459.96,441.43],"6-8-31":[-5482.43,39.3],"6-8-32":[-5063.73,105.79],"6-8-33":[-4939.68,33.65],"6-8-34":[-5381.15,29.43],"6-8-35":[-5847.02,18.21],"6-8-36":[-6404.77,15.57],"6-8-37":[-6114.51,18.43],"6-8-38":[-5763.74,4199.19],"6-8-39":[-6049.76,4224.65],"6-8-40":[-5216.39,11.5],"6-8-41":[-6204.87,8],"6-8-42":[-6753.63,5.43],"6-8-43":[-6639.76,5.22],"6-8-44":[-6145.45,4.54],"6-8-45":[-6369.08,2.59],"6-8-46":[-6009.01,1.16],"6-8-47":[-6003.66,-3.98],"6-8-48":[-5816.42,-6.48],"6-8-49":[-5499.75,-13.07],"6-8-50":[-5244.21,-18.94],"6-8-51":[-6022.65,229.61],"6-8-52":[-333.13,2312.51],"6-8-53":[-78.98,1236.1],"6-8-54":[-91.83,1205.31],"6-8-55":[-109.23,2269.75],"6-8-56":[-120.92,2154.43],"6-8-57":[-3744.55,41.81],"6-8-58":[-4090.38,-62.51],"6-8-59":[-3900.79,772.25],"6-8-60":[-3952.21,254.93],"6-8-61":[-3830.41,77.33],"6-8-62":[-3849.56,3797.09],"6-8-63":[-4233.39,3066.33],"6-9-0":[-133.33,2625.88],"6-9-1":[-1543.8,2875.32],"5-4-0":[-1543.8,3630.69],"6-9-2":[-750.6,17.45],"6-9-3":[-948.63,3.84],"5-4-1":[-948.63,17.9],"6-9-4":[-3712.36,882.14],"6-9-5":[-4355.95,-2.83],"5-4-2":[-4355.95,882.14],"6-9-6":[-4514.92,52.5],"6-9-7":[-4691.52,2249.45],"5-4-3":[-4850,2249.45],"6-9-8":[-4726.41,1957.92],"6-9-9":[-4515.51,3549.52],"5-4-4":[-4726.41,3549.52],"6-9-10":[-3523.27,3498.22],"6-9-11":[-3809.98,2301.61],"5-4-5":[-4501.55,3498.22],"6-9-12":[-5184.02,28.12],"6-9-13":[-5526.88,22.28],"5-4-6":[-5966.24,340.69],"6-9-14":[-5637.58,10.49],"6-9-15":[-6327.22,-1.66],"5-4-7":[-6327.22,15.39],"6-9-16":[-6383.59,-8.53],"6-9-17":[-5698.62,-13.07],"5-4-8":[-6383.59,-6.49],"6-9-18":[-5820.88,-16.27],"6-9-19":[-5844.73,-16.03],"5-4-9":[-5844.73,-14.68],"6-9-20":[-5753.67,-13.34],"6-9-21":[-5997.64,-9.72],"5-4-10":[-6098.74,-7.16],"6-9-22":[-6149.97,-3.51],"6-9-23":[-5554.04,244.22],"5-4-11":[-6149.97,244.22],"6-9-24":[-5257.94,211.35],"6-9-25":[-5050.78,8.27],"5-4-12":[-5807.69,4224.76],"6-9-26":[-6105.07,325.78],"6-9-27":[-5717.79,7.73],"5-4-13":[-9303.29,325.78],"6-9-28":[-6191.84,3407.2],"6-9-29":[-6202.92,25.09],"5-4-14":[-6531.38,3407.2],"6-9-30":[-6482.71,28.45],"6-9-31":[-5201.78,30.86],"5-4-15":[-6482.71,441.43],"6-9-32":[-5182.24,31.34],"6-9-33":[-5362.99,28.46],"5-4-16":[-5362.99,105.79],"6-9-34":[-5789.15,22.63],"6-9-35":[-5533.58,15.89],"5-4-17":[-5847.02,29.43],"6-9-36":[-6622.39,11.11],"6-9-37":[-6497.61,364.92],"5-4-18":[-6622.39,364.92],"6-9-38":[-5642.43,11.45],"6-9-39":[-5994.03,7.86],"5-4-19":[-6049.76,4224.65],"6-9-40":[-5922.92,87.14],"6-9-41":[-6445.99,2.06],"5-4-20":[-6445.99,87.14],"6-9-42":[-6639.94,0.4],"6-9-43":[-5881.49,0.66],"5-4-21":[-6753.63,5.43],"6-9-44":[-6260.21,0.22],"6-9-45":[-6305.46,-1.28],"5-4-22":[-6369.08,4.54],"6-9-46":[-6130.83,-1.34],"6-9-47":[-6127.19,-5.15],"5-4-23":[-6130.83,1.16],"6-9-48":[-6167.65,-8.73],"6-9-49":[-5701.32,-13.13],"5-4-24":[-6167.65,-6.48],"6-9-50":[-5808.68,-17.8],"6-9-51":[-5585.66,-22.53],"5-4-25":[-6022.65,229.61],"6-9-52":[-3994.2,2166.51],"6-9-53":[-554.63,3405.43],"5-4-26":[-3994.2,3405.43],"6-9-54":[-90.63,3271.87],"6-9-55":[-107.41,1943.8],"5-4-27":[-109.23,3271.87],"6-9-56":[-119.96,2151.83],"6-9-57":[-3879.83,50.13],"5-4-28":[-3879.83,2154.43],"6-9-58":[-3936.01,-58.13],"6-9-59":[-3930.23,1007.23],"5-4-29":[-4090.38,1007.23],"6-9-60":[-3961.21,462.57],"6-9-61":[-3866.34,462.57],"5-4-30":[-3961.21,462.57],"6-9-62":[-3785.04,2783.57],"6-9-63":[-4243.39,3039.73],"5-4-31":[-4243.39,3797.09],"6-10-0":[-168.35,2478.84],"6-10-1":[-1188.55,2541.84],"6-10-2":[-835.74,17.55],"6-10-3":[-1077.31,67.73],"6-10-4":[-1634.85,417.41],"6-10-5":[-4329.28,-2.83],"6-10-6":[-4516.89,31.96],"6-10-7":[-4681.61,2250.87],"6-10-8":[-5159.84,1714.22],"6-10-9":[-4538.5,6207.28],"6-10-10":[-3782.64,2318.12],"6-10-11":[-3750.01,380.19],"6-10-12":[-5228.22,24.81],"6-10-13":[-5185.35,18.21],"6-10-14":[-5553.54,6.41],"6-10-15":[-6417.51,-4.11],"6-10-16":[-5662.92,-11.54],"6-10-17":[-5774.67,-15.64],"6-10-18":[-6844.62,-19.38],"6-10-19":[-6254.77,-18.81],"6-10-20":[-6338.1,-14.67],"6-10-21":[-6350.66,-11.93],"6-10-22":[-5752.27,-8.91],"6-10-23":[-5626.96,337.29],"6-10-24":[-5190.17,300.87],"6-10-25":[-6327.94,1587.33],"6-10-26":[-4919.76,858.44],"6-10-27":[-5755.82,266.32],"6-10-28":[-5400.68,1458.3],"6-10-29":[-5831.18,19.96],"6-10-30":[-5587.29,24.2],"6-10-31":[-5535.76,28.1],"6-10-32":[-5166.66,27.88],"6-10-33":[-5404.48,27.31],"6-10-34":[-5750.11,20.7],"6-10-35":[-5655.89,29.22],"6-10-36":[-6415.07,34.33],"6-10-37":[-6463.93,982.44],"6-10-38":[-5795.6,1738.21],"6-10-39":[-6460.21,368.88],"6-10-40":[-6468.28,399.3],"6-10-41":[-7036.1,-0.9],"6-10-42":[-6744.24,-1.07],"6-10-43":[-6358.02,-1.37],"6-10-44":[-6201.6,-2.29],"6-10-45":[-6329.6,-3.92],"6-10-46":[-5996.93,-4.4],"6-10-47":[-5697.46,-6.94],"6-10-48":[-5653.13,-10.44],"6-10-49":[-5656,-13.58],"6-10-50":[-5893.86,-16.97],"6-10-51":[-5523.63,-20.99],"6-10-52":[-5381.5,346.13],"6-10-53":[-1809.46,2120.75],"6-10-54":[-88.65,6095.63],"6-10-55":[-106.09,1765.96],"6-10-56":[-116.67,2185.42],"6-10-57":[-3874.65,26.49],"6-10-58":[-3919.09,-55.65],"6-10-59":[-3927.57,883.88],"6-10-60":[-3907.83,570.37],"6-10-61":[-3613.14,549.47],"6-10-62":[-3644,2425.34],"6-10-63":[-4227.35,3008.67],"6-11-0":[-183.38,2377.6],"6-11-1":[-1234.31,3176.27],"5-5-0":[-1234.31,3176.27],"6-11-2":[-902.26,18.15],"6-11-3":[-1164.72,75.57],"5-5-1":[-1164.72,75.57],"4-2-0":[-1543.8,3630.69],"6-11-4":[-2094.06,663.6],"6-11-5":[-4260.3,-3.47],"5-5-2":[-4329.28,663.6],"6-11-6":[-4409.85,5.59],"6-11-7":[-4506.16,2337.17],"5-5-3":[-4681.61,2337.17],"4-2-1":[-4850,2337.17],"6-11-8":[-5196.88,1624.53],"6-11-9":[-4768.63,4180.16],"5-5-4":[-5196.88,6207.28],"6-11-10":[-4182.3,4014.2],"6-11-11":[-3864.66,27.09],"5-5-5":[-4182.3,4014.2],"4-2-2":[-5196.88,6207.28],"6-11-12":[-4863.31,20.02],"6-11-13":[-5098.5,12.89],"5-5-6":[-5228.22,24.81],"6-11-14":[-5577.52,1.04],"6-11-15":[-5517.12,-7.02],"5-5-7":[-6417.51,6.41],"4-2-3":[-6417.51,340.69],"6-11-16":[-5726.26,-14.25],"6-11-17":[-6014.63,-18.62],"5-5-8":[-6014.63,-11.54],"6-11-18":[-6047.97,-21.88],"6-11-19":[-5954.95,-21.95],"5-5-9":[-6844.62,-18.81],"4-2-4":[-6844.62,-6.49],"6-11-20":[-6376.27,-17.94],"6-11-21":[-5426.35,-14.48],"5-5-10":[-6376.27,-11.93],"6-11-22":[-5074.5,-12.52],"6-11-23":[-5623.64,309.11],"5-5-11":[-5752.27,337.29],"4-2-5":[-6376.27,337.29],"6-11-24":[-6007.69,-8.2],"6-11-25":[-4854.06,287.11],"5-5-12":[-6327.94,1587.33],"6-11-26":[-4603.51,322.84],"6-11-27":[-5478.68,40.87],"5-5-13":[-5755.82,858.44],"4-2-6":[-9303.29,4224.76],"6-11-28":[-6630.7,3.39],"6-11-29":[-5892.13,13.1],"5-5-14":[-6630.7,1458.3],"6-11-30":[-5587.29,18.24],"6-11-31":[-5106.24,23.18],"5-5-15":[-5587.29,28.1],"4-2-7":[-6630.7,3407.2],"6-11-32":[-5002.41,23.23],"6-11-33":[-5509.79,21.8],"5-5-16":[-5509.79,27.88],"6-11-34":[-5851.53,15.53],"6-11-35":[-5631.96,8.74],"5-5-17":[-5851.53,29.22],"4-2-8":[-5851.53,105.79],"6-11-36":[-6312.55,4.25],"6-11-37":[-6661.84,108.86],"5-5-18":[-6661.84,982.44],"6-11-38":[-6246.69,418.12],"6-11-39":[-6396.35,-1.41],"5-5-19":[-6460.21,1738.21],"4-2-9":[-6661.84,4224.65],"6-11-40":[-6560.2,394.12],"6-11-41":[-6052.54,-2.74],"5-5-20":[-7036.1,399.3],"6-11-42":[-6502.29,-2.09],"6-11-43":[-6219.92,-2.6],"5-5-21":[-6744.24,-1.07],"4-2-10":[-7036.1,399.3],"6-11-44":[-5862.36,-3.6],"6-11-45":[-6436.13,-5.6],"5-5-22":[-6436.13,-2.29],"6-11-46":[-5819.59,-7.76],"6-11-47":[-5495.45,-8.93],"5-5-23":[-5996.93,-4.4],"4-2-11":[-6436.13,4.54],"6-11-48":[-5200.05,-11.9],"6-11-49":[-8103.44,-13.59],"5-5-24":[-8103.44,-10.44],"6-11-50":[-5232.18,-16.5],"6-11-51":[-4750.88,-20.15],"5-5-25":[-5893.86,-16.5],"4-2-12":[-8103.44,229.61],"6-11-52":[-5077.5,-23.76],"6-11-53":[-2754.79,3834.03],"5-5-26":[-5381.5,3834.03],"6-11-54":[-86.21,3972.34],"6-11-55":[-103.18,1602.16],"5-5-27":[-106.09,6095.63],"4-2-13":[-5381.5,6095.63],"6-11-56":[-113.79,2293.15],"6-11-57":[-3765.29,6.83],"5-5-28":[-3874.65,2293.15],"6-11-58":[-3865.62,-30.17],"6-11-59":[-3941.99,896.34],"5-5-29":[-3941.99,896.34],"4-2-14":[-4090.38,2293.15],"6-11-60":[-3893.37,667.99],"6-11-61":[-3732.8,564.8],"5-5-30":[-3907.83,667.99],"6-11-62":[-3422.03,3379.23],"6-11-63":[-4222.37,2977.45],"5-5-31":[-4227.35,3379.23],"4-2-15":[-4243.39,3797.09],"6-12-0":[-181.36,1693.13],"6-12-1":[-1455.74,2871.83],"6-12-2":[-1098.55,18.51],"6-12-3":[-1119.23,2.56],"6-12-4":[-1551.27,1171.54],"6-12-5":[-4185.02,252.83],"6-12-6":[-4455.12,-1.46],"6-12-7":[-4548.47,2626.58],"6-12-8":[-4886.04,1971.14],"6-12-9":[-4860.51,4964.36],"6-12-10":[-4561.15,5003.13],"6-12-11":[-4330.54,17.77],"6-12-12":[-5941.24,17.44],"6-12-13":[-5681.57,8.08],"6-12-14":[-5679.46,-2.54],"6-12-15":[-5618.32,-10.05],"6-12-16":[-5733.88,-16.83],"6-12-17":[-6117.04,-21.69],"6-12-18":[-6699.21,-25],"6-12-19":[-6042.47,-24.8],"6-12-20":[-6163.38,-22.36],"6-12-21":[-5676.67,-17.53],"6-12-22":[-4728.02,419.05],"6-12-23":[-5762.93,154.67],"6-12-24":[-5637.54,138.75],"6-12-25":[-5061.96,265.8],"6-12-26":[-4719.59,549.53],"6-12-27":[-5417.45,-4.41],"6-12-28":[-5746,-0.37],"6-12-29":[-5483.02,6.6],"6-12-30":[-5099.46,13.43],"6-12-31":[-4938.09,18.86],"6-12-32":[-4792.79,19.08],"6-12-33":[-6222.37,16.44],"6-12-34":[-5876.68,12.4],"6-12-35":[-5719.46,3.06],"6-12-36":[-6252.33,-0.47],"6-12-37":[-6689.38,26.39],"6-12-38":[-6041.73,15.85],"6-12-39":[-6382.53,13.14],"6-12-40":[-6633.54,-5.04],"6-12-41":[-5606.01,367.1],"6-12-42":[-6254.81,-4.66],"6-12-43":[-6442.49,-5.49],"6-12-44":[-6251.77,-5.68],"6-12-45":[-5961.27,-7.48],"6-12-46":[-6225.81,-9.37],"6-12-47":[-5200.68,-11.32],"6-12-48":[-4973.03,-13.01],"6-12-49":[-4891.62,-15.16],"6-12-50":[-4935.48,-16.79],"6-12-51":[-4684.63,-19.15],"6-12-52":[-4852.85,-23.29],"6-12-53":[-4722.62,4901.79],"6-12-54":[-84.64,4907.93],"6-12-55":[-100.6,1849.36],"6-12-56":[-110.81,2580.94],"6-12-57":[-3674.95,-28.39],"6-12-58":[-3819.03,732.21],"6-12-59":[-3893.84,1118.71],"6-12-60":[-3872.09,697.82],"6-12-61":[-3706.18,547.44],"6-12-62":[-3461.9,3177.52],"6-12-63":[-4221.36,2958.4],"6-13-0":[-161.34,1474.13],"6-13-1":[-1652.61,2990.28],"5-6-0":[-1652.61,2990.28],"6-13-2":[-922.38,18.69],"6-13-3":[-1307.85,2.29],"5-6-1":[-1307.85,18.69],"6-13-4":[-1245.45,1086.26],"6-13-5":[-4159.76,828.09],"5-6-2":[-4185.02,1171.54],"6-13-6":[-4531.15,-1.51],"6-13-7":[-4629.72,2443.65],"5-6-3":[-4629.72,2626.58],"6-13-8":[-4866.08,1955.52],"6-13-9":[-4896.44,3305.19],"5-6-4":[-4896.44,4964.36],"6-13-10":[-4581.53,5501.18],"6-13-11":[-5943.29,16.19],"5-6-5":[-5943.29,5501.18],"6-13-12":[-6014.26,12.53],"6-13-13":[-5533.57,1.23],"5-6-6":[-6014.26,17.44],"6-13-14":[-5250.64,-5.03],"6-13-15":[-5500.84,-13.68],"5-6-7":[-5679.46,-2.54],"6-13-16":[-5716.49,-19.6],"6-13-17":[-6636.39,-24.29],"5-6-8":[-6636.39,-16.83],"6-13-18":[-6228.62,-29.09],"6-13-19":[-5856.69,-28.05],"5-6-9":[-6699.21,-24.8],"6-13-20":[-5910.84,-25.11],"6-13-21":[-5256.1,-21.57],"5-6-10":[-6163.38,-17.53],"6-13-22":[-4830.29,-19.25],"6-13-23":[-5393,-19.08],"5-6-11":[-5762.93,419.05],"6-13-24":[-5111.43,229.65],"6-13-25":[-4776.85,276.62],"5-6-12":[-5637.54,276.62],"6-13-26":[-4587.09,1606.36],"6-13-27":[-5913.51,-7.34],"5-6-13":[-5913.51,1606.36],"6-13-28":[-5787.05,27.02],"6-13-29":[-4722.33,528.03],"5-6-14":[-5787.05,528.03],"6-13-30":[-5229.34,5.15],"6-13-31":[-5127.76,10.05],"5-6-15":[-5229.34,18.86],"6-13-32":[-4776.14,10.97],"6-13-33":[-5127.13,9.15],"5-6-16":[-6222.37,19.08],"6-13-34":[-5659.07,574],"6-13-35":[-7447.7,3.2],"5-6-17":[-7447.7,574],"6-13-36":[-6016.23,-2.96],"6-13-37":[-6776.68,18.94],"5-6-18":[-6776.68,26.39],"6-13-38":[-5885.01,15.14],"6-13-39":[-6294.03,21.33],"5-6-19":[-6382.53,21.33],"6-13-40":[-6242.29,-7.97],"6-13-41":[-5471.92,-4.36],"5-6-20":[-6633.54,367.1],"6-13-42":[-5640.19,-4.92],"6-13-43":[-6405.01,-8.03],"5-6-21":[-6442.49,-4.66],"6-13-44":[-6316.29,-8.36],"6-13-45":[-6352.55,-9.22],"5-6-22":[-6352.55,-5.68],"6-13-46":[-6171.18,-10.62],"6-13-47":[-5055.96,-11.92],"5-6-23":[-6225.81,-9.37],"6-13-48":[-4727.1,-14.27],"6-13-49":[-6709.55,-15.88],"5-6-24":[-6709.55,-13.01],"6-13-50":[-4532.06,-16.79],"6-13-51":[-4206.32,-18.04],"5-6-25":[-4935.48,-16.79],"6-13-52":[-3930.24,-21.69],"6-13-53":[-3805.7,5374.27],"5-6-26":[-4852.85,5374.27],"6-13-54":[-82.17,3164.74],"6-13-55":[-96.84,1843.66],"5-6-27":[-100.6,4907.93],"6-13-56":[-192.46,2256.65],"6-13-57":[-3560.52,-45.32],"5-6-28":[-3674.95,2580.94],"6-13-58":[-3777.45,799.79],"6-13-59":[-3830.96,1415.24],"5-6-29":[-3893.84,1415.24],"6-13-60":[-3818.7,696.8],"6-13-61":[-3786.2,578.81],"5-6-30":[-3872.09,697.82],"6-13-62":[-3456.9,2807.42],"6-13-63":[-4223.36,2933.27],"5-6-31":[-4223.36,3177.52],"6-14-0":[-215.89,1760.1],"6-14-1":[-1678.19,3160.02],"6-14-2":[-1200.9,18.69],"6-14-3":[-1245.84,2.84],"6-14-4":[-1486.78,1054.84],"6-14-5":[-4124.23,874.8],"6-14-6":[-4464.26,-3.21],"6-14-7":[-4716.03,1629.08],"6-14-8":[-4779.66,2195.84],"6-14-9":[-5029.49,2352.25],"6-14-10":[-4887.53,5990.12],"6-14-11":[-5167.06,1250.79],"6-14-12":[-3998.63,5.47],"6-14-13":[-5641.75,-2.9],"6-14-14":[-5640.26,-9.51],"6-14-15":[-6063.37,-17],"6-14-16":[-6353.19,-23.13],"6-14-17":[-6412.37,-26.79],"6-14-18":[-5979.38,-32.26],"6-14-19":[-5645.82,-30.63],"6-14-20":[-5195.75,-28.02],"6-14-21":[-4903.61,-1.91],"6-14-22":[-4940.46,-23.49],"6-14-23":[-5190.71,-22.95],"6-14-24":[-4875.96,295.99],"6-14-25":[-4544.85,145.6],"6-14-26":[-4451.65,78.85],"6-14-27":[-4792.38,-11.82],"6-14-28":[-4507.28,1173.83],"6-14-29":[-4839.24,388.87],"6-14-30":[-4916.53,-0.54],"6-14-31":[-4887.14,3.14],"6-14-32":[-4975.78,4.38],"6-14-33":[-5142.66,4.04],"6-14-34":[-5322.02,444.87],"6-14-35":[-5384.02,1253.85],"6-14-36":[-6344.65,-4.2],"6-14-37":[-5851.42,11.81],"6-14-38":[-5795.76,12.56],"6-14-39":[-5701.16,29.28],"6-14-40":[-6003.76,-9.96],"6-14-41":[-5477.38,-8.25],"6-14-42":[-5257.35,-7.63],"6-14-43":[-6050.14,-8.79],"6-14-44":[-6456.24,-9.44],"6-14-45":[-6312.83,-9.8],"6-14-46":[-5960.56,-11.59],"6-14-47":[-4585.8,-13.34],"6-14-48":[-4683.62,-14.96],"6-14-49":[-4721.83,-16.64],"6-14-50":[-3984.97,-17.15],"6-14-51":[-3687.61,-17.84],"6-14-52":[-3668.18,1159.79],"6-14-53":[-434.8,5828.29],"6-14-54":[-81.47,2178.34],"6-14-55":[-94.24,2088.55],"6-14-56":[-557.25,1489.78],"6-14-57":[-3334.1,-50.32],"6-14-58":[-3731.79,1501.65],"6-14-59":[-3805.12,1730.64],"6-14-60":[-3800.65,752.21],"6-14-61":[-3796.21,587.99],"6-14-62":[-3065.97,3232.04],"6-14-63":[-4227.36,2914.46],"6-15-0":[-252.92,1750.21],"6-15-1":[-1586.85,3417.75],"5-7-0":[-1678.19,3417.75],"6-15-2":[-1307.4,18.62],"6-15-3":[-1291.03,3.57],"5-7-1":[-1307.4,18.69],"4-3-0":[-1678.19,3417.75],"6-15-4":[-1008.08,3235.77],"6-15-5":[-3901.52,1165.61],"5-7-2":[-4124.23,3235.77],"6-15-6":[-4460.99,-3.02],"6-15-7":[-4699.29,1677.33],"5-7-3":[-4716.03,1677.33],"4-3-1":[-4716.03,3235.77],"3-1-0":[-4850,3630.69],"6-15-8":[-5027.23,2201.64],"6-15-9":[-5359.93,2244.89],"5-7-4":[-5359.93,2352.25],"6-15-10":[-5092.31,3286.53],"6-15-11":[-4715.56,4338.49],"5-7-5":[-5167.06,5990.12],"4-3-2":[-5943.29,5990.12],"6-15-12":[-4457.58,0.26],"6-15-13":[-5147.09,-5.77],"5-7-6":[-5641.75,5.47],"6-15-14":[-5959.55,-12.56],"6-15-15":[-6660.79,-19.83],"5-7-7":[-6660.79,-9.51],"4-3-3":[-6660.79,17.44],"3-1-1":[-6660.79,6207.28],"2-0-0":[-6660.79,6207.28],"6-15-16":[-6324.33,-25.72],"6-15-17":[-6080.83,-29.35],"5-7-8":[-6412.37,-23.13],"6-15-18":[-5404.77,-34.5],"6-15-19":[-5340.82,-33.7],"5-7-9":[-5979.38,-30.63],"4-3-4":[-6699.21,-16.83],"6-15-20":[-5105.14,-31.19],"6-15-21":[-4617.63,-29.89],"5-7-10":[-5195.75,-1.91],"6-15-22":[-4638.21,-28.48],"6-15-23":[-4781.63,1449.55],"5-7-11":[-5190.71,1449.55],"4-3-5":[-6163.38,1449.55],"3-1-2":[-6844.62,1449.55],"6-15-24":[-4774.4,187.4],"6-15-25":[-4764.79,87.27],"5-7-12":[-4875.96,295.99],"6-15-26":[-4780.15,-19.12],"6-15-27":[-5089.12,-17.07],"5-7-13":[-5089.12,78.85],"4-3-6":[-5913.51,1606.36],"6-15-28":[-4769.36,-13.51],"6-15-29":[-4843.95,-9.36],"5-7-14":[-4843.95,1173.83],"6-15-30":[-4850.25,-5.14],"6-15-31":[-4785.05,-2.71],"5-7-15":[-4916.53,3.14],"4-3-7":[-5787.05,1173.83],"3-1-3":[-9303.29,4224.76],"2-0-1":[-10751.44,4224.76],"6-15-32":[-4660.98,-1.71],"6-15-33":[-5517.77,-1.49],"5-7-16":[-5517.77,4.38],"6-15-34":[-5355.58,-2.12],"6-15-35":[-5221.35,-2.93],"5-7-17":[-5384.02,1253.85],"4-3-8":[-7447.7,1253.85],"6-15-36":[-5945.39,-4.46],"6-15-37":[-5896.5,-7.9],"5-7-18":[-6344.65,11.81],"6-15-38":[-5714.69,7.98],"6-15-39":[-5642.41,16.82],"5-7-19":[-5795.76,29.28],"4-3-9":[-6776.68,29.28],"3-1-4":[-7447.7,4224.65],"6-15-40":[-5681.96,210.54],"6-15-41":[-5264.79,-11.38],"5-7-20":[-6003.76,210.54],"6-15-42":[-5490.76,-10.1],"6-15-43":[-6114.44,-10.22],"5-7-21":[-6114.44,-7.63],"4-3-10":[-6633.54,367.1],"6-15-44":[-5810.62,-10.28],"6-15-45":[-6078.66,-10.38],"5-7-22":[-6456.24,-9.44],"6-15-46":[-5516.56,-12.05],"6-15-47":[-5004.1,-13.68],"5-7-23":[-5960.56,-11.59],"4-3-11":[-6456.24,-5.68],"3-1-5":[-7036.1,399.3],"2-0-2":[-8051.96,4224.65],"6-15-48":[-4386.38,-15.28],"6-15-49":[-4351.89,-16.57],"5-7-24":[-4721.83,-14.96],"6-15-50":[-3798.21,-17.93],"6-15-51":[-3479.92,-17.17],"5-7-25":[-3984.97,-17.15],"4-3-12":[-6709.55,-13.01],"6-15-52":[-3159.54,4170.48],"6-15-53":[-822.27,3102.72],"5-7-26":[-3668.18,5828.29],"6-15-54":[-79.48,2084.36],"6-15-55":[-91.99,2173.62],"5-7-27":[-94.24,2178.34],"4-3-13":[-4852.85,5828.29],"3-1-6":[-8103.44,6095.63],"6-15-56":[-143.51,1622.37],"6-15-57":[-2992.58,-47.94],"5-7-28":[-3334.1,1622.37],"6-15-58":[-3641,1582.81],"6-15-59":[-3753.24,3280.76],"5-7-29":[-3805.12,3280.76],"4-3-14":[-3893.84,3280.76],"6-15-60":[-3755.03,1055.95],"6-15-61":[-3729.99,583.66],"5-7-30":[-3800.65,1055.95],"6-15-62":[-2999.82,3299.77],"6-15-63":[-4222.86,2899.4],"5-7-31":[-4227.36,3299.77],"4-3-15":[-4227.36,3299.77],"3-1-7":[-4243.39,3797.09],"2-0-3":[-8103.44,6095.63],"6-16-0":[-250.92,1810.14],"6-16-1":[-1292.23,3415.68],"6-16-2":[-1365.82,18.81],"6-16-3":[-1466.32,3.62],"6-16-4":[-1138.15,2724.76],"6-16-5":[-3589.89,2752.29],"6-16-6":[-4465.85,-2.92],"6-16-7":[-4699.29,358.63],"6-16-8":[-5027.84,2700.74],"6-16-9":[-5450.75,2379.96],"6-16-10":[-5052.16,2349.52],"6-16-11":[-4766.48,3089.83],"6-16-12":[-5372.47,1191.79],"6-16-13":[-5318.08,1099.24],"6-16-14":[-5414.76,-15.25],"6-16-15":[-6829.25,-21.82],"6-16-16":[-6240.03,-27.45],"6-16-17":[-5540.11,-31.05],"6-16-18":[-5487.51,-35.86],"6-16-19":[-5353.62,20.74],"6-16-20":[-5006.12,-34.53],"6-16-21":[-4672.99,-33.65],"6-16-22":[-4556.55,-33.08],"6-16-23":[-4527.94,2112.46],"6-16-24":[-4781.49,-31.17],"6-16-25":[-4721.21,-29.12],"6-16-26":[-4621.98,-25.12],"6-16-27":[-4958.22,-22.61],"6-16-28":[-4911.16,-18.47],"6-16-29":[-5018.64,-14.42],"6-16-30":[-5681.41,-9.88],"6-16-31":[-4890.89,-7.01],"6-16-32":[-4847.19,-5.38],"6-16-33":[-4875.66,-5.07],"6-16-34":[-5164.7,-4.9],"6-16-35":[-6115.42,-5.38],"6-16-36":[-5822.7,-6.96],"6-16-37":[-6357.23,-9.38],"6-16-38":[-5707.43,-10.64],"6-16-39":[-5588.39,-10.88],"6-16-40":[-5367.6,395.5],"6-16-41":[-5450.06,-12.58],"6-16-42":[-5481.79,-11.89],"6-16-43":[-5542.03,-11.48],"6-16-44":[-6548.04,-10.73],"6-16-45":[-5665.39,-11.64],"6-16-46":[-5185,-12.42],"6-16-47":[-4202.64,-13.83],"6-16-48":[-4574.57,-14.63],"6-16-49":[-5094.21,-15.29],"6-16-50":[-3625.99,971.36],"6-16-51":[-3183.7,1215.57],"6-16-52":[-870.18,2897.13],"6-16-53":[-67.1,2248.84],"6-16-54":[-78.95,2468.64],"6-16-55":[-88.41,2460.72],"6-16-56":[-94.87,332.64],"6-16-57":[-2771.85,-36.44],"6-16-58":[-3499.69,2780.28],"6-16-59":[-3699.81,3057.06],"6-16-60":[-3732.88,1251.61],"6-16-61":[-3718.56,729.54],"6-16-62":[-2843.18,3324.73],"6-16-63":[-4214.39,2887.59],"6-17-0":[-199.93,1456.34],"6-17-1":[-1768,3620.15],"5-8-0":[-1768,3620.15],"6-17-2":[-1475.26,19.47],"6-17-3":[-1402.55,3.4],"5-8-1":[-1475.26,19.47],"6-17-4":[-1180.97,1470.8],"6-17-5":[-2625.03,2591.07],"5-8-2":[-3589.89,2752.29],"6-17-6":[-4466.16,-3.57],"6-17-7":[-4549.31,450.81],"5-8-3":[-4699.29,450.81],"6-17-8":[-5008.75,2409.04],"6-17-9":[-5233.55,2941.77],"5-8-4":[-5450.75,2941.77],"6-17-10":[-5119.82,2300.19],"6-17-11":[-4890.47,3041.41],"5-8-5":[-5119.82,3089.83],"6-17-12":[-6658.81,2709.89],"6-17-13":[-4851.18,1110.77],"5-8-6":[-6658.81,2709.89],"6-17-14":[-5821.52,-16.38],"6-17-15":[-5674.88,-22.03],"5-8-7":[-6829.25,-15.25],"6-17-16":[-5851.22,-26.24],"6-17-17":[-5301.91,-30.62],"5-8-8":[-6240.03,-26.24],"6-17-18":[-5466.61,-36.84],"6-17-19":[-5104.24,-38.94],"5-8-9":[-5487.51,20.74],"6-17-20":[-4709.73,-38.14],"6-17-21":[-4666.22,-37.3],"5-8-10":[-5006.12,-33.65],"6-17-22":[-4992.97,-37.32],"6-17-23":[-4460.76,239.39],"5-8-11":[-4992.97,2112.46],"6-17-24":[-4823.9,-36.06],"6-17-25":[-5006.1,-33.99],"5-8-12":[-5006.1,-29.12],"6-17-26":[-4437.45,-31.19],"6-17-27":[-4609.57,-27.45],"5-8-13":[-4958.22,-22.61],"6-17-28":[-4932.8,-23.68],"6-17-29":[-5183.75,-18.06],"5-8-14":[-5183.75,-14.42],"6-17-30":[-5106.77,-13.82],"6-17-31":[-4902.56,-10.34],"5-8-15":[-5681.41,-7.01],"6-17-32":[-4738.9,-8.32],"6-17-33":[-4738.24,-7.81],"5-8-16":[-4875.66,-5.07],"6-17-34":[-5231.72,-7.81],"6-17-35":[-5297.05,-8],"5-8-17":[-6115.42,-4.9],"6-17-36":[-5635.03,-8.25],"6-17-37":[-5415.4,-9.44],"5-8-18":[-6357.23,-6.96],"6-17-38":[-6887.6,-10.07],"6-17-39":[-5911.14,-11.06],"5-8-19":[-6887.6,-10.07],"6-17-40":[-5556.7,315.4],"6-17-41":[-5276.82,-11.32],"5-8-20":[-5556.7,395.5],"6-17-42":[-5701.15,-12.55],"6-17-43":[-5607.75,-11.22],"5-8-21":[-5701.15,-11.22],"6-17-44":[-6593.4,-10.83],"6-17-45":[-5575.85,-11.63],"5-8-22":[-6593.4,-10.73],"6-17-46":[-4741.3,-12.29],"6-17-47":[-4894.74,-13.43],"5-8-23":[-5185,-12.29],"6-17-48":[-4122.26,-14],"6-17-49":[-3621.62,-14.43],"5-8-24":[-5094.21,-14],"6-17-50":[-3957.44,993.74],"6-17-51":[-771.77,2522.54],"5-8-25":[-3957.44,2522.54],"6-17-52":[-216.42,2808.07],"6-17-53":[-64.39,2249.4],"5-8-26":[-870.18,2897.13],"6-17-54":[-75.83,2758.77],"6-17-55":[-84.15,2323.38],"5-8-27":[-88.41,2758.77],"6-17-56":[-89.73,401.81],"6-17-57":[-2441.75,-16.49],"5-8-28":[-2771.85,401.81],"6-17-58":[-2973.68,2730.02],"6-17-59":[-3594.22,2341.32],"5-8-29":[-3699.81,3057.06],"6-17-60":[-3727.72,1350.33],"6-17-61":[-3692.53,803.49],"5-8-30":[-3732.88,1350.33],"6-17-62":[-2811.27,3573.17],"6-17-63":[-4214.39,2879.05],"5-8-31":[-4214.39,3573.17],"6-18-0":[-239.93,1305.63],"6-18-1":[-1961.07,3782.46],"6-18-2":[-1554.87,20.08],"6-18-3":[-1327.79,253.46],"6-18-4":[-1088.12,3239.67],"6-18-5":[-1217.67,3108.19],"6-18-6":[-4824.35,142.08],"6-18-7":[-4475.98,429.97],"6-18-8":[-5097.66,2151.79],"6-18-9":[-5286.88,2614.23],"6-18-10":[-5383.94,2710.75],"6-18-11":[-4674.83,2698.9],"6-18-12":[-6208.63,2746.59],"6-18-13":[-5145.3,2747.57],"6-18-14":[-5330.71,1843.49],"6-18-15":[-5251.84,-22.18],"6-18-16":[-5203.52,-26.44],"6-18-17":[-5196.89,-29.66],"6-18-18":[-5294.47,-35.92],"6-18-19":[-4940.34,-39.87],"6-18-20":[-4969.7,-40.29],"6-18-21":[-4577.18,-40.68],"6-18-22":[-4373.32,-41.38],"6-18-23":[-4278.81,36.16],"6-18-24":[-4720.03,-40.24],"6-18-25":[-5013.32,-38.8],"6-18-26":[-4588.47,-35.89],"6-18-27":[-4400.12,-32.16],"6-18-28":[-5008.64,-27.65],"6-18-29":[-6174.12,-22.1],"6-18-30":[-4934.3,-17.75],"6-18-31":[-4842.18,-14.23],"6-18-32":[-4876.31,-11.43],"6-18-33":[-4758.41,-10.12],"6-18-34":[-5086.71,-9.98],"6-18-35":[-5093.33,-9.16],"6-18-36":[-5155.12,-9.09],"6-18-37":[-5307.78,-8.96],"6-18-38":[-5730.1,-9.07],"6-18-39":[-5129.31,-10.05],"6-18-40":[-5279.34,30.18],"6-18-41":[-5425.68,-10.66],"6-18-42":[-5345.64,-11.58],"6-18-43":[-5141.56,-10.9],"6-18-44":[-5415.73,-10.9],"6-18-45":[-5030.18,-11.37],"6-18-46":[-4788.93,-12.17],"6-18-47":[-4459,-12.57],"6-18-48":[-3487.82,-12.73],"6-18-49":[-3561.32,1575.89],"6-18-50":[-1988.24,2584.28],"6-18-51":[-538.42,2544.16],"6-18-52":[-46.75,2552.9],"6-18-53":[-62.71,2504.4],"6-18-54":[-73.11,2557.92],"6-18-55":[-79.89,2151.24],"6-18-56":[-258.64,398.97],"6-18-57":[-798.4,126.06],"6-18-58":[-1790.31,2750.5],"6-18-59":[-3353.04,2817.84],"6-18-60":[-3629.63,1490.05],"6-18-61":[-3621.66,901.46],"6-18-62":[-2800.02,3682.63],"6-18-63":[-4215.33,2878.07],"6-19-0":[-379.17,1287.38],"6-19-1":[-1593.06,3146.76],"5-9-0":[-1961.07,3782.46],"6-19-2":[-1890.58,20.54],"6-19-3":[-1414.05,2.42],"5-9-1":[-1890.58,253.46],"4-4-0":[-1961.07,3782.46],"6-19-4":[-1211.44,4101.76],"6-19-5":[-1382.71,2119.92],"5-9-2":[-1382.71,4101.76],"6-19-6":[-3876.71,317.55],"6-19-7":[-4530.82,581.34],"5-9-3":[-4824.35,581.34],"4-4-1":[-4824.35,4101.76],"6-19-8":[-4995.54,973.14],"6-19-9":[-5321.16,2480.85],"5-9-4":[-5321.16,2614.23],"6-19-10":[-5607.39,2228.73],"6-19-11":[-4754.48,2929.86],"5-9-5":[-5607.39,2929.86],"4-4-2":[-5607.39,3089.83],"6-19-12":[-6114.42,2399.44],"6-19-13":[-4562,3974.94],"5-9-6":[-6208.63,3974.94],"6-19-14":[-4492.89,2829.29],"6-19-15":[-5013.47,2131.34],"5-9-7":[-5330.71,2829.29],"4-4-3":[-6829.25,3974.94],"6-19-16":[-4953.87,1592.47],"6-19-17":[-4866.48,1595.59],"5-9-8":[-5203.52,1595.59],"6-19-18":[-5637.2,251.63],"6-19-19":[-5637.2,-38.05],"5-9-9":[-5637.2,251.63],"4-4-4":[-6240.03,1595.59],"6-19-20":[-4758.37,-41.29],"6-19-21":[-4461.38,-42.03],"5-9-10":[-4969.7,-40.29],"6-19-22":[-4510.74,-43.78],"6-19-23":[-4246.08,165.38],"5-9-11":[-4510.74,165.38],"4-4-5":[-5006.12,2112.46],"6-19-24":[-4386.55,-43.61],"6-19-25":[-4787.48,-42.14],"5-9-12":[-5013.32,-38.8],"6-19-26":[-4592.84,-39.76],"6-19-27":[-4940.84,-36.36],"5-9-13":[-4940.84,-32.16],"4-4-6":[-5013.32,-22.61],"6-19-28":[-4653.41,-31.27],"6-19-29":[-5351.52,-25.3],"5-9-14":[-6174.12,-22.1],"6-19-30":[-5449.15,-21.14],"6-19-31":[-5024.53,-17.54],"5-9-15":[-5449.15,-14.23],"4-4-7":[-6174.12,-7.01],"6-19-32":[-5169.3,-14.6],"6-19-33":[-5203.96,-12.43],"5-9-16":[-5203.96,-10.12],"6-19-34":[-5208.9,-11.75],"6-19-35":[-5361.21,-9.55],"5-9-17":[-5361.21,-9.16],"4-4-8":[-6115.42,-4.9],"6-19-36":[-5037.02,-8.58],"6-19-37":[-4920.17,-7.73],"5-9-18":[-5307.78,-7.73],"6-19-38":[-5156.8,-7.69],"6-19-39":[-5026.43,-8.18],"5-9-19":[-5730.1,-7.69],"4-4-9":[-6887.6,-6.96],"6-19-40":[-5045.17,0.38],"6-19-41":[-5538.83,-9.49],"5-9-20":[-5538.83,30.18],"6-19-42":[-5356.53,-10.86],"6-19-43":[-5215.62,-10.71],"5-9-21":[-5356.53,-10.71],"4-4-10":[-5701.15,395.5],"6-19-44":[-5127.44,-10.75],"6-19-45":[-5197.76,258.9],"5-9-22":[-5415.73,258.9],"6-19-46":[-4421.91,1557.91],"6-19-47":[-3471,1551.49],"5-9-23":[-4788.93,1557.91],"4-4-11":[-6593.4,1557.91],"6-19-48":[-3140.15,2121.88],"6-19-49":[-2469.93,2675.95],"5-9-24":[-3561.32,2675.95],"6-19-50":[-626.92,3796.99],"6-19-51":[-37.03,2275.43],"5-9-25":[-1988.24,3796.99],"4-4-12":[-5094.21,3796.99],"6-19-52":[-44.46,2778.85],"6-19-53":[-60.61,2131.71],"5-9-26":[-62.71,2778.85],"6-19-54":[-69.03,2392.98],"6-19-55":[-75.62,968.87],"5-9-27":[-79.89,2557.92],"4-4-13":[-870.18,2897.13],"6-19-56":[-347.17,572.32],"6-19-57":[-601.74,288.87],"5-9-28":[-798.4,572.32],"6-19-58":[-515.17,2986.57],"6-19-59":[-2994.68,3530.83],"5-9-29":[-3353.04,3530.83],"4-4-14":[-3699.81,3530.83],"6-19-60":[-3551.26,1514.1],"6-19-61":[-3519.87,956.54],"5-9-30":[-3629.63,1514.1],"6-19-62":[-2747.86,3114.64],"6-19-63":[-4214.39,2878.57],"5-9-31":[-4215.33,3682.63],"4-4-15":[-4215.33,3682.63],"6-20-0":[-417.32,1224.41],"6-20-1":[-1370.96,2452.93],"6-20-2":[-1973.46,20.82],"6-20-3":[-1633.9,2.38],"6-20-4":[-1302.3,1894.43],"6-20-5":[-1304.79,801.61],"6-20-6":[-3626.95,693.54],"6-20-7":[-4536.9,842.66],"6-20-8":[-5055.43,662.44],"6-20-9":[-5264.21,1501.83],"6-20-10":[-5515.35,1335.36],"6-20-11":[-5331.65,2410.7],"6-20-12":[-6105.34,2580.47],"6-20-13":[-4265.75,3118.01],"6-20-14":[-4519.48,3265.41],"6-20-15":[-4565.58,4373.52],"6-20-16":[-4835.84,3180.62],"6-20-17":[-4743.31,4292.74],"6-20-18":[-6588.28,2093.71],"6-20-19":[-4944.06,1757.21],"6-20-20":[-4796.65,-39.45],"6-20-21":[-4565.81,-41.79],"6-20-22":[-4128.01,-44.7],"6-20-23":[-3987,-46.27],"6-20-24":[-4050.55,-46.25],"6-20-25":[-4341.52,-44.61],"6-20-26":[-4080.21,-43],"6-20-27":[-4829.5,-39.48],"6-20-28":[-5119.06,-34.42],"6-20-29":[-5269.86,-28.53],"6-20-30":[-4689.02,-24.48],"6-20-31":[-4770.8,-20.85],"6-20-32":[-5202.52,-17.01],"6-20-33":[-4890.99,-14.29],"6-20-34":[-5023.56,-12.23],"6-20-35":[-4964.45,-9.38],"6-20-36":[-4986.97,-7.52],"6-20-37":[-4880.33,-6.21],"6-20-38":[-4961.7,-6.04],"6-20-39":[-4755.38,-6.16],"6-20-40":[-4689.63,-6.82],"6-20-41":[-4833.3,-7.83],"6-20-42":[-4861.26,-9.86],"6-20-43":[-4844.73,-10.66],"6-20-44":[-5134.28,1750.54],"6-20-45":[-3868.94,2051.18],"6-20-46":[-46.03,4249.41],"6-20-47":[-44.93,3135.77],"6-20-48":[-291.98,4326.16],"6-20-49":[-419.89,3212.16],"6-20-50":[-26.04,3002.43],"6-20-51":[-35.46,2455.47],"6-20-52":[-44.23,2254.26],"6-20-53":[-59.19,1409.29],"6-20-54":[-66.26,1525.83],"6-20-55":[-73.37,629.49],"6-20-56":[-489.3,852.51],"6-20-57":[-671.27,681.52],"6-20-58":[-552.12,1956.61],"6-20-59":[-2448.23,2297.87],"6-20-60":[-3307.66,1535.12],"6-20-61":[-3393.94,1063],"6-20-62":[-2705,2865.19],"6-20-63":[-4214.39,2878.57],"6-21-0":[-337.42,1346.84],"6-21-1":[-1233.6,2030.55],"5-10-0":[-1370.96,2452.93],"6-21-2":[-1772.55,89.14],"6-21-3":[-1871.86,2.72],"5-10-1":[-1973.46,89.14],"6-21-4":[-2467.23,2541.55],"6-21-5":[-1623.25,454.87],"5-10-2":[-2467.23,2541.55],"6-21-6":[-3359.57,413.74],"6-21-7":[-4538.31,781.37],"5-10-3":[-4538.31,842.66],"6-21-8":[-5075.96,696.58],"6-21-9":[-5249.7,880.39],"5-10-4":[-5264.21,1501.83],"6-21-10":[-5445.64,833.93],"6-21-11":[-5899.2,1099.39],"5-10-5":[-5899.2,2410.7],"6-21-12":[-4299.21,3253.8],"6-21-13":[-3763.46,3939.1],"5-10-6":[-6105.34,3939.1],"6-21-14":[-4281.45,2946.16],"6-21-15":[-4207.65,2851.96],"5-10-7":[-4565.58,4373.52],"6-21-16":[-4394.17,2953.97],"6-21-17":[-5603.84,3100.13],"5-10-8":[-5603.84,4292.74],"6-21-18":[-5251.97,4387.58],"6-21-19":[-4621.58,4242],"5-10-9":[-6588.28,4387.58],"6-21-20":[-4530.92,610.58],"6-21-21":[-4249.27,1248.21],"5-10-10":[-4796.65,1248.21],"6-21-22":[-4100.77,-43.26],"6-21-23":[-3917.92,-45.42],"5-10-11":[-4128.01,-43.26],"6-21-24":[-3839.51,-46.3],"6-21-25":[-4146.3,-45.23],"5-10-12":[-4341.52,-44.61],"6-21-26":[-4034.73,-43.77],"6-21-27":[-4622.19,-40.96],"5-10-13":[-4829.5,-39.48],"6-21-28":[-5026.68,-36.11],"6-21-29":[-4710.14,-30.73],"5-10-14":[-5269.86,-28.53],"6-21-30":[-4711.56,-26.83],"6-21-31":[-4649.73,-22.8],"5-10-15":[-4770.8,-20.85],"6-21-32":[-5165.04,-18.67],"6-21-33":[-5124.61,-15.13],"5-10-16":[-5202.52,-14.29],"6-21-34":[-4928.38,-12.89],"6-21-35":[-4817.72,-9.33],"5-10-17":[-5023.56,-9.33],"6-21-36":[-4751.47,-6.07],"6-21-37":[-4705.07,-4.67],"5-10-18":[-4986.97,-4.67],"6-21-38":[-4736.47,-4.21],"6-21-39":[-4814.85,-4.21],"5-10-19":[-4961.7,-4.21],"6-21-40":[-4826.11,-5.08],"6-21-41":[-5135.13,-6.52],"5-10-20":[-5135.13,-5.08],"6-21-42":[-5265.07,1190.2],"6-21-43":[-4590.1,596.6],"5-10-21":[-5265.07,1190.2],"6-21-44":[-2985.45,4155.23],"6-21-45":[-26.05,4282.35],"5-10-22":[-5134.28,4282.35],"6-21-46":[-26.03,3002.91],"6-21-47":[-24,2907.88],"5-10-23":[-46.03,4249.41],"6-21-48":[-22.24,2814],"6-21-49":[-21.6,2800.67],"5-10-24":[-419.89,4326.16],"6-21-50":[-23.2,3778.63],"6-21-51":[-31.43,3065.26],"5-10-25":[-35.46,3778.63],"6-21-52":[-42.02,1088.13],"6-21-53":[-56.28,798.49],"5-10-26":[-59.19,2254.26],"6-21-54":[-63.59,815.62],"6-21-55":[-71.43,688.52],"5-10-27":[-73.37,1525.83],"6-21-56":[-537.59,775.33],"6-21-57":[-441.32,399.72],"5-10-28":[-671.27,852.51],"6-21-58":[-523.41,1699.95],"6-21-59":[-1766.91,2538.05],"5-10-29":[-2448.23,2538.05],"6-21-60":[-3331.72,1626.41],"6-21-61":[-3355.23,1241.73],"5-10-30":[-3393.94,1626.41],"6-21-62":[-2622.98,2638.67],"6-21-63":[-4214.39,2874.63],"5-10-31":[-4214.39,2878.57],"6-22-0":[-398.63,1167.08],"6-22-1":[-651.33,2264.33],"6-22-2":[-1498.06,363.46],"6-22-3":[-1848.36,1220.89],"6-22-4":[-2407.5,3509.49],"6-22-5":[-1967.05,3362.6],"6-22-6":[-3532.52,562.23],"6-22-7":[-4708.86,561.11],"6-22-8":[-5102.62,731.19],"6-22-9":[-5406.44,633.28],"6-22-10":[-5616.21,980.63],"6-22-11":[-5777.27,953.84],"6-22-12":[-4339.32,1945.45],"6-22-13":[-3575.12,3751.07],"6-22-14":[-5353.78,3467.23],"6-22-15":[-3948.99,2981.68],"6-22-16":[-4230.11,2953.81],"6-22-17":[-4698.67,3455.03],"6-22-18":[-4417.21,3616.13],"6-22-19":[-4614.73,3677.07],"6-22-20":[-4612.07,3055.54],"6-22-21":[-4169.26,2579.5],"6-22-22":[-4121.9,227.36],"6-22-23":[-4832.83,-36.74],"6-22-24":[-4589.1,-43.31],"6-22-25":[-6924.66,-42.61],"6-22-26":[-3909.53,-41.08],"6-22-27":[-4173.36,-38.63],"6-22-28":[-5079.89,-34.92],"6-22-29":[-4716.43,-31.11],"6-22-30":[-4620.67,-27.03],"6-22-31":[-4566.09,-23.61],"6-22-32":[-4502.76,-19.66],"6-22-33":[-4557.38,-15.78],"6-22-34":[-4533.81,-12.28],"6-22-35":[-4814.45,-8],"6-22-36":[-4853.38,-4.62],"6-22-37":[-4430.16,-3.04],"6-22-38":[-4409.56,-2.78],"6-22-39":[-4975.84,-2.97],"6-22-40":[-4329.8,195.98],"6-22-41":[-4894.06,155.36],"6-22-42":[-4774.93,2577.48],"6-22-43":[-2521.79,3006.53],"6-22-44":[-112.74,3560.31],"6-22-45":[-107.66,3555.42],"6-22-46":[-25.48,3327.82],"6-22-47":[-23.5,2834],"6-22-48":[-21.38,2971.69],"6-22-49":[-20.27,3240.49],"6-22-50":[-22.59,3550.72],"6-22-51":[-29.7,1888.48],"6-22-52":[-41.54,948.84],"6-22-53":[-53.67,976.63],"6-22-54":[-61.27,681.33],"6-22-55":[-68.78,730.22],"6-22-56":[-498.55,541.09],"6-22-57":[-457.73,551.22],"6-22-58":[-534.91,3383.56],"6-22-59":[-664.24,3626.49],"6-22-60":[-2942.53,1694.94],"6-22-61":[-3274.61,1432.98],"6-22-62":[-2650.99,2576.08],"6-22-63":[-4214.39,2863.29],"6-23-0":[-421.11,1136.69],"6-23-1":[-833.08,2882.18],"5-11-0":[-833.08,2882.18],"6-23-2":[-1737.91,525.6],"6-23-3":[-2333.53,9.47],"5-11-1":[-2333.53,1220.89],"4-5-0":[-2333.53,2882.18],"6-23-4":[-2030.12,2135.73],"6-23-5":[-2116.36,1778.2],"5-11-2":[-2407.5,3509.49],"6-23-6":[-3602.71,628.59],"6-23-7":[-4632.63,437.77],"5-11-3":[-4708.86,628.59],"4-5-1":[-4708.86,3509.49],"3-2-0":[-4824.35,4101.76],"6-23-8":[-5155.37,620.34],"6-23-9":[-5302.33,595],"5-11-4":[-5406.44,731.19],"6-23-10":[-5557.74,952.89],"6-23-11":[-5636.66,969.04],"5-11-5":[-5777.27,980.63],"4-5-2":[-5899.2,2410.7],"6-23-12":[-4315.7,1217.71],"6-23-13":[-3848.72,3152.73],"5-11-6":[-4339.32,3751.07],"6-23-14":[-5731.78,3396.83],"6-23-15":[-3515.08,3385.15],"5-11-7":[-5731.78,3467.23],"4-5-3":[-6105.34,4373.52],"3-2-1":[-6829.25,4373.52],"6-23-16":[-3720.8,3846.98],"6-23-17":[-3729.31,3659.45],"5-11-8":[-4698.67,3846.98],"6-23-18":[-3857.79,3960.27],"6-23-19":[-4665.03,2781.72],"5-11-9":[-4665.03,3960.27],"4-5-4":[-6588.28,4387.58],"6-23-20":[-4586.57,2074.25],"6-23-21":[-3908.44,2324.4],"5-11-10":[-4612.07,3055.54],"6-23-22":[-4234.4,1902.28],"6-23-23":[-4248.98,-37.16],"5-11-11":[-4832.83,1902.28],"4-5-5":[-4832.83,3055.54],"3-2-2":[-6588.28,4387.58],"6-23-24":[-4096.4,-38.53],"6-23-25":[-3684.54,238.06],"5-11-12":[-6924.66,238.06],"6-23-26":[-4079.58,-36.65],"6-23-27":[-4195.46,-34.81],"5-11-13":[-4195.46,-34.81],"4-5-6":[-6924.66,238.06],"6-23-28":[-5581.2,-32.08],"6-23-29":[-5226.21,-29.04],"5-11-14":[-5581.2,-29.04],"6-23-30":[-4536.94,-25.29],"6-23-31":[-4550.37,-21.98],"5-11-15":[-4620.67,-21.98],"4-5-7":[-5581.2,-20.85],"3-2-3":[-6924.66,238.06],"6-23-32":[-4255.85,-18.42],"6-23-33":[-4442.94,-15],"5-11-16":[-4557.38,-15],"6-23-34":[-5616.78,-10.65],"6-23-35":[-4625.81,-6.84],"5-11-17":[-5616.78,-6.84],"4-5-8":[-5616.78,-6.84],"6-23-36":[-4390.47,-3.94],"6-23-37":[-4586.73,-2.35],"5-11-18":[-4853.38,-2.35],"6-23-38":[-4741.58,182.06],"6-23-39":[-4374.02,-2.19],"5-11-19":[-4975.84,182.06],"4-5-9":[-4986.97,182.06],"3-2-4":[-6887.6,182.06],"6-23-40":[-4592.1,-3.43],"6-23-41":[-4363.36,1835.28],"5-11-20":[-4894.06,1835.28],"6-23-42":[-1649.44,2317.4],"6-23-43":[-253.34,2074.33],"5-11-21":[-4774.93,3006.53],"4-5-10":[-5265.07,3006.53],"6-23-44":[-22.86,2716.48],"6-23-45":[-23.63,3833.28],"5-11-22":[-112.74,3833.28],"6-23-46":[-23.44,3527.63],"6-23-47":[-22.17,3624.57],"5-11-23":[-25.48,3624.57],"4-5-11":[-5134.28,4282.35],"3-2-5":[-6593.4,4282.35],"6-23-48":[-20.39,3270.25],"6-23-49":[-21.17,3156.76],"5-11-24":[-21.38,3270.25],"6-23-50":[-23.21,2985.77],"6-23-51":[-30.13,1202.75],"5-11-25":[-30.13,3550.72],"4-5-12":[-419.89,4326.16],"6-23-52":[-43.45,965.03],"6-23-53":[-51.53,945.27],"5-11-26":[-53.67,976.63],"6-23-54":[-58.95,477.09],"6-23-55":[-65.3,616.4],"5-11-27":[-68.78,730.22],"4-5-13":[-73.37,2254.26],"3-2-6":[-5094.21,4326.16],"6-23-56":[-381.19,424.76],"6-23-57":[-248.43,630.55],"5-11-28":[-498.55,630.55],"6-23-58":[-530.93,2010.01],"6-23-59":[-510.12,2194.6],"5-11-29":[-664.24,3626.49],"4-5-14":[-2448.23,3626.49],"6-23-60":[-2788.93,1763.02],"6-23-61":[-3206.53,1638.58],"5-11-30":[-3274.61,1763.02],"6-23-62":[-2569.85,2755.16],"6-23-63":[-4214.39,2834.96],"5-11-31":[-4214.39,2863.29],"4-5-15":[-4214.39,2878.57],"3-2-7":[-4215.33,3682.63],"6-24-0":[-444.11,1186.8],"6-24-1":[-1081.56,1860.38],"6-24-2":[-884.27,780.39],"6-24-3":[-2481.46,11.12],"6-24-4":[-1806.9,3362.09],"6-24-5":[-1623.32,2494.83],"6-24-6":[-3546.49,637.43],"6-24-7":[-4475.39,369.52],"6-24-8":[-5232.42,618.66],"6-24-9":[-5302.19,643.83],"6-24-10":[-5599.09,442.7],"6-24-11":[-5552.22,841.05],"6-24-12":[-4529.43,849.8],"6-24-13":[-4302.91,1071.09],"6-24-14":[-4466.8,2114.96],"6-24-15":[-3366.56,3889.28],"6-24-16":[-3659.9,4191.26],"6-24-17":[-3400.71,4109.88],"6-24-18":[-3545.38,3690.6],"6-24-19":[-4815.26,3824.21],"6-24-20":[-4264.88,3235.29],"6-24-21":[-3729.77,2589.58],"6-24-22":[-4007.02,1702.94],"6-24-23":[-5911.74,2045.21],"6-24-24":[-4035.63,-33.29],"6-24-25":[-4136.33,268.06],"6-24-26":[-4161.32,-31.52],"6-24-27":[-5001.37,-29.62],"6-24-28":[-4128.07,-28.02],"6-24-29":[-4975.29,-25.65],"6-24-30":[-4578.48,-23.11],"6-24-31":[-4349.57,-20.2],"6-24-32":[-4541,-17.27],"6-24-33":[-4341.2,-13.42],"6-24-34":[-4969.11,-9.91],"6-24-35":[-4622.82,-6.43],"6-24-36":[-6027.68,-3.86],"6-24-37":[-4987.2,-2.32],"6-24-38":[-4501.51,906.1],"6-24-39":[-4247.65,-2.13],"6-24-40":[-3703.92,2006.2],"6-24-41":[-3317.83,1625.93],"6-24-42":[-1102.76,2496.57],"6-24-43":[-20.18,3193.33],"6-24-44":[-21.4,3709.46],"6-24-45":[-21.96,3624.72],"6-24-46":[-21.96,3997.5],"6-24-47":[-20.69,3958.09],"6-24-48":[-19.53,3750.79],"6-24-49":[-21.86,2056.55],"6-24-50":[-23.63,1056.01],"6-24-51":[-30.13,836.55],"6-24-52":[-42.54,834.09],"6-24-53":[-50.73,423.69],"6-24-54":[-56.68,479.95],"6-24-55":[-62.37,620.69],"6-24-56":[-397.73,366.7],"6-24-57":[-327.26,618.35],"6-24-58":[-578.4,2438.84],"6-24-59":[-539.33,3441.15],"6-24-60":[-2590.64,1871.81],"6-24-61":[-3123.2,1816.7],"6-24-62":[-2650.65,2575.14],"6-24-63":[-4214.39,2813.19],"6-25-0":[-303.71,1053.33],"6-25-1":[-651.82,1708.98],"5-12-0":[-1081.56,1860.38],"6-25-2":[-922.35,1020.06],"6-25-3":[-2433.51,33.82],"5-12-1":[-2481.46,1020.06],"6-25-4":[-1734.73,293.97],"6-25-5":[-1461.69,334.46],"5-12-2":[-1806.9,3362.09],"6-25-6":[-3803.3,387.52],"6-25-7":[-4628.98,308.5],"5-12-3":[-4628.98,637.43],"6-25-8":[-5084.99,598.61],"6-25-9":[-5252.45,600.19],"5-12-4":[-5302.19,643.83],"6-25-10":[-5484.86,610.76],"6-25-11":[-5604.4,613.75],"5-12-5":[-5604.4,841.05],"6-25-12":[-4715.59,741.32],"6-25-13":[-4517.04,852.58],"5-12-6":[-4715.59,1071.09],"6-25-14":[-4478.47,2093.28],"6-25-15":[-3966.59,3842.68],"5-12-7":[-4478.47,3889.28],"6-25-16":[-3770.45,4204.45],"6-25-17":[-3937.86,3751.43],"5-12-8":[-3937.86,4204.45],"6-25-18":[-4104.8,4348.39],"6-25-19":[-5472.45,3458.34],"5-12-9":[-5472.45,4348.39],"6-25-20":[-5358.88,3295.69],"6-25-21":[-3924,3091.23],"5-12-10":[-5358.88,3295.69],"6-25-22":[-4181.74,3268.31],"6-25-23":[-4107.01,2081.23],"5-12-11":[-5911.74,3268.31],"6-25-24":[-4139.43,-28.52],"6-25-25":[-4417.91,-26.44],"5-12-12":[-4417.91,268.06],"6-25-26":[-4796.18,-25.22],"6-25-27":[-3903.47,-24.16],"5-12-13":[-5001.37,-24.16],"6-25-28":[-4620.9,-15.52],"6-25-29":[-4156.21,-22.31],"5-12-14":[-4975.29,-15.52],"6-25-30":[-4696.61,-20.5],"6-25-31":[-4184.51,-18.74],"5-12-15":[-4696.61,-18.74],"6-25-32":[-4009.76,-16.22],"6-25-33":[-4172.12,-12.95],"5-12-16":[-4541,-12.95],"6-25-34":[-4842.46,-9.78],"6-25-35":[-5609.97,98.48],"5-12-17":[-5609.97,98.48],"6-25-36":[-5165.76,-4.01],"6-25-37":[-5237.78,-2.5],"5-12-18":[-6027.68,-2.32],"6-25-38":[-5867.09,-2.18],"6-25-39":[-5887.61,-2.3],"5-12-19":[-5887.61,906.1],"6-25-40":[-3836.87,2005.22],"6-25-41":[-2624.66,3194.32],"5-12-20":[-3836.87,3194.32],"6-25-42":[-16.08,3023.14],"6-25-43":[-18.48,3241.73],"5-12-21":[-1102.76,3241.73],"6-25-44":[-19.58,3410.37],"6-25-45":[-20.51,4171.18],"5-12-22":[-21.96,4171.18],"6-25-46":[-20.66,3695.94],"6-25-47":[-19.83,4048.21],"5-12-23":[-21.96,4048.21],"6-25-48":[-19.6,3764.34],"6-25-49":[-22.09,1976.48],"5-12-24":[-22.09,3764.34],"6-25-50":[-24.31,843.14],"6-25-51":[-29.53,749.28],"5-12-25":[-30.13,1056.01],"6-25-52":[-38.65,583.75],"6-25-53":[-48.88,527.66],"5-12-26":[-50.73,834.09],"6-25-54":[-53.27,454.9],"6-25-55":[-321.18,564.64],"5-12-27":[-321.18,620.69],"6-25-56":[-365.61,281.37],"6-25-57":[-401.21,416.56],"5-12-28":[-401.21,618.35],"6-25-58":[-659.6,821.96],"6-25-59":[-553.58,1676.69],"5-12-29":[-659.6,3441.15],"6-25-60":[-2291.56,1996.28],"6-25-61":[-3041.73,1996.28],"5-12-30":[-3123.2,1996.28],"6-25-62":[-2813.69,2606.34],"6-25-63":[-4215.39,2795.26],"5-12-31":[-4215.39,2813.19],"6-26-0":[-439.71,1000.01],"6-26-1":[-730.5,1772.1],"6-26-2":[-897.49,2298.54],"6-26-3":[-1713.07,281.71],"6-26-4":[-1913.82,308.77],"6-26-5":[-1684.72,381.74],"6-26-6":[-3787.14,317.75],"6-26-7":[-4740.18,215.89],"6-26-8":[-5062.53,571.32],"6-26-9":[-5238.49,565.77],"6-26-10":[-6488.99,599.94],"6-26-11":[-6644.9,611.84],"6-26-12":[-4903.49,731.39],"6-26-13":[-5400.04,749.4],"6-26-14":[-4879.74,993.24],"6-26-15":[-4103.16,1446.2],"6-26-16":[-4120.52,3114.6],"6-26-17":[-4230.7,4338.56],"6-26-18":[-4413.49,4383.25],"6-26-19":[-5096.75,3998.98],"6-26-20":[-4111.25,3617.02],"6-26-21":[-3860.99,2970.04],"6-26-22":[-4545.1,3258.01],"6-26-23":[-4215.41,3307.88],"6-26-24":[-4394.09,2734.41],"6-26-25":[-4782.29,2861.69],"6-26-26":[-5685.17,-18.54],"6-26-27":[-4949.82,-18.19],"6-26-28":[-5202.13,-18.13],"6-26-29":[-4328.88,-18.06],"6-26-30":[-4889.01,-17.73],"6-26-31":[-4042.13,-17.02],"6-26-32":[-3932.99,-15.49],"6-26-33":[-4611.24,-12.9],"6-26-34":[-4215.41,-10],"6-26-35":[-4437.77,-7.31],"6-26-36":[-4454.44,-4.66],"6-26-37":[-4569.44,-3.18],"6-26-38":[-5094.37,2826.68],"6-26-39":[-4696.56,2654.65],"6-26-40":[-1698.12,3217.88],"6-26-41":[-10.71,3238.99],"6-26-42":[-14.63,2817.94],"6-26-43":[-16.88,3502.89],"6-26-44":[-18.57,3901.67],"6-26-45":[-19.41,4305.19],"6-26-46":[-19.51,4229.83],"6-26-47":[-18.58,3014],"6-26-48":[-19.11,1409.63],"6-26-49":[-22.08,981.78],"6-26-50":[-24.14,734.9],"6-26-51":[-29.38,727.51],"6-26-52":[-38.33,598.01],"6-26-53":[-46.19,511.34],"6-26-54":[-51.2,426.83],"6-26-55":[-57.5,452.88],"6-26-56":[-155.67,204.81],"6-26-57":[-311.85,196.31],"6-26-58":[-599.85,881.64],"6-26-59":[-578.3,1748.55],"6-26-60":[-1765.96,2076.65],"6-26-61":[-2851.24,2181.07],"6-26-62":[-2859.69,2606.49],"6-26-63":[-4215.39,2777.84],"6-27-0":[-553.59,784.94],"6-27-1":[-488.74,1493.87],"5-13-0":[-730.5,1772.1],"6-27-2":[-1148.95,2712.56],"6-27-3":[-2045.61,320.5],"5-13-1":[-2045.61,2712.56],"4-6-0":[-2481.46,2712.56],"6-27-4":[-2032.29,372.69],"6-27-5":[-1445.53,449.81],"5-13-2":[-2032.29,449.81],"6-27-6":[-3787.98,283.15],"6-27-7":[-4721.05,117.7],"5-13-3":[-4740.18,317.75],"4-6-1":[-4740.18,3362.09],"6-27-8":[-5023.3,325.53],"6-27-9":[-5311.91,428.65],"5-13-4":[-5311.91,571.32],"6-27-10":[-6550.67,567.14],"6-27-11":[-5322.93,510.84],"5-13-5":[-6644.9,611.84],"4-6-2":[-6644.9,841.05],"6-27-12":[-5100.87,779.83],"6-27-13":[-4957,797.9],"5-13-6":[-5400.04,797.9],"6-27-14":[-4562.1,843.62],"6-27-15":[-4900.36,1208.11],"5-13-7":[-4900.36,1446.2],"4-6-3":[-5400.04,3889.28],"6-27-16":[-4715.92,2194.75],"6-27-17":[-6020.76,1798.51],"5-13-8":[-6020.76,4338.56],"6-27-18":[-4494.59,2635.83],"6-27-19":[-4926.46,2159.53],"5-13-9":[-5096.75,4383.25],"4-6-4":[-6020.76,4383.25],"6-27-20":[-4552.08,1925.95],"6-27-21":[-3967.39,2697.84],"5-13-10":[-4552.08,3617.02],"6-27-22":[-4104.46,2999.92],"6-27-23":[-4228.95,3424.3],"5-13-11":[-4545.1,3424.3],"4-6-5":[-5911.74,3617.02],"6-27-24":[-4620.51,3479.94],"6-27-25":[-4583.52,4234.29],"5-13-12":[-4782.29,4234.29],"6-27-26":[-5549.86,-13],"6-27-27":[-5063.91,-12.54],"5-13-13":[-5685.17,-12.54],"4-6-6":[-5685.17,4234.29],"6-27-28":[-5516.32,-12.85],"6-27-29":[-5126.11,-13.41],"5-13-14":[-5516.32,-12.85],"6-27-30":[-4940.44,-14.09],"6-27-31":[-3922.85,-14.93],"5-13-15":[-4940.44,-14.09],"4-6-7":[-5516.32,-12.85],"6-27-32":[-10287.73,-14.66],"6-27-33":[-3838.8,-13.29],"5-13-16":[-10287.73,-12.9],"6-27-34":[-3952.86,-11.02],"6-27-35":[-4397.75,-9.21],"5-13-17":[-4437.77,-7.31],"4-6-8":[-10287.73,98.48],"6-27-36":[-3846.19,-6.32],"6-27-37":[-5411.31,-4.11],"5-13-18":[-5411.31,-3.18],"6-27-38":[-5381.88,4089.29],"6-27-39":[-7.82,3353.19],"5-13-19":[-5381.88,4089.29],"4-6-9":[-6027.68,4089.29],"6-27-40":[-6.36,3366.29],"6-27-41":[-8.91,2906.92],"5-13-20":[-1698.12,3366.29],"6-27-42":[-12.62,2615.39],"6-27-43":[-14.88,1857.98],"5-13-21":[-16.88,3502.89],"4-6-10":[-3836.87,3502.89],"6-27-44":[-15.67,2106.54],"6-27-45":[-17.16,2595.28],"5-13-22":[-19.41,4305.19],"6-27-46":[-17.14,1790.4],"6-27-47":[-16.64,2157.81],"5-13-23":[-19.51,4229.83],"4-6-11":[-21.96,4305.19],"6-27-48":[-18.13,1197.65],"6-27-49":[-20.76,806.78],"5-13-24":[-22.08,1409.63],"6-27-50":[-23.03,796.95],"6-27-51":[-27.57,771.94],"5-13-25":[-29.38,796.95],"4-6-12":[-30.13,3764.34],"6-27-52":[-33.04,487.72],"6-27-53":[-43.05,509.42],"5-13-26":[-46.19,598.01],"6-27-54":[-47.85,403.44],"6-27-55":[-55.33,313.6],"5-13-27":[-57.5,452.88],"4-6-13":[-321.18,834.09],"6-27-56":[-165.48,97.2],"6-27-57":[-389.09,647.09],"5-13-28":[-389.09,647.09],"6-27-58":[-464.97,899.06],"6-27-59":[-578.3,1803.34],"5-13-29":[-599.85,1803.34],"4-6-14":[-659.6,3441.15],"6-27-60":[-1164.05,2159.56],"6-27-61":[-2655.88,2197.16],"5-13-30":[-2851.24,2197.16],"6-27-62":[-2735.67,2581.41],"6-27-63":[-4215.89,2769.5],"5-13-31":[-4215.89,2777.84],"4-6-15":[-4215.89,2813.19],"6-28-0":[-589.49,895.88],"6-28-1":[-904.43,1735],"6-28-2":[-1112.91,1235.69],"6-28-3":[-2043.07,844.52],"6-28-4":[-2281.87,373.55],"6-28-5":[-1363.66,836.38],"6-28-6":[-4066.69,674.51],"6-28-7":[-4710.07,37.53],"6-28-8":[-5012.79,273.39],"6-28-9":[-5266.71,404.25],"6-28-10":[-5706.52,438.24],"6-28-11":[-5494.65,436.49],"6-28-12":[-5263.46,375.47],"6-28-13":[-5318.9,807.5],"6-28-14":[-4751.14,785.89],"6-28-15":[-4761.28,755.87],"6-28-16":[-5205.32,1090.39],"6-28-17":[-6497.54,1115.44],"6-28-18":[-4875.35,1003.31],"6-28-19":[-5278.57,1013.68],"6-28-20":[-4266.28,909.81],"6-28-21":[-4277.75,784.58],"6-28-22":[-4135.64,3697.19],"6-28-23":[-5658.77,3685.36],"6-28-24":[-4615.83,3903.97],"6-28-25":[-4879.2,5379.65],"6-28-26":[-6091.1,1685.03],"6-28-27":[-5229.41,-8.02],"6-28-28":[-5370.65,-9.26],"6-28-29":[-5029.2,-9.53],"6-28-30":[-5149.38,-10.39],"6-28-31":[-3741.68,-11.78],"6-28-32":[-4859.21,-13.08],"6-28-33":[-4605.78,-13.91],"6-28-34":[-3888.71,-12.68],"6-28-35":[-4747.63,-10.25],"6-28-36":[-4599.95,-7.52],"6-28-37":[-5655.38,1591.03],"6-28-38":[-3254.97,5307.64],"6-28-39":[-8.33,3851.97],"6-28-40":[-6.04,3653.33],"6-28-41":[-7.12,3606.16],"6-28-42":[-10.83,781.34],"6-28-43":[-12.78,907.4],"6-28-44":[-13.74,1016.87],"6-28-45":[-14.99,1005.18],"6-28-46":[-15.4,1103.03],"6-28-47":[-15.79,1073.93],"6-28-48":[-15.93,729.34],"6-28-49":[-19.25,738.55],"6-28-50":[-20.66,791.33],"6-28-51":[-24.63,359.46],"6-28-52":[-31.19,426.97],"6-28-53":[-40.85,427.93],"6-28-54":[-45.75,331.13],"6-28-55":[-52.39,260.77],"6-28-56":[-249.03,31.77],"6-28-57":[-291.84,721.39],"6-28-58":[-258.27,799.62],"6-28-59":[-519.66,1812.13],"6-28-60":[-695.6,2299.62],"6-28-61":[-2450.61,2175.98],"6-28-62":[-2467.84,2429.87],"6-28-63":[-4216.39,2761.57],"6-29-0":[-670.41,737.08],"6-29-1":[-665.35,1980.27],"5-14-0":[-904.43,1980.27],"6-29-2":[-1176.89,984.33],"6-29-3":[-2142.75,2066.14],"5-14-1":[-2142.75,2066.14],"6-29-4":[-2246.48,424.86],"6-29-5":[-1485.53,801.98],"5-14-2":[-2281.87,836.38],"6-29-6":[-4086.72,546.17],"6-29-7":[-4691.99,188.06],"5-14-3":[-4710.07,674.51],"6-29-8":[-4933.06,258.97],"6-29-9":[-5287.28,265.48],"5-14-4":[-5287.28,404.25],"6-29-10":[-5484.98,362.54],"6-29-11":[-5715.5,333.9],"5-14-5":[-5715.5,438.24],"6-29-12":[-5465.58,353.36],"6-29-13":[-5431.27,297.08],"5-14-6":[-5465.58,807.5],"6-29-14":[-4814.21,507.51],"6-29-15":[-5139.28,624.77],"5-14-7":[-5139.28,785.89],"6-29-16":[-4901.17,602.11],"6-29-17":[-6258.5,668.28],"5-14-8":[-6497.54,1115.44],"6-29-18":[-4824.97,558.27],"6-29-19":[-4787.72,500.16],"5-14-9":[-5278.57,1013.68],"6-29-20":[-4729.79,489.46],"6-29-21":[-4326.7,534.68],"5-14-10":[-4729.79,909.81],"6-29-22":[-4200.36,197.1],"6-29-23":[-5409.91,1437.08],"5-14-11":[-5658.77,3697.19],"6-29-24":[-4759.9,3376.08],"6-29-25":[-5145.15,5601.19],"5-14-12":[-5145.15,5601.19],"6-29-26":[-5646.48,3710.87],"6-29-27":[-5111.49,-5.43],"5-14-13":[-6091.1,3710.87],"6-29-28":[-5198.68,-5.37],"6-29-29":[-4685.05,-5.8],"5-14-14":[-5370.65,-5.37],"6-29-30":[-4562.98,-7.34],"6-29-31":[-3766.53,-8.54],"5-14-15":[-5149.38,-7.34],"6-29-32":[-4270.36,-11.17],"6-29-33":[-4267.65,-12.92],"5-14-16":[-4859.21,-11.17],"6-29-34":[-4304.77,-12.74],"6-29-35":[-5036.16,-10.37],"5-14-17":[-5036.16,-10.25],"6-29-36":[-4927.2,-7.55],"6-29-37":[-5616.3,3669.89],"5-14-18":[-5655.38,3669.89],"6-29-38":[-1835.13,5523.17],"6-29-39":[-3149.73,3283.09],"5-14-19":[-3254.97,5523.17],"6-29-40":[-3378.56,1345.28],"6-29-41":[-1756.43,193.62],"5-14-20":[-3378.56,3653.33],"6-29-42":[-70.76,507.97],"6-29-43":[-11.27,487.69],"5-14-21":[-70.76,907.4],"6-29-44":[-11.15,502.01],"6-29-45":[-11.69,556.71],"5-14-22":[-14.99,1016.87],"6-29-46":[-12.81,657.33],"6-29-47":[-11.24,593.9],"5-14-23":[-15.79,1103.03],"6-29-48":[-12.87,609.26],"6-29-49":[-15.22,481.25],"5-14-24":[-19.25,738.55],"6-29-50":[-18.28,290.43],"6-29-51":[-22.81,343.35],"5-14-25":[-24.63,791.33],"6-29-52":[-28.28,328.57],"6-29-53":[-37.41,365.55],"5-14-26":[-40.85,427.93],"6-29-54":[-82.28,245.7],"6-29-55":[-48.36,222.95],"5-14-27":[-82.28,331.13],"6-29-56":[-184.27,180.06],"6-29-57":[-496.2,695.16],"5-14-28":[-496.2,721.39],"6-29-58":[-343.95,1067.53],"6-29-59":[-491.39,1825.18],"5-14-29":[-519.66,1825.18],"6-29-60":[-664.28,2484.31],"6-29-61":[-2275.16,2200.25],"5-14-30":[-2450.61,2484.31],"6-29-62":[-2669.75,2364.99],"6-29-63":[-4216.39,2744.46],"5-14-31":[-4216.39,2761.57],"6-30-0":[-683.41,733.6],"6-30-1":[-703.44,2104.03],"6-30-2":[-1390.04,936.6],"6-30-3":[-1958,1609.72],"6-30-4":[-2316.35,717.95],"6-30-5":[-1776.88,1397.15],"6-30-6":[-3459.86,559.29],"6-30-7":[-4646.45,433.78],"6-30-8":[-5124.1,458.53],"6-30-9":[-5123.08,174.74],"6-30-10":[-5282.92,106.11],"6-30-11":[-6403.12,228.76],"6-30-12":[-7162.59,294.27],"6-30-13":[-6116.46,456.57],"6-30-14":[-5551.79,564.92],"6-30-15":[-5146.8,584.49],"6-30-16":[-5033.92,471.28],"6-30-17":[-5140.65,446.09],"6-30-18":[-5034.68,490.81],"6-30-19":[-4387.03,806.41],"6-30-20":[-5194.52,204.36],"6-30-21":[-4444.26,125.4],"6-30-22":[-4421.26,-25.61],"6-30-23":[-4321.97,-25.42],"6-30-24":[-4680.88,-14.04],"6-30-25":[-5059.77,2490.71],"6-30-26":[-4874.36,2540.82],"6-30-27":[-4690.19,-2.77],"6-30-28":[-5085.57,-1.84],"6-30-29":[-4909.25,-2.28],"6-30-30":[-4430.52,-4.28],"6-30-31":[-3787.91,-5.31],"6-30-32":[-3813.24,-8.63],"6-30-33":[-4282.62,-11.24],"6-30-34":[-4055.16,-12.14],"6-30-35":[-4888.98,-9.83],"6-30-36":[-6739.12,-7.4],"6-30-37":[-6668.56,2406.1],"6-30-38":[-2535.05,2428.71],"6-30-39":[-3785.54,-0.38],"6-30-40":[-3944.08,1.26],"6-30-41":[-3640.72,1.53],"6-30-42":[-109.86,126.71],"6-30-43":[-9.48,205.26],"6-30-44":[-9.48,795.12],"6-30-45":[-7.66,480.69],"6-30-46":[-9.07,435.79],"6-30-47":[-9.84,460.48],"6-30-48":[-11.72,559.47],"6-30-49":[-14.44,443.49],"6-30-50":[-16.72,447.4],"6-30-51":[-22.37,278.21],"6-30-52":[-110.99,220.76],"6-30-53":[-173.11,114.06],"6-30-54":[-118.63,158.11],"6-30-55":[-48.98,462.53],"6-30-56":[-132.66,437.71],"6-30-57":[-419.5,576.27],"6-30-58":[-337.86,1562.01],"6-30-59":[-652.43,1824.22],"6-30-60":[-559.27,2275.03],"6-30-61":[-2146.95,2180.52],"6-30-62":[-2620.12,2328.81],"6-30-63":[-4214.89,2744.46],"6-31-0":[-632.33,642.36],"6-31-1":[-1311.87,2619.83],"5-15-0":[-1311.87,2619.83],"6-31-2":[-1670.02,1700.11],"6-31-3":[-1505.89,2250.64],"5-15-1":[-1958,2250.64],"4-7-0":[-2142.75,2619.83],"6-31-4":[-2104.87,1374.08],"6-31-5":[-1565.53,583.45],"5-15-2":[-2316.35,1397.15],"6-31-6":[-3638.82,413.34],"6-31-7":[-4686.95,1580.64],"5-15-3":[-4686.95,1580.64],"4-7-1":[-4710.07,1580.64],"3-3-0":[-4740.18,3362.09],"6-31-8":[-5042.89,577.62],"6-31-9":[-4980.95,282.12],"5-15-4":[-5124.1,577.62],"6-31-10":[-5310.1,-46.98],"6-31-11":[-5722.75,190.58],"5-15-5":[-6403.12,228.76],"4-7-2":[-6403.12,577.62],"6-31-12":[-6291.76,324],"6-31-13":[-5111.3,447.15],"5-15-6":[-7162.59,456.57],"6-31-14":[-5530.61,671.12],"6-31-15":[-5164.36,604.9],"5-15-7":[-5551.79,671.12],"4-7-3":[-7162.59,807.5],"3-3-1":[-7162.59,3889.28],"2-1-0":[-7162.59,4373.52],"6-31-16":[-4822.44,422.75],"6-31-17":[-4823.05,300.32],"5-15-8":[-5140.65,471.28],"6-31-18":[-4833.5,509.53],"6-31-19":[-4467.91,590.45],"5-15-9":[-5034.68,806.41],"4-7-4":[-6497.54,1115.44],"6-31-20":[-4946.44,146.09],"6-31-21":[-4407.4,78.7],"5-15-10":[-5194.52,204.36],"6-31-22":[-4533.97,-24.95],"6-31-23":[-5033.68,-3.53],"5-15-11":[-5033.68,-3.53],"4-7-5":[-5658.77,3697.19],"3-3-2":[-6497.54,4383.25],"6-31-24":[-5131.34,129.8],"6-31-25":[-4759.71,2495.76],"5-15-12":[-5131.34,2495.76],"6-31-26":[-4820.52,4217.93],"6-31-27":[-4834.53,1667.28],"5-15-13":[-4874.36,4217.93],"4-7-6":[-6091.1,5601.19],"6-31-28":[-5293.16,3.56],"6-31-29":[-4500.18,1.79],"5-15-14":[-5293.16,3.56],"6-31-30":[-4189.47,-0.95],"6-31-31":[-4104.28,1700.45],"5-15-15":[-4430.52,1700.45],"4-7-7":[-5370.65,1700.45],"3-3-3":[-6091.1,5601.19],"2-1-1":[-6924.66,5601.19],"1-0-0":[-10751.44,6207.28],"6-31-32":[-3510.08,1684.42],"6-31-33":[-4070.18,-8.12],"5-15-16":[-4282.62,1684.42],"6-31-34":[-3905.47,-10.22],"6-31-35":[-4170.38,-8.63],"5-15-17":[-4888.98,-8.63],"4-7-8":[-5036.16,1684.42],"6-31-36":[-6565.97,1589.27],"6-31-37":[-1812.77,4112.94],"5-15-18":[-6739.12,4112.94],"6-31-38":[-859.48,2424.67],"6-31-39":[-3743.15,104.44],"5-15-19":[-3785.54,2428.71],"4-7-9":[-6739.12,5523.17],"3-3-4":[-10287.73,5523.17],"6-31-40":[-3908.65,3.59],"6-31-41":[-3567.18,3.57],"5-15-20":[-3944.08,3.59],"6-31-42":[-397.92,76.86],"6-31-43":[-58.3,146.46],"5-15-21":[-397.92,205.26],"4-7-10":[-3944.08,3653.33],"6-31-44":[-6.17,569.71],"6-31-45":[-5.45,505.58],"5-15-22":[-9.48,795.12],"6-31-46":[-4.53,291.79],"6-31-47":[-5.48,416.99],"5-15-23":[-9.84,460.48],"4-7-11":[-15.79,1103.03],"3-3-5":[-3944.08,4305.19],"2-1-2":[-10287.73,5523.17],"6-31-48":[-132.81,589.98],"6-31-49":[-11.96,638.88],"5-15-24":[-132.81,638.88],"6-31-50":[-15.08,443],"6-31-51":[-19.15,311.46],"5-15-25":[-22.37,447.4],"4-7-12":[-132.81,791.33],"6-31-52":[-198.6,182.6],"6-31-53":[-208.92,-9.98],"5-15-26":[-208.92,220.76],"6-31-54":[-201.71,281.1],"6-31-55":[-39.77,576.62],"5-15-27":[-201.71,576.62],"4-7-13":[-208.92,576.62],"3-3-6":[-321.18,3764.34],"6-31-56":[-270.99,1365.62],"6-31-57":[-502.2,424.34],"5-15-28":[-502.2,1365.62],"6-31-58":[-502.24,1267.01],"6-31-59":[-500.79,1887.87],"5-15-29":[-652.43,1887.87],"4-7-14":[-652.43,1887.87],"6-31-60":[-838.7,2175.26],"6-31-61":[-2146.95,1987.13],"5-15-30":[-2146.95,2275.03],"6-31-62":[-2638.31,2714.87],"6-31-63":[-4214.39,2744.46],"5-15-31":[-4214.89,2744.46],"4-7-15":[-4216.39,2761.57],"3-3-7":[-4216.39,3441.15],"2-1-3":[-5094.21,4326.16],"1-0-1":[-10287.73,6095.63],"6-32-0":[-651.16,891.44],"6-32-1":[-1552.49,1948.79],"6-32-2":[-1753.91,2344.15],"6-32-3":[-1288.78,1880.89],"6-32-4":[-1721.76,2029.25],"6-32-5":[-1511.31,684.11],"6-32-6":[-2539.96,367.14],"6-32-7":[-4349.76,395.57],"6-32-8":[-4839.06,546.23],"6-32-9":[-5001.37,248.1],"6-32-10":[-5439.68,-44.47],"6-32-11":[-5724.72,87.35],"6-32-12":[-6336.83,240.44],"6-32-13":[-5142.35,415.1],"6-32-14":[-5460.52,599.34],"6-32-15":[-4689.89,568.7],"6-32-16":[-4679.1,551.43],"6-32-17":[-5583.01,291.63],"6-32-18":[-5370.29,294.32],"6-32-19":[-5027.02,321.49],"6-32-20":[-4299.38,211.56],"6-32-21":[-4681.53,90.38],"6-32-22":[-4375.93,-7.81],"6-32-23":[-4439.29,-7.65],"6-32-24":[-5208.19,200.24],"6-32-25":[-5459.67,1010.31],"6-32-26":[-4966.32,3009.32],"6-32-27":[-4803.68,2376.93],"6-32-28":[-5024,10.91],"6-32-29":[-4552.19,10.51],"6-32-30":[-4518.06,6.74],"6-32-31":[-3413.49,663.37],"6-32-32":[-3814.72,716.38],"6-32-33":[-4502.59,-4.49],"6-32-34":[-3766.35,-6.53],"6-32-35":[-5498.08,-6.02],"6-32-36":[-6062.39,2332.91],"6-32-37":[-3402.81,2916.82],"6-32-38":[-3812.19,964.29],"6-32-39":[-1204.75,182.66],"6-32-40":[-3737.48,5.45],"6-32-41":[-3492.01,6.31],"6-32-42":[-2792.42,86.86],"6-32-43":[-49.18,196.98],"6-32-44":[-5.26,309.51],"6-32-45":[-4.78,279.02],"6-32-46":[-2.44,284.12],"6-32-47":[-68.64,505.12],"6-32-48":[-161.62,554.68],"6-32-49":[-174.75,577.05],"6-32-50":[-11.84,403.02],"6-32-51":[-80.26,236.41],"6-32-52":[-241.21,84.28],"6-32-53":[-273.09,-8.31],"6-32-54":[-233.27,253.41],"6-32-55":[-129.67,539.22],"6-32-56":[-348.03,403.5],"6-32-57":[-470.07,449.89],"6-32-58":[-496.76,1290.61],"6-32-59":[-472.31,2685.38],"6-32-60":[-800.22,2381.84],"6-32-61":[-1910.19,1985.53],"6-32-62":[-2730.3,2244.93],"6-32-63":[-4214.39,2744.46],"6-33-0":[-350.03,366.89],"6-33-1":[-1236.85,1500.73],"5-16-0":[-1552.49,1948.79],"6-33-2":[-1749.59,1693.18],"6-33-3":[-1626.27,2653.23],"5-16-1":[-1753.91,2653.23],"6-33-4":[-2555.32,4704.79],"6-33-5":[-1385.22,1009.47],"5-16-2":[-2555.32,4704.79],"6-33-6":[-1100.12,819.86],"6-33-7":[-4304.38,557.56],"5-16-3":[-4349.76,819.86],"6-33-8":[-4717.53,444.35],"6-33-9":[-5014.69,366.68],"5-16-4":[-5014.69,546.23],"6-33-10":[-5580.11,-42.25],"6-33-11":[-6310.58,-45.96],"5-16-5":[-6310.58,87.35],"6-33-12":[-5887.78,205.42],"6-33-13":[-5096.82,323.91],"5-16-6":[-6336.83,415.1],"6-33-14":[-5141.14,604.67],"6-33-15":[-5045.87,613.05],"5-16-7":[-5460.52,613.05],"6-33-16":[-4428.48,486.54],"6-33-17":[-5579.29,356.67],"5-16-8":[-5583.01,551.43],"6-33-18":[-5095.04,611.43],"6-33-19":[-4956.22,1256.4],"5-16-9":[-5370.29,1256.4],"6-33-20":[-4459.43,703.65],"6-33-21":[-4536.16,133.72],"5-16-10":[-4681.53,703.65],"6-33-22":[-4327.34,-9.17],"6-33-23":[-5710.56,-15.6],"5-16-11":[-5710.56,-7.65],"6-33-24":[-4728.77,38.89],"6-33-25":[-5255.71,-5.73],"5-16-12":[-5459.67,1010.31],"6-33-26":[-5088.65,2458.87],"6-33-27":[-5143.3,2108.97],"5-16-13":[-5143.3,3009.32],"6-33-28":[-5077.06,2165.37],"6-33-29":[-4768.23,21.34],"5-16-14":[-5077.06,2165.37],"6-33-30":[-4621.04,580.04],"6-33-31":[-3768.75,9.28],"5-16-15":[-4621.04,663.37],"6-33-32":[-4778.61,4.83],"6-33-33":[-3866.48,493.04],"5-16-16":[-4778.61,716.38],"6-33-34":[-3463.64,-2.74],"6-33-35":[-5264.94,2112.86],"5-16-17":[-5498.08,2112.86],"6-33-36":[-1265.04,2015.96],"6-33-37":[-5834.04,2371.84],"5-16-18":[-6062.39,2916.82],"6-33-38":[-5561.97,2.74],"6-33-39":[-4850.21,12.09],"5-16-19":[-5561.97,964.29],"6-33-40":[-3721.53,9.43],"6-33-41":[-3446.02,10.75],"5-16-20":[-3737.48,10.75],"6-33-42":[-2926.21,85.16],"6-33-43":[-6.76,670.08],"5-16-21":[-2926.21,670.08],"6-33-44":[-2.13,1191.3],"6-33-45":[-1.46,564.53],"5-16-22":[-5.26,1191.3],"6-33-46":[-0.15,347.1],"6-33-47":[-135.47,473.44],"5-16-23":[-135.47,505.12],"6-33-48":[-256.34,566.65],"6-33-49":[-167.37,570.37],"5-16-24":[-256.34,577.05],"6-33-50":[-7.73,310.25],"6-33-51":[-187.94,187.42],"5-16-25":[-187.94,403.02],"6-33-52":[-241.18,-3.66],"6-33-53":[-285.94,-5.75],"5-16-26":[-285.94,84.28],"6-33-54":[-219.87,399.59],"6-33-55":[-497.41,430.98],"5-16-27":[-497.41,539.22],"6-33-56":[-420.6,576.62],"6-33-57":[-736.8,864.62],"5-16-28":[-736.8,864.62],"6-33-58":[-774.19,1304.63],"6-33-59":[-793.68,4721.94],"5-16-29":[-793.68,4721.94],"6-33-60":[-800.68,2555.4],"6-33-61":[-1816.41,1732.44],"5-16-30":[-1910.19,2555.4],"6-33-62":[-2782.86,2245.57],"6-33-63":[-4214.89,2744.47],"5-16-31":[-4214.89,2744.47],"6-34-0":[-454.83,542.8],"6-34-1":[-1478.32,428.27],"6-34-2":[-1866.74,1823.83],"6-34-3":[-2047.48,2270.95],"6-34-4":[-2606.71,1556.84],"6-34-5":[-2627.94,1913.68],"6-34-6":[-1191.1,1056.55],"6-34-7":[-4260.54,570.75],"6-34-8":[-4632.93,613.97],"6-34-9":[-4928.09,433.17],"6-34-10":[-5263.71,-38.64],"6-34-11":[-6036.97,-44.35],"6-34-12":[-6155.38,171.79],"6-34-13":[-5688.04,145.12],"6-34-14":[-4849.44,594.92],"6-34-15":[-4302.63,614.36],"6-34-16":[-4708.92,432.14],"6-34-17":[-5187.86,436.84],"6-34-18":[-4796.58,1652.42],"6-34-19":[-4753.59,2004.7],"6-34-20":[-4390.66,358.2],"6-34-21":[-4342.5,76.45],"6-34-22":[-5078.47,86.32],"6-34-23":[-4795.27,678.56],"6-34-24":[-4711.24,565.42],"6-34-25":[-4864.62,19.57],"6-34-26":[-5307.29,735.54],"6-34-27":[-5583.4,729.46],"6-34-28":[-5386.72,3818.31],"6-34-29":[-5922.69,1199.76],"6-34-30":[-5526.33,213.98],"6-34-31":[-4419.31,21.13],"6-34-32":[-4679.46,20.08],"6-34-33":[-4932.19,93.97],"6-34-34":[-4711.18,1158.76],"6-34-35":[-3210.82,3734.31],"6-34-36":[-3366.76,691.45],"6-34-37":[-1999.35,687.54],"6-34-38":[-6807.88,9.8],"6-34-39":[-4726.82,503.41],"6-34-40":[-3500.23,611.32],"6-34-41":[-344.47,88.56],"6-34-42":[-83.1,82.28],"6-34-43":[-41.18,336.97],"6-34-44":[1.55,1938.99],"6-34-45":[1.48,1607.82],"6-34-46":[1.54,428.39],"6-34-47":[-71.85,420.82],"6-34-48":[-80.29,600.77],"6-34-49":[-1.02,564.78],"6-34-50":[-56.04,146.55],"6-34-51":[-187.94,168.79],"6-34-52":[-252.94,-1.44],"6-34-53":[-311.22,-3.74],"6-34-54":[-313.66,517.83],"6-34-55":[-438.4,576.97],"6-34-56":[-237.34,538.73],"6-34-57":[-161.05,1030.58],"6-34-58":[-811.08,1906.63],"6-34-59":[-838.51,1732.84],"6-34-60":[-783.24,2250.43],"6-34-61":[-1769.21,1753.86],"6-34-62":[-2783.53,2251.13],"6-34-63":[-4219.24,2745.47],"6-35-0":[-459.62,452.64],"6-35-1":[-1463.64,603.08],"5-17-0":[-1478.32,603.08],"6-35-2":[-1858.56,1923.59],"6-35-3":[-2344.57,2313.91],"5-17-1":[-2344.57,2313.91],"4-8-0":[-2344.57,2653.23],"6-35-4":[-2871.64,2252.73],"6-35-5":[-2571.35,1712.44],"5-17-2":[-2871.64,2252.73],"6-35-6":[-1027.03,1559.44],"6-35-7":[-4207.3,272.32],"5-17-3":[-4260.54,1559.44],"4-8-1":[-4349.76,4704.79],"6-35-8":[-4447.9,185.61],"6-35-9":[-5050.87,184.52],"5-17-4":[-5050.87,613.97],"6-35-10":[-5719.26,293.27],"6-35-11":[-5529.33,81.87],"5-17-5":[-6036.97,293.27],"4-8-2":[-6310.58,613.97],"6-35-12":[-5305.72,123.7],"6-35-13":[-4672.46,181.36],"5-17-6":[-6155.38,181.36],"6-35-14":[-4394.81,536.17],"6-35-15":[-4785.62,651.7],"5-17-7":[-4849.44,651.7],"4-8-3":[-6336.83,651.7],"6-35-16":[-5189.33,701.76],"6-35-17":[-5118.02,951.43],"5-17-8":[-5189.33,951.43],"6-35-18":[-4407.59,1713.99],"6-35-19":[-4331.47,1476.72],"5-17-9":[-4796.58,2004.7],"4-8-4":[-5583.01,2004.7],"6-35-20":[-4392,1834.6],"6-35-21":[-4783.03,28.94],"5-17-10":[-4783.03,1834.6],"6-35-22":[-4621.18,840.08],"6-35-23":[-4947.87,293.76],"5-17-11":[-5078.47,840.08],"4-8-5":[-5710.56,1834.6],"6-35-24":[-5282.94,1104.62],"6-35-25":[-4816.41,14.26],"5-17-12":[-5282.94,1104.62],"6-35-26":[-5347.3,8.26],"6-35-27":[-6488.32,357.63],"5-17-13":[-6488.32,735.54],"4-8-6":[-6488.32,3009.32],"6-35-28":[-6906.46,1960.73],"6-35-29":[-6336.37,4007.75],"5-17-14":[-6906.46,4007.75],"6-35-30":[-4440.69,4388.45],"6-35-31":[-4459.71,6213.75],"5-17-15":[-5526.33,6213.75],"4-8-7":[-6906.46,6213.75],"6-35-32":[-5218.74,6286.78],"6-35-33":[-5042.7,4458.62],"5-17-16":[-5218.74,6286.78],"6-35-34":[-4708.73,4118.74],"6-35-35":[-4012.1,1896.73],"5-17-17":[-4711.18,4118.74],"4-8-8":[-5498.08,6286.78],"6-35-36":[-3818.41,288.63],"6-35-37":[-2951.15,21.77],"5-17-18":[-3818.41,691.45],"6-35-38":[-7357.49,22.14],"6-35-39":[-4359.2,1048.6],"5-17-19":[-7357.49,1048.6],"4-8-9":[-7357.49,2916.82],"6-35-40":[-1553.17,257.76],"6-35-41":[-946.57,470.08],"5-17-20":[-3500.23,611.32],"6-35-42":[-1053.62,27.72],"6-35-43":[-866.11,1091.31],"5-17-21":[-1053.62,1091.31],"4-8-10":[-3737.48,1091.31],"6-35-44":[-69.43,1392.94],"6-35-45":[4.72,1677.79],"5-17-22":[-69.43,1938.99],"6-35-46":[4.86,939.44],"6-35-47":[-106.62,672.4],"5-17-23":[-106.62,939.44],"4-8-11":[-135.47,1938.99],"6-35-48":[-33.74,618.24],"6-35-49":[-3.08,519.17],"5-17-24":[-80.29,618.24],"6-35-50":[-125.18,177.05],"6-35-51":[-247.54,111.71],"5-17-25":[-247.54,177.05],"4-8-12":[-256.34,618.24],"6-35-52":[-237.66,68.63],"6-35-53":[-245.4,250.26],"5-17-26":[-311.22,250.26],"6-35-54":[-548.44,169.55],"6-35-55":[-478.9,182.61],"5-17-27":[-548.44,576.97],"4-8-13":[-548.44,576.97],"6-35-56":[-197.41,197.49],"6-35-57":[-850.85,1559.44],"5-17-28":[-850.85,1559.44],"6-35-58":[-952.94,1784.85],"6-35-59":[-708.27,2036.4],"5-17-29":[-952.94,2036.4],"4-8-14":[-952.94,4721.94],"6-35-60":[-528.88,2299.86],"6-35-61":[-1592.98,1971.3],"5-17-30":[-1769.21,2299.86],"6-35-62":[-2784.06,2260.72],"6-35-63":[-4215.39,2745.47],"5-17-31":[-4219.24,2745.47],"4-8-15":[-4219.24,2745.47],"6-36-0":[-489.79,822.76],"6-36-1":[-1366.27,1154.63],"6-36-2":[-1683.51,2230.75],"6-36-3":[-1884.8,2258.08],"6-36-4":[-2367.54,1817.36],"6-36-5":[-2385.15,2118.71],"6-36-6":[-1364.35,1862.67],"6-36-7":[-4087.74,611.89],"6-36-8":[-4262.94,282.83],"6-36-9":[-5089.76,575.77],"6-36-10":[-5139.84,428.02],"6-36-11":[-5274.38,430.05],"6-36-12":[-4997.51,408.97],"6-36-13":[-4177.36,406.33],"6-36-14":[-4221.39,610.85],"6-36-15":[-4309.16,575.3],"6-36-16":[-5063.08,700.02],"6-36-17":[-4764.18,927.51],"6-36-18":[-4804.48,1201.61],"6-36-19":[-4436.54,191.41],"6-36-20":[-4791.15,-36.24],"6-36-21":[-4697.14,-34.13],"6-36-22":[-4820.37,29.15],"6-36-23":[-5032.56,55.76],"6-36-24":[-6376.98,1947.58],"6-36-25":[-5043.08,2231.33],"6-36-26":[-5556.63,807.13],"6-36-27":[-6025.05,5673.66],"6-36-28":[-2187.54,6657.51],"6-36-29":[-180.23,4957.44],"6-36-30":[-37.47,5414.88],"6-36-31":[-328.06,5809.48],"6-36-32":[-623.84,5906.18],"6-36-33":[-4269.78,5319.85],"6-36-34":[-4417.62,5607.45],"6-36-35":[-4208.62,6754.44],"6-36-36":[-4176.44,5914.69],"6-36-37":[-4288.99,824.13],"6-36-38":[-6848.89,2167.33],"6-36-39":[-6923.15,1828.57],"6-36-40":[-4947.98,411.38],"6-36-41":[-5170.05,422.7],"6-36-42":[-5116.4,27.55],"6-36-43":[-3615.81,26.75],"6-36-44":[-1006.26,156.63],"6-36-45":[-89.15,1138.15],"6-36-46":[-54.04,900.59],"6-36-47":[-201.99,692.08],"6-36-48":[7.17,548.17],"6-36-49":[4.69,580.92],"6-36-50":[-48.23,396.38],"6-36-51":[-242.98,388.95],"6-36-52":[-185.02,401.03],"6-36-53":[-180.3,428.06],"6-36-54":[-562.17,511.81],"6-36-55":[-206.42,273.04],"6-36-56":[-156.47,519.49],"6-36-57":[-1062.12,1733.71],"6-36-58":[-1087.43,1801.07],"6-36-59":[-759.94,1748.06],"6-36-60":[-275.14,2158.52],"6-36-61":[-1442.57,2325.18],"6-36-62":[-2787.79,2281.25],"6-36-63":[-4215.39,2745.47],"6-37-0":[-529.7,950.33],"6-37-1":[-1610.79,1129.6],"5-18-0":[-1610.79,1154.63],"6-37-2":[-1851.99,2437.47],"6-37-3":[-1683.51,2148.92],"5-18-1":[-1884.8,2437.47],"6-37-4":[-1556.76,1260.24],"6-37-5":[-1695.95,1184.79],"5-18-2":[-2385.15,2118.71],"6-37-6":[-1120.23,1808.19],"6-37-7":[-3519.71,1101.49],"5-18-3":[-4087.74,1862.67],"6-37-8":[-4147.78,282.61],"6-37-9":[-4780.41,642.27],"5-18-4":[-5089.76,642.27],"6-37-10":[-5266.36,648.16],"6-37-11":[-5260.84,410.19],"5-18-5":[-5274.38,648.16],"6-37-12":[-4472.73,1084.61],"6-37-13":[-3802.59,2661.91],"5-18-6":[-4997.51,2661.91],"6-37-14":[-1764.59,3481.08],"6-37-15":[-3424.87,3901.29],"5-18-7":[-4309.16,3901.29],"6-37-16":[-3865.32,1597.57],"6-37-17":[-4566.1,1241.62],"5-18-8":[-5063.08,1597.57],"6-37-18":[-5188.07,1352.53],"6-37-19":[-5441.31,-10.6],"5-18-9":[-5441.31,1352.53],"6-37-20":[-5453.77,-42.73],"6-37-21":[-4766.46,-43.8],"5-18-10":[-5453.77,-34.13],"6-37-22":[-5001.2,-41.08],"6-37-23":[-5070.1,26.27],"5-18-11":[-5070.1,55.76],"6-37-24":[-6091.51,1217.95],"6-37-25":[-7536.97,2330.69],"5-18-12":[-7536.97,2330.69],"6-37-26":[-7556.84,5459.75],"6-37-27":[-346.06,5421.57],"5-18-13":[-7556.84,5673.66],"6-37-28":[-49.02,5700.22],"6-37-29":[-23.52,3844.52],"5-18-14":[-2187.54,6657.51],"6-37-30":[-114.49,5315.89],"6-37-31":[-8.04,3836.77],"5-18-15":[-328.06,5809.48],"6-37-32":[117.06,3769.75],"6-37-33":[-136.42,5266.88],"5-18-16":[-4269.78,5906.18],"6-37-34":[-34.08,3760.52],"6-37-35":[-2679.16,5683.59],"5-18-17":[-4417.62,6754.44],"6-37-36":[-4297.04,5564.58],"6-37-37":[-4632.8,5547.75],"5-18-18":[-4632.8,5914.69],"6-37-38":[-5938.07,2250.67],"6-37-39":[-4564.93,1130.92],"5-18-19":[-6923.15,2250.67],"6-37-40":[-5547.39,781.66],"6-37-41":[-5471.37,37.5],"5-18-20":[-5547.39,781.66],"6-37-42":[-5342.72,34.42],"6-37-43":[-5384.9,32.14],"5-18-21":[-5384.9,34.42],"6-37-44":[-4916.35,34.46],"6-37-45":[-3432.19,1376.54],"5-18-22":[-4916.35,1376.54],"6-37-46":[-122.33,1199.69],"6-37-47":[-70.31,1528.77],"5-18-23":[-201.99,1528.77],"6-37-48":[-68.87,4026.29],"6-37-49":[-269.44,3587.09],"5-18-24":[-269.44,4026.29],"6-37-50":[-96.77,2789.91],"6-37-51":[-222.29,1172.63],"5-18-25":[-242.98,2789.91],"6-37-52":[-5.66,395.16],"6-37-53":[-1.67,603.79],"5-18-26":[-185.02,603.79],"6-37-54":[-542.06,589.74],"6-37-55":[-65.58,231.36],"5-18-27":[-562.17,589.74],"6-37-56":[-96.03,1105.5],"6-37-57":[-923.87,1832.24],"5-18-28":[-1062.12,1832.24],"6-37-58":[-1032.37,1660.76],"6-37-59":[-1613.33,1225.22],"5-18-29":[-1613.33,1801.07],"6-37-60":[-479.28,2166.62],"6-37-61":[-1311.15,2452.46],"5-18-30":[-1442.57,2452.46],"6-37-62":[-2784.78,2321.18],"6-37-63":[-4220.26,2745.47],"5-18-31":[-4220.26,2745.47],"6-38-0":[-519.6,681.02],"6-38-1":[-2198.47,1253.78],"6-38-2":[-2189.44,2116.63],"6-38-3":[-1281.64,2052.81],"6-38-4":[-1351.54,1194.93],"6-38-5":[-1749.15,1667.87],"6-38-6":[-1095.72,1736.55],"6-38-7":[-1549.9,2969.55],"6-38-8":[-3766.38,332.82],"6-38-9":[-4402.36,633.8],"6-38-10":[-4964.76,658.27],"6-38-11":[-5005.56,464.64],"6-38-12":[-4494.31,1846.61],"6-38-13":[-982.8,2481.75],"6-38-14":[-30.94,2821.86],"6-38-15":[-404.7,3452.08],"6-38-16":[-470.67,2451.53],"6-38-17":[-481.26,3626.15],"6-38-18":[-86.89,4659.39],"6-38-19":[-8228.12,4831.22],"6-38-20":[-6381.71,4956.12],"6-38-21":[-6742.27,5115.31],"6-38-22":[-7913.93,2168.25],"6-38-23":[-7969.31,2607.62],"6-38-24":[-8050.34,1152.74],"6-38-25":[-8983.51,5763.75],"6-38-26":[-1820.84,6405.39],"6-38-27":[-65.4,6266.34],"6-38-28":[-114.23,4925.73],"6-38-29":[-32.53,5356.84],"6-38-30":[-54.2,3882.23],"6-38-31":[-58.3,839.2],"6-38-32":[68.16,826.19],"6-38-33":[63.39,3838.4],"6-38-34":[43.63,5193.89],"6-38-35":[-82.22,4760.78],"6-38-36":[-5251.11,6360.34],"6-38-37":[-4600.41,6449.41],"6-38-38":[-4723.57,5847.77],"6-38-39":[-5617.49,1104.68],"6-38-40":[-5800.95,2677.33],"6-38-41":[-5756.35,2243.25],"6-38-42":[-5801.58,5156.32],"6-38-43":[-5646.47,5062.63],"6-38-44":[-5456.02,5023.3],"6-38-45":[-4488.42,4724.4],"6-38-46":[-2637.57,3766.16],"6-38-47":[-218.88,2585.5],"6-38-48":[-268.93,3553.09],"6-38-49":[-290.78,3257.62],"6-38-50":[-72.84,2695.15],"6-38-51":[-106.71,1949.61],"6-38-52":[-22.58,448.63],"6-38-53":[-345.6,645.25],"6-38-54":[-425.69,601.83],"6-38-55":[-34.96,322.36],"6-38-56":[-362.66,2784.58],"6-38-57":[-1715.35,1767.29],"6-38-58":[-1598.79,1790.22],"6-38-59":[-1058.75,1401.52],"6-38-60":[-492.06,2004.84],"6-38-61":[-1191,2082.48],"6-38-62":[-2626.37,2346.02],"6-38-63":[-4248.26,2745.47],"6-39-0":[-540.35,1101.15],"6-39-1":[-2345.14,1569.05],"5-19-0":[-2345.14,1569.05],"6-39-2":[-2346.92,1723.34],"6-39-3":[-1117.86,1651.25],"5-19-1":[-2346.92,2116.63],"4-9-0":[-2346.92,2437.47],"6-39-4":[-1326.57,1535.69],"6-39-5":[-1071.1,1564.82],"5-19-2":[-1749.15,1667.87],"6-39-6":[-1194.75,2245.82],"6-39-7":[-1603.15,2751.69],"5-19-3":[-1603.15,2969.55],"4-9-1":[-4087.74,2969.55],"3-4-0":[-4349.76,4704.79],"6-39-8":[-3410.04,1942.94],"6-39-9":[-4259.66,781.05],"5-19-4":[-4402.36,1942.94],"6-39-10":[-4838.54,360.51],"6-39-11":[-4796.57,596.29],"5-19-5":[-5005.56,658.27],"4-9-2":[-5274.38,1942.94],"6-39-12":[-1992.23,2555.83],"6-39-13":[-110,1077.82],"5-19-6":[-4494.31,2555.83],"6-39-14":[-97.91,1073.14],"6-39-15":[-70.35,1579.36],"5-19-7":[-404.7,3452.08],"4-9-3":[-4997.51,3901.29],"3-4-1":[-6336.83,3901.29],"6-39-16":[-56.2,1927.38],"6-39-17":[-75.76,1953.98],"5-19-8":[-481.26,3626.15],"6-39-18":[-85.75,3926.12],"6-39-19":[-95.04,5824.32],"5-19-9":[-8228.12,5824.32],"4-9-4":[-8228.12,5824.32],"6-39-20":[-101.46,6819.12],"6-39-21":[-103.88,6238.9],"5-19-10":[-6742.27,6819.12],"6-39-22":[-105.29,6823.9],"6-39-23":[-347.5,6678.96],"5-19-11":[-7969.31,6823.9],"4-9-5":[-7969.31,6823.9],"3-4-2":[-8228.12,6823.9],"6-39-24":[-1003.53,6134.25],"6-39-25":[-603.21,6488.27],"5-19-12":[-8983.51,6488.27],"6-39-26":[-133.8,6313.82],"6-39-27":[-89.53,5209.77],"5-19-13":[-1820.84,6405.39],"4-9-6":[-8983.51,6488.27],"6-39-28":[-34.01,3550.67],"6-39-29":[-4.7,404.14],"5-19-14":[-114.23,5356.84],"6-39-30":[-66.26,759.95],"6-39-31":[-103.64,984.95],"5-19-15":[-103.64,3882.23],"4-9-7":[-2187.54,6657.51],"3-4-3":[-8983.51,6657.51],"6-39-32":[-0.58,914.93],"6-39-33":[34.67,648.95],"5-19-16":[-0.58,3838.4],"6-39-34":[29.78,308.24],"6-39-35":[-1861.76,3455.66],"5-19-17":[-1861.76,5193.89],"4-9-8":[-4417.62,6754.44],"6-39-36":[-5294.02,5347.83],"6-39-37":[-5290.9,6455.95],"5-19-18":[-5294.02,6455.95],"6-39-38":[-8591.11,6600.28],"6-39-39":[-8438.23,6222.25],"5-19-19":[-8591.11,6600.28],"4-9-9":[-8591.11,6600.28],"3-4-4":[-8591.11,6754.44],"6-39-40":[-5981.36,6775.96],"6-39-41":[-6284.61,6919.9],"5-19-20":[-6284.61,6919.9],"6-39-42":[-5637.46,6300.89],"6-39-43":[-5662.35,6969.13],"5-19-21":[-5801.58,6969.13],"4-9-10":[-6284.61,6969.13],"6-39-44":[-5728.78,5888.33],"6-39-45":[-5031.43,3998.13],"5-19-22":[-5728.78,5888.33],"6-39-46":[-3807.89,2022.28],"6-39-47":[-332.14,1957.39],"5-19-23":[-3807.89,3766.16],"4-9-11":[-5728.78,5888.33],"3-4-5":[-6284.61,6969.13],"6-39-48":[-175.48,1477.25],"6-39-49":[-384.07,1097.15],"5-19-24":[-384.07,3553.09],"6-39-50":[-1.5,1051.93],"6-39-51":[-63.31,2581.84],"5-19-25":[-106.71,2695.15],"4-9-12":[-384.07,4026.29],"6-39-52":[-197.52,578.19],"6-39-53":[-600.93,341.52],"5-19-26":[-600.93,645.25],"6-39-54":[-718.65,797.88],"6-39-55":[-24.6,1701.66],"5-19-27":[-718.65,1701.66],"4-9-13":[-718.65,1701.66],"3-4-6":[-718.65,4026.29],"6-39-56":[-498.94,2876.77],"6-39-57":[-2351.44,2323.88],"5-19-28":[-2351.44,2876.77],"6-39-58":[-2355.6,2011.29],"6-39-59":[-1040.24,1401.52],"5-19-29":[-2355.6,2011.29],"4-9-14":[-2355.6,2876.77],"6-39-60":[-450.15,1746.17],"6-39-61":[-1380.02,1850.39],"5-19-30":[-1380.02,2082.48],"6-39-62":[-2491.33,2348.16],"6-39-63":[-4221.26,2745.47],"5-19-31":[-4248.26,2745.47],"4-9-15":[-4248.26,2745.47],"3-4-7":[-4248.26,4721.94],"6-40-0":[-518.26,955.16],"6-40-1":[-1903.37,2049.21],"6-40-2":[-2397.96,1837.18],"6-40-3":[-1139.43,1301.31],"6-40-4":[-1317.34,1474.89],"6-40-5":[-852.66,1902.88],"6-40-6":[-1199.74,1790.09],"6-40-7":[-1039.02,2087.2],"6-40-8":[-1484.99,2121.08],"6-40-9":[-4113.48,1148.56],"6-40-10":[-5256.25,1032.11],"6-40-11":[-5559.15,935.94],"6-40-12":[-4034.62,1017.96],"6-40-13":[-239.87,1031.68],"6-40-14":[-129.01,1255.33],"6-40-15":[-156.96,787.13],"6-40-16":[-112.19,1095.82],"6-40-17":[-149.28,1612.57],"6-40-18":[-82.04,560.77],"6-40-19":[-88.7,797.37],"6-40-20":[-92.93,2767.12],"6-40-21":[-98.06,4454.06],"6-40-22":[-101.84,6008.42],"6-40-23":[-104.68,6321.87],"6-40-24":[-138.65,5950.05],"6-40-25":[-141.12,5674.19],"6-40-26":[-90.28,5257.92],"6-40-27":[-82.71,249.83],"6-40-28":[-60.97,2718.19],"6-40-29":[-37.5,2385.74],"6-40-30":[-52.83,2826.62],"6-40-31":[-121.52,2785.87],"6-40-32":[-10.01,2582.86],"6-40-33":[7.09,2809.61],"6-40-34":[-11.96,2317.75],"6-40-35":[-1931.5,2634.17],"6-40-36":[-5900.26,415.46],"6-40-37":[-5292.46,5469.94],"6-40-38":[-8473.44,5778.21],"6-40-39":[-8765.31,6050.05],"6-40-40":[-6184.48,6388.87],"6-40-41":[-6021.8,6039.42],"6-40-42":[-6469.31,4549.07],"6-40-43":[-5770.41,2816.12],"6-40-44":[-5499.84,812.73],"6-40-45":[-5107.82,598.59],"6-40-46":[-4907.4,1675.56],"6-40-47":[-1909.77,1125.83],"6-40-48":[-144.12,739.39],"6-40-49":[-415.2,1230.12],"6-40-50":[9.92,1016.65],"6-40-51":[-12.01,1141.97],"6-40-52":[-177.35,907.17],"6-40-53":[-969.23,971.12],"6-40-54":[-709.63,1167.51],"6-40-55":[-1316.7,2130.8],"6-40-56":[-1953,2245.41],"6-40-57":[-2399.4,2040.57],"6-40-58":[-2406.73,2090.43],"6-40-59":[-957.04,1300.57],"6-40-60":[-820.36,1398.5],"6-40-61":[-1488.61,1801.27],"6-40-62":[-2390.21,2344.27],"6-40-63":[-4215.39,2745.47],"6-41-0":[-375.14,788.95],"6-41-1":[-626.85,1980.15],"5-20-0":[-1903.37,2049.21],"6-41-2":[-2305.3,951.78],"6-41-3":[-1106.51,1019.58],"5-20-1":[-2397.96,1837.18],"6-41-4":[-897.08,1639.31],"6-41-5":[-1223.78,1899.16],"5-20-2":[-1317.34,1902.88],"6-41-6":[-1257.9,2841.54],"6-41-7":[-1237.22,3005.49],"5-20-3":[-1257.9,3005.49],"6-41-8":[-1400.73,2174.82],"6-41-9":[-4875.59,2640.33],"5-20-4":[-4875.59,2640.33],"6-41-10":[-4863.8,1491.48],"6-41-11":[-4557.28,1587.28],"5-20-5":[-5559.15,1587.28],"6-41-12":[-4321.84,864.36],"6-41-13":[-562.25,1005.83],"5-20-6":[-4321.84,1031.68],"6-41-14":[-181.17,588],"6-41-15":[-141.59,347.02],"5-20-7":[-181.17,1255.33],"6-41-16":[-162.09,265.73],"6-41-17":[-160.53,167.98],"5-20-8":[-162.09,1612.57],"6-41-18":[-71.61,1130.86],"6-41-19":[-78.01,364.32],"5-20-9":[-88.7,1130.86],"6-41-20":[-85.81,1807.61],"6-41-21":[-94.07,1879.15],"5-20-10":[-98.06,4454.06],"6-41-22":[-102.75,1192.45],"6-41-23":[-105.57,2546.24],"5-20-11":[-105.57,6321.87],"6-41-24":[-129.54,4079.61],"6-41-25":[-129.48,4284.46],"5-20-12":[-141.12,5950.05],"6-41-26":[-90.4,875.94],"6-41-27":[-83.95,666.67],"5-20-13":[-90.4,5257.92],"6-41-28":[-92.41,2565.59],"6-41-29":[-92.52,2449.21],"5-20-14":[-92.52,2718.19],"6-41-30":[4.52,2659.72],"6-41-31":[-1083.88,2129.57],"5-20-15":[-1083.88,2826.62],"6-41-32":[-35.4,2040.48],"6-41-33":[-58.32,2642.7],"5-20-16":[-58.32,2809.61],"6-41-34":[-21.58,2230.21],"6-41-35":[-1469.01,2467.61],"5-20-17":[-1931.5,2634.17],"6-41-36":[-4732.86,684.67],"6-41-37":[-4486.55,910.63],"5-20-18":[-5900.26,5469.94],"6-41-38":[-7810.98,4327.46],"6-41-39":[-8307.1,4098.61],"5-20-19":[-8765.31,6050.05],"6-41-40":[-6255.3,2622.25],"6-41-41":[-6370.08,1259.46],"5-20-20":[-6370.08,6388.87],"6-41-42":[-6091.27,1956.16],"6-41-43":[-5359.24,1847.62],"5-20-21":[-6469.31,4549.07],"6-41-44":[-5477.52,370.32],"6-41-45":[-5478.14,1242.87],"5-20-22":[-5499.84,1242.87],"6-41-46":[-5151.26,172.48],"6-41-47":[-3392.7,258.78],"5-20-23":[-5151.26,1675.56],"6-41-48":[-137.1,330.93],"6-41-49":[-460.55,546.49],"5-20-24":[-460.55,1230.12],"6-41-50":[10.24,988.83],"6-41-51":[-147.13,987.97],"5-20-25":[-147.13,1141.97],"6-41-52":[-427.03,1511.26],"6-41-53":[-750.68,1408.43],"5-20-26":[-969.23,1511.26],"6-41-54":[-589.21,2255.29],"6-41-55":[-772.02,2099.32],"5-20-27":[-1316.7,2255.29],"6-41-56":[-2123.37,2890.49],"6-41-57":[-2314.58,2528.76],"5-20-28":[-2399.4,2890.49],"6-41-58":[-2174.37,1987.4],"6-41-59":[-704.38,1390.38],"5-20-29":[-2406.73,2090.43],"6-41-60":[-1053.08,1209.84],"6-41-61":[-1736.3,967.78],"5-20-30":[-1736.3,1801.27],"6-41-62":[-2104.34,2332.43],"6-41-63":[-4222.3,2745.47],"5-20-31":[-4222.3,2745.47],"6-42-0":[-453.13,803.72],"6-42-1":[-1912.63,1447.17],"6-42-2":[-2173.89,636.09],"6-42-3":[-1352.22,1412.39],"6-42-4":[-879.27,1850.85],"6-42-5":[-1795.07,1425.68],"6-42-6":[-1103.4,1254.23],"6-42-7":[-613.53,109.47],"6-42-8":[-1048.58,2037.53],"6-42-9":[-4655.1,2218.59],"6-42-10":[-5197,19.12],"6-42-11":[-4779.19,1027.48],"6-42-12":[-4818.14,846.11],"6-42-13":[-1704.28,704.1],"6-42-14":[-1339.29,560.68],"6-42-15":[-2117.74,626.18],"6-42-16":[-2434.12,12.82],"6-42-17":[-97.7,9.64],"6-42-18":[-63.96,727.01],"6-42-19":[-70.71,146.41],"6-42-20":[-79.19,153.45],"6-42-21":[-92.99,121.66],"6-42-22":[-102.26,227.97],"6-42-23":[-104.51,246.54],"6-42-24":[-109.89,620.33],"6-42-25":[-127.72,1291.8],"6-42-26":[-127.8,1415.28],"6-42-27":[-108.65,1174.77],"6-42-28":[-95.38,906.03],"6-42-29":[-54.23,2236.77],"6-42-30":[-10.46,2551.06],"6-42-31":[-8.06,1982.48],"6-42-32":[-47.66,1810.47],"6-42-33":[-73.31,2410.43],"6-42-34":[-221.29,2194.7],"6-42-35":[-2087.24,851],"6-42-36":[-3955.53,1044.76],"6-42-37":[-6015.39,1316.28],"6-42-38":[-7426.7,1325.79],"6-42-39":[-6458.04,644.34],"6-42-40":[-6448.9,249.8],"6-42-41":[-7561.67,233.97],"6-42-42":[-7274.89,142.11],"6-42-43":[-6028.69,159.46],"6-42-44":[-5656.3,171.01],"6-42-45":[-5488.93,773.01],"6-42-46":[-5388.86,27.54],"6-42-47":[-4682.72,24.63],"6-42-48":[-546.32,617.18],"6-42-49":[-1069.25,540.69],"6-42-50":[-212.17,710.18],"6-42-51":[-710.71,831.11],"6-42-52":[-2466.84,974.47],"6-42-53":[-2642.04,41.77],"6-42-54":[-2230.11,2109.78],"6-42-55":[-1447.8,2069.8],"6-42-56":[-1941.74,269.27],"6-42-57":[-1984.8,1250.11],"6-42-58":[-1167.28,1211.47],"6-42-59":[-877.97,1082.45],"6-42-60":[-1133.93,1364.36],"6-42-61":[-1831.57,889.65],"6-42-62":[-2119.05,2326.44],"6-42-63":[-4223.29,2745.48],"6-43-0":[-435.12,768.15],"6-43-1":[-1633.64,761.78],"5-21-0":[-1912.63,1447.17],"6-43-2":[-1955.14,1359.43],"6-43-3":[-1586.09,1941.41],"5-21-1":[-2173.89,1941.41],"4-10-0":[-2397.96,2049.21],"6-43-4":[-843.7,2238.22],"6-43-5":[-674.96,1021.33],"5-21-2":[-1795.07,2238.22],"6-43-6":[-944.44,56.07],"6-43-7":[-951.56,55.35],"5-21-3":[-1103.4,1254.23],"4-10-1":[-1795.07,3005.49],"6-43-8":[-650.15,49.44],"6-43-9":[-2315.61,1677.31],"5-21-4":[-4655.1,2218.59],"6-43-10":[-5276.84,55.02],"6-43-11":[-5621.9,23.83],"5-21-5":[-5621.9,1027.48],"4-10-2":[-5621.9,2640.33],"6-43-12":[-5554.84,1193.16],"6-43-13":[-2774.99,895.93],"5-21-6":[-5554.84,1193.16],"6-43-14":[-4993.64,804.73],"6-43-15":[-5579.67,566.65],"5-21-7":[-5579.67,804.73],"4-10-3":[-5579.67,1255.33],"6-43-16":[-5390.46,-4.42],"6-43-17":[-4092.11,-13.27],"5-21-8":[-5390.46,12.82],"6-43-18":[-95.28,432.02],"6-43-19":[-63.3,214.23],"5-21-9":[-95.28,727.01],"4-10-4":[-5390.46,1612.57],"6-43-20":[-73.49,367.29],"6-43-21":[-87.06,352.61],"5-21-10":[-92.99,367.29],"6-43-22":[-94.59,661.37],"6-43-23":[-97.23,692.98],"5-21-11":[-104.51,692.98],"4-10-5":[-105.57,6321.87],"6-43-24":[-97.15,809.32],"6-43-25":[-102.43,1167.79],"5-21-12":[-127.72,1291.8],"6-43-26":[-113.66,921.21],"6-43-27":[-108.06,686.04],"5-21-13":[-127.8,1415.28],"4-10-6":[-141.12,5950.05],"6-43-28":[-95.84,602.42],"6-43-29":[-77.21,647.02],"5-21-14":[-95.84,2236.77],"6-43-30":[-149.21,1207.52],"6-43-31":[-18.35,1109.8],"5-21-15":[-149.21,2551.06],"4-10-7":[-1083.88,2826.62],"6-43-32":[-59.96,1027.78],"6-43-33":[-57.01,1121.51],"5-21-16":[-73.31,2410.43],"6-43-34":[-2930.18,657.03],"6-43-35":[-4527.52,621.44],"5-21-17":[-4527.52,2194.7],"4-10-8":[-4527.52,2809.61],"6-43-36":[-5297.58,689.04],"6-43-37":[-6039.3,949.21],"5-21-18":[-6039.3,1316.28],"6-43-38":[-6230.06,1245.78],"6-43-39":[-7317.05,856.34],"5-21-19":[-7426.7,1325.79],"4-10-9":[-8765.31,6050.05],"6-43-40":[-7777.47,738.99],"6-43-41":[-8245.68,703.38],"5-21-20":[-8245.68,738.99],"6-43-42":[-6689.99,362.62],"6-43-43":[-6202.56,395.29],"5-21-21":[-7274.89,395.29],"4-10-10":[-8245.68,6388.87],"6-43-44":[-6937.73,228.24],"6-43-45":[-5692.36,445.18],"5-21-22":[-6937.73,773.01],"6-43-46":[-5434.99,26.5],"6-43-47":[-4811.38,19.67],"5-21-23":[-5434.99,27.54],"4-10-11":[-6937.73,1675.56],"6-43-48":[-516.46,521.4],"6-43-49":[-513.94,786.22],"5-21-24":[-1069.25,786.22],"6-43-50":[-303.89,858.37],"6-43-51":[-2693.23,1148.31],"5-21-25":[-2693.23,1148.31],"4-10-12":[-2693.23,1230.12],"6-43-52":[-3342.42,41.03],"6-43-53":[-3212.72,44.21],"5-21-26":[-3342.42,974.47],"6-43-54":[-2665.55,1728.16],"6-43-55":[-1317.01,37.01],"5-21-27":[-2665.55,2109.78],"4-10-13":[-3342.42,2255.29],"6-43-56":[-1257.74,22.37],"6-43-57":[-970.28,259.92],"5-21-28":[-1984.8,1250.11],"6-43-58":[-1268.2,1118.73],"6-43-59":[-649.94,512.61],"5-21-29":[-1268.2,1211.47],"4-10-14":[-2406.73,2890.49],"6-43-60":[-599.83,1177.05],"6-43-61":[-1811.25,1371.37],"5-21-30":[-1831.57,1371.37],"6-43-62":[-2242.68,2317.26],"6-43-63":[-4215.39,2745.48],"5-21-31":[-4223.29,2745.48],"4-10-15":[-4223.29,2745.48],"6-44-0":[-401.99,533.78],"6-44-1":[-1084.56,771.47],"6-44-2":[-1764.29,1711.26],"6-44-3":[-1608.19,2089.38],"6-44-4":[-815.35,2319.04],"6-44-5":[-552.8,1708.39],"6-44-6":[-2155.62,1880.96],"6-44-7":[-2812.72,1854.07],"6-44-8":[-2870.71,1029.06],"6-44-9":[-2580.17,758.51],"6-44-10":[-4212.93,1786.88],"6-44-11":[-5974.95,35.64],"6-44-12":[-5589.14,148.72],"6-44-13":[-3396.26,486.61],"6-44-14":[-6359.32,577.05],"6-44-15":[-6549.98,408.54],"6-44-16":[-5888.74,8.57],"6-44-17":[-5613.75,-6.77],"6-44-18":[-4438.41,0.15],"6-44-19":[-1095.24,485.4],"6-44-20":[-431.29,464.32],"6-44-21":[-77.89,558.14],"6-44-22":[-85.04,878.92],"6-44-23":[-89.27,777.81],"6-44-24":[-91.01,742.52],"6-44-25":[-96.71,869.35],"6-44-26":[-98.96,900.05],"6-44-27":[-95.93,596.31],"6-44-28":[-95.18,733.32],"6-44-29":[-81.6,685.36],"6-44-30":[-61.24,1030.82],"6-44-31":[-99.31,889.3],"6-44-32":[-68.02,823.15],"6-44-33":[-45.24,1008.83],"6-44-34":[-2993.36,694.41],"6-44-35":[-4943.53,753.33],"6-44-36":[-5604.1,612.29],"6-44-37":[-5946.15,914.71],"6-44-38":[-6280.97,880.42],"6-44-39":[-7026.06,752.75],"6-44-40":[-7602.91,799.57],"6-44-41":[-6892.43,899.62],"6-44-42":[-6396.59,584.15],"6-44-43":[-5958.12,482.27],"6-44-44":[-5830.6,526.4],"6-44-45":[-5636.92,25.03],"6-44-46":[-5566.01,22.2],"6-44-47":[-5012.17,4.24],"6-44-48":[-1354.96,372.42],"6-44-49":[-617.47,514.04],"6-44-50":[-571.38,465.61],"6-44-51":[-3493,125.75],"6-44-52":[-3733.16,41.14],"6-44-53":[-3548.01,1523.88],"6-44-54":[-2867.09,578.59],"6-44-55":[-915.51,1108.35],"6-44-56":[-963.76,1813.61],"6-44-57":[-968.04,1896.59],"6-44-58":[-1231.82,1033.64],"6-44-59":[-144.3,780.38],"6-44-60":[-408.65,1172.05],"6-44-61":[-1797.59,1540.95],"6-44-62":[-2498.95,2298.91],"6-44-63":[-4215.39,2745.48],"6-45-0":[-514.14,579.03],"6-45-1":[-1079.97,716.42],"5-22-0":[-1084.56,771.47],"6-45-2":[-1682.8,1919.3],"6-45-3":[-1622.24,2185.38],"5-22-1":[-1764.29,2185.38],"6-45-4":[-758.02,2333.41],"6-45-5":[-564,2344.97],"5-22-2":[-815.35,2344.97],"6-45-6":[-3106.06,2399.4],"6-45-7":[-3469.32,1842.92],"5-22-3":[-3469.32,2399.4],"6-45-8":[-3594.96,2229.6],"6-45-9":[-3416.97,1280.25],"5-22-4":[-3594.96,2229.6],"6-45-10":[-5404.29,59.8],"6-45-11":[-5903.43,52.29],"5-22-5":[-5974.95,1786.88],"6-45-12":[-5584.37,48.25],"6-45-13":[-3699.42,43.66],"5-22-6":[-5589.14,486.61],"6-45-14":[-6475.73,301],"6-45-15":[-6553.82,337.49],"5-22-7":[-6553.82,577.05],"6-45-16":[-6157.36,30.39],"6-45-17":[-5825.15,6.02],"5-22-8":[-6157.36,30.39],"6-45-18":[-5323.59,-1.97],"6-45-19":[-4325.6,21.81],"5-22-9":[-5323.59,485.4],"6-45-20":[-1151.79,503.24],"6-45-21":[-62.29,1073.19],"5-22-10":[-1151.79,1073.19],"6-45-22":[-68.68,1362.48],"6-45-23":[-75.93,1318.62],"5-22-11":[-89.27,1362.48],"6-45-24":[-80.15,605.26],"6-45-25":[-85.3,1036.98],"5-22-12":[-96.71,1036.98],"6-45-26":[-89.68,1009.26],"6-45-27":[-90.85,499.44],"5-22-13":[-98.96,1009.26],"6-45-28":[-90.85,721.91],"6-45-29":[-87.64,772.95],"5-22-14":[-95.18,772.95],"6-45-30":[-71.92,795.54],"6-45-31":[-95.64,654.41],"5-22-15":[-99.31,1030.82],"6-45-32":[-74.95,667.42],"6-45-33":[-2803.2,777.54],"5-22-16":[-2803.2,1008.83],"6-45-34":[-4763.78,806.95],"6-45-35":[-5170.62,772.15],"5-22-17":[-5170.62,806.95],"6-45-36":[-5575.31,508.2],"6-45-37":[-6275.55,1020.26],"5-22-18":[-6275.55,1020.26],"6-45-38":[-6065.98,1043.99],"6-45-39":[-6587.67,630.24],"5-22-19":[-7026.06,1043.99],"6-45-40":[-6536.49,1344.63],"6-45-41":[-6510.29,1399.29],"5-22-20":[-7602.91,1399.29],"6-45-42":[-6285.66,1093.19],"6-45-43":[-6352.74,529.24],"5-22-21":[-6396.59,1093.19],"6-45-44":[-6945.4,38.77],"6-45-45":[-5841.63,9.67],"5-22-22":[-6945.4,526.4],"6-45-46":[-5569.08,2.28],"6-45-47":[-4979.43,-0.34],"5-22-23":[-5569.08,22.2],"6-45-48":[-281.94,314.96],"6-45-49":[-741.17,281],"5-22-24":[-1354.96,514.04],"6-45-50":[-3288.47,17.57],"6-45-51":[-3678.29,35.37],"5-22-25":[-3678.29,465.61],"6-45-52":[-3705.27,40.41],"6-45-53":[-3555.83,47.29],"5-22-26":[-3733.16,1523.88],"6-45-54":[-2954.33,1497.68],"6-45-55":[-561.55,2058.1],"5-22-27":[-2954.33,2058.1],"6-45-56":[-871.87,1991.65],"6-45-57":[-1444.63,2162.43],"5-22-28":[-1444.63,2162.43],"6-45-58":[-213.42,734.96],"6-45-59":[-176.36,717.06],"5-22-29":[-1231.82,1033.64],"6-45-60":[-307.69,1258.22],"6-45-61":[-2043.57,1979.94],"5-22-30":[-2043.57,1979.94],"6-45-62":[-2799.05,2275.47],"6-45-63":[-4215.39,2745.48],"5-22-31":[-4215.39,2745.48],"6-46-0":[-600.57,253.52],"6-46-1":[-1161.49,110.47],"6-46-2":[-1608.38,1909.74],"6-46-3":[-1608.38,2285.51],"6-46-4":[-660.02,2457.14],"6-46-5":[-587.75,2475.02],"6-46-6":[-3468.61,2542.84],"6-46-7":[-3842.71,1831.68],"6-46-8":[-4135.6,2027.72],"6-46-9":[-4164.77,2175.1],"6-46-10":[-5695.74,1494.43],"6-46-11":[-5636.52,68.28],"6-46-12":[-5418.75,63.25],"6-46-13":[-4699.06,55.81],"6-46-14":[-6555.82,52.22],"6-46-15":[-6273.74,53.92],"6-46-16":[-5934.72,41.06],"6-46-17":[-5945.64,21.16],"6-46-18":[-5476.11,10.12],"6-46-19":[-5080.14,1.96],"6-46-20":[-3726.88,-2.52],"6-46-21":[-2797.96,1768.73],"6-46-22":[-304.2,1772.18],"6-46-23":[-114.49,1703.39],"6-46-24":[-68.86,1058.15],"6-46-25":[-75.75,1031.41],"6-46-26":[-82.25,1437.44],"6-46-27":[-86.6,1104.08],"6-46-28":[-87.21,724.61],"6-46-29":[-85.59,850.74],"6-46-30":[-76.08,432.39],"6-46-31":[-188.32,61.63],"6-46-32":[-465.17,69.74],"6-46-33":[-3641.86,521.39],"6-46-34":[-5009.6,882.74],"6-46-35":[-5227.39,737.91],"6-46-36":[-5366.84,1154.07],"6-46-37":[-6065.49,1475.44],"6-46-38":[-5796.67,1034.42],"6-46-39":[-5802.83,1075.16],"6-46-40":[-6118.27,1855.39],"6-46-41":[-6014.32,1825.17],"6-46-42":[-5802.8,1827.75],"6-46-43":[-6312.21,13.98],"6-46-44":[-5836.48,10.93],"6-46-45":[-5773.27,-0.7],"6-46-46":[-5581.92,-1.87],"6-46-47":[-3927.84,-2.14],"6-46-48":[-3192.19,-2.22],"6-46-49":[-2704.45,9.5],"6-46-50":[-4015.33,14.82],"6-46-51":[-4109.31,36.85],"6-46-52":[-3815.7,40.45],"6-46-53":[-3570.03,1495.91],"6-46-54":[-1414.56,1745.13],"6-46-55":[-499.08,1430.54],"6-46-56":[-1211.42,796],"6-46-57":[-792.03,1400.19],"6-46-58":[-20.54,682.53],"6-46-59":[-312.54,445.25],"6-46-60":[-852.59,814.06],"6-46-61":[-2162.89,1965.25],"6-46-62":[-3090.6,2268.09],"6-46-63":[-4215.39,2745.48],"6-47-0":[-904.59,189.53],"6-47-1":[-1300.87,465.89],"5-23-0":[-1300.87,465.89],"6-47-2":[-1956.75,700.91],"6-47-3":[-1479.71,2373.94],"5-23-1":[-1956.75,2373.94],"4-11-0":[-1956.75,2373.94],"6-47-4":[-904.62,2625.24],"6-47-5":[-979.12,2882.05],"5-23-2":[-979.12,2882.05],"6-47-6":[-3656.18,2840.8],"6-47-7":[-4133.21,2476.32],"5-23-3":[-4133.21,2840.8],"4-11-1":[-4133.21,2882.05],"3-5-0":[-4133.21,3005.49],"6-47-8":[-4535.63,2769.8],"6-47-9":[-4542.9,2769.95],"5-23-4":[-4542.9,2769.95],"6-47-10":[-5649.71,2452.69],"6-47-11":[-4390.16,81.26],"5-23-5":[-5695.74,2452.69],"4-11-2":[-5974.95,2769.95],"6-47-12":[-5320.13,78.26],"6-47-13":[-3965.58,72.82],"5-23-6":[-5418.75,78.26],"6-47-14":[-6582.96,69.47],"6-47-15":[-6227.22,70.1],"5-23-7":[-6582.96,70.1],"4-11-3":[-6582.96,577.05],"3-5-1":[-6582.96,2769.95],"2-2-0":[-6582.96,4704.79],"6-47-16":[-5550.89,55.71],"6-47-17":[-5717.71,40.64],"5-23-8":[-5945.64,55.71],"6-47-18":[-5463.7,29.54],"6-47-19":[-5150.83,22.06],"5-23-9":[-5476.11,29.54],"4-11-4":[-6157.36,485.4],"6-47-20":[-4302.71,15.19],"6-47-21":[-3829.03,4.78],"5-23-10":[-4302.71,1768.73],"6-47-22":[-3450.87,-2.17],"6-47-23":[-169.03,2244.32],"5-23-11":[-3450.87,2244.32],"4-11-5":[-4302.71,2244.32],"3-5-2":[-6157.36,6321.87],"6-47-24":[-50.68,2250.32],"6-47-25":[-59.08,1259.93],"5-23-12":[-75.75,2250.32],"6-47-26":[-65.46,1510.11],"6-47-27":[-76.9,1617.75],"5-23-13":[-86.6,1617.75],"4-11-6":[-98.96,2250.32],"6-47-28":[-76.9,862.81],"6-47-29":[-77.77,653.06],"5-23-14":[-87.21,862.81],"6-47-30":[-72.57,423.19],"6-47-31":[-135.46,169.45],"5-23-15":[-188.32,432.39],"4-11-7":[-188.32,1030.82],"3-5-3":[-1083.88,5950.05],"2-2-1":[-8983.51,6823.9],"6-47-32":[-4004.8,198.92],"6-47-33":[-4253.5,442.32],"5-23-16":[-4253.5,521.39],"6-47-34":[-4745.48,663.07],"6-47-35":[-5210.95,868.81],"5-23-17":[-5227.39,882.74],"4-11-8":[-5227.39,1008.83],"6-47-36":[-5300,1657.87],"6-47-37":[-5463.79,1576.13],"5-23-18":[-6065.49,1657.87],"6-47-38":[-4906.81,1269.93],"6-47-39":[-5194.04,2353.32],"5-23-19":[-5802.83,2353.32],"4-11-9":[-7026.06,2353.32],"3-5-4":[-8765.31,6050.05],"6-47-40":[-6046.99,2413.32],"6-47-41":[-5047.25,2.39],"5-23-20":[-6118.27,2413.32],"6-47-42":[-5501.03,2.77],"6-47-43":[-5758.32,-2.9],"5-23-21":[-6312.21,1827.75],"4-11-10":[-7602.91,2413.32],"6-47-44":[-6089.22,-3.31],"6-47-45":[-5767.68,-4],"5-23-22":[-6089.22,10.93],"6-47-46":[-5390.06,-3],"6-47-47":[-5265.74,-2.76],"5-23-23":[-5581.92,-1.87],"4-11-11":[-6945.4,526.4],"3-5-5":[-8245.68,6388.87],"2-2-2":[-8765.31,6969.13],"6-47-48":[-4565.83,-2.42],"6-47-49":[-4375.17,12.36],"5-23-24":[-4565.83,12.36],"6-47-50":[-4451.86,19.2],"6-47-51":[-4093.83,36.67],"5-23-25":[-4451.86,36.85],"4-11-12":[-4565.83,514.04],"6-47-52":[-3679.12,42.39],"6-47-53":[-3118.44,2073.1],"5-23-26":[-3815.7,2073.1],"6-47-54":[14.52,1814.36],"6-47-55":[-56.43,1185.43],"5-23-27":[-1414.56,1814.36],"4-11-13":[-3815.7,2073.1],"3-5-6":[-4565.83,2255.29],"6-47-56":[-821.49,371.23],"6-47-57":[-206.04,937.06],"5-23-28":[-1211.42,1400.19],"6-47-58":[-257.19,355.03],"6-47-59":[-408.52,457.63],"5-23-29":[-408.52,682.53],"4-11-14":[-1444.63,2162.43],"6-47-60":[-393.65,962.23],"6-47-61":[-2075.98,1373.29],"5-23-30":[-2162.89,1965.25],"6-47-62":[-3803.43,2263.16],"6-47-63":[-4215.39,2745.98],"5-23-31":[-4215.39,2745.98],"4-11-15":[-4215.39,2745.98],"3-5-7":[-4223.29,2890.49],"2-2-3":[-4565.83,4721.94],"6-48-0":[-1002.56,89.53],"6-48-1":[-1625.52,784.32],"6-48-2":[-1856.43,949.4],"6-48-3":[-1397.31,2469.75],"6-48-4":[-934.43,2812.59],"6-48-5":[-1655.77,3024.06],"6-48-6":[-3835.14,3047.68],"6-48-7":[-4422.64,2826.07],"6-48-8":[-4694.59,2785.17],"6-48-9":[-4814.83,2833.9],"6-48-10":[-5546.05,2803.26],"6-48-11":[-4563.38,92.57],"6-48-12":[-5098.13,90.15],"6-48-13":[-3690.49,85.22],"6-48-14":[-6580.29,78.86],"6-48-15":[-6151.22,72.39],"6-48-16":[-6074.8,65.89],"6-48-17":[-5427.71,54.55],"6-48-18":[-6129.36,45.38],"6-48-19":[-5109.91,39.31],"6-48-20":[-4602.01,32.2],"6-48-21":[-4278.58,23.36],"6-48-22":[-3719.52,10.3],"6-48-23":[-2324.46,1973.99],"6-48-24":[-36.66,2699.24],"6-48-25":[-48.75,1971.8],"6-48-26":[-52.31,1656.77],"6-48-27":[-60.66,1603.49],"6-48-28":[-65.09,1259.07],"6-48-29":[-65.14,586.2],"6-48-30":[-85.29,344.01],"6-48-31":[-3865.9,57.26],"6-48-32":[-4518.8,80.25],"6-48-33":[-4888.4,366.28],"6-48-34":[-5293.87,588.21],"6-48-35":[-5433.96,1298.57],"6-48-36":[-5101.32,1756.49],"6-48-37":[-5420.55,1788.77],"6-48-38":[-5745.06,2047.81],"6-48-39":[-5639.86,2789.25],"6-48-40":[-6236.13,2060.99],"6-48-41":[-4727.7,-6.95],"6-48-42":[-5242.68,-7.27],"6-48-43":[-5266.3,-5.74],"6-48-44":[-5333.57,-5.85],"6-48-45":[-5726.45,-5.73],"6-48-46":[-5196.72,-5.21],"6-48-47":[-5068.54,-3.49],"6-48-48":[-4815.61,-1.35],"6-48-49":[-4598.65,16.97],"6-48-50":[-4840.96,17.53],"6-48-51":[-3842.65,35.69],"6-48-52":[-4250.99,41.28],"6-48-53":[-2309.22,2448.9],"6-48-54":[-833.91,2176.59],"6-48-55":[-163.3,1316.63],"6-48-56":[-625.27,364.42],"6-48-57":[-429.12,233.82],"6-48-58":[-370.87,131.2],"6-48-59":[-405.36,213.73],"6-48-60":[-403.85,1124.93],"6-48-61":[-2027.94,1548.87],"6-48-62":[-3799.43,2265.71],"6-48-63":[-4215.39,2746.48],"6-49-0":[-884.4,67.53],"6-49-1":[-1576.67,792.41],"5-24-0":[-1625.52,792.41],"6-49-2":[-968.6,1459.96],"6-49-3":[-1449.32,2462.17],"5-24-1":[-1856.43,2469.75],"6-49-4":[-1271.56,2812.59],"6-49-5":[-2510.28,3141.21],"5-24-2":[-2510.28,3141.21],"6-49-6":[-4105.65,3182.09],"6-49-7":[-4433.76,3042.62],"5-24-3":[-4433.76,3182.09],"6-49-8":[-4797.43,2652.87],"6-49-9":[-5015.21,2012.55],"5-24-4":[-5015.21,2833.9],"6-49-10":[-6312.12,334.77],"6-49-11":[-4263.69,101.28],"5-24-5":[-6312.12,2803.26],"6-49-12":[-4042.22,102],"6-49-13":[-4218.24,98.24],"5-24-6":[-5098.13,102],"6-49-14":[-6403.93,93.09],"6-49-15":[-6267.83,86.06],"5-24-7":[-6580.29,93.09],"6-49-16":[-6293.49,81.48],"6-49-17":[-5597.43,73.88],"5-24-8":[-6293.49,81.48],"6-49-18":[-5448.01,66.2],"6-49-19":[-5367.78,60.53],"5-24-9":[-6129.36,66.2],"6-49-20":[-4884.47,55.5],"6-49-21":[-4997.91,39.04],"5-24-10":[-4997.91,55.5],"6-49-22":[-4463.39,22.35],"6-49-23":[-3796.85,590.73],"5-24-11":[-4463.39,1973.99],"6-49-24":[-2425.07,2757.34],"6-49-25":[-305.26,1443.38],"5-24-12":[-2425.07,2757.34],"6-49-26":[-42.33,1372.15],"6-49-27":[-43.85,1922.31],"5-24-13":[-60.66,1922.31],"6-49-28":[-45.31,1258.47],"6-49-29":[-49.21,961.21],"5-24-14":[-65.14,1259.07],"6-49-30":[-109.15,1068.98],"6-49-31":[-4222.06,110.24],"5-24-15":[-4222.06,1068.98],"6-49-32":[-4682.57,79.72],"6-49-33":[-4896.78,1125.05],"5-24-16":[-4896.78,1125.05],"6-49-34":[-5688.41,966.21],"6-49-35":[-5559.66,1272.47],"5-24-17":[-5688.41,1298.57],"6-49-36":[-5912.92,2017.31],"6-49-37":[-5804.87,1423.16],"5-24-18":[-5912.92,2017.31],"6-49-38":[-6106.25,1567.33],"6-49-39":[-6381.23,2863.35],"5-24-19":[-6381.23,2863.35],"6-49-40":[-6341.73,694.74],"6-49-41":[-5511.51,-9.82],"5-24-20":[-6341.73,2060.99],"6-49-42":[-4982.01,-7.66],"6-49-43":[-5465.76,-7.18],"5-24-21":[-5465.76,-5.74],"6-49-44":[-4910.54,-6.72],"6-49-45":[-5277.97,-6.41],"5-24-22":[-5726.45,-5.73],"6-49-46":[-5311.51,-6.33],"6-49-47":[-5095.47,-4.79],"5-24-23":[-5311.51,-3.49],"6-49-48":[-4913.48,-0.71],"6-49-49":[-4767.83,15],"5-24-24":[-4913.48,16.97],"6-49-50":[-5488.9,15.14],"6-49-51":[-3939.76,37.34],"5-24-25":[-5488.9,37.34],"6-49-52":[-3572.36,40.03],"6-49-53":[-3055.63,450.7],"5-24-26":[-4250.99,2448.9],"6-49-54":[-2100.15,1967.18],"6-49-55":[-830.24,1959.77],"5-24-27":[-2100.15,2176.59],"6-49-56":[-499.68,462.22],"6-49-57":[-211.12,297.17],"5-24-28":[-625.27,462.22],"6-49-58":[-274.87,210.95],"6-49-59":[-342.73,50.33],"5-24-29":[-405.36,213.73],"6-49-60":[-160.19,1081.6],"6-49-61":[-2028.98,1679.35],"5-24-30":[-2028.98,1679.35],"6-49-62":[-3790.08,2265.71],"6-49-63":[-4219.2,2746.48],"5-24-31":[-4219.2,2746.48],"6-50-0":[-934.9,69.52],"6-50-1":[-1469.25,976.22],"6-50-2":[-737.71,1457.67],"6-50-3":[-1618.91,2355],"6-50-4":[-1269.34,2629.12],"6-50-5":[-3058.83,3200.74],"6-50-6":[-4224.36,3253.39],"6-50-7":[-4528.57,3209.33],"6-50-8":[-4867.96,3108.37],"6-50-9":[-5389.9,106.81],"6-50-10":[-5404.37,105.78],"6-50-11":[-3936.37,111.91],"6-50-12":[-3975.13,2633.15],"6-50-13":[-5213.59,108.32],"6-50-14":[-6122.93,103.27],"6-50-15":[-6062.21,96.8],"6-50-16":[-5451.29,93],"6-50-17":[-5793.05,87.83],"6-50-18":[-5441.17,80.4],"6-50-19":[-5078.03,76.44],"6-50-20":[-4896.54,68.85],"6-50-21":[-5006.6,47.85],"6-50-22":[-4983.72,31.01],"6-50-23":[-4241.18,12.45],"6-50-24":[-4270.18,2.19],"6-50-25":[-3977.54,109.32],"6-50-26":[-4394.4,914.15],"6-50-27":[-4327.88,559.81],"6-50-28":[-2118.33,1063.79],"6-50-29":[-34.54,1141.75],"6-50-30":[-3552.2,1000.51],"6-50-31":[-4554.15,-8.32],"6-50-32":[-5281.5,-10.92],"6-50-33":[-4950.78,1106.52],"6-50-34":[-6051.37,1190.32],"6-50-35":[-5728.2,1083.8],"6-50-36":[-6319.68,626.82],"6-50-37":[-6294.95,986.18],"6-50-38":[-7008.06,124.34],"6-50-39":[-6739.38,-5.86],"6-50-40":[-6851.27,-8.26],"6-50-41":[-5929.45,-6.03],"6-50-42":[-5432.53,-1.95],"6-50-43":[-4629.98,-2.36],"6-50-44":[-4319.88,-4.64],"6-50-45":[-5375.44,-4.06],"6-50-46":[-5352.82,-3.83],"6-50-47":[-4886.28,-3.1],"6-50-48":[-4927.65,0.55],"6-50-49":[-4878.3,12.98],"6-50-50":[-4465.96,23.35],"6-50-51":[-3742.67,2738.7],"6-50-52":[-3572.36,41.64],"6-50-53":[-3233.45,44],"6-50-54":[-2680.33,41.06],"6-50-55":[-1017.21,3258.28],"6-50-56":[-385.83,2270.17],"6-50-57":[-210.97,833.52],"6-50-58":[-293.35,735.1],"6-50-59":[-224.42,580.16],"6-50-60":[-151.03,1003.54],"6-50-61":[-1755.39,1715.15],"6-50-62":[-3795.59,2262.46],"6-50-63":[-4236.22,2746.48],"6-51-0":[-907.39,120.52],"6-51-1":[-1308.24,740.14],"5-25-0":[-1469.25,976.22],"6-51-2":[-1060.28,1225.55],"6-51-3":[-1586.02,2251.74],"5-25-1":[-1618.91,2355],"4-12-0":[-1856.43,2469.75],"6-51-4":[-1120.27,2558.11],"6-51-5":[-3440.48,3116.18],"5-25-2":[-3440.48,3200.74],"6-51-6":[-4327.81,3190.72],"6-51-7":[-4613.28,3318.44],"5-25-3":[-4613.28,3318.44],"4-12-1":[-4613.28,3318.44],"6-51-8":[-4928.05,2952.11],"6-51-9":[-5317.04,111.55],"5-25-4":[-5389.9,3108.37],"6-51-10":[-5773.22,118.01],"6-51-11":[-3983.49,122.71],"5-25-5":[-5773.22,122.71],"4-12-2":[-6312.12,3108.37],"6-51-12":[-4736.44,2776.21],"6-51-13":[-5062.61,118.71],"5-25-6":[-5213.59,2776.21],"6-51-14":[-5842.32,113.3],"6-51-15":[-5917.21,108.7],"5-25-7":[-6122.93,113.3],"4-12-3":[-6580.29,2776.21],"6-51-16":[-5510.34,107.59],"6-51-17":[-5386.95,102.26],"5-25-8":[-5793.05,107.59],"6-51-18":[-5246.88,98.78],"6-51-19":[-5023.93,94.27],"5-25-9":[-5441.17,98.78],"4-12-4":[-6293.49,107.59],"6-51-20":[-4702.21,77.17],"6-51-21":[-4520.84,56.25],"5-25-10":[-5006.6,77.17],"6-51-22":[-4931.19,41.92],"6-51-23":[-5003.58,22.97],"5-25-11":[-5003.58,41.92],"4-12-5":[-5006.6,1973.99],"6-51-24":[-4927.8,19.11],"6-51-25":[-4549.86,11.37],"5-25-12":[-4927.8,109.32],"6-51-26":[-4810.57,4.22],"6-51-27":[-4861.84,-3.86],"5-25-13":[-4861.84,914.15],"4-12-6":[-4927.8,2757.34],"6-51-28":[-4937.15,981.16],"6-51-29":[-4430.45,1135.93],"5-25-14":[-4937.15,1141.75],"6-51-30":[-4404.87,305.41],"6-51-31":[-4637.59,-1.06],"5-25-15":[-4637.59,1000.51],"4-12-7":[-4937.15,1259.07],"6-51-32":[-5219.05,-5.27],"6-51-33":[-4625.84,315.67],"5-25-16":[-5281.5,1106.52],"6-51-34":[-5717.47,1194.05],"6-51-35":[-6295.78,1027.17],"5-25-17":[-6295.78,1194.05],"4-12-8":[-6295.78,1298.57],"6-51-36":[-6924.46,-9.5],"6-51-37":[-6878,-8.12],"5-25-18":[-6924.46,986.18],"6-51-38":[-6234.42,-6.58],"6-51-39":[-6390.19,-3.54],"5-25-19":[-7008.06,124.34],"4-12-9":[-7008.06,2863.35],"6-51-40":[-7677.07,-6.14],"6-51-41":[-6648.02,-2.7],"5-25-20":[-7677.07,-2.7],"6-51-42":[-5887.74,4.88],"6-51-43":[-4881.84,4.82],"5-25-21":[-5887.74,4.88],"4-12-10":[-7677.07,2060.99],"6-51-44":[-4683.33,-0.42],"6-51-45":[-4718.71,-0.49],"5-25-22":[-5375.44,-0.42],"6-51-46":[-4904.66,-0.3],"6-51-47":[-4464.49,0.52],"5-25-23":[-5352.82,0.52],"4-12-11":[-5726.45,0.52],"6-51-48":[-4783.84,5.1],"6-51-49":[-5104.6,16.37],"5-25-24":[-5104.6,16.37],"6-51-50":[-4801.07,28.17],"6-51-51":[-3120.41,2916.19],"5-25-25":[-4801.07,2916.19],"4-12-12":[-5488.9,2916.19],"6-51-52":[-3181.33,44.42],"6-51-53":[-3383.44,45.57],"5-25-26":[-3572.36,45.57],"6-51-54":[-2894.6,41.85],"6-51-55":[-1321.25,3107.62],"5-25-27":[-2894.6,3258.28],"4-12-13":[-4250.99,3258.28],"6-51-56":[-153.79,2672.67],"6-51-57":[-145.78,1240.65],"5-25-28":[-385.83,2672.67],"6-51-58":[-210.99,1318.26],"6-51-59":[-468.11,682.83],"5-25-29":[-468.11,1318.26],"4-12-14":[-625.27,2672.67],"6-51-60":[-296.25,994.66],"6-51-61":[-1099.16,1785.3],"5-25-30":[-1755.39,1785.3],"6-51-62":[-3959.51,2257.85],"6-51-63":[-4228.8,2746.48],"5-25-31":[-4236.22,2746.48],"4-12-15":[-4236.22,2746.48],"6-52-0":[-733.46,128.52],"6-52-1":[-1214.07,792.32],"6-52-2":[-1144.24,1141.68],"6-52-3":[-1607.7,2076.74],"6-52-4":[-959.91,2521.51],"6-52-5":[-3476.54,2887.36],"6-52-6":[-4419.2,3023.83],"6-52-7":[-4739.83,3002.57],"6-52-8":[-4949.2,1206.68],"6-52-9":[-5254.67,120.01],"6-52-10":[-5012.8,125.87],"6-52-11":[-4183.89,126.28],"6-52-12":[-7086.05,122.56],"6-52-13":[-4742.87,121.98],"6-52-14":[-5741.02,120.69],"6-52-15":[-5712.7,118.59],"6-52-16":[-5649.06,117.92],"6-52-17":[-5750.86,956.08],"6-52-18":[-5457.64,292.1],"6-52-19":[-5232.26,98.45],"6-52-20":[-5260.33,80.32],"6-52-21":[-4887.73,62.32],"6-52-22":[-5495.99,49.65],"6-52-23":[-5492.27,32.21],"6-52-24":[-5015.71,30.74],"6-52-25":[-5073.96,27.03],"6-52-26":[-5048.05,18.42],"6-52-27":[-5662.8,3.79],"6-52-28":[-5485.53,1.81],"6-52-29":[-5441.5,9.77],"6-52-30":[-5026.25,1799.5],"6-52-31":[-4933.34,9.72],"6-52-32":[-4854.58,1.12],"6-52-33":[-5356.72,236.48],"6-52-34":[-5355.94,-6.99],"6-52-35":[-6308.17,-9.64],"6-52-36":[-7469.7,-7.29],"6-52-37":[-6466.58,-6.71],"6-52-38":[-5677.51,-5.18],"6-52-39":[-5879.9,-4.33],"6-52-40":[-6914.98,-5.17],"6-52-41":[-6668.6,0.3],"6-52-42":[-5783.44,5.27],"6-52-43":[-4800.88,6.16],"6-52-44":[-3657.96,8.81],"6-52-45":[-3599.29,299.98],"6-52-46":[-4106.24,909.05],"6-52-47":[-4134.65,9.11],"6-52-48":[-4445.46,11.62],"6-52-49":[-4535.08,20.83],"6-52-50":[-4818.88,31.49],"6-52-51":[-3539.4,44.15],"6-52-52":[-3219.89,48.11],"6-52-53":[-3059.39,47.57],"6-52-54":[-2932.62,39.99],"6-52-55":[-2319.46,1511.36],"6-52-56":[-1028.73,3019.59],"6-52-57":[-6.52,1863.6],"6-52-58":[-117.54,2132.8],"6-52-59":[-470.01,1124.55],"6-52-60":[-286.17,1099.18],"6-52-61":[-908.43,1887.29],"6-52-62":[-4139.66,2271.2],"6-52-63":[-4259.41,2746.48],"6-53-0":[-809.92,127.52],"6-53-1":[-947.44,1084.84],"5-26-0":[-1214.07,1084.84],"6-53-2":[-956.82,1208.94],"6-53-3":[-2013.41,1866.38],"5-26-1":[-2013.41,2076.74],"6-53-4":[-1764.48,2511.91],"6-53-5":[-3618.3,2633.93],"5-26-2":[-3618.3,2887.36],"6-53-6":[-4517.43,2633.93],"6-53-7":[-4776.29,3982.86],"5-26-3":[-4776.29,3982.86],"6-53-8":[-4996.61,121.21],"6-53-9":[-5272.07,128.08],"5-26-4":[-5272.07,1206.68],"6-53-10":[-5305.35,129.5],"6-53-11":[-4591.49,127.45],"5-26-5":[-5305.35,129.5],"6-53-12":[-8129.66,122.28],"6-53-13":[-5430.02,127.23],"5-26-6":[-8129.66,127.23],"6-53-14":[-5642.1,129.8],"6-53-15":[-5516.49,129.69],"5-26-7":[-5741.02,129.8],"6-53-16":[-5390.18,129.28],"6-53-17":[-5280.21,123.07],"5-26-8":[-5750.86,956.08],"6-53-18":[-4871.36,2346.09],"6-53-19":[-5425.47,100.63],"5-26-9":[-5457.64,2346.09],"6-53-20":[-4690.2,83.95],"6-53-21":[-5286.82,69.72],"5-26-10":[-5286.82,83.95],"6-53-22":[-5993.62,52.25],"6-53-23":[-5992.94,40.62],"5-26-11":[-5993.62,52.25],"6-53-24":[-5509.86,1698.2],"6-53-25":[-6172.64,36.9],"5-26-12":[-6172.64,1698.2],"6-53-26":[-5853.26,31.78],"6-53-27":[-6369.72,19.03],"5-26-13":[-6369.72,31.78],"6-53-28":[-5966.33,13.16],"6-53-29":[-5889.03,18.26],"5-26-14":[-5966.33,18.26],"6-53-30":[-5882.35,18.06],"6-53-31":[-5211.23,16.65],"5-26-15":[-5882.35,1799.5],"6-53-32":[-4558.97,11.61],"6-53-33":[-4701.82,-1.77],"5-26-16":[-5356.72,236.48],"6-53-34":[-5295.87,-5.37],"6-53-35":[-6621.27,-7.87],"5-26-17":[-6621.27,-5.37],"6-53-36":[-6149.42,-7.1],"6-53-37":[-6059.63,-6.55],"5-26-18":[-7469.7,-6.55],"6-53-38":[-5287.23,-5.31],"6-53-39":[-6580.97,584.18],"5-26-19":[-6580.97,584.18],"6-53-40":[-6305.15,-3.59],"6-53-41":[-6288.64,2.46],"5-26-20":[-6914.98,2.46],"6-53-42":[-5252.94,10.35],"6-53-43":[-4611.72,13.56],"5-26-21":[-5783.44,13.56],"6-53-44":[-3688.88,18.1],"6-53-45":[-3553.03,2273.57],"5-26-22":[-3688.88,2273.57],"6-53-46":[-3357.17,19.28],"6-53-47":[-3667.73,20.12],"5-26-23":[-4134.65,909.05],"6-53-48":[-3844.29,21.48],"6-53-49":[-4138.56,25.29],"5-26-24":[-4535.08,25.29],"6-53-50":[-4790.72,32.32],"6-53-51":[-3440.33,44.34],"5-26-25":[-4818.88,44.34],"6-53-52":[-3980.63,48.37],"6-53-53":[-2353.14,48.14],"5-26-26":[-3980.63,48.37],"6-53-54":[-2657.56,40.04],"6-53-55":[-2300.41,22.99],"5-26-27":[-2932.62,1511.36],"6-53-56":[-606.79,3601.13],"6-53-57":[-1293.17,2772.76],"5-26-28":[-1293.17,3601.13],"6-53-58":[-778.68,2578.34],"6-53-59":[-343.06,1326.38],"5-26-29":[-778.68,2578.34],"6-53-60":[-301.96,1634.18],"6-53-61":[-1086.2,1960.78],"5-26-30":[-1086.2,1960.78],"6-53-62":[-4340.78,2301.31],"6-53-63":[-4271.39,2746.48],"5-26-31":[-4340.78,2746.48],"6-54-0":[-754.78,88.51],"6-54-1":[-695.88,963.85],"6-54-2":[-418.94,1073.68],"6-54-3":[-2490,1676.23],"6-54-4":[-1598.54,2416.2],"6-54-5":[-3641.22,2217.34],"6-54-6":[-4536.45,2458.39],"6-54-7":[-4805.67,2560.61],"6-54-8":[-5052.79,127.95],"6-54-9":[-5437.3,130.4],"6-54-10":[-7400.45,984.27],"6-54-11":[-6940.26,1259.84],"6-54-12":[-8445.16,122.78],"6-54-13":[-5307.61,127.15],"6-54-14":[-5355.46,131.06],"6-54-15":[-5217.86,132.17],"6-54-16":[-5140.39,129.76],"6-54-17":[-4935.97,122.83],"6-54-18":[-4706.91,1086.32],"6-54-19":[-5082.4,100.89],"6-54-20":[-5179.26,82.99],"6-54-21":[-5666.62,66.49],"6-54-22":[-6090.48,53.95],"6-54-23":[-6169.21,42.86],"6-54-24":[-6313.67,45.39],"6-54-25":[-6126.45,1434.62],"6-54-26":[-6062.27,41.69],"6-54-27":[-6226.38,30.03],"6-54-28":[-6103.99,22.91],"6-54-29":[-6024.65,23.82],"6-54-30":[-6448.31,22.61],"6-54-31":[-5649.85,20.6],"6-54-32":[-5202.51,18.27],"6-54-33":[-5070.73,1.49],"6-54-34":[-5639,-1.98],"6-54-35":[-5982.46,-5.32],"6-54-36":[-6017.65,-6.18],"6-54-37":[-5355.92,-6.1],"6-54-38":[-4934.39,1347.61],"6-54-39":[-5602.69,-5.14],"6-54-40":[-5816.35,-0.74],"6-54-41":[-5840.06,5.66],"6-54-42":[-5618.61,12.5],"6-54-43":[-5587.6,19.2],"6-54-44":[-5458.07,24.93],"6-54-45":[-3690.54,1045.93],"6-54-46":[-4181.35,27.23],"6-54-47":[-3525.7,28],"6-54-48":[-4185.13,28.86],"6-54-49":[-4218.21,32.39],"6-54-50":[-4267.86,35.56],"6-54-51":[-3736.27,43.39],"6-54-52":[-3618.08,1349.09],"6-54-53":[-3154.88,1035.34],"6-54-54":[-1757.64,38.39],"6-54-55":[-1268.84,21.85],"6-54-56":[-1242.39,2823.54],"6-54-57":[-1478.9,2688.59],"6-54-58":[-756.79,2458.1],"6-54-59":[-426.59,2385.99],"6-54-60":[-450.17,1787.39],"6-54-61":[-1732.42,2012.99],"6-54-62":[-4431.77,2336.23],"6-54-63":[-4266.36,2746.48],"6-55-0":[-773.63,75.52],"6-55-1":[-909.04,906.14],"5-27-0":[-909.04,963.85],"6-55-2":[-384.43,939.66],"6-55-3":[-2740.34,1854.31],"5-27-1":[-2740.34,1854.31],"4-13-0":[-2740.34,2076.74],"6-55-4":[-1511.29,2030.68],"6-55-5":[-3639.12,2071.97],"5-27-2":[-3641.22,2416.2],"6-55-6":[-4571.3,2327.64],"6-55-7":[-4921.03,1988.61],"5-27-3":[-4921.03,2560.61],"4-13-1":[-4921.03,3982.86],"3-6-0":[-4921.03,3982.86],"6-55-8":[-5022.04,1471.32],"6-55-9":[-5224.27,194.14],"5-27-4":[-5437.3,1471.32],"6-55-10":[-7788.44,129.91],"6-55-11":[-8273.63,126.1],"5-27-5":[-8273.63,1259.84],"4-13-2":[-8273.63,1471.32],"6-55-12":[-7837.58,126.1],"6-55-13":[-5124.34,126.13],"5-27-6":[-8445.16,127.15],"6-55-14":[-5117.88,129.01],"6-55-15":[-4967.25,131.88],"5-27-7":[-5355.46,132.17],"4-13-3":[-8445.16,132.17],"3-6-1":[-8445.16,3108.37],"6-55-16":[-4833.04,129.91],"6-55-17":[-4637.36,120.26],"5-27-8":[-5140.39,129.91],"6-55-18":[-4526.53,1131.62],"6-55-19":[-4501.61,100.95],"5-27-9":[-5082.4,1131.62],"4-13-4":[-5750.86,2346.09],"6-55-20":[-5093.86,76.17],"6-55-21":[-5753.2,63.94],"5-27-10":[-5753.2,82.99],"6-55-22":[-5978.68,55.85],"6-55-23":[-6224.65,50.59],"5-27-11":[-6224.65,55.85],"4-13-5":[-6224.65,83.95],"3-6-2":[-6293.49,2346.09],"6-55-24":[-6228.02,51.75],"6-55-25":[-6270.35,2003.8],"5-27-12":[-6313.67,2003.8],"6-55-26":[-6240.19,2815.55],"6-55-27":[-6433.11,37.39],"5-27-13":[-6433.11,2815.55],"4-13-6":[-6433.11,2815.55],"6-55-28":[-6295.21,31.14],"6-55-29":[-6099.62,32.89],"5-27-14":[-6295.21,32.89],"6-55-30":[-6399.44,30.93],"6-55-31":[-5954.07,23.87],"5-27-15":[-6448.31,30.93],"4-13-7":[-6448.31,1799.5],"3-6-3":[-6448.31,2815.55],"6-55-32":[-5049.31,20.71],"6-55-33":[-4783.68,8.19],"5-27-16":[-5202.51,20.71],"6-55-34":[-5310.1,4],"6-55-35":[-5627.49,-1.23],"5-27-17":[-5982.46,4],"4-13-8":[-6621.27,236.48],"6-55-36":[-5557.2,-2.77],"6-55-37":[-4574.29,2699.54],"5-27-18":[-6017.65,2699.54],"6-55-38":[-4364.05,1963.83],"6-55-39":[-5227.73,-2.51],"5-27-19":[-5602.69,1963.83],"4-13-9":[-7469.7,2699.54],"3-6-4":[-7469.7,2863.35],"6-55-40":[-5398.44,3.34],"6-55-41":[-5418.06,11.75],"5-27-20":[-5840.06,11.75],"6-55-42":[-5567.95,18.07],"6-55-43":[-5910.79,25.53],"5-27-21":[-5910.79,25.53],"4-13-10":[-6914.98,25.53],"6-55-44":[-5858.3,32.41],"6-55-45":[-5328.4,1066.57],"5-27-22":[-5858.3,1066.57],"6-55-46":[-4416.42,36.95],"6-55-47":[-4492.85,36.98],"5-27-23":[-4492.85,36.98],"4-13-11":[-5858.3,2273.57],"3-6-5":[-7677.07,2273.57],"6-55-48":[-4477.06,36.96],"6-55-49":[-4483.64,37.24],"5-27-24":[-4483.64,37.24],"6-55-50":[-4294.04,39.76],"6-55-51":[-4067.88,42.27],"5-27-25":[-4294.04,43.39],"4-13-12":[-4818.88,44.34],"6-55-52":[-3984.71,37.89],"6-55-53":[-3551.53,38.97],"5-27-26":[-3984.71,1349.09],"6-55-54":[-1641.24,173.11],"6-55-55":[-1355.39,1438.49],"5-27-27":[-1757.64,1438.49],"4-13-13":[-3984.71,1511.36],"3-6-6":[-5488.9,3258.28],"6-55-56":[-1512.26,2044.53],"6-55-57":[-1226.91,2666.25],"5-27-28":[-1512.26,2823.54],"6-55-58":[-678.79,2014.72],"6-55-59":[-910.8,2088.28],"5-27-29":[-910.8,2458.1],"4-13-14":[-1512.26,3601.13],"6-55-60":[-652.73,1737.31],"6-55-61":[-3251.34,2103.65],"5-27-30":[-3251.34,2103.65],"6-55-62":[-4488.79,2360.08],"6-55-63":[-4270.87,2746.48],"5-27-31":[-4488.79,2746.48],"4-13-15":[-4488.79,2746.48],"3-6-7":[-4488.79,3601.13],"6-56-0":[-774.61,63.52],"6-56-1":[-909.04,872.66],"6-56-2":[-422.73,1232.27],"6-56-3":[-2742.33,1544.62],"6-56-4":[-1114.07,1035.02],"6-56-5":[-3179.65,1653.87],"6-56-6":[-4594.77,1002],"6-56-7":[-4924.28,671.1],"6-56-8":[-5019,1784.7],"6-56-9":[-5199.04,1475.57],"6-56-10":[-6481.97,128.25],"6-56-11":[-5268.9,126.29],"6-56-12":[-5631.13,126.29],"6-56-13":[-5336.55,126.21],"6-56-14":[-4959.12,126.55],"6-56-15":[-4734.53,127.18],"6-56-16":[-4920.4,126.5],"6-56-17":[-4441.83,117.02],"6-56-18":[-4364.6,106.96],"6-56-19":[-4479.79,92.67],"6-56-20":[-4807.92,81.82],"6-56-21":[-5147.88,72.03],"6-56-22":[-5777.15,65.54],"6-56-23":[-5742.39,64.24],"6-56-24":[-6087.05,52.11],"6-56-25":[-5930.72,53.98],"6-56-26":[-5982.95,52.63],"6-56-27":[-6107.29,44.22],"6-56-28":[-6675.95,40.2],"6-56-29":[-5957.58,37.67],"6-56-30":[-5964.89,36.23],"6-56-31":[-7097.01,26.97],"6-56-32":[-5371.34,25.11],"6-56-33":[-4808.56,15.56],"6-56-34":[-4714.13,11.93],"6-56-35":[-5258.45,18.59],"6-56-36":[-5112.44,4.11],"6-56-37":[-4736.03,0.85],"6-56-38":[-3880.88,0.68],"6-56-39":[-4794.46,1.89],"6-56-40":[-4889.28,8.4],"6-56-41":[-5026.05,16.04],"6-56-42":[-5214.14,22.14],"6-56-43":[-5362.66,30.63],"6-56-44":[-5615.35,36.65],"6-56-45":[-5576.93,40.5],"6-56-46":[-5354.96,43.37],"6-56-47":[-6001.14,44.13],"6-56-48":[-4965.81,43.98],"6-56-49":[-4608.39,41.79],"6-56-50":[-4520.54,41.65],"6-56-51":[-4015.97,42.33],"6-56-52":[-3435.94,40.96],"6-56-53":[-4034.45,41.96],"6-56-54":[-1992.34,1450.89],"6-56-55":[-566.09,1695.97],"6-56-56":[-1528.23,1011.13],"6-56-57":[-608.36,1329.89],"6-56-58":[-531.53,1771.7],"6-56-59":[-1105.87,1695.38],"6-56-60":[-1294.97,1632.27],"6-56-61":[-3320.58,2172.84],"6-56-62":[-4500.76,2379.92],"6-56-63":[-4387.83,2746.48],"6-57-0":[-830.8,52.51],"6-57-1":[-644.38,541.88],"5-28-0":[-909.04,872.66],"6-57-2":[-469.54,919.88],"6-57-3":[-1635.29,1436.69],"5-28-1":[-2742.33,1544.62],"6-57-4":[-1835.91,748.02],"6-57-5":[-1621.7,949.92],"5-28-2":[-3179.65,1653.87],"6-57-6":[-4643.42,115.49],"6-57-7":[-4970.55,126.66],"5-28-3":[-4970.55,1002],"6-57-8":[-5107.08,1937.43],"6-57-9":[-5242.54,2123.62],"5-28-4":[-5242.54,2123.62],"6-57-10":[-5693.64,124.91],"6-57-11":[-5329.67,123.99],"5-28-5":[-6481.97,128.25],"6-57-12":[-5384.49,123.99],"6-57-13":[-4791.5,122.5],"5-28-6":[-5631.13,126.29],"6-57-14":[-4728.1,124.14],"6-57-15":[-4503.56,123],"5-28-7":[-4959.12,127.18],"6-57-16":[-4242.46,119.6],"6-57-17":[-4149.79,110.36],"5-28-8":[-4920.4,126.5],"6-57-18":[-4243.75,101.63],"6-57-19":[-4386.42,95.46],"5-28-9":[-4479.79,106.96],"6-57-20":[-4570.43,1880.85],"6-57-21":[-4843.17,2439.69],"5-28-10":[-5147.88,2439.69],"6-57-22":[-5236.17,1522.97],"6-57-23":[-5741.26,68.01],"5-28-11":[-5777.15,1522.97],"6-57-24":[-5614.52,116.51],"6-57-25":[-5297.41,60.59],"5-28-12":[-6087.05,116.51],"6-57-26":[-5603.59,171.48],"6-57-27":[-5382.72,57.96],"5-28-13":[-6107.29,171.48],"6-57-28":[-5194.58,53.31],"6-57-29":[-5536.19,43.04],"5-28-14":[-6675.95,53.31],"6-57-30":[-5589.52,37.19],"6-57-31":[-7749.42,33.41],"5-28-15":[-7749.42,37.19],"6-57-32":[-6535.92,34.41],"6-57-33":[-5119.28,26.59],"5-28-16":[-6535.92,34.41],"6-57-34":[-5045.49,24.73],"6-57-35":[-5489.86,64.15],"5-28-17":[-5489.86,64.15],"6-57-36":[-4822.11,32.17],"6-57-37":[-4030.39,167.47],"5-28-18":[-5112.44,167.47],"6-57-38":[-3442.1,26.06],"6-57-39":[-4106.03,77.57],"5-28-19":[-4794.46,77.57],"6-57-40":[-3840.8,15.84],"6-57-41":[-4457.53,1486.33],"5-28-20":[-5026.05,1486.33],"6-57-42":[-4775,2391.26],"6-57-43":[-4880.59,1794.09],"5-28-21":[-5362.66,2391.26],"6-57-44":[-5715.96,40.42],"6-57-45":[-5874.66,45.89],"5-28-22":[-5874.66,45.89],"6-57-46":[-5731.84,49.37],"6-57-47":[-5915.23,50.19],"5-28-23":[-6001.14,50.19],"6-57-48":[-5019.61,50.16],"6-57-49":[-4959.49,48.13],"5-28-24":[-5019.61,50.16],"6-57-50":[-4915.16,45.48],"6-57-51":[-2574.6,44.16],"5-28-25":[-4915.16,45.48],"6-57-52":[-2779.21,42.18],"6-57-53":[-2770.8,42.48],"5-28-26":[-4034.45,42.48],"6-57-54":[-2250.06,2074.83],"6-57-55":[-937.18,1823.2],"5-28-27":[-2250.06,2074.83],"6-57-56":[-2391.06,13.36],"6-57-57":[-1732.19,11.7],"5-28-28":[-2391.06,1329.89],"6-57-58":[-480,1116.85],"6-57-59":[-648.11,1811.71],"5-28-29":[-1105.87,1811.71],"6-57-60":[-581.27,1663.61],"6-57-61":[-3797.26,2225.4],"5-28-30":[-3797.26,2225.4],"6-57-62":[-4462.42,2420.8],"6-57-63":[-4395.9,2746.48],"5-28-31":[-4500.76,2746.48],"6-58-0":[-1148.46,66.14],"6-58-1":[-665.78,663],"6-58-2":[-313.37,1111.16],"6-58-3":[-1468.54,664.4],"6-58-4":[-1187.8,1036.71],"6-58-5":[-1368.34,949.82],"6-58-6":[-4702.71,116.37],"6-58-7":[-4948.55,124.92],"6-58-8":[-5107.83,1885.38],"6-58-9":[-5547.42,2140.58],"6-58-10":[-5606.58,121.69],"6-58-11":[-6067.01,123.87],"6-58-12":[-5079.01,123.87],"6-58-13":[-4653.01,123.14],"6-58-14":[-4703.6,119.28],"6-58-15":[-4200.54,118.34],"6-58-16":[-4449.71,118.05],"6-58-17":[-4235.37,106.08],"6-58-18":[-4790.67,104.94],"6-58-19":[-4811.33,99.37],"6-58-20":[-4716.62,1402.2],"6-58-21":[-4379.44,3730.85],"6-58-22":[-4656.43,1980.83],"6-58-23":[-5347.55,745.87],"6-58-24":[-5267.8,535.71],"6-58-25":[-5167.21,356.34],"6-58-26":[-4869.58,135.29],"6-58-27":[-4636.76,301.55],"6-58-28":[-4670.67,458.6],"6-58-29":[-4517.78,728.66],"6-58-30":[-4838.32,41.91],"6-58-31":[-5688.29,38.21],"6-58-32":[-5734.08,38.21],"6-58-33":[-5055.81,33.98],"6-58-34":[-5032.26,864.67],"6-58-35":[-4600.32,429.6],"6-58-36":[-54.18,293.54],"6-58-37":[-1031.12,160.54],"6-58-38":[-1535.05,305.33],"6-58-39":[-68.02,458.89],"6-58-40":[-2869.5,631.86],"6-58-41":[-3974.67,1938.63],"6-58-42":[-4394.56,3619.16],"6-58-43":[-4562.11,1377.96],"6-58-44":[-5087.64,40.21],"6-58-45":[-5651.93,47.1],"6-58-46":[-5721.22,50.18],"6-58-47":[-5752.16,52.72],"6-58-48":[-4937.63,54.26],"6-58-49":[-4956.28,51.82],"6-58-50":[-4777.71,49.92],"6-58-51":[-3124.35,46.02],"6-58-52":[-1653.76,42.72],"6-58-53":[-2623.27,41.86],"6-58-54":[-2249.64,2067.07],"6-58-55":[-1286.31,1823.02],"6-58-56":[-1838.64,13.48],"6-58-57":[-2627.31,357.87],"6-58-58":[-2489.23,1674.63],"6-58-59":[-525.93,1949.57],"6-58-60":[-412.71,1790.34],"6-58-61":[-3836.73,2289.94],"6-58-62":[-4429.02,2460.86],"6-58-63":[-4376.9,2746.48],"6-59-0":[-1206.49,37.79],"6-59-1":[-771.79,804.61],"5-29-0":[-1206.49,804.61],"6-59-2":[-502.92,913.12],"6-59-3":[-1477.39,666.92],"5-29-1":[-1477.39,1111.16],"4-14-0":[-2742.33,1544.62],"6-59-4":[-1221.06,985.85],"6-59-5":[-1102.26,2634.47],"5-29-2":[-1368.34,2634.47],"6-59-6":[-4507.92,590.06],"6-59-7":[-5028.45,119.95],"5-29-3":[-5028.45,590.06],"4-14-1":[-5028.45,2634.47],"6-59-8":[-5146.03,1189.75],"6-59-9":[-5583.49,125.87],"5-29-4":[-5583.49,2140.58],"6-59-10":[-5586.8,120.74],"6-59-11":[-6953.14,121.48],"5-29-5":[-6953.14,123.87],"4-14-2":[-6953.14,2140.58],"6-59-12":[-5147.12,121.88],"6-59-13":[-4354.82,123],"5-29-6":[-5147.12,123.87],"6-59-14":[-4318.08,118.25],"6-59-15":[-5252.69,112.43],"5-29-7":[-5252.69,119.28],"4-14-3":[-5631.13,127.18],"6-59-16":[-4267.14,112.43],"6-59-17":[-4115.34,102.32],"5-29-8":[-4449.71,118.05],"6-59-18":[-4149.18,1976.1],"6-59-19":[-4477.69,98.54],"5-29-9":[-4811.33,1976.1],"4-14-4":[-4920.4,1976.1],"6-59-20":[-4890.61,88.87],"6-59-21":[-4996.43,731.97],"5-29-10":[-4996.43,3730.85],"6-59-22":[-5046.75,609.23],"6-59-23":[-5769,951.26],"5-29-11":[-5769,1980.83],"4-14-5":[-5777.15,3730.85],"6-59-24":[-5613.69,838.62],"6-59-25":[-4980.13,699.41],"5-29-12":[-5613.69,838.62],"6-59-26":[-4879.62,480.98],"6-59-27":[-4556.45,1567.34],"5-29-13":[-4879.62,1567.34],"4-14-6":[-6107.29,1567.34],"6-59-28":[-3942.58,1463.87],"6-59-29":[-5153.94,935.28],"5-29-14":[-5153.94,1463.87],"6-59-30":[-4808.82,49.38],"6-59-31":[-5536.73,40.51],"5-29-15":[-5688.29,49.38],"4-14-7":[-7749.42,1463.87],"6-59-32":[-5359.65,40.61],"6-59-33":[-4901.26,39.26],"5-29-16":[-5734.08,40.61],"6-59-34":[-4767.54,846.28],"6-59-35":[-25.15,1448.88],"5-29-17":[-5032.26,1448.88],"4-14-8":[-6535.92,1448.88],"6-59-36":[8.78,1514.42],"6-59-37":[8.23,473.97],"5-29-18":[-1031.12,1514.42],"6-59-38":[8.08,659.04],"6-59-39":[8.16,820.4],"5-29-19":[-1535.05,820.4],"4-14-9":[-5112.44,1514.42],"6-59-40":[9.22,900.26],"6-59-41":[-1973.23,613.04],"5-29-20":[-3974.67,1938.63],"6-59-42":[-3432.46,677.68],"6-59-43":[-4528.95,35.12],"5-29-21":[-4562.11,3619.16],"4-14-10":[-5362.66,3619.16],"6-59-44":[-5013.92,39.98],"6-59-45":[-5484.61,2060.11],"5-29-22":[-5651.93,2060.11],"6-59-46":[-5484.61,50.12],"6-59-47":[-5342,52.47],"5-29-23":[-5752.16,52.72],"4-14-11":[-6001.14,2060.11],"6-59-48":[-5782.44,55.19],"6-59-49":[-4748.58,55.91],"5-29-24":[-5782.44,55.91],"6-59-50":[-2644.4,53.48],"6-59-51":[-2954.78,49.06],"5-29-25":[-4777.71,53.48],"4-14-12":[-5782.44,55.91],"6-59-52":[-2619.14,44.55],"6-59-53":[-2018.58,39.12],"5-29-26":[-2623.27,44.55],"6-59-54":[-1697.04,33.19],"6-59-55":[-1710.62,1126.25],"5-29-27":[-2249.64,2067.07],"4-14-13":[-4034.45,2074.83],"6-59-56":[-2070.49,14.62],"6-59-57":[-3062.21,608.1],"5-29-28":[-3062.21,608.1],"6-59-58":[-2999.86,2647.27],"6-59-59":[-474.44,2213.91],"5-29-29":[-2999.86,2647.27],"4-14-14":[-3062.21,2647.27],"6-59-60":[-374.42,1899.59],"6-59-61":[-3953.82,2337.34],"5-29-30":[-3953.82,2337.34],"6-59-62":[-4440.83,2494.91],"6-59-63":[-4361.23,2746.48],"5-29-31":[-4440.83,2746.48],"4-14-15":[-4500.76,2746.48],"6-60-0":[-1299.63,37.78],"6-60-1":[-925.01,799.08],"6-60-2":[-888.63,844.65],"6-60-3":[-1564.59,1285.49],"6-60-4":[-1370.09,821.15],"6-60-5":[-861.46,2604.03],"6-60-6":[-2131.54,850.01],"6-60-7":[-5034.9,115.86],"6-60-8":[-5132.02,123.35],"6-60-9":[-5381,123.85],"6-60-10":[-5892.44,119.67],"6-60-11":[-6972.08,467.08],"6-60-12":[-5129.93,847.15],"6-60-13":[-4115.41,1061.19],"6-60-14":[-5149.97,118.9],"6-60-15":[-4197.74,106.06],"6-60-16":[-4496.35,848.03],"6-60-17":[-4334.49,934.31],"6-60-18":[-4285.89,948.19],"6-60-19":[-4575.69,97.22],"6-60-20":[-4698.24,3428.78],"6-60-21":[-4892.13,3435.16],"6-60-22":[-4748.59,753.26],"6-60-23":[-5350.38,625.45],"6-60-24":[-4910.61,621.86],"6-60-25":[-4648.03,616.33],"6-60-26":[-4676.41,571.22],"6-60-27":[-4867.15,986.01],"6-60-28":[-4699.54,1965.58],"6-60-29":[-4703.7,1465.14],"6-60-30":[-4667.95,448.45],"6-60-31":[-5397.54,41.59],"6-60-32":[-5480.26,40.1],"6-60-33":[-4905.17,384.5],"6-60-34":[-3030.57,1362.69],"6-60-35":[11.08,1866.57],"6-60-36":[9.95,974],"6-60-37":[10.09,560.21],"6-60-38":[10.53,590.61],"6-60-39":[11.82,617.24],"6-60-40":[12.34,504.44],"6-60-41":[13.01,728.38],"6-60-42":[-2724.53,3423.9],"6-60-43":[-4462.04,3558.63],"6-60-44":[-4869.33,38.1],"6-60-45":[-5088.63,920.71],"6-60-46":[-5053.46,931.45],"6-60-47":[-5012.51,826.02],"6-60-48":[-5033.05,56.45],"6-60-49":[-4522.14,56.31],"6-60-50":[-1171.04,965.28],"6-60-51":[-2688.99,777.38],"6-60-52":[-2494.46,322.12],"6-60-53":[-2239.43,37.45],"6-60-54":[-2334.36,27.21],"6-60-55":[-2566.02,18.18],"6-60-56":[-2200.43,18.97],"6-60-57":[-2916.5,1445.48],"6-60-58":[-3327.48,2647.27],"6-60-59":[-1547.91,2378.63],"6-60-60":[-2292.77,2084.27],"6-60-61":[-3981.16,2371.33],"6-60-62":[-4419.87,2524.96],"6-60-63":[-4393.27,2746.49],"6-61-0":[-1249.62,37.76],"6-61-1":[-1112.88,587.07],"5-30-0":[-1299.63,799.08],"6-61-2":[-1546.38,649.12],"6-61-3":[-1554.59,1436.28],"5-30-1":[-1564.59,1436.28],"6-61-4":[-1101.76,882.21],"6-61-5":[-477.94,2622.95],"5-30-2":[-1370.09,2622.95],"6-61-6":[-1793.98,2094.27],"6-61-7":[-4983.68,110.49],"5-30-3":[-5034.9,2094.27],"6-61-8":[-5222.84,113.62],"6-61-9":[-5428.09,792.85],"5-30-4":[-5428.09,792.85],"6-61-10":[-5710.62,472.86],"6-61-11":[-5248.33,998.82],"5-30-5":[-6972.08,998.82],"6-61-12":[-4485.39,911.33],"6-61-13":[-3387.91,978.67],"5-30-6":[-5129.93,1061.19],"6-61-14":[-4788.04,275.17],"6-61-15":[-4478.72,105.85],"5-30-7":[-5149.97,275.17],"6-61-16":[-4586.88,2441.8],"6-61-17":[-4535.47,2479.29],"5-30-8":[-4586.88,2479.29],"6-61-18":[-4473.78,1153.69],"6-61-19":[-4636.74,1045.54],"5-30-9":[-4636.74,1153.69],"6-61-20":[-4641.17,3969.25],"6-61-21":[-4928.56,3240.15],"5-30-10":[-4928.56,3969.25],"6-61-22":[-4945.72,538.03],"6-61-23":[-5865.09,581.24],"5-30-11":[-5865.09,753.26],"6-61-24":[-5850.78,518.07],"6-61-25":[-5370.23,456.49],"5-30-12":[-5850.78,621.86],"6-61-26":[-4853.21,2075.33],"6-61-27":[-5280.81,725.34],"5-30-13":[-5280.81,2075.33],"6-61-28":[-4922.18,1263.81],"6-61-29":[-5222.98,1793.46],"5-30-14":[-5222.98,1965.58],"6-61-30":[-5291.44,563.59],"6-61-31":[-5622.65,40.64],"5-30-15":[-5622.65,563.59],"6-61-32":[-5631.84,39.27],"6-61-33":[-4922.72,482.59],"5-30-16":[-5631.84,482.59],"6-61-34":[14.28,1670.46],"6-61-35":[11.71,1228.8],"5-30-17":[-3030.57,1866.57],"6-61-36":[11.3,718.33],"6-61-37":[-99.67,814.4],"5-30-18":[-99.67,974],"6-61-38":[11.9,417.33],"6-61-39":[12.45,434.7],"5-30-19":[10.53,617.24],"6-61-40":[12.64,544.46],"6-61-41":[13.85,536.59],"5-30-20":[12.34,728.38],"6-61-42":[-160.95,3255.79],"6-61-43":[-137.3,4091.3],"5-30-21":[-4462.04,4091.3],"6-61-44":[-3374.34,1009.54],"6-61-45":[-1542.98,1097.45],"5-30-22":[-5088.63,1097.45],"6-61-46":[21.26,2425.69],"6-61-47":[-4937.09,2341.94],"5-30-23":[-5053.46,2425.69],"6-61-48":[-4955.38,53.23],"6-61-49":[-2050.17,264.6],"5-30-24":[-5033.05,264.6],"6-61-50":[-85.62,935.9],"6-61-51":[-216.07,827.24],"5-30-25":[-2688.99,965.28],"6-61-52":[-1523.2,893.55],"6-61-53":[-1457.29,582.89],"5-30-26":[-2494.46,893.55],"6-61-54":[-3630.65,832.57],"6-61-55":[-3897.67,20.65],"5-30-27":[-3897.67,832.57],"6-61-56":[-3381.61,20.76],"6-61-57":[-3738.02,2173.37],"5-30-28":[-3738.02,2173.37],"6-61-58":[-3509.49,2720.05],"6-61-59":[-2958.98,2519.15],"5-30-29":[-3509.49,2720.05],"6-61-60":[-3517.99,2242.55],"6-61-61":[-4835.02,2404.88],"5-30-30":[-4835.02,2404.88],"6-61-62":[-4382.08,2555.1],"6-61-63":[-4356.44,2747.47],"5-30-31":[-4419.87,2747.47],"6-62-0":[-1240.53,37.73],"6-62-1":[-744.04,572.31],"6-62-2":[-1580.4,576.58],"6-62-3":[-1451.86,615.97],"6-62-4":[-1027.1,702.71],"6-62-5":[-541.12,2552.32],"6-62-6":[-1283.7,2664.01],"6-62-7":[-4784.72,103.88],"6-62-8":[-5202.61,107.83],"6-62-9":[-5387.25,111.74],"6-62-10":[-5726.24,298.22],"6-62-11":[-5787.56,1388.09],"6-62-12":[-5721.89,1035.94],"6-62-13":[-3686.08,1109.06],"6-62-14":[-4480.28,639.9],"6-62-15":[-4790.76,219.03],"6-62-16":[-4896.5,2687.22],"6-62-17":[-5213.44,2577.79],"6-62-18":[-5267.5,3501.33],"6-62-19":[-4911.78,2419.81],"6-62-20":[-5018.1,3718.38],"6-62-21":[-5389.78,1721.06],"6-62-22":[-5293.41,696.4],"6-62-23":[-6394.68,471.46],"6-62-24":[-6204.36,407.06],"6-62-25":[-6073.72,487.53],"6-62-26":[-5931.72,1006.14],"6-62-27":[-5677.56,631.61],"6-62-28":[-6118.85,789.75],"6-62-29":[-6377.35,766.66],"6-62-30":[-5920.61,332.62],"6-62-31":[-5347.75,38.68],"6-62-32":[-5283.42,38.48],"6-62-33":[-5043.38,317.61],"6-62-34":[14.55,749.67],"6-62-35":[12.03,765.74],"6-62-36":[12.1,606.6],"6-62-37":[12.83,948.09],"6-62-38":[12.65,466.53],"6-62-39":[13.05,375.52],"6-62-40":[13.65,421.27],"6-62-41":[15.43,679.87],"6-62-42":[16.17,1792.55],"6-62-43":[16.17,3730.02],"6-62-44":[-1802.42,2423.6],"6-62-45":[-795.86,3440.21],"6-62-46":[17.78,2505.49],"6-62-47":[-4748.41,2581.45],"6-62-48":[-4763.6,209.81],"6-62-49":[-141.99,627.25],"6-62-50":[-120.06,1059.5],"6-62-51":[-251.76,960.71],"6-62-52":[-247.14,1324.16],"6-62-53":[-1590.71,281.57],"6-62-54":[-3485.5,25.96],"6-62-55":[-3904.05,22.36],"6-62-56":[-3764.97,20.96],"6-62-57":[-3158.94,2479.23],"6-62-58":[-3693.62,2850.41],"6-62-59":[-3705.92,2618.27],"6-62-60":[-4289.29,2314.66],"6-62-61":[-4712.91,2457.95],"6-62-62":[-4452.31,2581.14],"6-62-63":[-4363.32,2749.47],"6-63-0":[-1319.19,37.73],"6-63-1":[-591,629.84],"5-31-0":[-1319.19,629.84],"6-63-2":[-1565.59,582.77],"6-63-3":[-787.72,708.63],"5-31-1":[-1580.4,708.63],"4-15-0":[-1580.4,1436.28],"6-63-4":[-1062.91,441.27],"6-63-5":[-825.64,2411.62],"5-31-2":[-1062.91,2552.32],"6-63-6":[-2079.21,2153.36],"6-63-7":[-4632.1,101.1],"5-31-3":[-4784.72,2664.01],"4-15-1":[-5034.9,2664.01],"3-7-0":[-5034.9,2664.01],"6-63-8":[-5168.36,103.66],"6-63-9":[-5405.65,103.55],"5-31-4":[-5405.65,111.74],"6-63-10":[-5625.94,500.18],"6-63-11":[-5368.78,821.88],"5-31-5":[-5787.56,1388.09],"4-15-2":[-6972.08,1388.09],"6-63-12":[-5779.91,942.82],"6-63-13":[-3150.45,686.85],"5-31-6":[-5779.91,1109.06],"6-63-14":[-4455.82,466.81],"6-63-15":[-4710.93,332.21],"5-31-7":[-4790.76,639.9],"4-15-3":[-5779.91,1109.06],"3-7-1":[-6972.08,2140.58],"2-3-0":[-8445.16,3982.86],"6-63-16":[-4828.77,3299.64],"6-63-17":[-5389.17,2357.66],"5-31-8":[-5389.17,3299.64],"6-63-18":[-5668.97,2423.37],"6-63-19":[-5265.41,1802.73],"5-31-9":[-5668.97,3501.33],"4-15-4":[-5668.97,3501.33],"6-63-20":[-5105.1,2177.76],"6-63-21":[-5430.78,856.94],"5-31-10":[-5430.78,3718.38],"6-63-22":[-6103,519.6],"6-63-23":[-6129.72,407.48],"5-31-11":[-6394.68,696.4],"4-15-5":[-6394.68,3969.25],"3-7-2":[-6394.68,3969.25],"6-63-24":[-6145.98,556.84],"6-63-25":[-6723.66,577.03],"5-31-12":[-6723.66,577.03],"6-63-26":[-6115.4,1303.84],"6-63-27":[-6907.8,572.26],"5-31-13":[-6907.8,1303.84],"4-15-6":[-6907.8,2075.33],"6-63-28":[-6077.21,555.42],"6-63-29":[-5349.22,874.92],"5-31-14":[-6377.35,874.92],"6-63-30":[-5907.53,370.77],"6-63-31":[-5392.83,36.2],"5-31-15":[-5920.61,370.77],"4-15-7":[-6377.35,1965.58],"3-7-3":[-7749.42,2075.33],"2-3-1":[-7749.42,3969.25],"1-1-0":[-8983.51,6823.9],"6-63-32":[-5237.08,36.78],"6-63-33":[-5332.47,337.3],"5-31-16":[-5332.47,337.3],"6-63-34":[12.34,850.91],"6-63-35":[10.7,534.42],"5-31-17":[10.7,850.91],"4-15-8":[-5631.84,1866.57],"6-63-36":[11.05,535.26],"6-63-37":[12.72,1059.45],"5-31-18":[11.05,1059.45],"6-63-38":[13.43,539.26],"6-63-39":[14.75,528.02],"5-31-19":[12.65,539.26],"4-15-9":[-99.67,1059.45],"3-7-4":[-6535.92,1866.57],"6-63-40":[15.89,392.77],"6-63-41":[17.66,514.08],"5-31-20":[13.65,679.87],"6-63-42":[18.18,854.51],"6-63-43":[17.22,2207.98],"5-31-21":[16.17,3730.02],"4-15-10":[-4462.04,4091.3],"6-63-44":[-2692.96,1819.27],"6-63-45":[-2727.24,2335.87],"5-31-22":[-2727.24,3440.21],"6-63-46":[-94.68,2294.55],"6-63-47":[-3267.83,3213.77],"5-31-23":[-4748.41,3213.77],"4-15-11":[-5088.63,3440.21],"3-7-5":[-6001.14,4091.3],"2-3-2":[-7677.07,4091.3],"6-63-48":[-2413.96,314.06],"6-63-49":[-125.93,458.45],"5-31-24":[-4763.6,627.25],"6-63-50":[-10.71,680.68],"6-63-51":[-74.8,920.28],"5-31-25":[-251.76,1059.5],"4-15-12":[-5033.05,1059.5],"6-63-52":[-207.69,768.72],"6-63-53":[-1592.49,477.85],"5-31-26":[-1592.49,1324.16],"6-63-54":[-3090.17,27.14],"6-63-55":[-3709.78,26.46],"5-31-27":[-3904.05,27.14],"4-15-13":[-3904.05,1324.16],"3-7-6":[-5782.44,2074.83],"6-63-56":[-3741.06,27.93],"6-63-57":[-3312.16,2064.74],"5-31-28":[-3764.97,2479.23],"6-63-58":[-3792.48,2924.47],"6-63-59":[-3755.19,2804.3],"5-31-29":[-3792.48,2924.47],"4-15-14":[-3792.48,2924.47],"6-63-60":[-4389.4,2430.85],"6-63-61":[-4358.46,2498.87],"5-31-30":[-4712.91,2498.87],"6-63-62":[-4399.93,2597.05],"6-63-63":[-4364.12,2749.47],"5-31-31":[-4452.31,2749.47],"4-15-15":[-4835.02,2749.47],"3-7-7":[-4835.02,2924.47],"2-3-3":[-5782.44,3601.13],"1-1-1":[-8765.31,6969.13],"0-0-0":[-10751.44,6969.13],"6-64-0":[-1334.18,71.4],"6-64-1":[-500.53,635.35],"6-64-2":[-1479.4,533.01],"6-64-3":[-727.38,868.41],"6-64-4":[-758.4,672.79],"6-64-5":[-493.96,1542.28],"6-64-6":[-1124.19,2748.59],"6-64-7":[-4705.66,97.64],"6-64-8":[-4703.7,101.59],"6-64-9":[-5432.74,100.52],"6-64-10":[-5630.75,100.56],"6-64-11":[-5630.75,95.58],"6-64-12":[-5345.91,93.35],"6-64-13":[-3563.83,320.14],"6-64-14":[-4443.47,478.36],"6-64-15":[-5021.66,1880.44],"6-64-16":[-5151.99,3439.27],"6-64-17":[-5464.6,2431.2],"6-64-18":[-5552.88,942.66],"6-64-19":[-5435.68,1847.74],"6-64-20":[-5111.48,1993.84],"6-64-21":[-5001.86,739.39],"6-64-22":[-5851.42,750.53],"6-64-23":[-5757.84,1166.19],"6-64-24":[-5891.23,962.42],"6-64-25":[-6214.46,863.32],"6-64-26":[-6405.06,556.46],"6-64-27":[-5931.02,439.96],"6-64-28":[-5910,880.1],"6-64-29":[-5948.93,1022.44],"6-64-30":[-5525.52,111.21],"6-64-31":[-5035.82,34.38],"6-64-32":[-5581.84,36.77],"6-64-33":[-4837,36.62],"6-64-34":[-3062.65,975.32],"6-64-35":[9.43,830.09],"6-64-36":[10.62,427.95],"6-64-37":[12.53,530.46],"6-64-38":[14.73,818.13],"6-64-39":[16.29,941.03],"6-64-40":[19.97,1131.19],"6-64-41":[19.97,747.03],"6-64-42":[20.9,738.64],"6-64-43":[20.23,1991.34],"6-64-44":[-2678.87,1870.96],"6-64-45":[-3009.41,892.45],"6-64-46":[-2298.84,2396.54],"6-64-47":[20.07,3307.05],"6-64-48":[21.17,1814.23],"6-64-49":[-19.17,460.22],"6-64-50":[-31.06,303.6],"6-64-51":[-119.99,69.5],"6-64-52":[-193.68,48.1],"6-64-53":[-365.14,33.44],"6-64-54":[-2807.25,34.01],"6-64-55":[-3663.22,33.97],"6-64-56":[-3651.68,28.87],"6-64-57":[-3375.09,2706.61],"6-64-58":[-3885.42,2970.03],"6-64-59":[-3243.34,2947.12],"6-64-60":[-5524.14,2543.75],"6-64-61":[-4267.84,2526.16],"6-64-62":[-4884.95,2618.03],"6-64-63":[-4358.43,2752.45],"6-65-0":[-1098.57,57.45],"6-65-1":[-389.02,564.12],"5-32-0":[-1334.18,635.35],"6-65-2":[-1174.16,508.61],"6-65-3":[-740.81,668.75],"5-32-1":[-1479.4,868.41],"6-65-4":[-627.75,699.43],"6-65-5":[-30.98,1367.57],"5-32-2":[-758.4,1542.28],"6-65-6":[-873.13,2772.09],"6-65-7":[-4574.33,94.7],"5-32-3":[-4705.66,2772.09],"6-65-8":[-4519.12,94.18],"6-65-9":[-5430.79,935.72],"5-32-4":[-5432.74,935.72],"6-65-10":[-5726.93,1428.23],"6-65-11":[-6027.37,136.3],"5-32-5":[-6027.37,1428.23],"6-65-12":[-5142.23,676.88],"6-65-13":[-4740.25,286.33],"5-32-6":[-5345.91,676.88],"6-65-14":[-4635.6,643.32],"6-65-15":[-5295.44,2274.24],"5-32-7":[-5295.44,2274.24],"6-65-16":[-5773.02,2373.31],"6-65-17":[-5528.15,1377.73],"5-32-8":[-5773.02,3439.27],"6-65-18":[-5597.07,1623.57],"6-65-19":[-5634.6,2161.99],"5-32-9":[-5634.6,2161.99],"6-65-20":[-5459.42,941.46],"6-65-21":[-5394.57,739.39],"5-32-10":[-5459.42,1993.84],"6-65-22":[-5524.01,1758.12],"6-65-23":[-5571.83,2914.18],"5-32-11":[-5851.42,2914.18],"6-65-24":[-5683.47,1308.02],"6-65-25":[-6049.62,733.03],"5-32-12":[-6214.46,1308.02],"6-65-26":[-5647.11,683.02],"6-65-27":[-5806.28,527.99],"5-32-13":[-6405.06,683.02],"6-65-28":[-5769.39,650.86],"6-65-29":[-5697.53,1095.61],"5-32-14":[-5948.93,1095.61],"6-65-30":[-5530.49,66.62],"6-65-31":[-4657.52,281.88],"5-32-15":[-5530.49,281.88],"6-65-32":[-4440.82,391.88],"6-65-33":[-4218.77,47.91],"5-32-16":[-5581.84,391.88],"6-65-34":[-2997.79,933.61],"6-65-35":[8.94,572.18],"5-32-17":[-3062.65,975.32],"6-65-36":[10.62,508.69],"6-65-37":[12.58,666.01],"5-32-18":[10.62,666.01],"6-65-38":[14.93,725.01],"6-65-39":[17.15,1254.61],"5-32-19":[14.73,1254.61],"6-65-40":[20.87,2815.18],"6-65-41":[22.64,1798.58],"5-32-20":[19.97,2815.18],"6-65-42":[22.51,738.64],"6-65-43":[20.23,937.99],"5-32-21":[20.23,1991.34],"6-65-44":[17.99,2193.6],"6-65-45":[-2963.47,1675],"5-32-22":[-3009.41,2193.6],"6-65-46":[-2928.08,1301.3],"6-65-47":[-2362.09,2234.57],"5-32-23":[-2928.08,3307.05],"6-65-48":[21.17,2126.31],"6-65-49":[-49.16,634.25],"5-32-24":[-49.16,2126.31],"6-65-50":[-3.62,255.51],"6-65-51":[-34.57,778.86],"5-32-25":[-119.99,778.86],"6-65-52":[-310.82,125.03],"6-65-53":[-1207.43,1371.74],"5-32-26":[-1207.43,1371.74],"6-65-54":[-2395.72,894.58],"6-65-55":[-2359.67,34.42],"5-32-27":[-3663.22,894.58],"6-65-56":[-3251.41,29.79],"6-65-57":[-3500.86,3054.91],"5-32-28":[-3651.68,3054.91],"6-65-58":[-3769.91,3100.96],"6-65-59":[-3303.24,3103.71],"5-32-29":[-3885.42,3103.71],"6-65-60":[-5524.14,2692.57],"6-65-61":[-4197.79,2548.45],"5-32-30":[-5524.14,2692.57],"6-65-62":[-5404.2,2639.22],"6-65-63":[-4369.78,2753.44],"5-32-31":[-5404.2,2753.44],"6-66-0":[-1299.53,57.45],"6-66-1":[-546.13,504.13],"6-66-2":[-1357.4,434.6],"6-66-3":[-827.83,430.64],"6-66-4":[-325.44,548.76],"6-66-5":[-25.54,1298.81],"6-66-6":[-925.44,3079.8],"6-66-7":[-4327.24,90.09],"6-66-8":[-4943.8,87.08],"6-66-9":[-5452.19,2049.01],"6-66-10":[-5694.43,2462.53],"6-66-11":[-5794.53,1233.38],"6-66-12":[-5386.45,117],"6-66-13":[-4487.2,876.36],"6-66-14":[-4794.62,1537.53],"6-66-15":[-5225.42,4840.9],"6-66-16":[-5125.62,4069.35],"6-66-17":[-6457.04,838.48],"6-66-18":[-5626.94,1553.78],"6-66-19":[-5791.54,2250.36],"6-66-20":[-5551.91,336.76],"6-66-21":[-5781.56,611.03],"6-66-22":[-5219.71,1857.82],"6-66-23":[-4876.68,2746.4],"6-66-24":[-5426.1,1769.87],"6-66-25":[-5582.63,1672.93],"6-66-26":[-5492.86,774.79],"6-66-27":[-5473.4,874.43],"6-66-28":[-5417.7,1294.91],"6-66-29":[-5122.17,816.36],"6-66-30":[-4914.13,431.08],"6-66-31":[-4204.51,2007.45],"6-66-32":[-3670.86,1816.45],"6-66-33":[-2644.22,362.07],"6-66-34":[7.09,766.35],"6-66-35":[8.79,1258.09],"6-66-36":[11.61,820.42],"6-66-37":[13.1,766.79],"6-66-38":[15.69,1619.97],"6-66-39":[19.55,1713.86],"6-66-40":[22.63,2725.4],"6-66-41":[24.02,1802.55],"6-66-42":[22.8,608.18],"6-66-43":[22.8,289.7],"6-66-44":[-3.93,2284.42],"6-66-45":[-3107.33,1585.24],"6-66-46":[-2944.98,813.79],"6-66-47":[-2724.13,3919.02],"6-66-48":[23.35,4706.54],"6-66-49":[23.35,1505.08],"6-66-50":[-149.54,861.98],"6-66-51":[-21.04,111.68],"6-66-52":[-546.34,1206.24],"6-66-53":[-1225.97,2364.91],"6-66-54":[-740.87,2008.92],"6-66-55":[-1651.18,33.84],"6-66-56":[-3214.03,30.48],"6-66-57":[-3430.56,3138.57],"6-66-58":[-3550.91,3267.05],"6-66-59":[-3667.44,3207.22],"6-66-60":[-2502.69,2800.27],"6-66-61":[-4064.25,2565.62],"6-66-62":[-5150.03,2666.15],"6-66-63":[-4380.24,2755.44],"6-67-0":[-1411.07,38.77],"6-67-1":[-777.85,325.07],"5-33-0":[-1411.07,504.13],"6-67-2":[-1008.17,301.02],"6-67-3":[-841.35,786.22],"5-33-1":[-1357.4,786.22],"4-16-0":[-1479.4,868.41],"6-67-4":[-120.01,946.45],"6-67-5":[24.93,1165.91],"5-33-2":[-325.44,1298.81],"6-67-6":[-675.67,2826.89],"6-67-7":[-4145.22,85.5],"5-33-3":[-4327.24,3079.8],"4-16-1":[-4705.66,3079.8],"6-67-8":[-5265.72,197.75],"6-67-9":[-6317.1,2315.19],"5-33-4":[-6317.1,2315.19],"6-67-10":[-5541.28,2472.36],"6-67-11":[-6275.45,847.8],"5-33-5":[-6275.45,2472.36],"4-16-2":[-6317.1,2472.36],"6-67-12":[-5974.42,217.69],"6-67-13":[-6088.36,1186.21],"5-33-6":[-6088.36,1186.21],"6-67-14":[-4895.96,1069.93],"6-67-15":[-5222.06,4029.26],"5-33-7":[-5225.42,4840.9],"4-16-3":[-6088.36,4840.9],"6-67-16":[-5683.46,2694.01],"6-67-17":[-5551.89,2374.38],"5-33-8":[-6457.04,4069.35],"6-67-18":[-6708.74,1143.75],"6-67-19":[-5720.89,1413.3],"5-33-9":[-6708.74,2250.36],"4-16-4":[-6708.74,4069.35],"6-67-20":[-5387.04,728.47],"6-67-21":[-5364.72,762.97],"5-33-10":[-5781.56,762.97],"6-67-22":[-5068.72,1483.6],"6-67-23":[-4831.99,1924.9],"5-33-11":[-5219.71,2746.4],"4-16-5":[-5851.42,2914.18],"6-67-24":[-5042.96,1977.29],"6-67-25":[-5197.69,2023.83],"5-33-12":[-5582.63,2023.83],"6-67-26":[-5129.75,714.89],"6-67-27":[-4799.44,784.44],"5-33-13":[-5492.86,874.43],"4-16-6":[-6405.06,2023.83],"6-67-28":[-4895.37,1784.96],"6-67-29":[-4493.72,3028.39],"5-33-14":[-5417.7,3028.39],"6-67-30":[-4058.35,4049.43],"6-67-31":[-2094.93,1231.48],"5-33-15":[-4914.13,4049.43],"4-16-7":[-5948.93,4049.43],"6-67-32":[-2544.85,1215.48],"6-67-33":[-2020.52,4000.43],"5-33-16":[-3670.86,4000.43],"6-67-34":[7.15,2977.39],"6-67-35":[9.03,1719.96],"5-33-17":[7.09,2977.39],"4-16-8":[-5581.84,4000.43],"6-67-36":[13.46,738.44],"6-67-37":[14.74,703.93],"5-33-18":[11.61,820.42],"6-67-38":[16.09,1946.83],"6-67-39":[20.85,1936.29],"5-33-19":[15.69,1946.83],"4-16-9":[10.62,1946.83],"6-67-40":[22.3,1877.89],"6-67-41":[23.96,1519.31],"5-33-20":[22.3,2725.4],"6-67-42":[24.8,762.58],"6-67-43":[-5.04,735.58],"5-33-21":[-5.04,762.58],"4-16-10":[-5.04,2815.18],"6-67-44":[-201.67,1518.16],"6-67-45":[-2914.72,1093.52],"5-33-22":[-3107.33,2284.42],"6-67-46":[-3023.85,2311.56],"6-67-47":[-2615.5,2568.33],"5-33-23":[-3023.85,3919.02],"4-16-11":[-3107.33,3919.02],"6-67-48":[-59.72,3904.84],"6-67-49":[23.85,1041.93],"5-33-24":[-59.72,4706.54],"6-67-50":[25.43,1154.04],"6-67-51":[-23.45,205.77],"5-33-25":[-149.54,1154.04],"4-16-12":[-149.54,4706.54],"6-67-52":[-660.53,831.59],"6-67-53":[-319.12,2383.62],"5-33-26":[-1225.97,2383.62],"6-67-54":[-558.14,2178.23],"6-67-55":[-1422.15,180.11],"5-33-27":[-1651.18,2178.23],"4-16-13":[-3663.22,2383.62],"6-67-56":[-3048.46,32.07],"6-67-57":[-2893.81,3175.51],"5-33-28":[-3430.56,3175.51],"6-67-58":[-3427.44,3414.15],"6-67-59":[-2366.66,3300.16],"5-33-29":[-3667.44,3414.15],"4-16-14":[-3885.42,3414.15],"6-67-60":[-2060.67,2920.73],"6-67-61":[-4046.55,2579.65],"5-33-30":[-4064.25,2920.73],"6-67-62":[-5067.2,2681.47],"6-67-63":[-4376.88,2759.37],"5-33-31":[-5150.03,2759.37],"4-16-15":[-5524.14,2920.73],"6-68-0":[-1395.97,228.71],"6-68-1":[-746.57,344.56],"6-68-2":[-1204.84,600.81],"6-68-3":[-573.03,1385.65],"6-68-4":[-211.37,1035.73],"6-68-5":[-227.53,1514.04],"6-68-6":[-1218.75,2800.76],"6-68-7":[-3690.64,1058.54],"6-68-8":[-5160.84,1750.98],"6-68-9":[-6317.1,1810.17],"6-68-10":[-5667.86,1715.33],"6-68-11":[-6260.37,400.65],"6-68-12":[-5691.62,248.2],"6-68-13":[-4704.67,988.47],"6-68-14":[-7020.16,1845.84],"6-68-15":[-5826.45,3777.17],"6-68-16":[-6188.92,2893.68],"6-68-17":[-5692.66,2503.27],"6-68-18":[-5375.56,2005.15],"6-68-19":[-5450.8,209.56],"6-68-20":[-4919.36,965.23],"6-68-21":[-4692.14,1068.73],"6-68-22":[-4667.49,1178.67],"6-68-23":[-4122.01,1310.69],"6-68-24":[-3252.84,1657.37],"6-68-25":[-1445.59,2062.81],"6-68-26":[-3234.01,2330.5],"6-68-27":[-3799.02,2407.12],"6-68-28":[-3849.29,1857.59],"6-68-29":[-2704.63,2461.39],"6-68-30":[-1235.92,1585.63],"6-68-31":[88.63,1076.94],"6-68-32":[52.66,1044.68],"6-68-33":[-17.85,1463.62],"6-68-34":[-25.08,2402.42],"6-68-35":[-3.35,1798.57],"6-68-36":[-2.05,2521.11],"6-68-37":[-19.61,2407.1],"6-68-38":[-21.61,2094.46],"6-68-39":[-59.49,1680.35],"6-68-40":[23.13,1273.22],"6-68-41":[24.24,1174.97],"6-68-42":[25.75,1094.83],"6-68-43":[-510.76,969.01],"6-68-44":[-1838.28,128.05],"6-68-45":[-3559.2,1968.98],"6-68-46":[-3590.74,2422.35],"6-68-47":[-77.86,2768.43],"6-68-48":[-48.75,3568.74],"6-68-49":[26.26,1796.66],"6-68-50":[26.82,970.67],"6-68-51":[-12.7,243.29],"6-68-52":[-81.09,392.83],"6-68-53":[8.74,1613.82],"6-68-54":[-371.45,1720.18],"6-68-55":[-731.98,1680.62],"6-68-56":[-2957.29,876.47],"6-68-57":[-2789.98,3169.81],"6-68-58":[-2473.32,3460.36],"6-68-59":[-2118.53,3384.4],"6-68-60":[-2469.5,3077.24],"6-68-61":[-4044.31,2588.56],"6-68-62":[-5294.54,2693.73],"6-68-63":[-4390.55,2763.36],"6-69-0":[-1534.01,353.71],"6-69-1":[-850.67,488.28],"5-34-0":[-1534.01,488.28],"6-69-2":[-1116.49,724.24],"6-69-3":[-389.05,1634.3],"5-34-1":[-1204.84,1634.3],"6-69-4":[-114.79,1233.17],"6-69-5":[-167.07,1537.33],"5-34-2":[-227.53,1537.33],"6-69-6":[-893.03,2579.46],"6-69-7":[-4333.93,1592.64],"5-34-3":[-4333.93,2800.76],"6-69-8":[-5100.83,1958.98],"6-69-9":[-5438.85,1310.43],"5-34-4":[-6317.1,1958.98],"6-69-10":[-5731.52,797.68],"6-69-11":[-6054.28,411.97],"5-34-5":[-6260.37,1715.33],"6-69-12":[-5152.25,280.51],"6-69-13":[-4670.89,1624.81],"5-34-6":[-5691.62,1624.81],"6-69-14":[-5444.08,1918.97],"6-69-15":[-5602.62,2548.59],"5-34-7":[-7020.16,3777.17],"6-69-16":[-5880.21,1992.85],"6-69-17":[-5615.19,2820.36],"5-34-8":[-6188.92,2893.68],"6-69-18":[-5076.52,3340.97],"6-69-19":[-5031.26,288.67],"5-34-9":[-5450.8,3340.97],"6-69-20":[-4517.89,392.95],"6-69-21":[-2713.93,877.11],"5-34-10":[-4919.36,1068.73],"6-69-22":[-1587.65,1976.43],"6-69-23":[-179.5,2379.26],"5-34-11":[-4667.49,2379.26],"6-69-24":[-76.51,3331.17],"6-69-25":[184,1663.86],"5-34-12":[-3252.84,3331.17],"6-69-26":[148.07,1957.8],"6-69-27":[176.23,2555.3],"5-34-13":[-3799.02,2555.3],"6-69-28":[29.61,2065.15],"6-69-29":[275.12,1747.94],"5-34-14":[-3849.29,2461.39],"6-69-30":[175.88,1070.44],"6-69-31":[253.73,861.8],"5-34-15":[-1235.92,1585.63],"6-69-32":[-26.92,879.81],"6-69-33":[167.87,1051.06],"5-34-16":[-26.92,1463.62],"6-69-34":[256.14,1735.94],"6-69-35":[12.55,2127.16],"5-34-17":[-25.08,2402.42],"6-69-36":[166.21,2639.31],"6-69-37":[175.08,2023.5],"5-34-18":[-19.61,2639.31],"6-69-38":[215,1749.24],"6-69-39":[10.84,3232.15],"5-34-19":[-59.49,3232.15],"6-69-40":[-162.31,2386.26],"6-69-41":[-159.88,2015.68],"5-34-20":[-162.31,2386.26],"6-69-42":[18.98,938.39],"6-69-43":[-2052.93,390.74],"5-34-21":[-2052.93,1094.83],"6-69-44":[-4025.63,257.63],"6-69-45":[-3561.57,3305.09],"5-34-22":[-4025.63,3305.09],"6-69-46":[-3491.33,2729.6],"6-69-47":[-498.59,1910.02],"5-34-23":[-3590.74,2768.43],"6-69-48":[-34.71,2419.32],"6-69-49":[27.99,1810.92],"5-34-24":[-48.75,3568.74],"6-69-50":[27.14,1580.34],"6-69-51":[-65.55,271.04],"5-34-25":[-65.55,1580.34],"6-69-52":[-38.22,401.67],"6-69-53":[22.44,782.08],"5-34-26":[-81.09,1613.82],"6-69-54":[19.27,1264.46],"6-69-55":[-516.11,1855.33],"5-34-27":[-731.98,1855.33],"6-69-56":[-2615.8,1502.36],"6-69-57":[-2563.83,3108.4],"5-34-28":[-2957.29,3169.81],"6-69-58":[-2060.43,3514.26],"6-69-59":[-931.16,3446.22],"5-34-29":[-2473.32,3514.26],"6-69-60":[-2662.69,3147.37],"6-69-61":[-4050.55,2608.3],"5-34-30":[-4050.55,3147.37],"6-69-62":[-4985.7,2704.02],"6-69-63":[-4378.1,2767.34],"5-34-31":[-5294.54,2767.34],"6-70-0":[-1296.53,146.9],"6-70-1":[-771.95,377.43],"6-70-2":[-1112.58,582.7],"6-70-3":[-12.71,1635.74],"6-70-4":[-143.04,1193.37],"6-70-5":[30.17,1777.45],"6-70-6":[-870.06,2266.17],"6-70-7":[-4579.35,2122.75],"6-70-8":[-5091.86,2096.53],"6-70-9":[-5441.27,735.36],"6-70-10":[-5521.23,350.95],"6-70-11":[-5870.11,119.82],"6-70-12":[-5490.68,358.72],"6-70-13":[-4850.2,462.61],"6-70-14":[-5849.2,2057.45],"6-70-15":[-5313.8,1043.38],"6-70-16":[-5533.8,2489.77],"6-70-17":[-5647.65,2049.01],"6-70-18":[-5270.37,753.24],"6-70-19":[-4446.22,1946.4],"6-70-20":[-2062.42,2219.67],"6-70-21":[-190.7,1622.53],"6-70-22":[68.85,2131.4],"6-70-23":[343.56,2428.71],"6-70-24":[27.16,3468.04],"6-70-25":[108.1,2059.93],"6-70-26":[121.91,1646.91],"6-70-27":[274.16,1823.65],"6-70-28":[322.1,1743.04],"6-70-29":[354.64,1235.68],"6-70-30":[262.03,872.26],"6-70-31":[254.18,533.95],"6-70-32":[223.98,518.93],"6-70-33":[192.31,886.28],"6-70-34":[374.92,1242.7],"6-70-35":[339.89,1757.04],"6-70-36":[292.26,1831.76],"6-70-37":[178.82,1687.18],"6-70-38":[175.77,2162.84],"6-70-39":[527.04,3422.04],"6-70-40":[356.51,2505.72],"6-70-41":[47.81,2222.4],"6-70-42":[-651.9,1720.53],"6-70-43":[-3892.14,2268.67],"6-70-44":[-4167.54,2017.39],"6-70-45":[-4024.78,727.91],"6-70-46":[-2423.02,1931.45],"6-70-47":[-1183.92,2422.92],"6-70-48":[29.91,1026.9],"6-70-49":[29.84,2002.07],"6-70-50":[31.81,455.04],"6-70-51":[-106.87,346],"6-70-52":[-425.67,109.12],"6-70-53":[-275.99,320.25],"6-70-54":[-257.87,689.96],"6-70-55":[15.38,1949.22],"6-70-56":[-1496.13,2034.64],"6-70-57":[-1371.09,3052.08],"6-70-58":[-472.27,3536.78],"6-70-59":[-295.51,3480.29],"6-70-60":[-2571.36,3239.33],"6-70-61":[-4037.07,2709.23],"6-70-62":[-4806.88,2724.91],"6-70-63":[-4397.11,2768.65],"6-71-0":[-1366.5,180.42],"6-71-1":[-1045.85,177.35],"5-35-0":[-1366.5,377.43],"6-71-2":[-1106.99,577.96],"6-71-3":[-139.06,862.17],"5-35-1":[-1112.58,1635.74],"4-17-0":[-1534.01,1635.74],"6-71-4":[-31.29,779.54],"6-71-5":[27.24,1826.93],"5-35-2":[-143.04,1826.93],"6-71-6":[-972.15,2236.9],"6-71-7":[-4515.43,1854.14],"5-35-3":[-4579.35,2266.17],"4-17-1":[-4579.35,2800.76],"3-8-0":[-4705.66,3079.8],"6-71-8":[-5083,851.76],"6-71-9":[-5368.62,511.56],"5-35-4":[-5441.27,2096.53],"6-71-10":[-5717.96,158.69],"6-71-11":[-6002.07,214.15],"5-35-5":[-6002.07,350.95],"4-17-2":[-6317.1,2096.53],"6-71-12":[-5985.81,342.67],"6-71-13":[-4829.82,644.43],"5-35-6":[-5985.81,644.43],"6-71-14":[-5630.52,2648.45],"6-71-15":[-5696.39,1842.42],"5-35-7":[-5849.2,2648.45],"4-17-3":[-7020.16,3777.17],"3-8-1":[-7020.16,4840.9],"6-71-16":[-5400.18,2700.03],"6-71-17":[-5606.51,2930.53],"5-35-8":[-5647.65,2930.53],"6-71-18":[-5476.96,2524.92],"6-71-19":[-2974.28,1636.67],"5-35-9":[-5476.96,2524.92],"4-17-4":[-6188.92,3340.97],"6-71-20":[18.37,2264.81],"6-71-21":[-31.98,1643.49],"5-35-10":[-2062.42,2264.81],"6-71-22":[94.19,1557.97],"6-71-23":[273.49,1396.87],"5-35-11":[68.85,2428.71],"4-17-5":[-4919.36,2428.71],"3-8-2":[-6708.74,4069.35],"6-71-24":[452.55,1492.56],"6-71-25":[308.29,1368.77],"5-35-12":[27.16,3468.04],"6-71-26":[326.68,1369.26],"6-71-27":[373.83,1499.67],"5-35-13":[121.91,1823.65],"4-17-6":[-3799.02,3468.04],"6-71-28":[371.4,1383.2],"6-71-29":[382.62,1091.79],"5-35-14":[322.1,1743.04],"6-71-30":[291.34,761.73],"6-71-31":[282.28,584.48],"5-35-15":[254.18,872.26],"4-17-7":[-3849.29,2461.39],"3-8-3":[-6405.06,4049.43],"6-71-32":[271.34,592.5],"6-71-33":[253.5,758.09],"5-35-16":[192.31,886.28],"6-71-34":[393.62,1099.25],"6-71-35":[383.62,1385.35],"5-35-17":[339.89,1757.04],"4-17-8":[-26.92,2402.42],"6-71-36":[388.19,1507.74],"6-71-37":[353.84,1380.25],"5-35-18":[178.82,1831.76],"6-71-38":[344.8,1371.66],"6-71-39":[487.74,1497.56],"5-35-19":[175.77,3422.04],"4-17-9":[-59.49,3422.04],"3-8-4":[-5581.84,4000.43],"6-71-40":[291.96,1399.38],"6-71-41":[101.97,1582.99],"5-35-20":[47.81,2505.72],"6-71-42":[-192.85,1667.49],"6-71-43":[-3939.79,2341.81],"5-35-21":[-3939.79,2341.81],"4-17-10":[-3939.79,2505.72],"6-71-44":[-5096.78,1732.68],"6-71-45":[-5096.08,2430.31],"5-35-22":[-5096.78,2430.31],"6-71-46":[-1220.58,2821.28],"6-71-47":[30.14,2550.27],"5-35-23":[-2423.02,2821.28],"4-17-11":[-5096.78,3305.09],"3-8-5":[-5096.78,3919.02],"6-71-48":[31.75,1822.33],"6-71-49":[32.11,2509.12],"5-35-24":[29.84,2509.12],"6-71-50":[33.7,620.24],"6-71-51":[-70.85,335.96],"5-35-25":[-106.87,620.24],"4-17-12":[-106.87,3568.74],"6-71-52":[-218.92,210.85],"6-71-53":[-209.1,157.78],"5-35-26":[-425.67,320.25],"6-71-54":[-161.71,548.2],"6-71-55":[-109.75,820.05],"5-35-27":[-257.87,1949.22],"4-17-13":[-731.98,1949.22],"3-8-6":[-3663.22,4706.54],"6-71-56":[-427.72,1800.79],"6-71-57":[-457.25,2944.43],"5-35-28":[-1496.13,3052.08],"6-71-58":[-482.06,3600.93],"6-71-59":[-266.53,3598.47],"5-35-29":[-482.06,3600.93],"4-17-14":[-2957.29,3600.93],"6-71-60":[-2661.25,3295.33],"6-71-61":[-4172.92,2810.96],"5-35-30":[-4172.92,3295.33],"6-71-62":[-5181.02,2751.92],"6-71-63":[-4390.32,2771.32],"5-35-31":[-5181.02,2771.32],"4-17-15":[-5294.54,3295.33],"3-8-7":[-5524.14,3600.93],"6-72-0":[-1151.65,235.57],"6-72-1":[-1116.99,366.1],"6-72-2":[-1218.03,841.26],"6-72-3":[-155.53,753.17],"6-72-4":[18.55,948.27],"6-72-5":[22.7,1790.98],"6-72-6":[-847.11,2859.42],"6-72-7":[-4432.93,1167.12],"6-72-8":[-5028.12,435.24],"6-72-9":[-5233.47,286.65],"6-72-10":[-5869.59,241.92],"6-72-11":[-6044.56,275.13],"6-72-12":[-6053.24,318.56],"6-72-13":[-5914.13,382.74],"6-72-14":[-5764.94,1998.12],"6-72-15":[-6150.11,2540.92],"6-72-16":[-5652.67,2847.57],"6-72-17":[-5293.94,2950.99],"6-72-18":[-5648.78,2427.62],"6-72-19":[-5036.24,2464.23],"6-72-20":[7.73,2380.96],"6-72-21":[-11.66,1773.15],"6-72-22":[88.27,1869.59],"6-72-23":[289.98,1464.79],"6-72-24":[470.56,1912.86],"6-72-25":[498.02,1340.77],"6-72-26":[593.56,1710.7],"6-72-27":[454.32,3017.52],"6-72-28":[444.14,1527.59],"6-72-29":[442.37,1113.75],"6-72-30":[352.38,786.57],"6-72-31":[319.72,701.62],"6-72-32":[322.07,733.63],"6-72-33":[332.54,807.65],"6-72-34":[430.54,1119.46],"6-72-35":[449.14,1534.31],"6-72-36":[468.39,2938.51],"6-72-37":[634.18,1558.71],"6-72-38":[538.7,1314.77],"6-72-39":[480.56,1888.87],"6-72-40":[305.79,1498.79],"6-72-41":[87.14,1901.6],"6-72-42":[-6.16,1783.15],"6-72-43":[-3410.48,2501.84],"6-72-44":[-4635.36,2392.7],"6-72-45":[-1535.43,2378.1],"6-72-46":[-1546.81,2846.24],"6-72-47":[32.16,2746.21],"6-72-48":[32.45,2472.37],"6-72-49":[32.5,2002.61],"6-72-50":[34.78,369.41],"6-72-51":[30.32,312.78],"6-72-52":[-33.81,268.25],"6-72-53":[-115.27,236.4],"6-72-54":[-93.35,289.52],"6-72-55":[-118.26,410.07],"6-72-56":[-452.6,1137.67],"6-72-57":[-498.31,3236.81],"6-72-58":[-447.32,3666.27],"6-72-59":[-205.86,3666.27],"6-72-60":[-1730.17,3378.93],"6-72-61":[-4033.67,2968.07],"6-72-62":[-5182.3,2779.15],"6-72-63":[-4400.75,2774.31],"6-73-0":[-1098.45,386.48],"6-73-1":[-252.17,589.35],"5-36-0":[-1151.65,589.35],"6-73-2":[-246.65,1025.36],"6-73-3":[23.45,1256.47],"5-36-1":[-1218.03,1256.47],"6-73-4":[23.04,1575.59],"6-73-5":[22,2167.88],"5-36-2":[18.55,2167.88],"6-73-6":[-768.66,2661.08],"6-73-7":[-4274.15,1083.56],"5-36-3":[-4432.93,2859.42],"6-73-8":[-5101.12,559.12],"6-73-9":[-5237.91,398.6],"5-36-4":[-5237.91,559.12],"6-73-10":[-5410.92,258.06],"6-73-11":[-5818.04,338.7],"5-36-5":[-6044.56,338.7],"6-73-12":[-5916.34,371.65],"6-73-13":[-6576.21,309.64],"5-36-6":[-6576.21,382.74],"6-73-14":[-6043.8,1369.76],"6-73-15":[-6226.23,2520.59],"5-36-7":[-6226.23,2540.92],"6-73-16":[-6031.72,1559.76],"6-73-17":[-4388.63,1798.35],"5-36-8":[-6031.72,2950.99],"6-73-18":[-4756.13,2185.74],"6-73-19":[-4900.81,2137.5],"5-36-9":[-5648.78,2464.23],"6-73-20":[-3072.54,2714.39],"6-73-21":[-117.56,3028.87],"5-36-10":[-3072.54,3028.87],"6-73-22":[27.75,1855.23],"6-73-23":[275.3,2052.36],"5-36-11":[27.75,2052.36],"6-73-24":[280.09,1490.96],"6-73-25":[366.24,1373.07],"5-36-12":[280.09,1912.86],"6-73-26":[428.45,2020.89],"6-73-27":[423.73,1615.01],"5-36-13":[423.73,3017.52],"6-73-28":[386.96,1897.94],"6-73-29":[394.88,1695.64],"5-36-14":[386.96,1897.94],"6-73-30":[425.75,1632.25],"6-73-31":[366.87,1474.32],"5-36-15":[319.72,1632.25],"6-73-32":[374.33,1540.39],"6-73-33":[413.29,1685.26],"5-36-16":[322.07,1685.26],"6-73-34":[408.77,1701.66],"6-73-35":[399.36,1902.71],"5-36-17":[399.36,1902.71],"6-73-36":[436.55,1683.01],"6-73-37":[454.43,2005.89],"5-36-18":[436.55,2938.51],"6-73-38":[387.47,1440.16],"6-73-39":[313.56,1496.99],"5-36-19":[313.56,1888.87],"6-73-40":[303.1,2110.34],"6-73-41":[35.21,1898.28],"5-36-20":[35.21,2110.34],"6-73-42":[-115.12,3126.88],"6-73-43":[-3277.96,2790.11],"5-36-21":[-3410.48,3126.88],"6-73-44":[-4410.36,2087.17],"6-73-45":[-1533.08,2111.08],"5-36-22":[-4635.36,2392.7],"6-73-46":[-1407.82,1782.34],"6-73-47":[-132.5,1515.81],"5-36-23":[-1546.81,2846.24],"6-73-48":[-48.96,2476.4],"6-73-49":[33.33,1341.89],"5-36-24":[-48.96,2476.4],"6-73-50":[35.38,302.26],"6-73-51":[30.59,367.74],"5-36-25":[30.32,369.41],"6-73-52":[27.68,312.58],"6-73-53":[-91.02,254.41],"5-36-26":[-115.27,312.58],"6-73-54":[20.07,387],"6-73-55":[-0.77,495.19],"5-36-27":[-118.26,495.19],"6-73-56":[-62.28,1042.73],"6-73-57":[-430.03,3236.81],"5-36-28":[-498.31,3236.81],"6-73-58":[-439.32,3671.29],"6-73-59":[-323.86,3685.99],"5-36-29":[-447.32,3685.99],"6-73-60":[-1858.42,3441.2],"6-73-61":[-4051.29,3024.01],"5-36-30":[-4051.29,3441.2],"6-73-62":[-4957.74,2818.12],"6-73-63":[-4411.94,2780.49],"5-36-31":[-5182.3,2818.12],"6-74-0":[-1236.82,554.52],"6-74-1":[-115.89,808.27],"6-74-2":[22.03,898.1],"6-74-3":[-214.68,1339.53],"6-74-4":[-109.83,1733.48],"6-74-5":[-19.14,1828.63],"6-74-6":[-1043.71,2004.49],"6-74-7":[-4151.29,736.85],"6-74-8":[-5058.32,3219.23],"6-74-9":[-5278.16,401.9],"6-74-10":[-5420.6,523.35],"6-74-11":[-5510.77,314.28],"6-74-12":[-5800,307.64],"6-74-13":[-6626.98,347.09],"6-74-14":[-6537.35,387.19],"6-74-15":[-6142.73,488.72],"6-74-16":[-6021.75,429.54],"6-74-17":[-5675.14,2570.69],"6-74-18":[-5047.31,3075.92],"6-74-19":[-4902.23,3021.97],"6-74-20":[-3976.43,2037.33],"6-74-21":[-2943.73,3474.34],"6-74-22":[11.08,2304.86],"6-74-23":[11.91,2318.87],"6-74-24":[164.06,1564.06],"6-74-25":[187.45,1723.71],"6-74-26":[300.4,1719.44],"6-74-27":[439.11,1802.88],"6-74-28":[346.35,1700.51],"6-74-29":[356.78,2454.65],"6-74-30":[452.9,3419],"6-74-31":[534,5024.49],"6-74-32":[553.03,4938.48],"6-74-33":[461.33,3461],"6-74-34":[382.42,2489.57],"6-74-35":[381.96,1708.52],"6-74-36":[432.19,1881.89],"6-74-37":[298.55,1739.34],"6-74-38":[217.88,1752.71],"6-74-39":[183.38,1623.82],"6-74-40":[18.19,2352.72],"6-74-41":[18.19,2369.87],"6-74-42":[-47.25,3510.35],"6-74-43":[-3200.67,2075.35],"6-74-44":[-4452.12,2962.7],"6-74-45":[-1603.77,2988.35],"6-74-46":[-2119.52,2510.29],"6-74-47":[-2188.57,416.42],"6-74-48":[-230.72,445.51],"6-74-49":[35.21,379.33],"6-74-50":[35.5,351.6],"6-74-51":[31.79,306.62],"6-74-52":[29.44,332.57],"6-74-53":[-27.17,205.8],"6-74-54":[20.92,394.56],"6-74-55":[18.14,656.54],"6-74-56":[-392.13,716.25],"6-74-57":[-410.17,2976.87],"6-74-58":[-426.08,3667.35],"6-74-59":[-338.34,3732.45],"6-74-60":[-1620.83,3510.17],"6-74-61":[-4272.22,3119.66],"6-74-62":[-4960.26,2893.13],"6-74-63":[-4388.84,2805.44],"6-75-0":[-1220.82,637.81],"6-75-1":[18.94,947.66],"5-37-0":[-1236.82,947.66],"6-75-2":[21.42,1165.87],"6-75-3":[-335.37,1205.39],"5-37-1":[-335.37,1339.53],"4-18-0":[-1236.82,1339.53],"6-75-4":[-108.22,1531.11],"6-75-5":[17.26,1406.61],"5-37-2":[-109.83,1828.63],"6-75-6":[-680,2529.86],"6-75-7":[-3764.21,1181.22],"5-37-3":[-4151.29,2529.86],"4-18-1":[-4432.93,2859.42],"6-75-8":[-4934.93,712.47],"6-75-9":[-5173.02,4110.39],"5-37-4":[-5278.16,4110.39],"6-75-10":[-5338.72,318.43],"6-75-11":[-5582.3,357.76],"5-37-5":[-5582.3,523.35],"4-18-2":[-6044.56,4110.39],"6-75-12":[-5891.33,313.84],"6-75-13":[-5966.26,252.12],"5-37-6":[-6626.98,347.09],"6-75-14":[-6187.44,293.98],"6-75-15":[-5647.59,195.69],"5-37-7":[-6537.35,488.72],"4-18-3":[-6626.98,2540.92],"6-75-16":[-6289.49,673.31],"6-75-17":[-6185.21,2438.12],"5-37-8":[-6289.49,2570.69],"6-75-18":[-5007.04,3012.55],"6-75-19":[-4544.81,2342.54],"5-37-9":[-5047.31,3075.92],"4-18-4":[-6289.49,3075.92],"6-75-20":[-4169.53,223.67],"6-75-21":[-3183.61,1970.91],"5-37-10":[-4169.53,3474.34],"6-75-22":[-1688.18,2002.31],"6-75-23":[-207.39,1362.61],"5-37-11":[-1688.18,2318.87],"4-18-5":[-4169.53,3474.34],"6-75-24":[65.06,2320.42],"6-75-25":[91.67,2518.28],"5-37-12":[65.06,2518.28],"6-75-26":[104.79,1669.47],"6-75-27":[352.02,1809.35],"5-37-13":[104.79,1809.35],"4-18-6":[65.06,3017.52],"6-75-28":[354.16,2864.49],"6-75-29":[356.57,2398.3],"5-37-14":[346.35,2864.49],"6-75-30":[389.82,3166.22],"6-75-31":[594.3,2060.9],"5-37-15":[389.82,5024.49],"4-18-7":[319.72,5024.49],"6-75-32":[585.06,2012.4],"6-75-33":[416.69,3105.21],"5-37-16":[416.69,4938.48],"6-75-34":[392.48,2443.31],"6-75-35":[382.84,2943.5],"5-37-17":[381.96,2943.5],"4-18-8":[322.07,4938.48],"6-75-36":[378.03,1864.36],"6-75-37":[93.22,1716.39],"5-37-18":[93.22,1881.89],"6-75-38":[74.67,2583.3],"6-75-39":[57.48,2427.44],"5-37-19":[57.48,2583.3],"4-18-9":[57.48,2938.51],"6-75-40":[-242.83,1442.62],"6-75-41":[-91.25,2018.31],"5-37-20":[-242.83,2369.87],"6-75-42":[-83.43,1989.17],"6-75-43":[-2707.91,240.08],"5-37-21":[-3200.67,3510.35],"4-18-10":[-3410.48,3510.35],"6-75-44":[-2823.85,2320.44],"6-75-45":[-1210.6,2953.57],"5-37-22":[-4452.12,2988.35],"6-75-46":[-2177.38,2379.21],"6-75-47":[-2265.89,699.95],"5-37-23":[-2265.89,2510.29],"4-18-11":[-4635.36,2988.35],"6-75-48":[-215.43,194.97],"6-75-49":[-173.62,295.62],"5-37-24":[-230.72,445.51],"6-75-50":[36.6,248.97],"6-75-51":[34.25,310.31],"5-37-25":[31.79,351.6],"4-18-12":[-230.72,2476.4],"6-75-52":[30.27,360.14],"6-75-53":[-41.42,701.92],"5-37-26":[-41.42,701.92],"6-75-54":[20.79,428.74],"6-75-55":[-121.89,777.04],"5-37-27":[-121.89,777.04],"4-18-13":[-121.89,777.04],"6-75-56":[-384.7,1213.92],"6-75-57":[-447.71,2787.68],"5-37-28":[-447.71,2976.87],"6-75-58":[-375.05,3670.33],"6-75-59":[-331.06,3745.57],"5-37-29":[-426.08,3745.57],"4-18-14":[-498.31,3745.57],"6-75-60":[-1033.03,3590.97],"6-75-61":[-4324.73,3236.16],"5-37-30":[-4324.73,3590.97],"6-75-62":[-4687.77,2971.57],"6-75-63":[-4404.37,2839.82],"5-37-31":[-4960.26,2971.57],"4-18-15":[-5182.3,3590.97],"6-76-0":[-1100.37,787.46],"6-76-1":[18.88,1369.31],"6-76-2":[20.05,1230.96],"6-76-3":[-173.13,1383.91],"6-76-4":[15.48,1488.42],"6-76-5":[14.03,1534.77],"6-76-6":[-164.43,2313.76],"6-76-7":[-3852.41,1139.05],"6-76-8":[-4903.69,538.64],"6-76-9":[-5169.28,306.08],"6-76-10":[-5362.81,316.75],"6-76-11":[-5483.38,357.69],"6-76-12":[-5573.62,332.1],"6-76-13":[-5588.1,291.25],"6-76-14":[-5682.31,251.97],"6-76-15":[-5514.79,721.64],"6-76-16":[-5255.82,1541.99],"6-76-17":[-5815.38,2603.85],"6-76-18":[-6277.37,3897.68],"6-76-19":[-5944.74,3093.99],"6-76-20":[-4889.87,2689.12],"6-76-21":[-3229.67,2516.84],"6-76-22":[-2487.96,2262.38],"6-76-23":[-2603.95,1972.68],"6-76-24":[-2073.83,2173.07],"6-76-25":[-93.96,1794.5],"6-76-26":[28.49,2849.88],"6-76-27":[217.45,2729.65],"6-76-28":[235.12,3267.45],"6-76-29":[230.59,3342.07],"6-76-30":[309.01,3564.01],"6-76-31":[236.85,4305.91],"6-76-32":[258.3,4251.91],"6-76-33":[330.21,3634.02],"6-76-34":[206.1,3310.07],"6-76-35":[230.19,3133.45],"6-76-36":[-18.37,2712.65],"6-76-37":[7.99,2969.88],"6-76-38":[-27.14,1841.51],"6-76-39":[-90.16,2064.08],"6-76-40":[-2173.17,1805.67],"6-76-41":[-2277.59,2225.38],"6-76-42":[-1756.08,2563.86],"6-76-43":[-2149.83,2801.7],"6-76-44":[-2247.85,3074.25],"6-76-45":[-318.31,3812.51],"6-76-46":[-2278.18,2525.74],"6-76-47":[-2641.23,1537.39],"6-76-48":[-60.34,737.51],"6-76-49":[-15.68,250.51],"6-76-50":[5.94,290.32],"6-76-51":[36.06,326.5],"6-76-52":[32.25,359.97],"6-76-53":[20.17,425.42],"6-76-54":[0.26,323.5],"6-76-55":[-203.89,540.75],"6-76-56":[-284.94,1400],"6-76-57":[-321.47,2930.46],"6-76-58":[-321.94,3670.26],"6-76-59":[-308.26,3781.61],"6-76-60":[-353.67,3628.25],"6-76-61":[-4071.22,3346.55],"6-76-62":[-5122.48,3092.47],"6-76-63":[-4415.19,2876.01],"6-77-0":[-1124.35,1055.36],"6-77-1":[18.74,1392.41],"5-38-0":[-1124.35,1392.41],"6-77-2":[19.64,1229.3],"6-77-3":[-94.34,1373.41],"5-38-1":[-173.13,1383.91],"6-77-4":[12.81,1634.75],"6-77-5":[12.61,1743.61],"5-38-2":[12.61,1743.61],"6-77-6":[-352.38,1813.53],"6-77-7":[-4089.95,676.92],"5-38-3":[-4089.95,2313.76],"6-77-8":[-4882.69,352.95],"6-77-9":[-5215.5,366.87],"5-38-4":[-5215.5,538.64],"6-77-10":[-5498.32,327.96],"6-77-11":[-5772.44,306.61],"5-38-5":[-5772.44,357.69],"6-77-12":[-5701.29,311.33],"6-77-13":[-5196.38,300.03],"5-38-6":[-5701.29,332.1],"6-77-14":[-5259.29,375.52],"6-77-15":[-4338.29,1214.51],"5-38-7":[-5682.31,1214.51],"6-77-16":[-4941.4,1062.09],"6-77-17":[-5667.66,3382.16],"5-38-8":[-5815.38,3382.16],"6-77-18":[-5914.86,3297.16],"6-77-19":[-5911.63,2377.57],"5-38-9":[-6277.37,3897.68],"6-77-20":[-5580.5,1781.74],"6-77-21":[-5357.43,1378.43],"5-38-10":[-5580.5,2689.12],"6-77-22":[-5016.07,2032.54],"6-77-23":[-4117.39,2355.84],"5-38-11":[-5016.07,2355.84],"6-77-24":[-3411.94,2168.09],"6-77-25":[-2838.58,2735.56],"5-38-12":[-3411.94,2735.56],"6-77-26":[-70.43,3016.69],"6-77-27":[82.06,4526.44],"5-38-13":[-70.43,4526.44],"6-77-28":[-83.3,4259.18],"6-77-29":[-358.33,4177.49],"5-38-14":[-358.33,4259.18],"6-77-30":[-934.21,5793.53],"6-77-31":[142.08,4892.29],"5-38-15":[-934.21,5793.53],"6-77-32":[136.09,5158.31],"6-77-33":[-45.68,5869.55],"5-38-16":[-45.68,5869.55],"6-77-34":[-49.58,4123.49],"6-77-35":[-48.06,4205.18],"5-38-17":[-49.58,4205.18],"6-77-36":[-18.95,4458.44],"6-77-37":[-438.11,2927.68],"5-38-18":[-438.11,4458.44],"6-77-38":[-2829.96,2650.56],"6-77-39":[-2796.31,2037.87],"5-38-19":[-2829.96,2650.56],"6-77-40":[-2472.44,2270.84],"6-77-41":[-1743.75,2075.54],"5-38-20":[-2472.44,2270.84],"6-77-42":[9.2,1378.06],"6-77-43":[15.55,1800.57],"5-38-21":[-2149.83,2801.7],"6-77-44":[24.23,2378.7],"6-77-45":[27.4,3201.77],"5-38-22":[-2247.85,3812.51],"6-77-46":[-2116.73,3332.16],"6-77-47":[-2192.81,1046.56],"5-38-23":[-2641.23,3332.16],"6-77-48":[-40.14,1277.56],"6-77-49":[42.15,369.81],"5-38-24":[-60.34,1277.56],"6-77-50":[-102.73,298.77],"6-77-51":[38.18,305.31],"5-38-25":[-102.73,326.5],"6-77-52":[33.28,305.57],"6-77-53":[29.46,331.34],"5-38-26":[20.17,425.42],"6-77-54":[-0.19,369.05],"6-77-55":[-189.27,356.35],"5-38-27":[-203.89,540.75],"6-77-56":[-235.14,1400],"6-77-57":[-372.29,3035.01],"5-38-28":[-372.29,3035.01],"6-77-58":[-287.74,3670.15],"6-77-59":[-274.5,3814.29],"5-38-29":[-321.94,3814.29],"6-77-60":[-469.71,3652.21],"6-77-61":[-3993.76,3460.18],"5-38-30":[-4071.22,3652.21],"6-77-62":[-5243.84,3182.27],"6-77-63":[-4424.23,2907.97],"5-38-31":[-5243.84,3182.27],"6-78-0":[-970.38,939.18],"6-78-1":[18.5,1250.32],"6-78-2":[-30.99,1167.04],"6-78-3":[14.08,1218.6],"6-78-4":[10.33,1687.01],"6-78-5":[8.69,1466.36],"6-78-6":[-400.01,1386.1],"6-78-7":[-3581.29,518.66],"6-78-8":[-4793.25,314.82],"6-78-9":[-5180.83,268.49],"6-78-10":[-5348.63,286.2],"6-78-11":[-5412.25,279.53],"6-78-12":[-4944.88,258.22],"6-78-13":[-4186.19,248.68],"6-78-14":[-4793.25,340.26],"6-78-15":[-4143.61,680.41],"6-78-16":[-5893.98,3881.85],"6-78-17":[-4967.62,3918.41],"6-78-18":[-5507.69,3209.2],"6-78-19":[-5894.31,1446.37],"6-78-20":[-5402.84,949.71],"6-78-21":[-5248.75,1047.17],"6-78-22":[-4866.76,1974.55],"6-78-23":[-4208.66,2149.19],"6-78-24":[-4061.47,2651.93],"6-78-25":[-3288.6,2755.96],"6-78-26":[-3098.02,3297.68],"6-78-27":[-3315.48,3970.6],"6-78-28":[-3578.64,3839.48],"6-78-29":[-3580.79,4373.18],"6-78-30":[-3657.85,1692.99],"6-78-31":[-3167.58,881.98],"6-78-32":[-77.85,835.18],"6-78-33":[-77.15,1678.99],"6-78-34":[-74.93,4326.17],"6-78-35":[-67.51,3769.59],"6-78-36":[-130.64,3880.6],"6-78-37":[-2000.23,3253.67],"6-78-38":[-2030.7,2669.71],"6-78-39":[-711.3,2607.92],"6-78-40":[-3.87,2060.19],"6-78-41":[3.4,2044.8],"6-78-42":[8.86,1048.06],"6-78-43":[15.8,951.21],"6-78-44":[24.72,1433.82],"6-78-45":[29.26,3156.2],"6-78-46":[-2024.01,3821.45],"6-78-47":[-2001.31,3842.94],"6-78-48":[-74.88,677.36],"6-78-49":[11.18,337.93],"6-78-50":[45.44,248.74],"6-78-51":[40.21,253.02],"6-78-52":[34.91,285.29],"6-78-53":[31.4,287.71],"6-78-54":[-3.31,270.42],"6-78-55":[-81.06,316.21],"6-78-56":[-257.78,1829.25],"6-78-57":[-388.9,3049.46],"6-78-58":[-347.69,3654.4],"6-78-59":[-343.6,3814.29],"6-78-60":[-573.3,3676.48],"6-78-61":[-3981.03,3515.55],"6-78-62":[-5253.05,3278.24],"6-78-63":[-4405.8,2956.72],"6-79-0":[-613.35,1108.07],"6-79-1":[-682.84,1001.69],"5-39-0":[-970.38,1250.32],"6-79-2":[-353.21,781.43],"6-79-3":[-157.61,1344.7],"5-39-1":[-353.21,1344.7],"4-19-0":[-1124.35,1392.41],"6-79-4":[-36.17,1629.79],"6-79-5":[7.69,1296.92],"5-39-2":[-36.17,1687.01],"6-79-6":[-355.26,1171.38],"6-79-7":[-2386.01,1544.08],"5-39-3":[-3581.29,1544.08],"4-19-1":[-4089.95,2313.76],"3-9-0":[-4432.93,2859.42],"6-79-8":[-4562.76,224],"6-79-9":[-5148.85,273.71],"5-39-4":[-5180.83,314.82],"6-79-10":[-5415.85,309.09],"6-79-11":[-5462.34,297.07],"5-39-5":[-5462.34,309.09],"4-19-2":[-5772.44,538.64],"6-79-12":[-5180.01,294.44],"6-79-13":[-4272.35,291.7],"5-39-6":[-5180.01,294.44],"6-79-14":[-5007.92,260.4],"6-79-15":[-4145.05,476.12],"5-39-7":[-5007.92,680.41],"4-19-3":[-5701.29,1214.51],"3-9-1":[-6626.98,4110.39],"2-4-0":[-7020.16,4840.9],"6-79-16":[-5156.24,5616.16],"6-79-17":[-5348.51,5133.37],"5-39-8":[-5893.98,5616.16],"6-79-18":[-4972.35,4058.15],"6-79-19":[-4829.8,3448.78],"5-39-9":[-5894.31,4058.15],"4-19-4":[-6277.37,5616.16],"6-79-20":[-4587.19,377.37],"6-79-21":[-4872.25,790.42],"5-39-10":[-5402.84,1047.17],"6-79-22":[-4701.53,1407.05],"6-79-23":[-4057.57,1499.62],"5-39-11":[-4866.76,2149.19],"4-19-5":[-5580.5,2689.12],"3-9-2":[-6289.49,5616.16],"6-79-24":[-3209.08,1721.97],"6-79-25":[-2548.5,2990.34],"5-39-12":[-4061.47,2990.34],"6-79-26":[-3723.11,3647.39],"6-79-27":[-3701.88,3223.81],"5-39-13":[-3723.11,3970.6],"4-19-6":[-4061.47,4526.44],"6-79-28":[-4216.96,3002.22],"6-79-29":[-4531.33,1451.56],"5-39-14":[-4531.33,4373.18],"6-79-30":[-4682.65,913.05],"6-79-31":[-4288.31,587.03],"5-39-15":[-4682.65,1692.99],"4-19-7":[-4682.65,5793.53],"3-9-3":[-4682.65,5793.53],"2-4-1":[-6708.74,5793.53],"6-79-32":[-3596.12,522.02],"6-79-33":[-86.64,869.52],"5-39-16":[-3596.12,1678.99],"6-79-34":[-81.84,1423.53],"6-79-35":[-1528.24,2909.22],"5-39-17":[-1528.24,4326.17],"4-19-8":[-3596.12,5869.55],"6-79-36":[-1674.39,3169.82],"6-79-37":[-933.73,3564.38],"5-39-18":[-2000.23,3880.6],"6-79-38":[-93.44,2963.33],"6-79-39":[-68.11,1691.97],"5-39-19":[-2030.7,2963.33],"4-19-9":[-2829.96,4458.44],"3-9-4":[-3596.12,5869.55],"6-79-40":[-18.99,1441.6],"6-79-41":[-12.01,1436.47],"5-39-20":[-18.99,2060.19],"6-79-42":[8.42,786.4],"6-79-43":[7.66,379.51],"5-39-21":[7.66,1048.06],"4-19-10":[-2472.44,2801.7],"6-79-44":[24.72,3388.51],"6-79-45":[31.3,4034.49],"5-39-22":[24.72,4034.49],"6-79-46":[30.84,5065.49],"6-79-47":[39.44,5582.77],"5-39-23":[-2024.01,5582.77],"4-19-11":[-2641.23,5582.77],"3-9-5":[-4635.36,5582.77],"2-4-2":[-5581.84,5869.55],"6-79-48":[-6.88,476.03],"6-79-49":[-45.43,262.45],"5-39-24":[-74.88,677.36],"6-79-50":[45.58,287.29],"6-79-51":[40.61,298.27],"5-39-25":[40.21,298.27],"4-19-12":[-102.73,1277.56],"6-79-52":[35.82,293.08],"6-79-53":[31.85,306.15],"5-39-26":[31.4,306.15],"6-79-54":[11.02,265.84],"6-79-55":[-22.65,224.63],"5-39-27":[-81.06,316.21],"4-19-13":[-203.89,540.75],"3-9-6":[-230.72,2476.4],"6-79-56":[-132.5,2238.4],"6-79-57":[-376.73,3044.79],"5-39-28":[-388.9,3049.46],"6-79-58":[-382.68,3633.13],"6-79-59":[-360.54,3703.54],"5-39-29":[-382.68,3814.29],"4-19-14":[-388.9,3814.29],"6-79-60":[-487.25,3739.77],"6-79-61":[-3962.4,3596.54],"5-39-30":[-3981.03,3739.77],"6-79-62":[-5147.9,3326.45],"6-79-63":[-4431.66,2985.88],"5-39-31":[-5253.05,3326.45],"4-19-15":[-5253.05,3739.77],"3-9-7":[-5253.05,3814.29],"2-4-3":[-5524.14,4706.54],"6-80-0":[-607.91,1052.02],"6-80-1":[-695.37,916.87],"6-80-2":[-313.43,688.23],"6-80-3":[-506.03,1590.08],"6-80-4":[-302.45,1299.84],"6-80-5":[-41.81,1102.37],"6-80-6":[-257.53,933.24],"6-80-7":[-884.89,1429.72],"6-80-8":[-4242.68,436.57],"6-80-9":[-5126.54,285.08],"6-80-10":[-5387.21,302.02],"6-80-11":[-5405.84,248.97],"6-80-12":[-5239.46,347.27],"6-80-13":[-4483.75,372.83],"6-80-14":[-5189.69,355.61],"6-80-15":[-3747.5,115.89],"6-80-16":[-3686.91,4485.88],"6-80-17":[-5781.09,4116.85],"6-80-18":[-5034.39,4577.24],"6-80-19":[-4691.4,3588.07],"6-80-20":[-4381.02,2783.91],"6-80-21":[-3952.44,444.94],"6-80-22":[-4308.52,925.69],"6-80-23":[-3977.26,1950.83],"6-80-24":[1.69,2559.62],"6-80-25":[11.6,2551.64],"6-80-26":[-3601.77,2444.71],"6-80-27":[-4091.03,2493.24],"6-80-28":[-4677.41,2422.23],"6-80-29":[-4881.94,1006.97],"6-80-30":[-4951.46,501.55],"6-80-31":[-4954.17,235.87],"6-80-32":[-4709.84,231.65],"6-80-33":[-3470.76,497.87],"6-80-34":[-87.49,977.44],"6-80-35":[-1955.8,2394.22],"6-80-36":[-4238.65,2432.86],"6-80-37":[-52.79,2399.7],"6-80-38":[-3.35,2631.65],"6-80-39":[-45.58,2635.66],"6-80-40":[-13.4,1977.92],"6-80-41":[3.13,907.5],"6-80-42":[-48.51,443.94],"6-80-43":[-13.11,2710.9],"6-80-44":[27.43,3527.05],"6-80-45":[35.59,4482.23],"6-80-46":[-2.1,3994.84],"6-80-47":[-76.02,4318.89],"6-80-48":[-36.78,116.54],"6-80-49":[-45.44,351.6],"6-80-50":[4.21,362.82],"6-80-51":[40.48,339.43],"6-80-52":[35.29,243.79],"6-80-53":[31.46,421.25],"6-80-54":[28.44,286.08],"6-80-55":[-16.19,572.15],"6-80-56":[-122.56,2427.48],"6-80-57":[-344.52,3127.78],"6-80-58":[-354.02,3590.93],"6-80-59":[-359.54,3615.32],"6-80-60":[-594.45,3741.77],"6-80-61":[-3969.31,3655.25],"6-80-62":[-5188.16,3360.65],"6-80-63":[-4417.84,3013.02],"6-81-0":[-445.47,790.85],"6-81-1":[-579.87,425.58],"5-40-0":[-695.37,1052.02],"6-81-2":[-242.37,1171.88],"6-81-3":[-234.37,703.61],"5-40-1":[-506.03,1590.08],"6-81-4":[-375.85,887.16],"6-81-5":[-161.15,1045.3],"5-40-2":[-375.85,1299.84],"6-81-6":[-62.37,1221.56],"6-81-7":[-1167.31,1508.82],"5-40-3":[-1167.31,1508.82],"6-81-8":[-4170.54,1226.45],"6-81-9":[-5147.46,477.07],"5-40-4":[-5147.46,1226.45],"6-81-10":[-5384.89,275.89],"6-81-11":[-5567.68,298.46],"5-40-5":[-5567.68,302.02],"6-81-12":[-5556.1,367.95],"6-81-13":[-5033.22,377.5],"5-40-6":[-5556.1,377.5],"6-81-14":[-5015.18,65.52],"6-81-15":[-4002.56,841.67],"5-40-7":[-5189.69,841.67],"6-81-16":[-3685,748.23],"6-81-17":[-4092.46,4455.71],"5-40-8":[-5781.09,4485.88],"6-81-18":[-4444.4,4802.09],"6-81-19":[-4794.15,3898.23],"5-40-9":[-5034.39,4802.09],"6-81-20":[-5198.95,4173.89],"6-81-21":[-5598.2,2032.48],"5-40-10":[-5598.2,4173.89],"6-81-22":[-5621.37,483.61],"6-81-23":[-5224.64,539.09],"5-40-11":[-5621.37,1950.83],"6-81-24":[-5022.02,1587.94],"6-81-25":[-4903.94,1702.56],"5-40-12":[-5022.02,2559.62],"6-81-26":[-3390.66,2723.38],"6-81-27":[-4200.55,2795.35],"5-40-13":[-4200.55,2795.35],"6-81-28":[-5482.93,1996.26],"6-81-29":[-5374.08,846.67],"5-40-14":[-5482.93,2422.23],"6-81-30":[-5361.33,410.82],"6-81-31":[-5223.91,-46.62],"5-40-15":[-5361.33,501.55],"6-81-32":[-5354.28,-45.29],"6-81-33":[-5202.96,382.82],"5-40-16":[-5354.28,497.87],"6-81-34":[-4772.87,840.63],"6-81-35":[-1909.66,1978.24],"5-40-17":[-4772.87,2394.22],"6-81-36":[-4295.27,2866.35],"6-81-37":[-2474.56,2817.4],"5-40-18":[-4295.27,2866.35],"6-81-38":[-37.94,1755.56],"6-81-39":[-49.87,1687.3],"5-40-19":[-49.87,2635.66],"6-81-40":[-57.71,536.44],"6-81-41":[-101.18,464.66],"5-40-20":[-101.18,1977.92],"6-81-42":[-87.87,1944.41],"6-81-43":[-12.99,4091.88],"5-40-21":[-87.87,4091.88],"6-81-44":[27.43,3768.23],"6-81-45":[-1031.88,4731.09],"5-40-22":[-1031.88,4731.09],"6-81-46":[-918.65,4364.68],"6-81-47":[-755.34,705.21],"5-40-23":[-918.65,4364.68],"6-81-48":[-47.43,895.68],"6-81-49":[-43.18,90.78],"5-40-24":[-47.43,895.68],"6-81-50":[2.4,372.49],"6-81-51":[21.02,334.11],"5-40-25":[2.4,372.49],"6-81-52":[33.96,288.46],"6-81-53":[30.7,269.64],"5-40-26":[30.7,421.25],"6-81-54":[28.32,478.06],"6-81-55":[3.1,1099.75],"5-40-27":[-16.19,1099.75],"6-81-56":[-100.26,2482.8],"6-81-57":[-290.32,3161.72],"5-40-28":[-344.52,3161.72],"6-81-58":[-314.37,3513.33],"6-81-59":[-375.95,3613.49],"5-40-29":[-375.95,3615.32],"6-81-60":[-590.56,3745.47],"6-81-61":[-3970.26,3699.75],"5-40-30":[-3970.26,3745.47],"6-81-62":[-5105.72,3382.27],"6-81-63":[-4656.2,3034.71],"5-40-31":[-5188.16,3382.27],"6-82-0":[-599.47,1070.76],"6-82-1":[-348.88,540.96],"6-82-2":[-38.22,899.07],"6-82-3":[-212.45,846.93],"6-82-4":[-648.98,789.11],"6-82-5":[1.27,1323.62],"6-82-6":[-313.5,1189.76],"6-82-7":[-260.3,2246.69],"6-82-8":[-3969.17,1587.85],"6-82-9":[-5168.42,441.34],"6-82-10":[-5365.38,321.16],"6-82-11":[-5536.76,337.16],"6-82-12":[-5534.93,384.64],"6-82-13":[-4880.9,320.68],"6-82-14":[-4736.9,173.57],"6-82-15":[-3958,982.13],"6-82-16":[-4319.35,522.27],"6-82-17":[-4720.05,294.16],"6-82-18":[-6332.17,3417.02],"6-82-19":[-6279.16,5595.76],"6-82-20":[-5617.22,4411.42],"6-82-21":[-5768.11,4366.48],"6-82-22":[-5860.36,1761.32],"6-82-23":[-5726.87,170.47],"6-82-24":[-5743.21,274.33],"6-82-25":[-5255.34,1114.62],"6-82-26":[-4888.06,1466.69],"6-82-27":[-5072.73,1380.57],"6-82-28":[-5232.44,723.52],"6-82-29":[-5364.53,27.68],"6-82-30":[-5545.23,11.01],"6-82-31":[-5332.59,-49.03],"6-82-32":[-5272.06,-45.11],"6-82-33":[-5358.16,-10.81],"6-82-34":[-5287.25,5.08],"6-82-35":[-5185.25,703.52],"6-82-36":[-5425.29,1352.56],"6-82-37":[-5630.71,1423.68],"6-82-38":[-35.86,1084.1],"6-82-39":[-24.06,227.43],"6-82-40":[-103.37,153.45],"6-82-41":[-202.87,1732.32],"6-82-42":[-86.69,4285.49],"6-82-43":[16.23,4287.41],"6-82-44":[-28.43,5494.75],"6-82-45":[-1068.46,3402],"6-82-46":[-987.88,286.16],"6-82-47":[-578.39,474.26],"6-82-48":[-51.84,1115.13],"6-82-49":[-50.16,171.52],"6-82-50":[-1.25,299.67],"6-82-51":[36.22,375.64],"6-82-52":[33.96,329.16],"6-82-53":[30.52,319.15],"6-82-54":[28.32,438.32],"6-82-55":[5.56,1774.62],"6-82-56":[-124.12,2729.04],"6-82-57":[-198.79,3157.08],"6-82-58":[-295.24,3362.16],"6-82-59":[-353.36,3614.29],"6-82-60":[-539.75,3772.23],"6-82-61":[-3953.55,3728.18],"6-82-62":[-5186.27,3397.85],"6-82-63":[-4702.29,3048.46],"6-83-0":[-564.45,1069.71],"6-83-1":[-153.79,796.8],"5-41-0":[-599.47,1070.76],"6-83-2":[15.31,951.14],"6-83-3":[-113.51,904.5],"5-41-1":[-212.45,951.14],"4-20-0":[-695.37,1590.08],"6-83-4":[-485.6,1019.15],"6-83-5":[-11.14,1503.33],"5-41-2":[-648.98,1503.33],"6-83-6":[-272.38,1230.82],"6-83-7":[-311.37,1993.91],"5-41-3":[-313.5,2246.69],"4-20-1":[-1167.31,2246.69],"6-83-8":[-4634.74,1908.12],"6-83-9":[-5125.14,331.03],"5-41-4":[-5168.42,1908.12],"6-83-10":[-5243.09,350.47],"6-83-11":[-5406.52,469.81],"5-41-5":[-5536.76,469.81],"4-20-2":[-5567.68,1908.12],"6-83-12":[-5439.07,476.59],"6-83-13":[-5360.87,627.4],"5-41-6":[-5534.93,627.4],"6-83-14":[-4630.33,323.7],"6-83-15":[-4323.21,232.09],"5-41-7":[-4736.9,982.13],"4-20-3":[-5556.1,982.13],"6-83-16":[-4496.34,321.64],"6-83-17":[-4885.79,1858.17],"5-41-8":[-4885.79,1858.17],"6-83-18":[-5123.35,3878.24],"6-83-19":[-6718.3,3814.01],"5-41-9":[-6718.3,5595.76],"4-20-4":[-6718.3,5595.76],"6-83-20":[-6774,4034.31],"6-83-21":[-6839.22,3448.75],"5-41-10":[-6839.22,4411.42],"6-83-22":[-5620.75,2931.28],"6-83-23":[-5595.05,1395.64],"5-41-11":[-5860.36,2931.28],"4-20-5":[-6839.22,4411.42],"6-83-24":[-5025.44,2920.56],"6-83-25":[-5267.5,1727.17],"5-41-12":[-5743.21,2920.56],"6-83-26":[-5123.87,1060.42],"6-83-27":[-5029.91,1466.16],"5-41-13":[-5123.87,1466.69],"4-20-6":[-5743.21,2920.56],"6-83-28":[-5508.98,-44.27],"6-83-29":[-4389.05,214.21],"5-41-14":[-5508.98,723.52],"6-83-30":[-4357.02,782.79],"6-83-31":[-5137.86,-50.21],"5-41-15":[-5545.23,782.79],"4-20-7":[-5545.23,2422.23],"6-83-32":[-5314.12,-46.38],"6-83-33":[-5614.7,862.8],"5-41-16":[-5614.7,862.8],"6-83-34":[-5577.79,-10.47],"6-83-35":[-5182.77,-31.32],"5-41-17":[-5577.79,703.52],"4-20-8":[-5614.7,2394.22],"6-83-36":[-4511.57,1412.17],"6-83-37":[-3831.85,1030.52],"5-41-18":[-5630.71,1423.68],"6-83-38":[-3585.77,1700.21],"6-83-39":[-27.02,3059.56],"5-41-19":[-3585.77,3059.56],"4-20-9":[-5630.71,3059.56],"6-83-40":[-134.31,1310.57],"6-83-41":[-191.43,2787.3],"5-41-20":[-202.87,2787.3],"6-83-42":[7.73,3357.26],"6-83-43":[16.98,3964.31],"5-41-21":[-86.69,4287.41],"4-20-10":[-202.87,4287.41],"6-83-44":[26.42,3759],"6-83-45":[-63.56,3836.25],"5-41-22":[-1068.46,5494.75],"6-83-46":[-60.94,1827.16],"6-83-47":[-114.1,314.63],"5-41-23":[-987.88,1827.16],"4-20-11":[-1068.46,5494.75],"6-83-48":[-83.21,231.08],"6-83-49":[-35.06,320.69],"5-41-24":[-83.21,1115.13],"6-83-50":[40.86,616.39],"6-83-51":[37.02,459.58],"5-41-25":[-1.25,616.39],"4-20-12":[-83.21,1115.13],"6-83-52":[33.5,442.85],"6-83-53":[30.59,339.47],"5-41-26":[30.52,442.85],"6-83-54":[28.68,337.03],"6-83-55":[18.67,2242.91],"5-41-27":[5.56,2242.91],"4-20-13":[-16.19,2242.91],"6-83-56":[-158.29,2841.08],"6-83-57":[-247.05,3100.22],"5-41-28":[-247.05,3157.08],"6-83-58":[-252.23,3161.67],"6-83-59":[-384,3541.02],"5-41-29":[-384,3614.29],"4-20-14":[-384,3615.32],"6-83-60":[-572.12,3807.22],"6-83-61":[-3879.34,3762.75],"5-41-30":[-3953.55,3807.22],"6-83-62":[-4903.55,3423.55],"6-83-63":[-4589.93,3056.25],"5-41-31":[-5186.27,3423.55],"4-20-15":[-5188.16,3807.22],"6-84-0":[-462.49,582.84],"6-84-1":[-328.81,1037.36],"6-84-2":[14.45,1081.68],"6-84-3":[-387.99,886.04],"6-84-4":[-216.46,1023.47],"6-84-5":[-70.1,1436.73],"6-84-6":[-103.35,1295.71],"6-84-7":[-303.02,1934.97],"6-84-8":[-4182.74,1250.98],"6-84-9":[-4917.61,1096.24],"6-84-10":[-5110.65,1512.31],"6-84-11":[-5270.52,975.89],"6-84-12":[-5290.16,1624.4],"6-84-13":[-5400.11,1020.66],"6-84-14":[-4894.48,630.85],"6-84-15":[-4745.05,381.12],"6-84-16":[-4987.2,265.27],"6-84-17":[-5281.48,292.44],"6-84-18":[-5836.1,3050.69],"6-84-19":[-5818.9,3289.8],"6-84-20":[-6578.1,3513.08],"6-84-21":[-5878.98,4466.14],"6-84-22":[-6534.79,3206.24],"6-84-23":[-5720.73,2955.44],"6-84-24":[-5516.96,1006.29],"6-84-25":[-4756.9,187.1],"6-84-26":[-4678.6,-35.61],"6-84-27":[-4654.95,-39.16],"6-84-28":[-4518.41,-28.72],"6-84-29":[-4208.2,213.94],"6-84-30":[-4538.58,-42.82],"6-84-31":[-4857.68,-53.64],"6-84-32":[-5394.31,-44.62],"6-84-33":[-5613.24,-41.47],"6-84-34":[-5297.8,-15.91],"6-84-35":[-5101.96,-11.7],"6-84-36":[-5499.36,-25.08],"6-84-37":[-4713.67,-16.99],"6-84-38":[-4301.04,185.08],"6-84-39":[-2980.26,961.28],"6-84-40":[-3378.52,2918.44],"6-84-41":[-1151.89,3127.26],"6-84-42":[7.34,4351.1],"6-84-43":[17.48,3400.07],"6-84-44":[21.66,3212.8],"6-84-45":[6.6,2997.69],"6-84-46":[-102.22,286.43],"6-84-47":[-22.51,261.98],"6-84-48":[-26.82,374.17],"6-84-49":[39.19,591.85],"6-84-50":[37.64,993.66],"6-84-51":[36.03,1601.39],"6-84-52":[33.47,925.89],"6-84-53":[30.96,1461.81],"6-84-54":[28.91,1084.24],"6-84-55":[16.37,1261.04],"6-84-56":[-130.15,2834.46],"6-84-57":[-396.29,2971.6],"6-84-58":[-396.29,2944.4],"6-84-59":[-328.25,3405.04],"6-84-60":[-597.8,3828.34],"6-84-61":[-3788.87,3798.94],"6-84-62":[-4848.77,3451.5],"6-84-63":[-4510.96,3061.98],"6-85-0":[-690,433.63],"6-85-1":[-457.37,975.82],"5-42-0":[-690,1037.36],"6-85-2":[13.83,1299.01],"6-85-3":[-419.89,1019.11],"5-42-1":[-419.89,1299.01],"6-85-4":[-830.07,1360.06],"6-85-5":[-695.45,2999.15],"5-42-2":[-830.07,2999.15],"6-85-6":[-266.96,2295.42],"6-85-7":[-1076.55,1778.99],"5-42-3":[-1076.55,2295.42],"6-85-8":[-4190.64,1773.8],"6-85-9":[-4762.25,1487.95],"5-42-4":[-4917.61,1773.8],"6-85-10":[-4948.41,1559.37],"6-85-11":[-5080.07,864.4],"5-42-5":[-5270.52,1559.37],"6-85-12":[-5419.76,1394.5],"6-85-13":[-5594.69,600.13],"5-42-6":[-5594.69,1624.4],"6-85-14":[-5097.9,429.21],"6-85-15":[-4796.18,315.69],"5-42-7":[-5097.9,630.85],"6-85-16":[-5524.4,243.14],"6-85-17":[-5768.88,430.08],"5-42-8":[-5768.88,430.08],"6-85-18":[-5589.1,3092.4],"6-85-19":[-5934.6,3228.78],"5-42-9":[-5934.6,3289.8],"6-85-20":[-6770.5,2831.82],"6-85-21":[-6817.28,3905.23],"5-42-10":[-6817.28,4466.14],"6-85-22":[-6709.38,3453.88],"6-85-23":[-5792.46,2164.41],"5-42-11":[-6709.38,3453.88],"6-85-24":[-5484.88,1992.49],"6-85-25":[-5286.66,25.87],"5-42-12":[-5516.96,1992.49],"6-85-26":[-4248.87,28.92],"6-85-27":[-4210.77,43.52],"5-42-13":[-4678.6,43.52],"6-85-28":[-3781.28,-37.67],"6-85-29":[-4287.62,-44.2],"5-42-14":[-4518.41,213.94],"6-85-30":[-4861.17,-59.06],"6-85-31":[-5132.57,-60.26],"5-42-15":[-5132.57,-42.82],"6-85-32":[-5556.87,-55.88],"6-85-33":[-5144.84,-49.83],"5-42-16":[-5613.24,-41.47],"6-85-34":[-4770.64,-41.73],"6-85-35":[-4833.5,-35.72],"5-42-17":[-5297.8,-11.7],"6-85-36":[-4832.9,-25.51],"6-85-37":[-4426.33,12.57],"5-42-18":[-5499.36,12.57],"6-85-38":[-4177.52,-11.51],"6-85-39":[-4112.02,1927.5],"5-42-19":[-4301.04,1927.5],"6-85-40":[-3664.51,2127.4],"6-85-41":[-89.15,3375.88],"5-42-20":[-3664.51,3375.88],"6-85-42":[7.34,3828.19],"6-85-43":[14.16,2719],"5-42-21":[7.34,4351.1],"6-85-44":[20.8,3176.76],"6-85-45":[23.87,3046.38],"5-42-22":[6.6,3212.8],"6-85-46":[27.26,405.08],"6-85-47":[-1.52,242.14],"5-42-23":[-102.22,405.08],"6-85-48":[-3.54,294.72],"6-85-49":[36.61,408.2],"5-42-24":[-26.82,591.85],"6-85-50":[36.35,551.14],"6-85-51":[-160.1,1362.49],"5-42-25":[-160.1,1601.39],"6-85-52":[-21.22,833.36],"6-85-53":[-20.09,1506.37],"5-42-26":[-21.22,1506.37],"6-85-54":[-4.67,1533.95],"6-85-55":[21.69,1802.8],"5-42-27":[-4.67,1802.8],"6-85-56":[-203.29,2724.67],"6-85-57":[-396.29,2726.3],"5-42-28":[-396.31,2971.6],"6-85-58":[-499.48,2693.03],"6-85-59":[-348.85,3395.87],"5-42-29":[-499.48,3405.04],"6-85-60":[-369.01,3894.08],"6-85-61":[-3796.88,3860.75],"5-42-30":[-3796.88,3894.08],"6-85-62":[-4719.26,3477.38],"6-85-63":[-4513.54,3064.64],"5-42-31":[-4848.77,3477.38],"6-86-0":[-753.27,251.12],"6-86-1":[-466.99,1030.05],"6-86-2":[11.81,1938.39],"6-86-3":[3.34,1421.23],"6-86-4":[-801.92,1600.86],"6-86-5":[-1082.04,3054.14],"6-86-6":[-700.69,2012.28],"6-86-7":[-806.03,2132.78],"6-86-8":[-3912.94,1361.22],"6-86-9":[-4585.29,250.25],"6-86-10":[-4946.48,219.71],"6-86-11":[-5126.76,213.66],"6-86-12":[-5068.99,217.01],"6-86-13":[-5140.98,281.46],"6-86-14":[-4858.96,248.91],"6-86-15":[-4878.06,244.16],"6-86-16":[-5684.41,713.35],"6-86-17":[-5765.18,925.05],"6-86-18":[-5641.98,769.1],"6-86-19":[-5615.16,3625.13],"6-86-20":[-5640.46,4120.59],"6-86-21":[-6897.64,2348.74],"6-86-22":[-6025.99,2575.17],"6-86-23":[-5754.46,426.39],"6-86-24":[-5012.35,324.48],"6-86-25":[-4448.42,182.37],"6-86-26":[-4638.51,-54.84],"6-86-27":[-4395.85,-37.12],"6-86-28":[-4402.76,-38.59],"6-86-29":[-4565.06,-65.77],"6-86-30":[-4843.92,-65.78],"6-86-31":[-5276.07,-67.58],"6-86-32":[-5038.14,-64],"6-86-33":[-4993.52,-57.09],"6-86-34":[-5251.52,-47.83],"6-86-35":[-5106.74,-36.76],"6-86-36":[-4516.21,-30.07],"6-86-37":[-4252,-21.06],"6-86-38":[-4015.79,209.37],"6-86-39":[-4236.3,376.48],"6-86-40":[-4436.02,387.36],"6-86-41":[-173.17,2468.93],"6-86-42":[7.71,2226.7],"6-86-43":[12.56,3995.58],"6-86-44":[18.37,3592.12],"6-86-45":[23.48,762.48],"6-86-46":[-48.04,901.05],"6-86-47":[-23.79,672.29],"6-86-48":[14.5,229.04],"6-86-49":[16.37,243.99],"6-86-50":[-198.8,279.58],"6-86-51":[34.42,205.49],"6-86-52":[31.27,211.66],"6-86-53":[23.66,225.7],"6-86-54":[-6.69,255.71],"6-86-55":[-6.75,1361.22],"6-86-56":[-210.37,2407.49],"6-86-57":[-215.22,2407.49],"6-86-58":[-397.61,2435.25],"6-86-59":[-355.94,3458.7],"6-86-60":[-377.17,3925.85],"6-86-61":[-3648.94,3915.12],"6-86-62":[-4993.61,3500.58],"6-86-63":[-4383.74,3065.4],"6-87-0":[-770.81,59.22],"6-87-1":[-454.18,910.5],"5-43-0":[-770.81,1030.05],"6-87-2":[10.38,2261.07],"6-87-3":[-386.02,2071.45],"5-43-1":[-386.02,2261.07],"4-21-0":[-770.81,2261.07],"6-87-4":[-383.96,1917.49],"6-87-5":[-3800.21,2042.55],"5-43-2":[-3800.21,3054.14],"6-87-6":[-2884.07,2117.36],"6-87-7":[-1727.04,2087.2],"5-43-3":[-2884.07,2132.78],"4-21-1":[-3800.21,3054.14],"3-10-0":[-3800.21,3054.14],"6-87-8":[-3759.02,1275.39],"6-87-9":[-4471.39,200.27],"5-43-4":[-4585.29,1361.22],"6-87-10":[-4763.91,154.26],"6-87-11":[-4755.98,142.53],"5-43-5":[-5126.76,219.71],"4-21-2":[-5270.52,1773.8],"6-87-12":[-4690.1,210.72],"6-87-13":[-5090.98,447.9],"5-43-6":[-5140.98,447.9],"6-87-14":[-3386.43,1084.54],"6-87-15":[-4735.27,566.99],"5-43-7":[-4878.06,1084.54],"4-21-3":[-5594.69,1624.4],"3-10-1":[-5594.69,1908.12],"6-87-16":[-5449.05,821.12],"6-87-17":[-5622.74,2139.17],"5-43-8":[-5765.18,2139.17],"6-87-18":[-5271.62,4103.6],"6-87-19":[-4991.34,4599.84],"5-43-9":[-5641.98,4599.84],"4-21-4":[-5934.6,4599.84],"6-87-20":[-5574.64,4772.12],"6-87-21":[-5572.75,3524.89],"5-43-10":[-6897.64,4772.12],"6-87-22":[-5739.76,2437.68],"6-87-23":[-5238.92,529.04],"5-43-11":[-6025.99,2575.17],"4-21-5":[-6897.64,4772.12],"3-10-2":[-6897.64,5595.76],"6-87-24":[-4481.3,-45.37],"6-87-25":[-6299.64,-54.11],"5-43-12":[-6299.64,324.48],"6-87-26":[-4518.2,-61.38],"6-87-27":[-5566.79,-68.36],"5-43-13":[-5566.79,-37.12],"4-21-6":[-6299.64,1992.49],"6-87-28":[-6365.04,-73.16],"6-87-29":[-4813.22,-76.65],"5-43-14":[-6365.04,-38.59],"6-87-30":[-4724.02,-74.88],"6-87-31":[-4950.65,-74.44],"5-43-15":[-5276.07,-65.78],"4-21-7":[-6365.04,213.94],"3-10-3":[-6365.04,2920.56],"6-87-32":[-5184.39,-70.63],"6-87-33":[-5209.14,-64.32],"5-43-16":[-5209.14,-57.09],"6-87-34":[-5299.08,-55.61],"6-87-35":[-4792.16,-45.34],"5-43-17":[-5299.08,-36.76],"4-21-8":[-5613.24,-11.7],"6-87-36":[-4585.57,-34.09],"6-87-37":[-4374.05,-24.11],"5-43-18":[-4585.57,-21.06],"6-87-38":[-3814.21,-13.14],"6-87-39":[-3394.78,-5.98],"5-43-19":[-4236.3,376.48],"4-21-9":[-5499.36,1927.5],"3-10-4":[-5630.71,3059.56],"6-87-40":[-3357.38,497.04],"6-87-41":[-93,2342.65],"5-43-20":[-4436.02,2468.93],"6-87-42":[5.69,3445.88],"6-87-43":[10.55,4709.11],"5-43-21":[5.69,4709.11],"4-21-10":[-4436.02,4709.11],"6-87-44":[18.37,4506.23],"6-87-45":[20.45,4004.61],"5-43-22":[18.37,4506.23],"6-87-46":[25.88,2081.25],"6-87-47":[28.04,795.12],"5-43-23":[-48.04,2081.25],"4-21-11":[-102.22,4506.23],"3-10-5":[-4436.02,5494.75],"6-87-48":[15.28,553.96],"6-87-49":[35.15,1026.53],"5-43-24":[14.5,1026.53],"6-87-50":[34.57,409.9],"6-87-51":[33.74,203.46],"5-43-25":[-198.8,409.9],"4-21-12":[-198.8,1601.39],"6-87-52":[16.11,133.57],"6-87-53":[-2.86,157.13],"5-43-26":[-2.86,225.7],"6-87-54":[-10.31,212.3],"6-87-55":[-10.62,1282.39],"5-43-27":[-10.62,1361.22],"4-21-13":[-21.22,1802.8],"3-10-6":[-198.8,2242.91],"6-87-56":[-79.71,1925.54],"6-87-57":[-164.03,1897.68],"5-43-28":[-215.22,2407.49],"6-87-58":[-346.65,2297.22],"6-87-59":[-393.73,3491.07],"5-43-29":[-397.61,3491.07],"4-21-14":[-499.48,3491.07],"6-87-60":[-577.11,3965.2],"6-87-61":[-3620.25,3965.2],"5-43-30":[-3648.94,3965.2],"6-87-62":[-5015.61,3512.38],"6-87-63":[-4383.62,3065.32],"5-43-31":[-5015.61,3512.38],"4-21-15":[-5015.61,3965.2],"3-10-7":[-5188.16,3965.2],"6-88-0":[-767.86,36.5],"6-88-1":[-428.44,959.04],"6-88-2":[9.6,2322.15],"6-88-3":[-39.25,2104.93],"6-88-4":[-606.74,2084.95],"6-88-5":[-2859.78,1815.24],"6-88-6":[-2822.2,1622.18],"6-88-7":[-1642.56,344.05],"6-88-8":[-3225.87,223.3],"6-88-9":[-4395.86,226.52],"6-88-10":[-4629.63,136.47],"6-88-11":[-4715.75,131.78],"6-88-12":[-4678.56,332.5],"6-88-13":[-4662.12,893.06],"6-88-14":[-1886.34,1554.79],"6-88-15":[-3945.89,447.99],"6-88-16":[-4579.02,2106.12],"6-88-17":[-4768.15,5451.96],"6-88-18":[-4851.07,5411.27],"6-88-19":[-5345.82,5666.76],"6-88-20":[-5826.83,4714.77],"6-88-21":[-5490.03,3432.07],"6-88-22":[-5665.99,1024.24],"6-88-23":[-4919.76,403.18],"6-88-24":[-4401.41,569.02],"6-88-25":[-4766.29,-59.6],"6-88-26":[-5085.97,-70.97],"6-88-27":[-4713.83,-76.12],"6-88-28":[-6296.59,-81.89],"6-88-29":[-5415.32,-85.59],"6-88-30":[-5415.58,-83.95],"6-88-31":[-5034.84,-81.05],"6-88-32":[-4678.13,-76.23],"6-88-33":[-5091.68,-69.57],"6-88-34":[-5315.04,-60.53],"6-88-35":[-4910.61,-49.91],"6-88-36":[-4700.31,-38.44],"6-88-37":[-4340.52,-27.34],"6-88-38":[-3775.62,-16.67],"6-88-39":[-3259.24,482.01],"6-88-40":[-197.97,378.18],"6-88-41":[-45.65,1001.24],"6-88-42":[1.91,3360.06],"6-88-43":[7.53,4608.76],"6-88-44":[12.64,5486.75],"6-88-45":[17.05,5223.27],"6-88-46":[21.65,5206.96],"6-88-47":[26.11,2040.12],"6-88-48":[30.67,440.1],"6-88-49":[-55.82,1713.79],"6-88-50":[33.89,827.05],"6-88-51":[33.4,306.53],"6-88-52":[7.42,123.77],"6-88-53":[-39.7,327.42],"6-88-54":[3.08,230.49],"6-88-55":[-15.39,234.28],"6-88-56":[-22.57,1116.82],"6-88-57":[-96.74,1564.5],"6-88-58":[-334.85,2295.88],"6-88-59":[-547.49,3490.99],"6-88-60":[-643.72,3997.79],"6-88-61":[-3594.02,4001.34],"6-88-62":[-4474.87,3523.63],"6-88-63":[-4558.49,3065.05],"6-89-0":[-706.47,30.41],"6-89-1":[-440.72,977.07],"5-44-0":[-767.86,977.07],"6-89-2":[9.34,2464.93],"6-89-3":[1.06,2473.48],"5-44-1":[-39.25,2473.48],"6-89-4":[-936.59,2332.14],"6-89-5":[-1376.15,981.03],"5-44-2":[-2859.78,2332.14],"6-89-6":[-1438.63,1303.35],"6-89-7":[-1336.73,318.58],"5-44-3":[-2822.2,1622.18],"6-89-8":[-3587.69,100.53],"6-89-9":[-4154.48,139.63],"5-44-4":[-4395.86,226.52],"6-89-10":[-4569.43,118.52],"6-89-11":[-4715.57,117.67],"5-44-5":[-4715.75,136.47],"6-89-12":[-4169.96,204.12],"6-89-13":[-3830.5,749.66],"5-44-6":[-4678.56,893.06],"6-89-14":[-2468.19,1122.49],"6-89-15":[-4016.9,1082.6],"5-44-7":[-4016.9,1554.79],"6-89-16":[-4414.85,4445.78],"6-89-17":[-4631.89,5979.55],"5-44-8":[-4768.15,5979.55],"6-89-18":[-4974.01,7425.22],"6-89-20":[-5304.14,2777.08],"6-89-19":[-5513.3,7670.17],"5-44-9":[-5513.3,7670.17],"6-89-21":[-5172.38,1028.73],"5-44-10":[-5826.83,4714.77],"6-89-22":[-4626.02,913.48],"6-89-23":[-5042.76,1654.1],"5-44-11":[-5665.99,1654.1],"6-89-24":[-5314.43,1010.35],"6-89-25":[-5903.05,598.43],"5-44-12":[-5903.05,1010.35],"6-89-26":[-6180.12,-75.99],"6-89-27":[-5778.91,-67.66],"5-44-13":[-6180.12,-67.66],"6-89-28":[-5869.67,-72.32],"6-89-29":[-4365.43,48.53],"5-44-14":[-6296.59,48.53],"6-89-30":[-4791.83,15.48],"6-89-31":[-5071.12,1.04],"5-44-15":[-5415.58,15.48],"6-89-32":[-4576.94,-3.46],"6-89-33":[-4785.27,6.33],"5-44-16":[-5091.68,6.33],"6-89-34":[-4574.62,105.2],"6-89-35":[-4689.33,94.67],"5-44-17":[-5315.04,105.2],"6-89-36":[-4438.32,200.09],"6-89-37":[-3765.77,-34.29],"5-44-18":[-4700.31,200.09],"6-89-38":[-3494.6,568.44],"6-89-39":[-182.94,902.33],"5-44-19":[-3775.62,902.33],"6-89-40":[-76.25,1584.1],"6-89-41":[-16.37,827.48],"5-44-20":[-197.97,1584.1],"6-89-42":[-2.98,985.73],"6-89-43":[4.23,2682.07],"5-44-21":[-2.98,4608.76],"6-89-44":[9.98,7438.17],"6-89-45":[13.89,7210.21],"5-44-22":[9.98,7438.17],"6-89-46":[21.65,5961.54],"6-89-47":[23.2,4291.76],"5-44-23":[21.65,5961.54],"6-89-48":[28.47,1036.59],"6-89-49":[32.48,1064.49],"5-44-24":[-55.82,1713.79],"6-89-50":[6.34,715.49],"6-89-51":[-9.37,197.65],"5-44-25":[-9.37,827.05],"6-89-52":[15.38,111.68],"6-89-53":[-3.32,343.8],"5-44-26":[-39.7,343.8],"6-89-54":[14.74,147.43],"6-89-55":[-17.33,117.58],"5-44-27":[-17.33,234.28],"6-89-56":[-17.83,392.26],"6-89-57":[-29.56,1769.28],"5-44-28":[-96.74,1769.28],"6-89-58":[-272.69,2436.17],"6-89-59":[-510.33,3484.93],"5-44-29":[-547.49,3490.99],"6-89-60":[-640.09,4020.7],"6-89-61":[-3575.47,4020.7],"5-44-30":[-3594.02,4020.7],"6-89-62":[-4236.46,3529.73],"6-89-63":[-4514.53,3064.81],"5-44-31":[-4558.49,3529.73],"6-90-0":[-640.98,61.26],"6-90-1":[-390.9,805.39],"6-90-2":[9.21,2183.68],"6-90-3":[0.25,2469.66],"6-90-4":[-1304.8,2425.45],"6-90-5":[-1149.32,1548.99],"6-90-6":[-414.72,2224.46],"6-90-7":[-1632.86,499.7],"6-90-8":[-3548.24,91.65],"6-90-9":[-4053.7,169.41],"6-90-10":[-4212.58,102.52],"6-90-11":[-4304.91,130.71],"6-90-12":[-3505.98,132.71],"6-90-13":[-2934.53,2598.41],"6-90-14":[-3135.99,1507.27],"6-90-15":[-4279.42,1151.88],"6-90-16":[-4489.05,4807.35],"6-90-17":[-4479.4,6513.21],"6-90-18":[-5017.58,7543.41],"6-90-20":[-5217.14,5343.32],"6-90-21":[-4488.37,447.8],"6-90-22":[-4547.42,998],"6-90-19":[-5325.59,8087.96],"6-90-23":[-5040.15,1264.93],"6-90-24":[-5735.98,1499.22],"6-90-25":[-5813.09,1527.78],"6-90-26":[-6081.85,969.76],"6-90-27":[-5744.78,1943.78],"6-90-28":[-5599.69,132.05],"6-90-29":[-5614.43,-76.78],"6-90-30":[-5738.79,-73.55],"6-90-31":[-5224.71,100.88],"6-90-32":[-4737.85,203.27],"6-90-33":[-3727.92,187.82],"6-90-34":[-3145.88,89.54],"6-90-35":[-2988.52,52.04],"6-90-36":[-2425.97,1816.78],"6-90-37":[-1039.44,953.76],"6-90-38":[-113.99,1391.73],"6-90-39":[-64.94,1364.22],"6-90-40":[-47.65,1160.93],"6-90-41":[-26.36,959.99],"6-90-42":[-11.95,366.79],"6-90-43":[1.09,5121.48],"6-90-44":[6.57,7900.96],"6-90-45":[11.56,7428.15],"6-90-46":[16.22,6455.21],"6-90-47":[21.29,4685.71],"6-90-48":[26.15,1023.87],"6-90-49":[29.48,1442.28],"6-90-50":[-31.98,2779.41],"6-90-51":[0.44,113.69],"6-90-52":[21.05,124.69],"6-90-53":[-11.69,331.23],"6-90-54":[10.84,175.41],"6-90-55":[-17.9,105.1],"6-90-56":[-21.34,1525.64],"6-90-57":[-32.68,2210.25],"6-90-58":[-120.9,2619.19],"6-90-59":[-433.61,3487.6],"6-90-60":[-567.12,4037.87],"6-90-61":[-3570.81,4030.9],"6-90-62":[-4219.09,3530.31],"6-90-63":[-4406.28,3064.82],"6-91-0":[-639.31,189.19],"6-91-1":[-384.95,834.08],"5-45-0":[-640.98,834.08],"6-91-2":[8.56,2367.16],"6-91-3":[-0.35,2551.86],"5-45-1":[-0.35,2551.86],"4-22-0":[-767.86,2551.86],"6-91-4":[-1479.06,2480.04],"6-91-5":[-281.82,1619.37],"5-45-2":[-1479.06,2480.04],"6-91-6":[-498.16,1605.36],"6-91-7":[-1553.63,731.58],"5-45-3":[-1632.86,2224.46],"4-22-1":[-2859.78,2480.04],"6-91-8":[-3586.88,81.75],"6-91-9":[-4086.33,122.72],"5-45-4":[-4086.33,169.41],"6-91-10":[-4014.01,110.81],"6-91-11":[-2910.87,118.68],"5-45-5":[-4304.91,130.71],"4-22-2":[-4715.75,226.52],"6-91-12":[-2973.92,133.68],"6-91-13":[-3695.85,487.76],"5-45-6":[-3695.85,2598.41],"6-91-14":[-3738.3,1504.92],"6-91-15":[-4043.82,1384.81],"5-45-7":[-4279.42,1507.27],"4-22-3":[-4678.56,2598.41],"6-91-16":[-4375.35,4930.95],"6-91-17":[-4265.58,5827.63],"5-45-8":[-4489.05,6513.21],"6-91-18":[-4366.17,6379.76],"6-91-19":[-4748.48,8560.58],"5-45-9":[-5325.59,8560.58],"4-22-4":[-5513.3,8560.58],"6-91-20":[-4652.94,6725.08],"6-91-21":[-4609.1,4563.58],"5-45-10":[-5217.14,6725.08],"6-91-22":[-4986.87,732.76],"6-91-23":[-5274.33,994.23],"5-45-11":[-5274.33,1264.93],"4-22-5":[-5826.83,6725.08],"6-91-24":[-5529.09,1273.26],"6-91-25":[-6647.67,698.38],"5-45-12":[-6647.67,1527.78],"6-91-26":[-5942.01,1069.77],"6-91-27":[-5762.94,2543.22],"5-45-13":[-6081.85,2543.22],"4-22-6":[-6647.67,2543.22],"6-91-28":[-5774.81,2590.24],"6-91-29":[-5738.63,1544.94],"5-45-14":[-5774.81,2590.24],"6-91-30":[-5469.78,-102.05],"6-91-31":[-5216.17,-100.58],"5-45-15":[-5738.79,100.88],"4-22-7":[-6296.59,2590.24],"6-91-32":[-5076.96,-96.41],"6-91-33":[-4415.5,-89.47],"5-45-16":[-5076.96,203.27],"6-91-34":[-3876.39,1456.94],"6-91-35":[-1368.49,2500.59],"5-45-17":[-3876.39,2500.59],"4-22-8":[-5315.04,2500.59],"6-91-36":[-142.2,2482.21],"6-91-37":[-116.73,1003.95],"5-45-18":[-2425.97,2482.21],"6-91-38":[-98.13,689.37],"6-91-39":[-76.39,1212.26],"5-45-19":[-113.99,1391.73],"4-22-9":[-4700.31,2482.21],"6-91-40":[-59.57,977.73],"6-91-41":[-39.69,677.26],"5-45-20":[-59.57,1160.93],"6-91-42":[-24.55,4424.66],"6-91-43":[-6.24,6545.87],"5-45-21":[-24.55,6545.87],"4-22-10":[-197.97,6545.87],"6-91-44":[3.69,8392.58],"6-91-45":[-0.46,6247.71],"5-45-22":[-0.46,8392.58],"6-91-46":[14.12,5742.63],"6-91-47":[18.73,4840.78],"5-45-23":[14.12,6455.21],"4-22-11":[-0.46,8392.58],"6-91-48":[26.15,1330.33],"6-91-49":[26.58,1464.91],"5-45-24":[26.15,1464.91],"6-91-50":[19.97,460.76],"6-91-51":[27.46,101.74],"5-45-25":[-31.98,2779.41],"4-22-12":[-55.82,2779.41],"6-91-52":[20.79,113.28],"6-91-53":[-17.77,113.81],"5-45-26":[-17.77,331.23],"6-91-54":[-9.28,129.12],"6-91-55":[-14.96,98.12],"5-45-27":[-17.9,175.41],"4-22-13":[-39.7,343.8],"6-91-56":[-19.59,1873.55],"6-91-57":[-21.81,2662.65],"5-45-28":[-32.68,2662.65],"6-91-58":[-80.34,2841.83],"6-91-59":[-317.86,3506.71],"5-45-29":[-433.61,3506.71],"4-22-14":[-547.49,3506.71],"6-91-60":[-233.74,4042.04],"6-91-61":[-3602.62,4030.73],"5-45-30":[-3602.62,4042.04],"6-91-62":[-4392.18,3527.6],"6-91-63":[-4471.35,3066.42],"5-45-31":[-4471.35,3530.31],"4-22-15":[-4558.49,4042.04],"6-92-0":[-645.12,227.14],"6-92-1":[-397.86,937.13],"6-92-2":[7.88,2366.12],"6-92-3":[-1.45,2837.93],"6-92-4":[-1235.35,2211.57],"6-92-5":[-686.65,1122.37],"6-92-6":[-162.24,1378.61],"6-92-7":[-774.24,1072.09],"6-92-8":[-3708.87,64.43],"6-92-9":[-3896.11,203.65],"6-92-10":[-3247.71,114.52],"6-92-11":[-4588.27,125.15],"6-92-12":[-4759.65,235.48],"6-92-13":[-4573.21,478.3],"6-92-14":[-4218.85,1419.87],"6-92-15":[-4033.49,4532.62],"6-92-16":[-3758.83,6633.62],"6-92-17":[-3919.79,7087.4],"6-92-18":[-4298.67,4976.93],"6-92-19":[-4525.92,7022.3],"6-92-20":[-4589.42,7194.47],"6-92-21":[-4677.75,7787.57],"6-92-22":[-4830.92,295.99],"6-92-23":[-5268.63,1069.67],"6-92-24":[-5627.16,1095.71],"6-92-25":[-6029.63,1197.87],"6-92-26":[-6091.69,1006.73],"6-92-27":[-6323.49,1132.42],"6-92-28":[-5678.07,434.8],"6-92-29":[-5900.81,2430.45],"6-92-30":[-5399.93,-101.01],"6-92-31":[-5206.63,-100.16],"6-92-32":[-5022.99,-94.42],"6-92-33":[-4622.89,-88.59],"6-92-34":[-4222.18,2382.44],"6-92-35":[-3966.9,367.8],"6-92-36":[-3737.67,1082.42],"6-92-37":[-3408.68,924.73],"6-92-38":[-104.92,1135.87],"6-92-39":[-84.27,1075.71],"6-92-40":[-67.56,1049.67],"6-92-41":[-47.53,244.26],"6-92-42":[-33.56,7477.1],"6-92-43":[-15.92,6783.47],"6-92-44":[-3.11,6972.29],"6-92-45":[3.14,4850.94],"6-92-46":[9.41,6956.38],"6-92-47":[15.61,6473.62],"6-92-48":[19.59,4411.61],"6-92-49":[23.34,1366.87],"6-92-50":[24.55,472.32],"6-92-51":[20.83,226.49],"6-92-52":[12.33,118.27],"6-92-53":[-1.93,111.49],"6-92-54":[-18.83,205.66],"6-92-55":[-19.8,76.05],"6-92-56":[-14.79,2339.17],"6-92-57":[-28.39,2935.32],"6-92-58":[-72.76,3173.47],"6-92-59":[-191.46,3593.63],"6-92-60":[-328.07,4042.04],"6-92-61":[-3603.54,4001.04],"6-92-62":[-4413.7,3516.41],"6-92-63":[-4414.53,3066.46],"6-93-0":[-598.54,447.74],"6-93-1":[-405.36,559.4],"5-46-0":[-645.12,937.13],"6-93-2":[7.36,2052.06],"6-93-3":[-1.93,2388.42],"5-46-1":[-1.93,2837.93],"6-93-4":[-825.37,1419.34],"6-93-5":[-321.04,1310.48],"5-46-2":[-1235.35,2211.57],"6-93-6":[-535.25,796.65],"6-93-7":[-1525.55,783.16],"5-46-3":[-1525.55,1378.61],"6-93-8":[-3607.56,149.97],"6-93-9":[-3782.36,236.06],"5-46-4":[-3896.11,236.06],"6-93-10":[-3244.4,155.46],"6-93-11":[-4940.09,162.81],"5-46-5":[-4940.09,162.81],"6-93-12":[-4915.47,446.71],"6-93-13":[-4738.91,2380.4],"5-46-6":[-4915.47,2380.4],"6-93-14":[-4289.66,2712],"6-93-15":[-4355.64,3961.77],"5-46-7":[-4355.64,4532.62],"6-93-16":[-4432.86,5107.74],"6-93-17":[-3773.11,3794.4],"5-46-8":[-4432.86,7087.4],"6-93-18":[-4143.17,6062.91],"6-93-19":[-4597.94,6911.73],"5-46-9":[-4597.94,7022.3],"6-93-20":[-4953.08,6600.18],"6-93-21":[-4693,8103.55],"5-46-10":[-4953.08,8103.55],"6-93-22":[-5242.48,2512.35],"6-93-23":[-5502.72,1178.46],"5-46-11":[-5502.72,2512.35],"6-93-24":[-5927.26,1262.43],"6-93-25":[-5842.24,1608.79],"5-46-12":[-6029.63,1608.79],"6-93-26":[-6117.19,-37.98],"6-93-27":[-6121.17,-86.28],"5-46-13":[-6323.49,1132.42],"6-93-28":[-5759.02,-88.67],"6-93-29":[-5683.35,351.9],"5-46-14":[-5900.81,2430.45],"6-93-30":[-5408.99,-92.98],"6-93-31":[-5189.72,-91.46],"5-46-15":[-5408.99,-91.46],"6-93-32":[-4779.36,-88.46],"6-93-33":[-4502,-84.21],"5-46-16":[-5022.99,-84.21],"6-93-34":[-4405.78,250.19],"6-93-35":[-4122.18,-69.13],"5-46-17":[-4405.78,2382.44],"6-93-36":[-3761.1,-61.65],"6-93-37":[-3546.44,-21.32],"5-46-18":[-3761.1,1082.42],"6-93-38":[-2986.65,1526.78],"6-93-39":[-92.35,1210.44],"5-46-19":[-2986.65,1526.78],"6-93-40":[-75.45,1148.44],"6-93-41":[-57.43,2392.36],"5-46-20":[-75.45,2392.36],"6-93-42":[-43.87,7996.56],"6-93-43":[-26.53,6529.17],"5-46-21":[-43.87,7996.56],"6-93-44":[-14.66,6785.68],"6-93-45":[-1.24,5925.82],"5-46-22":[-14.66,6972.29],"6-93-46":[5.93,3698.38],"6-93-47":[11.24,4974.72],"5-46-23":[5.93,6956.38],"6-93-48":[19.38,3851.93],"6-93-49":[19.38,2590],"5-46-24":[19.38,4411.61],"6-93-50":[20.9,2292.4],"6-93-51":[20.83,411.7],"5-46-25":[20.83,2292.4],"6-93-52":[12.97,151.82],"6-93-53":[18.26,165.91],"5-46-26":[-1.93,165.91],"6-93-54":[-9.15,247.3],"6-93-55":[-19.02,635.17],"5-46-27":[-19.8,635.17],"6-93-56":[-16.08,2519.02],"6-93-57":[-14.95,3197.54],"5-46-28":[-28.39,3197.54],"6-93-58":[-59.02,3364.13],"6-93-59":[-200.6,3621.13],"5-46-29":[-200.6,3621.13],"6-93-60":[-383.88,4025.51],"6-93-61":[-3638.41,3923.74],"5-46-30":[-3638.41,4042.04],"6-93-62":[-4412.72,3499.2],"6-93-63":[-4412.72,3067.15],"5-46-31":[-4414.53,3516.41],"6-94-0":[-576.96,447.74],"6-94-1":[-490.72,533.51],"6-94-2":[-88.61,1993.81],"6-94-3":[-25.35,2256.16],"6-94-4":[-65.53,916.49],"6-94-5":[-226.99,650.86],"6-94-6":[-535.25,744.12],"6-94-7":[-952.38,1128.23],"6-94-8":[-3523.31,216.58],"6-94-9":[-3903.39,232.96],"6-94-10":[-4655.36,204.28],"6-94-11":[-4953.77,252.1],"6-94-12":[-5052.19,544.69],"6-94-13":[-4860.03,2652.03],"6-94-14":[-4450.02,4375.85],"6-94-15":[-4317.75,3786.97],"6-94-16":[-4383.8,5220.28],"6-94-17":[-4658.52,3644.02],"6-94-18":[-4060.5,6686.7],"6-94-19":[-4111.06,6437.5],"6-94-20":[-4733.64,6733.83],"6-94-21":[-4909.98,8019.76],"6-94-22":[-4884.18,8777.15],"6-94-23":[-5346.94,1317.62],"6-94-24":[-5660.98,1124.07],"6-94-25":[-5665.75,1331.06],"6-94-26":[-5692.51,-73.06],"6-94-27":[-5733.14,-76.23],"6-94-28":[-5947.08,-77.26],"6-94-29":[-5808.81,-77.29],"6-94-30":[-5433.18,-78.62],"6-94-31":[-5040.3,-78.17],"6-94-32":[-4752.82,-76.46],"6-94-33":[-4483.87,-74.65],"6-94-34":[-4218.61,-71.13],"6-94-35":[-3868.68,-67.72],"6-94-36":[-3569.03,-60.57],"6-94-37":[-3265.74,-54.12],"6-94-38":[-2992,1261.05],"6-94-39":[-1598.7,1080.07],"6-94-40":[-77.95,1222.62],"6-94-41":[-61.78,8598.15],"6-94-42":[-50.7,7880.79],"6-94-43":[-33.49,6616.83],"6-94-44":[-21.33,6332.71],"6-94-45":[-8.99,6551.71],"6-94-46":[0.56,3604.04],"6-94-47":[7.51,4970.26],"6-94-48":[11.75,3721.8],"6-94-49":[15.47,4235.84],"6-94-50":[16.83,2541.05],"6-94-51":[15.6,525.74],"6-94-52":[12.93,239.09],"6-94-53":[11.48,204.28],"6-94-54":[-14.13,238.32],"6-94-55":[-18.6,1029.1],"6-94-56":[-15.92,2637.61],"6-94-57":[-11.52,3300.48],"6-94-58":[-61.57,3450.97],"6-94-59":[-198.69,3672.41],"6-94-60":[-397.08,3954.97],"6-94-61":[-3665.4,3850.88],"6-94-62":[-4412.06,3480.02],"6-94-63":[-4409.04,3067.91],"6-95-0":[-602.77,562.41],"6-95-1":[-460.9,424.48],"5-47-0":[-602.77,562.41],"6-95-2":[6.2,1674.74],"6-95-3":[-126.18,1339.78],"5-47-1":[-126.18,2256.16],"4-23-0":[-645.12,2837.93],"6-95-4":[-501.23,855.62],"6-95-5":[-355.11,859.48],"5-47-2":[-501.23,916.49],"6-95-6":[-433.11,1054.02],"6-95-7":[-816.66,941.07],"5-47-3":[-952.38,1128.23],"4-23-1":[-1525.55,2211.57],"3-11-0":[-2859.78,2837.93],"6-95-8":[-3578.67,733.23],"6-95-9":[-4260.32,628.73],"5-47-4":[-4260.32,733.23],"6-95-10":[-4696.15,242.85],"6-95-11":[-4872.34,262.78],"5-47-5":[-4953.77,262.78],"4-23-2":[-4953.77,733.23],"6-95-12":[-4878.33,2173.74],"6-95-13":[-4844.26,3529.7],"5-47-6":[-5052.19,3529.7],"6-95-14":[-4336.73,4279.84],"6-95-15":[-4012.33,3328.41],"5-47-7":[-4450.02,4375.85],"4-23-3":[-5052.19,4532.62],"3-11-1":[-5052.19,4532.62],"2-5-0":[-5594.69,4532.62],"6-95-16":[-3897.48,4987.09],"6-95-17":[-4190.29,2654.79],"5-47-8":[-4658.52,5220.28],"6-95-18":[-4529.97,6201.27],"6-95-19":[-4902.77,6890.4],"5-47-9":[-4902.77,6890.4],"4-23-4":[-4902.77,7087.4],"6-95-20":[-4279.48,6254.63],"6-95-21":[-4679.07,7070.27],"5-47-10":[-4909.98,8019.76],"6-95-22":[-5271.01,8478.4],"6-95-23":[-5469.35,533.63],"5-47-11":[-5469.35,8777.15],"4-23-5":[-5502.72,8777.15],"3-11-2":[-5826.83,8777.15],"6-95-24":[-6170.59,26.16],"6-95-25":[-6029.46,-61.4],"5-47-12":[-6170.59,1331.06],"6-95-26":[-6233.8,-63.4],"6-95-27":[-6168.75,-64.19],"5-47-13":[-6233.8,-63.4],"4-23-6":[-6323.49,1608.79],"6-95-28":[-5946.53,-62.12],"6-95-29":[-5563.77,-59.77],"5-47-14":[-5947.08,-59.77],"6-95-30":[-5415.34,-59.81],"6-95-31":[-5091.48,-60.33],"5-47-15":[-5433.18,-59.81],"4-23-7":[-5947.08,2430.45],"3-11-3":[-6647.67,2590.24],"2-5-1":[-6897.64,8777.15],"1-2-0":[-7020.16,8777.15],"6-95-32":[-4840.71,-61.96],"6-95-33":[-4477.56,-62.76],"5-47-16":[-4840.71,-61.96],"6-95-34":[-4145.89,-63.18],"6-95-35":[-4001.9,-62.21],"5-47-17":[-4218.61,-62.21],"4-23-8":[-5022.99,2382.44],"6-95-36":[-3450.75,-58.3],"6-95-37":[-3372.07,-51.25],"5-47-18":[-3569.03,-51.25],"6-95-38":[-2676.42,-44.8],"6-95-39":[-2060.04,21.7],"5-47-19":[-2992,1261.05],"4-23-9":[-3761.1,1526.78],"3-11-4":[-5315.04,2500.59],"6-95-40":[-87.28,515.63],"6-95-41":[-73.3,8337.38],"5-47-20":[-87.28,8598.15],"6-95-42":[-61.25,6940.28],"6-95-43":[-45.22,6206.62],"5-47-21":[-61.25,7880.79],"4-23-10":[-87.28,8598.15],"6-95-44":[-34.87,6723.39],"6-95-45":[-20.9,6097.25],"5-47-22":[-34.87,6723.39],"6-95-46":[-8.31,2575.12],"6-95-47":[-220.5,5153.81],"5-47-23":[-220.5,5153.81],"4-23-11":[-220.5,6972.29],"3-11-5":[-220.5,8598.15],"2-5-2":[-5630.71,8598.15],"6-95-48":[11.13,3250.14],"6-95-49":[11.13,4186.84],"5-47-24":[11.13,4235.84],"6-95-50":[13.37,3407.69],"6-95-51":[13.37,2121.23],"5-47-25":[13.37,3407.69],"4-23-12":[11.13,4411.61],"6-95-52":[10.23,254.78],"6-95-53":[-6.6,249.74],"5-47-26":[-6.6,254.78],"6-95-54":[-14.83,629.23],"6-95-55":[-23.34,1290.06],"5-47-27":[-23.34,1290.06],"4-23-13":[-23.34,1290.06],"3-11-6":[-55.82,4411.61],"6-95-56":[-11.92,2688.65],"6-95-57":[-12.05,3479.02],"5-47-28":[-15.92,3479.02],"6-95-58":[-66.28,3627.63],"6-95-59":[-225.58,3738.39],"5-47-29":[-225.58,3738.39],"4-23-14":[-225.58,3738.39],"6-95-60":[-389.39,3883.62],"6-95-61":[-3689.24,3781.94],"5-47-30":[-3689.24,3954.97],"6-95-62":[-4427.44,3420.26],"6-95-63":[-4395.91,3069.78],"5-47-31":[-4427.44,3480.02],"4-23-15":[-4427.44,4042.04],"3-11-7":[-4558.49,4042.04],"2-5-3":[-5188.16,4411.61],"1-2-1":[-5630.71,8598.15],"6-96-0":[-507.95,550.11],"6-96-1":[-395.05,585.56],"6-96-2":[6.32,1424.65],"6-96-3":[-31.33,1441.83],"6-96-4":[-453.58,1344.57],"6-96-5":[-201.96,1305.47],"6-96-6":[-290.34,1334],"6-96-7":[-358.6,1577.7],"6-96-8":[-3477.28,974.81],"6-96-9":[-4185.57,751.03],"6-96-10":[-4564.8,917.02],"6-96-11":[-4753.73,457.27],"6-96-12":[-4737.6,1266.17],"6-96-13":[-4756.71,3266],"6-96-14":[-4510.66,4151.48],"6-96-15":[-4069.46,4116.23],"6-96-16":[-3473.69,3824.31],"6-96-17":[-3788.26,2504.01],"6-96-18":[-4700.84,5909.96],"6-96-19":[-4874.41,6767.17],"6-96-20":[-5176.8,6522.84],"6-96-21":[-4920.94,7463.69],"6-96-22":[-5332.86,7512.84],"6-96-23":[-5984.55,1663.78],"6-96-24":[-5819.56,1062.24],"6-96-25":[-6172.54,-53.86],"6-96-26":[-6470.49,-59.44],"6-96-27":[-6334.52,407.51],"6-96-28":[-6436.56,114.95],"6-96-29":[-5830.63,-53.59],"6-96-30":[-5438.79,-48.89],"6-96-31":[-4933.77,-47.66],"6-96-32":[-4971.61,-47.94],"6-96-33":[-4598.44,-48.79],"6-96-34":[-4770.86,-51.46],"6-96-35":[-3985.12,95.94],"6-96-36":[-3493.93,364.5],"6-96-37":[-3068.68,-52.16],"6-96-38":[-2570.27,-47.88],"6-96-39":[-1611.51,971.23],"6-96-40":[-110.58,1645.76],"6-96-41":[-79.29,7274.95],"6-96-42":[-69.21,7054.69],"6-96-43":[-55.83,6428.04],"6-96-44":[-44.21,6604.16],"6-96-45":[-29.81,5836.96],"6-96-46":[-17.32,2435],"6-96-47":[-19.04,3762.29],"6-96-48":[3,4053.22],"6-96-49":[6.76,4099.84],"6-96-50":[9.32,3157.99],"6-96-51":[9.2,1217.16],"6-96-52":[7.16,445.77],"6-96-53":[-41.06,924.54],"6-96-54":[2.39,754.02],"6-96-55":[3.38,1584.77],"6-96-56":[14.61,2802.12],"6-96-57":[-13.87,3518.93],"6-96-58":[-60.39,3704.38],"6-96-59":[-114.78,3756.39],"6-96-60":[-212.46,3799.9],"6-96-61":[-3739.84,3696.84],"6-96-62":[-4393.72,3372.98],"6-96-63":[-4412.76,3073.17],"6-97-0":[-364.14,494.02],"6-97-1":[-399.12,366.65],"5-48-0":[-507.95,585.56],"6-97-2":[5.88,988],"6-97-3":[-5.43,1653.63],"5-48-1":[-31.33,1653.63],"6-97-4":[-15.46,1661.74],"6-97-5":[-282.65,1274.66],"5-48-2":[-453.58,1661.74],"6-97-6":[-438.53,1165.53],"6-97-7":[-407.85,1618.98],"5-48-3":[-438.53,1618.98],"6-97-8":[-2713.91,1177.41],"6-97-9":[-4143.19,764.98],"5-48-4":[-4185.57,1177.41],"6-97-10":[-4571.83,1092.04],"6-97-11":[-4667.26,823.06],"5-48-5":[-4753.73,1092.04],"6-97-12":[-4992.04,2561.56],"6-97-13":[-4442.71,2677.49],"5-48-6":[-4992.04,3266],"6-97-14":[-4214.57,2882.06],"6-97-15":[-4045.73,4155.27],"5-48-7":[-4510.66,4155.27],"6-97-16":[-3751.2,4825.04],"6-97-17":[-4087.17,4733.64],"5-48-8":[-4087.17,4825.04],"6-97-18":[-4588.68,5772.12],"6-97-19":[-4985.77,6131.65],"5-48-9":[-4985.77,6767.17],"6-97-20":[-5603.67,6237.58],"6-97-21":[-4539.45,7221.31],"5-48-10":[-5603.67,7463.69],"6-97-22":[-5521.12,5335.5],"6-97-23":[-6178.41,2777.96],"5-48-11":[-6178.41,7512.84],"6-97-24":[-5874.71,3021.9],"6-97-25":[-6475.28,1489.97],"5-48-12":[-6475.28,3021.9],"6-97-26":[-6434.12,365.67],"6-97-27":[-6299.38,671.16],"5-48-13":[-6470.49,671.16],"6-97-28":[-6037.15,253.16],"6-97-29":[-5599.45,634.69],"5-48-14":[-6436.56,634.69],"6-97-30":[-5263.17,2140.29],"6-97-31":[-5140.67,-30.37],"5-48-15":[-5438.79,2140.29],"6-97-32":[-5106.69,-30.41],"6-97-33":[-4931.92,2040.29],"5-48-16":[-5106.69,2040.29],"6-97-34":[-4661.45,548.69],"6-97-35":[-4636.64,171.14],"5-48-17":[-4770.86,548.69],"6-97-36":[-3316.65,618.15],"6-97-37":[-2881.1,316.65],"5-48-18":[-3493.93,618.15],"6-97-38":[-2676.29,1443.77],"6-97-39":[-137.79,2960.9],"5-48-19":[-2676.29,2960.9],"6-97-40":[-91.36,2693.99],"6-97-41":[-84.52,5200.27],"5-48-20":[-110.58,7274.95],"6-97-42":[-74.46,7161.3],"6-97-43":[-60.54,6144.57],"5-48-21":[-74.46,7161.3],"6-97-44":[-55.82,6036.64],"6-97-45":[-41.68,5696.1],"5-48-22":[-55.82,6604.16],"6-97-46":[-29.34,4612.61],"6-97-47":[-13.57,4736.04],"5-48-23":[-29.34,4736.04],"6-97-48":[-3.72,4132.25],"6-97-49":[2.56,2840.06],"5-48-24":[-3.72,4132.25],"6-97-50":[5.93,2600.03],"6-97-51":[6.01,2378.55],"5-48-25":[5.93,3157.99],"6-97-52":[3.78,811.06],"6-97-53":[-1.51,1061.04],"5-48-26":[-41.06,1061.04],"6-97-54":[-2.2,784.39],"6-97-55":[-0.05,1584.77],"5-48-27":[-2.2,1584.77],"6-97-56":[43.27,2824.51],"6-97-57":[-14.89,3500.23],"5-48-28":[-14.89,3518.93],"6-97-58":[-24.5,3719.54],"6-97-59":[-126.51,3755.97],"5-48-29":[-126.51,3756.39],"6-97-60":[-221.84,3775.22],"6-97-61":[-3792.88,3652.34],"5-48-30":[-3792.88,3799.9],"6-97-62":[-4477.7,3341.15],"6-97-63":[-4401.04,3074.67],"5-48-31":[-4477.7,3372.98],"6-98-0":[-371.51,448.58],"6-98-1":[-316.46,300.99],"6-98-2":[4.57,1060.02],"6-98-3":[-254.89,1807.12],"6-98-4":[-16.48,1774.8],"6-98-5":[-298.82,1169.06],"6-98-6":[-774.09,715.29],"6-98-7":[-2340.07,1569.96],"6-98-8":[-1082.6,1090.5],"6-98-9":[-4200.3,887.64],"6-98-10":[-4568.5,775.1],"6-98-11":[-4834.4,615.55],"6-98-12":[-4862.94,2887.36],"6-98-13":[-4329.53,2999.01],"6-98-14":[-4764.12,3482.56],"6-98-15":[-4080.63,3928.85],"6-98-16":[-4130.05,2953.75],"6-98-17":[-4647.34,5415.08],"6-98-18":[-4790.05,5725.81],"6-98-19":[-4988.02,5462.57],"6-98-20":[-5720.28,5731.48],"6-98-21":[-4587.04,6535.05],"6-98-22":[-5777.18,5106.11],"6-98-23":[-6446.93,3346.34],"6-98-24":[-6216.81,2464.8],"6-98-25":[-6329.09,2574.03],"6-98-26":[-6412.8,1748.97],"6-98-27":[-6111.95,1498.37],"6-98-28":[-6037.15,1085.71],"6-98-29":[-6003.77,550.46],"6-98-30":[-5871.84,3433.72],"6-98-31":[-5614.47,1843.03],"6-98-32":[-5471.08,1698.95],"6-98-33":[-1424.27,3384.6],"6-98-34":[-2250.26,448.92],"6-98-35":[-2791.74,954.7],"6-98-36":[-2811.05,1369.36],"6-98-37":[-388.5,1662.98],"6-98-38":[-190.16,2513.02],"6-98-39":[-96.25,2383.84],"6-98-40":[-93.34,3253.33],"6-98-41":[-85,4949.11],"6-98-42":[-76.44,6337.06],"6-98-43":[-68.5,5603.47],"6-98-44":[-62.86,5366.56],"6-98-45":[-50.56,5626.81],"6-98-46":[-38.51,5318.07],"6-98-47":[-23.36,2894.75],"6-98-48":[-12.63,3815.84],"6-98-49":[-1.83,3449.56],"6-98-50":[0.77,2894.03],"6-98-51":[1.97,2716.31],"6-98-52":[-0.24,590.54],"6-98-53":[-6.56,774.1],"6-98-54":[-6.92,878.64],"6-98-55":[-6.32,1715.72],"6-98-56":[12.62,2802.84],"6-98-57":[-12.46,3410],"6-98-58":[-22.47,3708.3],"6-98-59":[-214.72,3736.73],"6-98-60":[-1142.49,3737.71],"6-98-61":[-3792.91,3612.82],"6-98-62":[-4469.7,3317.35],"6-98-63":[-4417.4,3075.47],"6-99-0":[-364.52,447.51],"6-99-1":[-290.13,155.66],"5-49-0":[-371.51,448.58],"6-99-2":[-22.28,953.5],"6-99-3":[-482.07,1748.05],"5-49-1":[-482.07,1807.12],"4-24-0":[-507.95,1807.12],"6-99-4":[-813.43,1651.8],"6-99-5":[-218.72,590],"5-49-2":[-813.43,1774.8],"6-99-6":[-285.15,855.64],"6-99-7":[-3731.89,1480.74],"5-49-3":[-3731.89,1569.96],"4-24-1":[-3731.89,1774.8],"6-99-8":[-3736.42,1436.53],"6-99-9":[-4507.24,868.73],"5-49-4":[-4507.24,1436.53],"6-99-10":[-4621.74,599.89],"6-99-11":[-4707.79,729.83],"5-49-5":[-4834.4,775.1],"4-24-2":[-4834.4,1436.53],"6-99-12":[-5090.06,2274.47],"6-99-13":[-4188.76,3424.72],"5-49-6":[-5090.06,3424.72],"6-99-14":[-4292.66,3181.14],"6-99-15":[-4676.48,3821.64],"5-49-7":[-4764.12,3928.85],"4-24-3":[-5090.06,4155.27],"6-99-16":[-4251.07,3902.64],"6-99-17":[-4738.26,3828.18],"5-49-8":[-4738.26,5415.08],"6-99-18":[-4876.5,5499.12],"6-99-19":[-5960.03,6216.6],"5-49-9":[-5960.03,6216.6],"4-24-4":[-5960.03,6767.17],"6-99-20":[-6992.72,6063.79],"6-99-21":[-4952.91,6434.65],"5-49-10":[-6992.72,6535.05],"6-99-22":[-5781.88,5432.09],"6-99-23":[-6502.07,3530.75],"5-49-11":[-6502.07,5432.09],"4-24-5":[-6992.72,7512.84],"6-99-24":[-7339.17,2554.75],"6-99-25":[-6570.41,2536.99],"5-49-12":[-7339.17,2574.03],"6-99-26":[-6827.32,2080.04],"6-99-27":[-6445.11,2009.72],"5-49-13":[-6827.32,2080.04],"4-24-6":[-7339.17,3021.9],"6-99-28":[-6607.43,1760.05],"6-99-29":[-6362.58,1543.06],"5-49-14":[-6607.43,1760.05],"6-99-30":[-6442.03,2251.47],"6-99-31":[-5733.72,3054.12],"5-49-15":[-6442.03,3433.72],"4-24-7":[-6607.43,3433.72],"6-99-32":[-195.98,3098.13],"6-99-33":[-150.19,2196.47],"5-49-16":[-5471.08,3384.6],"6-99-34":[-147.54,1442.07],"6-99-35":[-118.78,1686.04],"5-49-17":[-2791.74,1686.04],"4-24-8":[-5471.08,3384.6],"6-99-36":[-143.43,1862.71],"6-99-37":[-88.25,2022.05],"5-49-18":[-2811.05,2022.05],"6-99-38":[-94.27,2510.97],"6-99-39":[-95.18,2501.75],"5-49-19":[-190.16,2513.02],"4-24-9":[-3493.93,2960.9],"6-99-40":[-92.2,3411.71],"6-99-41":[-83.68,5229.16],"5-49-20":[-93.34,5229.16],"6-99-42":[-78.69,6352.65],"6-99-43":[-74.99,5945.78],"5-49-21":[-78.69,6352.65],"4-24-10":[-110.58,7274.95],"6-99-44":[-72.56,6157.61],"6-99-45":[-59.76,5387.12],"5-49-22":[-72.56,6157.61],"6-99-46":[-48.96,3739.65],"6-99-47":[-34.76,3871.64],"5-49-23":[-48.96,5318.07],"4-24-11":[-72.56,6604.16],"6-99-48":[-22.48,3771.63],"6-99-49":[-11.77,3171.14],"5-49-24":[-22.48,3815.84],"6-99-50":[-6.68,3321.72],"6-99-51":[-3.06,2161.47],"5-49-25":[-6.68,3321.72],"4-24-12":[-22.48,4132.25],"6-99-52":[-6.11,696.82],"6-99-53":[-14.49,592.88],"5-49-26":[-14.49,774.1],"6-99-54":[-16.12,865.7],"6-99-55":[-5.53,1741.17],"5-49-27":[-16.12,1741.17],"4-24-13":[-41.06,1741.17],"6-99-56":[108.04,2705.18],"6-99-57":[-11.7,3387.35],"5-49-28":[-12.46,3410],"6-99-58":[-9.12,3611.49],"6-99-59":[-229.47,3694.95],"5-49-29":[-229.47,3736.73],"4-24-14":[-229.47,3756.39],"6-99-60":[-2254.34,3696.05],"6-99-61":[-3851.31,3543.3],"5-49-30":[-3851.31,3737.71],"6-99-62":[-4412.98,3284.67],"6-99-63":[-4408.48,3075.96],"5-49-31":[-4469.7,3317.35],"4-24-15":[-4477.7,3799.9],"6-100-0":[-390.94,351.58],"6-100-1":[-450.17,176.67],"6-100-2":[-337.26,852.14],"6-100-3":[-92.47,1463.97],"6-100-4":[-1198.63,1680.37],"6-100-5":[-276.63,702.17],"6-100-6":[-847.1,737.36],"6-100-7":[-779.5,1198.23],"6-100-8":[-1490.09,958.88],"6-100-9":[-4561.87,855.83],"6-100-10":[-4756.31,555.66],"6-100-11":[-4695.48,852.88],"6-100-12":[-4493.8,918],"6-100-13":[-4524.26,3194.59],"6-100-14":[-4412.44,2295.19],"6-100-15":[-4058.81,3379.04],"6-100-16":[-4869.14,3558.09],"6-100-17":[-5072.75,1902.58],"6-100-18":[-5507.87,5176.87],"6-100-19":[-6806.78,4952.19],"6-100-20":[-7047.82,6100.38],"6-100-21":[-5422.5,7111.28],"6-100-22":[-5589.41,4334.26],"6-100-23":[-6273.7,3117.27],"6-100-24":[-6680.93,3084.02],"6-100-25":[-7178.68,2792.64],"6-100-26":[-6925.86,1323.34],"6-100-27":[-5898.05,1726.89],"6-100-28":[-6590.9,1062.2],"6-100-29":[-6749.52,1503.56],"6-100-30":[-4431.14,3063.08],"6-100-31":[-68.74,3673.24],"6-100-32":[-174.08,3783.24],"6-100-33":[-79.57,3170.1],"6-100-34":[-114.16,1437.39],"6-100-35":[-109.27,1036.2],"6-100-36":[-136.16,1688.89],"6-100-37":[-82.44,1262.34],"6-100-38":[-86.64,2743.63],"6-100-39":[-87.84,2954.02],"6-100-40":[-85.52,3019.27],"6-100-41":[-80.19,4227.26],"6-100-42":[-78.68,7011.33],"6-100-43":[-81.4,5829.36],"6-100-44":[-80.06,4840.27],"6-100-45":[-66.32,5057.87],"6-100-46":[-55.39,1867.69],"6-100-47":[-41.05,3437.08],"6-100-48":[-30.56,3288.03],"6-100-49":[-19.26,2279.18],"6-100-50":[-931.09,3069.79],"6-100-51":[-9.52,911],"6-100-52":[-12.52,823.95],"6-100-53":[-17.41,557.51],"6-100-54":[-19.91,858.74],"6-100-55":[-15.87,1791.71],"6-100-56":[62.06,2640.61],"6-100-57":[-13.37,3292.47],"6-100-58":[-6.91,3525.76],"6-100-59":[-234.59,3605.31],"6-100-60":[-2981.06,3601.4],"6-100-61":[-3897.97,3433.72],"6-100-62":[-4391.74,3240.37],"6-100-63":[-4393.37,3075.89],"6-101-0":[-421.01,313.54],"6-101-1":[-512.44,178.89],"5-50-0":[-512.44,351.58],"6-101-2":[-361.24,1063.19],"6-101-3":[-0.04,1302.37],"5-50-1":[-361.24,1463.97],"6-101-4":[-1405.91,935.03],"6-101-5":[-772.36,832.71],"5-50-2":[-1405.91,1680.37],"6-101-6":[-1534.94,728.03],"6-101-7":[-1407.76,1011.68],"5-50-3":[-1534.94,1198.23],"6-101-8":[-2600.51,929.44],"6-101-9":[-4397.62,836.04],"5-50-4":[-4561.87,958.88],"6-101-10":[-4770.73,706.58],"6-101-11":[-4773,984.1],"5-50-5":[-4773,984.1],"6-101-12":[-4525.52,1472.91],"6-101-13":[-4274.01,2280.07],"5-50-6":[-4525.52,3194.59],"6-101-14":[-5036.77,1985.15],"6-101-15":[-4218.02,2132.01],"5-50-7":[-5036.77,3379.04],"6-101-16":[-5245.63,2678.17],"6-101-17":[-5049.38,2311.12],"5-50-8":[-5245.63,3558.09],"6-101-18":[-6178.58,3502.2],"6-101-19":[-6836.91,4106.19],"5-50-9":[-6836.91,5176.87],"6-101-20":[-6222.74,4524.83],"6-101-21":[-6183.09,1942.57],"5-50-10":[-7047.82,7111.28],"6-101-22":[-6217.18,2858.21],"6-101-23":[-6156.22,2530.43],"5-50-11":[-6273.7,4334.26],"6-101-24":[-6127.32,2937.63],"6-101-25":[-6187.88,2686.47],"5-50-12":[-7178.68,3084.02],"6-101-26":[-6708.63,1984.96],"6-101-27":[-6304.3,1793.02],"5-50-13":[-6925.86,1984.96],"6-101-28":[-6890.34,988.31],"6-101-29":[-6807.99,2085.28],"5-50-14":[-6890.34,2085.28],"6-101-30":[-827.51,2120.45],"6-101-31":[-91.17,1041.7],"5-50-15":[-4431.14,3673.24],"6-101-32":[-97.78,1126.85],"6-101-33":[-741.62,2229.43],"5-50-16":[-741.62,3783.24],"6-101-34":[-86,2218.28],"6-101-35":[-91.75,972.31],"5-50-17":[-114.16,2218.28],"6-101-36":[-82.03,1722.02],"6-101-37":[-67.22,1888.96],"5-50-18":[-136.16,1888.96],"6-101-38":[-84.9,2609.46],"6-101-39":[-73.16,2809.62],"5-50-19":[-87.84,2954.02],"6-101-40":[-76.24,2431.42],"6-101-41":[-78.06,2794.21],"5-50-20":[-85.52,4227.26],"6-101-42":[-80.1,1837.51],"6-101-43":[-82.02,4346.82],"5-50-21":[-82.02,7011.33],"6-101-44":[-82.43,4015.21],"6-101-45":[-71.27,3380.19],"5-50-22":[-82.43,5057.87],"6-101-46":[-62.71,2269.12],"6-101-47":[-49.64,2628.18],"5-50-23":[-62.71,3437.08],"6-101-48":[-39.39,2089],"6-101-49":[-28.16,1965.15],"5-50-24":[-39.39,3288.03],"6-101-50":[-1045.89,2237.07],"6-101-51":[-17.14,1465.9],"5-50-25":[-1045.89,3069.79],"6-101-52":[-18.23,975.1],"6-101-53":[-25.73,697.58],"5-50-26":[-25.73,975.1],"6-101-54":[-26.47,842.08],"6-101-55":[-27.05,1793.86],"5-50-27":[-27.05,1793.86],"6-101-56":[130.63,2600.89],"6-101-57":[-15.79,3117.95],"5-50-28":[-15.79,3292.47],"6-101-58":[-21.12,3441.93],"6-101-59":[-223.25,3528.69],"5-50-29":[-234.59,3605.31],"6-101-60":[-3261.12,3498.6],"6-101-61":[-4152.25,3363.74],"5-50-30":[-4152.25,3601.4],"6-101-62":[-4394.82,3196.67],"6-101-63":[-4379.5,3075.29],"5-50-31":[-4394.82,3240.37],"6-102-0":[-536.22,303.03],"6-102-1":[-458.93,93],"6-102-2":[-523.45,1394.62],"6-102-3":[-340.76,1118.35],"6-102-4":[-637.66,963.87],"6-102-5":[-1006.67,1119.08],"6-102-6":[-1697.74,734.39],"6-102-7":[-1650.38,887.81],"6-102-8":[-3194.12,947.89],"6-102-9":[-4309.08,743.5],"6-102-10":[-4735.62,607.14],"6-102-11":[-4787.15,1969.85],"6-102-12":[-4697.47,2509.72],"6-102-13":[-4218.23,1987.12],"6-102-14":[-4472.05,2758.43],"6-102-15":[-4465.68,2221.84],"6-102-16":[-4700.72,1397.18],"6-102-17":[-5315.38,2304.17],"6-102-18":[-6259.92,1918.57],"6-102-19":[-6187.94,3718.19],"6-102-20":[-5971.58,3019.64],"6-102-21":[-5845.44,2199.58],"6-102-22":[-6124.87,2506.96],"6-102-23":[-6381.94,1720.45],"6-102-24":[-5579.24,1495.1],"6-102-25":[-5964.56,1791.56],"6-102-26":[-6228.05,2581.3],"6-102-27":[-6191.63,2426.49],"6-102-28":[-7237.19,1298.21],"6-102-29":[-3650.72,3393.89],"6-102-30":[-84.28,1014.85],"6-102-31":[-93.44,1601.85],"6-102-32":[-104.01,1543.85],"6-102-33":[-125.97,901.87],"6-102-34":[-1367.07,3442.9],"6-102-35":[-1855.07,1260.19],"6-102-36":[-322.96,2328.48],"6-102-37":[-1009.39,2525.3],"6-102-38":[-380.49,1743.52],"6-102-39":[-142.48,1395.18],"6-102-40":[-83.25,1596.45],"6-102-41":[-78.87,2416.96],"6-102-42":[-80.62,2152.58],"6-102-43":[-81.5,2932.67],"6-102-44":[-81.55,3630.19],"6-102-45":[-75.32,1896.56],"6-102-46":[-66.17,2239.16],"6-102-47":[-55.15,1390.17],"6-102-48":[-45.84,2203.77],"6-102-49":[-34.14,2652.43],"6-102-50":[-1232.75,1976.12],"6-102-51":[-1190.99,2418.74],"6-102-52":[-24.4,1885.73],"6-102-53":[-30.23,601.14],"6-102-54":[-36.54,759.49],"6-102-55":[-33.13,1569.32],"6-102-56":[133.31,2518.52],"6-102-57":[-10.76,2973.89],"6-102-58":[-33.46,3288.12],"6-102-59":[-305.74,3458.77],"6-102-60":[-3439.58,3410.38],"6-102-61":[-4199.53,3280.26],"6-102-62":[-4394.84,3169.64],"6-102-63":[-4385.62,3074.68],"6-103-0":[-664.29,385.94],"6-103-1":[-607.48,87.39],"5-51-0":[-664.29,385.94],"6-103-2":[-559,1207.8],"6-103-3":[-287.93,790.24],"5-51-1":[-559,1394.62],"4-25-0":[-664.29,1463.97],"6-103-4":[-231.49,809.08],"6-103-5":[-1283.43,1038.7],"5-51-2":[-1283.43,1119.08],"6-103-6":[-1537.95,689.79],"6-103-7":[-1465.17,820.66],"5-51-3":[-1697.74,887.81],"4-25-1":[-1697.74,1680.37],"3-12-0":[-3731.89,1807.12],"6-103-8":[-3174.17,871.07],"6-103-9":[-4207.91,581.35],"5-51-4":[-4309.08,947.89],"6-103-10":[-4597.12,599.15],"6-103-11":[-4821.39,2526.11],"5-51-5":[-4821.39,2526.11],"4-25-2":[-4821.39,2526.11],"6-103-12":[-4544.45,2781.93],"6-103-13":[-4167.75,2000.38],"5-51-6":[-4697.47,2781.93],"6-103-14":[-4476.17,2483.46],"6-103-15":[-4442.04,1631.54],"5-51-7":[-4476.17,2758.43],"4-25-3":[-5036.77,3379.04],"3-12-1":[-5090.06,4155.27],"6-103-16":[-4817.91,1440.56],"6-103-17":[-5610.41,2312.81],"5-51-8":[-5610.41,2312.81],"6-103-18":[-6311.98,2785.32],"6-103-19":[-6138.44,2608.85],"5-51-9":[-6311.98,3718.19],"4-25-4":[-6836.91,5176.87],"6-103-20":[-5508.45,3075.61],"6-103-21":[-5886.75,2284.9],"5-51-10":[-5971.58,3075.61],"6-103-22":[-6066.19,2090.39],"6-103-23":[-5457.66,1930.57],"5-51-11":[-6381.94,2506.96],"4-25-5":[-7047.82,7111.28],"3-12-2":[-7047.82,7512.84],"6-103-24":[-5713.12,1683.1],"6-103-25":[-5757.33,1775.49],"5-51-12":[-5964.56,1791.56],"6-103-26":[-5922.59,22.84],"6-103-27":[-5849.17,35.12],"5-51-13":[-6228.05,2581.3],"4-25-6":[-7178.68,3084.02],"6-103-28":[-7243.99,50.12],"6-103-29":[-1454.02,3260.42],"5-51-14":[-7243.99,3393.89],"6-103-30":[-58.02,93.68],"6-103-31":[-60.48,1707.53],"5-51-15":[-93.44,1707.53],"4-25-7":[-7243.99,3673.24],"3-12-3":[-7339.17,3673.24],"6-103-32":[-162.28,1767.47],"6-103-33":[-1017.75,98.63],"5-51-16":[-1017.75,1767.47],"6-103-34":[-2341.53,3363.43],"6-103-35":[-4457.98,275.89],"5-51-17":[-4457.98,3442.9],"4-25-8":[-4457.98,3783.24],"6-103-36":[-4499.26,14.72],"6-103-37":[-3941.7,93.37],"5-51-18":[-4499.26,2525.3],"6-103-38":[-2622.21,1699.47],"6-103-39":[-141.96,1600.09],"5-51-19":[-2622.21,1743.52],"4-25-9":[-4499.26,2954.02],"3-12-4":[-5471.08,3783.24],"6-103-40":[-137.39,1823.56],"6-103-41":[-76.31,2004.38],"5-51-20":[-137.39,2416.96],"6-103-42":[-79.55,2165.55],"6-103-43":[-79.53,2984.61],"5-51-21":[-81.5,2984.61],"4-25-10":[-137.39,7011.33],"6-103-44":[-81.64,2519.86],"6-103-45":[-78.43,2732.28],"5-51-22":[-81.64,3630.19],"6-103-46":[-69.24,2273.81],"6-103-47":[-59.94,1433.55],"5-51-23":[-69.24,2273.81],"4-25-11":[-82.43,5057.87],"3-12-5":[-137.39,7274.95],"6-103-48":[-51.3,1616.53],"6-103-49":[-40.42,2462.04],"5-51-24":[-51.3,2652.43],"6-103-50":[-34.48,1978.37],"6-103-51":[-292.05,2624.92],"5-51-25":[-1232.75,2624.92],"4-25-12":[-1232.75,3288.03],"6-103-52":[-31.64,2452.11],"6-103-53":[-39.3,580.7],"5-51-26":[-39.3,2452.11],"6-103-54":[-43.14,595.46],"6-103-55":[-38.79,1241.72],"5-51-27":[-43.14,1569.32],"4-25-13":[-43.14,2452.11],"3-12-6":[-1232.75,4132.25],"6-103-56":[41.8,2536.98],"6-103-57":[-10.42,2925.63],"5-51-28":[-10.76,2973.89],"6-103-58":[-41.3,3218.56],"6-103-59":[-864.59,3373.24],"5-51-29":[-864.59,3458.77],"4-25-14":[-864.59,3605.31],"6-103-60":[-3543.19,3368.42],"6-103-61":[-4192.59,3217.25],"5-51-30":[-4199.53,3410.38],"6-103-62":[-4418.45,3122.3],"6-103-63":[-4379.77,3072.12],"5-51-31":[-4418.45,3169.64],"4-25-15":[-4418.45,3601.4],"3-12-7":[-4477.7,3799.9],"6-104-0":[-526.41,278.25],"6-104-1":[-607.48,84.32],"6-104-2":[-567.79,1215.23],"6-104-3":[-136.97,496.59],"6-104-4":[-530.59,368.79],"6-104-5":[-1286.3,495.96],"6-104-6":[-1290.23,483.95],"6-104-7":[-1728.3,491.06],"6-104-8":[-2795.06,750.89],"6-104-9":[-4321.31,561.53],"6-104-10":[-4660.95,1677.59],"6-104-11":[-4755.16,2530.45],"6-104-12":[-4867.13,2992.37],"6-104-13":[-4319.24,1634.35],"6-104-14":[-4861.02,1654.73],"6-104-15":[-4590.03,1754.54],"6-104-16":[-4680.89,1742.15],"6-104-17":[-5021.65,2838.35],"6-104-18":[-6327.49,3047.6],"6-104-19":[-6022.91,1847.96],"6-104-20":[-5238.09,1280.51],"6-104-21":[-5427.73,1772.77],"6-104-22":[-1527.77,2103.76],"6-104-23":[-3176.09,1877.29],"6-104-24":[-4631.17,953.51],"6-104-25":[-4908.55,27.99],"6-104-26":[-6087.43,44.5],"6-104-27":[-6964.5,55.83],"6-104-28":[-7180.91,944.4],"6-104-29":[-1168.01,3611.18],"6-104-30":[-48.05,2422.76],"6-104-31":[29.67,2305.23],"6-104-32":[-137.09,2345.05],"6-104-33":[-2420.97,2313.76],"6-104-34":[-3121.56,3699.18],"6-104-35":[-4705.71,1042.4],"6-104-36":[-4651.58,248.09],"6-104-37":[-4548.6,171.3],"6-104-38":[-3947.09,13.11],"6-104-39":[-1918.04,879.5],"6-104-40":[-160.75,1768.37],"6-104-41":[-63.64,2023.75],"6-104-42":[-75.39,1680.76],"6-104-43":[-77.46,1192.5],"6-104-44":[-81.92,1797.89],"6-104-45":[-78.44,2994.6],"6-104-46":[-69.89,2749.34],"6-104-47":[-61.52,1693.13],"6-104-48":[-54.23,1689.54],"6-104-49":[-44.26,1624.78],"6-104-50":[-39.25,1606.81],"6-104-51":[-36.43,2574.37],"6-104-52":[-37.17,2397.44],"6-104-53":[-45.54,1602.59],"6-104-54":[-46.98,571.52],"6-104-55":[-44.18,1300.89],"6-104-56":[14.72,2508.46],"6-104-57":[-9.19,2971.73],"6-104-58":[-48.98,3190.51],"6-104-59":[-1971.26,3320.02],"6-104-60":[-3543.17,3317.03],"6-104-61":[-4270.15,3144.59],"6-104-62":[-4463.8,3080.43],"6-104-63":[-4359.14,3069.68],"6-105-0":[-386.63,295.13],"6-105-1":[-530.27,104.53],"5-52-0":[-607.48,295.13],"6-105-2":[-57.63,673.64],"6-105-3":[-142.54,382.73],"5-52-1":[-567.79,1215.23],"6-105-4":[-1219.69,24.28],"6-105-5":[-1293.1,453.82],"5-52-2":[-1293.1,495.96],"6-105-6":[-1282.86,471.8],"6-105-7":[-1513.06,385.91],"5-52-3":[-1728.3,491.06],"6-105-8":[-3081.89,448.35],"6-105-9":[-4301.03,380.42],"5-52-4":[-4321.31,750.89],"6-105-10":[-4774.33,1615.07],"6-105-11":[-4753.47,2962.65],"5-52-5":[-4774.33,2962.65],"6-105-12":[-4793.17,2450.24],"6-105-13":[-4635.6,1532.32],"5-52-6":[-4867.13,2992.37],"6-105-14":[-5474.7,1232.86],"6-105-15":[-4765.11,1464.19],"5-52-7":[-5474.7,1754.54],"6-105-16":[-5081.47,2060.03],"6-105-17":[-5649.49,2407.63],"5-52-8":[-5649.49,2838.35],"6-105-18":[-6192.35,805.59],"6-105-19":[-5515.95,1519.8],"5-52-9":[-6327.49,3047.6],"6-105-20":[-153.64,1755.88],"6-105-21":[-69.59,1735.53],"5-52-10":[-5427.73,1772.77],"6-105-22":[4.65,2160.72],"6-105-23":[-47.98,1800.52],"5-52-11":[-3176.09,2160.72],"6-105-24":[-983.55,1138.97],"6-105-25":[-4898.89,52.59],"5-52-12":[-4908.55,1138.97],"6-105-26":[-6006.98,67.42],"6-105-27":[-7165.68,82.34],"5-52-13":[-7165.68,82.34],"6-105-28":[-7107.38,2813.87],"6-105-29":[-2789.9,4108.68],"5-52-14":[-7180.91,4108.68],"6-105-30":[-2046.22,2687.61],"6-105-31":[-2203.42,2267.3],"5-52-15":[-2203.42,2687.61],"6-105-32":[-2023.09,2189.3],"6-105-33":[-475.58,2628.6],"5-52-16":[-2420.97,2628.6],"6-105-34":[-2993.96,4026.67],"6-105-35":[-3073,2972.87],"5-52-17":[-4705.71,4026.67],"6-105-36":[-5007.8,38.1],"6-105-37":[-4418.38,27.92],"5-52-18":[-5007.8,248.09],"6-105-38":[-4679.05,2.72],"6-105-39":[-3358.64,1205.98],"5-52-19":[-4679.05,1205.98],"6-105-40":[-100.62,1717.53],"6-105-41":[13.76,2116.73],"5-52-20":[-160.75,2116.73],"6-105-42":[-14.21,1651.52],"6-105-43":[-99.76,1646.92],"5-52-21":[-99.76,1680.76],"6-105-44":[-78.53,1437.77],"6-105-45":[-78.21,708.59],"5-52-22":[-81.92,2994.6],"6-105-46":[-69.94,2304.63],"6-105-47":[-61.91,2016.37],"5-52-23":[-69.94,2749.34],"6-105-48":[-54.84,1440.18],"6-105-49":[-47.73,1222.85],"5-52-24":[-54.84,1689.54],"6-105-50":[-42.44,1502.32],"6-105-51":[-41.44,2344.1],"5-52-25":[-42.44,2574.37],"6-105-52":[-43.24,2813.61],"6-105-53":[-52.02,1580.09],"5-52-26":[-52.02,2813.61],"6-105-54":[-54.04,379.62],"6-105-55":[-53.1,680.38],"5-52-27":[-54.04,1300.89],"6-105-56":[19.16,2408.3],"6-105-57":[-6.33,3030.32],"5-52-28":[-9.19,3030.32],"6-105-58":[-48.95,3188.16],"6-105-59":[-2420.07,3235.61],"5-52-29":[-2420.07,3320.02],"6-105-60":[-3653.6,3197.29],"6-105-61":[-4402.41,3081.54],"5-52-30":[-4402.41,3317.03],"6-105-62":[-4442.47,3060.18],"6-105-63":[-4335.36,3063.52],"5-52-31":[-4463.8,3080.43],"6-106-0":[-382.69,518.1],"6-106-1":[-442,276.46],"6-106-2":[-281.26,561.88],"6-106-3":[-169.68,522.34],"6-106-4":[-1384.91,0.13],"6-106-5":[-1025.1,460.29],"6-106-6":[-1225,454.78],"6-106-7":[-1960.43,411.14],"6-106-8":[-3522.54,443.53],"6-106-9":[-4277.44,383.49],"6-106-10":[-4763.29,717.41],"6-106-11":[-4792.44,2548.26],"6-106-12":[-4965.29,2226.52],"6-106-13":[-4754.24,1486.61],"6-106-14":[-5102.45,1598.44],"6-106-15":[-4846.65,1743.81],"6-106-16":[-5136.73,1936.12],"6-106-17":[-5992.39,1887.25],"6-106-18":[-6270.11,785.42],"6-106-19":[-5555.1,1101.77],"6-106-20":[-105.16,584.53],"6-106-21":[-78.25,1795.67],"6-106-22":[-35.2,1934.56],"6-106-23":[-36.2,3691.21],"6-106-24":[-55.29,1951.28],"6-106-25":[-2434.64,2501.63],"6-106-26":[-5844.39,2962.21],"6-106-27":[-7088.95,2343.09],"6-106-28":[-7127.73,2288.03],"6-106-29":[-5085.75,1818.49],"6-106-30":[-2226.25,3403.08],"6-106-31":[-2614.6,3030.91],"6-106-32":[-5551.59,3132.81],"6-106-33":[-5187.49,3490.23],"6-106-34":[-4798.95,1959.49],"6-106-35":[-4231.66,2405.04],"6-106-36":[-5091.52,2311.11],"6-106-37":[-5322.52,2857.2],"6-106-38":[-4356.76,2411.64],"6-106-39":[-4709.05,1867.27],"6-106-40":[-1353.88,3536.2],"6-106-41":[-232.12,1847.54],"6-106-42":[-29.3,1738.68],"6-106-43":[-76.47,544.69],"6-106-44":[-78.18,1063.1],"6-106-45":[-82.72,673.36],"6-106-46":[-69.49,1847.24],"6-106-47":[-61.11,1904.12],"6-106-48":[-54.99,1698.78],"6-106-49":[-48.72,1558.94],"6-106-50":[-45.04,1454.59],"6-106-51":[-45.09,2182.46],"6-106-52":[-47.54,2446.34],"6-106-53":[-57.28,707.41],"6-106-54":[-61.21,389.51],"6-106-55":[-59.83,845.24],"6-106-56":[15,2462.74],"6-106-57":[-18.09,3046.36],"6-106-58":[-77.59,3177.4],"6-106-59":[-2784.49,3172.35],"6-106-60":[-5343.81,3109.06],"6-106-61":[-5227.4,3012.28],"6-106-62":[-4422.66,3048.31],"6-106-63":[-4439.18,3060.25],"6-107-0":[-286.77,546.08],"6-107-1":[-378.19,115.12],"5-53-0":[-442,546.08],"6-107-2":[-455.31,408.6],"6-107-3":[-333.04,478.27],"5-53-1":[-455.31,561.88],"4-26-0":[-607.48,1215.23],"6-107-4":[-681.52,0.24],"6-107-5":[-883.51,565.28],"5-53-2":[-1384.91,565.28],"6-107-6":[-779.35,479.01],"6-107-7":[-986.72,427.06],"5-53-3":[-1960.43,479.01],"4-26-1":[-1960.43,565.28],"6-107-8":[-3454.89,342.41],"6-107-9":[-4321.54,417.22],"5-53-4":[-4321.54,443.53],"6-107-10":[-4617.61,1200.19],"6-107-11":[-4818.58,2000.95],"5-53-5":[-4818.58,2548.26],"4-26-2":[-4818.58,2962.65],"6-107-12":[-5173.19,1644.22],"6-107-13":[-5052,1523.39],"5-53-6":[-5173.19,2226.52],"6-107-14":[-5421.41,1600.44],"6-107-15":[-5348.99,1541.69],"5-53-7":[-5421.41,1743.81],"4-26-3":[-5474.7,2992.37],"6-107-16":[-5283.07,816.14],"6-107-17":[-5990.04,1174.47],"5-53-8":[-5992.39,1936.12],"6-107-18":[-6455.15,918.27],"6-107-19":[-5625.24,284.34],"5-53-9":[-6455.15,1101.77],"4-26-4":[-6455.15,3047.6],"6-107-20":[-52.47,526.37],"6-107-21":[-35.84,1218.7],"5-53-10":[-105.16,1795.67],"6-107-22":[0.69,665.65],"6-107-23":[-53.71,3956.01],"5-53-11":[-53.71,3956.01],"4-26-5":[-5427.73,3956.01],"6-107-24":[11.3,1042.66],"6-107-25":[-140.92,2731.61],"5-53-12":[-2434.64,2731.61],"6-107-26":[-2442.89,2712.33],"6-107-27":[-3959.71,2627.63],"5-53-13":[-7088.95,2962.21],"4-26-6":[-7165.68,2962.21],"6-107-28":[-4124.69,2528.23],"6-107-29":[-5178.42,2469.27],"5-53-14":[-7127.73,2528.23],"6-107-30":[-6397.3,2587.77],"6-107-31":[-4678.95,2851.48],"5-53-15":[-6397.3,3403.08],"4-26-7":[-7180.91,4108.68],"6-107-32":[-5755.48,2955.49],"6-107-33":[-5453.9,2702.65],"5-53-16":[-5755.48,3490.23],"6-107-34":[-5829.92,2335.3],"6-107-35":[-5067.92,2392.22],"5-53-17":[-5829.92,2405.04],"4-26-8":[-5829.92,4026.67],"6-107-36":[-3178.2,2496.62],"6-107-37":[-5674.08,2665.32],"5-53-18":[-5674.08,2857.2],"6-107-38":[-5493.89,2656.26],"6-107-39":[-5934.3,936.67],"5-53-19":[-5934.3,2656.26],"4-26-9":[-5934.3,2857.2],"6-107-40":[-6907.12,3813],"6-107-41":[-1957.5,692.66],"5-53-20":[-6907.12,3813],"6-107-42":[-102.58,1162.16],"6-107-43":[-51.74,610.87],"5-53-21":[-102.58,1738.68],"4-26-10":[-6907.12,3813],"6-107-44":[-79.98,322.34],"6-107-45":[-103.15,850.26],"5-53-22":[-103.15,1063.1],"6-107-46":[-98.51,1077.53],"6-107-47":[-60.78,748.14],"5-53-23":[-98.51,1904.12],"4-26-11":[-103.15,2994.6],"6-107-48":[-54.95,1479.71],"6-107-49":[-49.55,1565.44],"5-53-24":[-54.99,1698.78],"6-107-50":[-47.09,1490.38],"6-107-51":[-49,1610.21],"5-53-25":[-49,2182.46],"4-26-12":[-54.99,2574.37],"6-107-52":[-52.14,1975.45],"6-107-53":[-62.69,1147.18],"5-53-26":[-62.69,2446.34],"6-107-54":[-67.4,422.24],"6-107-55":[-64.36,1172.91],"5-53-27":[-67.4,1172.91],"4-26-13":[-67.4,2813.61],"6-107-56":[0.38,2590.73],"6-107-57":[-18.89,3089.34],"5-53-28":[-18.89,3089.34],"6-107-58":[-68.11,3196.31],"6-107-59":[-2999.96,3163.37],"5-53-29":[-2999.96,3196.31],"4-26-14":[-2999.96,3320.02],"6-107-60":[-5139.66,2994.83],"6-107-61":[-4603,2932.32],"5-53-30":[-5343.81,3109.06],"6-107-62":[-4447.14,3035.5],"6-107-63":[-4391.36,3058.07],"5-53-31":[-4447.14,3060.25],"4-26-15":[-5343.81,3317.03],"6-108-0":[-269.86,460.52],"6-108-1":[-909.85,103.01],"6-108-2":[-934.43,448.87],"6-108-3":[-448.87,410.23],"6-108-4":[-1134.26,783.32],"6-108-5":[-1014.64,707.83],"6-108-6":[-803.54,487.14],"6-108-7":[-492.37,1127.4],"6-108-8":[-3410.5,1401.18],"6-108-9":[-4432.32,816.9],"6-108-10":[-4679.36,804.47],"6-108-11":[-4901.46,1845.92],"6-108-12":[-4877.43,1706.86],"6-108-13":[-5078.78,1269.14],"6-108-14":[-5485.84,878.23],"6-108-15":[-5416.22,339.07],"6-108-16":[-5311.85,1264.57],"6-108-17":[-5872.94,1987.41],"6-108-18":[-6139.97,1234.98],"6-108-19":[-5744.12,581.2],"6-108-20":[-1210.92,1941.55],"6-108-21":[18.57,485.34],"6-108-22":[22.07,547.54],"6-108-23":[8,553.56],"6-108-24":[22.25,451.89],"6-108-25":[12.35,918.99],"6-108-26":[-100.52,825.9],"6-108-27":[-1028.33,1607.31],"6-108-28":[-3782.32,2883.2],"6-108-29":[-5712.91,3011.04],"6-108-30":[-5919.23,2699.58],"6-108-31":[-6130.93,2053.63],"6-108-32":[-5581.72,1989.62],"6-108-33":[-5856.99,2752.59],"6-108-34":[-5125.09,2931.03],"6-108-35":[-9837.42,2985.2],"6-108-36":[-9176.01,1499.32],"6-108-37":[-7403.24,844.91],"6-108-38":[-6431.65,967.01],"6-108-39":[-6750.67,455.4],"6-108-40":[-8904.47,557.1],"6-108-41":[-2245.02,555.5],"6-108-42":[-155.54,497.24],"6-108-43":[-143.34,1897.55],"6-108-44":[-116.63,504.19],"6-108-45":[-69.83,1160],"6-108-46":[-133.68,1895.04],"6-108-47":[-58.68,1225.25],"6-108-48":[-54.09,331.06],"6-108-49":[-49.45,858.23],"6-108-50":[-48.53,1246.12],"6-108-51":[-51.56,1690.85],"6-108-52":[-55.45,1790.32],"6-108-53":[-65.39,785.47],"6-108-54":[-71.76,816.92],"6-108-55":[-65.99,1394.18],"6-108-56":[-2.53,2630.58],"6-108-57":[-6.92,3151.32],"6-108-58":[-53.92,3203.64],"6-108-59":[-2992.28,3159.64],"6-108-60":[-4112.67,2917.97],"6-108-61":[-4420.65,2871.65],"6-108-62":[-4443.67,3023.22],"6-108-63":[-4394.23,3057.86],"6-109-0":[-270.44,656.94],"6-109-1":[-827.99,51.45],"5-54-0":[-909.85,656.94],"6-109-2":[-881.02,445.4],"6-109-3":[-438.51,348.03],"5-54-1":[-934.43,448.87],"6-109-4":[-755.24,1075.1],"6-109-5":[-1021.66,875.53],"5-54-2":[-1134.26,1075.1],"6-109-6":[-964.92,1068.55],"6-109-7":[-1389.91,2201.02],"5-54-3":[-1389.91,2201.02],"6-109-8":[-2933.34,2117.99],"6-109-9":[-4505.72,1848.18],"5-54-4":[-4505.72,2117.99],"6-109-10":[-4787.22,676.85],"6-109-11":[-4862.28,2240.33],"5-54-5":[-4901.46,2240.33],"6-109-12":[-4826.2,2048.94],"6-109-13":[-4454.84,905.39],"5-54-6":[-5078.78,2048.94],"6-109-14":[-5226.57,1057.62],"6-109-15":[-5811.86,1445.43],"5-54-7":[-5811.86,1445.43],"6-109-16":[-6600.71,1718.97],"6-109-17":[-5848.43,2763.77],"5-54-8":[-6600.71,2763.77],"6-109-18":[-6128.18,1727.04],"6-109-19":[-5755.9,1925.58],"5-54-9":[-6139.97,1925.58],"6-109-20":[-2873.02,1453.61],"6-109-21":[16.04,722.76],"5-54-10":[-2873.02,1941.55],"6-109-22":[13.17,993.49],"6-109-23":[24.41,997.46],"5-54-11":[8,997.46],"6-109-24":[29.92,532.19],"6-109-25":[35.9,997.76],"5-54-12":[12.35,997.76],"6-109-26":[-62.41,705.14],"6-109-27":[-155.45,192.69],"5-54-13":[-1028.33,1607.31],"6-109-28":[-3320.92,2276.38],"6-109-29":[-5565.73,1372.75],"5-54-14":[-5712.91,3011.04],"6-109-30":[-5326.65,2446.71],"6-109-31":[-5439.11,2066.98],"5-54-15":[-6130.93,2699.58],"6-109-32":[-5242.54,2152.95],"6-109-33":[-9088.35,2555.71],"5-54-16":[-9088.35,2752.59],"6-109-34":[-9658.18,1415.76],"6-109-35":[-10034.76,2395.35],"5-54-17":[-10034.76,2985.2],"6-109-36":[-7677.31,198.32],"6-109-37":[-6489.8,755.14],"5-54-18":[-9176.01,1499.32],"6-109-38":[-6783.71,1012.77],"6-109-39":[-6707.72,556.98],"5-54-19":[-6783.71,1012.77],"6-109-40":[-7531.73,1049.45],"6-109-41":[-7516.23,1051.49],"5-54-20":[-8904.47,1051.49],"6-109-42":[-1415.28,657.78],"6-109-43":[-917.74,1418.1],"5-54-21":[-1415.28,1897.55],"6-109-44":[-203.47,1825.58],"6-109-45":[-2529.02,1649.03],"5-54-22":[-2529.02,1825.58],"6-109-46":[-2502.26,2676.78],"6-109-47":[-55.65,1688.92],"5-54-23":[-2502.26,2676.78],"6-109-48":[-52.05,1423.43],"6-109-49":[-47.99,1021.62],"5-54-24":[-54.09,1423.43],"6-109-50":[-47.82,876.38],"6-109-51":[-52.39,1918.93],"5-54-25":[-52.39,1918.93],"6-109-52":[-58.59,2139.52],"6-109-53":[-69.44,671.86],"5-54-26":[-69.44,2139.52],"6-109-54":[-76.93,1835.17],"6-109-55":[-75.43,2142.74],"5-54-27":[-76.93,2142.74],"6-109-56":[54.7,2622.61],"6-109-57":[-13.76,3171.09],"5-54-28":[-13.76,3171.09],"6-109-58":[-51.27,3189.23],"6-109-59":[-2937.77,3116.04],"5-54-29":[-2992.28,3203.64],"6-109-60":[-4129.79,2882.89],"6-109-61":[-4476.03,2844.52],"5-54-30":[-4476.03,2917.97],"6-109-62":[-4360.94,3011.97],"6-109-63":[-4379.14,3059.53],"5-54-31":[-4443.67,3059.53],"6-110-0":[-250.66,758.26],"6-110-1":[-639.76,157.09],"6-110-2":[-685.8,661.06],"6-110-3":[-268.85,380.05],"6-110-4":[-297.72,699.79],"6-110-5":[-929.59,824.82],"6-110-6":[-1441.83,856.13],"6-110-7":[-1340.2,1828.99],"6-110-8":[-2191.42,1922.66],"6-110-9":[-4584.62,2002.65],"6-110-10":[-4755.66,531.48],"6-110-11":[-4922.75,2290.58],"6-110-12":[-4734.98,2374.21],"6-110-13":[-4033.09,1509.02],"6-110-14":[-5177.97,1216.44],"6-110-15":[-5122.6,1386.01],"6-110-16":[-5852.6,1509.87],"6-110-17":[-6019.33,1774.19],"6-110-18":[-5925.45,999.37],"6-110-19":[-5864.11,1373.1],"6-110-20":[-1399.53,1801.42],"6-110-21":[-19.03,1948.19],"6-110-22":[24,1394.61],"6-110-23":[28.82,1297.55],"6-110-24":[34.84,856.67],"6-110-25":[38.27,554.6],"6-110-26":[-37.78,444.1],"6-110-27":[-141.33,346.26],"6-110-28":[-2350.94,127.03],"6-110-29":[-7570.28,837.45],"6-110-30":[-7572.68,2981.67],"6-110-31":[-4811.97,1446.01],"6-110-32":[-5014.78,1519.04],"6-110-33":[-5712.41,3088.67],"6-110-34":[-6523.63,862.43],"6-110-35":[-6612.97,116.33],"6-110-36":[-6757,359.52],"6-110-37":[-7622.08,453.11],"6-110-38":[-7728.22,558.61],"6-110-39":[-6469.64,915.42],"6-110-40":[-6273.13,1429.68],"6-110-41":[-6885.04,1437.62],"6-110-42":[-5789.08,1847.18],"6-110-43":[-2607.79,1764.42],"6-110-44":[-2139.1,1318.08],"6-110-45":[-3282.63,927.36],"6-110-46":[-3638.83,1736.18],"6-110-47":[-2977.08,1480.88],"6-110-48":[-49.85,1362.03],"6-110-49":[-46.08,1189.43],"6-110-50":[-46.52,1475],"6-110-51":[-52.46,2242.57],"6-110-52":[-59.62,2260.57],"6-110-53":[-71.74,522.46],"6-110-54":[-80.19,1992.64],"6-110-55":[-74.89,1933.66],"6-110-56":[37.2,2601.74],"6-110-57":[-29.38,3136.57],"6-110-58":[-51.27,3137.89],"6-110-59":[-2933.37,3008.63],"6-110-60":[-4048.36,2819.29],"6-110-61":[-4427.04,2805.69],"6-110-62":[-4352,2999.73],"6-110-63":[-4305.39,3062.38],"6-111-0":[-323.33,754.83],"6-111-1":[-702.85,187.17],"5-55-0":[-702.85,758.26],"6-111-2":[-737.84,648.26],"6-111-3":[-469.89,449.75],"5-55-1":[-737.84,661.06],"4-27-0":[-934.43,758.26],"6-111-4":[-1182.43,490.13],"6-111-5":[-1362,1088.07],"5-55-2":[-1362,1088.07],"6-111-6":[-1166.96,1035.63],"6-111-7":[-1423.87,1221.31],"5-55-3":[-1441.83,1828.99],"4-27-1":[-1441.83,2201.02],"3-13-0":[-1960.43,2201.02],"6-111-8":[-2163.91,1652.58],"6-111-9":[-4546.4,2070.51],"5-55-4":[-4584.62,2070.51],"6-111-10":[-4788.65,825.86],"6-111-11":[-4913.95,1856.83],"5-55-5":[-4922.75,2290.58],"4-27-2":[-4922.75,2290.58],"6-111-12":[-4533.1,2358.55],"6-111-13":[-4006.46,2286.52],"5-55-6":[-4734.98,2374.21],"6-111-14":[-4355.03,2263.84],"6-111-15":[-4810.31,1447.73],"5-55-7":[-5177.97,2263.84],"4-27-3":[-5811.86,2374.21],"3-13-1":[-5811.86,2992.37],"2-6-0":[-5811.86,4155.27],"6-111-16":[-5292.31,1878.55],"6-111-17":[-5825.22,62.05],"5-55-8":[-6019.33,1878.55],"6-111-18":[-5782.95,66.77],"6-111-19":[-6031.55,1986.11],"5-55-9":[-6031.55,1986.11],"4-27-4":[-6600.71,2763.77],"6-111-20":[-178.07,1882.11],"6-111-21":[27.45,387.12],"5-55-10":[-1399.53,1948.19],"6-111-22":[33.04,937.65],"6-111-23":[33.91,1419.55],"5-55-11":[24,1419.55],"4-27-5":[-2873.02,1948.19],"3-13-2":[-6600.71,3956.01],"6-111-24":[37.06,1087.22],"6-111-25":[39.61,455.2],"5-55-12":[34.84,1087.22],"6-111-26":[44.33,446.87],"6-111-27":[0.43,554.22],"5-55-13":[-141.33,554.22],"4-27-6":[-1028.33,1607.31],"6-111-28":[-342.38,125.8],"6-111-29":[-3693.35,614.14],"5-55-14":[-7570.28,837.45],"6-111-30":[-3688.89,1913.09],"6-111-31":[-4778.06,2928.23],"5-55-15":[-7572.68,2981.67],"4-27-7":[-7572.68,3011.04],"3-13-3":[-7572.68,4108.68],"2-6-1":[-7572.68,7512.84],"6-111-32":[-5480.06,3028.24],"6-111-33":[-6076.26,2016.59],"5-55-16":[-6076.26,3088.67],"6-111-34":[-8930.19,670.15],"6-111-35":[-6319.86,174.3],"5-55-17":[-8930.19,862.43],"4-27-8":[-10034.76,3088.67],"6-111-36":[-6662.31,610.22],"6-111-37":[-6727.95,457.36],"5-55-18":[-7622.08,610.22],"6-111-38":[-6703.37,466.21],"6-111-39":[-7157.32,1152.22],"5-55-19":[-7728.22,1152.22],"4-27-9":[-9176.01,1499.32],"3-13-4":[-10034.76,4026.67],"6-111-40":[-5842.52,1528.53],"6-111-41":[-5775.21,1002.66],"5-55-20":[-6885.04,1528.53],"6-111-42":[-5651.27,400.15],"6-111-43":[-4946.41,1791.1],"5-55-21":[-5789.08,1847.18],"4-27-10":[-8904.47,1897.55],"6-111-44":[-1567.69,1916.11],"6-111-45":[-3584.66,-20.77],"5-55-22":[-3584.66,1916.11],"6-111-46":[-3855.55,-20.97],"6-111-47":[-3726.44,1812.54],"5-55-23":[-3855.55,1812.54],"4-27-11":[-3855.55,2676.78],"3-13-5":[-8904.47,3813],"2-6-2":[-10034.76,7274.95],"6-111-48":[-45.23,1405.74],"6-111-49":[-42.63,2153.84],"5-55-24":[-49.85,2153.84],"6-111-50":[-45.55,2160.52],"6-111-51":[-51.95,2239.63],"5-55-25":[-52.46,2242.57],"4-27-12":[-54.09,2242.57],"6-111-52":[-60.12,1808.82],"6-111-53":[-74.09,806.78],"5-55-26":[-74.09,2260.57],"6-111-54":[-82.21,2067.49],"6-111-55":[-78.66,1711.28],"5-55-27":[-82.21,2067.49],"4-27-13":[-82.21,2260.57],"3-13-6":[-82.21,2813.61],"6-111-56":[18.81,2605.54],"6-111-57":[-26.45,2976.73],"5-55-28":[-29.38,3136.57],"6-111-58":[-46.21,2992.85],"6-111-59":[-3028.17,2893.93],"5-55-29":[-3028.17,3137.89],"4-27-14":[-3028.17,3203.64],"6-111-60":[-4045.52,2687.3],"6-111-61":[-4452.97,2763.19],"5-55-30":[-4452.97,2819.29],"6-111-62":[-4321.84,2987.5],"6-111-63":[-4305.39,3065.26],"5-55-31":[-4352,3065.26],"4-27-15":[-4476.03,3065.26],"3-13-7":[-5343.81,3320.02],"2-6-3":[-5343.81,4132.25],"6-112-0":[-315.35,703.8],"6-112-1":[-500.97,188.17],"6-112-2":[-672.54,426.09],"6-112-3":[-637.86,265.05],"6-112-4":[-1182.43,535.81],"6-112-5":[-1178.5,965.91],"6-112-6":[-1309.88,1017.56],"6-112-7":[-2150.48,1767.28],"6-112-8":[-3092.96,1681.65],"6-112-9":[-4395.44,1766.67],"6-112-10":[-4664.57,1755.07],"6-112-11":[-4741.98,1915.02],"6-112-12":[-4452.89,2099.48],"6-112-13":[-3978.01,2155.76],"6-112-14":[-4196.3,1965.97],"6-112-15":[-4806.19,2024.26],"6-112-16":[-5271.91,1410.98],"6-112-17":[-5632.69,66.52],"6-112-18":[-5870.55,3037.73],"6-112-19":[-5099.73,3225.44],"6-112-20":[-42.36,1148.96],"6-112-21":[-8.1,410.71],"6-112-22":[-5.97,293.67],"6-112-23":[36.79,1063.75],"6-112-24":[39.76,637.58],"6-112-25":[41.96,467.74],"6-112-26":[-2.18,358.76],"6-112-27":[-1.62,407.82],"6-112-28":[-55.19,128.34],"6-112-29":[-53.86,134.69],"6-112-30":[-1512.17,4766.85],"6-112-31":[-5137.94,1479.51],"6-112-32":[-5372.95,1532.53],"6-112-33":[-5738.8,4900.75],"6-112-34":[-8241.06,152.9],"6-112-35":[-7154.87,138.86],"6-112-36":[-6266.86,417.68],"6-112-37":[-6347.65,370.77],"6-112-38":[-6180.93,478.74],"6-112-39":[-6935.69,643.8],"6-112-40":[-6887.3,1103.75],"6-112-41":[-6044.18,301.67],"6-112-42":[-5342,426.73],"6-112-43":[-4826.53,1062.96],"6-112-44":[-2697.25,3130.43],"6-112-45":[-3480.96,2969.74],"6-112-46":[-3690.31,-16.66],"6-112-47":[-3710.67,1366.96],"6-112-48":[-2085.48,1915.25],"6-112-49":[-40.23,1848.97],"6-112-50":[-44.52,2039.75],"6-112-51":[-174.25,1981.47],"6-112-52":[-60.31,1859.99],"6-112-53":[-75.15,1697.18],"6-112-54":[-83.59,1769.68],"6-112-55":[-84.73,1703.65],"6-112-56":[14.74,2525.84],"6-112-57":[-27.87,2840.96],"6-112-58":[-40.15,2867.37],"6-112-59":[-2183.56,2794.55],"6-112-60":[-3705.32,2564.78],"6-112-61":[-4506.77,2709.29],"6-112-62":[-4289.6,2977.76],"6-112-63":[-4281.74,3068.14],"6-113-0":[-237.9,609.54],"6-113-1":[-654.94,258.06],"5-56-0":[-654.94,703.8],"6-113-2":[-681.4,461.37],"6-113-3":[-773.18,6.86],"5-56-1":[-773.18,461.37],"6-113-4":[-684.38,493.31],"6-113-5":[-626.54,608.12],"5-56-2":[-1182.43,965.91],"6-113-6":[-1337.5,609.54],"6-113-7":[-1015.02,2177.91],"5-56-3":[-2150.48,2177.91],"6-113-8":[-3386.76,2476.55],"6-113-9":[-4330.29,2650.27],"5-56-4":[-4395.44,2650.27],"6-113-10":[-4642.34,2153.15],"6-113-11":[-4825.16,1760.98],"5-56-5":[-4825.16,2153.15],"6-113-12":[-4357.22,1103.01],"6-113-13":[-4344.99,1633.71],"5-56-6":[-4452.89,2155.76],"6-113-14":[-5073.4,2108.2],"6-113-15":[-5648.56,1700.99],"5-56-7":[-5648.56,2108.2],"6-113-16":[-5457.85,1549.63],"6-113-17":[-5625.96,1641.19],"5-56-8":[-5632.69,1641.19],"6-113-18":[-5664.55,2604.93],"6-113-19":[-78.76,3800.26],"5-56-9":[-5870.55,3800.26],"6-113-20":[-8.36,1074.29],"6-113-21":[-5.83,1038.21],"5-56-10":[-42.36,1148.96],"6-113-22":[6.51,236.01],"6-113-23":[42.43,387.89],"5-56-11":[-5.97,1063.75],"6-113-24":[44.58,634.08],"6-113-25":[-5.67,464.96],"5-56-12":[-5.67,637.58],"6-113-26":[-99.13,216.97],"6-113-27":[-11.67,115.83],"5-56-13":[-99.13,407.82],"6-113-28":[0.49,237.05],"6-113-29":[3.59,230.31],"5-56-14":[-55.19,237.05],"6-113-30":[6.27,4681.3],"6-113-31":[-4723.47,2263.2],"5-56-15":[-5137.94,4766.85],"6-113-32":[-4812.96,2301.21],"6-113-33":[-5291.95,5227.39],"5-56-16":[-5738.8,5227.39],"6-113-34":[-8740.43,203.53],"6-113-35":[-8879.14,194.76],"5-56-17":[-8879.14,203.53],"6-113-36":[-7669.24,131.12],"6-113-37":[-6711.73,223.46],"5-56-18":[-7669.24,417.68],"6-113-38":[-7963.6,475.97],"6-113-39":[-6789.64,657.09],"5-56-19":[-7963.6,657.09],"6-113-40":[-5735.69,421.94],"6-113-41":[-5809.94,242.02],"5-56-20":[-6887.3,1103.75],"6-113-42":[-4854.7,1079.1],"6-113-43":[-4237.08,1164.85],"5-56-21":[-5342,1164.85],"6-113-44":[-6405.63,3720.25],"6-113-45":[-2520.67,2507.92],"5-56-22":[-6405.63,3720.25],"6-113-46":[-4096.61,1520.18],"6-113-47":[-3742.35,1494.65],"5-56-23":[-4096.61,1520.18],"6-113-48":[-2201.39,1675.03],"6-113-49":[-792.69,2012.19],"5-56-24":[-2201.39,2012.19],"6-113-50":[-191.23,1604.7],"6-113-51":[-162.88,1067.01],"5-56-25":[-191.23,2039.75],"6-113-52":[-197.34,1704.07],"6-113-53":[-76.66,2148.55],"5-56-26":[-197.34,2148.55],"6-113-54":[-85.09,2671.32],"6-113-55":[-88.87,2502.55],"5-56-27":[-88.87,2671.32],"6-113-56":[48.36,2522.11],"6-113-57":[-29.31,2629.41],"5-56-28":[-29.31,2840.96],"6-113-58":[-26.26,2726.71],"6-113-59":[-670.83,2693.87],"5-56-29":[-2183.56,2867.37],"6-113-60":[-3387.1,2498.35],"6-113-61":[-4352.21,2666.36],"5-56-30":[-4506.77,2709.29],"6-113-62":[-4113.81,2970.03],"6-113-63":[-4290.72,3070.04],"5-56-31":[-4290.72,3070.04],"6-114-0":[-217.29,631.52],"6-114-1":[-652.96,593.83],"6-114-2":[-652.96,502.69],"6-114-3":[-711.39,7.07],"6-114-4":[-962.46,35.46],"6-114-5":[-969.37,264.4],"6-114-6":[-2060.35,486.19],"6-114-7":[-1457.34,1696.85],"6-114-8":[-3458.33,2512.73],"6-114-9":[-4383.62,2822.43],"6-114-10":[-4900.81,2513.43],"6-114-11":[-4971.59,1227.42],"6-114-12":[-4627.64,627.07],"6-114-13":[-4444.85,1624.43],"6-114-14":[-5259.1,2346.04],"6-114-15":[-6433.58,1737.87],"6-114-16":[-5970.29,2312.97],"6-114-17":[-5424.99,2061.69],"6-114-18":[-4050.6,1666.14],"6-114-19":[-16.18,315.6],"6-114-20":[11.53,433.31],"6-114-21":[17.61,444.66],"6-114-22":[9.96,768.11],"6-114-23":[28.86,604.84],"6-114-24":[41.43,641.31],"6-114-25":[6.21,732.92],"6-114-26":[-2.3,520.43],"6-114-27":[-5.85,880.74],"6-114-28":[7.56,438.76],"6-114-29":[20.35,3629.05],"6-114-30":[-3441.73,3943.74],"6-114-31":[-4244.85,1426.8],"6-114-32":[-4340.52,1467.8],"6-114-33":[-4413.15,4032.23],"6-114-34":[-5477.02,3694.06],"6-114-35":[-10049.63,439.48],"6-114-36":[-10883.73,882.4],"6-114-37":[-5760.92,520.58],"6-114-38":[-8182.96,739.41],"6-114-39":[-5356.9,660.81],"6-114-40":[-8476.64,710.83],"6-114-41":[-9287.43,750.15],"6-114-42":[-9851.17,458.66],"6-114-43":[-9796.6,485.33],"6-114-44":[-9315.04,336.86],"6-114-45":[-7698.82,1596.14],"6-114-46":[-2831.4,1994.69],"6-114-47":[-793.5,2215.96],"6-114-48":[-1277.31,1574.86],"6-114-49":[-960.62,1356.08],"6-114-50":[-94.37,1531.42],"6-114-51":[-709.67,522.06],"6-114-52":[-430.47,1139.42],"6-114-53":[-75.38,2490.43],"6-114-54":[-88.58,2850.78],"6-114-55":[-89.56,2551.72],"6-114-56":[16.7,2298.07],"6-114-57":[-19.08,2577.32],"6-114-58":[-24.95,2638.08],"6-114-59":[-83.74,2612.99],"6-114-60":[-2174.13,2407.18],"6-114-61":[-3518.73,2636.29],"6-114-62":[-3712.95,2964.79],"6-114-63":[-4283.73,3070.97],"6-115-0":[-187.04,530.93],"6-115-1":[-99.37,430.8],"5-57-0":[-652.96,631.52],"6-115-2":[-563.41,825.96],"6-115-3":[-731.31,170.94],"5-57-1":[-731.31,825.96],"4-28-0":[-773.18,825.96],"6-115-4":[-1100.27,5.87],"6-115-5":[-1251.66,73.43],"5-57-2":[-1251.66,264.4],"6-115-6":[-1636.04,115.08],"6-115-7":[-2093.35,672.76],"5-57-3":[-2093.35,1696.85],"4-28-1":[-2150.48,2177.91],"6-115-8":[-3667.84,2830.65],"6-115-9":[-4258.51,2291.47],"5-57-4":[-4383.62,2830.65],"6-115-10":[-4724.92,2265.18],"6-115-11":[-4195.94,34.94],"5-57-5":[-4971.59,2513.43],"4-28-2":[-4971.59,2830.65],"6-115-12":[-3868.98,35.92],"6-115-13":[-5231.94,820.94],"5-57-6":[-5231.94,1624.43],"6-115-14":[-6647.87,1183.3],"6-115-15":[-5281.18,553.47],"5-57-7":[-6647.87,2346.04],"4-28-3":[-6647.87,2346.04],"6-115-16":[-5068.24,1740.56],"6-115-17":[-4365.04,1514.48],"5-57-8":[-5970.29,2312.97],"6-115-18":[-126.48,1481.35],"6-115-19":[16.45,488.33],"5-57-9":[-4050.6,1666.14],"4-28-4":[-5970.29,3800.26],"6-115-20":[24.53,517.03],"6-115-21":[25.92,466.97],"5-57-10":[11.53,517.03],"6-115-22":[27.14,504.64],"6-115-23":[25.23,721.3],"5-57-11":[9.96,768.11],"4-28-5":[-42.36,1148.96],"6-115-24":[19.75,1064.3],"6-115-25":[-5.67,1668.89],"5-57-12":[-5.67,1668.89],"6-115-26":[-2825.97,1447.2],"6-115-27":[-3615.64,572.29],"5-57-13":[-3615.64,1447.2],"4-28-6":[-3615.64,1668.89],"6-115-28":[-2126.29,211.74],"6-115-29":[-404.43,4475.65],"5-57-14":[-2126.29,4475.65],"6-115-30":[-2695.19,3432.98],"6-115-31":[-5029,210.19],"5-57-15":[-5029,3943.74],"4-28-7":[-5137.94,4766.85],"6-115-32":[-4771.84,296.18],"6-115-33":[-5123.4,3477.99],"5-57-16":[-5123.4,4032.23],"6-115-34":[-4997.92,4553.66],"6-115-35":[-7320.04,488.1],"5-57-17":[-10049.63,4553.66],"4-28-8":[-10049.63,5227.39],"6-115-36":[-10739.69,573.48],"6-115-37":[-5915.41,1449.42],"5-57-18":[-10883.73,1449.42],"6-115-38":[-5524.22,1670.14],"6-115-39":[-8932.24,1064.78],"5-57-19":[-8932.24,1670.14],"4-28-9":[-10883.73,1670.14],"6-115-40":[-8812,727.4],"6-115-41":[-8392.96,517.69],"5-57-20":[-9287.43,750.15],"6-115-42":[-7872.39,518.96],"6-115-43":[-6764.45,560.11],"5-57-21":[-9851.17,560.11],"4-28-10":[-9851.17,1164.85],"6-115-44":[-7018.42,521.33],"6-115-45":[-7799.77,1522.55],"5-57-22":[-9315.04,1596.14],"6-115-46":[-7614.84,1610.49],"6-115-47":[-6336.52,1704.56],"5-57-23":[-7614.84,2215.96],"4-28-11":[-9315.04,3720.25],"6-115-48":[-3744.4,504.45],"6-115-49":[-2649.47,1115.29],"5-57-24":[-3744.4,1574.86],"6-115-50":[-1798.94,796.94],"6-115-51":[-1884.46,1.57],"5-57-25":[-1884.46,1531.42],"4-28-12":[-3744.4,2039.75],"6-115-52":[-486.07,-22.55],"6-115-53":[-197.82,2231.18],"5-57-26":[-486.07,2490.43],"6-115-54":[-88.66,2288.35],"6-115-55":[-97.84,2886.75],"5-57-27":[-97.84,2886.75],"4-28-13":[-486.07,2886.75],"6-115-56":[-97.84,2001.44],"6-115-57":[-13.4,2428.6],"5-57-28":[-97.84,2577.32],"6-115-58":[-28.88,2560],"6-115-59":[-79.49,2552.69],"5-57-29":[-83.74,2638.08],"4-28-14":[-2183.56,2867.37],"6-115-60":[-2354.66,2355.28],"6-115-61":[-3053.46,2602.75],"5-57-30":[-3518.73,2636.29],"6-115-62":[-3317.66,2959.59],"6-115-63":[-4448.78,3076],"5-57-31":[-4448.78,3076],"4-28-15":[-4506.77,3076],"6-116-0":[-157.27,588],"6-116-1":[-30.91,619.39],"6-116-2":[-86.06,857.81],"6-116-3":[-594.94,584.08],"6-116-4":[-868.16,361.97],"6-116-5":[-1058.27,89.29],"6-116-6":[-1566.39,341.42],"6-116-7":[-2001.59,925.79],"6-116-8":[-3618.3,2260.37],"6-116-9":[-4360.2,2390.56],"6-116-10":[-4749.94,1856.79],"6-116-11":[-4365.05,37.51],"6-116-12":[-4921.25,37.9],"6-116-13":[-5623.28,37.4],"6-116-14":[-6034.38,40.87],"6-116-15":[-5248.79,1590.34],"6-116-16":[-4152.47,1786.57],"6-116-17":[-3533.65,1543.35],"6-116-18":[-3081.9,1965.18],"6-116-19":[15.73,2197.03],"6-116-20":[16.81,1387.12],"6-116-21":[19.43,339.66],"6-116-22":[23.95,968.42],"6-116-23":[29.01,1287.75],"6-116-24":[-77.95,1323.71],"6-116-25":[-1556,1284.39],"6-116-26":[-4497.18,99.51],"6-116-27":[-5262.69,99.08],"6-116-28":[-3029.54,3997.49],"6-116-29":[-6385.09,4112.66],"6-116-30":[-2568.6,1782.61],"6-116-31":[-6288.19,740.66],"6-116-32":[-7111.28,783.66],"6-116-33":[-5493.91,1907.63],"6-116-34":[-4683.48,4188.78],"6-116-35":[-7034.25,4099.51],"6-116-36":[-9875.02,139.92],"6-116-37":[-9525.81,129.47],"6-116-38":[-8773.83,1285.71],"6-116-39":[-7921.08,1325.23],"6-116-40":[-6582.23,1296.76],"6-116-41":[-6316.23,988.43],"6-116-42":[-8465.08,430.67],"6-116-43":[-6438.18,1421.13],"6-116-44":[-7095.88,2241.03],"6-116-45":[-7675.74,1999.21],"6-116-46":[-7337.56,1568.36],"6-116-47":[-9334.83,1737.57],"6-116-48":[-3739.03,1541.1],"6-116-49":[-3476.14,-13.09],"6-116-50":[-1798.94,-17.24],"6-116-51":[-1811.87,-19.53],"6-116-52":[-301.26,-22.38],"6-116-53":[-167.42,1885.71],"6-116-54":[-87.53,2398.56],"6-116-55":[-101.33,2286.69],"6-116-56":[-102.54,1792.11],"6-116-57":[-13.65,2338.91],"6-116-58":[-31.04,2481.09],"6-116-59":[-75.07,2481.96],"6-116-60":[-2584.8,2344.16],"6-116-61":[-2779.5,2569.82],"6-116-62":[-2768.05,2955.42],"6-116-63":[-4427.28,3081.95],"6-117-0":[-117.15,889.5],"6-117-1":[-8.17,1165.42],"5-58-0":[-157.27,1165.42],"6-117-2":[-333.27,1098.87],"6-117-3":[-364.55,1029.82],"5-58-1":[-594.94,1098.87],"6-117-4":[-777.9,446.39],"6-117-5":[-981.65,58.1],"5-58-2":[-1058.27,446.39],"6-117-6":[-1431.07,341.42],"6-117-7":[-1846.36,692.04],"5-58-3":[-2001.59,925.79],"6-117-8":[-3562.75,2175.65],"6-117-9":[-4180.76,2203.44],"5-58-4":[-4360.2,2390.56],"6-117-10":[-4281.24,2094.72],"6-117-11":[-4335.23,1541.51],"5-58-5":[-4749.94,2094.72],"6-117-12":[-4618.79,39.7],"6-117-13":[-4806.12,40.77],"5-58-6":[-5623.28,40.77],"6-117-14":[-5012.17,43.2],"6-117-15":[-6446.55,1533.21],"5-58-7":[-6446.55,1590.34],"6-117-16":[-4699.4,45.41],"6-117-17":[-4932.33,36.86],"5-58-8":[-4932.33,1786.57],"6-117-18":[-4982.4,1251.5],"6-117-19":[-4968.05,1583.75],"5-58-9":[-4982.4,2197.03],"6-117-20":[-528.87,1608.21],"6-117-21":[14.56,1512.08],"5-58-10":[-528.87,1608.21],"6-117-22":[19.38,1197.94],"6-117-23":[-32.07,1008.31],"5-58-11":[-32.07,1287.75],"6-117-24":[-324.64,868.08],"6-117-25":[-1824.42,88.5],"5-58-12":[-1824.42,1323.71],"6-117-26":[-4890.42,89.46],"6-117-27":[-4788.85,120.54],"5-58-13":[-5262.69,120.54],"6-117-28":[-3189.37,3000.93],"6-117-29":[-8146.74,1965.94],"5-58-14":[-8146.74,4112.66],"6-117-30":[-2812.73,2341.64],"6-117-31":[-7174.86,935.38],"5-58-15":[-7174.86,2341.64],"6-117-32":[-7126.95,964.38],"6-117-33":[-5915.39,2427.64],"5-58-16":[-7126.95,2427.64],"6-117-34":[-5061.26,2022.98],"6-117-35":[-6177.77,3071.93],"5-58-17":[-7034.25,4188.78],"6-117-36":[-6298.8,143.56],"6-117-37":[-6635.98,128.82],"5-58-18":[-9875.02,143.56],"6-117-38":[-6274.6,126.23],"6-117-39":[-6113.61,869.8],"5-58-19":[-8773.83,1325.23],"6-117-40":[-5929.23,1008.41],"6-117-41":[-6305.98,1199.98],"5-58-20":[-6582.23,1296.76],"6-117-42":[-6805.26,1550.43],"6-117-43":[-7008.26,1629.02],"5-58-21":[-8465.08,1629.02],"6-117-44":[-8681.6,1622.97],"6-117-45":[-8183.55,1262.52],"5-58-22":[-8681.6,2241.03],"6-117-46":[-6895.09,1.67],"6-117-47":[-9654.63,-5.89],"5-58-23":[-9654.63,1737.57],"6-117-48":[-7416.93,1460.21],"6-117-49":[-3583.39,-13.2],"5-58-24":[-7416.93,1541.1],"6-117-50":[-1433.49,-17.24],"6-117-51":[-1442.55,-20.04],"5-58-25":[-1811.87,-17.24],"6-117-52":[-456.12,1447.51],"6-117-53":[-164.68,2081.72],"5-58-26":[-456.12,2081.72],"6-117-54":[-86.62,2232.56],"6-117-55":[-101.99,2194.66],"5-58-27":[-101.99,2398.56],"6-117-56":[-106.25,1600.9],"6-117-57":[-18.37,2342.57],"5-58-28":[-106.25,2342.57],"6-117-58":[-30.84,2456.95],"6-117-59":[-74.54,2466.51],"5-58-29":[-75.07,2481.96],"6-117-60":[-2625.71,2291.18],"6-117-61":[-2781.74,2529.67],"5-58-30":[-2781.74,2569.82],"6-117-62":[-2248.52,2953.28],"6-117-63":[-4401.78,3084.91],"5-58-31":[-4427.28,3084.91],"6-118-0":[-129.02,911.99],"6-118-1":[6.64,1219.86],"6-118-2":[-297.72,2134.22],"6-118-3":[-2190.37,2133.38],"6-118-4":[-543.46,1022.63],"6-118-5":[-987.51,871.83],"6-118-6":[-1170.75,75.94],"6-118-7":[-2295.81,559.13],"6-118-8":[-3542.04,1102.21],"6-118-9":[-3936.44,1636.07],"6-118-10":[-4037.5,1813.48],"6-118-11":[-4143.24,1062.27],"6-118-12":[-4447.72,43.51],"6-118-13":[-4632.72,45.98],"6-118-14":[-5518.07,1460.13],"6-118-15":[-5586.61,1395.62],"6-118-16":[-6399.77,30.44],"6-118-17":[-5185.87,30.2],"6-118-18":[-5078.26,24.25],"6-118-19":[-5133.45,23.71],"6-118-20":[-5212.89,1371.43],"6-118-21":[-7297.49,1596.89],"6-118-22":[-4793.53,1262.63],"6-118-23":[-4385.58,466.32],"6-118-24":[-3305.66,72.19],"6-118-25":[-3117.27,81.26],"6-118-26":[-4793.75,84.41],"6-118-27":[-4811.89,769.24],"6-118-28":[-5121.46,987.57],"6-118-29":[-8895.66,337.7],"6-118-30":[-6033.07,2324.77],"6-118-31":[-6318.75,396.72],"6-118-32":[-4831.85,435.72],"6-118-33":[-4739.98,2388.16],"6-118-34":[-5400.43,419.14],"6-118-35":[-6063.11,1094.58],"6-118-36":[-8213.52,866.24],"6-118-37":[-6352.85,127.95],"6-118-38":[-5939.1,126.07],"6-118-39":[-6146.39,114.91],"6-118-40":[-5790.02,468.23],"6-118-41":[-6284.8,1263.13],"6-118-42":[-6559.51,1616.85],"6-118-43":[-6354.62,1396.93],"6-118-44":[-6695.74,40.32],"6-118-45":[-8749.81,22.42],"6-118-46":[-9912.03,6.94],"6-118-47":[-9502.69,-3.98],"6-118-48":[-9591.92,1305.84],"6-118-49":[-3423.16,1389.12],"6-118-50":[-1280.44,-10.19],"6-118-51":[-927.75,-20.43],"6-118-52":[-1013.08,982.96],"6-118-53":[-160.55,1825.48],"6-118-54":[-85.12,1590.07],"6-118-55":[-101.8,1107.21],"6-118-56":[-107,1522.76],"6-118-57":[-31.01,2294.89],"6-118-58":[-31.98,2319.46],"6-118-59":[-91.3,2399.61],"6-118-60":[-2793.15,2218.73],"6-118-61":[-2881.88,2447.37],"6-118-62":[-3368.66,2959.26],"6-118-63":[-4393.23,3089.37],"6-119-0":[-54.55,760],"6-119-1":[6.4,1341.53],"5-59-0":[-129.02,1341.53],"6-119-2":[-449.12,2688.82],"6-119-3":[-3165.15,3402.83],"5-59-1":[-3165.15,3402.83],"4-29-0":[-3165.15,3402.83],"6-119-4":[-610.56,1715.86],"6-119-5":[-1075.15,1249.44],"5-59-2":[-1075.15,1715.86],"6-119-6":[-1268.32,341.83],"6-119-7":[-1805.28,795.87],"5-59-3":[-2295.81,795.87],"4-29-1":[-2295.81,1715.86],"3-14-0":[-3165.15,3402.83],"6-119-8":[-3519.24,1098.37],"6-119-9":[-3570.74,1766.68],"5-59-4":[-3936.44,1766.68],"6-119-10":[-3550.32,1878.57],"6-119-11":[-6470.11,935.54],"5-59-5":[-6470.11,1878.57],"4-29-2":[-6470.11,2390.56],"6-119-12":[-4628.34,2005.12],"6-119-13":[-4845.41,2477.12],"5-59-6":[-4845.41,2477.12],"6-119-14":[-5636.3,1817.92],"6-119-15":[-5622.88,33.35],"5-59-7":[-5636.3,1817.92],"4-29-3":[-6446.55,2477.12],"3-14-1":[-6647.87,2830.65],"6-119-16":[-5611.37,23.39],"6-119-17":[-5516.39,17.38],"5-59-8":[-6399.77,30.44],"6-119-18":[-5476.01,11.21],"6-119-19":[-5309.53,11.2],"5-59-9":[-5476.01,24.25],"4-29-4":[-6399.77,2197.03],"6-119-20":[-5347.62,19.59],"6-119-21":[-5080.75,25.03],"5-59-10":[-7297.49,1596.89],"6-119-22":[-5020.66,34.94],"6-119-23":[-4903.3,56.89],"5-59-11":[-5020.66,1262.63],"4-29-5":[-7297.49,1608.21],"3-14-2":[-7297.49,3800.26],"6-119-24":[-3435.85,58.63],"6-119-25":[-3571.58,64.62],"5-59-12":[-3571.58,81.26],"6-119-26":[-4795.19,76.13],"6-119-27":[-4536.58,78.92],"5-59-13":[-4811.89,769.24],"4-29-6":[-5262.69,1323.71],"6-119-28":[-5330.86,1020.41],"6-119-29":[-7295.87,2736.56],"5-59-14":[-8895.66,2736.56],"6-119-30":[-3608.32,909.88],"6-119-31":[-3154.36,118.67],"5-59-15":[-6318.75,2324.77],"4-29-7":[-8895.66,4112.66],"3-14-3":[-8895.66,4766.85],"6-119-32":[-3114.22,260.46],"6-119-33":[-4255.39,960.88],"5-59-16":[-4831.85,2388.16],"6-119-34":[-5297.69,2782.57],"6-119-35":[-6052.62,1115.42],"5-59-17":[-6063.11,2782.57],"4-29-8":[-7126.95,4188.78],"6-119-36":[-6402.6,138.91],"6-119-37":[-6824.02,131.76],"5-59-18":[-8213.52,866.24],"6-119-38":[-6498.7,123.47],"6-119-39":[-5918.74,110.92],"5-59-19":[-6498.7,126.07],"4-29-9":[-9875.02,1325.23],"3-14-4":[-10883.73,5227.39],"6-119-40":[-6128.03,99.59],"6-119-41":[-6519.49,84.71],"5-59-20":[-6519.49,1263.13],"6-119-42":[-9176.7,74.04],"6-119-43":[-10680.3,59.16],"5-59-21":[-10680.3,1616.85],"4-29-10":[-10680.3,1629.02],"6-119-44":[-6763.45,40.96],"6-119-45":[-6519.66,25.39],"5-59-22":[-8749.81,40.96],"6-119-46":[-9445.89,10.69],"6-119-47":[-6123.65,-2.2],"5-59-23":[-9912.03,10.69],"4-29-11":[-9912.03,2241.03],"3-14-5":[-10680.3,3720.25],"6-119-48":[-10853.54,-8.1],"6-119-49":[-8574.57,1748.92],"5-59-24":[-10853.54,1748.92],"6-119-50":[-1223.57,2383.12],"6-119-51":[-217.21,1893.12],"5-59-25":[-1280.44,2383.12],"4-29-12":[-10853.54,2383.12],"6-119-52":[-433.74,838.54],"6-119-53":[-451.42,1902.57],"5-59-26":[-1013.08,1902.57],"6-119-54":[-84.63,1806.68],"6-119-55":[-101.06,1131.36],"5-59-27":[-101.8,1806.68],"4-29-13":[-1013.08,2398.56],"3-14-6":[-10853.54,2886.75],"6-119-56":[-106.67,1594.21],"6-119-57":[-31.01,2260.16],"5-59-28":[-107,2294.89],"6-119-58":[-40.57,2260.16],"6-119-59":[-122.46,2352.82],"5-59-29":[-122.46,2399.61],"4-29-14":[-122.46,2481.96],"6-119-60":[-2866.22,3169.82],"6-119-61":[-2914.69,2470.74],"5-59-30":[-2914.69,3169.82],"6-119-62":[-3553,2967.24],"6-119-63":[-4413.73,3091.37],"5-59-31":[-4413.73,3091.37],"4-29-15":[-4427.28,3169.82],"3-14-7":[-4506.77,3169.82],"6-120-0":[-55.55,724.25],"6-120-1":[5.52,1874.12],"6-120-2":[-955.47,2936.62],"6-120-3":[-2180.06,3414.83],"6-120-4":[-69.75,2856.44],"6-120-5":[-897.88,2143.79],"6-120-6":[-1157.78,2764.3],"6-120-7":[-2619.95,1481.77],"6-120-8":[-3296.34,1454.04],"6-120-9":[-3345.62,1757.61],"6-120-10":[-6609.18,947.68],"6-120-11":[-6590.7,2605.13],"6-120-12":[-5687.86,3631.59],"6-120-13":[-5276.6,3468.03],"6-120-14":[-5872.65,40.12],"6-120-15":[-5614.35,24.95],"6-120-16":[-5664,17.95],"6-120-17":[-5402.66,7.43],"6-120-18":[-5497,3],"6-120-19":[-5339.46,7.47],"6-120-20":[-4782.38,525.64],"6-120-21":[-4754.25,112.06],"6-120-22":[-4204.44,41.18],"6-120-23":[-3361.51,128.34],"6-120-24":[-2901.96,320.52],"6-120-25":[-4792.78,312.66],"6-120-26":[-5489.9,62.27],"6-120-27":[-4823.71,320.6],"6-120-28":[-5326.13,2329.59],"6-120-29":[-4282.44,1183.15],"6-120-30":[-2845.84,307.69],"6-120-31":[-3113.14,110.31],"6-120-32":[-3457.59,118.16],"6-120-33":[-4809.47,128.82],"6-120-34":[-5306.33,1251.14],"6-120-35":[-5928.98,2387.59],"6-120-36":[-6390.47,264.39],"6-120-37":[-6457.12,130.22],"6-120-38":[-6076.57,121.69],"6-120-39":[-5927.65,115.94],"6-120-40":[-5955.92,105.9],"6-120-41":[-6311.98,90.52],"6-120-42":[-6153.64,74.62],"6-120-43":[-5805.65,495.66],"6-120-44":[-5548.65,48.16],"6-120-45":[-6239.76,25.68],"6-120-46":[-7151.59,12.37],"6-120-47":[-6409.75,-0.49],"6-120-48":[-8360.13,-6.4],"6-120-49":[-7969.09,-10.64],"6-120-50":[-7897.4,3297.03],"6-120-51":[-1959.34,3585.59],"6-120-52":[-113.8,2516.12],"6-120-53":[-197.28,960.68],"6-120-54":[-84.73,1792.6],"6-120-55":[-104.1,1485.04],"6-120-56":[-112.02,1627.11],"6-120-57":[-24.77,2656.26],"6-120-58":[-47.85,2268.9],"6-120-59":[-172.93,2732.99],"6-120-60":[-3015.38,3191.81],"6-120-61":[-3572.17,2726.57],"6-120-62":[-4035.09,2977.2],"6-120-63":[-4362.3,3090.38],"6-121-0":[-56.54,784.16],"6-121-1":[-119.82,2728.02],"5-60-0":[-119.82,2728.02],"6-121-2":[-1558.73,4094.57],"6-121-3":[-1548.62,2241.19],"5-60-1":[-2180.06,4094.57],"6-121-4":[-1757.29,3832.91],"6-121-5":[-2241.05,3569.68],"5-60-2":[-2241.05,3832.91],"6-121-6":[-1300.6,2695.9],"6-121-7":[-2708.34,1052.69],"5-60-3":[-2708.34,2764.3],"6-121-8":[-3358.21,1653.57],"6-121-9":[-4131.5,1415.31],"5-60-4":[-4131.5,1757.61],"6-121-10":[-4858.1,1872.79],"6-121-11":[-5472.05,3277.23],"5-60-5":[-6609.18,3277.23],"6-121-12":[-5350.87,4774.23],"6-121-13":[-5927.84,28.14],"5-60-6":[-5927.84,4774.23],"6-121-14":[-7062.03,18.42],"6-121-15":[-5638.62,16.76],"5-60-7":[-7062.03,40.12],"6-121-16":[-5398.32,7.27],"6-121-17":[-5249.74,-0.26],"5-60-8":[-5664,17.95],"6-121-18":[-5445.67,-2.7],"6-121-19":[-4935,-0.57],"5-60-9":[-5497,7.47],"6-121-20":[-2281.98,2.2],"6-121-21":[-2412.8,8.56],"5-60-10":[-4782.38,525.64],"6-121-22":[-2319.41,15.96],"6-121-23":[-2554.81,30.18],"5-60-11":[-4204.44,128.34],"6-121-24":[-3725.28,107.41],"6-121-25":[-4952.98,278.42],"5-60-12":[-4952.98,320.52],"6-121-26":[-5302.77,60.14],"6-121-27":[-8432.48,310],"5-60-13":[-8432.48,320.6],"6-121-28":[-8445.91,1874.06],"6-121-29":[-4394.15,798.37],"5-60-14":[-8445.91,2329.59],"6-121-30":[-4214.87,673.97],"6-121-31":[-4909.25,96.35],"5-60-15":[-4909.25,673.97],"6-121-32":[-4524.53,101.5],"6-121-33":[-4708.54,1195.58],"5-60-16":[-4809.47,1195.58],"6-121-34":[-5263.16,839.37],"6-121-35":[-5431.78,1980.07],"5-60-17":[-5928.98,2387.59],"6-121-36":[-5881.53,241.22],"6-121-37":[-5906.24,129.2],"5-60-18":[-6457.12,264.39],"6-121-38":[-6153.29,122.21],"6-121-39":[-5665.94,116.7],"5-60-19":[-6153.29,122.21],"6-121-40":[-6068.98,106.12],"6-121-41":[-6769.5,94.44],"5-60-20":[-6769.5,106.12],"6-121-42":[-6326.71,82.35],"6-121-43":[-6475.65,66.27],"5-60-21":[-6475.65,495.66],"6-121-44":[-6585.85,55.75],"6-121-45":[-5665.02,35.28],"5-60-22":[-6585.85,55.75],"6-121-46":[-5980.55,21.22],"6-121-47":[-8565.41,3.98],"5-60-23":[-8565.41,21.22],"6-121-48":[-7688.98,-3.49],"6-121-49":[-6094.09,-8.06],"5-60-24":[-8360.13,-3.49],"6-121-50":[-7925.02,-10.84],"6-121-51":[-7262.98,4714.21],"5-60-25":[-7925.02,4714.21],"6-121-52":[-1254.34,3173.24],"6-121-53":[-279.33,1760.54],"5-60-26":[-1254.34,3173.24],"6-121-54":[-88.46,1430.3],"6-121-55":[-106.46,1636.79],"5-60-27":[-106.46,1792.6],"6-121-56":[-114.63,1037.69],"6-121-57":[-117.59,2620.78],"5-60-28":[-117.59,2656.26],"6-121-58":[-116.47,3433.82],"6-121-59":[-326.4,3317.92],"5-60-29":[-326.4,3433.82],"6-121-60":[-2852.26,2320.2],"6-121-61":[-3608.19,4077.78],"5-60-30":[-3608.19,4077.78],"6-121-62":[-4027.06,2984.14],"6-121-63":[-4301.84,3088.17],"5-60-31":[-4362.3,3090.38],"6-122-0":[-56.54,1014.6],"6-122-1":[-109.77,3546.5],"6-122-2":[-1210.31,4044.71],"6-122-3":[-1409.05,4.81],"6-122-4":[-1085.99,2572.72],"6-122-5":[-1350.81,3255.72],"6-122-6":[-1368.16,3402.98],"6-122-7":[-2794.56,1528.57],"6-122-8":[-3475.81,2107.47],"6-122-9":[-4413.25,1582.28],"6-122-10":[-5290.8,1233.67],"6-122-11":[-5917.39,932.54],"6-122-12":[-5796.65,850.98],"6-122-13":[-4791.57,472.87],"6-122-14":[-9889.98,16.34],"6-122-15":[-5992.39,6.88],"6-122-16":[-5621.81,-0.71],"6-122-17":[-5005.96,-4.25],"6-122-18":[-4194.8,-5.37],"6-122-19":[-3160.01,-6.19],"6-122-20":[-3411.31,-2.87],"6-122-21":[-3636.98,2.46],"6-122-22":[-3840.52,10.62],"6-122-23":[-3781.57,22.49],"6-122-24":[-4206.98,1627.03],"6-122-25":[-6101.98,333.75],"6-122-26":[-5952.12,54.72],"6-122-27":[-9079.48,60.99],"6-122-28":[-8454.89,738.31],"6-122-29":[-5441.79,72.29],"6-122-30":[-4625.54,81.32],"6-122-31":[-4641.51,86.88],"6-122-32":[-4517.57,92.44],"6-122-33":[-4923.32,106.03],"6-122-34":[-5332.06,119.42],"6-122-35":[-5557.99,866.32],"6-122-36":[-5705.71,218.89],"6-122-37":[-5889.42,127.16],"6-122-38":[-5897.43,340.77],"6-122-39":[-6007.07,1689.03],"6-122-40":[-6305.73,106.61],"6-122-41":[-6283.84,96.95],"6-122-42":[-6920.2,82.62],"6-122-43":[-7795.55,66.13],"6-122-44":[-6961.36,57.54],"6-122-45":[-6797.87,44.27],"6-122-46":[-6318.08,29.21],"6-122-47":[-7616.71,13.47],"6-122-48":[-10312.48,-2.93],"6-122-49":[-6228.89,-6.28],"6-122-50":[-6196.34,517.88],"6-122-51":[-6991.8,775.99],"6-122-52":[-4261.65,866.52],"6-122-53":[-1470.63,1246.67],"6-122-54":[-91.49,1594.29],"6-122-55":[-105.7,1756.51],"6-122-56":[-117.38,1533.57],"6-122-57":[-60.46,3075.8],"6-122-58":[-117.89,3148.6],"6-122-59":[-1054.95,2551.83],"6-122-60":[-2851.46,209.78],"6-122-61":[-3431.75,3800.64],"6-122-62":[-3988.49,3358.99],"6-122-63":[-4295.78,3084.48],"6-123-0":[-56.54,1244.65],"6-123-1":[-232.32,3676.75],"5-61-0":[-232.32,3676.75],"6-123-2":[-3382.75,4354.84],"6-123-3":[-1294.36,5.41],"5-61-1":[-3382.75,4354.84],"4-30-0":[-3382.75,4354.84],"6-123-4":[-2791.43,3682.29],"6-123-5":[-1170.46,3170.38],"5-61-2":[-2791.43,3682.29],"6-123-6":[-2127.24,3838.38],"6-123-7":[-3347.99,1680.33],"5-61-3":[-3347.99,3838.38],"4-30-1":[-3347.99,3838.38],"6-123-8":[-3635.38,1646.59],"6-123-9":[-3647.76,1328.47],"5-61-4":[-4413.25,2107.47],"6-123-10":[-5327.86,1210.93],"6-123-11":[-5689.06,20.59],"5-61-5":[-5917.39,1233.67],"4-30-2":[-6609.18,3277.23],"6-123-12":[-5306.98,744.81],"6-123-13":[-1323.94,597.84],"5-61-6":[-5796.65,850.98],"6-123-14":[-3360.99,467.59],"6-123-15":[-4513.17,2234.46],"5-61-7":[-9889.98,2234.46],"4-30-3":[-9889.98,4774.23],"6-123-16":[-4699.05,2752.59],"6-123-17":[-4390.06,-6.72],"5-61-8":[-5621.81,2752.59],"6-123-18":[-3204.99,-8.71],"6-123-19":[-3164.59,-8.81],"5-61-9":[-4194.8,-5.37],"4-30-4":[-5664,2752.59],"6-123-20":[-4217.52,33.69],"6-123-21":[-4274.01,312.86],"5-61-10":[-4274.01,312.86],"6-123-22":[-3827.4,1.5],"6-123-23":[-3830.58,209.11],"5-61-11":[-3840.52,209.11],"4-30-5":[-4782.38,525.64],"6-123-24":[-7245.18,1610.47],"6-123-25":[-7349.14,684.13],"5-61-12":[-7349.14,1627.03],"6-123-26":[-6517.45,1790.76],"6-123-27":[-9033.13,917.4],"5-61-13":[-9079.48,1790.76],"4-30-6":[-9079.48,1790.76],"6-123-28":[-5951.42,556.87],"6-123-29":[-5497.1,68.93],"5-61-14":[-8454.89,738.31],"6-123-30":[-4910.82,72.06],"6-123-31":[-4464.67,236.83],"5-61-15":[-4910.82,236.83],"4-30-7":[-8454.89,2329.59],"6-123-32":[-4593.18,105.9],"6-123-33":[-5101.41,189.87],"5-61-16":[-5101.41,189.87],"6-123-34":[-5266.67,289.81],"6-123-35":[-5291.73,608.86],"5-61-17":[-5557.99,866.32],"4-30-8":[-5928.98,2387.59],"6-123-36":[-5767.79,1017.74],"6-123-37":[-6472.3,1941.75],"5-61-18":[-6472.3,1941.75],"6-123-38":[-5832.98,717.25],"6-123-39":[-9233.31,1664.47],"5-61-19":[-9233.31,1689.03],"4-30-9":[-9233.31,1941.75],"6-123-40":[-6592.72,309.11],"6-123-41":[-6481.34,105.67],"5-61-20":[-6592.72,309.11],"6-123-42":[-6303.27,357.87],"6-123-43":[-6844.66,77.86],"5-61-21":[-7795.55,357.87],"4-30-10":[-7795.55,495.66],"6-123-44":[-7086.51,65.38],"6-123-45":[-5939.97,51.14],"5-61-22":[-7086.51,65.38],"6-123-46":[-6464.77,41.96],"6-123-47":[-5894.23,2939.6],"5-61-23":[-7616.71,2939.6],"4-30-11":[-8565.41,2939.6],"6-123-48":[-6765.22,2088.42],"6-123-49":[-7225.31,566.58],"5-61-24":[-10312.48,2088.42],"6-123-50":[-7023.81,649.83],"6-123-51":[-7022.87,934.21],"5-61-25":[-7023.81,934.21],"4-30-12":[-10312.48,4714.21],"6-123-52":[-4126.33,-32.37],"6-123-53":[-3406.12,1230.43],"5-61-26":[-4261.65,1246.67],"6-123-54":[-95.58,1329.47],"6-123-55":[-108.17,1683.59],"5-61-27":[-108.17,1756.51],"4-30-13":[-4261.65,3173.24],"6-123-56":[-118.68,1650.33],"6-123-57":[-116.81,3530.38],"5-61-28":[-118.68,3530.38],"6-123-58":[-159.87,2686.35],"6-123-59":[-2076.04,3368.3],"5-61-29":[-2076.04,3368.3],"4-30-14":[-2076.04,3530.38],"6-123-60":[-2853.15,-47.93],"6-123-61":[-3435.37,4324.92],"5-61-30":[-3435.37,4324.92],"6-123-62":[-3977.47,3260.29],"6-123-63":[-4287.81,3084.24],"5-61-31":[-4295.78,3358.99],"4-30-15":[-4362.3,4324.92],"6-124-0":[-56.54,1301.6],"6-124-1":[-1191.92,3708.01],"6-124-2":[-1848.48,3644.05],"6-124-3":[-995.03,5.75],"6-124-4":[-1020.34,2277.07],"6-124-5":[-1133.6,1872.18],"6-124-6":[-2735.85,3841.38],"6-124-7":[-3498.04,1617.82],"6-124-8":[-3588.31,1409.69],"6-124-9":[-4799.27,2305.88],"6-124-10":[-5503.23,2164.88],"6-124-11":[-6053.23,14.63],"6-124-12":[-5956.51,14.32],"6-124-13":[-796.01,475.72],"6-124-14":[-1475.84,8.76],"6-124-15":[-1676.68,2157.34],"6-124-16":[-2008.55,3583.72],"6-124-17":[-2140.02,1384.49],"6-124-18":[-2382.68,-6.47],"6-124-19":[-3086.24,3.63],"6-124-20":[-4605.92,-7.51],"6-124-21":[-4715.27,-4.76],"6-124-22":[-4322.05,-0.84],"6-124-23":[-7577.19,199.74],"6-124-24":[-7373.16,963.85],"6-124-25":[-4229.08,1044.88],"6-124-26":[-3856.45,38.19],"6-124-27":[-4605.43,656.26],"6-124-28":[-6193.84,78.61],"6-124-29":[-5618.92,57.21],"6-124-30":[-4139.69,61.69],"6-124-31":[-4704.02,110.26],"6-124-32":[-4720.62,114.26],"6-124-33":[-4885.21,199.85],"6-124-34":[-5006.81,1181.19],"6-124-35":[-5183.38,353.36],"6-124-36":[-5749.76,447.27],"6-124-37":[-5836.57,1039.27],"6-124-38":[-6631,1137.87],"6-124-39":[-6170.25,895.97],"6-124-40":[-6352.28,131.97],"6-124-41":[-6401.53,105.92],"6-124-42":[-6323.16,96.09],"6-124-43":[-6035.82,85.75],"6-124-44":[-6040.28,75.44],"6-124-45":[-6821.76,56.69],"6-124-46":[-7017.19,1441.5],"6-124-47":[-6967.66,3719.73],"6-124-48":[-6885.19,2290.2],"6-124-49":[-6816.74,-3.78],"6-124-50":[-7342.18,535.73],"6-124-51":[-4825.77,-20.62],"6-124-52":[-4087.83,-35.05],"6-124-53":[-3238.86,2185.88],"6-124-54":[-98.04,2328.88],"6-124-55":[-110.57,1461.98],"6-124-56":[-118.68,1628.36],"6-124-57":[-117.84,3544.4],"6-124-58":[-196.58,1962.19],"6-124-59":[-2437.77,2252.06],"6-124-60":[-2814.21,-48.57],"6-124-61":[-3412.93,3812.59],"6-124-62":[-4012.16,3705.94],"6-124-63":[-4284.77,3085.39],"6-125-0":[-56.54,1317.16],"6-125-1":[-572.69,3995.42],"5-62-0":[-1191.92,3995.42],"6-125-2":[-1311.11,2953.97],"6-125-3":[-964.64,6.39],"5-62-1":[-1848.48,3644.05],"6-125-4":[-964.64,6.49],"6-125-5":[-641.47,5.32],"5-62-2":[-1133.6,2277.07],"6-125-6":[-2768.91,6.47],"6-125-7":[-4295,1111.24],"5-62-3":[-4295,3841.38],"6-125-8":[-4019.88,1048.77],"6-125-9":[-4953.31,1518.99],"5-62-4":[-4953.31,2305.88],"6-125-10":[-5798.48,1665.46],"6-125-11":[-5866.14,6.86],"5-62-5":[-6053.23,2164.88],"6-125-12":[-5760.7,8.77],"6-125-13":[-4633.32,953.56],"5-62-6":[-5956.51,953.56],"6-125-14":[-1469.18,5.28],"6-125-15":[-2476.63,-2.39],"5-62-7":[-2476.63,2157.34],"6-125-16":[-2350.31,2480.82],"6-125-17":[-1065.55,2703.39],"5-62-8":[-2350.31,3583.72],"6-125-18":[-2048.5,2435.06],"6-125-19":[-2432.05,771.91],"5-62-9":[-3086.24,2435.06],"6-125-20":[-3878.8,43.61],"6-125-21":[-4100.08,-6.04],"5-62-10":[-4715.27,43.61],"6-125-22":[-5196.44,-3.42],"6-125-23":[-7758.52,4.64],"5-62-11":[-7758.52,199.74],"6-125-24":[-4709.36,513.79],"6-125-25":[-3752.38,24.94],"5-62-12":[-7373.16,1044.88],"6-125-26":[-6621.91,30.26],"6-125-27":[-5178.35,388.48],"5-62-13":[-6621.91,656.26],"6-125-28":[-5685.04,48.13],"6-125-29":[-5834.84,54.5],"5-62-14":[-6193.84,78.61],"6-125-30":[-5675.27,56.85],"6-125-31":[-4961.08,80.57],"5-62-15":[-5675.27,110.26],"6-125-32":[-5122.01,216.12],"6-125-33":[-5296.87,448.44],"5-62-16":[-5296.87,448.44],"6-125-34":[-5462.36,652.65],"6-125-35":[-5659.88,103.05],"5-62-17":[-5659.88,1181.19],"6-125-36":[-5926.4,124.13],"6-125-37":[-5839.93,130.49],"5-62-18":[-5926.4,1039.27],"6-125-38":[-5706.76,131.46],"6-125-39":[-5894.32,288.83],"5-62-19":[-6631,1137.87],"6-125-40":[-6238.28,107.87],"6-125-41":[-6426.06,104.69],"5-62-20":[-6426.06,131.97],"6-125-42":[-6389.68,97.22],"6-125-43":[-5810.29,89.45],"5-62-21":[-6389.68,97.22],"6-125-44":[-6349.71,816.34],"6-125-45":[-6401.67,2517.08],"5-62-22":[-6821.76,2517.08],"6-125-46":[-6548.04,2863.4],"6-125-47":[-7577.65,2605.15],"5-62-23":[-7577.74,3719.73],"6-125-48":[-7742.5,11.03],"6-125-49":[-6175.39,-4.71],"5-62-24":[-7742.5,2290.2],"6-125-50":[-7297.08,855.48],"6-125-51":[-4515.77,-21.91],"5-62-25":[-7342.18,855.48],"6-125-52":[-4005.44,-37.16],"6-125-53":[-3534.25,1715.44],"5-62-26":[-4087.83,2185.88],"6-125-54":[-99.71,1567.95],"6-125-55":[-113.95,1055.77],"5-62-27":[-113.95,2328.88],"6-125-56":[-118.23,1132.25],"6-125-57":[-119.6,-21.59],"5-62-28":[-119.6,3544.4],"6-125-58":[-269.84,-35.5],"6-125-59":[-2414.97,-52.66],"5-62-29":[-2437.77,2252.06],"6-125-60":[-2787.87,-48.63],"6-125-61":[-3242.97,2586.73],"5-62-30":[-3412.93,3812.59],"6-125-62":[-4002.19,3991.97],"6-125-63":[-4279.77,3087.55],"5-62-31":[-4284.77,3991.97],"6-126-0":[-56.54,1326.01],"6-126-1":[6.39,4136.33],"6-126-2":[-1110.71,3023.78],"6-126-3":[-832.6,7.32],"6-126-4":[-882.14,5.6],"6-126-5":[-714.62,4.51],"6-126-6":[-3402.46,5.95],"6-126-7":[-3875.2,1644.02],"6-126-8":[-5179.44,1334.46],"6-126-9":[-4806.11,1348.08],"6-126-10":[-5608.88,360.68],"6-126-11":[-5709.67,3.75],"6-126-12":[-5642.23,11.04],"6-126-13":[-5402.41,663.5],"6-126-14":[-3878.3,1.9],"6-126-15":[-3026,-2.13],"6-126-16":[-2994.81,-6.98],"6-126-17":[-3629.85,1723.22],"6-126-18":[-3098.11,2690.97],"6-126-19":[-3270.73,861.23],"6-126-20":[-4248.84,-6.36],"6-126-21":[-4689.77,-4.68],"6-126-22":[-4958.08,-4.14],"6-126-23":[-5774.74,4.18],"6-126-24":[-5415.15,260.52],"6-126-25":[-4431.02,483.23],"6-126-26":[-5087.7,174.6],"6-126-27":[-4511.06,229.72],"6-126-28":[-5530.34,40.97],"6-126-29":[-5978.96,401.29],"6-126-30":[-5867.38,423.39],"6-126-31":[-5805.77,165.51],"6-126-32":[-6483.05,56],"6-126-33":[-6671.64,66],"6-126-34":[-6545.42,76.55],"6-126-35":[-6624.72,95.02],"6-126-36":[-5934.9,297.72],"6-126-37":[-5555.83,122.31],"6-126-38":[-5267.64,587.24],"6-126-39":[-5478.95,124.15],"6-126-40":[-6264.23,107.99],"6-126-41":[-6215.65,102.99],"6-126-42":[-5936.66,96.7],"6-126-43":[-5953.59,87],"6-126-44":[-5339.24,921.24],"6-126-45":[-5656.73,2784.98],"6-126-46":[-6788.78,1743.24],"6-126-47":[-7214.84,29.21],"6-126-48":[-6130.94,11.4],"6-126-49":[-7290.53,-4.57],"6-126-50":[-7355,491.49],"6-126-51":[-5551.08,-26.38],"6-126-52":[-4441.49,-37.37],"6-126-53":[-3701.8,418.22],"6-126-54":[-122.63,1368.07],"6-126-55":[-115.57,1359.45],"6-126-56":[-120.87,1643.02],"6-126-57":[-122.6,-15.98],"6-126-58":[-624.79,-39.61],"6-126-59":[-2268.14,-52.64],"6-126-60":[-2705.49,-48.23],"6-126-61":[-3105.89,3164.9],"6-126-62":[-4043.65,4009.42],"6-126-63":[-4253.65,3089.77],"6-127-0":[-56.54,1334.33],"6-127-1":[-210.07,3234.37],"5-63-0":[-210.07,4136.33],"6-127-2":[-982.23,1050.27],"6-127-3":[-866.89,8.63],"5-63-1":[-1110.71,3023.78],"4-31-0":[-1848.48,4136.33],"6-127-4":[-866.24,6.79],"6-127-5":[-934.59,4.39],"5-63-2":[-934.59,6.79],"6-127-6":[-3725.21,612.64],"6-127-7":[-4050.17,1712.25],"5-63-3":[-4050.17,1712.25],"4-31-1":[-4295,3841.38],"3-15-0":[-4295,4354.84],"6-127-8":[-5328.81,1465.56],"6-127-9":[-4628.49,918.23],"5-63-4":[-5328.81,1465.56],"6-127-10":[-5971.35,11.47],"6-127-11":[-5641.74,3.44],"5-63-5":[-5971.35,360.68],"4-31-2":[-6053.23,2305.88],"6-127-12":[-5548.55,11.61],"6-127-13":[-5408.37,1210.91],"5-63-6":[-5642.23,1210.91],"6-127-14":[-5040.03,327.38],"6-127-15":[-3895.37,12.41],"5-63-7":[-5040.03,327.38],"4-31-3":[-5956.51,2157.34],"3-15-1":[-9889.98,4774.23],"2-7-0":[-9889.98,4774.23],"6-127-16":[-3066.41,-6.43],"6-127-17":[-4084.12,-10.68],"5-63-8":[-4084.12,1723.22],"6-127-18":[-4617.02,1681.88],"6-127-19":[-4460.78,-7.92],"5-63-9":[-4617.02,2690.97],"4-31-4":[-4617.02,3583.72],"6-127-20":[-4339.84,-7.92],"6-127-21":[-4478.85,40.71],"5-63-10":[-4689.77,40.71],"6-127-22":[-4490.23,-3.04],"6-127-23":[-4568.72,1.26],"5-63-11":[-5774.74,4.18],"4-31-5":[-7758.52,199.74],"3-15-2":[-7758.52,3583.72],"6-127-24":[-4711.94,9.72],"6-127-25":[-4084.66,1312.41],"5-63-12":[-5415.15,1312.41],"6-127-26":[-4195.61,981.61],"6-127-27":[-4943.02,64.11],"5-63-13":[-5087.7,981.61],"4-31-6":[-7373.16,1312.41],"6-127-28":[-5249.7,472.52],"6-127-29":[-5962.93,523.86],"5-63-14":[-5978.96,523.86],"6-127-30":[-6244.65,40.09],"6-127-31":[-5963.28,46.55],"5-63-15":[-6244.65,423.39],"4-31-7":[-6244.65,523.86],"3-15-3":[-9079.48,2329.59],"2-7-1":[-9079.48,4766.85],"1-3-0":[-9889.98,7512.84],"6-127-32":[-5882.89,50.53],"6-127-33":[-6530.92,57.98],"5-63-16":[-6671.64,66],"6-127-34":[-6610.51,69.75],"6-127-35":[-6659.17,86.05],"5-63-17":[-6659.17,95.02],"4-31-8":[-6671.64,1181.19],"6-127-36":[-6695.83,104.68],"6-127-37":[-5931.51,1069.23],"5-63-18":[-6695.83,1069.23],"6-127-38":[-5463.07,1371.15],"6-127-39":[-5548.25,108.66],"5-63-19":[-5548.25,1371.15],"4-31-9":[-6695.83,1371.15],"3-15-4":[-9233.31,2387.59],"6-127-40":[-6217.08,103.15],"6-127-41":[-6232.24,98.56],"5-63-20":[-6264.23,107.99],"6-127-42":[-6540.92,94.48],"6-127-43":[-5834.93,91.71],"5-63-21":[-6540.92,96.7],"4-31-10":[-6540.92,131.97],"6-127-44":[-5276.76,83.16],"6-127-45":[-5718.98,1759.88],"5-63-22":[-5718.98,2784.98],"6-127-46":[-6872.58,42.6],"6-127-47":[-7215.56,30.55],"5-63-23":[-7215.56,1743.24],"4-31-11":[-7577.65,3719.73],"3-15-5":[-8565.41,3719.73],"2-7-2":[-10883.73,5227.39],"6-127-48":[-6546.41,37.42],"6-127-49":[-7350.29,351.39],"5-63-24":[-7350.29,351.39],"6-127-50":[-7318.33,1130.9],"6-127-51":[-4299.75,-28.67],"5-63-25":[-7355,1130.9],"4-31-12":[-7742.5,2290.2],"6-127-52":[-4544.67,-37.45],"6-127-53":[-3726.9,-44.71],"5-63-26":[-4544.67,418.22],"6-127-54":[-175.46,962.23],"6-127-55":[-117.07,1527.58],"5-63-27":[-175.46,1527.58],"4-31-13":[-4544.67,2328.88],"3-15-6":[-10312.48,4714.21],"6-127-56":[-123.45,1789.28],"6-127-57":[-123.93,639.49],"5-63-28":[-123.93,1789.28],"6-127-58":[-1148.1,-47.82],"6-127-59":[-1910.34,-53.65],"5-63-29":[-2268.14,-39.61],"4-31-14":[-2437.77,3544.4],"6-127-60":[-2503.26,-48.22],"6-127-61":[-2903.07,1201.67],"5-63-30":[-3105.89,3164.9],"6-127-62":[-3966.1,3227.47],"6-127-63":[-4341.65,3092.98],"5-63-31":[-4341.65,4009.42],"4-31-15":[-4341.65,4009.42],"3-15-7":[-4362.3,4324.92],"2-7-3":[-10853.54,4714.21],"1-3-1":[-10883.73,7274.95],"0-1-0":[-10883.73,8777.15]} diff --git a/assets/cesium/ThirdParty/Workers/z-worker-pako.js b/assets/cesium/ThirdParty/Workers/z-worker-pako.js old mode 100755 new mode 100644 index ba6500913..3ea6d6e65 --- a/assets/cesium/ThirdParty/Workers/z-worker-pako.js +++ b/assets/cesium/ThirdParty/Workers/z-worker-pako.js @@ -1 +1 @@ -!function(){"use strict";const{Array:t,Object:e,Math:n,Error:s,Uint8Array:r,Uint16Array:a,Uint32Array:i,Int32Array:c,DataView:o,TextEncoder:l,crypto:h,postMessage:p}=globalThis,d=[];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)1&e?e=e>>>1^3988292384:e>>>=1;d[t]=e}class u{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,s=0|t.length;s>n;n++)e=e>>>8^d[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const f={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],s=f.getPartial(n);return 32===s?t.concat(e):f._shiftRight(e,s,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+f.getPartial(n)},clamp(t,e){if(32*t.length<e)return t;const s=(t=t.slice(0,n.ceil(e/32))).length;return e&=31,s>0&&e&&(t[s-1]=f.partial(e,t[s-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>n.round(t/1099511627776)||32,_shiftRight(t,e,n,s){for(void 0===s&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(0===e)return s.concat(t);for(let r=0;r<t.length;r++)s.push(n|t[r]>>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=f.getPartial(r);return s.push(f.partial(e+a&31,e+a>32?n:s.pop(),1)),s}},g={bytes:{fromBits(t){const e=f.bitLength(t)/8,n=new r(e);let s;for(let r=0;e>r;r++)0==(3&r)&&(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(t){const e=[];let n,s=0;for(n=0;n<t.length;n++)s=s<<8|t[n],3==(3&n)&&(e.push(s),s=0);return 3&n&&e.push(f.partial(8*(3&n),s)),e}}},w={sha1:function(t){t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()}};w.sha1.prototype={blockSize:512,reset:function(){const t=this;return t._h=this._init.slice(0),t._buffer=[],t._length=0,t},update:function(t){const e=this;"string"==typeof t&&(t=g.utf8String.toBits(t));const n=e._buffer=f.concat(e._buffer,t),r=e._length,a=e._length=r+f.bitLength(t);if(a>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const c=new i(n);let o=0;for(let t=e.blockSize+r-(e.blockSize+r&e.blockSize-1);a>=t;t+=e.blockSize)e._block(c.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),e},finalize:function(){const t=this;let e=t._buffer;const s=t._h;e=f.concat(e,[f.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(n.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),s},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(t,e,n,s)=>t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s,_S:(t,e)=>e<<t|e>>>32-t,_block:function(e){const s=this,r=s._h,a=t(80);for(let t=0;16>t;t++)a[t]=e[t];let i=r[0],c=r[1],o=r[2],l=r[3],h=r[4];for(let t=0;79>=t;t++){16>t||(a[t]=s._S(1,a[t-3]^a[t-8]^a[t-14]^a[t-16]));const e=s._S(5,i)+s._f(t,c,o,l)+h+a[t]+s._key[n.floor(t/20)]|0;h=l,l=o,o=s._S(30,c),c=i,i=e}r[0]=r[0]+i|0,r[1]=r[1]+c|0,r[2]=r[2]+o|0,r[3]=r[3]+l|0,r[4]=r[4]+h|0}};const y={getRandomValues(t){const e=new i(t.buffer),s=t=>{let e=987654321;const s=4294967295;return()=>(e=36969*(65535&e)+(e>>16)&s,(((e<<16)+(t=18e3*(65535&t)+(t>>16)&s)&s)/4294967296+.5)*(n.random()>.5?1:-1))};for(let r,a=0;a<t.length;a+=4){const t=s(4294967296*(r||n.random()));r=987654071*t(),e[a/4]=4294967296*t()|0}return t}},_={importKey:t=>new _.hmacSha1(g.bytes.toBits(t)),pbkdf2(t,e,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const a=1+(r>>5)<<2;let i,c,l,h,p;const d=new ArrayBuffer(a),u=new o(d);let w=0;const y=f;for(e=g.bytes.toBits(e),p=1;(a||1)>w;p++){for(i=c=t.encrypt(y.concat(e,[p])),l=1;n>l;l++)for(c=t.encrypt(c),h=0;h<c.length;h++)i[h]^=c[h];for(l=0;(a||1)>w&&l<i.length;l++)u.setInt32(w,i[l]),w+=4}return d.slice(0,r/8)},hmacSha1:class{constructor(t){const e=this,n=e._hash=w.sha1,s=[[],[]],r=n.prototype.blockSize/32;e._baseHash=[new n,new n],t.length>r&&(t=n.hash(t));for(let e=0;r>e;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}encrypt(t){if(this._updated)throw new s("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},m="Invalid pasword",b=16,k={name:"PBKDF2"},v=e.assign({hash:{name:"HMAC"}},k),z=e.assign({iterations:1e3,hash:{name:"SHA-1"}},k),C=["deriveBits"],S=[8,12,16],B=[16,24,32],I=10,D=[0,0,0,0],V=void 0!==h,H=V&&void 0!==h.subtle,K=g.bytes,A=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],r=e._tables[1],a=t.length;let i,c,o,l=1;if(4!==a&&6!==a&&8!==a)throw new s("invalid aes key size");for(e._key=[c=t.slice(0),o=[]],i=a;4*a+28>i;i++){let t=c[i-1];(i%a==0||8===a&&i%a==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],i%a==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-a]^t}for(let t=0;i;t++,i--){const e=c[3&t?i:i-4];o[t]=4>=i||4>t?e:r[0][n[e>>>24]]^r[1][n[e>>16&255]]^r[2][n[e>>8&255]]^r[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],s=e[4],r=[],a=[];let i,c,o,l;for(let t=0;256>t;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let h=i=0;!n[h];h^=c||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,s[a]=h,l=r[o=r[c=r[h]]];let p=16843009*l^65537*o^257*c^16843008*h,d=257*r[a]^16843008*a;for(let n=0;4>n;n++)t[n][h]=d=d<<24^d>>>8,e[n][a]=p=p<<24^p>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new s("invalid aes block size");const n=this._key[e],r=n.length/4-2,a=[0,0,0,0],i=this._tables[e],c=i[0],o=i[1],l=i[2],h=i[3],p=i[4];let d,u,f,g=t[0]^n[0],w=t[e?3:1]^n[1],y=t[2]^n[2],_=t[e?1:3]^n[3],m=4;for(let t=0;r>t;t++)d=c[g>>>24]^o[w>>16&255]^l[y>>8&255]^h[255&_]^n[m],u=c[w>>>24]^o[y>>16&255]^l[_>>8&255]^h[255&g]^n[m+1],f=c[y>>>24]^o[_>>16&255]^l[g>>8&255]^h[255&w]^n[m+2],_=c[_>>>24]^o[g>>16&255]^l[w>>8&255]^h[255&y]^n[m+3],m+=4,g=d,w=u,y=f;for(let t=0;4>t;t++)a[e?3&-t:t]=p[g>>>24]<<24^p[w>>16&255]<<16^p[y>>8&255]<<8^p[255&_]^n[m++],d=g,g=w,w=y,y=_,_=d;return a}},R=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let s;if(!(s=e.length))return[];const r=f.bitLength(e);for(let r=0;s>r;r+=4){this.incCounter(n);const s=t.encrypt(n);e[r]^=s[0],e[r+1]^=s[1],e[r+2]^=s[2],e[r+3]^=s[3]}return f.clamp(e,r)}},W=_.hmacSha1;class T{constructor(t,n,s){e.assign(this,{password:t,signed:n,strength:s-1,pendingInput:new r(0)})}async append(e){const n=this;if(n.password){const r=E(e,0,S[n.strength]+2);await(async(t,e,n)=>{await L(t,n,E(e,0,S[t.strength]));const r=E(e,S[t.strength]),a=t.keys.passwordVerification;if(a[0]!=r[0]||a[1]!=r[1])throw new s(m)})(n,r,n.password),n.password=null,n.aesCtrGladman=new R(new A(n.keys.key),t.from(D)),n.hmac=new W(n.keys.authentication),e=E(e,S[n.strength]+2)}return G(n,e,new r(e.length-I-(e.length-I)%b),0,I,!0)}flush(){const t=this,e=t.pendingInput,n=E(e,0,e.length-I),s=E(e,e.length-I);let a=new r(0);if(n.length){const e=K.toBits(n);t.hmac.update(e);const s=t.aesCtrGladman.update(e);a=K.fromBits(s)}let i=!0;if(t.signed){const e=E(K.fromBits(t.hmac.digest()),0,I);for(let t=0;I>t;t++)e[t]!=s[t]&&(i=!1)}return{valid:i,data:a}}}class U{constructor(t,n){e.assign(this,{password:t,strength:n-1,pendingInput:new r(0)})}async append(e){const n=this;let s=new r(0);n.password&&(s=await(async(t,e)=>{const n=(s=new r(S[t.strength]),V&&"function"==typeof h.getRandomValues?h.getRandomValues(s):y.getRandomValues(s));var s;return await L(t,e,n),P(n,t.keys.passwordVerification)})(n,n.password),n.password=null,n.aesCtrGladman=new R(new A(n.keys.key),t.from(D)),n.hmac=new W(n.keys.authentication));const a=new r(s.length+e.length-e.length%b);return a.set(s,0),G(n,e,a,s.length,0)}flush(){const t=this;let e=new r(0);if(t.pendingInput.length){const n=t.aesCtrGladman.update(K.toBits(t.pendingInput));t.hmac.update(n),e=K.fromBits(n)}const n=E(K.fromBits(t.hmac.digest()),0,I);return{data:P(e,n),signature:n}}}function G(t,e,n,s,a,i){const c=e.length-a;let o;for(t.pendingInput.length&&(e=P(t.pendingInput,e),n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new r(e)).set(n,0)}return t})(n,c-c%b)),o=0;c-b>=o;o+=b){const r=K.toBits(E(e,o,o+b));i&&t.hmac.update(r);const a=t.aesCtrGladman.update(r);i||t.hmac.update(a),n.set(K.fromBits(a),o+s)}return t.pendingInput=E(e,o),n}async function L(t,n,s){const a=(t=>{if(void 0===l){const e=new r((t=unescape(encodeURIComponent(t))).length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new l).encode(t)})(n),i=await((t,e,n,s,r)=>V&&H&&"function"==typeof h.subtle.importKey?h.subtle.importKey("raw",e,n,!1,r):_.importKey(e))(0,a,v,0,C),c=await(async(t,e,n)=>V&&H&&"function"==typeof h.subtle.deriveBits?await h.subtle.deriveBits(t,e,n):_.pbkdf2(e,t.salt,z.iterations,n))(e.assign({salt:s},z),i,8*(2*B[t.strength]+2)),o=new r(c);t.keys={key:K.toBits(E(o,0,B[t.strength])),authentication:K.toBits(E(o,B[t.strength],2*B[t.strength])),passwordVerification:E(o,2*B[t.strength])}}function P(t,e){let n=t;return t.length+e.length&&(n=new r(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function E(t,e,n){return t.subarray(e,n)}class M{constructor(t,n){e.assign(this,{password:t,passwordVerification:n}),O(this,t)}append(t){const e=this;if(e.password){const n=x(e,t.subarray(0,12));if(e.password=null,n[11]!=e.passwordVerification)throw new s(m);t=t.subarray(12)}return x(e,t)}flush(){return{valid:!0,data:new r(0)}}}class j{constructor(t,n){e.assign(this,{password:t,passwordVerification:n}),O(this,t)}append(t){const e=this;let n,s;if(e.password){e.password=null;const a=h.getRandomValues(new r(12));a[11]=e.passwordVerification,n=new r(t.length+a.length),n.set(F(e,a),0),s=12}else n=new r(t.length),s=0;return n.set(F(e,t),s),n}flush(){return{data:new r(0)}}}function x(t,e){const n=new r(e.length);for(let s=0;s<e.length;s++)n[s]=J(t)^e[s],q(t,n[s]);return n}function F(t,e){const n=new r(e.length);for(let s=0;s<e.length;s++)n[s]=J(t)^e[s],q(t,e[s]);return n}function O(t,e){t.keys=[305419896,591751049,878082192],t.crcKey0=new u(t.keys[0]),t.crcKey2=new u(t.keys[2]);for(let n=0;n<e.length;n++)q(t,e.charCodeAt(n))}function q(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=Q(t.keys[1]+N(t.keys[0])),t.keys[1]=Q(n.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function J(t){const e=2|t.keys[2];return N(n.imul(e,1^e)>>>8)}function N(t){return 255&t}function Q(t){return 4294967295&t}const X="deflate",Y="inflate",Z="Invalid signature";class ${constructor(t,{signature:n,password:s,signed:r,compressed:a,zipCrypto:i,passwordVerification:c,encryptionStrength:o},{chunkSize:l}){const h=!!s;e.assign(this,{signature:n,encrypted:h,signed:r,compressed:a,inflate:a&&new t({chunkSize:l}),crc32:r&&new u,zipCrypto:i,decrypt:h&&i?new M(s,c):new T(s,r,o)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,n=new r(0);if(t.encrypted){const e=t.decrypt.flush();if(!e.valid)throw new s(Z);n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new o(new r(4).buffer);if(e=t.crc32.get(),n.setUint32(0,e),t.signature!=n.getUint32(0,!1))throw new s(Z)}return t.compressed&&(n=await t.inflate.append(n)||new r(0),await t.inflate.flush()),{data:n,signature:e}}}class tt{constructor(t,{encrypted:n,signed:s,compressed:r,level:a,zipCrypto:i,password:c,passwordVerification:o,encryptionStrength:l},{chunkSize:h}){e.assign(this,{encrypted:n,signed:s,compressed:r,deflate:r&&new t({level:a||5,chunkSize:h}),crc32:s&&new u,zipCrypto:i,encrypt:n&&i?new j(c,o):new U(c,l)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.deflate.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),n}async flush(){const t=this;let e,n=new r(0);if(t.compressed&&(n=await t.deflate.flush()||new r(0)),t.encrypted){n=await t.encrypt.append(n);const s=t.encrypt.flush();e=s.signature;const a=new r(n.length+s.data.length);a.set(n,0),a.set(s.data,n.length),n=a}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:n,signature:e}}}const et={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith(X)?n=self.Deflate:e.codecType.startsWith(Y)&&(n=self.Inflate),nt=((t,e,n)=>e.codecType.startsWith(X)?new tt(t,e,n):e.codecType.startsWith(Y)?new $(t,e,n):void 0)(n,e,t.config)},append:async t=>({data:await nt.append(t.data)}),flush:()=>nt.flush()};let nt;function st(t,n,s){return class{constructor(a){const i=this;i.codec=new t(e.assign({},n,a)),s(i.codec,(t=>{if(i.pendingData){const e=i.pendingData;i.pendingData=new r(e.length+t.length),i.pendingData.set(e,0),i.pendingData.set(t,e.length)}else i.pendingData=new r(t)}))}append(t){return this.codec.push(t),a(this)}flush(){return this.codec.push(new r(0),!0),a(this)}};function a(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new r(0)}}addEventListener("message",(async t=>{const e=t.data,n=e.type,s=et[n];if(s)try{e.data&&(e.data=new r(e.data));const t=await s(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,p(t,[t.data])}catch(e){p(t)}else p(t)}catch(t){p({type:n,error:{message:t.message,stack:t.stack}})}})),self.initCodec=()=>{const{Deflate:t,Inflate:e}=((t,e={},n)=>({Deflate:st(t.Deflate,e.deflate,n),Inflate:st(t.Inflate,e.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((t,e)=>t.onData=e));self.Deflate=t,self.Inflate=e}}(); +!function(){"use strict";const{Array:e,Object:t,Number:n,Math:s,Error:r,Uint8Array:a,Uint16Array:o,Uint32Array:i,Int32Array:c,Map:l,DataView:u,Promise:h,TextEncoder:f,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:y,CompressionStream:m,DecompressionStream:_}=self,b=void 0,S="undefined",v="function";class k{constructor(e){return class extends g{constructor(t,n){const s=new e(n);super({transform(e,t){t.enqueue(s.append(e))},flush(e){const t=s.flush();t&&e.enqueue(t)}})}}}}const z=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;z[e]=t}class D{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^z[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class C extends g{constructor(){let e;const t=new D;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new u(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const I={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=I.getPartial(n);return 32===s?e.concat(t):I._shiftRight(t,s,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+I.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,s.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=I.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=I.getPartial(r);return s.push(I.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},A={bytes:{fromBits(e){const t=I.bitLength(e)/8,n=new a(t);let s;for(let r=0;t>r;r++)3&r||(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3&~n||(t.push(s),s=0);return 3&n&&t.push(I.partial(8*(3&n),s)),t}}},q=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=A.utf8String.toBits(e));const n=t._buffer=I.concat(t._buffer,e),s=t._length,a=t._length=s+I.bitLength(e);if(a>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+s-(t.blockSize+s&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=I.concat(t,[I.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,s){return e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,r=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let o=r[0],i=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,o)+n._f(e,i,c,l)+u+a[e]+n._key[s.floor(e/20)]|0;u=l,l=c,c=n._S(30,i),i=o,o=t}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},R={getRandomValues(e){const t=new i(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=n(4294967296*(r||s.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},H={importKey:e=>new H.hmacSha1(A.bytes.toBits(e)),pbkdf2(e,t,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const a=1+(s>>5)<<2;let o,i,c,l,h;const f=new ArrayBuffer(a),p=new u(f);let d=0;const g=I;for(t=A.bytes.toBits(t),h=1;(a||1)>d;h++){for(o=i=e.encrypt(g.concat(t,[h])),c=1;n>c;c++)for(i=e.encrypt(i),l=0;l<i.length;l++)o[l]^=i[l];for(c=0;(a||1)>d&&c<o.length;c++)p.setInt32(d,o[c]),d+=4}return f.slice(0,s/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=q,s=[[],[]];t._baseHash=[new n,new n];const r=t._baseHash[0].blockSize/32;e.length>r&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new r("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},P=typeof p!=S&&typeof p.getRandomValues==v,B="Invalid password",K="Invalid signature",T="zipjs-abort-check-password";function V(e){return P?p.getRandomValues(e):R.getRandomValues(e)}const x=16,E={name:"PBKDF2"},U=t.assign({hash:{name:"HMAC"}},E),W=t.assign({iterations:1e3,hash:{name:"SHA-1"}},E),M=["deriveBits"],N=[8,12,16],O=[16,24,32],L=10,F=[0,0,0,0],j=typeof p!=S,G=j&&p.subtle,X=j&&typeof G!=S,J=A.bytes,Q=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],s=t._tables[1],a=e.length;let o,i,c,l=1;if(4!==a&&6!==a&&8!==a)throw new r("invalid aes key size");for(t._key=[i=e.slice(0),c=[]],o=a;4*a+28>o;o++){let e=i[o-1];(o%a==0||8===a&&o%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[o]=i[o-a]^e}for(let e=0;o;e++,o--){const t=i[3&e?o:o-4];c[e]=4>=o||4>e?t:s[0][n[t>>>24]]^s[1][n[t>>16&255]]^s[2][n[t>>8&255]]^s[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],s=t[4],r=[],a=[];let o,i,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let u=o=0;!n[u];u^=i||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^255&a^99,n[u]=a,s[a]=u,l=r[c=r[i=r[u]]];let h=16843009*l^65537*c^257*i^16843008*u,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=h=h<<24^h>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new r("invalid aes block size");const n=this._key[t],s=n.length/4-2,a=[0,0,0,0],o=this._tables[t],i=o[0],c=o[1],l=o[2],u=o[3],h=o[4];let f,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;s>e;e++)f=i[g>>>24]^c[w>>16&255]^l[y>>8&255]^u[255&m]^n[_],p=i[w>>>24]^c[y>>16&255]^l[m>>8&255]^u[255&g]^n[_+1],d=i[y>>>24]^c[m>>16&255]^l[g>>8&255]^u[255&w]^n[_+2],m=i[m>>>24]^c[g>>16&255]^l[w>>8&255]^u[255&y]^n[_+3],_+=4,g=f,w=p,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=h[g>>>24]<<24^h[w>>16&255]<<16^h[y>>8&255]<<8^h[255&m]^n[_++],f=g,g=w,w=y,y=m,m=f;return a}},Y=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let s;if(!(s=t.length))return[];const r=I.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return I.clamp(t,r)}},Z=H.hmacSha1;let $=j&&X&&typeof G.importKey==v,ee=j&&X&&typeof G.deriveBits==v;class te extends g{constructor({password:e,rawPassword:n,signed:s,encryptionStrength:o,checkPasswordOnly:i}){super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:ae(e,n),signed:s,strength:o-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:o,resolveReady:c,ready:l}=n;s?(await(async(e,t,n,s)=>{const a=await re(e,t,n,ie(s,0,N[t])),o=ie(s,N[t]);if(a[0]!=o[0]||a[1]!=o[1])throw new r(B)})(n,o,s,ie(e,0,N[o]+2)),e=ie(e,N[o]+2),i?t.error(new r(T)):c()):await l;const u=new a(e.length-L-(e.length-L)%x);t.enqueue(se(n,e,u,0,L,!0))},async flush(e){const{signed:t,ctr:n,hmac:s,pending:o,ready:i}=this;if(s&&n){await i;const c=ie(o,0,o.length-L),l=ie(o,o.length-L);let u=new a;if(c.length){const e=le(J,c);s.update(e);const t=n.update(e);u=ce(J,t)}if(t){const e=ie(ce(J,s.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=l[t])throw new r(K)}e.enqueue(u)}}})}}class ne extends g{constructor({password:e,rawPassword:n,encryptionStrength:s}){let r;super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:ae(e,n),strength:s-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:r,resolveReady:o,ready:i}=n;let c=new a;s?(c=await(async(e,t,n)=>{const s=V(new a(N[t]));return oe(s,await re(e,t,n,s))})(n,r,s),o()):await i;const l=new a(c.length+e.length-e.length%x);l.set(c,0),t.enqueue(se(n,e,l,c.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:o}=this;if(n&&t){await o;let i=new a;if(s.length){const e=t.update(le(J,s));n.update(e),i=ce(J,e)}r.signature=ce(J,n.digest()).slice(0,L),e.enqueue(oe(i,r.signature))}}}),r=this}}function se(e,t,n,s,r,o){const{ctr:i,hmac:c,pending:l}=e,u=t.length-r;let h;for(l.length&&(t=oe(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,u-u%x)),h=0;u-x>=h;h+=x){const e=le(J,ie(t,h,h+x));o&&c.update(e);const r=i.update(e);o||c.update(r),n.set(ce(J,r),h+s)}return e.pending=ie(t,h),n}async function re(n,s,r,o){n.password=null;const i=await(async(e,t,n,s,r)=>{if(!$)return H.importKey(t);try{return await G.importKey("raw",t,n,!1,r)}catch(e){return $=!1,H.importKey(t)}})(0,r,U,0,M),c=await(async(e,t,n)=>{if(!ee)return H.pbkdf2(t,e.salt,W.iterations,n);try{return await G.deriveBits(e,t,n)}catch(s){return ee=!1,H.pbkdf2(t,e.salt,W.iterations,n)}})(t.assign({salt:o},W),i,8*(2*O[s]+2)),l=new a(c),u=le(J,ie(l,0,O[s])),h=le(J,ie(l,O[s],2*O[s])),f=ie(l,2*O[s]);return t.assign(n,{keys:{key:u,authentication:h,passwordVerification:f},ctr:new Y(new Q(u),e.from(F)),hmac:new Z(h)}),f}function ae(e,t){return t===b?(e=>{if(typeof f==S){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new f).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function ce(e,t){return e.fromBits(t)}function le(e,t){return e.toBits(t)}class ue extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=fe(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new r(B);e=e.subarray(12)}s?t.error(new r(T)):t.enqueue(fe(n,e))}})}}class he extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let s,r;if(n.password){n.password=null;const t=V(new a(12));t[11]=n.passwordVerification,s=new a(e.length+t.length),s.set(pe(n,t),0),r=12}else s=new a(e.length),r=0;s.set(pe(n,e),r),t.enqueue(s)}})}}function fe(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=we(e)^t[s],ge(e,n[s]);return n}function pe(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=we(e)^t[s],ge(e,t[s]);return n}function de(e,n){const s=[305419896,591751049,878082192];t.assign(e,{keys:s,crcKey0:new D(s[0]),crcKey2:new D(s[2])});for(let t=0;t<n.length;t++)ge(e,n.charCodeAt(t))}function ge(e,t){let[n,r,a]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=me(s.imul(me(r+ye(n)),134775813)+1),e.crcKey2.append([r>>>24]),a=~e.crcKey2.get(),e.keys=[n,r,a]}function we(e){const t=2|e.keys[2];return ye(s.imul(t,1^t)>>>8)}function ye(e){return 255&e}function me(e){return 4294967295&e}const _e="deflate-raw";class be extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:s}){super({});const{compressed:r,encrypted:a,useCompressionStream:o,zipCrypto:i,signed:c,level:l}=e,h=this;let f,p,d=ve(super.readable);a&&!i||!c||(f=new C,d=De(d,f)),r&&(d=ze(d,o,{level:l,chunkSize:t},s,n)),a&&(i?d=De(d,new he(e)):(p=new ne(e),d=De(d,p))),ke(h,d,(()=>{let e;a&&!i&&(e=p.signature),a&&!i||!c||(e=new u(f.value.buffer).getUint32(0)),h.signature=e}))}}class Se extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:s}){super({});const{zipCrypto:a,encrypted:o,signed:i,signature:c,compressed:l,useCompressionStream:h}=e;let f,p,d=ve(super.readable);o&&(a?d=De(d,new ue(e)):(p=new te(e),d=De(d,p))),l&&(d=ze(d,h,{chunkSize:t},s,n)),o&&!a||!i||(f=new C,d=De(d,f)),ke(this,d,(()=>{if((!o||a)&&i){const e=new u(f.value.buffer);if(c!=e.getUint32(0,!1))throw new r(K)}}))}}function ve(e){return De(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ke(e,n,s){n=De(n,new g({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}function ze(e,t,n,s,r){try{e=De(e,new(t&&s?s:r)(_e,n))}catch(s){if(!t)return e;try{e=De(e,new r(_e,n))}catch(t){return e}}return e}function De(e,t){return e.pipeThrough(t)}const Ce="data",Ie="close";class Ae extends g{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=be:r.startsWith("inflate")&&(a=Se);let o=0,i=0;const c=new a(e,n),l=super.readable,u=new g({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){t.assign(s,{inputSize:i})}}),h=new g({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(s,{signature:e,outputSize:o,inputSize:i})}});t.defineProperty(s,"readable",{get:()=>l.pipeThrough(u).pipeThrough(c).pipeThrough(h)})}}class qe extends g{constructor(e){let t;super({transform:function n(s,r){if(t){const e=new a(t.length+s.length);e.set(t),e.set(s,t.length),s=e,t=null}s.length>e?(r.enqueue(s.slice(0,e)),n(s.slice(e),r)):t=s},flush(e){t&&t.length&&e.enqueue(t)}})}}const Re=new l,He=new l;let Pe,Be=0,Ke=!0;async function Te(e){try{const{options:t,scripts:s,config:r}=e;if(s&&s.length)try{Ke?importScripts.apply(b,s):await Ve(s)}catch(e){Ke=!1,await Ve(s)}self.initCodec&&self.initCodec(),r.CompressionStreamNative=self.CompressionStream,r.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(r.CompressionStream=new k(self.Deflate)),self.Inflate&&(r.DecompressionStream=new k(self.Inflate));const a={highWaterMark:1},o=e.readable||new w({async pull(e){const t=new h((e=>Re.set(Be,e)));xe({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await t;e.enqueue(s),r&&e.close()}},a),i=e.writable||new y({async write(e){let t;const s=new h((e=>t=e));He.set(Be,t),xe({type:Ce,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await s}},a),c=new Ae(t,r);Pe=new AbortController;const{signal:l}=Pe;await o.pipeThrough(c).pipeThrough(new qe(r.chunkSize)).pipeTo(i,{signal:l,preventClose:!0,preventAbort:!0}),await i.getWriter().close();const{signature:u,inputSize:f,outputSize:p}=c;xe({type:Ie,result:{signature:u,inputSize:f,outputSize:p}})}catch(e){Ee(e)}}async function Ve(e){for(const t of e)await import(t)}function xe(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ee(e=new r("Unknown error")){const{message:t,stack:n,code:s,name:a}=e;d({error:{message:t,stack:n,code:s,name:a}})}function Ue(e,n,s){return class{constructor(r){const o=this;var i,c;i=r,c="level",(typeof t.hasOwn===v?t.hasOwn(i,c):i.hasOwnProperty(c))&&r.level===b&&delete r.level,o.codec=new e(t.assign({},n,r)),s(o.codec,(e=>{if(o.pendingData){const t=o.pendingData;o.pendingData=new a(t.length+e.length);const{pendingData:n}=o;n.set(t,0),n.set(e,t.length)}else o.pendingData=new a(e)}))}append(e){return this.codec.push(e),r(this)}flush(){return this.codec.push(new a,!0),r(this)}};function r(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:s,done:r}=e;try{if("start"==t&&Te(e),t==Ce){const e=Re.get(n);Re.delete(n),e({value:new a(s),done:r})}if("ack"==t){const e=He.get(n);He.delete(n),e()}t==Ie&&Pe.abort()}catch(e){Ee(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Ue(e.Deflate,t.deflate,n),Inflate:Ue(e.Inflate,t.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((e,t)=>e.onData=t));self.Deflate=e,self.Inflate=t}}(); diff --git a/assets/cesium/ThirdParty/draco_decoder.wasm b/assets/cesium/ThirdParty/draco_decoder.wasm index e5a5e06eb..4138f5590 100644 Binary files a/assets/cesium/ThirdParty/draco_decoder.wasm and b/assets/cesium/ThirdParty/draco_decoder.wasm differ diff --git a/assets/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css b/assets/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css new file mode 100644 index 000000000..96d6e4432 --- /dev/null +++ b/assets/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css @@ -0,0 +1,31 @@ +.cesium-viewer-i3s-explorer ul { + list-style-type: none; +} + +.cesium-viewer-i3s-explorer .layersList { + padding: 0; +} + +.cesium-viewer-i3s-explorer input { + margin: 0 3px 0 0; +} +.cesium-viewer-i3s-explorer .expandItem { + cursor: pointer; + user-select: none; + width: 20px; +} + +.cesium-viewer-i3s-explorer .nested, +.cesium-viewer-i3s-explorer #bsl-wrapper { + display: none; +} + +.cesium-viewer-i3s-explorer .active { + display: block; +} + +.cesium-viewer-i3s-explorer .li-wrapper { + display: flex; + flex-direction: row; + align-content: center; +} diff --git a/assets/cesium/Widgets/widgets.css b/assets/cesium/Widgets/widgets.css index 773ddb8e9..585334ae3 100644 --- a/assets/cesium/Widgets/widgets.css +++ b/assets/cesium/Widgets/widgets.css @@ -16,3 +16,4 @@ @import url(./SelectionIndicator/SelectionIndicator.css); @import url(./Timeline/Timeline.css); @import url(./Viewer/Viewer.css); +@import url(./I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css); diff --git a/assets/cesium/Workers/chunk-2GWOHAWL.js b/assets/cesium/Workers/chunk-2GWOHAWL.js deleted file mode 100644 index da782cf87..000000000 --- a/assets/cesium/Workers/chunk-2GWOHAWL.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 - * - * 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 { - defaultValue_default -} from "./chunk-N73NY3KY.js"; -import { - DeveloperError_default -} from "./chunk-WYMW5NZB.js"; -import { - defined_default -} from "./chunk-FMN2NHBU.js"; - -// packages/engine/Source/Core/oneTimeWarning.js -var warnings = {}; -function oneTimeWarning(identifier, message) { - if (!defined_default(identifier)) { - throw new DeveloperError_default("identifier is required."); - } - if (!defined_default(warnings[identifier])) { - warnings[identifier] = true; - console.warn(defaultValue_default(message, identifier)); - } -} -oneTimeWarning.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."; -oneTimeWarning.geometryZIndex = "Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored"; -oneTimeWarning.geometryHeightReference = "Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored"; -oneTimeWarning.geometryExtrudedHeightReference = "Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored"; -var oneTimeWarning_default = oneTimeWarning; - -export { - oneTimeWarning_default -}; diff --git a/assets/cesium/Workers/chunk-UJ76JVUZ.js b/assets/cesium/Workers/chunk-2J3JKXCP.js similarity index 98% rename from assets/cesium/Workers/chunk-UJ76JVUZ.js rename to assets/cesium/Workers/chunk-2J3JKXCP.js index a9ade144e..d1778e259 100644 --- a/assets/cesium/Workers/chunk-UJ76JVUZ.js +++ b/assets/cesium/Workers/chunk-2J3JKXCP.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,16 +25,16 @@ import { WebGLConstants_default -} from "./chunk-XNRYWRVT.js"; +} from "./chunk-OOK53QUQ.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/ComponentDatatype.js var ComponentDatatype = { diff --git a/assets/cesium/Workers/chunk-ICD3BWBC.js b/assets/cesium/Workers/chunk-3WUV74WM.js similarity index 92% rename from assets/cesium/Workers/chunk-ICD3BWBC.js rename to assets/cesium/Workers/chunk-3WUV74WM.js index 770e03bea..40bce011c 100644 --- a/assets/cesium/Workers/chunk-ICD3BWBC.js +++ b/assets/cesium/Workers/chunk-3WUV74WM.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -26,7 +26,7 @@ import { __commonJS, __require -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // node_modules/draco3d/draco_decoder_nodejs.js var require_draco_decoder_nodejs = __commonJS({ @@ -57,15 +57,13 @@ var require_draco_decoder_nodejs = __commonJS({ k = ["object" == typeof globalThis && globalThis, k, "object" == typeof window && window, "object" == typeof self && self, "object" == typeof global && global]; for (var n = 0; n < k.length; ++n) { var l = k[n]; - if (l && l.Math == Math) - return l; + if (l && l.Math == Math) return l; } throw Error("Cannot find global object"); }; $jscomp.global = $jscomp.getGlobal(exports); $jscomp.defineProperty = $jscomp.ASSUME_ES5 || "function" == typeof Object.defineProperties ? Object.defineProperty : function(k, n, l) { - if (k == Array.prototype || k == Object.prototype) - return k; + if (k == Array.prototype || k == Object.prototype) return k; k[n] = l.value; return k; }; @@ -82,8 +80,7 @@ var require_draco_decoder_nodejs = __commonJS({ k = k.split("."); for (p = 0; p < k.length - 1; p++) { var h = k[p]; - if (!(h in l)) - return; + if (!(h in l)) return; l = l[h]; } k = k[k.length - 1]; @@ -98,8 +95,7 @@ var require_draco_decoder_nodejs = __commonJS({ p = !k && p in $jscomp.polyfills ? $jscomp.polyfills : $jscomp.global; for (var A = 0; A < h.length - 1; A++) { var f = h[A]; - if (!(f in p)) - return; + if (!(f in p)) return; p = p[f]; } h = h[h.length - 1]; @@ -116,8 +112,7 @@ var require_draco_decoder_nodejs = __commonJS({ q(f); }); } - if (k && (!($jscomp.FORCE_POLYFILL_PROMISE || $jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION && "undefined" === typeof $jscomp.global.PromiseRejectionEvent) || !$jscomp.global.Promise || -1 === $jscomp.global.Promise.toString().indexOf("[native code]"))) - return k; + if (k && (!($jscomp.FORCE_POLYFILL_PROMISE || $jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION && "undefined" === typeof $jscomp.global.PromiseRejectionEvent) || !$jscomp.global.Promise || -1 === $jscomp.global.Promise.toString().indexOf("[native code]"))) return k; n.prototype.asyncExecute = function(f) { if (null == this.batch_) { this.batch_ = []; @@ -175,22 +170,19 @@ var require_draco_decoder_nodejs = __commonJS({ return { resolve: f(this.resolveTo_), reject: f(this.reject_) }; }; h.prototype.resolveTo_ = function(f) { - if (f === this) - this.reject_(new TypeError("A Promise cannot resolve to itself")); - else if (f instanceof h) - this.settleSameAsPromise_(f); + if (f === this) this.reject_(new TypeError("A Promise cannot resolve to itself")); + else if (f instanceof h) this.settleSameAsPromise_(f); else { - a: - switch (typeof f) { - case "object": - var q = null != f; - break a; - case "function": - q = true; - break a; - default: - q = false; - } + a: switch (typeof f) { + case "object": + var q = null != f; + break a; + case "function": + q = true; + break a; + default: + q = false; + } q ? this.resolveToNonPromiseObj_(f) : this.fulfill_(f); } }; @@ -211,8 +203,7 @@ var require_draco_decoder_nodejs = __commonJS({ this.settle_(1, f); }; h.prototype.settle_ = function(f, q) { - if (0 != this.state_) - throw Error("Cannot settle(" + f + ", " + q + "): Promise already settled in state" + this.state_); + if (0 != this.state_) throw Error("Cannot settle(" + f + ", " + q + "): Promise already settled in state" + this.state_); this.state_ = f; this.result_ = q; 2 === this.state_ && this.scheduleUnhandledRejectionCheck_(); @@ -228,11 +219,9 @@ var require_draco_decoder_nodejs = __commonJS({ }, 1); }; h.prototype.notifyUnhandledRejection_ = function() { - if (this.isRejectionHandled_) - return false; + if (this.isRejectionHandled_) return false; var f = $jscomp.global.CustomEvent, q = $jscomp.global.Event, v = $jscomp.global.dispatchEvent; - if ("undefined" === typeof v) - return true; + if ("undefined" === typeof v) return true; "function" === typeof f ? f = new f("unhandledrejection", { cancelable: true }) : "function" === typeof q ? f = new q("unhandledrejection", { cancelable: true }) : (f = $jscomp.global.document.createEvent("CustomEvent"), f.initCustomEvent("unhandledrejection", false, true, f)); f.promise = this; f.reason = this.result_; @@ -240,8 +229,7 @@ var require_draco_decoder_nodejs = __commonJS({ }; h.prototype.executeOnSettledCallbacks_ = function() { if (null != this.onSettledCallbacks_) { - for (var f = 0; f < this.onSettledCallbacks_.length; ++f) - A.asyncExecute(this.onSettledCallbacks_[f]); + for (var f = 0; f < this.onSettledCallbacks_.length; ++f) A.asyncExecute(this.onSettledCallbacks_[f]); this.onSettledCallbacks_ = null; } }; @@ -303,8 +291,7 @@ var require_draco_decoder_nodejs = __commonJS({ }; h.race = function(f) { return new h(function(q, v) { - for (var z = $jscomp.makeIterator(f), O = z.next(); !O.done; O = z.next()) - l(O.value).callWhenSettled_(q, v); + for (var z = $jscomp.makeIterator(f), O = z.next(); !O.done; O = z.next()) l(O.value).callWhenSettled_(q, v); }); }; h.all = function(f) { @@ -331,9 +318,7 @@ var require_draco_decoder_nodejs = __commonJS({ $jscomp.assign = $jscomp.TRUST_ES6_POLYFILLS && "function" == typeof Object.assign ? Object.assign : function(k, n) { for (var l = 1; l < arguments.length; l++) { var p = arguments[l]; - if (p) - for (var h in p) - $jscomp.owns(p, h) && (k[h] = p[h]); + if (p) for (var h in p) $jscomp.owns(p, h) && (k[h] = p[h]); } return k; }; @@ -341,10 +326,8 @@ var require_draco_decoder_nodejs = __commonJS({ return k || $jscomp.assign; }, "es6", "es3"); $jscomp.checkStringArgs = function(k, n, l) { - if (null == k) - throw new TypeError("The 'this' value for String.prototype." + l + " must not be null or undefined"); - if (n instanceof RegExp) - throw new TypeError("First argument to String.prototype." + l + " must not be a regular expression"); + if (null == k) throw new TypeError("The 'this' value for String.prototype." + l + " must not be null or undefined"); + if (n instanceof RegExp) throw new TypeError("First argument to String.prototype." + l + " must not be a regular expression"); return k + ""; }; $jscomp.polyfill("String.prototype.startsWith", function(k) { @@ -353,9 +336,7 @@ var require_draco_decoder_nodejs = __commonJS({ n += ""; var h = p.length, A = n.length; l = Math.max(0, Math.min(l | 0, p.length)); - for (var f = 0; f < A && l < h; ) - if (p[l++] != n[f++]) - return false; + for (var f = 0; f < A && l < h; ) if (p[l++] != n[f++]) return false; return f >= A; }; }, "es6", "es3"); @@ -372,12 +353,8 @@ var require_draco_decoder_nodejs = __commonJS({ l = 0 > l ? Math.max(A + l, 0) : Math.min(l, A); p = 0 > p ? Math.max(A + p, 0) : Math.min(p, A); h = 0 > h ? Math.max(A + h, 0) : Math.min(h, A); - if (l < p) - for (; p < h; ) - p in this ? this[l++] = this[p++] : (delete this[l++], p++); - else - for (h = Math.min(h, A + p - l), l += h - p; h > p; ) - --h in this ? this[--l] = this[h] : delete this[--l]; + if (l < p) for (; p < h; ) p in this ? this[l++] = this[p++] : (delete this[l++], p++); + else for (h = Math.min(h, A + p - l), l += h - p; h > p; ) --h in this ? this[--l] = this[h] : delete this[--l]; return this; }; }, "es6", "es3"); @@ -402,23 +379,19 @@ var require_draco_decoder_nodejs = __commonJS({ } function p(e, b, c) { var d = b + c; - for (c = b; e[c] && !(c >= d); ) - ++c; - if (16 < c - b && e.buffer && va) - return va.decode(e.subarray(b, c)); + for (c = b; e[c] && !(c >= d); ) ++c; + if (16 < c - b && e.buffer && va) return va.decode(e.subarray(b, c)); for (d = ""; b < c; ) { var g = e[b++]; if (g & 128) { var u = e[b++] & 63; - if (192 == (g & 224)) - d += String.fromCharCode((g & 31) << 6 | u); + if (192 == (g & 224)) d += String.fromCharCode((g & 31) << 6 | u); else { var X = e[b++] & 63; g = 224 == (g & 240) ? (g & 15) << 12 | u << 6 | X : (g & 7) << 18 | u << 12 | X << 6 | e[b++] & 63; 65536 > g ? d += String.fromCharCode(g) : (g -= 65536, d += String.fromCharCode(55296 | g >> 10, 56320 | g & 1023)); } - } else - d += String.fromCharCode(g); + } else d += String.fromCharCode(g); } return d; } @@ -437,8 +410,7 @@ var require_draco_decoder_nodejs = __commonJS({ a.HEAPF64 = new Float64Array(e); } function f(e) { - if (a.onAbort) - a.onAbort(e); + if (a.onAbort) a.onAbort(e); e = "Aborted(" + e + ")"; da(e); wa = true; @@ -448,10 +420,8 @@ var require_draco_decoder_nodejs = __commonJS({ } function q(e) { try { - if (e == P && fa) - return new Uint8Array(fa); - if (ma) - return ma(e); + if (e == P && fa) return new Uint8Array(fa); + if (ma) return ma(e); throw "both async and sync fetching of the wasm failed"; } catch (b) { f(b); @@ -459,28 +429,24 @@ var require_draco_decoder_nodejs = __commonJS({ } function v() { if (!fa && (xa || ha)) { - if ("function" == typeof fetch && !P.startsWith("file://")) - return fetch(P, { credentials: "same-origin" }).then(function(e) { - if (!e.ok) - throw "failed to load wasm binary file at '" + P + "'"; - return e.arrayBuffer(); - }).catch(function() { - return q(P); - }); - if (na) - return new Promise(function(e, b) { - na(P, function(c) { - e(new Uint8Array(c)); - }, b); - }); + if ("function" == typeof fetch && !P.startsWith("file://")) return fetch(P, { credentials: "same-origin" }).then(function(e) { + if (!e.ok) throw "failed to load wasm binary file at '" + P + "'"; + return e.arrayBuffer(); + }).catch(function() { + return q(P); + }); + if (na) return new Promise(function(e, b) { + na(P, function(c) { + e(new Uint8Array(c)); + }, b); + }); } return Promise.resolve().then(function() { return q(P); }); } function z(e) { - for (; 0 < e.length; ) - e.shift()(a); + for (; 0 < e.length; ) e.shift()(a); } function O(e) { this.excPtr = e; @@ -535,8 +501,7 @@ var require_draco_decoder_nodejs = __commonJS({ return V[this.ptr + 16 >> 2]; }; this.get_exception_ptr = function() { - if (ya(this.get_type())) - return V[this.excPtr >> 2]; + if (ya(this.get_type())) return V[this.excPtr >> 2]; var b = this.get_adjusted_ptr(); return 0 !== b ? b : this.excPtr; }; @@ -547,18 +512,13 @@ var require_draco_decoder_nodejs = __commonJS({ za = true; z(oa); Aa(a); - if (a.onRuntimeInitialized) - a.onRuntimeInitialized(); - if (a.postRun) - for ("function" == typeof a.postRun && (a.postRun = [a.postRun]); a.postRun.length; ) - Ba.unshift(a.postRun.shift()); + if (a.onRuntimeInitialized) a.onRuntimeInitialized(); + if (a.postRun) for ("function" == typeof a.postRun && (a.postRun = [a.postRun]); a.postRun.length; ) Ba.unshift(a.postRun.shift()); z(Ba); } } if (!(0 < aa)) { - if (a.preRun) - for ("function" == typeof a.preRun && (a.preRun = [a.preRun]); a.preRun.length; ) - Ca.unshift(a.preRun.shift()); + if (a.preRun) for ("function" == typeof a.preRun && (a.preRun = [a.preRun]); a.preRun.length; ) Ca.unshift(a.preRun.shift()); z(Ca); 0 < aa || (a.setStatus ? (a.setStatus("Running..."), setTimeout(function() { setTimeout(function() { @@ -575,8 +535,7 @@ var require_draco_decoder_nodejs = __commonJS({ } function D(e, b) { var c = x(b), d = c[e]; - if (d) - return d; + if (d) return d; d = Object.create((b || t).prototype); d.ptr = e; return c[e] = d; @@ -599,22 +558,18 @@ var require_draco_decoder_nodejs = __commonJS({ u = 65536 + ((u & 1023) << 10) | X & 1023; } if (127 >= u) { - if (c >= d) - break; + if (c >= d) break; b[c++] = u; } else { if (2047 >= u) { - if (c + 1 >= d) - break; + if (c + 1 >= d) break; b[c++] = 192 | u >> 6; } else { if (65535 >= u) { - if (c + 2 >= d) - break; + if (c + 2 >= d) break; b[c++] = 224 | u >> 12; } else { - if (c + 3 >= d) - break; + if (c + 3 >= d) break; b[c++] = 240 | u >> 18; b[c++] = 128 | u >> 12 & 63; } @@ -726,17 +681,14 @@ var require_draco_decoder_nodejs = __commonJS({ var Va = false, Wa = false; a.onRuntimeInitialized = function() { Va = true; - if (Wa && "function" === typeof a.onModuleLoaded) - a.onModuleLoaded(a); + if (Wa && "function" === typeof a.onModuleLoaded) a.onModuleLoaded(a); }; a.onModuleParsed = function() { Wa = true; - if (Va && "function" === typeof a.onModuleLoaded) - a.onModuleLoaded(a); + if (Va && "function" === typeof a.onModuleLoaded) a.onModuleLoaded(a); }; a.isVersionSupported = function(e) { - if ("string" !== typeof e) - return false; + if ("string" !== typeof e) return false; e = e.split("."); return 2 > e.length || 3 < e.length ? false : 1 == e[0] && 0 <= e[1] && 5 >= e[1] ? true : 0 != e[0] || 10 < e[1] ? false : true; }; @@ -764,28 +716,27 @@ var require_draco_decoder_nodejs = __commonJS({ a.inspect = function() { return "[Emscripten Module object]"; }; - } else if (xa || ha) - ha ? U = self.location.href : "undefined" != typeof document && document.currentScript && (U = document.currentScript.src), k && (U = k), U = 0 !== U.indexOf("blob:") ? U.substr(0, U.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", $a = function(e) { - var b = new XMLHttpRequest(); - b.open("GET", e, false); - b.send(null); - return b.responseText; - }, ha && (ma = function(e) { - var b = new XMLHttpRequest(); - b.open("GET", e, false); - b.responseType = "arraybuffer"; - b.send(null); - return new Uint8Array(b.response); - }), na = function(e, b, c) { - var d = new XMLHttpRequest(); - d.open("GET", e, true); - d.responseType = "arraybuffer"; - d.onload = function() { - 200 == d.status || 0 == d.status && d.response ? b(d.response) : c(); - }; - d.onerror = c; - d.send(null); + } else if (xa || ha) ha ? U = self.location.href : "undefined" != typeof document && document.currentScript && (U = document.currentScript.src), k && (U = k), U = 0 !== U.indexOf("blob:") ? U.substr(0, U.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", $a = function(e) { + var b = new XMLHttpRequest(); + b.open("GET", e, false); + b.send(null); + return b.responseText; + }, ha && (ma = function(e) { + var b = new XMLHttpRequest(); + b.open("GET", e, false); + b.responseType = "arraybuffer"; + b.send(null); + return new Uint8Array(b.response); + }), na = function(e, b, c) { + var d = new XMLHttpRequest(); + d.open("GET", e, true); + d.responseType = "arraybuffer"; + d.onload = function() { + 200 == d.status || 0 == d.status && d.response ? b(d.response) : c(); }; + d.onerror = c; + d.send(null); + }; var ud = a.print || console.log.bind(console), da = a.printErr || console.warn.bind(console); Object.assign(a, Xa); Xa = null; @@ -806,8 +757,7 @@ var require_draco_decoder_nodejs = __commonJS({ }, e: function(e) { var b = ea.length; e >>>= 0; - if (2147483648 < e) - return false; + if (2147483648 < e) return false; for (var c = 1; 4 >= c; c *= 2) { var d = b * (1 + 0.2 / c); d = Math.min(d, e + 100663296); @@ -825,8 +775,7 @@ var require_draco_decoder_nodejs = __commonJS({ } u = void 0; } - if (u) - return true; + if (u) return true; } return false; }, f: function(e) { @@ -872,12 +821,11 @@ var require_draco_decoder_nodejs = __commonJS({ var d = { a: xd }; aa++; a.monitorRunDependencies && a.monitorRunDependencies(aa); - if (a.instantiateWasm) - try { - return a.instantiateWasm(d, e); - } catch (g) { - da("Module.instantiateWasm callback failed with error: " + g), ka(g); - } + if (a.instantiateWasm) try { + return a.instantiateWasm(d, e); + } catch (g) { + da("Module.instantiateWasm callback failed with error: " + g), ka(g); + } (function() { return fa || "function" != typeof WebAssembly.instantiateStreaming || P.startsWith("data:application/octet-stream;base64,") || P.startsWith("file://") || Ya || "function" != typeof fetch ? c(b) : fetch(P, { credentials: "same-origin" }).then(function(g) { return WebAssembly.instantiateStreaming(g, d).then(b, function(u) { @@ -1201,9 +1149,7 @@ var require_draco_decoder_nodejs = __commonJS({ la || ba(); la || (ia = b); }; - if (a.preInit) - for ("function" == typeof a.preInit && (a.preInit = [a.preInit]); 0 < a.preInit.length; ) - a.preInit.pop()(); + if (a.preInit) for ("function" == typeof a.preInit && (a.preInit = [a.preInit]); 0 < a.preInit.length; ) a.preInit.pop()(); ba(); t.prototype = Object.create(t.prototype); t.prototype.constructor = t; @@ -1217,8 +1163,7 @@ var require_draco_decoder_nodejs = __commonJS({ }; a.NULL = D(0); a.destroy = function(b) { - if (!b.__destroy__) - throw "Error: Cannot destroy object. (Did you create it yourself?)"; + if (!b.__destroy__) throw "Error: Cannot destroy object. (Did you create it yourself?)"; b.__destroy__(); delete x(b.__class__)[b.ptr]; }; @@ -1233,8 +1178,7 @@ var require_draco_decoder_nodejs = __commonJS({ }; var r = { buffer: 0, size: 0, pos: 0, temps: [], needed: 0, prepare: function() { if (r.needed) { - for (var b = 0; b < r.temps.length; b++) - a._free(r.temps[b]); + for (var b = 0; b < r.temps.length; b++) a._free(r.temps[b]); r.temps.length = 0; a._free(r.buffer); r.buffer = 0; @@ -1261,8 +1205,7 @@ var require_draco_decoder_nodejs = __commonJS({ case 8: d >>>= 3; } - for (var g = 0; g < b.length; g++) - c[d + g] = b[g]; + for (var g = 0; g < b.length; g++) c[d + g] = b[g]; } }; Z.prototype = Object.create(t.prototype); Z.prototype.constructor = Z; @@ -1830,13 +1773,10 @@ var require_draco_decoder_nodejs = __commonJS({ } za ? b() : oa.unshift(b); })(); - if ("function" === typeof a.onModuleParsed) - a.onModuleParsed(); + if ("function" === typeof a.onModuleParsed) a.onModuleParsed(); a.Decoder.prototype.GetEncodedGeometryType = function(b) { - if (b.__class__ && b.__class__ === a.DecoderBuffer) - return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(b); - if (8 > b.byteLength) - return a.INVALID_GEOMETRY_TYPE; + if (b.__class__ && b.__class__ === a.DecoderBuffer) return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(b); + if (8 > b.byteLength) return a.INVALID_GEOMETRY_TYPE; switch (b[7]) { case 0: return a.POINT_CLOUD; diff --git a/assets/cesium/Workers/chunk-PNAD2XAN.js b/assets/cesium/Workers/chunk-4BAE4PWO.js similarity index 96% rename from assets/cesium/Workers/chunk-PNAD2XAN.js rename to assets/cesium/Workers/chunk-4BAE4PWO.js index fa587bd5d..0ebbeef4f 100644 --- a/assets/cesium/Workers/chunk-PNAD2XAN.js +++ b/assets/cesium/Workers/chunk-4BAE4PWO.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -26,20 +26,20 @@ import { Cartesian4_default, Matrix4_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/Plane.js function Plane(normal, distance) { diff --git a/assets/cesium/Workers/chunk-IDAL54EF.js b/assets/cesium/Workers/chunk-4MSUJ4I7.js similarity index 98% rename from assets/cesium/Workers/chunk-IDAL54EF.js rename to assets/cesium/Workers/chunk-4MSUJ4I7.js index e46147347..19f72a515 100644 --- a/assets/cesium/Workers/chunk-IDAL54EF.js +++ b/assets/cesium/Workers/chunk-4MSUJ4I7.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -27,20 +27,20 @@ import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/EllipsoidRhumbLine.js function calculateM(ellipticity, major, latitude) { @@ -234,7 +234,7 @@ function interpolateUsingSurfaceDistance(start, heading, distance, major, ellipt return new Cartographic_default(longitude, latitude, 0); } function EllipsoidRhumbLine(start, end, ellipsoid) { - const e = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); + const e = defaultValue_default(ellipsoid, Ellipsoid_default.default); this._ellipsoid = e; this._start = new Cartographic_default(); this._end = new Cartographic_default(); @@ -310,7 +310,7 @@ EllipsoidRhumbLine.fromStartHeadingDistance = function(start, heading, distance, Check_default.defined("heading", heading); Check_default.defined("distance", distance); Check_default.typeOf.number.greaterThan("distance", distance, 0); - const e = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); + const e = defaultValue_default(ellipsoid, Ellipsoid_default.default); const major = e.maximumRadius; const minor = e.minimumRadius; const majorSquared = major * major; diff --git a/assets/cesium/Workers/chunk-TDVU7NH7.js b/assets/cesium/Workers/chunk-4YSNMHZ4.js similarity index 99% rename from assets/cesium/Workers/chunk-TDVU7NH7.js rename to assets/cesium/Workers/chunk-4YSNMHZ4.js index be72533cc..a68f108e9 100644 --- a/assets/cesium/Workers/chunk-TDVU7NH7.js +++ b/assets/cesium/Workers/chunk-4YSNMHZ4.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,19 +25,19 @@ import { FeatureDetection_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/Color.js function hue2rgb(m1, m2, h) { diff --git a/assets/cesium/Workers/chunk-6LG4PY2M.js b/assets/cesium/Workers/chunk-5S7OLEPK.js similarity index 97% rename from assets/cesium/Workers/chunk-6LG4PY2M.js rename to assets/cesium/Workers/chunk-5S7OLEPK.js index df570542e..a75c091f8 100644 --- a/assets/cesium/Workers/chunk-6LG4PY2M.js +++ b/assets/cesium/Workers/chunk-5S7OLEPK.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,40 +25,40 @@ import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/EllipsoidOutlineGeometry.js var defaultRadii = new Cartesian3_default(1, 1, 1); diff --git a/assets/cesium/Workers/chunk-JY6WB2NK.js b/assets/cesium/Workers/chunk-7XGC6YB2.js similarity index 97% rename from assets/cesium/Workers/chunk-JY6WB2NK.js rename to assets/cesium/Workers/chunk-7XGC6YB2.js index b2dfe5e2b..5ed40a32f 100644 --- a/assets/cesium/Workers/chunk-JY6WB2NK.js +++ b/assets/cesium/Workers/chunk-7XGC6YB2.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,43 +25,43 @@ import { EllipseGeometryLibrary_default -} from "./chunk-AEADHPUM.js"; +} from "./chunk-NTXTUNEF.js"; import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/EllipseOutlineGeometry.js var scratchCartesian1 = new Cartesian3_default(); @@ -213,7 +213,7 @@ function computeExtrudedEllipse(options) { function EllipseOutlineGeometry(options) { options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT); const center = options.center; - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); const semiMajorAxis = options.semiMajorAxis; const semiMinorAxis = options.semiMinorAxis; const granularity = defaultValue_default( diff --git a/assets/cesium/Workers/chunk-FMN2NHBU.js b/assets/cesium/Workers/chunk-AA4GZKOT.js similarity index 95% rename from assets/cesium/Workers/chunk-FMN2NHBU.js rename to assets/cesium/Workers/chunk-AA4GZKOT.js index e9078d83f..478d64fe7 100644 --- a/assets/cesium/Workers/chunk-FMN2NHBU.js +++ b/assets/cesium/Workers/chunk-AA4GZKOT.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -32,14 +32,12 @@ var __hasOwnProp = Object.prototype.hasOwnProperty; var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) { - if (typeof require !== "undefined") - return require.apply(this, arguments); + if (typeof require !== "undefined") return require.apply(this, arguments); throw Error('Dynamic require of "' + x + '" is not supported'); }); var __glob = (map) => (path) => { var fn = map[path]; - if (fn) - return fn(); + if (fn) return fn(); throw new Error("Module not found in bundle: " + path); }; var __commonJS = (cb, mod) => function __require2() { diff --git a/assets/cesium/Workers/chunk-CHGQXPF3.js b/assets/cesium/Workers/chunk-AD5HBJ2F.js similarity index 95% rename from assets/cesium/Workers/chunk-CHGQXPF3.js rename to assets/cesium/Workers/chunk-AD5HBJ2F.js index af41f5385..cfc3764d7 100644 --- a/assets/cesium/Workers/chunk-CHGQXPF3.js +++ b/assets/cesium/Workers/chunk-AD5HBJ2F.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,24 +25,25 @@ import { GeographicProjection_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { Matrix2_default, Rectangle_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { Cartesian3_default, - Cartographic_default -} from "./chunk-54GSYZWT.js"; + Cartographic_default, + Ellipsoid_default +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/RectangleGeometryLibrary.js var cos = Math.cos; @@ -91,6 +92,7 @@ function getRotationOptions(nwCorner, rotation, granularityX, granularityY, cent const sinRotation = Math.sin(rotation); const granYSin = granularityY * sinRotation; const granXSin = granularityX * sinRotation; + proj._ellipsoid = Ellipsoid_default.default; nwCartesian = proj.project(nwCorner, nwCartesian); nwCartesian = Cartesian3_default.subtract(nwCartesian, centerCartesian, nwCartesian); const rotationMatrix = Matrix2_default.fromRotation(rotation, rotationMatrixScratch); @@ -157,6 +159,7 @@ RectangleGeometryLibrary.computeOptions = function(rectangle, granularity, rotat if (center.longitude < nwCorner.longitude) { center.longitude += Math_default.TWO_PI; } + proj._ellipsoid = Ellipsoid_default.default; centerCartesian = proj.project(center, centerCartesian); } const granYCos = granularityY; diff --git a/assets/cesium/Workers/chunk-P2BTKBVY.js b/assets/cesium/Workers/chunk-AVI4IUWC.js similarity index 99% rename from assets/cesium/Workers/chunk-P2BTKBVY.js rename to assets/cesium/Workers/chunk-AVI4IUWC.js index da6c7e4b6..a52a44442 100644 --- a/assets/cesium/Workers/chunk-P2BTKBVY.js +++ b/assets/cesium/Workers/chunk-AVI4IUWC.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,39 +25,39 @@ import { EllipsoidTangentPlane_default -} from "./chunk-AI2FOC47.js"; +} from "./chunk-SYCPRK3D.js"; import { Plane_default -} from "./chunk-PNAD2XAN.js"; +} from "./chunk-4BAE4PWO.js"; import { BoundingSphere_default, Intersect_default, Interval_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default, Matrix4_default, Rectangle_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { + Cartesian2_default, Cartesian3_default, Cartographic_default, Ellipsoid_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/OrientedBoundingBox.js function OrientedBoundingBox(center, halfAxes) { @@ -259,7 +259,7 @@ OrientedBoundingBox.fromRectangle = function(rectangle, minimumHeight, maximumHe } minimumHeight = defaultValue_default(minimumHeight, 0); maximumHeight = defaultValue_default(maximumHeight, 0); - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); let minX, maxX, minY, maxY, minZ, maxZ, plane; if (rectangle.width <= Math_default.PI) { const tangentPointCartographic = Rectangle_default.center( diff --git a/assets/cesium/Workers/chunk-KFCTEEBD.js b/assets/cesium/Workers/chunk-BCL4PHHT.js similarity index 95% rename from assets/cesium/Workers/chunk-KFCTEEBD.js rename to assets/cesium/Workers/chunk-BCL4PHHT.js index 5ac42459b..1ecea8a28 100644 --- a/assets/cesium/Workers/chunk-KFCTEEBD.js +++ b/assets/cesium/Workers/chunk-BCL4PHHT.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,34 +25,36 @@ import { AttributeCompression_default -} from "./chunk-4EXWKTY2.js"; +} from "./chunk-OORVMGDU.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default, Matrix4_default, Rectangle_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, + Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { - Check_default -} from "./chunk-WYMW5NZB.js"; + Check_default, + DeveloperError_default +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/EllipsoidalOccluder.js function EllipsoidalOccluder(ellipsoid, cameraPosition) { @@ -329,21 +331,30 @@ function computeScaledSpaceDirectionToPoint(ellipsoid, directionToPoint) { } var EllipsoidalOccluder_default = EllipsoidalOccluder; -// packages/engine/Source/Core/TerrainExaggeration.js -var TerrainExaggeration = {}; -TerrainExaggeration.getHeight = function(height, scale, relativeHeight) { +// packages/engine/Source/Core/VerticalExaggeration.js +var VerticalExaggeration = {}; +VerticalExaggeration.getHeight = function(height, scale, relativeHeight) { + if (!Number.isFinite(scale)) { + throw new DeveloperError_default("scale must be a finite number."); + } + if (!Number.isFinite(relativeHeight)) { + throw new DeveloperError_default("relativeHeight must be a finite number."); + } return (height - relativeHeight) * scale + relativeHeight; }; -var scratchCartographic = new Cartesian3_default(); -TerrainExaggeration.getPosition = function(position, ellipsoid, terrainExaggeration, terrainExaggerationRelativeHeight, result) { +var scratchCartographic = new Cartographic_default(); +VerticalExaggeration.getPosition = function(position, ellipsoid, verticalExaggeration, verticalExaggerationRelativeHeight, result) { const cartographic = ellipsoid.cartesianToCartographic( position, scratchCartographic ); - const newHeight = TerrainExaggeration.getHeight( + if (!defined_default(cartographic)) { + return Cartesian3_default.clone(position, result); + } + const newHeight = VerticalExaggeration.getHeight( cartographic.height, - terrainExaggeration, - terrainExaggerationRelativeHeight + verticalExaggeration, + verticalExaggerationRelativeHeight ); return Cartesian3_default.fromRadians( cartographic.longitude, @@ -353,7 +364,7 @@ TerrainExaggeration.getPosition = function(position, ellipsoid, terrainExaggerat result ); }; -var TerrainExaggeration_default = TerrainExaggeration; +var VerticalExaggeration_default = VerticalExaggeration; // packages/engine/Source/Core/TerrainQuantization.js var TerrainQuantization = { @@ -585,7 +596,7 @@ TerrainEncoding.prototype.getExaggeratedPosition = function(buffer, index, resul scratchGeodeticSurfaceNormal ); const rawHeight = this.decodeHeight(buffer, index); - const heightDifference = TerrainExaggeration_default.getHeight( + const heightDifference = VerticalExaggeration_default.getHeight( rawHeight, exaggeration, exaggerationRelativeHeight diff --git a/assets/cesium/Workers/chunk-CZFGXAMG.js b/assets/cesium/Workers/chunk-BDFNKFOE.js similarity index 98% rename from assets/cesium/Workers/chunk-CZFGXAMG.js rename to assets/cesium/Workers/chunk-BDFNKFOE.js index 3e134288b..bbd3d65af 100644 --- a/assets/cesium/Workers/chunk-CZFGXAMG.js +++ b/assets/cesium/Workers/chunk-BDFNKFOE.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,43 +25,43 @@ import { WebMercatorProjection_default -} from "./chunk-BLXANKPB.js"; +} from "./chunk-X23FRWHJ.js"; import { GeometryPipeline_default -} from "./chunk-TIEL2RYB.js"; +} from "./chunk-JYAHOGGL.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default, GeographicProjection_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { Matrix4_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js function OffsetGeometryInstanceAttribute(x, y, z) { diff --git a/assets/cesium/Workers/chunk-4MPXTOW6.js b/assets/cesium/Workers/chunk-BJF5LOWE.js similarity index 98% rename from assets/cesium/Workers/chunk-4MPXTOW6.js rename to assets/cesium/Workers/chunk-BJF5LOWE.js index 1c539986e..f10878995 100644 --- a/assets/cesium/Workers/chunk-4MPXTOW6.js +++ b/assets/cesium/Workers/chunk-BJF5LOWE.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -26,23 +26,23 @@ import { CornerType_default, PolylineVolumeGeometryLibrary_default -} from "./chunk-VIAGIVGP.js"; +} from "./chunk-FXIHSF7O.js"; import { PolylinePipeline_default -} from "./chunk-4JETNOH2.js"; +} from "./chunk-DGS5QNIO.js"; import { Quaternion_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-O3JCMSS3.js"; import { Cartesian3_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CorridorGeometryLibrary.js var CorridorGeometryLibrary = {}; diff --git a/assets/cesium/Workers/chunk-QX5ASOZZ.js b/assets/cesium/Workers/chunk-C2CGMAIU.js similarity index 97% rename from assets/cesium/Workers/chunk-QX5ASOZZ.js rename to assets/cesium/Workers/chunk-C2CGMAIU.js index 7d568fd7e..4028c45ad 100644 --- a/assets/cesium/Workers/chunk-QX5ASOZZ.js +++ b/assets/cesium/Workers/chunk-C2CGMAIU.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,46 +25,44 @@ import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; +} from "./chunk-KUN2ZA5X.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import { - Cartesian2_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/EllipsoidGeometry.js var scratchPosition = new Cartesian3_default(); diff --git a/assets/cesium/Workers/chunk-HX5XY3NH.js b/assets/cesium/Workers/chunk-COYFZ5VA.js similarity index 97% rename from assets/cesium/Workers/chunk-HX5XY3NH.js rename to assets/cesium/Workers/chunk-COYFZ5VA.js index 6a77cb240..6c0ac375e 100644 --- a/assets/cesium/Workers/chunk-HX5XY3NH.js +++ b/assets/cesium/Workers/chunk-COYFZ5VA.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,20 +25,20 @@ import { PolylinePipeline_default -} from "./chunk-4JETNOH2.js"; +} from "./chunk-DGS5QNIO.js"; import { arrayRemoveDuplicates_default -} from "./chunk-E5HIGWSZ.js"; +} from "./chunk-DKVHRNFY.js"; import { Cartesian3_default, Cartographic_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/WallGeometryLibrary.js var WallGeometryLibrary = {}; diff --git a/assets/cesium/Workers/chunk-4JETNOH2.js b/assets/cesium/Workers/chunk-DGS5QNIO.js similarity index 97% rename from assets/cesium/Workers/chunk-4JETNOH2.js rename to assets/cesium/Workers/chunk-DGS5QNIO.js index 465b67c6e..e7d043f75 100644 --- a/assets/cesium/Workers/chunk-4JETNOH2.js +++ b/assets/cesium/Workers/chunk-DGS5QNIO.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,36 +25,36 @@ import { EllipsoidGeodesic_default -} from "./chunk-LID3UUML.js"; +} from "./chunk-VFBNELXB.js"; import { EllipsoidRhumbLine_default -} from "./chunk-IDAL54EF.js"; +} from "./chunk-4MSUJ4I7.js"; import { IntersectionTests_default -} from "./chunk-R5NOUYKW.js"; +} from "./chunk-XD445VDH.js"; import { Plane_default -} from "./chunk-PNAD2XAN.js"; +} from "./chunk-4BAE4PWO.js"; import { Matrix4_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/PolylinePipeline.js var PolylinePipeline = {}; @@ -265,7 +265,7 @@ PolylinePipeline.generateArc = function(options) { throw new DeveloperError_default("options.positions is required."); } const length = positions.length; - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); let height = defaultValue_default(options.height, 0); const hasHeightArray = Array.isArray(height); if (length < 1) { @@ -335,7 +335,7 @@ PolylinePipeline.generateRhumbArc = function(options) { throw new DeveloperError_default("options.positions is required."); } const length = positions.length; - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); let height = defaultValue_default(options.height, 0); const hasHeightArray = Array.isArray(height); if (length < 1) { diff --git a/assets/cesium/Workers/chunk-E5HIGWSZ.js b/assets/cesium/Workers/chunk-DKVHRNFY.js similarity index 95% rename from assets/cesium/Workers/chunk-E5HIGWSZ.js rename to assets/cesium/Workers/chunk-DKVHRNFY.js index 41bb08936..49614fc76 100644 --- a/assets/cesium/Workers/chunk-E5HIGWSZ.js +++ b/assets/cesium/Workers/chunk-DKVHRNFY.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,16 +25,16 @@ import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/arrayRemoveDuplicates.js var removeDuplicatesEpsilon = Math_default.EPSILON10; diff --git a/assets/cesium/Workers/chunk-DNCKFFNR.js b/assets/cesium/Workers/chunk-DNCKFFNR.js deleted file mode 100644 index 3a658f25a..000000000 --- a/assets/cesium/Workers/chunk-DNCKFFNR.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 - * - * 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 { - defaultValue_default -} from "./chunk-N73NY3KY.js"; -import { - defined_default -} from "./chunk-FMN2NHBU.js"; - -// packages/engine/Source/Core/combine.js -function combine(object1, object2, deep) { - deep = defaultValue_default(deep, false); - const result = {}; - const object1Defined = defined_default(object1); - const object2Defined = defined_default(object2); - let property; - let object1Value; - let object2Value; - if (object1Defined) { - for (property in object1) { - if (object1.hasOwnProperty(property)) { - object1Value = object1[property]; - if (object2Defined && deep && typeof object1Value === "object" && object2.hasOwnProperty(property)) { - object2Value = object2[property]; - if (typeof object2Value === "object") { - result[property] = combine(object1Value, object2Value, deep); - } else { - result[property] = object1Value; - } - } else { - result[property] = object1Value; - } - } - } - } - if (object2Defined) { - for (property in object2) { - if (object2.hasOwnProperty(property) && !result.hasOwnProperty(property)) { - object2Value = object2[property]; - result[property] = object2Value; - } - } - } - return result; -} -var combine_default = combine; - -export { - combine_default -}; diff --git a/assets/cesium/Workers/chunk-DOXCPOG4.js b/assets/cesium/Workers/chunk-DOXCPOG4.js new file mode 100644 index 000000000..fa826dfcd --- /dev/null +++ b/assets/cesium/Workers/chunk-DOXCPOG4.js @@ -0,0 +1,963 @@ +/** + * @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 { + Matrix4_default, + Rectangle_default +} from "./chunk-O3JCMSS3.js"; +import { + Cartesian3_default, + Cartographic_default, + Ellipsoid_default, + Matrix3_default +} from "./chunk-PYHLO636.js"; +import { + Math_default +} from "./chunk-MSKXMXJI.js"; +import { + defaultValue_default +} from "./chunk-VE7BFUIX.js"; +import { + Check_default, + DeveloperError_default +} from "./chunk-S3PI2KFM.js"; +import { + defined_default +} from "./chunk-AA4GZKOT.js"; + +// packages/engine/Source/Core/GeographicProjection.js +function GeographicProjection(ellipsoid) { + this._ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); + this._semimajorAxis = this._ellipsoid.maximumRadius; + this._oneOverSemimajorAxis = 1 / this._semimajorAxis; +} +Object.defineProperties(GeographicProjection.prototype, { + /** + * Gets the {@link Ellipsoid}. + * + * @memberof GeographicProjection.prototype + * + * @type {Ellipsoid} + * @readonly + */ + ellipsoid: { + get: function() { + return this._ellipsoid; + } + } +}); +GeographicProjection.prototype.project = function(cartographic, result) { + const semimajorAxis = this._semimajorAxis; + const x = cartographic.longitude * semimajorAxis; + const y = cartographic.latitude * semimajorAxis; + const z = cartographic.height; + if (!defined_default(result)) { + return new Cartesian3_default(x, y, z); + } + result.x = x; + result.y = y; + result.z = z; + return result; +}; +GeographicProjection.prototype.unproject = function(cartesian, result) { + if (!defined_default(cartesian)) { + throw new DeveloperError_default("cartesian is required"); + } + const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis; + const longitude = cartesian.x * oneOverEarthSemimajorAxis; + const latitude = cartesian.y * oneOverEarthSemimajorAxis; + const height = cartesian.z; + if (!defined_default(result)) { + return new Cartographic_default(longitude, latitude, height); + } + result.longitude = longitude; + result.latitude = latitude; + result.height = height; + return result; +}; +var GeographicProjection_default = GeographicProjection; + +// packages/engine/Source/Core/Intersect.js +var Intersect = { + /** + * Represents that an object is not contained within the frustum. + * + * @type {number} + * @constant + */ + OUTSIDE: -1, + /** + * Represents that an object intersects one of the frustum's planes. + * + * @type {number} + * @constant + */ + INTERSECTING: 0, + /** + * Represents that an object is fully within the frustum. + * + * @type {number} + * @constant + */ + INSIDE: 1 +}; +var Intersect_default = Object.freeze(Intersect); + +// packages/engine/Source/Core/Interval.js +function Interval(start, stop) { + this.start = defaultValue_default(start, 0); + this.stop = defaultValue_default(stop, 0); +} +var Interval_default = Interval; + +// packages/engine/Source/Core/BoundingSphere.js +function BoundingSphere(center, radius) { + this.center = Cartesian3_default.clone(defaultValue_default(center, Cartesian3_default.ZERO)); + this.radius = defaultValue_default(radius, 0); +} +var fromPointsXMin = new Cartesian3_default(); +var fromPointsYMin = new Cartesian3_default(); +var fromPointsZMin = new Cartesian3_default(); +var fromPointsXMax = new Cartesian3_default(); +var fromPointsYMax = new Cartesian3_default(); +var fromPointsZMax = new Cartesian3_default(); +var fromPointsCurrentPos = new Cartesian3_default(); +var fromPointsScratch = new Cartesian3_default(); +var fromPointsRitterCenter = new Cartesian3_default(); +var fromPointsMinBoxPt = new Cartesian3_default(); +var fromPointsMaxBoxPt = new Cartesian3_default(); +var fromPointsNaiveCenterScratch = new Cartesian3_default(); +var volumeConstant = 4 / 3 * Math_default.PI; +BoundingSphere.fromPoints = function(positions, result) { + if (!defined_default(result)) { + result = new BoundingSphere(); + } + if (!defined_default(positions) || positions.length === 0) { + result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); + result.radius = 0; + return result; + } + const currentPos = Cartesian3_default.clone(positions[0], fromPointsCurrentPos); + const xMin = Cartesian3_default.clone(currentPos, fromPointsXMin); + const yMin = Cartesian3_default.clone(currentPos, fromPointsYMin); + const zMin = Cartesian3_default.clone(currentPos, fromPointsZMin); + const xMax = Cartesian3_default.clone(currentPos, fromPointsXMax); + const yMax = Cartesian3_default.clone(currentPos, fromPointsYMax); + const zMax = Cartesian3_default.clone(currentPos, fromPointsZMax); + const numPositions = positions.length; + let i; + for (i = 1; i < numPositions; i++) { + Cartesian3_default.clone(positions[i], currentPos); + const x = currentPos.x; + const y = currentPos.y; + const z = currentPos.z; + if (x < xMin.x) { + Cartesian3_default.clone(currentPos, xMin); + } + if (x > xMax.x) { + Cartesian3_default.clone(currentPos, xMax); + } + if (y < yMin.y) { + Cartesian3_default.clone(currentPos, yMin); + } + if (y > yMax.y) { + Cartesian3_default.clone(currentPos, yMax); + } + if (z < zMin.z) { + Cartesian3_default.clone(currentPos, zMin); + } + if (z > zMax.z) { + Cartesian3_default.clone(currentPos, zMax); + } + } + const xSpan = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(xMax, xMin, fromPointsScratch) + ); + const ySpan = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(yMax, yMin, fromPointsScratch) + ); + const zSpan = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(zMax, zMin, fromPointsScratch) + ); + let diameter1 = xMin; + let diameter2 = xMax; + let maxSpan = xSpan; + if (ySpan > maxSpan) { + maxSpan = ySpan; + diameter1 = yMin; + diameter2 = yMax; + } + if (zSpan > maxSpan) { + maxSpan = zSpan; + diameter1 = zMin; + diameter2 = zMax; + } + const ritterCenter = fromPointsRitterCenter; + ritterCenter.x = (diameter1.x + diameter2.x) * 0.5; + ritterCenter.y = (diameter1.y + diameter2.y) * 0.5; + ritterCenter.z = (diameter1.z + diameter2.z) * 0.5; + let radiusSquared = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(diameter2, ritterCenter, fromPointsScratch) + ); + let ritterRadius = Math.sqrt(radiusSquared); + const minBoxPt = fromPointsMinBoxPt; + minBoxPt.x = xMin.x; + minBoxPt.y = yMin.y; + minBoxPt.z = zMin.z; + const maxBoxPt = fromPointsMaxBoxPt; + maxBoxPt.x = xMax.x; + maxBoxPt.y = yMax.y; + maxBoxPt.z = zMax.z; + const naiveCenter = Cartesian3_default.midpoint( + minBoxPt, + maxBoxPt, + fromPointsNaiveCenterScratch + ); + let naiveRadius = 0; + for (i = 0; i < numPositions; i++) { + Cartesian3_default.clone(positions[i], currentPos); + const r = Cartesian3_default.magnitude( + Cartesian3_default.subtract(currentPos, naiveCenter, fromPointsScratch) + ); + if (r > naiveRadius) { + naiveRadius = r; + } + const oldCenterToPointSquared = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(currentPos, ritterCenter, fromPointsScratch) + ); + if (oldCenterToPointSquared > radiusSquared) { + const oldCenterToPoint = Math.sqrt(oldCenterToPointSquared); + ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5; + radiusSquared = ritterRadius * ritterRadius; + const oldToNew = oldCenterToPoint - ritterRadius; + ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint; + ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint; + ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint; + } + } + if (ritterRadius < naiveRadius) { + Cartesian3_default.clone(ritterCenter, result.center); + result.radius = ritterRadius; + } else { + Cartesian3_default.clone(naiveCenter, result.center); + result.radius = naiveRadius; + } + return result; +}; +var defaultProjection = new GeographicProjection_default(); +var fromRectangle2DLowerLeft = new Cartesian3_default(); +var fromRectangle2DUpperRight = new Cartesian3_default(); +var fromRectangle2DSouthwest = new Cartographic_default(); +var fromRectangle2DNortheast = new Cartographic_default(); +BoundingSphere.fromRectangle2D = function(rectangle, projection, result) { + return BoundingSphere.fromRectangleWithHeights2D( + rectangle, + projection, + 0, + 0, + result + ); +}; +BoundingSphere.fromRectangleWithHeights2D = function(rectangle, projection, minimumHeight, maximumHeight, result) { + if (!defined_default(result)) { + result = new BoundingSphere(); + } + if (!defined_default(rectangle)) { + result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); + result.radius = 0; + return result; + } + defaultProjection._ellipsoid = Ellipsoid_default.default; + projection = defaultValue_default(projection, defaultProjection); + Rectangle_default.southwest(rectangle, fromRectangle2DSouthwest); + fromRectangle2DSouthwest.height = minimumHeight; + Rectangle_default.northeast(rectangle, fromRectangle2DNortheast); + fromRectangle2DNortheast.height = maximumHeight; + const lowerLeft = projection.project( + fromRectangle2DSouthwest, + fromRectangle2DLowerLeft + ); + const upperRight = projection.project( + fromRectangle2DNortheast, + fromRectangle2DUpperRight + ); + const width = upperRight.x - lowerLeft.x; + const height = upperRight.y - lowerLeft.y; + const elevation = upperRight.z - lowerLeft.z; + result.radius = Math.sqrt(width * width + height * height + elevation * elevation) * 0.5; + const center = result.center; + center.x = lowerLeft.x + width * 0.5; + center.y = lowerLeft.y + height * 0.5; + center.z = lowerLeft.z + elevation * 0.5; + return result; +}; +var fromRectangle3DScratch = []; +BoundingSphere.fromRectangle3D = function(rectangle, ellipsoid, surfaceHeight, result) { + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); + surfaceHeight = defaultValue_default(surfaceHeight, 0); + if (!defined_default(result)) { + result = new BoundingSphere(); + } + if (!defined_default(rectangle)) { + result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); + result.radius = 0; + return result; + } + const positions = Rectangle_default.subsample( + rectangle, + ellipsoid, + surfaceHeight, + fromRectangle3DScratch + ); + return BoundingSphere.fromPoints(positions, result); +}; +BoundingSphere.fromVertices = function(positions, center, stride, result) { + if (!defined_default(result)) { + result = new BoundingSphere(); + } + if (!defined_default(positions) || positions.length === 0) { + result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); + result.radius = 0; + return result; + } + center = defaultValue_default(center, Cartesian3_default.ZERO); + stride = defaultValue_default(stride, 3); + Check_default.typeOf.number.greaterThanOrEquals("stride", stride, 3); + const currentPos = fromPointsCurrentPos; + currentPos.x = positions[0] + center.x; + currentPos.y = positions[1] + center.y; + currentPos.z = positions[2] + center.z; + const xMin = Cartesian3_default.clone(currentPos, fromPointsXMin); + const yMin = Cartesian3_default.clone(currentPos, fromPointsYMin); + const zMin = Cartesian3_default.clone(currentPos, fromPointsZMin); + const xMax = Cartesian3_default.clone(currentPos, fromPointsXMax); + const yMax = Cartesian3_default.clone(currentPos, fromPointsYMax); + const zMax = Cartesian3_default.clone(currentPos, fromPointsZMax); + const numElements = positions.length; + let i; + for (i = 0; i < numElements; i += stride) { + const x = positions[i] + center.x; + const y = positions[i + 1] + center.y; + const z = positions[i + 2] + center.z; + currentPos.x = x; + currentPos.y = y; + currentPos.z = z; + if (x < xMin.x) { + Cartesian3_default.clone(currentPos, xMin); + } + if (x > xMax.x) { + Cartesian3_default.clone(currentPos, xMax); + } + if (y < yMin.y) { + Cartesian3_default.clone(currentPos, yMin); + } + if (y > yMax.y) { + Cartesian3_default.clone(currentPos, yMax); + } + if (z < zMin.z) { + Cartesian3_default.clone(currentPos, zMin); + } + if (z > zMax.z) { + Cartesian3_default.clone(currentPos, zMax); + } + } + const xSpan = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(xMax, xMin, fromPointsScratch) + ); + const ySpan = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(yMax, yMin, fromPointsScratch) + ); + const zSpan = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(zMax, zMin, fromPointsScratch) + ); + let diameter1 = xMin; + let diameter2 = xMax; + let maxSpan = xSpan; + if (ySpan > maxSpan) { + maxSpan = ySpan; + diameter1 = yMin; + diameter2 = yMax; + } + if (zSpan > maxSpan) { + maxSpan = zSpan; + diameter1 = zMin; + diameter2 = zMax; + } + const ritterCenter = fromPointsRitterCenter; + ritterCenter.x = (diameter1.x + diameter2.x) * 0.5; + ritterCenter.y = (diameter1.y + diameter2.y) * 0.5; + ritterCenter.z = (diameter1.z + diameter2.z) * 0.5; + let radiusSquared = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(diameter2, ritterCenter, fromPointsScratch) + ); + let ritterRadius = Math.sqrt(radiusSquared); + const minBoxPt = fromPointsMinBoxPt; + minBoxPt.x = xMin.x; + minBoxPt.y = yMin.y; + minBoxPt.z = zMin.z; + const maxBoxPt = fromPointsMaxBoxPt; + maxBoxPt.x = xMax.x; + maxBoxPt.y = yMax.y; + maxBoxPt.z = zMax.z; + const naiveCenter = Cartesian3_default.midpoint( + minBoxPt, + maxBoxPt, + fromPointsNaiveCenterScratch + ); + let naiveRadius = 0; + for (i = 0; i < numElements; i += stride) { + currentPos.x = positions[i] + center.x; + currentPos.y = positions[i + 1] + center.y; + currentPos.z = positions[i + 2] + center.z; + const r = Cartesian3_default.magnitude( + Cartesian3_default.subtract(currentPos, naiveCenter, fromPointsScratch) + ); + if (r > naiveRadius) { + naiveRadius = r; + } + const oldCenterToPointSquared = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(currentPos, ritterCenter, fromPointsScratch) + ); + if (oldCenterToPointSquared > radiusSquared) { + const oldCenterToPoint = Math.sqrt(oldCenterToPointSquared); + ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5; + radiusSquared = ritterRadius * ritterRadius; + const oldToNew = oldCenterToPoint - ritterRadius; + ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint; + ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint; + ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint; + } + } + if (ritterRadius < naiveRadius) { + Cartesian3_default.clone(ritterCenter, result.center); + result.radius = ritterRadius; + } else { + Cartesian3_default.clone(naiveCenter, result.center); + result.radius = naiveRadius; + } + return result; +}; +BoundingSphere.fromEncodedCartesianVertices = function(positionsHigh, positionsLow, result) { + if (!defined_default(result)) { + result = new BoundingSphere(); + } + if (!defined_default(positionsHigh) || !defined_default(positionsLow) || positionsHigh.length !== positionsLow.length || positionsHigh.length === 0) { + result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); + result.radius = 0; + return result; + } + const currentPos = fromPointsCurrentPos; + currentPos.x = positionsHigh[0] + positionsLow[0]; + currentPos.y = positionsHigh[1] + positionsLow[1]; + currentPos.z = positionsHigh[2] + positionsLow[2]; + const xMin = Cartesian3_default.clone(currentPos, fromPointsXMin); + const yMin = Cartesian3_default.clone(currentPos, fromPointsYMin); + const zMin = Cartesian3_default.clone(currentPos, fromPointsZMin); + const xMax = Cartesian3_default.clone(currentPos, fromPointsXMax); + const yMax = Cartesian3_default.clone(currentPos, fromPointsYMax); + const zMax = Cartesian3_default.clone(currentPos, fromPointsZMax); + const numElements = positionsHigh.length; + let i; + for (i = 0; i < numElements; i += 3) { + const x = positionsHigh[i] + positionsLow[i]; + const y = positionsHigh[i + 1] + positionsLow[i + 1]; + const z = positionsHigh[i + 2] + positionsLow[i + 2]; + currentPos.x = x; + currentPos.y = y; + currentPos.z = z; + if (x < xMin.x) { + Cartesian3_default.clone(currentPos, xMin); + } + if (x > xMax.x) { + Cartesian3_default.clone(currentPos, xMax); + } + if (y < yMin.y) { + Cartesian3_default.clone(currentPos, yMin); + } + if (y > yMax.y) { + Cartesian3_default.clone(currentPos, yMax); + } + if (z < zMin.z) { + Cartesian3_default.clone(currentPos, zMin); + } + if (z > zMax.z) { + Cartesian3_default.clone(currentPos, zMax); + } + } + const xSpan = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(xMax, xMin, fromPointsScratch) + ); + const ySpan = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(yMax, yMin, fromPointsScratch) + ); + const zSpan = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(zMax, zMin, fromPointsScratch) + ); + let diameter1 = xMin; + let diameter2 = xMax; + let maxSpan = xSpan; + if (ySpan > maxSpan) { + maxSpan = ySpan; + diameter1 = yMin; + diameter2 = yMax; + } + if (zSpan > maxSpan) { + maxSpan = zSpan; + diameter1 = zMin; + diameter2 = zMax; + } + const ritterCenter = fromPointsRitterCenter; + ritterCenter.x = (diameter1.x + diameter2.x) * 0.5; + ritterCenter.y = (diameter1.y + diameter2.y) * 0.5; + ritterCenter.z = (diameter1.z + diameter2.z) * 0.5; + let radiusSquared = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(diameter2, ritterCenter, fromPointsScratch) + ); + let ritterRadius = Math.sqrt(radiusSquared); + const minBoxPt = fromPointsMinBoxPt; + minBoxPt.x = xMin.x; + minBoxPt.y = yMin.y; + minBoxPt.z = zMin.z; + const maxBoxPt = fromPointsMaxBoxPt; + maxBoxPt.x = xMax.x; + maxBoxPt.y = yMax.y; + maxBoxPt.z = zMax.z; + const naiveCenter = Cartesian3_default.midpoint( + minBoxPt, + maxBoxPt, + fromPointsNaiveCenterScratch + ); + let naiveRadius = 0; + for (i = 0; i < numElements; i += 3) { + currentPos.x = positionsHigh[i] + positionsLow[i]; + currentPos.y = positionsHigh[i + 1] + positionsLow[i + 1]; + currentPos.z = positionsHigh[i + 2] + positionsLow[i + 2]; + const r = Cartesian3_default.magnitude( + Cartesian3_default.subtract(currentPos, naiveCenter, fromPointsScratch) + ); + if (r > naiveRadius) { + naiveRadius = r; + } + const oldCenterToPointSquared = Cartesian3_default.magnitudeSquared( + Cartesian3_default.subtract(currentPos, ritterCenter, fromPointsScratch) + ); + if (oldCenterToPointSquared > radiusSquared) { + const oldCenterToPoint = Math.sqrt(oldCenterToPointSquared); + ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5; + radiusSquared = ritterRadius * ritterRadius; + const oldToNew = oldCenterToPoint - ritterRadius; + ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint; + ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint; + ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint; + } + } + if (ritterRadius < naiveRadius) { + Cartesian3_default.clone(ritterCenter, result.center); + result.radius = ritterRadius; + } else { + Cartesian3_default.clone(naiveCenter, result.center); + result.radius = naiveRadius; + } + return result; +}; +BoundingSphere.fromCornerPoints = function(corner, oppositeCorner, result) { + Check_default.typeOf.object("corner", corner); + Check_default.typeOf.object("oppositeCorner", oppositeCorner); + if (!defined_default(result)) { + result = new BoundingSphere(); + } + const center = Cartesian3_default.midpoint(corner, oppositeCorner, result.center); + result.radius = Cartesian3_default.distance(center, oppositeCorner); + return result; +}; +BoundingSphere.fromEllipsoid = function(ellipsoid, result) { + Check_default.typeOf.object("ellipsoid", ellipsoid); + if (!defined_default(result)) { + result = new BoundingSphere(); + } + Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); + result.radius = ellipsoid.maximumRadius; + return result; +}; +var fromBoundingSpheresScratch = new Cartesian3_default(); +BoundingSphere.fromBoundingSpheres = function(boundingSpheres, result) { + if (!defined_default(result)) { + result = new BoundingSphere(); + } + if (!defined_default(boundingSpheres) || boundingSpheres.length === 0) { + result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); + result.radius = 0; + return result; + } + const length = boundingSpheres.length; + if (length === 1) { + return BoundingSphere.clone(boundingSpheres[0], result); + } + if (length === 2) { + return BoundingSphere.union(boundingSpheres[0], boundingSpheres[1], result); + } + const positions = []; + let i; + for (i = 0; i < length; i++) { + positions.push(boundingSpheres[i].center); + } + result = BoundingSphere.fromPoints(positions, result); + const center = result.center; + let radius = result.radius; + for (i = 0; i < length; i++) { + const tmp = boundingSpheres[i]; + radius = Math.max( + radius, + Cartesian3_default.distance(center, tmp.center, fromBoundingSpheresScratch) + tmp.radius + ); + } + result.radius = radius; + return result; +}; +var fromOrientedBoundingBoxScratchU = new Cartesian3_default(); +var fromOrientedBoundingBoxScratchV = new Cartesian3_default(); +var fromOrientedBoundingBoxScratchW = new Cartesian3_default(); +BoundingSphere.fromOrientedBoundingBox = function(orientedBoundingBox, result) { + Check_default.defined("orientedBoundingBox", orientedBoundingBox); + if (!defined_default(result)) { + result = new BoundingSphere(); + } + const halfAxes = orientedBoundingBox.halfAxes; + const u = Matrix3_default.getColumn(halfAxes, 0, fromOrientedBoundingBoxScratchU); + const v = Matrix3_default.getColumn(halfAxes, 1, fromOrientedBoundingBoxScratchV); + const w = Matrix3_default.getColumn(halfAxes, 2, fromOrientedBoundingBoxScratchW); + Cartesian3_default.add(u, v, u); + Cartesian3_default.add(u, w, u); + result.center = Cartesian3_default.clone(orientedBoundingBox.center, result.center); + result.radius = Cartesian3_default.magnitude(u); + return result; +}; +var scratchFromTransformationCenter = new Cartesian3_default(); +var scratchFromTransformationScale = new Cartesian3_default(); +BoundingSphere.fromTransformation = function(transformation, result) { + Check_default.typeOf.object("transformation", transformation); + if (!defined_default(result)) { + result = new BoundingSphere(); + } + const center = Matrix4_default.getTranslation( + transformation, + scratchFromTransformationCenter + ); + const scale = Matrix4_default.getScale( + transformation, + scratchFromTransformationScale + ); + const radius = 0.5 * Cartesian3_default.magnitude(scale); + result.center = Cartesian3_default.clone(center, result.center); + result.radius = radius; + return result; +}; +BoundingSphere.clone = function(sphere, result) { + if (!defined_default(sphere)) { + return void 0; + } + if (!defined_default(result)) { + return new BoundingSphere(sphere.center, sphere.radius); + } + result.center = Cartesian3_default.clone(sphere.center, result.center); + result.radius = sphere.radius; + return result; +}; +BoundingSphere.packedLength = 4; +BoundingSphere.pack = function(value, array, startingIndex) { + Check_default.typeOf.object("value", value); + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + const center = value.center; + array[startingIndex++] = center.x; + array[startingIndex++] = center.y; + array[startingIndex++] = center.z; + array[startingIndex] = value.radius; + return array; +}; +BoundingSphere.unpack = function(array, startingIndex, result) { + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + if (!defined_default(result)) { + result = new BoundingSphere(); + } + const center = result.center; + center.x = array[startingIndex++]; + center.y = array[startingIndex++]; + center.z = array[startingIndex++]; + result.radius = array[startingIndex]; + return result; +}; +var unionScratch = new Cartesian3_default(); +var unionScratchCenter = new Cartesian3_default(); +BoundingSphere.union = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + if (!defined_default(result)) { + result = new BoundingSphere(); + } + const leftCenter = left.center; + const leftRadius = left.radius; + const rightCenter = right.center; + const rightRadius = right.radius; + const toRightCenter = Cartesian3_default.subtract( + rightCenter, + leftCenter, + unionScratch + ); + const centerSeparation = Cartesian3_default.magnitude(toRightCenter); + if (leftRadius >= centerSeparation + rightRadius) { + left.clone(result); + return result; + } + if (rightRadius >= centerSeparation + leftRadius) { + right.clone(result); + return result; + } + const halfDistanceBetweenTangentPoints = (leftRadius + centerSeparation + rightRadius) * 0.5; + const center = Cartesian3_default.multiplyByScalar( + toRightCenter, + (-leftRadius + halfDistanceBetweenTangentPoints) / centerSeparation, + unionScratchCenter + ); + Cartesian3_default.add(center, leftCenter, center); + Cartesian3_default.clone(center, result.center); + result.radius = halfDistanceBetweenTangentPoints; + return result; +}; +var expandScratch = new Cartesian3_default(); +BoundingSphere.expand = function(sphere, point, result) { + Check_default.typeOf.object("sphere", sphere); + Check_default.typeOf.object("point", point); + result = BoundingSphere.clone(sphere, result); + const radius = Cartesian3_default.magnitude( + Cartesian3_default.subtract(point, result.center, expandScratch) + ); + if (radius > result.radius) { + result.radius = radius; + } + return result; +}; +BoundingSphere.intersectPlane = function(sphere, plane) { + Check_default.typeOf.object("sphere", sphere); + Check_default.typeOf.object("plane", plane); + const center = sphere.center; + const radius = sphere.radius; + const normal = plane.normal; + const distanceToPlane = Cartesian3_default.dot(normal, center) + plane.distance; + if (distanceToPlane < -radius) { + return Intersect_default.OUTSIDE; + } else if (distanceToPlane < radius) { + return Intersect_default.INTERSECTING; + } + return Intersect_default.INSIDE; +}; +BoundingSphere.transform = function(sphere, transform, result) { + Check_default.typeOf.object("sphere", sphere); + Check_default.typeOf.object("transform", transform); + if (!defined_default(result)) { + result = new BoundingSphere(); + } + result.center = Matrix4_default.multiplyByPoint( + transform, + sphere.center, + result.center + ); + result.radius = Matrix4_default.getMaximumScale(transform) * sphere.radius; + return result; +}; +var distanceSquaredToScratch = new Cartesian3_default(); +BoundingSphere.distanceSquaredTo = function(sphere, cartesian) { + Check_default.typeOf.object("sphere", sphere); + Check_default.typeOf.object("cartesian", cartesian); + const diff = Cartesian3_default.subtract( + sphere.center, + cartesian, + distanceSquaredToScratch + ); + const distance = Cartesian3_default.magnitude(diff) - sphere.radius; + if (distance <= 0) { + return 0; + } + return distance * distance; +}; +BoundingSphere.transformWithoutScale = function(sphere, transform, result) { + Check_default.typeOf.object("sphere", sphere); + Check_default.typeOf.object("transform", transform); + if (!defined_default(result)) { + result = new BoundingSphere(); + } + result.center = Matrix4_default.multiplyByPoint( + transform, + sphere.center, + result.center + ); + result.radius = sphere.radius; + return result; +}; +var scratchCartesian3 = new Cartesian3_default(); +BoundingSphere.computePlaneDistances = function(sphere, position, direction, result) { + Check_default.typeOf.object("sphere", sphere); + Check_default.typeOf.object("position", position); + Check_default.typeOf.object("direction", direction); + if (!defined_default(result)) { + result = new Interval_default(); + } + const toCenter = Cartesian3_default.subtract( + sphere.center, + position, + scratchCartesian3 + ); + const mag = Cartesian3_default.dot(direction, toCenter); + result.start = mag - sphere.radius; + result.stop = mag + sphere.radius; + return result; +}; +var projectTo2DNormalScratch = new Cartesian3_default(); +var projectTo2DEastScratch = new Cartesian3_default(); +var projectTo2DNorthScratch = new Cartesian3_default(); +var projectTo2DWestScratch = new Cartesian3_default(); +var projectTo2DSouthScratch = new Cartesian3_default(); +var projectTo2DCartographicScratch = new Cartographic_default(); +var projectTo2DPositionsScratch = new Array(8); +for (let n = 0; n < 8; ++n) { + projectTo2DPositionsScratch[n] = new Cartesian3_default(); +} +var projectTo2DProjection = new GeographicProjection_default(); +BoundingSphere.projectTo2D = function(sphere, projection, result) { + Check_default.typeOf.object("sphere", sphere); + projectTo2DProjection._ellipsoid = Ellipsoid_default.default; + projection = defaultValue_default(projection, projectTo2DProjection); + const ellipsoid = projection.ellipsoid; + let center = sphere.center; + const radius = sphere.radius; + let normal; + if (Cartesian3_default.equals(center, Cartesian3_default.ZERO)) { + normal = Cartesian3_default.clone(Cartesian3_default.UNIT_X, projectTo2DNormalScratch); + } else { + normal = ellipsoid.geodeticSurfaceNormal(center, projectTo2DNormalScratch); + } + const east = Cartesian3_default.cross( + Cartesian3_default.UNIT_Z, + normal, + projectTo2DEastScratch + ); + Cartesian3_default.normalize(east, east); + const north = Cartesian3_default.cross(normal, east, projectTo2DNorthScratch); + Cartesian3_default.normalize(north, north); + Cartesian3_default.multiplyByScalar(normal, radius, normal); + Cartesian3_default.multiplyByScalar(north, radius, north); + Cartesian3_default.multiplyByScalar(east, radius, east); + const south = Cartesian3_default.negate(north, projectTo2DSouthScratch); + const west = Cartesian3_default.negate(east, projectTo2DWestScratch); + const positions = projectTo2DPositionsScratch; + let corner = positions[0]; + Cartesian3_default.add(normal, north, corner); + Cartesian3_default.add(corner, east, corner); + corner = positions[1]; + Cartesian3_default.add(normal, north, corner); + Cartesian3_default.add(corner, west, corner); + corner = positions[2]; + Cartesian3_default.add(normal, south, corner); + Cartesian3_default.add(corner, west, corner); + corner = positions[3]; + Cartesian3_default.add(normal, south, corner); + Cartesian3_default.add(corner, east, corner); + Cartesian3_default.negate(normal, normal); + corner = positions[4]; + Cartesian3_default.add(normal, north, corner); + Cartesian3_default.add(corner, east, corner); + corner = positions[5]; + Cartesian3_default.add(normal, north, corner); + Cartesian3_default.add(corner, west, corner); + corner = positions[6]; + Cartesian3_default.add(normal, south, corner); + Cartesian3_default.add(corner, west, corner); + corner = positions[7]; + Cartesian3_default.add(normal, south, corner); + Cartesian3_default.add(corner, east, corner); + const length = positions.length; + for (let i = 0; i < length; ++i) { + const position = positions[i]; + Cartesian3_default.add(center, position, position); + const cartographic = ellipsoid.cartesianToCartographic( + position, + projectTo2DCartographicScratch + ); + projection.project(cartographic, position); + } + result = BoundingSphere.fromPoints(positions, result); + center = result.center; + const x = center.x; + const y = center.y; + const z = center.z; + center.x = z; + center.y = x; + center.z = y; + return result; +}; +BoundingSphere.isOccluded = function(sphere, occluder) { + Check_default.typeOf.object("sphere", sphere); + Check_default.typeOf.object("occluder", occluder); + return !occluder.isBoundingSphereVisible(sphere); +}; +BoundingSphere.equals = function(left, right) { + return left === right || defined_default(left) && defined_default(right) && Cartesian3_default.equals(left.center, right.center) && left.radius === right.radius; +}; +BoundingSphere.prototype.intersectPlane = function(plane) { + return BoundingSphere.intersectPlane(this, plane); +}; +BoundingSphere.prototype.distanceSquaredTo = function(cartesian) { + return BoundingSphere.distanceSquaredTo(this, cartesian); +}; +BoundingSphere.prototype.computePlaneDistances = function(position, direction, result) { + return BoundingSphere.computePlaneDistances( + this, + position, + direction, + result + ); +}; +BoundingSphere.prototype.isOccluded = function(occluder) { + return BoundingSphere.isOccluded(this, occluder); +}; +BoundingSphere.prototype.equals = function(right) { + return BoundingSphere.equals(this, right); +}; +BoundingSphere.prototype.clone = function(result) { + return BoundingSphere.clone(this, result); +}; +BoundingSphere.prototype.volume = function() { + const radius = this.radius; + return volumeConstant * radius * radius * radius; +}; +var BoundingSphere_default = BoundingSphere; + +export { + GeographicProjection_default, + Intersect_default, + Interval_default, + BoundingSphere_default +}; diff --git a/assets/cesium/Workers/chunk-VIAGIVGP.js b/assets/cesium/Workers/chunk-FXIHSF7O.js similarity index 93% rename from assets/cesium/Workers/chunk-VIAGIVGP.js rename to assets/cesium/Workers/chunk-FXIHSF7O.js index 156a2960a..6113f6c7d 100644 --- a/assets/cesium/Workers/chunk-VIAGIVGP.js +++ b/assets/cesium/Workers/chunk-FXIHSF7O.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,32 +23,36 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import { - oneTimeWarning_default -} from "./chunk-2GWOHAWL.js"; import { PolylinePipeline_default -} from "./chunk-4JETNOH2.js"; +} from "./chunk-DGS5QNIO.js"; import { EllipsoidTangentPlane_default -} from "./chunk-AI2FOC47.js"; +} from "./chunk-SYCPRK3D.js"; import { + Cartesian4_default, + Matrix4_default, Quaternion_default, Transforms_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-O3JCMSS3.js"; import { Cartesian2_default, - Cartesian4_default, - Matrix4_default -} from "./chunk-IQCBK4CE.js"; -import { Cartesian3_default, Cartographic_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; +import { + defaultValue_default +} from "./chunk-VE7BFUIX.js"; +import { + DeveloperError_default +} from "./chunk-S3PI2KFM.js"; +import { + defined_default +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CornerType.js var CornerType = { @@ -79,6 +83,23 @@ var CornerType = { }; var CornerType_default = Object.freeze(CornerType); +// packages/engine/Source/Core/oneTimeWarning.js +var warnings = {}; +function oneTimeWarning(identifier, message) { + if (!defined_default(identifier)) { + throw new DeveloperError_default("identifier is required."); + } + if (!defined_default(warnings[identifier])) { + warnings[identifier] = true; + console.warn(defaultValue_default(message, identifier)); + } +} +oneTimeWarning.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."; +oneTimeWarning.geometryZIndex = "Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored"; +oneTimeWarning.geometryHeightReference = "Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored"; +oneTimeWarning.geometryExtrudedHeightReference = "Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored"; +var oneTimeWarning_default = oneTimeWarning; + // packages/engine/Source/Core/PolylineVolumeGeometryLibrary.js var scratch2Array = [new Cartesian3_default(), new Cartesian3_default()]; var scratchCartesian1 = new Cartesian3_default(); @@ -665,5 +686,6 @@ var PolylineVolumeGeometryLibrary_default = PolylineVolumeGeometryLibrary; export { CornerType_default, + oneTimeWarning_default, PolylineVolumeGeometryLibrary_default }; diff --git a/assets/cesium/Workers/chunk-N3OQDJDV.js b/assets/cesium/Workers/chunk-G3YR53LY.js similarity index 99% rename from assets/cesium/Workers/chunk-N3OQDJDV.js rename to assets/cesium/Workers/chunk-G3YR53LY.js index bf43b1dac..c79cd1a2c 100644 --- a/assets/cesium/Workers/chunk-N3OQDJDV.js +++ b/assets/cesium/Workers/chunk-G3YR53LY.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,47 +25,47 @@ import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; +} from "./chunk-KUN2ZA5X.js"; import { Plane_default -} from "./chunk-PNAD2XAN.js"; +} from "./chunk-4BAE4PWO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default, - Intersect_default, - Quaternion_default -} from "./chunk-XKGSTUQO.js"; + Intersect_default +} from "./chunk-DOXCPOG4.js"; import { Cartesian4_default, - Matrix4_default -} from "./chunk-IQCBK4CE.js"; + Matrix4_default, + Quaternion_default +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CullingVolume.js function CullingVolume(planes) { diff --git a/assets/cesium/Workers/chunk-3R5RPSYS.js b/assets/cesium/Workers/chunk-GR3CDLCP.js similarity index 97% rename from assets/cesium/Workers/chunk-3R5RPSYS.js rename to assets/cesium/Workers/chunk-GR3CDLCP.js index b020d422b..52aec8d31 100644 --- a/assets/cesium/Workers/chunk-3R5RPSYS.js +++ b/assets/cesium/Workers/chunk-GR3CDLCP.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -24,33 +24,31 @@ */ import { + Matrix2_default, + Matrix4_default, Quaternion_default, + Rectangle_default, Transforms_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-O3JCMSS3.js"; import { Cartesian2_default, - Matrix2_default, - Matrix4_default, - Rectangle_default -} from "./chunk-IQCBK4CE.js"; -import { Cartesian3_default, Cartographic_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { WebGLConstants_default -} from "./chunk-XNRYWRVT.js"; +} from "./chunk-OOK53QUQ.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/GeometryType.js var GeometryType = { diff --git a/assets/cesium/Workers/chunk-DD2PDL6D.js b/assets/cesium/Workers/chunk-GRAT5GE7.js similarity index 92% rename from assets/cesium/Workers/chunk-DD2PDL6D.js rename to assets/cesium/Workers/chunk-GRAT5GE7.js index e5ffba21b..54d91b2e3 100644 --- a/assets/cesium/Workers/chunk-DD2PDL6D.js +++ b/assets/cesium/Workers/chunk-GRAT5GE7.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,16 +25,16 @@ import { Matrix4_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/GeometryInstance.js function GeometryInstance(options) { diff --git a/assets/cesium/Workers/chunk-EEL3YC6V.js b/assets/cesium/Workers/chunk-I2RC4XVN.js similarity index 96% rename from assets/cesium/Workers/chunk-EEL3YC6V.js rename to assets/cesium/Workers/chunk-I2RC4XVN.js index 40d9a5d9e..f657e8f81 100644 --- a/assets/cesium/Workers/chunk-EEL3YC6V.js +++ b/assets/cesium/Workers/chunk-I2RC4XVN.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,13 +25,13 @@ import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/EncodedCartesian3.js function EncodedCartesian3() { diff --git a/assets/cesium/Workers/chunk-IQCBK4CE.js b/assets/cesium/Workers/chunk-IQCBK4CE.js deleted file mode 100644 index 30996aca6..000000000 --- a/assets/cesium/Workers/chunk-IQCBK4CE.js +++ /dev/null @@ -1,3273 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 - * - * 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 { - Cartesian3_default, - Cartographic_default, - Ellipsoid_default, - Matrix3_default -} from "./chunk-54GSYZWT.js"; -import { - Math_default -} from "./chunk-A3TYRSRJ.js"; -import { - RuntimeError_default -} from "./chunk-YK5RU5AO.js"; -import { - defaultValue_default -} from "./chunk-N73NY3KY.js"; -import { - Check_default, - DeveloperError_default -} from "./chunk-WYMW5NZB.js"; -import { - defined_default -} from "./chunk-FMN2NHBU.js"; - -// packages/engine/Source/Core/Cartesian4.js -function Cartesian4(x, y, z, w) { - this.x = defaultValue_default(x, 0); - this.y = defaultValue_default(y, 0); - this.z = defaultValue_default(z, 0); - this.w = defaultValue_default(w, 0); -} -Cartesian4.fromElements = function(x, y, z, w, result) { - if (!defined_default(result)) { - return new Cartesian4(x, y, z, w); - } - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -}; -Cartesian4.fromColor = function(color, result) { - Check_default.typeOf.object("color", color); - if (!defined_default(result)) { - return new Cartesian4(color.red, color.green, color.blue, color.alpha); - } - result.x = color.red; - result.y = color.green; - result.z = color.blue; - result.w = color.alpha; - return result; -}; -Cartesian4.clone = function(cartesian, result) { - if (!defined_default(cartesian)) { - return void 0; - } - if (!defined_default(result)) { - return new Cartesian4(cartesian.x, cartesian.y, cartesian.z, cartesian.w); - } - result.x = cartesian.x; - result.y = cartesian.y; - result.z = cartesian.z; - result.w = cartesian.w; - return result; -}; -Cartesian4.packedLength = 4; -Cartesian4.pack = function(value, array, startingIndex) { - Check_default.typeOf.object("value", value); - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - array[startingIndex++] = value.x; - array[startingIndex++] = value.y; - array[startingIndex++] = value.z; - array[startingIndex] = value.w; - return array; -}; -Cartesian4.unpack = function(array, startingIndex, result) { - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - if (!defined_default(result)) { - result = new Cartesian4(); - } - result.x = array[startingIndex++]; - result.y = array[startingIndex++]; - result.z = array[startingIndex++]; - result.w = array[startingIndex]; - return result; -}; -Cartesian4.packArray = function(array, result) { - Check_default.defined("array", array); - const length = array.length; - const resultLength = length * 4; - if (!defined_default(result)) { - result = new Array(resultLength); - } else if (!Array.isArray(result) && result.length !== resultLength) { - throw new DeveloperError_default( - "If result is a typed array, it must have exactly array.length * 4 elements" - ); - } else if (result.length !== resultLength) { - result.length = resultLength; - } - for (let i = 0; i < length; ++i) { - Cartesian4.pack(array[i], result, i * 4); - } - return result; -}; -Cartesian4.unpackArray = function(array, result) { - Check_default.defined("array", array); - Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 4); - if (array.length % 4 !== 0) { - throw new DeveloperError_default("array length must be a multiple of 4."); - } - const length = array.length; - if (!defined_default(result)) { - result = new Array(length / 4); - } else { - result.length = length / 4; - } - for (let i = 0; i < length; i += 4) { - const index = i / 4; - result[index] = Cartesian4.unpack(array, i, result[index]); - } - return result; -}; -Cartesian4.fromArray = Cartesian4.unpack; -Cartesian4.maximumComponent = function(cartesian) { - Check_default.typeOf.object("cartesian", cartesian); - return Math.max(cartesian.x, cartesian.y, cartesian.z, cartesian.w); -}; -Cartesian4.minimumComponent = function(cartesian) { - Check_default.typeOf.object("cartesian", cartesian); - return Math.min(cartesian.x, cartesian.y, cartesian.z, cartesian.w); -}; -Cartesian4.minimumByComponent = function(first, second, result) { - Check_default.typeOf.object("first", first); - Check_default.typeOf.object("second", second); - Check_default.typeOf.object("result", result); - result.x = Math.min(first.x, second.x); - result.y = Math.min(first.y, second.y); - result.z = Math.min(first.z, second.z); - result.w = Math.min(first.w, second.w); - return result; -}; -Cartesian4.maximumByComponent = function(first, second, result) { - Check_default.typeOf.object("first", first); - Check_default.typeOf.object("second", second); - Check_default.typeOf.object("result", result); - result.x = Math.max(first.x, second.x); - result.y = Math.max(first.y, second.y); - result.z = Math.max(first.z, second.z); - result.w = Math.max(first.w, second.w); - return result; -}; -Cartesian4.clamp = function(value, min, max, result) { - Check_default.typeOf.object("value", value); - Check_default.typeOf.object("min", min); - Check_default.typeOf.object("max", max); - Check_default.typeOf.object("result", result); - const x = Math_default.clamp(value.x, min.x, max.x); - const y = Math_default.clamp(value.y, min.y, max.y); - const z = Math_default.clamp(value.z, min.z, max.z); - const w = Math_default.clamp(value.w, min.w, max.w); - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -}; -Cartesian4.magnitudeSquared = function(cartesian) { - Check_default.typeOf.object("cartesian", cartesian); - return cartesian.x * cartesian.x + cartesian.y * cartesian.y + cartesian.z * cartesian.z + cartesian.w * cartesian.w; -}; -Cartesian4.magnitude = function(cartesian) { - return Math.sqrt(Cartesian4.magnitudeSquared(cartesian)); -}; -var distanceScratch = new Cartesian4(); -Cartesian4.distance = function(left, right) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Cartesian4.subtract(left, right, distanceScratch); - return Cartesian4.magnitude(distanceScratch); -}; -Cartesian4.distanceSquared = function(left, right) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Cartesian4.subtract(left, right, distanceScratch); - return Cartesian4.magnitudeSquared(distanceScratch); -}; -Cartesian4.normalize = function(cartesian, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - const magnitude = Cartesian4.magnitude(cartesian); - result.x = cartesian.x / magnitude; - result.y = cartesian.y / magnitude; - result.z = cartesian.z / magnitude; - result.w = cartesian.w / magnitude; - if (isNaN(result.x) || isNaN(result.y) || isNaN(result.z) || isNaN(result.w)) { - throw new DeveloperError_default("normalized result is not a number"); - } - return result; -}; -Cartesian4.dot = function(left, right) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; -}; -Cartesian4.multiplyComponents = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result.x = left.x * right.x; - result.y = left.y * right.y; - result.z = left.z * right.z; - result.w = left.w * right.w; - return result; -}; -Cartesian4.divideComponents = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result.x = left.x / right.x; - result.y = left.y / right.y; - result.z = left.z / right.z; - result.w = left.w / right.w; - return result; -}; -Cartesian4.add = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result.x = left.x + right.x; - result.y = left.y + right.y; - result.z = left.z + right.z; - result.w = left.w + right.w; - return result; -}; -Cartesian4.subtract = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result.x = left.x - right.x; - result.y = left.y - right.y; - result.z = left.z - right.z; - result.w = left.w - right.w; - return result; -}; -Cartesian4.multiplyByScalar = function(cartesian, scalar, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.number("scalar", scalar); - Check_default.typeOf.object("result", result); - result.x = cartesian.x * scalar; - result.y = cartesian.y * scalar; - result.z = cartesian.z * scalar; - result.w = cartesian.w * scalar; - return result; -}; -Cartesian4.divideByScalar = function(cartesian, scalar, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.number("scalar", scalar); - Check_default.typeOf.object("result", result); - result.x = cartesian.x / scalar; - result.y = cartesian.y / scalar; - result.z = cartesian.z / scalar; - result.w = cartesian.w / scalar; - return result; -}; -Cartesian4.negate = function(cartesian, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - result.x = -cartesian.x; - result.y = -cartesian.y; - result.z = -cartesian.z; - result.w = -cartesian.w; - return result; -}; -Cartesian4.abs = function(cartesian, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - result.x = Math.abs(cartesian.x); - result.y = Math.abs(cartesian.y); - result.z = Math.abs(cartesian.z); - result.w = Math.abs(cartesian.w); - return result; -}; -var lerpScratch = new Cartesian4(); -Cartesian4.lerp = function(start, end, t, result) { - Check_default.typeOf.object("start", start); - Check_default.typeOf.object("end", end); - Check_default.typeOf.number("t", t); - Check_default.typeOf.object("result", result); - Cartesian4.multiplyByScalar(end, t, lerpScratch); - result = Cartesian4.multiplyByScalar(start, 1 - t, result); - return Cartesian4.add(lerpScratch, result, result); -}; -var mostOrthogonalAxisScratch = new Cartesian4(); -Cartesian4.mostOrthogonalAxis = function(cartesian, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - const f = Cartesian4.normalize(cartesian, mostOrthogonalAxisScratch); - Cartesian4.abs(f, f); - if (f.x <= f.y) { - if (f.x <= f.z) { - if (f.x <= f.w) { - result = Cartesian4.clone(Cartesian4.UNIT_X, result); - } else { - result = Cartesian4.clone(Cartesian4.UNIT_W, result); - } - } else if (f.z <= f.w) { - result = Cartesian4.clone(Cartesian4.UNIT_Z, result); - } else { - result = Cartesian4.clone(Cartesian4.UNIT_W, result); - } - } else if (f.y <= f.z) { - if (f.y <= f.w) { - result = Cartesian4.clone(Cartesian4.UNIT_Y, result); - } else { - result = Cartesian4.clone(Cartesian4.UNIT_W, result); - } - } else if (f.z <= f.w) { - result = Cartesian4.clone(Cartesian4.UNIT_Z, result); - } else { - result = Cartesian4.clone(Cartesian4.UNIT_W, result); - } - return result; -}; -Cartesian4.equals = function(left, right) { - return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.z === right.z && left.w === right.w; -}; -Cartesian4.equalsArray = function(cartesian, array, offset) { - return cartesian.x === array[offset] && cartesian.y === array[offset + 1] && cartesian.z === array[offset + 2] && cartesian.w === array[offset + 3]; -}; -Cartesian4.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) { - return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon( - left.x, - right.x, - relativeEpsilon, - absoluteEpsilon - ) && Math_default.equalsEpsilon( - left.y, - right.y, - relativeEpsilon, - absoluteEpsilon - ) && Math_default.equalsEpsilon( - left.z, - right.z, - relativeEpsilon, - absoluteEpsilon - ) && Math_default.equalsEpsilon( - left.w, - right.w, - relativeEpsilon, - absoluteEpsilon - ); -}; -Cartesian4.ZERO = Object.freeze(new Cartesian4(0, 0, 0, 0)); -Cartesian4.ONE = Object.freeze(new Cartesian4(1, 1, 1, 1)); -Cartesian4.UNIT_X = Object.freeze(new Cartesian4(1, 0, 0, 0)); -Cartesian4.UNIT_Y = Object.freeze(new Cartesian4(0, 1, 0, 0)); -Cartesian4.UNIT_Z = Object.freeze(new Cartesian4(0, 0, 1, 0)); -Cartesian4.UNIT_W = Object.freeze(new Cartesian4(0, 0, 0, 1)); -Cartesian4.prototype.clone = function(result) { - return Cartesian4.clone(this, result); -}; -Cartesian4.prototype.equals = function(right) { - return Cartesian4.equals(this, right); -}; -Cartesian4.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) { - return Cartesian4.equalsEpsilon( - this, - right, - relativeEpsilon, - absoluteEpsilon - ); -}; -Cartesian4.prototype.toString = function() { - return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`; -}; -var scratchF32Array = new Float32Array(1); -var scratchU8Array = new Uint8Array(scratchF32Array.buffer); -var testU32 = new Uint32Array([287454020]); -var testU8 = new Uint8Array(testU32.buffer); -var littleEndian = testU8[0] === 68; -Cartesian4.packFloat = function(value, result) { - Check_default.typeOf.number("value", value); - if (!defined_default(result)) { - result = new Cartesian4(); - } - scratchF32Array[0] = value; - if (littleEndian) { - result.x = scratchU8Array[0]; - result.y = scratchU8Array[1]; - result.z = scratchU8Array[2]; - result.w = scratchU8Array[3]; - } else { - result.x = scratchU8Array[3]; - result.y = scratchU8Array[2]; - result.z = scratchU8Array[1]; - result.w = scratchU8Array[0]; - } - return result; -}; -Cartesian4.unpackFloat = function(packedFloat) { - Check_default.typeOf.object("packedFloat", packedFloat); - if (littleEndian) { - scratchU8Array[0] = packedFloat.x; - scratchU8Array[1] = packedFloat.y; - scratchU8Array[2] = packedFloat.z; - scratchU8Array[3] = packedFloat.w; - } else { - scratchU8Array[0] = packedFloat.w; - scratchU8Array[1] = packedFloat.z; - scratchU8Array[2] = packedFloat.y; - scratchU8Array[3] = packedFloat.x; - } - return scratchF32Array[0]; -}; -var Cartesian4_default = Cartesian4; - -// packages/engine/Source/Core/Matrix4.js -function Matrix4(column0Row0, column1Row0, column2Row0, column3Row0, column0Row1, column1Row1, column2Row1, column3Row1, column0Row2, column1Row2, column2Row2, column3Row2, column0Row3, column1Row3, column2Row3, column3Row3) { - this[0] = defaultValue_default(column0Row0, 0); - this[1] = defaultValue_default(column0Row1, 0); - this[2] = defaultValue_default(column0Row2, 0); - this[3] = defaultValue_default(column0Row3, 0); - this[4] = defaultValue_default(column1Row0, 0); - this[5] = defaultValue_default(column1Row1, 0); - this[6] = defaultValue_default(column1Row2, 0); - this[7] = defaultValue_default(column1Row3, 0); - this[8] = defaultValue_default(column2Row0, 0); - this[9] = defaultValue_default(column2Row1, 0); - this[10] = defaultValue_default(column2Row2, 0); - this[11] = defaultValue_default(column2Row3, 0); - this[12] = defaultValue_default(column3Row0, 0); - this[13] = defaultValue_default(column3Row1, 0); - this[14] = defaultValue_default(column3Row2, 0); - this[15] = defaultValue_default(column3Row3, 0); -} -Matrix4.packedLength = 16; -Matrix4.pack = function(value, array, startingIndex) { - Check_default.typeOf.object("value", value); - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - array[startingIndex++] = value[0]; - array[startingIndex++] = value[1]; - array[startingIndex++] = value[2]; - array[startingIndex++] = value[3]; - array[startingIndex++] = value[4]; - array[startingIndex++] = value[5]; - array[startingIndex++] = value[6]; - array[startingIndex++] = value[7]; - array[startingIndex++] = value[8]; - array[startingIndex++] = value[9]; - array[startingIndex++] = value[10]; - array[startingIndex++] = value[11]; - array[startingIndex++] = value[12]; - array[startingIndex++] = value[13]; - array[startingIndex++] = value[14]; - array[startingIndex] = value[15]; - return array; -}; -Matrix4.unpack = function(array, startingIndex, result) { - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - if (!defined_default(result)) { - result = new Matrix4(); - } - result[0] = array[startingIndex++]; - result[1] = array[startingIndex++]; - result[2] = array[startingIndex++]; - result[3] = array[startingIndex++]; - result[4] = array[startingIndex++]; - result[5] = array[startingIndex++]; - result[6] = array[startingIndex++]; - result[7] = array[startingIndex++]; - result[8] = array[startingIndex++]; - result[9] = array[startingIndex++]; - result[10] = array[startingIndex++]; - result[11] = array[startingIndex++]; - result[12] = array[startingIndex++]; - result[13] = array[startingIndex++]; - result[14] = array[startingIndex++]; - result[15] = array[startingIndex]; - return result; -}; -Matrix4.packArray = function(array, result) { - Check_default.defined("array", array); - const length = array.length; - const resultLength = length * 16; - if (!defined_default(result)) { - result = new Array(resultLength); - } else if (!Array.isArray(result) && result.length !== resultLength) { - throw new DeveloperError_default( - "If result is a typed array, it must have exactly array.length * 16 elements" - ); - } else if (result.length !== resultLength) { - result.length = resultLength; - } - for (let i = 0; i < length; ++i) { - Matrix4.pack(array[i], result, i * 16); - } - return result; -}; -Matrix4.unpackArray = function(array, result) { - Check_default.defined("array", array); - Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 16); - if (array.length % 16 !== 0) { - throw new DeveloperError_default("array length must be a multiple of 16."); - } - const length = array.length; - if (!defined_default(result)) { - result = new Array(length / 16); - } else { - result.length = length / 16; - } - for (let i = 0; i < length; i += 16) { - const index = i / 16; - result[index] = Matrix4.unpack(array, i, result[index]); - } - return result; -}; -Matrix4.clone = function(matrix, result) { - if (!defined_default(matrix)) { - return void 0; - } - if (!defined_default(result)) { - return new Matrix4( - matrix[0], - matrix[4], - matrix[8], - matrix[12], - matrix[1], - matrix[5], - matrix[9], - matrix[13], - matrix[2], - matrix[6], - matrix[10], - matrix[14], - matrix[3], - matrix[7], - matrix[11], - matrix[15] - ); - } - result[0] = matrix[0]; - result[1] = matrix[1]; - result[2] = matrix[2]; - result[3] = matrix[3]; - result[4] = matrix[4]; - result[5] = matrix[5]; - result[6] = matrix[6]; - result[7] = matrix[7]; - result[8] = matrix[8]; - result[9] = matrix[9]; - result[10] = matrix[10]; - result[11] = matrix[11]; - result[12] = matrix[12]; - result[13] = matrix[13]; - result[14] = matrix[14]; - result[15] = matrix[15]; - return result; -}; -Matrix4.fromArray = Matrix4.unpack; -Matrix4.fromColumnMajorArray = function(values, result) { - Check_default.defined("values", values); - return Matrix4.clone(values, result); -}; -Matrix4.fromRowMajorArray = function(values, result) { - Check_default.defined("values", values); - if (!defined_default(result)) { - return new Matrix4( - values[0], - values[1], - values[2], - values[3], - values[4], - values[5], - values[6], - values[7], - values[8], - values[9], - values[10], - values[11], - values[12], - values[13], - values[14], - values[15] - ); - } - result[0] = values[0]; - result[1] = values[4]; - result[2] = values[8]; - result[3] = values[12]; - result[4] = values[1]; - result[5] = values[5]; - result[6] = values[9]; - result[7] = values[13]; - result[8] = values[2]; - result[9] = values[6]; - result[10] = values[10]; - result[11] = values[14]; - result[12] = values[3]; - result[13] = values[7]; - result[14] = values[11]; - result[15] = values[15]; - return result; -}; -Matrix4.fromRotationTranslation = function(rotation, translation, result) { - Check_default.typeOf.object("rotation", rotation); - translation = defaultValue_default(translation, Cartesian3_default.ZERO); - if (!defined_default(result)) { - return new Matrix4( - rotation[0], - rotation[3], - rotation[6], - translation.x, - rotation[1], - rotation[4], - rotation[7], - translation.y, - rotation[2], - rotation[5], - rotation[8], - translation.z, - 0, - 0, - 0, - 1 - ); - } - result[0] = rotation[0]; - result[1] = rotation[1]; - result[2] = rotation[2]; - result[3] = 0; - result[4] = rotation[3]; - result[5] = rotation[4]; - result[6] = rotation[5]; - result[7] = 0; - result[8] = rotation[6]; - result[9] = rotation[7]; - result[10] = rotation[8]; - result[11] = 0; - result[12] = translation.x; - result[13] = translation.y; - result[14] = translation.z; - result[15] = 1; - return result; -}; -Matrix4.fromTranslationQuaternionRotationScale = function(translation, rotation, scale, result) { - Check_default.typeOf.object("translation", translation); - Check_default.typeOf.object("rotation", rotation); - Check_default.typeOf.object("scale", scale); - if (!defined_default(result)) { - result = new Matrix4(); - } - const scaleX = scale.x; - const scaleY = scale.y; - const scaleZ = scale.z; - const x2 = rotation.x * rotation.x; - const xy = rotation.x * rotation.y; - const xz = rotation.x * rotation.z; - const xw = rotation.x * rotation.w; - const y2 = rotation.y * rotation.y; - const yz = rotation.y * rotation.z; - const yw = rotation.y * rotation.w; - const z2 = rotation.z * rotation.z; - const zw = rotation.z * rotation.w; - const w2 = rotation.w * rotation.w; - const m00 = x2 - y2 - z2 + w2; - const m01 = 2 * (xy - zw); - const m02 = 2 * (xz + yw); - const m10 = 2 * (xy + zw); - const m11 = -x2 + y2 - z2 + w2; - const m12 = 2 * (yz - xw); - const m20 = 2 * (xz - yw); - const m21 = 2 * (yz + xw); - const m22 = -x2 - y2 + z2 + w2; - result[0] = m00 * scaleX; - result[1] = m10 * scaleX; - result[2] = m20 * scaleX; - result[3] = 0; - result[4] = m01 * scaleY; - result[5] = m11 * scaleY; - result[6] = m21 * scaleY; - result[7] = 0; - result[8] = m02 * scaleZ; - result[9] = m12 * scaleZ; - result[10] = m22 * scaleZ; - result[11] = 0; - result[12] = translation.x; - result[13] = translation.y; - result[14] = translation.z; - result[15] = 1; - return result; -}; -Matrix4.fromTranslationRotationScale = function(translationRotationScale, result) { - Check_default.typeOf.object("translationRotationScale", translationRotationScale); - return Matrix4.fromTranslationQuaternionRotationScale( - translationRotationScale.translation, - translationRotationScale.rotation, - translationRotationScale.scale, - result - ); -}; -Matrix4.fromTranslation = function(translation, result) { - Check_default.typeOf.object("translation", translation); - return Matrix4.fromRotationTranslation(Matrix3_default.IDENTITY, translation, result); -}; -Matrix4.fromScale = function(scale, result) { - Check_default.typeOf.object("scale", scale); - if (!defined_default(result)) { - return new Matrix4( - scale.x, - 0, - 0, - 0, - 0, - scale.y, - 0, - 0, - 0, - 0, - scale.z, - 0, - 0, - 0, - 0, - 1 - ); - } - result[0] = scale.x; - result[1] = 0; - result[2] = 0; - result[3] = 0; - result[4] = 0; - result[5] = scale.y; - result[6] = 0; - result[7] = 0; - result[8] = 0; - result[9] = 0; - result[10] = scale.z; - result[11] = 0; - result[12] = 0; - result[13] = 0; - result[14] = 0; - result[15] = 1; - return result; -}; -Matrix4.fromUniformScale = function(scale, result) { - Check_default.typeOf.number("scale", scale); - if (!defined_default(result)) { - return new Matrix4( - scale, - 0, - 0, - 0, - 0, - scale, - 0, - 0, - 0, - 0, - scale, - 0, - 0, - 0, - 0, - 1 - ); - } - result[0] = scale; - result[1] = 0; - result[2] = 0; - result[3] = 0; - result[4] = 0; - result[5] = scale; - result[6] = 0; - result[7] = 0; - result[8] = 0; - result[9] = 0; - result[10] = scale; - result[11] = 0; - result[12] = 0; - result[13] = 0; - result[14] = 0; - result[15] = 1; - return result; -}; -Matrix4.fromRotation = function(rotation, result) { - Check_default.typeOf.object("rotation", rotation); - if (!defined_default(result)) { - result = new Matrix4(); - } - result[0] = rotation[0]; - result[1] = rotation[1]; - result[2] = rotation[2]; - result[3] = 0; - result[4] = rotation[3]; - result[5] = rotation[4]; - result[6] = rotation[5]; - result[7] = 0; - result[8] = rotation[6]; - result[9] = rotation[7]; - result[10] = rotation[8]; - result[11] = 0; - result[12] = 0; - result[13] = 0; - result[14] = 0; - result[15] = 1; - return result; -}; -var fromCameraF = new Cartesian3_default(); -var fromCameraR = new Cartesian3_default(); -var fromCameraU = new Cartesian3_default(); -Matrix4.fromCamera = function(camera, result) { - Check_default.typeOf.object("camera", camera); - const position = camera.position; - const direction = camera.direction; - const up = camera.up; - Check_default.typeOf.object("camera.position", position); - Check_default.typeOf.object("camera.direction", direction); - Check_default.typeOf.object("camera.up", up); - Cartesian3_default.normalize(direction, fromCameraF); - Cartesian3_default.normalize( - Cartesian3_default.cross(fromCameraF, up, fromCameraR), - fromCameraR - ); - Cartesian3_default.normalize( - Cartesian3_default.cross(fromCameraR, fromCameraF, fromCameraU), - fromCameraU - ); - const sX = fromCameraR.x; - const sY = fromCameraR.y; - const sZ = fromCameraR.z; - const fX = fromCameraF.x; - const fY = fromCameraF.y; - const fZ = fromCameraF.z; - const uX = fromCameraU.x; - const uY = fromCameraU.y; - const uZ = fromCameraU.z; - const positionX = position.x; - const positionY = position.y; - const positionZ = position.z; - const t0 = sX * -positionX + sY * -positionY + sZ * -positionZ; - const t1 = uX * -positionX + uY * -positionY + uZ * -positionZ; - const t2 = fX * positionX + fY * positionY + fZ * positionZ; - if (!defined_default(result)) { - return new Matrix4( - sX, - sY, - sZ, - t0, - uX, - uY, - uZ, - t1, - -fX, - -fY, - -fZ, - t2, - 0, - 0, - 0, - 1 - ); - } - result[0] = sX; - result[1] = uX; - result[2] = -fX; - result[3] = 0; - result[4] = sY; - result[5] = uY; - result[6] = -fY; - result[7] = 0; - result[8] = sZ; - result[9] = uZ; - result[10] = -fZ; - result[11] = 0; - result[12] = t0; - result[13] = t1; - result[14] = t2; - result[15] = 1; - return result; -}; -Matrix4.computePerspectiveFieldOfView = function(fovY, aspectRatio, near, far, result) { - Check_default.typeOf.number.greaterThan("fovY", fovY, 0); - Check_default.typeOf.number.lessThan("fovY", fovY, Math.PI); - Check_default.typeOf.number.greaterThan("near", near, 0); - Check_default.typeOf.number.greaterThan("far", far, 0); - Check_default.typeOf.object("result", result); - const bottom = Math.tan(fovY * 0.5); - const column1Row1 = 1 / bottom; - const column0Row0 = column1Row1 / aspectRatio; - const column2Row2 = (far + near) / (near - far); - const column3Row2 = 2 * far * near / (near - far); - result[0] = column0Row0; - result[1] = 0; - result[2] = 0; - result[3] = 0; - result[4] = 0; - result[5] = column1Row1; - result[6] = 0; - result[7] = 0; - result[8] = 0; - result[9] = 0; - result[10] = column2Row2; - result[11] = -1; - result[12] = 0; - result[13] = 0; - result[14] = column3Row2; - result[15] = 0; - return result; -}; -Matrix4.computeOrthographicOffCenter = function(left, right, bottom, top, near, far, result) { - Check_default.typeOf.number("left", left); - Check_default.typeOf.number("right", right); - Check_default.typeOf.number("bottom", bottom); - Check_default.typeOf.number("top", top); - Check_default.typeOf.number("near", near); - Check_default.typeOf.number("far", far); - Check_default.typeOf.object("result", result); - let a = 1 / (right - left); - let b = 1 / (top - bottom); - let c = 1 / (far - near); - const tx = -(right + left) * a; - const ty = -(top + bottom) * b; - const tz = -(far + near) * c; - a *= 2; - b *= 2; - c *= -2; - result[0] = a; - result[1] = 0; - result[2] = 0; - result[3] = 0; - result[4] = 0; - result[5] = b; - result[6] = 0; - result[7] = 0; - result[8] = 0; - result[9] = 0; - result[10] = c; - result[11] = 0; - result[12] = tx; - result[13] = ty; - result[14] = tz; - result[15] = 1; - return result; -}; -Matrix4.computePerspectiveOffCenter = function(left, right, bottom, top, near, far, result) { - Check_default.typeOf.number("left", left); - Check_default.typeOf.number("right", right); - Check_default.typeOf.number("bottom", bottom); - Check_default.typeOf.number("top", top); - Check_default.typeOf.number("near", near); - Check_default.typeOf.number("far", far); - Check_default.typeOf.object("result", result); - const column0Row0 = 2 * near / (right - left); - const column1Row1 = 2 * near / (top - bottom); - const column2Row0 = (right + left) / (right - left); - const column2Row1 = (top + bottom) / (top - bottom); - const column2Row2 = -(far + near) / (far - near); - const column2Row3 = -1; - const column3Row2 = -2 * far * near / (far - near); - result[0] = column0Row0; - result[1] = 0; - result[2] = 0; - result[3] = 0; - result[4] = 0; - result[5] = column1Row1; - result[6] = 0; - result[7] = 0; - result[8] = column2Row0; - result[9] = column2Row1; - result[10] = column2Row2; - result[11] = column2Row3; - result[12] = 0; - result[13] = 0; - result[14] = column3Row2; - result[15] = 0; - return result; -}; -Matrix4.computeInfinitePerspectiveOffCenter = function(left, right, bottom, top, near, result) { - Check_default.typeOf.number("left", left); - Check_default.typeOf.number("right", right); - Check_default.typeOf.number("bottom", bottom); - Check_default.typeOf.number("top", top); - Check_default.typeOf.number("near", near); - Check_default.typeOf.object("result", result); - const column0Row0 = 2 * near / (right - left); - const column1Row1 = 2 * near / (top - bottom); - const column2Row0 = (right + left) / (right - left); - const column2Row1 = (top + bottom) / (top - bottom); - const column2Row2 = -1; - const column2Row3 = -1; - const column3Row2 = -2 * near; - result[0] = column0Row0; - result[1] = 0; - result[2] = 0; - result[3] = 0; - result[4] = 0; - result[5] = column1Row1; - result[6] = 0; - result[7] = 0; - result[8] = column2Row0; - result[9] = column2Row1; - result[10] = column2Row2; - result[11] = column2Row3; - result[12] = 0; - result[13] = 0; - result[14] = column3Row2; - result[15] = 0; - return result; -}; -Matrix4.computeViewportTransformation = function(viewport, nearDepthRange, farDepthRange, result) { - if (!defined_default(result)) { - result = new Matrix4(); - } - viewport = defaultValue_default(viewport, defaultValue_default.EMPTY_OBJECT); - const x = defaultValue_default(viewport.x, 0); - const y = defaultValue_default(viewport.y, 0); - const width = defaultValue_default(viewport.width, 0); - const height = defaultValue_default(viewport.height, 0); - nearDepthRange = defaultValue_default(nearDepthRange, 0); - farDepthRange = defaultValue_default(farDepthRange, 1); - const halfWidth = width * 0.5; - const halfHeight = height * 0.5; - const halfDepth = (farDepthRange - nearDepthRange) * 0.5; - const column0Row0 = halfWidth; - const column1Row1 = halfHeight; - const column2Row2 = halfDepth; - const column3Row0 = x + halfWidth; - const column3Row1 = y + halfHeight; - const column3Row2 = nearDepthRange + halfDepth; - const column3Row3 = 1; - result[0] = column0Row0; - result[1] = 0; - result[2] = 0; - result[3] = 0; - result[4] = 0; - result[5] = column1Row1; - result[6] = 0; - result[7] = 0; - result[8] = 0; - result[9] = 0; - result[10] = column2Row2; - result[11] = 0; - result[12] = column3Row0; - result[13] = column3Row1; - result[14] = column3Row2; - result[15] = column3Row3; - return result; -}; -Matrix4.computeView = function(position, direction, up, right, result) { - Check_default.typeOf.object("position", position); - Check_default.typeOf.object("direction", direction); - Check_default.typeOf.object("up", up); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result[0] = right.x; - result[1] = up.x; - result[2] = -direction.x; - result[3] = 0; - result[4] = right.y; - result[5] = up.y; - result[6] = -direction.y; - result[7] = 0; - result[8] = right.z; - result[9] = up.z; - result[10] = -direction.z; - result[11] = 0; - result[12] = -Cartesian3_default.dot(right, position); - result[13] = -Cartesian3_default.dot(up, position); - result[14] = Cartesian3_default.dot(direction, position); - result[15] = 1; - return result; -}; -Matrix4.toArray = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - if (!defined_default(result)) { - return [ - matrix[0], - matrix[1], - matrix[2], - matrix[3], - matrix[4], - matrix[5], - matrix[6], - matrix[7], - matrix[8], - matrix[9], - matrix[10], - matrix[11], - matrix[12], - matrix[13], - matrix[14], - matrix[15] - ]; - } - result[0] = matrix[0]; - result[1] = matrix[1]; - result[2] = matrix[2]; - result[3] = matrix[3]; - result[4] = matrix[4]; - result[5] = matrix[5]; - result[6] = matrix[6]; - result[7] = matrix[7]; - result[8] = matrix[8]; - result[9] = matrix[9]; - result[10] = matrix[10]; - result[11] = matrix[11]; - result[12] = matrix[12]; - result[13] = matrix[13]; - result[14] = matrix[14]; - result[15] = matrix[15]; - return result; -}; -Matrix4.getElementIndex = function(column, row) { - Check_default.typeOf.number.greaterThanOrEquals("row", row, 0); - Check_default.typeOf.number.lessThanOrEquals("row", row, 3); - Check_default.typeOf.number.greaterThanOrEquals("column", column, 0); - Check_default.typeOf.number.lessThanOrEquals("column", column, 3); - return column * 4 + row; -}; -Matrix4.getColumn = function(matrix, index, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); - Check_default.typeOf.number.lessThanOrEquals("index", index, 3); - Check_default.typeOf.object("result", result); - const startIndex = index * 4; - const x = matrix[startIndex]; - const y = matrix[startIndex + 1]; - const z = matrix[startIndex + 2]; - const w = matrix[startIndex + 3]; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -}; -Matrix4.setColumn = function(matrix, index, cartesian, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); - Check_default.typeOf.number.lessThanOrEquals("index", index, 3); - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - result = Matrix4.clone(matrix, result); - const startIndex = index * 4; - result[startIndex] = cartesian.x; - result[startIndex + 1] = cartesian.y; - result[startIndex + 2] = cartesian.z; - result[startIndex + 3] = cartesian.w; - return result; -}; -Matrix4.getRow = function(matrix, index, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); - Check_default.typeOf.number.lessThanOrEquals("index", index, 3); - Check_default.typeOf.object("result", result); - const x = matrix[index]; - const y = matrix[index + 4]; - const z = matrix[index + 8]; - const w = matrix[index + 12]; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -}; -Matrix4.setRow = function(matrix, index, cartesian, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); - Check_default.typeOf.number.lessThanOrEquals("index", index, 3); - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - result = Matrix4.clone(matrix, result); - result[index] = cartesian.x; - result[index + 4] = cartesian.y; - result[index + 8] = cartesian.z; - result[index + 12] = cartesian.w; - return result; -}; -Matrix4.setTranslation = function(matrix, translation, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("translation", translation); - Check_default.typeOf.object("result", result); - result[0] = matrix[0]; - result[1] = matrix[1]; - result[2] = matrix[2]; - result[3] = matrix[3]; - result[4] = matrix[4]; - result[5] = matrix[5]; - result[6] = matrix[6]; - result[7] = matrix[7]; - result[8] = matrix[8]; - result[9] = matrix[9]; - result[10] = matrix[10]; - result[11] = matrix[11]; - result[12] = translation.x; - result[13] = translation.y; - result[14] = translation.z; - result[15] = matrix[15]; - return result; -}; -var scaleScratch1 = new Cartesian3_default(); -Matrix4.setScale = function(matrix, scale, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("scale", scale); - Check_default.typeOf.object("result", result); - const existingScale = Matrix4.getScale(matrix, scaleScratch1); - const scaleRatioX = scale.x / existingScale.x; - const scaleRatioY = scale.y / existingScale.y; - const scaleRatioZ = scale.z / existingScale.z; - result[0] = matrix[0] * scaleRatioX; - result[1] = matrix[1] * scaleRatioX; - result[2] = matrix[2] * scaleRatioX; - result[3] = matrix[3]; - result[4] = matrix[4] * scaleRatioY; - result[5] = matrix[5] * scaleRatioY; - result[6] = matrix[6] * scaleRatioY; - result[7] = matrix[7]; - result[8] = matrix[8] * scaleRatioZ; - result[9] = matrix[9] * scaleRatioZ; - result[10] = matrix[10] * scaleRatioZ; - result[11] = matrix[11]; - result[12] = matrix[12]; - result[13] = matrix[13]; - result[14] = matrix[14]; - result[15] = matrix[15]; - return result; -}; -var scaleScratch2 = new Cartesian3_default(); -Matrix4.setUniformScale = function(matrix, scale, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number("scale", scale); - Check_default.typeOf.object("result", result); - const existingScale = Matrix4.getScale(matrix, scaleScratch2); - const scaleRatioX = scale / existingScale.x; - const scaleRatioY = scale / existingScale.y; - const scaleRatioZ = scale / existingScale.z; - result[0] = matrix[0] * scaleRatioX; - result[1] = matrix[1] * scaleRatioX; - result[2] = matrix[2] * scaleRatioX; - result[3] = matrix[3]; - result[4] = matrix[4] * scaleRatioY; - result[5] = matrix[5] * scaleRatioY; - result[6] = matrix[6] * scaleRatioY; - result[7] = matrix[7]; - result[8] = matrix[8] * scaleRatioZ; - result[9] = matrix[9] * scaleRatioZ; - result[10] = matrix[10] * scaleRatioZ; - result[11] = matrix[11]; - result[12] = matrix[12]; - result[13] = matrix[13]; - result[14] = matrix[14]; - result[15] = matrix[15]; - return result; -}; -var scratchColumn = new Cartesian3_default(); -Matrix4.getScale = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - result.x = Cartesian3_default.magnitude( - Cartesian3_default.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn) - ); - result.y = Cartesian3_default.magnitude( - Cartesian3_default.fromElements(matrix[4], matrix[5], matrix[6], scratchColumn) - ); - result.z = Cartesian3_default.magnitude( - Cartesian3_default.fromElements(matrix[8], matrix[9], matrix[10], scratchColumn) - ); - return result; -}; -var scaleScratch3 = new Cartesian3_default(); -Matrix4.getMaximumScale = function(matrix) { - Matrix4.getScale(matrix, scaleScratch3); - return Cartesian3_default.maximumComponent(scaleScratch3); -}; -var scaleScratch4 = new Cartesian3_default(); -Matrix4.setRotation = function(matrix, rotation, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - const scale = Matrix4.getScale(matrix, scaleScratch4); - result[0] = rotation[0] * scale.x; - result[1] = rotation[1] * scale.x; - result[2] = rotation[2] * scale.x; - result[3] = matrix[3]; - result[4] = rotation[3] * scale.y; - result[5] = rotation[4] * scale.y; - result[6] = rotation[5] * scale.y; - result[7] = matrix[7]; - result[8] = rotation[6] * scale.z; - result[9] = rotation[7] * scale.z; - result[10] = rotation[8] * scale.z; - result[11] = matrix[11]; - result[12] = matrix[12]; - result[13] = matrix[13]; - result[14] = matrix[14]; - result[15] = matrix[15]; - return result; -}; -var scaleScratch5 = new Cartesian3_default(); -Matrix4.getRotation = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - const scale = Matrix4.getScale(matrix, scaleScratch5); - result[0] = matrix[0] / scale.x; - result[1] = matrix[1] / scale.x; - result[2] = matrix[2] / scale.x; - result[3] = matrix[4] / scale.y; - result[4] = matrix[5] / scale.y; - result[5] = matrix[6] / scale.y; - result[6] = matrix[8] / scale.z; - result[7] = matrix[9] / scale.z; - result[8] = matrix[10] / scale.z; - return result; -}; -Matrix4.multiply = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - const left0 = left[0]; - const left1 = left[1]; - const left2 = left[2]; - const left3 = left[3]; - const left4 = left[4]; - const left5 = left[5]; - const left6 = left[6]; - const left7 = left[7]; - const left8 = left[8]; - const left9 = left[9]; - const left10 = left[10]; - const left11 = left[11]; - const left12 = left[12]; - const left13 = left[13]; - const left14 = left[14]; - const left15 = left[15]; - const right0 = right[0]; - const right1 = right[1]; - const right2 = right[2]; - const right3 = right[3]; - const right4 = right[4]; - const right5 = right[5]; - const right6 = right[6]; - const right7 = right[7]; - const right8 = right[8]; - const right9 = right[9]; - const right10 = right[10]; - const right11 = right[11]; - const right12 = right[12]; - const right13 = right[13]; - const right14 = right[14]; - const right15 = right[15]; - const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2 + left12 * right3; - const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2 + left13 * right3; - const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2 + left14 * right3; - const column0Row3 = left3 * right0 + left7 * right1 + left11 * right2 + left15 * right3; - const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6 + left12 * right7; - const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6 + left13 * right7; - const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6 + left14 * right7; - const column1Row3 = left3 * right4 + left7 * right5 + left11 * right6 + left15 * right7; - const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10 + left12 * right11; - const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10 + left13 * right11; - const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10 + left14 * right11; - const column2Row3 = left3 * right8 + left7 * right9 + left11 * right10 + left15 * right11; - const column3Row0 = left0 * right12 + left4 * right13 + left8 * right14 + left12 * right15; - const column3Row1 = left1 * right12 + left5 * right13 + left9 * right14 + left13 * right15; - const column3Row2 = left2 * right12 + left6 * right13 + left10 * right14 + left14 * right15; - const column3Row3 = left3 * right12 + left7 * right13 + left11 * right14 + left15 * right15; - result[0] = column0Row0; - result[1] = column0Row1; - result[2] = column0Row2; - result[3] = column0Row3; - result[4] = column1Row0; - result[5] = column1Row1; - result[6] = column1Row2; - result[7] = column1Row3; - result[8] = column2Row0; - result[9] = column2Row1; - result[10] = column2Row2; - result[11] = column2Row3; - result[12] = column3Row0; - result[13] = column3Row1; - result[14] = column3Row2; - result[15] = column3Row3; - return result; -}; -Matrix4.add = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result[0] = left[0] + right[0]; - result[1] = left[1] + right[1]; - result[2] = left[2] + right[2]; - result[3] = left[3] + right[3]; - result[4] = left[4] + right[4]; - result[5] = left[5] + right[5]; - result[6] = left[6] + right[6]; - result[7] = left[7] + right[7]; - result[8] = left[8] + right[8]; - result[9] = left[9] + right[9]; - result[10] = left[10] + right[10]; - result[11] = left[11] + right[11]; - result[12] = left[12] + right[12]; - result[13] = left[13] + right[13]; - result[14] = left[14] + right[14]; - result[15] = left[15] + right[15]; - return result; -}; -Matrix4.subtract = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result[0] = left[0] - right[0]; - result[1] = left[1] - right[1]; - result[2] = left[2] - right[2]; - result[3] = left[3] - right[3]; - result[4] = left[4] - right[4]; - result[5] = left[5] - right[5]; - result[6] = left[6] - right[6]; - result[7] = left[7] - right[7]; - result[8] = left[8] - right[8]; - result[9] = left[9] - right[9]; - result[10] = left[10] - right[10]; - result[11] = left[11] - right[11]; - result[12] = left[12] - right[12]; - result[13] = left[13] - right[13]; - result[14] = left[14] - right[14]; - result[15] = left[15] - right[15]; - return result; -}; -Matrix4.multiplyTransformation = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - const left0 = left[0]; - const left1 = left[1]; - const left2 = left[2]; - const left4 = left[4]; - const left5 = left[5]; - const left6 = left[6]; - const left8 = left[8]; - const left9 = left[9]; - const left10 = left[10]; - const left12 = left[12]; - const left13 = left[13]; - const left14 = left[14]; - const right0 = right[0]; - const right1 = right[1]; - const right2 = right[2]; - const right4 = right[4]; - const right5 = right[5]; - const right6 = right[6]; - const right8 = right[8]; - const right9 = right[9]; - const right10 = right[10]; - const right12 = right[12]; - const right13 = right[13]; - const right14 = right[14]; - const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2; - const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2; - const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2; - const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6; - const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6; - const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6; - const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10; - const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10; - const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10; - const column3Row0 = left0 * right12 + left4 * right13 + left8 * right14 + left12; - const column3Row1 = left1 * right12 + left5 * right13 + left9 * right14 + left13; - const column3Row2 = left2 * right12 + left6 * right13 + left10 * right14 + left14; - result[0] = column0Row0; - result[1] = column0Row1; - result[2] = column0Row2; - result[3] = 0; - result[4] = column1Row0; - result[5] = column1Row1; - result[6] = column1Row2; - result[7] = 0; - result[8] = column2Row0; - result[9] = column2Row1; - result[10] = column2Row2; - result[11] = 0; - result[12] = column3Row0; - result[13] = column3Row1; - result[14] = column3Row2; - result[15] = 1; - return result; -}; -Matrix4.multiplyByMatrix3 = function(matrix, rotation, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("rotation", rotation); - Check_default.typeOf.object("result", result); - const left0 = matrix[0]; - const left1 = matrix[1]; - const left2 = matrix[2]; - const left4 = matrix[4]; - const left5 = matrix[5]; - const left6 = matrix[6]; - const left8 = matrix[8]; - const left9 = matrix[9]; - const left10 = matrix[10]; - const right0 = rotation[0]; - const right1 = rotation[1]; - const right2 = rotation[2]; - const right4 = rotation[3]; - const right5 = rotation[4]; - const right6 = rotation[5]; - const right8 = rotation[6]; - const right9 = rotation[7]; - const right10 = rotation[8]; - const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2; - const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2; - const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2; - const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6; - const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6; - const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6; - const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10; - const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10; - const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10; - result[0] = column0Row0; - result[1] = column0Row1; - result[2] = column0Row2; - result[3] = 0; - result[4] = column1Row0; - result[5] = column1Row1; - result[6] = column1Row2; - result[7] = 0; - result[8] = column2Row0; - result[9] = column2Row1; - result[10] = column2Row2; - result[11] = 0; - result[12] = matrix[12]; - result[13] = matrix[13]; - result[14] = matrix[14]; - result[15] = matrix[15]; - return result; -}; -Matrix4.multiplyByTranslation = function(matrix, translation, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("translation", translation); - Check_default.typeOf.object("result", result); - const x = translation.x; - const y = translation.y; - const z = translation.z; - const tx = x * matrix[0] + y * matrix[4] + z * matrix[8] + matrix[12]; - const ty = x * matrix[1] + y * matrix[5] + z * matrix[9] + matrix[13]; - const tz = x * matrix[2] + y * matrix[6] + z * matrix[10] + matrix[14]; - result[0] = matrix[0]; - result[1] = matrix[1]; - result[2] = matrix[2]; - result[3] = matrix[3]; - result[4] = matrix[4]; - result[5] = matrix[5]; - result[6] = matrix[6]; - result[7] = matrix[7]; - result[8] = matrix[8]; - result[9] = matrix[9]; - result[10] = matrix[10]; - result[11] = matrix[11]; - result[12] = tx; - result[13] = ty; - result[14] = tz; - result[15] = matrix[15]; - return result; -}; -Matrix4.multiplyByScale = function(matrix, scale, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("scale", scale); - Check_default.typeOf.object("result", result); - const scaleX = scale.x; - const scaleY = scale.y; - const scaleZ = scale.z; - if (scaleX === 1 && scaleY === 1 && scaleZ === 1) { - return Matrix4.clone(matrix, result); - } - result[0] = scaleX * matrix[0]; - result[1] = scaleX * matrix[1]; - result[2] = scaleX * matrix[2]; - result[3] = matrix[3]; - result[4] = scaleY * matrix[4]; - result[5] = scaleY * matrix[5]; - result[6] = scaleY * matrix[6]; - result[7] = matrix[7]; - result[8] = scaleZ * matrix[8]; - result[9] = scaleZ * matrix[9]; - result[10] = scaleZ * matrix[10]; - result[11] = matrix[11]; - result[12] = matrix[12]; - result[13] = matrix[13]; - result[14] = matrix[14]; - result[15] = matrix[15]; - return result; -}; -Matrix4.multiplyByUniformScale = function(matrix, scale, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number("scale", scale); - Check_default.typeOf.object("result", result); - result[0] = matrix[0] * scale; - result[1] = matrix[1] * scale; - result[2] = matrix[2] * scale; - result[3] = matrix[3]; - result[4] = matrix[4] * scale; - result[5] = matrix[5] * scale; - result[6] = matrix[6] * scale; - result[7] = matrix[7]; - result[8] = matrix[8] * scale; - result[9] = matrix[9] * scale; - result[10] = matrix[10] * scale; - result[11] = matrix[11]; - result[12] = matrix[12]; - result[13] = matrix[13]; - result[14] = matrix[14]; - result[15] = matrix[15]; - return result; -}; -Matrix4.multiplyByVector = function(matrix, cartesian, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - const vX = cartesian.x; - const vY = cartesian.y; - const vZ = cartesian.z; - const vW = cartesian.w; - const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12] * vW; - const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13] * vW; - const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14] * vW; - const w = matrix[3] * vX + matrix[7] * vY + matrix[11] * vZ + matrix[15] * vW; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -}; -Matrix4.multiplyByPointAsVector = function(matrix, cartesian, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - const vX = cartesian.x; - const vY = cartesian.y; - const vZ = cartesian.z; - const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ; - const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ; - const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ; - result.x = x; - result.y = y; - result.z = z; - return result; -}; -Matrix4.multiplyByPoint = function(matrix, cartesian, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - const vX = cartesian.x; - const vY = cartesian.y; - const vZ = cartesian.z; - const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12]; - const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13]; - const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14]; - result.x = x; - result.y = y; - result.z = z; - return result; -}; -Matrix4.multiplyByScalar = function(matrix, scalar, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number("scalar", scalar); - Check_default.typeOf.object("result", result); - result[0] = matrix[0] * scalar; - result[1] = matrix[1] * scalar; - result[2] = matrix[2] * scalar; - result[3] = matrix[3] * scalar; - result[4] = matrix[4] * scalar; - result[5] = matrix[5] * scalar; - result[6] = matrix[6] * scalar; - result[7] = matrix[7] * scalar; - result[8] = matrix[8] * scalar; - result[9] = matrix[9] * scalar; - result[10] = matrix[10] * scalar; - result[11] = matrix[11] * scalar; - result[12] = matrix[12] * scalar; - result[13] = matrix[13] * scalar; - result[14] = matrix[14] * scalar; - result[15] = matrix[15] * scalar; - return result; -}; -Matrix4.negate = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - result[0] = -matrix[0]; - result[1] = -matrix[1]; - result[2] = -matrix[2]; - result[3] = -matrix[3]; - result[4] = -matrix[4]; - result[5] = -matrix[5]; - result[6] = -matrix[6]; - result[7] = -matrix[7]; - result[8] = -matrix[8]; - result[9] = -matrix[9]; - result[10] = -matrix[10]; - result[11] = -matrix[11]; - result[12] = -matrix[12]; - result[13] = -matrix[13]; - result[14] = -matrix[14]; - result[15] = -matrix[15]; - return result; -}; -Matrix4.transpose = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - const matrix1 = matrix[1]; - const matrix2 = matrix[2]; - const matrix3 = matrix[3]; - const matrix6 = matrix[6]; - const matrix7 = matrix[7]; - const matrix11 = matrix[11]; - result[0] = matrix[0]; - result[1] = matrix[4]; - result[2] = matrix[8]; - result[3] = matrix[12]; - result[4] = matrix1; - result[5] = matrix[5]; - result[6] = matrix[9]; - result[7] = matrix[13]; - result[8] = matrix2; - result[9] = matrix6; - result[10] = matrix[10]; - result[11] = matrix[14]; - result[12] = matrix3; - result[13] = matrix7; - result[14] = matrix11; - result[15] = matrix[15]; - return result; -}; -Matrix4.abs = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - result[0] = Math.abs(matrix[0]); - result[1] = Math.abs(matrix[1]); - result[2] = Math.abs(matrix[2]); - result[3] = Math.abs(matrix[3]); - result[4] = Math.abs(matrix[4]); - result[5] = Math.abs(matrix[5]); - result[6] = Math.abs(matrix[6]); - result[7] = Math.abs(matrix[7]); - result[8] = Math.abs(matrix[8]); - result[9] = Math.abs(matrix[9]); - result[10] = Math.abs(matrix[10]); - result[11] = Math.abs(matrix[11]); - result[12] = Math.abs(matrix[12]); - result[13] = Math.abs(matrix[13]); - result[14] = Math.abs(matrix[14]); - result[15] = Math.abs(matrix[15]); - return result; -}; -Matrix4.equals = function(left, right) { - return left === right || defined_default(left) && defined_default(right) && // Translation - left[12] === right[12] && left[13] === right[13] && left[14] === right[14] && // Rotation/scale - left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[4] === right[4] && left[5] === right[5] && left[6] === right[6] && left[8] === right[8] && left[9] === right[9] && left[10] === right[10] && // Bottom row - left[3] === right[3] && left[7] === right[7] && left[11] === right[11] && left[15] === right[15]; -}; -Matrix4.equalsEpsilon = function(left, right, epsilon) { - epsilon = defaultValue_default(epsilon, 0); - return left === right || defined_default(left) && defined_default(right) && Math.abs(left[0] - right[0]) <= epsilon && Math.abs(left[1] - right[1]) <= epsilon && Math.abs(left[2] - right[2]) <= epsilon && Math.abs(left[3] - right[3]) <= epsilon && Math.abs(left[4] - right[4]) <= epsilon && Math.abs(left[5] - right[5]) <= epsilon && Math.abs(left[6] - right[6]) <= epsilon && Math.abs(left[7] - right[7]) <= epsilon && Math.abs(left[8] - right[8]) <= epsilon && Math.abs(left[9] - right[9]) <= epsilon && Math.abs(left[10] - right[10]) <= epsilon && Math.abs(left[11] - right[11]) <= epsilon && Math.abs(left[12] - right[12]) <= epsilon && Math.abs(left[13] - right[13]) <= epsilon && Math.abs(left[14] - right[14]) <= epsilon && Math.abs(left[15] - right[15]) <= epsilon; -}; -Matrix4.getTranslation = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - result.x = matrix[12]; - result.y = matrix[13]; - result.z = matrix[14]; - return result; -}; -Matrix4.getMatrix3 = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - result[0] = matrix[0]; - result[1] = matrix[1]; - result[2] = matrix[2]; - result[3] = matrix[4]; - result[4] = matrix[5]; - result[5] = matrix[6]; - result[6] = matrix[8]; - result[7] = matrix[9]; - result[8] = matrix[10]; - return result; -}; -var scratchInverseRotation = new Matrix3_default(); -var scratchMatrix3Zero = new Matrix3_default(); -var scratchBottomRow = new Cartesian4_default(); -var scratchExpectedBottomRow = new Cartesian4_default(0, 0, 0, 1); -Matrix4.inverse = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - const src0 = matrix[0]; - const src1 = matrix[4]; - const src2 = matrix[8]; - const src3 = matrix[12]; - const src4 = matrix[1]; - const src5 = matrix[5]; - const src6 = matrix[9]; - const src7 = matrix[13]; - const src8 = matrix[2]; - const src9 = matrix[6]; - const src10 = matrix[10]; - const src11 = matrix[14]; - const src12 = matrix[3]; - const src13 = matrix[7]; - const src14 = matrix[11]; - const src15 = matrix[15]; - let tmp0 = src10 * src15; - let tmp1 = src11 * src14; - let tmp2 = src9 * src15; - let tmp3 = src11 * src13; - let tmp4 = src9 * src14; - let tmp5 = src10 * src13; - let tmp6 = src8 * src15; - let tmp7 = src11 * src12; - let tmp8 = src8 * src14; - let tmp9 = src10 * src12; - let tmp10 = src8 * src13; - let tmp11 = src9 * src12; - const dst0 = tmp0 * src5 + tmp3 * src6 + tmp4 * src7 - (tmp1 * src5 + tmp2 * src6 + tmp5 * src7); - const dst1 = tmp1 * src4 + tmp6 * src6 + tmp9 * src7 - (tmp0 * src4 + tmp7 * src6 + tmp8 * src7); - const dst2 = tmp2 * src4 + tmp7 * src5 + tmp10 * src7 - (tmp3 * src4 + tmp6 * src5 + tmp11 * src7); - const dst3 = tmp5 * src4 + tmp8 * src5 + tmp11 * src6 - (tmp4 * src4 + tmp9 * src5 + tmp10 * src6); - const dst4 = tmp1 * src1 + tmp2 * src2 + tmp5 * src3 - (tmp0 * src1 + tmp3 * src2 + tmp4 * src3); - const dst5 = tmp0 * src0 + tmp7 * src2 + tmp8 * src3 - (tmp1 * src0 + tmp6 * src2 + tmp9 * src3); - const dst6 = tmp3 * src0 + tmp6 * src1 + tmp11 * src3 - (tmp2 * src0 + tmp7 * src1 + tmp10 * src3); - const dst7 = tmp4 * src0 + tmp9 * src1 + tmp10 * src2 - (tmp5 * src0 + tmp8 * src1 + tmp11 * src2); - tmp0 = src2 * src7; - tmp1 = src3 * src6; - tmp2 = src1 * src7; - tmp3 = src3 * src5; - tmp4 = src1 * src6; - tmp5 = src2 * src5; - tmp6 = src0 * src7; - tmp7 = src3 * src4; - tmp8 = src0 * src6; - tmp9 = src2 * src4; - tmp10 = src0 * src5; - tmp11 = src1 * src4; - const dst8 = tmp0 * src13 + tmp3 * src14 + tmp4 * src15 - (tmp1 * src13 + tmp2 * src14 + tmp5 * src15); - const dst9 = tmp1 * src12 + tmp6 * src14 + tmp9 * src15 - (tmp0 * src12 + tmp7 * src14 + tmp8 * src15); - const dst10 = tmp2 * src12 + tmp7 * src13 + tmp10 * src15 - (tmp3 * src12 + tmp6 * src13 + tmp11 * src15); - const dst11 = tmp5 * src12 + tmp8 * src13 + tmp11 * src14 - (tmp4 * src12 + tmp9 * src13 + tmp10 * src14); - const dst12 = tmp2 * src10 + tmp5 * src11 + tmp1 * src9 - (tmp4 * src11 + tmp0 * src9 + tmp3 * src10); - const dst13 = tmp8 * src11 + tmp0 * src8 + tmp7 * src10 - (tmp6 * src10 + tmp9 * src11 + tmp1 * src8); - const dst14 = tmp6 * src9 + tmp11 * src11 + tmp3 * src8 - (tmp10 * src11 + tmp2 * src8 + tmp7 * src9); - const dst15 = tmp10 * src10 + tmp4 * src8 + tmp9 * src9 - (tmp8 * src9 + tmp11 * src10 + tmp5 * src8); - let det = src0 * dst0 + src1 * dst1 + src2 * dst2 + src3 * dst3; - if (Math.abs(det) < Math_default.EPSILON21) { - if (Matrix3_default.equalsEpsilon( - Matrix4.getMatrix3(matrix, scratchInverseRotation), - scratchMatrix3Zero, - Math_default.EPSILON7 - ) && Cartesian4_default.equals( - Matrix4.getRow(matrix, 3, scratchBottomRow), - scratchExpectedBottomRow - )) { - result[0] = 0; - result[1] = 0; - result[2] = 0; - result[3] = 0; - result[4] = 0; - result[5] = 0; - result[6] = 0; - result[7] = 0; - result[8] = 0; - result[9] = 0; - result[10] = 0; - result[11] = 0; - result[12] = -matrix[12]; - result[13] = -matrix[13]; - result[14] = -matrix[14]; - result[15] = 1; - return result; - } - throw new RuntimeError_default( - "matrix is not invertible because its determinate is zero." - ); - } - det = 1 / det; - result[0] = dst0 * det; - result[1] = dst1 * det; - result[2] = dst2 * det; - result[3] = dst3 * det; - result[4] = dst4 * det; - result[5] = dst5 * det; - result[6] = dst6 * det; - result[7] = dst7 * det; - result[8] = dst8 * det; - result[9] = dst9 * det; - result[10] = dst10 * det; - result[11] = dst11 * det; - result[12] = dst12 * det; - result[13] = dst13 * det; - result[14] = dst14 * det; - result[15] = dst15 * det; - return result; -}; -Matrix4.inverseTransformation = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - const matrix0 = matrix[0]; - const matrix1 = matrix[1]; - const matrix2 = matrix[2]; - const matrix4 = matrix[4]; - const matrix5 = matrix[5]; - const matrix6 = matrix[6]; - const matrix8 = matrix[8]; - const matrix9 = matrix[9]; - const matrix10 = matrix[10]; - const vX = matrix[12]; - const vY = matrix[13]; - const vZ = matrix[14]; - const x = -matrix0 * vX - matrix1 * vY - matrix2 * vZ; - const y = -matrix4 * vX - matrix5 * vY - matrix6 * vZ; - const z = -matrix8 * vX - matrix9 * vY - matrix10 * vZ; - result[0] = matrix0; - result[1] = matrix4; - result[2] = matrix8; - result[3] = 0; - result[4] = matrix1; - result[5] = matrix5; - result[6] = matrix9; - result[7] = 0; - result[8] = matrix2; - result[9] = matrix6; - result[10] = matrix10; - result[11] = 0; - result[12] = x; - result[13] = y; - result[14] = z; - result[15] = 1; - return result; -}; -var scratchTransposeMatrix = new Matrix4(); -Matrix4.inverseTranspose = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - return Matrix4.inverse( - Matrix4.transpose(matrix, scratchTransposeMatrix), - result - ); -}; -Matrix4.IDENTITY = Object.freeze( - new Matrix4( - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ) -); -Matrix4.ZERO = Object.freeze( - new Matrix4( - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ) -); -Matrix4.COLUMN0ROW0 = 0; -Matrix4.COLUMN0ROW1 = 1; -Matrix4.COLUMN0ROW2 = 2; -Matrix4.COLUMN0ROW3 = 3; -Matrix4.COLUMN1ROW0 = 4; -Matrix4.COLUMN1ROW1 = 5; -Matrix4.COLUMN1ROW2 = 6; -Matrix4.COLUMN1ROW3 = 7; -Matrix4.COLUMN2ROW0 = 8; -Matrix4.COLUMN2ROW1 = 9; -Matrix4.COLUMN2ROW2 = 10; -Matrix4.COLUMN2ROW3 = 11; -Matrix4.COLUMN3ROW0 = 12; -Matrix4.COLUMN3ROW1 = 13; -Matrix4.COLUMN3ROW2 = 14; -Matrix4.COLUMN3ROW3 = 15; -Object.defineProperties(Matrix4.prototype, { - /** - * Gets the number of items in the collection. - * @memberof Matrix4.prototype - * - * @type {number} - */ - length: { - get: function() { - return Matrix4.packedLength; - } - } -}); -Matrix4.prototype.clone = function(result) { - return Matrix4.clone(this, result); -}; -Matrix4.prototype.equals = function(right) { - return Matrix4.equals(this, right); -}; -Matrix4.equalsArray = function(matrix, array, offset) { - return matrix[0] === array[offset] && matrix[1] === array[offset + 1] && matrix[2] === array[offset + 2] && matrix[3] === array[offset + 3] && matrix[4] === array[offset + 4] && matrix[5] === array[offset + 5] && matrix[6] === array[offset + 6] && matrix[7] === array[offset + 7] && matrix[8] === array[offset + 8] && matrix[9] === array[offset + 9] && matrix[10] === array[offset + 10] && matrix[11] === array[offset + 11] && matrix[12] === array[offset + 12] && matrix[13] === array[offset + 13] && matrix[14] === array[offset + 14] && matrix[15] === array[offset + 15]; -}; -Matrix4.prototype.equalsEpsilon = function(right, epsilon) { - return Matrix4.equalsEpsilon(this, right, epsilon); -}; -Matrix4.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 Matrix4_default = Matrix4; - -// packages/engine/Source/Core/Rectangle.js -function Rectangle(west, south, east, north) { - this.west = defaultValue_default(west, 0); - this.south = defaultValue_default(south, 0); - this.east = defaultValue_default(east, 0); - this.north = defaultValue_default(north, 0); -} -Object.defineProperties(Rectangle.prototype, { - /** - * Gets the width of the rectangle in radians. - * @memberof Rectangle.prototype - * @type {number} - * @readonly - */ - width: { - get: function() { - return Rectangle.computeWidth(this); - } - }, - /** - * Gets the height of the rectangle in radians. - * @memberof Rectangle.prototype - * @type {number} - * @readonly - */ - height: { - get: function() { - return Rectangle.computeHeight(this); - } - } -}); -Rectangle.packedLength = 4; -Rectangle.pack = function(value, array, startingIndex) { - Check_default.typeOf.object("value", value); - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - array[startingIndex++] = value.west; - array[startingIndex++] = value.south; - array[startingIndex++] = value.east; - array[startingIndex] = value.north; - return array; -}; -Rectangle.unpack = function(array, startingIndex, result) { - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - if (!defined_default(result)) { - result = new Rectangle(); - } - result.west = array[startingIndex++]; - result.south = array[startingIndex++]; - result.east = array[startingIndex++]; - result.north = array[startingIndex]; - return result; -}; -Rectangle.computeWidth = function(rectangle) { - Check_default.typeOf.object("rectangle", rectangle); - let east = rectangle.east; - const west = rectangle.west; - if (east < west) { - east += Math_default.TWO_PI; - } - return east - west; -}; -Rectangle.computeHeight = function(rectangle) { - Check_default.typeOf.object("rectangle", rectangle); - return rectangle.north - rectangle.south; -}; -Rectangle.fromDegrees = function(west, south, east, north, result) { - west = Math_default.toRadians(defaultValue_default(west, 0)); - south = Math_default.toRadians(defaultValue_default(south, 0)); - east = Math_default.toRadians(defaultValue_default(east, 0)); - north = Math_default.toRadians(defaultValue_default(north, 0)); - if (!defined_default(result)) { - return new Rectangle(west, south, east, north); - } - result.west = west; - result.south = south; - result.east = east; - result.north = north; - return result; -}; -Rectangle.fromRadians = function(west, south, east, north, result) { - if (!defined_default(result)) { - return new Rectangle(west, south, east, north); - } - result.west = defaultValue_default(west, 0); - result.south = defaultValue_default(south, 0); - result.east = defaultValue_default(east, 0); - result.north = defaultValue_default(north, 0); - return result; -}; -Rectangle.fromCartographicArray = function(cartographics, result) { - Check_default.defined("cartographics", cartographics); - let west = Number.MAX_VALUE; - let east = -Number.MAX_VALUE; - let westOverIDL = Number.MAX_VALUE; - let eastOverIDL = -Number.MAX_VALUE; - let south = Number.MAX_VALUE; - let north = -Number.MAX_VALUE; - for (let i = 0, len = cartographics.length; i < len; i++) { - const position = cartographics[i]; - west = Math.min(west, position.longitude); - east = Math.max(east, position.longitude); - south = Math.min(south, position.latitude); - north = Math.max(north, position.latitude); - const lonAdjusted = position.longitude >= 0 ? position.longitude : position.longitude + Math_default.TWO_PI; - westOverIDL = Math.min(westOverIDL, lonAdjusted); - eastOverIDL = Math.max(eastOverIDL, lonAdjusted); - } - if (east - west > eastOverIDL - westOverIDL) { - west = westOverIDL; - east = eastOverIDL; - if (east > Math_default.PI) { - east = east - Math_default.TWO_PI; - } - if (west > Math_default.PI) { - west = west - Math_default.TWO_PI; - } - } - if (!defined_default(result)) { - return new Rectangle(west, south, east, north); - } - result.west = west; - result.south = south; - result.east = east; - result.north = north; - return result; -}; -Rectangle.fromCartesianArray = function(cartesians, ellipsoid, result) { - Check_default.defined("cartesians", cartesians); - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); - let west = Number.MAX_VALUE; - let east = -Number.MAX_VALUE; - let westOverIDL = Number.MAX_VALUE; - let eastOverIDL = -Number.MAX_VALUE; - let south = Number.MAX_VALUE; - let north = -Number.MAX_VALUE; - for (let i = 0, len = cartesians.length; i < len; i++) { - const position = ellipsoid.cartesianToCartographic(cartesians[i]); - west = Math.min(west, position.longitude); - east = Math.max(east, position.longitude); - south = Math.min(south, position.latitude); - north = Math.max(north, position.latitude); - const lonAdjusted = position.longitude >= 0 ? position.longitude : position.longitude + Math_default.TWO_PI; - westOverIDL = Math.min(westOverIDL, lonAdjusted); - eastOverIDL = Math.max(eastOverIDL, lonAdjusted); - } - if (east - west > eastOverIDL - westOverIDL) { - west = westOverIDL; - east = eastOverIDL; - if (east > Math_default.PI) { - east = east - Math_default.TWO_PI; - } - if (west > Math_default.PI) { - west = west - Math_default.TWO_PI; - } - } - if (!defined_default(result)) { - return new Rectangle(west, south, east, north); - } - result.west = west; - result.south = south; - result.east = east; - result.north = north; - return result; -}; -Rectangle.clone = function(rectangle, result) { - if (!defined_default(rectangle)) { - return void 0; - } - if (!defined_default(result)) { - return new Rectangle( - rectangle.west, - rectangle.south, - rectangle.east, - rectangle.north - ); - } - result.west = rectangle.west; - result.south = rectangle.south; - result.east = rectangle.east; - result.north = rectangle.north; - return result; -}; -Rectangle.equalsEpsilon = function(left, right, absoluteEpsilon) { - absoluteEpsilon = defaultValue_default(absoluteEpsilon, 0); - return left === right || defined_default(left) && defined_default(right) && Math.abs(left.west - right.west) <= absoluteEpsilon && Math.abs(left.south - right.south) <= absoluteEpsilon && Math.abs(left.east - right.east) <= absoluteEpsilon && Math.abs(left.north - right.north) <= absoluteEpsilon; -}; -Rectangle.prototype.clone = function(result) { - return Rectangle.clone(this, result); -}; -Rectangle.prototype.equals = function(other) { - return Rectangle.equals(this, other); -}; -Rectangle.equals = function(left, right) { - return left === right || defined_default(left) && defined_default(right) && left.west === right.west && left.south === right.south && left.east === right.east && left.north === right.north; -}; -Rectangle.prototype.equalsEpsilon = function(other, epsilon) { - return Rectangle.equalsEpsilon(this, other, epsilon); -}; -Rectangle.validate = function(rectangle) { - Check_default.typeOf.object("rectangle", rectangle); - const north = rectangle.north; - Check_default.typeOf.number.greaterThanOrEquals( - "north", - north, - -Math_default.PI_OVER_TWO - ); - Check_default.typeOf.number.lessThanOrEquals("north", north, Math_default.PI_OVER_TWO); - const south = rectangle.south; - Check_default.typeOf.number.greaterThanOrEquals( - "south", - south, - -Math_default.PI_OVER_TWO - ); - Check_default.typeOf.number.lessThanOrEquals("south", south, Math_default.PI_OVER_TWO); - const west = rectangle.west; - Check_default.typeOf.number.greaterThanOrEquals("west", west, -Math.PI); - Check_default.typeOf.number.lessThanOrEquals("west", west, Math.PI); - const east = rectangle.east; - Check_default.typeOf.number.greaterThanOrEquals("east", east, -Math.PI); - Check_default.typeOf.number.lessThanOrEquals("east", east, Math.PI); -}; -Rectangle.southwest = function(rectangle, result) { - Check_default.typeOf.object("rectangle", rectangle); - if (!defined_default(result)) { - return new Cartographic_default(rectangle.west, rectangle.south); - } - result.longitude = rectangle.west; - result.latitude = rectangle.south; - result.height = 0; - return result; -}; -Rectangle.northwest = function(rectangle, result) { - Check_default.typeOf.object("rectangle", rectangle); - if (!defined_default(result)) { - return new Cartographic_default(rectangle.west, rectangle.north); - } - result.longitude = rectangle.west; - result.latitude = rectangle.north; - result.height = 0; - return result; -}; -Rectangle.northeast = function(rectangle, result) { - Check_default.typeOf.object("rectangle", rectangle); - if (!defined_default(result)) { - return new Cartographic_default(rectangle.east, rectangle.north); - } - result.longitude = rectangle.east; - result.latitude = rectangle.north; - result.height = 0; - return result; -}; -Rectangle.southeast = function(rectangle, result) { - Check_default.typeOf.object("rectangle", rectangle); - if (!defined_default(result)) { - return new Cartographic_default(rectangle.east, rectangle.south); - } - result.longitude = rectangle.east; - result.latitude = rectangle.south; - result.height = 0; - return result; -}; -Rectangle.center = function(rectangle, result) { - Check_default.typeOf.object("rectangle", rectangle); - let east = rectangle.east; - const west = rectangle.west; - if (east < west) { - east += Math_default.TWO_PI; - } - const longitude = Math_default.negativePiToPi((west + east) * 0.5); - const latitude = (rectangle.south + rectangle.north) * 0.5; - if (!defined_default(result)) { - return new Cartographic_default(longitude, latitude); - } - result.longitude = longitude; - result.latitude = latitude; - result.height = 0; - return result; -}; -Rectangle.intersection = function(rectangle, otherRectangle, result) { - Check_default.typeOf.object("rectangle", rectangle); - Check_default.typeOf.object("otherRectangle", otherRectangle); - let rectangleEast = rectangle.east; - let rectangleWest = rectangle.west; - let otherRectangleEast = otherRectangle.east; - let otherRectangleWest = otherRectangle.west; - if (rectangleEast < rectangleWest && otherRectangleEast > 0) { - rectangleEast += Math_default.TWO_PI; - } else if (otherRectangleEast < otherRectangleWest && rectangleEast > 0) { - otherRectangleEast += Math_default.TWO_PI; - } - if (rectangleEast < rectangleWest && otherRectangleWest < 0) { - otherRectangleWest += Math_default.TWO_PI; - } else if (otherRectangleEast < otherRectangleWest && rectangleWest < 0) { - rectangleWest += Math_default.TWO_PI; - } - const west = Math_default.negativePiToPi( - Math.max(rectangleWest, otherRectangleWest) - ); - const east = Math_default.negativePiToPi( - Math.min(rectangleEast, otherRectangleEast) - ); - if ((rectangle.west < rectangle.east || otherRectangle.west < otherRectangle.east) && east <= west) { - return void 0; - } - const south = Math.max(rectangle.south, otherRectangle.south); - const north = Math.min(rectangle.north, otherRectangle.north); - if (south >= north) { - return void 0; - } - if (!defined_default(result)) { - return new Rectangle(west, south, east, north); - } - result.west = west; - result.south = south; - result.east = east; - result.north = north; - return result; -}; -Rectangle.simpleIntersection = function(rectangle, otherRectangle, result) { - Check_default.typeOf.object("rectangle", rectangle); - Check_default.typeOf.object("otherRectangle", otherRectangle); - const west = Math.max(rectangle.west, otherRectangle.west); - const south = Math.max(rectangle.south, otherRectangle.south); - const east = Math.min(rectangle.east, otherRectangle.east); - const north = Math.min(rectangle.north, otherRectangle.north); - if (south >= north || west >= east) { - return void 0; - } - if (!defined_default(result)) { - return new Rectangle(west, south, east, north); - } - result.west = west; - result.south = south; - result.east = east; - result.north = north; - return result; -}; -Rectangle.union = function(rectangle, otherRectangle, result) { - Check_default.typeOf.object("rectangle", rectangle); - Check_default.typeOf.object("otherRectangle", otherRectangle); - if (!defined_default(result)) { - result = new Rectangle(); - } - let rectangleEast = rectangle.east; - let rectangleWest = rectangle.west; - let otherRectangleEast = otherRectangle.east; - let otherRectangleWest = otherRectangle.west; - if (rectangleEast < rectangleWest && otherRectangleEast > 0) { - rectangleEast += Math_default.TWO_PI; - } else if (otherRectangleEast < otherRectangleWest && rectangleEast > 0) { - otherRectangleEast += Math_default.TWO_PI; - } - if (rectangleEast < rectangleWest && otherRectangleWest < 0) { - otherRectangleWest += Math_default.TWO_PI; - } else if (otherRectangleEast < otherRectangleWest && rectangleWest < 0) { - rectangleWest += Math_default.TWO_PI; - } - const west = Math_default.negativePiToPi( - Math.min(rectangleWest, otherRectangleWest) - ); - const east = Math_default.negativePiToPi( - Math.max(rectangleEast, otherRectangleEast) - ); - result.west = west; - result.south = Math.min(rectangle.south, otherRectangle.south); - result.east = east; - result.north = Math.max(rectangle.north, otherRectangle.north); - return result; -}; -Rectangle.expand = function(rectangle, cartographic, result) { - Check_default.typeOf.object("rectangle", rectangle); - Check_default.typeOf.object("cartographic", cartographic); - if (!defined_default(result)) { - result = new Rectangle(); - } - result.west = Math.min(rectangle.west, cartographic.longitude); - result.south = Math.min(rectangle.south, cartographic.latitude); - result.east = Math.max(rectangle.east, cartographic.longitude); - result.north = Math.max(rectangle.north, cartographic.latitude); - return result; -}; -Rectangle.contains = function(rectangle, cartographic) { - Check_default.typeOf.object("rectangle", rectangle); - Check_default.typeOf.object("cartographic", cartographic); - let longitude = cartographic.longitude; - const latitude = cartographic.latitude; - const west = rectangle.west; - let east = rectangle.east; - if (east < west) { - east += Math_default.TWO_PI; - if (longitude < 0) { - longitude += Math_default.TWO_PI; - } - } - return (longitude > west || Math_default.equalsEpsilon(longitude, west, Math_default.EPSILON14)) && (longitude < east || Math_default.equalsEpsilon(longitude, east, Math_default.EPSILON14)) && latitude >= rectangle.south && latitude <= rectangle.north; -}; -var subsampleLlaScratch = new Cartographic_default(); -Rectangle.subsample = function(rectangle, ellipsoid, surfaceHeight, result) { - Check_default.typeOf.object("rectangle", rectangle); - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); - surfaceHeight = defaultValue_default(surfaceHeight, 0); - if (!defined_default(result)) { - result = []; - } - let length = 0; - const north = rectangle.north; - const south = rectangle.south; - const east = rectangle.east; - const west = rectangle.west; - const lla = subsampleLlaScratch; - lla.height = surfaceHeight; - lla.longitude = west; - lla.latitude = north; - result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); - length++; - lla.longitude = east; - result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); - length++; - lla.latitude = south; - result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); - length++; - lla.longitude = west; - result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); - length++; - if (north < 0) { - lla.latitude = north; - } else if (south > 0) { - lla.latitude = south; - } else { - lla.latitude = 0; - } - for (let i = 1; i < 8; ++i) { - lla.longitude = -Math.PI + i * Math_default.PI_OVER_TWO; - if (Rectangle.contains(rectangle, lla)) { - result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); - length++; - } - } - if (lla.latitude === 0) { - lla.longitude = west; - result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); - length++; - lla.longitude = east; - result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); - length++; - } - result.length = length; - return result; -}; -Rectangle.subsection = function(rectangle, westLerp, southLerp, eastLerp, northLerp, result) { - Check_default.typeOf.object("rectangle", rectangle); - Check_default.typeOf.number.greaterThanOrEquals("westLerp", westLerp, 0); - Check_default.typeOf.number.lessThanOrEquals("westLerp", westLerp, 1); - Check_default.typeOf.number.greaterThanOrEquals("southLerp", southLerp, 0); - Check_default.typeOf.number.lessThanOrEquals("southLerp", southLerp, 1); - Check_default.typeOf.number.greaterThanOrEquals("eastLerp", eastLerp, 0); - Check_default.typeOf.number.lessThanOrEquals("eastLerp", eastLerp, 1); - Check_default.typeOf.number.greaterThanOrEquals("northLerp", northLerp, 0); - Check_default.typeOf.number.lessThanOrEquals("northLerp", northLerp, 1); - Check_default.typeOf.number.lessThanOrEquals("westLerp", westLerp, eastLerp); - Check_default.typeOf.number.lessThanOrEquals("southLerp", southLerp, northLerp); - if (!defined_default(result)) { - result = new Rectangle(); - } - if (rectangle.west <= rectangle.east) { - const width = rectangle.east - rectangle.west; - result.west = rectangle.west + westLerp * width; - result.east = rectangle.west + eastLerp * width; - } else { - const width = Math_default.TWO_PI + rectangle.east - rectangle.west; - result.west = Math_default.negativePiToPi(rectangle.west + westLerp * width); - result.east = Math_default.negativePiToPi(rectangle.west + eastLerp * width); - } - const height = rectangle.north - rectangle.south; - result.south = rectangle.south + southLerp * height; - result.north = rectangle.south + northLerp * height; - if (westLerp === 1) { - result.west = rectangle.east; - } - if (eastLerp === 1) { - result.east = rectangle.east; - } - if (southLerp === 1) { - result.south = rectangle.north; - } - if (northLerp === 1) { - result.north = rectangle.north; - } - return result; -}; -Rectangle.MAX_VALUE = Object.freeze( - new Rectangle( - -Math.PI, - -Math_default.PI_OVER_TWO, - Math.PI, - Math_default.PI_OVER_TWO - ) -); -var Rectangle_default = Rectangle; - -// packages/engine/Source/Core/Cartesian2.js -function Cartesian2(x, y) { - this.x = defaultValue_default(x, 0); - this.y = defaultValue_default(y, 0); -} -Cartesian2.fromElements = function(x, y, result) { - if (!defined_default(result)) { - return new Cartesian2(x, y); - } - result.x = x; - result.y = y; - return result; -}; -Cartesian2.clone = function(cartesian, result) { - if (!defined_default(cartesian)) { - return void 0; - } - if (!defined_default(result)) { - return new Cartesian2(cartesian.x, cartesian.y); - } - result.x = cartesian.x; - result.y = cartesian.y; - return result; -}; -Cartesian2.fromCartesian3 = Cartesian2.clone; -Cartesian2.fromCartesian4 = Cartesian2.clone; -Cartesian2.packedLength = 2; -Cartesian2.pack = function(value, array, startingIndex) { - Check_default.typeOf.object("value", value); - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - array[startingIndex++] = value.x; - array[startingIndex] = value.y; - return array; -}; -Cartesian2.unpack = function(array, startingIndex, result) { - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - if (!defined_default(result)) { - result = new Cartesian2(); - } - result.x = array[startingIndex++]; - result.y = array[startingIndex]; - return result; -}; -Cartesian2.packArray = function(array, result) { - Check_default.defined("array", array); - const length = array.length; - const resultLength = length * 2; - if (!defined_default(result)) { - result = new Array(resultLength); - } else if (!Array.isArray(result) && result.length !== resultLength) { - throw new DeveloperError_default( - "If result is a typed array, it must have exactly array.length * 2 elements" - ); - } else if (result.length !== resultLength) { - result.length = resultLength; - } - for (let i = 0; i < length; ++i) { - Cartesian2.pack(array[i], result, i * 2); - } - return result; -}; -Cartesian2.unpackArray = function(array, result) { - Check_default.defined("array", array); - Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 2); - if (array.length % 2 !== 0) { - throw new DeveloperError_default("array length must be a multiple of 2."); - } - const length = array.length; - if (!defined_default(result)) { - result = new Array(length / 2); - } else { - result.length = length / 2; - } - for (let i = 0; i < length; i += 2) { - const index = i / 2; - result[index] = Cartesian2.unpack(array, i, result[index]); - } - return result; -}; -Cartesian2.fromArray = Cartesian2.unpack; -Cartesian2.maximumComponent = function(cartesian) { - Check_default.typeOf.object("cartesian", cartesian); - return Math.max(cartesian.x, cartesian.y); -}; -Cartesian2.minimumComponent = function(cartesian) { - Check_default.typeOf.object("cartesian", cartesian); - return Math.min(cartesian.x, cartesian.y); -}; -Cartesian2.minimumByComponent = function(first, second, result) { - Check_default.typeOf.object("first", first); - Check_default.typeOf.object("second", second); - Check_default.typeOf.object("result", result); - result.x = Math.min(first.x, second.x); - result.y = Math.min(first.y, second.y); - return result; -}; -Cartesian2.maximumByComponent = function(first, second, result) { - Check_default.typeOf.object("first", first); - Check_default.typeOf.object("second", second); - Check_default.typeOf.object("result", result); - result.x = Math.max(first.x, second.x); - result.y = Math.max(first.y, second.y); - return result; -}; -Cartesian2.clamp = function(value, min, max, result) { - Check_default.typeOf.object("value", value); - Check_default.typeOf.object("min", min); - Check_default.typeOf.object("max", max); - Check_default.typeOf.object("result", result); - const x = Math_default.clamp(value.x, min.x, max.x); - const y = Math_default.clamp(value.y, min.y, max.y); - result.x = x; - result.y = y; - return result; -}; -Cartesian2.magnitudeSquared = function(cartesian) { - Check_default.typeOf.object("cartesian", cartesian); - return cartesian.x * cartesian.x + cartesian.y * cartesian.y; -}; -Cartesian2.magnitude = function(cartesian) { - return Math.sqrt(Cartesian2.magnitudeSquared(cartesian)); -}; -var distanceScratch2 = new Cartesian2(); -Cartesian2.distance = function(left, right) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Cartesian2.subtract(left, right, distanceScratch2); - return Cartesian2.magnitude(distanceScratch2); -}; -Cartesian2.distanceSquared = function(left, right) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Cartesian2.subtract(left, right, distanceScratch2); - return Cartesian2.magnitudeSquared(distanceScratch2); -}; -Cartesian2.normalize = function(cartesian, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - const magnitude = Cartesian2.magnitude(cartesian); - result.x = cartesian.x / magnitude; - result.y = cartesian.y / magnitude; - if (isNaN(result.x) || isNaN(result.y)) { - throw new DeveloperError_default("normalized result is not a number"); - } - return result; -}; -Cartesian2.dot = function(left, right) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - return left.x * right.x + left.y * right.y; -}; -Cartesian2.cross = function(left, right) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - return left.x * right.y - left.y * right.x; -}; -Cartesian2.multiplyComponents = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result.x = left.x * right.x; - result.y = left.y * right.y; - return result; -}; -Cartesian2.divideComponents = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result.x = left.x / right.x; - result.y = left.y / right.y; - return result; -}; -Cartesian2.add = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result.x = left.x + right.x; - result.y = left.y + right.y; - return result; -}; -Cartesian2.subtract = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result.x = left.x - right.x; - result.y = left.y - right.y; - return result; -}; -Cartesian2.multiplyByScalar = function(cartesian, scalar, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.number("scalar", scalar); - Check_default.typeOf.object("result", result); - result.x = cartesian.x * scalar; - result.y = cartesian.y * scalar; - return result; -}; -Cartesian2.divideByScalar = function(cartesian, scalar, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.number("scalar", scalar); - Check_default.typeOf.object("result", result); - result.x = cartesian.x / scalar; - result.y = cartesian.y / scalar; - return result; -}; -Cartesian2.negate = function(cartesian, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - result.x = -cartesian.x; - result.y = -cartesian.y; - return result; -}; -Cartesian2.abs = function(cartesian, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - result.x = Math.abs(cartesian.x); - result.y = Math.abs(cartesian.y); - return result; -}; -var lerpScratch2 = new Cartesian2(); -Cartesian2.lerp = function(start, end, t, result) { - Check_default.typeOf.object("start", start); - Check_default.typeOf.object("end", end); - Check_default.typeOf.number("t", t); - Check_default.typeOf.object("result", result); - Cartesian2.multiplyByScalar(end, t, lerpScratch2); - result = Cartesian2.multiplyByScalar(start, 1 - t, result); - return Cartesian2.add(lerpScratch2, result, result); -}; -var angleBetweenScratch = new Cartesian2(); -var angleBetweenScratch2 = new Cartesian2(); -Cartesian2.angleBetween = function(left, right) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Cartesian2.normalize(left, angleBetweenScratch); - Cartesian2.normalize(right, angleBetweenScratch2); - return Math_default.acosClamped( - Cartesian2.dot(angleBetweenScratch, angleBetweenScratch2) - ); -}; -var mostOrthogonalAxisScratch2 = new Cartesian2(); -Cartesian2.mostOrthogonalAxis = function(cartesian, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - const f = Cartesian2.normalize(cartesian, mostOrthogonalAxisScratch2); - Cartesian2.abs(f, f); - if (f.x <= f.y) { - result = Cartesian2.clone(Cartesian2.UNIT_X, result); - } else { - result = Cartesian2.clone(Cartesian2.UNIT_Y, result); - } - return result; -}; -Cartesian2.equals = function(left, right) { - return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y; -}; -Cartesian2.equalsArray = function(cartesian, array, offset) { - return cartesian.x === array[offset] && cartesian.y === array[offset + 1]; -}; -Cartesian2.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) { - return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon( - left.x, - right.x, - relativeEpsilon, - absoluteEpsilon - ) && Math_default.equalsEpsilon( - left.y, - right.y, - relativeEpsilon, - absoluteEpsilon - ); -}; -Cartesian2.ZERO = Object.freeze(new Cartesian2(0, 0)); -Cartesian2.ONE = Object.freeze(new Cartesian2(1, 1)); -Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1, 0)); -Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0, 1)); -Cartesian2.prototype.clone = function(result) { - return Cartesian2.clone(this, result); -}; -Cartesian2.prototype.equals = function(right) { - return Cartesian2.equals(this, right); -}; -Cartesian2.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) { - return Cartesian2.equalsEpsilon( - this, - right, - relativeEpsilon, - absoluteEpsilon - ); -}; -Cartesian2.prototype.toString = function() { - return `(${this.x}, ${this.y})`; -}; -var Cartesian2_default = Cartesian2; - -// packages/engine/Source/Core/Matrix2.js -function Matrix2(column0Row0, column1Row0, column0Row1, column1Row1) { - this[0] = defaultValue_default(column0Row0, 0); - this[1] = defaultValue_default(column0Row1, 0); - this[2] = defaultValue_default(column1Row0, 0); - this[3] = defaultValue_default(column1Row1, 0); -} -Matrix2.packedLength = 4; -Matrix2.pack = function(value, array, startingIndex) { - Check_default.typeOf.object("value", value); - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - array[startingIndex++] = value[0]; - array[startingIndex++] = value[1]; - array[startingIndex++] = value[2]; - array[startingIndex++] = value[3]; - return array; -}; -Matrix2.unpack = function(array, startingIndex, result) { - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - if (!defined_default(result)) { - result = new Matrix2(); - } - result[0] = array[startingIndex++]; - result[1] = array[startingIndex++]; - result[2] = array[startingIndex++]; - result[3] = array[startingIndex++]; - return result; -}; -Matrix2.packArray = function(array, result) { - Check_default.defined("array", array); - const length = array.length; - const resultLength = length * 4; - if (!defined_default(result)) { - result = new Array(resultLength); - } else if (!Array.isArray(result) && result.length !== resultLength) { - throw new DeveloperError_default( - "If result is a typed array, it must have exactly array.length * 4 elements" - ); - } else if (result.length !== resultLength) { - result.length = resultLength; - } - for (let i = 0; i < length; ++i) { - Matrix2.pack(array[i], result, i * 4); - } - return result; -}; -Matrix2.unpackArray = function(array, result) { - Check_default.defined("array", array); - Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 4); - if (array.length % 4 !== 0) { - throw new DeveloperError_default("array length must be a multiple of 4."); - } - const length = array.length; - if (!defined_default(result)) { - result = new Array(length / 4); - } else { - result.length = length / 4; - } - for (let i = 0; i < length; i += 4) { - const index = i / 4; - result[index] = Matrix2.unpack(array, i, result[index]); - } - return result; -}; -Matrix2.clone = function(matrix, result) { - if (!defined_default(matrix)) { - return void 0; - } - if (!defined_default(result)) { - return new Matrix2(matrix[0], matrix[2], matrix[1], matrix[3]); - } - result[0] = matrix[0]; - result[1] = matrix[1]; - result[2] = matrix[2]; - result[3] = matrix[3]; - return result; -}; -Matrix2.fromArray = Matrix2.unpack; -Matrix2.fromColumnMajorArray = function(values, result) { - Check_default.defined("values", values); - return Matrix2.clone(values, result); -}; -Matrix2.fromRowMajorArray = function(values, result) { - Check_default.defined("values", values); - if (!defined_default(result)) { - return new Matrix2(values[0], values[1], values[2], values[3]); - } - result[0] = values[0]; - result[1] = values[2]; - result[2] = values[1]; - result[3] = values[3]; - return result; -}; -Matrix2.fromScale = function(scale, result) { - Check_default.typeOf.object("scale", scale); - if (!defined_default(result)) { - return new Matrix2(scale.x, 0, 0, scale.y); - } - result[0] = scale.x; - result[1] = 0; - result[2] = 0; - result[3] = scale.y; - return result; -}; -Matrix2.fromUniformScale = function(scale, result) { - Check_default.typeOf.number("scale", scale); - if (!defined_default(result)) { - return new Matrix2(scale, 0, 0, scale); - } - result[0] = scale; - result[1] = 0; - result[2] = 0; - result[3] = scale; - return result; -}; -Matrix2.fromRotation = function(angle, result) { - Check_default.typeOf.number("angle", angle); - const cosAngle = Math.cos(angle); - const sinAngle = Math.sin(angle); - if (!defined_default(result)) { - return new Matrix2(cosAngle, -sinAngle, sinAngle, cosAngle); - } - result[0] = cosAngle; - result[1] = sinAngle; - result[2] = -sinAngle; - result[3] = cosAngle; - return result; -}; -Matrix2.toArray = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - if (!defined_default(result)) { - return [matrix[0], matrix[1], matrix[2], matrix[3]]; - } - result[0] = matrix[0]; - result[1] = matrix[1]; - result[2] = matrix[2]; - result[3] = matrix[3]; - return result; -}; -Matrix2.getElementIndex = function(column, row) { - Check_default.typeOf.number.greaterThanOrEquals("row", row, 0); - Check_default.typeOf.number.lessThanOrEquals("row", row, 1); - Check_default.typeOf.number.greaterThanOrEquals("column", column, 0); - Check_default.typeOf.number.lessThanOrEquals("column", column, 1); - return column * 2 + row; -}; -Matrix2.getColumn = function(matrix, index, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); - Check_default.typeOf.number.lessThanOrEquals("index", index, 1); - Check_default.typeOf.object("result", result); - const startIndex = index * 2; - const x = matrix[startIndex]; - const y = matrix[startIndex + 1]; - result.x = x; - result.y = y; - return result; -}; -Matrix2.setColumn = function(matrix, index, cartesian, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); - Check_default.typeOf.number.lessThanOrEquals("index", index, 1); - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - result = Matrix2.clone(matrix, result); - const startIndex = index * 2; - result[startIndex] = cartesian.x; - result[startIndex + 1] = cartesian.y; - return result; -}; -Matrix2.getRow = function(matrix, index, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); - Check_default.typeOf.number.lessThanOrEquals("index", index, 1); - Check_default.typeOf.object("result", result); - const x = matrix[index]; - const y = matrix[index + 2]; - result.x = x; - result.y = y; - return result; -}; -Matrix2.setRow = function(matrix, index, cartesian, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); - Check_default.typeOf.number.lessThanOrEquals("index", index, 1); - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - result = Matrix2.clone(matrix, result); - result[index] = cartesian.x; - result[index + 2] = cartesian.y; - return result; -}; -var scaleScratch12 = new Cartesian2_default(); -Matrix2.setScale = function(matrix, scale, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("scale", scale); - Check_default.typeOf.object("result", result); - const existingScale = Matrix2.getScale(matrix, scaleScratch12); - const scaleRatioX = scale.x / existingScale.x; - const scaleRatioY = scale.y / existingScale.y; - result[0] = matrix[0] * scaleRatioX; - result[1] = matrix[1] * scaleRatioX; - result[2] = matrix[2] * scaleRatioY; - result[3] = matrix[3] * scaleRatioY; - return result; -}; -var scaleScratch22 = new Cartesian2_default(); -Matrix2.setUniformScale = function(matrix, scale, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number("scale", scale); - Check_default.typeOf.object("result", result); - const existingScale = Matrix2.getScale(matrix, scaleScratch22); - const scaleRatioX = scale / existingScale.x; - const scaleRatioY = scale / existingScale.y; - result[0] = matrix[0] * scaleRatioX; - result[1] = matrix[1] * scaleRatioX; - result[2] = matrix[2] * scaleRatioY; - result[3] = matrix[3] * scaleRatioY; - return result; -}; -var scratchColumn2 = new Cartesian2_default(); -Matrix2.getScale = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - result.x = Cartesian2_default.magnitude( - Cartesian2_default.fromElements(matrix[0], matrix[1], scratchColumn2) - ); - result.y = Cartesian2_default.magnitude( - Cartesian2_default.fromElements(matrix[2], matrix[3], scratchColumn2) - ); - return result; -}; -var scaleScratch32 = new Cartesian2_default(); -Matrix2.getMaximumScale = function(matrix) { - Matrix2.getScale(matrix, scaleScratch32); - return Cartesian2_default.maximumComponent(scaleScratch32); -}; -var scaleScratch42 = new Cartesian2_default(); -Matrix2.setRotation = function(matrix, rotation, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - const scale = Matrix2.getScale(matrix, scaleScratch42); - result[0] = rotation[0] * scale.x; - result[1] = rotation[1] * scale.x; - result[2] = rotation[2] * scale.y; - result[3] = rotation[3] * scale.y; - return result; -}; -var scaleScratch52 = new Cartesian2_default(); -Matrix2.getRotation = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - const scale = Matrix2.getScale(matrix, scaleScratch52); - result[0] = matrix[0] / scale.x; - result[1] = matrix[1] / scale.x; - result[2] = matrix[2] / scale.y; - result[3] = matrix[3] / scale.y; - return result; -}; -Matrix2.multiply = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - const column0Row0 = left[0] * right[0] + left[2] * right[1]; - const column1Row0 = left[0] * right[2] + left[2] * right[3]; - const column0Row1 = left[1] * right[0] + left[3] * right[1]; - const column1Row1 = left[1] * right[2] + left[3] * right[3]; - result[0] = column0Row0; - result[1] = column0Row1; - result[2] = column1Row0; - result[3] = column1Row1; - return result; -}; -Matrix2.add = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result[0] = left[0] + right[0]; - result[1] = left[1] + right[1]; - result[2] = left[2] + right[2]; - result[3] = left[3] + right[3]; - return result; -}; -Matrix2.subtract = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result[0] = left[0] - right[0]; - result[1] = left[1] - right[1]; - result[2] = left[2] - right[2]; - result[3] = left[3] - right[3]; - return result; -}; -Matrix2.multiplyByVector = function(matrix, cartesian, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - const x = matrix[0] * cartesian.x + matrix[2] * cartesian.y; - const y = matrix[1] * cartesian.x + matrix[3] * cartesian.y; - result.x = x; - result.y = y; - return result; -}; -Matrix2.multiplyByScalar = function(matrix, scalar, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number("scalar", scalar); - Check_default.typeOf.object("result", result); - result[0] = matrix[0] * scalar; - result[1] = matrix[1] * scalar; - result[2] = matrix[2] * scalar; - result[3] = matrix[3] * scalar; - return result; -}; -Matrix2.multiplyByScale = function(matrix, scale, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("scale", scale); - Check_default.typeOf.object("result", result); - result[0] = matrix[0] * scale.x; - result[1] = matrix[1] * scale.x; - result[2] = matrix[2] * scale.y; - result[3] = matrix[3] * scale.y; - return result; -}; -Matrix2.multiplyByUniformScale = function(matrix, scale, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.number("scale", scale); - Check_default.typeOf.object("result", result); - result[0] = matrix[0] * scale; - result[1] = matrix[1] * scale; - result[2] = matrix[2] * scale; - result[3] = matrix[3] * scale; - return result; -}; -Matrix2.negate = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - result[0] = -matrix[0]; - result[1] = -matrix[1]; - result[2] = -matrix[2]; - result[3] = -matrix[3]; - return result; -}; -Matrix2.transpose = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - const column0Row0 = matrix[0]; - const column0Row1 = matrix[2]; - const column1Row0 = matrix[1]; - const column1Row1 = matrix[3]; - result[0] = column0Row0; - result[1] = column0Row1; - result[2] = column1Row0; - result[3] = column1Row1; - return result; -}; -Matrix2.abs = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - Check_default.typeOf.object("result", result); - result[0] = Math.abs(matrix[0]); - result[1] = Math.abs(matrix[1]); - result[2] = Math.abs(matrix[2]); - result[3] = Math.abs(matrix[3]); - return result; -}; -Matrix2.equals = function(left, right) { - return left === right || defined_default(left) && defined_default(right) && left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[3] === right[3]; -}; -Matrix2.equalsArray = function(matrix, array, offset) { - return matrix[0] === array[offset] && matrix[1] === array[offset + 1] && matrix[2] === array[offset + 2] && matrix[3] === array[offset + 3]; -}; -Matrix2.equalsEpsilon = function(left, right, epsilon) { - epsilon = defaultValue_default(epsilon, 0); - return left === right || defined_default(left) && defined_default(right) && Math.abs(left[0] - right[0]) <= epsilon && Math.abs(left[1] - right[1]) <= epsilon && Math.abs(left[2] - right[2]) <= epsilon && Math.abs(left[3] - right[3]) <= epsilon; -}; -Matrix2.IDENTITY = Object.freeze(new Matrix2(1, 0, 0, 1)); -Matrix2.ZERO = Object.freeze(new Matrix2(0, 0, 0, 0)); -Matrix2.COLUMN0ROW0 = 0; -Matrix2.COLUMN0ROW1 = 1; -Matrix2.COLUMN1ROW0 = 2; -Matrix2.COLUMN1ROW1 = 3; -Object.defineProperties(Matrix2.prototype, { - /** - * Gets the number of items in the collection. - * @memberof Matrix2.prototype - * - * @type {number} - */ - length: { - get: function() { - return Matrix2.packedLength; - } - } -}); -Matrix2.prototype.clone = function(result) { - return Matrix2.clone(this, result); -}; -Matrix2.prototype.equals = function(right) { - return Matrix2.equals(this, right); -}; -Matrix2.prototype.equalsEpsilon = function(right, epsilon) { - return Matrix2.equalsEpsilon(this, right, epsilon); -}; -Matrix2.prototype.toString = function() { - return `(${this[0]}, ${this[2]}) -(${this[1]}, ${this[3]})`; -}; -var Matrix2_default = Matrix2; - -export { - Cartesian4_default, - Matrix4_default, - Rectangle_default, - Cartesian2_default, - Matrix2_default -}; diff --git a/assets/cesium/Workers/chunk-TIEL2RYB.js b/assets/cesium/Workers/chunk-JYAHOGGL.js similarity index 99% rename from assets/cesium/Workers/chunk-TIEL2RYB.js rename to assets/cesium/Workers/chunk-JYAHOGGL.js index 81dd2d1a0..8dbc626f5 100644 --- a/assets/cesium/Workers/chunk-TIEL2RYB.js +++ b/assets/cesium/Workers/chunk-JYAHOGGL.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,56 +25,56 @@ import { AttributeCompression_default -} from "./chunk-4EXWKTY2.js"; +} from "./chunk-OORVMGDU.js"; import { EncodedCartesian3_default -} from "./chunk-EEL3YC6V.js"; +} from "./chunk-I2RC4XVN.js"; import { IntersectionTests_default -} from "./chunk-R5NOUYKW.js"; +} from "./chunk-XD445VDH.js"; import { Plane_default -} from "./chunk-PNAD2XAN.js"; +} from "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttribute_default, GeometryType_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default, GeographicProjection_default, Intersect_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default, Cartesian4_default, Matrix4_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Cartographic_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/barycentricCoordinates.js var scratchCartesian1 = new Cartesian3_default(); diff --git a/assets/cesium/Workers/chunk-N7FIYNQV.js b/assets/cesium/Workers/chunk-KUN2ZA5X.js similarity index 97% rename from assets/cesium/Workers/chunk-N7FIYNQV.js rename to assets/cesium/Workers/chunk-KUN2ZA5X.js index 206a2915d..1b632f954 100644 --- a/assets/cesium/Workers/chunk-N7FIYNQV.js +++ b/assets/cesium/Workers/chunk-KUN2ZA5X.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,13 +25,13 @@ import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/VertexFormat.js function VertexFormat(options) { diff --git a/assets/cesium/Workers/chunk-7ISAYW2A.js b/assets/cesium/Workers/chunk-L6RTJ3RE.js similarity index 96% rename from assets/cesium/Workers/chunk-7ISAYW2A.js rename to assets/cesium/Workers/chunk-L6RTJ3RE.js index f6f2700b3..2c0dae8ca 100644 --- a/assets/cesium/Workers/chunk-7ISAYW2A.js +++ b/assets/cesium/Workers/chunk-L6RTJ3RE.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,48 +25,46 @@ import { CylinderGeometryLibrary_default -} from "./chunk-U5O26DDO.js"; +} from "./chunk-TO2PVHKI.js"; import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; +} from "./chunk-KUN2ZA5X.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import { - Cartesian2_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CylinderGeometry.js var radiusScratch = new Cartesian2_default(); diff --git a/assets/cesium/Workers/chunk-ULABUYF6.js b/assets/cesium/Workers/chunk-LCLJJ2MZ.js similarity index 98% rename from assets/cesium/Workers/chunk-ULABUYF6.js rename to assets/cesium/Workers/chunk-LCLJJ2MZ.js index 2b89c729c..84851d396 100644 --- a/assets/cesium/Workers/chunk-ULABUYF6.js +++ b/assets/cesium/Workers/chunk-LCLJJ2MZ.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,61 +25,59 @@ import { ArcType_default -} from "./chunk-DHO4HQHW.js"; +} from "./chunk-QMLTCCYG.js"; import { GeometryPipeline_default -} from "./chunk-TIEL2RYB.js"; +} from "./chunk-JYAHOGGL.js"; import { PolygonPipeline_default, WindingOrder_default -} from "./chunk-I5XKU3UZ.js"; +} from "./chunk-RJYML24O.js"; import { arrayRemoveDuplicates_default -} from "./chunk-E5HIGWSZ.js"; +} from "./chunk-DKVHRNFY.js"; import { EllipsoidRhumbLine_default -} from "./chunk-IDAL54EF.js"; +} from "./chunk-4MSUJ4I7.js"; import { IntersectionTests_default -} from "./chunk-R5NOUYKW.js"; +} from "./chunk-XD445VDH.js"; import { Plane_default -} from "./chunk-PNAD2XAN.js"; +} from "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { Quaternion_default -} from "./chunk-XKGSTUQO.js"; -import { - Cartesian2_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Cartographic_default, Ellipsoid_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/PolygonHierarchy.js function PolygonHierarchy(positions, holes) { @@ -356,7 +354,7 @@ var scaleToGeodeticHeightN2 = new Cartesian3_default(); var scaleToGeodeticHeightP1 = new Cartesian3_default(); var scaleToGeodeticHeightP2 = new Cartesian3_default(); PolygonGeometryLibrary.scaleToGeodeticHeightExtruded = function(geometry, maxHeight, minHeight, ellipsoid, perPositionHeight) { - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); const n1 = scaleToGeodeticHeightN1; let n2 = scaleToGeodeticHeightN2; const p = scaleToGeodeticHeightP1; diff --git a/assets/cesium/Workers/chunk-F66GYWDZ.js b/assets/cesium/Workers/chunk-LEABCTLP.js similarity index 96% rename from assets/cesium/Workers/chunk-F66GYWDZ.js rename to assets/cesium/Workers/chunk-LEABCTLP.js index 11fd1057d..6fd753828 100644 --- a/assets/cesium/Workers/chunk-F66GYWDZ.js +++ b/assets/cesium/Workers/chunk-LEABCTLP.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,17 +25,15 @@ import { OrientedBoundingBox_default -} from "./chunk-P2BTKBVY.js"; -import { - Cartesian2_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-AVI4IUWC.js"; import { + Cartesian2_default, Cartesian3_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; // packages/engine/Source/Core/CoplanarPolygonGeometryLibrary.js var CoplanarPolygonGeometryLibrary = {}; diff --git a/assets/cesium/Workers/chunk-FNHGOHCI.js b/assets/cesium/Workers/chunk-MDHQR3ZS.js similarity index 95% rename from assets/cesium/Workers/chunk-FNHGOHCI.js rename to assets/cesium/Workers/chunk-MDHQR3ZS.js index 75755fad0..adb7ba53c 100644 --- a/assets/cesium/Workers/chunk-FNHGOHCI.js +++ b/assets/cesium/Workers/chunk-MDHQR3ZS.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -26,23 +26,24 @@ import { GeographicProjection_default, Intersect_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default, Rectangle_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { - Cartographic_default -} from "./chunk-54GSYZWT.js"; + Cartesian2_default, + Cartographic_default, + Ellipsoid_default +} from "./chunk-PYHLO636.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/BoundingRectangle.js function BoundingRectangle(x, y, width, height) { @@ -119,6 +120,7 @@ BoundingRectangle.fromRectangle = function(rectangle, projection, result) { result.height = 0; return result; } + defaultProjection._ellipsoid = Ellipsoid_default.default; projection = defaultValue_default(projection, defaultProjection); const lowerLeft = projection.project( Rectangle_default.southwest(rectangle, fromRectangleLowerLeft) diff --git a/assets/cesium/Workers/chunk-A3TYRSRJ.js b/assets/cesium/Workers/chunk-MSKXMXJI.js similarity index 99% rename from assets/cesium/Workers/chunk-A3TYRSRJ.js rename to assets/cesium/Workers/chunk-MSKXMXJI.js index 3898d2718..fcac9a834 100644 --- a/assets/cesium/Workers/chunk-A3TYRSRJ.js +++ b/assets/cesium/Workers/chunk-MSKXMXJI.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,16 +25,16 @@ import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { __commonJS, __toESM, defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // node_modules/mersenne-twister/src/mersenne-twister.js var require_mersenne_twister = __commonJS({ @@ -80,8 +80,7 @@ var require_mersenne_twister = __commonJS({ this.mt[0] = this.mt[this.N - 1]; i = 1; } - if (j >= key_length) - j = 0; + if (j >= key_length) j = 0; } for (k = this.N - 1; k; k--) { var s = this.mt[i - 1] ^ this.mt[i - 1] >>> 30; diff --git a/assets/cesium/Workers/chunk-AEADHPUM.js b/assets/cesium/Workers/chunk-NTXTUNEF.js similarity index 98% rename from assets/cesium/Workers/chunk-AEADHPUM.js rename to assets/cesium/Workers/chunk-NTXTUNEF.js index 2f228bf46..0b8b63310 100644 --- a/assets/cesium/Workers/chunk-AEADHPUM.js +++ b/assets/cesium/Workers/chunk-NTXTUNEF.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,14 +25,14 @@ import { Quaternion_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-O3JCMSS3.js"; import { Cartesian3_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; // packages/engine/Source/Core/EllipseGeometryLibrary.js var EllipseGeometryLibrary = {}; diff --git a/assets/cesium/Workers/chunk-XKGSTUQO.js b/assets/cesium/Workers/chunk-O3JCMSS3.js similarity index 70% rename from assets/cesium/Workers/chunk-XKGSTUQO.js rename to assets/cesium/Workers/chunk-O3JCMSS3.js index 267c55bcb..514078a02 100644 --- a/assets/cesium/Workers/chunk-XKGSTUQO.js +++ b/assets/cesium/Workers/chunk-O3JCMSS3.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,40 +23,33 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import { - combine_default -} from "./chunk-DNCKFFNR.js"; import { Cartesian2_default, - Cartesian4_default, - Matrix4_default, - Rectangle_default -} from "./chunk-IQCBK4CE.js"; -import { Cartesian3_default, Cartographic_default, Ellipsoid_default, + FeatureDetection_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { RuntimeError_default -} from "./chunk-YK5RU5AO.js"; +} from "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { __commonJS, __require, __toESM, defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // node_modules/urijs/src/punycode.js var require_punycode = __commonJS({ @@ -2519,1266 +2512,2468 @@ var require_URI = __commonJS({ } }); -// packages/engine/Source/Core/GeographicProjection.js -function GeographicProjection(ellipsoid) { - this._ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); - this._semimajorAxis = this._ellipsoid.maximumRadius; - this._oneOverSemimajorAxis = 1 / this._semimajorAxis; +// packages/engine/Source/Core/Cartesian4.js +function Cartesian4(x, y, z, w) { + this.x = defaultValue_default(x, 0); + this.y = defaultValue_default(y, 0); + this.z = defaultValue_default(z, 0); + this.w = defaultValue_default(w, 0); } -Object.defineProperties(GeographicProjection.prototype, { - /** - * Gets the {@link Ellipsoid}. - * - * @memberof GeographicProjection.prototype - * - * @type {Ellipsoid} - * @readonly - */ - ellipsoid: { - get: function() { - return this._ellipsoid; - } - } -}); -GeographicProjection.prototype.project = function(cartographic, result) { - const semimajorAxis = this._semimajorAxis; - const x = cartographic.longitude * semimajorAxis; - const y = cartographic.latitude * semimajorAxis; - const z = cartographic.height; +Cartesian4.fromElements = function(x, y, z, w, result) { if (!defined_default(result)) { - return new Cartesian3_default(x, y, z); + return new Cartesian4(x, y, z, w); } result.x = x; result.y = y; result.z = z; + result.w = w; return result; }; -GeographicProjection.prototype.unproject = function(cartesian, result) { - if (!defined_default(cartesian)) { - throw new DeveloperError_default("cartesian is required"); - } - const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis; - const longitude = cartesian.x * oneOverEarthSemimajorAxis; - const latitude = cartesian.y * oneOverEarthSemimajorAxis; - const height = cartesian.z; +Cartesian4.fromColor = function(color, result) { + Check_default.typeOf.object("color", color); if (!defined_default(result)) { - return new Cartographic_default(longitude, latitude, height); + return new Cartesian4(color.red, color.green, color.blue, color.alpha); } - result.longitude = longitude; - result.latitude = latitude; - result.height = height; + result.x = color.red; + result.y = color.green; + result.z = color.blue; + result.w = color.alpha; return result; }; -var GeographicProjection_default = GeographicProjection; - -// packages/engine/Source/Core/Intersect.js -var Intersect = { - /** - * Represents that an object is not contained within the frustum. - * - * @type {number} - * @constant - */ - OUTSIDE: -1, - /** - * Represents that an object intersects one of the frustum's planes. - * - * @type {number} - * @constant - */ - INTERSECTING: 0, - /** - * Represents that an object is fully within the frustum. - * - * @type {number} - * @constant - */ - INSIDE: 1 -}; -var Intersect_default = Object.freeze(Intersect); - -// packages/engine/Source/Core/Interval.js -function Interval(start, stop) { - this.start = defaultValue_default(start, 0); - this.stop = defaultValue_default(stop, 0); -} -var Interval_default = Interval; - -// packages/engine/Source/Core/BoundingSphere.js -function BoundingSphere(center, radius) { - this.center = Cartesian3_default.clone(defaultValue_default(center, Cartesian3_default.ZERO)); - this.radius = defaultValue_default(radius, 0); -} -var fromPointsXMin = new Cartesian3_default(); -var fromPointsYMin = new Cartesian3_default(); -var fromPointsZMin = new Cartesian3_default(); -var fromPointsXMax = new Cartesian3_default(); -var fromPointsYMax = new Cartesian3_default(); -var fromPointsZMax = new Cartesian3_default(); -var fromPointsCurrentPos = new Cartesian3_default(); -var fromPointsScratch = new Cartesian3_default(); -var fromPointsRitterCenter = new Cartesian3_default(); -var fromPointsMinBoxPt = new Cartesian3_default(); -var fromPointsMaxBoxPt = new Cartesian3_default(); -var fromPointsNaiveCenterScratch = new Cartesian3_default(); -var volumeConstant = 4 / 3 * Math_default.PI; -BoundingSphere.fromPoints = function(positions, result) { - if (!defined_default(result)) { - result = new BoundingSphere(); - } - if (!defined_default(positions) || positions.length === 0) { - result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); - result.radius = 0; - return result; - } - const currentPos = Cartesian3_default.clone(positions[0], fromPointsCurrentPos); - const xMin = Cartesian3_default.clone(currentPos, fromPointsXMin); - const yMin = Cartesian3_default.clone(currentPos, fromPointsYMin); - const zMin = Cartesian3_default.clone(currentPos, fromPointsZMin); - const xMax = Cartesian3_default.clone(currentPos, fromPointsXMax); - const yMax = Cartesian3_default.clone(currentPos, fromPointsYMax); - const zMax = Cartesian3_default.clone(currentPos, fromPointsZMax); - const numPositions = positions.length; - let i; - for (i = 1; i < numPositions; i++) { - Cartesian3_default.clone(positions[i], currentPos); - const x = currentPos.x; - const y = currentPos.y; - const z = currentPos.z; - if (x < xMin.x) { - Cartesian3_default.clone(currentPos, xMin); - } - if (x > xMax.x) { - Cartesian3_default.clone(currentPos, xMax); - } - if (y < yMin.y) { - Cartesian3_default.clone(currentPos, yMin); - } - if (y > yMax.y) { - Cartesian3_default.clone(currentPos, yMax); - } - if (z < zMin.z) { - Cartesian3_default.clone(currentPos, zMin); - } - if (z > zMax.z) { - Cartesian3_default.clone(currentPos, zMax); - } - } - const xSpan = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(xMax, xMin, fromPointsScratch) - ); - const ySpan = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(yMax, yMin, fromPointsScratch) - ); - const zSpan = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(zMax, zMin, fromPointsScratch) - ); - let diameter1 = xMin; - let diameter2 = xMax; - let maxSpan = xSpan; - if (ySpan > maxSpan) { - maxSpan = ySpan; - diameter1 = yMin; - diameter2 = yMax; - } - if (zSpan > maxSpan) { - maxSpan = zSpan; - diameter1 = zMin; - diameter2 = zMax; - } - const ritterCenter = fromPointsRitterCenter; - ritterCenter.x = (diameter1.x + diameter2.x) * 0.5; - ritterCenter.y = (diameter1.y + diameter2.y) * 0.5; - ritterCenter.z = (diameter1.z + diameter2.z) * 0.5; - let radiusSquared = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(diameter2, ritterCenter, fromPointsScratch) - ); - let ritterRadius = Math.sqrt(radiusSquared); - const minBoxPt = fromPointsMinBoxPt; - minBoxPt.x = xMin.x; - minBoxPt.y = yMin.y; - minBoxPt.z = zMin.z; - const maxBoxPt = fromPointsMaxBoxPt; - maxBoxPt.x = xMax.x; - maxBoxPt.y = yMax.y; - maxBoxPt.z = zMax.z; - const naiveCenter = Cartesian3_default.midpoint( - minBoxPt, - maxBoxPt, - fromPointsNaiveCenterScratch - ); - let naiveRadius = 0; - for (i = 0; i < numPositions; i++) { - Cartesian3_default.clone(positions[i], currentPos); - const r = Cartesian3_default.magnitude( - Cartesian3_default.subtract(currentPos, naiveCenter, fromPointsScratch) - ); - if (r > naiveRadius) { - naiveRadius = r; - } - const oldCenterToPointSquared = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(currentPos, ritterCenter, fromPointsScratch) - ); - if (oldCenterToPointSquared > radiusSquared) { - const oldCenterToPoint = Math.sqrt(oldCenterToPointSquared); - ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5; - radiusSquared = ritterRadius * ritterRadius; - const oldToNew = oldCenterToPoint - ritterRadius; - ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint; - ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint; - ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint; - } +Cartesian4.clone = function(cartesian, result) { + if (!defined_default(cartesian)) { + return void 0; } - if (ritterRadius < naiveRadius) { - Cartesian3_default.clone(ritterCenter, result.center); - result.radius = ritterRadius; - } else { - Cartesian3_default.clone(naiveCenter, result.center); - result.radius = naiveRadius; + if (!defined_default(result)) { + return new Cartesian4(cartesian.x, cartesian.y, cartesian.z, cartesian.w); } + result.x = cartesian.x; + result.y = cartesian.y; + result.z = cartesian.z; + result.w = cartesian.w; return result; }; -var defaultProjection = new GeographicProjection_default(); -var fromRectangle2DLowerLeft = new Cartesian3_default(); -var fromRectangle2DUpperRight = new Cartesian3_default(); -var fromRectangle2DSouthwest = new Cartographic_default(); -var fromRectangle2DNortheast = new Cartographic_default(); -BoundingSphere.fromRectangle2D = function(rectangle, projection, result) { - return BoundingSphere.fromRectangleWithHeights2D( - rectangle, - projection, - 0, - 0, - result - ); +Cartesian4.packedLength = 4; +Cartesian4.pack = function(value, array, startingIndex) { + Check_default.typeOf.object("value", value); + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + array[startingIndex++] = value.x; + array[startingIndex++] = value.y; + array[startingIndex++] = value.z; + array[startingIndex] = value.w; + return array; }; -BoundingSphere.fromRectangleWithHeights2D = function(rectangle, projection, minimumHeight, maximumHeight, result) { - if (!defined_default(result)) { - result = new BoundingSphere(); - } - if (!defined_default(rectangle)) { - result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); - result.radius = 0; - return result; - } - projection = defaultValue_default(projection, defaultProjection); - Rectangle_default.southwest(rectangle, fromRectangle2DSouthwest); - fromRectangle2DSouthwest.height = minimumHeight; - Rectangle_default.northeast(rectangle, fromRectangle2DNortheast); - fromRectangle2DNortheast.height = maximumHeight; - const lowerLeft = projection.project( - fromRectangle2DSouthwest, - fromRectangle2DLowerLeft - ); - const upperRight = projection.project( - fromRectangle2DNortheast, - fromRectangle2DUpperRight - ); - const width = upperRight.x - lowerLeft.x; - const height = upperRight.y - lowerLeft.y; - const elevation = upperRight.z - lowerLeft.z; - result.radius = Math.sqrt(width * width + height * height + elevation * elevation) * 0.5; - const center = result.center; - center.x = lowerLeft.x + width * 0.5; - center.y = lowerLeft.y + height * 0.5; - center.z = lowerLeft.z + elevation * 0.5; - return result; -}; -var fromRectangle3DScratch = []; -BoundingSphere.fromRectangle3D = function(rectangle, ellipsoid, surfaceHeight, result) { - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); - surfaceHeight = defaultValue_default(surfaceHeight, 0); +Cartesian4.unpack = function(array, startingIndex, result) { + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); if (!defined_default(result)) { - result = new BoundingSphere(); - } - if (!defined_default(rectangle)) { - result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); - result.radius = 0; - return result; + result = new Cartesian4(); } - const positions = Rectangle_default.subsample( - rectangle, - ellipsoid, - surfaceHeight, - fromRectangle3DScratch - ); - return BoundingSphere.fromPoints(positions, result); + result.x = array[startingIndex++]; + result.y = array[startingIndex++]; + result.z = array[startingIndex++]; + result.w = array[startingIndex]; + return result; }; -BoundingSphere.fromVertices = function(positions, center, stride, result) { +Cartesian4.packArray = function(array, result) { + Check_default.defined("array", array); + const length = array.length; + const resultLength = length * 4; if (!defined_default(result)) { - result = new BoundingSphere(); - } - if (!defined_default(positions) || positions.length === 0) { - result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); - result.radius = 0; - return result; - } - center = defaultValue_default(center, Cartesian3_default.ZERO); - stride = defaultValue_default(stride, 3); - Check_default.typeOf.number.greaterThanOrEquals("stride", stride, 3); - const currentPos = fromPointsCurrentPos; - currentPos.x = positions[0] + center.x; - currentPos.y = positions[1] + center.y; - currentPos.z = positions[2] + center.z; - const xMin = Cartesian3_default.clone(currentPos, fromPointsXMin); - const yMin = Cartesian3_default.clone(currentPos, fromPointsYMin); - const zMin = Cartesian3_default.clone(currentPos, fromPointsZMin); - const xMax = Cartesian3_default.clone(currentPos, fromPointsXMax); - const yMax = Cartesian3_default.clone(currentPos, fromPointsYMax); - const zMax = Cartesian3_default.clone(currentPos, fromPointsZMax); - const numElements = positions.length; - let i; - for (i = 0; i < numElements; i += stride) { - const x = positions[i] + center.x; - const y = positions[i + 1] + center.y; - const z = positions[i + 2] + center.z; - currentPos.x = x; - currentPos.y = y; - currentPos.z = z; - if (x < xMin.x) { - Cartesian3_default.clone(currentPos, xMin); - } - if (x > xMax.x) { - Cartesian3_default.clone(currentPos, xMax); - } - if (y < yMin.y) { - Cartesian3_default.clone(currentPos, yMin); - } - if (y > yMax.y) { - Cartesian3_default.clone(currentPos, yMax); - } - if (z < zMin.z) { - Cartesian3_default.clone(currentPos, zMin); - } - if (z > zMax.z) { - Cartesian3_default.clone(currentPos, zMax); - } - } - const xSpan = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(xMax, xMin, fromPointsScratch) - ); - const ySpan = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(yMax, yMin, fromPointsScratch) - ); - const zSpan = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(zMax, zMin, fromPointsScratch) - ); - let diameter1 = xMin; - let diameter2 = xMax; - let maxSpan = xSpan; - if (ySpan > maxSpan) { - maxSpan = ySpan; - diameter1 = yMin; - diameter2 = yMax; - } - if (zSpan > maxSpan) { - maxSpan = zSpan; - diameter1 = zMin; - diameter2 = zMax; - } - const ritterCenter = fromPointsRitterCenter; - ritterCenter.x = (diameter1.x + diameter2.x) * 0.5; - ritterCenter.y = (diameter1.y + diameter2.y) * 0.5; - ritterCenter.z = (diameter1.z + diameter2.z) * 0.5; - let radiusSquared = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(diameter2, ritterCenter, fromPointsScratch) - ); - let ritterRadius = Math.sqrt(radiusSquared); - const minBoxPt = fromPointsMinBoxPt; - minBoxPt.x = xMin.x; - minBoxPt.y = yMin.y; - minBoxPt.z = zMin.z; - const maxBoxPt = fromPointsMaxBoxPt; - maxBoxPt.x = xMax.x; - maxBoxPt.y = yMax.y; - maxBoxPt.z = zMax.z; - const naiveCenter = Cartesian3_default.midpoint( - minBoxPt, - maxBoxPt, - fromPointsNaiveCenterScratch - ); - let naiveRadius = 0; - for (i = 0; i < numElements; i += stride) { - currentPos.x = positions[i] + center.x; - currentPos.y = positions[i + 1] + center.y; - currentPos.z = positions[i + 2] + center.z; - const r = Cartesian3_default.magnitude( - Cartesian3_default.subtract(currentPos, naiveCenter, fromPointsScratch) - ); - if (r > naiveRadius) { - naiveRadius = r; - } - const oldCenterToPointSquared = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(currentPos, ritterCenter, fromPointsScratch) + result = new Array(resultLength); + } else if (!Array.isArray(result) && result.length !== resultLength) { + throw new DeveloperError_default( + "If result is a typed array, it must have exactly array.length * 4 elements" ); - if (oldCenterToPointSquared > radiusSquared) { - const oldCenterToPoint = Math.sqrt(oldCenterToPointSquared); - ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5; - radiusSquared = ritterRadius * ritterRadius; - const oldToNew = oldCenterToPoint - ritterRadius; - ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint; - ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint; - ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint; - } + } else if (result.length !== resultLength) { + result.length = resultLength; } - if (ritterRadius < naiveRadius) { - Cartesian3_default.clone(ritterCenter, result.center); - result.radius = ritterRadius; - } else { - Cartesian3_default.clone(naiveCenter, result.center); - result.radius = naiveRadius; + for (let i = 0; i < length; ++i) { + Cartesian4.pack(array[i], result, i * 4); } return result; }; -BoundingSphere.fromEncodedCartesianVertices = function(positionsHigh, positionsLow, result) { - if (!defined_default(result)) { - result = new BoundingSphere(); - } - if (!defined_default(positionsHigh) || !defined_default(positionsLow) || positionsHigh.length !== positionsLow.length || positionsHigh.length === 0) { - result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); - result.radius = 0; - return result; - } - const currentPos = fromPointsCurrentPos; - currentPos.x = positionsHigh[0] + positionsLow[0]; - currentPos.y = positionsHigh[1] + positionsLow[1]; - currentPos.z = positionsHigh[2] + positionsLow[2]; - const xMin = Cartesian3_default.clone(currentPos, fromPointsXMin); - const yMin = Cartesian3_default.clone(currentPos, fromPointsYMin); - const zMin = Cartesian3_default.clone(currentPos, fromPointsZMin); - const xMax = Cartesian3_default.clone(currentPos, fromPointsXMax); - const yMax = Cartesian3_default.clone(currentPos, fromPointsYMax); - const zMax = Cartesian3_default.clone(currentPos, fromPointsZMax); - const numElements = positionsHigh.length; - let i; - for (i = 0; i < numElements; i += 3) { - const x = positionsHigh[i] + positionsLow[i]; - const y = positionsHigh[i + 1] + positionsLow[i + 1]; - const z = positionsHigh[i + 2] + positionsLow[i + 2]; - currentPos.x = x; - currentPos.y = y; - currentPos.z = z; - if (x < xMin.x) { - Cartesian3_default.clone(currentPos, xMin); - } - if (x > xMax.x) { - Cartesian3_default.clone(currentPos, xMax); - } - if (y < yMin.y) { - Cartesian3_default.clone(currentPos, yMin); - } - if (y > yMax.y) { - Cartesian3_default.clone(currentPos, yMax); - } - if (z < zMin.z) { - Cartesian3_default.clone(currentPos, zMin); - } - if (z > zMax.z) { - Cartesian3_default.clone(currentPos, zMax); - } - } - const xSpan = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(xMax, xMin, fromPointsScratch) - ); - const ySpan = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(yMax, yMin, fromPointsScratch) - ); - const zSpan = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(zMax, zMin, fromPointsScratch) - ); - let diameter1 = xMin; - let diameter2 = xMax; - let maxSpan = xSpan; - if (ySpan > maxSpan) { - maxSpan = ySpan; - diameter1 = yMin; - diameter2 = yMax; - } - if (zSpan > maxSpan) { - maxSpan = zSpan; - diameter1 = zMin; - diameter2 = zMax; - } - const ritterCenter = fromPointsRitterCenter; - ritterCenter.x = (diameter1.x + diameter2.x) * 0.5; - ritterCenter.y = (diameter1.y + diameter2.y) * 0.5; - ritterCenter.z = (diameter1.z + diameter2.z) * 0.5; - let radiusSquared = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(diameter2, ritterCenter, fromPointsScratch) - ); - let ritterRadius = Math.sqrt(radiusSquared); - const minBoxPt = fromPointsMinBoxPt; - minBoxPt.x = xMin.x; - minBoxPt.y = yMin.y; - minBoxPt.z = zMin.z; - const maxBoxPt = fromPointsMaxBoxPt; - maxBoxPt.x = xMax.x; - maxBoxPt.y = yMax.y; - maxBoxPt.z = zMax.z; - const naiveCenter = Cartesian3_default.midpoint( - minBoxPt, - maxBoxPt, - fromPointsNaiveCenterScratch - ); - let naiveRadius = 0; - for (i = 0; i < numElements; i += 3) { - currentPos.x = positionsHigh[i] + positionsLow[i]; - currentPos.y = positionsHigh[i + 1] + positionsLow[i + 1]; - currentPos.z = positionsHigh[i + 2] + positionsLow[i + 2]; - const r = Cartesian3_default.magnitude( - Cartesian3_default.subtract(currentPos, naiveCenter, fromPointsScratch) - ); - if (r > naiveRadius) { - naiveRadius = r; - } - const oldCenterToPointSquared = Cartesian3_default.magnitudeSquared( - Cartesian3_default.subtract(currentPos, ritterCenter, fromPointsScratch) - ); - if (oldCenterToPointSquared > radiusSquared) { - const oldCenterToPoint = Math.sqrt(oldCenterToPointSquared); - ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5; - radiusSquared = ritterRadius * ritterRadius; - const oldToNew = oldCenterToPoint - ritterRadius; - ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint; - ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint; - ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint; - } +Cartesian4.unpackArray = function(array, result) { + Check_default.defined("array", array); + Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 4); + if (array.length % 4 !== 0) { + throw new DeveloperError_default("array length must be a multiple of 4."); } - if (ritterRadius < naiveRadius) { - Cartesian3_default.clone(ritterCenter, result.center); - result.radius = ritterRadius; + const length = array.length; + if (!defined_default(result)) { + result = new Array(length / 4); } else { - Cartesian3_default.clone(naiveCenter, result.center); - result.radius = naiveRadius; + result.length = length / 4; + } + for (let i = 0; i < length; i += 4) { + const index = i / 4; + result[index] = Cartesian4.unpack(array, i, result[index]); } return result; }; -BoundingSphere.fromCornerPoints = function(corner, oppositeCorner, result) { - Check_default.typeOf.object("corner", corner); - Check_default.typeOf.object("oppositeCorner", oppositeCorner); - if (!defined_default(result)) { - result = new BoundingSphere(); - } - const center = Cartesian3_default.midpoint(corner, oppositeCorner, result.center); - result.radius = Cartesian3_default.distance(center, oppositeCorner); +Cartesian4.fromArray = Cartesian4.unpack; +Cartesian4.maximumComponent = function(cartesian) { + Check_default.typeOf.object("cartesian", cartesian); + return Math.max(cartesian.x, cartesian.y, cartesian.z, cartesian.w); +}; +Cartesian4.minimumComponent = function(cartesian) { + Check_default.typeOf.object("cartesian", cartesian); + return Math.min(cartesian.x, cartesian.y, cartesian.z, cartesian.w); +}; +Cartesian4.minimumByComponent = function(first, second, result) { + Check_default.typeOf.object("first", first); + Check_default.typeOf.object("second", second); + Check_default.typeOf.object("result", result); + result.x = Math.min(first.x, second.x); + result.y = Math.min(first.y, second.y); + result.z = Math.min(first.z, second.z); + result.w = Math.min(first.w, second.w); return result; }; -BoundingSphere.fromEllipsoid = function(ellipsoid, result) { - Check_default.typeOf.object("ellipsoid", ellipsoid); - if (!defined_default(result)) { - result = new BoundingSphere(); - } - Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); - result.radius = ellipsoid.maximumRadius; +Cartesian4.maximumByComponent = function(first, second, result) { + Check_default.typeOf.object("first", first); + Check_default.typeOf.object("second", second); + Check_default.typeOf.object("result", result); + result.x = Math.max(first.x, second.x); + result.y = Math.max(first.y, second.y); + result.z = Math.max(first.z, second.z); + result.w = Math.max(first.w, second.w); return result; }; -var fromBoundingSpheresScratch = new Cartesian3_default(); -BoundingSphere.fromBoundingSpheres = function(boundingSpheres, result) { - if (!defined_default(result)) { - result = new BoundingSphere(); - } - if (!defined_default(boundingSpheres) || boundingSpheres.length === 0) { - result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center); - result.radius = 0; - return result; - } - const length = boundingSpheres.length; - if (length === 1) { - return BoundingSphere.clone(boundingSpheres[0], result); - } - if (length === 2) { - return BoundingSphere.union(boundingSpheres[0], boundingSpheres[1], result); - } - const positions = []; - let i; - for (i = 0; i < length; i++) { - positions.push(boundingSpheres[i].center); - } - result = BoundingSphere.fromPoints(positions, result); - const center = result.center; - let radius = result.radius; - for (i = 0; i < length; i++) { - const tmp = boundingSpheres[i]; - radius = Math.max( - radius, - Cartesian3_default.distance(center, tmp.center, fromBoundingSpheresScratch) + tmp.radius - ); - } - result.radius = radius; +Cartesian4.clamp = function(value, min, max, result) { + Check_default.typeOf.object("value", value); + Check_default.typeOf.object("min", min); + Check_default.typeOf.object("max", max); + Check_default.typeOf.object("result", result); + const x = Math_default.clamp(value.x, min.x, max.x); + const y = Math_default.clamp(value.y, min.y, max.y); + const z = Math_default.clamp(value.z, min.z, max.z); + const w = Math_default.clamp(value.w, min.w, max.w); + result.x = x; + result.y = y; + result.z = z; + result.w = w; return result; }; -var fromOrientedBoundingBoxScratchU = new Cartesian3_default(); -var fromOrientedBoundingBoxScratchV = new Cartesian3_default(); -var fromOrientedBoundingBoxScratchW = new Cartesian3_default(); -BoundingSphere.fromOrientedBoundingBox = function(orientedBoundingBox, result) { - Check_default.defined("orientedBoundingBox", orientedBoundingBox); - if (!defined_default(result)) { - result = new BoundingSphere(); - } - const halfAxes = orientedBoundingBox.halfAxes; - const u2 = Matrix3_default.getColumn(halfAxes, 0, fromOrientedBoundingBoxScratchU); - const v2 = Matrix3_default.getColumn(halfAxes, 1, fromOrientedBoundingBoxScratchV); - const w = Matrix3_default.getColumn(halfAxes, 2, fromOrientedBoundingBoxScratchW); - Cartesian3_default.add(u2, v2, u2); - Cartesian3_default.add(u2, w, u2); - result.center = Cartesian3_default.clone(orientedBoundingBox.center, result.center); - result.radius = Cartesian3_default.magnitude(u2); - return result; -}; -var scratchFromTransformationCenter = new Cartesian3_default(); -var scratchFromTransformationScale = new Cartesian3_default(); -BoundingSphere.fromTransformation = function(transformation, result) { - Check_default.typeOf.object("transformation", transformation); - if (!defined_default(result)) { - result = new BoundingSphere(); +Cartesian4.magnitudeSquared = function(cartesian) { + Check_default.typeOf.object("cartesian", cartesian); + return cartesian.x * cartesian.x + cartesian.y * cartesian.y + cartesian.z * cartesian.z + cartesian.w * cartesian.w; +}; +Cartesian4.magnitude = function(cartesian) { + return Math.sqrt(Cartesian4.magnitudeSquared(cartesian)); +}; +var distanceScratch = new Cartesian4(); +Cartesian4.distance = function(left, right) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Cartesian4.subtract(left, right, distanceScratch); + return Cartesian4.magnitude(distanceScratch); +}; +Cartesian4.distanceSquared = function(left, right) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Cartesian4.subtract(left, right, distanceScratch); + return Cartesian4.magnitudeSquared(distanceScratch); +}; +Cartesian4.normalize = function(cartesian, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + const magnitude = Cartesian4.magnitude(cartesian); + result.x = cartesian.x / magnitude; + result.y = cartesian.y / magnitude; + result.z = cartesian.z / magnitude; + result.w = cartesian.w / magnitude; + if (isNaN(result.x) || isNaN(result.y) || isNaN(result.z) || isNaN(result.w)) { + throw new DeveloperError_default("normalized result is not a number"); } - const center = Matrix4_default.getTranslation( - transformation, - scratchFromTransformationCenter - ); - const scale = Matrix4_default.getScale( - transformation, - scratchFromTransformationScale - ); - const radius = 0.5 * Cartesian3_default.magnitude(scale); - result.center = Cartesian3_default.clone(center, result.center); - result.radius = radius; return result; }; -BoundingSphere.clone = function(sphere, result) { - if (!defined_default(sphere)) { - return void 0; - } - if (!defined_default(result)) { - return new BoundingSphere(sphere.center, sphere.radius); - } - result.center = Cartesian3_default.clone(sphere.center, result.center); - result.radius = sphere.radius; +Cartesian4.dot = function(left, right) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; +}; +Cartesian4.multiplyComponents = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result.x = left.x * right.x; + result.y = left.y * right.y; + result.z = left.z * right.z; + result.w = left.w * right.w; return result; }; -BoundingSphere.packedLength = 4; -BoundingSphere.pack = function(value, array, startingIndex) { - Check_default.typeOf.object("value", value); - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - const center = value.center; - array[startingIndex++] = center.x; - array[startingIndex++] = center.y; - array[startingIndex++] = center.z; - array[startingIndex] = value.radius; - return array; +Cartesian4.divideComponents = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result.x = left.x / right.x; + result.y = left.y / right.y; + result.z = left.z / right.z; + result.w = left.w / right.w; + return result; }; -BoundingSphere.unpack = function(array, startingIndex, result) { - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - if (!defined_default(result)) { - result = new BoundingSphere(); - } - const center = result.center; - center.x = array[startingIndex++]; - center.y = array[startingIndex++]; - center.z = array[startingIndex++]; - result.radius = array[startingIndex]; +Cartesian4.add = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result.x = left.x + right.x; + result.y = left.y + right.y; + result.z = left.z + right.z; + result.w = left.w + right.w; return result; }; -var unionScratch = new Cartesian3_default(); -var unionScratchCenter = new Cartesian3_default(); -BoundingSphere.union = function(left, right, result) { +Cartesian4.subtract = function(left, right, result) { Check_default.typeOf.object("left", left); Check_default.typeOf.object("right", right); - if (!defined_default(result)) { - result = new BoundingSphere(); - } - const leftCenter = left.center; - const leftRadius = left.radius; - const rightCenter = right.center; - const rightRadius = right.radius; - const toRightCenter = Cartesian3_default.subtract( - rightCenter, - leftCenter, - unionScratch - ); - const centerSeparation = Cartesian3_default.magnitude(toRightCenter); - if (leftRadius >= centerSeparation + rightRadius) { - left.clone(result); - return result; - } - if (rightRadius >= centerSeparation + leftRadius) { - right.clone(result); - return result; - } - const halfDistanceBetweenTangentPoints = (leftRadius + centerSeparation + rightRadius) * 0.5; - const center = Cartesian3_default.multiplyByScalar( - toRightCenter, - (-leftRadius + halfDistanceBetweenTangentPoints) / centerSeparation, - unionScratchCenter - ); - Cartesian3_default.add(center, leftCenter, center); - Cartesian3_default.clone(center, result.center); - result.radius = halfDistanceBetweenTangentPoints; - return result; -}; -var expandScratch = new Cartesian3_default(); -BoundingSphere.expand = function(sphere, point, result) { - Check_default.typeOf.object("sphere", sphere); - Check_default.typeOf.object("point", point); - result = BoundingSphere.clone(sphere, result); - const radius = Cartesian3_default.magnitude( - Cartesian3_default.subtract(point, result.center, expandScratch) - ); - if (radius > result.radius) { - result.radius = radius; - } + Check_default.typeOf.object("result", result); + result.x = left.x - right.x; + result.y = left.y - right.y; + result.z = left.z - right.z; + result.w = left.w - right.w; return result; }; -BoundingSphere.intersectPlane = function(sphere, plane) { - Check_default.typeOf.object("sphere", sphere); - Check_default.typeOf.object("plane", plane); - const center = sphere.center; - const radius = sphere.radius; - const normal = plane.normal; - const distanceToPlane = Cartesian3_default.dot(normal, center) + plane.distance; - if (distanceToPlane < -radius) { - return Intersect_default.OUTSIDE; - } else if (distanceToPlane < radius) { - return Intersect_default.INTERSECTING; - } - return Intersect_default.INSIDE; +Cartesian4.multiplyByScalar = function(cartesian, scalar, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.number("scalar", scalar); + Check_default.typeOf.object("result", result); + result.x = cartesian.x * scalar; + result.y = cartesian.y * scalar; + result.z = cartesian.z * scalar; + result.w = cartesian.w * scalar; + return result; }; -BoundingSphere.transform = function(sphere, transform, result) { - Check_default.typeOf.object("sphere", sphere); - Check_default.typeOf.object("transform", transform); - if (!defined_default(result)) { - result = new BoundingSphere(); - } - result.center = Matrix4_default.multiplyByPoint( - transform, - sphere.center, - result.center - ); - result.radius = Matrix4_default.getMaximumScale(transform) * sphere.radius; +Cartesian4.divideByScalar = function(cartesian, scalar, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.number("scalar", scalar); + Check_default.typeOf.object("result", result); + result.x = cartesian.x / scalar; + result.y = cartesian.y / scalar; + result.z = cartesian.z / scalar; + result.w = cartesian.w / scalar; return result; }; -var distanceSquaredToScratch = new Cartesian3_default(); -BoundingSphere.distanceSquaredTo = function(sphere, cartesian) { - Check_default.typeOf.object("sphere", sphere); +Cartesian4.negate = function(cartesian, result) { Check_default.typeOf.object("cartesian", cartesian); - const diff = Cartesian3_default.subtract( - sphere.center, - cartesian, - distanceSquaredToScratch - ); - const distance = Cartesian3_default.magnitude(diff) - sphere.radius; - if (distance <= 0) { - return 0; - } - return distance * distance; + Check_default.typeOf.object("result", result); + result.x = -cartesian.x; + result.y = -cartesian.y; + result.z = -cartesian.z; + result.w = -cartesian.w; + return result; }; -BoundingSphere.transformWithoutScale = function(sphere, transform, result) { - Check_default.typeOf.object("sphere", sphere); - Check_default.typeOf.object("transform", transform); - if (!defined_default(result)) { - result = new BoundingSphere(); - } - result.center = Matrix4_default.multiplyByPoint( - transform, - sphere.center, - result.center - ); - result.radius = sphere.radius; +Cartesian4.abs = function(cartesian, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + result.x = Math.abs(cartesian.x); + result.y = Math.abs(cartesian.y); + result.z = Math.abs(cartesian.z); + result.w = Math.abs(cartesian.w); return result; }; -var scratchCartesian3 = new Cartesian3_default(); -BoundingSphere.computePlaneDistances = function(sphere, position, direction, result) { - Check_default.typeOf.object("sphere", sphere); - Check_default.typeOf.object("position", position); - Check_default.typeOf.object("direction", direction); - if (!defined_default(result)) { - result = new Interval_default(); - } - const toCenter = Cartesian3_default.subtract( - sphere.center, - position, - scratchCartesian3 - ); - const mag = Cartesian3_default.dot(direction, toCenter); - result.start = mag - sphere.radius; - result.stop = mag + sphere.radius; - return result; -}; -var projectTo2DNormalScratch = new Cartesian3_default(); -var projectTo2DEastScratch = new Cartesian3_default(); -var projectTo2DNorthScratch = new Cartesian3_default(); -var projectTo2DWestScratch = new Cartesian3_default(); -var projectTo2DSouthScratch = new Cartesian3_default(); -var projectTo2DCartographicScratch = new Cartographic_default(); -var projectTo2DPositionsScratch = new Array(8); -for (let n = 0; n < 8; ++n) { - projectTo2DPositionsScratch[n] = new Cartesian3_default(); -} -var projectTo2DProjection = new GeographicProjection_default(); -BoundingSphere.projectTo2D = function(sphere, projection, result) { - Check_default.typeOf.object("sphere", sphere); - projection = defaultValue_default(projection, projectTo2DProjection); - const ellipsoid = projection.ellipsoid; - let center = sphere.center; - const radius = sphere.radius; - let normal; - if (Cartesian3_default.equals(center, Cartesian3_default.ZERO)) { - normal = Cartesian3_default.clone(Cartesian3_default.UNIT_X, projectTo2DNormalScratch); +var lerpScratch = new Cartesian4(); +Cartesian4.lerp = function(start, end, t, result) { + Check_default.typeOf.object("start", start); + Check_default.typeOf.object("end", end); + Check_default.typeOf.number("t", t); + Check_default.typeOf.object("result", result); + Cartesian4.multiplyByScalar(end, t, lerpScratch); + result = Cartesian4.multiplyByScalar(start, 1 - t, result); + return Cartesian4.add(lerpScratch, result, result); +}; +var mostOrthogonalAxisScratch = new Cartesian4(); +Cartesian4.mostOrthogonalAxis = function(cartesian, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + const f = Cartesian4.normalize(cartesian, mostOrthogonalAxisScratch); + Cartesian4.abs(f, f); + if (f.x <= f.y) { + if (f.x <= f.z) { + if (f.x <= f.w) { + result = Cartesian4.clone(Cartesian4.UNIT_X, result); + } else { + result = Cartesian4.clone(Cartesian4.UNIT_W, result); + } + } else if (f.z <= f.w) { + result = Cartesian4.clone(Cartesian4.UNIT_Z, result); + } else { + result = Cartesian4.clone(Cartesian4.UNIT_W, result); + } + } else if (f.y <= f.z) { + if (f.y <= f.w) { + result = Cartesian4.clone(Cartesian4.UNIT_Y, result); + } else { + result = Cartesian4.clone(Cartesian4.UNIT_W, result); + } + } else if (f.z <= f.w) { + result = Cartesian4.clone(Cartesian4.UNIT_Z, result); } else { - normal = ellipsoid.geodeticSurfaceNormal(center, projectTo2DNormalScratch); - } - const east = Cartesian3_default.cross( - Cartesian3_default.UNIT_Z, - normal, - projectTo2DEastScratch - ); - Cartesian3_default.normalize(east, east); - const north = Cartesian3_default.cross(normal, east, projectTo2DNorthScratch); - Cartesian3_default.normalize(north, north); - Cartesian3_default.multiplyByScalar(normal, radius, normal); - Cartesian3_default.multiplyByScalar(north, radius, north); - Cartesian3_default.multiplyByScalar(east, radius, east); - const south = Cartesian3_default.negate(north, projectTo2DSouthScratch); - const west = Cartesian3_default.negate(east, projectTo2DWestScratch); - const positions = projectTo2DPositionsScratch; - let corner = positions[0]; - Cartesian3_default.add(normal, north, corner); - Cartesian3_default.add(corner, east, corner); - corner = positions[1]; - Cartesian3_default.add(normal, north, corner); - Cartesian3_default.add(corner, west, corner); - corner = positions[2]; - Cartesian3_default.add(normal, south, corner); - Cartesian3_default.add(corner, west, corner); - corner = positions[3]; - Cartesian3_default.add(normal, south, corner); - Cartesian3_default.add(corner, east, corner); - Cartesian3_default.negate(normal, normal); - corner = positions[4]; - Cartesian3_default.add(normal, north, corner); - Cartesian3_default.add(corner, east, corner); - corner = positions[5]; - Cartesian3_default.add(normal, north, corner); - Cartesian3_default.add(corner, west, corner); - corner = positions[6]; - Cartesian3_default.add(normal, south, corner); - Cartesian3_default.add(corner, west, corner); - corner = positions[7]; - Cartesian3_default.add(normal, south, corner); - Cartesian3_default.add(corner, east, corner); - const length = positions.length; - for (let i = 0; i < length; ++i) { - const position = positions[i]; - Cartesian3_default.add(center, position, position); - const cartographic = ellipsoid.cartesianToCartographic( - position, - projectTo2DCartographicScratch - ); - projection.project(cartographic, position); + result = Cartesian4.clone(Cartesian4.UNIT_W, result); } - result = BoundingSphere.fromPoints(positions, result); - center = result.center; - const x = center.x; - const y = center.y; - const z = center.z; - center.x = z; - center.y = x; - center.z = y; return result; }; -BoundingSphere.isOccluded = function(sphere, occluder) { - Check_default.typeOf.object("sphere", sphere); - Check_default.typeOf.object("occluder", occluder); - return !occluder.isBoundingSphereVisible(sphere); +Cartesian4.equals = function(left, right) { + return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.z === right.z && left.w === right.w; +}; +Cartesian4.equalsArray = function(cartesian, array, offset) { + return cartesian.x === array[offset] && cartesian.y === array[offset + 1] && cartesian.z === array[offset + 2] && cartesian.w === array[offset + 3]; }; -BoundingSphere.equals = function(left, right) { - return left === right || defined_default(left) && defined_default(right) && Cartesian3_default.equals(left.center, right.center) && left.radius === right.radius; +Cartesian4.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) { + return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon( + left.x, + right.x, + relativeEpsilon, + absoluteEpsilon + ) && Math_default.equalsEpsilon( + left.y, + right.y, + relativeEpsilon, + absoluteEpsilon + ) && Math_default.equalsEpsilon( + left.z, + right.z, + relativeEpsilon, + absoluteEpsilon + ) && Math_default.equalsEpsilon( + left.w, + right.w, + relativeEpsilon, + absoluteEpsilon + ); }; -BoundingSphere.prototype.intersectPlane = function(plane) { - return BoundingSphere.intersectPlane(this, plane); +Cartesian4.ZERO = Object.freeze(new Cartesian4(0, 0, 0, 0)); +Cartesian4.ONE = Object.freeze(new Cartesian4(1, 1, 1, 1)); +Cartesian4.UNIT_X = Object.freeze(new Cartesian4(1, 0, 0, 0)); +Cartesian4.UNIT_Y = Object.freeze(new Cartesian4(0, 1, 0, 0)); +Cartesian4.UNIT_Z = Object.freeze(new Cartesian4(0, 0, 1, 0)); +Cartesian4.UNIT_W = Object.freeze(new Cartesian4(0, 0, 0, 1)); +Cartesian4.prototype.clone = function(result) { + return Cartesian4.clone(this, result); }; -BoundingSphere.prototype.distanceSquaredTo = function(cartesian) { - return BoundingSphere.distanceSquaredTo(this, cartesian); +Cartesian4.prototype.equals = function(right) { + return Cartesian4.equals(this, right); }; -BoundingSphere.prototype.computePlaneDistances = function(position, direction, result) { - return BoundingSphere.computePlaneDistances( +Cartesian4.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) { + return Cartesian4.equalsEpsilon( this, - position, - direction, - result + right, + relativeEpsilon, + absoluteEpsilon ); }; -BoundingSphere.prototype.isOccluded = function(occluder) { - return BoundingSphere.isOccluded(this, occluder); -}; -BoundingSphere.prototype.equals = function(right) { - return BoundingSphere.equals(this, right); +Cartesian4.prototype.toString = function() { + return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`; }; -BoundingSphere.prototype.clone = function(result) { - return BoundingSphere.clone(this, result); +var scratchF32Array = new Float32Array(1); +var scratchU8Array = new Uint8Array(scratchF32Array.buffer); +var testU32 = new Uint32Array([287454020]); +var testU8 = new Uint8Array(testU32.buffer); +var littleEndian = testU8[0] === 68; +Cartesian4.packFloat = function(value, result) { + Check_default.typeOf.number("value", value); + if (!defined_default(result)) { + result = new Cartesian4(); + } + scratchF32Array[0] = value; + if (littleEndian) { + result.x = scratchU8Array[0]; + result.y = scratchU8Array[1]; + result.z = scratchU8Array[2]; + result.w = scratchU8Array[3]; + } else { + result.x = scratchU8Array[3]; + result.y = scratchU8Array[2]; + result.z = scratchU8Array[1]; + result.w = scratchU8Array[0]; + } + return result; }; -BoundingSphere.prototype.volume = function() { - const radius = this.radius; - return volumeConstant * radius * radius * radius; +Cartesian4.unpackFloat = function(packedFloat) { + Check_default.typeOf.object("packedFloat", packedFloat); + if (littleEndian) { + scratchU8Array[0] = packedFloat.x; + scratchU8Array[1] = packedFloat.y; + scratchU8Array[2] = packedFloat.z; + scratchU8Array[3] = packedFloat.w; + } else { + scratchU8Array[0] = packedFloat.w; + scratchU8Array[1] = packedFloat.z; + scratchU8Array[2] = packedFloat.y; + scratchU8Array[3] = packedFloat.x; + } + return scratchF32Array[0]; }; -var BoundingSphere_default = BoundingSphere; +var Cartesian4_default = Cartesian4; -// packages/engine/Source/Core/binarySearch.js -function binarySearch(array, itemToFind, comparator) { +// packages/engine/Source/Core/Matrix4.js +function Matrix4(column0Row0, column1Row0, column2Row0, column3Row0, column0Row1, column1Row1, column2Row1, column3Row1, column0Row2, column1Row2, column2Row2, column3Row2, column0Row3, column1Row3, column2Row3, column3Row3) { + this[0] = defaultValue_default(column0Row0, 0); + this[1] = defaultValue_default(column0Row1, 0); + this[2] = defaultValue_default(column0Row2, 0); + this[3] = defaultValue_default(column0Row3, 0); + this[4] = defaultValue_default(column1Row0, 0); + this[5] = defaultValue_default(column1Row1, 0); + this[6] = defaultValue_default(column1Row2, 0); + this[7] = defaultValue_default(column1Row3, 0); + this[8] = defaultValue_default(column2Row0, 0); + this[9] = defaultValue_default(column2Row1, 0); + this[10] = defaultValue_default(column2Row2, 0); + this[11] = defaultValue_default(column2Row3, 0); + this[12] = defaultValue_default(column3Row0, 0); + this[13] = defaultValue_default(column3Row1, 0); + this[14] = defaultValue_default(column3Row2, 0); + this[15] = defaultValue_default(column3Row3, 0); +} +Matrix4.packedLength = 16; +Matrix4.pack = function(value, array, startingIndex) { + Check_default.typeOf.object("value", value); Check_default.defined("array", array); - Check_default.defined("itemToFind", itemToFind); - Check_default.defined("comparator", comparator); - let low = 0; - let high = array.length - 1; - let i; - let comparison; - while (low <= high) { - i = ~~((low + high) / 2); - comparison = comparator(array[i], itemToFind); - if (comparison < 0) { - low = i + 1; - continue; - } - if (comparison > 0) { - high = i - 1; - continue; - } - return i; + startingIndex = defaultValue_default(startingIndex, 0); + array[startingIndex++] = value[0]; + array[startingIndex++] = value[1]; + array[startingIndex++] = value[2]; + array[startingIndex++] = value[3]; + array[startingIndex++] = value[4]; + array[startingIndex++] = value[5]; + array[startingIndex++] = value[6]; + array[startingIndex++] = value[7]; + array[startingIndex++] = value[8]; + array[startingIndex++] = value[9]; + array[startingIndex++] = value[10]; + array[startingIndex++] = value[11]; + array[startingIndex++] = value[12]; + array[startingIndex++] = value[13]; + array[startingIndex++] = value[14]; + array[startingIndex] = value[15]; + return array; +}; +Matrix4.unpack = function(array, startingIndex, result) { + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + if (!defined_default(result)) { + result = new Matrix4(); + } + result[0] = array[startingIndex++]; + result[1] = array[startingIndex++]; + result[2] = array[startingIndex++]; + result[3] = array[startingIndex++]; + result[4] = array[startingIndex++]; + result[5] = array[startingIndex++]; + result[6] = array[startingIndex++]; + result[7] = array[startingIndex++]; + result[8] = array[startingIndex++]; + result[9] = array[startingIndex++]; + result[10] = array[startingIndex++]; + result[11] = array[startingIndex++]; + result[12] = array[startingIndex++]; + result[13] = array[startingIndex++]; + result[14] = array[startingIndex++]; + result[15] = array[startingIndex]; + return result; +}; +Matrix4.packArray = function(array, result) { + Check_default.defined("array", array); + const length = array.length; + const resultLength = length * 16; + if (!defined_default(result)) { + result = new Array(resultLength); + } else if (!Array.isArray(result) && result.length !== resultLength) { + throw new DeveloperError_default( + "If result is a typed array, it must have exactly array.length * 16 elements" + ); + } else if (result.length !== resultLength) { + result.length = resultLength; } - return ~(high + 1); -} -var binarySearch_default = binarySearch; - -// packages/engine/Source/Core/EarthOrientationParametersSample.js -function EarthOrientationParametersSample(xPoleWander, yPoleWander, xPoleOffset, yPoleOffset, ut1MinusUtc) { - this.xPoleWander = xPoleWander; - this.yPoleWander = yPoleWander; - this.xPoleOffset = xPoleOffset; - this.yPoleOffset = yPoleOffset; - this.ut1MinusUtc = ut1MinusUtc; -} -var EarthOrientationParametersSample_default = EarthOrientationParametersSample; - -// packages/engine/Source/Core/GregorianDate.js -function GregorianDate(year, month, day, hour, minute, second, millisecond, isLeapSecond) { - this.year = year; - this.month = month; - this.day = day; - this.hour = hour; - this.minute = minute; - this.second = second; - this.millisecond = millisecond; - this.isLeapSecond = isLeapSecond; -} -var GregorianDate_default = GregorianDate; - -// packages/engine/Source/Core/isLeapYear.js -function isLeapYear(year) { - if (year === null || isNaN(year)) { - throw new DeveloperError_default("year is required and must be a number."); + for (let i = 0; i < length; ++i) { + Matrix4.pack(array[i], result, i * 16); } - return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; -} -var isLeapYear_default = isLeapYear; - -// packages/engine/Source/Core/LeapSecond.js -function LeapSecond(date, offset) { - this.julianDate = date; - this.offset = offset; -} -var LeapSecond_default = LeapSecond; - -// packages/engine/Source/Core/TimeConstants.js -var TimeConstants = { - /** - * The number of seconds in one millisecond: <code>0.001</code> - * @type {number} - * @constant - */ - SECONDS_PER_MILLISECOND: 1e-3, - /** - * The number of seconds in one minute: <code>60</code>. - * @type {number} - * @constant - */ - SECONDS_PER_MINUTE: 60, - /** - * The number of minutes in one hour: <code>60</code>. - * @type {number} - * @constant - */ - MINUTES_PER_HOUR: 60, - /** - * The number of hours in one day: <code>24</code>. - * @type {number} - * @constant - */ - HOURS_PER_DAY: 24, - /** - * The number of seconds in one hour: <code>3600</code>. - * @type {number} - * @constant - */ - SECONDS_PER_HOUR: 3600, - /** - * The number of minutes in one day: <code>1440</code>. - * @type {number} - * @constant - */ - MINUTES_PER_DAY: 1440, - /** - * The number of seconds in one day, ignoring leap seconds: <code>86400</code>. - * @type {number} - * @constant - */ - SECONDS_PER_DAY: 86400, - /** - * The number of days in one Julian century: <code>36525</code>. - * @type {number} - * @constant - */ - DAYS_PER_JULIAN_CENTURY: 36525, - /** - * One trillionth of a second. - * @type {number} - * @constant - */ - PICOSECOND: 1e-9, - /** - * The number of days to subtract from a Julian date to determine the - * modified Julian date, which gives the number of days since midnight - * on November 17, 1858. - * @type {number} - * @constant - */ - MODIFIED_JULIAN_DATE_DIFFERENCE: 24000005e-1 + return result; }; -var TimeConstants_default = Object.freeze(TimeConstants); - -// packages/engine/Source/Core/TimeStandard.js -var TimeStandard = { - /** - * Represents the coordinated Universal Time (UTC) time standard. - * - * UTC is related to TAI according to the relationship - * <code>UTC = TAI - deltaT</code> where <code>deltaT</code> is the number of leap - * seconds which have been introduced as of the time in TAI. - * - * @type {number} - * @constant - */ - UTC: 0, - /** - * Represents the International Atomic Time (TAI) time standard. - * TAI is the principal time standard to which the other time standards are related. - * - * @type {number} - * @constant - */ - TAI: 1 +Matrix4.unpackArray = function(array, result) { + Check_default.defined("array", array); + Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 16); + if (array.length % 16 !== 0) { + throw new DeveloperError_default("array length must be a multiple of 16."); + } + const length = array.length; + if (!defined_default(result)) { + result = new Array(length / 16); + } else { + result.length = length / 16; + } + for (let i = 0; i < length; i += 16) { + const index = i / 16; + result[index] = Matrix4.unpack(array, i, result[index]); + } + return result; }; -var TimeStandard_default = Object.freeze(TimeStandard); - -// packages/engine/Source/Core/JulianDate.js -var gregorianDateScratch = new GregorianDate_default(); -var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -var daysInLeapFeburary = 29; -function compareLeapSecondDates(leapSecond, dateToFind) { - return JulianDate.compare(leapSecond.julianDate, dateToFind.julianDate); -} -var binarySearchScratchLeapSecond = new LeapSecond_default(); -function convertUtcToTai(julianDate) { - binarySearchScratchLeapSecond.julianDate = julianDate; - const leapSeconds = JulianDate.leapSeconds; - let index = binarySearch_default( - leapSeconds, - binarySearchScratchLeapSecond, - compareLeapSecondDates - ); - if (index < 0) { - index = ~index; +Matrix4.clone = function(matrix, result) { + if (!defined_default(matrix)) { + return void 0; } - if (index >= leapSeconds.length) { - index = leapSeconds.length - 1; + if (!defined_default(result)) { + return new Matrix4( + matrix[0], + matrix[4], + matrix[8], + matrix[12], + matrix[1], + matrix[5], + matrix[9], + matrix[13], + matrix[2], + matrix[6], + matrix[10], + matrix[14], + matrix[3], + matrix[7], + matrix[11], + matrix[15] + ); } - let offset = leapSeconds[index].offset; - if (index > 0) { - const difference = JulianDate.secondsDifference( - leapSeconds[index].julianDate, - julianDate + result[0] = matrix[0]; + result[1] = matrix[1]; + result[2] = matrix[2]; + result[3] = matrix[3]; + result[4] = matrix[4]; + result[5] = matrix[5]; + result[6] = matrix[6]; + result[7] = matrix[7]; + result[8] = matrix[8]; + result[9] = matrix[9]; + result[10] = matrix[10]; + result[11] = matrix[11]; + result[12] = matrix[12]; + result[13] = matrix[13]; + result[14] = matrix[14]; + result[15] = matrix[15]; + return result; +}; +Matrix4.fromArray = Matrix4.unpack; +Matrix4.fromColumnMajorArray = function(values, result) { + Check_default.defined("values", values); + return Matrix4.clone(values, result); +}; +Matrix4.fromRowMajorArray = function(values, result) { + Check_default.defined("values", values); + if (!defined_default(result)) { + return new Matrix4( + values[0], + values[1], + values[2], + values[3], + values[4], + values[5], + values[6], + values[7], + values[8], + values[9], + values[10], + values[11], + values[12], + values[13], + values[14], + values[15] ); - if (difference > offset) { - index--; - offset = leapSeconds[index].offset; - } - } - JulianDate.addSeconds(julianDate, offset, julianDate); -} -function convertTaiToUtc(julianDate, result) { - binarySearchScratchLeapSecond.julianDate = julianDate; - const leapSeconds = JulianDate.leapSeconds; - let index = binarySearch_default( - leapSeconds, - binarySearchScratchLeapSecond, - compareLeapSecondDates - ); - if (index < 0) { - index = ~index; - } - if (index === 0) { - return JulianDate.addSeconds(julianDate, -leapSeconds[0].offset, result); } - if (index >= leapSeconds.length) { - return JulianDate.addSeconds( - julianDate, - -leapSeconds[index - 1].offset, - result + result[0] = values[0]; + result[1] = values[4]; + result[2] = values[8]; + result[3] = values[12]; + result[4] = values[1]; + result[5] = values[5]; + result[6] = values[9]; + result[7] = values[13]; + result[8] = values[2]; + result[9] = values[6]; + result[10] = values[10]; + result[11] = values[14]; + result[12] = values[3]; + result[13] = values[7]; + result[14] = values[11]; + result[15] = values[15]; + return result; +}; +Matrix4.fromRotationTranslation = function(rotation, translation, result) { + Check_default.typeOf.object("rotation", rotation); + translation = defaultValue_default(translation, Cartesian3_default.ZERO); + if (!defined_default(result)) { + return new Matrix4( + rotation[0], + rotation[3], + rotation[6], + translation.x, + rotation[1], + rotation[4], + rotation[7], + translation.y, + rotation[2], + rotation[5], + rotation[8], + translation.z, + 0, + 0, + 0, + 1 ); } - const difference = JulianDate.secondsDifference( - leapSeconds[index].julianDate, - julianDate + result[0] = rotation[0]; + result[1] = rotation[1]; + result[2] = rotation[2]; + result[3] = 0; + result[4] = rotation[3]; + result[5] = rotation[4]; + result[6] = rotation[5]; + result[7] = 0; + result[8] = rotation[6]; + result[9] = rotation[7]; + result[10] = rotation[8]; + result[11] = 0; + result[12] = translation.x; + result[13] = translation.y; + result[14] = translation.z; + result[15] = 1; + return result; +}; +Matrix4.fromTranslationQuaternionRotationScale = function(translation, rotation, scale, result) { + Check_default.typeOf.object("translation", translation); + Check_default.typeOf.object("rotation", rotation); + Check_default.typeOf.object("scale", scale); + if (!defined_default(result)) { + result = new Matrix4(); + } + const scaleX = scale.x; + const scaleY = scale.y; + const scaleZ = scale.z; + const x2 = rotation.x * rotation.x; + const xy = rotation.x * rotation.y; + const xz = rotation.x * rotation.z; + const xw = rotation.x * rotation.w; + const y2 = rotation.y * rotation.y; + const yz = rotation.y * rotation.z; + const yw = rotation.y * rotation.w; + const z2 = rotation.z * rotation.z; + const zw = rotation.z * rotation.w; + const w2 = rotation.w * rotation.w; + const m00 = x2 - y2 - z2 + w2; + const m01 = 2 * (xy - zw); + const m02 = 2 * (xz + yw); + const m10 = 2 * (xy + zw); + const m11 = -x2 + y2 - z2 + w2; + const m12 = 2 * (yz - xw); + const m20 = 2 * (xz - yw); + const m21 = 2 * (yz + xw); + const m22 = -x2 - y2 + z2 + w2; + result[0] = m00 * scaleX; + result[1] = m10 * scaleX; + result[2] = m20 * scaleX; + result[3] = 0; + result[4] = m01 * scaleY; + result[5] = m11 * scaleY; + result[6] = m21 * scaleY; + result[7] = 0; + result[8] = m02 * scaleZ; + result[9] = m12 * scaleZ; + result[10] = m22 * scaleZ; + result[11] = 0; + result[12] = translation.x; + result[13] = translation.y; + result[14] = translation.z; + result[15] = 1; + return result; +}; +Matrix4.fromTranslationRotationScale = function(translationRotationScale, result) { + Check_default.typeOf.object("translationRotationScale", translationRotationScale); + return Matrix4.fromTranslationQuaternionRotationScale( + translationRotationScale.translation, + translationRotationScale.rotation, + translationRotationScale.scale, + result ); - if (difference === 0) { - return JulianDate.addSeconds( - julianDate, - -leapSeconds[index].offset, - result +}; +Matrix4.fromTranslation = function(translation, result) { + Check_default.typeOf.object("translation", translation); + return Matrix4.fromRotationTranslation(Matrix3_default.IDENTITY, translation, result); +}; +Matrix4.fromScale = function(scale, result) { + Check_default.typeOf.object("scale", scale); + if (!defined_default(result)) { + return new Matrix4( + scale.x, + 0, + 0, + 0, + 0, + scale.y, + 0, + 0, + 0, + 0, + scale.z, + 0, + 0, + 0, + 0, + 1 ); } - if (difference <= 1) { - return void 0; + result[0] = scale.x; + result[1] = 0; + result[2] = 0; + result[3] = 0; + result[4] = 0; + result[5] = scale.y; + result[6] = 0; + result[7] = 0; + result[8] = 0; + result[9] = 0; + result[10] = scale.z; + result[11] = 0; + result[12] = 0; + result[13] = 0; + result[14] = 0; + result[15] = 1; + return result; +}; +Matrix4.fromUniformScale = function(scale, result) { + Check_default.typeOf.number("scale", scale); + if (!defined_default(result)) { + return new Matrix4( + scale, + 0, + 0, + 0, + 0, + scale, + 0, + 0, + 0, + 0, + scale, + 0, + 0, + 0, + 0, + 1 + ); } - return JulianDate.addSeconds( - julianDate, - -leapSeconds[--index].offset, - result + result[0] = scale; + result[1] = 0; + result[2] = 0; + result[3] = 0; + result[4] = 0; + result[5] = scale; + result[6] = 0; + result[7] = 0; + result[8] = 0; + result[9] = 0; + result[10] = scale; + result[11] = 0; + result[12] = 0; + result[13] = 0; + result[14] = 0; + result[15] = 1; + return result; +}; +Matrix4.fromRotation = function(rotation, result) { + Check_default.typeOf.object("rotation", rotation); + if (!defined_default(result)) { + result = new Matrix4(); + } + result[0] = rotation[0]; + result[1] = rotation[1]; + result[2] = rotation[2]; + result[3] = 0; + result[4] = rotation[3]; + result[5] = rotation[4]; + result[6] = rotation[5]; + result[7] = 0; + result[8] = rotation[6]; + result[9] = rotation[7]; + result[10] = rotation[8]; + result[11] = 0; + result[12] = 0; + result[13] = 0; + result[14] = 0; + result[15] = 1; + return result; +}; +var fromCameraF = new Cartesian3_default(); +var fromCameraR = new Cartesian3_default(); +var fromCameraU = new Cartesian3_default(); +Matrix4.fromCamera = function(camera, result) { + Check_default.typeOf.object("camera", camera); + const position = camera.position; + const direction = camera.direction; + const up = camera.up; + Check_default.typeOf.object("camera.position", position); + Check_default.typeOf.object("camera.direction", direction); + Check_default.typeOf.object("camera.up", up); + Cartesian3_default.normalize(direction, fromCameraF); + Cartesian3_default.normalize( + Cartesian3_default.cross(fromCameraF, up, fromCameraR), + fromCameraR ); -} -function setComponents(wholeDays, secondsOfDay, julianDate) { - const extraDays = secondsOfDay / TimeConstants_default.SECONDS_PER_DAY | 0; - wholeDays += extraDays; - secondsOfDay -= TimeConstants_default.SECONDS_PER_DAY * extraDays; - if (secondsOfDay < 0) { - wholeDays--; - secondsOfDay += TimeConstants_default.SECONDS_PER_DAY; - } - julianDate.dayNumber = wholeDays; - julianDate.secondsOfDay = secondsOfDay; - return julianDate; -} -function computeJulianDateComponents(year, month, day, hour, minute, second, millisecond) { - const a3 = (month - 14) / 12 | 0; - const b = year + 4800 + a3; - let dayNumber = (1461 * b / 4 | 0) + (367 * (month - 2 - 12 * a3) / 12 | 0) - (3 * ((b + 100) / 100 | 0) / 4 | 0) + day - 32075; - hour = hour - 12; - if (hour < 0) { - hour += 24; - } - const secondsOfDay = second + (hour * TimeConstants_default.SECONDS_PER_HOUR + minute * TimeConstants_default.SECONDS_PER_MINUTE + millisecond * TimeConstants_default.SECONDS_PER_MILLISECOND); - if (secondsOfDay >= 43200) { - dayNumber -= 1; - } - return [dayNumber, secondsOfDay]; -} -var matchCalendarYear = /^(\d{4})$/; -var matchCalendarMonth = /^(\d{4})-(\d{2})$/; -var matchOrdinalDate = /^(\d{4})-?(\d{3})$/; -var matchWeekDate = /^(\d{4})-?W(\d{2})-?(\d{1})?$/; -var matchCalendarDate = /^(\d{4})-?(\d{2})-?(\d{2})$/; -var utcOffset = /([Z+\-])?(\d{2})?:?(\d{2})?$/; -var matchHours = /^(\d{2})(\.\d+)?/.source + utcOffset.source; -var matchHoursMinutes = /^(\d{2}):?(\d{2})(\.\d+)?/.source + utcOffset.source; -var matchHoursMinutesSeconds = /^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source + utcOffset.source; -var iso8601ErrorMessage = "Invalid ISO 8601 date."; -function JulianDate(julianDayNumber, secondsOfDay, timeStandard) { - this.dayNumber = void 0; - this.secondsOfDay = void 0; - julianDayNumber = defaultValue_default(julianDayNumber, 0); - secondsOfDay = defaultValue_default(secondsOfDay, 0); - timeStandard = defaultValue_default(timeStandard, TimeStandard_default.UTC); - const wholeDays = julianDayNumber | 0; - secondsOfDay = secondsOfDay + (julianDayNumber - wholeDays) * TimeConstants_default.SECONDS_PER_DAY; - setComponents(wholeDays, secondsOfDay, this); - if (timeStandard === TimeStandard_default.UTC) { - convertUtcToTai(this); - } -} -JulianDate.fromGregorianDate = function(date, result) { - if (!(date instanceof GregorianDate_default)) { - throw new DeveloperError_default("date must be a valid GregorianDate."); - } - const components = computeJulianDateComponents( - date.year, - date.month, - date.day, - date.hour, - date.minute, - date.second, - date.millisecond + Cartesian3_default.normalize( + Cartesian3_default.cross(fromCameraR, fromCameraF, fromCameraU), + fromCameraU ); + const sX = fromCameraR.x; + const sY = fromCameraR.y; + const sZ = fromCameraR.z; + const fX = fromCameraF.x; + const fY = fromCameraF.y; + const fZ = fromCameraF.z; + const uX = fromCameraU.x; + const uY = fromCameraU.y; + const uZ = fromCameraU.z; + const positionX = position.x; + const positionY = position.y; + const positionZ = position.z; + const t0 = sX * -positionX + sY * -positionY + sZ * -positionZ; + const t1 = uX * -positionX + uY * -positionY + uZ * -positionZ; + const t2 = fX * positionX + fY * positionY + fZ * positionZ; if (!defined_default(result)) { - return new JulianDate(components[0], components[1], TimeStandard_default.UTC); + return new Matrix4( + sX, + sY, + sZ, + t0, + uX, + uY, + uZ, + t1, + -fX, + -fY, + -fZ, + t2, + 0, + 0, + 0, + 1 + ); } - setComponents(components[0], components[1], result); - convertUtcToTai(result); + result[0] = sX; + result[1] = uX; + result[2] = -fX; + result[3] = 0; + result[4] = sY; + result[5] = uY; + result[6] = -fY; + result[7] = 0; + result[8] = sZ; + result[9] = uZ; + result[10] = -fZ; + result[11] = 0; + result[12] = t0; + result[13] = t1; + result[14] = t2; + result[15] = 1; return result; }; -JulianDate.fromDate = function(date, result) { - if (!(date instanceof Date) || isNaN(date.getTime())) { - throw new DeveloperError_default("date must be a valid JavaScript Date."); - } - const components = computeJulianDateComponents( - date.getUTCFullYear(), - date.getUTCMonth() + 1, - date.getUTCDate(), - date.getUTCHours(), - date.getUTCMinutes(), - date.getUTCSeconds(), - date.getUTCMilliseconds() - ); +Matrix4.computePerspectiveFieldOfView = function(fovY, aspectRatio, near, far, result) { + Check_default.typeOf.number.greaterThan("fovY", fovY, 0); + Check_default.typeOf.number.lessThan("fovY", fovY, Math.PI); + Check_default.typeOf.number.greaterThan("near", near, 0); + Check_default.typeOf.number.greaterThan("far", far, 0); + Check_default.typeOf.object("result", result); + const bottom = Math.tan(fovY * 0.5); + const column1Row1 = 1 / bottom; + const column0Row0 = column1Row1 / aspectRatio; + const column2Row2 = (far + near) / (near - far); + const column3Row2 = 2 * far * near / (near - far); + result[0] = column0Row0; + result[1] = 0; + result[2] = 0; + result[3] = 0; + result[4] = 0; + result[5] = column1Row1; + result[6] = 0; + result[7] = 0; + result[8] = 0; + result[9] = 0; + result[10] = column2Row2; + result[11] = -1; + result[12] = 0; + result[13] = 0; + result[14] = column3Row2; + result[15] = 0; + return result; +}; +Matrix4.computeOrthographicOffCenter = function(left, right, bottom, top, near, far, result) { + Check_default.typeOf.number("left", left); + Check_default.typeOf.number("right", right); + Check_default.typeOf.number("bottom", bottom); + Check_default.typeOf.number("top", top); + Check_default.typeOf.number("near", near); + Check_default.typeOf.number("far", far); + Check_default.typeOf.object("result", result); + let a3 = 1 / (right - left); + let b = 1 / (top - bottom); + let c = 1 / (far - near); + const tx = -(right + left) * a3; + const ty = -(top + bottom) * b; + const tz = -(far + near) * c; + a3 *= 2; + b *= 2; + c *= -2; + result[0] = a3; + result[1] = 0; + result[2] = 0; + result[3] = 0; + result[4] = 0; + result[5] = b; + result[6] = 0; + result[7] = 0; + result[8] = 0; + result[9] = 0; + result[10] = c; + result[11] = 0; + result[12] = tx; + result[13] = ty; + result[14] = tz; + result[15] = 1; + return result; +}; +Matrix4.computePerspectiveOffCenter = function(left, right, bottom, top, near, far, result) { + Check_default.typeOf.number("left", left); + Check_default.typeOf.number("right", right); + Check_default.typeOf.number("bottom", bottom); + Check_default.typeOf.number("top", top); + Check_default.typeOf.number("near", near); + Check_default.typeOf.number("far", far); + Check_default.typeOf.object("result", result); + const column0Row0 = 2 * near / (right - left); + const column1Row1 = 2 * near / (top - bottom); + const column2Row0 = (right + left) / (right - left); + const column2Row1 = (top + bottom) / (top - bottom); + const column2Row2 = -(far + near) / (far - near); + const column2Row3 = -1; + const column3Row2 = -2 * far * near / (far - near); + result[0] = column0Row0; + result[1] = 0; + result[2] = 0; + result[3] = 0; + result[4] = 0; + result[5] = column1Row1; + result[6] = 0; + result[7] = 0; + result[8] = column2Row0; + result[9] = column2Row1; + result[10] = column2Row2; + result[11] = column2Row3; + result[12] = 0; + result[13] = 0; + result[14] = column3Row2; + result[15] = 0; + return result; +}; +Matrix4.computeInfinitePerspectiveOffCenter = function(left, right, bottom, top, near, result) { + Check_default.typeOf.number("left", left); + Check_default.typeOf.number("right", right); + Check_default.typeOf.number("bottom", bottom); + Check_default.typeOf.number("top", top); + Check_default.typeOf.number("near", near); + Check_default.typeOf.object("result", result); + const column0Row0 = 2 * near / (right - left); + const column1Row1 = 2 * near / (top - bottom); + const column2Row0 = (right + left) / (right - left); + const column2Row1 = (top + bottom) / (top - bottom); + const column2Row2 = -1; + const column2Row3 = -1; + const column3Row2 = -2 * near; + result[0] = column0Row0; + result[1] = 0; + result[2] = 0; + result[3] = 0; + result[4] = 0; + result[5] = column1Row1; + result[6] = 0; + result[7] = 0; + result[8] = column2Row0; + result[9] = column2Row1; + result[10] = column2Row2; + result[11] = column2Row3; + result[12] = 0; + result[13] = 0; + result[14] = column3Row2; + result[15] = 0; + return result; +}; +Matrix4.computeViewportTransformation = function(viewport, nearDepthRange, farDepthRange, result) { if (!defined_default(result)) { - return new JulianDate(components[0], components[1], TimeStandard_default.UTC); - } - setComponents(components[0], components[1], result); - convertUtcToTai(result); + result = new Matrix4(); + } + viewport = defaultValue_default(viewport, defaultValue_default.EMPTY_OBJECT); + const x = defaultValue_default(viewport.x, 0); + const y = defaultValue_default(viewport.y, 0); + const width = defaultValue_default(viewport.width, 0); + const height = defaultValue_default(viewport.height, 0); + nearDepthRange = defaultValue_default(nearDepthRange, 0); + farDepthRange = defaultValue_default(farDepthRange, 1); + const halfWidth = width * 0.5; + const halfHeight = height * 0.5; + const halfDepth = (farDepthRange - nearDepthRange) * 0.5; + const column0Row0 = halfWidth; + const column1Row1 = halfHeight; + const column2Row2 = halfDepth; + const column3Row0 = x + halfWidth; + const column3Row1 = y + halfHeight; + const column3Row2 = nearDepthRange + halfDepth; + const column3Row3 = 1; + result[0] = column0Row0; + result[1] = 0; + result[2] = 0; + result[3] = 0; + result[4] = 0; + result[5] = column1Row1; + result[6] = 0; + result[7] = 0; + result[8] = 0; + result[9] = 0; + result[10] = column2Row2; + result[11] = 0; + result[12] = column3Row0; + result[13] = column3Row1; + result[14] = column3Row2; + result[15] = column3Row3; return result; }; -JulianDate.fromIso8601 = function(iso8601String, result) { - if (typeof iso8601String !== "string") { - throw new DeveloperError_default(iso8601ErrorMessage); - } - iso8601String = iso8601String.replace(",", "."); - let tokens = iso8601String.split("T"); - let year; - let month = 1; - let day = 1; - let hour = 0; - let minute = 0; - let second = 0; - let millisecond = 0; - const date = tokens[0]; - const time = tokens[1]; - let tmp; - let inLeapYear; - if (!defined_default(date)) { - throw new DeveloperError_default(iso8601ErrorMessage); - } - let dashCount; - tokens = date.match(matchCalendarDate); - if (tokens !== null) { - dashCount = date.split("-").length - 1; - if (dashCount > 0 && dashCount !== 2) { - throw new DeveloperError_default(iso8601ErrorMessage); - } - year = +tokens[1]; - month = +tokens[2]; - day = +tokens[3]; - } else { - tokens = date.match(matchCalendarMonth); - if (tokens !== null) { +Matrix4.computeView = function(position, direction, up, right, result) { + Check_default.typeOf.object("position", position); + Check_default.typeOf.object("direction", direction); + Check_default.typeOf.object("up", up); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result[0] = right.x; + result[1] = up.x; + result[2] = -direction.x; + result[3] = 0; + result[4] = right.y; + result[5] = up.y; + result[6] = -direction.y; + result[7] = 0; + result[8] = right.z; + result[9] = up.z; + result[10] = -direction.z; + result[11] = 0; + result[12] = -Cartesian3_default.dot(right, position); + result[13] = -Cartesian3_default.dot(up, position); + result[14] = Cartesian3_default.dot(direction, position); + result[15] = 1; + return result; +}; +Matrix4.toArray = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + if (!defined_default(result)) { + return [ + matrix[0], + matrix[1], + matrix[2], + matrix[3], + matrix[4], + matrix[5], + matrix[6], + matrix[7], + matrix[8], + matrix[9], + matrix[10], + matrix[11], + matrix[12], + matrix[13], + matrix[14], + matrix[15] + ]; + } + result[0] = matrix[0]; + result[1] = matrix[1]; + result[2] = matrix[2]; + result[3] = matrix[3]; + result[4] = matrix[4]; + result[5] = matrix[5]; + result[6] = matrix[6]; + result[7] = matrix[7]; + result[8] = matrix[8]; + result[9] = matrix[9]; + result[10] = matrix[10]; + result[11] = matrix[11]; + result[12] = matrix[12]; + result[13] = matrix[13]; + result[14] = matrix[14]; + result[15] = matrix[15]; + return result; +}; +Matrix4.getElementIndex = function(column, row) { + Check_default.typeOf.number.greaterThanOrEquals("row", row, 0); + Check_default.typeOf.number.lessThanOrEquals("row", row, 3); + Check_default.typeOf.number.greaterThanOrEquals("column", column, 0); + Check_default.typeOf.number.lessThanOrEquals("column", column, 3); + return column * 4 + row; +}; +Matrix4.getColumn = function(matrix, index, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); + Check_default.typeOf.number.lessThanOrEquals("index", index, 3); + Check_default.typeOf.object("result", result); + const startIndex = index * 4; + const x = matrix[startIndex]; + const y = matrix[startIndex + 1]; + const z = matrix[startIndex + 2]; + const w = matrix[startIndex + 3]; + result.x = x; + result.y = y; + result.z = z; + result.w = w; + return result; +}; +Matrix4.setColumn = function(matrix, index, cartesian, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); + Check_default.typeOf.number.lessThanOrEquals("index", index, 3); + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + result = Matrix4.clone(matrix, result); + const startIndex = index * 4; + result[startIndex] = cartesian.x; + result[startIndex + 1] = cartesian.y; + result[startIndex + 2] = cartesian.z; + result[startIndex + 3] = cartesian.w; + return result; +}; +Matrix4.getRow = function(matrix, index, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); + Check_default.typeOf.number.lessThanOrEquals("index", index, 3); + Check_default.typeOf.object("result", result); + const x = matrix[index]; + const y = matrix[index + 4]; + const z = matrix[index + 8]; + const w = matrix[index + 12]; + result.x = x; + result.y = y; + result.z = z; + result.w = w; + return result; +}; +Matrix4.setRow = function(matrix, index, cartesian, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); + Check_default.typeOf.number.lessThanOrEquals("index", index, 3); + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + result = Matrix4.clone(matrix, result); + result[index] = cartesian.x; + result[index + 4] = cartesian.y; + result[index + 8] = cartesian.z; + result[index + 12] = cartesian.w; + return result; +}; +Matrix4.setTranslation = function(matrix, translation, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("translation", translation); + Check_default.typeOf.object("result", result); + result[0] = matrix[0]; + result[1] = matrix[1]; + result[2] = matrix[2]; + result[3] = matrix[3]; + result[4] = matrix[4]; + result[5] = matrix[5]; + result[6] = matrix[6]; + result[7] = matrix[7]; + result[8] = matrix[8]; + result[9] = matrix[9]; + result[10] = matrix[10]; + result[11] = matrix[11]; + result[12] = translation.x; + result[13] = translation.y; + result[14] = translation.z; + result[15] = matrix[15]; + return result; +}; +var scaleScratch1 = new Cartesian3_default(); +Matrix4.setScale = function(matrix, scale, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("scale", scale); + Check_default.typeOf.object("result", result); + const existingScale = Matrix4.getScale(matrix, scaleScratch1); + const scaleRatioX = scale.x / existingScale.x; + const scaleRatioY = scale.y / existingScale.y; + const scaleRatioZ = scale.z / existingScale.z; + result[0] = matrix[0] * scaleRatioX; + result[1] = matrix[1] * scaleRatioX; + result[2] = matrix[2] * scaleRatioX; + result[3] = matrix[3]; + result[4] = matrix[4] * scaleRatioY; + result[5] = matrix[5] * scaleRatioY; + result[6] = matrix[6] * scaleRatioY; + result[7] = matrix[7]; + result[8] = matrix[8] * scaleRatioZ; + result[9] = matrix[9] * scaleRatioZ; + result[10] = matrix[10] * scaleRatioZ; + result[11] = matrix[11]; + result[12] = matrix[12]; + result[13] = matrix[13]; + result[14] = matrix[14]; + result[15] = matrix[15]; + return result; +}; +var scaleScratch2 = new Cartesian3_default(); +Matrix4.setUniformScale = function(matrix, scale, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number("scale", scale); + Check_default.typeOf.object("result", result); + const existingScale = Matrix4.getScale(matrix, scaleScratch2); + const scaleRatioX = scale / existingScale.x; + const scaleRatioY = scale / existingScale.y; + const scaleRatioZ = scale / existingScale.z; + result[0] = matrix[0] * scaleRatioX; + result[1] = matrix[1] * scaleRatioX; + result[2] = matrix[2] * scaleRatioX; + result[3] = matrix[3]; + result[4] = matrix[4] * scaleRatioY; + result[5] = matrix[5] * scaleRatioY; + result[6] = matrix[6] * scaleRatioY; + result[7] = matrix[7]; + result[8] = matrix[8] * scaleRatioZ; + result[9] = matrix[9] * scaleRatioZ; + result[10] = matrix[10] * scaleRatioZ; + result[11] = matrix[11]; + result[12] = matrix[12]; + result[13] = matrix[13]; + result[14] = matrix[14]; + result[15] = matrix[15]; + return result; +}; +var scratchColumn = new Cartesian3_default(); +Matrix4.getScale = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + result.x = Cartesian3_default.magnitude( + Cartesian3_default.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn) + ); + result.y = Cartesian3_default.magnitude( + Cartesian3_default.fromElements(matrix[4], matrix[5], matrix[6], scratchColumn) + ); + result.z = Cartesian3_default.magnitude( + Cartesian3_default.fromElements(matrix[8], matrix[9], matrix[10], scratchColumn) + ); + return result; +}; +var scaleScratch3 = new Cartesian3_default(); +Matrix4.getMaximumScale = function(matrix) { + Matrix4.getScale(matrix, scaleScratch3); + return Cartesian3_default.maximumComponent(scaleScratch3); +}; +var scaleScratch4 = new Cartesian3_default(); +Matrix4.setRotation = function(matrix, rotation, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + const scale = Matrix4.getScale(matrix, scaleScratch4); + result[0] = rotation[0] * scale.x; + result[1] = rotation[1] * scale.x; + result[2] = rotation[2] * scale.x; + result[3] = matrix[3]; + result[4] = rotation[3] * scale.y; + result[5] = rotation[4] * scale.y; + result[6] = rotation[5] * scale.y; + result[7] = matrix[7]; + result[8] = rotation[6] * scale.z; + result[9] = rotation[7] * scale.z; + result[10] = rotation[8] * scale.z; + result[11] = matrix[11]; + result[12] = matrix[12]; + result[13] = matrix[13]; + result[14] = matrix[14]; + result[15] = matrix[15]; + return result; +}; +var scaleScratch5 = new Cartesian3_default(); +Matrix4.getRotation = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + const scale = Matrix4.getScale(matrix, scaleScratch5); + result[0] = matrix[0] / scale.x; + result[1] = matrix[1] / scale.x; + result[2] = matrix[2] / scale.x; + result[3] = matrix[4] / scale.y; + result[4] = matrix[5] / scale.y; + result[5] = matrix[6] / scale.y; + result[6] = matrix[8] / scale.z; + result[7] = matrix[9] / scale.z; + result[8] = matrix[10] / scale.z; + return result; +}; +Matrix4.multiply = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + const left0 = left[0]; + const left1 = left[1]; + const left2 = left[2]; + const left3 = left[3]; + const left4 = left[4]; + const left5 = left[5]; + const left6 = left[6]; + const left7 = left[7]; + const left8 = left[8]; + const left9 = left[9]; + const left10 = left[10]; + const left11 = left[11]; + const left12 = left[12]; + const left13 = left[13]; + const left14 = left[14]; + const left15 = left[15]; + const right0 = right[0]; + const right1 = right[1]; + const right2 = right[2]; + const right3 = right[3]; + const right4 = right[4]; + const right5 = right[5]; + const right6 = right[6]; + const right7 = right[7]; + const right8 = right[8]; + const right9 = right[9]; + const right10 = right[10]; + const right11 = right[11]; + const right12 = right[12]; + const right13 = right[13]; + const right14 = right[14]; + const right15 = right[15]; + const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2 + left12 * right3; + const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2 + left13 * right3; + const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2 + left14 * right3; + const column0Row3 = left3 * right0 + left7 * right1 + left11 * right2 + left15 * right3; + const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6 + left12 * right7; + const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6 + left13 * right7; + const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6 + left14 * right7; + const column1Row3 = left3 * right4 + left7 * right5 + left11 * right6 + left15 * right7; + const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10 + left12 * right11; + const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10 + left13 * right11; + const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10 + left14 * right11; + const column2Row3 = left3 * right8 + left7 * right9 + left11 * right10 + left15 * right11; + const column3Row0 = left0 * right12 + left4 * right13 + left8 * right14 + left12 * right15; + const column3Row1 = left1 * right12 + left5 * right13 + left9 * right14 + left13 * right15; + const column3Row2 = left2 * right12 + left6 * right13 + left10 * right14 + left14 * right15; + const column3Row3 = left3 * right12 + left7 * right13 + left11 * right14 + left15 * right15; + result[0] = column0Row0; + result[1] = column0Row1; + result[2] = column0Row2; + result[3] = column0Row3; + result[4] = column1Row0; + result[5] = column1Row1; + result[6] = column1Row2; + result[7] = column1Row3; + result[8] = column2Row0; + result[9] = column2Row1; + result[10] = column2Row2; + result[11] = column2Row3; + result[12] = column3Row0; + result[13] = column3Row1; + result[14] = column3Row2; + result[15] = column3Row3; + return result; +}; +Matrix4.add = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result[0] = left[0] + right[0]; + result[1] = left[1] + right[1]; + result[2] = left[2] + right[2]; + result[3] = left[3] + right[3]; + result[4] = left[4] + right[4]; + result[5] = left[5] + right[5]; + result[6] = left[6] + right[6]; + result[7] = left[7] + right[7]; + result[8] = left[8] + right[8]; + result[9] = left[9] + right[9]; + result[10] = left[10] + right[10]; + result[11] = left[11] + right[11]; + result[12] = left[12] + right[12]; + result[13] = left[13] + right[13]; + result[14] = left[14] + right[14]; + result[15] = left[15] + right[15]; + return result; +}; +Matrix4.subtract = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result[0] = left[0] - right[0]; + result[1] = left[1] - right[1]; + result[2] = left[2] - right[2]; + result[3] = left[3] - right[3]; + result[4] = left[4] - right[4]; + result[5] = left[5] - right[5]; + result[6] = left[6] - right[6]; + result[7] = left[7] - right[7]; + result[8] = left[8] - right[8]; + result[9] = left[9] - right[9]; + result[10] = left[10] - right[10]; + result[11] = left[11] - right[11]; + result[12] = left[12] - right[12]; + result[13] = left[13] - right[13]; + result[14] = left[14] - right[14]; + result[15] = left[15] - right[15]; + return result; +}; +Matrix4.multiplyTransformation = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + const left0 = left[0]; + const left1 = left[1]; + const left2 = left[2]; + const left4 = left[4]; + const left5 = left[5]; + const left6 = left[6]; + const left8 = left[8]; + const left9 = left[9]; + const left10 = left[10]; + const left12 = left[12]; + const left13 = left[13]; + const left14 = left[14]; + const right0 = right[0]; + const right1 = right[1]; + const right2 = right[2]; + const right4 = right[4]; + const right5 = right[5]; + const right6 = right[6]; + const right8 = right[8]; + const right9 = right[9]; + const right10 = right[10]; + const right12 = right[12]; + const right13 = right[13]; + const right14 = right[14]; + const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2; + const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2; + const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2; + const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6; + const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6; + const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6; + const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10; + const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10; + const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10; + const column3Row0 = left0 * right12 + left4 * right13 + left8 * right14 + left12; + const column3Row1 = left1 * right12 + left5 * right13 + left9 * right14 + left13; + const column3Row2 = left2 * right12 + left6 * right13 + left10 * right14 + left14; + result[0] = column0Row0; + result[1] = column0Row1; + result[2] = column0Row2; + result[3] = 0; + result[4] = column1Row0; + result[5] = column1Row1; + result[6] = column1Row2; + result[7] = 0; + result[8] = column2Row0; + result[9] = column2Row1; + result[10] = column2Row2; + result[11] = 0; + result[12] = column3Row0; + result[13] = column3Row1; + result[14] = column3Row2; + result[15] = 1; + return result; +}; +Matrix4.multiplyByMatrix3 = function(matrix, rotation, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("rotation", rotation); + Check_default.typeOf.object("result", result); + const left0 = matrix[0]; + const left1 = matrix[1]; + const left2 = matrix[2]; + const left4 = matrix[4]; + const left5 = matrix[5]; + const left6 = matrix[6]; + const left8 = matrix[8]; + const left9 = matrix[9]; + const left10 = matrix[10]; + const right0 = rotation[0]; + const right1 = rotation[1]; + const right2 = rotation[2]; + const right4 = rotation[3]; + const right5 = rotation[4]; + const right6 = rotation[5]; + const right8 = rotation[6]; + const right9 = rotation[7]; + const right10 = rotation[8]; + const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2; + const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2; + const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2; + const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6; + const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6; + const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6; + const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10; + const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10; + const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10; + result[0] = column0Row0; + result[1] = column0Row1; + result[2] = column0Row2; + result[3] = 0; + result[4] = column1Row0; + result[5] = column1Row1; + result[6] = column1Row2; + result[7] = 0; + result[8] = column2Row0; + result[9] = column2Row1; + result[10] = column2Row2; + result[11] = 0; + result[12] = matrix[12]; + result[13] = matrix[13]; + result[14] = matrix[14]; + result[15] = matrix[15]; + return result; +}; +Matrix4.multiplyByTranslation = function(matrix, translation, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("translation", translation); + Check_default.typeOf.object("result", result); + const x = translation.x; + const y = translation.y; + const z = translation.z; + const tx = x * matrix[0] + y * matrix[4] + z * matrix[8] + matrix[12]; + const ty = x * matrix[1] + y * matrix[5] + z * matrix[9] + matrix[13]; + const tz = x * matrix[2] + y * matrix[6] + z * matrix[10] + matrix[14]; + result[0] = matrix[0]; + result[1] = matrix[1]; + result[2] = matrix[2]; + result[3] = matrix[3]; + result[4] = matrix[4]; + result[5] = matrix[5]; + result[6] = matrix[6]; + result[7] = matrix[7]; + result[8] = matrix[8]; + result[9] = matrix[9]; + result[10] = matrix[10]; + result[11] = matrix[11]; + result[12] = tx; + result[13] = ty; + result[14] = tz; + result[15] = matrix[15]; + return result; +}; +Matrix4.multiplyByScale = function(matrix, scale, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("scale", scale); + Check_default.typeOf.object("result", result); + const scaleX = scale.x; + const scaleY = scale.y; + const scaleZ = scale.z; + if (scaleX === 1 && scaleY === 1 && scaleZ === 1) { + return Matrix4.clone(matrix, result); + } + result[0] = scaleX * matrix[0]; + result[1] = scaleX * matrix[1]; + result[2] = scaleX * matrix[2]; + result[3] = matrix[3]; + result[4] = scaleY * matrix[4]; + result[5] = scaleY * matrix[5]; + result[6] = scaleY * matrix[6]; + result[7] = matrix[7]; + result[8] = scaleZ * matrix[8]; + result[9] = scaleZ * matrix[9]; + result[10] = scaleZ * matrix[10]; + result[11] = matrix[11]; + result[12] = matrix[12]; + result[13] = matrix[13]; + result[14] = matrix[14]; + result[15] = matrix[15]; + return result; +}; +Matrix4.multiplyByUniformScale = function(matrix, scale, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number("scale", scale); + Check_default.typeOf.object("result", result); + result[0] = matrix[0] * scale; + result[1] = matrix[1] * scale; + result[2] = matrix[2] * scale; + result[3] = matrix[3]; + result[4] = matrix[4] * scale; + result[5] = matrix[5] * scale; + result[6] = matrix[6] * scale; + result[7] = matrix[7]; + result[8] = matrix[8] * scale; + result[9] = matrix[9] * scale; + result[10] = matrix[10] * scale; + result[11] = matrix[11]; + result[12] = matrix[12]; + result[13] = matrix[13]; + result[14] = matrix[14]; + result[15] = matrix[15]; + return result; +}; +Matrix4.multiplyByVector = function(matrix, cartesian, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + const vX = cartesian.x; + const vY = cartesian.y; + const vZ = cartesian.z; + const vW = cartesian.w; + const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12] * vW; + const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13] * vW; + const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14] * vW; + const w = matrix[3] * vX + matrix[7] * vY + matrix[11] * vZ + matrix[15] * vW; + result.x = x; + result.y = y; + result.z = z; + result.w = w; + return result; +}; +Matrix4.multiplyByPointAsVector = function(matrix, cartesian, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + const vX = cartesian.x; + const vY = cartesian.y; + const vZ = cartesian.z; + const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ; + const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ; + const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ; + result.x = x; + result.y = y; + result.z = z; + return result; +}; +Matrix4.multiplyByPoint = function(matrix, cartesian, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + const vX = cartesian.x; + const vY = cartesian.y; + const vZ = cartesian.z; + const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12]; + const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13]; + const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14]; + result.x = x; + result.y = y; + result.z = z; + return result; +}; +Matrix4.multiplyByScalar = function(matrix, scalar, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number("scalar", scalar); + Check_default.typeOf.object("result", result); + result[0] = matrix[0] * scalar; + result[1] = matrix[1] * scalar; + result[2] = matrix[2] * scalar; + result[3] = matrix[3] * scalar; + result[4] = matrix[4] * scalar; + result[5] = matrix[5] * scalar; + result[6] = matrix[6] * scalar; + result[7] = matrix[7] * scalar; + result[8] = matrix[8] * scalar; + result[9] = matrix[9] * scalar; + result[10] = matrix[10] * scalar; + result[11] = matrix[11] * scalar; + result[12] = matrix[12] * scalar; + result[13] = matrix[13] * scalar; + result[14] = matrix[14] * scalar; + result[15] = matrix[15] * scalar; + return result; +}; +Matrix4.negate = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + result[0] = -matrix[0]; + result[1] = -matrix[1]; + result[2] = -matrix[2]; + result[3] = -matrix[3]; + result[4] = -matrix[4]; + result[5] = -matrix[5]; + result[6] = -matrix[6]; + result[7] = -matrix[7]; + result[8] = -matrix[8]; + result[9] = -matrix[9]; + result[10] = -matrix[10]; + result[11] = -matrix[11]; + result[12] = -matrix[12]; + result[13] = -matrix[13]; + result[14] = -matrix[14]; + result[15] = -matrix[15]; + return result; +}; +Matrix4.transpose = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + const matrix1 = matrix[1]; + const matrix2 = matrix[2]; + const matrix3 = matrix[3]; + const matrix6 = matrix[6]; + const matrix7 = matrix[7]; + const matrix11 = matrix[11]; + result[0] = matrix[0]; + result[1] = matrix[4]; + result[2] = matrix[8]; + result[3] = matrix[12]; + result[4] = matrix1; + result[5] = matrix[5]; + result[6] = matrix[9]; + result[7] = matrix[13]; + result[8] = matrix2; + result[9] = matrix6; + result[10] = matrix[10]; + result[11] = matrix[14]; + result[12] = matrix3; + result[13] = matrix7; + result[14] = matrix11; + result[15] = matrix[15]; + return result; +}; +Matrix4.abs = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + result[0] = Math.abs(matrix[0]); + result[1] = Math.abs(matrix[1]); + result[2] = Math.abs(matrix[2]); + result[3] = Math.abs(matrix[3]); + result[4] = Math.abs(matrix[4]); + result[5] = Math.abs(matrix[5]); + result[6] = Math.abs(matrix[6]); + result[7] = Math.abs(matrix[7]); + result[8] = Math.abs(matrix[8]); + result[9] = Math.abs(matrix[9]); + result[10] = Math.abs(matrix[10]); + result[11] = Math.abs(matrix[11]); + result[12] = Math.abs(matrix[12]); + result[13] = Math.abs(matrix[13]); + result[14] = Math.abs(matrix[14]); + result[15] = Math.abs(matrix[15]); + return result; +}; +Matrix4.equals = function(left, right) { + return left === right || defined_default(left) && defined_default(right) && // Translation + left[12] === right[12] && left[13] === right[13] && left[14] === right[14] && // Rotation/scale + left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[4] === right[4] && left[5] === right[5] && left[6] === right[6] && left[8] === right[8] && left[9] === right[9] && left[10] === right[10] && // Bottom row + left[3] === right[3] && left[7] === right[7] && left[11] === right[11] && left[15] === right[15]; +}; +Matrix4.equalsEpsilon = function(left, right, epsilon) { + epsilon = defaultValue_default(epsilon, 0); + return left === right || defined_default(left) && defined_default(right) && Math.abs(left[0] - right[0]) <= epsilon && Math.abs(left[1] - right[1]) <= epsilon && Math.abs(left[2] - right[2]) <= epsilon && Math.abs(left[3] - right[3]) <= epsilon && Math.abs(left[4] - right[4]) <= epsilon && Math.abs(left[5] - right[5]) <= epsilon && Math.abs(left[6] - right[6]) <= epsilon && Math.abs(left[7] - right[7]) <= epsilon && Math.abs(left[8] - right[8]) <= epsilon && Math.abs(left[9] - right[9]) <= epsilon && Math.abs(left[10] - right[10]) <= epsilon && Math.abs(left[11] - right[11]) <= epsilon && Math.abs(left[12] - right[12]) <= epsilon && Math.abs(left[13] - right[13]) <= epsilon && Math.abs(left[14] - right[14]) <= epsilon && Math.abs(left[15] - right[15]) <= epsilon; +}; +Matrix4.getTranslation = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + result.x = matrix[12]; + result.y = matrix[13]; + result.z = matrix[14]; + return result; +}; +Matrix4.getMatrix3 = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + result[0] = matrix[0]; + result[1] = matrix[1]; + result[2] = matrix[2]; + result[3] = matrix[4]; + result[4] = matrix[5]; + result[5] = matrix[6]; + result[6] = matrix[8]; + result[7] = matrix[9]; + result[8] = matrix[10]; + return result; +}; +var scratchInverseRotation = new Matrix3_default(); +var scratchMatrix3Zero = new Matrix3_default(); +var scratchBottomRow = new Cartesian4_default(); +var scratchExpectedBottomRow = new Cartesian4_default(0, 0, 0, 1); +Matrix4.inverse = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + const src0 = matrix[0]; + const src1 = matrix[4]; + const src2 = matrix[8]; + const src3 = matrix[12]; + const src4 = matrix[1]; + const src5 = matrix[5]; + const src6 = matrix[9]; + const src7 = matrix[13]; + const src8 = matrix[2]; + const src9 = matrix[6]; + const src10 = matrix[10]; + const src11 = matrix[14]; + const src12 = matrix[3]; + const src13 = matrix[7]; + const src14 = matrix[11]; + const src15 = matrix[15]; + let tmp0 = src10 * src15; + let tmp1 = src11 * src14; + let tmp2 = src9 * src15; + let tmp3 = src11 * src13; + let tmp4 = src9 * src14; + let tmp5 = src10 * src13; + let tmp6 = src8 * src15; + let tmp7 = src11 * src12; + let tmp8 = src8 * src14; + let tmp9 = src10 * src12; + let tmp10 = src8 * src13; + let tmp11 = src9 * src12; + const dst0 = tmp0 * src5 + tmp3 * src6 + tmp4 * src7 - (tmp1 * src5 + tmp2 * src6 + tmp5 * src7); + const dst1 = tmp1 * src4 + tmp6 * src6 + tmp9 * src7 - (tmp0 * src4 + tmp7 * src6 + tmp8 * src7); + const dst2 = tmp2 * src4 + tmp7 * src5 + tmp10 * src7 - (tmp3 * src4 + tmp6 * src5 + tmp11 * src7); + const dst3 = tmp5 * src4 + tmp8 * src5 + tmp11 * src6 - (tmp4 * src4 + tmp9 * src5 + tmp10 * src6); + const dst4 = tmp1 * src1 + tmp2 * src2 + tmp5 * src3 - (tmp0 * src1 + tmp3 * src2 + tmp4 * src3); + const dst5 = tmp0 * src0 + tmp7 * src2 + tmp8 * src3 - (tmp1 * src0 + tmp6 * src2 + tmp9 * src3); + const dst6 = tmp3 * src0 + tmp6 * src1 + tmp11 * src3 - (tmp2 * src0 + tmp7 * src1 + tmp10 * src3); + const dst7 = tmp4 * src0 + tmp9 * src1 + tmp10 * src2 - (tmp5 * src0 + tmp8 * src1 + tmp11 * src2); + tmp0 = src2 * src7; + tmp1 = src3 * src6; + tmp2 = src1 * src7; + tmp3 = src3 * src5; + tmp4 = src1 * src6; + tmp5 = src2 * src5; + tmp6 = src0 * src7; + tmp7 = src3 * src4; + tmp8 = src0 * src6; + tmp9 = src2 * src4; + tmp10 = src0 * src5; + tmp11 = src1 * src4; + const dst8 = tmp0 * src13 + tmp3 * src14 + tmp4 * src15 - (tmp1 * src13 + tmp2 * src14 + tmp5 * src15); + const dst9 = tmp1 * src12 + tmp6 * src14 + tmp9 * src15 - (tmp0 * src12 + tmp7 * src14 + tmp8 * src15); + const dst10 = tmp2 * src12 + tmp7 * src13 + tmp10 * src15 - (tmp3 * src12 + tmp6 * src13 + tmp11 * src15); + const dst11 = tmp5 * src12 + tmp8 * src13 + tmp11 * src14 - (tmp4 * src12 + tmp9 * src13 + tmp10 * src14); + const dst12 = tmp2 * src10 + tmp5 * src11 + tmp1 * src9 - (tmp4 * src11 + tmp0 * src9 + tmp3 * src10); + const dst13 = tmp8 * src11 + tmp0 * src8 + tmp7 * src10 - (tmp6 * src10 + tmp9 * src11 + tmp1 * src8); + const dst14 = tmp6 * src9 + tmp11 * src11 + tmp3 * src8 - (tmp10 * src11 + tmp2 * src8 + tmp7 * src9); + const dst15 = tmp10 * src10 + tmp4 * src8 + tmp9 * src9 - (tmp8 * src9 + tmp11 * src10 + tmp5 * src8); + let det = src0 * dst0 + src1 * dst1 + src2 * dst2 + src3 * dst3; + if (Math.abs(det) < Math_default.EPSILON21) { + if (Matrix3_default.equalsEpsilon( + Matrix4.getMatrix3(matrix, scratchInverseRotation), + scratchMatrix3Zero, + Math_default.EPSILON7 + ) && Cartesian4_default.equals( + Matrix4.getRow(matrix, 3, scratchBottomRow), + scratchExpectedBottomRow + )) { + result[0] = 0; + result[1] = 0; + result[2] = 0; + result[3] = 0; + result[4] = 0; + result[5] = 0; + result[6] = 0; + result[7] = 0; + result[8] = 0; + result[9] = 0; + result[10] = 0; + result[11] = 0; + result[12] = -matrix[12]; + result[13] = -matrix[13]; + result[14] = -matrix[14]; + result[15] = 1; + return result; + } + throw new RuntimeError_default( + "matrix is not invertible because its determinate is zero." + ); + } + det = 1 / det; + result[0] = dst0 * det; + result[1] = dst1 * det; + result[2] = dst2 * det; + result[3] = dst3 * det; + result[4] = dst4 * det; + result[5] = dst5 * det; + result[6] = dst6 * det; + result[7] = dst7 * det; + result[8] = dst8 * det; + result[9] = dst9 * det; + result[10] = dst10 * det; + result[11] = dst11 * det; + result[12] = dst12 * det; + result[13] = dst13 * det; + result[14] = dst14 * det; + result[15] = dst15 * det; + return result; +}; +Matrix4.inverseTransformation = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + const matrix0 = matrix[0]; + const matrix1 = matrix[1]; + const matrix2 = matrix[2]; + const matrix4 = matrix[4]; + const matrix5 = matrix[5]; + const matrix6 = matrix[6]; + const matrix8 = matrix[8]; + const matrix9 = matrix[9]; + const matrix10 = matrix[10]; + const vX = matrix[12]; + const vY = matrix[13]; + const vZ = matrix[14]; + const x = -matrix0 * vX - matrix1 * vY - matrix2 * vZ; + const y = -matrix4 * vX - matrix5 * vY - matrix6 * vZ; + const z = -matrix8 * vX - matrix9 * vY - matrix10 * vZ; + result[0] = matrix0; + result[1] = matrix4; + result[2] = matrix8; + result[3] = 0; + result[4] = matrix1; + result[5] = matrix5; + result[6] = matrix9; + result[7] = 0; + result[8] = matrix2; + result[9] = matrix6; + result[10] = matrix10; + result[11] = 0; + result[12] = x; + result[13] = y; + result[14] = z; + result[15] = 1; + return result; +}; +var scratchTransposeMatrix = new Matrix4(); +Matrix4.inverseTranspose = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + return Matrix4.inverse( + Matrix4.transpose(matrix, scratchTransposeMatrix), + result + ); +}; +Matrix4.IDENTITY = Object.freeze( + new Matrix4( + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1 + ) +); +Matrix4.ZERO = Object.freeze( + new Matrix4( + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ) +); +Matrix4.COLUMN0ROW0 = 0; +Matrix4.COLUMN0ROW1 = 1; +Matrix4.COLUMN0ROW2 = 2; +Matrix4.COLUMN0ROW3 = 3; +Matrix4.COLUMN1ROW0 = 4; +Matrix4.COLUMN1ROW1 = 5; +Matrix4.COLUMN1ROW2 = 6; +Matrix4.COLUMN1ROW3 = 7; +Matrix4.COLUMN2ROW0 = 8; +Matrix4.COLUMN2ROW1 = 9; +Matrix4.COLUMN2ROW2 = 10; +Matrix4.COLUMN2ROW3 = 11; +Matrix4.COLUMN3ROW0 = 12; +Matrix4.COLUMN3ROW1 = 13; +Matrix4.COLUMN3ROW2 = 14; +Matrix4.COLUMN3ROW3 = 15; +Object.defineProperties(Matrix4.prototype, { + /** + * Gets the number of items in the collection. + * @memberof Matrix4.prototype + * + * @type {number} + */ + length: { + get: function() { + return Matrix4.packedLength; + } + } +}); +Matrix4.prototype.clone = function(result) { + return Matrix4.clone(this, result); +}; +Matrix4.prototype.equals = function(right) { + return Matrix4.equals(this, right); +}; +Matrix4.equalsArray = function(matrix, array, offset) { + return matrix[0] === array[offset] && matrix[1] === array[offset + 1] && matrix[2] === array[offset + 2] && matrix[3] === array[offset + 3] && matrix[4] === array[offset + 4] && matrix[5] === array[offset + 5] && matrix[6] === array[offset + 6] && matrix[7] === array[offset + 7] && matrix[8] === array[offset + 8] && matrix[9] === array[offset + 9] && matrix[10] === array[offset + 10] && matrix[11] === array[offset + 11] && matrix[12] === array[offset + 12] && matrix[13] === array[offset + 13] && matrix[14] === array[offset + 14] && matrix[15] === array[offset + 15]; +}; +Matrix4.prototype.equalsEpsilon = function(right, epsilon) { + return Matrix4.equalsEpsilon(this, right, epsilon); +}; +Matrix4.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 Matrix4_default = Matrix4; + +// packages/engine/Source/Core/combine.js +function combine(object1, object2, deep) { + deep = defaultValue_default(deep, false); + const result = {}; + const object1Defined = defined_default(object1); + const object2Defined = defined_default(object2); + let property; + let object1Value; + let object2Value; + if (object1Defined) { + for (property in object1) { + if (object1.hasOwnProperty(property)) { + object1Value = object1[property]; + if (object2Defined && deep && typeof object1Value === "object" && object2.hasOwnProperty(property)) { + object2Value = object2[property]; + if (typeof object2Value === "object") { + result[property] = combine(object1Value, object2Value, deep); + } else { + result[property] = object1Value; + } + } else { + result[property] = object1Value; + } + } + } + } + if (object2Defined) { + for (property in object2) { + if (object2.hasOwnProperty(property) && !result.hasOwnProperty(property)) { + object2Value = object2[property]; + result[property] = object2Value; + } + } + } + return result; +} +var combine_default = combine; + +// packages/engine/Source/Core/binarySearch.js +function binarySearch(array, itemToFind, comparator) { + Check_default.defined("array", array); + Check_default.defined("itemToFind", itemToFind); + Check_default.defined("comparator", comparator); + let low = 0; + let high = array.length - 1; + let i; + let comparison; + while (low <= high) { + i = ~~((low + high) / 2); + comparison = comparator(array[i], itemToFind); + if (comparison < 0) { + low = i + 1; + continue; + } + if (comparison > 0) { + high = i - 1; + continue; + } + return i; + } + return ~(high + 1); +} +var binarySearch_default = binarySearch; + +// packages/engine/Source/Core/EarthOrientationParametersSample.js +function EarthOrientationParametersSample(xPoleWander, yPoleWander, xPoleOffset, yPoleOffset, ut1MinusUtc) { + this.xPoleWander = xPoleWander; + this.yPoleWander = yPoleWander; + this.xPoleOffset = xPoleOffset; + this.yPoleOffset = yPoleOffset; + this.ut1MinusUtc = ut1MinusUtc; +} +var EarthOrientationParametersSample_default = EarthOrientationParametersSample; + +// packages/engine/Source/Core/isLeapYear.js +function isLeapYear(year) { + if (year === null || isNaN(year)) { + throw new DeveloperError_default("year is required and must be a number."); + } + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; +} +var isLeapYear_default = isLeapYear; + +// packages/engine/Source/Core/GregorianDate.js +var daysInYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +function GregorianDate(year, month, day, hour, minute, second, millisecond, isLeapSecond) { + const minimumYear = 1; + const minimumMonth = 1; + const minimumDay = 1; + const minimumHour = 0; + const minimumMinute = 0; + const minimumSecond = 0; + const minimumMillisecond = 0; + year = defaultValue_default(year, minimumYear); + month = defaultValue_default(month, minimumMonth); + day = defaultValue_default(day, minimumDay); + hour = defaultValue_default(hour, minimumHour); + minute = defaultValue_default(minute, minimumMinute); + second = defaultValue_default(second, minimumSecond); + millisecond = defaultValue_default(millisecond, minimumMillisecond); + isLeapSecond = defaultValue_default(isLeapSecond, false); + validateRange(); + validateDate(); + this.year = year; + this.month = month; + this.day = day; + this.hour = hour; + this.minute = minute; + this.second = second; + this.millisecond = millisecond; + this.isLeapSecond = isLeapSecond; + function validateRange() { + const maximumYear = 9999; + const maximumMonth = 12; + const maximumDay = 31; + const maximumHour = 23; + const maximumMinute = 59; + const maximumSecond = 59; + const excludedMaximumMilisecond = 1e3; + Check_default.typeOf.number.greaterThanOrEquals("Year", year, minimumYear); + Check_default.typeOf.number.lessThanOrEquals("Year", year, maximumYear); + Check_default.typeOf.number.greaterThanOrEquals("Month", month, minimumMonth); + Check_default.typeOf.number.lessThanOrEquals("Month", month, maximumMonth); + Check_default.typeOf.number.greaterThanOrEquals("Day", day, minimumDay); + Check_default.typeOf.number.lessThanOrEquals("Day", day, maximumDay); + Check_default.typeOf.number.greaterThanOrEquals("Hour", hour, minimumHour); + Check_default.typeOf.number.lessThanOrEquals("Hour", hour, maximumHour); + Check_default.typeOf.number.greaterThanOrEquals("Minute", minute, minimumMinute); + Check_default.typeOf.number.lessThanOrEquals("Minute", minute, maximumMinute); + Check_default.typeOf.bool("IsLeapSecond", isLeapSecond); + Check_default.typeOf.number.greaterThanOrEquals("Second", second, minimumSecond); + Check_default.typeOf.number.lessThanOrEquals( + "Second", + second, + isLeapSecond ? maximumSecond + 1 : maximumSecond + ); + Check_default.typeOf.number.greaterThanOrEquals( + "Millisecond", + millisecond, + minimumMillisecond + ); + Check_default.typeOf.number.lessThan( + "Millisecond", + millisecond, + excludedMaximumMilisecond + ); + } + function validateDate() { + const daysInMonth2 = month === 2 && isLeapYear_default(year) ? daysInYear[month - 1] + 1 : daysInYear[month - 1]; + if (day > daysInMonth2) { + throw new DeveloperError_default("Month and Day represents invalid date"); + } + } +} +var GregorianDate_default = GregorianDate; + +// packages/engine/Source/Core/LeapSecond.js +function LeapSecond(date, offset) { + this.julianDate = date; + this.offset = offset; +} +var LeapSecond_default = LeapSecond; + +// packages/engine/Source/Core/TimeConstants.js +var TimeConstants = { + /** + * The number of seconds in one millisecond: <code>0.001</code> + * @type {number} + * @constant + */ + SECONDS_PER_MILLISECOND: 1e-3, + /** + * The number of seconds in one minute: <code>60</code>. + * @type {number} + * @constant + */ + SECONDS_PER_MINUTE: 60, + /** + * The number of minutes in one hour: <code>60</code>. + * @type {number} + * @constant + */ + MINUTES_PER_HOUR: 60, + /** + * The number of hours in one day: <code>24</code>. + * @type {number} + * @constant + */ + HOURS_PER_DAY: 24, + /** + * The number of seconds in one hour: <code>3600</code>. + * @type {number} + * @constant + */ + SECONDS_PER_HOUR: 3600, + /** + * The number of minutes in one day: <code>1440</code>. + * @type {number} + * @constant + */ + MINUTES_PER_DAY: 1440, + /** + * The number of seconds in one day, ignoring leap seconds: <code>86400</code>. + * @type {number} + * @constant + */ + SECONDS_PER_DAY: 86400, + /** + * The number of days in one Julian century: <code>36525</code>. + * @type {number} + * @constant + */ + DAYS_PER_JULIAN_CENTURY: 36525, + /** + * One trillionth of a second. + * @type {number} + * @constant + */ + PICOSECOND: 1e-9, + /** + * The number of days to subtract from a Julian date to determine the + * modified Julian date, which gives the number of days since midnight + * on November 17, 1858. + * @type {number} + * @constant + */ + MODIFIED_JULIAN_DATE_DIFFERENCE: 24000005e-1 +}; +var TimeConstants_default = Object.freeze(TimeConstants); + +// packages/engine/Source/Core/TimeStandard.js +var TimeStandard = { + /** + * Represents the coordinated Universal Time (UTC) time standard. + * + * UTC is related to TAI according to the relationship + * <code>UTC = TAI - deltaT</code> where <code>deltaT</code> is the number of leap + * seconds which have been introduced as of the time in TAI. + * + * @type {number} + * @constant + */ + UTC: 0, + /** + * Represents the International Atomic Time (TAI) time standard. + * TAI is the principal time standard to which the other time standards are related. + * + * @type {number} + * @constant + */ + TAI: 1 +}; +var TimeStandard_default = Object.freeze(TimeStandard); + +// packages/engine/Source/Core/JulianDate.js +var gregorianDateScratch = new GregorianDate_default(); +var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +var daysInLeapFeburary = 29; +function compareLeapSecondDates(leapSecond, dateToFind) { + return JulianDate.compare(leapSecond.julianDate, dateToFind.julianDate); +} +var binarySearchScratchLeapSecond = new LeapSecond_default(); +function convertUtcToTai(julianDate) { + binarySearchScratchLeapSecond.julianDate = julianDate; + const leapSeconds = JulianDate.leapSeconds; + let index = binarySearch_default( + leapSeconds, + binarySearchScratchLeapSecond, + compareLeapSecondDates + ); + if (index < 0) { + index = ~index; + } + if (index >= leapSeconds.length) { + index = leapSeconds.length - 1; + } + let offset = leapSeconds[index].offset; + if (index > 0) { + const difference = JulianDate.secondsDifference( + leapSeconds[index].julianDate, + julianDate + ); + if (difference > offset) { + index--; + offset = leapSeconds[index].offset; + } + } + JulianDate.addSeconds(julianDate, offset, julianDate); +} +function convertTaiToUtc(julianDate, result) { + binarySearchScratchLeapSecond.julianDate = julianDate; + const leapSeconds = JulianDate.leapSeconds; + let index = binarySearch_default( + leapSeconds, + binarySearchScratchLeapSecond, + compareLeapSecondDates + ); + if (index < 0) { + index = ~index; + } + if (index === 0) { + return JulianDate.addSeconds(julianDate, -leapSeconds[0].offset, result); + } + if (index >= leapSeconds.length) { + return JulianDate.addSeconds( + julianDate, + -leapSeconds[index - 1].offset, + result + ); + } + const difference = JulianDate.secondsDifference( + leapSeconds[index].julianDate, + julianDate + ); + if (difference === 0) { + return JulianDate.addSeconds( + julianDate, + -leapSeconds[index].offset, + result + ); + } + if (difference <= 1) { + return void 0; + } + return JulianDate.addSeconds( + julianDate, + -leapSeconds[--index].offset, + result + ); +} +function setComponents(wholeDays, secondsOfDay, julianDate) { + const extraDays = secondsOfDay / TimeConstants_default.SECONDS_PER_DAY | 0; + wholeDays += extraDays; + secondsOfDay -= TimeConstants_default.SECONDS_PER_DAY * extraDays; + if (secondsOfDay < 0) { + wholeDays--; + secondsOfDay += TimeConstants_default.SECONDS_PER_DAY; + } + julianDate.dayNumber = wholeDays; + julianDate.secondsOfDay = secondsOfDay; + return julianDate; +} +function computeJulianDateComponents(year, month, day, hour, minute, second, millisecond) { + const a3 = (month - 14) / 12 | 0; + const b = year + 4800 + a3; + let dayNumber = (1461 * b / 4 | 0) + (367 * (month - 2 - 12 * a3) / 12 | 0) - (3 * ((b + 100) / 100 | 0) / 4 | 0) + day - 32075; + hour = hour - 12; + if (hour < 0) { + hour += 24; + } + const secondsOfDay = second + (hour * TimeConstants_default.SECONDS_PER_HOUR + minute * TimeConstants_default.SECONDS_PER_MINUTE + millisecond * TimeConstants_default.SECONDS_PER_MILLISECOND); + if (secondsOfDay >= 43200) { + dayNumber -= 1; + } + return [dayNumber, secondsOfDay]; +} +var matchCalendarYear = /^(\d{4})$/; +var matchCalendarMonth = /^(\d{4})-(\d{2})$/; +var matchOrdinalDate = /^(\d{4})-?(\d{3})$/; +var matchWeekDate = /^(\d{4})-?W(\d{2})-?(\d{1})?$/; +var matchCalendarDate = /^(\d{4})-?(\d{2})-?(\d{2})$/; +var utcOffset = /([Z+\-])?(\d{2})?:?(\d{2})?$/; +var matchHours = /^(\d{2})(\.\d+)?/.source + utcOffset.source; +var matchHoursMinutes = /^(\d{2}):?(\d{2})(\.\d+)?/.source + utcOffset.source; +var matchHoursMinutesSeconds = /^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source + utcOffset.source; +var iso8601ErrorMessage = "Invalid ISO 8601 date."; +function JulianDate(julianDayNumber, secondsOfDay, timeStandard) { + this.dayNumber = void 0; + this.secondsOfDay = void 0; + julianDayNumber = defaultValue_default(julianDayNumber, 0); + secondsOfDay = defaultValue_default(secondsOfDay, 0); + timeStandard = defaultValue_default(timeStandard, TimeStandard_default.UTC); + const wholeDays = julianDayNumber | 0; + secondsOfDay = secondsOfDay + (julianDayNumber - wholeDays) * TimeConstants_default.SECONDS_PER_DAY; + setComponents(wholeDays, secondsOfDay, this); + if (timeStandard === TimeStandard_default.UTC) { + convertUtcToTai(this); + } +} +JulianDate.fromGregorianDate = function(date, result) { + if (!(date instanceof GregorianDate_default)) { + throw new DeveloperError_default("date must be a valid GregorianDate."); + } + const components = computeJulianDateComponents( + date.year, + date.month, + date.day, + date.hour, + date.minute, + date.second, + date.millisecond + ); + if (!defined_default(result)) { + return new JulianDate(components[0], components[1], TimeStandard_default.UTC); + } + setComponents(components[0], components[1], result); + convertUtcToTai(result); + return result; +}; +JulianDate.fromDate = function(date, result) { + if (!(date instanceof Date) || isNaN(date.getTime())) { + throw new DeveloperError_default("date must be a valid JavaScript Date."); + } + const components = computeJulianDateComponents( + date.getUTCFullYear(), + date.getUTCMonth() + 1, + date.getUTCDate(), + date.getUTCHours(), + date.getUTCMinutes(), + date.getUTCSeconds(), + date.getUTCMilliseconds() + ); + if (!defined_default(result)) { + return new JulianDate(components[0], components[1], TimeStandard_default.UTC); + } + setComponents(components[0], components[1], result); + convertUtcToTai(result); + return result; +}; +JulianDate.fromIso8601 = function(iso8601String, result) { + if (typeof iso8601String !== "string") { + throw new DeveloperError_default(iso8601ErrorMessage); + } + iso8601String = iso8601String.replace(",", "."); + let tokens = iso8601String.split("T"); + let year; + let month = 1; + let day = 1; + let hour = 0; + let minute = 0; + let second = 0; + let millisecond = 0; + const date = tokens[0]; + const time = tokens[1]; + let tmp; + let inLeapYear; + if (!defined_default(date)) { + throw new DeveloperError_default(iso8601ErrorMessage); + } + let dashCount; + tokens = date.match(matchCalendarDate); + if (tokens !== null) { + dashCount = date.split("-").length - 1; + if (dashCount > 0 && dashCount !== 2) { + throw new DeveloperError_default(iso8601ErrorMessage); + } + year = +tokens[1]; + month = +tokens[2]; + day = +tokens[3]; + } else { + tokens = date.match(matchCalendarMonth); + if (tokens !== null) { year = +tokens[1]; month = +tokens[2]; } else { @@ -4962,14 +6157,8 @@ var requestCompletedEvent = new Event_default(); function RequestScheduler() { } RequestScheduler.maximumRequests = 50; -RequestScheduler.maximumRequestsPerServer = 6; -RequestScheduler.requestsByServer = { - "api.cesium.com:443": 18, - "assets.ion.cesium.com:443": 18, - "ibasemaps-api.arcgis.com:443": 18, - "tile.googleapis.com:443": 18, - "tile.openstreetmap.org:443": 18 -}; +RequestScheduler.maximumRequestsPerServer = 18; +RequestScheduler.requestsByServer = {}; RequestScheduler.throttleRequests = true; RequestScheduler.debugShowStatistics = false; RequestScheduler.requestCompletedEvent = requestCompletedEvent; @@ -6231,65 +7420,34 @@ Resource.createImageBitmapFromBlob = function(blob, options) { colorSpaceConversion: options.skipColorSpaceConversion ? "none" : "default" }); }; -function decodeResponse(loadWithHttpResponse, responseType) { - switch (responseType) { - case "text": - return loadWithHttpResponse.toString("utf8"); - case "json": - return JSON.parse(loadWithHttpResponse.toString("utf8")); - default: - return new Uint8Array(loadWithHttpResponse).buffer; - } -} function loadWithHttpRequest(url, responseType, method, data, headers, deferred, overrideMimeType) { - let URL; - let zlib; - Promise.all([import("url"), import("zlib")]).then(([urlImport, zlibImport]) => { - URL = urlImport.parse(url); - zlib = zlibImport; - return URL.protocol === "https:" ? import("https") : import("http"); - }).then((http) => { - const options = { - protocol: URL.protocol, - hostname: URL.hostname, - port: URL.port, - path: URL.path, - query: URL.query, - method, - headers - }; - http.request(options).on("response", function(res) { - if (res.statusCode < 200 || res.statusCode >= 300) { - deferred.reject( - new RequestErrorEvent_default(res.statusCode, res, res.headers) - ); - return; - } - const chunkArray = []; - res.on("data", function(chunk) { - chunkArray.push(chunk); - }); - res.on("end", function() { - const result = Buffer.concat(chunkArray); - if (res.headers["content-encoding"] === "gzip") { - zlib.gunzip(result, function(error, resultUnzipped) { - if (error) { - deferred.reject( - new RuntimeError_default("Error decompressing response.") - ); - } else { - deferred.resolve( - decodeResponse(resultUnzipped, responseType) - ); - } - }); - } else { - deferred.resolve(decodeResponse(result, responseType)); - } + fetch(url, { + method, + headers + }).then(async (response) => { + if (!response.ok) { + const responseHeaders = {}; + response.headers.forEach((value, key) => { + responseHeaders[key] = value; }); - }).on("error", function(e) { - deferred.reject(new RequestErrorEvent_default()); - }).end(); + deferred.reject( + new RequestErrorEvent_default(response.status, response, responseHeaders) + ); + return; + } + switch (responseType) { + case "text": + deferred.resolve(response.text()); + break; + case "json": + deferred.resolve(response.json()); + break; + default: + deferred.resolve(new Uint8Array(await response.arrayBuffer()).buffer); + break; + } + }).catch(() => { + deferred.reject(new RequestErrorEvent_default()); }); } var noXMLHttpRequest = typeof XMLHttpRequest === "undefined"; @@ -6359,7 +7517,7 @@ Resource._Implementations.loadWithXhr = function(url, responseType, method, data return; } if (xhr.status === 204) { - deferred.resolve(); + deferred.resolve(void 0); } else if (defined_default(response) && (!defined_default(responseType) || browserResponseType === responseType)) { deferred.resolve(response); } else if (responseType === "json" && typeof response === "string") { @@ -7028,1617 +8186,2135 @@ function requestXysChunk(xysData, chunkIndex) { } var Iau2006XysData_default = Iau2006XysData; -// packages/engine/Source/Core/Fullscreen.js -var _supportsFullscreen; -var _names = { - requestFullscreen: void 0, - exitFullscreen: void 0, - fullscreenEnabled: void 0, - fullscreenElement: void 0, - fullscreenchange: void 0, - fullscreenerror: void 0 -}; -var Fullscreen = {}; -Object.defineProperties(Fullscreen, { - /** - * The element that is currently fullscreen, if any. To simply check if the - * browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}. - * @memberof Fullscreen - * @type {object} - * @readonly - */ - element: { - get: function() { - if (!Fullscreen.supportsFullscreen()) { - return void 0; - } - return document[_names.fullscreenElement]; - } - }, - /** - * The name of the event on the document that is fired when fullscreen is - * entered or exited. This event name is intended for use with addEventListener. - * In your event handler, to determine if the browser is in fullscreen mode or not, - * use {@link Fullscreen#fullscreen}. - * @memberof Fullscreen - * @type {string} - * @readonly - */ - changeEventName: { - get: function() { - if (!Fullscreen.supportsFullscreen()) { - return void 0; - } - return _names.fullscreenchange; - } - }, - /** - * The name of the event that is fired when a fullscreen error - * occurs. This event name is intended for use with addEventListener. - * @memberof Fullscreen - * @type {string} - * @readonly - */ - errorEventName: { - get: function() { - if (!Fullscreen.supportsFullscreen()) { - return void 0; - } - return _names.fullscreenerror; - } - }, - /** - * Determine whether the browser will allow an element to be made fullscreen, or not. - * For example, by default, iframes cannot go fullscreen unless the containing page - * adds an "allowfullscreen" attribute (or prefixed equivalent). - * @memberof Fullscreen - * @type {boolean} - * @readonly - */ - enabled: { - get: function() { - if (!Fullscreen.supportsFullscreen()) { - return void 0; - } - return document[_names.fullscreenEnabled]; +// packages/engine/Source/Core/Quaternion.js +function Quaternion(x, y, z, w) { + this.x = defaultValue_default(x, 0); + this.y = defaultValue_default(y, 0); + this.z = defaultValue_default(z, 0); + this.w = defaultValue_default(w, 0); +} +var fromAxisAngleScratch = new Cartesian3_default(); +Quaternion.fromAxisAngle = function(axis, angle, result) { + Check_default.typeOf.object("axis", axis); + Check_default.typeOf.number("angle", angle); + const halfAngle = angle / 2; + const s = Math.sin(halfAngle); + fromAxisAngleScratch = Cartesian3_default.normalize(axis, fromAxisAngleScratch); + const x = fromAxisAngleScratch.x * s; + const y = fromAxisAngleScratch.y * s; + const z = fromAxisAngleScratch.z * s; + const w = Math.cos(halfAngle); + if (!defined_default(result)) { + return new Quaternion(x, y, z, w); + } + result.x = x; + result.y = y; + result.z = z; + result.w = w; + return result; +}; +var fromRotationMatrixNext = [1, 2, 0]; +var fromRotationMatrixQuat = new Array(3); +Quaternion.fromRotationMatrix = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + let root; + let x; + let y; + let z; + let w; + const m00 = matrix[Matrix3_default.COLUMN0ROW0]; + const m11 = matrix[Matrix3_default.COLUMN1ROW1]; + const m22 = matrix[Matrix3_default.COLUMN2ROW2]; + const trace = m00 + m11 + m22; + if (trace > 0) { + root = Math.sqrt(trace + 1); + w = 0.5 * root; + root = 0.5 / root; + x = (matrix[Matrix3_default.COLUMN1ROW2] - matrix[Matrix3_default.COLUMN2ROW1]) * root; + y = (matrix[Matrix3_default.COLUMN2ROW0] - matrix[Matrix3_default.COLUMN0ROW2]) * root; + z = (matrix[Matrix3_default.COLUMN0ROW1] - matrix[Matrix3_default.COLUMN1ROW0]) * root; + } else { + const next = fromRotationMatrixNext; + let i = 0; + if (m11 > m00) { + i = 1; } - }, - /** - * Determines if the browser is currently in fullscreen mode. - * @memberof Fullscreen - * @type {boolean} - * @readonly - */ - fullscreen: { - get: function() { - if (!Fullscreen.supportsFullscreen()) { - return void 0; - } - return Fullscreen.element !== null; + if (m22 > m00 && m22 > m11) { + i = 2; } + const j = next[i]; + const k = next[j]; + root = Math.sqrt( + matrix[Matrix3_default.getElementIndex(i, i)] - matrix[Matrix3_default.getElementIndex(j, j)] - matrix[Matrix3_default.getElementIndex(k, k)] + 1 + ); + const quat = fromRotationMatrixQuat; + quat[i] = 0.5 * root; + root = 0.5 / root; + w = (matrix[Matrix3_default.getElementIndex(k, j)] - matrix[Matrix3_default.getElementIndex(j, k)]) * root; + quat[j] = (matrix[Matrix3_default.getElementIndex(j, i)] + matrix[Matrix3_default.getElementIndex(i, j)]) * root; + quat[k] = (matrix[Matrix3_default.getElementIndex(k, i)] + matrix[Matrix3_default.getElementIndex(i, k)]) * root; + x = -quat[0]; + y = -quat[1]; + z = -quat[2]; + } + if (!defined_default(result)) { + return new Quaternion(x, y, z, w); + } + result.x = x; + result.y = y; + result.z = z; + result.w = w; + return result; +}; +var scratchHPRQuaternion = new Quaternion(); +var scratchHeadingQuaternion = new Quaternion(); +var scratchPitchQuaternion = new Quaternion(); +var scratchRollQuaternion = new Quaternion(); +Quaternion.fromHeadingPitchRoll = function(headingPitchRoll, result) { + Check_default.typeOf.object("headingPitchRoll", headingPitchRoll); + scratchRollQuaternion = Quaternion.fromAxisAngle( + Cartesian3_default.UNIT_X, + headingPitchRoll.roll, + scratchHPRQuaternion + ); + scratchPitchQuaternion = Quaternion.fromAxisAngle( + Cartesian3_default.UNIT_Y, + -headingPitchRoll.pitch, + result + ); + result = Quaternion.multiply( + scratchPitchQuaternion, + scratchRollQuaternion, + scratchPitchQuaternion + ); + scratchHeadingQuaternion = Quaternion.fromAxisAngle( + Cartesian3_default.UNIT_Z, + -headingPitchRoll.heading, + scratchHPRQuaternion + ); + return Quaternion.multiply(scratchHeadingQuaternion, result, result); +}; +var sampledQuaternionAxis = new Cartesian3_default(); +var sampledQuaternionRotation = new Cartesian3_default(); +var sampledQuaternionTempQuaternion = new Quaternion(); +var sampledQuaternionQuaternion0 = new Quaternion(); +var sampledQuaternionQuaternion0Conjugate = new Quaternion(); +Quaternion.packedLength = 4; +Quaternion.pack = function(value, array, startingIndex) { + Check_default.typeOf.object("value", value); + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + array[startingIndex++] = value.x; + array[startingIndex++] = value.y; + array[startingIndex++] = value.z; + array[startingIndex] = value.w; + return array; +}; +Quaternion.unpack = function(array, startingIndex, result) { + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + if (!defined_default(result)) { + result = new Quaternion(); } -}); -Fullscreen.supportsFullscreen = function() { - if (defined_default(_supportsFullscreen)) { - return _supportsFullscreen; - } - _supportsFullscreen = false; - const body = document.body; - if (typeof body.requestFullscreen === "function") { - _names.requestFullscreen = "requestFullscreen"; - _names.exitFullscreen = "exitFullscreen"; - _names.fullscreenEnabled = "fullscreenEnabled"; - _names.fullscreenElement = "fullscreenElement"; - _names.fullscreenchange = "fullscreenchange"; - _names.fullscreenerror = "fullscreenerror"; - _supportsFullscreen = true; - return _supportsFullscreen; - } - const prefixes = ["webkit", "moz", "o", "ms", "khtml"]; - let name; - for (let i = 0, len = prefixes.length; i < len; ++i) { - const prefix = prefixes[i]; - name = `${prefix}RequestFullscreen`; - if (typeof body[name] === "function") { - _names.requestFullscreen = name; - _supportsFullscreen = true; - } else { - name = `${prefix}RequestFullScreen`; - if (typeof body[name] === "function") { - _names.requestFullscreen = name; - _supportsFullscreen = true; - } - } - name = `${prefix}ExitFullscreen`; - if (typeof document[name] === "function") { - _names.exitFullscreen = name; - } else { - name = `${prefix}CancelFullScreen`; - if (typeof document[name] === "function") { - _names.exitFullscreen = name; - } - } - name = `${prefix}FullscreenEnabled`; - if (document[name] !== void 0) { - _names.fullscreenEnabled = name; - } else { - name = `${prefix}FullScreenEnabled`; - if (document[name] !== void 0) { - _names.fullscreenEnabled = name; - } - } - name = `${prefix}FullscreenElement`; - if (document[name] !== void 0) { - _names.fullscreenElement = name; - } else { - name = `${prefix}FullScreenElement`; - if (document[name] !== void 0) { - _names.fullscreenElement = name; - } - } - name = `${prefix}fullscreenchange`; - if (document[`on${name}`] !== void 0) { - if (prefix === "ms") { - name = "MSFullscreenChange"; - } - _names.fullscreenchange = name; + result.x = array[startingIndex]; + result.y = array[startingIndex + 1]; + result.z = array[startingIndex + 2]; + result.w = array[startingIndex + 3]; + return result; +}; +Quaternion.packedInterpolationLength = 3; +Quaternion.convertPackedArrayForInterpolation = function(packedArray, startingIndex, lastIndex, result) { + Quaternion.unpack( + packedArray, + lastIndex * 4, + sampledQuaternionQuaternion0Conjugate + ); + Quaternion.conjugate( + sampledQuaternionQuaternion0Conjugate, + sampledQuaternionQuaternion0Conjugate + ); + for (let i = 0, len = lastIndex - startingIndex + 1; i < len; i++) { + const offset = i * 3; + Quaternion.unpack( + packedArray, + (startingIndex + i) * 4, + sampledQuaternionTempQuaternion + ); + Quaternion.multiply( + sampledQuaternionTempQuaternion, + sampledQuaternionQuaternion0Conjugate, + sampledQuaternionTempQuaternion + ); + if (sampledQuaternionTempQuaternion.w < 0) { + Quaternion.negate( + sampledQuaternionTempQuaternion, + sampledQuaternionTempQuaternion + ); } - name = `${prefix}fullscreenerror`; - if (document[`on${name}`] !== void 0) { - if (prefix === "ms") { - name = "MSFullscreenError"; - } - _names.fullscreenerror = name; + Quaternion.computeAxis( + sampledQuaternionTempQuaternion, + sampledQuaternionAxis + ); + const angle = Quaternion.computeAngle(sampledQuaternionTempQuaternion); + if (!defined_default(result)) { + result = []; } + result[offset] = sampledQuaternionAxis.x * angle; + result[offset + 1] = sampledQuaternionAxis.y * angle; + result[offset + 2] = sampledQuaternionAxis.z * angle; } - return _supportsFullscreen; }; -Fullscreen.requestFullscreen = function(element, vrDevice) { - if (!Fullscreen.supportsFullscreen()) { - return; +Quaternion.unpackInterpolationResult = function(array, sourceArray, firstIndex, lastIndex, result) { + if (!defined_default(result)) { + result = new Quaternion(); } - element[_names.requestFullscreen]({ vrDisplay: vrDevice }); -}; -Fullscreen.exitFullscreen = function() { - if (!Fullscreen.supportsFullscreen()) { - return; + Cartesian3_default.fromArray(array, 0, sampledQuaternionRotation); + const magnitude = Cartesian3_default.magnitude(sampledQuaternionRotation); + Quaternion.unpack(sourceArray, lastIndex * 4, sampledQuaternionQuaternion0); + if (magnitude === 0) { + Quaternion.clone(Quaternion.IDENTITY, sampledQuaternionTempQuaternion); + } else { + Quaternion.fromAxisAngle( + sampledQuaternionRotation, + magnitude, + sampledQuaternionTempQuaternion + ); } - document[_names.exitFullscreen](); + return Quaternion.multiply( + sampledQuaternionTempQuaternion, + sampledQuaternionQuaternion0, + result + ); }; -Fullscreen._names = _names; -var Fullscreen_default = Fullscreen; - -// packages/engine/Source/Core/FeatureDetection.js -var theNavigator; -if (typeof navigator !== "undefined") { - theNavigator = navigator; -} else { - theNavigator = {}; -} -function extractVersion(versionString) { - const parts = versionString.split("."); - for (let i = 0, len = parts.length; i < len; ++i) { - parts[i] = parseInt(parts[i], 10); - } - return parts; -} -var isChromeResult; -var chromeVersionResult; -function isChrome() { - if (!defined_default(isChromeResult)) { - isChromeResult = false; - if (!isEdge()) { - const fields = / Chrome\/([\.0-9]+)/.exec(theNavigator.userAgent); - if (fields !== null) { - isChromeResult = true; - chromeVersionResult = extractVersion(fields[1]); - } - } - } - return isChromeResult; -} -function chromeVersion() { - return isChrome() && chromeVersionResult; -} -var isSafariResult; -var safariVersionResult; -function isSafari() { - if (!defined_default(isSafariResult)) { - isSafariResult = false; - if (!isChrome() && !isEdge() && / Safari\/[\.0-9]+/.test(theNavigator.userAgent)) { - const fields = / Version\/([\.0-9]+)/.exec(theNavigator.userAgent); - if (fields !== null) { - isSafariResult = true; - safariVersionResult = extractVersion(fields[1]); - } - } - } - return isSafariResult; -} -function safariVersion() { - return isSafari() && safariVersionResult; -} -var isWebkitResult; -var webkitVersionResult; -function isWebkit() { - if (!defined_default(isWebkitResult)) { - isWebkitResult = false; - const fields = / AppleWebKit\/([\.0-9]+)(\+?)/.exec(theNavigator.userAgent); - if (fields !== null) { - isWebkitResult = true; - webkitVersionResult = extractVersion(fields[1]); - webkitVersionResult.isNightly = !!fields[2]; - } +Quaternion.clone = function(quaternion, result) { + if (!defined_default(quaternion)) { + return void 0; } - return isWebkitResult; -} -function webkitVersion() { - return isWebkit() && webkitVersionResult; -} -var isInternetExplorerResult; -var internetExplorerVersionResult; -function isInternetExplorer() { - if (!defined_default(isInternetExplorerResult)) { - isInternetExplorerResult = false; - let fields; - if (theNavigator.appName === "Microsoft Internet Explorer") { - fields = /MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent); - if (fields !== null) { - isInternetExplorerResult = true; - internetExplorerVersionResult = extractVersion(fields[1]); - } - } else if (theNavigator.appName === "Netscape") { - fields = /Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec( - theNavigator.userAgent - ); - if (fields !== null) { - isInternetExplorerResult = true; - internetExplorerVersionResult = extractVersion(fields[1]); - } - } + if (!defined_default(result)) { + return new Quaternion( + quaternion.x, + quaternion.y, + quaternion.z, + quaternion.w + ); } - return isInternetExplorerResult; -} -function internetExplorerVersion() { - return isInternetExplorer() && internetExplorerVersionResult; -} -var isEdgeResult; -var edgeVersionResult; -function isEdge() { - if (!defined_default(isEdgeResult)) { - isEdgeResult = false; - const fields = / Edg\/([\.0-9]+)/.exec(theNavigator.userAgent); - if (fields !== null) { - isEdgeResult = true; - edgeVersionResult = extractVersion(fields[1]); - } + result.x = quaternion.x; + result.y = quaternion.y; + result.z = quaternion.z; + result.w = quaternion.w; + return result; +}; +Quaternion.conjugate = function(quaternion, result) { + Check_default.typeOf.object("quaternion", quaternion); + Check_default.typeOf.object("result", result); + result.x = -quaternion.x; + result.y = -quaternion.y; + result.z = -quaternion.z; + result.w = quaternion.w; + return result; +}; +Quaternion.magnitudeSquared = function(quaternion) { + Check_default.typeOf.object("quaternion", quaternion); + return quaternion.x * quaternion.x + quaternion.y * quaternion.y + quaternion.z * quaternion.z + quaternion.w * quaternion.w; +}; +Quaternion.magnitude = function(quaternion) { + return Math.sqrt(Quaternion.magnitudeSquared(quaternion)); +}; +Quaternion.normalize = function(quaternion, result) { + Check_default.typeOf.object("result", result); + const inverseMagnitude = 1 / Quaternion.magnitude(quaternion); + const x = quaternion.x * inverseMagnitude; + const y = quaternion.y * inverseMagnitude; + const z = quaternion.z * inverseMagnitude; + const w = quaternion.w * inverseMagnitude; + result.x = x; + result.y = y; + result.z = z; + result.w = w; + return result; +}; +Quaternion.inverse = function(quaternion, result) { + Check_default.typeOf.object("result", result); + const magnitudeSquared = Quaternion.magnitudeSquared(quaternion); + result = Quaternion.conjugate(quaternion, result); + return Quaternion.multiplyByScalar(result, 1 / magnitudeSquared, result); +}; +Quaternion.add = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result.x = left.x + right.x; + result.y = left.y + right.y; + result.z = left.z + right.z; + result.w = left.w + right.w; + return result; +}; +Quaternion.subtract = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result.x = left.x - right.x; + result.y = left.y - right.y; + result.z = left.z - right.z; + result.w = left.w - right.w; + return result; +}; +Quaternion.negate = function(quaternion, result) { + Check_default.typeOf.object("quaternion", quaternion); + Check_default.typeOf.object("result", result); + result.x = -quaternion.x; + result.y = -quaternion.y; + result.z = -quaternion.z; + result.w = -quaternion.w; + return result; +}; +Quaternion.dot = function(left, right) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; +}; +Quaternion.multiply = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + const leftX = left.x; + const leftY = left.y; + const leftZ = left.z; + const leftW = left.w; + const rightX = right.x; + const rightY = right.y; + const rightZ = right.z; + const rightW = right.w; + const x = leftW * rightX + leftX * rightW + leftY * rightZ - leftZ * rightY; + const y = leftW * rightY - leftX * rightZ + leftY * rightW + leftZ * rightX; + const z = leftW * rightZ + leftX * rightY - leftY * rightX + leftZ * rightW; + const w = leftW * rightW - leftX * rightX - leftY * rightY - leftZ * rightZ; + result.x = x; + result.y = y; + result.z = z; + result.w = w; + return result; +}; +Quaternion.multiplyByScalar = function(quaternion, scalar, result) { + Check_default.typeOf.object("quaternion", quaternion); + Check_default.typeOf.number("scalar", scalar); + Check_default.typeOf.object("result", result); + result.x = quaternion.x * scalar; + result.y = quaternion.y * scalar; + result.z = quaternion.z * scalar; + result.w = quaternion.w * scalar; + return result; +}; +Quaternion.divideByScalar = function(quaternion, scalar, result) { + Check_default.typeOf.object("quaternion", quaternion); + Check_default.typeOf.number("scalar", scalar); + Check_default.typeOf.object("result", result); + result.x = quaternion.x / scalar; + result.y = quaternion.y / scalar; + result.z = quaternion.z / scalar; + result.w = quaternion.w / scalar; + return result; +}; +Quaternion.computeAxis = function(quaternion, result) { + Check_default.typeOf.object("quaternion", quaternion); + Check_default.typeOf.object("result", result); + const w = quaternion.w; + if (Math.abs(w - 1) < Math_default.EPSILON6 || Math.abs(w + 1) < Math_default.EPSILON6) { + result.x = 1; + result.y = result.z = 0; + return result; } - return isEdgeResult; -} -function edgeVersion() { - return isEdge() && edgeVersionResult; -} -var isFirefoxResult; -var firefoxVersionResult; -function isFirefox() { - if (!defined_default(isFirefoxResult)) { - isFirefoxResult = false; - const fields = /Firefox\/([\.0-9]+)/.exec(theNavigator.userAgent); - if (fields !== null) { - isFirefoxResult = true; - firefoxVersionResult = extractVersion(fields[1]); - } + const scalar = 1 / Math.sqrt(1 - w * w); + result.x = quaternion.x * scalar; + result.y = quaternion.y * scalar; + result.z = quaternion.z * scalar; + return result; +}; +Quaternion.computeAngle = function(quaternion) { + Check_default.typeOf.object("quaternion", quaternion); + if (Math.abs(quaternion.w - 1) < Math_default.EPSILON6) { + return 0; } - return isFirefoxResult; -} -var isWindowsResult; -function isWindows() { - if (!defined_default(isWindowsResult)) { - isWindowsResult = /Windows/i.test(theNavigator.appVersion); + return 2 * Math.acos(quaternion.w); +}; +var lerpScratch2 = new Quaternion(); +Quaternion.lerp = function(start, end, t, result) { + Check_default.typeOf.object("start", start); + Check_default.typeOf.object("end", end); + Check_default.typeOf.number("t", t); + Check_default.typeOf.object("result", result); + lerpScratch2 = Quaternion.multiplyByScalar(end, t, lerpScratch2); + result = Quaternion.multiplyByScalar(start, 1 - t, result); + return Quaternion.add(lerpScratch2, result, result); +}; +var slerpEndNegated = new Quaternion(); +var slerpScaledP = new Quaternion(); +var slerpScaledR = new Quaternion(); +Quaternion.slerp = function(start, end, t, result) { + Check_default.typeOf.object("start", start); + Check_default.typeOf.object("end", end); + Check_default.typeOf.number("t", t); + Check_default.typeOf.object("result", result); + let dot = Quaternion.dot(start, end); + let r = end; + if (dot < 0) { + dot = -dot; + r = slerpEndNegated = Quaternion.negate(end, slerpEndNegated); } - return isWindowsResult; -} -var isIPadOrIOSResult; -function isIPadOrIOS() { - if (!defined_default(isIPadOrIOSResult)) { - isIPadOrIOSResult = navigator.platform === "iPhone" || navigator.platform === "iPod" || navigator.platform === "iPad"; + if (1 - dot < Math_default.EPSILON6) { + return Quaternion.lerp(start, r, t, result); } - return isIPadOrIOSResult; -} -function firefoxVersion() { - return isFirefox() && firefoxVersionResult; -} -var hasPointerEvents; -function supportsPointerEvents() { - if (!defined_default(hasPointerEvents)) { - hasPointerEvents = !isFirefox() && typeof PointerEvent !== "undefined" && (!defined_default(theNavigator.pointerEnabled) || theNavigator.pointerEnabled); + const theta = Math.acos(dot); + slerpScaledP = Quaternion.multiplyByScalar( + start, + Math.sin((1 - t) * theta), + slerpScaledP + ); + slerpScaledR = Quaternion.multiplyByScalar( + r, + Math.sin(t * theta), + slerpScaledR + ); + result = Quaternion.add(slerpScaledP, slerpScaledR, result); + return Quaternion.multiplyByScalar(result, 1 / Math.sin(theta), result); +}; +Quaternion.log = function(quaternion, result) { + Check_default.typeOf.object("quaternion", quaternion); + Check_default.typeOf.object("result", result); + const theta = Math_default.acosClamped(quaternion.w); + let thetaOverSinTheta = 0; + if (theta !== 0) { + thetaOverSinTheta = theta / Math.sin(theta); } - return hasPointerEvents; -} -var imageRenderingValueResult; -var supportsImageRenderingPixelatedResult; -function supportsImageRenderingPixelated() { - if (!defined_default(supportsImageRenderingPixelatedResult)) { - const canvas = document.createElement("canvas"); - canvas.setAttribute( - "style", - "image-rendering: -moz-crisp-edges;image-rendering: pixelated;" - ); - const tmp = canvas.style.imageRendering; - supportsImageRenderingPixelatedResult = defined_default(tmp) && tmp !== ""; - if (supportsImageRenderingPixelatedResult) { - imageRenderingValueResult = tmp; - } + return Cartesian3_default.multiplyByScalar(quaternion, thetaOverSinTheta, result); +}; +Quaternion.exp = function(cartesian, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + const theta = Cartesian3_default.magnitude(cartesian); + let sinThetaOverTheta = 0; + if (theta !== 0) { + sinThetaOverTheta = Math.sin(theta) / theta; } - return supportsImageRenderingPixelatedResult; -} -function imageRenderingValue() { - return supportsImageRenderingPixelated() ? imageRenderingValueResult : void 0; + result.x = cartesian.x * sinThetaOverTheta; + result.y = cartesian.y * sinThetaOverTheta; + result.z = cartesian.z * sinThetaOverTheta; + result.w = Math.cos(theta); + return result; +}; +var squadScratchCartesian0 = new Cartesian3_default(); +var squadScratchCartesian1 = new Cartesian3_default(); +var squadScratchQuaternion0 = new Quaternion(); +var squadScratchQuaternion1 = new Quaternion(); +Quaternion.computeInnerQuadrangle = function(q0, q1, q2, result) { + Check_default.typeOf.object("q0", q0); + Check_default.typeOf.object("q1", q1); + Check_default.typeOf.object("q2", q2); + Check_default.typeOf.object("result", result); + const qInv = Quaternion.conjugate(q1, squadScratchQuaternion0); + Quaternion.multiply(qInv, q2, squadScratchQuaternion1); + const cart0 = Quaternion.log(squadScratchQuaternion1, squadScratchCartesian0); + Quaternion.multiply(qInv, q0, squadScratchQuaternion1); + const cart1 = Quaternion.log(squadScratchQuaternion1, squadScratchCartesian1); + Cartesian3_default.add(cart0, cart1, cart0); + Cartesian3_default.multiplyByScalar(cart0, 0.25, cart0); + Cartesian3_default.negate(cart0, cart0); + Quaternion.exp(cart0, squadScratchQuaternion0); + return Quaternion.multiply(q1, squadScratchQuaternion0, result); +}; +Quaternion.squad = function(q0, q1, s0, s1, t, result) { + Check_default.typeOf.object("q0", q0); + Check_default.typeOf.object("q1", q1); + Check_default.typeOf.object("s0", s0); + Check_default.typeOf.object("s1", s1); + Check_default.typeOf.number("t", t); + Check_default.typeOf.object("result", result); + const slerp0 = Quaternion.slerp(q0, q1, t, squadScratchQuaternion0); + const slerp1 = Quaternion.slerp(s0, s1, t, squadScratchQuaternion1); + return Quaternion.slerp(slerp0, slerp1, 2 * t * (1 - t), result); +}; +var fastSlerpScratchQuaternion = new Quaternion(); +var opmu = 1.9011074535173003; +var u = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : []; +var v = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : []; +var bT = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : []; +var bD = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : []; +for (let i = 0; i < 7; ++i) { + const s = i + 1; + const t = 2 * s + 1; + u[i] = 1 / (s * t); + v[i] = s / t; } -function supportsWebP() { - if (!supportsWebP.initialized) { - throw new DeveloperError_default( - "You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP" - ); +u[7] = opmu / (8 * 17); +v[7] = opmu * 8 / 17; +Quaternion.fastSlerp = function(start, end, t, result) { + Check_default.typeOf.object("start", start); + Check_default.typeOf.object("end", end); + Check_default.typeOf.number("t", t); + Check_default.typeOf.object("result", result); + let x = Quaternion.dot(start, end); + let sign; + if (x >= 0) { + sign = 1; + } else { + sign = -1; + x = -x; } - return supportsWebP._result; -} -supportsWebP._promise = void 0; -supportsWebP._result = void 0; -supportsWebP.initialize = function() { - if (defined_default(supportsWebP._promise)) { - return supportsWebP._promise; - } - supportsWebP._promise = new Promise((resolve) => { - const image = new Image(); - image.onload = function() { - supportsWebP._result = image.width > 0 && image.height > 0; - resolve(supportsWebP._result); - }; - image.onerror = function() { - supportsWebP._result = false; - resolve(supportsWebP._result); - }; - image.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"; - }); - return supportsWebP._promise; -}; -Object.defineProperties(supportsWebP, { - initialized: { - get: function() { - return defined_default(supportsWebP._result); - } + const xm1 = x - 1; + const d = 1 - t; + const sqrT = t * t; + const sqrD = d * d; + for (let i = 7; i >= 0; --i) { + bT[i] = (u[i] * sqrT - v[i]) * xm1; + bD[i] = (u[i] * sqrD - v[i]) * xm1; } -}); -var typedArrayTypes = []; -if (typeof ArrayBuffer !== "undefined") { - typedArrayTypes.push( - Int8Array, - Uint8Array, - Int16Array, - Uint16Array, - Int32Array, - Uint32Array, - Float32Array, - Float64Array + const cT = sign * t * (1 + bT[0] * (1 + bT[1] * (1 + bT[2] * (1 + bT[3] * (1 + bT[4] * (1 + bT[5] * (1 + bT[6] * (1 + bT[7])))))))); + const cD = d * (1 + bD[0] * (1 + bD[1] * (1 + bD[2] * (1 + bD[3] * (1 + bD[4] * (1 + bD[5] * (1 + bD[6] * (1 + bD[7])))))))); + const temp = Quaternion.multiplyByScalar( + start, + cD, + fastSlerpScratchQuaternion ); - if (typeof Uint8ClampedArray !== "undefined") { - typedArrayTypes.push(Uint8ClampedArray); - } - if (typeof Uint8ClampedArray !== "undefined") { - typedArrayTypes.push(Uint8ClampedArray); - } - if (typeof BigInt64Array !== "undefined") { - typedArrayTypes.push(BigInt64Array); - } - if (typeof BigUint64Array !== "undefined") { - typedArrayTypes.push(BigUint64Array); - } -} -var FeatureDetection = { - isChrome, - chromeVersion, - isSafari, - safariVersion, - isWebkit, - webkitVersion, - isInternetExplorer, - internetExplorerVersion, - isEdge, - edgeVersion, - isFirefox, - firefoxVersion, - isWindows, - isIPadOrIOS, - hardwareConcurrency: defaultValue_default(theNavigator.hardwareConcurrency, 3), - supportsPointerEvents, - supportsImageRenderingPixelated, - supportsWebP, - imageRenderingValue, - typedArrayTypes -}; -FeatureDetection.supportsBasis = function(scene) { - return FeatureDetection.supportsWebAssembly() && scene.context.supportsBasis; -}; -FeatureDetection.supportsFullscreen = function() { - return Fullscreen_default.supportsFullscreen(); -}; -FeatureDetection.supportsTypedArrays = function() { - return typeof ArrayBuffer !== "undefined"; -}; -FeatureDetection.supportsBigInt64Array = function() { - return typeof BigInt64Array !== "undefined"; -}; -FeatureDetection.supportsBigUint64Array = function() { - return typeof BigUint64Array !== "undefined"; -}; -FeatureDetection.supportsBigInt = function() { - return typeof BigInt !== "undefined"; -}; -FeatureDetection.supportsWebWorkers = function() { - return typeof Worker !== "undefined"; -}; -FeatureDetection.supportsWebAssembly = function() { - return typeof WebAssembly !== "undefined"; -}; -FeatureDetection.supportsWebgl2 = function(scene) { - Check_default.defined("scene", scene); - return scene.context.webgl2; -}; -FeatureDetection.supportsEsmWebWorkers = function() { - return !isFirefox() || parseInt(firefoxVersionResult) >= 114; -}; -var FeatureDetection_default = FeatureDetection; + Quaternion.multiplyByScalar(end, cT, result); + return Quaternion.add(temp, result, result); +}; +Quaternion.fastSquad = function(q0, q1, s0, s1, t, result) { + Check_default.typeOf.object("q0", q0); + Check_default.typeOf.object("q1", q1); + Check_default.typeOf.object("s0", s0); + Check_default.typeOf.object("s1", s1); + Check_default.typeOf.number("t", t); + Check_default.typeOf.object("result", result); + const slerp0 = Quaternion.fastSlerp(q0, q1, t, squadScratchQuaternion0); + const slerp1 = Quaternion.fastSlerp(s0, s1, t, squadScratchQuaternion1); + return Quaternion.fastSlerp(slerp0, slerp1, 2 * t * (1 - t), result); +}; +Quaternion.equals = function(left, right) { + return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.z === right.z && left.w === right.w; +}; +Quaternion.equalsEpsilon = function(left, right, epsilon) { + epsilon = defaultValue_default(epsilon, 0); + return left === right || defined_default(left) && defined_default(right) && Math.abs(left.x - right.x) <= epsilon && Math.abs(left.y - right.y) <= epsilon && Math.abs(left.z - right.z) <= epsilon && Math.abs(left.w - right.w) <= epsilon; +}; +Quaternion.ZERO = Object.freeze(new Quaternion(0, 0, 0, 0)); +Quaternion.IDENTITY = Object.freeze(new Quaternion(0, 0, 0, 1)); +Quaternion.prototype.clone = function(result) { + return Quaternion.clone(this, result); +}; +Quaternion.prototype.equals = function(right) { + return Quaternion.equals(this, right); +}; +Quaternion.prototype.equalsEpsilon = function(right, epsilon) { + return Quaternion.equalsEpsilon(this, right, epsilon); +}; +Quaternion.prototype.toString = function() { + return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`; +}; +var Quaternion_default = Quaternion; -// packages/engine/Source/Core/Quaternion.js -function Quaternion(x, y, z, w) { - this.x = defaultValue_default(x, 0); - this.y = defaultValue_default(y, 0); - this.z = defaultValue_default(z, 0); - this.w = defaultValue_default(w, 0); -} -var fromAxisAngleScratch = new Cartesian3_default(); -Quaternion.fromAxisAngle = function(axis, angle, result) { - Check_default.typeOf.object("axis", axis); - Check_default.typeOf.number("angle", angle); - const halfAngle = angle / 2; - const s = Math.sin(halfAngle); - fromAxisAngleScratch = Cartesian3_default.normalize(axis, fromAxisAngleScratch); - const x = fromAxisAngleScratch.x * s; - const y = fromAxisAngleScratch.y * s; - const z = fromAxisAngleScratch.z * s; - const w = Math.cos(halfAngle); - if (!defined_default(result)) { - return new Quaternion(x, y, z, w); +// packages/engine/Source/Core/Transforms.js +var Transforms = {}; +var vectorProductLocalFrame = { + 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" } - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; }; -var fromRotationMatrixNext = [1, 2, 0]; -var fromRotationMatrixQuat = new Array(3); -Quaternion.fromRotationMatrix = function(matrix, result) { - Check_default.typeOf.object("matrix", matrix); - let root; - let x; - let y; - let z; - let w; - const m00 = matrix[Matrix3_default.COLUMN0ROW0]; - const m11 = matrix[Matrix3_default.COLUMN1ROW1]; - const m22 = matrix[Matrix3_default.COLUMN2ROW2]; - const trace = m00 + m11 + m22; - if (trace > 0) { - root = Math.sqrt(trace + 1); - w = 0.5 * root; - root = 0.5 / root; - x = (matrix[Matrix3_default.COLUMN1ROW2] - matrix[Matrix3_default.COLUMN2ROW1]) * root; - y = (matrix[Matrix3_default.COLUMN2ROW0] - matrix[Matrix3_default.COLUMN0ROW2]) * root; - z = (matrix[Matrix3_default.COLUMN0ROW1] - matrix[Matrix3_default.COLUMN1ROW0]) * root; - } else { - const next = fromRotationMatrixNext; - let i = 0; - if (m11 > m00) { - i = 1; - } - if (m22 > m00 && m22 > m11) { - i = 2; - } - const j = next[i]; - const k = next[j]; - root = Math.sqrt( - matrix[Matrix3_default.getElementIndex(i, i)] - matrix[Matrix3_default.getElementIndex(j, j)] - matrix[Matrix3_default.getElementIndex(k, k)] + 1 +var degeneratePositionLocalFrame = { + north: [-1, 0, 0], + east: [0, 1, 0], + up: [0, 0, 1], + south: [1, 0, 0], + west: [0, -1, 0], + down: [0, 0, -1] +}; +var localFrameToFixedFrameCache = {}; +var scratchCalculateCartesian = { + east: new Cartesian3_default(), + north: new Cartesian3_default(), + up: new Cartesian3_default(), + west: new Cartesian3_default(), + south: new Cartesian3_default(), + down: new Cartesian3_default() +}; +var scratchFirstCartesian = new Cartesian3_default(); +var scratchSecondCartesian = new Cartesian3_default(); +var scratchThirdCartesian = new Cartesian3_default(); +Transforms.localFrameToFixedFrameGenerator = function(firstAxis, secondAxis) { + if (!vectorProductLocalFrame.hasOwnProperty(firstAxis) || !vectorProductLocalFrame[firstAxis].hasOwnProperty(secondAxis)) { + throw new DeveloperError_default( + "firstAxis and secondAxis must be east, north, up, west, south or down." ); - const quat = fromRotationMatrixQuat; - quat[i] = 0.5 * root; - root = 0.5 / root; - w = (matrix[Matrix3_default.getElementIndex(k, j)] - matrix[Matrix3_default.getElementIndex(j, k)]) * root; - quat[j] = (matrix[Matrix3_default.getElementIndex(j, i)] + matrix[Matrix3_default.getElementIndex(i, j)]) * root; - quat[k] = (matrix[Matrix3_default.getElementIndex(k, i)] + matrix[Matrix3_default.getElementIndex(i, k)]) * root; - x = -quat[0]; - y = -quat[1]; - z = -quat[2]; } - if (!defined_default(result)) { - return new Quaternion(x, y, z, w); + const thirdAxis = vectorProductLocalFrame[firstAxis][secondAxis]; + let resultat; + const hashAxis = firstAxis + secondAxis; + if (defined_default(localFrameToFixedFrameCache[hashAxis])) { + resultat = localFrameToFixedFrameCache[hashAxis]; + } else { + resultat = function(origin, ellipsoid, result) { + if (!defined_default(origin)) { + throw new DeveloperError_default("origin is required."); + } + if (isNaN(origin.x) || isNaN(origin.y) || isNaN(origin.z)) { + throw new DeveloperError_default("origin has a NaN component"); + } + if (!defined_default(result)) { + result = new Matrix4_default(); + } + if (Cartesian3_default.equalsEpsilon(origin, Cartesian3_default.ZERO, Math_default.EPSILON14)) { + Cartesian3_default.unpack( + degeneratePositionLocalFrame[firstAxis], + 0, + scratchFirstCartesian + ); + Cartesian3_default.unpack( + degeneratePositionLocalFrame[secondAxis], + 0, + scratchSecondCartesian + ); + Cartesian3_default.unpack( + degeneratePositionLocalFrame[thirdAxis], + 0, + scratchThirdCartesian + ); + } else if (Math_default.equalsEpsilon(origin.x, 0, Math_default.EPSILON14) && Math_default.equalsEpsilon(origin.y, 0, Math_default.EPSILON14)) { + const sign = Math_default.sign(origin.z); + Cartesian3_default.unpack( + degeneratePositionLocalFrame[firstAxis], + 0, + scratchFirstCartesian + ); + if (firstAxis !== "east" && firstAxis !== "west") { + Cartesian3_default.multiplyByScalar( + scratchFirstCartesian, + sign, + scratchFirstCartesian + ); + } + Cartesian3_default.unpack( + degeneratePositionLocalFrame[secondAxis], + 0, + scratchSecondCartesian + ); + if (secondAxis !== "east" && secondAxis !== "west") { + Cartesian3_default.multiplyByScalar( + scratchSecondCartesian, + sign, + scratchSecondCartesian + ); + } + Cartesian3_default.unpack( + degeneratePositionLocalFrame[thirdAxis], + 0, + scratchThirdCartesian + ); + if (thirdAxis !== "east" && thirdAxis !== "west") { + Cartesian3_default.multiplyByScalar( + scratchThirdCartesian, + sign, + scratchThirdCartesian + ); + } + } else { + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); + ellipsoid.geodeticSurfaceNormal(origin, scratchCalculateCartesian.up); + const up = scratchCalculateCartesian.up; + const east = scratchCalculateCartesian.east; + east.x = -origin.y; + east.y = origin.x; + east.z = 0; + Cartesian3_default.normalize(east, scratchCalculateCartesian.east); + Cartesian3_default.cross(up, east, scratchCalculateCartesian.north); + Cartesian3_default.multiplyByScalar( + scratchCalculateCartesian.up, + -1, + scratchCalculateCartesian.down + ); + Cartesian3_default.multiplyByScalar( + scratchCalculateCartesian.east, + -1, + scratchCalculateCartesian.west + ); + Cartesian3_default.multiplyByScalar( + scratchCalculateCartesian.north, + -1, + scratchCalculateCartesian.south + ); + scratchFirstCartesian = scratchCalculateCartesian[firstAxis]; + scratchSecondCartesian = scratchCalculateCartesian[secondAxis]; + scratchThirdCartesian = scratchCalculateCartesian[thirdAxis]; + } + result[0] = scratchFirstCartesian.x; + result[1] = scratchFirstCartesian.y; + result[2] = scratchFirstCartesian.z; + result[3] = 0; + result[4] = scratchSecondCartesian.x; + result[5] = scratchSecondCartesian.y; + result[6] = scratchSecondCartesian.z; + result[7] = 0; + result[8] = scratchThirdCartesian.x; + result[9] = scratchThirdCartesian.y; + result[10] = scratchThirdCartesian.z; + result[11] = 0; + result[12] = origin.x; + result[13] = origin.y; + result[14] = origin.z; + result[15] = 1; + return result; + }; + localFrameToFixedFrameCache[hashAxis] = resultat; } - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; + return resultat; }; -var scratchHPRQuaternion = new Quaternion(); -var scratchHeadingQuaternion = new Quaternion(); -var scratchPitchQuaternion = new Quaternion(); -var scratchRollQuaternion = new Quaternion(); -Quaternion.fromHeadingPitchRoll = function(headingPitchRoll, result) { - Check_default.typeOf.object("headingPitchRoll", headingPitchRoll); - scratchRollQuaternion = Quaternion.fromAxisAngle( - Cartesian3_default.UNIT_X, - headingPitchRoll.roll, - scratchHPRQuaternion - ); - scratchPitchQuaternion = Quaternion.fromAxisAngle( - Cartesian3_default.UNIT_Y, - -headingPitchRoll.pitch, - result +Transforms.eastNorthUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator( + "east", + "north" +); +Transforms.northEastDownToFixedFrame = Transforms.localFrameToFixedFrameGenerator( + "north", + "east" +); +Transforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator( + "north", + "up" +); +Transforms.northWestUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator( + "north", + "west" +); +var scratchHPRQuaternion2 = new Quaternion_default(); +var scratchScale = new Cartesian3_default(1, 1, 1); +var scratchHPRMatrix4 = new Matrix4_default(); +Transforms.headingPitchRollToFixedFrame = function(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, result) { + Check_default.typeOf.object("HeadingPitchRoll", headingPitchRoll); + fixedFrameTransform = defaultValue_default( + fixedFrameTransform, + Transforms.eastNorthUpToFixedFrame ); - result = Quaternion.multiply( - scratchPitchQuaternion, - scratchRollQuaternion, - scratchPitchQuaternion + const hprQuaternion = Quaternion_default.fromHeadingPitchRoll( + headingPitchRoll, + scratchHPRQuaternion2 ); - scratchHeadingQuaternion = Quaternion.fromAxisAngle( - Cartesian3_default.UNIT_Z, - -headingPitchRoll.heading, - scratchHPRQuaternion + const hprMatrix = Matrix4_default.fromTranslationQuaternionRotationScale( + Cartesian3_default.ZERO, + hprQuaternion, + scratchScale, + scratchHPRMatrix4 ); - return Quaternion.multiply(scratchHeadingQuaternion, result, result); + result = fixedFrameTransform(origin, ellipsoid, result); + return Matrix4_default.multiply(result, hprMatrix, result); }; -var sampledQuaternionAxis = new Cartesian3_default(); -var sampledQuaternionRotation = new Cartesian3_default(); -var sampledQuaternionTempQuaternion = new Quaternion(); -var sampledQuaternionQuaternion0 = new Quaternion(); -var sampledQuaternionQuaternion0Conjugate = new Quaternion(); -Quaternion.packedLength = 4; -Quaternion.pack = function(value, array, startingIndex) { - Check_default.typeOf.object("value", value); - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); - array[startingIndex++] = value.x; - array[startingIndex++] = value.y; - array[startingIndex++] = value.z; - array[startingIndex] = value.w; - return array; +var scratchENUMatrix4 = new Matrix4_default(); +var scratchHPRMatrix3 = new Matrix3_default(); +Transforms.headingPitchRollQuaternion = function(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, result) { + Check_default.typeOf.object("HeadingPitchRoll", headingPitchRoll); + const transform = Transforms.headingPitchRollToFixedFrame( + origin, + headingPitchRoll, + ellipsoid, + fixedFrameTransform, + scratchENUMatrix4 + ); + const rotation = Matrix4_default.getMatrix3(transform, scratchHPRMatrix3); + return Quaternion_default.fromRotationMatrix(rotation, result); }; -Quaternion.unpack = function(array, startingIndex, result) { - Check_default.defined("array", array); - startingIndex = defaultValue_default(startingIndex, 0); +var noScale = new Cartesian3_default(1, 1, 1); +var hprCenterScratch = new Cartesian3_default(); +var ffScratch = new Matrix4_default(); +var hprTransformScratch = new Matrix4_default(); +var hprRotationScratch = new Matrix3_default(); +var hprQuaternionScratch = new Quaternion_default(); +Transforms.fixedFrameToHeadingPitchRoll = function(transform, ellipsoid, fixedFrameTransform, result) { + Check_default.defined("transform", transform); + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); + fixedFrameTransform = defaultValue_default( + fixedFrameTransform, + Transforms.eastNorthUpToFixedFrame + ); if (!defined_default(result)) { - result = new Quaternion(); + result = new HeadingPitchRoll_default(); } - result.x = array[startingIndex]; - result.y = array[startingIndex + 1]; - result.z = array[startingIndex + 2]; - result.w = array[startingIndex + 3]; - return result; -}; -Quaternion.packedInterpolationLength = 3; -Quaternion.convertPackedArrayForInterpolation = function(packedArray, startingIndex, lastIndex, result) { - Quaternion.unpack( - packedArray, - lastIndex * 4, - sampledQuaternionQuaternion0Conjugate + const center = Matrix4_default.getTranslation(transform, hprCenterScratch); + if (Cartesian3_default.equals(center, Cartesian3_default.ZERO)) { + result.heading = 0; + result.pitch = 0; + result.roll = 0; + return result; + } + let toFixedFrame = Matrix4_default.inverseTransformation( + fixedFrameTransform(center, ellipsoid, ffScratch), + ffScratch ); - Quaternion.conjugate( - sampledQuaternionQuaternion0Conjugate, - sampledQuaternionQuaternion0Conjugate + let transformCopy = Matrix4_default.setScale(transform, noScale, hprTransformScratch); + transformCopy = Matrix4_default.setTranslation( + transformCopy, + Cartesian3_default.ZERO, + transformCopy ); - for (let i = 0, len = lastIndex - startingIndex + 1; i < len; i++) { - const offset = i * 3; - Quaternion.unpack( - packedArray, - (startingIndex + i) * 4, - sampledQuaternionTempQuaternion - ); - Quaternion.multiply( - sampledQuaternionTempQuaternion, - sampledQuaternionQuaternion0Conjugate, - sampledQuaternionTempQuaternion - ); - if (sampledQuaternionTempQuaternion.w < 0) { - Quaternion.negate( - sampledQuaternionTempQuaternion, - sampledQuaternionTempQuaternion - ); - } - Quaternion.computeAxis( - sampledQuaternionTempQuaternion, - sampledQuaternionAxis - ); - const angle = Quaternion.computeAngle(sampledQuaternionTempQuaternion); - if (!defined_default(result)) { - result = []; - } - result[offset] = sampledQuaternionAxis.x * angle; - result[offset + 1] = sampledQuaternionAxis.y * angle; - result[offset + 2] = sampledQuaternionAxis.z * angle; - } + toFixedFrame = Matrix4_default.multiply(toFixedFrame, transformCopy, toFixedFrame); + let quaternionRotation = Quaternion_default.fromRotationMatrix( + Matrix4_default.getMatrix3(toFixedFrame, hprRotationScratch), + hprQuaternionScratch + ); + quaternionRotation = Quaternion_default.normalize( + quaternionRotation, + quaternionRotation + ); + return HeadingPitchRoll_default.fromQuaternion(quaternionRotation, result); }; -Quaternion.unpackInterpolationResult = function(array, sourceArray, firstIndex, lastIndex, result) { - if (!defined_default(result)) { - result = new Quaternion(); - } - Cartesian3_default.fromArray(array, 0, sampledQuaternionRotation); - const magnitude = Cartesian3_default.magnitude(sampledQuaternionRotation); - Quaternion.unpack(sourceArray, lastIndex * 4, sampledQuaternionQuaternion0); - if (magnitude === 0) { - Quaternion.clone(Quaternion.IDENTITY, sampledQuaternionTempQuaternion); - } else { - Quaternion.fromAxisAngle( - sampledQuaternionRotation, - magnitude, - sampledQuaternionTempQuaternion - ); +var gmstConstant0 = 6 * 3600 + 41 * 60 + 50.54841; +var gmstConstant1 = 8640184812866e-6; +var gmstConstant2 = 0.093104; +var gmstConstant3 = -62e-7; +var rateCoef = 11772758384668e-32; +var wgs84WRPrecessing = 72921158553e-15; +var twoPiOverSecondsInDay = Math_default.TWO_PI / 86400; +var dateInUtc = new JulianDate_default(); +Transforms.computeTemeToPseudoFixedMatrix = function(date, result) { + if (!defined_default(date)) { + throw new DeveloperError_default("date is required."); } - return Quaternion.multiply( - sampledQuaternionTempQuaternion, - sampledQuaternionQuaternion0, - result + dateInUtc = JulianDate_default.addSeconds( + date, + -JulianDate_default.computeTaiMinusUtc(date), + dateInUtc ); -}; -Quaternion.clone = function(quaternion, result) { - if (!defined_default(quaternion)) { - return void 0; + const utcDayNumber = dateInUtc.dayNumber; + const utcSecondsIntoDay = dateInUtc.secondsOfDay; + let t; + const diffDays = utcDayNumber - 2451545; + if (utcSecondsIntoDay >= 43200) { + t = (diffDays + 0.5) / TimeConstants_default.DAYS_PER_JULIAN_CENTURY; + } else { + t = (diffDays - 0.5) / TimeConstants_default.DAYS_PER_JULIAN_CENTURY; } + const gmst0 = gmstConstant0 + t * (gmstConstant1 + t * (gmstConstant2 + t * gmstConstant3)); + const angle = gmst0 * twoPiOverSecondsInDay % Math_default.TWO_PI; + const ratio = wgs84WRPrecessing + rateCoef * (utcDayNumber - 24515455e-1); + const secondsSinceMidnight = (utcSecondsIntoDay + TimeConstants_default.SECONDS_PER_DAY * 0.5) % TimeConstants_default.SECONDS_PER_DAY; + const gha = angle + ratio * secondsSinceMidnight; + const cosGha = Math.cos(gha); + const sinGha = Math.sin(gha); if (!defined_default(result)) { - return new Quaternion( - quaternion.x, - quaternion.y, - quaternion.z, - quaternion.w + return new Matrix3_default( + cosGha, + sinGha, + 0, + -sinGha, + cosGha, + 0, + 0, + 0, + 1 ); } - result.x = quaternion.x; - result.y = quaternion.y; - result.z = quaternion.z; - result.w = quaternion.w; - return result; -}; -Quaternion.conjugate = function(quaternion, result) { - Check_default.typeOf.object("quaternion", quaternion); - Check_default.typeOf.object("result", result); - result.x = -quaternion.x; - result.y = -quaternion.y; - result.z = -quaternion.z; - result.w = quaternion.w; - return result; -}; -Quaternion.magnitudeSquared = function(quaternion) { - Check_default.typeOf.object("quaternion", quaternion); - return quaternion.x * quaternion.x + quaternion.y * quaternion.y + quaternion.z * quaternion.z + quaternion.w * quaternion.w; -}; -Quaternion.magnitude = function(quaternion) { - return Math.sqrt(Quaternion.magnitudeSquared(quaternion)); -}; -Quaternion.normalize = function(quaternion, result) { - Check_default.typeOf.object("result", result); - const inverseMagnitude = 1 / Quaternion.magnitude(quaternion); - const x = quaternion.x * inverseMagnitude; - const y = quaternion.y * inverseMagnitude; - const z = quaternion.z * inverseMagnitude; - const w = quaternion.w * inverseMagnitude; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -}; -Quaternion.inverse = function(quaternion, result) { - Check_default.typeOf.object("result", result); - const magnitudeSquared = Quaternion.magnitudeSquared(quaternion); - result = Quaternion.conjugate(quaternion, result); - return Quaternion.multiplyByScalar(result, 1 / magnitudeSquared, result); -}; -Quaternion.add = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result.x = left.x + right.x; - result.y = left.y + right.y; - result.z = left.z + right.z; - result.w = left.w + right.w; - return result; -}; -Quaternion.subtract = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - result.x = left.x - right.x; - result.y = left.y - right.y; - result.z = left.z - right.z; - result.w = left.w - right.w; - return result; -}; -Quaternion.negate = function(quaternion, result) { - Check_default.typeOf.object("quaternion", quaternion); - Check_default.typeOf.object("result", result); - result.x = -quaternion.x; - result.y = -quaternion.y; - result.z = -quaternion.z; - result.w = -quaternion.w; + result[0] = cosGha; + result[1] = -sinGha; + result[2] = 0; + result[3] = sinGha; + result[4] = cosGha; + result[5] = 0; + result[6] = 0; + result[7] = 0; + result[8] = 1; return result; }; -Quaternion.dot = function(left, right) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; +Transforms.iau2006XysData = new Iau2006XysData_default(); +Transforms.earthOrientationParameters = EarthOrientationParameters_default.NONE; +var ttMinusTai = 32.184; +var j2000ttDays = 2451545; +Transforms.preloadIcrfFixed = function(timeInterval) { + const startDayTT = timeInterval.start.dayNumber; + const startSecondTT = timeInterval.start.secondsOfDay + ttMinusTai; + const stopDayTT = timeInterval.stop.dayNumber; + const stopSecondTT = timeInterval.stop.secondsOfDay + ttMinusTai; + return Transforms.iau2006XysData.preload( + startDayTT, + startSecondTT, + stopDayTT, + stopSecondTT + ); }; -Quaternion.multiply = function(left, right, result) { - Check_default.typeOf.object("left", left); - Check_default.typeOf.object("right", right); - Check_default.typeOf.object("result", result); - const leftX = left.x; - const leftY = left.y; - const leftZ = left.z; - const leftW = left.w; - const rightX = right.x; - const rightY = right.y; - const rightZ = right.z; - const rightW = right.w; - const x = leftW * rightX + leftX * rightW + leftY * rightZ - leftZ * rightY; - const y = leftW * rightY - leftX * rightZ + leftY * rightW + leftZ * rightX; - const z = leftW * rightZ + leftX * rightY - leftY * rightX + leftZ * rightW; - const w = leftW * rightW - leftX * rightX - leftY * rightY - leftZ * rightZ; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; +Transforms.computeIcrfToFixedMatrix = function(date, result) { + if (!defined_default(date)) { + throw new DeveloperError_default("date is required."); + } + if (!defined_default(result)) { + result = new Matrix3_default(); + } + const fixedToIcrfMtx = Transforms.computeFixedToIcrfMatrix(date, result); + if (!defined_default(fixedToIcrfMtx)) { + return void 0; + } + return Matrix3_default.transpose(fixedToIcrfMtx, result); }; -Quaternion.multiplyByScalar = function(quaternion, scalar, result) { - Check_default.typeOf.object("quaternion", quaternion); - Check_default.typeOf.number("scalar", scalar); - Check_default.typeOf.object("result", result); - result.x = quaternion.x * scalar; - result.y = quaternion.y * scalar; - result.z = quaternion.z * scalar; - result.w = quaternion.w * scalar; - return result; +var xysScratch = new Iau2006XysSample_default(0, 0, 0); +var eopScratch = new EarthOrientationParametersSample_default( + 0, + 0, + 0, + 0, + 0, + 0 +); +var rotation1Scratch = new Matrix3_default(); +var rotation2Scratch = new Matrix3_default(); +Transforms.computeFixedToIcrfMatrix = function(date, result) { + if (!defined_default(date)) { + throw new DeveloperError_default("date is required."); + } + if (!defined_default(result)) { + result = new Matrix3_default(); + } + const eop = Transforms.earthOrientationParameters.compute(date, eopScratch); + if (!defined_default(eop)) { + return void 0; + } + const dayTT = date.dayNumber; + const secondTT = date.secondsOfDay + ttMinusTai; + const xys = Transforms.iau2006XysData.computeXysRadians( + dayTT, + secondTT, + xysScratch + ); + if (!defined_default(xys)) { + return void 0; + } + const x = xys.x + eop.xPoleOffset; + const y = xys.y + eop.yPoleOffset; + const a3 = 1 / (1 + Math.sqrt(1 - x * x - y * y)); + const rotation1 = rotation1Scratch; + rotation1[0] = 1 - a3 * x * x; + rotation1[3] = -a3 * x * y; + rotation1[6] = x; + rotation1[1] = -a3 * x * y; + rotation1[4] = 1 - a3 * y * y; + rotation1[7] = y; + rotation1[2] = -x; + rotation1[5] = -y; + rotation1[8] = 1 - a3 * (x * x + y * y); + const rotation2 = Matrix3_default.fromRotationZ(-xys.s, rotation2Scratch); + const matrixQ = Matrix3_default.multiply(rotation1, rotation2, rotation1Scratch); + const dateUt1day = date.dayNumber; + const dateUt1sec = date.secondsOfDay - JulianDate_default.computeTaiMinusUtc(date) + eop.ut1MinusUtc; + const daysSinceJ2000 = dateUt1day - 2451545; + const fractionOfDay = dateUt1sec / TimeConstants_default.SECONDS_PER_DAY; + let era = 0.779057273264 + fractionOfDay + 0.00273781191135448 * (daysSinceJ2000 + fractionOfDay); + era = era % 1 * Math_default.TWO_PI; + const earthRotation = Matrix3_default.fromRotationZ(era, rotation2Scratch); + const pfToIcrf = Matrix3_default.multiply(matrixQ, earthRotation, rotation1Scratch); + const cosxp = Math.cos(eop.xPoleWander); + const cosyp = Math.cos(eop.yPoleWander); + const sinxp = Math.sin(eop.xPoleWander); + const sinyp = Math.sin(eop.yPoleWander); + let ttt = dayTT - j2000ttDays + secondTT / TimeConstants_default.SECONDS_PER_DAY; + ttt /= 36525; + const sp = -47e-6 * ttt * Math_default.RADIANS_PER_DEGREE / 3600; + const cossp = Math.cos(sp); + const sinsp = Math.sin(sp); + const fToPfMtx = rotation2Scratch; + fToPfMtx[0] = cosxp * cossp; + fToPfMtx[1] = cosxp * sinsp; + fToPfMtx[2] = sinxp; + fToPfMtx[3] = -cosyp * sinsp + sinyp * sinxp * cossp; + fToPfMtx[4] = cosyp * cossp + sinyp * sinxp * sinsp; + fToPfMtx[5] = -sinyp * cosxp; + fToPfMtx[6] = -sinyp * sinsp - cosyp * sinxp * cossp; + fToPfMtx[7] = sinyp * cossp - cosyp * sinxp * sinsp; + fToPfMtx[8] = cosyp * cosxp; + return Matrix3_default.multiply(pfToIcrf, fToPfMtx, result); }; -Quaternion.divideByScalar = function(quaternion, scalar, result) { - Check_default.typeOf.object("quaternion", quaternion); - Check_default.typeOf.number("scalar", scalar); - Check_default.typeOf.object("result", result); - result.x = quaternion.x / scalar; - result.y = quaternion.y / scalar; - result.z = quaternion.z / scalar; - result.w = quaternion.w / scalar; +var pointToWindowCoordinatesTemp = new Cartesian4_default(); +Transforms.pointToWindowCoordinates = function(modelViewProjectionMatrix, viewportTransformation, point, result) { + result = Transforms.pointToGLWindowCoordinates( + modelViewProjectionMatrix, + viewportTransformation, + point, + result + ); + result.y = 2 * viewportTransformation[5] - result.y; return result; }; -Quaternion.computeAxis = function(quaternion, result) { - Check_default.typeOf.object("quaternion", quaternion); - Check_default.typeOf.object("result", result); - const w = quaternion.w; - if (Math.abs(w - 1) < Math_default.EPSILON6) { - result.x = result.y = result.z = 0; - return result; +Transforms.pointToGLWindowCoordinates = function(modelViewProjectionMatrix, viewportTransformation, point, result) { + if (!defined_default(modelViewProjectionMatrix)) { + throw new DeveloperError_default("modelViewProjectionMatrix is required."); } - const scalar = 1 / Math.sqrt(1 - w * w); - result.x = quaternion.x * scalar; - result.y = quaternion.y * scalar; - result.z = quaternion.z * scalar; - return result; -}; -Quaternion.computeAngle = function(quaternion) { - Check_default.typeOf.object("quaternion", quaternion); - if (Math.abs(quaternion.w - 1) < Math_default.EPSILON6) { - return 0; + if (!defined_default(viewportTransformation)) { + throw new DeveloperError_default("viewportTransformation is required."); } - return 2 * Math.acos(quaternion.w); + if (!defined_default(point)) { + throw new DeveloperError_default("point is required."); + } + if (!defined_default(result)) { + result = new Cartesian2_default(); + } + const tmp = pointToWindowCoordinatesTemp; + Matrix4_default.multiplyByVector( + modelViewProjectionMatrix, + Cartesian4_default.fromElements(point.x, point.y, point.z, 1, tmp), + tmp + ); + Cartesian4_default.multiplyByScalar(tmp, 1 / tmp.w, tmp); + Matrix4_default.multiplyByVector(viewportTransformation, tmp, tmp); + return Cartesian2_default.fromCartesian4(tmp, result); }; -var lerpScratch = new Quaternion(); -Quaternion.lerp = function(start, end, t, result) { - Check_default.typeOf.object("start", start); - Check_default.typeOf.object("end", end); - Check_default.typeOf.number("t", t); - Check_default.typeOf.object("result", result); - lerpScratch = Quaternion.multiplyByScalar(end, t, lerpScratch); - result = Quaternion.multiplyByScalar(start, 1 - t, result); - return Quaternion.add(lerpScratch, result, result); +var normalScratch = new Cartesian3_default(); +var rightScratch = new Cartesian3_default(); +var upScratch = new Cartesian3_default(); +Transforms.rotationMatrixFromPositionVelocity = function(position, velocity, ellipsoid, result) { + if (!defined_default(position)) { + throw new DeveloperError_default("position is required."); + } + if (!defined_default(velocity)) { + throw new DeveloperError_default("velocity is required."); + } + const normal = defaultValue_default( + ellipsoid, + Ellipsoid_default.default + ).geodeticSurfaceNormal(position, normalScratch); + let right = Cartesian3_default.cross(velocity, normal, rightScratch); + if (Cartesian3_default.equalsEpsilon(right, Cartesian3_default.ZERO, Math_default.EPSILON6)) { + right = Cartesian3_default.clone(Cartesian3_default.UNIT_X, right); + } + const up = Cartesian3_default.cross(right, velocity, upScratch); + Cartesian3_default.normalize(up, up); + Cartesian3_default.cross(velocity, up, right); + Cartesian3_default.negate(right, right); + Cartesian3_default.normalize(right, right); + if (!defined_default(result)) { + result = new Matrix3_default(); + } + result[0] = velocity.x; + result[1] = velocity.y; + result[2] = velocity.z; + result[3] = right.x; + result[4] = right.y; + result[5] = right.z; + result[6] = up.x; + result[7] = up.y; + result[8] = up.z; + return result; }; -var slerpEndNegated = new Quaternion(); -var slerpScaledP = new Quaternion(); -var slerpScaledR = new Quaternion(); -Quaternion.slerp = function(start, end, t, result) { - Check_default.typeOf.object("start", start); - Check_default.typeOf.object("end", end); - Check_default.typeOf.number("t", t); - Check_default.typeOf.object("result", result); - let dot = Quaternion.dot(start, end); - let r = end; - if (dot < 0) { - dot = -dot; - r = slerpEndNegated = Quaternion.negate(end, slerpEndNegated); +var swizzleMatrix = new Matrix4_default( + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 +); +var scratchCartographic = new Cartographic_default(); +var scratchCartesian3Projection = new Cartesian3_default(); +var scratchCenter = new Cartesian3_default(); +var scratchRotation = new Matrix3_default(); +var scratchFromENU = new Matrix4_default(); +var scratchToENU = new Matrix4_default(); +Transforms.basisTo2D = function(projection, matrix, result) { + if (!defined_default(projection)) { + throw new DeveloperError_default("projection is required."); } - if (1 - dot < Math_default.EPSILON6) { - return Quaternion.lerp(start, r, t, result); + if (!defined_default(matrix)) { + throw new DeveloperError_default("matrix is required."); } - const theta = Math.acos(dot); - slerpScaledP = Quaternion.multiplyByScalar( - start, - Math.sin((1 - t) * theta), - slerpScaledP - ); - slerpScaledR = Quaternion.multiplyByScalar( - r, - Math.sin(t * theta), - slerpScaledR - ); - result = Quaternion.add(slerpScaledP, slerpScaledR, result); - return Quaternion.multiplyByScalar(result, 1 / Math.sin(theta), result); -}; -Quaternion.log = function(quaternion, result) { - Check_default.typeOf.object("quaternion", quaternion); - Check_default.typeOf.object("result", result); - const theta = Math_default.acosClamped(quaternion.w); - let thetaOverSinTheta = 0; - if (theta !== 0) { - thetaOverSinTheta = theta / Math.sin(theta); + if (!defined_default(result)) { + throw new DeveloperError_default("result is required."); } - return Cartesian3_default.multiplyByScalar(quaternion, thetaOverSinTheta, result); -}; -Quaternion.exp = function(cartesian, result) { - Check_default.typeOf.object("cartesian", cartesian); - Check_default.typeOf.object("result", result); - const theta = Cartesian3_default.magnitude(cartesian); - let sinThetaOverTheta = 0; - if (theta !== 0) { - sinThetaOverTheta = Math.sin(theta) / theta; + const rtcCenter = Matrix4_default.getTranslation(matrix, scratchCenter); + const ellipsoid = projection.ellipsoid; + let projectedPosition; + if (Cartesian3_default.equals(rtcCenter, Cartesian3_default.ZERO)) { + projectedPosition = Cartesian3_default.clone( + Cartesian3_default.ZERO, + scratchCartesian3Projection + ); + } else { + const cartographic = ellipsoid.cartesianToCartographic( + rtcCenter, + scratchCartographic + ); + projectedPosition = projection.project( + cartographic, + scratchCartesian3Projection + ); + Cartesian3_default.fromElements( + projectedPosition.z, + projectedPosition.x, + projectedPosition.y, + projectedPosition + ); } - result.x = cartesian.x * sinThetaOverTheta; - result.y = cartesian.y * sinThetaOverTheta; - result.z = cartesian.z * sinThetaOverTheta; - result.w = Math.cos(theta); + const fromENU = Transforms.eastNorthUpToFixedFrame( + rtcCenter, + ellipsoid, + scratchFromENU + ); + const toENU = Matrix4_default.inverseTransformation(fromENU, scratchToENU); + const rotation = Matrix4_default.getMatrix3(matrix, scratchRotation); + const local = Matrix4_default.multiplyByMatrix3(toENU, rotation, result); + Matrix4_default.multiply(swizzleMatrix, local, result); + Matrix4_default.setTranslation(result, projectedPosition, result); return result; }; -var squadScratchCartesian0 = new Cartesian3_default(); -var squadScratchCartesian1 = new Cartesian3_default(); -var squadScratchQuaternion0 = new Quaternion(); -var squadScratchQuaternion1 = new Quaternion(); -Quaternion.computeInnerQuadrangle = function(q0, q1, q2, result) { - Check_default.typeOf.object("q0", q0); - Check_default.typeOf.object("q1", q1); - Check_default.typeOf.object("q2", q2); - Check_default.typeOf.object("result", result); - const qInv = Quaternion.conjugate(q1, squadScratchQuaternion0); - Quaternion.multiply(qInv, q2, squadScratchQuaternion1); - const cart0 = Quaternion.log(squadScratchQuaternion1, squadScratchCartesian0); - Quaternion.multiply(qInv, q0, squadScratchQuaternion1); - const cart1 = Quaternion.log(squadScratchQuaternion1, squadScratchCartesian1); - Cartesian3_default.add(cart0, cart1, cart0); - Cartesian3_default.multiplyByScalar(cart0, 0.25, cart0); - Cartesian3_default.negate(cart0, cart0); - Quaternion.exp(cart0, squadScratchQuaternion0); - return Quaternion.multiply(q1, squadScratchQuaternion0, result); -}; -Quaternion.squad = function(q0, q1, s0, s1, t, result) { - Check_default.typeOf.object("q0", q0); - Check_default.typeOf.object("q1", q1); - Check_default.typeOf.object("s0", s0); - Check_default.typeOf.object("s1", s1); - Check_default.typeOf.number("t", t); - Check_default.typeOf.object("result", result); - const slerp0 = Quaternion.slerp(q0, q1, t, squadScratchQuaternion0); - const slerp1 = Quaternion.slerp(s0, s1, t, squadScratchQuaternion1); - return Quaternion.slerp(slerp0, slerp1, 2 * t * (1 - t), result); -}; -var fastSlerpScratchQuaternion = new Quaternion(); -var opmu = 1.9011074535173003; -var u = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : []; -var v = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : []; -var bT = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : []; -var bD = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : []; -for (let i = 0; i < 7; ++i) { - const s = i + 1; - const t = 2 * s + 1; - u[i] = 1 / (s * t); - v[i] = s / t; -} -u[7] = opmu / (8 * 17); -v[7] = opmu * 8 / 17; -Quaternion.fastSlerp = function(start, end, t, result) { - Check_default.typeOf.object("start", start); - Check_default.typeOf.object("end", end); - Check_default.typeOf.number("t", t); - Check_default.typeOf.object("result", result); - let x = Quaternion.dot(start, end); - let sign; - if (x >= 0) { - sign = 1; - } else { - sign = -1; - x = -x; +Transforms.ellipsoidTo2DModelMatrix = function(projection, center, result) { + if (!defined_default(projection)) { + throw new DeveloperError_default("projection is required."); } - const xm1 = x - 1; - const d = 1 - t; - const sqrT = t * t; - const sqrD = d * d; - for (let i = 7; i >= 0; --i) { - bT[i] = (u[i] * sqrT - v[i]) * xm1; - bD[i] = (u[i] * sqrD - v[i]) * xm1; + if (!defined_default(center)) { + throw new DeveloperError_default("center is required."); } - const cT = sign * t * (1 + bT[0] * (1 + bT[1] * (1 + bT[2] * (1 + bT[3] * (1 + bT[4] * (1 + bT[5] * (1 + bT[6] * (1 + bT[7])))))))); - const cD = d * (1 + bD[0] * (1 + bD[1] * (1 + bD[2] * (1 + bD[3] * (1 + bD[4] * (1 + bD[5] * (1 + bD[6] * (1 + bD[7])))))))); - const temp = Quaternion.multiplyByScalar( - start, - cD, - fastSlerpScratchQuaternion + if (!defined_default(result)) { + throw new DeveloperError_default("result is required."); + } + const ellipsoid = projection.ellipsoid; + const fromENU = Transforms.eastNorthUpToFixedFrame( + center, + ellipsoid, + scratchFromENU ); - Quaternion.multiplyByScalar(end, cT, result); - return Quaternion.add(temp, result, result); -}; -Quaternion.fastSquad = function(q0, q1, s0, s1, t, result) { - Check_default.typeOf.object("q0", q0); - Check_default.typeOf.object("q1", q1); - Check_default.typeOf.object("s0", s0); - Check_default.typeOf.object("s1", s1); - Check_default.typeOf.number("t", t); - Check_default.typeOf.object("result", result); - const slerp0 = Quaternion.fastSlerp(q0, q1, t, squadScratchQuaternion0); - const slerp1 = Quaternion.fastSlerp(s0, s1, t, squadScratchQuaternion1); - return Quaternion.fastSlerp(slerp0, slerp1, 2 * t * (1 - t), result); -}; -Quaternion.equals = function(left, right) { - return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.z === right.z && left.w === right.w; -}; -Quaternion.equalsEpsilon = function(left, right, epsilon) { - epsilon = defaultValue_default(epsilon, 0); - return left === right || defined_default(left) && defined_default(right) && Math.abs(left.x - right.x) <= epsilon && Math.abs(left.y - right.y) <= epsilon && Math.abs(left.z - right.z) <= epsilon && Math.abs(left.w - right.w) <= epsilon; -}; -Quaternion.ZERO = Object.freeze(new Quaternion(0, 0, 0, 0)); -Quaternion.IDENTITY = Object.freeze(new Quaternion(0, 0, 0, 1)); -Quaternion.prototype.clone = function(result) { - return Quaternion.clone(this, result); -}; -Quaternion.prototype.equals = function(right) { - return Quaternion.equals(this, right); -}; -Quaternion.prototype.equalsEpsilon = function(right, epsilon) { - return Quaternion.equalsEpsilon(this, right, epsilon); -}; -Quaternion.prototype.toString = function() { - return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`; + const toENU = Matrix4_default.inverseTransformation(fromENU, scratchToENU); + const cartographic = ellipsoid.cartesianToCartographic( + center, + scratchCartographic + ); + const projectedPosition = projection.project( + cartographic, + scratchCartesian3Projection + ); + Cartesian3_default.fromElements( + projectedPosition.z, + projectedPosition.x, + projectedPosition.y, + projectedPosition + ); + const translation = Matrix4_default.fromTranslation( + projectedPosition, + scratchFromENU + ); + Matrix4_default.multiply(swizzleMatrix, toENU, result); + Matrix4_default.multiply(translation, result, result); + return result; }; -var Quaternion_default = Quaternion; +var Transforms_default = Transforms; -// packages/engine/Source/Core/Transforms.js -var Transforms = {}; -var vectorProductLocalFrame = { - 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" +// packages/engine/Source/Core/Rectangle.js +function Rectangle(west, south, east, north) { + this.west = defaultValue_default(west, 0); + this.south = defaultValue_default(south, 0); + this.east = defaultValue_default(east, 0); + this.north = defaultValue_default(north, 0); +} +Object.defineProperties(Rectangle.prototype, { + /** + * Gets the width of the rectangle in radians. + * @memberof Rectangle.prototype + * @type {number} + * @readonly + */ + width: { + get: function() { + return Rectangle.computeWidth(this); + } }, - east: { - up: "south", - down: "north", - north: "up", - south: "down" + /** + * Gets the height of the rectangle in radians. + * @memberof Rectangle.prototype + * @type {number} + * @readonly + */ + height: { + get: function() { + return Rectangle.computeHeight(this); + } } +}); +Rectangle.packedLength = 4; +Rectangle.pack = function(value, array, startingIndex) { + Check_default.typeOf.object("value", value); + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + array[startingIndex++] = value.west; + array[startingIndex++] = value.south; + array[startingIndex++] = value.east; + array[startingIndex] = value.north; + return array; }; -var degeneratePositionLocalFrame = { - north: [-1, 0, 0], - east: [0, 1, 0], - up: [0, 0, 1], - south: [1, 0, 0], - west: [0, -1, 0], - down: [0, 0, -1] -}; -var localFrameToFixedFrameCache = {}; -var scratchCalculateCartesian = { - east: new Cartesian3_default(), - north: new Cartesian3_default(), - up: new Cartesian3_default(), - west: new Cartesian3_default(), - south: new Cartesian3_default(), - down: new Cartesian3_default() +Rectangle.unpack = function(array, startingIndex, result) { + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + if (!defined_default(result)) { + result = new Rectangle(); + } + result.west = array[startingIndex++]; + result.south = array[startingIndex++]; + result.east = array[startingIndex++]; + result.north = array[startingIndex]; + return result; }; -var scratchFirstCartesian = new Cartesian3_default(); -var scratchSecondCartesian = new Cartesian3_default(); -var scratchThirdCartesian = new Cartesian3_default(); -Transforms.localFrameToFixedFrameGenerator = function(firstAxis, secondAxis) { - if (!vectorProductLocalFrame.hasOwnProperty(firstAxis) || !vectorProductLocalFrame[firstAxis].hasOwnProperty(secondAxis)) { - throw new DeveloperError_default( - "firstAxis and secondAxis must be east, north, up, west, south or down." - ); +Rectangle.computeWidth = function(rectangle) { + Check_default.typeOf.object("rectangle", rectangle); + let east = rectangle.east; + const west = rectangle.west; + if (east < west) { + east += Math_default.TWO_PI; } - const thirdAxis = vectorProductLocalFrame[firstAxis][secondAxis]; - let resultat; - const hashAxis = firstAxis + secondAxis; - if (defined_default(localFrameToFixedFrameCache[hashAxis])) { - resultat = localFrameToFixedFrameCache[hashAxis]; - } else { - resultat = function(origin, ellipsoid, result) { - if (!defined_default(origin)) { - throw new DeveloperError_default("origin is required."); - } - if (!defined_default(result)) { - result = new Matrix4_default(); - } - if (Cartesian3_default.equalsEpsilon(origin, Cartesian3_default.ZERO, Math_default.EPSILON14)) { - Cartesian3_default.unpack( - degeneratePositionLocalFrame[firstAxis], - 0, - scratchFirstCartesian - ); - Cartesian3_default.unpack( - degeneratePositionLocalFrame[secondAxis], - 0, - scratchSecondCartesian - ); - Cartesian3_default.unpack( - degeneratePositionLocalFrame[thirdAxis], - 0, - scratchThirdCartesian - ); - } else if (Math_default.equalsEpsilon(origin.x, 0, Math_default.EPSILON14) && Math_default.equalsEpsilon(origin.y, 0, Math_default.EPSILON14)) { - const sign = Math_default.sign(origin.z); - Cartesian3_default.unpack( - degeneratePositionLocalFrame[firstAxis], - 0, - scratchFirstCartesian - ); - if (firstAxis !== "east" && firstAxis !== "west") { - Cartesian3_default.multiplyByScalar( - scratchFirstCartesian, - sign, - scratchFirstCartesian - ); - } - Cartesian3_default.unpack( - degeneratePositionLocalFrame[secondAxis], - 0, - scratchSecondCartesian - ); - if (secondAxis !== "east" && secondAxis !== "west") { - Cartesian3_default.multiplyByScalar( - scratchSecondCartesian, - sign, - scratchSecondCartesian - ); - } - Cartesian3_default.unpack( - degeneratePositionLocalFrame[thirdAxis], - 0, - scratchThirdCartesian - ); - if (thirdAxis !== "east" && thirdAxis !== "west") { - Cartesian3_default.multiplyByScalar( - scratchThirdCartesian, - sign, - scratchThirdCartesian - ); - } - } else { - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); - ellipsoid.geodeticSurfaceNormal(origin, scratchCalculateCartesian.up); - const up = scratchCalculateCartesian.up; - const east = scratchCalculateCartesian.east; - east.x = -origin.y; - east.y = origin.x; - east.z = 0; - Cartesian3_default.normalize(east, scratchCalculateCartesian.east); - Cartesian3_default.cross(up, east, scratchCalculateCartesian.north); - Cartesian3_default.multiplyByScalar( - scratchCalculateCartesian.up, - -1, - scratchCalculateCartesian.down - ); - Cartesian3_default.multiplyByScalar( - scratchCalculateCartesian.east, - -1, - scratchCalculateCartesian.west - ); - Cartesian3_default.multiplyByScalar( - scratchCalculateCartesian.north, - -1, - scratchCalculateCartesian.south - ); - scratchFirstCartesian = scratchCalculateCartesian[firstAxis]; - scratchSecondCartesian = scratchCalculateCartesian[secondAxis]; - scratchThirdCartesian = scratchCalculateCartesian[thirdAxis]; - } - result[0] = scratchFirstCartesian.x; - result[1] = scratchFirstCartesian.y; - result[2] = scratchFirstCartesian.z; - result[3] = 0; - result[4] = scratchSecondCartesian.x; - result[5] = scratchSecondCartesian.y; - result[6] = scratchSecondCartesian.z; - result[7] = 0; - result[8] = scratchThirdCartesian.x; - result[9] = scratchThirdCartesian.y; - result[10] = scratchThirdCartesian.z; - result[11] = 0; - result[12] = origin.x; - result[13] = origin.y; - result[14] = origin.z; - result[15] = 1; - return result; - }; - localFrameToFixedFrameCache[hashAxis] = resultat; + return east - west; +}; +Rectangle.computeHeight = function(rectangle) { + Check_default.typeOf.object("rectangle", rectangle); + return rectangle.north - rectangle.south; +}; +Rectangle.fromDegrees = function(west, south, east, north, result) { + west = Math_default.toRadians(defaultValue_default(west, 0)); + south = Math_default.toRadians(defaultValue_default(south, 0)); + east = Math_default.toRadians(defaultValue_default(east, 0)); + north = Math_default.toRadians(defaultValue_default(north, 0)); + if (!defined_default(result)) { + return new Rectangle(west, south, east, north); } - return resultat; + result.west = west; + result.south = south; + result.east = east; + result.north = north; + return result; }; -Transforms.eastNorthUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator( - "east", - "north" -); -Transforms.northEastDownToFixedFrame = Transforms.localFrameToFixedFrameGenerator( - "north", - "east" -); -Transforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator( - "north", - "up" -); -Transforms.northWestUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator( - "north", - "west" -); -var scratchHPRQuaternion2 = new Quaternion_default(); -var scratchScale = new Cartesian3_default(1, 1, 1); -var scratchHPRMatrix4 = new Matrix4_default(); -Transforms.headingPitchRollToFixedFrame = function(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, result) { - Check_default.typeOf.object("HeadingPitchRoll", headingPitchRoll); - fixedFrameTransform = defaultValue_default( - fixedFrameTransform, - Transforms.eastNorthUpToFixedFrame - ); - const hprQuaternion = Quaternion_default.fromHeadingPitchRoll( - headingPitchRoll, - scratchHPRQuaternion2 - ); - const hprMatrix = Matrix4_default.fromTranslationQuaternionRotationScale( - Cartesian3_default.ZERO, - hprQuaternion, - scratchScale, - scratchHPRMatrix4 - ); - result = fixedFrameTransform(origin, ellipsoid, result); - return Matrix4_default.multiply(result, hprMatrix, result); +Rectangle.fromRadians = function(west, south, east, north, result) { + if (!defined_default(result)) { + return new Rectangle(west, south, east, north); + } + result.west = defaultValue_default(west, 0); + result.south = defaultValue_default(south, 0); + result.east = defaultValue_default(east, 0); + result.north = defaultValue_default(north, 0); + return result; }; -var scratchENUMatrix4 = new Matrix4_default(); -var scratchHPRMatrix3 = new Matrix3_default(); -Transforms.headingPitchRollQuaternion = function(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, result) { - Check_default.typeOf.object("HeadingPitchRoll", headingPitchRoll); - const transform = Transforms.headingPitchRollToFixedFrame( - origin, - headingPitchRoll, - ellipsoid, - fixedFrameTransform, - scratchENUMatrix4 - ); - const rotation = Matrix4_default.getMatrix3(transform, scratchHPRMatrix3); - return Quaternion_default.fromRotationMatrix(rotation, result); +Rectangle.fromCartographicArray = function(cartographics, result) { + Check_default.defined("cartographics", cartographics); + let west = Number.MAX_VALUE; + let east = -Number.MAX_VALUE; + let westOverIDL = Number.MAX_VALUE; + let eastOverIDL = -Number.MAX_VALUE; + let south = Number.MAX_VALUE; + let north = -Number.MAX_VALUE; + for (let i = 0, len = cartographics.length; i < len; i++) { + const position = cartographics[i]; + west = Math.min(west, position.longitude); + east = Math.max(east, position.longitude); + south = Math.min(south, position.latitude); + north = Math.max(north, position.latitude); + const lonAdjusted = position.longitude >= 0 ? position.longitude : position.longitude + Math_default.TWO_PI; + westOverIDL = Math.min(westOverIDL, lonAdjusted); + eastOverIDL = Math.max(eastOverIDL, lonAdjusted); + } + if (east - west > eastOverIDL - westOverIDL) { + west = westOverIDL; + east = eastOverIDL; + if (east > Math_default.PI) { + east = east - Math_default.TWO_PI; + } + if (west > Math_default.PI) { + west = west - Math_default.TWO_PI; + } + } + if (!defined_default(result)) { + return new Rectangle(west, south, east, north); + } + result.west = west; + result.south = south; + result.east = east; + result.north = north; + return result; }; -var noScale = new Cartesian3_default(1, 1, 1); -var hprCenterScratch = new Cartesian3_default(); -var ffScratch = new Matrix4_default(); -var hprTransformScratch = new Matrix4_default(); -var hprRotationScratch = new Matrix3_default(); -var hprQuaternionScratch = new Quaternion_default(); -Transforms.fixedFrameToHeadingPitchRoll = function(transform, ellipsoid, fixedFrameTransform, result) { - Check_default.defined("transform", transform); - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); - fixedFrameTransform = defaultValue_default( - fixedFrameTransform, - Transforms.eastNorthUpToFixedFrame - ); +Rectangle.fromCartesianArray = function(cartesians, ellipsoid, result) { + Check_default.defined("cartesians", cartesians); + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); + let west = Number.MAX_VALUE; + let east = -Number.MAX_VALUE; + let westOverIDL = Number.MAX_VALUE; + let eastOverIDL = -Number.MAX_VALUE; + let south = Number.MAX_VALUE; + let north = -Number.MAX_VALUE; + for (let i = 0, len = cartesians.length; i < len; i++) { + const position = ellipsoid.cartesianToCartographic(cartesians[i]); + west = Math.min(west, position.longitude); + east = Math.max(east, position.longitude); + south = Math.min(south, position.latitude); + north = Math.max(north, position.latitude); + const lonAdjusted = position.longitude >= 0 ? position.longitude : position.longitude + Math_default.TWO_PI; + westOverIDL = Math.min(westOverIDL, lonAdjusted); + eastOverIDL = Math.max(eastOverIDL, lonAdjusted); + } + if (east - west > eastOverIDL - westOverIDL) { + west = westOverIDL; + east = eastOverIDL; + if (east > Math_default.PI) { + east = east - Math_default.TWO_PI; + } + if (west > Math_default.PI) { + west = west - Math_default.TWO_PI; + } + } if (!defined_default(result)) { - result = new HeadingPitchRoll_default(); + return new Rectangle(west, south, east, north); } - const center = Matrix4_default.getTranslation(transform, hprCenterScratch); - if (Cartesian3_default.equals(center, Cartesian3_default.ZERO)) { - result.heading = 0; - result.pitch = 0; - result.roll = 0; - return result; + result.west = west; + result.south = south; + result.east = east; + result.north = north; + return result; +}; +var fromBoundingSphereMatrixScratch = new Cartesian3_default(); +var fromBoundingSphereEastScratch = new Cartesian3_default(); +var fromBoundingSphereNorthScratch = new Cartesian3_default(); +var fromBoundingSphereWestScratch = new Cartesian3_default(); +var fromBoundingSphereSouthScratch = new Cartesian3_default(); +var fromBoundingSpherePositionsScratch = new Array(5); +for (let n = 0; n < fromBoundingSpherePositionsScratch.length; ++n) { + fromBoundingSpherePositionsScratch[n] = new Cartesian3_default(); +} +Rectangle.fromBoundingSphere = function(boundingSphere, ellipsoid, result) { + Check_default.typeOf.object("boundingSphere", boundingSphere); + const center = boundingSphere.center; + const radius = boundingSphere.radius; + if (!defined_default(ellipsoid)) { + ellipsoid = Ellipsoid_default.default; } - let toFixedFrame = Matrix4_default.inverseTransformation( - fixedFrameTransform(center, ellipsoid, ffScratch), - ffScratch - ); - let transformCopy = Matrix4_default.setScale(transform, noScale, hprTransformScratch); - transformCopy = Matrix4_default.setTranslation( - transformCopy, - Cartesian3_default.ZERO, - transformCopy + if (!defined_default(result)) { + result = new Rectangle(); + } + if (Cartesian3_default.equals(center, Cartesian3_default.ZERO)) { + Rectangle.clone(Rectangle.MAX_VALUE, result); + return result; + } + const fromENU = Transforms_default.eastNorthUpToFixedFrame( + center, + ellipsoid, + fromBoundingSphereMatrixScratch ); - toFixedFrame = Matrix4_default.multiply(toFixedFrame, transformCopy, toFixedFrame); - let quaternionRotation = Quaternion_default.fromRotationMatrix( - Matrix4_default.getMatrix3(toFixedFrame, hprRotationScratch), - hprQuaternionScratch + const east = Matrix4_default.multiplyByPointAsVector( + fromENU, + Cartesian3_default.UNIT_X, + fromBoundingSphereEastScratch ); - quaternionRotation = Quaternion_default.normalize( - quaternionRotation, - quaternionRotation + Cartesian3_default.normalize(east, east); + const north = Matrix4_default.multiplyByPointAsVector( + fromENU, + Cartesian3_default.UNIT_Y, + fromBoundingSphereNorthScratch ); - return HeadingPitchRoll_default.fromQuaternion(quaternionRotation, result); + Cartesian3_default.normalize(north, north); + Cartesian3_default.multiplyByScalar(north, radius, north); + Cartesian3_default.multiplyByScalar(east, radius, east); + const south = Cartesian3_default.negate(north, fromBoundingSphereSouthScratch); + const west = Cartesian3_default.negate(east, fromBoundingSphereWestScratch); + const positions = fromBoundingSpherePositionsScratch; + let corner = positions[0]; + Cartesian3_default.add(center, north, corner); + corner = positions[1]; + Cartesian3_default.add(center, west, corner); + corner = positions[2]; + Cartesian3_default.add(center, south, corner); + corner = positions[3]; + Cartesian3_default.add(center, east, corner); + positions[4] = center; + return Rectangle.fromCartesianArray(positions, ellipsoid, result); }; -var gmstConstant0 = 6 * 3600 + 41 * 60 + 50.54841; -var gmstConstant1 = 8640184812866e-6; -var gmstConstant2 = 0.093104; -var gmstConstant3 = -62e-7; -var rateCoef = 11772758384668e-32; -var wgs84WRPrecessing = 72921158553e-15; -var twoPiOverSecondsInDay = Math_default.TWO_PI / 86400; -var dateInUtc = new JulianDate_default(); -Transforms.computeTemeToPseudoFixedMatrix = function(date, result) { - if (!defined_default(date)) { - throw new DeveloperError_default("date is required."); - } - dateInUtc = JulianDate_default.addSeconds( - date, - -JulianDate_default.computeTaiMinusUtc(date), - dateInUtc - ); - const utcDayNumber = dateInUtc.dayNumber; - const utcSecondsIntoDay = dateInUtc.secondsOfDay; - let t; - const diffDays = utcDayNumber - 2451545; - if (utcSecondsIntoDay >= 43200) { - t = (diffDays + 0.5) / TimeConstants_default.DAYS_PER_JULIAN_CENTURY; - } else { - t = (diffDays - 0.5) / TimeConstants_default.DAYS_PER_JULIAN_CENTURY; +Rectangle.clone = function(rectangle, result) { + if (!defined_default(rectangle)) { + return void 0; } - const gmst0 = gmstConstant0 + t * (gmstConstant1 + t * (gmstConstant2 + t * gmstConstant3)); - const angle = gmst0 * twoPiOverSecondsInDay % Math_default.TWO_PI; - const ratio = wgs84WRPrecessing + rateCoef * (utcDayNumber - 24515455e-1); - const secondsSinceMidnight = (utcSecondsIntoDay + TimeConstants_default.SECONDS_PER_DAY * 0.5) % TimeConstants_default.SECONDS_PER_DAY; - const gha = angle + ratio * secondsSinceMidnight; - const cosGha = Math.cos(gha); - const sinGha = Math.sin(gha); if (!defined_default(result)) { - return new Matrix3_default( - cosGha, - sinGha, - 0, - -sinGha, - cosGha, - 0, - 0, - 0, - 1 + return new Rectangle( + rectangle.west, + rectangle.south, + rectangle.east, + rectangle.north ); } - result[0] = cosGha; - result[1] = -sinGha; - result[2] = 0; - result[3] = sinGha; - result[4] = cosGha; - result[5] = 0; - result[6] = 0; - result[7] = 0; - result[8] = 1; + result.west = rectangle.west; + result.south = rectangle.south; + result.east = rectangle.east; + result.north = rectangle.north; return result; }; -Transforms.iau2006XysData = new Iau2006XysData_default(); -Transforms.earthOrientationParameters = EarthOrientationParameters_default.NONE; -var ttMinusTai = 32.184; -var j2000ttDays = 2451545; -Transforms.preloadIcrfFixed = function(timeInterval) { - const startDayTT = timeInterval.start.dayNumber; - const startSecondTT = timeInterval.start.secondsOfDay + ttMinusTai; - const stopDayTT = timeInterval.stop.dayNumber; - const stopSecondTT = timeInterval.stop.secondsOfDay + ttMinusTai; - return Transforms.iau2006XysData.preload( - startDayTT, - startSecondTT, - stopDayTT, - stopSecondTT +Rectangle.equalsEpsilon = function(left, right, absoluteEpsilon) { + absoluteEpsilon = defaultValue_default(absoluteEpsilon, 0); + return left === right || defined_default(left) && defined_default(right) && Math.abs(left.west - right.west) <= absoluteEpsilon && Math.abs(left.south - right.south) <= absoluteEpsilon && Math.abs(left.east - right.east) <= absoluteEpsilon && Math.abs(left.north - right.north) <= absoluteEpsilon; +}; +Rectangle.prototype.clone = function(result) { + return Rectangle.clone(this, result); +}; +Rectangle.prototype.equals = function(other) { + return Rectangle.equals(this, other); +}; +Rectangle.equals = function(left, right) { + return left === right || defined_default(left) && defined_default(right) && left.west === right.west && left.south === right.south && left.east === right.east && left.north === right.north; +}; +Rectangle.prototype.equalsEpsilon = function(other, epsilon) { + return Rectangle.equalsEpsilon(this, other, epsilon); +}; +Rectangle.validate = function(rectangle) { + Check_default.typeOf.object("rectangle", rectangle); + const north = rectangle.north; + Check_default.typeOf.number.greaterThanOrEquals( + "north", + north, + -Math_default.PI_OVER_TWO ); + Check_default.typeOf.number.lessThanOrEquals("north", north, Math_default.PI_OVER_TWO); + const south = rectangle.south; + Check_default.typeOf.number.greaterThanOrEquals( + "south", + south, + -Math_default.PI_OVER_TWO + ); + Check_default.typeOf.number.lessThanOrEquals("south", south, Math_default.PI_OVER_TWO); + const west = rectangle.west; + Check_default.typeOf.number.greaterThanOrEquals("west", west, -Math.PI); + Check_default.typeOf.number.lessThanOrEquals("west", west, Math.PI); + const east = rectangle.east; + Check_default.typeOf.number.greaterThanOrEquals("east", east, -Math.PI); + Check_default.typeOf.number.lessThanOrEquals("east", east, Math.PI); +}; +Rectangle.southwest = function(rectangle, result) { + Check_default.typeOf.object("rectangle", rectangle); + if (!defined_default(result)) { + return new Cartographic_default(rectangle.west, rectangle.south); + } + result.longitude = rectangle.west; + result.latitude = rectangle.south; + result.height = 0; + return result; }; -Transforms.computeIcrfToFixedMatrix = function(date, result) { - if (!defined_default(date)) { - throw new DeveloperError_default("date is required."); +Rectangle.northwest = function(rectangle, result) { + Check_default.typeOf.object("rectangle", rectangle); + if (!defined_default(result)) { + return new Cartographic_default(rectangle.west, rectangle.north); } + result.longitude = rectangle.west; + result.latitude = rectangle.north; + result.height = 0; + return result; +}; +Rectangle.northeast = function(rectangle, result) { + Check_default.typeOf.object("rectangle", rectangle); if (!defined_default(result)) { - result = new Matrix3_default(); + return new Cartographic_default(rectangle.east, rectangle.north); } - const fixedToIcrfMtx = Transforms.computeFixedToIcrfMatrix(date, result); - if (!defined_default(fixedToIcrfMtx)) { - return void 0; + result.longitude = rectangle.east; + result.latitude = rectangle.north; + result.height = 0; + return result; +}; +Rectangle.southeast = function(rectangle, result) { + Check_default.typeOf.object("rectangle", rectangle); + if (!defined_default(result)) { + return new Cartographic_default(rectangle.east, rectangle.south); } - return Matrix3_default.transpose(fixedToIcrfMtx, result); + result.longitude = rectangle.east; + result.latitude = rectangle.south; + result.height = 0; + return result; }; -var xysScratch = new Iau2006XysSample_default(0, 0, 0); -var eopScratch = new EarthOrientationParametersSample_default( - 0, - 0, - 0, - 0, - 0, - 0 -); -var rotation1Scratch = new Matrix3_default(); -var rotation2Scratch = new Matrix3_default(); -Transforms.computeFixedToIcrfMatrix = function(date, result) { - if (!defined_default(date)) { - throw new DeveloperError_default("date is required."); +Rectangle.center = function(rectangle, result) { + Check_default.typeOf.object("rectangle", rectangle); + let east = rectangle.east; + const west = rectangle.west; + if (east < west) { + east += Math_default.TWO_PI; } + const longitude = Math_default.negativePiToPi((west + east) * 0.5); + const latitude = (rectangle.south + rectangle.north) * 0.5; if (!defined_default(result)) { - result = new Matrix3_default(); + return new Cartographic_default(longitude, latitude); } - const eop = Transforms.earthOrientationParameters.compute(date, eopScratch); - if (!defined_default(eop)) { + result.longitude = longitude; + result.latitude = latitude; + result.height = 0; + return result; +}; +Rectangle.intersection = function(rectangle, otherRectangle, result) { + Check_default.typeOf.object("rectangle", rectangle); + Check_default.typeOf.object("otherRectangle", otherRectangle); + let rectangleEast = rectangle.east; + let rectangleWest = rectangle.west; + let otherRectangleEast = otherRectangle.east; + let otherRectangleWest = otherRectangle.west; + if (rectangleEast < rectangleWest && otherRectangleEast > 0) { + rectangleEast += Math_default.TWO_PI; + } else if (otherRectangleEast < otherRectangleWest && rectangleEast > 0) { + otherRectangleEast += Math_default.TWO_PI; + } + if (rectangleEast < rectangleWest && otherRectangleWest < 0) { + otherRectangleWest += Math_default.TWO_PI; + } else if (otherRectangleEast < otherRectangleWest && rectangleWest < 0) { + rectangleWest += Math_default.TWO_PI; + } + const west = Math_default.negativePiToPi( + Math.max(rectangleWest, otherRectangleWest) + ); + const east = Math_default.negativePiToPi( + Math.min(rectangleEast, otherRectangleEast) + ); + if ((rectangle.west < rectangle.east || otherRectangle.west < otherRectangle.east) && east <= west) { return void 0; } - const dayTT = date.dayNumber; - const secondTT = date.secondsOfDay + ttMinusTai; - const xys = Transforms.iau2006XysData.computeXysRadians( - dayTT, - secondTT, - xysScratch - ); - if (!defined_default(xys)) { + const south = Math.max(rectangle.south, otherRectangle.south); + const north = Math.min(rectangle.north, otherRectangle.north); + if (south >= north) { return void 0; } - const x = xys.x + eop.xPoleOffset; - const y = xys.y + eop.yPoleOffset; - const a3 = 1 / (1 + Math.sqrt(1 - x * x - y * y)); - const rotation1 = rotation1Scratch; - rotation1[0] = 1 - a3 * x * x; - rotation1[3] = -a3 * x * y; - rotation1[6] = x; - rotation1[1] = -a3 * x * y; - rotation1[4] = 1 - a3 * y * y; - rotation1[7] = y; - rotation1[2] = -x; - rotation1[5] = -y; - rotation1[8] = 1 - a3 * (x * x + y * y); - const rotation2 = Matrix3_default.fromRotationZ(-xys.s, rotation2Scratch); - const matrixQ = Matrix3_default.multiply(rotation1, rotation2, rotation1Scratch); - const dateUt1day = date.dayNumber; - const dateUt1sec = date.secondsOfDay - JulianDate_default.computeTaiMinusUtc(date) + eop.ut1MinusUtc; - const daysSinceJ2000 = dateUt1day - 2451545; - const fractionOfDay = dateUt1sec / TimeConstants_default.SECONDS_PER_DAY; - let era = 0.779057273264 + fractionOfDay + 0.00273781191135448 * (daysSinceJ2000 + fractionOfDay); - era = era % 1 * Math_default.TWO_PI; - const earthRotation = Matrix3_default.fromRotationZ(era, rotation2Scratch); - const pfToIcrf = Matrix3_default.multiply(matrixQ, earthRotation, rotation1Scratch); - const cosxp = Math.cos(eop.xPoleWander); - const cosyp = Math.cos(eop.yPoleWander); - const sinxp = Math.sin(eop.xPoleWander); - const sinyp = Math.sin(eop.yPoleWander); - let ttt = dayTT - j2000ttDays + secondTT / TimeConstants_default.SECONDS_PER_DAY; - ttt /= 36525; - const sp = -47e-6 * ttt * Math_default.RADIANS_PER_DEGREE / 3600; - const cossp = Math.cos(sp); - const sinsp = Math.sin(sp); - const fToPfMtx = rotation2Scratch; - fToPfMtx[0] = cosxp * cossp; - fToPfMtx[1] = cosxp * sinsp; - fToPfMtx[2] = sinxp; - fToPfMtx[3] = -cosyp * sinsp + sinyp * sinxp * cossp; - fToPfMtx[4] = cosyp * cossp + sinyp * sinxp * sinsp; - fToPfMtx[5] = -sinyp * cosxp; - fToPfMtx[6] = -sinyp * sinsp - cosyp * sinxp * cossp; - fToPfMtx[7] = sinyp * cossp - cosyp * sinxp * sinsp; - fToPfMtx[8] = cosyp * cosxp; - return Matrix3_default.multiply(pfToIcrf, fToPfMtx, result); + if (!defined_default(result)) { + return new Rectangle(west, south, east, north); + } + result.west = west; + result.south = south; + result.east = east; + result.north = north; + return result; }; -var pointToWindowCoordinatesTemp = new Cartesian4_default(); -Transforms.pointToWindowCoordinates = function(modelViewProjectionMatrix, viewportTransformation, point, result) { - result = Transforms.pointToGLWindowCoordinates( - modelViewProjectionMatrix, - viewportTransformation, - point, - result +Rectangle.simpleIntersection = function(rectangle, otherRectangle, result) { + Check_default.typeOf.object("rectangle", rectangle); + Check_default.typeOf.object("otherRectangle", otherRectangle); + const west = Math.max(rectangle.west, otherRectangle.west); + const south = Math.max(rectangle.south, otherRectangle.south); + const east = Math.min(rectangle.east, otherRectangle.east); + const north = Math.min(rectangle.north, otherRectangle.north); + if (south >= north || west >= east) { + return void 0; + } + if (!defined_default(result)) { + return new Rectangle(west, south, east, north); + } + result.west = west; + result.south = south; + result.east = east; + result.north = north; + return result; +}; +Rectangle.union = function(rectangle, otherRectangle, result) { + Check_default.typeOf.object("rectangle", rectangle); + Check_default.typeOf.object("otherRectangle", otherRectangle); + if (!defined_default(result)) { + result = new Rectangle(); + } + let rectangleEast = rectangle.east; + let rectangleWest = rectangle.west; + let otherRectangleEast = otherRectangle.east; + let otherRectangleWest = otherRectangle.west; + if (rectangleEast < rectangleWest && otherRectangleEast > 0) { + rectangleEast += Math_default.TWO_PI; + } else if (otherRectangleEast < otherRectangleWest && rectangleEast > 0) { + otherRectangleEast += Math_default.TWO_PI; + } + if (rectangleEast < rectangleWest && otherRectangleWest < 0) { + otherRectangleWest += Math_default.TWO_PI; + } else if (otherRectangleEast < otherRectangleWest && rectangleWest < 0) { + rectangleWest += Math_default.TWO_PI; + } + const west = Math_default.negativePiToPi( + Math.min(rectangleWest, otherRectangleWest) ); - result.y = 2 * viewportTransformation[5] - result.y; + const east = Math_default.negativePiToPi( + Math.max(rectangleEast, otherRectangleEast) + ); + result.west = west; + result.south = Math.min(rectangle.south, otherRectangle.south); + result.east = east; + result.north = Math.max(rectangle.north, otherRectangle.north); return result; }; -Transforms.pointToGLWindowCoordinates = function(modelViewProjectionMatrix, viewportTransformation, point, result) { - if (!defined_default(modelViewProjectionMatrix)) { - throw new DeveloperError_default("modelViewProjectionMatrix is required."); +Rectangle.expand = function(rectangle, cartographic, result) { + Check_default.typeOf.object("rectangle", rectangle); + Check_default.typeOf.object("cartographic", cartographic); + if (!defined_default(result)) { + result = new Rectangle(); } - if (!defined_default(viewportTransformation)) { - throw new DeveloperError_default("viewportTransformation is required."); + result.west = Math.min(rectangle.west, cartographic.longitude); + result.south = Math.min(rectangle.south, cartographic.latitude); + result.east = Math.max(rectangle.east, cartographic.longitude); + result.north = Math.max(rectangle.north, cartographic.latitude); + return result; +}; +Rectangle.contains = function(rectangle, cartographic) { + Check_default.typeOf.object("rectangle", rectangle); + Check_default.typeOf.object("cartographic", cartographic); + let longitude = cartographic.longitude; + const latitude = cartographic.latitude; + const west = rectangle.west; + let east = rectangle.east; + if (east < west) { + east += Math_default.TWO_PI; + if (longitude < 0) { + longitude += Math_default.TWO_PI; + } + } + return (longitude > west || Math_default.equalsEpsilon(longitude, west, Math_default.EPSILON14)) && (longitude < east || Math_default.equalsEpsilon(longitude, east, Math_default.EPSILON14)) && latitude >= rectangle.south && latitude <= rectangle.north; +}; +var subsampleLlaScratch = new Cartographic_default(); +Rectangle.subsample = function(rectangle, ellipsoid, surfaceHeight, result) { + Check_default.typeOf.object("rectangle", rectangle); + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); + surfaceHeight = defaultValue_default(surfaceHeight, 0); + if (!defined_default(result)) { + result = []; + } + let length = 0; + const north = rectangle.north; + const south = rectangle.south; + const east = rectangle.east; + const west = rectangle.west; + const lla = subsampleLlaScratch; + lla.height = surfaceHeight; + lla.longitude = west; + lla.latitude = north; + result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); + length++; + lla.longitude = east; + result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); + length++; + lla.latitude = south; + result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); + length++; + lla.longitude = west; + result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); + length++; + if (north < 0) { + lla.latitude = north; + } else if (south > 0) { + lla.latitude = south; + } else { + lla.latitude = 0; } - if (!defined_default(point)) { - throw new DeveloperError_default("point is required."); + for (let i = 1; i < 8; ++i) { + lla.longitude = -Math.PI + i * Math_default.PI_OVER_TWO; + if (Rectangle.contains(rectangle, lla)) { + result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); + length++; + } + } + if (lla.latitude === 0) { + lla.longitude = west; + result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); + length++; + lla.longitude = east; + result[length] = ellipsoid.cartographicToCartesian(lla, result[length]); + length++; + } + result.length = length; + return result; +}; +Rectangle.subsection = function(rectangle, westLerp, southLerp, eastLerp, northLerp, result) { + Check_default.typeOf.object("rectangle", rectangle); + Check_default.typeOf.number.greaterThanOrEquals("westLerp", westLerp, 0); + Check_default.typeOf.number.lessThanOrEquals("westLerp", westLerp, 1); + Check_default.typeOf.number.greaterThanOrEquals("southLerp", southLerp, 0); + Check_default.typeOf.number.lessThanOrEquals("southLerp", southLerp, 1); + Check_default.typeOf.number.greaterThanOrEquals("eastLerp", eastLerp, 0); + Check_default.typeOf.number.lessThanOrEquals("eastLerp", eastLerp, 1); + Check_default.typeOf.number.greaterThanOrEquals("northLerp", northLerp, 0); + Check_default.typeOf.number.lessThanOrEquals("northLerp", northLerp, 1); + Check_default.typeOf.number.lessThanOrEquals("westLerp", westLerp, eastLerp); + Check_default.typeOf.number.lessThanOrEquals("southLerp", southLerp, northLerp); + if (!defined_default(result)) { + result = new Rectangle(); + } + if (rectangle.west <= rectangle.east) { + const width = rectangle.east - rectangle.west; + result.west = rectangle.west + westLerp * width; + result.east = rectangle.west + eastLerp * width; + } else { + const width = Math_default.TWO_PI + rectangle.east - rectangle.west; + result.west = Math_default.negativePiToPi(rectangle.west + westLerp * width); + result.east = Math_default.negativePiToPi(rectangle.west + eastLerp * width); + } + const height = rectangle.north - rectangle.south; + result.south = rectangle.south + southLerp * height; + result.north = rectangle.south + northLerp * height; + if (westLerp === 1) { + result.west = rectangle.east; + } + if (eastLerp === 1) { + result.east = rectangle.east; + } + if (southLerp === 1) { + result.south = rectangle.north; } + if (northLerp === 1) { + result.north = rectangle.north; + } + return result; +}; +Rectangle.MAX_VALUE = Object.freeze( + new Rectangle( + -Math.PI, + -Math_default.PI_OVER_TWO, + Math.PI, + Math_default.PI_OVER_TWO + ) +); +var Rectangle_default = Rectangle; + +// packages/engine/Source/Core/Matrix2.js +function Matrix2(column0Row0, column1Row0, column0Row1, column1Row1) { + this[0] = defaultValue_default(column0Row0, 0); + this[1] = defaultValue_default(column0Row1, 0); + this[2] = defaultValue_default(column1Row0, 0); + this[3] = defaultValue_default(column1Row1, 0); +} +Matrix2.packedLength = 4; +Matrix2.pack = function(value, array, startingIndex) { + Check_default.typeOf.object("value", value); + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + array[startingIndex++] = value[0]; + array[startingIndex++] = value[1]; + array[startingIndex++] = value[2]; + array[startingIndex++] = value[3]; + return array; +}; +Matrix2.unpack = function(array, startingIndex, result) { + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); if (!defined_default(result)) { - result = new Cartesian2_default(); + result = new Matrix2(); } - const tmp = pointToWindowCoordinatesTemp; - Matrix4_default.multiplyByVector( - modelViewProjectionMatrix, - Cartesian4_default.fromElements(point.x, point.y, point.z, 1, tmp), - tmp - ); - Cartesian4_default.multiplyByScalar(tmp, 1 / tmp.w, tmp); - Matrix4_default.multiplyByVector(viewportTransformation, tmp, tmp); - return Cartesian2_default.fromCartesian4(tmp, result); + result[0] = array[startingIndex++]; + result[1] = array[startingIndex++]; + result[2] = array[startingIndex++]; + result[3] = array[startingIndex++]; + return result; }; -var normalScratch = new Cartesian3_default(); -var rightScratch = new Cartesian3_default(); -var upScratch = new Cartesian3_default(); -Transforms.rotationMatrixFromPositionVelocity = function(position, velocity, ellipsoid, result) { - if (!defined_default(position)) { - throw new DeveloperError_default("position is required."); +Matrix2.packArray = function(array, result) { + Check_default.defined("array", array); + const length = array.length; + const resultLength = length * 4; + if (!defined_default(result)) { + result = new Array(resultLength); + } else if (!Array.isArray(result) && result.length !== resultLength) { + throw new DeveloperError_default( + "If result is a typed array, it must have exactly array.length * 4 elements" + ); + } else if (result.length !== resultLength) { + result.length = resultLength; } - if (!defined_default(velocity)) { - throw new DeveloperError_default("velocity is required."); + for (let i = 0; i < length; ++i) { + Matrix2.pack(array[i], result, i * 4); } - const normal = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84).geodeticSurfaceNormal( - position, - normalScratch - ); - let right = Cartesian3_default.cross(velocity, normal, rightScratch); - if (Cartesian3_default.equalsEpsilon(right, Cartesian3_default.ZERO, Math_default.EPSILON6)) { - right = Cartesian3_default.clone(Cartesian3_default.UNIT_X, right); + return result; +}; +Matrix2.unpackArray = function(array, result) { + Check_default.defined("array", array); + Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 4); + if (array.length % 4 !== 0) { + throw new DeveloperError_default("array length must be a multiple of 4."); } - const up = Cartesian3_default.cross(right, velocity, upScratch); - Cartesian3_default.normalize(up, up); - Cartesian3_default.cross(velocity, up, right); - Cartesian3_default.negate(right, right); - Cartesian3_default.normalize(right, right); + const length = array.length; if (!defined_default(result)) { - result = new Matrix3_default(); + result = new Array(length / 4); + } else { + result.length = length / 4; + } + for (let i = 0; i < length; i += 4) { + const index = i / 4; + result[index] = Matrix2.unpack(array, i, result[index]); } - result[0] = velocity.x; - result[1] = velocity.y; - result[2] = velocity.z; - result[3] = right.x; - result[4] = right.y; - result[5] = right.z; - result[6] = up.x; - result[7] = up.y; - result[8] = up.z; return result; }; -var swizzleMatrix = new Matrix4_default( - 0, - 0, - 1, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 1 -); -var scratchCartographic = new Cartographic_default(); -var scratchCartesian3Projection = new Cartesian3_default(); -var scratchCenter = new Cartesian3_default(); -var scratchRotation = new Matrix3_default(); -var scratchFromENU = new Matrix4_default(); -var scratchToENU = new Matrix4_default(); -Transforms.basisTo2D = function(projection, matrix, result) { - if (!defined_default(projection)) { - throw new DeveloperError_default("projection is required."); - } +Matrix2.clone = function(matrix, result) { if (!defined_default(matrix)) { - throw new DeveloperError_default("matrix is required."); + return void 0; } if (!defined_default(result)) { - throw new DeveloperError_default("result is required."); + return new Matrix2(matrix[0], matrix[2], matrix[1], matrix[3]); } - const rtcCenter = Matrix4_default.getTranslation(matrix, scratchCenter); - const ellipsoid = projection.ellipsoid; - const cartographic = ellipsoid.cartesianToCartographic( - rtcCenter, - scratchCartographic - ); - const projectedPosition = projection.project( - cartographic, - scratchCartesian3Projection - ); - Cartesian3_default.fromElements( - projectedPosition.z, - projectedPosition.x, - projectedPosition.y, - projectedPosition - ); - const fromENU = Transforms.eastNorthUpToFixedFrame( - rtcCenter, - ellipsoid, - scratchFromENU - ); - const toENU = Matrix4_default.inverseTransformation(fromENU, scratchToENU); - const rotation = Matrix4_default.getMatrix3(matrix, scratchRotation); - const local = Matrix4_default.multiplyByMatrix3(toENU, rotation, result); - Matrix4_default.multiply(swizzleMatrix, local, result); - Matrix4_default.setTranslation(result, projectedPosition, result); + result[0] = matrix[0]; + result[1] = matrix[1]; + result[2] = matrix[2]; + result[3] = matrix[3]; return result; }; -Transforms.wgs84To2DModelMatrix = function(projection, center, result) { - if (!defined_default(projection)) { - throw new DeveloperError_default("projection is required."); +Matrix2.fromArray = Matrix2.unpack; +Matrix2.fromColumnMajorArray = function(values, result) { + Check_default.defined("values", values); + return Matrix2.clone(values, result); +}; +Matrix2.fromRowMajorArray = function(values, result) { + Check_default.defined("values", values); + if (!defined_default(result)) { + return new Matrix2(values[0], values[1], values[2], values[3]); } - if (!defined_default(center)) { - throw new DeveloperError_default("center is required."); + result[0] = values[0]; + result[1] = values[2]; + result[2] = values[1]; + result[3] = values[3]; + return result; +}; +Matrix2.fromScale = function(scale, result) { + Check_default.typeOf.object("scale", scale); + if (!defined_default(result)) { + return new Matrix2(scale.x, 0, 0, scale.y); } + result[0] = scale.x; + result[1] = 0; + result[2] = 0; + result[3] = scale.y; + return result; +}; +Matrix2.fromUniformScale = function(scale, result) { + Check_default.typeOf.number("scale", scale); if (!defined_default(result)) { - throw new DeveloperError_default("result is required."); + return new Matrix2(scale, 0, 0, scale); } - const ellipsoid = projection.ellipsoid; - const fromENU = Transforms.eastNorthUpToFixedFrame( - center, - ellipsoid, - scratchFromENU - ); - const toENU = Matrix4_default.inverseTransformation(fromENU, scratchToENU); - const cartographic = ellipsoid.cartesianToCartographic( - center, - scratchCartographic - ); - const projectedPosition = projection.project( - cartographic, - scratchCartesian3Projection - ); - Cartesian3_default.fromElements( - projectedPosition.z, - projectedPosition.x, - projectedPosition.y, - projectedPosition + result[0] = scale; + result[1] = 0; + result[2] = 0; + result[3] = scale; + return result; +}; +Matrix2.fromRotation = function(angle, result) { + Check_default.typeOf.number("angle", angle); + const cosAngle = Math.cos(angle); + const sinAngle = Math.sin(angle); + if (!defined_default(result)) { + return new Matrix2(cosAngle, -sinAngle, sinAngle, cosAngle); + } + result[0] = cosAngle; + result[1] = sinAngle; + result[2] = -sinAngle; + result[3] = cosAngle; + return result; +}; +Matrix2.toArray = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + if (!defined_default(result)) { + return [matrix[0], matrix[1], matrix[2], matrix[3]]; + } + result[0] = matrix[0]; + result[1] = matrix[1]; + result[2] = matrix[2]; + result[3] = matrix[3]; + return result; +}; +Matrix2.getElementIndex = function(column, row) { + Check_default.typeOf.number.greaterThanOrEquals("row", row, 0); + Check_default.typeOf.number.lessThanOrEquals("row", row, 1); + Check_default.typeOf.number.greaterThanOrEquals("column", column, 0); + Check_default.typeOf.number.lessThanOrEquals("column", column, 1); + return column * 2 + row; +}; +Matrix2.getColumn = function(matrix, index, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); + Check_default.typeOf.number.lessThanOrEquals("index", index, 1); + Check_default.typeOf.object("result", result); + const startIndex = index * 2; + const x = matrix[startIndex]; + const y = matrix[startIndex + 1]; + result.x = x; + result.y = y; + return result; +}; +Matrix2.setColumn = function(matrix, index, cartesian, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); + Check_default.typeOf.number.lessThanOrEquals("index", index, 1); + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + result = Matrix2.clone(matrix, result); + const startIndex = index * 2; + result[startIndex] = cartesian.x; + result[startIndex + 1] = cartesian.y; + return result; +}; +Matrix2.getRow = function(matrix, index, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); + Check_default.typeOf.number.lessThanOrEquals("index", index, 1); + Check_default.typeOf.object("result", result); + const x = matrix[index]; + const y = matrix[index + 2]; + result.x = x; + result.y = y; + return result; +}; +Matrix2.setRow = function(matrix, index, cartesian, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number.greaterThanOrEquals("index", index, 0); + Check_default.typeOf.number.lessThanOrEquals("index", index, 1); + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + result = Matrix2.clone(matrix, result); + result[index] = cartesian.x; + result[index + 2] = cartesian.y; + return result; +}; +var scaleScratch12 = new Cartesian2_default(); +Matrix2.setScale = function(matrix, scale, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("scale", scale); + Check_default.typeOf.object("result", result); + const existingScale = Matrix2.getScale(matrix, scaleScratch12); + const scaleRatioX = scale.x / existingScale.x; + const scaleRatioY = scale.y / existingScale.y; + result[0] = matrix[0] * scaleRatioX; + result[1] = matrix[1] * scaleRatioX; + result[2] = matrix[2] * scaleRatioY; + result[3] = matrix[3] * scaleRatioY; + return result; +}; +var scaleScratch22 = new Cartesian2_default(); +Matrix2.setUniformScale = function(matrix, scale, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number("scale", scale); + Check_default.typeOf.object("result", result); + const existingScale = Matrix2.getScale(matrix, scaleScratch22); + const scaleRatioX = scale / existingScale.x; + const scaleRatioY = scale / existingScale.y; + result[0] = matrix[0] * scaleRatioX; + result[1] = matrix[1] * scaleRatioX; + result[2] = matrix[2] * scaleRatioY; + result[3] = matrix[3] * scaleRatioY; + return result; +}; +var scratchColumn2 = new Cartesian2_default(); +Matrix2.getScale = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + result.x = Cartesian2_default.magnitude( + Cartesian2_default.fromElements(matrix[0], matrix[1], scratchColumn2) ); - const translation = Matrix4_default.fromTranslation( - projectedPosition, - scratchFromENU + result.y = Cartesian2_default.magnitude( + Cartesian2_default.fromElements(matrix[2], matrix[3], scratchColumn2) ); - Matrix4_default.multiply(swizzleMatrix, toENU, result); - Matrix4_default.multiply(translation, result, result); return result; }; -var Transforms_default = Transforms; +var scaleScratch32 = new Cartesian2_default(); +Matrix2.getMaximumScale = function(matrix) { + Matrix2.getScale(matrix, scaleScratch32); + return Cartesian2_default.maximumComponent(scaleScratch32); +}; +var scaleScratch42 = new Cartesian2_default(); +Matrix2.setRotation = function(matrix, rotation, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + const scale = Matrix2.getScale(matrix, scaleScratch42); + result[0] = rotation[0] * scale.x; + result[1] = rotation[1] * scale.x; + result[2] = rotation[2] * scale.y; + result[3] = rotation[3] * scale.y; + return result; +}; +var scaleScratch52 = new Cartesian2_default(); +Matrix2.getRotation = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + const scale = Matrix2.getScale(matrix, scaleScratch52); + result[0] = matrix[0] / scale.x; + result[1] = matrix[1] / scale.x; + result[2] = matrix[2] / scale.y; + result[3] = matrix[3] / scale.y; + return result; +}; +Matrix2.multiply = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + const column0Row0 = left[0] * right[0] + left[2] * right[1]; + const column1Row0 = left[0] * right[2] + left[2] * right[3]; + const column0Row1 = left[1] * right[0] + left[3] * right[1]; + const column1Row1 = left[1] * right[2] + left[3] * right[3]; + result[0] = column0Row0; + result[1] = column0Row1; + result[2] = column1Row0; + result[3] = column1Row1; + return result; +}; +Matrix2.add = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result[0] = left[0] + right[0]; + result[1] = left[1] + right[1]; + result[2] = left[2] + right[2]; + result[3] = left[3] + right[3]; + return result; +}; +Matrix2.subtract = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result[0] = left[0] - right[0]; + result[1] = left[1] - right[1]; + result[2] = left[2] - right[2]; + result[3] = left[3] - right[3]; + return result; +}; +Matrix2.multiplyByVector = function(matrix, cartesian, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + const x = matrix[0] * cartesian.x + matrix[2] * cartesian.y; + const y = matrix[1] * cartesian.x + matrix[3] * cartesian.y; + result.x = x; + result.y = y; + return result; +}; +Matrix2.multiplyByScalar = function(matrix, scalar, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number("scalar", scalar); + Check_default.typeOf.object("result", result); + result[0] = matrix[0] * scalar; + result[1] = matrix[1] * scalar; + result[2] = matrix[2] * scalar; + result[3] = matrix[3] * scalar; + return result; +}; +Matrix2.multiplyByScale = function(matrix, scale, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("scale", scale); + Check_default.typeOf.object("result", result); + result[0] = matrix[0] * scale.x; + result[1] = matrix[1] * scale.x; + result[2] = matrix[2] * scale.y; + result[3] = matrix[3] * scale.y; + return result; +}; +Matrix2.multiplyByUniformScale = function(matrix, scale, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.number("scale", scale); + Check_default.typeOf.object("result", result); + result[0] = matrix[0] * scale; + result[1] = matrix[1] * scale; + result[2] = matrix[2] * scale; + result[3] = matrix[3] * scale; + return result; +}; +Matrix2.negate = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + result[0] = -matrix[0]; + result[1] = -matrix[1]; + result[2] = -matrix[2]; + result[3] = -matrix[3]; + return result; +}; +Matrix2.transpose = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + const column0Row0 = matrix[0]; + const column0Row1 = matrix[2]; + const column1Row0 = matrix[1]; + const column1Row1 = matrix[3]; + result[0] = column0Row0; + result[1] = column0Row1; + result[2] = column1Row0; + result[3] = column1Row1; + return result; +}; +Matrix2.abs = function(matrix, result) { + Check_default.typeOf.object("matrix", matrix); + Check_default.typeOf.object("result", result); + result[0] = Math.abs(matrix[0]); + result[1] = Math.abs(matrix[1]); + result[2] = Math.abs(matrix[2]); + result[3] = Math.abs(matrix[3]); + return result; +}; +Matrix2.equals = function(left, right) { + return left === right || defined_default(left) && defined_default(right) && left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[3] === right[3]; +}; +Matrix2.equalsArray = function(matrix, array, offset) { + return matrix[0] === array[offset] && matrix[1] === array[offset + 1] && matrix[2] === array[offset + 2] && matrix[3] === array[offset + 3]; +}; +Matrix2.equalsEpsilon = function(left, right, epsilon) { + epsilon = defaultValue_default(epsilon, 0); + return left === right || defined_default(left) && defined_default(right) && Math.abs(left[0] - right[0]) <= epsilon && Math.abs(left[1] - right[1]) <= epsilon && Math.abs(left[2] - right[2]) <= epsilon && Math.abs(left[3] - right[3]) <= epsilon; +}; +Matrix2.IDENTITY = Object.freeze(new Matrix2(1, 0, 0, 1)); +Matrix2.ZERO = Object.freeze(new Matrix2(0, 0, 0, 0)); +Matrix2.COLUMN0ROW0 = 0; +Matrix2.COLUMN0ROW1 = 1; +Matrix2.COLUMN1ROW0 = 2; +Matrix2.COLUMN1ROW1 = 3; +Object.defineProperties(Matrix2.prototype, { + /** + * Gets the number of items in the collection. + * @memberof Matrix2.prototype + * + * @type {number} + */ + length: { + get: function() { + return Matrix2.packedLength; + } + } +}); +Matrix2.prototype.clone = function(result) { + return Matrix2.clone(this, result); +}; +Matrix2.prototype.equals = function(right) { + return Matrix2.equals(this, right); +}; +Matrix2.prototype.equalsEpsilon = function(right, epsilon) { + return Matrix2.equalsEpsilon(this, right, epsilon); +}; +Matrix2.prototype.toString = function() { + return `(${this[0]}, ${this[2]}) +(${this[1]}, ${this[3]})`; +}; +var Matrix2_default = Matrix2; export { - GeographicProjection_default, - Intersect_default, - Interval_default, - BoundingSphere_default, - FeatureDetection_default, - Quaternion_default, + Cartesian4_default, + Matrix4_default, + combine_default, Resource_default, buildModuleUrl_default, - Transforms_default + Quaternion_default, + Transforms_default, + Rectangle_default, + Matrix2_default }; diff --git a/assets/cesium/Workers/chunk-XNRYWRVT.js b/assets/cesium/Workers/chunk-OOK53QUQ.js similarity index 99% rename from assets/cesium/Workers/chunk-XNRYWRVT.js rename to assets/cesium/Workers/chunk-OOK53QUQ.js index a0ca7dfc2..4e33b1cc4 100644 --- a/assets/cesium/Workers/chunk-XNRYWRVT.js +++ b/assets/cesium/Workers/chunk-OOK53QUQ.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/assets/cesium/Workers/chunk-4EXWKTY2.js b/assets/cesium/Workers/chunk-OORVMGDU.js similarity index 98% rename from assets/cesium/Workers/chunk-4EXWKTY2.js rename to assets/cesium/Workers/chunk-OORVMGDU.js index 975f1adad..a243ae580 100644 --- a/assets/cesium/Workers/chunk-4EXWKTY2.js +++ b/assets/cesium/Workers/chunk-OORVMGDU.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -24,28 +24,28 @@ */ import { - Cartesian2_default, Cartesian4_default, Matrix2_default, Matrix4_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Scene/AttributeType.js var AttributeType = { diff --git a/assets/cesium/Workers/chunk-4CHSBZNO.js b/assets/cesium/Workers/chunk-PCP4YQST.js similarity index 98% rename from assets/cesium/Workers/chunk-4CHSBZNO.js rename to assets/cesium/Workers/chunk-PCP4YQST.js index 80f69d8be..3c00039e1 100644 --- a/assets/cesium/Workers/chunk-4CHSBZNO.js +++ b/assets/cesium/Workers/chunk-PCP4YQST.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,37 +25,37 @@ import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; +} from "./chunk-KUN2ZA5X.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/BoxGeometry.js var diffScratch = new Cartesian3_default(); diff --git a/assets/cesium/Workers/chunk-54GSYZWT.js b/assets/cesium/Workers/chunk-PYHLO636.js similarity index 71% rename from assets/cesium/Workers/chunk-54GSYZWT.js rename to assets/cesium/Workers/chunk-PYHLO636.js index fe692bfba..f8cd9c7d9 100644 --- a/assets/cesium/Workers/chunk-54GSYZWT.js +++ b/assets/cesium/Workers/chunk-PYHLO636.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,17 +25,17 @@ import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/Cartesian3.js function Cartesian3(x, y, z) { @@ -396,7 +396,7 @@ Cartesian3.fromDegrees = function(longitude, latitude, height, ellipsoid, result }; var scratchN = new Cartesian3(); var scratchK = new Cartesian3(); -var wgs84RadiiSquared = new Cartesian3( +Cartesian3._ellipsoidRadiiSquared = new Cartesian3( 6378137 * 6378137, 6378137 * 6378137, 6356752314245179e-9 * 6356752314245179e-9 @@ -405,7 +405,7 @@ Cartesian3.fromRadians = function(longitude, latitude, height, ellipsoid, result Check_default.typeOf.number("longitude", longitude); Check_default.typeOf.number("latitude", latitude); height = defaultValue_default(height, 0); - const radiiSquared = defined_default(ellipsoid) ? ellipsoid.radiiSquared : wgs84RadiiSquared; + const radiiSquared = !defined_default(ellipsoid) ? Cartesian3._ellipsoidRadiiSquared : ellipsoid.radiiSquared; const cosLatitude = Math.cos(latitude); scratchN.x = cosLatitude * Math.cos(longitude); scratchN.y = cosLatitude * Math.sin(longitude); @@ -667,21 +667,21 @@ Cartographic.fromDegrees = function(longitude, latitude, height, result) { var cartesianToCartographicN = new Cartesian3_default(); var cartesianToCartographicP = new Cartesian3_default(); var cartesianToCartographicH = new Cartesian3_default(); -var wgs84OneOverRadii = new Cartesian3_default( +Cartographic._ellipsoidOneOverRadii = new Cartesian3_default( 1 / 6378137, 1 / 6378137, 1 / 6356752314245179e-9 ); -var wgs84OneOverRadiiSquared = new Cartesian3_default( +Cartographic._ellipsoidOneOverRadiiSquared = new Cartesian3_default( 1 / (6378137 * 6378137), 1 / (6378137 * 6378137), 1 / (6356752314245179e-9 * 6356752314245179e-9) ); -var wgs84CenterToleranceSquared = Math_default.EPSILON1; +Cartographic._ellipsoidCenterToleranceSquared = Math_default.EPSILON1; Cartographic.fromCartesian = function(cartesian, ellipsoid, result) { - const oneOverRadii = defined_default(ellipsoid) ? ellipsoid.oneOverRadii : wgs84OneOverRadii; - const oneOverRadiiSquared = defined_default(ellipsoid) ? ellipsoid.oneOverRadiiSquared : wgs84OneOverRadiiSquared; - const centerToleranceSquared = defined_default(ellipsoid) ? ellipsoid._centerToleranceSquared : wgs84CenterToleranceSquared; + const oneOverRadii = defined_default(ellipsoid) ? ellipsoid.oneOverRadii : Cartographic._ellipsoidOneOverRadii; + const oneOverRadiiSquared = defined_default(ellipsoid) ? ellipsoid.oneOverRadiiSquared : Cartographic._ellipsoidOneOverRadiiSquared; + const centerToleranceSquared = defined_default(ellipsoid) ? ellipsoid._centerToleranceSquared : Cartographic._ellipsoidCenterToleranceSquared; const p = scaleToGeodeticSurface_default( cartesian, oneOverRadii, @@ -758,6 +758,302 @@ Cartographic.prototype.toString = function() { }; var Cartographic_default = Cartographic; +// packages/engine/Source/Core/Cartesian2.js +function Cartesian2(x, y) { + this.x = defaultValue_default(x, 0); + this.y = defaultValue_default(y, 0); +} +Cartesian2.fromElements = function(x, y, result) { + if (!defined_default(result)) { + return new Cartesian2(x, y); + } + result.x = x; + result.y = y; + return result; +}; +Cartesian2.clone = function(cartesian, result) { + if (!defined_default(cartesian)) { + return void 0; + } + if (!defined_default(result)) { + return new Cartesian2(cartesian.x, cartesian.y); + } + result.x = cartesian.x; + result.y = cartesian.y; + return result; +}; +Cartesian2.fromCartesian3 = Cartesian2.clone; +Cartesian2.fromCartesian4 = Cartesian2.clone; +Cartesian2.packedLength = 2; +Cartesian2.pack = function(value, array, startingIndex) { + Check_default.typeOf.object("value", value); + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + array[startingIndex++] = value.x; + array[startingIndex] = value.y; + return array; +}; +Cartesian2.unpack = function(array, startingIndex, result) { + Check_default.defined("array", array); + startingIndex = defaultValue_default(startingIndex, 0); + if (!defined_default(result)) { + result = new Cartesian2(); + } + result.x = array[startingIndex++]; + result.y = array[startingIndex]; + return result; +}; +Cartesian2.packArray = function(array, result) { + Check_default.defined("array", array); + const length = array.length; + const resultLength = length * 2; + if (!defined_default(result)) { + result = new Array(resultLength); + } else if (!Array.isArray(result) && result.length !== resultLength) { + throw new DeveloperError_default( + "If result is a typed array, it must have exactly array.length * 2 elements" + ); + } else if (result.length !== resultLength) { + result.length = resultLength; + } + for (let i = 0; i < length; ++i) { + Cartesian2.pack(array[i], result, i * 2); + } + return result; +}; +Cartesian2.unpackArray = function(array, result) { + Check_default.defined("array", array); + Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 2); + if (array.length % 2 !== 0) { + throw new DeveloperError_default("array length must be a multiple of 2."); + } + const length = array.length; + if (!defined_default(result)) { + result = new Array(length / 2); + } else { + result.length = length / 2; + } + for (let i = 0; i < length; i += 2) { + const index = i / 2; + result[index] = Cartesian2.unpack(array, i, result[index]); + } + return result; +}; +Cartesian2.fromArray = Cartesian2.unpack; +Cartesian2.maximumComponent = function(cartesian) { + Check_default.typeOf.object("cartesian", cartesian); + return Math.max(cartesian.x, cartesian.y); +}; +Cartesian2.minimumComponent = function(cartesian) { + Check_default.typeOf.object("cartesian", cartesian); + return Math.min(cartesian.x, cartesian.y); +}; +Cartesian2.minimumByComponent = function(first, second, result) { + Check_default.typeOf.object("first", first); + Check_default.typeOf.object("second", second); + Check_default.typeOf.object("result", result); + result.x = Math.min(first.x, second.x); + result.y = Math.min(first.y, second.y); + return result; +}; +Cartesian2.maximumByComponent = function(first, second, result) { + Check_default.typeOf.object("first", first); + Check_default.typeOf.object("second", second); + Check_default.typeOf.object("result", result); + result.x = Math.max(first.x, second.x); + result.y = Math.max(first.y, second.y); + return result; +}; +Cartesian2.clamp = function(value, min, max, result) { + Check_default.typeOf.object("value", value); + Check_default.typeOf.object("min", min); + Check_default.typeOf.object("max", max); + Check_default.typeOf.object("result", result); + const x = Math_default.clamp(value.x, min.x, max.x); + const y = Math_default.clamp(value.y, min.y, max.y); + result.x = x; + result.y = y; + return result; +}; +Cartesian2.magnitudeSquared = function(cartesian) { + Check_default.typeOf.object("cartesian", cartesian); + return cartesian.x * cartesian.x + cartesian.y * cartesian.y; +}; +Cartesian2.magnitude = function(cartesian) { + return Math.sqrt(Cartesian2.magnitudeSquared(cartesian)); +}; +var distanceScratch2 = new Cartesian2(); +Cartesian2.distance = function(left, right) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Cartesian2.subtract(left, right, distanceScratch2); + return Cartesian2.magnitude(distanceScratch2); +}; +Cartesian2.distanceSquared = function(left, right) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Cartesian2.subtract(left, right, distanceScratch2); + return Cartesian2.magnitudeSquared(distanceScratch2); +}; +Cartesian2.normalize = function(cartesian, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + const magnitude = Cartesian2.magnitude(cartesian); + result.x = cartesian.x / magnitude; + result.y = cartesian.y / magnitude; + if (isNaN(result.x) || isNaN(result.y)) { + throw new DeveloperError_default("normalized result is not a number"); + } + return result; +}; +Cartesian2.dot = function(left, right) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + return left.x * right.x + left.y * right.y; +}; +Cartesian2.cross = function(left, right) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + return left.x * right.y - left.y * right.x; +}; +Cartesian2.multiplyComponents = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result.x = left.x * right.x; + result.y = left.y * right.y; + return result; +}; +Cartesian2.divideComponents = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result.x = left.x / right.x; + result.y = left.y / right.y; + return result; +}; +Cartesian2.add = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result.x = left.x + right.x; + result.y = left.y + right.y; + return result; +}; +Cartesian2.subtract = function(left, right, result) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Check_default.typeOf.object("result", result); + result.x = left.x - right.x; + result.y = left.y - right.y; + return result; +}; +Cartesian2.multiplyByScalar = function(cartesian, scalar, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.number("scalar", scalar); + Check_default.typeOf.object("result", result); + result.x = cartesian.x * scalar; + result.y = cartesian.y * scalar; + return result; +}; +Cartesian2.divideByScalar = function(cartesian, scalar, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.number("scalar", scalar); + Check_default.typeOf.object("result", result); + result.x = cartesian.x / scalar; + result.y = cartesian.y / scalar; + return result; +}; +Cartesian2.negate = function(cartesian, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + result.x = -cartesian.x; + result.y = -cartesian.y; + return result; +}; +Cartesian2.abs = function(cartesian, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + result.x = Math.abs(cartesian.x); + result.y = Math.abs(cartesian.y); + return result; +}; +var lerpScratch2 = new Cartesian2(); +Cartesian2.lerp = function(start, end, t, result) { + Check_default.typeOf.object("start", start); + Check_default.typeOf.object("end", end); + Check_default.typeOf.number("t", t); + Check_default.typeOf.object("result", result); + Cartesian2.multiplyByScalar(end, t, lerpScratch2); + result = Cartesian2.multiplyByScalar(start, 1 - t, result); + return Cartesian2.add(lerpScratch2, result, result); +}; +var angleBetweenScratch3 = new Cartesian2(); +var angleBetweenScratch22 = new Cartesian2(); +Cartesian2.angleBetween = function(left, right) { + Check_default.typeOf.object("left", left); + Check_default.typeOf.object("right", right); + Cartesian2.normalize(left, angleBetweenScratch3); + Cartesian2.normalize(right, angleBetweenScratch22); + return Math_default.acosClamped( + Cartesian2.dot(angleBetweenScratch3, angleBetweenScratch22) + ); +}; +var mostOrthogonalAxisScratch2 = new Cartesian2(); +Cartesian2.mostOrthogonalAxis = function(cartesian, result) { + Check_default.typeOf.object("cartesian", cartesian); + Check_default.typeOf.object("result", result); + const f = Cartesian2.normalize(cartesian, mostOrthogonalAxisScratch2); + Cartesian2.abs(f, f); + if (f.x <= f.y) { + result = Cartesian2.clone(Cartesian2.UNIT_X, result); + } else { + result = Cartesian2.clone(Cartesian2.UNIT_Y, result); + } + return result; +}; +Cartesian2.equals = function(left, right) { + return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y; +}; +Cartesian2.equalsArray = function(cartesian, array, offset) { + return cartesian.x === array[offset] && cartesian.y === array[offset + 1]; +}; +Cartesian2.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) { + return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon( + left.x, + right.x, + relativeEpsilon, + absoluteEpsilon + ) && Math_default.equalsEpsilon( + left.y, + right.y, + relativeEpsilon, + absoluteEpsilon + ); +}; +Cartesian2.ZERO = Object.freeze(new Cartesian2(0, 0)); +Cartesian2.ONE = Object.freeze(new Cartesian2(1, 1)); +Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1, 0)); +Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0, 1)); +Cartesian2.prototype.clone = function(result) { + return Cartesian2.clone(this, result); +}; +Cartesian2.prototype.equals = function(right) { + return Cartesian2.equals(this, right); +}; +Cartesian2.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) { + return Cartesian2.equalsEpsilon( + this, + right, + relativeEpsilon, + absoluteEpsilon + ); +}; +Cartesian2.prototype.toString = function() { + return `(${this.x}, ${this.y})`; +}; +var Cartesian2_default = Cartesian2; + // packages/engine/Source/Core/Ellipsoid.js function initialize(ellipsoid, x, y, z) { x = defaultValue_default(x, 0); @@ -920,6 +1216,35 @@ Ellipsoid.MOON = Object.freeze( Math_default.LUNAR_RADIUS ) ); +Ellipsoid._default = Ellipsoid.WGS84; +Object.defineProperties(Ellipsoid, { + /** + * The default ellipsoid used when not otherwise specified. + * @memberof Ellipsoid + * @type {Ellipsoid} + * @example + * Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON; + * + * // Apollo 11 landing site + * const position = Cesium.Cartesian3.fromRadians( + * 0.67416, + * 23.47315, + * ); + */ + default: { + get: function() { + return Ellipsoid._default; + }, + set: function(value) { + Check_default.typeOf.object("value", value); + Ellipsoid._default = value; + Cartesian3_default._ellipsoidRadiiSquared = value.radiiSquared; + Cartographic_default._ellipsoidOneOverRadii = value.oneOverRadii; + Cartographic_default._ellipsoidOneOverRadiiSquared = value.oneOverRadiiSquared; + Cartographic_default._ellipsoidCenterToleranceSquared = value._centerToleranceSquared; + } + } +}); Ellipsoid.prototype.clone = function(result) { return Ellipsoid.clone(this, result); }; @@ -955,6 +1280,10 @@ Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function(cartographic, r return Cartesian3_default.normalize(result, result); }; Ellipsoid.prototype.geodeticSurfaceNormal = function(cartesian, result) { + Check_default.typeOf.object("cartesian", cartesian); + if (isNaN(cartesian.x) || isNaN(cartesian.y) || isNaN(cartesian.z)) { + throw new DeveloperError_default("cartesian has a NaN component"); + } if (Cartesian3_default.equalsEpsilon(cartesian, Cartesian3_default.ZERO, Math_default.EPSILON14)) { return void 0; } @@ -1096,6 +1425,29 @@ Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function(position, b } return result; }; +var scratchEndpoint = new Cartesian3_default(); +Ellipsoid.prototype.getLocalCurvature = function(surfacePosition, result) { + Check_default.typeOf.object("surfacePosition", surfacePosition); + if (!defined_default(result)) { + result = new Cartesian2_default(); + } + const primeVerticalEndpoint = this.getSurfaceNormalIntersectionWithZAxis( + surfacePosition, + 0, + scratchEndpoint + ); + const primeVerticalRadius = Cartesian3_default.distance( + surfacePosition, + primeVerticalEndpoint + ); + const radiusRatio = this.minimumRadius * primeVerticalRadius / this.maximumRadius ** 2; + const meridionalRadius = primeVerticalRadius * radiusRatio ** 2; + return Cartesian2_default.fromElements( + 1 / primeVerticalRadius, + 1 / meridionalRadius, + result + ); +}; var abscissas = [ 0.14887433898163, 0.43339539412925, @@ -2033,9 +2385,473 @@ Matrix3.prototype.toString = function() { }; var Matrix3_default = Matrix3; +// packages/engine/Source/Core/Fullscreen.js +var _supportsFullscreen; +var _names = { + requestFullscreen: void 0, + exitFullscreen: void 0, + fullscreenEnabled: void 0, + fullscreenElement: void 0, + fullscreenchange: void 0, + fullscreenerror: void 0 +}; +var Fullscreen = {}; +Object.defineProperties(Fullscreen, { + /** + * The element that is currently fullscreen, if any. To simply check if the + * browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}. + * @memberof Fullscreen + * @type {object} + * @readonly + */ + element: { + get: function() { + if (!Fullscreen.supportsFullscreen()) { + return void 0; + } + return document[_names.fullscreenElement]; + } + }, + /** + * The name of the event on the document that is fired when fullscreen is + * entered or exited. This event name is intended for use with addEventListener. + * In your event handler, to determine if the browser is in fullscreen mode or not, + * use {@link Fullscreen#fullscreen}. + * @memberof Fullscreen + * @type {string} + * @readonly + */ + changeEventName: { + get: function() { + if (!Fullscreen.supportsFullscreen()) { + return void 0; + } + return _names.fullscreenchange; + } + }, + /** + * The name of the event that is fired when a fullscreen error + * occurs. This event name is intended for use with addEventListener. + * @memberof Fullscreen + * @type {string} + * @readonly + */ + errorEventName: { + get: function() { + if (!Fullscreen.supportsFullscreen()) { + return void 0; + } + return _names.fullscreenerror; + } + }, + /** + * Determine whether the browser will allow an element to be made fullscreen, or not. + * For example, by default, iframes cannot go fullscreen unless the containing page + * adds an "allowfullscreen" attribute (or prefixed equivalent). + * @memberof Fullscreen + * @type {boolean} + * @readonly + */ + enabled: { + get: function() { + if (!Fullscreen.supportsFullscreen()) { + return void 0; + } + return document[_names.fullscreenEnabled]; + } + }, + /** + * Determines if the browser is currently in fullscreen mode. + * @memberof Fullscreen + * @type {boolean} + * @readonly + */ + fullscreen: { + get: function() { + if (!Fullscreen.supportsFullscreen()) { + return void 0; + } + return Fullscreen.element !== null; + } + } +}); +Fullscreen.supportsFullscreen = function() { + if (defined_default(_supportsFullscreen)) { + return _supportsFullscreen; + } + _supportsFullscreen = false; + const body = document.body; + if (typeof body.requestFullscreen === "function") { + _names.requestFullscreen = "requestFullscreen"; + _names.exitFullscreen = "exitFullscreen"; + _names.fullscreenEnabled = "fullscreenEnabled"; + _names.fullscreenElement = "fullscreenElement"; + _names.fullscreenchange = "fullscreenchange"; + _names.fullscreenerror = "fullscreenerror"; + _supportsFullscreen = true; + return _supportsFullscreen; + } + const prefixes = ["webkit", "moz", "o", "ms", "khtml"]; + let name; + for (let i = 0, len = prefixes.length; i < len; ++i) { + const prefix = prefixes[i]; + name = `${prefix}RequestFullscreen`; + if (typeof body[name] === "function") { + _names.requestFullscreen = name; + _supportsFullscreen = true; + } else { + name = `${prefix}RequestFullScreen`; + if (typeof body[name] === "function") { + _names.requestFullscreen = name; + _supportsFullscreen = true; + } + } + name = `${prefix}ExitFullscreen`; + if (typeof document[name] === "function") { + _names.exitFullscreen = name; + } else { + name = `${prefix}CancelFullScreen`; + if (typeof document[name] === "function") { + _names.exitFullscreen = name; + } + } + name = `${prefix}FullscreenEnabled`; + if (document[name] !== void 0) { + _names.fullscreenEnabled = name; + } else { + name = `${prefix}FullScreenEnabled`; + if (document[name] !== void 0) { + _names.fullscreenEnabled = name; + } + } + name = `${prefix}FullscreenElement`; + if (document[name] !== void 0) { + _names.fullscreenElement = name; + } else { + name = `${prefix}FullScreenElement`; + if (document[name] !== void 0) { + _names.fullscreenElement = name; + } + } + name = `${prefix}fullscreenchange`; + if (document[`on${name}`] !== void 0) { + if (prefix === "ms") { + name = "MSFullscreenChange"; + } + _names.fullscreenchange = name; + } + name = `${prefix}fullscreenerror`; + if (document[`on${name}`] !== void 0) { + if (prefix === "ms") { + name = "MSFullscreenError"; + } + _names.fullscreenerror = name; + } + } + return _supportsFullscreen; +}; +Fullscreen.requestFullscreen = function(element, vrDevice) { + if (!Fullscreen.supportsFullscreen()) { + return; + } + element[_names.requestFullscreen]({ vrDisplay: vrDevice }); +}; +Fullscreen.exitFullscreen = function() { + if (!Fullscreen.supportsFullscreen()) { + return; + } + document[_names.exitFullscreen](); +}; +Fullscreen._names = _names; +var Fullscreen_default = Fullscreen; + +// packages/engine/Source/Core/FeatureDetection.js +var theNavigator; +if (typeof navigator !== "undefined") { + theNavigator = navigator; +} else { + theNavigator = {}; +} +function extractVersion(versionString) { + const parts = versionString.split("."); + for (let i = 0, len = parts.length; i < len; ++i) { + parts[i] = parseInt(parts[i], 10); + } + return parts; +} +var isChromeResult; +var chromeVersionResult; +function isChrome() { + if (!defined_default(isChromeResult)) { + isChromeResult = false; + if (!isEdge()) { + const fields = / Chrome\/([\.0-9]+)/.exec(theNavigator.userAgent); + if (fields !== null) { + isChromeResult = true; + chromeVersionResult = extractVersion(fields[1]); + } + } + } + return isChromeResult; +} +function chromeVersion() { + return isChrome() && chromeVersionResult; +} +var isSafariResult; +var safariVersionResult; +function isSafari() { + if (!defined_default(isSafariResult)) { + isSafariResult = false; + if (!isChrome() && !isEdge() && / Safari\/[\.0-9]+/.test(theNavigator.userAgent)) { + const fields = / Version\/([\.0-9]+)/.exec(theNavigator.userAgent); + if (fields !== null) { + isSafariResult = true; + safariVersionResult = extractVersion(fields[1]); + } + } + } + return isSafariResult; +} +function safariVersion() { + return isSafari() && safariVersionResult; +} +var isWebkitResult; +var webkitVersionResult; +function isWebkit() { + if (!defined_default(isWebkitResult)) { + isWebkitResult = false; + const fields = / AppleWebKit\/([\.0-9]+)(\+?)/.exec(theNavigator.userAgent); + if (fields !== null) { + isWebkitResult = true; + webkitVersionResult = extractVersion(fields[1]); + webkitVersionResult.isNightly = !!fields[2]; + } + } + return isWebkitResult; +} +function webkitVersion() { + return isWebkit() && webkitVersionResult; +} +var isInternetExplorerResult; +var internetExplorerVersionResult; +function isInternetExplorer() { + if (!defined_default(isInternetExplorerResult)) { + isInternetExplorerResult = false; + let fields; + if (theNavigator.appName === "Microsoft Internet Explorer") { + fields = /MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent); + if (fields !== null) { + isInternetExplorerResult = true; + internetExplorerVersionResult = extractVersion(fields[1]); + } + } else if (theNavigator.appName === "Netscape") { + fields = /Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec( + theNavigator.userAgent + ); + if (fields !== null) { + isInternetExplorerResult = true; + internetExplorerVersionResult = extractVersion(fields[1]); + } + } + } + return isInternetExplorerResult; +} +function internetExplorerVersion() { + return isInternetExplorer() && internetExplorerVersionResult; +} +var isEdgeResult; +var edgeVersionResult; +function isEdge() { + if (!defined_default(isEdgeResult)) { + isEdgeResult = false; + const fields = / Edg\/([\.0-9]+)/.exec(theNavigator.userAgent); + if (fields !== null) { + isEdgeResult = true; + edgeVersionResult = extractVersion(fields[1]); + } + } + return isEdgeResult; +} +function edgeVersion() { + return isEdge() && edgeVersionResult; +} +var isFirefoxResult; +var firefoxVersionResult; +function isFirefox() { + if (!defined_default(isFirefoxResult)) { + isFirefoxResult = false; + const fields = /Firefox\/([\.0-9]+)/.exec(theNavigator.userAgent); + if (fields !== null) { + isFirefoxResult = true; + firefoxVersionResult = extractVersion(fields[1]); + } + } + return isFirefoxResult; +} +var isWindowsResult; +function isWindows() { + if (!defined_default(isWindowsResult)) { + isWindowsResult = /Windows/i.test(theNavigator.appVersion); + } + return isWindowsResult; +} +var isIPadOrIOSResult; +function isIPadOrIOS() { + if (!defined_default(isIPadOrIOSResult)) { + isIPadOrIOSResult = navigator.platform === "iPhone" || navigator.platform === "iPod" || navigator.platform === "iPad"; + } + return isIPadOrIOSResult; +} +function firefoxVersion() { + return isFirefox() && firefoxVersionResult; +} +var hasPointerEvents; +function supportsPointerEvents() { + if (!defined_default(hasPointerEvents)) { + hasPointerEvents = !isFirefox() && typeof PointerEvent !== "undefined" && (!defined_default(theNavigator.pointerEnabled) || theNavigator.pointerEnabled); + } + return hasPointerEvents; +} +var imageRenderingValueResult; +var supportsImageRenderingPixelatedResult; +function supportsImageRenderingPixelated() { + if (!defined_default(supportsImageRenderingPixelatedResult)) { + const canvas = document.createElement("canvas"); + canvas.setAttribute( + "style", + "image-rendering: -moz-crisp-edges;image-rendering: pixelated;" + ); + const tmp = canvas.style.imageRendering; + supportsImageRenderingPixelatedResult = defined_default(tmp) && tmp !== ""; + if (supportsImageRenderingPixelatedResult) { + imageRenderingValueResult = tmp; + } + } + return supportsImageRenderingPixelatedResult; +} +function imageRenderingValue() { + return supportsImageRenderingPixelated() ? imageRenderingValueResult : void 0; +} +function supportsWebP() { + if (!supportsWebP.initialized) { + throw new DeveloperError_default( + "You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP" + ); + } + return supportsWebP._result; +} +supportsWebP._promise = void 0; +supportsWebP._result = void 0; +supportsWebP.initialize = function() { + if (defined_default(supportsWebP._promise)) { + return supportsWebP._promise; + } + supportsWebP._promise = new Promise((resolve) => { + const image = new Image(); + image.onload = function() { + supportsWebP._result = image.width > 0 && image.height > 0; + resolve(supportsWebP._result); + }; + image.onerror = function() { + supportsWebP._result = false; + resolve(supportsWebP._result); + }; + image.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"; + }); + return supportsWebP._promise; +}; +Object.defineProperties(supportsWebP, { + initialized: { + get: function() { + return defined_default(supportsWebP._result); + } + } +}); +var typedArrayTypes = []; +if (typeof ArrayBuffer !== "undefined") { + typedArrayTypes.push( + Int8Array, + Uint8Array, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array + ); + if (typeof Uint8ClampedArray !== "undefined") { + typedArrayTypes.push(Uint8ClampedArray); + } + if (typeof Uint8ClampedArray !== "undefined") { + typedArrayTypes.push(Uint8ClampedArray); + } + if (typeof BigInt64Array !== "undefined") { + typedArrayTypes.push(BigInt64Array); + } + if (typeof BigUint64Array !== "undefined") { + typedArrayTypes.push(BigUint64Array); + } +} +var FeatureDetection = { + isChrome, + chromeVersion, + isSafari, + safariVersion, + isWebkit, + webkitVersion, + isInternetExplorer, + internetExplorerVersion, + isEdge, + edgeVersion, + isFirefox, + firefoxVersion, + isWindows, + isIPadOrIOS, + hardwareConcurrency: defaultValue_default(theNavigator.hardwareConcurrency, 3), + supportsPointerEvents, + supportsImageRenderingPixelated, + supportsWebP, + imageRenderingValue, + typedArrayTypes +}; +FeatureDetection.supportsBasis = function(scene) { + return FeatureDetection.supportsWebAssembly() && scene.context.supportsBasis; +}; +FeatureDetection.supportsFullscreen = function() { + return Fullscreen_default.supportsFullscreen(); +}; +FeatureDetection.supportsTypedArrays = function() { + return typeof ArrayBuffer !== "undefined"; +}; +FeatureDetection.supportsBigInt64Array = function() { + return typeof BigInt64Array !== "undefined"; +}; +FeatureDetection.supportsBigUint64Array = function() { + return typeof BigUint64Array !== "undefined"; +}; +FeatureDetection.supportsBigInt = function() { + return typeof BigInt !== "undefined"; +}; +FeatureDetection.supportsWebWorkers = function() { + return typeof Worker !== "undefined"; +}; +FeatureDetection.supportsWebAssembly = function() { + return typeof WebAssembly !== "undefined"; +}; +FeatureDetection.supportsWebgl2 = function(scene) { + Check_default.defined("scene", scene); + return scene.context.webgl2; +}; +FeatureDetection.supportsEsmWebWorkers = function() { + return !isFirefox() || parseInt(firefoxVersionResult) >= 114; +}; +var FeatureDetection_default = FeatureDetection; + export { Cartesian3_default, Cartographic_default, + Cartesian2_default, Ellipsoid_default, - Matrix3_default + Matrix3_default, + FeatureDetection_default }; diff --git a/assets/cesium/Workers/chunk-ZERWARDV.js b/assets/cesium/Workers/chunk-Q55ECN3Y.js similarity index 98% rename from assets/cesium/Workers/chunk-ZERWARDV.js rename to assets/cesium/Workers/chunk-Q55ECN3Y.js index 0906dfdd8..ede61d611 100644 --- a/assets/cesium/Workers/chunk-ZERWARDV.js +++ b/assets/cesium/Workers/chunk-Q55ECN3Y.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/assets/cesium/Workers/chunk-CKOGHQ6J.js b/assets/cesium/Workers/chunk-QD4KM3GO.js similarity index 96% rename from assets/cesium/Workers/chunk-CKOGHQ6J.js rename to assets/cesium/Workers/chunk-QD4KM3GO.js index 010d1b96d..70c813810 100644 --- a/assets/cesium/Workers/chunk-CKOGHQ6J.js +++ b/assets/cesium/Workers/chunk-QD4KM3GO.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,16 +25,16 @@ import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { WebGLConstants_default -} from "./chunk-XNRYWRVT.js"; +} from "./chunk-OOK53QUQ.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/IndexDatatype.js var IndexDatatype = { diff --git a/assets/cesium/Workers/chunk-DHO4HQHW.js b/assets/cesium/Workers/chunk-QMLTCCYG.js similarity index 98% rename from assets/cesium/Workers/chunk-DHO4HQHW.js rename to assets/cesium/Workers/chunk-QMLTCCYG.js index 9981433ab..bd1162a20 100644 --- a/assets/cesium/Workers/chunk-DHO4HQHW.js +++ b/assets/cesium/Workers/chunk-QMLTCCYG.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/assets/cesium/Workers/chunk-MMNPUV23.js b/assets/cesium/Workers/chunk-QX5XS4LC.js similarity index 98% rename from assets/cesium/Workers/chunk-MMNPUV23.js rename to assets/cesium/Workers/chunk-QX5XS4LC.js index 2439ee332..7d5c9f850 100644 --- a/assets/cesium/Workers/chunk-MMNPUV23.js +++ b/assets/cesium/Workers/chunk-QX5XS4LC.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,7 +25,7 @@ import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/formatError.js function formatError(object) { diff --git a/assets/cesium/Workers/chunk-EH2PEDWL.js b/assets/cesium/Workers/chunk-R6B7UCQB.js similarity index 96% rename from assets/cesium/Workers/chunk-EH2PEDWL.js rename to assets/cesium/Workers/chunk-R6B7UCQB.js index a9513c8d4..05a5dfa82 100644 --- a/assets/cesium/Workers/chunk-EH2PEDWL.js +++ b/assets/cesium/Workers/chunk-R6B7UCQB.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,7 +25,7 @@ import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; // packages/engine/Source/Core/GeometryAttributes.js function GeometryAttributes(options) { diff --git a/assets/cesium/Workers/chunk-I5XKU3UZ.js b/assets/cesium/Workers/chunk-RJYML24O.js similarity index 92% rename from assets/cesium/Workers/chunk-I5XKU3UZ.js rename to assets/cesium/Workers/chunk-RJYML24O.js index 38b0bea16..a90358d1c 100644 --- a/assets/cesium/Workers/chunk-I5XKU3UZ.js +++ b/assets/cesium/Workers/chunk-RJYML24O.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,40 +25,38 @@ import { EllipsoidRhumbLine_default -} from "./chunk-IDAL54EF.js"; +} from "./chunk-4MSUJ4I7.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; -import { - Cartesian2_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-GR3CDLCP.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { WebGLConstants_default -} from "./chunk-XNRYWRVT.js"; +} from "./chunk-OOK53QUQ.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { __commonJS, __toESM, defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // node_modules/earcut/src/earcut.js var require_earcut = __commonJS({ @@ -69,25 +67,19 @@ var require_earcut = __commonJS({ function earcut2(data, holeIndices, dim) { dim = dim || 2; var hasHoles = holeIndices && holeIndices.length, outerLen = hasHoles ? holeIndices[0] * dim : data.length, outerNode = linkedList(data, 0, outerLen, dim, true), triangles = []; - if (!outerNode || outerNode.next === outerNode.prev) - return triangles; + if (!outerNode || outerNode.next === outerNode.prev) return triangles; var minX, minY, maxX, maxY, x, y, invSize; - if (hasHoles) - outerNode = eliminateHoles(data, holeIndices, outerNode, dim); + if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim); if (data.length > 80 * dim) { minX = maxX = data[0]; minY = maxY = data[1]; for (var i = dim; i < outerLen; i += dim) { x = data[i]; y = data[i + 1]; - if (x < minX) - minX = x; - if (y < minY) - minY = y; - if (x > maxX) - maxX = x; - if (y > maxY) - maxY = y; + if (x < minX) minX = x; + if (y < minY) minY = y; + if (x > maxX) maxX = x; + if (y > maxY) maxY = y; } invSize = Math.max(maxX - minX, maxY - minY); invSize = invSize !== 0 ? 32767 / invSize : 0; @@ -98,11 +90,9 @@ var require_earcut = __commonJS({ function linkedList(data, start, end, dim, clockwise) { var i, last; if (clockwise === signedArea(data, start, end, dim) > 0) { - for (i = start; i < end; i += dim) - last = insertNode(i, data[i], data[i + 1], last); + for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last); } else { - for (i = end - dim; i >= start; i -= dim) - last = insertNode(i, data[i], data[i + 1], last); + for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last); } if (last && equals(last, last.next)) { removeNode(last); @@ -111,18 +101,15 @@ var require_earcut = __commonJS({ return last; } function filterPoints(start, end) { - if (!start) - return start; - if (!end) - end = start; + if (!start) return start; + if (!end) end = start; var p = start, again; do { again = false; if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) { removeNode(p); p = end = p.prev; - if (p === p.next) - break; + if (p === p.next) break; again = true; } else { p = p.next; @@ -131,10 +118,8 @@ var require_earcut = __commonJS({ return end; } function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) { - if (!ear) - return; - if (!pass && invSize) - indexCurve(ear, minX, minY, invSize); + if (!ear) return; + if (!pass && invSize) indexCurve(ear, minX, minY, invSize); var stop = ear, prev, next; while (ear.prev !== ear.next) { prev = ear.prev; @@ -164,42 +149,35 @@ var require_earcut = __commonJS({ } function isEar(ear) { var a = ear.prev, b = ear, c = ear.next; - if (area(a, b, c) >= 0) - return false; + if (area(a, b, c) >= 0) return false; var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y; var x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy; var p = c.next; while (p !== a) { - if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) - return false; + if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false; p = p.next; } return true; } function isEarHashed(ear, minX, minY, invSize) { var a = ear.prev, b = ear, c = ear.next; - if (area(a, b, c) >= 0) - return false; + if (area(a, b, c) >= 0) return false; var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y; var x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy; var minZ = zOrder(x0, y0, minX, minY, invSize), maxZ = zOrder(x1, y1, minX, minY, invSize); var p = ear.prevZ, n = ear.nextZ; while (p && p.z >= minZ && n && n.z <= maxZ) { - if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) - return false; + if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false; p = p.prevZ; - if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) - return false; + if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false; n = n.nextZ; } while (p && p.z >= minZ) { - if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) - return false; + if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false; p = p.prevZ; } while (n && n.z <= maxZ) { - if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) - return false; + if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false; n = n.nextZ; } return true; @@ -244,8 +222,7 @@ var require_earcut = __commonJS({ start = holeIndices[i] * dim; end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; list = linkedList(data, start, end, dim, false); - if (list === list.next) - list.steiner = true; + if (list === list.next) list.steiner = true; queue.push(getLeftmost(list)); } queue.sort(compareX); @@ -274,14 +251,12 @@ var require_earcut = __commonJS({ if (x <= hx && x > qx) { qx = x; m = p.x < p.next.x ? p : p.next; - if (x === hx) - return m; + if (x === hx) return m; } } p = p.next; } while (p !== outerNode); - if (!m) - return null; + if (!m) return null; var stop = m, mx = m.x, my = m.y, tanMin = Infinity, tan; p = m; do { @@ -302,8 +277,7 @@ var require_earcut = __commonJS({ function indexCurve(start, minX, minY, invSize) { var p = start; do { - if (p.z === 0) - p.z = zOrder(p.x, p.y, minX, minY, invSize); + if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize); p.prevZ = p.prev; p.nextZ = p.next; p = p.next; @@ -326,8 +300,7 @@ var require_earcut = __commonJS({ for (i = 0; i < inSize; i++) { pSize++; q = q.nextZ; - if (!q) - break; + if (!q) break; } qSize = inSize; while (pSize > 0 || qSize > 0 && q) { @@ -340,10 +313,8 @@ var require_earcut = __commonJS({ q = q.nextZ; qSize--; } - if (tail) - tail.nextZ = e; - else - list = e; + if (tail) tail.nextZ = e; + else list = e; e.prevZ = tail; tail = e; } @@ -370,8 +341,7 @@ var require_earcut = __commonJS({ function getLeftmost(start) { var p = start, leftmost = start; do { - if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) - leftmost = p; + if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p; p = p.next; } while (p !== start); return leftmost; @@ -396,16 +366,11 @@ var require_earcut = __commonJS({ var o2 = sign(area(p1, q1, q2)); var o3 = sign(area(p2, q2, p1)); var o4 = sign(area(p2, q2, q1)); - if (o1 !== o2 && o3 !== o4) - return true; - if (o1 === 0 && onSegment(p1, p2, q1)) - return true; - if (o2 === 0 && onSegment(p1, q2, q1)) - return true; - if (o3 === 0 && onSegment(p2, p1, q2)) - return true; - if (o4 === 0 && onSegment(p2, q1, q2)) - return true; + if (o1 !== o2 && o3 !== o4) return true; + if (o1 === 0 && onSegment(p1, p2, q1)) return true; + if (o2 === 0 && onSegment(p1, q2, q1)) return true; + if (o3 === 0 && onSegment(p2, p1, q2)) return true; + if (o4 === 0 && onSegment(p2, q1, q2)) return true; return false; } function onSegment(p, q, r) { @@ -417,8 +382,7 @@ var require_earcut = __commonJS({ function intersectsPolygon(a, b) { var p = a; do { - if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) - return true; + if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) return true; p = p.next; } while (p !== a); return false; @@ -463,10 +427,8 @@ var require_earcut = __commonJS({ function removeNode(p) { p.next.prev = p.prev; p.prev.next = p.next; - if (p.prevZ) - p.prevZ.nextZ = p.nextZ; - if (p.nextZ) - p.nextZ.prevZ = p.prevZ; + if (p.prevZ) p.prevZ.nextZ = p.nextZ; + if (p.nextZ) p.nextZ.prevZ = p.prevZ; } function Node(i, x, y) { this.i = i; @@ -513,8 +475,7 @@ var require_earcut = __commonJS({ var dim = data[0][0].length, result = { vertices: [], holes: [], dimensions: dim }, holeIndex = 0; for (var i = 0; i < data.length; i++) { for (var j = 0; j < data[i].length; j++) { - for (var d = 0; d < dim; d++) - result.vertices.push(data[i][j][d]); + for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]); } if (i > 0) { holeIndex += data[i - 1].length; @@ -977,7 +938,7 @@ PolygonPipeline.computeRhumbLineSubdivision = function(ellipsoid, positions, ind return new Geometry_default(geometryOptions); }; PolygonPipeline.scaleToGeodeticHeight = function(positions, height, ellipsoid, scaleToSurface) { - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); let n = scaleToGeodeticHeightN; let p = scaleToGeodeticHeightP; height = defaultValue_default(height, 0); diff --git a/assets/cesium/Workers/chunk-WYMW5NZB.js b/assets/cesium/Workers/chunk-S3PI2KFM.js similarity index 99% rename from assets/cesium/Workers/chunk-WYMW5NZB.js rename to assets/cesium/Workers/chunk-S3PI2KFM.js index 39e87afee..d4e3627c8 100644 --- a/assets/cesium/Workers/chunk-WYMW5NZB.js +++ b/assets/cesium/Workers/chunk-S3PI2KFM.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,7 +25,7 @@ import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/DeveloperError.js function DeveloperError(message) { diff --git a/assets/cesium/Workers/chunk-5HUDPV54.js b/assets/cesium/Workers/chunk-STBBMQGG.js similarity index 96% rename from assets/cesium/Workers/chunk-5HUDPV54.js rename to assets/cesium/Workers/chunk-STBBMQGG.js index b5d8d0eb9..a006fb3c5 100644 --- a/assets/cesium/Workers/chunk-5HUDPV54.js +++ b/assets/cesium/Workers/chunk-STBBMQGG.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,19 +25,19 @@ import { Intersect_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/AxisAlignedBoundingBox.js function AxisAlignedBoundingBox(minimum, maximum, center) { diff --git a/assets/cesium/Workers/chunk-AI2FOC47.js b/assets/cesium/Workers/chunk-SYCPRK3D.js similarity index 96% rename from assets/cesium/Workers/chunk-AI2FOC47.js rename to assets/cesium/Workers/chunk-SYCPRK3D.js index c590fea6c..4d3047983 100644 --- a/assets/cesium/Workers/chunk-AI2FOC47.js +++ b/assets/cesium/Workers/chunk-SYCPRK3D.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,42 +25,40 @@ import { AxisAlignedBoundingBox_default -} from "./chunk-5HUDPV54.js"; +} from "./chunk-STBBMQGG.js"; import { IntersectionTests_default, Ray_default -} from "./chunk-R5NOUYKW.js"; +} from "./chunk-XD445VDH.js"; import { Plane_default -} from "./chunk-PNAD2XAN.js"; +} from "./chunk-4BAE4PWO.js"; import { + Cartesian4_default, + Matrix4_default, Transforms_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-O3JCMSS3.js"; import { Cartesian2_default, - Cartesian4_default, - Matrix4_default -} from "./chunk-IQCBK4CE.js"; -import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/EllipsoidTangentPlane.js var scratchCart4 = new Cartesian4_default(); function EllipsoidTangentPlane(origin, ellipsoid) { Check_default.defined("origin", origin); - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); origin = ellipsoid.scaleToGeodeticSurface(origin); if (!defined_default(origin)) { throw new DeveloperError_default( diff --git a/assets/cesium/Workers/chunk-YK5RU5AO.js b/assets/cesium/Workers/chunk-T77JILCU.js similarity index 97% rename from assets/cesium/Workers/chunk-YK5RU5AO.js rename to assets/cesium/Workers/chunk-T77JILCU.js index 401a49cd6..dee32828f 100644 --- a/assets/cesium/Workers/chunk-YK5RU5AO.js +++ b/assets/cesium/Workers/chunk-T77JILCU.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,7 +25,7 @@ import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/RuntimeError.js function RuntimeError(message) { diff --git a/assets/cesium/Workers/chunk-U5O26DDO.js b/assets/cesium/Workers/chunk-TO2PVHKI.js similarity index 98% rename from assets/cesium/Workers/chunk-U5O26DDO.js rename to assets/cesium/Workers/chunk-TO2PVHKI.js index 4e662373e..790d0090a 100644 --- a/assets/cesium/Workers/chunk-U5O26DDO.js +++ b/assets/cesium/Workers/chunk-TO2PVHKI.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,7 +25,7 @@ import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; // packages/engine/Source/Core/CylinderGeometryLibrary.js var CylinderGeometryLibrary = {}; diff --git a/assets/cesium/Workers/chunk-N73NY3KY.js b/assets/cesium/Workers/chunk-VE7BFUIX.js similarity index 98% rename from assets/cesium/Workers/chunk-N73NY3KY.js rename to assets/cesium/Workers/chunk-VE7BFUIX.js index 8f7d8ba5d..c7bf96f66 100644 --- a/assets/cesium/Workers/chunk-N73NY3KY.js +++ b/assets/cesium/Workers/chunk-VE7BFUIX.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/assets/cesium/Workers/chunk-LID3UUML.js b/assets/cesium/Workers/chunk-VFBNELXB.js similarity index 98% rename from assets/cesium/Workers/chunk-LID3UUML.js rename to assets/cesium/Workers/chunk-VFBNELXB.js index 1ce669d98..a3d663a8b 100644 --- a/assets/cesium/Workers/chunk-LID3UUML.js +++ b/assets/cesium/Workers/chunk-VFBNELXB.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -27,19 +27,19 @@ import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/EllipsoidGeodesic.js function setConstants(ellipsoidGeodesic) { @@ -204,7 +204,7 @@ function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) { setConstants(ellipsoidGeodesic); } function EllipsoidGeodesic(start, end, ellipsoid) { - const e = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); + const e = defaultValue_default(ellipsoid, Ellipsoid_default.default); this._ellipsoid = e; this._start = new Cartographic_default(); this._end = new Cartographic_default(); diff --git a/assets/cesium/Workers/chunk-6JRDO2JP.js b/assets/cesium/Workers/chunk-VO3ACQB2.js similarity index 98% rename from assets/cesium/Workers/chunk-6JRDO2JP.js rename to assets/cesium/Workers/chunk-VO3ACQB2.js index ed4a6c0e6..7fdd8fde0 100644 --- a/assets/cesium/Workers/chunk-6JRDO2JP.js +++ b/assets/cesium/Workers/chunk-VO3ACQB2.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,61 +25,61 @@ import { EllipseGeometryLibrary_default -} from "./chunk-AEADHPUM.js"; +} from "./chunk-NTXTUNEF.js"; import { GeometryInstance_default -} from "./chunk-DD2PDL6D.js"; +} from "./chunk-GRAT5GE7.js"; import { GeometryPipeline_default -} from "./chunk-TIEL2RYB.js"; +} from "./chunk-JYAHOGGL.js"; import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; +} from "./chunk-KUN2ZA5X.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default, - GeographicProjection_default, - Quaternion_default -} from "./chunk-XKGSTUQO.js"; + GeographicProjection_default +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default, + Quaternion_default, Rectangle_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Cartographic_default, Ellipsoid_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/EllipseGeometry.js var scratchCartesian1 = new Cartesian3_default(); @@ -774,7 +774,7 @@ function computeRectangle(center, semiMajorAxis, semiMinorAxis, rotation, granul function EllipseGeometry(options) { options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT); const center = options.center; - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); const semiMajorAxis = options.semiMajorAxis; const semiMinorAxis = options.semiMinorAxis; const granularity = defaultValue_default( @@ -901,7 +901,7 @@ EllipseGeometry.unpack = function(array, startingIndex, result) { EllipseGeometry.computeRectangle = function(options, result) { options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT); const center = options.center; - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); const semiMajorAxis = options.semiMajorAxis; const semiMinorAxis = options.semiMinorAxis; const granularity = defaultValue_default( diff --git a/assets/cesium/Workers/chunk-BLXANKPB.js b/assets/cesium/Workers/chunk-X23FRWHJ.js similarity index 95% rename from assets/cesium/Workers/chunk-BLXANKPB.js rename to assets/cesium/Workers/chunk-X23FRWHJ.js index 5aeae5951..357d3a3b0 100644 --- a/assets/cesium/Workers/chunk-BLXANKPB.js +++ b/assets/cesium/Workers/chunk-X23FRWHJ.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -27,19 +27,19 @@ import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/WebMercatorProjection.js function WebMercatorProjection(ellipsoid) { diff --git a/assets/cesium/Workers/chunk-R5NOUYKW.js b/assets/cesium/Workers/chunk-XD445VDH.js similarity index 99% rename from assets/cesium/Workers/chunk-R5NOUYKW.js rename to assets/cesium/Workers/chunk-XD445VDH.js index 6b99b87ba..a38f90828 100644 --- a/assets/cesium/Workers/chunk-R5NOUYKW.js +++ b/assets/cesium/Workers/chunk-XD445VDH.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,25 +25,25 @@ import { Interval_default -} from "./chunk-XKGSTUQO.js"; +} from "./chunk-DOXCPOG4.js"; import { Cartesian3_default, Cartographic_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; +} from "./chunk-MSKXMXJI.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/QuadraticRealPolynomial.js var QuadraticRealPolynomial = {}; @@ -859,7 +859,7 @@ function addWithCancellationCheck2(left, right, tolerance) { } return difference; } -function quadraticVectorExpression(A, b, c, x, w) { +IntersectionTests.quadraticVectorExpression = function(A, b, c, x, w) { const xSquared = x * x; const wSquared = w * w; const l2 = (A[Matrix3_default.COLUMN1ROW1] - A[Matrix3_default.COLUMN2ROW2]) * wSquared; @@ -955,7 +955,7 @@ function quadraticVectorExpression(A, b, c, x, w) { } } return solutions; -} +}; var firstAxisScratch = new Cartesian3_default(); var secondAxisScratch = new Cartesian3_default(); var thirdAxisScratch = new Cartesian3_default(); @@ -1035,7 +1035,7 @@ IntersectionTests.grazingAltitudeLocation = function(ray, ellipsoid) { aScratch ); const b = Matrix3_default.multiplyByVector(temp, position, bCart); - const solutions = quadraticVectorExpression( + const solutions = IntersectionTests.quadraticVectorExpression( A, Cartesian3_default.negate(b, firstAxisScratch), 0, diff --git a/assets/cesium/Workers/combineGeometry.js b/assets/cesium/Workers/combineGeometry.js index 061b994aa..0b8ed6767 100644 --- a/assets/cesium/Workers/combineGeometry.js +++ b/assets/cesium/Workers/combineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,30 +25,29 @@ import { PrimitivePipeline_default -} from "./chunk-CZFGXAMG.js"; +} from "./chunk-BDFNKFOE.js"; import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; -import "./chunk-BLXANKPB.js"; -import "./chunk-TIEL2RYB.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-EEL3YC6V.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; -import "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; -import "./chunk-FMN2NHBU.js"; +} from "./chunk-QX5XS4LC.js"; +import "./chunk-X23FRWHJ.js"; +import "./chunk-JYAHOGGL.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-I2RC4XVN.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; +import "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; +import "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/combineGeometry.js function combineGeometry(packedParameters, transferableObjects) { diff --git a/assets/cesium/Workers/createBoxGeometry.js b/assets/cesium/Workers/createBoxGeometry.js index 5aaf05c67..624a8700c 100644 --- a/assets/cesium/Workers/createBoxGeometry.js +++ b/assets/cesium/Workers/createBoxGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,24 +25,23 @@ import { BoxGeometry_default -} from "./chunk-4CHSBZNO.js"; -import "./chunk-ZERWARDV.js"; -import "./chunk-N7FIYNQV.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; -import "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-PCP4YQST.js"; +import "./chunk-Q55ECN3Y.js"; +import "./chunk-KUN2ZA5X.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; +import "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createBoxGeometry.js function createBoxGeometry(boxGeometry, offset) { diff --git a/assets/cesium/Workers/createBoxOutlineGeometry.js b/assets/cesium/Workers/createBoxOutlineGeometry.js index 9a7b5b051..cec6d315b 100644 --- a/assets/cesium/Workers/createBoxOutlineGeometry.js +++ b/assets/cesium/Workers/createBoxOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,39 +25,38 @@ import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/BoxOutlineGeometry.js var diffScratch = new Cartesian3_default(); diff --git a/assets/cesium/Workers/createCircleGeometry.js b/assets/cesium/Workers/createCircleGeometry.js index 70e47bfcc..a9fffca45 100644 --- a/assets/cesium/Workers/createCircleGeometry.js +++ b/assets/cesium/Workers/createCircleGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,41 +25,40 @@ import { EllipseGeometry_default -} from "./chunk-6JRDO2JP.js"; -import "./chunk-AEADHPUM.js"; -import "./chunk-DD2PDL6D.js"; -import "./chunk-TIEL2RYB.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-EEL3YC6V.js"; -import "./chunk-ZERWARDV.js"; +} from "./chunk-VO3ACQB2.js"; +import "./chunk-NTXTUNEF.js"; +import "./chunk-GRAT5GE7.js"; +import "./chunk-JYAHOGGL.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-I2RC4XVN.js"; +import "./chunk-Q55ECN3Y.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-KUN2ZA5X.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CircleGeometry.js function CircleGeometry(options) { @@ -94,7 +93,7 @@ var scratchEllipseGeometry = new EllipseGeometry_default({ var scratchOptions = { center: new Cartesian3_default(), radius: void 0, - ellipsoid: Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE), + ellipsoid: Ellipsoid_default.clone(Ellipsoid_default.default), height: void 0, extrudedHeight: void 0, granularity: void 0, @@ -118,6 +117,10 @@ CircleGeometry.unpack = function(array, startingIndex, result) { ellipseGeometry._ellipsoid, scratchOptions.ellipsoid ); + scratchOptions.ellipsoid = Ellipsoid_default.clone( + ellipseGeometry._ellipsoid, + scratchEllipseGeometry._ellipsoid + ); scratchOptions.height = ellipseGeometry._height; scratchOptions.extrudedHeight = ellipseGeometry._extrudedHeight; scratchOptions.granularity = ellipseGeometry._granularity; diff --git a/assets/cesium/Workers/createCircleOutlineGeometry.js b/assets/cesium/Workers/createCircleOutlineGeometry.js index f178177ec..37861866f 100644 --- a/assets/cesium/Workers/createCircleOutlineGeometry.js +++ b/assets/cesium/Workers/createCircleOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,32 +25,31 @@ import { EllipseOutlineGeometry_default -} from "./chunk-JY6WB2NK.js"; -import "./chunk-AEADHPUM.js"; -import "./chunk-ZERWARDV.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-7XGC6YB2.js"; +import "./chunk-NTXTUNEF.js"; +import "./chunk-Q55ECN3Y.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CircleOutlineGeometry.js function CircleOutlineGeometry(options) { diff --git a/assets/cesium/Workers/createCoplanarPolygonGeometry.js b/assets/cesium/Workers/createCoplanarPolygonGeometry.js index 09a6e1307..209959e62 100644 --- a/assets/cesium/Workers/createCoplanarPolygonGeometry.js +++ b/assets/cesium/Workers/createCoplanarPolygonGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,78 +25,77 @@ import { BoundingRectangle_default -} from "./chunk-FNHGOHCI.js"; +} from "./chunk-MDHQR3ZS.js"; import { CoplanarPolygonGeometryLibrary_default -} from "./chunk-F66GYWDZ.js"; -import "./chunk-P2BTKBVY.js"; +} from "./chunk-LEABCTLP.js"; +import "./chunk-AVI4IUWC.js"; import { PolygonGeometryLibrary_default -} from "./chunk-ULABUYF6.js"; -import "./chunk-DHO4HQHW.js"; +} from "./chunk-LCLJJ2MZ.js"; +import "./chunk-QMLTCCYG.js"; import { GeometryInstance_default -} from "./chunk-DD2PDL6D.js"; +} from "./chunk-GRAT5GE7.js"; import { GeometryPipeline_default -} from "./chunk-TIEL2RYB.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-EEL3YC6V.js"; +} from "./chunk-JYAHOGGL.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-I2RC4XVN.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; -import "./chunk-AI2FOC47.js"; -import "./chunk-5HUDPV54.js"; +} from "./chunk-KUN2ZA5X.js"; +import "./chunk-SYCPRK3D.js"; +import "./chunk-STBBMQGG.js"; import { PolygonPipeline_default -} from "./chunk-I5XKU3UZ.js"; +} from "./chunk-RJYML24O.js"; import { arrayRemoveDuplicates_default -} from "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { - BoundingSphere_default, - Quaternion_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; + BoundingSphere_default +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default -} from "./chunk-IQCBK4CE.js"; + Quaternion_default +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Ellipsoid_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CoplanarPolygonGeometry.js var scratchPosition = new Cartesian3_default(); @@ -264,7 +263,7 @@ function CoplanarPolygonGeometry(options) { this._polygonHierarchy = polygonHierarchy; this._stRotation = defaultValue_default(options.stRotation, 0); this._ellipsoid = Ellipsoid_default.clone( - defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84) + defaultValue_default(options.ellipsoid, Ellipsoid_default.default) ); this._workerName = "createCoplanarPolygonGeometry"; this._textureCoordinates = textureCoordinates; diff --git a/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js b/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js index d854db501..3066a810f 100644 --- a/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +++ b/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,64 +25,63 @@ import { CoplanarPolygonGeometryLibrary_default -} from "./chunk-F66GYWDZ.js"; -import "./chunk-P2BTKBVY.js"; +} from "./chunk-LEABCTLP.js"; +import "./chunk-AVI4IUWC.js"; import { PolygonGeometryLibrary_default -} from "./chunk-ULABUYF6.js"; -import "./chunk-DHO4HQHW.js"; +} from "./chunk-LCLJJ2MZ.js"; +import "./chunk-QMLTCCYG.js"; import { GeometryInstance_default -} from "./chunk-DD2PDL6D.js"; +} from "./chunk-GRAT5GE7.js"; import { GeometryPipeline_default -} from "./chunk-TIEL2RYB.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-EEL3YC6V.js"; -import "./chunk-AI2FOC47.js"; -import "./chunk-5HUDPV54.js"; -import "./chunk-I5XKU3UZ.js"; +} from "./chunk-JYAHOGGL.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-I2RC4XVN.js"; +import "./chunk-SYCPRK3D.js"; +import "./chunk-STBBMQGG.js"; +import "./chunk-RJYML24O.js"; import { arrayRemoveDuplicates_default -} from "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js function createGeometryFromPositions(positions) { diff --git a/assets/cesium/Workers/createCorridorGeometry.js b/assets/cesium/Workers/createCorridorGeometry.js index f0e8f86b2..b340258e0 100644 --- a/assets/cesium/Workers/createCorridorGeometry.js +++ b/assets/cesium/Workers/createCorridorGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,70 +25,68 @@ import { CorridorGeometryLibrary_default -} from "./chunk-4MPXTOW6.js"; +} from "./chunk-BJF5LOWE.js"; import { CornerType_default -} from "./chunk-VIAGIVGP.js"; -import "./chunk-2GWOHAWL.js"; -import "./chunk-4JETNOH2.js"; -import "./chunk-LID3UUML.js"; +} from "./chunk-FXIHSF7O.js"; +import "./chunk-DGS5QNIO.js"; +import "./chunk-VFBNELXB.js"; import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; -import "./chunk-AI2FOC47.js"; -import "./chunk-5HUDPV54.js"; +} from "./chunk-KUN2ZA5X.js"; +import "./chunk-SYCPRK3D.js"; +import "./chunk-STBBMQGG.js"; import { PolygonPipeline_default -} from "./chunk-I5XKU3UZ.js"; +} from "./chunk-RJYML24O.js"; import { arrayRemoveDuplicates_default -} from "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; +} from "./chunk-DOXCPOG4.js"; import { Rectangle_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CorridorGeometry.js var cartesian1 = new Cartesian3_default(); @@ -1016,7 +1014,7 @@ function CorridorGeometry(options) { const extrudedHeight = defaultValue_default(options.extrudedHeight, height); this._positions = positions; this._ellipsoid = Ellipsoid_default.clone( - defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84) + defaultValue_default(options.ellipsoid, Ellipsoid_default.default) ); this._vertexFormat = VertexFormat_default.clone( defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT) @@ -1124,7 +1122,7 @@ CorridorGeometry.computeRectangle = function(options, result) { const width = options.width; Check_default.defined("options.positions", positions); Check_default.defined("options.width", width); - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); const cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED); return computeRectangle(positions, ellipsoid, width, cornerType, result); }; diff --git a/assets/cesium/Workers/createCorridorOutlineGeometry.js b/assets/cesium/Workers/createCorridorOutlineGeometry.js index 00aab5351..9750cf7b1 100644 --- a/assets/cesium/Workers/createCorridorOutlineGeometry.js +++ b/assets/cesium/Workers/createCorridorOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,64 +25,62 @@ import { CorridorGeometryLibrary_default -} from "./chunk-4MPXTOW6.js"; +} from "./chunk-BJF5LOWE.js"; import { CornerType_default -} from "./chunk-VIAGIVGP.js"; -import "./chunk-2GWOHAWL.js"; -import "./chunk-4JETNOH2.js"; -import "./chunk-LID3UUML.js"; +} from "./chunk-FXIHSF7O.js"; +import "./chunk-DGS5QNIO.js"; +import "./chunk-VFBNELXB.js"; import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; -import "./chunk-AI2FOC47.js"; -import "./chunk-5HUDPV54.js"; +} from "./chunk-Q55ECN3Y.js"; +import "./chunk-SYCPRK3D.js"; +import "./chunk-STBBMQGG.js"; import { PolygonPipeline_default -} from "./chunk-I5XKU3UZ.js"; +} from "./chunk-RJYML24O.js"; import { arrayRemoveDuplicates_default -} from "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CorridorOutlineGeometry.js var cartesian1 = new Cartesian3_default(); @@ -399,7 +397,7 @@ function CorridorOutlineGeometry(options) { const extrudedHeight = defaultValue_default(options.extrudedHeight, height); this._positions = positions; this._ellipsoid = Ellipsoid_default.clone( - defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84) + defaultValue_default(options.ellipsoid, Ellipsoid_default.default) ); this._width = width; this._height = Math.max(height, extrudedHeight); diff --git a/assets/cesium/Workers/createCylinderGeometry.js b/assets/cesium/Workers/createCylinderGeometry.js index 97517f92c..a15c4a7ad 100644 --- a/assets/cesium/Workers/createCylinderGeometry.js +++ b/assets/cesium/Workers/createCylinderGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,26 +25,25 @@ import { CylinderGeometry_default -} from "./chunk-7ISAYW2A.js"; -import "./chunk-U5O26DDO.js"; -import "./chunk-ZERWARDV.js"; -import "./chunk-N7FIYNQV.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; -import "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-L6RTJ3RE.js"; +import "./chunk-TO2PVHKI.js"; +import "./chunk-Q55ECN3Y.js"; +import "./chunk-KUN2ZA5X.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; +import "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createCylinderGeometry.js function createCylinderGeometry(cylinderGeometry, offset) { diff --git a/assets/cesium/Workers/createCylinderOutlineGeometry.js b/assets/cesium/Workers/createCylinderOutlineGeometry.js index eb10bb1a6..2b85a2030 100644 --- a/assets/cesium/Workers/createCylinderOutlineGeometry.js +++ b/assets/cesium/Workers/createCylinderOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,47 +25,45 @@ import { CylinderGeometryLibrary_default -} from "./chunk-U5O26DDO.js"; +} from "./chunk-TO2PVHKI.js"; import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import { - Cartesian2_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/CylinderOutlineGeometry.js var radiusScratch = new Cartesian2_default(); diff --git a/assets/cesium/Workers/createEllipseGeometry.js b/assets/cesium/Workers/createEllipseGeometry.js index 60932a00e..ef25ef16a 100644 --- a/assets/cesium/Workers/createEllipseGeometry.js +++ b/assets/cesium/Workers/createEllipseGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,35 +25,34 @@ import { EllipseGeometry_default -} from "./chunk-6JRDO2JP.js"; -import "./chunk-AEADHPUM.js"; -import "./chunk-DD2PDL6D.js"; -import "./chunk-TIEL2RYB.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-EEL3YC6V.js"; -import "./chunk-ZERWARDV.js"; -import "./chunk-N7FIYNQV.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-VO3ACQB2.js"; +import "./chunk-NTXTUNEF.js"; +import "./chunk-GRAT5GE7.js"; +import "./chunk-JYAHOGGL.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-I2RC4XVN.js"; +import "./chunk-Q55ECN3Y.js"; +import "./chunk-KUN2ZA5X.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createEllipseGeometry.js function createEllipseGeometry(ellipseGeometry, offset) { diff --git a/assets/cesium/Workers/createEllipseOutlineGeometry.js b/assets/cesium/Workers/createEllipseOutlineGeometry.js index 5a03b13d3..60e0cc9bd 100644 --- a/assets/cesium/Workers/createEllipseOutlineGeometry.js +++ b/assets/cesium/Workers/createEllipseOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,28 +25,27 @@ import { EllipseOutlineGeometry_default -} from "./chunk-JY6WB2NK.js"; -import "./chunk-AEADHPUM.js"; -import "./chunk-ZERWARDV.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-7XGC6YB2.js"; +import "./chunk-NTXTUNEF.js"; +import "./chunk-Q55ECN3Y.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createEllipseOutlineGeometry.js function createEllipseOutlineGeometry(ellipseGeometry, offset) { diff --git a/assets/cesium/Workers/createEllipsoidGeometry.js b/assets/cesium/Workers/createEllipsoidGeometry.js index b7ef1adb1..bf90fd7bf 100644 --- a/assets/cesium/Workers/createEllipsoidGeometry.js +++ b/assets/cesium/Workers/createEllipsoidGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,25 +25,24 @@ import { EllipsoidGeometry_default -} from "./chunk-QX5ASOZZ.js"; -import "./chunk-ZERWARDV.js"; -import "./chunk-N7FIYNQV.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; -import "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-C2CGMAIU.js"; +import "./chunk-Q55ECN3Y.js"; +import "./chunk-KUN2ZA5X.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; +import "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createEllipsoidGeometry.js function createEllipsoidGeometry(ellipsoidGeometry, offset) { diff --git a/assets/cesium/Workers/createEllipsoidOutlineGeometry.js b/assets/cesium/Workers/createEllipsoidOutlineGeometry.js index c3fac1728..e81a9f58c 100644 --- a/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +++ b/assets/cesium/Workers/createEllipsoidOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,24 +25,23 @@ import { EllipsoidOutlineGeometry_default -} from "./chunk-6LG4PY2M.js"; -import "./chunk-ZERWARDV.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; -import "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-5S7OLEPK.js"; +import "./chunk-Q55ECN3Y.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; +import "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createEllipsoidOutlineGeometry.js function createEllipsoidOutlineGeometry(ellipsoidGeometry, offset) { diff --git a/assets/cesium/Workers/createFrustumGeometry.js b/assets/cesium/Workers/createFrustumGeometry.js index df33173ae..becc4eaf9 100644 --- a/assets/cesium/Workers/createFrustumGeometry.js +++ b/assets/cesium/Workers/createFrustumGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,24 +25,23 @@ import { FrustumGeometry_default -} from "./chunk-N3OQDJDV.js"; -import "./chunk-N7FIYNQV.js"; -import "./chunk-PNAD2XAN.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; -import "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-G3YR53LY.js"; +import "./chunk-KUN2ZA5X.js"; +import "./chunk-4BAE4PWO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; +import "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createFrustumGeometry.js function createFrustumGeometry(frustumGeometry, offset) { diff --git a/assets/cesium/Workers/createFrustumOutlineGeometry.js b/assets/cesium/Workers/createFrustumOutlineGeometry.js index e12acfa99..0790e80fe 100644 --- a/assets/cesium/Workers/createFrustumOutlineGeometry.js +++ b/assets/cesium/Workers/createFrustumOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -27,41 +27,41 @@ import { FrustumGeometry_default, OrthographicFrustum_default, PerspectiveFrustum_default -} from "./chunk-N3OQDJDV.js"; -import "./chunk-N7FIYNQV.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-G3YR53LY.js"; +import "./chunk-KUN2ZA5X.js"; +import "./chunk-4BAE4PWO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; +import { + BoundingSphere_default +} from "./chunk-DOXCPOG4.js"; import { - BoundingSphere_default, Quaternion_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/FrustumOutlineGeometry.js var PERSPECTIVE = 0; diff --git a/assets/cesium/Workers/createGeometry.js b/assets/cesium/Workers/createGeometry.js index 18cd9b298..1f6e8ea38 100644 --- a/assets/cesium/Workers/createGeometry.js +++ b/assets/cesium/Workers/createGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,34 +25,37 @@ import { PrimitivePipeline_default -} from "./chunk-CZFGXAMG.js"; +} from "./chunk-BDFNKFOE.js"; import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; -import "./chunk-BLXANKPB.js"; -import "./chunk-TIEL2RYB.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-EEL3YC6V.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; -import "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-QX5XS4LC.js"; +import "./chunk-X23FRWHJ.js"; +import "./chunk-JYAHOGGL.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-I2RC4XVN.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; +import "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import { + defaultValue_default +} from "./chunk-VE7BFUIX.js"; +import { + DeveloperError_default +} from "./chunk-S3PI2KFM.js"; import { __glob, __require, defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // import("./**/*.js") in packages/engine/Source/Workers/createGeometry.js var globImport_js = __glob({ @@ -108,17 +111,28 @@ var globImport_js = __glob({ // packages/engine/Source/Workers/createGeometry.js var moduleCache = {}; -async function getModule(moduleName) { - let module = moduleCache[moduleName]; - if (!defined_default(module)) { +async function getModule(moduleName, modulePath) { + let module = defaultValue_default(moduleCache[modulePath], moduleCache[moduleName]); + if (defined_default(module)) { + return module; + } + if (defined_default(modulePath)) { if (typeof exports === "object") { - moduleCache[module] = module = __require(`Workers/${moduleName}`); + module = __require(modulePath); } else { - const result = await globImport_js(`./${moduleName}.js`); + const result = await import(modulePath); module = result.default; - moduleCache[module] = module; } + moduleCache[modulePath] = module; + return module; } + if (typeof exports === "object") { + module = __require(`Workers/${moduleName}`); + } else { + const result = defined_default(modulePath) ? await import(modulePath) : await globImport_js(`./${moduleName}.js`); + module = result.default; + } + moduleCache[moduleName] = module; return module; } async function createGeometry(parameters, transferableObjects) { @@ -129,10 +143,15 @@ async function createGeometry(parameters, transferableObjects) { const task = subTasks[i]; const geometry = task.geometry; const moduleName = task.moduleName; - if (defined_default(moduleName)) { - resultsOrPromises[i] = getModule(moduleName).then( - (createFunction) => createFunction(geometry, task.offset) - ); + const modulePath = task.modulePath; + if (defined_default(moduleName) && defined_default(modulePath)) { + throw new DeveloperError_default("Must only set moduleName or modulePath"); + } + if (defined_default(moduleName) || defined_default(modulePath)) { + resultsOrPromises[i] = getModule( + moduleName, + modulePath + ).then((createFunction) => createFunction(geometry, task.offset)); } else { resultsOrPromises[i] = geometry; } diff --git a/assets/cesium/Workers/createGroundPolylineGeometry.js b/assets/cesium/Workers/createGroundPolylineGeometry.js index 1c6dd003b..a659d24ca 100644 --- a/assets/cesium/Workers/createGroundPolylineGeometry.js +++ b/assets/cesium/Workers/createGroundPolylineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,73 +25,72 @@ import { WebMercatorProjection_default -} from "./chunk-BLXANKPB.js"; +} from "./chunk-X23FRWHJ.js"; import { ArcType_default -} from "./chunk-DHO4HQHW.js"; +} from "./chunk-QMLTCCYG.js"; import { EncodedCartesian3_default -} from "./chunk-EEL3YC6V.js"; +} from "./chunk-I2RC4XVN.js"; import { EllipsoidGeodesic_default -} from "./chunk-LID3UUML.js"; +} from "./chunk-VFBNELXB.js"; import { arrayRemoveDuplicates_default -} from "./chunk-E5HIGWSZ.js"; +} from "./chunk-DKVHRNFY.js"; import { EllipsoidRhumbLine_default -} from "./chunk-IDAL54EF.js"; +} from "./chunk-4MSUJ4I7.js"; import { IntersectionTests_default -} from "./chunk-R5NOUYKW.js"; +} from "./chunk-XD445VDH.js"; import { Plane_default -} from "./chunk-PNAD2XAN.js"; +} from "./chunk-4BAE4PWO.js"; import { GeometryAttribute_default, Geometry_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default, - GeographicProjection_default, + GeographicProjection_default +} from "./chunk-DOXCPOG4.js"; +import { Quaternion_default, + Rectangle_default, Resource_default, buildModuleUrl_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import { - Cartesian2_default, - Rectangle_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Cartographic_default, Ellipsoid_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/GeographicTilingScheme.js function GeographicTilingScheme(options) { options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT); - this._ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + this._ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); this._rectangle = defaultValue_default(options.rectangle, Rectangle_default.MAX_VALUE); this._projection = new GeographicProjection_default(this._ellipsoid); this._numberOfLevelZeroTilesX = defaultValue_default( @@ -249,7 +248,7 @@ ApproximateTerrainHeights.getMinimumMaximumHeights = function(rectangle, ellipso "You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function" ); } - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); const xyLevel = getTileXYLevel(rectangle); let minTerrainHeight = ApproximateTerrainHeights._defaultMinTerrainHeight; let maxTerrainHeight = ApproximateTerrainHeights._defaultMaxTerrainHeight; @@ -303,7 +302,7 @@ ApproximateTerrainHeights.getBoundingSphere = function(rectangle, ellipsoid) { "You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function" ); } - ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84); + ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default); const xyLevel = getTileXYLevel(rectangle); let maxTerrainHeight = ApproximateTerrainHeights._defaultMaxTerrainHeight; if (defined_default(xyLevel)) { @@ -423,7 +422,7 @@ function GroundPolylineGeometry(options) { this.granularity = defaultValue_default(options.granularity, 9999); this.loop = defaultValue_default(options.loop, false); this.arcType = defaultValue_default(options.arcType, ArcType_default.GEODESIC); - this._ellipsoid = Ellipsoid_default.WGS84; + this._ellipsoid = Ellipsoid_default.default; this._projectionIndex = 0; this._workerName = "createGroundPolylineGeometry"; this._scene3DOnly = false; diff --git a/assets/cesium/Workers/createPlaneGeometry.js b/assets/cesium/Workers/createPlaneGeometry.js index d88838e28..028832470 100644 --- a/assets/cesium/Workers/createPlaneGeometry.js +++ b/assets/cesium/Workers/createPlaneGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,38 +25,37 @@ import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; +} from "./chunk-KUN2ZA5X.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/PlaneGeometry.js function PlaneGeometry(options) { diff --git a/assets/cesium/Workers/createPlaneOutlineGeometry.js b/assets/cesium/Workers/createPlaneOutlineGeometry.js index a4ca46bf6..e1a434c0d 100644 --- a/assets/cesium/Workers/createPlaneOutlineGeometry.js +++ b/assets/cesium/Workers/createPlaneOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,33 +25,32 @@ import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/PlaneOutlineGeometry.js function PlaneOutlineGeometry() { diff --git a/assets/cesium/Workers/createPolygonGeometry.js b/assets/cesium/Workers/createPolygonGeometry.js index fdb617f74..b0b9828b1 100644 --- a/assets/cesium/Workers/createPolygonGeometry.js +++ b/assets/cesium/Workers/createPolygonGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,98 +25,82 @@ import { BoundingRectangle_default -} from "./chunk-FNHGOHCI.js"; +} from "./chunk-MDHQR3ZS.js"; import { PolygonGeometryLibrary_default -} from "./chunk-ULABUYF6.js"; +} from "./chunk-LCLJJ2MZ.js"; import { ArcType_default -} from "./chunk-DHO4HQHW.js"; +} from "./chunk-QMLTCCYG.js"; import { GeometryInstance_default -} from "./chunk-DD2PDL6D.js"; +} from "./chunk-GRAT5GE7.js"; import { GeometryPipeline_default -} from "./chunk-TIEL2RYB.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-EEL3YC6V.js"; -import { - oneTimeWarning_default -} from "./chunk-2GWOHAWL.js"; -import { - EllipsoidGeodesic_default -} from "./chunk-LID3UUML.js"; +} from "./chunk-JYAHOGGL.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-I2RC4XVN.js"; import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; +} from "./chunk-KUN2ZA5X.js"; import { EllipsoidTangentPlane_default -} from "./chunk-AI2FOC47.js"; -import "./chunk-5HUDPV54.js"; +} from "./chunk-SYCPRK3D.js"; +import "./chunk-STBBMQGG.js"; import { PolygonPipeline_default, WindingOrder_default -} from "./chunk-I5XKU3UZ.js"; -import "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; +} from "./chunk-RJYML24O.js"; +import "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; import { IntersectionTests_default, Ray_default -} from "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; +} from "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { - BoundingSphere_default, - Quaternion_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; + BoundingSphere_default +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default, + Quaternion_default, Rectangle_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Cartographic_default, Ellipsoid_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; - -// packages/engine/Source/Core/deprecationWarning.js -function deprecationWarning(identifier, message) { - if (!defined_default(identifier) || !defined_default(message)) { - throw new DeveloperError_default("identifier and message are required."); - } - oneTimeWarning_default(identifier, message); -} -var deprecationWarning_default = deprecationWarning; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/Stereographic.js function Stereographic(position, tangentPlane) { @@ -192,7 +176,7 @@ var scratchCartographic = new Cartographic_default(); var scratchCartesian = new Cartesian3_default(); Stereographic.prototype.getLatitude = function(ellipsoid) { if (!defined_default(ellipsoid)) { - ellipsoid = Ellipsoid_default.WGS84; + ellipsoid = Ellipsoid_default.default; } scratchCartographic.latitude = this.conformalLatitude; scratchCartographic.longitude = this.longitude; @@ -399,7 +383,7 @@ function computeAttributes(options) { scratchPosition ); p = ellipsoid.scaleToGeodeticSurface(p, p); - const st = projectTo2d(p, appendTextureCoordinatesCartesian2); + const st = projectTo2d([p], appendTextureCoordinatesCartesian2)[0]; Cartesian2_default.subtract(st, origin, st); const stx = Math_default.clamp(st.x / boundingRectangle.width, 0, 1); const sty = Math_default.clamp(st.y / boundingRectangle.height, 0, 1); @@ -620,99 +604,6 @@ function computeAttributes(options) { } return geometry; } -var startCartographicScratch = new Cartographic_default(); -var endCartographicScratch = new Cartographic_default(); -var idlCross = { - westOverIDL: 0, - eastOverIDL: 0 -}; -var ellipsoidGeodesic = new EllipsoidGeodesic_default(); -function computeRectangle(positions, ellipsoid, arcType, granularity, result) { - result = defaultValue_default(result, new Rectangle_default()); - if (!defined_default(positions) || positions.length < 3) { - result.west = 0; - result.north = 0; - result.south = 0; - result.east = 0; - return result; - } - if (arcType === ArcType_default.RHUMB) { - return Rectangle_default.fromCartesianArray(positions, ellipsoid, result); - } - if (!ellipsoidGeodesic.ellipsoid.equals(ellipsoid)) { - ellipsoidGeodesic = new EllipsoidGeodesic_default(void 0, void 0, ellipsoid); - } - result.west = Number.POSITIVE_INFINITY; - result.east = Number.NEGATIVE_INFINITY; - result.south = Number.POSITIVE_INFINITY; - result.north = Number.NEGATIVE_INFINITY; - idlCross.westOverIDL = Number.POSITIVE_INFINITY; - idlCross.eastOverIDL = Number.NEGATIVE_INFINITY; - const inverseChordLength = 1 / Math_default.chordLength(granularity, ellipsoid.maximumRadius); - const positionsLength = positions.length; - let endCartographic = ellipsoid.cartesianToCartographic( - positions[0], - endCartographicScratch - ); - let startCartographic = startCartographicScratch; - let swap; - for (let i = 1; i < positionsLength; i++) { - swap = startCartographic; - startCartographic = endCartographic; - endCartographic = ellipsoid.cartesianToCartographic(positions[i], swap); - ellipsoidGeodesic.setEndPoints(startCartographic, endCartographic); - interpolateAndGrowRectangle( - ellipsoidGeodesic, - inverseChordLength, - result, - idlCross - ); - } - swap = startCartographic; - startCartographic = endCartographic; - endCartographic = ellipsoid.cartesianToCartographic(positions[0], swap); - ellipsoidGeodesic.setEndPoints(startCartographic, endCartographic); - interpolateAndGrowRectangle( - ellipsoidGeodesic, - inverseChordLength, - result, - idlCross - ); - if (result.east - result.west > idlCross.eastOverIDL - idlCross.westOverIDL) { - result.west = idlCross.westOverIDL; - result.east = idlCross.eastOverIDL; - if (result.east > Math_default.PI) { - result.east = result.east - Math_default.TWO_PI; - } - if (result.west > Math_default.PI) { - result.west = result.west - Math_default.TWO_PI; - } - } - return result; -} -var interpolatedCartographicScratch = new Cartographic_default(); -function interpolateAndGrowRectangle(ellipsoidGeodesic2, inverseChordLength, result, idlCross2) { - const segmentLength = ellipsoidGeodesic2.surfaceDistance; - const numPoints = Math.ceil(segmentLength * inverseChordLength); - const subsegmentDistance = numPoints > 0 ? segmentLength / (numPoints - 1) : Number.POSITIVE_INFINITY; - let interpolationDistance = 0; - for (let i = 0; i < numPoints; i++) { - const interpolatedCartographic = ellipsoidGeodesic2.interpolateUsingSurfaceDistance( - interpolationDistance, - interpolatedCartographicScratch - ); - interpolationDistance += subsegmentDistance; - const longitude = interpolatedCartographic.longitude; - const latitude = interpolatedCartographic.latitude; - result.west = Math.min(result.west, longitude); - result.east = Math.max(result.east, longitude); - result.south = Math.min(result.south, latitude); - result.north = Math.max(result.north, latitude); - const lonAdjusted = longitude >= 0 ? longitude : longitude + Math_default.TWO_PI; - idlCross2.westOverIDL = Math.min(idlCross2.westOverIDL, lonAdjusted); - idlCross2.eastOverIDL = Math.max(idlCross2.eastOverIDL, lonAdjusted); - } -} var createGeometryFromPositionsExtrudedPositions = []; function createGeometryFromPositionsExtruded(ellipsoid, polygon2, textureCoordinates, granularity, hierarchy, perPositionHeight, closeTop, closeBottom, vertexFormat, arcType) { const geos = { @@ -844,7 +735,7 @@ function PolygonGeometry(options) { } const polygonHierarchy = options.polygonHierarchy; const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT); - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); const granularity = defaultValue_default( options.granularity, Math_default.RADIANS_PER_DEGREE @@ -1144,33 +1035,6 @@ PolygonGeometry.computeRectangleFromPositions = function(positions, ellipsoid, a } return result; }; -PolygonGeometry.computeRectangle = function(options, result) { - Check_default.typeOf.object("options", options); - Check_default.typeOf.object("options.polygonHierarchy", options.polygonHierarchy); - deprecationWarning_default( - "PolygonGeometry.computeRectangle", - "PolygonGeometry.computeRectangle was deprecated in CesiumJS 1.110. It will be removed in CesiumJS 1.112. Use PolygonGeometry.computeRectangleFromPositions instead." - ); - const granularity = defaultValue_default( - options.granularity, - Math_default.RADIANS_PER_DEGREE - ); - const arcType = defaultValue_default(options.arcType, ArcType_default.GEODESIC); - if (arcType !== ArcType_default.GEODESIC && arcType !== ArcType_default.RHUMB) { - throw new DeveloperError_default( - "Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB." - ); - } - const polygonHierarchy = options.polygonHierarchy; - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); - return computeRectangle( - polygonHierarchy.positions, - ellipsoid, - arcType, - granularity, - result - ); -}; var scratchPolarForPlane = new Stereographic_default(); function getTangentPlane(rectangle, positions, ellipsoid) { if (rectangle.height >= Math_default.PI || rectangle.width >= Math_default.PI) { diff --git a/assets/cesium/Workers/createPolygonOutlineGeometry.js b/assets/cesium/Workers/createPolygonOutlineGeometry.js index fb997c5a2..e9daf2fd1 100644 --- a/assets/cesium/Workers/createPolygonOutlineGeometry.js +++ b/assets/cesium/Workers/createPolygonOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,71 +25,70 @@ import { PolygonGeometryLibrary_default -} from "./chunk-ULABUYF6.js"; +} from "./chunk-LCLJJ2MZ.js"; import { ArcType_default -} from "./chunk-DHO4HQHW.js"; +} from "./chunk-QMLTCCYG.js"; import { GeometryInstance_default -} from "./chunk-DD2PDL6D.js"; +} from "./chunk-GRAT5GE7.js"; import { GeometryPipeline_default -} from "./chunk-TIEL2RYB.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-EEL3YC6V.js"; +} from "./chunk-JYAHOGGL.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-I2RC4XVN.js"; import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { EllipsoidTangentPlane_default -} from "./chunk-AI2FOC47.js"; -import "./chunk-5HUDPV54.js"; +} from "./chunk-SYCPRK3D.js"; +import "./chunk-STBBMQGG.js"; import { PolygonPipeline_default, WindingOrder_default -} from "./chunk-I5XKU3UZ.js"; -import "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-RJYML24O.js"; +import "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/PolygonOutlineGeometry.js var createGeometryFromPositionsPositions = []; @@ -316,7 +315,7 @@ function PolygonOutlineGeometry(options) { ); } const polygonHierarchy = options.polygonHierarchy; - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); const granularity = defaultValue_default( options.granularity, Math_default.RADIANS_PER_DEGREE diff --git a/assets/cesium/Workers/createPolylineGeometry.js b/assets/cesium/Workers/createPolylineGeometry.js index 01a729cf8..174989612 100644 --- a/assets/cesium/Workers/createPolylineGeometry.js +++ b/assets/cesium/Workers/createPolylineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,61 +25,60 @@ import { Color_default -} from "./chunk-TDVU7NH7.js"; +} from "./chunk-4YSNMHZ4.js"; import { ArcType_default -} from "./chunk-DHO4HQHW.js"; +} from "./chunk-QMLTCCYG.js"; import { PolylinePipeline_default -} from "./chunk-4JETNOH2.js"; -import "./chunk-LID3UUML.js"; +} from "./chunk-DGS5QNIO.js"; +import "./chunk-VFBNELXB.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; +} from "./chunk-KUN2ZA5X.js"; import { arrayRemoveDuplicates_default -} from "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, GeometryType_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/PolylineGeometry.js var scratchInterpolateColorsArray = []; @@ -143,7 +142,7 @@ function PolylineGeometry(options) { Math_default.RADIANS_PER_DEGREE ); this._ellipsoid = Ellipsoid_default.clone( - defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84) + defaultValue_default(options.ellipsoid, Ellipsoid_default.default) ); this._workerName = "createPolylineGeometry"; let numComponents = 1 + positions.length * Cartesian3_default.packedLength; diff --git a/assets/cesium/Workers/createPolylineVolumeGeometry.js b/assets/cesium/Workers/createPolylineVolumeGeometry.js index fa4f2935f..0fcb9c768 100644 --- a/assets/cesium/Workers/createPolylineVolumeGeometry.js +++ b/assets/cesium/Workers/createPolylineVolumeGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,75 +25,71 @@ import { BoundingRectangle_default -} from "./chunk-FNHGOHCI.js"; +} from "./chunk-MDHQR3ZS.js"; import { GeometryPipeline_default -} from "./chunk-TIEL2RYB.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-EEL3YC6V.js"; +} from "./chunk-JYAHOGGL.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-I2RC4XVN.js"; import { CornerType_default, - PolylineVolumeGeometryLibrary_default -} from "./chunk-VIAGIVGP.js"; -import { + PolylineVolumeGeometryLibrary_default, oneTimeWarning_default -} from "./chunk-2GWOHAWL.js"; -import "./chunk-4JETNOH2.js"; -import "./chunk-LID3UUML.js"; +} from "./chunk-FXIHSF7O.js"; +import "./chunk-DGS5QNIO.js"; +import "./chunk-VFBNELXB.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; -import "./chunk-AI2FOC47.js"; -import "./chunk-5HUDPV54.js"; +} from "./chunk-KUN2ZA5X.js"; +import "./chunk-SYCPRK3D.js"; +import "./chunk-STBBMQGG.js"; import { PolygonPipeline_default, WindingOrder_default -} from "./chunk-I5XKU3UZ.js"; +} from "./chunk-RJYML24O.js"; import { arrayRemoveDuplicates_default -} from "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import { - Cartesian2_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/PolylineVolumeGeometry.js function computeAttributes(combinedPositions, shape, boundingRectangle, vertexFormat) { @@ -235,7 +231,7 @@ function PolylineVolumeGeometry(options) { this._positions = positions; this._shape = shape; this._ellipsoid = Ellipsoid_default.clone( - defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84) + defaultValue_default(options.ellipsoid, Ellipsoid_default.default) ); this._cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED); this._vertexFormat = VertexFormat_default.clone( diff --git a/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js b/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js index 656b25c8d..af024710f 100644 --- a/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +++ b/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,65 +25,62 @@ import { BoundingRectangle_default -} from "./chunk-FNHGOHCI.js"; +} from "./chunk-MDHQR3ZS.js"; import { CornerType_default, PolylineVolumeGeometryLibrary_default -} from "./chunk-VIAGIVGP.js"; -import "./chunk-2GWOHAWL.js"; -import "./chunk-4JETNOH2.js"; -import "./chunk-LID3UUML.js"; -import "./chunk-AI2FOC47.js"; -import "./chunk-5HUDPV54.js"; +} from "./chunk-FXIHSF7O.js"; +import "./chunk-DGS5QNIO.js"; +import "./chunk-VFBNELXB.js"; +import "./chunk-SYCPRK3D.js"; +import "./chunk-STBBMQGG.js"; import { PolygonPipeline_default, WindingOrder_default -} from "./chunk-I5XKU3UZ.js"; +} from "./chunk-RJYML24O.js"; import { arrayRemoveDuplicates_default -} from "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import { - Cartesian2_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js function computeAttributes(positions, shape) { @@ -148,7 +145,7 @@ function PolylineVolumeOutlineGeometry(options) { this._positions = positions; this._shape = shape; this._ellipsoid = Ellipsoid_default.clone( - defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84) + defaultValue_default(options.ellipsoid, Ellipsoid_default.default) ); this._cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED); this._granularity = defaultValue_default( diff --git a/assets/cesium/Workers/createRectangleGeometry.js b/assets/cesium/Workers/createRectangleGeometry.js index f6f40e053..2c3743d21 100644 --- a/assets/cesium/Workers/createRectangleGeometry.js +++ b/assets/cesium/Workers/createRectangleGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,72 +25,71 @@ import { RectangleGeometryLibrary_default -} from "./chunk-CHGQXPF3.js"; +} from "./chunk-AD5HBJ2F.js"; import { GeometryInstance_default -} from "./chunk-DD2PDL6D.js"; +} from "./chunk-GRAT5GE7.js"; import { GeometryPipeline_default -} from "./chunk-TIEL2RYB.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-EEL3YC6V.js"; +} from "./chunk-JYAHOGGL.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-I2RC4XVN.js"; import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; +} from "./chunk-KUN2ZA5X.js"; import { PolygonPipeline_default -} from "./chunk-I5XKU3UZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-RJYML24O.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { - BoundingSphere_default, - Quaternion_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; + BoundingSphere_default +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default, Matrix2_default, + Quaternion_default, Rectangle_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Cartographic_default, Ellipsoid_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/RectangleGeometry.js var positionScratch = new Cartesian3_default(); @@ -936,7 +935,7 @@ function RectangleGeometry(options) { Math_default.RADIANS_PER_DEGREE ); this._ellipsoid = Ellipsoid_default.clone( - defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84) + defaultValue_default(options.ellipsoid, Ellipsoid_default.default) ); this._surfaceHeight = Math.max(height, extrudedHeight); this._rotation = defaultValue_default(options.rotation, 0); @@ -1041,7 +1040,7 @@ RectangleGeometry.computeRectangle = function(options, result) { options.granularity, Math_default.RADIANS_PER_DEGREE ); - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); const rotation = defaultValue_default(options.rotation, 0); return computeRectangle(rectangle, granularity, rotation, ellipsoid, result); }; diff --git a/assets/cesium/Workers/createRectangleOutlineGeometry.js b/assets/cesium/Workers/createRectangleOutlineGeometry.js index dcda3431e..9f958af40 100644 --- a/assets/cesium/Workers/createRectangleOutlineGeometry.js +++ b/assets/cesium/Workers/createRectangleOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,54 +25,53 @@ import { RectangleGeometryLibrary_default -} from "./chunk-CHGQXPF3.js"; +} from "./chunk-AD5HBJ2F.js"; import { GeometryOffsetAttribute_default -} from "./chunk-ZERWARDV.js"; +} from "./chunk-Q55ECN3Y.js"; import { PolygonPipeline_default -} from "./chunk-I5XKU3UZ.js"; -import "./chunk-IDAL54EF.js"; +} from "./chunk-RJYML24O.js"; +import "./chunk-4MSUJ4I7.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; +} from "./chunk-DOXCPOG4.js"; import { Rectangle_default -} from "./chunk-IQCBK4CE.js"; +} from "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/RectangleOutlineGeometry.js var bottomBoundingSphere = new BoundingSphere_default(); @@ -203,11 +202,9 @@ function constructRectangle(geometry, computedOptions) { return geo; } function constructExtrudedRectangle(rectangleGeometry, computedOptions) { - const surfaceHeight = rectangleGeometry._surfaceHeight; - const extrudedHeight = rectangleGeometry._extrudedHeight; + const maxHeight = rectangleGeometry._surfaceHeight; + const minHeight = rectangleGeometry._extrudedHeight; const ellipsoid = rectangleGeometry._ellipsoid; - const minHeight = extrudedHeight; - const maxHeight = surfaceHeight; const geo = constructRectangle(rectangleGeometry, computedOptions); const height = computedOptions.height; const width = computedOptions.width; @@ -281,7 +278,7 @@ function RectangleOutlineGeometry(options) { options.granularity, Math_default.RADIANS_PER_DEGREE ); - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); const rotation = defaultValue_default(options.rotation, 0); if (!defined_default(rectangle)) { throw new DeveloperError_default("rectangle is required."); diff --git a/assets/cesium/Workers/createSimplePolylineGeometry.js b/assets/cesium/Workers/createSimplePolylineGeometry.js index 7b187c5a1..157d68515 100644 --- a/assets/cesium/Workers/createSimplePolylineGeometry.js +++ b/assets/cesium/Workers/createSimplePolylineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,54 +25,53 @@ import { Color_default -} from "./chunk-TDVU7NH7.js"; +} from "./chunk-4YSNMHZ4.js"; import { ArcType_default -} from "./chunk-DHO4HQHW.js"; +} from "./chunk-QMLTCCYG.js"; import { PolylinePipeline_default -} from "./chunk-4JETNOH2.js"; -import "./chunk-LID3UUML.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-DGS5QNIO.js"; +import "./chunk-VFBNELXB.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/SimplePolylineGeometry.js function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) { @@ -127,7 +126,7 @@ function SimplePolylineGeometry(options) { options.granularity, Math_default.RADIANS_PER_DEGREE ); - this._ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + this._ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); this._workerName = "createSimplePolylineGeometry"; let numComponents = 1 + positions.length * Cartesian3_default.packedLength; numComponents += defined_default(colors) ? 1 + colors.length * Color_default.packedLength : 1; diff --git a/assets/cesium/Workers/createSphereGeometry.js b/assets/cesium/Workers/createSphereGeometry.js index 2e58e1040..c84ebb0f1 100644 --- a/assets/cesium/Workers/createSphereGeometry.js +++ b/assets/cesium/Workers/createSphereGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,33 +25,32 @@ import { EllipsoidGeometry_default -} from "./chunk-QX5ASOZZ.js"; -import "./chunk-ZERWARDV.js"; +} from "./chunk-C2CGMAIU.js"; +import "./chunk-Q55ECN3Y.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-KUN2ZA5X.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/SphereGeometry.js function SphereGeometry(options) { diff --git a/assets/cesium/Workers/createSphereOutlineGeometry.js b/assets/cesium/Workers/createSphereOutlineGeometry.js index 6c1664a19..58bb65b91 100644 --- a/assets/cesium/Workers/createSphereOutlineGeometry.js +++ b/assets/cesium/Workers/createSphereOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,30 +25,29 @@ import { EllipsoidOutlineGeometry_default -} from "./chunk-6LG4PY2M.js"; -import "./chunk-ZERWARDV.js"; -import "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-5S7OLEPK.js"; +import "./chunk-Q55ECN3Y.js"; +import "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; +import "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/SphereOutlineGeometry.js function SphereOutlineGeometry(options) { diff --git a/assets/cesium/Workers/createTaskProcessorWorker.js b/assets/cesium/Workers/createTaskProcessorWorker.js index 1508f3bfc..69a2ded00 100644 --- a/assets/cesium/Workers/createTaskProcessorWorker.js +++ b/assets/cesium/Workers/createTaskProcessorWorker.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,8 +25,8 @@ import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; -import "./chunk-FMN2NHBU.js"; +} from "./chunk-QX5XS4LC.js"; +import "./chunk-AA4GZKOT.js"; export { createTaskProcessorWorker_default as default }; diff --git a/assets/cesium/Workers/createVectorTileClampedPolylines.js b/assets/cesium/Workers/createVectorTileClampedPolylines.js index f2ded24eb..3c80e3068 100644 --- a/assets/cesium/Workers/createVectorTileClampedPolylines.js +++ b/assets/cesium/Workers/createVectorTileClampedPolylines.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,33 +25,31 @@ import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { AttributeCompression_default -} from "./chunk-4EXWKTY2.js"; +} from "./chunk-OORVMGDU.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { + Rectangle_default, combine_default -} from "./chunk-DNCKFFNR.js"; -import { - Rectangle_default -} from "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; -import "./chunk-FMN2NHBU.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; +import "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createVectorTileClampedPolylines.js var MAX_SHORT = 32767; diff --git a/assets/cesium/Workers/createVectorTileGeometries.js b/assets/cesium/Workers/createVectorTileGeometries.js index 76b2c5904..08b05a079 100644 --- a/assets/cesium/Workers/createVectorTileGeometries.js +++ b/assets/cesium/Workers/createVectorTileGeometries.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,46 +25,45 @@ import { Color_default -} from "./chunk-TDVU7NH7.js"; +} from "./chunk-4YSNMHZ4.js"; import { CylinderGeometry_default -} from "./chunk-7ISAYW2A.js"; -import "./chunk-U5O26DDO.js"; +} from "./chunk-L6RTJ3RE.js"; +import "./chunk-TO2PVHKI.js"; import { EllipsoidGeometry_default -} from "./chunk-QX5ASOZZ.js"; +} from "./chunk-C2CGMAIU.js"; import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { BoxGeometry_default -} from "./chunk-4CHSBZNO.js"; -import "./chunk-ZERWARDV.js"; -import "./chunk-N7FIYNQV.js"; +} from "./chunk-PCP4YQST.js"; +import "./chunk-Q55ECN3Y.js"; +import "./chunk-KUN2ZA5X.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; -import "./chunk-EH2PEDWL.js"; -import "./chunk-3R5RPSYS.js"; +} from "./chunk-QD4KM3GO.js"; +import "./chunk-R6B7UCQB.js"; +import "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; +} from "./chunk-DOXCPOG4.js"; import { Matrix4_default -} from "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default -} from "./chunk-54GSYZWT.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-PYHLO636.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Scene/Vector3DTileBatch.js function Vector3DTileBatch(options) { diff --git a/assets/cesium/Workers/createVectorTilePoints.js b/assets/cesium/Workers/createVectorTilePoints.js index 0a781164c..24f1df992 100644 --- a/assets/cesium/Workers/createVectorTilePoints.js +++ b/assets/cesium/Workers/createVectorTilePoints.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,27 +25,27 @@ import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { AttributeCompression_default -} from "./chunk-4EXWKTY2.js"; +} from "./chunk-OORVMGDU.js"; import { Rectangle_default -} from "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; -import "./chunk-FMN2NHBU.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; +import "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createVectorTilePoints.js var maxShort = 32767; diff --git a/assets/cesium/Workers/createVectorTilePolygons.js b/assets/cesium/Workers/createVectorTilePolygons.js index af3b1d4e6..31924db84 100644 --- a/assets/cesium/Workers/createVectorTilePolygons.js +++ b/assets/cesium/Workers/createVectorTilePolygons.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,44 +25,43 @@ import { Color_default -} from "./chunk-TDVU7NH7.js"; +} from "./chunk-4YSNMHZ4.js"; import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { OrientedBoundingBox_default -} from "./chunk-P2BTKBVY.js"; +} from "./chunk-AVI4IUWC.js"; import { AttributeCompression_default -} from "./chunk-4EXWKTY2.js"; -import "./chunk-AI2FOC47.js"; -import "./chunk-5HUDPV54.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-OORVMGDU.js"; +import "./chunk-SYCPRK3D.js"; +import "./chunk-STBBMQGG.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; -import "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; +} from "./chunk-QD4KM3GO.js"; +import "./chunk-DOXCPOG4.js"; import { Rectangle_default -} from "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createVectorTilePolygons.js var scratchCenter = new Cartesian3_default(); diff --git a/assets/cesium/Workers/createVectorTilePolylines.js b/assets/cesium/Workers/createVectorTilePolylines.js index 8e369ad81..73ac5a7ff 100644 --- a/assets/cesium/Workers/createVectorTilePolylines.js +++ b/assets/cesium/Workers/createVectorTilePolylines.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,33 +25,31 @@ import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { AttributeCompression_default -} from "./chunk-4EXWKTY2.js"; +} from "./chunk-OORVMGDU.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { + Rectangle_default, combine_default -} from "./chunk-DNCKFFNR.js"; -import { - Rectangle_default -} from "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; -import "./chunk-FMN2NHBU.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; +import "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/decodeVectorPolylinePositions.js var maxShort = 32767; diff --git a/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js b/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js index aa8de9679..ee73ea853 100644 --- a/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +++ b/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -26,53 +26,52 @@ import { EllipsoidalOccluder_default, TerrainEncoding_default -} from "./chunk-KFCTEEBD.js"; +} from "./chunk-BCL4PHHT.js"; import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { WebMercatorProjection_default -} from "./chunk-BLXANKPB.js"; +} from "./chunk-X23FRWHJ.js"; import { OrientedBoundingBox_default -} from "./chunk-P2BTKBVY.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-AI2FOC47.js"; +} from "./chunk-AVI4IUWC.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-SYCPRK3D.js"; import { AxisAlignedBoundingBox_default -} from "./chunk-5HUDPV54.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-STBBMQGG.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { - BoundingSphere_default, - Transforms_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; + BoundingSphere_default +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default, Matrix4_default, - Rectangle_default -} from "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; + Rectangle_default, + Transforms_default +} from "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; import { RuntimeError_default -} from "./chunk-YK5RU5AO.js"; +} from "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js var sizeOfUint16 = Uint16Array.BYTES_PER_ELEMENT; diff --git a/assets/cesium/Workers/createVerticesFromHeightmap.js b/assets/cesium/Workers/createVerticesFromHeightmap.js index 9b083fec8..df0f5a573 100644 --- a/assets/cesium/Workers/createVerticesFromHeightmap.js +++ b/assets/cesium/Workers/createVerticesFromHeightmap.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -26,56 +26,55 @@ import { EllipsoidalOccluder_default, TerrainEncoding_default -} from "./chunk-KFCTEEBD.js"; +} from "./chunk-BCL4PHHT.js"; import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { WebMercatorProjection_default -} from "./chunk-BLXANKPB.js"; +} from "./chunk-X23FRWHJ.js"; import { OrientedBoundingBox_default -} from "./chunk-P2BTKBVY.js"; -import "./chunk-4EXWKTY2.js"; -import "./chunk-AI2FOC47.js"; +} from "./chunk-AVI4IUWC.js"; +import "./chunk-OORVMGDU.js"; +import "./chunk-SYCPRK3D.js"; import { AxisAlignedBoundingBox_default -} from "./chunk-5HUDPV54.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-STBBMQGG.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { - BoundingSphere_default, - Transforms_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; + BoundingSphere_default +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default, Matrix4_default, - Rectangle_default -} from "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; + Rectangle_default, + Transforms_default +} from "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; import { RuntimeError_default -} from "./chunk-YK5RU5AO.js"; +} from "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { __commonJS, __toESM, defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // node_modules/lerc/LercDecode.js var require_LercDecode = __commonJS({ @@ -1932,7 +1931,7 @@ HeightmapTessellator.computeVertices = function(options) { const skirtHeight = options.skirtHeight; const hasSkirts = skirtHeight > 0; const isGeographic = defaultValue_default(options.isGeographic, true); - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); const oneOverGlobeSemimajorAxis = 1 / ellipsoid.maximumRadius; const nativeRectangle = Rectangle_default.clone(options.nativeRectangle); const rectangle = Rectangle_default.clone(options.rectangle); diff --git a/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js b/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js index 0378973e4..b4407188e 100644 --- a/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +++ b/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -26,47 +26,45 @@ import { EllipsoidalOccluder_default, TerrainEncoding_default -} from "./chunk-KFCTEEBD.js"; +} from "./chunk-BCL4PHHT.js"; import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { WebMercatorProjection_default -} from "./chunk-BLXANKPB.js"; -import "./chunk-4EXWKTY2.js"; +} from "./chunk-X23FRWHJ.js"; +import "./chunk-OORVMGDU.js"; import { AxisAlignedBoundingBox_default -} from "./chunk-5HUDPV54.js"; +} from "./chunk-STBBMQGG.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; +import "./chunk-DOXCPOG4.js"; import { + Matrix4_default, + Rectangle_default, Transforms_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; +} from "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { Cartesian2_default, - Matrix4_default, - Rectangle_default -} from "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; -import { Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/TerrainProvider.js function TerrainProvider() { diff --git a/assets/cesium/Workers/createWallGeometry.js b/assets/cesium/Workers/createWallGeometry.js index 7ec8eebf9..b1f796759 100644 --- a/assets/cesium/Workers/createWallGeometry.js +++ b/assets/cesium/Workers/createWallGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,53 +25,52 @@ import { WallGeometryLibrary_default -} from "./chunk-HX5XY3NH.js"; -import "./chunk-4JETNOH2.js"; -import "./chunk-LID3UUML.js"; +} from "./chunk-COYFZ5VA.js"; +import "./chunk-DGS5QNIO.js"; +import "./chunk-VFBNELXB.js"; import { VertexFormat_default -} from "./chunk-N7FIYNQV.js"; -import "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-KUN2ZA5X.js"; +import "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/WallGeometry.js var scratchCartesian3Position1 = new Cartesian3_default(); @@ -104,7 +103,7 @@ function WallGeometry(options) { options.granularity, Math_default.RADIANS_PER_DEGREE ); - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); this._positions = wallPositions; this._minimumHeights = minimumHeights; this._maximumHeights = maximumHeights; diff --git a/assets/cesium/Workers/createWallOutlineGeometry.js b/assets/cesium/Workers/createWallOutlineGeometry.js index 7bdcfb3fb..01507be35 100644 --- a/assets/cesium/Workers/createWallOutlineGeometry.js +++ b/assets/cesium/Workers/createWallOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,50 +25,49 @@ import { WallGeometryLibrary_default -} from "./chunk-HX5XY3NH.js"; -import "./chunk-4JETNOH2.js"; -import "./chunk-LID3UUML.js"; -import "./chunk-E5HIGWSZ.js"; -import "./chunk-IDAL54EF.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-COYFZ5VA.js"; +import "./chunk-DGS5QNIO.js"; +import "./chunk-VFBNELXB.js"; +import "./chunk-DKVHRNFY.js"; +import "./chunk-4MSUJ4I7.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { GeometryAttributes_default -} from "./chunk-EH2PEDWL.js"; +} from "./chunk-R6B7UCQB.js"; import { GeometryAttribute_default, Geometry_default, PrimitiveType_default -} from "./chunk-3R5RPSYS.js"; +} from "./chunk-GR3CDLCP.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; -import "./chunk-IQCBK4CE.js"; +} from "./chunk-DOXCPOG4.js"; +import "./chunk-O3JCMSS3.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; +} from "./chunk-2J3JKXCP.js"; import { Cartesian3_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/WallOutlineGeometry.js var scratchCartesian3Position1 = new Cartesian3_default(); @@ -95,7 +94,7 @@ function WallOutlineGeometry(options) { options.granularity, Math_default.RADIANS_PER_DEGREE ); - const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84); + const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default); this._positions = wallPositions; this._minimumHeights = minimumHeights; this._maximumHeights = maximumHeights; diff --git a/assets/cesium/Workers/decodeDraco.js b/assets/cesium/Workers/decodeDraco.js index 4356f5af2..8b4e1147b 100644 --- a/assets/cesium/Workers/decodeDraco.js +++ b/assets/cesium/Workers/decodeDraco.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,27 +25,27 @@ import { require_draco_decoder_nodejs -} from "./chunk-ICD3BWBC.js"; +} from "./chunk-3WUV74WM.js"; import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { ComponentDatatype_default -} from "./chunk-UJ76JVUZ.js"; -import "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; +} from "./chunk-2J3JKXCP.js"; +import "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; import { RuntimeError_default -} from "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; +import "./chunk-S3PI2KFM.js"; import { __toESM, defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/decodeDraco.js var import_draco_decoder_nodejs = __toESM(require_draco_decoder_nodejs(), 1); diff --git a/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js b/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js index 8fa433306..d3534999c 100644 --- a/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +++ b/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,18 +25,18 @@ import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { RuntimeError_default -} from "./chunk-YK5RU5AO.js"; +} from "./chunk-T77JILCU.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { __commonJS, __toESM, defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // node_modules/pako/lib/zlib/adler32.js var require_adler32 = __commonJS({ @@ -2219,12 +2219,9 @@ var require_inflate2 = __commonJS({ const chunkSize = this.options.chunkSize; const dictionary = this.options.dictionary; let status, _flush_mode, last_avail_out; - if (this.ended) - return false; - if (flush_mode === ~~flush_mode) - _flush_mode = flush_mode; - else - _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH; + if (this.ended) return false; + if (flush_mode === ~~flush_mode) _flush_mode = flush_mode; + else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH; if (toString.call(data) === "[object ArrayBuffer]") { strm.input = new Uint8Array(data); } else { @@ -2269,24 +2266,21 @@ var require_inflate2 = __commonJS({ let utf8str = strings.buf2string(strm.output, next_out_utf8); strm.next_out = tail; strm.avail_out = chunkSize - tail; - if (tail) - strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0); + if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0); this.onData(utf8str); } else { this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out)); } } } - if (status === Z_OK && last_avail_out === 0) - continue; + if (status === Z_OK && last_avail_out === 0) continue; if (status === Z_STREAM_END) { status = zlib_inflate.inflateEnd(this.strm); this.onEnd(status); this.ended = true; return true; } - if (strm.avail_in === 0) - break; + if (strm.avail_in === 0) break; } return true; }; @@ -2308,8 +2302,7 @@ var require_inflate2 = __commonJS({ function inflate(input, options) { const inflator = new Inflate(options); inflator.push(input); - if (inflator.err) - throw inflator.msg || msg[inflator.err]; + if (inflator.err) throw inflator.msg || msg[inflator.err]; return inflator.result; } function inflateRaw(input, options) { diff --git a/assets/cesium/Workers/decodeI3S.js b/assets/cesium/Workers/decodeI3S.js index 07c64ed9f..f2b1b067a 100644 --- a/assets/cesium/Workers/decodeI3S.js +++ b/assets/cesium/Workers/decodeI3S.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,31 +25,54 @@ import { require_draco_decoder_nodejs -} from "./chunk-ICD3BWBC.js"; +} from "./chunk-3WUV74WM.js"; +import { + Color_default +} from "./chunk-4YSNMHZ4.js"; import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { WebMercatorProjection_default -} from "./chunk-BLXANKPB.js"; +} from "./chunk-X23FRWHJ.js"; import { Cartesian3_default, Cartographic_default, Ellipsoid_default, Matrix3_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-N73NY3KY.js"; -import "./chunk-WYMW5NZB.js"; +} from "./chunk-MSKXMXJI.js"; +import { + defaultValue_default +} from "./chunk-VE7BFUIX.js"; +import { + Check_default +} from "./chunk-S3PI2KFM.js"; import { __toESM, defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Workers/decodeI3S.js var import_draco_decoder_nodejs = __toESM(require_draco_decoder_nodejs(), 1); + +// packages/engine/Source/Core/srgbToLinear.js +function srgbToLinear(value) { + Check_default.defined("value", value); + if (value <= 0.04045) { + return value * 0.07739938080495357; + } + return Math.pow( + // eslint-disable-next-line no-loss-of-precision + (value + 0.055) * 0.9478672985781991, + 2.4 + ); +} +var srgbToLinear_default = srgbToLinear; + +// packages/engine/Source/Workers/decodeI3S.js var draco; function bilinearInterpolate(tx, ty, h00, h10, h01, h11) { const a = h00 * (1 - tx) + h10 * tx; @@ -171,7 +194,317 @@ function cropUVs(vertexCount, uv0s, uvRegions) { uv0s[vertexIndex * 2 + 1] += minV; } } -function generateGltfBuffer(vertexCount, indices, positions, normals, uv0s, colors) { +function generateIndexArray(vertexCount, indices, colors, splitGeometryByColorTransparency) { + const indexArray = new Uint32Array(vertexCount); + const vertexIndexFn = defined_default(indices) ? (vertexIndex) => indices[vertexIndex] : (vertexIndex) => vertexIndex; + let transparentVertexOffset = 0; + if (splitGeometryByColorTransparency && defined_default(colors)) { + const isVertexTransparentFn = (vertexIndex) => colors[vertexIndexFn(vertexIndex) * 4 + 3] < 255; + for (let vertexIndex = 0; vertexIndex < vertexCount; vertexIndex += 3) { + if (!isVertexTransparentFn(vertexIndex) && !isVertexTransparentFn(vertexIndex + 1) && !isVertexTransparentFn(vertexIndex + 2)) { + indexArray[transparentVertexOffset++] = vertexIndexFn(vertexIndex); + indexArray[transparentVertexOffset++] = vertexIndexFn(vertexIndex + 1); + indexArray[transparentVertexOffset++] = vertexIndexFn(vertexIndex + 2); + } + } + if (transparentVertexOffset > 0) { + let offset = transparentVertexOffset; + for (let vertexIndex = 0; vertexIndex < vertexCount; vertexIndex += 3) { + if (isVertexTransparentFn(vertexIndex) || isVertexTransparentFn(vertexIndex + 1) || isVertexTransparentFn(vertexIndex + 2)) { + indexArray[offset++] = vertexIndexFn(vertexIndex); + indexArray[offset++] = vertexIndexFn(vertexIndex + 1); + indexArray[offset++] = vertexIndexFn(vertexIndex + 2); + } + } + } else { + for (let vertexIndex = 0; vertexIndex < vertexCount; ++vertexIndex) { + indexArray[vertexIndex] = vertexIndexFn(vertexIndex); + } + } + } else { + transparentVertexOffset = vertexCount; + for (let vertexIndex = 0; vertexIndex < vertexCount; ++vertexIndex) { + indexArray[vertexIndex] = vertexIndexFn(vertexIndex); + } + } + return { + indexArray, + transparentVertexOffset + }; +} +function getFeatureHash(symbologyData, outlinesHash, featureIndex) { + const featureHash = outlinesHash[featureIndex]; + if (defined_default(featureHash)) { + return featureHash; + } + const newFeatureHash = outlinesHash[featureIndex] = { + positions: {}, + indices: {}, + edges: {} + }; + const featureSymbology = defaultValue_default( + symbologyData[featureIndex], + symbologyData.default + ); + newFeatureHash.hasOutline = defined_default(featureSymbology?.edges); + return newFeatureHash; +} +function addVertexToHash(indexHash, positionHash, vertexIndex, positions) { + if (!defined_default(indexHash[vertexIndex])) { + const startPositionIndex = vertexIndex * 3; + let coordinateHash = positionHash; + for (let index = 0; index < 3; index++) { + const coordinate = positions[startPositionIndex + index]; + if (!defined_default(coordinateHash[coordinate])) { + coordinateHash[coordinate] = {}; + } + coordinateHash = coordinateHash[coordinate]; + } + if (!defined_default(coordinateHash.index)) { + coordinateHash.index = vertexIndex; + } + indexHash[vertexIndex] = coordinateHash.index; + } +} +function addEdgeToHash(edgeHash, vertexAIndex, vertexBIndex, vertexAIndexUnique, vertexBIndexUnique, normalIndex) { + let startVertexIndex; + let endVertexIndex; + if (vertexAIndexUnique < vertexBIndexUnique) { + startVertexIndex = vertexAIndexUnique; + endVertexIndex = vertexBIndexUnique; + } else { + startVertexIndex = vertexBIndexUnique; + endVertexIndex = vertexAIndexUnique; + } + let edgeStart = edgeHash[startVertexIndex]; + if (!defined_default(edgeStart)) { + edgeStart = edgeHash[startVertexIndex] = {}; + } + let edgeEnd = edgeStart[endVertexIndex]; + if (!defined_default(edgeEnd)) { + edgeEnd = edgeStart[endVertexIndex] = { + normalsIndex: [], + outlines: [] + }; + } + edgeEnd.normalsIndex.push(normalIndex); + if (edgeEnd.outlines.length === 0 || vertexAIndex !== vertexAIndexUnique || vertexBIndex !== vertexBIndexUnique) { + edgeEnd.outlines.push(vertexAIndex, vertexBIndex); + } +} +function generateOutlinesHash(symbologyData, featureIndexArray, indexArray, positions) { + const outlinesHash = []; + for (let i = 0; i < indexArray.length; i += 3) { + const featureIndex = defined_default(featureIndexArray) ? featureIndexArray[indexArray[i]] : "default"; + const featureHash = getFeatureHash( + symbologyData, + outlinesHash, + featureIndex + ); + if (!featureHash.hasOutline) { + continue; + } + const indexHash = featureHash.indices; + const positionHash = featureHash.positions; + for (let vertex = 0; vertex < 3; vertex++) { + const vertexIndex = indexArray[i + vertex]; + addVertexToHash(indexHash, positionHash, vertexIndex, positions); + } + const edgeHash = featureHash.edges; + for (let vertex = 0; vertex < 3; vertex++) { + const vertexIndex = indexArray[i + vertex]; + const nextVertexIndex = indexArray[i + (vertex + 1) % 3]; + const uniqueVertexIndex = indexHash[vertexIndex]; + const uniqueNextVertexIndex = indexHash[nextVertexIndex]; + addEdgeToHash( + edgeHash, + vertexIndex, + nextVertexIndex, + uniqueVertexIndex, + uniqueNextVertexIndex, + i + ); + } + } + return outlinesHash; +} +var calculateFaceNormalA = new Cartesian3_default(); +var calculateFaceNormalB = new Cartesian3_default(); +var calculateFaceNormalC = new Cartesian3_default(); +function calculateFaceNormal(normals, vertexAIndex, indexArray, positions) { + const positionAIndex = indexArray[vertexAIndex] * 3; + const positionBIndex = indexArray[vertexAIndex + 1] * 3; + const positionCIndex = indexArray[vertexAIndex + 2] * 3; + Cartesian3_default.fromArray(positions, positionAIndex, calculateFaceNormalA); + Cartesian3_default.fromArray(positions, positionBIndex, calculateFaceNormalB); + Cartesian3_default.fromArray(positions, positionCIndex, calculateFaceNormalC); + Cartesian3_default.subtract( + calculateFaceNormalB, + calculateFaceNormalA, + calculateFaceNormalB + ); + Cartesian3_default.subtract( + calculateFaceNormalC, + calculateFaceNormalA, + calculateFaceNormalC + ); + Cartesian3_default.cross( + calculateFaceNormalB, + calculateFaceNormalC, + calculateFaceNormalA + ); + const magnitude = Cartesian3_default.magnitude(calculateFaceNormalA); + if (magnitude !== 0) { + Cartesian3_default.divideByScalar( + calculateFaceNormalA, + magnitude, + calculateFaceNormalA + ); + } + const normalAIndex = vertexAIndex * 3; + const normalBIndex = (vertexAIndex + 1) * 3; + const normalCIndex = (vertexAIndex + 2) * 3; + Cartesian3_default.pack(calculateFaceNormalA, normals, normalAIndex); + Cartesian3_default.pack(calculateFaceNormalA, normals, normalBIndex); + Cartesian3_default.pack(calculateFaceNormalA, normals, normalCIndex); +} +var isEdgeSmoothA = new Cartesian3_default(); +var isEdgeSmoothB = new Cartesian3_default(); +function isEdgeSmooth(normals, normalAIndex, normalBIndex) { + Cartesian3_default.fromArray(normals, normalAIndex, isEdgeSmoothA); + Cartesian3_default.fromArray(normals, normalBIndex, isEdgeSmoothB); + const cosine = Cartesian3_default.dot(isEdgeSmoothA, isEdgeSmoothB); + const sine = Cartesian3_default.magnitude( + Cartesian3_default.cross(isEdgeSmoothA, isEdgeSmoothB, isEdgeSmoothA) + ); + return Math.atan2(sine, cosine) < 0.25; +} +function addOutlinesForEdge(outlines, edgeData, indexArray, positions, normals) { + if (edgeData.normalsIndex.length > 1) { + const normalsByIndex = positions.length === normals.length; + for (let indexA = 0; indexA < edgeData.normalsIndex.length; indexA++) { + const vertexAIndex = edgeData.normalsIndex[indexA]; + if (!defined_default(normals[vertexAIndex * 3])) { + calculateFaceNormal(normals, vertexAIndex, indexArray, positions); + } + if (indexA === 0) { + continue; + } + for (let indexB = 0; indexB < indexA; indexB++) { + const vertexBIndex = edgeData.normalsIndex[indexB]; + const normalAIndex = normalsByIndex ? indexArray[vertexAIndex] * 3 : vertexAIndex * 3; + const normalBIndex = normalsByIndex ? indexArray[vertexBIndex] * 3 : vertexBIndex * 3; + if (isEdgeSmooth(normals, normalAIndex, normalBIndex)) { + return; + } + } + } + } + outlines.push(...edgeData.outlines); +} +function addOutlinesForFeature(outlines, edgeHash, indexArray, positions, normals) { + const edgeStartKeys = Object.keys(edgeHash); + for (let startIndex = 0; startIndex < edgeStartKeys.length; startIndex++) { + const edgeEnds = edgeHash[edgeStartKeys[startIndex]]; + const edgeEndKeys = Object.keys(edgeEnds); + for (let endIndex = 0; endIndex < edgeEndKeys.length; endIndex++) { + const edgeData = edgeEnds[edgeEndKeys[endIndex]]; + addOutlinesForEdge(outlines, edgeData, indexArray, positions, normals); + } + } +} +function generateOutlinesFromHash(outlinesHash, indexArray, positions, normals) { + const outlines = []; + const features = Object.keys(outlinesHash); + for (let featureIndex = 0; featureIndex < features.length; featureIndex++) { + const edgeHash = outlinesHash[features[featureIndex]].edges; + addOutlinesForFeature(outlines, edgeHash, indexArray, positions, normals); + } + return outlines; +} +function generateOutlinesIndexArray(symbologyData, featureIndexArray, indexArray, positions, normals) { + if (!defined_default(symbologyData) || Object.keys(symbologyData).length === 0) { + return void 0; + } + const outlinesHash = generateOutlinesHash( + symbologyData, + featureIndexArray, + indexArray, + positions + ); + if (!defined_default(normals) || indexArray.length * 3 !== normals.length) { + normals = []; + } + const outlines = generateOutlinesFromHash( + outlinesHash, + indexArray, + positions, + normals + ); + const outlinesIndexArray = outlines.length > 0 ? new Uint32Array(outlines) : void 0; + return outlinesIndexArray; +} +function convertColorsArray(colors) { + const colorsArray = new Float32Array(colors.length); + for (let index = 0; index < colors.length; index += 4) { + colorsArray[index] = srgbToLinear_default(Color_default.byteToFloat(colors[index])); + colorsArray[index + 1] = srgbToLinear_default(Color_default.byteToFloat(colors[index + 1])); + colorsArray[index + 2] = srgbToLinear_default(Color_default.byteToFloat(colors[index + 2])); + colorsArray[index + 3] = Color_default.byteToFloat(colors[index + 3]); + } + return colorsArray; +} +function generateNormals(vertexCount, indices, positions, normals, uv0s, colors, featureIndex) { + const result = { + normals: void 0, + positions: void 0, + uv0s: void 0, + colors: void 0, + featureIndex: void 0, + vertexCount: void 0 + }; + if (vertexCount === 0 || !defined_default(positions) || positions.length === 0 || defined_default(normals)) { + return result; + } + if (defined_default(indices)) { + result.vertexCount = indices.length; + result.positions = new Float32Array(indices.length * 3); + result.uv0s = defined_default(uv0s) ? new Float32Array(indices.length * 2) : void 0; + result.colors = defined_default(colors) ? new Uint8Array(indices.length * 4) : void 0; + result.featureIndex = defined_default(featureIndex) ? new Array(indices.length) : void 0; + for (let i = 0; i < indices.length; i++) { + const index = indices[i]; + result.positions[i * 3] = positions[index * 3]; + result.positions[i * 3 + 1] = positions[index * 3 + 1]; + result.positions[i * 3 + 2] = positions[index * 3 + 2]; + if (defined_default(result.uv0s)) { + result.uv0s[i * 2] = uv0s[index * 2]; + result.uv0s[i * 2 + 1] = uv0s[index * 2 + 1]; + } + if (defined_default(result.colors)) { + result.colors[i * 4] = colors[index * 4]; + result.colors[i * 4 + 1] = colors[index * 4 + 1]; + result.colors[i * 4 + 2] = colors[index * 4 + 2]; + result.colors[i * 4 + 3] = colors[index * 4 + 3]; + } + if (defined_default(result.featureIndex)) { + result.featureIndex[i] = featureIndex[index]; + } + } + vertexCount = indices.length; + positions = result.positions; + } + indices = new Array(vertexCount); + for (let i = 0; i < vertexCount; i++) { + indices[i] = i; + } + result.normals = new Float32Array(indices.length * 3); + for (let i = 0; i < indices.length; i += 3) { + calculateFaceNormal(result.normals, i, indices, positions); + } + return result; +} +function generateGltfBuffer(vertexCount, indices, positions, normals, uv0s, colors, featureIndex, parameters) { if (vertexCount === 0 || !defined_default(positions) || positions.length === 0) { return { buffers: [], @@ -188,22 +521,45 @@ function generateGltfBuffer(vertexCount, indices, positions, normals, uv0s, colo const meshes = []; const nodes = []; const nodesInScene = []; + const rootExtensions = {}; + const extensionsUsed = []; if (defined_default(indices)) { vertexCount = indices.length; } - const indexArray = new Uint32Array(vertexCount); - if (defined_default(indices)) { - for (let vertexIndex = 0; vertexIndex < vertexCount; ++vertexIndex) { - indexArray[vertexIndex] = indices[vertexIndex]; - } - } else { - for (let newVertexIndex = 0; newVertexIndex < vertexCount; ++newVertexIndex) { - indexArray[newVertexIndex] = newVertexIndex; - } - } + const { indexArray, transparentVertexOffset } = generateIndexArray( + vertexCount, + indices, + colors, + parameters.splitGeometryByColorTransparency + ); const indicesBlob = new Blob([indexArray], { type: "application/binary" }); const indicesURL = URL.createObjectURL(indicesBlob); const endIndex = vertexCount; + const featureIndexArray = parameters.enableFeatures && defined_default(featureIndex) ? new Float32Array(featureIndex.length) : void 0; + let featureCount = 0; + if (defined_default(featureIndexArray)) { + for (let index = 0; index < featureIndex.length; ++index) { + featureIndexArray[index] = featureIndex[index]; + const countByIndex = featureIndex[index] + 1; + if (featureCount < countByIndex) { + featureCount = countByIndex; + } + } + } + let outlinesIndicesURL; + const outlinesIndexArray = generateOutlinesIndexArray( + parameters.symbologyData, + featureIndex, + indexArray, + positions, + normals + ); + if (defined_default(outlinesIndexArray)) { + const outlinesIndicesBlob = new Blob([outlinesIndexArray], { + type: "application/binary" + }); + outlinesIndicesURL = URL.createObjectURL(outlinesIndicesBlob); + } const meshPositions = positions.subarray(0, endIndex * 3); const positionsBlob = new Blob([meshPositions], { type: "application/binary" @@ -237,7 +593,7 @@ function generateGltfBuffer(vertexCount, indices, positions, normals, uv0s, colo const uv0Blob = new Blob([meshUv0s], { type: "application/binary" }); uv0URL = URL.createObjectURL(uv0Blob); } - const meshColorsInBytes = defined_default(colors) ? colors.subarray(0, endIndex * 4) : void 0; + const meshColorsInBytes = defined_default(colors) ? convertColorsArray(colors.subarray(0, endIndex * 4)) : void 0; let colorsURL; if (defined_default(meshColorsInBytes)) { const colorsBlob = new Blob([meshColorsInBytes], { @@ -245,127 +601,254 @@ function generateGltfBuffer(vertexCount, indices, positions, normals, uv0s, colo }); colorsURL = URL.createObjectURL(colorsBlob); } - const posIndex = 0; - let normalIndex = 0; - let uv0Index = 0; - let colorIndex = 0; - let indicesIndex = 0; - let currentIndex = posIndex; + const meshFeatureId0 = defined_default(featureIndexArray) ? featureIndexArray.subarray(0, endIndex) : void 0; + let featureId0URL; + if (defined_default(meshFeatureId0)) { + const featureId0Blob = new Blob([meshFeatureId0], { + type: "application/binary" + }); + featureId0URL = URL.createObjectURL(featureId0Blob); + } + const meshPropertyTable0 = defined_default(featureIndexArray) ? new Float32Array(featureCount) : void 0; + let propertyTable0URL; + if (defined_default(meshPropertyTable0)) { + for (let index = 0; index < meshPropertyTable0.length; ++index) { + meshPropertyTable0[index] = index; + } + const propertyTable0Blob = new Blob([meshPropertyTable0], { + type: "application/binary" + }); + propertyTable0URL = URL.createObjectURL(propertyTable0Blob); + } const attributes = {}; - attributes.POSITION = posIndex; + const extensions = {}; + attributes.POSITION = accessors.length; buffers.push({ uri: positionsURL, byteLength: meshPositions.byteLength }); bufferViews.push({ - buffer: posIndex, + buffer: buffers.length - 1, byteOffset: 0, byteLength: meshPositions.byteLength, target: 34962 }); accessors.push({ - bufferView: posIndex, + bufferView: bufferViews.length - 1, byteOffset: 0, componentType: 5126, - count: vertexCount, + count: meshPositions.length / 3, type: "VEC3", max: [minX, minY, minZ], min: [maxX, maxY, maxZ] }); if (defined_default(normalsURL)) { - ++currentIndex; - normalIndex = currentIndex; - attributes.NORMAL = normalIndex; + attributes.NORMAL = accessors.length; buffers.push({ uri: normalsURL, byteLength: meshNormals.byteLength }); bufferViews.push({ - buffer: normalIndex, + buffer: buffers.length - 1, byteOffset: 0, byteLength: meshNormals.byteLength, target: 34962 }); accessors.push({ - bufferView: normalIndex, + bufferView: bufferViews.length - 1, byteOffset: 0, componentType: 5126, - count: vertexCount, + count: meshNormals.length / 3, type: "VEC3" }); } if (defined_default(uv0URL)) { - ++currentIndex; - uv0Index = currentIndex; - attributes.TEXCOORD_0 = uv0Index; + attributes.TEXCOORD_0 = accessors.length; buffers.push({ uri: uv0URL, byteLength: meshUv0s.byteLength }); bufferViews.push({ - buffer: uv0Index, + buffer: buffers.length - 1, byteOffset: 0, byteLength: meshUv0s.byteLength, target: 34962 }); accessors.push({ - bufferView: uv0Index, + bufferView: bufferViews.length - 1, byteOffset: 0, componentType: 5126, - count: vertexCount, + count: meshUv0s.length / 2, type: "VEC2" }); } if (defined_default(colorsURL)) { - ++currentIndex; - colorIndex = currentIndex; - attributes.COLOR_0 = colorIndex; + attributes.COLOR_0 = accessors.length; buffers.push({ uri: colorsURL, byteLength: meshColorsInBytes.byteLength }); bufferViews.push({ - buffer: colorIndex, + buffer: buffers.length - 1, byteOffset: 0, byteLength: meshColorsInBytes.byteLength, target: 34962 }); accessors.push({ - bufferView: colorIndex, + bufferView: bufferViews.length - 1, byteOffset: 0, - componentType: 5121, - normalized: true, - count: vertexCount, + componentType: 5126, + count: meshColorsInBytes.length / 4, type: "VEC4" }); } - ++currentIndex; - indicesIndex = currentIndex; + if (defined_default(featureId0URL)) { + attributes._FEATURE_ID_0 = accessors.length; + buffers.push({ + uri: featureId0URL, + byteLength: meshFeatureId0.byteLength + }); + bufferViews.push({ + buffer: buffers.length - 1, + byteOffset: 0, + byteLength: meshFeatureId0.byteLength, + target: 34963 + }); + accessors.push({ + bufferView: bufferViews.length - 1, + byteOffset: 0, + componentType: 5126, + count: meshFeatureId0.length, + type: "SCALAR" + }); + extensions.EXT_mesh_features = { + featureIds: [ + { + attribute: 0, + propertyTable: 0, + featureCount + } + ] + }; + extensionsUsed.push("EXT_mesh_features"); + } + if (defined_default(propertyTable0URL)) { + buffers.push({ + uri: propertyTable0URL, + byteLength: meshPropertyTable0.byteLength + }); + bufferViews.push({ + buffer: buffers.length - 1, + byteOffset: 0, + byteLength: meshPropertyTable0.byteLength, + target: 34963 + }); + rootExtensions.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: true + } + } + } + } + }, + propertyTables: [ + { + name: "feature-indices-mapping", + class: "feature", + count: featureCount, + properties: { + index: { + values: bufferViews.length - 1 + } + } + } + ] + }; + extensionsUsed.push("EXT_structural_metadata"); + } + if (defined_default(outlinesIndicesURL)) { + buffers.push({ + uri: outlinesIndicesURL, + byteLength: outlinesIndexArray.byteLength + }); + bufferViews.push({ + buffer: buffers.length - 1, + byteOffset: 0, + byteLength: outlinesIndexArray.byteLength, + target: 34963 + }); + accessors.push({ + bufferView: bufferViews.length - 1, + byteOffset: 0, + componentType: 5125, + count: outlinesIndexArray.length, + type: "SCALAR" + }); + extensions.CESIUM_primitive_outline = { + indices: accessors.length - 1 + }; + extensionsUsed.push("CESIUM_primitive_outline"); + } buffers.push({ uri: indicesURL, byteLength: indexArray.byteLength }); bufferViews.push({ - buffer: indicesIndex, + buffer: buffers.length - 1, byteOffset: 0, byteLength: indexArray.byteLength, target: 34963 }); - accessors.push({ - bufferView: indicesIndex, - byteOffset: 0, - componentType: 5125, - count: vertexCount, - type: "SCALAR" - }); - meshes.push({ - primitives: [ - { - attributes, - indices: indicesIndex, - material: 0 + const meshPrimitives = []; + if (transparentVertexOffset > 0) { + accessors.push({ + bufferView: bufferViews.length - 1, + byteOffset: 0, + componentType: 5125, + count: transparentVertexOffset, + type: "SCALAR" + }); + meshPrimitives.push({ + attributes, + indices: accessors.length - 1, + material: meshPrimitives.length, + extensions + }); + } + if (transparentVertexOffset < vertexCount) { + accessors.push({ + bufferView: bufferViews.length - 1, + byteOffset: 4 * transparentVertexOffset, + // skip 4 bytes for each opaque vertex + componentType: 5125, + count: vertexCount - transparentVertexOffset, + type: "SCALAR" + }); + meshPrimitives.push({ + attributes, + indices: accessors.length - 1, + material: meshPrimitives.length, + extensions, + extra: { + isTransparent: true } - ] + }); + } + meshes.push({ + primitives: meshPrimitives }); nodesInScene.push(0); nodes.push({ mesh: 0 }); @@ -375,7 +858,9 @@ function generateGltfBuffer(vertexCount, indices, positions, normals, uv0s, colo accessors, meshes, nodes, - nodesInScene + nodesInScene, + rootExtensions, + extensionsUsed }; } function decode(data, schema, bufferInfo, featureData) { @@ -774,39 +1259,62 @@ function decodeAndCreateGltf(parameters) { geometryData["uv-region"] ); } - const meshData = generateGltfBuffer( - geometryData.vertexCount, - geometryData.indices, - geometryData.positions, - geometryData.normals, - geometryData.uv0s, - geometryData.colors - ); - const customAttributes = {}; + let featureIndex; if (defined_default(geometryData["feature-index"])) { - customAttributes.positions = geometryData.positions; - customAttributes.indices = geometryData.indices; - customAttributes.featureIndex = geometryData["feature-index"]; - customAttributes.cartesianCenter = parameters.cartesianCenter; - customAttributes.parentRotation = parameters.parentRotation; + featureIndex = geometryData["feature-index"]; } else if (defined_default(geometryData["faceRange"])) { - customAttributes.positions = geometryData.positions; - customAttributes.indices = geometryData.indices; - customAttributes.sourceURL = parameters.url; - customAttributes.cartesianCenter = parameters.cartesianCenter; - customAttributes.parentRotation = parameters.parentRotation; - customAttributes.featureIndex = new Array(geometryData.positions.length); + featureIndex = new Array(geometryData.vertexCount); for (let range = 0; range < geometryData["faceRange"].length - 1; range += 2) { const curIndex = range / 2; const rangeStart = geometryData["faceRange"][range]; const rangeEnd = geometryData["faceRange"][range + 1]; for (let i = rangeStart; i <= rangeEnd; i++) { - customAttributes.featureIndex[i * 3] = curIndex; - customAttributes.featureIndex[i * 3 + 1] = curIndex; - customAttributes.featureIndex[i * 3 + 2] = curIndex; + featureIndex[i * 3] = curIndex; + featureIndex[i * 3 + 1] = curIndex; + featureIndex[i * 3 + 2] = curIndex; + } + } + } + if (parameters.calculateNormals) { + const data = generateNormals( + geometryData.vertexCount, + geometryData.indices, + geometryData.positions, + geometryData.normals, + geometryData.uv0s, + geometryData.colors, + featureIndex + ); + if (defined_default(data.normals)) { + geometryData.normals = data.normals; + if (defined_default(data.vertexCount)) { + geometryData.vertexCount = data.vertexCount; + geometryData.indices = data.indices; + geometryData.positions = data.positions; + geometryData.uv0s = data.uv0s; + geometryData.colors = data.colors; + featureIndex = data.featureIndex; } } } + const meshData = generateGltfBuffer( + geometryData.vertexCount, + geometryData.indices, + geometryData.positions, + geometryData.normals, + geometryData.uv0s, + geometryData.colors, + featureIndex, + parameters + ); + const customAttributes = { + positions: geometryData.positions, + indices: geometryData.indices, + featureIndex, + sourceURL: parameters.url, + cartesianCenter: parameters.cartesianCenter, + parentRotation: parameters.parentRotation + }; meshData._customAttributes = customAttributes; const results = { meshData diff --git a/assets/cesium/Workers/transcodeKTX2.js b/assets/cesium/Workers/transcodeKTX2.js index 8e5926077..31c993ac6 100644 --- a/assets/cesium/Workers/transcodeKTX2.js +++ b/assets/cesium/Workers/transcodeKTX2.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -25,33 +25,32 @@ import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { WebGLConstants_default -} from "./chunk-XNRYWRVT.js"; +} from "./chunk-OOK53QUQ.js"; import { RuntimeError_default -} from "./chunk-YK5RU5AO.js"; +} from "./chunk-T77JILCU.js"; import { defaultValue_default -} from "./chunk-N73NY3KY.js"; +} from "./chunk-VE7BFUIX.js"; import { Check_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { __commonJS, __require, __toESM, defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/ThirdParty/Workers/basis_transcoder.js var require_basis_transcoder = __commonJS({ "packages/engine/Source/ThirdParty/Workers/basis_transcoder.js"(exports, module) { var BASIS = function() { var _scriptDir = typeof document !== "undefined" && document.currentScript ? document.currentScript.src : void 0; - if (typeof __filename !== "undefined") - _scriptDir = _scriptDir || __filename; + if (typeof __filename !== "undefined") _scriptDir = _scriptDir || __filename; return function(BASIS2) { BASIS2 = BASIS2 || {}; var Module = typeof BASIS2 !== "undefined" ? BASIS2 : {}; @@ -97,10 +96,8 @@ var require_basis_transcoder = __commonJS({ scriptDirectory = __dirname + "/"; } read_ = function shell_read(filename, binary) { - if (!nodeFS) - nodeFS = __require("fs"); - if (!nodePath) - nodePath = __require("path"); + if (!nodeFS) nodeFS = __require("fs"); + if (!nodePath) nodePath = __require("path"); filename = nodePath["normalize"](filename); return nodeFS["readFileSync"](filename, binary ? null : "utf8"); }; @@ -154,8 +151,7 @@ var require_basis_transcoder = __commonJS({ }; } if (typeof print !== "undefined") { - if (typeof console === "undefined") - console = {}; + if (typeof console === "undefined") console = {}; console.log = print; console.warn = console.error = typeof printErr !== "undefined" ? printErr : print; } @@ -217,19 +213,15 @@ var require_basis_transcoder = __commonJS({ } } moduleOverrides = null; - if (Module["arguments"]) - arguments_ = Module["arguments"]; - if (Module["thisProgram"]) - thisProgram = Module["thisProgram"]; - if (Module["quit"]) - quit_ = Module["quit"]; + if (Module["arguments"]) arguments_ = Module["arguments"]; + if (Module["thisProgram"]) thisProgram = Module["thisProgram"]; + if (Module["quit"]) quit_ = Module["quit"]; var tempRet0 = 0; var setTempRet0 = function(value) { tempRet0 = value; }; var wasmBinary; - if (Module["wasmBinary"]) - wasmBinary = Module["wasmBinary"]; + if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; var noExitRuntime = Module["noExitRuntime"] || true; if (typeof WebAssembly !== "object") { abort("no native wasm support detected"); @@ -246,8 +238,7 @@ var require_basis_transcoder = __commonJS({ function UTF8ArrayToString(heap, idx, maxBytesToRead) { var endIdx = idx + maxBytesToRead; var endPtr = idx; - while (heap[endPtr] && !(endPtr >= endIdx)) - ++endPtr; + while (heap[endPtr] && !(endPtr >= endIdx)) ++endPtr; if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) { return UTF8Decoder.decode(heap.subarray(idx, endPtr)); } else { @@ -283,8 +274,7 @@ var require_basis_transcoder = __commonJS({ return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ""; } function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { - if (!(maxBytesToWrite > 0)) - return 0; + if (!(maxBytesToWrite > 0)) return 0; var startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; for (var i = 0; i < str.length; ++i) { @@ -294,23 +284,19 @@ var require_basis_transcoder = __commonJS({ u = 65536 + ((u & 1023) << 10) | u1 & 1023; } if (u <= 127) { - if (outIdx >= endIdx) - break; + if (outIdx >= endIdx) break; heap[outIdx++] = u; } else if (u <= 2047) { - if (outIdx + 1 >= endIdx) - break; + if (outIdx + 1 >= endIdx) break; heap[outIdx++] = 192 | u >> 6; heap[outIdx++] = 128 | u & 63; } else if (u <= 65535) { - if (outIdx + 2 >= endIdx) - break; + if (outIdx + 2 >= endIdx) break; heap[outIdx++] = 224 | u >> 12; heap[outIdx++] = 128 | u >> 6 & 63; heap[outIdx++] = 128 | u & 63; } else { - if (outIdx + 3 >= endIdx) - break; + if (outIdx + 3 >= endIdx) break; heap[outIdx++] = 240 | u >> 18; heap[outIdx++] = 128 | u >> 12 & 63; heap[outIdx++] = 128 | u >> 6 & 63; @@ -327,16 +313,11 @@ var require_basis_transcoder = __commonJS({ var len = 0; for (var i = 0; i < str.length; ++i) { var u = str.charCodeAt(i); - if (u >= 55296 && u <= 57343) - u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023; - if (u <= 127) - ++len; - else if (u <= 2047) - len += 2; - else if (u <= 65535) - len += 3; - else - len += 4; + if (u >= 55296 && u <= 57343) u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023; + if (u <= 127) ++len; + else if (u <= 2047) len += 2; + else if (u <= 65535) len += 3; + else len += 4; } return len; } @@ -345,8 +326,7 @@ var require_basis_transcoder = __commonJS({ var endPtr = ptr; var idx = endPtr >> 1; var maxIdx = idx + maxBytesToRead / 2; - while (!(idx >= maxIdx) && HEAPU16[idx]) - ++idx; + while (!(idx >= maxIdx) && HEAPU16[idx]) ++idx; endPtr = idx << 1; if (endPtr - ptr > 32 && UTF16Decoder) { return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); @@ -354,8 +334,7 @@ var require_basis_transcoder = __commonJS({ var str = ""; for (var i = 0; !(i >= maxBytesToRead / 2); ++i) { var codeUnit = HEAP16[ptr + i * 2 >> 1]; - if (codeUnit == 0) - break; + if (codeUnit == 0) break; str += String.fromCharCode(codeUnit); } return str; @@ -365,8 +344,7 @@ var require_basis_transcoder = __commonJS({ if (maxBytesToWrite === void 0) { maxBytesToWrite = 2147483647; } - if (maxBytesToWrite < 2) - return 0; + if (maxBytesToWrite < 2) return 0; maxBytesToWrite -= 2; var startPtr = outPtr; var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length; @@ -386,8 +364,7 @@ var require_basis_transcoder = __commonJS({ var str = ""; while (!(i >= maxBytesToRead / 4)) { var utf32 = HEAP32[ptr + i * 4 >> 2]; - if (utf32 == 0) - break; + if (utf32 == 0) break; ++i; if (utf32 >= 65536) { var ch = utf32 - 65536; @@ -402,8 +379,7 @@ var require_basis_transcoder = __commonJS({ if (maxBytesToWrite === void 0) { maxBytesToWrite = 2147483647; } - if (maxBytesToWrite < 4) - return 0; + if (maxBytesToWrite < 4) return 0; var startPtr = outPtr; var endPtr = startPtr + maxBytesToWrite - 4; for (var i = 0; i < str.length; ++i) { @@ -414,8 +390,7 @@ var require_basis_transcoder = __commonJS({ } HEAP32[outPtr >> 2] = codeUnit; outPtr += 4; - if (outPtr + 4 > endPtr) - break; + if (outPtr + 4 > endPtr) break; } HEAP32[outPtr >> 2] = 0; return outPtr - startPtr; @@ -424,8 +399,7 @@ var require_basis_transcoder = __commonJS({ var len = 0; for (var i = 0; i < str.length; ++i) { var codeUnit = str.charCodeAt(i); - if (codeUnit >= 55296 && codeUnit <= 57343) - ++i; + if (codeUnit >= 55296 && codeUnit <= 57343) ++i; len += 4; } return len; @@ -457,8 +431,7 @@ var require_basis_transcoder = __commonJS({ var runtimeInitialized = false; function preRun() { if (Module["preRun"]) { - if (typeof Module["preRun"] == "function") - Module["preRun"] = [Module["preRun"]]; + if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]]; while (Module["preRun"].length) { addOnPreRun(Module["preRun"].shift()); } @@ -474,8 +447,7 @@ var require_basis_transcoder = __commonJS({ } function postRun() { if (Module["postRun"]) { - if (typeof Module["postRun"] == "function") - Module["postRun"] = [Module["postRun"]]; + if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]]; while (Module["postRun"].length) { addOnPostRun(Module["postRun"].shift()); } @@ -2011,9 +1983,9 @@ var require_basis_transcoder = __commonJS({ if (typeof globalThis === "object") { return globalThis; } - return function() { + return (/* @__PURE__ */ function() { return Function; - }()("return this")(); + }())("return this")(); } function __emval_get_global(name) { if (name === 0) { @@ -2220,10 +2192,8 @@ var require_basis_transcoder = __commonJS({ this.status = status; } dependenciesFulfilled = function runCaller() { - if (!calledRun) - run(); - if (!calledRun) - dependenciesFulfilled = runCaller; + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; }; function run(args) { args = args || arguments_; @@ -2235,17 +2205,14 @@ var require_basis_transcoder = __commonJS({ return; } function doRun() { - if (calledRun) - return; + if (calledRun) return; calledRun = true; Module["calledRun"] = true; - if (ABORT) - return; + if (ABORT) return; initRuntime(); preMain(); readyPromiseResolve(Module); - if (Module["onRuntimeInitialized"]) - Module["onRuntimeInitialized"](); + if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"](); postRun(); } if (Module["setStatus"]) { @@ -2262,8 +2229,7 @@ var require_basis_transcoder = __commonJS({ } Module["run"] = run; if (Module["preInit"]) { - if (typeof Module["preInit"] == "function") - Module["preInit"] = [Module["preInit"]]; + if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; while (Module["preInit"].length > 0) { Module["preInit"].pop()(); } @@ -2519,7 +2485,7 @@ PixelFormat.validate = function(pixelFormat) { return pixelFormat === PixelFormat.DEPTH_COMPONENT || pixelFormat === PixelFormat.DEPTH_STENCIL || pixelFormat === PixelFormat.ALPHA || pixelFormat === PixelFormat.RED || pixelFormat === PixelFormat.RG || pixelFormat === PixelFormat.RGB || pixelFormat === PixelFormat.RGBA || pixelFormat === PixelFormat.LUMINANCE || pixelFormat === PixelFormat.LUMINANCE_ALPHA || pixelFormat === PixelFormat.RGB_DXT1 || pixelFormat === PixelFormat.RGBA_DXT1 || pixelFormat === PixelFormat.RGBA_DXT3 || pixelFormat === PixelFormat.RGBA_DXT5 || pixelFormat === PixelFormat.RGB_PVRTC_4BPPV1 || pixelFormat === PixelFormat.RGB_PVRTC_2BPPV1 || pixelFormat === PixelFormat.RGBA_PVRTC_4BPPV1 || pixelFormat === PixelFormat.RGBA_PVRTC_2BPPV1 || pixelFormat === PixelFormat.RGBA_ASTC || pixelFormat === PixelFormat.RGB_ETC1 || pixelFormat === PixelFormat.RGB8_ETC2 || pixelFormat === PixelFormat.RGBA8_ETC2_EAC || pixelFormat === PixelFormat.RGBA_BC7; }; PixelFormat.isColorFormat = function(pixelFormat) { - return pixelFormat === PixelFormat.ALPHA || pixelFormat === PixelFormat.RGB || pixelFormat === PixelFormat.RGBA || pixelFormat === PixelFormat.LUMINANCE || pixelFormat === PixelFormat.LUMINANCE_ALPHA; + return pixelFormat === PixelFormat.RED || pixelFormat === PixelFormat.ALPHA || pixelFormat === PixelFormat.RGB || pixelFormat === PixelFormat.RGBA || pixelFormat === PixelFormat.LUMINANCE || pixelFormat === PixelFormat.LUMINANCE_ALPHA; }; PixelFormat.isDepthFormat = function(pixelFormat) { return pixelFormat === PixelFormat.DEPTH_COMPONENT || pixelFormat === PixelFormat.DEPTH_STENCIL; @@ -3031,8 +2997,7 @@ var BufferReader = class { byteLength++; this._offset++; } - if (byteLength < maxByteLength) - this._offset++; + if (byteLength < maxByteLength) this._offset++; return new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + byteOffset, byteLength); } }; @@ -3153,8 +3118,7 @@ function read2(data) { const kvPadding = keyValueByteLength % 4 ? 4 - keyValueByteLength % 4 : 0; kvdReader._skip(kvPadding); } - if (sgdByteLength <= 0) - return container; + if (sgdByteLength <= 0) return container; const sgdReader = new BufferReader(data, sgdByteOffset, sgdByteLength, true); const endpointCount = sgdReader._nextUint16(); const selectorCount = sgdReader._nextUint16(); diff --git a/assets/cesium/Workers/transferTypedArrayTest.js b/assets/cesium/Workers/transferTypedArrayTest.js index 4ba02ef0c..7b9a0b5ad 100644 --- a/assets/cesium/Workers/transferTypedArrayTest.js +++ b/assets/cesium/Workers/transferTypedArrayTest.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js b/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js index b8ae4009c..8a7317b2c 100644 --- a/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +++ b/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.111 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -26,50 +26,49 @@ import { EllipsoidalOccluder_default, TerrainEncoding_default -} from "./chunk-KFCTEEBD.js"; +} from "./chunk-BCL4PHHT.js"; import { createTaskProcessorWorker_default -} from "./chunk-MMNPUV23.js"; +} from "./chunk-QX5XS4LC.js"; import { OrientedBoundingBox_default -} from "./chunk-P2BTKBVY.js"; +} from "./chunk-AVI4IUWC.js"; import { AttributeCompression_default -} from "./chunk-4EXWKTY2.js"; -import "./chunk-AI2FOC47.js"; -import "./chunk-5HUDPV54.js"; -import "./chunk-R5NOUYKW.js"; -import "./chunk-PNAD2XAN.js"; +} from "./chunk-OORVMGDU.js"; +import "./chunk-SYCPRK3D.js"; +import "./chunk-STBBMQGG.js"; +import "./chunk-XD445VDH.js"; +import "./chunk-4BAE4PWO.js"; import { IndexDatatype_default -} from "./chunk-CKOGHQ6J.js"; +} from "./chunk-QD4KM3GO.js"; import { BoundingSphere_default -} from "./chunk-XKGSTUQO.js"; -import "./chunk-DNCKFFNR.js"; +} from "./chunk-DOXCPOG4.js"; import { - Cartesian2_default, Rectangle_default -} from "./chunk-IQCBK4CE.js"; -import "./chunk-UJ76JVUZ.js"; +} from "./chunk-O3JCMSS3.js"; +import "./chunk-2J3JKXCP.js"; import { + Cartesian2_default, Cartesian3_default, Cartographic_default, Ellipsoid_default -} from "./chunk-54GSYZWT.js"; +} from "./chunk-PYHLO636.js"; import { Math_default -} from "./chunk-A3TYRSRJ.js"; -import "./chunk-XNRYWRVT.js"; -import "./chunk-YK5RU5AO.js"; -import "./chunk-N73NY3KY.js"; +} from "./chunk-MSKXMXJI.js"; +import "./chunk-OOK53QUQ.js"; +import "./chunk-T77JILCU.js"; +import "./chunk-VE7BFUIX.js"; import { Check_default, DeveloperError_default -} from "./chunk-WYMW5NZB.js"; +} from "./chunk-S3PI2KFM.js"; import { defined_default -} from "./chunk-FMN2NHBU.js"; +} from "./chunk-AA4GZKOT.js"; // packages/engine/Source/Core/Intersections2D.js var Intersections2D = {}; diff --git a/index.html b/index.html index 3f4dc53ad..0fcc2d98f 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,6 @@ <body> <app-root></app-root> -<script src="runtime.3e13c9cd6b96cbc1.js" type="module"></script><script src="polyfills.f5f2967c9755cdfd.js" type="module"></script><script src="scripts.9d2af56a0f60eb8d.js" defer></script><script src="main.f92c7c2d4f02d2d0.js" type="module"></script></body> +<script src="runtime.fe9feb058538f1b0.js" type="module"></script><script src="polyfills.f5f2967c9755cdfd.js" type="module"></script><script src="scripts.9d2af56a0f60eb8d.js" defer></script><script src="main.4e8d52bb5cfebeeb.js" type="module"></script></body> </html> diff --git a/main.4e8d52bb5cfebeeb.js b/main.4e8d52bb5cfebeeb.js new file mode 100644 index 000000000..9c1ee8f63 --- /dev/null +++ b/main.4e8d52bb5cfebeeb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdemo_maps=self.webpackChunkdemo_maps||[]).push([[179],{8626:(ct,De,L)=>{L.d(De,{X:()=>k});var l=L(5992);class k extends l.x{constructor(re){super(),this._value=re}get value(){return this.getValue()}_subscribe(re){const ce=super._subscribe(re);return!ce.closed&&re.next(this._value),ce}getValue(){const{hasError:re,thrownError:ce,_value:_e}=this;if(re)throw ce;return this._throwIfClosed(),_e}next(re){super.next(this._value=re)}}},1145:(ct,De,L)=>{L.d(De,{y:()=>Te});var l=L(6609),k=L(5350),de=L(7649),re=L(5357),ce=L(3667),_e=L(89),ve=L(9094);let Te=(()=>{class ye{constructor(ke){ke&&(this._subscribe=ke)}lift(ke){const He=new ye;return He.source=this,He.operator=ke,He}subscribe(ke,He,Le){const Re=function fe(ye){return ye&&ye instanceof l.Lv||function ae(ye){return ye&&(0,_e.m)(ye.next)&&(0,_e.m)(ye.error)&&(0,_e.m)(ye.complete)}(ye)&&(0,k.Nn)(ye)}(ke)?ke:new l.Hp(ke,He,Le);return(0,ve.x)(()=>{const{operator:at,source:Dt}=this;Re.add(at?at.call(Re,Dt):Dt?this._subscribe(Re):this._trySubscribe(Re))}),Re}_trySubscribe(ke){try{return this._subscribe(ke)}catch(He){ke.error(He)}}forEach(ke,He){return new(He=be(He))((Le,Re)=>{const at=new l.Hp({next:Dt=>{try{ke(Dt)}catch(ut){Re(ut),at.unsubscribe()}},error:Re,complete:Le});this.subscribe(at)})}_subscribe(ke){var He;return null===(He=this.source)||void 0===He?void 0:He.subscribe(ke)}[de.L](){return this}pipe(...ke){return(0,re.U)(ke)(this)}toPromise(ke){return new(ke=be(ke))((He,Le)=>{let Re;this.subscribe(at=>Re=at,at=>Le(at),()=>He(Re))})}}return ye.create=Ve=>new ye(Ve),ye})();function be(ye){var Ve;return null!==(Ve=ye??ce.config.Promise)&&void 0!==Ve?Ve:Promise}},5992:(ct,De,L)=>{L.d(De,{x:()=>ve});var l=L(1145),k=L(5350);const re=(0,L(8261).d)(be=>function(){be(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var ce=L(3647),_e=L(9094);let ve=(()=>{class be extends l.y{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(fe){const ye=new Te(this,this);return ye.operator=fe,ye}_throwIfClosed(){if(this.closed)throw new re}next(fe){(0,_e.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const ye of this.currentObservers)ye.next(fe)}})}error(fe){(0,_e.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=fe;const{observers:ye}=this;for(;ye.length;)ye.shift().error(fe)}})}complete(){(0,_e.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:fe}=this;for(;fe.length;)fe.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var fe;return(null===(fe=this.observers)||void 0===fe?void 0:fe.length)>0}_trySubscribe(fe){return this._throwIfClosed(),super._trySubscribe(fe)}_subscribe(fe){return this._throwIfClosed(),this._checkFinalizedStatuses(fe),this._innerSubscribe(fe)}_innerSubscribe(fe){const{hasError:ye,isStopped:Ve,observers:ke}=this;return ye||Ve?k.Lc:(this.currentObservers=null,ke.push(fe),new k.w0(()=>{this.currentObservers=null,(0,ce.P)(ke,fe)}))}_checkFinalizedStatuses(fe){const{hasError:ye,thrownError:Ve,isStopped:ke}=this;ye?fe.error(Ve):ke&&fe.complete()}asObservable(){const fe=new l.y;return fe.source=this,fe}}return be.create=(ae,fe)=>new Te(ae,fe),be})();class Te extends ve{constructor(ae,fe){super(),this.destination=ae,this.source=fe}next(ae){var fe,ye;null===(ye=null===(fe=this.destination)||void 0===fe?void 0:fe.next)||void 0===ye||ye.call(fe,ae)}error(ae){var fe,ye;null===(ye=null===(fe=this.destination)||void 0===fe?void 0:fe.error)||void 0===ye||ye.call(fe,ae)}complete(){var ae,fe;null===(fe=null===(ae=this.destination)||void 0===ae?void 0:ae.complete)||void 0===fe||fe.call(ae)}_subscribe(ae){var fe,ye;return null!==(ye=null===(fe=this.source)||void 0===fe?void 0:fe.subscribe(ae))&&void 0!==ye?ye:k.Lc}}},6609:(ct,De,L)=>{L.d(De,{Hp:()=>Le,Lv:()=>ye});var l=L(89),k=L(5350),de=L(3667),re=L(3320),ce=L(5998);const _e=be("C",void 0,void 0);function be(ne,Pe,Me){return{kind:ne,value:Pe,error:Me}}var ae=L(9877),fe=L(9094);class ye extends k.w0{constructor(Pe){super(),this.isStopped=!1,Pe?(this.destination=Pe,(0,k.Nn)(Pe)&&Pe.add(this)):this.destination=ut}static create(Pe,Me,nt){return new Le(Pe,Me,nt)}next(Pe){this.isStopped?Dt(function Te(ne){return be("N",ne,void 0)}(Pe),this):this._next(Pe)}error(Pe){this.isStopped?Dt(function ve(ne){return be("E",void 0,ne)}(Pe),this):(this.isStopped=!0,this._error(Pe))}complete(){this.isStopped?Dt(_e,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(Pe){this.destination.next(Pe)}_error(Pe){try{this.destination.error(Pe)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Ve=Function.prototype.bind;function ke(ne,Pe){return Ve.call(ne,Pe)}class He{constructor(Pe){this.partialObserver=Pe}next(Pe){const{partialObserver:Me}=this;if(Me.next)try{Me.next(Pe)}catch(nt){Re(nt)}}error(Pe){const{partialObserver:Me}=this;if(Me.error)try{Me.error(Pe)}catch(nt){Re(nt)}else Re(Pe)}complete(){const{partialObserver:Pe}=this;if(Pe.complete)try{Pe.complete()}catch(Me){Re(Me)}}}class Le extends ye{constructor(Pe,Me,nt){let it;if(super(),(0,l.m)(Pe)||!Pe)it={next:Pe??void 0,error:Me??void 0,complete:nt??void 0};else{let Je;this&&de.config.useDeprecatedNextContext?(Je=Object.create(Pe),Je.unsubscribe=()=>this.unsubscribe(),it={next:Pe.next&&ke(Pe.next,Je),error:Pe.error&&ke(Pe.error,Je),complete:Pe.complete&&ke(Pe.complete,Je)}):it=Pe}this.destination=new He(it)}}function Re(ne){de.config.useDeprecatedSynchronousErrorHandling?(0,fe.O)(ne):(0,re.h)(ne)}function Dt(ne,Pe){const{onStoppedNotification:Me}=de.config;Me&&ae.z.setTimeout(()=>Me(ne,Pe))}const ut={closed:!0,next:ce.Z,error:function at(ne){throw ne},complete:ce.Z}},5350:(ct,De,L)=>{L.d(De,{Lc:()=>_e,w0:()=>ce,Nn:()=>ve});var l=L(89);const de=(0,L(8261).d)(be=>function(fe){be(this),this.message=fe?`${fe.length} errors occurred during unsubscription:\n${fe.map((ye,Ve)=>`${Ve+1}) ${ye.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=fe});var re=L(3647);class ce{constructor(ae){this.initialTeardown=ae,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let ae;if(!this.closed){this.closed=!0;const{_parentage:fe}=this;if(fe)if(this._parentage=null,Array.isArray(fe))for(const ke of fe)ke.remove(this);else fe.remove(this);const{initialTeardown:ye}=this;if((0,l.m)(ye))try{ye()}catch(ke){ae=ke instanceof de?ke.errors:[ke]}const{_finalizers:Ve}=this;if(Ve){this._finalizers=null;for(const ke of Ve)try{Te(ke)}catch(He){ae=ae??[],He instanceof de?ae=[...ae,...He.errors]:ae.push(He)}}if(ae)throw new de(ae)}}add(ae){var fe;if(ae&&ae!==this)if(this.closed)Te(ae);else{if(ae instanceof ce){if(ae.closed||ae._hasParent(this))return;ae._addParent(this)}(this._finalizers=null!==(fe=this._finalizers)&&void 0!==fe?fe:[]).push(ae)}}_hasParent(ae){const{_parentage:fe}=this;return fe===ae||Array.isArray(fe)&&fe.includes(ae)}_addParent(ae){const{_parentage:fe}=this;this._parentage=Array.isArray(fe)?(fe.push(ae),fe):fe?[fe,ae]:ae}_removeParent(ae){const{_parentage:fe}=this;fe===ae?this._parentage=null:Array.isArray(fe)&&(0,re.P)(fe,ae)}remove(ae){const{_finalizers:fe}=this;fe&&(0,re.P)(fe,ae),ae instanceof ce&&ae._removeParent(this)}}ce.EMPTY=(()=>{const be=new ce;return be.closed=!0,be})();const _e=ce.EMPTY;function ve(be){return be instanceof ce||be&&"closed"in be&&(0,l.m)(be.remove)&&(0,l.m)(be.add)&&(0,l.m)(be.unsubscribe)}function Te(be){(0,l.m)(be)?be():be.unsubscribe()}},3667:(ct,De,L)=>{L.d(De,{config:()=>l});const l={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},841:(ct,De,L)=>{L.d(De,{a:()=>ae,l:()=>fe});var l=L(1145),k=L(302),de=L(3477),re=L(1106),ce=L(8472),_e=L(9321),ve=L(4407),Te=L(8014),be=L(5797);function ae(...Ve){const ke=(0,_e.yG)(Ve),He=(0,_e.jO)(Ve),{args:Le,keys:Re}=(0,k.D)(Ve);if(0===Le.length)return(0,de.D)([],ke);const at=new l.y(fe(Le,ke,Re?Dt=>(0,ve.n)(Re,Dt):re.y));return He?at.pipe((0,ce.Z)(He)):at}function fe(Ve,ke,He=re.y){return Le=>{ye(ke,()=>{const{length:Re}=Ve,at=new Array(Re);let Dt=Re,ut=Re;for(let ne=0;ne<Re;ne++)ye(ke,()=>{const Pe=(0,de.D)(Ve[ne],ke);let Me=!1;Pe.subscribe((0,Te.x)(Le,nt=>{at[ne]=nt,Me||(Me=!0,ut--),ut||Le.next(He(at.slice()))},()=>{--Dt||Le.complete()}))},Le)},Le)}}function ye(Ve,ke,He){Ve?(0,be.f)(He,Ve,ke):ke()}},8402:(ct,De,L)=>{L.d(De,{z:()=>ce});var l=L(8563),de=L(9321),re=L(3477);function ce(..._e){return function k(){return(0,l.J)(1)}()((0,re.D)(_e,(0,de.yG)(_e)))}},1288:(ct,De,L)=>{L.d(De,{E:()=>k});const k=new(L(1145).y)(ce=>ce.complete())},6548:(ct,De,L)=>{L.d(De,{D:()=>Te});var l=L(1145),k=L(302),de=L(9417),re=L(9321),ce=L(8014),_e=L(8472),ve=L(4407);function Te(...be){const ae=(0,re.jO)(be),{args:fe,keys:ye}=(0,k.D)(be),Ve=new l.y(ke=>{const{length:He}=fe;if(!He)return void ke.complete();const Le=new Array(He);let Re=He,at=He;for(let Dt=0;Dt<He;Dt++){let ut=!1;(0,de.Xf)(fe[Dt]).subscribe((0,ce.x)(ke,ne=>{ut||(ut=!0,at--),Le[Dt]=ne},()=>Re--,void 0,()=>{(!Re||!ut)&&(at||ke.next(ye?(0,ve.n)(ye,Le):Le),ke.complete())}))}});return ae?Ve.pipe((0,_e.Z)(ae)):Ve}},3477:(ct,De,L)=>{L.d(De,{D:()=>nt});var l=L(9417),k=L(5797),de=L(4134),re=L(8014);function ce(it,Je=0){return(0,de.e)((wt,mt)=>{wt.subscribe((0,re.x)(mt,$t=>(0,k.f)(mt,it,()=>mt.next($t),Je),()=>(0,k.f)(mt,it,()=>mt.complete(),Je),$t=>(0,k.f)(mt,it,()=>mt.error($t),Je)))})}function _e(it,Je=0){return(0,de.e)((wt,mt)=>{mt.add(it.schedule(()=>wt.subscribe(mt),Je))})}var be=L(1145),fe=L(5395),ye=L(89);function ke(it,Je){if(!it)throw new Error("Iterable cannot be null");return new be.y(wt=>{(0,k.f)(wt,Je,()=>{const mt=it[Symbol.asyncIterator]();(0,k.f)(wt,Je,()=>{mt.next().then($t=>{$t.done?wt.complete():wt.next($t.value)})},0,!0)})})}var He=L(7298),Le=L(1246),Re=L(5859),at=L(4432),Dt=L(3656),ut=L(4993),ne=L(4766);function nt(it,Je){return Je?function Me(it,Je){if(null!=it){if((0,He.c)(it))return function ve(it,Je){return(0,l.Xf)(it).pipe(_e(Je),ce(Je))}(it,Je);if((0,Re.z)(it))return function ae(it,Je){return new be.y(wt=>{let mt=0;return Je.schedule(function(){mt===it.length?wt.complete():(wt.next(it[mt++]),wt.closed||this.schedule())})})}(it,Je);if((0,Le.t)(it))return function Te(it,Je){return(0,l.Xf)(it).pipe(_e(Je),ce(Je))}(it,Je);if((0,Dt.D)(it))return ke(it,Je);if((0,at.T)(it))return function Ve(it,Je){return new be.y(wt=>{let mt;return(0,k.f)(wt,Je,()=>{mt=it[fe.h](),(0,k.f)(wt,Je,()=>{let $t,Vn;try{({value:$t,done:Vn}=mt.next())}catch(Sn){return void wt.error(Sn)}Vn?wt.complete():wt.next($t)},0,!0)}),()=>(0,ye.m)(mt?.return)&&mt.return()})}(it,Je);if((0,ne.L)(it))return function Pe(it,Je){return ke((0,ne.Q)(it),Je)}(it,Je)}throw(0,ut.z)(it)}(it,Je):(0,l.Xf)(it)}},3276:(ct,De,L)=>{L.d(De,{R:()=>ae});var l=L(9417),k=L(1145),de=L(2874),re=L(5859),ce=L(89),_e=L(8472);const ve=["addListener","removeListener"],Te=["addEventListener","removeEventListener"],be=["on","off"];function ae(He,Le,Re,at){if((0,ce.m)(Re)&&(at=Re,Re=void 0),at)return ae(He,Le,Re).pipe((0,_e.Z)(at));const[Dt,ut]=function ke(He){return(0,ce.m)(He.addEventListener)&&(0,ce.m)(He.removeEventListener)}(He)?Te.map(ne=>Pe=>He[ne](Le,Pe,Re)):function ye(He){return(0,ce.m)(He.addListener)&&(0,ce.m)(He.removeListener)}(He)?ve.map(fe(He,Le)):function Ve(He){return(0,ce.m)(He.on)&&(0,ce.m)(He.off)}(He)?be.map(fe(He,Le)):[];if(!Dt&&(0,re.z)(He))return(0,de.z)(ne=>ae(ne,Le,Re))((0,l.Xf)(He));if(!Dt)throw new TypeError("Invalid event target");return new k.y(ne=>{const Pe=(...Me)=>ne.next(1<Me.length?Me:Me[0]);return Dt(Pe),()=>ut(Pe)})}function fe(He,Le){return Re=>at=>He[Re](Le,at)}},9417:(ct,De,L)=>{L.d(De,{Xf:()=>Ve});var l=L(3449),k=L(5859),de=L(1246),re=L(1145),ce=L(7298),_e=L(3656),ve=L(4993),Te=L(4432),be=L(4766),ae=L(89),fe=L(3320),ye=L(7649);function Ve(ne){if(ne instanceof re.y)return ne;if(null!=ne){if((0,ce.c)(ne))return function ke(ne){return new re.y(Pe=>{const Me=ne[ye.L]();if((0,ae.m)(Me.subscribe))return Me.subscribe(Pe);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(ne);if((0,k.z)(ne))return function He(ne){return new re.y(Pe=>{for(let Me=0;Me<ne.length&&!Pe.closed;Me++)Pe.next(ne[Me]);Pe.complete()})}(ne);if((0,de.t)(ne))return function Le(ne){return new re.y(Pe=>{ne.then(Me=>{Pe.closed||(Pe.next(Me),Pe.complete())},Me=>Pe.error(Me)).then(null,fe.h)})}(ne);if((0,_e.D)(ne))return at(ne);if((0,Te.T)(ne))return function Re(ne){return new re.y(Pe=>{for(const Me of ne)if(Pe.next(Me),Pe.closed)return;Pe.complete()})}(ne);if((0,be.L)(ne))return function Dt(ne){return at((0,be.Q)(ne))}(ne)}throw(0,ve.z)(ne)}function at(ne){return new re.y(Pe=>{(function ut(ne,Pe){var Me,nt,it,Je;return(0,l.mG)(this,void 0,void 0,function*(){try{for(Me=(0,l.KL)(ne);!(nt=yield Me.next()).done;)if(Pe.next(nt.value),Pe.closed)return}catch(wt){it={error:wt}}finally{try{nt&&!nt.done&&(Je=Me.return)&&(yield Je.call(Me))}finally{if(it)throw it.error}}Pe.complete()})})(ne,Pe).catch(Me=>Pe.error(Me))})}},7137:(ct,De,L)=>{L.d(De,{F:()=>de});var l=L(4898),k=L(1297);function de(re=0,ce=l.z){return re<0&&(re=0),(0,k.H)(re,re,ce)}},3506:(ct,De,L)=>{L.d(De,{T:()=>_e});var l=L(8563),k=L(9417),de=L(1288),re=L(9321),ce=L(3477);function _e(...ve){const Te=(0,re.yG)(ve),be=(0,re._6)(ve,1/0),ae=ve;return ae.length?1===ae.length?(0,k.Xf)(ae[0]):(0,l.J)(be)((0,ce.D)(ae,Te)):de.E}},287:(ct,De,L)=>{L.d(De,{of:()=>de});var l=L(9321),k=L(3477);function de(...re){const ce=(0,l.yG)(re);return(0,k.D)(re,ce)}},1297:(ct,De,L)=>{L.d(De,{H:()=>ce});var l=L(1145),k=L(4898),de=L(625);function ce(_e=0,ve,Te=k.P){let be=-1;return null!=ve&&((0,de.K)(ve)?Te=ve:be=ve),new l.y(ae=>{let fe=function re(_e){return _e instanceof Date&&!isNaN(_e)}(_e)?+_e-Te.now():_e;fe<0&&(fe=0);let ye=0;return Te.schedule(function(){ae.closed||(ae.next(ye++),0<=be?this.schedule(void 0,be):ae.complete())},fe)})}},8014:(ct,De,L)=>{L.d(De,{x:()=>k});var l=L(6609);function k(re,ce,_e,ve,Te){return new de(re,ce,_e,ve,Te)}class de extends l.Lv{constructor(ce,_e,ve,Te,be,ae){super(ce),this.onFinalize=be,this.shouldUnsubscribe=ae,this._next=_e?function(fe){try{_e(fe)}catch(ye){ce.error(ye)}}:super._next,this._error=Te?function(fe){try{Te(fe)}catch(ye){ce.error(ye)}finally{this.unsubscribe()}}:super._error,this._complete=ve?function(){try{ve()}catch(fe){ce.error(fe)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var ce;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:_e}=this;super.unsubscribe(),!_e&&(null===(ce=this.onFinalize)||void 0===ce||ce.call(this))}}}},6927:(ct,De,L)=>{L.d(De,{e:()=>ve});var l=L(4898),k=L(4134),de=L(9417),re=L(8014),_e=L(1297);function ve(Te,be=l.z){return function ce(Te){return(0,k.e)((be,ae)=>{let fe=!1,ye=null,Ve=null,ke=!1;const He=()=>{if(Ve?.unsubscribe(),Ve=null,fe){fe=!1;const Re=ye;ye=null,ae.next(Re)}ke&&ae.complete()},Le=()=>{Ve=null,ke&&ae.complete()};be.subscribe((0,re.x)(ae,Re=>{fe=!0,ye=Re,Ve||(0,de.Xf)(Te(Re)).subscribe(Ve=(0,re.x)(ae,He,Le))},()=>{ke=!0,(!fe||!Ve||Ve.closed)&&ae.complete()}))})}(()=>(0,_e.H)(Te,be))}},1173:(ct,De,L)=>{L.d(De,{b:()=>de});var l=L(2874),k=L(89);function de(re,ce){return(0,k.m)(ce)?(0,l.z)(re,ce,1):(0,l.z)(re,1)}},1050:(ct,De,L)=>{L.d(De,{b:()=>re});var l=L(4898),k=L(4134),de=L(8014);function re(ce,_e=l.z){return(0,k.e)((ve,Te)=>{let be=null,ae=null,fe=null;const ye=()=>{if(be){be.unsubscribe(),be=null;const ke=ae;ae=null,Te.next(ke)}};function Ve(){const ke=fe+ce,He=_e.now();if(He<ke)return be=this.schedule(void 0,ke-He),void Te.add(be);ye()}ve.subscribe((0,de.x)(Te,ke=>{ae=ke,fe=_e.now(),be||(be=_e.schedule(Ve,ce),Te.add(be))},()=>{ye(),Te.complete()},void 0,()=>{ae=be=null}))})}},4475:(ct,De,L)=>{L.d(De,{d:()=>de});var l=L(4134),k=L(8014);function de(re){return(0,l.e)((ce,_e)=>{let ve=!1;ce.subscribe((0,k.x)(_e,Te=>{ve=!0,_e.next(Te)},()=>{ve||_e.next(re),_e.complete()}))})}},8777:(ct,De,L)=>{L.d(De,{x:()=>re});var l=L(1106),k=L(4134),de=L(8014);function re(_e,ve=l.y){return _e=_e??ce,(0,k.e)((Te,be)=>{let ae,fe=!0;Te.subscribe((0,de.x)(be,ye=>{const Ve=ve(ye);(fe||!_e(ae,Ve))&&(fe=!1,ae=Ve,be.next(ye))}))})}function ce(_e,ve){return _e===ve}},9735:(ct,De,L)=>{L.d(De,{h:()=>de});var l=L(4134),k=L(8014);function de(re,ce){return(0,l.e)((_e,ve)=>{let Te=0;_e.subscribe((0,k.x)(ve,be=>re.call(ce,be,Te++)&&ve.next(be)))})}},5220:(ct,De,L)=>{L.d(De,{x:()=>k});var l=L(4134);function k(de){return(0,l.e)((re,ce)=>{try{re.subscribe(ce)}finally{ce.add(de)}})}},2972:(ct,De,L)=>{L.d(De,{P:()=>ve});var l=L(4938),k=L(9735),de=L(4359),re=L(4475),ce=L(8090),_e=L(1106);function ve(Te,be){const ae=arguments.length>=2;return fe=>fe.pipe(Te?(0,k.h)((ye,Ve)=>Te(ye,Ve,fe)):_e.y,(0,de.q)(1),ae?(0,re.d)(be):(0,ce.T)(()=>new l.K))}},5990:(ct,De,L)=>{L.d(De,{U:()=>de});var l=L(4134),k=L(8014);function de(re,ce){return(0,l.e)((_e,ve)=>{let Te=0;_e.subscribe((0,k.x)(ve,be=>{ve.next(re.call(ce,be,Te++))}))})}},3197:(ct,De,L)=>{L.d(De,{h:()=>k});var l=L(5990);function k(de){return(0,l.U)(()=>de)}},8563:(ct,De,L)=>{L.d(De,{J:()=>de});var l=L(2874),k=L(1106);function de(re=1/0){return(0,l.z)(k.y,re)}},2874:(ct,De,L)=>{L.d(De,{z:()=>Te});var l=L(5990),k=L(9417),de=L(4134),re=L(5797),ce=L(8014),ve=L(89);function Te(be,ae,fe=1/0){return(0,ve.m)(ae)?Te((ye,Ve)=>(0,l.U)((ke,He)=>ae(ye,ke,Ve,He))((0,k.Xf)(be(ye,Ve))),fe):("number"==typeof ae&&(fe=ae),(0,de.e)((ye,Ve)=>function _e(be,ae,fe,ye,Ve,ke,He,Le){const Re=[];let at=0,Dt=0,ut=!1;const ne=()=>{ut&&!Re.length&&!at&&ae.complete()},Pe=nt=>at<ye?Me(nt):Re.push(nt),Me=nt=>{ke&&ae.next(nt),at++;let it=!1;(0,k.Xf)(fe(nt,Dt++)).subscribe((0,ce.x)(ae,Je=>{Ve?.(Je),ke?Pe(Je):ae.next(Je)},()=>{it=!0},void 0,()=>{if(it)try{for(at--;Re.length&&at<ye;){const Je=Re.shift();He?(0,re.f)(ae,He,()=>Me(Je)):Me(Je)}ne()}catch(Je){ae.error(Je)}}))};return be.subscribe((0,ce.x)(ae,Pe,()=>{ut=!0,ne()})),()=>{Le?.()}}(ye,Ve,be,fe)))}},9853:(ct,De,L)=>{L.d(De,{B:()=>ce});var l=L(9417),k=L(5992),de=L(6609),re=L(4134);function ce(ve={}){const{connector:Te=(()=>new k.x),resetOnError:be=!0,resetOnComplete:ae=!0,resetOnRefCountZero:fe=!0}=ve;return ye=>{let Ve,ke,He,Le=0,Re=!1,at=!1;const Dt=()=>{ke?.unsubscribe(),ke=void 0},ut=()=>{Dt(),Ve=He=void 0,Re=at=!1},ne=()=>{const Pe=Ve;ut(),Pe?.unsubscribe()};return(0,re.e)((Pe,Me)=>{Le++,!at&&!Re&&Dt();const nt=He=He??Te();Me.add(()=>{Le--,0===Le&&!at&&!Re&&(ke=_e(ne,fe))}),nt.subscribe(Me),!Ve&&Le>0&&(Ve=new de.Hp({next:it=>nt.next(it),error:it=>{at=!0,Dt(),ke=_e(ut,be,it),nt.error(it)},complete:()=>{Re=!0,Dt(),ke=_e(ut,ae),nt.complete()}}),(0,l.Xf)(Pe).subscribe(Ve))})(ye)}}function _e(ve,Te,...be){if(!0===Te)return void ve();if(!1===Te)return;const ae=new de.Hp({next:()=>{ae.unsubscribe(),ve()}});return(0,l.Xf)(Te(...be)).subscribe(ae)}},1553:(ct,De,L)=>{L.d(De,{O:()=>re});var l=L(8402),k=L(9321),de=L(4134);function re(...ce){const _e=(0,k.yG)(ce);return(0,de.e)((ve,Te)=>{(_e?(0,l.z)(ce,ve,_e):(0,l.z)(ce,ve)).subscribe(Te)})}},3318:(ct,De,L)=>{L.d(De,{w:()=>re});var l=L(9417),k=L(4134),de=L(8014);function re(ce,_e){return(0,k.e)((ve,Te)=>{let be=null,ae=0,fe=!1;const ye=()=>fe&&!be&&Te.complete();ve.subscribe((0,de.x)(Te,Ve=>{be?.unsubscribe();let ke=0;const He=ae++;(0,l.Xf)(ce(Ve,He)).subscribe(be=(0,de.x)(Te,Le=>Te.next(_e?_e(Ve,Le,He,ke++):Le),()=>{be=null,ye()}))},()=>{fe=!0,ye()}))})}},4359:(ct,De,L)=>{L.d(De,{q:()=>re});var l=L(1288),k=L(4134),de=L(8014);function re(ce){return ce<=0?()=>l.E:(0,k.e)((_e,ve)=>{let Te=0;_e.subscribe((0,de.x)(ve,be=>{++Te<=ce&&(ve.next(be),ce<=Te&&ve.complete())}))})}},7701:(ct,De,L)=>{L.d(De,{R:()=>ce});var l=L(4134),k=L(8014),de=L(9417),re=L(5998);function ce(_e){return(0,l.e)((ve,Te)=>{(0,de.Xf)(_e).subscribe((0,k.x)(Te,()=>Te.complete(),re.Z)),!Te.closed&&ve.subscribe(Te)})}},8527:(ct,De,L)=>{L.d(De,{b:()=>ce});var l=L(89),k=L(4134),de=L(8014),re=L(1106);function ce(_e,ve,Te){const be=(0,l.m)(_e)||ve||Te?{next:_e,error:ve,complete:Te}:_e;return be?(0,k.e)((ae,fe)=>{var ye;null===(ye=be.subscribe)||void 0===ye||ye.call(be);let Ve=!0;ae.subscribe((0,de.x)(fe,ke=>{var He;null===(He=be.next)||void 0===He||He.call(be,ke),fe.next(ke)},()=>{var ke;Ve=!1,null===(ke=be.complete)||void 0===ke||ke.call(be),fe.complete()},ke=>{var He;Ve=!1,null===(He=be.error)||void 0===He||He.call(be,ke),fe.error(ke)},()=>{var ke,He;Ve&&(null===(ke=be.unsubscribe)||void 0===ke||ke.call(be)),null===(He=be.finalize)||void 0===He||He.call(be)}))}):re.y}},8090:(ct,De,L)=>{L.d(De,{T:()=>re});var l=L(4938),k=L(4134),de=L(8014);function re(_e=ce){return(0,k.e)((ve,Te)=>{let be=!1;ve.subscribe((0,de.x)(Te,ae=>{be=!0,Te.next(ae)},()=>be?Te.complete():Te.error(_e())))})}function ce(){return new l.K}},8691:(ct,De,L)=>{L.d(De,{o:()=>ce});var l=L(5350);class k extends l.w0{constructor(ve,Te){super()}schedule(ve,Te=0){return this}}const de={setInterval(_e,ve,...Te){const{delegate:be}=de;return be?.setInterval?be.setInterval(_e,ve,...Te):setInterval(_e,ve,...Te)},clearInterval(_e){const{delegate:ve}=de;return(ve?.clearInterval||clearInterval)(_e)},delegate:void 0};var re=L(3647);class ce extends k{constructor(ve,Te){super(ve,Te),this.scheduler=ve,this.work=Te,this.pending=!1}schedule(ve,Te=0){var be;if(this.closed)return this;this.state=ve;const ae=this.id,fe=this.scheduler;return null!=ae&&(this.id=this.recycleAsyncId(fe,ae,Te)),this.pending=!0,this.delay=Te,this.id=null!==(be=this.id)&&void 0!==be?be:this.requestAsyncId(fe,this.id,Te),this}requestAsyncId(ve,Te,be=0){return de.setInterval(ve.flush.bind(ve,this),be)}recycleAsyncId(ve,Te,be=0){if(null!=be&&this.delay===be&&!1===this.pending)return Te;null!=Te&&de.clearInterval(Te)}execute(ve,Te){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const be=this._execute(ve,Te);if(be)return be;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(ve,Te){let ae,be=!1;try{this.work(ve)}catch(fe){be=!0,ae=fe||new Error("Scheduled action threw falsy error")}if(be)return this.unsubscribe(),ae}unsubscribe(){if(!this.closed){const{id:ve,scheduler:Te}=this,{actions:be}=Te;this.work=this.state=this.scheduler=null,this.pending=!1,(0,re.P)(be,this),null!=ve&&(this.id=this.recycleAsyncId(Te,ve,null)),this.delay=null,super.unsubscribe()}}}},1722:(ct,De,L)=>{L.d(De,{v:()=>de});var l=L(238);class k{constructor(ce,_e=k.now){this.schedulerActionCtor=ce,this.now=_e}schedule(ce,_e=0,ve){return new this.schedulerActionCtor(this,ce).schedule(ve,_e)}}k.now=l.l.now;class de extends k{constructor(ce,_e=k.now){super(ce,_e),this.actions=[],this._active=!1}flush(ce){const{actions:_e}=this;if(this._active)return void _e.push(ce);let ve;this._active=!0;do{if(ve=ce.execute(ce.state,ce.delay))break}while(ce=_e.shift());if(this._active=!1,ve){for(;ce=_e.shift();)ce.unsubscribe();throw ve}}}},3733:(ct,De,L)=>{L.d(De,{Z:()=>ve});var l=L(8691),k=L(5350);const de={schedule(be){let ae=requestAnimationFrame,fe=cancelAnimationFrame;const{delegate:ye}=de;ye&&(ae=ye.requestAnimationFrame,fe=ye.cancelAnimationFrame);const Ve=ae(ke=>{fe=void 0,be(ke)});return new k.w0(()=>fe?.(Ve))},requestAnimationFrame(...be){const{delegate:ae}=de;return(ae?.requestAnimationFrame||requestAnimationFrame)(...be)},cancelAnimationFrame(...be){const{delegate:ae}=de;return(ae?.cancelAnimationFrame||cancelAnimationFrame)(...be)},delegate:void 0};var ce=L(1722);const ve=new class _e extends ce.v{flush(ae){this._active=!0;const fe=this._scheduled;this._scheduled=void 0;const{actions:ye}=this;let Ve;ae=ae||ye.shift();do{if(Ve=ae.execute(ae.state,ae.delay))break}while((ae=ye[0])&&ae.id===fe&&ye.shift());if(this._active=!1,Ve){for(;(ae=ye[0])&&ae.id===fe&&ye.shift();)ae.unsubscribe();throw Ve}}}(class re extends l.o{constructor(ae,fe){super(ae,fe),this.scheduler=ae,this.work=fe}requestAsyncId(ae,fe,ye=0){return null!==ye&&ye>0?super.requestAsyncId(ae,fe,ye):(ae.actions.push(this),ae._scheduled||(ae._scheduled=de.requestAnimationFrame(()=>ae.flush(void 0))))}recycleAsyncId(ae,fe,ye=0){var Ve;if(null!=ye?ye>0:this.delay>0)return super.recycleAsyncId(ae,fe,ye);const{actions:ke}=ae;null!=fe&&(null===(Ve=ke[ke.length-1])||void 0===Ve?void 0:Ve.id)!==fe&&(de.cancelAnimationFrame(fe),ae._scheduled=void 0)}})},2698:(ct,De,L)=>{L.d(De,{E:()=>ke});var l=L(8691);let de,k=1;const re={};function ce(Le){return Le in re&&(delete re[Le],!0)}const _e={setImmediate(Le){const Re=k++;return re[Re]=!0,de||(de=Promise.resolve()),de.then(()=>ce(Re)&&Le()),Re},clearImmediate(Le){ce(Le)}},{setImmediate:Te,clearImmediate:be}=_e,ae={setImmediate(...Le){const{delegate:Re}=ae;return(Re?.setImmediate||Te)(...Le)},clearImmediate(Le){const{delegate:Re}=ae;return(Re?.clearImmediate||be)(Le)},delegate:void 0};var ye=L(1722);const ke=new class Ve extends ye.v{flush(Re){this._active=!0;const at=this._scheduled;this._scheduled=void 0;const{actions:Dt}=this;let ut;Re=Re||Dt.shift();do{if(ut=Re.execute(Re.state,Re.delay))break}while((Re=Dt[0])&&Re.id===at&&Dt.shift());if(this._active=!1,ut){for(;(Re=Dt[0])&&Re.id===at&&Dt.shift();)Re.unsubscribe();throw ut}}}(class fe extends l.o{constructor(Re,at){super(Re,at),this.scheduler=Re,this.work=at}requestAsyncId(Re,at,Dt=0){return null!==Dt&&Dt>0?super.requestAsyncId(Re,at,Dt):(Re.actions.push(this),Re._scheduled||(Re._scheduled=ae.setImmediate(Re.flush.bind(Re,void 0))))}recycleAsyncId(Re,at,Dt=0){var ut;if(null!=Dt?Dt>0:this.delay>0)return super.recycleAsyncId(Re,at,Dt);const{actions:ne}=Re;null!=at&&(null===(ut=ne[ne.length-1])||void 0===ut?void 0:ut.id)!==at&&(ae.clearImmediate(at),Re._scheduled===at&&(Re._scheduled=void 0))}})},4898:(ct,De,L)=>{L.d(De,{P:()=>re,z:()=>de});var l=L(8691);const de=new(L(1722).v)(l.o),re=de},238:(ct,De,L)=>{L.d(De,{l:()=>l});const l={now:()=>(l.delegate||Date).now(),delegate:void 0}},9877:(ct,De,L)=>{L.d(De,{z:()=>l});const l={setTimeout(k,de,...re){const{delegate:ce}=l;return ce?.setTimeout?ce.setTimeout(k,de,...re):setTimeout(k,de,...re)},clearTimeout(k){const{delegate:de}=l;return(de?.clearTimeout||clearTimeout)(k)},delegate:void 0}},5395:(ct,De,L)=>{L.d(De,{h:()=>k});const k=function l(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},7649:(ct,De,L)=>{L.d(De,{L:()=>l});const l="function"==typeof Symbol&&Symbol.observable||"@@observable"},4938:(ct,De,L)=>{L.d(De,{K:()=>k});const k=(0,L(8261).d)(de=>function(){de(this),this.name="EmptyError",this.message="no elements in sequence"})},9321:(ct,De,L)=>{L.d(De,{_6:()=>_e,jO:()=>re,yG:()=>ce});var l=L(89),k=L(625);function de(ve){return ve[ve.length-1]}function re(ve){return(0,l.m)(de(ve))?ve.pop():void 0}function ce(ve){return(0,k.K)(de(ve))?ve.pop():void 0}function _e(ve,Te){return"number"==typeof de(ve)?ve.pop():Te}},302:(ct,De,L)=>{L.d(De,{D:()=>ce});const{isArray:l}=Array,{getPrototypeOf:k,prototype:de,keys:re}=Object;function ce(ve){if(1===ve.length){const Te=ve[0];if(l(Te))return{args:Te,keys:null};if(function _e(ve){return ve&&"object"==typeof ve&&k(ve)===de}(Te)){const be=re(Te);return{args:be.map(ae=>Te[ae]),keys:be}}}return{args:ve,keys:null}}},3647:(ct,De,L)=>{function l(k,de){if(k){const re=k.indexOf(de);0<=re&&k.splice(re,1)}}L.d(De,{P:()=>l})},8261:(ct,De,L)=>{function l(k){const re=k(ce=>{Error.call(ce),ce.stack=(new Error).stack});return re.prototype=Object.create(Error.prototype),re.prototype.constructor=re,re}L.d(De,{d:()=>l})},4407:(ct,De,L)=>{function l(k,de){return k.reduce((re,ce,_e)=>(re[ce]=de[_e],re),{})}L.d(De,{n:()=>l})},9094:(ct,De,L)=>{L.d(De,{O:()=>re,x:()=>de});var l=L(3667);let k=null;function de(ce){if(l.config.useDeprecatedSynchronousErrorHandling){const _e=!k;if(_e&&(k={errorThrown:!1,error:null}),ce(),_e){const{errorThrown:ve,error:Te}=k;if(k=null,ve)throw Te}}else ce()}function re(ce){l.config.useDeprecatedSynchronousErrorHandling&&k&&(k.errorThrown=!0,k.error=ce)}},5797:(ct,De,L)=>{function l(k,de,re,ce=0,_e=!1){const ve=de.schedule(function(){re(),_e?k.add(this.schedule(null,ce)):this.unsubscribe()},ce);if(k.add(ve),!_e)return ve}L.d(De,{f:()=>l})},1106:(ct,De,L)=>{function l(k){return k}L.d(De,{y:()=>l})},5859:(ct,De,L)=>{L.d(De,{z:()=>l});const l=k=>k&&"number"==typeof k.length&&"function"!=typeof k},3656:(ct,De,L)=>{L.d(De,{D:()=>k});var l=L(89);function k(de){return Symbol.asyncIterator&&(0,l.m)(de?.[Symbol.asyncIterator])}},89:(ct,De,L)=>{function l(k){return"function"==typeof k}L.d(De,{m:()=>l})},7298:(ct,De,L)=>{L.d(De,{c:()=>de});var l=L(7649),k=L(89);function de(re){return(0,k.m)(re[l.L])}},4432:(ct,De,L)=>{L.d(De,{T:()=>de});var l=L(5395),k=L(89);function de(re){return(0,k.m)(re?.[l.h])}},2861:(ct,De,L)=>{L.d(De,{b:()=>de});var l=L(1145),k=L(89);function de(re){return!!re&&(re instanceof l.y||(0,k.m)(re.lift)&&(0,k.m)(re.subscribe))}},1246:(ct,De,L)=>{L.d(De,{t:()=>k});var l=L(89);function k(de){return(0,l.m)(de?.then)}},4766:(ct,De,L)=>{L.d(De,{L:()=>re,Q:()=>de});var l=L(3449),k=L(89);function de(ce){return(0,l.FC)(this,arguments,function*(){const ve=ce.getReader();try{for(;;){const{value:Te,done:be}=yield(0,l.qq)(ve.read());if(be)return yield(0,l.qq)(void 0);yield yield(0,l.qq)(Te)}}finally{ve.releaseLock()}})}function re(ce){return(0,k.m)(ce?.getReader)}},625:(ct,De,L)=>{L.d(De,{K:()=>k});var l=L(89);function k(de){return de&&(0,l.m)(de.schedule)}},4134:(ct,De,L)=>{L.d(De,{A:()=>k,e:()=>de});var l=L(89);function k(re){return(0,l.m)(re?.lift)}function de(re){return ce=>{if(k(ce))return ce.lift(function(_e){try{return re(_e,this)}catch(ve){this.error(ve)}});throw new TypeError("Unable to lift unknown Observable type")}}},8472:(ct,De,L)=>{L.d(De,{Z:()=>re});var l=L(5990);const{isArray:k}=Array;function re(ce){return(0,l.U)(_e=>function de(ce,_e){return k(_e)?ce(..._e):ce(_e)}(ce,_e))}},5998:(ct,De,L)=>{function l(){}L.d(De,{Z:()=>l})},5357:(ct,De,L)=>{L.d(De,{U:()=>de,z:()=>k});var l=L(1106);function k(...re){return de(re)}function de(re){return 0===re.length?l.y:1===re.length?re[0]:function(_e){return re.reduce((ve,Te)=>Te(ve),_e)}}},3320:(ct,De,L)=>{L.d(De,{h:()=>de});var l=L(3667),k=L(9877);function de(re){k.z.setTimeout(()=>{const{onUnhandledError:ce}=l.config;if(!ce)throw re;ce(re)})}},4993:(ct,De,L)=>{function l(k){return new TypeError(`You provided ${null!==k&&"object"==typeof k?"an invalid object":`'${k}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}L.d(De,{z:()=>l})},9498:(ct,De,L)=>{L.d(De,{q:()=>ce});var l=L(7243),k=L(9223),de=L(3223),re=L(3714);let ce=(()=>{class _e{static#e=this.\u0275fac=function(be){return new(be||_e)};static#t=this.\u0275mod=re.oAB({type:_e});static#n=this.\u0275inj=re.cJS({imports:[l.K6A,k.u5,k.UX,de.ez]})}return _e})()},7997:(ct,De,L)=>{L.d(De,{c:()=>de});var l=L(5992),k=L(3714);let de=(()=>{class re{constructor(){this.alertSource=new l.x,this.alert$=this.alertSource.asObservable()}alert(_e){this.alertSource.next(_e)}static#e=this.\u0275fac=function(ve){return new(ve||re)};static#t=this.\u0275prov=k.Yz7({token:re,factory:re.\u0275fac,providedIn:"root"})}return re})()},7512:(ct,De,L)=>{L.d(De,{N:()=>de});var l=L(5992),k=L(3714);let de=(()=>{class re{constructor(){this.progressSource=new l.x,this.progress$=this.progressSource.asObservable()}progress(_e){this.progressSource.next(_e)}static#e=this.\u0275fac=function(ve){return new(ve||re)};static#t=this.\u0275prov=k.Yz7({token:re,factory:re.\u0275fac,providedIn:"root"})}return re})()},5476:(ct,De,L)=>{var l=L(5813),k=L(3714),de=L(1794);const re=[{path:"",redirectTo:"examples",pathMatch:"full"},{path:"examples",loadChildren:()=>L.e(371).then(L.bind(L,6371)).then(U=>U.RouteBookmarksModule)},{path:"example-layers",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(990),L.e(270),L.e(592),L.e(466)]).then(L.bind(L,2466)).then(U=>U.RouteMapModule),data:{title:"Layers",description:"Example shows how to work with UKIS layers, groups and the layer-service.",img:"assets/route-layers.jpg"}},{path:"example-projection",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(592),L.e(754)]).then(L.bind(L,6754)).then(U=>U.RouteMap2Module),data:{title:"Projection",description:"Example shows how to work with projections using ukis-projection-switch from @dlr-eoc/map-tools.",img:"assets/route-projection.jpg"}},{path:"example-events",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(592),L.e(449)]).then(L.bind(L,7248)).then(U=>U.RouteMap3Module),data:{title:"Events",description:"Example of map and layer events e.g. to show a loading bar or create a grid layer based on zoom.",img:"assets/route-events.jpg"}},{path:"example-custom-layers",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(595),L.e(633),L.e(592),L.e(209)]).then(L.bind(L,209)).then(U=>U.RouteMap4Module),data:{title:"Custom Layers",description:"Example how to use UKIS custom layer e.g. use OpenLayers instances directly, bind events, styles and renderers.",img:"assets/route-custom-layers.jpg"}},{path:"example-owc-layers",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(990),L.e(445)]).then(L.bind(L,8445)).then(U=>U.RouteExampleOwcLayersModule),data:{title:"OWS Context layers",description:'Example how to declaratively configure layers in a json structure to save and exchange this state. This is using the "OWS Context GeoJSON format". The example context are sored in projects/shared-assets/owc.',img:"assets/route-ows-context.jpg"}},{path:"example-layout",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(198)]).then(L.bind(L,6198)).then(U=>U.RouteMap5Module),data:{title:"Two Vertical-Nav Layout",description:'Example shows how to use "Clarity Vertical Nav" on both sides and a footer. This should not be used when working on smaller screens. See also "Clarity Design System" Responsive navigation.',img:"assets/route-2-nav.jpg"}},{path:"example-layer-style",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(783)]).then(L.bind(L,4783)).then(U=>U.RouteMap6Module),data:{title:"Switching Layer-Style",description:'The example shows how styles for "WMS" and "WMTS" are switched dynamically.',img:"assets/route-style-switch.jpg"}},{path:"ol-performance",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(62)]).then(L.bind(L,4062)).then(U=>U.RouteMap7Module),data:{title:"Ol-Performance",description:"Example to messure/check performance on layer rendering.",img:"assets/route-performance.jpg"}},{path:"threejs",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(595),L.e(592),L.e(395)]).then(L.bind(L,4395)).then(U=>U.RouteExampleThreejsModule),data:{title:"Threejs",description:"This example shows a Threejs map connected to a OpenLayers map e.g. to display a globe and a flat map side by side.",img:"assets/route-threejs.jpg"}},{path:"cesium",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(633),L.e(394)]).then(L.bind(L,8394)).then(U=>U.RouteCesiumModule),data:{title:"Cesium",description:"This example shows a cesium map and switch to OpenLayers map",img:"assets/route-cesium.jpg"}},{path:"maplibre",loadChildren:()=>Promise.all([L.e(550),L.e(270),L.e(667)]).then(L.bind(L,7667)).then(U=>U.RouteExampleMaplibreModule),data:{title:"Maplibre",description:"This example shows a maplibre map and how to work with UKIS layers",img:"assets/route-maplibre.jpg"}},{path:"licenses",loadChildren:()=>L.e(365).then(L.bind(L,8365)).then(U=>U.RouteLicensesModule),data:{title:"Licenses",description:'This example renders all used dependencies specified in assets/licenses.json which are created with "license-checker"',img:"assets/route-licenses.jpg"}}];let ce=(()=>{class U{static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275mod=k.oAB({type:U});static#n=this.\u0275inj=k.cJS({imports:[de.Bz.forRoot(re,{useHash:!0,preloadingStrategy:de.wm}),de.Bz]})}return U})();typeof window<"u"&&window.hasOwnProperty("ClarityIcons")&&window.ClarityIcons.add({ukis:'\n <svg version="1.1" viewBox="0 0 36 36" preserveAspectRatio="xMidYMid meet" class="has-solid"\n xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="false" role="img">\n <title>ukis\n \n \n \n \n \n ',dlr:'\n \n dlr\n \n \n ',eoc:'\n \n eoc\n \n \n '});const Te=JSON.parse('{"i8":"12.0.1-next.4"}').i8;var be=L(9735),ae=L(7997),fe=L(7512),ye=L(3223),Ve=L(7243);function ke(U,D){if(1&U&&(k.TgZ(0,"span",12),k._uU(1),k.qZA()),2&U){const E=k.oxw();k.xp6(1),k.Oqu(E.version)}}const He=[[["",8,"header-nav-el"]],"*",[["",8,"header-action-el"]]],Le=function(U){return{"short-title":U}},Re=[".header-nav-el","*",".header-action-el"];let at=(()=>{class U{constructor(){this.title="",this.shortTitle="",this.version=""}ngOnInit(){}static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275cmp=k.Xpm({type:U,selectors:[["ukis-header"]],inputs:{title:["ukis-title","title"],shortTitle:["ukis-short-title","shortTitle"],version:["ukis-version","version"]},ngContentSelectors:Re,decls:17,vars:9,consts:[[1,"header-1"],[1,"branding",3,"ngClass"],["href","https://www.dlr.de","target","_blank","alt","link to dlr"],["shape","dlr","size","48","alt","dlr icon",1,"is-solid"],["href","https://www.dlr.de/de/eoc/ueber-uns/deutsches_fernerkundungsdatenzentrum/georisiken-und-zivile-sicherheit/informationssysteme-und-geomatik/ukis-umwelt-und-kriseninformationssysteme","target","_blank","alt","link to dlr ukis"],["shape","ukis","size","33","alt","ukis icon",1,"is-solid"],["routerLink","/","routerLinkActive","active",1,"nav-link"],[1,"title",3,"title"],[1,"title","short",3,"title"],["class","version",4,"ngIf"],[1,"header-nav",3,"clr-nav-level"],[1,"header-actions"],[1,"version"]],template:function(N,G){1&N&&(k.F$t(He),k.TgZ(0,"clr-header",0)(1,"div",1)(2,"a",2),k._UZ(3,"clr-icon",3),k.qZA(),k.TgZ(4,"a",4),k._UZ(5,"clr-icon",5),k.qZA(),k.TgZ(6,"a",6)(7,"span",7),k._uU(8),k.qZA(),k.TgZ(9,"span",8),k._uU(10),k.qZA()(),k.YNc(11,ke,2,1,"span",9),k.qZA(),k.TgZ(12,"div",10),k.Hsn(13),k.qZA(),k.Hsn(14,1),k.TgZ(15,"div",11),k.Hsn(16,2),k.qZA()()),2&N&&(k.xp6(1),k.Q6J("ngClass",k.VKq(7,Le,G.shortTitle)),k.xp6(6),k.Q6J("title",G.title),k.xp6(1),k.Oqu(G.title),k.xp6(1),k.Q6J("title",G.title),k.xp6(1),k.Oqu(G.shortTitle),k.xp6(1),k.Q6J("ngIf",G.version),k.xp6(1),k.Q6J("clr-nav-level",1))},dependencies:[ye.mk,ye.O5,de.rH,de.Od,Ve.qvL,Ve.uUW,Ve.saT,Ve.toC]})}return U})();function Dt(U,D){if(1&U){const E=k.EpF();k.TgZ(0,"button",11),k.NdJ("click",function(){const q=k.CHM(E).$implicit;return k.KtG(q.callback&&q.callback())}),k._uU(1),k.qZA()}if(2&U){const E=D.$implicit;k.xp6(1),k.Oqu(E.title)}}function ut(U,D){if(1&U&&(k.TgZ(0,"div",9),k.YNc(1,Dt,2,1,"button",10),k.qZA()),2&U){const E=k.oxw(2);k.xp6(1),k.Q6J("ngForOf",E.alert.actions)}}function ne(U,D){if(1&U){const E=k.EpF();k.TgZ(0,"button",12),k.NdJ("click",function(){k.CHM(E);const G=k.oxw(2);return k.KtG(G.close())}),k._UZ(1,"clr-icon",13),k.qZA()}}function Pe(U,D){if(1&U&&(k.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),k._UZ(4,"clr-icon",5),k.qZA(),k._UZ(5,"div",6),k.YNc(6,ut,2,1,"div",7),k.qZA()(),k.YNc(7,ne,2,0,"button",8),k.qZA()),2&U){const E=k.oxw();k.Q6J("ngClass","alert-"+E.alert.type),k.xp6(5),k.Q6J("innerHTML",E.alert.text,k.oJD),k.xp6(1),k.Q6J("ngIf",E.alert.actions),k.xp6(1),k.Q6J("ngIf",E.alert.closeable)}}let Me=(()=>{class U{constructor(){this.alertChange=new k.vpe}close(){this.alert=null,this.alertChange.emit(this.alert)}static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275cmp=k.Xpm({type:U,selectors:[["ukis-global-alert"]],inputs:{alert:"alert"},outputs:{alertChange:"alertChange"},decls:1,vars:1,consts:[["class","alert alert-app-level","role","alert",3,"ngClass",4,"ngIf"],["role","alert",1,"alert","alert-app-level",3,"ngClass"],[1,"alert-items"],[1,"alert-item","static"],[1,"alert-icon-wrapper"],["shape","info-circle",1,"alert-icon"],[1,"alert-text",3,"innerHTML"],["class","alert-actions",4,"ngIf"],["type","button","class","close","aria-label","alert close",3,"click",4,"ngIf"],[1,"alert-actions"],["class","btn alert-action","aria-label","alert action",3,"click",4,"ngFor","ngForOf"],["aria-label","alert action",1,"btn","alert-action",3,"click"],["type","button","aria-label","alert close",1,"close",3,"click"],["aria-hidden","true","shape","close"]],template:function(N,G){1&N&&k.YNc(0,Pe,8,4,"div",0),2&N&&k.Q6J("ngIf",G.alert)},dependencies:[ye.mk,ye.sg,ye.O5,Ve.I9z,Ve.qvL]})}return U})();function nt(U,D){if(1&U&&(k.TgZ(0,"span")(1,"div",1),k._UZ(2,"progress"),k.qZA()()),2&U){const E=k.oxw();k.xp6(1),k.Q6J("ngClass",E.getProgressClass())}}function it(U,D){if(1&U&&(k.TgZ(0,"span")(1,"div",2),k._UZ(2,"progress",3),k.qZA()()),2&U){const E=k.oxw();k.xp6(1),k.Q6J("ngClass",E.getProgressClass()),k.xp6(1),k.s9C("max",E.progress.max),k.s9C("value",E.progress.value)}}let Je=(()=>{class U{constructor(){this.progressChange=new k.vpe}ngOnInit(){}getProgressClass(){return this.progress?.class?this.progress?.class:""}static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275cmp=k.Xpm({type:U,selectors:[["ukis-global-progress"]],inputs:{progress:"progress"},outputs:{progressChange:"progressChange"},decls:2,vars:2,consts:[[4,"ngIf"],[1,"progress","loop",3,"ngClass"],[1,"progress",3,"ngClass"],[3,"max","value"]],template:function(N,G){1&N&&(k.YNc(0,nt,3,1,"span",0),k.YNc(1,it,3,3,"span",0)),2&N&&(k.Q6J("ngIf",G.progress&&G.progress.indeterminate),k.xp6(1),k.Q6J("ngIf",G.progress&&!G.progress.indeterminate))},dependencies:[ye.mk,ye.O5],styles:[".progress[_ngcontent-%COMP%]{height:.5em}"]})}return U})();function wt(U,D){if(1&U){const E=k.EpF();k.TgZ(0,"ukis-global-alert",5),k.NdJ("alertChange",function(G){k.CHM(E);const q=k.oxw();return k.KtG(q.ui.alert=G)}),k.qZA()}if(2&U){const E=k.oxw();k.Q6J("alert",E.ui.alert)}}function mt(U,D){if(1&U){const E=k.EpF();k.TgZ(0,"ukis-global-progress",6),k.NdJ("progressChange",function(G){k.CHM(E);const q=k.oxw();return k.KtG(q.ui.progress=G)}),k.qZA()}if(2&U){const E=k.oxw();k.Q6J("progress",E.ui.progress)}}function $t(U,D){if(1&U&&(k.TgZ(0,"a",9),k._uU(1),k.qZA()),2&U){const E=k.oxw().$implicit;k.MGl("routerLink","/",E.path,""),k.xp6(1),k.Oqu(E.data.title)}}function Vn(U,D){if(1&U&&(k.ynx(0,7),k.YNc(1,$t,2,2,"a",8),k.BQk()),2&U){const E=D.$implicit,N=k.oxw();k.xp6(1),k.Q6J("ngIf",N.currentRoute===E.path)}}let Sn=(()=>{class U{constructor(E,N,G){this.alertService=E,this.progressService=N,this.router=G,this.title="",this.shortTitle="",this.version=Te||null,this.ui={alert:null,progress:null},this.subs=[],this.showProgress=q=>{this.ui.progress=q},this.setAlert=q=>{this.ui.alert=q},this.init(),this.routes=this.router.config.filter(q=>q.data)}ngOnInit(){const E=this.router.events.pipe((0,be.h)(N=>N instanceof de.m2||N instanceof de.OD)).subscribe(N=>{const G=new URL(N.url,`${window.location.origin}${window.location.pathname}`);this.currentRoute="/examples"!==G.pathname?G.pathname.slice(1):null});this.subs.push(E)}ngOnDestroy(){this.subs.map(E=>E.unsubscribe())}init(){this.getHtmlMeta(["title","version","description","short-title"]),this.TITLE&&(this.title=this.TITLE),this["SHORT-TITLE"]&&(this.shortTitle=this["SHORT-TITLE"]),this.alertService.alert$.subscribe(E=>{this.setAlert(E)}),this.progressService.progress$.subscribe(E=>{this.showProgress(E)})}getHtmlMeta(E){const N=document.getElementsByTagName("meta");for(let G=0,q=N.length;G{const x=F.get("offset"),V=x==le,K=V&&b||new Map;F.forEach((me,Ee)=>{let Ue=Ee,ft=me;if("offset"!==Ee)switch(Ue=U.normalizePropertyName(Ue,G),ft){case Nt.k1:ft=E.get(Ee);break;case Nt.l3:ft=N.get(Ee);break;default:ft=U.normalizeStyleValue(Ee,Ue,ft,G)}K.set(Ue,ft)}),V||q.push(K),b=K,le=x}),G.length)throw function xt(U){return new k.vHH(3502,!1)}();return q}function ti(U,D,E,N){switch(D){case"start":U.onStart(()=>N(E&&ni(E,"start",U)));break;case"done":U.onDone(()=>N(E&&ni(E,"done",U)));break;case"destroy":U.onDestroy(()=>N(E&&ni(E,"destroy",U)))}}function ni(U,D,E){const q=$n(U.element,U.triggerName,U.fromState,U.toState,D||U.phaseName,E.totalTime??U.totalTime,!!E.disabled),le=U._data;return null!=le&&(q._data=le),q}function $n(U,D,E,N,G="",q=0,le){return{element:U,triggerName:D,fromState:E,toState:N,phaseName:G,totalTime:q,disabled:!!le}}function vi(U,D,E){let N=U.get(D);return N||U.set(D,N=E),N}function rr(U){const D=U.indexOf(":");return[U.substring(1,D),U.slice(D+1)]}const Mr=(()=>typeof document>"u"?null:document.documentElement)();function Bi(U){const D=U.parentNode||U.host||null;return D===Mr?null:D}let Hi=null,ws=!1;function pe(U,D){for(;D;){if(D===U)return!0;D=Bi(D)}return!1}function $e(U,D,E){if(E)return Array.from(U.querySelectorAll(D));const N=U.querySelector(D);return N?[N]:[]}let Et=(()=>{class U{validateStyleProperty(E){return function Be(U){Hi||(Hi=function ie(){return typeof document<"u"?document.body:null}()||{},ws=!!Hi.style&&"WebkitAppearance"in Hi.style);let D=!0;return Hi.style&&!function Pi(U){return"ebkit"==U.substring(1,6)}(U)&&(D=U in Hi.style,!D&&ws&&(D="Webkit"+U.charAt(0).toUpperCase()+U.slice(1)in Hi.style)),D}(E)}matchesElement(E,N){return!1}containsElement(E,N){return pe(E,N)}getParentElement(E){return Bi(E)}query(E,N,G){return $e(E,N,G)}computeStyle(E,N,G){return G||""}animate(E,N,G,q,le,b=[],F){return new Nt.ZN(G,q)}static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275prov=k.Yz7({token:U,factory:U.\u0275fac})}return U})(),Mt=(()=>{class U{static#e=this.NOOP=new Et}return U})();const sn=1e3,ji="ng-enter",ge="ng-leave",oe="ng-trigger",ue=".ng-trigger",ze="ng-animating",qe=".ng-animating";function st(U){if("number"==typeof U)return U;const D=U.match(/^(-?[\.\d]+)(m?s)/);return!D||D.length<2?0:rt(parseFloat(D[1]),D[2])}function rt(U,D){return"s"===D?U*sn:U}function Kt(U,D,E){return U.hasOwnProperty("duration")?U:function ht(U,D,E){let G,q=0,le="";if("string"==typeof U){const b=U.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===b)return D.push(Qi()),{duration:0,delay:0,easing:""};G=rt(parseFloat(b[1]),b[2]);const F=b[3];null!=F&&(q=rt(parseFloat(F),b[4]));const x=b[5];x&&(le=x)}else G=U;if(!E){let b=!1,F=D.length;G<0&&(D.push(function xe(){return new k.vHH(3100,!1)}()),b=!0),q<0&&(D.push(function Oe(){return new k.vHH(3101,!1)}()),b=!0),b&&D.splice(F,0,Qi())}return{duration:G,delay:q,easing:le}}(U,D,E)}function En(U,D={}){return Object.keys(U).forEach(E=>{D[E]=U[E]}),D}function ui(U){const D=new Map;return Object.keys(U).forEach(E=>{D.set(E,U[E])}),D}function Fn(U,D=new Map,E){if(E)for(let[N,G]of E)D.set(N,G);for(let[N,G]of U)D.set(N,G);return D}function xn(U,D,E){D.forEach((N,G)=>{const q=sr(G);E&&!E.has(G)&&E.set(G,U.style[q]),U.style[q]=N})}function Wt(U,D){D.forEach((E,N)=>{const G=sr(N);U.style[G]=""})}function dn(U){return Array.isArray(U)?1==U.length?U[0]:(0,Nt.vP)(U):U}const xr=new RegExp("{{\\s*(.+?)\\s*}}","g");function Yn(U){let D=[];if("string"==typeof U){let E;for(;E=xr.exec(U);)D.push(E[1]);xr.lastIndex=0}return D}function Wn(U,D,E){const N=U.toString(),G=N.replace(xr,(q,le)=>{let b=D[le];return null==b&&(E.push(function Ne(U){return new k.vHH(3003,!1)}()),b=""),b.toString()});return G==N?U:G}function Si(U){const D=[];let E=U.next();for(;!E.done;)D.push(E.value),E=U.next();return D}const Ti=/-+([a-z0-9])/g;function sr(U){return U.replace(Ti,(...D)=>D[1].toUpperCase())}function hn(U,D,E){switch(D.type){case 7:return U.visitTrigger(D,E);case 0:return U.visitState(D,E);case 1:return U.visitTransition(D,E);case 2:return U.visitSequence(D,E);case 3:return U.visitGroup(D,E);case 4:return U.visitAnimate(D,E);case 5:return U.visitKeyframes(D,E);case 6:return U.visitStyle(D,E);case 8:return U.visitReference(D,E);case 9:return U.visitAnimateChild(D,E);case 10:return U.visitAnimateRef(D,E);case 11:return U.visitQuery(D,E);case 12:return U.visitStagger(D,E);default:throw function We(U){return new k.vHH(3004,!1)}()}}function $s(U,D){return window.getComputedStyle(U)[D]}const Jt="*";function Ki(U,D){const E=[];return"string"==typeof U?U.split(/\s*,\s*/).forEach(N=>function Yr(U,D,E){if(":"==U[0]){const F=function $o(U,D){switch(U){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(E,N)=>parseFloat(N)>parseFloat(E);case":decrement":return(E,N)=>parseFloat(N) *"}}(U,E);if("function"==typeof F)return void D.push(F);U=F}const N=U.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==N||N.length<4)return E.push(function xi(U){return new k.vHH(3015,!1)}()),D;const G=N[1],q=N[2],le=N[3];D.push(Di(G,le));"<"==q[0]&&!(G==Jt&&le==Jt)&&D.push(Di(le,G))}(N,E,D)):E.push(U),E}const ii=new Set(["true","1"]),Es=new Set(["false","0"]);function Di(U,D){const E=ii.has(U)||Es.has(U),N=ii.has(D)||Es.has(D);return(G,q)=>{let le=U==Jt||U==G,b=D==Jt||D==q;return!le&&E&&"boolean"==typeof G&&(le=G?ii.has(U):Es.has(U)),!b&&N&&"boolean"==typeof q&&(b=q?ii.has(D):Es.has(D)),le&&b}}const Ao=new RegExp("s*:selfs*,?","g");function wr(U,D,E,N){return new Ts(U).build(D,E,N)}class Ts{constructor(D){this._driver=D}build(D,E,N){const G=new Hn(E);return this._resetContextStyleTimingState(G),hn(this,dn(D),G)}_resetContextStyleTimingState(D){D.currentQuerySelector="",D.collectedStyles=new Map,D.collectedStyles.set("",new Map),D.currentTime=0}visitTrigger(D,E){let N=E.queryCount=0,G=E.depCount=0;const q=[],le=[];return"@"==D.name.charAt(0)&&E.errors.push(function _t(){return new k.vHH(3006,!1)}()),D.definitions.forEach(b=>{if(this._resetContextStyleTimingState(E),0==b.type){const F=b,x=F.name;x.toString().split(/\s*,\s*/).forEach(V=>{F.name=V,q.push(this.visitState(F,E))}),F.name=x}else if(1==b.type){const F=this.visitTransition(b,E);N+=F.queryCount,G+=F.depCount,le.push(F)}else E.errors.push(function ot(){return new k.vHH(3007,!1)}())}),{type:7,name:D.name,states:q,transitions:le,queryCount:N,depCount:G,options:null}}visitState(D,E){const N=this.visitStyle(D.styles,E),G=D.options&&D.options.params||null;if(N.containsDynamicStyles){const q=new Set,le=G||{};N.styles.forEach(b=>{b instanceof Map&&b.forEach(F=>{Yn(F).forEach(x=>{le.hasOwnProperty(x)||q.add(x)})})}),q.size&&(Si(q.values()),E.errors.push(function ei(U,D){return new k.vHH(3008,!1)}()))}return{type:0,name:D.name,style:N,options:G?{params:G}:null}}visitTransition(D,E){E.queryCount=0,E.depCount=0;const N=hn(this,dn(D.animation),E);return{type:1,matchers:Ki(D.expr,E.errors),animation:N,queryCount:E.queryCount,depCount:E.depCount,options:Wr(D.options)}}visitSequence(D,E){return{type:2,steps:D.steps.map(N=>hn(this,N,E)),options:Wr(D.options)}}visitGroup(D,E){const N=E.currentTime;let G=0;const q=D.steps.map(le=>{E.currentTime=N;const b=hn(this,le,E);return G=Math.max(G,E.currentTime),b});return E.currentTime=G,{type:3,steps:q,options:Wr(D.options)}}visitAnimate(D,E){const N=function _i(U,D){if(U.hasOwnProperty("duration"))return U;if("number"==typeof U)return Ui(Kt(U,D).duration,0,"");const E=U;if(E.split(/\s+/).some(q=>"{"==q.charAt(0)&&"{"==q.charAt(1))){const q=Ui(0,0,"");return q.dynamic=!0,q.strValue=E,q}const G=Kt(E,D);return Ui(G.duration,G.delay,G.easing)}(D.timings,E.errors);E.currentAnimateTimings=N;let G,q=D.styles?D.styles:(0,Nt.oB)({});if(5==q.type)G=this.visitKeyframes(q,E);else{let le=D.styles,b=!1;if(!le){b=!0;const x={};N.easing&&(x.easing=N.easing),le=(0,Nt.oB)(x)}E.currentTime+=N.duration+N.delay;const F=this.visitStyle(le,E);F.isEmptyStep=b,G=F}return E.currentAnimateTimings=null,{type:4,timings:N,style:G,options:null}}visitStyle(D,E){const N=this._makeStyleAst(D,E);return this._validateStyleAst(N,E),N}_makeStyleAst(D,E){const N=[],G=Array.isArray(D.styles)?D.styles:[D.styles];for(let b of G)"string"==typeof b?b===Nt.l3?N.push(b):E.errors.push(new k.vHH(3002,!1)):N.push(ui(b));let q=!1,le=null;return N.forEach(b=>{if(b instanceof Map&&(b.has("easing")&&(le=b.get("easing"),b.delete("easing")),!q))for(let F of b.values())if(F.toString().indexOf("{{")>=0){q=!0;break}}),{type:6,styles:N,easing:le,offset:D.offset,containsDynamicStyles:q,options:null}}_validateStyleAst(D,E){const N=E.currentAnimateTimings;let G=E.currentTime,q=E.currentTime;N&&q>0&&(q-=N.duration+N.delay),D.styles.forEach(le=>{"string"!=typeof le&&le.forEach((b,F)=>{const x=E.collectedStyles.get(E.currentQuerySelector),V=x.get(F);let K=!0;V&&(q!=G&&q>=V.startTime&&G<=V.endTime&&(E.errors.push(function Ut(U,D,E,N,G){return new k.vHH(3010,!1)}()),K=!1),q=V.startTime),K&&x.set(F,{startTime:q,endTime:G}),E.options&&function zi(U,D,E){const N=D.params||{},G=Yn(U);G.length&&G.forEach(q=>{N.hasOwnProperty(q)||E.push(function Fe(U){return new k.vHH(3001,!1)}())})}(b,E.options,E.errors)})})}visitKeyframes(D,E){const N={type:5,styles:[],options:null};if(!E.currentAnimateTimings)return E.errors.push(function kt(){return new k.vHH(3011,!1)}()),N;let q=0;const le=[];let b=!1,F=!1,x=0;const V=D.steps.map(Vt=>{const It=this._makeStyleAst(Vt,E);let ln=null!=It.offset?It.offset:function os(U){if("string"==typeof U)return null;let D=null;if(Array.isArray(U))U.forEach(E=>{if(E instanceof Map&&E.has("offset")){const N=E;D=parseFloat(N.get("offset")),N.delete("offset")}});else if(U instanceof Map&&U.has("offset")){const E=U;D=parseFloat(E.get("offset")),E.delete("offset")}return D}(It.styles),Yt=0;return null!=ln&&(q++,Yt=It.offset=ln),F=F||Yt<0||Yt>1,b=b||Yt0&&q{const ln=me>0?It==Ee?1:me*It:le[It],Yt=ln*Lt;E.currentTime=Ue+ft.delay+Yt,ft.duration=Yt,this._validateStyleAst(Vt,E),Vt.offset=ln,N.styles.push(Vt)}),N}visitReference(D,E){return{type:8,animation:hn(this,dn(D.animation),E),options:Wr(D.options)}}visitAnimateChild(D,E){return E.depCount++,{type:9,options:Wr(D.options)}}visitAnimateRef(D,E){return{type:10,animation:this.visitReference(D.animation,E),options:Wr(D.options)}}visitQuery(D,E){const N=E.currentQuerySelector,G=D.options||{};E.queryCount++,E.currentQuery=D;const[q,le]=function Zt(U){const D=!!U.split(/\s*,\s*/).find(E=>":self"==E);return D&&(U=U.replace(Ao,"")),U=U.replace(/@\*/g,ue).replace(/@\w+/g,E=>ue+"-"+E.slice(1)).replace(/:animating/g,qe),[U,D]}(D.selector);E.currentQuerySelector=N.length?N+" "+q:q,vi(E.collectedStyles,E.currentQuerySelector,new Map);const b=hn(this,dn(D.animation),E);return E.currentQuery=null,E.currentQuerySelector=N,{type:11,selector:q,limit:G.limit||0,optional:!!G.optional,includeSelf:le,animation:b,originalSelector:D.selector,options:Wr(D.options)}}visitStagger(D,E){E.currentQuery||E.errors.push(function Li(){return new k.vHH(3013,!1)}());const N="full"===D.timings?{duration:0,delay:0,easing:"full"}:Kt(D.timings,E.errors,!0);return{type:12,animation:hn(this,dn(D.animation),E),timings:N,options:null}}}class Hn{constructor(D){this.errors=D,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Wr(U){return U?(U=En(U)).params&&(U.params=function In(U){return U?En(U):null}(U.params)):U={},U}function Ui(U,D,E){return{duration:U,delay:D,easing:E}}function as(U,D,E,N,G,q,le=null,b=!1){return{type:1,element:U,keyframes:D,preStyleProps:E,postStyleProps:N,duration:G,delay:q,totalTime:G+q,easing:le,subTimeline:b}}class Zr{constructor(){this._map=new Map}get(D){return this._map.get(D)||[]}append(D,E){let N=this._map.get(D);N||this._map.set(D,N=[]),N.push(...E)}has(D){return this._map.has(D)}clear(){this._map.clear()}}const dt=new RegExp(":enter","g"),_n=new RegExp(":leave","g");function fi(U,D,E,N,G,q=new Map,le=new Map,b,F,x=[]){return(new Rr).buildKeyframes(U,D,E,N,G,q,le,b,F,x)}class Rr{buildKeyframes(D,E,N,G,q,le,b,F,x,V=[]){x=x||new Zr;const K=new mr(D,E,x,G,q,V,[]);K.options=F;const me=F.delay?st(F.delay):0;K.currentTimeline.delayNextStep(me),K.currentTimeline.setStyles([le],null,K.errors,F),hn(this,N,K);const Ee=K.timelines.filter(Ue=>Ue.containsAnimation());if(Ee.length&&b.size){let Ue;for(let ft=Ee.length-1;ft>=0;ft--){const Lt=Ee[ft];if(Lt.element===E){Ue=Lt;break}}Ue&&!Ue.allowOnlyTimelineStyles()&&Ue.setStyles([b],null,K.errors,F)}return Ee.length?Ee.map(Ue=>Ue.buildKeyframes()):[as(E,[],[],[],0,me,"",!1)]}visitTrigger(D,E){}visitState(D,E){}visitTransition(D,E){}visitAnimateChild(D,E){const N=E.subInstructions.get(E.element);if(N){const G=E.createSubContext(D.options),q=E.currentTimeline.currentTime,le=this._visitSubInstructions(N,G,G.options);q!=le&&E.transformIntoNewTimeline(le)}E.previousNode=D}visitAnimateRef(D,E){const N=E.createSubContext(D.options);N.transformIntoNewTimeline(),this._applyAnimationRefDelays([D.options,D.animation.options],E,N),this.visitReference(D.animation,N),E.transformIntoNewTimeline(N.currentTimeline.currentTime),E.previousNode=D}_applyAnimationRefDelays(D,E,N){for(const G of D){const q=G?.delay;if(q){const le="number"==typeof q?q:st(Wn(q,G?.params??{},E.errors));N.delayNextStep(le)}}}_visitSubInstructions(D,E,N){let q=E.currentTimeline.currentTime;const le=null!=N.duration?st(N.duration):null,b=null!=N.delay?st(N.delay):null;return 0!==le&&D.forEach(F=>{const x=E.appendInstructionToTimeline(F,le,b);q=Math.max(q,x.duration+x.delay)}),q}visitReference(D,E){E.updateOptions(D.options,!0),hn(this,D.animation,E),E.previousNode=D}visitSequence(D,E){const N=E.subContextCount;let G=E;const q=D.options;if(q&&(q.params||q.delay)&&(G=E.createSubContext(q),G.transformIntoNewTimeline(),null!=q.delay)){6==G.previousNode.type&&(G.currentTimeline.snapshotCurrentStyles(),G.previousNode=ri);const le=st(q.delay);G.delayNextStep(le)}D.steps.length&&(D.steps.forEach(le=>hn(this,le,G)),G.currentTimeline.applyStylesToKeyframe(),G.subContextCount>N&&G.transformIntoNewTimeline()),E.previousNode=D}visitGroup(D,E){const N=[];let G=E.currentTimeline.currentTime;const q=D.options&&D.options.delay?st(D.options.delay):0;D.steps.forEach(le=>{const b=E.createSubContext(D.options);q&&b.delayNextStep(q),hn(this,le,b),G=Math.max(G,b.currentTimeline.currentTime),N.push(b.currentTimeline)}),N.forEach(le=>E.currentTimeline.mergeTimelineCollectedStyles(le)),E.transformIntoNewTimeline(G),E.previousNode=D}_visitTiming(D,E){if(D.dynamic){const N=D.strValue;return Kt(E.params?Wn(N,E.params,E.errors):N,E.errors)}return{duration:D.duration,delay:D.delay,easing:D.easing}}visitAnimate(D,E){const N=E.currentAnimateTimings=this._visitTiming(D.timings,E),G=E.currentTimeline;N.delay&&(E.incrementTime(N.delay),G.snapshotCurrentStyles());const q=D.style;5==q.type?this.visitKeyframes(q,E):(E.incrementTime(N.duration),this.visitStyle(q,E),G.applyStylesToKeyframe()),E.currentAnimateTimings=null,E.previousNode=D}visitStyle(D,E){const N=E.currentTimeline,G=E.currentAnimateTimings;!G&&N.hasCurrentStyleProperties()&&N.forwardFrame();const q=G&&G.easing||D.easing;D.isEmptyStep?N.applyEmptyStep(q):N.setStyles(D.styles,q,E.errors,E.options),E.previousNode=D}visitKeyframes(D,E){const N=E.currentAnimateTimings,G=E.currentTimeline.duration,q=N.duration,b=E.createSubContext().currentTimeline;b.easing=N.easing,D.styles.forEach(F=>{b.forwardTime((F.offset||0)*q),b.setStyles(F.styles,F.easing,E.errors,E.options),b.applyStylesToKeyframe()}),E.currentTimeline.mergeTimelineCollectedStyles(b),E.transformIntoNewTimeline(G+q),E.previousNode=D}visitQuery(D,E){const N=E.currentTimeline.currentTime,G=D.options||{},q=G.delay?st(G.delay):0;q&&(6===E.previousNode.type||0==N&&E.currentTimeline.hasCurrentStyleProperties())&&(E.currentTimeline.snapshotCurrentStyles(),E.previousNode=ri);let le=N;const b=E.invokeQuery(D.selector,D.originalSelector,D.limit,D.includeSelf,!!G.optional,E.errors);E.currentQueryTotal=b.length;let F=null;b.forEach((x,V)=>{E.currentQueryIndex=V;const K=E.createSubContext(D.options,x);q&&K.delayNextStep(q),x===E.element&&(F=K.currentTimeline),hn(this,D.animation,K),K.currentTimeline.applyStylesToKeyframe(),le=Math.max(le,K.currentTimeline.currentTime)}),E.currentQueryIndex=0,E.currentQueryTotal=0,E.transformIntoNewTimeline(le),F&&(E.currentTimeline.mergeTimelineCollectedStyles(F),E.currentTimeline.snapshotCurrentStyles()),E.previousNode=D}visitStagger(D,E){const N=E.parentContext,G=E.currentTimeline,q=D.timings,le=Math.abs(q.duration),b=le*(E.currentQueryTotal-1);let F=le*E.currentQueryIndex;switch(q.duration<0?"reverse":q.easing){case"reverse":F=b-F;break;case"full":F=N.currentStaggerTime}const V=E.currentTimeline;F&&V.delayNextStep(F);const K=V.currentTime;hn(this,D.animation,E),E.previousNode=D,N.currentStaggerTime=G.currentTime-K+(G.startTime-N.currentTimeline.startTime)}}const ri={};class mr{constructor(D,E,N,G,q,le,b,F){this._driver=D,this.element=E,this.subInstructions=N,this._enterClassName=G,this._leaveClassName=q,this.errors=le,this.timelines=b,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ri,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=F||new yn(this._driver,E,0),b.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(D,E){if(!D)return;const N=D;let G=this.options;null!=N.duration&&(G.duration=st(N.duration)),null!=N.delay&&(G.delay=st(N.delay));const q=N.params;if(q){let le=G.params;le||(le=this.options.params={}),Object.keys(q).forEach(b=>{(!E||!le.hasOwnProperty(b))&&(le[b]=Wn(q[b],le,this.errors))})}}_copyOptions(){const D={};if(this.options){const E=this.options.params;if(E){const N=D.params={};Object.keys(E).forEach(G=>{N[G]=E[G]})}}return D}createSubContext(D=null,E,N){const G=E||this.element,q=new mr(this._driver,G,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(G,N||0));return q.previousNode=this.previousNode,q.currentAnimateTimings=this.currentAnimateTimings,q.options=this._copyOptions(),q.updateOptions(D),q.currentQueryIndex=this.currentQueryIndex,q.currentQueryTotal=this.currentQueryTotal,q.parentContext=this,this.subContextCount++,q}transformIntoNewTimeline(D){return this.previousNode=ri,this.currentTimeline=this.currentTimeline.fork(this.element,D),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(D,E,N){const G={duration:E??D.duration,delay:this.currentTimeline.currentTime+(N??0)+D.delay,easing:""},q=new Qr(this._driver,D.element,D.keyframes,D.preStyleProps,D.postStyleProps,G,D.stretchStartingKeyframe);return this.timelines.push(q),G}incrementTime(D){this.currentTimeline.forwardTime(this.currentTimeline.duration+D)}delayNextStep(D){D>0&&this.currentTimeline.delayNextStep(D)}invokeQuery(D,E,N,G,q,le){let b=[];if(G&&b.push(this.element),D.length>0){D=(D=D.replace(dt,"."+this._enterClassName)).replace(_n,"."+this._leaveClassName);let x=this._driver.query(this.element,D,1!=N);0!==N&&(x=N<0?x.slice(x.length+N,x.length):x.slice(0,N)),b.push(...x)}return!q&&0==b.length&&le.push(function Vi(U){return new k.vHH(3014,!1)}()),b}}class yn{constructor(D,E,N,G){this._driver=D,this.element=E,this.startTime=N,this._elementTimelineStylesLookup=G,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(E),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(E,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(D){const E=1===this._keyframes.size&&this._pendingStyles.size;this.duration||E?(this.forwardTime(this.currentTime+D),E&&this.snapshotCurrentStyles()):this.startTime+=D}fork(D,E){return this.applyStylesToKeyframe(),new yn(this._driver,D,E||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(D){this.applyStylesToKeyframe(),this.duration=D,this._loadKeyframe()}_updateStyle(D,E){this._localTimelineStyles.set(D,E),this._globalTimelineStyles.set(D,E),this._styleSummary.set(D,{time:this.currentTime,value:E})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(D){D&&this._previousKeyframe.set("easing",D);for(let[E,N]of this._globalTimelineStyles)this._backFill.set(E,N||Nt.l3),this._currentKeyframe.set(E,Nt.l3);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(D,E,N,G){E&&this._previousKeyframe.set("easing",E);const q=G&&G.params||{},le=function Ft(U,D){const E=new Map;let N;return U.forEach(G=>{if("*"===G){N=N||D.keys();for(let q of N)E.set(q,Nt.l3)}else Fn(G,E)}),E}(D,this._globalTimelineStyles);for(let[b,F]of le){const x=Wn(F,q,N);this._pendingStyles.set(b,x),this._localTimelineStyles.has(b)||this._backFill.set(b,this._globalTimelineStyles.get(b)??Nt.l3),this._updateStyle(b,x)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((D,E)=>{this._currentKeyframe.set(E,D)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((D,E)=>{this._currentKeyframe.has(E)||this._currentKeyframe.set(E,D)}))}snapshotCurrentStyles(){for(let[D,E]of this._localTimelineStyles)this._pendingStyles.set(D,E),this._updateStyle(D,E)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const D=[];for(let E in this._currentKeyframe)D.push(E);return D}mergeTimelineCollectedStyles(D){D._styleSummary.forEach((E,N)=>{const G=this._styleSummary.get(N);(!G||E.time>G.time)&&this._updateStyle(N,E.value)})}buildKeyframes(){this.applyStylesToKeyframe();const D=new Set,E=new Set,N=1===this._keyframes.size&&0===this.duration;let G=[];this._keyframes.forEach((b,F)=>{const x=Fn(b,new Map,this._backFill);x.forEach((V,K)=>{V===Nt.k1?D.add(K):V===Nt.l3&&E.add(K)}),N||x.set("offset",F/this.duration),G.push(x)});const q=D.size?Si(D.values()):[],le=E.size?Si(E.values()):[];if(N){const b=G[0],F=new Map(b);b.set("offset",0),F.set("offset",1),G=[b,F]}return as(this.element,G,q,le,this.duration,this.startTime,this.easing,!1)}}class Qr extends yn{constructor(D,E,N,G,q,le,b=!1){super(D,E,le.delay),this.keyframes=N,this.preStyleProps=G,this.postStyleProps=q,this._stretchStartingKeyframe=b,this.timings={duration:le.duration,delay:le.delay,easing:le.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let D=this.keyframes,{delay:E,duration:N,easing:G}=this.timings;if(this._stretchStartingKeyframe&&E){const q=[],le=N+E,b=E/le,F=Fn(D[0]);F.set("offset",0),q.push(F);const x=Fn(D[0]);x.set("offset",vr(b)),q.push(x);const V=D.length-1;for(let K=1;K<=V;K++){let me=Fn(D[K]);const Ee=me.get("offset");me.set("offset",vr((E+Ee*N)/le)),q.push(me)}N=le,E=0,G="",D=q}return as(this.element,D,this.preStyleProps,this.postStyleProps,N,E,G,!0)}}function vr(U,D=3){const E=Math.pow(10,D-1);return Math.round(U*E)/E}class ls{}const wn=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class Gs extends ls{normalizePropertyName(D,E){return sr(D)}normalizeStyleValue(D,E,N,G){let q="";const le=N.toString().trim();if(wn.has(E)&&0!==N&&"0"!==N)if("number"==typeof N)q="px";else{const b=N.match(/^[+-]?[\d\.]+([a-z]*)$/);b&&0==b[1].length&&G.push(function Ke(U,D){return new k.vHH(3005,!1)}())}return le+q}}function Er(U,D,E,N,G,q,le,b,F,x,V,K,me){return{type:0,element:U,triggerName:D,isRemovalTransition:G,fromState:E,fromStyles:q,toState:N,toStyles:le,timelines:b,queriedElements:F,preStyleProps:x,postStyleProps:V,totalTime:K,errors:me}}const $i={};class Kr{constructor(D,E,N){this._triggerName=D,this.ast=E,this._stateStyles=N}match(D,E,N,G){return function cs(U,D,E,N,G){return U.some(q=>q(D,E,N,G))}(this.ast.matchers,D,E,N,G)}buildStyles(D,E,N){let G=this._stateStyles.get("*");return void 0!==D&&(G=this._stateStyles.get(D?.toString())||G),G?G.buildStyles(E,N):new Map}build(D,E,N,G,q,le,b,F,x,V){const K=[],me=this.ast.options&&this.ast.options.params||$i,Ue=this.buildStyles(N,b&&b.params||$i,K),ft=F&&F.params||$i,Lt=this.buildStyles(G,ft,K),Vt=new Set,It=new Map,ln=new Map,Yt="void"===G,Rn={params:_r(ft,me),delay:this.ast.options?.delay},Ii=V?[]:fi(D,E,this.ast.animation,q,le,Ue,Lt,Rn,x,K);let zn=0;if(Ii.forEach(si=>{zn=Math.max(si.duration+si.delay,zn)}),K.length)return Er(E,this._triggerName,N,G,Yt,Ue,Lt,[],[],It,ln,zn,K);Ii.forEach(si=>{const Xi=si.element,Fi=vi(It,Xi,new Set);si.preStyleProps.forEach(fo=>Fi.add(fo));const kr=vi(ln,Xi,new Set);si.postStyleProps.forEach(fo=>kr.add(fo)),Xi!==E&&Vt.add(Xi)});const Ai=Si(Vt.values());return Er(E,this._triggerName,N,G,Yt,Ue,Lt,Ii,Ai,It,ln,zn)}}function _r(U,D){const E=En(D);for(const N in U)U.hasOwnProperty(N)&&null!=U[N]&&(E[N]=U[N]);return E}class us{constructor(D,E,N){this.styles=D,this.defaultParams=E,this.normalizer=N}buildStyles(D,E){const N=new Map,G=En(this.defaultParams);return Object.keys(D).forEach(q=>{const le=D[q];null!==le&&(G[q]=le)}),this.styles.styles.forEach(q=>{"string"!=typeof q&&q.forEach((le,b)=>{le&&(le=Wn(le,G,E));const F=this.normalizer.normalizePropertyName(b,E);le=this.normalizer.normalizeStyleValue(b,F,le,E),N.set(b,le)})}),N}}class zt{constructor(D,E,N){this.name=D,this.ast=E,this._normalizer=N,this.transitionFactories=[],this.states=new Map,E.states.forEach(G=>{this.states.set(G.name,new us(G.style,G.options&&G.options.params||{},N))}),or(this.states,"true","1"),or(this.states,"false","0"),E.transitions.forEach(G=>{this.transitionFactories.push(new Kr(D,G,this.states))}),this.fallbackTransition=function Mo(U,D,E){return new Kr(U,{type:1,animation:{type:2,steps:[],options:null},matchers:[(le,b)=>!0],options:null,queryCount:0,depCount:0},D)}(D,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(D,E,N,G){return this.transitionFactories.find(le=>le.match(D,E,N,G))||null}matchStyles(D,E,N){return this.fallbackTransition.buildStyles(D,E,N)}}function or(U,D,E){U.has(D)?U.has(E)||U.set(E,U.get(D)):U.has(E)&&U.set(D,U.get(E))}const Jr=new Zr;class jn{constructor(D,E,N){this.bodyNode=D,this._driver=E,this._normalizer=N,this._animations=new Map,this._playersById=new Map,this.players=[]}register(D,E){const N=[],q=wr(this._driver,E,N,[]);if(N.length)throw function en(U){return new k.vHH(3503,!1)}();this._animations.set(D,q)}_buildPlayer(D,E,N){const G=D.element,q=qi(this._normalizer,D.keyframes,E,N);return this._driver.animate(G,q,D.duration,D.delay,D.easing,[],!0)}create(D,E,N={}){const G=[],q=this._animations.get(D);let le;const b=new Map;if(q?(le=fi(this._driver,E,q,ji,ge,new Map,new Map,N,Jr,G),le.forEach(V=>{const K=vi(b,V.element,new Map);V.postStyleProps.forEach(me=>K.set(me,null))})):(G.push(function qt(){return new k.vHH(3300,!1)}()),le=[]),G.length)throw function ci(U){return new k.vHH(3504,!1)}();b.forEach((V,K)=>{V.forEach((me,Ee)=>{V.set(Ee,this._driver.computeStyle(K,Ee,Nt.l3))})});const x=Nn(le.map(V=>{const K=b.get(V.element);return this._buildPlayer(V,new Map,K)}));return this._playersById.set(D,x),x.onDestroy(()=>this.destroy(D)),this.players.push(x),x}destroy(D){const E=this._getPlayer(D);E.destroy(),this._playersById.delete(D);const N=this.players.indexOf(E);N>=0&&this.players.splice(N,1)}_getPlayer(D){const E=this._playersById.get(D);if(!E)throw function pr(U){return new k.vHH(3301,!1)}();return E}listen(D,E,N,G){const q=$n(E,"","","");return ti(this._getPlayer(D),N,q,G),()=>{}}command(D,E,N,G){if("register"==N)return void this.register(D,G[0]);if("create"==N)return void this.create(D,E,G[0]||{});const q=this._getPlayer(D);switch(N){case"play":q.play();break;case"pause":q.pause();break;case"reset":q.reset();break;case"restart":q.restart();break;case"finish":q.finish();break;case"init":q.init();break;case"setPosition":q.setPosition(parseFloat(G[0]));break;case"destroy":this.destroy(D)}}}const Ws="ng-animate-queued",Ln="ng-animate-disabled",pi=[],Ms={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},et={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},fn="__ng_removed";class qn{get params(){return this.options.params}constructor(D,E=""){this.namespaceId=E;const N=D&&D.hasOwnProperty("value");if(this.value=function $(U){return U??null}(N?D.value:D),N){const q=En(D);delete q.value,this.options=q}else this.options={};this.options.params||(this.options.params={})}absorbOptions(D){const E=D.params;if(E){const N=this.options.params;Object.keys(E).forEach(G=>{null==N[G]&&(N[G]=E[G])})}}}const ki="void",ao=new qn(ki);class es{constructor(D,E,N){this.id=D,this.hostElement=E,this._engine=N,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+D,An(E,this._hostClassName)}listen(D,E,N,G){if(!this._triggers.has(E))throw function Ri(U,D){return new k.vHH(3302,!1)}();if(null==N||0==N.length)throw function bt(U){return new k.vHH(3303,!1)}();if(!function Y(U){return"start"==U||"done"==U}(N))throw function Un(U,D){return new k.vHH(3400,!1)}();const q=vi(this._elementListeners,D,[]),le={name:E,phase:N,callback:G};q.push(le);const b=vi(this._engine.statesByElement,D,new Map);return b.has(E)||(An(D,oe),An(D,oe+"-"+E),b.set(E,ao)),()=>{this._engine.afterFlush(()=>{const F=q.indexOf(le);F>=0&&q.splice(F,1),this._triggers.has(E)||b.delete(E)})}}register(D,E){return!this._triggers.has(D)&&(this._triggers.set(D,E),!0)}_getTrigger(D){const E=this._triggers.get(D);if(!E)throw function so(U){return new k.vHH(3401,!1)}();return E}trigger(D,E,N,G=!0){const q=this._getTrigger(E),le=new ds(this.id,E,D);let b=this._engine.statesByElement.get(D);b||(An(D,oe),An(D,oe+"-"+E),this._engine.statesByElement.set(D,b=new Map));let F=b.get(E);const x=new qn(N,this.id);if(!(N&&N.hasOwnProperty("value"))&&F&&x.absorbOptions(F.options),b.set(E,x),F||(F=ao),x.value!==ki&&F.value===x.value){if(!function xo(U,D){const E=Object.keys(U),N=Object.keys(D);if(E.length!=N.length)return!1;for(let G=0;G{Wt(D,Lt),xn(D,Vt)})}return}const me=vi(this._engine.playersByElement,D,[]);me.forEach(ft=>{ft.namespaceId==this.id&&ft.triggerName==E&&ft.queued&&ft.destroy()});let Ee=q.matchTransition(F.value,x.value,D,x.params),Ue=!1;if(!Ee){if(!G)return;Ee=q.fallbackTransition,Ue=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:D,triggerName:E,transition:Ee,fromState:F,toState:x,player:le,isFallbackTransition:Ue}),Ue||(An(D,Ws),le.onStart(()=>{lr(D,Ws)})),le.onDone(()=>{let ft=this.players.indexOf(le);ft>=0&&this.players.splice(ft,1);const Lt=this._engine.playersByElement.get(D);if(Lt){let Vt=Lt.indexOf(le);Vt>=0&&Lt.splice(Vt,1)}}),this.players.push(le),me.push(le),le}deregister(D){this._triggers.delete(D),this._engine.statesByElement.forEach(E=>E.delete(D)),this._elementListeners.forEach((E,N)=>{this._elementListeners.set(N,E.filter(G=>G.name!=D))})}clearElementCache(D){this._engine.statesByElement.delete(D),this._elementListeners.delete(D);const E=this._engine.playersByElement.get(D);E&&(E.forEach(N=>N.destroy()),this._engine.playersByElement.delete(D))}_signalRemovalForInnerTriggers(D,E){const N=this._engine.driver.query(D,ue,!0);N.forEach(G=>{if(G[fn])return;const q=this._engine.fetchNamespacesByElement(G);q.size?q.forEach(le=>le.triggerLeaveAnimation(G,E,!1,!0)):this.clearElementCache(G)}),this._engine.afterFlushAnimationsDone(()=>N.forEach(G=>this.clearElementCache(G)))}triggerLeaveAnimation(D,E,N,G){const q=this._engine.statesByElement.get(D),le=new Map;if(q){const b=[];if(q.forEach((F,x)=>{if(le.set(x,F.value),this._triggers.has(x)){const V=this.trigger(D,x,ki,G);V&&b.push(V)}}),b.length)return this._engine.markElementAsRemoved(this.id,D,!0,E,le),N&&Nn(b).onDone(()=>this._engine.processLeaveNode(D)),!0}return!1}prepareLeaveAnimationListeners(D){const E=this._elementListeners.get(D),N=this._engine.statesByElement.get(D);if(E&&N){const G=new Set;E.forEach(q=>{const le=q.name;if(G.has(le))return;G.add(le);const F=this._triggers.get(le).fallbackTransition,x=N.get(le)||ao,V=new qn(ki),K=new ds(this.id,le,D);this._engine.totalQueuedPlayers++,this._queue.push({element:D,triggerName:le,transition:F,fromState:x,toState:V,player:K,isFallbackTransition:!0})})}}removeNode(D,E){const N=this._engine;if(D.childElementCount&&this._signalRemovalForInnerTriggers(D,E),this.triggerLeaveAnimation(D,E,!0))return;let G=!1;if(N.totalAnimations){const q=N.players.length?N.playersByQueriedElement.get(D):[];if(q&&q.length)G=!0;else{let le=D;for(;le=le.parentNode;)if(N.statesByElement.get(le)){G=!0;break}}}if(this.prepareLeaveAnimationListeners(D),G)N.markElementAsRemoved(this.id,D,!1,E);else{const q=D[fn];(!q||q===Ms)&&(N.afterFlush(()=>this.clearElementCache(D)),N.destroyInnerAnimations(D),N._onRemovalComplete(D,E))}}insertNode(D,E){An(D,this._hostClassName)}drainQueuedTransitions(D){const E=[];return this._queue.forEach(N=>{const G=N.player;if(G.destroyed)return;const q=N.element,le=this._elementListeners.get(q);le&&le.forEach(b=>{if(b.name==N.triggerName){const F=$n(q,N.triggerName,N.fromState.value,N.toState.value);F._data=D,ti(N.player,b.phase,F,b.callback)}}),G.markedForDestroy?this._engine.afterFlush(()=>{G.destroy()}):E.push(N)}),this._queue=[],E.sort((N,G)=>{const q=N.transition.ast.depCount,le=G.transition.ast.depCount;return 0==q||0==le?q-le:this._engine.driver.containsElement(N.element,G.element)?1:-1})}destroy(D){this.players.forEach(E=>E.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,D)}}class lo{_onRemovalComplete(D,E){this.onRemovalComplete(D,E)}constructor(D,E,N){this.bodyNode=D,this.driver=E,this._normalizer=N,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(G,q)=>{}}get queuedPlayers(){const D=[];return this._namespaceList.forEach(E=>{E.players.forEach(N=>{N.queued&&D.push(N)})}),D}createNamespace(D,E){const N=new es(D,E,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,E)?this._balanceNamespaceList(N,E):(this.newHostElements.set(E,N),this.collectEnterElement(E)),this._namespaceLookup[D]=N}_balanceNamespaceList(D,E){const N=this._namespaceList,G=this.namespacesByHostElement;if(N.length-1>=0){let le=!1,b=this.driver.getParentElement(E);for(;b;){const F=G.get(b);if(F){const x=N.indexOf(F);N.splice(x+1,0,D),le=!0;break}b=this.driver.getParentElement(b)}le||N.unshift(D)}else N.push(D);return G.set(E,D),D}register(D,E){let N=this._namespaceLookup[D];return N||(N=this.createNamespace(D,E)),N}registerTrigger(D,E,N){let G=this._namespaceLookup[D];G&&G.register(E,N)&&this.totalAnimations++}destroy(D,E){D&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const N=this._fetchNamespace(D);this.namespacesByHostElement.delete(N.hostElement);const G=this._namespaceList.indexOf(N);G>=0&&this._namespaceList.splice(G,1),N.destroy(E),delete this._namespaceLookup[D]}))}_fetchNamespace(D){return this._namespaceLookup[D]}fetchNamespacesByElement(D){const E=new Set,N=this.statesByElement.get(D);if(N)for(let G of N.values())if(G.namespaceId){const q=this._fetchNamespace(G.namespaceId);q&&E.add(q)}return E}trigger(D,E,N,G){if(P(E)){const q=this._fetchNamespace(D);if(q)return q.trigger(E,N,G),!0}return!1}insertNode(D,E,N,G){if(!P(E))return;const q=E[fn];if(q&&q.setForRemoval){q.setForRemoval=!1,q.setForMove=!0;const le=this.collectedLeaveElements.indexOf(E);le>=0&&this.collectedLeaveElements.splice(le,1)}if(D){const le=this._fetchNamespace(D);le&&le.insertNode(E,N)}G&&this.collectEnterElement(E)}collectEnterElement(D){this.collectedEnterElements.push(D)}markElementAsDisabled(D,E){E?this.disabledNodes.has(D)||(this.disabledNodes.add(D),An(D,Ln)):this.disabledNodes.has(D)&&(this.disabledNodes.delete(D),lr(D,Ln))}removeNode(D,E,N){if(P(E)){const G=D?this._fetchNamespace(D):null;G?G.removeNode(E,N):this.markElementAsRemoved(D,E,!1,N);const q=this.namespacesByHostElement.get(E);q&&q.id!==D&&q.removeNode(E,N)}else this._onRemovalComplete(E,N)}markElementAsRemoved(D,E,N,G,q){this.collectedLeaveElements.push(E),E[fn]={namespaceId:D,setForRemoval:G,hasAnimation:N,removedBeforeQueried:!1,previousTriggersValues:q}}listen(D,E,N,G,q){return P(E)?this._fetchNamespace(D).listen(E,N,G,q):()=>{}}_buildInstruction(D,E,N,G,q){return D.transition.build(this.driver,D.element,D.fromState.value,D.toState.value,N,G,D.fromState.options,D.toState.options,E,q)}destroyInnerAnimations(D){let E=this.driver.query(D,ue,!0);E.forEach(N=>this.destroyActiveAnimationsForElement(N)),0!=this.playersByQueriedElement.size&&(E=this.driver.query(D,qe,!0),E.forEach(N=>this.finishActiveQueriedAnimationOnElement(N)))}destroyActiveAnimationsForElement(D){const E=this.playersByElement.get(D);E&&E.forEach(N=>{N.queued?N.markedForDestroy=!0:N.destroy()})}finishActiveQueriedAnimationOnElement(D){const E=this.playersByQueriedElement.get(D);E&&E.forEach(N=>N.finish())}whenRenderingDone(){return new Promise(D=>{if(this.players.length)return Nn(this.players).onDone(()=>D());D()})}processLeaveNode(D){const E=D[fn];if(E&&E.setForRemoval){if(D[fn]=Ms,E.namespaceId){this.destroyInnerAnimations(D);const N=this._fetchNamespace(E.namespaceId);N&&N.clearElementCache(D)}this._onRemovalComplete(D,E.setForRemoval)}D.classList?.contains(Ln)&&this.markElementAsDisabled(D,!1),this.driver.query(D,".ng-animate-disabled",!0).forEach(N=>{this.markElementAsDisabled(N,!1)})}flush(D=-1){let E=[];if(this.newHostElements.size&&(this.newHostElements.forEach((N,G)=>this._balanceNamespaceList(N,G)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let N=0;NN()),this._flushFns=[],this._whenQuietFns.length){const N=this._whenQuietFns;this._whenQuietFns=[],E.length?Nn(E).onDone(()=>{N.forEach(G=>G())}):N.forEach(G=>G())}}reportError(D){throw function yt(U){return new k.vHH(3402,!1)}()}_flushAnimations(D,E){const N=new Zr,G=[],q=new Map,le=[],b=new Map,F=new Map,x=new Map,V=new Set;this.disabledNodes.forEach(Ct=>{V.add(Ct);const vt=this.driver.query(Ct,".ng-animate-queued",!0);for(let Bt=0;Bt{const Bt=ji+ft++;Ue.set(vt,Bt),Ct.forEach(vn=>An(vn,Bt))});const Lt=[],Vt=new Set,It=new Set;for(let Ct=0;CtVt.add(vn)):It.add(vt))}const ln=new Map,Yt=nn(me,Array.from(Vt));Yt.forEach((Ct,vt)=>{const Bt=ge+ft++;ln.set(vt,Bt),Ct.forEach(vn=>An(vn,Bt))}),D.push(()=>{Ee.forEach((Ct,vt)=>{const Bt=Ue.get(vt);Ct.forEach(vn=>lr(vn,Bt))}),Yt.forEach((Ct,vt)=>{const Bt=ln.get(vt);Ct.forEach(vn=>lr(vn,Bt))}),Lt.forEach(Ct=>{this.processLeaveNode(Ct)})});const Rn=[],Ii=[];for(let Ct=this._namespaceList.length-1;Ct>=0;Ct--)this._namespaceList[Ct].drainQueuedTransitions(E).forEach(Bt=>{const vn=Bt.player,oi=Bt.element;if(Rn.push(vn),this.collectedEnterElements.length){const er=oi[fn];if(er&&er.setForMove){if(er.previousTriggersValues&&er.previousTriggersValues.has(Bt.triggerName)){const ur=er.previousTriggersValues.get(Bt.triggerName),Nr=this.statesByElement.get(Bt.element);if(Nr&&Nr.has(Bt.triggerName)){const Va=Nr.get(Bt.triggerName);Va.value=ur,Nr.set(Bt.triggerName,Va)}}return void vn.destroy()}}const yi=!K||!this.driver.containsElement(K,oi),ns=ln.get(oi),po=Ue.get(oi),Kn=this._buildInstruction(Bt,N,po,ns,yi);if(Kn.errors&&Kn.errors.length)return void Ii.push(Kn);if(yi)return vn.onStart(()=>Wt(oi,Kn.fromStyles)),vn.onDestroy(()=>xn(oi,Kn.toStyles)),void G.push(vn);if(Bt.isFallbackTransition)return vn.onStart(()=>Wt(oi,Kn.fromStyles)),vn.onDestroy(()=>xn(oi,Kn.toStyles)),void G.push(vn);const hs=[];Kn.timelines.forEach(er=>{er.stretchStartingKeyframe=!0,this.disabledNodes.has(er.element)||hs.push(er)}),Kn.timelines=hs,N.append(oi,Kn.timelines),le.push({instruction:Kn,player:vn,element:oi}),Kn.queriedElements.forEach(er=>vi(b,er,[]).push(vn)),Kn.preStyleProps.forEach((er,ur)=>{if(er.size){let Nr=F.get(ur);Nr||F.set(ur,Nr=new Set),er.forEach((Va,wc)=>Nr.add(wc))}}),Kn.postStyleProps.forEach((er,ur)=>{let Nr=x.get(ur);Nr||x.set(ur,Nr=new Set),er.forEach((Va,wc)=>Nr.add(wc))})});if(Ii.length){const Ct=[];Ii.forEach(vt=>{Ct.push(function tn(U,D){return new k.vHH(3505,!1)}())}),Rn.forEach(vt=>vt.destroy()),this.reportError(Ct)}const zn=new Map,Ai=new Map;le.forEach(Ct=>{const vt=Ct.element;N.has(vt)&&(Ai.set(vt,vt),this._beforeAnimationBuild(Ct.player.namespaceId,Ct.instruction,zn))}),G.forEach(Ct=>{const vt=Ct.element;this._getPreviousPlayers(vt,!1,Ct.namespaceId,Ct.triggerName,null).forEach(vn=>{vi(zn,vt,[]).push(vn),vn.destroy()})});const si=Lt.filter(Ct=>co(Ct,F,x)),Xi=new Map;Tt(Xi,this.driver,It,x,Nt.l3).forEach(Ct=>{co(Ct,F,x)&&si.push(Ct)});const kr=new Map;Ee.forEach((Ct,vt)=>{Tt(kr,this.driver,new Set(Ct),F,Nt.k1)}),si.forEach(Ct=>{const vt=Xi.get(Ct),Bt=kr.get(Ct);Xi.set(Ct,new Map([...vt?.entries()??[],...Bt?.entries()??[]]))});const fo=[],on=[],La={};le.forEach(Ct=>{const{element:vt,player:Bt,instruction:vn}=Ct;if(N.has(vt)){if(V.has(vt))return Bt.onDestroy(()=>xn(vt,vn.toStyles)),Bt.disabled=!0,Bt.overrideTotalTime(vn.totalTime),void G.push(Bt);let oi=La;if(Ai.size>1){let ns=vt;const po=[];for(;ns=ns.parentNode;){const Kn=Ai.get(ns);if(Kn){oi=Kn;break}po.push(ns)}po.forEach(Kn=>Ai.set(Kn,oi))}const yi=this._buildAnimation(Bt.namespaceId,vn,zn,q,kr,Xi);if(Bt.setRealPlayer(yi),oi===La)fo.push(Bt);else{const ns=this.playersByElement.get(oi);ns&&ns.length&&(Bt.parentPlayer=Nn(ns)),G.push(Bt)}}else Wt(vt,vn.fromStyles),Bt.onDestroy(()=>xn(vt,vn.toStyles)),on.push(Bt),V.has(vt)&&G.push(Bt)}),on.forEach(Ct=>{const vt=q.get(Ct.element);if(vt&&vt.length){const Bt=Nn(vt);Ct.setRealPlayer(Bt)}}),G.forEach(Ct=>{Ct.parentPlayer?Ct.syncPlayerEvents(Ct.parentPlayer):Ct.destroy()});for(let Ct=0;Ct!yi.destroyed);oi.length?xs(this,vt,oi):this.processLeaveNode(vt)}return Lt.length=0,fo.forEach(Ct=>{this.players.push(Ct),Ct.onDone(()=>{Ct.destroy();const vt=this.players.indexOf(Ct);this.players.splice(vt,1)}),Ct.play()}),fo}afterFlush(D){this._flushFns.push(D)}afterFlushAnimationsDone(D){this._whenQuietFns.push(D)}_getPreviousPlayers(D,E,N,G,q){let le=[];if(E){const b=this.playersByQueriedElement.get(D);b&&(le=b)}else{const b=this.playersByElement.get(D);if(b){const F=!q||q==ki;b.forEach(x=>{x.queued||!F&&x.triggerName!=G||le.push(x)})}}return(N||G)&&(le=le.filter(b=>!(N&&N!=b.namespaceId||G&&G!=b.triggerName))),le}_beforeAnimationBuild(D,E,N){const q=E.element,le=E.isRemovalTransition?void 0:D,b=E.isRemovalTransition?void 0:E.triggerName;for(const F of E.timelines){const x=F.element,V=x!==q,K=vi(N,x,[]);this._getPreviousPlayers(x,V,le,b,E.toState).forEach(Ee=>{const Ue=Ee.getRealPlayer();Ue.beforeDestroy&&Ue.beforeDestroy(),Ee.destroy(),K.push(Ee)})}Wt(q,E.fromStyles)}_buildAnimation(D,E,N,G,q,le){const b=E.triggerName,F=E.element,x=[],V=new Set,K=new Set,me=E.timelines.map(Ue=>{const ft=Ue.element;V.add(ft);const Lt=ft[fn];if(Lt&&Lt.removedBeforeQueried)return new Nt.ZN(Ue.duration,Ue.delay);const Vt=ft!==F,It=function Go(U){const D=[];return hl(U,D),D}((N.get(ft)||pi).map(zn=>zn.getRealPlayer())).filter(zn=>!!zn.element&&zn.element===ft),ln=q.get(ft),Yt=le.get(ft),Rn=qi(this._normalizer,Ue.keyframes,ln,Yt),Ii=this._buildPlayer(Ue,Rn,It);if(Ue.subTimeline&&G&&K.add(ft),Vt){const zn=new ds(D,b,ft);zn.setRealPlayer(Ii),x.push(zn)}return Ii});x.forEach(Ue=>{vi(this.playersByQueriedElement,Ue.element,[]).push(Ue),Ue.onDone(()=>function z(U,D,E){let N=U.get(D);if(N){if(N.length){const G=N.indexOf(E);N.splice(G,1)}0==N.length&&U.delete(D)}return N}(this.playersByQueriedElement,Ue.element,Ue))}),V.forEach(Ue=>An(Ue,ze));const Ee=Nn(me);return Ee.onDestroy(()=>{V.forEach(Ue=>lr(Ue,ze)),xn(F,E.toStyles)}),K.forEach(Ue=>{vi(G,Ue,[]).push(Ee)}),Ee}_buildPlayer(D,E,N){return E.length>0?this.driver.animate(D.element,E,D.duration,D.delay,D.easing,N):new Nt.ZN(D.duration,D.delay)}}class ds{constructor(D,E,N){this.namespaceId=D,this.triggerName=E,this.element=N,this._player=new Nt.ZN,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(D){this._containsRealPlayer||(this._player=D,this._queuedCallbacks.forEach((E,N)=>{E.forEach(G=>ti(D,N,void 0,G))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(D.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(D){this.totalTime=D}syncPlayerEvents(D){const E=this._player;E.triggerCallback&&D.onStart(()=>E.triggerCallback("start")),D.onDone(()=>this.finish()),D.onDestroy(()=>this.destroy())}_queueEvent(D,E){vi(this._queuedCallbacks,D,[]).push(E)}onDone(D){this.queued&&this._queueEvent("done",D),this._player.onDone(D)}onStart(D){this.queued&&this._queueEvent("start",D),this._player.onStart(D)}onDestroy(D){this.queued&&this._queueEvent("destroy",D),this._player.onDestroy(D)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(D){this.queued||this._player.setPosition(D)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(D){const E=this._player;E.triggerCallback&&E.triggerCallback(D)}}function P(U){return U&&1===U.nodeType}function se(U,D){const E=U.style.display;return U.style.display=D??"none",E}function Tt(U,D,E,N,G){const q=[];E.forEach(F=>q.push(se(F)));const le=[];N.forEach((F,x)=>{const V=new Map;F.forEach(K=>{const me=D.computeStyle(x,K,G);V.set(K,me),(!me||0==me.length)&&(x[fn]=et,le.push(x))}),U.set(x,V)});let b=0;return E.forEach(F=>se(F,q[b++])),le}function nn(U,D){const E=new Map;if(U.forEach(b=>E.set(b,[])),0==D.length)return E;const G=new Set(D),q=new Map;function le(b){if(!b)return 1;let F=q.get(b);if(F)return F;const x=b.parentNode;return F=E.has(x)?x:G.has(x)?1:le(x),q.set(b,F),F}return D.forEach(b=>{const F=le(b);1!==F&&E.get(F).push(b)}),E}function An(U,D){U.classList?.add(D)}function lr(U,D){U.classList?.remove(D)}function xs(U,D,E){Nn(E).onDone(()=>U.processLeaveNode(D))}function hl(U,D){for(let E=0;EG.add(q)):D.set(U,N),E.delete(U),!0}class Pr{constructor(D,E,N){this.bodyNode=D,this._driver=E,this._normalizer=N,this._triggerCache={},this.onRemovalComplete=(G,q)=>{},this._transitionEngine=new lo(D,E,N),this._timelineEngine=new jn(D,E,N),this._transitionEngine.onRemovalComplete=(G,q)=>this.onRemovalComplete(G,q)}registerTrigger(D,E,N,G,q){const le=D+"-"+G;let b=this._triggerCache[le];if(!b){const F=[],V=wr(this._driver,q,F,[]);if(F.length)throw function Oi(U,D){return new k.vHH(3404,!1)}();b=function Ys(U,D,E){return new zt(U,D,E)}(G,V,this._normalizer),this._triggerCache[le]=b}this._transitionEngine.registerTrigger(E,G,b)}register(D,E){this._transitionEngine.register(D,E)}destroy(D,E){this._transitionEngine.destroy(D,E)}onInsert(D,E,N,G){this._transitionEngine.insertNode(D,E,N,G)}onRemove(D,E,N){this._transitionEngine.removeNode(D,E,N)}disableAnimations(D,E){this._transitionEngine.markElementAsDisabled(D,E)}process(D,E,N,G){if("@"==N.charAt(0)){const[q,le]=rr(N);this._timelineEngine.command(q,E,le,G)}else this._transitionEngine.trigger(D,E,N,G)}listen(D,E,N,G,q){if("@"==N.charAt(0)){const[le,b]=rr(N);return this._timelineEngine.listen(le,E,b,q)}return this._transitionEngine.listen(D,E,N,G,q)}flush(D=-1){this._transitionEngine.flush(D)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(D){this._transitionEngine.afterFlushAnimationsDone(D)}}let fl=(()=>{class U{static#e=this.initialStylesByElement=new WeakMap;constructor(E,N,G){this._element=E,this._startStyles=N,this._endStyles=G,this._state=0;let q=U.initialStylesByElement.get(E);q||U.initialStylesByElement.set(E,q=new Map),this._initialStyles=q}start(){this._state<1&&(this._startStyles&&xn(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(xn(this._element,this._initialStyles),this._endStyles&&(xn(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(U.initialStylesByElement.delete(this._element),this._startStyles&&(Wt(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Wt(this._element,this._endStyles),this._endStyles=null),xn(this._element,this._initialStyles),this._state=3)}}return U})();function Oo(U){let D=null;return U.forEach((E,N)=>{(function Os(U){return"display"===U||"position"===U})(N)&&(D=D||new Map,D.set(N,E))}),D}class cr{constructor(D,E,N,G){this.element=D,this.keyframes=E,this.options=N,this._specialStyles=G,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=N.duration,this._delay=N.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(D=>D()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const D=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,D,this.options),this._finalKeyframe=D.length?D[D.length-1]:new Map;const E=()=>this._onFinish();this.domPlayer.addEventListener("finish",E),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",E)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(D){const E=[];return D.forEach(N=>{E.push(Object.fromEntries(N))}),E}_triggerWebAnimation(D,E,N){return D.animate(this._convertKeyframesToObject(E),N)}onStart(D){this._originalOnStartFns.push(D),this._onStartFns.push(D)}onDone(D){this._originalOnDoneFns.push(D),this._onDoneFns.push(D)}onDestroy(D){this._onDestroyFns.push(D)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(D=>D()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(D=>D()),this._onDestroyFns=[])}setPosition(D){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=D*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const D=new Map;this.hasStarted()&&this._finalKeyframe.forEach((N,G)=>{"offset"!==G&&D.set(G,this._finished?N:$s(this.element,G))}),this.currentSnapshot=D}triggerCallback(D){const E="start"===D?this._onStartFns:this._onDoneFns;E.forEach(N=>N()),E.length=0}}class Ro{validateStyleProperty(D){return!0}validateAnimatableStyleProperty(D){return!0}matchesElement(D,E){return!1}containsElement(D,E){return pe(D,E)}getParentElement(D){return Bi(D)}query(D,E,N){return $e(D,E,N)}computeStyle(D,E,N){return window.getComputedStyle(D)[E]}animate(D,E,N,G,q,le=[]){const F={duration:N,delay:G,fill:0==G?"both":"forwards"};q&&(F.easing=q);const x=new Map,V=le.filter(Ee=>Ee instanceof cr);(function Gr(U,D){return 0===U||0===D})(N,G)&&V.forEach(Ee=>{Ee.currentSnapshot.forEach((Ue,ft)=>x.set(ft,Ue))});let K=function wi(U){return U.length?U[0]instanceof Map?U:U.map(D=>ui(D)):[]}(E).map(Ee=>Fn(Ee));K=function gr(U,D,E){if(E.size&&D.length){let N=D[0],G=[];if(E.forEach((q,le)=>{N.has(le)||G.push(le),N.set(le,q)}),G.length)for(let q=1;qle.set(b,$s(U,b)))}}return D}(D,K,x);const me=function $u(U,D){let E=null,N=null;return Array.isArray(D)&&D.length?(E=Oo(D[0]),D.length>1&&(N=Oo(D[D.length-1]))):D instanceof Map&&(E=Oo(D)),E||N?new fl(U,E,N):null}(D,K);return new cr(D,K,F,me)}}let uo=(()=>{class U extends Nt._j{constructor(E,N){super(),this._nextAnimationId=0,this._renderer=E.createRenderer(N.body,{id:"0",encapsulation:k.ifc.None,styles:[],data:{animation:[]}})}build(E){const N=this._nextAnimationId.toString();this._nextAnimationId++;const G=Array.isArray(E)?(0,Nt.vP)(E):E;return Ji(this._renderer,null,N,"register",[G]),new Ni(N,this._renderer)}static#e=this.\u0275fac=function(N){return new(N||U)(k.LFG(k.FYo),k.LFG(ye.K0))};static#t=this.\u0275prov=k.Yz7({token:U,factory:U.\u0275fac})}return U})();class Ni extends Nt.LC{constructor(D,E){super(),this._id=D,this._renderer=E}create(D,E){return new ts(this._id,D,E||{},this._renderer)}}class ts{constructor(D,E,N,G){this.id=D,this.element=E,this._renderer=G,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",N)}_listen(D,E){return this._renderer.listen(this.element,`@@${this.id}:${D}`,E)}_command(D,...E){return Ji(this._renderer,this.element,this.id,D,E)}onDone(D){this._listen("done",D)}onStart(D){this._listen("start",D)}onDestroy(D){this._listen("destroy",D)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(D){this._command("setPosition",D)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function Ji(U,D,E,N,G){return U.setProperty(D,`@@${E}:${N}`,G)}const Pa="@.disabled";let ka=(()=>{class U{constructor(E,N,G){this.delegate=E,this.engine=N,this._zone=G,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,N.onRemovalComplete=(q,le)=>{const b=le?.parentNode(q);b&&le.removeChild(b,q)}}createRenderer(E,N){const q=this.delegate.createRenderer(E,N);if(!(E&&N&&N.data&&N.data.animation)){let V=this._rendererCache.get(q);return V||(V=new Zs("",q,this.engine,()=>this._rendererCache.delete(q)),this._rendererCache.set(q,V)),V}const le=N.id,b=N.id+"-"+this._currentId;this._currentId++,this.engine.register(b,E);const F=V=>{Array.isArray(V)?V.forEach(F):this.engine.registerTrigger(le,b,E,V.name,V)};return N.data.animation.forEach(F),new ha(this,b,q,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(E,N,G){E>=0&&EN(G)):(0==this._animationCallbacksBuffer.length&&queueMicrotask(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(q=>{const[le,b]=q;le(b)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([N,G]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}static#e=this.\u0275fac=function(N){return new(N||U)(k.LFG(k.FYo),k.LFG(Pr),k.LFG(k.R0b))};static#t=this.\u0275prov=k.Yz7({token:U,factory:U.\u0275fac})}return U})();class Zs{constructor(D,E,N,G){this.namespaceId=D,this.delegate=E,this.engine=N,this._onDestroy=G}get data(){return this.delegate.data}destroyNode(D){this.delegate.destroyNode?.(D)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(D,E){return this.delegate.createElement(D,E)}createComment(D){return this.delegate.createComment(D)}createText(D){return this.delegate.createText(D)}appendChild(D,E){this.delegate.appendChild(D,E),this.engine.onInsert(this.namespaceId,E,D,!1)}insertBefore(D,E,N,G=!0){this.delegate.insertBefore(D,E,N),this.engine.onInsert(this.namespaceId,E,D,G)}removeChild(D,E,N){this.engine.onRemove(this.namespaceId,E,this.delegate)}selectRootElement(D,E){return this.delegate.selectRootElement(D,E)}parentNode(D){return this.delegate.parentNode(D)}nextSibling(D){return this.delegate.nextSibling(D)}setAttribute(D,E,N,G){this.delegate.setAttribute(D,E,N,G)}removeAttribute(D,E,N){this.delegate.removeAttribute(D,E,N)}addClass(D,E){this.delegate.addClass(D,E)}removeClass(D,E){this.delegate.removeClass(D,E)}setStyle(D,E,N,G){this.delegate.setStyle(D,E,N,G)}removeStyle(D,E,N){this.delegate.removeStyle(D,E,N)}setProperty(D,E,N){"@"==E.charAt(0)&&E==Pa?this.disableAnimations(D,!!N):this.delegate.setProperty(D,E,N)}setValue(D,E){this.delegate.setValue(D,E)}listen(D,E,N){return this.delegate.listen(D,E,N)}disableAnimations(D,E){this.engine.disableAnimations(D,E)}}class ha extends Zs{constructor(D,E,N,G,q){super(E,N,G,q),this.factory=D,this.namespaceId=E}setProperty(D,E,N){"@"==E.charAt(0)?"."==E.charAt(1)&&E==Pa?this.disableAnimations(D,N=void 0===N||!!N):this.engine.process(this.namespaceId,D,E.slice(1),N):this.delegate.setProperty(D,E,N)}listen(D,E,N){if("@"==E.charAt(0)){const G=function Wo(U){switch(U){case"body":return document.body;case"document":return document;case"window":return window;default:return U}}(D);let q=E.slice(1),le="";return"@"!=q.charAt(0)&&([q,le]=function fa(U){const D=U.indexOf(".");return[U.substring(0,D),U.slice(D+1)]}(q)),this.engine.listen(this.namespaceId,G,q,le,b=>{this.factory.scheduleListenerCallback(b._data||-1,N,b)})}return this.delegate.listen(D,E,N)}}const Fa=[{provide:Nt._j,useClass:uo},{provide:ls,useFactory:function pl(){return new Gs}},{provide:Pr,useClass:(()=>{class U extends Pr{constructor(E,N,G,q){super(E.body,N,G)}ngOnDestroy(){this.flush()}static#e=this.\u0275fac=function(N){return new(N||U)(k.LFG(ye.K0),k.LFG(Mt),k.LFG(ls),k.LFG(k.z2F))};static#t=this.\u0275prov=k.Yz7({token:U,factory:U.\u0275fac})}return U})()},{provide:k.FYo,useFactory:function gl(U,D,E){return new ka(U,D,E)},deps:[l.se,Pr,k.R0b]}],Rs=[{provide:Mt,useFactory:()=>new Ro},{provide:k.QbO,useValue:"BrowserAnimations"},...Fa],ho=[{provide:Mt,useClass:Et},{provide:k.QbO,useValue:"NoopAnimations"},...Fa];let Po=(()=>{class U{static withConfig(E){return{ngModule:U,providers:E.disableAnimations?ho:Rs}}static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275mod=k.oAB({type:U});static#n=this.\u0275inj=k.cJS({providers:Rs,imports:[l.b2]})}return U})();var Yu=L(3250),vl=L(9498);let Wu=(()=>{class U{static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275mod=k.oAB({type:U,bootstrap:[Sn]});static#n=this.\u0275inj=k.cJS({providers:[ae.c,fe.N],imports:[l.b2,Yu.JF,ce,Ve.K6A,Bn.u5,Bn.UX,Po,vl.q]})}return U})();(0,k.G48)(),window.CESIUM_BASE_URL="assets/cesium/",l.q6().bootstrapModule(Wu).catch(U=>console.error(U))},1921:(ct,De,L)=>{function l(de,re,ce,_e,ve,Te,be){try{var ae=de[Te](be),fe=ae.value}catch(ye){return void ce(ye)}ae.done?re(fe):Promise.resolve(fe).then(_e,ve)}function k(de){return function(){var re=this,ce=arguments;return new Promise(function(_e,ve){var Te=de.apply(re,ce);function be(fe){l(Te,_e,ve,be,ae,"next",fe)}function ae(fe){l(Te,_e,ve,be,ae,"throw",fe)}be(void 0)})}}L.d(De,{Z:()=>k})},3449:(ct,De,L)=>{L.d(De,{FC:()=>Pe,KL:()=>nt,ZT:()=>k,gn:()=>ce,mG:()=>ye,pi:()=>de,qq:()=>ne});var l=function(xe,Oe){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Fe,Ne){Fe.__proto__=Ne}||function(Fe,Ne){for(var We in Ne)Object.prototype.hasOwnProperty.call(Ne,We)&&(Fe[We]=Ne[We])})(xe,Oe)};function k(xe,Oe){if("function"!=typeof Oe&&null!==Oe)throw new TypeError("Class extends value "+String(Oe)+" is not a constructor or null");function Fe(){this.constructor=xe}l(xe,Oe),xe.prototype=null===Oe?Object.create(Oe):(Fe.prototype=Oe.prototype,new Fe)}var de=function(){return de=Object.assign||function(Oe){for(var Fe,Ne=1,We=arguments.length;Ne=0;ot--)(_t=xe[ot])&&(Ke=(We<3?_t(Ke):We>3?_t(Oe,Fe,Ke):_t(Oe,Fe))||Ke);return We>3&&Ke&&Object.defineProperty(Oe,Fe,Ke),Ke}function ye(xe,Oe,Fe,Ne){return new(Fe||(Fe=Promise))(function(Ke,_t){function ot(cn){try{Xe(Ne.next(cn))}catch(Ut){_t(Ut)}}function ei(cn){try{Xe(Ne.throw(cn))}catch(Ut){_t(Ut)}}function Xe(cn){cn.done?Ke(cn.value):function We(Ke){return Ke instanceof Fe?Ke:new Fe(function(_t){_t(Ke)})}(cn.value).then(ot,ei)}Xe((Ne=Ne.apply(xe,Oe||[])).next())})}function ne(xe){return this instanceof ne?(this.v=xe,this):new ne(xe)}function Pe(xe,Oe,Fe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var We,Ne=Fe.apply(xe,Oe||[]),Ke=[];return We={},_t("next"),_t("throw"),_t("return"),We[Symbol.asyncIterator]=function(){return this},We;function _t(kt){Ne[kt]&&(We[kt]=function(mn){return new Promise(function(li,an){Ke.push([kt,mn,li,an])>1||ot(kt,mn)})})}function ot(kt,mn){try{!function ei(kt){kt.value instanceof ne?Promise.resolve(kt.value.v).then(Xe,cn):Ut(Ke[0][2],kt)}(Ne[kt](mn))}catch(li){Ut(Ke[0][3],li)}}function Xe(kt){ot("next",kt)}function cn(kt){ot("throw",kt)}function Ut(kt,mn){kt(mn),Ke.shift(),Ke.length&&ot(Ke[0][0],Ke[0][1])}}function nt(xe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Fe,Oe=xe[Symbol.asyncIterator];return Oe?Oe.call(xe):(xe=function Le(xe){var Oe="function"==typeof Symbol&&Symbol.iterator,Fe=Oe&&xe[Oe],Ne=0;if(Fe)return Fe.call(xe);if(xe&&"number"==typeof xe.length)return{next:function(){return xe&&Ne>=xe.length&&(xe=void 0),{value:xe&&xe[Ne++],done:!xe}}};throw new TypeError(Oe?"Object is not iterable.":"Symbol.iterator is not defined.")}(xe),Fe={},Ne("next"),Ne("throw"),Ne("return"),Fe[Symbol.asyncIterator]=function(){return this},Fe);function Ne(Ke){Fe[Ke]=xe[Ke]&&function(_t){return new Promise(function(ot,ei){!function We(Ke,_t,ot,ei){Promise.resolve(ei).then(function(Xe){Ke({value:Xe,done:ot})},_t)}(ot,ei,(_t=xe[Ke](_t)).done,_t.value)})}}}"function"==typeof SuppressedError&&SuppressedError},6206:(ct,De,L)=>{L.d(De,{F4:()=>ae,LC:()=>k,SB:()=>be,X$:()=>re,ZE:()=>at,ZN:()=>Re,_j:()=>l,eR:()=>fe,jt:()=>ce,k1:()=>Dt,l3:()=>de,oB:()=>Te,vP:()=>ve});class l{}class k{}const de="*";function re(ut,ne){return{type:7,name:ut,definitions:ne,options:{}}}function ce(ut,ne=null){return{type:4,styles:ne,timings:ut}}function ve(ut,ne=null){return{type:2,steps:ut,options:ne}}function Te(ut){return{type:6,styles:ut,offset:null}}function be(ut,ne,Pe){return{type:0,name:ut,styles:ne,options:Pe}}function ae(ut){return{type:5,steps:ut}}function fe(ut,ne,Pe=null){return{type:1,expr:ut,animation:ne,options:Pe}}class Re{constructor(ne=0,Pe=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=ne+Pe}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(ne=>ne()),this._onDoneFns=[])}onStart(ne){this._originalOnStartFns.push(ne),this._onStartFns.push(ne)}onDone(ne){this._originalOnDoneFns.push(ne),this._onDoneFns.push(ne)}onDestroy(ne){this._onDestroyFns.push(ne)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(ne=>ne()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(ne=>ne()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(ne){this._position=this.totalTime?ne*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(ne){const Pe="start"==ne?this._onStartFns:this._onDoneFns;Pe.forEach(Me=>Me()),Pe.length=0}}class at{constructor(ne){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=ne;let Pe=0,Me=0,nt=0;const it=this.players.length;0==it?queueMicrotask(()=>this._onFinish()):this.players.forEach(Je=>{Je.onDone(()=>{++Pe==it&&this._onFinish()}),Je.onDestroy(()=>{++Me==it&&this._onDestroy()}),Je.onStart(()=>{++nt==it&&this._onStart()})}),this.totalTime=this.players.reduce((Je,wt)=>Math.max(Je,wt.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(ne=>ne()),this._onDoneFns=[])}init(){this.players.forEach(ne=>ne.init())}onStart(ne){this._onStartFns.push(ne)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(ne=>ne()),this._onStartFns=[])}onDone(ne){this._onDoneFns.push(ne)}onDestroy(ne){this._onDestroyFns.push(ne)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(ne=>ne.play())}pause(){this.players.forEach(ne=>ne.pause())}restart(){this.players.forEach(ne=>ne.restart())}finish(){this._onFinish(),this.players.forEach(ne=>ne.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(ne=>ne.destroy()),this._onDestroyFns.forEach(ne=>ne()),this._onDestroyFns=[])}reset(){this.players.forEach(ne=>ne.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(ne){const Pe=ne*this.totalTime;this.players.forEach(Me=>{const nt=Me.totalTime?Math.min(1,Pe/Me.totalTime):1;Me.setPosition(nt)})}getPosition(){const ne=this.players.reduce((Pe,Me)=>null===Pe||Me.totalTime>Pe.totalTime?Me:Pe,null);return null!=ne?ne.getPosition():0}beforeDestroy(){this.players.forEach(ne=>{ne.beforeDestroy&&ne.beforeDestroy()})}triggerCallback(ne){const Pe="start"==ne?this._onStartFns:this._onDoneFns;Pe.forEach(Me=>Me()),Pe.length=0}}const Dt="!"},3223:(ct,De,L)=>{L.d(De,{Do:()=>Le,EM:()=>Er,HT:()=>re,JF:()=>cs,K0:()=>_e,Mn:()=>Bn,Mx:()=>Fn,NF:()=>As,Nd:()=>Zr,O5:()=>sr,Ov:()=>Di,PC:()=>To,PM:()=>ls,RF:()=>hn,S$:()=>Ve,Tn:()=>Je,UT:()=>Nt,V_:()=>Te,Ye:()=>Re,b0:()=>He,bD:()=>yn,ez:()=>mr,fb:()=>Qi,mk:()=>dn,n9:()=>$s,q:()=>de,sg:()=>Wn,tM:()=>wt,tP:()=>Io,wS:()=>Oe,w_:()=>ce,x:()=>it});var l=L(3714);let k=null;function de(){return k}function re(b){k||(k=b)}class ce{}const _e=new l.OlP("DocumentToken");let ve=(()=>{class b{historyGo(x){throw new Error("Not implemented")}static#e=this.\u0275fac=function(V){return new(V||b)};static#t=this.\u0275prov=l.Yz7({token:b,factory:function(){return(0,l.f3M)(be)},providedIn:"platform"})}return b})();const Te=new l.OlP("Location Initialized");let be=(()=>{class b extends ve{constructor(){super(),this._doc=(0,l.f3M)(_e),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return de().getBaseHref(this._doc)}onPopState(x){const V=de().getGlobalEventTarget(this._doc,"window");return V.addEventListener("popstate",x,!1),()=>V.removeEventListener("popstate",x)}onHashChange(x){const V=de().getGlobalEventTarget(this._doc,"window");return V.addEventListener("hashchange",x,!1),()=>V.removeEventListener("hashchange",x)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(x){this._location.pathname=x}pushState(x,V,K){this._history.pushState(x,V,K)}replaceState(x,V,K){this._history.replaceState(x,V,K)}forward(){this._history.forward()}back(){this._history.back()}historyGo(x=0){this._history.go(x)}getState(){return this._history.state}static#e=this.\u0275fac=function(V){return new(V||b)};static#t=this.\u0275prov=l.Yz7({token:b,factory:function(){return new b},providedIn:"platform"})}return b})();function ae(b,F){if(0==b.length)return F;if(0==F.length)return b;let x=0;return b.endsWith("/")&&x++,F.startsWith("/")&&x++,2==x?b+F.substring(1):1==x?b+F:b+"/"+F}function fe(b){const F=b.match(/#|\?|$/),x=F&&F.index||b.length;return b.slice(0,x-("/"===b[x-1]?1:0))+b.slice(x)}function ye(b){return b&&"?"!==b[0]?"?"+b:b}let Ve=(()=>{class b{historyGo(x){throw new Error("Not implemented")}static#e=this.\u0275fac=function(V){return new(V||b)};static#t=this.\u0275prov=l.Yz7({token:b,factory:function(){return(0,l.f3M)(He)},providedIn:"root"})}return b})();const ke=new l.OlP("appBaseHref");let He=(()=>{class b extends Ve{constructor(x,V){super(),this._platformLocation=x,this._removeListenerFns=[],this._baseHref=V??this._platformLocation.getBaseHrefFromDOM()??(0,l.f3M)(_e).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(x){this._removeListenerFns.push(this._platformLocation.onPopState(x),this._platformLocation.onHashChange(x))}getBaseHref(){return this._baseHref}prepareExternalUrl(x){return ae(this._baseHref,x)}path(x=!1){const V=this._platformLocation.pathname+ye(this._platformLocation.search),K=this._platformLocation.hash;return K&&x?`${V}${K}`:V}pushState(x,V,K,me){const Ee=this.prepareExternalUrl(K+ye(me));this._platformLocation.pushState(x,V,Ee)}replaceState(x,V,K,me){const Ee=this.prepareExternalUrl(K+ye(me));this._platformLocation.replaceState(x,V,Ee)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(x=0){this._platformLocation.historyGo?.(x)}static#e=this.\u0275fac=function(V){return new(V||b)(l.LFG(ve),l.LFG(ke,8))};static#t=this.\u0275prov=l.Yz7({token:b,factory:b.\u0275fac,providedIn:"root"})}return b})(),Le=(()=>{class b extends Ve{constructor(x,V){super(),this._platformLocation=x,this._baseHref="",this._removeListenerFns=[],null!=V&&(this._baseHref=V)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(x){this._removeListenerFns.push(this._platformLocation.onPopState(x),this._platformLocation.onHashChange(x))}getBaseHref(){return this._baseHref}path(x=!1){let V=this._platformLocation.hash;return null==V&&(V="#"),V.length>0?V.substring(1):V}prepareExternalUrl(x){const V=ae(this._baseHref,x);return V.length>0?"#"+V:V}pushState(x,V,K,me){let Ee=this.prepareExternalUrl(K+ye(me));0==Ee.length&&(Ee=this._platformLocation.pathname),this._platformLocation.pushState(x,V,Ee)}replaceState(x,V,K,me){let Ee=this.prepareExternalUrl(K+ye(me));0==Ee.length&&(Ee=this._platformLocation.pathname),this._platformLocation.replaceState(x,V,Ee)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(x=0){this._platformLocation.historyGo?.(x)}static#e=this.\u0275fac=function(V){return new(V||b)(l.LFG(ve),l.LFG(ke,8))};static#t=this.\u0275prov=l.Yz7({token:b,factory:b.\u0275fac})}return b})(),Re=(()=>{class b{constructor(x){this._subject=new l.vpe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=x;const V=this._locationStrategy.getBaseHref();this._basePath=function ne(b){if(new RegExp("^(https?:)?//").test(b)){const[,x]=b.split(/\/\/[^\/]+/);return x}return b}(fe(ut(V))),this._locationStrategy.onPopState(K=>{this._subject.emit({url:this.path(!0),pop:!0,state:K.state,type:K.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(x=!1){return this.normalize(this._locationStrategy.path(x))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(x,V=""){return this.path()==this.normalize(x+ye(V))}normalize(x){return b.stripTrailingSlash(function Dt(b,F){if(!b||!F.startsWith(b))return F;const x=F.substring(b.length);return""===x||["/",";","?","#"].includes(x[0])?x:F}(this._basePath,ut(x)))}prepareExternalUrl(x){return x&&"/"!==x[0]&&(x="/"+x),this._locationStrategy.prepareExternalUrl(x)}go(x,V="",K=null){this._locationStrategy.pushState(K,"",x,V),this._notifyUrlChangeListeners(this.prepareExternalUrl(x+ye(V)),K)}replaceState(x,V="",K=null){this._locationStrategy.replaceState(K,"",x,V),this._notifyUrlChangeListeners(this.prepareExternalUrl(x+ye(V)),K)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(x=0){this._locationStrategy.historyGo?.(x)}onUrlChange(x){return this._urlChangeListeners.push(x),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(V=>{this._notifyUrlChangeListeners(V.url,V.state)})),()=>{const V=this._urlChangeListeners.indexOf(x);this._urlChangeListeners.splice(V,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(x="",V){this._urlChangeListeners.forEach(K=>K(x,V))}subscribe(x,V,K){return this._subject.subscribe({next:x,error:V,complete:K})}static#e=this.normalizeQueryParams=ye;static#t=this.joinWithSlash=ae;static#n=this.stripTrailingSlash=fe;static#i=this.\u0275fac=function(V){return new(V||b)(l.LFG(Ve))};static#r=this.\u0275prov=l.Yz7({token:b,factory:function(){return function at(){return new Re((0,l.LFG)(Ve))}()},providedIn:"root"})}return b})();function ut(b){return b.replace(/\/index.html$/,"")}var it=function(b){return b[b.Format=0]="Format",b[b.Standalone=1]="Standalone",b}(it||{}),Je=function(b){return b[b.Narrow=0]="Narrow",b[b.Abbreviated=1]="Abbreviated",b[b.Wide=2]="Wide",b[b.Short=3]="Short",b}(Je||{}),wt=function(b){return b[b.Short=0]="Short",b[b.Medium=1]="Medium",b[b.Long=2]="Long",b[b.Full=3]="Full",b}(wt||{});function Bn(b,F,x){const V=(0,l.cg1)(b),me=an([V[l.wAp.DaysFormat],V[l.wAp.DaysStandalone]],F);return an(me,x)}function Nt(b,F,x){const V=(0,l.cg1)(b),me=an([V[l.wAp.MonthsFormat],V[l.wAp.MonthsStandalone]],F);return an(me,x)}function Qi(b){return(0,l.cg1)(b)[l.wAp.FirstDayOfWeek]}function Oe(b,F){return an((0,l.cg1)(b)[l.wAp.DateFormat],F)}function an(b,F){for(let x=F;x>-1;x--)if(typeof b[x]<"u")return b[x];throw new Error("Locale data API: locale data undefined")}function Fn(b,F){F=encodeURIComponent(F);for(const x of b.split(";")){const V=x.indexOf("="),[K,me]=-1==V?[x,""]:[x.slice(0,V),x.slice(V+1)];if(K.trim()===F)return decodeURIComponent(me)}return null}const xn=/\s+/,Wt=[];let dn=(()=>{class b{constructor(x,V,K,me){this._iterableDiffers=x,this._keyValueDiffers=V,this._ngEl=K,this._renderer=me,this.initialClasses=Wt,this.stateMap=new Map}set klass(x){this.initialClasses=null!=x?x.trim().split(xn):Wt}set ngClass(x){this.rawClass="string"==typeof x?x.trim().split(xn):x}ngDoCheck(){for(const V of this.initialClasses)this._updateState(V,!0);const x=this.rawClass;if(Array.isArray(x)||x instanceof Set)for(const V of x)this._updateState(V,!0);else if(null!=x)for(const V of Object.keys(x))this._updateState(V,!!x[V]);this._applyStateDiff()}_updateState(x,V){const K=this.stateMap.get(x);void 0!==K?(K.enabled!==V&&(K.changed=!0,K.enabled=V),K.touched=!0):this.stateMap.set(x,{enabled:V,changed:!0,touched:!0})}_applyStateDiff(){for(const x of this.stateMap){const V=x[0],K=x[1];K.changed?(this._toggleClass(V,K.enabled),K.changed=!1):K.touched||(K.enabled&&this._toggleClass(V,!1),this.stateMap.delete(V)),K.touched=!1}}_toggleClass(x,V){(x=x.trim()).length>0&&x.split(xn).forEach(K=>{V?this._renderer.addClass(this._ngEl.nativeElement,K):this._renderer.removeClass(this._ngEl.nativeElement,K)})}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.ZZ4),l.Y36(l.aQg),l.Y36(l.SBq),l.Y36(l.Qsj))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0})}return b})();class Yn{constructor(F,x,V,K){this.$implicit=F,this.ngForOf=x,this.index=V,this.count=K}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Wn=(()=>{class b{set ngForOf(x){this._ngForOf=x,this._ngForOfDirty=!0}set ngForTrackBy(x){this._trackByFn=x}get ngForTrackBy(){return this._trackByFn}constructor(x,V,K){this._viewContainer=x,this._template=V,this._differs=K,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(x){x&&(this._template=x)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const x=this._ngForOf;!this._differ&&x&&(this._differ=this._differs.find(x).create(this.ngForTrackBy))}if(this._differ){const x=this._differ.diff(this._ngForOf);x&&this._applyChanges(x)}}_applyChanges(x){const V=this._viewContainer;x.forEachOperation((K,me,Ee)=>{if(null==K.previousIndex)V.createEmbeddedView(this._template,new Yn(K.item,this._ngForOf,-1,-1),null===Ee?void 0:Ee);else if(null==Ee)V.remove(null===me?void 0:me);else if(null!==me){const Ue=V.get(me);V.move(Ue,Ee),Si(Ue,K)}});for(let K=0,me=V.length;K{Si(V.get(K.currentIndex),K)})}static ngTemplateContextGuard(x,V){return!0}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.s_b),l.Y36(l.Rgc),l.Y36(l.ZZ4))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}return b})();function Si(b,F){b.context.$implicit=F.item}let sr=(()=>{class b{constructor(x,V){this._viewContainer=x,this._context=new di,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=V}set ngIf(x){this._context.$implicit=this._context.ngIf=x,this._updateView()}set ngIfThen(x){Gr("ngIfThen",x),this._thenTemplateRef=x,this._thenViewRef=null,this._updateView()}set ngIfElse(x){Gr("ngIfElse",x),this._elseTemplateRef=x,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(x,V){return!0}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.s_b),l.Y36(l.Rgc))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}return b})();class di{constructor(){this.$implicit=null,this.ngIf=null}}function Gr(b,F){if(F&&!F.createEmbeddedView)throw new Error(`${b} must be a TemplateRef, but received '${(0,l.AaK)(F)}'.`)}class gr{constructor(F,x){this._viewContainerRef=F,this._templateRef=x,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(F){F&&!this._created?this.create():!F&&this._created&&this.destroy()}}let hn=(()=>{class b{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(x){this._ngSwitch=x,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(x){this._defaultViews.push(x)}_matchCase(x){const V=x==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||V,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),V}_updateDefaultCases(x){if(this._defaultViews.length>0&&x!==this._defaultUsed){this._defaultUsed=x;for(const V of this._defaultViews)V.enforceState(x)}}static#e=this.\u0275fac=function(V){return new(V||b)};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0})}return b})(),$s=(()=>{class b{constructor(x,V,K){this.ngSwitch=K,K._addCase(),this._view=new gr(x,V)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.s_b),l.Y36(l.Rgc),l.Y36(hn,9))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0})}return b})(),To=(()=>{class b{constructor(x,V,K){this._ngEl=x,this._differs=V,this._renderer=K,this._ngStyle=null,this._differ=null}set ngStyle(x){this._ngStyle=x,!this._differ&&x&&(this._differ=this._differs.find(x).create())}ngDoCheck(){if(this._differ){const x=this._differ.diff(this._ngStyle);x&&this._applyChanges(x)}}_setStyle(x,V){const[K,me]=x.split("."),Ee=-1===K.indexOf("-")?void 0:l.JOm.DashCase;null!=V?this._renderer.setStyle(this._ngEl.nativeElement,K,me?`${V}${me}`:V,Ee):this._renderer.removeStyle(this._ngEl.nativeElement,K,Ee)}_applyChanges(x){x.forEachRemovedItem(V=>this._setStyle(V.key,null)),x.forEachAddedItem(V=>this._setStyle(V.key,V.currentValue)),x.forEachChangedItem(V=>this._setStyle(V.key,V.currentValue))}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.SBq),l.Y36(l.aQg),l.Y36(l.Qsj))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0})}return b})(),Io=(()=>{class b{constructor(x){this._viewContainerRef=x,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(x){if(x.ngTemplateOutlet||x.ngTemplateOutletInjector){const V=this._viewContainerRef;if(this._viewRef&&V.remove(V.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:K,ngTemplateOutletContext:me,ngTemplateOutletInjector:Ee}=this;this._viewRef=V.createEmbeddedView(K,me,Ee?{injector:Ee}:void 0)}else this._viewRef=null}else this._viewRef&&x.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.s_b))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[l.TTD]})}return b})();class Yr{createSubscription(F,x){return(0,l.rg0)(()=>F.subscribe({next:x,error:V=>{throw V}}))}dispose(F){(0,l.rg0)(()=>F.unsubscribe())}}class $o{createSubscription(F,x){return F.then(x,V=>{throw V})}dispose(F){}}const ii=new $o,Es=new Yr;let Di=(()=>{class b{constructor(x){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=x}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(x){return this._obj?x!==this._obj?(this._dispose(),this.transform(x)):this._latestValue:(x&&this._subscribe(x),this._latestValue)}_subscribe(x){this._obj=x,this._strategy=this._selectStrategy(x),this._subscription=this._strategy.createSubscription(x,V=>this._updateLatestValue(x,V))}_selectStrategy(x){if((0,l.QGY)(x))return ii;if((0,l.F4k)(x))return Es;throw function Ki(b,F){return new l.vHH(2100,!1)}()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(x,V){x===this._obj&&(this._latestValue=V,this._ref.markForCheck())}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.sBO,16))};static#t=this.\u0275pipe=l.Yjl({name:"async",type:b,pure:!1,standalone:!0})}return b})(),Zr=(()=>{class b{constructor(x){this.differs=x,this.keyValues=[],this.compareFn=Is}transform(x,V=Is){if(!x||!(x instanceof Map)&&"object"!=typeof x)return null;this.differ||(this.differ=this.differs.find(x).create());const K=this.differ.diff(x),me=V!==this.compareFn;return K&&(this.keyValues=[],K.forEachItem(Ee=>{this.keyValues.push(function as(b,F){return{key:b,value:F}}(Ee.key,Ee.currentValue))})),(K||me)&&(this.keyValues.sort(V),this.compareFn=V),this.keyValues}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.aQg,16))};static#t=this.\u0275pipe=l.Yjl({name:"keyvalue",type:b,pure:!1,standalone:!0})}return b})();function Is(b,F){const x=b.key,V=F.key;if(x===V)return 0;if(void 0===x)return 1;if(void 0===V)return-1;if(null===x)return 1;if(null===V)return-1;if("string"==typeof x&&"string"==typeof V)return x{class b{static#e=this.\u0275fac=function(V){return new(V||b)};static#t=this.\u0275mod=l.oAB({type:b});static#n=this.\u0275inj=l.cJS({})}return b})();const yn="browser",Qr="server";function As(b){return b===yn}function ls(b){return b===Qr}let Er=(()=>{class b{static#e=this.\u0275prov=(0,l.Yz7)({token:b,providedIn:"root",factory:()=>new $i((0,l.LFG)(_e),window)})}return b})();class $i{constructor(F,x){this.document=F,this.window=x,this.offset=()=>[0,0]}setOffset(F){this.offset=Array.isArray(F)?()=>F:F}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(F){this.supportsScrolling()&&this.window.scrollTo(F[0],F[1])}scrollToAnchor(F){if(!this.supportsScrolling())return;const x=function Kr(b,F){const x=b.getElementById(F)||b.getElementsByName(F)[0];if(x)return x;if("function"==typeof b.createTreeWalker&&b.body&&"function"==typeof b.body.attachShadow){const V=b.createTreeWalker(b.body,NodeFilter.SHOW_ELEMENT);let K=V.currentNode;for(;K;){const me=K.shadowRoot;if(me){const Ee=me.getElementById(F)||me.querySelector(`[name="${F}"]`);if(Ee)return Ee}K=V.nextNode()}}return null}(this.document,F);x&&(this.scrollToElement(x),x.focus())}setHistoryScrollRestoration(F){this.supportsScrolling()&&(this.window.history.scrollRestoration=F)}scrollToElement(F){const x=F.getBoundingClientRect(),V=x.left+this.window.pageXOffset,K=x.top+this.window.pageYOffset,me=this.offset();this.window.scrollTo(V-me[0],K-me[1])}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}class cs{}},3250:(ct,De,L)=>{L.d(De,{JF:()=>pe,WM:()=>Ve,eN:()=>xe});var l=L(3714),k=L(287),de=L(3477),re=L(1145),ce=L(1173),_e=L(9735),ve=L(5990),Te=L(5220),be=L(3318),ae=L(3223);class fe{}class ye{}class Ve{constructor(oe){this.normalizedNames=new Map,this.lazyUpdate=null,oe?"string"==typeof oe?this.lazyInit=()=>{this.headers=new Map,oe.split("\n").forEach(ue=>{const ze=ue.indexOf(":");if(ze>0){const qe=ue.slice(0,ze),st=qe.toLowerCase(),rt=ue.slice(ze+1).trim();this.maybeSetNormalizedName(qe,st),this.headers.has(st)?this.headers.get(st).push(rt):this.headers.set(st,[rt])}})}:typeof Headers<"u"&&oe instanceof Headers?(this.headers=new Map,oe.forEach((ue,ze)=>{this.setHeaderEntries(ze,ue)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(oe).forEach(([ue,ze])=>{this.setHeaderEntries(ue,ze)})}:this.headers=new Map}has(oe){return this.init(),this.headers.has(oe.toLowerCase())}get(oe){this.init();const ue=this.headers.get(oe.toLowerCase());return ue&&ue.length>0?ue[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(oe){return this.init(),this.headers.get(oe.toLowerCase())||null}append(oe,ue){return this.clone({name:oe,value:ue,op:"a"})}set(oe,ue){return this.clone({name:oe,value:ue,op:"s"})}delete(oe,ue){return this.clone({name:oe,value:ue,op:"d"})}maybeSetNormalizedName(oe,ue){this.normalizedNames.has(ue)||this.normalizedNames.set(ue,oe)}init(){this.lazyInit&&(this.lazyInit instanceof Ve?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(oe=>this.applyUpdate(oe)),this.lazyUpdate=null))}copyFrom(oe){oe.init(),Array.from(oe.headers.keys()).forEach(ue=>{this.headers.set(ue,oe.headers.get(ue)),this.normalizedNames.set(ue,oe.normalizedNames.get(ue))})}clone(oe){const ue=new Ve;return ue.lazyInit=this.lazyInit&&this.lazyInit instanceof Ve?this.lazyInit:this,ue.lazyUpdate=(this.lazyUpdate||[]).concat([oe]),ue}applyUpdate(oe){const ue=oe.name.toLowerCase();switch(oe.op){case"a":case"s":let ze=oe.value;if("string"==typeof ze&&(ze=[ze]),0===ze.length)return;this.maybeSetNormalizedName(oe.name,ue);const qe=("a"===oe.op?this.headers.get(ue):void 0)||[];qe.push(...ze),this.headers.set(ue,qe);break;case"d":const st=oe.value;if(st){let rt=this.headers.get(ue);if(!rt)return;rt=rt.filter(Kt=>-1===st.indexOf(Kt)),0===rt.length?(this.headers.delete(ue),this.normalizedNames.delete(ue)):this.headers.set(ue,rt)}else this.headers.delete(ue),this.normalizedNames.delete(ue)}}setHeaderEntries(oe,ue){const ze=(Array.isArray(ue)?ue:[ue]).map(st=>st.toString()),qe=oe.toLowerCase();this.headers.set(qe,ze),this.maybeSetNormalizedName(oe,qe)}forEach(oe){this.init(),Array.from(this.normalizedNames.keys()).forEach(ue=>oe(this.normalizedNames.get(ue),this.headers.get(ue)))}}class He{encodeKey(oe){return Dt(oe)}encodeValue(oe){return Dt(oe)}decodeKey(oe){return decodeURIComponent(oe)}decodeValue(oe){return decodeURIComponent(oe)}}const Re=/%(\d[a-f0-9])/gi,at={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Dt(ge){return encodeURIComponent(ge).replace(Re,(oe,ue)=>at[ue]??oe)}function ut(ge){return`${ge}`}class ne{constructor(oe={}){if(this.updates=null,this.cloneFrom=null,this.encoder=oe.encoder||new He,oe.fromString){if(oe.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function Le(ge,oe){const ue=new Map;return ge.length>0&&ge.replace(/^\?/,"").split("&").forEach(qe=>{const st=qe.indexOf("="),[rt,Kt]=-1==st?[oe.decodeKey(qe),""]:[oe.decodeKey(qe.slice(0,st)),oe.decodeValue(qe.slice(st+1))],ht=ue.get(rt)||[];ht.push(Kt),ue.set(rt,ht)}),ue}(oe.fromString,this.encoder)}else oe.fromObject?(this.map=new Map,Object.keys(oe.fromObject).forEach(ue=>{const ze=oe.fromObject[ue],qe=Array.isArray(ze)?ze.map(ut):[ut(ze)];this.map.set(ue,qe)})):this.map=null}has(oe){return this.init(),this.map.has(oe)}get(oe){this.init();const ue=this.map.get(oe);return ue?ue[0]:null}getAll(oe){return this.init(),this.map.get(oe)||null}keys(){return this.init(),Array.from(this.map.keys())}append(oe,ue){return this.clone({param:oe,value:ue,op:"a"})}appendAll(oe){const ue=[];return Object.keys(oe).forEach(ze=>{const qe=oe[ze];Array.isArray(qe)?qe.forEach(st=>{ue.push({param:ze,value:st,op:"a"})}):ue.push({param:ze,value:qe,op:"a"})}),this.clone(ue)}set(oe,ue){return this.clone({param:oe,value:ue,op:"s"})}delete(oe,ue){return this.clone({param:oe,value:ue,op:"d"})}toString(){return this.init(),this.keys().map(oe=>{const ue=this.encoder.encodeKey(oe);return this.map.get(oe).map(ze=>ue+"="+this.encoder.encodeValue(ze)).join("&")}).filter(oe=>""!==oe).join("&")}clone(oe){const ue=new ne({encoder:this.encoder});return ue.cloneFrom=this.cloneFrom||this,ue.updates=(this.updates||[]).concat(oe),ue}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(oe=>this.map.set(oe,this.cloneFrom.map.get(oe))),this.updates.forEach(oe=>{switch(oe.op){case"a":case"s":const ue=("a"===oe.op?this.map.get(oe.param):void 0)||[];ue.push(ut(oe.value)),this.map.set(oe.param,ue);break;case"d":if(void 0===oe.value){this.map.delete(oe.param);break}{let ze=this.map.get(oe.param)||[];const qe=ze.indexOf(ut(oe.value));-1!==qe&&ze.splice(qe,1),ze.length>0?this.map.set(oe.param,ze):this.map.delete(oe.param)}}}),this.cloneFrom=this.updates=null)}}class Me{constructor(){this.map=new Map}set(oe,ue){return this.map.set(oe,ue),this}get(oe){return this.map.has(oe)||this.map.set(oe,oe.defaultValue()),this.map.get(oe)}delete(oe){return this.map.delete(oe),this}has(oe){return this.map.has(oe)}keys(){return this.map.keys()}}function it(ge){return typeof ArrayBuffer<"u"&&ge instanceof ArrayBuffer}function Je(ge){return typeof Blob<"u"&&ge instanceof Blob}function wt(ge){return typeof FormData<"u"&&ge instanceof FormData}class $t{constructor(oe,ue,ze,qe){let st;if(this.url=ue,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=oe.toUpperCase(),function nt(ge){switch(ge){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||qe?(this.body=void 0!==ze?ze:null,st=qe):st=ze,st&&(this.reportProgress=!!st.reportProgress,this.withCredentials=!!st.withCredentials,st.responseType&&(this.responseType=st.responseType),st.headers&&(this.headers=st.headers),st.context&&(this.context=st.context),st.params&&(this.params=st.params)),this.headers||(this.headers=new Ve),this.context||(this.context=new Me),this.params){const rt=this.params.toString();if(0===rt.length)this.urlWithParams=ue;else{const Kt=ue.indexOf("?");this.urlWithParams=ue+(-1===Kt?"?":Ktwi.set(Ei,oe.setHeaders[Ei]),ht)),oe.setParams&&(En=Object.keys(oe.setParams).reduce((wi,Ei)=>wi.set(Ei,oe.setParams[Ei]),En)),new $t(ue,ze,st,{params:En,headers:ht,context:ui,reportProgress:Kt,responseType:qe,withCredentials:rt})}}var Vn=function(ge){return ge[ge.Sent=0]="Sent",ge[ge.UploadProgress=1]="UploadProgress",ge[ge.ResponseHeader=2]="ResponseHeader",ge[ge.DownloadProgress=3]="DownloadProgress",ge[ge.Response=4]="Response",ge[ge.User=5]="User",ge}(Vn||{});class Sn{constructor(oe,ue=200,ze="OK"){this.headers=oe.headers||new Ve,this.status=void 0!==oe.status?oe.status:ue,this.statusText=oe.statusText||ze,this.url=oe.url||null,this.ok=this.status>=200&&this.status<300}}class Bn extends Sn{constructor(oe={}){super(oe),this.type=Vn.ResponseHeader}clone(oe={}){return new Bn({headers:oe.headers||this.headers,status:void 0!==oe.status?oe.status:this.status,statusText:oe.statusText||this.statusText,url:oe.url||this.url||void 0})}}class Nt extends Sn{constructor(oe={}){super(oe),this.type=Vn.Response,this.body=void 0!==oe.body?oe.body:null}clone(oe={}){return new Nt({body:void 0!==oe.body?oe.body:this.body,headers:oe.headers||this.headers,status:void 0!==oe.status?oe.status:this.status,statusText:oe.statusText||this.statusText,url:oe.url||this.url||void 0})}}class Ar extends Sn{constructor(oe){super(oe,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${oe.url||"(unknown url)"}`:`Http failure response for ${oe.url||"(unknown url)"}: ${oe.status} ${oe.statusText}`,this.error=oe.error||null}}function Qi(ge,oe){return{body:oe,headers:ge.headers,context:ge.context,observe:ge.observe,params:ge.params,reportProgress:ge.reportProgress,responseType:ge.responseType,withCredentials:ge.withCredentials}}let xe=(()=>{class ge{constructor(ue){this.handler=ue}request(ue,ze,qe={}){let st;if(ue instanceof $t)st=ue;else{let ht,En;ht=qe.headers instanceof Ve?qe.headers:new Ve(qe.headers),qe.params&&(En=qe.params instanceof ne?qe.params:new ne({fromObject:qe.params})),st=new $t(ue,ze,void 0!==qe.body?qe.body:null,{headers:ht,context:qe.context,params:En,reportProgress:qe.reportProgress,responseType:qe.responseType||"json",withCredentials:qe.withCredentials})}const rt=(0,k.of)(st).pipe((0,ce.b)(ht=>this.handler.handle(ht)));if(ue instanceof $t||"events"===qe.observe)return rt;const Kt=rt.pipe((0,_e.h)(ht=>ht instanceof Nt));switch(qe.observe||"body"){case"body":switch(st.responseType){case"arraybuffer":return Kt.pipe((0,ve.U)(ht=>{if(null!==ht.body&&!(ht.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return ht.body}));case"blob":return Kt.pipe((0,ve.U)(ht=>{if(null!==ht.body&&!(ht.body instanceof Blob))throw new Error("Response is not a Blob.");return ht.body}));case"text":return Kt.pipe((0,ve.U)(ht=>{if(null!==ht.body&&"string"!=typeof ht.body)throw new Error("Response is not a string.");return ht.body}));default:return Kt.pipe((0,ve.U)(ht=>ht.body))}case"response":return Kt;default:throw new Error(`Unreachable: unhandled observe type ${qe.observe}}`)}}delete(ue,ze={}){return this.request("DELETE",ue,ze)}get(ue,ze={}){return this.request("GET",ue,ze)}head(ue,ze={}){return this.request("HEAD",ue,ze)}jsonp(ue,ze){return this.request("JSONP",ue,{params:(new ne).append(ze,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(ue,ze={}){return this.request("OPTIONS",ue,ze)}patch(ue,ze,qe={}){return this.request("PATCH",ue,Qi(qe,ze))}post(ue,ze,qe={}){return this.request("POST",ue,Qi(qe,ze))}put(ue,ze,qe={}){return this.request("PUT",ue,Qi(qe,ze))}static#e=this.\u0275fac=function(ze){return new(ze||ge)(l.LFG(fe))};static#t=this.\u0275prov=l.Yz7({token:ge,factory:ge.\u0275fac})}return ge})();function ei(ge,oe){return oe(ge)}function Xe(ge,oe){return(ue,ze)=>oe.intercept(ue,{handle:qe=>ge(qe,ze)})}const Ut=new l.OlP(""),kt=new l.OlP(""),mn=new l.OlP("");function li(){let ge=null;return(oe,ue)=>{null===ge&&(ge=((0,l.f3M)(Ut,{optional:!0})??[]).reduceRight(Xe,ei));const ze=(0,l.f3M)(l.HDt),qe=ze.add();return ge(oe,ue).pipe((0,Te.x)(()=>ze.remove(qe)))}}let an=(()=>{class ge extends fe{constructor(ue,ze){super(),this.backend=ue,this.injector=ze,this.chain=null,this.pendingTasks=(0,l.f3M)(l.HDt)}handle(ue){if(null===this.chain){const qe=Array.from(new Set([...this.injector.get(kt),...this.injector.get(mn,[])]));this.chain=qe.reduceRight((st,rt)=>function cn(ge,oe,ue){return(ze,qe)=>ue.runInContext(()=>oe(ze,st=>ge(st,qe)))}(st,rt,this.injector),ei)}const ze=this.pendingTasks.add();return this.chain(ue,qe=>this.backend.handle(qe)).pipe((0,Te.x)(()=>this.pendingTasks.remove(ze)))}static#e=this.\u0275fac=function(ze){return new(ze||ge)(l.LFG(ye),l.LFG(l.lqb))};static#t=this.\u0275prov=l.Yz7({token:ge,factory:ge.\u0275fac})}return ge})();const pr=/^\)\]\}',?\n/;let bt=(()=>{class ge{constructor(ue){this.xhrFactory=ue}handle(ue){if("JSONP"===ue.method)throw new l.vHH(-2800,!1);const ze=this.xhrFactory;return(ze.\u0275loadImpl?(0,de.D)(ze.\u0275loadImpl()):(0,k.of)(null)).pipe((0,be.w)(()=>new re.y(st=>{const rt=ze.build();if(rt.open(ue.method,ue.urlWithParams),ue.withCredentials&&(rt.withCredentials=!0),ue.headers.forEach((Wt,dn)=>rt.setRequestHeader(Wt,dn.join(","))),ue.headers.has("Accept")||rt.setRequestHeader("Accept","application/json, text/plain, */*"),!ue.headers.has("Content-Type")){const Wt=ue.detectContentTypeHeader();null!==Wt&&rt.setRequestHeader("Content-Type",Wt)}if(ue.responseType){const Wt=ue.responseType.toLowerCase();rt.responseType="json"!==Wt?Wt:"text"}const Kt=ue.serializeBody();let ht=null;const En=()=>{if(null!==ht)return ht;const Wt=rt.statusText||"OK",dn=new Ve(rt.getAllResponseHeaders()),zi=function Ri(ge){return"responseURL"in ge&&ge.responseURL?ge.responseURL:/^X-Request-URL:/m.test(ge.getAllResponseHeaders())?ge.getResponseHeader("X-Request-URL"):null}(rt)||ue.url;return ht=new Bn({headers:dn,status:rt.status,statusText:Wt,url:zi}),ht},ui=()=>{let{headers:Wt,status:dn,statusText:zi,url:xr}=En(),Yn=null;204!==dn&&(Yn=typeof rt.response>"u"?rt.responseText:rt.response),0===dn&&(dn=Yn?200:0);let Wn=dn>=200&&dn<300;if("json"===ue.responseType&&"string"==typeof Yn){const Si=Yn;Yn=Yn.replace(pr,"");try{Yn=""!==Yn?JSON.parse(Yn):null}catch(Ti){Yn=Si,Wn&&(Wn=!1,Yn={error:Ti,text:Yn})}}Wn?(st.next(new Nt({body:Yn,headers:Wt,status:dn,statusText:zi,url:xr||void 0})),st.complete()):st.error(new Ar({error:Yn,headers:Wt,status:dn,statusText:zi,url:xr||void 0}))},wi=Wt=>{const{url:dn}=En(),zi=new Ar({error:Wt,status:rt.status||0,statusText:rt.statusText||"Unknown Error",url:dn||void 0});st.error(zi)};let Ei=!1;const Fn=Wt=>{Ei||(st.next(En()),Ei=!0);let dn={type:Vn.DownloadProgress,loaded:Wt.loaded};Wt.lengthComputable&&(dn.total=Wt.total),"text"===ue.responseType&&rt.responseText&&(dn.partialText=rt.responseText),st.next(dn)},xn=Wt=>{let dn={type:Vn.UploadProgress,loaded:Wt.loaded};Wt.lengthComputable&&(dn.total=Wt.total),st.next(dn)};return rt.addEventListener("load",ui),rt.addEventListener("error",wi),rt.addEventListener("timeout",wi),rt.addEventListener("abort",wi),ue.reportProgress&&(rt.addEventListener("progress",Fn),null!==Kt&&rt.upload&&rt.upload.addEventListener("progress",xn)),rt.send(Kt),st.next({type:Vn.Sent}),()=>{rt.removeEventListener("error",wi),rt.removeEventListener("abort",wi),rt.removeEventListener("load",ui),rt.removeEventListener("timeout",wi),ue.reportProgress&&(rt.removeEventListener("progress",Fn),null!==Kt&&rt.upload&&rt.upload.removeEventListener("progress",xn)),rt.readyState!==rt.DONE&&rt.abort()}})))}static#e=this.\u0275fac=function(ze){return new(ze||ge)(l.LFG(ae.JF))};static#t=this.\u0275prov=l.Yz7({token:ge,factory:ge.\u0275fac})}return ge})();const Un=new l.OlP("XSRF_ENABLED"),yt=new l.OlP("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),tn=new l.OlP("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class Dr{}let Nn=(()=>{class ge{constructor(ue,ze,qe){this.doc=ue,this.platform=ze,this.cookieName=qe,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const ue=this.doc.cookie||"";return ue!==this.lastCookieString&&(this.parseCount++,this.lastToken=(0,ae.Mx)(ue,this.cookieName),this.lastCookieString=ue),this.lastToken}static#e=this.\u0275fac=function(ze){return new(ze||ge)(l.LFG(ae.K0),l.LFG(l.Lbi),l.LFG(yt))};static#t=this.\u0275prov=l.Yz7({token:ge,factory:ge.\u0275fac})}return ge})();function qi(ge,oe){const ue=ge.url.toLowerCase();if(!(0,l.f3M)(Un)||"GET"===ge.method||"HEAD"===ge.method||ue.startsWith("http://")||ue.startsWith("https://"))return oe(ge);const ze=(0,l.f3M)(Dr).getToken(),qe=(0,l.f3M)(tn);return null!=ze&&!ge.headers.has(qe)&&(ge=ge.clone({headers:ge.headers.set(qe,ze)})),oe(ge)}var ni=function(ge){return ge[ge.Interceptors=0]="Interceptors",ge[ge.LegacyInterceptors=1]="LegacyInterceptors",ge[ge.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",ge[ge.NoXsrfProtection=3]="NoXsrfProtection",ge[ge.JsonpSupport=4]="JsonpSupport",ge[ge.RequestsMadeViaParent=5]="RequestsMadeViaParent",ge[ge.Fetch=6]="Fetch",ge}(ni||{});function vi(...ge){const oe=[xe,bt,an,{provide:fe,useExisting:an},{provide:ye,useExisting:bt},{provide:kt,useValue:qi,multi:!0},{provide:Un,useValue:!0},{provide:Dr,useClass:Nn}];for(const ue of ge)oe.push(...ue.\u0275providers);return(0,l.MR2)(oe)}const Mr=new l.OlP("LEGACY_INTERCEPTOR_FN");function Bi(){return function $n(ge,oe){return{\u0275kind:ge,\u0275providers:oe}}(ni.LegacyInterceptors,[{provide:Mr,useFactory:li},{provide:kt,useExisting:Mr,multi:!0}])}let pe=(()=>{class ge{static#e=this.\u0275fac=function(ze){return new(ze||ge)};static#t=this.\u0275mod=l.oAB({type:ge});static#n=this.\u0275inj=l.cJS({providers:[vi(Bi())]})}return ge})()},3714:(ct,De,L)=>{L.d(De,{$8M:()=>od,$WT:()=>os,$Z:()=>Qv,AFp:()=>yv,ALo:()=>io,AaK:()=>ye,AsE:()=>ug,BQk:()=>Sr,CHM:()=>rf,CRH:()=>Py,DdM:()=>aa,DyG:()=>ZC,EJc:()=>X1,EpF:()=>Yp,F$t:()=>Xl,F4k:()=>Ks,FYo:()=>Iv,FiY:()=>Nc,G48:()=>cw,Gf:()=>Oy,GfV:()=>Av,GkF:()=>Gp,Gpc:()=>He,HDt:()=>Tn,Hsn:()=>eh,Ikx:()=>Hs,JOm:()=>gd,Jf7:()=>jv,KtG:()=>sf,LFG:()=>Mt,LMc:()=>sI,LSH:()=>op,Lbi:()=>up,Lck:()=>N1,MAs:()=>V_,MGl:()=>th,MMx:()=>TD,MR2:()=>pv,NdJ:()=>Wp,Ojb:()=>bv,OlP:()=>yt,Oqu:()=>Ea,P3R:()=>hv,PXZ:()=>gC,Q6J:()=>jp,QGY:()=>Co,QbO:()=>jb,Qsj:()=>e0,R0b:()=>Tr,RDi:()=>pb,Rgc:()=>gc,SBq:()=>iu,Sil:()=>Hh,Suo:()=>Ry,TTD:()=>It,TgZ:()=>Jd,Tol:()=>tc,Udp:()=>ag,VKq:()=>zo,VuI:()=>iI,W1O:()=>VD,WFA:()=>Zp,XFs:()=>xt,Xpm:()=>$o,Xq5:()=>S_,Xts:()=>Ga,Y36:()=>jl,YKP:()=>py,YNc:()=>N_,Yjl:()=>Ts,Yz7:()=>Ut,Z0I:()=>an,ZZ4:()=>S,_Bn:()=>fy,_UZ:()=>Up,_Vd:()=>nu,_c5:()=>un,_uU:()=>US,aQg:()=>te,c2e:()=>tC,cJS:()=>mn,cg1:()=>js,d8E:()=>sa,dDg:()=>tm,dqk:()=>bt,eFA:()=>_C,eJc:()=>Fh,ekj:()=>ih,eoX:()=>nm,evT:()=>zv,f3M:()=>Ot,g9A:()=>Cv,h0i:()=>nl,hGG:()=>Xn,hij:()=>sh,iGM:()=>Nh,ifc:()=>rt,ip1:()=>Vu,jDz:()=>wg,kL8:()=>iD,lG2:()=>Or,lcZ:()=>bs,lnq:()=>ra,lqb:()=>Jo,lri:()=>Uh,n5z:()=>GC,oAB:()=>oo,oJD:()=>uv,oxw:()=>H_,qFp:()=>oI,qLn:()=>Da,qOj:()=>Pp,qZA:()=>Xd,rWj:()=>$h,rg0:()=>me,s9C:()=>qp,sBO:()=>uw,s_b:()=>_c,soG:()=>Bu,tb:()=>Yh,tp0:()=>Fc,uIk:()=>Np,vHH:()=>ne,vpe:()=>Vo,wAp:()=>So,xi3:()=>Th,xp6:()=>Wv,ynx:()=>wa,z2F:()=>bc,zSh:()=>gv,zW0:()=>__,zs3:()=>yo});var l=L(5992),k=L(5350),de=L(1145),re=L(3506),ce=L(8626),_e=L(287),ve=L(9853),Te=L(3318),be=L(8777);function ae(c){for(let h in c)if(c[h]===ae)return h;throw Error("Could not find renamed property on target object.")}function fe(c,h){for(const p in h)h.hasOwnProperty(p)&&!c.hasOwnProperty(p)&&(c[p]=h[p])}function ye(c){if("string"==typeof c)return c;if(Array.isArray(c))return"["+c.map(ye).join(", ")+"]";if(null==c)return""+c;if(c.overriddenName)return`${c.overriddenName}`;if(c.name)return`${c.name}`;const h=c.toString();if(null==h)return""+h;const p=h.indexOf("\n");return-1===p?h:h.substring(0,p)}function Ve(c,h){return null==c||""===c?null===h?"":h:null==h||""===h?c:c+" "+h}const ke=ae({__forward_ref__:ae});function He(c){return c.__forward_ref__=He,c.toString=function(){return ye(this())},c}function Le(c){return Re(c)?c():c}function Re(c){return"function"==typeof c&&c.hasOwnProperty(ke)&&c.__forward_ref__===He}function at(c){return c&&!!c.\u0275providers}const ut="https://g.co/ng/security#xss";class ne extends Error{constructor(h,p){super(function Pe(c,h){return`NG0${Math.abs(c)}${h?": "+h:""}`}(h,p)),this.code=h}}function Me(c){return"string"==typeof c?c:null==c?"":String(c)}function mt(c,h){throw new ne(-201,!1)}function _t(c,h){null==c&&function ot(c,h,p,m){throw new Error(`ASSERTION ERROR: ${c}`+(null==m?"":` [Expected=> ${p} ${m} ${h} <=Actual]`))}(h,c,null,"!=")}function Ut(c){return{token:c.token,providedIn:c.providedIn||null,factory:c.factory,value:void 0}}function mn(c){return{providers:c.providers||[],imports:c.imports||[]}}function li(c){return Li(c,fr)||Li(c,ir)}function an(c){return null!==li(c)}function Li(c,h){return c.hasOwnProperty(h)?c[h]:null}function xi(c){return c&&(c.hasOwnProperty(nr)||c.hasOwnProperty(Oi))?c[nr]:null}const fr=ae({\u0275prov:ae}),nr=ae({\u0275inj:ae}),ir=ae({ngInjectableDef:ae}),Oi=ae({ngInjectorDef:ae});var xt=function(c){return c[c.Default=0]="Default",c[c.Host=1]="Host",c[c.Self=2]="Self",c[c.SkipSelf=4]="SkipSelf",c[c.Optional=8]="Optional",c}(xt||{});let en;function ci(c){const h=en;return en=c,h}function pr(c,h,p){const m=li(c);return m&&"root"==m.providedIn?void 0===m.value?m.value=m.factory():m.value:p&xt.Optional?null:void 0!==h?h:void mt(ye(c))}const bt=globalThis;class yt{constructor(h,p){this._desc=h,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof p?this.__NG_ELEMENT_ID__=p:void 0!==p&&(this.\u0275prov=Ut({token:this,providedIn:p.providedIn||"root",factory:p.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}const Bi={},Pi="__NG_DI_FLAG__",Hi="ngTempTokenPath",Be=/\n/gm,ie="__source";let pe;function lt(c){const h=pe;return pe=c,h}function Et(c,h=xt.Default){if(void 0===pe)throw new ne(-203,!1);return null===pe?pr(c,void 0,h):pe.get(c,h&xt.Optional?null:void 0,h)}function Mt(c,h=xt.Default){return(function qt(){return en}()||Et)(Le(c),h)}function Ot(c,h=xt.Default){return Mt(c,Gn(h))}function Gn(c){return typeof c>"u"||"number"==typeof c?c:0|(c.optional&&8)|(c.host&&1)|(c.self&&2)|(c.skipSelf&&4)}function ji(c){const h=[];for(let p=0;ph){C=y-1;break}}}for(;yy?"":v[X+1].toLowerCase();const Se=8&m?he:null;if(Se&&-1!==dn(Se,B,0)||2&m&&B!==he){if(hn(m))return!1;C=!0}}}}else{if(!C&&!hn(m)&&!hn(M))return!1;if(C&&hn(M))continue;C=!1,m=M|1&m}}return hn(m)||C}function hn(c){return 0==(1&c)}function $s(c,h,p,m){if(null===h)return-1;let v=0;if(m||!p){let y=!1;for(;v-1)for(p++;p0?'="'+T+'"':"")+"]"}else 8&m?v+="."+C:4&m&&(v+=" "+C);else""!==v&&!hn(C)&&(h+=Io(y,v),v=""),m=C,y=y||!hn(m);p++}return""!==v&&(h+=Io(y,v)),h}function $o(c){return qe(()=>{const h=Wr(c),p={...h,decls:c.decls,vars:c.vars,template:c.template,consts:c.consts||null,ngContentSelectors:c.ngContentSelectors,onPush:c.changeDetection===st.OnPush,directiveDefs:null,pipeDefs:null,dependencies:h.standalone&&c.dependencies||null,getStandaloneInjector:null,signals:c.signals??!1,data:c.data||{},encapsulation:c.encapsulation||rt.Emulated,styles:c.styles||ht,_:null,schemas:c.schemas||null,tView:null,id:""};Ui(p);const m=c.dependencies;return p.directiveDefs=as(m,!1),p.pipeDefs=as(m,!0),p.id=function Is(c){let h=0;const p=[c.selectors,c.ngContentSelectors,c.hostVars,c.hostAttrs,c.consts,c.vars,c.decls,c.encapsulation,c.standalone,c.signals,c.exportAs,JSON.stringify(c.inputs),JSON.stringify(c.outputs),Object.getOwnPropertyNames(c.type.prototype),!!c.contentQueries,!!c.viewQuery].join("|");for(const v of p)h=Math.imul(31,h)+v.charCodeAt(0)<<0;return h+=2147483648,"c"+h}(p),p})}function Es(c){return Zt(c)||In(c)}function Di(c){return null!==c}function oo(c){return qe(()=>({type:c.type,bootstrap:c.bootstrap||ht,declarations:c.declarations||ht,imports:c.imports||ht,exports:c.exports||ht,transitiveCompileScopes:null,schemas:c.schemas||null,id:c.id||null}))}function wr(c,h){if(null==c)return Kt;const p={};for(const m in c)if(c.hasOwnProperty(m)){let v=c[m],y=v;Array.isArray(v)&&(y=v[1],v=v[0]),p[v]=m,h&&(h[v]=y)}return p}function Or(c){return qe(()=>{const h=Wr(c);return Ui(h),h})}function Ts(c){return{type:c.type,name:c.name,factory:null,pure:!1!==c.pure,standalone:!0===c.standalone,onDestroy:c.type.prototype.ngOnDestroy||null}}function Zt(c){return c[En]||null}function In(c){return c[ui]||null}function Hn(c){return c[wi]||null}function os(c){const h=Zt(c)||In(c)||Hn(c);return null!==h&&h.standalone}function _i(c,h){const p=c[Ei]||null;if(!p&&!0===h)throw new Error(`Type ${ye(c)} does not have '\u0275mod' property.`);return p}function Wr(c){const h={};return{type:c.type,providersResolver:null,factory:null,hostBindings:c.hostBindings||null,hostVars:c.hostVars||0,hostAttrs:c.hostAttrs||null,contentQueries:c.contentQueries||null,declaredInputs:h,inputTransforms:null,inputConfig:c.inputs||Kt,exportAs:c.exportAs||null,standalone:!0===c.standalone,signals:!0===c.signals,selectors:c.selectors||ht,viewQuery:c.viewQuery||null,features:c.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:wr(c.inputs,h),outputs:wr(c.outputs)}}function Ui(c){c.features?.forEach(h=>h(c))}function as(c,h){if(!c)return null;const p=h?Hn:Es;return()=>("function"==typeof c?c():c).map(m=>p(m)).filter(Di)}const On=0,dt=1,Ht=2,_n=3,fi=4,Rr=5,ri=6,mr=7,yn=8,Qr=9,vr=10,Ft=11,As=12,ls=13,qr=14,wn=15,Gs=16,Er=17,$i=18,Kr=19,Ra=20,cs=21,_r=22,us=23,Ys=24,zt=25,or=1,Jr=2,jn=7,ar=9,Zn=11;function Qn(c){return Array.isArray(c)&&"object"==typeof c[or]}function pi(c){return Array.isArray(c)&&!0===c[or]}function Ms(c){return 0!=(4&c.flags)}function et(c){return c.componentOffset>-1}function fn(c){return 1==(1&c.flags)}function qn(c){return!!c.template}function ki(c){return 0!=(512&c[Ht])}function Os(c,h){return c.hasOwnProperty(Fn)?c[Fn]:null}let Ni=null,ts=!1;function Ji(c){const h=Ni;return Ni=c,h}const Yo={version:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{}};function ka(c){if(!ho(c)||c.dirty){if(!c.producerMustRecompute(c)&&!pl(c))return void(c.dirty=!1);c.producerRecomputeValue(c),c.dirty=!1}}function Wo(c){c.dirty=!0,function Zs(c){if(void 0===c.liveConsumerNode)return;const h=ts;ts=!0;try{for(const p of c.liveConsumerNode)p.dirty||Wo(p)}finally{ts=h}}(c),c.consumerMarkedDirty?.(c)}function fa(c){return c&&(c.nextProducerIndex=0),Ji(c)}function Na(c,h){if(Ji(h),c&&void 0!==c.producerNode&&void 0!==c.producerIndexOfThis&&void 0!==c.producerLastReadVersion){if(ho(c))for(let p=c.nextProducerIndex;pc.nextProducerIndex;)c.producerNode.pop(),c.producerLastReadVersion.pop(),c.producerIndexOfThis.pop()}}function pl(c){Po(c);for(let h=0;h0}function Po(c){c.producerNode??=[],c.producerIndexOfThis??=[],c.producerLastReadVersion??=[]}let U=null;function me(c){const h=Ji(null);try{return c()}finally{Ji(h)}}const Ue=()=>{},ft=(()=>({...Yo,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:c=>{c.schedule(c.ref)},hasRun:!1,cleanupFn:Ue}))();class Vt{constructor(h,p,m){this.previousValue=h,this.currentValue=p,this.firstChange=m}isFirstChange(){return this.firstChange}}function It(){return ln}function ln(c){return c.type.prototype.ngOnChanges&&(c.setInput=Rn),Yt}function Yt(){const c=zn(this),h=c?.current;if(h){const p=c.previous;if(p===Kt)c.previous=h;else for(let m in h)p[m]=h[m];c.current=null,this.ngOnChanges(h)}}function Rn(c,h,p,m){const v=this.declaredInputs[p],y=zn(c)||function Ai(c,h){return c[Ii]=h}(c,{previous:Kt,current:null}),C=y.current||(y.current={}),T=y.previous,M=T[v];C[v]=new Vt(M&&M.currentValue,h,T===Kt),c[m]=h}It.ngInherit=!0;const Ii="__ngSimpleChanges__";function zn(c){return c[Ii]||null}const Fi=function(c,h,p){};function on(c){for(;Array.isArray(c);)c=c[On];return c}function Ct(c,h){return on(h[c])}function vt(c,h){return on(h[c.index])}function vn(c,h){return c.data[h]}function oi(c,h){return c[h]}function yi(c,h){const p=h[c];return Qn(p)?p:p[On]}function hs(c,h){return null==h?null:c[h]}function Qu(c){c[Er]=0}function er(c){1024&c[Ht]||(c[Ht]|=1024,Nr(c,1))}function ur(c){1024&c[Ht]&&(c[Ht]&=-1025,Nr(c,-1))}function Nr(c,h){let p=c[_n];if(null===p)return;p[Rr]+=h;let m=p;for(p=p[_n];null!==p&&(1===h&&1===m[Rr]||-1===h&&0===m[Rr]);)p[Rr]+=h,m=p,p=p[_n]}const Gt={lFrame:Dn(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function mm(){return Gt.bindingsEnabled}function pa(){return null!==Gt.skipHydrationRootTNode}function Ze(){return Gt.lFrame.lView}function Cn(){return Gt.lFrame.tView}function rf(c){return Gt.lFrame.contextLView=c,c[yn]}function sf(c){return Gt.lFrame.contextLView=null,c}function yr(){let c=af();for(;null!==c&&64===c.type;)c=c.parent;return c}function af(){return Gt.lFrame.currentTNode}function go(c,h){const p=Gt.lFrame;p.currentTNode=c,p.isParent=h}function Ju(){return Gt.lFrame.isParent}function Xu(){Gt.lFrame.isParent=!1}function is(){const c=Gt.lFrame;let h=c.bindingRootIndex;return-1===h&&(h=c.bindingRootIndex=c.tView.bindingStartIndex),h}function Zo(){return Gt.lFrame.bindingIndex}function yl(){return Gt.lFrame.bindingIndex++}function Qo(c){const h=Gt.lFrame,p=h.bindingIndex;return h.bindingIndex=h.bindingIndex+c,p}function w(c,h){const p=Gt.lFrame;p.bindingIndex=p.bindingRootIndex=c,H(h)}function H(c){Gt.lFrame.currentDirectiveIndex=c}function Q(c){const h=Gt.lFrame.currentDirectiveIndex;return-1===h?null:c[h]}function ee(){return Gt.lFrame.currentQueryIndex}function Ae(c){Gt.lFrame.currentQueryIndex=c}function Ie(c){const h=c[dt];return 2===h.type?h.declTNode:1===h.type?c[ri]:null}function pt(c,h,p){if(p&xt.SkipSelf){let v=h,y=c;for(;!(v=v.parent,null!==v||p&xt.Host||(v=Ie(y),null===v||(y=y[qr],10&v.type))););if(null===v)return!1;h=v,c=y}const m=Gt.lFrame=Jn();return m.currentTNode=h,m.lView=c,!0}function Qt(c){const h=Jn(),p=c[dt];Gt.lFrame=h,h.currentTNode=p.firstChild,h.lView=c,h.tView=p,h.contextLView=c,h.bindingIndex=p.bindingStartIndex,h.inI18n=!1}function Jn(){const c=Gt.lFrame,h=null===c?null:c.child;return null===h?Dn(c):h}function Dn(c){const h={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:c,child:null,inI18n:!1};return null!==c&&(c.child=h),h}function mo(){const c=Gt.lFrame;return Gt.lFrame=c.parent,c.currentTNode=null,c.lView=null,c}const Ba=mo;function ga(){const c=mo();c.isParent=!0,c.tView=null,c.selectedIndex=-1,c.contextLView=null,c.elementDepthCount=0,c.currentDirectiveIndex=-1,c.currentNamespace=null,c.bindingRootIndex=-1,c.bindingIndex=-1,c.currentQueryIndex=0}function gi(){return Gt.lFrame.selectedIndex}function ma(c){Gt.lFrame.selectedIndex=c}function Mi(){const c=Gt.lFrame;return vn(c.tView,c.selectedIndex)}let PC=!0;function uf(){return PC}function qo(c){PC=c}function ed(c,h){for(let p=h.directiveStart,m=h.directiveEnd;p=m)break}else h[M]<0&&(c[Er]+=65536),(T>13>16&&(3&c[Ht])===h&&(c[Ht]+=8192,NC(T,y)):NC(T,y)}const Tc=-1;class nd{constructor(h,p,m){this.factory=h,this.resolving=!1,this.canSeeViewProviders=p,this.injectImpl=m}}function ff(c){return c!==Tc}function Cl(c){return 32767&c}function Ic(c,h){let p=function Sm(c){return c>>16}(c),m=h;for(;p>0;)m=m[qr],p--;return m}let pf=!0;function id(c){const h=pf;return pf=c,h}const Dm=255,gf=5;let Aw=0;const Ko={};function mf(c,h){const p=Em(c,h);if(-1!==p)return p;const m=h[dt];m.firstCreatePass&&(c.injectorIndex=h.length,wm(m.data,c),wm(h,null),wm(m.blueprint,null));const v=rd(c,h),y=c.injectorIndex;if(ff(v)){const C=Cl(v),T=Ic(v,h),M=T[dt].data;for(let B=0;B<8;B++)h[y+B]=T[C+B]|M[C+B]}return h[y+8]=v,y}function wm(c,h){c.push(0,0,0,0,0,0,0,0,h)}function Em(c,h){return-1===c.injectorIndex||c.parent&&c.parent.injectorIndex===c.injectorIndex||null===h[c.injectorIndex+8]?-1:c.injectorIndex}function rd(c,h){if(c.parent&&-1!==c.parent.injectorIndex)return c.parent.injectorIndex;let p=0,m=null,v=h;for(;null!==v;){if(m=YC(v),null===m)return Tc;if(p++,v=v[qr],-1!==m.injectorIndex)return m.injectorIndex|p<<16}return Tc}function Tm(c,h,p){!function Mw(c,h,p){let m;"string"==typeof p?m=p.charCodeAt(0)||0:p.hasOwnProperty(xn)&&(m=p[xn]),null==m&&(m=p[xn]=Aw++);const v=m&Dm;h.data[c+(v>>gf)]|=1<=0?h&Dm:Pw:h}(p);if("function"==typeof y){if(!pt(h,c,m))return m&xt.Host?VC(v,0,m):BC(h,p,m,v);try{let C;if(C=y(m),null!=C||m&xt.Optional)return C;mt()}finally{Ba()}}else if("number"==typeof y){let C=null,T=Em(c,h),M=Tc,B=m&xt.Host?h[wn][ri]:null;for((-1===T||m&xt.SkipSelf)&&(M=-1===T?rd(c,h):h[T+8],M!==Tc&&$C(m,!1)?(C=h[dt],T=Cl(M),h=Ic(M,h)):T=-1);-1!==T;){const W=h[dt];if(UC(y,T,W.data)){const X=zC(T,h,p,C,m,B);if(X!==Ko)return X}M=h[T+8],M!==Tc&&$C(m,h[dt].data[T+8]===B)&&UC(y,T,h)?(C=W,T=Cl(M),h=Ic(M,h)):T=-1}}return v}function zC(c,h,p,m,v,y){const C=h[dt],T=C.data[c+8],W=vf(T,C,p,null==m?et(T)&&pf:m!=C&&0!=(3&T.type),v&xt.Host&&y===T);return null!==W?bl(h,C,W,T):Ko}function vf(c,h,p,m,v){const y=c.providerIndexes,C=h.data,T=1048575&y,M=c.directiveStart,W=y>>20,he=v?T+W:c.directiveEnd;for(let Se=m?T:T+W;Se=M&&je.type===p)return Se}if(v){const Se=C[M];if(Se&&qn(Se)&&Se.type===p)return M}return null}function bl(c,h,p,m){let v=c[p];const y=h.data;if(function Sw(c){return c instanceof nd}(v)){const C=v;C.resolving&&function it(c,h){const p=h?`. Dependency path: ${h.join(" > ")} > ${c}`:"";throw new ne(-200,`Circular dependency in DI detected for ${c}${p}`)}(function nt(c){return"function"==typeof c?c.name||c.toString():"object"==typeof c&&null!=c&&"function"==typeof c.type?c.type.name||c.type.toString():Me(c)}(y[p]));const T=id(C.canSeeViewProviders);C.resolving=!0;const B=C.injectImpl?ci(C.injectImpl):null;pt(c,m,xt.Default);try{v=c[p]=C.factory(void 0,y,c,m),h.firstCreatePass&&p>=m.directiveStart&&function Cw(c,h,p){const{ngOnChanges:m,ngOnInit:v,ngDoCheck:y}=h.type.prototype;if(m){const C=ln(h);(p.preOrderHooks??=[]).push(c,C),(p.preOrderCheckHooks??=[]).push(c,C)}v&&(p.preOrderHooks??=[]).push(0-c,v),y&&((p.preOrderHooks??=[]).push(c,y),(p.preOrderCheckHooks??=[]).push(c,y))}(p,y[p],h)}finally{null!==B&&ci(B),id(T),C.resolving=!1,Ba()}}return v}function UC(c,h,p){return!!(p[h+(c>>gf)]&1<{const h=c.prototype.constructor,p=h[Fn]||Im(h),m=Object.prototype;let v=Object.getPrototypeOf(c.prototype).constructor;for(;v&&v!==m;){const y=v[Fn]||Im(v);if(y&&y!==p)return y;v=Object.getPrototypeOf(v)}return y=>new y})}function Im(c){return Re(c)?()=>{const h=Im(Le(c));return h&&h()}:Os(c)}function YC(c){const h=c[dt],p=h.type;return 2===p?h.declTNode:1===p?c[ri]:null}function od(c){return function xw(c,h){if("class"===h)return c.classes;if("style"===h)return c.styles;const p=c.attrs;if(p){const m=p.length;let v=0;for(;v{const m=function Am(c){return function(...p){if(c){const m=c(...p);for(const v in m)this[v]=m[v]}}}(h);function v(...y){if(this instanceof v)return m.apply(this,y),this;const C=new v(...y);return T.annotation=C,T;function T(M,B,W){const X=M.hasOwnProperty(ja)?M[ja]:Object.defineProperty(M,ja,{value:[]})[ja];for(;X.length<=W;)X.push(null);return(X[W]=X[W]||[]).push(C),M}}return p&&(v.prototype=Object.create(p.prototype)),v.prototype.ngMetadataName=c,v.annotationCls=v,v})}const ZC=Function;function Oc(c,h){c.forEach(p=>Array.isArray(p)?Oc(p,h):h(p))}function QC(c,h,p){h>=c.length?c.push(p):c.splice(h,0,p)}function va(c,h){return h>=c.length-1?c.pop():c.splice(h,1)[0]}function Rc(c,h){const p=[];for(let m=0;m=0?c[1|m]=p:(m=~m,function KC(c,h,p,m){let v=c.length;if(v==h)c.push(p,m);else if(1===v)c.push(m,c[0]),c[0]=p;else{for(v--,c.push(c[v-1],c[v]);v>h;)c[v]=c[v-2],v--;c[h]=p,c[h+1]=m}}(c,m,h,p)),m}function Mm(c,h){const p=Pc(c,h);if(p>=0)return c[1|p]}function Pc(c,h){return function za(c,h,p){let m=0,v=c.length>>p;for(;v!==m;){const y=m+(v-m>>1),C=c[y<h?v=y:m=y+1}return~(v<|^->||--!>|)/g,Ci="\u200b$1\u200b";const Of=new Map;let $m=0;const Nf="__ngContext__";function br(c,h){Qn(h)?(c[Nf]=h[Kr],function Ym(c){Of.set(c[Kr],c)}(h)):c[Nf]=h}let Ca;function zc(c,h){return Ca(c,h)}function ko(c){const h=c[_n];return pi(h)?h[_n]:h}function No(c){return Zm(c[As])}function Sd(c){return Zm(c[fi])}function Zm(c){for(;null!==c&&!pi(c);)c=c[fi];return c}function Qs(c,h,p,m,v){if(null!=m){let y,C=!1;pi(m)?y=m:Qn(m)&&(C=!0,m=m[On]);const T=on(m);0===c&&null!==p?null==v?Yf(h,p,T):Ps(h,p,T,v||null,!0):1===c&&null!==p?Ps(h,p,T,v||null,!0):2===c?function xl(c,h,p){const m=Zc(c,h);m&&function Wc(c,h,p,m){c.removeChild(h,p,m)}(c,m,h,p)}(h,T,C):3===c&&h.destroyNode(T),null!=y&&function hb(c,h,p,m,v){const y=p[jn];y!==on(p)&&Qs(h,c,m,y,v);for(let T=Zn;Th.replace(Um,Ci))}(h))}function Uc(c,h,p){return c.createElement(h,p)}function $f(c,h){const p=c[ar],m=p.indexOf(h);ur(h),p.splice(m,1)}function Gc(c,h){if(c.length<=Zn)return;const p=Zn+h,m=c[p];if(m){const v=m[Gs];null!==v&&v!==c&&$f(v,m),h>0&&(c[p-1][fi]=m[fi]);const y=va(c,Zn+h);!function Uf(c,h){Fo(c,h,h[Ft],2,null,null),h[On]=null,h[ri]=null}(m[dt],m);const C=y[$i];null!==C&&C.detachView(y[dt]),m[_n]=null,m[fi]=null,m[Ht]&=-129}return m}function wd(c,h){if(!(256&h[Ht])){const p=h[Ft];h[us]&&gl(h[us]),h[Ys]&&gl(h[Ys]),p.destroyNode&&Fo(c,h,p,3,null,null),function qm(c){let h=c[As];if(!h)return Yc(c[dt],c);for(;h;){let p=null;if(Qn(h))p=h[As];else{const m=h[Zn];m&&(p=m)}if(!p){for(;h&&!h[fi]&&h!==c;)Qn(h)&&Yc(h[dt],h),h=h[_n];null===h&&(h=c),Qn(h)&&Yc(h[dt],h),p=h&&h[fi]}h=p}}(h)}}function Yc(c,h){if(!(256&h[Ht])){h[Ht]&=-129,h[Ht]|=256,function Tl(c,h){let p;if(null!=c&&null!=(p=c.destroyHooks))for(let m=0;m=0?m[C]():m[-C].unsubscribe(),y+=2}else p[y].call(m[p[y+1]]);null!==m&&(h[mr]=null);const v=h[cs];if(null!==v){h[cs]=null;for(let y=0;y-1){const{encapsulation:y}=c.data[m.directiveStart+v];if(y===rt.None||y===rt.Emulated)return null}return vt(m,p)}}(c,h.parent,p)}function Ps(c,h,p,m,v){c.insertBefore(h,p,m,v)}function Yf(c,h,p){c.appendChild(h,p)}function Wf(c,h,p,m,v){null!==m?Ps(c,h,p,m,v):Yf(c,h,p)}function Zc(c,h){return c.parentNode(h)}function Ml(c,h,p){return Jm(c,h,p)}let Ed,Kf,iv,qc,Jm=function Zf(c,h,p){return 40&c.type?vt(c,p):null};function Qc(c,h,p,m){const v=Gi(c,m,h),y=h[Ft],T=Ml(m.parent||h[ri],m,h);if(null!=v)if(Array.isArray(p))for(let M=0;Mc,createScript:c=>c,createScriptURL:c=>c})}catch{}return Kf}()?.createHTML(c)||c}function pb(c){iv=c}function Rl(){if(void 0!==iv)return iv;if(typeof document<"u")return document;throw new ne(210,!1)}function rv(){if(void 0===qc&&(qc=null,bt.trustedTypes))try{qc=bt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:c=>c,createScript:c=>c,createScriptURL:c=>c})}catch{}return qc}function gb(c){return rv()?.createHTML(c)||c}function ep(c){return rv()?.createScriptURL(c)||c}class vb{constructor(h){this.changingThisBreaksApplicationSecurity=h}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${ut})`}}function $a(c){return c instanceof vb?c.changingThisBreaksApplicationSecurity:c}function Pl(c,h){const p=function Cb(c){return c instanceof vb&&c.getTypeName()||null}(c);if(null!=p&&p!==h){if("ResourceURL"===p&&"URL"===h)return!0;throw new Error(`Required a safe ${h}, got a ${p} (see ${ut})`)}return p===h}class iE{constructor(h){this.inertDocumentHelper=h}getInertBodyElement(h){h=""+h;try{const p=(new window.DOMParser).parseFromString(Ol(h),"text/html").body;return null===p?this.inertDocumentHelper.getInertBodyElement(h):(p.removeChild(p.firstChild),p)}catch{return null}}}class Sb{constructor(h){this.defaultDoc=h,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(h){const p=this.inertDocument.createElement("template");return p.innerHTML=Ol(h),p}}const sE=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function sv(c){return(c=String(c)).match(sE)?c:"unsafe:"+c}function Sa(c){const h={};for(const p of c.split(","))h[p]=!0;return h}function Md(...c){const h={};for(const p of c)for(const m in p)p.hasOwnProperty(m)&&(h[m]=!0);return h}const ov=Sa("area,br,col,hr,img,wbr"),tp=Sa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),av=Sa("rp,rt"),lv=Md(ov,Md(tp,Sa("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Md(av,Sa("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Md(av,tp)),np=Sa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),ip=Md(np,Sa("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Sa("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),lE=Sa("script,style,template");class Lo{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(h){let p=h.firstChild,m=!0;for(;p;)if(p.nodeType===Node.ELEMENT_NODE?m=this.startElement(p):p.nodeType===Node.TEXT_NODE?this.chars(p.nodeValue):this.sanitizedSomething=!0,m&&p.firstChild)p=p.firstChild;else for(;p;){p.nodeType===Node.ELEMENT_NODE&&this.endElement(p);let v=this.checkClobberedElement(p,p.nextSibling);if(v){p=v;break}p=this.checkClobberedElement(p,p.parentNode)}return this.buf.join("")}startElement(h){const p=h.nodeName.toLowerCase();if(!lv.hasOwnProperty(p))return this.sanitizedSomething=!0,!lE.hasOwnProperty(p);this.buf.push("<"),this.buf.push(p);const m=h.attributes;for(let v=0;v"),!0}endElement(h){const p=h.nodeName.toLowerCase();lv.hasOwnProperty(p)&&!ov.hasOwnProperty(p)&&(this.buf.push(""))}chars(h){this.buf.push(cv(h))}checkClobberedElement(h,p){if(p&&(h.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${h.outerHTML}`);return p}}const wb=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Eb=/([^\#-~ |!])/g;function cv(c){return c.replace(/&/g,"&").replace(wb,function(h){return"&#"+(1024*(h.charCodeAt(0)-55296)+(h.charCodeAt(1)-56320)+65536)+";"}).replace(Eb,function(h){return"&#"+h.charCodeAt(0)+";"}).replace(//g,">")}let xd;function sp(c){return"content"in c&&function Tb(c){return c.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===c.nodeName}(c)?c.content:null}var Lr=function(c){return c[c.NONE=0]="NONE",c[c.HTML=1]="HTML",c[c.STYLE=2]="STYLE",c[c.SCRIPT=3]="SCRIPT",c[c.URL=4]="URL",c[c.RESOURCE_URL=5]="RESOURCE_URL",c}(Lr||{});function uv(c){const h=Kc();return h?gb(h.sanitize(Lr.HTML,c)||""):Pl(c,"HTML")?gb($a(c)):function rp(c,h){let p=null;try{xd=xd||function bb(c){const h=new Sb(c);return function rE(){try{return!!(new window.DOMParser).parseFromString(Ol(""),"text/html")}catch{return!1}}()?new iE(h):h}(c);let m=h?String(h):"";p=xd.getInertBodyElement(m);let v=5,y=m;do{if(0===v)throw new Error("Failed to sanitize html because the input is unstable");v--,m=y,y=p.innerHTML,p=xd.getInertBodyElement(m)}while(m!==y);return Ol((new Lo).sanitizeChildren(sp(p)||p))}finally{if(p){const m=sp(p)||p;for(;m.firstChild;)m.removeChild(m.firstChild)}}}(Rl(),Me(c))}function op(c){const h=Kc();return h?h.sanitize(Lr.URL,c)||"":Pl(c,"URL")?$a(c):sv(Me(c))}function dv(c){const h=Kc();if(h)return ep(h.sanitize(Lr.RESOURCE_URL,c)||"");if(Pl(c,"ResourceURL"))return ep($a(c));throw new ne(904,!1)}function hv(c,h,p){return function Ob(c,h){return"src"===h&&("embed"===c||"frame"===c||"iframe"===c||"media"===c||"script"===c)||"href"===h&&("base"===c||"link"===c)?dv:op}(h,p)(c)}function Kc(){const c=Ze();return c&&c[vr].sanitizer}const Ga=new yt("ENVIRONMENT_INITIALIZER"),ap=new yt("INJECTOR",-1),Rb=new yt("INJECTOR_DEF_TYPES");class fv{get(h,p=Bi){if(p===Bi){const m=new Error(`NullInjectorError: No provider for ${ye(h)}!`);throw m.name="NullInjectorError",m}return p}}function pv(c){return{\u0275providers:c}}function Pb(...c){return{\u0275providers:kb(0,c),\u0275fromNgModule:!0}}function kb(c,...h){const p=[],m=new Set;let v;const y=C=>{p.push(C)};return Oc(h,C=>{const T=C;Rd(T,y,[],m)&&(v||=[],v.push(T))}),void 0!==v&&Od(v,y),p}function Od(c,h){for(let p=0;p{h(y,m)})}}function Rd(c,h,p,m){if(!(c=Le(c)))return!1;let v=null,y=xi(c);const C=!y&&Zt(c);if(y||C){if(C&&!C.standalone)return!1;v=c}else{const M=c.ngModule;if(y=xi(M),!y)return!1;v=M}const T=m.has(v);if(C){if(T)return!1;if(m.add(v),C.dependencies){const M="function"==typeof C.dependencies?C.dependencies():C.dependencies;for(const B of M)Rd(B,h,p,m)}}else{if(!y)return!1;{if(null!=y.imports&&!T){let B;m.add(v);try{Oc(y.imports,W=>{Rd(W,h,p,m)&&(B||=[],B.push(W))})}finally{}void 0!==B&&Od(B,h)}if(!T){const B=Os(v)||(()=>new v);h({provide:v,useFactory:B,deps:ht},v),h({provide:Rb,useValue:v,multi:!0},v),h({provide:Ga,useValue:()=>Mt(v),multi:!0},v)}const M=y.providers;if(null!=M&&!T){const B=c;Jc(M,W=>{h(W,B)})}}}return v!==c&&void 0!==c.providers}function Jc(c,h){for(let p of c)at(p)&&(p=p.\u0275providers),Array.isArray(p)?Jc(p,h):h(p)}const hE=ae({provide:String,useValue:ae});function lp(c){return null!==c&&"object"==typeof c&&hE in c}function Ya(c){return"function"==typeof c}const gv=new yt("Set Injector scope."),ks={},fE={};let mv;function Pd(){return void 0===mv&&(mv=new fv),mv}class Jo{}class Xc extends Jo{get destroyed(){return this._destroyed}constructor(h,p,m,v){super(),this.parent=p,this.source=m,this.scopes=v,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Xo(h,C=>this.processProvider(C)),this.records.set(ap,kl(void 0,this)),v.has("environment")&&this.records.set(Jo,kl(void 0,this));const y=this.records.get(gv);null!=y&&"string"==typeof y.value&&this.scopes.add(y.value),this.injectorDefTypes=new Set(this.get(Rb.multi,ht,xt.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const p of this._ngOnDestroyHooks)p.ngOnDestroy();const h=this._onDestroyHooks;this._onDestroyHooks=[];for(const p of h)p()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear()}}onDestroy(h){return this.assertNotDestroyed(),this._onDestroyHooks.push(h),()=>this.removeOnDestroy(h)}runInContext(h){this.assertNotDestroyed();const p=lt(this),m=ci(void 0);try{return h()}finally{lt(p),ci(m)}}get(h,p=Bi,m=xt.Default){if(this.assertNotDestroyed(),h.hasOwnProperty(Wt))return h[Wt](this);m=Gn(m);const y=lt(this),C=ci(void 0);try{if(!(m&xt.SkipSelf)){let M=this.records.get(h);if(void 0===M){const B=function kd(c){return"function"==typeof c||"object"==typeof c&&c instanceof yt}(h)&&li(h);M=B&&this.injectableDefInScope(B)?kl(vv(h),ks):null,this.records.set(h,M)}if(null!=M)return this.hydrate(h,M)}return(m&xt.Self?Pd():this.parent).get(h,p=m&xt.Optional&&p===Bi?null:p)}catch(T){if("NullInjectorError"===T.name){if((T[Hi]=T[Hi]||[]).unshift(ye(h)),y)throw T;return function ue(c,h,p,m){const v=c[Hi];throw h[ie]&&v.unshift(h[ie]),c.message=function ze(c,h,p,m=null){c=c&&"\n"===c.charAt(0)&&"\u0275"==c.charAt(1)?c.slice(2):c;let v=ye(h);if(Array.isArray(h))v=h.map(ye).join(" -> ");else if("object"==typeof h){let y=[];for(let C in h)if(h.hasOwnProperty(C)){let T=h[C];y.push(C+":"+("string"==typeof T?JSON.stringify(T):ye(T)))}v=`{${y.join(", ")}}`}return`${p}${m?"("+m+")":""}[${v}]: ${c.replace(Be,"\n ")}`}("\n"+c.message,v,p,m),c.ngTokenPath=v,c[Hi]=null,c}(T,h,"R3InjectorError",this.source)}throw T}finally{ci(C),lt(y)}}resolveInjectorInitializers(){const h=lt(this),p=ci(void 0);try{const v=this.get(Ga.multi,ht,xt.Self);for(const y of v)y()}finally{lt(h),ci(p)}}toString(){const h=[],p=this.records;for(const m of p.keys())h.push(ye(m));return`R3Injector[${h.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new ne(205,!1)}processProvider(h){let p=Ya(h=Le(h))?h:Le(h&&h.provide);const m=function Vb(c){return lp(c)?kl(void 0,c.useValue):kl(_v(c),ks)}(h);if(Ya(h)||!0!==h.multi)this.records.get(p);else{let v=this.records.get(p);v||(v=kl(void 0,ks,!0),v.factory=()=>ji(v.multi),this.records.set(p,v)),p=h,v.multi.push(h)}this.records.set(p,m)}hydrate(h,p){return p.value===ks&&(p.value=fE,p.value=p.factory()),"object"==typeof p.value&&p.value&&function _o(c){return null!==c&&"object"==typeof c&&"function"==typeof c.ngOnDestroy}(p.value)&&this._ngOnDestroyHooks.add(p.value),p.value}injectableDefInScope(h){if(!h.providedIn)return!1;const p=Le(h.providedIn);return"string"==typeof p?"any"===p||this.scopes.has(p):this.injectorDefTypes.has(p)}removeOnDestroy(h){const p=this._onDestroyHooks.indexOf(h);-1!==p&&this._onDestroyHooks.splice(p,1)}}function vv(c){const h=li(c),p=null!==h?h.factory:Os(c);if(null!==p)return p;if(c instanceof yt)throw new ne(204,!1);if(c instanceof Function)return function Lb(c){const h=c.length;if(h>0)throw Rc(h,"?"),new ne(204,!1);const p=function Vi(c){return c&&(c[fr]||c[ir])||null}(c);return null!==p?()=>p.factory(c):()=>new c}(c);throw new ne(204,!1)}function _v(c,h,p){let m;if(Ya(c)){const v=Le(c);return Os(v)||vv(v)}if(lp(c))m=()=>Le(c.useValue);else if(function cp(c){return!(!c||!c.useFactory)}(c))m=()=>c.useFactory(...ji(c.deps||[]));else if(function Nb(c){return!(!c||!c.useExisting)}(c))m=()=>Mt(Le(c.useExisting));else{const v=Le(c&&(c.useClass||c.provide));if(!function Bb(c){return!!c.deps}(c))return Os(v)||vv(v);m=()=>new v(...ji(c.deps))}return m}function kl(c,h,p=!1){return{factory:c,value:h,multi:p?[]:void 0}}function Xo(c,h){for(const p of c)Array.isArray(p)?Xo(p,h):p&&at(p)?Xo(p.\u0275providers,h):h(p)}const yv=new yt("AppId",{providedIn:"root",factory:()=>Hb}),Hb="ng",Cv=new yt("Platform Initializer"),up=new yt("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),jb=new yt("AnimationModuleType"),bv=new yt("CSP nonce",{providedIn:"root",factory:()=>Rl().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let Sv=(c,h,p)=>null;function mp(c,h,p=!1){return Sv(c,h,p)}class yE{}class qb{}class Kb{resolveComponentFactory(h){throw function CE(c){const h=Error(`No component factory found for ${ye(c)}.`);return h.ngComponent=c,h}(h)}}let nu=(()=>{class c{static#e=this.NULL=new Kb}return c})();function Jb(){return Vl(yr(),Ze())}function Vl(c,h){return new iu(vt(c,h))}let iu=(()=>{class c{constructor(p){this.nativeElement=p}static#e=this.__NG_ELEMENT_ID__=Jb}return c})();function Xb(c){return c instanceof iu?c.nativeElement:c}class Iv{}let e0=(()=>{class c{constructor(){this.destroyNode=null}static#e=this.__NG_ELEMENT_ID__=()=>function t0(){const c=Ze(),p=yi(yr().index,c);return(Qn(p)?p:c)[Ft]}()}return c})(),n0=(()=>{class c{static#e=this.\u0275prov=Ut({token:c,providedIn:"root",factory:()=>null})}return c})();class Av{constructor(h){this.full=h,this.major=h.split(".")[0],this.minor=h.split(".")[1],this.patch=h.split(".").slice(2).join(".")}}const SE=new Av("16.2.12"),Mv={};function a0(c,h=null,p=null,m){const v=Ov(c,h,p,m);return v.resolveInjectorInitializers(),v}function Ov(c,h=null,p=null,m,v=new Set){const y=[p||ht,Pb(c)];return m=m||("object"==typeof c?void 0:ye(c)),new Xc(y,h||Pd(),m||null,v)}let yo=(()=>{class c{static#e=this.THROW_IF_NOT_FOUND=Bi;static#t=this.NULL=new fv;static create(p,m){if(Array.isArray(p))return a0({name:""},m,p,"");{const v=p.name??"";return a0({name:v},p.parent,p.providers,v)}}static#n=this.\u0275prov=Ut({token:c,providedIn:"any",factory:()=>Mt(ap)});static#i=this.__NG_ELEMENT_ID__=-1}return c})();function Pv(c){return c.ngOriginalError}class Da{constructor(){this._console=console}handleError(h){const p=this._findOriginalError(h);this._console.error("ERROR",h),p&&this._console.error("ORIGINAL ERROR",p)}_findOriginalError(h){let p=h&&Pv(h);for(;p&&Pv(p);)p=Pv(p);return p||null}}function yp(c){return h=>{setTimeout(c,void 0,h)}}const Vo=class c0 extends l.x{constructor(h=!1){super(),this.__isAsync=h}emit(h){super.next(h)}subscribe(h,p,m){let v=h,y=p||(()=>null),C=m;if(h&&"object"==typeof h){const M=h;v=M.next?.bind(M),y=M.error?.bind(M),C=M.complete?.bind(M)}this.__isAsync&&(y=yp(y),v&&(v=yp(v)),C&&(C=yp(C)));const T=super.subscribe({next:v,error:y,complete:C});return h instanceof k.w0&&h.add(T),T}};function kv(...c){}class Tr{constructor({enableLongStackTrace:h=!1,shouldCoalesceEventChangeDetection:p=!1,shouldCoalesceRunChangeDetection:m=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Vo(!1),this.onMicrotaskEmpty=new Vo(!1),this.onStable=new Vo(!1),this.onError=new Vo(!1),typeof Zone>"u")throw new ne(908,!1);Zone.assertZonePatched();const v=this;v._nesting=0,v._outer=v._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(v._inner=v._inner.fork(new Zone.TaskTrackingZoneSpec)),h&&Zone.longStackTraceZoneSpec&&(v._inner=v._inner.fork(Zone.longStackTraceZoneSpec)),v.shouldCoalesceEventChangeDetection=!m&&p,v.shouldCoalesceRunChangeDetection=m,v.lastRequestAnimationFrameId=-1,v.nativeRequestAnimationFrame=function ME(){const c="function"==typeof bt.requestAnimationFrame;let h=bt[c?"requestAnimationFrame":"setTimeout"],p=bt[c?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&h&&p){const m=h[Zone.__symbol__("OriginalDelegate")];m&&(h=m);const v=p[Zone.__symbol__("OriginalDelegate")];v&&(p=v)}return{nativeRequestAnimationFrame:h,nativeCancelAnimationFrame:p}}().nativeRequestAnimationFrame,function RE(c){const h=()=>{!function OE(c){c.isCheckStableRunning||-1!==c.lastRequestAnimationFrameId||(c.lastRequestAnimationFrameId=c.nativeRequestAnimationFrame.call(bt,()=>{c.fakeTopEventTask||(c.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{c.lastRequestAnimationFrameId=-1,Fv(c),c.isCheckStableRunning=!0,Nv(c),c.isCheckStableRunning=!1},void 0,()=>{},()=>{})),c.fakeTopEventTask.invoke()}),Fv(c))}(c)};c._inner=c._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(p,m,v,y,C,T)=>{if(function d0(c){return!(!Array.isArray(c)||1!==c.length)&&!0===c[0].data?.__ignore_ng_zone__}(T))return p.invokeTask(v,y,C,T);try{return Lv(c),p.invokeTask(v,y,C,T)}finally{(c.shouldCoalesceEventChangeDetection&&"eventTask"===y.type||c.shouldCoalesceRunChangeDetection)&&h(),Vv(c)}},onInvoke:(p,m,v,y,C,T,M)=>{try{return Lv(c),p.invoke(v,y,C,T,M)}finally{c.shouldCoalesceRunChangeDetection&&h(),Vv(c)}},onHasTask:(p,m,v,y)=>{p.hasTask(v,y),m===v&&("microTask"==y.change?(c._hasPendingMicrotasks=y.microTask,Fv(c),Nv(c)):"macroTask"==y.change&&(c.hasPendingMacrotasks=y.macroTask))},onHandleError:(p,m,v,y)=>(p.handleError(v,y),c.runOutsideAngular(()=>c.onError.emit(y)),!1)})}(v)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Tr.isInAngularZone())throw new ne(909,!1)}static assertNotInAngularZone(){if(Tr.isInAngularZone())throw new ne(909,!1)}run(h,p,m){return this._inner.run(h,p,m)}runTask(h,p,m,v){const y=this._inner,C=y.scheduleEventTask("NgZoneEvent: "+v,h,xE,kv,kv);try{return y.runTask(C,p,m)}finally{y.cancelTask(C)}}runGuarded(h,p,m){return this._inner.runGuarded(h,p,m)}runOutsideAngular(h){return this._outer.run(h)}}const xE={};function Nv(c){if(0==c._nesting&&!c.hasPendingMicrotasks&&!c.isStable)try{c._nesting++,c.onMicrotaskEmpty.emit(null)}finally{if(c._nesting--,!c.hasPendingMicrotasks)try{c.runOutsideAngular(()=>c.onStable.emit(null))}finally{c.isStable=!0}}}function Fv(c){c.hasPendingMicrotasks=!!(c._hasPendingMicrotasks||(c.shouldCoalesceEventChangeDetection||c.shouldCoalesceRunChangeDetection)&&-1!==c.lastRequestAnimationFrameId)}function Lv(c){c._nesting++,c.isStable&&(c.isStable=!1,c.onUnstable.emit(null))}function Vv(c){c._nesting--,Nv(c)}class u0{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Vo,this.onMicrotaskEmpty=new Vo,this.onStable=new Vo,this.onError=new Vo}run(h,p,m){return h.apply(p,m)}runGuarded(h,p,m){return h.apply(p,m)}runOutsideAngular(h){return h()}runTask(h,p,m,v){return h.apply(p,m)}}const Bv=new yt("",{providedIn:"root",factory:Hv});function Hv(){const c=Ot(Tr);let h=!0;const p=new de.y(v=>{h=c.isStable&&!c.hasPendingMacrotasks&&!c.hasPendingMicrotasks,c.runOutsideAngular(()=>{v.next(h),v.complete()})}),m=new de.y(v=>{let y;c.runOutsideAngular(()=>{y=c.onStable.subscribe(()=>{Tr.assertNotInAngularZone(),queueMicrotask(()=>{!h&&!c.hasPendingMacrotasks&&!c.hasPendingMicrotasks&&(h=!0,v.next(!0))})})});const C=c.onUnstable.subscribe(()=>{Tr.assertInAngularZone(),h&&(h=!1,c.runOutsideAngular(()=>{v.next(!1)}))});return()=>{y.unsubscribe(),C.unsubscribe()}});return(0,re.T)(p,m.pipe((0,ve.B)()))}function jv(c){return c.ownerDocument.defaultView}function zv(c){return c.ownerDocument}function ea(c){return c instanceof Function?c():c}let Cp=(()=>{class c{constructor(){this.renderDepth=0,this.handler=null}begin(){this.handler?.validateBegin(),this.renderDepth++}end(){this.renderDepth--,0===this.renderDepth&&this.handler?.execute()}ngOnDestroy(){this.handler?.destroy(),this.handler=null}static#e=this.\u0275prov=Ut({token:c,providedIn:"root",factory:()=>new c})}return c})();function ru(c){for(;c;){c[Ht]|=64;const h=ko(c);if(ki(c)&&!h)return c;c=h}return null}const g0=new yt("",{providedIn:"root",factory:()=>!1});let bp=null;function _0(c,h){return c[h]??b0()}function y0(c,h){const p=b0();p.producerNode?.length&&(c[h]=bp,p.lView=c,bp=C0())}const HE={...Yo,consumerIsAlwaysLive:!0,consumerMarkedDirty:c=>{ru(c.lView)},lView:null};function C0(){return Object.create(HE)}function b0(){return bp??=C0(),bp}const rn={};function Wv(c){Zv(Cn(),Ze(),gi()+c,!1)}function Zv(c,h,p,m){if(!m)if(3==(3&h[Ht])){const y=c.preOrderCheckHooks;null!==y&&df(h,y,p)}else{const y=c.preOrderHooks;null!==y&&td(h,y,0,p)}ma(p)}function jl(c,h=xt.Default){const p=Ze();return null===p?Mt(c,h):HC(yr(),p,Le(c),h)}function Qv(){throw new Error("invalid")}function zd(c,h,p,m,v,y,C,T,M,B,W){const X=h.blueprint.slice();return X[On]=v,X[Ht]=140|m,(null!==B||c&&2048&c[Ht])&&(X[Ht]|=2048),Qu(X),X[_n]=X[qr]=c,X[yn]=p,X[vr]=C||c&&c[vr],X[Ft]=T||c&&c[Ft],X[Qr]=M||c&&c[Qr]||null,X[ri]=y,X[Kr]=function Gm(){return $m++}(),X[_r]=W,X[Ra]=B,X[wn]=2==h.type?c[wn]:X,X}function zl(c,h,p,m,v){let y=c.data[h];if(null===y)y=function Sp(c,h,p,m,v){const y=af(),C=Ju(),M=c.data[h]=function YE(c,h,p,m,v,y){let C=h?h.injectorIndex:-1,T=0;return pa()&&(T|=128),{type:p,index:m,insertBeforeIndex:null,injectorIndex:C,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:T,providerIndexes:0,value:v,attrs:y,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:h,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,C?y:y&&y.parent,p,h,m,v);return null===c.firstChild&&(c.firstChild=M),null!==y&&(C?null==y.child&&null!==M.parent&&(y.child=M):null===y.next&&(y.next=M,M.prev=y)),M}(c,h,p,m,v),function I(){return Gt.lFrame.inI18n}()&&(y.flags|=32);else if(64&y.type){y.type=p,y.value=m,y.attrs=v;const C=function _l(){const c=Gt.lFrame,h=c.currentTNode;return c.isParent?h:h.parent}();y.injectorIndex=null===C?-1:C.injectorIndex}return go(y,!0),y}function su(c,h,p,m){if(0===p)return-1;const v=h.length;for(let y=0;yzt&&Zv(c,h,zt,!1),Fi(T?2:0,v);const B=T?y:null,W=fa(B);try{null!==B&&(B.dirty=!1),p(m,v)}finally{Na(B,W)}}finally{T&&null===h[us]&&y0(h,us),ma(C),Fi(T?3:1,v)}}function Dp(c,h,p){if(Ms(h)){const m=Ji(null);try{const y=h.directiveEnd;for(let C=h.directiveStart;Cnull;function E0(c,h,p,m){for(let v in c)if(c.hasOwnProperty(v)){p=null===p?{}:p;const y=c[v];null===m?Jv(p,h,v,y):m.hasOwnProperty(v)&&Jv(p,h,m[v],y)}return p}function Jv(c,h,p,m){c.hasOwnProperty(p)?c[p].push(h,m):c[p]=[h,m]}function Ns(c,h,p,m,v,y,C,T){const M=vt(h,p);let W,B=h.inputs;!T&&null!=B&&(W=B[m])?(Op(c,p,W,m,v),et(h)&&function A0(c,h){const p=yi(h,c);16&p[Ht]||(p[Ht]|=64)}(p,h.index)):3&h.type&&(m=function I0(c){return"class"===c?"className":"for"===c?"htmlFor":"formaction"===c?"formAction":"innerHtml"===c?"innerHTML":"readonly"===c?"readOnly":"tabindex"===c?"tabIndex":c}(m),v=null!=C?C(v,h.value||"",m):v,y.setProperty(M,m,v))}function Ip(c,h,p,m){if(mm()){const v=null===m?null:{"":-1},y=function k0(c,h){const p=c.directiveRegistry;let m=null,v=null;if(p)for(let y=0;y0;){const p=c[--h];if("number"==typeof p&&p<0)return p}return 0})(C)!=T&&C.push(T),C.push(p,m,y)}}(c,h,m,su(c,p,v.hostVars,rn),v)}function Bo(c,h,p,m,v,y){const C=vt(c,h);!function Mp(c,h,p,m,v,y,C){if(null==y)c.removeAttribute(h,v,p);else{const T=null==C?Me(y):C(y,m||"",v);c.setAttribute(h,v,T,p)}}(h[Ft],C,y,c.value,p,m,v)}function H0(c,h,p,m,v,y){const C=y[h];if(null!==C)for(let T=0;T{class c{constructor(){this.all=new Set,this.queue=new Map}create(p,m,v){const y=typeof Zone>"u"?null:Zone.current,C=function Ee(c,h,p){const m=Object.create(ft);p&&(m.consumerAllowSignalWrites=!0),m.fn=c,m.schedule=h;const v=C=>{m.cleanupFn=C};return m.ref={notify:()=>Wo(m),run:()=>{if(m.dirty=!1,m.hasRun&&!pl(m))return;m.hasRun=!0;const C=fa(m);try{m.cleanupFn(),m.cleanupFn=Ue,m.fn(v)}finally{Na(m,C)}},cleanup:()=>m.cleanupFn()},m.ref}(p,B=>{this.all.has(B)&&this.queue.set(B,y)},v);let T;this.all.add(C),C.notify();const M=()=>{C.cleanup(),T?.(),this.all.delete(C),this.queue.delete(C)};return T=m?.onDestroy(M),{destroy:M}}flush(){if(0!==this.queue.size)for(const[p,m]of this.queue)this.queue.delete(p),m?m.run(()=>p.run()):p.run()}get isQueueEmpty(){return 0===this.queue.size}static#e=this.\u0275prov=Ut({token:c,providedIn:"root",factory:()=>new c})}return c})();function $d(c,h,p){let m=p?c.styles:null,v=p?c.classes:null,y=0;if(null!==h)for(let C=0;C0){h_(c,1);const v=p.components;null!==v&&p_(c,v,1)}}function p_(c,h,p){for(let m=0;m-1&&(Gc(h,m),va(p,m))}this._attachedToViewContainer=!1}wd(this._lView[dt],this._lView)}onDestroy(h){!function Va(c,h){if(256==(256&c[Ht]))throw new ne(911,!1);null===c[cs]&&(c[cs]=[]),c[cs].push(h)}(this._lView,h)}markForCheck(){ru(this._cdRefInjectingView||this._lView)}detach(){this._lView[Ht]&=-129}reattach(){this._lView[Ht]|=128}detectChanges(){Gd(this._lView[dt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ne(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Qm(c,h){Fo(c,h,h[Ft],2,null,null)}(this._lView[dt],this._lView)}attachToAppRef(h){if(this._attachedToViewContainer)throw new ne(902,!1);this._appRef=h}}class Z0 extends au{constructor(h){super(h),this._view=h}detectChanges(){const h=this._view;Gd(h[dt],h,h[yn],!1)}checkNoChanges(){}get context(){return null}}class g_ extends nu{constructor(h){super(),this.ngModule=h}resolveComponentFactory(h){const p=Zt(h);return new lu(p,this.ngModule)}}function m_(c){const h=[];for(let p in c)c.hasOwnProperty(p)&&h.push({propName:c[p],templateName:p});return h}class q0{constructor(h,p){this.injector=h,this.parentInjector=p}get(h,p,m){m=Gn(m);const v=this.injector.get(h,Mv,m);return v!==Mv||p===Mv?v:this.parentInjector.get(h,p,m)}}class lu extends qb{get inputs(){const h=this.componentDef,p=h.inputTransforms,m=m_(h.inputs);if(null!==p)for(const v of m)p.hasOwnProperty(v.propName)&&(v.transform=p[v.propName]);return m}get outputs(){return m_(this.componentDef.outputs)}constructor(h,p){super(),this.componentDef=h,this.ngModule=p,this.componentType=h.type,this.selector=function Ki(c){return c.map(Jt).join(",")}(h.selectors),this.ngContentSelectors=h.ngContentSelectors?h.ngContentSelectors:[],this.isBoundToModule=!!p}create(h,p,m,v){let y=(v=v||this.ngModule)instanceof Jo?v:v?.injector;y&&null!==this.componentDef.getStandaloneInjector&&(y=this.componentDef.getStandaloneInjector(y)||y);const C=y?new q0(h,y):h,T=C.get(Iv,null);if(null===T)throw new ne(407,!1);const X={rendererFactory:T,sanitizer:C.get(n0,null),effectManager:C.get(c_,null),afterRenderEventManager:C.get(Cp,null)},he=T.createRenderer(null,this.componentDef),Se=this.componentDef.selectors[0][0]||"div",je=m?function jE(c,h,p,m){const y=m.get(g0,!1)||p===rt.ShadowDom,C=c.selectRootElement(h,y);return function zE(c){w0(c)}(C),C}(he,m,this.componentDef.encapsulation,C):Uc(he,Se,function Q0(c){const h=c.toLowerCase();return"svg"===h?"svg":"math"===h?"math":null}(Se)),Pt=this.componentDef.signals?4608:this.componentDef.onPush?576:528;let Qe=null;null!==je&&(Qe=mp(je,C,!0));const Xt=Tp(0,null,null,1,0,null,null,null,null,null,null),gn=zd(null,Xt,null,Pt,null,null,X,he,C,null,Qe);let ai,ro;Qt(gn);try{const dl=this.componentDef;let tf,vw=null;dl.findHostDirectiveDefs?(tf=[],vw=new Map,dl.findHostDirectiveDefs(dl,tf,vw),tf.push(dl)):tf=[dl];const aI=function J0(c,h){const p=c[dt],m=zt;return c[m]=h,zl(p,m,2,"#host",null)}(gn,je),lI=function X0(c,h,p,m,v,y,C){const T=v[dt];!function eS(c,h,p,m){for(const v of c)h.mergedAttrs=Wn(h.mergedAttrs,v.hostAttrs);null!==h.mergedAttrs&&($d(h,h.mergedAttrs,!0),null!==p&&nv(m,p,h))}(m,c,h,C);let M=null;null!==h&&(M=mp(h,v[Qr]));const B=y.rendererFactory.createRenderer(h,p);let W=16;p.signals?W=4096:p.onPush&&(W=64);const X=zd(v,Kv(p),null,W,v[c.index],c,y,B,null,null,M);return T.firstCreatePass&&Ap(T,c,m.length-1),Ud(v,X),v[c.index]=X}(aI,je,dl,tf,gn,X,he);ro=vn(Xt,zt),je&&function nS(c,h,p,m){if(m)zi(c,p,["ng-version",SE.full]);else{const{attrs:v,classes:y}=function Yr(c){const h=[],p=[];let m=1,v=2;for(;m0&&fb(c,p,y.join(" "))}}(he,dl,je,m),void 0!==p&&function iS(c,h,p){const m=c.projection=[];for(let v=0;v=0;m--){const v=c[m];v.hostVars=h+=v.hostVars,v.hostAttrs=Wn(v.hostAttrs,p=Wn(p,v.hostAttrs))}}(m)}function Yd(c){return c===Kt?{}:c===ht?[]:c}function oS(c,h){const p=c.viewQuery;c.viewQuery=p?(m,v)=>{h(m,v),p(m,v)}:h}function aS(c,h){const p=c.contentQueries;c.contentQueries=p?(m,v,y)=>{h(m,v,y),p(m,v,y)}:h}function lS(c,h){const p=c.hostBindings;c.hostBindings=p?(m,v)=>{h(m,v),p(m,v)}:h}function __(c){return h=>{h.findHostDirectiveDefs=y_,h.hostDirectives=(Array.isArray(c)?c:c()).map(p=>"function"==typeof p?{directive:Le(p),inputs:Kt,outputs:Kt}:{directive:Le(p.directive),inputs:C_(p.inputs),outputs:C_(p.outputs)})}}function y_(c,h,p){if(null!==c.hostDirectives)for(const m of c.hostDirectives){const v=In(m.directive);hS(v.declaredInputs,m.inputs),y_(v,h,p),p.set(v,m),h.push(v)}}function C_(c){if(void 0===c||0===c.length)return Kt;const h={};for(let p=0;p(qo(!0),Uc(m,v,function cf(){return Gt.lFrame.currentNamespace}()));function wa(c,h,p){const m=Ze(),v=Cn(),y=c+zt,C=v.firstCreatePass?function kn(c,h,p,m,v){const y=h.consts,C=hs(y,m),T=zl(h,c,8,"ng-container",C);return null!==C&&$d(T,C,!0),Ip(h,p,T,hs(y,v)),null!==h.queries&&h.queries.elementStart(h,T),T}(y,v,m,h,p):v.data[y];go(C,!0);const T=Br(v,m,C,c);return m[y]=T,uf()&&Qc(v,m,T,C),br(T,m),fn(C)&&(wp(v,m,C),Dp(v,C,m)),null!=p&&Ep(m,C),wa}function Sr(){let c=yr();const h=Cn();return Ju()?Xu():(c=c.parent,go(c,!1)),h.firstCreatePass&&(ed(h,c),Ms(c)&&h.queries.elementEnd(c)),Sr}function Gp(c,h,p){return wa(c,h,p),Sr(),Gp}let Br=(c,h,p,m)=>(qo(!0),Dd(h[Ft],""));function Yp(){return Ze()}function Co(c){return!!c&&"function"==typeof c.then}function Ks(c){return!!c&&"function"==typeof c.subscribe}function Wp(c,h,p,m){const v=Ze(),y=Cn(),C=yr();return pn(y,v,v[Ft],C,c,h,m),Wp}function Zp(c,h){const p=yr(),m=Ze(),v=Cn();return pn(v,m,o_(Q(v.data),p,m),p,c,h),Zp}function pn(c,h,p,m,v,y,C){const T=fn(m),B=c.firstCreatePass&&s_(c),W=h[yn],X=r_(h);let he=!0;if(3&m.type||C){const tt=vt(m,h),gt=C?C(tt):tt,Pt=X.length,Qe=C?gn=>C(on(gn[m.index])):m.index;let Xt=null;if(!C&&T&&(Xt=function Qp(c,h,p,m){const v=c.cleanup;if(null!=v)for(let y=0;yM?T[M]:null}"string"==typeof C&&(y+=2)}return null}(c,h,v,m.index)),null!==Xt)(Xt.__ngLastListenerFn__||Xt).__ngNextListenerFn__=y,Xt.__ngLastListenerFn__=y,he=!1;else{y=B_(m,h,W,y,!1);const gn=p.listen(gt,v,y);X.push(y,gn),B&&B.push(v,Qe,Pt,Pt+1)}}else y=B_(m,h,W,y,!1);const Se=m.outputs;let je;if(he&&null!==Se&&(je=Se[v])){const tt=je.length;if(tt)for(let gt=0;gt-1?yi(c.index,h):h);let M=Jl(h,p,m,C),B=y.__ngNextListenerFn__;for(;B;)M=Jl(h,p,B,C)&&M,B=B.__ngNextListenerFn__;return v&&!1===M&&C.preventDefault(),M}}function H_(c=1){return function Ec(c){return(Gt.lFrame.contextLView=function Ha(c,h){for(;c>0;)h=h[qr],c--;return h}(c,Gt.lFrame.contextLView))[yn]}(c)}function j_(c,h){let p=null;const m=function da(c){const h=c.attrs;if(null!=h){const p=h.indexOf(5);if(!(1&p))return h[p+1]}return null}(c);for(let v=0;v>17&32767}function ng(c){return 2|c}function qa(c){return(131068&c)>>2}function ig(c,h){return-131069&c|h<<2}function $_(c){return 1|c}function Fs(c,h,p,m,v){const y=c[p+1],C=null===h;let T=m?Js(y):qa(y),M=!1;for(;0!==T&&(!1===M||C);){const W=c[T+1];rg(c[T],h)&&(M=!0,c[T+1]=m?$_(W):ng(W)),T=m?Js(W):qa(W)}M&&(c[p+1]=m?ng(y):$_(y))}function rg(c,h){return null===c||null==h||(Array.isArray(c)?c[1]:c)===h||!(!Array.isArray(c)||"string"!=typeof h)&&Pc(c,h)>=0}const hr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function mi(c){return c.substring(hr.key,hr.keyEnd)}function sg(c,h){const p=hr.textEnd;return p===h?-1:(h=hr.keyEnd=function o1(c,h,p){for(;h32;)h++;return h}(c,hr.key=h,p),Ls(c,h,p))}function Ls(c,h,p){for(;h=0;p=sg(h,p))gs(c,mi(h),!0)}function eo(c,h,p,m){const v=Ze(),y=Cn(),C=Qo(2);y.firstUpdatePass&&bo(y,c,C,m),h!==rn&&Vr(v,C,h)&&jo(y,y.data[gi()],v,v[Ft],c,v[C+1]=function l1(c,h){return null==c||""===c||("string"==typeof h?c+=h:"object"==typeof c&&(c=ye($a(c)))),c}(h,p),m,C)}function vs(c,h){return h>=c.expandoStartIndex}function bo(c,h,p,m){const v=c.data;if(null===v[p+1]){const y=v[gi()],C=vs(c,p);zS(y,m)&&null===h&&!C&&(h=!1),h=function jS(c,h,p,m){const v=Q(c);let y=m?h.residualClasses:h.residualStyles;if(null===v)0===(m?h.classBindings:h.styleBindings)&&(p=mu(p=nc(null,c,h,p,m),h.attrs,m),y=null);else{const C=h.directiveStylingLast;if(-1===C||c[C]!==v)if(p=nc(v,c,h,p,m),null===y){let M=function G_(c,h,p){const m=p?h.classBindings:h.styleBindings;if(0!==qa(m))return c[Js(m)]}(c,h,m);void 0!==M&&Array.isArray(M)&&(M=nc(null,c,h,M[1],m),M=mu(M,h.attrs,m),function no(c,h,p,m){c[Js(p?h.classBindings:h.styleBindings)]=m}(c,h,m,M))}else y=function _s(c,h,p){let m;const v=h.directiveEnd;for(let y=1+h.directiveStylingLast;y0)&&(B=!0)):W=p,v)if(0!==M){const he=Js(c[T+1]);c[m+1]=nh(he,T),0!==he&&(c[he+1]=ig(c[he+1],m)),c[T+1]=function tg(c,h){return 131071&c|h<<17}(c[T+1],m)}else c[m+1]=nh(T,0),0!==T&&(c[T+1]=ig(c[T+1],m)),T=m;else c[m+1]=nh(M,0),0===T?T=m:c[M+1]=ig(c[M+1],m),M=m;B&&(c[m+1]=ng(c[m+1])),Fs(c,W,m,!0),Fs(c,W,m,!1),function Ka(c,h,p,m,v){const y=v?c.residualClasses:c.residualStyles;null!=y&&"string"==typeof h&&Pc(y,h)>=0&&(p[m+1]=$_(p[m+1]))}(h,W,c,m,y),C=nh(T,M),y?h.classBindings=C:h.styleBindings=C}(v,y,h,p,C,m)}}function nc(c,h,p,m,v){let y=null;const C=p.directiveEnd;let T=p.directiveStylingLast;for(-1===T?T=p.directiveStart:T++;T0;){const M=c[v],B=Array.isArray(M),W=B?M[1]:M,X=null===W;let he=p[v+1];he===rn&&(he=X?ht:void 0);let Se=X?Mm(he,m):W===m?he:void 0;if(B&&!lg(Se)&&(Se=Mm(M,m)),lg(Se)&&(T=Se,C))return T;const je=c[v+1];v=C?Js(je):qa(je)}if(null!==h){let M=y?h.residualClasses:h.residualStyles;null!=M&&(T=Mm(M,m))}return T}function lg(c){return void 0!==c}function zS(c,h){return 0!=(c.flags&(h?8:16))}function US(c,h=""){const p=Ze(),m=Cn(),v=c+zt,y=m.firstCreatePass?zl(m,v,1,h,null):m.data[v],C=$S(m,p,y,h,c);p[v]=C,uf()&&Qc(m,p,C,y),go(y,!1)}let $S=(c,h,p,m,v)=>(qo(!0),function ba(c,h){return c.createText(h)}(h[Ft],m));function Ea(c){return sh("",c,""),Ea}function sh(c,h,p){const m=Ze(),v=$l(m,c,h,p);return v!==rn&&ta(m,gi(),v),sh}function ug(c,h,p,m,v){const y=Ze(),C=function Gl(c,h,p,m,v,y){const T=Wa(c,Zo(),p,v);return Qo(2),T?h+Me(p)+m+Me(v)+y:rn}(y,c,h,p,m,v);return C!==rn&&ta(y,gi(),C),ug}function ra(c,h,p,m,v,y,C){const T=Ze(),M=Yl(T,c,h,p,m,v,y,C);return M!==rn&&ta(T,gi(),M),ra}function Hs(c,h,p){const m=Ze();return Vr(m,yl(),h)&&Ns(Cn(),Mi(),m,c,h,m[Ft],p,!0),Hs}function sa(c,h,p){const m=Ze();if(Vr(m,yl(),h)){const y=Cn(),C=Mi();Ns(y,C,m,c,h,o_(Q(y.data),C,m),p,!0)}return sa}const jr=void 0;var nD=["en",[["a","p"],["AM","PM"],jr],[["AM","PM"],jr,jr],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],jr,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],jr,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",jr,"{1} 'at' {0}",jr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function Ir(c){const p=Math.floor(Math.abs(c)),m=c.toString().replace(/^[^.]*\.?/,"").length;return 1===p&&0===m?1:5}];let rc={};function js(c){const h=function m1(c){return c.toLowerCase().replace(/_/g,"-")}(c);let p=_u(h);if(p)return p;const m=h.split("-")[0];if(p=_u(m),p)return p;if("en"===m)return nD;throw new ne(701,!1)}function iD(c){return js(c)[So.PluralCase]}function _u(c){return c in rc||(rc[c]=bt.ng&&bt.ng.common&&bt.ng.common.locales&&bt.ng.common.locales[c]),rc[c]}var So=function(c){return c[c.LocaleId=0]="LocaleId",c[c.DayPeriodsFormat=1]="DayPeriodsFormat",c[c.DayPeriodsStandalone=2]="DayPeriodsStandalone",c[c.DaysFormat=3]="DaysFormat",c[c.DaysStandalone=4]="DaysStandalone",c[c.MonthsFormat=5]="MonthsFormat",c[c.MonthsStandalone=6]="MonthsStandalone",c[c.Eras=7]="Eras",c[c.FirstDayOfWeek=8]="FirstDayOfWeek",c[c.WeekendRange=9]="WeekendRange",c[c.DateFormat=10]="DateFormat",c[c.TimeFormat=11]="TimeFormat",c[c.DateTimeFormat=12]="DateTimeFormat",c[c.NumberSymbols=13]="NumberSymbols",c[c.NumberFormats=14]="NumberFormats",c[c.CurrencyCode=15]="CurrencyCode",c[c.CurrencySymbol=16]="CurrencySymbol",c[c.CurrencyName=17]="CurrencyName",c[c.Currencies=18]="Currencies",c[c.Directionality=19]="Directionality",c[c.PluralCase=20]="PluralCase",c[c.ExtraData=21]="ExtraData",c}(So||{});const yu="en-US";let J_=yu;function tl(c,h,p,m,v){if(c=Le(c),Array.isArray(c))for(let y=0;y>20;if(Ya(c)||!c.multi){const Se=new nd(B,v,jl),je=Ch(M,h,v?W:W+he,X);-1===je?(Tm(mf(T,C),y,M),yh(y,c,h.length),h.push(M),T.directiveStart++,T.directiveEnd++,v&&(T.providerIndexes+=1048576),p.push(Se),C.push(Se)):(p[je]=Se,C[je]=Se)}else{const Se=Ch(M,h,W+he,X),je=Ch(M,h,W,W+he),gt=je>=0&&p[je];if(v&&!gt||!v&&!(Se>=0&&p[Se])){Tm(mf(T,C),y,M);const Pt=function k1(c,h,p,m,v){const y=new nd(c,p,jl);return y.multi=[],y.index=h,y.componentProviders=0,bg(y,v,m&&!p),y}(v?P1:Sg,p.length,v,m,B);!v&>&&(p[je].providerFactory=Pt),yh(y,c,h.length,0),h.push(M),T.directiveStart++,T.directiveEnd++,v&&(T.providerIndexes+=1048576),p.push(Pt),C.push(Pt)}else yh(y,c,Se>-1?Se:je,bg(p[v?je:Se],B,!v&&m));!v&&m&>&&p[je].componentProviders++}}}function yh(c,h,p,m){const v=Ya(h),y=function Fb(c){return!!c.useClass}(h);if(v||y){const M=(y?Le(h.useClass):h).prototype.ngOnDestroy;if(M){const B=c.destroyHooks||(c.destroyHooks=[]);if(!v&&h.multi){const W=B.indexOf(p);-1===W?B.push(p,[m,M]):B[W+1].push(m,M)}else B.push(p,M)}}}function bg(c,h,p){return p&&c.componentProviders++,c.multi.push(h)-1}function Ch(c,h,p,m){for(let v=p;v{p.providersResolver=(m,v)=>function dy(c,h,p){const m=Cn();if(m.firstCreatePass){const v=qn(c);tl(p,m.data,m.blueprint,v,!0),tl(h,m.data,m.blueprint,v,!1)}}(m,v?v(c):c,h)}}class nl{}class py{}function N1(c,h){return new gy(c,h??null,[])}class gy extends nl{constructor(h,p,m){super(),this._parent=p,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new g_(this);const v=_i(h);this._bootstrapComponents=ea(v.bootstrap),this._r3Injector=Ov(h,p,[{provide:nl,useValue:this},{provide:nu,useValue:this.componentFactoryResolver},...m],ye(h),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(h)}get injector(){return this._r3Injector}destroy(){const h=this._r3Injector;!h.destroyed&&h.destroy(),this.destroyCbs.forEach(p=>p()),this.destroyCbs=null}onDestroy(h){this.destroyCbs.push(h)}}class Dg extends py{constructor(h){super(),this.moduleType=h}create(h){return new gy(this.moduleType,h,[])}}class vy extends nl{constructor(h){super(),this.componentFactoryResolver=new g_(this),this.instance=null;const p=new Xc([...h.providers,{provide:nl,useValue:this},{provide:nu,useValue:this.componentFactoryResolver}],h.parent||Pd(),h.debugName,new Set(["environment"]));this.injector=p,h.runEnvironmentInitializers&&p.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(h){this.injector.onDestroy(h)}}function TD(c,h,p=null){return new vy({providers:c,parent:h,debugName:p,runEnvironmentInitializers:!0}).injector}let ID=(()=>{class c{constructor(p){this._injector=p,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(p){if(!p.standalone)return null;if(!this.cachedInjectors.has(p)){const m=kb(0,p.type),v=m.length>0?TD([m],this._injector,`Standalone[${p.type.name}]`):null;this.cachedInjectors.set(p,v)}return this.cachedInjectors.get(p)}ngOnDestroy(){try{for(const p of this.cachedInjectors.values())null!==p&&p.destroy()}finally{this.cachedInjectors.clear()}}static#e=this.\u0275prov=Ut({token:c,providedIn:"environment",factory:()=>new c(Mt(Jo))})}return c})();function wg(c){c.getStandaloneInjector=h=>h.get(ID).getOrCreateStandaloneInjector(c)}function aa(c,h,p){const m=is()+c,v=Ze();return v[m]===rn?Ho(v,m,p?h.call(p):h()):function cu(c,h){return c[h]}(v,m)}function zo(c,h,p,m){return Mg(Ze(),is(),c,h,p,m)}function wo(c,h){const p=c[h];return p===rn?void 0:p}function Mg(c,h,p,m,v,y){const C=h+p;return Vr(c,C,v)?Ho(c,C+1,y?m.call(y,v):m(v)):wo(c,C+1)}function io(c,h){const p=Cn();let m;const v=c+zt;p.firstCreatePass?(m=function pc(c,h){if(h)for(let p=h.length-1;p>=0;p--){const m=h[p];if(c===m.name)return m}}(h,p.pipeRegistry),p.data[v]=m,m.onDestroy&&(p.destroyHooks??=[]).push(v,m.onDestroy)):m=p.data[v];const y=m.factory||(m.factory=Os(m.type)),T=ci(jl);try{const M=id(!1),B=y();return id(M),function NS(c,h,p,m){p>=c.data.length&&(c.data[p]=null,c.blueprint[p]=null),h[p]=m}(p,Ze(),v,B),B}finally{ci(T)}}function bs(c,h,p){const m=c+zt,v=Ze(),y=oi(v,m);return Au(v,m)?Mg(v,is(),h,y.transform,p,y):y.transform(p)}function Th(c,h,p,m){const v=c+zt,y=Ze(),C=oi(y,v);return Au(y,v)?function Iu(c,h,p,m,v,y,C){const T=h+p;return Wa(c,T,v,y)?Ho(c,T+2,C?m.call(C,v,y):m(v,y)):wo(c,T+2)}(y,is(),h,C.transform,p,m,C):C.transform(p,m)}function Au(c,h){return c[dt].data[h].pure}function Pg(){return this._results[Symbol.iterator]()}class Mu{static#e=Symbol.iterator;get changes(){return this._changes||(this._changes=new Vo)}constructor(h=!1){this._emitDistinctChangesOnly=h,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const p=Mu.prototype;p[Symbol.iterator]||(p[Symbol.iterator]=Pg)}get(h){return this._results[h]}map(h){return this._results.map(h)}filter(h){return this._results.filter(h)}find(h){return this._results.find(h)}reduce(h,p){return this._results.reduce(h,p)}forEach(h){this._results.forEach(h)}some(h){return this._results.some(h)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(h,p){const m=this;m.dirty=!1;const v=function vo(c){return c.flat(Number.POSITIVE_INFINITY)}(h);(this._changesDetected=!function zw(c,h,p){if(c.length!==h.length)return!1;for(let m=0;m0&&(p[v-1][fi]=h),m{class c{static#e=this.__NG_ELEMENT_ID__=Lg}return c})();const Ng=gc,Fg=class extends Ng{constructor(h,p,m){super(),this._declarationLView=h,this._declarationTContainer=p,this.elementRef=m}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(h,p){return this.createEmbeddedViewImpl(h,p)}createEmbeddedViewImpl(h,p,m){const v=function wy(c,h,p,m){const v=h.tView,T=zd(c,v,p,4096&c[Ht]?4096:16,null,h,null,null,null,m?.injector??null,m?.hydrationInfo??null);T[Gs]=c[h.index];const B=c[$i];return null!==B&&(T[$i]=B.createEmbeddedView(v)),Rp(v,T,p),T}(this._declarationLView,this._declarationTContainer,h,{injector:p,hydrationInfo:m});return new au(v)}};function Lg(){return mc(yr(),Ze())}function mc(c,h){return 4&c.type?new Fg(h,c,Vl(c,h)):null}let _c=(()=>{class c{static#e=this.__NG_ELEMENT_ID__=Hg}return c})();function Hg(){return Uo(yr(),Ze())}const Mh=_c,xh=class extends Mh{constructor(h,p,m){super(),this._lContainer=h,this._hostTNode=p,this._hostLView=m}get element(){return Vl(this._hostTNode,this._hostLView)}get injector(){return new ps(this._hostTNode,this._hostLView)}get parentInjector(){const h=rd(this._hostTNode,this._hostLView);if(ff(h)){const p=Ic(h,this._hostLView),m=Cl(h);return new ps(p[dt].data[m+8],p)}return new ps(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(h){const p=ss(this._lContainer);return null!==p&&p[h]||null}get length(){return this._lContainer.length-Zn}createEmbeddedView(h,p,m){let v,y;"number"==typeof m?v=m:null!=m&&(v=m.index,y=m.injector);const T=h.createEmbeddedViewImpl(p||{},y,null);return this.insertImpl(T,v,false),T}createComponent(h,p,m,v,y){const C=h&&!function ad(c){return"function"==typeof c}(h);let T;if(C)T=p;else{const tt=p||{};T=tt.index,m=tt.injector,v=tt.projectableNodes,y=tt.environmentInjector||tt.ngModuleRef}const M=C?h:new lu(Zt(h)),B=m||this.parentInjector;if(!y&&null==M.ngModule){const gt=(C?B:this.parentInjector).get(Jo,null);gt&&(y=gt)}Zt(M.componentType??{});const Se=M.create(B,v,null,y);return this.insertImpl(Se.hostView,T,false),Se}insert(h,p){return this.insertImpl(h,p,!1)}insertImpl(h,p,m){const v=h._lView;if(function Kn(c){return pi(c[_n])}(v)){const M=this.indexOf(h);if(-1!==M)this.detach(M);else{const B=v[_n],W=new xh(B,B[ri],B[_n]);W.detach(W.indexOf(h))}}const C=this._adjustIndex(p),T=this._lContainer;return kg(T,v,C,!m),h.attachToViewContainerRef(),QC(Oh(T),C,h),h}move(h,p){return this.insert(h,p)}indexOf(h){const p=ss(this._lContainer);return null!==p?p.indexOf(h):-1}remove(h){const p=this._adjustIndex(h,-1),m=Gc(this._lContainer,p);m&&(va(Oh(this._lContainer),p),wd(m[dt],m))}detach(h){const p=this._adjustIndex(h,-1),m=Gc(this._lContainer,p);return m&&null!=va(Oh(this._lContainer),p)?new au(m):null}_adjustIndex(h,p=0){return h??this.length+p}};function ss(c){return c[8]}function Oh(c){return c[8]||(c[8]=[])}function Uo(c,h){let p;const m=h[c.index];return pi(m)?p=m:(p=n_(m,h,null,c),h[c.index]=p,Ud(h,p)),Ty(p,h,c,m),new xh(p,c,h)}let Ty=function jg(c,h,p,m){if(c[jn])return;let v;v=8&p.type?on(m):function Ey(c,h){const p=c[Ft],m=p.createComment(""),v=vt(h,c);return Ps(p,Zc(p,v),m,function Al(c,h){return c.nextSibling(h)}(p,v),!1),m}(h,p),c[jn]=v};class zg{constructor(h){this.queryList=h,this.matches=null}clone(){return new zg(this.queryList)}setDirty(){this.queryList.setDirty()}}class Ug{constructor(h=[]){this.queries=h}createEmbeddedView(h){const p=h.queries;if(null!==p){const m=null!==h.contentQueries?h.contentQueries[0]:p.length,v=[];for(let y=0;y0)m.push(C[T/2]);else{const B=y[T+1],W=h[-M];for(let X=Zn;X{class c{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((p,m)=>{this.resolve=p,this.reject=m}),this.appInits=Ot(Vu,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const p=[];for(const v of this.appInits){const y=v();if(Co(y))p.push(y);else if(Ks(y)){const C=new Promise((T,M)=>{y.subscribe({complete:T,error:M})});p.push(C)}}const m=()=>{this.done=!0,this.resolve()};Promise.all(p).then(()=>{m()}).catch(v=>{this.reject(v)}),0===p.length&&m(),this.initialized=!0}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})(),tC=(()=>{class c{log(p){console.log(p)}warn(p){console.warn(p)}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"platform"})}return c})();const Bu=new yt("LocaleId",{providedIn:"root",factory:()=>Ot(Bu,xt.Optional|xt.SkipSelf)||function nC(){return typeof $localize<"u"&&$localize.locale||yu}()}),X1=new yt("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});let Tn=(()=>{class c{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new ce.X(!1)}add(){this.hasPendingTasks.next(!0);const p=this.taskId++;return this.pendingTasks.add(p),p}remove(p){this.pendingTasks.delete(p),0===this.pendingTasks.size&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks.next(!1)}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();class iC{constructor(h,p){this.ngModuleFactory=h,this.componentFactories=p}}let Hh=(()=>{class c{compileModuleSync(p){return new Dg(p)}compileModuleAsync(p){return Promise.resolve(this.compileModuleSync(p))}compileModuleAndAllComponentsSync(p){const m=this.compileModuleSync(p),y=ea(_i(p).declarations).reduce((C,T)=>{const M=Zt(T);return M&&C.push(new lu(M)),C},[]);return new iC(m,y)}compileModuleAndAllComponentsAsync(p){return Promise.resolve(this.compileModuleAndAllComponentsSync(p))}clearCache(){}clearCacheFor(p){}getModuleId(p){}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();const Uh=new yt(""),$h=new yt("");let cl,tm=(()=>{class c{constructor(p,m,v){this._ngZone=p,this.registry=m,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,cl||(function im(c){cl=c}(v),v.addToWindow(m)),this._watchAngularEvents(),p.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Tr.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let p=this._callbacks.pop();clearTimeout(p.timeoutId),p.doneCb(this._didWork)}this._didWork=!1});else{let p=this.getPendingTasks();this._callbacks=this._callbacks.filter(m=>!m.updateCb||!m.updateCb(p)||(clearTimeout(m.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(p=>({source:p.source,creationLocation:p.creationLocation,data:p.data})):[]}addCallback(p,m,v){let y=-1;m&&m>0&&(y=setTimeout(()=>{this._callbacks=this._callbacks.filter(C=>C.timeoutId!==y),p(this._didWork,this.getPendingTasks())},m)),this._callbacks.push({doneCb:p,timeoutId:y,updateCb:v})}whenStable(p,m,v){if(v&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(p,m,v),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(p){this.registry.registerApplication(p,this)}unregisterApplication(p){this.registry.unregisterApplication(p)}findProviders(p,m,v){return[]}static#e=this.\u0275fac=function(m){return new(m||c)(Mt(Tr),Mt(nm),Mt($h))};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac})}return c})(),nm=(()=>{class c{constructor(){this._applications=new Map}registerApplication(p,m){this._applications.set(p,m)}unregisterApplication(p){this._applications.delete(p)}unregisterAllApplications(){this._applications.clear()}getTestability(p){return this._applications.get(p)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(p,m=!0){return cl?.findTestabilityInTree(this,p,m)??null}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"platform"})}return c})(),Ur=null;const rm=new yt("AllowMultipleToken"),Gh=new yt("PlatformDestroyListeners"),Yh=new yt("appBootstrapListener");class gC{constructor(h,p){this.name=h,this.token=p}}function _C(c,h,p=[]){const m=`Platform: ${h}`,v=new yt(m);return(y=[])=>{let C=om();if(!C||C.injector.get(rm,!1)){const T=[...p,...y,{provide:v,useValue:!0}];c?c(T):function mC(c){if(Ur&&!Ur.get(rm,!1))throw new ne(400,!1);(function pC(){!function E(c){U=c}(()=>{throw new ne(600,!1)})})(),Ur=c;const h=c.get(Wh);(function rw(c){c.get(Cv,null)?.forEach(p=>p())})(c)}(function sm(c=[],h){return yo.create({name:h,providers:[{provide:gv,useValue:"platform"},{provide:Gh,useValue:new Set([()=>Ur=null])},...c]})}(T,m))}return function ow(c){const h=om();if(!h)throw new ne(401,!1);return h}()}}function om(){return Ur?.get(Wh)??null}let Wh=(()=>{class c{constructor(p){this._injector=p,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(p,m){const v=function aw(c="zone.js",h){return"noop"===c?new u0:"zone.js"===c?new Tr(h):c}(m?.ngZone,function Zh(c){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:c?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:c?.runCoalescing??!1}}({eventCoalescing:m?.ngZoneEventCoalescing,runCoalescing:m?.ngZoneRunCoalescing}));return v.run(()=>{const y=function my(c,h,p){return new gy(c,h,p)}(p.moduleType,this.injector,function bC(c){return[{provide:Tr,useFactory:c},{provide:Ga,multi:!0,useFactory:()=>{const h=Ot(iT,{optional:!0});return()=>h.initialize()}},{provide:lw,useFactory:nT},{provide:Bv,useFactory:Hv}]}(()=>v)),C=y.injector.get(Da,null);return v.runOutsideAngular(()=>{const T=v.onError.subscribe({next:M=>{C.handleError(M)}});y.onDestroy(()=>{zu(this._modules,y),T.unsubscribe()})}),function yC(c,h,p){try{const m=p();return Co(m)?m.catch(v=>{throw h.runOutsideAngular(()=>c.handleError(v)),v}):m}catch(m){throw h.runOutsideAngular(()=>c.handleError(m)),m}}(C,v,()=>{const T=y.injector.get(Bh);return T.runInitializers(),T.donePromise.then(()=>(function sc(c){_t(c,"Expected localeId to be defined"),"string"==typeof c&&(J_=c.toLowerCase().replace(/_/g,"-"))}(y.injector.get(Bu,yu)||yu),this._moduleDoBootstrap(y),y))})})}bootstrapModule(p,m=[]){const v=CC({},m);return function fC(c,h,p){const m=new Dg(p);return Promise.resolve(m)}(0,0,p).then(y=>this.bootstrapModuleFactory(y,v))}_moduleDoBootstrap(p){const m=p.injector.get(bc);if(p._bootstrapComponents.length>0)p._bootstrapComponents.forEach(v=>m.bootstrap(v));else{if(!p.instance.ngDoBootstrap)throw new ne(-403,!1);p.instance.ngDoBootstrap(m)}this._modules.push(p)}onDestroy(p){this._destroyListeners.push(p)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new ne(404,!1);this._modules.slice().forEach(m=>m.destroy()),this._destroyListeners.forEach(m=>m());const p=this._injector.get(Gh,null);p&&(p.forEach(m=>m()),p.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#e=this.\u0275fac=function(m){return new(m||c)(Mt(yo))};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"platform"})}return c})();function CC(c,h){return Array.isArray(h)?h.reduce(CC,c):{...c,...h}}let bc=(()=>{class c{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=Ot(lw),this.zoneIsStable=Ot(Bv),this.componentTypes=[],this.components=[],this.isStable=Ot(Tn).hasPendingTasks.pipe((0,Te.w)(p=>p?(0,_e.of)(!1):this.zoneIsStable),(0,be.x)(),(0,ve.B)()),this._injector=Ot(Jo)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(p,m){const v=p instanceof qb;if(!this._injector.get(Bh).done)throw!v&&os(p),new ne(405,!1);let C;C=v?p:this._injector.get(nu).resolveComponentFactory(p),this.componentTypes.push(C.componentType);const T=function iw(c){return c.isBoundToModule}(C)?void 0:this._injector.get(nl),B=C.create(yo.NULL,[],m||C.selector,T),W=B.location.nativeElement,X=B.injector.get(Uh,null);return X?.registerApplication(W),B.onDestroy(()=>{this.detachView(B.hostView),zu(this.components,B),X?.unregisterApplication(W)}),this._loadComponent(B),B}tick(){if(this._runningTick)throw new ne(101,!1);try{this._runningTick=!0;for(let p of this._views)p.detectChanges()}catch(p){this.internalErrorHandler(p)}finally{this._runningTick=!1}}attachView(p){const m=p;this._views.push(m),m.attachToAppRef(this)}detachView(p){const m=p;zu(this._views,m),m.detachFromAppRef()}_loadComponent(p){this.attachView(p.hostView),this.tick(),this.components.push(p);const m=this._injector.get(Yh,[]);m.push(...this._bootstrapListeners),m.forEach(v=>v(p))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(p=>p()),this._views.slice().forEach(p=>p.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(p){return this._destroyListeners.push(p),()=>zu(this._destroyListeners,p)}destroy(){if(this._destroyed)throw new ne(406,!1);const p=this._injector;p.destroy&&!p.destroyed&&p.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();function zu(c,h){const p=c.indexOf(h);p>-1&&c.splice(p,1)}const lw=new yt("",{providedIn:"root",factory:()=>Ot(Da).handleError.bind(void 0)});function nT(){const c=Ot(Tr),h=Ot(Da);return p=>c.runOutsideAngular(()=>h.handleError(p))}let iT=(()=>{class c{constructor(){this.zone=Ot(Tr),this.applicationRef=Ot(bc)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();function cw(){}let uw=(()=>{class c{static#e=this.__NG_ELEMENT_ID__=DC}return c})();function DC(c){return function oT(c,h,p){if(et(c)&&!p){const m=yi(c.index,h);return new au(m,m)}return 47&c.type?new au(h[wn],h):null}(yr(),Ze(),16==(16&c))}class TC{constructor(){}supports(h){return Wd(h)}create(h){return new dT(h)}}const uT=(c,h)=>h;class dT{constructor(h){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=h||uT}forEachItem(h){let p;for(p=this._itHead;null!==p;p=p._next)h(p)}forEachOperation(h){let p=this._itHead,m=this._removalsHead,v=0,y=null;for(;p||m;){const C=!m||p&&p.currentIndex{C=this._trackByFn(v,T),null!==p&&Object.is(p.trackById,C)?(m&&(p=this._verifyReinsertion(p,T,C,v)),Object.is(p.item,T)||this._addIdentityChange(p,T)):(p=this._mismatch(p,T,C,v),m=!0),p=p._next,v++}),this.length=v;return this._truncate(p),this.collection=h,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let h;for(h=this._previousItHead=this._itHead;null!==h;h=h._next)h._nextPrevious=h._next;for(h=this._additionsHead;null!==h;h=h._nextAdded)h.previousIndex=h.currentIndex;for(this._additionsHead=this._additionsTail=null,h=this._movesHead;null!==h;h=h._nextMoved)h.previousIndex=h.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(h,p,m,v){let y;return null===h?y=this._itTail:(y=h._prev,this._remove(h)),null!==(h=null===this._unlinkedRecords?null:this._unlinkedRecords.get(m,null))?(Object.is(h.item,p)||this._addIdentityChange(h,p),this._reinsertAfter(h,y,v)):null!==(h=null===this._linkedRecords?null:this._linkedRecords.get(m,v))?(Object.is(h.item,p)||this._addIdentityChange(h,p),this._moveAfter(h,y,v)):h=this._addAfter(new fw(p,m),y,v),h}_verifyReinsertion(h,p,m,v){let y=null===this._unlinkedRecords?null:this._unlinkedRecords.get(m,null);return null!==y?h=this._reinsertAfter(y,h._prev,v):h.currentIndex!=v&&(h.currentIndex=v,this._addToMoves(h,v)),h}_truncate(h){for(;null!==h;){const p=h._next;this._addToRemovals(this._unlink(h)),h=p}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(h,p,m){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(h);const v=h._prevRemoved,y=h._nextRemoved;return null===v?this._removalsHead=y:v._nextRemoved=y,null===y?this._removalsTail=v:y._prevRemoved=v,this._insertAfter(h,p,m),this._addToMoves(h,m),h}_moveAfter(h,p,m){return this._unlink(h),this._insertAfter(h,p,m),this._addToMoves(h,m),h}_addAfter(h,p,m){return this._insertAfter(h,p,m),this._additionsTail=null===this._additionsTail?this._additionsHead=h:this._additionsTail._nextAdded=h,h}_insertAfter(h,p,m){const v=null===p?this._itHead:p._next;return h._next=v,h._prev=p,null===v?this._itTail=h:v._prev=h,null===p?this._itHead=h:p._next=h,null===this._linkedRecords&&(this._linkedRecords=new gw),this._linkedRecords.put(h),h.currentIndex=m,h}_remove(h){return this._addToRemovals(this._unlink(h))}_unlink(h){null!==this._linkedRecords&&this._linkedRecords.remove(h);const p=h._prev,m=h._next;return null===p?this._itHead=m:p._next=m,null===m?this._itTail=p:m._prev=p,h}_addToMoves(h,p){return h.previousIndex===p||(this._movesTail=null===this._movesTail?this._movesHead=h:this._movesTail._nextMoved=h),h}_addToRemovals(h){return null===this._unlinkedRecords&&(this._unlinkedRecords=new gw),this._unlinkedRecords.put(h),h.currentIndex=null,h._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=h,h._prevRemoved=null):(h._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=h),h}_addIdentityChange(h,p){return h.item=p,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=h:this._identityChangesTail._nextIdentityChange=h,h}}class fw{constructor(h,p){this.item=h,this.trackById=p,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class pw{constructor(){this._head=null,this._tail=null}add(h){null===this._head?(this._head=this._tail=h,h._nextDup=null,h._prevDup=null):(this._tail._nextDup=h,h._prevDup=this._tail,h._nextDup=null,this._tail=h)}get(h,p){let m;for(m=this._head;null!==m;m=m._nextDup)if((null===p||p<=m.currentIndex)&&Object.is(m.trackById,h))return m;return null}remove(h){const p=h._prevDup,m=h._nextDup;return null===p?this._head=m:p._nextDup=m,null===m?this._tail=p:m._prevDup=p,null===this._head}}class gw{constructor(){this.map=new Map}put(h){const p=h.trackById;let m=this.map.get(p);m||(m=new pw,this.map.set(p,m)),m.add(h)}get(h,p){const v=this.map.get(h);return v?v.get(h,p):null}remove(h){const p=h.trackById;return this.map.get(p).remove(h)&&this.map.delete(p),h}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function d(c,h,p){const m=c.previousIndex;if(null===m)return m;let v=0;return p&&m{if(p&&p.key===v)this._maybeAddToChanges(p,m),this._appendAfter=p,p=p._next;else{const y=this._getOrCreateRecordForKey(v,m);p=this._insertBeforeOrAppend(p,y)}}),p){p._prev&&(p._prev._next=null),this._removalsHead=p;for(let m=p;null!==m;m=m._nextRemoved)m===this._mapHead&&(this._mapHead=null),this._records.delete(m.key),m._nextRemoved=m._next,m.previousValue=m.currentValue,m.currentValue=null,m._prev=null,m._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(h,p){if(h){const m=h._prev;return p._next=h,p._prev=m,h._prev=p,m&&(m._next=p),h===this._mapHead&&(this._mapHead=p),this._appendAfter=h,h}return this._appendAfter?(this._appendAfter._next=p,p._prev=this._appendAfter):this._mapHead=p,this._appendAfter=p,null}_getOrCreateRecordForKey(h,p){if(this._records.has(h)){const v=this._records.get(h);this._maybeAddToChanges(v,p);const y=v._prev,C=v._next;return y&&(y._next=C),C&&(C._prev=y),v._next=null,v._prev=null,v}const m=new g(h);return this._records.set(h,m),m.currentValue=p,this._addToAdditions(m),m}_reset(){if(this.isDirty){let h;for(this._previousMapHead=this._mapHead,h=this._previousMapHead;null!==h;h=h._next)h._nextPrevious=h._next;for(h=this._changesHead;null!==h;h=h._nextChanged)h.previousValue=h.currentValue;for(h=this._additionsHead;null!=h;h=h._nextAdded)h.previousValue=h.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(h,p){Object.is(p,h.currentValue)||(h.previousValue=h.currentValue,h.currentValue=p,this._addToChanges(h))}_addToAdditions(h){null===this._additionsHead?this._additionsHead=this._additionsTail=h:(this._additionsTail._nextAdded=h,this._additionsTail=h)}_addToChanges(h){null===this._changesHead?this._changesHead=this._changesTail=h:(this._changesTail._nextChanged=h,this._changesTail=h)}_forEach(h,p){h instanceof Map?h.forEach(p):Object.keys(h).forEach(m=>p(h[m],m))}}class g{constructor(h){this.key=h,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function _(){return new S([new TC])}let S=(()=>{class c{static#e=this.\u0275prov=Ut({token:c,providedIn:"root",factory:_});constructor(p){this.factories=p}static create(p,m){if(null!=m){const v=m.factories.slice();p=p.concat(v)}return new c(p)}static extend(p){return{provide:c,useFactory:m=>c.create(p,m||_()),deps:[[c,new Fc,new Nc]]}}find(p){const m=this.factories.find(v=>v.supports(p));if(null!=m)return m;throw new ne(901,!1)}}return c})();function J(){return new te([new f])}let te=(()=>{class c{static#e=this.\u0275prov=Ut({token:c,providedIn:"root",factory:J});constructor(p){this.factories=p}static create(p,m){if(m){const v=m.factories.slice();p=p.concat(v)}return new c(p)}static extend(p){return{provide:c,useFactory:m=>c.create(p,m||J()),deps:[[c,new Fc,new Nc]]}}find(p){const m=this.factories.find(v=>v.supports(p));if(m)return m;throw new ne(901,!1)}}return c})();const un=_C(null,"core",[]);let Xn=(()=>{class c{constructor(p){}static#e=this.\u0275fac=function(m){return new(m||c)(Mt(bc))};static#t=this.\u0275mod=oo({type:c});static#n=this.\u0275inj=mn({})}return c})();function iI(c){return"boolean"==typeof c?c:null!=c&&"false"!==c}function sI(c,h){const p=Zt(c),m=h.elementInjector||Pd();return new lu(p).create(m,h.projectableNodes,h.hostElement,h.environmentInjector)}function oI(c){const h=Zt(c);if(!h)return null;const p=new lu(h);return{get selector(){return p.selector},get type(){return p.componentType},get inputs(){return p.inputs},get outputs(){return p.outputs},get ngContentSelectors(){return p.ngContentSelectors},get isStandalone(){return h.standalone},get isSignal(){return h.signals}}}},9223:(ct,De,L)=>{L.d(De,{Cf:()=>Re,EJ:()=>Rr,F:()=>Si,Fd:()=>Er,Fj:()=>ke,JJ:()=>Vi,JL:()=>xi,K7:()=>Ft,Kr:()=>As,Mq:()=>To,NI:()=>di,On:()=>Ki,UX:()=>ds,Wl:()=>ae,YN:()=>ri,_:()=>wr,_Y:()=>Yr,a5:()=>mn,cw:()=>Be,eT:()=>Ts,kI:()=>ut,qQ:()=>Kr,sg:()=>_i,u:()=>dt,u5:()=>lo,wV:()=>ii,x0:()=>Ui});var l=L(3714),k=L(3223),de=L(3477),re=L(6548),ce=L(5990);let _e=(()=>{class z{constructor(P,Y){this._renderer=P,this._elementRef=Y,this.onChange=se=>{},this.onTouched=()=>{}}setProperty(P,Y){this._renderer.setProperty(this._elementRef.nativeElement,P,Y)}registerOnTouched(P){this.onTouched=P}registerOnChange(P){this.onChange=P}setDisabledState(P){this.setProperty("disabled",P)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(l.Qsj),l.Y36(l.SBq))};static#t=this.\u0275dir=l.lG2({type:z})}return z})(),ve=(()=>{class z extends _e{static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,features:[l.qOj]})}return z})();const Te=new l.OlP("NgValueAccessor"),be={provide:Te,useExisting:(0,l.Gpc)(()=>ae),multi:!0};let ae=(()=>{class z extends ve{writeValue(P){this.setProperty("checked",P)}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("change",function(nn){return se.onChange(nn.target.checked)})("blur",function(){return se.onTouched()})},features:[l._Bn([be]),l.qOj]})}return z})();const fe={provide:Te,useExisting:(0,l.Gpc)(()=>ke),multi:!0},Ve=new l.OlP("CompositionEventMode");let ke=(()=>{class z extends _e{constructor(P,Y,se){super(P,Y),this._compositionMode=se,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function ye(){const z=(0,k.q)()?(0,k.q)().getUserAgent():"";return/android (\d+)/.test(z.toLowerCase())}())}writeValue(P){this.setProperty("value",P??"")}_handleInput(P){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(P)}_compositionStart(){this._composing=!0}_compositionEnd(P){this._composing=!1,this._compositionMode&&this.onChange(P)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(l.Qsj),l.Y36(l.SBq),l.Y36(Ve,8))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("input",function(nn){return se._handleInput(nn.target.value)})("blur",function(){return se.onTouched()})("compositionstart",function(){return se._compositionStart()})("compositionend",function(nn){return se._compositionEnd(nn.target.value)})},features:[l._Bn([fe]),l.qOj]})}return z})();function He(z){return null==z||("string"==typeof z||Array.isArray(z))&&0===z.length}function Le(z){return null!=z&&"number"==typeof z.length}const Re=new l.OlP("NgValidators"),at=new l.OlP("NgAsyncValidators"),Dt=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class ut{static min($){return ne($)}static max($){return Pe($)}static required($){return function Me(z){return He(z.value)?{required:!0}:null}($)}static requiredTrue($){return function nt(z){return!0===z.value?null:{required:!0}}($)}static email($){return function it(z){return He(z.value)||Dt.test(z.value)?null:{email:!0}}($)}static minLength($){return function Je(z){return $=>He($.value)||!Le($.value)?null:$.value.lengthLe($.value)&&$.value.length>z?{maxlength:{requiredLength:z,actualLength:$.value.length}}:null}($)}static pattern($){return function mt(z){if(!z)return $t;let $,P;return"string"==typeof z?(P="","^"!==z.charAt(0)&&(P+="^"),P+=z,"$"!==z.charAt(z.length-1)&&(P+="$"),$=new RegExp(P)):(P=z.toString(),$=z),Y=>{if(He(Y.value))return null;const se=Y.value;return $.test(se)?null:{pattern:{requiredPattern:P,actualValue:se}}}}($)}static nullValidator($){return null}static compose($){return xe($)}static composeAsync($){return Fe($)}}function ne(z){return $=>{if(He($.value)||He(z))return null;const P=parseFloat($.value);return!isNaN(P)&&P{if(He($.value)||He(z))return null;const P=parseFloat($.value);return!isNaN(P)&&P>z?{max:{max:z,actual:$.value}}:null}}function $t(z){return null}function Vn(z){return null!=z}function Sn(z){return(0,l.QGY)(z)?(0,de.D)(z):z}function Bn(z){let $={};return z.forEach(P=>{$=null!=P?{...$,...P}:$}),0===Object.keys($).length?null:$}function Nt(z,$){return $.map(P=>P(z))}function Qi(z){return z.map($=>function Ar(z){return!z.validate}($)?$:P=>$.validate(P))}function xe(z){if(!z)return null;const $=z.filter(Vn);return 0==$.length?null:function(P){return Bn(Nt(P,$))}}function Oe(z){return null!=z?xe(Qi(z)):null}function Fe(z){if(!z)return null;const $=z.filter(Vn);return 0==$.length?null:function(P){const Y=Nt(P,$).map(Sn);return(0,re.D)(Y).pipe((0,ce.U)(Bn))}}function Ne(z){return null!=z?Fe(Qi(z)):null}function We(z,$){return null===z?[$]:Array.isArray(z)?[...z,$]:[z,$]}function Ke(z){return z._rawValidators}function _t(z){return z._rawAsyncValidators}function ot(z){return z?Array.isArray(z)?z:[z]:[]}function ei(z,$){return Array.isArray(z)?z.includes($):z===$}function Xe(z,$){const P=ot($);return ot(z).forEach(se=>{ei(P,se)||P.push(se)}),P}function cn(z,$){return ot($).filter(P=>!ei(z,P))}class Ut{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators($){this._rawValidators=$||[],this._composedValidatorFn=Oe(this._rawValidators)}_setAsyncValidators($){this._rawAsyncValidators=$||[],this._composedAsyncValidatorFn=Ne(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy($){this._onDestroyCallbacks.push($)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach($=>$()),this._onDestroyCallbacks=[]}reset($=void 0){this.control&&this.control.reset($)}hasError($,P){return!!this.control&&this.control.hasError($,P)}getError($,P){return this.control?this.control.getError($,P):null}}class kt extends Ut{get formDirective(){return null}get path(){return null}}class mn extends Ut{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class li{constructor($){this._cd=$}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let Vi=(()=>{class z extends li{constructor(P){super(P)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(mn,2))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(Y,se){2&Y&&l.ekj("ng-untouched",se.isUntouched)("ng-touched",se.isTouched)("ng-pristine",se.isPristine)("ng-dirty",se.isDirty)("ng-valid",se.isValid)("ng-invalid",se.isInvalid)("ng-pending",se.isPending)},features:[l.qOj]})}return z})(),xi=(()=>{class z extends li{constructor(P){super(P)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,10))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(Y,se){2&Y&&l.ekj("ng-untouched",se.isUntouched)("ng-touched",se.isTouched)("ng-pristine",se.isPristine)("ng-dirty",se.isDirty)("ng-valid",se.isValid)("ng-invalid",se.isInvalid)("ng-pending",se.isPending)("ng-submitted",se.isSubmitted)},features:[l.qOj]})}return z})();const Nn="VALID",qi="INVALID",ti="PENDING",ni="DISABLED";function $n(z){return(Bi(z)?z.validators:z)||null}function rr(z,$){return(Bi($)?$.asyncValidators:z)||null}function Bi(z){return null!=z&&!Array.isArray(z)&&"object"==typeof z}class ws{constructor($,P){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators($),this._assignAsyncValidators(P)}get validator(){return this._composedValidatorFn}set validator($){this._rawValidators=this._composedValidatorFn=$}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator($){this._rawAsyncValidators=this._composedAsyncValidatorFn=$}get parent(){return this._parent}get valid(){return this.status===Nn}get invalid(){return this.status===qi}get pending(){return this.status==ti}get disabled(){return this.status===ni}get enabled(){return this.status!==ni}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators($){this._assignValidators($)}setAsyncValidators($){this._assignAsyncValidators($)}addValidators($){this.setValidators(Xe($,this._rawValidators))}addAsyncValidators($){this.setAsyncValidators(Xe($,this._rawAsyncValidators))}removeValidators($){this.setValidators(cn($,this._rawValidators))}removeAsyncValidators($){this.setAsyncValidators(cn($,this._rawAsyncValidators))}hasValidator($){return ei(this._rawValidators,$)}hasAsyncValidator($){return ei(this._rawAsyncValidators,$)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched($={}){this.touched=!0,this._parent&&!$.onlySelf&&this._parent.markAsTouched($)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild($=>$.markAllAsTouched())}markAsUntouched($={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(P=>{P.markAsUntouched({onlySelf:!0})}),this._parent&&!$.onlySelf&&this._parent._updateTouched($)}markAsDirty($={}){this.pristine=!1,this._parent&&!$.onlySelf&&this._parent.markAsDirty($)}markAsPristine($={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(P=>{P.markAsPristine({onlySelf:!0})}),this._parent&&!$.onlySelf&&this._parent._updatePristine($)}markAsPending($={}){this.status=ti,!1!==$.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!$.onlySelf&&this._parent.markAsPending($)}disable($={}){const P=this._parentMarkedDirty($.onlySelf);this.status=ni,this.errors=null,this._forEachChild(Y=>{Y.disable({...$,onlySelf:!0})}),this._updateValue(),!1!==$.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...$,skipPristineCheck:P}),this._onDisabledChange.forEach(Y=>Y(!0))}enable($={}){const P=this._parentMarkedDirty($.onlySelf);this.status=Nn,this._forEachChild(Y=>{Y.enable({...$,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:$.emitEvent}),this._updateAncestors({...$,skipPristineCheck:P}),this._onDisabledChange.forEach(Y=>Y(!1))}_updateAncestors($){this._parent&&!$.onlySelf&&(this._parent.updateValueAndValidity($),$.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent($){this._parent=$}getRawValue(){return this.value}updateValueAndValidity($={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Nn||this.status===ti)&&this._runAsyncValidator($.emitEvent)),!1!==$.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!$.onlySelf&&this._parent.updateValueAndValidity($)}_updateTreeValidity($={emitEvent:!0}){this._forEachChild(P=>P._updateTreeValidity($)),this.updateValueAndValidity({onlySelf:!0,emitEvent:$.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ni:Nn}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator($){if(this.asyncValidator){this.status=ti,this._hasOwnPendingAsyncValidator=!0;const P=Sn(this.asyncValidator(this));this._asyncValidationSubscription=P.subscribe(Y=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(Y,{emitEvent:$})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors($,P={}){this.errors=$,this._updateControlsErrors(!1!==P.emitEvent)}get($){let P=$;return null==P||(Array.isArray(P)||(P=P.split(".")),0===P.length)?null:P.reduce((Y,se)=>Y&&Y._find(se),this)}getError($,P){const Y=P?this.get(P):this;return Y&&Y.errors?Y.errors[$]:null}hasError($,P){return!!this.getError($,P)}get root(){let $=this;for(;$._parent;)$=$._parent;return $}_updateControlsErrors($){this.status=this._calculateStatus(),$&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors($)}_initObservables(){this.valueChanges=new l.vpe,this.statusChanges=new l.vpe}_calculateStatus(){return this._allControlsDisabled()?ni:this.errors?qi:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ti)?ti:this._anyControlsHaveStatus(qi)?qi:Nn}_anyControlsHaveStatus($){return this._anyControls(P=>P.status===$)}_anyControlsDirty(){return this._anyControls($=>$.dirty)}_anyControlsTouched(){return this._anyControls($=>$.touched)}_updatePristine($={}){this.pristine=!this._anyControlsDirty(),this._parent&&!$.onlySelf&&this._parent._updatePristine($)}_updateTouched($={}){this.touched=this._anyControlsTouched(),this._parent&&!$.onlySelf&&this._parent._updateTouched($)}_registerOnCollectionChange($){this._onCollectionChange=$}_setUpdateStrategy($){Bi($)&&null!=$.updateOn&&(this._updateOn=$.updateOn)}_parentMarkedDirty($){return!$&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find($){return null}_assignValidators($){this._rawValidators=Array.isArray($)?$.slice():$,this._composedValidatorFn=function vi(z){return Array.isArray(z)?Oe(z):z||null}(this._rawValidators)}_assignAsyncValidators($){this._rawAsyncValidators=Array.isArray($)?$.slice():$,this._composedAsyncValidatorFn=function Mr(z){return Array.isArray(z)?Ne(z):z||null}(this._rawAsyncValidators)}}class Be extends ws{constructor($,P,Y){super($n(P),rr(Y,P)),this.controls=$,this._initObservables(),this._setUpdateStrategy(P),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl($,P){return this.controls[$]?this.controls[$]:(this.controls[$]=P,P.setParent(this),P._registerOnCollectionChange(this._onCollectionChange),P)}addControl($,P,Y={}){this.registerControl($,P),this.updateValueAndValidity({emitEvent:Y.emitEvent}),this._onCollectionChange()}removeControl($,P={}){this.controls[$]&&this.controls[$]._registerOnCollectionChange(()=>{}),delete this.controls[$],this.updateValueAndValidity({emitEvent:P.emitEvent}),this._onCollectionChange()}setControl($,P,Y={}){this.controls[$]&&this.controls[$]._registerOnCollectionChange(()=>{}),delete this.controls[$],P&&this.registerControl($,P),this.updateValueAndValidity({emitEvent:Y.emitEvent}),this._onCollectionChange()}contains($){return this.controls.hasOwnProperty($)&&this.controls[$].enabled}setValue($,P={}){(function Hi(z,$,P){z._forEachChild((Y,se)=>{if(void 0===P[se])throw new l.vHH(1002,"")})})(this,0,$),Object.keys($).forEach(Y=>{(function Pi(z,$,P){const Y=z.controls;if(!($?Object.keys(Y):Y).length)throw new l.vHH(1e3,"");if(!Y[P])throw new l.vHH(1001,"")})(this,!0,Y),this.controls[Y].setValue($[Y],{onlySelf:!0,emitEvent:P.emitEvent})}),this.updateValueAndValidity(P)}patchValue($,P={}){null!=$&&(Object.keys($).forEach(Y=>{const se=this.controls[Y];se&&se.patchValue($[Y],{onlySelf:!0,emitEvent:P.emitEvent})}),this.updateValueAndValidity(P))}reset($={},P={}){this._forEachChild((Y,se)=>{Y.reset($?$[se]:null,{onlySelf:!0,emitEvent:P.emitEvent})}),this._updatePristine(P),this._updateTouched(P),this.updateValueAndValidity(P)}getRawValue(){return this._reduceChildren({},($,P,Y)=>($[Y]=P.getRawValue(),$))}_syncPendingControls(){let $=this._reduceChildren(!1,(P,Y)=>!!Y._syncPendingControls()||P);return $&&this.updateValueAndValidity({onlySelf:!0}),$}_forEachChild($){Object.keys(this.controls).forEach(P=>{const Y=this.controls[P];Y&&$(Y,P)})}_setUpControls(){this._forEachChild($=>{$.setParent(this),$._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls($){for(const[P,Y]of Object.entries(this.controls))if(this.contains(P)&&$(Y))return!0;return!1}_reduceValue(){return this._reduceChildren({},(P,Y,se)=>((Y.enabled||this.disabled)&&(P[se]=Y.value),P))}_reduceChildren($,P){let Y=$;return this._forEachChild((se,Tt)=>{Y=P(Y,se,Tt)}),Y}_allControlsDisabled(){for(const $ of Object.keys(this.controls))if(this.controls[$].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find($){return this.controls.hasOwnProperty($)?this.controls[$]:null}}const lt=new l.OlP("CallSetDisabledState",{providedIn:"root",factory:()=>Et}),Et="always";function Mt(z,$){return[...$.path,z]}function sn(z,$,P=Et){ge(z,$),$.valueAccessor.writeValue(z.value),(z.disabled||"always"===P)&&$.valueAccessor.setDisabledState?.(z.disabled),function ue(z,$){$.valueAccessor.registerOnChange(P=>{z._pendingValue=P,z._pendingChange=!0,z._pendingDirty=!0,"change"===z.updateOn&&qe(z,$)})}(z,$),function st(z,$){const P=(Y,se)=>{$.valueAccessor.writeValue(Y),se&&$.viewToModelUpdate(Y)};z.registerOnChange(P),$._registerOnDestroy(()=>{z._unregisterOnChange(P)})}(z,$),function ze(z,$){$.valueAccessor.registerOnTouched(()=>{z._pendingTouched=!0,"blur"===z.updateOn&&z._pendingChange&&qe(z,$),"submit"!==z.updateOn&&z.markAsTouched()})}(z,$),function ji(z,$){if($.valueAccessor.setDisabledState){const P=Y=>{$.valueAccessor.setDisabledState(Y)};z.registerOnDisabledChange(P),$._registerOnDestroy(()=>{z._unregisterOnDisabledChange(P)})}}(z,$)}function Ot(z,$,P=!0){const Y=()=>{};$.valueAccessor&&($.valueAccessor.registerOnChange(Y),$.valueAccessor.registerOnTouched(Y)),oe(z,$),z&&($._invokeOnDestroyCallbacks(),z._registerOnCollectionChange(()=>{}))}function Gn(z,$){z.forEach(P=>{P.registerOnValidatorChange&&P.registerOnValidatorChange($)})}function ge(z,$){const P=Ke(z);null!==$.validator?z.setValidators(We(P,$.validator)):"function"==typeof P&&z.setValidators([P]);const Y=_t(z);null!==$.asyncValidator?z.setAsyncValidators(We(Y,$.asyncValidator)):"function"==typeof Y&&z.setAsyncValidators([Y]);const se=()=>z.updateValueAndValidity();Gn($._rawValidators,se),Gn($._rawAsyncValidators,se)}function oe(z,$){let P=!1;if(null!==z){if(null!==$.validator){const se=Ke(z);if(Array.isArray(se)&&se.length>0){const Tt=se.filter(nn=>nn!==$.validator);Tt.length!==se.length&&(P=!0,z.setValidators(Tt))}}if(null!==$.asyncValidator){const se=_t(z);if(Array.isArray(se)&&se.length>0){const Tt=se.filter(nn=>nn!==$.asyncValidator);Tt.length!==se.length&&(P=!0,z.setAsyncValidators(Tt))}}}const Y=()=>{};return Gn($._rawValidators,Y),Gn($._rawAsyncValidators,Y),P}function qe(z,$){z._pendingDirty&&z.markAsDirty(),z.setValue(z._pendingValue,{emitModelToViewChange:!1}),$.viewToModelUpdate(z._pendingValue),z._pendingChange=!1}function rt(z,$){ge(z,$)}function Fn(z,$){if(!z.hasOwnProperty("model"))return!1;const P=z.model;return!!P.isFirstChange()||!Object.is($,P.currentValue)}function Wt(z,$){z._syncPendingControls(),$.forEach(P=>{const Y=P.control;"submit"===Y.updateOn&&Y._pendingChange&&(P.viewToModelUpdate(Y._pendingValue),Y._pendingChange=!1)})}function dn(z,$){if(!$)return null;let P,Y,se;return Array.isArray($),$.forEach(Tt=>{Tt.constructor===ke?P=Tt:function xn(z){return Object.getPrototypeOf(z.constructor)===ve}(Tt)?Y=Tt:se=Tt}),se||Y||P||null}const Yn={provide:kt,useExisting:(0,l.Gpc)(()=>Si)},Wn=(()=>Promise.resolve())();let Si=(()=>{class z extends kt{constructor(P,Y,se){super(),this.callSetDisabledState=se,this.submitted=!1,this._directives=new Set,this.ngSubmit=new l.vpe,this.form=new Be({},Oe(P),Ne(Y))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(P){Wn.then(()=>{const Y=this._findContainer(P.path);P.control=Y.registerControl(P.name,P.control),sn(P.control,P,this.callSetDisabledState),P.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(P)})}getControl(P){return this.form.get(P.path)}removeControl(P){Wn.then(()=>{const Y=this._findContainer(P.path);Y&&Y.removeControl(P.name),this._directives.delete(P)})}addFormGroup(P){Wn.then(()=>{const Y=this._findContainer(P.path),se=new Be({});rt(se,P),Y.registerControl(P.name,se),se.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(P){Wn.then(()=>{const Y=this._findContainer(P.path);Y&&Y.removeControl(P.name)})}getFormGroup(P){return this.form.get(P.path)}updateModel(P,Y){Wn.then(()=>{this.form.get(P.path).setValue(Y)})}setValue(P){this.control.setValue(P)}onSubmit(P){return this.submitted=!0,Wt(this.form,this._directives),this.ngSubmit.emit(P),"dialog"===P?.target?.method}onReset(){this.resetForm()}resetForm(P=void 0){this.form.reset(P),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(P){return P.pop(),P.length?this.form.get(P):this.form}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(Re,10),l.Y36(at,10),l.Y36(lt,8))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("submit",function(nn){return se.onSubmit(nn)})("reset",function(){return se.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[l._Bn([Yn]),l.qOj]})}return z})();function Ti(z,$){const P=z.indexOf($);P>-1&&z.splice(P,1)}function sr(z){return"object"==typeof z&&null!==z&&2===Object.keys(z).length&&"value"in z&&"disabled"in z}const di=class extends ws{constructor($=null,P,Y){super($n(P),rr(Y,P)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState($),this._setUpdateStrategy(P),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Bi(P)&&(P.nonNullable||P.initialValueIsDefault)&&(this.defaultValue=sr($)?$.value:$)}setValue($,P={}){this.value=this._pendingValue=$,this._onChange.length&&!1!==P.emitModelToViewChange&&this._onChange.forEach(Y=>Y(this.value,!1!==P.emitViewToModelChange)),this.updateValueAndValidity(P)}patchValue($,P={}){this.setValue($,P)}reset($=this.defaultValue,P={}){this._applyFormState($),this.markAsPristine(P),this.markAsUntouched(P),this.setValue(this.value,P),this._pendingChange=!1}_updateValue(){}_anyControls($){return!1}_allControlsDisabled(){return this.disabled}registerOnChange($){this._onChange.push($)}_unregisterOnChange($){Ti(this._onChange,$)}registerOnDisabledChange($){this._onDisabledChange.push($)}_unregisterOnDisabledChange($){Ti(this._onDisabledChange,$)}_forEachChild($){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState($){sr($)?(this.value=this._pendingValue=$.value,$.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=$}};let hn=(()=>{class z extends kt{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Mt(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,features:[l.qOj]})}return z})();const Oa={provide:kt,useExisting:(0,l.Gpc)(()=>To)};let To=(()=>{class z extends hn{constructor(P,Y,se){super(),this.name="",this._parent=P,this._setValidators(Y),this._setAsyncValidators(se)}_checkParentType(){}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,5),l.Y36(Re,10),l.Y36(at,10))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[l._Bn([Oa]),l.qOj]})}return z})();const Io={provide:mn,useExisting:(0,l.Gpc)(()=>Ki)},Jt=(()=>Promise.resolve())();let Ki=(()=>{class z extends mn{constructor(P,Y,se,Tt,nn,An){super(),this._changeDetectorRef=nn,this.callSetDisabledState=An,this.control=new di,this._registered=!1,this.name="",this.update=new l.vpe,this._parent=P,this._setValidators(Y),this._setAsyncValidators(se),this.valueAccessor=dn(0,Tt)}ngOnChanges(P){if(this._checkForErrors(),!this._registered||"name"in P){if(this._registered&&(this._checkName(),this.formDirective)){const Y=P.name.previousValue;this.formDirective.removeControl({name:Y,path:this._getPath(Y)})}this._setUpControl()}"isDisabled"in P&&this._updateDisabled(P),Fn(P,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(P){this.viewModel=P,this.update.emit(P)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){sn(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(P){Jt.then(()=>{this.control.setValue(P,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(P){const Y=P.isDisabled.currentValue,se=0!==Y&&(0,l.VuI)(Y);Jt.then(()=>{se&&!this.control.disabled?this.control.disable():!se&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(P){return this._parent?Mt(P,this._parent):[P]}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,9),l.Y36(Re,10),l.Y36(at,10),l.Y36(Te,10),l.Y36(l.sBO,8),l.Y36(lt,8))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[l._Bn([Io]),l.qOj,l.TTD]})}return z})(),Yr=(()=>{class z{static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}return z})();const $o={provide:Te,useExisting:(0,l.Gpc)(()=>ii),multi:!0};let ii=(()=>{class z extends ve{writeValue(P){this.setProperty("value",P??"")}registerOnChange(P){this.onChange=Y=>{P(""==Y?null:parseFloat(Y))}}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("input",function(nn){return se.onChange(nn.target.value)})("blur",function(){return se.onTouched()})},features:[l._Bn([$o]),l.qOj]})}return z})();const Es={provide:Te,useExisting:(0,l.Gpc)(()=>wr),multi:!0};let oo=(()=>{class z{static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275mod=l.oAB({type:z});static#n=this.\u0275inj=l.cJS({})}return z})(),Ao=(()=>{class z{constructor(){this._accessors=[]}add(P,Y){this._accessors.push([P,Y])}remove(P){for(let Y=this._accessors.length-1;Y>=0;--Y)if(this._accessors[Y][1]===P)return void this._accessors.splice(Y,1)}select(P){this._accessors.forEach(Y=>{this._isSameGroup(Y,P)&&Y[1]!==P&&Y[1].fireUncheck(P.value)})}_isSameGroup(P,Y){return!!P[0].control&&P[0]._parent===Y._control._parent&&P[1].name===Y.name}static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275prov=l.Yz7({token:z,factory:z.\u0275fac,providedIn:oo})}return z})(),wr=(()=>{class z extends ve{constructor(P,Y,se,Tt){super(P,Y),this._registry=se,this._injector=Tt,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=(0,l.f3M)(lt,{optional:!0})??Et}ngOnInit(){this._control=this._injector.get(mn),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(P){this._state=P===this.value,this.setProperty("checked",this._state)}registerOnChange(P){this._fn=P,this.onChange=()=>{P(this.value),this._registry.select(this)}}setDisabledState(P){(this.setDisabledStateFired||P||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",P),this.setDisabledStateFired=!0}fireUncheck(P){this.writeValue(P)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(l.Qsj),l.Y36(l.SBq),l.Y36(Ao),l.Y36(l.zs3))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("change",function(){return se.onChange()})("blur",function(){return se.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[l._Bn([Es]),l.qOj]})}return z})();const Or={provide:Te,useExisting:(0,l.Gpc)(()=>Ts),multi:!0};let Ts=(()=>{class z extends ve{writeValue(P){this.setProperty("value",parseFloat(P))}registerOnChange(P){this.onChange=Y=>{P(""==Y?null:parseFloat(Y))}}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("change",function(nn){return se.onChange(nn.target.value)})("input",function(nn){return se.onChange(nn.target.value)})("blur",function(){return se.onTouched()})},features:[l._Bn([Or]),l.qOj]})}return z})();const Zt=new l.OlP("NgModelWithFormControlWarning"),os={provide:kt,useExisting:(0,l.Gpc)(()=>_i)};let _i=(()=>{class z extends kt{constructor(P,Y,se){super(),this.callSetDisabledState=se,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new l.vpe,this._setValidators(P),this._setAsyncValidators(Y)}ngOnChanges(P){this._checkFormPresent(),P.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(oe(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(P){const Y=this.form.get(P.path);return sn(Y,P,this.callSetDisabledState),Y.updateValueAndValidity({emitEvent:!1}),this.directives.push(P),Y}getControl(P){return this.form.get(P.path)}removeControl(P){Ot(P.control||null,P,!1),function zi(z,$){const P=z.indexOf($);P>-1&&z.splice(P,1)}(this.directives,P)}addFormGroup(P){this._setUpFormContainer(P)}removeFormGroup(P){this._cleanUpFormContainer(P)}getFormGroup(P){return this.form.get(P.path)}addFormArray(P){this._setUpFormContainer(P)}removeFormArray(P){this._cleanUpFormContainer(P)}getFormArray(P){return this.form.get(P.path)}updateModel(P,Y){this.form.get(P.path).setValue(Y)}onSubmit(P){return this.submitted=!0,Wt(this.form,this.directives),this.ngSubmit.emit(P),"dialog"===P?.target?.method}onReset(){this.resetForm()}resetForm(P=void 0){this.form.reset(P),this.submitted=!1}_updateDomValue(){this.directives.forEach(P=>{const Y=P.control,se=this.form.get(P.path);Y!==se&&(Ot(Y||null,P),(z=>z instanceof di)(se)&&(sn(se,P,this.callSetDisabledState),P.control=se))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(P){const Y=this.form.get(P.path);rt(Y,P),Y.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(P){if(this.form){const Y=this.form.get(P.path);Y&&function Kt(z,$){return oe(z,$)}(Y,P)&&Y.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ge(this.form,this),this._oldForm&&oe(this._oldForm,this)}_checkFormPresent(){}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(Re,10),l.Y36(at,10),l.Y36(lt,8))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","formGroup",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("submit",function(nn){return se.onSubmit(nn)})("reset",function(){return se.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[l._Bn([os]),l.qOj,l.TTD]})}return z})();const Wr={provide:kt,useExisting:(0,l.Gpc)(()=>Ui)};let Ui=(()=>{class z extends hn{constructor(P,Y,se){super(),this.name=null,this._parent=P,this._setValidators(Y),this._setAsyncValidators(se)}_checkParentType(){Is(this._parent)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,13),l.Y36(Re,10),l.Y36(at,10))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[l._Bn([Wr]),l.qOj]})}return z})();const as={provide:kt,useExisting:(0,l.Gpc)(()=>Zr)};let Zr=(()=>{class z extends kt{constructor(P,Y,se){super(),this.name=null,this._parent=P,this._setValidators(Y),this._setAsyncValidators(se)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Mt(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){Is(this._parent)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,13),l.Y36(Re,10),l.Y36(at,10))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[l._Bn([as]),l.qOj]})}return z})();function Is(z){return!(z instanceof Ui||z instanceof _i||z instanceof Zr)}const On={provide:mn,useExisting:(0,l.Gpc)(()=>dt)};let dt=(()=>{class z extends mn{set isDisabled(P){}static#e=this._ngModelWarningSentOnce=!1;constructor(P,Y,se,Tt,nn){super(),this._ngModelWarningConfig=nn,this._added=!1,this.name=null,this.update=new l.vpe,this._ngModelWarningSent=!1,this._parent=P,this._setValidators(Y),this._setAsyncValidators(se),this.valueAccessor=dn(0,Tt)}ngOnChanges(P){this._added||this._setUpControl(),Fn(P,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(P){this.viewModel=P,this.update.emit(P)}get path(){return Mt(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static#t=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,13),l.Y36(Re,10),l.Y36(at,10),l.Y36(Te,10),l.Y36(Zt,8))};static#n=this.\u0275dir=l.lG2({type:z,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[l._Bn([On]),l.qOj,l.TTD]})}return z})();const Ht={provide:Te,useExisting:(0,l.Gpc)(()=>Rr),multi:!0};function _n(z,$){return null==z?`${$}`:($&&"object"==typeof $&&($="Object"),`${z}: ${$}`.slice(0,50))}let Rr=(()=>{class z extends ve{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(P){this._compareWith=P}writeValue(P){this.value=P;const se=_n(this._getOptionId(P),P);this.setProperty("value",se)}registerOnChange(P){this.onChange=Y=>{this.value=this._getOptionValue(Y),P(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(P){for(const Y of this._optionMap.keys())if(this._compareWith(this._optionMap.get(Y),P))return Y;return null}_getOptionValue(P){const Y=function fi(z){return z.split(":")[0]}(P);return this._optionMap.has(Y)?this._optionMap.get(Y):P}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("change",function(nn){return se.onChange(nn.target.value)})("blur",function(){return se.onTouched()})},inputs:{compareWith:"compareWith"},features:[l._Bn([Ht]),l.qOj]})}return z})(),ri=(()=>{class z{constructor(P,Y,se){this._element=P,this._renderer=Y,this._select=se,this._select&&(this.id=this._select._registerOption())}set ngValue(P){null!=this._select&&(this._select._optionMap.set(this.id,P),this._setElementValue(_n(this.id,P)),this._select.writeValue(this._select.value))}set value(P){this._setElementValue(P),this._select&&this._select.writeValue(this._select.value)}_setElementValue(P){this._renderer.setProperty(this._element.nativeElement,"value",P)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(Rr,9))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}return z})();const mr={provide:Te,useExisting:(0,l.Gpc)(()=>Ft),multi:!0};function yn(z,$){return null==z?`${$}`:("string"==typeof $&&($=`'${$}'`),$&&"object"==typeof $&&($="Object"),`${z}: ${$}`.slice(0,50))}let Ft=(()=>{class z extends ve{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(P){this._compareWith=P}writeValue(P){let Y;if(this.value=P,Array.isArray(P)){const se=P.map(Tt=>this._getOptionId(Tt));Y=(Tt,nn)=>{Tt._setSelected(se.indexOf(nn.toString())>-1)}}else Y=(se,Tt)=>{se._setSelected(!1)};this._optionMap.forEach(Y)}registerOnChange(P){this.onChange=Y=>{const se=[],Tt=Y.selectedOptions;if(void 0!==Tt){const nn=Tt;for(let An=0;An{class z{constructor(P,Y,se){this._element=P,this._renderer=Y,this._select=se,this._select&&(this.id=this._select._registerOption(this))}set ngValue(P){null!=this._select&&(this._value=P,this._setElementValue(yn(this.id,P)),this._select.writeValue(this._select.value))}set value(P){this._select?(this._value=P,this._setElementValue(yn(this.id,P)),this._select.writeValue(this._select.value)):this._setElementValue(P)}_setElementValue(P){this._renderer.setProperty(this._element.nativeElement,"value",P)}_setSelected(P){this._renderer.setProperty(this._element.nativeElement,"selected",P)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(Ft,9))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}return z})();function qr(z){return"number"==typeof z?z:parseFloat(z)}let wn=(()=>{class z{constructor(){this._validator=$t}ngOnChanges(P){if(this.inputName in P){const Y=this.normalizeInput(P[this.inputName].currentValue);this._enabled=this.enabled(Y),this._validator=this._enabled?this.createValidator(Y):$t,this._onChange&&this._onChange()}}validate(P){return this._validator(P)}registerOnValidatorChange(P){this._onChange=P}enabled(P){return null!=P}static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275dir=l.lG2({type:z,features:[l.TTD]})}return z})();const Gs={provide:Re,useExisting:(0,l.Gpc)(()=>Er),multi:!0};let Er=(()=>{class z extends wn{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=P=>qr(P),this.createValidator=P=>Pe(P)}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(Y,se){2&Y&&l.uIk("max",se._enabled?se.max:null)},inputs:{max:"max"},features:[l._Bn([Gs]),l.qOj]})}return z})();const $i={provide:Re,useExisting:(0,l.Gpc)(()=>Kr),multi:!0};let Kr=(()=>{class z extends wn{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=P=>qr(P),this.createValidator=P=>ne(P)}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(Y,se){2&Y&&l.uIk("min",se._enabled?se.min:null)},inputs:{min:"min"},features:[l._Bn([$i]),l.qOj]})}return z})(),Qn=(()=>{class z{static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275mod=l.oAB({type:z});static#n=this.\u0275inj=l.cJS({imports:[oo]})}return z})(),lo=(()=>{class z{static withConfig(P){return{ngModule:z,providers:[{provide:lt,useValue:P.callSetDisabledState??Et}]}}static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275mod=l.oAB({type:z});static#n=this.\u0275inj=l.cJS({imports:[Qn]})}return z})(),ds=(()=>{class z{static withConfig(P){return{ngModule:z,providers:[{provide:Zt,useValue:P.warnOnNgModelWithFormControl??"always"},{provide:lt,useValue:P.callSetDisabledState??Et}]}}static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275mod=l.oAB({type:z});static#n=this.\u0275inj=l.cJS({imports:[Qn]})}return z})()},5813:(ct,De,L)=>{L.d(De,{Dx:()=>nr,b2:()=>an,q6:()=>Ut,se:()=>Je});var l=L(3714),k=L(3223);class de extends k.w_{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class re extends de{static makeCurrent(){(0,k.HT)(new re)}onAndCancel(we,ie,pe){return we.addEventListener(ie,pe),()=>{we.removeEventListener(ie,pe)}}dispatchEvent(we,ie){we.dispatchEvent(ie)}remove(we){we.parentNode&&we.parentNode.removeChild(we)}createElement(we,ie){return(ie=ie||this.getDefaultDocument()).createElement(we)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(we){return we.nodeType===Node.ELEMENT_NODE}isShadowRoot(we){return we instanceof DocumentFragment}getGlobalEventTarget(we,ie){return"window"===ie?window:"document"===ie?we:"body"===ie?we.body:null}getBaseHref(we){const ie=function _e(){return ce=ce||document.querySelector("base"),ce?ce.getAttribute("href"):null}();return null==ie?null:function Te(Be){ve=ve||document.createElement("a"),ve.setAttribute("href",Be);const we=ve.pathname;return"/"===we.charAt(0)?we:`/${we}`}(ie)}resetBaseElement(){ce=null}getUserAgent(){return window.navigator.userAgent}getCookie(we){return(0,k.Mx)(document.cookie,we)}}let ve,ce=null,ae=(()=>{class Be{build(){return new XMLHttpRequest}static#e=this.\u0275fac=function(pe){return new(pe||Be)};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();const fe=new l.OlP("EventManagerPlugins");let ye=(()=>{class Be{constructor(ie,pe){this._zone=pe,this._eventNameToPlugin=new Map,ie.forEach($e=>{$e.manager=this}),this._plugins=ie.slice().reverse()}addEventListener(ie,pe,$e){return this._findPluginFor(pe).addEventListener(ie,pe,$e)}getZone(){return this._zone}_findPluginFor(ie){let pe=this._eventNameToPlugin.get(ie);if(pe)return pe;if(pe=this._plugins.find(lt=>lt.supports(ie)),!pe)throw new l.vHH(5101,!1);return this._eventNameToPlugin.set(ie,pe),pe}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(fe),l.LFG(l.R0b))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();class Ve{constructor(we){this._doc=we}}const ke="ng-app-id";let He=(()=>{class Be{constructor(ie,pe,$e,lt={}){this.doc=ie,this.appId=pe,this.nonce=$e,this.platformId=lt,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=(0,k.PM)(lt),this.resetHostNodes()}addStyles(ie){for(const pe of ie)1===this.changeUsageCount(pe,1)&&this.onStyleAdded(pe)}removeStyles(ie){for(const pe of ie)this.changeUsageCount(pe,-1)<=0&&this.onStyleRemoved(pe)}ngOnDestroy(){const ie=this.styleNodesInDOM;ie&&(ie.forEach(pe=>pe.remove()),ie.clear());for(const pe of this.getAllStyles())this.onStyleRemoved(pe);this.resetHostNodes()}addHost(ie){this.hostNodes.add(ie);for(const pe of this.getAllStyles())this.addStyleToHost(ie,pe)}removeHost(ie){this.hostNodes.delete(ie)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(ie){for(const pe of this.hostNodes)this.addStyleToHost(pe,ie)}onStyleRemoved(ie){const pe=this.styleRef;pe.get(ie)?.elements?.forEach($e=>$e.remove()),pe.delete(ie)}collectServerRenderedStyles(){const ie=this.doc.head?.querySelectorAll(`style[${ke}="${this.appId}"]`);if(ie?.length){const pe=new Map;return ie.forEach($e=>{null!=$e.textContent&&pe.set($e.textContent,$e)}),pe}return null}changeUsageCount(ie,pe){const $e=this.styleRef;if($e.has(ie)){const lt=$e.get(ie);return lt.usage+=pe,lt.usage}return $e.set(ie,{usage:pe,elements:[]}),pe}getStyleElement(ie,pe){const $e=this.styleNodesInDOM,lt=$e?.get(pe);if(lt?.parentNode===ie)return $e.delete(pe),lt.removeAttribute(ke),lt;{const Et=this.doc.createElement("style");return this.nonce&&Et.setAttribute("nonce",this.nonce),Et.textContent=pe,this.platformIsServer&&Et.setAttribute(ke,this.appId),Et}}addStyleToHost(ie,pe){const $e=this.getStyleElement(ie,pe);ie.appendChild($e);const lt=this.styleRef,Et=lt.get(pe)?.elements;Et?Et.push($e):lt.set(pe,{elements:[$e],usage:1})}resetHostNodes(){const ie=this.hostNodes;ie.clear(),ie.add(this.doc.head)}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(k.K0),l.LFG(l.AFp),l.LFG(l.Ojb,8),l.LFG(l.Lbi))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();const Le={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},Re=/%COMP%/g,Pe=new l.OlP("RemoveStylesOnCompDestroy",{providedIn:"root",factory:()=>!1});function it(Be,we){return we.map(ie=>ie.replace(Re,Be))}let Je=(()=>{class Be{constructor(ie,pe,$e,lt,Et,Mt,sn,Ot=null){this.eventManager=ie,this.sharedStylesHost=pe,this.appId=$e,this.removeStylesOnCompDestroy=lt,this.doc=Et,this.platformId=Mt,this.ngZone=sn,this.nonce=Ot,this.rendererByCompId=new Map,this.platformIsServer=(0,k.PM)(Mt),this.defaultRenderer=new wt(ie,Et,sn,this.platformIsServer)}createRenderer(ie,pe){if(!ie||!pe)return this.defaultRenderer;this.platformIsServer&&pe.encapsulation===l.ifc.ShadowDom&&(pe={...pe,encapsulation:l.ifc.Emulated});const $e=this.getOrCreateRenderer(ie,pe);return $e instanceof Nt?$e.applyToHost(ie):$e instanceof Bn&&$e.applyStyles(),$e}getOrCreateRenderer(ie,pe){const $e=this.rendererByCompId;let lt=$e.get(pe.id);if(!lt){const Et=this.doc,Mt=this.ngZone,sn=this.eventManager,Ot=this.sharedStylesHost,Gn=this.removeStylesOnCompDestroy,ji=this.platformIsServer;switch(pe.encapsulation){case l.ifc.Emulated:lt=new Nt(sn,Ot,pe,this.appId,Gn,Et,Mt,ji);break;case l.ifc.ShadowDom:return new Sn(sn,Ot,ie,pe,Et,Mt,this.nonce,ji);default:lt=new Bn(sn,Ot,pe,Gn,Et,Mt,ji)}$e.set(pe.id,lt)}return lt}ngOnDestroy(){this.rendererByCompId.clear()}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(ye),l.LFG(He),l.LFG(l.AFp),l.LFG(Pe),l.LFG(k.K0),l.LFG(l.Lbi),l.LFG(l.R0b),l.LFG(l.Ojb))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();class wt{constructor(we,ie,pe,$e){this.eventManager=we,this.doc=ie,this.ngZone=pe,this.platformIsServer=$e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(we,ie){return ie?this.doc.createElementNS(Le[ie]||ie,we):this.doc.createElement(we)}createComment(we){return this.doc.createComment(we)}createText(we){return this.doc.createTextNode(we)}appendChild(we,ie){(Vn(we)?we.content:we).appendChild(ie)}insertBefore(we,ie,pe){we&&(Vn(we)?we.content:we).insertBefore(ie,pe)}removeChild(we,ie){we&&we.removeChild(ie)}selectRootElement(we,ie){let pe="string"==typeof we?this.doc.querySelector(we):we;if(!pe)throw new l.vHH(-5104,!1);return ie||(pe.textContent=""),pe}parentNode(we){return we.parentNode}nextSibling(we){return we.nextSibling}setAttribute(we,ie,pe,$e){if($e){ie=$e+":"+ie;const lt=Le[$e];lt?we.setAttributeNS(lt,ie,pe):we.setAttribute(ie,pe)}else we.setAttribute(ie,pe)}removeAttribute(we,ie,pe){if(pe){const $e=Le[pe];$e?we.removeAttributeNS($e,ie):we.removeAttribute(`${pe}:${ie}`)}else we.removeAttribute(ie)}addClass(we,ie){we.classList.add(ie)}removeClass(we,ie){we.classList.remove(ie)}setStyle(we,ie,pe,$e){$e&(l.JOm.DashCase|l.JOm.Important)?we.style.setProperty(ie,pe,$e&l.JOm.Important?"important":""):we.style[ie]=pe}removeStyle(we,ie,pe){pe&l.JOm.DashCase?we.style.removeProperty(ie):we.style[ie]=""}setProperty(we,ie,pe){we[ie]=pe}setValue(we,ie){we.nodeValue=ie}listen(we,ie,pe){if("string"==typeof we&&!(we=(0,k.q)().getGlobalEventTarget(this.doc,we)))throw new Error(`Unsupported event target ${we} for event ${ie}`);return this.eventManager.addEventListener(we,ie,this.decoratePreventDefault(pe))}decoratePreventDefault(we){return ie=>{if("__ngUnwrap__"===ie)return we;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>we(ie)):we(ie))&&ie.preventDefault()}}}function Vn(Be){return"TEMPLATE"===Be.tagName&&void 0!==Be.content}class Sn extends wt{constructor(we,ie,pe,$e,lt,Et,Mt,sn){super(we,lt,Et,sn),this.sharedStylesHost=ie,this.hostEl=pe,this.shadowRoot=pe.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const Ot=it($e.id,$e.styles);for(const Gn of Ot){const ji=document.createElement("style");Mt&&ji.setAttribute("nonce",Mt),ji.textContent=Gn,this.shadowRoot.appendChild(ji)}}nodeOrShadowRoot(we){return we===this.hostEl?this.shadowRoot:we}appendChild(we,ie){return super.appendChild(this.nodeOrShadowRoot(we),ie)}insertBefore(we,ie,pe){return super.insertBefore(this.nodeOrShadowRoot(we),ie,pe)}removeChild(we,ie){return super.removeChild(this.nodeOrShadowRoot(we),ie)}parentNode(we){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(we)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class Bn extends wt{constructor(we,ie,pe,$e,lt,Et,Mt,sn){super(we,lt,Et,Mt),this.sharedStylesHost=ie,this.removeStylesOnCompDestroy=$e,this.styles=sn?it(sn,pe.styles):pe.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class Nt extends Bn{constructor(we,ie,pe,$e,lt,Et,Mt,sn){const Ot=$e+"-"+pe.id;super(we,ie,pe,lt,Et,Mt,sn,Ot),this.contentAttr=function Me(Be){return"_ngcontent-%COMP%".replace(Re,Be)}(Ot),this.hostAttr=function nt(Be){return"_nghost-%COMP%".replace(Re,Be)}(Ot)}applyToHost(we){this.applyStyles(),this.setAttribute(we,this.hostAttr,"")}createElement(we,ie){const pe=super.createElement(we,ie);return super.setAttribute(pe,this.contentAttr,""),pe}}let Ar=(()=>{class Be extends Ve{constructor(ie){super(ie)}supports(ie){return!0}addEventListener(ie,pe,$e){return ie.addEventListener(pe,$e,!1),()=>this.removeEventListener(ie,pe,$e)}removeEventListener(ie,pe,$e){return ie.removeEventListener(pe,$e)}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(k.K0))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();const Qi=["alt","control","meta","shift"],xe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Oe={alt:Be=>Be.altKey,control:Be=>Be.ctrlKey,meta:Be=>Be.metaKey,shift:Be=>Be.shiftKey};let Fe=(()=>{class Be extends Ve{constructor(ie){super(ie)}supports(ie){return null!=Be.parseEventName(ie)}addEventListener(ie,pe,$e){const lt=Be.parseEventName(pe),Et=Be.eventCallback(lt.fullKey,$e,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>(0,k.q)().onAndCancel(ie,lt.domEventName,Et))}static parseEventName(ie){const pe=ie.toLowerCase().split("."),$e=pe.shift();if(0===pe.length||"keydown"!==$e&&"keyup"!==$e)return null;const lt=Be._normalizeKey(pe.pop());let Et="",Mt=pe.indexOf("code");if(Mt>-1&&(pe.splice(Mt,1),Et="code."),Qi.forEach(Ot=>{const Gn=pe.indexOf(Ot);Gn>-1&&(pe.splice(Gn,1),Et+=Ot+".")}),Et+=lt,0!=pe.length||0===lt.length)return null;const sn={};return sn.domEventName=$e,sn.fullKey=Et,sn}static matchEventFullKeyCode(ie,pe){let $e=xe[ie.key]||ie.key,lt="";return pe.indexOf("code.")>-1&&($e=ie.code,lt="code."),!(null==$e||!$e)&&($e=$e.toLowerCase()," "===$e?$e="space":"."===$e&&($e="dot"),Qi.forEach(Et=>{Et!==$e&&(0,Oe[Et])(ie)&&(lt+=Et+".")}),lt+=$e,lt===pe)}static eventCallback(ie,pe,$e){return lt=>{Be.matchEventFullKeyCode(lt,ie)&&$e.runGuarded(()=>pe(lt))}}static _normalizeKey(ie){return"esc"===ie?"escape":ie}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(k.K0))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();const Ut=(0,l.eFA)(l._c5,"browser",[{provide:l.Lbi,useValue:k.bD},{provide:l.g9A,useValue:function ot(){re.makeCurrent()},multi:!0},{provide:k.K0,useFactory:function Xe(){return(0,l.RDi)(document),document},deps:[]}]),kt=new l.OlP(""),mn=[{provide:l.rWj,useClass:class be{addToWindow(we){l.dqk.getAngularTestability=(pe,$e=!0)=>{const lt=we.findTestabilityInTree(pe,$e);if(null==lt)throw new l.vHH(5103,!1);return lt},l.dqk.getAllAngularTestabilities=()=>we.getAllTestabilities(),l.dqk.getAllAngularRootElements=()=>we.getAllRootElements(),l.dqk.frameworkStabilizers||(l.dqk.frameworkStabilizers=[]),l.dqk.frameworkStabilizers.push(pe=>{const $e=l.dqk.getAllAngularTestabilities();let lt=$e.length,Et=!1;const Mt=function(sn){Et=Et||sn,lt--,0==lt&&pe(Et)};$e.forEach(sn=>{sn.whenStable(Mt)})})}findTestabilityInTree(we,ie,pe){return null==ie?null:we.getTestability(ie)??(pe?(0,k.q)().isShadowRoot(ie)?this.findTestabilityInTree(we,ie.host,!0):this.findTestabilityInTree(we,ie.parentElement,!0):null)}},deps:[]},{provide:l.lri,useClass:l.dDg,deps:[l.R0b,l.eoX,l.rWj]},{provide:l.dDg,useClass:l.dDg,deps:[l.R0b,l.eoX,l.rWj]}],li=[{provide:l.zSh,useValue:"root"},{provide:l.qLn,useFactory:function ei(){return new l.qLn},deps:[]},{provide:fe,useClass:Ar,multi:!0,deps:[k.K0,l.R0b,l.Lbi]},{provide:fe,useClass:Fe,multi:!0,deps:[k.K0]},Je,He,ye,{provide:l.FYo,useExisting:Je},{provide:k.JF,useClass:ae,deps:[]},[]];let an=(()=>{class Be{constructor(ie){}static withServerTransition(ie){return{ngModule:Be,providers:[{provide:l.AFp,useValue:ie.appId}]}}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(kt,12))};static#t=this.\u0275mod=l.oAB({type:Be});static#n=this.\u0275inj=l.cJS({providers:[...li,...mn],imports:[k.ez,l.hGG]})}return Be})(),nr=(()=>{class Be{constructor(ie){this._doc=ie}getTitle(){return this._doc.title}setTitle(ie){this._doc.title=ie||""}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(k.K0))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:function(pe){let $e=null;return $e=pe?new pe:function fr(){return new nr((0,l.LFG)(k.K0))}(),$e},providedIn:"root"})}return Be})();typeof window<"u"&&window},1794:(ct,De,L)=>{L.d(De,{gz:()=>Ui,m2:()=>di,OD:()=>sr,wm:()=>yi,F0:()=>on,rH:()=>vt,Od:()=>Bt,Bz:()=>yr,lC:()=>Rr});var l=L(3714),k=L(2861),de=L(3477),re=L(287),ce=L(8626),_e=L(841),ve=L(4938),Te=L(8402),be=L(1145),ae=L(9417);function fe(I){return new be.y(O=>{(0,ae.Xf)(I()).subscribe(O)})}var ye=L(5357),Ve=L(89);function ke(I,O){const w=(0,Ve.m)(I)?I:()=>I,R=H=>H.error(w());return new be.y(O?H=>O.schedule(R,0,H):R)}var He=L(1288),Le=L(5350),Re=L(4134),at=L(8014);function Dt(){return(0,Re.e)((I,O)=>{let w=null;I._refCount++;const R=(0,at.x)(O,void 0,void 0,void 0,()=>{if(!I||I._refCount<=0||0<--I._refCount)return void(w=null);const H=I._connection,Q=w;w=null,H&&(!Q||H===Q)&&H.unsubscribe(),O.unsubscribe()});I.subscribe(R),R.closed||(w=I.connect())})}class ut extends be.y{constructor(O,w){super(),this.source=O,this.subjectFactory=w,this._subject=null,this._refCount=0,this._connection=null,(0,Re.A)(O)&&(this.lift=O.lift)}_subscribe(O){return this.getSubject().subscribe(O)}getSubject(){const O=this._subject;return(!O||O.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:O}=this;this._subject=this._connection=null,O?.unsubscribe()}connect(){let O=this._connection;if(!O){O=this._connection=new Le.w0;const w=this.getSubject();O.add(this.source.subscribe((0,at.x)(w,void 0,()=>{this._teardown(),w.complete()},R=>{this._teardown(),w.error(R)},()=>this._teardown()))),O.closed&&(this._connection=null,O=Le.w0.EMPTY)}return O}refCount(){return Dt()(this)}}var ne=L(5992),Pe=L(3223),Me=L(5990),nt=L(3318),it=L(4359),Je=L(1553),wt=L(9735),mt=L(2874),$t=L(2972),Vn=L(1173),Sn=L(8527);function Bn(I){return(0,Re.e)((O,w)=>{let Q,R=null,H=!1;R=O.subscribe((0,at.x)(w,void 0,void 0,ee=>{Q=(0,ae.Xf)(I(ee,Bn(I)(O))),R?(R.unsubscribe(),R=null,Q.subscribe(w)):H=!0})),H&&(R.unsubscribe(),R=null,Q.subscribe(w))})}var Qi=L(4475);function xe(I){return I<=0?()=>He.E:(0,Re.e)((O,w)=>{let R=[];O.subscribe((0,at.x)(w,H=>{R.push(H),I{for(const H of R)w.next(H);w.complete()},void 0,()=>{R=null}))})}var Oe=L(8090),Fe=L(1106),We=L(3197),Ke=L(5220),_t=L(7701),ot=L(8563),ei=L(5813);const Xe="primary",cn=Symbol("RouteTitle");class Ut{constructor(O){this.params=O||{}}has(O){return Object.prototype.hasOwnProperty.call(this.params,O)}get(O){if(this.has(O)){const w=this.params[O];return Array.isArray(w)?w[0]:w}return null}getAll(O){if(this.has(O)){const w=this.params[O];return Array.isArray(w)?w:[w]}return[]}get keys(){return Object.keys(this.params)}}function kt(I){return new Ut(I)}function mn(I,O,w){const R=w.path.split("/");if(R.length>I.length||"full"===w.pathMatch&&(O.hasChildren()||R.lengthR[Q]===H)}return I===O}function Vi(I){return I.length>0?I[I.length-1]:null}function xi(I){return(0,k.b)(I)?I:(0,l.QGY)(I)?(0,de.D)(Promise.resolve(I)):(0,re.of)(I)}const fr={exact:function xt(I,O,w){if(!yt(I.segments,O.segments)||!pr(I.segments,O.segments,w)||I.numberOfChildren!==O.numberOfChildren)return!1;for(const R in O.children)if(!I.children[R]||!xt(I.children[R],O.children[R],w))return!1;return!0},subset:qt},nr={exact:function Oi(I,O){return an(I,O)},subset:function en(I,O){return Object.keys(O).length<=Object.keys(I).length&&Object.keys(O).every(w=>Li(I[w],O[w]))},ignored:()=>!0};function ir(I,O,w){return fr[w.paths](I.root,O.root,w.matrixParams)&&nr[w.queryParams](I.queryParams,O.queryParams)&&!("exact"===w.fragment&&I.fragment!==O.fragment)}function qt(I,O,w){return ci(I,O,O.segments,w)}function ci(I,O,w,R){if(I.segments.length>w.length){const H=I.segments.slice(0,w.length);return!(!yt(H,w)||O.hasChildren()||!pr(H,w,R))}if(I.segments.length===w.length){if(!yt(I.segments,w)||!pr(I.segments,w,R))return!1;for(const H in O.children)if(!I.children[H]||!qt(I.children[H],O.children[H],R))return!1;return!0}{const H=w.slice(0,I.segments.length),Q=w.slice(I.segments.length);return!!(yt(I.segments,H)&&pr(I.segments,H,R)&&I.children[Xe])&&ci(I.children[Xe],O,Q,R)}}function pr(I,O,w){return O.every((R,H)=>nr[w](I[H].parameters,R.parameters))}class Ri{constructor(O=new bt([],{}),w={},R=null){this.root=O,this.queryParams=w,this.fragment=R}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=kt(this.queryParams)),this._queryParamMap}toString(){return Nn.serialize(this)}}class bt{constructor(O,w){this.segments=O,this.children=w,this.parent=null,Object.values(w).forEach(R=>R.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return qi(this)}}class Un{constructor(O,w){this.path=O,this.parameters=w}get parameterMap(){return this._parameterMap||(this._parameterMap=kt(this.parameters)),this._parameterMap}toString(){return Pi(this)}}function yt(I,O){return I.length===O.length&&I.every((w,R)=>w.path===O[R].path)}let tn=(()=>{class I{static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:function(){return new Dr},providedIn:"root"})}return I})();class Dr{parse(O){const w=new sn(O);return new Ri(w.parseRootSegment(),w.parseQueryParams(),w.parseFragment())}serialize(O){const w=`/${ti(O.root,!0)}`,R=function ws(I){const O=Object.keys(I).map(w=>{const R=I[w];return Array.isArray(R)?R.map(H=>`${$n(w)}=${$n(H)}`).join("&"):`${$n(w)}=${$n(R)}`}).filter(w=>!!w);return O.length?`?${O.join("&")}`:""}(O.queryParams);return`${w}${R}${"string"==typeof O.fragment?`#${function vi(I){return encodeURI(I)}(O.fragment)}`:""}`}}const Nn=new Dr;function qi(I){return I.segments.map(O=>Pi(O)).join("/")}function ti(I,O){if(!I.hasChildren())return qi(I);if(O){const w=I.children[Xe]?ti(I.children[Xe],!1):"",R=[];return Object.entries(I.children).forEach(([H,Q])=>{H!==Xe&&R.push(`${H}:${ti(Q,!1)}`)}),R.length>0?`${w}(${R.join("//")})`:w}{const w=function $r(I,O){let w=[];return Object.entries(I.children).forEach(([R,H])=>{R===Xe&&(w=w.concat(O(H,R)))}),Object.entries(I.children).forEach(([R,H])=>{R!==Xe&&(w=w.concat(O(H,R)))}),w}(I,(R,H)=>H===Xe?[ti(I.children[Xe],!1)]:[`${H}:${ti(R,!1)}`]);return 1===Object.keys(I.children).length&&null!=I.children[Xe]?`${qi(I)}/${w[0]}`:`${qi(I)}/(${w.join("//")})`}}function ni(I){return encodeURIComponent(I).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $n(I){return ni(I).replace(/%3B/gi,";")}function rr(I){return ni(I).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Mr(I){return decodeURIComponent(I)}function Bi(I){return Mr(I.replace(/\+/g,"%20"))}function Pi(I){return`${rr(I.path)}${function Hi(I){return Object.keys(I).map(O=>`;${rr(O)}=${rr(I[O])}`).join("")}(I.parameters)}`}const Be=/^[^\/()?;#]+/;function we(I){const O=I.match(Be);return O?O[0]:""}const ie=/^[^\/()?;=#]+/,$e=/^[^=?&#]+/,Et=/^[^&#]+/;class sn{constructor(O){this.url=O,this.remaining=O}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new bt([],{}):new bt([],this.parseChildren())}parseQueryParams(){const O={};if(this.consumeOptional("?"))do{this.parseQueryParam(O)}while(this.consumeOptional("&"));return O}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const O=[];for(this.peekStartsWith("(")||O.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),O.push(this.parseSegment());let w={};this.peekStartsWith("/(")&&(this.capture("/"),w=this.parseParens(!0));let R={};return this.peekStartsWith("(")&&(R=this.parseParens(!1)),(O.length>0||Object.keys(w).length>0)&&(R[Xe]=new bt(O,w)),R}parseSegment(){const O=we(this.remaining);if(""===O&&this.peekStartsWith(";"))throw new l.vHH(4009,!1);return this.capture(O),new Un(Mr(O),this.parseMatrixParams())}parseMatrixParams(){const O={};for(;this.consumeOptional(";");)this.parseParam(O);return O}parseParam(O){const w=function pe(I){const O=I.match(ie);return O?O[0]:""}(this.remaining);if(!w)return;this.capture(w);let R="";if(this.consumeOptional("=")){const H=we(this.remaining);H&&(R=H,this.capture(R))}O[Mr(w)]=Mr(R)}parseQueryParam(O){const w=function lt(I){const O=I.match($e);return O?O[0]:""}(this.remaining);if(!w)return;this.capture(w);let R="";if(this.consumeOptional("=")){const ee=function Mt(I){const O=I.match(Et);return O?O[0]:""}(this.remaining);ee&&(R=ee,this.capture(R))}const H=Bi(w),Q=Bi(R);if(O.hasOwnProperty(H)){let ee=O[H];Array.isArray(ee)||(ee=[ee],O[H]=ee),ee.push(Q)}else O[H]=Q}parseParens(O){const w={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const R=we(this.remaining),H=this.remaining[R.length];if("/"!==H&&")"!==H&&";"!==H)throw new l.vHH(4010,!1);let Q;R.indexOf(":")>-1?(Q=R.slice(0,R.indexOf(":")),this.capture(Q),this.capture(":")):O&&(Q=Xe);const ee=this.parseChildren();w[Q]=1===Object.keys(ee).length?ee[Xe]:new bt([],ee),this.consumeOptional("//")}return w}peekStartsWith(O){return this.remaining.startsWith(O)}consumeOptional(O){return!!this.peekStartsWith(O)&&(this.remaining=this.remaining.substring(O.length),!0)}capture(O){if(!this.consumeOptional(O))throw new l.vHH(4011,!1)}}function Ot(I){return I.segments.length>0?new bt([],{[Xe]:I}):I}function Gn(I){const O={};for(const R of Object.keys(I.children)){const Q=Gn(I.children[R]);if(R===Xe&&0===Q.segments.length&&Q.hasChildren())for(const[ee,Ae]of Object.entries(Q.children))O[ee]=Ae;else(Q.segments.length>0||Q.hasChildren())&&(O[R]=Q)}return function ji(I){if(1===I.numberOfChildren&&I.children[Xe]){const O=I.children[Xe];return new bt(I.segments.concat(O.segments),O.children)}return I}(new bt(I.segments,O))}function ge(I){return I instanceof Ri}function ue(I){let O;const H=Ot(function w(Q){const ee={};for(const Ie of Q.children){const pt=w(Ie);ee[Ie.outlet]=pt}const Ae=new bt(Q.url,ee);return Q===I&&(O=Ae),Ae}(I.root));return O??H}function ze(I,O,w,R){let H=I;for(;H.parent;)H=H.parent;if(0===O.length)return rt(H,H,H,w,R);const Q=function En(I){if("string"==typeof I[0]&&1===I.length&&"/"===I[0])return new ht(!0,0,I);let O=0,w=!1;const R=I.reduce((H,Q,ee)=>{if("object"==typeof Q&&null!=Q){if(Q.outlets){const Ae={};return Object.entries(Q.outlets).forEach(([Ie,pt])=>{Ae[Ie]="string"==typeof pt?pt.split("/"):pt}),[...H,{outlets:Ae}]}if(Q.segmentPath)return[...H,Q.segmentPath]}return"string"!=typeof Q?[...H,Q]:0===ee?(Q.split("/").forEach((Ae,Ie)=>{0==Ie&&"."===Ae||(0==Ie&&""===Ae?w=!0:".."===Ae?O++:""!=Ae&&H.push(Ae))}),H):[...H,Q]},[]);return new ht(w,O,R)}(O);if(Q.toRoot())return rt(H,H,new bt([],{}),w,R);const ee=function wi(I,O,w){if(I.isAbsolute)return new ui(O,!0,0);if(!w)return new ui(O,!1,NaN);if(null===w.parent)return new ui(w,!0,0);const R=qe(I.commands[0])?0:1;return function Ei(I,O,w){let R=I,H=O,Q=w;for(;Q>H;){if(Q-=H,R=R.parent,!R)throw new l.vHH(4005,!1);H=R.segments.length}return new ui(R,!1,H-Q)}(w,w.segments.length-1+R,I.numberOfDoubleDots)}(Q,H,I),Ae=ee.processChildren?Wt(ee.segmentGroup,ee.index,Q.commands):xn(ee.segmentGroup,ee.index,Q.commands);return rt(H,ee.segmentGroup,Ae,w,R)}function qe(I){return"object"==typeof I&&null!=I&&!I.outlets&&!I.segmentPath}function st(I){return"object"==typeof I&&null!=I&&I.outlets}function rt(I,O,w,R,H){let ee,Q={};R&&Object.entries(R).forEach(([Ie,pt])=>{Q[Ie]=Array.isArray(pt)?pt.map(Qt=>`${Qt}`):`${pt}`}),ee=I===O?w:Kt(I,O,w);const Ae=Ot(Gn(ee));return new Ri(Ae,Q,H)}function Kt(I,O,w){const R={};return Object.entries(I.children).forEach(([H,Q])=>{R[H]=Q===O?w:Kt(Q,O,w)}),new bt(I.segments,R)}class ht{constructor(O,w,R){if(this.isAbsolute=O,this.numberOfDoubleDots=w,this.commands=R,O&&R.length>0&&qe(R[0]))throw new l.vHH(4003,!1);const H=R.find(st);if(H&&H!==Vi(R))throw new l.vHH(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ui{constructor(O,w,R){this.segmentGroup=O,this.processChildren=w,this.index=R}}function xn(I,O,w){if(I||(I=new bt([],{})),0===I.segments.length&&I.hasChildren())return Wt(I,O,w);const R=function dn(I,O,w){let R=0,H=O;const Q={match:!1,pathIndex:0,commandIndex:0};for(;H=w.length)return Q;const ee=I.segments[H],Ae=w[R];if(st(Ae))break;const Ie=`${Ae}`,pt=R0&&void 0===Ie)break;if(Ie&&pt&&"object"==typeof pt&&void 0===pt.outlets){if(!Wn(Ie,pt,ee))return Q;R+=2}else{if(!Wn(Ie,{},ee))return Q;R++}H++}return{match:!0,pathIndex:H,commandIndex:R}}(I,O,w),H=w.slice(R.commandIndex);if(R.match&&R.pathIndexQ!==Xe)&&I.children[Xe]&&1===I.numberOfChildren&&0===I.children[Xe].segments.length){const Q=Wt(I.children[Xe],O,w);return new bt(I.segments,Q.children)}return Object.entries(R).forEach(([Q,ee])=>{"string"==typeof ee&&(ee=[ee]),null!==ee&&(H[Q]=xn(I.children[Q],O,ee))}),Object.entries(I.children).forEach(([Q,ee])=>{void 0===R[Q]&&(H[Q]=ee)}),new bt(I.segments,H)}}function zi(I,O,w){const R=I.segments.slice(0,O);let H=0;for(;H{"string"==typeof R&&(R=[R]),null!==R&&(O[w]=zi(new bt([],{}),0,R))}),O}function Yn(I){const O={};return Object.entries(I).forEach(([w,R])=>O[w]=`${R}`),O}function Wn(I,O,w){return I==w.path&&an(O,w.parameters)}const Si="imperative";class Ti{constructor(O,w){this.id=O,this.url=w}}class sr extends Ti{constructor(O,w,R="imperative",H=null){super(O,w),this.type=0,this.navigationTrigger=R,this.restoredState=H}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class di extends Ti{constructor(O,w,R){super(O,w),this.urlAfterRedirects=R,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Gr extends Ti{constructor(O,w,R,H){super(O,w),this.reason=R,this.code=H,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class gr extends Ti{constructor(O,w,R,H){super(O,w),this.reason=R,this.code=H,this.type=16}}class hn extends Ti{constructor(O,w,R,H){super(O,w),this.error=R,this.target=H,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class $s extends Ti{constructor(O,w,R,H){super(O,w),this.urlAfterRedirects=R,this.state=H,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ua extends Ti{constructor(O,w,R,H){super(O,w),this.urlAfterRedirects=R,this.state=H,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class da extends Ti{constructor(O,w,R,H,Q){super(O,w),this.urlAfterRedirects=R,this.state=H,this.shouldActivate=Q,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class hi extends Ti{constructor(O,w,R,H){super(O,w),this.urlAfterRedirects=R,this.state=H,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Oa extends Ti{constructor(O,w,R,H){super(O,w),this.urlAfterRedirects=R,this.state=H,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class To{constructor(O){this.route=O,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Io{constructor(O){this.route=O,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Jt{constructor(O){this.snapshot=O,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Ki{constructor(O){this.snapshot=O,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Yr{constructor(O){this.snapshot=O,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $o{constructor(O){this.snapshot=O,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ii{constructor(O,w,R){this.routerEvent=O,this.position=w,this.anchor=R,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class Es{}class Di{constructor(O){this.url=O}}class Ao{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new wr,this.attachRef=null}}let wr=(()=>{class I{constructor(){this.contexts=new Map}onChildOutletCreated(w,R){const H=this.getOrCreateContext(w);H.outlet=R,this.contexts.set(w,H)}onChildOutletDestroyed(w){const R=this.getContext(w);R&&(R.outlet=null,R.attachRef=null)}onOutletDeactivated(){const w=this.contexts;return this.contexts=new Map,w}onOutletReAttached(w){this.contexts=w}getOrCreateContext(w){let R=this.getContext(w);return R||(R=new Ao,this.contexts.set(w,R)),R}getContext(w){return this.contexts.get(w)||null}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();class Or{constructor(O){this._root=O}get root(){return this._root.value}parent(O){const w=this.pathFromRoot(O);return w.length>1?w[w.length-2]:null}children(O){const w=Ts(O,this._root);return w?w.children.map(R=>R.value):[]}firstChild(O){const w=Ts(O,this._root);return w&&w.children.length>0?w.children[0].value:null}siblings(O){const w=Zt(O,this._root);return w.length<2?[]:w[w.length-2].children.map(H=>H.value).filter(H=>H!==O)}pathFromRoot(O){return Zt(O,this._root).map(w=>w.value)}}function Ts(I,O){if(I===O.value)return O;for(const w of O.children){const R=Ts(I,w);if(R)return R}return null}function Zt(I,O){if(I===O.value)return[O];for(const w of O.children){const R=Zt(I,w);if(R.length)return R.unshift(O),R}return[]}class In{constructor(O,w){this.value=O,this.children=w}toString(){return`TreeNode(${this.value})`}}function Hn(I){const O={};return I&&I.children.forEach(w=>O[w.value.outlet]=w),O}class os extends Or{constructor(O,w){super(O),this.snapshot=w,dt(this,O)}toString(){return this.snapshot.toString()}}function _i(I,O){const w=function Wr(I,O){const ee=new Is([],{},{},"",{},Xe,O,null,{});return new On("",new In(ee,[]))}(0,O),R=new ce.X([new Un("",{})]),H=new ce.X({}),Q=new ce.X({}),ee=new ce.X({}),Ae=new ce.X(""),Ie=new Ui(R,H,ee,Ae,Q,Xe,O,w.root);return Ie.snapshot=w.root,new os(new In(Ie,[]),w)}class Ui{constructor(O,w,R,H,Q,ee,Ae,Ie){this.urlSubject=O,this.paramsSubject=w,this.queryParamsSubject=R,this.fragmentSubject=H,this.dataSubject=Q,this.outlet=ee,this.component=Ae,this._futureSnapshot=Ie,this.title=this.dataSubject?.pipe((0,Me.U)(pt=>pt[cn]))??(0,re.of)(void 0),this.url=O,this.params=w,this.queryParams=R,this.fragment=H,this.data=Q}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe((0,Me.U)(O=>kt(O)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,Me.U)(O=>kt(O)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function as(I,O="emptyOnly"){const w=I.pathFromRoot;let R=0;if("always"!==O)for(R=w.length-1;R>=1;){const H=w[R],Q=w[R-1];if(H.routeConfig&&""===H.routeConfig.path)R--;else{if(Q.component)break;R--}}return function Zr(I){return I.reduce((O,w)=>({params:{...O.params,...w.params},data:{...O.data,...w.data},resolve:{...w.data,...O.resolve,...w.routeConfig?.data,...w._resolvedData}}),{params:{},data:{},resolve:{}})}(w.slice(R))}class Is{get title(){return this.data?.[cn]}constructor(O,w,R,H,Q,ee,Ae,Ie,pt){this.url=O,this.params=w,this.queryParams=R,this.fragment=H,this.data=Q,this.outlet=ee,this.component=Ae,this.routeConfig=Ie,this._resolve=pt}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=kt(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=kt(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(R=>R.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class On extends Or{constructor(O,w){super(w),this.url=O,dt(this,w)}toString(){return Ht(this._root)}}function dt(I,O){O.value._routerState=I,O.children.forEach(w=>dt(I,w))}function Ht(I){const O=I.children.length>0?` { ${I.children.map(Ht).join(", ")} } `:"";return`${I.value}${O}`}function _n(I){if(I.snapshot){const O=I.snapshot,w=I._futureSnapshot;I.snapshot=w,an(O.queryParams,w.queryParams)||I.queryParamsSubject.next(w.queryParams),O.fragment!==w.fragment&&I.fragmentSubject.next(w.fragment),an(O.params,w.params)||I.paramsSubject.next(w.params),function li(I,O){if(I.length!==O.length)return!1;for(let w=0;wan(w.parameters,O[R].parameters))}(I.url,O.url);return w&&!(!I.parent!=!O.parent)&&(!I.parent||fi(I.parent,O.parent))}let Rr=(()=>{class I{constructor(){this.activated=null,this._activatedRoute=null,this.name=Xe,this.activateEvents=new l.vpe,this.deactivateEvents=new l.vpe,this.attachEvents=new l.vpe,this.detachEvents=new l.vpe,this.parentContexts=(0,l.f3M)(wr),this.location=(0,l.f3M)(l.s_b),this.changeDetector=(0,l.f3M)(l.sBO),this.environmentInjector=(0,l.f3M)(l.lqb),this.inputBinder=(0,l.f3M)(mr,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(w){if(w.name){const{firstChange:R,previousValue:H}=w.name;if(R)return;this.isTrackedInParentContexts(H)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(H)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(w){return this.parentContexts.getContext(w)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const w=this.parentContexts.getContext(this.name);w?.route&&(w.attachRef?this.attach(w.attachRef,w.route):this.activateWith(w.route,w.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new l.vHH(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new l.vHH(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new l.vHH(4012,!1);this.location.detach();const w=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(w.instance),w}attach(w,R){this.activated=w,this._activatedRoute=R,this.location.insert(w.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(w.instance)}deactivate(){if(this.activated){const w=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(w)}}activateWith(w,R){if(this.isActivated)throw new l.vHH(4013,!1);this._activatedRoute=w;const H=this.location,ee=w.snapshot.component,Ae=this.parentContexts.getOrCreateContext(this.name).children,Ie=new ri(w,Ae,H.injector);this.activated=H.createComponent(ee,{index:H.length,injector:Ie,environmentInjector:R??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275dir=l.lG2({type:I,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[l.TTD]})}return I})();class ri{constructor(O,w,R){this.route=O,this.childContexts=w,this.parent=R}get(O,w){return O===Ui?this.route:O===wr?this.childContexts:this.parent.get(O,w)}}const mr=new l.OlP("");let yn=(()=>{class I{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(w){this.unsubscribeFromRouteData(w),this.subscribeToRouteData(w)}unsubscribeFromRouteData(w){this.outletDataSubscriptions.get(w)?.unsubscribe(),this.outletDataSubscriptions.delete(w)}subscribeToRouteData(w){const{activatedRoute:R}=w,H=(0,_e.a)([R.queryParams,R.params,R.data]).pipe((0,nt.w)(([Q,ee,Ae],Ie)=>(Ae={...Q,...ee,...Ae},0===Ie?(0,re.of)(Ae):Promise.resolve(Ae)))).subscribe(Q=>{if(!w.isActivated||!w.activatedComponentRef||w.activatedRoute!==R||null===R.component)return void this.unsubscribeFromRouteData(w);const ee=(0,l.qFp)(R.component);if(ee)for(const{templateName:Ae}of ee.inputs)w.activatedComponentRef.setInput(Ae,Q[Ae]);else this.unsubscribeFromRouteData(w)});this.outletDataSubscriptions.set(w,H)}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac})}return I})();function vr(I,O,w){if(w&&I.shouldReuseRoute(O.value,w.value.snapshot)){const R=w.value;R._futureSnapshot=O.value;const H=function Ft(I,O,w){return O.children.map(R=>{for(const H of w.children)if(I.shouldReuseRoute(R.value,H.value.snapshot))return vr(I,R,H);return vr(I,R)})}(I,O,w);return new In(R,H)}{if(I.shouldAttach(O.value)){const Q=I.retrieve(O.value);if(null!==Q){const ee=Q.route;return ee.value._futureSnapshot=O.value,ee.children=O.children.map(Ae=>vr(I,Ae)),ee}}const R=function As(I){return new Ui(new ce.X(I.url),new ce.X(I.params),new ce.X(I.queryParams),new ce.X(I.fragment),new ce.X(I.data),I.outlet,I.component,I)}(O.value),H=O.children.map(Q=>vr(I,Q));return new In(R,H)}}const ls="ngNavigationCancelingError";function qr(I,O){const{redirectTo:w,navigationBehaviorOptions:R}=ge(O)?{redirectTo:O,navigationBehaviorOptions:void 0}:O,H=wn(!1,0,O);return H.url=w,H.navigationBehaviorOptions=R,H}function wn(I,O,w){const R=new Error("NavigationCancelingError: "+(I||""));return R[ls]=!0,R.cancellationCode=O,w&&(R.url=w),R}function Er(I){return I&&I[ls]}let $i=(()=>{class I{static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275cmp=l.Xpm({type:I,selectors:[["ng-component"]],standalone:!0,features:[l.jDz],decls:1,vars:0,template:function(R,H){1&R&&l._UZ(0,"router-outlet")},dependencies:[Rr],encapsulation:2})}return I})();function Jr(I){const O=I.children&&I.children.map(Jr),w=O?{...I,children:O}:{...I};return!w.component&&!w.loadComponent&&(O||w.loadChildren)&&w.outlet&&w.outlet!==Xe&&(w.component=$i),w}function jn(I){return I.outlet||Xe}function ar(I){if(!I)return null;if(I.routeConfig?._injector)return I.routeConfig._injector;for(let O=I.parent;O;O=O.parent){const w=O.routeConfig;if(w?._loadedInjector)return w._loadedInjector;if(w?._injector)return w._injector}return null}class Xr{constructor(O,w,R,H,Q){this.routeReuseStrategy=O,this.futureState=w,this.currState=R,this.forwardEvent=H,this.inputBindingEnabled=Q}activate(O){const w=this.futureState._root,R=this.currState?this.currState._root:null;this.deactivateChildRoutes(w,R,O),_n(this.futureState.root),this.activateChildRoutes(w,R,O)}deactivateChildRoutes(O,w,R){const H=Hn(w);O.children.forEach(Q=>{const ee=Q.value.outlet;this.deactivateRoutes(Q,H[ee],R),delete H[ee]}),Object.values(H).forEach(Q=>{this.deactivateRouteAndItsChildren(Q,R)})}deactivateRoutes(O,w,R){const H=O.value,Q=w?w.value:null;if(H===Q)if(H.component){const ee=R.getContext(H.outlet);ee&&this.deactivateChildRoutes(O,w,ee.children)}else this.deactivateChildRoutes(O,w,R);else Q&&this.deactivateRouteAndItsChildren(w,R)}deactivateRouteAndItsChildren(O,w){O.value.component&&this.routeReuseStrategy.shouldDetach(O.value.snapshot)?this.detachAndStoreRouteSubtree(O,w):this.deactivateRouteAndOutlet(O,w)}detachAndStoreRouteSubtree(O,w){const R=w.getContext(O.value.outlet),H=R&&O.value.component?R.children:w,Q=Hn(O);for(const ee of Object.keys(Q))this.deactivateRouteAndItsChildren(Q[ee],H);if(R&&R.outlet){const ee=R.outlet.detach(),Ae=R.children.onOutletDeactivated();this.routeReuseStrategy.store(O.value.snapshot,{componentRef:ee,route:O,contexts:Ae})}}deactivateRouteAndOutlet(O,w){const R=w.getContext(O.value.outlet),H=R&&O.value.component?R.children:w,Q=Hn(O);for(const ee of Object.keys(Q))this.deactivateRouteAndItsChildren(Q[ee],H);R&&(R.outlet&&(R.outlet.deactivate(),R.children.onOutletDeactivated()),R.attachRef=null,R.route=null)}activateChildRoutes(O,w,R){const H=Hn(w);O.children.forEach(Q=>{this.activateRoutes(Q,H[Q.value.outlet],R),this.forwardEvent(new $o(Q.value.snapshot))}),O.children.length&&this.forwardEvent(new Ki(O.value.snapshot))}activateRoutes(O,w,R){const H=O.value,Q=w?w.value:null;if(_n(H),H===Q)if(H.component){const ee=R.getOrCreateContext(H.outlet);this.activateChildRoutes(O,w,ee.children)}else this.activateChildRoutes(O,w,R);else if(H.component){const ee=R.getOrCreateContext(H.outlet);if(this.routeReuseStrategy.shouldAttach(H.snapshot)){const Ae=this.routeReuseStrategy.retrieve(H.snapshot);this.routeReuseStrategy.store(H.snapshot,null),ee.children.onOutletReAttached(Ae.contexts),ee.attachRef=Ae.componentRef,ee.route=Ae.route.value,ee.outlet&&ee.outlet.attach(Ae.componentRef,Ae.route.value),_n(Ae.route.value),this.activateChildRoutes(O,null,ee.children)}else{const Ae=ar(H.snapshot);ee.attachRef=null,ee.route=H,ee.injector=Ae,ee.outlet&&ee.outlet.activateWith(H,ee.injector),this.activateChildRoutes(O,null,ee.children)}}else this.activateChildRoutes(O,null,R)}}class Qn{constructor(O){this.path=O,this.route=this.path[this.path.length-1]}}class pi{constructor(O,w){this.component=O,this.route=w}}function Ms(I,O,w){const R=I._root;return qn(R,O?O._root:null,w,[R.value])}function fn(I,O){const w=Symbol(),R=O.get(I,w);return R===w?"function"!=typeof I||(0,l.Z0I)(I)?O.get(I):I:R}function qn(I,O,w,R,H={canDeactivateChecks:[],canActivateChecks:[]}){const Q=Hn(O);return I.children.forEach(ee=>{(function ki(I,O,w,R,H={canDeactivateChecks:[],canActivateChecks:[]}){const Q=I.value,ee=O?O.value:null,Ae=w?w.getContext(I.value.outlet):null;if(ee&&Q.routeConfig===ee.routeConfig){const Ie=function ao(I,O,w){if("function"==typeof w)return w(I,O);switch(w){case"pathParamsChange":return!yt(I.url,O.url);case"pathParamsOrQueryParamsChange":return!yt(I.url,O.url)||!an(I.queryParams,O.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!fi(I,O)||!an(I.queryParams,O.queryParams);default:return!fi(I,O)}}(ee,Q,Q.routeConfig.runGuardsAndResolvers);Ie?H.canActivateChecks.push(new Qn(R)):(Q.data=ee.data,Q._resolvedData=ee._resolvedData),qn(I,O,Q.component?Ae?Ae.children:null:w,R,H),Ie&&Ae&&Ae.outlet&&Ae.outlet.isActivated&&H.canDeactivateChecks.push(new pi(Ae.outlet.component,ee))}else ee&&es(O,Ae,H),H.canActivateChecks.push(new Qn(R)),qn(I,null,Q.component?Ae?Ae.children:null:w,R,H)})(ee,Q[ee.value.outlet],w,R.concat([ee.value]),H),delete Q[ee.value.outlet]}),Object.entries(Q).forEach(([ee,Ae])=>es(Ae,w.getContext(ee),H)),H}function es(I,O,w){const R=Hn(I),H=I.value;Object.entries(R).forEach(([Q,ee])=>{es(ee,H.component?O?O.children.getContext(Q):null:O,w)}),w.canDeactivateChecks.push(new pi(H.component&&O&&O.outlet&&O.outlet.isActivated?O.outlet.component:null,H))}function lo(I){return"function"==typeof I}function An(I){return I instanceof ve.K||"EmptyError"===I?.name}const lr=Symbol("INITIAL_VALUE");function xs(){return(0,nt.w)(I=>(0,_e.a)(I.map(O=>O.pipe((0,it.q)(1),(0,Je.O)(lr)))).pipe((0,Me.U)(O=>{for(const w of O)if(!0!==w){if(w===lr)return lr;if(!1===w||w instanceof Ri)return w}return!0}),(0,wt.h)(O=>O!==lr),(0,it.q)(1)))}function cr(I){return(0,ye.z)((0,Sn.b)(O=>{if(ge(O))throw qr(0,O)}),(0,Me.U)(O=>!0===O))}class uo{constructor(O){this.segmentGroup=O||null}}class Ni{constructor(O){this.urlTree=O}}function ts(I){return ke(new uo(I))}function Ji(I){return ke(new Ni(I))}class ka{constructor(O,w){this.urlSerializer=O,this.urlTree=w}noMatchError(O){return new l.vHH(4002,!1)}lineralizeSegments(O,w){let R=[],H=w.root;for(;;){if(R=R.concat(H.segments),0===H.numberOfChildren)return(0,re.of)(R);if(H.numberOfChildren>1||!H.children[Xe])return ke(new l.vHH(4e3,!1));H=H.children[Xe]}}applyRedirectCommands(O,w,R){return this.applyRedirectCreateUrlTree(w,this.urlSerializer.parse(w),O,R)}applyRedirectCreateUrlTree(O,w,R,H){const Q=this.createSegmentGroup(O,w.root,R,H);return new Ri(Q,this.createQueryParams(w.queryParams,this.urlTree.queryParams),w.fragment)}createQueryParams(O,w){const R={};return Object.entries(O).forEach(([H,Q])=>{if("string"==typeof Q&&Q.startsWith(":")){const Ae=Q.substring(1);R[H]=w[Ae]}else R[H]=Q}),R}createSegmentGroup(O,w,R,H){const Q=this.createSegments(O,w.segments,R,H);let ee={};return Object.entries(w.children).forEach(([Ae,Ie])=>{ee[Ae]=this.createSegmentGroup(O,Ie,R,H)}),new bt(Q,ee)}createSegments(O,w,R,H){return w.map(Q=>Q.path.startsWith(":")?this.findPosParam(O,Q,H):this.findOrReturn(Q,R))}findPosParam(O,w,R){const H=R[w.path.substring(1)];if(!H)throw new l.vHH(4001,!1);return H}findOrReturn(O,w){let R=0;for(const H of w){if(H.path===O.path)return w.splice(R),H;R++}return O}}const Zs={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ha(I,O,w,R,H){const Q=Wo(I,O,w);return Q.matched?(R=function Kr(I,O){return I.providers&&!I._injector&&(I._injector=(0,l.MMx)(I.providers,O,`Route: ${I.path}`)),I._injector??O}(O,R),function Ro(I,O,w,R){const H=O.canMatch;if(!H||0===H.length)return(0,re.of)(!0);const Q=H.map(ee=>{const Ae=fn(ee,I);return xi(function se(I){return I&&lo(I.canMatch)}(Ae)?Ae.canMatch(O,w):I.runInContext(()=>Ae(O,w)))});return(0,re.of)(Q).pipe(xs(),cr())}(R,O,w).pipe((0,Me.U)(ee=>!0===ee?Q:{...Zs}))):(0,re.of)(Q)}function Wo(I,O,w){if(""===O.path)return"full"===O.pathMatch&&(I.hasChildren()||w.length>0)?{...Zs}:{matched:!0,consumedSegments:[],remainingSegments:w,parameters:{},positionalParamSegments:{}};const H=(O.matcher||mn)(w,I,O);if(!H)return{...Zs};const Q={};Object.entries(H.posParams??{}).forEach(([Ae,Ie])=>{Q[Ae]=Ie.path});const ee=H.consumed.length>0?{...Q,...H.consumed[H.consumed.length-1].parameters}:Q;return{matched:!0,consumedSegments:H.consumed,remainingSegments:w.slice(H.consumed.length),parameters:ee,positionalParamSegments:H.posParams??{}}}function fa(I,O,w,R){return w.length>0&&function gl(I,O,w){return w.some(R=>Rs(I,O,R)&&jn(R)!==Xe)}(I,w,R)?{segmentGroup:new bt(O,pl(R,new bt(w,I.children))),slicedSegments:[]}:0===w.length&&function Fa(I,O,w){return w.some(R=>Rs(I,O,R))}(I,w,R)?{segmentGroup:new bt(I.segments,Na(I,0,w,R,I.children)),slicedSegments:w}:{segmentGroup:new bt(I.segments,I.children),slicedSegments:w}}function Na(I,O,w,R,H){const Q={};for(const ee of R)if(Rs(I,w,ee)&&!H[jn(ee)]){const Ae=new bt([],{});Q[jn(ee)]=Ae}return{...H,...Q}}function pl(I,O){const w={};w[Xe]=O;for(const R of I)if(""===R.path&&jn(R)!==Xe){const H=new bt([],{});w[jn(R)]=H}return w}function Rs(I,O,w){return(!(I.hasChildren()||O.length>0)||"full"!==w.pathMatch)&&""===w.path}class Gu{constructor(O,w,R,H,Q,ee,Ae){this.injector=O,this.configLoader=w,this.rootComponentType=R,this.config=H,this.urlTree=Q,this.paramsInheritanceStrategy=ee,this.urlSerializer=Ae,this.allowRedirects=!0,this.applyRedirects=new ka(this.urlSerializer,this.urlTree)}noMatchError(O){return new l.vHH(4002,!1)}recognize(){const O=fa(this.urlTree.root,[],[],this.config).segmentGroup;return this.processSegmentGroup(this.injector,this.config,O,Xe).pipe(Bn(w=>{if(w instanceof Ni)return this.allowRedirects=!1,this.urlTree=w.urlTree,this.match(w.urlTree);throw w instanceof uo?this.noMatchError(w):w}),(0,Me.U)(w=>{const R=new Is([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},Xe,this.rootComponentType,null,{}),H=new In(R,w),Q=new On("",H),ee=function oe(I,O,w=null,R=null){return ze(ue(I),O,w,R)}(R,[],this.urlTree.queryParams,this.urlTree.fragment);return ee.queryParams=this.urlTree.queryParams,Q.url=this.urlSerializer.serialize(ee),this.inheritParamsAndData(Q._root),{state:Q,tree:ee}}))}match(O){return this.processSegmentGroup(this.injector,this.config,O.root,Xe).pipe(Bn(R=>{throw R instanceof uo?this.noMatchError(R):R}))}inheritParamsAndData(O){const w=O.value,R=as(w,this.paramsInheritanceStrategy);w.params=Object.freeze(R.params),w.data=Object.freeze(R.data),O.children.forEach(H=>this.inheritParamsAndData(H))}processSegmentGroup(O,w,R,H){return 0===R.segments.length&&R.hasChildren()?this.processChildren(O,w,R):this.processSegment(O,w,R,R.segments,H,!0)}processChildren(O,w,R){const H=[];for(const Q of Object.keys(R.children))"primary"===Q?H.unshift(Q):H.push(Q);return(0,de.D)(H).pipe((0,Vn.b)(Q=>{const ee=R.children[Q],Ae=function Ws(I,O){const w=I.filter(R=>jn(R)===O);return w.push(...I.filter(R=>jn(R)!==O)),w}(w,Q);return this.processSegmentGroup(O,Ae,ee,Q)}),function Ar(I,O){return(0,Re.e)(function Nt(I,O,w,R,H){return(Q,ee)=>{let Ae=w,Ie=O,pt=0;Q.subscribe((0,at.x)(ee,Qt=>{const Jn=pt++;Ie=Ae?I(Ie,Qt,Jn):(Ae=!0,Qt),R&&ee.next(Ie)},H&&(()=>{Ae&&ee.next(Ie),ee.complete()})))}}(I,O,arguments.length>=2,!0))}((Q,ee)=>(Q.push(...ee),Q)),(0,Qi.d)(null),function Ne(I,O){const w=arguments.length>=2;return R=>R.pipe(I?(0,wt.h)((H,Q)=>I(H,Q,R)):Fe.y,xe(1),w?(0,Qi.d)(O):(0,Oe.T)(()=>new ve.K))}(),(0,mt.z)(Q=>{if(null===Q)return ts(R);const ee=vl(Q);return function nf(I){I.sort((O,w)=>O.value.outlet===Xe?-1:w.value.outlet===Xe?1:O.value.outlet.localeCompare(w.value.outlet))}(ee),(0,re.of)(ee)}))}processSegment(O,w,R,H,Q,ee){return(0,de.D)(w).pipe((0,Vn.b)(Ae=>this.processSegmentAgainstRoute(Ae._injector??O,w,Ae,R,H,Q,ee).pipe(Bn(Ie=>{if(Ie instanceof uo)return(0,re.of)(null);throw Ie}))),(0,$t.P)(Ae=>!!Ae),Bn(Ae=>{if(An(Ae))return function Po(I,O,w){return 0===O.length&&!I.children[w]}(R,H,Q)?(0,re.of)([]):ts(R);throw Ae}))}processSegmentAgainstRoute(O,w,R,H,Q,ee,Ae){return function ho(I,O,w,R){return!!(jn(I)===R||R!==Xe&&Rs(O,w,I))&&("**"===I.path||Wo(O,I,w).matched)}(R,H,Q,ee)?void 0===R.redirectTo?this.matchSegmentAgainstRoute(O,H,R,Q,ee,Ae):Ae&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(O,H,w,R,Q,ee):ts(H):ts(H)}expandSegmentAgainstRouteUsingRedirect(O,w,R,H,Q,ee){return"**"===H.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(O,R,H,ee):this.expandRegularSegmentAgainstRouteUsingRedirect(O,w,R,H,Q,ee)}expandWildCardWithParamsAgainstRouteUsingRedirect(O,w,R,H){const Q=this.applyRedirects.applyRedirectCommands([],R.redirectTo,{});return R.redirectTo.startsWith("/")?Ji(Q):this.applyRedirects.lineralizeSegments(R,Q).pipe((0,mt.z)(ee=>{const Ae=new bt(ee,{});return this.processSegment(O,w,Ae,ee,H,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(O,w,R,H,Q,ee){const{matched:Ae,consumedSegments:Ie,remainingSegments:pt,positionalParamSegments:Qt}=Wo(w,H,Q);if(!Ae)return ts(w);const Jn=this.applyRedirects.applyRedirectCommands(Ie,H.redirectTo,Qt);return H.redirectTo.startsWith("/")?Ji(Jn):this.applyRedirects.lineralizeSegments(H,Jn).pipe((0,mt.z)(Dn=>this.processSegment(O,R,w,Dn.concat(pt),ee,!1)))}matchSegmentAgainstRoute(O,w,R,H,Q,ee){let Ae;if("**"===R.path){const Ie=H.length>0?Vi(H).parameters:{},pt=new Is(H,Ie,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Zu(R),jn(R),R.component??R._loadedComponent??null,R,U(R));Ae=(0,re.of)({snapshot:pt,consumedSegments:[],remainingSegments:[]}),w.children={}}else Ae=ha(w,R,H,O).pipe((0,Me.U)(({matched:Ie,consumedSegments:pt,remainingSegments:Qt,parameters:Jn})=>Ie?{snapshot:new Is(pt,Jn,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Zu(R),jn(R),R.component??R._loadedComponent??null,R,U(R)),consumedSegments:pt,remainingSegments:Qt}:null));return Ae.pipe((0,nt.w)(Ie=>null===Ie?ts(w):this.getChildConfig(O=R._injector??O,R,H).pipe((0,nt.w)(({routes:pt})=>{const Qt=R._loadedInjector??O,{snapshot:Jn,consumedSegments:Dn,remainingSegments:mo}=Ie,{segmentGroup:Ba,slicedSegments:ga}=fa(w,Dn,mo,pt);if(0===ga.length&&Ba.hasChildren())return this.processChildren(Qt,pt,Ba).pipe((0,Me.U)(Ha=>null===Ha?null:[new In(Jn,Ha)]));if(0===pt.length&&0===ga.length)return(0,re.of)([new In(Jn,[])]);const Ec=jn(R)===Q;return this.processSegment(Qt,pt,Ba,ga,Ec?Xe:Q,!0).pipe((0,Me.U)(Ha=>[new In(Jn,Ha)]))}))))}getChildConfig(O,w,R){return w.children?(0,re.of)({routes:w.children,injector:O}):w.loadChildren?void 0!==w._loadedRoutes?(0,re.of)({routes:w._loadedRoutes,injector:w._loadedInjector}):function Os(I,O,w,R){const H=O.canLoad;if(void 0===H||0===H.length)return(0,re.of)(!0);const Q=H.map(ee=>{const Ae=fn(ee,I);return xi(function z(I){return I&&lo(I.canLoad)}(Ae)?Ae.canLoad(O,w):I.runInContext(()=>Ae(O,w)))});return(0,re.of)(Q).pipe(xs(),cr())}(O,w,R).pipe((0,mt.z)(H=>H?this.configLoader.loadChildren(O,w).pipe((0,Sn.b)(Q=>{w._loadedRoutes=Q.routes,w._loadedInjector=Q.injector})):function Pa(I){return ke(wn(!1,3))}())):(0,re.of)({routes:[],injector:O})}}function Yu(I){const O=I.value.routeConfig;return O&&""===O.path}function vl(I){const O=[],w=new Set;for(const R of I){if(!Yu(R)){O.push(R);continue}const H=O.find(Q=>R.value.routeConfig===Q.value.routeConfig);void 0!==H?(H.children.push(...R.children),w.add(H)):O.push(R)}for(const R of w){const H=vl(R.children);O.push(new In(R.value,H))}return O.filter(R=>!w.has(R))}function Zu(I){return I.data||{}}function U(I){return I.resolve||{}}function b(I){return"string"==typeof I.title||null===I.title}function F(I){return(0,nt.w)(O=>{const w=I(O);return w?(0,de.D)(w).pipe((0,Me.U)(()=>O)):(0,re.of)(O)})}const x=new l.OlP("ROUTES");let V=(()=>{class I{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=(0,l.f3M)(l.Sil)}loadComponent(w){if(this.componentLoaders.get(w))return this.componentLoaders.get(w);if(w._loadedComponent)return(0,re.of)(w._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(w);const R=xi(w.loadComponent()).pipe((0,Me.U)(Ee),(0,Sn.b)(Q=>{this.onLoadEndListener&&this.onLoadEndListener(w),w._loadedComponent=Q}),(0,Ke.x)(()=>{this.componentLoaders.delete(w)})),H=new ut(R,()=>new ne.x).pipe(Dt());return this.componentLoaders.set(w,H),H}loadChildren(w,R){if(this.childrenLoaders.get(R))return this.childrenLoaders.get(R);if(R._loadedRoutes)return(0,re.of)({routes:R._loadedRoutes,injector:R._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(R);const Q=function K(I,O,w,R){return xi(I.loadChildren()).pipe((0,Me.U)(Ee),(0,mt.z)(H=>H instanceof l.YKP||Array.isArray(H)?(0,re.of)(H):(0,de.D)(O.compileModuleAsync(H))),(0,Me.U)(H=>{R&&R(I);let Q,ee,Ae=!1;return Array.isArray(H)?(ee=H,!0):(Q=H.create(w).injector,ee=Q.get(x,[],{optional:!0,self:!0}).flat()),{routes:ee.map(Jr),injector:Q}}))}(R,this.compiler,w,this.onLoadEndListener).pipe((0,Ke.x)(()=>{this.childrenLoaders.delete(R)})),ee=new ut(Q,()=>new ne.x).pipe(Dt());return this.childrenLoaders.set(R,ee),ee}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();function Ee(I){return function me(I){return I&&"object"==typeof I&&"default"in I}(I)?I.default:I}let Ue=(()=>{class I{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new ne.x,this.transitionAbortSubject=new ne.x,this.configLoader=(0,l.f3M)(V),this.environmentInjector=(0,l.f3M)(l.lqb),this.urlSerializer=(0,l.f3M)(tn),this.rootContexts=(0,l.f3M)(wr),this.inputBindingEnabled=null!==(0,l.f3M)(mr,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>(0,re.of)(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=H=>this.events.next(new Io(H)),this.configLoader.onLoadStartListener=H=>this.events.next(new To(H))}complete(){this.transitions?.complete()}handleNavigationRequest(w){const R=++this.navigationId;this.transitions?.next({...this.transitions.value,...w,id:R})}setupNavigations(w,R,H){return this.transitions=new ce.X({id:0,currentUrlTree:R,currentRawUrl:R,currentBrowserUrl:R,extractedUrl:w.urlHandlingStrategy.extract(R),urlAfterRedirects:w.urlHandlingStrategy.extract(R),rawUrl:R,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Si,restoredState:null,currentSnapshot:H.snapshot,targetSnapshot:null,currentRouterState:H,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe((0,wt.h)(Q=>0!==Q.id),(0,Me.U)(Q=>({...Q,extractedUrl:w.urlHandlingStrategy.extract(Q.rawUrl)})),(0,nt.w)(Q=>{this.currentTransition=Q;let ee=!1,Ae=!1;return(0,re.of)(Q).pipe((0,Sn.b)(Ie=>{this.currentNavigation={id:Ie.id,initialUrl:Ie.rawUrl,extractedUrl:Ie.extractedUrl,trigger:Ie.source,extras:Ie.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),(0,nt.w)(Ie=>{const pt=Ie.currentBrowserUrl.toString(),Qt=!w.navigated||Ie.extractedUrl.toString()!==pt||pt!==Ie.currentUrlTree.toString();if(!Qt&&"reload"!==(Ie.extras.onSameUrlNavigation??w.onSameUrlNavigation)){const Dn="";return this.events.next(new gr(Ie.id,this.urlSerializer.serialize(Ie.rawUrl),Dn,0)),Ie.resolve(null),He.E}if(w.urlHandlingStrategy.shouldProcessUrl(Ie.rawUrl))return(0,re.of)(Ie).pipe((0,nt.w)(Dn=>{const mo=this.transitions?.getValue();return this.events.next(new sr(Dn.id,this.urlSerializer.serialize(Dn.extractedUrl),Dn.source,Dn.restoredState)),mo!==this.transitions?.getValue()?He.E:Promise.resolve(Dn)}),function D(I,O,w,R,H,Q){return(0,mt.z)(ee=>function ml(I,O,w,R,H,Q,ee="emptyOnly"){return new Gu(I,O,w,R,H,ee,Q).recognize()}(I,O,w,R,ee.extractedUrl,H,Q).pipe((0,Me.U)(({state:Ae,tree:Ie})=>({...ee,targetSnapshot:Ae,urlAfterRedirects:Ie}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,w.config,this.urlSerializer,w.paramsInheritanceStrategy),(0,Sn.b)(Dn=>{Q.targetSnapshot=Dn.targetSnapshot,Q.urlAfterRedirects=Dn.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:Dn.urlAfterRedirects};const mo=new $s(Dn.id,this.urlSerializer.serialize(Dn.extractedUrl),this.urlSerializer.serialize(Dn.urlAfterRedirects),Dn.targetSnapshot);this.events.next(mo)}));if(Qt&&w.urlHandlingStrategy.shouldProcessUrl(Ie.currentRawUrl)){const{id:Dn,extractedUrl:mo,source:Ba,restoredState:ga,extras:Ec}=Ie,Ha=new sr(Dn,this.urlSerializer.serialize(mo),Ba,ga);this.events.next(Ha);const gi=_i(0,this.rootComponentType).snapshot;return this.currentTransition=Q={...Ie,targetSnapshot:gi,urlAfterRedirects:mo,extras:{...Ec,skipLocationChange:!1,replaceUrl:!1}},(0,re.of)(Q)}{const Dn="";return this.events.next(new gr(Ie.id,this.urlSerializer.serialize(Ie.extractedUrl),Dn,1)),Ie.resolve(null),He.E}}),(0,Sn.b)(Ie=>{const pt=new ua(Ie.id,this.urlSerializer.serialize(Ie.extractedUrl),this.urlSerializer.serialize(Ie.urlAfterRedirects),Ie.targetSnapshot);this.events.next(pt)}),(0,Me.U)(Ie=>(this.currentTransition=Q={...Ie,guards:Ms(Ie.targetSnapshot,Ie.currentSnapshot,this.rootContexts)},Q)),function Go(I,O){return(0,mt.z)(w=>{const{targetSnapshot:R,currentSnapshot:H,guards:{canActivateChecks:Q,canDeactivateChecks:ee}}=w;return 0===ee.length&&0===Q.length?(0,re.of)({...w,guardsResult:!0}):function hl(I,O,w,R){return(0,de.D)(I).pipe((0,mt.z)(H=>function Oo(I,O,w,R,H){const Q=O&&O.routeConfig?O.routeConfig.canDeactivate:null;if(!Q||0===Q.length)return(0,re.of)(!0);const ee=Q.map(Ae=>{const Ie=ar(O)??H,pt=fn(Ae,Ie);return xi(function Y(I){return I&&lo(I.canDeactivate)}(pt)?pt.canDeactivate(I,O,w,R):Ie.runInContext(()=>pt(I,O,w,R))).pipe((0,$t.P)())});return(0,re.of)(ee).pipe(xs())}(H.component,H.route,w,O,R)),(0,$t.P)(H=>!0!==H,!0))}(ee,R,H,I).pipe((0,mt.z)(Ae=>Ae&&function ds(I){return"boolean"==typeof I}(Ae)?function xo(I,O,w,R){return(0,de.D)(O).pipe((0,Vn.b)(H=>(0,Te.z)(function Pr(I,O){return null!==I&&O&&O(new Jt(I)),(0,re.of)(!0)}(H.route.parent,R),function co(I,O){return null!==I&&O&&O(new Yr(I)),(0,re.of)(!0)}(H.route,R),function fl(I,O,w){const R=O[O.length-1],Q=O.slice(0,O.length-1).reverse().map(ee=>function et(I){const O=I.routeConfig?I.routeConfig.canActivateChild:null;return O&&0!==O.length?{node:I,guards:O}:null}(ee)).filter(ee=>null!==ee).map(ee=>fe(()=>{const Ae=ee.guards.map(Ie=>{const pt=ar(ee.node)??w,Qt=fn(Ie,pt);return xi(function P(I){return I&&lo(I.canActivateChild)}(Qt)?Qt.canActivateChild(R,I):pt.runInContext(()=>Qt(R,I))).pipe((0,$t.P)())});return(0,re.of)(Ae).pipe(xs())}));return(0,re.of)(Q).pipe(xs())}(I,H.path,w),function $u(I,O,w){const R=O.routeConfig?O.routeConfig.canActivate:null;if(!R||0===R.length)return(0,re.of)(!0);const H=R.map(Q=>fe(()=>{const ee=ar(O)??w,Ae=fn(Q,ee);return xi(function $(I){return I&&lo(I.canActivate)}(Ae)?Ae.canActivate(O,I):ee.runInContext(()=>Ae(O,I))).pipe((0,$t.P)())}));return(0,re.of)(H).pipe(xs())}(I,H.route,w))),(0,$t.P)(H=>!0!==H,!0))}(R,Q,I,O):(0,re.of)(Ae)),(0,Me.U)(Ae=>({...w,guardsResult:Ae})))})}(this.environmentInjector,Ie=>this.events.next(Ie)),(0,Sn.b)(Ie=>{if(Q.guardsResult=Ie.guardsResult,ge(Ie.guardsResult))throw qr(0,Ie.guardsResult);const pt=new da(Ie.id,this.urlSerializer.serialize(Ie.extractedUrl),this.urlSerializer.serialize(Ie.urlAfterRedirects),Ie.targetSnapshot,!!Ie.guardsResult);this.events.next(pt)}),(0,wt.h)(Ie=>!!Ie.guardsResult||(this.cancelNavigationTransition(Ie,"",3),!1)),F(Ie=>{if(Ie.guards.canActivateChecks.length)return(0,re.of)(Ie).pipe((0,Sn.b)(pt=>{const Qt=new hi(pt.id,this.urlSerializer.serialize(pt.extractedUrl),this.urlSerializer.serialize(pt.urlAfterRedirects),pt.targetSnapshot);this.events.next(Qt)}),(0,nt.w)(pt=>{let Qt=!1;return(0,re.of)(pt).pipe(function E(I,O){return(0,mt.z)(w=>{const{targetSnapshot:R,guards:{canActivateChecks:H}}=w;if(!H.length)return(0,re.of)(w);let Q=0;return(0,de.D)(H).pipe((0,Vn.b)(ee=>function N(I,O,w,R){const H=I.routeConfig,Q=I._resolve;return void 0!==H?.title&&!b(H)&&(Q[cn]=H.title),function G(I,O,w,R){const H=function q(I){return[...Object.keys(I),...Object.getOwnPropertySymbols(I)]}(I);if(0===H.length)return(0,re.of)({});const Q={};return(0,de.D)(H).pipe((0,mt.z)(ee=>function le(I,O,w,R){const H=ar(O)??R,Q=fn(I,H);return xi(Q.resolve?Q.resolve(O,w):H.runInContext(()=>Q(O,w)))}(I[ee],O,w,R).pipe((0,$t.P)(),(0,Sn.b)(Ae=>{Q[ee]=Ae}))),xe(1),(0,We.h)(Q),Bn(ee=>An(ee)?He.E:ke(ee)))}(Q,I,O,R).pipe((0,Me.U)(ee=>(I._resolvedData=ee,I.data=as(I,w).resolve,H&&b(H)&&(I.data[cn]=H.title),null)))}(ee.route,R,I,O)),(0,Sn.b)(()=>Q++),xe(1),(0,mt.z)(ee=>Q===H.length?(0,re.of)(w):He.E))})}(w.paramsInheritanceStrategy,this.environmentInjector),(0,Sn.b)({next:()=>Qt=!0,complete:()=>{Qt||this.cancelNavigationTransition(pt,"",2)}}))}),(0,Sn.b)(pt=>{const Qt=new Oa(pt.id,this.urlSerializer.serialize(pt.extractedUrl),this.urlSerializer.serialize(pt.urlAfterRedirects),pt.targetSnapshot);this.events.next(Qt)}))}),F(Ie=>{const pt=Qt=>{const Jn=[];Qt.routeConfig?.loadComponent&&!Qt.routeConfig._loadedComponent&&Jn.push(this.configLoader.loadComponent(Qt.routeConfig).pipe((0,Sn.b)(Dn=>{Qt.component=Dn}),(0,Me.U)(()=>{})));for(const Dn of Qt.children)Jn.push(...pt(Dn));return Jn};return(0,_e.a)(pt(Ie.targetSnapshot.root)).pipe((0,Qi.d)(),(0,it.q)(1))}),F(()=>this.afterPreactivation()),(0,Me.U)(Ie=>{const pt=function Qr(I,O,w){const R=vr(I,O._root,w?w._root:void 0);return new os(R,O)}(w.routeReuseStrategy,Ie.targetSnapshot,Ie.currentRouterState);return this.currentTransition=Q={...Ie,targetRouterState:pt},Q}),(0,Sn.b)(()=>{this.events.next(new Es)}),((I,O,w,R)=>(0,Me.U)(H=>(new Xr(O,H.targetRouterState,H.currentRouterState,w,R).activate(I),H)))(this.rootContexts,w.routeReuseStrategy,Ie=>this.events.next(Ie),this.inputBindingEnabled),(0,it.q)(1),(0,Sn.b)({next:Ie=>{ee=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new di(Ie.id,this.urlSerializer.serialize(Ie.extractedUrl),this.urlSerializer.serialize(Ie.urlAfterRedirects))),w.titleStrategy?.updateTitle(Ie.targetRouterState.snapshot),Ie.resolve(!0)},complete:()=>{ee=!0}}),(0,_t.R)(this.transitionAbortSubject.pipe((0,Sn.b)(Ie=>{throw Ie}))),(0,Ke.x)(()=>{ee||Ae||this.cancelNavigationTransition(Q,"",1),this.currentNavigation?.id===Q.id&&(this.currentNavigation=null)}),Bn(Ie=>{if(Ae=!0,Er(Ie))this.events.next(new Gr(Q.id,this.urlSerializer.serialize(Q.extractedUrl),Ie.message,Ie.cancellationCode)),function Gs(I){return Er(I)&&ge(I.url)}(Ie)?this.events.next(new Di(Ie.url)):Q.resolve(!1);else{this.events.next(new hn(Q.id,this.urlSerializer.serialize(Q.extractedUrl),Ie,Q.targetSnapshot??void 0));try{Q.resolve(w.errorHandler(Ie))}catch(pt){Q.reject(pt)}}return He.E}))}))}cancelNavigationTransition(w,R,H){const Q=new Gr(w.id,this.urlSerializer.serialize(w.extractedUrl),R,H);this.events.next(Q),w.resolve(!1)}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();function ft(I){return I!==Si}let Lt=(()=>{class I{buildTitle(w){let R,H=w.root;for(;void 0!==H;)R=this.getResolvedTitleForRoute(H)??R,H=H.children.find(Q=>Q.outlet===Xe);return R}getResolvedTitleForRoute(w){return w.data[cn]}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:function(){return(0,l.f3M)(Vt)},providedIn:"root"})}return I})(),Vt=(()=>{class I extends Lt{constructor(w){super(),this.title=w}updateTitle(w){const R=this.buildTitle(w);void 0!==R&&this.title.setTitle(R)}static#e=this.\u0275fac=function(R){return new(R||I)(l.LFG(ei.Dx))};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})(),It=(()=>{class I{static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:function(){return(0,l.f3M)(Yt)},providedIn:"root"})}return I})();class ln{shouldDetach(O){return!1}store(O,w){}shouldAttach(O){return!1}retrieve(O){return null}shouldReuseRoute(O,w){return O.routeConfig===w.routeConfig}}let Yt=(()=>{class I extends ln{static#e=this.\u0275fac=function(){let w;return function(H){return(w||(w=l.n5z(I)))(H||I)}}();static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();const Rn=new l.OlP("",{providedIn:"root",factory:()=>({})});let Ii=(()=>{class I{static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:function(){return(0,l.f3M)(zn)},providedIn:"root"})}return I})(),zn=(()=>{class I{shouldProcessUrl(w){return!0}extract(w){return w}merge(w,R){return w}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();var Ai=function(I){return I[I.COMPLETE=0]="COMPLETE",I[I.FAILED=1]="FAILED",I[I.REDIRECTING=2]="REDIRECTING",I}(Ai||{});function si(I,O){I.events.pipe((0,wt.h)(w=>w instanceof di||w instanceof Gr||w instanceof hn||w instanceof gr),(0,Me.U)(w=>w instanceof di||w instanceof gr?Ai.COMPLETE:w instanceof Gr&&(0===w.code||1===w.code)?Ai.REDIRECTING:Ai.FAILED),(0,wt.h)(w=>w!==Ai.REDIRECTING),(0,it.q)(1)).subscribe(()=>{O()})}function Xi(I){throw I}function Fi(I,O,w){return O.parse("/")}const kr={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},fo={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let on=(()=>{class I{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.location.getState()?.\u0275routerPageId??this.currentPageId}get events(){return this._events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=(0,l.f3M)(l.c2e),this.isNgZoneEnabled=!1,this._events=new ne.x,this.options=(0,l.f3M)(Rn,{optional:!0})||{},this.pendingTasks=(0,l.f3M)(l.HDt),this.errorHandler=this.options.errorHandler||Xi,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||Fi,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=(0,l.f3M)(Ii),this.routeReuseStrategy=(0,l.f3M)(It),this.titleStrategy=(0,l.f3M)(Lt),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=(0,l.f3M)(x,{optional:!0})?.flat()??[],this.navigationTransitions=(0,l.f3M)(Ue),this.urlSerializer=(0,l.f3M)(tn),this.location=(0,l.f3M)(Pe.Ye),this.componentInputBindingEnabled=!!(0,l.f3M)(mr,{optional:!0}),this.eventsSubscription=new Le.w0,this.isNgZoneEnabled=(0,l.f3M)(l.R0b)instanceof l.R0b&&l.R0b.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Ri,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_i(0,null),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe(w=>{this.lastSuccessfulId=w.id,this.currentPageId=this.browserPageId},w=>{this.console.warn(`Unhandled Navigation Error: ${w}`)}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const w=this.navigationTransitions.events.subscribe(R=>{try{const{currentTransition:H}=this.navigationTransitions;if(null===H)return void(Ct(R)&&this._events.next(R));if(R instanceof sr)ft(H.source)&&(this.browserUrlTree=H.extractedUrl);else if(R instanceof gr)this.rawUrlTree=H.rawUrl;else if(R instanceof $s){if("eager"===this.urlUpdateStrategy){if(!H.extras.skipLocationChange){const Q=this.urlHandlingStrategy.merge(H.urlAfterRedirects,H.rawUrl);this.setBrowserUrl(Q,H)}this.browserUrlTree=H.urlAfterRedirects}}else if(R instanceof Es)this.currentUrlTree=H.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(H.urlAfterRedirects,H.rawUrl),this.routerState=H.targetRouterState,"deferred"===this.urlUpdateStrategy&&(H.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,H),this.browserUrlTree=H.urlAfterRedirects);else if(R instanceof Gr)0!==R.code&&1!==R.code&&(this.navigated=!0),(3===R.code||2===R.code)&&this.restoreHistory(H);else if(R instanceof Di){const Q=this.urlHandlingStrategy.merge(R.url,H.currentRawUrl),ee={skipLocationChange:H.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||ft(H.source)};this.scheduleNavigation(Q,Si,null,ee,{resolve:H.resolve,reject:H.reject,promise:H.promise})}R instanceof hn&&this.restoreHistory(H,!0),R instanceof di&&(this.navigated=!0),Ct(R)&&this._events.next(R)}catch(H){this.navigationTransitions.transitionAbortSubject.next(H)}});this.eventsSubscription.add(w)}resetRootComponentType(w){this.routerState.root.component=w,this.navigationTransitions.rootComponentType=w}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const w=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Si,w)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(w=>{const R="popstate"===w.type?"popstate":"hashchange";"popstate"===R&&setTimeout(()=>{this.navigateToSyncWithBrowser(w.url,R,w.state)},0)}))}navigateToSyncWithBrowser(w,R,H){const Q={replaceUrl:!0},ee=H?.navigationId?H:null;if(H){const Ie={...H};delete Ie.navigationId,delete Ie.\u0275routerPageId,0!==Object.keys(Ie).length&&(Q.state=Ie)}const Ae=this.parseUrl(w);this.scheduleNavigation(Ae,R,ee,Q)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(w){this.config=w.map(Jr),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(w,R={}){const{relativeTo:H,queryParams:Q,fragment:ee,queryParamsHandling:Ae,preserveFragment:Ie}=R,pt=Ie?this.currentUrlTree.fragment:ee;let Jn,Qt=null;switch(Ae){case"merge":Qt={...this.currentUrlTree.queryParams,...Q};break;case"preserve":Qt=this.currentUrlTree.queryParams;break;default:Qt=Q||null}null!==Qt&&(Qt=this.removeEmptyProps(Qt));try{Jn=ue(H?H.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof w[0]||!w[0].startsWith("/"))&&(w=[]),Jn=this.currentUrlTree.root}return ze(Jn,w,Qt,pt??null)}navigateByUrl(w,R={skipLocationChange:!1}){const H=ge(w)?w:this.parseUrl(w),Q=this.urlHandlingStrategy.merge(H,this.rawUrlTree);return this.scheduleNavigation(Q,Si,null,R)}navigate(w,R={skipLocationChange:!1}){return function La(I){for(let O=0;O{const Q=w[H];return null!=Q&&(R[H]=Q),R},{})}scheduleNavigation(w,R,H,Q,ee){if(this.disposed)return Promise.resolve(!1);let Ae,Ie,pt;ee?(Ae=ee.resolve,Ie=ee.reject,pt=ee.promise):pt=new Promise((Jn,Dn)=>{Ae=Jn,Ie=Dn});const Qt=this.pendingTasks.add();return si(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(Qt))}),this.navigationTransitions.handleNavigationRequest({source:R,restoredState:H,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,currentBrowserUrl:this.browserUrlTree,rawUrl:w,extras:Q,resolve:Ae,reject:Ie,promise:pt,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),pt.catch(Jn=>Promise.reject(Jn))}setBrowserUrl(w,R){const H=this.urlSerializer.serialize(w);if(this.location.isCurrentPathEqualTo(H)||R.extras.replaceUrl){const ee={...R.extras.state,...this.generateNgRouterState(R.id,this.browserPageId)};this.location.replaceState(H,"",ee)}else{const Q={...R.extras.state,...this.generateNgRouterState(R.id,this.browserPageId+1)};this.location.go(H,"",Q)}}restoreHistory(w,R=!1){if("computed"===this.canceledNavigationResolution){const Q=this.currentPageId-this.browserPageId;0!==Q?this.location.historyGo(Q):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===Q&&(this.resetState(w),this.browserUrlTree=w.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(R&&this.resetState(w),this.resetUrlToCurrentUrlTree())}resetState(w){this.routerState=w.currentRouterState,this.currentUrlTree=w.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,w.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(w,R){return"computed"===this.canceledNavigationResolution?{navigationId:w,\u0275routerPageId:R}:{navigationId:w}}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();function Ct(I){return!(I instanceof Es||I instanceof Di)}let vt=(()=>{class I{constructor(w,R,H,Q,ee,Ae){this.router=w,this.route=R,this.tabIndexAttribute=H,this.renderer=Q,this.el=ee,this.locationStrategy=Ae,this.href=null,this.commands=null,this.onChanges=new ne.x,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;const Ie=ee.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===Ie||"area"===Ie,this.isAnchorElement?this.subscription=w.events.subscribe(pt=>{pt instanceof di&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(w){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",w)}ngOnChanges(w){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(w){null!=w?(this.commands=Array.isArray(w)?w:[w],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(w,R,H,Q,ee){return!!(null===this.urlTree||this.isAnchorElement&&(0!==w||R||H||Q||ee||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const w=null===this.href?null:(0,l.P3R)(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",w)}applyAttributeValue(w,R){const H=this.renderer,Q=this.el.nativeElement;null!==R?H.setAttribute(Q,w,R):H.removeAttribute(Q,w)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static#e=this.\u0275fac=function(R){return new(R||I)(l.Y36(on),l.Y36(Ui),l.$8M("tabindex"),l.Y36(l.Qsj),l.Y36(l.SBq),l.Y36(Pe.S$))};static#t=this.\u0275dir=l.lG2({type:I,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(R,H){1&R&&l.NdJ("click",function(ee){return H.onClick(ee.button,ee.ctrlKey,ee.shiftKey,ee.altKey,ee.metaKey)}),2&R&&l.uIk("target",H.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:["preserveFragment","preserveFragment",l.VuI],skipLocationChange:["skipLocationChange","skipLocationChange",l.VuI],replaceUrl:["replaceUrl","replaceUrl",l.VuI],routerLink:"routerLink"},standalone:!0,features:[l.Xq5,l.TTD]})}return I})(),Bt=(()=>{class I{get isActive(){return this._isActive}constructor(w,R,H,Q,ee){this.router=w,this.element=R,this.renderer=H,this.cdr=Q,this.link=ee,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new l.vpe,this.routerEventsSubscription=w.events.subscribe(Ae=>{Ae instanceof di&&this.update()})}ngAfterContentInit(){(0,re.of)(this.links.changes,(0,re.of)(null)).pipe((0,ot.J)()).subscribe(w=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const w=[...this.links.toArray(),this.link].filter(R=>!!R).map(R=>R.onChanges);this.linkInputChangesSubscription=(0,de.D)(w).pipe((0,ot.J)()).subscribe(R=>{this._isActive!==this.isLinkActive(this.router)(R)&&this.update()})}set routerLinkActive(w){const R=Array.isArray(w)?w:w.split(" ");this.classes=R.filter(H=>!!H)}ngOnChanges(w){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{const w=this.hasActiveLinks();this._isActive!==w&&(this._isActive=w,this.cdr.markForCheck(),this.classes.forEach(R=>{w?this.renderer.addClass(this.element.nativeElement,R):this.renderer.removeClass(this.element.nativeElement,R)}),w&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(w))})}isLinkActive(w){const R=function vn(I){return!!I.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return H=>!!H.urlTree&&w.isActive(H.urlTree,R)}hasActiveLinks(){const w=this.isLinkActive(this.router);return this.link&&w(this.link)||this.links.some(w)}static#e=this.\u0275fac=function(R){return new(R||I)(l.Y36(on),l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(l.sBO),l.Y36(vt,8))};static#t=this.\u0275dir=l.lG2({type:I,selectors:[["","routerLinkActive",""]],contentQueries:function(R,H,Q){if(1&R&&l.Suo(Q,vt,5),2&R){let ee;l.iGM(ee=l.CRH())&&(H.links=ee)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[l.TTD]})}return I})();class oi{}let yi=(()=>{class I{preload(w,R){return R().pipe(Bn(()=>(0,re.of)(null)))}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})(),po=(()=>{class I{constructor(w,R,H,Q,ee){this.router=w,this.injector=H,this.preloadingStrategy=Q,this.loader=ee}setUpPreloading(){this.subscription=this.router.events.pipe((0,wt.h)(w=>w instanceof di),(0,Vn.b)(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(w,R){const H=[];for(const Q of R){Q.providers&&!Q._injector&&(Q._injector=(0,l.MMx)(Q.providers,w,`Route: ${Q.path}`));const ee=Q._injector??w,Ae=Q._loadedInjector??ee;(Q.loadChildren&&!Q._loadedRoutes&&void 0===Q.canLoad||Q.loadComponent&&!Q._loadedComponent)&&H.push(this.preloadConfig(ee,Q)),(Q.children||Q._loadedRoutes)&&H.push(this.processRoutes(Ae,Q.children??Q._loadedRoutes))}return(0,de.D)(H).pipe((0,ot.J)())}preloadConfig(w,R){return this.preloadingStrategy.preload(R,()=>{let H;H=R.loadChildren&&void 0===R.canLoad?this.loader.loadChildren(w,R):(0,re.of)(null);const Q=H.pipe((0,mt.z)(ee=>null===ee?(0,re.of)(void 0):(R._loadedRoutes=ee.routes,R._loadedInjector=ee.injector,this.processRoutes(ee.injector??w,ee.routes))));if(R.loadComponent&&!R._loadedComponent){const ee=this.loader.loadComponent(R);return(0,de.D)([Q,ee]).pipe((0,ot.J)())}return Q})}static#e=this.\u0275fac=function(R){return new(R||I)(l.LFG(on),l.LFG(l.Sil),l.LFG(l.lqb),l.LFG(oi),l.LFG(V))};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();const Kn=new l.OlP("");let hs=(()=>{class I{constructor(w,R,H,Q,ee={}){this.urlSerializer=w,this.transitions=R,this.viewportScroller=H,this.zone=Q,this.options=ee,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},ee.scrollPositionRestoration=ee.scrollPositionRestoration||"disabled",ee.anchorScrolling=ee.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(w=>{w instanceof sr?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=w.navigationTrigger,this.restoredId=w.restoredState?w.restoredState.navigationId:0):w instanceof di?(this.lastId=w.id,this.scheduleScrollEvent(w,this.urlSerializer.parse(w.urlAfterRedirects).fragment)):w instanceof gr&&0===w.code&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(w,this.urlSerializer.parse(w.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(w=>{w instanceof ii&&(w.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(w.position):w.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(w.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(w,R){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new ii(w,"popstate"===this.lastSource?this.store[this.restoredId]:null,R))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static#e=this.\u0275fac=function(R){l.$Z()};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac})}return I})();function ur(I,O){return{\u0275kind:I,\u0275providers:O}}function qu(){const I=(0,l.f3M)(l.zs3);return O=>{const w=I.get(l.z2F);if(O!==w.components[0])return;const R=I.get(on),H=I.get(fm);1===I.get(Ku)&&R.initialNavigation(),I.get(pa,null,l.XFs.Optional)?.setUpPreloading(),I.get(Kn,null,l.XFs.Optional)?.init(),R.resetRootComponentType(w.componentTypes[0]),H.closed||(H.next(),H.complete(),H.unsubscribe())}}const fm=new l.OlP("",{factory:()=>new ne.x}),Ku=new l.OlP("",{providedIn:"root",factory:()=>1}),pa=new l.OlP("");function vm(I){return ur(0,[{provide:pa,useExisting:po},{provide:oi,useExisting:I}])}const Cn=new l.OlP("ROUTER_FORROOT_GUARD"),rf=[Pe.Ye,{provide:tn,useClass:Dr},on,wr,{provide:Ui,useFactory:function er(I){return I.routerState.root},deps:[on]},V,[]];function sf(){return new l.PXZ("Router",on)}let yr=(()=>{class I{constructor(w){}static forRoot(w,R){return{ngModule:I,providers:[rf,[],{provide:x,multi:!0,useValue:w},{provide:Cn,useFactory:Ju,deps:[[on,new l.FiY,new l.tp0]]},{provide:Rn,useValue:R||{}},R?.useHash?{provide:Pe.S$,useClass:Pe.Do}:{provide:Pe.S$,useClass:Pe.b0},{provide:Kn,useFactory:()=>{const I=(0,l.f3M)(Pe.EM),O=(0,l.f3M)(l.R0b),w=(0,l.f3M)(Rn),R=(0,l.f3M)(Ue),H=(0,l.f3M)(tn);return w.scrollOffset&&I.setOffset(w.scrollOffset),new hs(H,R,I,O,w)}},R?.preloadingStrategy?vm(R.preloadingStrategy).\u0275providers:[],{provide:l.PXZ,multi:!0,useFactory:sf},R?.initialNavigation?Xu(R):[],R?.bindToComponentInputs?ur(8,[yn,{provide:mr,useExisting:yn}]).\u0275providers:[],[{provide:lf,useFactory:qu},{provide:l.tb,multi:!0,useExisting:lf}]]}}static forChild(w){return{ngModule:I,providers:[{provide:x,multi:!0,useValue:w}]}}static#e=this.\u0275fac=function(R){return new(R||I)(l.LFG(Cn,8))};static#t=this.\u0275mod=l.oAB({type:I});static#n=this.\u0275inj=l.cJS({})}return I})();function Ju(I){return"guarded"}function Xu(I){return["disabled"===I.initialNavigation?ur(3,[{provide:l.ip1,multi:!0,useFactory:()=>{const O=(0,l.f3M)(on);return()=>{O.setUpLocationChangeListener()}}},{provide:Ku,useValue:2}]).\u0275providers:[],"enabledBlocking"===I.initialNavigation?ur(2,[{provide:Ku,useValue:0},{provide:l.ip1,multi:!0,deps:[l.zs3],useFactory:O=>{const w=O.get(Pe.V_,Promise.resolve());return()=>w.then(()=>new Promise(R=>{const H=O.get(on),Q=O.get(fm);si(H,()=>{R(!0)}),O.get(Ue).afterPreactivation=()=>(R(!0),Q.closed?(0,re.of)(void 0):Q),H.initialNavigation()}))}}]).\u0275providers:[]]}const lf=new l.OlP("")},7243:(ct,De,L)=>{L.d(De,{K6A:()=>pw,I9z:()=>nC,KKC:()=>Cu,Y_4:()=>X_,PEh:()=>sc,CM6:()=>fg,C9t:()=>Iy,fv_:()=>xu,m4W:()=>kg,dRQ:()=>kh,Z4N:()=>xh,YAP:()=>rD,uUW:()=>oC,qvL:()=>$p,nqY:()=>dg,xRP:()=>I1,G55:()=>pD,MgK:()=>Ir,mIp:()=>uh,QoI:()=>rC,saT:()=>aC,blk:()=>Eg,XTz:()=>wg,otW:()=>yy,dTv:()=>Tg,EuU:()=>Ah,hQ:()=>sm,vNO:()=>oc,fzC:()=>nm,A0B:()=>rm,d6G:()=>Gh,ogR:()=>Yh,zYX:()=>fC,zuD:()=>Cc,toC:()=>sC,dml:()=>xg,jND:()=>Yg,KHL:()=>Wg,PDs:()=>Fh,Gcc:()=>Ny,Nh1:()=>Iu,K8c:()=>MD});var l=L(3714),k=L(3223);class de{constructor(f,a){this.fn=f,this.subscriptions=a}unsubscribe(){const f=this.subscriptions.indexOf(this);-1!==f&&this.subscriptions.splice(f,1)}}function ce(d){return null!=d&&"object"==typeof d&&!0===d["@@functional/placeholder"]}function _e(d){return function f(a){return 0===arguments.length||ce(a)?f:d.apply(this,arguments)}}function ve(d){return function f(a,g){switch(arguments.length){case 0:return f;case 1:return ce(a)?f:_e(function(_){return d(a,_)});default:return ce(a)&&ce(g)?f:ce(a)?_e(function(_){return d(_,g)}):ce(g)?_e(function(_){return d(a,_)}):d(a,g)}}}const be=ve(function(f,a){return a instanceof f||null!=a&&(a.constructor===f||"Object"===f.name&&"object"==typeof a)});function ae(d,f){return Object.prototype.hasOwnProperty.call(f,d)}var fe=Object.prototype.toString;const Ve=function(){return"[object Arguments]"===fe.call(arguments)?function(f){return"[object Arguments]"===fe.call(f)}:function(f){return ae("callee",f)}}(),ke=Array.isArray||function(f){return null!=f&&f.length>=0&&"[object Array]"===Object.prototype.toString.call(f)};function Le(d){return"[object String]"===Object.prototype.toString.call(d)}var at=_e(function(f){return null!=f&&"function"==typeof f["fantasy-land/empty"]?f["fantasy-land/empty"]():null!=f&&null!=f.constructor&&"function"==typeof f.constructor["fantasy-land/empty"]?f.constructor["fantasy-land/empty"]():null!=f&&"function"==typeof f.empty?f.empty():null!=f&&null!=f.constructor&&"function"==typeof f.constructor.empty?f.constructor.empty():ke(f)?[]:Le(f)?"":function He(d){return"[object Object]"===Object.prototype.toString.call(d)}(f)?{}:Ve(f)?function(){return arguments}():function Re(d){var f=Object.prototype.toString.call(d);return"[object Uint8ClampedArray]"===f||"[object Int8Array]"===f||"[object Uint8Array]"===f||"[object Int16Array]"===f||"[object Uint16Array]"===f||"[object Int32Array]"===f||"[object Uint32Array]"===f||"[object Float32Array]"===f||"[object Float64Array]"===f||"[object BigInt64Array]"===f||"[object BigUint64Array]"===f}(f)?f.constructor.from(""):void 0});const Dt=at;function ut(d){for(var a,f=[];!(a=d.next()).done;)f.push(a.value);return f}function ne(d,f,a){for(var g=0,_=a.length;g<_;){if(d(f,a[g]))return!0;g+=1}return!1}const nt="function"==typeof Object.is?Object.is:function Me(d,f){return d===f?0!==d||1/d==1/f:d!=d&&f!=f};var it=!{toString:null}.propertyIsEnumerable("toString"),Je=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],wt=function(){return arguments.propertyIsEnumerable("length")}(),mt=function(f,a){for(var g=0;g=0;)ae(a=Je[g],f)&&!mt(_,a)&&(_[_.length]=a),g-=1;return _}:function(f){return Object(f)!==f?[]:Object.keys(f)}),Bn=_e(function(f){return null===f?"Null":void 0===f?"Undefined":Object.prototype.toString.call(f).slice(8,-1)});function Nt(d,f,a,g){var _=ut(d);function j(J,te){return Ar(J,te,a.slice(),g.slice())}return!ne(function(J,te){return!ne(j,te,J)},ut(f),_)}function Ar(d,f,a,g){if(nt(d,f))return!0;var _=Bn(d);if(_!==Bn(f))return!1;if("function"==typeof d["fantasy-land/equals"]||"function"==typeof f["fantasy-land/equals"])return"function"==typeof d["fantasy-land/equals"]&&d["fantasy-land/equals"](f)&&"function"==typeof f["fantasy-land/equals"]&&f["fantasy-land/equals"](d);if("function"==typeof d.equals||"function"==typeof f.equals)return"function"==typeof d.equals&&d.equals(f)&&"function"==typeof f.equals&&f.equals(d);switch(_){case"Arguments":case"Array":case"Object":if("function"==typeof d.constructor&&"Promise"===function Pe(d){var f=String(d).match(/^function (\w*)/);return null==f?"":f[1]}(d.constructor))return d===f;break;case"Boolean":case"Number":case"String":if(typeof d!=typeof f||!nt(d.valueOf(),f.valueOf()))return!1;break;case"Date":if(!nt(d.valueOf(),f.valueOf()))return!1;break;case"Error":return d.name===f.name&&d.message===f.message;case"RegExp":if(d.source!==f.source||d.global!==f.global||d.ignoreCase!==f.ignoreCase||d.multiline!==f.multiline||d.sticky!==f.sticky||d.unicode!==f.unicode)return!1}for(var S=a.length-1;S>=0;){if(a[S]===d)return g[S]===f;S-=1}switch(_){case"Map":return d.size===f.size&&Nt(d.entries(),f.entries(),a.concat([d]),g.concat([f]));case"Set":return d.size===f.size&&Nt(d.values(),f.values(),a.concat([d]),g.concat([f]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var j=Vn(d);if(j.length!==Vn(f).length)return!1;var J=a.concat([d]),te=g.concat([f]);for(S=j.length-1;S>=0;){var Ce=j[S];if(!ae(Ce,f)||!Ar(f[Ce],d[Ce],J,te))return!1;S-=1}return!0}const xe=ve(function(f,a){return Ar(f,a,[],[])}),Fe=_e(function(f){return null!=f&&xe(f,Dt(f))});function Ne(d){return null==d}function We(d){return Ne(d)||Fe(d)}function Ke(d){return be(String,d)}function Xe(d){return be(Object,d)}function cn(d){return be(Map,d)}function kt(d,f){return d!==f}function Vi(d,f){return JSON.stringify(d)===JSON.stringify(f)}function fr(d){const f=new Map;for(const[a,g]of d)cn(g)?f.set(a,fr(g)):f.set(a,g);return f}function nr(d){switch(!0){case cn(d):return fr(d);case Xe(d)&&!Array.isArray(d):return bt({},d);default:return JSON.parse(JSON.stringify(d))}}function bt(...d){const f={};return d.map(a=>Xe(a)?{...a}:{}).forEach(a=>{Object.keys(a).forEach(g=>{const _=a[g];f[g]=Array.isArray(_)?Array.from(_):Xe(_)?bt(f[g]||{},_):_})}),f}function Un(d=window){return!Ne(d)}let $r,tn,Dr,Nn;function qi(d=!0){if(!d||!$r){const f=document&&document.querySelector("[ng-version]");$r=f?""+f.getAttribute("ng-version"):void 0}return $r}function ti(d=!0){return d&&$r||(tn=window?.angular?.version?.full),tn}function ni(d=!0){return d&&Dr||(Dr=window?.CDS?._react?.version?window.CDS._react.version:document.querySelector("[data-reactroot], [data-reactid]")?"unknown version":void 0),Dr}function $n(d=!0){if(!d||!Nn){const f=document.querySelectorAll("*");let a;for(let g=0;g"-"+f.toLowerCase())}function pe(d){return d.charAt(0).toUpperCase()+d.slice(1)}const ht=new class{constructor(){if(this.supports={js:!0},!document.body.hasAttribute("cds-supports")||"no-js"===document.body.getAttribute("cds-supports")){const d=Pi(Object.keys(this.supports).reduce((f,a)=>`${f} ${this.supports[a]?a:"no-"+a}`,"")).trim();document.body.setAttribute("cds-supports",d)}}};function En(d,f){switch(d){case 0:return function(){return f.apply(this,arguments)};case 1:return function(a){return f.apply(this,arguments)};case 2:return function(a,g){return f.apply(this,arguments)};case 3:return function(a,g,_){return f.apply(this,arguments)};case 4:return function(a,g,_,S){return f.apply(this,arguments)};case 5:return function(a,g,_,S,j){return f.apply(this,arguments)};case 6:return function(a,g,_,S,j,J){return f.apply(this,arguments)};case 7:return function(a,g,_,S,j,J,te){return f.apply(this,arguments)};case 8:return function(a,g,_,S,j,J,te,Ce){return f.apply(this,arguments)};case 9:return function(a,g,_,S,j,J,te,Ce,Ge){return f.apply(this,arguments)};case 10:return function(a,g,_,S,j,J,te,Ce,Ge,St){return f.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function ui(d,f,a){return function(){for(var g=[],_=0,S=d,j=0,J=!1;j=arguments.length)?te=f[j]:(te=arguments[_],_+=1),g[j]=te,ce(te)?J=!0:S-=1,j+=1}return!J&&S<=0?a.apply(this,g):En(Math.max(0,S),ui(d,g,a))}}const Ei=ve(function(f,a){return 1===f?_e(a):En(f,ui(f,[],a))}),Fn=Number.isInteger||function(f){return f<<0===f},Wt=ve(function(f,a){var g=f<0?a.length+f:f;return Le(a)?a.charAt(g):a[g]}),zi=ve(function(f,a){return f.map(function(g){for(var j,_=a,S=0;Svoid 0!==Yn(d,f)),sr=Si({"@@functional/placeholder":!0},window);class di{static log(...f){gr()&&Gr()&&console.log(...f)}static warn(...f){gr()&&Gr()&&console.warn(...f)}static error(...f){gr()&&Gr()&&console.error(...f)}}function Gr(){return!sr(["jasmine"])}function gr(){return!window.CDS.environment.production}function hn(){Un()&&(window.CDS=window.CDS||{_version:[],_react:{version:void 0},_supports:ht.supports,_isStateProxied:!1,_state:{focusTrapItems:[],layerElements:[],i18nRegistry:{},elementRegistry:{},iconRegistry:{},motionRegistry:{}},environment:{production:!1},getDetails:$s,logDetails:ua},function(){const d="6.9.0";window.CDS._version.indexOf(d)<0&&(window.CDS._version.push(d),document.querySelector("body")?.setAttribute("cds-version",window.CDS._version.join(" "))),window.CDS._version.length>1&&di.warn("Running more than one version of Clarity can cause unexpected issues. Please ensure only one version is loaded.")}(),window.CDS._isStateProxied||(window.CDS._isStateProxied=!0,window.CDS._state=new Proxy(window.CDS._state,{set:(d,f,a)=>{const g={key:f,prev:window.CDS._state[f],current:a};return d[f]=a,document.dispatchEvent(new CustomEvent("CDS_STATE_UPDATE",{detail:g})),!0}})))}function $s(){return{versions:window.CDS._version,environment:window.CDS.environment,userAgent:navigator.userAgent,supports:window.CDS._supports,angularVersion:qi(!1),angularJSVersion:ti(!1),reactVersion:ni(!1),vueVersion:$n(!1),state:{...window.CDS._state,iconRegistry:Object.keys(window.CDS._state.iconRegistry),motionRegistry:Object.keys(window.CDS._state.motionRegistry),focusTrapRegistry:Object.keys(window.CDS._state.focusTrapItems.map(d=>d.focusTrapId))}}}function ua(){di.log(JSON.stringify($s(),null,2))}const da=new class re{constructor(){this.subscriptions=[]}subscribe(f){const a=new de(f,this.subscriptions);return this.subscriptions.push(a),a}emit(f){this.subscriptions.forEach(a=>a.fn(f))}toEventObservable(){return this}};da.listener=document.addEventListener("CDS_STATE_UPDATE",d=>da.emit(d.detail));class hi{static get state(){return hn(),window.CDS._state}static getValue(f){return hi.state[f]}static setValue(f,a){hi.state[f]=a}static log(){di.log(JSON.stringify(hi.state,null,2))}}hi.stateUpdates=da.toEventObservable();const Io=["unknown",{outline:''}];class Jt{static get registry(){return{unknown:Io[1],...hi.state.iconRegistry}}static addIcons(...f){hi.state.iconRegistry={...hi.state.iconRegistry,...Object.fromEntries(f.filter(([a])=>!Jt.registry[a]))}}static addAliases(...f){const a=f.filter(([g])=>Jt.registry[g]).flatMap(([g,_])=>_.map(S=>[S,Jt.registry[g]]));hi.state.iconRegistry={...hi.state.iconRegistry,...Object.fromEntries(a)}}static getIconNameFromShape(f){return f[0]}}const Yr=["angle",{outline:''}],ii=["exclamation-circle",{outline:'',solid:''}],Di=["check-circle",{outline:'',solid:''}],Ao=["ellipsis-horizontal",{outline:'',outlineBadged:''}],Or=["window-close",{outline:''}],Zt=["event",{outline:'',outlineAlerted:'',outlineBadged:'',solid:'',solidAlerted:'',solidBadged:''}],Hn=["calendar",{outline:'',outlineAlerted:'',outlineBadged:'',solid:'',solidAlerted:'',solidBadged:''}],_i=["eye-hide",{outline:'',solid:''}],Ui=["eye",{outline:'',solid:''}],Zr=["ellipsis-vertical",{outline:'',outlineBadged:''}],On=["view-columns",{outline:''}],Ht=["arrow",{outline:''}],fi=["times",{outline:''}],ri=["step-forward-2",{outline:''}],yn=["angle-double",{outline:''}],vr=["filter-grid-circle",{outline:'',solid:''}],As=["filter-grid",{outline:'',solid:''}],qr=["info-circle",{outline:'',solid:''}],Gs=["exclamation-triangle",{outline:'',solid:''}],$i=["circle",{outline:'',solid:''}],Ra=["dot-circle",{outline:''}],_r=["error-standard",{outline:'',solid:''}],Ys=["success-standard",{outline:'',solid:''}];var zt=L(5990),Mo=L(8527),or=L(1553);L(8777),L(4134),L(8014);var Ln=L(9735),Zn=L(1050),Xr=L(7701),Qn=L(4359),Ms=(L(2972),L(3318)),et=L(5992),fn=L(8626),qn=L(1145),ki=L(3276),ao=L(2861),es=L(287),lo=L(238);class ds extends et.x{constructor(f=1/0,a=1/0,g=lo.l){super(),this._bufferSize=f,this._windowTime=a,this._timestampProvider=g,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=a===1/0,this._bufferSize=Math.max(1,f),this._windowTime=Math.max(1,a)}next(f){const{isStopped:a,_buffer:g,_infiniteTimeWindow:_,_timestampProvider:S,_windowTime:j}=this;a||(g.push(f),!_&&g.push(S.now()+j)),this._trimBuffer(),super.next(f)}_subscribe(f){this._throwIfClosed(),this._trimBuffer();const a=this._innerSubscribe(f),{_infiniteTimeWindow:g,_buffer:_}=this,S=_.slice();for(let j=0;j{class d{constructor(a){this._platformId=a,this.isBrowser=this._platformId?(0,k.NF)(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!se)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(l.Lbi))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();function xo(d){return function hl(){if(null==Go&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Go=!0}))}finally{Go=Go||!1}return Go}()?d:!!d.capture}function cr(d){if(function Os(){if(null==Oo){const d=typeof document<"u"?document.head:null;Oo=!(!d||!d.createShadowRoot&&!d.attachShadow)}return Oo}()){const f=d.getRootNode?d.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&f instanceof ShadowRoot)return f}return null}function uo(d){return d.composedPath?d.composedPath()[0]:d.target}function gi(d){return null!=d&&"false"!=`${d}`}function fs(d){return d instanceof l.SBq?d.nativeElement:d}let Dw=(()=>{class d{constructor(a){this._platform=a}isDisabled(a){return a.hasAttribute("disabled")}isVisible(a){return function ww(d){return!!(d.offsetWidth||d.offsetHeight||"function"==typeof d.getClientRects&&d.getClientRects().length)}(a)&&"visible"===getComputedStyle(a).visibility}isTabbable(a){if(!this._platform.isBrowser)return!1;const g=function hf(d){try{return d.frameElement}catch{return null}}(function id(d){return d.ownerDocument&&d.ownerDocument.defaultView||window}(a));if(g&&(-1===Sm(g)||!this.isVisible(g)))return!1;let _=a.nodeName.toLowerCase(),S=Sm(a);return a.hasAttribute("contenteditable")?-1!==S:!("iframe"===_||"object"===_||this._platform.WEBKIT&&this._platform.IOS&&!function Ic(d){let f=d.nodeName.toLowerCase(),a="input"===f&&d.type;return"text"===a||"password"===a||"select"===f||"textarea"===f}(a))&&("audio"===_?!!a.hasAttribute("controls")&&-1!==S:"video"===_?-1!==S&&(null!==S||this._platform.FIREFOX||a.hasAttribute("controls")):a.tabIndex>=0)}isFocusable(a,g){return function pf(d){return!function LC(d){return function Tw(d){return"input"==d.nodeName.toLowerCase()}(d)&&"hidden"==d.type}(d)&&(function FC(d){let f=d.nodeName.toLowerCase();return"input"===f||"select"===f||"button"===f||"textarea"===f}(d)||function Ew(d){return function ff(d){return"a"==d.nodeName.toLowerCase()}(d)&&d.hasAttribute("href")}(d)||d.hasAttribute("contenteditable")||Cl(d))}(a)&&!this.isDisabled(a)&&(g?.ignoreVisibility||this.isVisible(a))}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(Tt))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();function Cl(d){if(!d.hasAttribute("tabindex")||void 0===d.tabIndex)return!1;let f=d.getAttribute("tabindex");return!(!f||isNaN(parseInt(f,10)))}function Sm(d){if(!Cl(d))return null;const f=parseInt(d.getAttribute("tabindex")||"",10);return isNaN(f)?-1:f}class Iw{get enabled(){return this._enabled}set enabled(f){this._enabled=f,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(f,this._startAnchor),this._toggleAnchorTabIndex(f,this._endAnchor))}constructor(f,a,g,_,S=!1){this._element=f,this._checker=a,this._ngZone=g,this._document=_,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,S||this.attachAnchors()}destroy(){const f=this._startAnchor,a=this._endAnchor;f&&(f.removeEventListener("focus",this.startAnchorListener),f.remove()),a&&(a.removeEventListener("focus",this.endAnchorListener),a.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(f){return new Promise(a=>{this._executeOnStable(()=>a(this.focusInitialElement(f)))})}focusFirstTabbableElementWhenReady(f){return new Promise(a=>{this._executeOnStable(()=>a(this.focusFirstTabbableElement(f)))})}focusLastTabbableElementWhenReady(f){return new Promise(a=>{this._executeOnStable(()=>a(this.focusLastTabbableElement(f)))})}_getRegionBoundary(f){const a=this._element.querySelectorAll(`[cdk-focus-region-${f}], [cdkFocusRegion${f}], [cdk-focus-${f}]`);return"start"==f?a.length?a[0]:this._getFirstTabbableElement(this._element):a.length?a[a.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(f){const a=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(a){if(!this._checker.isFocusable(a)){const g=this._getFirstTabbableElement(a);return g?.focus(f),!!g}return a.focus(f),!0}return this.focusFirstTabbableElement(f)}focusFirstTabbableElement(f){const a=this._getRegionBoundary("start");return a&&a.focus(f),!!a}focusLastTabbableElement(f){const a=this._getRegionBoundary("end");return a&&a.focus(f),!!a}hasAttached(){return this._hasAttached}_getFirstTabbableElement(f){if(this._checker.isFocusable(f)&&this._checker.isTabbable(f))return f;const a=f.children;for(let g=0;g=0;g--){const _=a[g].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(a[g]):null;if(_)return _}return null}_createAnchor(){const f=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,f),f.classList.add("cdk-visually-hidden"),f.classList.add("cdk-focus-trap-anchor"),f.setAttribute("aria-hidden","true"),f}_toggleAnchorTabIndex(f,a){f?a.setAttribute("tabindex","0"):a.removeAttribute("tabindex")}toggleAnchors(f){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(f,this._startAnchor),this._toggleAnchorTabIndex(f,this._endAnchor))}_executeOnStable(f){this._ngZone.isStable?f():this._ngZone.onStable.pipe((0,Qn.q)(1)).subscribe(f)}}let Dm=(()=>{class d{constructor(a,g,_){this._checker=a,this._ngZone=g,this._document=_}create(a,g=!1){return new Iw(a,this._checker,this._ngZone,this._document,g)}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(Dw),l.LFG(l.R0b),l.LFG(k.K0))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})(),gf=(()=>{class d{get enabled(){return this.focusTrap.enabled}set enabled(a){this.focusTrap.enabled=gi(a)}get autoCapture(){return this._autoCapture}set autoCapture(a){this._autoCapture=gi(a)}constructor(a,g,_){this._elementRef=a,this._focusTrapFactory=g,this._previouslyFocusedElement=null,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}ngOnDestroy(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}ngOnChanges(a){const g=a.autoCapture;g&&!g.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=function Ro(){let d=typeof document<"u"&&document?document.activeElement:null;for(;d&&d.shadowRoot;){const f=d.shadowRoot.activeElement;if(f===d)break;d=f}return d}(),this.focusTrap.focusInitialElementWhenReady()}static#e=this.\u0275fac=function(g){return new(g||d)(l.Y36(l.SBq),l.Y36(Dm),l.Y36(k.K0))};static#t=this.\u0275dir=l.lG2({type:d,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[l.TTD]})}return d})();var od=L(3733),ja=(L(2698),L(6927));let Bw=(()=>{class d{constructor(a,g,_){this._platform=a,this._change=new et.x,this._changeListener=S=>{this._change.next(S)},this._document=_,g.runOutsideAngular(()=>{if(a.isBrowser){const S=this._getWindow();S.addEventListener("resize",this._changeListener),S.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const a=this._getWindow();a.removeEventListener("resize",this._changeListener),a.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const a={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),a}getViewportRect(){const a=this.getViewportScrollPosition(),{width:g,height:_}=this.getViewportSize();return{top:a.top,left:a.left,bottom:a.top+_,right:a.left+g,height:_,width:g}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const a=this._document,g=this._getWindow(),_=a.documentElement,S=_.getBoundingClientRect();return{top:-S.top||a.body.scrollTop||g.scrollY||_.scrollTop||0,left:-S.left||a.body.scrollLeft||g.scrollX||_.scrollLeft||0}}change(a=20){return a>0?this._change.pipe((0,ja.e)(a)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const a=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:a.innerWidth,height:a.innerHeight}:{width:0,height:0}}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(Tt),l.LFG(l.R0b),l.LFG(k.K0,8))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();var va=L(5350),Rc=L(7137);const qC=new l.OlP("cdk-dir-doc",{providedIn:"root",factory:function Uw(){return(0,l.f3M)(k.K0)}}),KC=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let gs=(()=>{class d{constructor(a){this.value="ltr",this.change=new l.vpe,a&&(this.value=function $w(d){const f=d?.toLowerCase()||"";return"auto"===f&&typeof navigator<"u"&&navigator?.language?KC.test(navigator.language)?"rtl":"ltr":"rtl"===f?"rtl":"ltr"}((a.body?a.body.dir:null)||(a.documentElement?a.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(qC,8))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();function xm(d,f,a){for(let g in f)if(f.hasOwnProperty(g)){const _=f[g];_?d.setProperty(g,_,a?.has(g)?"important":""):d.removeProperty(g)}return d}function za(d,f){const a=f?"":"none";xm(d.style,{"touch-action":f?"":"none","-webkit-user-drag":f?"":"none","-webkit-tap-highlight-color":f?"":"transparent","user-select":a,"-ms-user-select":a,"-webkit-user-select":a,"-moz-user-select":a})}function Om(d,f,a){xm(d.style,{position:f?"":"fixed",top:f?"":"0",opacity:f?"":"0",left:f?"":"-999em"},a)}function ld(d,f){return f&&"none"!=f?d+" "+f:d}function Rm(d){const f=d.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(d)*f}function _f(d,f){return d.getPropertyValue(f).split(",").map(g=>g.trim())}function yf(d){const f=d.getBoundingClientRect();return{top:f.top,right:f.right,bottom:f.bottom,left:f.left,width:f.width,height:f.height,x:f.x,y:f.y}}function kc(d,f,a){const{top:g,bottom:_,left:S,right:j}=d;return a>=g&&a<=_&&f>=S&&f<=j}function _a(d,f,a){d.top+=f,d.bottom=d.top+d.height,d.left+=a,d.right=d.left+d.width}function Pm(d,f,a,g){const{top:_,right:S,bottom:j,left:J,width:te,height:Ce}=d,Ge=te*f,St=Ce*f;return g>_-St&&gJ-Ge&&a{this.positions.set(a,{scrollPosition:{top:a.scrollTop,left:a.scrollLeft},clientRect:yf(a)})})}handleScroll(f){const a=uo(f),g=this.positions.get(a);if(!g)return null;const _=g.scrollPosition;let S,j;if(a===this._document){const Ce=this.getViewportScrollPosition();S=Ce.top,j=Ce.left}else S=a.scrollTop,j=a.scrollLeft;const J=_.top-S,te=_.left-j;return this.positions.forEach((Ce,Ge)=>{Ce.clientRect&&a!==Ge&&a.contains(Ge)&&_a(Ce.clientRect,J,te)}),_.top=S,_.left=j,{top:J,left:te}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function km(d){const f=d.cloneNode(!0),a=f.querySelectorAll("[id]"),g=d.nodeName.toLowerCase();f.removeAttribute("id");for(let _=0;_za(g,a)))}constructor(f,a,g,_,S,j){this._config=a,this._document=g,this._ngZone=_,this._viewportRuler=S,this._dragDropRegistry=j,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new et.x,this._pointerMoveSubscription=va.w0.EMPTY,this._pointerUpSubscription=va.w0.EMPTY,this._scrollSubscription=va.w0.EMPTY,this._resizeSubscription=va.w0.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new et.x,this.started=new et.x,this.released=new et.x,this.ended=new et.x,this.entered=new et.x,this.exited=new et.x,this.dropped=new et.x,this.moved=this._moveEvents,this._pointerDown=J=>{if(this.beforeStarted.next(),this._handles.length){const te=this._getTargetHandle(J);te&&!this._disabledHandles.has(te)&&!this.disabled&&this._initializeDragSequence(te,J)}else this.disabled||this._initializeDragSequence(this._rootElement,J)},this._pointerMove=J=>{const te=this._getPointerPositionOnPage(J);if(!this._hasStartedDragging){if(Math.abs(te.x-this._pickupPositionOnPage.x)+Math.abs(te.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const un=Date.now()>=this._dragStartTime+this._getDragStartDelay(J),Xn=this._dropContainer;if(!un)return void this._endDragSequence(J);(!Xn||!Xn.isDragging()&&!Xn.isReceiving())&&(J.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(J)))}return}J.preventDefault();const Ce=this._getConstrainedPointerPosition(te);if(this._hasMoved=!0,this._lastKnownPointerPosition=te,this._updatePointerDirectionDelta(Ce),this._dropContainer)this._updateActiveDropContainer(Ce,te);else{const Ge=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,St=this._activeTransform;St.x=Ce.x-Ge.x+this._passiveTransform.x,St.y=Ce.y-Ge.y+this._passiveTransform.y,this._applyRootElementTransform(St.x,St.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:Ce,event:J,distance:this._getDragDistance(Ce),delta:this._pointerDirectionDelta})})},this._pointerUp=J=>{this._endDragSequence(J)},this._nativeDragStart=J=>{if(this._handles.length){const te=this._getTargetHandle(J);te&&!this._disabledHandles.has(te)&&!this.disabled&&J.preventDefault()}else this.disabled||J.preventDefault()},this.withRootElement(f).withParent(a.parentDragRef||null),this._parentPositions=new Nc(g),j.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(f){this._handles=f.map(g=>fs(g)),this._handles.forEach(g=>za(g,this.disabled)),this._toggleNativeDragInteractions();const a=new Set;return this._disabledHandles.forEach(g=>{this._handles.indexOf(g)>-1&&a.add(g)}),this._disabledHandles=a,this}withPreviewTemplate(f){return this._previewTemplate=f,this}withPlaceholderTemplate(f){return this._placeholderTemplate=f,this}withRootElement(f){const a=fs(f);return a!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{a.addEventListener("mousedown",this._pointerDown,Vc),a.addEventListener("touchstart",this._pointerDown,Lc),a.addEventListener("dragstart",this._nativeDragStart,Vc)}),this._initialTransform=void 0,this._rootElement=a),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(f){return this._boundaryElement=f?fs(f):null,this._resizeSubscription.unsubscribe(),f&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(f){return this._parentDragRef=f,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(f){!this._disabledHandles.has(f)&&this._handles.indexOf(f)>-1&&(this._disabledHandles.add(f),za(f,!0))}enableHandle(f){this._disabledHandles.has(f)&&(this._disabledHandles.delete(f),za(f,this.disabled))}withDirection(f){return this._direction=f,this}_withDropContainer(f){this._dropContainer=f}getFreeDragPosition(){const f=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:f.x,y:f.y}}setFreeDragPosition(f){return this._activeTransform={x:0,y:0},this._passiveTransform.x=f.x,this._passiveTransform.y=f.y,this._dropContainer||this._applyRootElementTransform(f.x,f.y),this}withPreviewContainer(f){return this._previewContainer=f,this}_sortFromLastPointerPosition(){const f=this._lastKnownPointerPosition;f&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(f),f)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(f){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:f}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(f),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const a=this._getPointerPositionOnPage(f);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(a),dropPoint:a,event:f})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(f){ud(f)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const a=this._dropContainer;if(a){const g=this._rootElement,_=g.parentNode,S=this._placeholder=this._createPlaceholderElement(),j=this._anchor=this._anchor||this._document.createComment(""),J=this._getShadowRoot();_.insertBefore(j,g),this._initialTransform=g.style.transform||"",this._preview=this._createPreviewElement(),Om(g,!1,bf),this._document.body.appendChild(_.replaceChild(S,g)),this._getPreviewInsertionPoint(_,J).appendChild(this._preview),this.started.next({source:this,event:f}),a.start(),this._initialContainer=a,this._initialIndex=a.getItemIndex(this)}else this.started.next({source:this,event:f}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(a?a.getScrollableParents():[])}_initializeDragSequence(f,a){this._parentDragRef&&a.stopPropagation();const g=this.isDragging(),_=ud(a),S=!_&&0!==a.button,j=this._rootElement,J=uo(a),te=!_&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),Ce=_?function rd(d){const f=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];return!(!f||-1!==f.identifier||null!=f.radiusX&&1!==f.radiusX||null!=f.radiusY&&1!==f.radiusY)}(a):function Em(d){return 0===d.buttons||0===d.detail}(a);if(J&&J.draggable&&"mousedown"===a.type&&a.preventDefault(),g||S||te||Ce)return;if(this._handles.length){const Rt=j.style;this._rootElementTapHighlight=Rt.webkitTapHighlightColor||"",Rt.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(Rt=>this._updateOnScroll(Rt)),this._boundaryElement&&(this._boundaryRect=yf(this._boundaryElement));const Ge=this._previewTemplate;this._pickupPositionInElement=Ge&&Ge.template&&!Ge.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,f,a);const St=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(a);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:St.x,y:St.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,a)}_cleanupDragArtifacts(f){Om(this._rootElement,!0,bf),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const a=this._dropContainer,g=a.getItemIndex(this),_=this._getPointerPositionOnPage(f),S=this._getDragDistance(_),j=a._isOverContainer(_.x,_.y);this.ended.next({source:this,distance:S,dropPoint:_,event:f}),this.dropped.next({item:this,currentIndex:g,previousIndex:this._initialIndex,container:a,previousContainer:this._initialContainer,isPointerOverContainer:j,distance:S,dropPoint:_,event:f}),a.drop(this,g,this._initialIndex,this._initialContainer,j,S,_,f),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:f,y:a},{x:g,y:_}){let S=this._initialContainer._getSiblingContainerFromPosition(this,f,a);!S&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(f,a)&&(S=this._initialContainer),S&&S!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=S,this._dropContainer.enter(this,f,a,S===this._initialContainer&&S.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:S,currentIndex:S.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(g,_),this._dropContainer._sortItem(this,f,a,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(f,a):this._applyPreviewTransform(f-this._pickupPositionInElement.x,a-this._pickupPositionInElement.y))}_createPreviewElement(){const f=this._previewTemplate,a=this.previewClass,g=f?f.template:null;let _;if(g&&f){const S=f.matchSize?this._initialClientRect:null,j=f.viewContainer.createEmbeddedView(g,f.context);j.detectChanges(),_=Sf(j,this._document),this._previewRef=j,f.matchSize?Fm(_,S):_.style.transform=ya(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else _=km(this._rootElement),Fm(_,this._initialClientRect),this._initialTransform&&(_.style.transform=this._initialTransform);return xm(_.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},bf),za(_,!1),_.classList.add("cdk-drag-preview"),_.setAttribute("dir",this._direction),a&&(Array.isArray(a)?a.forEach(S=>_.classList.add(S)):_.classList.add(a)),_}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const f=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(f.left,f.top);const a=function JC(d){const f=getComputedStyle(d),a=_f(f,"transition-property"),g=a.find(J=>"transform"===J||"all"===J);if(!g)return 0;const _=a.indexOf(g),S=_f(f,"transition-duration"),j=_f(f,"transition-delay");return Rm(S[_])+Rm(j[_])}(this._preview);return 0===a?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(g=>{const _=j=>{(!j||uo(j)===this._preview&&"transform"===j.propertyName)&&(this._preview?.removeEventListener("transitionend",_),g(),clearTimeout(S))},S=setTimeout(_,1.5*a);this._preview.addEventListener("transitionend",_)}))}_createPlaceholderElement(){const f=this._placeholderTemplate,a=f?f.template:null;let g;return a?(this._placeholderRef=f.viewContainer.createEmbeddedView(a,f.context),this._placeholderRef.detectChanges(),g=Sf(this._placeholderRef,this._document)):g=km(this._rootElement),g.style.pointerEvents="none",g.classList.add("cdk-drag-placeholder"),g}_getPointerPositionInElement(f,a,g){const _=a===this._rootElement?null:a,S=_?_.getBoundingClientRect():f,j=ud(g)?g.targetTouches[0]:g,J=this._getViewportScrollPosition();return{x:S.left-f.left+(j.pageX-S.left-J.left),y:S.top-f.top+(j.pageY-S.top-J.top)}}_getPointerPositionOnPage(f){const a=this._getViewportScrollPosition(),g=ud(f)?f.touches[0]||f.changedTouches[0]||{pageX:0,pageY:0}:f,_=g.pageX-a.left,S=g.pageY-a.top;if(this._ownerSVGElement){const j=this._ownerSVGElement.getScreenCTM();if(j){const J=this._ownerSVGElement.createSVGPoint();return J.x=_,J.y=S,J.matrixTransform(j.inverse())}}return{x:_,y:S}}_getConstrainedPointerPosition(f){const a=this._dropContainer?this._dropContainer.lockAxis:null;let{x:g,y:_}=this.constrainPosition?this.constrainPosition(f,this,this._initialClientRect,this._pickupPositionInElement):f;if("x"===this.lockAxis||"x"===a?_=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):("y"===this.lockAxis||"y"===a)&&(g=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){const{x:S,y:j}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,J=this._boundaryRect,{width:te,height:Ce}=this._getPreviewRect(),Ge=J.top+j,St=J.bottom-(Ce-j);g=Nm(g,J.left+S,J.right-(te-S)),_=Nm(_,Ge,St)}return{x:g,y:_}}_updatePointerDirectionDelta(f){const{x:a,y:g}=f,_=this._pointerDirectionDelta,S=this._pointerPositionAtLastDirectionChange,j=Math.abs(a-S.x),J=Math.abs(g-S.y);return j>this._config.pointerDirectionChangeThreshold&&(_.x=a>S.x?1:-1,S.x=a),J>this._config.pointerDirectionChangeThreshold&&(_.y=g>S.y?1:-1,S.y=g),_}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const f=this._handles.length>0||!this.isDragging();f!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=f,za(this._rootElement,f))}_removeRootElementListeners(f){f.removeEventListener("mousedown",this._pointerDown,Vc),f.removeEventListener("touchstart",this._pointerDown,Lc),f.removeEventListener("dragstart",this._nativeDragStart,Vc)}_applyRootElementTransform(f,a){const g=ya(f,a),_=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=_.transform&&"none"!=_.transform?_.transform:""),_.transform=ld(g,this._initialTransform)}_applyPreviewTransform(f,a){const g=this._previewTemplate?.template?void 0:this._initialTransform,_=ya(f,a);this._preview.style.transform=ld(_,g)}_getDragDistance(f){const a=this._pickupPositionOnPage;return a?{x:f.x-a.x,y:f.y-a.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:f,y:a}=this._passiveTransform;if(0===f&&0===a||this.isDragging()||!this._boundaryElement)return;const g=this._rootElement.getBoundingClientRect(),_=this._boundaryElement.getBoundingClientRect();if(0===_.width&&0===_.height||0===g.width&&0===g.height)return;const S=_.left-g.left,j=g.right-_.right,J=_.top-g.top,te=g.bottom-_.bottom;_.width>g.width?(S>0&&(f+=S),j>0&&(f-=j)):f=0,_.height>g.height?(J>0&&(a+=J),te>0&&(a-=te)):a=0,(f!==this._passiveTransform.x||a!==this._passiveTransform.y)&&this.setFreeDragPosition({y:a,x:f})}_getDragStartDelay(f){const a=this.dragStartDelay;return"number"==typeof a?a:ud(f)?a.touch:a?a.mouse:0}_updateOnScroll(f){const a=this._parentPositions.handleScroll(f);if(a){const g=uo(f);this._boundaryRect&&g!==this._boundaryElement&&g.contains(this._boundaryElement)&&_a(this._boundaryRect,a.top,a.left),this._pickupPositionOnPage.x+=a.left,this._pickupPositionOnPage.y+=a.top,this._dropContainer||(this._activeTransform.x-=a.left,this._activeTransform.y-=a.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=cr(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(f,a){const g=this._previewContainer||"global";if("parent"===g)return f;if("global"===g){const _=this._document;return a||_.fullscreenElement||_.webkitFullscreenElement||_.mozFullScreenElement||_.msFullscreenElement||_.body}return fs(g)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(f){return this._handles.find(a=>f.target&&(f.target===a||a.contains(f.target)))}}function ya(d,f){return`translate3d(${Math.round(d)}px, ${Math.round(f)}px, 0)`}function Nm(d,f,a){return Math.max(f,Math.min(a,d))}function ud(d){return"t"===d.type[0]}function Sf(d,f){const a=d.rootNodes;if(1===a.length&&a[0].nodeType===f.ELEMENT_NODE)return a[0];const g=f.createElement("div");return a.forEach(_=>g.appendChild(_)),g}function Fm(d,f){d.style.width=`${f.width}px`,d.style.height=`${f.height}px`,d.style.transform=ya(f.left,f.top)}function Bc(d,f){return Math.max(0,Math.min(f,d))}class dd{constructor(f,a){this._element=f,this._dragDropRegistry=a,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(f){this.withItems(f)}sort(f,a,g,_){const S=this._itemPositions,j=this._getItemIndexFromPointerPosition(f,a,g,_);if(-1===j&&S.length>0)return null;const J="horizontal"===this.orientation,te=S.findIndex(Ds=>Ds.drag===f),Ce=S[j],St=Ce.clientRect,Rt=te>j?1:-1,un=this._getItemOffsetPx(S[te].clientRect,St,Rt),Xn=this._getSiblingOffsetPx(te,S,Rt),bi=S.slice();return function Gw(d,f,a){const g=Bc(f,d.length-1),_=Bc(a,d.length-1);if(g===_)return;const S=d[g],j=_{if(bi[ef]===Ds)return;const Dc=Ds.drag===f,dm=Dc?un:Xn,hm=Dc?f.getPlaceholderElement():Ds.drag.getRootElement();Ds.offset+=dm,J?(hm.style.transform=ld(`translate3d(${Math.round(Ds.offset)}px, 0, 0)`,Ds.initialTransform),_a(Ds.clientRect,0,dm)):(hm.style.transform=ld(`translate3d(0, ${Math.round(Ds.offset)}px, 0)`,Ds.initialTransform),_a(Ds.clientRect,dm,0))}),this._previousSwap.overlaps=kc(St,a,g),this._previousSwap.drag=Ce.drag,this._previousSwap.delta=J?_.x:_.y,{previousIndex:te,currentIndex:j}}enter(f,a,g,_){const S=null==_||_<0?this._getItemIndexFromPointerPosition(f,a,g):_,j=this._activeDraggables,J=j.indexOf(f),te=f.getPlaceholderElement();let Ce=j[S];if(Ce===f&&(Ce=j[S+1]),!Ce&&(null==S||-1===S||S-1&&j.splice(J,1),Ce&&!this._dragDropRegistry.isDragging(Ce)){const Ge=Ce.getRootElement();Ge.parentElement.insertBefore(te,Ge),j.splice(S,0,f)}else fs(this._element).appendChild(te),j.push(f);te.style.transform="",this._cacheItemPositions()}withItems(f){this._activeDraggables=f.slice(),this._cacheItemPositions()}withSortPredicate(f){this._sortPredicate=f}reset(){this._activeDraggables.forEach(f=>{const a=f.getRootElement();if(a){const g=this._itemPositions.find(_=>_.drag===f)?.initialTransform;a.style.transform=g||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(f){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(g=>g.drag===f)}updateOnScroll(f,a){this._itemPositions.forEach(({clientRect:g})=>{_a(g,f,a)}),this._itemPositions.forEach(({drag:g})=>{this._dragDropRegistry.isDragging(g)&&g._sortFromLastPointerPosition()})}_cacheItemPositions(){const f="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(a=>{const g=a.getVisibleElement();return{drag:a,offset:0,initialTransform:g.style.transform||"",clientRect:yf(g)}}).sort((a,g)=>f?a.clientRect.left-g.clientRect.left:a.clientRect.top-g.clientRect.top)}_getItemOffsetPx(f,a,g){const _="horizontal"===this.orientation;let S=_?a.left-f.left:a.top-f.top;return-1===g&&(S+=_?a.width-f.width:a.height-f.height),S}_getSiblingOffsetPx(f,a,g){const _="horizontal"===this.orientation,S=a[f].clientRect,j=a[f+-1*g];let J=S[_?"width":"height"]*g;if(j){const te=_?"left":"top",Ce=_?"right":"bottom";-1===g?J-=j.clientRect[te]-S[Ce]:J+=S[te]-j.clientRect[Ce]}return J}_shouldEnterAsFirstChild(f,a){if(!this._activeDraggables.length)return!1;const g=this._itemPositions,_="horizontal"===this.orientation;if(g[0].drag!==this._activeDraggables[0]){const j=g[g.length-1].clientRect;return _?f>=j.right:a>=j.bottom}{const j=g[0].clientRect;return _?f<=j.left:a<=j.top}}_getItemIndexFromPointerPosition(f,a,g,_){const S="horizontal"===this.orientation,j=this._itemPositions.findIndex(({drag:J,clientRect:te})=>J!==f&&((!_||J!==this._previousSwap.drag||!this._previousSwap.overlaps||(S?_.x:_.y)!==this._previousSwap.delta)&&(S?a>=Math.floor(te.left)&&a=Math.floor(te.top)&&g!0,this.sortPredicate=()=>!0,this.beforeStarted=new et.x,this.entered=new et.x,this.exited=new et.x,this.dropped=new et.x,this.sorted=new et.x,this.receivingStarted=new et.x,this.receivingStopped=new et.x,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=va.w0.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new et.x,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),(0,Rc.F)(0,od.Z).pipe((0,Xr.R)(this._stopScrollTimers)).subscribe(()=>{const j=this._scrollNode,J=this.autoScrollStep;1===this._verticalScrollDirection?j.scrollBy(0,-J):2===this._verticalScrollDirection&&j.scrollBy(0,J),1===this._horizontalScrollDirection?j.scrollBy(-J,0):2===this._horizontalScrollDirection&&j.scrollBy(J,0)})},this.element=fs(f),this._document=g,this.withScrollableParents([this.element]),a.registerDropContainer(this),this._parentPositions=new Nc(g),this._sortStrategy=new dd(this.element,a),this._sortStrategy.withSortPredicate((j,J)=>this.sortPredicate(j,J,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(f,a,g,_){this._draggingStarted(),null==_&&this.sortingDisabled&&(_=this._draggables.indexOf(f)),this._sortStrategy.enter(f,a,g,_),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:f,container:this,currentIndex:this.getItemIndex(f)})}exit(f){this._reset(),this.exited.next({item:f,container:this})}drop(f,a,g,_,S,j,J,te={}){this._reset(),this.dropped.next({item:f,currentIndex:a,previousIndex:g,container:this,previousContainer:_,isPointerOverContainer:S,distance:j,dropPoint:J,event:te})}withItems(f){const a=this._draggables;return this._draggables=f,f.forEach(g=>g._withDropContainer(this)),this.isDragging()&&(a.filter(_=>_.isDragging()).every(_=>-1===f.indexOf(_))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(f){return this._sortStrategy.direction=f,this}connectedTo(f){return this._siblings=f.slice(),this}withOrientation(f){return this._sortStrategy.orientation=f,this}withScrollableParents(f){const a=fs(this.element);return this._scrollableElements=-1===f.indexOf(a)?[a,...f]:f.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(f){return this._isDragging?this._sortStrategy.getItemIndex(f):this._draggables.indexOf(f)}isReceiving(){return this._activeSiblings.size>0}_sortItem(f,a,g,_){if(this.sortingDisabled||!this._clientRect||!Pm(this._clientRect,.05,a,g))return;const S=this._sortStrategy.sort(f,a,g,_);S&&this.sorted.next({previousIndex:S.previousIndex,currentIndex:S.currentIndex,container:this,item:f})}_startScrollingIfNecessary(f,a){if(this.autoScrollDisabled)return;let g,_=0,S=0;if(this._parentPositions.positions.forEach((j,J)=>{J===this._document||!j.clientRect||g||Pm(j.clientRect,.05,f,a)&&([_,S]=function Zw(d,f,a,g){const _=tb(f,g),S=wf(f,a);let j=0,J=0;if(_){const te=d.scrollTop;1===_?te>0&&(j=1):d.scrollHeight-te>d.clientHeight&&(j=2)}if(S){const te=d.scrollLeft;1===S?te>0&&(J=1):d.scrollWidth-te>d.clientWidth&&(J=2)}return[j,J]}(J,j.clientRect,f,a),(_||S)&&(g=J))}),!_&&!S){const{width:j,height:J}=this._viewportRuler.getViewportSize(),te={width:j,height:J,top:0,right:j,bottom:J,left:0};_=tb(te,a),S=wf(te,f),g=window}g&&(_!==this._verticalScrollDirection||S!==this._horizontalScrollDirection||g!==this._scrollNode)&&(this._verticalScrollDirection=_,this._horizontalScrollDirection=S,this._scrollNode=g,(_||S)&&g?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const f=fs(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=f.msScrollSnapType||f.scrollSnapType||"",f.scrollSnapType=f.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const f=fs(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(f).clientRect}_reset(){this._isDragging=!1;const f=fs(this.element).style;f.scrollSnapType=f.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(a=>a._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(f,a){return null!=this._clientRect&&kc(this._clientRect,f,a)}_getSiblingContainerFromPosition(f,a,g){return this._siblings.find(_=>_._canReceive(f,a,g))}_canReceive(f,a,g){if(!this._clientRect||!kc(this._clientRect,a,g)||!this.enterPredicate(f,this))return!1;const _=this._getShadowRoot().elementFromPoint(a,g);if(!_)return!1;const S=fs(this.element);return _===S||S.contains(_)}_startReceiving(f,a){const g=this._activeSiblings;!g.has(f)&&a.every(_=>this.enterPredicate(_,this)||this._draggables.indexOf(_)>-1)&&(g.add(f),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:f,receiver:this,items:a}))}_stopReceiving(f){this._activeSiblings.delete(f),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:f,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(f=>{if(this.isDragging()){const a=this._parentPositions.handleScroll(f);a&&this._sortStrategy.updateOnScroll(a.top,a.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const f=cr(fs(this.element));this._cachedShadowRoot=f||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const f=this._sortStrategy.getActiveItemsSnapshot().filter(a=>a.isDragging());this._siblings.forEach(a=>a._startReceiving(this,f))}}function tb(d,f){const{top:a,bottom:g,height:_}=d,S=.05*_;return f>=a-S&&f<=a+S?1:f>=g-S&&f<=g+S?2:0}function wf(d,f){const{left:a,right:g,width:_}=d,S=.05*_;return f>=a-S&&f<=a+S?1:f>=g-S&&f<=g+S?2:0}const hd=xo({passive:!1,capture:!0});let nb=(()=>{class d{constructor(a,g){this._ngZone=a,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=_=>_.isDragging(),this.pointerMove=new et.x,this.pointerUp=new et.x,this.scroll=new et.x,this._preventDefaultWhileDragging=_=>{this._activeDragInstances.length>0&&_.preventDefault()},this._persistentTouchmoveListener=_=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&_.preventDefault(),this.pointerMove.next(_))},this._document=g}registerDropContainer(a){this._dropInstances.has(a)||this._dropInstances.add(a)}registerDragItem(a){this._dragInstances.add(a),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,hd)})}removeDropContainer(a){this._dropInstances.delete(a)}removeDragItem(a){this._dragInstances.delete(a),this.stopDragging(a),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,hd)}startDragging(a,g){if(!(this._activeDragInstances.indexOf(a)>-1)&&(this._activeDragInstances.push(a),1===this._activeDragInstances.length)){const _=g.type.startsWith("touch");this._globalListeners.set(_?"touchend":"mouseup",{handler:S=>this.pointerUp.next(S),options:!0}).set("scroll",{handler:S=>this.scroll.next(S),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:hd}),_||this._globalListeners.set("mousemove",{handler:S=>this.pointerMove.next(S),options:hd}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((S,j)=>{this._document.addEventListener(j,S.handler,S.options)})})}}stopDragging(a){const g=this._activeDragInstances.indexOf(a);g>-1&&(this._activeDragInstances.splice(g,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(a){return this._activeDragInstances.indexOf(a)>-1}scrolled(a){const g=[this.scroll];return a&&a!==this._document&&g.push(new qn.y(_=>this._ngZone.runOutsideAngular(()=>{const j=J=>{this._activeDragInstances.length&&_.next(J)};return a.addEventListener("scroll",j,!0),()=>{a.removeEventListener("scroll",j,!0)}}))),(0,$.T)(...g)}ngOnDestroy(){this._dragInstances.forEach(a=>this.removeDragItem(a)),this._dropInstances.forEach(a=>this.removeDropContainer(a)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((a,g)=>{this._document.removeEventListener(g,a.handler,a.options)}),this._globalListeners.clear()}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(l.R0b),l.LFG(k.K0))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();const Ef={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let ib=(()=>{class d{constructor(a,g,_,S){this._document=a,this._ngZone=g,this._viewportRuler=_,this._dragDropRegistry=S}createDrag(a,g=Ef){return new Dl(a,g,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(a){return new Vm(a,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(k.K0),l.LFG(l.R0b),l.LFG(Bw),l.LFG(nb))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();const Bm=new l.OlP("CDK_DRAG_PARENT"),jm=new l.OlP("CdkDragHandle"),rb=new l.OlP("CdkDragPlaceholder"),sb=new l.OlP("CdkDragPreview"),Hc=new l.OlP("CDK_DRAG_CONFIG"),Tf=new l.OlP("CdkDropList");let If=(()=>{class d{static#e=this._dragInstances=[];get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(a){this._disabled=gi(a),this._dragRef.disabled=this._disabled}constructor(a,g,_,S,j,J,te,Ce,Ge,St,Rt){this.element=a,this.dropContainer=g,this._ngZone=S,this._viewContainerRef=j,this._dir=te,this._changeDetectorRef=Ge,this._selfHandle=St,this._parentDrag=Rt,this._destroyed=new et.x,this.started=new l.vpe,this.released=new l.vpe,this.ended=new l.vpe,this.entered=new l.vpe,this.exited=new l.vpe,this.dropped=new l.vpe,this.moved=new qn.y(un=>{const Xn=this._dragRef.moved.pipe((0,zt.U)(bi=>({source:this,pointerPosition:bi.pointerPosition,event:bi.event,delta:bi.delta,distance:bi.distance}))).subscribe(un);return()=>{Xn.unsubscribe()}}),this._dragRef=Ce.createDrag(a,{dragStartThreshold:J&&null!=J.dragStartThreshold?J.dragStartThreshold:5,pointerDirectionChangeThreshold:J&&null!=J.pointerDirectionChangeThreshold?J.pointerDirectionChangeThreshold:5,zIndex:J?.zIndex}),this._dragRef.data=this,d._dragInstances.push(this),J&&this._assignDefaults(J),g&&(this._dragRef._withDropContainer(g._dropListRef),g.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(a){this._dragRef.setFreeDragPosition(a)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,Qn.q)(1),(0,Xr.R)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(a){const g=a.rootElementSelector,_=a.freeDragPosition;g&&!g.firstChange&&this._updateRootElement(),_&&!_.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const a=d._dragInstances.indexOf(this);a>-1&&d._dragInstances.splice(a,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){const a=this.element.nativeElement;let g=a;this.rootElementSelector&&(g=void 0!==a.closest?a.closest(this.rootElementSelector):a.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(g||a)}_getBoundaryElement(){const a=this.boundaryElement;return a?"string"==typeof a?this.element.nativeElement.closest(a):fs(a):null}_syncInputs(a){a.beforeStarted.subscribe(()=>{if(!a.isDragging()){const g=this._dir,_=this.dragStartDelay,S=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,j=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;a.disabled=this.disabled,a.lockAxis=this.lockAxis,a.dragStartDelay="object"==typeof _&&_?_:function ma(d,f=0){return function Mi(d){return!isNaN(parseFloat(d))&&!isNaN(Number(d))}(d)?Number(d):f}(_),a.constrainPosition=this.constrainPosition,a.previewClass=this.previewClass,a.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(S).withPreviewTemplate(j).withPreviewContainer(this.previewContainer||"global"),g&&a.withDirection(g.value)}}),a.beforeStarted.pipe((0,Qn.q)(1)).subscribe(()=>{if(this._parentDrag)return void a.withParent(this._parentDrag._dragRef);let g=this.element.nativeElement.parentElement;for(;g;){if(g.classList.contains("cdk-drag")){a.withParent(d._dragInstances.find(_=>_.element.nativeElement===g)?._dragRef||null);break}g=g.parentElement}})}_handleEvents(a){a.started.subscribe(g=>{this.started.emit({source:this,event:g.event}),this._changeDetectorRef.markForCheck()}),a.released.subscribe(g=>{this.released.emit({source:this,event:g.event})}),a.ended.subscribe(g=>{this.ended.emit({source:this,distance:g.distance,dropPoint:g.dropPoint,event:g.event}),this._changeDetectorRef.markForCheck()}),a.entered.subscribe(g=>{this.entered.emit({container:g.container.data,item:this,currentIndex:g.currentIndex})}),a.exited.subscribe(g=>{this.exited.emit({container:g.container.data,item:this})}),a.dropped.subscribe(g=>{this.dropped.emit({previousIndex:g.previousIndex,currentIndex:g.currentIndex,previousContainer:g.previousContainer.data,container:g.container.data,isPointerOverContainer:g.isPointerOverContainer,item:this,distance:g.distance,dropPoint:g.dropPoint,event:g.event})})}_assignDefaults(a){const{lockAxis:g,dragStartDelay:_,constrainPosition:S,previewClass:j,boundaryElement:J,draggingDisabled:te,rootElementSelector:Ce,previewContainer:Ge}=a;this.disabled=te??!1,this.dragStartDelay=_||0,g&&(this.lockAxis=g),S&&(this.constrainPosition=S),j&&(this.previewClass=j),J&&(this.boundaryElement=J),Ce&&(this.rootElementSelector=Ce),Ge&&(this.previewContainer=Ge)}_setupHandlesListener(){this._handles.changes.pipe((0,or.O)(this._handles),(0,Mo.b)(a=>{const g=a.filter(_=>_._parentDrag===this).map(_=>_.element);this._selfHandle&&this.rootElementSelector&&g.push(this.element),this._dragRef.withHandles(g)}),(0,Ms.w)(a=>(0,$.T)(...a.map(g=>g._stateChanges.pipe((0,or.O)(g))))),(0,Xr.R)(this._destroyed)).subscribe(a=>{const g=this._dragRef,_=a.element.nativeElement;a.disabled?g.disableHandle(_):g.enableHandle(_)})}static#t=this.\u0275fac=function(g){return new(g||d)(l.Y36(l.SBq),l.Y36(Tf,12),l.Y36(k.K0),l.Y36(l.R0b),l.Y36(l.s_b),l.Y36(Hc,8),l.Y36(gs,8),l.Y36(ib),l.Y36(l.sBO),l.Y36(jm,10),l.Y36(Bm,12))};static#n=this.\u0275dir=l.lG2({type:d,selectors:[["","cdkDrag",""]],contentQueries:function(g,_,S){if(1&g&&(l.Suo(S,sb,5),l.Suo(S,rb,5),l.Suo(S,jm,5)),2&g){let j;l.iGM(j=l.CRH())&&(_._previewTemplate=j.first),l.iGM(j=l.CRH())&&(_._placeholderTemplate=j.first),l.iGM(j=l.CRH())&&(_._handles=j)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(g,_){2&g&&l.ekj("cdk-drag-disabled",_.disabled)("cdk-drag-dragging",_._dragRef.isDragging())},inputs:{data:["cdkDragData","data"],lockAxis:["cdkDragLockAxis","lockAxis"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],boundaryElement:["cdkDragBoundary","boundaryElement"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"],disabled:["cdkDragDisabled","disabled"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],previewContainer:["cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[l._Bn([{provide:Bm,useExisting:d}]),l.TTD]})}return d})();L(1794);const lb=Ei(3,(d,f,a)=>{!function Ti(d,f){return f||(f=window&&window.customElements),!f||!!f.get(d)}(d)||function vi(){return window?.location?.href?.includes("localhost:6006")}()?(a.define(d,f),hn(),window&&!Object.keys(window.CDS._state.elementRegistry).some(g=>g===d)&&(window.CDS._state.elementRegistry={...window.CDS._state.elementRegistry,[d]:{}})):di.warn(d+" has already been registered")});function Um(d,f){Un()&&sr(["customElements"])&&lb(d,f,window.customElements)}var Ci=L(3449);let xf=!1;function Of(d){if((d=Math.trunc(d)||0)<0&&(d+=this.length),!(d<0||d>=this.length))return this[d]}if(!xf){xf=!0;const d=Reflect.getPrototypeOf(Int8Array);for(const f of[Array,String,d])Object.defineProperty(f.prototype,"at",{value:Of,writable:!0,enumerable:!1,configurable:!0})}let $m=!1,Gm=!1;function Ym(d,f,a){Object.defineProperty(d,a,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(f)?this.getAttribute(f):null},set:function(g){null!==g?this.setAttribute(f,g):this.removeAttribute(f)}})}$m||Element.prototype.hasOwnProperty("role")||(Ym(Element.prototype,"role","role"),$m=!0),Gm||Element.prototype.hasOwnProperty("ariaLabel")||(Gm=!0,["ActiveDescendant","Atomic","AutoComplete","Busy","Checked","ColCount","ColIndex","ColSpan","Controls","Current","DescribedBy","Details","Disabled","ErrorMessage","Expanded","FlowTo","HasPopup","Hidden","Invalid","KeyShortcuts","Label","LabelledBy","Level","Live","Modal","MultiLine","MultiSelectable","Orientation","Owns","Placeholder","PosInSet","Pressed","ReadOnly","Relevant","Required","RoleDescription","RowCount","RowIndex","RowSpan","Selected","SetSize","Sort","ValueMax","ValueMin","ValueNow","ValueText"].forEach(d=>Ym(Element.prototype,"aria-"+d.toLowerCase(),"aria"+d)));var Rf=L(1921);const md=window,Pf=md.ShadowRoot&&(void 0===md.ShadyCSS||md.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Fr=Symbol(),vd=new WeakMap;class kf{constructor(f,a,g){if(this._$cssResult$=!0,g!==Fr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=f,this.t=a}get styleSheet(){let f=this.o;const a=this.t;if(Pf&&void 0===f){const g=void 0!==a&&1===a.length;g&&(f=vd.get(a)),void 0===f&&((this.o=f=new CSSStyleSheet).replaceSync(this.cssText),g&&vd.set(a,f))}return f}toString(){return this.cssText}}const br=(d,...f)=>{const a=1===d.length?d[0]:f.reduce((g,_,S)=>g+(j=>{if(!0===j._$cssResult$)return j.cssText;if("number"==typeof j)return j;throw Error("Value passed to 'css' function must be a 'css' function result: "+j+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(_)+d[S+1],d[0]);return new kf(a,d,Fr)},Ff=Pf?d=>d:d=>d instanceof CSSStyleSheet?(f=>{let a="";for(const g of f.cssRules)a+=g.cssText;return(d=>new kf("string"==typeof d?d:d+"",void 0,Fr))(a)})(d):d;var _d;const yd=window,Lf=yd.trustedTypes,cb=Lf?Lf.emptyScript:"",Vf=yd.reactiveElementPolyfillSupport,Bf={toAttribute(d,f){switch(f){case Boolean:d=d?cb:null;break;case Object:case Array:d=null==d?d:JSON.stringify(d)}return d},fromAttribute(d,f){let a=d;switch(f){case Boolean:a=null!==d;break;case Number:a=null===d?null:Number(d);break;case Object:case Array:try{a=JSON.parse(d)}catch{a=null}}return a}},Hf=(d,f)=>f!==d&&(f==f||d==d),jf={attribute:!0,type:String,converter:Bf,reflect:!1,hasChanged:Hf},zf="finalized";class Ca extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(f){var a;this.finalize(),(null!==(a=this.h)&&void 0!==a?a:this.h=[]).push(f)}static get observedAttributes(){this.finalize();const f=[];return this.elementProperties.forEach((a,g)=>{const _=this._$Ep(g,a);void 0!==_&&(this._$Ev.set(_,g),f.push(_))}),f}static createProperty(f,a=jf){if(a.state&&(a.attribute=!1),this.finalize(),this.elementProperties.set(f,a),!a.noAccessor&&!this.prototype.hasOwnProperty(f)){const g="symbol"==typeof f?Symbol():"__"+f,_=this.getPropertyDescriptor(f,g,a);void 0!==_&&Object.defineProperty(this.prototype,f,_)}}static getPropertyDescriptor(f,a,g){return{get(){return this[a]},set(_){const S=this[f];this[a]=_,this.requestUpdate(f,S,g)},configurable:!0,enumerable:!0}}static getPropertyOptions(f){return this.elementProperties.get(f)||jf}static finalize(){if(this.hasOwnProperty(zf))return!1;this[zf]=!0;const f=Object.getPrototypeOf(this);if(f.finalize(),void 0!==f.h&&(this.h=[...f.h]),this.elementProperties=new Map(f.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const a=this.properties,g=[...Object.getOwnPropertyNames(a),...Object.getOwnPropertySymbols(a)];for(const _ of g)this.createProperty(_,a[_])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(f){const a=[];if(Array.isArray(f)){const g=new Set(f.flat(1/0).reverse());for(const _ of g)a.unshift(Ff(_))}else void 0!==f&&a.push(Ff(f));return a}static _$Ep(f,a){const g=a.attribute;return!1===g?void 0:"string"==typeof g?g:"string"==typeof f?f.toLowerCase():void 0}_$Eu(){var f;this._$E_=new Promise(a=>this.enableUpdating=a),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(f=this.constructor.h)||void 0===f||f.forEach(a=>a(this))}addController(f){var a,g;(null!==(a=this._$ES)&&void 0!==a?a:this._$ES=[]).push(f),void 0!==this.renderRoot&&this.isConnected&&(null===(g=f.hostConnected)||void 0===g||g.call(f))}removeController(f){var a;null===(a=this._$ES)||void 0===a||a.splice(this._$ES.indexOf(f)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((f,a)=>{this.hasOwnProperty(a)&&(this._$Ei.set(a,this[a]),delete this[a])})}createRenderRoot(){var f;const a=null!==(f=this.shadowRoot)&&void 0!==f?f:this.attachShadow(this.constructor.shadowRootOptions);return((d,f)=>{Pf?d.adoptedStyleSheets=f.map(a=>a instanceof CSSStyleSheet?a:a.styleSheet):f.forEach(a=>{const g=document.createElement("style"),_=md.litNonce;void 0!==_&&g.setAttribute("nonce",_),g.textContent=a.cssText,d.appendChild(g)})})(a,this.constructor.elementStyles),a}connectedCallback(){var f;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(f=this._$ES)||void 0===f||f.forEach(a=>{var g;return null===(g=a.hostConnected)||void 0===g?void 0:g.call(a)})}enableUpdating(f){}disconnectedCallback(){var f;null===(f=this._$ES)||void 0===f||f.forEach(a=>{var g;return null===(g=a.hostDisconnected)||void 0===g?void 0:g.call(a)})}attributeChangedCallback(f,a,g){this._$AK(f,g)}_$EO(f,a,g=jf){var _;const S=this.constructor._$Ep(f,g);if(void 0!==S&&!0===g.reflect){const j=(void 0!==(null===(_=g.converter)||void 0===_?void 0:_.toAttribute)?g.converter:Bf).toAttribute(a,g.type);this._$El=f,null==j?this.removeAttribute(S):this.setAttribute(S,j),this._$El=null}}_$AK(f,a){var g;const _=this.constructor,S=_._$Ev.get(f);if(void 0!==S&&this._$El!==S){const j=_.getPropertyOptions(S),J="function"==typeof j.converter?{fromAttribute:j.converter}:void 0!==(null===(g=j.converter)||void 0===g?void 0:g.fromAttribute)?j.converter:Bf;this._$El=S,this[S]=J.fromAttribute(a,j.type),this._$El=null}}requestUpdate(f,a,g){let _=!0;void 0!==f&&(((g=g||this.constructor.getPropertyOptions(f)).hasChanged||Hf)(this[f],a)?(this._$AL.has(f)||this._$AL.set(f,a),!0===g.reflect&&this._$El!==f&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(f,g))):_=!1),!this.isUpdatePending&&_&&(this._$E_=this._$Ej())}_$Ej(){var f=this;return(0,Rf.Z)(function*(){f.isUpdatePending=!0;try{yield f._$E_}catch(g){Promise.reject(g)}const a=f.scheduleUpdate();return null!=a&&(yield a),!f.isUpdatePending})()}scheduleUpdate(){return this.performUpdate()}performUpdate(){var f;if(!this.isUpdatePending)return;this._$Ei&&(this._$Ei.forEach((_,S)=>this[S]=_),this._$Ei=void 0);let a=!1;const g=this._$AL;try{a=this.shouldUpdate(g),a?(this.willUpdate(g),null===(f=this._$ES)||void 0===f||f.forEach(_=>{var S;return null===(S=_.hostUpdate)||void 0===S?void 0:S.call(_)}),this.update(g)):this._$Ek()}catch(_){throw a=!1,this._$Ek(),_}a&&this._$AE(g)}willUpdate(f){}_$AE(f){var a;null===(a=this._$ES)||void 0===a||a.forEach(g=>{var _;return null===(_=g.hostUpdated)||void 0===_?void 0:_.call(g)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(f)),this.updated(f)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(f){return!0}update(f){void 0!==this._$EC&&(this._$EC.forEach((a,g)=>this._$EO(g,this[g],a)),this._$EC=void 0),this._$Ek()}updated(f){}firstUpdated(f){}}var zc;Ca[zf]=!0,Ca.elementProperties=new Map,Ca.elementStyles=[],Ca.shadowRootOptions={mode:"open"},Vf?.({ReactiveElement:Ca}),(null!==(_d=yd.reactiveElementVersions)&&void 0!==_d?_d:yd.reactiveElementVersions=[]).push("1.6.3");const Cd=window,ko=Cd.trustedTypes,Wm=ko?ko.createPolicy("lit-html",{createHTML:d=>d}):void 0,bd="$lit$",No=`lit$${(Math.random()+"").slice(9)}$`,Sd="?"+No,Zm=`<${Sd}>`,Qs=document,ba=()=>Qs.createComment(""),El=d=>null===d||"object"!=typeof d&&"function"!=typeof d,Dd=Array.isArray,Uf="[ \t\n\f\r]",$c=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qm=/-->/g,qm=/>/g,Ua=RegExp(`>|${Uf}(?:([^\\s"'>=/]+)(${Uf}*=${Uf}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Km=/'/g,$f=/"/g,Gc=/^(?:script|style|textarea|title)$/i,wd=d=>(f,...a)=>({_$litType$:d,strings:f,values:a}),Yc=wd(1),ub=wd(2),Tl=Symbol.for("lit-noChange"),Gi=Symbol.for("lit-nothing"),Gf=new WeakMap,Ps=Qs.createTreeWalker(Qs,129,null,!1);function Yf(d,f){if(!Array.isArray(d)||!d.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Wm?Wm.createHTML(f):f}class Wc{constructor({strings:f,_$litType$:a},g){let _;this.parts=[];let S=0,j=0;const J=f.length-1,te=this.parts,[Ce,Ge]=((d,f)=>{const a=d.length-1,g=[];let _,S=2===f?"":"",j=$c;for(let J=0;J"===Ge[0]?(j=_??$c,St=-1):void 0===Ge[1]?St=-2:(St=j.lastIndex-Ge[2].length,Ce=Ge[1],j=void 0===Ge[3]?Ua:'"'===Ge[3]?$f:Km):j===$f||j===Km?j=Ua:j===Qm||j===qm?j=$c:(j=Ua,_=void 0);const un=j===Ua&&d[J+1].startsWith("/>")?" ":"";S+=j===$c?te+Zm:St>=0?(g.push(Ce),te.slice(0,St)+bd+te.slice(St)+No+un):te+No+(-2===St?(g.push(void 0),J):un)}return[Yf(d,S+(d[a]||"")+(2===f?"":"")),g]})(f,a);if(this.el=Wc.createElement(Ce,g),Ps.currentNode=this.el.content,2===a){const St=this.el.content,Rt=St.firstChild;Rt.remove(),St.append(...Rt.childNodes)}for(;null!==(_=Ps.nextNode())&&te.length0){_.textContent=ko?ko.emptyScript:"";for(let un=0;unDd(d)||"function"==typeof d?.[Symbol.iterator])(f)?this.T(f):this._(f)}k(f){return this._$AA.parentNode.insertBefore(f,this._$AB)}$(f){this._$AH!==f&&(this._$AR(),this._$AH=this.k(f))}_(f){this._$AH!==Gi&&El(this._$AH)?this._$AA.nextSibling.data=f:this.$(Qs.createTextNode(f)),this._$AH=f}g(f){var a;const{values:g,_$litType$:_}=f,S="number"==typeof _?this._$AC(f):(void 0===_.el&&(_.el=Wc.createElement(Yf(_.h,_.h[0]),this.options)),_);if((null===(a=this._$AH)||void 0===a?void 0:a._$AD)===S)this._$AH.v(g);else{const j=new Zc(S,this),J=j.u(this.options);j.v(g),this.$(J),this._$AH=j}}_$AC(f){let a=Gf.get(f.strings);return void 0===a&&Gf.set(f.strings,a=new Wc(f)),a}T(f){Dd(this._$AH)||(this._$AH=[],this._$AR());const a=this._$AH;let g,_=0;for(const S of f)_===a.length?a.push(g=new Al(this.k(ba()),this.k(ba()),this,this.options)):g=a[_],g._$AI(S),_++;_2||""!==g[0]||""!==g[1]?(this._$AH=Array(g.length-1).fill(new String),this.strings=g):this._$AH=Gi}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(f,a=this,g,_){const S=this.strings;let j=!1;if(void 0===S)f=Il(this,f,a,0),j=!El(f)||f!==this._$AH&&f!==Tl,j&&(this._$AH=f);else{const J=f;let te,Ce;for(f=S[0],te=0;te{var g,_;const S=null!==(g=a?.renderBefore)&&void 0!==g?g:f;let j=S._$litPart$;if(void 0===j){const J=null!==(_=a?.renderBefore)&&void 0!==_?_:null;S._$litPart$=j=new Al(f.insertBefore(ba(),J),J,void 0,a??{})}return j._$AI(d),j};var xl,Ad;class Fo extends Ca{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var f,a;const g=super.createRenderRoot();return null!==(f=(a=this.renderOptions).renderBefore)&&void 0!==f||(a.renderBefore=g.firstChild),g}update(f){const a=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(f),this._$Do=Id(a,this.renderRoot,this.renderOptions)}connectedCallback(){var f;super.connectedCallback(),null===(f=this._$Do)||void 0===f||f.setConnected(!0)}disconnectedCallback(){var f;super.disconnectedCallback(),null===(f=this._$Do)||void 0===f||f.setConnected(!1)}render(){return Tl}}Fo.finalized=!0,Fo._$litElement$=!0,null===(xl=globalThis.litElementHydrateSupport)||void 0===xl||xl.call(globalThis,{LitElement:Fo});const ev=globalThis.litElementPolyfillSupport;ev?.({LitElement:Fo}),(null!==(Ad=globalThis.litElementVersions)&&void 0!==Ad?Ad:globalThis.litElementVersions=[]).push("3.3.3");const tv=br`@charset "UTF-8";:host,:root{--δ2:var(--cds-global-layout-space-xxs, calc(4 * 1rem / var(--cds-global-base, 20)));--δ3:var(--cds-global-layout-space-xs, calc(8 * 1rem / var(--cds-global-base, 20)));--δ4:var(--cds-global-layout-space-sm, calc(12 * 1rem / var(--cds-global-base, 20)));--δ5:var(--cds-global-layout-space-md, calc(16 * 1rem / var(--cds-global-base, 20)));--δ6:var(--cds-global-layout-space-lg, calc(24 * 1rem / var(--cds-global-base, 20)));--δ7:var(--cds-global-layout-space-xl, calc(32 * 1rem / var(--cds-global-base, 20)))}[cds-layout~="wrap:none"]{flex-wrap:nowrap!important}[cds-layout*="align:stretch"]{flex-grow:1!important}[cds-layout*="align:shrink"]{flex-shrink:1!important;flex-grow:0!important}[cds-layout~=horizontal]{display:flex;flex-direction:row;flex-wrap:wrap;justify-items:flex-start;align-items:flex-start;width:100%;margin:0;min-height:0}[cds-layout~=horizontal]>[cds-layout~=horizontal],[cds-layout~=horizontal]>[cds-layout~=vertical],[cds-layout~=horizontal]>[cds-text]{width:initial!important}[cds-layout~=horizontal][cds-layout*="align:top"]{align-items:flex-start}[cds-layout~=horizontal][cds-layout*="align:left"]{justify-content:flex-start}[cds-layout~=horizontal][cds-layout*="align:right"]{justify-content:flex-end}[cds-layout~=horizontal][cds-layout*="align:vertical-center"]{align-items:center;align-content:center}[cds-layout~=horizontal][cds-layout*="align:horizontal-center"]{justify-content:center}[cds-layout~=horizontal][cds-layout*="align:center"]{align-items:center;align-content:center;justify-content:center}[cds-layout~=horizontal][cds-layout*="order:reverse"]{flex-direction:row-reverse}[cds-layout~=horizontal][cds-layout*="align:horizontal-stretch"]{justify-content:stretch;flex-grow:1}[cds-layout~=horizontal][cds-layout*="align:horizontal-stretch"]>*{flex-grow:1}[cds-layout~=horizontal][cds-layout*="align:stretch"]{align-items:stretch;align-content:stretch;flex-grow:1}[cds-layout~=horizontal][cds-layout*="align:stretch"]>*{flex-grow:1}[cds-layout~=horizontal]>[cds-layout*="align:center"],[cds-layout~=horizontal]>[cds-layout*="align:vertical-center"]{align-self:center}[cds-layout~=horizontal]>[cds-layout*="align:center"],[cds-layout~=horizontal]>[cds-layout*="align:horizontal-center"]{margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal]>[cds-layout*="align:top"]{align-self:flex-start}[cds-layout~=horizontal]>[cds-layout*="align:right"]{margin-left:auto!important}[cds-layout~=horizontal]>[cds-layout*="align:left"]{margin-right:auto!important}[cds-layout~=vertical]{width:100%;display:flex;flex-direction:column;align-items:flex-start}[cds-layout~=vertical],[cds-layout~=vertical][cds-layout*="align:top"]{justify-content:flex-start}[cds-layout~=vertical][cds-layout*="align:left"]{align-items:flex-start}[cds-layout~=vertical][cds-layout*="align:right"]{align-items:flex-end}[cds-layout~=vertical][cds-layout*="align:vertical-center"]{justify-content:center}[cds-layout~=vertical][cds-layout*="align:horizontal-center"]{align-items:center}[cds-layout~=vertical][cds-layout*="align:center"]{align-items:center;justify-content:center}[cds-layout~=vertical][cds-layout*="order:reverse"]{flex-direction:column-reverse}[cds-layout~=vertical][cds-layout*="align:horizontal-stretch"]{align-items:stretch}[cds-layout~=vertical][cds-layout*="align:stretch"]{align-items:stretch;justify-content:stretch}[cds-layout~=vertical][cds-layout*="align:stretch"]>*{flex-grow:1}[cds-layout~=vertical]>[cds-layout*="align:center"],[cds-layout~=vertical]>[cds-layout*="align:vertical-center"]{margin-top:auto;margin-bottom:auto}[cds-layout~=vertical]>[cds-layout*="align:center"],[cds-layout~=vertical]>[cds-layout*="align:horizontal-center"]{align-self:center}[cds-layout~=vertical]>[cds-layout*="align:top"]{margin-bottom:auto!important}[cds-layout~=vertical]>[cds-layout*="align:right"]{margin-left:auto}[cds-layout~=vertical]>[cds-layout*="align:left"]{margin-right:auto}[cds-layout~=grid]{display:grid;align-items:start;align-content:start;grid-template-columns:repeat(var(--cds-global-layout-grid-cols,12),1fr);width:100%}[cds-layout~=grid][cds-layout*=rows]{grid-template-rows:repeat(12,auto)}[cds-layout~=grid]>[cds-layout*=row]{align-self:stretch}[cds-layout~=grid][cds-layout*="align:top"]{align-content:start}[cds-layout~=grid][cds-layout*="align:right"]{justify-content:end}[cds-layout~=grid][cds-layout*="align:left"]{justify-content:start}[cds-layout~=grid][cds-layout*="align:horizontal-stretch"]{justify-items:stretch;justify-content:stretch}[cds-layout~=grid][cds-layout*="align:stretch"]{align-items:stretch;align-content:stretch;justify-items:stretch;justify-content:stretch}[cds-layout~=grid][cds-layout*="align:vertical-center"]{align-items:center;align-content:center}[cds-layout~=grid][cds-layout*="align:horizontal-center"]{justify-items:center;justify-content:center}[cds-layout~=grid][cds-layout*="align:center"]{align-items:center;align-content:center;justify-items:center;justify-content:center}::slotted([cds-layout~="display:screen-reader-only"]),[cds-layout~="display:screen-reader-only"]{position:absolute!important;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);padding:0;border:0;height:1px;width:1px;overflow:hidden;white-space:nowrap;top:0;left:0;display:block!important}[cds-layout*="gap:none"]{gap:0}[cds-layout*="gap:xxs"]{gap:var(--δ2)}[cds-layout*="gap:xs"]{gap:var(--δ3)}[cds-layout*="gap:sm"]{gap:var(--δ4)}[cds-layout*="gap:md"]{gap:var(--δ5)}[cds-layout*="gap:lg"]{gap:var(--δ6)}[cds-layout~="p:none"]{padding:0!important}[cds-layout~="p:xxs"]{padding:var(--δ2)!important}[cds-layout~="p:xs"]{padding:var(--δ3)!important}[cds-layout~="p:sm"]{padding:var(--δ4)!important}[cds-layout~="p:md"]{padding:var(--δ5)!important}[cds-layout~="m:md"]{margin:var(--δ5)!important}[cds-layout~="p:lg"]{padding:var(--δ6)!important}[cds-layout~="p-y:xs"]{padding-top:var(--δ3)!important;padding-bottom:var(--δ3)!important}[cds-layout~="p-x:lg"]{padding-left:var(--δ6)!important;padding-right:var(--δ6)!important}[cds-layout~="p-y:lg"]{padding-top:var(--δ6)!important;padding-bottom:var(--δ6)!important}[cds-layout~="p-l:md"]{padding-left:var(--δ5)!important}@media (min-width:992px){[cds-layout*="gap@md:lg"]{gap:var(--δ6)}[cds-layout~="p@md:lg"]{padding:var(--δ6)!important}[cds-layout~="m@md:xl"]{margin:var(--δ7)!important}}[cds-layout~=fill]{width:100%!important}*,:after,:before{box-sizing:border-box}[cds-layout~=horizontal][cds-layout*="align:horizontal-stretch"]>::slotted(*),[cds-layout~=horizontal][cds-layout*="align:stretch"]>::slotted(*),[cds-layout~=vertical][cds-layout*="align:stretch"]>::slotted(*){flex-grow:1}[cds-layout~=vertical] ::slotted([cds-layout*="align:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align:left"]),[cds-layout~=vertical]>[cds-layout*="align:left"]{margin-right:auto}@media (min-width:576px){[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:left"]){margin-right:auto}}@media (min-width:768px){[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:left"]){margin-right:auto}}@media (min-width:992px){[cds-layout~=vertical] ::slotted([cds-layout*="align@md:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@md:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@md:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@md:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align@md:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@md:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@md:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@md:left"]){margin-right:auto}}@media (min-width:1200px){[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:left"]){margin-right:auto}}@media (min-width:1440px){[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:left"]){margin-right:auto}}[cds-layout~=horizontal] ::slotted([cds-layout*="align:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align:left"]){margin-right:auto!important}@media (min-width:576px){[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:left"]){margin-right:auto!important}}@media (min-width:768px){[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:left"]){margin-right:auto!important}}@media (min-width:992px){[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:left"]){margin-right:auto!important}}@media (min-width:1200px){[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:left"]){margin-right:auto!important}}@media (min-width:1440px){[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:left"]){margin-right:auto!important}}[cds-text]{font-family:var(--cds-global-typography-font-family, "Clarity City", "Avenir Next", sans-serif);margin-top:0;margin-bottom:0}[cds-text][cds-layout~=grid]::after,[cds-text][cds-layout~=grid]::before,[cds-text][cds-layout~=horizontal]::after,[cds-text][cds-layout~=horizontal]::before,[cds-text][cds-layout~=vertical]::after,[cds-text][cds-layout~=vertical]::before{display:none}[cds-text*=display],[cds-text*=section],[cds-text*=subsection],[cds-text*=title]{font-family:var(--cds-global-typography-header-font-family, "Clarity City", "Avenir Next", sans-serif);color:var(--cds-global-typography-color-400,var(--cds-global-color-construction-900,#21333b))}[cds-text*=body],[cds-text*=message],[cds-text*=secondary]{color:var(--cds-global-typography-color-500,var(--cds-global-color-black,#000))}[cds-text*=inline]{width:auto!important;display:inline-block!important}[cds-text*=display]{font-size:var(--cds-global-typography-display-font-size,calc(40 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-display-font-weight,500);line-height:var(--cds-global-typography-display-line-height,1.1em);letter-spacing:var(--cds-global-typography-display-letter-spacing,-.0125em)}[cds-text*=display]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-display-line-height,1.1em) - 1em)/ 2))*-1) + .037em)}[cds-text*=display]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-display-line-height,1.1em) - 1em)/ 2))*-1) - .044em)}[cds-text*=title]{font-size:var(--cds-global-typography-title-font-size,calc(24 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-title-font-weight,500);line-height:var(--cds-global-typography-title-line-height,1.16667em);letter-spacing:var(--cds-global-typography-title-letter-spacing,-.008333em)}[cds-text*=title]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-title-line-height,1.16667em) - 1em)/ 2))*-1) + .037em)}[cds-text*=title]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-title-line-height,1.16667em) - 1em)/ 2))*-1) - .044em)}[cds-text*=section]{font-size:var(--cds-global-typography-section-font-size,calc(20 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-section-font-weight,500);line-height:var(--cds-global-typography-section-line-height,1.2em);letter-spacing:var(--cds-global-typography-section-letter-spacing,-.01em)}[cds-text*=section]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-section-line-height,1.2em) - 1em)/ 2))*-1) + .037em)}[cds-text*=section]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-section-line-height,1.2em) - 1em)/ 2))*-1) - .044em)}[cds-text*=subsection]{font-size:var(--cds-global-typography-subsection-font-size,calc(16 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-subsection-font-weight,500);line-height:var(--cds-global-typography-subsection-line-height,1.25em);letter-spacing:var(--cds-global-typography-subsection-letter-spacing,-.0125em)}[cds-text*=subsection]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-subsection-line-height,1.25em) - 1em)/ 2))*-1) + .037em)}[cds-text*=subsection]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-subsection-line-height,1.25em) - 1em)/ 2))*-1) - .044em)}[cds-text*=body]{font-weight:var(--cds-global-typography-body-font-weight,400);font-size:var(--cds-global-typography-body-font-size,calc(14 * 1rem / var(--cds-global-base,20)));letter-spacing:var(--cds-global-typography-body-letter-spacing,-.014286em);line-height:var(--cds-global-typography-body-line-height,1.42857em)}[cds-text*=body]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-body-line-height,1.42857em) - 1em)/ 2))*-1) + .1em)}[cds-text*=body]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-body-line-height,1.42857em) - 1em)/ 2))*-1) - .044em)}body[cds-text*=body]::after,body[cds-text*=body]::before{content:none}[cds-text*=message]{font-size:var(--cds-global-typography-message-font-size,calc(16 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-message-font-weight,calc(400 * 1rem / var(--cds-global-base,20)));line-height:var(--cds-global-typography-message-line-height,1.25em);letter-spacing:var(--cds-global-typography-message-letter-spacing,-.0125em)}[cds-text*=message]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-message-line-height,1.25em) - 1em)/ 2))*-1) + .037em)}[cds-text*=message]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-message-line-height,1.25em) - 1em)/ 2))*-1) - .044em)}[cds-text*=secondary]{font-size:var(--cds-global-typography-secondary-font-size,calc(13 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-secondary-font-weight,400);line-height:var(--cds-global-typography-secondary-line-height,1.23077em);letter-spacing:var(--cds-global-typography-secondary-letter-spacing,-.007692em)}[cds-text*=secondary]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-secondary-line-height,1.23077em) - 1em)/ 2))*-1) + .037em)}[cds-text*=secondary]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-secondary-line-height,1.23077em) - 1em)/ 2))*-1) - .044em)}[cds-text~=link]{color:var(--cds-global-typography-link-color,var(--cds-global-color-blue-700,#0079ad))!important;text-decoration:underline!important;line-height:inherit!important;font-size:inherit!important}[cds-text~=link]:focus{outline:var(--cds-alias-object-interaction-outline,Highlight solid 2px);outline-offset:var(--cds-alias-object-interaction-outline-offset,1px)}[cds-text~=link]:hover{color:var(--cds-global-typography-link-color-hover,var(--cds-global-color-blue-800,#00608a))!important}[cds-text~=link]:visited:not([cds-text~=static]){color:var(--cds-global-typography-link-color-visited,var(--cds-global-color-lavender-600,#3b40ce))!important}[cds-text~=link]:visited:not([cds-text~=static]):hover{color:var(--cds-global-typography-link-color-visited-hover,var(--cds-global-color-lavender-700,#2429c2))!important}@media (-webkit-min-device-pixel-ratio:0){[cds-text=link]:focus{outline:var(--cds-alias-object-interaction-outline-webkit,5px auto -webkit-focus-ring-color)}}[cds-text~=code]{color:var(--cds-alias-status-danger,var(--cds-global-color-red-700,#e02200));font-family:monospace;font-size:1.1em}[cds-divider]{display:block;height:var(--cds-alias-object-border-width-100,calc(1 * 1rem / var(--cds-global-base,20)));overflow:hidden;box-shadow:var(--cds-alias-object-border-color,var(--cds-global-color-construction-200,#cbd4d8)) 0 0 0 var(--cds-alias-object-border-width-100,calc(1 * 1rem / var(--cds-global-base,20))) inset}[cds-text~=light]{font-weight:var(--cds-global-typography-font-weight-light,300)!important}[cds-text~=justify]{text-align:justify!important}[cds-text~=left]{text-align:left!important}[cds-text~=right]{text-align:right!important}[cds-text~=center]{text-align:center!important}[cds-text~=lhe]{padding:.05px 0}[cds-text~=lhe]::before{content:"";margin-top:-.124em;display:block;height:0}[cds-text~=lhe]::after{content:"";margin-bottom:-.221em;display:block;height:0}[cds-text*=h2],[cds-text*=h3]{font-family:var(--cds-global-typography-header-font-family, "Clarity City", "Avenir Next", sans-serif);font-size:1.4rem;font-weight:200;color:var(--cds-global-typography-color-400);line-height:1.7143em;letter-spacing:-.017857em}[cds-text*=h2]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((1.7143em - 1em)/ 2))*-1) + .037em)}[cds-text*=h2]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((1.7143em - 1em)/ 2))*-1) - .044em)}[cds-text*=h3]{font-size:1.1rem;line-height:1.0909em;letter-spacing:-.013636em}[cds-text*=h3]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((1.0909em - 1em)/ 2))*-1) + .037em)}[cds-text*=h3]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((1.0909em - 1em)/ 2))*-1) - .044em)}:host{all:initial;display:block;visibility:inherit;font-family:var(--cds-global-typography-font-family, "Clarity City", "Avenir Next", sans-serif);contain:layout;box-sizing:border-box!important;-webkit-appearance:none!important}*,:after,:before{box-sizing:inherit!important}slot{font-family:var(--cds-global-typography-font-family, "Clarity City", "Avenir Next", sans-serif);display:contents!important}::slotted(*){font-family:inherit;box-sizing:inherit}::slotted(*)::placeholder{color:var(--cds-global-typography-color-200,var(--cds-global-color-construction-600,#4f6169))}:host([_is-anchor]),:host([role=button]){cursor:pointer!important}:host([_is-anchor]) ::slotted(*),:host([role=button]) ::slotted(*){cursor:pointer!important}:host([role=button][disabled]){cursor:not-allowed!important}:host([role=button][disabled]) ::slotted(*){cursor:not-allowed!important;pointer-events:none}:host([hidden]),[hidden]{display:none!important}:host([hidden*=false]){display:block!important}:host([role=dialog][hidden]),:host([role=dialog][hidden]) ::slotted(*){display:block!important;visibility:hidden!important}:host([role=dialog][hidden*=false]),:host([role=dialog][hidden*=false]) ::slotted(*){visibility:visible!important}:host([_focused]) .input,:host([_focused]) [focusable],:host([tabindex="0"]:focus),:host([tabindex="0"]:focus) [focusable],[tabindex="0"][focusable]:focus{outline:Highlight solid 2px;outline:5px auto -webkit-focus-ring-color;outline-offset:var(--cds-alias-object-interaction-outline-offset,1px)}`;function Xf(d){return`calc((${d} / var(--cds-global-base)) * 1rem)`}const pb=(d,f)=>"method"===f.kind&&f.descriptor&&!("value"in f.descriptor)?{...f,finisher(a){a.createProperty(f.key,d)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:f.key,initializer(){"function"==typeof f.initializer&&(this[f.key]=f.initializer.call(this))},finisher(a){a.createProperty(f.key,d)}},Rl=(d,f,a)=>{f.constructor.createProperty(a,d)};function qc(d){return(f,a)=>void 0!==a?Rl(d,f,a):pb(d,f)}function tp(d,f){switch(f&&f.type){case Array:case Object:return{reflect:!1,...f};case String:return{reflect:!0,attribute:Pi(d),converter:{toAttribute:a=>a||null},...f};case Number:return{reflect:!0,attribute:Pi(d),...f};case Boolean:return{reflect:!0,attribute:Pi(d),converter:{toAttribute:a=>a?"":null,fromAttribute:a=>function ov(d){return null!=d&&""+d!="false"}(a)},...f};case Date:return{reflect:!1,converter:{fromAttribute:a=>new Date(a)},...f};default:return{...f}}}function Yi(d){return(f,a)=>(d?.required&&function av(d,f,a){const g=d.firstUpdated;d.firstUpdated=function(_){if(a&&a.required&&We(this[f])){const S=a.requiredMessage||function(j="warning",J,te){const Ce=te.toLocaleLowerCase();return`${pe(j)}: ${J} is required to use ${Ce} component. Set the JS Property or HTML Attribute.\n\n`+(qi()?`Angular: <${Ce} [${J}]="...">\n`:"")+($n()?`Vue: <${Ce} :${J}="...">\n`:"")+(ni()?`React: <${function ws(d){return pe(function Hi(d){return d.split("-").map((f,a)=>a?f.charAt(0).toUpperCase()+f.slice(1).toLowerCase():f).join("")}(d))}(Ce)} ${Ge=J,Ge.startsWith("aria")?Pi(Ge):Ge}={...} />\n`:"")+`HTML: <${Ce} ${Pi(J)}="...">\nJavaScript: document.querySelector('${Ce}').${J} = '...';\n\n`;var Ge}(a.required,f,this.tagName);if("error"===a.required)throw Error(S);di.warn(S,this)}g&&g.call(this,_)}}(f,a,d),qc(tp(a,d))(f,a))}function Db(d){return(f,a)=>{const g=tp(a,d);return g&&(g.reflect=!!d?.reflect&&d.reflect,g.reflect&&!d?.attribute&&(g.attribute="_"+Pi(a))),qc(g)(f,a)}}var Lo,d,aE=br`@keyframes fadeInAndOut{0%,to{opacity:0}75%{opacity:1}}:host{--color:currentColor;display:inline-block;height:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));margin:0;vertical-align:middle;fill:var(--color);color:var(--color);contain:strict;cursor:inherit}svg{display:block}:host([size*=xs]){height:var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20)))}:host([size*=sm]){height:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)))}:host([size*=md]){height:var(--cds-global-space-9,calc(24 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-9,calc(24 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-9,calc(24 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-9,calc(24 * 1rem / var(--cds-global-base,20)))}:host([size*=lg]){height:var(--cds-global-space-11,calc(36 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-11,calc(36 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-11,calc(36 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-11,calc(36 * 1rem / var(--cds-global-base,20)))}:host([size*=xl]){height:var(--cds-global-space-12,calc(48 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-12,calc(48 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-12,calc(48 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-12,calc(48 * 1rem / var(--cds-global-base,20)))}:host([size*=xxl]){height:calc(var(--cds-global-space-13,calc(64 * 1rem / var(--cds-global-base,20))) - var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20))));width:calc(var(--cds-global-space-13,calc(64 * 1rem / var(--cds-global-base,20))) - var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20))));min-height:calc(var(--cds-global-space-13,calc(64 * 1rem / var(--cds-global-base,20))) - var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20))));min-width:calc(var(--cds-global-space-13,calc(64 * 1rem / var(--cds-global-base,20))) - var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20))))}:host([size*=fit]){height:auto;width:auto;contain:layout}:host([status=success]){--color:var(--cds-alias-status-success, var(--cds-global-color-green-700, #42810e))}:host([status=danger]){--color:var(--cds-alias-status-danger, var(--cds-global-color-red-700, #e02200))}:host([status=warning]){--color:var(--cds-alias-status-warning-dark, var(--cds-global-color-ochre-800, #a36500))}:host([status=info]){--color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}:host([status=neutral]){--color:var(--cds-alias-status-neutral, var(--cds-global-color-construction-600, #4f6169))}:host([inverse]){--color:var(--cds-global-color-construction-200, #cbd4d8)}:host([direction=up]){transform:rotate(0)}:host([direction=down]){transform:rotate(180deg)}:host([direction=right]){transform:rotate(90deg)}:host([direction=left]){transform:rotate(270deg)}:host([flip=horizontal]){transform:scale(-1) rotateX(180deg)}:host([flip=vertical]){transform:scale(-1) rotateY(180deg)}.alert,.badge{fill:var(--badge-color,var(--cds-alias-status-danger,var(--cds-global-color-red-700,#e02200)))}:host([badge=success]){--badge-color:var(--cds-alias-status-success, var(--cds-global-color-green-700, #42810e))}:host([badge=danger]){--badge-color:var(--cds-alias-status-danger, var(--cds-global-color-red-700, #e02200))}:host([badge*=warning]){--badge-color:var(--cds-alias-status-warning-dark, var(--cds-global-color-ochre-800, #a36500))}:host([badge=inherit]){--badge-color:currentColor}:host([badge=info]){--badge-color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}:host([badge=neutral]){--badge-color:var(--cds-alias-status-neutral, var(--cds-global-color-construction-600, #4f6169))}:host([badge=inherit-triangle]){--badge-color:currentColor}:host([badge][inverse]){--badge-color:var(--cds-alias-status-danger, var(--cds-global-color-red-700, #e02200))}:host([badge=success][inverse]){--badge-color:var(--cds-alias-status-success, var(--cds-global-color-green-700, #42810e))}:host([badge*=warning][inverse]){--badge-color:var(--cds-alias-status-warning-dark, var(--cds-global-color-ochre-800, #a36500))}:host([badge*=inherit][inverse]){--badge-color:currentColor}:host([badge=info][inverse]){--badge-color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}.cds-internal-dot-1{animation:fadeInAndOut 1.8s ease-in 0s infinite}.cds-internal-dot-2{animation:fadeInAndOut 1.8s ease-out .422s infinite}.cds-internal-dot-3{animation:fadeInAndOut 1.8s ease-out .675s infinite}@media (prefers-reduced-motion){.cds-internal-dot-1,.cds-internal-dot-2,.cds-internal-dot-3{animation:none}}`;function xd(d,f){let a="";switch(function wb(d){switch(!0){case We(d):return Lo.NilSizeValue;case function ip(d){return["xxs","xs","sm","md","lg","xl","xxl"].indexOf(d)>-1}(d):return Lo.ValidSizeString;case function _t(d){return Ke(d)&&!Fe(d.trim())&&+d==+d}(d):return Lo.ValidNumericString;default:return Lo.BadSizeValue}}(function Eb(d){return We(d)?"":function oe(d,f,a=""){const g=d.split(" "),_=""===a?g.filter(S=>S!==f):g.map(S=>S===f?a:S);return _.length>0?_.join(" "):""}(d,"fit")}(f))){case Lo.ValidNumericString:return a=Xf(parseInt(f)),void function Jf(d,...f){f.forEach(([a,g])=>{d.style[a]=g})}(d,...function cv(d,f){return!Ne(d)&&d.indexOf("fit")>-1?[["width","auto"],["height","auto"],["min-width",f],["min-height",f]]:[["width",f],["height",f],["min-width",f],["min-height",f]]}(f,a));case Lo.ValidSizeString:case Lo.NilSizeValue:return void function Ol(d,...f){f.forEach(a=>{d.style[a]=""})}(d,"width","height","min-width","min-height");default:return}}function rp(d){return d.badge&&("inherit-triangle"===d.badge||"warning-triangle"===d.badge)}(d=Lo||(Lo={})).BadSizeValue="bad-value",d.ValidSizeString="value-is-string",d.ValidNumericString="value-is-numeric",d.NilSizeValue="value-is-nil";class Lr extends Fo{constructor(){super(...arguments),this._shape="unknown",this.solid=!1,this.inverse=!1}static get styles(){return[tv,aE]}get shape(){return this._shape}set shape(f){if(function li(d,f){return!We(d)&&kt(d,f)}(f,this._shape)){const a=this._shape;this._shape=f,this.requestUpdate("shape",a)}}get size(){return this._size}set size(f){if(function mn(d,f){return function ot(d){return be(String,d)||Ne(d)}(d)&&kt(d,f)}(f,this._size)){const a=this._size;this._size=f,xd(this,f),this.requestUpdate("size",a)}}updated(f){if(f.has("innerOffset")&&this.innerOffset>0){const a=Xf(-1*this.innerOffset),g=`calc(100% + ${Xf(2*this.innerOffset)})`;this.svg.style.width=g,this.svg.style.height=g,this.svg.style.margin=`${a} 0 0 ${a}`}}firstUpdated(f){if(super.firstUpdated(f),this.isConnected){let a="unknown";this.subscription=hi.stateUpdates.subscribe(g=>{"iconRegistry"===g.key&&Jt.registry[this.shape]&&a!==this.shape&&(a=this.shape,this.requestUpdate("shape"))})}}disconnectedCallback(){super.disconnectedCallback(),this.subscription?.unsubscribe()}render(){return Ke(Jt.registry[this.shape])?Yc``:ub``}}(0,Ci.gn)([Yi({type:String})],Lr.prototype,"shape",null),(0,Ci.gn)([Yi({type:String})],Lr.prototype,"size",null),(0,Ci.gn)([Yi({type:String})],Lr.prototype,"direction",void 0),(0,Ci.gn)([Yi({type:String})],Lr.prototype,"flip",void 0),(0,Ci.gn)([Yi({type:Boolean})],Lr.prototype,"solid",void 0),(0,Ci.gn)([Yi({type:String})],Lr.prototype,"status",void 0),(0,Ci.gn)([Yi({type:Boolean})],Lr.prototype,"inverse",void 0),(0,Ci.gn)([Yi({type:String})],Lr.prototype,"badge",void 0),(0,Ci.gn)([Db({type:Number})],Lr.prototype,"innerOffset",void 0),(0,Ci.gn)([function oE(d,f){return(({finisher:d,descriptor:f})=>(a,g)=>{var _;if(void 0===g){const S=null!==(_=a.originalKey)&&void 0!==_?_:a.key,j=null!=f?{kind:"method",placement:"prototype",key:S,descriptor:f(a.key)}:{...a,key:S};return null!=d&&(j.finisher=function(J){d(J,S)}),j}{const S=a.constructor;void 0!==f&&Object.defineProperty(a,g,f(g)),d?.(S,g)}})({descriptor:a=>{const g={get(){var _,S;return null!==(S=null===(_=this.renderRoot)||void 0===_?void 0:_.querySelector(d))&&void 0!==S?S:null},enumerable:!0,configurable:!0};if(f){const _="symbol"==typeof a?Symbol():"__"+a;g.get=function(){var S,j;return void 0===this[_]&&(this[_]=null!==(j=null===(S=this.renderRoot)||void 0===S?void 0:S.querySelector(d))&&void 0!==j?j:null),this[_]}}return g}})}("svg")],Lr.prototype,"svg",void 0),Um("cds-icon",Lr);class Ib{constructor(f){this.host=f,this.host.addController(this)}hostConnected(){var f=this;return(0,Rf.Z)(function*(){yield f.host.updateComplete,f.host.addEventListener("keydown",a=>f.emulateActive(a)),f.host.addEventListener("mousedown",a=>f.emulateActive(a)),f.host.addEventListener("keyup",()=>f.emulateInactive()),f.host.addEventListener("blur",()=>f.emulateInactive()),f.host.addEventListener("mouseup",()=>f.emulateInactive())})()}emulateActive(f){this.host.disabled||this.host?.setAttribute("cds-active",""),"Space"===f.code&&f.target===this.host&&f.preventDefault()}emulateInactive(){this.host.removeAttribute("cds-active")}}class dv{constructor(f){this.host=f,this.host.addController(this)}hostConnected(){(this.host.hasAttribute("aria-controls")||this.host.ariaControls)&&(this.host.ariaHasPopup="true",this.host.ariaExpanded="false")}}class Mb{constructor(f){this.host=f,this.host.addController(this)}hostUpdated(){null!==this.host.disabled&&(this.host.ariaDisabled=this.host.disabled),this.host.readonly&&(this.host.ariaDisabled=null)}}class Ob{constructor(f){this.host=f,this.host.addController(this)}hostUpdated(){null!=this.host.pressed&&(this.host.ariaPressed=this.host.pressed?"true":"false"),this.host.readonly&&(this.host.ariaPressed=null)}}class cE{constructor(f){this.host=f,this.host.addController(this)}hostConnected(){this.host.tabIndex=0}hostUpdated(){this.host.role=this.host.readonly?null:"button",this.host.tabIndex=this.host.disabled?-1:0,this.host.readonly&&this.host.removeAttribute("tabindex")}}class Kc{constructor(f){this.host=f,this.host.addController(this)}get currentAnchor(){return"A"===this.host.parentElement?.tagName?this.host.parentElement:null}hostConnected(){this.setAnchor()}hostUpdated(){this.setAnchor()}setAnchor(){this.currentAnchor&&this.currentAnchor!==this.previousAnchor&&(this.previousAnchor=this.currentAnchor,this.host.readonly=!0,this.currentAnchor.style.lineHeight="0",this.currentAnchor.style.textDecoration="none")}}const Ga=d=>d??Gi;function ap(d){d.preventDefault(),d.stopPropagation()}const Od=new Map([["arrow-left","ArrowLeft"],["arrow-right","ArrowRight"],["arrow-up","ArrowUp"],["arrow-down","ArrowDown"],["tab","Tab"],["enter","Enter"],["escape","Escape"],["space"," "],["home","Home"],["end","End"]]);class Rd{static get keycodes(){return nr(Od)}static add(f,a){Od.set(f,a)}static has(f){return Od.has(f)}static getCode(f,a=this.keycodes){return function dE(d,f){return f.get(d)||""}(f,a)}}function Jc(d,f){return Rd.getCode(f)===d.key}var ks;!function(d){d.ArrowUp="ArrowUp",d.ArrowDown="ArrowDown",d.ArrowLeft="ArrowLeft",d.ArrowRight="ArrowRight",d.End="End",d.Home="Home",d.PageUp="PageUp",d.PageDown="PageDown"}(ks||(ks={}));class _v{constructor(f){this.host=f,this.triggerNativeButtonBehaviorHandler=this.triggerNativeButtonBehavior.bind(this),this.emulateKeyBoardEventBehaviorHandler=this.emulateKeyBoardEventBehavior.bind(this),this.host.addController(this)}hostUpdated(){this.setButtonType(),this.setupNativeButtonBehavior()}setButtonType(){!this.host.type&&this.host.closest("form")&&(this.host.type="submit")}setupNativeButtonBehavior(){this.host.readonly||this.host.disabled?(this.host.removeEventListener("click",this.triggerNativeButtonBehaviorHandler),this.host.removeEventListener("keyup",this.emulateKeyBoardEventBehaviorHandler)):(this.host.addEventListener("click",this.triggerNativeButtonBehaviorHandler),this.host.addEventListener("keyup",this.emulateKeyBoardEventBehaviorHandler))}emulateKeyBoardEventBehavior(f){!function lp(d,f,a){d.filter(g=>Jc(f,g)).length>0&&a()}(["enter","space"],f,()=>{"submit"===this.host.type?this.triggerNativeButtonBehavior(f):this.host.click(),ap(f)})}triggerNativeButtonBehavior(f){if(this.host.disabled)ap(f);else if(!f.defaultPrevented){const a=function Lb(d,f,a){const g=document.createElement("div");f.appendChild(g),Id(d,f,{renderBefore:g,...a});const _=g.previousSibling;return g.remove(),_}(Yc``,this.host);a?.dispatchEvent(new MouseEvent("click",{relatedTarget:this.host,composed:!0})),a?.remove()}}}class Bb{constructor(f){this.host=f,this.host.addController(this)}hostUpdated(){null!=this.host.expanded&&(this.host.ariaExpanded=this.host.expanded?"true":"false"),this.host.readonly&&(this.host.ariaExpanded=null)}}let _o=class extends Fo{constructor(){super(...arguments),this._disabled=!1}get disabled(){return this._disabled}set disabled(d){const f=this._disabled;this._disabled=d,this.requestUpdate("disabled",f)}};(0,Ci.gn)([Yi({type:Boolean})],_o.prototype,"pressed",void 0),(0,Ci.gn)([Yi({type:Boolean})],_o.prototype,"expanded",void 0),(0,Ci.gn)([Yi({type:Boolean})],_o.prototype,"readonly",void 0),(0,Ci.gn)([Yi({type:String})],_o.prototype,"type",void 0),(0,Ci.gn)([Yi({type:String})],_o.prototype,"name",void 0),(0,Ci.gn)([Yi({type:String})],_o.prototype,"value",void 0),(0,Ci.gn)([Yi({type:Boolean})],_o.prototype,"disabled",null),(0,Ci.gn)([Yi({type:String})],_o.prototype,"popup",void 0),_o=(0,Ci.gn)([function uv(){return d=>d.addInitializer(f=>new Ib(f))}(),function hv(){return d=>d.addInitializer(f=>new cE(f))}(),function xb(){return d=>d.addInitializer(f=>new Ob(f))}(),function kl(){return d=>d.addInitializer(f=>new Bb(f))}(),function Ab(){return d=>d.addInitializer(f=>new Mb(f))}(),function op(){return d=>d.addInitializer(f=>new dv(f))}(),function Vb(){return d=>d.addInitializer(f=>new _v(f))}(),function uE(){return d=>d.addInitializer(f=>new Kc(f))}()],_o);const kd={actions:{sort:"Sort",expand:"Expand",close:"Close",resize:"Resize",filter:"Filter"},alert:{closeButtonAriaLabel:"Close",loading:"Loading",info:"Info",success:"Success",warning:"Warning",danger:"Error"},dropdown:{open:"Open"},file:{browse:"browse",files:"files",removeFile:"remove file"},modal:{closeButtonAriaLabel:"Close modal",contentStart:"Beginning of modal content",contentBox:"Scrollable modal body",contentEnd:"End of modal content"},navigation:{navigationElement:"navigation",navigationLabel:"navigation menu",navigationAbridgedText:"View abridged menu",navigationUnabridgedText:"View unabridged menu"},overlay:{closeButtonAriaLabel:"Close dialog",contentStart:"Beginning of dialog content",contentEnd:"End of dialog content"},popup:{closeButtonAriaLabel:"Close popup",contentStart:"Beginning of popup content",contentEnd:"End of popup content"},password:{showButtonAriaLabel:"Show password",hideButtonAriaLabel:"Hide password"},progress:{loading:"Loading",looping:"Loading"},treeview:{loading:"Loading"},grid:{resizeColumn:"Resize Column",closeDetails:"Close Details",noData:"No Results Found",rowDetailStart:"Start of row details",rowDetailEnd:"End of row details",footerEnd:"End of grid rows",action:"Action",dropTarget:"Drop Item",pagination:{label:"grid pagination",firstPage:"go to first page",previousPage:"go to previous page",nextPage:"go to next page",lastPage:"go to last page",pageSize:"rows per page",page:"page"}}};class Xo{static get keys(){return 0===Object.keys(hi.state.i18nRegistry).length&&(hi.state.i18nRegistry=bt(kd,hi.state.i18nRegistry)),bt(kd,hi.state.i18nRegistry)}static findKey(f){const a=Xo.keys;return Object.keys(a).find(g=>Vi(a[g],f))}static get(f){return f&&Xo.keys[f]||{}}static reset(){hi.state.i18nRegistry=bt({},kd)}static hydrate(f,a){return JSON.parse(function Kt(d,f,a){return d.replace(/\$\{.+?\}/g,g=>function xi(d,f,a=`\${${d}}`){return d.split(".").reduce((g,_)=>{try{const S=g[_];switch(!0){case null===S:case!1===S:case""===S:case 0===S:return S;default:return S||a}}catch{return a}},f)}(g.substr(2,g.length-3).trim(),f,a))}(JSON.stringify(f),a))}static localize(f){hi.state.i18nRegistry=bt(kd,hi.state.i18nRegistry,f)}}var up=br`:host{--icon-width:var(--cds-global-space-7, calc(16 * 1rem / var(--cds-global-base, 20)));--icon-height:var(--cds-global-space-7, calc(16 * 1rem / var(--cds-global-base, 20)));--width:var(--icon-width);--height:var(--icon-width);--cursor:pointer;--color:var(--cds-global-typography-color-300, var(--cds-global-color-construction-800, #2d4048));--font-size:var(--cds-global-typography-font-size-3, calc(13 * 1rem / var(--cds-global-base, 20)));--background:transparent;--padding:0;--outline:var(--cds-alias-object-interaction-outline, Highlight solid 2px);--outline-offset:calc(var(--cds-alias-object-interaction-outline-offset, 1px) * -1);pointer-events:none;display:inline-block;outline:0!important}:host([role=button]){pointer-events:initial;cursor:var(--cursor)!important}:host([status=active]){--color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}::slotted([shape=close]),::slotted([shape=info-circle]),::slotted([shape=times]),:host([shape=close]),:host([shape=info-circle]){--icon-width:var(--cds-global-space-8, calc(18 * 1rem / var(--cds-global-base, 20)));--icon-height:var(--cds-global-space-8, calc(18 * 1rem / var(--cds-global-base, 20)))}:host(:hover){--color:var(--cds-alias-object-interaction-color-hover, var(--cds-global-color-construction-1000, #1b2b32))}:host(:active){--color:var(--cds-alias-object-interaction-color-active, var(--cds-global-color-construction-1000, #1b2b32))}:host(:active) .private-host{transform:translateY(calc(var(--cds-global-space-1,calc(1 * 1rem / var(--cds-global-base,20)))/ 2))}:host([disabled]){--color:var(--cds-alias-object-interaction-color-disabled, var(--cds-global-color-construction-300, #aeb8bc))}.private-host{--icon-color:var(--color);background:var(--background);padding:var(--padding);color:var(--color);font-size:var(--font-size);display:flex;justify-content:center;align-items:center;min-width:var(--width);min-height:var(--height)}::slotted(cds-icon),cds-icon{width:var(--icon-width);height:var(--icon-height);pointer-events:none}::slotted(cds-icon:not([status])),cds-icon{--color:var(--icon-color)}:host([disabled]:active){pointer-events:none!important}.private-host::after{content:"";position:absolute;left:calc(-1*var(--width) - 1);top:calc(-1*var(--height) - 1);width:var(--cds-alias-object-interaction-touch-target,calc(36 * 1rem / var(--cds-global-base,20)));height:var(--cds-alias-object-interaction-touch-target,calc(36 * 1rem / var(--cds-global-base,20)))}:host([disabled]) .private-host::after{outline:0!important}:host(:focus) .private-host::after{outline:var(--outline);outline-offset:var(--outline-offset)}@media (-webkit-min-device-pixel-ratio:0){:host(:focus) .private-host::after{outline-color:-webkit-focus-ring-color}}`;class Nl extends _o{constructor(){super(...arguments),this.i18n=Xo.keys.actions,this.cdsButtonAction=!0}render(){return Yc`
`}updated(f){super.updated(f),this.ariaLabel||this.readonly||di.warn("A aria-label is required for interactive cds-button-action type",this),f.has("readonly")&&(this.ariaHidden=this.readonly&&!this.hasAttribute("aria-label")?"true":null)}}Nl.styles=[tv,up],(0,Ci.gn)([Yi({type:String})],Nl.prototype,"shape",void 0),(0,Ci.gn)([Yi({type:String,reflect:!0})],Nl.prototype,"action",void 0),(0,Ci.gn)([Yi({type:String})],Nl.prototype,"iconSize",void 0),(0,Ci.gn)([function yv(){return(d,f)=>{const a=d.connectedCallback,g=d.disconnectedCallback;d.connectedCallback=function(){d.__i18nSub=hi.stateUpdates.subscribe(S=>{"i18nRegistry"===S.key&&this.requestUpdate(f)}),a&&a.apply(this)},d.disconnectedCallback=function(){d.__i18nSub.unsubscribe(),g&&g.apply(this)};const _={get(){const S=bt(Xo.keys[this.__i18nKey],this.__i18n||{});return Xo.hydrate(S,this)},set(S){const j=function Hb(d,f){if(We(d)){let a={};if(f.hasAttribute("cds-i18n")){const g=f.getAttribute("cds-i18n")+"";if(We(g))a={};else try{a=JSON.parse(g)}catch{di.warn("Clarity i18n: Invalid JSON passed to cds-i18n"),a={}}}return a}return d}(S,this),J=function Cv(d,f,a,g){return We(d)?Vi(a,g)?{update:!1}:{update:!0,values:a}:d===f?{update:!1,values:{}}:{update:!0,key:d,values:{}}}(Xo.findKey(j)||"",this.__i18nKey,j,this.__i18n);void 0!==J.key&&(this.__i18nKey=J.key+""),void 0!==J.values&&(this.__i18n={...J.values}),!0===J.update&&this.requestUpdate(),this.requestUpdate(f)},enumerable:!0,configurable:!0};return void 0!==f?function(S,j,J){const te=Object.defineProperty(j,J,S);return Yi({type:Object,attribute:"cds-i18n"})(te,J)}(_,d,f):function(S,j){const J={kind:"method",placement:"prototype",key:j.key,descriptor:S};return Yi({type:Object})(J)}(_,d)}}()],Nl.prototype,"i18n",void 0),(0,Ci.gn)([Db({type:Boolean,reflect:!0,attribute:"cds-button-action"})],Nl.prototype,"cdsButtonAction",void 0);class bv extends Nl{constructor(){super(...arguments),this.shape="close"}connectedCallback(){super.connectedCallback(),this.ariaLabel=this.ariaLabel?this.ariaLabel:this.i18n.close}}(0,Ci.gn)([Yi({type:String})],bv.prototype,"shape",void 0),Um("cds-internal-close-button",bv),Jt.addIcons(fi),Jt.addAliases(["times",["close"]]);const jt=["*"];function Tv(d,f){1&d&&l._UZ(0,"label")}const bE=[[["","clrCheckbox",""],["","clrToggle",""]],[["label"]]],Kb=["[clrCheckbox],[clrToggle]","label"];function nu(d,f){1&d&&l._UZ(0,"label")}function Jb(d,f){1&d&&l.Hsn(0,2,["*ngIf","showHelper"])}function Vl(d,f){1&d&&l._UZ(0,"cds-icon",5)}function iu(d,f){1&d&&l._UZ(0,"cds-icon",6)}function Xb(d,f){1&d&&l.Hsn(0,3,["*ngIf","showInvalid"])}function Iv(d,f){1&d&&l.Hsn(0,4,["*ngIf","showValid"])}const e0=[[["label"]],[["clr-checkbox-wrapper"],["clr-toggle-wrapper"]],[["clr-control-helper"]],[["clr-control-error"]],[["clr-control-success"]]],t0=["label","clr-checkbox-wrapper,clr-toggle-wrapper","clr-control-helper","clr-control-error","clr-control-success"];function Da(d,f){1&d&&l._UZ(0,"label")}function _p(d,f){1&d&&l._UZ(0,"cds-icon",5)}function l0(d,f){1&d&&l._UZ(0,"cds-icon",6)}function AE(d,f){1&d&&l.Hsn(0,2,["*ngIf","showHelper"])}function c0(d,f){1&d&&l.Hsn(0,3,["*ngIf","showInvalid"])}function yp(d,f){1&d&&l.Hsn(0,4,["*ngIf","showValid"])}const Vo=[[["label"]],[["","clrInput",""]],[["clr-control-helper"]],[["clr-control-error"]],[["clr-control-success"]]],kv=["label","[clrInput]","clr-control-helper","clr-control-error","clr-control-success"];function VE(d,f){1&d&&l._UZ(0,"label")}const BE=[[["","clrRadio",""]],[["label"]]],Yv=["[clrRadio]","label"];function rn(d,f){1&d&&l._UZ(0,"label")}function Wv(d,f){if(1&d&&l._UZ(0,"span",6),2&d){const a=l.oxw();l.Udp("width",a.getRangeProgressFillWidth())}}function Zv(d,f){1&d&&l._UZ(0,"cds-icon",7)}function jl(d,f){1&d&&l._UZ(0,"cds-icon",8)}function Qv(d,f){1&d&&l.Hsn(0,2,["*ngIf","showHelper"])}function S0(d,f){1&d&&l.Hsn(0,3,["*ngIf","showInvalid"])}function zd(d,f){1&d&&l.Hsn(0,4,["*ngIf","showValid"])}const zl=[[["label"]],[["","clrRange",""]],[["clr-control-helper"]],[["clr-control-error"]],[["clr-control-success"]]],Sp=["label","[clrRange]","clr-control-helper","clr-control-error","clr-control-success"];function su(d,f){1&d&&l._UZ(0,"label")}function qv(d,f){1&d&&l._UZ(0,"cds-icon",5)}function Dp(d,f){1&d&&l._UZ(0,"cds-icon",6)}function wp(d,f){1&d&&l.Hsn(0,2,["*ngIf","showHelper"])}function Ep(d,f){1&d&&l.Hsn(0,3,["*ngIf","showInvalid"])}function Kv(d,f){1&d&&l.Hsn(0,4,["*ngIf","showValid"])}const Tp=[[["label"]],[["","clrSelect",""]],[["clr-control-helper"]],[["clr-control-error"]],[["clr-control-success"]]],D0=["label","[clrSelect]","clr-control-helper","clr-control-error","clr-control-success"],Jv=["anchor"];function T0(d,f){if(1&d&&(l.TgZ(0,"div",4)(1,"div",5)(2,"button",6),l._UZ(3,"cds-icon",7),l.qZA()(),l.Hsn(4),l.qZA()),2&d){const a=l.oxw();l.Q6J("id",a.popoverId),l.uIk("aria-label",a.commonStrings.keys.datagridFilterDialogAriaLabel),l.xp6(3),l.uIk("title",a.commonStrings.keys.close)}}const I0=["input_low"],Ns=["input"],A0=["columnPortal"];function M0(d,f){1&d&&l.Hsn(0)}const WE=["resizeTracker"],Ip=["columnHandle"];function Xv(d,f){1&d&&l.GkF(0)}function x0(d,f){if(1&d&&l._UZ(0,"cds-icon",10),2&d){const a=l.oxw(2);l.uIk("direction",a.sortDirection)}}function O0(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",7),l.NdJ("click",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.sort())}),l.YNc(1,Xv,1,0,"ng-container",8),l.YNc(2,x0,1,1,"cds-icon",9),l.qZA()}if(2&d){const a=l.oxw(),g=l.MAs(6);l.xp6(1),l.Q6J("ngTemplateOutlet",g),l.xp6(1),l.Q6J("ngIf",a.sortDirection)}}function R0(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"clr-dg-string-filter",11),l.NdJ("clrFilterValueChange",function(_){l.CHM(a);const S=l.oxw();return l.KtG(S.filterValue=_)}),l.qZA()}if(2&d){const a=l.oxw();l.Q6J("clrFilterPlaceholder",a.filterStringPlaceholder)("clrDgStringFilter",a.registered)("clrFilterValue",a.filterValue)}}function e_(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"clr-dg-numeric-filter",12),l.NdJ("clrFilterValueChange",function(_){l.CHM(a);const S=l.oxw();return l.KtG(S.filterValue=_)}),l.qZA()}if(2&d){const a=l.oxw();l.Q6J("clrFilterMaxPlaceholder",a.filterNumberMaxPlaceholder)("clrFilterMinPlaceholder",a.filterNumberMinPlaceholder)("clrDgNumericFilter",a.registered)("clrFilterValue",a.filterValue)}}function P0(d,f){1&d&&l.Hsn(0,1)}function k0(d,f){1&d&&l.GkF(0)}function Ap(d,f){if(1&d&&(l.TgZ(0,"span",13),l.YNc(1,k0,1,0,"ng-container",8),l.qZA()),2&d){l.oxw();const a=l.MAs(6);l.xp6(1),l.Q6J("ngTemplateOutlet",a)}}function N0(d,f){1&d&&l._UZ(0,"clr-dg-column-separator")}const F0=[[["clr-dg-filter"],["clr-dg-string-filter"],["clr-dg-numeric-filter"]],"*"],L0=["clr-dg-filter, clr-dg-string-filter, clr-dg-numeric-filter","*"];function V0(d,f){1&d&&l._UZ(0,"div",4)}function B0(d,f){1&d&&l.Hsn(0,0,["*ngIf","emptyDatagrid"])}function Bo(d,f){if(1&d&&(l.ynx(0),l.TgZ(1,"button",1),l._UZ(2,"cds-icon",2),l.qZA(),l.BQk()),2&d){const a=l.oxw();l.xp6(2),l.uIk("title",a.commonStrings.keys.info)}}const Mp=["cellPortal"];function H0(d,f){1&d&&l.Hsn(0)}const t_=["rowPortal"];function j0(d,f){1&d&&l.Hsn(0)}const n_=["detailButton"],i_=["stickyCells"],Ud=["scrollableCells"],xp=["calculatedCells"];function ZE(d,f){}function r_(d,f){if(1&d&&(l.TgZ(0,"clr-expandable-animation",7),l.YNc(1,ZE,0,0,"ng-template",8),l.qZA()),2&d){const a=l.oxw(2),g=l.MAs(6);l.Q6J("clrExpandTrigger",a.expandAnimationTrigger),l.xp6(1),l.Q6J("ngTemplateOutlet",g)}}function s_(d,f){}function o_(d,f){if(1&d&&l.YNc(0,s_,0,0,"ng-template",8),2&d){l.oxw(2);const a=l.MAs(6);l.Q6J("ngTemplateOutlet",a)}}function a_(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",6),l.NdJ("mousedown",function(_){l.CHM(a);const S=l.oxw();return l.KtG(S.clearRanges(_))})("click",function(_){l.CHM(a);const S=l.oxw();return l.KtG(S.selectRow(!S.selected,_))}),l.YNc(1,r_,2,2,"clr-expandable-animation",1),l.YNc(2,o_,1,1,null,2),l.qZA()}if(2&d){const a=l.oxw();l.xp6(1),l.Q6J("ngIf",a.expand.expandable),l.xp6(1),l.Q6J("ngIf",!a.expand.expandable)}}function Op(d,f){}function ta(d,f){if(1&d&&(l.TgZ(0,"clr-expandable-animation",7),l.YNc(1,Op,0,0,"ng-template",8),l.qZA()),2&d){const a=l.oxw(),g=l.MAs(6);l.Q6J("clrExpandTrigger",a.expandAnimationTrigger),l.xp6(1),l.Q6J("ngTemplateOutlet",g)}}function z0(d,f){}function U0(d,f){if(1&d&&l.YNc(0,z0,0,0,"ng-template",8),2&d){l.oxw();const a=l.MAs(6);l.Q6J("ngTemplateOutlet",a)}}function Rp(d,f){1&d&&l.Hsn(0)}const l_=function(d){return{"clr-form-control-disabled":d}};function c_(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",19)(1,"clr-checkbox-wrapper")(2,"input",20),l.NdJ("ngModelChange",function(_){l.CHM(a);const S=l.oxw(2);return l.KtG(S.toggle(_))}),l.qZA(),l.TgZ(3,"label",21),l.NdJ("click",function(_){l.CHM(a);const S=l.oxw(2);return l.KtG(S.clearRanges(_))}),l.TgZ(4,"span",22),l._uU(5),l.qZA()()()()}if(2&d){const a=l.oxw(2);l.Q6J("ngClass",l.VKq(7,l_,!a.clrDgSelectable)),l.xp6(2),l.Q6J("ngModel",a.selected)("id",a.checkboxId)("disabled",!a.clrDgSelectable||null),l.uIk("aria-disabled",!a.clrDgSelectable||null),l.xp6(1),l.Q6J("for",a.checkboxId),l.xp6(2),l.Oqu(a.clrDgRowAriaLabel||a.commonStrings.keys.select)}}function $0(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",19)(1,"clr-radio-wrapper")(2,"input",23),l.NdJ("ngModelChange",function(_){l.CHM(a);const S=l.oxw(2);return l.KtG(S.selection.currentSingle=_)}),l.qZA(),l.TgZ(3,"label",24)(4,"span",22),l._uU(5),l.qZA()()()()}if(2&d){const a=l.oxw(2);l.Q6J("ngClass",l.VKq(10,l_,!a.clrDgSelectable)),l.xp6(2),l.Q6J("id",a.radioId)("name",a.selection.id+"-radio")("value",a.item)("ngModel",a.selection.currentSingle)("checked",a.selection.currentSingle===a.item)("disabled",!a.clrDgSelectable||null),l.uIk("aria-disabled",!a.clrDgSelectable||null),l.xp6(1),l.Q6J("for",a.radioId),l.xp6(2),l.Oqu(a.clrDgRowAriaLabel||a.commonStrings.keys.select)}}function $d(d,f){1&d&&(l.TgZ(0,"div",25),l.Hsn(1,2),l.qZA())}function ou(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",29),l.NdJ("click",function(){l.CHM(a);const _=l.oxw(4);return l.KtG(_.toggleExpand())}),l._UZ(1,"cds-icon",30),l.qZA()}if(2&d){const a=l.oxw(4);l.uIk("aria-expanded",a.expand.expanded)("aria-label",a.expand.expanded?a.clrDgDetailCloseLabel:a.clrDgDetailOpenLabel)("aria-controls",a.expandableId),l.xp6(1),l.uIk("direction",a.expand.expanded?"down":"right")("title",a.expand.expanded?a.commonStrings.keys.collapse:a.commonStrings.keys.expand)}}function u_(d,f){if(1&d&&(l.TgZ(0,"clr-spinner",31),l._uU(1),l.qZA()),2&d){const a=l.oxw(4);l.xp6(1),l.Oqu(a.commonStrings.keys.loading)}}function Gd(d,f){if(1&d&&(l.ynx(0),l.YNc(1,ou,2,5,"button",27),l.YNc(2,u_,2,1,"clr-spinner",28),l.BQk()),2&d){const a=l.oxw(3);l.xp6(1),l.Q6J("ngIf",!a.expand.loading),l.xp6(1),l.Q6J("ngIf",a.expand.loading)}}function QE(d,f){if(1&d&&(l.TgZ(0,"div",26),l.YNc(1,Gd,3,2,"ng-container",2),l.qZA()),2&d){const a=l.oxw(2);l.xp6(1),l.Q6J("ngIf",a.expand.expandable)}}function G0(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",32)(1,"button",33,34),l.NdJ("click",function(){l.CHM(a);const _=l.MAs(2),S=l.oxw(2);return l.KtG(S.detailService.toggle(S.item,_))}),l._UZ(3,"cds-icon",35),l.qZA()()}if(2&d){const a=l.oxw(2);l.xp6(1),l.ekj("is-open",a.detailService.isRowOpen(a.item)),l.uIk("aria-label",a.detailService.isRowOpen(a.item)?a.clrDgDetailCloseLabel:a.clrDgDetailOpenLabel)("aria-expanded",a.detailService.isOpen)("aria-controls",a.detailService.id),l.xp6(2),l.uIk("direction",a.detailService.isRowOpen(a.item)?"left":"right")("title",a.detailService.isRowOpen(a.item)?a.commonStrings.keys.close:a.commonStrings.keys.open)}}function d_(d,f){}function h_(d,f){if(1&d&&l.YNc(0,d_,0,0,"ng-template",8),2&d){l.oxw(2);const a=l.MAs(4);l.Q6J("ngTemplateOutlet",a)}}function Y0(d,f){}function W0(d,f){if(1&d&&l.YNc(0,Y0,0,0,"ng-template",8),2&d){l.oxw(2);const a=l.MAs(4);l.Q6J("ngTemplateOutlet",a)}}const f_=function(d){return{"is-replaced":d}};function p_(d,f){if(1&d&&(l.TgZ(0,"div",9)(1,"div",10),l.ynx(2,null,11),l.YNc(4,c_,6,9,"div",12),l.YNc(5,$0,6,12,"div",12),l.YNc(6,$d,2,0,"div",13),l.YNc(7,QE,2,1,"div",14),l.YNc(8,G0,4,7,"div",15),l.BQk(),l.qZA(),l.TgZ(9,"div",16)(10,"div",17),l.Hsn(11,1),l.GkF(12,null,18),l.qZA(),l.YNc(14,h_,1,1,null,2),l.YNc(15,W0,1,1,null,2),l.qZA()()),2&d){const a=l.oxw();l.ekj("datagrid-row-detail-open",a.detailService.isRowOpen(a.item)),l.Q6J("id",a.id),l.xp6(4),l.Q6J("ngIf",a.selection.selectionType===a.SELECTION_TYPE.Multi),l.xp6(1),l.Q6J("ngIf",a.selection.selectionType===a.SELECTION_TYPE.Single),l.xp6(1),l.Q6J("ngIf",a.rowActionService.hasActionableRow),l.xp6(1),l.Q6J("ngIf",a.globalExpandable.hasExpandableRow),l.xp6(1),l.Q6J("ngIf",a.detailService.enabled),l.xp6(1),l.Q6J("ngClass",l.VKq(11,f_,a.replaced&&a.expanded)),l.xp6(5),l.Q6J("ngIf",a.replaced&&!a.expand.loading),l.xp6(1),l.Q6J("ngIf",!a.replaced&&!a.expand.loading)}}const au=[[["clr-dg-row-detail"]],[["clr-dg-cell"]],[["clr-dg-action-overflow"]]],Z0=["clr-dg-row-detail","clr-dg-cell","clr-dg-action-overflow"],g_=["datagridTable"],m_=["scrollableColumns"],Q0=["projectedDisplayColumns"],q0=["projectedCalculationColumns"],lu=["displayedRows"],K0=["calculationRows"];function J0(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",24),l.NdJ("keydown.space",function(_){l.CHM(a);const S=l.oxw();return S.allSelected=!S.allSelected,l.KtG(_.preventDefault())}),l.TgZ(1,"div",25)(2,"input",26),l.NdJ("ngModelChange",function(_){l.CHM(a);const S=l.oxw();return l.KtG(S.allSelected=_)}),l.qZA(),l.TgZ(3,"label",27)(4,"span",28),l._uU(5),l.qZA()()(),l._UZ(6,"div",29),l.qZA()}if(2&d){const a=l.oxw();l.xp6(2),l.Q6J("id",a.selectAllId)("ngModel",a.allSelected),l.uIk("aria-label",a.commonStrings.keys.selectAll),l.xp6(1),l.Q6J("for",a.selectAllId),l.xp6(2),l.Oqu(a.commonStrings.keys.selectAll)}}function X0(d,f){if(1&d&&(l.TgZ(0,"div",30),l._UZ(1,"div",29),l.qZA()),2&d){const a=l.oxw();l.uIk("aria-label",a.clrDgSingleSelectionAriaLabel)}}function eS(d,f){if(1&d&&(l.TgZ(0,"div",31),l._UZ(1,"div",29),l.qZA()),2&d){const a=l.oxw();l.uIk("aria-label",a.clrDgSingleActionableAriaLabel)}}function tS(d,f){if(1&d&&(l.TgZ(0,"div",32),l._UZ(1,"div",29),l.qZA()),2&d){const a=l.oxw();l.uIk("aria-label",a.clrDetailExpandableAriaLabel)}}function nS(d,f){1&d&&l._UZ(0,"clr-dg-placeholder")}function iS(d,f){1&d&&(l.TgZ(0,"div",33)(1,"clr-spinner",34),l._uU(2,"Loading"),l.qZA()())}const rS=[[["clr-dg-action-bar"]],[["clr-dg-placeholder"]],[["clr-dg-footer"]],[["","clrIfDetail",""],["clr-dg-detail"]]],v_=["clr-dg-action-bar","clr-dg-placeholder","clr-dg-footer","[clrIfDetail],clr-dg-detail"],sS=["allSelected"];function Yd(d,f){}function oS(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"li")(1,"clr-checkbox-wrapper")(2,"input",13),l.NdJ("ngModelChange",function(_){const j=l.CHM(a).$implicit,J=l.oxw(2);return l.KtG(J.toggleColumnState(j,!_))}),l.qZA(),l.TgZ(3,"label"),l.YNc(4,Yd,0,0,"ng-template",14),l.qZA()()()}if(2&d){const a=f.$implicit,g=l.oxw(2);l.xp6(2),l.Q6J("disabled",g.hasOnlyOneVisibleColumn&&!a.hidden)("ngModel",!a.hidden),l.xp6(2),l.Q6J("ngTemplateOutlet",a.titleTemplateRef)}}function aS(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",2)(1,"div",3)(2,"div",4,5),l._uU(4),l.qZA(),l.TgZ(5,"h2"),l._uU(6),l.qZA(),l.TgZ(7,"button",6),l._UZ(8,"cds-icon",7),l.TgZ(9,"span",8),l._uU(10),l.qZA()()(),l.TgZ(11,"ul",9),l.YNc(12,oS,5,3,"li",10),l.qZA(),l.TgZ(13,"div",11)(14,"clr-dg-column-toggle-button",12),l.NdJ("clrAllSelected",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.allColumnsSelected())}),l.qZA()()()}if(2&d){const a=l.oxw();l.Q6J("id",a.popoverId),l.uIk("aria-label",a.commonStrings.keys.showColumnsMenuDescription),l.xp6(4),l.Oqu(a.commonStrings.keys.allColumnsSelected),l.xp6(2),l.Oqu(a.commonStrings.keys.showColumns),l.xp6(1),l.uIk("aria-label",a.commonStrings.keys.close),l.xp6(1),l.uIk("title",a.commonStrings.keys.close),l.xp6(2),l.Oqu(a.commonStrings.keys.close),l.xp6(2),l.Q6J("ngForOf",a.hideableColumnStates)("ngForTrackBy",a.trackByFn)}}function cS(d,f){if(1&d&&(l.ynx(0),l.TgZ(1,"div",1)(2,"clr-checkbox-wrapper",2),l._UZ(3,"input",3),l.TgZ(4,"label"),l._uU(5),l.qZA(),l.TgZ(6,"span",4),l._uU(7),l.qZA()()(),l.BQk()),2&d){const a=l.oxw();l.xp6(5),l.Oqu(a.selection.current.length),l.xp6(2),l.Oqu(a.commonStrings.keys.selectedRows)}}function uS(d,f){1&d&&l._UZ(0,"clr-dg-column-toggle")}function dS(d,f){if(1&d&&(l.ynx(0),l.YNc(1,uS,1,0,"clr-dg-column-toggle",0),l.TgZ(2,"div",5),l.Hsn(3,1),l.qZA(),l.BQk()),2&d){const a=l.oxw();l.xp6(1),l.Q6J("ngIf",a.hasHideableColumns)}}const __=[[["clr-dg-pagination"]],"*"],y_=["clr-dg-pagination","*"];function XE(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",3),l.NdJ("click",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.openNav(_.responsiveNavCodes.NAV_LEVEL_1))}),l._UZ(1,"span"),l.qZA()}if(2&d){const a=l.oxw();l.uIk("aria-label",a.responsiveNavCommonString)}}function vS(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",4),l.NdJ("click",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.openNav(_.responsiveNavCodes.NAV_LEVEL_2))}),l._UZ(1,"span"),l.qZA()}if(2&d){const a=l.oxw();l.uIk("aria-label",a.responsiveOverflowCommonString)}}function Qd(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",3),l.NdJ("click",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.toggleByButton())}),l._UZ(1,"cds-icon",4),l.qZA()}if(2&d){const a=l.oxw();l.ekj("on-collapse",a.collapsed),l.uIk("aria-expanded",a.ariaExpanded)("aria-label",a.commonStrings.keys.verticalNavToggle),l.xp6(1),l.uIk("direction",a.collapsed?"right":"left")}}function R_(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",5),l.NdJ("click",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.collapsed=!1)}),l.qZA()}if(2&d){const a=l.oxw();l.uIk("aria-label",a.commonStrings.keys.verticalNavToggle)}}const du=[[["","clrVerticalNavLink",""]],[["","clrVerticalNavIcon",""]],"*",[["","clrIfExpanded",""],["clr-vertical-nav-group-children"]]],P_=["[clrVerticalNavLink]","[clrVerticalNavIcon]","*","[clrIfExpanded], clr-vertical-nav-group-children"],DS=["clrVerticalNavLink",""],hu=[[["","clrVerticalNavIcon",""]],"*"],wS=["[clrVerticalNavIcon]","*"];let $p=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275dir=l.lG2({type:d,selectors:[["clr-icon"]]}),d})(),Pn=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275dir=l.lG2({type:d,selectors:[["cds-icon"]]}),d})(),kn=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();class wa{}var Sr=function(d){return d[d.DEFAULT=0]="DEFAULT",d[d.LOADING=1]="LOADING",d[d.SUCCESS=2]="SUCCESS",d[d.ERROR=3]="ERROR",d}(Sr||{});let Br=(()=>{class d{constructor(){this.expandable=0,this._loading=!1,this._expanded=!1,this._expandChange=new et.x}get loading(){return this._loading}set loading(a){(a=!!a)!==this._loading&&(this._loading=a)}get expanded(){return this._expanded}set expanded(a){(a=!!a)!==this._expanded&&(this._expanded=a,this._expandChange.next(a))}get expandChange(){return this._expandChange.asObservable()}toggle(){this.expanded=!this._expanded}loadingStateChange(a){this.loading=a===Sr.LOADING}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),LS=0;function dr(){return"clr-id-"+LS++}const Ks="0.2s ease-in-out",Qp=((0,P.X$)("skipInitialRender",[(0,P.eR)(":enter",[])]),(0,P.X$)("toggle",[(0,P.eR)("void => *",[(0,P.oB)({display:"block",height:0}),(0,P.jt)(Ks,(0,P.oB)({height:"*"}))])]),(0,P.X$)("skipInitialRender",[(0,P.eR)(":enter",[])]),(0,P.X$)("toggle",[(0,P.eR)("void => *",[(0,P.oB)({display:"block",height:0}),(0,P.jt)(Ks,(0,P.oB)({height:"*"}))]),(0,P.eR)("* => void",[(0,P.oB)({display:"block"}),(0,P.jt)(Ks,(0,P.oB)({height:0,display:"none"}))])]),{open:"Open",close:"Close",show:"Show",hide:"Hide",expand:"Expand",collapse:"Collapse",more:"More",select:"Select",selectAll:"Select All",previous:"Previous",next:"Next",current:"Jump to current",info:"Info",success:"Success",warning:"Warning",danger:"Error",rowActions:"Available actions",pickColumns:"Manage Columns",showColumns:"Show Columns",sortColumn:"Sort Column",firstPage:"First Page",lastPage:"Last Page",nextPage:"Next Page",previousPage:"Previous Page",currentPage:"Current Page",totalPages:"Total Pages",filterItems:"Filter items",minValue:"Min value",maxValue:"Max value",modalContentStart:"Beginning of Modal Content",modalContentEnd:"End of Modal Content",showColumnsMenuDescription:"Show or hide columns menu",allColumnsSelected:"All columns selected",signpostToggle:"Signpost Toggle",signpostClose:"Signpost Close",loading:"Loading",detailPaneStart:"Start of row details",detailPaneEnd:"End of row details",singleSelectionAriaLabel:"Single selection header",singleActionableAriaLabel:"Single actionable header",detailExpandableAriaLabel:"Toggle more row content",datagridFilterAriaLabel:"Toggle {COLUMN} filter",datagridFilterDialogAriaLabel:"Filter dialog",columnSeparatorAriaLabel:"Column resize handle",columnSeparatorDescription:"Use left or right key to resize the column",alertCloseButtonAriaLabel:"Close alert",alertNextAlertAriaLabel:"Next alert message, {CURRENT} of {COUNT}",alertPreviousAlertAriaLabel:"Previous alert message, {CURRENT} of {COUNT}",datepickerDialogLabel:"Choose date",datepickerToggleChooseDateLabel:"Choose date",datepickerToggleChangeDateLabel:"Change date, {SELECTED_DATE}",datepickerPreviousMonth:"Previous month",datepickerCurrentMonth:"Current month",datepickerNextMonth:"Next month",datepickerPreviousDecade:"Previous decade",datepickerNextDecade:"Next decade",datepickerCurrentDecade:"Current decade",datepickerSelectMonthText:"Select month, the current month is {CALENDAR_MONTH}",datepickerSelectYearText:"Select year, the current year is {CALENDAR_YEAR}",datepickerSelectedLabel:"{FULL_DATE} - Selected",stackViewChanged:"Value changed.",responsiveNavToggleOpen:"Open navigation menu",responsiveNavToggleClose:"Close navigation menu",responsiveNavOverflowOpen:"Open navigation overflow menu",responsiveNavOverflowClose:"Close navigation overflow menu",verticalNavToggle:"Toggle vertical navigation",timelineStepNotStarted:"Not started",timelineStepCurrent:"Current",timelineStepSuccess:"Completed",timelineStepError:"Error",timelineStepProcessing:"In progress",comboboxDelete:"Delete selected option",comboboxSearching:'Searching for matches for "{INPUT}"',comboboxSelection:"Selection",comboboxSelected:"Selected",comboboxNoResults:"No results",comboboxOpen:"Show options",datagridExpandableBeginningOf:"Beginning of",datagridExpandableEndOf:"End of",datagridExpandableRowContent:"Expandable row content",datagridExpandableRowsHelperText:"Screen reader table commands may not work for viewing expanded content, please use your screen reader's browse mode to read the content exposed by this button",wizardStepSuccess:"Completed",wizardStepError:"Error",wizardStepnavAriaLabel:"Step navigation",passwordHide:"Hide password",passwordShow:"Show password",selectedRows:"Selected rows"});let pn=(()=>{class d{constructor(){this._strings=Qp}get keys(){return this._strings}localize(a){this._strings={...this._strings,...a}}parse(a,g={}){const _=Object.keys(g);let S=a;return _.length&&_.forEach(j=>{S=S.replace(`{${j}}`,g[j])}),S}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"}),d})(),Za=(()=>{class d{constructor(){this.disableChocolateCheck=!1,this._chocolate=new et.x}get chocolate(){return this._chocolate.asObservable()}ngAfterViewChecked(){this.disableChocolateCheck||this._chocolate.next()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275dir=l.lG2({type:d}),d})(),Qa=(()=>{class d{constructor(a,g){this.subscription=g.chocolate.subscribe(()=>{this.latestFlavor!==this.flavor&&(g.disableChocolateCheck=!0,a.detectChanges(),g.disableChocolateCheck=!1)})}ngAfterContentChecked(){this.latestFlavor=this.flavor}ngOnDestroy(){this.subscription.unsubscribe()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.sBO),l.Y36(Za))},d.\u0275dir=l.lG2({type:d}),d})(),Jp=(()=>{class d{constructor(){Jt.addIcons(Yr,ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn]}),d})(),s1=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,Jp,Jp]}),d})();var At=function(d){return d.ArrowLeft="ArrowLeft",d.ArrowUp="ArrowUp",d.ArrowRight="ArrowRight",d.ArrowDown="ArrowDown",d.Backspace="Backspace",d.Tab="Tab",d.Enter="Enter",d.Escape="Escape",d.Space="Space",d.Spacebar=" ",d.Home="Home",d.End="End",d}(At||{}),Ka=function(d){return d.ArrowUp="Up",d.ArrowDown="Down",d.ArrowRight="Right",d.ArrowLeft="Left",d.Space="Spacebar",d.Escape="Esc",d}(Ka||{});function Fs(d){return d===At.ArrowUp||d===Ka.ArrowUp?At.ArrowUp:d===At.ArrowDown||d===Ka.ArrowDown?At.ArrowDown:d===At.ArrowRight||d===Ka.ArrowRight?At.ArrowRight:d===At.ArrowLeft||d===Ka.ArrowLeft?At.ArrowLeft:d===At.Space||d===Ka.Space?At.Space:d===At.Escape||d===Ka.Escape?At.Escape:d}let mi=(()=>{class d{constructor(){this._open=!1,this._openChange=new et.x,this._openEventChange=new et.x,this._popoverAligned=new et.x,this._popoverVisible=new et.x}get openChange(){return this._openChange.asObservable()}get popoverVisible(){return this._popoverVisible.asObservable()}get openEvent(){return this._openEvent}set openEvent(a){this._openEvent=a,this._openEventChange.next(a)}get open(){return this._open}set open(a){this._open!==(a=!!a)&&(this._open=a,this._openChange.next(a))}get originalEvent(){return this._openEvent}get popoverAligned(){return this._popoverAligned.asObservable()}getEventChange(){return this._openEventChange.asObservable()}toggleWithEvent(a){(function rg(d){const f=Fs(d.key);(f===At.ArrowUp||f===At.ArrowDown||f===At.ArrowLeft||f===At.ArrowRight)&&d.preventDefault()})(a),this.openEvent=a,this.open=!this.open}popoverVisibleEmit(a){this._popoverVisible.next(a)}popoverAlignedEmit(a){this._popoverAligned.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),fu=(()=>{class d{constructor(a,g,_){this.renderer=a,this.smartOpenService=g,this.document=_,this.outsideClickClose=!0,this.scrollToClose=!0,this.subscriptions=[],this.subscriptions.push(g.openChange.subscribe(S=>{S?(this.addEscapeListener(),this.addClickListener(),this.addScrollListener()):this.removeAllEventListeners()}),g.getEventChange().subscribe(S=>{this.ignoredEvent=S}))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe()),this.removeAllEventListeners()}addScrollListener(){this.scrollToClose&&(this.documentScroller=(0,ki.R)(this.document,"scroll",{capture:!0}),this.scrollSubscription=this.documentScroller.pipe((0,Ln.h)(this.testForSmartPopoverContentContainer)).subscribe(()=>{this.smartOpenService.open=!1,this.setAnchorFocus()}))}removeScrollListener(){this.documentScroller&&(this.scrollSubscription.unsubscribe(),delete this.documentScroller)}addClickListener(){this.outsideClickClose&&(this.documentClickListener=this.renderer.listen(this.document,"click",a=>{a===this.ignoredEvent?delete this.ignoredEvent:(this.smartOpenService.open=!1,a.target.focus())}))}removeClickListener(){this.outsideClickClose&&(delete this.ignoredEvent,this.documentClickListener&&(this.documentClickListener(),delete this.documentClickListener))}addEscapeListener(){this.escapeListener=this.renderer.listen(this.document,"keydown.escape",()=>{this.smartOpenService.open=!1,this.setAnchorFocus()})}removeEscapeListener(){this.escapeListener&&(this.escapeListener(),delete this.escapeListener)}setCloseFocus(){this.closeButtonRef.nativeElement.focus()}setAnchorFocus(){this.anchorButtonRef.nativeElement.focus()}testForSmartPopoverContentContainer(a){let g=a.target;for(;g.classList&&"body"!==g.parentElement.localName;)g=g.parentElement;return!!g.classList&&!g.classList.contains("clr-popover-content")}removeAllEventListeners(){this.removeScrollListener(),this.removeClickListener(),this.removeEscapeListener()}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.Qsj),l.LFG(mi),l.LFG(k.K0))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),pu=(()=>{class d{constructor(a,g){a.anchorButtonRef=g}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(fu),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrPopoverAnchor",""]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("clr-anchor",!0)}}),d})(),sg=(()=>{class d{constructor(a,g,_){this.elementRef=a,this.smartEventsService=g,this.smartOpenService=_,this.closeChange=new l.vpe,this.subscriptions=[],this.subscriptions.push(_.openChange.pipe((0,Ln.h)(S=>!S)).subscribe(()=>{this.closeChange.next()}))}handleClick(a){this.smartOpenService.toggleWithEvent(a),this.smartEventsService.setAnchorFocus()}ngAfterViewInit(){this.smartEventsService.closeButtonRef=this.elementRef,this.smartEventsService.setCloseFocus()}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(fu),l.Y36(mi))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrPopoverCloseButton",""]],hostVars:2,hostBindings:function(a,g){1&a&&l.NdJ("click",function(S){return g.handleClick(S)}),2&a&&l.ekj("clr-smart-close-button",!0)},outputs:{closeChange:"clrPopoverOnCloseChange"}}),d})();var Hr=function(d){return d[d.VERTICAL=0]="VERTICAL",d[d.HORIZONTAL=1]="HORIZONTAL",d}(Hr||{}),bn=function(d){return d[d.START=0]="START",d[d.CENTER=.5]="CENTER",d[d.END=1]="END",d}(bn||{}),ec=function(d){return d[d.BOTTOM=0]="BOTTOM",d[d.LEFT=1]="LEFT",d[d.RIGHT=2]="RIGHT",d[d.TOP=3]="TOP",d}(ec||{});const Ls=d=>({...d,side:-1*d.side}),na=(d,f)=>{const a=d.content+(f?.5:-.5);return a<0||a>1?d:{...d,content:a}};function Ja(d,f,a){return g=>f(d(g),a)}function Vs(d,f,a){let g=f.left,_=f.top;switch(d.axis+d.side){case-1:g+=og(d,f,a),_-=a.height;break;case 1:g+=og(d,f,a),_+=f.height;break;case 0:g-=a.width,_+=HS(d,f,a);break;case 2:g+=f.width,_+=HS(d,f,a)}return{xOffset:g,yOffset:_}}function og(d,f,a){let g=0;switch(d.anchor){case bn.START:break;case bn.CENTER:g+=f.width/2;break;case bn.END:g+=f.width}switch(d.content){case bn.START:break;case bn.CENTER:g-=a.width/2;break;case bn.END:g-=a.width}return g}function HS(d,f,a){let g=0;switch(d.anchor){case bn.START:break;case bn.CENTER:g+=f.height/2;break;case bn.END:g+=f.height}switch(d.content){case bn.START:break;case bn.CENTER:g-=a.height/2;break;case bn.END:g-=a.height}return g}let ih=(()=>{class d{constructor(a,g){this.eventService=a,this.platformId=g,this._shouldRealign=new et.x,this.shouldRealign=this._shouldRealign.asObservable()}realign(){this._shouldRealign.next()}alignContent(a){if(!(0,k.NF)(this.platformId))return{xOffset:0,yOffset:0};this.currentAnchorCoords=this.eventService.anchorButtonRef.nativeElement.getBoundingClientRect(),this.currentContentCoords=a.getBoundingClientRect(),this.contentOffsets=Vs(this.position,this.currentAnchorCoords,this.currentContentCoords);const g=function ag(d,f){const a=[],g_bottom=d.yOffset+f.height,g_left=d.xOffset,g_right=d.xOffset+f.width;return d.yOffset>=0||a.push(ec.TOP),g_left>=0||a.push(ec.LEFT),g_bottom<=(window.innerHeight||document.documentElement.clientHeight)||a.push(ec.BOTTOM),g_right<=(window.innerWidth||document.documentElement.clientWidth)||a.push(ec.RIGHT),a}(this.contentOffsets,this.currentContentCoords),_=g.reduce((S,j)=>S+j,0);return 1===g.length&&this.position.axis===Hr.VERTICAL?this.handleVerticalAxisOneViolation(_):1===g.length&&this.position.axis===Hr.HORIZONTAL?this.handleHorizontalAxisOneViolation(_):2===g.length&&this.position.axis===Hr.VERTICAL?this.handleVerticalAxisTwoViolations(_):2===g.length&&this.position.axis===Hr.HORIZONTAL&&this.handleHorizontalAxisTwoViolations(_),this.currentContentCoords.top<0&&(this.contentOffsets.yOffset+=Math.abs(this.currentContentCoords.top)),this.contentOffsets}handleVerticalAxisOneViolation(a){switch(a){case 0:case 3:this.contentOffsets=Vs(Ls(this.position),this.currentAnchorCoords,this.currentContentCoords);break;case 1:this.contentOffsets=Vs(this.position,this.currentAnchorCoords,this.currentContentCoords),this.contentOffsets.xOffset<0&&(this.contentOffsets.xOffset=10);break;case 2:this.contentOffsets=Vs(na(this.position,!0),this.currentAnchorCoords,this.currentContentCoords)}}handleVerticalAxisTwoViolations(a){switch(a){case 5:{const g=Ja(Ls,na,!0);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}case 4:{const g=Ja(Ls,na,!1);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}case 3:default:break;case 2:{const g=Ja(Ls,na,!0);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}case 1:{const g=Ja(Ls,na,!1);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}}}handleHorizontalAxisOneViolation(a){switch(a){case 1:case 2:this.contentOffsets=Vs(Ls(this.position),this.currentAnchorCoords,this.currentContentCoords);break;case 0:this.contentOffsets=Vs(na(this.position,!0),this.currentAnchorCoords,this.currentContentCoords);break;case 3:this.contentOffsets=Vs(na(this.position),this.currentAnchorCoords,this.currentContentCoords)}}handleHorizontalAxisTwoViolations(a){switch(a){case 5:case 4:{const g=Ja(Ls,na,!1);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}case 3:default:break;case 2:case 1:{const g=Ja(Ls,na,!0);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}}}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(fu),l.LFG(l.Lbi))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),ms=(()=>{class d{constructor(a,g,_,S,j,J,te){this.document=a,this.container=g,this.template=_,this.renderer=S,this.smartPositionService=j,this.smartEventsService=J,this.smartOpenService=te,this.subscriptions=[],this.removeClickListenerFn=null,this.shouldRealign=!1,this.checkCollector=new l.vpe}set open(a){this.smartOpenService.open=!!a}set contentAt(a){this.smartPositionService.position=a}set outsideClickClose(a){this.smartEventsService.outsideClickClose=!!a}set scrollToClose(a){this.smartEventsService.scrollToClose=!!a}ngAfterContentChecked(){this.smartOpenService.open&&this.view&&this.shouldRealign&&this.checkCollector.emit()}ngAfterViewInit(){this.subscriptions.push(this.smartOpenService.openChange.subscribe(a=>{a?this.addContent():this.removeContent()}),this.smartPositionService.shouldRealign.subscribe(()=>{this.shouldRealign=!0}),this.checkCollector.pipe((0,Zn.b)(0)).subscribe(()=>{this.alignContent(),this.shouldRealign=!1,this.view&&(this.renderer.setStyle(this.view.rootNodes[0],"opacity","1"),this.smartOpenService.popoverVisibleEmit(!0))}))}ngOnDestroy(){this.removeContent(),this.subscriptions.forEach(a=>a.unsubscribe())}addContent(){this.view=this.container.createEmbeddedView(this.template);const[a]=this.view.rootNodes;this.smartEventsService.contentRef=a,this.renderer.addClass(a,"clr-popover-content"),this.renderer.setStyle(a,"top","0px"),this.renderer.setStyle(a,"left","0px"),this.renderer.setStyle(a,"opacity","0"),this.removeClickListenerFn=this.renderer.listen(a,"click",g=>{this.smartOpenService.openEvent=g}),this.view.rootNodes.forEach(g=>{this.renderer.appendChild(this.document.body,g)}),this.shouldRealign=!0}removeContent(){this.view&&(this.removeClickListenerFn&&(this.removeClickListenerFn(),this.removeClickListenerFn=null),this.view.rootNodes.forEach(a=>this.renderer.removeChild(this.document.body,a)),this.container.clear(),delete this.view,this.smartOpenService.popoverVisibleEmit(!1))}alignContent(){if(!this.view)return;const a=this.smartPositionService.alignContent(this.view.rootNodes[0]);this.renderer.setStyle(this.view.rootNodes[0],"top",`${a.yOffset}px`),this.renderer.setStyle(this.view.rootNodes[0],"left",`${a.xOffset}px`),this.smartOpenService.popoverAlignedEmit(this.view.rootNodes[0])}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(k.K0),l.Y36(l.s_b),l.Y36(l.Rgc),l.Y36(l.Qsj),l.Y36(ih),l.Y36(fu),l.Y36(mi))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrPopoverContent",""]],inputs:{open:["clrPopoverContent","open"],contentAt:["clrPopoverContentAt","contentAt"],outsideClickClose:["clrPopoverContentOutsideClickToClose","outsideClickClose"],scrollToClose:["clrPopoverContentScrollToClose","scrollToClose"]}}),d})(),gu=(()=>{class d{constructor(a){this.smartOpenService=a,this.openCloseChange=new l.vpe,this.subscriptions=[],this.subscriptions.push(this.smartOpenService.openChange.subscribe(g=>{this.openCloseChange.next(g)}))}handleClick(a){this.smartOpenService.toggleWithEvent(a)}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(mi))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrPopoverOpenCloseButton",""]],hostVars:2,hostBindings:function(a,g){1&a&&l.NdJ("click",function(S){return g.handleClick(S)}),2&a&&l.ekj("clr-smart-open-close",!0)},outputs:{openCloseChange:"clrPopoverOpenCloseChange"}}),d})(),tc=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({}),d})();var vs=function(d){return d.UP="up",d.DOWN="down",d.LEFT="left",d.RIGHT="right",d}(vs||{});let bo=class{constructor(f){this.renderer=f,this._unlistenFuncs=[]}get current(){return this._current}reset(f){this._current=f}listenToArrowKeys(f){this._unlistenFuncs.push(this.renderer.listen(f,"keydown.arrowup",()=>!this.move(vs.UP))),this._unlistenFuncs.push(this.renderer.listen(f,"keydown.arrowdown",()=>!this.move(vs.DOWN))),this._unlistenFuncs.push(this.renderer.listen(f,"keydown.arrowleft",()=>!this.move(vs.LEFT))),this._unlistenFuncs.push(this.renderer.listen(f,"keydown.arrowright",()=>!this.move(vs.RIGHT)))}registerContainer(f,a="0"){this.renderer.setAttribute(f,"tabindex",a),this.listenToArrowKeys(f),this._unlistenFuncs.push(this.renderer.listen(f,"keydown.space",()=>!this.activateCurrent())),this._unlistenFuncs.push(this.renderer.listen(f,"keydown.enter",()=>!this.activateCurrent()))}moveTo(f){void 0!==f&&(this.current&&this.current.blur(),f.focus(),this._current=f)}move(f){let a=!1;if(this.current){const g=this.current[f];g&&((0,ao.b)(g)?g:(0,es.of)(g)).subscribe(S=>{S&&(this.moveTo(S),a=!0)})}return a}activateCurrent(){return!(!this.current||!this.current.activate||(this.current.activate(),0))}detachListeners(){this._unlistenFuncs.forEach(f=>f())}};bo.\u0275fac=function(f){return new(f||bo)(l.LFG(l.Qsj))},bo.\u0275prov=l.Yz7({token:bo,factory:bo.\u0275fac}),new l.FiY,new l.tp0;var no=function(d){return d[d.BEFORE=-1]="BEFORE",d[d.AFTER=1]="AFTER",d}(no||{});class _s{}_s["top-right"]={axis:Hr.VERTICAL,side:no.BEFORE,anchor:bn.END,content:bn.END},_s["top-left"]={axis:Hr.VERTICAL,side:no.BEFORE,anchor:bn.START,content:bn.START},_s["bottom-right"]={axis:Hr.VERTICAL,side:no.AFTER,anchor:bn.END,content:bn.END},_s["bottom-left"]={axis:Hr.VERTICAL,side:no.AFTER,anchor:bn.START,content:bn.START},_s["right-top"]={axis:Hr.HORIZONTAL,side:no.AFTER,anchor:bn.CENTER,content:bn.END},_s["right-bottom"]={axis:Hr.HORIZONTAL,side:no.AFTER,anchor:bn.START,content:bn.START},_s["left-top"]={axis:Hr.HORIZONTAL,side:no.BEFORE,anchor:bn.CENTER,content:bn.END},_s["left-bottom"]={axis:Hr.HORIZONTAL,side:no.BEFORE,anchor:bn.START,content:bn.START};const nc=new l.OlP("POPOVER_HOST_ANCHOR");let mu=(()=>{class d{constructor(a){this.toggleService=a,this.lastOpenChange=null}ngOnInit(){this.subscription=this.toggleService.openChange.subscribe(a=>{this.lastOpenChange=a})}ngOnDestroy(){this.subscription?.unsubscribe()}onEscapeKey(a){null!==this.lastOpenChange&&(!1===this.lastOpenChange&&a.stopPropagation(),this.lastOpenChange=null)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(mi))},d.\u0275dir=l.lG2({type:d,hostBindings:function(a,g){1&a&&l.NdJ("keyup.escape",function(S){return g.onEscapeKey(S)})},standalone:!0}),d})(),ia=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275dir=l.lG2({type:d,standalone:!0,features:[l._Bn([mi,fu,ih,{provide:nc,useExisting:l.SBq}]),l.zW0([mu])]}),d})();class rh{static linkParent(f,a,g){f.forEach(_=>_[g]=a)}static linkVertical(f,a=!0){f.forEach((g,_)=>{_>0&&(g.up=f[_-1]),_1&&(f[0].up=f[f.length-1],f[f.length-1].down=f[0])}}let jo=(()=>{class d{userDefinedWidth(a){a.classList.add("datagrid-cell-width-zero");const g=this.clientRect(a).width;return a.classList.remove("datagrid-cell-width-zero"),g}scrollBarWidth(a){return a.offsetWidth-a.clientWidth}scrollWidth(a){return a.scrollWidth||0}computedHeight(a){return parseInt(getComputedStyle(a).getPropertyValue("height"),10)}clientRect(a){const g=a.getBoundingClientRect();return{top:parseInt(g.top,10),bottom:parseInt(g.bottom,10),left:parseInt(g.left,10),right:parseInt(g.right,10),width:parseInt(g.width,10),height:parseInt(g.height,10)}}minWidth(a){return parseInt(getComputedStyle(a).getPropertyValue("min-width"),10)}focus(a){a.focus()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),vu=(()=>{class d{constructor(a,g){this.element=a,this.domAdapter=g,this.startHeight=0}get expandAnimation(){return{value:this.clrExpandTrigger,params:{startHeight:this.startHeight}}}animationDone(){this.updateStartHeight()}updateStartHeight(){this.startHeight=this.domAdapter.computedHeight(this.element.nativeElement)||0}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(jo))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-expandable-animation"]],hostVars:1,hostBindings:function(a,g){1&a&&l.WFA("@expandAnimation.done",function(){return g.animationDone()}),2&a&&l.d8E("@expandAnimation",g.expandAnimation)},inputs:{clrExpandTrigger:"clrExpandTrigger"},features:[l._Bn([jo])],ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},styles:["[_nghost-%COMP%]{display:block;overflow:hidden}"],data:{animation:[(0,P.X$)("expandAnimation",[(0,P.eR)("true <=> false",[(0,P.oB)({height:"{{startHeight}}px"}),(0,P.jt)("0.2s ease-in-out",(0,P.oB)({height:"*"}))])])]}}),d})(),cg=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();new l.OlP("IF_ACTIVE_ID");let dg=(()=>{class d{constructor(a,g,_){this.toggleService=a,this.template=g,this.container=_,this.openChange=new l.vpe(!1),this.subscription=this.toggleService.openChange.subscribe(S=>{this.updateView(S),this.openChange.emit(S)})}get open(){return this.toggleService.open}set open(a){this.toggleService.open=a}ngOnDestroy(){this.subscription.unsubscribe()}updateView(a){a?this.container.createEmbeddedView(this.template):this.container.clear()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(mi),l.Y36(l.Rgc),l.Y36(l.s_b))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrIfOpen",""]],inputs:{open:["clrIfOpen","open"]},outputs:{openChange:"clrIfOpenChange"}}),d})(),Bs=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();const ZS={provide:new l.OlP("FOCUS_ON_VIEW_INIT"),useValue:!0};let oh=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({providers:[ZS],imports:[k.ez]}),d})(),W_=(()=>{class d extends gf{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275dir=l.lG2({type:d,standalone:!0,features:[l.qOj]}),d})(),qS=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,tc]}),d})(),JS=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})(),XS=(()=>{class d{constructor(){Jt.addIcons(Ao)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[JS,qS]}),d})(),eD=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["ng-component"]],decls:0,vars:0,template:function(a,g){},encapsulation:2}),d})(),ah=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({}),d})(),tD=0,ys=(()=>{class d{constructor(){this._id="clr-form-control-"+ ++tD,this._idChange=new fn.X(this._id)}get id(){return this._id}set id(a){this._id=a,this._idChange.next(a)}get idChange(){return this._idChange.asObservable()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Q_=0,Xa=(()=>{class d{constructor(){this._id="clr-form-container-"+ ++Q_,this._idChange=new fn.X(this._id)}get id(){return this._id}set id(a){this._id=a,this._idChange.next(a)}get idChange(){return this._idChange.asObservable()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();let lh=(()=>{class d{constructor(a,g){this.controlIdService=a,this.containerIdService=g,this.controlIdSuffix="abstract"}get id(){return this.containerIdService?`${this.containerIdService.id}-${this.controlIdSuffix}`:this.controlIdService?`${this.controlIdService.id}-${this.controlIdSuffix}`:null}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ys,8),l.Y36(Xa,8))},d.\u0275dir=l.lG2({type:d}),d})(),q_=(()=>{class d extends lh{constructor(a,g){super(a,g),this.controlIdService=a,this.containerIdService=g,this.controlIdSuffix="error"}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ys,8),l.Y36(Xa,8))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-control-error"]],hostVars:3,hostBindings:function(a,g){2&a&&(l.uIk("id",g.id),l.ekj("clr-subtext",!0))},features:[l.qOj],ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),fg=(()=>{class d extends lh{constructor(a,g){super(a,g),this.controlIdService=a,this.containerIdService=g,this.controlIdSuffix="helper"}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ys,8),l.Y36(Xa,8))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-control-helper"]],hostVars:3,hostBindings:function(a,g){2&a&&(l.uIk("id",g.id),l.ekj("clr-subtext",!0))},features:[l.qOj],ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),Cs=(()=>{class d{constructor(){this._controlChanges=new et.x,this._helpers=new et.x}get controlChanges(){return this._controlChanges.asObservable()}get helpersChange(){return this._helpers.asObservable()}setControl(a){this._controlChanges.next(a)}setHelpers(a){this._helpers.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();var rs=function(d){return d.NONE="NONE",d.VALID="VALID",d.INVALID="INVALID",d}(rs||{});let Hs=(()=>{class d{constructor(a){this.ngControlService=a,this.subscriptions=[],this._statusChanges=new fn.X(rs.NONE),this.subscriptions.push(this.ngControlService.controlChanges.subscribe(g=>{g&&(this.control=g,this.subscriptions.push(this.control.statusChanges.subscribe(()=>{this.triggerStatusChange()})))}))}get statusChanges(){return this._statusChanges.asObservable()}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}triggerStatusChange(){if(this.control){const a=rs[this.control.status];this._statusChanges.next(["VALID","INVALID"].includes(a)?a:rs.NONE)}}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(Cs))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();var sa=function(d){return d.VERTICAL="vertical",d.HORIZONTAL="horizontal",d.COMPACT="compact",d}(sa||{});let jr=(()=>{class d{constructor(){this.minLabelSize=1,this.maxLabelSize=12,this.layout=sa.HORIZONTAL,this.layoutValues=Object.keys(sa).map(a=>sa[a]),this._labelSize=2}get labelSize(){return this._labelSize}set labelSize(a){this.labelSizeIsValid(a)&&(this._labelSize=a)}get layoutClass(){return`clr-form-${this.layout}`}isVertical(){return this.layout===sa.VERTICAL}isHorizontal(){return this.layout===sa.HORIZONTAL}isCompact(){return this.layout===sa.COMPACT}isValid(a){return this.layoutValues.indexOf(a)>-1}labelSizeIsValid(a){return Number.isInteger(a)&&a>=this.minLabelSize&&a<=this.maxLabelSize}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Ir=(()=>{class d{constructor(a,g,_,S,j){this.controlIdService=a,this.layoutService=g,this.ngControlService=_,this.renderer=S,this.el=j,this.enableGrid=!0,this.subscriptions=[]}get labelText(){return this.el.nativeElement&&this.el.nativeElement.textContent}ngOnInit(){(this.controlIdService||this.ngControlService)&&this.renderer.addClass(this.el.nativeElement,"clr-control-label"),this.enableGrid&&this.layoutService&&!this.layoutService.isVertical()&&this.el.nativeElement&&this.el.nativeElement.className.indexOf("clr-col")<0&&(this.renderer.addClass(this.el.nativeElement,"clr-col-12"),this.renderer.addClass(this.el.nativeElement,`clr-col-md-${this.layoutService.labelSize}`)),this.controlIdService&&!this.forAttr&&this.subscriptions.push(this.controlIdService.idChange.subscribe(a=>this.forAttr=a))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}disableGrid(){this.enableGrid=!1}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ys,8),l.Y36(jr,8),l.Y36(Cs,8),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["label"]],hostVars:1,hostBindings:function(a,g){2&a&&l.uIk("for",g.forAttr)},inputs:{forAttr:["for","forAttr"]}}),d})(),nD=(()=>{class d extends lh{constructor(a,g){super(a,g),this.controlIdService=a,this.containerIdService=g,this.controlIdSuffix="success"}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ys,8),l.Y36(Xa,8))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-control-success"]],hostVars:3,hostBindings:function(a,g){2&a&&(l.uIk("id",g.id),l.ekj("clr-subtext",!0))},features:[l.qOj],ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),js=(()=>{class d{constructor(a){this.layoutService=a,this.className=""}controlClass(a=rs.NONE,g=!1,_=""){const S=[this.className,_];switch(a){case rs.VALID:S.push("clr-success");break;case rs.INVALID:S.push("clr-error")}return g&&this.layoutService&&-1===this.className.indexOf("clr-col")&&S.push(`clr-col-md-${this.layoutService.maxLabelSize-this.layoutService.labelSize} clr-col-12`),S.join(" ").trim()}initControlClass(a,g){g&&g.className&&(this.className=g.className,g.className.split(" ").forEach(S=>{S.startsWith("clr-col")&&a.removeClass(g,S)}))}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(jr,8))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),ch=(()=>{class d{constructor(a,g,_,S){this.ifControlStateService=a,this.layoutService=g,this.controlClassService=_,this.ngControlService=S,this._dynamic=!1,this.subscriptions=[],this.subscriptions.push(this.ifControlStateService.statusChanges.subscribe(j=>{this.state=j,this.updateHelpers()})),this.subscriptions.push(this.ngControlService.controlChanges.subscribe(j=>{this.control=j}))}get showHelper(){return!!this.controlHelperComponent&&(!!this.controlHelperComponent&&(!this.touched||this.state===rs.NONE)||!this.controlSuccessComponent&&this.state===rs.VALID||!this.controlErrorComponent&&this.state===rs.INVALID)}get showValid(){return this.touched&&this.state===rs.VALID&&!!this.controlSuccessComponent}get showInvalid(){return this.touched&&this.state===rs.INVALID&&!!this.controlErrorComponent}get touched(){return this.control?.touched}ngAfterContentInit(){this.updateHelpers()}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}controlClass(){return this.controlClassService.controlClass(!this.controlSuccessComponent&&this.state===rs.VALID||!this.touched?rs.NONE:this.state,this.addGrid())}addGrid(){return this.layoutService&&!this.layoutService.isVertical()}updateHelpers(){this.ngControlService&&this.ngControlService.setHelpers({show:this.showInvalid||this.showHelper||this.showValid,showInvalid:this.showInvalid,showHelper:this.showHelper,showValid:this.showValid})}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Hs),l.Y36(jr,8),l.Y36(js),l.Y36(Cs))},d.\u0275dir=l.lG2({type:d,contentQueries:function(a,g,_){if(1&a&&(l.Suo(_,Ir,5),l.Suo(_,nD,5),l.Suo(_,q_,5),l.Suo(_,fg,5)),2&a){let S;l.iGM(S=l.CRH())&&(g.label=S.first),l.iGM(S=l.CRH())&&(g.controlSuccessComponent=S.first),l.iGM(S=l.CRH())&&(g.controlErrorComponent=S.first),l.iGM(S=l.CRH())&&(g.controlHelperComponent=S.first)}}}),d})();class _u{constructor(f,a,g=0){if(this.injector=a.injector,!this.injector.get(f,null)){const _=this.injector.get(l._Vd),S=this.injector.get(l.SBq);a.createComponent(_.resolveComponentFactory(eD));const j=_.resolveComponentFactory(f),J=[];J[g]=[S.nativeElement];const te=a.createComponent(j,void 0,void 0,J);a.remove(0),te.instance._dynamic=!0,this.injector=te.injector}}get(f,a){return this.injector.get(f,a)}}let K_=(()=>{class d{constructor(){this._touched=new et.x}get touchedChange(){return this._touched.asObservable()}markAsTouched(){this._touched.next()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),So=(()=>{class d{constructor(a,g,_,S,j,J){this.vcr=a,this.wrapperType=g,this.ngControl=S,this.index=0,this.subscriptions=[],this.renderer=j,this.el=J,_&&(this.ngControlService=_.get(Cs,null),this.ifControlStateService=_.get(Hs,null),this.controlClassService=_.get(js,null),this.markControlService=_.get(K_,null)),this.controlClassService&&this.controlClassService.initControlClass(j,J.nativeElement),this.markControlService&&this.subscriptions.push(this.markControlService.touchedChange.subscribe(()=>{this.markAsTouched()})),this.ngControlService&&this.subscriptions.push(this.ngControlService.helpersChange.subscribe(te=>{this.setAriaDescribedBy(te)}))}get id(){return this._id}set id(a){this._id=a,this.controlIdService&&(this.controlIdService.id=a)}ngOnInit(){this._containerInjector=new _u(this.wrapperType,this.vcr,this.index),this.controlIdService=this._containerInjector.get(ys),this.containerIdService=this._containerInjector.get(Xa,null),this._id?this.controlIdService.id=this._id:this._id=this.controlIdService.id,this.ngControlService&&this.ngControlService.setControl(this.ngControl)}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}triggerValidation(){this.ifControlStateService&&this.ifControlStateService.triggerStatusChange()}getProviderFromContainer(a,g){try{return this._containerInjector.get(a,g)}catch{return g}}markAsTouched(){this.ngControl.control.markAsTouched(),this.ngControl.control.updateValueAndValidity()}setAriaDescribedBy(a){if(a.show){const g=this.getAriaDescribedById(a);if(null!==g)return void this.renderer.setAttribute(this.el.nativeElement,"aria-describedby",g)}this.renderer.removeAttribute(this.el.nativeElement,"aria-describedby")}getAriaDescribedById(a){let g="helper";return a.showInvalid?g="error":a.showValid&&(g="success"),this.containerIdService?this.containerIdService.id.concat("-",g):this.controlIdService?this.controlIdService.id.concat("-",g):null}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.DyG),l.Y36(l.zs3),l.Y36(Y.a5),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,hostVars:1,hostBindings:function(a,g){1&a&&l.NdJ("blur",function(){return g.triggerValidation()}),2&a&&l.Ikx("id",g.id)},inputs:{id:"id"}}),d})(),rD=(()=>{class d{constructor(a,g){this.layoutService=a,this.markControlService=g}set labelSize(a){const g=parseInt(a,10)||2;this.layoutService.labelSize=g}onFormSubmit(){this.markAsTouched()}markAsTouched(){this.markControlService.markAsTouched()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(jr),l.Y36(K_))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrForm",""]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Ir,5),2&a){let S;l.iGM(S=l.CRH())&&(g.labels=S)}},hostVars:6,hostBindings:function(a,g){1&a&&l.NdJ("submit",function(){return g.onFormSubmit()}),2&a&&l.ekj("clr-form",!0)("clr-form-horizontal",g.layoutService.isHorizontal())("clr-form-compact",g.layoutService.isCompact())},inputs:{labelSize:["clrLabelSize","labelSize"]},features:[l._Bn([jr,K_])]}),d})(),uh=(()=>{class d{constructor(a){this.layoutService=a}ngOnInit(){this.layout&&this.layoutService.isValid(this.layout)&&(this.layoutService.layout=this.layout)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(jr))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrForm","","clrLayout",""]],inputs:{layout:["clrLayout","layout"]}}),d})(),Wi=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn]}),d})();const zr=new l.OlP("IS_TOGGLE"),J_={provide:zr,useFactory:function y1(){return new fn.X(!1)}};let sc=(()=>{class d{constructor(a){this._dynamic=!1,this.toggle=!1,this.subscriptions=[],this.subscriptions.push(a.subscribe(g=>{this.toggle=g}))}ngOnInit(){this.label&&this.label.disableGrid()}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(zr))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-checkbox-wrapper"],["clr-toggle-wrapper"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Ir,7),2&a){let S;l.iGM(S=l.CRH())&&(g.label=S.first)}},hostVars:4,hostBindings:function(a,g){2&a&&l.ekj("clr-checkbox-wrapper",!g.toggle)("clr-toggle-wrapper",g.toggle)},features:[l._Bn([ys,J_])],ngContentSelectors:Kb,decls:3,vars:1,consts:[[4,"ngIf"]],template:function(a,g){1&a&&(l.F$t(bE),l.Hsn(0),l.Hsn(1,1),l.YNc(2,Tv,1,0,"label",0)),2&a&&(l.xp6(2),l.Q6J("ngIf",!g.label))},dependencies:[k.O5,Ir],encapsulation:2}),d})(),Cu=(()=>{class d extends So{constructor(a,g,_,S,j,J){super(a,sc,g,_,S,j),this.toggle=J}ngOnInit(){super.ngOnInit();const a=this.getProviderFromContainer(zr,null);a&&null!==this.toggle&&a.next(!0)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.zs3),l.Y36(Y.a5,10),l.Y36(l.Qsj),l.Y36(l.SBq),l.$8M("clrToggle"))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrCheckbox",""],["","clrToggle",""]],features:[l.qOj]}),d})(),X_=(()=>{class d extends ch{constructor(a,g,_,S){super(S,a,g,_),this.layoutService=a,this.controlClassService=g,this.ngControlService=_,this.ifControlStateService=S,this.inline=!1}get clrInline(){return this.inline}set clrInline(a){this.inline="string"==typeof a?"false"!==a:!!a}ngAfterContentInit(){this.setAriaRoles()}setAriaRoles(){this.role=this.checkboxes.length?"group":null}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(jr,8),l.Y36(js),l.Y36(Cs),l.Y36(Hs))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-checkbox-container"],["clr-toggle-container"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Cu,5),2&a){let S;l.iGM(S=l.CRH())&&(g.checkboxes=S)}},hostVars:7,hostBindings:function(a,g){2&a&&(l.uIk("role",g.role),l.ekj("clr-form-control",!0)("clr-form-control-disabled",null==g.control?null:g.control.disabled)("clr-row",g.addGrid()))},inputs:{clrInline:"clrInline"},features:[l._Bn([Hs,Cs,js,Xa]),l.qOj],ngContentSelectors:t0,decls:10,vars:9,consts:[[4,"ngIf"],[1,"clr-control-container",3,"ngClass"],[1,"clr-subtext-wrapper"],["class","clr-validate-icon","shape","exclamation-circle","status","danger","aria-hidden","true",4,"ngIf"],["class","clr-validate-icon","shape","check-circle","status","success","aria-hidden","true",4,"ngIf"],["shape","exclamation-circle","status","danger","aria-hidden","true",1,"clr-validate-icon"],["shape","check-circle","status","success","aria-hidden","true",1,"clr-validate-icon"]],template:function(a,g){1&a&&(l.F$t(e0),l.Hsn(0),l.YNc(1,nu,1,0,"label",0),l.TgZ(2,"div",1),l.Hsn(3,1),l.TgZ(4,"div",2),l.YNc(5,Jb,1,0,"ng-content",0),l.YNc(6,Vl,1,0,"cds-icon",3),l.YNc(7,iu,1,0,"cds-icon",4),l.YNc(8,Xb,1,0,"ng-content",0),l.YNc(9,Iv,1,0,"ng-content",0),l.qZA()()),2&a&&(l.xp6(1),l.Q6J("ngIf",!g.label&&g.addGrid()),l.xp6(1),l.ekj("clr-control-inline",g.clrInline),l.Q6J("ngClass",g.controlClass()),l.xp6(3),l.Q6J("ngIf",g.showHelper),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid))},dependencies:[k.mk,k.O5,Pn,Ir],encapsulation:2}),d})(),ey=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,Wi,ah,Wi]}),d})();function zs(d){return null!==d&&("string"==typeof d?d.length>=0:"boolean"==typeof d&&d)}let oc=(()=>{class d{get spinnerClass(){return!0}get inlineClass(){return this._inline}set clrInline(a){this._inline=zs(a)}get inverseClass(){return this._inverse}set clrInverse(a){this._inverse=zs(a)}get smallClass(){return this._small}set clrSmall(a){this._small=zs(a)}get mediumClass(){return!this._small&&this._medium}set clrMedium(a){this._medium=zs(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-spinner"]],hostVars:11,hostBindings:function(a,g){2&a&&(l.uIk("aria-busy",!0),l.ekj("spinner",g.spinnerClass)("spinner-inline",g.inlineClass)("spinner-inverse",g.inverseClass)("spinner-sm",g.smallClass)("spinner-md",g.mediumClass))},inputs:{clrInline:"clrInline",clrInverse:"clrInverse",clrSmall:"clrSmall",clrMedium:"clrMedium"},ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),bu=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})(),cc=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();class ty{containsItem(f){return!!this.model&&this.model.includes(f)}select(f){this.addItem(f)}unselect(f){this.removeItem(f)}isEmpty(){return!(this.model&&this.model.length>0)}pop(){let f;return this.model&&this.model.length>0&&(f=this.model[this.model.length-1],this.removeItem(f)),f}toString(f,a=-1){let g="";return this.model&&(a>-1?this.model[a]&&(g+=f&&this.model[a][f]?this.model[a][f]:this.model[a].toString()):this.model.forEach(_=>{g+=f&&_[f]?_[f]:_.toString(),g+=" "})),g.trim()}addItem(f){this.containsItem(f)||(this.model=this.model||[],this.model.push(f))}removeItem(f){if(null==this.model)return;const a=this.model.indexOf(f);a>-1&&this.model.splice(a,1),0===this.model.length&&(this.model=null)}}class aD{containsItem(f){return this.model===f}select(f){this.model=f}unselect(f){this.containsItem(f)&&(this.model=null)}isEmpty(){return!this.model}pop(){const f=this.model;return this.model=null,f}toString(f){return this.model?f&&this.model[f]?this.model[f]:this.model.toString():""}}class Ia{}function ny(d){return[d,{provide:Ia,useExisting:d}]}class lD extends aD{constructor(){super(...arguments),this._focusChanged=new fn.X(null)}get focusChanged(){return this._focusChanged.asObservable()}select(f){this.model!==f&&(this.model=f,this._focusChanged.next(f))}}let cD=(()=>{class d{constructor(){this.loading=!1,this.showAllOptions=!0,this._currentInput="",this._inputChanged=new fn.X(""),this._selectionChanged=new ds(1),this.inputChanged=this._inputChanged.asObservable()}get currentInput(){return this._currentInput}set currentInput(a){""===a&&!this.multiselectable&&this.setSelectionValue(null),this._currentInput=a,this._inputChanged.next(a)}get selectionChanged(){return this._selectionChanged.asObservable()}get multiselectable(){return this.selectionModel instanceof ty}select(a){null==a||this.selectionModel.containsItem(a)||(this.selectionModel.select(a),this._selectionChanged.next(this.selectionModel))}toggle(a){null!=a&&(this.selectionModel.containsItem(a)?this.selectionModel.unselect(a):this.selectionModel.select(a),this._selectionChanged.next(this.selectionModel))}unselect(a){null==a||!this.selectionModel.containsItem(a)||(this.selectionModel.unselect(a),this._selectionChanged.next(this.selectionModel))}setSelectionValue(a){!this.selectionModel||this.selectionModel.model===a||!this.selectionModel.model&&!a||(this.selectionModel.model=a,this._selectionChanged.next(this.selectionModel))}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();ny((()=>{class d{constructor(a,g,_,S){this.toggleService=g,this.selectionService=_,this.platformId=S,this.pseudoFocus=new lD,this.optionData=[],this.handleFocusSubscription(),this.renderer=a.createRenderer(null,null)}get trigger(){return this._trigger}set trigger(a){this._trigger=a,this.addFocusOnBlurListener(a)}get listbox(){return this._listbox}set listbox(a){this._listbox=a,this.addFocusOnBlurListener(a)}get textInput(){return this._textInput}set textInput(a){this._textInput=a,this.renderer.listen(a,"keydown",g=>!this.handleTextInput(g)),this.addFocusOnBlurListener(a)}focusInput(){this.textInput&&(0,k.NF)(this.platformId)&&this.textInput.focus()}focusFirstActive(){if(this.optionData.length>0)if(this.selectionService.selectionModel.isEmpty())this.pseudoFocus.select(this.optionData[0]);else{let a;a=this.selectionService.multiselectable?this.selectionService.selectionModel.model[0]:this.selectionService.selectionModel.model;const g=this.optionData.find(_=>_.value===a);this.pseudoFocus.select(g||this.optionData[0]),this.scrollIntoSelectedModel("auto")}}addOptionValues(a){this.optionData=a}handleFocusSubscription(){this.toggleService.openChange.subscribe(a=>{a||(this.pseudoFocus.model=null)})}moveFocusTo(a){let g=this.optionData.findIndex(_=>_.equals(this.pseudoFocus.model));a===vs.UP?-1===g||0===g?g=this.optionData.length-1:g--:a===vs.DOWN&&(-1===g||g===this.optionData.length-1?g=0:g++),this.pseudoFocus.select(this.optionData[g]),this.scrollIntoSelectedModel()}openAndMoveTo(a){this.toggleService.open?this.moveFocusTo(a):(this.toggleService.openChange.pipe((0,Qn.q)(1)).subscribe(g=>{g&&this.moveFocusTo(a)}),this.toggleService.open=!0)}handleTextInput(a){let g=!1;const _=Fs(a.key);if(a)switch(_){case At.Enter:this.toggleService.open&&this.pseudoFocus.model&&(this.selectionService.multiselectable?this.selectionService.toggle(this.pseudoFocus.model.value):this.selectionService.select(this.pseudoFocus.model.value),g=!0);break;case At.Space:this.toggleService.open||(this.toggleService.open=!0,g=!0);break;case At.ArrowUp:this.preventViewportScrolling(a),this.openAndMoveTo(vs.UP),g=!0;break;case At.ArrowDown:this.preventViewportScrolling(a),this.openAndMoveTo(vs.DOWN),g=!0;break;default:a.key!==At.Tab&&(!this.selectionService.multiselectable||a.key!==At.Backspace)&&a.key!==At.Escape&&!this.toggleService.open&&(this.toggleService.open=!0)}return g}scrollIntoSelectedModel(a="smooth"){this.pseudoFocus.model&&this.pseudoFocus.model.el&&this.pseudoFocus.model.el.scrollIntoView({behavior:a,block:"center",inline:"nearest"})}preventViewportScrolling(a){a.preventDefault(),a.stopImmediatePropagation()}addFocusOnBlurListener(a){(0,k.NF)(this.platformId)&&this.renderer.listen(a,"blur",g=>{this.focusOutOfComponent(g)&&(this.toggleService.open=!1,this.componentCdRef&&this.componentCdRef.detectChanges())})}focusOutOfComponent(a){const g=a.relatedTarget||document.activeElement;return!(this.textInput.contains(g)||this.trigger.contains(g)||this.listbox.contains(g))}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.FYo),l.LFG(mi),l.LFG(cD),l.LFG(l.Lbi))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})());let T1=(()=>{class d{constructor(){Jt.addIcons(ii,Di,Yr,Or)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,cc,Wi,Bs,tc,bu,Wi,Bs]}),d})(),pD=(()=>{class d extends ch{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-input-container"]],hostVars:6,hostBindings:function(a,g){2&a&&l.ekj("clr-form-control",!0)("clr-form-control-disabled",null==g.control?null:g.control.disabled)("clr-row",g.addGrid())},features:[l._Bn([Hs,Cs,ys,js]),l.qOj],ngContentSelectors:kv,decls:10,vars:7,consts:[[4,"ngIf"],[1,"clr-control-container",3,"ngClass"],[1,"clr-input-wrapper"],["class","clr-validate-icon","shape","exclamation-circle","status","danger","aria-hidden","true",4,"ngIf"],["class","clr-validate-icon","shape","check-circle","status","success","aria-hidden","true",4,"ngIf"],["shape","exclamation-circle","status","danger","aria-hidden","true",1,"clr-validate-icon"],["shape","check-circle","status","success","aria-hidden","true",1,"clr-validate-icon"]],template:function(a,g){1&a&&(l.F$t(Vo),l.Hsn(0),l.YNc(1,Da,1,0,"label",0),l.TgZ(2,"div",1)(3,"div",2),l.Hsn(4,1),l.YNc(5,_p,1,0,"cds-icon",3),l.YNc(6,l0,1,0,"cds-icon",4),l.qZA(),l.YNc(7,AE,1,0,"ng-content",0),l.YNc(8,c0,1,0,"ng-content",0),l.YNc(9,yp,1,0,"ng-content",0),l.qZA()),2&a&&(l.xp6(1),l.Q6J("ngIf",!g.label&&g.addGrid()),l.xp6(1),l.Q6J("ngClass",g.controlClass()),l.xp6(3),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid),l.xp6(1),l.Q6J("ngIf",g.showHelper),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid))},dependencies:[k.mk,k.O5,Pn,Ir],encapsulation:2}),d})(),I1=(()=>{class d extends So{constructor(a,g,_,S,j){super(a,pD,g,_,S,j),this.index=1}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.zs3),l.Y36(Y.a5,10),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrInput",""]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("clr-input",!0)},features:[l.qOj]}),d})(),pg=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,Wi,Wi]}),d})(),gD=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,pg,kn]}),d})(),uc=(()=>{class d extends gf{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275dir=l.lG2({type:d,selectors:[["","cdkTrapFocus",""]],features:[l.qOj]}),d})(),mg=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({}),d})(),fy=(()=>{class d{constructor(){Jt.addIcons(ii,Di,Yr,Zt,Hn)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,mg,ah,Bs,tc,kn,Wi]}),d})();new l.OlP(void 0);let Dg=(()=>{class d{constructor(){Jt.addIcons(_i,Ui,ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,Wi,Wi]}),d})(),my=(()=>{class d{constructor(){this._dynamic=!1}ngOnInit(){this.label&&this.label.disableGrid()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-radio-wrapper"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Ir,7),2&a){let S;l.iGM(S=l.CRH())&&(g.label=S.first)}},hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("clr-radio-wrapper",!0)},features:[l._Bn([ys])],ngContentSelectors:Yv,decls:3,vars:1,consts:[[4,"ngIf"]],template:function(a,g){1&a&&(l.F$t(BE),l.Hsn(0),l.Hsn(1,1),l.YNc(2,VE,1,0,"label",0)),2&a&&(l.xp6(2),l.Q6J("ngIf",!g.label))},dependencies:[k.O5,Ir],encapsulation:2}),d})(),vy=(()=>{class d extends So{constructor(a,g,_,S,j){super(a,my,g,_,S,j)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.zs3),l.Y36(Y.a5,10),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrRadio",""]],features:[l.qOj]}),d})(),ID=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Wi,ah,kn,Wi]}),d})(),wg=(()=>{class d extends ch{constructor(a,g,_,S,j,J){super(J,a,g,_),this.renderer=S,this.idService=j,this.ifControlStateService=J,this._hasProgress=!1}get hasProgress(){return this._hasProgress}set hasProgress(a){const g=!!a;g!==this._hasProgress&&(this._hasProgress=g)}getRangeProgressFillWidth(){const a=this.selectRangeElement();if(!a)return this.lastRangeProgressFillWidth;const _=+a.min;let S=+a.max;return 0===_&&0===S&&(S=100),this.lastRangeProgressFillWidth=100*((this.control&&void 0!==this.control.value?this.control.value:(_+S)/2)-_)/(S-_)*a.offsetWidth/100+"px",this.lastRangeProgressFillWidth}selectRangeElement(){try{return this.renderer.selectRootElement("[clrRange]#"+this.idService.id)}catch{return}}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(jr,8),l.Y36(js),l.Y36(Cs),l.Y36(l.Qsj),l.Y36(ys),l.Y36(Hs))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-range-container"]],hostVars:6,hostBindings:function(a,g){2&a&&l.ekj("clr-form-control",!0)("clr-form-control-disabled",null==g.control?null:g.control.disabled)("clr-row",g.addGrid())},inputs:{hasProgress:["clrRangeHasProgress","hasProgress"]},features:[l._Bn([Hs,Cs,ys,js]),l.qOj],ngContentSelectors:Sp,decls:11,vars:10,consts:[[4,"ngIf"],[1,"clr-control-container",3,"ngClass"],[1,"clr-range-wrapper"],["class","fill-input",3,"width",4,"ngIf"],["class","clr-validate-icon","shape","exclamation-circle","status","danger","aria-hidden","true",4,"ngIf"],["class","clr-validate-icon","shape","check-circle","status","success","aria-hidden","true",4,"ngIf"],[1,"fill-input"],["shape","exclamation-circle","status","danger","aria-hidden","true",1,"clr-validate-icon"],["shape","check-circle","status","success","aria-hidden","true",1,"clr-validate-icon"]],template:function(a,g){1&a&&(l.F$t(zl),l.Hsn(0),l.YNc(1,rn,1,0,"label",0),l.TgZ(2,"div",1)(3,"div",2),l.Hsn(4,1),l.YNc(5,Wv,1,2,"span",3),l.YNc(6,Zv,1,0,"cds-icon",4),l.YNc(7,jl,1,0,"cds-icon",5),l.qZA(),l.YNc(8,Qv,1,0,"ng-content",0),l.YNc(9,S0,1,0,"ng-content",0),l.YNc(10,zd,1,0,"ng-content",0),l.qZA()),2&a&&(l.xp6(1),l.Q6J("ngIf",!g.label&&g.addGrid()),l.xp6(1),l.Q6J("ngClass",g.controlClass()),l.xp6(1),l.ekj("progress-fill",g.hasProgress),l.xp6(2),l.Q6J("ngIf",g.hasProgress),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid),l.xp6(1),l.Q6J("ngIf",g.showHelper),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid))},dependencies:[k.mk,k.O5,Ir,Pn],encapsulation:2}),d})(),Eg=(()=>{class d extends So{constructor(a,g,_,S,j){super(a,wg,g,_,S,j)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.zs3),l.Y36(Y.a5,10),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrRange",""]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("clr-range",!0)},features:[l.qOj]}),d})(),_y=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Wi,ah,kn,Wi]}),d})(),Tg=(()=>{class d extends ch{constructor(a,g,_,S){super(S,a,g,_),this.layoutService=a,this.controlClassService=g,this.ngControlService=_,this.ifControlStateService=S,this.multi=!1}ngOnInit(){this.subscriptions.push(this.ngControlService.controlChanges.subscribe(a=>{a&&(this.multi=a.valueAccessor instanceof Y.K7,this.control=a)}))}wrapperClass(){return this.multi?"clr-multiselect-wrapper":"clr-select-wrapper"}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(jr,8),l.Y36(js),l.Y36(Cs),l.Y36(Hs))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-select-container"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Y.K7,5),2&a){let S;l.iGM(S=l.CRH())&&(g.multiple=S.first)}},hostVars:6,hostBindings:function(a,g){2&a&&l.ekj("clr-form-control",!0)("clr-form-control-disabled",null==g.control?null:g.control.disabled)("clr-row",g.addGrid())},features:[l._Bn([Hs,Cs,ys,js]),l.qOj],ngContentSelectors:D0,decls:10,vars:8,consts:[[4,"ngIf"],[1,"clr-control-container",3,"ngClass"],[3,"ngClass"],["class","clr-validate-icon","shape","exclamation-circle","status","danger","aria-hidden","true",4,"ngIf"],["class","clr-validate-icon","shape","check-circle","status","success","aria-hidden","true",4,"ngIf"],["shape","exclamation-circle","status","danger","aria-hidden","true",1,"clr-validate-icon"],["shape","check-circle","status","success","aria-hidden","true",1,"clr-validate-icon"]],template:function(a,g){1&a&&(l.F$t(Tp),l.Hsn(0),l.YNc(1,su,1,0,"label",0),l.TgZ(2,"div",1)(3,"div",2),l.Hsn(4,1),l.YNc(5,qv,1,0,"cds-icon",3),l.YNc(6,Dp,1,0,"cds-icon",4),l.qZA(),l.YNc(7,wp,1,0,"ng-content",0),l.YNc(8,Ep,1,0,"ng-content",0),l.YNc(9,Kv,1,0,"ng-content",0),l.qZA()),2&a&&(l.xp6(1),l.Q6J("ngIf",!g.label&&g.addGrid()),l.xp6(1),l.Q6J("ngClass",g.controlClass()),l.xp6(1),l.Q6J("ngClass",g.wrapperClass()),l.xp6(2),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid),l.xp6(1),l.Q6J("ngIf",g.showHelper),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid))},dependencies:[k.mk,k.O5,Pn,Ir],encapsulation:2}),d})(),yy=(()=>{class d extends So{constructor(a,g,_,S,j){super(a,Tg,g,_,S,j),this.index=1}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.zs3),l.Y36(Y.a5,10),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrSelect",""]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("clr-select",!0)},features:[l.qOj]}),d})(),Cy=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,Wi,Wi]}),d})(),AD=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,Wi,Wi]}),d})(),by=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Wi,ey,T1,fy,pg,Dg,ID,Cy,AD,_y,gD]}),d})(),Ig=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})(),V1=(()=>{class d extends If{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275dir=l.lG2({type:d,selectors:[["","cdkDrag",""]],features:[l.qOj]}),d})(),Sy=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({}),d})(),j1=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();class bh{}let Eu=(()=>{class d{constructor(){this.nbChanges=0,this._change=new et.x}get change(){return this._change.asObservable()}changeStart(){this.nbChanges++}changeDone(){0==--this.nbChanges&&this._change.next()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),aa=(()=>{class d{constructor(a){this.stateDebouncer=a,this.activated=!1,this._size=0,this._current=1,this._change=new et.x,this.preventEmit=!1,this._sizeChange=new et.x}get size(){return this._size}set size(a){const g=this._size;a!==g&&(this.preventEmit||this.stateDebouncer.changeStart(),this._size=a,this._current=0===a?1:Math.floor(g/a*(this._current-1))+1,this.preventEmit||(this._change.next(this._current),this._sizeChange.next(this._size),this.stateDebouncer.changeDone())),this.preventEmit=!1}get totalItems(){return this._totalItems||0}set totalItems(a){this._totalItems=a,this.current>this.last&&(this.current=this.last)}get last(){return this._last?this._last:this.size>0&&this.totalItems?Math.ceil(this.totalItems/this.size):1}set last(a){this._last=a}get change(){return this._change.asObservable()}get sizeChange(){return this._sizeChange.asObservable()}get current(){return this._current}set current(a){a!==this._current&&(this.stateDebouncer.changeStart(),this._current=a,this._change.next(a),this.stateDebouncer.changeDone())}get firstItem(){return 0===this._totalItems?-1:0===this.size?0:(this.current-1)*this.size}get lastItem(){if(0===this._totalItems)return-1;if(0===this.size)return this.totalItems-1;let a=this.current*this.size-1;return this.totalItems&&(a=Math.min(a,this.totalItems-1)),a}previous(){this.current>1&&this.current--}next(){this.current{class d{constructor(a,g){this._page=a,this.stateDebouncer=g,this._change=new et.x,this._all=[]}get change(){return this._change.asObservable()}hasActiveFilters(){for(const{filter:a}of this._all)if(a&&a.isActive())return!0;return!1}getActiveFilters(){const a=[];for(const{filter:g}of this._all)g&&g.isActive()&&a.push(g);return a}add(a){const g=a.changes.subscribe(()=>this.resetPageAndEmitFilterChange([a]));let _=!1;const S=new Sh(a,()=>{if(_)return;g.unsubscribe();const j=this._all.findIndex(J=>J.filter===a);j>=0&&this._all.splice(j,1),a.isActive()&&this.resetPageAndEmitFilterChange([]),_=!0});return this._all.push(S),a.isActive()&&this.resetPageAndEmitFilterChange([a]),S}accepts(a){for(const{filter:g}of this._all)if(g&&g.isActive()&&!g.accepts(a))return!1;return!0}resetPageAndEmitFilterChange(a){this.stateDebouncer.changeStart(),this._page.current=1,this._change.next(a),this.stateDebouncer.changeDone()}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(aa),l.LFG(Eu))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();class Sh{constructor(f,a){this.filter=f,this.unregister=a}}let Dh=(()=>{class d{constructor(a){this.filters=a}get filter(){return this.registered&&this.registered.filter}ngOnDestroy(){this.deleteFilter()}setFilter(a){this.deleteFilter(),a instanceof Sh?this.registered=a:a&&(this.registered=this.filters.add(a))}deleteFilter(){this.registered&&(this.registered.unregister(),delete this.registered)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(zo))},d.\u0275dir=l.lG2({type:d}),d})(),Tu=(()=>{class d extends Dh{constructor(a,g,_,S,j){super(a),this.commonStrings=g,this.smartToggleService=_,this.platformId=S,this.elementRef=j,this.openChange=new l.vpe(!1),this.ariaExpanded=!1,this.popoverId=dr(),this.smartPosition={axis:Hr.VERTICAL,side:no.AFTER,anchor:bn.END,content:bn.END},this._open=!1,this.subs=[],this.subs.push(_.openChange.subscribe(J=>{this.open=J,this.ariaExpanded=J}))}get open(){return this._open}set open(a){this.open!==(a=!!a)&&(this.smartToggleService.open=a,this.openChange.emit(a),!a&&(0,k.NF)(this.platformId)&&this.anchor.nativeElement.focus(),this._open=a)}set customFilter(a){this.setFilter(a)}get active(){return!!this.filter&&this.filter.isActive()}ngOnChanges(){this.setToggleButtonAriaLabel()}ngOnDestroy(){super.ngOnDestroy(),this.subs.forEach(a=>a.unsubscribe())}setToggleButtonAriaLabel(){const _=this.elementRef.nativeElement?.closest("clr-dg-column")?.querySelector(".datagrid-column-title")?.textContent.trim().toLocaleLowerCase();this.toggleButtonAriaLabel=this.commonStrings.parse(this.commonStrings.keys.datagridFilterAriaLabel,{COLUMN:_||""})}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(zo),l.Y36(pn),l.Y36(mi),l.Y36(l.Lbi),l.Y36(l.SBq))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-filter"]],viewQuery:function(a,g){if(1&a&&l.Gf(Jv,5,l.SBq),2&a){let _;l.iGM(_=l.CRH())&&(g.anchor=_.first)}},inputs:{open:["clrDgFilterOpen","open"],customFilter:["clrDgFilter","customFilter"]},outputs:{openChange:"clrDgFilterOpenChange"},features:[l._Bn([{provide:bh,useExisting:d}]),l.qOj,l.TTD],ngContentSelectors:jt,decls:4,vars:13,consts:[["type","button","clrPopoverAnchor","","clrPopoverOpenCloseButton","",1,"datagrid-filter-toggle"],["anchor",""],["solid",""],["class","datagrid-filter","cdkTrapFocus","","role","dialog",3,"id",4,"clrPopoverContent","clrPopoverContentAt","clrPopoverContentOutsideClickToClose","clrPopoverContentScrollToClose"],["cdkTrapFocus","","role","dialog",1,"datagrid-filter",3,"id"],[1,"datagrid-filter-close-wrapper"],["type","button","clrPopoverCloseButton","",1,"close"],["shape","window-close"]],template:function(a,g){1&a&&(l.F$t(),l.TgZ(0,"button",0,1),l._UZ(2,"cds-icon",2),l.qZA(),l.YNc(3,T0,5,3,"div",3)),2&a&&(l.ekj("datagrid-filter-open",g.open)("datagrid-filtered",g.active),l.uIk("aria-label",g.toggleButtonAriaLabel)("aria-expanded",g.ariaExpanded)("aria-controls",g.popoverId),l.xp6(2),l.uIk("status",g.active?"info":null)("shape",g.active?"filter-grid-circle":"filter-grid"),l.xp6(1),l.Q6J("clrPopoverContent",g.open)("clrPopoverContentAt",g.smartPosition)("clrPopoverContentOutsideClickToClose",!0)("clrPopoverContentScrollToClose",!0))},dependencies:[uc,Pn,pu,sg,gu,ms],encapsulation:2}),d})();class Ag{constructor(f){this.prop=f,f.indexOf(".")>=0&&(this.splitProp=f.split("."))}getPropValue(f){if(this.splitProp){let a=f;for(const g of this.splitProp){if(null===a||typeof a>"u"||typeof a[g]>"u")return;a=a[g]}return a}return f[this.prop]}}class wh{constructor(f,a=!1){this.prop=f,this.exact=a,this.nestedProp=new Ag(f)}accepts(f,a,g){const _=this.nestedProp.getPropValue(f);return!(void 0===_||null!==a&&("number"!=typeof _||_g))}}class il{constructor(f){this.filterFn=f,this._changes=new et.x,this._low=null,this._high=null}get changes(){return this._changes.asObservable()}get value(){return[this._low,this._high]}set value(f){const a=f[0],g=f[1];(a!==this._low||g!==this._high)&&(this._low=a,this._high=g,this._changes.next([this._low,this._high]))}get low(){return this._low}set low(f){f!==this._low&&(this._low=f,this._changes.next([this._low,this._high]))}get high(){return this._high}set high(f){f!==this._high&&(this._high=f,this._changes.next([this._low,this._high]))}get state(){return this.filterFn instanceof wh?{property:this.filterFn.prop,low:this._low,high:this._high}:this}isActive(){return null!==this._low||null!==this.high}accepts(f){return this.filterFn.accepts(f,this._low,this._high)}equals(f){return f instanceof il&&(f.filterFn instanceof wh?this.filterFn instanceof wh&&f.filterFn.prop===this.filterFn.prop&&f.low===this._low&&f.high===this._high:f===this)}}let Dy=(()=>{class d extends Dh{constructor(a,g,_,S,j){super(a),this.domAdapter=g,this.commonStrings=_,this.popoverToggleService=S,this.ngZone=j,this.filterValueChange=new l.vpe,this.open=!1,this.subscriptions=[]}get value(){return[this.filter.low,this.filter.high]}set value(a){this.filter&&Array.isArray(a)?a&&(a[0]!==this.filter.low||a[1]!==this.filter.high)&&(this.filter.low="number"==typeof a[0]?a[0]:null,this.filter.high="number"==typeof a[1]?a[1]:null,this.filterValueChange.emit(a)):this.initFilterValues=a}set customNumericFilter(a){this.setFilter(a instanceof Sh?a:new il(a)),this.initFilterValues&&(this.value=this.initFilterValues,delete this.initFilterValues)}get maxPlaceholderValue(){return this.maxPlaceholder||this.commonStrings.keys.maxValue}get minPlaceholderValue(){return this.minPlaceholder||this.commonStrings.keys.minValue}get low(){return"number"==typeof this.filter.low&&isFinite(this.filter.low)?this.filter.low:null}set low(a){"number"==typeof a&&a!==this.filter.low?(this.filter.low=a,this.filterValueChange.emit([this.filter.low,this.filter.high])):"number"!=typeof a&&(this.filter.low=null,this.filterValueChange.emit([this.filter.low,this.filter.high]))}get high(){return"number"==typeof this.filter.high&&isFinite(this.filter.high)?this.filter.high:null}set high(a){"number"==typeof a&&a!==this.filter.high?(this.filter.high=a,this.filterValueChange.emit([this.filter.low,this.filter.high])):"number"!=typeof a&&(this.filter.high=null,this.filterValueChange.emit([this.filter.low,this.filter.high]))}ngAfterViewInit(){this.subscriptions.push(this.popoverToggleService.openChange.subscribe(a=>{this.open=a,this.ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this.domAdapter.focus(this.input.nativeElement)})})}))}ngOnDestroy(){super.ngOnDestroy(),this.subscriptions.forEach(a=>{a.unsubscribe()})}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(zo),l.Y36(jo),l.Y36(pn),l.Y36(mi),l.Y36(l.R0b))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-numeric-filter"]],viewQuery:function(a,g){if(1&a&&(l.Gf(I0,5),l.Gf(Tu,5)),2&a){let _;l.iGM(_=l.CRH())&&(g.input=_.first),l.iGM(_=l.CRH())&&(g.filterContainer=_.first)}},inputs:{minPlaceholder:["clrFilterMinPlaceholder","minPlaceholder"],maxPlaceholder:["clrFilterMaxPlaceholder","maxPlaceholder"],value:["clrFilterValue","value"],customNumericFilter:["clrDgNumericFilter","customNumericFilter"]},outputs:{filterValueChange:"clrFilterValueChange"},features:[l._Bn([{provide:bh,useExisting:d}]),l.qOj],decls:6,vars:8,consts:[[3,"clrDgFilter","clrDgFilterOpen","clrDgFilterOpenChange"],["type","number","autocomplete","off","name","low",1,"datagrid-numeric-filter-input",3,"ngModel","placeholder","ngModelChange"],["input_low",""],[1,"datagrid-filter-input-spacer"],["type","number","autocomplete","off","name","high",1,"datagrid-numeric-filter-input",3,"ngModel","placeholder","ngModelChange"],["input_high",""]],template:function(a,g){1&a&&(l.TgZ(0,"clr-dg-filter",0),l.NdJ("clrDgFilterOpenChange",function(S){return g.open=S}),l.TgZ(1,"input",1,2),l.NdJ("ngModelChange",function(S){return g.low=S}),l.qZA(),l._UZ(3,"span",3),l.TgZ(4,"input",4,5),l.NdJ("ngModelChange",function(S){return g.high=S}),l.qZA()()),2&a&&(l.Q6J("clrDgFilter",g.registered)("clrDgFilterOpen",g.open),l.xp6(1),l.Q6J("ngModel",g.low)("placeholder",g.minPlaceholderValue),l.uIk("aria-label",g.minPlaceholderValue),l.xp6(3),l.Q6J("ngModel",g.high)("placeholder",g.maxPlaceholderValue),l.uIk("aria-label",g.maxPlaceholderValue))},dependencies:[Y.Fj,Y.wV,Y.JJ,Y.On,Tu],encapsulation:2}),d})();class Eh{constructor(f,a=!1){this.prop=f,this.exact=a,this.nestedProp=new Ag(f)}accepts(f,a){const g=this.nestedProp.getPropValue(f);return!(typeof g>"u")&&(this.exact?(""+g).toLowerCase()===a:(""+g).toLowerCase().indexOf(a)>=0)}}class wo{constructor(f){this.filterFn=f,this._changes=new et.x,this._lowerCaseValue="",this._rawValue=""}get changes(){return this._changes.asObservable()}get lowerCaseValue(){return this._lowerCaseValue}get state(){return this.filterFn instanceof Eh?{property:this.filterFn.prop,value:this.value}:this}get value(){return this._rawValue}set value(f){f||(f=""),f!==this._rawValue&&(this._rawValue=f,this._lowerCaseValue=f.toLowerCase().trim(),this._changes.next(f))}isActive(){return!!this.value}accepts(f){return this.filterFn.accepts(f,this.lowerCaseValue)}equals(f){return f instanceof wo&&(f.filterFn instanceof Eh?this.filterFn instanceof Eh&&f.filterFn.prop===this.filterFn.prop&&f.value===this.value:f===this)}}let Mg=(()=>{class d extends Dh{constructor(a,g,_,S,j){super(a),this.domAdapter=g,this.commonStrings=_,this.smartToggleService=S,this.ngZone=j,this.filterValueChange=new l.vpe,this.open=!1,this.subs=[]}set customStringFilter(a){this.setFilter(a instanceof Sh?a:new wo(a)),this.initFilterValue&&(this.value=this.initFilterValue,delete this.initFilterValue)}get value(){return this.filter.value}set value(a){this.filter&&"string"==typeof a?(a||(a=""),a!==this.filter.value&&(this.filter.value=a,this.filterValueChange.emit(a))):this.initFilterValue=a}get placeholderValue(){return this.placeholder||this.commonStrings.keys.filterItems}ngAfterViewInit(){this.subs.push(this.smartToggleService.openChange.subscribe(a=>{this.open=a,this.ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this.domAdapter.focus(this.input.nativeElement)})})}))}ngOnDestroy(){super.ngOnDestroy(),this.subs.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(zo),l.Y36(jo),l.Y36(pn),l.Y36(mi),l.Y36(l.R0b))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-string-filter"]],viewQuery:function(a,g){if(1&a&&(l.Gf(Ns,5),l.Gf(Tu,5)),2&a){let _;l.iGM(_=l.CRH())&&(g.input=_.first),l.iGM(_=l.CRH())&&(g.filterContainer=_.first)}},inputs:{placeholder:["clrFilterPlaceholder","placeholder"],customStringFilter:["clrDgStringFilter","customStringFilter"],value:["clrFilterValue","value"]},outputs:{filterValueChange:"clrFilterValueChange"},features:[l._Bn([{provide:bh,useExisting:d}]),l.qOj],decls:3,vars:5,consts:[[3,"clrDgFilter","clrDgFilterOpen","clrDgFilterOpenChange"],["type","text","autocomplete","off","name","search",1,"clr-input",3,"ngModel","placeholder","ngModelChange"],["input",""]],template:function(a,g){1&a&&(l.TgZ(0,"clr-dg-filter",0),l.NdJ("clrDgFilterOpenChange",function(S){return g.open=S}),l.TgZ(1,"input",1,2),l.NdJ("ngModelChange",function(S){return g.value=S}),l.qZA()()),2&a&&(l.Q6J("clrDgFilter",g.registered)("clrDgFilterOpen",g.open),l.xp6(1),l.Q6J("ngModel",g.value)("placeholder",g.placeholderValue),l.uIk("aria-label",g.placeholderValue))},dependencies:[Y.Fj,Y.JJ,Y.On,Tu],encapsulation:2}),d})(),Iu=(()=>{class d extends Za{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275dir=l.lG2({type:d,selectors:[["clr-datagrid"]],features:[l.qOj]}),d})(),rl=(()=>{class d{constructor(){this.actionableCount=0}get hasActionableRow(){return this.actionableCount>0}register(){this.actionableCount++}unregister(){this.actionableCount--}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),xg=(()=>{class d extends Qa{constructor(a,g,_){if(!g)throw new Error("clr-dg-row should only be used inside of a clr-datagrid");super(a,g),this.rowActions=_}get flavor(){return this.rowActions.hasActionableRow}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.sBO),l.Y36(Iu,8),l.Y36(rl))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-datagrid"],["clr-dg-row"]],features:[l.qOj]}),d})(),Og=(()=>{class d{constructor(a){this.platformId=a,this.modalStack=[],this.keyUpEventListener=this.onKeyUp.bind(this)}trackModalOpen(a){!1===this.modalStack.includes(a)&&this.modalStack.unshift(a),(0,k.NF)(this.platformId)&&document.body.addEventListener("keyup",this.keyUpEventListener)}trackModalClose(a){const g=this.modalStack.indexOf(a);g>-1&&this.modalStack.splice(g,1),0===this.modalStack.length&&(0,k.NF)(this.platformId)&&document.body.removeEventListener("keyup",this.keyUpEventListener)}onKeyUp(a){this.modalStack.length&&Fs(a.key)===At.Escape&&this.modalStack[0].close()}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.Lbi))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"}),d})(),io=(()=>{class d{constructor(a){this.modalStackService=a,this.toggleState=!1,this._enabled=!1,this._state=new fn.X(this.toggleState)}get enabled(){return this._enabled}set enabled(a){this._enabled=a}get state(){return this.cache}get stateChange(){return this._state.asObservable()}get isOpen(){return!0===this.toggleState}open(a,g){this.cache=a,this.button=g,this.toggleState=!0,this._state.next(this.toggleState),this.modalStackService.trackModalOpen(this)}close(){this.toggleState=!1,this._state.next(this.toggleState),this.modalStackService.trackModalClose(this),this.button&&(this.button.focus(),this.button=null)}toggle(a,g){this.isRowOpen(a)||!a?this.close():this.open(a,g)}isRowOpen(a){return!(!this.toggleState||this.cache!==a)}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(Og))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),pc=(()=>{class d{constructor(a){this.detailService=a,this.expandableCount=0}get hasExpandableRow(){return!this.detailService.enabled&&this.expandableCount>0}register(){this.expandableCount++}unregister(){this.expandableCount--}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(io))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),MD=(()=>{class d extends Qa{constructor(a,g,_){if(!g)throw new Error("clr-dg-row should only be used inside of a clr-datagrid");super(a,g),this.expandableCount=_}get flavor(){return this.expandableCount.hasExpandableRow}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.sBO),l.Y36(Iu,8),l.Y36(pc))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-datagrid"],["clr-dg-row"]],features:[l.qOj]}),d})();class Rg{constructor(f){this.prop=f,this.nestedProp=new Ag(f)}compare(f,a){let g=this.nestedProp.getPropValue(f),_=this.nestedProp.getPropValue(a);return"string"==typeof g&&(g=g.toLowerCase()),"string"==typeof _&&(_=_.toLowerCase()),typeof g>"u"||null===g?typeof _>"u"||null===_?0:1:typeof _>"u"||null===_||g<_?-1:g>_?1:0}}var bs=function(d){return d[d.UNSORTED=0]="UNSORTED",d[d.ASC=1]="ASC",d[d.DESC=-1]="DESC",d}(bs||{});let Th=(()=>{class d{constructor(){this._dynamic=!1}ngAfterViewInit(){this.columnView=this.templateRef.createEmbeddedView(null)}ngOnDestroy(){this.columnView.destroy()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["dg-wrapped-column"]],viewQuery:function(a,g){if(1&a&&l.Gf(A0,5),2&a){let _;l.iGM(_=l.CRH())&&(g.templateRef=_.first)}},ngContentSelectors:jt,decls:2,vars:0,consts:[["columnPortal",""]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,M0,1,0,"ng-template",null,0,l.W1O))},encapsulation:2}),d})(),Ih=(()=>{class d{constructor(a){this.stateDebouncer=a,this._reverse=!1,this._change=new et.x}get comparator(){return this._comparator}set comparator(a){this.stateDebouncer.changeStart(),this._comparator=a,this.emitChange(),this.stateDebouncer.changeDone()}get reverse(){return this._reverse}set reverse(a){this.stateDebouncer.changeStart(),this._reverse=a,this.emitChange(),this.stateDebouncer.changeDone()}get change(){return this._change.asObservable()}toggle(a,g){this.stateDebouncer.changeStart(),this.comparator===a?this._reverse=typeof g<"u"&&g||!this._reverse:(this._comparator=a,this._reverse=typeof g<"u"&&g),this.emitChange(),this.stateDebouncer.changeDone()}clear(){this.comparator=null}compare(a,g){return(this.reverse?-1:1)*this.comparator.compare(a,g)}emitChange(){this._change.next(this)}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(Eu))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();var Eo=function(d){return d[d.ALIGN_COLUMNS=0]="ALIGN_COLUMNS",d[d.CALCULATE_MODE_ON=1]="CALCULATE_MODE_ON",d[d.CALCULATE_MODE_OFF=2]="CALCULATE_MODE_OFF",d[d.CLEAR_WIDTHS=3]="CLEAR_WIDTHS",d[d.COMPUTE_COLUMN_WIDTHS=4]="COMPUTE_COLUMN_WIDTHS",d}(Eo||{});let sl=(()=>{class d{constructor(){this._renderStep=new et.x,this.alreadySized=!1}get renderStep(){return this._renderStep.asObservable()}filterRenderSteps(a){return this.renderStep.pipe((0,Ln.h)(g=>a===g))}resize(){this._renderStep.next(Eo.CALCULATE_MODE_ON),this.alreadySized&&this._renderStep.next(Eo.CLEAR_WIDTHS),this._renderStep.next(Eo.COMPUTE_COLUMN_WIDTHS),this._renderStep.next(Eo.ALIGN_COLUMNS),this.alreadySized=!0,this._renderStep.next(Eo.CALCULATE_MODE_OFF)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Pg=(()=>{class d{constructor(a,g,_){this.el=a,this.domAdapter=g,this.organizer=_,this._resizedBy=0}get resizedBy(){return this._resizedBy}get minColumnWidth(){return this.domAdapter.minWidth(this.el.nativeElement)||96}get maxResizeRange(){return this.widthBeforeResize-this.minColumnWidth}get widthAfterResize(){return this.widthBeforeResize+this._resizedBy}startResize(){this._resizedBy=0,this.isWithinMaxResizeRange=!0,this.widthBeforeResize=this.domAdapter.clientRect(this.el.nativeElement).width}endResize(){this.organizer.resize()}calculateResize(a){a<-this.maxResizeRange?(this._resizedBy=-this.maxResizeRange,this.isWithinMaxResizeRange=!1):(this._resizedBy=a,this.isWithinMaxResizeRange=!0)}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.SBq),l.LFG(jo),l.LFG(sl))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Mu=(()=>{class d{constructor(a){this.platformId=a}get tableRef(){return this._tableRef}set tableRef(a){this._tableRef=a}set table(a){(0,k.NF)(this.platformId)&&a.nativeElement&&(this.tableRef=a.nativeElement.querySelector(".datagrid-table"))}getColumnDragHeight(){return this.tableRef?`${this.tableRef.clientHeight}px`:null}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.Lbi))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),xD=(()=>{class d{constructor(a,g,_,S,j,J){this.columnResizerService=a,this.renderer=g,this.ngZone=_,this.tableSizeService=S,this.commonString=j,this.document=J,this.columnSeparatorId=dr(),this.resizeStartedOnKeyDown=!1,this.unlisteners=[]}get descriptionId(){return`${this.columnSeparatorId}-aria-describedby`}get resizeTrackerEl(){return this.resizeTrackerRef.nativeElement}get columnHandleEl(){return this.columnHandleRef.nativeElement}ngAfterViewInit(){this.ngZone.runOutsideAngular(()=>{this.unlisteners.push(this.renderer.listen(this.columnHandleEl,"keydown",a=>{this.showTrackerOnFirstKeyDown(a),this.moveTrackerOnKeyDown(a)})),this.unlisteners.push(this.renderer.listen(this.columnHandleEl,"keyup",a=>{this.hideTrackerOnKeyUp(a)}))})}ngOnDestroy(){this.unlisteners.forEach(a=>a())}showTracker(){this.columnResizerService.startResize();const a=this.tableSizeService.getColumnDragHeight();this.renderer.setStyle(this.resizeTrackerEl,"height",a),this.renderer.setStyle(this.resizeTrackerEl,"display","block")}moveTracker(a){this.columnResizerService.calculateResize(a),this.renderer.setStyle(this.resizeTrackerEl,"transform",`translateX(${this.columnResizerService.resizedBy}px)`),this.renderer.setStyle(this.document.body,"cursor","col-resize"),this.redFlagTracker()}hideTracker(){this.columnResizerService.endResize(),this.renderer.setStyle(this.resizeTrackerEl,"display","none"),this.renderer.setStyle(this.resizeTrackerEl,"transform","translateX(0px)"),this.renderer.setStyle(this.columnHandleEl,"transform","translateX(0px)"),this.renderer.setStyle(this.document.body,"cursor","auto")}showTrackerOnFirstKeyDown(a){!this.resizeStartedOnKeyDown&&(this.isArrowLeftKeyEvent(a)||this.isArrowRightKeyEvent(a))&&(this.resizeStartedOnKeyDown=!0,this.renderer.addClass(this.resizeTrackerEl,"on-arrow-key-resize"),this.showTracker())}moveTrackerOnKeyDown(a){this.isArrowLeftKeyEvent(a)?(a.stopPropagation(),this.moveTracker(this.columnResizerService.resizedBy-12)):this.isArrowRightKeyEvent(a)&&(a.stopPropagation(),this.moveTracker(this.columnResizerService.resizedBy+12))}hideTrackerOnKeyUp(a){this.resizeStartedOnKeyDown&&(this.isArrowLeftKeyEvent(a)||this.isArrowRightKeyEvent(a))&&(this.resizeStartedOnKeyDown=!1,this.renderer.removeClass(this.resizeTrackerEl,"on-arrow-key-resize"),this.hideTracker(),this.columnHandleEl.focus())}redFlagTracker(){this.isWithinMaxResizeRange!==this.columnResizerService.isWithinMaxResizeRange&&(this.isWithinMaxResizeRange=this.columnResizerService.isWithinMaxResizeRange,this.isWithinMaxResizeRange?this.renderer.removeClass(this.resizeTrackerEl,"exceeded-max"):this.renderer.addClass(this.resizeTrackerEl,"exceeded-max"))}isArrowLeftKeyEvent(a){return Fs(a.key)===At.ArrowLeft}isArrowRightKeyEvent(a){return Fs(a.key)===At.ArrowRight}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Pg),l.Y36(l.Qsj),l.Y36(l.R0b),l.Y36(Mu),l.Y36(pn),l.Y36(k.K0))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-column-separator"]],viewQuery:function(a,g){if(1&a&&(l.Gf(WE,5),l.Gf(Ip,5)),2&a){let _;l.iGM(_=l.CRH())&&(g.resizeTrackerRef=_.first),l.iGM(_=l.CRH())&&(g.columnHandleRef=_.first)}},hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("datagrid-column-separator",!0)},decls:6,vars:4,consts:[["type","button","cdkDrag","","cdkDragLockAxis","x",1,"datagrid-column-handle",3,"cdkDragStarted","cdkDragMoved","cdkDragEnded"],["columnHandle",""],[1,"clr-sr-only"],[1,"datagrid-column-resize-tracker"],["resizeTracker",""]],template:function(a,g){1&a&&(l.TgZ(0,"button",0,1),l.NdJ("cdkDragStarted",function(){return g.showTracker()})("cdkDragMoved",function(S){return g.moveTracker(S.distance.x)})("cdkDragEnded",function(S){return g.hideTracker(),S.source._dragRef.reset()}),l.qZA(),l.TgZ(2,"span",2),l._uU(3),l.qZA(),l._UZ(4,"div",3,4)),2&a&&(l.uIk("aria-label",g.commonString.keys.columnSeparatorAriaLabel)("aria-describedby",g.descriptionId),l.xp6(2),l.uIk("id",g.descriptionId),l.xp6(1),l.hij(" ",g.commonString.keys.columnSeparatorDescription," "))},dependencies:[V1],encapsulation:2}),d})(),kg=(()=>{class d extends Dh{constructor(a,g,_,S,j){super(g),this._sort=a,this.vcr=_,this.detailService=S,this.changeDetectorRef=j,this.sortOrderChange=new l.vpe,this.filterValueChange=new l.vpe,this.showSeparator=!0,this.customFilter=!1,this._colType="string",this._sortOrder=bs.UNSORTED,this.subscriptions=[],this.subscriptions.push(this.listenForSortingChanges()),this.subscriptions.push(this.listenForDetailPaneChanges())}get colType(){return this._colType}set colType(a){this._colType=a}get field(){return this._field}set field(a){"string"==typeof a&&(this._field=a,this._sortBy||(this._sortBy=new Rg(a)))}get sortBy(){return this._sortBy}set sortBy(a){"string"==typeof a?this._sortBy=new Rg(a):a?this._sortBy=a:this.field?this._sortBy=new Rg(this.field):delete this._sortBy}get sortOrder(){return this._sortOrder}set sortOrder(a){if(!(typeof a>"u")&&this._sortOrder!==a)switch(a){default:case bs.UNSORTED:this._sort.clear();break;case bs.ASC:this.sort(!1);break;case bs.DESC:this.sort(!0)}}set updateFilterValue(a){this.filter?this.filter instanceof wo?((!a||"string"!=typeof a)&&(a=""),a!==this.filter.value&&(this.filter.value=a)):this.filter instanceof il&&((!a||!(a instanceof Array))&&(a=[null,null]),2===a.length&&(a[0]!==this.filter.value[0]||a[1]!==this.filter.value[1])&&(this.filter.value=a)):this.initFilterValue=a}set projectedFilter(a){a&&(this.deleteFilter(),this.customFilter=!0)}get sortable(){return!!this._sortBy}get ariaSort(){switch(this._sortOrder){default:case bs.UNSORTED:return"none";case bs.ASC:return"ascending";case bs.DESC:return"descending"}}get sortDirection(){return this._sortDirection}get filterValue(){return this.filter instanceof wo||this.filter instanceof il?this.filter.value:null}set filterValue(a){(this.filter instanceof wo||this.filter instanceof il)&&(this.updateFilterValue=a,this.filterValueChange.emit(this.filter.value))}get _view(){return this.wrappedInjector.get(Th,this.vcr).columnView}ngOnInit(){this.wrappedInjector=new _u(Th,this.vcr)}ngOnChanges(a){a.colType&&a.colType.currentValue&&a.colType.currentValue!==a.colType.previousValue&&!this.customFilter&&!this.filter&&this.colType&&this.field&&this.setupDefaultFilter(this.field,this.colType),a.field&&a.field.currentValue&&a.field.currentValue!==a.field.previousValue&&!this.customFilter&&this.colType&&this.setupDefaultFilter(this.field,this.colType)}ngOnDestroy(){super.ngOnDestroy(),this.subscriptions.forEach(a=>a.unsubscribe())}sort(a){this.sortable&&(this._sort.toggle(this._sortBy,a),this._sortOrder=this._sort.reverse?bs.DESC:bs.ASC,this._sortDirection=this._sortOrder===bs.DESC?"down":"up",this.sortOrderChange.emit(this._sortOrder))}listenForDetailPaneChanges(){return this.detailService.stateChange.subscribe(a=>{this.showSeparator!==!a&&(this.showSeparator=!a,this.changeDetectorRef.markForCheck())})}listenForSortingChanges(){return this._sort.change.subscribe(a=>{this.changeDetectorRef.markForCheck(),this.sortOrder!==bs.UNSORTED&&a.comparator!==this._sortBy&&(this._sortOrder=bs.UNSORTED,this.sortOrderChange.emit(this._sortOrder),this._sortDirection=null)})}setupDefaultFilter(a,g){"number"===g?this.setFilter(new il(new wh(a))):"string"===g&&this.setFilter(new wo(new Eh(a))),this.filter&&this.initFilterValue&&(this.updateFilterValue=this.initFilterValue,delete this.initFilterValue)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Ih),l.Y36(zo),l.Y36(l.s_b),l.Y36(io),l.Y36(l.sBO))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-column"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,bh,5),2&a){let S;l.iGM(S=l.CRH())&&(g.projectedFilter=S.first)}},hostAttrs:["role","columnheader"],hostVars:3,hostBindings:function(a,g){2&a&&(l.uIk("aria-sort",g.ariaSort),l.ekj("datagrid-column",!0))},inputs:{filterStringPlaceholder:["clrFilterStringPlaceholder","filterStringPlaceholder"],filterNumberMaxPlaceholder:["clrFilterNumberMaxPlaceholder","filterNumberMaxPlaceholder"],filterNumberMinPlaceholder:["clrFilterNumberMinPlaceholder","filterNumberMinPlaceholder"],colType:["clrDgColType","colType"],field:["clrDgField","field"],sortBy:["clrDgSortBy","sortBy"],sortOrder:["clrDgSortOrder","sortOrder"],updateFilterValue:["clrFilterValue","updateFilterValue"]},outputs:{sortOrderChange:"clrDgSortOrderChange",filterValueChange:"clrFilterValueChange"},features:[l.qOj,l.TTD,l.zW0([ia])],ngContentSelectors:L0,decls:9,vars:5,consts:[[1,"datagrid-column-flex"],["class","datagrid-column-title","type","button",3,"click",4,"ngIf"],[3,"clrFilterPlaceholder","clrDgStringFilter","clrFilterValue","clrFilterValueChange",4,"ngIf"],[3,"clrFilterMaxPlaceholder","clrFilterMinPlaceholder","clrDgNumericFilter","clrFilterValue","clrFilterValueChange",4,"ngIf"],["columnTitle",""],["class","datagrid-column-title",4,"ngIf"],[4,"ngIf"],["type","button",1,"datagrid-column-title",3,"click"],[4,"ngTemplateOutlet"],["shape","arrow","aria-hidden","true","class","sort-icon",4,"ngIf"],["shape","arrow","aria-hidden","true",1,"sort-icon"],[3,"clrFilterPlaceholder","clrDgStringFilter","clrFilterValue","clrFilterValueChange"],[3,"clrFilterMaxPlaceholder","clrFilterMinPlaceholder","clrDgNumericFilter","clrFilterValue","clrFilterValueChange"],[1,"datagrid-column-title"]],template:function(a,g){1&a&&(l.F$t(F0),l.TgZ(0,"div",0),l.YNc(1,O0,3,2,"button",1),l.Hsn(2),l.YNc(3,R0,1,3,"clr-dg-string-filter",2),l.YNc(4,e_,1,4,"clr-dg-numeric-filter",3),l.YNc(5,P0,1,0,"ng-template",null,4,l.W1O),l.YNc(7,Ap,2,1,"span",5),l.YNc(8,N0,1,0,"clr-dg-column-separator",6),l.qZA()),2&a&&(l.xp6(1),l.Q6J("ngIf",g.sortable),l.xp6(2),l.Q6J("ngIf",g.field&&!g.customFilter&&"string"==g.colType),l.xp6(1),l.Q6J("ngIf",g.field&&!g.customFilter&&"number"==g.colType),l.xp6(3),l.Q6J("ngIf",!g.sortable),l.xp6(1),l.Q6J("ngIf",g.showSeparator))},dependencies:[k.O5,k.tP,Pn,xD,Dy,Mg],encapsulation:2,changeDetection:0}),d})(),ol=(()=>{class d{constructor(a,g,_){this._filters=a,this._sort=g,this._page=_,this.loading=!1,this._smart=!1,this._displayed=[],this._change=new et.x,this._allChanges=new et.x,this.iteratorTrackBy=(S,j)=>j}get smart(){return this._smart}get all(){return this._all}set all(a){this._all=a,this.emitAllChanges(a),this.smart?this._filterItems():(this._displayed=a,this.emitChange())}get displayed(){return this._displayed}get change(){return this._change.asObservable()}get allChanges(){return this._allChanges.asObservable()}get uninitialized(){return!this._all}destroy(){this._filtersSub&&this._filtersSub.unsubscribe(),this._sortSub&&this._sortSub.unsubscribe(),this._pageSub&&this._pageSub.unsubscribe()}smartenUp(){this._smart=!0,this._filtersSub=this._filters.change.subscribe(()=>this._filterItems()),this._sortSub=this._sort.change.subscribe(()=>{this._sort.comparator?this._sortItems():this._filterItems()}),this._pageSub=this._page.change.subscribe(()=>this._changePage())}refresh(){this.smart&&this._filterItems()}canTrackBy(){return!!this.datagridTrackBy||Array.isArray(this.all)}trackBy(a,g){if(this.datagridTrackBy)return this.datagridTrackBy(a);if(Array.isArray(this.all))return g=g??this.all.indexOf(a),this.iteratorTrackBy(g,a);throw new Error("improper call to Items#trackBy")}emitChange(){this._change.next(this.displayed)}emitAllChanges(a){this._allChanges.next(a)}_filterItems(){this.uninitialized||(this._filtered=this._filters.hasActiveFilters()?this._all.filter(a=>this._filters.accepts(a)):this._all.slice(),this._page.totalItems=this._filtered.length,this._sortItems())}_sortItems(){this.uninitialized||(this._sort.comparator&&this._filtered.sort((a,g)=>this._sort.compare(a,g)),this._changePage())}_changePage(){this.uninitialized||this._page.activated&&0===this._page.size||(this._displayed=this._page.size>0?this._filtered.slice(this._page.firstItem,this._page.lastItem+1):this._filtered,this.emitChange())}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(zo),l.LFG(Ih),l.LFG(aa))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),gc=(()=>{class d{constructor(a,g,_,S){this.template=a,this.differs=g,this.items=_,this.vcr=S,this.differ=null,this.subscriptions=[],_.smartenUp(),this.iterableProxy=new k.sg(this.vcr,this.template,this.differs),this.subscriptions.push(_.change.subscribe(j=>{this.iterableProxy.ngForOf=j,this.iterableProxy.ngDoCheck()}))}set rawItems(a){this._rawItems=a||[]}set trackBy(a){this.items.iteratorTrackBy=a,this.iterableProxy.ngForTrackBy=a}static ngTemplateContextGuard(a,g){return!0}ngDoCheck(){this.differ||(this.differ=this.differs.find(this._rawItems).create(this.iterableProxy.ngForTrackBy)),this.differ&&this.differ.diff(this._rawItems)&&(this.items.all=this._rawItems)}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.Rgc),l.Y36(l.ZZ4),l.Y36(ol),l.Y36(l.s_b))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrDgItems","","clrDgItemsOf",""]],inputs:{rawItems:["clrDgItemsOf","rawItems"],trackBy:["clrDgItemsTrackBy","trackBy"]}}),d})(),Ng=(()=>{class d{constructor(a){this.items=a}get emptyDatagrid(){return!(this.items.loading||this.items.displayed&&0!==this.items.displayed.length)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ol))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-placeholder"]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("datagrid-placeholder-container",!0)},ngContentSelectors:jt,decls:4,vars:4,consts:[["role","row",1,"datagrid-placeholder"],["class","datagrid-placeholder-image",4,"ngIf"],["role","gridcell",1,"datagrid-placeholder-content"],[4,"ngIf"],[1,"datagrid-placeholder-image"]],template:function(a,g){1&a&&(l.F$t(),l.TgZ(0,"div",0),l.YNc(1,V0,1,0,"div",1),l.TgZ(2,"span",2),l.YNc(3,B0,1,0,"ng-content",3),l.qZA()()),2&a&&(l.ekj("datagrid-empty",g.emptyDatagrid),l.xp6(1),l.Q6J("ngIf",g.emptyDatagrid),l.xp6(2),l.Q6J("ngIf",g.emptyDatagrid))},dependencies:[k.O5],encapsulation:2}),d})(),Fg=(()=>{class d{set triggerEl(a){this._triggerEl=a}focusTrigger(){this._triggerEl&&this._triggerEl.focus()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Lg=(()=>{class d{constructor(){this._id=new et.x}get id(){return this._id.asObservable()}setId(a){this._id.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),mc=(()=>{class d{constructor(a,g,_,S,j,J,te){this.toggleService=a,this.el=g,this.commonStrings=_,this.signpostIdService=S,this.signpostFocusManager=j,this.platformId=te,this.subscriptions=[],this.document=J}ngOnInit(){this.signpostFocusManager.triggerEl=this.el.nativeElement,this.subscriptions.push(this.toggleService.openChange.subscribe(a=>{this.ariaExpanded=a;const g=this.isOpen;this.isOpen=a,!this.isOpen&&g&&this.focusOnClose()}),this.signpostIdService.id.subscribe(a=>this.ariaControl=a)),this.addDefaultAriaLabel(this.el.nativeElement)}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}onSignpostTriggerClick(a){this.toggleService.toggleWithEvent(a)}addDefaultAriaLabel(a){a.hasAttribute("aria-label")||a.setAttribute("aria-label",this.commonStrings.keys.signpostToggle)}focusOnClose(){(0,k.NF)(this.platformId)&&!this.isOpen&&this.document.activeElement===this.document.body&&this.signpostFocusManager.focusTrigger()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(mi),l.Y36(l.SBq),l.Y36(pn),l.Y36(Lg),l.Y36(Fg),l.Y36(k.K0),l.Y36(l.Lbi))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrSignpostTrigger",""]],hostAttrs:[1,"signpost-trigger"],hostVars:4,hostBindings:function(a,g){1&a&&l.NdJ("click",function(S){return g.onSignpostTriggerClick(S)}),2&a&&(l.uIk("aria-expanded",g.ariaExpanded)("aria-controls",g.ariaControl),l.ekj("active",g.isOpen))}}),d})(),Ah=(()=>{class d{constructor(a){this.commonStrings=a,this.useCustomTrigger=!1}set customTrigger(a){this.useCustomTrigger=!!a}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(pn))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-signpost"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,mc,5),2&a){let S;l.iGM(S=l.CRH())&&(g.customTrigger=S.first)}},hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("signpost",!0)},features:[l._Bn([Fg,Lg]),l.zW0([ia])],ngContentSelectors:jt,decls:2,vars:1,consts:[[4,"ngIf"],["type","button","clrSignpostTrigger","",1,"signpost-action","btn","btn-small","btn-icon","btn-link"],["shape","info-circle"]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,Bo,3,1,"ng-container",0),l.Hsn(1)),2&a&&l.Q6J("ngIf",!g.useCustomTrigger)},dependencies:[k.O5,Pn,mc],encapsulation:2}),d})(),Vg=(()=>{class d{constructor(){this._dynamic=!1}ngAfterViewInit(){this.cellView=this.templateRef.createEmbeddedView(null)}ngOnDestroy(){this.cellView.destroy()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["dg-wrapped-cell"]],viewQuery:function(a,g){if(1&a&&l.Gf(Mp,5),2&a){let _;l.iGM(_=l.CRH())&&(g.templateRef=_.first)}},ngContentSelectors:jt,decls:2,vars:0,consts:[["cellPortal",""]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,H0,1,0,"ng-template",null,0,l.W1O))},encapsulation:2}),d})(),xu=(()=>{class d{constructor(a){this.vcr=a}get _view(){return this.wrappedInjector.get(Vg,this.vcr).cellView}ngOnInit(){this.wrappedInjector=new _u(Vg,this.vcr)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-cell"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Ah,4),2&a){let S;l.iGM(S=l.CRH())&&(g.signpost=S)}},hostAttrs:["role","gridcell"],hostVars:4,hostBindings:function(a,g){2&a&&l.ekj("datagrid-cell",!0)("datagrid-signpost-trigger",g.signpost.length>0)},ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),Ou=0,Ru=(()=>{class d extends Br{constructor(){super(),this.expandableId="",this._replace=new fn.X(!1),this._animate=new et.x,Ou++,this.expandableId="clr-dg-expandable-row-"+Ou}get expanded(){return this._expanded}set expanded(a){(a=!!a)!==this._expanded&&(this._expanded=a,this._animate.next(),this._expandChange.next(a))}get replace(){return this._replace.asObservable()}get animate(){return this._animate.asObservable()}loadingStateChange(a){super.loadingStateChange(a),a!==Sr.LOADING&&this._animate.next()}setReplace(a){this._replace.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();var vc=function(d){return d[d.DISPLAY=0]="DISPLAY",d[d.CALCULATE=1]="CALCULATE",d}(vc||{}),Mn=function(d){return d[d.None=0]="None",d[d.Single=1]="Single",d[d.Multi=2]="Multi",d}(Mn||{});let Bg=(()=>{class d{constructor(){this._dynamic=!1}ngAfterViewInit(){this.rowView=this.templateRef.createEmbeddedView(null)}ngOnDestroy(){this.rowView.destroy()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["dg-wrapped-row"]],viewQuery:function(a,g){if(1&a&&l.Gf(t_,5),2&a){let _;l.iGM(_=l.CRH())&&(g.templateRef=_.first)}},ngContentSelectors:jt,decls:2,vars:0,consts:[["rowPortal",""]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,j0,1,0,"ng-template",null,0,l.W1O))},encapsulation:2}),d})(),OD=0,al=(()=>{class d{constructor(a,g){this._items=a,this._filters=g,this.preserveSelection=!1,this.shiftPressed=!1,this.rowSelectionMode=!1,this.prevSelectionRefs=[],this.lockedRefs=[],this.valueCollector=new et.x,this._selectionType=Mn.None,this._change=new et.x,this.subscriptions=[],this.id="clr-dg-selection"+OD++,this.subscriptions.push(this._filters.change.subscribe(()=>{!this._selectable||this.preserveSelection||this.clearSelection()})),this.subscriptions.push(this._items.allChanges.subscribe(_=>{const S=[];switch(this.selectionType){case Mn.None:break;case Mn.Single:{let j,J=!1;this.currentSingle&&!this.prevSingleSelectionRef&&this._items.canTrackBy()&&(this.prevSingleSelectionRef=this._items.trackBy(this.currentSingle)),_.forEach((te,Ce)=>{const Ge=this._items.trackBy(te,Ce);this.prevSingleSelectionRef===Ge&&(j=te,J=!0),this.lockedRefs.indexOf(Ge)>-1&&S.push(Ge)}),this._items.smart&&!j&&(J=!0),setTimeout(()=>{J&&(this.currentSingle=j)},0);break}case Mn.Multi:{let j=this.current.slice(),J=!1;this.current.length>0&&this.prevSelectionRefs.length!==this.current.length&&this._items.canTrackBy()&&(this.prevSelectionRefs=[],this.current.forEach(te=>{this.prevSelectionRefs.push(this._items.trackBy(te))})),_.forEach((te,Ce)=>{const Ge=this._items.trackBy(te,Ce);this.lockedRefs.indexOf(Ge)>-1&&S.push(Ge)}),j.length>0&&(_.forEach((te,Ce)=>{const Ge=this._items.trackBy(te,Ce),St=this.prevSelectionRefs.indexOf(Ge);St>-1&&(j[St]=te,J=!0)}),this._items.smart&&(j=j.filter(te=>_.indexOf(te)>-1),this.current.length!==j.length&&(J=!0)),setTimeout(()=>{J&&(this.current=j)},0));break}}this.lockedRefs=S})),this.subscriptions.push(this.valueCollector.pipe((0,Zn.b)(0)).subscribe(()=>this.emitChange()))}get selectionType(){return this._selectionType}set selectionType(a){a!==this.selectionType&&(this._selectionType=a,a===Mn.None?delete this.current:this.updateCurrent([],!1))}get current(){return this._current}set current(a){this.updateCurrent(a,!0)}get currentSingle(){return this._currentSingle}set currentSingle(a){a!==this._currentSingle&&(this._currentSingle=a,this._items.canTrackBy()&&a&&(this.prevSingleSelectionRef=this._items.trackBy(a)),this.emitChange())}get change(){return this._change.asObservable()}get _selectable(){return this._selectionType===Mn.Multi||this._selectionType===Mn.Single}clearSelection(){this._current=[],this.prevSelectionRefs=[],this.prevSingleSelectionRef=null,this._currentSingle=null,this.emitChange()}destroy(){this.subscriptions.forEach(a=>a.unsubscribe())}updateCurrent(a,g){this._current=a,g&&this.valueCollector.next(a)}isSelected(a){return this._selectionType===Mn.Single?this.currentSingle===a:this._selectionType===Mn.Multi&&this.current.indexOf(a)>=0}setSelected(a,g){const _=this.current?this.current.indexOf(a):-1;switch(this._selectionType){case Mn.None:case Mn.Single:break;case Mn.Multi:_>=0&&!g?this.deselectItem(_):_<0&&g&&this.selectItem(a)}}isAllSelected(){if(this._selectionType!==Mn.Multi||!this._items.displayed)return!1;const a=this._items.displayed.filter(S=>!1===this.isLocked(S));return!(a.length<1)&&a.filter(S=>this.current.indexOf(S)>-1).length===a.length}lockItem(a,g){if(this.canItBeLocked()){const _=this._items.trackBy(a);!0===g?this.lockedRefs.push(_):this.lockedRefs=this.lockedRefs.filter(S=>_!==S)}}isLocked(a){if(this.canItBeLocked()){const g=this._items.trackBy(a);return this.lockedRefs.indexOf(g)>-1}return!1}toggleAll(){this._selectionType===Mn.None||this._selectionType===Mn.Single||(this.isAllSelected()?this._items.displayed.forEach(a=>{const g=this.current.indexOf(a);g>-1&&!1===this.isLocked(a)&&this.deselectItem(g)}):this._items.displayed.forEach(a=>{this.current.indexOf(a)<0&&!1===this.isLocked(a)&&this.selectItem(a)}))}selectItem(a){this.current=this.current.concat(a),this._items.canTrackBy()&&this.prevSelectionRefs.push(this._items.trackBy(a))}deselectItem(a){if(this.current=this.current.slice(0,a).concat(this.current.slice(a+1)),a_!==g[0])}}canItBeLocked(){return this._selectionType!==Mn.None&&this._items.canTrackBy()}emitChange(){this._selectionType===Mn.Single?this._change.next(this.currentSingle):this._selectionType===Mn.Multi&&this._change.next(this.current)}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(ol),l.LFG(zo))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),_c=(()=>{class d{constructor(a){this._view=new fn.X(vc.DISPLAY),this.subscriptions=[],this.subscriptions.push(a.filterRenderSteps(Eo.CALCULATE_MODE_ON).subscribe(()=>this._view.next(vc.CALCULATE))),this.subscriptions.push(a.filterRenderSteps(Eo.CALCULATE_MODE_OFF).subscribe(()=>this._view.next(vc.DISPLAY)))}get view(){return this._view.asObservable()}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(sl))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Hg=(()=>{class d{constructor(a){this.selection=a}onSelectionCellClick(a){this.selection.rowSelectionMode||"LABEL"!==a.target.tagName&&"INPUT"!==a.target.tagName&&a.target.querySelector("input").click()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(al))},d.\u0275dir=l.lG2({type:d,selectors:[["",8,"datagrid-select"]],hostBindings:function(a,g){1&a&&l.NdJ("click",function(S){return g.onSelectionCellClick(S)})}}),d})(),Mh=0,xh=(()=>{class d{constructor(a,g,_,S,j,J,te,Ce,Ge,St,Rt,un){this.selection=a,this.rowActionService=g,this.globalExpandable=_,this.expand=S,this.detailService=j,this.displayMode=J,this.vcr=te,this.renderer=Ce,this.el=Ge,this.commonStrings=St,this.items=Rt,this.document=un,this.selectedChanged=new l.vpe(!1),this.expandedChange=new l.vpe(!1),this.displayCells=!1,this.expandAnimationTrigger=!1,this.SELECTION_TYPE=Mn,this.itemChanges=new ds(1),this._selected=!1,this._detailOpenLabel="",this._detailCloseLabel="",this._rowAriaLabel="",this.subscriptions=[],this._selectable=!0,Mh++,this.id="clr-dg-row"+Mh,this.radioId="clr-dg-row-rd"+Mh,this.checkboxId="clr-dg-row-cb"+Mh,this.expandableId=S.expandableId,this.subscriptions.push((0,z.a)(this.expand.replace,this.expand.expandChange).subscribe(([Xn,bi])=>{Xn&&bi?(this.replaced=!0,this.renderer.addClass(this.el.nativeElement,"datagrid-row-replaced")):(this.replaced=!1,this.renderer.removeClass(this.el.nativeElement,"datagrid-row-replaced"))}))}get item(){return this._item}set item(a){this._item=a,this.itemChanges.next(a),this.clrDgSelectable=this._selectable}get clrDgSelectable(){return!this.selection.isLocked(this.item)}set clrDgSelectable(a){this.item&&this.selection.lockItem(this.item,"false"===a||!1===a),this._selectable=a}get selected(){return this.selection.selectionType===Mn.None?this._selected:this.selection.isSelected(this.item)}set selected(a){this.selection.selectionType===Mn.None?this._selected=a:(a&&this.selection.selectionType===Mn.Multi?this.rangeSelect():this.selection.rangeStart=null,this.selection.setSelected(this.item,a))}get expanded(){return this.expand.expanded}set expanded(a){this.expand.expanded=a}get clrDgDetailOpenLabel(){return this._detailOpenLabel?this._detailOpenLabel:this.commonStrings.keys.open}set clrDgDetailOpenLabel(a){this._detailOpenLabel=a}get clrDgDetailCloseLabel(){return this._detailCloseLabel?this._detailCloseLabel:this.commonStrings.keys.close}set clrDgDetailCloseLabel(a){this._detailCloseLabel=a}get clrDgRowAriaLabel(){return this._rowAriaLabel?this._rowAriaLabel:this.commonStrings.keys.select}set clrDgRowAriaLabel(a){this._rowAriaLabel=a}get _view(){return this.wrappedInjector.get(Bg,this.vcr).rowView}ngOnInit(){this.wrappedInjector=new _u(Bg,this.vcr),this.selection.lockItem(this.item,!1===this.clrDgSelectable)}ngAfterContentInit(){this.dgCells.changes.subscribe(()=>{this.dgCells.forEach(a=>{a._view.destroyed||this._scrollableCells.insert(a._view)})})}ngAfterViewInit(){this.subscriptions.push(this.displayMode.view.subscribe(a=>{for(let g=this._scrollableCells.length;g>0;g--)this._scrollableCells.detach();for(let g=this._calculatedCells.length;g>0;g--)this._calculatedCells.detach();a===vc.CALCULATE?(this.displayCells=!1,this.dgCells.forEach(g=>{g._view.destroyed||this._calculatedCells.insert(g._view)})):(this.displayCells=!0,this.dgCells.forEach(g=>{g._view.destroyed||this._scrollableCells.insert(g._view)}))}),this.expand.animate.subscribe(()=>{this.expandAnimationTrigger=!this.expandAnimationTrigger}))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}toggle(a=!this.selected){a!==this.selected&&(this.selected=a,this.selectedChanged.emit(a))}toggleExpand(){this.expand.expandable&&(this.expandAnimation.updateStartHeight(),this.expanded=!this.expanded,this.expandedChange.emit(this.expanded))}clearRanges(a){a.shiftKey&&(this.document.getSelection().removeAllRanges(),-1!==window.navigator.userAgent.indexOf("Firefox")&&(a.preventDefault(),this.toggle(!0)))}selectRow(a=!this.selected,g){"LABEL"!==g.target.tagName&&(this.selection.selectionType===this.SELECTION_TYPE.Single?this.selection.currentSingle=this.item:this.toggle(a))}rangeSelect(){const a=this.items.displayed;if(!a)return;const g=a.indexOf(this.selection.rangeStart);if(this.selection.rangeStart&&this.selection.current.includes(this.selection.rangeStart)&&this.selection.shiftPressed&&-1!==g){const _=a.indexOf(this.item),S=new Set(this.selection.current.concat(a.slice(Math.min(g,_),Math.max(g,_)+1)));this.selection.clearSelection(),this.selection.current.push(...S)}else this.selection.rangeStart=this.item}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(al),l.Y36(rl),l.Y36(pc),l.Y36(Ru),l.Y36(io),l.Y36(_c),l.Y36(l.s_b),l.Y36(l.Qsj),l.Y36(l.SBq),l.Y36(pn),l.Y36(ol),l.Y36(k.K0))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-row"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,xu,4),2&a){let S;l.iGM(S=l.CRH())&&(g.dgCells=S)}},viewQuery:function(a,g){if(1&a&&(l.Gf(vu,5),l.Gf(n_,5),l.Gf(i_,5,l.s_b),l.Gf(Ud,5,l.s_b),l.Gf(xp,5,l.s_b)),2&a){let _;l.iGM(_=l.CRH())&&(g.expandAnimation=_.first),l.iGM(_=l.CRH())&&(g.detailButton=_.first),l.iGM(_=l.CRH())&&(g._stickyCells=_.first),l.iGM(_=l.CRH())&&(g._scrollableCells=_.first),l.iGM(_=l.CRH())&&(g._calculatedCells=_.first)}},hostAttrs:["role","rowgroup"],hostVars:5,hostBindings:function(a,g){2&a&&(l.uIk("aria-owns",g.id),l.ekj("datagrid-row",!0)("datagrid-selected",g.selected))},inputs:{item:["clrDgItem","item"],clrDgSelectable:"clrDgSelectable",selected:["clrDgSelected","selected"],expanded:["clrDgExpanded","expanded"],clrDgDetailOpenLabel:"clrDgDetailOpenLabel",clrDgDetailCloseLabel:"clrDgDetailCloseLabel",clrDgRowAriaLabel:"clrDgRowAriaLabel"},outputs:{selectedChanged:"clrDgSelectedChange",expandedChange:"clrDgExpandedChange"},features:[l._Bn([Ru,{provide:Br,useExisting:Ru},{provide:wa,useExisting:Ru}])],ngContentSelectors:Z0,decls:9,vars:3,consts:[["class","datagrid-row-clickable",3,"mousedown","click",4,"ngIf"],[3,"clrExpandTrigger",4,"ngIf"],[4,"ngIf"],["detail",""],["rowContent",""],["calculatedCells",""],[1,"datagrid-row-clickable",3,"mousedown","click"],[3,"clrExpandTrigger"],[3,"ngTemplateOutlet"],["role","row",1,"datagrid-row-master","datagrid-row-flex",3,"id"],[1,"datagrid-row-sticky"],["stickyCells",""],["class","datagrid-select datagrid-fixed-column datagrid-cell","role","gridcell",3,"ngClass",4,"ngIf"],["class","datagrid-row-actions datagrid-fixed-column datagrid-cell","role","gridcell",4,"ngIf"],["class","datagrid-expandable-caret datagrid-fixed-column datagrid-cell","role","gridcell",4,"ngIf"],["class","datagrid-detail-caret datagrid-fixed-column datagrid-cell","role","gridcell",4,"ngIf"],[1,"datagrid-row-scrollable",3,"ngClass"],[1,"datagrid-scrolling-cells"],["scrollableCells",""],["role","gridcell",1,"datagrid-select","datagrid-fixed-column","datagrid-cell",3,"ngClass"],["type","checkbox","clrCheckbox","",3,"ngModel","id","disabled","ngModelChange"],[1,"clr-control-label","clr-col-null",3,"for","click"],[1,"clr-sr-only"],["type","radio","clrRadio","",3,"id","name","value","ngModel","checked","disabled","ngModelChange"],[1,"clr-control-label","clr-col-null",3,"for"],["role","gridcell",1,"datagrid-row-actions","datagrid-fixed-column","datagrid-cell"],["role","gridcell",1,"datagrid-expandable-caret","datagrid-fixed-column","datagrid-cell"],["type","button","class","datagrid-expandable-caret-button",3,"click",4,"ngIf"],["clrSmall","",4,"ngIf"],["type","button",1,"datagrid-expandable-caret-button",3,"click"],["shape","angle",1,"datagrid-expandable-caret-icon"],["clrSmall",""],["role","gridcell",1,"datagrid-detail-caret","datagrid-fixed-column","datagrid-cell"],["type","button","aria-haspopup","dialog",1,"datagrid-detail-caret-button",3,"click"],["detailButton",""],["shape","angle-double",1,"datagrid-detail-caret-icon"]],template:function(a,g){1&a&&(l.F$t(au),l.YNc(0,a_,3,2,"div",0),l.YNc(1,ta,2,2,"clr-expandable-animation",1),l.YNc(2,U0,1,1,null,2),l.YNc(3,Rp,1,0,"ng-template",null,3,l.W1O),l.YNc(5,p_,16,13,"ng-template",null,4,l.W1O),l.GkF(7,null,5)),2&a&&(l.Q6J("ngIf",g.selection.rowSelectionMode),l.xp6(1),l.Q6J("ngIf",!g.selection.rowSelectionMode&&g.expand.expandable),l.xp6(1),l.Q6J("ngIf",!g.selection.rowSelectionMode&&!g.expand.expandable))},dependencies:[k.mk,k.O5,k.tP,Pn,Ir,Cu,sc,vy,my,Y.Fj,Y.Wl,Y._,Y.JJ,Y.On,vu,oc,Hg],encapsulation:2}),d})();var ss=function(d){return d[d.WIDTH=0]="WIDTH",d[d.HIDDEN=1]="HIDDEN",d}(ss||{});const Oh=Object.keys(ss).map(d=>ss[d]).filter(d=>d===parseInt(d,10));let Uo=(()=>{class d{constructor(){this.columns=[],this._cache=[]}get columnStates(){return this.columns.map(a=>a.value)}get hasHideableColumns(){return this.columnStates.filter(a=>a.hideable).length>0}cache(){this._cache=this.columns.map(a=>{const g={...a.value};return delete g.changes,g})}hasCache(){return!!this._cache.length}resetToLastCache(){this._cache.forEach((a,g)=>{this.columns[g].next({...a,changes:Oh})}),this._cache=[]}emitStateChangeAt(a,g){this.columns[a]&&this.emitStateChange(this.columns[a],g)}emitStateChange(a,g){a.next({...a.value,...g})}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Ey=(()=>{class d{constructor(a,g,_,S){this.filters=a,this.sort=g,this.page=_,this.debouncer=S,this.change=this.debouncer.change.pipe((0,zt.U)(()=>this.state))}get state(){const a={};this.page.size>0&&(a.page={from:this.page.firstItem,to:this.page.lastItem,size:this.page.size,current:this.page.current}),this.sort.comparator&&(a.sort=this.sort.comparator instanceof Rg?{by:this.sort.comparator.prop,reverse:this.sort.reverse}:{by:this.sort.comparator,reverse:this.sort.reverse});const g=this.filters.getActiveFilters();if(g.length>0){a.filters=[];for(const _ of g)a.filters.push(_.state?_.state:_)}return a}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(zo),l.LFG(Ih),l.LFG(aa),l.LFG(Eu))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),jg=(()=>{class d{constructor(a){this.zone=a,this.listenersAdded=!1,this.destroy$=new et.x,this.config={keyGridRows:"[role=row]:not(.datagrid-placeholder)",keyGridCells:"[role=gridcell]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), [role=columnheader]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), .datagrid-detail-caret",keyGrid:"[role=grid]"}}get grid(){return this.host?.querySelector(this.config.keyGrid)}get rows(){return this.host?.querySelectorAll(this.config.keyGridRows)}get cells(){return this.host?.querySelectorAll(this.config.keyGridCells)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}addListeners(){this.listenersAdded||(this.zone.runOutsideAngular(()=>{(0,ki.R)(this.grid,"mousedown").pipe((0,Xr.R)(this.destroy$)).subscribe(a=>{if(1===a.buttons&&!a.ctrlKey){const g=this.cells?Array.from(this.cells).find(_=>_===a.target||_===a.target.closest(this.config.keyGridCells)):null;g&&this.setActiveCell(g)}}),(0,ki.R)(this.grid,"keydown").pipe((0,Xr.R)(this.destroy$)).subscribe(a=>{if((!a.target.classList.contains("drag-handle")||"ArrowLeft"!==a.code&&"ArrowRight"!==a.code)&&("ArrowUp"===a.code||"ArrowDown"===a.code||"ArrowLeft"===a.code||"ArrowRight"===a.code||"End"===a.code||"Home"===a.code||"PageUp"===a.code||"PageDown"===a.code)){const{x:g,y:_}=this.getNextItemCoordinate(a),S=this.rows?Array.from(this.rows[_].querySelectorAll(this.config.keyGridCells))[g]:null;S&&this.setActiveCell(S),a.preventDefault()}})}),this.listenersAdded=!0)}initializeKeyGrid(a){this.host=a,this.addListeners(),this.resetKeyGrid()}resetKeyGrid(){this.cells?.forEach(g=>g.setAttribute("tabindex","-1")),(this.cells?this.cells[0]:null)?.setAttribute("tabindex","0")}setActiveCell(a){const g=this.cells?Array.from(this.cells).find(j=>"0"===j.getAttribute("tabindex")):null;g&&g.setAttribute("tabindex","-1"),a.setAttribute("tabindex","0");const _=function Ty(d){const f=["a[href]","area[href]","input:not([disabled])","button:not([disabled])","select:not([disabled])","textarea:not([disabled])","iframe","object","embed","*[tabindex]","*[contenteditable=true]","[role=button]:not([disabled])"].join(",");return Array.from(d.querySelectorAll(f))}(a);("columnheader"!==a.getAttribute("role")&&_[0]?_[0]:a).focus()}getNextItemCoordinate(a){let g=this.cells?Array.from(this.cells).find(un=>"0"===un.getAttribute("tabindex")):null;"Tab"===a.code&&(g=document.activeElement);const _=this.rows&&g?Array.from(this.rows).find(un=>un.contains(g)):null,S=this.rows?this.rows.length-1:0,j=this.cells?this.cells.length/this.rows.length-1:0;let J=_&&g?Array.from(_.querySelectorAll(this.config.keyGridCells)).indexOf(g):0,te=_&&g&&this.rows?Array.from(this.rows).indexOf(_):0;const Ce=this.host.dir,Ge="rtl"===Ce?"ArrowRight":"ArrowLeft",St="rtl"===Ce?"ArrowLeft":"ArrowRight",Rt=Math.floor(this.host?.querySelector(".datagrid").clientHeight/this.rows[0].clientHeight)-1||0;return"ArrowUp"===a.code&&0!==te?te-=1:"ArrowDown"===a.code&&te0?te-Rt:0:"PageDown"===a.code&&(te=te+Rt{class d{constructor(a,g,_,S,j,J,te,Ce,Ge,St,Rt,un,Xn,bi,Ds,ef){this.organizer=a,this.items=g,this.expandableRows=_,this.selection=S,this.rowActionService=j,this.stateProvider=J,this.displayMode=te,this.renderer=Ce,this.detailService=Ge,this.document=St,this.el=Rt,this.page=un,this.commonStrings=Xn,this.columnsService=bi,this.keyNavigation=Ds,this.zone=ef,this.clrDgSingleSelectionAriaLabel=this.commonStrings.keys.singleSelectionAriaLabel,this.clrDgSingleActionableAriaLabel=this.commonStrings.keys.singleActionableAriaLabel,this.clrDetailExpandableAriaLabel=this.commonStrings.keys.detailExpandableAriaLabel,this.clrDgDisablePageFocus=!1,this.selectedChanged=new l.vpe(!1),this.singleSelectedChanged=new l.vpe(!1),this.refresh=new l.vpe(!1),this.SELECTION_TYPE=Mn,this._subscriptions=[];const Dc=dr();this.selectAllId="clr-dg-select-all-"+Dc,this.detailService.id=Dc}get loading(){return this.items.loading}set loading(a){this.items.loading=a}set selected(a){this.selection.selectionType=a?Mn.Multi:Mn.None,this.selection.updateCurrent(a,!1)}set singleSelected(a){this.selection.selectionType=Mn.Single,a?this.selection.currentSingle=a:this.selection.currentSingle&&(this.selection.currentSingle=null)}set clrDgPreserveSelection(a){this.selection.preserveSelection=a}set rowSelectionMode(a){this.selection.rowSelectionMode=a}set trackBy(a){this.items.datagridTrackBy=a}get allSelected(){return this.selection.isAllSelected()}set allSelected(a){this.selection.toggleAll()}ngAfterContentInit(){this.items.smart||(this.items.all=this.rows.map(g=>g.item));const a=this.rows.changes.pipe((0,Ms.w)(g=>(0,$.T)((0,es.of)(g.map(_=>_.item)),(0,z.a)(g.map(_=>_.itemChanges)).pipe((0,Zn.b)(0)))));this._subscriptions.push(a.subscribe(g=>{this.items.smart||(this.items.all=g)}),this.rows.changes.subscribe(()=>{for(let g=this._displayedRows.length-1;g>=0;g--)this._displayedRows.get(g).destroyed&&this._displayedRows.remove(g);if(this.rows.forEach(g=>{this._displayedRows.insert(g._view)}),this.detailService.state&&this.detailService.isOpen){const g=this.items.canTrackBy()?this.rows.find(_=>this.items.trackBy(_.item)===this.items.trackBy(this.detailService.state)):void 0;g?this.detailService.open(g.item,g.detailButton.nativeElement):this.detailService.close()}}))}ngAfterViewInit(){this.keyNavigation.initializeKeyGrid(this.el.nativeElement),this.refresh.emit(this.stateProvider.state),this._subscriptions.push(this.stateProvider.change.subscribe(a=>this.refresh.emit(a)),this.selection.change.subscribe(a=>{this.selection.selectionType===Mn.Single?this.singleSelectedChanged.emit(a):this.selection.selectionType===Mn.Multi&&this.selectedChanged.emit(a)}),this.page.change.subscribe(()=>{this.keyNavigation.resetKeyGrid(),this.clrDgDisablePageFocus||this.datagridTable.nativeElement.focus()}),(0,z.a)(this.columnsService.columns).subscribe(()=>this.keyNavigation?.resetKeyGrid()),this.displayMode.view.subscribe(a=>{for(let g=this._projectedDisplayColumns.length;g>0;g--)this._projectedDisplayColumns.detach();for(let g=this._projectedCalculationColumns.length;g>0;g--)this._projectedCalculationColumns.detach();for(let g=this._calculationRows.length;g>0;g--)this._calculationRows.detach();for(let g=this._displayedRows.length;g>0;g--)this._displayedRows.detach();a===vc.DISPLAY?(this.renderer.removeClass(this.el.nativeElement,"datagrid-calculate-mode"),this.columns.forEach(g=>{this._projectedDisplayColumns.insert(g._view)}),this.rows.forEach(g=>{this._displayedRows.insert(g._view)})):(this.renderer.addClass(this.el.nativeElement,"datagrid-calculate-mode"),this.columns.forEach(g=>{this._projectedCalculationColumns.insert(g._view)}),this.rows.forEach(g=>{this._calculationRows.insert(g._view)}))})),this.zone.runOutsideAngular(()=>{this._subscriptions.push((0,ki.R)(this.document.body,"keydown").subscribe(a=>{"Shift"===a.key&&(this.selection.shiftPressed=!0)}),(0,ki.R)(this.document.body,"keyup").subscribe(a=>{"Shift"===a.key&&(this.selection.shiftPressed=!1)}))})}ngOnDestroy(){this._subscriptions.forEach(a=>a.unsubscribe())}resize(){this.organizer.resize()}dataChanged(){this.items.refresh()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(sl),l.Y36(ol),l.Y36(pc),l.Y36(al),l.Y36(rl),l.Y36(Ey),l.Y36(_c),l.Y36(l.Qsj),l.Y36(io),l.Y36(k.K0),l.Y36(l.SBq),l.Y36(aa),l.Y36(pn),l.Y36(Uo),l.Y36(jg),l.Y36(l.R0b))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-datagrid"]],contentQueries:function(a,g,_){if(1&a&&(l.Suo(_,gc,5),l.Suo(_,Ng,5),l.Suo(_,kg,4),l.Suo(_,xh,4)),2&a){let S;l.iGM(S=l.CRH())&&(g.iterator=S.first),l.iGM(S=l.CRH())&&(g.placeholder=S.first),l.iGM(S=l.CRH())&&(g.columns=S),l.iGM(S=l.CRH())&&(g.rows=S)}},viewQuery:function(a,g){if(1&a&&(l.Gf(g_,5,l.SBq),l.Gf(m_,5,l.s_b),l.Gf(Q0,5,l.s_b),l.Gf(q0,5,l.s_b),l.Gf(lu,5,l.s_b),l.Gf(K0,5,l.s_b)),2&a){let _;l.iGM(_=l.CRH())&&(g.datagridTable=_.first),l.iGM(_=l.CRH())&&(g.scrollableColumns=_.first),l.iGM(_=l.CRH())&&(g._projectedDisplayColumns=_.first),l.iGM(_=l.CRH())&&(g._projectedCalculationColumns=_.first),l.iGM(_=l.CRH())&&(g._displayedRows=_.first),l.iGM(_=l.CRH())&&(g._calculationRows=_.first)}},hostVars:4,hostBindings:function(a,g){2&a&&l.ekj("datagrid-host",!0)("datagrid-detail-open",g.detailService.isOpen)},inputs:{clrDgSingleSelectionAriaLabel:"clrDgSingleSelectionAriaLabel",clrDgSingleActionableAriaLabel:"clrDgSingleActionableAriaLabel",clrDetailExpandableAriaLabel:"clrDetailExpandableAriaLabel",clrDgDisablePageFocus:"clrDgDisablePageFocus",loading:["clrDgLoading","loading"],selected:["clrDgSelected","selected"],singleSelected:["clrDgSingleSelected","singleSelected"],clrDgPreserveSelection:"clrDgPreserveSelection",rowSelectionMode:["clrDgRowSelection","rowSelectionMode"],trackBy:["clrDgItemsTrackBy","trackBy"]},outputs:{selectedChanged:"clrDgSelectedChange",singleSelectedChanged:"clrDgSingleSelectedChange",refresh:"clrDgRefresh"},features:[l._Bn([al,Ih,zo,aa,ol,sl,rl,pc,Eu,io,Ey,Mu,Uo,_c,jg])],ngContentSelectors:v_,decls:32,vars:7,consts:[[1,"datagrid-outer-wrapper"],[1,"datagrid-inner-wrapper"],[1,"datagrid"],["datagrid",""],[1,"datagrid-table-wrapper"],["role","grid","tabindex","-1",1,"datagrid-table"],["datagridTable",""],["role","rowgroup",1,"datagrid-header"],["role","row",1,"datagrid-row"],[1,"datagrid-row-master","datagrid-row-flex"],[1,"datagrid-row-sticky"],["role","columnheader","class","datagrid-column datagrid-select datagrid-fixed-column",3,"keydown.space",4,"ngIf"],["role","columnheader","class","datagrid-column datagrid-select datagrid-fixed-column",4,"ngIf"],["role","columnheader","class","datagrid-column datagrid-row-actions datagrid-fixed-column",4,"ngIf"],["role","columnheader","class","datagrid-column datagrid-expandable-caret datagrid-fixed-column",4,"ngIf"],[1,"datagrid-row-scrollable"],["projectedDisplayColumns",""],["displayedRows",""],[4,"ngIf"],["class","datagrid-spinner",4,"ngIf"],[1,"datagrid-calculation-table"],[1,"datagrid-calculation-header"],["projectedCalculationColumns",""],["calculationRows",""],["role","columnheader",1,"datagrid-column","datagrid-select","datagrid-fixed-column",3,"keydown.space"],[1,"clr-checkbox-wrapper"],["type","checkbox","tabindex","-1",3,"id","ngModel","ngModelChange"],[1,"clr-control-label","clr-col-null",3,"for"],[1,"clr-sr-only"],[1,"datagrid-column-separator"],["role","columnheader",1,"datagrid-column","datagrid-select","datagrid-fixed-column"],["role","columnheader",1,"datagrid-column","datagrid-row-actions","datagrid-fixed-column"],["role","columnheader",1,"datagrid-column","datagrid-expandable-caret","datagrid-fixed-column"],[1,"datagrid-spinner"],["clrMedium",""]],template:function(a,g){1&a&&(l.F$t(rS),l.Hsn(0),l.TgZ(1,"div",0)(2,"div",1)(3,"div",2,3)(5,"div",4)(6,"div",5,6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10),l.YNc(12,J0,7,5,"div",11),l.YNc(13,X0,2,1,"div",12),l.YNc(14,eS,2,1,"div",13),l.YNc(15,tS,2,1,"div",14),l.qZA(),l.TgZ(16,"div",15),l.GkF(17,null,16),l.qZA()()()(),l.GkF(19,null,17),l.Hsn(21,1),l.YNc(22,nS,1,0,"clr-dg-placeholder",18),l.qZA()()(),l.Hsn(23,2),l.YNc(24,iS,3,0,"div",19),l.qZA(),l.Hsn(25,3),l.qZA(),l.TgZ(26,"div",20)(27,"div",21),l.GkF(28,null,22),l.qZA(),l.GkF(30,null,23),l.qZA()),2&a&&(l.xp6(3),l.uIk("aria-hidden",!!g.detailService.isOpen||null),l.xp6(9),l.Q6J("ngIf",g.selection.selectionType===g.SELECTION_TYPE.Multi),l.xp6(1),l.Q6J("ngIf",g.selection.selectionType===g.SELECTION_TYPE.Single),l.xp6(1),l.Q6J("ngIf",g.rowActionService.hasActionableRow),l.xp6(1),l.Q6J("ngIf",g.expandableRows.hasExpandableRow||g.detailService.enabled),l.xp6(7),l.Q6J("ngIf",!g.placeholder),l.xp6(2),l.Q6J("ngIf",g.loading))},dependencies:[k.O5,Ir,Y.Wl,Y.JJ,Y.On,oc,Ng,Hg],encapsulation:2}),d})();const $g=d=>d;let Rh=(()=>{class d{constructor(a){this._items=a}set trackBy(a){a!==$g&&this._items&&(this._items.iteratorTrackBy=a)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ol,8))},d.\u0275dir=l.lG2({type:d,selectors:[["","ngForTrackBy",""]],inputs:{trackBy:["ngForTrackBy","trackBy"]}}),d})(),Ph=(()=>{class d{constructor(a,g){this.commonStrings=a,this.columnsService=g,this.allSelected=new l.vpe}get clrAllSelected(){return this.allSelected.asObservable()}get allHideablesVisible(){return 0===this.hideableColumns().filter(a=>a.value.hidden).length}selectAll(){this.hideableColumns().forEach(a=>this.columnsService.emitStateChange(a,{hidden:!1,changes:[ss.HIDDEN]})),this.allSelected.next(!0)}hideableColumns(){return this.columnsService.columns.filter(a=>a.value.hideable)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(pn),l.Y36(Uo))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-column-toggle-button"]],outputs:{clrAllSelected:"clrAllSelected"},decls:2,vars:2,consts:[["type","button",1,"btn","btn-sm","btn-link","switch-button",3,"disabled","click"]],template:function(a,g){1&a&&(l.TgZ(0,"button",0),l.NdJ("click",function(){return g.selectAll()}),l._uU(1),l.qZA()),2&a&&(l.Q6J("disabled",g.allHideablesVisible),l.xp6(1),l.hij(" ",g.commonStrings.keys.selectAll," "))},encapsulation:2}),d})(),Ay=(()=>{class d{constructor(a,g,_){this.commonStrings=a,this.columnsService=g,this.popoverId=dr(),this.smartPosition={axis:Hr.VERTICAL,side:no.BEFORE,anchor:bn.START,content:bn.START},this.trackByFn=$g,this.subscription=_.openChange.subscribe(S=>this.openState=S)}get allColumnsVisible(){return this._allColumnsVisible}set allColumnsVisible(a){this._allColumnsVisible=a}get hideableColumnStates(){return this.columnsService.columns.filter(g=>g.value.hideable).map(g=>g.value)}get hasOnlyOneVisibleColumn(){return this.columnsService.columns.length-this.hideableColumnStates.length==0&&1===this.hideableColumnStates.filter(g=>!g.hidden).length}ngOnDestroy(){this.subscription.unsubscribe()}toggleColumnState(a,g){const _=this.columnsService.columns.filter(S=>S.value===a)[0];this.columnsService.emitStateChange(_,{hidden:g,changes:[ss.HIDDEN]})}toggleSwitchPanel(){this.openState=!this.openState}allColumnsSelected(){this.allSelectedElement.nativeElement.focus()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(pn),l.Y36(Uo),l.Y36(mi))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-column-toggle"]],viewQuery:function(a,g){if(1&a&&l.Gf(sS,5,l.SBq),2&a){let _;l.iGM(_=l.CRH())&&(g.allSelectedElement=_.first)}},hostVars:4,hostBindings:function(a,g){2&a&&l.ekj("column-switch-wrapper",!0)("active",g.openState)},features:[l.zW0([ia])],decls:3,vars:8,consts:[["role","button","type","button","clrPopoverAnchor","","clrPopoverOpenCloseButton","",1,"btn","btn-sm","column-toggle--action"],["class","column-switch","role","dialog","cdkTrapFocus","",3,"id",4,"clrPopoverContent","clrPopoverContentAt","clrPopoverContentOutsideClickToClose","clrPopoverContentScrollToClose"],["role","dialog","cdkTrapFocus","",1,"column-switch",3,"id"],[1,"switch-header"],["tabindex","-1",1,"clr-sr-only"],["allSelected",""],["clrPopoverCloseButton","","type","button",1,"btn","btn-sm","btn-link","toggle-switch-close-button"],["shape","window-close","aria-hidden","true"],[1,"clr-sr-only"],[1,"switch-content","list-unstyled"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"switch-footer"],[3,"clrAllSelected"],["clrCheckbox","","type","checkbox",3,"disabled","ngModel","ngModelChange"],[3,"ngTemplateOutlet"]],template:function(a,g){1&a&&(l.TgZ(0,"button",0),l._uU(1),l.qZA(),l.YNc(2,aS,15,9,"div",1)),2&a&&(l.uIk("aria-controls",g.popoverId)("aria-owns",g.popoverId)("aria-expanded",g.openState),l.xp6(1),l.hij(" ",g.commonStrings.keys.pickColumns," "),l.xp6(1),l.Q6J("clrPopoverContent",g.openState)("clrPopoverContentAt",g.smartPosition)("clrPopoverContentOutsideClickToClose",!0)("clrPopoverContentScrollToClose",!0))},dependencies:[k.sg,k.tP,uc,Pn,Ir,Cu,sc,Y.Wl,Y.JJ,Y.On,pu,sg,gu,ms,Rh,Ph],encapsulation:2}),d})(),kh=(()=>{class d{constructor(a,g,_,S){this.selection=a,this.detailService=g,this.columnsService=_,this.commonStrings=S,this.SELECTION_TYPE=Mn}get hasHideableColumns(){return this.columnsService.hasHideableColumns}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(al),l.Y36(io),l.Y36(Uo),l.Y36(pn))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-footer"]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("datagrid-footer",!0)},ngContentSelectors:y_,decls:3,vars:2,consts:[[4,"ngIf"],[1,"clr-form-control-disabled"],[1,"datagrid-footer-select"],["clrCheckbox","","type","checkbox","checked","checked","disabled",""],[1,"clr-sr-only"],[1,"datagrid-footer-description"]],template:function(a,g){1&a&&(l.F$t(__),l.YNc(0,cS,8,2,"ng-container",0),l.YNc(1,dS,4,1,"ng-container",0),l.Hsn(2)),2&a&&(l.Q6J("ngIf",g.selection.selectionType===g.SELECTION_TYPE.Multi&&g.selection.current.length>0),l.xp6(1),l.Q6J("ngIf",!g.detailService.isOpen))},dependencies:[k.O5,Ir,Cu,sc,Ay],encapsulation:2}),d})();const Nh=new l.OlP("COLUMN_STATE"),Ry={provide:Nh,useFactory:function Oy(){return new fn.X({changes:[]})}},tr="datagrid-fixed-width",la="datagrid-hidden-column";let Yg=(()=>{class d{constructor(a,g,_){this.el=a,this.renderer=g,this.subscriptions=[],this.subscriptions.push(_.filterRenderSteps(Eo.CLEAR_WIDTHS).subscribe(()=>this.clearWidth()))}set columnState(a){this.stateSubscription&&this.stateSubscription.unsubscribe(),this.runAllChanges=Oh,this.stateSubscription=a.subscribe(g=>this.stateChanges(g))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe()),this.stateSubscription&&this.stateSubscription.unsubscribe()}stateChanges(a){this.runAllChanges&&(a.changes=this.runAllChanges,delete this.runAllChanges),a.changes&&a.changes.length&&a.changes.forEach(g=>{switch(g){case ss.WIDTH:this.setWidth(a);break;case ss.HIDDEN:this.setHidden(a)}})}clearWidth(){this.renderer.removeClass(this.el.nativeElement,tr),this.renderer.setStyle(this.el.nativeElement,"width",null)}setWidth(a){a.strictWidth?this.renderer.addClass(this.el.nativeElement,tr):this.renderer.removeClass(this.el.nativeElement,tr),this.renderer.setStyle(this.el.nativeElement,"width",a.width+"px")}setHidden(a){a.hidden?this.renderer.addClass(this.el.nativeElement,la):this.renderer.removeClass(this.el.nativeElement,la)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(sl))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-dg-cell"]]}),d})(),Wg=(()=>{class d{constructor(a,g,_,S,j,J,te){this.el=a,this.renderer=g,this.organizer=_,this.domAdapter=S,this.columnResizerService=j,this.columnsService=J,this.columnState=te,this.resizeEmitter=new l.vpe,this.widthSet=!1,this.autoSet=!1,this.subscriptions=[],this.subscriptions.push(this.organizer.filterRenderSteps(Eo.CLEAR_WIDTHS).subscribe(()=>this.clearWidth())),this.subscriptions.push(te.subscribe(Ce=>this.stateChanges(Ce)))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}getColumnWidthState(){const a=this.detectStrictWidth();return{width:this.computeWidth(a),strictWidth:a}}setColumnState(a){this.columnsService.columns[a]=this.columnState}stateChanges(a){a.changes&&a.changes.length&&a.changes.forEach(g=>{switch(g){case ss.WIDTH:this.setWidth(a);break;case ss.HIDDEN:this.setHidden(a)}})}clearWidth(){this.widthSet&&!this.columnResizerService.resizedBy&&this.renderer.setStyle(this.el.nativeElement,"width",null),this.autoSet&&this.renderer.removeClass(this.el.nativeElement,tr)}detectStrictWidth(){return this.columnResizerService.resizedBy?this.columnResizerService.widthAfterResize:this.autoSet?0:this.domAdapter.userDefinedWidth(this.el.nativeElement)}computeWidth(a){let g=a;return g||(g=this.domAdapter.scrollWidth(this.el.nativeElement)),g}setWidth(a){a.strictWidth?(this.columnResizerService.resizedBy&&(this.resizeEmitter.emit(a.width),this.renderer.setStyle(this.el.nativeElement,"width",a.width+"px"),this.widthSet=!1),this.renderer.addClass(this.el.nativeElement,tr),this.autoSet=!1):(this.renderer.removeClass(this.el.nativeElement,tr),this.renderer.setStyle(this.el.nativeElement,"width",a.width+"px"),this.widthSet=!0,this.autoSet=!0)}setHidden(a){a.hidden?this.renderer.addClass(this.el.nativeElement,la):this.renderer.removeClass(this.el.nativeElement,la)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(sl),l.Y36(jo),l.Y36(Pg),l.Y36(Uo),l.Y36(Nh))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-dg-column"]],outputs:{resizeEmitter:"clrDgColumnResize"},features:[l._Bn([Pg,Ry])]}),d})(),z1=(()=>{class d{userDefinedWidth(a){return 0}scrollBarWidth(a){return 0}scrollWidth(a){return 0}computedHeight(a){return 0}clientRect(a){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}minWidth(a){return 0}focus(a){}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Ny=(()=>{class d{constructor(a){this.columnsService=a,this.subscriptions=[]}ngAfterContentInit(){this.setColumnState(),this.subscriptions.push(this.cells.changes.subscribe(()=>{this.setColumnState()}))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}setColumnState(){this.cells.length===this.columnsService.columns.length&&this.cells.forEach((a,g)=>{this.columnsService.columns[g]&&(a.columnState=this.columnsService.columns[g])})}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Uo))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-dg-row"],["clr-dg-row-detail"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Yg,4),2&a){let S;l.iGM(S=l.CRH())&&(g.cells=S)}}}),d})();const Fy=d=>(0,k.NF)(d)?new jo:new z1;let Fh=(()=>{class d{constructor(a,g,_,S,j,J,te,Ce,Ge,St){this.organizer=a,this.items=g,this.page=_,this.domAdapter=S,this.el=j,this.renderer=J,this.detailService=te,this.tableSizeService=Ce,this.columnsService=Ge,this.ngZone=St,this._heightSet=!1,this.shouldStabilizeColumns=!0,this.subscriptions=[],this.columnsSizesStable=!1,this.subscriptions.push(this.organizer.filterRenderSteps(Eo.COMPUTE_COLUMN_WIDTHS).subscribe(()=>this.computeHeadersWidth())),this.subscriptions.push(this.page.sizeChange.subscribe(()=>{this._heightSet&&this.resetDatagridHeight()})),this.subscriptions.push(this.detailService.stateChange.subscribe(Rt=>this.toggleDetailPane(Rt))),this.subscriptions.push(this.items.change.subscribe(()=>this.shouldStabilizeColumns=!0))}ngAfterContentInit(){this.setupColumns(),this.subscriptions.push(this.headers.changes.subscribe(()=>{this.setupColumns(),this.columnsSizesStable=!1,this.stabilizeColumns()}))}ngAfterViewInit(){this.tableSizeService.table=this.el}ngAfterViewChecked(){this.shouldStabilizeColumns&&this.stabilizeColumns(),this.shouldComputeHeight()&&this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.computeDatagridHeight()})})}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}toggleDetailPane(a){this.headers&&(a&&!this.columnsService.hasCache()?(this.columnsService.cache(),this.headers.forEach((g,_)=>{_>0&&this.columnsService.emitStateChangeAt(_,{changes:[ss.HIDDEN],hidden:a})})):a||this.columnsService.resetToLastCache())}setupColumns(){this.headers.forEach((a,g)=>a.setColumnState(g)),this.columnsService.columns.splice(this.headers.length),this.rows.forEach(a=>a.setColumnState())}shouldComputeHeight(){return!this._heightSet&&this.page.size>0&&this.items.displayed.length===this.page.size}computeDatagridHeight(){const a=this.domAdapter.clientRect(this.el.nativeElement).height;this.renderer.setStyle(this.el.nativeElement,"height",a+"px"),this._heightSet=!0}resetDatagridHeight(){this.renderer.setStyle(this.el.nativeElement,"height",""),this._heightSet=!1}computeHeadersWidth(){const a=this.headers.length;let g=!0;this.headers.forEach((_,S)=>{const j={changes:[ss.WIDTH],..._.getColumnWidthState()};j.strictWidth||(g=!1),a===S+1&&g&&(j.strictWidth=0),this.columnsService.emitStateChangeAt(S,j)})}stabilizeColumns(){this.shouldStabilizeColumns=!1,!this.columnsSizesStable&&this.items.displayed.length>0&&(this.organizer.resize(),this.columnsSizesStable=!0)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(sl),l.Y36(ol),l.Y36(aa),l.Y36(jo),l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(io),l.Y36(Mu),l.Y36(Uo),l.Y36(l.R0b))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-datagrid"]],contentQueries:function(a,g,_){if(1&a&&(l.Suo(_,Wg,4),l.Suo(_,Ny,5)),2&a){let S;l.iGM(S=l.CRH())&&(g.headers=S),l.iGM(S=l.CRH())&&(g.rows=S)}},features:[l._Bn([{provide:jo,useFactory:Fy,deps:[l.Lbi]}])]}),d})(),U1=(()=>{class d{constructor(){Jt.addIcons(Zr,On,Or,Ht,fi,ri,yn,vr,As)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Sy,mg,kn,by,Y.u5,cg,Bs,j1,Ig,bu,tc,cc]}),d})(),Qg=(()=>{class d{constructor(){Jt.addIcons(Yr)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,Ig]}),d})();new l.FiY,new l.tp0;let $y=(()=>{class d{constructor(){Jt.addIcons(Yr)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,cg]}),d})(),Gy=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[U1,Qg,$y]}),d})();function Yy(d,f,a){return qn.y.create(g=>{f(g);const _=d.subscribe(g);return()=>{_.unsubscribe(),a&&a(g)}})}let Fu=(()=>{class d{constructor(a,g,_,S,j){this.renderer=a,this.parent=g,this.toggleService=_,this.focusService=S,this.platformId=j,this.id=dr(),this.focusBackOnTriggerWhenClosed=!1,this._unlistenFuncs=[],this.resetChildren(),this.moveToFirstItemWhenOpen(),this.parent||this.handleRootFocus()}get trigger(){return this._trigger}set trigger(a){this._trigger=a,this.parent?this._unlistenFuncs.push(this.renderer.listen(a,"keydown.arrowright",g=>this.toggleService.toggleWithEvent(g))):(this._unlistenFuncs.push(this.renderer.listen(a,"keydown.arrowup",g=>this.toggleService.toggleWithEvent(g))),this._unlistenFuncs.push(this.renderer.listen(a,"keydown.arrowdown",g=>this.toggleService.toggleWithEvent(g))),this.focusService.listenToArrowKeys(a))}get container(){return this._container}set container(a){this._container=a,this._unlistenFuncs.push(this.renderer.listen(a,"keydown.tab",g=>this.toggleService.toggleWithEvent(g))),this.parent?this._unlistenFuncs.push(this.renderer.listen(a,"keydown.escape",g=>{this.focusService.move(vs.LEFT),g.stopPropagation()})):(this.focusService.registerContainer(a),this._unlistenFuncs.push(this.renderer.listen(a,"keydown.escape",g=>this.toggleService.toggleWithEvent(g))),this._unlistenFuncs.push(this.renderer.listen(a,"blur",g=>{this.children.pipe((0,Qn.q)(1)).subscribe(S=>S.forEach(j=>j.blur()));const _=g.relatedTarget||document.activeElement;_&&(0,k.NF)(this.platformId)&&(a.contains(_)||_===this.trigger)||(this.focusBackOnTriggerWhenClosed=!1,this.toggleService.open=!1)})))}ngOnDestroy(){this._unlistenFuncs.forEach(a=>a()),this.focusService.detachListeners()}moveToFirstItemWhenOpen(){const a=this.toggleService.openChange.subscribe(g=>{g&&this.toggleService.originalEvent&&setTimeout(()=>{this.focusService.moveTo(this),this.focusService.move(this.parent?vs.RIGHT:vs.DOWN)})});this._unlistenFuncs.push(()=>a.unsubscribe())}handleRootFocus(){const a=this.toggleService.openChange.subscribe(g=>{g||(this.focusService.reset(this),this.focusBackOnTriggerWhenClosed&&this.focus()),this.focusBackOnTriggerWhenClosed=g});this._unlistenFuncs.push(()=>a.unsubscribe())}focus(){this.trigger&&(0,k.NF)(this.platformId)&&this.trigger.focus()}blur(){this.trigger&&(0,k.NF)(this.platformId)&&this.trigger.blur()}activate(){(0,k.NF)(this.platformId)&&this.trigger.click()}resetChildren(){this.children=new ds(1),this.parent?this.right=this.openAndGetChildren().pipe((0,zt.U)(a=>a[0])):(this.down=this.openAndGetChildren().pipe((0,zt.U)(a=>a[0])),this.up=this.openAndGetChildren().pipe((0,zt.U)(a=>a[a.length-1])))}addChildren(a){rh.linkVertical(a),this.parent&&rh.linkParent(a,this.closeAndGetThis(),vs.LEFT),this.children.next(a)}openAndGetChildren(){return Yy(this.children,()=>this.toggleService.open=!0)}closeAndGetThis(){return Yy((0,es.of)(this),()=>this.toggleService.open=!1)}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.Qsj),l.LFG(d,12),l.LFG(mi),l.LFG(bo),l.LFG(l.Lbi))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();ny(Fu);new l.FiY,new l.tp0;var Ye=function(d){return d[d.RIGHT_CENTER=0]="RIGHT_CENTER",d[d.RIGHT_TOP=1]="RIGHT_TOP",d[d.RIGHT_BOTTOM=2]="RIGHT_BOTTOM",d[d.TOP_CENTER=3]="TOP_CENTER",d[d.TOP_RIGHT=4]="TOP_RIGHT",d[d.TOP_LEFT=5]="TOP_LEFT",d[d.BOTTOM_CENTER=6]="BOTTOM_CENTER",d[d.BOTTOM_RIGHT=7]="BOTTOM_RIGHT",d[d.BOTTOM_LEFT=8]="BOTTOM_LEFT",d[d.LEFT_CENTER=9]="LEFT_CENTER",d[d.LEFT_TOP=10]="LEFT_TOP",d[d.LEFT_BOTTOM=11]="LEFT_BOTTOM",d}(Ye||{});const Ky="absolute";class K1{constructor(f){this.element=f,this.boundOnScrollListener=this.emitScrollEvent.bind(this),this.scrollableElements=[],f.style.position=Ky,f.style.top=0,f.style.bottom="auto",f.style.left=0,f.style.right="auto"}anchor(f,a,g,{offsetX:_=0,offsetY:S=0,useAnchorParent:j=!1}={}){this.addScrollEventListeners(f),j&&(f=f.parentNode),f.style.position="static";const J=f.getBoundingClientRect(),te=this.element.getBoundingClientRect();let Ce=J.left-te.left+_,Ge=J.top-te.top+S;switch(a){case Ye.LEFT_TOP:case Ye.TOP_LEFT:break;case Ye.TOP_CENTER:Ce+=J.width/2;break;case Ye.TOP_RIGHT:case Ye.RIGHT_TOP:Ce+=J.width;break;case Ye.LEFT_BOTTOM:case Ye.BOTTOM_LEFT:Ge+=J.height;break;case Ye.BOTTOM_CENTER:Ge+=J.height,Ce+=J.width/2;break;case Ye.BOTTOM_RIGHT:case Ye.RIGHT_BOTTOM:Ge+=J.height,Ce+=J.width;break;case Ye.LEFT_CENTER:Ge+=J.height/2;break;case Ye.RIGHT_CENTER:Ge+=J.height/2,Ce+=J.width}switch(g){case Ye.LEFT_TOP:case Ye.TOP_LEFT:break;case Ye.TOP_CENTER:Ce-=te.width/2;break;case Ye.TOP_RIGHT:case Ye.RIGHT_TOP:Ce-=te.width;break;case Ye.LEFT_BOTTOM:case Ye.BOTTOM_LEFT:Ge-=te.height;break;case Ye.BOTTOM_CENTER:Ge-=te.height,Ce-=te.width/2;break;case Ye.BOTTOM_RIGHT:case Ye.RIGHT_BOTTOM:Ge-=te.height,Ce-=te.width;break;case Ye.LEFT_CENTER:Ge-=te.height/2;break;case Ye.RIGHT_CENTER:Ge-=te.height/2,Ce-=te.width}const St=getComputedStyle(this.element),Rt=parseInt(St.marginLeft,10),un=parseInt(St.marginRight,10),Xn=parseInt(St.marginTop,10),bi=parseInt(St.marginBottom,10);switch(a){case Ye.LEFT_TOP:case Ye.TOP_LEFT:case Ye.TOP_RIGHT:case Ye.RIGHT_TOP:(g===Ye.BOTTOM_RIGHT||g===Ye.RIGHT_BOTTOM)&&(Ge-=bi,Ce-=un),(g===Ye.BOTTOM_LEFT||g===Ye.LEFT_BOTTOM)&&(Ge-=Xn,Ce+=Rt),(g===Ye.TOP_LEFT||g===Ye.LEFT_TOP)&&(Ge+=Xn,Ce+=Rt),(g===Ye.TOP_RIGHT||g===Ye.RIGHT_TOP)&&(Ge+=Xn,Ce-=un);break;case Ye.LEFT_BOTTOM:case Ye.BOTTOM_LEFT:case Ye.BOTTOM_RIGHT:case Ye.RIGHT_BOTTOM:(g===Ye.BOTTOM_LEFT||g===Ye.LEFT_BOTTOM)&&(Ge-=bi,Ce+=Rt),(g===Ye.BOTTOM_RIGHT||g===Ye.RIGHT_BOTTOM)&&(Ge-=bi,Ce-=un),(g===Ye.TOP_LEFT||g===Ye.LEFT_TOP)&&(Ge+=Xn,Ce+=Rt),(g===Ye.TOP_RIGHT||g===Ye.RIGHT_TOP)&&(Ge+=Xn,Ce-=un);break;case Ye.TOP_CENTER:Ge-=bi,Ce+=Rt,Ce-=un;break;case Ye.BOTTOM_CENTER:Ge+=Xn,Ce+=Rt,Ce-=un;break;case Ye.LEFT_CENTER:Ge+=Xn,Ge-=bi,Ce-=un;break;case Ye.RIGHT_CENTER:Ge+=Xn,Ge-=bi,Ce+=Rt}return this.element.style.transform=`translateX(${Math.round(Ce)}px) translateY(${Math.round(Ge)}px)`,this._scroll.asObservable()}release(){this.element.style.transform="",this.removeScrollEventListeners()}isPositioned(f){const a=getComputedStyle(f).position;return"relative"===a||a===Ky||"fixed"===a}emitScrollEvent(){this._scroll.next()}addScrollEventListeners(f){this._scroll=new et.x;const a=f;let g=f;for(;g&&g!==document&&(this.scrolls(g)&&(g.addEventListener("scroll",this.boundOnScrollListener),this.scrollableElements.push(g)),g===a||!this.isPositioned(g));)g=g.parentNode}removeScrollEventListeners(){for(const f of this.scrollableElements)f.removeEventListener("scroll",this.boundOnScrollListener);this.scrollableElements.length=0,this._scroll&&(this._scroll.complete(),delete this._scroll)}scrolls(f){const a=getComputedStyle(f);return"scroll"===a.overflowX||"auto"===a.overflowX||"scroll"===a.overflowY||"auto"===a.overflowY}}let Jy=(()=>{class d{constructor(a,g){this.parentHost=g,this.closeOnOutsideClick=!1,this.popoverOptions={},this.updateAnchor=!1,this.documentESCListener=null,this.closeOnOutsideClickCallback=_=>{this.anchorElem.contains(_.target)||(this.toggleService.open=!1)},this.el=a.get(l.SBq),this.toggleService=a.get(mi),this.renderer=a.get(l.Qsj),this.ngZone=a.get(l.R0b),this.ref=a.get(l.sBO),this.anchorElem=g.nativeElement,this.popoverInstance=new K1(this.el.nativeElement),this.subscription=this.toggleService.openChange.subscribe(_=>{_?(this.anchor(),this.attachESCListener()):(this.release(),this.detachESCListener())}),this.toggleService.open&&(this.anchor(),this.attachESCListener())}get isOffScreen(){return!this.toggleService.open}ngAfterViewChecked(){this.updateAnchor&&(this.updateAnchor=!1,this.popoverInstance.anchor(this.anchorElem,this.anchorPoint,this.popoverPoint,this.popoverOptions).subscribe(()=>{this.toggleService.open=!1}),this.attachOutsideClickListener())}ngOnDestroy(){this.release(),this.detachESCListener(),this.subscription.unsubscribe()}anchor(){this.updateAnchor=!0}release(){this.detachOutsideClickListener(),this.popoverInstance.release()}attachESCListener(){this.popoverOptions.ignoreGlobalESCListener||this.ngZone.runOutsideAngular(()=>{this.documentESCListener=this.renderer.listen("document","keydown",a=>{a&&a.key&&Fs(a.key)===At.Escape&&this.ngZone.run(()=>{this.toggleService.open=!1,this.ref.markForCheck()})})})}detachESCListener(){this.documentESCListener&&(this.documentESCListener(),this.documentESCListener=null)}attachOutsideClickListener(){this.closeOnOutsideClick&&this.toggleService.open&&document&&document.addEventListener&&document.addEventListener("click",this.closeOnOutsideClickCallback,!0)}detachOutsideClickListener(){this.closeOnOutsideClick&&document&&document.removeEventListener&&document.removeEventListener("click",this.closeOnOutsideClickCallback,!0)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.zs3),l.Y36(l.SBq,4))},d.\u0275dir=l.lG2({type:d,hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("is-off-screen",g.isOffScreen)}}),d})(),Xy=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Bs,kn]}),d})(),nC=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275dir=l.lG2({type:d,selectors:[["",8,"alert-text"]]}),d})(),YD=(()=>{class d{constructor(){Jt.addIcons(Di,qr,ii,Gs,Or)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,Xy]}),d})(),WD=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[YD]}),d})(),Tn=(()=>{class d{}return d.NAV_LEVEL_1=1,d.NAV_LEVEL_2=2,d.NAV_CLOSE_ALL="NAV_CLOSE_ALL",d.NAV_OPEN="NAV_OPEN",d.NAV_CLOSE="NAV_CLOSE",d.NAV_TOGGLE="NAV_TOGGLE",d.NAV_CLASS_HAMBURGER_MENU="open-hamburger-menu",d.NAV_CLASS_OVERFLOW_MENU="open-overflow-menu",d.NAV_CLASS_TRIGGER_1="header-hamburger-trigger",d.NAV_CLASS_TRIGGER_2="header-overflow-trigger",d.NAV_CLASS_LEVEL_1="clr-nav-level-1",d.NAV_CLASS_LEVEL_2="clr-nav-level-2",d})();class iC{constructor(f,a){this._controlCode=f,this._navLevel=a}get controlCode(){return this._controlCode}get navLevel(){return this._navLevel}}let Hh=(()=>{class d{constructor(){this.responsiveNavList=[],this.registerNavSubject=new ds,this.controlNavSubject=new et.x,this.closeAllNavs()}get registeredNavs(){return this.registerNavSubject.asObservable()}get navControl(){return this.controlNavSubject.asObservable()}registerNav(a){!a||this.isNavRegistered(a)||(this.responsiveNavList.push(a),this.registerNavSubject.next(this.responsiveNavList))}isNavRegistered(a){return this.responsiveNavList.indexOf(a)>-1&&(console.error("Multiple clr-nav-level "+a+" attributes found. Please make sure that only one exists"),!0)}unregisterNav(a){const g=this.responsiveNavList.indexOf(a);g>-1&&(this.responsiveNavList.splice(g,1),this.registerNavSubject.next(this.responsiveNavList))}sendControlMessage(a,g){const _=new iC(a,g);this.controlNavSubject.next(_)}closeAllNavs(){const a=new iC(Tn.NAV_CLOSE_ALL,-999);this.controlNavSubject.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"}),d})(),rC=(()=>{class d{constructor(a,g){this.elRef=a,this.responsiveNavService=g}ngOnInit(){this._classList=this.elRef.nativeElement.classList,this._subscription=this.responsiveNavService.navControl.subscribe({next:a=>{this.processMessage(a)}})}processMessage(a){let g=Tn.NAV_CLASS_HAMBURGER_MENU;a.controlCode===Tn.NAV_CLOSE_ALL?(this._classList.remove(Tn.NAV_CLASS_HAMBURGER_MENU),this._classList.remove(Tn.NAV_CLASS_OVERFLOW_MENU)):a.navLevel===Tn.NAV_LEVEL_1?this.controlNav(a.controlCode,g):a.navLevel===Tn.NAV_LEVEL_2&&(g=Tn.NAV_CLASS_OVERFLOW_MENU,this.controlNav(a.controlCode,g))}controlNav(a,g){a===Tn.NAV_OPEN?this._classList.add(g):a===Tn.NAV_CLOSE?this._classList.remove(g):a===Tn.NAV_TOGGLE&&this._classList.toggle(g)}ngOnDestroy(){this._subscription.unsubscribe()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(Hh))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-main-container"]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("main-container",!0)}}),d})(),ZD=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn]}),d})(),Cc=(()=>{class d extends Za{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275dir=l.lG2({type:d,selectors:[["clr-main-container"]],features:[l.qOj]}),d})(),sC=(()=>{class d extends Qa{constructor(a,g,_){if(!g)throw new Error("clr-header should only be used inside of a clr-main-container");super(a,g),this.responsiveNavService=_}get flavor(){return this.responsiveNavService.responsiveNavList.reduce((a,g)=>a+g,0)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.sBO),l.Y36(Cc,8),l.Y36(Hh))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-header"]],features:[l.qOj]}),d})(),oC=(()=>{class d{constructor(a,g){this.responsiveNavService=a,this.commonStrings=g,this.role="banner",this.isNavLevel1OnPage=!1,this.isNavLevel2OnPage=!1,this.openNavLevel=null,this.responsiveNavCodes=Tn,this._subscription=this.responsiveNavService.registeredNavs.subscribe({next:_=>{this.initializeNavTriggers(_)}}),this._subscription.add(this.responsiveNavService.navControl.pipe((0,Ln.h)(({controlCode:_})=>_===Tn.NAV_CLOSE||_===Tn.NAV_CLOSE_ALL)).subscribe(()=>{this.openNavLevel=null}))}get responsiveNavCommonString(){const a=this.commonStrings.keys;return this.openNavLevel!==this.responsiveNavCodes.NAV_LEVEL_1?a.responsiveNavToggleOpen:a.responsiveNavToggleClose}get responsiveOverflowCommonString(){const a=this.commonStrings.keys;return this.openNavLevel!==this.responsiveNavCodes.NAV_LEVEL_2?a.responsiveNavOverflowOpen:a.responsiveNavOverflowClose}resetNavTriggers(){this.isNavLevel1OnPage=!1,this.isNavLevel2OnPage=!1}initializeNavTriggers(a){this.resetNavTriggers(),a.length>2?console.error("More than 2 Nav Levels detected."):a.forEach(g=>{g===Tn.NAV_LEVEL_1?this.isNavLevel1OnPage=!0:g===Tn.NAV_LEVEL_2&&(this.isNavLevel2OnPage=!0)})}closeOpenNav(){this.responsiveNavService.closeAllNavs()}toggleNav(a){this.openNavLevel!==a?this.openNav(a):this.responsiveNavService.sendControlMessage(Tn.NAV_CLOSE,a)}openNav(a){this.openNavLevel=a,this.responsiveNavService.sendControlMessage(Tn.NAV_OPEN,a)}ngOnDestroy(){this._subscription.unsubscribe()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Hh),l.Y36(pn))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-header"]],hostVars:3,hostBindings:function(a,g){2&a&&(l.uIk("role",g.role),l.ekj("header",!0))},inputs:{role:"role"},ngContentSelectors:jt,decls:4,vars:2,consts:[["type","button","class","header-hamburger-trigger",3,"click",4,"ngIf"],["type","button","class","header-overflow-trigger",3,"click",4,"ngIf"],[1,"header-backdrop",3,"click"],["type","button",1,"header-hamburger-trigger",3,"click"],["type","button",1,"header-overflow-trigger",3,"click"]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,XE,2,1,"button",0),l.Hsn(1),l.YNc(2,vS,2,1,"button",1),l.TgZ(3,"div",2),l.NdJ("click",function(){return g.closeOpenNav()}),l.qZA()),2&a&&(l.Q6J("ngIf",g.isNavLevel1OnPage),l.xp6(2),l.Q6J("ngIf",g.isNavLevel2OnPage))},dependencies:[k.O5],encapsulation:2}),d})(),aC=(()=>{class d{constructor(a,g,_,S,j,J){this.cdkTrapFocus=g,this.responsiveNavService=_,this.elementRef=S,this.renderer=j,this._isOpen=!1,(0,k.NF)(a)&&(this._document=J.get(k.K0)),this._subscription=_.navControl.pipe((0,Ln.h)(te=>te.navLevel===this.level),(0,Ln.h)(({controlCode:te})=>te===Tn.NAV_OPEN&&!this.isOpen||te===Tn.NAV_CLOSE&&this.isOpen)).subscribe(({controlCode:te})=>{te!==Tn.NAV_OPEN?this.close():this.open()}),this._subscription.add(_.navControl.pipe((0,Ln.h)(({controlCode:te})=>te===Tn.NAV_CLOSE_ALL)).subscribe(()=>this.close()))}get level(){return this._level}get responsiveNavCodes(){return Tn}get isOpen(){return this._isOpen}ngOnInit(){this.cdkTrapFocus.enabled=!1,this.closeButtonAriaLabel||(this.closeButtonAriaLabel=this._level===Tn.NAV_LEVEL_1?Qp.responsiveNavToggleClose:Qp.responsiveNavOverflowClose),this.level===Tn.NAV_LEVEL_1||this.level===Tn.NAV_LEVEL_2?(this.responsiveNavService.registerNav(this.level),this.addNavClass(this.level)):console.error("Nav Level can only be 1 or 2")}ngAfterViewInit(){const a=((d,f)=>{const a=this._document.createElement("cds-internal-close-button");return a.setAttribute("icon-size","32"),a.setAttribute("aria-label",f),a.setAttribute("aria-hidden","true"),a.setAttribute("type","button"),a.setAttribute("hidden","true"),a.className="clr-nav-close",a})(0,this.closeButtonAriaLabel);this.renderer.listen(a,"click",this.close.bind(this)),this.renderer.insertBefore(this.elementRef.nativeElement,a,this.elementRef.nativeElement.firstChild),this._document.body.clientWidth<992&&this.close()}ngOnDestroy(){this.responsiveNavService.unregisterNav(this.level),this._subscription.unsubscribe()}onResize(a){a.target.innerWidth<992&&this.isOpen?this.close():this.showNavigation()}onMouseClick(a){let g=a;const _=this.elementRef.nativeElement;for(;g;){if(g===_)return;if(g.classList.contains("nav-link")&&this._document.body.clientWidth<992)return void this.close();g=g.parentNode}}addNavClass(a){const g=this.elementRef.nativeElement.classList;a===Tn.NAV_LEVEL_1?g.add(Tn.NAV_CLASS_LEVEL_1):a===Tn.NAV_LEVEL_2&&g.add(Tn.NAV_CLASS_LEVEL_2)}open(){this._isOpen=!0,this.showNavigation(),this.cdkTrapFocus.enabled=!0,this.showCloseButton(),this.responsiveNavService.sendControlMessage(Tn.NAV_OPEN,this.level)}close(){this._isOpen=!1,this.hideNavigation(),this.cdkTrapFocus.enabled=!1,this.hideCloseButton(),this.responsiveNavService.sendControlMessage(Tn.NAV_CLOSE,this.level)}hideNavigation(){this.renderer.setAttribute(this.elementRef.nativeElement,"aria-hidden","true"),this.renderer.setAttribute(this.elementRef.nativeElement,"hidden","true")}showNavigation(){this.renderer.setAttribute(this.elementRef.nativeElement,"aria-hidden","false"),this.renderer.removeAttribute(this.elementRef.nativeElement,"hidden")}hideCloseButton(){this.renderer.setAttribute(this.elementRef.nativeElement,"aria-hidden","true"),this.renderer.setAttribute(this.elementRef.nativeElement.querySelector(".clr-nav-close"),"hidden","true")}showCloseButton(){this.renderer.setAttribute(this.elementRef.nativeElement.querySelector(".clr-nav-close"),"aria-hidden","false"),this.renderer.removeAttribute(this.elementRef.nativeElement.querySelector(".clr-nav-close"),"hidden")}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.Lbi),l.Y36(W_),l.Y36(Hh),l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(l.zs3))},d.\u0275dir=l.lG2({type:d,selectors:[["","clr-nav-level",""]],hostBindings:function(a,g){1&a&&l.NdJ("resize",function(S){return g.onResize(S)},!1,l.Jf7)("click",function(S){return g.onMouseClick(S.target)})},inputs:{_level:["clr-nav-level","_level"],closeButtonAriaLabel:["closeAriaLabel","closeButtonAriaLabel"]},features:[l.zW0([W_])]}),d})(),qD=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,Xy]}),d})(),KD=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();new l.OlP("TABS_ID");let Ss=(()=>{class d{constructor(){Jt.addIcons(Ao)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Bs,kn,KD,cc,Bs]}),d})(),Uh=(()=>{class d{constructor(){this.navGroupCount=0}registerNavGroup(){this.navGroupCount++}unregisterNavGroup(){this.navGroupCount--}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),$h=(()=>{class d{constructor(){this._icons=0}get hasIcons(){return this._icons>0}registerIcon(){this._icons++}unregisterIcon(){this._icons--}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),tm=(()=>{class d{constructor(){this._animateOnCollapsed=new et.x,this._collapsedChanged=new et.x,this._collapsed=!1,this._collapsible=!1}get animateOnCollapsed(){return this._animateOnCollapsed.asObservable()}get collapsedChanged(){return this._collapsedChanged.asObservable()}get collapsed(){return this._collapsed}set collapsed(a){a=!!a,this.collapsible&&this._collapsed!==a&&this.updateCollapseBehavior(a)}get collapsible(){return this._collapsible}set collapsible(a){this._collapsible!==(a=!!a)&&(!a&&this.collapsed&&this.updateCollapseBehavior(!1),this._collapsible=a)}updateCollapseBehavior(a){this._animateOnCollapsed.next(a),this._collapsed=a,this._collapsedChanged.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),nm=(()=>{class d{constructor(a,g,_,S){this._navService=a,this._navIconService=g,this._navGroupRegistrationService=_,this.commonStrings=S,this._collapsedChanged=new l.vpe(!0),this._sub=this._navService.collapsedChanged.subscribe(j=>{this._collapsedChanged.emit(j)})}get collapsible(){return this._navService.collapsible}set collapsible(a){this._navService.collapsible=a}get collapsed(){return this._navService.collapsed}set collapsed(a){this._navService.collapsed=a}get hasNavGroups(){return this._navGroupRegistrationService.navGroupCount>0}get hasIcons(){return this._navIconService.hasIcons}get ariaExpanded(){return this.collapsible?this.collapsed?"false":"true":null}ngOnDestroy(){this._sub.unsubscribe()}toggleByButton(){this.collapsed=!this.collapsed}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(tm),l.Y36($h),l.Y36(Uh),l.Y36(pn))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-vertical-nav"]],hostAttrs:[1,"clr-vertical-nav"],hostVars:6,hostBindings:function(a,g){2&a&&l.ekj("is-collapsed",g.collapsed)("has-nav-groups",g.hasNavGroups)("has-icons",g.hasIcons)},inputs:{collapsible:["clrVerticalNavCollapsible","collapsible"],collapsed:["clrVerticalNavCollapsed","collapsed"]},outputs:{_collapsedChanged:"clrVerticalNavCollapsedChange"},features:[l._Bn([tm,$h,Uh])],ngContentSelectors:jt,decls:4,vars:2,consts:[["type","button","class","nav-trigger",3,"on-collapse","click",4,"ngIf"],[1,"nav-content"],["type","button","class","nav-btn","aria-hidden","true","tabindex","-1",3,"click",4,"ngIf"],["type","button",1,"nav-trigger",3,"click"],["shape","angle-double",1,"nav-trigger-icon"],["type","button","aria-hidden","true","tabindex","-1",1,"nav-btn",3,"click"]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,Qd,2,5,"button",0),l.TgZ(1,"div",1),l.Hsn(2),l.YNc(3,R_,1,1,"button",2),l.qZA()),2&a&&(l.Q6J("ngIf",g.collapsible),l.xp6(3),l.Q6J("ngIf",g.collapsible&&g.collapsed))},dependencies:[k.O5,Pn],encapsulation:2}),d})(),im=(()=>{class d{constructor(){this._expandChange=new et.x}get expandChange(){return this._expandChange.asObservable()}expand(){this._expandChange.next(!0)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();const cl="expanded",Ur="collapsed";let rm=(()=>{class d{constructor(a,g,_,S,j){this._itemExpand=a,this._navGroupRegistrationService=g,this._navGroupService=_,this._navService=S,this.commonStrings=j,this.expandedChange=new l.vpe(!0),this.wasExpanded=!1,this._subscriptions=[],this._expandAnimationState=Ur,this._navGroupRegistrationService.registerNavGroup(),this._subscriptions.push(this._itemExpand.expandChange.subscribe(J=>{J&&this.expandAnimationState===Ur?(this._navService.collapsed&&(this._navService.collapsed=!1),this.expandAnimationState=cl):!J&&this.expandAnimationState===cl&&(this.expandAnimationState=Ur)})),this._subscriptions.push(this._navService.animateOnCollapsed.subscribe(J=>{J&&this.expanded?(this.wasExpanded=!0,this.expandAnimationState=Ur):!J&&this.wasExpanded&&(this.expandGroup(),this.wasExpanded=!1)})),this._subscriptions.push(this._navGroupService.expandChange.subscribe(J=>{J&&!this.expanded&&this.expandGroup()}))}get expanded(){return this._itemExpand.expanded}set expanded(a){this._itemExpand.expanded!==a&&(this._itemExpand.expanded=a,this.expandedChange.emit(a))}set userExpandedInput(a){this.expanded!==(a=!!a)&&this.toggleExpand()}get expandAnimationState(){return this._expandAnimationState}set expandAnimationState(a){a!==this._expandAnimationState&&(this._expandAnimationState=a)}ngAfterContentInit(){this._navService.collapsed&&this.expanded&&(this.wasExpanded=!0,this.expandAnimationState=Ur)}ngOnDestroy(){this._subscriptions.forEach(a=>a.unsubscribe()),this._navGroupRegistrationService.unregisterNavGroup()}expandGroup(){this.expanded=!0,this.expandAnimationState=cl}collapseGroup(){this.expandAnimationState=Ur}expandAnimationDone(a){a.toState===Ur&&(this.expanded=!1)}toggleExpand(){this.expanded?this.collapseGroup():(this._navService.collapsed&&(this._navService.collapsed=!1),this.expandGroup())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Br),l.Y36(Uh),l.Y36(im),l.Y36(tm),l.Y36(pn))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-vertical-nav-group"]],hostAttrs:[1,"nav-group"],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("is-expanded",g.expanded)},inputs:{userExpandedInput:["clrVerticalNavGroupExpanded","userExpandedInput"]},outputs:{expandedChange:"clrVerticalNavGroupExpandedChange"},features:[l._Bn([Br,im])],ngContentSelectors:P_,decls:9,vars:3,consts:[[1,"nav-group-content"],["type","button",1,"nav-group-trigger",3,"click"],[1,"nav-group-text"],["shape","angle",1,"nav-group-trigger-icon"],[1,"nav-group-children"]],template:function(a,g){1&a&&(l.F$t(du),l.TgZ(0,"div",0),l.Hsn(1),l.TgZ(2,"button",1),l.NdJ("click",function(){return g.toggleExpand()}),l.Hsn(3,1),l.TgZ(4,"div",2),l.Hsn(5,2),l.qZA(),l._UZ(6,"cds-icon",3),l.qZA()(),l.TgZ(7,"div",4),l.NdJ("@clrExpand.done",function(S){return g.expandAnimationDone(S)}),l.Hsn(8,3),l.qZA()),2&a&&(l.xp6(2),l.uIk("aria-expanded",g.expanded),l.xp6(4),l.uIk("direction",g.expanded?"down":"right"),l.xp6(1),l.Q6J("@clrExpand",g.expandAnimationState))},dependencies:[Pn],encapsulation:2,data:{animation:[(0,P.X$)("clrExpand",[(0,P.SB)(cl,(0,P.oB)({height:"*"})),(0,P.SB)(Ur,(0,P.oB)({height:0,visibility:"hidden"})),(0,P.eR)(`${cl} <=> ${Ur}`,(0,P.jt)("0.2s ease-in-out"))])]}}),d})(),Gh=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-vertical-nav-group-children"]],ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),Yh=(()=>{class d{constructor(a){this._verticalNavIconService=a,this._verticalNavIconService.registerIcon()}ngOnDestroy(){this._verticalNavIconService.unregisterIcon()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36($h))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrVerticalNavIcon",""]],hostAttrs:[1,"nav-icon"]}),d})(),fC=(()=>{class d{constructor(a,g,_){this.destroy$=new et.x,_&&(0,ki.R)(a.nativeElement,"click").pipe((0,Xr.R)(this.destroy$)).subscribe(()=>{_.expand(),g.markForCheck()})}ngOnDestroy(){this.destroy$.next()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(l.sBO),l.Y36(im,8))},d.\u0275cmp=l.Xpm({type:d,selectors:[["","clrVerticalNavLink",""]],hostAttrs:[1,"nav-link"],attrs:DS,ngContentSelectors:wS,decls:3,vars:0,consts:[[1,"nav-text"]],template:function(a,g){1&a&&(l.F$t(hu),l.Hsn(0),l.TgZ(1,"span",0),l.Hsn(2,1),l.qZA())},encapsulation:2}),d})(),pC=(()=>{class d{constructor(){Jt.addIcons(Yr,yn)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,Bs,oh,Bs,kn,oh]}),d})(),iw=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[ZD,qD,Ss,pC]}),d})(),sw=(()=>{class d{constructor(){Jt.addIcons(Or)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,mg,kn,kn]}),d})();const _C={"top-left":{anchorPoint:Ye.TOP_CENTER,popoverPoint:Ye.BOTTOM_RIGHT,offsetY:-10,offsetX:0},"top-middle":{anchorPoint:Ye.TOP_CENTER,popoverPoint:Ye.BOTTOM_CENTER,offsetY:-10,offsetX:0},"top-right":{anchorPoint:Ye.TOP_CENTER,popoverPoint:Ye.BOTTOM_LEFT,offsetY:-10,offsetX:0},"right-top":{anchorPoint:Ye.RIGHT_CENTER,popoverPoint:Ye.LEFT_BOTTOM,offsetY:2,offsetX:14},"right-middle":{anchorPoint:Ye.RIGHT_CENTER,popoverPoint:Ye.LEFT_CENTER,offsetY:6,offsetX:14},"right-bottom":{anchorPoint:Ye.RIGHT_CENTER,popoverPoint:Ye.LEFT_TOP,offsetY:-1,offsetX:14},"bottom-right":{anchorPoint:Ye.BOTTOM_CENTER,popoverPoint:Ye.TOP_LEFT,offsetY:9,offsetX:-1},"bottom-middle":{anchorPoint:Ye.BOTTOM_CENTER,popoverPoint:Ye.TOP_CENTER,offsetY:9,offsetX:12},"bottom-left":{anchorPoint:Ye.BOTTOM_CENTER,popoverPoint:Ye.TOP_RIGHT,offsetY:9,offsetX:0},"left-bottom":{anchorPoint:Ye.LEFT_CENTER,popoverPoint:Ye.RIGHT_TOP,offsetY:0,offsetX:-14},"left-middle":{anchorPoint:Ye.LEFT_CENTER,popoverPoint:Ye.RIGHT_CENTER,offsetY:4,offsetX:-14},"left-top":{anchorPoint:Ye.LEFT_CENTER,popoverPoint:Ye.RIGHT_BOTTOM,offsetY:0,offsetX:-14},default:{anchorPoint:Ye.RIGHT_CENTER,popoverPoint:Ye.LEFT_CENTER,offsetY:6,offsetX:14}},ow=["top-left","top-middle","top-right","right-top","right-middle","right-bottom","bottom-right","bottom-middle","bottom-left","left-bottom","left-middle","left-top"];let sm=(()=>{class d extends Jy{constructor(a,g,_,S,j,J,te){if(super(a,g),this.commonStrings=_,this.signpostIdService=S,this.signpostFocusManager=j,this.platformId=J,this.signpostContentId=dr(),!g)throw new Error("clr-signpost-content should only be used inside of a clr-signpost");this.position="right-middle",this.closeOnOutsideClick=!0,this.signpostIdService.setId(this.signpostContentId),this.document=te}get position(){return this._position}set position(a){this.renderer.removeClass(this.el.nativeElement,this.position),this._position=a&&ow.indexOf(a)>-1?a:"right-middle",this.renderer.addClass(this.el.nativeElement,this.position);const g=_C[this.position];this.anchorPoint=g.anchorPoint,this.popoverPoint=g.popoverPoint,this.popoverOptions.offsetY=g.offsetY,this.popoverOptions.offsetX=g.offsetX}close(){this.toggleService.open=!1}ngOnDestroy(){super.ngOnDestroy(),(0,k.NF)(this.platformId)&&this.el.nativeElement.contains(this.document.activeElement)&&this.signpostFocusManager.focusTrigger()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.zs3),l.Y36(nc,8),l.Y36(pn),l.Y36(Lg),l.Y36(Fg),l.Y36(l.Lbi),l.Y36(k.K0))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-signpost-content"]],hostVars:3,hostBindings:function(a,g){2&a&&(l.Ikx("id",g.signpostContentId),l.ekj("signpost-content",!0))},inputs:{position:["clrPosition","position"]},features:[l.qOj],ngContentSelectors:jt,decls:7,vars:3,consts:[[1,"signpost-wrap"],[1,"popover-pointer"],[1,"signpost-content-header"],["type","button",1,"signpost-action","close",3,"click"],["shape","window-close"],[1,"signpost-content-body"]],template:function(a,g){1&a&&(l.F$t(),l.TgZ(0,"div",0),l._UZ(1,"div",1),l.TgZ(2,"div",2)(3,"button",3),l.NdJ("click",function(){return g.close()}),l._UZ(4,"cds-icon",4),l.qZA()(),l.TgZ(5,"div",5),l.Hsn(6),l.qZA()()),2&a&&(l.xp6(3),l.uIk("aria-label",g.commonStrings.keys.signpostClose)("aria-controls",g.signpostContentId),l.xp6(1),l.uIk("title",g.commonStrings.keys.close))},dependencies:[Pn],encapsulation:2}),d})(),om=(()=>{class d{constructor(){Jt.addIcons(Or,qr)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,oh,Bs]}),d})(),rT=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Bs,kn]}),d})(),bC=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[Xy,om,rT]}),d})(),cw=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})(),aT=(()=>{class d{constructor(){Jt.addIcons($i,Ra,_r,Ys)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,bu,kn,bu]}),d})(),fw=(()=>{class d{constructor(){Jt.addIcons(_r)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,sw,YD]}),d})(),pw=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[WD,Gy,kn,sw,cg,Bs,oh,XS,by,iw,bC,fw,s1,bu,cw,tc,aT]}),d})()}},ct=>{ct(ct.s=5476)}]); \ No newline at end of file diff --git a/main.f92c7c2d4f02d2d0.js b/main.f92c7c2d4f02d2d0.js deleted file mode 100644 index 38db97ea4..000000000 --- a/main.f92c7c2d4f02d2d0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdemo_maps=self.webpackChunkdemo_maps||[]).push([[179],{8626:(ct,De,L)=>{L.d(De,{X:()=>k});var l=L(5992);class k extends l.x{constructor(re){super(),this._value=re}get value(){return this.getValue()}_subscribe(re){const ce=super._subscribe(re);return!ce.closed&&re.next(this._value),ce}getValue(){const{hasError:re,thrownError:ce,_value:_e}=this;if(re)throw ce;return this._throwIfClosed(),_e}next(re){super.next(this._value=re)}}},1145:(ct,De,L)=>{L.d(De,{y:()=>Te});var l=L(6609),k=L(5350),de=L(7649),re=L(5357),ce=L(3667),_e=L(89),ve=L(9094);let Te=(()=>{class ye{constructor(ke){ke&&(this._subscribe=ke)}lift(ke){const He=new ye;return He.source=this,He.operator=ke,He}subscribe(ke,He,Le){const Re=function fe(ye){return ye&&ye instanceof l.Lv||function ae(ye){return ye&&(0,_e.m)(ye.next)&&(0,_e.m)(ye.error)&&(0,_e.m)(ye.complete)}(ye)&&(0,k.Nn)(ye)}(ke)?ke:new l.Hp(ke,He,Le);return(0,ve.x)(()=>{const{operator:at,source:Dt}=this;Re.add(at?at.call(Re,Dt):Dt?this._subscribe(Re):this._trySubscribe(Re))}),Re}_trySubscribe(ke){try{return this._subscribe(ke)}catch(He){ke.error(He)}}forEach(ke,He){return new(He=be(He))((Le,Re)=>{const at=new l.Hp({next:Dt=>{try{ke(Dt)}catch(ut){Re(ut),at.unsubscribe()}},error:Re,complete:Le});this.subscribe(at)})}_subscribe(ke){var He;return null===(He=this.source)||void 0===He?void 0:He.subscribe(ke)}[de.L](){return this}pipe(...ke){return(0,re.U)(ke)(this)}toPromise(ke){return new(ke=be(ke))((He,Le)=>{let Re;this.subscribe(at=>Re=at,at=>Le(at),()=>He(Re))})}}return ye.create=Ve=>new ye(Ve),ye})();function be(ye){var Ve;return null!==(Ve=ye??ce.config.Promise)&&void 0!==Ve?Ve:Promise}},5992:(ct,De,L)=>{L.d(De,{x:()=>ve});var l=L(1145),k=L(5350);const re=(0,L(8261).d)(be=>function(){be(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var ce=L(3647),_e=L(9094);let ve=(()=>{class be extends l.y{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(fe){const ye=new Te(this,this);return ye.operator=fe,ye}_throwIfClosed(){if(this.closed)throw new re}next(fe){(0,_e.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const ye of this.currentObservers)ye.next(fe)}})}error(fe){(0,_e.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=fe;const{observers:ye}=this;for(;ye.length;)ye.shift().error(fe)}})}complete(){(0,_e.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:fe}=this;for(;fe.length;)fe.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var fe;return(null===(fe=this.observers)||void 0===fe?void 0:fe.length)>0}_trySubscribe(fe){return this._throwIfClosed(),super._trySubscribe(fe)}_subscribe(fe){return this._throwIfClosed(),this._checkFinalizedStatuses(fe),this._innerSubscribe(fe)}_innerSubscribe(fe){const{hasError:ye,isStopped:Ve,observers:ke}=this;return ye||Ve?k.Lc:(this.currentObservers=null,ke.push(fe),new k.w0(()=>{this.currentObservers=null,(0,ce.P)(ke,fe)}))}_checkFinalizedStatuses(fe){const{hasError:ye,thrownError:Ve,isStopped:ke}=this;ye?fe.error(Ve):ke&&fe.complete()}asObservable(){const fe=new l.y;return fe.source=this,fe}}return be.create=(ae,fe)=>new Te(ae,fe),be})();class Te extends ve{constructor(ae,fe){super(),this.destination=ae,this.source=fe}next(ae){var fe,ye;null===(ye=null===(fe=this.destination)||void 0===fe?void 0:fe.next)||void 0===ye||ye.call(fe,ae)}error(ae){var fe,ye;null===(ye=null===(fe=this.destination)||void 0===fe?void 0:fe.error)||void 0===ye||ye.call(fe,ae)}complete(){var ae,fe;null===(fe=null===(ae=this.destination)||void 0===ae?void 0:ae.complete)||void 0===fe||fe.call(ae)}_subscribe(ae){var fe,ye;return null!==(ye=null===(fe=this.source)||void 0===fe?void 0:fe.subscribe(ae))&&void 0!==ye?ye:k.Lc}}},6609:(ct,De,L)=>{L.d(De,{Hp:()=>Le,Lv:()=>ye});var l=L(89),k=L(5350),de=L(3667),re=L(3320),ce=L(5998);const _e=be("C",void 0,void 0);function be(ne,Pe,Me){return{kind:ne,value:Pe,error:Me}}var ae=L(9877),fe=L(9094);class ye extends k.w0{constructor(Pe){super(),this.isStopped=!1,Pe?(this.destination=Pe,(0,k.Nn)(Pe)&&Pe.add(this)):this.destination=ut}static create(Pe,Me,nt){return new Le(Pe,Me,nt)}next(Pe){this.isStopped?Dt(function Te(ne){return be("N",ne,void 0)}(Pe),this):this._next(Pe)}error(Pe){this.isStopped?Dt(function ve(ne){return be("E",void 0,ne)}(Pe),this):(this.isStopped=!0,this._error(Pe))}complete(){this.isStopped?Dt(_e,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(Pe){this.destination.next(Pe)}_error(Pe){try{this.destination.error(Pe)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Ve=Function.prototype.bind;function ke(ne,Pe){return Ve.call(ne,Pe)}class He{constructor(Pe){this.partialObserver=Pe}next(Pe){const{partialObserver:Me}=this;if(Me.next)try{Me.next(Pe)}catch(nt){Re(nt)}}error(Pe){const{partialObserver:Me}=this;if(Me.error)try{Me.error(Pe)}catch(nt){Re(nt)}else Re(Pe)}complete(){const{partialObserver:Pe}=this;if(Pe.complete)try{Pe.complete()}catch(Me){Re(Me)}}}class Le extends ye{constructor(Pe,Me,nt){let it;if(super(),(0,l.m)(Pe)||!Pe)it={next:Pe??void 0,error:Me??void 0,complete:nt??void 0};else{let Je;this&&de.config.useDeprecatedNextContext?(Je=Object.create(Pe),Je.unsubscribe=()=>this.unsubscribe(),it={next:Pe.next&&ke(Pe.next,Je),error:Pe.error&&ke(Pe.error,Je),complete:Pe.complete&&ke(Pe.complete,Je)}):it=Pe}this.destination=new He(it)}}function Re(ne){de.config.useDeprecatedSynchronousErrorHandling?(0,fe.O)(ne):(0,re.h)(ne)}function Dt(ne,Pe){const{onStoppedNotification:Me}=de.config;Me&&ae.z.setTimeout(()=>Me(ne,Pe))}const ut={closed:!0,next:ce.Z,error:function at(ne){throw ne},complete:ce.Z}},5350:(ct,De,L)=>{L.d(De,{Lc:()=>_e,w0:()=>ce,Nn:()=>ve});var l=L(89);const de=(0,L(8261).d)(be=>function(fe){be(this),this.message=fe?`${fe.length} errors occurred during unsubscription:\n${fe.map((ye,Ve)=>`${Ve+1}) ${ye.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=fe});var re=L(3647);class ce{constructor(ae){this.initialTeardown=ae,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let ae;if(!this.closed){this.closed=!0;const{_parentage:fe}=this;if(fe)if(this._parentage=null,Array.isArray(fe))for(const ke of fe)ke.remove(this);else fe.remove(this);const{initialTeardown:ye}=this;if((0,l.m)(ye))try{ye()}catch(ke){ae=ke instanceof de?ke.errors:[ke]}const{_finalizers:Ve}=this;if(Ve){this._finalizers=null;for(const ke of Ve)try{Te(ke)}catch(He){ae=ae??[],He instanceof de?ae=[...ae,...He.errors]:ae.push(He)}}if(ae)throw new de(ae)}}add(ae){var fe;if(ae&&ae!==this)if(this.closed)Te(ae);else{if(ae instanceof ce){if(ae.closed||ae._hasParent(this))return;ae._addParent(this)}(this._finalizers=null!==(fe=this._finalizers)&&void 0!==fe?fe:[]).push(ae)}}_hasParent(ae){const{_parentage:fe}=this;return fe===ae||Array.isArray(fe)&&fe.includes(ae)}_addParent(ae){const{_parentage:fe}=this;this._parentage=Array.isArray(fe)?(fe.push(ae),fe):fe?[fe,ae]:ae}_removeParent(ae){const{_parentage:fe}=this;fe===ae?this._parentage=null:Array.isArray(fe)&&(0,re.P)(fe,ae)}remove(ae){const{_finalizers:fe}=this;fe&&(0,re.P)(fe,ae),ae instanceof ce&&ae._removeParent(this)}}ce.EMPTY=(()=>{const be=new ce;return be.closed=!0,be})();const _e=ce.EMPTY;function ve(be){return be instanceof ce||be&&"closed"in be&&(0,l.m)(be.remove)&&(0,l.m)(be.add)&&(0,l.m)(be.unsubscribe)}function Te(be){(0,l.m)(be)?be():be.unsubscribe()}},3667:(ct,De,L)=>{L.d(De,{config:()=>l});const l={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},841:(ct,De,L)=>{L.d(De,{a:()=>ae,l:()=>fe});var l=L(1145),k=L(302),de=L(3477),re=L(1106),ce=L(8472),_e=L(9321),ve=L(4407),Te=L(8014),be=L(5797);function ae(...Ve){const ke=(0,_e.yG)(Ve),He=(0,_e.jO)(Ve),{args:Le,keys:Re}=(0,k.D)(Ve);if(0===Le.length)return(0,de.D)([],ke);const at=new l.y(fe(Le,ke,Re?Dt=>(0,ve.n)(Re,Dt):re.y));return He?at.pipe((0,ce.Z)(He)):at}function fe(Ve,ke,He=re.y){return Le=>{ye(ke,()=>{const{length:Re}=Ve,at=new Array(Re);let Dt=Re,ut=Re;for(let ne=0;ne{const Pe=(0,de.D)(Ve[ne],ke);let Me=!1;Pe.subscribe((0,Te.x)(Le,nt=>{at[ne]=nt,Me||(Me=!0,ut--),ut||Le.next(He(at.slice()))},()=>{--Dt||Le.complete()}))},Le)},Le)}}function ye(Ve,ke,He){Ve?(0,be.f)(He,Ve,ke):ke()}},8402:(ct,De,L)=>{L.d(De,{z:()=>ce});var l=L(8563),de=L(9321),re=L(3477);function ce(..._e){return function k(){return(0,l.J)(1)}()((0,re.D)(_e,(0,de.yG)(_e)))}},1288:(ct,De,L)=>{L.d(De,{E:()=>k});const k=new(L(1145).y)(ce=>ce.complete())},6548:(ct,De,L)=>{L.d(De,{D:()=>Te});var l=L(1145),k=L(302),de=L(9417),re=L(9321),ce=L(8014),_e=L(8472),ve=L(4407);function Te(...be){const ae=(0,re.jO)(be),{args:fe,keys:ye}=(0,k.D)(be),Ve=new l.y(ke=>{const{length:He}=fe;if(!He)return void ke.complete();const Le=new Array(He);let Re=He,at=He;for(let Dt=0;Dt{ut||(ut=!0,at--),Le[Dt]=ne},()=>Re--,void 0,()=>{(!Re||!ut)&&(at||ke.next(ye?(0,ve.n)(ye,Le):Le),ke.complete())}))}});return ae?Ve.pipe((0,_e.Z)(ae)):Ve}},3477:(ct,De,L)=>{L.d(De,{D:()=>nt});var l=L(9417),k=L(5797),de=L(4134),re=L(8014);function ce(it,Je=0){return(0,de.e)((wt,mt)=>{wt.subscribe((0,re.x)(mt,$t=>(0,k.f)(mt,it,()=>mt.next($t),Je),()=>(0,k.f)(mt,it,()=>mt.complete(),Je),$t=>(0,k.f)(mt,it,()=>mt.error($t),Je)))})}function _e(it,Je=0){return(0,de.e)((wt,mt)=>{mt.add(it.schedule(()=>wt.subscribe(mt),Je))})}var be=L(1145),fe=L(5395),ye=L(89);function ke(it,Je){if(!it)throw new Error("Iterable cannot be null");return new be.y(wt=>{(0,k.f)(wt,Je,()=>{const mt=it[Symbol.asyncIterator]();(0,k.f)(wt,Je,()=>{mt.next().then($t=>{$t.done?wt.complete():wt.next($t.value)})},0,!0)})})}var He=L(7298),Le=L(1246),Re=L(5859),at=L(4432),Dt=L(3656),ut=L(4993),ne=L(4766);function nt(it,Je){return Je?function Me(it,Je){if(null!=it){if((0,He.c)(it))return function ve(it,Je){return(0,l.Xf)(it).pipe(_e(Je),ce(Je))}(it,Je);if((0,Re.z)(it))return function ae(it,Je){return new be.y(wt=>{let mt=0;return Je.schedule(function(){mt===it.length?wt.complete():(wt.next(it[mt++]),wt.closed||this.schedule())})})}(it,Je);if((0,Le.t)(it))return function Te(it,Je){return(0,l.Xf)(it).pipe(_e(Je),ce(Je))}(it,Je);if((0,Dt.D)(it))return ke(it,Je);if((0,at.T)(it))return function Ve(it,Je){return new be.y(wt=>{let mt;return(0,k.f)(wt,Je,()=>{mt=it[fe.h](),(0,k.f)(wt,Je,()=>{let $t,Vn;try{({value:$t,done:Vn}=mt.next())}catch(Sn){return void wt.error(Sn)}Vn?wt.complete():wt.next($t)},0,!0)}),()=>(0,ye.m)(mt?.return)&&mt.return()})}(it,Je);if((0,ne.L)(it))return function Pe(it,Je){return ke((0,ne.Q)(it),Je)}(it,Je)}throw(0,ut.z)(it)}(it,Je):(0,l.Xf)(it)}},3276:(ct,De,L)=>{L.d(De,{R:()=>ae});var l=L(9417),k=L(1145),de=L(2874),re=L(5859),ce=L(89),_e=L(8472);const ve=["addListener","removeListener"],Te=["addEventListener","removeEventListener"],be=["on","off"];function ae(He,Le,Re,at){if((0,ce.m)(Re)&&(at=Re,Re=void 0),at)return ae(He,Le,Re).pipe((0,_e.Z)(at));const[Dt,ut]=function ke(He){return(0,ce.m)(He.addEventListener)&&(0,ce.m)(He.removeEventListener)}(He)?Te.map(ne=>Pe=>He[ne](Le,Pe,Re)):function ye(He){return(0,ce.m)(He.addListener)&&(0,ce.m)(He.removeListener)}(He)?ve.map(fe(He,Le)):function Ve(He){return(0,ce.m)(He.on)&&(0,ce.m)(He.off)}(He)?be.map(fe(He,Le)):[];if(!Dt&&(0,re.z)(He))return(0,de.z)(ne=>ae(ne,Le,Re))((0,l.Xf)(He));if(!Dt)throw new TypeError("Invalid event target");return new k.y(ne=>{const Pe=(...Me)=>ne.next(1ut(Pe)})}function fe(He,Le){return Re=>at=>He[Re](Le,at)}},9417:(ct,De,L)=>{L.d(De,{Xf:()=>Ve});var l=L(3449),k=L(5859),de=L(1246),re=L(1145),ce=L(7298),_e=L(3656),ve=L(4993),Te=L(4432),be=L(4766),ae=L(89),fe=L(3320),ye=L(7649);function Ve(ne){if(ne instanceof re.y)return ne;if(null!=ne){if((0,ce.c)(ne))return function ke(ne){return new re.y(Pe=>{const Me=ne[ye.L]();if((0,ae.m)(Me.subscribe))return Me.subscribe(Pe);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(ne);if((0,k.z)(ne))return function He(ne){return new re.y(Pe=>{for(let Me=0;Me{ne.then(Me=>{Pe.closed||(Pe.next(Me),Pe.complete())},Me=>Pe.error(Me)).then(null,fe.h)})}(ne);if((0,_e.D)(ne))return at(ne);if((0,Te.T)(ne))return function Re(ne){return new re.y(Pe=>{for(const Me of ne)if(Pe.next(Me),Pe.closed)return;Pe.complete()})}(ne);if((0,be.L)(ne))return function Dt(ne){return at((0,be.Q)(ne))}(ne)}throw(0,ve.z)(ne)}function at(ne){return new re.y(Pe=>{(function ut(ne,Pe){var Me,nt,it,Je;return(0,l.mG)(this,void 0,void 0,function*(){try{for(Me=(0,l.KL)(ne);!(nt=yield Me.next()).done;)if(Pe.next(nt.value),Pe.closed)return}catch(wt){it={error:wt}}finally{try{nt&&!nt.done&&(Je=Me.return)&&(yield Je.call(Me))}finally{if(it)throw it.error}}Pe.complete()})})(ne,Pe).catch(Me=>Pe.error(Me))})}},7137:(ct,De,L)=>{L.d(De,{F:()=>de});var l=L(4898),k=L(1297);function de(re=0,ce=l.z){return re<0&&(re=0),(0,k.H)(re,re,ce)}},3506:(ct,De,L)=>{L.d(De,{T:()=>_e});var l=L(8563),k=L(9417),de=L(1288),re=L(9321),ce=L(3477);function _e(...ve){const Te=(0,re.yG)(ve),be=(0,re._6)(ve,1/0),ae=ve;return ae.length?1===ae.length?(0,k.Xf)(ae[0]):(0,l.J)(be)((0,ce.D)(ae,Te)):de.E}},287:(ct,De,L)=>{L.d(De,{of:()=>de});var l=L(9321),k=L(3477);function de(...re){const ce=(0,l.yG)(re);return(0,k.D)(re,ce)}},1297:(ct,De,L)=>{L.d(De,{H:()=>ce});var l=L(1145),k=L(4898),de=L(625);function ce(_e=0,ve,Te=k.P){let be=-1;return null!=ve&&((0,de.K)(ve)?Te=ve:be=ve),new l.y(ae=>{let fe=function re(_e){return _e instanceof Date&&!isNaN(_e)}(_e)?+_e-Te.now():_e;fe<0&&(fe=0);let ye=0;return Te.schedule(function(){ae.closed||(ae.next(ye++),0<=be?this.schedule(void 0,be):ae.complete())},fe)})}},8014:(ct,De,L)=>{L.d(De,{x:()=>k});var l=L(6609);function k(re,ce,_e,ve,Te){return new de(re,ce,_e,ve,Te)}class de extends l.Lv{constructor(ce,_e,ve,Te,be,ae){super(ce),this.onFinalize=be,this.shouldUnsubscribe=ae,this._next=_e?function(fe){try{_e(fe)}catch(ye){ce.error(ye)}}:super._next,this._error=Te?function(fe){try{Te(fe)}catch(ye){ce.error(ye)}finally{this.unsubscribe()}}:super._error,this._complete=ve?function(){try{ve()}catch(fe){ce.error(fe)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var ce;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:_e}=this;super.unsubscribe(),!_e&&(null===(ce=this.onFinalize)||void 0===ce||ce.call(this))}}}},6927:(ct,De,L)=>{L.d(De,{e:()=>ve});var l=L(4898),k=L(4134),de=L(9417),re=L(8014),_e=L(1297);function ve(Te,be=l.z){return function ce(Te){return(0,k.e)((be,ae)=>{let fe=!1,ye=null,Ve=null,ke=!1;const He=()=>{if(Ve?.unsubscribe(),Ve=null,fe){fe=!1;const Re=ye;ye=null,ae.next(Re)}ke&&ae.complete()},Le=()=>{Ve=null,ke&&ae.complete()};be.subscribe((0,re.x)(ae,Re=>{fe=!0,ye=Re,Ve||(0,de.Xf)(Te(Re)).subscribe(Ve=(0,re.x)(ae,He,Le))},()=>{ke=!0,(!fe||!Ve||Ve.closed)&&ae.complete()}))})}(()=>(0,_e.H)(Te,be))}},1173:(ct,De,L)=>{L.d(De,{b:()=>de});var l=L(2874),k=L(89);function de(re,ce){return(0,k.m)(ce)?(0,l.z)(re,ce,1):(0,l.z)(re,1)}},1050:(ct,De,L)=>{L.d(De,{b:()=>re});var l=L(4898),k=L(4134),de=L(8014);function re(ce,_e=l.z){return(0,k.e)((ve,Te)=>{let be=null,ae=null,fe=null;const ye=()=>{if(be){be.unsubscribe(),be=null;const ke=ae;ae=null,Te.next(ke)}};function Ve(){const ke=fe+ce,He=_e.now();if(He{ae=ke,fe=_e.now(),be||(be=_e.schedule(Ve,ce),Te.add(be))},()=>{ye(),Te.complete()},void 0,()=>{ae=be=null}))})}},4475:(ct,De,L)=>{L.d(De,{d:()=>de});var l=L(4134),k=L(8014);function de(re){return(0,l.e)((ce,_e)=>{let ve=!1;ce.subscribe((0,k.x)(_e,Te=>{ve=!0,_e.next(Te)},()=>{ve||_e.next(re),_e.complete()}))})}},8777:(ct,De,L)=>{L.d(De,{x:()=>re});var l=L(1106),k=L(4134),de=L(8014);function re(_e,ve=l.y){return _e=_e??ce,(0,k.e)((Te,be)=>{let ae,fe=!0;Te.subscribe((0,de.x)(be,ye=>{const Ve=ve(ye);(fe||!_e(ae,Ve))&&(fe=!1,ae=Ve,be.next(ye))}))})}function ce(_e,ve){return _e===ve}},9735:(ct,De,L)=>{L.d(De,{h:()=>de});var l=L(4134),k=L(8014);function de(re,ce){return(0,l.e)((_e,ve)=>{let Te=0;_e.subscribe((0,k.x)(ve,be=>re.call(ce,be,Te++)&&ve.next(be)))})}},5220:(ct,De,L)=>{L.d(De,{x:()=>k});var l=L(4134);function k(de){return(0,l.e)((re,ce)=>{try{re.subscribe(ce)}finally{ce.add(de)}})}},2972:(ct,De,L)=>{L.d(De,{P:()=>ve});var l=L(4938),k=L(9735),de=L(4359),re=L(4475),ce=L(8090),_e=L(1106);function ve(Te,be){const ae=arguments.length>=2;return fe=>fe.pipe(Te?(0,k.h)((ye,Ve)=>Te(ye,Ve,fe)):_e.y,(0,de.q)(1),ae?(0,re.d)(be):(0,ce.T)(()=>new l.K))}},5990:(ct,De,L)=>{L.d(De,{U:()=>de});var l=L(4134),k=L(8014);function de(re,ce){return(0,l.e)((_e,ve)=>{let Te=0;_e.subscribe((0,k.x)(ve,be=>{ve.next(re.call(ce,be,Te++))}))})}},3197:(ct,De,L)=>{L.d(De,{h:()=>k});var l=L(5990);function k(de){return(0,l.U)(()=>de)}},8563:(ct,De,L)=>{L.d(De,{J:()=>de});var l=L(2874),k=L(1106);function de(re=1/0){return(0,l.z)(k.y,re)}},2874:(ct,De,L)=>{L.d(De,{z:()=>Te});var l=L(5990),k=L(9417),de=L(4134),re=L(5797),ce=L(8014),ve=L(89);function Te(be,ae,fe=1/0){return(0,ve.m)(ae)?Te((ye,Ve)=>(0,l.U)((ke,He)=>ae(ye,ke,Ve,He))((0,k.Xf)(be(ye,Ve))),fe):("number"==typeof ae&&(fe=ae),(0,de.e)((ye,Ve)=>function _e(be,ae,fe,ye,Ve,ke,He,Le){const Re=[];let at=0,Dt=0,ut=!1;const ne=()=>{ut&&!Re.length&&!at&&ae.complete()},Pe=nt=>at{ke&&ae.next(nt),at++;let it=!1;(0,k.Xf)(fe(nt,Dt++)).subscribe((0,ce.x)(ae,Je=>{Ve?.(Je),ke?Pe(Je):ae.next(Je)},()=>{it=!0},void 0,()=>{if(it)try{for(at--;Re.length&&atMe(Je)):Me(Je)}ne()}catch(Je){ae.error(Je)}}))};return be.subscribe((0,ce.x)(ae,Pe,()=>{ut=!0,ne()})),()=>{Le?.()}}(ye,Ve,be,fe)))}},9853:(ct,De,L)=>{L.d(De,{B:()=>ce});var l=L(9417),k=L(5992),de=L(6609),re=L(4134);function ce(ve={}){const{connector:Te=(()=>new k.x),resetOnError:be=!0,resetOnComplete:ae=!0,resetOnRefCountZero:fe=!0}=ve;return ye=>{let Ve,ke,He,Le=0,Re=!1,at=!1;const Dt=()=>{ke?.unsubscribe(),ke=void 0},ut=()=>{Dt(),Ve=He=void 0,Re=at=!1},ne=()=>{const Pe=Ve;ut(),Pe?.unsubscribe()};return(0,re.e)((Pe,Me)=>{Le++,!at&&!Re&&Dt();const nt=He=He??Te();Me.add(()=>{Le--,0===Le&&!at&&!Re&&(ke=_e(ne,fe))}),nt.subscribe(Me),!Ve&&Le>0&&(Ve=new de.Hp({next:it=>nt.next(it),error:it=>{at=!0,Dt(),ke=_e(ut,be,it),nt.error(it)},complete:()=>{Re=!0,Dt(),ke=_e(ut,ae),nt.complete()}}),(0,l.Xf)(Pe).subscribe(Ve))})(ye)}}function _e(ve,Te,...be){if(!0===Te)return void ve();if(!1===Te)return;const ae=new de.Hp({next:()=>{ae.unsubscribe(),ve()}});return(0,l.Xf)(Te(...be)).subscribe(ae)}},1553:(ct,De,L)=>{L.d(De,{O:()=>re});var l=L(8402),k=L(9321),de=L(4134);function re(...ce){const _e=(0,k.yG)(ce);return(0,de.e)((ve,Te)=>{(_e?(0,l.z)(ce,ve,_e):(0,l.z)(ce,ve)).subscribe(Te)})}},3318:(ct,De,L)=>{L.d(De,{w:()=>re});var l=L(9417),k=L(4134),de=L(8014);function re(ce,_e){return(0,k.e)((ve,Te)=>{let be=null,ae=0,fe=!1;const ye=()=>fe&&!be&&Te.complete();ve.subscribe((0,de.x)(Te,Ve=>{be?.unsubscribe();let ke=0;const He=ae++;(0,l.Xf)(ce(Ve,He)).subscribe(be=(0,de.x)(Te,Le=>Te.next(_e?_e(Ve,Le,He,ke++):Le),()=>{be=null,ye()}))},()=>{fe=!0,ye()}))})}},4359:(ct,De,L)=>{L.d(De,{q:()=>re});var l=L(1288),k=L(4134),de=L(8014);function re(ce){return ce<=0?()=>l.E:(0,k.e)((_e,ve)=>{let Te=0;_e.subscribe((0,de.x)(ve,be=>{++Te<=ce&&(ve.next(be),ce<=Te&&ve.complete())}))})}},7701:(ct,De,L)=>{L.d(De,{R:()=>ce});var l=L(4134),k=L(8014),de=L(9417),re=L(5998);function ce(_e){return(0,l.e)((ve,Te)=>{(0,de.Xf)(_e).subscribe((0,k.x)(Te,()=>Te.complete(),re.Z)),!Te.closed&&ve.subscribe(Te)})}},8527:(ct,De,L)=>{L.d(De,{b:()=>ce});var l=L(89),k=L(4134),de=L(8014),re=L(1106);function ce(_e,ve,Te){const be=(0,l.m)(_e)||ve||Te?{next:_e,error:ve,complete:Te}:_e;return be?(0,k.e)((ae,fe)=>{var ye;null===(ye=be.subscribe)||void 0===ye||ye.call(be);let Ve=!0;ae.subscribe((0,de.x)(fe,ke=>{var He;null===(He=be.next)||void 0===He||He.call(be,ke),fe.next(ke)},()=>{var ke;Ve=!1,null===(ke=be.complete)||void 0===ke||ke.call(be),fe.complete()},ke=>{var He;Ve=!1,null===(He=be.error)||void 0===He||He.call(be,ke),fe.error(ke)},()=>{var ke,He;Ve&&(null===(ke=be.unsubscribe)||void 0===ke||ke.call(be)),null===(He=be.finalize)||void 0===He||He.call(be)}))}):re.y}},8090:(ct,De,L)=>{L.d(De,{T:()=>re});var l=L(4938),k=L(4134),de=L(8014);function re(_e=ce){return(0,k.e)((ve,Te)=>{let be=!1;ve.subscribe((0,de.x)(Te,ae=>{be=!0,Te.next(ae)},()=>be?Te.complete():Te.error(_e())))})}function ce(){return new l.K}},8691:(ct,De,L)=>{L.d(De,{o:()=>ce});var l=L(5350);class k extends l.w0{constructor(ve,Te){super()}schedule(ve,Te=0){return this}}const de={setInterval(_e,ve,...Te){const{delegate:be}=de;return be?.setInterval?be.setInterval(_e,ve,...Te):setInterval(_e,ve,...Te)},clearInterval(_e){const{delegate:ve}=de;return(ve?.clearInterval||clearInterval)(_e)},delegate:void 0};var re=L(3647);class ce extends k{constructor(ve,Te){super(ve,Te),this.scheduler=ve,this.work=Te,this.pending=!1}schedule(ve,Te=0){var be;if(this.closed)return this;this.state=ve;const ae=this.id,fe=this.scheduler;return null!=ae&&(this.id=this.recycleAsyncId(fe,ae,Te)),this.pending=!0,this.delay=Te,this.id=null!==(be=this.id)&&void 0!==be?be:this.requestAsyncId(fe,this.id,Te),this}requestAsyncId(ve,Te,be=0){return de.setInterval(ve.flush.bind(ve,this),be)}recycleAsyncId(ve,Te,be=0){if(null!=be&&this.delay===be&&!1===this.pending)return Te;null!=Te&&de.clearInterval(Te)}execute(ve,Te){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const be=this._execute(ve,Te);if(be)return be;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(ve,Te){let ae,be=!1;try{this.work(ve)}catch(fe){be=!0,ae=fe||new Error("Scheduled action threw falsy error")}if(be)return this.unsubscribe(),ae}unsubscribe(){if(!this.closed){const{id:ve,scheduler:Te}=this,{actions:be}=Te;this.work=this.state=this.scheduler=null,this.pending=!1,(0,re.P)(be,this),null!=ve&&(this.id=this.recycleAsyncId(Te,ve,null)),this.delay=null,super.unsubscribe()}}}},1722:(ct,De,L)=>{L.d(De,{v:()=>de});var l=L(238);class k{constructor(ce,_e=k.now){this.schedulerActionCtor=ce,this.now=_e}schedule(ce,_e=0,ve){return new this.schedulerActionCtor(this,ce).schedule(ve,_e)}}k.now=l.l.now;class de extends k{constructor(ce,_e=k.now){super(ce,_e),this.actions=[],this._active=!1}flush(ce){const{actions:_e}=this;if(this._active)return void _e.push(ce);let ve;this._active=!0;do{if(ve=ce.execute(ce.state,ce.delay))break}while(ce=_e.shift());if(this._active=!1,ve){for(;ce=_e.shift();)ce.unsubscribe();throw ve}}}},3733:(ct,De,L)=>{L.d(De,{Z:()=>ve});var l=L(8691),k=L(5350);const de={schedule(be){let ae=requestAnimationFrame,fe=cancelAnimationFrame;const{delegate:ye}=de;ye&&(ae=ye.requestAnimationFrame,fe=ye.cancelAnimationFrame);const Ve=ae(ke=>{fe=void 0,be(ke)});return new k.w0(()=>fe?.(Ve))},requestAnimationFrame(...be){const{delegate:ae}=de;return(ae?.requestAnimationFrame||requestAnimationFrame)(...be)},cancelAnimationFrame(...be){const{delegate:ae}=de;return(ae?.cancelAnimationFrame||cancelAnimationFrame)(...be)},delegate:void 0};var ce=L(1722);const ve=new class _e extends ce.v{flush(ae){this._active=!0;const fe=this._scheduled;this._scheduled=void 0;const{actions:ye}=this;let Ve;ae=ae||ye.shift();do{if(Ve=ae.execute(ae.state,ae.delay))break}while((ae=ye[0])&&ae.id===fe&&ye.shift());if(this._active=!1,Ve){for(;(ae=ye[0])&&ae.id===fe&&ye.shift();)ae.unsubscribe();throw Ve}}}(class re extends l.o{constructor(ae,fe){super(ae,fe),this.scheduler=ae,this.work=fe}requestAsyncId(ae,fe,ye=0){return null!==ye&&ye>0?super.requestAsyncId(ae,fe,ye):(ae.actions.push(this),ae._scheduled||(ae._scheduled=de.requestAnimationFrame(()=>ae.flush(void 0))))}recycleAsyncId(ae,fe,ye=0){var Ve;if(null!=ye?ye>0:this.delay>0)return super.recycleAsyncId(ae,fe,ye);const{actions:ke}=ae;null!=fe&&(null===(Ve=ke[ke.length-1])||void 0===Ve?void 0:Ve.id)!==fe&&(de.cancelAnimationFrame(fe),ae._scheduled=void 0)}})},2698:(ct,De,L)=>{L.d(De,{E:()=>ke});var l=L(8691);let de,k=1;const re={};function ce(Le){return Le in re&&(delete re[Le],!0)}const _e={setImmediate(Le){const Re=k++;return re[Re]=!0,de||(de=Promise.resolve()),de.then(()=>ce(Re)&&Le()),Re},clearImmediate(Le){ce(Le)}},{setImmediate:Te,clearImmediate:be}=_e,ae={setImmediate(...Le){const{delegate:Re}=ae;return(Re?.setImmediate||Te)(...Le)},clearImmediate(Le){const{delegate:Re}=ae;return(Re?.clearImmediate||be)(Le)},delegate:void 0};var ye=L(1722);const ke=new class Ve extends ye.v{flush(Re){this._active=!0;const at=this._scheduled;this._scheduled=void 0;const{actions:Dt}=this;let ut;Re=Re||Dt.shift();do{if(ut=Re.execute(Re.state,Re.delay))break}while((Re=Dt[0])&&Re.id===at&&Dt.shift());if(this._active=!1,ut){for(;(Re=Dt[0])&&Re.id===at&&Dt.shift();)Re.unsubscribe();throw ut}}}(class fe extends l.o{constructor(Re,at){super(Re,at),this.scheduler=Re,this.work=at}requestAsyncId(Re,at,Dt=0){return null!==Dt&&Dt>0?super.requestAsyncId(Re,at,Dt):(Re.actions.push(this),Re._scheduled||(Re._scheduled=ae.setImmediate(Re.flush.bind(Re,void 0))))}recycleAsyncId(Re,at,Dt=0){var ut;if(null!=Dt?Dt>0:this.delay>0)return super.recycleAsyncId(Re,at,Dt);const{actions:ne}=Re;null!=at&&(null===(ut=ne[ne.length-1])||void 0===ut?void 0:ut.id)!==at&&(ae.clearImmediate(at),Re._scheduled===at&&(Re._scheduled=void 0))}})},4898:(ct,De,L)=>{L.d(De,{P:()=>re,z:()=>de});var l=L(8691);const de=new(L(1722).v)(l.o),re=de},238:(ct,De,L)=>{L.d(De,{l:()=>l});const l={now:()=>(l.delegate||Date).now(),delegate:void 0}},9877:(ct,De,L)=>{L.d(De,{z:()=>l});const l={setTimeout(k,de,...re){const{delegate:ce}=l;return ce?.setTimeout?ce.setTimeout(k,de,...re):setTimeout(k,de,...re)},clearTimeout(k){const{delegate:de}=l;return(de?.clearTimeout||clearTimeout)(k)},delegate:void 0}},5395:(ct,De,L)=>{L.d(De,{h:()=>k});const k=function l(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},7649:(ct,De,L)=>{L.d(De,{L:()=>l});const l="function"==typeof Symbol&&Symbol.observable||"@@observable"},4938:(ct,De,L)=>{L.d(De,{K:()=>k});const k=(0,L(8261).d)(de=>function(){de(this),this.name="EmptyError",this.message="no elements in sequence"})},9321:(ct,De,L)=>{L.d(De,{_6:()=>_e,jO:()=>re,yG:()=>ce});var l=L(89),k=L(625);function de(ve){return ve[ve.length-1]}function re(ve){return(0,l.m)(de(ve))?ve.pop():void 0}function ce(ve){return(0,k.K)(de(ve))?ve.pop():void 0}function _e(ve,Te){return"number"==typeof de(ve)?ve.pop():Te}},302:(ct,De,L)=>{L.d(De,{D:()=>ce});const{isArray:l}=Array,{getPrototypeOf:k,prototype:de,keys:re}=Object;function ce(ve){if(1===ve.length){const Te=ve[0];if(l(Te))return{args:Te,keys:null};if(function _e(ve){return ve&&"object"==typeof ve&&k(ve)===de}(Te)){const be=re(Te);return{args:be.map(ae=>Te[ae]),keys:be}}}return{args:ve,keys:null}}},3647:(ct,De,L)=>{function l(k,de){if(k){const re=k.indexOf(de);0<=re&&k.splice(re,1)}}L.d(De,{P:()=>l})},8261:(ct,De,L)=>{function l(k){const re=k(ce=>{Error.call(ce),ce.stack=(new Error).stack});return re.prototype=Object.create(Error.prototype),re.prototype.constructor=re,re}L.d(De,{d:()=>l})},4407:(ct,De,L)=>{function l(k,de){return k.reduce((re,ce,_e)=>(re[ce]=de[_e],re),{})}L.d(De,{n:()=>l})},9094:(ct,De,L)=>{L.d(De,{O:()=>re,x:()=>de});var l=L(3667);let k=null;function de(ce){if(l.config.useDeprecatedSynchronousErrorHandling){const _e=!k;if(_e&&(k={errorThrown:!1,error:null}),ce(),_e){const{errorThrown:ve,error:Te}=k;if(k=null,ve)throw Te}}else ce()}function re(ce){l.config.useDeprecatedSynchronousErrorHandling&&k&&(k.errorThrown=!0,k.error=ce)}},5797:(ct,De,L)=>{function l(k,de,re,ce=0,_e=!1){const ve=de.schedule(function(){re(),_e?k.add(this.schedule(null,ce)):this.unsubscribe()},ce);if(k.add(ve),!_e)return ve}L.d(De,{f:()=>l})},1106:(ct,De,L)=>{function l(k){return k}L.d(De,{y:()=>l})},5859:(ct,De,L)=>{L.d(De,{z:()=>l});const l=k=>k&&"number"==typeof k.length&&"function"!=typeof k},3656:(ct,De,L)=>{L.d(De,{D:()=>k});var l=L(89);function k(de){return Symbol.asyncIterator&&(0,l.m)(de?.[Symbol.asyncIterator])}},89:(ct,De,L)=>{function l(k){return"function"==typeof k}L.d(De,{m:()=>l})},7298:(ct,De,L)=>{L.d(De,{c:()=>de});var l=L(7649),k=L(89);function de(re){return(0,k.m)(re[l.L])}},4432:(ct,De,L)=>{L.d(De,{T:()=>de});var l=L(5395),k=L(89);function de(re){return(0,k.m)(re?.[l.h])}},2861:(ct,De,L)=>{L.d(De,{b:()=>de});var l=L(1145),k=L(89);function de(re){return!!re&&(re instanceof l.y||(0,k.m)(re.lift)&&(0,k.m)(re.subscribe))}},1246:(ct,De,L)=>{L.d(De,{t:()=>k});var l=L(89);function k(de){return(0,l.m)(de?.then)}},4766:(ct,De,L)=>{L.d(De,{L:()=>re,Q:()=>de});var l=L(3449),k=L(89);function de(ce){return(0,l.FC)(this,arguments,function*(){const ve=ce.getReader();try{for(;;){const{value:Te,done:be}=yield(0,l.qq)(ve.read());if(be)return yield(0,l.qq)(void 0);yield yield(0,l.qq)(Te)}}finally{ve.releaseLock()}})}function re(ce){return(0,k.m)(ce?.getReader)}},625:(ct,De,L)=>{L.d(De,{K:()=>k});var l=L(89);function k(de){return de&&(0,l.m)(de.schedule)}},4134:(ct,De,L)=>{L.d(De,{A:()=>k,e:()=>de});var l=L(89);function k(re){return(0,l.m)(re?.lift)}function de(re){return ce=>{if(k(ce))return ce.lift(function(_e){try{return re(_e,this)}catch(ve){this.error(ve)}});throw new TypeError("Unable to lift unknown Observable type")}}},8472:(ct,De,L)=>{L.d(De,{Z:()=>re});var l=L(5990);const{isArray:k}=Array;function re(ce){return(0,l.U)(_e=>function de(ce,_e){return k(_e)?ce(..._e):ce(_e)}(ce,_e))}},5998:(ct,De,L)=>{function l(){}L.d(De,{Z:()=>l})},5357:(ct,De,L)=>{L.d(De,{U:()=>de,z:()=>k});var l=L(1106);function k(...re){return de(re)}function de(re){return 0===re.length?l.y:1===re.length?re[0]:function(_e){return re.reduce((ve,Te)=>Te(ve),_e)}}},3320:(ct,De,L)=>{L.d(De,{h:()=>de});var l=L(3667),k=L(9877);function de(re){k.z.setTimeout(()=>{const{onUnhandledError:ce}=l.config;if(!ce)throw re;ce(re)})}},4993:(ct,De,L)=>{function l(k){return new TypeError(`You provided ${null!==k&&"object"==typeof k?"an invalid object":`'${k}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}L.d(De,{z:()=>l})},9498:(ct,De,L)=>{L.d(De,{q:()=>ce});var l=L(7243),k=L(9223),de=L(3223),re=L(3714);let ce=(()=>{class _e{static#e=this.\u0275fac=function(be){return new(be||_e)};static#t=this.\u0275mod=re.oAB({type:_e});static#n=this.\u0275inj=re.cJS({imports:[l.K6A,k.u5,k.UX,de.ez]})}return _e})()},7997:(ct,De,L)=>{L.d(De,{c:()=>de});var l=L(5992),k=L(3714);let de=(()=>{class re{constructor(){this.alertSource=new l.x,this.alert$=this.alertSource.asObservable()}alert(_e){this.alertSource.next(_e)}static#e=this.\u0275fac=function(ve){return new(ve||re)};static#t=this.\u0275prov=k.Yz7({token:re,factory:re.\u0275fac,providedIn:"root"})}return re})()},7512:(ct,De,L)=>{L.d(De,{N:()=>de});var l=L(5992),k=L(3714);let de=(()=>{class re{constructor(){this.progressSource=new l.x,this.progress$=this.progressSource.asObservable()}progress(_e){this.progressSource.next(_e)}static#e=this.\u0275fac=function(ve){return new(ve||re)};static#t=this.\u0275prov=k.Yz7({token:re,factory:re.\u0275fac,providedIn:"root"})}return re})()},5476:(ct,De,L)=>{var l=L(5813),k=L(3714),de=L(1794);const re=[{path:"",redirectTo:"examples",pathMatch:"full"},{path:"examples",loadChildren:()=>L.e(371).then(L.bind(L,6371)).then(U=>U.RouteBookmarksModule)},{path:"example-layers",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(990),L.e(270),L.e(592),L.e(466)]).then(L.bind(L,2466)).then(U=>U.RouteMapModule),data:{title:"Layers",description:"Example shows how to work with UKIS layers, groups and the layer-service.",img:"assets/route-layers.jpg"}},{path:"example-projection",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(592),L.e(754)]).then(L.bind(L,6754)).then(U=>U.RouteMap2Module),data:{title:"Projection",description:"Example shows how to work with projections using ukis-projection-switch from @dlr-eoc/map-tools.",img:"assets/route-projection.jpg"}},{path:"example-events",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(592),L.e(449)]).then(L.bind(L,7248)).then(U=>U.RouteMap3Module),data:{title:"Events",description:"Example of map and layer events e.g. to show a loading bar or create a grid layer based on zoom.",img:"assets/route-events.jpg"}},{path:"example-custom-layers",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(595),L.e(633),L.e(592),L.e(209)]).then(L.bind(L,209)).then(U=>U.RouteMap4Module),data:{title:"Custom Layers",description:"Example how to use UKIS custom layer e.g. use OpenLayers instances directly, bind events, styles and renderers.",img:"assets/route-custom-layers.jpg"}},{path:"example-owc-layers",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(990),L.e(445)]).then(L.bind(L,8445)).then(U=>U.RouteExampleOwcLayersModule),data:{title:"OWS Context layers",description:'Example how to declaratively configure layers in a json structure to save and exchange this state. This is using the "OWS Context GeoJSON format". The example context are sored in projects/shared-assets/owc.',img:"assets/route-ows-context.jpg"}},{path:"example-layout",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(198)]).then(L.bind(L,6198)).then(U=>U.RouteMap5Module),data:{title:"Two Vertical-Nav Layout",description:'Example shows how to use "Clarity Vertical Nav" on both sides and a footer. This should not be used when working on smaller screens. See also "Clarity Design System" Responsive navigation.',img:"assets/route-2-nav.jpg"}},{path:"example-layer-style",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(783)]).then(L.bind(L,4783)).then(U=>U.RouteMap6Module),data:{title:"Switching Layer-Style",description:'The example shows how styles for "WMS" and "WMTS" are switched dynamically.',img:"assets/route-style-switch.jpg"}},{path:"ol-performance",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(62)]).then(L.bind(L,4062)).then(U=>U.RouteMap7Module),data:{title:"Ol-Performance",description:"Example to messure/check performance on layer rendering.",img:"assets/route-performance.jpg"}},{path:"threejs",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(595),L.e(592),L.e(395)]).then(L.bind(L,4395)).then(U=>U.RouteExampleThreejsModule),data:{title:"Threejs",description:"This example shows a Threejs map connected to a OpenLayers map e.g. to display a globe and a flat map side by side.",img:"assets/route-threejs.jpg"}},{path:"cesium",loadChildren:()=>Promise.all([L.e(550),L.e(631),L.e(633),L.e(168)]).then(L.bind(L,1168)).then(U=>U.RouteCesiumModule),data:{title:"Cesium",description:"This example shows a cesium map and switch to OpenLayers map",img:"assets/route-cesium.jpg"}},{path:"maplibre",loadChildren:()=>Promise.all([L.e(550),L.e(270),L.e(667)]).then(L.bind(L,7667)).then(U=>U.RouteExampleMaplibreModule),data:{title:"Maplibre",description:"This example shows a maplibre map and how to work with UKIS layers",img:"assets/route-maplibre.jpg"}},{path:"licenses",loadChildren:()=>L.e(365).then(L.bind(L,8365)).then(U=>U.RouteLicensesModule),data:{title:"Licenses",description:'This example renders all used dependencies specified in assets/licenses.json which are created with "license-checker"',img:"assets/route-licenses.jpg"}}];let ce=(()=>{class U{static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275mod=k.oAB({type:U});static#n=this.\u0275inj=k.cJS({imports:[de.Bz.forRoot(re,{useHash:!0,preloadingStrategy:de.wm}),de.Bz]})}return U})();typeof window<"u"&&window.hasOwnProperty("ClarityIcons")&&window.ClarityIcons.add({ukis:'\n \n ukis\n \n \n \n \n \n ',dlr:'\n \n dlr\n \n \n ',eoc:'\n \n eoc\n \n \n '});const Te=JSON.parse('{"i8":"12.0.1-next.4"}').i8;var be=L(9735),ae=L(7997),fe=L(7512),ye=L(3223),Ve=L(7243);function ke(U,D){if(1&U&&(k.TgZ(0,"span",12),k._uU(1),k.qZA()),2&U){const E=k.oxw();k.xp6(1),k.Oqu(E.version)}}const He=[[["",8,"header-nav-el"]],"*",[["",8,"header-action-el"]]],Le=function(U){return{"short-title":U}},Re=[".header-nav-el","*",".header-action-el"];let at=(()=>{class U{constructor(){this.title="",this.shortTitle="",this.version=""}ngOnInit(){}static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275cmp=k.Xpm({type:U,selectors:[["ukis-header"]],inputs:{title:["ukis-title","title"],shortTitle:["ukis-short-title","shortTitle"],version:["ukis-version","version"]},ngContentSelectors:Re,decls:17,vars:9,consts:[[1,"header-1"],[1,"branding",3,"ngClass"],["href","https://www.dlr.de","target","_blank","alt","link to dlr"],["shape","dlr","size","48","alt","dlr icon",1,"is-solid"],["href","https://www.dlr.de/eoc/desktopdefault.aspx/tabid-5413/10560_read-21914","target","_blank","alt","link to dlr ukis"],["shape","ukis","size","33","alt","ukis icon",1,"is-solid"],["routerLink","/","routerLinkActive","active",1,"nav-link"],[1,"title",3,"title"],[1,"title","short",3,"title"],["class","version",4,"ngIf"],[1,"header-nav",3,"clr-nav-level"],[1,"header-actions"],[1,"version"]],template:function(N,G){1&N&&(k.F$t(He),k.TgZ(0,"clr-header",0)(1,"div",1)(2,"a",2),k._UZ(3,"clr-icon",3),k.qZA(),k.TgZ(4,"a",4),k._UZ(5,"clr-icon",5),k.qZA(),k.TgZ(6,"a",6)(7,"span",7),k._uU(8),k.qZA(),k.TgZ(9,"span",8),k._uU(10),k.qZA()(),k.YNc(11,ke,2,1,"span",9),k.qZA(),k.TgZ(12,"div",10),k.Hsn(13),k.qZA(),k.Hsn(14,1),k.TgZ(15,"div",11),k.Hsn(16,2),k.qZA()()),2&N&&(k.xp6(1),k.Q6J("ngClass",k.VKq(7,Le,G.shortTitle)),k.xp6(6),k.Q6J("title",G.title),k.xp6(1),k.Oqu(G.title),k.xp6(1),k.Q6J("title",G.title),k.xp6(1),k.Oqu(G.shortTitle),k.xp6(1),k.Q6J("ngIf",G.version),k.xp6(1),k.Q6J("clr-nav-level",1))},dependencies:[ye.mk,ye.O5,de.rH,de.Od,Ve.qvL,Ve.uUW,Ve.saT,Ve.toC]})}return U})();function Dt(U,D){if(1&U){const E=k.EpF();k.TgZ(0,"button",11),k.NdJ("click",function(){const q=k.CHM(E).$implicit;return k.KtG(q.callback&&q.callback())}),k._uU(1),k.qZA()}if(2&U){const E=D.$implicit;k.xp6(1),k.Oqu(E.title)}}function ut(U,D){if(1&U&&(k.TgZ(0,"div",9),k.YNc(1,Dt,2,1,"button",10),k.qZA()),2&U){const E=k.oxw(2);k.xp6(1),k.Q6J("ngForOf",E.alert.actions)}}function ne(U,D){if(1&U){const E=k.EpF();k.TgZ(0,"button",12),k.NdJ("click",function(){k.CHM(E);const G=k.oxw(2);return k.KtG(G.close())}),k._UZ(1,"clr-icon",13),k.qZA()}}function Pe(U,D){if(1&U&&(k.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),k._UZ(4,"clr-icon",5),k.qZA(),k._UZ(5,"div",6),k.YNc(6,ut,2,1,"div",7),k.qZA()(),k.YNc(7,ne,2,0,"button",8),k.qZA()),2&U){const E=k.oxw();k.Q6J("ngClass","alert-"+E.alert.type),k.xp6(5),k.Q6J("innerHTML",E.alert.text,k.oJD),k.xp6(1),k.Q6J("ngIf",E.alert.actions),k.xp6(1),k.Q6J("ngIf",E.alert.closeable)}}let Me=(()=>{class U{constructor(){this.alertChange=new k.vpe}close(){this.alert=null,this.alertChange.emit(this.alert)}static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275cmp=k.Xpm({type:U,selectors:[["ukis-global-alert"]],inputs:{alert:"alert"},outputs:{alertChange:"alertChange"},decls:1,vars:1,consts:[["class","alert alert-app-level","role","alert",3,"ngClass",4,"ngIf"],["role","alert",1,"alert","alert-app-level",3,"ngClass"],[1,"alert-items"],[1,"alert-item","static"],[1,"alert-icon-wrapper"],["shape","info-circle",1,"alert-icon"],[1,"alert-text",3,"innerHTML"],["class","alert-actions",4,"ngIf"],["type","button","class","close","aria-label","alert close",3,"click",4,"ngIf"],[1,"alert-actions"],["class","btn alert-action","aria-label","alert action",3,"click",4,"ngFor","ngForOf"],["aria-label","alert action",1,"btn","alert-action",3,"click"],["type","button","aria-label","alert close",1,"close",3,"click"],["aria-hidden","true","shape","close"]],template:function(N,G){1&N&&k.YNc(0,Pe,8,4,"div",0),2&N&&k.Q6J("ngIf",G.alert)},dependencies:[ye.mk,ye.sg,ye.O5,Ve.I9z,Ve.qvL]})}return U})();function nt(U,D){if(1&U&&(k.TgZ(0,"span")(1,"div",1),k._UZ(2,"progress"),k.qZA()()),2&U){const E=k.oxw();k.xp6(1),k.Q6J("ngClass",E.getProgressClass())}}function it(U,D){if(1&U&&(k.TgZ(0,"span")(1,"div",2),k._UZ(2,"progress",3),k.qZA()()),2&U){const E=k.oxw();k.xp6(1),k.Q6J("ngClass",E.getProgressClass()),k.xp6(1),k.s9C("max",E.progress.max),k.s9C("value",E.progress.value)}}let Je=(()=>{class U{constructor(){this.progressChange=new k.vpe}ngOnInit(){}getProgressClass(){return this.progress?.class?this.progress?.class:""}static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275cmp=k.Xpm({type:U,selectors:[["ukis-global-progress"]],inputs:{progress:"progress"},outputs:{progressChange:"progressChange"},decls:2,vars:2,consts:[[4,"ngIf"],[1,"progress","loop",3,"ngClass"],[1,"progress",3,"ngClass"],[3,"max","value"]],template:function(N,G){1&N&&(k.YNc(0,nt,3,1,"span",0),k.YNc(1,it,3,3,"span",0)),2&N&&(k.Q6J("ngIf",G.progress&&G.progress.indeterminate),k.xp6(1),k.Q6J("ngIf",G.progress&&!G.progress.indeterminate))},dependencies:[ye.mk,ye.O5],styles:[".progress[_ngcontent-%COMP%]{height:.5em}"]})}return U})();function wt(U,D){if(1&U){const E=k.EpF();k.TgZ(0,"ukis-global-alert",5),k.NdJ("alertChange",function(G){k.CHM(E);const q=k.oxw();return k.KtG(q.ui.alert=G)}),k.qZA()}if(2&U){const E=k.oxw();k.Q6J("alert",E.ui.alert)}}function mt(U,D){if(1&U){const E=k.EpF();k.TgZ(0,"ukis-global-progress",6),k.NdJ("progressChange",function(G){k.CHM(E);const q=k.oxw();return k.KtG(q.ui.progress=G)}),k.qZA()}if(2&U){const E=k.oxw();k.Q6J("progress",E.ui.progress)}}function $t(U,D){if(1&U&&(k.TgZ(0,"a",9),k._uU(1),k.qZA()),2&U){const E=k.oxw().$implicit;k.MGl("routerLink","/",E.path,""),k.xp6(1),k.Oqu(E.data.title)}}function Vn(U,D){if(1&U&&(k.ynx(0,7),k.YNc(1,$t,2,2,"a",8),k.BQk()),2&U){const E=D.$implicit,N=k.oxw();k.xp6(1),k.Q6J("ngIf",N.currentRoute===E.path)}}let Sn=(()=>{class U{constructor(E,N,G){this.alertService=E,this.progressService=N,this.router=G,this.title="",this.shortTitle="",this.version=Te||null,this.ui={alert:null,progress:null},this.subs=[],this.showProgress=q=>{this.ui.progress=q},this.setAlert=q=>{this.ui.alert=q},this.init(),this.routes=this.router.config.filter(q=>q.data)}ngOnInit(){const E=this.router.events.pipe((0,be.h)(N=>N instanceof de.m2||N instanceof de.OD)).subscribe(N=>{const G=new URL(N.url,`${window.location.origin}${window.location.pathname}`);this.currentRoute="/examples"!==G.pathname?G.pathname.slice(1):null});this.subs.push(E)}ngOnDestroy(){this.subs.map(E=>E.unsubscribe())}init(){this.getHtmlMeta(["title","version","description","short-title"]),this.TITLE&&(this.title=this.TITLE),this["SHORT-TITLE"]&&(this.shortTitle=this["SHORT-TITLE"]),this.alertService.alert$.subscribe(E=>{this.setAlert(E)}),this.progressService.progress$.subscribe(E=>{this.showProgress(E)})}getHtmlMeta(E){const N=document.getElementsByTagName("meta");for(let G=0,q=N.length;G{const x=F.get("offset"),V=x==le,K=V&&b||new Map;F.forEach((me,Ee)=>{let Ue=Ee,ft=me;if("offset"!==Ee)switch(Ue=U.normalizePropertyName(Ue,G),ft){case Nt.k1:ft=E.get(Ee);break;case Nt.l3:ft=N.get(Ee);break;default:ft=U.normalizeStyleValue(Ee,Ue,ft,G)}K.set(Ue,ft)}),V||q.push(K),b=K,le=x}),G.length)throw function xt(U){return new k.vHH(3502,!1)}();return q}function ti(U,D,E,N){switch(D){case"start":U.onStart(()=>N(E&&ni(E,"start",U)));break;case"done":U.onDone(()=>N(E&&ni(E,"done",U)));break;case"destroy":U.onDestroy(()=>N(E&&ni(E,"destroy",U)))}}function ni(U,D,E){const q=$n(U.element,U.triggerName,U.fromState,U.toState,D||U.phaseName,E.totalTime??U.totalTime,!!E.disabled),le=U._data;return null!=le&&(q._data=le),q}function $n(U,D,E,N,G="",q=0,le){return{element:U,triggerName:D,fromState:E,toState:N,phaseName:G,totalTime:q,disabled:!!le}}function vi(U,D,E){let N=U.get(D);return N||U.set(D,N=E),N}function rr(U){const D=U.indexOf(":");return[U.substring(1,D),U.slice(D+1)]}const Mr=(()=>typeof document>"u"?null:document.documentElement)();function Bi(U){const D=U.parentNode||U.host||null;return D===Mr?null:D}let Hi=null,ws=!1;function pe(U,D){for(;D;){if(D===U)return!0;D=Bi(D)}return!1}function $e(U,D,E){if(E)return Array.from(U.querySelectorAll(D));const N=U.querySelector(D);return N?[N]:[]}let Et=(()=>{class U{validateStyleProperty(E){return function Be(U){Hi||(Hi=function ie(){return typeof document<"u"?document.body:null}()||{},ws=!!Hi.style&&"WebkitAppearance"in Hi.style);let D=!0;return Hi.style&&!function Pi(U){return"ebkit"==U.substring(1,6)}(U)&&(D=U in Hi.style,!D&&ws&&(D="Webkit"+U.charAt(0).toUpperCase()+U.slice(1)in Hi.style)),D}(E)}matchesElement(E,N){return!1}containsElement(E,N){return pe(E,N)}getParentElement(E){return Bi(E)}query(E,N,G){return $e(E,N,G)}computeStyle(E,N,G){return G||""}animate(E,N,G,q,le,b=[],F){return new Nt.ZN(G,q)}static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275prov=k.Yz7({token:U,factory:U.\u0275fac})}return U})(),Mt=(()=>{class U{static#e=this.NOOP=new Et}return U})();const sn=1e3,ji="ng-enter",ge="ng-leave",oe="ng-trigger",ue=".ng-trigger",ze="ng-animating",qe=".ng-animating";function st(U){if("number"==typeof U)return U;const D=U.match(/^(-?[\.\d]+)(m?s)/);return!D||D.length<2?0:rt(parseFloat(D[1]),D[2])}function rt(U,D){return"s"===D?U*sn:U}function Kt(U,D,E){return U.hasOwnProperty("duration")?U:function ht(U,D,E){let G,q=0,le="";if("string"==typeof U){const b=U.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===b)return D.push(Qi()),{duration:0,delay:0,easing:""};G=rt(parseFloat(b[1]),b[2]);const F=b[3];null!=F&&(q=rt(parseFloat(F),b[4]));const x=b[5];x&&(le=x)}else G=U;if(!E){let b=!1,F=D.length;G<0&&(D.push(function xe(){return new k.vHH(3100,!1)}()),b=!0),q<0&&(D.push(function Oe(){return new k.vHH(3101,!1)}()),b=!0),b&&D.splice(F,0,Qi())}return{duration:G,delay:q,easing:le}}(U,D,E)}function En(U,D={}){return Object.keys(U).forEach(E=>{D[E]=U[E]}),D}function ui(U){const D=new Map;return Object.keys(U).forEach(E=>{D.set(E,U[E])}),D}function Fn(U,D=new Map,E){if(E)for(let[N,G]of E)D.set(N,G);for(let[N,G]of U)D.set(N,G);return D}function xn(U,D,E){D.forEach((N,G)=>{const q=sr(G);E&&!E.has(G)&&E.set(G,U.style[q]),U.style[q]=N})}function Wt(U,D){D.forEach((E,N)=>{const G=sr(N);U.style[G]=""})}function dn(U){return Array.isArray(U)?1==U.length?U[0]:(0,Nt.vP)(U):U}const xr=new RegExp("{{\\s*(.+?)\\s*}}","g");function Yn(U){let D=[];if("string"==typeof U){let E;for(;E=xr.exec(U);)D.push(E[1]);xr.lastIndex=0}return D}function Wn(U,D,E){const N=U.toString(),G=N.replace(xr,(q,le)=>{let b=D[le];return null==b&&(E.push(function Ne(U){return new k.vHH(3003,!1)}()),b=""),b.toString()});return G==N?U:G}function Si(U){const D=[];let E=U.next();for(;!E.done;)D.push(E.value),E=U.next();return D}const Ti=/-+([a-z0-9])/g;function sr(U){return U.replace(Ti,(...D)=>D[1].toUpperCase())}function hn(U,D,E){switch(D.type){case 7:return U.visitTrigger(D,E);case 0:return U.visitState(D,E);case 1:return U.visitTransition(D,E);case 2:return U.visitSequence(D,E);case 3:return U.visitGroup(D,E);case 4:return U.visitAnimate(D,E);case 5:return U.visitKeyframes(D,E);case 6:return U.visitStyle(D,E);case 8:return U.visitReference(D,E);case 9:return U.visitAnimateChild(D,E);case 10:return U.visitAnimateRef(D,E);case 11:return U.visitQuery(D,E);case 12:return U.visitStagger(D,E);default:throw function We(U){return new k.vHH(3004,!1)}()}}function $s(U,D){return window.getComputedStyle(U)[D]}const Jt="*";function Ki(U,D){const E=[];return"string"==typeof U?U.split(/\s*,\s*/).forEach(N=>function Yr(U,D,E){if(":"==U[0]){const F=function $o(U,D){switch(U){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(E,N)=>parseFloat(N)>parseFloat(E);case":decrement":return(E,N)=>parseFloat(N) *"}}(U,E);if("function"==typeof F)return void D.push(F);U=F}const N=U.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==N||N.length<4)return E.push(function xi(U){return new k.vHH(3015,!1)}()),D;const G=N[1],q=N[2],le=N[3];D.push(Di(G,le));"<"==q[0]&&!(G==Jt&&le==Jt)&&D.push(Di(le,G))}(N,E,D)):E.push(U),E}const ii=new Set(["true","1"]),Es=new Set(["false","0"]);function Di(U,D){const E=ii.has(U)||Es.has(U),N=ii.has(D)||Es.has(D);return(G,q)=>{let le=U==Jt||U==G,b=D==Jt||D==q;return!le&&E&&"boolean"==typeof G&&(le=G?ii.has(U):Es.has(U)),!b&&N&&"boolean"==typeof q&&(b=q?ii.has(D):Es.has(D)),le&&b}}const Ao=new RegExp("s*:selfs*,?","g");function wr(U,D,E,N){return new Ts(U).build(D,E,N)}class Ts{constructor(D){this._driver=D}build(D,E,N){const G=new Hn(E);return this._resetContextStyleTimingState(G),hn(this,dn(D),G)}_resetContextStyleTimingState(D){D.currentQuerySelector="",D.collectedStyles=new Map,D.collectedStyles.set("",new Map),D.currentTime=0}visitTrigger(D,E){let N=E.queryCount=0,G=E.depCount=0;const q=[],le=[];return"@"==D.name.charAt(0)&&E.errors.push(function _t(){return new k.vHH(3006,!1)}()),D.definitions.forEach(b=>{if(this._resetContextStyleTimingState(E),0==b.type){const F=b,x=F.name;x.toString().split(/\s*,\s*/).forEach(V=>{F.name=V,q.push(this.visitState(F,E))}),F.name=x}else if(1==b.type){const F=this.visitTransition(b,E);N+=F.queryCount,G+=F.depCount,le.push(F)}else E.errors.push(function ot(){return new k.vHH(3007,!1)}())}),{type:7,name:D.name,states:q,transitions:le,queryCount:N,depCount:G,options:null}}visitState(D,E){const N=this.visitStyle(D.styles,E),G=D.options&&D.options.params||null;if(N.containsDynamicStyles){const q=new Set,le=G||{};N.styles.forEach(b=>{b instanceof Map&&b.forEach(F=>{Yn(F).forEach(x=>{le.hasOwnProperty(x)||q.add(x)})})}),q.size&&(Si(q.values()),E.errors.push(function ei(U,D){return new k.vHH(3008,!1)}()))}return{type:0,name:D.name,style:N,options:G?{params:G}:null}}visitTransition(D,E){E.queryCount=0,E.depCount=0;const N=hn(this,dn(D.animation),E);return{type:1,matchers:Ki(D.expr,E.errors),animation:N,queryCount:E.queryCount,depCount:E.depCount,options:Wr(D.options)}}visitSequence(D,E){return{type:2,steps:D.steps.map(N=>hn(this,N,E)),options:Wr(D.options)}}visitGroup(D,E){const N=E.currentTime;let G=0;const q=D.steps.map(le=>{E.currentTime=N;const b=hn(this,le,E);return G=Math.max(G,E.currentTime),b});return E.currentTime=G,{type:3,steps:q,options:Wr(D.options)}}visitAnimate(D,E){const N=function _i(U,D){if(U.hasOwnProperty("duration"))return U;if("number"==typeof U)return Ui(Kt(U,D).duration,0,"");const E=U;if(E.split(/\s+/).some(q=>"{"==q.charAt(0)&&"{"==q.charAt(1))){const q=Ui(0,0,"");return q.dynamic=!0,q.strValue=E,q}const G=Kt(E,D);return Ui(G.duration,G.delay,G.easing)}(D.timings,E.errors);E.currentAnimateTimings=N;let G,q=D.styles?D.styles:(0,Nt.oB)({});if(5==q.type)G=this.visitKeyframes(q,E);else{let le=D.styles,b=!1;if(!le){b=!0;const x={};N.easing&&(x.easing=N.easing),le=(0,Nt.oB)(x)}E.currentTime+=N.duration+N.delay;const F=this.visitStyle(le,E);F.isEmptyStep=b,G=F}return E.currentAnimateTimings=null,{type:4,timings:N,style:G,options:null}}visitStyle(D,E){const N=this._makeStyleAst(D,E);return this._validateStyleAst(N,E),N}_makeStyleAst(D,E){const N=[],G=Array.isArray(D.styles)?D.styles:[D.styles];for(let b of G)"string"==typeof b?b===Nt.l3?N.push(b):E.errors.push(new k.vHH(3002,!1)):N.push(ui(b));let q=!1,le=null;return N.forEach(b=>{if(b instanceof Map&&(b.has("easing")&&(le=b.get("easing"),b.delete("easing")),!q))for(let F of b.values())if(F.toString().indexOf("{{")>=0){q=!0;break}}),{type:6,styles:N,easing:le,offset:D.offset,containsDynamicStyles:q,options:null}}_validateStyleAst(D,E){const N=E.currentAnimateTimings;let G=E.currentTime,q=E.currentTime;N&&q>0&&(q-=N.duration+N.delay),D.styles.forEach(le=>{"string"!=typeof le&&le.forEach((b,F)=>{const x=E.collectedStyles.get(E.currentQuerySelector),V=x.get(F);let K=!0;V&&(q!=G&&q>=V.startTime&&G<=V.endTime&&(E.errors.push(function Ut(U,D,E,N,G){return new k.vHH(3010,!1)}()),K=!1),q=V.startTime),K&&x.set(F,{startTime:q,endTime:G}),E.options&&function zi(U,D,E){const N=D.params||{},G=Yn(U);G.length&&G.forEach(q=>{N.hasOwnProperty(q)||E.push(function Fe(U){return new k.vHH(3001,!1)}())})}(b,E.options,E.errors)})})}visitKeyframes(D,E){const N={type:5,styles:[],options:null};if(!E.currentAnimateTimings)return E.errors.push(function kt(){return new k.vHH(3011,!1)}()),N;let q=0;const le=[];let b=!1,F=!1,x=0;const V=D.steps.map(Vt=>{const It=this._makeStyleAst(Vt,E);let ln=null!=It.offset?It.offset:function os(U){if("string"==typeof U)return null;let D=null;if(Array.isArray(U))U.forEach(E=>{if(E instanceof Map&&E.has("offset")){const N=E;D=parseFloat(N.get("offset")),N.delete("offset")}});else if(U instanceof Map&&U.has("offset")){const E=U;D=parseFloat(E.get("offset")),E.delete("offset")}return D}(It.styles),Yt=0;return null!=ln&&(q++,Yt=It.offset=ln),F=F||Yt<0||Yt>1,b=b||Yt0&&q{const ln=me>0?It==Ee?1:me*It:le[It],Yt=ln*Lt;E.currentTime=Ue+ft.delay+Yt,ft.duration=Yt,this._validateStyleAst(Vt,E),Vt.offset=ln,N.styles.push(Vt)}),N}visitReference(D,E){return{type:8,animation:hn(this,dn(D.animation),E),options:Wr(D.options)}}visitAnimateChild(D,E){return E.depCount++,{type:9,options:Wr(D.options)}}visitAnimateRef(D,E){return{type:10,animation:this.visitReference(D.animation,E),options:Wr(D.options)}}visitQuery(D,E){const N=E.currentQuerySelector,G=D.options||{};E.queryCount++,E.currentQuery=D;const[q,le]=function Zt(U){const D=!!U.split(/\s*,\s*/).find(E=>":self"==E);return D&&(U=U.replace(Ao,"")),U=U.replace(/@\*/g,ue).replace(/@\w+/g,E=>ue+"-"+E.slice(1)).replace(/:animating/g,qe),[U,D]}(D.selector);E.currentQuerySelector=N.length?N+" "+q:q,vi(E.collectedStyles,E.currentQuerySelector,new Map);const b=hn(this,dn(D.animation),E);return E.currentQuery=null,E.currentQuerySelector=N,{type:11,selector:q,limit:G.limit||0,optional:!!G.optional,includeSelf:le,animation:b,originalSelector:D.selector,options:Wr(D.options)}}visitStagger(D,E){E.currentQuery||E.errors.push(function Li(){return new k.vHH(3013,!1)}());const N="full"===D.timings?{duration:0,delay:0,easing:"full"}:Kt(D.timings,E.errors,!0);return{type:12,animation:hn(this,dn(D.animation),E),timings:N,options:null}}}class Hn{constructor(D){this.errors=D,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Wr(U){return U?(U=En(U)).params&&(U.params=function In(U){return U?En(U):null}(U.params)):U={},U}function Ui(U,D,E){return{duration:U,delay:D,easing:E}}function as(U,D,E,N,G,q,le=null,b=!1){return{type:1,element:U,keyframes:D,preStyleProps:E,postStyleProps:N,duration:G,delay:q,totalTime:G+q,easing:le,subTimeline:b}}class Zr{constructor(){this._map=new Map}get(D){return this._map.get(D)||[]}append(D,E){let N=this._map.get(D);N||this._map.set(D,N=[]),N.push(...E)}has(D){return this._map.has(D)}clear(){this._map.clear()}}const dt=new RegExp(":enter","g"),_n=new RegExp(":leave","g");function fi(U,D,E,N,G,q=new Map,le=new Map,b,F,x=[]){return(new Rr).buildKeyframes(U,D,E,N,G,q,le,b,F,x)}class Rr{buildKeyframes(D,E,N,G,q,le,b,F,x,V=[]){x=x||new Zr;const K=new mr(D,E,x,G,q,V,[]);K.options=F;const me=F.delay?st(F.delay):0;K.currentTimeline.delayNextStep(me),K.currentTimeline.setStyles([le],null,K.errors,F),hn(this,N,K);const Ee=K.timelines.filter(Ue=>Ue.containsAnimation());if(Ee.length&&b.size){let Ue;for(let ft=Ee.length-1;ft>=0;ft--){const Lt=Ee[ft];if(Lt.element===E){Ue=Lt;break}}Ue&&!Ue.allowOnlyTimelineStyles()&&Ue.setStyles([b],null,K.errors,F)}return Ee.length?Ee.map(Ue=>Ue.buildKeyframes()):[as(E,[],[],[],0,me,"",!1)]}visitTrigger(D,E){}visitState(D,E){}visitTransition(D,E){}visitAnimateChild(D,E){const N=E.subInstructions.get(E.element);if(N){const G=E.createSubContext(D.options),q=E.currentTimeline.currentTime,le=this._visitSubInstructions(N,G,G.options);q!=le&&E.transformIntoNewTimeline(le)}E.previousNode=D}visitAnimateRef(D,E){const N=E.createSubContext(D.options);N.transformIntoNewTimeline(),this._applyAnimationRefDelays([D.options,D.animation.options],E,N),this.visitReference(D.animation,N),E.transformIntoNewTimeline(N.currentTimeline.currentTime),E.previousNode=D}_applyAnimationRefDelays(D,E,N){for(const G of D){const q=G?.delay;if(q){const le="number"==typeof q?q:st(Wn(q,G?.params??{},E.errors));N.delayNextStep(le)}}}_visitSubInstructions(D,E,N){let q=E.currentTimeline.currentTime;const le=null!=N.duration?st(N.duration):null,b=null!=N.delay?st(N.delay):null;return 0!==le&&D.forEach(F=>{const x=E.appendInstructionToTimeline(F,le,b);q=Math.max(q,x.duration+x.delay)}),q}visitReference(D,E){E.updateOptions(D.options,!0),hn(this,D.animation,E),E.previousNode=D}visitSequence(D,E){const N=E.subContextCount;let G=E;const q=D.options;if(q&&(q.params||q.delay)&&(G=E.createSubContext(q),G.transformIntoNewTimeline(),null!=q.delay)){6==G.previousNode.type&&(G.currentTimeline.snapshotCurrentStyles(),G.previousNode=ri);const le=st(q.delay);G.delayNextStep(le)}D.steps.length&&(D.steps.forEach(le=>hn(this,le,G)),G.currentTimeline.applyStylesToKeyframe(),G.subContextCount>N&&G.transformIntoNewTimeline()),E.previousNode=D}visitGroup(D,E){const N=[];let G=E.currentTimeline.currentTime;const q=D.options&&D.options.delay?st(D.options.delay):0;D.steps.forEach(le=>{const b=E.createSubContext(D.options);q&&b.delayNextStep(q),hn(this,le,b),G=Math.max(G,b.currentTimeline.currentTime),N.push(b.currentTimeline)}),N.forEach(le=>E.currentTimeline.mergeTimelineCollectedStyles(le)),E.transformIntoNewTimeline(G),E.previousNode=D}_visitTiming(D,E){if(D.dynamic){const N=D.strValue;return Kt(E.params?Wn(N,E.params,E.errors):N,E.errors)}return{duration:D.duration,delay:D.delay,easing:D.easing}}visitAnimate(D,E){const N=E.currentAnimateTimings=this._visitTiming(D.timings,E),G=E.currentTimeline;N.delay&&(E.incrementTime(N.delay),G.snapshotCurrentStyles());const q=D.style;5==q.type?this.visitKeyframes(q,E):(E.incrementTime(N.duration),this.visitStyle(q,E),G.applyStylesToKeyframe()),E.currentAnimateTimings=null,E.previousNode=D}visitStyle(D,E){const N=E.currentTimeline,G=E.currentAnimateTimings;!G&&N.hasCurrentStyleProperties()&&N.forwardFrame();const q=G&&G.easing||D.easing;D.isEmptyStep?N.applyEmptyStep(q):N.setStyles(D.styles,q,E.errors,E.options),E.previousNode=D}visitKeyframes(D,E){const N=E.currentAnimateTimings,G=E.currentTimeline.duration,q=N.duration,b=E.createSubContext().currentTimeline;b.easing=N.easing,D.styles.forEach(F=>{b.forwardTime((F.offset||0)*q),b.setStyles(F.styles,F.easing,E.errors,E.options),b.applyStylesToKeyframe()}),E.currentTimeline.mergeTimelineCollectedStyles(b),E.transformIntoNewTimeline(G+q),E.previousNode=D}visitQuery(D,E){const N=E.currentTimeline.currentTime,G=D.options||{},q=G.delay?st(G.delay):0;q&&(6===E.previousNode.type||0==N&&E.currentTimeline.hasCurrentStyleProperties())&&(E.currentTimeline.snapshotCurrentStyles(),E.previousNode=ri);let le=N;const b=E.invokeQuery(D.selector,D.originalSelector,D.limit,D.includeSelf,!!G.optional,E.errors);E.currentQueryTotal=b.length;let F=null;b.forEach((x,V)=>{E.currentQueryIndex=V;const K=E.createSubContext(D.options,x);q&&K.delayNextStep(q),x===E.element&&(F=K.currentTimeline),hn(this,D.animation,K),K.currentTimeline.applyStylesToKeyframe(),le=Math.max(le,K.currentTimeline.currentTime)}),E.currentQueryIndex=0,E.currentQueryTotal=0,E.transformIntoNewTimeline(le),F&&(E.currentTimeline.mergeTimelineCollectedStyles(F),E.currentTimeline.snapshotCurrentStyles()),E.previousNode=D}visitStagger(D,E){const N=E.parentContext,G=E.currentTimeline,q=D.timings,le=Math.abs(q.duration),b=le*(E.currentQueryTotal-1);let F=le*E.currentQueryIndex;switch(q.duration<0?"reverse":q.easing){case"reverse":F=b-F;break;case"full":F=N.currentStaggerTime}const V=E.currentTimeline;F&&V.delayNextStep(F);const K=V.currentTime;hn(this,D.animation,E),E.previousNode=D,N.currentStaggerTime=G.currentTime-K+(G.startTime-N.currentTimeline.startTime)}}const ri={};class mr{constructor(D,E,N,G,q,le,b,F){this._driver=D,this.element=E,this.subInstructions=N,this._enterClassName=G,this._leaveClassName=q,this.errors=le,this.timelines=b,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ri,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=F||new yn(this._driver,E,0),b.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(D,E){if(!D)return;const N=D;let G=this.options;null!=N.duration&&(G.duration=st(N.duration)),null!=N.delay&&(G.delay=st(N.delay));const q=N.params;if(q){let le=G.params;le||(le=this.options.params={}),Object.keys(q).forEach(b=>{(!E||!le.hasOwnProperty(b))&&(le[b]=Wn(q[b],le,this.errors))})}}_copyOptions(){const D={};if(this.options){const E=this.options.params;if(E){const N=D.params={};Object.keys(E).forEach(G=>{N[G]=E[G]})}}return D}createSubContext(D=null,E,N){const G=E||this.element,q=new mr(this._driver,G,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(G,N||0));return q.previousNode=this.previousNode,q.currentAnimateTimings=this.currentAnimateTimings,q.options=this._copyOptions(),q.updateOptions(D),q.currentQueryIndex=this.currentQueryIndex,q.currentQueryTotal=this.currentQueryTotal,q.parentContext=this,this.subContextCount++,q}transformIntoNewTimeline(D){return this.previousNode=ri,this.currentTimeline=this.currentTimeline.fork(this.element,D),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(D,E,N){const G={duration:E??D.duration,delay:this.currentTimeline.currentTime+(N??0)+D.delay,easing:""},q=new Qr(this._driver,D.element,D.keyframes,D.preStyleProps,D.postStyleProps,G,D.stretchStartingKeyframe);return this.timelines.push(q),G}incrementTime(D){this.currentTimeline.forwardTime(this.currentTimeline.duration+D)}delayNextStep(D){D>0&&this.currentTimeline.delayNextStep(D)}invokeQuery(D,E,N,G,q,le){let b=[];if(G&&b.push(this.element),D.length>0){D=(D=D.replace(dt,"."+this._enterClassName)).replace(_n,"."+this._leaveClassName);let x=this._driver.query(this.element,D,1!=N);0!==N&&(x=N<0?x.slice(x.length+N,x.length):x.slice(0,N)),b.push(...x)}return!q&&0==b.length&&le.push(function Vi(U){return new k.vHH(3014,!1)}()),b}}class yn{constructor(D,E,N,G){this._driver=D,this.element=E,this.startTime=N,this._elementTimelineStylesLookup=G,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(E),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(E,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(D){const E=1===this._keyframes.size&&this._pendingStyles.size;this.duration||E?(this.forwardTime(this.currentTime+D),E&&this.snapshotCurrentStyles()):this.startTime+=D}fork(D,E){return this.applyStylesToKeyframe(),new yn(this._driver,D,E||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(D){this.applyStylesToKeyframe(),this.duration=D,this._loadKeyframe()}_updateStyle(D,E){this._localTimelineStyles.set(D,E),this._globalTimelineStyles.set(D,E),this._styleSummary.set(D,{time:this.currentTime,value:E})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(D){D&&this._previousKeyframe.set("easing",D);for(let[E,N]of this._globalTimelineStyles)this._backFill.set(E,N||Nt.l3),this._currentKeyframe.set(E,Nt.l3);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(D,E,N,G){E&&this._previousKeyframe.set("easing",E);const q=G&&G.params||{},le=function Ft(U,D){const E=new Map;let N;return U.forEach(G=>{if("*"===G){N=N||D.keys();for(let q of N)E.set(q,Nt.l3)}else Fn(G,E)}),E}(D,this._globalTimelineStyles);for(let[b,F]of le){const x=Wn(F,q,N);this._pendingStyles.set(b,x),this._localTimelineStyles.has(b)||this._backFill.set(b,this._globalTimelineStyles.get(b)??Nt.l3),this._updateStyle(b,x)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((D,E)=>{this._currentKeyframe.set(E,D)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((D,E)=>{this._currentKeyframe.has(E)||this._currentKeyframe.set(E,D)}))}snapshotCurrentStyles(){for(let[D,E]of this._localTimelineStyles)this._pendingStyles.set(D,E),this._updateStyle(D,E)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const D=[];for(let E in this._currentKeyframe)D.push(E);return D}mergeTimelineCollectedStyles(D){D._styleSummary.forEach((E,N)=>{const G=this._styleSummary.get(N);(!G||E.time>G.time)&&this._updateStyle(N,E.value)})}buildKeyframes(){this.applyStylesToKeyframe();const D=new Set,E=new Set,N=1===this._keyframes.size&&0===this.duration;let G=[];this._keyframes.forEach((b,F)=>{const x=Fn(b,new Map,this._backFill);x.forEach((V,K)=>{V===Nt.k1?D.add(K):V===Nt.l3&&E.add(K)}),N||x.set("offset",F/this.duration),G.push(x)});const q=D.size?Si(D.values()):[],le=E.size?Si(E.values()):[];if(N){const b=G[0],F=new Map(b);b.set("offset",0),F.set("offset",1),G=[b,F]}return as(this.element,G,q,le,this.duration,this.startTime,this.easing,!1)}}class Qr extends yn{constructor(D,E,N,G,q,le,b=!1){super(D,E,le.delay),this.keyframes=N,this.preStyleProps=G,this.postStyleProps=q,this._stretchStartingKeyframe=b,this.timings={duration:le.duration,delay:le.delay,easing:le.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let D=this.keyframes,{delay:E,duration:N,easing:G}=this.timings;if(this._stretchStartingKeyframe&&E){const q=[],le=N+E,b=E/le,F=Fn(D[0]);F.set("offset",0),q.push(F);const x=Fn(D[0]);x.set("offset",vr(b)),q.push(x);const V=D.length-1;for(let K=1;K<=V;K++){let me=Fn(D[K]);const Ee=me.get("offset");me.set("offset",vr((E+Ee*N)/le)),q.push(me)}N=le,E=0,G="",D=q}return as(this.element,D,this.preStyleProps,this.postStyleProps,N,E,G,!0)}}function vr(U,D=3){const E=Math.pow(10,D-1);return Math.round(U*E)/E}class ls{}const wn=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class Gs extends ls{normalizePropertyName(D,E){return sr(D)}normalizeStyleValue(D,E,N,G){let q="";const le=N.toString().trim();if(wn.has(E)&&0!==N&&"0"!==N)if("number"==typeof N)q="px";else{const b=N.match(/^[+-]?[\d\.]+([a-z]*)$/);b&&0==b[1].length&&G.push(function Ke(U,D){return new k.vHH(3005,!1)}())}return le+q}}function Er(U,D,E,N,G,q,le,b,F,x,V,K,me){return{type:0,element:U,triggerName:D,isRemovalTransition:G,fromState:E,fromStyles:q,toState:N,toStyles:le,timelines:b,queriedElements:F,preStyleProps:x,postStyleProps:V,totalTime:K,errors:me}}const $i={};class Kr{constructor(D,E,N){this._triggerName=D,this.ast=E,this._stateStyles=N}match(D,E,N,G){return function cs(U,D,E,N,G){return U.some(q=>q(D,E,N,G))}(this.ast.matchers,D,E,N,G)}buildStyles(D,E,N){let G=this._stateStyles.get("*");return void 0!==D&&(G=this._stateStyles.get(D?.toString())||G),G?G.buildStyles(E,N):new Map}build(D,E,N,G,q,le,b,F,x,V){const K=[],me=this.ast.options&&this.ast.options.params||$i,Ue=this.buildStyles(N,b&&b.params||$i,K),ft=F&&F.params||$i,Lt=this.buildStyles(G,ft,K),Vt=new Set,It=new Map,ln=new Map,Yt="void"===G,Rn={params:_r(ft,me),delay:this.ast.options?.delay},Ii=V?[]:fi(D,E,this.ast.animation,q,le,Ue,Lt,Rn,x,K);let zn=0;if(Ii.forEach(si=>{zn=Math.max(si.duration+si.delay,zn)}),K.length)return Er(E,this._triggerName,N,G,Yt,Ue,Lt,[],[],It,ln,zn,K);Ii.forEach(si=>{const Xi=si.element,Fi=vi(It,Xi,new Set);si.preStyleProps.forEach(fo=>Fi.add(fo));const kr=vi(ln,Xi,new Set);si.postStyleProps.forEach(fo=>kr.add(fo)),Xi!==E&&Vt.add(Xi)});const Ai=Si(Vt.values());return Er(E,this._triggerName,N,G,Yt,Ue,Lt,Ii,Ai,It,ln,zn)}}function _r(U,D){const E=En(D);for(const N in U)U.hasOwnProperty(N)&&null!=U[N]&&(E[N]=U[N]);return E}class us{constructor(D,E,N){this.styles=D,this.defaultParams=E,this.normalizer=N}buildStyles(D,E){const N=new Map,G=En(this.defaultParams);return Object.keys(D).forEach(q=>{const le=D[q];null!==le&&(G[q]=le)}),this.styles.styles.forEach(q=>{"string"!=typeof q&&q.forEach((le,b)=>{le&&(le=Wn(le,G,E));const F=this.normalizer.normalizePropertyName(b,E);le=this.normalizer.normalizeStyleValue(b,F,le,E),N.set(b,le)})}),N}}class zt{constructor(D,E,N){this.name=D,this.ast=E,this._normalizer=N,this.transitionFactories=[],this.states=new Map,E.states.forEach(G=>{this.states.set(G.name,new us(G.style,G.options&&G.options.params||{},N))}),or(this.states,"true","1"),or(this.states,"false","0"),E.transitions.forEach(G=>{this.transitionFactories.push(new Kr(D,G,this.states))}),this.fallbackTransition=function Mo(U,D,E){return new Kr(U,{type:1,animation:{type:2,steps:[],options:null},matchers:[(le,b)=>!0],options:null,queryCount:0,depCount:0},D)}(D,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(D,E,N,G){return this.transitionFactories.find(le=>le.match(D,E,N,G))||null}matchStyles(D,E,N){return this.fallbackTransition.buildStyles(D,E,N)}}function or(U,D,E){U.has(D)?U.has(E)||U.set(E,U.get(D)):U.has(E)&&U.set(D,U.get(E))}const Jr=new Zr;class jn{constructor(D,E,N){this.bodyNode=D,this._driver=E,this._normalizer=N,this._animations=new Map,this._playersById=new Map,this.players=[]}register(D,E){const N=[],q=wr(this._driver,E,N,[]);if(N.length)throw function en(U){return new k.vHH(3503,!1)}();this._animations.set(D,q)}_buildPlayer(D,E,N){const G=D.element,q=qi(this._normalizer,D.keyframes,E,N);return this._driver.animate(G,q,D.duration,D.delay,D.easing,[],!0)}create(D,E,N={}){const G=[],q=this._animations.get(D);let le;const b=new Map;if(q?(le=fi(this._driver,E,q,ji,ge,new Map,new Map,N,Jr,G),le.forEach(V=>{const K=vi(b,V.element,new Map);V.postStyleProps.forEach(me=>K.set(me,null))})):(G.push(function qt(){return new k.vHH(3300,!1)}()),le=[]),G.length)throw function ci(U){return new k.vHH(3504,!1)}();b.forEach((V,K)=>{V.forEach((me,Ee)=>{V.set(Ee,this._driver.computeStyle(K,Ee,Nt.l3))})});const x=Nn(le.map(V=>{const K=b.get(V.element);return this._buildPlayer(V,new Map,K)}));return this._playersById.set(D,x),x.onDestroy(()=>this.destroy(D)),this.players.push(x),x}destroy(D){const E=this._getPlayer(D);E.destroy(),this._playersById.delete(D);const N=this.players.indexOf(E);N>=0&&this.players.splice(N,1)}_getPlayer(D){const E=this._playersById.get(D);if(!E)throw function pr(U){return new k.vHH(3301,!1)}();return E}listen(D,E,N,G){const q=$n(E,"","","");return ti(this._getPlayer(D),N,q,G),()=>{}}command(D,E,N,G){if("register"==N)return void this.register(D,G[0]);if("create"==N)return void this.create(D,E,G[0]||{});const q=this._getPlayer(D);switch(N){case"play":q.play();break;case"pause":q.pause();break;case"reset":q.reset();break;case"restart":q.restart();break;case"finish":q.finish();break;case"init":q.init();break;case"setPosition":q.setPosition(parseFloat(G[0]));break;case"destroy":this.destroy(D)}}}const Ws="ng-animate-queued",Ln="ng-animate-disabled",pi=[],Ms={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},et={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},fn="__ng_removed";class qn{get params(){return this.options.params}constructor(D,E=""){this.namespaceId=E;const N=D&&D.hasOwnProperty("value");if(this.value=function $(U){return U??null}(N?D.value:D),N){const q=En(D);delete q.value,this.options=q}else this.options={};this.options.params||(this.options.params={})}absorbOptions(D){const E=D.params;if(E){const N=this.options.params;Object.keys(E).forEach(G=>{null==N[G]&&(N[G]=E[G])})}}}const ki="void",ao=new qn(ki);class es{constructor(D,E,N){this.id=D,this.hostElement=E,this._engine=N,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+D,An(E,this._hostClassName)}listen(D,E,N,G){if(!this._triggers.has(E))throw function Ri(U,D){return new k.vHH(3302,!1)}();if(null==N||0==N.length)throw function bt(U){return new k.vHH(3303,!1)}();if(!function Y(U){return"start"==U||"done"==U}(N))throw function Un(U,D){return new k.vHH(3400,!1)}();const q=vi(this._elementListeners,D,[]),le={name:E,phase:N,callback:G};q.push(le);const b=vi(this._engine.statesByElement,D,new Map);return b.has(E)||(An(D,oe),An(D,oe+"-"+E),b.set(E,ao)),()=>{this._engine.afterFlush(()=>{const F=q.indexOf(le);F>=0&&q.splice(F,1),this._triggers.has(E)||b.delete(E)})}}register(D,E){return!this._triggers.has(D)&&(this._triggers.set(D,E),!0)}_getTrigger(D){const E=this._triggers.get(D);if(!E)throw function so(U){return new k.vHH(3401,!1)}();return E}trigger(D,E,N,G=!0){const q=this._getTrigger(E),le=new ds(this.id,E,D);let b=this._engine.statesByElement.get(D);b||(An(D,oe),An(D,oe+"-"+E),this._engine.statesByElement.set(D,b=new Map));let F=b.get(E);const x=new qn(N,this.id);if(!(N&&N.hasOwnProperty("value"))&&F&&x.absorbOptions(F.options),b.set(E,x),F||(F=ao),x.value!==ki&&F.value===x.value){if(!function xo(U,D){const E=Object.keys(U),N=Object.keys(D);if(E.length!=N.length)return!1;for(let G=0;G{Wt(D,Lt),xn(D,Vt)})}return}const me=vi(this._engine.playersByElement,D,[]);me.forEach(ft=>{ft.namespaceId==this.id&&ft.triggerName==E&&ft.queued&&ft.destroy()});let Ee=q.matchTransition(F.value,x.value,D,x.params),Ue=!1;if(!Ee){if(!G)return;Ee=q.fallbackTransition,Ue=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:D,triggerName:E,transition:Ee,fromState:F,toState:x,player:le,isFallbackTransition:Ue}),Ue||(An(D,Ws),le.onStart(()=>{lr(D,Ws)})),le.onDone(()=>{let ft=this.players.indexOf(le);ft>=0&&this.players.splice(ft,1);const Lt=this._engine.playersByElement.get(D);if(Lt){let Vt=Lt.indexOf(le);Vt>=0&&Lt.splice(Vt,1)}}),this.players.push(le),me.push(le),le}deregister(D){this._triggers.delete(D),this._engine.statesByElement.forEach(E=>E.delete(D)),this._elementListeners.forEach((E,N)=>{this._elementListeners.set(N,E.filter(G=>G.name!=D))})}clearElementCache(D){this._engine.statesByElement.delete(D),this._elementListeners.delete(D);const E=this._engine.playersByElement.get(D);E&&(E.forEach(N=>N.destroy()),this._engine.playersByElement.delete(D))}_signalRemovalForInnerTriggers(D,E){const N=this._engine.driver.query(D,ue,!0);N.forEach(G=>{if(G[fn])return;const q=this._engine.fetchNamespacesByElement(G);q.size?q.forEach(le=>le.triggerLeaveAnimation(G,E,!1,!0)):this.clearElementCache(G)}),this._engine.afterFlushAnimationsDone(()=>N.forEach(G=>this.clearElementCache(G)))}triggerLeaveAnimation(D,E,N,G){const q=this._engine.statesByElement.get(D),le=new Map;if(q){const b=[];if(q.forEach((F,x)=>{if(le.set(x,F.value),this._triggers.has(x)){const V=this.trigger(D,x,ki,G);V&&b.push(V)}}),b.length)return this._engine.markElementAsRemoved(this.id,D,!0,E,le),N&&Nn(b).onDone(()=>this._engine.processLeaveNode(D)),!0}return!1}prepareLeaveAnimationListeners(D){const E=this._elementListeners.get(D),N=this._engine.statesByElement.get(D);if(E&&N){const G=new Set;E.forEach(q=>{const le=q.name;if(G.has(le))return;G.add(le);const F=this._triggers.get(le).fallbackTransition,x=N.get(le)||ao,V=new qn(ki),K=new ds(this.id,le,D);this._engine.totalQueuedPlayers++,this._queue.push({element:D,triggerName:le,transition:F,fromState:x,toState:V,player:K,isFallbackTransition:!0})})}}removeNode(D,E){const N=this._engine;if(D.childElementCount&&this._signalRemovalForInnerTriggers(D,E),this.triggerLeaveAnimation(D,E,!0))return;let G=!1;if(N.totalAnimations){const q=N.players.length?N.playersByQueriedElement.get(D):[];if(q&&q.length)G=!0;else{let le=D;for(;le=le.parentNode;)if(N.statesByElement.get(le)){G=!0;break}}}if(this.prepareLeaveAnimationListeners(D),G)N.markElementAsRemoved(this.id,D,!1,E);else{const q=D[fn];(!q||q===Ms)&&(N.afterFlush(()=>this.clearElementCache(D)),N.destroyInnerAnimations(D),N._onRemovalComplete(D,E))}}insertNode(D,E){An(D,this._hostClassName)}drainQueuedTransitions(D){const E=[];return this._queue.forEach(N=>{const G=N.player;if(G.destroyed)return;const q=N.element,le=this._elementListeners.get(q);le&&le.forEach(b=>{if(b.name==N.triggerName){const F=$n(q,N.triggerName,N.fromState.value,N.toState.value);F._data=D,ti(N.player,b.phase,F,b.callback)}}),G.markedForDestroy?this._engine.afterFlush(()=>{G.destroy()}):E.push(N)}),this._queue=[],E.sort((N,G)=>{const q=N.transition.ast.depCount,le=G.transition.ast.depCount;return 0==q||0==le?q-le:this._engine.driver.containsElement(N.element,G.element)?1:-1})}destroy(D){this.players.forEach(E=>E.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,D)}}class lo{_onRemovalComplete(D,E){this.onRemovalComplete(D,E)}constructor(D,E,N){this.bodyNode=D,this.driver=E,this._normalizer=N,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(G,q)=>{}}get queuedPlayers(){const D=[];return this._namespaceList.forEach(E=>{E.players.forEach(N=>{N.queued&&D.push(N)})}),D}createNamespace(D,E){const N=new es(D,E,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,E)?this._balanceNamespaceList(N,E):(this.newHostElements.set(E,N),this.collectEnterElement(E)),this._namespaceLookup[D]=N}_balanceNamespaceList(D,E){const N=this._namespaceList,G=this.namespacesByHostElement;if(N.length-1>=0){let le=!1,b=this.driver.getParentElement(E);for(;b;){const F=G.get(b);if(F){const x=N.indexOf(F);N.splice(x+1,0,D),le=!0;break}b=this.driver.getParentElement(b)}le||N.unshift(D)}else N.push(D);return G.set(E,D),D}register(D,E){let N=this._namespaceLookup[D];return N||(N=this.createNamespace(D,E)),N}registerTrigger(D,E,N){let G=this._namespaceLookup[D];G&&G.register(E,N)&&this.totalAnimations++}destroy(D,E){D&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const N=this._fetchNamespace(D);this.namespacesByHostElement.delete(N.hostElement);const G=this._namespaceList.indexOf(N);G>=0&&this._namespaceList.splice(G,1),N.destroy(E),delete this._namespaceLookup[D]}))}_fetchNamespace(D){return this._namespaceLookup[D]}fetchNamespacesByElement(D){const E=new Set,N=this.statesByElement.get(D);if(N)for(let G of N.values())if(G.namespaceId){const q=this._fetchNamespace(G.namespaceId);q&&E.add(q)}return E}trigger(D,E,N,G){if(P(E)){const q=this._fetchNamespace(D);if(q)return q.trigger(E,N,G),!0}return!1}insertNode(D,E,N,G){if(!P(E))return;const q=E[fn];if(q&&q.setForRemoval){q.setForRemoval=!1,q.setForMove=!0;const le=this.collectedLeaveElements.indexOf(E);le>=0&&this.collectedLeaveElements.splice(le,1)}if(D){const le=this._fetchNamespace(D);le&&le.insertNode(E,N)}G&&this.collectEnterElement(E)}collectEnterElement(D){this.collectedEnterElements.push(D)}markElementAsDisabled(D,E){E?this.disabledNodes.has(D)||(this.disabledNodes.add(D),An(D,Ln)):this.disabledNodes.has(D)&&(this.disabledNodes.delete(D),lr(D,Ln))}removeNode(D,E,N){if(P(E)){const G=D?this._fetchNamespace(D):null;G?G.removeNode(E,N):this.markElementAsRemoved(D,E,!1,N);const q=this.namespacesByHostElement.get(E);q&&q.id!==D&&q.removeNode(E,N)}else this._onRemovalComplete(E,N)}markElementAsRemoved(D,E,N,G,q){this.collectedLeaveElements.push(E),E[fn]={namespaceId:D,setForRemoval:G,hasAnimation:N,removedBeforeQueried:!1,previousTriggersValues:q}}listen(D,E,N,G,q){return P(E)?this._fetchNamespace(D).listen(E,N,G,q):()=>{}}_buildInstruction(D,E,N,G,q){return D.transition.build(this.driver,D.element,D.fromState.value,D.toState.value,N,G,D.fromState.options,D.toState.options,E,q)}destroyInnerAnimations(D){let E=this.driver.query(D,ue,!0);E.forEach(N=>this.destroyActiveAnimationsForElement(N)),0!=this.playersByQueriedElement.size&&(E=this.driver.query(D,qe,!0),E.forEach(N=>this.finishActiveQueriedAnimationOnElement(N)))}destroyActiveAnimationsForElement(D){const E=this.playersByElement.get(D);E&&E.forEach(N=>{N.queued?N.markedForDestroy=!0:N.destroy()})}finishActiveQueriedAnimationOnElement(D){const E=this.playersByQueriedElement.get(D);E&&E.forEach(N=>N.finish())}whenRenderingDone(){return new Promise(D=>{if(this.players.length)return Nn(this.players).onDone(()=>D());D()})}processLeaveNode(D){const E=D[fn];if(E&&E.setForRemoval){if(D[fn]=Ms,E.namespaceId){this.destroyInnerAnimations(D);const N=this._fetchNamespace(E.namespaceId);N&&N.clearElementCache(D)}this._onRemovalComplete(D,E.setForRemoval)}D.classList?.contains(Ln)&&this.markElementAsDisabled(D,!1),this.driver.query(D,".ng-animate-disabled",!0).forEach(N=>{this.markElementAsDisabled(N,!1)})}flush(D=-1){let E=[];if(this.newHostElements.size&&(this.newHostElements.forEach((N,G)=>this._balanceNamespaceList(N,G)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let N=0;NN()),this._flushFns=[],this._whenQuietFns.length){const N=this._whenQuietFns;this._whenQuietFns=[],E.length?Nn(E).onDone(()=>{N.forEach(G=>G())}):N.forEach(G=>G())}}reportError(D){throw function yt(U){return new k.vHH(3402,!1)}()}_flushAnimations(D,E){const N=new Zr,G=[],q=new Map,le=[],b=new Map,F=new Map,x=new Map,V=new Set;this.disabledNodes.forEach(Ct=>{V.add(Ct);const vt=this.driver.query(Ct,".ng-animate-queued",!0);for(let Bt=0;Bt{const Bt=ji+ft++;Ue.set(vt,Bt),Ct.forEach(vn=>An(vn,Bt))});const Lt=[],Vt=new Set,It=new Set;for(let Ct=0;CtVt.add(vn)):It.add(vt))}const ln=new Map,Yt=nn(me,Array.from(Vt));Yt.forEach((Ct,vt)=>{const Bt=ge+ft++;ln.set(vt,Bt),Ct.forEach(vn=>An(vn,Bt))}),D.push(()=>{Ee.forEach((Ct,vt)=>{const Bt=Ue.get(vt);Ct.forEach(vn=>lr(vn,Bt))}),Yt.forEach((Ct,vt)=>{const Bt=ln.get(vt);Ct.forEach(vn=>lr(vn,Bt))}),Lt.forEach(Ct=>{this.processLeaveNode(Ct)})});const Rn=[],Ii=[];for(let Ct=this._namespaceList.length-1;Ct>=0;Ct--)this._namespaceList[Ct].drainQueuedTransitions(E).forEach(Bt=>{const vn=Bt.player,oi=Bt.element;if(Rn.push(vn),this.collectedEnterElements.length){const er=oi[fn];if(er&&er.setForMove){if(er.previousTriggersValues&&er.previousTriggersValues.has(Bt.triggerName)){const ur=er.previousTriggersValues.get(Bt.triggerName),Nr=this.statesByElement.get(Bt.element);if(Nr&&Nr.has(Bt.triggerName)){const Va=Nr.get(Bt.triggerName);Va.value=ur,Nr.set(Bt.triggerName,Va)}}return void vn.destroy()}}const yi=!K||!this.driver.containsElement(K,oi),ns=ln.get(oi),po=Ue.get(oi),Kn=this._buildInstruction(Bt,N,po,ns,yi);if(Kn.errors&&Kn.errors.length)return void Ii.push(Kn);if(yi)return vn.onStart(()=>Wt(oi,Kn.fromStyles)),vn.onDestroy(()=>xn(oi,Kn.toStyles)),void G.push(vn);if(Bt.isFallbackTransition)return vn.onStart(()=>Wt(oi,Kn.fromStyles)),vn.onDestroy(()=>xn(oi,Kn.toStyles)),void G.push(vn);const hs=[];Kn.timelines.forEach(er=>{er.stretchStartingKeyframe=!0,this.disabledNodes.has(er.element)||hs.push(er)}),Kn.timelines=hs,N.append(oi,Kn.timelines),le.push({instruction:Kn,player:vn,element:oi}),Kn.queriedElements.forEach(er=>vi(b,er,[]).push(vn)),Kn.preStyleProps.forEach((er,ur)=>{if(er.size){let Nr=F.get(ur);Nr||F.set(ur,Nr=new Set),er.forEach((Va,wc)=>Nr.add(wc))}}),Kn.postStyleProps.forEach((er,ur)=>{let Nr=x.get(ur);Nr||x.set(ur,Nr=new Set),er.forEach((Va,wc)=>Nr.add(wc))})});if(Ii.length){const Ct=[];Ii.forEach(vt=>{Ct.push(function tn(U,D){return new k.vHH(3505,!1)}())}),Rn.forEach(vt=>vt.destroy()),this.reportError(Ct)}const zn=new Map,Ai=new Map;le.forEach(Ct=>{const vt=Ct.element;N.has(vt)&&(Ai.set(vt,vt),this._beforeAnimationBuild(Ct.player.namespaceId,Ct.instruction,zn))}),G.forEach(Ct=>{const vt=Ct.element;this._getPreviousPlayers(vt,!1,Ct.namespaceId,Ct.triggerName,null).forEach(vn=>{vi(zn,vt,[]).push(vn),vn.destroy()})});const si=Lt.filter(Ct=>co(Ct,F,x)),Xi=new Map;Tt(Xi,this.driver,It,x,Nt.l3).forEach(Ct=>{co(Ct,F,x)&&si.push(Ct)});const kr=new Map;Ee.forEach((Ct,vt)=>{Tt(kr,this.driver,new Set(Ct),F,Nt.k1)}),si.forEach(Ct=>{const vt=Xi.get(Ct),Bt=kr.get(Ct);Xi.set(Ct,new Map([...vt?.entries()??[],...Bt?.entries()??[]]))});const fo=[],on=[],La={};le.forEach(Ct=>{const{element:vt,player:Bt,instruction:vn}=Ct;if(N.has(vt)){if(V.has(vt))return Bt.onDestroy(()=>xn(vt,vn.toStyles)),Bt.disabled=!0,Bt.overrideTotalTime(vn.totalTime),void G.push(Bt);let oi=La;if(Ai.size>1){let ns=vt;const po=[];for(;ns=ns.parentNode;){const Kn=Ai.get(ns);if(Kn){oi=Kn;break}po.push(ns)}po.forEach(Kn=>Ai.set(Kn,oi))}const yi=this._buildAnimation(Bt.namespaceId,vn,zn,q,kr,Xi);if(Bt.setRealPlayer(yi),oi===La)fo.push(Bt);else{const ns=this.playersByElement.get(oi);ns&&ns.length&&(Bt.parentPlayer=Nn(ns)),G.push(Bt)}}else Wt(vt,vn.fromStyles),Bt.onDestroy(()=>xn(vt,vn.toStyles)),on.push(Bt),V.has(vt)&&G.push(Bt)}),on.forEach(Ct=>{const vt=q.get(Ct.element);if(vt&&vt.length){const Bt=Nn(vt);Ct.setRealPlayer(Bt)}}),G.forEach(Ct=>{Ct.parentPlayer?Ct.syncPlayerEvents(Ct.parentPlayer):Ct.destroy()});for(let Ct=0;Ct!yi.destroyed);oi.length?xs(this,vt,oi):this.processLeaveNode(vt)}return Lt.length=0,fo.forEach(Ct=>{this.players.push(Ct),Ct.onDone(()=>{Ct.destroy();const vt=this.players.indexOf(Ct);this.players.splice(vt,1)}),Ct.play()}),fo}afterFlush(D){this._flushFns.push(D)}afterFlushAnimationsDone(D){this._whenQuietFns.push(D)}_getPreviousPlayers(D,E,N,G,q){let le=[];if(E){const b=this.playersByQueriedElement.get(D);b&&(le=b)}else{const b=this.playersByElement.get(D);if(b){const F=!q||q==ki;b.forEach(x=>{x.queued||!F&&x.triggerName!=G||le.push(x)})}}return(N||G)&&(le=le.filter(b=>!(N&&N!=b.namespaceId||G&&G!=b.triggerName))),le}_beforeAnimationBuild(D,E,N){const q=E.element,le=E.isRemovalTransition?void 0:D,b=E.isRemovalTransition?void 0:E.triggerName;for(const F of E.timelines){const x=F.element,V=x!==q,K=vi(N,x,[]);this._getPreviousPlayers(x,V,le,b,E.toState).forEach(Ee=>{const Ue=Ee.getRealPlayer();Ue.beforeDestroy&&Ue.beforeDestroy(),Ee.destroy(),K.push(Ee)})}Wt(q,E.fromStyles)}_buildAnimation(D,E,N,G,q,le){const b=E.triggerName,F=E.element,x=[],V=new Set,K=new Set,me=E.timelines.map(Ue=>{const ft=Ue.element;V.add(ft);const Lt=ft[fn];if(Lt&&Lt.removedBeforeQueried)return new Nt.ZN(Ue.duration,Ue.delay);const Vt=ft!==F,It=function Go(U){const D=[];return hl(U,D),D}((N.get(ft)||pi).map(zn=>zn.getRealPlayer())).filter(zn=>!!zn.element&&zn.element===ft),ln=q.get(ft),Yt=le.get(ft),Rn=qi(this._normalizer,Ue.keyframes,ln,Yt),Ii=this._buildPlayer(Ue,Rn,It);if(Ue.subTimeline&&G&&K.add(ft),Vt){const zn=new ds(D,b,ft);zn.setRealPlayer(Ii),x.push(zn)}return Ii});x.forEach(Ue=>{vi(this.playersByQueriedElement,Ue.element,[]).push(Ue),Ue.onDone(()=>function z(U,D,E){let N=U.get(D);if(N){if(N.length){const G=N.indexOf(E);N.splice(G,1)}0==N.length&&U.delete(D)}return N}(this.playersByQueriedElement,Ue.element,Ue))}),V.forEach(Ue=>An(Ue,ze));const Ee=Nn(me);return Ee.onDestroy(()=>{V.forEach(Ue=>lr(Ue,ze)),xn(F,E.toStyles)}),K.forEach(Ue=>{vi(G,Ue,[]).push(Ee)}),Ee}_buildPlayer(D,E,N){return E.length>0?this.driver.animate(D.element,E,D.duration,D.delay,D.easing,N):new Nt.ZN(D.duration,D.delay)}}class ds{constructor(D,E,N){this.namespaceId=D,this.triggerName=E,this.element=N,this._player=new Nt.ZN,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(D){this._containsRealPlayer||(this._player=D,this._queuedCallbacks.forEach((E,N)=>{E.forEach(G=>ti(D,N,void 0,G))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(D.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(D){this.totalTime=D}syncPlayerEvents(D){const E=this._player;E.triggerCallback&&D.onStart(()=>E.triggerCallback("start")),D.onDone(()=>this.finish()),D.onDestroy(()=>this.destroy())}_queueEvent(D,E){vi(this._queuedCallbacks,D,[]).push(E)}onDone(D){this.queued&&this._queueEvent("done",D),this._player.onDone(D)}onStart(D){this.queued&&this._queueEvent("start",D),this._player.onStart(D)}onDestroy(D){this.queued&&this._queueEvent("destroy",D),this._player.onDestroy(D)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(D){this.queued||this._player.setPosition(D)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(D){const E=this._player;E.triggerCallback&&E.triggerCallback(D)}}function P(U){return U&&1===U.nodeType}function se(U,D){const E=U.style.display;return U.style.display=D??"none",E}function Tt(U,D,E,N,G){const q=[];E.forEach(F=>q.push(se(F)));const le=[];N.forEach((F,x)=>{const V=new Map;F.forEach(K=>{const me=D.computeStyle(x,K,G);V.set(K,me),(!me||0==me.length)&&(x[fn]=et,le.push(x))}),U.set(x,V)});let b=0;return E.forEach(F=>se(F,q[b++])),le}function nn(U,D){const E=new Map;if(U.forEach(b=>E.set(b,[])),0==D.length)return E;const G=new Set(D),q=new Map;function le(b){if(!b)return 1;let F=q.get(b);if(F)return F;const x=b.parentNode;return F=E.has(x)?x:G.has(x)?1:le(x),q.set(b,F),F}return D.forEach(b=>{const F=le(b);1!==F&&E.get(F).push(b)}),E}function An(U,D){U.classList?.add(D)}function lr(U,D){U.classList?.remove(D)}function xs(U,D,E){Nn(E).onDone(()=>U.processLeaveNode(D))}function hl(U,D){for(let E=0;EG.add(q)):D.set(U,N),E.delete(U),!0}class Pr{constructor(D,E,N){this.bodyNode=D,this._driver=E,this._normalizer=N,this._triggerCache={},this.onRemovalComplete=(G,q)=>{},this._transitionEngine=new lo(D,E,N),this._timelineEngine=new jn(D,E,N),this._transitionEngine.onRemovalComplete=(G,q)=>this.onRemovalComplete(G,q)}registerTrigger(D,E,N,G,q){const le=D+"-"+G;let b=this._triggerCache[le];if(!b){const F=[],V=wr(this._driver,q,F,[]);if(F.length)throw function Oi(U,D){return new k.vHH(3404,!1)}();b=function Ys(U,D,E){return new zt(U,D,E)}(G,V,this._normalizer),this._triggerCache[le]=b}this._transitionEngine.registerTrigger(E,G,b)}register(D,E){this._transitionEngine.register(D,E)}destroy(D,E){this._transitionEngine.destroy(D,E)}onInsert(D,E,N,G){this._transitionEngine.insertNode(D,E,N,G)}onRemove(D,E,N){this._transitionEngine.removeNode(D,E,N)}disableAnimations(D,E){this._transitionEngine.markElementAsDisabled(D,E)}process(D,E,N,G){if("@"==N.charAt(0)){const[q,le]=rr(N);this._timelineEngine.command(q,E,le,G)}else this._transitionEngine.trigger(D,E,N,G)}listen(D,E,N,G,q){if("@"==N.charAt(0)){const[le,b]=rr(N);return this._timelineEngine.listen(le,E,b,q)}return this._transitionEngine.listen(D,E,N,G,q)}flush(D=-1){this._transitionEngine.flush(D)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(D){this._transitionEngine.afterFlushAnimationsDone(D)}}let fl=(()=>{class U{static#e=this.initialStylesByElement=new WeakMap;constructor(E,N,G){this._element=E,this._startStyles=N,this._endStyles=G,this._state=0;let q=U.initialStylesByElement.get(E);q||U.initialStylesByElement.set(E,q=new Map),this._initialStyles=q}start(){this._state<1&&(this._startStyles&&xn(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(xn(this._element,this._initialStyles),this._endStyles&&(xn(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(U.initialStylesByElement.delete(this._element),this._startStyles&&(Wt(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Wt(this._element,this._endStyles),this._endStyles=null),xn(this._element,this._initialStyles),this._state=3)}}return U})();function Oo(U){let D=null;return U.forEach((E,N)=>{(function Os(U){return"display"===U||"position"===U})(N)&&(D=D||new Map,D.set(N,E))}),D}class cr{constructor(D,E,N,G){this.element=D,this.keyframes=E,this.options=N,this._specialStyles=G,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=N.duration,this._delay=N.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(D=>D()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const D=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,D,this.options),this._finalKeyframe=D.length?D[D.length-1]:new Map;const E=()=>this._onFinish();this.domPlayer.addEventListener("finish",E),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",E)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(D){const E=[];return D.forEach(N=>{E.push(Object.fromEntries(N))}),E}_triggerWebAnimation(D,E,N){return D.animate(this._convertKeyframesToObject(E),N)}onStart(D){this._originalOnStartFns.push(D),this._onStartFns.push(D)}onDone(D){this._originalOnDoneFns.push(D),this._onDoneFns.push(D)}onDestroy(D){this._onDestroyFns.push(D)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(D=>D()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(D=>D()),this._onDestroyFns=[])}setPosition(D){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=D*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const D=new Map;this.hasStarted()&&this._finalKeyframe.forEach((N,G)=>{"offset"!==G&&D.set(G,this._finished?N:$s(this.element,G))}),this.currentSnapshot=D}triggerCallback(D){const E="start"===D?this._onStartFns:this._onDoneFns;E.forEach(N=>N()),E.length=0}}class Ro{validateStyleProperty(D){return!0}validateAnimatableStyleProperty(D){return!0}matchesElement(D,E){return!1}containsElement(D,E){return pe(D,E)}getParentElement(D){return Bi(D)}query(D,E,N){return $e(D,E,N)}computeStyle(D,E,N){return window.getComputedStyle(D)[E]}animate(D,E,N,G,q,le=[]){const F={duration:N,delay:G,fill:0==G?"both":"forwards"};q&&(F.easing=q);const x=new Map,V=le.filter(Ee=>Ee instanceof cr);(function Gr(U,D){return 0===U||0===D})(N,G)&&V.forEach(Ee=>{Ee.currentSnapshot.forEach((Ue,ft)=>x.set(ft,Ue))});let K=function wi(U){return U.length?U[0]instanceof Map?U:U.map(D=>ui(D)):[]}(E).map(Ee=>Fn(Ee));K=function gr(U,D,E){if(E.size&&D.length){let N=D[0],G=[];if(E.forEach((q,le)=>{N.has(le)||G.push(le),N.set(le,q)}),G.length)for(let q=1;qle.set(b,$s(U,b)))}}return D}(D,K,x);const me=function $u(U,D){let E=null,N=null;return Array.isArray(D)&&D.length?(E=Oo(D[0]),D.length>1&&(N=Oo(D[D.length-1]))):D instanceof Map&&(E=Oo(D)),E||N?new fl(U,E,N):null}(D,K);return new cr(D,K,F,me)}}let uo=(()=>{class U extends Nt._j{constructor(E,N){super(),this._nextAnimationId=0,this._renderer=E.createRenderer(N.body,{id:"0",encapsulation:k.ifc.None,styles:[],data:{animation:[]}})}build(E){const N=this._nextAnimationId.toString();this._nextAnimationId++;const G=Array.isArray(E)?(0,Nt.vP)(E):E;return Ji(this._renderer,null,N,"register",[G]),new Ni(N,this._renderer)}static#e=this.\u0275fac=function(N){return new(N||U)(k.LFG(k.FYo),k.LFG(ye.K0))};static#t=this.\u0275prov=k.Yz7({token:U,factory:U.\u0275fac})}return U})();class Ni extends Nt.LC{constructor(D,E){super(),this._id=D,this._renderer=E}create(D,E){return new ts(this._id,D,E||{},this._renderer)}}class ts{constructor(D,E,N,G){this.id=D,this.element=E,this._renderer=G,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",N)}_listen(D,E){return this._renderer.listen(this.element,`@@${this.id}:${D}`,E)}_command(D,...E){return Ji(this._renderer,this.element,this.id,D,E)}onDone(D){this._listen("done",D)}onStart(D){this._listen("start",D)}onDestroy(D){this._listen("destroy",D)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(D){this._command("setPosition",D)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function Ji(U,D,E,N,G){return U.setProperty(D,`@@${E}:${N}`,G)}const Pa="@.disabled";let ka=(()=>{class U{constructor(E,N,G){this.delegate=E,this.engine=N,this._zone=G,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,N.onRemovalComplete=(q,le)=>{const b=le?.parentNode(q);b&&le.removeChild(b,q)}}createRenderer(E,N){const q=this.delegate.createRenderer(E,N);if(!(E&&N&&N.data&&N.data.animation)){let V=this._rendererCache.get(q);return V||(V=new Zs("",q,this.engine,()=>this._rendererCache.delete(q)),this._rendererCache.set(q,V)),V}const le=N.id,b=N.id+"-"+this._currentId;this._currentId++,this.engine.register(b,E);const F=V=>{Array.isArray(V)?V.forEach(F):this.engine.registerTrigger(le,b,E,V.name,V)};return N.data.animation.forEach(F),new ha(this,b,q,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(E,N,G){E>=0&&EN(G)):(0==this._animationCallbacksBuffer.length&&queueMicrotask(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(q=>{const[le,b]=q;le(b)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([N,G]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}static#e=this.\u0275fac=function(N){return new(N||U)(k.LFG(k.FYo),k.LFG(Pr),k.LFG(k.R0b))};static#t=this.\u0275prov=k.Yz7({token:U,factory:U.\u0275fac})}return U})();class Zs{constructor(D,E,N,G){this.namespaceId=D,this.delegate=E,this.engine=N,this._onDestroy=G}get data(){return this.delegate.data}destroyNode(D){this.delegate.destroyNode?.(D)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(D,E){return this.delegate.createElement(D,E)}createComment(D){return this.delegate.createComment(D)}createText(D){return this.delegate.createText(D)}appendChild(D,E){this.delegate.appendChild(D,E),this.engine.onInsert(this.namespaceId,E,D,!1)}insertBefore(D,E,N,G=!0){this.delegate.insertBefore(D,E,N),this.engine.onInsert(this.namespaceId,E,D,G)}removeChild(D,E,N){this.engine.onRemove(this.namespaceId,E,this.delegate)}selectRootElement(D,E){return this.delegate.selectRootElement(D,E)}parentNode(D){return this.delegate.parentNode(D)}nextSibling(D){return this.delegate.nextSibling(D)}setAttribute(D,E,N,G){this.delegate.setAttribute(D,E,N,G)}removeAttribute(D,E,N){this.delegate.removeAttribute(D,E,N)}addClass(D,E){this.delegate.addClass(D,E)}removeClass(D,E){this.delegate.removeClass(D,E)}setStyle(D,E,N,G){this.delegate.setStyle(D,E,N,G)}removeStyle(D,E,N){this.delegate.removeStyle(D,E,N)}setProperty(D,E,N){"@"==E.charAt(0)&&E==Pa?this.disableAnimations(D,!!N):this.delegate.setProperty(D,E,N)}setValue(D,E){this.delegate.setValue(D,E)}listen(D,E,N){return this.delegate.listen(D,E,N)}disableAnimations(D,E){this.engine.disableAnimations(D,E)}}class ha extends Zs{constructor(D,E,N,G,q){super(E,N,G,q),this.factory=D,this.namespaceId=E}setProperty(D,E,N){"@"==E.charAt(0)?"."==E.charAt(1)&&E==Pa?this.disableAnimations(D,N=void 0===N||!!N):this.engine.process(this.namespaceId,D,E.slice(1),N):this.delegate.setProperty(D,E,N)}listen(D,E,N){if("@"==E.charAt(0)){const G=function Wo(U){switch(U){case"body":return document.body;case"document":return document;case"window":return window;default:return U}}(D);let q=E.slice(1),le="";return"@"!=q.charAt(0)&&([q,le]=function fa(U){const D=U.indexOf(".");return[U.substring(0,D),U.slice(D+1)]}(q)),this.engine.listen(this.namespaceId,G,q,le,b=>{this.factory.scheduleListenerCallback(b._data||-1,N,b)})}return this.delegate.listen(D,E,N)}}const Fa=[{provide:Nt._j,useClass:uo},{provide:ls,useFactory:function pl(){return new Gs}},{provide:Pr,useClass:(()=>{class U extends Pr{constructor(E,N,G,q){super(E.body,N,G)}ngOnDestroy(){this.flush()}static#e=this.\u0275fac=function(N){return new(N||U)(k.LFG(ye.K0),k.LFG(Mt),k.LFG(ls),k.LFG(k.z2F))};static#t=this.\u0275prov=k.Yz7({token:U,factory:U.\u0275fac})}return U})()},{provide:k.FYo,useFactory:function gl(U,D,E){return new ka(U,D,E)},deps:[l.se,Pr,k.R0b]}],Rs=[{provide:Mt,useFactory:()=>new Ro},{provide:k.QbO,useValue:"BrowserAnimations"},...Fa],ho=[{provide:Mt,useClass:Et},{provide:k.QbO,useValue:"NoopAnimations"},...Fa];let Po=(()=>{class U{static withConfig(E){return{ngModule:U,providers:E.disableAnimations?ho:Rs}}static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275mod=k.oAB({type:U});static#n=this.\u0275inj=k.cJS({providers:Rs,imports:[l.b2]})}return U})();var Yu=L(3250),vl=L(9498);let Wu=(()=>{class U{static#e=this.\u0275fac=function(N){return new(N||U)};static#t=this.\u0275mod=k.oAB({type:U,bootstrap:[Sn]});static#n=this.\u0275inj=k.cJS({providers:[ae.c,fe.N],imports:[l.b2,Yu.JF,ce,Ve.K6A,Bn.u5,Bn.UX,Po,vl.q]})}return U})();(0,k.G48)(),window.CESIUM_BASE_URL="assets/cesium/",l.q6().bootstrapModule(Wu).catch(U=>console.error(U))},1921:(ct,De,L)=>{function l(de,re,ce,_e,ve,Te,be){try{var ae=de[Te](be),fe=ae.value}catch(ye){return void ce(ye)}ae.done?re(fe):Promise.resolve(fe).then(_e,ve)}function k(de){return function(){var re=this,ce=arguments;return new Promise(function(_e,ve){var Te=de.apply(re,ce);function be(fe){l(Te,_e,ve,be,ae,"next",fe)}function ae(fe){l(Te,_e,ve,be,ae,"throw",fe)}be(void 0)})}}L.d(De,{Z:()=>k})},3449:(ct,De,L)=>{L.d(De,{FC:()=>Pe,KL:()=>nt,ZT:()=>k,gn:()=>ce,mG:()=>ye,pi:()=>de,qq:()=>ne});var l=function(xe,Oe){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Fe,Ne){Fe.__proto__=Ne}||function(Fe,Ne){for(var We in Ne)Object.prototype.hasOwnProperty.call(Ne,We)&&(Fe[We]=Ne[We])})(xe,Oe)};function k(xe,Oe){if("function"!=typeof Oe&&null!==Oe)throw new TypeError("Class extends value "+String(Oe)+" is not a constructor or null");function Fe(){this.constructor=xe}l(xe,Oe),xe.prototype=null===Oe?Object.create(Oe):(Fe.prototype=Oe.prototype,new Fe)}var de=function(){return de=Object.assign||function(Oe){for(var Fe,Ne=1,We=arguments.length;Ne=0;ot--)(_t=xe[ot])&&(Ke=(We<3?_t(Ke):We>3?_t(Oe,Fe,Ke):_t(Oe,Fe))||Ke);return We>3&&Ke&&Object.defineProperty(Oe,Fe,Ke),Ke}function ye(xe,Oe,Fe,Ne){return new(Fe||(Fe=Promise))(function(Ke,_t){function ot(cn){try{Xe(Ne.next(cn))}catch(Ut){_t(Ut)}}function ei(cn){try{Xe(Ne.throw(cn))}catch(Ut){_t(Ut)}}function Xe(cn){cn.done?Ke(cn.value):function We(Ke){return Ke instanceof Fe?Ke:new Fe(function(_t){_t(Ke)})}(cn.value).then(ot,ei)}Xe((Ne=Ne.apply(xe,Oe||[])).next())})}function ne(xe){return this instanceof ne?(this.v=xe,this):new ne(xe)}function Pe(xe,Oe,Fe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var We,Ne=Fe.apply(xe,Oe||[]),Ke=[];return We={},_t("next"),_t("throw"),_t("return"),We[Symbol.asyncIterator]=function(){return this},We;function _t(kt){Ne[kt]&&(We[kt]=function(mn){return new Promise(function(li,an){Ke.push([kt,mn,li,an])>1||ot(kt,mn)})})}function ot(kt,mn){try{!function ei(kt){kt.value instanceof ne?Promise.resolve(kt.value.v).then(Xe,cn):Ut(Ke[0][2],kt)}(Ne[kt](mn))}catch(li){Ut(Ke[0][3],li)}}function Xe(kt){ot("next",kt)}function cn(kt){ot("throw",kt)}function Ut(kt,mn){kt(mn),Ke.shift(),Ke.length&&ot(Ke[0][0],Ke[0][1])}}function nt(xe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Fe,Oe=xe[Symbol.asyncIterator];return Oe?Oe.call(xe):(xe=function Le(xe){var Oe="function"==typeof Symbol&&Symbol.iterator,Fe=Oe&&xe[Oe],Ne=0;if(Fe)return Fe.call(xe);if(xe&&"number"==typeof xe.length)return{next:function(){return xe&&Ne>=xe.length&&(xe=void 0),{value:xe&&xe[Ne++],done:!xe}}};throw new TypeError(Oe?"Object is not iterable.":"Symbol.iterator is not defined.")}(xe),Fe={},Ne("next"),Ne("throw"),Ne("return"),Fe[Symbol.asyncIterator]=function(){return this},Fe);function Ne(Ke){Fe[Ke]=xe[Ke]&&function(_t){return new Promise(function(ot,ei){!function We(Ke,_t,ot,ei){Promise.resolve(ei).then(function(Xe){Ke({value:Xe,done:ot})},_t)}(ot,ei,(_t=xe[Ke](_t)).done,_t.value)})}}}"function"==typeof SuppressedError&&SuppressedError},6206:(ct,De,L)=>{L.d(De,{F4:()=>ae,LC:()=>k,SB:()=>be,X$:()=>re,ZE:()=>at,ZN:()=>Re,_j:()=>l,eR:()=>fe,jt:()=>ce,k1:()=>Dt,l3:()=>de,oB:()=>Te,vP:()=>ve});class l{}class k{}const de="*";function re(ut,ne){return{type:7,name:ut,definitions:ne,options:{}}}function ce(ut,ne=null){return{type:4,styles:ne,timings:ut}}function ve(ut,ne=null){return{type:2,steps:ut,options:ne}}function Te(ut){return{type:6,styles:ut,offset:null}}function be(ut,ne,Pe){return{type:0,name:ut,styles:ne,options:Pe}}function ae(ut){return{type:5,steps:ut}}function fe(ut,ne,Pe=null){return{type:1,expr:ut,animation:ne,options:Pe}}class Re{constructor(ne=0,Pe=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=ne+Pe}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(ne=>ne()),this._onDoneFns=[])}onStart(ne){this._originalOnStartFns.push(ne),this._onStartFns.push(ne)}onDone(ne){this._originalOnDoneFns.push(ne),this._onDoneFns.push(ne)}onDestroy(ne){this._onDestroyFns.push(ne)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(ne=>ne()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(ne=>ne()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(ne){this._position=this.totalTime?ne*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(ne){const Pe="start"==ne?this._onStartFns:this._onDoneFns;Pe.forEach(Me=>Me()),Pe.length=0}}class at{constructor(ne){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=ne;let Pe=0,Me=0,nt=0;const it=this.players.length;0==it?queueMicrotask(()=>this._onFinish()):this.players.forEach(Je=>{Je.onDone(()=>{++Pe==it&&this._onFinish()}),Je.onDestroy(()=>{++Me==it&&this._onDestroy()}),Je.onStart(()=>{++nt==it&&this._onStart()})}),this.totalTime=this.players.reduce((Je,wt)=>Math.max(Je,wt.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(ne=>ne()),this._onDoneFns=[])}init(){this.players.forEach(ne=>ne.init())}onStart(ne){this._onStartFns.push(ne)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(ne=>ne()),this._onStartFns=[])}onDone(ne){this._onDoneFns.push(ne)}onDestroy(ne){this._onDestroyFns.push(ne)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(ne=>ne.play())}pause(){this.players.forEach(ne=>ne.pause())}restart(){this.players.forEach(ne=>ne.restart())}finish(){this._onFinish(),this.players.forEach(ne=>ne.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(ne=>ne.destroy()),this._onDestroyFns.forEach(ne=>ne()),this._onDestroyFns=[])}reset(){this.players.forEach(ne=>ne.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(ne){const Pe=ne*this.totalTime;this.players.forEach(Me=>{const nt=Me.totalTime?Math.min(1,Pe/Me.totalTime):1;Me.setPosition(nt)})}getPosition(){const ne=this.players.reduce((Pe,Me)=>null===Pe||Me.totalTime>Pe.totalTime?Me:Pe,null);return null!=ne?ne.getPosition():0}beforeDestroy(){this.players.forEach(ne=>{ne.beforeDestroy&&ne.beforeDestroy()})}triggerCallback(ne){const Pe="start"==ne?this._onStartFns:this._onDoneFns;Pe.forEach(Me=>Me()),Pe.length=0}}const Dt="!"},3223:(ct,De,L)=>{L.d(De,{Do:()=>Le,EM:()=>Er,HT:()=>re,JF:()=>cs,K0:()=>_e,Mn:()=>Bn,Mx:()=>Fn,NF:()=>As,Nd:()=>Zr,O5:()=>sr,Ov:()=>Di,PC:()=>To,PM:()=>ls,RF:()=>hn,S$:()=>Ve,Tn:()=>Je,UT:()=>Nt,V_:()=>Te,Ye:()=>Re,b0:()=>He,bD:()=>yn,ez:()=>mr,fb:()=>Qi,mk:()=>dn,n9:()=>$s,q:()=>de,sg:()=>Wn,tM:()=>wt,tP:()=>Io,wS:()=>Oe,w_:()=>ce,x:()=>it});var l=L(3714);let k=null;function de(){return k}function re(b){k||(k=b)}class ce{}const _e=new l.OlP("DocumentToken");let ve=(()=>{class b{historyGo(x){throw new Error("Not implemented")}static#e=this.\u0275fac=function(V){return new(V||b)};static#t=this.\u0275prov=l.Yz7({token:b,factory:function(){return(0,l.f3M)(be)},providedIn:"platform"})}return b})();const Te=new l.OlP("Location Initialized");let be=(()=>{class b extends ve{constructor(){super(),this._doc=(0,l.f3M)(_e),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return de().getBaseHref(this._doc)}onPopState(x){const V=de().getGlobalEventTarget(this._doc,"window");return V.addEventListener("popstate",x,!1),()=>V.removeEventListener("popstate",x)}onHashChange(x){const V=de().getGlobalEventTarget(this._doc,"window");return V.addEventListener("hashchange",x,!1),()=>V.removeEventListener("hashchange",x)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(x){this._location.pathname=x}pushState(x,V,K){this._history.pushState(x,V,K)}replaceState(x,V,K){this._history.replaceState(x,V,K)}forward(){this._history.forward()}back(){this._history.back()}historyGo(x=0){this._history.go(x)}getState(){return this._history.state}static#e=this.\u0275fac=function(V){return new(V||b)};static#t=this.\u0275prov=l.Yz7({token:b,factory:function(){return new b},providedIn:"platform"})}return b})();function ae(b,F){if(0==b.length)return F;if(0==F.length)return b;let x=0;return b.endsWith("/")&&x++,F.startsWith("/")&&x++,2==x?b+F.substring(1):1==x?b+F:b+"/"+F}function fe(b){const F=b.match(/#|\?|$/),x=F&&F.index||b.length;return b.slice(0,x-("/"===b[x-1]?1:0))+b.slice(x)}function ye(b){return b&&"?"!==b[0]?"?"+b:b}let Ve=(()=>{class b{historyGo(x){throw new Error("Not implemented")}static#e=this.\u0275fac=function(V){return new(V||b)};static#t=this.\u0275prov=l.Yz7({token:b,factory:function(){return(0,l.f3M)(He)},providedIn:"root"})}return b})();const ke=new l.OlP("appBaseHref");let He=(()=>{class b extends Ve{constructor(x,V){super(),this._platformLocation=x,this._removeListenerFns=[],this._baseHref=V??this._platformLocation.getBaseHrefFromDOM()??(0,l.f3M)(_e).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(x){this._removeListenerFns.push(this._platformLocation.onPopState(x),this._platformLocation.onHashChange(x))}getBaseHref(){return this._baseHref}prepareExternalUrl(x){return ae(this._baseHref,x)}path(x=!1){const V=this._platformLocation.pathname+ye(this._platformLocation.search),K=this._platformLocation.hash;return K&&x?`${V}${K}`:V}pushState(x,V,K,me){const Ee=this.prepareExternalUrl(K+ye(me));this._platformLocation.pushState(x,V,Ee)}replaceState(x,V,K,me){const Ee=this.prepareExternalUrl(K+ye(me));this._platformLocation.replaceState(x,V,Ee)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(x=0){this._platformLocation.historyGo?.(x)}static#e=this.\u0275fac=function(V){return new(V||b)(l.LFG(ve),l.LFG(ke,8))};static#t=this.\u0275prov=l.Yz7({token:b,factory:b.\u0275fac,providedIn:"root"})}return b})(),Le=(()=>{class b extends Ve{constructor(x,V){super(),this._platformLocation=x,this._baseHref="",this._removeListenerFns=[],null!=V&&(this._baseHref=V)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(x){this._removeListenerFns.push(this._platformLocation.onPopState(x),this._platformLocation.onHashChange(x))}getBaseHref(){return this._baseHref}path(x=!1){let V=this._platformLocation.hash;return null==V&&(V="#"),V.length>0?V.substring(1):V}prepareExternalUrl(x){const V=ae(this._baseHref,x);return V.length>0?"#"+V:V}pushState(x,V,K,me){let Ee=this.prepareExternalUrl(K+ye(me));0==Ee.length&&(Ee=this._platformLocation.pathname),this._platformLocation.pushState(x,V,Ee)}replaceState(x,V,K,me){let Ee=this.prepareExternalUrl(K+ye(me));0==Ee.length&&(Ee=this._platformLocation.pathname),this._platformLocation.replaceState(x,V,Ee)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(x=0){this._platformLocation.historyGo?.(x)}static#e=this.\u0275fac=function(V){return new(V||b)(l.LFG(ve),l.LFG(ke,8))};static#t=this.\u0275prov=l.Yz7({token:b,factory:b.\u0275fac})}return b})(),Re=(()=>{class b{constructor(x){this._subject=new l.vpe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=x;const V=this._locationStrategy.getBaseHref();this._basePath=function ne(b){if(new RegExp("^(https?:)?//").test(b)){const[,x]=b.split(/\/\/[^\/]+/);return x}return b}(fe(ut(V))),this._locationStrategy.onPopState(K=>{this._subject.emit({url:this.path(!0),pop:!0,state:K.state,type:K.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(x=!1){return this.normalize(this._locationStrategy.path(x))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(x,V=""){return this.path()==this.normalize(x+ye(V))}normalize(x){return b.stripTrailingSlash(function Dt(b,F){if(!b||!F.startsWith(b))return F;const x=F.substring(b.length);return""===x||["/",";","?","#"].includes(x[0])?x:F}(this._basePath,ut(x)))}prepareExternalUrl(x){return x&&"/"!==x[0]&&(x="/"+x),this._locationStrategy.prepareExternalUrl(x)}go(x,V="",K=null){this._locationStrategy.pushState(K,"",x,V),this._notifyUrlChangeListeners(this.prepareExternalUrl(x+ye(V)),K)}replaceState(x,V="",K=null){this._locationStrategy.replaceState(K,"",x,V),this._notifyUrlChangeListeners(this.prepareExternalUrl(x+ye(V)),K)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(x=0){this._locationStrategy.historyGo?.(x)}onUrlChange(x){return this._urlChangeListeners.push(x),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(V=>{this._notifyUrlChangeListeners(V.url,V.state)})),()=>{const V=this._urlChangeListeners.indexOf(x);this._urlChangeListeners.splice(V,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(x="",V){this._urlChangeListeners.forEach(K=>K(x,V))}subscribe(x,V,K){return this._subject.subscribe({next:x,error:V,complete:K})}static#e=this.normalizeQueryParams=ye;static#t=this.joinWithSlash=ae;static#n=this.stripTrailingSlash=fe;static#i=this.\u0275fac=function(V){return new(V||b)(l.LFG(Ve))};static#r=this.\u0275prov=l.Yz7({token:b,factory:function(){return function at(){return new Re((0,l.LFG)(Ve))}()},providedIn:"root"})}return b})();function ut(b){return b.replace(/\/index.html$/,"")}var it=function(b){return b[b.Format=0]="Format",b[b.Standalone=1]="Standalone",b}(it||{}),Je=function(b){return b[b.Narrow=0]="Narrow",b[b.Abbreviated=1]="Abbreviated",b[b.Wide=2]="Wide",b[b.Short=3]="Short",b}(Je||{}),wt=function(b){return b[b.Short=0]="Short",b[b.Medium=1]="Medium",b[b.Long=2]="Long",b[b.Full=3]="Full",b}(wt||{});function Bn(b,F,x){const V=(0,l.cg1)(b),me=an([V[l.wAp.DaysFormat],V[l.wAp.DaysStandalone]],F);return an(me,x)}function Nt(b,F,x){const V=(0,l.cg1)(b),me=an([V[l.wAp.MonthsFormat],V[l.wAp.MonthsStandalone]],F);return an(me,x)}function Qi(b){return(0,l.cg1)(b)[l.wAp.FirstDayOfWeek]}function Oe(b,F){return an((0,l.cg1)(b)[l.wAp.DateFormat],F)}function an(b,F){for(let x=F;x>-1;x--)if(typeof b[x]<"u")return b[x];throw new Error("Locale data API: locale data undefined")}function Fn(b,F){F=encodeURIComponent(F);for(const x of b.split(";")){const V=x.indexOf("="),[K,me]=-1==V?[x,""]:[x.slice(0,V),x.slice(V+1)];if(K.trim()===F)return decodeURIComponent(me)}return null}const xn=/\s+/,Wt=[];let dn=(()=>{class b{constructor(x,V,K,me){this._iterableDiffers=x,this._keyValueDiffers=V,this._ngEl=K,this._renderer=me,this.initialClasses=Wt,this.stateMap=new Map}set klass(x){this.initialClasses=null!=x?x.trim().split(xn):Wt}set ngClass(x){this.rawClass="string"==typeof x?x.trim().split(xn):x}ngDoCheck(){for(const V of this.initialClasses)this._updateState(V,!0);const x=this.rawClass;if(Array.isArray(x)||x instanceof Set)for(const V of x)this._updateState(V,!0);else if(null!=x)for(const V of Object.keys(x))this._updateState(V,!!x[V]);this._applyStateDiff()}_updateState(x,V){const K=this.stateMap.get(x);void 0!==K?(K.enabled!==V&&(K.changed=!0,K.enabled=V),K.touched=!0):this.stateMap.set(x,{enabled:V,changed:!0,touched:!0})}_applyStateDiff(){for(const x of this.stateMap){const V=x[0],K=x[1];K.changed?(this._toggleClass(V,K.enabled),K.changed=!1):K.touched||(K.enabled&&this._toggleClass(V,!1),this.stateMap.delete(V)),K.touched=!1}}_toggleClass(x,V){(x=x.trim()).length>0&&x.split(xn).forEach(K=>{V?this._renderer.addClass(this._ngEl.nativeElement,K):this._renderer.removeClass(this._ngEl.nativeElement,K)})}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.ZZ4),l.Y36(l.aQg),l.Y36(l.SBq),l.Y36(l.Qsj))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0})}return b})();class Yn{constructor(F,x,V,K){this.$implicit=F,this.ngForOf=x,this.index=V,this.count=K}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Wn=(()=>{class b{set ngForOf(x){this._ngForOf=x,this._ngForOfDirty=!0}set ngForTrackBy(x){this._trackByFn=x}get ngForTrackBy(){return this._trackByFn}constructor(x,V,K){this._viewContainer=x,this._template=V,this._differs=K,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(x){x&&(this._template=x)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const x=this._ngForOf;!this._differ&&x&&(this._differ=this._differs.find(x).create(this.ngForTrackBy))}if(this._differ){const x=this._differ.diff(this._ngForOf);x&&this._applyChanges(x)}}_applyChanges(x){const V=this._viewContainer;x.forEachOperation((K,me,Ee)=>{if(null==K.previousIndex)V.createEmbeddedView(this._template,new Yn(K.item,this._ngForOf,-1,-1),null===Ee?void 0:Ee);else if(null==Ee)V.remove(null===me?void 0:me);else if(null!==me){const Ue=V.get(me);V.move(Ue,Ee),Si(Ue,K)}});for(let K=0,me=V.length;K{Si(V.get(K.currentIndex),K)})}static ngTemplateContextGuard(x,V){return!0}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.s_b),l.Y36(l.Rgc),l.Y36(l.ZZ4))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}return b})();function Si(b,F){b.context.$implicit=F.item}let sr=(()=>{class b{constructor(x,V){this._viewContainer=x,this._context=new di,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=V}set ngIf(x){this._context.$implicit=this._context.ngIf=x,this._updateView()}set ngIfThen(x){Gr("ngIfThen",x),this._thenTemplateRef=x,this._thenViewRef=null,this._updateView()}set ngIfElse(x){Gr("ngIfElse",x),this._elseTemplateRef=x,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(x,V){return!0}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.s_b),l.Y36(l.Rgc))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}return b})();class di{constructor(){this.$implicit=null,this.ngIf=null}}function Gr(b,F){if(F&&!F.createEmbeddedView)throw new Error(`${b} must be a TemplateRef, but received '${(0,l.AaK)(F)}'.`)}class gr{constructor(F,x){this._viewContainerRef=F,this._templateRef=x,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(F){F&&!this._created?this.create():!F&&this._created&&this.destroy()}}let hn=(()=>{class b{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(x){this._ngSwitch=x,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(x){this._defaultViews.push(x)}_matchCase(x){const V=x==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||V,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),V}_updateDefaultCases(x){if(this._defaultViews.length>0&&x!==this._defaultUsed){this._defaultUsed=x;for(const V of this._defaultViews)V.enforceState(x)}}static#e=this.\u0275fac=function(V){return new(V||b)};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0})}return b})(),$s=(()=>{class b{constructor(x,V,K){this.ngSwitch=K,K._addCase(),this._view=new gr(x,V)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.s_b),l.Y36(l.Rgc),l.Y36(hn,9))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0})}return b})(),To=(()=>{class b{constructor(x,V,K){this._ngEl=x,this._differs=V,this._renderer=K,this._ngStyle=null,this._differ=null}set ngStyle(x){this._ngStyle=x,!this._differ&&x&&(this._differ=this._differs.find(x).create())}ngDoCheck(){if(this._differ){const x=this._differ.diff(this._ngStyle);x&&this._applyChanges(x)}}_setStyle(x,V){const[K,me]=x.split("."),Ee=-1===K.indexOf("-")?void 0:l.JOm.DashCase;null!=V?this._renderer.setStyle(this._ngEl.nativeElement,K,me?`${V}${me}`:V,Ee):this._renderer.removeStyle(this._ngEl.nativeElement,K,Ee)}_applyChanges(x){x.forEachRemovedItem(V=>this._setStyle(V.key,null)),x.forEachAddedItem(V=>this._setStyle(V.key,V.currentValue)),x.forEachChangedItem(V=>this._setStyle(V.key,V.currentValue))}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.SBq),l.Y36(l.aQg),l.Y36(l.Qsj))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0})}return b})(),Io=(()=>{class b{constructor(x){this._viewContainerRef=x,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(x){if(x.ngTemplateOutlet||x.ngTemplateOutletInjector){const V=this._viewContainerRef;if(this._viewRef&&V.remove(V.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:K,ngTemplateOutletContext:me,ngTemplateOutletInjector:Ee}=this;this._viewRef=V.createEmbeddedView(K,me,Ee?{injector:Ee}:void 0)}else this._viewRef=null}else this._viewRef&&x.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.s_b))};static#t=this.\u0275dir=l.lG2({type:b,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[l.TTD]})}return b})();class Yr{createSubscription(F,x){return(0,l.rg0)(()=>F.subscribe({next:x,error:V=>{throw V}}))}dispose(F){(0,l.rg0)(()=>F.unsubscribe())}}class $o{createSubscription(F,x){return F.then(x,V=>{throw V})}dispose(F){}}const ii=new $o,Es=new Yr;let Di=(()=>{class b{constructor(x){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=x}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(x){return this._obj?x!==this._obj?(this._dispose(),this.transform(x)):this._latestValue:(x&&this._subscribe(x),this._latestValue)}_subscribe(x){this._obj=x,this._strategy=this._selectStrategy(x),this._subscription=this._strategy.createSubscription(x,V=>this._updateLatestValue(x,V))}_selectStrategy(x){if((0,l.QGY)(x))return ii;if((0,l.F4k)(x))return Es;throw function Ki(b,F){return new l.vHH(2100,!1)}()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(x,V){x===this._obj&&(this._latestValue=V,this._ref.markForCheck())}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.sBO,16))};static#t=this.\u0275pipe=l.Yjl({name:"async",type:b,pure:!1,standalone:!0})}return b})(),Zr=(()=>{class b{constructor(x){this.differs=x,this.keyValues=[],this.compareFn=Is}transform(x,V=Is){if(!x||!(x instanceof Map)&&"object"!=typeof x)return null;this.differ||(this.differ=this.differs.find(x).create());const K=this.differ.diff(x),me=V!==this.compareFn;return K&&(this.keyValues=[],K.forEachItem(Ee=>{this.keyValues.push(function as(b,F){return{key:b,value:F}}(Ee.key,Ee.currentValue))})),(K||me)&&(this.keyValues.sort(V),this.compareFn=V),this.keyValues}static#e=this.\u0275fac=function(V){return new(V||b)(l.Y36(l.aQg,16))};static#t=this.\u0275pipe=l.Yjl({name:"keyvalue",type:b,pure:!1,standalone:!0})}return b})();function Is(b,F){const x=b.key,V=F.key;if(x===V)return 0;if(void 0===x)return 1;if(void 0===V)return-1;if(null===x)return 1;if(null===V)return-1;if("string"==typeof x&&"string"==typeof V)return x{class b{static#e=this.\u0275fac=function(V){return new(V||b)};static#t=this.\u0275mod=l.oAB({type:b});static#n=this.\u0275inj=l.cJS({})}return b})();const yn="browser",Qr="server";function As(b){return b===yn}function ls(b){return b===Qr}let Er=(()=>{class b{static#e=this.\u0275prov=(0,l.Yz7)({token:b,providedIn:"root",factory:()=>new $i((0,l.LFG)(_e),window)})}return b})();class $i{constructor(F,x){this.document=F,this.window=x,this.offset=()=>[0,0]}setOffset(F){this.offset=Array.isArray(F)?()=>F:F}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(F){this.supportsScrolling()&&this.window.scrollTo(F[0],F[1])}scrollToAnchor(F){if(!this.supportsScrolling())return;const x=function Kr(b,F){const x=b.getElementById(F)||b.getElementsByName(F)[0];if(x)return x;if("function"==typeof b.createTreeWalker&&b.body&&"function"==typeof b.body.attachShadow){const V=b.createTreeWalker(b.body,NodeFilter.SHOW_ELEMENT);let K=V.currentNode;for(;K;){const me=K.shadowRoot;if(me){const Ee=me.getElementById(F)||me.querySelector(`[name="${F}"]`);if(Ee)return Ee}K=V.nextNode()}}return null}(this.document,F);x&&(this.scrollToElement(x),x.focus())}setHistoryScrollRestoration(F){this.supportsScrolling()&&(this.window.history.scrollRestoration=F)}scrollToElement(F){const x=F.getBoundingClientRect(),V=x.left+this.window.pageXOffset,K=x.top+this.window.pageYOffset,me=this.offset();this.window.scrollTo(V-me[0],K-me[1])}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}class cs{}},3250:(ct,De,L)=>{L.d(De,{JF:()=>pe,WM:()=>Ve,eN:()=>xe});var l=L(3714),k=L(287),de=L(3477),re=L(1145),ce=L(1173),_e=L(9735),ve=L(5990),Te=L(5220),be=L(3318),ae=L(3223);class fe{}class ye{}class Ve{constructor(oe){this.normalizedNames=new Map,this.lazyUpdate=null,oe?"string"==typeof oe?this.lazyInit=()=>{this.headers=new Map,oe.split("\n").forEach(ue=>{const ze=ue.indexOf(":");if(ze>0){const qe=ue.slice(0,ze),st=qe.toLowerCase(),rt=ue.slice(ze+1).trim();this.maybeSetNormalizedName(qe,st),this.headers.has(st)?this.headers.get(st).push(rt):this.headers.set(st,[rt])}})}:typeof Headers<"u"&&oe instanceof Headers?(this.headers=new Map,oe.forEach((ue,ze)=>{this.setHeaderEntries(ze,ue)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(oe).forEach(([ue,ze])=>{this.setHeaderEntries(ue,ze)})}:this.headers=new Map}has(oe){return this.init(),this.headers.has(oe.toLowerCase())}get(oe){this.init();const ue=this.headers.get(oe.toLowerCase());return ue&&ue.length>0?ue[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(oe){return this.init(),this.headers.get(oe.toLowerCase())||null}append(oe,ue){return this.clone({name:oe,value:ue,op:"a"})}set(oe,ue){return this.clone({name:oe,value:ue,op:"s"})}delete(oe,ue){return this.clone({name:oe,value:ue,op:"d"})}maybeSetNormalizedName(oe,ue){this.normalizedNames.has(ue)||this.normalizedNames.set(ue,oe)}init(){this.lazyInit&&(this.lazyInit instanceof Ve?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(oe=>this.applyUpdate(oe)),this.lazyUpdate=null))}copyFrom(oe){oe.init(),Array.from(oe.headers.keys()).forEach(ue=>{this.headers.set(ue,oe.headers.get(ue)),this.normalizedNames.set(ue,oe.normalizedNames.get(ue))})}clone(oe){const ue=new Ve;return ue.lazyInit=this.lazyInit&&this.lazyInit instanceof Ve?this.lazyInit:this,ue.lazyUpdate=(this.lazyUpdate||[]).concat([oe]),ue}applyUpdate(oe){const ue=oe.name.toLowerCase();switch(oe.op){case"a":case"s":let ze=oe.value;if("string"==typeof ze&&(ze=[ze]),0===ze.length)return;this.maybeSetNormalizedName(oe.name,ue);const qe=("a"===oe.op?this.headers.get(ue):void 0)||[];qe.push(...ze),this.headers.set(ue,qe);break;case"d":const st=oe.value;if(st){let rt=this.headers.get(ue);if(!rt)return;rt=rt.filter(Kt=>-1===st.indexOf(Kt)),0===rt.length?(this.headers.delete(ue),this.normalizedNames.delete(ue)):this.headers.set(ue,rt)}else this.headers.delete(ue),this.normalizedNames.delete(ue)}}setHeaderEntries(oe,ue){const ze=(Array.isArray(ue)?ue:[ue]).map(st=>st.toString()),qe=oe.toLowerCase();this.headers.set(qe,ze),this.maybeSetNormalizedName(oe,qe)}forEach(oe){this.init(),Array.from(this.normalizedNames.keys()).forEach(ue=>oe(this.normalizedNames.get(ue),this.headers.get(ue)))}}class He{encodeKey(oe){return Dt(oe)}encodeValue(oe){return Dt(oe)}decodeKey(oe){return decodeURIComponent(oe)}decodeValue(oe){return decodeURIComponent(oe)}}const Re=/%(\d[a-f0-9])/gi,at={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Dt(ge){return encodeURIComponent(ge).replace(Re,(oe,ue)=>at[ue]??oe)}function ut(ge){return`${ge}`}class ne{constructor(oe={}){if(this.updates=null,this.cloneFrom=null,this.encoder=oe.encoder||new He,oe.fromString){if(oe.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function Le(ge,oe){const ue=new Map;return ge.length>0&&ge.replace(/^\?/,"").split("&").forEach(qe=>{const st=qe.indexOf("="),[rt,Kt]=-1==st?[oe.decodeKey(qe),""]:[oe.decodeKey(qe.slice(0,st)),oe.decodeValue(qe.slice(st+1))],ht=ue.get(rt)||[];ht.push(Kt),ue.set(rt,ht)}),ue}(oe.fromString,this.encoder)}else oe.fromObject?(this.map=new Map,Object.keys(oe.fromObject).forEach(ue=>{const ze=oe.fromObject[ue],qe=Array.isArray(ze)?ze.map(ut):[ut(ze)];this.map.set(ue,qe)})):this.map=null}has(oe){return this.init(),this.map.has(oe)}get(oe){this.init();const ue=this.map.get(oe);return ue?ue[0]:null}getAll(oe){return this.init(),this.map.get(oe)||null}keys(){return this.init(),Array.from(this.map.keys())}append(oe,ue){return this.clone({param:oe,value:ue,op:"a"})}appendAll(oe){const ue=[];return Object.keys(oe).forEach(ze=>{const qe=oe[ze];Array.isArray(qe)?qe.forEach(st=>{ue.push({param:ze,value:st,op:"a"})}):ue.push({param:ze,value:qe,op:"a"})}),this.clone(ue)}set(oe,ue){return this.clone({param:oe,value:ue,op:"s"})}delete(oe,ue){return this.clone({param:oe,value:ue,op:"d"})}toString(){return this.init(),this.keys().map(oe=>{const ue=this.encoder.encodeKey(oe);return this.map.get(oe).map(ze=>ue+"="+this.encoder.encodeValue(ze)).join("&")}).filter(oe=>""!==oe).join("&")}clone(oe){const ue=new ne({encoder:this.encoder});return ue.cloneFrom=this.cloneFrom||this,ue.updates=(this.updates||[]).concat(oe),ue}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(oe=>this.map.set(oe,this.cloneFrom.map.get(oe))),this.updates.forEach(oe=>{switch(oe.op){case"a":case"s":const ue=("a"===oe.op?this.map.get(oe.param):void 0)||[];ue.push(ut(oe.value)),this.map.set(oe.param,ue);break;case"d":if(void 0===oe.value){this.map.delete(oe.param);break}{let ze=this.map.get(oe.param)||[];const qe=ze.indexOf(ut(oe.value));-1!==qe&&ze.splice(qe,1),ze.length>0?this.map.set(oe.param,ze):this.map.delete(oe.param)}}}),this.cloneFrom=this.updates=null)}}class Me{constructor(){this.map=new Map}set(oe,ue){return this.map.set(oe,ue),this}get(oe){return this.map.has(oe)||this.map.set(oe,oe.defaultValue()),this.map.get(oe)}delete(oe){return this.map.delete(oe),this}has(oe){return this.map.has(oe)}keys(){return this.map.keys()}}function it(ge){return typeof ArrayBuffer<"u"&&ge instanceof ArrayBuffer}function Je(ge){return typeof Blob<"u"&&ge instanceof Blob}function wt(ge){return typeof FormData<"u"&&ge instanceof FormData}class $t{constructor(oe,ue,ze,qe){let st;if(this.url=ue,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=oe.toUpperCase(),function nt(ge){switch(ge){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||qe?(this.body=void 0!==ze?ze:null,st=qe):st=ze,st&&(this.reportProgress=!!st.reportProgress,this.withCredentials=!!st.withCredentials,st.responseType&&(this.responseType=st.responseType),st.headers&&(this.headers=st.headers),st.context&&(this.context=st.context),st.params&&(this.params=st.params)),this.headers||(this.headers=new Ve),this.context||(this.context=new Me),this.params){const rt=this.params.toString();if(0===rt.length)this.urlWithParams=ue;else{const Kt=ue.indexOf("?");this.urlWithParams=ue+(-1===Kt?"?":Ktwi.set(Ei,oe.setHeaders[Ei]),ht)),oe.setParams&&(En=Object.keys(oe.setParams).reduce((wi,Ei)=>wi.set(Ei,oe.setParams[Ei]),En)),new $t(ue,ze,st,{params:En,headers:ht,context:ui,reportProgress:Kt,responseType:qe,withCredentials:rt})}}var Vn=function(ge){return ge[ge.Sent=0]="Sent",ge[ge.UploadProgress=1]="UploadProgress",ge[ge.ResponseHeader=2]="ResponseHeader",ge[ge.DownloadProgress=3]="DownloadProgress",ge[ge.Response=4]="Response",ge[ge.User=5]="User",ge}(Vn||{});class Sn{constructor(oe,ue=200,ze="OK"){this.headers=oe.headers||new Ve,this.status=void 0!==oe.status?oe.status:ue,this.statusText=oe.statusText||ze,this.url=oe.url||null,this.ok=this.status>=200&&this.status<300}}class Bn extends Sn{constructor(oe={}){super(oe),this.type=Vn.ResponseHeader}clone(oe={}){return new Bn({headers:oe.headers||this.headers,status:void 0!==oe.status?oe.status:this.status,statusText:oe.statusText||this.statusText,url:oe.url||this.url||void 0})}}class Nt extends Sn{constructor(oe={}){super(oe),this.type=Vn.Response,this.body=void 0!==oe.body?oe.body:null}clone(oe={}){return new Nt({body:void 0!==oe.body?oe.body:this.body,headers:oe.headers||this.headers,status:void 0!==oe.status?oe.status:this.status,statusText:oe.statusText||this.statusText,url:oe.url||this.url||void 0})}}class Ar extends Sn{constructor(oe){super(oe,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${oe.url||"(unknown url)"}`:`Http failure response for ${oe.url||"(unknown url)"}: ${oe.status} ${oe.statusText}`,this.error=oe.error||null}}function Qi(ge,oe){return{body:oe,headers:ge.headers,context:ge.context,observe:ge.observe,params:ge.params,reportProgress:ge.reportProgress,responseType:ge.responseType,withCredentials:ge.withCredentials}}let xe=(()=>{class ge{constructor(ue){this.handler=ue}request(ue,ze,qe={}){let st;if(ue instanceof $t)st=ue;else{let ht,En;ht=qe.headers instanceof Ve?qe.headers:new Ve(qe.headers),qe.params&&(En=qe.params instanceof ne?qe.params:new ne({fromObject:qe.params})),st=new $t(ue,ze,void 0!==qe.body?qe.body:null,{headers:ht,context:qe.context,params:En,reportProgress:qe.reportProgress,responseType:qe.responseType||"json",withCredentials:qe.withCredentials})}const rt=(0,k.of)(st).pipe((0,ce.b)(ht=>this.handler.handle(ht)));if(ue instanceof $t||"events"===qe.observe)return rt;const Kt=rt.pipe((0,_e.h)(ht=>ht instanceof Nt));switch(qe.observe||"body"){case"body":switch(st.responseType){case"arraybuffer":return Kt.pipe((0,ve.U)(ht=>{if(null!==ht.body&&!(ht.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return ht.body}));case"blob":return Kt.pipe((0,ve.U)(ht=>{if(null!==ht.body&&!(ht.body instanceof Blob))throw new Error("Response is not a Blob.");return ht.body}));case"text":return Kt.pipe((0,ve.U)(ht=>{if(null!==ht.body&&"string"!=typeof ht.body)throw new Error("Response is not a string.");return ht.body}));default:return Kt.pipe((0,ve.U)(ht=>ht.body))}case"response":return Kt;default:throw new Error(`Unreachable: unhandled observe type ${qe.observe}}`)}}delete(ue,ze={}){return this.request("DELETE",ue,ze)}get(ue,ze={}){return this.request("GET",ue,ze)}head(ue,ze={}){return this.request("HEAD",ue,ze)}jsonp(ue,ze){return this.request("JSONP",ue,{params:(new ne).append(ze,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(ue,ze={}){return this.request("OPTIONS",ue,ze)}patch(ue,ze,qe={}){return this.request("PATCH",ue,Qi(qe,ze))}post(ue,ze,qe={}){return this.request("POST",ue,Qi(qe,ze))}put(ue,ze,qe={}){return this.request("PUT",ue,Qi(qe,ze))}static#e=this.\u0275fac=function(ze){return new(ze||ge)(l.LFG(fe))};static#t=this.\u0275prov=l.Yz7({token:ge,factory:ge.\u0275fac})}return ge})();function ei(ge,oe){return oe(ge)}function Xe(ge,oe){return(ue,ze)=>oe.intercept(ue,{handle:qe=>ge(qe,ze)})}const Ut=new l.OlP(""),kt=new l.OlP(""),mn=new l.OlP("");function li(){let ge=null;return(oe,ue)=>{null===ge&&(ge=((0,l.f3M)(Ut,{optional:!0})??[]).reduceRight(Xe,ei));const ze=(0,l.f3M)(l.HDt),qe=ze.add();return ge(oe,ue).pipe((0,Te.x)(()=>ze.remove(qe)))}}let an=(()=>{class ge extends fe{constructor(ue,ze){super(),this.backend=ue,this.injector=ze,this.chain=null,this.pendingTasks=(0,l.f3M)(l.HDt)}handle(ue){if(null===this.chain){const qe=Array.from(new Set([...this.injector.get(kt),...this.injector.get(mn,[])]));this.chain=qe.reduceRight((st,rt)=>function cn(ge,oe,ue){return(ze,qe)=>ue.runInContext(()=>oe(ze,st=>ge(st,qe)))}(st,rt,this.injector),ei)}const ze=this.pendingTasks.add();return this.chain(ue,qe=>this.backend.handle(qe)).pipe((0,Te.x)(()=>this.pendingTasks.remove(ze)))}static#e=this.\u0275fac=function(ze){return new(ze||ge)(l.LFG(ye),l.LFG(l.lqb))};static#t=this.\u0275prov=l.Yz7({token:ge,factory:ge.\u0275fac})}return ge})();const pr=/^\)\]\}',?\n/;let bt=(()=>{class ge{constructor(ue){this.xhrFactory=ue}handle(ue){if("JSONP"===ue.method)throw new l.vHH(-2800,!1);const ze=this.xhrFactory;return(ze.\u0275loadImpl?(0,de.D)(ze.\u0275loadImpl()):(0,k.of)(null)).pipe((0,be.w)(()=>new re.y(st=>{const rt=ze.build();if(rt.open(ue.method,ue.urlWithParams),ue.withCredentials&&(rt.withCredentials=!0),ue.headers.forEach((Wt,dn)=>rt.setRequestHeader(Wt,dn.join(","))),ue.headers.has("Accept")||rt.setRequestHeader("Accept","application/json, text/plain, */*"),!ue.headers.has("Content-Type")){const Wt=ue.detectContentTypeHeader();null!==Wt&&rt.setRequestHeader("Content-Type",Wt)}if(ue.responseType){const Wt=ue.responseType.toLowerCase();rt.responseType="json"!==Wt?Wt:"text"}const Kt=ue.serializeBody();let ht=null;const En=()=>{if(null!==ht)return ht;const Wt=rt.statusText||"OK",dn=new Ve(rt.getAllResponseHeaders()),zi=function Ri(ge){return"responseURL"in ge&&ge.responseURL?ge.responseURL:/^X-Request-URL:/m.test(ge.getAllResponseHeaders())?ge.getResponseHeader("X-Request-URL"):null}(rt)||ue.url;return ht=new Bn({headers:dn,status:rt.status,statusText:Wt,url:zi}),ht},ui=()=>{let{headers:Wt,status:dn,statusText:zi,url:xr}=En(),Yn=null;204!==dn&&(Yn=typeof rt.response>"u"?rt.responseText:rt.response),0===dn&&(dn=Yn?200:0);let Wn=dn>=200&&dn<300;if("json"===ue.responseType&&"string"==typeof Yn){const Si=Yn;Yn=Yn.replace(pr,"");try{Yn=""!==Yn?JSON.parse(Yn):null}catch(Ti){Yn=Si,Wn&&(Wn=!1,Yn={error:Ti,text:Yn})}}Wn?(st.next(new Nt({body:Yn,headers:Wt,status:dn,statusText:zi,url:xr||void 0})),st.complete()):st.error(new Ar({error:Yn,headers:Wt,status:dn,statusText:zi,url:xr||void 0}))},wi=Wt=>{const{url:dn}=En(),zi=new Ar({error:Wt,status:rt.status||0,statusText:rt.statusText||"Unknown Error",url:dn||void 0});st.error(zi)};let Ei=!1;const Fn=Wt=>{Ei||(st.next(En()),Ei=!0);let dn={type:Vn.DownloadProgress,loaded:Wt.loaded};Wt.lengthComputable&&(dn.total=Wt.total),"text"===ue.responseType&&rt.responseText&&(dn.partialText=rt.responseText),st.next(dn)},xn=Wt=>{let dn={type:Vn.UploadProgress,loaded:Wt.loaded};Wt.lengthComputable&&(dn.total=Wt.total),st.next(dn)};return rt.addEventListener("load",ui),rt.addEventListener("error",wi),rt.addEventListener("timeout",wi),rt.addEventListener("abort",wi),ue.reportProgress&&(rt.addEventListener("progress",Fn),null!==Kt&&rt.upload&&rt.upload.addEventListener("progress",xn)),rt.send(Kt),st.next({type:Vn.Sent}),()=>{rt.removeEventListener("error",wi),rt.removeEventListener("abort",wi),rt.removeEventListener("load",ui),rt.removeEventListener("timeout",wi),ue.reportProgress&&(rt.removeEventListener("progress",Fn),null!==Kt&&rt.upload&&rt.upload.removeEventListener("progress",xn)),rt.readyState!==rt.DONE&&rt.abort()}})))}static#e=this.\u0275fac=function(ze){return new(ze||ge)(l.LFG(ae.JF))};static#t=this.\u0275prov=l.Yz7({token:ge,factory:ge.\u0275fac})}return ge})();const Un=new l.OlP("XSRF_ENABLED"),yt=new l.OlP("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),tn=new l.OlP("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class Dr{}let Nn=(()=>{class ge{constructor(ue,ze,qe){this.doc=ue,this.platform=ze,this.cookieName=qe,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const ue=this.doc.cookie||"";return ue!==this.lastCookieString&&(this.parseCount++,this.lastToken=(0,ae.Mx)(ue,this.cookieName),this.lastCookieString=ue),this.lastToken}static#e=this.\u0275fac=function(ze){return new(ze||ge)(l.LFG(ae.K0),l.LFG(l.Lbi),l.LFG(yt))};static#t=this.\u0275prov=l.Yz7({token:ge,factory:ge.\u0275fac})}return ge})();function qi(ge,oe){const ue=ge.url.toLowerCase();if(!(0,l.f3M)(Un)||"GET"===ge.method||"HEAD"===ge.method||ue.startsWith("http://")||ue.startsWith("https://"))return oe(ge);const ze=(0,l.f3M)(Dr).getToken(),qe=(0,l.f3M)(tn);return null!=ze&&!ge.headers.has(qe)&&(ge=ge.clone({headers:ge.headers.set(qe,ze)})),oe(ge)}var ni=function(ge){return ge[ge.Interceptors=0]="Interceptors",ge[ge.LegacyInterceptors=1]="LegacyInterceptors",ge[ge.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",ge[ge.NoXsrfProtection=3]="NoXsrfProtection",ge[ge.JsonpSupport=4]="JsonpSupport",ge[ge.RequestsMadeViaParent=5]="RequestsMadeViaParent",ge[ge.Fetch=6]="Fetch",ge}(ni||{});function vi(...ge){const oe=[xe,bt,an,{provide:fe,useExisting:an},{provide:ye,useExisting:bt},{provide:kt,useValue:qi,multi:!0},{provide:Un,useValue:!0},{provide:Dr,useClass:Nn}];for(const ue of ge)oe.push(...ue.\u0275providers);return(0,l.MR2)(oe)}const Mr=new l.OlP("LEGACY_INTERCEPTOR_FN");function Bi(){return function $n(ge,oe){return{\u0275kind:ge,\u0275providers:oe}}(ni.LegacyInterceptors,[{provide:Mr,useFactory:li},{provide:kt,useExisting:Mr,multi:!0}])}let pe=(()=>{class ge{static#e=this.\u0275fac=function(ze){return new(ze||ge)};static#t=this.\u0275mod=l.oAB({type:ge});static#n=this.\u0275inj=l.cJS({providers:[vi(Bi())]})}return ge})()},3714:(ct,De,L)=>{L.d(De,{$8M:()=>od,$WT:()=>os,$Z:()=>Qv,AFp:()=>yv,ALo:()=>io,AaK:()=>ye,AsE:()=>ug,BQk:()=>Sr,CHM:()=>rf,CRH:()=>Py,DdM:()=>aa,DyG:()=>ZC,EJc:()=>X1,EpF:()=>Yp,F$t:()=>Xl,F4k:()=>Ks,FYo:()=>Iv,FiY:()=>Nc,G48:()=>cw,Gf:()=>Oy,GfV:()=>Av,GkF:()=>Gp,Gpc:()=>He,HDt:()=>Tn,Hsn:()=>eh,Ikx:()=>Hs,JOm:()=>gd,Jf7:()=>jv,KtG:()=>sf,LFG:()=>Mt,LMc:()=>sI,LSH:()=>op,Lbi:()=>up,Lck:()=>N1,MAs:()=>V_,MGl:()=>th,MMx:()=>TD,MR2:()=>pv,NdJ:()=>Wp,Ojb:()=>bv,OlP:()=>yt,Oqu:()=>Ea,P3R:()=>hv,PXZ:()=>gC,Q6J:()=>jp,QGY:()=>Co,QbO:()=>jb,Qsj:()=>e0,R0b:()=>Tr,RDi:()=>pb,Rgc:()=>gc,SBq:()=>iu,Sil:()=>Hh,Suo:()=>Ry,TTD:()=>It,TgZ:()=>Jd,Tol:()=>tc,Udp:()=>ag,VKq:()=>zo,VuI:()=>iI,W1O:()=>VD,WFA:()=>Zp,XFs:()=>xt,Xpm:()=>$o,Xq5:()=>S_,Xts:()=>Ga,Y36:()=>jl,YKP:()=>py,YNc:()=>N_,Yjl:()=>Ts,Yz7:()=>Ut,Z0I:()=>an,ZZ4:()=>S,_Bn:()=>fy,_UZ:()=>Up,_Vd:()=>nu,_c5:()=>un,_uU:()=>US,aQg:()=>te,c2e:()=>tC,cJS:()=>mn,cg1:()=>js,d8E:()=>sa,dDg:()=>tm,dqk:()=>bt,eFA:()=>_C,eJc:()=>Fh,ekj:()=>ih,eoX:()=>nm,evT:()=>zv,f3M:()=>Ot,g9A:()=>Cv,h0i:()=>nl,hGG:()=>Xn,hij:()=>sh,iGM:()=>Nh,ifc:()=>rt,ip1:()=>Vu,jDz:()=>wg,kL8:()=>iD,lG2:()=>Or,lcZ:()=>bs,lnq:()=>ra,lqb:()=>Jo,lri:()=>Uh,n5z:()=>GC,oAB:()=>oo,oJD:()=>uv,oxw:()=>H_,qFp:()=>oI,qLn:()=>Da,qOj:()=>Pp,qZA:()=>Xd,rWj:()=>$h,rg0:()=>me,s9C:()=>qp,sBO:()=>uw,s_b:()=>_c,soG:()=>Bu,tb:()=>Yh,tp0:()=>Fc,uIk:()=>Np,vHH:()=>ne,vpe:()=>Vo,wAp:()=>So,xi3:()=>Th,xp6:()=>Wv,ynx:()=>wa,z2F:()=>bc,zSh:()=>gv,zW0:()=>__,zs3:()=>yo});var l=L(5992),k=L(5350),de=L(1145),re=L(3506),ce=L(8626),_e=L(287),ve=L(9853),Te=L(3318),be=L(8777);function ae(c){for(let h in c)if(c[h]===ae)return h;throw Error("Could not find renamed property on target object.")}function fe(c,h){for(const p in h)h.hasOwnProperty(p)&&!c.hasOwnProperty(p)&&(c[p]=h[p])}function ye(c){if("string"==typeof c)return c;if(Array.isArray(c))return"["+c.map(ye).join(", ")+"]";if(null==c)return""+c;if(c.overriddenName)return`${c.overriddenName}`;if(c.name)return`${c.name}`;const h=c.toString();if(null==h)return""+h;const p=h.indexOf("\n");return-1===p?h:h.substring(0,p)}function Ve(c,h){return null==c||""===c?null===h?"":h:null==h||""===h?c:c+" "+h}const ke=ae({__forward_ref__:ae});function He(c){return c.__forward_ref__=He,c.toString=function(){return ye(this())},c}function Le(c){return Re(c)?c():c}function Re(c){return"function"==typeof c&&c.hasOwnProperty(ke)&&c.__forward_ref__===He}function at(c){return c&&!!c.\u0275providers}const ut="https://g.co/ng/security#xss";class ne extends Error{constructor(h,p){super(function Pe(c,h){return`NG0${Math.abs(c)}${h?": "+h:""}`}(h,p)),this.code=h}}function Me(c){return"string"==typeof c?c:null==c?"":String(c)}function mt(c,h){throw new ne(-201,!1)}function _t(c,h){null==c&&function ot(c,h,p,m){throw new Error(`ASSERTION ERROR: ${c}`+(null==m?"":` [Expected=> ${p} ${m} ${h} <=Actual]`))}(h,c,null,"!=")}function Ut(c){return{token:c.token,providedIn:c.providedIn||null,factory:c.factory,value:void 0}}function mn(c){return{providers:c.providers||[],imports:c.imports||[]}}function li(c){return Li(c,fr)||Li(c,ir)}function an(c){return null!==li(c)}function Li(c,h){return c.hasOwnProperty(h)?c[h]:null}function xi(c){return c&&(c.hasOwnProperty(nr)||c.hasOwnProperty(Oi))?c[nr]:null}const fr=ae({\u0275prov:ae}),nr=ae({\u0275inj:ae}),ir=ae({ngInjectableDef:ae}),Oi=ae({ngInjectorDef:ae});var xt=function(c){return c[c.Default=0]="Default",c[c.Host=1]="Host",c[c.Self=2]="Self",c[c.SkipSelf=4]="SkipSelf",c[c.Optional=8]="Optional",c}(xt||{});let en;function ci(c){const h=en;return en=c,h}function pr(c,h,p){const m=li(c);return m&&"root"==m.providedIn?void 0===m.value?m.value=m.factory():m.value:p&xt.Optional?null:void 0!==h?h:void mt(ye(c))}const bt=globalThis;class yt{constructor(h,p){this._desc=h,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof p?this.__NG_ELEMENT_ID__=p:void 0!==p&&(this.\u0275prov=Ut({token:this,providedIn:p.providedIn||"root",factory:p.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}const Bi={},Pi="__NG_DI_FLAG__",Hi="ngTempTokenPath",Be=/\n/gm,ie="__source";let pe;function lt(c){const h=pe;return pe=c,h}function Et(c,h=xt.Default){if(void 0===pe)throw new ne(-203,!1);return null===pe?pr(c,void 0,h):pe.get(c,h&xt.Optional?null:void 0,h)}function Mt(c,h=xt.Default){return(function qt(){return en}()||Et)(Le(c),h)}function Ot(c,h=xt.Default){return Mt(c,Gn(h))}function Gn(c){return typeof c>"u"||"number"==typeof c?c:0|(c.optional&&8)|(c.host&&1)|(c.self&&2)|(c.skipSelf&&4)}function ji(c){const h=[];for(let p=0;ph){C=y-1;break}}}for(;yy?"":v[X+1].toLowerCase();const Se=8&m?he:null;if(Se&&-1!==dn(Se,B,0)||2&m&&B!==he){if(hn(m))return!1;C=!0}}}}else{if(!C&&!hn(m)&&!hn(M))return!1;if(C&&hn(M))continue;C=!1,m=M|1&m}}return hn(m)||C}function hn(c){return 0==(1&c)}function $s(c,h,p,m){if(null===h)return-1;let v=0;if(m||!p){let y=!1;for(;v-1)for(p++;p0?'="'+T+'"':"")+"]"}else 8&m?v+="."+C:4&m&&(v+=" "+C);else""!==v&&!hn(C)&&(h+=Io(y,v),v=""),m=C,y=y||!hn(m);p++}return""!==v&&(h+=Io(y,v)),h}function $o(c){return qe(()=>{const h=Wr(c),p={...h,decls:c.decls,vars:c.vars,template:c.template,consts:c.consts||null,ngContentSelectors:c.ngContentSelectors,onPush:c.changeDetection===st.OnPush,directiveDefs:null,pipeDefs:null,dependencies:h.standalone&&c.dependencies||null,getStandaloneInjector:null,signals:c.signals??!1,data:c.data||{},encapsulation:c.encapsulation||rt.Emulated,styles:c.styles||ht,_:null,schemas:c.schemas||null,tView:null,id:""};Ui(p);const m=c.dependencies;return p.directiveDefs=as(m,!1),p.pipeDefs=as(m,!0),p.id=function Is(c){let h=0;const p=[c.selectors,c.ngContentSelectors,c.hostVars,c.hostAttrs,c.consts,c.vars,c.decls,c.encapsulation,c.standalone,c.signals,c.exportAs,JSON.stringify(c.inputs),JSON.stringify(c.outputs),Object.getOwnPropertyNames(c.type.prototype),!!c.contentQueries,!!c.viewQuery].join("|");for(const v of p)h=Math.imul(31,h)+v.charCodeAt(0)<<0;return h+=2147483648,"c"+h}(p),p})}function Es(c){return Zt(c)||In(c)}function Di(c){return null!==c}function oo(c){return qe(()=>({type:c.type,bootstrap:c.bootstrap||ht,declarations:c.declarations||ht,imports:c.imports||ht,exports:c.exports||ht,transitiveCompileScopes:null,schemas:c.schemas||null,id:c.id||null}))}function wr(c,h){if(null==c)return Kt;const p={};for(const m in c)if(c.hasOwnProperty(m)){let v=c[m],y=v;Array.isArray(v)&&(y=v[1],v=v[0]),p[v]=m,h&&(h[v]=y)}return p}function Or(c){return qe(()=>{const h=Wr(c);return Ui(h),h})}function Ts(c){return{type:c.type,name:c.name,factory:null,pure:!1!==c.pure,standalone:!0===c.standalone,onDestroy:c.type.prototype.ngOnDestroy||null}}function Zt(c){return c[En]||null}function In(c){return c[ui]||null}function Hn(c){return c[wi]||null}function os(c){const h=Zt(c)||In(c)||Hn(c);return null!==h&&h.standalone}function _i(c,h){const p=c[Ei]||null;if(!p&&!0===h)throw new Error(`Type ${ye(c)} does not have '\u0275mod' property.`);return p}function Wr(c){const h={};return{type:c.type,providersResolver:null,factory:null,hostBindings:c.hostBindings||null,hostVars:c.hostVars||0,hostAttrs:c.hostAttrs||null,contentQueries:c.contentQueries||null,declaredInputs:h,inputTransforms:null,inputConfig:c.inputs||Kt,exportAs:c.exportAs||null,standalone:!0===c.standalone,signals:!0===c.signals,selectors:c.selectors||ht,viewQuery:c.viewQuery||null,features:c.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:wr(c.inputs,h),outputs:wr(c.outputs)}}function Ui(c){c.features?.forEach(h=>h(c))}function as(c,h){if(!c)return null;const p=h?Hn:Es;return()=>("function"==typeof c?c():c).map(m=>p(m)).filter(Di)}const On=0,dt=1,Ht=2,_n=3,fi=4,Rr=5,ri=6,mr=7,yn=8,Qr=9,vr=10,Ft=11,As=12,ls=13,qr=14,wn=15,Gs=16,Er=17,$i=18,Kr=19,Ra=20,cs=21,_r=22,us=23,Ys=24,zt=25,or=1,Jr=2,jn=7,ar=9,Zn=11;function Qn(c){return Array.isArray(c)&&"object"==typeof c[or]}function pi(c){return Array.isArray(c)&&!0===c[or]}function Ms(c){return 0!=(4&c.flags)}function et(c){return c.componentOffset>-1}function fn(c){return 1==(1&c.flags)}function qn(c){return!!c.template}function ki(c){return 0!=(512&c[Ht])}function Os(c,h){return c.hasOwnProperty(Fn)?c[Fn]:null}let Ni=null,ts=!1;function Ji(c){const h=Ni;return Ni=c,h}const Yo={version:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{}};function ka(c){if(!ho(c)||c.dirty){if(!c.producerMustRecompute(c)&&!pl(c))return void(c.dirty=!1);c.producerRecomputeValue(c),c.dirty=!1}}function Wo(c){c.dirty=!0,function Zs(c){if(void 0===c.liveConsumerNode)return;const h=ts;ts=!0;try{for(const p of c.liveConsumerNode)p.dirty||Wo(p)}finally{ts=h}}(c),c.consumerMarkedDirty?.(c)}function fa(c){return c&&(c.nextProducerIndex=0),Ji(c)}function Na(c,h){if(Ji(h),c&&void 0!==c.producerNode&&void 0!==c.producerIndexOfThis&&void 0!==c.producerLastReadVersion){if(ho(c))for(let p=c.nextProducerIndex;pc.nextProducerIndex;)c.producerNode.pop(),c.producerLastReadVersion.pop(),c.producerIndexOfThis.pop()}}function pl(c){Po(c);for(let h=0;h0}function Po(c){c.producerNode??=[],c.producerIndexOfThis??=[],c.producerLastReadVersion??=[]}let U=null;function me(c){const h=Ji(null);try{return c()}finally{Ji(h)}}const Ue=()=>{},ft=(()=>({...Yo,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:c=>{c.schedule(c.ref)},hasRun:!1,cleanupFn:Ue}))();class Vt{constructor(h,p,m){this.previousValue=h,this.currentValue=p,this.firstChange=m}isFirstChange(){return this.firstChange}}function It(){return ln}function ln(c){return c.type.prototype.ngOnChanges&&(c.setInput=Rn),Yt}function Yt(){const c=zn(this),h=c?.current;if(h){const p=c.previous;if(p===Kt)c.previous=h;else for(let m in h)p[m]=h[m];c.current=null,this.ngOnChanges(h)}}function Rn(c,h,p,m){const v=this.declaredInputs[p],y=zn(c)||function Ai(c,h){return c[Ii]=h}(c,{previous:Kt,current:null}),C=y.current||(y.current={}),T=y.previous,M=T[v];C[v]=new Vt(M&&M.currentValue,h,T===Kt),c[m]=h}It.ngInherit=!0;const Ii="__ngSimpleChanges__";function zn(c){return c[Ii]||null}const Fi=function(c,h,p){};function on(c){for(;Array.isArray(c);)c=c[On];return c}function Ct(c,h){return on(h[c])}function vt(c,h){return on(h[c.index])}function vn(c,h){return c.data[h]}function oi(c,h){return c[h]}function yi(c,h){const p=h[c];return Qn(p)?p:p[On]}function hs(c,h){return null==h?null:c[h]}function Qu(c){c[Er]=0}function er(c){1024&c[Ht]||(c[Ht]|=1024,Nr(c,1))}function ur(c){1024&c[Ht]&&(c[Ht]&=-1025,Nr(c,-1))}function Nr(c,h){let p=c[_n];if(null===p)return;p[Rr]+=h;let m=p;for(p=p[_n];null!==p&&(1===h&&1===m[Rr]||-1===h&&0===m[Rr]);)p[Rr]+=h,m=p,p=p[_n]}const Gt={lFrame:Dn(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function mm(){return Gt.bindingsEnabled}function pa(){return null!==Gt.skipHydrationRootTNode}function Ze(){return Gt.lFrame.lView}function Cn(){return Gt.lFrame.tView}function rf(c){return Gt.lFrame.contextLView=c,c[yn]}function sf(c){return Gt.lFrame.contextLView=null,c}function yr(){let c=af();for(;null!==c&&64===c.type;)c=c.parent;return c}function af(){return Gt.lFrame.currentTNode}function go(c,h){const p=Gt.lFrame;p.currentTNode=c,p.isParent=h}function Ju(){return Gt.lFrame.isParent}function Xu(){Gt.lFrame.isParent=!1}function is(){const c=Gt.lFrame;let h=c.bindingRootIndex;return-1===h&&(h=c.bindingRootIndex=c.tView.bindingStartIndex),h}function Zo(){return Gt.lFrame.bindingIndex}function yl(){return Gt.lFrame.bindingIndex++}function Qo(c){const h=Gt.lFrame,p=h.bindingIndex;return h.bindingIndex=h.bindingIndex+c,p}function w(c,h){const p=Gt.lFrame;p.bindingIndex=p.bindingRootIndex=c,H(h)}function H(c){Gt.lFrame.currentDirectiveIndex=c}function Q(c){const h=Gt.lFrame.currentDirectiveIndex;return-1===h?null:c[h]}function ee(){return Gt.lFrame.currentQueryIndex}function Ae(c){Gt.lFrame.currentQueryIndex=c}function Ie(c){const h=c[dt];return 2===h.type?h.declTNode:1===h.type?c[ri]:null}function pt(c,h,p){if(p&xt.SkipSelf){let v=h,y=c;for(;!(v=v.parent,null!==v||p&xt.Host||(v=Ie(y),null===v||(y=y[qr],10&v.type))););if(null===v)return!1;h=v,c=y}const m=Gt.lFrame=Jn();return m.currentTNode=h,m.lView=c,!0}function Qt(c){const h=Jn(),p=c[dt];Gt.lFrame=h,h.currentTNode=p.firstChild,h.lView=c,h.tView=p,h.contextLView=c,h.bindingIndex=p.bindingStartIndex,h.inI18n=!1}function Jn(){const c=Gt.lFrame,h=null===c?null:c.child;return null===h?Dn(c):h}function Dn(c){const h={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:c,child:null,inI18n:!1};return null!==c&&(c.child=h),h}function mo(){const c=Gt.lFrame;return Gt.lFrame=c.parent,c.currentTNode=null,c.lView=null,c}const Ba=mo;function ga(){const c=mo();c.isParent=!0,c.tView=null,c.selectedIndex=-1,c.contextLView=null,c.elementDepthCount=0,c.currentDirectiveIndex=-1,c.currentNamespace=null,c.bindingRootIndex=-1,c.bindingIndex=-1,c.currentQueryIndex=0}function gi(){return Gt.lFrame.selectedIndex}function ma(c){Gt.lFrame.selectedIndex=c}function Mi(){const c=Gt.lFrame;return vn(c.tView,c.selectedIndex)}let PC=!0;function uf(){return PC}function qo(c){PC=c}function ed(c,h){for(let p=h.directiveStart,m=h.directiveEnd;p=m)break}else h[M]<0&&(c[Er]+=65536),(T>13>16&&(3&c[Ht])===h&&(c[Ht]+=8192,NC(T,y)):NC(T,y)}const Tc=-1;class nd{constructor(h,p,m){this.factory=h,this.resolving=!1,this.canSeeViewProviders=p,this.injectImpl=m}}function ff(c){return c!==Tc}function Cl(c){return 32767&c}function Ic(c,h){let p=function Sm(c){return c>>16}(c),m=h;for(;p>0;)m=m[qr],p--;return m}let pf=!0;function id(c){const h=pf;return pf=c,h}const Dm=255,gf=5;let Aw=0;const Ko={};function mf(c,h){const p=Em(c,h);if(-1!==p)return p;const m=h[dt];m.firstCreatePass&&(c.injectorIndex=h.length,wm(m.data,c),wm(h,null),wm(m.blueprint,null));const v=rd(c,h),y=c.injectorIndex;if(ff(v)){const C=Cl(v),T=Ic(v,h),M=T[dt].data;for(let B=0;B<8;B++)h[y+B]=T[C+B]|M[C+B]}return h[y+8]=v,y}function wm(c,h){c.push(0,0,0,0,0,0,0,0,h)}function Em(c,h){return-1===c.injectorIndex||c.parent&&c.parent.injectorIndex===c.injectorIndex||null===h[c.injectorIndex+8]?-1:c.injectorIndex}function rd(c,h){if(c.parent&&-1!==c.parent.injectorIndex)return c.parent.injectorIndex;let p=0,m=null,v=h;for(;null!==v;){if(m=YC(v),null===m)return Tc;if(p++,v=v[qr],-1!==m.injectorIndex)return m.injectorIndex|p<<16}return Tc}function Tm(c,h,p){!function Mw(c,h,p){let m;"string"==typeof p?m=p.charCodeAt(0)||0:p.hasOwnProperty(xn)&&(m=p[xn]),null==m&&(m=p[xn]=Aw++);const v=m&Dm;h.data[c+(v>>gf)]|=1<=0?h&Dm:Pw:h}(p);if("function"==typeof y){if(!pt(h,c,m))return m&xt.Host?VC(v,0,m):BC(h,p,m,v);try{let C;if(C=y(m),null!=C||m&xt.Optional)return C;mt()}finally{Ba()}}else if("number"==typeof y){let C=null,T=Em(c,h),M=Tc,B=m&xt.Host?h[wn][ri]:null;for((-1===T||m&xt.SkipSelf)&&(M=-1===T?rd(c,h):h[T+8],M!==Tc&&$C(m,!1)?(C=h[dt],T=Cl(M),h=Ic(M,h)):T=-1);-1!==T;){const W=h[dt];if(UC(y,T,W.data)){const X=zC(T,h,p,C,m,B);if(X!==Ko)return X}M=h[T+8],M!==Tc&&$C(m,h[dt].data[T+8]===B)&&UC(y,T,h)?(C=W,T=Cl(M),h=Ic(M,h)):T=-1}}return v}function zC(c,h,p,m,v,y){const C=h[dt],T=C.data[c+8],W=vf(T,C,p,null==m?et(T)&&pf:m!=C&&0!=(3&T.type),v&xt.Host&&y===T);return null!==W?bl(h,C,W,T):Ko}function vf(c,h,p,m,v){const y=c.providerIndexes,C=h.data,T=1048575&y,M=c.directiveStart,W=y>>20,he=v?T+W:c.directiveEnd;for(let Se=m?T:T+W;Se=M&&je.type===p)return Se}if(v){const Se=C[M];if(Se&&qn(Se)&&Se.type===p)return M}return null}function bl(c,h,p,m){let v=c[p];const y=h.data;if(function Sw(c){return c instanceof nd}(v)){const C=v;C.resolving&&function it(c,h){const p=h?`. Dependency path: ${h.join(" > ")} > ${c}`:"";throw new ne(-200,`Circular dependency in DI detected for ${c}${p}`)}(function nt(c){return"function"==typeof c?c.name||c.toString():"object"==typeof c&&null!=c&&"function"==typeof c.type?c.type.name||c.type.toString():Me(c)}(y[p]));const T=id(C.canSeeViewProviders);C.resolving=!0;const B=C.injectImpl?ci(C.injectImpl):null;pt(c,m,xt.Default);try{v=c[p]=C.factory(void 0,y,c,m),h.firstCreatePass&&p>=m.directiveStart&&function Cw(c,h,p){const{ngOnChanges:m,ngOnInit:v,ngDoCheck:y}=h.type.prototype;if(m){const C=ln(h);(p.preOrderHooks??=[]).push(c,C),(p.preOrderCheckHooks??=[]).push(c,C)}v&&(p.preOrderHooks??=[]).push(0-c,v),y&&((p.preOrderHooks??=[]).push(c,y),(p.preOrderCheckHooks??=[]).push(c,y))}(p,y[p],h)}finally{null!==B&&ci(B),id(T),C.resolving=!1,Ba()}}return v}function UC(c,h,p){return!!(p[h+(c>>gf)]&1<{const h=c.prototype.constructor,p=h[Fn]||Im(h),m=Object.prototype;let v=Object.getPrototypeOf(c.prototype).constructor;for(;v&&v!==m;){const y=v[Fn]||Im(v);if(y&&y!==p)return y;v=Object.getPrototypeOf(v)}return y=>new y})}function Im(c){return Re(c)?()=>{const h=Im(Le(c));return h&&h()}:Os(c)}function YC(c){const h=c[dt],p=h.type;return 2===p?h.declTNode:1===p?c[ri]:null}function od(c){return function xw(c,h){if("class"===h)return c.classes;if("style"===h)return c.styles;const p=c.attrs;if(p){const m=p.length;let v=0;for(;v{const m=function Am(c){return function(...p){if(c){const m=c(...p);for(const v in m)this[v]=m[v]}}}(h);function v(...y){if(this instanceof v)return m.apply(this,y),this;const C=new v(...y);return T.annotation=C,T;function T(M,B,W){const X=M.hasOwnProperty(ja)?M[ja]:Object.defineProperty(M,ja,{value:[]})[ja];for(;X.length<=W;)X.push(null);return(X[W]=X[W]||[]).push(C),M}}return p&&(v.prototype=Object.create(p.prototype)),v.prototype.ngMetadataName=c,v.annotationCls=v,v})}const ZC=Function;function Oc(c,h){c.forEach(p=>Array.isArray(p)?Oc(p,h):h(p))}function QC(c,h,p){h>=c.length?c.push(p):c.splice(h,0,p)}function va(c,h){return h>=c.length-1?c.pop():c.splice(h,1)[0]}function Rc(c,h){const p=[];for(let m=0;m=0?c[1|m]=p:(m=~m,function KC(c,h,p,m){let v=c.length;if(v==h)c.push(p,m);else if(1===v)c.push(m,c[0]),c[0]=p;else{for(v--,c.push(c[v-1],c[v]);v>h;)c[v]=c[v-2],v--;c[h]=p,c[h+1]=m}}(c,m,h,p)),m}function Mm(c,h){const p=Pc(c,h);if(p>=0)return c[1|p]}function Pc(c,h){return function za(c,h,p){let m=0,v=c.length>>p;for(;v!==m;){const y=m+(v-m>>1),C=c[y<h?v=y:m=y+1}return~(v<|^->||--!>|)/g,Ci="\u200b$1\u200b";const Of=new Map;let $m=0;const Nf="__ngContext__";function br(c,h){Qn(h)?(c[Nf]=h[Kr],function Ym(c){Of.set(c[Kr],c)}(h)):c[Nf]=h}let Ca;function zc(c,h){return Ca(c,h)}function ko(c){const h=c[_n];return pi(h)?h[_n]:h}function No(c){return Zm(c[As])}function Sd(c){return Zm(c[fi])}function Zm(c){for(;null!==c&&!pi(c);)c=c[fi];return c}function Qs(c,h,p,m,v){if(null!=m){let y,C=!1;pi(m)?y=m:Qn(m)&&(C=!0,m=m[On]);const T=on(m);0===c&&null!==p?null==v?Yf(h,p,T):Ps(h,p,T,v||null,!0):1===c&&null!==p?Ps(h,p,T,v||null,!0):2===c?function xl(c,h,p){const m=Zc(c,h);m&&function Wc(c,h,p,m){c.removeChild(h,p,m)}(c,m,h,p)}(h,T,C):3===c&&h.destroyNode(T),null!=y&&function hb(c,h,p,m,v){const y=p[jn];y!==on(p)&&Qs(h,c,m,y,v);for(let T=Zn;Th.replace(Um,Ci))}(h))}function Uc(c,h,p){return c.createElement(h,p)}function $f(c,h){const p=c[ar],m=p.indexOf(h);ur(h),p.splice(m,1)}function Gc(c,h){if(c.length<=Zn)return;const p=Zn+h,m=c[p];if(m){const v=m[Gs];null!==v&&v!==c&&$f(v,m),h>0&&(c[p-1][fi]=m[fi]);const y=va(c,Zn+h);!function Uf(c,h){Fo(c,h,h[Ft],2,null,null),h[On]=null,h[ri]=null}(m[dt],m);const C=y[$i];null!==C&&C.detachView(y[dt]),m[_n]=null,m[fi]=null,m[Ht]&=-129}return m}function wd(c,h){if(!(256&h[Ht])){const p=h[Ft];h[us]&&gl(h[us]),h[Ys]&&gl(h[Ys]),p.destroyNode&&Fo(c,h,p,3,null,null),function qm(c){let h=c[As];if(!h)return Yc(c[dt],c);for(;h;){let p=null;if(Qn(h))p=h[As];else{const m=h[Zn];m&&(p=m)}if(!p){for(;h&&!h[fi]&&h!==c;)Qn(h)&&Yc(h[dt],h),h=h[_n];null===h&&(h=c),Qn(h)&&Yc(h[dt],h),p=h&&h[fi]}h=p}}(h)}}function Yc(c,h){if(!(256&h[Ht])){h[Ht]&=-129,h[Ht]|=256,function Tl(c,h){let p;if(null!=c&&null!=(p=c.destroyHooks))for(let m=0;m=0?m[C]():m[-C].unsubscribe(),y+=2}else p[y].call(m[p[y+1]]);null!==m&&(h[mr]=null);const v=h[cs];if(null!==v){h[cs]=null;for(let y=0;y-1){const{encapsulation:y}=c.data[m.directiveStart+v];if(y===rt.None||y===rt.Emulated)return null}return vt(m,p)}}(c,h.parent,p)}function Ps(c,h,p,m,v){c.insertBefore(h,p,m,v)}function Yf(c,h,p){c.appendChild(h,p)}function Wf(c,h,p,m,v){null!==m?Ps(c,h,p,m,v):Yf(c,h,p)}function Zc(c,h){return c.parentNode(h)}function Ml(c,h,p){return Jm(c,h,p)}let Ed,Kf,iv,qc,Jm=function Zf(c,h,p){return 40&c.type?vt(c,p):null};function Qc(c,h,p,m){const v=Gi(c,m,h),y=h[Ft],T=Ml(m.parent||h[ri],m,h);if(null!=v)if(Array.isArray(p))for(let M=0;Mc,createScript:c=>c,createScriptURL:c=>c})}catch{}return Kf}()?.createHTML(c)||c}function pb(c){iv=c}function Rl(){if(void 0!==iv)return iv;if(typeof document<"u")return document;throw new ne(210,!1)}function rv(){if(void 0===qc&&(qc=null,bt.trustedTypes))try{qc=bt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:c=>c,createScript:c=>c,createScriptURL:c=>c})}catch{}return qc}function gb(c){return rv()?.createHTML(c)||c}function ep(c){return rv()?.createScriptURL(c)||c}class vb{constructor(h){this.changingThisBreaksApplicationSecurity=h}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${ut})`}}function $a(c){return c instanceof vb?c.changingThisBreaksApplicationSecurity:c}function Pl(c,h){const p=function Cb(c){return c instanceof vb&&c.getTypeName()||null}(c);if(null!=p&&p!==h){if("ResourceURL"===p&&"URL"===h)return!0;throw new Error(`Required a safe ${h}, got a ${p} (see ${ut})`)}return p===h}class iE{constructor(h){this.inertDocumentHelper=h}getInertBodyElement(h){h=""+h;try{const p=(new window.DOMParser).parseFromString(Ol(h),"text/html").body;return null===p?this.inertDocumentHelper.getInertBodyElement(h):(p.removeChild(p.firstChild),p)}catch{return null}}}class Sb{constructor(h){this.defaultDoc=h,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(h){const p=this.inertDocument.createElement("template");return p.innerHTML=Ol(h),p}}const sE=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function sv(c){return(c=String(c)).match(sE)?c:"unsafe:"+c}function Sa(c){const h={};for(const p of c.split(","))h[p]=!0;return h}function Md(...c){const h={};for(const p of c)for(const m in p)p.hasOwnProperty(m)&&(h[m]=!0);return h}const ov=Sa("area,br,col,hr,img,wbr"),tp=Sa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),av=Sa("rp,rt"),lv=Md(ov,Md(tp,Sa("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Md(av,Sa("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Md(av,tp)),np=Sa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),ip=Md(np,Sa("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Sa("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),lE=Sa("script,style,template");class Lo{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(h){let p=h.firstChild,m=!0;for(;p;)if(p.nodeType===Node.ELEMENT_NODE?m=this.startElement(p):p.nodeType===Node.TEXT_NODE?this.chars(p.nodeValue):this.sanitizedSomething=!0,m&&p.firstChild)p=p.firstChild;else for(;p;){p.nodeType===Node.ELEMENT_NODE&&this.endElement(p);let v=this.checkClobberedElement(p,p.nextSibling);if(v){p=v;break}p=this.checkClobberedElement(p,p.parentNode)}return this.buf.join("")}startElement(h){const p=h.nodeName.toLowerCase();if(!lv.hasOwnProperty(p))return this.sanitizedSomething=!0,!lE.hasOwnProperty(p);this.buf.push("<"),this.buf.push(p);const m=h.attributes;for(let v=0;v"),!0}endElement(h){const p=h.nodeName.toLowerCase();lv.hasOwnProperty(p)&&!ov.hasOwnProperty(p)&&(this.buf.push(""))}chars(h){this.buf.push(cv(h))}checkClobberedElement(h,p){if(p&&(h.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${h.outerHTML}`);return p}}const wb=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Eb=/([^\#-~ |!])/g;function cv(c){return c.replace(/&/g,"&").replace(wb,function(h){return"&#"+(1024*(h.charCodeAt(0)-55296)+(h.charCodeAt(1)-56320)+65536)+";"}).replace(Eb,function(h){return"&#"+h.charCodeAt(0)+";"}).replace(//g,">")}let xd;function sp(c){return"content"in c&&function Tb(c){return c.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===c.nodeName}(c)?c.content:null}var Lr=function(c){return c[c.NONE=0]="NONE",c[c.HTML=1]="HTML",c[c.STYLE=2]="STYLE",c[c.SCRIPT=3]="SCRIPT",c[c.URL=4]="URL",c[c.RESOURCE_URL=5]="RESOURCE_URL",c}(Lr||{});function uv(c){const h=Kc();return h?gb(h.sanitize(Lr.HTML,c)||""):Pl(c,"HTML")?gb($a(c)):function rp(c,h){let p=null;try{xd=xd||function bb(c){const h=new Sb(c);return function rE(){try{return!!(new window.DOMParser).parseFromString(Ol(""),"text/html")}catch{return!1}}()?new iE(h):h}(c);let m=h?String(h):"";p=xd.getInertBodyElement(m);let v=5,y=m;do{if(0===v)throw new Error("Failed to sanitize html because the input is unstable");v--,m=y,y=p.innerHTML,p=xd.getInertBodyElement(m)}while(m!==y);return Ol((new Lo).sanitizeChildren(sp(p)||p))}finally{if(p){const m=sp(p)||p;for(;m.firstChild;)m.removeChild(m.firstChild)}}}(Rl(),Me(c))}function op(c){const h=Kc();return h?h.sanitize(Lr.URL,c)||"":Pl(c,"URL")?$a(c):sv(Me(c))}function dv(c){const h=Kc();if(h)return ep(h.sanitize(Lr.RESOURCE_URL,c)||"");if(Pl(c,"ResourceURL"))return ep($a(c));throw new ne(904,!1)}function hv(c,h,p){return function Ob(c,h){return"src"===h&&("embed"===c||"frame"===c||"iframe"===c||"media"===c||"script"===c)||"href"===h&&("base"===c||"link"===c)?dv:op}(h,p)(c)}function Kc(){const c=Ze();return c&&c[vr].sanitizer}const Ga=new yt("ENVIRONMENT_INITIALIZER"),ap=new yt("INJECTOR",-1),Rb=new yt("INJECTOR_DEF_TYPES");class fv{get(h,p=Bi){if(p===Bi){const m=new Error(`NullInjectorError: No provider for ${ye(h)}!`);throw m.name="NullInjectorError",m}return p}}function pv(c){return{\u0275providers:c}}function Pb(...c){return{\u0275providers:kb(0,c),\u0275fromNgModule:!0}}function kb(c,...h){const p=[],m=new Set;let v;const y=C=>{p.push(C)};return Oc(h,C=>{const T=C;Rd(T,y,[],m)&&(v||=[],v.push(T))}),void 0!==v&&Od(v,y),p}function Od(c,h){for(let p=0;p{h(y,m)})}}function Rd(c,h,p,m){if(!(c=Le(c)))return!1;let v=null,y=xi(c);const C=!y&&Zt(c);if(y||C){if(C&&!C.standalone)return!1;v=c}else{const M=c.ngModule;if(y=xi(M),!y)return!1;v=M}const T=m.has(v);if(C){if(T)return!1;if(m.add(v),C.dependencies){const M="function"==typeof C.dependencies?C.dependencies():C.dependencies;for(const B of M)Rd(B,h,p,m)}}else{if(!y)return!1;{if(null!=y.imports&&!T){let B;m.add(v);try{Oc(y.imports,W=>{Rd(W,h,p,m)&&(B||=[],B.push(W))})}finally{}void 0!==B&&Od(B,h)}if(!T){const B=Os(v)||(()=>new v);h({provide:v,useFactory:B,deps:ht},v),h({provide:Rb,useValue:v,multi:!0},v),h({provide:Ga,useValue:()=>Mt(v),multi:!0},v)}const M=y.providers;if(null!=M&&!T){const B=c;Jc(M,W=>{h(W,B)})}}}return v!==c&&void 0!==c.providers}function Jc(c,h){for(let p of c)at(p)&&(p=p.\u0275providers),Array.isArray(p)?Jc(p,h):h(p)}const hE=ae({provide:String,useValue:ae});function lp(c){return null!==c&&"object"==typeof c&&hE in c}function Ya(c){return"function"==typeof c}const gv=new yt("Set Injector scope."),ks={},fE={};let mv;function Pd(){return void 0===mv&&(mv=new fv),mv}class Jo{}class Xc extends Jo{get destroyed(){return this._destroyed}constructor(h,p,m,v){super(),this.parent=p,this.source=m,this.scopes=v,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Xo(h,C=>this.processProvider(C)),this.records.set(ap,kl(void 0,this)),v.has("environment")&&this.records.set(Jo,kl(void 0,this));const y=this.records.get(gv);null!=y&&"string"==typeof y.value&&this.scopes.add(y.value),this.injectorDefTypes=new Set(this.get(Rb.multi,ht,xt.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const p of this._ngOnDestroyHooks)p.ngOnDestroy();const h=this._onDestroyHooks;this._onDestroyHooks=[];for(const p of h)p()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear()}}onDestroy(h){return this.assertNotDestroyed(),this._onDestroyHooks.push(h),()=>this.removeOnDestroy(h)}runInContext(h){this.assertNotDestroyed();const p=lt(this),m=ci(void 0);try{return h()}finally{lt(p),ci(m)}}get(h,p=Bi,m=xt.Default){if(this.assertNotDestroyed(),h.hasOwnProperty(Wt))return h[Wt](this);m=Gn(m);const y=lt(this),C=ci(void 0);try{if(!(m&xt.SkipSelf)){let M=this.records.get(h);if(void 0===M){const B=function kd(c){return"function"==typeof c||"object"==typeof c&&c instanceof yt}(h)&&li(h);M=B&&this.injectableDefInScope(B)?kl(vv(h),ks):null,this.records.set(h,M)}if(null!=M)return this.hydrate(h,M)}return(m&xt.Self?Pd():this.parent).get(h,p=m&xt.Optional&&p===Bi?null:p)}catch(T){if("NullInjectorError"===T.name){if((T[Hi]=T[Hi]||[]).unshift(ye(h)),y)throw T;return function ue(c,h,p,m){const v=c[Hi];throw h[ie]&&v.unshift(h[ie]),c.message=function ze(c,h,p,m=null){c=c&&"\n"===c.charAt(0)&&"\u0275"==c.charAt(1)?c.slice(2):c;let v=ye(h);if(Array.isArray(h))v=h.map(ye).join(" -> ");else if("object"==typeof h){let y=[];for(let C in h)if(h.hasOwnProperty(C)){let T=h[C];y.push(C+":"+("string"==typeof T?JSON.stringify(T):ye(T)))}v=`{${y.join(", ")}}`}return`${p}${m?"("+m+")":""}[${v}]: ${c.replace(Be,"\n ")}`}("\n"+c.message,v,p,m),c.ngTokenPath=v,c[Hi]=null,c}(T,h,"R3InjectorError",this.source)}throw T}finally{ci(C),lt(y)}}resolveInjectorInitializers(){const h=lt(this),p=ci(void 0);try{const v=this.get(Ga.multi,ht,xt.Self);for(const y of v)y()}finally{lt(h),ci(p)}}toString(){const h=[],p=this.records;for(const m of p.keys())h.push(ye(m));return`R3Injector[${h.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new ne(205,!1)}processProvider(h){let p=Ya(h=Le(h))?h:Le(h&&h.provide);const m=function Vb(c){return lp(c)?kl(void 0,c.useValue):kl(_v(c),ks)}(h);if(Ya(h)||!0!==h.multi)this.records.get(p);else{let v=this.records.get(p);v||(v=kl(void 0,ks,!0),v.factory=()=>ji(v.multi),this.records.set(p,v)),p=h,v.multi.push(h)}this.records.set(p,m)}hydrate(h,p){return p.value===ks&&(p.value=fE,p.value=p.factory()),"object"==typeof p.value&&p.value&&function _o(c){return null!==c&&"object"==typeof c&&"function"==typeof c.ngOnDestroy}(p.value)&&this._ngOnDestroyHooks.add(p.value),p.value}injectableDefInScope(h){if(!h.providedIn)return!1;const p=Le(h.providedIn);return"string"==typeof p?"any"===p||this.scopes.has(p):this.injectorDefTypes.has(p)}removeOnDestroy(h){const p=this._onDestroyHooks.indexOf(h);-1!==p&&this._onDestroyHooks.splice(p,1)}}function vv(c){const h=li(c),p=null!==h?h.factory:Os(c);if(null!==p)return p;if(c instanceof yt)throw new ne(204,!1);if(c instanceof Function)return function Lb(c){const h=c.length;if(h>0)throw Rc(h,"?"),new ne(204,!1);const p=function Vi(c){return c&&(c[fr]||c[ir])||null}(c);return null!==p?()=>p.factory(c):()=>new c}(c);throw new ne(204,!1)}function _v(c,h,p){let m;if(Ya(c)){const v=Le(c);return Os(v)||vv(v)}if(lp(c))m=()=>Le(c.useValue);else if(function cp(c){return!(!c||!c.useFactory)}(c))m=()=>c.useFactory(...ji(c.deps||[]));else if(function Nb(c){return!(!c||!c.useExisting)}(c))m=()=>Mt(Le(c.useExisting));else{const v=Le(c&&(c.useClass||c.provide));if(!function Bb(c){return!!c.deps}(c))return Os(v)||vv(v);m=()=>new v(...ji(c.deps))}return m}function kl(c,h,p=!1){return{factory:c,value:h,multi:p?[]:void 0}}function Xo(c,h){for(const p of c)Array.isArray(p)?Xo(p,h):p&&at(p)?Xo(p.\u0275providers,h):h(p)}const yv=new yt("AppId",{providedIn:"root",factory:()=>Hb}),Hb="ng",Cv=new yt("Platform Initializer"),up=new yt("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),jb=new yt("AnimationModuleType"),bv=new yt("CSP nonce",{providedIn:"root",factory:()=>Rl().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let Sv=(c,h,p)=>null;function mp(c,h,p=!1){return Sv(c,h,p)}class yE{}class qb{}class Kb{resolveComponentFactory(h){throw function CE(c){const h=Error(`No component factory found for ${ye(c)}.`);return h.ngComponent=c,h}(h)}}let nu=(()=>{class c{static#e=this.NULL=new Kb}return c})();function Jb(){return Vl(yr(),Ze())}function Vl(c,h){return new iu(vt(c,h))}let iu=(()=>{class c{constructor(p){this.nativeElement=p}static#e=this.__NG_ELEMENT_ID__=Jb}return c})();function Xb(c){return c instanceof iu?c.nativeElement:c}class Iv{}let e0=(()=>{class c{constructor(){this.destroyNode=null}static#e=this.__NG_ELEMENT_ID__=()=>function t0(){const c=Ze(),p=yi(yr().index,c);return(Qn(p)?p:c)[Ft]}()}return c})(),n0=(()=>{class c{static#e=this.\u0275prov=Ut({token:c,providedIn:"root",factory:()=>null})}return c})();class Av{constructor(h){this.full=h,this.major=h.split(".")[0],this.minor=h.split(".")[1],this.patch=h.split(".").slice(2).join(".")}}const SE=new Av("16.2.12"),Mv={};function a0(c,h=null,p=null,m){const v=Ov(c,h,p,m);return v.resolveInjectorInitializers(),v}function Ov(c,h=null,p=null,m,v=new Set){const y=[p||ht,Pb(c)];return m=m||("object"==typeof c?void 0:ye(c)),new Xc(y,h||Pd(),m||null,v)}let yo=(()=>{class c{static#e=this.THROW_IF_NOT_FOUND=Bi;static#t=this.NULL=new fv;static create(p,m){if(Array.isArray(p))return a0({name:""},m,p,"");{const v=p.name??"";return a0({name:v},p.parent,p.providers,v)}}static#n=this.\u0275prov=Ut({token:c,providedIn:"any",factory:()=>Mt(ap)});static#i=this.__NG_ELEMENT_ID__=-1}return c})();function Pv(c){return c.ngOriginalError}class Da{constructor(){this._console=console}handleError(h){const p=this._findOriginalError(h);this._console.error("ERROR",h),p&&this._console.error("ORIGINAL ERROR",p)}_findOriginalError(h){let p=h&&Pv(h);for(;p&&Pv(p);)p=Pv(p);return p||null}}function yp(c){return h=>{setTimeout(c,void 0,h)}}const Vo=class c0 extends l.x{constructor(h=!1){super(),this.__isAsync=h}emit(h){super.next(h)}subscribe(h,p,m){let v=h,y=p||(()=>null),C=m;if(h&&"object"==typeof h){const M=h;v=M.next?.bind(M),y=M.error?.bind(M),C=M.complete?.bind(M)}this.__isAsync&&(y=yp(y),v&&(v=yp(v)),C&&(C=yp(C)));const T=super.subscribe({next:v,error:y,complete:C});return h instanceof k.w0&&h.add(T),T}};function kv(...c){}class Tr{constructor({enableLongStackTrace:h=!1,shouldCoalesceEventChangeDetection:p=!1,shouldCoalesceRunChangeDetection:m=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Vo(!1),this.onMicrotaskEmpty=new Vo(!1),this.onStable=new Vo(!1),this.onError=new Vo(!1),typeof Zone>"u")throw new ne(908,!1);Zone.assertZonePatched();const v=this;v._nesting=0,v._outer=v._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(v._inner=v._inner.fork(new Zone.TaskTrackingZoneSpec)),h&&Zone.longStackTraceZoneSpec&&(v._inner=v._inner.fork(Zone.longStackTraceZoneSpec)),v.shouldCoalesceEventChangeDetection=!m&&p,v.shouldCoalesceRunChangeDetection=m,v.lastRequestAnimationFrameId=-1,v.nativeRequestAnimationFrame=function ME(){const c="function"==typeof bt.requestAnimationFrame;let h=bt[c?"requestAnimationFrame":"setTimeout"],p=bt[c?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&h&&p){const m=h[Zone.__symbol__("OriginalDelegate")];m&&(h=m);const v=p[Zone.__symbol__("OriginalDelegate")];v&&(p=v)}return{nativeRequestAnimationFrame:h,nativeCancelAnimationFrame:p}}().nativeRequestAnimationFrame,function RE(c){const h=()=>{!function OE(c){c.isCheckStableRunning||-1!==c.lastRequestAnimationFrameId||(c.lastRequestAnimationFrameId=c.nativeRequestAnimationFrame.call(bt,()=>{c.fakeTopEventTask||(c.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{c.lastRequestAnimationFrameId=-1,Fv(c),c.isCheckStableRunning=!0,Nv(c),c.isCheckStableRunning=!1},void 0,()=>{},()=>{})),c.fakeTopEventTask.invoke()}),Fv(c))}(c)};c._inner=c._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(p,m,v,y,C,T)=>{if(function d0(c){return!(!Array.isArray(c)||1!==c.length)&&!0===c[0].data?.__ignore_ng_zone__}(T))return p.invokeTask(v,y,C,T);try{return Lv(c),p.invokeTask(v,y,C,T)}finally{(c.shouldCoalesceEventChangeDetection&&"eventTask"===y.type||c.shouldCoalesceRunChangeDetection)&&h(),Vv(c)}},onInvoke:(p,m,v,y,C,T,M)=>{try{return Lv(c),p.invoke(v,y,C,T,M)}finally{c.shouldCoalesceRunChangeDetection&&h(),Vv(c)}},onHasTask:(p,m,v,y)=>{p.hasTask(v,y),m===v&&("microTask"==y.change?(c._hasPendingMicrotasks=y.microTask,Fv(c),Nv(c)):"macroTask"==y.change&&(c.hasPendingMacrotasks=y.macroTask))},onHandleError:(p,m,v,y)=>(p.handleError(v,y),c.runOutsideAngular(()=>c.onError.emit(y)),!1)})}(v)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Tr.isInAngularZone())throw new ne(909,!1)}static assertNotInAngularZone(){if(Tr.isInAngularZone())throw new ne(909,!1)}run(h,p,m){return this._inner.run(h,p,m)}runTask(h,p,m,v){const y=this._inner,C=y.scheduleEventTask("NgZoneEvent: "+v,h,xE,kv,kv);try{return y.runTask(C,p,m)}finally{y.cancelTask(C)}}runGuarded(h,p,m){return this._inner.runGuarded(h,p,m)}runOutsideAngular(h){return this._outer.run(h)}}const xE={};function Nv(c){if(0==c._nesting&&!c.hasPendingMicrotasks&&!c.isStable)try{c._nesting++,c.onMicrotaskEmpty.emit(null)}finally{if(c._nesting--,!c.hasPendingMicrotasks)try{c.runOutsideAngular(()=>c.onStable.emit(null))}finally{c.isStable=!0}}}function Fv(c){c.hasPendingMicrotasks=!!(c._hasPendingMicrotasks||(c.shouldCoalesceEventChangeDetection||c.shouldCoalesceRunChangeDetection)&&-1!==c.lastRequestAnimationFrameId)}function Lv(c){c._nesting++,c.isStable&&(c.isStable=!1,c.onUnstable.emit(null))}function Vv(c){c._nesting--,Nv(c)}class u0{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Vo,this.onMicrotaskEmpty=new Vo,this.onStable=new Vo,this.onError=new Vo}run(h,p,m){return h.apply(p,m)}runGuarded(h,p,m){return h.apply(p,m)}runOutsideAngular(h){return h()}runTask(h,p,m,v){return h.apply(p,m)}}const Bv=new yt("",{providedIn:"root",factory:Hv});function Hv(){const c=Ot(Tr);let h=!0;const p=new de.y(v=>{h=c.isStable&&!c.hasPendingMacrotasks&&!c.hasPendingMicrotasks,c.runOutsideAngular(()=>{v.next(h),v.complete()})}),m=new de.y(v=>{let y;c.runOutsideAngular(()=>{y=c.onStable.subscribe(()=>{Tr.assertNotInAngularZone(),queueMicrotask(()=>{!h&&!c.hasPendingMacrotasks&&!c.hasPendingMicrotasks&&(h=!0,v.next(!0))})})});const C=c.onUnstable.subscribe(()=>{Tr.assertInAngularZone(),h&&(h=!1,c.runOutsideAngular(()=>{v.next(!1)}))});return()=>{y.unsubscribe(),C.unsubscribe()}});return(0,re.T)(p,m.pipe((0,ve.B)()))}function jv(c){return c.ownerDocument.defaultView}function zv(c){return c.ownerDocument}function ea(c){return c instanceof Function?c():c}let Cp=(()=>{class c{constructor(){this.renderDepth=0,this.handler=null}begin(){this.handler?.validateBegin(),this.renderDepth++}end(){this.renderDepth--,0===this.renderDepth&&this.handler?.execute()}ngOnDestroy(){this.handler?.destroy(),this.handler=null}static#e=this.\u0275prov=Ut({token:c,providedIn:"root",factory:()=>new c})}return c})();function ru(c){for(;c;){c[Ht]|=64;const h=ko(c);if(ki(c)&&!h)return c;c=h}return null}const g0=new yt("",{providedIn:"root",factory:()=>!1});let bp=null;function _0(c,h){return c[h]??b0()}function y0(c,h){const p=b0();p.producerNode?.length&&(c[h]=bp,p.lView=c,bp=C0())}const HE={...Yo,consumerIsAlwaysLive:!0,consumerMarkedDirty:c=>{ru(c.lView)},lView:null};function C0(){return Object.create(HE)}function b0(){return bp??=C0(),bp}const rn={};function Wv(c){Zv(Cn(),Ze(),gi()+c,!1)}function Zv(c,h,p,m){if(!m)if(3==(3&h[Ht])){const y=c.preOrderCheckHooks;null!==y&&df(h,y,p)}else{const y=c.preOrderHooks;null!==y&&td(h,y,0,p)}ma(p)}function jl(c,h=xt.Default){const p=Ze();return null===p?Mt(c,h):HC(yr(),p,Le(c),h)}function Qv(){throw new Error("invalid")}function zd(c,h,p,m,v,y,C,T,M,B,W){const X=h.blueprint.slice();return X[On]=v,X[Ht]=140|m,(null!==B||c&&2048&c[Ht])&&(X[Ht]|=2048),Qu(X),X[_n]=X[qr]=c,X[yn]=p,X[vr]=C||c&&c[vr],X[Ft]=T||c&&c[Ft],X[Qr]=M||c&&c[Qr]||null,X[ri]=y,X[Kr]=function Gm(){return $m++}(),X[_r]=W,X[Ra]=B,X[wn]=2==h.type?c[wn]:X,X}function zl(c,h,p,m,v){let y=c.data[h];if(null===y)y=function Sp(c,h,p,m,v){const y=af(),C=Ju(),M=c.data[h]=function YE(c,h,p,m,v,y){let C=h?h.injectorIndex:-1,T=0;return pa()&&(T|=128),{type:p,index:m,insertBeforeIndex:null,injectorIndex:C,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:T,providerIndexes:0,value:v,attrs:y,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:h,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,C?y:y&&y.parent,p,h,m,v);return null===c.firstChild&&(c.firstChild=M),null!==y&&(C?null==y.child&&null!==M.parent&&(y.child=M):null===y.next&&(y.next=M,M.prev=y)),M}(c,h,p,m,v),function I(){return Gt.lFrame.inI18n}()&&(y.flags|=32);else if(64&y.type){y.type=p,y.value=m,y.attrs=v;const C=function _l(){const c=Gt.lFrame,h=c.currentTNode;return c.isParent?h:h.parent}();y.injectorIndex=null===C?-1:C.injectorIndex}return go(y,!0),y}function su(c,h,p,m){if(0===p)return-1;const v=h.length;for(let y=0;yzt&&Zv(c,h,zt,!1),Fi(T?2:0,v);const B=T?y:null,W=fa(B);try{null!==B&&(B.dirty=!1),p(m,v)}finally{Na(B,W)}}finally{T&&null===h[us]&&y0(h,us),ma(C),Fi(T?3:1,v)}}function Dp(c,h,p){if(Ms(h)){const m=Ji(null);try{const y=h.directiveEnd;for(let C=h.directiveStart;Cnull;function E0(c,h,p,m){for(let v in c)if(c.hasOwnProperty(v)){p=null===p?{}:p;const y=c[v];null===m?Jv(p,h,v,y):m.hasOwnProperty(v)&&Jv(p,h,m[v],y)}return p}function Jv(c,h,p,m){c.hasOwnProperty(p)?c[p].push(h,m):c[p]=[h,m]}function Ns(c,h,p,m,v,y,C,T){const M=vt(h,p);let W,B=h.inputs;!T&&null!=B&&(W=B[m])?(Op(c,p,W,m,v),et(h)&&function A0(c,h){const p=yi(h,c);16&p[Ht]||(p[Ht]|=64)}(p,h.index)):3&h.type&&(m=function I0(c){return"class"===c?"className":"for"===c?"htmlFor":"formaction"===c?"formAction":"innerHtml"===c?"innerHTML":"readonly"===c?"readOnly":"tabindex"===c?"tabIndex":c}(m),v=null!=C?C(v,h.value||"",m):v,y.setProperty(M,m,v))}function Ip(c,h,p,m){if(mm()){const v=null===m?null:{"":-1},y=function k0(c,h){const p=c.directiveRegistry;let m=null,v=null;if(p)for(let y=0;y0;){const p=c[--h];if("number"==typeof p&&p<0)return p}return 0})(C)!=T&&C.push(T),C.push(p,m,y)}}(c,h,m,su(c,p,v.hostVars,rn),v)}function Bo(c,h,p,m,v,y){const C=vt(c,h);!function Mp(c,h,p,m,v,y,C){if(null==y)c.removeAttribute(h,v,p);else{const T=null==C?Me(y):C(y,m||"",v);c.setAttribute(h,v,T,p)}}(h[Ft],C,y,c.value,p,m,v)}function H0(c,h,p,m,v,y){const C=y[h];if(null!==C)for(let T=0;T{class c{constructor(){this.all=new Set,this.queue=new Map}create(p,m,v){const y=typeof Zone>"u"?null:Zone.current,C=function Ee(c,h,p){const m=Object.create(ft);p&&(m.consumerAllowSignalWrites=!0),m.fn=c,m.schedule=h;const v=C=>{m.cleanupFn=C};return m.ref={notify:()=>Wo(m),run:()=>{if(m.dirty=!1,m.hasRun&&!pl(m))return;m.hasRun=!0;const C=fa(m);try{m.cleanupFn(),m.cleanupFn=Ue,m.fn(v)}finally{Na(m,C)}},cleanup:()=>m.cleanupFn()},m.ref}(p,B=>{this.all.has(B)&&this.queue.set(B,y)},v);let T;this.all.add(C),C.notify();const M=()=>{C.cleanup(),T?.(),this.all.delete(C),this.queue.delete(C)};return T=m?.onDestroy(M),{destroy:M}}flush(){if(0!==this.queue.size)for(const[p,m]of this.queue)this.queue.delete(p),m?m.run(()=>p.run()):p.run()}get isQueueEmpty(){return 0===this.queue.size}static#e=this.\u0275prov=Ut({token:c,providedIn:"root",factory:()=>new c})}return c})();function $d(c,h,p){let m=p?c.styles:null,v=p?c.classes:null,y=0;if(null!==h)for(let C=0;C0){h_(c,1);const v=p.components;null!==v&&p_(c,v,1)}}function p_(c,h,p){for(let m=0;m-1&&(Gc(h,m),va(p,m))}this._attachedToViewContainer=!1}wd(this._lView[dt],this._lView)}onDestroy(h){!function Va(c,h){if(256==(256&c[Ht]))throw new ne(911,!1);null===c[cs]&&(c[cs]=[]),c[cs].push(h)}(this._lView,h)}markForCheck(){ru(this._cdRefInjectingView||this._lView)}detach(){this._lView[Ht]&=-129}reattach(){this._lView[Ht]|=128}detectChanges(){Gd(this._lView[dt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ne(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Qm(c,h){Fo(c,h,h[Ft],2,null,null)}(this._lView[dt],this._lView)}attachToAppRef(h){if(this._attachedToViewContainer)throw new ne(902,!1);this._appRef=h}}class Z0 extends au{constructor(h){super(h),this._view=h}detectChanges(){const h=this._view;Gd(h[dt],h,h[yn],!1)}checkNoChanges(){}get context(){return null}}class g_ extends nu{constructor(h){super(),this.ngModule=h}resolveComponentFactory(h){const p=Zt(h);return new lu(p,this.ngModule)}}function m_(c){const h=[];for(let p in c)c.hasOwnProperty(p)&&h.push({propName:c[p],templateName:p});return h}class q0{constructor(h,p){this.injector=h,this.parentInjector=p}get(h,p,m){m=Gn(m);const v=this.injector.get(h,Mv,m);return v!==Mv||p===Mv?v:this.parentInjector.get(h,p,m)}}class lu extends qb{get inputs(){const h=this.componentDef,p=h.inputTransforms,m=m_(h.inputs);if(null!==p)for(const v of m)p.hasOwnProperty(v.propName)&&(v.transform=p[v.propName]);return m}get outputs(){return m_(this.componentDef.outputs)}constructor(h,p){super(),this.componentDef=h,this.ngModule=p,this.componentType=h.type,this.selector=function Ki(c){return c.map(Jt).join(",")}(h.selectors),this.ngContentSelectors=h.ngContentSelectors?h.ngContentSelectors:[],this.isBoundToModule=!!p}create(h,p,m,v){let y=(v=v||this.ngModule)instanceof Jo?v:v?.injector;y&&null!==this.componentDef.getStandaloneInjector&&(y=this.componentDef.getStandaloneInjector(y)||y);const C=y?new q0(h,y):h,T=C.get(Iv,null);if(null===T)throw new ne(407,!1);const X={rendererFactory:T,sanitizer:C.get(n0,null),effectManager:C.get(c_,null),afterRenderEventManager:C.get(Cp,null)},he=T.createRenderer(null,this.componentDef),Se=this.componentDef.selectors[0][0]||"div",je=m?function jE(c,h,p,m){const y=m.get(g0,!1)||p===rt.ShadowDom,C=c.selectRootElement(h,y);return function zE(c){w0(c)}(C),C}(he,m,this.componentDef.encapsulation,C):Uc(he,Se,function Q0(c){const h=c.toLowerCase();return"svg"===h?"svg":"math"===h?"math":null}(Se)),Pt=this.componentDef.signals?4608:this.componentDef.onPush?576:528;let Qe=null;null!==je&&(Qe=mp(je,C,!0));const Xt=Tp(0,null,null,1,0,null,null,null,null,null,null),gn=zd(null,Xt,null,Pt,null,null,X,he,C,null,Qe);let ai,ro;Qt(gn);try{const dl=this.componentDef;let tf,vw=null;dl.findHostDirectiveDefs?(tf=[],vw=new Map,dl.findHostDirectiveDefs(dl,tf,vw),tf.push(dl)):tf=[dl];const aI=function J0(c,h){const p=c[dt],m=zt;return c[m]=h,zl(p,m,2,"#host",null)}(gn,je),lI=function X0(c,h,p,m,v,y,C){const T=v[dt];!function eS(c,h,p,m){for(const v of c)h.mergedAttrs=Wn(h.mergedAttrs,v.hostAttrs);null!==h.mergedAttrs&&($d(h,h.mergedAttrs,!0),null!==p&&nv(m,p,h))}(m,c,h,C);let M=null;null!==h&&(M=mp(h,v[Qr]));const B=y.rendererFactory.createRenderer(h,p);let W=16;p.signals?W=4096:p.onPush&&(W=64);const X=zd(v,Kv(p),null,W,v[c.index],c,y,B,null,null,M);return T.firstCreatePass&&Ap(T,c,m.length-1),Ud(v,X),v[c.index]=X}(aI,je,dl,tf,gn,X,he);ro=vn(Xt,zt),je&&function nS(c,h,p,m){if(m)zi(c,p,["ng-version",SE.full]);else{const{attrs:v,classes:y}=function Yr(c){const h=[],p=[];let m=1,v=2;for(;m0&&fb(c,p,y.join(" "))}}(he,dl,je,m),void 0!==p&&function iS(c,h,p){const m=c.projection=[];for(let v=0;v=0;m--){const v=c[m];v.hostVars=h+=v.hostVars,v.hostAttrs=Wn(v.hostAttrs,p=Wn(p,v.hostAttrs))}}(m)}function Yd(c){return c===Kt?{}:c===ht?[]:c}function oS(c,h){const p=c.viewQuery;c.viewQuery=p?(m,v)=>{h(m,v),p(m,v)}:h}function aS(c,h){const p=c.contentQueries;c.contentQueries=p?(m,v,y)=>{h(m,v,y),p(m,v,y)}:h}function lS(c,h){const p=c.hostBindings;c.hostBindings=p?(m,v)=>{h(m,v),p(m,v)}:h}function __(c){return h=>{h.findHostDirectiveDefs=y_,h.hostDirectives=(Array.isArray(c)?c:c()).map(p=>"function"==typeof p?{directive:Le(p),inputs:Kt,outputs:Kt}:{directive:Le(p.directive),inputs:C_(p.inputs),outputs:C_(p.outputs)})}}function y_(c,h,p){if(null!==c.hostDirectives)for(const m of c.hostDirectives){const v=In(m.directive);hS(v.declaredInputs,m.inputs),y_(v,h,p),p.set(v,m),h.push(v)}}function C_(c){if(void 0===c||0===c.length)return Kt;const h={};for(let p=0;p(qo(!0),Uc(m,v,function cf(){return Gt.lFrame.currentNamespace}()));function wa(c,h,p){const m=Ze(),v=Cn(),y=c+zt,C=v.firstCreatePass?function kn(c,h,p,m,v){const y=h.consts,C=hs(y,m),T=zl(h,c,8,"ng-container",C);return null!==C&&$d(T,C,!0),Ip(h,p,T,hs(y,v)),null!==h.queries&&h.queries.elementStart(h,T),T}(y,v,m,h,p):v.data[y];go(C,!0);const T=Br(v,m,C,c);return m[y]=T,uf()&&Qc(v,m,T,C),br(T,m),fn(C)&&(wp(v,m,C),Dp(v,C,m)),null!=p&&Ep(m,C),wa}function Sr(){let c=yr();const h=Cn();return Ju()?Xu():(c=c.parent,go(c,!1)),h.firstCreatePass&&(ed(h,c),Ms(c)&&h.queries.elementEnd(c)),Sr}function Gp(c,h,p){return wa(c,h,p),Sr(),Gp}let Br=(c,h,p,m)=>(qo(!0),Dd(h[Ft],""));function Yp(){return Ze()}function Co(c){return!!c&&"function"==typeof c.then}function Ks(c){return!!c&&"function"==typeof c.subscribe}function Wp(c,h,p,m){const v=Ze(),y=Cn(),C=yr();return pn(y,v,v[Ft],C,c,h,m),Wp}function Zp(c,h){const p=yr(),m=Ze(),v=Cn();return pn(v,m,o_(Q(v.data),p,m),p,c,h),Zp}function pn(c,h,p,m,v,y,C){const T=fn(m),B=c.firstCreatePass&&s_(c),W=h[yn],X=r_(h);let he=!0;if(3&m.type||C){const tt=vt(m,h),gt=C?C(tt):tt,Pt=X.length,Qe=C?gn=>C(on(gn[m.index])):m.index;let Xt=null;if(!C&&T&&(Xt=function Qp(c,h,p,m){const v=c.cleanup;if(null!=v)for(let y=0;yM?T[M]:null}"string"==typeof C&&(y+=2)}return null}(c,h,v,m.index)),null!==Xt)(Xt.__ngLastListenerFn__||Xt).__ngNextListenerFn__=y,Xt.__ngLastListenerFn__=y,he=!1;else{y=B_(m,h,W,y,!1);const gn=p.listen(gt,v,y);X.push(y,gn),B&&B.push(v,Qe,Pt,Pt+1)}}else y=B_(m,h,W,y,!1);const Se=m.outputs;let je;if(he&&null!==Se&&(je=Se[v])){const tt=je.length;if(tt)for(let gt=0;gt-1?yi(c.index,h):h);let M=Jl(h,p,m,C),B=y.__ngNextListenerFn__;for(;B;)M=Jl(h,p,B,C)&&M,B=B.__ngNextListenerFn__;return v&&!1===M&&C.preventDefault(),M}}function H_(c=1){return function Ec(c){return(Gt.lFrame.contextLView=function Ha(c,h){for(;c>0;)h=h[qr],c--;return h}(c,Gt.lFrame.contextLView))[yn]}(c)}function j_(c,h){let p=null;const m=function da(c){const h=c.attrs;if(null!=h){const p=h.indexOf(5);if(!(1&p))return h[p+1]}return null}(c);for(let v=0;v>17&32767}function ng(c){return 2|c}function qa(c){return(131068&c)>>2}function ig(c,h){return-131069&c|h<<2}function $_(c){return 1|c}function Fs(c,h,p,m,v){const y=c[p+1],C=null===h;let T=m?Js(y):qa(y),M=!1;for(;0!==T&&(!1===M||C);){const W=c[T+1];rg(c[T],h)&&(M=!0,c[T+1]=m?$_(W):ng(W)),T=m?Js(W):qa(W)}M&&(c[p+1]=m?ng(y):$_(y))}function rg(c,h){return null===c||null==h||(Array.isArray(c)?c[1]:c)===h||!(!Array.isArray(c)||"string"!=typeof h)&&Pc(c,h)>=0}const hr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function mi(c){return c.substring(hr.key,hr.keyEnd)}function sg(c,h){const p=hr.textEnd;return p===h?-1:(h=hr.keyEnd=function o1(c,h,p){for(;h32;)h++;return h}(c,hr.key=h,p),Ls(c,h,p))}function Ls(c,h,p){for(;h=0;p=sg(h,p))gs(c,mi(h),!0)}function eo(c,h,p,m){const v=Ze(),y=Cn(),C=Qo(2);y.firstUpdatePass&&bo(y,c,C,m),h!==rn&&Vr(v,C,h)&&jo(y,y.data[gi()],v,v[Ft],c,v[C+1]=function l1(c,h){return null==c||""===c||("string"==typeof h?c+=h:"object"==typeof c&&(c=ye($a(c)))),c}(h,p),m,C)}function vs(c,h){return h>=c.expandoStartIndex}function bo(c,h,p,m){const v=c.data;if(null===v[p+1]){const y=v[gi()],C=vs(c,p);zS(y,m)&&null===h&&!C&&(h=!1),h=function jS(c,h,p,m){const v=Q(c);let y=m?h.residualClasses:h.residualStyles;if(null===v)0===(m?h.classBindings:h.styleBindings)&&(p=mu(p=nc(null,c,h,p,m),h.attrs,m),y=null);else{const C=h.directiveStylingLast;if(-1===C||c[C]!==v)if(p=nc(v,c,h,p,m),null===y){let M=function G_(c,h,p){const m=p?h.classBindings:h.styleBindings;if(0!==qa(m))return c[Js(m)]}(c,h,m);void 0!==M&&Array.isArray(M)&&(M=nc(null,c,h,M[1],m),M=mu(M,h.attrs,m),function no(c,h,p,m){c[Js(p?h.classBindings:h.styleBindings)]=m}(c,h,m,M))}else y=function _s(c,h,p){let m;const v=h.directiveEnd;for(let y=1+h.directiveStylingLast;y0)&&(B=!0)):W=p,v)if(0!==M){const he=Js(c[T+1]);c[m+1]=nh(he,T),0!==he&&(c[he+1]=ig(c[he+1],m)),c[T+1]=function tg(c,h){return 131071&c|h<<17}(c[T+1],m)}else c[m+1]=nh(T,0),0!==T&&(c[T+1]=ig(c[T+1],m)),T=m;else c[m+1]=nh(M,0),0===T?T=m:c[M+1]=ig(c[M+1],m),M=m;B&&(c[m+1]=ng(c[m+1])),Fs(c,W,m,!0),Fs(c,W,m,!1),function Ka(c,h,p,m,v){const y=v?c.residualClasses:c.residualStyles;null!=y&&"string"==typeof h&&Pc(y,h)>=0&&(p[m+1]=$_(p[m+1]))}(h,W,c,m,y),C=nh(T,M),y?h.classBindings=C:h.styleBindings=C}(v,y,h,p,C,m)}}function nc(c,h,p,m,v){let y=null;const C=p.directiveEnd;let T=p.directiveStylingLast;for(-1===T?T=p.directiveStart:T++;T0;){const M=c[v],B=Array.isArray(M),W=B?M[1]:M,X=null===W;let he=p[v+1];he===rn&&(he=X?ht:void 0);let Se=X?Mm(he,m):W===m?he:void 0;if(B&&!lg(Se)&&(Se=Mm(M,m)),lg(Se)&&(T=Se,C))return T;const je=c[v+1];v=C?Js(je):qa(je)}if(null!==h){let M=y?h.residualClasses:h.residualStyles;null!=M&&(T=Mm(M,m))}return T}function lg(c){return void 0!==c}function zS(c,h){return 0!=(c.flags&(h?8:16))}function US(c,h=""){const p=Ze(),m=Cn(),v=c+zt,y=m.firstCreatePass?zl(m,v,1,h,null):m.data[v],C=$S(m,p,y,h,c);p[v]=C,uf()&&Qc(m,p,C,y),go(y,!1)}let $S=(c,h,p,m,v)=>(qo(!0),function ba(c,h){return c.createText(h)}(h[Ft],m));function Ea(c){return sh("",c,""),Ea}function sh(c,h,p){const m=Ze(),v=$l(m,c,h,p);return v!==rn&&ta(m,gi(),v),sh}function ug(c,h,p,m,v){const y=Ze(),C=function Gl(c,h,p,m,v,y){const T=Wa(c,Zo(),p,v);return Qo(2),T?h+Me(p)+m+Me(v)+y:rn}(y,c,h,p,m,v);return C!==rn&&ta(y,gi(),C),ug}function ra(c,h,p,m,v,y,C){const T=Ze(),M=Yl(T,c,h,p,m,v,y,C);return M!==rn&&ta(T,gi(),M),ra}function Hs(c,h,p){const m=Ze();return Vr(m,yl(),h)&&Ns(Cn(),Mi(),m,c,h,m[Ft],p,!0),Hs}function sa(c,h,p){const m=Ze();if(Vr(m,yl(),h)){const y=Cn(),C=Mi();Ns(y,C,m,c,h,o_(Q(y.data),C,m),p,!0)}return sa}const jr=void 0;var nD=["en",[["a","p"],["AM","PM"],jr],[["AM","PM"],jr,jr],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],jr,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],jr,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",jr,"{1} 'at' {0}",jr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function Ir(c){const p=Math.floor(Math.abs(c)),m=c.toString().replace(/^[^.]*\.?/,"").length;return 1===p&&0===m?1:5}];let rc={};function js(c){const h=function m1(c){return c.toLowerCase().replace(/_/g,"-")}(c);let p=_u(h);if(p)return p;const m=h.split("-")[0];if(p=_u(m),p)return p;if("en"===m)return nD;throw new ne(701,!1)}function iD(c){return js(c)[So.PluralCase]}function _u(c){return c in rc||(rc[c]=bt.ng&&bt.ng.common&&bt.ng.common.locales&&bt.ng.common.locales[c]),rc[c]}var So=function(c){return c[c.LocaleId=0]="LocaleId",c[c.DayPeriodsFormat=1]="DayPeriodsFormat",c[c.DayPeriodsStandalone=2]="DayPeriodsStandalone",c[c.DaysFormat=3]="DaysFormat",c[c.DaysStandalone=4]="DaysStandalone",c[c.MonthsFormat=5]="MonthsFormat",c[c.MonthsStandalone=6]="MonthsStandalone",c[c.Eras=7]="Eras",c[c.FirstDayOfWeek=8]="FirstDayOfWeek",c[c.WeekendRange=9]="WeekendRange",c[c.DateFormat=10]="DateFormat",c[c.TimeFormat=11]="TimeFormat",c[c.DateTimeFormat=12]="DateTimeFormat",c[c.NumberSymbols=13]="NumberSymbols",c[c.NumberFormats=14]="NumberFormats",c[c.CurrencyCode=15]="CurrencyCode",c[c.CurrencySymbol=16]="CurrencySymbol",c[c.CurrencyName=17]="CurrencyName",c[c.Currencies=18]="Currencies",c[c.Directionality=19]="Directionality",c[c.PluralCase=20]="PluralCase",c[c.ExtraData=21]="ExtraData",c}(So||{});const yu="en-US";let J_=yu;function tl(c,h,p,m,v){if(c=Le(c),Array.isArray(c))for(let y=0;y>20;if(Ya(c)||!c.multi){const Se=new nd(B,v,jl),je=Ch(M,h,v?W:W+he,X);-1===je?(Tm(mf(T,C),y,M),yh(y,c,h.length),h.push(M),T.directiveStart++,T.directiveEnd++,v&&(T.providerIndexes+=1048576),p.push(Se),C.push(Se)):(p[je]=Se,C[je]=Se)}else{const Se=Ch(M,h,W+he,X),je=Ch(M,h,W,W+he),gt=je>=0&&p[je];if(v&&!gt||!v&&!(Se>=0&&p[Se])){Tm(mf(T,C),y,M);const Pt=function k1(c,h,p,m,v){const y=new nd(c,p,jl);return y.multi=[],y.index=h,y.componentProviders=0,bg(y,v,m&&!p),y}(v?P1:Sg,p.length,v,m,B);!v&>&&(p[je].providerFactory=Pt),yh(y,c,h.length,0),h.push(M),T.directiveStart++,T.directiveEnd++,v&&(T.providerIndexes+=1048576),p.push(Pt),C.push(Pt)}else yh(y,c,Se>-1?Se:je,bg(p[v?je:Se],B,!v&&m));!v&&m&>&&p[je].componentProviders++}}}function yh(c,h,p,m){const v=Ya(h),y=function Fb(c){return!!c.useClass}(h);if(v||y){const M=(y?Le(h.useClass):h).prototype.ngOnDestroy;if(M){const B=c.destroyHooks||(c.destroyHooks=[]);if(!v&&h.multi){const W=B.indexOf(p);-1===W?B.push(p,[m,M]):B[W+1].push(m,M)}else B.push(p,M)}}}function bg(c,h,p){return p&&c.componentProviders++,c.multi.push(h)-1}function Ch(c,h,p,m){for(let v=p;v{p.providersResolver=(m,v)=>function dy(c,h,p){const m=Cn();if(m.firstCreatePass){const v=qn(c);tl(p,m.data,m.blueprint,v,!0),tl(h,m.data,m.blueprint,v,!1)}}(m,v?v(c):c,h)}}class nl{}class py{}function N1(c,h){return new gy(c,h??null,[])}class gy extends nl{constructor(h,p,m){super(),this._parent=p,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new g_(this);const v=_i(h);this._bootstrapComponents=ea(v.bootstrap),this._r3Injector=Ov(h,p,[{provide:nl,useValue:this},{provide:nu,useValue:this.componentFactoryResolver},...m],ye(h),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(h)}get injector(){return this._r3Injector}destroy(){const h=this._r3Injector;!h.destroyed&&h.destroy(),this.destroyCbs.forEach(p=>p()),this.destroyCbs=null}onDestroy(h){this.destroyCbs.push(h)}}class Dg extends py{constructor(h){super(),this.moduleType=h}create(h){return new gy(this.moduleType,h,[])}}class vy extends nl{constructor(h){super(),this.componentFactoryResolver=new g_(this),this.instance=null;const p=new Xc([...h.providers,{provide:nl,useValue:this},{provide:nu,useValue:this.componentFactoryResolver}],h.parent||Pd(),h.debugName,new Set(["environment"]));this.injector=p,h.runEnvironmentInitializers&&p.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(h){this.injector.onDestroy(h)}}function TD(c,h,p=null){return new vy({providers:c,parent:h,debugName:p,runEnvironmentInitializers:!0}).injector}let ID=(()=>{class c{constructor(p){this._injector=p,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(p){if(!p.standalone)return null;if(!this.cachedInjectors.has(p)){const m=kb(0,p.type),v=m.length>0?TD([m],this._injector,`Standalone[${p.type.name}]`):null;this.cachedInjectors.set(p,v)}return this.cachedInjectors.get(p)}ngOnDestroy(){try{for(const p of this.cachedInjectors.values())null!==p&&p.destroy()}finally{this.cachedInjectors.clear()}}static#e=this.\u0275prov=Ut({token:c,providedIn:"environment",factory:()=>new c(Mt(Jo))})}return c})();function wg(c){c.getStandaloneInjector=h=>h.get(ID).getOrCreateStandaloneInjector(c)}function aa(c,h,p){const m=is()+c,v=Ze();return v[m]===rn?Ho(v,m,p?h.call(p):h()):function cu(c,h){return c[h]}(v,m)}function zo(c,h,p,m){return Mg(Ze(),is(),c,h,p,m)}function wo(c,h){const p=c[h];return p===rn?void 0:p}function Mg(c,h,p,m,v,y){const C=h+p;return Vr(c,C,v)?Ho(c,C+1,y?m.call(y,v):m(v)):wo(c,C+1)}function io(c,h){const p=Cn();let m;const v=c+zt;p.firstCreatePass?(m=function pc(c,h){if(h)for(let p=h.length-1;p>=0;p--){const m=h[p];if(c===m.name)return m}}(h,p.pipeRegistry),p.data[v]=m,m.onDestroy&&(p.destroyHooks??=[]).push(v,m.onDestroy)):m=p.data[v];const y=m.factory||(m.factory=Os(m.type)),T=ci(jl);try{const M=id(!1),B=y();return id(M),function NS(c,h,p,m){p>=c.data.length&&(c.data[p]=null,c.blueprint[p]=null),h[p]=m}(p,Ze(),v,B),B}finally{ci(T)}}function bs(c,h,p){const m=c+zt,v=Ze(),y=oi(v,m);return Au(v,m)?Mg(v,is(),h,y.transform,p,y):y.transform(p)}function Th(c,h,p,m){const v=c+zt,y=Ze(),C=oi(y,v);return Au(y,v)?function Iu(c,h,p,m,v,y,C){const T=h+p;return Wa(c,T,v,y)?Ho(c,T+2,C?m.call(C,v,y):m(v,y)):wo(c,T+2)}(y,is(),h,C.transform,p,m,C):C.transform(p,m)}function Au(c,h){return c[dt].data[h].pure}function Pg(){return this._results[Symbol.iterator]()}class Mu{static#e=Symbol.iterator;get changes(){return this._changes||(this._changes=new Vo)}constructor(h=!1){this._emitDistinctChangesOnly=h,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const p=Mu.prototype;p[Symbol.iterator]||(p[Symbol.iterator]=Pg)}get(h){return this._results[h]}map(h){return this._results.map(h)}filter(h){return this._results.filter(h)}find(h){return this._results.find(h)}reduce(h,p){return this._results.reduce(h,p)}forEach(h){this._results.forEach(h)}some(h){return this._results.some(h)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(h,p){const m=this;m.dirty=!1;const v=function vo(c){return c.flat(Number.POSITIVE_INFINITY)}(h);(this._changesDetected=!function zw(c,h,p){if(c.length!==h.length)return!1;for(let m=0;m0&&(p[v-1][fi]=h),m{class c{static#e=this.__NG_ELEMENT_ID__=Lg}return c})();const Ng=gc,Fg=class extends Ng{constructor(h,p,m){super(),this._declarationLView=h,this._declarationTContainer=p,this.elementRef=m}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(h,p){return this.createEmbeddedViewImpl(h,p)}createEmbeddedViewImpl(h,p,m){const v=function wy(c,h,p,m){const v=h.tView,T=zd(c,v,p,4096&c[Ht]?4096:16,null,h,null,null,null,m?.injector??null,m?.hydrationInfo??null);T[Gs]=c[h.index];const B=c[$i];return null!==B&&(T[$i]=B.createEmbeddedView(v)),Rp(v,T,p),T}(this._declarationLView,this._declarationTContainer,h,{injector:p,hydrationInfo:m});return new au(v)}};function Lg(){return mc(yr(),Ze())}function mc(c,h){return 4&c.type?new Fg(h,c,Vl(c,h)):null}let _c=(()=>{class c{static#e=this.__NG_ELEMENT_ID__=Hg}return c})();function Hg(){return Uo(yr(),Ze())}const Mh=_c,xh=class extends Mh{constructor(h,p,m){super(),this._lContainer=h,this._hostTNode=p,this._hostLView=m}get element(){return Vl(this._hostTNode,this._hostLView)}get injector(){return new ps(this._hostTNode,this._hostLView)}get parentInjector(){const h=rd(this._hostTNode,this._hostLView);if(ff(h)){const p=Ic(h,this._hostLView),m=Cl(h);return new ps(p[dt].data[m+8],p)}return new ps(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(h){const p=ss(this._lContainer);return null!==p&&p[h]||null}get length(){return this._lContainer.length-Zn}createEmbeddedView(h,p,m){let v,y;"number"==typeof m?v=m:null!=m&&(v=m.index,y=m.injector);const T=h.createEmbeddedViewImpl(p||{},y,null);return this.insertImpl(T,v,false),T}createComponent(h,p,m,v,y){const C=h&&!function ad(c){return"function"==typeof c}(h);let T;if(C)T=p;else{const tt=p||{};T=tt.index,m=tt.injector,v=tt.projectableNodes,y=tt.environmentInjector||tt.ngModuleRef}const M=C?h:new lu(Zt(h)),B=m||this.parentInjector;if(!y&&null==M.ngModule){const gt=(C?B:this.parentInjector).get(Jo,null);gt&&(y=gt)}Zt(M.componentType??{});const Se=M.create(B,v,null,y);return this.insertImpl(Se.hostView,T,false),Se}insert(h,p){return this.insertImpl(h,p,!1)}insertImpl(h,p,m){const v=h._lView;if(function Kn(c){return pi(c[_n])}(v)){const M=this.indexOf(h);if(-1!==M)this.detach(M);else{const B=v[_n],W=new xh(B,B[ri],B[_n]);W.detach(W.indexOf(h))}}const C=this._adjustIndex(p),T=this._lContainer;return kg(T,v,C,!m),h.attachToViewContainerRef(),QC(Oh(T),C,h),h}move(h,p){return this.insert(h,p)}indexOf(h){const p=ss(this._lContainer);return null!==p?p.indexOf(h):-1}remove(h){const p=this._adjustIndex(h,-1),m=Gc(this._lContainer,p);m&&(va(Oh(this._lContainer),p),wd(m[dt],m))}detach(h){const p=this._adjustIndex(h,-1),m=Gc(this._lContainer,p);return m&&null!=va(Oh(this._lContainer),p)?new au(m):null}_adjustIndex(h,p=0){return h??this.length+p}};function ss(c){return c[8]}function Oh(c){return c[8]||(c[8]=[])}function Uo(c,h){let p;const m=h[c.index];return pi(m)?p=m:(p=n_(m,h,null,c),h[c.index]=p,Ud(h,p)),Ty(p,h,c,m),new xh(p,c,h)}let Ty=function jg(c,h,p,m){if(c[jn])return;let v;v=8&p.type?on(m):function Ey(c,h){const p=c[Ft],m=p.createComment(""),v=vt(h,c);return Ps(p,Zc(p,v),m,function Al(c,h){return c.nextSibling(h)}(p,v),!1),m}(h,p),c[jn]=v};class zg{constructor(h){this.queryList=h,this.matches=null}clone(){return new zg(this.queryList)}setDirty(){this.queryList.setDirty()}}class Ug{constructor(h=[]){this.queries=h}createEmbeddedView(h){const p=h.queries;if(null!==p){const m=null!==h.contentQueries?h.contentQueries[0]:p.length,v=[];for(let y=0;y0)m.push(C[T/2]);else{const B=y[T+1],W=h[-M];for(let X=Zn;X{class c{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((p,m)=>{this.resolve=p,this.reject=m}),this.appInits=Ot(Vu,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const p=[];for(const v of this.appInits){const y=v();if(Co(y))p.push(y);else if(Ks(y)){const C=new Promise((T,M)=>{y.subscribe({complete:T,error:M})});p.push(C)}}const m=()=>{this.done=!0,this.resolve()};Promise.all(p).then(()=>{m()}).catch(v=>{this.reject(v)}),0===p.length&&m(),this.initialized=!0}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})(),tC=(()=>{class c{log(p){console.log(p)}warn(p){console.warn(p)}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"platform"})}return c})();const Bu=new yt("LocaleId",{providedIn:"root",factory:()=>Ot(Bu,xt.Optional|xt.SkipSelf)||function nC(){return typeof $localize<"u"&&$localize.locale||yu}()}),X1=new yt("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});let Tn=(()=>{class c{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new ce.X(!1)}add(){this.hasPendingTasks.next(!0);const p=this.taskId++;return this.pendingTasks.add(p),p}remove(p){this.pendingTasks.delete(p),0===this.pendingTasks.size&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks.next(!1)}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();class iC{constructor(h,p){this.ngModuleFactory=h,this.componentFactories=p}}let Hh=(()=>{class c{compileModuleSync(p){return new Dg(p)}compileModuleAsync(p){return Promise.resolve(this.compileModuleSync(p))}compileModuleAndAllComponentsSync(p){const m=this.compileModuleSync(p),y=ea(_i(p).declarations).reduce((C,T)=>{const M=Zt(T);return M&&C.push(new lu(M)),C},[]);return new iC(m,y)}compileModuleAndAllComponentsAsync(p){return Promise.resolve(this.compileModuleAndAllComponentsSync(p))}clearCache(){}clearCacheFor(p){}getModuleId(p){}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();const Uh=new yt(""),$h=new yt("");let cl,tm=(()=>{class c{constructor(p,m,v){this._ngZone=p,this.registry=m,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,cl||(function im(c){cl=c}(v),v.addToWindow(m)),this._watchAngularEvents(),p.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Tr.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let p=this._callbacks.pop();clearTimeout(p.timeoutId),p.doneCb(this._didWork)}this._didWork=!1});else{let p=this.getPendingTasks();this._callbacks=this._callbacks.filter(m=>!m.updateCb||!m.updateCb(p)||(clearTimeout(m.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(p=>({source:p.source,creationLocation:p.creationLocation,data:p.data})):[]}addCallback(p,m,v){let y=-1;m&&m>0&&(y=setTimeout(()=>{this._callbacks=this._callbacks.filter(C=>C.timeoutId!==y),p(this._didWork,this.getPendingTasks())},m)),this._callbacks.push({doneCb:p,timeoutId:y,updateCb:v})}whenStable(p,m,v){if(v&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(p,m,v),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(p){this.registry.registerApplication(p,this)}unregisterApplication(p){this.registry.unregisterApplication(p)}findProviders(p,m,v){return[]}static#e=this.\u0275fac=function(m){return new(m||c)(Mt(Tr),Mt(nm),Mt($h))};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac})}return c})(),nm=(()=>{class c{constructor(){this._applications=new Map}registerApplication(p,m){this._applications.set(p,m)}unregisterApplication(p){this._applications.delete(p)}unregisterAllApplications(){this._applications.clear()}getTestability(p){return this._applications.get(p)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(p,m=!0){return cl?.findTestabilityInTree(this,p,m)??null}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"platform"})}return c})(),Ur=null;const rm=new yt("AllowMultipleToken"),Gh=new yt("PlatformDestroyListeners"),Yh=new yt("appBootstrapListener");class gC{constructor(h,p){this.name=h,this.token=p}}function _C(c,h,p=[]){const m=`Platform: ${h}`,v=new yt(m);return(y=[])=>{let C=om();if(!C||C.injector.get(rm,!1)){const T=[...p,...y,{provide:v,useValue:!0}];c?c(T):function mC(c){if(Ur&&!Ur.get(rm,!1))throw new ne(400,!1);(function pC(){!function E(c){U=c}(()=>{throw new ne(600,!1)})})(),Ur=c;const h=c.get(Wh);(function rw(c){c.get(Cv,null)?.forEach(p=>p())})(c)}(function sm(c=[],h){return yo.create({name:h,providers:[{provide:gv,useValue:"platform"},{provide:Gh,useValue:new Set([()=>Ur=null])},...c]})}(T,m))}return function ow(c){const h=om();if(!h)throw new ne(401,!1);return h}()}}function om(){return Ur?.get(Wh)??null}let Wh=(()=>{class c{constructor(p){this._injector=p,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(p,m){const v=function aw(c="zone.js",h){return"noop"===c?new u0:"zone.js"===c?new Tr(h):c}(m?.ngZone,function Zh(c){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:c?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:c?.runCoalescing??!1}}({eventCoalescing:m?.ngZoneEventCoalescing,runCoalescing:m?.ngZoneRunCoalescing}));return v.run(()=>{const y=function my(c,h,p){return new gy(c,h,p)}(p.moduleType,this.injector,function bC(c){return[{provide:Tr,useFactory:c},{provide:Ga,multi:!0,useFactory:()=>{const h=Ot(iT,{optional:!0});return()=>h.initialize()}},{provide:lw,useFactory:nT},{provide:Bv,useFactory:Hv}]}(()=>v)),C=y.injector.get(Da,null);return v.runOutsideAngular(()=>{const T=v.onError.subscribe({next:M=>{C.handleError(M)}});y.onDestroy(()=>{zu(this._modules,y),T.unsubscribe()})}),function yC(c,h,p){try{const m=p();return Co(m)?m.catch(v=>{throw h.runOutsideAngular(()=>c.handleError(v)),v}):m}catch(m){throw h.runOutsideAngular(()=>c.handleError(m)),m}}(C,v,()=>{const T=y.injector.get(Bh);return T.runInitializers(),T.donePromise.then(()=>(function sc(c){_t(c,"Expected localeId to be defined"),"string"==typeof c&&(J_=c.toLowerCase().replace(/_/g,"-"))}(y.injector.get(Bu,yu)||yu),this._moduleDoBootstrap(y),y))})})}bootstrapModule(p,m=[]){const v=CC({},m);return function fC(c,h,p){const m=new Dg(p);return Promise.resolve(m)}(0,0,p).then(y=>this.bootstrapModuleFactory(y,v))}_moduleDoBootstrap(p){const m=p.injector.get(bc);if(p._bootstrapComponents.length>0)p._bootstrapComponents.forEach(v=>m.bootstrap(v));else{if(!p.instance.ngDoBootstrap)throw new ne(-403,!1);p.instance.ngDoBootstrap(m)}this._modules.push(p)}onDestroy(p){this._destroyListeners.push(p)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new ne(404,!1);this._modules.slice().forEach(m=>m.destroy()),this._destroyListeners.forEach(m=>m());const p=this._injector.get(Gh,null);p&&(p.forEach(m=>m()),p.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#e=this.\u0275fac=function(m){return new(m||c)(Mt(yo))};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"platform"})}return c})();function CC(c,h){return Array.isArray(h)?h.reduce(CC,c):{...c,...h}}let bc=(()=>{class c{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=Ot(lw),this.zoneIsStable=Ot(Bv),this.componentTypes=[],this.components=[],this.isStable=Ot(Tn).hasPendingTasks.pipe((0,Te.w)(p=>p?(0,_e.of)(!1):this.zoneIsStable),(0,be.x)(),(0,ve.B)()),this._injector=Ot(Jo)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(p,m){const v=p instanceof qb;if(!this._injector.get(Bh).done)throw!v&&os(p),new ne(405,!1);let C;C=v?p:this._injector.get(nu).resolveComponentFactory(p),this.componentTypes.push(C.componentType);const T=function iw(c){return c.isBoundToModule}(C)?void 0:this._injector.get(nl),B=C.create(yo.NULL,[],m||C.selector,T),W=B.location.nativeElement,X=B.injector.get(Uh,null);return X?.registerApplication(W),B.onDestroy(()=>{this.detachView(B.hostView),zu(this.components,B),X?.unregisterApplication(W)}),this._loadComponent(B),B}tick(){if(this._runningTick)throw new ne(101,!1);try{this._runningTick=!0;for(let p of this._views)p.detectChanges()}catch(p){this.internalErrorHandler(p)}finally{this._runningTick=!1}}attachView(p){const m=p;this._views.push(m),m.attachToAppRef(this)}detachView(p){const m=p;zu(this._views,m),m.detachFromAppRef()}_loadComponent(p){this.attachView(p.hostView),this.tick(),this.components.push(p);const m=this._injector.get(Yh,[]);m.push(...this._bootstrapListeners),m.forEach(v=>v(p))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(p=>p()),this._views.slice().forEach(p=>p.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(p){return this._destroyListeners.push(p),()=>zu(this._destroyListeners,p)}destroy(){if(this._destroyed)throw new ne(406,!1);const p=this._injector;p.destroy&&!p.destroyed&&p.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();function zu(c,h){const p=c.indexOf(h);p>-1&&c.splice(p,1)}const lw=new yt("",{providedIn:"root",factory:()=>Ot(Da).handleError.bind(void 0)});function nT(){const c=Ot(Tr),h=Ot(Da);return p=>c.runOutsideAngular(()=>h.handleError(p))}let iT=(()=>{class c{constructor(){this.zone=Ot(Tr),this.applicationRef=Ot(bc)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#e=this.\u0275fac=function(m){return new(m||c)};static#t=this.\u0275prov=Ut({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();function cw(){}let uw=(()=>{class c{static#e=this.__NG_ELEMENT_ID__=DC}return c})();function DC(c){return function oT(c,h,p){if(et(c)&&!p){const m=yi(c.index,h);return new au(m,m)}return 47&c.type?new au(h[wn],h):null}(yr(),Ze(),16==(16&c))}class TC{constructor(){}supports(h){return Wd(h)}create(h){return new dT(h)}}const uT=(c,h)=>h;class dT{constructor(h){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=h||uT}forEachItem(h){let p;for(p=this._itHead;null!==p;p=p._next)h(p)}forEachOperation(h){let p=this._itHead,m=this._removalsHead,v=0,y=null;for(;p||m;){const C=!m||p&&p.currentIndex{C=this._trackByFn(v,T),null!==p&&Object.is(p.trackById,C)?(m&&(p=this._verifyReinsertion(p,T,C,v)),Object.is(p.item,T)||this._addIdentityChange(p,T)):(p=this._mismatch(p,T,C,v),m=!0),p=p._next,v++}),this.length=v;return this._truncate(p),this.collection=h,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let h;for(h=this._previousItHead=this._itHead;null!==h;h=h._next)h._nextPrevious=h._next;for(h=this._additionsHead;null!==h;h=h._nextAdded)h.previousIndex=h.currentIndex;for(this._additionsHead=this._additionsTail=null,h=this._movesHead;null!==h;h=h._nextMoved)h.previousIndex=h.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(h,p,m,v){let y;return null===h?y=this._itTail:(y=h._prev,this._remove(h)),null!==(h=null===this._unlinkedRecords?null:this._unlinkedRecords.get(m,null))?(Object.is(h.item,p)||this._addIdentityChange(h,p),this._reinsertAfter(h,y,v)):null!==(h=null===this._linkedRecords?null:this._linkedRecords.get(m,v))?(Object.is(h.item,p)||this._addIdentityChange(h,p),this._moveAfter(h,y,v)):h=this._addAfter(new fw(p,m),y,v),h}_verifyReinsertion(h,p,m,v){let y=null===this._unlinkedRecords?null:this._unlinkedRecords.get(m,null);return null!==y?h=this._reinsertAfter(y,h._prev,v):h.currentIndex!=v&&(h.currentIndex=v,this._addToMoves(h,v)),h}_truncate(h){for(;null!==h;){const p=h._next;this._addToRemovals(this._unlink(h)),h=p}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(h,p,m){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(h);const v=h._prevRemoved,y=h._nextRemoved;return null===v?this._removalsHead=y:v._nextRemoved=y,null===y?this._removalsTail=v:y._prevRemoved=v,this._insertAfter(h,p,m),this._addToMoves(h,m),h}_moveAfter(h,p,m){return this._unlink(h),this._insertAfter(h,p,m),this._addToMoves(h,m),h}_addAfter(h,p,m){return this._insertAfter(h,p,m),this._additionsTail=null===this._additionsTail?this._additionsHead=h:this._additionsTail._nextAdded=h,h}_insertAfter(h,p,m){const v=null===p?this._itHead:p._next;return h._next=v,h._prev=p,null===v?this._itTail=h:v._prev=h,null===p?this._itHead=h:p._next=h,null===this._linkedRecords&&(this._linkedRecords=new gw),this._linkedRecords.put(h),h.currentIndex=m,h}_remove(h){return this._addToRemovals(this._unlink(h))}_unlink(h){null!==this._linkedRecords&&this._linkedRecords.remove(h);const p=h._prev,m=h._next;return null===p?this._itHead=m:p._next=m,null===m?this._itTail=p:m._prev=p,h}_addToMoves(h,p){return h.previousIndex===p||(this._movesTail=null===this._movesTail?this._movesHead=h:this._movesTail._nextMoved=h),h}_addToRemovals(h){return null===this._unlinkedRecords&&(this._unlinkedRecords=new gw),this._unlinkedRecords.put(h),h.currentIndex=null,h._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=h,h._prevRemoved=null):(h._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=h),h}_addIdentityChange(h,p){return h.item=p,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=h:this._identityChangesTail._nextIdentityChange=h,h}}class fw{constructor(h,p){this.item=h,this.trackById=p,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class pw{constructor(){this._head=null,this._tail=null}add(h){null===this._head?(this._head=this._tail=h,h._nextDup=null,h._prevDup=null):(this._tail._nextDup=h,h._prevDup=this._tail,h._nextDup=null,this._tail=h)}get(h,p){let m;for(m=this._head;null!==m;m=m._nextDup)if((null===p||p<=m.currentIndex)&&Object.is(m.trackById,h))return m;return null}remove(h){const p=h._prevDup,m=h._nextDup;return null===p?this._head=m:p._nextDup=m,null===m?this._tail=p:m._prevDup=p,null===this._head}}class gw{constructor(){this.map=new Map}put(h){const p=h.trackById;let m=this.map.get(p);m||(m=new pw,this.map.set(p,m)),m.add(h)}get(h,p){const v=this.map.get(h);return v?v.get(h,p):null}remove(h){const p=h.trackById;return this.map.get(p).remove(h)&&this.map.delete(p),h}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function d(c,h,p){const m=c.previousIndex;if(null===m)return m;let v=0;return p&&m{if(p&&p.key===v)this._maybeAddToChanges(p,m),this._appendAfter=p,p=p._next;else{const y=this._getOrCreateRecordForKey(v,m);p=this._insertBeforeOrAppend(p,y)}}),p){p._prev&&(p._prev._next=null),this._removalsHead=p;for(let m=p;null!==m;m=m._nextRemoved)m===this._mapHead&&(this._mapHead=null),this._records.delete(m.key),m._nextRemoved=m._next,m.previousValue=m.currentValue,m.currentValue=null,m._prev=null,m._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(h,p){if(h){const m=h._prev;return p._next=h,p._prev=m,h._prev=p,m&&(m._next=p),h===this._mapHead&&(this._mapHead=p),this._appendAfter=h,h}return this._appendAfter?(this._appendAfter._next=p,p._prev=this._appendAfter):this._mapHead=p,this._appendAfter=p,null}_getOrCreateRecordForKey(h,p){if(this._records.has(h)){const v=this._records.get(h);this._maybeAddToChanges(v,p);const y=v._prev,C=v._next;return y&&(y._next=C),C&&(C._prev=y),v._next=null,v._prev=null,v}const m=new g(h);return this._records.set(h,m),m.currentValue=p,this._addToAdditions(m),m}_reset(){if(this.isDirty){let h;for(this._previousMapHead=this._mapHead,h=this._previousMapHead;null!==h;h=h._next)h._nextPrevious=h._next;for(h=this._changesHead;null!==h;h=h._nextChanged)h.previousValue=h.currentValue;for(h=this._additionsHead;null!=h;h=h._nextAdded)h.previousValue=h.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(h,p){Object.is(p,h.currentValue)||(h.previousValue=h.currentValue,h.currentValue=p,this._addToChanges(h))}_addToAdditions(h){null===this._additionsHead?this._additionsHead=this._additionsTail=h:(this._additionsTail._nextAdded=h,this._additionsTail=h)}_addToChanges(h){null===this._changesHead?this._changesHead=this._changesTail=h:(this._changesTail._nextChanged=h,this._changesTail=h)}_forEach(h,p){h instanceof Map?h.forEach(p):Object.keys(h).forEach(m=>p(h[m],m))}}class g{constructor(h){this.key=h,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function _(){return new S([new TC])}let S=(()=>{class c{static#e=this.\u0275prov=Ut({token:c,providedIn:"root",factory:_});constructor(p){this.factories=p}static create(p,m){if(null!=m){const v=m.factories.slice();p=p.concat(v)}return new c(p)}static extend(p){return{provide:c,useFactory:m=>c.create(p,m||_()),deps:[[c,new Fc,new Nc]]}}find(p){const m=this.factories.find(v=>v.supports(p));if(null!=m)return m;throw new ne(901,!1)}}return c})();function J(){return new te([new f])}let te=(()=>{class c{static#e=this.\u0275prov=Ut({token:c,providedIn:"root",factory:J});constructor(p){this.factories=p}static create(p,m){if(m){const v=m.factories.slice();p=p.concat(v)}return new c(p)}static extend(p){return{provide:c,useFactory:m=>c.create(p,m||J()),deps:[[c,new Fc,new Nc]]}}find(p){const m=this.factories.find(v=>v.supports(p));if(m)return m;throw new ne(901,!1)}}return c})();const un=_C(null,"core",[]);let Xn=(()=>{class c{constructor(p){}static#e=this.\u0275fac=function(m){return new(m||c)(Mt(bc))};static#t=this.\u0275mod=oo({type:c});static#n=this.\u0275inj=mn({})}return c})();function iI(c){return"boolean"==typeof c?c:null!=c&&"false"!==c}function sI(c,h){const p=Zt(c),m=h.elementInjector||Pd();return new lu(p).create(m,h.projectableNodes,h.hostElement,h.environmentInjector)}function oI(c){const h=Zt(c);if(!h)return null;const p=new lu(h);return{get selector(){return p.selector},get type(){return p.componentType},get inputs(){return p.inputs},get outputs(){return p.outputs},get ngContentSelectors(){return p.ngContentSelectors},get isStandalone(){return h.standalone},get isSignal(){return h.signals}}}},9223:(ct,De,L)=>{L.d(De,{Cf:()=>Re,EJ:()=>Rr,F:()=>Si,Fd:()=>Er,Fj:()=>ke,JJ:()=>Vi,JL:()=>xi,K7:()=>Ft,Kr:()=>As,Mq:()=>To,NI:()=>di,On:()=>Ki,UX:()=>ds,Wl:()=>ae,YN:()=>ri,_:()=>wr,_Y:()=>Yr,a5:()=>mn,cw:()=>Be,eT:()=>Ts,kI:()=>ut,qQ:()=>Kr,sg:()=>_i,u:()=>dt,u5:()=>lo,wV:()=>ii,x0:()=>Ui});var l=L(3714),k=L(3223),de=L(3477),re=L(6548),ce=L(5990);let _e=(()=>{class z{constructor(P,Y){this._renderer=P,this._elementRef=Y,this.onChange=se=>{},this.onTouched=()=>{}}setProperty(P,Y){this._renderer.setProperty(this._elementRef.nativeElement,P,Y)}registerOnTouched(P){this.onTouched=P}registerOnChange(P){this.onChange=P}setDisabledState(P){this.setProperty("disabled",P)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(l.Qsj),l.Y36(l.SBq))};static#t=this.\u0275dir=l.lG2({type:z})}return z})(),ve=(()=>{class z extends _e{static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,features:[l.qOj]})}return z})();const Te=new l.OlP("NgValueAccessor"),be={provide:Te,useExisting:(0,l.Gpc)(()=>ae),multi:!0};let ae=(()=>{class z extends ve{writeValue(P){this.setProperty("checked",P)}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("change",function(nn){return se.onChange(nn.target.checked)})("blur",function(){return se.onTouched()})},features:[l._Bn([be]),l.qOj]})}return z})();const fe={provide:Te,useExisting:(0,l.Gpc)(()=>ke),multi:!0},Ve=new l.OlP("CompositionEventMode");let ke=(()=>{class z extends _e{constructor(P,Y,se){super(P,Y),this._compositionMode=se,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function ye(){const z=(0,k.q)()?(0,k.q)().getUserAgent():"";return/android (\d+)/.test(z.toLowerCase())}())}writeValue(P){this.setProperty("value",P??"")}_handleInput(P){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(P)}_compositionStart(){this._composing=!0}_compositionEnd(P){this._composing=!1,this._compositionMode&&this.onChange(P)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(l.Qsj),l.Y36(l.SBq),l.Y36(Ve,8))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("input",function(nn){return se._handleInput(nn.target.value)})("blur",function(){return se.onTouched()})("compositionstart",function(){return se._compositionStart()})("compositionend",function(nn){return se._compositionEnd(nn.target.value)})},features:[l._Bn([fe]),l.qOj]})}return z})();function He(z){return null==z||("string"==typeof z||Array.isArray(z))&&0===z.length}function Le(z){return null!=z&&"number"==typeof z.length}const Re=new l.OlP("NgValidators"),at=new l.OlP("NgAsyncValidators"),Dt=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class ut{static min($){return ne($)}static max($){return Pe($)}static required($){return function Me(z){return He(z.value)?{required:!0}:null}($)}static requiredTrue($){return function nt(z){return!0===z.value?null:{required:!0}}($)}static email($){return function it(z){return He(z.value)||Dt.test(z.value)?null:{email:!0}}($)}static minLength($){return function Je(z){return $=>He($.value)||!Le($.value)?null:$.value.lengthLe($.value)&&$.value.length>z?{maxlength:{requiredLength:z,actualLength:$.value.length}}:null}($)}static pattern($){return function mt(z){if(!z)return $t;let $,P;return"string"==typeof z?(P="","^"!==z.charAt(0)&&(P+="^"),P+=z,"$"!==z.charAt(z.length-1)&&(P+="$"),$=new RegExp(P)):(P=z.toString(),$=z),Y=>{if(He(Y.value))return null;const se=Y.value;return $.test(se)?null:{pattern:{requiredPattern:P,actualValue:se}}}}($)}static nullValidator($){return null}static compose($){return xe($)}static composeAsync($){return Fe($)}}function ne(z){return $=>{if(He($.value)||He(z))return null;const P=parseFloat($.value);return!isNaN(P)&&P{if(He($.value)||He(z))return null;const P=parseFloat($.value);return!isNaN(P)&&P>z?{max:{max:z,actual:$.value}}:null}}function $t(z){return null}function Vn(z){return null!=z}function Sn(z){return(0,l.QGY)(z)?(0,de.D)(z):z}function Bn(z){let $={};return z.forEach(P=>{$=null!=P?{...$,...P}:$}),0===Object.keys($).length?null:$}function Nt(z,$){return $.map(P=>P(z))}function Qi(z){return z.map($=>function Ar(z){return!z.validate}($)?$:P=>$.validate(P))}function xe(z){if(!z)return null;const $=z.filter(Vn);return 0==$.length?null:function(P){return Bn(Nt(P,$))}}function Oe(z){return null!=z?xe(Qi(z)):null}function Fe(z){if(!z)return null;const $=z.filter(Vn);return 0==$.length?null:function(P){const Y=Nt(P,$).map(Sn);return(0,re.D)(Y).pipe((0,ce.U)(Bn))}}function Ne(z){return null!=z?Fe(Qi(z)):null}function We(z,$){return null===z?[$]:Array.isArray(z)?[...z,$]:[z,$]}function Ke(z){return z._rawValidators}function _t(z){return z._rawAsyncValidators}function ot(z){return z?Array.isArray(z)?z:[z]:[]}function ei(z,$){return Array.isArray(z)?z.includes($):z===$}function Xe(z,$){const P=ot($);return ot(z).forEach(se=>{ei(P,se)||P.push(se)}),P}function cn(z,$){return ot($).filter(P=>!ei(z,P))}class Ut{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators($){this._rawValidators=$||[],this._composedValidatorFn=Oe(this._rawValidators)}_setAsyncValidators($){this._rawAsyncValidators=$||[],this._composedAsyncValidatorFn=Ne(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy($){this._onDestroyCallbacks.push($)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach($=>$()),this._onDestroyCallbacks=[]}reset($=void 0){this.control&&this.control.reset($)}hasError($,P){return!!this.control&&this.control.hasError($,P)}getError($,P){return this.control?this.control.getError($,P):null}}class kt extends Ut{get formDirective(){return null}get path(){return null}}class mn extends Ut{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class li{constructor($){this._cd=$}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let Vi=(()=>{class z extends li{constructor(P){super(P)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(mn,2))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(Y,se){2&Y&&l.ekj("ng-untouched",se.isUntouched)("ng-touched",se.isTouched)("ng-pristine",se.isPristine)("ng-dirty",se.isDirty)("ng-valid",se.isValid)("ng-invalid",se.isInvalid)("ng-pending",se.isPending)},features:[l.qOj]})}return z})(),xi=(()=>{class z extends li{constructor(P){super(P)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,10))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(Y,se){2&Y&&l.ekj("ng-untouched",se.isUntouched)("ng-touched",se.isTouched)("ng-pristine",se.isPristine)("ng-dirty",se.isDirty)("ng-valid",se.isValid)("ng-invalid",se.isInvalid)("ng-pending",se.isPending)("ng-submitted",se.isSubmitted)},features:[l.qOj]})}return z})();const Nn="VALID",qi="INVALID",ti="PENDING",ni="DISABLED";function $n(z){return(Bi(z)?z.validators:z)||null}function rr(z,$){return(Bi($)?$.asyncValidators:z)||null}function Bi(z){return null!=z&&!Array.isArray(z)&&"object"==typeof z}class ws{constructor($,P){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators($),this._assignAsyncValidators(P)}get validator(){return this._composedValidatorFn}set validator($){this._rawValidators=this._composedValidatorFn=$}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator($){this._rawAsyncValidators=this._composedAsyncValidatorFn=$}get parent(){return this._parent}get valid(){return this.status===Nn}get invalid(){return this.status===qi}get pending(){return this.status==ti}get disabled(){return this.status===ni}get enabled(){return this.status!==ni}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators($){this._assignValidators($)}setAsyncValidators($){this._assignAsyncValidators($)}addValidators($){this.setValidators(Xe($,this._rawValidators))}addAsyncValidators($){this.setAsyncValidators(Xe($,this._rawAsyncValidators))}removeValidators($){this.setValidators(cn($,this._rawValidators))}removeAsyncValidators($){this.setAsyncValidators(cn($,this._rawAsyncValidators))}hasValidator($){return ei(this._rawValidators,$)}hasAsyncValidator($){return ei(this._rawAsyncValidators,$)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched($={}){this.touched=!0,this._parent&&!$.onlySelf&&this._parent.markAsTouched($)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild($=>$.markAllAsTouched())}markAsUntouched($={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(P=>{P.markAsUntouched({onlySelf:!0})}),this._parent&&!$.onlySelf&&this._parent._updateTouched($)}markAsDirty($={}){this.pristine=!1,this._parent&&!$.onlySelf&&this._parent.markAsDirty($)}markAsPristine($={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(P=>{P.markAsPristine({onlySelf:!0})}),this._parent&&!$.onlySelf&&this._parent._updatePristine($)}markAsPending($={}){this.status=ti,!1!==$.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!$.onlySelf&&this._parent.markAsPending($)}disable($={}){const P=this._parentMarkedDirty($.onlySelf);this.status=ni,this.errors=null,this._forEachChild(Y=>{Y.disable({...$,onlySelf:!0})}),this._updateValue(),!1!==$.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...$,skipPristineCheck:P}),this._onDisabledChange.forEach(Y=>Y(!0))}enable($={}){const P=this._parentMarkedDirty($.onlySelf);this.status=Nn,this._forEachChild(Y=>{Y.enable({...$,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:$.emitEvent}),this._updateAncestors({...$,skipPristineCheck:P}),this._onDisabledChange.forEach(Y=>Y(!1))}_updateAncestors($){this._parent&&!$.onlySelf&&(this._parent.updateValueAndValidity($),$.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent($){this._parent=$}getRawValue(){return this.value}updateValueAndValidity($={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Nn||this.status===ti)&&this._runAsyncValidator($.emitEvent)),!1!==$.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!$.onlySelf&&this._parent.updateValueAndValidity($)}_updateTreeValidity($={emitEvent:!0}){this._forEachChild(P=>P._updateTreeValidity($)),this.updateValueAndValidity({onlySelf:!0,emitEvent:$.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ni:Nn}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator($){if(this.asyncValidator){this.status=ti,this._hasOwnPendingAsyncValidator=!0;const P=Sn(this.asyncValidator(this));this._asyncValidationSubscription=P.subscribe(Y=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(Y,{emitEvent:$})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors($,P={}){this.errors=$,this._updateControlsErrors(!1!==P.emitEvent)}get($){let P=$;return null==P||(Array.isArray(P)||(P=P.split(".")),0===P.length)?null:P.reduce((Y,se)=>Y&&Y._find(se),this)}getError($,P){const Y=P?this.get(P):this;return Y&&Y.errors?Y.errors[$]:null}hasError($,P){return!!this.getError($,P)}get root(){let $=this;for(;$._parent;)$=$._parent;return $}_updateControlsErrors($){this.status=this._calculateStatus(),$&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors($)}_initObservables(){this.valueChanges=new l.vpe,this.statusChanges=new l.vpe}_calculateStatus(){return this._allControlsDisabled()?ni:this.errors?qi:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ti)?ti:this._anyControlsHaveStatus(qi)?qi:Nn}_anyControlsHaveStatus($){return this._anyControls(P=>P.status===$)}_anyControlsDirty(){return this._anyControls($=>$.dirty)}_anyControlsTouched(){return this._anyControls($=>$.touched)}_updatePristine($={}){this.pristine=!this._anyControlsDirty(),this._parent&&!$.onlySelf&&this._parent._updatePristine($)}_updateTouched($={}){this.touched=this._anyControlsTouched(),this._parent&&!$.onlySelf&&this._parent._updateTouched($)}_registerOnCollectionChange($){this._onCollectionChange=$}_setUpdateStrategy($){Bi($)&&null!=$.updateOn&&(this._updateOn=$.updateOn)}_parentMarkedDirty($){return!$&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find($){return null}_assignValidators($){this._rawValidators=Array.isArray($)?$.slice():$,this._composedValidatorFn=function vi(z){return Array.isArray(z)?Oe(z):z||null}(this._rawValidators)}_assignAsyncValidators($){this._rawAsyncValidators=Array.isArray($)?$.slice():$,this._composedAsyncValidatorFn=function Mr(z){return Array.isArray(z)?Ne(z):z||null}(this._rawAsyncValidators)}}class Be extends ws{constructor($,P,Y){super($n(P),rr(Y,P)),this.controls=$,this._initObservables(),this._setUpdateStrategy(P),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl($,P){return this.controls[$]?this.controls[$]:(this.controls[$]=P,P.setParent(this),P._registerOnCollectionChange(this._onCollectionChange),P)}addControl($,P,Y={}){this.registerControl($,P),this.updateValueAndValidity({emitEvent:Y.emitEvent}),this._onCollectionChange()}removeControl($,P={}){this.controls[$]&&this.controls[$]._registerOnCollectionChange(()=>{}),delete this.controls[$],this.updateValueAndValidity({emitEvent:P.emitEvent}),this._onCollectionChange()}setControl($,P,Y={}){this.controls[$]&&this.controls[$]._registerOnCollectionChange(()=>{}),delete this.controls[$],P&&this.registerControl($,P),this.updateValueAndValidity({emitEvent:Y.emitEvent}),this._onCollectionChange()}contains($){return this.controls.hasOwnProperty($)&&this.controls[$].enabled}setValue($,P={}){(function Hi(z,$,P){z._forEachChild((Y,se)=>{if(void 0===P[se])throw new l.vHH(1002,"")})})(this,0,$),Object.keys($).forEach(Y=>{(function Pi(z,$,P){const Y=z.controls;if(!($?Object.keys(Y):Y).length)throw new l.vHH(1e3,"");if(!Y[P])throw new l.vHH(1001,"")})(this,!0,Y),this.controls[Y].setValue($[Y],{onlySelf:!0,emitEvent:P.emitEvent})}),this.updateValueAndValidity(P)}patchValue($,P={}){null!=$&&(Object.keys($).forEach(Y=>{const se=this.controls[Y];se&&se.patchValue($[Y],{onlySelf:!0,emitEvent:P.emitEvent})}),this.updateValueAndValidity(P))}reset($={},P={}){this._forEachChild((Y,se)=>{Y.reset($?$[se]:null,{onlySelf:!0,emitEvent:P.emitEvent})}),this._updatePristine(P),this._updateTouched(P),this.updateValueAndValidity(P)}getRawValue(){return this._reduceChildren({},($,P,Y)=>($[Y]=P.getRawValue(),$))}_syncPendingControls(){let $=this._reduceChildren(!1,(P,Y)=>!!Y._syncPendingControls()||P);return $&&this.updateValueAndValidity({onlySelf:!0}),$}_forEachChild($){Object.keys(this.controls).forEach(P=>{const Y=this.controls[P];Y&&$(Y,P)})}_setUpControls(){this._forEachChild($=>{$.setParent(this),$._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls($){for(const[P,Y]of Object.entries(this.controls))if(this.contains(P)&&$(Y))return!0;return!1}_reduceValue(){return this._reduceChildren({},(P,Y,se)=>((Y.enabled||this.disabled)&&(P[se]=Y.value),P))}_reduceChildren($,P){let Y=$;return this._forEachChild((se,Tt)=>{Y=P(Y,se,Tt)}),Y}_allControlsDisabled(){for(const $ of Object.keys(this.controls))if(this.controls[$].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find($){return this.controls.hasOwnProperty($)?this.controls[$]:null}}const lt=new l.OlP("CallSetDisabledState",{providedIn:"root",factory:()=>Et}),Et="always";function Mt(z,$){return[...$.path,z]}function sn(z,$,P=Et){ge(z,$),$.valueAccessor.writeValue(z.value),(z.disabled||"always"===P)&&$.valueAccessor.setDisabledState?.(z.disabled),function ue(z,$){$.valueAccessor.registerOnChange(P=>{z._pendingValue=P,z._pendingChange=!0,z._pendingDirty=!0,"change"===z.updateOn&&qe(z,$)})}(z,$),function st(z,$){const P=(Y,se)=>{$.valueAccessor.writeValue(Y),se&&$.viewToModelUpdate(Y)};z.registerOnChange(P),$._registerOnDestroy(()=>{z._unregisterOnChange(P)})}(z,$),function ze(z,$){$.valueAccessor.registerOnTouched(()=>{z._pendingTouched=!0,"blur"===z.updateOn&&z._pendingChange&&qe(z,$),"submit"!==z.updateOn&&z.markAsTouched()})}(z,$),function ji(z,$){if($.valueAccessor.setDisabledState){const P=Y=>{$.valueAccessor.setDisabledState(Y)};z.registerOnDisabledChange(P),$._registerOnDestroy(()=>{z._unregisterOnDisabledChange(P)})}}(z,$)}function Ot(z,$,P=!0){const Y=()=>{};$.valueAccessor&&($.valueAccessor.registerOnChange(Y),$.valueAccessor.registerOnTouched(Y)),oe(z,$),z&&($._invokeOnDestroyCallbacks(),z._registerOnCollectionChange(()=>{}))}function Gn(z,$){z.forEach(P=>{P.registerOnValidatorChange&&P.registerOnValidatorChange($)})}function ge(z,$){const P=Ke(z);null!==$.validator?z.setValidators(We(P,$.validator)):"function"==typeof P&&z.setValidators([P]);const Y=_t(z);null!==$.asyncValidator?z.setAsyncValidators(We(Y,$.asyncValidator)):"function"==typeof Y&&z.setAsyncValidators([Y]);const se=()=>z.updateValueAndValidity();Gn($._rawValidators,se),Gn($._rawAsyncValidators,se)}function oe(z,$){let P=!1;if(null!==z){if(null!==$.validator){const se=Ke(z);if(Array.isArray(se)&&se.length>0){const Tt=se.filter(nn=>nn!==$.validator);Tt.length!==se.length&&(P=!0,z.setValidators(Tt))}}if(null!==$.asyncValidator){const se=_t(z);if(Array.isArray(se)&&se.length>0){const Tt=se.filter(nn=>nn!==$.asyncValidator);Tt.length!==se.length&&(P=!0,z.setAsyncValidators(Tt))}}}const Y=()=>{};return Gn($._rawValidators,Y),Gn($._rawAsyncValidators,Y),P}function qe(z,$){z._pendingDirty&&z.markAsDirty(),z.setValue(z._pendingValue,{emitModelToViewChange:!1}),$.viewToModelUpdate(z._pendingValue),z._pendingChange=!1}function rt(z,$){ge(z,$)}function Fn(z,$){if(!z.hasOwnProperty("model"))return!1;const P=z.model;return!!P.isFirstChange()||!Object.is($,P.currentValue)}function Wt(z,$){z._syncPendingControls(),$.forEach(P=>{const Y=P.control;"submit"===Y.updateOn&&Y._pendingChange&&(P.viewToModelUpdate(Y._pendingValue),Y._pendingChange=!1)})}function dn(z,$){if(!$)return null;let P,Y,se;return Array.isArray($),$.forEach(Tt=>{Tt.constructor===ke?P=Tt:function xn(z){return Object.getPrototypeOf(z.constructor)===ve}(Tt)?Y=Tt:se=Tt}),se||Y||P||null}const Yn={provide:kt,useExisting:(0,l.Gpc)(()=>Si)},Wn=(()=>Promise.resolve())();let Si=(()=>{class z extends kt{constructor(P,Y,se){super(),this.callSetDisabledState=se,this.submitted=!1,this._directives=new Set,this.ngSubmit=new l.vpe,this.form=new Be({},Oe(P),Ne(Y))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(P){Wn.then(()=>{const Y=this._findContainer(P.path);P.control=Y.registerControl(P.name,P.control),sn(P.control,P,this.callSetDisabledState),P.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(P)})}getControl(P){return this.form.get(P.path)}removeControl(P){Wn.then(()=>{const Y=this._findContainer(P.path);Y&&Y.removeControl(P.name),this._directives.delete(P)})}addFormGroup(P){Wn.then(()=>{const Y=this._findContainer(P.path),se=new Be({});rt(se,P),Y.registerControl(P.name,se),se.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(P){Wn.then(()=>{const Y=this._findContainer(P.path);Y&&Y.removeControl(P.name)})}getFormGroup(P){return this.form.get(P.path)}updateModel(P,Y){Wn.then(()=>{this.form.get(P.path).setValue(Y)})}setValue(P){this.control.setValue(P)}onSubmit(P){return this.submitted=!0,Wt(this.form,this._directives),this.ngSubmit.emit(P),"dialog"===P?.target?.method}onReset(){this.resetForm()}resetForm(P=void 0){this.form.reset(P),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(P){return P.pop(),P.length?this.form.get(P):this.form}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(Re,10),l.Y36(at,10),l.Y36(lt,8))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("submit",function(nn){return se.onSubmit(nn)})("reset",function(){return se.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[l._Bn([Yn]),l.qOj]})}return z})();function Ti(z,$){const P=z.indexOf($);P>-1&&z.splice(P,1)}function sr(z){return"object"==typeof z&&null!==z&&2===Object.keys(z).length&&"value"in z&&"disabled"in z}const di=class extends ws{constructor($=null,P,Y){super($n(P),rr(Y,P)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState($),this._setUpdateStrategy(P),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Bi(P)&&(P.nonNullable||P.initialValueIsDefault)&&(this.defaultValue=sr($)?$.value:$)}setValue($,P={}){this.value=this._pendingValue=$,this._onChange.length&&!1!==P.emitModelToViewChange&&this._onChange.forEach(Y=>Y(this.value,!1!==P.emitViewToModelChange)),this.updateValueAndValidity(P)}patchValue($,P={}){this.setValue($,P)}reset($=this.defaultValue,P={}){this._applyFormState($),this.markAsPristine(P),this.markAsUntouched(P),this.setValue(this.value,P),this._pendingChange=!1}_updateValue(){}_anyControls($){return!1}_allControlsDisabled(){return this.disabled}registerOnChange($){this._onChange.push($)}_unregisterOnChange($){Ti(this._onChange,$)}registerOnDisabledChange($){this._onDisabledChange.push($)}_unregisterOnDisabledChange($){Ti(this._onDisabledChange,$)}_forEachChild($){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState($){sr($)?(this.value=this._pendingValue=$.value,$.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=$}};let hn=(()=>{class z extends kt{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Mt(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,features:[l.qOj]})}return z})();const Oa={provide:kt,useExisting:(0,l.Gpc)(()=>To)};let To=(()=>{class z extends hn{constructor(P,Y,se){super(),this.name="",this._parent=P,this._setValidators(Y),this._setAsyncValidators(se)}_checkParentType(){}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,5),l.Y36(Re,10),l.Y36(at,10))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[l._Bn([Oa]),l.qOj]})}return z})();const Io={provide:mn,useExisting:(0,l.Gpc)(()=>Ki)},Jt=(()=>Promise.resolve())();let Ki=(()=>{class z extends mn{constructor(P,Y,se,Tt,nn,An){super(),this._changeDetectorRef=nn,this.callSetDisabledState=An,this.control=new di,this._registered=!1,this.name="",this.update=new l.vpe,this._parent=P,this._setValidators(Y),this._setAsyncValidators(se),this.valueAccessor=dn(0,Tt)}ngOnChanges(P){if(this._checkForErrors(),!this._registered||"name"in P){if(this._registered&&(this._checkName(),this.formDirective)){const Y=P.name.previousValue;this.formDirective.removeControl({name:Y,path:this._getPath(Y)})}this._setUpControl()}"isDisabled"in P&&this._updateDisabled(P),Fn(P,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(P){this.viewModel=P,this.update.emit(P)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){sn(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(P){Jt.then(()=>{this.control.setValue(P,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(P){const Y=P.isDisabled.currentValue,se=0!==Y&&(0,l.VuI)(Y);Jt.then(()=>{se&&!this.control.disabled?this.control.disable():!se&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(P){return this._parent?Mt(P,this._parent):[P]}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,9),l.Y36(Re,10),l.Y36(at,10),l.Y36(Te,10),l.Y36(l.sBO,8),l.Y36(lt,8))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[l._Bn([Io]),l.qOj,l.TTD]})}return z})(),Yr=(()=>{class z{static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}return z})();const $o={provide:Te,useExisting:(0,l.Gpc)(()=>ii),multi:!0};let ii=(()=>{class z extends ve{writeValue(P){this.setProperty("value",P??"")}registerOnChange(P){this.onChange=Y=>{P(""==Y?null:parseFloat(Y))}}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("input",function(nn){return se.onChange(nn.target.value)})("blur",function(){return se.onTouched()})},features:[l._Bn([$o]),l.qOj]})}return z})();const Es={provide:Te,useExisting:(0,l.Gpc)(()=>wr),multi:!0};let oo=(()=>{class z{static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275mod=l.oAB({type:z});static#n=this.\u0275inj=l.cJS({})}return z})(),Ao=(()=>{class z{constructor(){this._accessors=[]}add(P,Y){this._accessors.push([P,Y])}remove(P){for(let Y=this._accessors.length-1;Y>=0;--Y)if(this._accessors[Y][1]===P)return void this._accessors.splice(Y,1)}select(P){this._accessors.forEach(Y=>{this._isSameGroup(Y,P)&&Y[1]!==P&&Y[1].fireUncheck(P.value)})}_isSameGroup(P,Y){return!!P[0].control&&P[0]._parent===Y._control._parent&&P[1].name===Y.name}static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275prov=l.Yz7({token:z,factory:z.\u0275fac,providedIn:oo})}return z})(),wr=(()=>{class z extends ve{constructor(P,Y,se,Tt){super(P,Y),this._registry=se,this._injector=Tt,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=(0,l.f3M)(lt,{optional:!0})??Et}ngOnInit(){this._control=this._injector.get(mn),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(P){this._state=P===this.value,this.setProperty("checked",this._state)}registerOnChange(P){this._fn=P,this.onChange=()=>{P(this.value),this._registry.select(this)}}setDisabledState(P){(this.setDisabledStateFired||P||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",P),this.setDisabledStateFired=!0}fireUncheck(P){this.writeValue(P)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(l.Qsj),l.Y36(l.SBq),l.Y36(Ao),l.Y36(l.zs3))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("change",function(){return se.onChange()})("blur",function(){return se.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[l._Bn([Es]),l.qOj]})}return z})();const Or={provide:Te,useExisting:(0,l.Gpc)(()=>Ts),multi:!0};let Ts=(()=>{class z extends ve{writeValue(P){this.setProperty("value",parseFloat(P))}registerOnChange(P){this.onChange=Y=>{P(""==Y?null:parseFloat(Y))}}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("change",function(nn){return se.onChange(nn.target.value)})("input",function(nn){return se.onChange(nn.target.value)})("blur",function(){return se.onTouched()})},features:[l._Bn([Or]),l.qOj]})}return z})();const Zt=new l.OlP("NgModelWithFormControlWarning"),os={provide:kt,useExisting:(0,l.Gpc)(()=>_i)};let _i=(()=>{class z extends kt{constructor(P,Y,se){super(),this.callSetDisabledState=se,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new l.vpe,this._setValidators(P),this._setAsyncValidators(Y)}ngOnChanges(P){this._checkFormPresent(),P.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(oe(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(P){const Y=this.form.get(P.path);return sn(Y,P,this.callSetDisabledState),Y.updateValueAndValidity({emitEvent:!1}),this.directives.push(P),Y}getControl(P){return this.form.get(P.path)}removeControl(P){Ot(P.control||null,P,!1),function zi(z,$){const P=z.indexOf($);P>-1&&z.splice(P,1)}(this.directives,P)}addFormGroup(P){this._setUpFormContainer(P)}removeFormGroup(P){this._cleanUpFormContainer(P)}getFormGroup(P){return this.form.get(P.path)}addFormArray(P){this._setUpFormContainer(P)}removeFormArray(P){this._cleanUpFormContainer(P)}getFormArray(P){return this.form.get(P.path)}updateModel(P,Y){this.form.get(P.path).setValue(Y)}onSubmit(P){return this.submitted=!0,Wt(this.form,this.directives),this.ngSubmit.emit(P),"dialog"===P?.target?.method}onReset(){this.resetForm()}resetForm(P=void 0){this.form.reset(P),this.submitted=!1}_updateDomValue(){this.directives.forEach(P=>{const Y=P.control,se=this.form.get(P.path);Y!==se&&(Ot(Y||null,P),(z=>z instanceof di)(se)&&(sn(se,P,this.callSetDisabledState),P.control=se))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(P){const Y=this.form.get(P.path);rt(Y,P),Y.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(P){if(this.form){const Y=this.form.get(P.path);Y&&function Kt(z,$){return oe(z,$)}(Y,P)&&Y.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ge(this.form,this),this._oldForm&&oe(this._oldForm,this)}_checkFormPresent(){}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(Re,10),l.Y36(at,10),l.Y36(lt,8))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","formGroup",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("submit",function(nn){return se.onSubmit(nn)})("reset",function(){return se.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[l._Bn([os]),l.qOj,l.TTD]})}return z})();const Wr={provide:kt,useExisting:(0,l.Gpc)(()=>Ui)};let Ui=(()=>{class z extends hn{constructor(P,Y,se){super(),this.name=null,this._parent=P,this._setValidators(Y),this._setAsyncValidators(se)}_checkParentType(){Is(this._parent)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,13),l.Y36(Re,10),l.Y36(at,10))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[l._Bn([Wr]),l.qOj]})}return z})();const as={provide:kt,useExisting:(0,l.Gpc)(()=>Zr)};let Zr=(()=>{class z extends kt{constructor(P,Y,se){super(),this.name=null,this._parent=P,this._setValidators(Y),this._setAsyncValidators(se)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Mt(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){Is(this._parent)}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,13),l.Y36(Re,10),l.Y36(at,10))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[l._Bn([as]),l.qOj]})}return z})();function Is(z){return!(z instanceof Ui||z instanceof _i||z instanceof Zr)}const On={provide:mn,useExisting:(0,l.Gpc)(()=>dt)};let dt=(()=>{class z extends mn{set isDisabled(P){}static#e=this._ngModelWarningSentOnce=!1;constructor(P,Y,se,Tt,nn){super(),this._ngModelWarningConfig=nn,this._added=!1,this.name=null,this.update=new l.vpe,this._ngModelWarningSent=!1,this._parent=P,this._setValidators(Y),this._setAsyncValidators(se),this.valueAccessor=dn(0,Tt)}ngOnChanges(P){this._added||this._setUpControl(),Fn(P,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(P){this.viewModel=P,this.update.emit(P)}get path(){return Mt(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static#t=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(kt,13),l.Y36(Re,10),l.Y36(at,10),l.Y36(Te,10),l.Y36(Zt,8))};static#n=this.\u0275dir=l.lG2({type:z,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[l._Bn([On]),l.qOj,l.TTD]})}return z})();const Ht={provide:Te,useExisting:(0,l.Gpc)(()=>Rr),multi:!0};function _n(z,$){return null==z?`${$}`:($&&"object"==typeof $&&($="Object"),`${z}: ${$}`.slice(0,50))}let Rr=(()=>{class z extends ve{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(P){this._compareWith=P}writeValue(P){this.value=P;const se=_n(this._getOptionId(P),P);this.setProperty("value",se)}registerOnChange(P){this.onChange=Y=>{this.value=this._getOptionValue(Y),P(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(P){for(const Y of this._optionMap.keys())if(this._compareWith(this._optionMap.get(Y),P))return Y;return null}_getOptionValue(P){const Y=function fi(z){return z.split(":")[0]}(P);return this._optionMap.has(Y)?this._optionMap.get(Y):P}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(Y,se){1&Y&&l.NdJ("change",function(nn){return se.onChange(nn.target.value)})("blur",function(){return se.onTouched()})},inputs:{compareWith:"compareWith"},features:[l._Bn([Ht]),l.qOj]})}return z})(),ri=(()=>{class z{constructor(P,Y,se){this._element=P,this._renderer=Y,this._select=se,this._select&&(this.id=this._select._registerOption())}set ngValue(P){null!=this._select&&(this._select._optionMap.set(this.id,P),this._setElementValue(_n(this.id,P)),this._select.writeValue(this._select.value))}set value(P){this._setElementValue(P),this._select&&this._select.writeValue(this._select.value)}_setElementValue(P){this._renderer.setProperty(this._element.nativeElement,"value",P)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(Rr,9))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}return z})();const mr={provide:Te,useExisting:(0,l.Gpc)(()=>Ft),multi:!0};function yn(z,$){return null==z?`${$}`:("string"==typeof $&&($=`'${$}'`),$&&"object"==typeof $&&($="Object"),`${z}: ${$}`.slice(0,50))}let Ft=(()=>{class z extends ve{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(P){this._compareWith=P}writeValue(P){let Y;if(this.value=P,Array.isArray(P)){const se=P.map(Tt=>this._getOptionId(Tt));Y=(Tt,nn)=>{Tt._setSelected(se.indexOf(nn.toString())>-1)}}else Y=(se,Tt)=>{se._setSelected(!1)};this._optionMap.forEach(Y)}registerOnChange(P){this.onChange=Y=>{const se=[],Tt=Y.selectedOptions;if(void 0!==Tt){const nn=Tt;for(let An=0;An{class z{constructor(P,Y,se){this._element=P,this._renderer=Y,this._select=se,this._select&&(this.id=this._select._registerOption(this))}set ngValue(P){null!=this._select&&(this._value=P,this._setElementValue(yn(this.id,P)),this._select.writeValue(this._select.value))}set value(P){this._select?(this._value=P,this._setElementValue(yn(this.id,P)),this._select.writeValue(this._select.value)):this._setElementValue(P)}_setElementValue(P){this._renderer.setProperty(this._element.nativeElement,"value",P)}_setSelected(P){this._renderer.setProperty(this._element.nativeElement,"selected",P)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static#e=this.\u0275fac=function(Y){return new(Y||z)(l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(Ft,9))};static#t=this.\u0275dir=l.lG2({type:z,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}return z})();function qr(z){return"number"==typeof z?z:parseFloat(z)}let wn=(()=>{class z{constructor(){this._validator=$t}ngOnChanges(P){if(this.inputName in P){const Y=this.normalizeInput(P[this.inputName].currentValue);this._enabled=this.enabled(Y),this._validator=this._enabled?this.createValidator(Y):$t,this._onChange&&this._onChange()}}validate(P){return this._validator(P)}registerOnValidatorChange(P){this._onChange=P}enabled(P){return null!=P}static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275dir=l.lG2({type:z,features:[l.TTD]})}return z})();const Gs={provide:Re,useExisting:(0,l.Gpc)(()=>Er),multi:!0};let Er=(()=>{class z extends wn{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=P=>qr(P),this.createValidator=P=>Pe(P)}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(Y,se){2&Y&&l.uIk("max",se._enabled?se.max:null)},inputs:{max:"max"},features:[l._Bn([Gs]),l.qOj]})}return z})();const $i={provide:Re,useExisting:(0,l.Gpc)(()=>Kr),multi:!0};let Kr=(()=>{class z extends wn{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=P=>qr(P),this.createValidator=P=>ne(P)}static#e=this.\u0275fac=function(){let P;return function(se){return(P||(P=l.n5z(z)))(se||z)}}();static#t=this.\u0275dir=l.lG2({type:z,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(Y,se){2&Y&&l.uIk("min",se._enabled?se.min:null)},inputs:{min:"min"},features:[l._Bn([$i]),l.qOj]})}return z})(),Qn=(()=>{class z{static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275mod=l.oAB({type:z});static#n=this.\u0275inj=l.cJS({imports:[oo]})}return z})(),lo=(()=>{class z{static withConfig(P){return{ngModule:z,providers:[{provide:lt,useValue:P.callSetDisabledState??Et}]}}static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275mod=l.oAB({type:z});static#n=this.\u0275inj=l.cJS({imports:[Qn]})}return z})(),ds=(()=>{class z{static withConfig(P){return{ngModule:z,providers:[{provide:Zt,useValue:P.warnOnNgModelWithFormControl??"always"},{provide:lt,useValue:P.callSetDisabledState??Et}]}}static#e=this.\u0275fac=function(Y){return new(Y||z)};static#t=this.\u0275mod=l.oAB({type:z});static#n=this.\u0275inj=l.cJS({imports:[Qn]})}return z})()},5813:(ct,De,L)=>{L.d(De,{Dx:()=>nr,b2:()=>an,q6:()=>Ut,se:()=>Je});var l=L(3714),k=L(3223);class de extends k.w_{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class re extends de{static makeCurrent(){(0,k.HT)(new re)}onAndCancel(we,ie,pe){return we.addEventListener(ie,pe),()=>{we.removeEventListener(ie,pe)}}dispatchEvent(we,ie){we.dispatchEvent(ie)}remove(we){we.parentNode&&we.parentNode.removeChild(we)}createElement(we,ie){return(ie=ie||this.getDefaultDocument()).createElement(we)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(we){return we.nodeType===Node.ELEMENT_NODE}isShadowRoot(we){return we instanceof DocumentFragment}getGlobalEventTarget(we,ie){return"window"===ie?window:"document"===ie?we:"body"===ie?we.body:null}getBaseHref(we){const ie=function _e(){return ce=ce||document.querySelector("base"),ce?ce.getAttribute("href"):null}();return null==ie?null:function Te(Be){ve=ve||document.createElement("a"),ve.setAttribute("href",Be);const we=ve.pathname;return"/"===we.charAt(0)?we:`/${we}`}(ie)}resetBaseElement(){ce=null}getUserAgent(){return window.navigator.userAgent}getCookie(we){return(0,k.Mx)(document.cookie,we)}}let ve,ce=null,ae=(()=>{class Be{build(){return new XMLHttpRequest}static#e=this.\u0275fac=function(pe){return new(pe||Be)};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();const fe=new l.OlP("EventManagerPlugins");let ye=(()=>{class Be{constructor(ie,pe){this._zone=pe,this._eventNameToPlugin=new Map,ie.forEach($e=>{$e.manager=this}),this._plugins=ie.slice().reverse()}addEventListener(ie,pe,$e){return this._findPluginFor(pe).addEventListener(ie,pe,$e)}getZone(){return this._zone}_findPluginFor(ie){let pe=this._eventNameToPlugin.get(ie);if(pe)return pe;if(pe=this._plugins.find(lt=>lt.supports(ie)),!pe)throw new l.vHH(5101,!1);return this._eventNameToPlugin.set(ie,pe),pe}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(fe),l.LFG(l.R0b))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();class Ve{constructor(we){this._doc=we}}const ke="ng-app-id";let He=(()=>{class Be{constructor(ie,pe,$e,lt={}){this.doc=ie,this.appId=pe,this.nonce=$e,this.platformId=lt,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=(0,k.PM)(lt),this.resetHostNodes()}addStyles(ie){for(const pe of ie)1===this.changeUsageCount(pe,1)&&this.onStyleAdded(pe)}removeStyles(ie){for(const pe of ie)this.changeUsageCount(pe,-1)<=0&&this.onStyleRemoved(pe)}ngOnDestroy(){const ie=this.styleNodesInDOM;ie&&(ie.forEach(pe=>pe.remove()),ie.clear());for(const pe of this.getAllStyles())this.onStyleRemoved(pe);this.resetHostNodes()}addHost(ie){this.hostNodes.add(ie);for(const pe of this.getAllStyles())this.addStyleToHost(ie,pe)}removeHost(ie){this.hostNodes.delete(ie)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(ie){for(const pe of this.hostNodes)this.addStyleToHost(pe,ie)}onStyleRemoved(ie){const pe=this.styleRef;pe.get(ie)?.elements?.forEach($e=>$e.remove()),pe.delete(ie)}collectServerRenderedStyles(){const ie=this.doc.head?.querySelectorAll(`style[${ke}="${this.appId}"]`);if(ie?.length){const pe=new Map;return ie.forEach($e=>{null!=$e.textContent&&pe.set($e.textContent,$e)}),pe}return null}changeUsageCount(ie,pe){const $e=this.styleRef;if($e.has(ie)){const lt=$e.get(ie);return lt.usage+=pe,lt.usage}return $e.set(ie,{usage:pe,elements:[]}),pe}getStyleElement(ie,pe){const $e=this.styleNodesInDOM,lt=$e?.get(pe);if(lt?.parentNode===ie)return $e.delete(pe),lt.removeAttribute(ke),lt;{const Et=this.doc.createElement("style");return this.nonce&&Et.setAttribute("nonce",this.nonce),Et.textContent=pe,this.platformIsServer&&Et.setAttribute(ke,this.appId),Et}}addStyleToHost(ie,pe){const $e=this.getStyleElement(ie,pe);ie.appendChild($e);const lt=this.styleRef,Et=lt.get(pe)?.elements;Et?Et.push($e):lt.set(pe,{elements:[$e],usage:1})}resetHostNodes(){const ie=this.hostNodes;ie.clear(),ie.add(this.doc.head)}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(k.K0),l.LFG(l.AFp),l.LFG(l.Ojb,8),l.LFG(l.Lbi))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();const Le={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},Re=/%COMP%/g,Pe=new l.OlP("RemoveStylesOnCompDestroy",{providedIn:"root",factory:()=>!1});function it(Be,we){return we.map(ie=>ie.replace(Re,Be))}let Je=(()=>{class Be{constructor(ie,pe,$e,lt,Et,Mt,sn,Ot=null){this.eventManager=ie,this.sharedStylesHost=pe,this.appId=$e,this.removeStylesOnCompDestroy=lt,this.doc=Et,this.platformId=Mt,this.ngZone=sn,this.nonce=Ot,this.rendererByCompId=new Map,this.platformIsServer=(0,k.PM)(Mt),this.defaultRenderer=new wt(ie,Et,sn,this.platformIsServer)}createRenderer(ie,pe){if(!ie||!pe)return this.defaultRenderer;this.platformIsServer&&pe.encapsulation===l.ifc.ShadowDom&&(pe={...pe,encapsulation:l.ifc.Emulated});const $e=this.getOrCreateRenderer(ie,pe);return $e instanceof Nt?$e.applyToHost(ie):$e instanceof Bn&&$e.applyStyles(),$e}getOrCreateRenderer(ie,pe){const $e=this.rendererByCompId;let lt=$e.get(pe.id);if(!lt){const Et=this.doc,Mt=this.ngZone,sn=this.eventManager,Ot=this.sharedStylesHost,Gn=this.removeStylesOnCompDestroy,ji=this.platformIsServer;switch(pe.encapsulation){case l.ifc.Emulated:lt=new Nt(sn,Ot,pe,this.appId,Gn,Et,Mt,ji);break;case l.ifc.ShadowDom:return new Sn(sn,Ot,ie,pe,Et,Mt,this.nonce,ji);default:lt=new Bn(sn,Ot,pe,Gn,Et,Mt,ji)}$e.set(pe.id,lt)}return lt}ngOnDestroy(){this.rendererByCompId.clear()}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(ye),l.LFG(He),l.LFG(l.AFp),l.LFG(Pe),l.LFG(k.K0),l.LFG(l.Lbi),l.LFG(l.R0b),l.LFG(l.Ojb))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();class wt{constructor(we,ie,pe,$e){this.eventManager=we,this.doc=ie,this.ngZone=pe,this.platformIsServer=$e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(we,ie){return ie?this.doc.createElementNS(Le[ie]||ie,we):this.doc.createElement(we)}createComment(we){return this.doc.createComment(we)}createText(we){return this.doc.createTextNode(we)}appendChild(we,ie){(Vn(we)?we.content:we).appendChild(ie)}insertBefore(we,ie,pe){we&&(Vn(we)?we.content:we).insertBefore(ie,pe)}removeChild(we,ie){we&&we.removeChild(ie)}selectRootElement(we,ie){let pe="string"==typeof we?this.doc.querySelector(we):we;if(!pe)throw new l.vHH(-5104,!1);return ie||(pe.textContent=""),pe}parentNode(we){return we.parentNode}nextSibling(we){return we.nextSibling}setAttribute(we,ie,pe,$e){if($e){ie=$e+":"+ie;const lt=Le[$e];lt?we.setAttributeNS(lt,ie,pe):we.setAttribute(ie,pe)}else we.setAttribute(ie,pe)}removeAttribute(we,ie,pe){if(pe){const $e=Le[pe];$e?we.removeAttributeNS($e,ie):we.removeAttribute(`${pe}:${ie}`)}else we.removeAttribute(ie)}addClass(we,ie){we.classList.add(ie)}removeClass(we,ie){we.classList.remove(ie)}setStyle(we,ie,pe,$e){$e&(l.JOm.DashCase|l.JOm.Important)?we.style.setProperty(ie,pe,$e&l.JOm.Important?"important":""):we.style[ie]=pe}removeStyle(we,ie,pe){pe&l.JOm.DashCase?we.style.removeProperty(ie):we.style[ie]=""}setProperty(we,ie,pe){we[ie]=pe}setValue(we,ie){we.nodeValue=ie}listen(we,ie,pe){if("string"==typeof we&&!(we=(0,k.q)().getGlobalEventTarget(this.doc,we)))throw new Error(`Unsupported event target ${we} for event ${ie}`);return this.eventManager.addEventListener(we,ie,this.decoratePreventDefault(pe))}decoratePreventDefault(we){return ie=>{if("__ngUnwrap__"===ie)return we;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>we(ie)):we(ie))&&ie.preventDefault()}}}function Vn(Be){return"TEMPLATE"===Be.tagName&&void 0!==Be.content}class Sn extends wt{constructor(we,ie,pe,$e,lt,Et,Mt,sn){super(we,lt,Et,sn),this.sharedStylesHost=ie,this.hostEl=pe,this.shadowRoot=pe.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const Ot=it($e.id,$e.styles);for(const Gn of Ot){const ji=document.createElement("style");Mt&&ji.setAttribute("nonce",Mt),ji.textContent=Gn,this.shadowRoot.appendChild(ji)}}nodeOrShadowRoot(we){return we===this.hostEl?this.shadowRoot:we}appendChild(we,ie){return super.appendChild(this.nodeOrShadowRoot(we),ie)}insertBefore(we,ie,pe){return super.insertBefore(this.nodeOrShadowRoot(we),ie,pe)}removeChild(we,ie){return super.removeChild(this.nodeOrShadowRoot(we),ie)}parentNode(we){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(we)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class Bn extends wt{constructor(we,ie,pe,$e,lt,Et,Mt,sn){super(we,lt,Et,Mt),this.sharedStylesHost=ie,this.removeStylesOnCompDestroy=$e,this.styles=sn?it(sn,pe.styles):pe.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class Nt extends Bn{constructor(we,ie,pe,$e,lt,Et,Mt,sn){const Ot=$e+"-"+pe.id;super(we,ie,pe,lt,Et,Mt,sn,Ot),this.contentAttr=function Me(Be){return"_ngcontent-%COMP%".replace(Re,Be)}(Ot),this.hostAttr=function nt(Be){return"_nghost-%COMP%".replace(Re,Be)}(Ot)}applyToHost(we){this.applyStyles(),this.setAttribute(we,this.hostAttr,"")}createElement(we,ie){const pe=super.createElement(we,ie);return super.setAttribute(pe,this.contentAttr,""),pe}}let Ar=(()=>{class Be extends Ve{constructor(ie){super(ie)}supports(ie){return!0}addEventListener(ie,pe,$e){return ie.addEventListener(pe,$e,!1),()=>this.removeEventListener(ie,pe,$e)}removeEventListener(ie,pe,$e){return ie.removeEventListener(pe,$e)}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(k.K0))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();const Qi=["alt","control","meta","shift"],xe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Oe={alt:Be=>Be.altKey,control:Be=>Be.ctrlKey,meta:Be=>Be.metaKey,shift:Be=>Be.shiftKey};let Fe=(()=>{class Be extends Ve{constructor(ie){super(ie)}supports(ie){return null!=Be.parseEventName(ie)}addEventListener(ie,pe,$e){const lt=Be.parseEventName(pe),Et=Be.eventCallback(lt.fullKey,$e,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>(0,k.q)().onAndCancel(ie,lt.domEventName,Et))}static parseEventName(ie){const pe=ie.toLowerCase().split("."),$e=pe.shift();if(0===pe.length||"keydown"!==$e&&"keyup"!==$e)return null;const lt=Be._normalizeKey(pe.pop());let Et="",Mt=pe.indexOf("code");if(Mt>-1&&(pe.splice(Mt,1),Et="code."),Qi.forEach(Ot=>{const Gn=pe.indexOf(Ot);Gn>-1&&(pe.splice(Gn,1),Et+=Ot+".")}),Et+=lt,0!=pe.length||0===lt.length)return null;const sn={};return sn.domEventName=$e,sn.fullKey=Et,sn}static matchEventFullKeyCode(ie,pe){let $e=xe[ie.key]||ie.key,lt="";return pe.indexOf("code.")>-1&&($e=ie.code,lt="code."),!(null==$e||!$e)&&($e=$e.toLowerCase()," "===$e?$e="space":"."===$e&&($e="dot"),Qi.forEach(Et=>{Et!==$e&&(0,Oe[Et])(ie)&&(lt+=Et+".")}),lt+=$e,lt===pe)}static eventCallback(ie,pe,$e){return lt=>{Be.matchEventFullKeyCode(lt,ie)&&$e.runGuarded(()=>pe(lt))}}static _normalizeKey(ie){return"esc"===ie?"escape":ie}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(k.K0))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:Be.\u0275fac})}return Be})();const Ut=(0,l.eFA)(l._c5,"browser",[{provide:l.Lbi,useValue:k.bD},{provide:l.g9A,useValue:function ot(){re.makeCurrent()},multi:!0},{provide:k.K0,useFactory:function Xe(){return(0,l.RDi)(document),document},deps:[]}]),kt=new l.OlP(""),mn=[{provide:l.rWj,useClass:class be{addToWindow(we){l.dqk.getAngularTestability=(pe,$e=!0)=>{const lt=we.findTestabilityInTree(pe,$e);if(null==lt)throw new l.vHH(5103,!1);return lt},l.dqk.getAllAngularTestabilities=()=>we.getAllTestabilities(),l.dqk.getAllAngularRootElements=()=>we.getAllRootElements(),l.dqk.frameworkStabilizers||(l.dqk.frameworkStabilizers=[]),l.dqk.frameworkStabilizers.push(pe=>{const $e=l.dqk.getAllAngularTestabilities();let lt=$e.length,Et=!1;const Mt=function(sn){Et=Et||sn,lt--,0==lt&&pe(Et)};$e.forEach(sn=>{sn.whenStable(Mt)})})}findTestabilityInTree(we,ie,pe){return null==ie?null:we.getTestability(ie)??(pe?(0,k.q)().isShadowRoot(ie)?this.findTestabilityInTree(we,ie.host,!0):this.findTestabilityInTree(we,ie.parentElement,!0):null)}},deps:[]},{provide:l.lri,useClass:l.dDg,deps:[l.R0b,l.eoX,l.rWj]},{provide:l.dDg,useClass:l.dDg,deps:[l.R0b,l.eoX,l.rWj]}],li=[{provide:l.zSh,useValue:"root"},{provide:l.qLn,useFactory:function ei(){return new l.qLn},deps:[]},{provide:fe,useClass:Ar,multi:!0,deps:[k.K0,l.R0b,l.Lbi]},{provide:fe,useClass:Fe,multi:!0,deps:[k.K0]},Je,He,ye,{provide:l.FYo,useExisting:Je},{provide:k.JF,useClass:ae,deps:[]},[]];let an=(()=>{class Be{constructor(ie){}static withServerTransition(ie){return{ngModule:Be,providers:[{provide:l.AFp,useValue:ie.appId}]}}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(kt,12))};static#t=this.\u0275mod=l.oAB({type:Be});static#n=this.\u0275inj=l.cJS({providers:[...li,...mn],imports:[k.ez,l.hGG]})}return Be})(),nr=(()=>{class Be{constructor(ie){this._doc=ie}getTitle(){return this._doc.title}setTitle(ie){this._doc.title=ie||""}static#e=this.\u0275fac=function(pe){return new(pe||Be)(l.LFG(k.K0))};static#t=this.\u0275prov=l.Yz7({token:Be,factory:function(pe){let $e=null;return $e=pe?new pe:function fr(){return new nr((0,l.LFG)(k.K0))}(),$e},providedIn:"root"})}return Be})();typeof window<"u"&&window},1794:(ct,De,L)=>{L.d(De,{gz:()=>Ui,m2:()=>di,OD:()=>sr,wm:()=>yi,F0:()=>on,rH:()=>vt,Od:()=>Bt,Bz:()=>yr,lC:()=>Rr});var l=L(3714),k=L(2861),de=L(3477),re=L(287),ce=L(8626),_e=L(841),ve=L(4938),Te=L(8402),be=L(1145),ae=L(9417);function fe(I){return new be.y(O=>{(0,ae.Xf)(I()).subscribe(O)})}var ye=L(5357),Ve=L(89);function ke(I,O){const w=(0,Ve.m)(I)?I:()=>I,R=H=>H.error(w());return new be.y(O?H=>O.schedule(R,0,H):R)}var He=L(1288),Le=L(5350),Re=L(4134),at=L(8014);function Dt(){return(0,Re.e)((I,O)=>{let w=null;I._refCount++;const R=(0,at.x)(O,void 0,void 0,void 0,()=>{if(!I||I._refCount<=0||0<--I._refCount)return void(w=null);const H=I._connection,Q=w;w=null,H&&(!Q||H===Q)&&H.unsubscribe(),O.unsubscribe()});I.subscribe(R),R.closed||(w=I.connect())})}class ut extends be.y{constructor(O,w){super(),this.source=O,this.subjectFactory=w,this._subject=null,this._refCount=0,this._connection=null,(0,Re.A)(O)&&(this.lift=O.lift)}_subscribe(O){return this.getSubject().subscribe(O)}getSubject(){const O=this._subject;return(!O||O.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:O}=this;this._subject=this._connection=null,O?.unsubscribe()}connect(){let O=this._connection;if(!O){O=this._connection=new Le.w0;const w=this.getSubject();O.add(this.source.subscribe((0,at.x)(w,void 0,()=>{this._teardown(),w.complete()},R=>{this._teardown(),w.error(R)},()=>this._teardown()))),O.closed&&(this._connection=null,O=Le.w0.EMPTY)}return O}refCount(){return Dt()(this)}}var ne=L(5992),Pe=L(3223),Me=L(5990),nt=L(3318),it=L(4359),Je=L(1553),wt=L(9735),mt=L(2874),$t=L(2972),Vn=L(1173),Sn=L(8527);function Bn(I){return(0,Re.e)((O,w)=>{let Q,R=null,H=!1;R=O.subscribe((0,at.x)(w,void 0,void 0,ee=>{Q=(0,ae.Xf)(I(ee,Bn(I)(O))),R?(R.unsubscribe(),R=null,Q.subscribe(w)):H=!0})),H&&(R.unsubscribe(),R=null,Q.subscribe(w))})}var Qi=L(4475);function xe(I){return I<=0?()=>He.E:(0,Re.e)((O,w)=>{let R=[];O.subscribe((0,at.x)(w,H=>{R.push(H),I{for(const H of R)w.next(H);w.complete()},void 0,()=>{R=null}))})}var Oe=L(8090),Fe=L(1106),We=L(3197),Ke=L(5220),_t=L(7701),ot=L(8563),ei=L(5813);const Xe="primary",cn=Symbol("RouteTitle");class Ut{constructor(O){this.params=O||{}}has(O){return Object.prototype.hasOwnProperty.call(this.params,O)}get(O){if(this.has(O)){const w=this.params[O];return Array.isArray(w)?w[0]:w}return null}getAll(O){if(this.has(O)){const w=this.params[O];return Array.isArray(w)?w:[w]}return[]}get keys(){return Object.keys(this.params)}}function kt(I){return new Ut(I)}function mn(I,O,w){const R=w.path.split("/");if(R.length>I.length||"full"===w.pathMatch&&(O.hasChildren()||R.lengthR[Q]===H)}return I===O}function Vi(I){return I.length>0?I[I.length-1]:null}function xi(I){return(0,k.b)(I)?I:(0,l.QGY)(I)?(0,de.D)(Promise.resolve(I)):(0,re.of)(I)}const fr={exact:function xt(I,O,w){if(!yt(I.segments,O.segments)||!pr(I.segments,O.segments,w)||I.numberOfChildren!==O.numberOfChildren)return!1;for(const R in O.children)if(!I.children[R]||!xt(I.children[R],O.children[R],w))return!1;return!0},subset:qt},nr={exact:function Oi(I,O){return an(I,O)},subset:function en(I,O){return Object.keys(O).length<=Object.keys(I).length&&Object.keys(O).every(w=>Li(I[w],O[w]))},ignored:()=>!0};function ir(I,O,w){return fr[w.paths](I.root,O.root,w.matrixParams)&&nr[w.queryParams](I.queryParams,O.queryParams)&&!("exact"===w.fragment&&I.fragment!==O.fragment)}function qt(I,O,w){return ci(I,O,O.segments,w)}function ci(I,O,w,R){if(I.segments.length>w.length){const H=I.segments.slice(0,w.length);return!(!yt(H,w)||O.hasChildren()||!pr(H,w,R))}if(I.segments.length===w.length){if(!yt(I.segments,w)||!pr(I.segments,w,R))return!1;for(const H in O.children)if(!I.children[H]||!qt(I.children[H],O.children[H],R))return!1;return!0}{const H=w.slice(0,I.segments.length),Q=w.slice(I.segments.length);return!!(yt(I.segments,H)&&pr(I.segments,H,R)&&I.children[Xe])&&ci(I.children[Xe],O,Q,R)}}function pr(I,O,w){return O.every((R,H)=>nr[w](I[H].parameters,R.parameters))}class Ri{constructor(O=new bt([],{}),w={},R=null){this.root=O,this.queryParams=w,this.fragment=R}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=kt(this.queryParams)),this._queryParamMap}toString(){return Nn.serialize(this)}}class bt{constructor(O,w){this.segments=O,this.children=w,this.parent=null,Object.values(w).forEach(R=>R.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return qi(this)}}class Un{constructor(O,w){this.path=O,this.parameters=w}get parameterMap(){return this._parameterMap||(this._parameterMap=kt(this.parameters)),this._parameterMap}toString(){return Pi(this)}}function yt(I,O){return I.length===O.length&&I.every((w,R)=>w.path===O[R].path)}let tn=(()=>{class I{static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:function(){return new Dr},providedIn:"root"})}return I})();class Dr{parse(O){const w=new sn(O);return new Ri(w.parseRootSegment(),w.parseQueryParams(),w.parseFragment())}serialize(O){const w=`/${ti(O.root,!0)}`,R=function ws(I){const O=Object.keys(I).map(w=>{const R=I[w];return Array.isArray(R)?R.map(H=>`${$n(w)}=${$n(H)}`).join("&"):`${$n(w)}=${$n(R)}`}).filter(w=>!!w);return O.length?`?${O.join("&")}`:""}(O.queryParams);return`${w}${R}${"string"==typeof O.fragment?`#${function vi(I){return encodeURI(I)}(O.fragment)}`:""}`}}const Nn=new Dr;function qi(I){return I.segments.map(O=>Pi(O)).join("/")}function ti(I,O){if(!I.hasChildren())return qi(I);if(O){const w=I.children[Xe]?ti(I.children[Xe],!1):"",R=[];return Object.entries(I.children).forEach(([H,Q])=>{H!==Xe&&R.push(`${H}:${ti(Q,!1)}`)}),R.length>0?`${w}(${R.join("//")})`:w}{const w=function $r(I,O){let w=[];return Object.entries(I.children).forEach(([R,H])=>{R===Xe&&(w=w.concat(O(H,R)))}),Object.entries(I.children).forEach(([R,H])=>{R!==Xe&&(w=w.concat(O(H,R)))}),w}(I,(R,H)=>H===Xe?[ti(I.children[Xe],!1)]:[`${H}:${ti(R,!1)}`]);return 1===Object.keys(I.children).length&&null!=I.children[Xe]?`${qi(I)}/${w[0]}`:`${qi(I)}/(${w.join("//")})`}}function ni(I){return encodeURIComponent(I).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $n(I){return ni(I).replace(/%3B/gi,";")}function rr(I){return ni(I).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Mr(I){return decodeURIComponent(I)}function Bi(I){return Mr(I.replace(/\+/g,"%20"))}function Pi(I){return`${rr(I.path)}${function Hi(I){return Object.keys(I).map(O=>`;${rr(O)}=${rr(I[O])}`).join("")}(I.parameters)}`}const Be=/^[^\/()?;#]+/;function we(I){const O=I.match(Be);return O?O[0]:""}const ie=/^[^\/()?;=#]+/,$e=/^[^=?&#]+/,Et=/^[^&#]+/;class sn{constructor(O){this.url=O,this.remaining=O}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new bt([],{}):new bt([],this.parseChildren())}parseQueryParams(){const O={};if(this.consumeOptional("?"))do{this.parseQueryParam(O)}while(this.consumeOptional("&"));return O}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const O=[];for(this.peekStartsWith("(")||O.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),O.push(this.parseSegment());let w={};this.peekStartsWith("/(")&&(this.capture("/"),w=this.parseParens(!0));let R={};return this.peekStartsWith("(")&&(R=this.parseParens(!1)),(O.length>0||Object.keys(w).length>0)&&(R[Xe]=new bt(O,w)),R}parseSegment(){const O=we(this.remaining);if(""===O&&this.peekStartsWith(";"))throw new l.vHH(4009,!1);return this.capture(O),new Un(Mr(O),this.parseMatrixParams())}parseMatrixParams(){const O={};for(;this.consumeOptional(";");)this.parseParam(O);return O}parseParam(O){const w=function pe(I){const O=I.match(ie);return O?O[0]:""}(this.remaining);if(!w)return;this.capture(w);let R="";if(this.consumeOptional("=")){const H=we(this.remaining);H&&(R=H,this.capture(R))}O[Mr(w)]=Mr(R)}parseQueryParam(O){const w=function lt(I){const O=I.match($e);return O?O[0]:""}(this.remaining);if(!w)return;this.capture(w);let R="";if(this.consumeOptional("=")){const ee=function Mt(I){const O=I.match(Et);return O?O[0]:""}(this.remaining);ee&&(R=ee,this.capture(R))}const H=Bi(w),Q=Bi(R);if(O.hasOwnProperty(H)){let ee=O[H];Array.isArray(ee)||(ee=[ee],O[H]=ee),ee.push(Q)}else O[H]=Q}parseParens(O){const w={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const R=we(this.remaining),H=this.remaining[R.length];if("/"!==H&&")"!==H&&";"!==H)throw new l.vHH(4010,!1);let Q;R.indexOf(":")>-1?(Q=R.slice(0,R.indexOf(":")),this.capture(Q),this.capture(":")):O&&(Q=Xe);const ee=this.parseChildren();w[Q]=1===Object.keys(ee).length?ee[Xe]:new bt([],ee),this.consumeOptional("//")}return w}peekStartsWith(O){return this.remaining.startsWith(O)}consumeOptional(O){return!!this.peekStartsWith(O)&&(this.remaining=this.remaining.substring(O.length),!0)}capture(O){if(!this.consumeOptional(O))throw new l.vHH(4011,!1)}}function Ot(I){return I.segments.length>0?new bt([],{[Xe]:I}):I}function Gn(I){const O={};for(const R of Object.keys(I.children)){const Q=Gn(I.children[R]);if(R===Xe&&0===Q.segments.length&&Q.hasChildren())for(const[ee,Ae]of Object.entries(Q.children))O[ee]=Ae;else(Q.segments.length>0||Q.hasChildren())&&(O[R]=Q)}return function ji(I){if(1===I.numberOfChildren&&I.children[Xe]){const O=I.children[Xe];return new bt(I.segments.concat(O.segments),O.children)}return I}(new bt(I.segments,O))}function ge(I){return I instanceof Ri}function ue(I){let O;const H=Ot(function w(Q){const ee={};for(const Ie of Q.children){const pt=w(Ie);ee[Ie.outlet]=pt}const Ae=new bt(Q.url,ee);return Q===I&&(O=Ae),Ae}(I.root));return O??H}function ze(I,O,w,R){let H=I;for(;H.parent;)H=H.parent;if(0===O.length)return rt(H,H,H,w,R);const Q=function En(I){if("string"==typeof I[0]&&1===I.length&&"/"===I[0])return new ht(!0,0,I);let O=0,w=!1;const R=I.reduce((H,Q,ee)=>{if("object"==typeof Q&&null!=Q){if(Q.outlets){const Ae={};return Object.entries(Q.outlets).forEach(([Ie,pt])=>{Ae[Ie]="string"==typeof pt?pt.split("/"):pt}),[...H,{outlets:Ae}]}if(Q.segmentPath)return[...H,Q.segmentPath]}return"string"!=typeof Q?[...H,Q]:0===ee?(Q.split("/").forEach((Ae,Ie)=>{0==Ie&&"."===Ae||(0==Ie&&""===Ae?w=!0:".."===Ae?O++:""!=Ae&&H.push(Ae))}),H):[...H,Q]},[]);return new ht(w,O,R)}(O);if(Q.toRoot())return rt(H,H,new bt([],{}),w,R);const ee=function wi(I,O,w){if(I.isAbsolute)return new ui(O,!0,0);if(!w)return new ui(O,!1,NaN);if(null===w.parent)return new ui(w,!0,0);const R=qe(I.commands[0])?0:1;return function Ei(I,O,w){let R=I,H=O,Q=w;for(;Q>H;){if(Q-=H,R=R.parent,!R)throw new l.vHH(4005,!1);H=R.segments.length}return new ui(R,!1,H-Q)}(w,w.segments.length-1+R,I.numberOfDoubleDots)}(Q,H,I),Ae=ee.processChildren?Wt(ee.segmentGroup,ee.index,Q.commands):xn(ee.segmentGroup,ee.index,Q.commands);return rt(H,ee.segmentGroup,Ae,w,R)}function qe(I){return"object"==typeof I&&null!=I&&!I.outlets&&!I.segmentPath}function st(I){return"object"==typeof I&&null!=I&&I.outlets}function rt(I,O,w,R,H){let ee,Q={};R&&Object.entries(R).forEach(([Ie,pt])=>{Q[Ie]=Array.isArray(pt)?pt.map(Qt=>`${Qt}`):`${pt}`}),ee=I===O?w:Kt(I,O,w);const Ae=Ot(Gn(ee));return new Ri(Ae,Q,H)}function Kt(I,O,w){const R={};return Object.entries(I.children).forEach(([H,Q])=>{R[H]=Q===O?w:Kt(Q,O,w)}),new bt(I.segments,R)}class ht{constructor(O,w,R){if(this.isAbsolute=O,this.numberOfDoubleDots=w,this.commands=R,O&&R.length>0&&qe(R[0]))throw new l.vHH(4003,!1);const H=R.find(st);if(H&&H!==Vi(R))throw new l.vHH(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ui{constructor(O,w,R){this.segmentGroup=O,this.processChildren=w,this.index=R}}function xn(I,O,w){if(I||(I=new bt([],{})),0===I.segments.length&&I.hasChildren())return Wt(I,O,w);const R=function dn(I,O,w){let R=0,H=O;const Q={match:!1,pathIndex:0,commandIndex:0};for(;H=w.length)return Q;const ee=I.segments[H],Ae=w[R];if(st(Ae))break;const Ie=`${Ae}`,pt=R0&&void 0===Ie)break;if(Ie&&pt&&"object"==typeof pt&&void 0===pt.outlets){if(!Wn(Ie,pt,ee))return Q;R+=2}else{if(!Wn(Ie,{},ee))return Q;R++}H++}return{match:!0,pathIndex:H,commandIndex:R}}(I,O,w),H=w.slice(R.commandIndex);if(R.match&&R.pathIndexQ!==Xe)&&I.children[Xe]&&1===I.numberOfChildren&&0===I.children[Xe].segments.length){const Q=Wt(I.children[Xe],O,w);return new bt(I.segments,Q.children)}return Object.entries(R).forEach(([Q,ee])=>{"string"==typeof ee&&(ee=[ee]),null!==ee&&(H[Q]=xn(I.children[Q],O,ee))}),Object.entries(I.children).forEach(([Q,ee])=>{void 0===R[Q]&&(H[Q]=ee)}),new bt(I.segments,H)}}function zi(I,O,w){const R=I.segments.slice(0,O);let H=0;for(;H{"string"==typeof R&&(R=[R]),null!==R&&(O[w]=zi(new bt([],{}),0,R))}),O}function Yn(I){const O={};return Object.entries(I).forEach(([w,R])=>O[w]=`${R}`),O}function Wn(I,O,w){return I==w.path&&an(O,w.parameters)}const Si="imperative";class Ti{constructor(O,w){this.id=O,this.url=w}}class sr extends Ti{constructor(O,w,R="imperative",H=null){super(O,w),this.type=0,this.navigationTrigger=R,this.restoredState=H}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class di extends Ti{constructor(O,w,R){super(O,w),this.urlAfterRedirects=R,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Gr extends Ti{constructor(O,w,R,H){super(O,w),this.reason=R,this.code=H,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class gr extends Ti{constructor(O,w,R,H){super(O,w),this.reason=R,this.code=H,this.type=16}}class hn extends Ti{constructor(O,w,R,H){super(O,w),this.error=R,this.target=H,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class $s extends Ti{constructor(O,w,R,H){super(O,w),this.urlAfterRedirects=R,this.state=H,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ua extends Ti{constructor(O,w,R,H){super(O,w),this.urlAfterRedirects=R,this.state=H,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class da extends Ti{constructor(O,w,R,H,Q){super(O,w),this.urlAfterRedirects=R,this.state=H,this.shouldActivate=Q,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class hi extends Ti{constructor(O,w,R,H){super(O,w),this.urlAfterRedirects=R,this.state=H,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Oa extends Ti{constructor(O,w,R,H){super(O,w),this.urlAfterRedirects=R,this.state=H,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class To{constructor(O){this.route=O,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Io{constructor(O){this.route=O,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Jt{constructor(O){this.snapshot=O,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Ki{constructor(O){this.snapshot=O,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Yr{constructor(O){this.snapshot=O,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $o{constructor(O){this.snapshot=O,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ii{constructor(O,w,R){this.routerEvent=O,this.position=w,this.anchor=R,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class Es{}class Di{constructor(O){this.url=O}}class Ao{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new wr,this.attachRef=null}}let wr=(()=>{class I{constructor(){this.contexts=new Map}onChildOutletCreated(w,R){const H=this.getOrCreateContext(w);H.outlet=R,this.contexts.set(w,H)}onChildOutletDestroyed(w){const R=this.getContext(w);R&&(R.outlet=null,R.attachRef=null)}onOutletDeactivated(){const w=this.contexts;return this.contexts=new Map,w}onOutletReAttached(w){this.contexts=w}getOrCreateContext(w){let R=this.getContext(w);return R||(R=new Ao,this.contexts.set(w,R)),R}getContext(w){return this.contexts.get(w)||null}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();class Or{constructor(O){this._root=O}get root(){return this._root.value}parent(O){const w=this.pathFromRoot(O);return w.length>1?w[w.length-2]:null}children(O){const w=Ts(O,this._root);return w?w.children.map(R=>R.value):[]}firstChild(O){const w=Ts(O,this._root);return w&&w.children.length>0?w.children[0].value:null}siblings(O){const w=Zt(O,this._root);return w.length<2?[]:w[w.length-2].children.map(H=>H.value).filter(H=>H!==O)}pathFromRoot(O){return Zt(O,this._root).map(w=>w.value)}}function Ts(I,O){if(I===O.value)return O;for(const w of O.children){const R=Ts(I,w);if(R)return R}return null}function Zt(I,O){if(I===O.value)return[O];for(const w of O.children){const R=Zt(I,w);if(R.length)return R.unshift(O),R}return[]}class In{constructor(O,w){this.value=O,this.children=w}toString(){return`TreeNode(${this.value})`}}function Hn(I){const O={};return I&&I.children.forEach(w=>O[w.value.outlet]=w),O}class os extends Or{constructor(O,w){super(O),this.snapshot=w,dt(this,O)}toString(){return this.snapshot.toString()}}function _i(I,O){const w=function Wr(I,O){const ee=new Is([],{},{},"",{},Xe,O,null,{});return new On("",new In(ee,[]))}(0,O),R=new ce.X([new Un("",{})]),H=new ce.X({}),Q=new ce.X({}),ee=new ce.X({}),Ae=new ce.X(""),Ie=new Ui(R,H,ee,Ae,Q,Xe,O,w.root);return Ie.snapshot=w.root,new os(new In(Ie,[]),w)}class Ui{constructor(O,w,R,H,Q,ee,Ae,Ie){this.urlSubject=O,this.paramsSubject=w,this.queryParamsSubject=R,this.fragmentSubject=H,this.dataSubject=Q,this.outlet=ee,this.component=Ae,this._futureSnapshot=Ie,this.title=this.dataSubject?.pipe((0,Me.U)(pt=>pt[cn]))??(0,re.of)(void 0),this.url=O,this.params=w,this.queryParams=R,this.fragment=H,this.data=Q}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe((0,Me.U)(O=>kt(O)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,Me.U)(O=>kt(O)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function as(I,O="emptyOnly"){const w=I.pathFromRoot;let R=0;if("always"!==O)for(R=w.length-1;R>=1;){const H=w[R],Q=w[R-1];if(H.routeConfig&&""===H.routeConfig.path)R--;else{if(Q.component)break;R--}}return function Zr(I){return I.reduce((O,w)=>({params:{...O.params,...w.params},data:{...O.data,...w.data},resolve:{...w.data,...O.resolve,...w.routeConfig?.data,...w._resolvedData}}),{params:{},data:{},resolve:{}})}(w.slice(R))}class Is{get title(){return this.data?.[cn]}constructor(O,w,R,H,Q,ee,Ae,Ie,pt){this.url=O,this.params=w,this.queryParams=R,this.fragment=H,this.data=Q,this.outlet=ee,this.component=Ae,this.routeConfig=Ie,this._resolve=pt}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=kt(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=kt(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(R=>R.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class On extends Or{constructor(O,w){super(w),this.url=O,dt(this,w)}toString(){return Ht(this._root)}}function dt(I,O){O.value._routerState=I,O.children.forEach(w=>dt(I,w))}function Ht(I){const O=I.children.length>0?` { ${I.children.map(Ht).join(", ")} } `:"";return`${I.value}${O}`}function _n(I){if(I.snapshot){const O=I.snapshot,w=I._futureSnapshot;I.snapshot=w,an(O.queryParams,w.queryParams)||I.queryParamsSubject.next(w.queryParams),O.fragment!==w.fragment&&I.fragmentSubject.next(w.fragment),an(O.params,w.params)||I.paramsSubject.next(w.params),function li(I,O){if(I.length!==O.length)return!1;for(let w=0;wan(w.parameters,O[R].parameters))}(I.url,O.url);return w&&!(!I.parent!=!O.parent)&&(!I.parent||fi(I.parent,O.parent))}let Rr=(()=>{class I{constructor(){this.activated=null,this._activatedRoute=null,this.name=Xe,this.activateEvents=new l.vpe,this.deactivateEvents=new l.vpe,this.attachEvents=new l.vpe,this.detachEvents=new l.vpe,this.parentContexts=(0,l.f3M)(wr),this.location=(0,l.f3M)(l.s_b),this.changeDetector=(0,l.f3M)(l.sBO),this.environmentInjector=(0,l.f3M)(l.lqb),this.inputBinder=(0,l.f3M)(mr,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(w){if(w.name){const{firstChange:R,previousValue:H}=w.name;if(R)return;this.isTrackedInParentContexts(H)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(H)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(w){return this.parentContexts.getContext(w)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const w=this.parentContexts.getContext(this.name);w?.route&&(w.attachRef?this.attach(w.attachRef,w.route):this.activateWith(w.route,w.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new l.vHH(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new l.vHH(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new l.vHH(4012,!1);this.location.detach();const w=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(w.instance),w}attach(w,R){this.activated=w,this._activatedRoute=R,this.location.insert(w.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(w.instance)}deactivate(){if(this.activated){const w=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(w)}}activateWith(w,R){if(this.isActivated)throw new l.vHH(4013,!1);this._activatedRoute=w;const H=this.location,ee=w.snapshot.component,Ae=this.parentContexts.getOrCreateContext(this.name).children,Ie=new ri(w,Ae,H.injector);this.activated=H.createComponent(ee,{index:H.length,injector:Ie,environmentInjector:R??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275dir=l.lG2({type:I,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[l.TTD]})}return I})();class ri{constructor(O,w,R){this.route=O,this.childContexts=w,this.parent=R}get(O,w){return O===Ui?this.route:O===wr?this.childContexts:this.parent.get(O,w)}}const mr=new l.OlP("");let yn=(()=>{class I{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(w){this.unsubscribeFromRouteData(w),this.subscribeToRouteData(w)}unsubscribeFromRouteData(w){this.outletDataSubscriptions.get(w)?.unsubscribe(),this.outletDataSubscriptions.delete(w)}subscribeToRouteData(w){const{activatedRoute:R}=w,H=(0,_e.a)([R.queryParams,R.params,R.data]).pipe((0,nt.w)(([Q,ee,Ae],Ie)=>(Ae={...Q,...ee,...Ae},0===Ie?(0,re.of)(Ae):Promise.resolve(Ae)))).subscribe(Q=>{if(!w.isActivated||!w.activatedComponentRef||w.activatedRoute!==R||null===R.component)return void this.unsubscribeFromRouteData(w);const ee=(0,l.qFp)(R.component);if(ee)for(const{templateName:Ae}of ee.inputs)w.activatedComponentRef.setInput(Ae,Q[Ae]);else this.unsubscribeFromRouteData(w)});this.outletDataSubscriptions.set(w,H)}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac})}return I})();function vr(I,O,w){if(w&&I.shouldReuseRoute(O.value,w.value.snapshot)){const R=w.value;R._futureSnapshot=O.value;const H=function Ft(I,O,w){return O.children.map(R=>{for(const H of w.children)if(I.shouldReuseRoute(R.value,H.value.snapshot))return vr(I,R,H);return vr(I,R)})}(I,O,w);return new In(R,H)}{if(I.shouldAttach(O.value)){const Q=I.retrieve(O.value);if(null!==Q){const ee=Q.route;return ee.value._futureSnapshot=O.value,ee.children=O.children.map(Ae=>vr(I,Ae)),ee}}const R=function As(I){return new Ui(new ce.X(I.url),new ce.X(I.params),new ce.X(I.queryParams),new ce.X(I.fragment),new ce.X(I.data),I.outlet,I.component,I)}(O.value),H=O.children.map(Q=>vr(I,Q));return new In(R,H)}}const ls="ngNavigationCancelingError";function qr(I,O){const{redirectTo:w,navigationBehaviorOptions:R}=ge(O)?{redirectTo:O,navigationBehaviorOptions:void 0}:O,H=wn(!1,0,O);return H.url=w,H.navigationBehaviorOptions=R,H}function wn(I,O,w){const R=new Error("NavigationCancelingError: "+(I||""));return R[ls]=!0,R.cancellationCode=O,w&&(R.url=w),R}function Er(I){return I&&I[ls]}let $i=(()=>{class I{static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275cmp=l.Xpm({type:I,selectors:[["ng-component"]],standalone:!0,features:[l.jDz],decls:1,vars:0,template:function(R,H){1&R&&l._UZ(0,"router-outlet")},dependencies:[Rr],encapsulation:2})}return I})();function Jr(I){const O=I.children&&I.children.map(Jr),w=O?{...I,children:O}:{...I};return!w.component&&!w.loadComponent&&(O||w.loadChildren)&&w.outlet&&w.outlet!==Xe&&(w.component=$i),w}function jn(I){return I.outlet||Xe}function ar(I){if(!I)return null;if(I.routeConfig?._injector)return I.routeConfig._injector;for(let O=I.parent;O;O=O.parent){const w=O.routeConfig;if(w?._loadedInjector)return w._loadedInjector;if(w?._injector)return w._injector}return null}class Xr{constructor(O,w,R,H,Q){this.routeReuseStrategy=O,this.futureState=w,this.currState=R,this.forwardEvent=H,this.inputBindingEnabled=Q}activate(O){const w=this.futureState._root,R=this.currState?this.currState._root:null;this.deactivateChildRoutes(w,R,O),_n(this.futureState.root),this.activateChildRoutes(w,R,O)}deactivateChildRoutes(O,w,R){const H=Hn(w);O.children.forEach(Q=>{const ee=Q.value.outlet;this.deactivateRoutes(Q,H[ee],R),delete H[ee]}),Object.values(H).forEach(Q=>{this.deactivateRouteAndItsChildren(Q,R)})}deactivateRoutes(O,w,R){const H=O.value,Q=w?w.value:null;if(H===Q)if(H.component){const ee=R.getContext(H.outlet);ee&&this.deactivateChildRoutes(O,w,ee.children)}else this.deactivateChildRoutes(O,w,R);else Q&&this.deactivateRouteAndItsChildren(w,R)}deactivateRouteAndItsChildren(O,w){O.value.component&&this.routeReuseStrategy.shouldDetach(O.value.snapshot)?this.detachAndStoreRouteSubtree(O,w):this.deactivateRouteAndOutlet(O,w)}detachAndStoreRouteSubtree(O,w){const R=w.getContext(O.value.outlet),H=R&&O.value.component?R.children:w,Q=Hn(O);for(const ee of Object.keys(Q))this.deactivateRouteAndItsChildren(Q[ee],H);if(R&&R.outlet){const ee=R.outlet.detach(),Ae=R.children.onOutletDeactivated();this.routeReuseStrategy.store(O.value.snapshot,{componentRef:ee,route:O,contexts:Ae})}}deactivateRouteAndOutlet(O,w){const R=w.getContext(O.value.outlet),H=R&&O.value.component?R.children:w,Q=Hn(O);for(const ee of Object.keys(Q))this.deactivateRouteAndItsChildren(Q[ee],H);R&&(R.outlet&&(R.outlet.deactivate(),R.children.onOutletDeactivated()),R.attachRef=null,R.route=null)}activateChildRoutes(O,w,R){const H=Hn(w);O.children.forEach(Q=>{this.activateRoutes(Q,H[Q.value.outlet],R),this.forwardEvent(new $o(Q.value.snapshot))}),O.children.length&&this.forwardEvent(new Ki(O.value.snapshot))}activateRoutes(O,w,R){const H=O.value,Q=w?w.value:null;if(_n(H),H===Q)if(H.component){const ee=R.getOrCreateContext(H.outlet);this.activateChildRoutes(O,w,ee.children)}else this.activateChildRoutes(O,w,R);else if(H.component){const ee=R.getOrCreateContext(H.outlet);if(this.routeReuseStrategy.shouldAttach(H.snapshot)){const Ae=this.routeReuseStrategy.retrieve(H.snapshot);this.routeReuseStrategy.store(H.snapshot,null),ee.children.onOutletReAttached(Ae.contexts),ee.attachRef=Ae.componentRef,ee.route=Ae.route.value,ee.outlet&&ee.outlet.attach(Ae.componentRef,Ae.route.value),_n(Ae.route.value),this.activateChildRoutes(O,null,ee.children)}else{const Ae=ar(H.snapshot);ee.attachRef=null,ee.route=H,ee.injector=Ae,ee.outlet&&ee.outlet.activateWith(H,ee.injector),this.activateChildRoutes(O,null,ee.children)}}else this.activateChildRoutes(O,null,R)}}class Qn{constructor(O){this.path=O,this.route=this.path[this.path.length-1]}}class pi{constructor(O,w){this.component=O,this.route=w}}function Ms(I,O,w){const R=I._root;return qn(R,O?O._root:null,w,[R.value])}function fn(I,O){const w=Symbol(),R=O.get(I,w);return R===w?"function"!=typeof I||(0,l.Z0I)(I)?O.get(I):I:R}function qn(I,O,w,R,H={canDeactivateChecks:[],canActivateChecks:[]}){const Q=Hn(O);return I.children.forEach(ee=>{(function ki(I,O,w,R,H={canDeactivateChecks:[],canActivateChecks:[]}){const Q=I.value,ee=O?O.value:null,Ae=w?w.getContext(I.value.outlet):null;if(ee&&Q.routeConfig===ee.routeConfig){const Ie=function ao(I,O,w){if("function"==typeof w)return w(I,O);switch(w){case"pathParamsChange":return!yt(I.url,O.url);case"pathParamsOrQueryParamsChange":return!yt(I.url,O.url)||!an(I.queryParams,O.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!fi(I,O)||!an(I.queryParams,O.queryParams);default:return!fi(I,O)}}(ee,Q,Q.routeConfig.runGuardsAndResolvers);Ie?H.canActivateChecks.push(new Qn(R)):(Q.data=ee.data,Q._resolvedData=ee._resolvedData),qn(I,O,Q.component?Ae?Ae.children:null:w,R,H),Ie&&Ae&&Ae.outlet&&Ae.outlet.isActivated&&H.canDeactivateChecks.push(new pi(Ae.outlet.component,ee))}else ee&&es(O,Ae,H),H.canActivateChecks.push(new Qn(R)),qn(I,null,Q.component?Ae?Ae.children:null:w,R,H)})(ee,Q[ee.value.outlet],w,R.concat([ee.value]),H),delete Q[ee.value.outlet]}),Object.entries(Q).forEach(([ee,Ae])=>es(Ae,w.getContext(ee),H)),H}function es(I,O,w){const R=Hn(I),H=I.value;Object.entries(R).forEach(([Q,ee])=>{es(ee,H.component?O?O.children.getContext(Q):null:O,w)}),w.canDeactivateChecks.push(new pi(H.component&&O&&O.outlet&&O.outlet.isActivated?O.outlet.component:null,H))}function lo(I){return"function"==typeof I}function An(I){return I instanceof ve.K||"EmptyError"===I?.name}const lr=Symbol("INITIAL_VALUE");function xs(){return(0,nt.w)(I=>(0,_e.a)(I.map(O=>O.pipe((0,it.q)(1),(0,Je.O)(lr)))).pipe((0,Me.U)(O=>{for(const w of O)if(!0!==w){if(w===lr)return lr;if(!1===w||w instanceof Ri)return w}return!0}),(0,wt.h)(O=>O!==lr),(0,it.q)(1)))}function cr(I){return(0,ye.z)((0,Sn.b)(O=>{if(ge(O))throw qr(0,O)}),(0,Me.U)(O=>!0===O))}class uo{constructor(O){this.segmentGroup=O||null}}class Ni{constructor(O){this.urlTree=O}}function ts(I){return ke(new uo(I))}function Ji(I){return ke(new Ni(I))}class ka{constructor(O,w){this.urlSerializer=O,this.urlTree=w}noMatchError(O){return new l.vHH(4002,!1)}lineralizeSegments(O,w){let R=[],H=w.root;for(;;){if(R=R.concat(H.segments),0===H.numberOfChildren)return(0,re.of)(R);if(H.numberOfChildren>1||!H.children[Xe])return ke(new l.vHH(4e3,!1));H=H.children[Xe]}}applyRedirectCommands(O,w,R){return this.applyRedirectCreateUrlTree(w,this.urlSerializer.parse(w),O,R)}applyRedirectCreateUrlTree(O,w,R,H){const Q=this.createSegmentGroup(O,w.root,R,H);return new Ri(Q,this.createQueryParams(w.queryParams,this.urlTree.queryParams),w.fragment)}createQueryParams(O,w){const R={};return Object.entries(O).forEach(([H,Q])=>{if("string"==typeof Q&&Q.startsWith(":")){const Ae=Q.substring(1);R[H]=w[Ae]}else R[H]=Q}),R}createSegmentGroup(O,w,R,H){const Q=this.createSegments(O,w.segments,R,H);let ee={};return Object.entries(w.children).forEach(([Ae,Ie])=>{ee[Ae]=this.createSegmentGroup(O,Ie,R,H)}),new bt(Q,ee)}createSegments(O,w,R,H){return w.map(Q=>Q.path.startsWith(":")?this.findPosParam(O,Q,H):this.findOrReturn(Q,R))}findPosParam(O,w,R){const H=R[w.path.substring(1)];if(!H)throw new l.vHH(4001,!1);return H}findOrReturn(O,w){let R=0;for(const H of w){if(H.path===O.path)return w.splice(R),H;R++}return O}}const Zs={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ha(I,O,w,R,H){const Q=Wo(I,O,w);return Q.matched?(R=function Kr(I,O){return I.providers&&!I._injector&&(I._injector=(0,l.MMx)(I.providers,O,`Route: ${I.path}`)),I._injector??O}(O,R),function Ro(I,O,w,R){const H=O.canMatch;if(!H||0===H.length)return(0,re.of)(!0);const Q=H.map(ee=>{const Ae=fn(ee,I);return xi(function se(I){return I&&lo(I.canMatch)}(Ae)?Ae.canMatch(O,w):I.runInContext(()=>Ae(O,w)))});return(0,re.of)(Q).pipe(xs(),cr())}(R,O,w).pipe((0,Me.U)(ee=>!0===ee?Q:{...Zs}))):(0,re.of)(Q)}function Wo(I,O,w){if(""===O.path)return"full"===O.pathMatch&&(I.hasChildren()||w.length>0)?{...Zs}:{matched:!0,consumedSegments:[],remainingSegments:w,parameters:{},positionalParamSegments:{}};const H=(O.matcher||mn)(w,I,O);if(!H)return{...Zs};const Q={};Object.entries(H.posParams??{}).forEach(([Ae,Ie])=>{Q[Ae]=Ie.path});const ee=H.consumed.length>0?{...Q,...H.consumed[H.consumed.length-1].parameters}:Q;return{matched:!0,consumedSegments:H.consumed,remainingSegments:w.slice(H.consumed.length),parameters:ee,positionalParamSegments:H.posParams??{}}}function fa(I,O,w,R){return w.length>0&&function gl(I,O,w){return w.some(R=>Rs(I,O,R)&&jn(R)!==Xe)}(I,w,R)?{segmentGroup:new bt(O,pl(R,new bt(w,I.children))),slicedSegments:[]}:0===w.length&&function Fa(I,O,w){return w.some(R=>Rs(I,O,R))}(I,w,R)?{segmentGroup:new bt(I.segments,Na(I,0,w,R,I.children)),slicedSegments:w}:{segmentGroup:new bt(I.segments,I.children),slicedSegments:w}}function Na(I,O,w,R,H){const Q={};for(const ee of R)if(Rs(I,w,ee)&&!H[jn(ee)]){const Ae=new bt([],{});Q[jn(ee)]=Ae}return{...H,...Q}}function pl(I,O){const w={};w[Xe]=O;for(const R of I)if(""===R.path&&jn(R)!==Xe){const H=new bt([],{});w[jn(R)]=H}return w}function Rs(I,O,w){return(!(I.hasChildren()||O.length>0)||"full"!==w.pathMatch)&&""===w.path}class Gu{constructor(O,w,R,H,Q,ee,Ae){this.injector=O,this.configLoader=w,this.rootComponentType=R,this.config=H,this.urlTree=Q,this.paramsInheritanceStrategy=ee,this.urlSerializer=Ae,this.allowRedirects=!0,this.applyRedirects=new ka(this.urlSerializer,this.urlTree)}noMatchError(O){return new l.vHH(4002,!1)}recognize(){const O=fa(this.urlTree.root,[],[],this.config).segmentGroup;return this.processSegmentGroup(this.injector,this.config,O,Xe).pipe(Bn(w=>{if(w instanceof Ni)return this.allowRedirects=!1,this.urlTree=w.urlTree,this.match(w.urlTree);throw w instanceof uo?this.noMatchError(w):w}),(0,Me.U)(w=>{const R=new Is([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},Xe,this.rootComponentType,null,{}),H=new In(R,w),Q=new On("",H),ee=function oe(I,O,w=null,R=null){return ze(ue(I),O,w,R)}(R,[],this.urlTree.queryParams,this.urlTree.fragment);return ee.queryParams=this.urlTree.queryParams,Q.url=this.urlSerializer.serialize(ee),this.inheritParamsAndData(Q._root),{state:Q,tree:ee}}))}match(O){return this.processSegmentGroup(this.injector,this.config,O.root,Xe).pipe(Bn(R=>{throw R instanceof uo?this.noMatchError(R):R}))}inheritParamsAndData(O){const w=O.value,R=as(w,this.paramsInheritanceStrategy);w.params=Object.freeze(R.params),w.data=Object.freeze(R.data),O.children.forEach(H=>this.inheritParamsAndData(H))}processSegmentGroup(O,w,R,H){return 0===R.segments.length&&R.hasChildren()?this.processChildren(O,w,R):this.processSegment(O,w,R,R.segments,H,!0)}processChildren(O,w,R){const H=[];for(const Q of Object.keys(R.children))"primary"===Q?H.unshift(Q):H.push(Q);return(0,de.D)(H).pipe((0,Vn.b)(Q=>{const ee=R.children[Q],Ae=function Ws(I,O){const w=I.filter(R=>jn(R)===O);return w.push(...I.filter(R=>jn(R)!==O)),w}(w,Q);return this.processSegmentGroup(O,Ae,ee,Q)}),function Ar(I,O){return(0,Re.e)(function Nt(I,O,w,R,H){return(Q,ee)=>{let Ae=w,Ie=O,pt=0;Q.subscribe((0,at.x)(ee,Qt=>{const Jn=pt++;Ie=Ae?I(Ie,Qt,Jn):(Ae=!0,Qt),R&&ee.next(Ie)},H&&(()=>{Ae&&ee.next(Ie),ee.complete()})))}}(I,O,arguments.length>=2,!0))}((Q,ee)=>(Q.push(...ee),Q)),(0,Qi.d)(null),function Ne(I,O){const w=arguments.length>=2;return R=>R.pipe(I?(0,wt.h)((H,Q)=>I(H,Q,R)):Fe.y,xe(1),w?(0,Qi.d)(O):(0,Oe.T)(()=>new ve.K))}(),(0,mt.z)(Q=>{if(null===Q)return ts(R);const ee=vl(Q);return function nf(I){I.sort((O,w)=>O.value.outlet===Xe?-1:w.value.outlet===Xe?1:O.value.outlet.localeCompare(w.value.outlet))}(ee),(0,re.of)(ee)}))}processSegment(O,w,R,H,Q,ee){return(0,de.D)(w).pipe((0,Vn.b)(Ae=>this.processSegmentAgainstRoute(Ae._injector??O,w,Ae,R,H,Q,ee).pipe(Bn(Ie=>{if(Ie instanceof uo)return(0,re.of)(null);throw Ie}))),(0,$t.P)(Ae=>!!Ae),Bn(Ae=>{if(An(Ae))return function Po(I,O,w){return 0===O.length&&!I.children[w]}(R,H,Q)?(0,re.of)([]):ts(R);throw Ae}))}processSegmentAgainstRoute(O,w,R,H,Q,ee,Ae){return function ho(I,O,w,R){return!!(jn(I)===R||R!==Xe&&Rs(O,w,I))&&("**"===I.path||Wo(O,I,w).matched)}(R,H,Q,ee)?void 0===R.redirectTo?this.matchSegmentAgainstRoute(O,H,R,Q,ee,Ae):Ae&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(O,H,w,R,Q,ee):ts(H):ts(H)}expandSegmentAgainstRouteUsingRedirect(O,w,R,H,Q,ee){return"**"===H.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(O,R,H,ee):this.expandRegularSegmentAgainstRouteUsingRedirect(O,w,R,H,Q,ee)}expandWildCardWithParamsAgainstRouteUsingRedirect(O,w,R,H){const Q=this.applyRedirects.applyRedirectCommands([],R.redirectTo,{});return R.redirectTo.startsWith("/")?Ji(Q):this.applyRedirects.lineralizeSegments(R,Q).pipe((0,mt.z)(ee=>{const Ae=new bt(ee,{});return this.processSegment(O,w,Ae,ee,H,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(O,w,R,H,Q,ee){const{matched:Ae,consumedSegments:Ie,remainingSegments:pt,positionalParamSegments:Qt}=Wo(w,H,Q);if(!Ae)return ts(w);const Jn=this.applyRedirects.applyRedirectCommands(Ie,H.redirectTo,Qt);return H.redirectTo.startsWith("/")?Ji(Jn):this.applyRedirects.lineralizeSegments(H,Jn).pipe((0,mt.z)(Dn=>this.processSegment(O,R,w,Dn.concat(pt),ee,!1)))}matchSegmentAgainstRoute(O,w,R,H,Q,ee){let Ae;if("**"===R.path){const Ie=H.length>0?Vi(H).parameters:{},pt=new Is(H,Ie,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Zu(R),jn(R),R.component??R._loadedComponent??null,R,U(R));Ae=(0,re.of)({snapshot:pt,consumedSegments:[],remainingSegments:[]}),w.children={}}else Ae=ha(w,R,H,O).pipe((0,Me.U)(({matched:Ie,consumedSegments:pt,remainingSegments:Qt,parameters:Jn})=>Ie?{snapshot:new Is(pt,Jn,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Zu(R),jn(R),R.component??R._loadedComponent??null,R,U(R)),consumedSegments:pt,remainingSegments:Qt}:null));return Ae.pipe((0,nt.w)(Ie=>null===Ie?ts(w):this.getChildConfig(O=R._injector??O,R,H).pipe((0,nt.w)(({routes:pt})=>{const Qt=R._loadedInjector??O,{snapshot:Jn,consumedSegments:Dn,remainingSegments:mo}=Ie,{segmentGroup:Ba,slicedSegments:ga}=fa(w,Dn,mo,pt);if(0===ga.length&&Ba.hasChildren())return this.processChildren(Qt,pt,Ba).pipe((0,Me.U)(Ha=>null===Ha?null:[new In(Jn,Ha)]));if(0===pt.length&&0===ga.length)return(0,re.of)([new In(Jn,[])]);const Ec=jn(R)===Q;return this.processSegment(Qt,pt,Ba,ga,Ec?Xe:Q,!0).pipe((0,Me.U)(Ha=>[new In(Jn,Ha)]))}))))}getChildConfig(O,w,R){return w.children?(0,re.of)({routes:w.children,injector:O}):w.loadChildren?void 0!==w._loadedRoutes?(0,re.of)({routes:w._loadedRoutes,injector:w._loadedInjector}):function Os(I,O,w,R){const H=O.canLoad;if(void 0===H||0===H.length)return(0,re.of)(!0);const Q=H.map(ee=>{const Ae=fn(ee,I);return xi(function z(I){return I&&lo(I.canLoad)}(Ae)?Ae.canLoad(O,w):I.runInContext(()=>Ae(O,w)))});return(0,re.of)(Q).pipe(xs(),cr())}(O,w,R).pipe((0,mt.z)(H=>H?this.configLoader.loadChildren(O,w).pipe((0,Sn.b)(Q=>{w._loadedRoutes=Q.routes,w._loadedInjector=Q.injector})):function Pa(I){return ke(wn(!1,3))}())):(0,re.of)({routes:[],injector:O})}}function Yu(I){const O=I.value.routeConfig;return O&&""===O.path}function vl(I){const O=[],w=new Set;for(const R of I){if(!Yu(R)){O.push(R);continue}const H=O.find(Q=>R.value.routeConfig===Q.value.routeConfig);void 0!==H?(H.children.push(...R.children),w.add(H)):O.push(R)}for(const R of w){const H=vl(R.children);O.push(new In(R.value,H))}return O.filter(R=>!w.has(R))}function Zu(I){return I.data||{}}function U(I){return I.resolve||{}}function b(I){return"string"==typeof I.title||null===I.title}function F(I){return(0,nt.w)(O=>{const w=I(O);return w?(0,de.D)(w).pipe((0,Me.U)(()=>O)):(0,re.of)(O)})}const x=new l.OlP("ROUTES");let V=(()=>{class I{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=(0,l.f3M)(l.Sil)}loadComponent(w){if(this.componentLoaders.get(w))return this.componentLoaders.get(w);if(w._loadedComponent)return(0,re.of)(w._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(w);const R=xi(w.loadComponent()).pipe((0,Me.U)(Ee),(0,Sn.b)(Q=>{this.onLoadEndListener&&this.onLoadEndListener(w),w._loadedComponent=Q}),(0,Ke.x)(()=>{this.componentLoaders.delete(w)})),H=new ut(R,()=>new ne.x).pipe(Dt());return this.componentLoaders.set(w,H),H}loadChildren(w,R){if(this.childrenLoaders.get(R))return this.childrenLoaders.get(R);if(R._loadedRoutes)return(0,re.of)({routes:R._loadedRoutes,injector:R._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(R);const Q=function K(I,O,w,R){return xi(I.loadChildren()).pipe((0,Me.U)(Ee),(0,mt.z)(H=>H instanceof l.YKP||Array.isArray(H)?(0,re.of)(H):(0,de.D)(O.compileModuleAsync(H))),(0,Me.U)(H=>{R&&R(I);let Q,ee,Ae=!1;return Array.isArray(H)?(ee=H,!0):(Q=H.create(w).injector,ee=Q.get(x,[],{optional:!0,self:!0}).flat()),{routes:ee.map(Jr),injector:Q}}))}(R,this.compiler,w,this.onLoadEndListener).pipe((0,Ke.x)(()=>{this.childrenLoaders.delete(R)})),ee=new ut(Q,()=>new ne.x).pipe(Dt());return this.childrenLoaders.set(R,ee),ee}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();function Ee(I){return function me(I){return I&&"object"==typeof I&&"default"in I}(I)?I.default:I}let Ue=(()=>{class I{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new ne.x,this.transitionAbortSubject=new ne.x,this.configLoader=(0,l.f3M)(V),this.environmentInjector=(0,l.f3M)(l.lqb),this.urlSerializer=(0,l.f3M)(tn),this.rootContexts=(0,l.f3M)(wr),this.inputBindingEnabled=null!==(0,l.f3M)(mr,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>(0,re.of)(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=H=>this.events.next(new Io(H)),this.configLoader.onLoadStartListener=H=>this.events.next(new To(H))}complete(){this.transitions?.complete()}handleNavigationRequest(w){const R=++this.navigationId;this.transitions?.next({...this.transitions.value,...w,id:R})}setupNavigations(w,R,H){return this.transitions=new ce.X({id:0,currentUrlTree:R,currentRawUrl:R,currentBrowserUrl:R,extractedUrl:w.urlHandlingStrategy.extract(R),urlAfterRedirects:w.urlHandlingStrategy.extract(R),rawUrl:R,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Si,restoredState:null,currentSnapshot:H.snapshot,targetSnapshot:null,currentRouterState:H,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe((0,wt.h)(Q=>0!==Q.id),(0,Me.U)(Q=>({...Q,extractedUrl:w.urlHandlingStrategy.extract(Q.rawUrl)})),(0,nt.w)(Q=>{this.currentTransition=Q;let ee=!1,Ae=!1;return(0,re.of)(Q).pipe((0,Sn.b)(Ie=>{this.currentNavigation={id:Ie.id,initialUrl:Ie.rawUrl,extractedUrl:Ie.extractedUrl,trigger:Ie.source,extras:Ie.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),(0,nt.w)(Ie=>{const pt=Ie.currentBrowserUrl.toString(),Qt=!w.navigated||Ie.extractedUrl.toString()!==pt||pt!==Ie.currentUrlTree.toString();if(!Qt&&"reload"!==(Ie.extras.onSameUrlNavigation??w.onSameUrlNavigation)){const Dn="";return this.events.next(new gr(Ie.id,this.urlSerializer.serialize(Ie.rawUrl),Dn,0)),Ie.resolve(null),He.E}if(w.urlHandlingStrategy.shouldProcessUrl(Ie.rawUrl))return(0,re.of)(Ie).pipe((0,nt.w)(Dn=>{const mo=this.transitions?.getValue();return this.events.next(new sr(Dn.id,this.urlSerializer.serialize(Dn.extractedUrl),Dn.source,Dn.restoredState)),mo!==this.transitions?.getValue()?He.E:Promise.resolve(Dn)}),function D(I,O,w,R,H,Q){return(0,mt.z)(ee=>function ml(I,O,w,R,H,Q,ee="emptyOnly"){return new Gu(I,O,w,R,H,ee,Q).recognize()}(I,O,w,R,ee.extractedUrl,H,Q).pipe((0,Me.U)(({state:Ae,tree:Ie})=>({...ee,targetSnapshot:Ae,urlAfterRedirects:Ie}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,w.config,this.urlSerializer,w.paramsInheritanceStrategy),(0,Sn.b)(Dn=>{Q.targetSnapshot=Dn.targetSnapshot,Q.urlAfterRedirects=Dn.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:Dn.urlAfterRedirects};const mo=new $s(Dn.id,this.urlSerializer.serialize(Dn.extractedUrl),this.urlSerializer.serialize(Dn.urlAfterRedirects),Dn.targetSnapshot);this.events.next(mo)}));if(Qt&&w.urlHandlingStrategy.shouldProcessUrl(Ie.currentRawUrl)){const{id:Dn,extractedUrl:mo,source:Ba,restoredState:ga,extras:Ec}=Ie,Ha=new sr(Dn,this.urlSerializer.serialize(mo),Ba,ga);this.events.next(Ha);const gi=_i(0,this.rootComponentType).snapshot;return this.currentTransition=Q={...Ie,targetSnapshot:gi,urlAfterRedirects:mo,extras:{...Ec,skipLocationChange:!1,replaceUrl:!1}},(0,re.of)(Q)}{const Dn="";return this.events.next(new gr(Ie.id,this.urlSerializer.serialize(Ie.extractedUrl),Dn,1)),Ie.resolve(null),He.E}}),(0,Sn.b)(Ie=>{const pt=new ua(Ie.id,this.urlSerializer.serialize(Ie.extractedUrl),this.urlSerializer.serialize(Ie.urlAfterRedirects),Ie.targetSnapshot);this.events.next(pt)}),(0,Me.U)(Ie=>(this.currentTransition=Q={...Ie,guards:Ms(Ie.targetSnapshot,Ie.currentSnapshot,this.rootContexts)},Q)),function Go(I,O){return(0,mt.z)(w=>{const{targetSnapshot:R,currentSnapshot:H,guards:{canActivateChecks:Q,canDeactivateChecks:ee}}=w;return 0===ee.length&&0===Q.length?(0,re.of)({...w,guardsResult:!0}):function hl(I,O,w,R){return(0,de.D)(I).pipe((0,mt.z)(H=>function Oo(I,O,w,R,H){const Q=O&&O.routeConfig?O.routeConfig.canDeactivate:null;if(!Q||0===Q.length)return(0,re.of)(!0);const ee=Q.map(Ae=>{const Ie=ar(O)??H,pt=fn(Ae,Ie);return xi(function Y(I){return I&&lo(I.canDeactivate)}(pt)?pt.canDeactivate(I,O,w,R):Ie.runInContext(()=>pt(I,O,w,R))).pipe((0,$t.P)())});return(0,re.of)(ee).pipe(xs())}(H.component,H.route,w,O,R)),(0,$t.P)(H=>!0!==H,!0))}(ee,R,H,I).pipe((0,mt.z)(Ae=>Ae&&function ds(I){return"boolean"==typeof I}(Ae)?function xo(I,O,w,R){return(0,de.D)(O).pipe((0,Vn.b)(H=>(0,Te.z)(function Pr(I,O){return null!==I&&O&&O(new Jt(I)),(0,re.of)(!0)}(H.route.parent,R),function co(I,O){return null!==I&&O&&O(new Yr(I)),(0,re.of)(!0)}(H.route,R),function fl(I,O,w){const R=O[O.length-1],Q=O.slice(0,O.length-1).reverse().map(ee=>function et(I){const O=I.routeConfig?I.routeConfig.canActivateChild:null;return O&&0!==O.length?{node:I,guards:O}:null}(ee)).filter(ee=>null!==ee).map(ee=>fe(()=>{const Ae=ee.guards.map(Ie=>{const pt=ar(ee.node)??w,Qt=fn(Ie,pt);return xi(function P(I){return I&&lo(I.canActivateChild)}(Qt)?Qt.canActivateChild(R,I):pt.runInContext(()=>Qt(R,I))).pipe((0,$t.P)())});return(0,re.of)(Ae).pipe(xs())}));return(0,re.of)(Q).pipe(xs())}(I,H.path,w),function $u(I,O,w){const R=O.routeConfig?O.routeConfig.canActivate:null;if(!R||0===R.length)return(0,re.of)(!0);const H=R.map(Q=>fe(()=>{const ee=ar(O)??w,Ae=fn(Q,ee);return xi(function $(I){return I&&lo(I.canActivate)}(Ae)?Ae.canActivate(O,I):ee.runInContext(()=>Ae(O,I))).pipe((0,$t.P)())}));return(0,re.of)(H).pipe(xs())}(I,H.route,w))),(0,$t.P)(H=>!0!==H,!0))}(R,Q,I,O):(0,re.of)(Ae)),(0,Me.U)(Ae=>({...w,guardsResult:Ae})))})}(this.environmentInjector,Ie=>this.events.next(Ie)),(0,Sn.b)(Ie=>{if(Q.guardsResult=Ie.guardsResult,ge(Ie.guardsResult))throw qr(0,Ie.guardsResult);const pt=new da(Ie.id,this.urlSerializer.serialize(Ie.extractedUrl),this.urlSerializer.serialize(Ie.urlAfterRedirects),Ie.targetSnapshot,!!Ie.guardsResult);this.events.next(pt)}),(0,wt.h)(Ie=>!!Ie.guardsResult||(this.cancelNavigationTransition(Ie,"",3),!1)),F(Ie=>{if(Ie.guards.canActivateChecks.length)return(0,re.of)(Ie).pipe((0,Sn.b)(pt=>{const Qt=new hi(pt.id,this.urlSerializer.serialize(pt.extractedUrl),this.urlSerializer.serialize(pt.urlAfterRedirects),pt.targetSnapshot);this.events.next(Qt)}),(0,nt.w)(pt=>{let Qt=!1;return(0,re.of)(pt).pipe(function E(I,O){return(0,mt.z)(w=>{const{targetSnapshot:R,guards:{canActivateChecks:H}}=w;if(!H.length)return(0,re.of)(w);let Q=0;return(0,de.D)(H).pipe((0,Vn.b)(ee=>function N(I,O,w,R){const H=I.routeConfig,Q=I._resolve;return void 0!==H?.title&&!b(H)&&(Q[cn]=H.title),function G(I,O,w,R){const H=function q(I){return[...Object.keys(I),...Object.getOwnPropertySymbols(I)]}(I);if(0===H.length)return(0,re.of)({});const Q={};return(0,de.D)(H).pipe((0,mt.z)(ee=>function le(I,O,w,R){const H=ar(O)??R,Q=fn(I,H);return xi(Q.resolve?Q.resolve(O,w):H.runInContext(()=>Q(O,w)))}(I[ee],O,w,R).pipe((0,$t.P)(),(0,Sn.b)(Ae=>{Q[ee]=Ae}))),xe(1),(0,We.h)(Q),Bn(ee=>An(ee)?He.E:ke(ee)))}(Q,I,O,R).pipe((0,Me.U)(ee=>(I._resolvedData=ee,I.data=as(I,w).resolve,H&&b(H)&&(I.data[cn]=H.title),null)))}(ee.route,R,I,O)),(0,Sn.b)(()=>Q++),xe(1),(0,mt.z)(ee=>Q===H.length?(0,re.of)(w):He.E))})}(w.paramsInheritanceStrategy,this.environmentInjector),(0,Sn.b)({next:()=>Qt=!0,complete:()=>{Qt||this.cancelNavigationTransition(pt,"",2)}}))}),(0,Sn.b)(pt=>{const Qt=new Oa(pt.id,this.urlSerializer.serialize(pt.extractedUrl),this.urlSerializer.serialize(pt.urlAfterRedirects),pt.targetSnapshot);this.events.next(Qt)}))}),F(Ie=>{const pt=Qt=>{const Jn=[];Qt.routeConfig?.loadComponent&&!Qt.routeConfig._loadedComponent&&Jn.push(this.configLoader.loadComponent(Qt.routeConfig).pipe((0,Sn.b)(Dn=>{Qt.component=Dn}),(0,Me.U)(()=>{})));for(const Dn of Qt.children)Jn.push(...pt(Dn));return Jn};return(0,_e.a)(pt(Ie.targetSnapshot.root)).pipe((0,Qi.d)(),(0,it.q)(1))}),F(()=>this.afterPreactivation()),(0,Me.U)(Ie=>{const pt=function Qr(I,O,w){const R=vr(I,O._root,w?w._root:void 0);return new os(R,O)}(w.routeReuseStrategy,Ie.targetSnapshot,Ie.currentRouterState);return this.currentTransition=Q={...Ie,targetRouterState:pt},Q}),(0,Sn.b)(()=>{this.events.next(new Es)}),((I,O,w,R)=>(0,Me.U)(H=>(new Xr(O,H.targetRouterState,H.currentRouterState,w,R).activate(I),H)))(this.rootContexts,w.routeReuseStrategy,Ie=>this.events.next(Ie),this.inputBindingEnabled),(0,it.q)(1),(0,Sn.b)({next:Ie=>{ee=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new di(Ie.id,this.urlSerializer.serialize(Ie.extractedUrl),this.urlSerializer.serialize(Ie.urlAfterRedirects))),w.titleStrategy?.updateTitle(Ie.targetRouterState.snapshot),Ie.resolve(!0)},complete:()=>{ee=!0}}),(0,_t.R)(this.transitionAbortSubject.pipe((0,Sn.b)(Ie=>{throw Ie}))),(0,Ke.x)(()=>{ee||Ae||this.cancelNavigationTransition(Q,"",1),this.currentNavigation?.id===Q.id&&(this.currentNavigation=null)}),Bn(Ie=>{if(Ae=!0,Er(Ie))this.events.next(new Gr(Q.id,this.urlSerializer.serialize(Q.extractedUrl),Ie.message,Ie.cancellationCode)),function Gs(I){return Er(I)&&ge(I.url)}(Ie)?this.events.next(new Di(Ie.url)):Q.resolve(!1);else{this.events.next(new hn(Q.id,this.urlSerializer.serialize(Q.extractedUrl),Ie,Q.targetSnapshot??void 0));try{Q.resolve(w.errorHandler(Ie))}catch(pt){Q.reject(pt)}}return He.E}))}))}cancelNavigationTransition(w,R,H){const Q=new Gr(w.id,this.urlSerializer.serialize(w.extractedUrl),R,H);this.events.next(Q),w.resolve(!1)}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();function ft(I){return I!==Si}let Lt=(()=>{class I{buildTitle(w){let R,H=w.root;for(;void 0!==H;)R=this.getResolvedTitleForRoute(H)??R,H=H.children.find(Q=>Q.outlet===Xe);return R}getResolvedTitleForRoute(w){return w.data[cn]}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:function(){return(0,l.f3M)(Vt)},providedIn:"root"})}return I})(),Vt=(()=>{class I extends Lt{constructor(w){super(),this.title=w}updateTitle(w){const R=this.buildTitle(w);void 0!==R&&this.title.setTitle(R)}static#e=this.\u0275fac=function(R){return new(R||I)(l.LFG(ei.Dx))};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})(),It=(()=>{class I{static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:function(){return(0,l.f3M)(Yt)},providedIn:"root"})}return I})();class ln{shouldDetach(O){return!1}store(O,w){}shouldAttach(O){return!1}retrieve(O){return null}shouldReuseRoute(O,w){return O.routeConfig===w.routeConfig}}let Yt=(()=>{class I extends ln{static#e=this.\u0275fac=function(){let w;return function(H){return(w||(w=l.n5z(I)))(H||I)}}();static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();const Rn=new l.OlP("",{providedIn:"root",factory:()=>({})});let Ii=(()=>{class I{static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:function(){return(0,l.f3M)(zn)},providedIn:"root"})}return I})(),zn=(()=>{class I{shouldProcessUrl(w){return!0}extract(w){return w}merge(w,R){return w}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();var Ai=function(I){return I[I.COMPLETE=0]="COMPLETE",I[I.FAILED=1]="FAILED",I[I.REDIRECTING=2]="REDIRECTING",I}(Ai||{});function si(I,O){I.events.pipe((0,wt.h)(w=>w instanceof di||w instanceof Gr||w instanceof hn||w instanceof gr),(0,Me.U)(w=>w instanceof di||w instanceof gr?Ai.COMPLETE:w instanceof Gr&&(0===w.code||1===w.code)?Ai.REDIRECTING:Ai.FAILED),(0,wt.h)(w=>w!==Ai.REDIRECTING),(0,it.q)(1)).subscribe(()=>{O()})}function Xi(I){throw I}function Fi(I,O,w){return O.parse("/")}const kr={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},fo={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let on=(()=>{class I{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.location.getState()?.\u0275routerPageId??this.currentPageId}get events(){return this._events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=(0,l.f3M)(l.c2e),this.isNgZoneEnabled=!1,this._events=new ne.x,this.options=(0,l.f3M)(Rn,{optional:!0})||{},this.pendingTasks=(0,l.f3M)(l.HDt),this.errorHandler=this.options.errorHandler||Xi,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||Fi,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=(0,l.f3M)(Ii),this.routeReuseStrategy=(0,l.f3M)(It),this.titleStrategy=(0,l.f3M)(Lt),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=(0,l.f3M)(x,{optional:!0})?.flat()??[],this.navigationTransitions=(0,l.f3M)(Ue),this.urlSerializer=(0,l.f3M)(tn),this.location=(0,l.f3M)(Pe.Ye),this.componentInputBindingEnabled=!!(0,l.f3M)(mr,{optional:!0}),this.eventsSubscription=new Le.w0,this.isNgZoneEnabled=(0,l.f3M)(l.R0b)instanceof l.R0b&&l.R0b.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Ri,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_i(0,null),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe(w=>{this.lastSuccessfulId=w.id,this.currentPageId=this.browserPageId},w=>{this.console.warn(`Unhandled Navigation Error: ${w}`)}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const w=this.navigationTransitions.events.subscribe(R=>{try{const{currentTransition:H}=this.navigationTransitions;if(null===H)return void(Ct(R)&&this._events.next(R));if(R instanceof sr)ft(H.source)&&(this.browserUrlTree=H.extractedUrl);else if(R instanceof gr)this.rawUrlTree=H.rawUrl;else if(R instanceof $s){if("eager"===this.urlUpdateStrategy){if(!H.extras.skipLocationChange){const Q=this.urlHandlingStrategy.merge(H.urlAfterRedirects,H.rawUrl);this.setBrowserUrl(Q,H)}this.browserUrlTree=H.urlAfterRedirects}}else if(R instanceof Es)this.currentUrlTree=H.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(H.urlAfterRedirects,H.rawUrl),this.routerState=H.targetRouterState,"deferred"===this.urlUpdateStrategy&&(H.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,H),this.browserUrlTree=H.urlAfterRedirects);else if(R instanceof Gr)0!==R.code&&1!==R.code&&(this.navigated=!0),(3===R.code||2===R.code)&&this.restoreHistory(H);else if(R instanceof Di){const Q=this.urlHandlingStrategy.merge(R.url,H.currentRawUrl),ee={skipLocationChange:H.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||ft(H.source)};this.scheduleNavigation(Q,Si,null,ee,{resolve:H.resolve,reject:H.reject,promise:H.promise})}R instanceof hn&&this.restoreHistory(H,!0),R instanceof di&&(this.navigated=!0),Ct(R)&&this._events.next(R)}catch(H){this.navigationTransitions.transitionAbortSubject.next(H)}});this.eventsSubscription.add(w)}resetRootComponentType(w){this.routerState.root.component=w,this.navigationTransitions.rootComponentType=w}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const w=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Si,w)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(w=>{const R="popstate"===w.type?"popstate":"hashchange";"popstate"===R&&setTimeout(()=>{this.navigateToSyncWithBrowser(w.url,R,w.state)},0)}))}navigateToSyncWithBrowser(w,R,H){const Q={replaceUrl:!0},ee=H?.navigationId?H:null;if(H){const Ie={...H};delete Ie.navigationId,delete Ie.\u0275routerPageId,0!==Object.keys(Ie).length&&(Q.state=Ie)}const Ae=this.parseUrl(w);this.scheduleNavigation(Ae,R,ee,Q)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(w){this.config=w.map(Jr),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(w,R={}){const{relativeTo:H,queryParams:Q,fragment:ee,queryParamsHandling:Ae,preserveFragment:Ie}=R,pt=Ie?this.currentUrlTree.fragment:ee;let Jn,Qt=null;switch(Ae){case"merge":Qt={...this.currentUrlTree.queryParams,...Q};break;case"preserve":Qt=this.currentUrlTree.queryParams;break;default:Qt=Q||null}null!==Qt&&(Qt=this.removeEmptyProps(Qt));try{Jn=ue(H?H.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof w[0]||!w[0].startsWith("/"))&&(w=[]),Jn=this.currentUrlTree.root}return ze(Jn,w,Qt,pt??null)}navigateByUrl(w,R={skipLocationChange:!1}){const H=ge(w)?w:this.parseUrl(w),Q=this.urlHandlingStrategy.merge(H,this.rawUrlTree);return this.scheduleNavigation(Q,Si,null,R)}navigate(w,R={skipLocationChange:!1}){return function La(I){for(let O=0;O{const Q=w[H];return null!=Q&&(R[H]=Q),R},{})}scheduleNavigation(w,R,H,Q,ee){if(this.disposed)return Promise.resolve(!1);let Ae,Ie,pt;ee?(Ae=ee.resolve,Ie=ee.reject,pt=ee.promise):pt=new Promise((Jn,Dn)=>{Ae=Jn,Ie=Dn});const Qt=this.pendingTasks.add();return si(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(Qt))}),this.navigationTransitions.handleNavigationRequest({source:R,restoredState:H,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,currentBrowserUrl:this.browserUrlTree,rawUrl:w,extras:Q,resolve:Ae,reject:Ie,promise:pt,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),pt.catch(Jn=>Promise.reject(Jn))}setBrowserUrl(w,R){const H=this.urlSerializer.serialize(w);if(this.location.isCurrentPathEqualTo(H)||R.extras.replaceUrl){const ee={...R.extras.state,...this.generateNgRouterState(R.id,this.browserPageId)};this.location.replaceState(H,"",ee)}else{const Q={...R.extras.state,...this.generateNgRouterState(R.id,this.browserPageId+1)};this.location.go(H,"",Q)}}restoreHistory(w,R=!1){if("computed"===this.canceledNavigationResolution){const Q=this.currentPageId-this.browserPageId;0!==Q?this.location.historyGo(Q):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===Q&&(this.resetState(w),this.browserUrlTree=w.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(R&&this.resetState(w),this.resetUrlToCurrentUrlTree())}resetState(w){this.routerState=w.currentRouterState,this.currentUrlTree=w.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,w.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(w,R){return"computed"===this.canceledNavigationResolution?{navigationId:w,\u0275routerPageId:R}:{navigationId:w}}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();function Ct(I){return!(I instanceof Es||I instanceof Di)}let vt=(()=>{class I{constructor(w,R,H,Q,ee,Ae){this.router=w,this.route=R,this.tabIndexAttribute=H,this.renderer=Q,this.el=ee,this.locationStrategy=Ae,this.href=null,this.commands=null,this.onChanges=new ne.x,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;const Ie=ee.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===Ie||"area"===Ie,this.isAnchorElement?this.subscription=w.events.subscribe(pt=>{pt instanceof di&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(w){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",w)}ngOnChanges(w){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(w){null!=w?(this.commands=Array.isArray(w)?w:[w],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(w,R,H,Q,ee){return!!(null===this.urlTree||this.isAnchorElement&&(0!==w||R||H||Q||ee||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const w=null===this.href?null:(0,l.P3R)(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",w)}applyAttributeValue(w,R){const H=this.renderer,Q=this.el.nativeElement;null!==R?H.setAttribute(Q,w,R):H.removeAttribute(Q,w)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static#e=this.\u0275fac=function(R){return new(R||I)(l.Y36(on),l.Y36(Ui),l.$8M("tabindex"),l.Y36(l.Qsj),l.Y36(l.SBq),l.Y36(Pe.S$))};static#t=this.\u0275dir=l.lG2({type:I,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(R,H){1&R&&l.NdJ("click",function(ee){return H.onClick(ee.button,ee.ctrlKey,ee.shiftKey,ee.altKey,ee.metaKey)}),2&R&&l.uIk("target",H.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:["preserveFragment","preserveFragment",l.VuI],skipLocationChange:["skipLocationChange","skipLocationChange",l.VuI],replaceUrl:["replaceUrl","replaceUrl",l.VuI],routerLink:"routerLink"},standalone:!0,features:[l.Xq5,l.TTD]})}return I})(),Bt=(()=>{class I{get isActive(){return this._isActive}constructor(w,R,H,Q,ee){this.router=w,this.element=R,this.renderer=H,this.cdr=Q,this.link=ee,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new l.vpe,this.routerEventsSubscription=w.events.subscribe(Ae=>{Ae instanceof di&&this.update()})}ngAfterContentInit(){(0,re.of)(this.links.changes,(0,re.of)(null)).pipe((0,ot.J)()).subscribe(w=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const w=[...this.links.toArray(),this.link].filter(R=>!!R).map(R=>R.onChanges);this.linkInputChangesSubscription=(0,de.D)(w).pipe((0,ot.J)()).subscribe(R=>{this._isActive!==this.isLinkActive(this.router)(R)&&this.update()})}set routerLinkActive(w){const R=Array.isArray(w)?w:w.split(" ");this.classes=R.filter(H=>!!H)}ngOnChanges(w){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{const w=this.hasActiveLinks();this._isActive!==w&&(this._isActive=w,this.cdr.markForCheck(),this.classes.forEach(R=>{w?this.renderer.addClass(this.element.nativeElement,R):this.renderer.removeClass(this.element.nativeElement,R)}),w&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(w))})}isLinkActive(w){const R=function vn(I){return!!I.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return H=>!!H.urlTree&&w.isActive(H.urlTree,R)}hasActiveLinks(){const w=this.isLinkActive(this.router);return this.link&&w(this.link)||this.links.some(w)}static#e=this.\u0275fac=function(R){return new(R||I)(l.Y36(on),l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(l.sBO),l.Y36(vt,8))};static#t=this.\u0275dir=l.lG2({type:I,selectors:[["","routerLinkActive",""]],contentQueries:function(R,H,Q){if(1&R&&l.Suo(Q,vt,5),2&R){let ee;l.iGM(ee=l.CRH())&&(H.links=ee)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[l.TTD]})}return I})();class oi{}let yi=(()=>{class I{preload(w,R){return R().pipe(Bn(()=>(0,re.of)(null)))}static#e=this.\u0275fac=function(R){return new(R||I)};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})(),po=(()=>{class I{constructor(w,R,H,Q,ee){this.router=w,this.injector=H,this.preloadingStrategy=Q,this.loader=ee}setUpPreloading(){this.subscription=this.router.events.pipe((0,wt.h)(w=>w instanceof di),(0,Vn.b)(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(w,R){const H=[];for(const Q of R){Q.providers&&!Q._injector&&(Q._injector=(0,l.MMx)(Q.providers,w,`Route: ${Q.path}`));const ee=Q._injector??w,Ae=Q._loadedInjector??ee;(Q.loadChildren&&!Q._loadedRoutes&&void 0===Q.canLoad||Q.loadComponent&&!Q._loadedComponent)&&H.push(this.preloadConfig(ee,Q)),(Q.children||Q._loadedRoutes)&&H.push(this.processRoutes(Ae,Q.children??Q._loadedRoutes))}return(0,de.D)(H).pipe((0,ot.J)())}preloadConfig(w,R){return this.preloadingStrategy.preload(R,()=>{let H;H=R.loadChildren&&void 0===R.canLoad?this.loader.loadChildren(w,R):(0,re.of)(null);const Q=H.pipe((0,mt.z)(ee=>null===ee?(0,re.of)(void 0):(R._loadedRoutes=ee.routes,R._loadedInjector=ee.injector,this.processRoutes(ee.injector??w,ee.routes))));if(R.loadComponent&&!R._loadedComponent){const ee=this.loader.loadComponent(R);return(0,de.D)([Q,ee]).pipe((0,ot.J)())}return Q})}static#e=this.\u0275fac=function(R){return new(R||I)(l.LFG(on),l.LFG(l.Sil),l.LFG(l.lqb),l.LFG(oi),l.LFG(V))};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();const Kn=new l.OlP("");let hs=(()=>{class I{constructor(w,R,H,Q,ee={}){this.urlSerializer=w,this.transitions=R,this.viewportScroller=H,this.zone=Q,this.options=ee,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},ee.scrollPositionRestoration=ee.scrollPositionRestoration||"disabled",ee.anchorScrolling=ee.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(w=>{w instanceof sr?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=w.navigationTrigger,this.restoredId=w.restoredState?w.restoredState.navigationId:0):w instanceof di?(this.lastId=w.id,this.scheduleScrollEvent(w,this.urlSerializer.parse(w.urlAfterRedirects).fragment)):w instanceof gr&&0===w.code&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(w,this.urlSerializer.parse(w.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(w=>{w instanceof ii&&(w.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(w.position):w.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(w.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(w,R){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new ii(w,"popstate"===this.lastSource?this.store[this.restoredId]:null,R))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static#e=this.\u0275fac=function(R){l.$Z()};static#t=this.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac})}return I})();function ur(I,O){return{\u0275kind:I,\u0275providers:O}}function qu(){const I=(0,l.f3M)(l.zs3);return O=>{const w=I.get(l.z2F);if(O!==w.components[0])return;const R=I.get(on),H=I.get(fm);1===I.get(Ku)&&R.initialNavigation(),I.get(pa,null,l.XFs.Optional)?.setUpPreloading(),I.get(Kn,null,l.XFs.Optional)?.init(),R.resetRootComponentType(w.componentTypes[0]),H.closed||(H.next(),H.complete(),H.unsubscribe())}}const fm=new l.OlP("",{factory:()=>new ne.x}),Ku=new l.OlP("",{providedIn:"root",factory:()=>1}),pa=new l.OlP("");function vm(I){return ur(0,[{provide:pa,useExisting:po},{provide:oi,useExisting:I}])}const Cn=new l.OlP("ROUTER_FORROOT_GUARD"),rf=[Pe.Ye,{provide:tn,useClass:Dr},on,wr,{provide:Ui,useFactory:function er(I){return I.routerState.root},deps:[on]},V,[]];function sf(){return new l.PXZ("Router",on)}let yr=(()=>{class I{constructor(w){}static forRoot(w,R){return{ngModule:I,providers:[rf,[],{provide:x,multi:!0,useValue:w},{provide:Cn,useFactory:Ju,deps:[[on,new l.FiY,new l.tp0]]},{provide:Rn,useValue:R||{}},R?.useHash?{provide:Pe.S$,useClass:Pe.Do}:{provide:Pe.S$,useClass:Pe.b0},{provide:Kn,useFactory:()=>{const I=(0,l.f3M)(Pe.EM),O=(0,l.f3M)(l.R0b),w=(0,l.f3M)(Rn),R=(0,l.f3M)(Ue),H=(0,l.f3M)(tn);return w.scrollOffset&&I.setOffset(w.scrollOffset),new hs(H,R,I,O,w)}},R?.preloadingStrategy?vm(R.preloadingStrategy).\u0275providers:[],{provide:l.PXZ,multi:!0,useFactory:sf},R?.initialNavigation?Xu(R):[],R?.bindToComponentInputs?ur(8,[yn,{provide:mr,useExisting:yn}]).\u0275providers:[],[{provide:lf,useFactory:qu},{provide:l.tb,multi:!0,useExisting:lf}]]}}static forChild(w){return{ngModule:I,providers:[{provide:x,multi:!0,useValue:w}]}}static#e=this.\u0275fac=function(R){return new(R||I)(l.LFG(Cn,8))};static#t=this.\u0275mod=l.oAB({type:I});static#n=this.\u0275inj=l.cJS({})}return I})();function Ju(I){return"guarded"}function Xu(I){return["disabled"===I.initialNavigation?ur(3,[{provide:l.ip1,multi:!0,useFactory:()=>{const O=(0,l.f3M)(on);return()=>{O.setUpLocationChangeListener()}}},{provide:Ku,useValue:2}]).\u0275providers:[],"enabledBlocking"===I.initialNavigation?ur(2,[{provide:Ku,useValue:0},{provide:l.ip1,multi:!0,deps:[l.zs3],useFactory:O=>{const w=O.get(Pe.V_,Promise.resolve());return()=>w.then(()=>new Promise(R=>{const H=O.get(on),Q=O.get(fm);si(H,()=>{R(!0)}),O.get(Ue).afterPreactivation=()=>(R(!0),Q.closed?(0,re.of)(void 0):Q),H.initialNavigation()}))}}]).\u0275providers:[]]}const lf=new l.OlP("")},7243:(ct,De,L)=>{L.d(De,{K6A:()=>pw,I9z:()=>nC,KKC:()=>Cu,Y_4:()=>X_,PEh:()=>sc,CM6:()=>fg,C9t:()=>Iy,fv_:()=>xu,m4W:()=>kg,dRQ:()=>kh,Z4N:()=>xh,YAP:()=>rD,uUW:()=>oC,qvL:()=>$p,nqY:()=>dg,xRP:()=>I1,G55:()=>pD,MgK:()=>Ir,mIp:()=>uh,QoI:()=>rC,saT:()=>aC,blk:()=>Eg,XTz:()=>wg,otW:()=>yy,dTv:()=>Tg,EuU:()=>Ah,hQ:()=>sm,vNO:()=>oc,fzC:()=>nm,A0B:()=>rm,d6G:()=>Gh,ogR:()=>Yh,zYX:()=>fC,zuD:()=>Cc,toC:()=>sC,dml:()=>xg,jND:()=>Yg,KHL:()=>Wg,PDs:()=>Fh,Gcc:()=>Ny,Nh1:()=>Iu,K8c:()=>MD});var l=L(3714),k=L(3223);class de{constructor(f,a){this.fn=f,this.subscriptions=a}unsubscribe(){const f=this.subscriptions.indexOf(this);-1!==f&&this.subscriptions.splice(f,1)}}function ce(d){return null!=d&&"object"==typeof d&&!0===d["@@functional/placeholder"]}function _e(d){return function f(a){return 0===arguments.length||ce(a)?f:d.apply(this,arguments)}}function ve(d){return function f(a,g){switch(arguments.length){case 0:return f;case 1:return ce(a)?f:_e(function(_){return d(a,_)});default:return ce(a)&&ce(g)?f:ce(a)?_e(function(_){return d(_,g)}):ce(g)?_e(function(_){return d(a,_)}):d(a,g)}}}const be=ve(function(f,a){return a instanceof f||null!=a&&(a.constructor===f||"Object"===f.name&&"object"==typeof a)});function ae(d,f){return Object.prototype.hasOwnProperty.call(f,d)}var fe=Object.prototype.toString;const Ve=function(){return"[object Arguments]"===fe.call(arguments)?function(f){return"[object Arguments]"===fe.call(f)}:function(f){return ae("callee",f)}}(),ke=Array.isArray||function(f){return null!=f&&f.length>=0&&"[object Array]"===Object.prototype.toString.call(f)};function Le(d){return"[object String]"===Object.prototype.toString.call(d)}var at=_e(function(f){return null!=f&&"function"==typeof f["fantasy-land/empty"]?f["fantasy-land/empty"]():null!=f&&null!=f.constructor&&"function"==typeof f.constructor["fantasy-land/empty"]?f.constructor["fantasy-land/empty"]():null!=f&&"function"==typeof f.empty?f.empty():null!=f&&null!=f.constructor&&"function"==typeof f.constructor.empty?f.constructor.empty():ke(f)?[]:Le(f)?"":function He(d){return"[object Object]"===Object.prototype.toString.call(d)}(f)?{}:Ve(f)?function(){return arguments}():function Re(d){var f=Object.prototype.toString.call(d);return"[object Uint8ClampedArray]"===f||"[object Int8Array]"===f||"[object Uint8Array]"===f||"[object Int16Array]"===f||"[object Uint16Array]"===f||"[object Int32Array]"===f||"[object Uint32Array]"===f||"[object Float32Array]"===f||"[object Float64Array]"===f||"[object BigInt64Array]"===f||"[object BigUint64Array]"===f}(f)?f.constructor.from(""):void 0});const Dt=at;function ut(d){for(var a,f=[];!(a=d.next()).done;)f.push(a.value);return f}function ne(d,f,a){for(var g=0,_=a.length;g<_;){if(d(f,a[g]))return!0;g+=1}return!1}const nt="function"==typeof Object.is?Object.is:function Me(d,f){return d===f?0!==d||1/d==1/f:d!=d&&f!=f};var it=!{toString:null}.propertyIsEnumerable("toString"),Je=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],wt=function(){return arguments.propertyIsEnumerable("length")}(),mt=function(f,a){for(var g=0;g=0;)ae(a=Je[g],f)&&!mt(_,a)&&(_[_.length]=a),g-=1;return _}:function(f){return Object(f)!==f?[]:Object.keys(f)}),Bn=_e(function(f){return null===f?"Null":void 0===f?"Undefined":Object.prototype.toString.call(f).slice(8,-1)});function Nt(d,f,a,g){var _=ut(d);function j(J,te){return Ar(J,te,a.slice(),g.slice())}return!ne(function(J,te){return!ne(j,te,J)},ut(f),_)}function Ar(d,f,a,g){if(nt(d,f))return!0;var _=Bn(d);if(_!==Bn(f))return!1;if("function"==typeof d["fantasy-land/equals"]||"function"==typeof f["fantasy-land/equals"])return"function"==typeof d["fantasy-land/equals"]&&d["fantasy-land/equals"](f)&&"function"==typeof f["fantasy-land/equals"]&&f["fantasy-land/equals"](d);if("function"==typeof d.equals||"function"==typeof f.equals)return"function"==typeof d.equals&&d.equals(f)&&"function"==typeof f.equals&&f.equals(d);switch(_){case"Arguments":case"Array":case"Object":if("function"==typeof d.constructor&&"Promise"===function Pe(d){var f=String(d).match(/^function (\w*)/);return null==f?"":f[1]}(d.constructor))return d===f;break;case"Boolean":case"Number":case"String":if(typeof d!=typeof f||!nt(d.valueOf(),f.valueOf()))return!1;break;case"Date":if(!nt(d.valueOf(),f.valueOf()))return!1;break;case"Error":return d.name===f.name&&d.message===f.message;case"RegExp":if(d.source!==f.source||d.global!==f.global||d.ignoreCase!==f.ignoreCase||d.multiline!==f.multiline||d.sticky!==f.sticky||d.unicode!==f.unicode)return!1}for(var S=a.length-1;S>=0;){if(a[S]===d)return g[S]===f;S-=1}switch(_){case"Map":return d.size===f.size&&Nt(d.entries(),f.entries(),a.concat([d]),g.concat([f]));case"Set":return d.size===f.size&&Nt(d.values(),f.values(),a.concat([d]),g.concat([f]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var j=Vn(d);if(j.length!==Vn(f).length)return!1;var J=a.concat([d]),te=g.concat([f]);for(S=j.length-1;S>=0;){var Ce=j[S];if(!ae(Ce,f)||!Ar(f[Ce],d[Ce],J,te))return!1;S-=1}return!0}const xe=ve(function(f,a){return Ar(f,a,[],[])}),Fe=_e(function(f){return null!=f&&xe(f,Dt(f))});function Ne(d){return null==d}function We(d){return Ne(d)||Fe(d)}function Ke(d){return be(String,d)}function Xe(d){return be(Object,d)}function cn(d){return be(Map,d)}function kt(d,f){return d!==f}function Vi(d,f){return JSON.stringify(d)===JSON.stringify(f)}function fr(d){const f=new Map;for(const[a,g]of d)cn(g)?f.set(a,fr(g)):f.set(a,g);return f}function nr(d){switch(!0){case cn(d):return fr(d);case Xe(d)&&!Array.isArray(d):return bt({},d);default:return JSON.parse(JSON.stringify(d))}}function bt(...d){const f={};return d.map(a=>Xe(a)?{...a}:{}).forEach(a=>{Object.keys(a).forEach(g=>{const _=a[g];f[g]=Array.isArray(_)?Array.from(_):Xe(_)?bt(f[g]||{},_):_})}),f}function Un(d=window){return!Ne(d)}let $r,tn,Dr,Nn;function qi(d=!0){if(!d||!$r){const f=document&&document.querySelector("[ng-version]");$r=f?""+f.getAttribute("ng-version"):void 0}return $r}function ti(d=!0){return d&&$r||(tn=window?.angular?.version?.full),tn}function ni(d=!0){return d&&Dr||(Dr=window?.CDS?._react?.version?window.CDS._react.version:document.querySelector("[data-reactroot], [data-reactid]")?"unknown version":void 0),Dr}function $n(d=!0){if(!d||!Nn){const f=document.querySelectorAll("*");let a;for(let g=0;g"-"+f.toLowerCase())}function pe(d){return d.charAt(0).toUpperCase()+d.slice(1)}const ht=new class{constructor(){if(this.supports={js:!0},!document.body.hasAttribute("cds-supports")||"no-js"===document.body.getAttribute("cds-supports")){const d=Pi(Object.keys(this.supports).reduce((f,a)=>`${f} ${this.supports[a]?a:"no-"+a}`,"")).trim();document.body.setAttribute("cds-supports",d)}}};function En(d,f){switch(d){case 0:return function(){return f.apply(this,arguments)};case 1:return function(a){return f.apply(this,arguments)};case 2:return function(a,g){return f.apply(this,arguments)};case 3:return function(a,g,_){return f.apply(this,arguments)};case 4:return function(a,g,_,S){return f.apply(this,arguments)};case 5:return function(a,g,_,S,j){return f.apply(this,arguments)};case 6:return function(a,g,_,S,j,J){return f.apply(this,arguments)};case 7:return function(a,g,_,S,j,J,te){return f.apply(this,arguments)};case 8:return function(a,g,_,S,j,J,te,Ce){return f.apply(this,arguments)};case 9:return function(a,g,_,S,j,J,te,Ce,Ge){return f.apply(this,arguments)};case 10:return function(a,g,_,S,j,J,te,Ce,Ge,St){return f.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function ui(d,f,a){return function(){for(var g=[],_=0,S=d,j=0,J=!1;j=arguments.length)?te=f[j]:(te=arguments[_],_+=1),g[j]=te,ce(te)?J=!0:S-=1,j+=1}return!J&&S<=0?a.apply(this,g):En(Math.max(0,S),ui(d,g,a))}}const Ei=ve(function(f,a){return 1===f?_e(a):En(f,ui(f,[],a))}),Fn=Number.isInteger||function(f){return f<<0===f},Wt=ve(function(f,a){var g=f<0?a.length+f:f;return Le(a)?a.charAt(g):a[g]}),zi=ve(function(f,a){return f.map(function(g){for(var j,_=a,S=0;Svoid 0!==Yn(d,f)),sr=Si({"@@functional/placeholder":!0},window);class di{static log(...f){gr()&&Gr()&&console.log(...f)}static warn(...f){gr()&&Gr()&&console.warn(...f)}static error(...f){gr()&&Gr()&&console.error(...f)}}function Gr(){return!sr(["jasmine"])}function gr(){return!window.CDS.environment.production}function hn(){Un()&&(window.CDS=window.CDS||{_version:[],_react:{version:void 0},_supports:ht.supports,_isStateProxied:!1,_state:{focusTrapItems:[],layerElements:[],i18nRegistry:{},elementRegistry:{},iconRegistry:{},motionRegistry:{}},environment:{production:!1},getDetails:$s,logDetails:ua},function(){const d="6.9.0";window.CDS._version.indexOf(d)<0&&(window.CDS._version.push(d),document.querySelector("body")?.setAttribute("cds-version",window.CDS._version.join(" "))),window.CDS._version.length>1&&di.warn("Running more than one version of Clarity can cause unexpected issues. Please ensure only one version is loaded.")}(),window.CDS._isStateProxied||(window.CDS._isStateProxied=!0,window.CDS._state=new Proxy(window.CDS._state,{set:(d,f,a)=>{const g={key:f,prev:window.CDS._state[f],current:a};return d[f]=a,document.dispatchEvent(new CustomEvent("CDS_STATE_UPDATE",{detail:g})),!0}})))}function $s(){return{versions:window.CDS._version,environment:window.CDS.environment,userAgent:navigator.userAgent,supports:window.CDS._supports,angularVersion:qi(!1),angularJSVersion:ti(!1),reactVersion:ni(!1),vueVersion:$n(!1),state:{...window.CDS._state,iconRegistry:Object.keys(window.CDS._state.iconRegistry),motionRegistry:Object.keys(window.CDS._state.motionRegistry),focusTrapRegistry:Object.keys(window.CDS._state.focusTrapItems.map(d=>d.focusTrapId))}}}function ua(){di.log(JSON.stringify($s(),null,2))}const da=new class re{constructor(){this.subscriptions=[]}subscribe(f){const a=new de(f,this.subscriptions);return this.subscriptions.push(a),a}emit(f){this.subscriptions.forEach(a=>a.fn(f))}toEventObservable(){return this}};da.listener=document.addEventListener("CDS_STATE_UPDATE",d=>da.emit(d.detail));class hi{static get state(){return hn(),window.CDS._state}static getValue(f){return hi.state[f]}static setValue(f,a){hi.state[f]=a}static log(){di.log(JSON.stringify(hi.state,null,2))}}hi.stateUpdates=da.toEventObservable();const Io=["unknown",{outline:''}];class Jt{static get registry(){return{unknown:Io[1],...hi.state.iconRegistry}}static addIcons(...f){hi.state.iconRegistry={...hi.state.iconRegistry,...Object.fromEntries(f.filter(([a])=>!Jt.registry[a]))}}static addAliases(...f){const a=f.filter(([g])=>Jt.registry[g]).flatMap(([g,_])=>_.map(S=>[S,Jt.registry[g]]));hi.state.iconRegistry={...hi.state.iconRegistry,...Object.fromEntries(a)}}static getIconNameFromShape(f){return f[0]}}const Yr=["angle",{outline:''}],ii=["exclamation-circle",{outline:'',solid:''}],Di=["check-circle",{outline:'',solid:''}],Ao=["ellipsis-horizontal",{outline:'',outlineBadged:''}],Or=["window-close",{outline:''}],Zt=["event",{outline:'',outlineAlerted:'',outlineBadged:'',solid:'',solidAlerted:'',solidBadged:''}],Hn=["calendar",{outline:'',outlineAlerted:'',outlineBadged:'',solid:'',solidAlerted:'',solidBadged:''}],_i=["eye-hide",{outline:'',solid:''}],Ui=["eye",{outline:'',solid:''}],Zr=["ellipsis-vertical",{outline:'',outlineBadged:''}],On=["view-columns",{outline:''}],Ht=["arrow",{outline:''}],fi=["times",{outline:''}],ri=["step-forward-2",{outline:''}],yn=["angle-double",{outline:''}],vr=["filter-grid-circle",{outline:'',solid:''}],As=["filter-grid",{outline:'',solid:''}],qr=["info-circle",{outline:'',solid:''}],Gs=["exclamation-triangle",{outline:'',solid:''}],$i=["circle",{outline:'',solid:''}],Ra=["dot-circle",{outline:''}],_r=["error-standard",{outline:'',solid:''}],Ys=["success-standard",{outline:'',solid:''}];var zt=L(5990),Mo=L(8527),or=L(1553);L(8777),L(4134),L(8014);var Ln=L(9735),Zn=L(1050),Xr=L(7701),Qn=L(4359),Ms=(L(2972),L(3318)),et=L(5992),fn=L(8626),qn=L(1145),ki=L(3276),ao=L(2861),es=L(287),lo=L(238);class ds extends et.x{constructor(f=1/0,a=1/0,g=lo.l){super(),this._bufferSize=f,this._windowTime=a,this._timestampProvider=g,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=a===1/0,this._bufferSize=Math.max(1,f),this._windowTime=Math.max(1,a)}next(f){const{isStopped:a,_buffer:g,_infiniteTimeWindow:_,_timestampProvider:S,_windowTime:j}=this;a||(g.push(f),!_&&g.push(S.now()+j)),this._trimBuffer(),super.next(f)}_subscribe(f){this._throwIfClosed(),this._trimBuffer();const a=this._innerSubscribe(f),{_infiniteTimeWindow:g,_buffer:_}=this,S=_.slice();for(let j=0;j{class d{constructor(a){this._platformId=a,this.isBrowser=this._platformId?(0,k.NF)(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!se)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(l.Lbi))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();function xo(d){return function hl(){if(null==Go&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Go=!0}))}finally{Go=Go||!1}return Go}()?d:!!d.capture}function cr(d){if(function Os(){if(null==Oo){const d=typeof document<"u"?document.head:null;Oo=!(!d||!d.createShadowRoot&&!d.attachShadow)}return Oo}()){const f=d.getRootNode?d.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&f instanceof ShadowRoot)return f}return null}function uo(d){return d.composedPath?d.composedPath()[0]:d.target}function gi(d){return null!=d&&"false"!=`${d}`}function fs(d){return d instanceof l.SBq?d.nativeElement:d}let Dw=(()=>{class d{constructor(a){this._platform=a}isDisabled(a){return a.hasAttribute("disabled")}isVisible(a){return function ww(d){return!!(d.offsetWidth||d.offsetHeight||"function"==typeof d.getClientRects&&d.getClientRects().length)}(a)&&"visible"===getComputedStyle(a).visibility}isTabbable(a){if(!this._platform.isBrowser)return!1;const g=function hf(d){try{return d.frameElement}catch{return null}}(function id(d){return d.ownerDocument&&d.ownerDocument.defaultView||window}(a));if(g&&(-1===Sm(g)||!this.isVisible(g)))return!1;let _=a.nodeName.toLowerCase(),S=Sm(a);return a.hasAttribute("contenteditable")?-1!==S:!("iframe"===_||"object"===_||this._platform.WEBKIT&&this._platform.IOS&&!function Ic(d){let f=d.nodeName.toLowerCase(),a="input"===f&&d.type;return"text"===a||"password"===a||"select"===f||"textarea"===f}(a))&&("audio"===_?!!a.hasAttribute("controls")&&-1!==S:"video"===_?-1!==S&&(null!==S||this._platform.FIREFOX||a.hasAttribute("controls")):a.tabIndex>=0)}isFocusable(a,g){return function pf(d){return!function LC(d){return function Tw(d){return"input"==d.nodeName.toLowerCase()}(d)&&"hidden"==d.type}(d)&&(function FC(d){let f=d.nodeName.toLowerCase();return"input"===f||"select"===f||"button"===f||"textarea"===f}(d)||function Ew(d){return function ff(d){return"a"==d.nodeName.toLowerCase()}(d)&&d.hasAttribute("href")}(d)||d.hasAttribute("contenteditable")||Cl(d))}(a)&&!this.isDisabled(a)&&(g?.ignoreVisibility||this.isVisible(a))}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(Tt))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();function Cl(d){if(!d.hasAttribute("tabindex")||void 0===d.tabIndex)return!1;let f=d.getAttribute("tabindex");return!(!f||isNaN(parseInt(f,10)))}function Sm(d){if(!Cl(d))return null;const f=parseInt(d.getAttribute("tabindex")||"",10);return isNaN(f)?-1:f}class Iw{get enabled(){return this._enabled}set enabled(f){this._enabled=f,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(f,this._startAnchor),this._toggleAnchorTabIndex(f,this._endAnchor))}constructor(f,a,g,_,S=!1){this._element=f,this._checker=a,this._ngZone=g,this._document=_,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,S||this.attachAnchors()}destroy(){const f=this._startAnchor,a=this._endAnchor;f&&(f.removeEventListener("focus",this.startAnchorListener),f.remove()),a&&(a.removeEventListener("focus",this.endAnchorListener),a.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(f){return new Promise(a=>{this._executeOnStable(()=>a(this.focusInitialElement(f)))})}focusFirstTabbableElementWhenReady(f){return new Promise(a=>{this._executeOnStable(()=>a(this.focusFirstTabbableElement(f)))})}focusLastTabbableElementWhenReady(f){return new Promise(a=>{this._executeOnStable(()=>a(this.focusLastTabbableElement(f)))})}_getRegionBoundary(f){const a=this._element.querySelectorAll(`[cdk-focus-region-${f}], [cdkFocusRegion${f}], [cdk-focus-${f}]`);return"start"==f?a.length?a[0]:this._getFirstTabbableElement(this._element):a.length?a[a.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(f){const a=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(a){if(!this._checker.isFocusable(a)){const g=this._getFirstTabbableElement(a);return g?.focus(f),!!g}return a.focus(f),!0}return this.focusFirstTabbableElement(f)}focusFirstTabbableElement(f){const a=this._getRegionBoundary("start");return a&&a.focus(f),!!a}focusLastTabbableElement(f){const a=this._getRegionBoundary("end");return a&&a.focus(f),!!a}hasAttached(){return this._hasAttached}_getFirstTabbableElement(f){if(this._checker.isFocusable(f)&&this._checker.isTabbable(f))return f;const a=f.children;for(let g=0;g=0;g--){const _=a[g].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(a[g]):null;if(_)return _}return null}_createAnchor(){const f=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,f),f.classList.add("cdk-visually-hidden"),f.classList.add("cdk-focus-trap-anchor"),f.setAttribute("aria-hidden","true"),f}_toggleAnchorTabIndex(f,a){f?a.setAttribute("tabindex","0"):a.removeAttribute("tabindex")}toggleAnchors(f){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(f,this._startAnchor),this._toggleAnchorTabIndex(f,this._endAnchor))}_executeOnStable(f){this._ngZone.isStable?f():this._ngZone.onStable.pipe((0,Qn.q)(1)).subscribe(f)}}let Dm=(()=>{class d{constructor(a,g,_){this._checker=a,this._ngZone=g,this._document=_}create(a,g=!1){return new Iw(a,this._checker,this._ngZone,this._document,g)}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(Dw),l.LFG(l.R0b),l.LFG(k.K0))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})(),gf=(()=>{class d{get enabled(){return this.focusTrap.enabled}set enabled(a){this.focusTrap.enabled=gi(a)}get autoCapture(){return this._autoCapture}set autoCapture(a){this._autoCapture=gi(a)}constructor(a,g,_){this._elementRef=a,this._focusTrapFactory=g,this._previouslyFocusedElement=null,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}ngOnDestroy(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}ngOnChanges(a){const g=a.autoCapture;g&&!g.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=function Ro(){let d=typeof document<"u"&&document?document.activeElement:null;for(;d&&d.shadowRoot;){const f=d.shadowRoot.activeElement;if(f===d)break;d=f}return d}(),this.focusTrap.focusInitialElementWhenReady()}static#e=this.\u0275fac=function(g){return new(g||d)(l.Y36(l.SBq),l.Y36(Dm),l.Y36(k.K0))};static#t=this.\u0275dir=l.lG2({type:d,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[l.TTD]})}return d})();var od=L(3733),ja=(L(2698),L(6927));let Bw=(()=>{class d{constructor(a,g,_){this._platform=a,this._change=new et.x,this._changeListener=S=>{this._change.next(S)},this._document=_,g.runOutsideAngular(()=>{if(a.isBrowser){const S=this._getWindow();S.addEventListener("resize",this._changeListener),S.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const a=this._getWindow();a.removeEventListener("resize",this._changeListener),a.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const a={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),a}getViewportRect(){const a=this.getViewportScrollPosition(),{width:g,height:_}=this.getViewportSize();return{top:a.top,left:a.left,bottom:a.top+_,right:a.left+g,height:_,width:g}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const a=this._document,g=this._getWindow(),_=a.documentElement,S=_.getBoundingClientRect();return{top:-S.top||a.body.scrollTop||g.scrollY||_.scrollTop||0,left:-S.left||a.body.scrollLeft||g.scrollX||_.scrollLeft||0}}change(a=20){return a>0?this._change.pipe((0,ja.e)(a)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const a=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:a.innerWidth,height:a.innerHeight}:{width:0,height:0}}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(Tt),l.LFG(l.R0b),l.LFG(k.K0,8))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();var va=L(5350),Rc=L(7137);const qC=new l.OlP("cdk-dir-doc",{providedIn:"root",factory:function Uw(){return(0,l.f3M)(k.K0)}}),KC=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let gs=(()=>{class d{constructor(a){this.value="ltr",this.change=new l.vpe,a&&(this.value=function $w(d){const f=d?.toLowerCase()||"";return"auto"===f&&typeof navigator<"u"&&navigator?.language?KC.test(navigator.language)?"rtl":"ltr":"rtl"===f?"rtl":"ltr"}((a.body?a.body.dir:null)||(a.documentElement?a.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(qC,8))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();function xm(d,f,a){for(let g in f)if(f.hasOwnProperty(g)){const _=f[g];_?d.setProperty(g,_,a?.has(g)?"important":""):d.removeProperty(g)}return d}function za(d,f){const a=f?"":"none";xm(d.style,{"touch-action":f?"":"none","-webkit-user-drag":f?"":"none","-webkit-tap-highlight-color":f?"":"transparent","user-select":a,"-ms-user-select":a,"-webkit-user-select":a,"-moz-user-select":a})}function Om(d,f,a){xm(d.style,{position:f?"":"fixed",top:f?"":"0",opacity:f?"":"0",left:f?"":"-999em"},a)}function ld(d,f){return f&&"none"!=f?d+" "+f:d}function Rm(d){const f=d.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(d)*f}function _f(d,f){return d.getPropertyValue(f).split(",").map(g=>g.trim())}function yf(d){const f=d.getBoundingClientRect();return{top:f.top,right:f.right,bottom:f.bottom,left:f.left,width:f.width,height:f.height,x:f.x,y:f.y}}function kc(d,f,a){const{top:g,bottom:_,left:S,right:j}=d;return a>=g&&a<=_&&f>=S&&f<=j}function _a(d,f,a){d.top+=f,d.bottom=d.top+d.height,d.left+=a,d.right=d.left+d.width}function Pm(d,f,a,g){const{top:_,right:S,bottom:j,left:J,width:te,height:Ce}=d,Ge=te*f,St=Ce*f;return g>_-St&&gJ-Ge&&a{this.positions.set(a,{scrollPosition:{top:a.scrollTop,left:a.scrollLeft},clientRect:yf(a)})})}handleScroll(f){const a=uo(f),g=this.positions.get(a);if(!g)return null;const _=g.scrollPosition;let S,j;if(a===this._document){const Ce=this.getViewportScrollPosition();S=Ce.top,j=Ce.left}else S=a.scrollTop,j=a.scrollLeft;const J=_.top-S,te=_.left-j;return this.positions.forEach((Ce,Ge)=>{Ce.clientRect&&a!==Ge&&a.contains(Ge)&&_a(Ce.clientRect,J,te)}),_.top=S,_.left=j,{top:J,left:te}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function km(d){const f=d.cloneNode(!0),a=f.querySelectorAll("[id]"),g=d.nodeName.toLowerCase();f.removeAttribute("id");for(let _=0;_za(g,a)))}constructor(f,a,g,_,S,j){this._config=a,this._document=g,this._ngZone=_,this._viewportRuler=S,this._dragDropRegistry=j,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new et.x,this._pointerMoveSubscription=va.w0.EMPTY,this._pointerUpSubscription=va.w0.EMPTY,this._scrollSubscription=va.w0.EMPTY,this._resizeSubscription=va.w0.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new et.x,this.started=new et.x,this.released=new et.x,this.ended=new et.x,this.entered=new et.x,this.exited=new et.x,this.dropped=new et.x,this.moved=this._moveEvents,this._pointerDown=J=>{if(this.beforeStarted.next(),this._handles.length){const te=this._getTargetHandle(J);te&&!this._disabledHandles.has(te)&&!this.disabled&&this._initializeDragSequence(te,J)}else this.disabled||this._initializeDragSequence(this._rootElement,J)},this._pointerMove=J=>{const te=this._getPointerPositionOnPage(J);if(!this._hasStartedDragging){if(Math.abs(te.x-this._pickupPositionOnPage.x)+Math.abs(te.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const un=Date.now()>=this._dragStartTime+this._getDragStartDelay(J),Xn=this._dropContainer;if(!un)return void this._endDragSequence(J);(!Xn||!Xn.isDragging()&&!Xn.isReceiving())&&(J.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(J)))}return}J.preventDefault();const Ce=this._getConstrainedPointerPosition(te);if(this._hasMoved=!0,this._lastKnownPointerPosition=te,this._updatePointerDirectionDelta(Ce),this._dropContainer)this._updateActiveDropContainer(Ce,te);else{const Ge=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,St=this._activeTransform;St.x=Ce.x-Ge.x+this._passiveTransform.x,St.y=Ce.y-Ge.y+this._passiveTransform.y,this._applyRootElementTransform(St.x,St.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:Ce,event:J,distance:this._getDragDistance(Ce),delta:this._pointerDirectionDelta})})},this._pointerUp=J=>{this._endDragSequence(J)},this._nativeDragStart=J=>{if(this._handles.length){const te=this._getTargetHandle(J);te&&!this._disabledHandles.has(te)&&!this.disabled&&J.preventDefault()}else this.disabled||J.preventDefault()},this.withRootElement(f).withParent(a.parentDragRef||null),this._parentPositions=new Nc(g),j.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(f){this._handles=f.map(g=>fs(g)),this._handles.forEach(g=>za(g,this.disabled)),this._toggleNativeDragInteractions();const a=new Set;return this._disabledHandles.forEach(g=>{this._handles.indexOf(g)>-1&&a.add(g)}),this._disabledHandles=a,this}withPreviewTemplate(f){return this._previewTemplate=f,this}withPlaceholderTemplate(f){return this._placeholderTemplate=f,this}withRootElement(f){const a=fs(f);return a!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{a.addEventListener("mousedown",this._pointerDown,Vc),a.addEventListener("touchstart",this._pointerDown,Lc),a.addEventListener("dragstart",this._nativeDragStart,Vc)}),this._initialTransform=void 0,this._rootElement=a),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(f){return this._boundaryElement=f?fs(f):null,this._resizeSubscription.unsubscribe(),f&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(f){return this._parentDragRef=f,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(f){!this._disabledHandles.has(f)&&this._handles.indexOf(f)>-1&&(this._disabledHandles.add(f),za(f,!0))}enableHandle(f){this._disabledHandles.has(f)&&(this._disabledHandles.delete(f),za(f,this.disabled))}withDirection(f){return this._direction=f,this}_withDropContainer(f){this._dropContainer=f}getFreeDragPosition(){const f=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:f.x,y:f.y}}setFreeDragPosition(f){return this._activeTransform={x:0,y:0},this._passiveTransform.x=f.x,this._passiveTransform.y=f.y,this._dropContainer||this._applyRootElementTransform(f.x,f.y),this}withPreviewContainer(f){return this._previewContainer=f,this}_sortFromLastPointerPosition(){const f=this._lastKnownPointerPosition;f&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(f),f)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(f){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:f}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(f),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const a=this._getPointerPositionOnPage(f);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(a),dropPoint:a,event:f})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(f){ud(f)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const a=this._dropContainer;if(a){const g=this._rootElement,_=g.parentNode,S=this._placeholder=this._createPlaceholderElement(),j=this._anchor=this._anchor||this._document.createComment(""),J=this._getShadowRoot();_.insertBefore(j,g),this._initialTransform=g.style.transform||"",this._preview=this._createPreviewElement(),Om(g,!1,bf),this._document.body.appendChild(_.replaceChild(S,g)),this._getPreviewInsertionPoint(_,J).appendChild(this._preview),this.started.next({source:this,event:f}),a.start(),this._initialContainer=a,this._initialIndex=a.getItemIndex(this)}else this.started.next({source:this,event:f}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(a?a.getScrollableParents():[])}_initializeDragSequence(f,a){this._parentDragRef&&a.stopPropagation();const g=this.isDragging(),_=ud(a),S=!_&&0!==a.button,j=this._rootElement,J=uo(a),te=!_&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),Ce=_?function rd(d){const f=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];return!(!f||-1!==f.identifier||null!=f.radiusX&&1!==f.radiusX||null!=f.radiusY&&1!==f.radiusY)}(a):function Em(d){return 0===d.buttons||0===d.detail}(a);if(J&&J.draggable&&"mousedown"===a.type&&a.preventDefault(),g||S||te||Ce)return;if(this._handles.length){const Rt=j.style;this._rootElementTapHighlight=Rt.webkitTapHighlightColor||"",Rt.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(Rt=>this._updateOnScroll(Rt)),this._boundaryElement&&(this._boundaryRect=yf(this._boundaryElement));const Ge=this._previewTemplate;this._pickupPositionInElement=Ge&&Ge.template&&!Ge.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,f,a);const St=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(a);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:St.x,y:St.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,a)}_cleanupDragArtifacts(f){Om(this._rootElement,!0,bf),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const a=this._dropContainer,g=a.getItemIndex(this),_=this._getPointerPositionOnPage(f),S=this._getDragDistance(_),j=a._isOverContainer(_.x,_.y);this.ended.next({source:this,distance:S,dropPoint:_,event:f}),this.dropped.next({item:this,currentIndex:g,previousIndex:this._initialIndex,container:a,previousContainer:this._initialContainer,isPointerOverContainer:j,distance:S,dropPoint:_,event:f}),a.drop(this,g,this._initialIndex,this._initialContainer,j,S,_,f),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:f,y:a},{x:g,y:_}){let S=this._initialContainer._getSiblingContainerFromPosition(this,f,a);!S&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(f,a)&&(S=this._initialContainer),S&&S!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=S,this._dropContainer.enter(this,f,a,S===this._initialContainer&&S.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:S,currentIndex:S.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(g,_),this._dropContainer._sortItem(this,f,a,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(f,a):this._applyPreviewTransform(f-this._pickupPositionInElement.x,a-this._pickupPositionInElement.y))}_createPreviewElement(){const f=this._previewTemplate,a=this.previewClass,g=f?f.template:null;let _;if(g&&f){const S=f.matchSize?this._initialClientRect:null,j=f.viewContainer.createEmbeddedView(g,f.context);j.detectChanges(),_=Sf(j,this._document),this._previewRef=j,f.matchSize?Fm(_,S):_.style.transform=ya(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else _=km(this._rootElement),Fm(_,this._initialClientRect),this._initialTransform&&(_.style.transform=this._initialTransform);return xm(_.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},bf),za(_,!1),_.classList.add("cdk-drag-preview"),_.setAttribute("dir",this._direction),a&&(Array.isArray(a)?a.forEach(S=>_.classList.add(S)):_.classList.add(a)),_}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const f=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(f.left,f.top);const a=function JC(d){const f=getComputedStyle(d),a=_f(f,"transition-property"),g=a.find(J=>"transform"===J||"all"===J);if(!g)return 0;const _=a.indexOf(g),S=_f(f,"transition-duration"),j=_f(f,"transition-delay");return Rm(S[_])+Rm(j[_])}(this._preview);return 0===a?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(g=>{const _=j=>{(!j||uo(j)===this._preview&&"transform"===j.propertyName)&&(this._preview?.removeEventListener("transitionend",_),g(),clearTimeout(S))},S=setTimeout(_,1.5*a);this._preview.addEventListener("transitionend",_)}))}_createPlaceholderElement(){const f=this._placeholderTemplate,a=f?f.template:null;let g;return a?(this._placeholderRef=f.viewContainer.createEmbeddedView(a,f.context),this._placeholderRef.detectChanges(),g=Sf(this._placeholderRef,this._document)):g=km(this._rootElement),g.style.pointerEvents="none",g.classList.add("cdk-drag-placeholder"),g}_getPointerPositionInElement(f,a,g){const _=a===this._rootElement?null:a,S=_?_.getBoundingClientRect():f,j=ud(g)?g.targetTouches[0]:g,J=this._getViewportScrollPosition();return{x:S.left-f.left+(j.pageX-S.left-J.left),y:S.top-f.top+(j.pageY-S.top-J.top)}}_getPointerPositionOnPage(f){const a=this._getViewportScrollPosition(),g=ud(f)?f.touches[0]||f.changedTouches[0]||{pageX:0,pageY:0}:f,_=g.pageX-a.left,S=g.pageY-a.top;if(this._ownerSVGElement){const j=this._ownerSVGElement.getScreenCTM();if(j){const J=this._ownerSVGElement.createSVGPoint();return J.x=_,J.y=S,J.matrixTransform(j.inverse())}}return{x:_,y:S}}_getConstrainedPointerPosition(f){const a=this._dropContainer?this._dropContainer.lockAxis:null;let{x:g,y:_}=this.constrainPosition?this.constrainPosition(f,this,this._initialClientRect,this._pickupPositionInElement):f;if("x"===this.lockAxis||"x"===a?_=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):("y"===this.lockAxis||"y"===a)&&(g=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){const{x:S,y:j}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,J=this._boundaryRect,{width:te,height:Ce}=this._getPreviewRect(),Ge=J.top+j,St=J.bottom-(Ce-j);g=Nm(g,J.left+S,J.right-(te-S)),_=Nm(_,Ge,St)}return{x:g,y:_}}_updatePointerDirectionDelta(f){const{x:a,y:g}=f,_=this._pointerDirectionDelta,S=this._pointerPositionAtLastDirectionChange,j=Math.abs(a-S.x),J=Math.abs(g-S.y);return j>this._config.pointerDirectionChangeThreshold&&(_.x=a>S.x?1:-1,S.x=a),J>this._config.pointerDirectionChangeThreshold&&(_.y=g>S.y?1:-1,S.y=g),_}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const f=this._handles.length>0||!this.isDragging();f!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=f,za(this._rootElement,f))}_removeRootElementListeners(f){f.removeEventListener("mousedown",this._pointerDown,Vc),f.removeEventListener("touchstart",this._pointerDown,Lc),f.removeEventListener("dragstart",this._nativeDragStart,Vc)}_applyRootElementTransform(f,a){const g=ya(f,a),_=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=_.transform&&"none"!=_.transform?_.transform:""),_.transform=ld(g,this._initialTransform)}_applyPreviewTransform(f,a){const g=this._previewTemplate?.template?void 0:this._initialTransform,_=ya(f,a);this._preview.style.transform=ld(_,g)}_getDragDistance(f){const a=this._pickupPositionOnPage;return a?{x:f.x-a.x,y:f.y-a.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:f,y:a}=this._passiveTransform;if(0===f&&0===a||this.isDragging()||!this._boundaryElement)return;const g=this._rootElement.getBoundingClientRect(),_=this._boundaryElement.getBoundingClientRect();if(0===_.width&&0===_.height||0===g.width&&0===g.height)return;const S=_.left-g.left,j=g.right-_.right,J=_.top-g.top,te=g.bottom-_.bottom;_.width>g.width?(S>0&&(f+=S),j>0&&(f-=j)):f=0,_.height>g.height?(J>0&&(a+=J),te>0&&(a-=te)):a=0,(f!==this._passiveTransform.x||a!==this._passiveTransform.y)&&this.setFreeDragPosition({y:a,x:f})}_getDragStartDelay(f){const a=this.dragStartDelay;return"number"==typeof a?a:ud(f)?a.touch:a?a.mouse:0}_updateOnScroll(f){const a=this._parentPositions.handleScroll(f);if(a){const g=uo(f);this._boundaryRect&&g!==this._boundaryElement&&g.contains(this._boundaryElement)&&_a(this._boundaryRect,a.top,a.left),this._pickupPositionOnPage.x+=a.left,this._pickupPositionOnPage.y+=a.top,this._dropContainer||(this._activeTransform.x-=a.left,this._activeTransform.y-=a.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=cr(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(f,a){const g=this._previewContainer||"global";if("parent"===g)return f;if("global"===g){const _=this._document;return a||_.fullscreenElement||_.webkitFullscreenElement||_.mozFullScreenElement||_.msFullscreenElement||_.body}return fs(g)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(f){return this._handles.find(a=>f.target&&(f.target===a||a.contains(f.target)))}}function ya(d,f){return`translate3d(${Math.round(d)}px, ${Math.round(f)}px, 0)`}function Nm(d,f,a){return Math.max(f,Math.min(a,d))}function ud(d){return"t"===d.type[0]}function Sf(d,f){const a=d.rootNodes;if(1===a.length&&a[0].nodeType===f.ELEMENT_NODE)return a[0];const g=f.createElement("div");return a.forEach(_=>g.appendChild(_)),g}function Fm(d,f){d.style.width=`${f.width}px`,d.style.height=`${f.height}px`,d.style.transform=ya(f.left,f.top)}function Bc(d,f){return Math.max(0,Math.min(f,d))}class dd{constructor(f,a){this._element=f,this._dragDropRegistry=a,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(f){this.withItems(f)}sort(f,a,g,_){const S=this._itemPositions,j=this._getItemIndexFromPointerPosition(f,a,g,_);if(-1===j&&S.length>0)return null;const J="horizontal"===this.orientation,te=S.findIndex(Ds=>Ds.drag===f),Ce=S[j],St=Ce.clientRect,Rt=te>j?1:-1,un=this._getItemOffsetPx(S[te].clientRect,St,Rt),Xn=this._getSiblingOffsetPx(te,S,Rt),bi=S.slice();return function Gw(d,f,a){const g=Bc(f,d.length-1),_=Bc(a,d.length-1);if(g===_)return;const S=d[g],j=_{if(bi[ef]===Ds)return;const Dc=Ds.drag===f,dm=Dc?un:Xn,hm=Dc?f.getPlaceholderElement():Ds.drag.getRootElement();Ds.offset+=dm,J?(hm.style.transform=ld(`translate3d(${Math.round(Ds.offset)}px, 0, 0)`,Ds.initialTransform),_a(Ds.clientRect,0,dm)):(hm.style.transform=ld(`translate3d(0, ${Math.round(Ds.offset)}px, 0)`,Ds.initialTransform),_a(Ds.clientRect,dm,0))}),this._previousSwap.overlaps=kc(St,a,g),this._previousSwap.drag=Ce.drag,this._previousSwap.delta=J?_.x:_.y,{previousIndex:te,currentIndex:j}}enter(f,a,g,_){const S=null==_||_<0?this._getItemIndexFromPointerPosition(f,a,g):_,j=this._activeDraggables,J=j.indexOf(f),te=f.getPlaceholderElement();let Ce=j[S];if(Ce===f&&(Ce=j[S+1]),!Ce&&(null==S||-1===S||S-1&&j.splice(J,1),Ce&&!this._dragDropRegistry.isDragging(Ce)){const Ge=Ce.getRootElement();Ge.parentElement.insertBefore(te,Ge),j.splice(S,0,f)}else fs(this._element).appendChild(te),j.push(f);te.style.transform="",this._cacheItemPositions()}withItems(f){this._activeDraggables=f.slice(),this._cacheItemPositions()}withSortPredicate(f){this._sortPredicate=f}reset(){this._activeDraggables.forEach(f=>{const a=f.getRootElement();if(a){const g=this._itemPositions.find(_=>_.drag===f)?.initialTransform;a.style.transform=g||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(f){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(g=>g.drag===f)}updateOnScroll(f,a){this._itemPositions.forEach(({clientRect:g})=>{_a(g,f,a)}),this._itemPositions.forEach(({drag:g})=>{this._dragDropRegistry.isDragging(g)&&g._sortFromLastPointerPosition()})}_cacheItemPositions(){const f="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(a=>{const g=a.getVisibleElement();return{drag:a,offset:0,initialTransform:g.style.transform||"",clientRect:yf(g)}}).sort((a,g)=>f?a.clientRect.left-g.clientRect.left:a.clientRect.top-g.clientRect.top)}_getItemOffsetPx(f,a,g){const _="horizontal"===this.orientation;let S=_?a.left-f.left:a.top-f.top;return-1===g&&(S+=_?a.width-f.width:a.height-f.height),S}_getSiblingOffsetPx(f,a,g){const _="horizontal"===this.orientation,S=a[f].clientRect,j=a[f+-1*g];let J=S[_?"width":"height"]*g;if(j){const te=_?"left":"top",Ce=_?"right":"bottom";-1===g?J-=j.clientRect[te]-S[Ce]:J+=S[te]-j.clientRect[Ce]}return J}_shouldEnterAsFirstChild(f,a){if(!this._activeDraggables.length)return!1;const g=this._itemPositions,_="horizontal"===this.orientation;if(g[0].drag!==this._activeDraggables[0]){const j=g[g.length-1].clientRect;return _?f>=j.right:a>=j.bottom}{const j=g[0].clientRect;return _?f<=j.left:a<=j.top}}_getItemIndexFromPointerPosition(f,a,g,_){const S="horizontal"===this.orientation,j=this._itemPositions.findIndex(({drag:J,clientRect:te})=>J!==f&&((!_||J!==this._previousSwap.drag||!this._previousSwap.overlaps||(S?_.x:_.y)!==this._previousSwap.delta)&&(S?a>=Math.floor(te.left)&&a=Math.floor(te.top)&&g!0,this.sortPredicate=()=>!0,this.beforeStarted=new et.x,this.entered=new et.x,this.exited=new et.x,this.dropped=new et.x,this.sorted=new et.x,this.receivingStarted=new et.x,this.receivingStopped=new et.x,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=va.w0.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new et.x,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),(0,Rc.F)(0,od.Z).pipe((0,Xr.R)(this._stopScrollTimers)).subscribe(()=>{const j=this._scrollNode,J=this.autoScrollStep;1===this._verticalScrollDirection?j.scrollBy(0,-J):2===this._verticalScrollDirection&&j.scrollBy(0,J),1===this._horizontalScrollDirection?j.scrollBy(-J,0):2===this._horizontalScrollDirection&&j.scrollBy(J,0)})},this.element=fs(f),this._document=g,this.withScrollableParents([this.element]),a.registerDropContainer(this),this._parentPositions=new Nc(g),this._sortStrategy=new dd(this.element,a),this._sortStrategy.withSortPredicate((j,J)=>this.sortPredicate(j,J,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(f,a,g,_){this._draggingStarted(),null==_&&this.sortingDisabled&&(_=this._draggables.indexOf(f)),this._sortStrategy.enter(f,a,g,_),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:f,container:this,currentIndex:this.getItemIndex(f)})}exit(f){this._reset(),this.exited.next({item:f,container:this})}drop(f,a,g,_,S,j,J,te={}){this._reset(),this.dropped.next({item:f,currentIndex:a,previousIndex:g,container:this,previousContainer:_,isPointerOverContainer:S,distance:j,dropPoint:J,event:te})}withItems(f){const a=this._draggables;return this._draggables=f,f.forEach(g=>g._withDropContainer(this)),this.isDragging()&&(a.filter(_=>_.isDragging()).every(_=>-1===f.indexOf(_))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(f){return this._sortStrategy.direction=f,this}connectedTo(f){return this._siblings=f.slice(),this}withOrientation(f){return this._sortStrategy.orientation=f,this}withScrollableParents(f){const a=fs(this.element);return this._scrollableElements=-1===f.indexOf(a)?[a,...f]:f.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(f){return this._isDragging?this._sortStrategy.getItemIndex(f):this._draggables.indexOf(f)}isReceiving(){return this._activeSiblings.size>0}_sortItem(f,a,g,_){if(this.sortingDisabled||!this._clientRect||!Pm(this._clientRect,.05,a,g))return;const S=this._sortStrategy.sort(f,a,g,_);S&&this.sorted.next({previousIndex:S.previousIndex,currentIndex:S.currentIndex,container:this,item:f})}_startScrollingIfNecessary(f,a){if(this.autoScrollDisabled)return;let g,_=0,S=0;if(this._parentPositions.positions.forEach((j,J)=>{J===this._document||!j.clientRect||g||Pm(j.clientRect,.05,f,a)&&([_,S]=function Zw(d,f,a,g){const _=tb(f,g),S=wf(f,a);let j=0,J=0;if(_){const te=d.scrollTop;1===_?te>0&&(j=1):d.scrollHeight-te>d.clientHeight&&(j=2)}if(S){const te=d.scrollLeft;1===S?te>0&&(J=1):d.scrollWidth-te>d.clientWidth&&(J=2)}return[j,J]}(J,j.clientRect,f,a),(_||S)&&(g=J))}),!_&&!S){const{width:j,height:J}=this._viewportRuler.getViewportSize(),te={width:j,height:J,top:0,right:j,bottom:J,left:0};_=tb(te,a),S=wf(te,f),g=window}g&&(_!==this._verticalScrollDirection||S!==this._horizontalScrollDirection||g!==this._scrollNode)&&(this._verticalScrollDirection=_,this._horizontalScrollDirection=S,this._scrollNode=g,(_||S)&&g?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const f=fs(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=f.msScrollSnapType||f.scrollSnapType||"",f.scrollSnapType=f.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const f=fs(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(f).clientRect}_reset(){this._isDragging=!1;const f=fs(this.element).style;f.scrollSnapType=f.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(a=>a._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(f,a){return null!=this._clientRect&&kc(this._clientRect,f,a)}_getSiblingContainerFromPosition(f,a,g){return this._siblings.find(_=>_._canReceive(f,a,g))}_canReceive(f,a,g){if(!this._clientRect||!kc(this._clientRect,a,g)||!this.enterPredicate(f,this))return!1;const _=this._getShadowRoot().elementFromPoint(a,g);if(!_)return!1;const S=fs(this.element);return _===S||S.contains(_)}_startReceiving(f,a){const g=this._activeSiblings;!g.has(f)&&a.every(_=>this.enterPredicate(_,this)||this._draggables.indexOf(_)>-1)&&(g.add(f),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:f,receiver:this,items:a}))}_stopReceiving(f){this._activeSiblings.delete(f),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:f,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(f=>{if(this.isDragging()){const a=this._parentPositions.handleScroll(f);a&&this._sortStrategy.updateOnScroll(a.top,a.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const f=cr(fs(this.element));this._cachedShadowRoot=f||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const f=this._sortStrategy.getActiveItemsSnapshot().filter(a=>a.isDragging());this._siblings.forEach(a=>a._startReceiving(this,f))}}function tb(d,f){const{top:a,bottom:g,height:_}=d,S=.05*_;return f>=a-S&&f<=a+S?1:f>=g-S&&f<=g+S?2:0}function wf(d,f){const{left:a,right:g,width:_}=d,S=.05*_;return f>=a-S&&f<=a+S?1:f>=g-S&&f<=g+S?2:0}const hd=xo({passive:!1,capture:!0});let nb=(()=>{class d{constructor(a,g){this._ngZone=a,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=_=>_.isDragging(),this.pointerMove=new et.x,this.pointerUp=new et.x,this.scroll=new et.x,this._preventDefaultWhileDragging=_=>{this._activeDragInstances.length>0&&_.preventDefault()},this._persistentTouchmoveListener=_=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&_.preventDefault(),this.pointerMove.next(_))},this._document=g}registerDropContainer(a){this._dropInstances.has(a)||this._dropInstances.add(a)}registerDragItem(a){this._dragInstances.add(a),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,hd)})}removeDropContainer(a){this._dropInstances.delete(a)}removeDragItem(a){this._dragInstances.delete(a),this.stopDragging(a),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,hd)}startDragging(a,g){if(!(this._activeDragInstances.indexOf(a)>-1)&&(this._activeDragInstances.push(a),1===this._activeDragInstances.length)){const _=g.type.startsWith("touch");this._globalListeners.set(_?"touchend":"mouseup",{handler:S=>this.pointerUp.next(S),options:!0}).set("scroll",{handler:S=>this.scroll.next(S),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:hd}),_||this._globalListeners.set("mousemove",{handler:S=>this.pointerMove.next(S),options:hd}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((S,j)=>{this._document.addEventListener(j,S.handler,S.options)})})}}stopDragging(a){const g=this._activeDragInstances.indexOf(a);g>-1&&(this._activeDragInstances.splice(g,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(a){return this._activeDragInstances.indexOf(a)>-1}scrolled(a){const g=[this.scroll];return a&&a!==this._document&&g.push(new qn.y(_=>this._ngZone.runOutsideAngular(()=>{const j=J=>{this._activeDragInstances.length&&_.next(J)};return a.addEventListener("scroll",j,!0),()=>{a.removeEventListener("scroll",j,!0)}}))),(0,$.T)(...g)}ngOnDestroy(){this._dragInstances.forEach(a=>this.removeDragItem(a)),this._dropInstances.forEach(a=>this.removeDropContainer(a)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((a,g)=>{this._document.removeEventListener(g,a.handler,a.options)}),this._globalListeners.clear()}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(l.R0b),l.LFG(k.K0))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();const Ef={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let ib=(()=>{class d{constructor(a,g,_,S){this._document=a,this._ngZone=g,this._viewportRuler=_,this._dragDropRegistry=S}createDrag(a,g=Ef){return new Dl(a,g,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(a){return new Vm(a,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static#e=this.\u0275fac=function(g){return new(g||d)(l.LFG(k.K0),l.LFG(l.R0b),l.LFG(Bw),l.LFG(nb))};static#t=this.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();const Bm=new l.OlP("CDK_DRAG_PARENT"),jm=new l.OlP("CdkDragHandle"),rb=new l.OlP("CdkDragPlaceholder"),sb=new l.OlP("CdkDragPreview"),Hc=new l.OlP("CDK_DRAG_CONFIG"),Tf=new l.OlP("CdkDropList");let If=(()=>{class d{static#e=this._dragInstances=[];get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(a){this._disabled=gi(a),this._dragRef.disabled=this._disabled}constructor(a,g,_,S,j,J,te,Ce,Ge,St,Rt){this.element=a,this.dropContainer=g,this._ngZone=S,this._viewContainerRef=j,this._dir=te,this._changeDetectorRef=Ge,this._selfHandle=St,this._parentDrag=Rt,this._destroyed=new et.x,this.started=new l.vpe,this.released=new l.vpe,this.ended=new l.vpe,this.entered=new l.vpe,this.exited=new l.vpe,this.dropped=new l.vpe,this.moved=new qn.y(un=>{const Xn=this._dragRef.moved.pipe((0,zt.U)(bi=>({source:this,pointerPosition:bi.pointerPosition,event:bi.event,delta:bi.delta,distance:bi.distance}))).subscribe(un);return()=>{Xn.unsubscribe()}}),this._dragRef=Ce.createDrag(a,{dragStartThreshold:J&&null!=J.dragStartThreshold?J.dragStartThreshold:5,pointerDirectionChangeThreshold:J&&null!=J.pointerDirectionChangeThreshold?J.pointerDirectionChangeThreshold:5,zIndex:J?.zIndex}),this._dragRef.data=this,d._dragInstances.push(this),J&&this._assignDefaults(J),g&&(this._dragRef._withDropContainer(g._dropListRef),g.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(a){this._dragRef.setFreeDragPosition(a)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,Qn.q)(1),(0,Xr.R)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(a){const g=a.rootElementSelector,_=a.freeDragPosition;g&&!g.firstChange&&this._updateRootElement(),_&&!_.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const a=d._dragInstances.indexOf(this);a>-1&&d._dragInstances.splice(a,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){const a=this.element.nativeElement;let g=a;this.rootElementSelector&&(g=void 0!==a.closest?a.closest(this.rootElementSelector):a.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(g||a)}_getBoundaryElement(){const a=this.boundaryElement;return a?"string"==typeof a?this.element.nativeElement.closest(a):fs(a):null}_syncInputs(a){a.beforeStarted.subscribe(()=>{if(!a.isDragging()){const g=this._dir,_=this.dragStartDelay,S=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,j=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;a.disabled=this.disabled,a.lockAxis=this.lockAxis,a.dragStartDelay="object"==typeof _&&_?_:function ma(d,f=0){return function Mi(d){return!isNaN(parseFloat(d))&&!isNaN(Number(d))}(d)?Number(d):f}(_),a.constrainPosition=this.constrainPosition,a.previewClass=this.previewClass,a.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(S).withPreviewTemplate(j).withPreviewContainer(this.previewContainer||"global"),g&&a.withDirection(g.value)}}),a.beforeStarted.pipe((0,Qn.q)(1)).subscribe(()=>{if(this._parentDrag)return void a.withParent(this._parentDrag._dragRef);let g=this.element.nativeElement.parentElement;for(;g;){if(g.classList.contains("cdk-drag")){a.withParent(d._dragInstances.find(_=>_.element.nativeElement===g)?._dragRef||null);break}g=g.parentElement}})}_handleEvents(a){a.started.subscribe(g=>{this.started.emit({source:this,event:g.event}),this._changeDetectorRef.markForCheck()}),a.released.subscribe(g=>{this.released.emit({source:this,event:g.event})}),a.ended.subscribe(g=>{this.ended.emit({source:this,distance:g.distance,dropPoint:g.dropPoint,event:g.event}),this._changeDetectorRef.markForCheck()}),a.entered.subscribe(g=>{this.entered.emit({container:g.container.data,item:this,currentIndex:g.currentIndex})}),a.exited.subscribe(g=>{this.exited.emit({container:g.container.data,item:this})}),a.dropped.subscribe(g=>{this.dropped.emit({previousIndex:g.previousIndex,currentIndex:g.currentIndex,previousContainer:g.previousContainer.data,container:g.container.data,isPointerOverContainer:g.isPointerOverContainer,item:this,distance:g.distance,dropPoint:g.dropPoint,event:g.event})})}_assignDefaults(a){const{lockAxis:g,dragStartDelay:_,constrainPosition:S,previewClass:j,boundaryElement:J,draggingDisabled:te,rootElementSelector:Ce,previewContainer:Ge}=a;this.disabled=te??!1,this.dragStartDelay=_||0,g&&(this.lockAxis=g),S&&(this.constrainPosition=S),j&&(this.previewClass=j),J&&(this.boundaryElement=J),Ce&&(this.rootElementSelector=Ce),Ge&&(this.previewContainer=Ge)}_setupHandlesListener(){this._handles.changes.pipe((0,or.O)(this._handles),(0,Mo.b)(a=>{const g=a.filter(_=>_._parentDrag===this).map(_=>_.element);this._selfHandle&&this.rootElementSelector&&g.push(this.element),this._dragRef.withHandles(g)}),(0,Ms.w)(a=>(0,$.T)(...a.map(g=>g._stateChanges.pipe((0,or.O)(g))))),(0,Xr.R)(this._destroyed)).subscribe(a=>{const g=this._dragRef,_=a.element.nativeElement;a.disabled?g.disableHandle(_):g.enableHandle(_)})}static#t=this.\u0275fac=function(g){return new(g||d)(l.Y36(l.SBq),l.Y36(Tf,12),l.Y36(k.K0),l.Y36(l.R0b),l.Y36(l.s_b),l.Y36(Hc,8),l.Y36(gs,8),l.Y36(ib),l.Y36(l.sBO),l.Y36(jm,10),l.Y36(Bm,12))};static#n=this.\u0275dir=l.lG2({type:d,selectors:[["","cdkDrag",""]],contentQueries:function(g,_,S){if(1&g&&(l.Suo(S,sb,5),l.Suo(S,rb,5),l.Suo(S,jm,5)),2&g){let j;l.iGM(j=l.CRH())&&(_._previewTemplate=j.first),l.iGM(j=l.CRH())&&(_._placeholderTemplate=j.first),l.iGM(j=l.CRH())&&(_._handles=j)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(g,_){2&g&&l.ekj("cdk-drag-disabled",_.disabled)("cdk-drag-dragging",_._dragRef.isDragging())},inputs:{data:["cdkDragData","data"],lockAxis:["cdkDragLockAxis","lockAxis"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],boundaryElement:["cdkDragBoundary","boundaryElement"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"],disabled:["cdkDragDisabled","disabled"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],previewContainer:["cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[l._Bn([{provide:Bm,useExisting:d}]),l.TTD]})}return d})();L(1794);const lb=Ei(3,(d,f,a)=>{!function Ti(d,f){return f||(f=window&&window.customElements),!f||!!f.get(d)}(d)||function vi(){return window?.location?.href?.includes("localhost:6006")}()?(a.define(d,f),hn(),window&&!Object.keys(window.CDS._state.elementRegistry).some(g=>g===d)&&(window.CDS._state.elementRegistry={...window.CDS._state.elementRegistry,[d]:{}})):di.warn(d+" has already been registered")});function Um(d,f){Un()&&sr(["customElements"])&&lb(d,f,window.customElements)}var Ci=L(3449);let xf=!1;function Of(d){if((d=Math.trunc(d)||0)<0&&(d+=this.length),!(d<0||d>=this.length))return this[d]}if(!xf){xf=!0;const d=Reflect.getPrototypeOf(Int8Array);for(const f of[Array,String,d])Object.defineProperty(f.prototype,"at",{value:Of,writable:!0,enumerable:!1,configurable:!0})}let $m=!1,Gm=!1;function Ym(d,f,a){Object.defineProperty(d,a,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(f)?this.getAttribute(f):null},set:function(g){null!==g?this.setAttribute(f,g):this.removeAttribute(f)}})}$m||Element.prototype.hasOwnProperty("role")||(Ym(Element.prototype,"role","role"),$m=!0),Gm||Element.prototype.hasOwnProperty("ariaLabel")||(Gm=!0,["ActiveDescendant","Atomic","AutoComplete","Busy","Checked","ColCount","ColIndex","ColSpan","Controls","Current","DescribedBy","Details","Disabled","ErrorMessage","Expanded","FlowTo","HasPopup","Hidden","Invalid","KeyShortcuts","Label","LabelledBy","Level","Live","Modal","MultiLine","MultiSelectable","Orientation","Owns","Placeholder","PosInSet","Pressed","ReadOnly","Relevant","Required","RoleDescription","RowCount","RowIndex","RowSpan","Selected","SetSize","Sort","ValueMax","ValueMin","ValueNow","ValueText"].forEach(d=>Ym(Element.prototype,"aria-"+d.toLowerCase(),"aria"+d)));var Rf=L(1921);const md=window,Pf=md.ShadowRoot&&(void 0===md.ShadyCSS||md.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Fr=Symbol(),vd=new WeakMap;class kf{constructor(f,a,g){if(this._$cssResult$=!0,g!==Fr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=f,this.t=a}get styleSheet(){let f=this.o;const a=this.t;if(Pf&&void 0===f){const g=void 0!==a&&1===a.length;g&&(f=vd.get(a)),void 0===f&&((this.o=f=new CSSStyleSheet).replaceSync(this.cssText),g&&vd.set(a,f))}return f}toString(){return this.cssText}}const br=(d,...f)=>{const a=1===d.length?d[0]:f.reduce((g,_,S)=>g+(j=>{if(!0===j._$cssResult$)return j.cssText;if("number"==typeof j)return j;throw Error("Value passed to 'css' function must be a 'css' function result: "+j+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(_)+d[S+1],d[0]);return new kf(a,d,Fr)},Ff=Pf?d=>d:d=>d instanceof CSSStyleSheet?(f=>{let a="";for(const g of f.cssRules)a+=g.cssText;return(d=>new kf("string"==typeof d?d:d+"",void 0,Fr))(a)})(d):d;var _d;const yd=window,Lf=yd.trustedTypes,cb=Lf?Lf.emptyScript:"",Vf=yd.reactiveElementPolyfillSupport,Bf={toAttribute(d,f){switch(f){case Boolean:d=d?cb:null;break;case Object:case Array:d=null==d?d:JSON.stringify(d)}return d},fromAttribute(d,f){let a=d;switch(f){case Boolean:a=null!==d;break;case Number:a=null===d?null:Number(d);break;case Object:case Array:try{a=JSON.parse(d)}catch{a=null}}return a}},Hf=(d,f)=>f!==d&&(f==f||d==d),jf={attribute:!0,type:String,converter:Bf,reflect:!1,hasChanged:Hf},zf="finalized";class Ca extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(f){var a;this.finalize(),(null!==(a=this.h)&&void 0!==a?a:this.h=[]).push(f)}static get observedAttributes(){this.finalize();const f=[];return this.elementProperties.forEach((a,g)=>{const _=this._$Ep(g,a);void 0!==_&&(this._$Ev.set(_,g),f.push(_))}),f}static createProperty(f,a=jf){if(a.state&&(a.attribute=!1),this.finalize(),this.elementProperties.set(f,a),!a.noAccessor&&!this.prototype.hasOwnProperty(f)){const g="symbol"==typeof f?Symbol():"__"+f,_=this.getPropertyDescriptor(f,g,a);void 0!==_&&Object.defineProperty(this.prototype,f,_)}}static getPropertyDescriptor(f,a,g){return{get(){return this[a]},set(_){const S=this[f];this[a]=_,this.requestUpdate(f,S,g)},configurable:!0,enumerable:!0}}static getPropertyOptions(f){return this.elementProperties.get(f)||jf}static finalize(){if(this.hasOwnProperty(zf))return!1;this[zf]=!0;const f=Object.getPrototypeOf(this);if(f.finalize(),void 0!==f.h&&(this.h=[...f.h]),this.elementProperties=new Map(f.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const a=this.properties,g=[...Object.getOwnPropertyNames(a),...Object.getOwnPropertySymbols(a)];for(const _ of g)this.createProperty(_,a[_])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(f){const a=[];if(Array.isArray(f)){const g=new Set(f.flat(1/0).reverse());for(const _ of g)a.unshift(Ff(_))}else void 0!==f&&a.push(Ff(f));return a}static _$Ep(f,a){const g=a.attribute;return!1===g?void 0:"string"==typeof g?g:"string"==typeof f?f.toLowerCase():void 0}_$Eu(){var f;this._$E_=new Promise(a=>this.enableUpdating=a),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(f=this.constructor.h)||void 0===f||f.forEach(a=>a(this))}addController(f){var a,g;(null!==(a=this._$ES)&&void 0!==a?a:this._$ES=[]).push(f),void 0!==this.renderRoot&&this.isConnected&&(null===(g=f.hostConnected)||void 0===g||g.call(f))}removeController(f){var a;null===(a=this._$ES)||void 0===a||a.splice(this._$ES.indexOf(f)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((f,a)=>{this.hasOwnProperty(a)&&(this._$Ei.set(a,this[a]),delete this[a])})}createRenderRoot(){var f;const a=null!==(f=this.shadowRoot)&&void 0!==f?f:this.attachShadow(this.constructor.shadowRootOptions);return((d,f)=>{Pf?d.adoptedStyleSheets=f.map(a=>a instanceof CSSStyleSheet?a:a.styleSheet):f.forEach(a=>{const g=document.createElement("style"),_=md.litNonce;void 0!==_&&g.setAttribute("nonce",_),g.textContent=a.cssText,d.appendChild(g)})})(a,this.constructor.elementStyles),a}connectedCallback(){var f;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(f=this._$ES)||void 0===f||f.forEach(a=>{var g;return null===(g=a.hostConnected)||void 0===g?void 0:g.call(a)})}enableUpdating(f){}disconnectedCallback(){var f;null===(f=this._$ES)||void 0===f||f.forEach(a=>{var g;return null===(g=a.hostDisconnected)||void 0===g?void 0:g.call(a)})}attributeChangedCallback(f,a,g){this._$AK(f,g)}_$EO(f,a,g=jf){var _;const S=this.constructor._$Ep(f,g);if(void 0!==S&&!0===g.reflect){const j=(void 0!==(null===(_=g.converter)||void 0===_?void 0:_.toAttribute)?g.converter:Bf).toAttribute(a,g.type);this._$El=f,null==j?this.removeAttribute(S):this.setAttribute(S,j),this._$El=null}}_$AK(f,a){var g;const _=this.constructor,S=_._$Ev.get(f);if(void 0!==S&&this._$El!==S){const j=_.getPropertyOptions(S),J="function"==typeof j.converter?{fromAttribute:j.converter}:void 0!==(null===(g=j.converter)||void 0===g?void 0:g.fromAttribute)?j.converter:Bf;this._$El=S,this[S]=J.fromAttribute(a,j.type),this._$El=null}}requestUpdate(f,a,g){let _=!0;void 0!==f&&(((g=g||this.constructor.getPropertyOptions(f)).hasChanged||Hf)(this[f],a)?(this._$AL.has(f)||this._$AL.set(f,a),!0===g.reflect&&this._$El!==f&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(f,g))):_=!1),!this.isUpdatePending&&_&&(this._$E_=this._$Ej())}_$Ej(){var f=this;return(0,Rf.Z)(function*(){f.isUpdatePending=!0;try{yield f._$E_}catch(g){Promise.reject(g)}const a=f.scheduleUpdate();return null!=a&&(yield a),!f.isUpdatePending})()}scheduleUpdate(){return this.performUpdate()}performUpdate(){var f;if(!this.isUpdatePending)return;this._$Ei&&(this._$Ei.forEach((_,S)=>this[S]=_),this._$Ei=void 0);let a=!1;const g=this._$AL;try{a=this.shouldUpdate(g),a?(this.willUpdate(g),null===(f=this._$ES)||void 0===f||f.forEach(_=>{var S;return null===(S=_.hostUpdate)||void 0===S?void 0:S.call(_)}),this.update(g)):this._$Ek()}catch(_){throw a=!1,this._$Ek(),_}a&&this._$AE(g)}willUpdate(f){}_$AE(f){var a;null===(a=this._$ES)||void 0===a||a.forEach(g=>{var _;return null===(_=g.hostUpdated)||void 0===_?void 0:_.call(g)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(f)),this.updated(f)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(f){return!0}update(f){void 0!==this._$EC&&(this._$EC.forEach((a,g)=>this._$EO(g,this[g],a)),this._$EC=void 0),this._$Ek()}updated(f){}firstUpdated(f){}}var zc;Ca[zf]=!0,Ca.elementProperties=new Map,Ca.elementStyles=[],Ca.shadowRootOptions={mode:"open"},Vf?.({ReactiveElement:Ca}),(null!==(_d=yd.reactiveElementVersions)&&void 0!==_d?_d:yd.reactiveElementVersions=[]).push("1.6.3");const Cd=window,ko=Cd.trustedTypes,Wm=ko?ko.createPolicy("lit-html",{createHTML:d=>d}):void 0,bd="$lit$",No=`lit$${(Math.random()+"").slice(9)}$`,Sd="?"+No,Zm=`<${Sd}>`,Qs=document,ba=()=>Qs.createComment(""),El=d=>null===d||"object"!=typeof d&&"function"!=typeof d,Dd=Array.isArray,Uf="[ \t\n\f\r]",$c=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qm=/-->/g,qm=/>/g,Ua=RegExp(`>|${Uf}(?:([^\\s"'>=/]+)(${Uf}*=${Uf}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Km=/'/g,$f=/"/g,Gc=/^(?:script|style|textarea|title)$/i,wd=d=>(f,...a)=>({_$litType$:d,strings:f,values:a}),Yc=wd(1),ub=wd(2),Tl=Symbol.for("lit-noChange"),Gi=Symbol.for("lit-nothing"),Gf=new WeakMap,Ps=Qs.createTreeWalker(Qs,129,null,!1);function Yf(d,f){if(!Array.isArray(d)||!d.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Wm?Wm.createHTML(f):f}class Wc{constructor({strings:f,_$litType$:a},g){let _;this.parts=[];let S=0,j=0;const J=f.length-1,te=this.parts,[Ce,Ge]=((d,f)=>{const a=d.length-1,g=[];let _,S=2===f?"":"",j=$c;for(let J=0;J"===Ge[0]?(j=_??$c,St=-1):void 0===Ge[1]?St=-2:(St=j.lastIndex-Ge[2].length,Ce=Ge[1],j=void 0===Ge[3]?Ua:'"'===Ge[3]?$f:Km):j===$f||j===Km?j=Ua:j===Qm||j===qm?j=$c:(j=Ua,_=void 0);const un=j===Ua&&d[J+1].startsWith("/>")?" ":"";S+=j===$c?te+Zm:St>=0?(g.push(Ce),te.slice(0,St)+bd+te.slice(St)+No+un):te+No+(-2===St?(g.push(void 0),J):un)}return[Yf(d,S+(d[a]||"")+(2===f?"":"")),g]})(f,a);if(this.el=Wc.createElement(Ce,g),Ps.currentNode=this.el.content,2===a){const St=this.el.content,Rt=St.firstChild;Rt.remove(),St.append(...Rt.childNodes)}for(;null!==(_=Ps.nextNode())&&te.length0){_.textContent=ko?ko.emptyScript:"";for(let un=0;unDd(d)||"function"==typeof d?.[Symbol.iterator])(f)?this.T(f):this._(f)}k(f){return this._$AA.parentNode.insertBefore(f,this._$AB)}$(f){this._$AH!==f&&(this._$AR(),this._$AH=this.k(f))}_(f){this._$AH!==Gi&&El(this._$AH)?this._$AA.nextSibling.data=f:this.$(Qs.createTextNode(f)),this._$AH=f}g(f){var a;const{values:g,_$litType$:_}=f,S="number"==typeof _?this._$AC(f):(void 0===_.el&&(_.el=Wc.createElement(Yf(_.h,_.h[0]),this.options)),_);if((null===(a=this._$AH)||void 0===a?void 0:a._$AD)===S)this._$AH.v(g);else{const j=new Zc(S,this),J=j.u(this.options);j.v(g),this.$(J),this._$AH=j}}_$AC(f){let a=Gf.get(f.strings);return void 0===a&&Gf.set(f.strings,a=new Wc(f)),a}T(f){Dd(this._$AH)||(this._$AH=[],this._$AR());const a=this._$AH;let g,_=0;for(const S of f)_===a.length?a.push(g=new Al(this.k(ba()),this.k(ba()),this,this.options)):g=a[_],g._$AI(S),_++;_2||""!==g[0]||""!==g[1]?(this._$AH=Array(g.length-1).fill(new String),this.strings=g):this._$AH=Gi}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(f,a=this,g,_){const S=this.strings;let j=!1;if(void 0===S)f=Il(this,f,a,0),j=!El(f)||f!==this._$AH&&f!==Tl,j&&(this._$AH=f);else{const J=f;let te,Ce;for(f=S[0],te=0;te{var g,_;const S=null!==(g=a?.renderBefore)&&void 0!==g?g:f;let j=S._$litPart$;if(void 0===j){const J=null!==(_=a?.renderBefore)&&void 0!==_?_:null;S._$litPart$=j=new Al(f.insertBefore(ba(),J),J,void 0,a??{})}return j._$AI(d),j};var xl,Ad;class Fo extends Ca{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var f,a;const g=super.createRenderRoot();return null!==(f=(a=this.renderOptions).renderBefore)&&void 0!==f||(a.renderBefore=g.firstChild),g}update(f){const a=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(f),this._$Do=Id(a,this.renderRoot,this.renderOptions)}connectedCallback(){var f;super.connectedCallback(),null===(f=this._$Do)||void 0===f||f.setConnected(!0)}disconnectedCallback(){var f;super.disconnectedCallback(),null===(f=this._$Do)||void 0===f||f.setConnected(!1)}render(){return Tl}}Fo.finalized=!0,Fo._$litElement$=!0,null===(xl=globalThis.litElementHydrateSupport)||void 0===xl||xl.call(globalThis,{LitElement:Fo});const ev=globalThis.litElementPolyfillSupport;ev?.({LitElement:Fo}),(null!==(Ad=globalThis.litElementVersions)&&void 0!==Ad?Ad:globalThis.litElementVersions=[]).push("3.3.3");const tv=br`@charset "UTF-8";:host,:root{--δ2:var(--cds-global-layout-space-xxs, calc(4 * 1rem / var(--cds-global-base, 20)));--δ3:var(--cds-global-layout-space-xs, calc(8 * 1rem / var(--cds-global-base, 20)));--δ4:var(--cds-global-layout-space-sm, calc(12 * 1rem / var(--cds-global-base, 20)));--δ5:var(--cds-global-layout-space-md, calc(16 * 1rem / var(--cds-global-base, 20)));--δ6:var(--cds-global-layout-space-lg, calc(24 * 1rem / var(--cds-global-base, 20)));--δ7:var(--cds-global-layout-space-xl, calc(32 * 1rem / var(--cds-global-base, 20)))}[cds-layout~="wrap:none"]{flex-wrap:nowrap!important}[cds-layout*="align:stretch"]{flex-grow:1!important}[cds-layout*="align:shrink"]{flex-shrink:1!important;flex-grow:0!important}[cds-layout~=horizontal]{display:flex;flex-direction:row;flex-wrap:wrap;justify-items:flex-start;align-items:flex-start;width:100%;margin:0;min-height:0}[cds-layout~=horizontal]>[cds-layout~=horizontal],[cds-layout~=horizontal]>[cds-layout~=vertical],[cds-layout~=horizontal]>[cds-text]{width:initial!important}[cds-layout~=horizontal][cds-layout*="align:top"]{align-items:flex-start}[cds-layout~=horizontal][cds-layout*="align:left"]{justify-content:flex-start}[cds-layout~=horizontal][cds-layout*="align:right"]{justify-content:flex-end}[cds-layout~=horizontal][cds-layout*="align:vertical-center"]{align-items:center;align-content:center}[cds-layout~=horizontal][cds-layout*="align:horizontal-center"]{justify-content:center}[cds-layout~=horizontal][cds-layout*="align:center"]{align-items:center;align-content:center;justify-content:center}[cds-layout~=horizontal][cds-layout*="order:reverse"]{flex-direction:row-reverse}[cds-layout~=horizontal][cds-layout*="align:horizontal-stretch"]{justify-content:stretch;flex-grow:1}[cds-layout~=horizontal][cds-layout*="align:horizontal-stretch"]>*{flex-grow:1}[cds-layout~=horizontal][cds-layout*="align:stretch"]{align-items:stretch;align-content:stretch;flex-grow:1}[cds-layout~=horizontal][cds-layout*="align:stretch"]>*{flex-grow:1}[cds-layout~=horizontal]>[cds-layout*="align:center"],[cds-layout~=horizontal]>[cds-layout*="align:vertical-center"]{align-self:center}[cds-layout~=horizontal]>[cds-layout*="align:center"],[cds-layout~=horizontal]>[cds-layout*="align:horizontal-center"]{margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal]>[cds-layout*="align:top"]{align-self:flex-start}[cds-layout~=horizontal]>[cds-layout*="align:right"]{margin-left:auto!important}[cds-layout~=horizontal]>[cds-layout*="align:left"]{margin-right:auto!important}[cds-layout~=vertical]{width:100%;display:flex;flex-direction:column;align-items:flex-start}[cds-layout~=vertical],[cds-layout~=vertical][cds-layout*="align:top"]{justify-content:flex-start}[cds-layout~=vertical][cds-layout*="align:left"]{align-items:flex-start}[cds-layout~=vertical][cds-layout*="align:right"]{align-items:flex-end}[cds-layout~=vertical][cds-layout*="align:vertical-center"]{justify-content:center}[cds-layout~=vertical][cds-layout*="align:horizontal-center"]{align-items:center}[cds-layout~=vertical][cds-layout*="align:center"]{align-items:center;justify-content:center}[cds-layout~=vertical][cds-layout*="order:reverse"]{flex-direction:column-reverse}[cds-layout~=vertical][cds-layout*="align:horizontal-stretch"]{align-items:stretch}[cds-layout~=vertical][cds-layout*="align:stretch"]{align-items:stretch;justify-content:stretch}[cds-layout~=vertical][cds-layout*="align:stretch"]>*{flex-grow:1}[cds-layout~=vertical]>[cds-layout*="align:center"],[cds-layout~=vertical]>[cds-layout*="align:vertical-center"]{margin-top:auto;margin-bottom:auto}[cds-layout~=vertical]>[cds-layout*="align:center"],[cds-layout~=vertical]>[cds-layout*="align:horizontal-center"]{align-self:center}[cds-layout~=vertical]>[cds-layout*="align:top"]{margin-bottom:auto!important}[cds-layout~=vertical]>[cds-layout*="align:right"]{margin-left:auto}[cds-layout~=vertical]>[cds-layout*="align:left"]{margin-right:auto}[cds-layout~=grid]{display:grid;align-items:start;align-content:start;grid-template-columns:repeat(var(--cds-global-layout-grid-cols,12),1fr);width:100%}[cds-layout~=grid][cds-layout*=rows]{grid-template-rows:repeat(12,auto)}[cds-layout~=grid]>[cds-layout*=row]{align-self:stretch}[cds-layout~=grid][cds-layout*="align:top"]{align-content:start}[cds-layout~=grid][cds-layout*="align:right"]{justify-content:end}[cds-layout~=grid][cds-layout*="align:left"]{justify-content:start}[cds-layout~=grid][cds-layout*="align:horizontal-stretch"]{justify-items:stretch;justify-content:stretch}[cds-layout~=grid][cds-layout*="align:stretch"]{align-items:stretch;align-content:stretch;justify-items:stretch;justify-content:stretch}[cds-layout~=grid][cds-layout*="align:vertical-center"]{align-items:center;align-content:center}[cds-layout~=grid][cds-layout*="align:horizontal-center"]{justify-items:center;justify-content:center}[cds-layout~=grid][cds-layout*="align:center"]{align-items:center;align-content:center;justify-items:center;justify-content:center}::slotted([cds-layout~="display:screen-reader-only"]),[cds-layout~="display:screen-reader-only"]{position:absolute!important;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);padding:0;border:0;height:1px;width:1px;overflow:hidden;white-space:nowrap;top:0;left:0;display:block!important}[cds-layout*="gap:none"]{gap:0}[cds-layout*="gap:xxs"]{gap:var(--δ2)}[cds-layout*="gap:xs"]{gap:var(--δ3)}[cds-layout*="gap:sm"]{gap:var(--δ4)}[cds-layout*="gap:md"]{gap:var(--δ5)}[cds-layout*="gap:lg"]{gap:var(--δ6)}[cds-layout~="p:none"]{padding:0!important}[cds-layout~="p:xxs"]{padding:var(--δ2)!important}[cds-layout~="p:xs"]{padding:var(--δ3)!important}[cds-layout~="p:sm"]{padding:var(--δ4)!important}[cds-layout~="p:md"]{padding:var(--δ5)!important}[cds-layout~="m:md"]{margin:var(--δ5)!important}[cds-layout~="p:lg"]{padding:var(--δ6)!important}[cds-layout~="p-y:xs"]{padding-top:var(--δ3)!important;padding-bottom:var(--δ3)!important}[cds-layout~="p-x:lg"]{padding-left:var(--δ6)!important;padding-right:var(--δ6)!important}[cds-layout~="p-y:lg"]{padding-top:var(--δ6)!important;padding-bottom:var(--δ6)!important}[cds-layout~="p-l:md"]{padding-left:var(--δ5)!important}@media (min-width:992px){[cds-layout*="gap@md:lg"]{gap:var(--δ6)}[cds-layout~="p@md:lg"]{padding:var(--δ6)!important}[cds-layout~="m@md:xl"]{margin:var(--δ7)!important}}[cds-layout~=fill]{width:100%!important}*,:after,:before{box-sizing:border-box}[cds-layout~=horizontal][cds-layout*="align:horizontal-stretch"]>::slotted(*),[cds-layout~=horizontal][cds-layout*="align:stretch"]>::slotted(*),[cds-layout~=vertical][cds-layout*="align:stretch"]>::slotted(*){flex-grow:1}[cds-layout~=vertical] ::slotted([cds-layout*="align:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align:left"]),[cds-layout~=vertical]>[cds-layout*="align:left"]{margin-right:auto}@media (min-width:576px){[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@xs:left"]){margin-right:auto}}@media (min-width:768px){[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@sm:left"]){margin-right:auto}}@media (min-width:992px){[cds-layout~=vertical] ::slotted([cds-layout*="align@md:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@md:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@md:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@md:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align@md:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@md:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@md:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@md:left"]){margin-right:auto}}@media (min-width:1200px){[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@lg:left"]){margin-right:auto}}@media (min-width:1440px){[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:vertical-center"]){margin-top:auto;margin-bottom:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:center"]),[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:horizontal-center"]){align-self:center}[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:top"]){margin-bottom:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:bottom"]){margin-top:auto!important}[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:right"]){margin-left:auto}[cds-layout~=vertical] ::slotted([cds-layout*="align@xl:left"]){margin-right:auto}}[cds-layout~=horizontal] ::slotted([cds-layout*="align:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align:left"]){margin-right:auto!important}@media (min-width:576px){[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xs:left"]){margin-right:auto!important}}@media (min-width:768px){[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@sm:left"]){margin-right:auto!important}}@media (min-width:992px){[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@md:left"]){margin-right:auto!important}}@media (min-width:1200px){[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@lg:left"]){margin-right:auto!important}}@media (min-width:1440px){[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:vertical-center"]){align-self:center}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:center"]),[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:horizontal-center"]){margin-left:auto!important;margin-right:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:top"]){align-self:flex-start}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:bottom"]){align-self:flex-end}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:right"]){margin-left:auto!important}[cds-layout~=horizontal] ::slotted([cds-layout*="align@xl:left"]){margin-right:auto!important}}[cds-text]{font-family:var(--cds-global-typography-font-family, "Clarity City", "Avenir Next", sans-serif);margin-top:0;margin-bottom:0}[cds-text][cds-layout~=grid]::after,[cds-text][cds-layout~=grid]::before,[cds-text][cds-layout~=horizontal]::after,[cds-text][cds-layout~=horizontal]::before,[cds-text][cds-layout~=vertical]::after,[cds-text][cds-layout~=vertical]::before{display:none}[cds-text*=display],[cds-text*=section],[cds-text*=subsection],[cds-text*=title]{font-family:var(--cds-global-typography-header-font-family, "Clarity City", "Avenir Next", sans-serif);color:var(--cds-global-typography-color-400,var(--cds-global-color-construction-900,#21333b))}[cds-text*=body],[cds-text*=message],[cds-text*=secondary]{color:var(--cds-global-typography-color-500,var(--cds-global-color-black,#000))}[cds-text*=inline]{width:auto!important;display:inline-block!important}[cds-text*=display]{font-size:var(--cds-global-typography-display-font-size,calc(40 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-display-font-weight,500);line-height:var(--cds-global-typography-display-line-height,1.1em);letter-spacing:var(--cds-global-typography-display-letter-spacing,-.0125em)}[cds-text*=display]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-display-line-height,1.1em) - 1em)/ 2))*-1) + .037em)}[cds-text*=display]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-display-line-height,1.1em) - 1em)/ 2))*-1) - .044em)}[cds-text*=title]{font-size:var(--cds-global-typography-title-font-size,calc(24 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-title-font-weight,500);line-height:var(--cds-global-typography-title-line-height,1.16667em);letter-spacing:var(--cds-global-typography-title-letter-spacing,-.008333em)}[cds-text*=title]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-title-line-height,1.16667em) - 1em)/ 2))*-1) + .037em)}[cds-text*=title]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-title-line-height,1.16667em) - 1em)/ 2))*-1) - .044em)}[cds-text*=section]{font-size:var(--cds-global-typography-section-font-size,calc(20 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-section-font-weight,500);line-height:var(--cds-global-typography-section-line-height,1.2em);letter-spacing:var(--cds-global-typography-section-letter-spacing,-.01em)}[cds-text*=section]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-section-line-height,1.2em) - 1em)/ 2))*-1) + .037em)}[cds-text*=section]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-section-line-height,1.2em) - 1em)/ 2))*-1) - .044em)}[cds-text*=subsection]{font-size:var(--cds-global-typography-subsection-font-size,calc(16 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-subsection-font-weight,500);line-height:var(--cds-global-typography-subsection-line-height,1.25em);letter-spacing:var(--cds-global-typography-subsection-letter-spacing,-.0125em)}[cds-text*=subsection]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-subsection-line-height,1.25em) - 1em)/ 2))*-1) + .037em)}[cds-text*=subsection]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-subsection-line-height,1.25em) - 1em)/ 2))*-1) - .044em)}[cds-text*=body]{font-weight:var(--cds-global-typography-body-font-weight,400);font-size:var(--cds-global-typography-body-font-size,calc(14 * 1rem / var(--cds-global-base,20)));letter-spacing:var(--cds-global-typography-body-letter-spacing,-.014286em);line-height:var(--cds-global-typography-body-line-height,1.42857em)}[cds-text*=body]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-body-line-height,1.42857em) - 1em)/ 2))*-1) + .1em)}[cds-text*=body]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-body-line-height,1.42857em) - 1em)/ 2))*-1) - .044em)}body[cds-text*=body]::after,body[cds-text*=body]::before{content:none}[cds-text*=message]{font-size:var(--cds-global-typography-message-font-size,calc(16 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-message-font-weight,calc(400 * 1rem / var(--cds-global-base,20)));line-height:var(--cds-global-typography-message-line-height,1.25em);letter-spacing:var(--cds-global-typography-message-letter-spacing,-.0125em)}[cds-text*=message]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-message-line-height,1.25em) - 1em)/ 2))*-1) + .037em)}[cds-text*=message]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-message-line-height,1.25em) - 1em)/ 2))*-1) - .044em)}[cds-text*=secondary]{font-size:var(--cds-global-typography-secondary-font-size,calc(13 * 1rem / var(--cds-global-base,20)));font-weight:var(--cds-global-typography-secondary-font-weight,400);line-height:var(--cds-global-typography-secondary-line-height,1.23077em);letter-spacing:var(--cds-global-typography-secondary-letter-spacing,-.007692em)}[cds-text*=secondary]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((var(--cds-global-typography-secondary-line-height,1.23077em) - 1em)/ 2))*-1) + .037em)}[cds-text*=secondary]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((var(--cds-global-typography-secondary-line-height,1.23077em) - 1em)/ 2))*-1) - .044em)}[cds-text~=link]{color:var(--cds-global-typography-link-color,var(--cds-global-color-blue-700,#0079ad))!important;text-decoration:underline!important;line-height:inherit!important;font-size:inherit!important}[cds-text~=link]:focus{outline:var(--cds-alias-object-interaction-outline,Highlight solid 2px);outline-offset:var(--cds-alias-object-interaction-outline-offset,1px)}[cds-text~=link]:hover{color:var(--cds-global-typography-link-color-hover,var(--cds-global-color-blue-800,#00608a))!important}[cds-text~=link]:visited:not([cds-text~=static]){color:var(--cds-global-typography-link-color-visited,var(--cds-global-color-lavender-600,#3b40ce))!important}[cds-text~=link]:visited:not([cds-text~=static]):hover{color:var(--cds-global-typography-link-color-visited-hover,var(--cds-global-color-lavender-700,#2429c2))!important}@media (-webkit-min-device-pixel-ratio:0){[cds-text=link]:focus{outline:var(--cds-alias-object-interaction-outline-webkit,5px auto -webkit-focus-ring-color)}}[cds-text~=code]{color:var(--cds-alias-status-danger,var(--cds-global-color-red-700,#e02200));font-family:monospace;font-size:1.1em}[cds-divider]{display:block;height:var(--cds-alias-object-border-width-100,calc(1 * 1rem / var(--cds-global-base,20)));overflow:hidden;box-shadow:var(--cds-alias-object-border-color,var(--cds-global-color-construction-200,#cbd4d8)) 0 0 0 var(--cds-alias-object-border-width-100,calc(1 * 1rem / var(--cds-global-base,20))) inset}[cds-text~=light]{font-weight:var(--cds-global-typography-font-weight-light,300)!important}[cds-text~=justify]{text-align:justify!important}[cds-text~=left]{text-align:left!important}[cds-text~=right]{text-align:right!important}[cds-text~=center]{text-align:center!important}[cds-text~=lhe]{padding:.05px 0}[cds-text~=lhe]::before{content:"";margin-top:-.124em;display:block;height:0}[cds-text~=lhe]::after{content:"";margin-bottom:-.221em;display:block;height:0}[cds-text*=h2],[cds-text*=h3]{font-family:var(--cds-global-typography-header-font-family, "Clarity City", "Avenir Next", sans-serif);font-size:1.4rem;font-weight:200;color:var(--cds-global-typography-color-400);line-height:1.7143em;letter-spacing:-.017857em}[cds-text*=h2]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((1.7143em - 1em)/ 2))*-1) + .037em)}[cds-text*=h2]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((1.7143em - 1em)/ 2))*-1) - .044em)}[cds-text*=h3]{font-size:1.1rem;line-height:1.0909em;letter-spacing:-.013636em}[cds-text*=h3]::before{content:"";display:block;height:0;width:0;margin-bottom:calc(((var(--cds-global-typography-top-gap-height,.1475em) + calc((1.0909em - 1em)/ 2))*-1) + .037em)}[cds-text*=h3]::after{content:"";display:block;height:0;width:0;margin-top:calc((((1em - var(--cds-global-typography-top-gap-height,.1475em) - var(--cds-global-typography-ascender-height,.1703em) - var(--cds-global-typography-x-height,.517em)) + calc((1.0909em - 1em)/ 2))*-1) - .044em)}:host{all:initial;display:block;visibility:inherit;font-family:var(--cds-global-typography-font-family, "Clarity City", "Avenir Next", sans-serif);contain:layout;box-sizing:border-box!important;-webkit-appearance:none!important}*,:after,:before{box-sizing:inherit!important}slot{font-family:var(--cds-global-typography-font-family, "Clarity City", "Avenir Next", sans-serif);display:contents!important}::slotted(*){font-family:inherit;box-sizing:inherit}::slotted(*)::placeholder{color:var(--cds-global-typography-color-200,var(--cds-global-color-construction-600,#4f6169))}:host([_is-anchor]),:host([role=button]){cursor:pointer!important}:host([_is-anchor]) ::slotted(*),:host([role=button]) ::slotted(*){cursor:pointer!important}:host([role=button][disabled]){cursor:not-allowed!important}:host([role=button][disabled]) ::slotted(*){cursor:not-allowed!important;pointer-events:none}:host([hidden]),[hidden]{display:none!important}:host([hidden*=false]){display:block!important}:host([role=dialog][hidden]),:host([role=dialog][hidden]) ::slotted(*){display:block!important;visibility:hidden!important}:host([role=dialog][hidden*=false]),:host([role=dialog][hidden*=false]) ::slotted(*){visibility:visible!important}:host([_focused]) .input,:host([_focused]) [focusable],:host([tabindex="0"]:focus),:host([tabindex="0"]:focus) [focusable],[tabindex="0"][focusable]:focus{outline:Highlight solid 2px;outline:5px auto -webkit-focus-ring-color;outline-offset:var(--cds-alias-object-interaction-outline-offset,1px)}`;function Xf(d){return`calc((${d} / var(--cds-global-base)) * 1rem)`}const pb=(d,f)=>"method"===f.kind&&f.descriptor&&!("value"in f.descriptor)?{...f,finisher(a){a.createProperty(f.key,d)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:f.key,initializer(){"function"==typeof f.initializer&&(this[f.key]=f.initializer.call(this))},finisher(a){a.createProperty(f.key,d)}},Rl=(d,f,a)=>{f.constructor.createProperty(a,d)};function qc(d){return(f,a)=>void 0!==a?Rl(d,f,a):pb(d,f)}function tp(d,f){switch(f&&f.type){case Array:case Object:return{reflect:!1,...f};case String:return{reflect:!0,attribute:Pi(d),converter:{toAttribute:a=>a||null},...f};case Number:return{reflect:!0,attribute:Pi(d),...f};case Boolean:return{reflect:!0,attribute:Pi(d),converter:{toAttribute:a=>a?"":null,fromAttribute:a=>function ov(d){return null!=d&&""+d!="false"}(a)},...f};case Date:return{reflect:!1,converter:{fromAttribute:a=>new Date(a)},...f};default:return{...f}}}function Yi(d){return(f,a)=>(d?.required&&function av(d,f,a){const g=d.firstUpdated;d.firstUpdated=function(_){if(a&&a.required&&We(this[f])){const S=a.requiredMessage||function(j="warning",J,te){const Ce=te.toLocaleLowerCase();return`${pe(j)}: ${J} is required to use ${Ce} component. Set the JS Property or HTML Attribute.\n\n`+(qi()?`Angular: <${Ce} [${J}]="...">\n`:"")+($n()?`Vue: <${Ce} :${J}="...">\n`:"")+(ni()?`React: <${function ws(d){return pe(function Hi(d){return d.split("-").map((f,a)=>a?f.charAt(0).toUpperCase()+f.slice(1).toLowerCase():f).join("")}(d))}(Ce)} ${Ge=J,Ge.startsWith("aria")?Pi(Ge):Ge}={...} />\n`:"")+`HTML: <${Ce} ${Pi(J)}="...">\nJavaScript: document.querySelector('${Ce}').${J} = '...';\n\n`;var Ge}(a.required,f,this.tagName);if("error"===a.required)throw Error(S);di.warn(S,this)}g&&g.call(this,_)}}(f,a,d),qc(tp(a,d))(f,a))}function Db(d){return(f,a)=>{const g=tp(a,d);return g&&(g.reflect=!!d?.reflect&&d.reflect,g.reflect&&!d?.attribute&&(g.attribute="_"+Pi(a))),qc(g)(f,a)}}var Lo,d,aE=br`@keyframes fadeInAndOut{0%,to{opacity:0}75%{opacity:1}}:host{--color:currentColor;display:inline-block;height:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));margin:0;vertical-align:middle;fill:var(--color);color:var(--color);contain:strict;cursor:inherit}svg{display:block}:host([size*=xs]){height:var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20)))}:host([size*=sm]){height:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-7,calc(16 * 1rem / var(--cds-global-base,20)))}:host([size*=md]){height:var(--cds-global-space-9,calc(24 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-9,calc(24 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-9,calc(24 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-9,calc(24 * 1rem / var(--cds-global-base,20)))}:host([size*=lg]){height:var(--cds-global-space-11,calc(36 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-11,calc(36 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-11,calc(36 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-11,calc(36 * 1rem / var(--cds-global-base,20)))}:host([size*=xl]){height:var(--cds-global-space-12,calc(48 * 1rem / var(--cds-global-base,20)));width:var(--cds-global-space-12,calc(48 * 1rem / var(--cds-global-base,20)));min-height:var(--cds-global-space-12,calc(48 * 1rem / var(--cds-global-base,20)));min-width:var(--cds-global-space-12,calc(48 * 1rem / var(--cds-global-base,20)))}:host([size*=xxl]){height:calc(var(--cds-global-space-13,calc(64 * 1rem / var(--cds-global-base,20))) - var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20))));width:calc(var(--cds-global-space-13,calc(64 * 1rem / var(--cds-global-base,20))) - var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20))));min-height:calc(var(--cds-global-space-13,calc(64 * 1rem / var(--cds-global-base,20))) - var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20))));min-width:calc(var(--cds-global-space-13,calc(64 * 1rem / var(--cds-global-base,20))) - var(--cds-global-space-5,calc(8 * 1rem / var(--cds-global-base,20))))}:host([size*=fit]){height:auto;width:auto;contain:layout}:host([status=success]){--color:var(--cds-alias-status-success, var(--cds-global-color-green-700, #42810e))}:host([status=danger]){--color:var(--cds-alias-status-danger, var(--cds-global-color-red-700, #e02200))}:host([status=warning]){--color:var(--cds-alias-status-warning-dark, var(--cds-global-color-ochre-800, #a36500))}:host([status=info]){--color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}:host([status=neutral]){--color:var(--cds-alias-status-neutral, var(--cds-global-color-construction-600, #4f6169))}:host([inverse]){--color:var(--cds-global-color-construction-200, #cbd4d8)}:host([direction=up]){transform:rotate(0)}:host([direction=down]){transform:rotate(180deg)}:host([direction=right]){transform:rotate(90deg)}:host([direction=left]){transform:rotate(270deg)}:host([flip=horizontal]){transform:scale(-1) rotateX(180deg)}:host([flip=vertical]){transform:scale(-1) rotateY(180deg)}.alert,.badge{fill:var(--badge-color,var(--cds-alias-status-danger,var(--cds-global-color-red-700,#e02200)))}:host([badge=success]){--badge-color:var(--cds-alias-status-success, var(--cds-global-color-green-700, #42810e))}:host([badge=danger]){--badge-color:var(--cds-alias-status-danger, var(--cds-global-color-red-700, #e02200))}:host([badge*=warning]){--badge-color:var(--cds-alias-status-warning-dark, var(--cds-global-color-ochre-800, #a36500))}:host([badge=inherit]){--badge-color:currentColor}:host([badge=info]){--badge-color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}:host([badge=neutral]){--badge-color:var(--cds-alias-status-neutral, var(--cds-global-color-construction-600, #4f6169))}:host([badge=inherit-triangle]){--badge-color:currentColor}:host([badge][inverse]){--badge-color:var(--cds-alias-status-danger, var(--cds-global-color-red-700, #e02200))}:host([badge=success][inverse]){--badge-color:var(--cds-alias-status-success, var(--cds-global-color-green-700, #42810e))}:host([badge*=warning][inverse]){--badge-color:var(--cds-alias-status-warning-dark, var(--cds-global-color-ochre-800, #a36500))}:host([badge*=inherit][inverse]){--badge-color:currentColor}:host([badge=info][inverse]){--badge-color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}.cds-internal-dot-1{animation:fadeInAndOut 1.8s ease-in 0s infinite}.cds-internal-dot-2{animation:fadeInAndOut 1.8s ease-out .422s infinite}.cds-internal-dot-3{animation:fadeInAndOut 1.8s ease-out .675s infinite}@media (prefers-reduced-motion){.cds-internal-dot-1,.cds-internal-dot-2,.cds-internal-dot-3{animation:none}}`;function xd(d,f){let a="";switch(function wb(d){switch(!0){case We(d):return Lo.NilSizeValue;case function ip(d){return["xxs","xs","sm","md","lg","xl","xxl"].indexOf(d)>-1}(d):return Lo.ValidSizeString;case function _t(d){return Ke(d)&&!Fe(d.trim())&&+d==+d}(d):return Lo.ValidNumericString;default:return Lo.BadSizeValue}}(function Eb(d){return We(d)?"":function oe(d,f,a=""){const g=d.split(" "),_=""===a?g.filter(S=>S!==f):g.map(S=>S===f?a:S);return _.length>0?_.join(" "):""}(d,"fit")}(f))){case Lo.ValidNumericString:return a=Xf(parseInt(f)),void function Jf(d,...f){f.forEach(([a,g])=>{d.style[a]=g})}(d,...function cv(d,f){return!Ne(d)&&d.indexOf("fit")>-1?[["width","auto"],["height","auto"],["min-width",f],["min-height",f]]:[["width",f],["height",f],["min-width",f],["min-height",f]]}(f,a));case Lo.ValidSizeString:case Lo.NilSizeValue:return void function Ol(d,...f){f.forEach(a=>{d.style[a]=""})}(d,"width","height","min-width","min-height");default:return}}function rp(d){return d.badge&&("inherit-triangle"===d.badge||"warning-triangle"===d.badge)}(d=Lo||(Lo={})).BadSizeValue="bad-value",d.ValidSizeString="value-is-string",d.ValidNumericString="value-is-numeric",d.NilSizeValue="value-is-nil";class Lr extends Fo{constructor(){super(...arguments),this._shape="unknown",this.solid=!1,this.inverse=!1}static get styles(){return[tv,aE]}get shape(){return this._shape}set shape(f){if(function li(d,f){return!We(d)&&kt(d,f)}(f,this._shape)){const a=this._shape;this._shape=f,this.requestUpdate("shape",a)}}get size(){return this._size}set size(f){if(function mn(d,f){return function ot(d){return be(String,d)||Ne(d)}(d)&&kt(d,f)}(f,this._size)){const a=this._size;this._size=f,xd(this,f),this.requestUpdate("size",a)}}updated(f){if(f.has("innerOffset")&&this.innerOffset>0){const a=Xf(-1*this.innerOffset),g=`calc(100% + ${Xf(2*this.innerOffset)})`;this.svg.style.width=g,this.svg.style.height=g,this.svg.style.margin=`${a} 0 0 ${a}`}}firstUpdated(f){if(super.firstUpdated(f),this.isConnected){let a="unknown";this.subscription=hi.stateUpdates.subscribe(g=>{"iconRegistry"===g.key&&Jt.registry[this.shape]&&a!==this.shape&&(a=this.shape,this.requestUpdate("shape"))})}}disconnectedCallback(){super.disconnectedCallback(),this.subscription?.unsubscribe()}render(){return Ke(Jt.registry[this.shape])?Yc``:ub``}}(0,Ci.gn)([Yi({type:String})],Lr.prototype,"shape",null),(0,Ci.gn)([Yi({type:String})],Lr.prototype,"size",null),(0,Ci.gn)([Yi({type:String})],Lr.prototype,"direction",void 0),(0,Ci.gn)([Yi({type:String})],Lr.prototype,"flip",void 0),(0,Ci.gn)([Yi({type:Boolean})],Lr.prototype,"solid",void 0),(0,Ci.gn)([Yi({type:String})],Lr.prototype,"status",void 0),(0,Ci.gn)([Yi({type:Boolean})],Lr.prototype,"inverse",void 0),(0,Ci.gn)([Yi({type:String})],Lr.prototype,"badge",void 0),(0,Ci.gn)([Db({type:Number})],Lr.prototype,"innerOffset",void 0),(0,Ci.gn)([function oE(d,f){return(({finisher:d,descriptor:f})=>(a,g)=>{var _;if(void 0===g){const S=null!==(_=a.originalKey)&&void 0!==_?_:a.key,j=null!=f?{kind:"method",placement:"prototype",key:S,descriptor:f(a.key)}:{...a,key:S};return null!=d&&(j.finisher=function(J){d(J,S)}),j}{const S=a.constructor;void 0!==f&&Object.defineProperty(a,g,f(g)),d?.(S,g)}})({descriptor:a=>{const g={get(){var _,S;return null!==(S=null===(_=this.renderRoot)||void 0===_?void 0:_.querySelector(d))&&void 0!==S?S:null},enumerable:!0,configurable:!0};if(f){const _="symbol"==typeof a?Symbol():"__"+a;g.get=function(){var S,j;return void 0===this[_]&&(this[_]=null!==(j=null===(S=this.renderRoot)||void 0===S?void 0:S.querySelector(d))&&void 0!==j?j:null),this[_]}}return g}})}("svg")],Lr.prototype,"svg",void 0),Um("cds-icon",Lr);class Ib{constructor(f){this.host=f,this.host.addController(this)}hostConnected(){var f=this;return(0,Rf.Z)(function*(){yield f.host.updateComplete,f.host.addEventListener("keydown",a=>f.emulateActive(a)),f.host.addEventListener("mousedown",a=>f.emulateActive(a)),f.host.addEventListener("keyup",()=>f.emulateInactive()),f.host.addEventListener("blur",()=>f.emulateInactive()),f.host.addEventListener("mouseup",()=>f.emulateInactive())})()}emulateActive(f){this.host.disabled||this.host?.setAttribute("cds-active",""),"Space"===f.code&&f.target===this.host&&f.preventDefault()}emulateInactive(){this.host.removeAttribute("cds-active")}}class dv{constructor(f){this.host=f,this.host.addController(this)}hostConnected(){(this.host.hasAttribute("aria-controls")||this.host.ariaControls)&&(this.host.ariaHasPopup="true",this.host.ariaExpanded="false")}}class Mb{constructor(f){this.host=f,this.host.addController(this)}hostUpdated(){null!==this.host.disabled&&(this.host.ariaDisabled=this.host.disabled),this.host.readonly&&(this.host.ariaDisabled=null)}}class Ob{constructor(f){this.host=f,this.host.addController(this)}hostUpdated(){null!=this.host.pressed&&(this.host.ariaPressed=this.host.pressed?"true":"false"),this.host.readonly&&(this.host.ariaPressed=null)}}class cE{constructor(f){this.host=f,this.host.addController(this)}hostConnected(){this.host.tabIndex=0}hostUpdated(){this.host.role=this.host.readonly?null:"button",this.host.tabIndex=this.host.disabled?-1:0,this.host.readonly&&this.host.removeAttribute("tabindex")}}class Kc{constructor(f){this.host=f,this.host.addController(this)}get currentAnchor(){return"A"===this.host.parentElement?.tagName?this.host.parentElement:null}hostConnected(){this.setAnchor()}hostUpdated(){this.setAnchor()}setAnchor(){this.currentAnchor&&this.currentAnchor!==this.previousAnchor&&(this.previousAnchor=this.currentAnchor,this.host.readonly=!0,this.currentAnchor.style.lineHeight="0",this.currentAnchor.style.textDecoration="none")}}const Ga=d=>d??Gi;function ap(d){d.preventDefault(),d.stopPropagation()}const Od=new Map([["arrow-left","ArrowLeft"],["arrow-right","ArrowRight"],["arrow-up","ArrowUp"],["arrow-down","ArrowDown"],["tab","Tab"],["enter","Enter"],["escape","Escape"],["space"," "],["home","Home"],["end","End"]]);class Rd{static get keycodes(){return nr(Od)}static add(f,a){Od.set(f,a)}static has(f){return Od.has(f)}static getCode(f,a=this.keycodes){return function dE(d,f){return f.get(d)||""}(f,a)}}function Jc(d,f){return Rd.getCode(f)===d.key}var ks;!function(d){d.ArrowUp="ArrowUp",d.ArrowDown="ArrowDown",d.ArrowLeft="ArrowLeft",d.ArrowRight="ArrowRight",d.End="End",d.Home="Home",d.PageUp="PageUp",d.PageDown="PageDown"}(ks||(ks={}));class _v{constructor(f){this.host=f,this.triggerNativeButtonBehaviorHandler=this.triggerNativeButtonBehavior.bind(this),this.emulateKeyBoardEventBehaviorHandler=this.emulateKeyBoardEventBehavior.bind(this),this.host.addController(this)}hostUpdated(){this.setButtonType(),this.setupNativeButtonBehavior()}setButtonType(){!this.host.type&&this.host.closest("form")&&(this.host.type="submit")}setupNativeButtonBehavior(){this.host.readonly||this.host.disabled?(this.host.removeEventListener("click",this.triggerNativeButtonBehaviorHandler),this.host.removeEventListener("keyup",this.emulateKeyBoardEventBehaviorHandler)):(this.host.addEventListener("click",this.triggerNativeButtonBehaviorHandler),this.host.addEventListener("keyup",this.emulateKeyBoardEventBehaviorHandler))}emulateKeyBoardEventBehavior(f){!function lp(d,f,a){d.filter(g=>Jc(f,g)).length>0&&a()}(["enter","space"],f,()=>{"submit"===this.host.type?this.triggerNativeButtonBehavior(f):this.host.click(),ap(f)})}triggerNativeButtonBehavior(f){if(this.host.disabled)ap(f);else if(!f.defaultPrevented){const a=function Lb(d,f,a){const g=document.createElement("div");f.appendChild(g),Id(d,f,{renderBefore:g,...a});const _=g.previousSibling;return g.remove(),_}(Yc``,this.host);a?.dispatchEvent(new MouseEvent("click",{relatedTarget:this.host,composed:!0})),a?.remove()}}}class Bb{constructor(f){this.host=f,this.host.addController(this)}hostUpdated(){null!=this.host.expanded&&(this.host.ariaExpanded=this.host.expanded?"true":"false"),this.host.readonly&&(this.host.ariaExpanded=null)}}let _o=class extends Fo{constructor(){super(...arguments),this._disabled=!1}get disabled(){return this._disabled}set disabled(d){const f=this._disabled;this._disabled=d,this.requestUpdate("disabled",f)}};(0,Ci.gn)([Yi({type:Boolean})],_o.prototype,"pressed",void 0),(0,Ci.gn)([Yi({type:Boolean})],_o.prototype,"expanded",void 0),(0,Ci.gn)([Yi({type:Boolean})],_o.prototype,"readonly",void 0),(0,Ci.gn)([Yi({type:String})],_o.prototype,"type",void 0),(0,Ci.gn)([Yi({type:String})],_o.prototype,"name",void 0),(0,Ci.gn)([Yi({type:String})],_o.prototype,"value",void 0),(0,Ci.gn)([Yi({type:Boolean})],_o.prototype,"disabled",null),(0,Ci.gn)([Yi({type:String})],_o.prototype,"popup",void 0),_o=(0,Ci.gn)([function uv(){return d=>d.addInitializer(f=>new Ib(f))}(),function hv(){return d=>d.addInitializer(f=>new cE(f))}(),function xb(){return d=>d.addInitializer(f=>new Ob(f))}(),function kl(){return d=>d.addInitializer(f=>new Bb(f))}(),function Ab(){return d=>d.addInitializer(f=>new Mb(f))}(),function op(){return d=>d.addInitializer(f=>new dv(f))}(),function Vb(){return d=>d.addInitializer(f=>new _v(f))}(),function uE(){return d=>d.addInitializer(f=>new Kc(f))}()],_o);const kd={actions:{sort:"Sort",expand:"Expand",close:"Close",resize:"Resize",filter:"Filter"},alert:{closeButtonAriaLabel:"Close",loading:"Loading",info:"Info",success:"Success",warning:"Warning",danger:"Error"},dropdown:{open:"Open"},file:{browse:"browse",files:"files",removeFile:"remove file"},modal:{closeButtonAriaLabel:"Close modal",contentStart:"Beginning of modal content",contentBox:"Scrollable modal body",contentEnd:"End of modal content"},navigation:{navigationElement:"navigation",navigationLabel:"navigation menu",navigationAbridgedText:"View abridged menu",navigationUnabridgedText:"View unabridged menu"},overlay:{closeButtonAriaLabel:"Close dialog",contentStart:"Beginning of dialog content",contentEnd:"End of dialog content"},popup:{closeButtonAriaLabel:"Close popup",contentStart:"Beginning of popup content",contentEnd:"End of popup content"},password:{showButtonAriaLabel:"Show password",hideButtonAriaLabel:"Hide password"},progress:{loading:"Loading",looping:"Loading"},treeview:{loading:"Loading"},grid:{resizeColumn:"Resize Column",closeDetails:"Close Details",noData:"No Results Found",rowDetailStart:"Start of row details",rowDetailEnd:"End of row details",footerEnd:"End of grid rows",action:"Action",dropTarget:"Drop Item",pagination:{label:"grid pagination",firstPage:"go to first page",previousPage:"go to previous page",nextPage:"go to next page",lastPage:"go to last page",pageSize:"rows per page",page:"page"}}};class Xo{static get keys(){return 0===Object.keys(hi.state.i18nRegistry).length&&(hi.state.i18nRegistry=bt(kd,hi.state.i18nRegistry)),bt(kd,hi.state.i18nRegistry)}static findKey(f){const a=Xo.keys;return Object.keys(a).find(g=>Vi(a[g],f))}static get(f){return f&&Xo.keys[f]||{}}static reset(){hi.state.i18nRegistry=bt({},kd)}static hydrate(f,a){return JSON.parse(function Kt(d,f,a){return d.replace(/\$\{.+?\}/g,g=>function xi(d,f,a=`\${${d}}`){return d.split(".").reduce((g,_)=>{try{const S=g[_];switch(!0){case null===S:case!1===S:case""===S:case 0===S:return S;default:return S||a}}catch{return a}},f)}(g.substr(2,g.length-3).trim(),f,a))}(JSON.stringify(f),a))}static localize(f){hi.state.i18nRegistry=bt(kd,hi.state.i18nRegistry,f)}}var up=br`:host{--icon-width:var(--cds-global-space-7, calc(16 * 1rem / var(--cds-global-base, 20)));--icon-height:var(--cds-global-space-7, calc(16 * 1rem / var(--cds-global-base, 20)));--width:var(--icon-width);--height:var(--icon-width);--cursor:pointer;--color:var(--cds-global-typography-color-300, var(--cds-global-color-construction-800, #2d4048));--font-size:var(--cds-global-typography-font-size-3, calc(13 * 1rem / var(--cds-global-base, 20)));--background:transparent;--padding:0;--outline:var(--cds-alias-object-interaction-outline, Highlight solid 2px);--outline-offset:calc(var(--cds-alias-object-interaction-outline-offset, 1px) * -1);pointer-events:none;display:inline-block;outline:0!important}:host([role=button]){pointer-events:initial;cursor:var(--cursor)!important}:host([status=active]){--color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}::slotted([shape=close]),::slotted([shape=info-circle]),::slotted([shape=times]),:host([shape=close]),:host([shape=info-circle]){--icon-width:var(--cds-global-space-8, calc(18 * 1rem / var(--cds-global-base, 20)));--icon-height:var(--cds-global-space-8, calc(18 * 1rem / var(--cds-global-base, 20)))}:host(:hover){--color:var(--cds-alias-object-interaction-color-hover, var(--cds-global-color-construction-1000, #1b2b32))}:host(:active){--color:var(--cds-alias-object-interaction-color-active, var(--cds-global-color-construction-1000, #1b2b32))}:host(:active) .private-host{transform:translateY(calc(var(--cds-global-space-1,calc(1 * 1rem / var(--cds-global-base,20)))/ 2))}:host([disabled]){--color:var(--cds-alias-object-interaction-color-disabled, var(--cds-global-color-construction-300, #aeb8bc))}.private-host{--icon-color:var(--color);background:var(--background);padding:var(--padding);color:var(--color);font-size:var(--font-size);display:flex;justify-content:center;align-items:center;min-width:var(--width);min-height:var(--height)}::slotted(cds-icon),cds-icon{width:var(--icon-width);height:var(--icon-height);pointer-events:none}::slotted(cds-icon:not([status])),cds-icon{--color:var(--icon-color)}:host([disabled]:active){pointer-events:none!important}.private-host::after{content:"";position:absolute;left:calc(-1*var(--width) - 1);top:calc(-1*var(--height) - 1);width:var(--cds-alias-object-interaction-touch-target,calc(36 * 1rem / var(--cds-global-base,20)));height:var(--cds-alias-object-interaction-touch-target,calc(36 * 1rem / var(--cds-global-base,20)))}:host([disabled]) .private-host::after{outline:0!important}:host(:focus) .private-host::after{outline:var(--outline);outline-offset:var(--outline-offset)}@media (-webkit-min-device-pixel-ratio:0){:host(:focus) .private-host::after{outline-color:-webkit-focus-ring-color}}`;class Nl extends _o{constructor(){super(...arguments),this.i18n=Xo.keys.actions,this.cdsButtonAction=!0}render(){return Yc`
`}updated(f){super.updated(f),this.ariaLabel||this.readonly||di.warn("A aria-label is required for interactive cds-button-action type",this),f.has("readonly")&&(this.ariaHidden=this.readonly&&!this.hasAttribute("aria-label")?"true":null)}}Nl.styles=[tv,up],(0,Ci.gn)([Yi({type:String})],Nl.prototype,"shape",void 0),(0,Ci.gn)([Yi({type:String,reflect:!0})],Nl.prototype,"action",void 0),(0,Ci.gn)([Yi({type:String})],Nl.prototype,"iconSize",void 0),(0,Ci.gn)([function yv(){return(d,f)=>{const a=d.connectedCallback,g=d.disconnectedCallback;d.connectedCallback=function(){d.__i18nSub=hi.stateUpdates.subscribe(S=>{"i18nRegistry"===S.key&&this.requestUpdate(f)}),a&&a.apply(this)},d.disconnectedCallback=function(){d.__i18nSub.unsubscribe(),g&&g.apply(this)};const _={get(){const S=bt(Xo.keys[this.__i18nKey],this.__i18n||{});return Xo.hydrate(S,this)},set(S){const j=function Hb(d,f){if(We(d)){let a={};if(f.hasAttribute("cds-i18n")){const g=f.getAttribute("cds-i18n")+"";if(We(g))a={};else try{a=JSON.parse(g)}catch{di.warn("Clarity i18n: Invalid JSON passed to cds-i18n"),a={}}}return a}return d}(S,this),J=function Cv(d,f,a,g){return We(d)?Vi(a,g)?{update:!1}:{update:!0,values:a}:d===f?{update:!1,values:{}}:{update:!0,key:d,values:{}}}(Xo.findKey(j)||"",this.__i18nKey,j,this.__i18n);void 0!==J.key&&(this.__i18nKey=J.key+""),void 0!==J.values&&(this.__i18n={...J.values}),!0===J.update&&this.requestUpdate(),this.requestUpdate(f)},enumerable:!0,configurable:!0};return void 0!==f?function(S,j,J){const te=Object.defineProperty(j,J,S);return Yi({type:Object,attribute:"cds-i18n"})(te,J)}(_,d,f):function(S,j){const J={kind:"method",placement:"prototype",key:j.key,descriptor:S};return Yi({type:Object})(J)}(_,d)}}()],Nl.prototype,"i18n",void 0),(0,Ci.gn)([Db({type:Boolean,reflect:!0,attribute:"cds-button-action"})],Nl.prototype,"cdsButtonAction",void 0);class bv extends Nl{constructor(){super(...arguments),this.shape="close"}connectedCallback(){super.connectedCallback(),this.ariaLabel=this.ariaLabel?this.ariaLabel:this.i18n.close}}(0,Ci.gn)([Yi({type:String})],bv.prototype,"shape",void 0),Um("cds-internal-close-button",bv),Jt.addIcons(fi),Jt.addAliases(["times",["close"]]);const jt=["*"];function Tv(d,f){1&d&&l._UZ(0,"label")}const bE=[[["","clrCheckbox",""],["","clrToggle",""]],[["label"]]],Kb=["[clrCheckbox],[clrToggle]","label"];function nu(d,f){1&d&&l._UZ(0,"label")}function Jb(d,f){1&d&&l.Hsn(0,2,["*ngIf","showHelper"])}function Vl(d,f){1&d&&l._UZ(0,"cds-icon",5)}function iu(d,f){1&d&&l._UZ(0,"cds-icon",6)}function Xb(d,f){1&d&&l.Hsn(0,3,["*ngIf","showInvalid"])}function Iv(d,f){1&d&&l.Hsn(0,4,["*ngIf","showValid"])}const e0=[[["label"]],[["clr-checkbox-wrapper"],["clr-toggle-wrapper"]],[["clr-control-helper"]],[["clr-control-error"]],[["clr-control-success"]]],t0=["label","clr-checkbox-wrapper,clr-toggle-wrapper","clr-control-helper","clr-control-error","clr-control-success"];function Da(d,f){1&d&&l._UZ(0,"label")}function _p(d,f){1&d&&l._UZ(0,"cds-icon",5)}function l0(d,f){1&d&&l._UZ(0,"cds-icon",6)}function AE(d,f){1&d&&l.Hsn(0,2,["*ngIf","showHelper"])}function c0(d,f){1&d&&l.Hsn(0,3,["*ngIf","showInvalid"])}function yp(d,f){1&d&&l.Hsn(0,4,["*ngIf","showValid"])}const Vo=[[["label"]],[["","clrInput",""]],[["clr-control-helper"]],[["clr-control-error"]],[["clr-control-success"]]],kv=["label","[clrInput]","clr-control-helper","clr-control-error","clr-control-success"];function VE(d,f){1&d&&l._UZ(0,"label")}const BE=[[["","clrRadio",""]],[["label"]]],Yv=["[clrRadio]","label"];function rn(d,f){1&d&&l._UZ(0,"label")}function Wv(d,f){if(1&d&&l._UZ(0,"span",6),2&d){const a=l.oxw();l.Udp("width",a.getRangeProgressFillWidth())}}function Zv(d,f){1&d&&l._UZ(0,"cds-icon",7)}function jl(d,f){1&d&&l._UZ(0,"cds-icon",8)}function Qv(d,f){1&d&&l.Hsn(0,2,["*ngIf","showHelper"])}function S0(d,f){1&d&&l.Hsn(0,3,["*ngIf","showInvalid"])}function zd(d,f){1&d&&l.Hsn(0,4,["*ngIf","showValid"])}const zl=[[["label"]],[["","clrRange",""]],[["clr-control-helper"]],[["clr-control-error"]],[["clr-control-success"]]],Sp=["label","[clrRange]","clr-control-helper","clr-control-error","clr-control-success"];function su(d,f){1&d&&l._UZ(0,"label")}function qv(d,f){1&d&&l._UZ(0,"cds-icon",5)}function Dp(d,f){1&d&&l._UZ(0,"cds-icon",6)}function wp(d,f){1&d&&l.Hsn(0,2,["*ngIf","showHelper"])}function Ep(d,f){1&d&&l.Hsn(0,3,["*ngIf","showInvalid"])}function Kv(d,f){1&d&&l.Hsn(0,4,["*ngIf","showValid"])}const Tp=[[["label"]],[["","clrSelect",""]],[["clr-control-helper"]],[["clr-control-error"]],[["clr-control-success"]]],D0=["label","[clrSelect]","clr-control-helper","clr-control-error","clr-control-success"],Jv=["anchor"];function T0(d,f){if(1&d&&(l.TgZ(0,"div",4)(1,"div",5)(2,"button",6),l._UZ(3,"cds-icon",7),l.qZA()(),l.Hsn(4),l.qZA()),2&d){const a=l.oxw();l.Q6J("id",a.popoverId),l.uIk("aria-label",a.commonStrings.keys.datagridFilterDialogAriaLabel),l.xp6(3),l.uIk("title",a.commonStrings.keys.close)}}const I0=["input_low"],Ns=["input"],A0=["columnPortal"];function M0(d,f){1&d&&l.Hsn(0)}const WE=["resizeTracker"],Ip=["columnHandle"];function Xv(d,f){1&d&&l.GkF(0)}function x0(d,f){if(1&d&&l._UZ(0,"cds-icon",10),2&d){const a=l.oxw(2);l.uIk("direction",a.sortDirection)}}function O0(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",7),l.NdJ("click",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.sort())}),l.YNc(1,Xv,1,0,"ng-container",8),l.YNc(2,x0,1,1,"cds-icon",9),l.qZA()}if(2&d){const a=l.oxw(),g=l.MAs(6);l.xp6(1),l.Q6J("ngTemplateOutlet",g),l.xp6(1),l.Q6J("ngIf",a.sortDirection)}}function R0(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"clr-dg-string-filter",11),l.NdJ("clrFilterValueChange",function(_){l.CHM(a);const S=l.oxw();return l.KtG(S.filterValue=_)}),l.qZA()}if(2&d){const a=l.oxw();l.Q6J("clrFilterPlaceholder",a.filterStringPlaceholder)("clrDgStringFilter",a.registered)("clrFilterValue",a.filterValue)}}function e_(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"clr-dg-numeric-filter",12),l.NdJ("clrFilterValueChange",function(_){l.CHM(a);const S=l.oxw();return l.KtG(S.filterValue=_)}),l.qZA()}if(2&d){const a=l.oxw();l.Q6J("clrFilterMaxPlaceholder",a.filterNumberMaxPlaceholder)("clrFilterMinPlaceholder",a.filterNumberMinPlaceholder)("clrDgNumericFilter",a.registered)("clrFilterValue",a.filterValue)}}function P0(d,f){1&d&&l.Hsn(0,1)}function k0(d,f){1&d&&l.GkF(0)}function Ap(d,f){if(1&d&&(l.TgZ(0,"span",13),l.YNc(1,k0,1,0,"ng-container",8),l.qZA()),2&d){l.oxw();const a=l.MAs(6);l.xp6(1),l.Q6J("ngTemplateOutlet",a)}}function N0(d,f){1&d&&l._UZ(0,"clr-dg-column-separator")}const F0=[[["clr-dg-filter"],["clr-dg-string-filter"],["clr-dg-numeric-filter"]],"*"],L0=["clr-dg-filter, clr-dg-string-filter, clr-dg-numeric-filter","*"];function V0(d,f){1&d&&l._UZ(0,"div",4)}function B0(d,f){1&d&&l.Hsn(0,0,["*ngIf","emptyDatagrid"])}function Bo(d,f){if(1&d&&(l.ynx(0),l.TgZ(1,"button",1),l._UZ(2,"cds-icon",2),l.qZA(),l.BQk()),2&d){const a=l.oxw();l.xp6(2),l.uIk("title",a.commonStrings.keys.info)}}const Mp=["cellPortal"];function H0(d,f){1&d&&l.Hsn(0)}const t_=["rowPortal"];function j0(d,f){1&d&&l.Hsn(0)}const n_=["detailButton"],i_=["stickyCells"],Ud=["scrollableCells"],xp=["calculatedCells"];function ZE(d,f){}function r_(d,f){if(1&d&&(l.TgZ(0,"clr-expandable-animation",7),l.YNc(1,ZE,0,0,"ng-template",8),l.qZA()),2&d){const a=l.oxw(2),g=l.MAs(6);l.Q6J("clrExpandTrigger",a.expandAnimationTrigger),l.xp6(1),l.Q6J("ngTemplateOutlet",g)}}function s_(d,f){}function o_(d,f){if(1&d&&l.YNc(0,s_,0,0,"ng-template",8),2&d){l.oxw(2);const a=l.MAs(6);l.Q6J("ngTemplateOutlet",a)}}function a_(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",6),l.NdJ("mousedown",function(_){l.CHM(a);const S=l.oxw();return l.KtG(S.clearRanges(_))})("click",function(_){l.CHM(a);const S=l.oxw();return l.KtG(S.selectRow(!S.selected,_))}),l.YNc(1,r_,2,2,"clr-expandable-animation",1),l.YNc(2,o_,1,1,null,2),l.qZA()}if(2&d){const a=l.oxw();l.xp6(1),l.Q6J("ngIf",a.expand.expandable),l.xp6(1),l.Q6J("ngIf",!a.expand.expandable)}}function Op(d,f){}function ta(d,f){if(1&d&&(l.TgZ(0,"clr-expandable-animation",7),l.YNc(1,Op,0,0,"ng-template",8),l.qZA()),2&d){const a=l.oxw(),g=l.MAs(6);l.Q6J("clrExpandTrigger",a.expandAnimationTrigger),l.xp6(1),l.Q6J("ngTemplateOutlet",g)}}function z0(d,f){}function U0(d,f){if(1&d&&l.YNc(0,z0,0,0,"ng-template",8),2&d){l.oxw();const a=l.MAs(6);l.Q6J("ngTemplateOutlet",a)}}function Rp(d,f){1&d&&l.Hsn(0)}const l_=function(d){return{"clr-form-control-disabled":d}};function c_(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",19)(1,"clr-checkbox-wrapper")(2,"input",20),l.NdJ("ngModelChange",function(_){l.CHM(a);const S=l.oxw(2);return l.KtG(S.toggle(_))}),l.qZA(),l.TgZ(3,"label",21),l.NdJ("click",function(_){l.CHM(a);const S=l.oxw(2);return l.KtG(S.clearRanges(_))}),l.TgZ(4,"span",22),l._uU(5),l.qZA()()()()}if(2&d){const a=l.oxw(2);l.Q6J("ngClass",l.VKq(7,l_,!a.clrDgSelectable)),l.xp6(2),l.Q6J("ngModel",a.selected)("id",a.checkboxId)("disabled",!a.clrDgSelectable||null),l.uIk("aria-disabled",!a.clrDgSelectable||null),l.xp6(1),l.Q6J("for",a.checkboxId),l.xp6(2),l.Oqu(a.clrDgRowAriaLabel||a.commonStrings.keys.select)}}function $0(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",19)(1,"clr-radio-wrapper")(2,"input",23),l.NdJ("ngModelChange",function(_){l.CHM(a);const S=l.oxw(2);return l.KtG(S.selection.currentSingle=_)}),l.qZA(),l.TgZ(3,"label",24)(4,"span",22),l._uU(5),l.qZA()()()()}if(2&d){const a=l.oxw(2);l.Q6J("ngClass",l.VKq(10,l_,!a.clrDgSelectable)),l.xp6(2),l.Q6J("id",a.radioId)("name",a.selection.id+"-radio")("value",a.item)("ngModel",a.selection.currentSingle)("checked",a.selection.currentSingle===a.item)("disabled",!a.clrDgSelectable||null),l.uIk("aria-disabled",!a.clrDgSelectable||null),l.xp6(1),l.Q6J("for",a.radioId),l.xp6(2),l.Oqu(a.clrDgRowAriaLabel||a.commonStrings.keys.select)}}function $d(d,f){1&d&&(l.TgZ(0,"div",25),l.Hsn(1,2),l.qZA())}function ou(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",29),l.NdJ("click",function(){l.CHM(a);const _=l.oxw(4);return l.KtG(_.toggleExpand())}),l._UZ(1,"cds-icon",30),l.qZA()}if(2&d){const a=l.oxw(4);l.uIk("aria-expanded",a.expand.expanded)("aria-label",a.expand.expanded?a.clrDgDetailCloseLabel:a.clrDgDetailOpenLabel)("aria-controls",a.expandableId),l.xp6(1),l.uIk("direction",a.expand.expanded?"down":"right")("title",a.expand.expanded?a.commonStrings.keys.collapse:a.commonStrings.keys.expand)}}function u_(d,f){if(1&d&&(l.TgZ(0,"clr-spinner",31),l._uU(1),l.qZA()),2&d){const a=l.oxw(4);l.xp6(1),l.Oqu(a.commonStrings.keys.loading)}}function Gd(d,f){if(1&d&&(l.ynx(0),l.YNc(1,ou,2,5,"button",27),l.YNc(2,u_,2,1,"clr-spinner",28),l.BQk()),2&d){const a=l.oxw(3);l.xp6(1),l.Q6J("ngIf",!a.expand.loading),l.xp6(1),l.Q6J("ngIf",a.expand.loading)}}function QE(d,f){if(1&d&&(l.TgZ(0,"div",26),l.YNc(1,Gd,3,2,"ng-container",2),l.qZA()),2&d){const a=l.oxw(2);l.xp6(1),l.Q6J("ngIf",a.expand.expandable)}}function G0(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",32)(1,"button",33,34),l.NdJ("click",function(){l.CHM(a);const _=l.MAs(2),S=l.oxw(2);return l.KtG(S.detailService.toggle(S.item,_))}),l._UZ(3,"cds-icon",35),l.qZA()()}if(2&d){const a=l.oxw(2);l.xp6(1),l.ekj("is-open",a.detailService.isRowOpen(a.item)),l.uIk("aria-label",a.detailService.isRowOpen(a.item)?a.clrDgDetailCloseLabel:a.clrDgDetailOpenLabel)("aria-expanded",a.detailService.isOpen)("aria-controls",a.detailService.id),l.xp6(2),l.uIk("direction",a.detailService.isRowOpen(a.item)?"left":"right")("title",a.detailService.isRowOpen(a.item)?a.commonStrings.keys.close:a.commonStrings.keys.open)}}function d_(d,f){}function h_(d,f){if(1&d&&l.YNc(0,d_,0,0,"ng-template",8),2&d){l.oxw(2);const a=l.MAs(4);l.Q6J("ngTemplateOutlet",a)}}function Y0(d,f){}function W0(d,f){if(1&d&&l.YNc(0,Y0,0,0,"ng-template",8),2&d){l.oxw(2);const a=l.MAs(4);l.Q6J("ngTemplateOutlet",a)}}const f_=function(d){return{"is-replaced":d}};function p_(d,f){if(1&d&&(l.TgZ(0,"div",9)(1,"div",10),l.ynx(2,null,11),l.YNc(4,c_,6,9,"div",12),l.YNc(5,$0,6,12,"div",12),l.YNc(6,$d,2,0,"div",13),l.YNc(7,QE,2,1,"div",14),l.YNc(8,G0,4,7,"div",15),l.BQk(),l.qZA(),l.TgZ(9,"div",16)(10,"div",17),l.Hsn(11,1),l.GkF(12,null,18),l.qZA(),l.YNc(14,h_,1,1,null,2),l.YNc(15,W0,1,1,null,2),l.qZA()()),2&d){const a=l.oxw();l.ekj("datagrid-row-detail-open",a.detailService.isRowOpen(a.item)),l.Q6J("id",a.id),l.xp6(4),l.Q6J("ngIf",a.selection.selectionType===a.SELECTION_TYPE.Multi),l.xp6(1),l.Q6J("ngIf",a.selection.selectionType===a.SELECTION_TYPE.Single),l.xp6(1),l.Q6J("ngIf",a.rowActionService.hasActionableRow),l.xp6(1),l.Q6J("ngIf",a.globalExpandable.hasExpandableRow),l.xp6(1),l.Q6J("ngIf",a.detailService.enabled),l.xp6(1),l.Q6J("ngClass",l.VKq(11,f_,a.replaced&&a.expanded)),l.xp6(5),l.Q6J("ngIf",a.replaced&&!a.expand.loading),l.xp6(1),l.Q6J("ngIf",!a.replaced&&!a.expand.loading)}}const au=[[["clr-dg-row-detail"]],[["clr-dg-cell"]],[["clr-dg-action-overflow"]]],Z0=["clr-dg-row-detail","clr-dg-cell","clr-dg-action-overflow"],g_=["datagridTable"],m_=["scrollableColumns"],Q0=["projectedDisplayColumns"],q0=["projectedCalculationColumns"],lu=["displayedRows"],K0=["calculationRows"];function J0(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",24),l.NdJ("keydown.space",function(_){l.CHM(a);const S=l.oxw();return S.allSelected=!S.allSelected,l.KtG(_.preventDefault())}),l.TgZ(1,"div",25)(2,"input",26),l.NdJ("ngModelChange",function(_){l.CHM(a);const S=l.oxw();return l.KtG(S.allSelected=_)}),l.qZA(),l.TgZ(3,"label",27)(4,"span",28),l._uU(5),l.qZA()()(),l._UZ(6,"div",29),l.qZA()}if(2&d){const a=l.oxw();l.xp6(2),l.Q6J("id",a.selectAllId)("ngModel",a.allSelected),l.uIk("aria-label",a.commonStrings.keys.selectAll),l.xp6(1),l.Q6J("for",a.selectAllId),l.xp6(2),l.Oqu(a.commonStrings.keys.selectAll)}}function X0(d,f){if(1&d&&(l.TgZ(0,"div",30),l._UZ(1,"div",29),l.qZA()),2&d){const a=l.oxw();l.uIk("aria-label",a.clrDgSingleSelectionAriaLabel)}}function eS(d,f){if(1&d&&(l.TgZ(0,"div",31),l._UZ(1,"div",29),l.qZA()),2&d){const a=l.oxw();l.uIk("aria-label",a.clrDgSingleActionableAriaLabel)}}function tS(d,f){if(1&d&&(l.TgZ(0,"div",32),l._UZ(1,"div",29),l.qZA()),2&d){const a=l.oxw();l.uIk("aria-label",a.clrDetailExpandableAriaLabel)}}function nS(d,f){1&d&&l._UZ(0,"clr-dg-placeholder")}function iS(d,f){1&d&&(l.TgZ(0,"div",33)(1,"clr-spinner",34),l._uU(2,"Loading"),l.qZA()())}const rS=[[["clr-dg-action-bar"]],[["clr-dg-placeholder"]],[["clr-dg-footer"]],[["","clrIfDetail",""],["clr-dg-detail"]]],v_=["clr-dg-action-bar","clr-dg-placeholder","clr-dg-footer","[clrIfDetail],clr-dg-detail"],sS=["allSelected"];function Yd(d,f){}function oS(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"li")(1,"clr-checkbox-wrapper")(2,"input",13),l.NdJ("ngModelChange",function(_){const j=l.CHM(a).$implicit,J=l.oxw(2);return l.KtG(J.toggleColumnState(j,!_))}),l.qZA(),l.TgZ(3,"label"),l.YNc(4,Yd,0,0,"ng-template",14),l.qZA()()()}if(2&d){const a=f.$implicit,g=l.oxw(2);l.xp6(2),l.Q6J("disabled",g.hasOnlyOneVisibleColumn&&!a.hidden)("ngModel",!a.hidden),l.xp6(2),l.Q6J("ngTemplateOutlet",a.titleTemplateRef)}}function aS(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"div",2)(1,"div",3)(2,"div",4,5),l._uU(4),l.qZA(),l.TgZ(5,"h2"),l._uU(6),l.qZA(),l.TgZ(7,"button",6),l._UZ(8,"cds-icon",7),l.TgZ(9,"span",8),l._uU(10),l.qZA()()(),l.TgZ(11,"ul",9),l.YNc(12,oS,5,3,"li",10),l.qZA(),l.TgZ(13,"div",11)(14,"clr-dg-column-toggle-button",12),l.NdJ("clrAllSelected",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.allColumnsSelected())}),l.qZA()()()}if(2&d){const a=l.oxw();l.Q6J("id",a.popoverId),l.uIk("aria-label",a.commonStrings.keys.showColumnsMenuDescription),l.xp6(4),l.Oqu(a.commonStrings.keys.allColumnsSelected),l.xp6(2),l.Oqu(a.commonStrings.keys.showColumns),l.xp6(1),l.uIk("aria-label",a.commonStrings.keys.close),l.xp6(1),l.uIk("title",a.commonStrings.keys.close),l.xp6(2),l.Oqu(a.commonStrings.keys.close),l.xp6(2),l.Q6J("ngForOf",a.hideableColumnStates)("ngForTrackBy",a.trackByFn)}}function cS(d,f){if(1&d&&(l.ynx(0),l.TgZ(1,"div",1)(2,"clr-checkbox-wrapper",2),l._UZ(3,"input",3),l.TgZ(4,"label"),l._uU(5),l.qZA(),l.TgZ(6,"span",4),l._uU(7),l.qZA()()(),l.BQk()),2&d){const a=l.oxw();l.xp6(5),l.Oqu(a.selection.current.length),l.xp6(2),l.Oqu(a.commonStrings.keys.selectedRows)}}function uS(d,f){1&d&&l._UZ(0,"clr-dg-column-toggle")}function dS(d,f){if(1&d&&(l.ynx(0),l.YNc(1,uS,1,0,"clr-dg-column-toggle",0),l.TgZ(2,"div",5),l.Hsn(3,1),l.qZA(),l.BQk()),2&d){const a=l.oxw();l.xp6(1),l.Q6J("ngIf",a.hasHideableColumns)}}const __=[[["clr-dg-pagination"]],"*"],y_=["clr-dg-pagination","*"];function XE(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",3),l.NdJ("click",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.openNav(_.responsiveNavCodes.NAV_LEVEL_1))}),l._UZ(1,"span"),l.qZA()}if(2&d){const a=l.oxw();l.uIk("aria-label",a.responsiveNavCommonString)}}function vS(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",4),l.NdJ("click",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.openNav(_.responsiveNavCodes.NAV_LEVEL_2))}),l._UZ(1,"span"),l.qZA()}if(2&d){const a=l.oxw();l.uIk("aria-label",a.responsiveOverflowCommonString)}}function Qd(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",3),l.NdJ("click",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.toggleByButton())}),l._UZ(1,"cds-icon",4),l.qZA()}if(2&d){const a=l.oxw();l.ekj("on-collapse",a.collapsed),l.uIk("aria-expanded",a.ariaExpanded)("aria-label",a.commonStrings.keys.verticalNavToggle),l.xp6(1),l.uIk("direction",a.collapsed?"right":"left")}}function R_(d,f){if(1&d){const a=l.EpF();l.TgZ(0,"button",5),l.NdJ("click",function(){l.CHM(a);const _=l.oxw();return l.KtG(_.collapsed=!1)}),l.qZA()}if(2&d){const a=l.oxw();l.uIk("aria-label",a.commonStrings.keys.verticalNavToggle)}}const du=[[["","clrVerticalNavLink",""]],[["","clrVerticalNavIcon",""]],"*",[["","clrIfExpanded",""],["clr-vertical-nav-group-children"]]],P_=["[clrVerticalNavLink]","[clrVerticalNavIcon]","*","[clrIfExpanded], clr-vertical-nav-group-children"],DS=["clrVerticalNavLink",""],hu=[[["","clrVerticalNavIcon",""]],"*"],wS=["[clrVerticalNavIcon]","*"];let $p=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275dir=l.lG2({type:d,selectors:[["clr-icon"]]}),d})(),Pn=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275dir=l.lG2({type:d,selectors:[["cds-icon"]]}),d})(),kn=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();class wa{}var Sr=function(d){return d[d.DEFAULT=0]="DEFAULT",d[d.LOADING=1]="LOADING",d[d.SUCCESS=2]="SUCCESS",d[d.ERROR=3]="ERROR",d}(Sr||{});let Br=(()=>{class d{constructor(){this.expandable=0,this._loading=!1,this._expanded=!1,this._expandChange=new et.x}get loading(){return this._loading}set loading(a){(a=!!a)!==this._loading&&(this._loading=a)}get expanded(){return this._expanded}set expanded(a){(a=!!a)!==this._expanded&&(this._expanded=a,this._expandChange.next(a))}get expandChange(){return this._expandChange.asObservable()}toggle(){this.expanded=!this._expanded}loadingStateChange(a){this.loading=a===Sr.LOADING}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),LS=0;function dr(){return"clr-id-"+LS++}const Ks="0.2s ease-in-out",Qp=((0,P.X$)("skipInitialRender",[(0,P.eR)(":enter",[])]),(0,P.X$)("toggle",[(0,P.eR)("void => *",[(0,P.oB)({display:"block",height:0}),(0,P.jt)(Ks,(0,P.oB)({height:"*"}))])]),(0,P.X$)("skipInitialRender",[(0,P.eR)(":enter",[])]),(0,P.X$)("toggle",[(0,P.eR)("void => *",[(0,P.oB)({display:"block",height:0}),(0,P.jt)(Ks,(0,P.oB)({height:"*"}))]),(0,P.eR)("* => void",[(0,P.oB)({display:"block"}),(0,P.jt)(Ks,(0,P.oB)({height:0,display:"none"}))])]),{open:"Open",close:"Close",show:"Show",hide:"Hide",expand:"Expand",collapse:"Collapse",more:"More",select:"Select",selectAll:"Select All",previous:"Previous",next:"Next",current:"Jump to current",info:"Info",success:"Success",warning:"Warning",danger:"Error",rowActions:"Available actions",pickColumns:"Manage Columns",showColumns:"Show Columns",sortColumn:"Sort Column",firstPage:"First Page",lastPage:"Last Page",nextPage:"Next Page",previousPage:"Previous Page",currentPage:"Current Page",totalPages:"Total Pages",filterItems:"Filter items",minValue:"Min value",maxValue:"Max value",modalContentStart:"Beginning of Modal Content",modalContentEnd:"End of Modal Content",showColumnsMenuDescription:"Show or hide columns menu",allColumnsSelected:"All columns selected",signpostToggle:"Signpost Toggle",signpostClose:"Signpost Close",loading:"Loading",detailPaneStart:"Start of row details",detailPaneEnd:"End of row details",singleSelectionAriaLabel:"Single selection header",singleActionableAriaLabel:"Single actionable header",detailExpandableAriaLabel:"Toggle more row content",datagridFilterAriaLabel:"Toggle {COLUMN} filter",datagridFilterDialogAriaLabel:"Filter dialog",columnSeparatorAriaLabel:"Column resize handle",columnSeparatorDescription:"Use left or right key to resize the column",alertCloseButtonAriaLabel:"Close alert",alertNextAlertAriaLabel:"Next alert message, {CURRENT} of {COUNT}",alertPreviousAlertAriaLabel:"Previous alert message, {CURRENT} of {COUNT}",datepickerDialogLabel:"Choose date",datepickerToggleChooseDateLabel:"Choose date",datepickerToggleChangeDateLabel:"Change date, {SELECTED_DATE}",datepickerPreviousMonth:"Previous month",datepickerCurrentMonth:"Current month",datepickerNextMonth:"Next month",datepickerPreviousDecade:"Previous decade",datepickerNextDecade:"Next decade",datepickerCurrentDecade:"Current decade",datepickerSelectMonthText:"Select month, the current month is {CALENDAR_MONTH}",datepickerSelectYearText:"Select year, the current year is {CALENDAR_YEAR}",datepickerSelectedLabel:"{FULL_DATE} - Selected",stackViewChanged:"Value changed.",responsiveNavToggleOpen:"Open navigation menu",responsiveNavToggleClose:"Close navigation menu",responsiveNavOverflowOpen:"Open navigation overflow menu",responsiveNavOverflowClose:"Close navigation overflow menu",verticalNavToggle:"Toggle vertical navigation",timelineStepNotStarted:"Not started",timelineStepCurrent:"Current",timelineStepSuccess:"Completed",timelineStepError:"Error",timelineStepProcessing:"In progress",comboboxDelete:"Delete selected option",comboboxSearching:'Searching for matches for "{INPUT}"',comboboxSelection:"Selection",comboboxSelected:"Selected",comboboxNoResults:"No results",comboboxOpen:"Show options",datagridExpandableBeginningOf:"Beginning of",datagridExpandableEndOf:"End of",datagridExpandableRowContent:"Expandable row content",datagridExpandableRowsHelperText:"Screen reader table commands may not work for viewing expanded content, please use your screen reader's browse mode to read the content exposed by this button",wizardStepSuccess:"Completed",wizardStepError:"Error",wizardStepnavAriaLabel:"Step navigation",passwordHide:"Hide password",passwordShow:"Show password",selectedRows:"Selected rows"});let pn=(()=>{class d{constructor(){this._strings=Qp}get keys(){return this._strings}localize(a){this._strings={...this._strings,...a}}parse(a,g={}){const _=Object.keys(g);let S=a;return _.length&&_.forEach(j=>{S=S.replace(`{${j}}`,g[j])}),S}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"}),d})(),Za=(()=>{class d{constructor(){this.disableChocolateCheck=!1,this._chocolate=new et.x}get chocolate(){return this._chocolate.asObservable()}ngAfterViewChecked(){this.disableChocolateCheck||this._chocolate.next()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275dir=l.lG2({type:d}),d})(),Qa=(()=>{class d{constructor(a,g){this.subscription=g.chocolate.subscribe(()=>{this.latestFlavor!==this.flavor&&(g.disableChocolateCheck=!0,a.detectChanges(),g.disableChocolateCheck=!1)})}ngAfterContentChecked(){this.latestFlavor=this.flavor}ngOnDestroy(){this.subscription.unsubscribe()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.sBO),l.Y36(Za))},d.\u0275dir=l.lG2({type:d}),d})(),Jp=(()=>{class d{constructor(){Jt.addIcons(Yr,ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn]}),d})(),s1=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,Jp,Jp]}),d})();var At=function(d){return d.ArrowLeft="ArrowLeft",d.ArrowUp="ArrowUp",d.ArrowRight="ArrowRight",d.ArrowDown="ArrowDown",d.Backspace="Backspace",d.Tab="Tab",d.Enter="Enter",d.Escape="Escape",d.Space="Space",d.Spacebar=" ",d.Home="Home",d.End="End",d}(At||{}),Ka=function(d){return d.ArrowUp="Up",d.ArrowDown="Down",d.ArrowRight="Right",d.ArrowLeft="Left",d.Space="Spacebar",d.Escape="Esc",d}(Ka||{});function Fs(d){return d===At.ArrowUp||d===Ka.ArrowUp?At.ArrowUp:d===At.ArrowDown||d===Ka.ArrowDown?At.ArrowDown:d===At.ArrowRight||d===Ka.ArrowRight?At.ArrowRight:d===At.ArrowLeft||d===Ka.ArrowLeft?At.ArrowLeft:d===At.Space||d===Ka.Space?At.Space:d===At.Escape||d===Ka.Escape?At.Escape:d}let mi=(()=>{class d{constructor(){this._open=!1,this._openChange=new et.x,this._openEventChange=new et.x,this._popoverAligned=new et.x,this._popoverVisible=new et.x}get openChange(){return this._openChange.asObservable()}get popoverVisible(){return this._popoverVisible.asObservable()}get openEvent(){return this._openEvent}set openEvent(a){this._openEvent=a,this._openEventChange.next(a)}get open(){return this._open}set open(a){this._open!==(a=!!a)&&(this._open=a,this._openChange.next(a))}get originalEvent(){return this._openEvent}get popoverAligned(){return this._popoverAligned.asObservable()}getEventChange(){return this._openEventChange.asObservable()}toggleWithEvent(a){(function rg(d){const f=Fs(d.key);(f===At.ArrowUp||f===At.ArrowDown||f===At.ArrowLeft||f===At.ArrowRight)&&d.preventDefault()})(a),this.openEvent=a,this.open=!this.open}popoverVisibleEmit(a){this._popoverVisible.next(a)}popoverAlignedEmit(a){this._popoverAligned.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),fu=(()=>{class d{constructor(a,g,_){this.renderer=a,this.smartOpenService=g,this.document=_,this.outsideClickClose=!0,this.scrollToClose=!0,this.subscriptions=[],this.subscriptions.push(g.openChange.subscribe(S=>{S?(this.addEscapeListener(),this.addClickListener(),this.addScrollListener()):this.removeAllEventListeners()}),g.getEventChange().subscribe(S=>{this.ignoredEvent=S}))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe()),this.removeAllEventListeners()}addScrollListener(){this.scrollToClose&&(this.documentScroller=(0,ki.R)(this.document,"scroll",{capture:!0}),this.scrollSubscription=this.documentScroller.pipe((0,Ln.h)(this.testForSmartPopoverContentContainer)).subscribe(()=>{this.smartOpenService.open=!1,this.setAnchorFocus()}))}removeScrollListener(){this.documentScroller&&(this.scrollSubscription.unsubscribe(),delete this.documentScroller)}addClickListener(){this.outsideClickClose&&(this.documentClickListener=this.renderer.listen(this.document,"click",a=>{a===this.ignoredEvent?delete this.ignoredEvent:(this.smartOpenService.open=!1,a.target.focus())}))}removeClickListener(){this.outsideClickClose&&(delete this.ignoredEvent,this.documentClickListener&&(this.documentClickListener(),delete this.documentClickListener))}addEscapeListener(){this.escapeListener=this.renderer.listen(this.document,"keydown.escape",()=>{this.smartOpenService.open=!1,this.setAnchorFocus()})}removeEscapeListener(){this.escapeListener&&(this.escapeListener(),delete this.escapeListener)}setCloseFocus(){this.closeButtonRef.nativeElement.focus()}setAnchorFocus(){this.anchorButtonRef.nativeElement.focus()}testForSmartPopoverContentContainer(a){let g=a.target;for(;g.classList&&"body"!==g.parentElement.localName;)g=g.parentElement;return!!g.classList&&!g.classList.contains("clr-popover-content")}removeAllEventListeners(){this.removeScrollListener(),this.removeClickListener(),this.removeEscapeListener()}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.Qsj),l.LFG(mi),l.LFG(k.K0))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),pu=(()=>{class d{constructor(a,g){a.anchorButtonRef=g}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(fu),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrPopoverAnchor",""]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("clr-anchor",!0)}}),d})(),sg=(()=>{class d{constructor(a,g,_){this.elementRef=a,this.smartEventsService=g,this.smartOpenService=_,this.closeChange=new l.vpe,this.subscriptions=[],this.subscriptions.push(_.openChange.pipe((0,Ln.h)(S=>!S)).subscribe(()=>{this.closeChange.next()}))}handleClick(a){this.smartOpenService.toggleWithEvent(a),this.smartEventsService.setAnchorFocus()}ngAfterViewInit(){this.smartEventsService.closeButtonRef=this.elementRef,this.smartEventsService.setCloseFocus()}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(fu),l.Y36(mi))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrPopoverCloseButton",""]],hostVars:2,hostBindings:function(a,g){1&a&&l.NdJ("click",function(S){return g.handleClick(S)}),2&a&&l.ekj("clr-smart-close-button",!0)},outputs:{closeChange:"clrPopoverOnCloseChange"}}),d})();var Hr=function(d){return d[d.VERTICAL=0]="VERTICAL",d[d.HORIZONTAL=1]="HORIZONTAL",d}(Hr||{}),bn=function(d){return d[d.START=0]="START",d[d.CENTER=.5]="CENTER",d[d.END=1]="END",d}(bn||{}),ec=function(d){return d[d.BOTTOM=0]="BOTTOM",d[d.LEFT=1]="LEFT",d[d.RIGHT=2]="RIGHT",d[d.TOP=3]="TOP",d}(ec||{});const Ls=d=>({...d,side:-1*d.side}),na=(d,f)=>{const a=d.content+(f?.5:-.5);return a<0||a>1?d:{...d,content:a}};function Ja(d,f,a){return g=>f(d(g),a)}function Vs(d,f,a){let g=f.left,_=f.top;switch(d.axis+d.side){case-1:g+=og(d,f,a),_-=a.height;break;case 1:g+=og(d,f,a),_+=f.height;break;case 0:g-=a.width,_+=HS(d,f,a);break;case 2:g+=f.width,_+=HS(d,f,a)}return{xOffset:g,yOffset:_}}function og(d,f,a){let g=0;switch(d.anchor){case bn.START:break;case bn.CENTER:g+=f.width/2;break;case bn.END:g+=f.width}switch(d.content){case bn.START:break;case bn.CENTER:g-=a.width/2;break;case bn.END:g-=a.width}return g}function HS(d,f,a){let g=0;switch(d.anchor){case bn.START:break;case bn.CENTER:g+=f.height/2;break;case bn.END:g+=f.height}switch(d.content){case bn.START:break;case bn.CENTER:g-=a.height/2;break;case bn.END:g-=a.height}return g}let ih=(()=>{class d{constructor(a,g){this.eventService=a,this.platformId=g,this._shouldRealign=new et.x,this.shouldRealign=this._shouldRealign.asObservable()}realign(){this._shouldRealign.next()}alignContent(a){if(!(0,k.NF)(this.platformId))return{xOffset:0,yOffset:0};this.currentAnchorCoords=this.eventService.anchorButtonRef.nativeElement.getBoundingClientRect(),this.currentContentCoords=a.getBoundingClientRect(),this.contentOffsets=Vs(this.position,this.currentAnchorCoords,this.currentContentCoords);const g=function ag(d,f){const a=[],g_bottom=d.yOffset+f.height,g_left=d.xOffset,g_right=d.xOffset+f.width;return d.yOffset>=0||a.push(ec.TOP),g_left>=0||a.push(ec.LEFT),g_bottom<=(window.innerHeight||document.documentElement.clientHeight)||a.push(ec.BOTTOM),g_right<=(window.innerWidth||document.documentElement.clientWidth)||a.push(ec.RIGHT),a}(this.contentOffsets,this.currentContentCoords),_=g.reduce((S,j)=>S+j,0);return 1===g.length&&this.position.axis===Hr.VERTICAL?this.handleVerticalAxisOneViolation(_):1===g.length&&this.position.axis===Hr.HORIZONTAL?this.handleHorizontalAxisOneViolation(_):2===g.length&&this.position.axis===Hr.VERTICAL?this.handleVerticalAxisTwoViolations(_):2===g.length&&this.position.axis===Hr.HORIZONTAL&&this.handleHorizontalAxisTwoViolations(_),this.currentContentCoords.top<0&&(this.contentOffsets.yOffset+=Math.abs(this.currentContentCoords.top)),this.contentOffsets}handleVerticalAxisOneViolation(a){switch(a){case 0:case 3:this.contentOffsets=Vs(Ls(this.position),this.currentAnchorCoords,this.currentContentCoords);break;case 1:this.contentOffsets=Vs(this.position,this.currentAnchorCoords,this.currentContentCoords),this.contentOffsets.xOffset<0&&(this.contentOffsets.xOffset=10);break;case 2:this.contentOffsets=Vs(na(this.position,!0),this.currentAnchorCoords,this.currentContentCoords)}}handleVerticalAxisTwoViolations(a){switch(a){case 5:{const g=Ja(Ls,na,!0);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}case 4:{const g=Ja(Ls,na,!1);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}case 3:default:break;case 2:{const g=Ja(Ls,na,!0);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}case 1:{const g=Ja(Ls,na,!1);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}}}handleHorizontalAxisOneViolation(a){switch(a){case 1:case 2:this.contentOffsets=Vs(Ls(this.position),this.currentAnchorCoords,this.currentContentCoords);break;case 0:this.contentOffsets=Vs(na(this.position,!0),this.currentAnchorCoords,this.currentContentCoords);break;case 3:this.contentOffsets=Vs(na(this.position),this.currentAnchorCoords,this.currentContentCoords)}}handleHorizontalAxisTwoViolations(a){switch(a){case 5:case 4:{const g=Ja(Ls,na,!1);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}case 3:default:break;case 2:case 1:{const g=Ja(Ls,na,!0);this.contentOffsets=Vs(g(this.position),this.currentAnchorCoords,this.currentContentCoords);break}}}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(fu),l.LFG(l.Lbi))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),ms=(()=>{class d{constructor(a,g,_,S,j,J,te){this.document=a,this.container=g,this.template=_,this.renderer=S,this.smartPositionService=j,this.smartEventsService=J,this.smartOpenService=te,this.subscriptions=[],this.removeClickListenerFn=null,this.shouldRealign=!1,this.checkCollector=new l.vpe}set open(a){this.smartOpenService.open=!!a}set contentAt(a){this.smartPositionService.position=a}set outsideClickClose(a){this.smartEventsService.outsideClickClose=!!a}set scrollToClose(a){this.smartEventsService.scrollToClose=!!a}ngAfterContentChecked(){this.smartOpenService.open&&this.view&&this.shouldRealign&&this.checkCollector.emit()}ngAfterViewInit(){this.subscriptions.push(this.smartOpenService.openChange.subscribe(a=>{a?this.addContent():this.removeContent()}),this.smartPositionService.shouldRealign.subscribe(()=>{this.shouldRealign=!0}),this.checkCollector.pipe((0,Zn.b)(0)).subscribe(()=>{this.alignContent(),this.shouldRealign=!1,this.view&&(this.renderer.setStyle(this.view.rootNodes[0],"opacity","1"),this.smartOpenService.popoverVisibleEmit(!0))}))}ngOnDestroy(){this.removeContent(),this.subscriptions.forEach(a=>a.unsubscribe())}addContent(){this.view=this.container.createEmbeddedView(this.template);const[a]=this.view.rootNodes;this.smartEventsService.contentRef=a,this.renderer.addClass(a,"clr-popover-content"),this.renderer.setStyle(a,"top","0px"),this.renderer.setStyle(a,"left","0px"),this.renderer.setStyle(a,"opacity","0"),this.removeClickListenerFn=this.renderer.listen(a,"click",g=>{this.smartOpenService.openEvent=g}),this.view.rootNodes.forEach(g=>{this.renderer.appendChild(this.document.body,g)}),this.shouldRealign=!0}removeContent(){this.view&&(this.removeClickListenerFn&&(this.removeClickListenerFn(),this.removeClickListenerFn=null),this.view.rootNodes.forEach(a=>this.renderer.removeChild(this.document.body,a)),this.container.clear(),delete this.view,this.smartOpenService.popoverVisibleEmit(!1))}alignContent(){if(!this.view)return;const a=this.smartPositionService.alignContent(this.view.rootNodes[0]);this.renderer.setStyle(this.view.rootNodes[0],"top",`${a.yOffset}px`),this.renderer.setStyle(this.view.rootNodes[0],"left",`${a.xOffset}px`),this.smartOpenService.popoverAlignedEmit(this.view.rootNodes[0])}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(k.K0),l.Y36(l.s_b),l.Y36(l.Rgc),l.Y36(l.Qsj),l.Y36(ih),l.Y36(fu),l.Y36(mi))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrPopoverContent",""]],inputs:{open:["clrPopoverContent","open"],contentAt:["clrPopoverContentAt","contentAt"],outsideClickClose:["clrPopoverContentOutsideClickToClose","outsideClickClose"],scrollToClose:["clrPopoverContentScrollToClose","scrollToClose"]}}),d})(),gu=(()=>{class d{constructor(a){this.smartOpenService=a,this.openCloseChange=new l.vpe,this.subscriptions=[],this.subscriptions.push(this.smartOpenService.openChange.subscribe(g=>{this.openCloseChange.next(g)}))}handleClick(a){this.smartOpenService.toggleWithEvent(a)}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(mi))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrPopoverOpenCloseButton",""]],hostVars:2,hostBindings:function(a,g){1&a&&l.NdJ("click",function(S){return g.handleClick(S)}),2&a&&l.ekj("clr-smart-open-close",!0)},outputs:{openCloseChange:"clrPopoverOpenCloseChange"}}),d})(),tc=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({}),d})();var vs=function(d){return d.UP="up",d.DOWN="down",d.LEFT="left",d.RIGHT="right",d}(vs||{});let bo=class{constructor(f){this.renderer=f,this._unlistenFuncs=[]}get current(){return this._current}reset(f){this._current=f}listenToArrowKeys(f){this._unlistenFuncs.push(this.renderer.listen(f,"keydown.arrowup",()=>!this.move(vs.UP))),this._unlistenFuncs.push(this.renderer.listen(f,"keydown.arrowdown",()=>!this.move(vs.DOWN))),this._unlistenFuncs.push(this.renderer.listen(f,"keydown.arrowleft",()=>!this.move(vs.LEFT))),this._unlistenFuncs.push(this.renderer.listen(f,"keydown.arrowright",()=>!this.move(vs.RIGHT)))}registerContainer(f,a="0"){this.renderer.setAttribute(f,"tabindex",a),this.listenToArrowKeys(f),this._unlistenFuncs.push(this.renderer.listen(f,"keydown.space",()=>!this.activateCurrent())),this._unlistenFuncs.push(this.renderer.listen(f,"keydown.enter",()=>!this.activateCurrent()))}moveTo(f){void 0!==f&&(this.current&&this.current.blur(),f.focus(),this._current=f)}move(f){let a=!1;if(this.current){const g=this.current[f];g&&((0,ao.b)(g)?g:(0,es.of)(g)).subscribe(S=>{S&&(this.moveTo(S),a=!0)})}return a}activateCurrent(){return!(!this.current||!this.current.activate||(this.current.activate(),0))}detachListeners(){this._unlistenFuncs.forEach(f=>f())}};bo.\u0275fac=function(f){return new(f||bo)(l.LFG(l.Qsj))},bo.\u0275prov=l.Yz7({token:bo,factory:bo.\u0275fac}),new l.FiY,new l.tp0;var no=function(d){return d[d.BEFORE=-1]="BEFORE",d[d.AFTER=1]="AFTER",d}(no||{});class _s{}_s["top-right"]={axis:Hr.VERTICAL,side:no.BEFORE,anchor:bn.END,content:bn.END},_s["top-left"]={axis:Hr.VERTICAL,side:no.BEFORE,anchor:bn.START,content:bn.START},_s["bottom-right"]={axis:Hr.VERTICAL,side:no.AFTER,anchor:bn.END,content:bn.END},_s["bottom-left"]={axis:Hr.VERTICAL,side:no.AFTER,anchor:bn.START,content:bn.START},_s["right-top"]={axis:Hr.HORIZONTAL,side:no.AFTER,anchor:bn.CENTER,content:bn.END},_s["right-bottom"]={axis:Hr.HORIZONTAL,side:no.AFTER,anchor:bn.START,content:bn.START},_s["left-top"]={axis:Hr.HORIZONTAL,side:no.BEFORE,anchor:bn.CENTER,content:bn.END},_s["left-bottom"]={axis:Hr.HORIZONTAL,side:no.BEFORE,anchor:bn.START,content:bn.START};const nc=new l.OlP("POPOVER_HOST_ANCHOR");let mu=(()=>{class d{constructor(a){this.toggleService=a,this.lastOpenChange=null}ngOnInit(){this.subscription=this.toggleService.openChange.subscribe(a=>{this.lastOpenChange=a})}ngOnDestroy(){this.subscription?.unsubscribe()}onEscapeKey(a){null!==this.lastOpenChange&&(!1===this.lastOpenChange&&a.stopPropagation(),this.lastOpenChange=null)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(mi))},d.\u0275dir=l.lG2({type:d,hostBindings:function(a,g){1&a&&l.NdJ("keyup.escape",function(S){return g.onEscapeKey(S)})},standalone:!0}),d})(),ia=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275dir=l.lG2({type:d,standalone:!0,features:[l._Bn([mi,fu,ih,{provide:nc,useExisting:l.SBq}]),l.zW0([mu])]}),d})();class rh{static linkParent(f,a,g){f.forEach(_=>_[g]=a)}static linkVertical(f,a=!0){f.forEach((g,_)=>{_>0&&(g.up=f[_-1]),_1&&(f[0].up=f[f.length-1],f[f.length-1].down=f[0])}}let jo=(()=>{class d{userDefinedWidth(a){a.classList.add("datagrid-cell-width-zero");const g=this.clientRect(a).width;return a.classList.remove("datagrid-cell-width-zero"),g}scrollBarWidth(a){return a.offsetWidth-a.clientWidth}scrollWidth(a){return a.scrollWidth||0}computedHeight(a){return parseInt(getComputedStyle(a).getPropertyValue("height"),10)}clientRect(a){const g=a.getBoundingClientRect();return{top:parseInt(g.top,10),bottom:parseInt(g.bottom,10),left:parseInt(g.left,10),right:parseInt(g.right,10),width:parseInt(g.width,10),height:parseInt(g.height,10)}}minWidth(a){return parseInt(getComputedStyle(a).getPropertyValue("min-width"),10)}focus(a){a.focus()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),vu=(()=>{class d{constructor(a,g){this.element=a,this.domAdapter=g,this.startHeight=0}get expandAnimation(){return{value:this.clrExpandTrigger,params:{startHeight:this.startHeight}}}animationDone(){this.updateStartHeight()}updateStartHeight(){this.startHeight=this.domAdapter.computedHeight(this.element.nativeElement)||0}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(jo))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-expandable-animation"]],hostVars:1,hostBindings:function(a,g){1&a&&l.WFA("@expandAnimation.done",function(){return g.animationDone()}),2&a&&l.d8E("@expandAnimation",g.expandAnimation)},inputs:{clrExpandTrigger:"clrExpandTrigger"},features:[l._Bn([jo])],ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},styles:["[_nghost-%COMP%]{display:block;overflow:hidden}"],data:{animation:[(0,P.X$)("expandAnimation",[(0,P.eR)("true <=> false",[(0,P.oB)({height:"{{startHeight}}px"}),(0,P.jt)("0.2s ease-in-out",(0,P.oB)({height:"*"}))])])]}}),d})(),cg=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();new l.OlP("IF_ACTIVE_ID");let dg=(()=>{class d{constructor(a,g,_){this.toggleService=a,this.template=g,this.container=_,this.openChange=new l.vpe(!1),this.subscription=this.toggleService.openChange.subscribe(S=>{this.updateView(S),this.openChange.emit(S)})}get open(){return this.toggleService.open}set open(a){this.toggleService.open=a}ngOnDestroy(){this.subscription.unsubscribe()}updateView(a){a?this.container.createEmbeddedView(this.template):this.container.clear()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(mi),l.Y36(l.Rgc),l.Y36(l.s_b))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrIfOpen",""]],inputs:{open:["clrIfOpen","open"]},outputs:{openChange:"clrIfOpenChange"}}),d})(),Bs=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();const ZS={provide:new l.OlP("FOCUS_ON_VIEW_INIT"),useValue:!0};let oh=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({providers:[ZS],imports:[k.ez]}),d})(),W_=(()=>{class d extends gf{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275dir=l.lG2({type:d,standalone:!0,features:[l.qOj]}),d})(),qS=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,tc]}),d})(),JS=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})(),XS=(()=>{class d{constructor(){Jt.addIcons(Ao)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[JS,qS]}),d})(),eD=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["ng-component"]],decls:0,vars:0,template:function(a,g){},encapsulation:2}),d})(),ah=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({}),d})(),tD=0,ys=(()=>{class d{constructor(){this._id="clr-form-control-"+ ++tD,this._idChange=new fn.X(this._id)}get id(){return this._id}set id(a){this._id=a,this._idChange.next(a)}get idChange(){return this._idChange.asObservable()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Q_=0,Xa=(()=>{class d{constructor(){this._id="clr-form-container-"+ ++Q_,this._idChange=new fn.X(this._id)}get id(){return this._id}set id(a){this._id=a,this._idChange.next(a)}get idChange(){return this._idChange.asObservable()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();let lh=(()=>{class d{constructor(a,g){this.controlIdService=a,this.containerIdService=g,this.controlIdSuffix="abstract"}get id(){return this.containerIdService?`${this.containerIdService.id}-${this.controlIdSuffix}`:this.controlIdService?`${this.controlIdService.id}-${this.controlIdSuffix}`:null}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ys,8),l.Y36(Xa,8))},d.\u0275dir=l.lG2({type:d}),d})(),q_=(()=>{class d extends lh{constructor(a,g){super(a,g),this.controlIdService=a,this.containerIdService=g,this.controlIdSuffix="error"}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ys,8),l.Y36(Xa,8))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-control-error"]],hostVars:3,hostBindings:function(a,g){2&a&&(l.uIk("id",g.id),l.ekj("clr-subtext",!0))},features:[l.qOj],ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),fg=(()=>{class d extends lh{constructor(a,g){super(a,g),this.controlIdService=a,this.containerIdService=g,this.controlIdSuffix="helper"}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ys,8),l.Y36(Xa,8))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-control-helper"]],hostVars:3,hostBindings:function(a,g){2&a&&(l.uIk("id",g.id),l.ekj("clr-subtext",!0))},features:[l.qOj],ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),Cs=(()=>{class d{constructor(){this._controlChanges=new et.x,this._helpers=new et.x}get controlChanges(){return this._controlChanges.asObservable()}get helpersChange(){return this._helpers.asObservable()}setControl(a){this._controlChanges.next(a)}setHelpers(a){this._helpers.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();var rs=function(d){return d.NONE="NONE",d.VALID="VALID",d.INVALID="INVALID",d}(rs||{});let Hs=(()=>{class d{constructor(a){this.ngControlService=a,this.subscriptions=[],this._statusChanges=new fn.X(rs.NONE),this.subscriptions.push(this.ngControlService.controlChanges.subscribe(g=>{g&&(this.control=g,this.subscriptions.push(this.control.statusChanges.subscribe(()=>{this.triggerStatusChange()})))}))}get statusChanges(){return this._statusChanges.asObservable()}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}triggerStatusChange(){if(this.control){const a=rs[this.control.status];this._statusChanges.next(["VALID","INVALID"].includes(a)?a:rs.NONE)}}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(Cs))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();var sa=function(d){return d.VERTICAL="vertical",d.HORIZONTAL="horizontal",d.COMPACT="compact",d}(sa||{});let jr=(()=>{class d{constructor(){this.minLabelSize=1,this.maxLabelSize=12,this.layout=sa.HORIZONTAL,this.layoutValues=Object.keys(sa).map(a=>sa[a]),this._labelSize=2}get labelSize(){return this._labelSize}set labelSize(a){this.labelSizeIsValid(a)&&(this._labelSize=a)}get layoutClass(){return`clr-form-${this.layout}`}isVertical(){return this.layout===sa.VERTICAL}isHorizontal(){return this.layout===sa.HORIZONTAL}isCompact(){return this.layout===sa.COMPACT}isValid(a){return this.layoutValues.indexOf(a)>-1}labelSizeIsValid(a){return Number.isInteger(a)&&a>=this.minLabelSize&&a<=this.maxLabelSize}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Ir=(()=>{class d{constructor(a,g,_,S,j){this.controlIdService=a,this.layoutService=g,this.ngControlService=_,this.renderer=S,this.el=j,this.enableGrid=!0,this.subscriptions=[]}get labelText(){return this.el.nativeElement&&this.el.nativeElement.textContent}ngOnInit(){(this.controlIdService||this.ngControlService)&&this.renderer.addClass(this.el.nativeElement,"clr-control-label"),this.enableGrid&&this.layoutService&&!this.layoutService.isVertical()&&this.el.nativeElement&&this.el.nativeElement.className.indexOf("clr-col")<0&&(this.renderer.addClass(this.el.nativeElement,"clr-col-12"),this.renderer.addClass(this.el.nativeElement,`clr-col-md-${this.layoutService.labelSize}`)),this.controlIdService&&!this.forAttr&&this.subscriptions.push(this.controlIdService.idChange.subscribe(a=>this.forAttr=a))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}disableGrid(){this.enableGrid=!1}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ys,8),l.Y36(jr,8),l.Y36(Cs,8),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["label"]],hostVars:1,hostBindings:function(a,g){2&a&&l.uIk("for",g.forAttr)},inputs:{forAttr:["for","forAttr"]}}),d})(),nD=(()=>{class d extends lh{constructor(a,g){super(a,g),this.controlIdService=a,this.containerIdService=g,this.controlIdSuffix="success"}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ys,8),l.Y36(Xa,8))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-control-success"]],hostVars:3,hostBindings:function(a,g){2&a&&(l.uIk("id",g.id),l.ekj("clr-subtext",!0))},features:[l.qOj],ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),js=(()=>{class d{constructor(a){this.layoutService=a,this.className=""}controlClass(a=rs.NONE,g=!1,_=""){const S=[this.className,_];switch(a){case rs.VALID:S.push("clr-success");break;case rs.INVALID:S.push("clr-error")}return g&&this.layoutService&&-1===this.className.indexOf("clr-col")&&S.push(`clr-col-md-${this.layoutService.maxLabelSize-this.layoutService.labelSize} clr-col-12`),S.join(" ").trim()}initControlClass(a,g){g&&g.className&&(this.className=g.className,g.className.split(" ").forEach(S=>{S.startsWith("clr-col")&&a.removeClass(g,S)}))}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(jr,8))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),ch=(()=>{class d{constructor(a,g,_,S){this.ifControlStateService=a,this.layoutService=g,this.controlClassService=_,this.ngControlService=S,this._dynamic=!1,this.subscriptions=[],this.subscriptions.push(this.ifControlStateService.statusChanges.subscribe(j=>{this.state=j,this.updateHelpers()})),this.subscriptions.push(this.ngControlService.controlChanges.subscribe(j=>{this.control=j}))}get showHelper(){return!!this.controlHelperComponent&&(!!this.controlHelperComponent&&(!this.touched||this.state===rs.NONE)||!this.controlSuccessComponent&&this.state===rs.VALID||!this.controlErrorComponent&&this.state===rs.INVALID)}get showValid(){return this.touched&&this.state===rs.VALID&&!!this.controlSuccessComponent}get showInvalid(){return this.touched&&this.state===rs.INVALID&&!!this.controlErrorComponent}get touched(){return this.control?.touched}ngAfterContentInit(){this.updateHelpers()}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}controlClass(){return this.controlClassService.controlClass(!this.controlSuccessComponent&&this.state===rs.VALID||!this.touched?rs.NONE:this.state,this.addGrid())}addGrid(){return this.layoutService&&!this.layoutService.isVertical()}updateHelpers(){this.ngControlService&&this.ngControlService.setHelpers({show:this.showInvalid||this.showHelper||this.showValid,showInvalid:this.showInvalid,showHelper:this.showHelper,showValid:this.showValid})}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Hs),l.Y36(jr,8),l.Y36(js),l.Y36(Cs))},d.\u0275dir=l.lG2({type:d,contentQueries:function(a,g,_){if(1&a&&(l.Suo(_,Ir,5),l.Suo(_,nD,5),l.Suo(_,q_,5),l.Suo(_,fg,5)),2&a){let S;l.iGM(S=l.CRH())&&(g.label=S.first),l.iGM(S=l.CRH())&&(g.controlSuccessComponent=S.first),l.iGM(S=l.CRH())&&(g.controlErrorComponent=S.first),l.iGM(S=l.CRH())&&(g.controlHelperComponent=S.first)}}}),d})();class _u{constructor(f,a,g=0){if(this.injector=a.injector,!this.injector.get(f,null)){const _=this.injector.get(l._Vd),S=this.injector.get(l.SBq);a.createComponent(_.resolveComponentFactory(eD));const j=_.resolveComponentFactory(f),J=[];J[g]=[S.nativeElement];const te=a.createComponent(j,void 0,void 0,J);a.remove(0),te.instance._dynamic=!0,this.injector=te.injector}}get(f,a){return this.injector.get(f,a)}}let K_=(()=>{class d{constructor(){this._touched=new et.x}get touchedChange(){return this._touched.asObservable()}markAsTouched(){this._touched.next()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),So=(()=>{class d{constructor(a,g,_,S,j,J){this.vcr=a,this.wrapperType=g,this.ngControl=S,this.index=0,this.subscriptions=[],this.renderer=j,this.el=J,_&&(this.ngControlService=_.get(Cs,null),this.ifControlStateService=_.get(Hs,null),this.controlClassService=_.get(js,null),this.markControlService=_.get(K_,null)),this.controlClassService&&this.controlClassService.initControlClass(j,J.nativeElement),this.markControlService&&this.subscriptions.push(this.markControlService.touchedChange.subscribe(()=>{this.markAsTouched()})),this.ngControlService&&this.subscriptions.push(this.ngControlService.helpersChange.subscribe(te=>{this.setAriaDescribedBy(te)}))}get id(){return this._id}set id(a){this._id=a,this.controlIdService&&(this.controlIdService.id=a)}ngOnInit(){this._containerInjector=new _u(this.wrapperType,this.vcr,this.index),this.controlIdService=this._containerInjector.get(ys),this.containerIdService=this._containerInjector.get(Xa,null),this._id?this.controlIdService.id=this._id:this._id=this.controlIdService.id,this.ngControlService&&this.ngControlService.setControl(this.ngControl)}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}triggerValidation(){this.ifControlStateService&&this.ifControlStateService.triggerStatusChange()}getProviderFromContainer(a,g){try{return this._containerInjector.get(a,g)}catch{return g}}markAsTouched(){this.ngControl.control.markAsTouched(),this.ngControl.control.updateValueAndValidity()}setAriaDescribedBy(a){if(a.show){const g=this.getAriaDescribedById(a);if(null!==g)return void this.renderer.setAttribute(this.el.nativeElement,"aria-describedby",g)}this.renderer.removeAttribute(this.el.nativeElement,"aria-describedby")}getAriaDescribedById(a){let g="helper";return a.showInvalid?g="error":a.showValid&&(g="success"),this.containerIdService?this.containerIdService.id.concat("-",g):this.controlIdService?this.controlIdService.id.concat("-",g):null}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.DyG),l.Y36(l.zs3),l.Y36(Y.a5),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,hostVars:1,hostBindings:function(a,g){1&a&&l.NdJ("blur",function(){return g.triggerValidation()}),2&a&&l.Ikx("id",g.id)},inputs:{id:"id"}}),d})(),rD=(()=>{class d{constructor(a,g){this.layoutService=a,this.markControlService=g}set labelSize(a){const g=parseInt(a,10)||2;this.layoutService.labelSize=g}onFormSubmit(){this.markAsTouched()}markAsTouched(){this.markControlService.markAsTouched()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(jr),l.Y36(K_))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrForm",""]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Ir,5),2&a){let S;l.iGM(S=l.CRH())&&(g.labels=S)}},hostVars:6,hostBindings:function(a,g){1&a&&l.NdJ("submit",function(){return g.onFormSubmit()}),2&a&&l.ekj("clr-form",!0)("clr-form-horizontal",g.layoutService.isHorizontal())("clr-form-compact",g.layoutService.isCompact())},inputs:{labelSize:["clrLabelSize","labelSize"]},features:[l._Bn([jr,K_])]}),d})(),uh=(()=>{class d{constructor(a){this.layoutService=a}ngOnInit(){this.layout&&this.layoutService.isValid(this.layout)&&(this.layoutService.layout=this.layout)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(jr))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrForm","","clrLayout",""]],inputs:{layout:["clrLayout","layout"]}}),d})(),Wi=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn]}),d})();const zr=new l.OlP("IS_TOGGLE"),J_={provide:zr,useFactory:function y1(){return new fn.X(!1)}};let sc=(()=>{class d{constructor(a){this._dynamic=!1,this.toggle=!1,this.subscriptions=[],this.subscriptions.push(a.subscribe(g=>{this.toggle=g}))}ngOnInit(){this.label&&this.label.disableGrid()}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(zr))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-checkbox-wrapper"],["clr-toggle-wrapper"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Ir,7),2&a){let S;l.iGM(S=l.CRH())&&(g.label=S.first)}},hostVars:4,hostBindings:function(a,g){2&a&&l.ekj("clr-checkbox-wrapper",!g.toggle)("clr-toggle-wrapper",g.toggle)},features:[l._Bn([ys,J_])],ngContentSelectors:Kb,decls:3,vars:1,consts:[[4,"ngIf"]],template:function(a,g){1&a&&(l.F$t(bE),l.Hsn(0),l.Hsn(1,1),l.YNc(2,Tv,1,0,"label",0)),2&a&&(l.xp6(2),l.Q6J("ngIf",!g.label))},dependencies:[k.O5,Ir],encapsulation:2}),d})(),Cu=(()=>{class d extends So{constructor(a,g,_,S,j,J){super(a,sc,g,_,S,j),this.toggle=J}ngOnInit(){super.ngOnInit();const a=this.getProviderFromContainer(zr,null);a&&null!==this.toggle&&a.next(!0)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.zs3),l.Y36(Y.a5,10),l.Y36(l.Qsj),l.Y36(l.SBq),l.$8M("clrToggle"))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrCheckbox",""],["","clrToggle",""]],features:[l.qOj]}),d})(),X_=(()=>{class d extends ch{constructor(a,g,_,S){super(S,a,g,_),this.layoutService=a,this.controlClassService=g,this.ngControlService=_,this.ifControlStateService=S,this.inline=!1}get clrInline(){return this.inline}set clrInline(a){this.inline="string"==typeof a?"false"!==a:!!a}ngAfterContentInit(){this.setAriaRoles()}setAriaRoles(){this.role=this.checkboxes.length?"group":null}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(jr,8),l.Y36(js),l.Y36(Cs),l.Y36(Hs))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-checkbox-container"],["clr-toggle-container"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Cu,5),2&a){let S;l.iGM(S=l.CRH())&&(g.checkboxes=S)}},hostVars:7,hostBindings:function(a,g){2&a&&(l.uIk("role",g.role),l.ekj("clr-form-control",!0)("clr-form-control-disabled",null==g.control?null:g.control.disabled)("clr-row",g.addGrid()))},inputs:{clrInline:"clrInline"},features:[l._Bn([Hs,Cs,js,Xa]),l.qOj],ngContentSelectors:t0,decls:10,vars:9,consts:[[4,"ngIf"],[1,"clr-control-container",3,"ngClass"],[1,"clr-subtext-wrapper"],["class","clr-validate-icon","shape","exclamation-circle","status","danger","aria-hidden","true",4,"ngIf"],["class","clr-validate-icon","shape","check-circle","status","success","aria-hidden","true",4,"ngIf"],["shape","exclamation-circle","status","danger","aria-hidden","true",1,"clr-validate-icon"],["shape","check-circle","status","success","aria-hidden","true",1,"clr-validate-icon"]],template:function(a,g){1&a&&(l.F$t(e0),l.Hsn(0),l.YNc(1,nu,1,0,"label",0),l.TgZ(2,"div",1),l.Hsn(3,1),l.TgZ(4,"div",2),l.YNc(5,Jb,1,0,"ng-content",0),l.YNc(6,Vl,1,0,"cds-icon",3),l.YNc(7,iu,1,0,"cds-icon",4),l.YNc(8,Xb,1,0,"ng-content",0),l.YNc(9,Iv,1,0,"ng-content",0),l.qZA()()),2&a&&(l.xp6(1),l.Q6J("ngIf",!g.label&&g.addGrid()),l.xp6(1),l.ekj("clr-control-inline",g.clrInline),l.Q6J("ngClass",g.controlClass()),l.xp6(3),l.Q6J("ngIf",g.showHelper),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid))},dependencies:[k.mk,k.O5,Pn,Ir],encapsulation:2}),d})(),ey=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,Wi,ah,Wi]}),d})();function zs(d){return null!==d&&("string"==typeof d?d.length>=0:"boolean"==typeof d&&d)}let oc=(()=>{class d{get spinnerClass(){return!0}get inlineClass(){return this._inline}set clrInline(a){this._inline=zs(a)}get inverseClass(){return this._inverse}set clrInverse(a){this._inverse=zs(a)}get smallClass(){return this._small}set clrSmall(a){this._small=zs(a)}get mediumClass(){return!this._small&&this._medium}set clrMedium(a){this._medium=zs(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-spinner"]],hostVars:11,hostBindings:function(a,g){2&a&&(l.uIk("aria-busy",!0),l.ekj("spinner",g.spinnerClass)("spinner-inline",g.inlineClass)("spinner-inverse",g.inverseClass)("spinner-sm",g.smallClass)("spinner-md",g.mediumClass))},inputs:{clrInline:"clrInline",clrInverse:"clrInverse",clrSmall:"clrSmall",clrMedium:"clrMedium"},ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),bu=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})(),cc=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();class ty{containsItem(f){return!!this.model&&this.model.includes(f)}select(f){this.addItem(f)}unselect(f){this.removeItem(f)}isEmpty(){return!(this.model&&this.model.length>0)}pop(){let f;return this.model&&this.model.length>0&&(f=this.model[this.model.length-1],this.removeItem(f)),f}toString(f,a=-1){let g="";return this.model&&(a>-1?this.model[a]&&(g+=f&&this.model[a][f]?this.model[a][f]:this.model[a].toString()):this.model.forEach(_=>{g+=f&&_[f]?_[f]:_.toString(),g+=" "})),g.trim()}addItem(f){this.containsItem(f)||(this.model=this.model||[],this.model.push(f))}removeItem(f){if(null==this.model)return;const a=this.model.indexOf(f);a>-1&&this.model.splice(a,1),0===this.model.length&&(this.model=null)}}class aD{containsItem(f){return this.model===f}select(f){this.model=f}unselect(f){this.containsItem(f)&&(this.model=null)}isEmpty(){return!this.model}pop(){const f=this.model;return this.model=null,f}toString(f){return this.model?f&&this.model[f]?this.model[f]:this.model.toString():""}}class Ia{}function ny(d){return[d,{provide:Ia,useExisting:d}]}class lD extends aD{constructor(){super(...arguments),this._focusChanged=new fn.X(null)}get focusChanged(){return this._focusChanged.asObservable()}select(f){this.model!==f&&(this.model=f,this._focusChanged.next(f))}}let cD=(()=>{class d{constructor(){this.loading=!1,this.showAllOptions=!0,this._currentInput="",this._inputChanged=new fn.X(""),this._selectionChanged=new ds(1),this.inputChanged=this._inputChanged.asObservable()}get currentInput(){return this._currentInput}set currentInput(a){""===a&&!this.multiselectable&&this.setSelectionValue(null),this._currentInput=a,this._inputChanged.next(a)}get selectionChanged(){return this._selectionChanged.asObservable()}get multiselectable(){return this.selectionModel instanceof ty}select(a){null==a||this.selectionModel.containsItem(a)||(this.selectionModel.select(a),this._selectionChanged.next(this.selectionModel))}toggle(a){null!=a&&(this.selectionModel.containsItem(a)?this.selectionModel.unselect(a):this.selectionModel.select(a),this._selectionChanged.next(this.selectionModel))}unselect(a){null==a||!this.selectionModel.containsItem(a)||(this.selectionModel.unselect(a),this._selectionChanged.next(this.selectionModel))}setSelectionValue(a){!this.selectionModel||this.selectionModel.model===a||!this.selectionModel.model&&!a||(this.selectionModel.model=a,this._selectionChanged.next(this.selectionModel))}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();ny((()=>{class d{constructor(a,g,_,S){this.toggleService=g,this.selectionService=_,this.platformId=S,this.pseudoFocus=new lD,this.optionData=[],this.handleFocusSubscription(),this.renderer=a.createRenderer(null,null)}get trigger(){return this._trigger}set trigger(a){this._trigger=a,this.addFocusOnBlurListener(a)}get listbox(){return this._listbox}set listbox(a){this._listbox=a,this.addFocusOnBlurListener(a)}get textInput(){return this._textInput}set textInput(a){this._textInput=a,this.renderer.listen(a,"keydown",g=>!this.handleTextInput(g)),this.addFocusOnBlurListener(a)}focusInput(){this.textInput&&(0,k.NF)(this.platformId)&&this.textInput.focus()}focusFirstActive(){if(this.optionData.length>0)if(this.selectionService.selectionModel.isEmpty())this.pseudoFocus.select(this.optionData[0]);else{let a;a=this.selectionService.multiselectable?this.selectionService.selectionModel.model[0]:this.selectionService.selectionModel.model;const g=this.optionData.find(_=>_.value===a);this.pseudoFocus.select(g||this.optionData[0]),this.scrollIntoSelectedModel("auto")}}addOptionValues(a){this.optionData=a}handleFocusSubscription(){this.toggleService.openChange.subscribe(a=>{a||(this.pseudoFocus.model=null)})}moveFocusTo(a){let g=this.optionData.findIndex(_=>_.equals(this.pseudoFocus.model));a===vs.UP?-1===g||0===g?g=this.optionData.length-1:g--:a===vs.DOWN&&(-1===g||g===this.optionData.length-1?g=0:g++),this.pseudoFocus.select(this.optionData[g]),this.scrollIntoSelectedModel()}openAndMoveTo(a){this.toggleService.open?this.moveFocusTo(a):(this.toggleService.openChange.pipe((0,Qn.q)(1)).subscribe(g=>{g&&this.moveFocusTo(a)}),this.toggleService.open=!0)}handleTextInput(a){let g=!1;const _=Fs(a.key);if(a)switch(_){case At.Enter:this.toggleService.open&&this.pseudoFocus.model&&(this.selectionService.multiselectable?this.selectionService.toggle(this.pseudoFocus.model.value):this.selectionService.select(this.pseudoFocus.model.value),g=!0);break;case At.Space:this.toggleService.open||(this.toggleService.open=!0,g=!0);break;case At.ArrowUp:this.preventViewportScrolling(a),this.openAndMoveTo(vs.UP),g=!0;break;case At.ArrowDown:this.preventViewportScrolling(a),this.openAndMoveTo(vs.DOWN),g=!0;break;default:a.key!==At.Tab&&(!this.selectionService.multiselectable||a.key!==At.Backspace)&&a.key!==At.Escape&&!this.toggleService.open&&(this.toggleService.open=!0)}return g}scrollIntoSelectedModel(a="smooth"){this.pseudoFocus.model&&this.pseudoFocus.model.el&&this.pseudoFocus.model.el.scrollIntoView({behavior:a,block:"center",inline:"nearest"})}preventViewportScrolling(a){a.preventDefault(),a.stopImmediatePropagation()}addFocusOnBlurListener(a){(0,k.NF)(this.platformId)&&this.renderer.listen(a,"blur",g=>{this.focusOutOfComponent(g)&&(this.toggleService.open=!1,this.componentCdRef&&this.componentCdRef.detectChanges())})}focusOutOfComponent(a){const g=a.relatedTarget||document.activeElement;return!(this.textInput.contains(g)||this.trigger.contains(g)||this.listbox.contains(g))}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.FYo),l.LFG(mi),l.LFG(cD),l.LFG(l.Lbi))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})());let T1=(()=>{class d{constructor(){Jt.addIcons(ii,Di,Yr,Or)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,cc,Wi,Bs,tc,bu,Wi,Bs]}),d})(),pD=(()=>{class d extends ch{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-input-container"]],hostVars:6,hostBindings:function(a,g){2&a&&l.ekj("clr-form-control",!0)("clr-form-control-disabled",null==g.control?null:g.control.disabled)("clr-row",g.addGrid())},features:[l._Bn([Hs,Cs,ys,js]),l.qOj],ngContentSelectors:kv,decls:10,vars:7,consts:[[4,"ngIf"],[1,"clr-control-container",3,"ngClass"],[1,"clr-input-wrapper"],["class","clr-validate-icon","shape","exclamation-circle","status","danger","aria-hidden","true",4,"ngIf"],["class","clr-validate-icon","shape","check-circle","status","success","aria-hidden","true",4,"ngIf"],["shape","exclamation-circle","status","danger","aria-hidden","true",1,"clr-validate-icon"],["shape","check-circle","status","success","aria-hidden","true",1,"clr-validate-icon"]],template:function(a,g){1&a&&(l.F$t(Vo),l.Hsn(0),l.YNc(1,Da,1,0,"label",0),l.TgZ(2,"div",1)(3,"div",2),l.Hsn(4,1),l.YNc(5,_p,1,0,"cds-icon",3),l.YNc(6,l0,1,0,"cds-icon",4),l.qZA(),l.YNc(7,AE,1,0,"ng-content",0),l.YNc(8,c0,1,0,"ng-content",0),l.YNc(9,yp,1,0,"ng-content",0),l.qZA()),2&a&&(l.xp6(1),l.Q6J("ngIf",!g.label&&g.addGrid()),l.xp6(1),l.Q6J("ngClass",g.controlClass()),l.xp6(3),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid),l.xp6(1),l.Q6J("ngIf",g.showHelper),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid))},dependencies:[k.mk,k.O5,Pn,Ir],encapsulation:2}),d})(),I1=(()=>{class d extends So{constructor(a,g,_,S,j){super(a,pD,g,_,S,j),this.index=1}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.zs3),l.Y36(Y.a5,10),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrInput",""]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("clr-input",!0)},features:[l.qOj]}),d})(),pg=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,Wi,Wi]}),d})(),gD=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,pg,kn]}),d})(),uc=(()=>{class d extends gf{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275dir=l.lG2({type:d,selectors:[["","cdkTrapFocus",""]],features:[l.qOj]}),d})(),mg=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({}),d})(),fy=(()=>{class d{constructor(){Jt.addIcons(ii,Di,Yr,Zt,Hn)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,mg,ah,Bs,tc,kn,Wi]}),d})();new l.OlP(void 0);let Dg=(()=>{class d{constructor(){Jt.addIcons(_i,Ui,ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,Wi,Wi]}),d})(),my=(()=>{class d{constructor(){this._dynamic=!1}ngOnInit(){this.label&&this.label.disableGrid()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-radio-wrapper"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Ir,7),2&a){let S;l.iGM(S=l.CRH())&&(g.label=S.first)}},hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("clr-radio-wrapper",!0)},features:[l._Bn([ys])],ngContentSelectors:Yv,decls:3,vars:1,consts:[[4,"ngIf"]],template:function(a,g){1&a&&(l.F$t(BE),l.Hsn(0),l.Hsn(1,1),l.YNc(2,VE,1,0,"label",0)),2&a&&(l.xp6(2),l.Q6J("ngIf",!g.label))},dependencies:[k.O5,Ir],encapsulation:2}),d})(),vy=(()=>{class d extends So{constructor(a,g,_,S,j){super(a,my,g,_,S,j)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.zs3),l.Y36(Y.a5,10),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrRadio",""]],features:[l.qOj]}),d})(),ID=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Wi,ah,kn,Wi]}),d})(),wg=(()=>{class d extends ch{constructor(a,g,_,S,j,J){super(J,a,g,_),this.renderer=S,this.idService=j,this.ifControlStateService=J,this._hasProgress=!1}get hasProgress(){return this._hasProgress}set hasProgress(a){const g=!!a;g!==this._hasProgress&&(this._hasProgress=g)}getRangeProgressFillWidth(){const a=this.selectRangeElement();if(!a)return this.lastRangeProgressFillWidth;const _=+a.min;let S=+a.max;return 0===_&&0===S&&(S=100),this.lastRangeProgressFillWidth=100*((this.control&&void 0!==this.control.value?this.control.value:(_+S)/2)-_)/(S-_)*a.offsetWidth/100+"px",this.lastRangeProgressFillWidth}selectRangeElement(){try{return this.renderer.selectRootElement("[clrRange]#"+this.idService.id)}catch{return}}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(jr,8),l.Y36(js),l.Y36(Cs),l.Y36(l.Qsj),l.Y36(ys),l.Y36(Hs))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-range-container"]],hostVars:6,hostBindings:function(a,g){2&a&&l.ekj("clr-form-control",!0)("clr-form-control-disabled",null==g.control?null:g.control.disabled)("clr-row",g.addGrid())},inputs:{hasProgress:["clrRangeHasProgress","hasProgress"]},features:[l._Bn([Hs,Cs,ys,js]),l.qOj],ngContentSelectors:Sp,decls:11,vars:10,consts:[[4,"ngIf"],[1,"clr-control-container",3,"ngClass"],[1,"clr-range-wrapper"],["class","fill-input",3,"width",4,"ngIf"],["class","clr-validate-icon","shape","exclamation-circle","status","danger","aria-hidden","true",4,"ngIf"],["class","clr-validate-icon","shape","check-circle","status","success","aria-hidden","true",4,"ngIf"],[1,"fill-input"],["shape","exclamation-circle","status","danger","aria-hidden","true",1,"clr-validate-icon"],["shape","check-circle","status","success","aria-hidden","true",1,"clr-validate-icon"]],template:function(a,g){1&a&&(l.F$t(zl),l.Hsn(0),l.YNc(1,rn,1,0,"label",0),l.TgZ(2,"div",1)(3,"div",2),l.Hsn(4,1),l.YNc(5,Wv,1,2,"span",3),l.YNc(6,Zv,1,0,"cds-icon",4),l.YNc(7,jl,1,0,"cds-icon",5),l.qZA(),l.YNc(8,Qv,1,0,"ng-content",0),l.YNc(9,S0,1,0,"ng-content",0),l.YNc(10,zd,1,0,"ng-content",0),l.qZA()),2&a&&(l.xp6(1),l.Q6J("ngIf",!g.label&&g.addGrid()),l.xp6(1),l.Q6J("ngClass",g.controlClass()),l.xp6(1),l.ekj("progress-fill",g.hasProgress),l.xp6(2),l.Q6J("ngIf",g.hasProgress),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid),l.xp6(1),l.Q6J("ngIf",g.showHelper),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid))},dependencies:[k.mk,k.O5,Ir,Pn],encapsulation:2}),d})(),Eg=(()=>{class d extends So{constructor(a,g,_,S,j){super(a,wg,g,_,S,j)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.zs3),l.Y36(Y.a5,10),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrRange",""]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("clr-range",!0)},features:[l.qOj]}),d})(),_y=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Wi,ah,kn,Wi]}),d})(),Tg=(()=>{class d extends ch{constructor(a,g,_,S){super(S,a,g,_),this.layoutService=a,this.controlClassService=g,this.ngControlService=_,this.ifControlStateService=S,this.multi=!1}ngOnInit(){this.subscriptions.push(this.ngControlService.controlChanges.subscribe(a=>{a&&(this.multi=a.valueAccessor instanceof Y.K7,this.control=a)}))}wrapperClass(){return this.multi?"clr-multiselect-wrapper":"clr-select-wrapper"}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(jr,8),l.Y36(js),l.Y36(Cs),l.Y36(Hs))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-select-container"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Y.K7,5),2&a){let S;l.iGM(S=l.CRH())&&(g.multiple=S.first)}},hostVars:6,hostBindings:function(a,g){2&a&&l.ekj("clr-form-control",!0)("clr-form-control-disabled",null==g.control?null:g.control.disabled)("clr-row",g.addGrid())},features:[l._Bn([Hs,Cs,ys,js]),l.qOj],ngContentSelectors:D0,decls:10,vars:8,consts:[[4,"ngIf"],[1,"clr-control-container",3,"ngClass"],[3,"ngClass"],["class","clr-validate-icon","shape","exclamation-circle","status","danger","aria-hidden","true",4,"ngIf"],["class","clr-validate-icon","shape","check-circle","status","success","aria-hidden","true",4,"ngIf"],["shape","exclamation-circle","status","danger","aria-hidden","true",1,"clr-validate-icon"],["shape","check-circle","status","success","aria-hidden","true",1,"clr-validate-icon"]],template:function(a,g){1&a&&(l.F$t(Tp),l.Hsn(0),l.YNc(1,su,1,0,"label",0),l.TgZ(2,"div",1)(3,"div",2),l.Hsn(4,1),l.YNc(5,qv,1,0,"cds-icon",3),l.YNc(6,Dp,1,0,"cds-icon",4),l.qZA(),l.YNc(7,wp,1,0,"ng-content",0),l.YNc(8,Ep,1,0,"ng-content",0),l.YNc(9,Kv,1,0,"ng-content",0),l.qZA()),2&a&&(l.xp6(1),l.Q6J("ngIf",!g.label&&g.addGrid()),l.xp6(1),l.Q6J("ngClass",g.controlClass()),l.xp6(1),l.Q6J("ngClass",g.wrapperClass()),l.xp6(2),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid),l.xp6(1),l.Q6J("ngIf",g.showHelper),l.xp6(1),l.Q6J("ngIf",g.showInvalid),l.xp6(1),l.Q6J("ngIf",g.showValid))},dependencies:[k.mk,k.O5,Pn,Ir],encapsulation:2}),d})(),yy=(()=>{class d extends So{constructor(a,g,_,S,j){super(a,Tg,g,_,S,j),this.index=1}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b),l.Y36(l.zs3),l.Y36(Y.a5,10),l.Y36(l.Qsj),l.Y36(l.SBq))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrSelect",""]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("clr-select",!0)},features:[l.qOj]}),d})(),Cy=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,Wi,Wi]}),d})(),AD=(()=>{class d{constructor(){Jt.addIcons(ii,Di)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,Wi,Wi]}),d})(),by=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Wi,ey,T1,fy,pg,Dg,ID,Cy,AD,_y,gD]}),d})(),Ig=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})(),V1=(()=>{class d extends If{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275dir=l.lG2({type:d,selectors:[["","cdkDrag",""]],features:[l.qOj]}),d})(),Sy=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({}),d})(),j1=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();class bh{}let Eu=(()=>{class d{constructor(){this.nbChanges=0,this._change=new et.x}get change(){return this._change.asObservable()}changeStart(){this.nbChanges++}changeDone(){0==--this.nbChanges&&this._change.next()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),aa=(()=>{class d{constructor(a){this.stateDebouncer=a,this.activated=!1,this._size=0,this._current=1,this._change=new et.x,this.preventEmit=!1,this._sizeChange=new et.x}get size(){return this._size}set size(a){const g=this._size;a!==g&&(this.preventEmit||this.stateDebouncer.changeStart(),this._size=a,this._current=0===a?1:Math.floor(g/a*(this._current-1))+1,this.preventEmit||(this._change.next(this._current),this._sizeChange.next(this._size),this.stateDebouncer.changeDone())),this.preventEmit=!1}get totalItems(){return this._totalItems||0}set totalItems(a){this._totalItems=a,this.current>this.last&&(this.current=this.last)}get last(){return this._last?this._last:this.size>0&&this.totalItems?Math.ceil(this.totalItems/this.size):1}set last(a){this._last=a}get change(){return this._change.asObservable()}get sizeChange(){return this._sizeChange.asObservable()}get current(){return this._current}set current(a){a!==this._current&&(this.stateDebouncer.changeStart(),this._current=a,this._change.next(a),this.stateDebouncer.changeDone())}get firstItem(){return 0===this._totalItems?-1:0===this.size?0:(this.current-1)*this.size}get lastItem(){if(0===this._totalItems)return-1;if(0===this.size)return this.totalItems-1;let a=this.current*this.size-1;return this.totalItems&&(a=Math.min(a,this.totalItems-1)),a}previous(){this.current>1&&this.current--}next(){this.current{class d{constructor(a,g){this._page=a,this.stateDebouncer=g,this._change=new et.x,this._all=[]}get change(){return this._change.asObservable()}hasActiveFilters(){for(const{filter:a}of this._all)if(a&&a.isActive())return!0;return!1}getActiveFilters(){const a=[];for(const{filter:g}of this._all)g&&g.isActive()&&a.push(g);return a}add(a){const g=a.changes.subscribe(()=>this.resetPageAndEmitFilterChange([a]));let _=!1;const S=new Sh(a,()=>{if(_)return;g.unsubscribe();const j=this._all.findIndex(J=>J.filter===a);j>=0&&this._all.splice(j,1),a.isActive()&&this.resetPageAndEmitFilterChange([]),_=!0});return this._all.push(S),a.isActive()&&this.resetPageAndEmitFilterChange([a]),S}accepts(a){for(const{filter:g}of this._all)if(g&&g.isActive()&&!g.accepts(a))return!1;return!0}resetPageAndEmitFilterChange(a){this.stateDebouncer.changeStart(),this._page.current=1,this._change.next(a),this.stateDebouncer.changeDone()}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(aa),l.LFG(Eu))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();class Sh{constructor(f,a){this.filter=f,this.unregister=a}}let Dh=(()=>{class d{constructor(a){this.filters=a}get filter(){return this.registered&&this.registered.filter}ngOnDestroy(){this.deleteFilter()}setFilter(a){this.deleteFilter(),a instanceof Sh?this.registered=a:a&&(this.registered=this.filters.add(a))}deleteFilter(){this.registered&&(this.registered.unregister(),delete this.registered)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(zo))},d.\u0275dir=l.lG2({type:d}),d})(),Tu=(()=>{class d extends Dh{constructor(a,g,_,S,j){super(a),this.commonStrings=g,this.smartToggleService=_,this.platformId=S,this.elementRef=j,this.openChange=new l.vpe(!1),this.ariaExpanded=!1,this.popoverId=dr(),this.smartPosition={axis:Hr.VERTICAL,side:no.AFTER,anchor:bn.END,content:bn.END},this._open=!1,this.subs=[],this.subs.push(_.openChange.subscribe(J=>{this.open=J,this.ariaExpanded=J}))}get open(){return this._open}set open(a){this.open!==(a=!!a)&&(this.smartToggleService.open=a,this.openChange.emit(a),!a&&(0,k.NF)(this.platformId)&&this.anchor.nativeElement.focus(),this._open=a)}set customFilter(a){this.setFilter(a)}get active(){return!!this.filter&&this.filter.isActive()}ngOnChanges(){this.setToggleButtonAriaLabel()}ngOnDestroy(){super.ngOnDestroy(),this.subs.forEach(a=>a.unsubscribe())}setToggleButtonAriaLabel(){const _=this.elementRef.nativeElement?.closest("clr-dg-column")?.querySelector(".datagrid-column-title")?.textContent.trim().toLocaleLowerCase();this.toggleButtonAriaLabel=this.commonStrings.parse(this.commonStrings.keys.datagridFilterAriaLabel,{COLUMN:_||""})}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(zo),l.Y36(pn),l.Y36(mi),l.Y36(l.Lbi),l.Y36(l.SBq))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-filter"]],viewQuery:function(a,g){if(1&a&&l.Gf(Jv,5,l.SBq),2&a){let _;l.iGM(_=l.CRH())&&(g.anchor=_.first)}},inputs:{open:["clrDgFilterOpen","open"],customFilter:["clrDgFilter","customFilter"]},outputs:{openChange:"clrDgFilterOpenChange"},features:[l._Bn([{provide:bh,useExisting:d}]),l.qOj,l.TTD],ngContentSelectors:jt,decls:4,vars:13,consts:[["type","button","clrPopoverAnchor","","clrPopoverOpenCloseButton","",1,"datagrid-filter-toggle"],["anchor",""],["solid",""],["class","datagrid-filter","cdkTrapFocus","","role","dialog",3,"id",4,"clrPopoverContent","clrPopoverContentAt","clrPopoverContentOutsideClickToClose","clrPopoverContentScrollToClose"],["cdkTrapFocus","","role","dialog",1,"datagrid-filter",3,"id"],[1,"datagrid-filter-close-wrapper"],["type","button","clrPopoverCloseButton","",1,"close"],["shape","window-close"]],template:function(a,g){1&a&&(l.F$t(),l.TgZ(0,"button",0,1),l._UZ(2,"cds-icon",2),l.qZA(),l.YNc(3,T0,5,3,"div",3)),2&a&&(l.ekj("datagrid-filter-open",g.open)("datagrid-filtered",g.active),l.uIk("aria-label",g.toggleButtonAriaLabel)("aria-expanded",g.ariaExpanded)("aria-controls",g.popoverId),l.xp6(2),l.uIk("status",g.active?"info":null)("shape",g.active?"filter-grid-circle":"filter-grid"),l.xp6(1),l.Q6J("clrPopoverContent",g.open)("clrPopoverContentAt",g.smartPosition)("clrPopoverContentOutsideClickToClose",!0)("clrPopoverContentScrollToClose",!0))},dependencies:[uc,Pn,pu,sg,gu,ms],encapsulation:2}),d})();class Ag{constructor(f){this.prop=f,f.indexOf(".")>=0&&(this.splitProp=f.split("."))}getPropValue(f){if(this.splitProp){let a=f;for(const g of this.splitProp){if(null===a||typeof a>"u"||typeof a[g]>"u")return;a=a[g]}return a}return f[this.prop]}}class wh{constructor(f,a=!1){this.prop=f,this.exact=a,this.nestedProp=new Ag(f)}accepts(f,a,g){const _=this.nestedProp.getPropValue(f);return!(void 0===_||null!==a&&("number"!=typeof _||_g))}}class il{constructor(f){this.filterFn=f,this._changes=new et.x,this._low=null,this._high=null}get changes(){return this._changes.asObservable()}get value(){return[this._low,this._high]}set value(f){const a=f[0],g=f[1];(a!==this._low||g!==this._high)&&(this._low=a,this._high=g,this._changes.next([this._low,this._high]))}get low(){return this._low}set low(f){f!==this._low&&(this._low=f,this._changes.next([this._low,this._high]))}get high(){return this._high}set high(f){f!==this._high&&(this._high=f,this._changes.next([this._low,this._high]))}get state(){return this.filterFn instanceof wh?{property:this.filterFn.prop,low:this._low,high:this._high}:this}isActive(){return null!==this._low||null!==this.high}accepts(f){return this.filterFn.accepts(f,this._low,this._high)}equals(f){return f instanceof il&&(f.filterFn instanceof wh?this.filterFn instanceof wh&&f.filterFn.prop===this.filterFn.prop&&f.low===this._low&&f.high===this._high:f===this)}}let Dy=(()=>{class d extends Dh{constructor(a,g,_,S,j){super(a),this.domAdapter=g,this.commonStrings=_,this.popoverToggleService=S,this.ngZone=j,this.filterValueChange=new l.vpe,this.open=!1,this.subscriptions=[]}get value(){return[this.filter.low,this.filter.high]}set value(a){this.filter&&Array.isArray(a)?a&&(a[0]!==this.filter.low||a[1]!==this.filter.high)&&(this.filter.low="number"==typeof a[0]?a[0]:null,this.filter.high="number"==typeof a[1]?a[1]:null,this.filterValueChange.emit(a)):this.initFilterValues=a}set customNumericFilter(a){this.setFilter(a instanceof Sh?a:new il(a)),this.initFilterValues&&(this.value=this.initFilterValues,delete this.initFilterValues)}get maxPlaceholderValue(){return this.maxPlaceholder||this.commonStrings.keys.maxValue}get minPlaceholderValue(){return this.minPlaceholder||this.commonStrings.keys.minValue}get low(){return"number"==typeof this.filter.low&&isFinite(this.filter.low)?this.filter.low:null}set low(a){"number"==typeof a&&a!==this.filter.low?(this.filter.low=a,this.filterValueChange.emit([this.filter.low,this.filter.high])):"number"!=typeof a&&(this.filter.low=null,this.filterValueChange.emit([this.filter.low,this.filter.high]))}get high(){return"number"==typeof this.filter.high&&isFinite(this.filter.high)?this.filter.high:null}set high(a){"number"==typeof a&&a!==this.filter.high?(this.filter.high=a,this.filterValueChange.emit([this.filter.low,this.filter.high])):"number"!=typeof a&&(this.filter.high=null,this.filterValueChange.emit([this.filter.low,this.filter.high]))}ngAfterViewInit(){this.subscriptions.push(this.popoverToggleService.openChange.subscribe(a=>{this.open=a,this.ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this.domAdapter.focus(this.input.nativeElement)})})}))}ngOnDestroy(){super.ngOnDestroy(),this.subscriptions.forEach(a=>{a.unsubscribe()})}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(zo),l.Y36(jo),l.Y36(pn),l.Y36(mi),l.Y36(l.R0b))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-numeric-filter"]],viewQuery:function(a,g){if(1&a&&(l.Gf(I0,5),l.Gf(Tu,5)),2&a){let _;l.iGM(_=l.CRH())&&(g.input=_.first),l.iGM(_=l.CRH())&&(g.filterContainer=_.first)}},inputs:{minPlaceholder:["clrFilterMinPlaceholder","minPlaceholder"],maxPlaceholder:["clrFilterMaxPlaceholder","maxPlaceholder"],value:["clrFilterValue","value"],customNumericFilter:["clrDgNumericFilter","customNumericFilter"]},outputs:{filterValueChange:"clrFilterValueChange"},features:[l._Bn([{provide:bh,useExisting:d}]),l.qOj],decls:6,vars:8,consts:[[3,"clrDgFilter","clrDgFilterOpen","clrDgFilterOpenChange"],["type","number","autocomplete","off","name","low",1,"datagrid-numeric-filter-input",3,"ngModel","placeholder","ngModelChange"],["input_low",""],[1,"datagrid-filter-input-spacer"],["type","number","autocomplete","off","name","high",1,"datagrid-numeric-filter-input",3,"ngModel","placeholder","ngModelChange"],["input_high",""]],template:function(a,g){1&a&&(l.TgZ(0,"clr-dg-filter",0),l.NdJ("clrDgFilterOpenChange",function(S){return g.open=S}),l.TgZ(1,"input",1,2),l.NdJ("ngModelChange",function(S){return g.low=S}),l.qZA(),l._UZ(3,"span",3),l.TgZ(4,"input",4,5),l.NdJ("ngModelChange",function(S){return g.high=S}),l.qZA()()),2&a&&(l.Q6J("clrDgFilter",g.registered)("clrDgFilterOpen",g.open),l.xp6(1),l.Q6J("ngModel",g.low)("placeholder",g.minPlaceholderValue),l.uIk("aria-label",g.minPlaceholderValue),l.xp6(3),l.Q6J("ngModel",g.high)("placeholder",g.maxPlaceholderValue),l.uIk("aria-label",g.maxPlaceholderValue))},dependencies:[Y.Fj,Y.wV,Y.JJ,Y.On,Tu],encapsulation:2}),d})();class Eh{constructor(f,a=!1){this.prop=f,this.exact=a,this.nestedProp=new Ag(f)}accepts(f,a){const g=this.nestedProp.getPropValue(f);return!(typeof g>"u")&&(this.exact?(""+g).toLowerCase()===a:(""+g).toLowerCase().indexOf(a)>=0)}}class wo{constructor(f){this.filterFn=f,this._changes=new et.x,this._lowerCaseValue="",this._rawValue=""}get changes(){return this._changes.asObservable()}get lowerCaseValue(){return this._lowerCaseValue}get state(){return this.filterFn instanceof Eh?{property:this.filterFn.prop,value:this.value}:this}get value(){return this._rawValue}set value(f){f||(f=""),f!==this._rawValue&&(this._rawValue=f,this._lowerCaseValue=f.toLowerCase().trim(),this._changes.next(f))}isActive(){return!!this.value}accepts(f){return this.filterFn.accepts(f,this.lowerCaseValue)}equals(f){return f instanceof wo&&(f.filterFn instanceof Eh?this.filterFn instanceof Eh&&f.filterFn.prop===this.filterFn.prop&&f.value===this.value:f===this)}}let Mg=(()=>{class d extends Dh{constructor(a,g,_,S,j){super(a),this.domAdapter=g,this.commonStrings=_,this.smartToggleService=S,this.ngZone=j,this.filterValueChange=new l.vpe,this.open=!1,this.subs=[]}set customStringFilter(a){this.setFilter(a instanceof Sh?a:new wo(a)),this.initFilterValue&&(this.value=this.initFilterValue,delete this.initFilterValue)}get value(){return this.filter.value}set value(a){this.filter&&"string"==typeof a?(a||(a=""),a!==this.filter.value&&(this.filter.value=a,this.filterValueChange.emit(a))):this.initFilterValue=a}get placeholderValue(){return this.placeholder||this.commonStrings.keys.filterItems}ngAfterViewInit(){this.subs.push(this.smartToggleService.openChange.subscribe(a=>{this.open=a,this.ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this.domAdapter.focus(this.input.nativeElement)})})}))}ngOnDestroy(){super.ngOnDestroy(),this.subs.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(zo),l.Y36(jo),l.Y36(pn),l.Y36(mi),l.Y36(l.R0b))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-string-filter"]],viewQuery:function(a,g){if(1&a&&(l.Gf(Ns,5),l.Gf(Tu,5)),2&a){let _;l.iGM(_=l.CRH())&&(g.input=_.first),l.iGM(_=l.CRH())&&(g.filterContainer=_.first)}},inputs:{placeholder:["clrFilterPlaceholder","placeholder"],customStringFilter:["clrDgStringFilter","customStringFilter"],value:["clrFilterValue","value"]},outputs:{filterValueChange:"clrFilterValueChange"},features:[l._Bn([{provide:bh,useExisting:d}]),l.qOj],decls:3,vars:5,consts:[[3,"clrDgFilter","clrDgFilterOpen","clrDgFilterOpenChange"],["type","text","autocomplete","off","name","search",1,"clr-input",3,"ngModel","placeholder","ngModelChange"],["input",""]],template:function(a,g){1&a&&(l.TgZ(0,"clr-dg-filter",0),l.NdJ("clrDgFilterOpenChange",function(S){return g.open=S}),l.TgZ(1,"input",1,2),l.NdJ("ngModelChange",function(S){return g.value=S}),l.qZA()()),2&a&&(l.Q6J("clrDgFilter",g.registered)("clrDgFilterOpen",g.open),l.xp6(1),l.Q6J("ngModel",g.value)("placeholder",g.placeholderValue),l.uIk("aria-label",g.placeholderValue))},dependencies:[Y.Fj,Y.JJ,Y.On,Tu],encapsulation:2}),d})(),Iu=(()=>{class d extends Za{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275dir=l.lG2({type:d,selectors:[["clr-datagrid"]],features:[l.qOj]}),d})(),rl=(()=>{class d{constructor(){this.actionableCount=0}get hasActionableRow(){return this.actionableCount>0}register(){this.actionableCount++}unregister(){this.actionableCount--}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),xg=(()=>{class d extends Qa{constructor(a,g,_){if(!g)throw new Error("clr-dg-row should only be used inside of a clr-datagrid");super(a,g),this.rowActions=_}get flavor(){return this.rowActions.hasActionableRow}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.sBO),l.Y36(Iu,8),l.Y36(rl))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-datagrid"],["clr-dg-row"]],features:[l.qOj]}),d})(),Og=(()=>{class d{constructor(a){this.platformId=a,this.modalStack=[],this.keyUpEventListener=this.onKeyUp.bind(this)}trackModalOpen(a){!1===this.modalStack.includes(a)&&this.modalStack.unshift(a),(0,k.NF)(this.platformId)&&document.body.addEventListener("keyup",this.keyUpEventListener)}trackModalClose(a){const g=this.modalStack.indexOf(a);g>-1&&this.modalStack.splice(g,1),0===this.modalStack.length&&(0,k.NF)(this.platformId)&&document.body.removeEventListener("keyup",this.keyUpEventListener)}onKeyUp(a){this.modalStack.length&&Fs(a.key)===At.Escape&&this.modalStack[0].close()}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.Lbi))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"}),d})(),io=(()=>{class d{constructor(a){this.modalStackService=a,this.toggleState=!1,this._enabled=!1,this._state=new fn.X(this.toggleState)}get enabled(){return this._enabled}set enabled(a){this._enabled=a}get state(){return this.cache}get stateChange(){return this._state.asObservable()}get isOpen(){return!0===this.toggleState}open(a,g){this.cache=a,this.button=g,this.toggleState=!0,this._state.next(this.toggleState),this.modalStackService.trackModalOpen(this)}close(){this.toggleState=!1,this._state.next(this.toggleState),this.modalStackService.trackModalClose(this),this.button&&(this.button.focus(),this.button=null)}toggle(a,g){this.isRowOpen(a)||!a?this.close():this.open(a,g)}isRowOpen(a){return!(!this.toggleState||this.cache!==a)}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(Og))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),pc=(()=>{class d{constructor(a){this.detailService=a,this.expandableCount=0}get hasExpandableRow(){return!this.detailService.enabled&&this.expandableCount>0}register(){this.expandableCount++}unregister(){this.expandableCount--}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(io))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),MD=(()=>{class d extends Qa{constructor(a,g,_){if(!g)throw new Error("clr-dg-row should only be used inside of a clr-datagrid");super(a,g),this.expandableCount=_}get flavor(){return this.expandableCount.hasExpandableRow}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.sBO),l.Y36(Iu,8),l.Y36(pc))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-datagrid"],["clr-dg-row"]],features:[l.qOj]}),d})();class Rg{constructor(f){this.prop=f,this.nestedProp=new Ag(f)}compare(f,a){let g=this.nestedProp.getPropValue(f),_=this.nestedProp.getPropValue(a);return"string"==typeof g&&(g=g.toLowerCase()),"string"==typeof _&&(_=_.toLowerCase()),typeof g>"u"||null===g?typeof _>"u"||null===_?0:1:typeof _>"u"||null===_||g<_?-1:g>_?1:0}}var bs=function(d){return d[d.UNSORTED=0]="UNSORTED",d[d.ASC=1]="ASC",d[d.DESC=-1]="DESC",d}(bs||{});let Th=(()=>{class d{constructor(){this._dynamic=!1}ngAfterViewInit(){this.columnView=this.templateRef.createEmbeddedView(null)}ngOnDestroy(){this.columnView.destroy()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["dg-wrapped-column"]],viewQuery:function(a,g){if(1&a&&l.Gf(A0,5),2&a){let _;l.iGM(_=l.CRH())&&(g.templateRef=_.first)}},ngContentSelectors:jt,decls:2,vars:0,consts:[["columnPortal",""]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,M0,1,0,"ng-template",null,0,l.W1O))},encapsulation:2}),d})(),Ih=(()=>{class d{constructor(a){this.stateDebouncer=a,this._reverse=!1,this._change=new et.x}get comparator(){return this._comparator}set comparator(a){this.stateDebouncer.changeStart(),this._comparator=a,this.emitChange(),this.stateDebouncer.changeDone()}get reverse(){return this._reverse}set reverse(a){this.stateDebouncer.changeStart(),this._reverse=a,this.emitChange(),this.stateDebouncer.changeDone()}get change(){return this._change.asObservable()}toggle(a,g){this.stateDebouncer.changeStart(),this.comparator===a?this._reverse=typeof g<"u"&&g||!this._reverse:(this._comparator=a,this._reverse=typeof g<"u"&&g),this.emitChange(),this.stateDebouncer.changeDone()}clear(){this.comparator=null}compare(a,g){return(this.reverse?-1:1)*this.comparator.compare(a,g)}emitChange(){this._change.next(this)}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(Eu))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();var Eo=function(d){return d[d.ALIGN_COLUMNS=0]="ALIGN_COLUMNS",d[d.CALCULATE_MODE_ON=1]="CALCULATE_MODE_ON",d[d.CALCULATE_MODE_OFF=2]="CALCULATE_MODE_OFF",d[d.CLEAR_WIDTHS=3]="CLEAR_WIDTHS",d[d.COMPUTE_COLUMN_WIDTHS=4]="COMPUTE_COLUMN_WIDTHS",d}(Eo||{});let sl=(()=>{class d{constructor(){this._renderStep=new et.x,this.alreadySized=!1}get renderStep(){return this._renderStep.asObservable()}filterRenderSteps(a){return this.renderStep.pipe((0,Ln.h)(g=>a===g))}resize(){this._renderStep.next(Eo.CALCULATE_MODE_ON),this.alreadySized&&this._renderStep.next(Eo.CLEAR_WIDTHS),this._renderStep.next(Eo.COMPUTE_COLUMN_WIDTHS),this._renderStep.next(Eo.ALIGN_COLUMNS),this.alreadySized=!0,this._renderStep.next(Eo.CALCULATE_MODE_OFF)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Pg=(()=>{class d{constructor(a,g,_){this.el=a,this.domAdapter=g,this.organizer=_,this._resizedBy=0}get resizedBy(){return this._resizedBy}get minColumnWidth(){return this.domAdapter.minWidth(this.el.nativeElement)||96}get maxResizeRange(){return this.widthBeforeResize-this.minColumnWidth}get widthAfterResize(){return this.widthBeforeResize+this._resizedBy}startResize(){this._resizedBy=0,this.isWithinMaxResizeRange=!0,this.widthBeforeResize=this.domAdapter.clientRect(this.el.nativeElement).width}endResize(){this.organizer.resize()}calculateResize(a){a<-this.maxResizeRange?(this._resizedBy=-this.maxResizeRange,this.isWithinMaxResizeRange=!1):(this._resizedBy=a,this.isWithinMaxResizeRange=!0)}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.SBq),l.LFG(jo),l.LFG(sl))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Mu=(()=>{class d{constructor(a){this.platformId=a}get tableRef(){return this._tableRef}set tableRef(a){this._tableRef=a}set table(a){(0,k.NF)(this.platformId)&&a.nativeElement&&(this.tableRef=a.nativeElement.querySelector(".datagrid-table"))}getColumnDragHeight(){return this.tableRef?`${this.tableRef.clientHeight}px`:null}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.Lbi))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),xD=(()=>{class d{constructor(a,g,_,S,j,J){this.columnResizerService=a,this.renderer=g,this.ngZone=_,this.tableSizeService=S,this.commonString=j,this.document=J,this.columnSeparatorId=dr(),this.resizeStartedOnKeyDown=!1,this.unlisteners=[]}get descriptionId(){return`${this.columnSeparatorId}-aria-describedby`}get resizeTrackerEl(){return this.resizeTrackerRef.nativeElement}get columnHandleEl(){return this.columnHandleRef.nativeElement}ngAfterViewInit(){this.ngZone.runOutsideAngular(()=>{this.unlisteners.push(this.renderer.listen(this.columnHandleEl,"keydown",a=>{this.showTrackerOnFirstKeyDown(a),this.moveTrackerOnKeyDown(a)})),this.unlisteners.push(this.renderer.listen(this.columnHandleEl,"keyup",a=>{this.hideTrackerOnKeyUp(a)}))})}ngOnDestroy(){this.unlisteners.forEach(a=>a())}showTracker(){this.columnResizerService.startResize();const a=this.tableSizeService.getColumnDragHeight();this.renderer.setStyle(this.resizeTrackerEl,"height",a),this.renderer.setStyle(this.resizeTrackerEl,"display","block")}moveTracker(a){this.columnResizerService.calculateResize(a),this.renderer.setStyle(this.resizeTrackerEl,"transform",`translateX(${this.columnResizerService.resizedBy}px)`),this.renderer.setStyle(this.document.body,"cursor","col-resize"),this.redFlagTracker()}hideTracker(){this.columnResizerService.endResize(),this.renderer.setStyle(this.resizeTrackerEl,"display","none"),this.renderer.setStyle(this.resizeTrackerEl,"transform","translateX(0px)"),this.renderer.setStyle(this.columnHandleEl,"transform","translateX(0px)"),this.renderer.setStyle(this.document.body,"cursor","auto")}showTrackerOnFirstKeyDown(a){!this.resizeStartedOnKeyDown&&(this.isArrowLeftKeyEvent(a)||this.isArrowRightKeyEvent(a))&&(this.resizeStartedOnKeyDown=!0,this.renderer.addClass(this.resizeTrackerEl,"on-arrow-key-resize"),this.showTracker())}moveTrackerOnKeyDown(a){this.isArrowLeftKeyEvent(a)?(a.stopPropagation(),this.moveTracker(this.columnResizerService.resizedBy-12)):this.isArrowRightKeyEvent(a)&&(a.stopPropagation(),this.moveTracker(this.columnResizerService.resizedBy+12))}hideTrackerOnKeyUp(a){this.resizeStartedOnKeyDown&&(this.isArrowLeftKeyEvent(a)||this.isArrowRightKeyEvent(a))&&(this.resizeStartedOnKeyDown=!1,this.renderer.removeClass(this.resizeTrackerEl,"on-arrow-key-resize"),this.hideTracker(),this.columnHandleEl.focus())}redFlagTracker(){this.isWithinMaxResizeRange!==this.columnResizerService.isWithinMaxResizeRange&&(this.isWithinMaxResizeRange=this.columnResizerService.isWithinMaxResizeRange,this.isWithinMaxResizeRange?this.renderer.removeClass(this.resizeTrackerEl,"exceeded-max"):this.renderer.addClass(this.resizeTrackerEl,"exceeded-max"))}isArrowLeftKeyEvent(a){return Fs(a.key)===At.ArrowLeft}isArrowRightKeyEvent(a){return Fs(a.key)===At.ArrowRight}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Pg),l.Y36(l.Qsj),l.Y36(l.R0b),l.Y36(Mu),l.Y36(pn),l.Y36(k.K0))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-column-separator"]],viewQuery:function(a,g){if(1&a&&(l.Gf(WE,5),l.Gf(Ip,5)),2&a){let _;l.iGM(_=l.CRH())&&(g.resizeTrackerRef=_.first),l.iGM(_=l.CRH())&&(g.columnHandleRef=_.first)}},hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("datagrid-column-separator",!0)},decls:6,vars:4,consts:[["type","button","cdkDrag","","cdkDragLockAxis","x",1,"datagrid-column-handle",3,"cdkDragStarted","cdkDragMoved","cdkDragEnded"],["columnHandle",""],[1,"clr-sr-only"],[1,"datagrid-column-resize-tracker"],["resizeTracker",""]],template:function(a,g){1&a&&(l.TgZ(0,"button",0,1),l.NdJ("cdkDragStarted",function(){return g.showTracker()})("cdkDragMoved",function(S){return g.moveTracker(S.distance.x)})("cdkDragEnded",function(S){return g.hideTracker(),S.source._dragRef.reset()}),l.qZA(),l.TgZ(2,"span",2),l._uU(3),l.qZA(),l._UZ(4,"div",3,4)),2&a&&(l.uIk("aria-label",g.commonString.keys.columnSeparatorAriaLabel)("aria-describedby",g.descriptionId),l.xp6(2),l.uIk("id",g.descriptionId),l.xp6(1),l.hij(" ",g.commonString.keys.columnSeparatorDescription," "))},dependencies:[V1],encapsulation:2}),d})(),kg=(()=>{class d extends Dh{constructor(a,g,_,S,j){super(g),this._sort=a,this.vcr=_,this.detailService=S,this.changeDetectorRef=j,this.sortOrderChange=new l.vpe,this.filterValueChange=new l.vpe,this.showSeparator=!0,this.customFilter=!1,this._colType="string",this._sortOrder=bs.UNSORTED,this.subscriptions=[],this.subscriptions.push(this.listenForSortingChanges()),this.subscriptions.push(this.listenForDetailPaneChanges())}get colType(){return this._colType}set colType(a){this._colType=a}get field(){return this._field}set field(a){"string"==typeof a&&(this._field=a,this._sortBy||(this._sortBy=new Rg(a)))}get sortBy(){return this._sortBy}set sortBy(a){"string"==typeof a?this._sortBy=new Rg(a):a?this._sortBy=a:this.field?this._sortBy=new Rg(this.field):delete this._sortBy}get sortOrder(){return this._sortOrder}set sortOrder(a){if(!(typeof a>"u")&&this._sortOrder!==a)switch(a){default:case bs.UNSORTED:this._sort.clear();break;case bs.ASC:this.sort(!1);break;case bs.DESC:this.sort(!0)}}set updateFilterValue(a){this.filter?this.filter instanceof wo?((!a||"string"!=typeof a)&&(a=""),a!==this.filter.value&&(this.filter.value=a)):this.filter instanceof il&&((!a||!(a instanceof Array))&&(a=[null,null]),2===a.length&&(a[0]!==this.filter.value[0]||a[1]!==this.filter.value[1])&&(this.filter.value=a)):this.initFilterValue=a}set projectedFilter(a){a&&(this.deleteFilter(),this.customFilter=!0)}get sortable(){return!!this._sortBy}get ariaSort(){switch(this._sortOrder){default:case bs.UNSORTED:return"none";case bs.ASC:return"ascending";case bs.DESC:return"descending"}}get sortDirection(){return this._sortDirection}get filterValue(){return this.filter instanceof wo||this.filter instanceof il?this.filter.value:null}set filterValue(a){(this.filter instanceof wo||this.filter instanceof il)&&(this.updateFilterValue=a,this.filterValueChange.emit(this.filter.value))}get _view(){return this.wrappedInjector.get(Th,this.vcr).columnView}ngOnInit(){this.wrappedInjector=new _u(Th,this.vcr)}ngOnChanges(a){a.colType&&a.colType.currentValue&&a.colType.currentValue!==a.colType.previousValue&&!this.customFilter&&!this.filter&&this.colType&&this.field&&this.setupDefaultFilter(this.field,this.colType),a.field&&a.field.currentValue&&a.field.currentValue!==a.field.previousValue&&!this.customFilter&&this.colType&&this.setupDefaultFilter(this.field,this.colType)}ngOnDestroy(){super.ngOnDestroy(),this.subscriptions.forEach(a=>a.unsubscribe())}sort(a){this.sortable&&(this._sort.toggle(this._sortBy,a),this._sortOrder=this._sort.reverse?bs.DESC:bs.ASC,this._sortDirection=this._sortOrder===bs.DESC?"down":"up",this.sortOrderChange.emit(this._sortOrder))}listenForDetailPaneChanges(){return this.detailService.stateChange.subscribe(a=>{this.showSeparator!==!a&&(this.showSeparator=!a,this.changeDetectorRef.markForCheck())})}listenForSortingChanges(){return this._sort.change.subscribe(a=>{this.changeDetectorRef.markForCheck(),this.sortOrder!==bs.UNSORTED&&a.comparator!==this._sortBy&&(this._sortOrder=bs.UNSORTED,this.sortOrderChange.emit(this._sortOrder),this._sortDirection=null)})}setupDefaultFilter(a,g){"number"===g?this.setFilter(new il(new wh(a))):"string"===g&&this.setFilter(new wo(new Eh(a))),this.filter&&this.initFilterValue&&(this.updateFilterValue=this.initFilterValue,delete this.initFilterValue)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Ih),l.Y36(zo),l.Y36(l.s_b),l.Y36(io),l.Y36(l.sBO))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-column"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,bh,5),2&a){let S;l.iGM(S=l.CRH())&&(g.projectedFilter=S.first)}},hostAttrs:["role","columnheader"],hostVars:3,hostBindings:function(a,g){2&a&&(l.uIk("aria-sort",g.ariaSort),l.ekj("datagrid-column",!0))},inputs:{filterStringPlaceholder:["clrFilterStringPlaceholder","filterStringPlaceholder"],filterNumberMaxPlaceholder:["clrFilterNumberMaxPlaceholder","filterNumberMaxPlaceholder"],filterNumberMinPlaceholder:["clrFilterNumberMinPlaceholder","filterNumberMinPlaceholder"],colType:["clrDgColType","colType"],field:["clrDgField","field"],sortBy:["clrDgSortBy","sortBy"],sortOrder:["clrDgSortOrder","sortOrder"],updateFilterValue:["clrFilterValue","updateFilterValue"]},outputs:{sortOrderChange:"clrDgSortOrderChange",filterValueChange:"clrFilterValueChange"},features:[l.qOj,l.TTD,l.zW0([ia])],ngContentSelectors:L0,decls:9,vars:5,consts:[[1,"datagrid-column-flex"],["class","datagrid-column-title","type","button",3,"click",4,"ngIf"],[3,"clrFilterPlaceholder","clrDgStringFilter","clrFilterValue","clrFilterValueChange",4,"ngIf"],[3,"clrFilterMaxPlaceholder","clrFilterMinPlaceholder","clrDgNumericFilter","clrFilterValue","clrFilterValueChange",4,"ngIf"],["columnTitle",""],["class","datagrid-column-title",4,"ngIf"],[4,"ngIf"],["type","button",1,"datagrid-column-title",3,"click"],[4,"ngTemplateOutlet"],["shape","arrow","aria-hidden","true","class","sort-icon",4,"ngIf"],["shape","arrow","aria-hidden","true",1,"sort-icon"],[3,"clrFilterPlaceholder","clrDgStringFilter","clrFilterValue","clrFilterValueChange"],[3,"clrFilterMaxPlaceholder","clrFilterMinPlaceholder","clrDgNumericFilter","clrFilterValue","clrFilterValueChange"],[1,"datagrid-column-title"]],template:function(a,g){1&a&&(l.F$t(F0),l.TgZ(0,"div",0),l.YNc(1,O0,3,2,"button",1),l.Hsn(2),l.YNc(3,R0,1,3,"clr-dg-string-filter",2),l.YNc(4,e_,1,4,"clr-dg-numeric-filter",3),l.YNc(5,P0,1,0,"ng-template",null,4,l.W1O),l.YNc(7,Ap,2,1,"span",5),l.YNc(8,N0,1,0,"clr-dg-column-separator",6),l.qZA()),2&a&&(l.xp6(1),l.Q6J("ngIf",g.sortable),l.xp6(2),l.Q6J("ngIf",g.field&&!g.customFilter&&"string"==g.colType),l.xp6(1),l.Q6J("ngIf",g.field&&!g.customFilter&&"number"==g.colType),l.xp6(3),l.Q6J("ngIf",!g.sortable),l.xp6(1),l.Q6J("ngIf",g.showSeparator))},dependencies:[k.O5,k.tP,Pn,xD,Dy,Mg],encapsulation:2,changeDetection:0}),d})(),ol=(()=>{class d{constructor(a,g,_){this._filters=a,this._sort=g,this._page=_,this.loading=!1,this._smart=!1,this._displayed=[],this._change=new et.x,this._allChanges=new et.x,this.iteratorTrackBy=(S,j)=>j}get smart(){return this._smart}get all(){return this._all}set all(a){this._all=a,this.emitAllChanges(a),this.smart?this._filterItems():(this._displayed=a,this.emitChange())}get displayed(){return this._displayed}get change(){return this._change.asObservable()}get allChanges(){return this._allChanges.asObservable()}get uninitialized(){return!this._all}destroy(){this._filtersSub&&this._filtersSub.unsubscribe(),this._sortSub&&this._sortSub.unsubscribe(),this._pageSub&&this._pageSub.unsubscribe()}smartenUp(){this._smart=!0,this._filtersSub=this._filters.change.subscribe(()=>this._filterItems()),this._sortSub=this._sort.change.subscribe(()=>{this._sort.comparator?this._sortItems():this._filterItems()}),this._pageSub=this._page.change.subscribe(()=>this._changePage())}refresh(){this.smart&&this._filterItems()}canTrackBy(){return!!this.datagridTrackBy||Array.isArray(this.all)}trackBy(a,g){if(this.datagridTrackBy)return this.datagridTrackBy(a);if(Array.isArray(this.all))return g=g??this.all.indexOf(a),this.iteratorTrackBy(g,a);throw new Error("improper call to Items#trackBy")}emitChange(){this._change.next(this.displayed)}emitAllChanges(a){this._allChanges.next(a)}_filterItems(){this.uninitialized||(this._filtered=this._filters.hasActiveFilters()?this._all.filter(a=>this._filters.accepts(a)):this._all.slice(),this._page.totalItems=this._filtered.length,this._sortItems())}_sortItems(){this.uninitialized||(this._sort.comparator&&this._filtered.sort((a,g)=>this._sort.compare(a,g)),this._changePage())}_changePage(){this.uninitialized||this._page.activated&&0===this._page.size||(this._displayed=this._page.size>0?this._filtered.slice(this._page.firstItem,this._page.lastItem+1):this._filtered,this.emitChange())}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(zo),l.LFG(Ih),l.LFG(aa))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),gc=(()=>{class d{constructor(a,g,_,S){this.template=a,this.differs=g,this.items=_,this.vcr=S,this.differ=null,this.subscriptions=[],_.smartenUp(),this.iterableProxy=new k.sg(this.vcr,this.template,this.differs),this.subscriptions.push(_.change.subscribe(j=>{this.iterableProxy.ngForOf=j,this.iterableProxy.ngDoCheck()}))}set rawItems(a){this._rawItems=a||[]}set trackBy(a){this.items.iteratorTrackBy=a,this.iterableProxy.ngForTrackBy=a}static ngTemplateContextGuard(a,g){return!0}ngDoCheck(){this.differ||(this.differ=this.differs.find(this._rawItems).create(this.iterableProxy.ngForTrackBy)),this.differ&&this.differ.diff(this._rawItems)&&(this.items.all=this._rawItems)}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.Rgc),l.Y36(l.ZZ4),l.Y36(ol),l.Y36(l.s_b))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrDgItems","","clrDgItemsOf",""]],inputs:{rawItems:["clrDgItemsOf","rawItems"],trackBy:["clrDgItemsTrackBy","trackBy"]}}),d})(),Ng=(()=>{class d{constructor(a){this.items=a}get emptyDatagrid(){return!(this.items.loading||this.items.displayed&&0!==this.items.displayed.length)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ol))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-placeholder"]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("datagrid-placeholder-container",!0)},ngContentSelectors:jt,decls:4,vars:4,consts:[["role","row",1,"datagrid-placeholder"],["class","datagrid-placeholder-image",4,"ngIf"],["role","gridcell",1,"datagrid-placeholder-content"],[4,"ngIf"],[1,"datagrid-placeholder-image"]],template:function(a,g){1&a&&(l.F$t(),l.TgZ(0,"div",0),l.YNc(1,V0,1,0,"div",1),l.TgZ(2,"span",2),l.YNc(3,B0,1,0,"ng-content",3),l.qZA()()),2&a&&(l.ekj("datagrid-empty",g.emptyDatagrid),l.xp6(1),l.Q6J("ngIf",g.emptyDatagrid),l.xp6(2),l.Q6J("ngIf",g.emptyDatagrid))},dependencies:[k.O5],encapsulation:2}),d})(),Fg=(()=>{class d{set triggerEl(a){this._triggerEl=a}focusTrigger(){this._triggerEl&&this._triggerEl.focus()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Lg=(()=>{class d{constructor(){this._id=new et.x}get id(){return this._id.asObservable()}setId(a){this._id.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),mc=(()=>{class d{constructor(a,g,_,S,j,J,te){this.toggleService=a,this.el=g,this.commonStrings=_,this.signpostIdService=S,this.signpostFocusManager=j,this.platformId=te,this.subscriptions=[],this.document=J}ngOnInit(){this.signpostFocusManager.triggerEl=this.el.nativeElement,this.subscriptions.push(this.toggleService.openChange.subscribe(a=>{this.ariaExpanded=a;const g=this.isOpen;this.isOpen=a,!this.isOpen&&g&&this.focusOnClose()}),this.signpostIdService.id.subscribe(a=>this.ariaControl=a)),this.addDefaultAriaLabel(this.el.nativeElement)}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}onSignpostTriggerClick(a){this.toggleService.toggleWithEvent(a)}addDefaultAriaLabel(a){a.hasAttribute("aria-label")||a.setAttribute("aria-label",this.commonStrings.keys.signpostToggle)}focusOnClose(){(0,k.NF)(this.platformId)&&!this.isOpen&&this.document.activeElement===this.document.body&&this.signpostFocusManager.focusTrigger()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(mi),l.Y36(l.SBq),l.Y36(pn),l.Y36(Lg),l.Y36(Fg),l.Y36(k.K0),l.Y36(l.Lbi))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrSignpostTrigger",""]],hostAttrs:[1,"signpost-trigger"],hostVars:4,hostBindings:function(a,g){1&a&&l.NdJ("click",function(S){return g.onSignpostTriggerClick(S)}),2&a&&(l.uIk("aria-expanded",g.ariaExpanded)("aria-controls",g.ariaControl),l.ekj("active",g.isOpen))}}),d})(),Ah=(()=>{class d{constructor(a){this.commonStrings=a,this.useCustomTrigger=!1}set customTrigger(a){this.useCustomTrigger=!!a}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(pn))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-signpost"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,mc,5),2&a){let S;l.iGM(S=l.CRH())&&(g.customTrigger=S.first)}},hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("signpost",!0)},features:[l._Bn([Fg,Lg]),l.zW0([ia])],ngContentSelectors:jt,decls:2,vars:1,consts:[[4,"ngIf"],["type","button","clrSignpostTrigger","",1,"signpost-action","btn","btn-small","btn-icon","btn-link"],["shape","info-circle"]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,Bo,3,1,"ng-container",0),l.Hsn(1)),2&a&&l.Q6J("ngIf",!g.useCustomTrigger)},dependencies:[k.O5,Pn,mc],encapsulation:2}),d})(),Vg=(()=>{class d{constructor(){this._dynamic=!1}ngAfterViewInit(){this.cellView=this.templateRef.createEmbeddedView(null)}ngOnDestroy(){this.cellView.destroy()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["dg-wrapped-cell"]],viewQuery:function(a,g){if(1&a&&l.Gf(Mp,5),2&a){let _;l.iGM(_=l.CRH())&&(g.templateRef=_.first)}},ngContentSelectors:jt,decls:2,vars:0,consts:[["cellPortal",""]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,H0,1,0,"ng-template",null,0,l.W1O))},encapsulation:2}),d})(),xu=(()=>{class d{constructor(a){this.vcr=a}get _view(){return this.wrappedInjector.get(Vg,this.vcr).cellView}ngOnInit(){this.wrappedInjector=new _u(Vg,this.vcr)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.s_b))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-cell"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Ah,4),2&a){let S;l.iGM(S=l.CRH())&&(g.signpost=S)}},hostAttrs:["role","gridcell"],hostVars:4,hostBindings:function(a,g){2&a&&l.ekj("datagrid-cell",!0)("datagrid-signpost-trigger",g.signpost.length>0)},ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),Ou=0,Ru=(()=>{class d extends Br{constructor(){super(),this.expandableId="",this._replace=new fn.X(!1),this._animate=new et.x,Ou++,this.expandableId="clr-dg-expandable-row-"+Ou}get expanded(){return this._expanded}set expanded(a){(a=!!a)!==this._expanded&&(this._expanded=a,this._animate.next(),this._expandChange.next(a))}get replace(){return this._replace.asObservable()}get animate(){return this._animate.asObservable()}loadingStateChange(a){super.loadingStateChange(a),a!==Sr.LOADING&&this._animate.next()}setReplace(a){this._replace.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();var vc=function(d){return d[d.DISPLAY=0]="DISPLAY",d[d.CALCULATE=1]="CALCULATE",d}(vc||{}),Mn=function(d){return d[d.None=0]="None",d[d.Single=1]="Single",d[d.Multi=2]="Multi",d}(Mn||{});let Bg=(()=>{class d{constructor(){this._dynamic=!1}ngAfterViewInit(){this.rowView=this.templateRef.createEmbeddedView(null)}ngOnDestroy(){this.rowView.destroy()}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["dg-wrapped-row"]],viewQuery:function(a,g){if(1&a&&l.Gf(t_,5),2&a){let _;l.iGM(_=l.CRH())&&(g.templateRef=_.first)}},ngContentSelectors:jt,decls:2,vars:0,consts:[["rowPortal",""]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,j0,1,0,"ng-template",null,0,l.W1O))},encapsulation:2}),d})(),OD=0,al=(()=>{class d{constructor(a,g){this._items=a,this._filters=g,this.preserveSelection=!1,this.shiftPressed=!1,this.rowSelectionMode=!1,this.prevSelectionRefs=[],this.lockedRefs=[],this.valueCollector=new et.x,this._selectionType=Mn.None,this._change=new et.x,this.subscriptions=[],this.id="clr-dg-selection"+OD++,this.subscriptions.push(this._filters.change.subscribe(()=>{!this._selectable||this.preserveSelection||this.clearSelection()})),this.subscriptions.push(this._items.allChanges.subscribe(_=>{const S=[];switch(this.selectionType){case Mn.None:break;case Mn.Single:{let j,J=!1;this.currentSingle&&!this.prevSingleSelectionRef&&this._items.canTrackBy()&&(this.prevSingleSelectionRef=this._items.trackBy(this.currentSingle)),_.forEach((te,Ce)=>{const Ge=this._items.trackBy(te,Ce);this.prevSingleSelectionRef===Ge&&(j=te,J=!0),this.lockedRefs.indexOf(Ge)>-1&&S.push(Ge)}),this._items.smart&&!j&&(J=!0),setTimeout(()=>{J&&(this.currentSingle=j)},0);break}case Mn.Multi:{let j=this.current.slice(),J=!1;this.current.length>0&&this.prevSelectionRefs.length!==this.current.length&&this._items.canTrackBy()&&(this.prevSelectionRefs=[],this.current.forEach(te=>{this.prevSelectionRefs.push(this._items.trackBy(te))})),_.forEach((te,Ce)=>{const Ge=this._items.trackBy(te,Ce);this.lockedRefs.indexOf(Ge)>-1&&S.push(Ge)}),j.length>0&&(_.forEach((te,Ce)=>{const Ge=this._items.trackBy(te,Ce),St=this.prevSelectionRefs.indexOf(Ge);St>-1&&(j[St]=te,J=!0)}),this._items.smart&&(j=j.filter(te=>_.indexOf(te)>-1),this.current.length!==j.length&&(J=!0)),setTimeout(()=>{J&&(this.current=j)},0));break}}this.lockedRefs=S})),this.subscriptions.push(this.valueCollector.pipe((0,Zn.b)(0)).subscribe(()=>this.emitChange()))}get selectionType(){return this._selectionType}set selectionType(a){a!==this.selectionType&&(this._selectionType=a,a===Mn.None?delete this.current:this.updateCurrent([],!1))}get current(){return this._current}set current(a){this.updateCurrent(a,!0)}get currentSingle(){return this._currentSingle}set currentSingle(a){a!==this._currentSingle&&(this._currentSingle=a,this._items.canTrackBy()&&a&&(this.prevSingleSelectionRef=this._items.trackBy(a)),this.emitChange())}get change(){return this._change.asObservable()}get _selectable(){return this._selectionType===Mn.Multi||this._selectionType===Mn.Single}clearSelection(){this._current=[],this.prevSelectionRefs=[],this.prevSingleSelectionRef=null,this._currentSingle=null,this.emitChange()}destroy(){this.subscriptions.forEach(a=>a.unsubscribe())}updateCurrent(a,g){this._current=a,g&&this.valueCollector.next(a)}isSelected(a){return this._selectionType===Mn.Single?this.currentSingle===a:this._selectionType===Mn.Multi&&this.current.indexOf(a)>=0}setSelected(a,g){const _=this.current?this.current.indexOf(a):-1;switch(this._selectionType){case Mn.None:case Mn.Single:break;case Mn.Multi:_>=0&&!g?this.deselectItem(_):_<0&&g&&this.selectItem(a)}}isAllSelected(){if(this._selectionType!==Mn.Multi||!this._items.displayed)return!1;const a=this._items.displayed.filter(S=>!1===this.isLocked(S));return!(a.length<1)&&a.filter(S=>this.current.indexOf(S)>-1).length===a.length}lockItem(a,g){if(this.canItBeLocked()){const _=this._items.trackBy(a);!0===g?this.lockedRefs.push(_):this.lockedRefs=this.lockedRefs.filter(S=>_!==S)}}isLocked(a){if(this.canItBeLocked()){const g=this._items.trackBy(a);return this.lockedRefs.indexOf(g)>-1}return!1}toggleAll(){this._selectionType===Mn.None||this._selectionType===Mn.Single||(this.isAllSelected()?this._items.displayed.forEach(a=>{const g=this.current.indexOf(a);g>-1&&!1===this.isLocked(a)&&this.deselectItem(g)}):this._items.displayed.forEach(a=>{this.current.indexOf(a)<0&&!1===this.isLocked(a)&&this.selectItem(a)}))}selectItem(a){this.current=this.current.concat(a),this._items.canTrackBy()&&this.prevSelectionRefs.push(this._items.trackBy(a))}deselectItem(a){if(this.current=this.current.slice(0,a).concat(this.current.slice(a+1)),a_!==g[0])}}canItBeLocked(){return this._selectionType!==Mn.None&&this._items.canTrackBy()}emitChange(){this._selectionType===Mn.Single?this._change.next(this.currentSingle):this._selectionType===Mn.Multi&&this._change.next(this.current)}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(ol),l.LFG(zo))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),_c=(()=>{class d{constructor(a){this._view=new fn.X(vc.DISPLAY),this.subscriptions=[],this.subscriptions.push(a.filterRenderSteps(Eo.CALCULATE_MODE_ON).subscribe(()=>this._view.next(vc.CALCULATE))),this.subscriptions.push(a.filterRenderSteps(Eo.CALCULATE_MODE_OFF).subscribe(()=>this._view.next(vc.DISPLAY)))}get view(){return this._view.asObservable()}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(sl))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Hg=(()=>{class d{constructor(a){this.selection=a}onSelectionCellClick(a){this.selection.rowSelectionMode||"LABEL"!==a.target.tagName&&"INPUT"!==a.target.tagName&&a.target.querySelector("input").click()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(al))},d.\u0275dir=l.lG2({type:d,selectors:[["",8,"datagrid-select"]],hostBindings:function(a,g){1&a&&l.NdJ("click",function(S){return g.onSelectionCellClick(S)})}}),d})(),Mh=0,xh=(()=>{class d{constructor(a,g,_,S,j,J,te,Ce,Ge,St,Rt,un){this.selection=a,this.rowActionService=g,this.globalExpandable=_,this.expand=S,this.detailService=j,this.displayMode=J,this.vcr=te,this.renderer=Ce,this.el=Ge,this.commonStrings=St,this.items=Rt,this.document=un,this.selectedChanged=new l.vpe(!1),this.expandedChange=new l.vpe(!1),this.displayCells=!1,this.expandAnimationTrigger=!1,this.SELECTION_TYPE=Mn,this.itemChanges=new ds(1),this._selected=!1,this._detailOpenLabel="",this._detailCloseLabel="",this._rowAriaLabel="",this.subscriptions=[],this._selectable=!0,Mh++,this.id="clr-dg-row"+Mh,this.radioId="clr-dg-row-rd"+Mh,this.checkboxId="clr-dg-row-cb"+Mh,this.expandableId=S.expandableId,this.subscriptions.push((0,z.a)(this.expand.replace,this.expand.expandChange).subscribe(([Xn,bi])=>{Xn&&bi?(this.replaced=!0,this.renderer.addClass(this.el.nativeElement,"datagrid-row-replaced")):(this.replaced=!1,this.renderer.removeClass(this.el.nativeElement,"datagrid-row-replaced"))}))}get item(){return this._item}set item(a){this._item=a,this.itemChanges.next(a),this.clrDgSelectable=this._selectable}get clrDgSelectable(){return!this.selection.isLocked(this.item)}set clrDgSelectable(a){this.item&&this.selection.lockItem(this.item,"false"===a||!1===a),this._selectable=a}get selected(){return this.selection.selectionType===Mn.None?this._selected:this.selection.isSelected(this.item)}set selected(a){this.selection.selectionType===Mn.None?this._selected=a:(a&&this.selection.selectionType===Mn.Multi?this.rangeSelect():this.selection.rangeStart=null,this.selection.setSelected(this.item,a))}get expanded(){return this.expand.expanded}set expanded(a){this.expand.expanded=a}get clrDgDetailOpenLabel(){return this._detailOpenLabel?this._detailOpenLabel:this.commonStrings.keys.open}set clrDgDetailOpenLabel(a){this._detailOpenLabel=a}get clrDgDetailCloseLabel(){return this._detailCloseLabel?this._detailCloseLabel:this.commonStrings.keys.close}set clrDgDetailCloseLabel(a){this._detailCloseLabel=a}get clrDgRowAriaLabel(){return this._rowAriaLabel?this._rowAriaLabel:this.commonStrings.keys.select}set clrDgRowAriaLabel(a){this._rowAriaLabel=a}get _view(){return this.wrappedInjector.get(Bg,this.vcr).rowView}ngOnInit(){this.wrappedInjector=new _u(Bg,this.vcr),this.selection.lockItem(this.item,!1===this.clrDgSelectable)}ngAfterContentInit(){this.dgCells.changes.subscribe(()=>{this.dgCells.forEach(a=>{a._view.destroyed||this._scrollableCells.insert(a._view)})})}ngAfterViewInit(){this.subscriptions.push(this.displayMode.view.subscribe(a=>{for(let g=this._scrollableCells.length;g>0;g--)this._scrollableCells.detach();for(let g=this._calculatedCells.length;g>0;g--)this._calculatedCells.detach();a===vc.CALCULATE?(this.displayCells=!1,this.dgCells.forEach(g=>{g._view.destroyed||this._calculatedCells.insert(g._view)})):(this.displayCells=!0,this.dgCells.forEach(g=>{g._view.destroyed||this._scrollableCells.insert(g._view)}))}),this.expand.animate.subscribe(()=>{this.expandAnimationTrigger=!this.expandAnimationTrigger}))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}toggle(a=!this.selected){a!==this.selected&&(this.selected=a,this.selectedChanged.emit(a))}toggleExpand(){this.expand.expandable&&(this.expandAnimation.updateStartHeight(),this.expanded=!this.expanded,this.expandedChange.emit(this.expanded))}clearRanges(a){a.shiftKey&&(this.document.getSelection().removeAllRanges(),-1!==window.navigator.userAgent.indexOf("Firefox")&&(a.preventDefault(),this.toggle(!0)))}selectRow(a=!this.selected,g){"LABEL"!==g.target.tagName&&(this.selection.selectionType===this.SELECTION_TYPE.Single?this.selection.currentSingle=this.item:this.toggle(a))}rangeSelect(){const a=this.items.displayed;if(!a)return;const g=a.indexOf(this.selection.rangeStart);if(this.selection.rangeStart&&this.selection.current.includes(this.selection.rangeStart)&&this.selection.shiftPressed&&-1!==g){const _=a.indexOf(this.item),S=new Set(this.selection.current.concat(a.slice(Math.min(g,_),Math.max(g,_)+1)));this.selection.clearSelection(),this.selection.current.push(...S)}else this.selection.rangeStart=this.item}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(al),l.Y36(rl),l.Y36(pc),l.Y36(Ru),l.Y36(io),l.Y36(_c),l.Y36(l.s_b),l.Y36(l.Qsj),l.Y36(l.SBq),l.Y36(pn),l.Y36(ol),l.Y36(k.K0))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-row"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,xu,4),2&a){let S;l.iGM(S=l.CRH())&&(g.dgCells=S)}},viewQuery:function(a,g){if(1&a&&(l.Gf(vu,5),l.Gf(n_,5),l.Gf(i_,5,l.s_b),l.Gf(Ud,5,l.s_b),l.Gf(xp,5,l.s_b)),2&a){let _;l.iGM(_=l.CRH())&&(g.expandAnimation=_.first),l.iGM(_=l.CRH())&&(g.detailButton=_.first),l.iGM(_=l.CRH())&&(g._stickyCells=_.first),l.iGM(_=l.CRH())&&(g._scrollableCells=_.first),l.iGM(_=l.CRH())&&(g._calculatedCells=_.first)}},hostAttrs:["role","rowgroup"],hostVars:5,hostBindings:function(a,g){2&a&&(l.uIk("aria-owns",g.id),l.ekj("datagrid-row",!0)("datagrid-selected",g.selected))},inputs:{item:["clrDgItem","item"],clrDgSelectable:"clrDgSelectable",selected:["clrDgSelected","selected"],expanded:["clrDgExpanded","expanded"],clrDgDetailOpenLabel:"clrDgDetailOpenLabel",clrDgDetailCloseLabel:"clrDgDetailCloseLabel",clrDgRowAriaLabel:"clrDgRowAriaLabel"},outputs:{selectedChanged:"clrDgSelectedChange",expandedChange:"clrDgExpandedChange"},features:[l._Bn([Ru,{provide:Br,useExisting:Ru},{provide:wa,useExisting:Ru}])],ngContentSelectors:Z0,decls:9,vars:3,consts:[["class","datagrid-row-clickable",3,"mousedown","click",4,"ngIf"],[3,"clrExpandTrigger",4,"ngIf"],[4,"ngIf"],["detail",""],["rowContent",""],["calculatedCells",""],[1,"datagrid-row-clickable",3,"mousedown","click"],[3,"clrExpandTrigger"],[3,"ngTemplateOutlet"],["role","row",1,"datagrid-row-master","datagrid-row-flex",3,"id"],[1,"datagrid-row-sticky"],["stickyCells",""],["class","datagrid-select datagrid-fixed-column datagrid-cell","role","gridcell",3,"ngClass",4,"ngIf"],["class","datagrid-row-actions datagrid-fixed-column datagrid-cell","role","gridcell",4,"ngIf"],["class","datagrid-expandable-caret datagrid-fixed-column datagrid-cell","role","gridcell",4,"ngIf"],["class","datagrid-detail-caret datagrid-fixed-column datagrid-cell","role","gridcell",4,"ngIf"],[1,"datagrid-row-scrollable",3,"ngClass"],[1,"datagrid-scrolling-cells"],["scrollableCells",""],["role","gridcell",1,"datagrid-select","datagrid-fixed-column","datagrid-cell",3,"ngClass"],["type","checkbox","clrCheckbox","",3,"ngModel","id","disabled","ngModelChange"],[1,"clr-control-label","clr-col-null",3,"for","click"],[1,"clr-sr-only"],["type","radio","clrRadio","",3,"id","name","value","ngModel","checked","disabled","ngModelChange"],[1,"clr-control-label","clr-col-null",3,"for"],["role","gridcell",1,"datagrid-row-actions","datagrid-fixed-column","datagrid-cell"],["role","gridcell",1,"datagrid-expandable-caret","datagrid-fixed-column","datagrid-cell"],["type","button","class","datagrid-expandable-caret-button",3,"click",4,"ngIf"],["clrSmall","",4,"ngIf"],["type","button",1,"datagrid-expandable-caret-button",3,"click"],["shape","angle",1,"datagrid-expandable-caret-icon"],["clrSmall",""],["role","gridcell",1,"datagrid-detail-caret","datagrid-fixed-column","datagrid-cell"],["type","button","aria-haspopup","dialog",1,"datagrid-detail-caret-button",3,"click"],["detailButton",""],["shape","angle-double",1,"datagrid-detail-caret-icon"]],template:function(a,g){1&a&&(l.F$t(au),l.YNc(0,a_,3,2,"div",0),l.YNc(1,ta,2,2,"clr-expandable-animation",1),l.YNc(2,U0,1,1,null,2),l.YNc(3,Rp,1,0,"ng-template",null,3,l.W1O),l.YNc(5,p_,16,13,"ng-template",null,4,l.W1O),l.GkF(7,null,5)),2&a&&(l.Q6J("ngIf",g.selection.rowSelectionMode),l.xp6(1),l.Q6J("ngIf",!g.selection.rowSelectionMode&&g.expand.expandable),l.xp6(1),l.Q6J("ngIf",!g.selection.rowSelectionMode&&!g.expand.expandable))},dependencies:[k.mk,k.O5,k.tP,Pn,Ir,Cu,sc,vy,my,Y.Fj,Y.Wl,Y._,Y.JJ,Y.On,vu,oc,Hg],encapsulation:2}),d})();var ss=function(d){return d[d.WIDTH=0]="WIDTH",d[d.HIDDEN=1]="HIDDEN",d}(ss||{});const Oh=Object.keys(ss).map(d=>ss[d]).filter(d=>d===parseInt(d,10));let Uo=(()=>{class d{constructor(){this.columns=[],this._cache=[]}get columnStates(){return this.columns.map(a=>a.value)}get hasHideableColumns(){return this.columnStates.filter(a=>a.hideable).length>0}cache(){this._cache=this.columns.map(a=>{const g={...a.value};return delete g.changes,g})}hasCache(){return!!this._cache.length}resetToLastCache(){this._cache.forEach((a,g)=>{this.columns[g].next({...a,changes:Oh})}),this._cache=[]}emitStateChangeAt(a,g){this.columns[a]&&this.emitStateChange(this.columns[a],g)}emitStateChange(a,g){a.next({...a.value,...g})}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Ey=(()=>{class d{constructor(a,g,_,S){this.filters=a,this.sort=g,this.page=_,this.debouncer=S,this.change=this.debouncer.change.pipe((0,zt.U)(()=>this.state))}get state(){const a={};this.page.size>0&&(a.page={from:this.page.firstItem,to:this.page.lastItem,size:this.page.size,current:this.page.current}),this.sort.comparator&&(a.sort=this.sort.comparator instanceof Rg?{by:this.sort.comparator.prop,reverse:this.sort.reverse}:{by:this.sort.comparator,reverse:this.sort.reverse});const g=this.filters.getActiveFilters();if(g.length>0){a.filters=[];for(const _ of g)a.filters.push(_.state?_.state:_)}return a}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(zo),l.LFG(Ih),l.LFG(aa),l.LFG(Eu))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),jg=(()=>{class d{constructor(a){this.zone=a,this.listenersAdded=!1,this.destroy$=new et.x,this.config={keyGridRows:"[role=row]:not(.datagrid-placeholder)",keyGridCells:"[role=gridcell]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), [role=columnheader]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), .datagrid-detail-caret",keyGrid:"[role=grid]"}}get grid(){return this.host?.querySelector(this.config.keyGrid)}get rows(){return this.host?.querySelectorAll(this.config.keyGridRows)}get cells(){return this.host?.querySelectorAll(this.config.keyGridCells)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}addListeners(){this.listenersAdded||(this.zone.runOutsideAngular(()=>{(0,ki.R)(this.grid,"mousedown").pipe((0,Xr.R)(this.destroy$)).subscribe(a=>{if(1===a.buttons&&!a.ctrlKey){const g=this.cells?Array.from(this.cells).find(_=>_===a.target||_===a.target.closest(this.config.keyGridCells)):null;g&&this.setActiveCell(g)}}),(0,ki.R)(this.grid,"keydown").pipe((0,Xr.R)(this.destroy$)).subscribe(a=>{if((!a.target.classList.contains("drag-handle")||"ArrowLeft"!==a.code&&"ArrowRight"!==a.code)&&("ArrowUp"===a.code||"ArrowDown"===a.code||"ArrowLeft"===a.code||"ArrowRight"===a.code||"End"===a.code||"Home"===a.code||"PageUp"===a.code||"PageDown"===a.code)){const{x:g,y:_}=this.getNextItemCoordinate(a),S=this.rows?Array.from(this.rows[_].querySelectorAll(this.config.keyGridCells))[g]:null;S&&this.setActiveCell(S),a.preventDefault()}})}),this.listenersAdded=!0)}initializeKeyGrid(a){this.host=a,this.addListeners(),this.resetKeyGrid()}resetKeyGrid(){this.cells?.forEach(g=>g.setAttribute("tabindex","-1")),(this.cells?this.cells[0]:null)?.setAttribute("tabindex","0")}setActiveCell(a){const g=this.cells?Array.from(this.cells).find(j=>"0"===j.getAttribute("tabindex")):null;g&&g.setAttribute("tabindex","-1"),a.setAttribute("tabindex","0");const _=function Ty(d){const f=["a[href]","area[href]","input:not([disabled])","button:not([disabled])","select:not([disabled])","textarea:not([disabled])","iframe","object","embed","*[tabindex]","*[contenteditable=true]","[role=button]:not([disabled])"].join(",");return Array.from(d.querySelectorAll(f))}(a);("columnheader"!==a.getAttribute("role")&&_[0]?_[0]:a).focus()}getNextItemCoordinate(a){let g=this.cells?Array.from(this.cells).find(un=>"0"===un.getAttribute("tabindex")):null;"Tab"===a.code&&(g=document.activeElement);const _=this.rows&&g?Array.from(this.rows).find(un=>un.contains(g)):null,S=this.rows?this.rows.length-1:0,j=this.cells?this.cells.length/this.rows.length-1:0;let J=_&&g?Array.from(_.querySelectorAll(this.config.keyGridCells)).indexOf(g):0,te=_&&g&&this.rows?Array.from(this.rows).indexOf(_):0;const Ce=this.host.dir,Ge="rtl"===Ce?"ArrowRight":"ArrowLeft",St="rtl"===Ce?"ArrowLeft":"ArrowRight",Rt=Math.floor(this.host?.querySelector(".datagrid").clientHeight/this.rows[0].clientHeight)-1||0;return"ArrowUp"===a.code&&0!==te?te-=1:"ArrowDown"===a.code&&te0?te-Rt:0:"PageDown"===a.code&&(te=te+Rt{class d{constructor(a,g,_,S,j,J,te,Ce,Ge,St,Rt,un,Xn,bi,Ds,ef){this.organizer=a,this.items=g,this.expandableRows=_,this.selection=S,this.rowActionService=j,this.stateProvider=J,this.displayMode=te,this.renderer=Ce,this.detailService=Ge,this.document=St,this.el=Rt,this.page=un,this.commonStrings=Xn,this.columnsService=bi,this.keyNavigation=Ds,this.zone=ef,this.clrDgSingleSelectionAriaLabel=this.commonStrings.keys.singleSelectionAriaLabel,this.clrDgSingleActionableAriaLabel=this.commonStrings.keys.singleActionableAriaLabel,this.clrDetailExpandableAriaLabel=this.commonStrings.keys.detailExpandableAriaLabel,this.clrDgDisablePageFocus=!1,this.selectedChanged=new l.vpe(!1),this.singleSelectedChanged=new l.vpe(!1),this.refresh=new l.vpe(!1),this.SELECTION_TYPE=Mn,this._subscriptions=[];const Dc=dr();this.selectAllId="clr-dg-select-all-"+Dc,this.detailService.id=Dc}get loading(){return this.items.loading}set loading(a){this.items.loading=a}set selected(a){this.selection.selectionType=a?Mn.Multi:Mn.None,this.selection.updateCurrent(a,!1)}set singleSelected(a){this.selection.selectionType=Mn.Single,a?this.selection.currentSingle=a:this.selection.currentSingle&&(this.selection.currentSingle=null)}set clrDgPreserveSelection(a){this.selection.preserveSelection=a}set rowSelectionMode(a){this.selection.rowSelectionMode=a}set trackBy(a){this.items.datagridTrackBy=a}get allSelected(){return this.selection.isAllSelected()}set allSelected(a){this.selection.toggleAll()}ngAfterContentInit(){this.items.smart||(this.items.all=this.rows.map(g=>g.item));const a=this.rows.changes.pipe((0,Ms.w)(g=>(0,$.T)((0,es.of)(g.map(_=>_.item)),(0,z.a)(g.map(_=>_.itemChanges)).pipe((0,Zn.b)(0)))));this._subscriptions.push(a.subscribe(g=>{this.items.smart||(this.items.all=g)}),this.rows.changes.subscribe(()=>{for(let g=this._displayedRows.length-1;g>=0;g--)this._displayedRows.get(g).destroyed&&this._displayedRows.remove(g);if(this.rows.forEach(g=>{this._displayedRows.insert(g._view)}),this.detailService.state&&this.detailService.isOpen){const g=this.items.canTrackBy()?this.rows.find(_=>this.items.trackBy(_.item)===this.items.trackBy(this.detailService.state)):void 0;g?this.detailService.open(g.item,g.detailButton.nativeElement):this.detailService.close()}}))}ngAfterViewInit(){this.keyNavigation.initializeKeyGrid(this.el.nativeElement),this.refresh.emit(this.stateProvider.state),this._subscriptions.push(this.stateProvider.change.subscribe(a=>this.refresh.emit(a)),this.selection.change.subscribe(a=>{this.selection.selectionType===Mn.Single?this.singleSelectedChanged.emit(a):this.selection.selectionType===Mn.Multi&&this.selectedChanged.emit(a)}),this.page.change.subscribe(()=>{this.keyNavigation.resetKeyGrid(),this.clrDgDisablePageFocus||this.datagridTable.nativeElement.focus()}),(0,z.a)(this.columnsService.columns).subscribe(()=>this.keyNavigation?.resetKeyGrid()),this.displayMode.view.subscribe(a=>{for(let g=this._projectedDisplayColumns.length;g>0;g--)this._projectedDisplayColumns.detach();for(let g=this._projectedCalculationColumns.length;g>0;g--)this._projectedCalculationColumns.detach();for(let g=this._calculationRows.length;g>0;g--)this._calculationRows.detach();for(let g=this._displayedRows.length;g>0;g--)this._displayedRows.detach();a===vc.DISPLAY?(this.renderer.removeClass(this.el.nativeElement,"datagrid-calculate-mode"),this.columns.forEach(g=>{this._projectedDisplayColumns.insert(g._view)}),this.rows.forEach(g=>{this._displayedRows.insert(g._view)})):(this.renderer.addClass(this.el.nativeElement,"datagrid-calculate-mode"),this.columns.forEach(g=>{this._projectedCalculationColumns.insert(g._view)}),this.rows.forEach(g=>{this._calculationRows.insert(g._view)}))})),this.zone.runOutsideAngular(()=>{this._subscriptions.push((0,ki.R)(this.document.body,"keydown").subscribe(a=>{"Shift"===a.key&&(this.selection.shiftPressed=!0)}),(0,ki.R)(this.document.body,"keyup").subscribe(a=>{"Shift"===a.key&&(this.selection.shiftPressed=!1)}))})}ngOnDestroy(){this._subscriptions.forEach(a=>a.unsubscribe())}resize(){this.organizer.resize()}dataChanged(){this.items.refresh()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(sl),l.Y36(ol),l.Y36(pc),l.Y36(al),l.Y36(rl),l.Y36(Ey),l.Y36(_c),l.Y36(l.Qsj),l.Y36(io),l.Y36(k.K0),l.Y36(l.SBq),l.Y36(aa),l.Y36(pn),l.Y36(Uo),l.Y36(jg),l.Y36(l.R0b))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-datagrid"]],contentQueries:function(a,g,_){if(1&a&&(l.Suo(_,gc,5),l.Suo(_,Ng,5),l.Suo(_,kg,4),l.Suo(_,xh,4)),2&a){let S;l.iGM(S=l.CRH())&&(g.iterator=S.first),l.iGM(S=l.CRH())&&(g.placeholder=S.first),l.iGM(S=l.CRH())&&(g.columns=S),l.iGM(S=l.CRH())&&(g.rows=S)}},viewQuery:function(a,g){if(1&a&&(l.Gf(g_,5,l.SBq),l.Gf(m_,5,l.s_b),l.Gf(Q0,5,l.s_b),l.Gf(q0,5,l.s_b),l.Gf(lu,5,l.s_b),l.Gf(K0,5,l.s_b)),2&a){let _;l.iGM(_=l.CRH())&&(g.datagridTable=_.first),l.iGM(_=l.CRH())&&(g.scrollableColumns=_.first),l.iGM(_=l.CRH())&&(g._projectedDisplayColumns=_.first),l.iGM(_=l.CRH())&&(g._projectedCalculationColumns=_.first),l.iGM(_=l.CRH())&&(g._displayedRows=_.first),l.iGM(_=l.CRH())&&(g._calculationRows=_.first)}},hostVars:4,hostBindings:function(a,g){2&a&&l.ekj("datagrid-host",!0)("datagrid-detail-open",g.detailService.isOpen)},inputs:{clrDgSingleSelectionAriaLabel:"clrDgSingleSelectionAriaLabel",clrDgSingleActionableAriaLabel:"clrDgSingleActionableAriaLabel",clrDetailExpandableAriaLabel:"clrDetailExpandableAriaLabel",clrDgDisablePageFocus:"clrDgDisablePageFocus",loading:["clrDgLoading","loading"],selected:["clrDgSelected","selected"],singleSelected:["clrDgSingleSelected","singleSelected"],clrDgPreserveSelection:"clrDgPreserveSelection",rowSelectionMode:["clrDgRowSelection","rowSelectionMode"],trackBy:["clrDgItemsTrackBy","trackBy"]},outputs:{selectedChanged:"clrDgSelectedChange",singleSelectedChanged:"clrDgSingleSelectedChange",refresh:"clrDgRefresh"},features:[l._Bn([al,Ih,zo,aa,ol,sl,rl,pc,Eu,io,Ey,Mu,Uo,_c,jg])],ngContentSelectors:v_,decls:32,vars:7,consts:[[1,"datagrid-outer-wrapper"],[1,"datagrid-inner-wrapper"],[1,"datagrid"],["datagrid",""],[1,"datagrid-table-wrapper"],["role","grid","tabindex","-1",1,"datagrid-table"],["datagridTable",""],["role","rowgroup",1,"datagrid-header"],["role","row",1,"datagrid-row"],[1,"datagrid-row-master","datagrid-row-flex"],[1,"datagrid-row-sticky"],["role","columnheader","class","datagrid-column datagrid-select datagrid-fixed-column",3,"keydown.space",4,"ngIf"],["role","columnheader","class","datagrid-column datagrid-select datagrid-fixed-column",4,"ngIf"],["role","columnheader","class","datagrid-column datagrid-row-actions datagrid-fixed-column",4,"ngIf"],["role","columnheader","class","datagrid-column datagrid-expandable-caret datagrid-fixed-column",4,"ngIf"],[1,"datagrid-row-scrollable"],["projectedDisplayColumns",""],["displayedRows",""],[4,"ngIf"],["class","datagrid-spinner",4,"ngIf"],[1,"datagrid-calculation-table"],[1,"datagrid-calculation-header"],["projectedCalculationColumns",""],["calculationRows",""],["role","columnheader",1,"datagrid-column","datagrid-select","datagrid-fixed-column",3,"keydown.space"],[1,"clr-checkbox-wrapper"],["type","checkbox","tabindex","-1",3,"id","ngModel","ngModelChange"],[1,"clr-control-label","clr-col-null",3,"for"],[1,"clr-sr-only"],[1,"datagrid-column-separator"],["role","columnheader",1,"datagrid-column","datagrid-select","datagrid-fixed-column"],["role","columnheader",1,"datagrid-column","datagrid-row-actions","datagrid-fixed-column"],["role","columnheader",1,"datagrid-column","datagrid-expandable-caret","datagrid-fixed-column"],[1,"datagrid-spinner"],["clrMedium",""]],template:function(a,g){1&a&&(l.F$t(rS),l.Hsn(0),l.TgZ(1,"div",0)(2,"div",1)(3,"div",2,3)(5,"div",4)(6,"div",5,6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10),l.YNc(12,J0,7,5,"div",11),l.YNc(13,X0,2,1,"div",12),l.YNc(14,eS,2,1,"div",13),l.YNc(15,tS,2,1,"div",14),l.qZA(),l.TgZ(16,"div",15),l.GkF(17,null,16),l.qZA()()()(),l.GkF(19,null,17),l.Hsn(21,1),l.YNc(22,nS,1,0,"clr-dg-placeholder",18),l.qZA()()(),l.Hsn(23,2),l.YNc(24,iS,3,0,"div",19),l.qZA(),l.Hsn(25,3),l.qZA(),l.TgZ(26,"div",20)(27,"div",21),l.GkF(28,null,22),l.qZA(),l.GkF(30,null,23),l.qZA()),2&a&&(l.xp6(3),l.uIk("aria-hidden",!!g.detailService.isOpen||null),l.xp6(9),l.Q6J("ngIf",g.selection.selectionType===g.SELECTION_TYPE.Multi),l.xp6(1),l.Q6J("ngIf",g.selection.selectionType===g.SELECTION_TYPE.Single),l.xp6(1),l.Q6J("ngIf",g.rowActionService.hasActionableRow),l.xp6(1),l.Q6J("ngIf",g.expandableRows.hasExpandableRow||g.detailService.enabled),l.xp6(7),l.Q6J("ngIf",!g.placeholder),l.xp6(2),l.Q6J("ngIf",g.loading))},dependencies:[k.O5,Ir,Y.Wl,Y.JJ,Y.On,oc,Ng,Hg],encapsulation:2}),d})();const $g=d=>d;let Rh=(()=>{class d{constructor(a){this._items=a}set trackBy(a){a!==$g&&this._items&&(this._items.iteratorTrackBy=a)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(ol,8))},d.\u0275dir=l.lG2({type:d,selectors:[["","ngForTrackBy",""]],inputs:{trackBy:["ngForTrackBy","trackBy"]}}),d})(),Ph=(()=>{class d{constructor(a,g){this.commonStrings=a,this.columnsService=g,this.allSelected=new l.vpe}get clrAllSelected(){return this.allSelected.asObservable()}get allHideablesVisible(){return 0===this.hideableColumns().filter(a=>a.value.hidden).length}selectAll(){this.hideableColumns().forEach(a=>this.columnsService.emitStateChange(a,{hidden:!1,changes:[ss.HIDDEN]})),this.allSelected.next(!0)}hideableColumns(){return this.columnsService.columns.filter(a=>a.value.hideable)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(pn),l.Y36(Uo))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-column-toggle-button"]],outputs:{clrAllSelected:"clrAllSelected"},decls:2,vars:2,consts:[["type","button",1,"btn","btn-sm","btn-link","switch-button",3,"disabled","click"]],template:function(a,g){1&a&&(l.TgZ(0,"button",0),l.NdJ("click",function(){return g.selectAll()}),l._uU(1),l.qZA()),2&a&&(l.Q6J("disabled",g.allHideablesVisible),l.xp6(1),l.hij(" ",g.commonStrings.keys.selectAll," "))},encapsulation:2}),d})(),Ay=(()=>{class d{constructor(a,g,_){this.commonStrings=a,this.columnsService=g,this.popoverId=dr(),this.smartPosition={axis:Hr.VERTICAL,side:no.BEFORE,anchor:bn.START,content:bn.START},this.trackByFn=$g,this.subscription=_.openChange.subscribe(S=>this.openState=S)}get allColumnsVisible(){return this._allColumnsVisible}set allColumnsVisible(a){this._allColumnsVisible=a}get hideableColumnStates(){return this.columnsService.columns.filter(g=>g.value.hideable).map(g=>g.value)}get hasOnlyOneVisibleColumn(){return this.columnsService.columns.length-this.hideableColumnStates.length==0&&1===this.hideableColumnStates.filter(g=>!g.hidden).length}ngOnDestroy(){this.subscription.unsubscribe()}toggleColumnState(a,g){const _=this.columnsService.columns.filter(S=>S.value===a)[0];this.columnsService.emitStateChange(_,{hidden:g,changes:[ss.HIDDEN]})}toggleSwitchPanel(){this.openState=!this.openState}allColumnsSelected(){this.allSelectedElement.nativeElement.focus()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(pn),l.Y36(Uo),l.Y36(mi))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-column-toggle"]],viewQuery:function(a,g){if(1&a&&l.Gf(sS,5,l.SBq),2&a){let _;l.iGM(_=l.CRH())&&(g.allSelectedElement=_.first)}},hostVars:4,hostBindings:function(a,g){2&a&&l.ekj("column-switch-wrapper",!0)("active",g.openState)},features:[l.zW0([ia])],decls:3,vars:8,consts:[["role","button","type","button","clrPopoverAnchor","","clrPopoverOpenCloseButton","",1,"btn","btn-sm","column-toggle--action"],["class","column-switch","role","dialog","cdkTrapFocus","",3,"id",4,"clrPopoverContent","clrPopoverContentAt","clrPopoverContentOutsideClickToClose","clrPopoverContentScrollToClose"],["role","dialog","cdkTrapFocus","",1,"column-switch",3,"id"],[1,"switch-header"],["tabindex","-1",1,"clr-sr-only"],["allSelected",""],["clrPopoverCloseButton","","type","button",1,"btn","btn-sm","btn-link","toggle-switch-close-button"],["shape","window-close","aria-hidden","true"],[1,"clr-sr-only"],[1,"switch-content","list-unstyled"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"switch-footer"],[3,"clrAllSelected"],["clrCheckbox","","type","checkbox",3,"disabled","ngModel","ngModelChange"],[3,"ngTemplateOutlet"]],template:function(a,g){1&a&&(l.TgZ(0,"button",0),l._uU(1),l.qZA(),l.YNc(2,aS,15,9,"div",1)),2&a&&(l.uIk("aria-controls",g.popoverId)("aria-owns",g.popoverId)("aria-expanded",g.openState),l.xp6(1),l.hij(" ",g.commonStrings.keys.pickColumns," "),l.xp6(1),l.Q6J("clrPopoverContent",g.openState)("clrPopoverContentAt",g.smartPosition)("clrPopoverContentOutsideClickToClose",!0)("clrPopoverContentScrollToClose",!0))},dependencies:[k.sg,k.tP,uc,Pn,Ir,Cu,sc,Y.Wl,Y.JJ,Y.On,pu,sg,gu,ms,Rh,Ph],encapsulation:2}),d})(),kh=(()=>{class d{constructor(a,g,_,S){this.selection=a,this.detailService=g,this.columnsService=_,this.commonStrings=S,this.SELECTION_TYPE=Mn}get hasHideableColumns(){return this.columnsService.hasHideableColumns}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(al),l.Y36(io),l.Y36(Uo),l.Y36(pn))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-dg-footer"]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("datagrid-footer",!0)},ngContentSelectors:y_,decls:3,vars:2,consts:[[4,"ngIf"],[1,"clr-form-control-disabled"],[1,"datagrid-footer-select"],["clrCheckbox","","type","checkbox","checked","checked","disabled",""],[1,"clr-sr-only"],[1,"datagrid-footer-description"]],template:function(a,g){1&a&&(l.F$t(__),l.YNc(0,cS,8,2,"ng-container",0),l.YNc(1,dS,4,1,"ng-container",0),l.Hsn(2)),2&a&&(l.Q6J("ngIf",g.selection.selectionType===g.SELECTION_TYPE.Multi&&g.selection.current.length>0),l.xp6(1),l.Q6J("ngIf",!g.detailService.isOpen))},dependencies:[k.O5,Ir,Cu,sc,Ay],encapsulation:2}),d})();const Nh=new l.OlP("COLUMN_STATE"),Ry={provide:Nh,useFactory:function Oy(){return new fn.X({changes:[]})}},tr="datagrid-fixed-width",la="datagrid-hidden-column";let Yg=(()=>{class d{constructor(a,g,_){this.el=a,this.renderer=g,this.subscriptions=[],this.subscriptions.push(_.filterRenderSteps(Eo.CLEAR_WIDTHS).subscribe(()=>this.clearWidth()))}set columnState(a){this.stateSubscription&&this.stateSubscription.unsubscribe(),this.runAllChanges=Oh,this.stateSubscription=a.subscribe(g=>this.stateChanges(g))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe()),this.stateSubscription&&this.stateSubscription.unsubscribe()}stateChanges(a){this.runAllChanges&&(a.changes=this.runAllChanges,delete this.runAllChanges),a.changes&&a.changes.length&&a.changes.forEach(g=>{switch(g){case ss.WIDTH:this.setWidth(a);break;case ss.HIDDEN:this.setHidden(a)}})}clearWidth(){this.renderer.removeClass(this.el.nativeElement,tr),this.renderer.setStyle(this.el.nativeElement,"width",null)}setWidth(a){a.strictWidth?this.renderer.addClass(this.el.nativeElement,tr):this.renderer.removeClass(this.el.nativeElement,tr),this.renderer.setStyle(this.el.nativeElement,"width",a.width+"px")}setHidden(a){a.hidden?this.renderer.addClass(this.el.nativeElement,la):this.renderer.removeClass(this.el.nativeElement,la)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(sl))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-dg-cell"]]}),d})(),Wg=(()=>{class d{constructor(a,g,_,S,j,J,te){this.el=a,this.renderer=g,this.organizer=_,this.domAdapter=S,this.columnResizerService=j,this.columnsService=J,this.columnState=te,this.resizeEmitter=new l.vpe,this.widthSet=!1,this.autoSet=!1,this.subscriptions=[],this.subscriptions.push(this.organizer.filterRenderSteps(Eo.CLEAR_WIDTHS).subscribe(()=>this.clearWidth())),this.subscriptions.push(te.subscribe(Ce=>this.stateChanges(Ce)))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}getColumnWidthState(){const a=this.detectStrictWidth();return{width:this.computeWidth(a),strictWidth:a}}setColumnState(a){this.columnsService.columns[a]=this.columnState}stateChanges(a){a.changes&&a.changes.length&&a.changes.forEach(g=>{switch(g){case ss.WIDTH:this.setWidth(a);break;case ss.HIDDEN:this.setHidden(a)}})}clearWidth(){this.widthSet&&!this.columnResizerService.resizedBy&&this.renderer.setStyle(this.el.nativeElement,"width",null),this.autoSet&&this.renderer.removeClass(this.el.nativeElement,tr)}detectStrictWidth(){return this.columnResizerService.resizedBy?this.columnResizerService.widthAfterResize:this.autoSet?0:this.domAdapter.userDefinedWidth(this.el.nativeElement)}computeWidth(a){let g=a;return g||(g=this.domAdapter.scrollWidth(this.el.nativeElement)),g}setWidth(a){a.strictWidth?(this.columnResizerService.resizedBy&&(this.resizeEmitter.emit(a.width),this.renderer.setStyle(this.el.nativeElement,"width",a.width+"px"),this.widthSet=!1),this.renderer.addClass(this.el.nativeElement,tr),this.autoSet=!1):(this.renderer.removeClass(this.el.nativeElement,tr),this.renderer.setStyle(this.el.nativeElement,"width",a.width+"px"),this.widthSet=!0,this.autoSet=!0)}setHidden(a){a.hidden?this.renderer.addClass(this.el.nativeElement,la):this.renderer.removeClass(this.el.nativeElement,la)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(sl),l.Y36(jo),l.Y36(Pg),l.Y36(Uo),l.Y36(Nh))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-dg-column"]],outputs:{resizeEmitter:"clrDgColumnResize"},features:[l._Bn([Pg,Ry])]}),d})(),z1=(()=>{class d{userDefinedWidth(a){return 0}scrollBarWidth(a){return 0}scrollWidth(a){return 0}computedHeight(a){return 0}clientRect(a){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}minWidth(a){return 0}focus(a){}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),Ny=(()=>{class d{constructor(a){this.columnsService=a,this.subscriptions=[]}ngAfterContentInit(){this.setColumnState(),this.subscriptions.push(this.cells.changes.subscribe(()=>{this.setColumnState()}))}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}setColumnState(){this.cells.length===this.columnsService.columns.length&&this.cells.forEach((a,g)=>{this.columnsService.columns[g]&&(a.columnState=this.columnsService.columns[g])})}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Uo))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-dg-row"],["clr-dg-row-detail"]],contentQueries:function(a,g,_){if(1&a&&l.Suo(_,Yg,4),2&a){let S;l.iGM(S=l.CRH())&&(g.cells=S)}}}),d})();const Fy=d=>(0,k.NF)(d)?new jo:new z1;let Fh=(()=>{class d{constructor(a,g,_,S,j,J,te,Ce,Ge,St){this.organizer=a,this.items=g,this.page=_,this.domAdapter=S,this.el=j,this.renderer=J,this.detailService=te,this.tableSizeService=Ce,this.columnsService=Ge,this.ngZone=St,this._heightSet=!1,this.shouldStabilizeColumns=!0,this.subscriptions=[],this.columnsSizesStable=!1,this.subscriptions.push(this.organizer.filterRenderSteps(Eo.COMPUTE_COLUMN_WIDTHS).subscribe(()=>this.computeHeadersWidth())),this.subscriptions.push(this.page.sizeChange.subscribe(()=>{this._heightSet&&this.resetDatagridHeight()})),this.subscriptions.push(this.detailService.stateChange.subscribe(Rt=>this.toggleDetailPane(Rt))),this.subscriptions.push(this.items.change.subscribe(()=>this.shouldStabilizeColumns=!0))}ngAfterContentInit(){this.setupColumns(),this.subscriptions.push(this.headers.changes.subscribe(()=>{this.setupColumns(),this.columnsSizesStable=!1,this.stabilizeColumns()}))}ngAfterViewInit(){this.tableSizeService.table=this.el}ngAfterViewChecked(){this.shouldStabilizeColumns&&this.stabilizeColumns(),this.shouldComputeHeight()&&this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.computeDatagridHeight()})})}ngOnDestroy(){this.subscriptions.forEach(a=>a.unsubscribe())}toggleDetailPane(a){this.headers&&(a&&!this.columnsService.hasCache()?(this.columnsService.cache(),this.headers.forEach((g,_)=>{_>0&&this.columnsService.emitStateChangeAt(_,{changes:[ss.HIDDEN],hidden:a})})):a||this.columnsService.resetToLastCache())}setupColumns(){this.headers.forEach((a,g)=>a.setColumnState(g)),this.columnsService.columns.splice(this.headers.length),this.rows.forEach(a=>a.setColumnState())}shouldComputeHeight(){return!this._heightSet&&this.page.size>0&&this.items.displayed.length===this.page.size}computeDatagridHeight(){const a=this.domAdapter.clientRect(this.el.nativeElement).height;this.renderer.setStyle(this.el.nativeElement,"height",a+"px"),this._heightSet=!0}resetDatagridHeight(){this.renderer.setStyle(this.el.nativeElement,"height",""),this._heightSet=!1}computeHeadersWidth(){const a=this.headers.length;let g=!0;this.headers.forEach((_,S)=>{const j={changes:[ss.WIDTH],..._.getColumnWidthState()};j.strictWidth||(g=!1),a===S+1&&g&&(j.strictWidth=0),this.columnsService.emitStateChangeAt(S,j)})}stabilizeColumns(){this.shouldStabilizeColumns=!1,!this.columnsSizesStable&&this.items.displayed.length>0&&(this.organizer.resize(),this.columnsSizesStable=!0)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(sl),l.Y36(ol),l.Y36(aa),l.Y36(jo),l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(io),l.Y36(Mu),l.Y36(Uo),l.Y36(l.R0b))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-datagrid"]],contentQueries:function(a,g,_){if(1&a&&(l.Suo(_,Wg,4),l.Suo(_,Ny,5)),2&a){let S;l.iGM(S=l.CRH())&&(g.headers=S),l.iGM(S=l.CRH())&&(g.rows=S)}},features:[l._Bn([{provide:jo,useFactory:Fy,deps:[l.Lbi]}])]}),d})(),U1=(()=>{class d{constructor(){Jt.addIcons(Zr,On,Or,Ht,fi,ri,yn,vr,As)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Sy,mg,kn,by,Y.u5,cg,Bs,j1,Ig,bu,tc,cc]}),d})(),Qg=(()=>{class d{constructor(){Jt.addIcons(Yr)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Y.u5,kn,Ig]}),d})();new l.FiY,new l.tp0;let $y=(()=>{class d{constructor(){Jt.addIcons(Yr)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,cg]}),d})(),Gy=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[U1,Qg,$y]}),d})();function Yy(d,f,a){return qn.y.create(g=>{f(g);const _=d.subscribe(g);return()=>{_.unsubscribe(),a&&a(g)}})}let Fu=(()=>{class d{constructor(a,g,_,S,j){this.renderer=a,this.parent=g,this.toggleService=_,this.focusService=S,this.platformId=j,this.id=dr(),this.focusBackOnTriggerWhenClosed=!1,this._unlistenFuncs=[],this.resetChildren(),this.moveToFirstItemWhenOpen(),this.parent||this.handleRootFocus()}get trigger(){return this._trigger}set trigger(a){this._trigger=a,this.parent?this._unlistenFuncs.push(this.renderer.listen(a,"keydown.arrowright",g=>this.toggleService.toggleWithEvent(g))):(this._unlistenFuncs.push(this.renderer.listen(a,"keydown.arrowup",g=>this.toggleService.toggleWithEvent(g))),this._unlistenFuncs.push(this.renderer.listen(a,"keydown.arrowdown",g=>this.toggleService.toggleWithEvent(g))),this.focusService.listenToArrowKeys(a))}get container(){return this._container}set container(a){this._container=a,this._unlistenFuncs.push(this.renderer.listen(a,"keydown.tab",g=>this.toggleService.toggleWithEvent(g))),this.parent?this._unlistenFuncs.push(this.renderer.listen(a,"keydown.escape",g=>{this.focusService.move(vs.LEFT),g.stopPropagation()})):(this.focusService.registerContainer(a),this._unlistenFuncs.push(this.renderer.listen(a,"keydown.escape",g=>this.toggleService.toggleWithEvent(g))),this._unlistenFuncs.push(this.renderer.listen(a,"blur",g=>{this.children.pipe((0,Qn.q)(1)).subscribe(S=>S.forEach(j=>j.blur()));const _=g.relatedTarget||document.activeElement;_&&(0,k.NF)(this.platformId)&&(a.contains(_)||_===this.trigger)||(this.focusBackOnTriggerWhenClosed=!1,this.toggleService.open=!1)})))}ngOnDestroy(){this._unlistenFuncs.forEach(a=>a()),this.focusService.detachListeners()}moveToFirstItemWhenOpen(){const a=this.toggleService.openChange.subscribe(g=>{g&&this.toggleService.originalEvent&&setTimeout(()=>{this.focusService.moveTo(this),this.focusService.move(this.parent?vs.RIGHT:vs.DOWN)})});this._unlistenFuncs.push(()=>a.unsubscribe())}handleRootFocus(){const a=this.toggleService.openChange.subscribe(g=>{g||(this.focusService.reset(this),this.focusBackOnTriggerWhenClosed&&this.focus()),this.focusBackOnTriggerWhenClosed=g});this._unlistenFuncs.push(()=>a.unsubscribe())}focus(){this.trigger&&(0,k.NF)(this.platformId)&&this.trigger.focus()}blur(){this.trigger&&(0,k.NF)(this.platformId)&&this.trigger.blur()}activate(){(0,k.NF)(this.platformId)&&this.trigger.click()}resetChildren(){this.children=new ds(1),this.parent?this.right=this.openAndGetChildren().pipe((0,zt.U)(a=>a[0])):(this.down=this.openAndGetChildren().pipe((0,zt.U)(a=>a[0])),this.up=this.openAndGetChildren().pipe((0,zt.U)(a=>a[a.length-1])))}addChildren(a){rh.linkVertical(a),this.parent&&rh.linkParent(a,this.closeAndGetThis(),vs.LEFT),this.children.next(a)}openAndGetChildren(){return Yy(this.children,()=>this.toggleService.open=!0)}closeAndGetThis(){return Yy((0,es.of)(this),()=>this.toggleService.open=!1)}}return d.\u0275fac=function(a){return new(a||d)(l.LFG(l.Qsj),l.LFG(d,12),l.LFG(mi),l.LFG(bo),l.LFG(l.Lbi))},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();ny(Fu);new l.FiY,new l.tp0;var Ye=function(d){return d[d.RIGHT_CENTER=0]="RIGHT_CENTER",d[d.RIGHT_TOP=1]="RIGHT_TOP",d[d.RIGHT_BOTTOM=2]="RIGHT_BOTTOM",d[d.TOP_CENTER=3]="TOP_CENTER",d[d.TOP_RIGHT=4]="TOP_RIGHT",d[d.TOP_LEFT=5]="TOP_LEFT",d[d.BOTTOM_CENTER=6]="BOTTOM_CENTER",d[d.BOTTOM_RIGHT=7]="BOTTOM_RIGHT",d[d.BOTTOM_LEFT=8]="BOTTOM_LEFT",d[d.LEFT_CENTER=9]="LEFT_CENTER",d[d.LEFT_TOP=10]="LEFT_TOP",d[d.LEFT_BOTTOM=11]="LEFT_BOTTOM",d}(Ye||{});const Ky="absolute";class K1{constructor(f){this.element=f,this.boundOnScrollListener=this.emitScrollEvent.bind(this),this.scrollableElements=[],f.style.position=Ky,f.style.top=0,f.style.bottom="auto",f.style.left=0,f.style.right="auto"}anchor(f,a,g,{offsetX:_=0,offsetY:S=0,useAnchorParent:j=!1}={}){this.addScrollEventListeners(f),j&&(f=f.parentNode),f.style.position="static";const J=f.getBoundingClientRect(),te=this.element.getBoundingClientRect();let Ce=J.left-te.left+_,Ge=J.top-te.top+S;switch(a){case Ye.LEFT_TOP:case Ye.TOP_LEFT:break;case Ye.TOP_CENTER:Ce+=J.width/2;break;case Ye.TOP_RIGHT:case Ye.RIGHT_TOP:Ce+=J.width;break;case Ye.LEFT_BOTTOM:case Ye.BOTTOM_LEFT:Ge+=J.height;break;case Ye.BOTTOM_CENTER:Ge+=J.height,Ce+=J.width/2;break;case Ye.BOTTOM_RIGHT:case Ye.RIGHT_BOTTOM:Ge+=J.height,Ce+=J.width;break;case Ye.LEFT_CENTER:Ge+=J.height/2;break;case Ye.RIGHT_CENTER:Ge+=J.height/2,Ce+=J.width}switch(g){case Ye.LEFT_TOP:case Ye.TOP_LEFT:break;case Ye.TOP_CENTER:Ce-=te.width/2;break;case Ye.TOP_RIGHT:case Ye.RIGHT_TOP:Ce-=te.width;break;case Ye.LEFT_BOTTOM:case Ye.BOTTOM_LEFT:Ge-=te.height;break;case Ye.BOTTOM_CENTER:Ge-=te.height,Ce-=te.width/2;break;case Ye.BOTTOM_RIGHT:case Ye.RIGHT_BOTTOM:Ge-=te.height,Ce-=te.width;break;case Ye.LEFT_CENTER:Ge-=te.height/2;break;case Ye.RIGHT_CENTER:Ge-=te.height/2,Ce-=te.width}const St=getComputedStyle(this.element),Rt=parseInt(St.marginLeft,10),un=parseInt(St.marginRight,10),Xn=parseInt(St.marginTop,10),bi=parseInt(St.marginBottom,10);switch(a){case Ye.LEFT_TOP:case Ye.TOP_LEFT:case Ye.TOP_RIGHT:case Ye.RIGHT_TOP:(g===Ye.BOTTOM_RIGHT||g===Ye.RIGHT_BOTTOM)&&(Ge-=bi,Ce-=un),(g===Ye.BOTTOM_LEFT||g===Ye.LEFT_BOTTOM)&&(Ge-=Xn,Ce+=Rt),(g===Ye.TOP_LEFT||g===Ye.LEFT_TOP)&&(Ge+=Xn,Ce+=Rt),(g===Ye.TOP_RIGHT||g===Ye.RIGHT_TOP)&&(Ge+=Xn,Ce-=un);break;case Ye.LEFT_BOTTOM:case Ye.BOTTOM_LEFT:case Ye.BOTTOM_RIGHT:case Ye.RIGHT_BOTTOM:(g===Ye.BOTTOM_LEFT||g===Ye.LEFT_BOTTOM)&&(Ge-=bi,Ce+=Rt),(g===Ye.BOTTOM_RIGHT||g===Ye.RIGHT_BOTTOM)&&(Ge-=bi,Ce-=un),(g===Ye.TOP_LEFT||g===Ye.LEFT_TOP)&&(Ge+=Xn,Ce+=Rt),(g===Ye.TOP_RIGHT||g===Ye.RIGHT_TOP)&&(Ge+=Xn,Ce-=un);break;case Ye.TOP_CENTER:Ge-=bi,Ce+=Rt,Ce-=un;break;case Ye.BOTTOM_CENTER:Ge+=Xn,Ce+=Rt,Ce-=un;break;case Ye.LEFT_CENTER:Ge+=Xn,Ge-=bi,Ce-=un;break;case Ye.RIGHT_CENTER:Ge+=Xn,Ge-=bi,Ce+=Rt}return this.element.style.transform=`translateX(${Math.round(Ce)}px) translateY(${Math.round(Ge)}px)`,this._scroll.asObservable()}release(){this.element.style.transform="",this.removeScrollEventListeners()}isPositioned(f){const a=getComputedStyle(f).position;return"relative"===a||a===Ky||"fixed"===a}emitScrollEvent(){this._scroll.next()}addScrollEventListeners(f){this._scroll=new et.x;const a=f;let g=f;for(;g&&g!==document&&(this.scrolls(g)&&(g.addEventListener("scroll",this.boundOnScrollListener),this.scrollableElements.push(g)),g===a||!this.isPositioned(g));)g=g.parentNode}removeScrollEventListeners(){for(const f of this.scrollableElements)f.removeEventListener("scroll",this.boundOnScrollListener);this.scrollableElements.length=0,this._scroll&&(this._scroll.complete(),delete this._scroll)}scrolls(f){const a=getComputedStyle(f);return"scroll"===a.overflowX||"auto"===a.overflowX||"scroll"===a.overflowY||"auto"===a.overflowY}}let Jy=(()=>{class d{constructor(a,g){this.parentHost=g,this.closeOnOutsideClick=!1,this.popoverOptions={},this.updateAnchor=!1,this.documentESCListener=null,this.closeOnOutsideClickCallback=_=>{this.anchorElem.contains(_.target)||(this.toggleService.open=!1)},this.el=a.get(l.SBq),this.toggleService=a.get(mi),this.renderer=a.get(l.Qsj),this.ngZone=a.get(l.R0b),this.ref=a.get(l.sBO),this.anchorElem=g.nativeElement,this.popoverInstance=new K1(this.el.nativeElement),this.subscription=this.toggleService.openChange.subscribe(_=>{_?(this.anchor(),this.attachESCListener()):(this.release(),this.detachESCListener())}),this.toggleService.open&&(this.anchor(),this.attachESCListener())}get isOffScreen(){return!this.toggleService.open}ngAfterViewChecked(){this.updateAnchor&&(this.updateAnchor=!1,this.popoverInstance.anchor(this.anchorElem,this.anchorPoint,this.popoverPoint,this.popoverOptions).subscribe(()=>{this.toggleService.open=!1}),this.attachOutsideClickListener())}ngOnDestroy(){this.release(),this.detachESCListener(),this.subscription.unsubscribe()}anchor(){this.updateAnchor=!0}release(){this.detachOutsideClickListener(),this.popoverInstance.release()}attachESCListener(){this.popoverOptions.ignoreGlobalESCListener||this.ngZone.runOutsideAngular(()=>{this.documentESCListener=this.renderer.listen("document","keydown",a=>{a&&a.key&&Fs(a.key)===At.Escape&&this.ngZone.run(()=>{this.toggleService.open=!1,this.ref.markForCheck()})})})}detachESCListener(){this.documentESCListener&&(this.documentESCListener(),this.documentESCListener=null)}attachOutsideClickListener(){this.closeOnOutsideClick&&this.toggleService.open&&document&&document.addEventListener&&document.addEventListener("click",this.closeOnOutsideClickCallback,!0)}detachOutsideClickListener(){this.closeOnOutsideClick&&document&&document.removeEventListener&&document.removeEventListener("click",this.closeOnOutsideClickCallback,!0)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.zs3),l.Y36(l.SBq,4))},d.\u0275dir=l.lG2({type:d,hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("is-off-screen",g.isOffScreen)}}),d})(),Xy=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Bs,kn]}),d})(),nC=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275dir=l.lG2({type:d,selectors:[["",8,"alert-text"]]}),d})(),YD=(()=>{class d{constructor(){Jt.addIcons(Di,qr,ii,Gs,Or)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,Xy]}),d})(),WD=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[YD]}),d})(),Tn=(()=>{class d{}return d.NAV_LEVEL_1=1,d.NAV_LEVEL_2=2,d.NAV_CLOSE_ALL="NAV_CLOSE_ALL",d.NAV_OPEN="NAV_OPEN",d.NAV_CLOSE="NAV_CLOSE",d.NAV_TOGGLE="NAV_TOGGLE",d.NAV_CLASS_HAMBURGER_MENU="open-hamburger-menu",d.NAV_CLASS_OVERFLOW_MENU="open-overflow-menu",d.NAV_CLASS_TRIGGER_1="header-hamburger-trigger",d.NAV_CLASS_TRIGGER_2="header-overflow-trigger",d.NAV_CLASS_LEVEL_1="clr-nav-level-1",d.NAV_CLASS_LEVEL_2="clr-nav-level-2",d})();class iC{constructor(f,a){this._controlCode=f,this._navLevel=a}get controlCode(){return this._controlCode}get navLevel(){return this._navLevel}}let Hh=(()=>{class d{constructor(){this.responsiveNavList=[],this.registerNavSubject=new ds,this.controlNavSubject=new et.x,this.closeAllNavs()}get registeredNavs(){return this.registerNavSubject.asObservable()}get navControl(){return this.controlNavSubject.asObservable()}registerNav(a){!a||this.isNavRegistered(a)||(this.responsiveNavList.push(a),this.registerNavSubject.next(this.responsiveNavList))}isNavRegistered(a){return this.responsiveNavList.indexOf(a)>-1&&(console.error("Multiple clr-nav-level "+a+" attributes found. Please make sure that only one exists"),!0)}unregisterNav(a){const g=this.responsiveNavList.indexOf(a);g>-1&&(this.responsiveNavList.splice(g,1),this.registerNavSubject.next(this.responsiveNavList))}sendControlMessage(a,g){const _=new iC(a,g);this.controlNavSubject.next(_)}closeAllNavs(){const a=new iC(Tn.NAV_CLOSE_ALL,-999);this.controlNavSubject.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"}),d})(),rC=(()=>{class d{constructor(a,g){this.elRef=a,this.responsiveNavService=g}ngOnInit(){this._classList=this.elRef.nativeElement.classList,this._subscription=this.responsiveNavService.navControl.subscribe({next:a=>{this.processMessage(a)}})}processMessage(a){let g=Tn.NAV_CLASS_HAMBURGER_MENU;a.controlCode===Tn.NAV_CLOSE_ALL?(this._classList.remove(Tn.NAV_CLASS_HAMBURGER_MENU),this._classList.remove(Tn.NAV_CLASS_OVERFLOW_MENU)):a.navLevel===Tn.NAV_LEVEL_1?this.controlNav(a.controlCode,g):a.navLevel===Tn.NAV_LEVEL_2&&(g=Tn.NAV_CLASS_OVERFLOW_MENU,this.controlNav(a.controlCode,g))}controlNav(a,g){a===Tn.NAV_OPEN?this._classList.add(g):a===Tn.NAV_CLOSE?this._classList.remove(g):a===Tn.NAV_TOGGLE&&this._classList.toggle(g)}ngOnDestroy(){this._subscription.unsubscribe()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(Hh))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-main-container"]],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("main-container",!0)}}),d})(),ZD=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn]}),d})(),Cc=(()=>{class d extends Za{}return d.\u0275fac=function(){let f;return function(g){return(f||(f=l.n5z(d)))(g||d)}}(),d.\u0275dir=l.lG2({type:d,selectors:[["clr-main-container"]],features:[l.qOj]}),d})(),sC=(()=>{class d extends Qa{constructor(a,g,_){if(!g)throw new Error("clr-header should only be used inside of a clr-main-container");super(a,g),this.responsiveNavService=_}get flavor(){return this.responsiveNavService.responsiveNavList.reduce((a,g)=>a+g,0)}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.sBO),l.Y36(Cc,8),l.Y36(Hh))},d.\u0275dir=l.lG2({type:d,selectors:[["clr-header"]],features:[l.qOj]}),d})(),oC=(()=>{class d{constructor(a,g){this.responsiveNavService=a,this.commonStrings=g,this.role="banner",this.isNavLevel1OnPage=!1,this.isNavLevel2OnPage=!1,this.openNavLevel=null,this.responsiveNavCodes=Tn,this._subscription=this.responsiveNavService.registeredNavs.subscribe({next:_=>{this.initializeNavTriggers(_)}}),this._subscription.add(this.responsiveNavService.navControl.pipe((0,Ln.h)(({controlCode:_})=>_===Tn.NAV_CLOSE||_===Tn.NAV_CLOSE_ALL)).subscribe(()=>{this.openNavLevel=null}))}get responsiveNavCommonString(){const a=this.commonStrings.keys;return this.openNavLevel!==this.responsiveNavCodes.NAV_LEVEL_1?a.responsiveNavToggleOpen:a.responsiveNavToggleClose}get responsiveOverflowCommonString(){const a=this.commonStrings.keys;return this.openNavLevel!==this.responsiveNavCodes.NAV_LEVEL_2?a.responsiveNavOverflowOpen:a.responsiveNavOverflowClose}resetNavTriggers(){this.isNavLevel1OnPage=!1,this.isNavLevel2OnPage=!1}initializeNavTriggers(a){this.resetNavTriggers(),a.length>2?console.error("More than 2 Nav Levels detected."):a.forEach(g=>{g===Tn.NAV_LEVEL_1?this.isNavLevel1OnPage=!0:g===Tn.NAV_LEVEL_2&&(this.isNavLevel2OnPage=!0)})}closeOpenNav(){this.responsiveNavService.closeAllNavs()}toggleNav(a){this.openNavLevel!==a?this.openNav(a):this.responsiveNavService.sendControlMessage(Tn.NAV_CLOSE,a)}openNav(a){this.openNavLevel=a,this.responsiveNavService.sendControlMessage(Tn.NAV_OPEN,a)}ngOnDestroy(){this._subscription.unsubscribe()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Hh),l.Y36(pn))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-header"]],hostVars:3,hostBindings:function(a,g){2&a&&(l.uIk("role",g.role),l.ekj("header",!0))},inputs:{role:"role"},ngContentSelectors:jt,decls:4,vars:2,consts:[["type","button","class","header-hamburger-trigger",3,"click",4,"ngIf"],["type","button","class","header-overflow-trigger",3,"click",4,"ngIf"],[1,"header-backdrop",3,"click"],["type","button",1,"header-hamburger-trigger",3,"click"],["type","button",1,"header-overflow-trigger",3,"click"]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,XE,2,1,"button",0),l.Hsn(1),l.YNc(2,vS,2,1,"button",1),l.TgZ(3,"div",2),l.NdJ("click",function(){return g.closeOpenNav()}),l.qZA()),2&a&&(l.Q6J("ngIf",g.isNavLevel1OnPage),l.xp6(2),l.Q6J("ngIf",g.isNavLevel2OnPage))},dependencies:[k.O5],encapsulation:2}),d})(),aC=(()=>{class d{constructor(a,g,_,S,j,J){this.cdkTrapFocus=g,this.responsiveNavService=_,this.elementRef=S,this.renderer=j,this._isOpen=!1,(0,k.NF)(a)&&(this._document=J.get(k.K0)),this._subscription=_.navControl.pipe((0,Ln.h)(te=>te.navLevel===this.level),(0,Ln.h)(({controlCode:te})=>te===Tn.NAV_OPEN&&!this.isOpen||te===Tn.NAV_CLOSE&&this.isOpen)).subscribe(({controlCode:te})=>{te!==Tn.NAV_OPEN?this.close():this.open()}),this._subscription.add(_.navControl.pipe((0,Ln.h)(({controlCode:te})=>te===Tn.NAV_CLOSE_ALL)).subscribe(()=>this.close()))}get level(){return this._level}get responsiveNavCodes(){return Tn}get isOpen(){return this._isOpen}ngOnInit(){this.cdkTrapFocus.enabled=!1,this.closeButtonAriaLabel||(this.closeButtonAriaLabel=this._level===Tn.NAV_LEVEL_1?Qp.responsiveNavToggleClose:Qp.responsiveNavOverflowClose),this.level===Tn.NAV_LEVEL_1||this.level===Tn.NAV_LEVEL_2?(this.responsiveNavService.registerNav(this.level),this.addNavClass(this.level)):console.error("Nav Level can only be 1 or 2")}ngAfterViewInit(){const a=((d,f)=>{const a=this._document.createElement("cds-internal-close-button");return a.setAttribute("icon-size","32"),a.setAttribute("aria-label",f),a.setAttribute("aria-hidden","true"),a.setAttribute("type","button"),a.setAttribute("hidden","true"),a.className="clr-nav-close",a})(0,this.closeButtonAriaLabel);this.renderer.listen(a,"click",this.close.bind(this)),this.renderer.insertBefore(this.elementRef.nativeElement,a,this.elementRef.nativeElement.firstChild),this._document.body.clientWidth<992&&this.close()}ngOnDestroy(){this.responsiveNavService.unregisterNav(this.level),this._subscription.unsubscribe()}onResize(a){a.target.innerWidth<992&&this.isOpen?this.close():this.showNavigation()}onMouseClick(a){let g=a;const _=this.elementRef.nativeElement;for(;g;){if(g===_)return;if(g.classList.contains("nav-link")&&this._document.body.clientWidth<992)return void this.close();g=g.parentNode}}addNavClass(a){const g=this.elementRef.nativeElement.classList;a===Tn.NAV_LEVEL_1?g.add(Tn.NAV_CLASS_LEVEL_1):a===Tn.NAV_LEVEL_2&&g.add(Tn.NAV_CLASS_LEVEL_2)}open(){this._isOpen=!0,this.showNavigation(),this.cdkTrapFocus.enabled=!0,this.showCloseButton(),this.responsiveNavService.sendControlMessage(Tn.NAV_OPEN,this.level)}close(){this._isOpen=!1,this.hideNavigation(),this.cdkTrapFocus.enabled=!1,this.hideCloseButton(),this.responsiveNavService.sendControlMessage(Tn.NAV_CLOSE,this.level)}hideNavigation(){this.renderer.setAttribute(this.elementRef.nativeElement,"aria-hidden","true"),this.renderer.setAttribute(this.elementRef.nativeElement,"hidden","true")}showNavigation(){this.renderer.setAttribute(this.elementRef.nativeElement,"aria-hidden","false"),this.renderer.removeAttribute(this.elementRef.nativeElement,"hidden")}hideCloseButton(){this.renderer.setAttribute(this.elementRef.nativeElement,"aria-hidden","true"),this.renderer.setAttribute(this.elementRef.nativeElement.querySelector(".clr-nav-close"),"hidden","true")}showCloseButton(){this.renderer.setAttribute(this.elementRef.nativeElement.querySelector(".clr-nav-close"),"aria-hidden","false"),this.renderer.removeAttribute(this.elementRef.nativeElement.querySelector(".clr-nav-close"),"hidden")}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.Lbi),l.Y36(W_),l.Y36(Hh),l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(l.zs3))},d.\u0275dir=l.lG2({type:d,selectors:[["","clr-nav-level",""]],hostBindings:function(a,g){1&a&&l.NdJ("resize",function(S){return g.onResize(S)},!1,l.Jf7)("click",function(S){return g.onMouseClick(S.target)})},inputs:{_level:["clr-nav-level","_level"],closeButtonAriaLabel:["closeAriaLabel","closeButtonAriaLabel"]},features:[l.zW0([W_])]}),d})(),qD=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,Xy]}),d})(),KD=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})();new l.OlP("TABS_ID");let Ss=(()=>{class d{constructor(){Jt.addIcons(Ao)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Bs,kn,KD,cc,Bs]}),d})(),Uh=(()=>{class d{constructor(){this.navGroupCount=0}registerNavGroup(){this.navGroupCount++}unregisterNavGroup(){this.navGroupCount--}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),$h=(()=>{class d{constructor(){this._icons=0}get hasIcons(){return this._icons>0}registerIcon(){this._icons++}unregisterIcon(){this._icons--}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),tm=(()=>{class d{constructor(){this._animateOnCollapsed=new et.x,this._collapsedChanged=new et.x,this._collapsed=!1,this._collapsible=!1}get animateOnCollapsed(){return this._animateOnCollapsed.asObservable()}get collapsedChanged(){return this._collapsedChanged.asObservable()}get collapsed(){return this._collapsed}set collapsed(a){a=!!a,this.collapsible&&this._collapsed!==a&&this.updateCollapseBehavior(a)}get collapsible(){return this._collapsible}set collapsible(a){this._collapsible!==(a=!!a)&&(!a&&this.collapsed&&this.updateCollapseBehavior(!1),this._collapsible=a)}updateCollapseBehavior(a){this._animateOnCollapsed.next(a),this._collapsed=a,this._collapsedChanged.next(a)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})(),nm=(()=>{class d{constructor(a,g,_,S){this._navService=a,this._navIconService=g,this._navGroupRegistrationService=_,this.commonStrings=S,this._collapsedChanged=new l.vpe(!0),this._sub=this._navService.collapsedChanged.subscribe(j=>{this._collapsedChanged.emit(j)})}get collapsible(){return this._navService.collapsible}set collapsible(a){this._navService.collapsible=a}get collapsed(){return this._navService.collapsed}set collapsed(a){this._navService.collapsed=a}get hasNavGroups(){return this._navGroupRegistrationService.navGroupCount>0}get hasIcons(){return this._navIconService.hasIcons}get ariaExpanded(){return this.collapsible?this.collapsed?"false":"true":null}ngOnDestroy(){this._sub.unsubscribe()}toggleByButton(){this.collapsed=!this.collapsed}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(tm),l.Y36($h),l.Y36(Uh),l.Y36(pn))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-vertical-nav"]],hostAttrs:[1,"clr-vertical-nav"],hostVars:6,hostBindings:function(a,g){2&a&&l.ekj("is-collapsed",g.collapsed)("has-nav-groups",g.hasNavGroups)("has-icons",g.hasIcons)},inputs:{collapsible:["clrVerticalNavCollapsible","collapsible"],collapsed:["clrVerticalNavCollapsed","collapsed"]},outputs:{_collapsedChanged:"clrVerticalNavCollapsedChange"},features:[l._Bn([tm,$h,Uh])],ngContentSelectors:jt,decls:4,vars:2,consts:[["type","button","class","nav-trigger",3,"on-collapse","click",4,"ngIf"],[1,"nav-content"],["type","button","class","nav-btn","aria-hidden","true","tabindex","-1",3,"click",4,"ngIf"],["type","button",1,"nav-trigger",3,"click"],["shape","angle-double",1,"nav-trigger-icon"],["type","button","aria-hidden","true","tabindex","-1",1,"nav-btn",3,"click"]],template:function(a,g){1&a&&(l.F$t(),l.YNc(0,Qd,2,5,"button",0),l.TgZ(1,"div",1),l.Hsn(2),l.YNc(3,R_,1,1,"button",2),l.qZA()),2&a&&(l.Q6J("ngIf",g.collapsible),l.xp6(3),l.Q6J("ngIf",g.collapsible&&g.collapsed))},dependencies:[k.O5,Pn],encapsulation:2}),d})(),im=(()=>{class d{constructor(){this._expandChange=new et.x}get expandChange(){return this._expandChange.asObservable()}expand(){this._expandChange.next(!0)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275prov=l.Yz7({token:d,factory:d.\u0275fac}),d})();const cl="expanded",Ur="collapsed";let rm=(()=>{class d{constructor(a,g,_,S,j){this._itemExpand=a,this._navGroupRegistrationService=g,this._navGroupService=_,this._navService=S,this.commonStrings=j,this.expandedChange=new l.vpe(!0),this.wasExpanded=!1,this._subscriptions=[],this._expandAnimationState=Ur,this._navGroupRegistrationService.registerNavGroup(),this._subscriptions.push(this._itemExpand.expandChange.subscribe(J=>{J&&this.expandAnimationState===Ur?(this._navService.collapsed&&(this._navService.collapsed=!1),this.expandAnimationState=cl):!J&&this.expandAnimationState===cl&&(this.expandAnimationState=Ur)})),this._subscriptions.push(this._navService.animateOnCollapsed.subscribe(J=>{J&&this.expanded?(this.wasExpanded=!0,this.expandAnimationState=Ur):!J&&this.wasExpanded&&(this.expandGroup(),this.wasExpanded=!1)})),this._subscriptions.push(this._navGroupService.expandChange.subscribe(J=>{J&&!this.expanded&&this.expandGroup()}))}get expanded(){return this._itemExpand.expanded}set expanded(a){this._itemExpand.expanded!==a&&(this._itemExpand.expanded=a,this.expandedChange.emit(a))}set userExpandedInput(a){this.expanded!==(a=!!a)&&this.toggleExpand()}get expandAnimationState(){return this._expandAnimationState}set expandAnimationState(a){a!==this._expandAnimationState&&(this._expandAnimationState=a)}ngAfterContentInit(){this._navService.collapsed&&this.expanded&&(this.wasExpanded=!0,this.expandAnimationState=Ur)}ngOnDestroy(){this._subscriptions.forEach(a=>a.unsubscribe()),this._navGroupRegistrationService.unregisterNavGroup()}expandGroup(){this.expanded=!0,this.expandAnimationState=cl}collapseGroup(){this.expandAnimationState=Ur}expandAnimationDone(a){a.toState===Ur&&(this.expanded=!1)}toggleExpand(){this.expanded?this.collapseGroup():(this._navService.collapsed&&(this._navService.collapsed=!1),this.expandGroup())}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(Br),l.Y36(Uh),l.Y36(im),l.Y36(tm),l.Y36(pn))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-vertical-nav-group"]],hostAttrs:[1,"nav-group"],hostVars:2,hostBindings:function(a,g){2&a&&l.ekj("is-expanded",g.expanded)},inputs:{userExpandedInput:["clrVerticalNavGroupExpanded","userExpandedInput"]},outputs:{expandedChange:"clrVerticalNavGroupExpandedChange"},features:[l._Bn([Br,im])],ngContentSelectors:P_,decls:9,vars:3,consts:[[1,"nav-group-content"],["type","button",1,"nav-group-trigger",3,"click"],[1,"nav-group-text"],["shape","angle",1,"nav-group-trigger-icon"],[1,"nav-group-children"]],template:function(a,g){1&a&&(l.F$t(du),l.TgZ(0,"div",0),l.Hsn(1),l.TgZ(2,"button",1),l.NdJ("click",function(){return g.toggleExpand()}),l.Hsn(3,1),l.TgZ(4,"div",2),l.Hsn(5,2),l.qZA(),l._UZ(6,"cds-icon",3),l.qZA()(),l.TgZ(7,"div",4),l.NdJ("@clrExpand.done",function(S){return g.expandAnimationDone(S)}),l.Hsn(8,3),l.qZA()),2&a&&(l.xp6(2),l.uIk("aria-expanded",g.expanded),l.xp6(4),l.uIk("direction",g.expanded?"down":"right"),l.xp6(1),l.Q6J("@clrExpand",g.expandAnimationState))},dependencies:[Pn],encapsulation:2,data:{animation:[(0,P.X$)("clrExpand",[(0,P.SB)(cl,(0,P.oB)({height:"*"})),(0,P.SB)(Ur,(0,P.oB)({height:0,visibility:"hidden"})),(0,P.eR)(`${cl} <=> ${Ur}`,(0,P.jt)("0.2s ease-in-out"))])]}}),d})(),Gh=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-vertical-nav-group-children"]],ngContentSelectors:jt,decls:1,vars:0,template:function(a,g){1&a&&(l.F$t(),l.Hsn(0))},encapsulation:2}),d})(),Yh=(()=>{class d{constructor(a){this._verticalNavIconService=a,this._verticalNavIconService.registerIcon()}ngOnDestroy(){this._verticalNavIconService.unregisterIcon()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36($h))},d.\u0275dir=l.lG2({type:d,selectors:[["","clrVerticalNavIcon",""]],hostAttrs:[1,"nav-icon"]}),d})(),fC=(()=>{class d{constructor(a,g,_){this.destroy$=new et.x,_&&(0,ki.R)(a.nativeElement,"click").pipe((0,Xr.R)(this.destroy$)).subscribe(()=>{_.expand(),g.markForCheck()})}ngOnDestroy(){this.destroy$.next()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.SBq),l.Y36(l.sBO),l.Y36(im,8))},d.\u0275cmp=l.Xpm({type:d,selectors:[["","clrVerticalNavLink",""]],hostAttrs:[1,"nav-link"],attrs:DS,ngContentSelectors:wS,decls:3,vars:0,consts:[[1,"nav-text"]],template:function(a,g){1&a&&(l.F$t(hu),l.Hsn(0),l.TgZ(1,"span",0),l.Hsn(2,1),l.qZA())},encapsulation:2}),d})(),pC=(()=>{class d{constructor(){Jt.addIcons(Yr,yn)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,Bs,oh,Bs,kn,oh]}),d})(),iw=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[ZD,qD,Ss,pC]}),d})(),sw=(()=>{class d{constructor(){Jt.addIcons(Or)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,mg,kn,kn]}),d})();const _C={"top-left":{anchorPoint:Ye.TOP_CENTER,popoverPoint:Ye.BOTTOM_RIGHT,offsetY:-10,offsetX:0},"top-middle":{anchorPoint:Ye.TOP_CENTER,popoverPoint:Ye.BOTTOM_CENTER,offsetY:-10,offsetX:0},"top-right":{anchorPoint:Ye.TOP_CENTER,popoverPoint:Ye.BOTTOM_LEFT,offsetY:-10,offsetX:0},"right-top":{anchorPoint:Ye.RIGHT_CENTER,popoverPoint:Ye.LEFT_BOTTOM,offsetY:2,offsetX:14},"right-middle":{anchorPoint:Ye.RIGHT_CENTER,popoverPoint:Ye.LEFT_CENTER,offsetY:6,offsetX:14},"right-bottom":{anchorPoint:Ye.RIGHT_CENTER,popoverPoint:Ye.LEFT_TOP,offsetY:-1,offsetX:14},"bottom-right":{anchorPoint:Ye.BOTTOM_CENTER,popoverPoint:Ye.TOP_LEFT,offsetY:9,offsetX:-1},"bottom-middle":{anchorPoint:Ye.BOTTOM_CENTER,popoverPoint:Ye.TOP_CENTER,offsetY:9,offsetX:12},"bottom-left":{anchorPoint:Ye.BOTTOM_CENTER,popoverPoint:Ye.TOP_RIGHT,offsetY:9,offsetX:0},"left-bottom":{anchorPoint:Ye.LEFT_CENTER,popoverPoint:Ye.RIGHT_TOP,offsetY:0,offsetX:-14},"left-middle":{anchorPoint:Ye.LEFT_CENTER,popoverPoint:Ye.RIGHT_CENTER,offsetY:4,offsetX:-14},"left-top":{anchorPoint:Ye.LEFT_CENTER,popoverPoint:Ye.RIGHT_BOTTOM,offsetY:0,offsetX:-14},default:{anchorPoint:Ye.RIGHT_CENTER,popoverPoint:Ye.LEFT_CENTER,offsetY:6,offsetX:14}},ow=["top-left","top-middle","top-right","right-top","right-middle","right-bottom","bottom-right","bottom-middle","bottom-left","left-bottom","left-middle","left-top"];let sm=(()=>{class d extends Jy{constructor(a,g,_,S,j,J,te){if(super(a,g),this.commonStrings=_,this.signpostIdService=S,this.signpostFocusManager=j,this.platformId=J,this.signpostContentId=dr(),!g)throw new Error("clr-signpost-content should only be used inside of a clr-signpost");this.position="right-middle",this.closeOnOutsideClick=!0,this.signpostIdService.setId(this.signpostContentId),this.document=te}get position(){return this._position}set position(a){this.renderer.removeClass(this.el.nativeElement,this.position),this._position=a&&ow.indexOf(a)>-1?a:"right-middle",this.renderer.addClass(this.el.nativeElement,this.position);const g=_C[this.position];this.anchorPoint=g.anchorPoint,this.popoverPoint=g.popoverPoint,this.popoverOptions.offsetY=g.offsetY,this.popoverOptions.offsetX=g.offsetX}close(){this.toggleService.open=!1}ngOnDestroy(){super.ngOnDestroy(),(0,k.NF)(this.platformId)&&this.el.nativeElement.contains(this.document.activeElement)&&this.signpostFocusManager.focusTrigger()}}return d.\u0275fac=function(a){return new(a||d)(l.Y36(l.zs3),l.Y36(nc,8),l.Y36(pn),l.Y36(Lg),l.Y36(Fg),l.Y36(l.Lbi),l.Y36(k.K0))},d.\u0275cmp=l.Xpm({type:d,selectors:[["clr-signpost-content"]],hostVars:3,hostBindings:function(a,g){2&a&&(l.Ikx("id",g.signpostContentId),l.ekj("signpost-content",!0))},inputs:{position:["clrPosition","position"]},features:[l.qOj],ngContentSelectors:jt,decls:7,vars:3,consts:[[1,"signpost-wrap"],[1,"popover-pointer"],[1,"signpost-content-header"],["type","button",1,"signpost-action","close",3,"click"],["shape","window-close"],[1,"signpost-content-body"]],template:function(a,g){1&a&&(l.F$t(),l.TgZ(0,"div",0),l._UZ(1,"div",1),l.TgZ(2,"div",2)(3,"button",3),l.NdJ("click",function(){return g.close()}),l._UZ(4,"cds-icon",4),l.qZA()(),l.TgZ(5,"div",5),l.Hsn(6),l.qZA()()),2&a&&(l.xp6(3),l.uIk("aria-label",g.commonStrings.keys.signpostClose)("aria-controls",g.signpostContentId),l.xp6(1),l.uIk("title",g.commonStrings.keys.close))},dependencies:[Pn],encapsulation:2}),d})(),om=(()=>{class d{constructor(){Jt.addIcons(Or,qr)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,oh,Bs]}),d})(),rT=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,Bs,kn]}),d})(),bC=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[Xy,om,rT]}),d})(),cw=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez]}),d})(),aT=(()=>{class d{constructor(){Jt.addIcons($i,Ra,_r,Ys)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,kn,bu,kn,bu]}),d})(),fw=(()=>{class d{constructor(){Jt.addIcons(_r)}}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[k.ez,sw,YD]}),d})(),pw=(()=>{class d{}return d.\u0275fac=function(a){return new(a||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[WD,Gy,kn,sw,cg,Bs,oh,XS,by,iw,bC,fw,s1,bu,cw,tc,aT]}),d})()}},ct=>{ct(ct.s=5476)}]); \ No newline at end of file diff --git a/runtime.3e13c9cd6b96cbc1.js b/runtime.3e13c9cd6b96cbc1.js deleted file mode 100644 index dc2004e25..000000000 --- a/runtime.3e13c9cd6b96cbc1.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,g={},h={};function r(e){var n=h[e];if(void 0!==n)return n.exports;var t=h[e]={id:e,loaded:!1,exports:{}};return g[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=g,e=[],r.O=(n,t,f,o)=>{if(!t){var a=1/0;for(d=0;d=o)&&Object.keys(r.O).every(u=>r.O[u](t[i]))?t.splice(i--,1):(b=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[t,f,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},(()=>{var n,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,f){if(1&f&&(t=this(t)),8&f||"object"==typeof t&&t&&(4&f&&t.__esModule||16&f&&"function"==typeof t.then))return t;var o=Object.create(null);r.r(o);var d={};n=n||[null,e({}),e([]),e(e)];for(var a=2&f&&t;"object"==typeof a&&!~n.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(b=>d[b]=()=>t[b]);return d.default=()=>t,r.d(o,d),o}})(),r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(592===e?"common":e)+"."+{62:"a64c228eb8981993",82:"b35fbd97192e321c",93:"828861184fae9558",168:"6c44f8e72cf1ab8d",198:"4ef4a65a14ca2264",209:"b21d569063ab7c01",270:"ee9cfe0a5aa88493",283:"0b696c2c70bddaf2",365:"2e06192f96380e7e",371:"bffdfbcf7387fbd3",395:"c8d5f5a9c412dc0f",445:"cc172764ff687d79",449:"dfc102d8208b6e6c",466:"f37996d88c63c8e0",498:"8d8704bd8d0cc999",550:"6725a3bc71861634",592:"09c09c4f757af0c7",595:"a2324f65c3dbc09f",631:"886b9c0b5e40c260",633:"35b57ba8aa60603d",667:"a4877827f0e83a52",733:"fed1fe1ddbd0e2f8",754:"94dff4c09580ce5c",783:"2e672a905bf30e2d",979:"b4b04f45c994ed41",990:"fc74e1c1764372c5"}[e]+".js",r.miniCssF=e=>{},r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="demo-maps:";r.l=(t,f,o,d)=>{if(e[t])e[t].push(f);else{var a,b;if(void 0!==o)for(var i=document.getElementsByTagName("script"),s=0;s{a.onerror=a.onload=null,clearTimeout(l);var _=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),_&&_.forEach(y=>y(u)),v)return v(u)},l=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),b&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(f,o)=>{var d=r.o(e,f)?e[f]:void 0;if(0!==d)if(d)o.push(d[2]);else if(666!=f){var a=new Promise((c,p)=>d=e[f]=[c,p]);o.push(d[2]=a);var b=r.p+r.u(f),i=new Error;r.l(b,c=>{if(r.o(e,f)&&(0!==(d=e[f])&&(e[f]=void 0),d)){var p=c&&("load"===c.type?"missing":c.type),l=c&&c.target&&c.target.src;i.message="Loading chunk "+f+" failed.\n("+p+": "+l+")",i.name="ChunkLoadError",i.type=p,i.request=l,d[1](i)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,o)=>{var i,s,[d,a,b]=o,c=0;if(d.some(l=>0!==e[l])){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(b)var p=b(r)}for(f&&f(o);c{"use strict";var e,v={},m={};function r(e){var n=m[e];if(void 0!==n)return n.exports;var t=m[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(n,t,f,i)=>{if(!t){var a=1/0;for(d=0;d=i)&&Object.keys(r.O).every(p=>r.O[p](t[o]))?t.splice(o--,1):(l=!1,i0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[t,f,i]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(592===e?"common":e)+"."+{62:"a64c228eb8981993",198:"4ef4a65a14ca2264",209:"b21d569063ab7c01",270:"ee9cfe0a5aa88493",365:"2e06192f96380e7e",371:"bffdfbcf7387fbd3",394:"8a12a10ca8a809c9",395:"c8d5f5a9c412dc0f",445:"cc172764ff687d79",449:"dfc102d8208b6e6c",466:"f37996d88c63c8e0",550:"6725a3bc71861634",592:"09c09c4f757af0c7",595:"a2324f65c3dbc09f",631:"886b9c0b5e40c260",633:"35b57ba8aa60603d",667:"a4877827f0e83a52",754:"94dff4c09580ce5c",783:"2e672a905bf30e2d",990:"fc74e1c1764372c5"}[e]+".js",r.miniCssF=e=>{},r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="demo-maps:";r.l=(t,f,i,d)=>{if(e[t])e[t].push(f);else{var a,l;if(void 0!==i)for(var o=document.getElementsByTagName("script"),s=0;s{a.onerror=a.onload=null,clearTimeout(b);var g=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),g&&g.forEach(_=>_(p)),h)return h(p)},b=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(f,i)=>{var d=r.o(e,f)?e[f]:void 0;if(0!==d)if(d)i.push(d[2]);else if(666!=f){var a=new Promise((c,u)=>d=e[f]=[c,u]);i.push(d[2]=a);var l=r.p+r.u(f),o=new Error;r.l(l,c=>{if(r.o(e,f)&&(0!==(d=e[f])&&(e[f]=void 0),d)){var u=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;o.message="Loading chunk "+f+" failed.\n("+u+": "+b+")",o.name="ChunkLoadError",o.type=u,o.request=b,d[1](o)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,i)=>{var o,s,[d,a,l]=i,c=0;if(d.some(b=>0!==e[b])){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(l)var u=l(r)}for(f&&f(i);c